@dhzh/foundry 11.1.0 → 11.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,257 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/code-editor-CL0sQ6qH.js","assets/code-editor-DMeNDIaI.css"])))=>i.map(i=>d[i]);
2
+ function Dj(e,t){for(var s=0;s<t.length;s++){const i=t[s];if(typeof i!="string"&&!Array.isArray(i)){for(const o in i)if(o!=="default"&&!(o in e)){const l=Object.getOwnPropertyDescriptor(i,o);l&&Object.defineProperty(e,o,l.get?l:{enumerable:!0,get:()=>i[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const u of l.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function s(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(o){if(o.ep)return;o.ep=!0;const l=s(o);fetch(o.href,l)}})();function nC(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $0={exports:{}},hu={};var pw;function jj(){if(pw)return hu;pw=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function s(i,o,l){var u=null;if(l!==void 0&&(u=""+l),o.key!==void 0&&(u=""+o.key),"key"in o){l={};for(var d in o)d!=="key"&&(l[d]=o[d])}else l=o;return o=l.ref,{$$typeof:e,type:i,key:u,ref:o!==void 0?o:null,props:l}}return hu.Fragment=t,hu.jsx=s,hu.jsxs=s,hu}var gw;function Ij(){return gw||(gw=1,$0.exports=jj()),$0.exports}var v=Ij(),Q0={exports:{}},Mt={};var mw;function Pj(){if(mw)return Mt;mw=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),x=Symbol.for("react.view_transition"),S=Symbol.iterator;function w(I){return I===null||typeof I!="object"?null:(I=S&&I[S]||I["@@iterator"],typeof I=="function"?I:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,R={};function O(I,F,Z){this.props=I,this.context=F,this.refs=R,this.updater=Z||C}O.prototype.isReactComponent={},O.prototype.setState=function(I,F){if(typeof I!="object"&&typeof I!="function"&&I!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,I,F,"setState")},O.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function T(){}T.prototype=O.prototype;function A(I,F,Z){this.props=I,this.context=F,this.refs=R,this.updater=Z||C}var N=A.prototype=new T;N.constructor=A,E(N,O.prototype),N.isPureReactComponent=!0;var j=Array.isArray;function D(){}var M={H:null,A:null,T:null,S:null},z=Object.prototype.hasOwnProperty;function L(I,F,Z){var ne=Z.ref;return{$$typeof:e,type:I,key:F,ref:ne!==void 0?ne:null,props:Z}}function K(I,F){return L(I.type,F,I.props)}function X(I){return typeof I=="object"&&I!==null&&I.$$typeof===e}function B(I){var F={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(Z){return F[Z]})}var H=/\/+/g;function U(I,F){return typeof I=="object"&&I!==null&&I.key!=null?B(""+I.key):F.toString(36)}function _(I){switch(I.status){case"fulfilled":return I.value;case"rejected":throw I.reason;default:switch(typeof I.status=="string"?I.then(D,D):(I.status="pending",I.then(function(F){I.status==="pending"&&(I.status="fulfilled",I.value=F)},function(F){I.status==="pending"&&(I.status="rejected",I.reason=F)})),I.status){case"fulfilled":return I.value;case"rejected":throw I.reason}}throw I}function Q(I,F,Z,ne,ye){var se=typeof I;(se==="undefined"||se==="boolean")&&(I=null);var ge=!1;if(I===null)ge=!0;else switch(se){case"bigint":case"string":case"number":ge=!0;break;case"object":switch(I.$$typeof){case e:case t:ge=!0;break;case m:return ge=I._init,Q(ge(I._payload),F,Z,ne,ye)}}if(ge)return ye=ye(I),ge=ne===""?"."+U(I,0):ne,j(ye)?(Z="",ge!=null&&(Z=ge.replace(H,"$&/")+"/"),Q(ye,F,Z,"",function(Re){return Re})):ye!=null&&(X(ye)&&(ye=K(ye,Z+(ye.key==null||I&&I.key===ye.key?"":(""+ye.key).replace(H,"$&/")+"/")+ge)),F.push(ye)),1;ge=0;var fe=ne===""?".":ne+":";if(j(I))for(var ce=0;ce<I.length;ce++)ne=I[ce],se=fe+U(ne,ce),ge+=Q(ne,F,Z,se,ye);else if(ce=w(I),typeof ce=="function")for(I=ce.call(I),ce=0;!(ne=I.next()).done;)ne=ne.value,se=fe+U(ne,ce++),ge+=Q(ne,F,Z,se,ye);else if(se==="object"){if(typeof I.then=="function")return Q(_(I),F,Z,ne,ye);throw F=String(I),Error("Objects are not valid as a React child (found: "+(F==="[object Object]"?"object with keys {"+Object.keys(I).join(", ")+"}":F)+"). If you meant to render a collection of children, use an array instead.")}return ge}function $(I,F,Z){if(I==null)return I;var ne=[],ye=0;return Q(I,ne,"","",function(se){return F.call(Z,se,ye++)}),ne}function q(I){if(I._status===-1){var F=I._result,Z=F();Z.then(function(ne){(I._status===0||I._status===-1)&&(I._status=1,I._result=ne,Z.status===void 0&&(Z.status="fulfilled",Z.value=ne))},function(ne){(I._status===0||I._status===-1)&&(I._status=2,I._result=ne,Z.status===void 0&&(Z.status="rejected",Z.reason=ne))}),I._status===-1&&(I._status=0,I._result=Z)}if(I._status===1)return I._result.default;throw I._result}var Y=typeof reportError=="function"?reportError:function(I){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var F=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof I=="object"&&I!==null&&typeof I.message=="string"?String(I.message):String(I),error:I});if(!window.dispatchEvent(F))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",I);return}console.error(I)};function ee(I){var F=M.T,Z={};Z.types=F!==null?F.types:null,M.T=Z;try{var ne=I(),ye=M.S;ye!==null&&ye(Z,ne),typeof ne=="object"&&ne!==null&&typeof ne.then=="function"&&ne.then(D,Y)}catch(se){Y(se)}finally{F!==null&&Z.types!==null&&(F.types=Z.types),M.T=F}}function G(I){var F=M.T;if(F!==null){var Z=F.types;Z===null?F.types=[I]:Z.indexOf(I)===-1&&Z.push(I)}else ee(G.bind(null,I))}var ae={map:$,forEach:function(I,F,Z){$(I,function(){F.apply(this,arguments)},Z)},count:function(I){var F=0;return $(I,function(){F++}),F},toArray:function(I){return $(I,function(F){return F})||[]},only:function(I){if(!X(I))throw Error("React.Children.only expected to receive a single React element child.");return I}};return Mt.Activity=h,Mt.Children=ae,Mt.Component=O,Mt.Fragment=s,Mt.Profiler=o,Mt.PureComponent=A,Mt.StrictMode=i,Mt.Suspense=f,Mt.ViewTransition=x,Mt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,Mt.__COMPILER_RUNTIME={__proto__:null,c:function(I){return M.H.useMemoCache(I)}},Mt.addTransitionType=G,Mt.cache=function(I){return function(){return I.apply(null,arguments)}},Mt.cacheSignal=function(){return null},Mt.cloneElement=function(I,F,Z){if(I==null)throw Error("The argument must be a React element, but you passed "+I+".");var ne=E({},I.props),ye=I.key;if(F!=null)for(se in F.key!==void 0&&(ye=""+F.key),F)!z.call(F,se)||se==="key"||se==="__self"||se==="__source"||se==="ref"&&F.ref===void 0||(ne[se]=F[se]);var se=arguments.length-2;if(se===1)ne.children=Z;else if(1<se){for(var ge=Array(se),fe=0;fe<se;fe++)ge[fe]=arguments[fe+2];ne.children=ge}return L(I.type,ye,ne)},Mt.createContext=function(I){return I={$$typeof:u,_currentValue:I,_currentValue2:I,_threadCount:0,Provider:null,Consumer:null},I.Provider=I,I.Consumer={$$typeof:l,_context:I},I},Mt.createElement=function(I,F,Z){var ne,ye={},se=null;if(F!=null)for(ne in F.key!==void 0&&(se=""+F.key),F)z.call(F,ne)&&ne!=="key"&&ne!=="__self"&&ne!=="__source"&&(ye[ne]=F[ne]);var ge=arguments.length-2;if(ge===1)ye.children=Z;else if(1<ge){for(var fe=Array(ge),ce=0;ce<ge;ce++)fe[ce]=arguments[ce+2];ye.children=fe}if(I&&I.defaultProps)for(ne in ge=I.defaultProps,ge)ye[ne]===void 0&&(ye[ne]=ge[ne]);return L(I,se,ye)},Mt.createRef=function(){return{current:null}},Mt.forwardRef=function(I){return{$$typeof:d,render:I}},Mt.isValidElement=X,Mt.lazy=function(I){return{$$typeof:m,_payload:{_status:-1,_result:I},_init:q}},Mt.memo=function(I,F){return{$$typeof:g,type:I,compare:F===void 0?null:F}},Mt.startTransition=ee,Mt.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},Mt.use=function(I){return M.H.use(I)},Mt.useActionState=function(I,F,Z){return M.H.useActionState(I,F,Z)},Mt.useCallback=function(I,F){return M.H.useCallback(I,F)},Mt.useContext=function(I){return M.H.useContext(I)},Mt.useDebugValue=function(){},Mt.useDeferredValue=function(I,F){return M.H.useDeferredValue(I,F)},Mt.useEffect=function(I,F){return M.H.useEffect(I,F)},Mt.useEffectEvent=function(I){return M.H.useEffectEvent(I)},Mt.useId=function(){return M.H.useId()},Mt.useImperativeHandle=function(I,F,Z){return M.H.useImperativeHandle(I,F,Z)},Mt.useInsertionEffect=function(I,F){return M.H.useInsertionEffect(I,F)},Mt.useLayoutEffect=function(I,F){return M.H.useLayoutEffect(I,F)},Mt.useMemo=function(I,F){return M.H.useMemo(I,F)},Mt.useOptimistic=function(I,F){return M.H.useOptimistic(I,F)},Mt.useReducer=function(I,F,Z){return M.H.useReducer(I,F,Z)},Mt.useRef=function(I){return M.H.useRef(I)},Mt.useState=function(I){return M.H.useState(I)},Mt.useSyncExternalStore=function(I,F,Z){return M.H.useSyncExternalStore(I,F,Z)},Mt.useTransition=function(){return M.H.useTransition()},Mt.version="19.3.1",Mt}var yw;function Zu(){return yw||(yw=1,Q0.exports=Pj()),Q0.exports}var b=Zu();const Ne=nC(b),rC=Dj({__proto__:null,default:Ne},[b]);var X0={exports:{}},pu={},Z0={exports:{}},W0={};var vw;function Lj(){return vw||(vw=1,(function(e){function t(_,Q){var $=_.length;_.push(Q);e:for(;0<$;){var q=$-1>>>1,Y=_[q];if(0<o(Y,Q))_[q]=Q,_[$]=Y,$=q;else break e}}function s(_){return _.length===0?null:_[0]}function i(_){if(_.length===0)return null;var Q=_[0],$=_.pop();if($!==Q){_[0]=$;e:for(var q=0,Y=_.length,ee=Y>>>1;q<ee;){var G=2*(q+1)-1,ae=_[G],I=G+1,F=_[I];if(0>o(ae,$))I<Y&&0>o(F,ae)?(_[q]=F,_[I]=$,q=I):(_[q]=ae,_[G]=$,q=G);else if(I<Y&&0>o(F,$))_[q]=F,_[I]=$,q=I;else break e}}return Q}function o(_,Q){var $=_.sortIndex-Q.sortIndex;return $!==0?$:_.id-Q.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var u=Date,d=u.now();e.unstable_now=function(){return u.now()-d}}var f=[],g=[],m=1,h=null,x=3,S=!1,w=!1,C=!1,E=!1,R=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function A(_){for(var Q=s(g);Q!==null;){if(Q.callback===null)i(g);else if(Q.startTime<=_)i(g),Q.sortIndex=Q.expirationTime,t(f,Q);else break;Q=s(g)}}function N(_){if(C=!1,A(_),!w)if(s(f)!==null)w=!0,j||(j=!0,X());else{var Q=s(g);Q!==null&&U(N,Q.startTime-_)}}var j=!1,D=-1,M=5,z=-1;function L(){return E?!0:!(e.unstable_now()-z<M)}function K(){if(E=!1,j){var _=e.unstable_now();z=_;var Q=!0;try{e:{w=!1,C&&(C=!1,O(D),D=-1),S=!0;var $=x;try{t:{for(A(_),h=s(f);h!==null&&!(h.expirationTime>_&&L());){var q=h.callback;if(typeof q=="function"){h.callback=null,x=h.priorityLevel;var Y=q(h.expirationTime<=_);if(_=e.unstable_now(),typeof Y=="function"){h.callback=Y,A(_),Q=!0;break t}h===s(f)&&i(f),A(_)}else i(f);h=s(f)}if(h!==null)Q=!0;else{var ee=s(g);ee!==null&&U(N,ee.startTime-_),Q=!1}}break e}finally{h=null,x=$,S=!1}Q=void 0}}finally{Q?X():j=!1}}}var X;if(typeof T=="function")X=function(){T(K)};else if(typeof MessageChannel<"u"){var B=new MessageChannel,H=B.port2;B.port1.onmessage=K,X=function(){H.postMessage(null)}}else X=function(){R(K,0)};function U(_,Q){D=R(function(){_(e.unstable_now())},Q)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(_){_.callback=null},e.unstable_forceFrameRate=function(_){0>_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<_?Math.floor(1e3/_):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_next=function(_){switch(x){case 1:case 2:case 3:var Q=3;break;default:Q=x}var $=x;x=Q;try{return _()}finally{x=$}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(_,Q){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var $=x;x=_;try{return Q()}finally{x=$}},e.unstable_scheduleCallback=function(_,Q,$){var q=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?q+$:q):$=q,_){case 1:var Y=-1;break;case 2:Y=250;break;case 5:Y=1073741823;break;case 4:Y=1e4;break;default:Y=5e3}return Y=$+Y,_={id:m++,callback:Q,priorityLevel:_,startTime:$,expirationTime:Y,sortIndex:-1},$>q?(_.sortIndex=$,t(g,_),s(f)===null&&_===s(g)&&(C?(O(D),D=-1):C=!0,U(N,$-q))):(_.sortIndex=Y,t(f,_),w||S||(w=!0,j||(j=!0,X()))),_},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(_){var Q=x;return function(){var $=x;x=Q;try{return _.apply(this,arguments)}finally{x=$}}}})(W0)),W0}var bw;function zj(){return bw||(bw=1,Z0.exports=Lj()),Z0.exports}var J0={exports:{}},Er={};var xw;function _j(){if(xw)return Er;xw=1;var e=Zu();function t(m){var h="https://react.dev/errors/"+m;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)h+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+m+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var i={d:{f:s,r:function(){throw Error(t(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},o=Symbol.for("react.portal"),l=Symbol.for("react.recoverable"),u=Symbol.for("react.optimistic_key");function d(m,h,x){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:S==null?null:S===u?u:""+S,children:m,containerInfo:h,implementation:x}}var f=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function g(m,h){if(m==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Er.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,Er.browser=function(m){return{$$typeof:l,_reason:m}},Er.createPortal=function(m,h){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return d(m,h,null,x)},Er.flushSync=function(m){var h=f.T,x=i.p;try{if(f.T=null,i.p=2,m)return m()}finally{f.T=h,i.p=x,i.d.f()}},Er.preconnect=function(m,h){typeof m=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,i.d.C(m,h))},Er.prefetchDNS=function(m){typeof m=="string"&&i.d.D(m)},Er.preinit=function(m,h){if(typeof m=="string"&&h&&typeof h.as=="string"){var x=h.as,S=g(x,h.crossOrigin),w=typeof h.integrity=="string"?h.integrity:void 0,C=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;x==="style"?i.d.S(m,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:S,integrity:w,fetchPriority:C}):x==="script"&&i.d.X(m,{crossOrigin:S,integrity:w,fetchPriority:C,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Er.preinitModule=function(m,h){if(typeof m=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var x=g(h.as,h.crossOrigin);i.d.M(m,{crossOrigin:x,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0})}}else h==null&&i.d.M(m)},Er.preload=function(m,h){if(typeof m=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var x=h.as,S=g(x,h.crossOrigin);i.d.L(m,x,{crossOrigin:S,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Er.preloadModule=function(m,h){if(typeof m=="string")if(h){var x=g(h.as,h.crossOrigin);i.d.m(m,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:x,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0})}else i.d.m(m)},Er.requestFormReset=function(m){i.d.r(m)},Er.unstable_batchedUpdates=function(m,h){return m(h)},Er.useFormState=function(m,h,x){return f.H.useFormState(m,h,x)},Er.useFormStatus=function(){return f.H.useHostTransitionStatus()},Er.version="19.3.1",Er}var Sw;function sC(){if(Sw)return J0.exports;Sw=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),J0.exports=_j(),J0.exports}var ww;function Uj(){if(ww)return pu;ww=1;var e=zj(),t=Zu(),s=sC();function i(n){var r="https://react.dev/errors/"+n;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)r+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+n+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function l(n){for(var r=n,a=r;a&&!a.alternate;)r=a,(r.flags&4098)!==0&&(n=r.return),a=r.return;for(;r.return;)r=r.return;return r.tag===3?n:null}function u(n){if(n.tag===13){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function d(n){if(n.tag===31){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function f(n){if(l(n)!==n)throw Error(i(188))}function g(n){var r=n.alternate;if(!r){if(r=l(n),r===null)throw Error(i(188));return r!==n?null:n}for(var a=n,c=r;;){var p=a.return;if(p===null)break;var y=p.alternate;if(y===null){if(c=p.return,c!==null){a=c;continue}break}if(p.child===y.child){for(y=p.child;y;){if(y===a)return f(p),n;if(y===c)return f(p),r;y=y.sibling}throw Error(i(188))}if(a.return!==c.return)a=p,c=y;else{for(var k=!1,P=p.child;P;){if(P===a){k=!0,a=p,c=y;break}if(P===c){k=!0,c=p,a=y;break}P=P.sibling}if(!k){for(P=y.child;P;){if(P===a){k=!0,a=y,c=p;break}if(P===c){k=!0,c=y,a=p;break}P=P.sibling}if(!k)throw Error(i(189))}}if(a.alternate!==c)throw Error(i(190))}if(a.tag!==3)throw Error(i(188));return a.stateNode.current===a?n:r}function m(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n;for(n=n.child;n!==null;){if(r=m(n),r!==null)return r;n=n.sibling}return null}function h(n,r,a,c,p,y){for(;n!==null;){if((n.tag===5||n.tag===27||n.tag===6)&&a(n,c,p,y)||(n.tag!==22||n.memoizedState===null)&&(r||n.tag!==5&&n.tag!==27)&&h(n.child,r,a,c,p,y))return!0;n=n.sibling}return!1}function x(n){for(n=n.return;n!==null;){if(n.tag===3||n.tag===5||n.tag===27)return n;n=n.return}return null}function S(n){var r=!1;for(n=n.return;n!==null&&(n.tag===4&&(r=!0),!(n.tag===3||n.tag===5||n.tag===27));)n=n.return;return r}function w(n){var r=[null,null],a=x(n);return a===null||C(r,n,a.child,{foundSelf:!1}),r}function C(n,r,a,c){for(;a!==null;){if(a===r)c.foundSelf=!0;else if(a.tag===5||a.tag===27||a.tag===6){if(c.foundSelf)return n[1]=a,!0;n[0]=a}else if((a.tag!==22||a.memoizedState===null)&&C(n,r,a.child,c))return!0;a=a.sibling}return!1}function E(n){switch(n.tag){case 5:case 27:case 6:return n.stateNode;case 3:return n.stateNode.containerInfo;default:throw Error(i(559))}}var R=null,O=null;function T(n,r,a){return n===a?!0:n===r?(R=n,!0):!1}function A(n,r,a){return n===a?(O=n,!1):n===r?(O!==null&&(R=n),!0):!1}function N(n){if(n===null)return null;do n=n===null?null:n.return;while(n&&n.tag!==5&&n.tag!==27&&n.tag!==3);return n||null}function j(n,r,a){for(var c=0,p=n;p;p=a(p))c++;p=0;for(var y=r;y;y=a(y))p++;for(;0<c-p;)n=a(n),c--;for(;0<p-c;)r=a(r),p--;for(;c--;){if(n===r||r!==null&&n===r.alternate)return n;n=a(n),r=a(r)}return null}var D=Object.assign,M=Symbol.for("react.element"),z=Symbol.for("react.transitional.element"),L=Symbol.for("react.portal"),K=Symbol.for("react.fragment"),X=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),H=Symbol.for("react.consumer"),U=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),Q=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),q=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),ee=Symbol.for("react.activity"),G=Symbol.for("react.legacy_hidden"),ae=Symbol.for("react.memo_cache_sentinel"),I=Symbol.for("react.view_transition"),F=Symbol.for("react.recoverable"),Z=Symbol.iterator;function ne(n){return n===null||typeof n!="object"?null:(n=Z&&n[Z]||n["@@iterator"],typeof n=="function"?n:null)}var ye=Symbol.for("react.client.reference");function se(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===ye?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case K:return"Fragment";case B:return"Profiler";case X:return"StrictMode";case Q:return"Suspense";case $:return"SuspenseList";case ee:return"Activity";case I:return"ViewTransition"}if(typeof n=="object")switch(n.$$typeof){case L:return"Portal";case U:return n.displayName||"Context";case H:return(n._context.displayName||"Context")+".Consumer";case _:var r=n.render;return n=n.displayName,n||(n=r.displayName||r.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case q:return r=n.displayName||null,r!==null?r:se(n.type)||"Memo";case Y:r=n._payload,n=n._init;try{return se(n(r))}catch{}}return null}var ge=Array.isArray,fe=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Re={pending:!1,data:null,method:null,action:null},be=[],Le=-1;function Oe(n){return{current:n}}function ze(n){0>Le||(n.current=be[Le],be[Le]=null,Le--)}function Ve(n,r){Le++,be[Le]=n.current,n.current=r}var ke=Oe(null),Ue=Oe(null),xe=Oe(null),Fe=Oe(null);function Ze(n,r){switch(Ve(xe,r),Ve(Ue,n),Ve(ke,null),r.nodeType){case 9:case 11:n=(n=r.documentElement)&&(n=n.namespaceURI)?ES(n):0;break;default:if(n=r.tagName,r=r.namespaceURI)r=ES(r),n=RS(r,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}ze(ke),Ve(ke,n)}function ot(){ze(ke),ze(Ue),ze(xe)}function de(n){var r=n.memoizedState;r!==null&&(Dl._currentValue=r.memoizedState,Ve(Fe,n)),r=ke.current;var a=RS(r,n.type);r!==a&&(Ve(Ue,n),Ve(ke,a))}function Ee(n){Ue.current===n&&(ze(ke),ze(Ue)),Fe.current===n&&(ze(Fe),Dl._currentValue=Re)}var Ge,Me;function De(n){if(Ge===void 0)try{throw Error()}catch(a){var r=a.stack.trim().match(/\n( *(at )?)/);Ge=r&&r[1]||"",Me=-1<a.stack.indexOf(`
3
+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
4
+ `+Ge+n+Me}var xt=!1;function dt(n,r){if(!n||xt)return"";xt=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(r){var Te=function(){throw Error()};if(Object.defineProperty(Te.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Te,[])}catch(Ye){var ie=Ye}Reflect.construct(n,[],Te)}else{try{Te.call()}catch(Ye){ie=Ye}Te=!1;try{var he=Object.getOwnPropertyDescriptor(n.prototype,"props");Object.defineProperty(n.prototype,"props",{configurable:!0,set:function(){throw Error()}}),Te=!0,new n}finally{Te&&(he!==void 0?Object.defineProperty(n.prototype,"props",he):delete n.prototype.props)}}}else{try{throw Error()}catch(Ye){ie=Ye}(Te=n())&&typeof Te.catch=="function"&&Te.catch(function(){})}}catch(Ye){if(Ye&&ie&&typeof Ye.stack=="string")return[Ye.stack,ie.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var y=c.DetermineComponentFrameRoot(),k=y[0],P=y[1];if(k&&P){var W=k.split(`
5
+ `),le=P.split(`
6
+ `);for(p=c=0;c<W.length&&!W[c].includes("DetermineComponentFrameRoot");)c++;for(;p<le.length&&!le[p].includes("DetermineComponentFrameRoot");)p++;if(c===W.length||p===le.length)for(c=W.length-1,p=le.length-1;1<=c&&0<=p&&W[c]!==le[p];)p--;for(;1<=c&&0<=p;c--,p--)if(W[c]!==le[p]){if(c!==1||p!==1)do if(c--,p--,0>p||W[c]!==le[p]){var me=`
7
+ `+W[c].replace(" at new "," at ");return n.displayName&&me.includes("<anonymous>")&&(me=me.replace("<anonymous>",n.displayName)),me}while(1<=c&&0<=p);break}}}finally{xt=!1,Error.prepareStackTrace=a}return(a=n?n.displayName||n.name:"")?De(a):""}function gt(n,r){switch(n.tag){case 26:case 27:case 5:return De(n.type);case 16:return De("Lazy");case 13:return n.child!==r&&r!==null?De("Suspense Fallback"):De("Suspense");case 19:return De("SuspenseList");case 0:case 15:return dt(n.type,!1);case 11:return dt(n.type.render,!1);case 1:return dt(n.type,!0);case 31:return De("Activity");case 30:return De("ViewTransition");default:return""}}function Nt(n){try{var r="",a=null;do r+=gt(n,a),a=n,n=n.return;while(n);return r}catch(c){return`
8
+ Error generating stack: `+c.message+`
9
+ `+c.stack}}var jt=Object.prototype.hasOwnProperty,tn=e.unstable_scheduleCallback,an=e.unstable_cancelCallback,nn=e.unstable_shouldYield,et=e.unstable_requestPaint,Et=e.unstable_now,Zt=e.unstable_getCurrentPriorityLevel,ht=e.unstable_ImmediatePriority,St=e.unstable_UserBlockingPriority,yt=e.unstable_NormalPriority,Ut=e.unstable_LowPriority,dn=e.unstable_IdlePriority,je=e.log,at=e.unstable_setDisableYieldValue,Ie=null,_e=null;function $e(n){if(typeof je=="function"&&at(n),_e&&typeof _e.setStrictMode=="function")try{_e.setStrictMode(Ie,n)}catch{}}var tt=Math.clz32?Math.clz32:J,kt=Math.log,V=Math.LN2;function J(n){return n>>>=0,n===0?32:31-(kt(n)/V|0)|0}var re=256,ve=262144,Se=4194304;function qe(n){var r=n&42;if(r!==0)return r;switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&-n;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function Ke(n,r,a){var c=n.pendingLanes;if(c===0)return 0;var p=0,y=n.suspendedLanes,k=n.pingedLanes;n=n.warmLanes;var P=c&134217727;return P!==0?(c=P&~y,c!==0?p=qe(c):(k&=P,k!==0?p=qe(k):a||(a=P&~n,a!==0&&(p=qe(a))))):(P=c&~y,P!==0?p=qe(P):k!==0?p=qe(k):a||(a=c&~n,a!==0&&(p=qe(a)))),p===0?0:r!==0&&r!==p&&(r&y)===0&&(y=p&-p,a=r&-r,y>=a||y===32&&(a&4194048)!==0)?r:p}function Xe(n,r){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&r)===0}function Qe(n,r){(r&8)!==0&&(r|=r&32);var a=n.entangledLanes;if(a!==0)for(n=n.entanglements,a&=r;0<a;){var c=31-tt(a),p=1<<c;r|=n[c],a&=~p}return r}function ct(n,r){switch(n){case 1:case 2:case 4:case 8:case 64:return r+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function nt(){var n=Se;return Se<<=1,(Se&62914560)===0&&(Se=4194304),n}function Rt(n){for(var r=[],a=0;31>a;a++)r.push(n);return r}function ft(n,r){n.pendingLanes|=r,r!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function Yt(n,r,a,c,p,y){var k=n.pendingLanes;n.pendingLanes=a,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=a,n.entangledLanes&=a,n.errorRecoveryDisabledLanes&=a,n.shellSuspendCounter=0;var P=n.entanglements,W=n.expirationTimes,le=n.hiddenUpdates;for(a=k&~a;0<a;){var me=31-tt(a),Te=1<<me;P[me]=0,W[me]=-1;var ie=le[me];if(ie!==null)for(le[me]=null,me=0;me<ie.length;me++){var he=ie[me];he!==null&&(he.lane&=-536870913)}a&=~Te}c!==0&&Bt(n,c,0),y!==0&&p===0&&n.tag!==0&&(n.suspendedLanes|=y&~(k&~r))}function Bt(n,r,a){n.pendingLanes|=r,n.suspendedLanes&=~r;var c=31-tt(r);n.entangledLanes|=r,n.entanglements[c]=n.entanglements[c]|1073741824|a&261930}function On(n,r){var a=n.entangledLanes|=r;for(n=n.entanglements;a;){var c=31-tt(a),p=1<<c;p&r|n[c]&r&&(n[c]|=r),a&=~p}}function Gt(n,r){var a=r&-r;return a=(a&42)!==0?1:Vt(a),(a&(n.suspendedLanes|r))!==0?0:a}function Vt(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function Cn(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function Tn(){var n=ce.p;return n!==0?n:(n=window.event,n===void 0?32:ow(n.type))}function rs(n,r){var a=ce.p;try{return ce.p=n,r()}finally{ce.p=a}}var fn=Math.random().toString(36).slice(2),hn="__reactFiber$"+fn,An="__reactProps$"+fn,jn="__reactContainer$"+fn,Mi="__reactEvents$"+fn,Pr="__reactListeners$"+fn,Us="__reactHandles$"+fn,ss="__reactResources$"+fn,Ss="__reactMarker$"+fn,zt="__reactLoad$"+fn;function qn(n){delete n[hn],delete n[An],delete n[Pr],delete n[Us]}function Fn(n){var r;if(r=n[hn])return r;for(var a=n.parentNode;a;){if(r=a[jn]||a[hn]){if(a=r.alternate,r.child!==null||a!==null&&a.child!==null)for(n=FS(n);n!==null;){if(a=n[hn])return a;n=FS(n)}return r}n=a,a=n.parentNode}return null}function gr(n){if(n=n[hn]||n[jn]){var r=n.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return n}return null}function pe(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n.stateNode;throw Error(i(33))}function Ae(n){var r=n[ss];return r||(r=n[ss]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function we(n){n[Ss]=!0}function rt(n){n[zt]=void 0}var Ot=new Set,Ct={};function Ht(n,r){xn(n,r),xn(n+"Capture",r)}function xn(n,r){for(Ct[n]=r,n=0;n<r.length;n++)Ot.add(r[n])}var pn=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),vt={},Dt={};function on(n){return jt.call(Dt,n)?!0:jt.call(vt,n)?!1:pn.test(n)?Dt[n]=!0:(vt[n]=!0,!1)}var mt=!1;function ir(){var n=mt;return mt=!1,n}function zn(n,r,a){if(on(r))if(a===null)n.removeAttribute(r);else{switch(typeof a){case"undefined":case"function":case"symbol":n.removeAttribute(r);return;case"boolean":var c=r.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){n.removeAttribute(r);return}}n.setAttribute(r,a)}}function is(n,r,a){if(a===null)n.removeAttribute(r);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(r);return}n.setAttribute(r,a)}}function Qn(n,r,a,c){if(c===null)n.removeAttribute(a);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(a);return}n.setAttributeNS(r,a,c)}}function Xn(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Xo(n){var r=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function wc(n,r,a){var c=Object.getOwnPropertyDescriptor(n.constructor.prototype,r);if(!n.hasOwnProperty(r)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var p=c.get,y=c.set;return Object.defineProperty(n,r,{configurable:!0,get:function(){return p.call(this)},set:function(k){a=""+k,y.call(this,k)}}),Object.defineProperty(n,r,{enumerable:c.enumerable}),{getValue:function(){return a},setValue:function(k){a=""+k},stopTracking:function(){n._valueTracker=null,delete n[r]}}}}function Ni(n){if(!n._valueTracker){var r=Xo(n)?"checked":"value";n._valueTracker=wc(n,r,""+n[r])}}function Zo(n){if(!n)return!1;var r=n._valueTracker;if(!r)return!0;var a=r.getValue(),c="";return n&&(c=Xo(n)?n.checked?"true":"false":n.value),n=c,n!==a?(r.setValue(n),!0):!1}var Dd=/[\n"\\]/g;function Dn(n){return n.replace(Dd,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function kr(n,r,a,c,p,y,k,P){n.name="",k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?n.type=k:n.removeAttribute("type"),r!=null?k==="number"?(r===0&&n.value===""||n.value!=r)&&(n.value=""+Xn(r)):n.value!==""+Xn(r)&&(n.value=""+Xn(r)):k!=="submit"&&k!=="reset"||n.removeAttribute("value"),r!=null?k==="number"&&n.value==r?Wo(n,Xn(n.value)):Wo(n,Xn(r)):a!=null?Wo(n,Xn(a)):c!=null&&n.removeAttribute("value"),p==null&&y!=null&&(n.defaultChecked=!!y),p!=null&&(n.checked=p&&typeof p!="function"&&typeof p!="symbol"),P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?n.name=""+Xn(P):n.removeAttribute("name")}function aa(n,r,a,c,p,y,k,P){if(y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(n.type=y),r!=null||a!=null){if(!(y!=="submit"&&y!=="reset"||r!=null)){Ni(n);return}a=a!=null?""+Xn(a):"",r=r!=null?""+Xn(r):a,P||r===n.value||(n.value=r),n.defaultValue=r}c=c??p,c=typeof c!="function"&&typeof c!="symbol"&&!!c,n.checked=P?n.checked:!!c,n.defaultChecked=!!c,k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"&&(n.name=k),Ni(n)}function Wo(n,r){n.defaultValue!==""+r&&(n.defaultValue=""+r)}function Yr(n,r,a,c){if(n=n.options,r){r={};for(var p=0;p<a.length;p++)r["$"+a[p]]=!0;for(a=0;a<n.length;a++)p=r.hasOwnProperty("$"+n[a].value),n[a].selected!==p&&(n[a].selected=p),p&&c&&(n[a].defaultSelected=!0)}else{for(a=""+Xn(a),r=null,p=0;p<n.length;p++){if(n[p].value===a){n[p].selected=!0,c&&(n[p].defaultSelected=!0);return}r!==null||n[p].disabled||(r=n[p])}r!==null&&(r.selected=!0)}}function Jo(n,r,a){if(r!=null&&(r=""+Xn(r),r!==n.value&&(n.value=r),a==null)){n.defaultValue!==r&&(n.defaultValue=r);return}n.defaultValue=a!=null?""+Xn(a):""}function as(n,r,a,c){if(r==null){if(c!=null){if(a!=null)throw Error(i(92));if(ge(c)){if(1<c.length)throw Error(i(93));c=c[0]}a=c}a==null&&(a=""),r=a}a=Xn(r),n.defaultValue=a,c=n.textContent,c===a&&c!==""&&c!==null&&(n.value=c),Ni(n)}function Lr(n,r){if(r){var a=n.firstChild;if(a&&a===n.lastChild&&a.nodeType===3){a.nodeValue=r;return}}n.textContent=r}var oa=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Ec(n,r,a){var c=r.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?c?n.setProperty(r,""):r==="float"?n.cssFloat="":n[r]="":c?n.setProperty(r,a):typeof a!="number"||a===0||oa.has(r)?r==="float"?n.cssFloat=a:n[r]=(""+a).trim():n[r]=a+"px"}function os(n,r,a){if(r!=null&&typeof r!="object")throw Error(i(62));if(n=n.style,a!=null){for(var c in a)!a.hasOwnProperty(c)||r!=null&&r.hasOwnProperty(c)||(c.indexOf("--")===0?n.setProperty(c,""):c==="float"?n.cssFloat="":n[c]="",mt=!0);for(var p in r)c=r[p],r.hasOwnProperty(p)&&a[p]!==c&&(Ec(n,p,c),mt=!0)}else for(var y in r)r.hasOwnProperty(y)&&Ec(n,y,r[y])}function eo(n){if(n.indexOf("-")===-1)return!1;switch(n){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 Rc=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["maskType","mask-type"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Cc=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function mr(n){return Cc.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function zr(){}var to=null;function no(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var rn=null,lr=null;function ws(n){var r=gr(n);if(r&&(n=r.stateNode)){var a=n[An]||null;e:switch(n=r.stateNode,r.type){case"input":if(kr(n,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),r=a.name,a.type==="radio"&&r!=null){for(a=n;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Dn(""+r)+'"][type="radio"]'),r=0;r<a.length;r++){var c=a[r];if(c!==n&&c.form===n.form){var p=c[An]||null;if(!p)throw Error(i(90));kr(c,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(r=0;r<a.length;r++)c=a[r],c.form===n.form&&Zo(c)}break e;case"textarea":Jo(n,a.value,a.defaultValue);break e;case"select":r=a.value,r!=null&&Yr(n,!!a.multiple,r,!1)}}}var ls=!1;function ro(n,r,a){if(ls)return n(r,a);ls=!0;try{var c=n(r);return c}finally{if(ls=!1,(rn!==null||lr!==null)&&(jf(),rn&&(r=rn,n=lr,lr=rn=null,ws(r),n)))for(r=0;r<n.length;r++)ws(n[r])}}function Di(n,r){var a=n.stateNode;if(a===null)return null;var c=a[An]||null;if(c===null)return null;a=c[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(n=n.type,c=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!c;break e;default:n=!1}if(n)return null;if(a&&typeof a!="function")throw Error(i(231,r,typeof a));return a}var yr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),so=!1;if(yr)try{var Tc={};Object.defineProperty(Tc,"passive",{get:function(){so=!0}}),window.addEventListener("test",Tc,Tc),window.removeEventListener("test",Tc,Tc)}catch{so=!1}var la=null,Dg=null,jd=null;function bx(){if(jd)return jd;var n,r=Dg,a=r.length,c,p="value"in la?la.value:la.textContent,y=p.length;for(n=0;n<a&&r[n]===p[n];n++);var k=a-n;for(c=1;c<=k&&r[a-c]===p[y-c];c++);return jd=p.slice(n,1<c?1-c:void 0)}function Id(n){var r=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&r===13&&(n=13)):n=r,n===10&&(n=13),32<=n||n===13?n:0}function Pd(){return!0}function xx(){return!1}function _r(n){function r(a,c,p,y,k){this._reactName=a,this._targetInst=p,this.type=c,this.nativeEvent=y,this.target=k,this.currentTarget=null;for(var P in n)n.hasOwnProperty(P)&&(a=n[P],this[P]=a?a(y):y[P]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?Pd:xx,this.isPropagationStopped=xx,this}return D(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Pd)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Pd)},persist:function(){},isPersistent:Pd}),r}var ca={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ld=_r(ca),kc=D({},ca,{view:0,detail:0}),rN=_r(kc),jg,Ig,Oc,zd=D({},kc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Lg,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==Oc&&(Oc&&n.type==="mousemove"?(jg=n.screenX-Oc.screenX,Ig=n.screenY-Oc.screenY):Ig=jg=0,Oc=n),jg)},movementY:function(n){return"movementY"in n?n.movementY:Ig}}),Sx=_r(zd),sN=D({},zd,{dataTransfer:0}),iN=_r(sN),aN=D({},kc,{relatedTarget:0}),Pg=_r(aN),oN=D({},ca,{animationName:0,elapsedTime:0,pseudoElement:0}),lN=_r(oN),cN=D({},ca,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),uN=_r(cN),dN=D({},ca,{data:0}),wx=_r(dN),fN={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},hN={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"},pN={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function gN(n){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(n):(n=pN[n])?!!r[n]:!1}function Lg(){return gN}var mN=D({},kc,{key:function(n){if(n.key){var r=fN[n.key]||n.key;if(r!=="Unidentified")return r}return n.type==="keypress"?(n=Id(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?hN[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Lg,charCode:function(n){return n.type==="keypress"?Id(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Id(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),yN=_r(mN),vN=D({},zd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ex=_r(vN),bN=D({},ca,{submitter:0}),xN=_r(bN),SN=D({},kc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Lg}),wN=_r(SN),EN=D({},ca,{propertyName:0,elapsedTime:0,pseudoElement:0}),RN=_r(EN),CN=D({},zd,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),TN=_r(CN),kN=D({},ca,{newState:0,oldState:0,source:0}),ON=_r(kN),AN=[9,13,27,32],zg=yr&&"CompositionEvent"in window,Ac=null;yr&&"documentMode"in document&&(Ac=document.documentMode);var MN=yr&&"TextEvent"in window&&!Ac,Rx=yr&&(!zg||Ac&&8<Ac&&11>=Ac),Cx=" ",Tx=!1;function kx(n,r){switch(n){case"keyup":return AN.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ox(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var el=!1;function NN(n,r){switch(n){case"compositionend":return Ox(r);case"keypress":return r.which!==32?null:(Tx=!0,Cx);case"textInput":return n=r.data,n===Cx&&Tx?null:n;default:return null}}function DN(n,r){if(el)return n==="compositionend"||!zg&&kx(n,r)?(n=bx(),jd=Dg=la=null,el=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return Rx&&r.locale!=="ko"?null:r.data;default:return null}}var jN={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 Ax(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r==="input"?!!jN[n.type]:r==="textarea"}function Mx(n,r,a,c){rn?lr?lr.push(c):lr=[c]:rn=c,r=Uf(r,"onChange"),0<r.length&&(a=new Ld("onChange","change",null,a,c),n.push({event:a,listeners:r}))}var Mc=null,Nc=null;function IN(n){yS(n,0)}function _d(n){var r=pe(n);if(Zo(r))return n}function Nx(n,r){if(n==="change")return r}var Dx=!1;if(yr){var _g;if(yr){var Ug="oninput"in document;if(!Ug){var jx=document.createElement("div");jx.setAttribute("oninput","return;"),Ug=typeof jx.oninput=="function"}_g=Ug}else _g=!1;Dx=_g&&(!document.documentMode||9<document.documentMode)}function Ix(){Mc&&(Mc.detachEvent("onpropertychange",Px),Nc=Mc=null)}function Px(n){if(n.propertyName==="value"&&_d(Nc)){var r=[];Mx(r,Nc,n,no(n)),ro(IN,r)}}function PN(n,r,a){n==="focusin"?(Ix(),Mc=r,Nc=a,Mc.attachEvent("onpropertychange",Px)):n==="focusout"&&Ix()}function LN(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return _d(Nc)}function zN(n,r){if(n==="click")return _d(r)}function _N(n,r){if(n==="input"||n==="change")return _d(r)}function UN(n,r){return n===r&&(n!==0||1/n===1/r)||n!==n&&r!==r}var cs=typeof Object.is=="function"?Object.is:UN;function Dc(n,r){if(cs(n,r))return!0;if(typeof n!="object"||n===null||typeof r!="object"||r===null)return!1;var a=Object.keys(n),c=Object.keys(r);if(a.length!==c.length)return!1;for(c=0;c<a.length;c++){var p=a[c];if(!jt.call(r,p)||!cs(n[p],r[p]))return!1}return!0}function Hg(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}function Lx(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function zx(n,r){var a=Lx(n);n=0;for(var c;a;){if(a.nodeType===3){if(c=n+a.textContent.length,n<=r&&c>=r)return{node:a,offset:r-n};n=c}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Lx(a)}}function _x(n,r){return n&&r?n===r?!0:n&&n.nodeType===3?!1:r&&r.nodeType===3?_x(n,r.parentNode):"contains"in n?n.contains(r):n.compareDocumentPosition?!!(n.compareDocumentPosition(r)&16):!1:!1}function Ux(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var r=Hg(n.document);r instanceof n.HTMLIFrameElement;){try{var a=typeof r.contentWindow.location.href=="string"}catch{a=!1}if(a)n=r.contentWindow;else break;r=Hg(n.document)}return r}function Fg(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r&&(r==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||r==="textarea"||n.contentEditable==="true")}var HN=yr&&"documentMode"in document&&11>=document.documentMode,tl=null,Bg=null,jc=null,Vg=!1;function Hx(n,r,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Vg||tl==null||tl!==Hg(c)||(c=tl,"selectionStart"in c&&Fg(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),jc&&Dc(jc,c)||(jc=c,c=Uf(Bg,"onSelect"),0<c.length&&(r=new Ld("onSelect","select",null,r,a),n.push({event:r,listeners:c}),r.target=tl)))}function io(n,r){var a={};return a[n.toLowerCase()]=r.toLowerCase(),a["Webkit"+n]="webkit"+r,a["Moz"+n]="moz"+r,a}var nl={animationend:io("Animation","AnimationEnd"),animationiteration:io("Animation","AnimationIteration"),animationstart:io("Animation","AnimationStart"),transitionrun:io("Transition","TransitionRun"),transitionstart:io("Transition","TransitionStart"),transitioncancel:io("Transition","TransitionCancel"),transitionend:io("Transition","TransitionEnd")},Kg={},Fx={};yr&&(Fx=document.createElement("div").style,"AnimationEvent"in window||(delete nl.animationend.animation,delete nl.animationiteration.animation,delete nl.animationstart.animation),"TransitionEvent"in window||delete nl.transitionend.transition);function ao(n){if(Kg[n])return Kg[n];if(!nl[n])return n;var r=nl[n],a;for(a in r)if(r.hasOwnProperty(a)&&a in Fx)return Kg[n]=r[a];return n}var Bx=ao("animationend"),Vx=ao("animationiteration"),Kx=ao("animationstart"),FN=ao("transitionrun"),BN=ao("transitionstart"),VN=ao("transitioncancel"),qx=ao("transitionend"),Yx=new Map,qg="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");qg.push("scrollEnd");function Hs(n,r){Yx.set(n,r),Ht(r,[n])}var KN=0;function ji(n,r){if(n.name!=null&&n.name!=="auto")return n.name;if(r.autoName!==null)return r.autoName;n=Ks.identifierPrefix;var a=KN++;return n="_"+n+"t_"+a.toString(32)+"_",r.autoName=n}function Gx(n){if(n==null||typeof n=="string")return n;var r=null,a=wl;if(a!==null)for(var c=0;c<a.length;c++){var p=n[a[c]];if(p!=null){if(p==="none")return"none";r=r==null?p:r+(" "+p)}}return r??n.default}function Ii(n,r){return n=Gx(n),r=Gx(r),r==null?n==="auto"?null:n:r==="auto"?null:r}var Ud=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},Es=[],rl=0,Yg=0;function Hd(){for(var n=rl,r=Yg=rl=0;r<n;){var a=Es[r];Es[r++]=null;var c=Es[r];Es[r++]=null;var p=Es[r];Es[r++]=null;var y=Es[r];if(Es[r++]=null,c!==null&&p!==null){var k=c.pending;k===null?p.next=p:(p.next=k.next,k.next=p),c.pending=p}y!==0&&$x(a,p,y)}}function Fd(n,r,a,c){Es[rl++]=n,Es[rl++]=r,Es[rl++]=a,Es[rl++]=c,Yg|=c,n.lanes|=c,n=n.alternate,n!==null&&(n.lanes|=c)}function Gg(n,r,a,c){return Fd(n,r,a,c),Bd(n)}function oo(n,r){return Fd(n,null,null,r),Bd(n)}function $x(n,r,a){n.lanes|=a;var c=n.alternate;c!==null&&(c.lanes|=a);for(var p=!1,y=n.return;y!==null;)y.childLanes|=a,c=y.alternate,c!==null&&(c.childLanes|=a),y.tag===22&&(n=y.stateNode,n===null||n._visibility&1||(p=!0)),n=y,y=y.return;return n.tag===3?(y=n.stateNode,p&&r!==null&&(p=31-tt(a),n=y.hiddenUpdates,c=n[p],c===null?n[p]=[r]:c.push(r),r.lane=a|536870912),y):null}function Bd(n){if(50<tu)throw tu=0,Df=null,Error(i(185));for(var r=n.return;r!==null;)n=r,r=n.return;return n.tag===3?n.stateNode:null}var sl={};function qN(n,r,a,c){this.tag=n,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Gr(n,r,a,c){return new qN(n,r,a,c)}function $g(n){return n=n.prototype,!(!n||!n.isReactComponent)}function Pi(n,r){var a=n.alternate;return a===null?(a=Gr(n.tag,r,n.key,n.mode),a.elementType=n.elementType,a.type=n.type,a.stateNode=n.stateNode,a.alternate=n,n.alternate=a):(a.pendingProps=r,a.type=n.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=n.flags&1206910976,a.childLanes=n.childLanes,a.lanes=n.lanes,a.child=n.child,a.memoizedProps=n.memoizedProps,a.memoizedState=n.memoizedState,a.updateQueue=n.updateQueue,r=n.dependencies,a.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},a.sibling=n.sibling,a.index=n.index,a.ref=n.ref,a.refCleanup=n.refCleanup,a}function Qx(n,r){n.flags&=1206910978;var a=n.alternate;return a===null?(n.childLanes=0,n.lanes=r,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=a.childLanes,n.lanes=a.lanes,n.child=a.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=a.memoizedProps,n.memoizedState=a.memoizedState,n.updateQueue=a.updateQueue,n.type=a.type,r=a.dependencies,n.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),n}function Vd(n,r,a,c,p,y){var k=0;if(c=n,typeof c=="function")$g(c)&&(k=1);else if(typeof c=="string")k=bj(n,a,ke.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(c){case ee:return n=Gr(31,a,r,p),n.elementType=ee,n.lanes=y,n;case K:return lo(a.children,p,y,r);case X:k=8,p|=24;break;case B:return n=Gr(12,a,r,p|2),n.elementType=B,n.lanes=y,n;case Q:return n=Gr(13,a,r,p),n.elementType=Q,n.lanes=y,n;case $:return n=Gr(19,a,r,p),n.elementType=$,n.lanes=y,n;case G:case I:return n=p|32,n=Gr(30,a,r,n),n.elementType=I,n.lanes=y,n.stateNode={autoName:null,paired:null,clones:null,ref:null},n;default:if(typeof c=="object"&&c!==null)switch(c.$$typeof){case U:k=10;break e;case H:k=9;break e;case _:k=11;break e;case q:k=14;break e;case Y:k=16,c=null;break e}k=29,a=Error(i(130,n===null?"null":typeof n,"")),c=null}return r=Gr(k,a,r,p),r.elementType=n,r.type=c,r.lanes=y,r}function lo(n,r,a,c){return n=Gr(7,n,c,r),n.lanes=a,n}function Qg(n,r,a){return n=Gr(6,n,null,r),n.lanes=a,n}function Xx(n){var r=Gr(18,null,null,0);return r.stateNode=n,r}function Xg(n,r,a){return r=Gr(4,n.children!==null?n.children:[],n.key,r),r.lanes=a,r.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},r}var Zx=new WeakMap;function Rs(n,r){if(typeof n=="object"&&n!==null){var a=Zx.get(n);return a!==void 0?a:(r={value:n,source:r,stack:Nt(r)},Zx.set(n,r),r)}return{value:n,source:r,stack:Nt(r)}}var il=[],al=0,Kd=null,Ic=0,Cs=[],Ts=0,ua=null,ri=1,si="";function Li(n,r){il[al++]=Ic,il[al++]=Kd,Kd=n,Ic=r}function Wx(n,r,a){Cs[Ts++]=ri,Cs[Ts++]=si,Cs[Ts++]=ua,ua=n;var c=ri;n=si;var p=32-tt(c)-1;c&=~(1<<p),a+=1;var y=32-tt(r)+p;if(30<y){var k=p-p%5;y=(c&(1<<k)-1).toString(32),c>>=k,p-=k,ri=1<<32-tt(r)+p|a<<p|c,si=y+n}else ri=1<<y|a<<p|c,si=n}function qd(n){n.return!==null&&(Li(n,1),Wx(n,1,0))}function Zg(n){for(;n===Kd;)Kd=il[--al],il[al]=null,Ic=il[--al],il[al]=null;for(;n===ua;)ua=Cs[--Ts],Cs[Ts]=null,si=Cs[--Ts],Cs[Ts]=null,ri=Cs[--Ts],Cs[Ts]=null}function Jx(n,r){Cs[Ts++]=ri,Cs[Ts++]=si,Cs[Ts++]=ua,ri=r.id,si=r.overflow,ua=n}var cr=null,Mn=null,Kt=!1,da=null,ks=!1,Wg=Error(i(519));function fa(n){var r=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Pc(Rs(r,n)),Wg}function e2(n){var r=n.stateNode,a=n.type,c=n.memoizedProps;switch(r[hn]=n,r[An]=c,a){case"dialog":Qt("cancel",r),Qt("close",r);break;case"iframe":case"object":case"embed":Qt("load",r);break;case"video":case"audio":for(a=0;a<ru.length;a++)Qt(ru[a],r);break;case"source":Qt("error",r);break;case"img":case"image":case"link":Qt("error",r),Qt("load",r);break;case"details":Qt("toggle",r);break;case"input":Qt("invalid",r),aa(r,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":Qt("invalid",r);break;case"textarea":Qt("invalid",r),as(r,c.value,c.defaultValue,c.children)}a=c.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||r.textContent===""+a||c.suppressHydrationWarning===!0||SS(r.textContent,a)?(c.popover!=null&&(Qt("beforetoggle",r),Qt("toggle",r)),c.onScroll!=null&&Qt("scroll",r),c.onScrollEnd!=null&&Qt("scrollend",r),c.onClick!=null&&(r.onclick=zr),r=!0):r=!1,r||fa(n,!0)}function Yd(n){for(cr=n.return;cr;)switch(cr.tag){case 5:case 31:case 13:ks=!1;return;case 27:case 3:ks=!0;return;default:cr=cr.return}}function ol(n){if(n!==cr)return!1;if(!Kt)return Yd(n),Kt=!0,!1;var r=n.tag,a;if((a=r!==3&&r!==27)&&((a=r===5)&&(a=n.type,a=!(a!=="form"&&a!=="button")||O0(n.type,n.memoizedProps)),a=!a),a&&Mn&&fa(n),Yd(n),r===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(317));Mn=HS(n)}else if(r===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(317));Mn=HS(n)}else r===27?(r=Mn,Oa(n.type)?(n=z0,z0=null,Mn=n):Mn=r):Mn=cr?As(n.stateNode.nextSibling):null;return!0}function co(){Mn=cr=null,Kt=!1}function Jg(){var n=da;return n!==null&&(Xr===null?Xr=n:Xr.push.apply(Xr,n),da=null),n}function Pc(n){da===null?da=[n]:da.push(n)}var em=Oe(null),uo=null,zi=null;function ha(n,r,a){Ve(em,r._currentValue),r._currentValue=a}function _i(n){n._currentValue=em.current,ze(em)}function Gd(n,r,a){for(;n!==null;){var c=n.alternate;if((n.childLanes&r)!==r?(n.childLanes|=r,c!==null&&(c.childLanes|=r)):c!==null&&(c.childLanes&r)!==r&&(c.childLanes|=r),n===a)break;n=n.return}}function tm(n,r,a,c){var p=n.child;for(p!==null&&(p.return=n);p!==null;){var y=p.dependencies;if(y!==null){var k=p.child;y=y.firstContext;e:for(;y!==null;){var P=y;y=p;for(var W=0;W<r.length;W++)if(P.context===r[W]){y.lanes|=a,P=y.alternate,P!==null&&(P.lanes|=a),Gd(y.return,a,n),c||(k=null);break e}y=P.next}}else if(p.tag===18){if(k=p.return,k===null)throw Error(i(341));k.lanes|=a,y=k.alternate,y!==null&&(y.lanes|=a),Gd(k,a,n),k=null}else p.tag===13&&p.memoizedState!==null&&p.memoizedState.dehydrated===null?(p.lanes|=a,k=p.alternate,k!==null&&(k.lanes|=a),Gd(p.return,a,n),k=p.child,k=k!==null?k.sibling:null):k=p.child;if(k!==null)k.return=p;else for(k=p;k!==null;){if(k===n){k=null;break}if(p=k.sibling,p!==null){p.return=k.return,k=p;break}k=k.return}p=k}}function fo(n,r,a,c){n=null;for(var p=r,y=!1;p!==null;){if(!y){if((p.flags&524288)!==0)y=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var k=p.alternate;if(k===null)throw Error(i(387));if(k=k.memoizedProps,k!==null){var P=p.type;cs(p.pendingProps.value,k.value)||(n!==null?n.push(P):n=[P])}}else if(p===Fe.current){if(k=p.alternate,k===null)throw Error(i(387));k.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(n!==null?n.push(Dl):n=[Dl])}p=p.return}return n!==null&&tm(r,n,a,c),r.flags|=262144,n!==null}function $d(n){for(n=n.firstContext;n!==null;){if(!cs(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function ho(n){uo=n,zi=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function vr(n){return t2(uo,n)}function Qd(n,r){return uo===null&&ho(n),t2(n,r)}function t2(n,r){var a=r._currentValue;if(r={context:r,memoizedValue:a,next:null},zi===null){if(n===null)throw Error(i(308));zi=r,n.dependencies={lanes:0,firstContext:r},n.flags|=524288}else zi=zi.next=r;return a}var YN=typeof AbortController<"u"?AbortController:function(){var n=[],r=this.signal={aborted:!1,addEventListener:function(a,c){n.push(c)}};this.abort=function(){r.aborted=!0,n.forEach(function(a){return a()})}},GN=e.unstable_scheduleCallback,$N=e.unstable_NormalPriority,Zn={$$typeof:U,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function nm(){return{controller:new YN,data:new Map,refCount:0}}function Lc(n){n.refCount--,n.refCount===0&&GN($N,function(){n.controller.abort()})}function n2(n,r){if((n.pendingLanes&4194048)!==0){var a=n.transitionTypes;for(a===null&&(a=n.transitionTypes=[]),n=0;n<r.length;n++){var c=r[n];a.indexOf(c)===-1&&a.push(c)}}}var zc=null;function QN(n){var r=n.transitionTypes;return n.transitionTypes=null,r}var _c=null,rm=0,po=0,ll=null;function XN(n,r){if(_c===null){var a=_c=[];rm=0,po=b0(),ll={status:"pending",value:void 0,then:function(c){a.push(c)}}}return rm++,r.then(r2,r2),r}function r2(){if(--rm===0&&(zc=null,_c!==null)){ll!==null&&(ll.status="fulfilled");var n=_c;_c=null,po=0,ll=null;for(var r=0;r<n.length;r++)(0,n[r])()}}function ZN(n,r){var a=[],c={status:"pending",value:null,reason:null,then:function(p){a.push(p)}};return n.then(function(){c.status="fulfilled",c.value=r;for(var p=0;p<a.length;p++)(0,a[p])(r)},function(p){for(c.status="rejected",c.reason=p,p=0;p<a.length;p++)(0,a[p])(void 0)}),c}var s2=fe.S;fe.S=function(n,r){if(X1=Et(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&XN(n,r),zc!==null)for(var a=Tl;a!==null;)n2(a,zc),a=a.next;if(a=n.types,a!==null){for(var c=Tl;c!==null;)n2(c,a),c=c.next;if(po!==0){c=zc,c===null&&(c=zc=[]);for(var p=0;p<a.length;p++){var y=a[p];c.indexOf(y)===-1&&c.push(y)}}}s2!==null&&s2(n,r)};var go=Oe(null);function sm(){var n=go.current;return n!==null?n:kn.pooledCache}function Xd(n,r){r===null?Ve(go,go.current):Ve(go,r.pool)}function i2(){var n=sm();return n===null?null:{parent:Zn._currentValue,pool:n}}var cl=Error(i(460)),im=Error(i(474)),Zd=Error(i(542)),Wd={then:function(){}};function a2(n){return n=n.status,n==="fulfilled"||n==="rejected"}function o2(n,r,a){switch(a=n[a],a===void 0?n.push(r):a!==r&&(r.then(zr,zr),r=a),r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,c2(n),n===void 0&&!("reason"in r)?Error(i(600)):n;default:if(typeof r.status=="string")r.then(zr,zr);else{if(n=kn,n!==null&&100<n.shellSuspendCounter)throw Error(i(482));n=r,n.status="pending",n.then(function(c){if(r.status==="pending"){var p=r;p.status="fulfilled",p.value=c}},function(c){if(r.status==="pending"){var p=r;p.status="rejected",p.reason=c}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,c2(n),n}throw yo=r,cl}}function mo(n){try{var r=n._init;return r(n._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(yo=a,cl):a}}var yo=null;function l2(){if(yo===null)throw Error(i(459));var n=yo;return yo=null,n}function c2(n){if(n===cl||n===Zd)throw Error(i(483))}var ul=null,Uc=0;function Jd(n){var r=Uc;return Uc+=1,ul===null&&(ul=[]),o2(ul,n,r)}function pa(n,r){r=r.props.ref,n.ref=r!==void 0?r:null}function ef(n,r){throw r.$$typeof===M?Error(i(525)):(n=Object.prototype.toString.call(r),Error(i(31,n==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":n)))}function u2(n){function r(oe,te){if(n){var ue=oe.deletions;ue===null?(oe.deletions=[te],oe.flags|=16):ue.push(te)}}function a(oe,te){if(!n)return null;for(;te!==null;)r(oe,te),te=te.sibling;return null}function c(oe){for(var te=new Map;oe!==null;)oe.key===null?te.set(oe.index,oe):te.set(oe.key,oe),oe=oe.sibling;return te}function p(oe,te){return oe=Pi(oe,te),oe.index=0,oe.sibling=null,oe}function y(oe,te,ue){return oe.index=ue,n?(ue=oe.alternate,ue!==null?(ue=ue.index,ue<te?(oe.flags|=2,te):ue):(oe.flags|=134217730,te)):(oe.flags|=1048576,te)}function k(oe){return n&&oe.alternate===null&&(oe.flags|=134217730),oe}function P(oe,te,ue,Ce){return te===null||te.tag!==6?(te=Qg(ue,oe.mode,Ce),te.return=oe,te):(te=p(te,ue),te.return=oe,te)}function W(oe,te,ue,Ce){var Je=ue.type;return Je===K?(oe=me(oe,te,ue.props.children,Ce,ue.key),pa(oe,ue),oe):te!==null&&(te.elementType===Je||typeof Je=="object"&&Je!==null&&Je.$$typeof===Y&&mo(Je)===te.type)?(te=p(te,ue.props),pa(te,ue),te.return=oe,te):(te=Vd(ue.type,ue.key,ue.props,null,oe.mode,Ce),pa(te,ue),te.return=oe,te)}function le(oe,te,ue,Ce){return te===null||te.tag!==4||te.stateNode.containerInfo!==ue.containerInfo||te.stateNode.implementation!==ue.implementation?(te=Xg(ue,oe.mode,Ce),te.return=oe,te):(te=p(te,ue.children||[]),te.return=oe,te)}function me(oe,te,ue,Ce,Je){return te===null||te.tag!==7?(te=lo(ue,oe.mode,Ce,Je),te.return=oe,te):(te=p(te,ue),te.return=oe,te)}function Te(oe,te,ue){if(typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint")return te=Qg(""+te,oe.mode,ue),te.return=oe,te;if(typeof te=="object"&&te!==null){switch(te.$$typeof){case z:return ue=Vd(te.type,te.key,te.props,null,oe.mode,ue),pa(ue,te),ue.return=oe,ue;case L:return te=Xg(te,oe.mode,ue),te.return=oe,te;case Y:return te=mo(te),Te(oe,te,ue)}if(ge(te)||ne(te))return te=lo(te,oe.mode,ue,null),te.return=oe,te;if(typeof te.then=="function")return Te(oe,Jd(te),ue);if(te.$$typeof===U)return Te(oe,Qd(oe,te),ue);ef(oe,te)}return null}function ie(oe,te,ue,Ce){var Je=te!==null?te.key:null;if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return Je!==null?null:P(oe,te,""+ue,Ce);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case z:return ue.key===Je?W(oe,te,ue,Ce):null;case L:return ue.key===Je?le(oe,te,ue,Ce):null;case Y:return ue=mo(ue),ie(oe,te,ue,Ce)}if(ge(ue)||ne(ue))return Je!==null?null:me(oe,te,ue,Ce,null);if(typeof ue.then=="function")return ie(oe,te,Jd(ue),Ce);if(ue.$$typeof===U)return ie(oe,te,Qd(oe,ue),Ce);ef(oe,ue)}return null}function he(oe,te,ue,Ce,Je){if(typeof Ce=="string"&&Ce!==""||typeof Ce=="number"||typeof Ce=="bigint")return oe=oe.get(ue)||null,P(te,oe,""+Ce,Je);if(typeof Ce=="object"&&Ce!==null){switch(Ce.$$typeof){case z:return oe=oe.get(Ce.key===null?ue:Ce.key)||null,W(te,oe,Ce,Je);case L:return oe=oe.get(Ce.key===null?ue:Ce.key)||null,le(te,oe,Ce,Je);case Y:return Ce=mo(Ce),he(oe,te,ue,Ce,Je)}if(ge(Ce)||ne(Ce))return oe=oe.get(ue)||null,me(te,oe,Ce,Je,null);if(typeof Ce.then=="function")return he(oe,te,ue,Jd(Ce),Je);if(Ce.$$typeof===U)return he(oe,te,ue,Qd(te,Ce),Je);ef(te,Ce)}return null}function Ye(oe,te,ue,Ce){for(var Je=null,Jt=null,ut=te,wt=te=0,er=null;ut!==null&&wt<ue.length;wt++){ut.index>wt?(er=ut,ut=null):er=ut.sibling;var sn=ie(oe,ut,ue[wt],Ce);if(sn===null){ut===null&&(ut=er);break}n&&ut&&sn.alternate===null&&r(oe,ut),te=y(sn,te,wt),Jt===null?Je=sn:Jt.sibling=sn,Jt=sn,ut=er}if(wt===ue.length)return a(oe,ut),Kt&&Li(oe,wt),Je;if(ut===null){for(;wt<ue.length;wt++)ut=Te(oe,ue[wt],Ce),ut!==null&&(te=y(ut,te,wt),Jt===null?Je=ut:Jt.sibling=ut,Jt=ut);return Kt&&Li(oe,wt),Je}for(ut=c(ut);wt<ue.length;wt++)er=he(ut,oe,wt,ue[wt],Ce),er!==null&&(n&&(sn=er.alternate,sn!==null&&ut.delete(sn.key===null?wt:sn.key)),te=y(er,te,wt),Jt===null?Je=er:Jt.sibling=er,Jt=er);return n&&ut.forEach(function(ja){return r(oe,ja)}),Kt&&Li(oe,wt),Je}function it(oe,te,ue,Ce){if(ue==null)throw Error(i(151));for(var Je=null,Jt=null,ut=te,wt=te=0,er=null,sn=ue.next();ut!==null&&!sn.done;wt++,sn=ue.next()){ut.index>wt?(er=ut,ut=null):er=ut.sibling;var ja=ie(oe,ut,sn.value,Ce);if(ja===null){ut===null&&(ut=er);break}n&&ut&&ja.alternate===null&&r(oe,ut),te=y(ja,te,wt),Jt===null?Je=ja:Jt.sibling=ja,Jt=ja,ut=er}if(sn.done)return a(oe,ut),Kt&&Li(oe,wt),Je;if(ut===null){for(;!sn.done;wt++,sn=ue.next())sn=Te(oe,sn.value,Ce),sn!==null&&(te=y(sn,te,wt),Jt===null?Je=sn:Jt.sibling=sn,Jt=sn);return Kt&&Li(oe,wt),Je}for(ut=c(ut);!sn.done;wt++,sn=ue.next())sn=he(ut,oe,wt,sn.value,Ce),sn!==null&&(n&&(er=sn.alternate,er!==null&&ut.delete(er.key===null?wt:er.key)),te=y(sn,te,wt),Jt===null?Je=sn:Jt.sibling=sn,Jt=sn);return n&&ut.forEach(function(Nj){return r(oe,Nj)}),Kt&&Li(oe,wt),Je}function Pt(oe,te,ue,Ce){if(typeof ue=="object"&&ue!==null&&ue.type===K&&ue.key===null&&ue.props.ref===void 0&&(ue=ue.props.children),typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case z:e:{for(var Je=ue.key;te!==null;){if(te.key===Je){if(Je=ue.type,Je===K){if(te.tag===7){a(oe,te.sibling),Ce=p(te,ue.props.children),pa(Ce,ue),Ce.return=oe,oe=Ce;break e}}else if(te.elementType===Je||typeof Je=="object"&&Je!==null&&Je.$$typeof===Y&&mo(Je)===te.type){a(oe,te.sibling),Ce=p(te,ue.props),pa(Ce,ue),Ce.return=oe,oe=Ce;break e}a(oe,te);break}else r(oe,te);te=te.sibling}ue.type===K?(Ce=lo(ue.props.children,oe.mode,Ce,ue.key),pa(Ce,ue),Ce.return=oe,oe=Ce):(Ce=Vd(ue.type,ue.key,ue.props,null,oe.mode,Ce),pa(Ce,ue),Ce.return=oe,oe=Ce)}return k(oe);case L:e:{for(Je=ue.key;te!==null;){if(te.key===Je)if(te.tag===4&&te.stateNode.containerInfo===ue.containerInfo&&te.stateNode.implementation===ue.implementation){a(oe,te.sibling),Ce=p(te,ue.children||[]),Ce.return=oe,oe=Ce;break e}else{a(oe,te);break}else r(oe,te);te=te.sibling}Ce=Xg(ue,oe.mode,Ce),Ce.return=oe,oe=Ce}return k(oe);case Y:return ue=mo(ue),Pt(oe,te,ue,Ce)}if(ge(ue))return Ye(oe,te,ue,Ce);if(ne(ue)){if(Je=ne(ue),typeof Je!="function")throw Error(i(150));return ue=Je.call(ue),it(oe,te,ue,Ce)}if(typeof ue.then=="function")return Pt(oe,te,Jd(ue),Ce);if(ue.$$typeof===U)return Pt(oe,te,Qd(oe,ue),Ce);ef(oe,ue)}return typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint"?(ue=""+ue,te!==null&&te.tag===6?(a(oe,te.sibling),Ce=p(te,ue),Ce.return=oe,oe=Ce):(a(oe,te),Ce=Qg(ue,oe.mode,Ce),Ce.return=oe,oe=Ce),k(oe)):a(oe,te)}return function(oe,te,ue,Ce){try{Uc=0;var Je=Pt(oe,te,ue,Ce);return ul=null,Je}catch(ut){if(ut===cl||ut===Zd)throw ut;var Jt=Gr(29,ut,null,oe.mode);return Jt.lanes=Ce,Jt.return=oe,Jt}}}var vo=u2(!0),d2=u2(!1),ga=!1;function am(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function om(n,r){n=n.updateQueue,r.updateQueue===n&&(r.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function ma(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function ya(n,r,a){var c=n.updateQueue;if(c===null)return null;if(c=c.shared,(un&2)!==0){var p=c.pending;return p===null?r.next=r:(r.next=p.next,p.next=r),c.pending=r,r=Bd(n),$x(n,null,a),r}return Fd(n,c,r,a),Bd(n)}function Hc(n,r,a){if(r=r.updateQueue,r!==null&&(r=r.shared,(a&4194048)!==0)){var c=r.lanes;c&=n.pendingLanes,a|=c,r.lanes=a,On(n,a)}}function lm(n,r){var a=n.updateQueue,c=n.alternate;if(c!==null&&(c=c.updateQueue,a===c)){var p=null,y=null;if(a=a.firstBaseUpdate,a!==null){do{var k={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};y===null?p=y=k:y=y.next=k,a=a.next}while(a!==null);y===null?p=y=r:y=y.next=r}else p=y=r;a={baseState:c.baseState,firstBaseUpdate:p,lastBaseUpdate:y,shared:c.shared,callbacks:c.callbacks},n.updateQueue=a;return}n=a.lastBaseUpdate,n===null?a.firstBaseUpdate=r:n.next=r,a.lastBaseUpdate=r}var cm=!1;function Fc(){if(cm){var n=ll;if(n!==null)throw n}}function Bc(n,r,a,c){cm=!1;var p=n.updateQueue;ga=!1;var y=p.firstBaseUpdate,k=p.lastBaseUpdate,P=p.shared.pending;if(P!==null){p.shared.pending=null;var W=P,le=W.next;W.next=null,k===null?y=le:k.next=le,k=W;var me=n.alternate;me!==null&&(me=me.updateQueue,P=me.lastBaseUpdate,P!==k&&(P===null?me.firstBaseUpdate=le:P.next=le,me.lastBaseUpdate=W))}if(y!==null){var Te=p.baseState;k=0,me=le=W=null,P=y;do{var ie=P.lane&-536870913,he=ie!==P.lane;if(he?(Wt&ie)===ie:(c&ie)===ie){ie!==0&&ie===po&&(cm=!0),me!==null&&(me=me.next={lane:0,tag:P.tag,payload:P.payload,callback:null,next:null});e:{var Ye=n,it=P;ie=r;var Pt=a;switch(it.tag){case 1:if(Ye=it.payload,typeof Ye=="function"){Te=Ye.call(Pt,Te,ie);break e}Te=Ye;break e;case 3:Ye.flags=Ye.flags&-65537|128;case 0:if(Ye=it.payload,ie=typeof Ye=="function"?Ye.call(Pt,Te,ie):Ye,ie==null)break e;Te=D({},Te,ie);break e;case 2:ga=!0}}ie=P.callback,ie!==null&&(n.flags|=64,he&&(n.flags|=8192),he=p.callbacks,he===null?p.callbacks=[ie]:he.push(ie))}else he={lane:ie,tag:P.tag,payload:P.payload,callback:P.callback,next:null},me===null?(le=me=he,W=Te):me=me.next=he,k|=ie;if(P=P.next,P===null){if(P=p.shared.pending,P===null)break;he=P,P=he.next,he.next=null,p.lastBaseUpdate=he,p.shared.pending=null}}while(!0);me===null&&(W=Te),p.baseState=W,p.firstBaseUpdate=le,p.lastBaseUpdate=me,y===null&&(p.shared.lanes=0),Ra|=k,n.lanes=k,n.memoizedState=Te}}function f2(n,r){if(typeof n!="function")throw Error(i(191,n));n.call(r)}function h2(n,r){var a=n.callbacks;if(a!==null)for(n.callbacks=null,n=0;n<a.length;n++)f2(a[n],r)}var va=Oe(null),tf=Oe(0);function p2(n,r){n=Vi,Ve(tf,n),Ve(va,r),Vi=n|r.baseLanes}function um(){Ve(tf,Vi),Ve(va,va.current)}function dm(){Vi=tf.current,ze(va),ze(tf)}var br=Oe(null),Or=null;function ba(n){var r=n.alternate;Ve(xr,xr.current&1),Ve(br,n),Or===null&&(r===null||va.current!==null||r.memoizedState!==null)&&(Or=n)}function fm(n){Ve(xr,xr.current),Ve(br,n),Or===null&&(Or=n)}function g2(n){n.tag===22?(Ve(xr,xr.current),Ve(br,n),Or===null&&(Or=n)):xa()}function xa(){Ve(xr,xr.current),Ve(br,br.current)}function us(n){ze(br),Or===n&&(Or=null),ze(xr)}var xr=Oe(0);function Vc(n,r){Ve(br,br.current),Ve(xr,r)}function hm(n){ze(xr),ze(br),Or===n&&(Or=null)}function nf(n){for(var r=n;r!==null;){if(r.tag===13){var a=r.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||P0(a)||L0(a)))return r}else if(r.tag===19&&r.memoizedProps.revealOrder!=="independent"){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var Ui=0,It=null,Sn=null,Wn=null,rf=!1,dl=!1,bo=!1,sf=0,Kc=0,fl=null,WN=0;function Bn(){throw Error(i(321))}function pm(n,r){if(r===null)return!1;for(var a=0;a<r.length&&a<n.length;a++)if(!cs(n[a],r[a]))return!1;return!0}function gm(n,r,a,c,p,y){return Ui=y,It=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,fe.H=n===null||n.memoizedState===null?W2:J2,bo=!1,y=a(c,p),bo=!1,dl&&(y=y2(r,a,c,p)),m2(n),y}function m2(n){fe.H=ff;var r=Sn!==null&&Sn.next!==null;if(Ui=0,Wn=Sn=It=null,rf=!1,Kc=0,fl=null,r)throw Error(i(300));n===null||Jn||(n=n.dependencies,n!==null&&$d(n)&&(Jn=!0))}function y2(n,r,a,c){It=n;var p=0;do{if(dl&&(fl=null),Kc=0,dl=!1,25<=p)throw Error(i(301));if(p+=1,Wn=Sn=null,n.updateQueue!=null){var y=n.updateQueue;y.lastEffect=null,y.events=null,y.stores=null,y.memoCache!=null&&(y.memoCache.index=0)}fe.H=aD,y=r(a,c)}while(dl);return y}function JN(){var n=fe.H,r=n.useState()[0];return r=typeof r.then=="function"?qc(r):r,n=n.useState()[0],(Sn!==null?Sn.memoizedState:null)!==n&&(It.flags|=1024),r}function mm(){var n=sf!==0;return sf=0,n}function ym(n,r,a){r.updateQueue=n.updateQueue,r.flags&=-2053,n.lanes&=~a}function vm(n){if(rf){for(n=n.memoizedState;n!==null;){var r=n.queue;r!==null&&(r.pending=null),n=n.next}rf=!1}Ui=0,Wn=Sn=It=null,dl=!1,Kc=sf=0,fl=null}function Ur(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Wn===null?It.memoizedState=Wn=n:Wn=Wn.next=n,Wn}function Yn(){if(Sn===null){var n=It.alternate;n=n!==null?n.memoizedState:null}else n=Sn.next;var r=Wn===null?It.memoizedState:Wn.next;if(r!==null)Wn=r,Sn=n;else{if(n===null)throw It.alternate===null?Error(i(467)):Error(i(310));Sn=n,n={memoizedState:Sn.memoizedState,baseState:Sn.baseState,baseQueue:Sn.baseQueue,queue:Sn.queue,next:null},Wn===null?It.memoizedState=Wn=n:Wn=Wn.next=n}return Wn}function af(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function qc(n){var r=Kc;return Kc+=1,fl===null&&(fl=[]),n=o2(fl,n,r),r=It,(Wn===null?r.memoizedState:Wn.next)===null&&(r=r.alternate,fe.H=r===null||r.memoizedState===null?W2:J2),n}function of(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return qc(n);if(n.$$typeof===F)return;if(n.$$typeof===U)return vr(n)}throw Error(i(438,String(n)))}function bm(n){var r=null,a=It.updateQueue;if(a!==null&&(r=a.memoCache),r==null){var c=It.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(r={data:c.data.map(function(p){return p.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),a===null&&(a=af(),It.updateQueue=a),a.memoCache=r,a=r.data[r.index],a===void 0)for(a=r.data[r.index]=Array(n),c=0;c<n;c++)a[c]=ae;return r.index++,a}function Hi(n,r){return typeof r=="function"?r(n):r}function lf(n){var r=Yn();return xm(r,Sn,n)}function xm(n,r,a){var c=n.queue;if(c===null)throw Error(i(311));c.lastRenderedReducer=a;var p=n.baseQueue,y=c.pending;if(y!==null){if(p!==null){var k=p.next;p.next=y.next,y.next=k}r.baseQueue=p=y,c.pending=null}if(y=n.baseState,p===null)n.memoizedState=y;else{r=p.next;var P=k=null,W=null,le=r,me=!1;do{var Te=le.lane&-536870913;if(Te!==le.lane?(Wt&Te)===Te:(Ui&Te)===Te){var ie=le.revertLane;if(ie===0)W!==null&&(W=W.next={lane:0,revertLane:0,gesture:null,action:le.action,hasEagerState:le.hasEagerState,eagerState:le.eagerState,next:null}),Te===po&&(me=!0);else if((Ui&ie)===ie){le=le.next,ie===po&&(me=!0);continue}else Te={lane:0,revertLane:le.revertLane,gesture:null,action:le.action,hasEagerState:le.hasEagerState,eagerState:le.eagerState,next:null},W===null?(P=W=Te,k=y):W=W.next=Te,It.lanes|=ie,Ra|=ie;Te=le.action,bo&&a(y,Te),y=le.hasEagerState?le.eagerState:a(y,Te)}else ie={lane:Te,revertLane:le.revertLane,gesture:le.gesture,action:le.action,hasEagerState:le.hasEagerState,eagerState:le.eagerState,next:null},W===null?(P=W=ie,k=y):W=W.next=ie,It.lanes|=Te,Ra|=Te;le=le.next}while(le!==null&&le!==r);if(W===null?k=y:W.next=P,!cs(y,n.memoizedState)&&(Jn=!0,me&&(a=ll,a!==null)))throw a;n.memoizedState=y,n.baseState=k,n.baseQueue=W,c.lastRenderedState=y}return p===null&&(c.lanes=0),[n.memoizedState,c.dispatch]}function Sm(n){var r=Yn(),a=r.queue;if(a===null)throw Error(i(311));a.lastRenderedReducer=n;var c=a.dispatch,p=a.pending,y=r.memoizedState;if(p!==null){a.pending=null;var k=p=p.next;do y=n(y,k.action),k=k.next;while(k!==p);cs(y,r.memoizedState)||(Jn=!0),r.memoizedState=y,r.baseQueue===null&&(r.baseState=y),a.lastRenderedState=y}return[y,c]}function v2(n,r,a){var c=It,p=Yn(),y=Kt;if(y){if(a===void 0)throw Error(i(407));a=a()}else a=r();var k=!cs((Sn||p).memoizedState,a);if(k&&(p.memoizedState=a,Jn=!0),p=p.queue,Rm(S2.bind(null,c,p,n),[n]),n=p.getSnapshot!==r||k||Wn!==null&&(Wn.memoizedState.tag&1)!==0,hl(n?9:8,{destroy:void 0},x2.bind(null,c,p,a,r),null),n){if(c.flags|=2048,kn===null)throw Error(i(349));y||(Ui&127)!==0||b2(c,r,a)}return a}function b2(n,r,a){n.flags|=16384,n={getSnapshot:r,value:a},r=It.updateQueue,r===null?(r=af(),It.updateQueue=r,r.stores=[n]):(a=r.stores,a===null?r.stores=[n]:a.push(n))}function x2(n,r,a,c){r.value=a,r.getSnapshot=c,w2(r)&&E2(n)}function S2(n,r,a){return a(function(){w2(r)&&E2(n)})}function w2(n){var r=n.getSnapshot;n=n.value;try{var a=r();return!cs(n,a)}catch{return!0}}function E2(n){var r=oo(n,2);r!==null&&Zr(r,n,2)}function wm(n){var r=Ur();if(typeof n=="function"){var a=n;if(n=a(),bo){$e(!0);try{a()}finally{$e(!1)}}}return r.memoizedState=r.baseState=n,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hi,lastRenderedState:n},r}function R2(n,r,a,c){return n.baseState=a,xm(n,Sn,typeof c=="function"?c:Hi)}function eD(n,r,a,c,p){if(df(n))throw Error(i(485));if(n=r.action,n!==null){var y={payload:p,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(k){y.listeners.push(k)}};fe.T!==null?a(!0):y.isTransition=!1,c(y),a=r.pending,a===null?(y.next=r.pending=y,C2(r,y)):(y.next=a.next,r.pending=a.next=y)}}function C2(n,r){var a=r.action,c=r.payload,p=n.state;if(r.isTransition){var y=fe.T,k={};k.types=y!==null?y.types:null,fe.T=k;try{var P=a(p,c),W=fe.S;W!==null&&W(k,P),T2(n,r,P)}catch(le){Em(n,r,le)}finally{y!==null&&k.types!==null&&(y.types=k.types),fe.T=y}}else try{y=a(p,c),T2(n,r,y)}catch(le){Em(n,r,le)}}function T2(n,r,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(c){k2(n,r,c)},function(c){return Em(n,r,c)}):k2(n,r,a)}function k2(n,r,a){r.status="fulfilled",r.value=a,O2(r),n.state=a,r=n.pending,r!==null&&(a=r.next,a===r?n.pending=null:(a=a.next,r.next=a,C2(n,a)))}function Em(n,r,a){var c=n.pending;if(n.pending=null,c!==null){c=c.next;do r.status="rejected",r.reason=a,O2(r),r=r.next;while(r!==c)}n.action=null}function O2(n){n=n.listeners;for(var r=0;r<n.length;r++)(0,n[r])()}function A2(n,r){return r}function M2(n,r){if(Kt){var a=kn.formState;if(a!==null){e:{var c=It;if(Kt){if(Mn){t:{for(var p=Mn,y=ks;p.nodeType!==8;){if(!y){p=null;break t}if(p=As(p.nextSibling),p===null){p=null;break t}}y=p.data,p=y==="F!"||y==="F"?p:null}if(p){Mn=As(p.nextSibling),c=p.data==="F!";break e}}fa(c)}c=!1}c&&(r=a[0])}}return a=Ur(),a.memoizedState=a.baseState=r,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:A2,lastRenderedState:r},a.queue=c,a=Q2.bind(null,It,c),c.dispatch=a,c=wm(!1),y=Am.bind(null,It,!1,c.queue),c=Ur(),p={state:r,dispatch:null,action:n,pending:null},c.queue=p,a=eD.bind(null,It,p,y,a),p.dispatch=a,c.memoizedState=n,[r,a,!1]}function N2(n){var r=Yn();return D2(r,Sn,n)}function D2(n,r,a){if(r=xm(n,r,A2)[0],n=lf(Hi)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var c=qc(r)}catch(k){throw k===cl?Zd:k}else c=r;r=Yn();var p=r.queue,y=p.dispatch;return a!==r.memoizedState&&(It.flags|=2048,hl(9,{destroy:void 0},tD.bind(null,p,a),null)),[c,y,n]}function tD(n,r){n.action=r}function j2(n){var r=Yn(),a=Sn;if(a!==null)return D2(r,a,n);Yn(),r=r.memoizedState,a=Yn();var c=a.queue.dispatch;return a.memoizedState=n,[r,c,!1]}function hl(n,r,a,c){return n={tag:n,create:a,deps:c,inst:r,next:null},r=It.updateQueue,r===null&&(r=af(),It.updateQueue=r),a=r.lastEffect,a===null?r.lastEffect=n.next=n:(c=a.next,a.next=n,n.next=c,r.lastEffect=n),n}function I2(){return Yn().memoizedState}function cf(n,r,a,c){var p=Ur();It.flags|=n,p.memoizedState=hl(1|r,{destroy:void 0},a,c===void 0?null:c)}function uf(n,r,a,c){var p=Yn();c=c===void 0?null:c;var y=p.memoizedState.inst;Sn!==null&&c!==null&&pm(c,Sn.memoizedState.deps)?p.memoizedState=hl(r,y,a,c):(It.flags|=n,p.memoizedState=hl(1|r,y,a,c))}function P2(n,r){cf(8390656,8,n,r)}function Rm(n,r){uf(2048,8,n,r)}function nD(n){It.flags|=4;var r=It.updateQueue;if(r===null)r=af(),It.updateQueue=r,r.events=[n];else{var a=r.events;a===null?r.events=[n]:a.push(n)}}function L2(n){var r=Yn().memoizedState;return nD({ref:r,nextImpl:n}),function(){if((un&2)!==0)throw Error(i(440));return r.impl.apply(void 0,arguments)}}function z2(n,r){return uf(4,2,n,r)}function _2(n,r){return uf(4,4,n,r)}function U2(n,r){if(typeof r=="function"){n=n();var a=r(n);return function(){typeof a=="function"?a():r(null)}}if(r!=null)return n=n(),r.current=n,function(){r.current=null}}function H2(n,r,a){a=a!=null?a.concat([n]):null,uf(4,4,U2.bind(null,r,n),a)}function Cm(){}function F2(n,r){var a=Yn();r=r===void 0?null:r;var c=a.memoizedState;return r!==null&&pm(r,c[1])?c[0]:(a.memoizedState=[n,r],n)}function B2(n,r){var a=Yn();r=r===void 0?null:r;var c=a.memoizedState;if(r!==null&&pm(r,c[1]))return c[0];if(c=n(),bo){$e(!0);try{n()}finally{$e(!1)}}return a.memoizedState=[c,r],c}function Tm(n,r,a){return a===void 0||(Ui&1073741824)!==0&&(Wt&261930)===0?n.memoizedState=r:(n.memoizedState=a,n=W1(),It.lanes|=n,Ra|=n,a)}function V2(n,r,a,c){return cs(a,r)?a:va.current!==null?(n=Tm(n,a,c),cs(n,r)||(Jn=!0),n):(Ui&106)===0||(Ui&1073741824)!==0&&(Wt&261930)===0?(Jn=!0,n.memoizedState=a):(n=W1(),It.lanes|=n,Ra|=n,r)}function K2(n,r,a,c,p){var y=ce.p;ce.p=y!==0&&8>y?y:8;var k=fe.T,P={};P.types=k!==null?k.types:null,fe.T=P,Am(n,!1,r,a);try{var W=p(),le=fe.S;if(le!==null&&le(P,W),W!==null&&typeof W=="object"&&typeof W.then=="function"){var me=ZN(W,c);Yc(n,r,me,ps(n))}else Yc(n,r,c,ps(n))}catch(Te){Yc(n,r,{then:function(){},status:"rejected",reason:Te},ps())}finally{ce.p=y,k!==null&&P.types!==null&&(k.types=P.types),fe.T=k}}function rD(){}function km(n,r,a,c){if(n.tag!==5)throw Error(i(476));var p=q2(n).queue;K2(n,p,r,Re,a===null?rD:function(){return Y2(n),a(c)})}function q2(n){var r=n.memoizedState;if(r!==null)return r;r={memoizedState:Re,baseState:Re,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hi,lastRenderedState:Re},next:null};var a={};return r.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hi,lastRenderedState:a},next:null},n.memoizedState=r,n=n.alternate,n!==null&&(n.memoizedState=r),r}function Y2(n){var r=q2(n);r.next===null&&(r=n.alternate.memoizedState),Yc(n,r.next.queue,{},ps())}function Om(){return vr(Dl)}function G2(){return Yn().memoizedState}function $2(){return Yn().memoizedState}function sD(n){for(var r=n.return;r!==null;){switch(r.tag){case 24:case 3:var a=ps();n=ma(a);var c=ya(r,n,a);c!==null&&(Zr(c,r,a),Hc(c,r,a)),r={cache:nm()},n.payload=r;return}r=r.return}}function iD(n,r,a){var c=ps();a={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},df(n)?X2(r,a):(a=Gg(n,r,a,c),a!==null&&(Zr(a,n,c),Z2(a,r,c)))}function Q2(n,r,a){var c=ps();Yc(n,r,a,c)}function Yc(n,r,a,c){var p={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(df(n))X2(r,p);else{var y=n.alternate;if(n.lanes===0&&(y===null||y.lanes===0)&&(y=r.lastRenderedReducer,y!==null))try{var k=r.lastRenderedState,P=y(k,a);if(p.hasEagerState=!0,p.eagerState=P,cs(P,k))return Fd(n,r,p,0),kn===null&&Hd(),!1}catch{}if(a=Gg(n,r,p,c),a!==null)return Zr(a,n,c),Z2(a,r,c),!0}return!1}function Am(n,r,a,c){if(c={lane:2,revertLane:b0(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},df(n)){if(r)throw Error(i(479))}else r=Gg(n,a,c,2),r!==null&&Zr(r,n,2)}function df(n){var r=n.alternate;return n===It||r!==null&&r===It}function X2(n,r){dl=rf=!0;var a=n.pending;a===null?r.next=r:(r.next=a.next,a.next=r),n.pending=r}function Z2(n,r,a){if((a&4194048)!==0){var c=r.lanes;c&=n.pendingLanes,a|=c,r.lanes=a,On(n,a)}}var ff={readContext:vr,use:of,useCallback:Bn,useContext:Bn,useEffect:Bn,useImperativeHandle:Bn,useLayoutEffect:Bn,useInsertionEffect:Bn,useMemo:Bn,useReducer:Bn,useRef:Bn,useState:Bn,useDebugValue:Bn,useDeferredValue:Bn,useTransition:Bn,useSyncExternalStore:Bn,useId:Bn,useHostTransitionStatus:Bn,useFormState:Bn,useActionState:Bn,useOptimistic:Bn,useMemoCache:Bn,useCacheRefresh:Bn,useEffectEvent:Bn},W2={readContext:vr,use:of,useCallback:function(n,r){return Ur().memoizedState=[n,r===void 0?null:r],n},useContext:vr,useEffect:P2,useImperativeHandle:function(n,r,a){a=a!=null?a.concat([n]):null,cf(4194308,4,U2.bind(null,r,n),a)},useLayoutEffect:function(n,r){return cf(4194308,4,n,r)},useInsertionEffect:function(n,r){cf(4,2,n,r)},useMemo:function(n,r){var a=Ur();r=r===void 0?null:r;var c=n();if(bo){$e(!0);try{n()}finally{$e(!1)}}return a.memoizedState=[c,r],c},useReducer:function(n,r,a){var c=Ur();if(a!==void 0){var p=a(r);if(bo){$e(!0);try{a(r)}finally{$e(!1)}}}else p=r;return c.memoizedState=c.baseState=p,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:p},c.queue=n,n=n.dispatch=iD.bind(null,It,n),[c.memoizedState,n]},useRef:function(n){var r=Ur();return n={current:n},r.memoizedState=n},useState:function(n){n=wm(n);var r=n.queue,a=Q2.bind(null,It,r);return r.dispatch=a,[n.memoizedState,a]},useDebugValue:Cm,useDeferredValue:function(n,r){var a=Ur();return Tm(a,n,r)},useTransition:function(){var n=wm(!1);return n=K2.bind(null,It,n.queue,!0,!1),Ur().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,r,a){var c=It,p=Ur();if(Kt){if(a===void 0)throw Error(i(407));a=a()}else{if(a=r(),kn===null)throw Error(i(349));(Wt&127)!==0||b2(c,r,a)}p.memoizedState=a;var y={value:a,getSnapshot:r};return p.queue=y,P2(S2.bind(null,c,y,n),[n]),c.flags|=2048,hl(9,{destroy:void 0},x2.bind(null,c,y,a,r),null),a},useId:function(){var n=Ur(),r=kn.identifierPrefix;if(Kt){var a=si,c=ri;a=(c&~(1<<32-tt(c)-1)).toString(32)+a,r="_"+r+"R_"+a,a=sf++,0<a&&(r+="H"+a.toString(32)),r+="_"}else a=WN++,r="_"+r+"r_"+a.toString(32)+"_";return n.memoizedState=r},useHostTransitionStatus:Om,useFormState:M2,useActionState:M2,useOptimistic:function(n){var r=Ur();r.memoizedState=r.baseState=n;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=a,r=Am.bind(null,It,!0,a),a.dispatch=r,[n,r]},useMemoCache:bm,useCacheRefresh:function(){return Ur().memoizedState=sD.bind(null,It)},useEffectEvent:function(n){var r=Ur(),a={impl:n};return r.memoizedState=a,function(){if((un&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}},J2={readContext:vr,use:of,useCallback:F2,useContext:vr,useEffect:Rm,useImperativeHandle:H2,useInsertionEffect:z2,useLayoutEffect:_2,useMemo:B2,useReducer:lf,useRef:I2,useState:function(){return lf(Hi)},useDebugValue:Cm,useDeferredValue:function(n,r){var a=Yn();return V2(a,Sn.memoizedState,n,r)},useTransition:function(){var n=lf(Hi)[0],r=Yn().memoizedState;return[typeof n=="boolean"?n:qc(n),r]},useSyncExternalStore:v2,useId:G2,useHostTransitionStatus:Om,useFormState:N2,useActionState:N2,useOptimistic:function(n,r){var a=Yn();return R2(a,Sn,n,r)},useMemoCache:bm,useCacheRefresh:$2,useEffectEvent:L2},aD={readContext:vr,use:of,useCallback:F2,useContext:vr,useEffect:Rm,useImperativeHandle:H2,useInsertionEffect:z2,useLayoutEffect:_2,useMemo:B2,useReducer:Sm,useRef:I2,useState:function(){return Sm(Hi)},useDebugValue:Cm,useDeferredValue:function(n,r){var a=Yn();return Sn===null?Tm(a,n,r):V2(a,Sn.memoizedState,n,r)},useTransition:function(){var n=Sm(Hi)[0],r=Yn().memoizedState;return[typeof n=="boolean"?n:qc(n),r]},useSyncExternalStore:v2,useId:G2,useHostTransitionStatus:Om,useFormState:j2,useActionState:j2,useOptimistic:function(n,r){var a=Yn();return Sn!==null?R2(a,Sn,n,r):(a.baseState=n,[n,a.queue.dispatch])},useMemoCache:bm,useCacheRefresh:$2,useEffectEvent:L2};function Mm(n,r,a,c){r=n.memoizedState,a=a(c,r),a=a==null?r:D({},r,a),n.memoizedState=a,n.lanes===0&&(n.updateQueue.baseState=a)}var Nm={enqueueSetState:function(n,r,a){n=n._reactInternals;var c=ps(),p=ma(c);p.payload=r,a!=null&&(p.callback=a),r=ya(n,p,c),r!==null&&(Zr(r,n,c),Hc(r,n,c))},enqueueReplaceState:function(n,r,a){n=n._reactInternals;var c=ps(),p=ma(c);p.tag=1,p.payload=r,a!=null&&(p.callback=a),r=ya(n,p,c),r!==null&&(Zr(r,n,c),Hc(r,n,c))},enqueueForceUpdate:function(n,r){n=n._reactInternals;var a=ps(),c=ma(a);c.tag=2,r!=null&&(c.callback=r),r=ya(n,c,a),r!==null&&(Zr(r,n,a),Hc(r,n,a))}};function e1(n,r,a,c,p,y,k){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(c,y,k):r.prototype&&r.prototype.isPureReactComponent?!Dc(a,c)||!Dc(p,y):!0}function t1(n,r,a,c){n=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(a,c),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(a,c),r.state!==n&&Nm.enqueueReplaceState(r,r.state,null)}function xo(n,r){var a=r;if("ref"in r){a={};for(var c in r)c!=="ref"&&(a[c]=r[c])}if(n=n.defaultProps){a===r&&(a=D({},a));for(var p in n)a[p]===void 0&&(a[p]=n[p])}return a}function n1(n){Ud(n)}function r1(n){console.error(n)}function s1(n){Ud(n)}function hf(n,r){try{var a=n.onUncaughtError;a(r.value,{componentStack:r.stack})}catch(c){setTimeout(function(){throw c})}}function i1(n,r,a){try{var c=n.onCaughtError;c(a.value,{componentStack:a.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function Dm(n,r,a){return a=ma(a),a.tag=3,a.payload={element:null},a.callback=function(){hf(n,r)},a}function a1(n){return n=ma(n),n.tag=3,n}function o1(n,r,a,c){var p=a.type.getDerivedStateFromError;if(typeof p=="function"){var y=c.value;n.payload=function(){return p(y)},n.callback=function(){i1(r,a,c)}}var k=a.stateNode;k!==null&&typeof k.componentDidCatch=="function"&&(n.callback=function(){i1(r,a,c),typeof p!="function"&&(Ca===null?Ca=new Set([this]):Ca.add(this));var P=c.stack;this.componentDidCatch(c.value,{componentStack:P!==null?P:""})})}function oD(n,r,a,c,p){if(a.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(r=a.alternate,r!==null&&fo(r,a,p,!0),a=br.current,a!==null){switch(a.tag){case 31:case 13:case 19:return Or===null?If():a.alternate===null&&Vn===0&&(Vn=3),a.flags&=-257,a.flags|=65536,a.lanes=p,c===Wd?a.flags|=16384:(r=a.updateQueue,r===null?a.updateQueue=new Set([c]):r.add(c),m0(n,c,p)),!1;case 22:return a.flags|=65536,c===Wd?a.flags|=16384:(r=a.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([c])},a.updateQueue=r):(a=r.retryQueue,a===null?r.retryQueue=new Set([c]):a.add(c)),m0(n,c,p)),!1}throw Error(i(435,a.tag))}return m0(n,c,p),If(),!1}if(Kt)return r=br.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=p,c!==Wg&&(n=Error(i(422),{cause:c}),Pc(Rs(n,a)))):(c!==Wg&&(r=Error(i(423),{cause:c}),Pc(Rs(r,a))),n=n.current.alternate,n.flags|=65536,p&=-p,n.lanes|=p,c=Rs(c,a),p=Dm(n.stateNode,c,p),lm(n,p),Vn!==4&&(Vn=2)),!1;var y=Error(i(520),{cause:c});if(y=Rs(y,a),eu===null?eu=[y]:eu.push(y),Vn!==4&&(Vn=2),r===null)return!0;c=Rs(c,a),a=r;do{switch(a.tag){case 3:return a.flags|=65536,n=p&-p,a.lanes|=n,n=Dm(a.stateNode,c,n),lm(a,n),!1;case 1:if(r=a.type,y=a.stateNode,(a.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(Ca===null||!Ca.has(y))))return a.flags|=65536,p&=-p,a.lanes|=p,p=a1(p),o1(p,n,a,c),lm(a,p),!1;break;case 22:if(a.memoizedState!==null)return a.flags|=65536,!1}a=a.return}while(a!==null);return!1}var jm=Error(i(461)),Jn=!1;function ar(n,r,a,c){r.child=n===null?d2(r,null,a,c):vo(r,n.child,a,c)}function l1(n,r,a,c,p){a=a.render;var y=r.ref;if("ref"in c){var k={};for(var P in c)P!=="ref"&&(k[P]=c[P])}else k=c;return ho(r),c=gm(n,r,a,k,y,p),P=mm(),n!==null&&!Jn?(ym(n,r,p),Fi(n,r,p)):(Kt&&P&&qd(r),r.flags|=1,ar(n,r,c,p),r.child)}function c1(n,r,a,c,p){if(n===null){var y=a.type;return typeof y=="function"&&!$g(y)&&y.defaultProps===void 0&&a.compare===null?(r.tag=15,r.type=y,u1(n,r,y,c,p)):(n=Vd(a.type,null,c,r,r.mode,p),n.ref=r.ref,n.return=r,r.child=n)}if(y=n.child,!Fm(n,p)){var k=y.memoizedProps;if(a=a.compare,a=a!==null?a:Dc,a(k,c)&&n.ref===r.ref)return Fi(n,r,p)}return r.flags|=1,n=Pi(y,c),n.ref=r.ref,n.return=r,r.child=n}function u1(n,r,a,c,p){if(n!==null){var y=n.memoizedProps;if(Dc(y,c)&&n.ref===r.ref)if(Jn=!1,r.pendingProps=c=y,Fm(n,p))(n.flags&131072)!==0&&(Jn=!0);else return r.lanes=n.lanes,Fi(n,r,p)}return Im(n,r,a,c,p)}function d1(n,r,a,c){var p=c.children,y=n!==null?n.memoizedState:null;if(n===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((r.flags&128)!==0){if(y=y!==null?y.baseLanes|a:a,n!==null){for(c=r.child=n.child,p=0;c!==null;)p=p|c.lanes|c.childLanes,c=c.sibling;c=p&~y}else c=0,r.child=null;return f1(n,r,y,a,c)}if((a&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},n!==null&&Xd(r,y!==null?y.cachePool:null),y!==null?p2(r,y):um(),g2(r);else return c=r.lanes=536870912,f1(n,r,y!==null?y.baseLanes|a:a,a,c)}else y!==null?(Xd(r,y.cachePool),p2(r,y),xa(),r.memoizedState=null):(n!==null&&Xd(r,null),um(),xa());return ar(n,r,p,a),r.child}function Gc(n,r){return n!==null&&n.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function f1(n,r,a,c,p){var y=sm();return y=y===null?null:{parent:Zn._currentValue,pool:y},r.memoizedState={baseLanes:a,cachePool:y},n!==null&&Xd(r,null),um(),g2(r),n!==null&&fo(n,r,c,!0),r.childLanes=p,null}function pf(n,r){return r=gf({mode:r.mode,children:r.children},n.mode),r.ref=n.ref,n.child=r,r.return=n,r}function h1(n,r,a){return vo(r,n.child,null,a),n=pf(r,r.pendingProps),n.flags|=2,us(r),r.memoizedState=null,n}function lD(n,r,a){var c=r.pendingProps,p=(r.flags&128)!==0;if(r.flags&=-129,n===null){if(Kt){if(c.mode==="hidden")return n=pf(r,c),r.lanes=536870912,n.memoizedState={baseLanes:0,cachePool:null},Gc(null,n);if(fm(r),(n=Mn)?(n=US(n,ks),n=n!==null&&n.data==="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:ua!==null?{id:ri,overflow:si}:null,retryLane:536870912,hydrationErrors:null},a=Xx(n),a.return=r,r.child=a,cr=r,Mn=null)):n=null,n===null)throw fa(r);return r.lanes=536870912,null}return pf(r,c)}var y=n.memoizedState;if(y!==null){var k=y.dehydrated;if(fm(r),p)if(r.flags&256)r.flags&=-257,r=h1(n,r,a);else if(r.memoizedState!==null)r.child=n.child,r.flags|=128,r=null;else throw Error(i(558));else if(Jn||fo(n,r,a,!1),p=(a&n.childLanes)!==0,Jn||p){if(va.current===null){if(c=kn,c!==null&&(k=Gt(c,a),k!==0&&k!==y.retryLane))throw y.retryLane=k,oo(n,k),Zr(c,n,k),jm;If()}r=h1(n,r,a)}else n=y.treeContext,Mn=As(k.nextSibling),cr=r,Kt=!0,da=null,ks=!1,n!==null&&Jx(r,n),r=pf(r,c),r.flags|=134221824;return r}return n=Pi(n.child,{mode:c.mode,children:c.children}),n.ref=r.ref,r.child=n,n.return=r,n}function pl(n,r){var a=r.ref;if(a===null)n!==null&&n.ref!==null&&(r.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(i(284));(n===null||n.ref!==a)&&(r.flags|=4194816)}}function Im(n,r,a,c,p){return ho(r),a=gm(n,r,a,c,void 0,p),c=mm(),n!==null&&!Jn?(ym(n,r,p),Fi(n,r,p)):(Kt&&c&&qd(r),r.flags|=1,ar(n,r,a,p),r.child)}function p1(n,r,a,c,p,y){return ho(r),r.updateQueue=null,a=y2(r,c,a,p),m2(n),c=mm(),n!==null&&!Jn?(ym(n,r,y),Fi(n,r,y)):(Kt&&c&&qd(r),r.flags|=1,ar(n,r,a,y),r.child)}function g1(n,r,a,c,p){if(ho(r),r.stateNode===null){var y=sl,k=a.contextType;typeof k=="object"&&k!==null&&(y=vr(k)),y=new a(c,y),r.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,y.updater=Nm,r.stateNode=y,y._reactInternals=r,y=r.stateNode,y.props=c,y.state=r.memoizedState,y.refs={},am(r),k=a.contextType,y.context=typeof k=="object"&&k!==null?vr(k):sl,y.state=r.memoizedState,k=a.getDerivedStateFromProps,typeof k=="function"&&(Mm(r,a,k,c),y.state=r.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(k=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),k!==y.state&&Nm.enqueueReplaceState(y,y.state,null),Bc(r,c,y,p),Fc(),y.state=r.memoizedState),typeof y.componentDidMount=="function"&&(r.flags|=4194308),c=!0}else if(n===null){y=r.stateNode;var P=r.memoizedProps,W=xo(a,P);y.props=W;var le=y.context,me=a.contextType;k=sl,typeof me=="object"&&me!==null&&(k=vr(me));var Te=a.getDerivedStateFromProps;me=typeof Te=="function"||typeof y.getSnapshotBeforeUpdate=="function",P=r.pendingProps!==P,me||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(P||le!==k)&&t1(r,y,c,k),ga=!1;var ie=r.memoizedState;y.state=ie,Bc(r,c,y,p),Fc(),le=r.memoizedState,P||ie!==le||ga?(typeof Te=="function"&&(Mm(r,a,Te,c),le=r.memoizedState),(W=ga||e1(r,a,W,c,ie,le,k))?(me||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(r.flags|=4194308)):(typeof y.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=c,r.memoizedState=le),y.props=c,y.state=le,y.context=k,c=W):(typeof y.componentDidMount=="function"&&(r.flags|=4194308),c=!1)}else{y=r.stateNode,om(n,r),k=r.memoizedProps,me=xo(a,k),y.props=me,Te=r.pendingProps,ie=y.context,le=a.contextType,W=sl,typeof le=="object"&&le!==null&&(W=vr(le)),P=a.getDerivedStateFromProps,(le=typeof P=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(k!==Te||ie!==W)&&t1(r,y,c,W),ga=!1,ie=r.memoizedState,y.state=ie,Bc(r,c,y,p),Fc();var he=r.memoizedState;k!==Te||ie!==he||ga||n!==null&&n.dependencies!==null&&$d(n.dependencies)?(typeof P=="function"&&(Mm(r,a,P,c),he=r.memoizedState),(me=ga||e1(r,a,me,c,ie,he,W)||n!==null&&n.dependencies!==null&&$d(n.dependencies))?(le||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(c,he,W),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(c,he,W)),typeof y.componentDidUpdate=="function"&&(r.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof y.componentDidUpdate!="function"||k===n.memoizedProps&&ie===n.memoizedState||(r.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||k===n.memoizedProps&&ie===n.memoizedState||(r.flags|=1024),r.memoizedProps=c,r.memoizedState=he),y.props=c,y.state=he,y.context=W,c=me):(typeof y.componentDidUpdate!="function"||k===n.memoizedProps&&ie===n.memoizedState||(r.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||k===n.memoizedProps&&ie===n.memoizedState||(r.flags|=1024),c=!1)}return y=c,pl(n,r),c=(r.flags&128)!==0,y||c?(y=r.stateNode,a=c&&typeof a.getDerivedStateFromError!="function"?null:y.render(),r.flags|=1,n!==null&&c?(r.child=vo(r,n.child,null,p),r.child=vo(r,null,a,p)):ar(n,r,a,p),r.memoizedState=y.state,n=r.child):n=Fi(n,r,p),n}function m1(n,r,a,c){return co(),r.flags|=256,ar(n,r,a,c),r.child}var Pm={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Lm(n){return{baseLanes:n,cachePool:i2()}}function zm(n,r,a){return n=n!==null?n.childLanes&~a:0,r&&(n|=hs),n}function y1(n,r,a){var c=r.pendingProps,p=!1,y=(r.flags&128)!==0,k;if((k=y)||(k=n!==null&&n.memoizedState===null?!1:(xr.current&2)!==0),k&&(p=!0,r.flags&=-129),k=(r.flags&32)!==0,r.flags&=-33,n===null){if(Kt){if(p?ba(r):xa(),(n=Mn)?(n=US(n,ks),n=n!==null&&n.data!=="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:ua!==null?{id:ri,overflow:si}:null,retryLane:536870912,hydrationErrors:null},a=Xx(n),a.return=r,r.child=a,cr=r,Mn=null)):n=null,n===null)throw fa(r);return L0(n)?r.lanes=32:r.lanes=536870912,null}return y=c.children,c=c.fallback,p?(xa(),p=r.mode,y=gf({mode:"hidden",children:y},p),c=lo(c,p,a,null),y.return=r,c.return=r,y.sibling=c,r.child=y,c=r.child,c.memoizedState=Lm(a),c.childLanes=zm(n,k,a),r.memoizedState=Pm,Gc(null,c)):(ba(r),_m(r,y))}var P=n.memoizedState;if(P!==null){var W=P.dehydrated;if(W!==null)return cD(n,r,y,k,c,W,P,a)}return p?(xa(),p=c.fallback,y=r.mode,P=n.child,W=P.sibling,c=Pi(P,{mode:"hidden",children:c.children}),c.subtreeFlags=P.subtreeFlags&1206910976,W!==null?p=Pi(W,p):(p=lo(p,y,a,null),p.flags|=2),p.return=r,c.return=r,c.sibling=p,r.child=c,Gc(null,c),c=r.child,p=n.child.memoizedState,p===null?p=Lm(a):(y=p.cachePool,y!==null?(P=Zn._currentValue,y=y.parent!==P?{parent:P,pool:P}:y):y=i2(),p={baseLanes:p.baseLanes|a,cachePool:y}),c.memoizedState=p,c.childLanes=zm(n,k,a),r.memoizedState=Pm,Gc(n.child,c)):(ba(r),a=n.child,n=a.sibling,a=Pi(a,{mode:"visible",children:c.children}),a.return=r,a.sibling=null,n!==null&&(k=r.deletions,k===null?(r.deletions=[n],r.flags|=16):k.push(n)),r.child=a,r.memoizedState=null,a)}function _m(n,r){return r=gf({mode:"visible",children:r},n.mode),r.return=n,n.child=r}function gf(n,r){return n=Gr(22,n,null,r),n.lanes=0,n}function mf(n,r,a){return vo(r,n.child,null,a),n=_m(r,r.pendingProps.children),n.flags|=2,r.memoizedState=null,n}function cD(n,r,a,c,p,y,k,P){if(a)return r.flags&256?(ba(r),r.flags&=-257,mf(n,r,P)):r.memoizedState!==null?(xa(),r.child=n.child,r.flags|=128,null):(xa(),y=p.fallback,k=r.mode,p=gf({mode:"visible",children:p.children},k),y=lo(y,k,P,null),y.flags|=2,p.return=r,y.return=r,p.sibling=y,r.child=p,vo(r,n.child,null,P),p=r.child,p.memoizedState=Lm(P),p.childLanes=zm(n,c,P),r.memoizedState=Pm,Gc(null,p));if(ba(r),L0(y)){if(c=y.nextSibling&&y.nextSibling.dataset,c)var W=c.dgst;return c=W,c!==""&&(p=Error(i(419)),p.stack="",p.digest=c,Pc({value:p,source:null,stack:null})),mf(n,r,P)}if(Jn||fo(n,r,P,!1),c=(P&n.childLanes)!==0,Jn||c){if(va.current!==null)return mf(n,r,P);if(c=kn,c!==null&&(p=Gt(c,P),p!==0&&p!==k.retryLane))throw k.retryLane=p,oo(n,p),Zr(c,n,p),jm;return P0(y)||If(),mf(n,r,P)}return P0(y)?(r.flags|=192,r.child=n.child,null):(n=k.treeContext,Mn=As(y.nextSibling),cr=r,Kt=!0,da=null,ks=!1,n!==null&&Jx(r,n),r=_m(r,p.children),r.flags|=134221824,r)}function v1(n,r,a){n.lanes|=r;var c=n.alternate;c!==null&&(c.lanes|=r),Gd(n.return,r,a)}function b1(n){for(var r=null;n!==null;){var a=n.alternate;a!==null&&nf(a)===null&&(r=n),n=n.sibling}return r}function yf(n,r,a,c,p,y){var k=n.memoizedState;k===null?n.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:c,tail:a,tailMode:p,treeForkCount:y}:(k.isBackwards=r,k.rendering=null,k.renderingStartTime=0,k.last=c,k.tail=a,k.tailMode=p,k.treeForkCount=y)}function Um(n){var r=n.child;for(n.child=null;r!==null;){var a=r.sibling;r.sibling=n.child,n.child=r,r=a}}function Hm(n,r,a){var c=r.pendingProps,p=c.revealOrder,y=c.tail;c=c.children;var k=xr.current;if(r.flags&128)return Vc(r,k),null;var P=(k&2)!==0;if(P?(k=k&1|2,r.flags|=128):k&=1,Vc(r,k),p==="backwards"&&n!==null?(Um(n),ar(n,r,c,a),Um(n)):ar(n,r,c,a),c=Kt?Ic:0,!P&&n!==null&&(n.flags&128)!==0)e:for(n=r.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&v1(n,a,r);else if(n.tag===19)v1(n,a,r);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===r)break e;for(;n.sibling===null;){if(n.return===null||n.return===r)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(p){case"backwards":a=b1(r.child),a===null?(p=r.child,r.child=null):(p=a.sibling,a.sibling=null,Um(r)),yf(r,!0,p,null,y,c);break;case"unstable_legacy-backwards":for(a=null,p=r.child,r.child=null;p!==null;){if(n=p.alternate,n!==null&&nf(n)===null){r.child=p;break}n=p.sibling,p.sibling=a,a=p,p=n}yf(r,!0,a,null,y,c);break;case"together":yf(r,!1,null,null,void 0,c);break;case"independent":r.memoizedState=null;break;default:a=b1(r.child),a===null?(p=r.child,r.child=null):(p=a.sibling,a.sibling=null),yf(r,!1,p,a,y,c)}return r.child}function x1(n,r,a){var c=r.pendingProps;return ha(r,r.type,c.value),ar(n,r,c.children,a),r.child}function Fi(n,r,a){if(n!==null&&(r.dependencies=n.dependencies),Ra|=r.lanes,(a&r.childLanes)===0)if(n!==null){if(fo(n,r,a,!1),(a&r.childLanes)===0)return null}else return null;if(n!==null&&r.child!==n.child)throw Error(i(153));if(r.child!==null){for(n=r.child,a=Pi(n,n.pendingProps),r.child=a,a.return=r;n.sibling!==null;)n=n.sibling,a=a.sibling=Pi(n,n.pendingProps),a.return=r;a.sibling=null}return r.child}function Fm(n,r){return(n.lanes&r)!==0?!0:(n=n.dependencies,!!(n!==null&&$d(n)))}function uD(n,r,a){switch(r.tag){case 3:Ze(r,r.stateNode.containerInfo),ha(r,Zn,n.memoizedState.cache),co();break;case 27:case 5:de(r);break;case 4:Ze(r,r.stateNode.containerInfo);break;case 10:ha(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,fm(r),null;break;case 13:var c=r.memoizedState;if(c!==null){if(c.dehydrated!==null)return ba(r),r.flags|=128,null;c=fo(n,r,a,!1);var p=r.child.childLanes;return c||(a&p)!==0?y1(n,r,a):(ba(r),n=Fi(n,r,a),n!==null?n.sibling:null)}ba(r);break;case 19:if(r.flags&128)return Hm(n,r,a);if(p=(n.flags&128)!==0,c=(a&r.childLanes)!==0,c||(fo(n,r,a,!1),c=(a&r.childLanes)!==0),p){if(c)return Hm(n,r,a);r.flags|=128}if(p=r.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),Vc(r,xr.current),c)break;return null;case 22:return r.lanes=0,d1(n,r,a,r.pendingProps);case 24:ha(r,Zn,n.memoizedState.cache)}return Fi(n,r,a)}function S1(n,r,a){if(n!==null)if(n.memoizedProps!==r.pendingProps)Jn=!0;else{if(!Fm(n,a)&&(r.flags&128)===0)return Jn=!1,uD(n,r,a);Jn=(n.flags&131072)!==0}else Jn=!1,Kt&&(r.flags&1048576)!==0&&Wx(r,Ic,r.index);switch(r.lanes=0,r.tag){case 16:e:{var c=r.pendingProps;if(n=mo(r.elementType),r.type=n,typeof n=="function")$g(n)?(c=xo(n,c),r.tag=1,r=g1(null,r,n,c,a)):(r.tag=0,r=Im(null,r,n,c,a));else{if(n!=null){var p=n.$$typeof;if(p===_){r.tag=11,r=l1(null,r,n,c,a);break e}else if(p===q){r.tag=14,r=c1(null,r,n,c,a);break e}else if(p===U){r.tag=10,r.type=n,r=x1(null,r,a);break e}}throw r=se(n)||n,Error(i(306,r,""))}}return r;case 0:return Im(n,r,r.type,r.pendingProps,a);case 1:return c=r.type,p=xo(c,r.pendingProps),g1(n,r,c,p,a);case 3:e:{if(Ze(r,r.stateNode.containerInfo),n===null)throw Error(i(387));c=r.pendingProps;var y=r.memoizedState;p=y.element,om(n,r),Bc(r,c,null,a);var k=r.memoizedState;if(c=k.cache,ha(r,Zn,c),c!==y.cache&&tm(r,[Zn],a,!0),Fc(),c=k.element,y.isDehydrated)if(y={element:c,isDehydrated:!1,cache:k.cache},r.updateQueue.baseState=y,r.memoizedState=y,r.flags&256){r=m1(n,r,c,a);break e}else if(c!==p){p=Rs(Error(i(424)),r),Pc(p),r=m1(n,r,c,a);break e}else for(n=r.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,Mn=As(n.firstChild),cr=r,Kt=!0,da=null,ks=!0,a=d2(r,null,c,a),r.child=a;a;)a.flags=a.flags&-3|134221824,a=a.sibling;else{if(co(),c===p){r=Fi(n,r,a);break e}ar(n,r,c,a)}r=r.child}return r;case 26:return pl(n,r),n===null?(a=YS(r.type,null,r.pendingProps,null))?r.memoizedState=a:Kt||(r.stateNode=CS(r.type,r.pendingProps,xe.current,r)):r.memoizedState=YS(r.type,n.memoizedProps,r.pendingProps,n.memoizedState),null;case 27:return de(r),n===null&&Kt&&(c=r.stateNode=BS(r.type,r.pendingProps,xe.current),cr=r,ks=!0,p=Mn,Oa(r.type)?(z0=p,Mn=As(c.firstChild)):Mn=p),ar(n,r,r.pendingProps.children,a),pl(n,r),n===null&&(r.flags|=4194304),r.child;case 5:return n===null&&Kt&&((p=c=Mn)&&(c=sj(c,r.type,r.pendingProps,ks),c!==null?(r.stateNode=c,cr=r,Mn=As(c.firstChild),ks=!1,p=!0):p=!1),p||fa(r)),de(r),p=r.type,y=r.pendingProps,k=n!==null?n.memoizedProps:null,c=y.children,O0(p,y)?c=null:k!==null&&O0(p,k)&&(r.flags|=32),r.memoizedState!==null&&(p=gm(n,r,JN,null,null,a),Dl._currentValue=p),pl(n,r),ar(n,r,c,a),r.child;case 6:return n===null&&Kt&&((n=a=Mn)&&(a=ij(a,r.pendingProps,ks),a!==null?(r.stateNode=a,cr=r,Mn=null,n=!0):n=!1),n||fa(r)),null;case 13:return y1(n,r,a);case 4:return Ze(r,r.stateNode.containerInfo),c=r.pendingProps,n===null?r.child=vo(r,null,c,a):ar(n,r,c,a),r.child;case 11:return l1(n,r,r.type,r.pendingProps,a);case 7:return c=r.pendingProps,pl(n,r),ar(n,r,c,a),r.child;case 8:return ar(n,r,r.pendingProps.children,a),r.child;case 12:return ar(n,r,r.pendingProps.children,a),r.child;case 10:return x1(n,r,a);case 9:return p=r.type._context,c=r.pendingProps.children,ho(r),p=vr(p),c=c(p),r.flags|=1,ar(n,r,c,a),r.child;case 14:return c1(n,r,r.type,r.pendingProps,a);case 15:return u1(n,r,r.type,r.pendingProps,a);case 19:return Hm(n,r,a);case 31:return lD(n,r,a);case 22:return d1(n,r,a,r.pendingProps);case 24:return ho(r),c=vr(Zn),n===null?(p=sm(),p===null&&(p=kn,y=nm(),p.pooledCache=y,y.refCount++,y!==null&&(p.pooledCacheLanes|=a),p=y),r.memoizedState={parent:c,cache:p},am(r),ha(r,Zn,p)):((n.lanes&a)!==0&&(om(n,r),Bc(r,null,null,a),Fc()),p=n.memoizedState,y=r.memoizedState,p.parent!==c?(p={parent:c,cache:c},r.memoizedState=p,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=p),ha(r,Zn,c)):(c=y.cache,ha(r,Zn,c),c!==p.cache&&tm(r,[Zn],a,!0))),ar(n,r,r.pendingProps.children,a),r.child;case 30:return r.stateNode===null&&(r.stateNode={autoName:null,paired:null,clones:null,ref:null}),c=r.pendingProps,c.name!=null&&c.name!=="auto"?r.flags|=n===null?18882560:18874368:Kt&&qd(r),n!==null&&n.memoizedProps.name!==c.name?r.flags|=4194816:pl(n,r),ar(n,r,c.children,a),r.child;case 29:throw r.pendingProps}throw Error(i(156,r.tag))}function Bi(n){n.flags|=4}function Bm(n,r,a,c,p){var y;if((y=(n.mode&32)!==0)&&(y=a===null?XS(r,c):XS(r,c)&&(c.src!==a.src||c.srcSet!==a.srcSet)),y){if(n.flags|=16777216,(p&335544128)===p)if(n.stateNode.complete)n.flags|=8192;else if(nS())n.flags|=8192;else throw yo=Wd,im}else n.flags&=-16777217}function w1(n,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!ZS(r))if(nS())n.flags|=8192;else throw yo=Wd,im}function vf(n,r){r!==null&&(n.flags|=4),n.flags&16384&&(r=n.tag!==22?nt():536870912,n.lanes|=r,bl|=r)}function $c(n,r){if(!Kt)switch(n.tailMode){case"visible":break;case"collapsed":for(var a=n.tail,c=null;a!==null;)a.alternate!==null&&(c=a),a=a.sibling;c===null?r||n.tail===null?n.tail=null:n.tail.sibling=null:c.sibling=null;break;default:for(r=n.tail,a=null;r!==null;)r.alternate!==null&&(a=r),r=r.sibling;a===null?n.tail=null:a.sibling=null}}function Nn(n){var r=n.alternate!==null&&n.alternate.child===n.child,a=0,c=0;if(r)for(var p=n.child;p!==null;)a|=p.lanes|p.childLanes,c|=p.subtreeFlags&1206910976,c|=p.flags&1206910976,p.return=n,p=p.sibling;else for(p=n.child;p!==null;)a|=p.lanes|p.childLanes,c|=p.subtreeFlags,c|=p.flags,p.return=n,p=p.sibling;return n.subtreeFlags|=c,n.childLanes=a,r}function dD(n,r,a){var c=r.pendingProps;switch(Zg(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Nn(r),null;case 1:return Nn(r),null;case 3:return a=r.stateNode,c=null,n!==null&&(c=n.memoizedState.cache),r.memoizedState.cache!==c&&(r.flags|=2048),_i(Zn),ot(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(n===null||n.child===null)&&(ol(r)?Bi(r):n===null||n.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Jg())),Nn(r),null;case 26:var p=r.type,y=r.memoizedState;return n===null?(Bi(r),y!==null?(Nn(r),w1(r,y)):(Nn(r),Bm(r,p,null,c,a))):y?y!==n.memoizedState?(Bi(r),Nn(r),w1(r,y)):(Nn(r),r.flags&=-16777217):(n=n.memoizedProps,n!==c&&Bi(r),Nn(r),Bm(r,p,n,c,a)),null;case 27:if(Ee(r),a=xe.current,p=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==c&&Bi(r);else{if(!c){if(r.stateNode===null)throw Error(i(166));return Nn(r),r.subtreeFlags&=-33554433,null}n=ke.current,ol(r)?e2(r):(n=BS(p,c,a),r.stateNode=n,Bi(r))}return Nn(r),r.subtreeFlags&=-33554433,null;case 5:if(Ee(r),p=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==c&&Bi(r);else{if(!c){if(r.stateNode===null)throw Error(i(166));return Nn(r),r.subtreeFlags&=-33554433,null}if(y=ke.current,ol(r))e2(r);else{var k=iu(xe.current);switch(y){case 1:y=k.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:y=k.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":y=k.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":y=k.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":y=k.createElement("div"),y.innerHTML="<script><\/script>",y=y.removeChild(y.firstChild);break;case"select":y=typeof c.is=="string"?k.createElement("select",{is:c.is}):k.createElement("select"),c.multiple?y.multiple=!0:c.size&&(y.size=c.size);break;default:y=typeof c.is=="string"?k.createElement(p,{is:c.is}):k.createElement(p)}}y[hn]=r,y[An]=c;e:for(k=r.child;k!==null;){if(k.tag===5||k.tag===6)y.appendChild(k.stateNode);else if(k.tag!==4&&k.tag!==27&&k.child!==null){k.child.return=k,k=k.child;continue}if(k===r)break e;for(;k.sibling===null;){if(k.return===null||k.return===r)break e;k=k.return}k.sibling.return=k.return,k=k.sibling}r.stateNode=y;e:switch(wr(y,p,c),p){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&Bi(r)}}return Nn(r),r.subtreeFlags&=-33554433,Bm(r,r.type,n===null?null:n.memoizedProps,r.pendingProps,a),null;case 6:if(n&&r.stateNode!=null)n.memoizedProps!==c&&Bi(r);else{if(typeof c!="string"&&r.stateNode===null)throw Error(i(166));if(n=xe.current,ol(r)){if(n=r.stateNode,a=r.memoizedProps,c=null,p=cr,p!==null)switch(p.tag){case 27:case 5:c=p.memoizedProps}n[hn]=r,n=!!(n.nodeValue===a||c!==null&&c.suppressHydrationWarning===!0||SS(n.nodeValue,a)),n||fa(r,!0)}else n=iu(n).createTextNode(c),n[hn]=r,r.stateNode=n}return Nn(r),null;case 31:if(a=r.memoizedState,n===null||n.memoizedState!==null){if(c=ol(r),a!==null){if(n===null){if(!c)throw Error(i(318));if(n=r.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(557));n[hn]=r}else co(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Nn(r),n=!1}else a=Jg(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=a),n=!0;if(!n)return r.flags&256?(us(r),r):(us(r),null);if((r.flags&128)!==0)throw Error(i(558))}return Nn(r),null;case 13:if(c=r.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(p=ol(r),c!==null&&c.dehydrated!==null){if(n===null){if(!p)throw Error(i(318));if(p=r.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(i(317));p[hn]=r}else co(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Nn(r),p=!1}else p=Jg(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=p),p=!0;if(!p)return r.flags&256?(us(r),r):(us(r),null)}return us(r),(r.flags&128)!==0?(r.lanes=a,r):(a=c!==null,n=n!==null&&n.memoizedState!==null,a&&(c=r.child,p=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(p=c.alternate.memoizedState.cachePool.pool),y=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(y=c.memoizedState.cachePool.pool),y!==p&&(c.flags|=2048)),a!==n&&a&&(r.child.flags|=8192),vf(r,r.updateQueue),Nn(r),null);case 4:return ot(),n===null&&E0(r.stateNode.containerInfo),r.flags|=67108864,Nn(r),null;case 10:return _i(r.type),Nn(r),null;case 19:if(hm(r),c=r.memoizedState,c===null)return Nn(r),null;if(p=(r.flags&128)!==0,y=c.rendering,y===null)if(p)$c(c,!1);else{if(Vn!==0||n!==null&&(n.flags&128)!==0)for(n=r.child;n!==null;){if(y=nf(n),y!==null){for(r.flags|=128,$c(c,!1),n=y.updateQueue,r.updateQueue=n,vf(r,n),r.subtreeFlags=0,n=a,a=r.child;a!==null;)Qx(a,n),a=a.sibling;return Vc(r,xr.current&1|2),Kt&&Li(r,c.treeForkCount),r.child}n=n.sibling}c.tail!==null&&Et()>Mf&&(r.flags|=128,p=!0,$c(c,!1),r.lanes=4194304)}else{if(!p)if(n=nf(y),n!==null){if(r.flags|=128,p=!0,n=n.updateQueue,r.updateQueue=n,vf(r,n),$c(c,!0),c.tail===null&&c.tailMode!=="collapsed"&&c.tailMode!=="visible"&&!y.alternate&&!Kt)return Nn(r),null}else 2*Et()-c.renderingStartTime>Mf&&a!==536870912&&(r.flags|=128,p=!0,$c(c,!1),r.lanes=4194304);c.isBackwards?(y.sibling=r.child,r.child=y):(n=c.last,n!==null?n.sibling=y:r.child=y,c.last=y)}if(c.tail!==null){n=c.tail;e:{for(a=n;a!==null;){if(a.alternate!==null){a=!1;break e}a=a.sibling}a=!0}return c.rendering=n,c.tail=n.sibling,c.renderingStartTime=Et(),n.sibling=null,y=xr.current,y=p?y&1|2:y&1,c.tailMode==="visible"||c.tailMode==="collapsed"||!a||Kt?Vc(r,y):(a=y,Ve(br,r),Ve(xr,a),Or===null&&(Or=r)),Kt&&Li(r,c.treeForkCount),n}return Nn(r),null;case 22:case 23:return us(r),dm(),c=r.memoizedState!==null,n!==null?n.memoizedState!==null!==c&&(r.flags|=8192):c&&(r.flags|=8192),c?(a&536870912)!==0&&(r.flags&128)===0&&(Nn(r),r.subtreeFlags&6&&(r.flags|=8192)):Nn(r),a=r.updateQueue,a!==null&&vf(r,a.retryQueue),a=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(a=n.memoizedState.cachePool.pool),c=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(c=r.memoizedState.cachePool.pool),c!==a&&(r.flags|=2048),n!==null&&ze(go),null;case 24:return a=null,n!==null&&(a=n.memoizedState.cache),r.memoizedState.cache!==a&&(r.flags|=2048),_i(Zn),Nn(r),null;case 25:return null;case 30:return r.flags|=33554432,Nn(r),null}throw Error(i(156,r.tag))}function fD(n,r){switch(Zg(r),r.tag){case 1:return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 3:return _i(Zn),ot(),n=r.flags,(n&65536)!==0&&(n&128)===0?(r.flags=n&-65537|128,r):null;case 26:case 27:case 5:return Ee(r),null;case 31:if(r.memoizedState!==null){if(us(r),r.alternate===null)throw Error(i(340));co()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 13:if(us(r),n=r.memoizedState,n!==null&&n.dehydrated!==null){if(r.alternate===null)throw Error(i(340));co()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 19:return hm(r),n=r.flags,n&65536?(r.flags=n&-65537|128,n=r.memoizedState,n!==null&&(n.rendering=null,n.tail=null),r.flags|=4,r):null;case 4:return ot(),null;case 10:return _i(r.type),null;case 22:case 23:return us(r),dm(),n!==null&&ze(go),n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 24:return _i(Zn),null;case 25:return null;default:return null}}function E1(n,r){switch(Zg(r),r.tag){case 3:_i(Zn),ot();break;case 26:case 27:case 5:Ee(r);break;case 4:ot();break;case 31:r.memoizedState!==null&&us(r);break;case 13:us(r);break;case 19:hm(r);break;case 10:_i(r.type);break;case 22:case 23:us(r),dm(),n!==null&&ze(go);break;case 24:_i(Zn)}}function Qc(n,r){try{var a=r.updateQueue,c=a!==null?a.lastEffect:null;if(c!==null){var p=c.next;a=p;do{if((a.tag&n)===n){c=void 0;var y=a.create,k=a.inst;c=y(),k.destroy=c}a=a.next}while(a!==p)}}catch(P){yn(r,r.return,P)}}function Sa(n,r,a){try{var c=r.updateQueue,p=c!==null?c.lastEffect:null;if(p!==null){var y=p.next;c=y;do{if((c.tag&n)===n){var k=c.inst,P=k.destroy;if(P!==void 0){k.destroy=void 0,p=r;var W=a,le=P;try{le()}catch(me){yn(p,W,me)}}}c=c.next}while(c!==y)}}catch(me){yn(r,r.return,me)}}function R1(n){var r=n.updateQueue;if(r!==null){var a=n.stateNode;try{h2(r,a)}catch(c){yn(n,n.return,c)}}}function C1(n,r,a){a.props=xo(n.type,n.memoizedProps),a.state=n.memoizedState;try{a.componentWillUnmount()}catch(c){yn(n,r,c)}}function ii(n,r){try{var a=n.ref;if(a!==null){switch(n.tag){case 26:case 27:case 5:var c=n.stateNode;break;case 30:var p=n.stateNode,y=ji(n.memoizedProps,p);(p.ref===null||p.ref.name!==y)&&(p.ref=DS(y)),c=p.ref;break;case 7:if(n.stateNode===null){var k=new gs(n);h(n.child,!1,nj,k,void 0,void 0),n.stateNode=k}c=n.stateNode;break;default:c=n.stateNode}typeof a=="function"?n.refCleanup=a(c):a.current=c}}catch(P){yn(n,r,P)}}function Sr(n,r){var a=n.ref,c=n.refCleanup;if(a!==null)if(typeof c=="function")try{c()}catch(p){yn(n,r,p)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(p){yn(n,r,p)}else a.current=null}function bf(n,r){if((n.tag===5||n.tag===27||n.tag===6)&&n.alternate===null&&r!==null)for(var a=0;a<r.length;a++)_S(n.stateNode,r[a])}function T1(n){for(var r=n.return;r!==null&&(Km(r)&&_S(n.stateNode,r.stateNode),!Vm(r));)r=r.return}function Xc(n){for(var r=n.return;r!==null&&(Km(r)&&rj(n.stateNode,r.stateNode),!Vm(r));)r=r.return}function Vm(n){return n.tag===5||n.tag===3||n.tag===27}function Km(n){return n&&n.tag===7&&n.stateNode!==null}function qm(n){var r=n.type,a=n.memoizedProps,c=n.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":a.autoFocus&&c.focus();break e;case"img":a.src?c.src=a.src:a.srcSet&&(c.srcset=a.srcSet)}}catch(p){yn(n,n.return,p)}}function Ym(n,r,a){try{var c=n.stateNode;_D(c,n.type,a,r),c[An]=r}catch(p){yn(n,n.return,p)}}function k1(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Oa(n.type)||n.tag===4}function Gm(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||k1(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&Oa(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function $m(n,r,a,c){var p=n.tag;if(p===5||p===6)p=n.stateNode,r?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(p,r):(r=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,r.appendChild(p),a=a._reactRootContainer,a!=null||r.onclick!==null||(r.onclick=zr)),bf(n,c),mt=!0;else if(p!==4&&(p===27&&(bf(n,c),c=null,Oa(n.type)&&(a=n.stateNode,r=null)),n=n.child,n!==null))for($m(n,r,a,c),n=n.sibling;n!==null;)$m(n,r,a,c),n=n.sibling}function xf(n,r,a,c){var p=n.tag;if(p===5||p===6)p=n.stateNode,r?a.insertBefore(p,r):a.appendChild(p),bf(n,c),mt=!0;else if(p!==4&&(p===27&&(bf(n,c),c=null,Oa(n.type)&&(a=n.stateNode)),n=n.child,n!==null))for(xf(n,r,a,c),n=n.sibling;n!==null;)xf(n,r,a,c),n=n.sibling}function O1(n){var r=n.stateNode,a=n.memoizedProps;try{for(var c=n.type,p=r.attributes;p.length;)r.removeAttributeNode(p[0]);wr(r,c,a),r[hn]=n,r[An]=a}catch(y){yn(n,n.return,y)}}var Sf=!1,ds=null;function A1(n){(n.tag===30||(n.subtreeFlags&33554432)!==0)&&(Sf=!0)}var ai=null;function M1(){var n=ai;return ai=null,n}var $r=0;function gl(n,r,a,c,p){return $r=0,N1(n.child,r,a,c,p)}function N1(n,r,a,c,p){for(var y=!1;n!==null;){if(n.tag===5){var k=n.stateNode;if(c!==null){var P=N0(k);c.push(P),P.view&&(y=!0)}else y||N0(k).view&&(y=!0);Sf=!0,MS(k,$r===0?r:r+"_"+$r,a),$r++}else(n.tag!==22||n.memoizedState===null)&&(n.tag===30&&p||N1(n.child,r,a,c,p)&&(y=!0));n=n.sibling}return y}function oi(n,r){for(;n!==null;)n.tag===5?NS(n.stateNode,n.memoizedProps):(n.tag!==22||n.memoizedState===null)&&(n.tag===30&&r||oi(n.child,r)),n=n.sibling}function wf(n){if((n.subtreeFlags&18874368)!==0)for(n=n.child;n!==null;){if((n.tag!==22||n.memoizedState===null)&&(wf(n),n.tag===30&&(n.flags&18874368)!==0&&n.stateNode.paired)){var r=n.memoizedProps;if(r.name==null||r.name==="auto")throw Error(i(544));var a=r.name;r=Ii(r.default,r.share),r!=="none"&&(gl(n,a,r,null,!1)||oi(n.child,!1))}n=n.sibling}}function Qm(n,r){if(n.tag===30){var a=n.stateNode,c=n.memoizedProps,p=ji(c,a),y=Ii(c.default,a.paired?c.share:c.enter);y!=="none"?gl(n,p,y,null,!1)?(wf(n),a.paired||r||El(n,c.onEnter)):oi(n.child,!1):wf(n)}else if((n.subtreeFlags&33554432)!==0)for(n=n.child;n!==null;)Qm(n,r),n=n.sibling;else wf(n)}function Xm(n){if(ds!==null&&ds.size!==0){var r=ds;if((n.subtreeFlags&18874368)!==0)for(n=n.child;n!==null;){if(n.tag!==22||n.memoizedState===null){if(n.tag===30&&(n.flags&18874368)!==0){var a=n.memoizedProps,c=a.name;if(c!=null&&c!=="auto"){var p=r.get(c);if(p!==void 0){var y=Ii(a.default,a.share);if(y!=="none"&&(gl(n,c,y,null,!1)?(y=n.stateNode,p.paired=y,y.paired=p,El(n,a.onShare)):oi(n.child,!1)),r.delete(c),r.size===0)break}}}Xm(n)}n=n.sibling}}}function Zm(n){if(n.tag===30){var r=n.memoizedProps,a=ji(r,n.stateNode),c=ds!==null?ds.get(a):void 0,p=Ii(r.default,c!==void 0?r.share:r.exit);p!=="none"&&(gl(n,a,p,null,!1)?c!==void 0?(p=n.stateNode,c.paired=p,p.paired=c,ds.delete(a),El(n,r.onShare)):El(n,r.onExit):oi(n.child,!1)),ds!==null&&Xm(n)}else if((n.subtreeFlags&33554432)!==0)for(n=n.child;n!==null;)Zm(n),n=n.sibling;else ds!==null&&Xm(n)}function D1(n){for(n=n.child;n!==null;){if(n.tag===30){var r=n.memoizedProps,a=ji(r,n.stateNode);r=Ii(r.default,r.update),n.flags&=-5,r!=="none"&&gl(n,a,r,n.memoizedState=[],!1)}else(n.subtreeFlags&33554432)!==0&&D1(n);n=n.sibling}}function Wm(n){if((n.subtreeFlags&18874368)!==0)for(n=n.child;n!==null;){if(n.tag!==22||n.memoizedState===null){if(n.tag===30&&(n.flags&18874368)!==0){var r=n.stateNode;r.paired!==null&&(r.paired=null,oi(n.child,!1))}Wm(n)}n=n.sibling}}function Ef(n){if(n.tag===30)n.stateNode.paired=null,oi(n.child,!1),Wm(n);else if((n.subtreeFlags&33554432)!==0)for(n=n.child;n!==null;)Ef(n),n=n.sibling;else Wm(n)}function j1(n){for(n=n.child;n!==null;)n.tag===30?oi(n.child,!1):(n.subtreeFlags&33554432)!==0&&j1(n),n=n.sibling}function Jm(n,r,a,c,p,y,k){for(var P=!1;r!==null;){if(r.tag===5){var W=r.stateNode;if(y!==null&&$r<y.length){var le=y[$r],me=N0(W);(le.view||me.view)&&(P=!0);var Te;if(Te=(n.flags&4)===0)if(me.clip)Te=!0;else{Te=le.rect;var ie=me.rect;Te=Te.y!==ie.y||Te.x!==ie.x||Te.height!==ie.height||Te.width!==ie.width}Te&&(n.flags|=4),me.abs?me=!le.abs:(le=le.rect,me=me.rect,me=le.height!==me.height||le.width!==me.width),me&&(n.flags|=32)}else n.flags|=32;(n.flags&4)!==0&&MS(W,$r===0?a:a+"_"+$r,p),P&&(n.flags&4)!==0||(ai===null&&(ai=[]),ai.push(W,$r===0?c:c+"_"+$r,r.memoizedProps)),$r++}else(r.tag!==22||r.memoizedState===null)&&(r.tag===30&&k?n.flags|=r.flags&32:Jm(n,r.child,a,c,p,y,k)&&(P=!0));r=r.sibling}return P}function I1(n,r){for(n=n.child;n!==null;){if(n.tag===30){var a=n.memoizedProps,c=n.stateNode,p=ji(a,c),y=Ii(a.default,a.update),k;k=n.memoizedState,n.memoizedState=null,c=n;var P=n.child;$r=0,p=Jm(c,P,p,p,y,k,!1),(n.flags&4)!==0&&p&&El(n,a.onUpdate)}else(n.subtreeFlags&33554432)!==0&&I1(n);n=n.sibling}}var ur=!1,gn=!1,li=!1,e0=!1,P1=typeof WeakSet=="function"?WeakSet:Set,dr=null,ci=!1,Zc=!1,Rf=!1,t0=!1;function hD(n,r,a){if(n=n.containerInfo,T0=jl,n=Ux(n),Fg(n)){if("selectionStart"in n)var c={start:n.selectionStart,end:n.selectionEnd};else e:{c=(c=n.ownerDocument)&&c.defaultView||window;var p=c.getSelection&&c.getSelection();if(p&&p.rangeCount!==0){c=p.anchorNode;var y=p.anchorOffset,k=p.focusNode;p=p.focusOffset;try{c.nodeType,k.nodeType}catch{c=null;break e}var P=0,W=-1,le=-1,me=0,Te=0,ie=n,he=null;t:for(;;){for(var Ye;ie!==c||y!==0&&ie.nodeType!==3||(W=P+y),ie!==k||p!==0&&ie.nodeType!==3||(le=P+p),ie.nodeType===3&&(P+=ie.nodeValue.length),(Ye=ie.firstChild)!==null;)he=ie,ie=Ye;for(;;){if(ie===n)break t;if(he===c&&++me===y&&(W=P),he===k&&++Te===p&&(le=P),(Ye=ie.nextSibling)!==null)break;ie=he,he=ie.parentNode}ie=Ye}c=W===-1||le===-1?null:{start:W,end:le}}else c=null}c=c||{start:0,end:0}}else c=null;for(k0={focusedElem:n,selectionRange:c},jl=!1,a=(a&335544064)===a,dr=r,r=a?9270:1024;dr!==null;){if(n=dr,a&&(c=n.deletions,c!==null))for(y=0;y<c.length;y++)a&&Zm(c[y]);if(n.alternate===null&&(n.flags&2)!==0)a&&A1(n),Cf(a);else{if(n.tag===22){if(c=n.alternate,n.memoizedState!==null){c!==null&&c.memoizedState===null&&a&&Zm(c),Cf(a);continue}else if(c!==null&&c.memoizedState!==null){a&&A1(n),Cf(a);continue}}c=n.child,(n.subtreeFlags&r)!==0&&c!==null?(c.return=n,dr=c):(a&&D1(n),Cf(a))}}ds=null}function Cf(n){for(;dr!==null;){var r=dr,a=n,c=r.alternate,p=r.flags;switch(r.tag){case 0:case 11:case 15:break;case 1:if((p&1024)!==0&&c!==null){a=void 0,p=c.memoizedProps,c=c.memoizedState;var y=r.stateNode;try{var k=xo(r.type,p);a=y.getSnapshotBeforeUpdate(k,c),y.__reactInternalSnapshotBeforeUpdate=a}catch(P){yn(r,r.return,P)}}break;case 3:if((p&1024)!==0){if(c=r.stateNode.containerInfo,a=c.nodeType,a===9)I0(c);else if(a===1)switch(c.nodeName){case"HEAD":case"HTML":case"BODY":I0(c);break;default:c.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:a&&c!==null&&(a=ji(c.memoizedProps,c.stateNode),p=r.memoizedProps,p=Ii(p.default,p.update),p!=="none"&&gl(c,a,p,c.memoizedState=[],!0));break;default:if((p&1024)!==0)throw Error(i(163))}if(c=r.sibling,c!==null){c.return=r.return,dr=c;break}dr=r.return}}function L1(n,r,a){var c=a.flags;switch(a.tag){case 0:case 11:case 15:ui(n,a),c&4&&Qc(5,a);break;case 1:if(ui(n,a),c&4)if(n=a.stateNode,r===null)try{n.componentDidMount()}catch(k){yn(a,a.return,k)}else{var p=xo(a.type,r.memoizedProps);r=r.memoizedState;try{n.componentDidUpdate(p,r,n.__reactInternalSnapshotBeforeUpdate)}catch(k){yn(a,a.return,k)}}c&64&&R1(a),c&512&&ii(a,a.return);break;case 3:if(ui(n,a),c&64&&(n=a.updateQueue,n!==null)){if(r=null,a.child!==null)switch(a.child.tag){case 27:case 5:r=a.child.stateNode;break;case 1:r=a.child.stateNode}try{h2(n,r)}catch(k){yn(a,a.return,k)}}break;case 27:r===null&&c&4&&O1(a);case 26:case 5:ui(n,a),r===null&&c&4&&qm(a),c&512&&ii(a,a.return);break;case 12:ui(n,a);break;case 31:ui(n,a),c&4&&H1(n,a);break;case 13:ui(n,a),c&4&&F1(n,a),c&64&&(n=a.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(a=CD.bind(null,a),aj(n,a))));break;case 22:if(c=a.memoizedState!==null||ur,!c){var y=r!==null&&r.memoizedState!==null||gn;r=ur,p=gn,ur=c,(gn=y)&&!p?(c=2,(a.subtreeFlags&8772)!==0&&(c|=1),Vs(n,a,c)):ui(n,a),ur=r,gn=p}break;case 30:ui(n,a),c&512&&ii(a,a.return);break;case 7:c&512&&ii(a,a.return);default:ui(n,a)}}function n0(n,r){for(n=n.child;n!==null;)z1(n,r),n=n.sibling}function z1(n,r){switch(n.tag){case 5:case 26:try{var a=n.stateNode;if(r){var c=a.style;typeof c.setProperty=="function"?c.setProperty("display","none","important"):c.display="none"}else{var p=n.stateNode,y=n.memoizedProps.style,k=y!=null&&y.hasOwnProperty("display")?y.display:null;p.style.display=k==null||typeof k=="boolean"?"":(""+k).trim()}}catch(W){yn(n,n.return,W)}r0(n,r);break;case 6:try{n.stateNode.nodeValue=r?"":n.memoizedProps,mt=!0}catch(W){yn(n,n.return,W)}break;case 18:try{var P=n.stateNode;r?AS(P,!0):AS(n.stateNode,!1)}catch(W){yn(n,n.return,W)}break;case 22:case 23:n.memoizedState===null&&n0(n,r);break;default:n0(n,r)}}function r0(n,r){if(n.subtreeFlags&67108864)for(n=n.child;n!==null;){e:{var a=n,c=r;switch(a.tag){case 4:z1(a,c);break e;case 22:a.memoizedState===null&&r0(a,c);break e;default:r0(a,c)}}n=n.sibling}}function _1(n){var r=n.alternate;r!==null&&(n.alternate=null,_1(r)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(r=n.stateNode,r!==null&&qn(r)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var In=null,Qr=!1;function Fs(n,r,a){for(a=a.child;a!==null;)U1(n,r,a),a=a.sibling}function U1(n,r,a){if(_e&&typeof _e.onCommitFiberUnmount=="function")try{_e.onCommitFiberUnmount(Ie,a)}catch{}switch(a.tag){case 26:gn||Sr(a,r),Fs(n,r,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&!gn&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:gn||Sr(a,r),Xc(a);var c=In,p=Qr;Oa(a.type)&&(In=a.stateNode,Qr=!1),Fs(n,r,a),VS(a.stateNode,a.type,a.memoizedProps),In=c,Qr=p;break;case 5:gn||Sr(a,r),Xc(a);case 6:if(a.tag===6&&Xc(a),c=In,p=Qr,In=null,Fs(n,r,a),In=c,Qr=p,In!==null)if(Qr)try{(In.nodeType===9?In.body:In.nodeName==="HTML"?In.ownerDocument.body:In).removeChild(a.stateNode),mt=!0}catch(y){yn(a,r,y)}else try{In.removeChild(a.stateNode),mt=!0}catch(y){yn(a,r,y)}break;case 18:In!==null&&(Qr?(n=In,OS(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,a.stateNode),Il(n)):OS(In,a.stateNode));break;case 4:c=In,p=Qr,In=a.stateNode.containerInfo,Qr=!0,Fs(n,r,a),In=c,Qr=p;break;case 0:case 11:case 14:case 15:Sa(2,a,r),gn||Sa(4,a,r),Fs(n,r,a);break;case 1:gn||(Sr(a,r),c=a.stateNode,typeof c.componentWillUnmount=="function"&&C1(a,r,c)),Fs(n,r,a);break;case 21:Fs(n,r,a);break;case 22:gn=(c=gn)||a.memoizedState!==null,Fs(n,r,a),gn=c;break;case 30:Sr(a,r),Fs(n,r,a);break;case 7:gn||Sr(a,r),Fs(n,r,a);break;default:Fs(n,r,a)}}function H1(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{Il(n)}catch(a){yn(r,r.return,a)}}}function F1(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{Il(n)}catch(a){yn(r,r.return,a)}}function pD(n){switch(n.tag){case 31:case 13:case 19:var r=n.stateNode;return r===null&&(r=n.stateNode=new P1),r;case 22:return n=n.stateNode,r=n._retryCache,r===null&&(r=n._retryCache=new P1),r;default:throw Error(i(435,n.tag))}}function Tf(n,r){var a=pD(n);r.forEach(function(c){if(!a.has(c)){a.add(c);var p=TD.bind(null,n,c);c.then(p,p)}})}function Hr(n,r,a){var c=r.deletions;if(c!==null)for(var p=0;p<c.length;p++){var y=c[p],k=n,P=r,W=P;e:for(;W!==null;){switch(W.tag){case 27:if(Oa(W.type)){In=W.stateNode,Qr=!1;break e}break;case 5:In=W.stateNode,Qr=!1;break e;case 3:case 4:In=W.stateNode.containerInfo,Qr=!0;break e}W=W.return}if(In===null)throw Error(i(160));U1(k,P,y),In=null,Qr=!1,k=y.alternate,k!==null&&(k.return=null),y.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)B1(r,n,a),r=r.sibling}var Bs=null;function B1(n,r,a){var c=n.alternate,p=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:if(p&4&&(c=n.updateQueue,c=c!==null?c.events:null,c!==null))for(var y=0;y<c.length;y++){var k=c[y];k.ref.impl=k.nextImpl}Hr(r,n,a),Fr(n),p&4&&(Sa(3,n,n.return),Qc(3,n),Sa(5,n,n.return));break;case 1:Hr(r,n,a),Fr(n),p&512&&(gn||c===null||Sr(c,c.return)),p&64&&ur&&(n=n.updateQueue,n!==null&&(r=n.callbacks,r!==null&&(a=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=a===null?r:a.concat(r))));break;case 26:if(y=Bs,Hr(r,n,a),Fr(n),p&512&&(gn||c===null||Sr(c,c.return)),p&4)if(p=c!==null?c.memoizedState:null,a=n.memoizedState,c===null)if(a===null)if(n.stateNode===null)if(ur)n.stateNode=CS(n.type,n.memoizedProps,r.containerInfo,n);else{e:{r=n.type,a=n.memoizedProps,p=y.ownerDocument||y;t:switch(r){case"title":c=p.getElementsByTagName("title")[0],(!c||c[Ss]||c[hn]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=p.createElement(r),p.head.insertBefore(c,p.querySelector("head > title"))),wr(c,r,a),c[hn]=n,we(c),r=c;break e;case"link":if(y=QS("link","href",p).get(r+(a.href||""))){for(k=0;k<y.length;k++)if(c=y[k],c.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&c.getAttribute("rel")===(a.rel==null?null:a.rel)&&c.getAttribute("title")===(a.title==null?null:a.title)&&c.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){y.splice(k,1);break t}}c=p.createElement(r),wr(c,r,a),p.head.appendChild(c);break;case"meta":if(y=QS("meta","content",p).get(r+(a.content||""))){for(k=0;k<y.length;k++)if(c=y[k],c.getAttribute("content")===(a.content==null?null:""+a.content)&&c.getAttribute("name")===(a.name==null?null:a.name)&&c.getAttribute("property")===(a.property==null?null:a.property)&&c.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&c.getAttribute("charset")===(a.charSet==null?null:a.charSet)){y.splice(k,1);break t}}c=p.createElement(r),wr(c,r,a),p.head.appendChild(c);break;default:throw Error(i(468,r))}c[hn]=n,we(c),r=c}n.stateNode=r}else ur||F0(y,n.type,n.stateNode);else n.stateNode=$S(y,a,n.memoizedProps);else p!==a?(p===null?(r=c.stateNode,r===null||gn||r.parentNode.removeChild(r)):p.count--,a===null?ur||F0(y,n.type,n.stateNode):$S(y,a,n.memoizedProps)):a===null&&n.stateNode!==null&&Ym(n,n.memoizedProps,c.memoizedProps);break;case 27:Hr(r,n,a),Fr(n),p&512&&(gn||c===null||Sr(c,c.return)),c!==null&&p&4&&Ym(n,n.memoizedProps,c.memoizedProps);break;case 5:if(y=li,li=!1,Hr(r,n,a),li=y,Fr(n),p&512&&(gn||c===null||Sr(c,c.return)),n.flags&32){r=n.stateNode;try{Lr(r,""),mt=!0}catch(me){yn(n,n.return,me)}}p&4&&n.stateNode!=null&&(r=n.memoizedProps,Ym(n,r,c!==null?c.memoizedProps:r)),p&1024&&(e0=!0);break;case 6:if(Hr(r,n,a),Fr(n),p&4){if(n.stateNode===null)throw Error(i(162));r=n.memoizedProps,a=n.stateNode;try{a.nodeValue=r,mt=!0}catch(me){yn(n,n.return,me)}}break;case 3:if(mt=!1,Ff=null,y=Bs,Bs=au(r.containerInfo),Hr(r,n,a),Bs=y,Fr(n),p&4&&c!==null&&c.memoizedState.isDehydrated)try{Il(r.containerInfo)}catch(me){yn(n,n.return,me)}e0&&(e0=!1,V1(n)),mt=!1;break;case 4:p=li,li=ur,c=ir(),y=Bs,Bs=au(n.stateNode.containerInfo),Hr(r,n,a),Fr(n),Bs=y,mt&&Zc&&(Rf=!0),mt=c,li=p;break;case 12:Hr(r,n,a),Fr(n);break;case 31:Hr(r,n,a),Fr(n),p&4&&(r=n.updateQueue,r!==null&&(n.updateQueue=null,Tf(n,r)));break;case 13:Hr(r,n,a),Fr(n),n.child.flags&8192&&n.memoizedState!==null!=(c!==null&&c.memoizedState!==null)&&(Af=Et()),p&4&&(r=n.updateQueue,r!==null&&(n.updateQueue=null,Tf(n,r)));break;case 22:y=n.memoizedState!==null,k=c!==null&&c.memoizedState!==null;var P=ur,W=gn,le=li;ur=P||y,li=le||y,gn=W||k,Hr(r,n,a),gn=W,li=le,ur=P,Fr(n),p&8192&&(r=n.stateNode,r._visibility=y?r._visibility&-2:r._visibility|1,!y||c===null||k||ur||gn||(r=k||gn,a=ur,c=gn,ur=y||ur,gn=r,wa(n,2),ur=a,gn=c),!y&&li||n0(n,y)),p&4&&(r=n.updateQueue,r!==null&&(a=r.retryQueue,a!==null&&(r.retryQueue=null,Tf(n,a))));break;case 19:Hr(r,n,a),Fr(n),p&4&&(r=n.updateQueue,r!==null&&(n.updateQueue=null,Tf(n,r)));break;case 30:p&512&&(gn||c===null||Sr(c,c.return)),p=ir(),y=Zc,k=(a&335544064)===a,P=n.memoizedProps,Zc=k&&Ii(P.default,P.update)!=="none",Hr(r,n,a),Fr(n),k&&c!==null&&mt&&(n.flags|=4),Zc=y,mt=p;break;case 21:break;case 7:p&512&&(gn||c===null||Sr(c,c.return)),c&&c.stateNode!==null&&(c.stateNode._fragmentFiber=n);default:Hr(r,n,a),Fr(n)}}function Fr(n){var r=n.flags;if(r&2){try{for(var a,c=n.return;c!==null;){if(k1(c)){a=c;break}c=c.return}c=null;for(var p=n.return;p!==null;){if(Km(p)){var y=p.stateNode;c===null?c=[y]:c.push(y)}if(Vm(p))break;p=p.return}var k=c;if(a==null)throw Error(i(160));switch(a.tag){case 27:var P=a.stateNode,W=Gm(n);xf(n,W,P,k);break;case 5:var le=a.stateNode;a.flags&32&&(Lr(le,""),a.flags&=-33);var me=Gm(n);xf(n,me,le,k);break;case 3:case 4:var Te=a.stateNode.containerInfo,ie=Gm(n);$m(n,ie,Te,k);break;default:throw Error(i(161))}}catch(he){yn(n,n.return,he)}n.flags&=-3}r&4096&&(n.flags&=-4097)}function V1(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var r=n;V1(r),r.tag===5&&r.flags&1024&&(r=r.stateNode,jl=!0,r.reset(),jl=!1),n=n.sibling}}function ml(n,r){if(r.subtreeFlags&9270)for(r=r.child;r!==null;)K1(r,n),r=r.sibling;else I1(r)}function K1(n,r){var a=n.alternate;if(a===null)Qm(n,!1);else switch(n.tag){case 3:if(t0=ci=!1,M1(),ml(r,n),!ci&&!Rf){if(n=ai,n!==null)for(var c=0;c<n.length;c+=3){a=n[c];var p=n[c+1];NS(a,n[c+2]),a=a.ownerDocument.documentElement,a!==null&&a.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+p+")"})}n=r.containerInfo,n=n.nodeType===9?n.documentElement:n.ownerDocument.documentElement,n!==null&&n.style.viewTransitionName===""&&(n.style.viewTransitionName="none",n.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),n.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),t0=!0}ai=null;break;case 5:ml(r,n);break;case 4:c=ci,ci=!1,ml(r,n),ci&&(Rf=!0),ci=c;break;case 22:n.memoizedState===null&&(a.memoizedState!==null?Qm(n,!1):ml(r,n));break;case 30:c=ci,p=M1(),ci=!1,ml(r,n),ci&&(n.flags|=4);var y=n.memoizedProps,k=n.stateNode;r=ji(y,k),k=ji(a.memoizedProps,k);var P=Ii(y.default,y.update);P==="none"?r=!1:(y=a.memoizedState,a.memoizedState=null,a=n.child,$r=0,r=Jm(n,a,r,k,P,y,!0),$r!==(y===null?0:y.length)&&(n.flags|=32)),(n.flags&4)!==0&&r?(El(n,n.memoizedProps.onUpdate),ai=p):p!==null&&(p.push.apply(p,ai),ai=p),ci=(n.flags&32)!==0?!0:c;break;default:ml(r,n)}}function ui(n,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)L1(n,r.alternate,r),r=r.sibling}function wa(n,r){for(n=n.child;n!==null;){var a=n,c=r;switch(a.tag){case 0:case 11:case 14:case 15:Sa(4,a,a.return),wa(a,c);break;case 1:Sr(a,a.return);var p=a.stateNode;typeof p.componentWillUnmount=="function"&&C1(a,a.return,p),wa(a,c);break;case 27:(c&2)!==0&&VS(a.stateNode,a.type,a.memoizedProps);case 5:Sr(a,a.return),a.tag!==5&&a.tag!==27||Xc(a),wa(a,c);break;case 6:Xc(a);break;case 26:Sr(a,a.return),p=a.stateNode,a.memoizedState!==null||p===null||gn||p.parentNode.removeChild(p),wa(a,c);break;case 22:a.memoizedState===null&&wa(a,c);break;case 30:Sr(a,a.return),wa(a,c);break;case 7:Sr(a,a.return);default:wa(a,c)}n=n.sibling}}function Vs(n,r,a){for(a=(r.subtreeFlags&8772)!==0?a:a&-2,r=r.child;r!==null;){var c=r.alternate,p=n,y=r,k=y.flags,P=(a&1)!==0;switch(y.tag){case 0:case 11:case 15:Vs(p,y,a),Qc(4,y);break;case 1:if(Vs(p,y,a),c=y,p=c.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(me){yn(c,c.return,me)}if(c=y,p=c.updateQueue,p!==null){var W=c.stateNode;try{var le=p.shared.hiddenCallbacks;if(le!==null)for(p.shared.hiddenCallbacks=null,p=0;p<le.length;p++)f2(le[p],W)}catch(me){yn(c,c.return,me)}}P&&k&64&&R1(y),ii(y,y.return);break;case 27:(a&2)!==0&&O1(y);case 5:y.tag!==5&&y.tag!==27||T1(y),Vs(p,y,a),P&&c===null&&k&4&&qm(y),ii(y,y.return);break;case 6:T1(y);break;case 26:W=y.stateNode,y.memoizedState!==null||W===null||ur||F0(au(W.ownerDocument),y.type,W),Vs(p,y,a),P&&c===null&&k&4&&qm(y),ii(y,y.return);break;case 12:Vs(p,y,a);break;case 31:Vs(p,y,a),P&&k&4&&H1(p,y);break;case 13:Vs(p,y,a),P&&k&4&&F1(p,y);break;case 22:y.memoizedState===null&&Vs(p,y,a),ii(y,y.return);break;case 30:Vs(p,y,a),ii(y,y.return);break;case 7:ii(y,y.return);default:Vs(p,y,a)}r=r.sibling}}function s0(n,r){var a=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(a=n.memoizedState.cachePool.pool),n=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(n=r.memoizedState.cachePool.pool),n!==a&&(n!=null&&n.refCount++,a!=null&&Lc(a))}function i0(n,r){n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&Lc(n))}function Os(n,r,a,c){var p=(a&335544064)===a;if(r.subtreeFlags&(p?10262:10256))for(r=r.child;r!==null;)q1(n,r,a,c),r=r.sibling;else p&&j1(r)}function q1(n,r,a,c){var p=(a&335544064)===a;p&&r.alternate===null&&r.return!==null&&r.return.alternate!==null&&Ef(r);var y=r.flags;switch(r.tag){case 0:case 11:case 15:Os(n,r,a,c),y&2048&&Qc(9,r);break;case 1:Os(n,r,a,c);break;case 3:Os(n,r,a,c),p&&t0&&(n=n.containerInfo,n=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,n.style.viewTransitionName==="root"&&(n.style.viewTransitionName=""),n=n.ownerDocument.documentElement,n!==null&&n.style.viewTransitionName==="none"&&(n.style.viewTransitionName="")),y&2048&&(y=null,r.alternate!==null&&(y=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==y&&(r.refCount++,y!=null&&Lc(y)));break;case 12:if(y&2048){Os(n,r,a,c),y=r.stateNode;try{var k=r.memoizedProps,P=k.id,W=k.onPostCommit;typeof W=="function"&&W(P,r.alternate===null?"mount":"update",y.passiveEffectDuration,-0)}catch(le){yn(r,r.return,le)}}else Os(n,r,a,c);break;case 31:Os(n,r,a,c);break;case 13:Os(n,r,a,c);break;case 23:break;case 22:k=r.stateNode,P=r.alternate,r.memoizedState!==null?(p&&P!==null&&P.memoizedState===null&&Ef(P),k._visibility&2?Os(n,r,a,c):Wc(n,r)):(p&&P!==null&&P.memoizedState!==null&&Ef(r),k._visibility&2?Os(n,r,a,c):(k._visibility|=2,yl(n,r,a,c,(r.subtreeFlags&10256)!==0||!1))),y&2048&&s0(P,r);break;case 24:Os(n,r,a,c),y&2048&&i0(r.alternate,r);break;case 30:p&&(y=r.alternate,y!==null&&(oi(y.child,!0),oi(r.child,!0))),Os(n,r,a,c);break;default:Os(n,r,a,c)}}function yl(n,r,a,c,p){for(p=p&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var y=n,k=r,P=a,W=c,le=k.flags;switch(k.tag){case 0:case 11:case 15:yl(y,k,P,W,p),Qc(8,k);break;case 23:break;case 22:var me=k.stateNode;k.memoizedState!==null?me._visibility&2?yl(y,k,P,W,p):Wc(y,k):(me._visibility|=2,yl(y,k,P,W,p)),p&&le&2048&&s0(k.alternate,k);break;case 24:yl(y,k,P,W,p),p&&le&2048&&i0(k.alternate,k);break;default:yl(y,k,P,W,p)}r=r.sibling}}function Wc(n,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var a=n,c=r,p=c.flags;switch(c.tag){case 22:Wc(a,c),p&2048&&s0(c.alternate,c);break;case 24:Wc(a,c),p&2048&&i0(c.alternate,c);break;default:Wc(a,c)}r=r.sibling}}var So=8192;function wo(n,r,a){if(n.subtreeFlags&So)for(n=n.child;n!==null;)Y1(n,r,a),n=n.sibling}function Y1(n,r,a){switch(n.tag){case 26:wo(n,r,a),n.flags&So&&(n.memoizedState!==null?xj(a,Bs,n.memoizedState,n.memoizedProps):(n=n.stateNode,(r&335544128)===r&&JS(a,n)));break;case 5:wo(n,r,a),n.flags&So&&(n=n.stateNode,(r&335544128)===r&&JS(a,n));break;case 3:case 4:var c=Bs;Bs=au(n.stateNode.containerInfo),wo(n,r,a),Bs=c;break;case 22:n.memoizedState===null&&(c=n.alternate,c!==null&&c.memoizedState!==null?(c=So,So=16777216,wo(n,r,a),So=c):wo(n,r,a));break;case 30:if((n.flags&So)!==0&&(c=n.memoizedProps.name,c!=null&&c!=="auto")){var p=n.stateNode;p.paired=null,ds===null&&(ds=new Map),ds.set(c,p)}wo(n,r,a);break;default:wo(n,r,a)}}function G1(n){var r=n.alternate;if(r!==null&&(n=r.child,n!==null)){r.child=null;do r=n.sibling,n.sibling=null,n=r;while(n!==null)}}function Jc(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var a=0;a<r.length;a++){var c=r[a];dr=c,Q1(c,n)}G1(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)$1(n),n=n.sibling}function $1(n){switch(n.tag){case 0:case 11:case 15:Jc(n),n.flags&2048&&Sa(9,n,n.return);break;case 3:Jc(n);break;case 12:Jc(n);break;case 22:var r=n.stateNode;n.memoizedState!==null&&r._visibility&2&&(n.return===null||n.return.tag!==13)?(r._visibility&=-3,kf(n)):Jc(n);break;default:Jc(n)}}function kf(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var a=0;a<r.length;a++){var c=r[a];dr=c,Q1(c,n)}G1(n)}for(n=n.child;n!==null;){switch(r=n,r.tag){case 0:case 11:case 15:Sa(8,r,r.return),kf(r);break;case 22:a=r.stateNode,a._visibility&2&&(a._visibility&=-3,kf(r));break;default:kf(r)}n=n.sibling}}function Q1(n,r){for(;dr!==null;){var a=dr;switch(a.tag){case 0:case 11:case 15:Sa(8,a,r);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var c=a.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:Lc(a.memoizedState.cache)}if(c=a.child,c!==null)c.return=a,dr=c;else e:for(a=n;dr!==null;){c=dr;var p=c.sibling,y=c.return;if(_1(c),c===a){dr=null;break e}if(p!==null){p.return=y,dr=p;break e}dr=y}}}var gD={getCacheForType:function(n){var r=vr(Zn),a=r.data.get(n);return a===void 0&&(a=n(),r.data.set(n,a)),a},cacheSignal:function(){return vr(Zn).controller.signal}},mD=typeof WeakMap=="function"?WeakMap:Map,un=0,kn=null,$t=null,Wt=0,mn=0,fs=null,Ea=!1,vl=!1,a0=!1,Vi=0,Vn=0,Ra=0,Eo=0,Of=0,hs=0,bl=0,eu=null,Xr=null,o0=!1,Af=0,X1=0,Mf=1/0,Nf=null,Ca=null,_n=0,Ks=null,Ro=null,di=0,l0=0,c0=null,Z1=null,xl=null,Sl=null,wl=null,tu=0,Df=null;function ps(){return(un&2)!==0&&Wt!==0?Wt&-Wt:fe.T!==null?b0():Tn()}function W1(){if(hs===0)if((Wt&536870912)===0||Kt){var n=ve;ve<<=1,(ve&3932160)===0&&(ve=262144),hs=n}else hs=536870912;return n=br.current,n!==null&&(n.flags|=32),hs}function El(n,r){if(r!=null){var a=n.stateNode,c=a.ref;c===null&&(c=a.ref=DS(ji(n.memoizedProps,a))),Sl===null&&(Sl=[]),Sl.push(r.bind(null,c))}}function Zr(n,r,a){(n===kn&&(mn===2||mn===9)||n.cancelPendingCommit!==null)&&(Rl(n,0),Ta(n,Wt,hs,!1)),ft(n,a),((un&2)===0||n!==kn)&&(n===kn&&((un&2)===0&&(Eo|=a),Vn===4&&Ta(n,Wt,hs,!1)),fi(n))}function J1(n,r,a){if((un&6)!==0)throw Error(i(327));var c=!a&&(r&127)===0&&(r&n.expiredLanes)===0||Xe(n,r),p=c?bD(n,r):d0(n,r,!0),y=c;do{if(p===0){vl&&!c&&Ta(n,r,0,!1);break}else{if(a=n.current.alternate,y&&!yD(a)){p=d0(n,r,!1),y=!1;continue}if(p===2){if(y=r,n.errorRecoveryDisabledLanes&y)var k=0;else k=n.pendingLanes&-536870913,k=k!==0?k:k&536870912?536870912:0;if(k!==0){r=k;e:{var P=n;p=eu;var W=P.current.memoizedState.isDehydrated;if(W&&(Rl(P,k).flags|=256),k=d0(P,k,!1),k!==2&&k!==6){if(a0&&!W){P.errorRecoveryDisabledLanes|=y,Eo|=y,p=4;break e}y=Xr,Xr=p,y!==null&&(Xr===null?Xr=y:Xr.push.apply(Xr,y))}p=k}if(y=!1,p!==2)continue}}if(p===1){Rl(n,0),Ta(n,r,0,!0);break}e:{switch(c=n,y=p,y){case 0:case 1:throw Error(i(345));case 4:if((r&4194048)!==r&&(r&62914560)!==r)break;case 6:Ta(c,r,hs,!Ea);break e;case 2:Xr=null;break;case 3:case 5:break;default:throw Error(i(329))}if((r&62914560)===r&&(p=Af+300-Et(),10<p)){if(Ta(c,r,hs,!Ea),Ke(c,0,!0)!==0)break e;di=r,c.timeoutHandle=M0(eS.bind(null,c,a,Xr,Nf,o0,r,hs,Eo,bl,Ea,y,"Throttled",-0,0),p);break e}eS(c,a,Xr,Nf,o0,r,hs,Eo,bl,Ea,y,null,-0,0)}}break}while(!0);fi(n)}function eS(n,r,a,c,p,y,k,P,W,le,me,Te,ie,he){n.timeoutHandle=-1;var Ye=r.subtreeFlags,it=(y&335544064)===y;if(Te=null,(it||Ye&8192||(Ye&16785408)===16785408)&&(Te={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:zr},ds=null,Y1(r,y,Te),it&&(Ye=Te,it=n.containerInfo,it=(it.nodeType===9?it:it.ownerDocument).__reactViewTransition,it!=null&&(Ye.count++,Ye.waitingForViewTransition=!0,Ye=cu.bind(Ye),it.finished.then(Ye,Ye))),Ye=(y&62914560)===y?Af-Et():(y&4194048)===y?X1-Et():0,Ye=Sj(Te,Ye),Ye!==null)){di=y,n.cancelPendingCommit=Ye(lS.bind(null,n,r,y,a,c,p,k,P,W,le,me,Te,null,ie,he)),Ta(n,y,k,!le);return}lS(n,r,y,a,c,p,k,P,W,le,me,Te)}function yD(n){for(var r=n;;){var a=r.tag;if((a===0||a===11||a===15)&&r.flags&16384&&(a=r.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var c=0;c<a.length;c++){var p=a[c],y=p.getSnapshot;p=p.value;try{if(!cs(y(),p))return!1}catch{return!1}}if(a=r.child,r.subtreeFlags&16384&&a!==null)a.return=r,r=a;else{if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function Ta(n,r,a,c){r=Qe(n,r),r&=~Of,r&=~Eo,n.suspendedLanes|=r,n.pingedLanes&=~r,c&&(n.warmLanes|=r),c=n.expirationTimes;for(var p=r;0<p;){var y=31-tt(p),k=1<<y;c[y]=-1,p&=~k}a!==0&&Bt(n,a,r)}function jf(){return(un&6)===0?(nu(0),!1):!0}function u0(){if($t!==null){if(mn===0)var n=$t.return;else n=$t,zi=uo=null,vm(n),ul=null,Uc=0,n=$t;for(;n!==null;)E1(n.alternate,n),n=n.return;$t=null}}function Rl(n,r){var a=n.timeoutHandle;return a!==-1&&(n.timeoutHandle=-1,FD(a)),a=n.cancelPendingCommit,a!==null&&(n.cancelPendingCommit=null,a()),di=0,u0(),kn=n,$t=a=Pi(n.current,null),Wt=r,mn=0,fs=null,Ea=!1,vl=Xe(n,r),a0=!1,bl=hs=Of=Eo=Ra=Vn=0,Xr=eu=null,o0=!1,Vi=Qe(n,r),Hd(),a}function tS(n,r){It=null,fe.H=ff,r===cl||r===Zd?(r=l2(),mn=3):r===im?(r=l2(),mn=4):mn=r===jm?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,fs=r,$t===null&&(Vn=1,hf(n,Rs(r,n.current)))}function nS(){var n=br.current;return n===null?!0:(Wt&4194048)===Wt?Or===null:(Wt&62914560)===Wt||(Wt&536870912)!==0?n===Or:!1}function rS(){var n=fe.H;return fe.H=ff,n===null?ff:n}function sS(){var n=fe.A;return fe.A=gD,n}function If(){Vn=4,Ea||(Wt&4194048)!==Wt&&br.current!==null||(vl=!0),(Ra&134217727)===0&&(Eo&134217727)===0||kn===null||Ta(kn,Wt,hs,!1)}function d0(n,r,a){var c=un;un|=2;var p=rS(),y=sS();(kn!==n||Wt!==r)&&(Nf=null,Rl(n,r)),r=!1;var k=Vn;e:do try{if(mn!==0&&$t!==null){var P=$t,W=fs;switch(mn){case 8:u0(),k=6;break e;case 3:case 2:case 9:case 6:br.current===null&&(r=!0);var le=mn;if(mn=0,fs=null,Cl(n,P,W,le),a&&vl){k=0;break e}break;default:le=mn,mn=0,fs=null,Cl(n,P,W,le)}}vD(),k=Vn;break}catch(me){tS(n,me)}while(!0);return r&&n.shellSuspendCounter++,zi=uo=null,un=c,fe.H=p,fe.A=y,$t===null&&(kn=null,Wt=0,Hd()),k}function vD(){for(;$t!==null;)iS($t)}function bD(n,r){var a=un;un|=2;var c=rS(),p=sS();kn!==n||Wt!==r?(Nf=null,Mf=Et()+500,Rl(n,r)):vl=Xe(n,r);e:do try{if(mn!==0&&$t!==null){r=$t;var y=fs;t:switch(mn){case 1:mn=0,fs=null,Cl(n,r,y,1);break;case 2:case 9:if(a2(y)){mn=0,fs=null,aS(r);break}r=function(){mn!==2&&mn!==9||kn!==n||(mn=7),fi(n)},y.then(r,r);break e;case 3:mn=7;break e;case 4:mn=5;break e;case 7:a2(y)?(mn=0,fs=null,aS(r)):(mn=0,fs=null,Cl(n,r,y,7));break;case 5:var k=null;switch($t.tag){case 26:k=$t.memoizedState;case 5:case 27:var P=$t;if(k?ZS(k):P.stateNode.complete){mn=0,fs=null;var W=P.sibling;if(W!==null)$t=W;else{var le=P.return;le!==null?($t=le,Pf(le)):$t=null}break t}}mn=0,fs=null,Cl(n,r,y,5);break;case 6:mn=0,fs=null,Cl(n,r,y,6);break;case 8:u0(),Vn=6;break e;default:throw Error(i(462))}}xD();break}catch(me){tS(n,me)}while(!0);return zi=uo=null,fe.H=c,fe.A=p,un=a,$t!==null?0:(kn=null,Wt=0,Hd(),Vn)}function xD(){for(;$t!==null&&!nn();)iS($t)}function iS(n){var r=S1(n.alternate,n,Vi);n.memoizedProps=n.pendingProps,r===null?Pf(n):$t=r}function aS(n){var r=n,a=r.alternate;switch(r.tag){case 15:case 0:r=p1(a,r,r.pendingProps,r.type,void 0,Wt);break;case 11:r=p1(a,r,r.pendingProps,r.type.render,r.ref,Wt);break;case 5:vm(r);var c=r;c===cr&&(Kt?(Yd(c),c.tag===5&&c.stateNode!=null&&(Mn=c.stateNode)):(Yd(c),Kt=!0));default:E1(a,r),r=$t=Qx(r,Vi),r=S1(a,r,Vi)}n.memoizedProps=n.pendingProps,r===null?Pf(n):$t=r}function Cl(n,r,a,c){zi=uo=null,vm(r),ul=null,Uc=0;var p=r.return;try{if(oD(n,p,r,a,Wt)){Vn=1,hf(n,Rs(a,n.current)),$t=null;return}}catch(y){if(p!==null)throw $t=p,y;Vn=1,hf(n,Rs(a,n.current)),$t=null;return}r.flags&32768?(Kt||c===1?n=!0:vl||(Wt&536870912)!==0?n=!1:(Ea=n=!0,(c===2||c===9||c===3||c===6)&&(c=br.current,c!==null&&c.tag===13&&(c.flags|=16384))),oS(r,n)):Pf(r)}function Pf(n){var r=n;do{if((r.flags&32768)!==0){oS(r,Ea);return}n=r.return;var a=dD(r.alternate,r,Vi);if(a!==null){$t=a;return}if(r=r.sibling,r!==null){$t=r;return}$t=r=n}while(r!==null);Vn===0&&(Vn=5)}function oS(n,r){do{var a=fD(n.alternate,n);if(a!==null){a.flags&=32767,$t=a;return}if(a=n.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!r&&(n=n.sibling,n!==null)){$t=n;return}$t=n=a}while(n!==null);Vn=6,$t=null}function lS(n,r,a,c,p,y,k,P,W,le,me,Te){n.cancelPendingCommit=null;do Lf();while(_n!==0);if((un&6)!==0)throw Error(i(327));if(r!==null){if(r===n.current)throw Error(i(177));n===kn&&($t=kn=null,Wt=0),Ro=r,Ks=n,di=a,c0=p,Z1=c,SD(n,r,a,k,P,W,Te)}}function SD(n,r,a,c,p,y,k){var P=r.lanes|r.childLanes;if(l0=P,P|=Yg,Yt(n,a,P,c,p,y),Sl=null,(a&335544064)===a?(wl=QN(n),c=10262):(wl=null,c=10256),(r.subtreeFlags&c)!==0||(r.flags&c)!==0?(n.callbackNode=null,n.callbackPriority=0,kD(yt,function(){return g0(),null})):(n.callbackNode=null,n.callbackPriority=0),Sf=!1,c=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||c){c=fe.T,fe.T=null,p=ce.p,ce.p=2,y=un,un|=4;try{hD(n,r,a)}finally{un=y,ce.p=p,fe.T=c}}_n=1,Sf?xl=GD(k,n.containerInfo,wl,f0,h0,ED,p0,g0,wD):(f0(),h0(),p0())}function wD(n){if(_n!==0){var r=Ks.onRecoverableError;r(n,{componentStack:null})}}function ED(){_n===3&&(_n=0,K1(Ro,Ks),_n=4)}function f0(){if(_n===1){_n=0;var n=Ks,r=Ro,a=di,c=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||c){c=fe.T,fe.T=null;var p=ce.p;ce.p=2;var y=un;un|=4;try{Zc=Rf=!1,B1(r,n,a),a=k0;var k=Ux(n.containerInfo),P=a.focusedElem,W=a.selectionRange;if(k!==P&&P&&P.ownerDocument&&_x(P.ownerDocument.documentElement,P)){if(W!==null&&Fg(P)){var le=W.start,me=W.end;if(me===void 0&&(me=le),"selectionStart"in P)P.selectionStart=le,P.selectionEnd=Math.min(me,P.value.length);else{var Te=P.ownerDocument||document,ie=Te&&Te.defaultView||window;if(ie.getSelection){var he=ie.getSelection(),Ye=P.textContent.length,it=Math.min(W.start,Ye),Pt=W.end===void 0?it:Math.min(W.end,Ye);!he.extend&&it>Pt&&(k=Pt,Pt=it,it=k);var oe=zx(P,it),te=zx(P,Pt);if(oe&&te&&(he.rangeCount!==1||he.anchorNode!==oe.node||he.anchorOffset!==oe.offset||he.focusNode!==te.node||he.focusOffset!==te.offset)){var ue=Te.createRange();ue.setStart(oe.node,oe.offset),he.removeAllRanges(),it>Pt?(he.addRange(ue),he.extend(te.node,te.offset)):(ue.setEnd(te.node,te.offset),he.addRange(ue))}}}}for(Te=[],he=P;he=he.parentNode;)he.nodeType===1&&Te.push({element:he,left:he.scrollLeft,top:he.scrollTop});for(typeof P.focus=="function"&&P.focus(),P=0;P<Te.length;P++){var Ce=Te[P];Ce.element.scrollLeft=Ce.left,Ce.element.scrollTop=Ce.top}}jl=!!T0,k0=T0=null}finally{un=y,ce.p=p,fe.T=c}}n.current=r,_n=2}}function h0(){if(_n===2){_n=0;var n=Ks,r=Ro,a=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||a){a=fe.T,fe.T=null;var c=ce.p;ce.p=2;var p=un;un|=4;try{L1(n,r.alternate,r)}finally{un=p,ce.p=c,fe.T=a}}_n=3}}function p0(){if(_n===4||_n===3){_n=0;var n=xl;xl=null,et();var r=Ks,a=Ro,c=di,p=Z1,y=(c&335544064)===c?10262:10256;if((a.subtreeFlags&y)!==0||(a.flags&y)!==0?_n=5:(_n=0,Ro=Ks=null,cS(r,r.pendingLanes)),y=r.pendingLanes,y===0&&(Ca=null),Cn(c),a=a.stateNode,_e&&typeof _e.onCommitFiberRoot=="function")try{_e.onCommitFiberRoot(Ie,a,void 0,(a.current.flags&128)===128)}catch{}if(p!==null){a=fe.T,y=ce.p,ce.p=2,fe.T=null;try{for(var k=r.onRecoverableError,P=0;P<p.length;P++){var W=p[P];k(W.value,{componentStack:W.stack})}}finally{fe.T=a,ce.p=y}}if(p=Sl,k=wl,wl=null,p!==null&&(Sl=null,k===null&&(k=[]),n!==null))for(W=0;W<p.length;W++)a=(0,p[W])(k),a!==void 0&&n.finished.finally(a);(di&3)!==0&&Lf(),fi(r),y=r.pendingLanes,(c&261930)!==0&&(y&42)!==0?r===Df?tu++:(tu=0,Df=r):(tu=0,Df=null),nu(0)}}function cS(n,r){(n.pooledCacheLanes&=r)===0&&(r=n.pooledCache,r!=null&&(n.pooledCache=null,Lc(r)))}function Lf(){return xl!==null&&(xl.skipTransition(),xl=null),f0(),h0(),p0(),g0()}function g0(){if(_n!==5)return!1;var n=Ks,r=l0;l0=0;var a=Cn(di),c=fe.T,p=ce.p;try{ce.p=32>a?32:a,fe.T=null,a=c0,c0=null;var y=Ks,k=di;if(_n=0,Ro=Ks=null,di=0,(un&6)!==0)throw Error(i(331));var P=un;if(un|=4,$1(y.current),q1(y,y.current,k,a),un=P,nu(0,!1),_e&&typeof _e.onPostCommitFiberRoot=="function")try{_e.onPostCommitFiberRoot(Ie,y)}catch{}return!0}finally{ce.p=p,fe.T=c,cS(n,r)}}function uS(n,r,a){r=Rs(a,r),r=Dm(n.stateNode,r,2),n=ya(n,r,2),n!==null&&(ft(n,2),fi(n))}function yn(n,r,a){if(n.tag===3)uS(n,n,a);else for(;r!==null;){if(r.tag===3){uS(r,n,a);break}else if(r.tag===1){var c=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(Ca===null||!Ca.has(c))){n=Rs(a,n),a=a1(2),c=ya(r,a,2),c!==null&&(o1(a,c,r,n),ft(c,2),fi(c));break}}r=r.return}}function m0(n,r,a){var c=n.pingCache;if(c===null){c=n.pingCache=new mD;var p=new Set;c.set(r,p)}else p=c.get(r),p===void 0&&(p=new Set,c.set(r,p));p.has(a)||(a0=!0,p.add(a),n=RD.bind(null,n,r,a),r.then(n,n))}function RD(n,r,a){var c=n.pingCache;c!==null&&c.delete(r),n.pingedLanes|=n.suspendedLanes&a,n.warmLanes&=~a,kn===n&&(Wt&a)===a&&((Vn===4||Vn===3&&(Wt&62914560)===Wt&&300>Et()-Af)&&(un&2)===0?Rl(n,0):Of|=a,bl===Wt&&(bl=0)),fi(n)}function dS(n,r){r===0&&(r=nt()),n=oo(n,r),n!==null&&(ft(n,r),fi(n))}function CD(n){var r=n.memoizedState,a=0;r!==null&&(a=r.retryLane),dS(n,a)}function TD(n,r){var a=0;switch(n.tag){case 31:case 13:var c=n.stateNode,p=n.memoizedState;p!==null&&(a=p.retryLane);break;case 19:c=n.stateNode;break;case 22:c=n.stateNode._retryCache;break;default:throw Error(i(314))}c!==null&&c.delete(r),dS(n,a)}function kD(n,r){return tn(n,r)}var Tl=null,kl=null,y0=!1,zf=!1,v0=!1,ka=0;function fi(n){n!==kl&&n.next===null&&(kl===null?Tl=kl=n:kl=kl.next=n),zf=!0,y0||(y0=!0,AD())}function nu(n,r){if(!v0&&zf){v0=!0;do for(var a=!1,c=Tl;c!==null;){if(n!==0){var p=c.pendingLanes;if(p===0)var y=0;else{var k=c.suspendedLanes,P=c.pingedLanes;y=(1<<31-tt(42|n)+1)-1,y&=p&~(k&~P),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(a=!0,gS(c,y))}else y=Wt,y=Ke(c,c===kn?y:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(y&3)===0||Xe(c,y)||(a=!0,gS(c,y));c=c.next}while(a);v0=!1}}function OD(){fS()}function fS(){zf=y0=!1;var n=0;ka!==0&&HD()&&(n=ka);for(var r=Et(),a=null,c=Tl;c!==null;){var p=c.next,y=hS(c,r);y===0?(c.next=null,a===null?Tl=p:a.next=p,p===null&&(kl=a)):(a=c,(n!==0||(y&3)!==0)&&(zf=!0)),c=p}_n!==0&&_n!==5||nu(n),ka!==0&&(ka=0)}function hS(n,r){for(var a=n.suspendedLanes,c=n.pingedLanes,p=n.expirationTimes,y=n.pendingLanes&-62914561;0<y;){var k=31-tt(y),P=1<<k,W=p[k];W===-1?((P&a)===0||(P&c)!==0)&&(p[k]=ct(P,r)):W<=r&&(n.expiredLanes|=P),y&=~P}if(r=kn,a=Wt,a=Ke(n,n===r?a:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),c=n.callbackNode,a===0||n===r&&(mn===2||mn===9)||n.cancelPendingCommit!==null)return c!==null&&c!==null&&an(c),n.callbackNode=null,n.callbackPriority=0;if((a&3)===0||Xe(n,a)){if(r=a&-a,r===n.callbackPriority)return r;switch(c!==null&&an(c),Cn(a)){case 2:case 8:a=St;break;case 32:a=yt;break;case 268435456:a=dn;break;default:a=yt}return c=pS.bind(null,n),a=tn(a,c),n.callbackPriority=r,n.callbackNode=a,r}return c!==null&&c!==null&&an(c),n.callbackPriority=2,n.callbackNode=null,2}function pS(n,r){if(_n!==0&&_n!==5)return n.callbackNode=null,n.callbackPriority=0,null;var a=n.callbackNode;if(Lf()&&n.callbackNode!==a)return null;var c=Wt;return c=Ke(n,n===kn?c:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),c===0?null:(J1(n,c,r),hS(n,Et()),n.callbackNode!=null&&n.callbackNode===a?pS.bind(null,n):null)}function gS(n,r){if(Lf())return null;J1(n,r,!0)}function AD(){BD(function(){(un&6)!==0?tn(ht,OD):fS()})}function b0(){if(ka===0){var n=po;n===0&&(n=re,re<<=1,(re&261888)===0&&(re=256)),ka=n}return ka}function mS(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:mr(n)}function MD(n,r,a,c,p){if(r==="submit"&&a&&a.stateNode===p){var y=mS((p[An]||null).action),k=c.submitter;k&&(r=(r=k[An]||null)?mS(r.formAction):k.getAttribute("formAction"),r!==null&&(y=r,k=null));var P=new Ld("action","action",null,c,p);n.push({event:P,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(ka!==0){var W=new FormData(p,k);km(a,{pending:!0,data:W,method:p.method,action:y},null,W)}}else typeof y=="function"&&(P.preventDefault(),W=new FormData(p,k),km(a,{pending:!0,data:W,method:p.method,action:y},y,W))},currentTarget:p}]})}}for(var x0=0;x0<qg.length;x0++){var S0=qg[x0],ND=S0.toLowerCase(),DD=S0[0].toUpperCase()+S0.slice(1);Hs(ND,"on"+DD)}Hs(Bx,"onAnimationEnd"),Hs(Vx,"onAnimationIteration"),Hs(Kx,"onAnimationStart"),Hs("dblclick","onDoubleClick"),Hs("focusin","onFocus"),Hs("focusout","onBlur"),Hs(FN,"onTransitionRun"),Hs(BN,"onTransitionStart"),Hs(VN,"onTransitionCancel"),Hs(qx,"onTransitionEnd"),xn("onMouseEnter",["mouseout","mouseover"]),xn("onMouseLeave",["mouseout","mouseover"]),xn("onPointerEnter",["pointerout","pointerover"]),xn("onPointerLeave",["pointerout","pointerover"]),Ht("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ht("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ht("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ht("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ht("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ht("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ru="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(" "),jD=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ru));function yS(n,r){r=(r&4)!==0;for(var a=0;a<n.length;a++){var c=n[a],p=c.event;c=c.listeners;e:{var y=void 0;if(r)for(var k=c.length-1;0<=k;k--){var P=c[k],W=P.instance,le=P.currentTarget;if(P=P.listener,W!==y&&p.isPropagationStopped())break e;y=P,p.currentTarget=le;try{y(p)}catch(me){Ud(me)}p.currentTarget=null,y=W}else for(k=0;k<c.length;k++){if(P=c[k],W=P.instance,le=P.currentTarget,P=P.listener,W!==y&&p.isPropagationStopped())break e;y=P,p.currentTarget=le;try{y(p)}catch(me){Ud(me)}p.currentTarget=null,y=W}}}}function Qt(n,r){var a=r[Mi];a===void 0&&(a=r[Mi]=new Set);var c=n+"__bubble";a.has(c)||(vS(r,n,2,!1),a.add(c))}function w0(n,r,a){var c=0;r&&(c|=4),vS(a,n,c,r)}var _f="_reactListening"+Math.random().toString(36).slice(2);function E0(n){if(!n[_f]){n[_f]=!0,Ot.forEach(function(a){a!=="selectionchange"&&(jD.has(a)||w0(a,!1,n),w0(a,!0,n))});var r=n.nodeType===9?n:n.ownerDocument;r===null||r[_f]||(r[_f]=!0,w0("selectionchange",!1,r))}}function vS(n,r,a,c){switch(ow(r)){case 2:var p=Cj;break;case 8:p=Tj;break;default:p=V0}a=p.bind(null,r,a,n),p=void 0,!so||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(p=!0),c?p!==void 0?n.addEventListener(r,a,{capture:!0,passive:p}):n.addEventListener(r,a,!0):p!==void 0?n.addEventListener(r,a,{passive:p}):n.addEventListener(r,a,!1)}function R0(n,r,a,c,p){var y=c;if((r&1)===0&&(r&2)===0&&c!==null)e:for(;;){if(c===null)return;var k=c.tag;if(k===3||k===4){var P=c.stateNode.containerInfo;if(P===p)break;if(k===4)for(k=c.return;k!==null;){var W=k.tag;if((W===3||W===4)&&k.stateNode.containerInfo===p)return;k=k.return}for(;P!==null;){if(k=Fn(P),k===null)return;if(W=k.tag,W===5||W===6||W===26||W===27){c=y=k;continue e}P=P.parentNode}}c=c.return}ro(function(){var le=y,me=no(a),Te=[];e:{var ie=Yx.get(n);if(ie!==void 0){var he=Ld,Ye=n;switch(n){case"keypress":if(Id(a)===0)break e;case"keydown":case"keyup":he=yN;break;case"focusin":Ye="focus",he=Pg;break;case"focusout":Ye="blur",he=Pg;break;case"beforeblur":case"afterblur":he=Pg;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":he=Sx;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":he=iN;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":he=wN;break;case Bx:case Vx:case Kx:he=lN;break;case qx:he=RN;break;case"scroll":case"scrollend":he=rN;break;case"wheel":he=TN;break;case"copy":case"cut":case"paste":he=uN;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":he=Ex;break;case"submit":he=xN;break;case"toggle":case"beforetoggle":he=ON}var it=(r&4)!==0,Pt=!it&&(n==="scroll"||n==="scrollend"),oe=it?ie!==null?ie+"Capture":null:ie;it=[];for(var te=le,ue;te!==null;){var Ce=te;if(ue=Ce.stateNode,Ce=Ce.tag,Ce!==5&&Ce!==26&&Ce!==27||ue===null||oe===null||(Ce=Di(te,oe),Ce!=null&&it.push(su(te,Ce,ue))),Pt)break;te=te.return}0<it.length&&(ie=new he(ie,Ye,null,a,me),Te.push({event:ie,listeners:it}))}}if((r&7)===0){e:{if(he=n==="mouseover"||n==="pointerover",ie=n==="mouseout"||n==="pointerout",he&&a!==to&&(Ye=a.relatedTarget||a.fromElement)&&(Fn(Ye)||Ye[jn]))break e;(ie||he)&&(Ye=me.window===me?me:(he=me.ownerDocument)?he.defaultView||he.parentWindow:window,ie?(he=a.relatedTarget||a.toElement,ie=le,he=he?Fn(he):null,he!==null&&(Pt=l(he),it=he.tag,he!==Pt||it!==5&&it!==27&&it!==6)&&(he=null)):(ie=null,he=le),ie!==he&&(it=Sx,Ce="onMouseLeave",oe="onMouseEnter",te="mouse",(n==="pointerout"||n==="pointerover")&&(it=Ex,Ce="onPointerLeave",oe="onPointerEnter",te="pointer"),Pt=ie==null?Ye:pe(ie),ue=he==null?Ye:pe(he),Ye=new it(Ce,te+"leave",ie,a,me),Ye.target=Pt,Ye.relatedTarget=ue,Ce=null,Fn(me)===le&&(it=new it(oe,te+"enter",he,a,me),it.target=ue,it.relatedTarget=Pt,Ce=it),Pt=Ce,it=ie&&he?j(ie,he,ID):null,ie!==null&&bS(Te,Ye,ie,it,!1),he!==null&&Pt!==null&&bS(Te,Pt,he,it,!0)))}e:{if(ie=le?pe(le):window,he=ie.nodeName&&ie.nodeName.toLowerCase(),he==="select"||he==="input"&&ie.type==="file")var Je=Nx;else if(Ax(ie))if(Dx)Je=_N;else{Je=LN;var Jt=PN}else he=ie.nodeName,!he||he.toLowerCase()!=="input"||ie.type!=="checkbox"&&ie.type!=="radio"?le&&eo(le.elementType)&&(Je=Nx):Je=zN;if(Je&&(Je=Je(n,le))){Mx(Te,Je,a,me);break e}Jt&&Jt(n,ie,le)}switch(Jt=le?pe(le):window,n){case"focusin":(Ax(Jt)||Jt.contentEditable==="true")&&(tl=Jt,Bg=le,jc=null);break;case"focusout":jc=Bg=tl=null;break;case"mousedown":Vg=!0;break;case"contextmenu":case"mouseup":case"dragend":Vg=!1,Hx(Te,a,me);break;case"selectionchange":if(HN)break;case"keydown":case"keyup":Hx(Te,a,me)}var ut;if(zg)e:{switch(n){case"compositionstart":var wt="onCompositionStart";break e;case"compositionend":wt="onCompositionEnd";break e;case"compositionupdate":wt="onCompositionUpdate";break e}wt=void 0}else el?kx(n,a)&&(wt="onCompositionEnd"):n==="keydown"&&a.keyCode===229&&(wt="onCompositionStart");wt&&(Rx&&a.locale!=="ko"&&(el||wt!=="onCompositionStart"?wt==="onCompositionEnd"&&el&&(ut=bx()):(la=me,Dg="value"in la?la.value:la.textContent,el=!0)),Jt=Uf(le,wt),0<Jt.length&&(wt=new wx(wt,n,null,a,me),Te.push({event:wt,listeners:Jt}),ut?wt.data=ut:(ut=Ox(a),ut!==null&&(wt.data=ut)))),(ut=MN?NN(n,a):DN(n,a))&&(wt=Uf(le,"onBeforeInput"),0<wt.length&&(Jt=new wx("onBeforeInput","beforeinput",null,a,me),Te.push({event:Jt,listeners:wt}),Jt.data=ut)),MD(Te,n,le,a,me)}yS(Te,r)})}function su(n,r,a){return{instance:n,listener:r,currentTarget:a}}function Uf(n,r){for(var a=r+"Capture",c=[];n!==null;){var p=n,y=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||y===null||(p=Di(n,a),p!=null&&c.unshift(su(n,p,y)),p=Di(n,r),p!=null&&c.push(su(n,p,y))),n.tag===3)return c;n=n.return}return[]}function ID(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function bS(n,r,a,c,p){for(var y=r._reactName,k=[];a!==null&&a!==c;){var P=a,W=P.alternate,le=P.stateNode;if(P=P.tag,W!==null&&W===c)break;P!==5&&P!==26&&P!==27||le===null||(W=le,p?(le=Di(a,y),le!=null&&k.unshift(su(a,le,W))):p||(le=Di(a,y),le!=null&&k.push(su(a,le,W)))),a=a.return}k.length!==0&&n.push({event:r,listeners:k})}var PD=/\r\n?/g,LD=/\u0000|\uFFFD/g;function xS(n){return(typeof n=="string"?n:""+n).replace(PD,`
10
+ `).replace(LD,"")}function SS(n,r){return r=xS(r),xS(n)===r}function vn(n,r,a,c,p,y){switch(a){case"children":if(typeof c=="string")r==="body"||r==="textarea"&&c===""||Lr(n,c);else if(typeof c=="number"||typeof c=="bigint")r!=="body"&&Lr(n,""+c);else return;break;case"className":is(n,"class",c);break;case"tabIndex":is(n,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":is(n,a,c);break;case"style":os(n,c,y);return;case"data":if(r!=="object"){is(n,"data",c);break}case"src":case"href":if(c===""&&(r!=="a"||a!=="href")){n.removeAttribute(a);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){n.removeAttribute(a);break}c=mr(c),n.setAttribute(a,c);break;case"action":case"formAction":if(typeof c=="function"){n.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof y=="function"&&(a==="formAction"?(r!=="input"&&vn(n,r,"name",p.name,p,null),vn(n,r,"formEncType",p.formEncType,p,null),vn(n,r,"formMethod",p.formMethod,p,null),vn(n,r,"formTarget",p.formTarget,p,null)):(vn(n,r,"encType",p.encType,p,null),vn(n,r,"method",p.method,p,null),vn(n,r,"target",p.target,p,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){n.removeAttribute(a);break}c=mr(c),n.setAttribute(a,c);break;case"onClick":c!=null&&(n.onclick=zr);return;case"onScroll":c!=null&&Qt("scroll",n);return;case"onScrollEnd":c!=null&&Qt("scrollend",n);return;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(i(61));if(a=c.__html,a!=null){if(p.children!=null)throw Error(i(60));y?.__html!==a&&(n.innerHTML=a)}}break;case"multiple":n.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":n.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){n.removeAttribute("xlink:href");break}a=mr(c),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(a,c):n.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":c&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(a,""):n.removeAttribute(a);break;case"capture":case"download":c===!0?n.setAttribute(a,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(a,c):n.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?n.setAttribute(a,c):n.removeAttribute(a);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?n.removeAttribute(a):n.setAttribute(a,c);break;case"popover":Qt("beforetoggle",n),Qt("toggle",n),zn(n,"popover",c);break;case"xlinkActuate":Qn(n,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":Qn(n,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":Qn(n,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":Qn(n,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":Qn(n,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":Qn(n,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":Qn(n,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":Qn(n,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":Qn(n,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":zn(n,"is",c);break;case"innerText":case"textContent":return;default:if(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")a=Rc.get(a)||a,zn(n,a,c);else return}mt=!0}function C0(n,r,a,c,p,y){switch(a){case"style":os(n,c,y);return;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(i(61));if(a=c.__html,a!=null){if(p.children!=null)throw Error(i(60));y?.__html!==a&&(n.innerHTML=a)}}break;case"children":if(typeof c=="string")Lr(n,c);else if(typeof c=="number"||typeof c=="bigint")Lr(n,""+c);else return;break;case"onScroll":c!=null&&Qt("scroll",n);return;case"onScrollEnd":c!=null&&Qt("scrollend",n);return;case"onClick":c!=null&&(n.onclick=zr);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!Ct.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(p=a.endsWith("Capture"),y=a.slice(2,p?a.length-7:void 0),r=n[An]||null,r=r!=null?r[a]:null,typeof r=="function"&&n.removeEventListener(y,r,p),typeof c=="function")){typeof r!="function"&&r!==null&&(a in n?n[a]=null:n.hasAttribute(a)&&n.removeAttribute(a)),n.addEventListener(y,c,p);break e}mt=!0,a in n?n[a]=c:c===!0?n.setAttribute(a,""):zn(n,a,c)}return}mt=!0}function wr(n,r,a){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Qt("error",n),Qt("load",n);var c=!1,p=!1,y;for(y in a)if(a.hasOwnProperty(y)){var k=a[y];if(k!=null)switch(y){case"src":c=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,r));default:vn(n,r,y,k,a,null)}}p&&vn(n,r,"srcSet",a.srcSet,a,null),c&&vn(n,r,"src",a.src,a,null);return;case"input":Qt("invalid",n);var P=y=k=p=null,W=null,le=null;for(c in a)if(a.hasOwnProperty(c)){var me=a[c];if(me!=null)switch(c){case"name":p=me;break;case"type":k=me;break;case"checked":W=me;break;case"defaultChecked":le=me;break;case"value":y=me;break;case"defaultValue":P=me;break;case"children":case"dangerouslySetInnerHTML":if(me!=null)throw Error(i(137,r));break;default:vn(n,r,c,me,a,null)}}aa(n,y,P,W,le,k,p,!1);return;case"select":Qt("invalid",n),c=k=y=null;for(p in a)if(a.hasOwnProperty(p)&&(P=a[p],P!=null))switch(p){case"value":y=P;break;case"defaultValue":k=P;break;case"multiple":c=P;default:vn(n,r,p,P,a,null)}r=y,a=k,n.multiple=!!c,r!=null?Yr(n,!!c,r,!1):a!=null&&Yr(n,!!c,a,!0);return;case"textarea":Qt("invalid",n),y=p=c=null;for(k in a)if(a.hasOwnProperty(k)&&(P=a[k],P!=null))switch(k){case"value":c=P;break;case"defaultValue":p=P;break;case"children":y=P;break;case"dangerouslySetInnerHTML":if(P!=null)throw Error(i(91));break;default:vn(n,r,k,P,a,null)}as(n,c,p,y);return;case"option":for(W in a)a.hasOwnProperty(W)&&(c=a[W],c!=null)&&(W==="selected"?n.selected=c&&typeof c!="function"&&typeof c!="symbol":vn(n,r,W,c,a,null));return;case"dialog":Qt("beforetoggle",n),Qt("toggle",n),Qt("cancel",n),Qt("close",n);break;case"iframe":case"object":Qt("load",n);break;case"video":case"audio":for(c=0;c<ru.length;c++)Qt(ru[c],n);break;case"image":Qt("error",n),Qt("load",n);break;case"details":Qt("toggle",n);break;case"embed":case"source":case"link":Qt("error",n),Qt("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(le in a)if(a.hasOwnProperty(le)&&(c=a[le],c!=null))switch(le){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,r));default:vn(n,r,le,c,a,null)}return;default:if(eo(r)){for(me in a)a.hasOwnProperty(me)&&(c=a[me],c!==void 0&&C0(n,r,me,c,a,void 0));return}}for(P in a)a.hasOwnProperty(P)&&(c=a[P],c!=null&&vn(n,r,P,c,a,null))}var zD={};function _D(n,r,a,c){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,y=null,k=null,P=null,W=null,le=null,me=null;for(he in a){var Te=a[he];if(a.hasOwnProperty(he)&&Te!=null)switch(he){case"checked":break;case"value":break;case"defaultValue":W=Te;default:c.hasOwnProperty(he)||vn(n,r,he,null,c,Te)}}for(var ie in c){var he=c[ie];if(Te=a[ie],c.hasOwnProperty(ie)&&(he!=null||Te!=null))switch(ie){case"type":he!==Te&&(mt=!0),y=he;break;case"name":he!==Te&&(mt=!0),p=he;break;case"checked":he!==Te&&(mt=!0),le=he;break;case"defaultChecked":he!==Te&&(mt=!0),me=he;break;case"value":he!==Te&&(mt=!0),k=he;break;case"defaultValue":he!==Te&&(mt=!0),P=he;break;case"children":case"dangerouslySetInnerHTML":if(he!=null)throw Error(i(137,r));break;default:he!==Te&&vn(n,r,ie,he,c,Te)}}kr(n,k,P,W,le,me,y,p);return;case"select":he=k=P=ie=null;for(y in a)if(W=a[y],a.hasOwnProperty(y)&&W!=null)switch(y){case"value":break;case"multiple":he=W;default:c.hasOwnProperty(y)||vn(n,r,y,null,c,W)}for(p in c)if(y=c[p],W=a[p],c.hasOwnProperty(p)&&(y!=null||W!=null))switch(p){case"value":y!==W&&(mt=!0),ie=y;break;case"defaultValue":y!==W&&(mt=!0),P=y;break;case"multiple":y!==W&&(mt=!0),k=y;default:y!==W&&vn(n,r,p,y,c,W)}r=P,a=k,c=he,ie!=null?Yr(n,!!a,ie,!1):!!c!=!!a&&(r!=null?Yr(n,!!a,r,!0):Yr(n,!!a,a?[]:"",!1));return;case"textarea":he=ie=null;for(P in a)if(p=a[P],a.hasOwnProperty(P)&&p!=null&&!c.hasOwnProperty(P))switch(P){case"value":break;case"children":break;default:vn(n,r,P,null,c,p)}for(k in c)if(p=c[k],y=a[k],c.hasOwnProperty(k)&&(p!=null||y!=null))switch(k){case"value":p!==y&&(mt=!0),ie=p;break;case"defaultValue":p!==y&&(mt=!0),he=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(i(91));break;default:p!==y&&vn(n,r,k,p,c,y)}Jo(n,ie,he);return;case"option":for(var Ye in a)ie=a[Ye],a.hasOwnProperty(Ye)&&ie!=null&&!c.hasOwnProperty(Ye)&&(Ye==="selected"?n.selected=!1:vn(n,r,Ye,null,c,ie));for(W in c)ie=c[W],he=a[W],c.hasOwnProperty(W)&&ie!==he&&(ie!=null||he!=null)&&(W==="selected"?(ie!==he&&(mt=!0),n.selected=ie&&typeof ie!="function"&&typeof ie!="symbol"):vn(n,r,W,ie,c,he));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var it in a)ie=a[it],a.hasOwnProperty(it)&&ie!=null&&!c.hasOwnProperty(it)&&vn(n,r,it,null,c,ie);for(le in c)if(ie=c[le],he=a[le],c.hasOwnProperty(le)&&ie!==he&&(ie!=null||he!=null))switch(le){case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(i(137,r));break;default:vn(n,r,le,ie,c,he)}return;default:if(eo(r)){for(var Pt in a)ie=a[Pt],a.hasOwnProperty(Pt)&&ie!==void 0&&!c.hasOwnProperty(Pt)&&C0(n,r,Pt,void 0,c,ie);for(me in c)ie=c[me],he=a[me],!c.hasOwnProperty(me)||ie===he||ie===void 0&&he===void 0||C0(n,r,me,ie,c,he);return}}for(var oe in a)ie=a[oe],a.hasOwnProperty(oe)&&ie!=null&&!c.hasOwnProperty(oe)&&vn(n,r,oe,null,c,ie);for(Te in c)ie=c[Te],he=a[Te],!c.hasOwnProperty(Te)||ie===he||ie==null&&he==null||vn(n,r,Te,ie,c,he)}function wS(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function UD(){if(typeof performance.getEntriesByType=="function"){for(var n=0,r=0,a=performance.getEntriesByType("resource"),c=0;c<a.length;c++){var p=a[c],y=p.transferSize,k=p.initiatorType,P=p.duration;if(y&&P&&wS(k)){for(k=0,P=p.responseEnd,c+=1;c<a.length;c++){var W=a[c],le=W.startTime;if(le>P)break;var me=W.transferSize,Te=W.initiatorType;me&&wS(Te)&&(W=W.responseEnd,k+=me*(W<P?1:(P-le)/(W-le)))}if(--c,r+=8*(y+k)/(p.duration/1e3),n++,10<n)break}}if(0<n)return r/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var T0=null,k0=null;function iu(n){return n.nodeType===9?n:n.ownerDocument}function ES(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function RS(n,r){if(n===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&r==="foreignObject"?0:n}function CS(n,r,a,c){return a=iu(a).createElement(n),a[hn]=c,a[An]=r,wr(a,n,r),we(a),a}function O0(n,r){return n==="textarea"||n==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var A0=null;function HD(){var n=window.event;return n&&n.type==="popstate"?n===A0?!1:(A0=n,!0):(A0=null,!1)}var M0=typeof setTimeout=="function"?setTimeout:void 0,FD=typeof clearTimeout=="function"?clearTimeout:void 0,TS=typeof Promise=="function"?Promise:void 0,kS=typeof requestAnimationFrame=="function"?requestAnimationFrame:M0,BD=typeof queueMicrotask=="function"?queueMicrotask:typeof TS<"u"?function(n){return TS.resolve(null).then(n).catch(VD)}:M0;function VD(n){setTimeout(function(){throw n})}function Oa(n){return n==="head"}function OS(n,r){var a=r,c=0;do{var p=a.nextSibling;if(n.removeChild(a),p&&p.nodeType===8)if(a=p.data,a==="/$"||a==="/&"){if(c===0){n.removeChild(p),Il(r);return}c--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")c++;else if(a==="html")_0(n.ownerDocument.documentElement);else if(a==="head"){a=n.ownerDocument.head,_0(a);for(var y=a.firstChild;y;){var k=y.nextSibling,P=y.nodeName;y[Ss]||P==="SCRIPT"||P==="STYLE"||P==="LINK"&&y.rel.toLowerCase()==="stylesheet"||a.removeChild(y),y=k}}else a==="body"&&_0(n.ownerDocument.body);a=p}while(a);Il(r)}function AS(n,r){var a=n;n=0;do{var c=a.nextSibling;if(a.nodeType===1?r?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(r?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),c&&c.nodeType===8)if(a=c.data,a==="/$"){if(n===0)break;n--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||n++;a=c}while(a)}function MS(n,r,a){if(r=CSS.escape(r)!==r?"r-"+btoa(r).replace(/=/g,""):r,n.style.viewTransitionName=r,a!=null&&(n.style.viewTransitionClass=a),a=getComputedStyle(n),a.display==="inline"){if(r=n.getClientRects(),r.length===1)var c=1;else for(var p=c=0;p<r.length;p++){var y=r[p];0<y.width&&0<y.height&&c++}c===1&&(n=n.style,n.display=r.length===1?"inline-block":"block",n.marginTop="-"+a.paddingTop,n.marginBottom="-"+a.paddingBottom)}}function NS(n,r){n=n.style,r=r.style;var a=r!=null?r.hasOwnProperty("viewTransitionName")?r.viewTransitionName:r.hasOwnProperty("view-transition-name")?r["view-transition-name"]:null:null;n.viewTransitionName=a==null||typeof a=="boolean"?"":(""+a).trim(),a=r!=null?r.hasOwnProperty("viewTransitionClass")?r.viewTransitionClass:r.hasOwnProperty("view-transition-class")?r["view-transition-class"]:null:null,n.viewTransitionClass=a==null||typeof a=="boolean"?"":(""+a).trim(),n.display==="inline-block"&&(r==null?n.display=n.margin="":(a=r.display,n.display=a==null||typeof a=="boolean"?"":a,a=r.margin,a!=null?n.margin=a:(a=r.hasOwnProperty("marginTop")?r.marginTop:r["margin-top"],n.marginTop=a==null||typeof a=="boolean"?"":a,r=r.hasOwnProperty("marginBottom")?r.marginBottom:r["margin-bottom"],n.marginBottom=r==null||typeof r=="boolean"?"":r)))}function KD(n,r,a){return a=a.ownerDocument.defaultView,{rect:n,abs:r.position==="absolute"||r.position==="fixed",clip:r.clipPath!=="none"||r.overflow!=="visible"||r.filter!=="none"||r.mask!=="none"||r.mask!=="none"||r.borderRadius!=="0px",view:0<=n.bottom&&0<=n.right&&n.top<=a.innerHeight&&n.left<=a.innerWidth}}function N0(n){var r=n.getBoundingClientRect(),a=getComputedStyle(n);return KD(r,a,n)}function qD(n){return n.documentElement.clientHeight}function YD(n){this.addEventListener("load",n),this.addEventListener("error",n)}function GD(n,r,a,c,p,y,k,P,W){var le=r.nodeType===9?r:r.ownerDocument;try{var me=le.startViewTransition({update:function(){var ie=le.defaultView,he=ie.navigation&&ie.navigation.transition,Ye=le.fonts.status;c();var it=[];if(Ye==="loaded"&&(qD(le),le.fonts.status==="loading"&&it.push(le.fonts.ready)),Ye=it.length,n!==null)for(var Pt=n.suspenseyImages,oe=0,te=0;te<Pt.length;te++){var ue=Pt[te];if(!ue.complete){var Ce=ue.getBoundingClientRect();if(0<Ce.bottom&&0<Ce.right&&Ce.top<ie.innerHeight&&Ce.left<ie.innerWidth){if(oe+=WS(ue),oe>Bf){it.length=Ye;break}ue=new Promise(YD.bind(ue)),it.push(ue)}}}if(0<it.length)return ie=Promise.race([Promise.all(it),new Promise(function(Je){return setTimeout(Je,500)})]).then(p,p),(he?Promise.allSettled([he.finished,ie]):ie).then(y,y);if(p(),he)return he.finished.then(y,y);y()},types:a});le.__reactViewTransition=me;var Te=[];return me.ready.then(function(){for(var ie=le.documentElement.getAnimations({subtree:!0}),he=0;he<ie.length;he++){var Ye=ie[he],it=Ye.effect,Pt=it.pseudoElement;if(Pt!=null&&Pt.startsWith("::view-transition")){Te.push(Ye),Ye=it.getKeyframes();for(var oe=Pt=void 0,te=!0,ue=0;ue<Ye.length;ue++){var Ce=Ye[ue],Je=Ce.width;if(Pt===void 0)Pt=Je;else if(Pt!==Je){te=!1;break}if(Je=Ce.height,oe===void 0)oe=Je;else if(oe!==Je){te=!1;break}delete Ce.width,delete Ce.height,Ce.transform==="none"&&delete Ce.transform}te&&Pt!==void 0&&oe!==void 0&&(it.setKeyframes(Ye),te=getComputedStyle(it.target,it.pseudoElement),te.width!==Pt||te.height!==oe)&&(te=Ye[0],te.width=Pt,te.height=oe,te=Ye[Ye.length-1],te.width=Pt,te.height=oe,it.setKeyframes(Ye))}}k()},function(ie){le.__reactViewTransition===me&&(le.__reactViewTransition=null);try{typeof ie=="object"&&ie!==null&&ie.name==="InvalidStateError"&&(ie.message==="View transition was skipped because document visibility state is hidden."||ie.message==="Skipping view transition because document visibility state has become hidden."||ie.message==="Skipping view transition because viewport size changed."||ie.message==="Transition was aborted because of invalid state")&&(ie=null),ie!==null&&W(ie)}finally{c(),p(),k()}}),me.finished.finally(function(){for(var ie=0;ie<Te.length;ie++)Te[ie].cancel();le.__reactViewTransition===me&&(le.__reactViewTransition=null),P()}),me}catch{return c(),p(),k(),null}}function Co(n,r){this._scope=document.documentElement,this._selector="::view-transition-"+n+"("+r+")"}Co.prototype.animate=function(n,r){return r=typeof r=="number"?{duration:r}:D({},r),r.pseudoElement=this._selector,this._scope.animate(n,r)},Co.prototype.getAnimations=function(){for(var n=this._scope,r=this._selector,a=n.getAnimations({subtree:!0}),c=[],p=0;p<a.length;p++){var y=a[p].effect;y!==null&&y.target===n&&y.pseudoElement===r&&c.push(a[p])}return c},Co.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function DS(n){return{name:n,group:new Co("group",n),imagePair:new Co("image-pair",n),old:new Co("old",n),new:new Co("new",n)}}function gs(n){this._fragmentFiber=n,this._observers=this._eventListeners=null}gs.prototype.addEventListener=function(n,r,a){var c=null,p=null;if(!(a!=null&&typeof a!="boolean"&&(c=a.signal||null,c!==null&&c.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var y=this._eventListeners;if(IS(y,n,r,a)===-1){var k=this,P=r;a!=null&&typeof a!="boolean"&&a.once===!0&&(P=function(W){k.removeEventListener(n,r,a),typeof r=="function"?r.call(this,W):r.handleEvent(W)}),c!==null&&(p=k.removeEventListener.bind(k,n,r,a),c.addEventListener("abort",p,{once:!0}),p=c.removeEventListener.bind(c,"abort",p)),c=Ol(a),y.push({type:n,listener:r,optionsOrUseCapture:a,attachedListener:P,cleanup:p}),h(this._fragmentFiber.child,!1,$D,n,P,c)}this._eventListeners=y}};function $D(n,r,a,c){return E(n).addEventListener(r,a,c),!1}gs.prototype.removeEventListener=function(n,r,a){var c=this._eventListeners;if(c!==null&&(r=IS(c,n,r,a),r!==-1)){var p=c[r];a=p.attachedListener;var y=p.cleanup;p=Ol(p.optionsOrUseCapture),h(this._fragmentFiber.child,!1,QD,n,a,p),c.splice(r,1),y!==null&&y()}};function QD(n,r,a,c){return E(n).removeEventListener(r,a,c),!1}function Ol(n){return n!=null&&typeof n!="boolean"&&(n.once===!0||n.signal instanceof AbortSignal)?{capture:n.capture,passive:n.passive}:n}function jS(n){return n==null?"c=0":typeof n=="boolean"?"c="+(n?"1":"0"):"c="+(n.capture?"1":"0")}function IS(n,r,a,c){if(n.length===0)return-1;c=jS(c);for(var p=0;p<n.length;p++){var y=n[p];if(y.type===r&&y.listener===a&&jS(y.optionsOrUseCapture)===c)return p}return-1}gs.prototype.dispatchEvent=function(n){var r=x(this._fragmentFiber);if(r===null)return!0;r=E(r);var a=this._eventListeners;if(a!==null&&0<a.length||!n.bubbles){var c=r.nodeType===9?r.createComment(""):document.createTextNode("");if(a)for(var p=0;p<a.length;p++){var y=a[p];c.addEventListener(y.type,y.attachedListener,Ol(y.optionsOrUseCapture))}if(r.appendChild(c),n=c.dispatchEvent(n),a)for(p=0;p<a.length;p++)y=a[p],c.removeEventListener(y.type,y.attachedListener,Ol(y.optionsOrUseCapture));return r.removeChild(c),n}return r.dispatchEvent(n)},gs.prototype.focus=function(n){h(this._fragmentFiber.child,!0,PS,n,void 0,void 0)};function PS(n,r){return n.tag===6?!1:(n=E(n),oj(n,r))}gs.prototype.focusLast=function(n){var r=[];h(this._fragmentFiber.child,!0,D0,r,void 0,void 0);for(var a=r.length-1;0<=a&&!PS(r[a],n);a--);};function D0(n,r){return r.push(n),!1}gs.prototype.blur=function(){var n=x(this._fragmentFiber);n!==null&&(n=E(n),n=iu(n).activeElement,n!==null&&h(this._fragmentFiber.child,!1,XD,n,void 0,void 0))};function XD(n,r){return n.tag===6?!1:(n=E(n),n===r||n.contains(r)?(r.blur(),!0):!1)}gs.prototype.observeUsing=function(n){this._observers===null&&(this._observers=new Set),this._observers.add(n),h(this._fragmentFiber.child,!1,ZD,n,void 0,void 0)};function ZD(n,r){return n.tag===6||(n=E(n),r.observe(n)),!1}gs.prototype.unobserveUsing=function(n){var r=this._observers;if(r!==null&&r.has(n)){r.delete(n),h(this._fragmentFiber.child,!1,WD,n,void 0,void 0);for(var a=r=0;a<qs.length;a++){var c=qs[a];c.fragmentInstance===this&&c.observer===n?n.unobserve(c.instance):qs[r++]=c}qs.length=r}};function WD(n,r){return n.tag===6||(n=E(n),r.unobserve(n)),!1}var qs=[],j0=!1;function JD(n,r,a){qs.push({fragmentInstance:n,observer:r,instance:a}),j0||(j0=!0,lj(function(){j0=!1;var c=qs;qs=[];for(var p=0;p<c.length;p++){var y=c[p];y.observer.unobserve(y.instance)}}))}gs.prototype.getClientRects=function(){var n=[];return h(this._fragmentFiber.child,!1,ej,n,void 0,void 0),n};function ej(n,r){if(n.tag===6){n=n.stateNode;var a=n.ownerDocument.createRange();a.selectNodeContents(n),r.push.apply(r,a.getClientRects())}else n=E(n),r.push.apply(r,n.getClientRects());return!1}gs.prototype.getRootNode=function(n){var r=x(this._fragmentFiber);return r===null?this:E(r).getRootNode(n)},gs.prototype.compareDocumentPosition=function(n){var r=x(this._fragmentFiber);if(r===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var a=[];h(this._fragmentFiber.child,!1,D0,a,void 0,void 0);var c=E(r);if(a.length===0){if(a=c,S(this._fragmentFiber)){e:{for(r=this._fragmentFiber.return;r!==null;){if(r.tag===4){r=r.stateNode.containerInfo;break e}if(r.tag===3||r.tag===5||r.tag===27)break;r=r.return}r=null}r!=null&&(a=r)}r=this._fragmentFiber;var p=c=a.compareDocumentPosition(n);return a===n?p=Node.DOCUMENT_POSITION_CONTAINS:c&Node.DOCUMENT_POSITION_CONTAINED_BY&&(a=w(r)[1],a===null?p=Node.DOCUMENT_POSITION_PRECEDING:(n=E(a).compareDocumentPosition(n),p=n===0||n&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),p|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}r=E(a[0]),p=E(a[a.length-1]);var y=S(this._fragmentFiber)?r.parentElement:c;if(y==null)return Node.DOCUMENT_POSITION_DISCONNECTED;c=y.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_CONTAINED_BY,y=y.compareDocumentPosition(p)&Node.DOCUMENT_POSITION_CONTAINED_BY;var k=r.compareDocumentPosition(n),P=p.compareDocumentPosition(n),W=k&Node.DOCUMENT_POSITION_CONTAINED_BY||P&Node.DOCUMENT_POSITION_CONTAINED_BY;return P=c&&y&&k&Node.DOCUMENT_POSITION_FOLLOWING&&P&Node.DOCUMENT_POSITION_PRECEDING,r=c&&r===n||y&&p===n||W||P?Node.DOCUMENT_POSITION_CONTAINED_BY:!c&&r===n||!y&&p===n?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:k,r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||tj(r,this._fragmentFiber,a[0],a[a.length-1],n)?r:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function tj(n,r,a,c,p){var y=Fn(p);if(n&Node.DOCUMENT_POSITION_CONTAINED_BY){if(a=!!y)e:{for(;y!==null;){if(y.tag===7&&(y===r||y.alternate===r)){a=!0;break e}y=y.return}a=!1}return a}if(n&Node.DOCUMENT_POSITION_CONTAINS){if(y===null)return y=p.ownerDocument,p===y||p===y.documentElement||p===y.body;e:{for(y=r,r=x(r);y!==null;){if(!(y.tag!==5&&y.tag!==3&&y.tag!==27||y!==r&&y.alternate!==r)){y=!0;break e}y=y.return}y=!1}return y}return n&Node.DOCUMENT_POSITION_PRECEDING?((r=!!y)&&!(r=y===a)&&(r=j(a,y,N),r===null?r=!1:(h(r,!0,T,y,a),y=R,R=null,r=y!==null)),r):n&Node.DOCUMENT_POSITION_FOLLOWING?((r=!!y)&&!(r=y===c)&&(r=j(c,y,N),r===null?r=!1:(h(r,!0,A,y,c),y=R,O=R=null,r=y!==null)),r):!1}function LS(n,r){var a=n.ownerDocument.createRange();a.selectNodeContents(n),n=a.getBoundingClientRect(),window.scrollTo(window.scrollX+n.left,r?window.scrollY+n.top:window.scrollY+n.bottom-window.innerHeight)}gs.prototype.scrollIntoView=function(n){if(typeof n=="object")throw Error(i(566));var r=[];h(this._fragmentFiber.child,!1,D0,r,void 0,void 0);var a=n!==!1;if(r.length===0){var c=w(this._fragmentFiber);if(c=a?c[1]||c[0]||x(this._fragmentFiber):c[0]||c[1],c===null)return;if(c.tag===6){n=E(c),LS(n,a);return}if(c=E(c),c.nodeType!==9){if(c.nodeType===11){a="host"in c?c.host:null,a!==null&&a.scrollIntoView(n);return}c.scrollIntoView(n)}}for(c=a?r.length-1:0;c!==(a?-1:r.length);){var p=r[c];p.tag===6?(p=E(p),LS(p,a)):E(p).scrollIntoView(n),c+=a?-1:1}};function nj(n,r){return n=E(n),zS(n,r),!1}function zS(n,r){n.reactFragments==null&&(n.reactFragments=new Set),n.reactFragments.add(r)}function _S(n,r){var a=r._eventListeners;if(a!==null)for(var c=0;c<a.length;c++){var p=a[c];n.addEventListener(p.type,p.attachedListener,Ol(p.optionsOrUseCapture))}n.nodeType!==3&&(a=r._observers,a!==null&&a.forEach(function(y){for(var k=0,P=0;P<qs.length;P++){var W=qs[P];(W.fragmentInstance!==r||W.observer!==y||W.instance!==n)&&(qs[k++]=W)}qs.length=k,y.observe(n)}),zS(n,r))}function rj(n,r){var a=r._eventListeners;if(a!==null)for(var c=0;c<a.length;c++){var p=a[c];n.removeEventListener(p.type,p.attachedListener,Ol(p.optionsOrUseCapture))}n.nodeType!==3&&(a=r._observers,a!==null&&a.forEach(function(y){typeof y.rootMargin=="string"?JD(r,y,n):y.unobserve(n)}),n.reactFragments!=null&&n.reactFragments.delete(r))}function I0(n){var r=n.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var a=r;switch(r=r.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":I0(a),qn(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}n.removeChild(a)}}function sj(n,r,a,c){for(;n.nodeType===1;){var p=a;if(n.nodeName.toLowerCase()!==r.toLowerCase()){if(!c&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(c){if(!n[Ss])switch(r){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(y=n.getAttribute("rel"),y==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(y!==p.rel||n.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||n.getAttribute("title")!==(p.title==null?null:p.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(y=n.getAttribute("src"),(y!==(p.src==null?null:p.src)||n.getAttribute("type")!==(p.type==null?null:p.type)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&y&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(r==="input"&&n.type==="hidden"){var y=p.name==null?null:""+p.name;if(p.type==="hidden"&&n.getAttribute("name")===y)return n}else return n;if(n=As(n.nextSibling),n===null)break}return null}function ij(n,r,a){if(r==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!a||(n=As(n.nextSibling),n===null))return null;return n}function US(n,r){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!r||(n=As(n.nextSibling),n===null))return null;return n}function P0(n){return n.data==="$?"||n.data==="$~"}function L0(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function aj(n,r){var a=n.ownerDocument;if(n.data==="$~")n._reactRetry=r;else if(n.data!=="$?"||a.readyState!=="loading")r();else{var c=function(){r(),a.removeEventListener("DOMContentLoaded",c)};a.addEventListener("DOMContentLoaded",c),n._reactRetry=c}}function As(n){for(;n!=null;n=n.nextSibling){var r=n.nodeType;if(r===1||r===3)break;if(r===8){if(r=n.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;if(r==="/$"||r==="/&")return null}}return n}var z0=null;function HS(n){n=n.nextSibling;for(var r=0;n;){if(n.nodeType===8){var a=n.data;if(a==="/$"||a==="/&"){if(r===0)return As(n.nextSibling);r--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||r++}n=n.nextSibling}return null}function FS(n){n=n.previousSibling;for(var r=0;n;){if(n.nodeType===8){var a=n.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(r===0)return n;r--}else a!=="/$"&&a!=="/&"||r++}n=n.previousSibling}return null}function oj(n,r){function a(){c=!0}if(n.ownerDocument.activeElement===n)return!0;var c=!1;try{n.ownerDocument.addEventListener("focus",a,!0),(n.focus||HTMLElement.prototype.focus).call(n,r)}finally{n.ownerDocument.removeEventListener("focus",a,!0)}return c}function lj(n){kS(function(){kS(function(r){return n(r)})})}function BS(n,r,a){switch(r=iu(a),n){case"html":if(n=r.documentElement,!n)throw Error(i(452));return n;case"head":if(n=r.head,!n)throw Error(i(453));return n;case"body":if(n=r.body,!n)throw Error(i(454));return n;default:throw Error(i(451))}}function VS(n,r,a){for(var c in a){var p=a[c];a.hasOwnProperty(c)&&p!=null&&vn(n,r,c,null,zD,p)}a.dangerouslySetInnerHTML!=null&&(n.textContent=""),n.onclick===zr&&(n.onclick=null),qn(n)}function _0(n){for(var r=n.attributes;r.length;)n.removeAttributeNode(r[0]);qn(n)}var Ms=new Map,KS=new Set;function au(n){if(typeof n.getRootNode=="function"){var r=n.getRootNode();if(r.nodeType===9||r.nodeType===11)return r}return n.nodeType===9?n:n.ownerDocument}var Ki=ce.d;ce.d={f:cj,r:uj,D:dj,C:fj,L:hj,m:pj,X:mj,S:gj,M:yj};function cj(){var n=Ki.f(),r=jf();return n||r}function uj(n){var r=gr(n);r!==null&&r.tag===5&&r.type==="form"?Y2(r):Ki.r(n)}var Al=typeof document>"u"?null:document;function qS(n,r,a){var c=Al;if(c&&typeof r=="string"&&r){var p=Dn(r);p='link[rel="'+n+'"][href="'+p+'"]',typeof a=="string"&&(p+='[crossorigin="'+a+'"]'),KS.has(p)||(KS.add(p),n={rel:n,crossOrigin:a,href:r},c.querySelector(p)===null&&(r=c.createElement("link"),wr(r,"link",n),we(r),c.head.appendChild(r)))}}function dj(n){Ki.D(n),qS("dns-prefetch",n,null)}function fj(n,r){Ki.C(n,r),qS("preconnect",n,r)}function hj(n,r,a){Ki.L(n,r,a);var c=Al;if(c&&n&&r){var p='link[rel="preload"][as="'+Dn(r)+'"]';r==="image"&&a&&a.imageSrcSet?(p+='[imagesrcset="'+Dn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(p+='[imagesizes="'+Dn(a.imageSizes)+'"]')):p+='[href="'+Dn(n)+'"]';var y=p;switch(r){case"style":y=Ml(n);break;case"script":y=Nl(n)}if(!(Ms.has(y)||(n=D({rel:"preload",href:r==="image"&&a&&a.imageSrcSet?void 0:n,as:r},a),Ms.set(y,n),c.querySelector(p)!==null||r==="style"&&c.querySelector(ou(y))||r==="script"&&c.querySelector(lu(y))))){var k=c.createElement("link");wr(k,"link",n),r==="style"&&(k[zt]=!0,k.onload=k.onerror=function(){rt(k)}),we(k),c.head.appendChild(k)}}}function pj(n,r){Ki.m(n,r);var a=Al;if(a&&n){var c=r&&typeof r.as=="string"?r.as:"script",p='link[rel="modulepreload"][as="'+Dn(c)+'"][href="'+Dn(n)+'"]',y=p;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":y=Nl(n)}if(!Ms.has(y)&&(n=D({rel:"modulepreload",href:n},r),Ms.set(y,n),a.querySelector(p)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(lu(y)))return}c=a.createElement("link"),wr(c,"link",n),we(c),a.head.appendChild(c)}}}function gj(n,r,a){Ki.S(n,r,a);var c=Al;if(c&&n){var p=Ae(c).hoistableStyles,y=Ml(n);r=r||"default";var k=p.get(y);if(!k){var P={loading:0,preload:null};if(k=c.querySelector(ou(y)))P.loading=5;else{n=D({rel:"stylesheet",href:n,"data-precedence":r},a),(a=Ms.get(y))&&U0(n,a);var W=k=c.createElement("link");we(W),wr(W,"link",n),W._p=new Promise(function(le,me){W.onload=le,W.onerror=me}),W.addEventListener("load",function(){P.loading|=1}),W.addEventListener("error",function(){P.loading|=2}),P.loading|=4,Hf(k,r,c)}k={type:"stylesheet",instance:k,count:1,state:P},p.set(y,k)}}}function mj(n,r){Ki.X(n,r);var a=Al;if(a&&n){var c=Ae(a).hoistableScripts,p=Nl(n),y=c.get(p);y||(y=a.querySelector(lu(p)),y||(n=D({src:n,async:!0},r),(r=Ms.get(p))&&H0(n,r),y=a.createElement("script"),we(y),wr(y,"link",n),a.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},c.set(p,y))}}function yj(n,r){Ki.M(n,r);var a=Al;if(a&&n){var c=Ae(a).hoistableScripts,p=Nl(n),y=c.get(p);y||(y=a.querySelector(lu(p)),y||(n=D({src:n,async:!0,type:"module"},r),(r=Ms.get(p))&&H0(n,r),y=a.createElement("script"),we(y),wr(y,"link",n),a.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},c.set(p,y))}}function YS(n,r,a,c){var p=(p=xe.current)?au(p):null;if(!p)throw Error(i(446));switch(n){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(a=Ml(a.href),r=Ae(p).hoistableStyles,c=r.get(a),c||(c={type:"style",instance:null,count:0,state:null},r.set(a,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){n=Ml(a.href);var y=Ae(p).hoistableStyles,k=y.get(n);if(k||(p=p.ownerDocument||p,k={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},y.set(n,k),(y=p.querySelector(ou(n)))?y._p||(k.instance=y,k.state.loading=5):(y=Ms.get(n),y||(y={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Ms.set(n,y)),vj(p,n,y,k.state))),r&&c===null)throw Error(i(528,""));return k}if(r&&c!==null)throw Error(i(529,""));return null;case"script":return r=a.async,a=a.src,typeof a=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(a=Nl(a),r=Ae(p).hoistableScripts,c=r.get(a),c||(c={type:"script",instance:null,count:0,state:null},r.set(a,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,n))}}function Ml(n){return'href="'+Dn(n)+'"'}function ou(n){return'link[rel="stylesheet"]['+n+"]"}function GS(n){return D({},n,{"data-precedence":n.precedence,precedence:null})}function vj(n,r,a,c){if(r=n.querySelector('link[rel="preload"][as="style"]['+r+"]")){if(r[zt]!==!0){c.loading=1;return}}else r=n.createElement("link"),r[zt]=!0,r.onload=r.onerror=rt.bind(null,r),wr(r,"link",a),we(r),n.head.appendChild(r);c.preload=r,r.addEventListener("load",function(){return c.loading|=1}),r.addEventListener("error",function(){return c.loading|=2})}function Nl(n){return'[src="'+Dn(n)+'"]'}function lu(n){return"script[async]"+n}function $S(n,r,a){if(r.count++,r.instance===null)switch(r.type){case"style":var c=n.querySelector('style[data-href~="'+Dn(a.href)+'"]');if(c)return r.instance=c,we(c),c;var p=D({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return c=(n.ownerDocument||n).createElement("style"),we(c),wr(c,"style",p),Hf(c,a.precedence,n),r.instance=c;case"stylesheet":p=Ml(a.href);var y=n.querySelector(ou(p));if(y)return r.state.loading|=4,r.instance=y,we(y),y;c=GS(a),(p=Ms.get(p))&&U0(c,p),y=(n.ownerDocument||n).createElement("link"),we(y);var k=y;return k._p=new Promise(function(P,W){k.onload=P,k.onerror=W}),wr(y,"link",c),r.state.loading|=4,Hf(y,a.precedence,n),r.instance=y;case"script":return y=Nl(a.src),(p=n.querySelector(lu(y)))?(r.instance=p,we(p),p):(c=a,(p=Ms.get(y))&&(c=D({},a),H0(c,p)),n=n.ownerDocument||n,p=n.createElement("script"),we(p),wr(p,"link",c),n.head.appendChild(p),r.instance=p);case"void":return null;default:throw Error(i(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(c=r.instance,r.state.loading|=4,Hf(c,a.precedence,n));return r.instance}function Hf(n,r,a){for(var c=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=c.length?c[c.length-1]:null,y=p,k=0;k<c.length;k++){var P=c[k];if(P.dataset.precedence===r)y=P;else if(y!==p)break}y?y.parentNode.insertBefore(n,y.nextSibling):(r=a.nodeType===9?a.head:a,r.insertBefore(n,r.firstChild))}function U0(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.title==null&&(n.title=r.title)}function H0(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.integrity==null&&(n.integrity=r.integrity)}var Ff=null;function QS(n,r,a){if(Ff===null){var c=new Map,p=Ff=new Map;p.set(a,c)}else p=Ff,c=p.get(a),c||(c=new Map,p.set(a,c));if(c.has(n))return c;for(c.set(n,null),a=a.getElementsByTagName(n),p=0;p<a.length;p++){var y=a[p];if(!(y[Ss]||y[hn]||n==="link"&&y.getAttribute("rel")==="stylesheet")&&y.namespaceURI!=="http://www.w3.org/2000/svg"){var k=y.getAttribute(r)||"";k=n+k;var P=c.get(k);P?P.push(y):c.set(k,[y])}}return c}function F0(n,r,a){n=n.ownerDocument||n,n.head.insertBefore(a,r==="title"?n.querySelector("head > title"):null)}function bj(n,r,a){if(a===1||r.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;return r.rel==="stylesheet"?(n=r.disabled,typeof r.precedence=="string"&&n==null):!0;case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function XS(n,r){return n==="img"&&r.src!=null&&r.src!==""&&r.onLoad==null&&r.loading!=="lazy"}function ZS(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function WS(n){return(n.width||100)*(n.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function JS(n,r){typeof r.decode=="function"&&(n.imgCount++,r.complete||(n.imgBytes+=WS(r),n.suspenseyImages.push(r)),n=wj.bind(n),r.decode().then(n,n))}function xj(n,r,a,c){if(a.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var p=Ml(c.href),y=r.querySelector(ou(p));if(y){r=y._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(n.count++,n=cu.bind(n),r.then(n,n)),a.state.loading|=4,a.instance=y,we(y);return}y=r.ownerDocument||r,c=GS(c),(p=Ms.get(p))&&U0(c,p),y=y.createElement("link"),we(y);var k=y;k._p=new Promise(function(P,W){k.onload=P,k.onerror=W}),wr(y,"link",c),a.instance=y}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(a,r),(r=a.state.preload)&&(a.state.loading&3)===0&&(n.count++,a=cu.bind(n),r.addEventListener("load",a),r.addEventListener("error",a))}}var Bf=0;function Sj(n,r){return n.stylesheets&&n.count===0&&Kf(n,n.stylesheets),0<n.count||0<n.imgCount?function(a){var c=setTimeout(function(){if(n.stylesheets&&Kf(n,n.stylesheets),n.unsuspend){var y=n.unsuspend;n.unsuspend=null,y()}},6e4+r);0<n.imgBytes&&Bf===0&&(Bf=62500*UD());var p=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&Kf(n,n.stylesheets),n.unsuspend)){var y=n.unsuspend;n.unsuspend=null,y()}},(n.imgBytes>Bf?50:800)+r);return n.unsuspend=a,function(){n.unsuspend=null,clearTimeout(c),clearTimeout(p)}}:null}function ew(n){if(n.count===0&&(n.imgCount===0||!n.waitingForImages)){if(n.stylesheets)Kf(n,n.stylesheets);else if(n.unsuspend){var r=n.unsuspend;n.unsuspend=null,r()}}}function cu(){this.count--,ew(this)}function wj(){this.imgCount--,ew(this)}var Vf=null;function Kf(n,r){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Vf=new Map,r.forEach(Ej,n),Vf=null,cu.call(n))}function Ej(n,r){if(!(r.state.loading&4)){var a=Vf.get(n);if(a)var c=a.get(null);else{a=new Map,Vf.set(n,a);for(var p=n.querySelectorAll("link[data-precedence],style[data-precedence]"),y=0;y<p.length;y++){var k=p[y];(k.nodeName==="LINK"||k.getAttribute("media")!=="not all")&&(a.set(k.dataset.precedence,k),c=k)}c&&a.set(null,c)}p=r.instance,k=p.getAttribute("data-precedence"),y=a.get(k)||c,y===c&&a.set(null,p),a.set(k,p),this.count++,c=cu.bind(this),p.addEventListener("load",c),p.addEventListener("error",c),y?y.parentNode.insertBefore(p,y.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(p,n.firstChild)),r.state.loading|=4}}var Dl={$$typeof:U,Provider:null,Consumer:null,_currentValue:Re,_currentValue2:Re,_threadCount:0};function Rj(n,r,a,c,p,y,k,P,W){this.tag=1,this.containerInfo=n,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Rt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Rt(0),this.hiddenUpdates=Rt(null),this.identifierPrefix=c,this.onUncaughtError=p,this.onCaughtError=y,this.onRecoverableError=k,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=W,this.transitionTypes=null,this.incompleteTransitions=new Map}function tw(n,r,a,c,p,y,k,P,W,le,me,Te){return n=new Rj(n,r,a,k,W,le,me,Te,P),r=1,y===!0&&(r|=24),y=Gr(3,null,null,r),n.current=y,y.stateNode=n,r=nm(),r.refCount++,n.pooledCache=r,r.refCount++,y.memoizedState={element:c,isDehydrated:a,cache:r},am(y),n}function nw(n){return n?(n=sl,n):sl}function rw(n,r,a,c,p,y){p=nw(p),c.context===null?c.context=p:c.pendingContext=p,c=ma(r),c.payload={element:a},y=y===void 0?null:y,y!==null&&(c.callback=y),a=ya(n,c,r),a!==null&&(Zr(a,n,r),Hc(a,n,r))}function sw(n,r){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var a=n.retryLane;n.retryLane=a!==0&&a<r?a:r}}function B0(n,r){sw(n,r),(n=n.alternate)&&sw(n,r)}function iw(n){if(n.tag===13||n.tag===31){var r=oo(n,67108864);r!==null&&Zr(r,n,67108864),B0(n,67108864)}}function aw(n){if(n.tag===13||n.tag===31){var r=ps();r=Vt(r);var a=oo(n,r);a!==null&&Zr(a,n,r),B0(n,r)}}var jl=!0;function Cj(n,r,a,c){var p=fe.T;fe.T=null;var y=ce.p;try{ce.p=2,V0(n,r,a,c)}finally{ce.p=y,fe.T=p}}function Tj(n,r,a,c){var p=fe.T;fe.T=null;var y=ce.p;try{ce.p=8,V0(n,r,a,c)}finally{ce.p=y,fe.T=p}}function V0(n,r,a,c){if(jl){var p=K0(c);if(p===null)R0(n,r,c,qf,a),lw(n,c);else if(Oj(p,n,r,a,c))c.stopPropagation();else if(lw(n,c),r&4&&-1<kj.indexOf(n)){for(;p!==null;){var y=gr(p);if(y!==null)switch(y.tag){case 3:if(y=y.stateNode,y.current.memoizedState.isDehydrated){var k=qe(y.pendingLanes);if(k!==0){var P=y;for(P.pendingLanes|=2,P.entangledLanes|=2;k;){var W=1<<31-tt(k);P.entanglements[1]|=W,k&=~W}fi(y),(un&6)===0&&(Mf=Et()+500,nu(0))}}break;case 31:case 13:P=oo(y,2),P!==null&&Zr(P,y,2),jf(),B0(y,2)}if(y=K0(c),y===null&&R0(n,r,c,qf,a),y===p)break;p=y}p!==null&&c.stopPropagation()}else R0(n,r,c,null,a)}}function K0(n){return n=no(n),q0(n)}var qf=null;function q0(n){if(qf=null,n=Fn(n),n!==null){var r=l(n);if(r===null)n=null;else{var a=r.tag;if(a===13){if(n=u(r),n!==null)return n;n=null}else if(a===31){if(n=d(r),n!==null)return n;n=null}else if(a===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;n=null}else r!==n&&(n=null)}}return qf=n,null}function ow(n){switch(n){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"fullscreenerror":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Zt()){case ht:return 2;case St:return 8;case yt:case Ut:return 32;case dn:return 268435456;default:return 32}default:return 32}}var Y0=!1,Aa=null,Ma=null,Na=null,uu=new Map,du=new Map,Da=[],kj="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function lw(n,r){switch(n){case"focusin":case"focusout":Aa=null;break;case"dragenter":case"dragleave":Ma=null;break;case"mouseover":case"mouseout":Na=null;break;case"pointerover":case"pointerout":uu.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":du.delete(r.pointerId)}}function fu(n,r,a,c,p,y){return n===null||n.nativeEvent!==y?(n={blockedOn:r,domEventName:a,eventSystemFlags:c,nativeEvent:y,targetContainers:[p]},r!==null&&(r=gr(r),r!==null&&iw(r)),n):(n.eventSystemFlags|=c,r=n.targetContainers,p!==null&&r.indexOf(p)===-1&&r.push(p),n)}function Oj(n,r,a,c,p){switch(r){case"focusin":return Aa=fu(Aa,n,r,a,c,p),!0;case"dragenter":return Ma=fu(Ma,n,r,a,c,p),!0;case"mouseover":return Na=fu(Na,n,r,a,c,p),!0;case"pointerover":var y=p.pointerId;return uu.set(y,fu(uu.get(y)||null,n,r,a,c,p)),!0;case"gotpointercapture":return y=p.pointerId,du.set(y,fu(du.get(y)||null,n,r,a,c,p)),!0}return!1}function cw(n){var r=Fn(n.target);if(r!==null){var a=l(r);if(a!==null){if(r=a.tag,r===13){if(r=u(a),r!==null){n.blockedOn=r,rs(n.priority,function(){aw(a)});return}}else if(r===31){if(r=d(a),r!==null){n.blockedOn=r,rs(n.priority,function(){aw(a)});return}}else if(r===3&&a.stateNode.current.memoizedState.isDehydrated){n.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}n.blockedOn=null}function Yf(n){if(n.blockedOn!==null)return!1;for(var r=n.targetContainers;0<r.length;){var a=K0(n.nativeEvent);if(a===null){a=n.nativeEvent;var c=new a.constructor(a.type,a);to=c,a.target.dispatchEvent(c),to=null}else return r=gr(a),r!==null&&iw(r),n.blockedOn=a,!1;r.shift()}return!0}function uw(n,r,a){Yf(n)&&a.delete(r)}function Aj(){Y0=!1,Aa!==null&&Yf(Aa)&&(Aa=null),Ma!==null&&Yf(Ma)&&(Ma=null),Na!==null&&Yf(Na)&&(Na=null),uu.forEach(uw),du.forEach(uw)}function Gf(n,r){n.blockedOn===r&&(n.blockedOn=null,Y0||(Y0=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Aj)))}var $f=null;function dw(n){$f!==n&&($f=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){$f===n&&($f=null);for(var r=0;r<n.length;r+=3){var a=n[r],c=n[r+1],p=n[r+2];if(typeof c!="function"){if(q0(c||a)===null)continue;break}var y=gr(a);y!==null&&(n.splice(r,3),r-=3,km(y,{pending:!0,data:p,method:a.method,action:c},c,p))}}))}function Il(n){function r(W){return Gf(W,n)}Aa!==null&&Gf(Aa,n),Ma!==null&&Gf(Ma,n),Na!==null&&Gf(Na,n),uu.forEach(r),du.forEach(r);for(var a=0;a<Da.length;a++){var c=Da[a];c.blockedOn===n&&(c.blockedOn=null)}for(;0<Da.length&&(a=Da[0],a.blockedOn===null);)cw(a),a.blockedOn===null&&Da.shift();if(a=(n.ownerDocument||n).$$reactFormReplay,a!=null)for(c=0;c<a.length;c+=3){var p=a[c],y=a[c+1],k=p[An]||null;if(typeof y=="function")k||dw(a);else if(k){var P=null;if(y&&y.hasAttribute("formAction")){if(p=y,k=y[An]||null)P=k.formAction;else if(q0(p)!==null)continue}else P=k.action;typeof P=="function"?a[c+1]=P:(a.splice(c,3),c-=3),dw(a)}}}function fw(){function n(y){y.canIntercept&&y.info==="react-transition"&&y.intercept({handler:function(){return new Promise(function(k){return p=k})},focusReset:"manual",scroll:"manual"})}function r(){p!==null&&(p(),p=null),c||setTimeout(a,20)}function a(){if(!c&&!navigation.transition){var y=navigation.currentEntry;y&&y.url!=null&&navigation.navigate(y.url,{state:y.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,p=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(a,100),function(){c=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),p!==null&&(p(),p=null)}}}function G0(n){this._internalRoot=n}Qf.prototype.render=G0.prototype.render=function(n){var r=this._internalRoot;if(r===null)throw Error(i(409));var a=r.current,c=ps();rw(a,c,n,r,null,null)},Qf.prototype.unmount=G0.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var r=n.containerInfo;rw(n.current,2,null,n,null,null),jf(),r[jn]=null}};function Qf(n){this._internalRoot=n}Qf.prototype.unstable_scheduleHydration=function(n){if(n){var r=Tn();n={blockedOn:null,target:n,priority:r};for(var a=0;a<Da.length&&r!==0&&r<Da[a].priority;a++);Da.splice(a,0,n),a===0&&cw(n)}};var hw=t.version;if(hw!=="19.3.1")throw Error(i(527,hw,"19.3.1"));ce.findDOMNode=function(n){var r=n._reactInternals;if(r===void 0)throw typeof n.render=="function"?Error(i(188)):(n=Object.keys(n).join(","),Error(i(268,n)));return n=g(r),n=n!==null?m(n):null,n=n===null?null:n.stateNode,n};var Mj={bundleType:0,version:"19.3.1",rendererPackageName:"react-dom",currentDispatcherRef:fe,reconcilerVersion:"19.3.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Xf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xf.isDisabled&&Xf.supportsFiber)try{Ie=Xf.inject(Mj),_e=Xf}catch{}}return pu.createRoot=function(n,r){if(!o(n))throw Error(i(299));var a=!1,c="",p=n1,y=r1,k=s1;return r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(c=r.identifierPrefix),r.onUncaughtError!==void 0&&(p=r.onUncaughtError),r.onCaughtError!==void 0&&(y=r.onCaughtError),r.onRecoverableError!==void 0&&(k=r.onRecoverableError)),r=tw(n,1,!1,null,null,a,c,null,p,y,k,fw),n[jn]=r.current,E0(n),new G0(r)},pu.hydrateRoot=function(n,r,a){if(!o(n))throw Error(i(299));var c=!1,p="",y=n1,k=r1,P=s1,W=null;return a!=null&&(a.unstable_strictMode===!0&&(c=!0),a.identifierPrefix!==void 0&&(p=a.identifierPrefix),a.onUncaughtError!==void 0&&(y=a.onUncaughtError),a.onCaughtError!==void 0&&(k=a.onCaughtError),a.onRecoverableError!==void 0&&(P=a.onRecoverableError),a.formState!==void 0&&(W=a.formState)),r=tw(n,1,!0,r,a??null,c,p,W,y,k,P,fw),r.context=nw(null),a=r.current,c=ps(),c=Vt(c),p=ma(c),p.callback=null,ya(a,p,c),a=c,r.current.lanes=a,ft(r,a),fi(r),n[jn]=r.current,E0(n),new Qf(r)},pu.version="19.3.1",pu}var Ew;function Hj(){if(Ew)return X0.exports;Ew=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),X0.exports=Uj(),X0.exports}var Fj=Hj();const Rw={};function rr(e,t){const s=b.useRef(Rw);return s.current===Rw&&(s.current=e(t)),s}const jy=[];let Iy;function Bj(){return Iy}function Vj(e){jy.push(e)}function Wu(e){const t=(s,i)=>{const o=rr(Kj).current;let l;try{Iy=o;for(const u of jy)u.before(o);l=e(s,i);for(const u of jy)u.after(o);o.didInitialize=!0}finally{Iy=void 0}return l};return t.displayName=e.displayName||e.name,t}function vp(e){return b.forwardRef(Wu(e))}function Kj(){return{didInitialize:!1}}function En(){}const Ls=Object.freeze([]),Xt=Object.freeze({}),qj=()=>{},Pe=typeof document<"u"?b.useLayoutEffect:qj;function Yj(e,t){return function(i,...o){const l=new URL(e);return l.searchParams.set("code",i.toString()),o.forEach(u=>l.searchParams.append("args[]",u)),`${t} error #${i}; visit ${l} for the full message.`}}const cn=Yj("https://base-ui.com/production-error","Base UI"),iC=b.createContext(void 0);function Ju(e){const t=b.useContext(iC);if(t===void 0&&!e)throw new Error(cn(72));return t}function Tv(e){b.useEffect(e,Ls)}const gu=0;class zs{static create(){return new zs}currentId=gu;start(t,s){this.clear(),this.currentId=setTimeout(()=>{this.currentId=gu,s()},t)}isStarted(){return this.currentId!==gu}clear=()=>{this.currentId!==gu&&(clearTimeout(this.currentId),this.currentId=gu)};disposeEffect=()=>this.clear}function Un(){const e=rr(zs.create).current;return Tv(e.disposeEffect),e}function Gj(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}const{userAgent:$j,platform:Qj,maxTouchPoints:Xj}=Gj(),bp=$j.toLowerCase(),_u=Qj.toLowerCase(),xp=/^i(os$|p)/.test(_u)||_u==="macintel"&&Xj>1,Cw="android",Py=_u===Cw||bp.includes(Cw),kv=!xp&&_u.startsWith("mac");_u.startsWith("win");const Zj=kv||xp,Ri=typeof CSS<"u"&&!!CSS.supports?.("-webkit-backdrop-filter:none");!Ri&&bp.includes("firefox");!Ri&&bp.includes("chrom");const Wj=Zj,Ov=/jsdom|happydom/.test(bp);function Gs(e){e.preventDefault(),e.stopPropagation()}function Jj(e){return"nativeEvent"in e}function nc(e){return e.pointerType===""&&e.isTrusted?!0:Py&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Av(e){return Ov?!1:!Py&&e.width===0&&e.height===0||e.type==="pointerdown"&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"&&(Py||e.buttons===0)||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Ha(e,t){const s=["mouse","pen"];return t||s.push("",void 0),s.includes(e)}function e4(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}function Sp(){return typeof window<"u"}function Rr(e){return Mv(e)?(e.nodeName||"").toLowerCase():"#document"}function Rn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function na(e){var t;return(t=(Mv(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Mv(e){return Sp()?e instanceof Node||e instanceof Rn(e).Node:!1}function ln(e){return Sp()?e instanceof Element||e instanceof Rn(e).Element:!1}function bn(e){return Sp()?e instanceof HTMLElement||e instanceof Rn(e).HTMLElement:!1}function Lo(e){return!Sp()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Rn(e).ShadowRoot}function ed(e){const{overflow:t,overflowX:s,overflowY:i,display:o}=vs(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+s)&&o!=="inline"&&o!=="contents"}function t4(e){return/^(table|td|th)$/.test(Rr(e))}function wp(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const n4=/transform|translate|scale|rotate|perspective|filter/,r4=/paint|layout|strict|content/,To=e=>!!e&&e!=="none";let ey;function Nv(e){const t=ln(e)?vs(e):e;return To(t.transform)||To(t.translate)||To(t.scale)||To(t.rotate)||To(t.perspective)||!Dv()&&(To(t.backdropFilter)||To(t.filter))||n4.test(t.willChange||"")||r4.test(t.contain||"")}function s4(e){let t=Ji(e);for(;bn(t)&&!Xi(t);){if(Nv(t))return t;if(wp(t))return null;t=Ji(t)}return null}function Dv(){return ey==null&&(ey=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ey}function Xi(e){return/^(html|body|#document)$/.test(Rr(e))}function vs(e){return Rn(e).getComputedStyle(e)}function Ep(e){return ln(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ji(e){if(Rr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Lo(e)&&e.host||na(e);return Lo(t)?t.host:t}function aC(e){const t=Ji(e);return Xi(t)?(e.ownerDocument||e).body:bn(t)&&ed(t)?t:aC(t)}function Uu(e,t,s){var i;t===void 0&&(t=[]),s===void 0&&(s=!0);const o=aC(e),l=o===((i=e.ownerDocument)==null?void 0:i.body),u=Rn(o);if(l){const d=Ly(u);return t.concat(u,u.visualViewport||[],ed(o)?o:[],d&&s?Uu(d):[])}else return t.concat(o,Uu(o,[],s))}function Ly(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Br(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function st(e,t){if(!e||!t)return!1;const s=t.getRootNode?.();if(e.contains(t))return!0;if(s&&Lo(s)){let i=t;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function Hu(e,t){let s=e;for(;s;){if(ln(s)&&s.matches(t))return s;s=s.assignedSlot??s.parentNode??(Lo(s)?s.host:null)}return null}function sr(e){return"composedPath"in e?e.composedPath()[0]??e.target:e.target}const zy="data-base-ui-focusable",oC="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Rp="ArrowLeft",Cp="ArrowRight",lC="ArrowUp",jv="ArrowDown",Iv="data-starting-style",i4="data-ending-style",a4={[Iv]:""},o4={[i4]:""},ei={transitionStatus(e){return e==="starting"?a4:e==="ending"?o4:null}},l4="data-open",c4="data-closed",u4="data-anchor-hidden",cC="data-popup-open",d4="data-pressed",f4={[cC]:""},h4={[cC]:"",[d4]:""},p4={[l4]:""},g4={[c4]:""},m4={[u4]:""},Tp={open(e){return e?f4:null}},Fu={open(e){return e?h4:null}},td={open(e){return e?p4:g4},anchorHidden(e){return e?m4:null}},kp={...td,...ei},_y="data-trigger-disabled";function Fh(e,t){if(!ln(e))return!1;const s=e;if(t.hasElement(s))return!s.hasAttribute(_y);for(const[,i]of t.entries())if(st(i,s))return!i.hasAttribute(_y);return!1}function ty(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const s=e;return s.target!=null&&t.contains(s.target)}function y4(e){return e.matches("html,body")}function nd(e){return bn(e)&&e.matches(oC)}function v4(e){return Hu(e,`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${oC}`)!=null}function Uy(e){return e?e.getAttribute("role")==="combobox"&&nd(e):!1}function b4(e){if(!e||Ov)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Bh(e){return e?e.hasAttribute(zy)?e:e.querySelector(`[${zy}]`)||e:null}function x4(e,t){return t!=null&&!Ha(t)?0:typeof e=="function"?e():e}function zo(e,t,s){const i=x4(e,s);return typeof i=="number"?i:i?.[t]}function Tw(e){return typeof e=="function"?e():e}function uC(e,t){return t||e==="click"||e==="mousedown"}function S4(e){return e?.includes("mouse")&&e!=="mousedown"}function lt(e,t,s,i){let o=!1,l=!1;const u=i??Xt;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){l=!0},get isCanceled(){return o},get isPropagationAllowed(){return l},trigger:s,...u}}function w4(e,t,s){const i=s??Xt;return{reason:e,event:t??new Event("base-ui"),...i}}const Cr="none",Qs="trigger-press",Kn="trigger-hover",Kl="trigger-focus",Op="outside-press",jo="item-press",dC="close-press",Ba="focus-out",rd="escape-key",Vh="list-navigation",fC="keyboard",E4="pointer",Pv="cancel-open",Su="sibling-open",hC="disabled",kw="missing",Ow="initial",sd="imperative-action",R4="window-resize",pC=b.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new zs,currentIdRef:{current:null},currentContextRef:{current:null}});function C4(e,t){e.current=t.current}function T4(e){const{children:t,delay:s,timeoutMs:i=0}=e,o=b.useRef(s),l=b.useRef(s),u=b.useRef(null),d=b.useRef(null),f=Un();return Pe(()=>{if(l.current=s,!u.current){o.current=s;return}o.current={open:zo(o.current,"open"),close:zo(s,"close")}},[s,u,o,l]),v.jsx(pC.Provider,{value:b.useMemo(()=>({hasProvider:!0,delayRef:o,initialDelayRef:l,currentIdRef:u,timeoutMs:i,currentContextRef:d,timeout:f}),[i,f]),children:t})}function k4(e,t={open:!1}){const{open:s}=t,i=e.useState("floatingId"),o=b.useContext(pC),{currentIdRef:l,delayRef:u,timeoutMs:d,initialDelayRef:f,currentContextRef:g,hasProvider:m,timeout:h}=o,[x,S]=b.useState(!1),w=b.useRef(s);return Pe(()=>{w.current=s},[s]),Pe(()=>{function C(){g.current?.setIsInstantPhase(!1),l.current=null,g.current=null,u.current=f.current,h.clear()}if(l.current&&!s&&l.current===i){if(S(!1),d){const E=i;return h.start(d,()=>{e.select("open")||l.current&&l.current!==E||C()}),()=>{(w.current||l.current!==E)&&h.clear()}}C()}},[s,i,l,u,d,f,g,h,e]),Pe(()=>{if(!s)return;const C=g.current,E=l.current;h.clear(),g.current={onOpenChange:e.setOpen,setIsInstantPhase:S},l.current=i,u.current={open:0,close:zo(f.current,"close")},E!==null&&E!==i?(S(!0),C?.setIsInstantPhase(!0),C?.onOpenChange(!1,lt(Cr))):(S(!1),C?.setIsInstantPhase(!1))},[s,i,e,l,u,f,g,h]),Pe(()=>()=>{if(l.current===i){if(g.current=null,!w.current)return;l.current=null,C4(u,f),h.clear()}},[g,l,u,i,f,h]),b.useMemo(()=>({activeIdRef:l,hasProvider:m,delayRef:u,isInstantPhase:x}),[l,m,u,x])}function Lt(e,t,s,i){return e.addEventListener(t,s,i),()=>{e.removeEventListener(t,s,i)}}function bi(...e){return()=>{for(let t=0;t<e.length;t+=1){const s=e[t];s&&s()}}}function es(e,t,s,i){const o=rr(gC).current;return A4(o,e,t,s,i)&&mC(o,[e,t,s,i]),o.callback}function O4(e){const t=rr(gC).current;return M4(t,e)&&mC(t,e),t.callback}function gC(){return{callback:null,cleanup:null,refs:[]}}function A4(e,t,s,i,o){return e.refs[0]!==t||e.refs[1]!==s||e.refs[2]!==i||e.refs[3]!==o}function M4(e,t){return e.refs.length!==t.length||e.refs.some((s,i)=>s!==t[i])}function mC(e,t){if(e.refs=t,t.every(s=>s==null)){e.callback=null;return}e.callback=s=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),s!=null){const i=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const l=t[o];if(l!=null)switch(typeof l){case"function":{const u=l(s);typeof u=="function"&&(i[o]=u);break}case"object":{l.current=s;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const l=t[o];if(l!=null)switch(typeof l){case"function":{const u=i[o];typeof u=="function"?u():l(null);break}case"object":{l.current=null;break}}}}}}}function Ln(e){const t=rr(N4,e).current;return t.next=e,Pe(t.effect),t}function N4(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const Lv={...rC},ny=Lv.useInsertionEffect,D4=ny&&ny!==Lv.useLayoutEffect?ny:e=>e();function Be(e){const t=rr(j4).current;return t.next=e,D4(t.effect),t.trampoline}function j4(){const e={next:void 0,callback:I4,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function I4(){}const Zf=null;class P4{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const s=this.callbacks,i=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,i>0)for(let o=0;o<s.length;o+=1)s[o]?.(t)};request(t){const s=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),s}cancel(t){const s=t-this.startId;s<0||s>=this.callbacks.length||this.callbacks[s]!==null&&(this.callbacks[s]=null,this.callbacksCount-=1)}}let Wf=new P4;class Nr{static create(){return new Nr}static request(t){return Wf.request(t)}static cancel(t){return Wf.cancel(t)}currentId=Zf;request(t){this.cancel(),this.currentId=Wf.request(()=>{this.currentId=Zf,t()})}cancel=()=>{this.currentId!==Zf&&(Wf.cancel(this.currentId),this.currentId=Zf)};disposeEffect=()=>this.cancel}function rc(){const e=rr(Nr.create).current;return Tv(e.disposeEffect),e}function qt(e){return e?.ownerDocument||document}const yC={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},id={...yC,position:"fixed",margin:0,top:0,left:0},Ap={...yC,position:"absolute"},Va=b.forwardRef(function(t,s){const[i,o]=b.useState();Pe(()=>{Wj&&Ri&&o("button")},[]);const l={tabIndex:0,role:i};return v.jsx("span",{...t,ref:s,style:id,"aria-hidden":i?void 0:!0,...l,"data-base-ui-focus-guard":""})}),sc=Math.min,Zi=Math.max,Kh=Math.round,Jf=Math.floor,Wi=e=>({x:e,y:e}),L4={left:"right",right:"left",bottom:"top",top:"bottom"};function vC(e,t,s){return Zi(e,sc(t,s))}function Ka(e,t){return typeof e=="function"?e(t):e}function ys(e){return e.split("-")[0]}function xi(e){return e.split("-")[1]}function zv(e){return e==="x"?"y":"x"}function _v(e){return e==="y"?"height":"width"}function Is(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Uv(e){return zv(Is(e))}function z4(e,t,s){s===void 0&&(s=!1);const i=xi(e),o=Uv(e),l=_v(o);let u=o==="x"?i===(s?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(u=qh(u)),[u,qh(u)]}function _4(e){const t=qh(e);return[Hy(e),t,Hy(t)]}function Hy(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Aw=["left","right"],Mw=["right","left"],U4=["top","bottom"],H4=["bottom","top"];function F4(e,t,s){switch(e){case"top":case"bottom":return s?t?Mw:Aw:t?Aw:Mw;case"left":case"right":return t?U4:H4;default:return[]}}function B4(e,t,s,i){const o=xi(e);let l=F4(ys(e),s==="start",i);return o&&(l=l.map(u=>u+"-"+o),t&&(l=l.concat(l.map(Hy)))),l}function qh(e){const t=ys(e);return L4[t]+e.slice(t.length)}function V4(e){var t,s,i,o;return{top:(t=e.top)!=null?t:0,right:(s=e.right)!=null?s:0,bottom:(i=e.bottom)!=null?i:0,left:(o=e.left)!=null?o:0}}function bC(e){return typeof e!="number"?V4(e):{top:e,right:e,bottom:e,left:e}}function Bu(e){const{x:t,y:s,width:i,height:o}=e;return{width:i,height:o,top:s,left:t,right:t+i,bottom:s+o,x:t,y:s}}function ql(e,t){return t<0||t>=e.length}function Ch(e,t){return Yl(e.current,{disabledIndices:t})}function Fy(e,t){return Yl(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function K4(e,t,s){const{decrement:i,loopFocus:o,allowEscape:l,disabledIndices:u,minIndex:d,maxIndex:f}=s,g=()=>Yl(e,{startingIndex:t,decrement:i,disabledIndices:u});let m,h=!1;if(!o)m=i?Math.max(d,g()):Math.min(f,g());else if(i?t<=d:t>=f){const x=i?-1:e.length;l&&t!==x?m=-1:(m=i?f:d,h=!0)}else m=g();return{index:ql(e,m)?-1:m,wrapped:h}}function Yl(e,{startingIndex:t=-1,decrement:s=!1,disabledIndices:i,amount:o=1}={}){let l=t;do l+=s?-o:o;while(l>=0&&l<=e.length-1&&Gl(e,l,i));return l}function Gl(e,t,s){if(typeof s=="function"?s(t):s?.includes(t)??!1)return!0;const o=e[t];return o?!Mp(o)||o.matches(":disabled")?!0:!s&&(o.hasAttribute("disabled")||o.getAttribute("aria-disabled")==="true"):!1}function q4(e){return e.visibility==="hidden"||e.visibility==="collapse"}function Mp(e,t=e?vs(e):null){return!e||!e.isConnected||!t||q4(t)?!1:typeof e.checkVisibility=="function"?e.checkVisibility():t.display!=="none"&&t.display!=="contents"}const Y4='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function G4(e){const t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;const s=e.getRootNode();return Lo(s)?s.host:null}function By(e){for(const t of Array.from(e.children))if(Rr(t)==="summary")return t;return null}function $4(e,t){const s=By(t);return!!s&&(e===s||st(s,e))}function xC(e){const t=e?Rr(e):"";return e!=null&&e.matches(Y4)&&(t!=="summary"||e.parentElement!=null&&Rr(e.parentElement)==="details"&&By(e.parentElement)===e)&&(t!=="details"||By(e)==null)&&(t!=="input"||e.type!=="hidden")}function Hv(e){if(!xC(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let t=e;t;t=G4(t)){const s=t!==e,i=Rr(t)==="slot";if(t.hasAttribute("inert")||s&&Rr(t)==="details"&&!t.open&&!$4(e,t)||t.hasAttribute("hidden")||!i&&!Q4(t,s))return!1}return!0}function Q4(e,t){const s=vs(e);return t?s.display!=="none":Mp(e,s)}function SC(e){const t=e.tabIndex;if(t<0){const s=Rr(e);if(s==="details"||s==="audio"||s==="video"||bn(e)&&e.isContentEditable)return 0}return t}function ry(e){if(Rr(e)!=="input")return null;const t=e;return t.type==="radio"&&t.name!==""?t:null}function wC(e,t){const s=ry(e);if(!s)return!0;const i=t.find(o=>{const l=ry(o);return l?.name===s.name&&l.form===s.form&&l.checked});return i?i===s:t.find(o=>{const l=ry(o);return l?.name===s.name&&l.form===s.form})===s}function EC(e){if(bn(e)&&Rr(e)==="slot"){const t=e.assignedElements({flatten:!0});if(t.length>0)return t}return bn(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Fv(e,t){EC(e).forEach(s=>{xC(s)&&t.push(s),Fv(s,t)})}function RC(e,t,s){EC(e).forEach(i=>{bn(i)&&i.matches(t)&&s.push(i),RC(i,t,s)})}function Np(e){return Hv(e)&&SC(e)>=0}function CC(e){const t=[];return Fv(e,t),t.filter(Hv)}function Dp(e){const t=CC(e);return t.filter(s=>SC(s)>=0&&wC(s,t))}function TC(e,t){const s=Dp(e),i=s.length;if(i===0)return;const o=Br(qt(e)),l=s.indexOf(o),u=l===-1?t===1?0:i-1:l+t;return s[u]}function kC(e){return TC(qt(e).body,1)||e}function OC(e){return TC(qt(e).body,-1)||e}function X4(e,t,s){if(!e)return null;const i=[];Fv(qt(e).body,i);const o=i.indexOf(e);if(o===-1)return null;const l=i.filter(Hv);for(let u=1;u<i.length;u+=1){const d=i[(o+t*u+i.length)%i.length];if(!st(s,d)&&Np(d)&&wC(d,l))return d}return i[o]}function $l(e,t){const s=t||e.currentTarget,i=e.relatedTarget;return!i||!st(s,i)}function Z4(e){Dp(e).forEach(s=>{s.dataset.tabindex=s.getAttribute("tabindex")||"",s.setAttribute("tabindex","-1")})}function Nw(e){const t=[];RC(e,"[data-tabindex]",t),t.forEach(s=>{const i=s.dataset.tabindex;delete s.dataset.tabindex,i?s.setAttribute("tabindex",i):s.removeAttribute("tabindex")})}function qa(e,t,s=!0){return e.filter(o=>o.parentId===t).flatMap(o=>[...!s||o.context?.open?[o]:[],...qa(e,o.id,s)])}function Dw(e,t){let s=[],i=e.find(o=>o.id===t)?.parentId;for(;i;){const o=e.find(l=>l.id===i);i=o?.parentId,o&&(s=s.concat(o))}return s}function Ql(e){return`data-base-ui-${e}`}let eh=0;function Th(e,t={}){const{preventScroll:s=!1,sync:i=!1,shouldFocus:o}=t;cancelAnimationFrame(eh);function l(){o&&!o()||e?.focus({preventScroll:s})}if(i)return l(),En;const u=requestAnimationFrame(l);return eh=u,()=>{eh===u&&(cancelAnimationFrame(u),eh=0)}}const jw="data-base-ui-inert";let mu=new WeakMap,th=new WeakSet,yu=new WeakMap,sy=0;function AC(e){return e?Lo(e)?e.host:AC(e.parentNode):null}const Iw=(e,t)=>t.map(s=>{if(e.contains(s))return s;const i=AC(s);return e.contains(i)?i:null}).filter(s=>s!=null),Pw=e=>{const t=new Set;return e.forEach(s=>{let i=s;for(;i&&!t.has(i);)t.add(i),i=i.parentNode}),t},Lw=(e,t,s)=>{const i=[],o=l=>{!l||s.has(l)||Array.from(l.children).forEach(u=>{Rr(u)!=="script"&&(t.has(u)?o(u):i.push(u))})};return o(e),i};function W4(e,t,s,{mark:i=!0}){const o=Iw(t,e),l=i?Lw(t,Pw(o),new Set(o)):[],u=[],d=[];if(s){const f=Iw(t,Array.from(t.querySelectorAll("[aria-live]"))),g=o.concat(f);Lw(t,Pw(g),new Set(g)).forEach(h=>{const x=h.getAttribute("aria-hidden"),S=x!==null&&x!=="false",w=(mu.get(h)||0)+1;mu.set(h,w),u.push(h),w===1&&S&&th.add(h),S||h.setAttribute("aria-hidden","true")})}return i&&l.forEach(f=>{const g=(yu.get(f)||0)+1;yu.set(f,g),d.push(f),g===1&&f.setAttribute(jw,"")}),sy+=1,()=>{u.forEach(f=>{const g=(mu.get(f)||0)-1;mu.set(f,g),g||(th.has(f)||f.removeAttribute("aria-hidden"),th.delete(f))}),i&&d.forEach(f=>{const g=(yu.get(f)||0)-1;yu.set(f,g),g||f.removeAttribute(jw)}),sy-=1,sy||(mu=new WeakMap,th=new WeakSet,yu=new WeakMap)}}function zw(e,t={}){const{ariaHidden:s=!1,mark:i=!0}=t,o=qt(e[0]).body;return W4(e,o,s,{mark:i})}var hr=sC();const J4=nC(hr);function MC(){const[,e]=b.useState({});return b.useCallback(()=>{e({})},[])}let _w=0;function eI(e,t="mui"){const s=b.useRef(void 0),i=MC(),o=e??s.current;return b.useEffect(()=>{s.current==null&&(_w+=1,s.current=`${t}-${_w}`,e==null&&i())},[e,t,i]),o}const Uw=Lv.useId;function lc(e,t){if(Uw!==void 0){const s=Uw();return e??(t?`${t}-${s}`:s)}return eI(e,t)}const tI=parseInt(b.version,10);function Bv(e){return tI>=e}function Hw(e){if(!b.isValidElement(e))return null;const t=e,s=t.props;return(Bv(19)?s?.ref:t.ref)??null}function Vy(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function nI(e,t){const s={};for(const i in e){const o=e[i];if(t?.hasOwnProperty(i)){const l=t[i](o);l!=null&&Object.assign(s,l);continue}o===!0?s[`data-${i.toLowerCase()}`]="":o&&(s[`data-${i.toLowerCase()}`]=o.toString())}return s}function rI(e,t){return typeof e=="function"?e(t):e}function NC(e,t){return typeof e=="function"?e(t):e}const DC={};function Dr(e,t,s,i,o){if(!s&&!i&&!o&&!e)return Yh(t);let l=Yh(e);return t&&(l=wu(l,t)),s&&(l=wu(l,s)),i&&(l=wu(l,i)),o&&(l=wu(l,o)),l}function sI(e){if(e.length===0)return DC;if(e.length===1)return Yh(e[0]);let t=Yh(e[0]);for(let s=1;s<e.length;s+=1)t=wu(t,e[s]);return t}function Yh(e){return IC(e)?{...e(DC)}:iI(e)}function wu(e,t){return IC(t)?t(e):aI(e,t)}function iI(e){const t={...e};for(const s in t){const i=t[s];jC(s,i)&&(t[s]=PC(i))}return t}function aI(e,t){if(!t)return e;for(const s in t){const i=t[s];switch(s){case"style":{e[s]=Vy(e.style,i);break}case"className":{e[s]=LC(e.className,i);break}default:jC(s,i)?e[s]=oI(e[s],i):e[s]=i}}return e}function jC(e,t){const s=e.charCodeAt(0),i=e.charCodeAt(1),o=e.charCodeAt(2);return s===111&&i===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function IC(e){return typeof e=="function"}function oI(e,t){return t?e?(...s)=>{const i=s[0];if(zC(i)){const l=i;Gh(l);const u=t(...s);return l.baseUIHandlerPrevented||e?.(...s),u}const o=t(...s);return e?.(...s),o}:PC(t):e}function PC(e){return e&&((...t)=>{const s=t[0];return zC(s)&&Gh(s),e(...t)})}function Gh(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function LC(e,t){return t?e?t+" "+e:t:e}function zC(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function bt(e,t,s={}){let i=t.render;s.enabled!==!1&&(i=Vv(i));const o=lI(t,s,i);if(s.enabled===!1)return null;const l=s.state??Xt;return dI(e,i,o,l)}function lI(e,t,s){const{className:i,style:o}=e,{state:l=Xt,ref:u,props:d,stateAttributesMapping:f,enabled:g=!0}=t,m=g?rI(i,l):void 0,h=g?NC(o,l):void 0,x=g?nI(l,f):Xt,S=g&&d?cI(d):void 0,w=g?Vy(x,S)??{}:Xt;return typeof document<"u"&&(g?Array.isArray(u)?w.ref=O4([w.ref,Hw(s),...u]):w.ref=es(w.ref,Hw(s),u):es(null,null)),g?(m!==void 0&&(w.className=LC(w.className,m)),h!==void 0&&(w.style=Vy(w.style,h)),w):Xt}function cI(e){return Array.isArray(e)?sI(e):Dr(void 0,e)}const uI=Symbol.for("react.lazy");function Vv(e){if(e?.$$typeof!==uI)return e;const t=b.Children.toArray(e)[0];return b.isValidElement(t)?t:e}function dI(e,t,s,i){if(t){if(typeof t=="function")return t(s,i);const o=Dr(s,t.props);return o.ref=s.ref,b.cloneElement(t,o)}return fI(e,s)}function fI(e,t){return e==="button"?b.createElement("button",{type:"button",...t,key:t.key}):e==="img"?b.createElement("img",{alt:"",...t,key:t.key}):b.createElement(e,t)}const hI=500,_C=500,pI={style:{transition:"none"}},Kv="data-base-ui-click-trigger",UC={fallbackAxisSide:"none"},qv={fallbackAxisSide:"end"},gI={clipPath:"inset(50%)",position:"fixed",top:0,left:0},HC=b.createContext(null),FC=()=>b.useContext(HC),mI=Ql("portal");function BC(e={}){const{ref:t,container:s,componentProps:i=Xt,elementProps:o}=e,l=lc(),d=FC()?.portalNode,[f,g]=b.useState(null),[m,h]=b.useState(null),x=Be(E=>{E!==null&&h(E)}),S=b.useRef(null);Pe(()=>{if(s===null){S.current&&(S.current=null,h(null),g(null));return}const E=(s&&(Mv(s)?s:s.current))??d??document.body;if(E==null){S.current&&(S.current=null,h(null),g(null));return}S.current!==E&&(S.current=E,h(null),g(E))},[s,d]);const w=bt("div",i,{ref:[t,x],props:[{id:l,[mI]:""},o]}),C=f&&w?hr.createPortal(w,f):null;return{node:m,nodeId:b.isValidElement(w)?w.props.id:void 0,subtree:C}}const jp=b.forwardRef(function(t,s){const{render:i,className:o,style:l,children:u,container:d,portalOwnerRole:f,...g}=t,{node:m,nodeId:h,subtree:x}=BC({container:d,ref:s,componentProps:t,elementProps:g}),S=b.useRef(null),w=b.useRef(null),C=b.useRef(null),E=b.useRef(null),[R,O]=b.useState(null),T=b.useRef(!1),A=R?.modal,N=R?.open,j=!!R&&!R.modal&&R.open&&!!m;b.useEffect(()=>{if(!m||A)return;function M(z){m&&z.relatedTarget&&$l(z)&&(z.type==="focusin"?T.current&&(Nw(m),T.current=!1):(Z4(m),T.current=!0))}return bi(Lt(m,"focusin",M,!0),Lt(m,"focusout",M,!0))},[m,A]),Pe(()=>{!m||N!==!0||!T.current||(Nw(m),T.current=!1)},[N,m]);const D=b.useMemo(()=>({beforeOutsideRef:S,afterOutsideRef:w,beforeInsideRef:C,afterInsideRef:E,portalNode:m,setFocusManagerState:O}),[m]);return v.jsxs(b.Fragment,{children:[x,v.jsxs(HC.Provider,{value:D,children:[j&&m&&v.jsx(Va,{"data-type":"outside",ref:S,onFocus:M=>{if($l(M,m))C.current?.focus();else{const z=R?R.domReference:null;OC(z)?.focus()}}}),j&&m&&v.jsx("span",{role:f,"aria-owns":h,style:gI}),m&&hr.createPortal(u,m),j&&m&&v.jsx(Va,{"data-type":"outside",ref:w,onFocus:M=>{if($l(M,m))E.current?.focus();else{const z=R?R.domReference:null;kC(z)?.focus(),R?.closeOnFocusOut&&R?.onOpenChange(!1,lt(Ba,M.nativeEvent))}}})]})]})});function VC(){const e=new Map;return{emit(t,s){e.get(t)?.forEach(i=>i(s))},on(t,s){e.has(t)||e.set(t,new Set),e.get(t).add(s)},off(t,s){e.get(t)?.delete(s)}}}class Yv{nodesRef={current:[]};events=VC();addNode(t){this.nodesRef.current.push(t)}removeNode(t){const s=this.nodesRef.current.findIndex(i=>i===t);s!==-1&&this.nodesRef.current.splice(s,1)}}const KC=b.createContext(null),qC=b.createContext(null),Qa=()=>b.useContext(KC)?.id||null,Xa=e=>{const t=b.useContext(qC);return e??t};function Gv(e){const t=lc(),s=Xa(e),i=Qa();return Pe(()=>{if(!t)return;const o={id:t,parentId:i};return s?.addNode(o),()=>{s?.removeNode(o)}},[s,t,i]),t}function YC(e){const{children:t,id:s}=e,i=Qa();return v.jsx(KC.Provider,{value:b.useMemo(()=>({id:s,parentId:i}),[s,i]),children:t})}function GC(e){const{children:t,externalTree:s}=e,i=rr(()=>s??new Yv).current;return v.jsx(qC.Provider,{value:i,children:t})}function Yi(e){return e==null?e:"current"in e?e.current:e}function yI(e,t){const s=Rn(sr(e));return e instanceof s.KeyboardEvent?"keyboard":e instanceof s.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||(nc(e)?"keyboard":t||"mouse"):"touches"in e?"touch":e instanceof s.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const Fw=20;let _a=[];function $v(){_a=_a.filter(e=>e.deref()?.isConnected)}function Bw(e){$v(),e&&Rr(e)!=="body"&&(_a.push(new WeakRef(e)),_a.length>Fw&&(_a=_a.slice(-Fw)))}function Vw(){return $v(),_a[_a.length-1]?.deref()}function vI(e){return e?Np(e)?e:Dp(e)[0]||e:null}function Kw(e){if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!e.getAttribute("role")?.includes("dialog"))return;const s=CC(e).filter(o=>{const l=o.getAttribute("data-tabindex")||"";return Np(o)||o.hasAttribute("data-tabindex")&&!l.startsWith("-")}),i=e.getAttribute("tabindex");s.length===0?i!=="0"&&(e.setAttribute("tabindex","0"),e.setAttribute("data-tabindex","0")):(i!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function Ip(e){const{context:t,children:s,disabled:i=!1,initialFocus:o=!0,returnFocus:l=!0,explicitReturnFocus:u,restoreFocus:d=!1,modal:f=!0,closeOnFocusOut:g=!0,openInteractionType:m="",nextFocusableElement:h,previousFocusableElement:x,beforeContentFocusGuardRef:S,externalTree:w,getInsideElements:C}=e,E=t.useState("open"),R=t.useState("domReferenceElement"),O=t.useState("floatingElement"),{events:T,dataRef:A}=t.context,N=Be(()=>A.current.floatingContext?.nodeId),j=o===!1,D=Uy(R)&&j,M=Ln(o),z=Ln(l),L=Ln(u),K=Ln(m),X=Ln(E),B=Xa(w),H=FC(),U=b.useRef(!1),_=b.useRef(!1),Q=b.useRef(!1),$=b.useRef(null),q=b.useRef(""),Y=b.useRef(""),ee=b.useRef(null),G=b.useRef(null),ae=es(ee,S,H?.beforeInsideRef),I=es(G,H?.afterInsideRef),F=Un(),Z=Un(),ne=rc(),ye=H!=null,se=Bh(O),ge=Be((be=se)=>be?Dp(be):[]),fe=Be(()=>C?.().filter(be=>be!=null)??[]);b.useEffect(()=>{if(i||!f)return;function be(Oe){Oe.key==="Tab"&&st(se,Br(qt(se)))&&ge().length===0&&!D&&Gs(Oe)}const Le=qt(se);return Lt(Le,"keydown",be)},[i,se,f,D,ge]),b.useEffect(()=>{if(i||!E)return;const be=qt(se);function Le(){Q.current=!1}function Oe(Ve){const ke=sr(Ve),Ue=fe(),xe=st(O,ke)||st(R,ke)||st(H?.portalNode,ke)||Ue.some(Fe=>Fe===ke||st(Fe,ke));Q.current=!xe,Y.current=Ve.pointerType||"keyboard",Hu(ke,`[${Kv}]`)&&(_.current=!0,Z.start(0,()=>{_.current=!1}))}function ze(){Y.current="keyboard"}return bi(Lt(be,"pointerdown",Oe,!0),Lt(be,"pointerup",Le,!0),Lt(be,"pointercancel",Le,!0),Lt(be,"keydown",ze,!0),Le)},[i,O,R,se,E,H,Z,fe]),b.useEffect(()=>{if(i||!g)return;const be=qt(se);function Le(){_.current=!0,Z.start(0,()=>{_.current=!1})}function Oe(Ue){const xe=sr(Ue);Np(xe)&&($.current=xe)}function ze(Ue){const xe=Ue.relatedTarget,Fe=Ue.currentTarget,Ze=sr(Ue);f&&xe==null&&Ze!=null&&st(O,Ze)&&Bw(Ze),queueMicrotask(()=>{const ot=N(),de=t.context.triggerElements,Ee=fe(),Ge=xe?.hasAttribute(Ql("focus-guard"))&&[ee.current,G.current,H?.beforeInsideRef.current,H?.afterInsideRef.current,H?.beforeOutsideRef.current,H?.afterOutsideRef.current,Yi(x),Yi(h)].includes(xe),Me=!(st(R,xe)||st(O,xe)||st(xe,O)||st(H?.portalNode,xe)||Ee.some(De=>De===xe||st(De,xe))||de.hasMatchingElement(De=>st(De,xe))||Ge||B&&(qa(B.nodesRef.current,ot).find(De=>st(De.context?.elements.floating,xe)||st(De.context?.elements.domReference,xe))||Dw(B.nodesRef.current,ot).find(De=>[De.context?.elements.floating,Bh(De.context?.elements.floating)].includes(xe)||De.context?.elements.domReference===xe)));if(Fe===R&&se&&Kw(se),d&&Fe!==R&&!Mp(Ze)&&Br(be)===be.body){if(bn(se)&&(se.focus(),d==="popup")){ne.request(()=>{se.focus()});return}const De=ge(),xt=$.current,dt=(xt&&De.includes(xt)?xt:null)||De[De.length-1]||se;bn(dt)&&dt.focus()}if(A.current.insideReactTree){A.current.insideReactTree=!1;return}(D||!f)&&xe&&Me&&!_.current&&(D||xe!==Vw())&&(U.current=!0,t.setOpen(!1,lt(Ba,Ue)))})}function Ve(){Q.current||(A.current.insideReactTree=!0,F.start(0,()=>{A.current.insideReactTree=!1}))}const ke=bn(R)?R:null;if(!(!O&&!ke))return bi(ke&&Lt(ke,"focusout",ze),ke&&Lt(ke,"pointerdown",Le),O&&Lt(O,"focusin",Oe),O&&Lt(O,"focusout",ze),O&&H&&Lt(O,"focusout",Ve,!0))},[i,R,O,se,f,B,H,t,g,d,ge,D,N,A,F,Z,ne,h,x,fe]),b.useEffect(()=>{if(i||!O||!E)return;const be=Array.from(H?.portalNode?.querySelectorAll(`[${Ql("portal")}]`)||[]),Oe=(B?Dw(B.nodesRef.current,N()):[]).find(Fe=>Uy(Fe.context?.elements.domReference||null))?.context?.elements.domReference,Ve=[...[O,...be,ee.current,G.current,H?.beforeOutsideRef.current,H?.afterOutsideRef.current,...fe()],Oe,Yi(x),Yi(h),D?R:null].filter(Fe=>Fe!=null),ke=zw(Ve,{ariaHidden:f||D,mark:!1}),Ue=[O,...be].filter(Fe=>Fe!=null),xe=zw(Ue);return()=>{xe(),ke()}},[E,i,R,O,f,H,D,B,N,h,x,fe]),Pe(()=>{if(!E||i||!bn(se))return;q.current="",Y.current="";const be=qt(se),Le=Br(be);queueMicrotask(()=>{const Oe=M.current,ze=typeof Oe=="function"?Oe(K.current||""):Oe;if(ze===void 0||ze===!1||st(se,Le))return;let ke=null;const Ue=()=>(ke==null&&(ke=ge(se)),ke[0]||se);let xe;ze===!0||ze===null?xe=Ue():xe=Yi(ze),xe=xe||Ue();const Fe=st(se,Br(be)),Ze=A.current.openEvent,ot=Ze?.type==="mousedown"&&nc(Ze);Th(xe,{sync:ot,preventScroll:xe===se,shouldFocus(){if(!X.current)return!1;if(Fe)return!0;const de=Br(be);return!(de!==xe&&st(se,de))}})})},[i,E,se,ge,M,K,X,A]);const ce=b.useRef(null);Pe(()=>{if(i||!se){ce.current=null;return}ce.current&&(ce.current.cancelled=!0,ce.current=null);const be=qt(se),Le=Br(be),Oe=K.current==null;Bw(Le);function ze(ke){if(ke.open||(q.current=yI(ke.nativeEvent,Y.current)),(ke.reason===Ba&&ke.triggerElement?.hasAttribute(Ql("focus-guard"))||ke.reason===Kn&&ke.nativeEvent.type==="mouseleave")&&(U.current=!0),ke.reason===Op)if(ke.nested)U.current=!1;else if(nc(ke.nativeEvent)||Av(ke.nativeEvent))U.current=!1;else{let Ue=!1;qt(se).createElement("div").focus({get preventScroll(){return Ue=!0,!1}}),Ue?U.current=!1:U.current=!0}}T.on("openchange",ze);function Ve(ke){const Ue=z.current;let xe=typeof Ue=="function"?Ue(ke):Ue;if(xe===void 0||xe===!1)return null;xe===null&&(xe=!0);const Fe=R?.isConnected?R:null,Ze=Le?.isConnected&&Rr(Le)!=="body"?Le:null;let ot=Oe?Ze||Fe:Fe||Ze;return ot||(ot=Vw()||null),typeof xe=="boolean"?ot:Yi(xe)||ot||null}return()=>{T.off("openchange",ze);const ke=Br(be),Ue=fe(),xe=st(O,ke)||Ue.some(Ee=>Ee===ke||st(Ee,ke))||B&&qa(B.nodesRef.current,N(),!1).some(Ee=>st(Ee.context?.elements.floating,ke)),Fe=z.current,Ze=q.current,ot=Ve(Ze),de={cancelled:!1};ce.current=de,queueMicrotask(()=>{ce.current===de&&(ce.current=null);const Ee=vI(ot),Ge=L.current??typeof Fe!="boolean";if(!de.cancelled&&Fe&&!U.current&&bn(Ee)&&(!(!Ge&&Ee!==ke&&ke!==be.body)||xe)){const Me={preventScroll:!0};Ze==="keyboard"&&(Me.focusVisible=!0),Ee.focus(Me)}U.current=!1})}},[i,O,se,z,L,K,T,B,R,N,fe]),Pe(()=>{if(!Ri||E||!O)return;const be=Br(qt(O));!bn(be)||!nd(be)||st(O,be)&&be.blur()},[E,O]),Pe(()=>{if(!(i||!H))return H.setFocusManagerState({modal:f,closeOnFocusOut:g,open:E,onOpenChange:t.setOpen,domReference:R}),()=>{H.setFocusManagerState(null)}},[i,H,f,E,t,g,R]),Pe(()=>{if(!(i||!se))return Kw(se),()=>{queueMicrotask($v)}},[i,se]);const Re=!i&&(f?!D:!0)&&(ye||f);return v.jsxs(b.Fragment,{children:[Re&&v.jsx(Va,{"data-type":"inside",ref:ae,onFocus:be=>{if(f){const Le=ge();Th(Le[Le.length-1])}else H?.portalNode&&(U.current=!1,$l(be,H.portalNode)?kC(R)?.focus():Yi(x??H.beforeOutsideRef)?.focus())}}),s,Re&&v.jsx(Va,{"data-type":"inside",ref:I,onFocus:be=>{f?Th(ge()[0]):H?.portalNode&&(g&&(U.current=!0),$l(be,H.portalNode)?OC(R)?.focus():Yi(h??H.afterOutsideRef)?.focus())}})]})}function Pp(e,t={}){const{enabled:s=!0,event:i="click",toggle:o=!0,ignoreMouse:l=!1,stickIfOpen:u=!0,touchOpenDelay:d=0,reason:f=Qs}=t,g=e.context.dataRef,m=b.useRef(void 0),h=rc(),x=Un(),S=b.useMemo(()=>{function w(E,R,O,T){const A=lt(f,R,O);E&&T==="touch"&&d>0?x.start(d,()=>{e.setOpen(!0,A)}):e.setOpen(E,A)}function C(E,R,O){const T=g.current.openEvent,A=e.select("domReferenceElement")!==R;return E&&A||!E||!o?!0:T&&(typeof u=="function"?u():u)?!O(T.type):!1}return{onPointerDown(E){m.current=Ha(E.pointerType,!0)&&Av(E.nativeEvent)?"virtual":E.pointerType},onMouseDown(E){const R=m.current,O=E.nativeEvent,T=e.select("open");if(E.button!==0||i==="click"||Ha(R,!0)&&l)return;const A=C(T,E.currentTarget,M=>M==="click"||M==="mousedown"),N=sr(O),j=nd(N);if(j||R==="virtual"){w(A,O,j?N:E.currentTarget,R);return}const D=E.currentTarget;h.request(()=>{w(A,O,D,R)})},onClick(E){if(i==="mousedown-only")return;const R=m.current;if(i==="mousedown"&&R){m.current=void 0;return}if(Ha(R,!0)&&l)return;const O=e.select("open"),T=C(O,E.currentTarget,A=>A==="click"||A==="mousedown"||A==="keydown"||A==="keyup");w(T,E.nativeEvent,E.currentTarget,R)},onKeyDown(){m.current=void 0}}},[g,i,l,f,e,u,o,h,x,d]);return b.useMemo(()=>s?{reference:S}:Xt,[s,S])}function bI(e,t){let s=null,i=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){const l=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},u=t.axis==="x"||t.axis==="both",d=t.axis==="y"||t.axis==="both",f=["mouseenter","mousemove"].includes(t.dataRef.current.openEvent?.type||"")&&t.pointerType!=="touch",g=t.axis==="y"?l.width:0,m=t.axis==="x"?l.height:0;let h=l.x,x=l.y;return s==null&&t.x&&u&&(s=l.x-t.x),i==null&&t.y&&d&&(i=l.y-t.y),h-=s||0,x-=i||0,(!o||f)&&(h=u&&t.x!=null?t.x:h,x=d&&t.y!=null?t.y:x),o=!0,{width:g,height:m,x:h,y:x,top:x,right:h+g,bottom:x+m,left:h}}}}function qw(e){return e!=null&&e.clientX!=null}function xI(e,t={}){const{enabled:s=!0,axis:i="both"}=t,o=e.useState("open"),l=e.useState("floatingElement"),u=e.useState("domReferenceElement"),d=e.context.dataRef,f=b.useRef(!1),g=b.useRef(null),[m,h]=b.useState(),[x,S]=b.useState([]),w=Be(T=>{e.set("positionReference",T)}),C=Be((T,A,N)=>{f.current||d.current.openEvent&&!qw(d.current.openEvent)||e.set("positionReference",bI(N??u,{x:T,y:A,axis:i,dataRef:d,pointerType:m}))}),E=Be(T=>{o?g.current||(C(T.clientX,T.clientY,T.currentTarget),S([])):C(T.clientX,T.clientY,T.currentTarget)}),R=Ha(m)?l:o;b.useEffect(()=>{if(!s){w(u);return}if(!R)return;function T(){g.current?.(),g.current=null}const A=Rn(l);function N(j){const D=sr(j);st(l,D)?T():C(j.clientX,j.clientY)}return!d.current.openEvent||qw(d.current.openEvent)?g.current=Lt(A,"mousemove",N):w(u),T},[R,s,l,d,u,e,C,w,x]),b.useEffect(()=>()=>{e.set("positionReference",null)},[e]),b.useEffect(()=>{s&&!l&&(f.current=!1)},[s,l]),b.useEffect(()=>{!s&&o&&(f.current=!0)},[s,o]);const O=b.useMemo(()=>{function T(A){h(A.pointerType)}return{onPointerDown:T,onPointerEnter:T,onMouseMove:E,onMouseEnter:E}},[E]);return b.useMemo(()=>s?{reference:O,trigger:O}:{},[s,O])}function SI(){return!1}function wI(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function ad(e,t={}){const{enabled:s=!0,escapeKey:i=!0,outsidePress:o=!0,outsidePressEvent:l="sloppy",referencePress:u=SI,bubbles:d,externalTree:f}=t,g=e.useState("open"),m=e.useState("floatingElement"),{dataRef:h,events:x}=e.context,S=Xa(f),w=Be(typeof o=="function"?o:()=>!1),C=typeof o=="function"?w:o,E=C!==!1,R=Be(()=>l),{escapeKey:O,outsidePress:T}=wI(d),A=b.useRef(!1),N=b.useRef(!1),j=b.useRef(!1),D=b.useRef(!1),M=b.useRef(!1),z=b.useRef(""),L=b.useRef(null),K=Un(),X=Un(),B=Un(),H=Be(()=>{X.clear(),h.current.insideReactTree=!1}),U=Be(I=>{const F=h.current.floatingContext?.nodeId;return(S?qa(S.nodesRef.current,F):[]).some(ne=>ne.context?.open&&!ne.context.dataRef.current[I])}),_=Be(I=>ty(I,e.select("floatingElement"))||ty(I,e.select("domReferenceElement"))),Q=Be(I=>{u()&&e.setOpen(!1,lt(Qs,I.nativeEvent))}),$=Be(I=>{if(!g||!s||!i||I.key!=="Escape")return;const F=Jj(I)?I.nativeEvent:I;if(M.current||F.isComposing||!O&&U("__escapeKeyBubbles"))return;const Z=lt(rd,F);e.setOpen(!1,Z),Z.isCanceled||I.preventDefault(),!O&&!Z.isPropagationAllowed&&I.stopPropagation()}),q=Be(()=>{h.current.insideReactTree=!0,X.start(0,H)}),Y=Be(I=>{if(!g||!s||I.button!==0)return;const F=sr(I.nativeEvent);st(e.select("floatingElement"),F)&&(A.current||(A.current=!0,N.current=!1))}),ee=Be(I=>{!g||!s||(I.defaultPrevented||I.nativeEvent.defaultPrevented)&&A.current&&(N.current=!0)});b.useEffect(()=>{function I(F){F.open||(D.current=!1)}return x.on("openchange",I),()=>{x.off("openchange",I)}},[x]),b.useEffect(()=>H,[H]),b.useEffect(()=>{if(!g||!s)return g||(D.current=!1,M.current=!1,z.current="",L.current=null),H;h.current.__escapeKeyBubbles=O,h.current.__outsidePressBubbles=T;const I=new zs,F=qt(m);function Z(){B.clear(),M.current=!0}function ne(){M.current=!0,B.start(Ri?5:0,()=>{M.current=!1})}function ye(){j.current=!0,I.start(0,()=>{j.current=!1})}function se(){A.current=!1,N.current=!1}function ge(){const de=z.current,Ee=de==="pen"||!de?"mouse":de,Ge=R(),Me=typeof Ge=="function"?Ge():Ge;return typeof Me=="string"?Me:Me[Ee]}function fe(de){const Ee=ge();return Ee==="intentional"&&de.type!=="click"||Ee==="sloppy"&&de.type==="click"}function ce(de){const Ee=h.current.floatingContext?.nodeId,Ge=S&&qa(S.nodesRef.current,Ee).some(Me=>ty(de,Me.context?.elements.floating));return _(de)||Ge}function Re(de){if(fe(de)){de.type!=="click"&&!_(de)&&(I.clear(),j.current=!1),H();return}if(h.current.insideReactTree){H();return}const Ee=sr(de),Ge=`[${Ql("inert")}]`,Me=ln(Ee)?Ee.getRootNode():null,De=Array.from((Lo(Me)?Me:qt(e.select("floatingElement"))).querySelectorAll(Ge)),xt=e.context.triggerElements;if(Ee&&(xt.hasElement(Ee)||xt.hasMatchingElement(gt=>st(gt,Ee))))return;let dt=ln(Ee)?Ee:null;for(;dt&&!Xi(dt);){const gt=Ji(dt);if(Xi(gt)||!ln(gt))break;dt=gt}if(!(De.length&&ln(Ee)&&!y4(Ee)&&!st(Ee,e.select("floatingElement"))&&De.every(gt=>!st(dt,gt)))){if(bn(Ee)&&!("touches"in de)){const gt=Xi(Ee),Nt=vs(Ee),jt=/auto|scroll/,tn=gt||jt.test(Nt.overflowX),an=gt||jt.test(Nt.overflowY),nn=tn&&Ee.clientWidth>0&&Ee.scrollWidth>Ee.clientWidth,et=an&&Ee.clientHeight>0&&Ee.scrollHeight>Ee.clientHeight,Et=Nt.direction==="rtl",Zt=et&&(Et?de.offsetX<=Ee.offsetWidth-Ee.clientWidth:de.offsetX>Ee.clientWidth),ht=nn&&de.offsetY>Ee.clientHeight;if(Zt||ht)return}if(!ce(de)){if(ge()==="intentional"){if(de.detail!==0&&!nc(de)&&!D.current)return;if(j.current){I.clear(),j.current=!1;return}}typeof C=="function"&&!C(de)||U("__outsidePressBubbles")||(e.setOpen(!1,lt(Op,de)),H())}}}function be(de){ge()!=="sloppy"||de.pointerType==="touch"||!e.select("open")||!s||_(de)||Re(de)}function Le(de){if(ge()!=="sloppy"||!e.select("open")||!s||_(de))return;const Ee=de.touches[0];Ee&&(L.current={startTime:Date.now(),startX:Ee.clientX,startY:Ee.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},K.start(1e3,()=>{L.current&&(L.current.dismissOnTouchEnd=!1,L.current.dismissOnMouseDown=!1)}))}function Oe(de,Ee){const Ge=sr(de);if(!Ge)return;const Me=Lt(Ge,de.type,()=>{Ee(de),Me()})}function ze(de){z.current="touch",Oe(de,Le)}function Ve(de){K.clear(),de.type==="pointerdown"&&(de.button===0&&(D.current=!0),z.current=de.pointerType),!(de.type==="mousedown"&&L.current&&!L.current.dismissOnMouseDown)&&Oe(de,Ee=>{Ee.type==="pointerdown"?be(Ee):Re(Ee)})}function ke(de){if(de.type==="pointercancel"&&(D.current=!1),!A.current)return;const Ee=N.current;if(se(),ge()==="intentional"){if(de.type==="pointercancel"){Ee&&ye();return}if(!ce(de)){if(Ee){ye();return}typeof C=="function"&&!C(de)||(I.clear(),j.current=!0,H())}}}function Ue(de){if(ge()!=="sloppy"||!L.current||_(de))return;const Ee=de.touches[0];if(!Ee)return;const Ge=Math.abs(Ee.clientX-L.current.startX),Me=Math.abs(Ee.clientY-L.current.startY),De=Math.sqrt(Ge*Ge+Me*Me);De>5&&(L.current.dismissOnTouchEnd=!0),De>10&&(Re(de),K.clear(),L.current=null)}function xe(de){Oe(de,Ue)}function Fe(de){ge()!=="sloppy"||!L.current||_(de)||(L.current.dismissOnTouchEnd&&Re(de),K.clear(),L.current=null)}function Ze(de){Oe(de,Fe)}const ot=bi(i&&bi(Lt(F,"keydown",$),Lt(F,"compositionstart",Z),Lt(F,"compositionend",ne)),E&&bi(Lt(F,"click",Ve,!0),Lt(F,"pointerdown",Ve,!0),Lt(F,"pointerup",ke,!0),Lt(F,"pointercancel",ke,!0),Lt(F,"mousedown",Ve,!0),Lt(F,"mouseup",ke,!0),Lt(F,"touchstart",ze,{capture:!0,passive:!0}),Lt(F,"touchmove",xe,{capture:!0,passive:!0}),Lt(F,"touchend",Ze,{capture:!0,passive:!0})));return()=>{ot(),I.clear(),se(),j.current=!1}},[h,m,i,E,C,g,s,O,T,$,H,R,U,_,S,e,K,B]);const G=b.useMemo(()=>({onKeyDown:$,onPointerDown:Q,onClick:Q}),[$,Q]),ae=b.useMemo(()=>({onKeyDown:$,onPointerDown:ee,onMouseDown:ee,onClickCapture:q,onMouseDownCapture(I){q(),Y(I)},onPointerDownCapture(I){q(),Y(I)},onMouseUpCapture:q,onTouchEndCapture:q,onTouchMoveCapture:q}),[$,q,Y,ee]);return b.useMemo(()=>s?{reference:G,floating:ae,trigger:G}:{},[s,G,ae])}function $C(e){const{popupStore:t,treatPopupAsFloatingElement:s=!1,floatingRootContext:i,floatingId:o,nested:l,onOpenChange:u}=e,d=t.useState("open"),f=t.useState("activeTriggerElement"),g=t.useState(s?"popupElement":"positionerElement"),m=u;return t.useSyncedValue("floatingId",o),Pe(()=>{const h={open:d,floatingId:o,referenceElement:f,floatingElement:g};ln(f)&&(h.domReferenceElement=f),i.state.positionReference===i.state.referenceElement&&(h.positionReference=f),i.update(h)},[d,o,f,g,i]),i.context.onOpenChange=m,i.context.nested=l,i}function Za(e,t=!1,s=!1,i=!1){const[o,l]=b.useState(e&&t?"idle":void 0),[u,d]=b.useState(e&&!i);return e&&!u&&(d(!0),l("starting")),!e&&u&&o!=="ending"&&!s&&l("ending"),!e&&!u&&o==="ending"&&l(void 0),Pe(()=>{if(!e&&u&&o!=="ending"&&s){const f=Nr.request(()=>{l("ending")});return()=>{Nr.cancel(f)}}},[e,u,o,s]),Pe(()=>{if(!e||t||o===void 0)return;const f=Nr.request(()=>{l(void 0)});return()=>{Nr.cancel(f)}},[t,e,o]),Pe(()=>{if(!e||!t)return;e&&u&&o!=="idle"&&l("starting");const f=Nr.request(()=>{l("idle")});return()=>{Nr.cancel(f)}},[t,e,u,o]),{mounted:u,setMounted:d,transitionStatus:o}}function Yw(e,t){return e.getAnimations(t).filter(s=>{const i=s.effect?.getTiming();return i?.duration!==1/0&&i?.iterations!==1/0})}let nh=null;function EI(e){if(!nh){const t=[];nh=t,queueMicrotask(()=>{nh=null,hr.flushSync(()=>{for(const s of t)s()})})}nh.push(e)}function Lp(e,t=!1,s=!1){const i=rc();return Be((o,l=null)=>{i.cancel();const u=Yi(e);if(u==null)return;const d=u,f=()=>{if(!s){hr.flushSync(o);return}EI(()=>{l?.aborted||o()})};if(typeof d.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){o();return}function g(){Promise.all(Yw(d).map(m=>m.finished.then(En))).then(()=>{l?.aborted||f()},()=>{if(l?.aborted)return;if(Yw(d).some(h=>h.pending||h.playState!=="finished")){g();return}f()})}if(t){const m=Iv;if(!d.hasAttribute(m)){i.request(g);return}const h=new MutationObserver(()=>{d.hasAttribute(m)||(h.disconnect(),g())});h.observe(d,{attributes:!0,attributeFilter:[m]}),l?.addEventListener("abort",()=>h.disconnect(),{once:!0});return}i.request(g)})}function bs(e){const{enabled:t=!0,open:s,ref:i,batch:o=!1,onComplete:l}=e,u=Be(l),d=Lp(i,s,o);b.useEffect(()=>{if(!t)return;const f=new AbortController;return d(u,f.signal),()=>{f.abort()}},[t,s,u,d])}function QC(e){const{open:t,ref:s,preventUnmountOnClose:i,setPreventUnmountOnClose:o,onUnmount:l,animateInitialOpen:u}=e,d=Be(o),{mounted:f,setMounted:g,transitionStatus:m}=Za(t,!1,!1,u),h=t?!1:i;Pe(()=>{t&&d(!1)},[t,d]);const x=b.useRef(f),S=b.useRef(!1),w=MC(),C=()=>{x.current=!1,g(!1),l()};Pe(()=>{x.current=f,S.current&&(S.current=!1,!t&&f&&C())});const E=Be(()=>{if(x.current){if(t){S.current=!0,w();return}C()}});return bs({enabled:f&&!t&&!h,open:t,ref:s,onComplete(){t||E()}}),{mounted:f,transitionStatus:m,preventUnmountingOnClose:h,forceUnmount:E}}const od={tabIndex:-1,[zy]:""};function XC(e){return t=>t==="touch"?e.current:!0}function Qv(e,t=!1){const s=lc(),i=Qa()!=null,o=rr(()=>e(s,i)).current;return $C({popupStore:o,treatPopupAsFloatingElement:t,floatingRootContext:o.state.floatingRootContext,floatingId:s,nested:i,onOpenChange:o.setOpen}),o}function zp({handle:e,store:t}){return Pe(()=>e.attachStore(t),[e,t]),null}function Gw(e){const t=e.context.triggerElements.size;e.select("open")&&e.state.triggerCount!==t&&e.set("triggerCount",t)}function RI(e,t){const s=b.useRef(null);return Be(i=>{const o=s.current;if(o!==null){if(o.element===i&&o.store===t&&o.id===e)return;s.current=null;const l=o.store;l.context.triggerElements.getById(o.id)===o.element&&(l.context.triggerElements.delete(o.id),Gw(l))}i!==null&&e!==void 0&&(s.current={store:t,id:e,element:i},t.context.triggerElements.add(e,i),Gw(t))})}function _p(e,t,s,i=!1){let o=e.preventUnmountingOnClose;t?o=!1:i&&(o=!0);const l=s?.id??null;let u=e.activeTriggerId,d=e.activeTriggerElement;return(l||t)&&(u=l,d=s??null),{open:t,preventUnmountingOnClose:o,activeTriggerId:u,activeTriggerElement:d,openedWithoutTrigger:t?s==null:e.openedWithoutTrigger}}function Up(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function CI(e,t,s,i={}){const o=s.reason,l=o===Kn,u=t&&o===Kl,d=!t&&(o===Qs||o===rd),f=Up(s);if(e.context.onOpenChange?.(t,s),s.isCanceled)return;i.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,s);const g=()=>{const m=_p(e.state,t,s.trigger,f()),h={...i.extraState,...m};u?h.instantType="focus":d?h.instantType="dismiss":l&&(h.instantType=void 0),e.update(h)};l?hr.flushSync(g):g()}function Hp(e,t,s,i){const o=s.useState("isMountedByTrigger",e),l=RI(e,s),u=Be(f=>{const g=s.select("open"),m=s.select("activeTriggerId");if(m===e){const h={activeTriggerElement:f,...g?i:null};s.update(h);return}if(m==null&&g&&!s.state.openedWithoutTrigger){const h={activeTriggerId:e??null,activeTriggerElement:f,...i};s.update(h)}}),d=Be(f=>{l(f),f&&u(f)});return Pe(()=>(d(t.current),()=>d(null)),[d,t,s,e]),Pe(()=>{if(o){const f={activeTriggerElement:t.current,...i};s.update(f)}},[o,s,t,...Object.values(i)]),{registerTrigger:d,isMountedByThisTrigger:o}}function Fp(e,t={}){const{closeOnActiveTriggerUnmount:s=!1}=t,i=b.useRef(null),o=e.useState("open"),l=e.useState("triggerCount"),u=e.useState("activeTriggerId"),d=e.useState("activeTriggerElement");Pe(()=>{if(!o){i.current=null,e.state.triggerCount!==0&&e.set("triggerCount",0),e.state.openedWithoutTrigger&&e.set("openedWithoutTrigger",!1);return}const f=e.context.triggerElements.size,g={};e.state.triggerCount!==f&&(g.triggerCount=f);const m=e.select("activeTriggerId");let h=null;if(m){const x=e.context.triggerElements.getById(m);if(x)i.current=m,x!==e.state.activeTriggerElement&&(g.activeTriggerElement=x);else{for(const[S,w]of e.context.triggerElements.entries())if(w===e.state.activeTriggerElement){g.activeTriggerId=S,g.activeTriggerElement=w,i.current=S;break}g.activeTriggerId===void 0&&(i.current===m?h=m:i.current=null)}}else i.current=null;if(!h&&!m&&!e.state.openedWithoutTrigger&&f===1){const x=e.context.triggerElements.entries().next();if(!x.done){const[S,w]=x.value;g.activeTriggerId=S,g.activeTriggerElement=w,i.current=S}}(g.triggerCount!==void 0||g.activeTriggerId!==void 0||g.activeTriggerElement!==void 0)&&e.update(g),h&&s&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===h&&!e.context.triggerElements.getById(h)){const x=lt(Cr);e.setOpen(!1,x),x.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[o,e,l,u,d,s])}function Bp(e,t,s,i){const{mounted:o,transitionStatus:l,forceUnmount:u}=QC({open:e,ref:t.context.popupRef,preventUnmountOnClose:t.useState("preventUnmountingOnClose"),setPreventUnmountOnClose:d=>t.set("preventUnmountingOnClose",d),animateInitialOpen:i,onUnmount(){t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),s?.(),t.context.onOpenChangeComplete?.(!1)}});return rr(()=>(t.set("mounted",o),null)),t.useSyncedValues({mounted:o,transitionStatus:l}),{forceUnmount:u,transitionStatus:l}}function Vp(e,t){e.useSyncedValues(t),Pe(()=>()=>{e.update({activeTriggerProps:Xt,inactiveTriggerProps:Xt,popupProps:Xt})},[e])}function ZC(e,t){Pe(()=>{!t&&e.state.openMethod!==null&&e.set("openMethod",null)},[t,e]),Pe(()=>()=>{e.state.openMethod!==null&&e.set("openMethod",null)},[e])}class ld{idMap=new Map;add(t,s){this.idMap.set(t,s)}delete(t){this.idMap.delete(t)}hasElement(t){for(const s of this.idMap.values())if(s===t)return!0;return!1}hasMatchingElement(t){for(const s of this.idMap.values())if(t(s))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}}var iy={exports:{}},ay={};var $w;function TI(){if($w)return ay;$w=1;var e=Zu();function t(h,x){return h===x&&(h!==0||1/h===1/x)||h!==h&&x!==x}var s=typeof Object.is=="function"?Object.is:t,i=e.useState,o=e.useEffect,l=e.useLayoutEffect,u=e.useDebugValue;function d(h,x){var S=x(),w=i({inst:{value:S,getSnapshot:x}}),C=w[0].inst,E=w[1];return l(function(){C.value=S,C.getSnapshot=x,f(C)&&E({inst:C})},[h,S,x]),o(function(){return f(C)&&E({inst:C}),h(function(){f(C)&&E({inst:C})})},[h]),u(S),S}function f(h){var x=h.getSnapshot;h=h.value;try{var S=x();return!s(h,S)}catch{return!0}}function g(h,x){return x()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?g:d;return ay.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,ay}var Qw;function WC(){return Qw||(Qw=1,iy.exports=TI()),iy.exports}var Kp=WC(),oy={exports:{}},ly={};var Xw;function kI(){if(Xw)return ly;Xw=1;var e=Zu(),t=WC();function s(g,m){return g===m&&(g!==0||1/g===1/m)||g!==g&&m!==m}var i=typeof Object.is=="function"?Object.is:s,o=t.useSyncExternalStore,l=e.useRef,u=e.useEffect,d=e.useMemo,f=e.useDebugValue;return ly.useSyncExternalStoreWithSelector=function(g,m,h,x,S){var w=l(null);if(w.current===null){var C={hasValue:!1,value:null};w.current=C}else C=w.current;w=d(function(){function R(j){if(!O){if(O=!0,T=j,j=x(j),S!==void 0&&C.hasValue){var D=C.value;if(S(D,j))return A=D}return A=j}if(D=A,i(T,j))return D;var M=x(j);return S!==void 0&&S(D,M)?(T=j,D):(T=j,A=M)}var O=!1,T,A,N=h===void 0?null:h;return[function(){return R(m())},N===null?void 0:function(){return R(N())}]},[m,h,x,S]);var E=o(g,w[0],w[1]);return u(function(){C.hasValue=!0,C.value=E},[E]),f(E),E},ly}var Zw;function OI(){return Zw||(Zw=1,oy.exports=kI()),oy.exports}var AI=OI();const MI=Bv(19),NI=MI?jI:II;function JC(e,t,s,i,o){return NI(e,t,s,i,o)}function DI(e,t,s,i,o){const l=b.useCallback(()=>t(e.getSnapshot(),s,i,o),[e,t,s,i,o]);return Kp.useSyncExternalStore(e.subscribe,l,l)}Vj({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let s=0;s<e.syncHooks.length;s+=1){const i=e.syncHooks[s],o=i.selector(i.store.state,i.a1,i.a2,i.a3);Object.is(i.value,o)||(t=!0,i.value=o)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{const s=new Set;for(const o of e.syncHooks)s.add(o.store);const i=[];for(const o of s)i.push(o.subscribe(t));return()=>{for(const o of i)o()}}),Kp.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function jI(e,t,s,i,o){const l=Bj();if(!l)return DI(e,t,s,i,o);const u=l.syncIndex;l.syncIndex+=1;let d;return l.didInitialize?(d=l.syncHooks[u],(d.store!==e||d.selector!==t||!Object.is(d.a1,s)||!Object.is(d.a2,i)||!Object.is(d.a3,o))&&(d.store!==e&&(l.didChangeStore=!0),d.store=e,d.selector=t,d.a1=s,d.a2=i,d.a3=o,d.value=t(e.getSnapshot(),s,i,o))):(d={store:e,selector:t,a1:s,a2:i,a3:o,value:t(e.getSnapshot(),s,i,o)},l.syncHooks.push(d)),d.value}function II(e,t,s,i,o){return AI.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,l=>t(l,s,i,o))}class PI{static create(t){return new this(t)}constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const s=this.updateTick;for(const i of this.listeners){if(s!==this.updateTick)return;i(t)}}update(t){for(const s in t)if(!Object.is(this.state[s],t[s])){this.setState({...this.state,...t});return}}set(t,s){Object.is(this.state[t],s)||this.setState({...this.state,[t]:s})}notifyAll(){const t={...this.state};this.setState(t)}use(t,s,i,o){return JC(this,t,s,i,o)}}class cc extends PI{constructor(t,s={},i){super(t),this.context=s,this.selectors=i}useSyncedValue(t,s){b.useDebugValue(t);const i=this;Pe(()=>{i.state[t]!==s&&i.set(t,s)},[i,t,s])}useSyncedValueWithCleanup(t,s){const i=this;Pe(()=>(i.state[t]!==s&&i.set(t,s),()=>{i.set(t,void 0)}),[i,t,s])}useSyncedValues(t){const s=this,i=Object.values(t);Pe(()=>{s.update(t)},[s,...i])}useControlledProp(t,s){b.useDebugValue(t);const i=this,o=s!==void 0;Pe(()=>{o&&!Object.is(i.state[t],s)&&i.setState({...i.state,[t]:s})},[i,t,s,o])}select(t,s,i,o){const l=this.selectors[t];return l(this.state,s,i,o)}useState(t,s,i,o){return b.useDebugValue(t),JC(this,this.selectors[t],s,i,o)}useContextCallback(t,s){b.useDebugValue(t);const i=Be(s??En);this.context[t]=i}useStateSetter(t){const s=b.useRef(void 0);return s.current===void 0&&(s.current=i=>{this.set(t,i)}),s.current}observe(t,s){let i;typeof t=="function"?i=t:i=this.selectors[t];let o=i(this.state);return s(o,o,this),this.subscribe(l=>{const u=i(l);if(!Object.is(o,u)){const d=o;o=u,s(u,d,this)}})}}const LI={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId};class eT extends cc{constructor(t){const{syncOnly:s,nested:i,onOpenChange:o,triggerElements:l,...u}=t;super({...u,positionReference:u.referenceElement,domReferenceElement:u.referenceElement},{onOpenChange:o,dataRef:{current:{}},events:VC(),nested:i,triggerElements:l},LI),this.syncOnly=s}syncOpenEvent=(t,s)=>{(!t||!this.state.open||s!=null&&e4(s))&&(this.context.dataRef.current.openEvent=t?s:void 0)};dispatchOpenChange=(t,s)=>{this.syncOpenEvent(t,s.event);const i={open:t,reason:s.reason,nativeEvent:s.event,nested:this.context.nested,triggerElement:s.trigger};this.context.events.emit("openchange",i)};setOpen=(t,s)=>{if(this.syncOnly){this.context.onOpenChange?.(t,s);return}this.dispatchOpenChange(t,s),this.context.onOpenChange?.(t,s)}}function qp(e,t,s=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new eT({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:s,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,openedWithoutTrigger:!1,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Xt,inactiveTriggerProps:Xt,popupProps:Xt}}const Au=e=>e.triggerIdProp??e.activeTriggerId,$h=e=>e.openProp??e.open,Ww=e=>(e.popupElement?.id??e.floatingId)||void 0;function tT(e,t){return t!==void 0&&$h(e)&&Au(e)===t}function zI(e,t){return tT(e,t)?!0:t!==void 0&&$h(e)&&Au(e)==null&&!e.openedWithoutTrigger&&e.triggerCount===1}const $i={open:$h,mounted:e=>e.mounted,transitionStatus:e=>$h(e)&&!e.mounted?"starting":e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:Au,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:Ww,isTriggerActive:(e,t)=>t!==void 0&&Au(e)===t,isOpenedByTrigger:(e,t)=>tT(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&Au(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>zI(e,t)?Ww(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function Yp(e){const t=b.useCallback(i=>e===void 0?En:e.subscribeStore(i),[e]),s=b.useCallback(()=>e===void 0?void 0:e.store,[e]);return Kp.useSyncExternalStore(t,s,()=>e?.serverStore)}function _I(e){const{open:t=!1,onOpenChange:s,elements:i={}}=e,o=lc(),l=Qa()!=null,u=rr(()=>new eT({open:t,transitionStatus:void 0,onOpenChange:s,referenceElement:i.reference??null,floatingElement:i.floating??null,triggerElements:new ld,floatingId:o,syncOnly:!1,nested:l})).current;return Pe(()=>{const d={open:t,floatingId:o};i.reference!==void 0&&(d.referenceElement=i.reference,d.domReferenceElement=ln(i.reference)?i.reference:null),i.floating!==void 0&&(d.floatingElement=i.floating),u.update(d)},[t,o,i.reference,i.floating,u]),u.context.onOpenChange=s,u.context.nested=l,u}const cy=kv&&Ri;function nT(e,t={}){const{enabled:s=!0,delay:i}=t,{events:o,dataRef:l}=e.context,u=b.useRef(!1),d=b.useRef(null),f=b.useRef(!0),g=Un();b.useEffect(()=>{const h=e.select("domReferenceElement");if(!s)return;const x=Rn(h);function S(){const E=e.select("domReferenceElement");!e.select("open")&&bn(E)&&E===Br(qt(E))&&(u.current=!0,d.current=E)}function w(){f.current=!0}function C(){f.current=!1}return bi(Lt(x,"blur",S),cy&&Lt(x,"keydown",w,!0),cy&&Lt(x,"pointerdown",C,!0))},[e,s]),b.useEffect(()=>{if(!s)return;function h(x){if(x.reason===Qs||x.reason===rd){const S=e.select("domReferenceElement");ln(S)&&(d.current=S,u.current=!0)}}return o.on("openchange",h),()=>{o.off("openchange",h)}},[o,s,e]);const m=b.useMemo(()=>{function h(){u.current=!1,d.current=null}return{onMouseLeave(){h()},onFocus(x){const S=x.currentTarget;if(u.current){if(d.current===S)return;h()}const w=sr(x.nativeEvent);if(ln(w)){if(cy&&!x.relatedTarget){if(!f.current&&!nd(w))return}else if(!b4(w))return}const C=Fh(x.relatedTarget,e.context.triggerElements),{nativeEvent:E,currentTarget:R}=x;if(e.select("open")&&C||!i){e.setOpen(!0,lt(Kl,E,R));return}g.start(i,()=>{u.current||e.setOpen(!0,lt(Kl,E,R))})},onBlur(x){h();const S=x.relatedTarget,w=x.nativeEvent,C=ln(S)&&S.hasAttribute(Ql("focus-guard"))&&S.getAttribute("data-type")==="outside";g.start(0,()=>{const E=e.select("domReferenceElement"),R=Br(qt(E));!S&&R===E||st(l.current.floatingContext?.refs.floating.current,R)||st(E,R)||C||Fh(S??R,e.context.triggerElements)||e.setOpen(!1,lt(Kl,w))})}}},[l,i,e,g]);return b.useMemo(()=>s?{reference:m,trigger:m}:{},[s,m])}class Xv{pointerType=void 0;interactedInside=!1;handler=void 0;blockMouseMove=!0;performedPointerEventsMutation=!1;pointerEventsScopeElement=null;pointerEventsReferenceElement=null;pointerEventsFloatingElement=null;restTimeoutPending=!1;openChangeTimeout=new zs;restTimeout=new zs;handleCloseOptions=void 0;static create(){return new Xv}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}const Qh=new WeakMap;function Xh(e){if(!e.performedPointerEventsMutation)return;const t=e.pointerEventsScopeElement;t&&Qh.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),Qh.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function rT(e,t){const{scopeElement:s,referenceElement:i,floatingElement:o}=t,l=Qh.get(s);l&&l!==e&&Xh(l),Xh(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=s,e.pointerEventsReferenceElement=i,e.pointerEventsFloatingElement=o,Qh.set(s,e),s.style.pointerEvents="none",i.style.pointerEvents="auto",o.style.pointerEvents="auto"}function Zv(e){const t=e.context.dataRef.current,s=rr(()=>t.hoverInteractionState??Xv.create()).current;return t.hoverInteractionState||(t.hoverInteractionState=s),Tv(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function Wv(e,t={}){const{enabled:s=!0,closeDelay:i=0,nodeId:o}=t,l=e.useState("open"),u=e.useState("floatingElement"),d=e.useState("domReferenceElement"),{dataRef:f}=e.context,g=Xa(),m=Qa(),h=Zv(e),x=Un(),S=Be(()=>uC(f.current.openEvent?.type,h.interactedInside)),w=Be(()=>S4(f.current.openEvent?.type)),C=Be(()=>{Xh(h)});Pe(()=>{l||(h.pointerType=void 0,h.restTimeoutPending=!1,h.interactedInside=!1,C())},[l,h,C]),b.useEffect(()=>C,[C]),Pe(()=>{if(s&&l&&h.handleCloseOptions?.blockPointerEvents&&w()&&ln(d)&&u){const E=d,R=u,O=qt(u),T=g?.nodesRef.current.find(D=>D.id===m)?.context?.elements.floating;T&&(T.style.pointerEvents="");const A=h.pointerEventsScopeElement!==R?h.pointerEventsScopeElement:null,N=T!==R?T:null,j=h.handleCloseOptions?.getScope?.()??A??N??Hu(E,"[data-rootownerid]")??O.body;return rT(h,{scopeElement:j,referenceElement:E,floatingElement:R}),()=>{C()}}},[s,l,d,u,h,w,g,m,C]),b.useEffect(()=>{if(!s)return;function E(){return!!(g&&m&&qa(g.nodesRef.current,m).length>0)}function R(D){const M=zo(i,"close",h.pointerType),z=()=>{e.setOpen(!1,lt(Kn,D)),g?.events.emit("floating.closed",D)};M?h.openChangeTimeout.start(M,z):(h.openChangeTimeout.clear(),z())}function O(D){const M=sr(D);if(!v4(M)){h.interactedInside=!1;return}h.interactedInside=Hu(M,"[aria-haspopup]")!=null}function T(){h.openChangeTimeout.clear(),x.clear(),g?.events.off("floating.closed",N),C()}function A(D){if(E()&&g){g.events.on("floating.closed",N);return}if(Fh(D.relatedTarget,e.context.triggerElements))return;const M=f.current.floatingContext?.nodeId??o,z=D.relatedTarget;if(!(g&&M&&ln(z)&&qa(g.nodesRef.current,M,!1).some(K=>st(K.context?.elements.floating,z)))){if(h.handler){h.handler(D);return}C(),w()&&!S()&&R(D)}}function N(D){!g||!m||E()||x.start(0,()=>{g.events.off("floating.closed",N),e.setOpen(!1,lt(Kn,D)),g.events.emit("floating.closed",D)})}const j=u;return bi(j&&Lt(j,"mouseenter",T),j&&Lt(j,"mouseleave",A),j&&Lt(j,"pointerdown",O,!0),()=>{g?.events.off("floating.closed",N)})},[s,u,e,f,i,o,w,S,C,h,g,m,x])}const UI={current:null};function Jv(e,t={}){const{enabled:s=!0,delay:i=0,handleClose:o=null,mouseOnly:l=!1,restMs:u=0,move:d=!0,triggerElementRef:f=UI,externalTree:g,isActiveTrigger:m=!0,getHandleCloseContext:h,isClosing:x,shouldOpen:S,guardStaleOpen:w=!1}=t,{dataRef:C,events:E}=e.context,R=Xa(g),O=Zv(e),T=b.useRef(!1),A=Ln(o),N=Ln(i),j=Ln(u),D=Ln(s),M=Ln(S),z=Ln(x),L=Be(()=>uC(C.current.openEvent?.type,O.interactedInside)),K=Be(()=>M.current?.()!==!1),X=Be((U,_,Q)=>{const $=e.context.triggerElements;if($.hasElement(_))return!U||!st(U,_);if(!ln(Q))return!1;const q=Q;return $.hasMatchingElement(Y=>st(Y,q))&&(!U||!st(U,q))}),B=Be(()=>{if(!O.handler)return;qt(e.select("domReferenceElement")).removeEventListener("mousemove",O.handler),O.handler=void 0}),H=Be(()=>{Xh(O)});return m&&(O.handleCloseOptions=o?.__options),b.useEffect(()=>B,[B]),b.useEffect(()=>{if(!s)return;function U(_){_.open?T.current=!1:(T.current=_.reason===Kn,B(),O.openChangeTimeout.clear(),O.restTimeout.clear(),O.blockMouseMove=!0,O.restTimeoutPending=!1)}return E.on("openchange",U),()=>{E.off("openchange",U)}},[s,E,O,B]),b.useEffect(()=>{if(!s)return;function U(ee,G=!0){const ae=zo(N.current,"close",O.pointerType);ae?O.openChangeTimeout.start(ae,()=>{e.setOpen(!1,lt(Kn,ee)),R?.events.emit("floating.closed",ee)}):G&&(O.openChangeTimeout.clear(),e.setOpen(!1,lt(Kn,ee)),R?.events.emit("floating.closed",ee))}const _=f.current??(m?e.select("domReferenceElement"):null);if(!ln(_))return;function Q(ee){if(O.openChangeTimeout.clear(),O.blockMouseMove=!1,l&&!Ha(O.pointerType))return;const G=Tw(j.current),ae=zo(N.current,"open",O.pointerType),I=sr(ee),F=ee.currentTarget??null,Z=e.select("domReferenceElement");let ne=F;if(ln(I)&&!e.context.triggerElements.hasElement(I)){for(const Oe of e.context.triggerElements.elements())if(st(Oe,I)){ne=Oe;break}}ln(F)&&ln(Z)&&!e.context.triggerElements.hasElement(F)&&st(F,Z)&&(ne=Z);const ye=ne==null?!1:X(Z,ne,I),se=e.select("open"),ge=z.current?.()??e.select("transitionStatus")==="ending",fe=!se&&ge&&T.current,ce=!ye&&ln(ne)&&ln(Z)&&st(Z,ne)&&fe,Re=G>0&&!ae,be=ye&&(se||fe)||ce,Le=!se||ye;if(be){K()&&e.setOpen(!0,lt(Kn,ee,ne));return}Re||(ae?O.openChangeTimeout.start(ae,()=>{Le&&K()&&e.setOpen(!0,lt(Kn,ee,ne))}):Le&&K()&&e.setOpen(!0,lt(Kn,ee,ne)))}function $(ee){if(L()){H();return}B();const G=e.select("domReferenceElement"),ae=qt(G);O.restTimeout.clear(),O.restTimeoutPending=!1;const I=C.current.floatingContext??h?.();if(Fh(ee.relatedTarget,e.context.triggerElements))return;if(A.current&&I){e.select("open")||O.openChangeTimeout.clear();const Z=f.current;O.handler=A.current({...I,tree:R,x:ee.clientX,y:ee.clientY,onClose(){H(),B(),D.current&&!L()&&Z===e.select("domReferenceElement")&&U(ee,!0)}}),ae.addEventListener("mousemove",O.handler),O.handler(ee);return}(O.pointerType!=="touch"||!st(e.select("floatingElement"),ee.relatedTarget))&&U(ee)}function q(ee){st(_,ee.relatedTarget)||(O.openChangeTimeout.clear(),O.restTimeout.clear(),O.restTimeoutPending=!1)}const Y=w?Lt(_,"mouseout",q):void 0;return d?bi(Lt(_,"mousemove",Q,{once:!0}),Lt(_,"mouseenter",Q),Lt(_,"mouseleave",$),Y):bi(Lt(_,"mouseenter",Q),Lt(_,"mouseleave",$),Y)},[B,H,C,N,e,s,A,O,m,X,L,l,d,j,f,R,D,h,z,K,w]),b.useMemo(()=>{if(!s)return;function U(_){O.pointerType=_.pointerType}return{onPointerDown:U,onPointerEnter:U,onMouseMove(_){const{nativeEvent:Q}=_,$=_.currentTarget,q=e.select("domReferenceElement"),Y=e.select("open"),ee=X(q,$,_.target);if(l&&!Ha(O.pointerType))return;if(Y&&ee&&O.handleCloseOptions?.blockPointerEvents){const I=e.select("floatingElement");if(I){const F=O.handleCloseOptions?.getScope?.()??$.ownerDocument.body;rT(O,{scopeElement:F,referenceElement:$,floatingElement:I})}}const G=Tw(j.current);if(Y&&!ee||G===0||!ee&&O.restTimeoutPending&&_.movementX**2+_.movementY**2<2)return;O.restTimeout.clear();function ae(){if(O.restTimeoutPending=!1,L())return;const I=e.select("open");!O.blockMouseMove&&(!I||ee)&&K()&&e.setOpen(!0,lt(Kn,Q,$))}O.pointerType==="touch"?hr.flushSync(()=>{ae()}):ee&&Y?ae():(O.restTimeoutPending=!0,O.restTimeout.start(G,ae))}}},[s,O,L,X,l,e,j,K])}function Jw(e){return Ri&&e.movementX===0&&e.movementY===0}function Gp(e,t,s){switch(e){case"vertical":return t;case"horizontal":return s;default:return t||s}}function rh(e,t){return Gp(t,e===lC||e===jv,e===Rp||e===Cp)}function uy(e,t,s){return Gp(t,e===jv,s?e===Rp:e===Cp)||e==="Enter"||e===" "||e===""}function HI(e,t,s){return Gp(t,s?e===Rp:e===Cp,e===jv)}function FI(e,t,s,i){const o=s?e===Cp:e===Rp,l=e===lC;return t==="both"||t==="horizontal"&&i?e==="Escape":Gp(t,o,l)}function sT(e,t){const{listRef:s,activeIndex:i,onNavigate:o=()=>{},enabled:l=!0,selectedIndex:u=null,allowEscape:d=!1,loopFocus:f=!1,nested:g=!1,rtl:m=!1,virtual:h=!1,focusItemOnOpen:x="auto",focusItemOnHover:S=!0,openOnArrowKeyDown:w=!0,disabledIndices:C=void 0,orientation:E="vertical",triggerOrientation:R=E,parentOrientation:O,id:T,resetOnPointerLeave:A=!0,externalTree:N,nestedReturnFocusRef:j,grid:D}=t,M=D!=null,z=e.useState("open"),L=e.useState("floatingElement"),K=e.useState("domReferenceElement"),X=e.context.dataRef,B=Bh(L),H=Uy(K),U=Ln(B),_=Qa(),Q=Xa(N),$=b.useRef(x),q=b.useRef(u??-1),Y=b.useRef(null),ee=b.useRef(!0),G=Be(de=>{o(q.current===-1?null:q.current,de)}),ae=b.useRef(!!L),I=b.useRef(z),F=b.useRef(!1),Z=b.useRef(!1),ne=b.useRef(null),ye=Ln(C),se=Ln(z),ge=Ln(u),fe=Ln(A),ce=rc(),Re=rc(),be=Be(()=>{ce.cancel();function de(De){h||(ne.current=Th(De,{sync:F.current,preventScroll:!0}))}const Ee=s.current[q.current],Ge=Z.current;Ee&&de(Ee),(F.current?De=>De():De=>ce.request(De))(()=>{const De=s.current[q.current]||Ee;if(!De)return;Ee||de(De),Ue&&(Ge||!ee.current)&&De.scrollIntoView?.({block:"nearest",inline:"nearest"})})});Pe(()=>{X.current.orientation=E},[X,E]),Pe(()=>{z||(Y.current=null),(!z||x!=="auto")&&($.current=x)},[z,x]),Pe(()=>{l&&(z&&L?(q.current=u??-1,$.current&&u!=null&&(Z.current=!0,G())):ae.current&&(q.current=-1,G()))},[l,z,L,u,G]),Pe(()=>{if(l){if(!z){F.current=!1;return}if(L)if(i==null){if(F.current=!1,ge.current!=null)return;if(ae.current&&(q.current=-1,be()),(!I.current||!ae.current)&&$.current&&(Y.current!=null||$.current===!0&&Y.current==null)){let de=0;const Ee=()=>{s.current[0]==null?(de<2&&(de?Me=>Re.request(Me):queueMicrotask)(Ee),de+=1):(q.current=Y.current==null||uy(Y.current,R,m)||g?Ch(s):Fy(s),Y.current=null,G())};Ee()}}else ql(s.current,i)||(q.current=i,be(),Z.current=!1)}},[l,z,L,i,ge,g,s,R,m,G,be,Re]),Pe(()=>{if(!l||L||!Q||h||!ae.current)return;const de=Q.nodesRef.current,Ee=de.find(De=>De.id===_)?.context?.elements.floating,Ge=Br(qt(K??Ee??null)),Me=de.some(De=>De.context&&st(De.context.elements.floating,Ge));Ee&&!Me&&ee.current&&Ee.focus({preventScroll:!0})},[l,L,K,Q,_,h]),Pe(()=>{I.current=z,ae.current=!!L});const Le=i!=null,Oe=Be(de=>{if(!se.current)return;const Ee=s.current.indexOf(de.currentTarget);Ee!==-1&&(q.current!==Ee||i!==Ee)&&(q.current=Ee,G(de))}),ze=Be(()=>O??Q?.nodesRef.current.find(de=>de.id===_)?.context?.dataRef?.current.orientation),Ve=Be(()=>Ch(s,ye.current)),ke=Be(de=>{if(ee.current=!1,F.current=!0,de.which===229||!se.current&&de.currentTarget===U.current)return;if(g&&FI(de.key,E,m,M)){rh(de.key,ze())||Gs(de),e.setOpen(!1,lt(Vh,de.nativeEvent));const De=j?.current??K;bn(De)&&De.focus();return}i!=null&&i!==q.current&&!ql(s.current,i)&&(q.current=i);const Ee=q.current,Ge=Ch(s,C),Me=Fy(s,C);if(H||(de.key==="Home"&&(Gs(de),q.current=Ge,G(de)),de.key==="End"&&(Gs(de),q.current=Me,G(de))),D!=null){const De=D(de,q.current,s,E,f,m,C,Ge,Me);if(De!=null&&De!==q.current&&(q.current=De,G(de)),E==="both")return}if(rh(de.key,E)){Gs(de);const De=Br(de.currentTarget.ownerDocument);if(z&&!h&&st(de.currentTarget,De)&&!s.current.some(gt=>gt!=null&&st(gt,De))){q.current=uy(de.key,E,m)?Ge:Me,G(de),i===q.current&&be();return}const{index:xt,wrapped:dt}=K4(s.current,Ee,{decrement:!uy(de.key,E,m),loopFocus:f,allowEscape:d,disabledIndices:C,minIndex:Ge,maxIndex:Me});dt&&(F.current=!1),q.current=xt,G(de)}}),Ue=b.useMemo(()=>({onFocus(Ee){F.current=!0,Oe(Ee)},onClick({currentTarget:Ee}){h||Ee.focus({preventScroll:!0})},onMouseMove(Ee){Jw(Ee)||(F.current=!0,Z.current=!1,S&&Oe(Ee))},onPointerLeave(Ee){if(!se.current||!ee.current||Ee.pointerType==="touch")return;F.current=!0;const Ge=Ee.relatedTarget;if(!(!S||s.current.includes(Ge))&&fe.current&&(ne.current?.(),ne.current=null,q.current=-1,G(Ee),!h)){const Me=U.current,De=Br(qt(Me));Me&&st(Me,De)&&Me.focus({preventScroll:!0})}}}),[Oe,se,U,S,s,G,fe,h]),xe=b.useMemo(()=>h&&z&&Le&&{"aria-activedescendant":`${T}-${i}`},[h,z,Le,T,i]),Fe=b.useMemo(()=>({...H?{}:xe,onKeyDown(de){if(de.key==="Tab"&&de.shiftKey&&z&&!h){const Ee=sr(de.nativeEvent);if(Ee&&!st(U.current,Ee))return;Gs(de);const Ge=lt(Ba,de.nativeEvent);e.setOpen(!1,Ge);const Me=j?.current??K;!Ge.isCanceled&&bn(Me)&&Me.focus();return}ke(de)},onPointerMove(de){Jw(de)||(ee.current=!0)}}),[xe,ke,U,H,e,z,h,K,j]),Ze=b.useMemo(()=>{function de(Me){e.setOpen(!0,lt(Vh,Me.nativeEvent,Me.currentTarget))}function Ee(Me){x==="auto"&&nc(Me.nativeEvent)&&($.current=!h)}function Ge(Me){$.current=x,x==="auto"&&Av(Me.nativeEvent)&&($.current=!0)}return{onKeyDown(Me){const De=e.select("open");ee.current=!1;const xt=Me.key.startsWith("Arrow"),dt=HI(Me.key,ze(),m),gt=rh(Me.key,De?E:R),Nt=(g?dt:gt)||Me.key==="Enter"||Me.key.trim()==="";if(h&&De&&(!g||nd(Me.currentTarget)))return ke(Me);if(!(!De&&!w&&xt)){if(Nt){const jt=rh(Me.key,ze());Y.current=g&&jt?null:Me.key}if(g){dt&&(Gs(Me),De?(q.current=Ve(),G(Me),h&&U.current?.focus()):de(Me));return}gt&&(ge.current!=null&&(q.current=ge.current),Gs(Me),!De&&w?de(Me):ke(Me),De&&G(Me))}},onFocus(Me){Me.target===Me.currentTarget&&e.select("open")&&!h&&(q.current=-1,G(Me))},onPointerDown:Ge,onPointerEnter:Ge,onMouseDown:Ee,onClick:Ee}},[ke,x,Ve,g,G,e,w,E,R,ze,m,ge,h,U]),ot=b.useMemo(()=>({...xe,...Ze}),[xe,Ze]);return b.useMemo(()=>l?{reference:ot,floating:Fe,item:Ue,trigger:Ze}:{},[l,ot,Fe,Ze,Ue])}function iT(e,t){const{listRef:s,elementsRef:i,activeIndex:o,onMatch:l,disabledIndices:u,onTyping:d,enabled:f=!0,resetMs:g=750,selectedIndex:m=null}=t,h=Be(d),x=e.useState("open"),S=Un(),w=b.useRef(""),C=b.useRef(m??o??-1),E=b.useRef(null),R=Be(A=>{function N(H){return i?.current[H]}function j(H){const U=N(H);return U&&!Mp(U)||U?.matches(":disabled")?!1:u==null||!Gl(Ls,H,u)}function D(H,U,_=0){if(H.length===0)return-1;const Q=(_%H.length+H.length)%H.length,$=U.toLowerCase();for(let q=0;q<H.length;q+=1){const Y=(Q+q)%H.length;if(!(!H[Y]?.toLowerCase().startsWith($)||!j(Y)))return Y}return-1}const M=s.current;if(w.current.length>0&&A.key===" "&&(Gs(A),h?.(!0)),w.current.length>0&&w.current[0]!==" "&&D(M,w.current)===-1&&A.key!==" "&&h?.(!1),M==null||A.key.length!==1||A.ctrlKey||A.metaKey||A.altKey)return;x&&A.key!==" "&&(Gs(A),h?.(!0));const z=w.current==="";z&&(C.current=m??o??-1),M.every((H,U)=>H&&j(U)?H[0]?.toLowerCase()!==H[1]?.toLowerCase():!0)&&w.current===A.key&&(w.current="",C.current=E.current),w.current+=A.key,S.start(g,()=>{w.current="",C.current=E.current,h?.(!1)});const X=((z?m??o??-1:C.current)??0)+1,B=D(M,w.current,X);B!==-1?(l?.(B,A),E.current=B):A.key!==" "&&(w.current="",h?.(!1))}),O=Be(A=>{const N=A.relatedTarget,j=e.select("domReferenceElement"),D=e.select("floatingElement");st(j,N)||st(D,N)||(S.clear(),w.current="",C.current=E.current,h?.(!1))});Pe(()=>{!x&&m!==null||(S.clear(),E.current=null,w.current!==""&&(w.current="",h?.(!1)))},[x,m,S,h]);const T=b.useMemo(()=>({onKeyDown:R,onBlur:O}),[R,O]);return b.useMemo(()=>f?{reference:T,floating:T}:{},[f,T])}const eE=.1,BI=eE*eE,wn=.5;function sh(e,t,s,i,o,l){return i>=t!=l>=t&&e<=(o-s)*(t-i)/(l-i)+s}function ih(e,t,s,i,o,l,u,d,f,g){let m=!1;return sh(e,t,s,i,o,l)&&(m=!m),sh(e,t,o,l,u,d)&&(m=!m),sh(e,t,u,d,f,g)&&(m=!m),sh(e,t,f,g,s,i)&&(m=!m),m}function VI(e,t,s){return e>=s.x&&e<=s.x+s.width&&t>=s.y&&t<=s.y+s.height}function ah(e,t,s,i,o,l){const u=Math.min(s,o),d=Math.max(s,o),f=Math.min(i,l),g=Math.max(i,l);return e>=u&&e<=d&&t>=f&&t<=g}function eb(e={}){const{blockPointerEvents:t=!1}=e,s=new zs,i=({x:o,y:l,placement:u,elements:d,onClose:f,nodeId:g,tree:m})=>{const h=u?.split("-")[0];let x=!1,S=null,w=null,C=typeof performance<"u"?performance.now():0;function E(O,T){const A=performance.now(),N=A-C;if(S===null||w===null||N===0)return S=O,w=T,C=A,!1;const j=O-S,D=T-w,M=j*j+D*D,z=N*N*BI;return S=O,w=T,C=A,M<z}function R(){s.clear(),f()}return function(T){s.clear();const A=d.domReference,N=d.floating;if(!A||!N||h==null||o==null||l==null)return;const{clientX:j,clientY:D}=T,M=sr(T),z=T.type==="mouseleave",L=st(N,M),K=st(A,M);if(L&&(x=!0,!z))return;if(K&&(x=!1,!z)){x=!0;return}if(z&&ln(T.relatedTarget)&&st(N,T.relatedTarget))return;function X(){return!!(m&&qa(m.nodesRef.current,g).length>0)}function B(){X()||R()}if(X())return;const H=A.getBoundingClientRect(),U=N.getBoundingClientRect(),_=o>U.right-U.width/2,Q=l>U.bottom-U.height/2,$=U.width>H.width,q=U.height>H.height,Y=($?H:U).left,ee=($?H:U).right,G=(q?H:U).top,ae=(q?H:U).bottom;if(h==="top"&&l>=H.bottom-1||h==="bottom"&&l<=H.top+1||h==="left"&&o>=H.right-1||h==="right"&&o<=H.left+1){B();return}let I=!1;switch(h){case"top":I=ah(j,D,Y,H.top+1,ee,U.bottom-1);break;case"bottom":I=ah(j,D,Y,U.top+1,ee,H.bottom-1);break;case"left":I=ah(j,D,U.right-1,ae,H.left+1,G);break;case"right":I=ah(j,D,H.right-1,ae,U.left+1,G);break}if(I)return;if(x&&!VI(j,D,H)){B();return}if(!z&&E(j,D)){B();return}let F=!1;switch(h){case"top":{const Z=$?wn/2:wn*4,ne=$||_?o+Z:o-Z,ye=$?o-Z:_?o+Z:o-Z,se=l+wn+1,ge=_||$?U.bottom-wn:U.top,fe=_?$?U.bottom-wn:U.top:U.bottom-wn;F=ih(j,D,ne,se,ye,se,U.left,ge,U.right,fe);break}case"bottom":{const Z=$?wn/2:wn*4,ne=$||_?o+Z:o-Z,ye=$?o-Z:_?o+Z:o-Z,se=l-wn,ge=_||$?U.top+wn:U.bottom,fe=_?$?U.top+wn:U.bottom:U.top+wn;F=ih(j,D,ne,se,ye,se,U.left,ge,U.right,fe);break}case"left":{const Z=q?wn/2:wn*4,ne=q||Q?l+Z:l-Z,ye=q?l-Z:Q?l+Z:l-Z,se=o+wn+1,ge=Q||q?U.right-wn:U.left,fe=Q?q?U.right-wn:U.left:U.right-wn;F=ih(j,D,ge,U.top,fe,U.bottom,se,ne,se,ye);break}case"right":{const Z=q?wn/2:wn*4,ne=q||Q?l+Z:l-Z,ye=q?l-Z:Q?l+Z:l-Z,se=o-wn,ge=Q||q?U.left+wn:U.right,fe=Q?q?U.left+wn:U.right:U.left+wn;F=ih(j,D,se,ne,se,ye,ge,U.top,fe,U.bottom);break}}F?x||s.start(40,B):B()}};return i.__options={...e,blockPointerEvents:t},i}function tE(e,t,s){let{reference:i,floating:o}=e;const l=Is(t),u=Uv(t),d=_v(u),f=ys(t),g=l==="y",m=i.x+i.width/2-o.width/2,h=i.y+i.height/2-o.height/2,x=i[d]/2-o[d]/2;let S;switch(f){case"top":S={x:m,y:i.y-o.height};break;case"bottom":S={x:m,y:i.y+i.height};break;case"right":S={x:i.x+i.width,y:h};break;case"left":S={x:i.x-o.width,y:h};break;default:S={x:i.x,y:i.y}}const w=xi(t);return w&&(S[u]+=x*(w==="end"?1:-1)*(s&&g?-1:1)),S}async function KI(e,t){var s;t===void 0&&(t={});const{x:i,y:o,platform:l,rects:u,elements:d,strategy:f}=e,{boundary:g="clippingAncestors",rootBoundary:m="viewport",elementContext:h="floating",altBoundary:x=!1,padding:S=0}=Ka(t,e),w=bC(S),E=d[x?h==="floating"?"reference":"floating":h],R=Bu(await l.getClippingRect({element:(s=await(l.isElement==null?void 0:l.isElement(E)))==null||s?E:E.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(d.floating)),boundary:g,rootBoundary:m,strategy:f})),O=h==="floating"?{x:i,y:o,width:u.floating.width,height:u.floating.height}:u.reference,T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d.floating)),A=await(l.isElement==null?void 0:l.isElement(T))&&await(l.getScale==null?void 0:l.getScale(T))||{x:1,y:1},N=Bu(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:O,offsetParent:T,strategy:f}):O);return{top:(R.top-N.top+w.top)/A.y,bottom:(N.bottom-R.bottom+w.bottom)/A.y,left:(R.left-N.left+w.left)/A.x,right:(N.right-R.right+w.right)/A.x}}const qI=50,YI=async(e,t,s)=>{const{placement:i="bottom",strategy:o="absolute",middleware:l=[],platform:u}=s,d=u.detectOverflow?u:{...u,detectOverflow:KI},f=await(u.isRTL==null?void 0:u.isRTL(t));let g=await u.getElementRects({reference:e,floating:t,strategy:o}),{x:m,y:h}=tE(g,i,f),x=i,S=0;const w={};for(let C=0;C<l.length;C++){const E=l[C];if(!E)continue;const{name:R,fn:O}=E,{x:T,y:A,data:N,reset:j}=await O({x:m,y:h,initialPlacement:i,placement:x,strategy:o,middlewareData:w,rects:g,platform:d,elements:{reference:e,floating:t}});m=T??m,h=A??h,w[R]={...w[R],...N},j&&S<qI&&(S++,typeof j=="object"&&(j.placement&&(x=j.placement),j.rects&&(g=j.rects===!0?await u.getElementRects({reference:e,floating:t,strategy:o}):j.rects),{x:m,y:h}=tE(g,x,f)),C=-1)}return{x:m,y:h,placement:x,strategy:o,middlewareData:w}},GI=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var s,i;const{placement:o,middlewareData:l,rects:u,initialPlacement:d,platform:f,elements:g}=t,{mainAxis:m=!0,crossAxis:h=!0,fallbackPlacements:x,fallbackStrategy:S="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:C=!0,...E}=Ka(e,t);if((s=l.arrow)!=null&&s.alignmentOffset)return{};const R=ys(o),O=Is(d),T=ys(d)===d,A=await(f.isRTL==null?void 0:f.isRTL(g.floating)),N=x||(T||!C?[qh(d)]:_4(d)),j=w!=="none";!x&&j&&N.push(...B4(d,C,w,A));const D=[d,...N],M=await f.detectOverflow(t,E),z=[];let L=((i=l.flip)==null?void 0:i.overflows)||[];if(m&&z.push(M[R]),h){const H=z4(o,u,A);z.push(M[H[0]],M[H[1]])}if(L=[...L,{placement:o,overflows:z}],!z.every(H=>H<=0)){var K,X;const H=(((K=l.flip)==null?void 0:K.index)||0)+1,U=D[H];if(U&&(!(h==="alignment"?O!==Is(U):!1)||L.every($=>Is($.placement)===O?$.overflows[0]>0:!0)))return{data:{index:H,overflows:L},reset:{placement:U}};let _=(X=L.filter(Q=>Q.overflows[0]<=0).sort((Q,$)=>Q.overflows[1]-$.overflows[1])[0])==null?void 0:X.placement;if(!_)switch(S){case"bestFit":{var B;const Q=(B=L.filter($=>{if(j){const q=Is($.placement);return q===O||q==="y"}return!0}).map($=>[$.placement,$.overflows.filter(q=>q>0).reduce((q,Y)=>q+Y,0)]).sort(($,q)=>$[1]-q[1])[0])==null?void 0:B[0];Q&&(_=Q);break}case"initialPlacement":_=d;break}if(o!==_)return{reset:{placement:_}}}return{}}}},aT=new Set(["left","top"]);async function $I(e,t){const{placement:s,platform:i,elements:o}=e,l=await(i.isRTL==null?void 0:i.isRTL(o.floating)),u=ys(s),d=xi(s),f=Is(s)==="y",g=aT.has(u)?-1:1,m=l&&f?-1:1,h=Ka(t,e);let{mainAxis:x,crossAxis:S,alignmentAxis:w}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return d&&typeof w=="number"&&(S=d==="end"?w*-1:w),f?{x:S*m,y:x*g}:{x:x*g,y:S*m}}const QI=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var s,i;const{x:o,y:l,placement:u,middlewareData:d}=t,f=await $I(t,e);return u===((s=d.offset)==null?void 0:s.placement)&&(i=d.arrow)!=null&&i.alignmentOffset?{}:{x:o+f.x,y:l+f.y,data:{...f,placement:u}}}}},XI=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:s,y:i,placement:o,platform:l}=t,{mainAxis:u=!0,crossAxis:d=!1,limiter:f={fn:O=>{let{x:T,y:A}=O;return{x:T,y:A}}},...g}=Ka(e,t),m={x:s,y:i},h=await l.detectOverflow(t,g),x=Is(o),S=zv(x);let w=m[S],C=m[x];const E=(O,T)=>vC(T+h[O==="y"?"top":"left"],T,T-h[O==="y"?"bottom":"right"]);u&&(w=E(S,w)),d&&(C=E(x,C));const R=f.fn({...t,[S]:w,[x]:C});return{...R,data:{x:R.x-s,y:R.y-i,enabled:{[S]:u,[x]:d}}}}}},ZI=function(e){return e===void 0&&(e={}),{options:e,fn(t){var s,i;const{x:o,y:l,placement:u,rects:d,middlewareData:f}=t,{offset:g=0,mainAxis:m=!0,crossAxis:h=!0}=Ka(e,t),x={x:o,y:l},S=Is(u),w=zv(S);let C=x[w],E=x[S];const R=Ka(g,t),O=typeof R=="number"?{mainAxis:R,crossAxis:0}:{mainAxis:(s=R.mainAxis)!=null?s:0,crossAxis:(i=R.crossAxis)!=null?i:0};if(m){const N=w==="y"?"height":"width",j=d.reference[w]-d.floating[N]+O.mainAxis,D=d.reference[w]+d.reference[N]-O.mainAxis;C<j?C=j:C>D&&(C=D)}if(h){var T,A;const N=w==="y"?"width":"height",j=aT.has(ys(u)),D=d.reference[S]-d.floating[N]+(j&&((T=f.offset)==null?void 0:T[S])||0)+(j?0:O.crossAxis),M=d.reference[S]+d.reference[N]+(j?0:((A=f.offset)==null?void 0:A[S])||0)-(j?O.crossAxis:0);E<D?E=D:E>M&&(E=M)}return{[w]:C,[S]:E}}}},WI=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:s,rects:i,platform:o,elements:l}=t,{apply:u=()=>{},...d}=Ka(e,t),f=await o.detectOverflow(t,d),g=ys(s),m=xi(s),h=Is(s)==="y",{width:x,height:S}=i.floating;let w,C;g==="top"||g==="bottom"?(w=g,C=m===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(C=g,w=m==="end"?"top":"bottom");const E=S-f.top-f.bottom,R=x-f.left-f.right,O=sc(S-f[w],E),T=sc(x-f[C],R),A=t.middlewareData.shift,N=!A;let j=O,D=T;A!=null&&A.enabled.x&&(D=R),A!=null&&A.enabled.y&&(j=E),N&&!m&&(h?D=x-2*Zi(f.left,f.right):j=S-2*Zi(f.top,f.bottom)),await u({...t,availableWidth:D,availableHeight:j});const M=await o.getDimensions(l.floating);return x!==M.width||S!==M.height?{reset:{rects:!0}}:{}}}};function oT(e){const t=vs(e);let s=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const o=bn(e),l=o?e.offsetWidth:s,u=o?e.offsetHeight:i,d=Kh(s)!==l||Kh(i)!==u;return d&&(s=l,i=u),{width:s,height:i,$:d}}function tb(e){return ln(e)?e:e.contextElement}function Xl(e){const t=tb(e);if(!bn(t))return Wi(1);const s=t.getBoundingClientRect(),{width:i,height:o,$:l}=oT(t);let u=(l?Kh(s.width):s.width)/i,d=(l?Kh(s.height):s.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!d||!Number.isFinite(d))&&(d=1),{x:u,y:d}}const JI=Wi(0);function lT(e){const t=Rn(e);return!Dv()||!t.visualViewport?JI:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function e3(e,t,s){return t===void 0&&(t=!1),!!s&&t&&s===Rn(e)}function _o(e,t,s,i){t===void 0&&(t=!1),s===void 0&&(s=!1);const o=e.getBoundingClientRect(),l=tb(e);let u=Wi(1);t&&(i?ln(i)&&(u=Xl(i)):u=Xl(e));const d=e3(l,s,i)?lT(l):Wi(0);let f=(o.left+d.x)/u.x,g=(o.top+d.y)/u.y,m=o.width/u.x,h=o.height/u.y;if(l&&i){const x=Rn(l),S=ln(i)?Rn(i):i;let w=x,C=Ly(w);for(;C&&S!==w;){const E=Xl(C),R=C.getBoundingClientRect(),O=vs(C),T=R.left+(C.clientLeft+parseFloat(O.paddingLeft))*E.x,A=R.top+(C.clientTop+parseFloat(O.paddingTop))*E.y;f*=E.x,g*=E.y,m*=E.x,h*=E.y,f+=T,g+=A,w=Rn(C),C=Ly(w)}}return Bu({width:m,height:h,x:f,y:g})}function $p(e,t){const s=Ep(e).scrollLeft;return t?t.left+s:_o(na(e)).left+s}function cT(e,t){const s=e.getBoundingClientRect(),i=s.left+t.scrollLeft-$p(e,s),o=s.top+t.scrollTop;return{x:i,y:o}}function t3(e){let{elements:t,rect:s,offsetParent:i,strategy:o}=e;const l=o==="fixed",u=na(i),d=t?wp(t.floating):!1;if(i===u||d&&l)return s;let f={scrollLeft:0,scrollTop:0},g=Wi(1);const m=Wi(0),h=bn(i);if((h||!l)&&((Rr(i)!=="body"||ed(u))&&(f=Ep(i)),h)){const S=_o(i);g=Xl(i),m.x=S.x+i.clientLeft,m.y=S.y+i.clientTop}const x=u&&!h&&!l?cT(u,f):Wi(0);return{width:s.width*g.x,height:s.height*g.y,x:s.x*g.x-f.scrollLeft*g.x+m.x+x.x,y:s.y*g.y-f.scrollTop*g.y+m.y+x.y}}function n3(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function r3(e){const t=Ep(e),s=e.ownerDocument.body,i=Zi(e.scrollWidth,e.clientWidth,s.scrollWidth,s.clientWidth),o=Zi(e.scrollHeight,e.clientHeight,s.scrollHeight,s.clientHeight);let l=-t.scrollLeft+$p(e);const u=-t.scrollTop;return vs(s).direction==="rtl"&&(l+=Zi(e.clientWidth,s.clientWidth)-i),{width:i,height:o,x:l,y:u}}const s3=25;function i3(e,t,s){s===void 0&&(s="viewport");const i=s==="layoutViewport",o=Rn(e),l=na(e),u=o.visualViewport;let d=l.clientWidth,f=l.clientHeight,g=0,m=0;if(u){const x=!Dv()||t==="fixed";i?x||(g=-u.offsetLeft,m=-u.offsetTop):(d=u.width,f=u.height,x&&(g=u.offsetLeft,m=u.offsetTop))}if($p(l)<=0){const x=l.ownerDocument,S=x.body,w=getComputedStyle(S),C=x.compatMode==="CSS1Compat"&&parseFloat(w.marginLeft)+parseFloat(w.marginRight)||0,E=Math.abs(l.clientWidth-S.clientWidth-C),R=getComputedStyle(l).scrollbarGutter==="stable both-edges"?E/2:E;R<=s3&&(d-=R)}return{width:d,height:f,x:g,y:m}}function a3(e,t){const s=_o(e,!0,t==="fixed"),i=s.top+e.clientTop,o=s.left+e.clientLeft,l=Xl(e),u=e.clientWidth*l.x,d=e.clientHeight*l.y,f=o*l.x,g=i*l.y;return{width:u,height:d,x:f,y:g}}function nE(e,t,s){let i;if(t==="viewport"||t==="layoutViewport")i=i3(e,s,t);else if(t==="document")i=r3(na(e));else if(ln(t))i=a3(t,s);else{const o=lT(e);i={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Bu(i)}function o3(e,t){const s=t.get(e);if(s)return s;let i=Uu(e,[],!1).filter(d=>ln(d)&&Rr(d)!=="body"),o=null;const l=vs(e).position==="fixed";let u=l?Ji(e):e;for(;ln(u)&&!Xi(u);){const d=vs(u),f=Nv(u),g=o?o.position:l?"fixed":"";!f&&(g==="fixed"||g==="absolute"&&d.position==="static")?i=i.filter(h=>h!==u):o=d,u=Ji(u)}return t.set(e,i),i}function l3(e){let{element:t,boundary:s,rootBoundary:i,strategy:o}=e;const u=[...s==="clippingAncestors"?wp(t)?[]:o3(t,this._c):[].concat(s),i],d=nE(t,u[0],o);let f=d.top,g=d.right,m=d.bottom,h=d.left;for(let x=1;x<u.length;x++){const S=nE(t,u[x],o);f=Zi(S.top,f),g=sc(S.right,g),m=sc(S.bottom,m),h=Zi(S.left,h)}return{width:g-h,height:m-f,x:h,y:f}}function c3(e){const{width:t,height:s}=oT(e);return{width:t,height:s}}function u3(e,t,s){const i=bn(t),o=na(t),l=s==="fixed",u=_o(e,!0,l,t);let d={scrollLeft:0,scrollTop:0};const f=Wi(0);if((i||!l)&&((Rr(t)!=="body"||ed(o))&&(d=Ep(t)),i)){const x=_o(t,!0,l,t);f.x=x.x+t.clientLeft,f.y=x.y+t.clientTop}!i&&o&&(f.x=$p(o));const g=o&&!i&&!l?cT(o,d):Wi(0),m=u.left+d.scrollLeft-f.x-g.x,h=u.top+d.scrollTop-f.y-g.y;return{x:m,y:h,width:u.width,height:u.height}}function dy(e){return vs(e).position==="static"}function rE(e,t){if(!bn(e)||vs(e).position==="fixed")return null;if(t)return t(e);let s=e.offsetParent;return na(e)===s&&(s=s.ownerDocument.body),s}function uT(e,t){const s=Rn(e);if(wp(e))return s;if(!bn(e)){let o=Ji(e);for(;o&&!Xi(o);){if(ln(o)&&!dy(o))return o;o=Ji(o)}return s}let i=rE(e,t);for(;i&&t4(i)&&dy(i);)i=rE(i,t);return i&&Xi(i)&&dy(i)&&!Nv(i)?s:i||s4(e)||s}const d3=async function(e){const t=this.getOffsetParent||uT,s=this.getDimensions,i=await s(e.floating);return{reference:u3(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function f3(e){return vs(e).direction==="rtl"}const dT={convertOffsetParentRelativeRectToViewportRelativeRect:t3,getDocumentElement:na,getClippingRect:l3,getOffsetParent:uT,getElementRects:d3,getClientRects:n3,getDimensions:c3,getScale:Xl,isElement:ln,isRTL:f3};function fT(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function h3(e,t,s){let i=null,o;const l=na(e);function u(){var m;clearTimeout(o),(m=i)==null||m.disconnect(),i=null}function d(m,h){m===void 0&&(m=!1),h===void 0&&(h=1),u();const x=e.getBoundingClientRect(),{left:S,top:w,width:C,height:E}=x;if(m||t(),!C||!E)return;const R=Jf(w),O=Jf(l.clientWidth-(S+C)),T=Jf(l.clientHeight-(w+E)),A=Jf(S),j={rootMargin:-R+"px "+-O+"px "+-T+"px "+-A+"px",threshold:Zi(0,sc(1,h))||1};let D=!0;function M(z){const L=z[0].intersectionRatio;if(!fT(x,e.getBoundingClientRect()))return d();if(L!==h){if(!D)return d();L?d(!1,L):o=setTimeout(()=>{d(!1,1e-7)},1e3)}D=!1}try{i=new IntersectionObserver(M,{...j,root:l.ownerDocument})}catch{i=new IntersectionObserver(M,j)}i.observe(e)}const f=Rn(e),g=()=>d(s);return f.addEventListener("resize",g),d(!0),()=>{f.removeEventListener("resize",g),u()}}function sE(e,t,s,i){i===void 0&&(i={});const{ancestorScroll:o=!0,ancestorResize:l=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:f=!1}=i,g=tb(e),m=o||l?[...g?Uu(g):[],...t?Uu(t):[]]:[];m.forEach(R=>{o&&R.addEventListener("scroll",s),l&&R.addEventListener("resize",s)});const h=g&&d?h3(g,s,l):null;let x=-1,S=null;u&&(S=new ResizeObserver(R=>{let[O]=R;O&&O.target===g&&S&&t&&(S.unobserve(t),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var T;(T=S)==null||T.observe(t)})),s()}),g&&!f&&S.observe(g),t&&S.observe(t));let w,C=f?_o(e):null;f&&E();function E(){const R=_o(e);C&&!fT(C,R)&&s(),C=R,w=requestAnimationFrame(E)}return s(),()=>{var R;m.forEach(O=>{o&&O.removeEventListener("scroll",s),l&&O.removeEventListener("resize",s)}),h?.(),(R=S)==null||R.disconnect(),S=null,f&&cancelAnimationFrame(w)}}const p3=QI,g3=XI,m3=GI,y3=WI,v3=ZI,b3=(e,t,s)=>{const i=new Map,o=s??{},l={...dT,...o.platform,_c:i};return YI(e,t,{...o,platform:l})};var x3=typeof document<"u",S3=function(){},kh=x3?b.useLayoutEffect:S3;function Zh(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let s,i,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(s=e.length,s!==t.length)return!1;for(i=s;i--!==0;)if(!Zh(e[i],t[i]))return!1;return!0}if(o=Object.keys(e),s=o.length,s!==Object.keys(t).length)return!1;for(i=s;i--!==0;)if(!{}.hasOwnProperty.call(t,o[i]))return!1;for(i=s;i--!==0;){const l=o[i];if(!(l==="_owner"&&e.$$typeof)&&!Zh(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function hT(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function iE(e,t){const s=hT(e);return Math.round(t*s)/s}function fy(e){const t=b.useRef(e);return kh(()=>{t.current=e}),t}function w3(e){e===void 0&&(e={});const{placement:t="bottom",strategy:s="absolute",middleware:i=[],platform:o,elements:{reference:l,floating:u}={},transform:d=!0,whileElementsMounted:f,open:g}=e,[m,h]=b.useState({x:0,y:0,strategy:s,placement:t,middlewareData:{},isPositioned:!1}),[x,S]=b.useState(i);Zh(x,i)||S(i);const[w,C]=b.useState(null),[E,R]=b.useState(null),O=b.useCallback($=>{$!==j.current&&(j.current=$,C($))},[]),T=b.useCallback($=>{$!==D.current&&(D.current=$,R($))},[]),A=l||w,N=u||E,j=b.useRef(null),D=b.useRef(null),M=b.useRef(m),z=f!=null,L=fy(f),K=fy(o),X=fy(g),B=b.useCallback(()=>{if(!j.current||!D.current)return;const $={placement:t,strategy:s,middleware:x};K.current&&($.platform=K.current),b3(j.current,D.current,$).then(q=>{const Y={...q,isPositioned:X.current!==!1};H.current&&!Zh(M.current,Y)&&(M.current=Y,hr.flushSync(()=>{h(Y)}))})},[x,t,s,K,X]);kh(()=>{g===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,h($=>({...$,isPositioned:!1})))},[g]);const H=b.useRef(!1);kh(()=>(H.current=!0,()=>{H.current=!1}),[]),kh(()=>{if(A&&(j.current=A),N&&(D.current=N),A&&N){if(L.current)return L.current(A,N,B);B()}},[A,N,B,L,z]);const U=b.useMemo(()=>({reference:j,floating:D,setReference:O,setFloating:T}),[O,T]),_=b.useMemo(()=>({reference:A,floating:N}),[A,N]),Q=b.useMemo(()=>{const $={position:s,left:0,top:0};if(!_.floating)return $;const q=iE(_.floating,m.x),Y=iE(_.floating,m.y);return d?{...$,transform:"translate("+q+"px, "+Y+"px)",...hT(_.floating)>=1.5&&{willChange:"transform"}}:{position:s,left:q,top:Y}},[s,d,_.floating,m.x,m.y]);return b.useMemo(()=>({...m,update:B,refs:U,elements:_,floatingStyles:Q}),[m,B,U,_,Q])}const E3=(e,t)=>{const s=p3(e);return{name:s.name,fn:s.fn,options:[e,t]}},R3=(e,t)=>{const s=g3(e);return{name:s.name,fn:s.fn,options:[e,t]}},C3=(e,t)=>({fn:v3(e).fn,options:[e,t]}),T3=(e,t)=>{const s=m3(e);return{name:s.name,fn:s.fn,options:[e,t]}},k3=(e,t)=>{const s=y3(e);return{name:s.name,fn:s.fn,options:[e,t]}},O3={...$i,disabled:e=>e.disabled,instantType:e=>e.instantType,isInstantPhase:e=>e.isInstantPhase,trackCursorAxis:e=>e.trackCursorAxis,disableHoverablePopup:e=>e.disableHoverablePopup,lastOpenChangeReason:e=>e.openChangeReason,closeOnClick:e=>e.closeOnClick,appliedTriggerProps:(e,t)=>t?e.activeTriggerProps:void 0,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin};class A3 extends cc{constructor(t,s,i){const o=new ld;super(M3(t,o,s,i),N3(o),O3)}setOpen=(t,s)=>{CI(this,t,s,{extraState:{openChangeReason:s.reason}})};cancelPendingOpen(t){this.state.floatingRootContext.dispatchOpenChange(!1,lt(Qs,t))}}function M3(e,t,s,i=!1){return{...qp(t,s,i),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...e}}function N3(e){return{popupRef:b.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}const D3=Wu(function(t){const{disabled:s=!1,defaultOpen:i=!1,open:o,disableHoverablePopup:l=!1,trackCursorAxis:u="none",actionsRef:d,onOpenChange:f,onOpenChangeComplete:g,handle:m,triggerId:h,defaultTriggerId:x=null,children:S}=t,w=Qv((K,X)=>new A3({open:i,openProp:o,activeTriggerId:x,triggerIdProp:h},K,X));w.useControlledProp("openProp",o),w.useControlledProp("triggerIdProp",h),w.useContextCallback("onOpenChange",f),w.useContextCallback("onOpenChangeComplete",g);const C=w.useState("open"),E=!s&&C,R=w.useState("activeTriggerId"),O=w.useState("mounted"),T=w.useState("payload");w.useSyncedValues({trackCursorAxis:u,disableHoverablePopup:l,disabled:s}),Fp(w,{closeOnActiveTriggerUnmount:!0});const{forceUnmount:A,transitionStatus:N}=Bp(E,w),j=w.useState("isInstantPhase"),D=w.useState("instantType"),M=w.useState("lastOpenChangeReason"),z=b.useRef(null);Pe(()=>{C&&s&&w.setOpen(!1,lt(hC))},[C,s,w]),Pe(()=>{N==="ending"&&M===Cr||N!=="ending"&&j?(D!=="delay"&&(z.current=D),w.set("instantType","delay")):z.current!==null&&(w.set("instantType",z.current),z.current=null)},[N,j,M,D,w]),Pe(()=>{E&&R==null&&w.set("payload",void 0)},[w,R,E]),b.useImperativeHandle(d,()=>({unmount:A,close:()=>w.setOpen(!1,lt(sd))}),[A,w]);const L=E||O||!s&&u!=="none";return v.jsxs(iC.Provider,{value:w,children:[m&&v.jsx(zp,{handle:m,store:w}),L&&v.jsx(j3,{store:w,disabled:s,trackCursorAxis:u}),typeof S=="function"?S({payload:T}):S]})});function j3({store:e,disabled:t,trackCursorAxis:s}){const i=e.useState("floatingRootContext"),o=ad(i,{enabled:!t,referencePress:()=>e.select("closeOnClick")}),l=xI(i,{enabled:!t&&s!=="none",axis:s==="none"?void 0:s}),u=b.useMemo(()=>Dr(l.reference,o.reference),[l.reference,o.reference]);return Vp(e,{activeTriggerProps:u,inactiveTriggerProps:u,popupProps:o.floating??Xt}),null}function $n(e){return lc(e,"base-ui")}const pT=b.createContext(void 0);function I3(){return b.useContext(pT)}const P3=600,aE="data-base-ui-tooltip-trigger";function oE(e){const t=sr(e);return ln(t)?t:null}const L3=vp(function(t,s){const{render:i,className:o,style:l,handle:u,payload:d,disabled:f,delay:g,closeOnClick:m=!0,closeDelay:h,id:x,...S}=t,w=Ju(!0),E=Yp(u)??w;if(!E)throw new Error(cn(82));const R=$n(x),O=E.useState("isTriggerActive",R),T=E.useState("isOpenedByTrigger",R),A=E.useState("floatingRootContext"),N=b.useRef(null),j=h??0,{registerTrigger:D,isMountedByThisTrigger:M}=Hp(R,N,E,{payload:d,closeOnClick:m,closeDelay:j}),z=I3(),{activeIdRef:L,delayRef:K,isInstantPhase:X,hasProvider:B}=k4(A,{open:T}),H=Zv(A);E.useSyncedValue("isInstantPhase",X);const U=E.useState("disabled"),_=f??U,Q=Ln(_),$=E.useState("trackCursorAxis"),q=E.useState("disableHoverablePopup"),Y=b.useRef(!1),ee=Un(),G=b.useRef(void 0);function ae(){return B&&L.current!=null?0:g??z??P3}function I(ce){const Re=N.current;if(!Re||!ce)return!1;const be=Hu(ce,`[${aE}]`);return be!==null&&be!==Re&&st(Re,be)}function F(ce){const Re=I(ce);return Y.current=Re,Re&&(H.openChangeTimeout.clear(),H.restTimeout.clear(),H.restTimeoutPending=!1,ee.clear()),Re}const Z=Jv(A,{enabled:!_,mouseOnly:!0,move:!1,handleClose:!q&&$!=="both"?eb():null,restMs:ae,delay(){return h==null&&B?{close:zo(K.current,"close")}:{close:j}},triggerElementRef:N,isActiveTrigger:O,isClosing:()=>E.select("transitionStatus")==="ending",shouldOpen(){return!Y.current}}),ne=nT(A,{enabled:!_}).reference,ye=ce=>{const Re=Y.current,be=oE(ce),Le=F(be),Oe=N.current,ze=Oe&&be&&st(Oe,be);if(Le&&E.select("open")&&E.select("lastOpenChangeReason")===Kn){E.setOpen(!1,lt(Kn,ce));return}if(Re&&!Le&&ze&&!Q.current&&!E.select("open")&&Oe&&Ha(G.current)){const Ve=()=>{!Y.current&&!Q.current&&!E.select("open")&&E.setOpen(!0,lt(Kn,ce,Oe))},ke=ae();ke===0?(ee.clear(),Ve()):ee.start(ke,Ve)}},se=E.useState("appliedTriggerProps",M||$!=="none");return bt("button",t,{state:{open:T},ref:[s,D,N],props:[Z,ne,se,{onMouseOver(ce){ye(ce.nativeEvent)},onFocus(ce){I(oE(ce.nativeEvent))&&ce.preventBaseUIHandler()},onMouseLeave(){Y.current=!1,ee.clear(),G.current=void 0},onPointerEnter(ce){G.current=ce.pointerType},onPointerDown(ce){G.current=ce.pointerType,E.set("closeOnClick",m),m&&!E.select("open")&&E.cancelPendingOpen(ce.nativeEvent)},onClick(ce){m&&!E.select("open")&&E.cancelPendingOpen(ce.nativeEvent)},id:R,[_y]:_?"":void 0,[aE]:_?void 0:""},S],stateAttributesMapping:Tp})}),gT=b.createContext(void 0);function z3(){const e=b.useContext(gT);if(e===void 0)throw new Error(cn(70));return e}const _3=b.forwardRef(function(t,s){const{children:i,container:o,className:l,render:u,style:d,...f}=t,{node:g,subtree:m}=BC({container:o,ref:s,componentProps:t,elementProps:f});return!m&&!g?null:v.jsxs(b.Fragment,{children:[m,g&&hr.createPortal(i,g)]})}),U3=b.forwardRef(function(t,s){const{keepMounted:i=!1,...o}=t;return Ju().useState("mounted")||i?v.jsx(gT.Provider,{value:i,children:v.jsx(_3,{ref:s,...o})}):null}),mT=b.createContext(void 0);function yT(){const e=b.useContext(mT);if(e===void 0)throw new Error(cn(71));return e}function H3(e){const{nodeId:t,externalTree:s,rootContext:i}=e,o=i.useState("referenceElement"),l=i.useState("floatingElement"),u=i.useState("domReferenceElement"),d=i.useState("open"),f=i.useState("floatingId"),[g,m]=b.useState(null),h=b.useRef(null),x=Xa(s),S=b.useMemo(()=>({reference:o,floating:l,domReference:u}),[o,l,u]),w=w3({...e,elements:{...S,...g&&{reference:g}}}),C=b.useCallback(T=>{const A=ln(T)?{getBoundingClientRect:()=>T.getBoundingClientRect(),getClientRects:()=>T.getClientRects(),contextElement:T}:T;m(A),w.refs.setReference(A)},[w.refs]),E=b.useMemo(()=>({...w.refs,setPositionReference:C,domReference:h}),[w.refs,C]),R=b.useMemo(()=>({...w.elements,domReference:u}),[w.elements,u]),O=b.useMemo(()=>({...w,dataRef:i.context.dataRef,open:d,onOpenChange:i.setOpen,events:i.context.events,floatingId:f,refs:E,elements:R,nodeId:t,rootStore:i}),[w,E,R,t,i,d,f]);return Pe(()=>{u&&(h.current=u)},[u]),Pe(()=>{i.context.dataRef.current.floatingContext=O;const T=x?.nodesRef.current.find(A=>A.id===t);T&&(T.context=O)}),b.useMemo(()=>({...w,context:O,refs:E,elements:R,rootStore:i}),[w,E,R,O,i])}const F3=b.createContext(void 0);function Qp(){return b.useContext(F3)?.direction??"ltr"}const B3=e=>({name:"arrow",options:e,async fn(t){const{x:s,y:i,placement:o,rects:l,platform:u,elements:d,middlewareData:f}=t,{element:g,padding:m=0}=Ka(e,t)||{};if(g==null)return{};const h=bC(m),x={x:s,y:i},S=Uv(o),w=_v(S),C=await u.getDimensions(g),E=S==="y",R=E?"top":"left",O=E?"bottom":"right",T=E?"clientHeight":"clientWidth",A=l.reference[w]+l.reference[S]-x[S]-l.floating[w],N=x[S]-l.reference[S],j=d.floating[T]||l.floating[w],D=A/2-N/2,M=j/2-C[w]/2-1,z=Math.min(h[R],M),L=Math.min(h[O],M),K=z,X=j-C[w]-L,B=j/2-C[w]/2+D,H=vC(K,B,X),U=!f.arrow&&xi(o)!=null&&B!==H&&l.reference[w]/2-(B<K?z:L)-C[w]/2<0,_=U?B<K?B-K:B-X:0;return{[S]:x[S]+_,data:{[S]:H,centerOffset:B-H-_,...U&&{alignmentOffset:_}},reset:U}}}),V3=(e,t)=>{const{name:s,fn:i}=B3(e);return{name:s,fn:i,options:[e,t]}},K3={name:"hide",async fn(e){const{width:t,height:s,x:i,y:o}=e.rects.reference,l=t===0&&s===0&&i===0&&o===0,u=await e.platform.detectOverflow(e,{elementContext:"reference"});return{data:{referenceHidden:u.top-s>=0||u.right-t>=0||u.bottom-s>=0||u.left-t>=0||l}}}},q3={sideX:"left",sideY:"top"},Y3="--available-width",G3="--available-height",$3="--anchor-width",Q3="--anchor-height",X3="--transform-origin",lE=Y3,cE=G3;function vT(e,t,s){const i=e==="inline-start"||e==="inline-end";return{top:"top",right:i?s?"inline-start":"inline-end":"right",bottom:"bottom",left:i?s?"inline-end":"inline-start":"left"}[t]}function uE(e,t,s){const{rects:i,placement:o}=e;return{side:vT(t,ys(o),s),align:xi(o)||"center",anchor:{width:i.reference.width,height:i.reference.height},positioner:{width:i.floating.width,height:i.floating.height}}}function Xp(e){return Z3(e,H3)}function Z3(e,t){const{anchor:s,positionMethod:i="absolute",side:o="bottom",sideOffset:l=0,align:u="center",alignOffset:d=0,collisionBoundary:f,collisionPadding:g=5,sticky:m=!1,arrowPadding:h=5,disableAnchorTracking:x=!1,inline:S,keepMounted:w=!1,floatingRootContext:C,mounted:E,collisionAvoidance:R,shift:O,nodeId:T,adaptiveOrigin:A,lazyFlip:N=!1,externalTree:j}=e,D=R.side||"flip",M=R.align||"flip",z=R.fallbackAxisSide||"end",L=O?.crossAxis??!1,K=O?.rootBoundary,X=typeof s=="function"?s:void 0,B=Be(X),H=X?B:s,U=Ln(s),_=Ln(E),$=Qp()==="rtl",[q,Y]=b.useState(null);!E&&q!==null&&Y(null);const ee=N==="placement",G=q?ys(q):null,ae=q&&ee?xi(q)||"center":null,I=G||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":$?"left":"right","inline-start":$?"right":"left"}[o],F=ae||u,Z=F==="center"?I:`${I}-${F}`;let ne=g;typeof ne=="number"?ne={top:ne,right:ne,bottom:ne,left:ne}:ne&&(ne={top:ne.top||0,right:ne.right||0,bottom:ne.bottom||0,left:ne.left||0});const ye=1,se=o==="bottom"?ye:0,ge=o==="top"?ye:0,fe=o==="right"?ye:0,ce=o==="left"?ye:0,Re={boundary:f==="clipping-ancestors"?"clippingAncestors":f,padding:ne},be=b.useRef(null),Le=Ln(l),Oe=Ln(d),ze=typeof l!="function"?l:0,Ve=typeof d!="function"?d:0,ke=[];S&&ke.push(S),ke.push(E3(je=>{const at=uE(je,o,$),Ie=typeof Le.current=="function"?Le.current(at):Le.current,_e=typeof Oe.current=="function"?Oe.current(at):Oe.current;return{mainAxis:Ie,crossAxis:_e,alignmentAxis:_e}},[ze,Ve,$,o]));const Ue=M==="none"&&D!=="shift",xe=!Ue&&(m||L||D==="shift"),Fe=D==="none"?null:T3({...Re,padding:{top:ne.top+ye+se,right:ne.right+ye+ce,bottom:ne.bottom+ye+ge,left:ne.left+ye+fe},mainAxis:!L&&D==="flip",crossAxis:M==="flip"?"alignment":!1,fallbackAxisSideDirection:z}),Ze=Ue?null:R3({...Re,rootBoundary:K,mainAxis:M!=="none",crossAxis:xe,limiter:m||L?void 0:C3(je=>{if(!be.current)return{};const{width:at,height:Ie}=be.current.getBoundingClientRect(),_e=Is(ys(je.placement)),$e=_e==="y"?at:Ie,tt=_e==="y"?ne.left+ne.right:ne.top+ne.bottom;return{offset:$e/2+tt/2}})},[Re,m,L,K,ne,M]);D==="shift"||M==="shift"||F==="center"?ke.push(Ze,Fe):ke.push(Fe,Ze),ke.push(k3({...Re,apply({elements:{floating:je},availableWidth:at,availableHeight:Ie,rects:_e}){if(!_.current)return;const $e=je.style;$e.setProperty(lE,`${at}px`),$e.setProperty(cE,`${Ie}px`);const tt=Rn(je).devicePixelRatio||1,{x:kt,y:V,width:J,height:re}=_e.reference,ve=(Math.round((kt+J)*tt)-Math.round(kt*tt))/tt,Se=(Math.round((V+re)*tt)-Math.round(V*tt))/tt;$e.setProperty($3,`${ve}px`),$e.setProperty(Q3,`${Se}px`)}}),V3(je=>({element:be.current||qt(je.elements.floating).createElement("div"),padding:be.current?h:0}),[h]),{name:"transformOrigin",fn(je){const{elements:{floating:at},middlewareData:Ie,placement:_e,platform:$e,rects:tt,y:kt}=je,V=ys(_e),J=xi(_e),re=Is(V)==="y",ve=be.current,Se=typeof l=="function"?l(uE(je,o,$)):l;let qe;if(!ve&&J&&Math.abs(re?Ie.shift?.x||0:Ie.shift?.y||0)<=1)qe=J==="start"===(re&&$e.isRTL?.(at)===!0)?"100%":"0%";else{const Xe=re?Ie.arrow?.x||0:Ie.arrow?.y||0,Qe=re?ve?.clientWidth||0:ve?.clientHeight||0;qe=`${Xe+Qe/2}px`}let Ke=V==="top"||V==="left"?`calc(100% + ${Se}px)`:`${-Se}px`;return xe&&re&&Math.abs(Ie.shift?.y||0)>Se&&(Ke=`${tt.reference.y+tt.reference.height/2-kt}px`),at.style.setProperty(X3,re?`${qe} ${Ke}`:`${Ke} ${qe}`),{}}},K3,A),Pe(()=>{!E&&C&&C.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[E,C]);const ot=b.useMemo(()=>({ancestorScroll:!x,elementResize:!x&&typeof ResizeObserver<"u",layoutShift:!x&&typeof IntersectionObserver<"u"}),[x]),{refs:de,elements:Ee,x:Ge,y:Me,middlewareData:De,update:xt,placement:dt,context:gt,isPositioned:Nt,floatingStyles:jt}=t({rootContext:C,open:w?E:void 0,placement:Z,middleware:ke,strategy:i,whileElementsMounted:w?void 0:(...je)=>sE(...je,ot),nodeId:T,externalTree:j}),{sideX:tn,sideY:an}=De.adaptiveOrigin||q3,nn=Nt?i:"fixed",et=b.useMemo(()=>{let je;return Nt?A?je={position:nn,[tn]:Ge,[an]:Me}:je={...jt,position:nn}:je={position:nn,top:0,left:0},je[lE]="100vw",je[cE]="100vh",Nt||(je.opacity=0),je},[A,nn,tn,Ge,an,Me,jt,Nt]),Et=b.useRef(null);Pe(()=>{if(!E)return;const je=U.current,at=typeof je=="function"?je():je,_e=(dE(at)?at.current:at)||null||null;_e!==Et.current&&(de.setPositionReference(_e),Et.current=_e)},[E,de,H,U]),b.useEffect(()=>{if(!E)return;const je=U.current;typeof je!="function"&&dE(je)&&je.current!==Et.current&&(de.setPositionReference(je.current),Et.current=je.current)},[E,de,H,U]),b.useEffect(()=>{if(w&&E&&Ee.reference&&Ee.floating)return sE(Ee.reference,Ee.floating,xt,ot)},[w,E,Ee,xt,ot]);const Zt=ys(dt),ht=vT(o,Zt,$),St=xi(dt)||"center",yt=!!De.hide?.referenceHidden;Pe(()=>{N&&E&&Nt&&(Zt!==I||ee&&St!==F)&&Y(dt)},[N,ee,E,Nt,dt,Zt,St,I,F]);const Ut=b.useMemo(()=>({position:"absolute",top:De.arrow?.y,left:De.arrow?.x}),[De.arrow]),dn=De.arrow?.centerOffset!==0;return b.useMemo(()=>({positionerStyles:et,arrowStyles:Ut,arrowRef:be,arrowUncentered:dn,side:ht,align:St,physicalSide:Zt,anchorHidden:yt,refs:de,context:gt,isPositioned:Nt,update:xt}),[et,Ut,be,dn,ht,St,Zt,yt,de,gt,Nt,xt])}function dE(e){return e!=null&&"current"in e}function cd(e){return e==="starting"?pI:Xt}function Zp(e,t,{styles:s,transitionStatus:i,props:o,refs:l,hidden:u,inert:d=!1}){const f={...s};return d&&(f.pointerEvents="none"),bt("div",e,{state:t,ref:l,props:[{role:"presentation",hidden:u,style:f},cd(i),o],stateAttributesMapping:td})}const W3=b.forwardRef(function(t,s){const{render:i,className:o,anchor:l,positionMethod:u="absolute",side:d="top",align:f="center",sideOffset:g=0,alignOffset:m=0,collisionBoundary:h="clipping-ancestors",collisionPadding:x=5,arrowPadding:S=5,sticky:w=!1,disableAnchorTracking:C=!1,collisionAvoidance:E=qv,style:R,...O}=t,T=Ju(),A=z3(),N=T.useState("open"),j=T.useState("mounted"),D=T.useState("trackCursorAxis"),M=T.useState("disableHoverablePopup"),z=T.useState("floatingRootContext"),L=T.useState("instantType"),K=T.useState("transitionStatus"),X=T.useState("adaptiveOrigin"),B=Xp({anchor:l,positionMethod:u,floatingRootContext:z,mounted:j,side:d,sideOffset:g,align:f,alignOffset:m,collisionBoundary:h,collisionPadding:x,sticky:w,arrowPadding:S,disableAnchorTracking:C,keepMounted:A,collisionAvoidance:E,adaptiveOrigin:X}),H=b.useMemo(()=>({open:N,side:B.side,align:B.align,anchorHidden:B.anchorHidden,instant:D!=="none"?"tracking-cursor":L}),[N,B.side,B.align,B.anchorHidden,D,L]),U=Zp(t,H,{styles:B.positionerStyles,transitionStatus:K,props:O,refs:[s,T.useStateSetter("positionerElement")],hidden:!j,inert:!N||D==="both"||M});return v.jsx(mT.Provider,{value:B,children:U})}),J3=b.forwardRef(function(t,s){const{render:i,className:o,style:l,...u}=t,d=Ju(),{side:f,align:g}=yT(),m=d.useState("open"),h=d.useState("instantType"),x=d.useState("transitionStatus"),S=d.useState("popupProps"),w=d.useState("floatingRootContext"),C=d.useState("disabled"),E=d.useState("closeDelay");bs({open:m,ref:d.context.popupRef,onComplete(){m&&d.context.onOpenChangeComplete?.(!0)}}),Wv(w,{enabled:!C,closeDelay:E});const R=d.useStateSetter("popupElement");return bt("div",t,{state:{open:m,side:f,align:g,instant:h,transitionStatus:x},ref:[s,d.context.popupRef,R],props:[od,S,cd(x),u],stateAttributesMapping:kp})}),eP=b.forwardRef(function(t,s){const{render:i,className:o,style:l,...u}=t,d=Ju(),{arrowRef:f,side:g,align:m,arrowUncentered:h,arrowStyles:x}=yT(),S=d.useState("open"),w=d.useState("instantType");return bt("div",t,{state:{open:S,side:g,align:m,uncentered:h,instant:w},ref:[s,f],props:[{style:x,"aria-hidden":!0},u],stateAttributesMapping:td})}),tP=function(t){const{delay:s,closeDelay:i,timeout:o=400}=t,l=b.useMemo(()=>({open:s,close:i}),[s,i]);return v.jsx(pT.Provider,{value:s,children:v.jsx(T4,{delay:l,timeoutMs:o,children:t.children})})};function ud(e){return Bv(19)?e:e?"true":void 0}function nP(e){const[t,s]=b.useState({current:e,previous:null});return Object.is(e,t.current)||s({current:e,previous:t.current}),t.previous}const bT=48,Ci=(e,t=0)=>{const s=new Int32Array(e.length);for(let i=0;i<e.length;i++)s[i]=e.charCodeAt(i)-bT-t;return s},Wp=e=>{const t=new Int32Array(e.length+1);for(let s=0;s<e.length;s++)t[s+1]=t[s]+e[s];return t},Ya=e=>{const t=new Int32Array(e.length);let s=0;for(let i=0;i<e.length;i++){const o=e.charCodeAt(i)-bT;s+=o>>>1^-(o&1),t[i]=s}return t},rP=384,sP=[],Oo=Wp(Ci("E0500002005282000000002000150000020021820000011200000003022202000300004200120000200420001200021200301200010400162000010000220021010:2192001200220012000220012000200200200400010200040000000000400200108200110100000022010313000162002000020020012020080213000228200000000082000000000120002000120020020040101020300130001001010")),iP=Wp(Ci(":11111111211111119311546544411119731869:671397415686432441111111111161114151214313433415:78311132233313187211117221449443411141111151152226611131111112212518142224214215421421542142424242516171151615616347111111111197911327451111111111111111111113134714133513411111311111111111111111111112444411111342312715245411117:3")),aP="@containerabcdefghinlmoprstunderlineviawzccentlignnimatespectuto-colsrowsaglorightnessckdrop-sisbcontrastfiltergrayscalehue-rotateinvertopacityslurrightnessaturateepia-coniclinearpositionradialsizeockurrderttom-belrstxyespacing-xyaretoursorlnt-umnsendspantartainentrasteividerop-shadowurationcorationlay-xyasendillexontromlter-featuresstretchapr-xyayscaleidow-colsrowsue-rotatedentlinesetvert-beringsxyeshadoweiadingftnest-clamp-imageabein-lrstxyskx--b-coniclpositionrsizet-x-y-fromto-fromto-inearfromto-fromto-adialfromto-fromtofromtofromtofromtoblockhinlinew-screenesblockhinlinewbjectpacityrutlinederigin-offsetbelrstxyesrspective-originaceholderioghtng-offsettateundedw-xyz-belrstlreseslr-endspantartaturatecepiahizekewpace-taleroll-xyz-barmpbelrstxyesbelrstxyes-thumbrackadowrink-xyxyartrokeabextora-shadowpckingnsformitionlate-xyz-offsetill-changeoom",oP=(()=>{const e=Oo.length-1,t=new Int32Array(e);for(let o=e-1;o>=0;o--){let l=1,u=o+1;for(let d=Oo[o];d<Oo[o+1];d++)l+=t[u],u+=t[u];t[o]=l}const s=new Int32Array(Oo[e]);let i=0;for(let o=0;o<e;o++){let l=o+1;for(let u=Oo[o];u<Oo[o+1];u++)s[i++]=l,l+=t[l]}return s})(),lP=Ci("02000000000000900<=0?000B000F00F00ŏI0J0LNPRTVX0000]_a00000000000000000000000rst0000000zŏ00000000000…ŏ000ˆ0000ŏ0000000000—0000000000000000000000000000000000000000000000000000Ë000000000000000000000Þ000000000000000000ð0000000ø0ùúûüýþÿĀāĂ㥹Ć000000000000000000000000000000000000000000ħ0ĨĪ00000000000000000000ļĽ00000Ŭ000000",1),cP=Wp(Ci("123333359346463635126536711576")),uP=Ci("93203242332583253248325D>E?F@03263243255B:032523853:0325B:8GA032542H<C=12727B:0328432553;D>E?3257D>032585:0325B:;0328B:032"),dP=Ci("012113445661666666789111:5;;;;;;;;444;;;:62999<1161=62>>?61:21@ABCD4446996:64E:::;:?::64:F114GHHIHHHHIHH1HH1HH1HHHHHH::EEJ4444::EE4444441691;644444114244444:;K6666555555555555555999666664444444444444444444444226?6:66644L9M?D:111::::6DE199"),fP=Ya("020200202020020020020020020020200200200200200200200002020202001003040106000200200200200200200200200200200200200200200200200200200200200200200200200200200200020020020020020020002020200202002002002002002002002002002020002002020020200220200200200200200200200200200200020020020000200020002000200200200020020020002000200200200020020202002020202000200200020022000200200020020002002000200220002002000200W0Z00020020002002020002002000200g0j0002002000200200020020002002000200200020020002000200002000002002002002002000200020000200002002002002002002002020020020200200200200200200200200202020020020020020020020020002002002020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020002002002002002002000200200200200200200200200200020202020002000200020002002002002000020200200"),hP=(()=>{const e=new Int32Array(319).fill(-1),t=Ya("02422242:222222242224222242442222222422222244442242226224222426222422442462222422622222222626222462242622422622422424242422222222422222222242422222222222222222622442224222222222222224424442262222222222222222222226224222424242422224422422422222"),s=Ya("02222222222222222222202222222222222222222222221422222222222222222222222222222222222Y\\222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222221422222222222222222222222222222222222222Ŀł222222222222222222");for(let i=0;i<t.length;i++)e[t[i]]=s[i];return e})(),pP="container |break-after- all auto avoid avoid-page column left page right|break-before- all auto avoid avoid-page column left page right|break-inside-a uto void void-column void-page|box-decoration- clone slice|box- border content| contents flow-root hidden table table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group| not-sr-only sr-only|float- end left none right start|clear- both end left none right start|isolat e ion-auto|overflow- auto clip hidden scroll visible|overflow-x- auto clip hidden scroll visible|overflow-y- auto clip hidden scroll visible|overscroll- auto contain none|overscroll-x- auto contain none|overscroll-y- auto contain none| absolute fixed relative static sticky| collapse invisible visible|justify- around baseline between center center-safe end end-safe evenly normal start stretch|justify-items- center center-safe end end-safe normal start stretch|justify-self- auto center center-safe end end-safe start stretch|items- baseline baseline-last center center-safe end end-safe start stretch|self- auto baseline baseline-last center center-safe end end-safe start stretch|place-content- around baseline between center center-safe end end-safe evenly start stretch|place-items- baseline center center-safe end end-safe start stretch|place-self- auto center center-safe end end-safe start stretch| antialiased subpixel-antialiased| italic not-italic|normal-nums |ordinal |slashed-zero | lining-nums oldstyle-nums| proportional-nums tabular-nums| diagonal-fractions stacked-fractions| no-underline overline| capitalize lowercase normal-case uppercase|truncate |whitespace- break-spaces normal nowrap pre pre-line pre-wrap|break- all keep normal words|wrap- anywhere break-word normal|hyphens- auto manual none|mix-blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay plus-darker plus-lighter saturation screen soft-light|table- auto fixed|caption- bottom top|backface- hidden visible|appearance- auto none|scheme- dark light light-dark normal only-dark only-light|field-sizing- content fixed|pointer-events- auto none|resize -none -x -y|snap- align-none center end start|snap- always normal|snap- both none x y|snap- mandatory proximity|touch- auto manipulation none|touch-pan- left right x|touch-pan- down up y|touch-pinch-zoom |select- all auto none text|forced-color-adjust- auto none| normal size| baseline bottom middle sub super text-bottom text-top top| bounce none ping pulse spin| auto square video| auto fr max min px|none | auto full px| fixed local scroll|clip- border content padding text|origin- border content padding| bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| no-repeat repeat repeat-round repeat-space repeat-x repeat-y| auto contain cover|blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay saturation screen soft-light|to- b bl br l r t tl tr| auto dvh fit full lh lvh max min px screen svh| dashed dotted double hidden none solid| collapse separate|px |auto |full | content none strict| inline-size size|layout |paint |style | around baseline between center center-safe end end-safe evenly normal start stretch| alias all-scroll auto cell col-resize context-menu copy crosshair default e-resize ew-resize grab grabbing help move n-resize ne-resize nesw-resize no-drop none not-allowed ns-resize nw-resize nwse-resize pointer progress row-resize s-resize se-resize sw-resize text vertical-text w-resize wait zoom-in zoom-out| dashed dotted double solid wavy| auto from-font|reverse |initial | in in-out initial linear out| col col-reverse row row-reverse| nowrap wrap wrap-reverse| auto initial none| black bold extrabold extralight light medium normal semibold thin| condensed expanded extra-condensed extra-expanded normal semi-condensed semi-expanded ultra-condensed ultra-expanded|flow- col col-dense dense row row-dense| none subgrid| auto dvh dvw fit full lh lvh lvw max min px screen svh svw| block flex grid table| auto dvw fit full lvw max min px screen svw| loose none normal px relaxed snug tight|through |item | inside outside| decimal disc none| auto px| clip-border clip-content clip-fill clip-padding clip-stroke clip-view no-clip| add exclude intersect subtract| alpha luminance match|origin- border content fill padding stroke view|type- alpha luminance| circle ellipse| closest-corner closest-side farthest-corner farthest-side|at- bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| dvh fit full lh lvh max min none px screen svh| auto dvh dvw fit full lh lvh lvw max min none px screen svh svw| dvw fit full lvw max min none px screen svw| auto dvh dvw fit full lvh lvw max min none prose px svh svw| auto dvh dvw fit full lvh lvw max min none px screen svh svw| contain cover fill none scale-down| first last none| distant dramatic midrange near none normal|inset | full none|3d | auto smooth|gutter- auto both stable| auto none thin| inner none| auto dvh dvw fit full lvh lvw max min px svh svw|base | center end justify left right start| clip ellipsis| balance nowrap pretty wrap| normal tight tighter wide wider widest| cpu gpu none| 3d flat| all colors none opacity shadow transform| discrete normal| full px| auto dvh dvw fit full lvh lvw max min px screen svh svw| auto contents scroll transform".split("|").map(e=>{const t=e.split(" "),s=t.shift();for(let i=0;i<t.length;i++)t[i]=s+t[i];return t}),fE=Ya("0000000000000000000000000000000000000000000000000000000000000262242:6@200000006:240B428:4422400002046044222426220026642642462026224222824220022400000000\\00N222422242222222224062242222222422226264222422222222222222442804222422222222222222222222220<4<0204260002444020204224422"),gP=Ya("ɠ222222222222222222222222222222222222222222222222222222222222˕4222226>6ʰ22ʷʺʷʺʷ42ʴ2ʓ22>621422ɶ222ɹɼɷɺɷɺ22ɱ42222ɨ2ɧ26622ɘɓ244ƸƵ222]d24242ǖǓƚÄȫ2263ȨȥȨ2222222ǣ222222222222222222ǂƽ2ƾƵ2222222422222ƜƑ22222222222222222222144Ŧţ22Ţş222222222222222222222ĸ2ı68ĦģĦɡŰ4Ġ«®ĝ822ĔđĔ2ē2222622"),mP=Ya("02222222222222222222222222222222222222222222222222222222222222222202021422222222CF2200GJ021042222WZ222IL0ad2c10h2222U00X202[^2w0000120zy|}€22ƒ†…:22z22222222222G000q†OVI00000{˜2™<40000Œ›@00000G¦§000ª00000000000000021K¬«00®“000000000000000000000–222›HGH_1¸222½2¾2222ÇÊ000­°2±"),xT=new Int32Array(987),ST=new Int32Array(987),wT=new Int32Array(987);let Ky="";const qy=new Int32Array(1022);{const e=new Map;let t=0,s=0;for(let i=0;i<fE.length;i++)for(const o of pP[mP[i]]){let l=e.get(o);l===void 0&&(l=t++,e.set(o,l),qy[l*2]=Ky.length,qy[l*2+1]=o.length,Ky+=o),xT[s]=fE[i],ST[s]=gP[i],wT[s]=l,s++}}const yP=Ya("0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p"),vP=Wp(Ci("1::24444432:442:44:44>222222:44:4421322511111311111114")),bP=Ya("2Š4A;33N=C@H4A;33N=C@<27;83:;8393NQ:3NQʰ222ˉºŴŽ2R2=18cƴÅҜ=cĞÛC1ƈǝȈ:ħ25=11D3A@4=<1;1DEr25;11B3?<6;:371BCn9@7=<8192>2E121@9@EHE@9>2T25511<398454131<=V25511<398454131<=„ƧNž2Đå242L222290000f22500ɛ000ǘ222"),xP=Ci("ij"),SP=Ci("—"),wP=Ci("1"),EP="* ** after backdrop before details-content file first-letter first-line marker placeholder selection";var RP={GROUP_COUNT:rP,customValidatorNames:sP,edgeStart:Oo,labelStart:iP,labelText:aP,edgeTarget:oP,nodeGroup:lP,nodeVlist:hP,vlistPat:cP,vlistOps:uP,vlistRef:dP,vlistGroup:fP,litAnchor:xT,litGroup:ST,litPool:wT,poolOffsets:qy,poolText:Ky,adjGid:yP,adjStart:vP,adjTgt:bP,patGid:xP,patTgt:SP,postfixLookupGroups:wP,orderSensitiveModifiers:EP};const CP="line"in new Error,hi=-1,ko=-1,hy=(e,t,s)=>{let i=2166136261;for(let o=t;o<s;o++)i=Math.imul(i^e.charCodeAt(o),16777619);return i},Oh=(e,t,s)=>{const i=s-t;let o=Math.imul(i,2654435761)^e.charCodeAt(t);if(i>3){const l=i>>2,u=i>>1;o=Math.imul(o^e.charCodeAt(t+1)<<8^e.charCodeAt(t+2)<<16^e.charCodeAt(t+l),2246822507),o=Math.imul(o^e.charCodeAt(t+u)<<8^e.charCodeAt(t+u+l)<<16^e.charCodeAt(s-3),3266489909),o^=e.charCodeAt(s-2)<<8^e.charCodeAt(s-1)<<16;for(let d=t+3,f=s-4;d<t+8&&d<f;d++,f--)o=Math.imul(o^e.charCodeAt(d)^e.charCodeAt(f)<<8,16777619)}return o^o>>>15|0},TP=(e,t,s={})=>{const{GROUP_COUNT:i,edgeStart:o,labelStart:l,labelText:u,edgeTarget:d,nodeGroup:f,nodeVlist:g,vlistPat:m,vlistOps:h,vlistRef:x,vlistGroup:S,litAnchor:w,litGroup:C,litPool:E,poolOffsets:R,poolText:O,adjGid:T,adjStart:A,adjTgt:N,patGid:j,patTgt:D,postfixLookupGroups:M,customValidatorNames:z,orderSensitiveModifiers:L}=e,K=new Int32Array(i).fill(-1);for(let pe=0;pe<T.length;pe++)K[T[pe]]=pe;let X=0;for(let pe=0;pe+1<A.length;pe++){const Ae=A[pe+1]-A[pe];Ae>X&&(X=Ae)}let B=32;for(;B<2*(1+X+j.length);)B<<=1;const H=new Int32Array(x.length+1);for(let pe=0;pe<x.length;pe++)H[pe+1]=H[pe]+m[x[pe]+1]-m[x[pe]];const U=new Uint8Array(i);for(let pe=0;pe<M.length;pe++)U[M[pe]]=1;const _=o.length-1,Q=new Uint8Array(_);let $=0,q=!0;for(let pe=0;pe<w.length;pe++){Q[w[pe]]=1;const Ae=R[E[pe]*2+1];Ae>$&&($=Ae);const we=O.charCodeAt(R[E[pe]*2]);(we===91||we===40)&&(q=!1)}let Y=1;for(;Y<w.length*2;)Y<<=1;const ee=new Int32Array(Y).fill(-1);for(let pe=0;pe<w.length;pe++){const Ae=R[E[pe]*2];let we=(hy(O,Ae,Ae+R[E[pe]*2+1])^Math.imul(w[pe],2654435761)|0)&Y-1;for(;ee[we]!==-1;)we=we+1&Y-1;ee[we]=pe}const G=(pe,Ae,we,rt)=>{let Ot=(hy(Ae,we,rt)^Math.imul(pe,2654435761)|0)&Y-1;const Ct=rt-we;for(;;){const Ht=ee[Ot];if(Ht===-1)return-1;if(w[Ht]===pe&&R[E[Ht]*2+1]===Ct){const xn=R[E[Ht]*2];let pn=!0;for(let vt=0;vt<Ct;vt++)if(O.charCodeAt(xn+vt)!==Ae.charCodeAt(we+vt)){pn=!1;break}if(pn)return C[Ht]}Ot=Ot+1&Y-1}},ae=s.cacheSize??8192,I=s.prefix??e.prefix??"",F=I===""?"":I+":",Z=F.length,ne=(z??[]).map(pe=>{throw new Error("cn: missing validator "+pe)}),ye=/\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$/,se=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ge=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,fe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;let ce=0,Re=-1,be=-1,Le=-1,Oe=-1;const ze=pe=>pe>=97&&pe<=122||pe>=65&&pe<=90||pe>=48&&pe<=57||pe===95,Ve=pe=>/\s/.test(String.fromCharCode(pe)),ke=(pe,Ae,we)=>{if(ce=0,Re=-1,we-Ae<3)return;const rt=pe.charCodeAt(Ae),Ot=pe.charCodeAt(we-1);if(rt===91&&Ot===93)ce=1;else if(rt===40&&Ot===41)ce=2;else return;Le=Ae+1,Oe=we-1;let Ct=Ae+1;if(ze(pe.charCodeAt(Ct))){for(Ct++;Ct<we-1;){const Ht=pe.charCodeAt(Ct);if(!ze(Ht)&&Ht!==45)break;Ct++}Ct<we-2&&pe.charCodeAt(Ct)===58&&(Re=Ae+1,be=Ct,Le=Ct+1)}},Ue=(pe,Ae,we,rt)=>{if(we-Ae!==rt.length)return!1;for(let Ot=0;Ot<rt.length;Ot++)if(pe.charCodeAt(Ae+Ot)!==rt.charCodeAt(Ot))return!1;return!0},xe=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Fe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ze=pe=>!!pe&&!Number.isNaN(Number(pe)),ot=(pe,Ae,we)=>{if(we-Ae<11||!Ue(pe,Ae,Ae+10,"@container"))return!1;if(pe.charCodeAt(Ae+10)===47)return we-Ae>=12;const rt=pe.charCodeAt(Ae+11);return rt===115&&we-Ae>=17&&Ue(pe,Ae+10,Ae+16,"-size/")||rt===110&&we-Ae>=19&&Ue(pe,Ae+10,Ae+18,"-normal/")},de=[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2],Ee="length|number|number weight|family-name|position percentage|length size bg-size|image url|shadow|length|family-name|position percentage|length size bg-size|image url|shadow|number weight".split("|").map(pe=>pe.split(" ")),Ge=[2,3,1,0,0,0,4,5,0,0,0,0,0,1,1],Me=(pe,Ae,we,rt)=>{if(pe>=10){if(pe>=25)return ne[pe-25](Ae.slice(we,rt));const Ot=pe-10;if(ce!==de[Ot])return!1;if(Re>=0){for(const Ct of Ee[Ot])if(Ue(Ae,Re,be,Ct))return!0;return!1}switch(Ge[Ot]){case 0:return!1;case 1:return!0;case 2:{const Ct=Ae.slice(Le,Oe);return ye.test(Ct)&&!se.test(Ct)}case 3:return Ze(Ae.slice(Le,Oe));case 4:return fe.test(Ae.slice(Le,Oe));default:return ge.test(Ae.slice(Le,Oe))}}switch(pe){case 0:return!0;case 1:return ce===0;case 2:return ce===1;case 3:return ce===2;case 4:return xe.test(Ae.slice(we,rt));case 5:return Ze(Ae.slice(we,rt));case 6:{const Ot=Ae.slice(we,rt);return!!Ot&&Number.isInteger(Number(Ot))}case 7:return rt>we&&Ae.charCodeAt(rt-1)===37&&Ze(Ae.slice(we,rt-1));case 8:return Fe.test(Ae.slice(we,rt));default:return ot(Ae,we,rt)}},De=new Set(typeof L=="string"?L.split(" "):L),xt=(pe,Ae,we,rt,Ot,Ct)=>{const Ht=hy(Ae,we,rt)^(Ot?2654435769:0)|0;let xn=pe.get(Ht);if(xn!==void 0)e:for(let Dt=0;Dt<xn.length;Dt++){const on=xn[Dt];if(!(on.imp!==Ot||on.k.length!==rt-we)){for(let mt=0;mt<on.k.length;mt++)if(on.k.charCodeAt(mt)!==Ae.charCodeAt(we+mt))continue e;return on.id}}else pe.set(Ht,xn=[]);const pn=Ae.slice(we,rt),vt=Ct(pn);return xn.push({k:pn,imp:Ot,id:vt}),vt};let dt=new Map,gt=new Map,Nt=2;const jt=4096,tn=(pe,Ae)=>{const we=[];let rt=0,Ot=0,Ct=0;for(let vt=0;vt<pe.length;vt++){const Dt=pe.charCodeAt(vt);rt===0&&Ot===0&&Dt===58?(we.push(pe.slice(Ct,vt)),Ct=vt+1):Dt===91?rt++:Dt===93?rt--:Dt===40?Ot++:Dt===41&&Ot--}we.push(pe.slice(Ct));let Ht=we[0];if(we.length>1){const vt=[];let Dt=[];for(const on of we)on.charCodeAt(0)===91||De.has(on)?(Dt.length&&(vt.push(...Dt.sort()),Dt=[]),vt.push(on)):Dt.push(on);Dt.length&&vt.push(...Dt.sort()),Ht=vt.join(":")}const xn=Ae?Ht+" !":Ht;let pn=gt.get(xn);return pn===void 0&&gt.set(xn,pn=Nt++),pn};let an=new Map,nn=i;const et=i+4096,Et=()=>nn++,Zt=2097152,ht=8192,St=new Int32Array(ht),yt=new Array(ht).fill(null),Ut=new Int32Array(ht),dn=new Int32Array(ht),je=new Uint8Array(ht);let at=0;const Ie=(pe,Ae,we,rt,Ot,Ct,Ht,xn)=>{let pn=pe;if(yt[pe]!==null)if(yt[pe|1]===null)pn=pe|1;else if((at++&3)===0)pn=pe|at>>2&1;else return;yt[pn]=Ae.slice(we,rt),St[pn]=Ot,Ut[pn]=Ct,dn[pn]=Ht,je[pn]=xn},_e=()=>yt.fill(null);let $e=256,tt=[new Int32Array($e),new Int32Array($e),new Int32Array($e),new Int32Array($e)],[kt,V,J,re]=tt,ve=new Uint8Array($e),Se=new Uint8Array($e);const qe=()=>{$e*=2,tt=tt.map(Ae=>{const we=new Int32Array($e);return we.set(Ae),we}),[kt,V,J,re]=tt;const pe=new Uint8Array($e);pe.set(ve),ve=pe,Se=new Uint8Array($e)};let Ke=64,Xe=new Int32Array(Ke),Qe=new Int32Array(Ke);const ct=new Int32Array(i);let nt=2048,Rt=21,ft=new Float64Array(nt),Yt=new Int32Array(nt),Bt=0;const On=(pe,Ae)=>{if(pe===0&&Ae<i)return ct[Ae]===Bt?1:(ct[Ae]=Bt,0);const we=pe*2097152+Ae+1;let rt=Math.imul(we,2654435761)>>>Rt;for(;Yt[rt]===Bt;){if(ft[rt]===we)return 1;rt=rt+1&nt-1}return ft[rt]=we,Yt[rt]=Bt,0},Gt=(pe,Ae,we,rt,Ot)=>{if(we-Ae>=2&&pe.charCodeAt(Ae)===91&&pe.charCodeAt(we-1)===93){let Ct=-1;for(let Ht=Ae+1;Ht<we-1;Ht++)if(pe.charCodeAt(Ht)===58){Ct=Ht;break}return Ct===-1||Ct===Ae+1?hi:xt(an,pe,Ae+1,Ct,0,Et)}if(rt>=0&&f[rt]>=0)return f[rt];for(let Ct=Ot-1;Ct>=0;Ct--){const Ht=Qe[Ct];if(Ht>we)continue;const xn=Xe[Ct],pn=we-Ht;if(Q[xn]===1&&pn>0&&pn<=$){const zn=pe.charCodeAt(Ht);if(q===!1||zn!==91&&zn!==40){const is=G(xn,pe,Ht,we);if(is>=0)return is}}const vt=g[xn];if(vt<0)continue;const Dt=x[vt],on=m[Dt],mt=m[Dt+1];if(on===mt)continue;ke(pe,Ht,we);const ir=H[vt]-on;for(let zn=on;zn<mt;zn++)if(Me(h[zn],pe,Ht,we))return S[ir+zn]}return hi},Vt=pe=>{const Ae=pe.length;let we=0,rt=0,Ot=!1;(Nt>jt||dt.size>jt)&&(dt=new Map,gt=new Map,Nt=2,_e()),nn>et&&(an=new Map,nn=i,_e());let Ct=0;for(;Ct<Ae;){let vt=pe.charCodeAt(Ct);if(vt===32||vt>=9&&vt<=13||vt>=160&&Ve(vt)){vt!==32&&(Ot=!0),Ct++;continue}const Dt=Ct;let on=0;for(;Ct<Ae;){if(vt=pe.charCodeAt(Ct),vt<=32){if(vt===32)break;if(vt>=9&&vt<=13){Ot=!0;break}}else if(vt>=160&&Ve(vt)){Ot=!0;break}on=Math.imul(on^vt,16777619),Ct++}const mt=Ct,ir=mt-Dt;we===$e&&qe();const zn=we++;kt[zn]=Dt,V[zn]=mt,rt+=ir,on^=Math.imul(ir,2654435761);const is=on^on>>>15|0,Qn=is&8190;{let rn=-1;if(St[Qn]===is&&yt[Qn]!==null&&yt[Qn].length===ir?rn=Qn:St[Qn|1]===is&&yt[Qn|1]!==null&&yt[Qn|1].length===ir&&(rn=Qn|1),rn>=0){const lr=yt[rn];let ws=!0;for(let ls=0;ls<ir;ls++)if(lr.charCodeAt(ls)!==pe.charCodeAt(Dt+ls)){ws=!1;break}if(ws){J[zn]=Ut[rn],re[zn]=dn[rn],ve[zn]=je[rn];continue}}}let Xn=Dt;if(Z!==0){if(mt-Dt<=Z||!pe.startsWith(F,Dt)){J[zn]=hi,Ie(Qn,pe,Dt,mt,is,hi,0,0);continue}Xn=Dt+Z}let Xo=0,wc=0,Ni=-1,Zo=-1;for(let rn=Xn;rn<mt;rn++){const lr=pe.charCodeAt(rn);if(Xo===0&&wc===0){if(lr===58){Ni=rn;continue}if(lr===47){Zo=rn;continue}}lr===91?Xo++:lr===93?Xo--:lr===40?wc++:lr===41&&wc--}const Dd=Ni>=Xn?Ni+1:Xn;let Dn=Dd,kr=mt,aa=!1,Wo=0;kr>Dn&&pe.charCodeAt(kr-1)===33?(aa=!0,kr--):kr>Dn&&pe.charCodeAt(Dn)===33&&(aa=!0,Dn++,Wo=1);let Yr=-1;Zo>Dd&&(Yr=Zo+Wo,Yr>=kr&&(Yr=-1));let Jo=Dn;kr-Dn>1&&pe.charCodeAt(Dn)===45&&(Jo=Dn+1);let as=0,Lr=0,oa=0,Ec=-1,os=0;(g[0]>=0||Q[0]===1)&&(Xe[0]=0,Qe[0]=Jo,os=1);let eo=ko,Rc=0;for(let rn=Jo;rn<kr;rn++)if(rn===Yr&&(eo=Lr<oa?ko:as,Rc=os),as!==ko){const lr=pe.charCodeAt(rn);let ws=-1;if(Lr<oa)u.charCodeAt(Lr)===lr?(Lr++,Lr===oa&&(ws=as=Ec)):as=ko;else{const ls=o[as],ro=o[as+1];let Di=ko;for(let yr=ls;yr<ro;yr++){const so=l[yr];if(u.charCodeAt(so)===lr){l[yr+1]-so===1?ws=Di=d[yr]:(Lr=so+1,oa=l[yr+1],Ec=d[yr],Di=as);break}}as=Di}if(ws>=0&&(g[ws]>=0||Q[ws]===1)&&rn+1<kr&&pe.charCodeAt(rn+1)===45){if(os===Ke){Ke*=2;const ls=new Int32Array(Ke);ls.set(Xe),Xe=ls;const ro=new Int32Array(Ke);ro.set(Qe),Qe=ro}Xe[os]=ws,Qe[os]=rn+2,os++}}Yr===kr&&(eo=Lr<oa?ko:as,Rc=os);const Cc=Lr<oa?ko:as;let mr,zr=!1;if(Yr>=0)if(zr=!0,mr=Gt(pe,Dn,Yr,eo,Rc),mr!==hi&&mr<i&&U[mr]){const rn=Gt(pe,Dn,kr,Cc,os);rn!==hi&&rn!==mr&&(mr=rn,zr=!1)}else mr===hi&&(mr=Gt(pe,Dn,kr,Cc,os),zr=!1);else mr=Gt(pe,Dn,kr,Cc,os);let to=0,no=0;mr===hi?J[zn]=hi:(no=zr?1:0,to=Xn>=Ni?aa?1:0:xt(dt,pe,Xn,Ni,aa?1:0,rn=>tn(rn,aa)),J[zn]=mr,ve[zn]=no,re[zn]=to),Ie(Qn,pe,Dt,mt,is,mr,to,no)}if(we===0)return"";if(we===1)return kt[0]===0&&V[0]===Ae?pe:pe.slice(kt[0],V[0]);if(we*B>nt){for(;we*B>nt;)nt<<=1,Rt--;ft=new Float64Array(nt),Yt=new Int32Array(nt)}if(Nt>=Zt||nn>=Zt)throw new Error("cn: too many distinct classes in one merge");Bt=Bt+1|0,Bt===0&&(ct.fill(0),Yt.fill(0),Bt=1);let Ht=!1;for(let vt=we-1;vt>=0;vt--){const Dt=J[vt];if(Dt===hi){Se[vt]=1;continue}const on=re[vt];if(On(on,Dt)===1){Se[vt]=0,Ht=!0;continue}if(Se[vt]=1,Dt<i){const mt=K[Dt];if(mt>=0)for(let ir=A[mt];ir<A[mt+1];ir++)On(on,N[ir]);if(ve[vt]&1)for(let ir=0;ir<j.length;ir++)j[ir]===Dt&&On(on,D[ir])}}if(!Ht&&!Ot&&Ae===rt+we-1)return pe;let xn="",pn=0;for(;pn<we;){if(!Se[pn]){pn++;continue}const vt=kt[pn];let Dt=V[pn],on=pn+1;for(;on<we&&Se[on]&&kt[on]===Dt+1&&pe.charCodeAt(Dt)===32;)Dt=V[on],on++;xn.length>0&&(xn+=" "),xn+=pe.slice(vt,Dt),pn=on}return xn},Cn=16384,Tn=new Int32Array(Cn*2);let rs=0,fn=1,hn=Object.create(null),An=Object.create(null),jn=new Map,Mi=new Map,Pr=0,Us=0;const ss=()=>{rs^=Cn,fn=fn+1|0,Us=0},Ss=pe=>{let Ae=hn[pe];if(Ae!==void 0)return Ae;const we=Oh(pe,0,pe.length),rt=(we&16383)+rs,Ot=Tn[rt]===(we^fn)||Tn[rt^Cn]===(we^fn-1);return Ot&&(Ae=An[pe],Ae!==void 0)?(hn[pe]=Ae,Ae):(Ae=Vt(pe),Ot?(hn[pe]=Ae,++Pr>ae&&(Pr=0,An=hn,hn=Object.create(null),ss())):(Tn[rt]=we^fn,++Us>Cn&&ss()),Ae)},zt=pe=>{let Ae=jn.get(pe);if(Ae!==void 0)return Ae;const we=Oh(pe,0,pe.length),rt=(we&16383)+rs,Ot=Tn[rt]===(we^fn)||Tn[rt^Cn]===(we^fn-1);return Ot&&(Ae=Mi.get(pe),Ae!==void 0)?(jn.set(pe,Ae),Ae):(Ae=Vt(pe),Ot?(jn.set(pe,Ae),++Pr>ae&&(Pr=0,Mi=jn,jn=new Map,ss())):(Tn[rt]=we^fn,++Us>Cn&&ss()),Ae)},qn=pe=>{const Ae=Oh(pe,0,pe.length),we=(Ae&16383)+rs;return Tn[we]===(Ae^fn)||Tn[we^Cn]===(Ae^fn-1)?!0:(Tn[we]=Ae^fn,++Us>Cn&&ss(),!1)},Fn=ae===0?Vt:CP?pe=>{const Ae=jn.get(pe);return Ae!==void 0?Ae:zt(pe)}:Ss;return{merge:function(){return arguments.length===1&&typeof arguments[0]=="string"?Fn(arguments[0]):Fn(OP.apply(null,arguments))},mergeString:Fn,seenBefore:ae===0?()=>!1:qn,mergeUncached:Vt}},Wh=(e,t)=>{if(!e)return"";if(typeof e=="string")return e;let s="";if(typeof e.length=="number"&&(!t||Array.isArray(e))){const i=e;for(let o=0;o<i.length;o++){const l=i[o];if(!l)continue;const u=typeof l=="string"?l:Wh(l,t);u&&(s&&(s+=" "),s+=u)}return s}if(t){if(typeof e=="number")return""+e;if(typeof e=="object")for(const i in e)e[i]&&(s&&(s+=" "),s+=i)}return s},kP=(e,t)=>{let s="";for(let i=0;i<e.length;i++){const o=e[i];if(!o)continue;const l=typeof o=="string"?o:Wh(o,t);l&&(s&&(s+=" "),s+=l)}return s},OP=function(){return kP(arguments,!1)},AP=256,hE=16,MP=1024,py=4096,NP=(e,t)=>{const s=t===void 0?()=>!0:t.seenBefore,i=t===void 0?e:t.mergeUncached;let o=new Map,l=new Map,u=0,d=null,f=null,g=[],m=[],h=0;const x=(R,O,T)=>{f===null&&(f=new Array(py).fill(""),g=new Array(py).fill(""),m=new Array(py).fill(""));const A=Oh(R,0,R.length)&4094;if(f[A]===R&&g[A]===O)return m[A];if(f[A|1]===R&&g[A|1]===O)return m[A|1];const N=e(T?O+" "+R:R),j=f[A]===""?A:A|(f[A|1]===""?1:h++&1);return f[j]=R,g[j]=O,m[j]=N,N},S=(R,O,T,A)=>{let N=0;if(O){if(O!==R.a0)return!1;N=1}if(T){if(T!==(N===0?R.a0:R.a1))return!1;N++}if(A){if(A!==(N===0?R.a0:N===1?R.a1:R.a2))return!1;N++}return N===R.t},w=(R,O)=>{const T=R.a;let A=0;for(let N=0;N<O.length;N++){const j=O[N];if(j){if(j!==T[A])return!1;A++}}return A===R.t},C=(R,O)=>{const T=R.length,A=d===null?null:d.n;if(!O){if(A!==null&&w(A,R))return d=A,A.r;if(d!==null&&d!==A&&w(d,R))return d.r}let N="",j=-1,D=0,M=!1;for(let K=0;K<T;K++){let X=R[K];if(X){if(typeof X!="string"){if(X=R[K]=Wh(X,!0),!X)continue;M=!0}j<0&&(N=X,j=K),D++}}if(D===0)return"";if(D===1)return e(N);if(M){if(A!==null&&w(A,R))return d=A,A.r;if(d!==null&&d!==A&&w(d,R))return d.r}let z=o.get(N);z===void 0&&(z=l.get(N),z!==void 0&&o.set(N,z));let L=null;if(z!==void 0){if(z.skip>0){z.skip--,d=null;let X=N;for(let B=j+1;B<T;B++){const H=R[B];H&&(X+=" "+H)}return x(X,"",!1)}const K=z.e;e:for(let X=0;X<K.length;X++){const B=K[X];if(B.t!==D)continue;const H=B.a;let U=1;for(let _=j+1;_<T;_++){const Q=R[_];if(Q&&Q!==H[U++])continue e}L=B;break}L!==null&&(z.miss=0)}if(L===null){let K=N;const X=[N];for(let H=j+1;H<T;H++){const U=R[H];U&&(K+=" "+U,X.push(U))}if(!s(K))return i(K);L={r:e(K),t:X.length,a0:X[0],a1:X[1],a2:X[2]??"",a:X,n:null},z===void 0?o.set(N,z={e:[],miss:0,skip:0,at:0}):++z.miss>hE&&(z.miss=hE,z.skip=MP,z.e.length=0,z.at=0);const B=z.e;B.length<AP?B.push(L):(B[z.at]=L,z.at=z.at+1&255),++u>1e3&&(u=0,l=o,o=new Map)}return d!==null&&d!==L&&(d.n=L),d=L,L.r},E=R=>Array.isArray(R)?C(R.slice(),!1):e(Wh(R,!0));return function(R,O,T){const A=arguments.length;if((A|1)===3){const D=d;if(D!==null){const M=D.n;if(M!==null&&S(M,R,O,T))return d=M,M.r;if(D!==M&&S(D,R,O,T))return D.r}if(A===2&&typeof O=="string"&&O!==""){const M=o.get(R);if(M!==void 0&&M.skip>0)return M.skip--,d=null,x(O,R,!0)}return C([R,O,T],!0)}if(A===1)return typeof R=="string"?e(R):E(R);const N=d;if(N!==null){const D=N.n;if(D!==null){const M=D.a;let z=0,L=!0;for(let K=0;K<A;K++){const X=arguments[K];if(X){if(X!==M[z]){L=!1;break}z++}}if(L&&z===D.t)return d=D,D.r}if(N!==D){const M=N.a;let z=0,L=!0;for(let K=0;K<A;K++){const X=arguments[K];if(X){if(X!==M[z]){L=!1;break}z++}}if(L&&z===N.t)return N.r}}const j=[];for(let D=0;D<A;D++)j.push(arguments[D]);return C(j,!0)}},pE=TP(RP),He=NP(pE.mergeString,pE);function DP({delay:e=0,...t}){return v.jsx(tP,{"data-slot":"tooltip-provider",delay:e,...t})}function Jh({...e}){return v.jsx(D3,{"data-slot":"tooltip",...e})}function ep({...e}){return v.jsx(L3,{"data-slot":"tooltip-trigger",...e})}function tp({className:e,side:t="top",sideOffset:s=4,align:i="center",alignOffset:o=0,children:l,...u}){return v.jsx(U3,{children:v.jsx(W3,{align:i,alignOffset:o,side:t,sideOffset:s,className:"isolate z-50",children:v.jsxs(J3,{"data-slot":"tooltip-content",className:He("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...u,children:[l,v.jsx(eP,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"})]})})})}var jP=(e,t,s,i,o,l,u,d)=>{let f=document.documentElement,g=["light","dark"];function m(S){(Array.isArray(e)?e:[e]).forEach(w=>{let C=w==="class",E=C&&l?o.map(R=>l[R]||R):o;C?(f.classList.remove(...E),f.classList.add(l&&l[S]?l[S]:S)):f.setAttribute(w,S)}),h(S)}function h(S){d&&g.includes(S)&&(f.style.colorScheme=S)}function x(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(i)m(i);else try{let S=localStorage.getItem(t)||s,w=u&&S==="system"?x():S;m(w)}catch{}},IP=b.createContext(void 0),PP={setTheme:e=>{},themes:[]},LP=()=>{var e;return(e=b.useContext(IP))!=null?e:PP};b.memo(({forcedTheme:e,storageKey:t,attribute:s,enableSystem:i,enableColorScheme:o,defaultTheme:l,value:u,themes:d,nonce:f,scriptProps:g})=>{let m=JSON.stringify([s,t,l,e,d,u,i,o]).slice(1,-1);return b.createElement("script",{...g,suppressHydrationWarning:!0,nonce:typeof window>"u"?f:"",dangerouslySetInnerHTML:{__html:`(${jP.toString()})(${m})`}})});function zP(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css",t.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}const _P=e=>{switch(e){case"success":return FP;case"info":return VP;case"warning":return BP;case"error":return KP;default:return null}},UP=Array(12).fill(0),HP=({visible:e,className:t})=>Ne.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},Ne.createElement("div",{className:"sonner-spinner"},UP.map((s,i)=>Ne.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${i}`})))),FP=Ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Ne.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),BP=Ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Ne.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),VP=Ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Ne.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),KP=Ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Ne.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),qP=Ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},Ne.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),Ne.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),YP=()=>{const[e,t]=Ne.useState(document.hidden);return Ne.useEffect(()=>{const s=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",s),()=>document.removeEventListener("visibilitychange",s)},[]),e};let GP=1;const $P=100,gE=e=>{var t;return typeof e?.id=="number"||(e==null||(t=e.id)==null?void 0:t.length)>0?e.id:GP++};class QP{constructor(){this.subscribe=t=>(this.subscribers.push(t),this.getActiveToasts().forEach(s=>t(s)),()=>{const s=this.subscribers.indexOf(t);this.subscribers.splice(s,1)}),this.publish=t=>{this.subscribers.forEach(s=>s(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t],this.trimHistory()},this.trimHistory=()=>{let t=this.toasts.length-$P;t<=0||(this.toasts=this.toasts.filter(s=>t>0&&this.dismissedToasts.has(s.id)?(this.dismissedToasts.delete(s.id),t--,!1):!0))},this.create=t=>{const{message:s,...i}=t,o=gE(t),l=this.pendingDismissals.get(o);l!==void 0&&(cancelAnimationFrame(l),this.pendingDismissals.delete(o),this.dismissedToasts.delete(o));const u=this.dismissedToasts.has(o),d=t.dismissible===void 0?!0:t.dismissible;return u&&(this.dismissedToasts.delete(o),this.toasts=this.toasts.filter(g=>g.id!==o)),(u?void 0:this.toasts.find(g=>g.id===o))?this.toasts=this.toasts.map(g=>g.id===o?(this.publish({...g,...t,id:o,title:s}),{...g,...t,id:o,dismissible:d,title:s}):g):this.addToast({title:s,...i,dismissible:d,id:o}),o},this.dismiss=t=>{if(t==null)return this.getActiveToasts().forEach(i=>{this.dismissedToasts.add(i.id),this.subscribers.forEach(o=>o({id:i.id,dismiss:!0}))}),t;this.dismissedToasts.add(t);const s=this.pendingDismissals.get(t);return s!==void 0&&cancelAnimationFrame(s),this.pendingDismissals.set(t,requestAnimationFrame(()=>{this.pendingDismissals.delete(t),this.subscribers.forEach(i=>i({id:t,dismiss:!0}))})),t},this.message=(t,s)=>this.create({...s,message:t,type:void 0}),this.error=(t,s)=>this.create({...s,message:t,type:"error"}),this.success=(t,s)=>this.create({...s,type:"success",message:t}),this.info=(t,s)=>this.create({...s,type:"info",message:t}),this.warning=(t,s)=>this.create({...s,type:"warning",message:t}),this.loading=(t,s)=>this.create({...s,type:"loading",message:t}),this.promise=(t,s)=>{if(!s)return;let i;s.loading!==void 0&&(i=this.create({...s,promise:t,type:"loading",message:s.loading,description:typeof s.description!="function"?s.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let l=i!==void 0,u;const d=o.then(async g=>{if(u=["resolve",g],Ne.isValidElement(g))l=!1,this.create({id:i,type:"default",message:g});else if(ZP(g)&&!g.ok){l=!1;const h=typeof s.error=="function"?await s.error(`HTTP error! status: ${g.status}`):s.error,x=typeof s.description=="function"?await s.description(`HTTP error! status: ${g.status}`):s.description,w=typeof h=="object"&&!Ne.isValidElement(h)?h:{message:h};this.create({id:i,type:"error",description:x,...w})}else if(g instanceof Error){l=!1;const h=typeof s.error=="function"?await s.error(g):s.error,x=typeof s.description=="function"?await s.description(g):s.description,w=typeof h=="object"&&!Ne.isValidElement(h)?h:{message:h};this.create({id:i,type:"error",description:x,...w})}else if(s.success!==void 0){l=!1;const h=typeof s.success=="function"?await s.success(g):s.success,x=typeof s.description=="function"?await s.description(g):s.description,w=typeof h=="object"&&!Ne.isValidElement(h)?h:{message:h};this.create({id:i,type:"success",description:x,...w})}}).catch(async g=>{if(u=["reject",g],s.error!==void 0){l=!1;const m=typeof s.error=="function"?await s.error(g):s.error,h=typeof s.description=="function"?await s.description(g):s.description,S=typeof m=="object"&&!Ne.isValidElement(m)?m:{message:m};this.create({id:i,type:"error",description:h,...S})}}).finally(()=>{l&&(this.dismiss(i),i=void 0),s.finally==null||s.finally.call(s)}),f=()=>new Promise((g,m)=>d.then(()=>u[0]==="reject"?m(u[1]):g(u[1])).catch(m));return typeof i!="string"&&typeof i!="number"?{unwrap:f}:Object.assign(i,{unwrap:f})},this.custom=(t,s)=>{const i=gE(s);return this.create({...s,jsx:t(i),id:i,type:void 0}),i},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}}const Wr=new QP,XP=(e,t)=>Wr.message(e,t),ZP=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",WP=XP,JP=()=>Wr.toasts,eL=()=>Wr.getActiveToasts(),Ft=Object.assign(WP,{success:Wr.success,info:Wr.info,warning:Wr.warning,error:Wr.error,custom:Wr.custom,message:Wr.message,promise:Wr.promise,dismiss:Wr.dismiss,loading:Wr.loading},{getHistory:JP,getToasts:eL});zP("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function oh(e){return e.label!==void 0}const tL=3,nL="24px",rL="16px",mE=4e3,sL=356,iL=14,aL=45,oL=200;function pi(...e){return e.filter(Boolean).join(" ")}function lL(e){const[t,s]=e.split("-"),i=[];return t&&i.push(t),s&&i.push(s),i}const cL=e=>{var t,s,i,o,l,u,d,f,g;const{invert:m,toast:h,unstyled:x,interacting:S,setHeights:w,visibleToasts:C,heights:E,index:R,toasts:O,expanded:T,removeToast:A,defaultRichColors:N,closeButton:j,style:D,cancelButtonStyle:M,actionButtonStyle:z,className:L="",descriptionClassName:K="",duration:X,position:B,gap:H,expandByDefault:U,classNames:_,icons:Q,closeButtonAriaLabel:$="Close toast"}=e,[q,Y]=Ne.useState(null),[ee,G]=Ne.useState(null),[ae,I]=Ne.useState(!1),[F,Z]=Ne.useState(!1),[ne,ye]=Ne.useState(!1),[se,ge]=Ne.useState(!1),[fe,ce]=Ne.useState(!1),[Re,be]=Ne.useState(0),[Le,Oe]=Ne.useState(0),ze=Ne.useRef(h.duration||X||mE),Ve=Ne.useRef(null),ke=Ne.useRef(null),Ue=R===0,xe=R+1<=C,Fe=h.type,Ze=Fe??"default",ot=h.dismissible!==!1,de=h.className||"",Ee=h.descriptionClassName||"",Ge=Ne.useMemo(()=>E.findIndex(je=>je.toastId===h.id)||0,[E,h.id]),Me=Ne.useMemo(()=>{var je;return(je=h.closeButton)!=null?je:j},[h.closeButton,j]),De=Ne.useMemo(()=>h.duration||X||mE,[h.duration,X]),xt=Ne.useRef(0),dt=Ne.useRef(0),gt=Ne.useRef(0),Nt=Ne.useRef(null),[jt,tn]=B.split("-"),an=Ne.useMemo(()=>E.reduce((je,at,Ie)=>Ie>=Ge?je:je+at.height,0),[E,Ge]),nn=YP(),et=Ne.useMemo(()=>{var je;return(je=e.swipeDirections)!=null?je:lL(B)},[e.swipeDirections,B]),Et=h.invert||m,Zt=Fe==="loading";dt.current=Ne.useMemo(()=>Ge*H+an,[Ge,an]),Ne.useEffect(()=>{ze.current=De},[De]),Ne.useEffect(()=>{I(!0)},[]),Ne.useEffect(()=>{const je=ke.current;if(je){const at=je.getBoundingClientRect().height;return Oe(at),w(Ie=>[{toastId:h.id,height:at,position:h.position},...Ie]),()=>w(Ie=>Ie.filter(_e=>_e.toastId!==h.id))}},[w,h.id]),Ne.useLayoutEffect(()=>{if(!ae)return;const je=ke.current,at=je.style.height;je.style.height="auto";const Ie=je.getBoundingClientRect().height;je.style.height=at,Oe(Ie),w(_e=>_e.find(tt=>tt.toastId===h.id)?_e.map(tt=>tt.toastId===h.id?{...tt,height:Ie}:tt):[{toastId:h.id,height:Ie,position:h.position},..._e])},[ae,h.title,h.description,w,h.id,h.jsx,h.action,h.cancel]);const ht=Ne.useCallback(()=>{Z(!0),be(dt.current),w(je=>je.filter(at=>at.toastId!==h.id)),setTimeout(()=>{A(h)},oL)},[h,A,w,dt]);Ne.useEffect(()=>{if(h.promise&&Fe==="loading"||h.duration===1/0||h.type==="loading")return;let je;return T||S||nn?(()=>{if(gt.current<xt.current){const _e=new Date().getTime()-xt.current;ze.current=ze.current-_e}gt.current=new Date().getTime()})():ze.current!==1/0&&(xt.current=new Date().getTime(),je=setTimeout(()=>{h.onAutoClose==null||h.onAutoClose.call(h,h),ht()},ze.current)),()=>clearTimeout(je)},[T,S,h,Fe,nn,ht]),Ne.useEffect(()=>{h.delete&&(ht(),h.onDismiss==null||h.onDismiss.call(h,h))},[ht,h.delete]);function St(){var je;if(Q?.loading){var at;return Ne.createElement("div",{className:pi(_?.loader,h==null||(at=h.classNames)==null?void 0:at.loader,"sonner-loader"),"data-visible":Fe==="loading"},Q.loading)}return Ne.createElement(HP,{className:pi(_?.loader,h==null||(je=h.classNames)==null?void 0:je.loader),visible:Fe==="loading"})}const yt=h.icon||Q?.[Fe]||_P(Fe);var Ut,dn;return Ne.createElement("li",{tabIndex:0,ref:ke,className:pi(L,de,_?.toast,h==null||(t=h.classNames)==null?void 0:t.toast,_?.[Ze],h==null||(s=h.classNames)==null?void 0:s[Ze]),"data-sonner-toast":"","data-rich-colors":(Ut=h.richColors)!=null?Ut:N,"data-styled":!(h.jsx||h.unstyled||x),"data-mounted":ae,"data-promise":!!h.promise,"data-swiped":fe,"data-removed":F,"data-visible":xe,"data-y-position":jt,"data-x-position":tn,"data-index":R,"data-front":Ue,"data-swiping":ne,"data-dismissible":ot,"data-type":Fe,"data-invert":Et,"data-swipe-out":se,"data-swipe-direction":ee,"data-expanded":!!(T||U&&ae),"data-testid":h.testId,style:{"--index":R,"--toasts-before":R,"--z-index":O.length-R,"--offset":`${F?Re:dt.current}px`,"--initial-height":U?"auto":`${Le}px`,...D,...h.style},onDragEnd:()=>{ye(!1),Y(null),Nt.current=null},onPointerDown:je=>{je.button!==2&&(Zt||!ot||(Ve.current=new Date,be(dt.current),je.target.setPointerCapture(je.pointerId),je.target.tagName!=="BUTTON"&&(ye(!0),Nt.current={x:je.clientX,y:je.clientY})))},onPointerUp:()=>{var je,at,Ie;if(se||!ot)return;Nt.current=null;const _e=Number(((je=ke.current)==null?void 0:je.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),$e=Number(((at=ke.current)==null?void 0:at.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),tt=new Date().getTime()-((Ie=Ve.current)==null?void 0:Ie.getTime()),kt=q==="x"?_e:$e,V=Math.abs(kt)/tt;if((q==="x"?et.includes(_e>0?"right":"left"):et.includes($e>0?"bottom":"top"))&&(Math.abs(kt)>=aL||V>.11)){be(dt.current),h.onDismiss==null||h.onDismiss.call(h,h),G(q==="x"?_e>0?"right":"left":$e>0?"down":"up"),ht(),ge(!0);return}else{var re,ve;(re=ke.current)==null||re.style.setProperty("--swipe-amount-x","0px"),(ve=ke.current)==null||ve.style.setProperty("--swipe-amount-y","0px")}ce(!1),ye(!1),Y(null)},onPointerMove:je=>{var at,Ie,_e;if(!Nt.current||!ot||((at=window.getSelection())==null?void 0:at.toString().length)>0)return;const tt=je.clientY-Nt.current.y,kt=je.clientX-Nt.current.x;!q&&(Math.abs(kt)>1||Math.abs(tt)>1)&&Y(Math.abs(kt)>Math.abs(tt)?"x":"y");let V={x:0,y:0};const J=re=>1/(1.5+Math.abs(re)/20);if(q==="y"){if(et.includes("top")||et.includes("bottom"))if(et.includes("top")&&tt<0||et.includes("bottom")&&tt>0)V.y=tt;else{const re=tt*J(tt);V.y=Math.abs(re)<Math.abs(tt)?re:tt}}else if(q==="x"&&(et.includes("left")||et.includes("right")))if(et.includes("left")&&kt<0||et.includes("right")&&kt>0)V.x=kt;else{const re=kt*J(kt);V.x=Math.abs(re)<Math.abs(kt)?re:kt}(Math.abs(V.x)>0||Math.abs(V.y)>0)&&ce(!0),(Ie=ke.current)==null||Ie.style.setProperty("--swipe-amount-x",`${V.x}px`),(_e=ke.current)==null||_e.style.setProperty("--swipe-amount-y",`${V.y}px`)}},Me&&!h.jsx&&Fe!=="loading"?Ne.createElement("button",{"aria-label":$,"data-disabled":Zt,"data-close-button":!0,onClick:Zt||!ot?()=>{}:()=>{ht(),h.onDismiss==null||h.onDismiss.call(h,h)},className:pi(_?.closeButton,h==null||(i=h.classNames)==null?void 0:i.closeButton)},(dn=Q?.close)!=null?dn:qP):null,(Fe||h.icon||h.promise)&&h.icon!==null&&(Q?.[Fe]!==null||h.icon)?Ne.createElement("div",{"data-icon":"",className:pi(_?.icon,h==null||(o=h.classNames)==null?void 0:o.icon)},Fe==="loading"?h.icon||St():h.promise?St():null,Fe!=="loading"?yt:null):null,Ne.createElement("div",{"data-content":"",className:pi(_?.content,h==null||(l=h.classNames)==null?void 0:l.content)},Ne.createElement("div",{"data-title":"",className:pi(_?.title,h==null||(u=h.classNames)==null?void 0:u.title)},h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title),h.description?Ne.createElement("div",{"data-description":"",className:pi(K,Ee,_?.description,h==null||(d=h.classNames)==null?void 0:d.description)},typeof h.description=="function"?h.description():h.description):null),Ne.isValidElement(h.cancel)?h.cancel:h.cancel&&oh(h.cancel)?Ne.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||M,onClick:je=>{oh(h.cancel)&&ot&&(h.cancel.onClick==null||h.cancel.onClick.call(h.cancel,je),ht())},className:pi(_?.cancelButton,h==null||(f=h.classNames)==null?void 0:f.cancelButton)},h.cancel.label):null,Ne.isValidElement(h.action)?h.action:h.action&&oh(h.action)?Ne.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||z,onClick:je=>{oh(h.action)&&(h.action.onClick==null||h.action.onClick.call(h.action,je),!je.defaultPrevented&&ht())},className:pi(_?.actionButton,h==null||(g=h.classNames)==null?void 0:g.actionButton)},h.action.label):null)};function yE(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function uL(e,t){const s={};return[e,t].forEach((i,o)=>{const l=o===1,u=l?"--mobile-offset":"--offset",d=l?rL:nL;function f(g){["top","right","bottom","left"].forEach(m=>{s[`${u}-${m}`]=typeof g=="number"?`${g}px`:g})}typeof i=="number"||typeof i=="string"?f(i):typeof i=="object"?["top","right","bottom","left"].forEach(g=>{i[g]===void 0?s[`${u}-${g}`]=d:s[`${u}-${g}`]=typeof i[g]=="number"?`${i[g]}px`:i[g]}):f(d)}),s}const dL=Ne.forwardRef(function(t,s){const{id:i,invert:o,position:l="bottom-right",hotkey:u=["altKey","KeyT"],expand:d,closeButton:f,className:g,offset:m,mobileOffset:h,theme:x="light",richColors:S,duration:w,style:C,visibleToasts:E=tL,toastOptions:R,dir:O=yE(),gap:T=iL,icons:A,customAriaLabel:N,containerAriaLabel:j="Notifications"}=t,[D,M]=Ne.useState([]),z=Ne.useMemo(()=>i?D.filter(I=>I.toasterId===i):D.filter(I=>!I.toasterId),[D,i]),L=Ne.useMemo(()=>Array.from(new Set([l].concat(z.filter(I=>I.position).map(I=>I.position)))),[z,l]),[K,X]=Ne.useState([]),[B,H]=Ne.useState(!1),[U,_]=Ne.useState(!1),[Q,$]=Ne.useState(x!=="system"?x:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),q=Ne.useRef(null),Y=u.join("+").replace(/Key/g,"").replace(/Digit/g,""),ee=Ne.useRef(null),G=Ne.useRef(!1),ae=Ne.useCallback(I=>{M(F=>{var Z;return(Z=F.find(ne=>ne.id===I.id))!=null&&Z.delete||Wr.dismiss(I.id),F.filter(({id:ne})=>ne!==I.id)})},[]);return Ne.useEffect(()=>Wr.subscribe(I=>{if(I.dismiss){requestAnimationFrame(()=>{M(F=>F.map(Z=>Z.id===I.id?{...Z,delete:!0}:Z))});return}setTimeout(()=>{J4.flushSync(()=>{M(F=>{const Z=F.findIndex(ne=>ne.id===I.id);return Z!==-1?[...F.slice(0,Z),{...F[Z],...I},...F.slice(Z+1)]:[I,...F]})})})}),[]),Ne.useEffect(()=>{if(x!=="system"){$(x);return}if(x==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?$("dark"):$("light")),typeof window>"u")return;const I=window.matchMedia("(prefers-color-scheme: dark)");try{I.addEventListener("change",({matches:F})=>{$(F?"dark":"light")})}catch{I.addListener(({matches:Z})=>{try{$(Z?"dark":"light")}catch(ne){console.error(ne)}})}},[x]),Ne.useEffect(()=>{D.length<=1&&H(!1)},[D]),Ne.useEffect(()=>{const I=F=>{var Z;if(u.length>0&&u.every(se=>F[se]||F.code===se)){var ye;H(!0),(ye=q.current)==null||ye.focus()}F.code==="Escape"&&(document.activeElement===q.current||(Z=q.current)!=null&&Z.contains(document.activeElement))&&H(!1)};return document.addEventListener("keydown",I),()=>document.removeEventListener("keydown",I)},[u]),Ne.useEffect(()=>{if(q.current)return()=>{ee.current&&(ee.current.focus({preventScroll:!0}),ee.current=null,G.current=!1)}},[q.current]),Ne.createElement("section",{ref:s,"aria-label":N??`${j} ${Y}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},L.map((I,F)=>{var Z;const[ne,ye]=I.split("-");return z.length?Ne.createElement("ol",{key:I,dir:O==="auto"?yE():O,tabIndex:-1,ref:q,className:g,"data-sonner-toaster":!0,"data-sonner-theme":Q,"data-y-position":ne,"data-x-position":ye,style:{"--front-toast-height":`${((Z=K[0])==null?void 0:Z.height)||0}px`,"--width":`${sL}px`,"--gap":`${T}px`,...C,...uL(m,h)},onBlur:se=>{G.current&&!se.currentTarget.contains(se.relatedTarget)&&(G.current=!1,ee.current&&(ee.current.focus({preventScroll:!0}),ee.current=null))},onFocus:se=>{se.target instanceof HTMLElement&&se.target.dataset.dismissible==="false"||G.current||(G.current=!0,ee.current=se.relatedTarget)},onMouseEnter:()=>H(!0),onMouseMove:()=>H(!0),onMouseLeave:()=>{U||H(!1)},onDragEnd:()=>H(!1),onPointerDown:se=>{se.target instanceof HTMLElement&&se.target.dataset.dismissible==="false"||_(!0)},onPointerUp:()=>_(!1)},z.filter(se=>!se.position&&F===0||se.position===I).map((se,ge)=>{var fe,ce;return Ne.createElement(cL,{key:se.id,icons:A,index:ge,toast:se,defaultRichColors:S,duration:(fe=R?.duration)!=null?fe:w,className:R?.className,descriptionClassName:R?.descriptionClassName,invert:o,visibleToasts:E,closeButton:(ce=R?.closeButton)!=null?ce:f,interacting:U,position:I,style:R?.style,unstyled:R?.unstyled,classNames:R?.classNames,cancelButtonStyle:R?.cancelButtonStyle,actionButtonStyle:R?.actionButtonStyle,closeButtonAriaLabel:R?.closeButtonAriaLabel,removeToast:ae,toasts:z.filter(Re=>Re.position==se.position),heights:K.filter(Re=>Re.position==se.position),setHeights:X,expandByDefault:d,gap:T,expanded:B,swipeDirections:t.swipeDirections})})):null}))}),fL=e=>(e.match(/\d+[xX]\d+|[A-Z]?[a-z]+|[A-Z]|\d+/g)??[]).join("-").toLowerCase();function hL(e,t,s=[]){if(t==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:fL(e),size:24,node:t,...s.length>0?{aliases:s}:{}}}const pL=e=>{let t="",s=!1;for(const i of e){if(i==="-"||i==="_"||i<=" "){s=t.length>0;continue}t.length===0?t+=i.toLowerCase():t+=s?i.toUpperCase():i,s=!1}return t},gL=e=>{const t=pL(e);return t.charAt(0).toUpperCase()+t.slice(1)},Yy=(...e)=>{const t=new Set;for(const s of e)if(typeof s=="string")for(const i of s.split(/\s+/))i&&t.add(i);return[...t].join(" ")},Pl={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};function gy(e){return e!=null}function mL(e,t={}){const s=t.attributeNames??{},i=x=>s[x]??x,o=e.size??e.width??Pl.width,l=e.size??e.height??Pl.height,u=e.aliases?.filter(x=>typeof x=="string"&&x.trim()!=="").map(x=>`lucide-${x}`)??[],d=[...e.name?[`lucide-${e.name}`]:[],...u],f=t.className?.split(" ").filter(Boolean)??[],g=t.includeDefaultClasses===!1?Yy(...f):Yy("lucide",...d,...f);let m=t.strokeWidth??Pl["stroke-width"];if(t.absoluteStrokeWidth){const x=Number(m)*Number(e.size??e.width??Pl.width)/Number(t.size??t.width??Pl.width);Number.isFinite(x)&&(m=x)}return["svg",{...Object.entries(Pl).reduce((x,[S,w])=>(x[i(S)]=w,x),{}),..."color"in t&&t.color&&{[i("stroke")]:t.color},..."size"in t&&gy(t.size)&&{[i("width")]:t.size,[i("height")]:t.size},..."width"in t&&gy(t.width)&&{[i("width")]:t.width},..."height"in t&&gy(t.height)&&{[i("height")]:t.height},[i("stroke-width")]:m,...g&&{[i("class")]:g},[i("viewBox")]:`0 0 ${o} ${l}`,...t.hasA11yProp===!1?{[i("aria-hidden")]:"true"}:{},..."attributes"in t&&t.attributes},e.node.map(x=>{const[S,w,C]=x,E=t.nonScalingStroke?{[i("vector-effect")]:"non-scaling-stroke",...w}:w;return C?[S,E,C]:[S,E]})]}function yL(e,t={}){return mL(e,{...t,attributeNames:{...t.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}const vL=e=>{if(e==null||typeof e!="object")return!1;for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&(t.startsWith("aria-")||t==="role"||t==="title")&&e[t]!=null)return!0;return!1},bL=b.createContext({}),xL=()=>b.useContext(bL),SL=b.forwardRef(({color:e,size:t,width:s,height:i,strokeWidth:o,absoluteStrokeWidth:l,nonScalingStroke:u,className:d="",children:f,iconNode:g=[],icon:m={node:g,aliases:[],size:24},...h},x)=>{const{size:S=24,strokeWidth:w=2,absoluteStrokeWidth:C=!1,nonScalingStroke:E=!1,color:R="currentColor",className:O=""}=xL()??{},T=!!f||vL(h),[A,N,j=[]]=yL(m,{color:e??R,width:s??t??S,height:i??t??S,strokeWidth:o??w,absoluteStrokeWidth:l??C,nonScalingStroke:u??E,className:Yy(O,d),hasA11yProp:T,attributes:h});return b.createElement(A,{ref:x,...N},[...j.map(([D,M])=>b.createElement(D,M)),...Array.isArray(f)?f:[f]])});function At(e,t=[],s=[]){const i=typeof e=="string"?hL(e,t,s):e,o=b.forwardRef(({className:l,...u},d)=>b.createElement(SL,{ref:d,icon:i,className:l,...u}));return i.name&&(o.displayName=gL(i.name)),o}const ET={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};ET.node;const wL=At(ET),RT={name:"bot",size:24,node:[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]};RT.node;const nb=At(RT),CT={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};CT.node;const dd=At(CT),TT={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};TT.node;const rb=At(TT),kT={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};kT.node;const sb=At(kT),OT={name:"chevron-up",size:24,node:[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]};OT.node;const EL=At(OT),AT={name:"circle-check",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 9-5.5 5.5L8 12",key:"xofnsj"}]],aliases:["check-circle-2"]};AT.node;const MT=At(AT),NT={name:"circle-question-mark",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9 9.5a3 2.5 0 016 0c0 2-2 2-3 3.5",key:"1awbb0"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["help-circle","circle-help"]};NT.node;const RL=At(NT),DT={name:"circle-x",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],aliases:["x-circle"]};DT.node;const CL=At(DT),jT={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]};jT.node;const IT=At(jT),PT={name:"download",size:24,node:[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]};PT.node;const Jp=At(PT),LT={name:"ellipsis",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],aliases:["more-horizontal"]};LT.node;const ib=At(LT),zT={name:"eye-off",size:24,node:[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]};zT.node;const TL=At(zT),_T={name:"eye",size:24,node:[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};_T.node;const kL=At(_T),UT={name:"file-input",size:24,node:[["path",{d:"M4 11V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-1",key:"1q9hii"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M2 15h10",key:"jfw4w8"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]]};UT.node;const HT=At(UT),FT={name:"file-output",size:24,node:[["path",{d:"M4.226 20.925A2 2 0 0 0 6 22h12a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v3.127",key:"wfxp4w"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 11-3 3",key:"1dgrs4"}],["path",{d:"m5 17-3-3h10",key:"1mvvaf"}]]};FT.node;const BT=At(FT),VT={name:"file-plus",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]]};VT.node;const OL=At(VT),KT={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};KT.node;const ab=At(KT),qT={name:"files",size:24,node:[["path",{d:"M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8",key:"14sh0y"}],["path",{d:"M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z",key:"1970lx"}],["path",{d:"M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1",key:"l4dndm"}]]};qT.node;const AL=At(qT),YT={name:"folder-open",size:24,node:[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]};YT.node;const GT=At(YT),$T={name:"folder-plus",size:24,node:[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]};$T.node;const ML=At($T),QT={name:"folder",size:24,node:[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]};QT.node;const XT=At(QT),ZT={name:"grip-vertical",size:24,node:[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]};ZT.node;const ob=At(ZT),WT={name:"info",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]};WT.node;const NL=At(WT),JT={name:"languages",size:24,node:[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]};JT.node;const DL=At(JT),ek={name:"layout-dashboard",size:24,node:[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]};ek.node;const jL=At(ek),tk={name:"library-big",size:24,node:[["rect",{width:"8",height:"18",x:"3",y:"3",rx:"1",key:"oynpb5"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M20.4 18.9c.2.5-.1 1.1-.6 1.3l-1.9.7c-.5.2-1.1-.1-1.3-.6L11.1 5.1c-.2-.5.1-1.1.6-1.3l1.9-.7c.5-.2 1.1.1 1.3.6Z",key:"1qboyk"}]]};tk.node;const IL=At(tk),nk={name:"list-checks",size:24,node:[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]]};nk.node;const PL=At(nk),rk={name:"loader-circle",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],aliases:["loader-2"]};rk.node;const Kr=At(rk),sk={name:"lock-keyhole",size:24,node:[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]]};sk.node;const LL=At(sk),ik={name:"menu",size:24,node:[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]};ik.node;const zL=At(ik),ak={name:"octagon-x",size:24,node:[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],aliases:["x-octagon"]};ak.node;const _L=At(ak),ok={name:"paintbrush",size:24,node:[["path",{d:"m14.622 17.897-10.68-2.913",key:"vj2p1u"}],["path",{d:"M18.376 2.622a1 1 0 1 1 3.002 3.002L17.36 9.643a.5.5 0 0 0 0 .707l.944.944a2.41 2.41 0 0 1 0 3.408l-.944.944a.5.5 0 0 1-.707 0L8.354 7.348a.5.5 0 0 1 0-.707l.944-.944a2.41 2.41 0 0 1 3.408 0l.944.944a.5.5 0 0 0 .707 0z",key:"18tc5c"}],["path",{d:"M9 8c-1.804 2.71-3.97 3.46-6.583 3.948a.507.507 0 0 0-.302.819l7.32 8.883a1 1 0 0 0 1.185.204C12.735 20.405 16 16.792 16 15",key:"ytzfxy"}]]};ok.node;const UL=At(ok),lk={name:"panel-left",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],aliases:["sidebar"]};lk.node;const HL=At(lk),ck={name:"pencil",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]};ck.node;const uk=At(ck),dk={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};dk.node;const uc=At(dk),fk={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]};fk.node;const FL=At(fk),hk={name:"rotate-cw",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]};hk.node;const pk=At(hk),gk={name:"save",size:24,node:[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]};gk.node;const lb=At(gk),mk={name:"settings",size:24,node:[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};mk.node;const BL=At(mk),yk={name:"sliders-horizontal",size:24,node:[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]]};yk.node;const vk=At(yk),bk={name:"terminal",size:24,node:[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]};bk.node;const VL=At(bk),xk={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};xk.node;const cb=At(xk),Sk={name:"triangle-exclamation-point",size:24,node:[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["alert-triangle","triangle-alert"]};Sk.node;const ub=At(Sk),wk={name:"user-round-plus",size:24,node:[["path",{d:"M2 21a8 8 0 0 1 13.292-6",key:"bjp14o"}],["circle",{cx:"10",cy:"8",r:"5",key:"o932ke"}],["path",{d:"M19 16v6",key:"tddt3s"}],["path",{d:"M22 19h-6",key:"vcuq98"}]],aliases:["user-plus-2"]};wk.node;const Ek=At(wk),Rk={name:"wrench",size:24,node:[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]};Rk.node;const Uo=At(Rk),Ck={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};Ck.node;const ra=At(Ck),KL=({...e})=>{const{theme:t="system"}=LP();return v.jsx(dL,{theme:t,className:"toaster group",icons:{success:v.jsx(MT,{className:"size-4"}),info:v.jsx(NL,{className:"size-4"}),warning:v.jsx(ub,{className:"size-4"}),error:v.jsx(_L,{className:"size-4"}),loading:v.jsx(Kr,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},toastOptions:{classNames:{toast:"cn-toast"}},...e})},Tt=e=>typeof e=="string",vu=()=>{let e,t;const s=new Promise((i,o)=>{e=i,t=o});return s.resolve=e,s.reject=t,s},lh=e=>e==null?"":String(e),qL=(e,t,s)=>{e.forEach(i=>{t[i]&&(s[i]=t[i])})},YL=/###/g,vE=e=>e&&e.includes("###")?e.replace(YL,"."):e,bE=e=>!e||Tt(e),Mu=(e,t,s)=>{const i=Tt(t)?t.split("."):t;let o=0;for(;o<i.length-1;){if(bE(e))return{};const l=vE(i[o]);!e[l]&&s&&(e[l]=new s),Object.prototype.hasOwnProperty.call(e,l)?e=e[l]:e={},++o}return bE(e)?{}:{obj:e,k:vE(i[o])}},xE=(e,t,s)=>{const{obj:i,k:o}=Mu(e,t,Object);if(i!==void 0||t.length===1){i[o]=s;return}let l=t[t.length-1],u=t.slice(0,t.length-1),d=Mu(e,u,Object);for(;d.obj===void 0&&u.length;)l=`${u[u.length-1]}.${l}`,u=u.slice(0,u.length-1),d=Mu(e,u,Object),d?.obj&&typeof d.obj[`${d.k}.${l}`]<"u"&&(d.obj=void 0);d.obj[`${d.k}.${l}`]=s},GL=(e,t,s,i)=>{const{obj:o,k:l}=Mu(e,t,Object);o[l]=o[l]||[],o[l].push(s)},np=(e,t)=>{const{obj:s,k:i}=Mu(e,t);if(s&&Object.prototype.hasOwnProperty.call(s,i))return s[i]},$L=(e,t,s)=>{const i=np(e,s);return i!==void 0?i:np(t,s)},Tk=(e,t,s)=>{for(const i in t)i!=="__proto__"&&i!=="constructor"&&(Object.prototype.hasOwnProperty.call(e,i)?Tt(e[i])||e[i]instanceof String||Tt(t[i])||t[i]instanceof String?s&&(e[i]=t[i]):Tk(e[i],t[i],s):e[i]=t[i]);return e},qi=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),QL={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},XL=e=>Tt(e)?e.replace(/[&<>"'\/]/g,t=>QL[t]):e;class ZL{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const s=this.regExpMap.get(t);if(s!==void 0)return s;const i=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,i),this.regExpQueue.push(t),i}}const WL=[" ",",","?","!",";"],JL=new ZL(20),e5=(e,t,s)=>{t=t||"",s=s||"";const i=WL.filter(u=>!t.includes(u)&&!s.includes(u));if(i.length===0)return!0;const o=JL.getRegExp(`(${i.map(u=>u==="?"?"\\?":u).join("|")})`);let l=!o.test(e);if(!l){const u=e.indexOf(s);u>0&&!o.test(e.substring(0,u))&&(l=!0)}return l},Gy=(e,t,s=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const i=t.split(s);let o=e;for(let l=0;l<i.length;){if(!o||typeof o!="object")return;let u,d="";for(let f=l;f<i.length;++f)if(f!==l&&(d+=s),d+=i[f],u=o[d],(typeof u=="function"||d==="__proto__")&&!Object.prototype.hasOwnProperty.call(o,d)&&(u=void 0),u!==void 0){if(["string","number","boolean"].includes(typeof u)&&f<i.length-1)continue;l+=f-l+1;break}o=u}return o},ic=e=>e?.replace(/_/g,"-"),t5={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class rp{constructor(t,s={}){this.init(t,s)}init(t,s={}){this.prefix=s.prefix||"i18next:",this.logger=t||t5,this.options=s,this.debug=s.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,s,i,o){return o&&!this.debug?null:(t=t.map(l=>Tt(l)?l.replace(/[\r\n\x00-\x1F\x7F]/g," "):l),Tt(t[0])&&(t[0]=`${i}${this.prefix} ${t[0]}`),this.logger[s](t))}create(t){return new rp(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new rp(this.logger,t)}}var vi=new rp;class eg{constructor(){this.observers={}}on(t,s){return t.split(" ").forEach(i=>{this.observers[i]||(this.observers[i]=new Map);const o=this.observers[i].get(s)||0;this.observers[i].set(s,o+1)}),this}off(t,s){if(this.observers[t]){if(!s){delete this.observers[t];return}this.observers[t].delete(s)}}once(t,s){const i=(...o)=>{s(...o),this.off(t,i)};return this.on(t,i),this}emit(t,...s){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([o,l])=>{for(let u=0;u<l;u++)o(...s)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([o,l])=>{for(let u=0;u<l;u++)o(t,...s)})}}const SE=new WeakSet;class wE extends eg{constructor(t,s={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=s,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.includes(t)||this.options.ns.push(t)}removeNamespaces(t){const s=this.options.ns.indexOf(t);s>-1&&this.options.ns.splice(s,1)}getResource(t,s,i,o={}){const l=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,u=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let d;t.includes(".")?d=t.split("."):(d=[t,s],i&&(Array.isArray(i)?d.push(...i):Tt(i)&&l?d.push(...i.split(l)):d.push(i)));const f=np(this.data,d);return f==null&&!s&&!i&&t.includes(".")&&(t=d[0],s=d[1],i=d.slice(2).join(".")),f!=null||!u||!Tt(i)?f:Gy(this.data?.[t]?.[s],i,l)}addResource(t,s,i,o,l={silent:!1}){const u=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator;let d=[t,s];i&&(d=d.concat(u?i.split(u):i)),t.includes(".")&&(d=t.split("."),o=s,s=d[1]),this.addNamespaces(s),xE(this.data,d,o),l.silent||this.emit("added",t,s,i,o)}addResources(t,s,i,o={silent:!1}){for(const l in i)(Tt(i[l])||Array.isArray(i[l]))&&this.addResource(t,s,l,i[l],{silent:!0});o.silent||this.emit("added",t,s,i)}addResourceBundle(t,s,i,o,l,u={silent:!1,skipCopy:!1}){let d=[t,s];t.includes(".")&&(d=t.split("."),o=i,i=s,s=d[1]),this.addNamespaces(s);let f=np(this.data,d)||{};u.skipCopy||(i=JSON.parse(JSON.stringify(i))),o?Tk(f,i,l):f={...f,...i},xE(this.data,d,f),u.silent||this.emit("added",t,s,i)}removeResourceBundle(t,s){this.hasResourceBundle(t,s)&&delete this.data[t][s],this.removeNamespaces(s),this.emit("removed",t,s)}hasResourceBundle(t,s){return this.getResource(t,s)!==void 0}getResourceBundle(t,s){return s||(s=this.options.defaultNS),this.getResource(t,s)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const s=this.getDataByLanguage(t);return!!(s&&Object.keys(s)||[]).find(o=>{const l=s[o];return SE.has(l)?!0:!l||Object.keys(l).length===0?!1:(typeof l=="object"&&SE.add(l),!0)})}toJSON(){return this.data}}var kk={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,s,i,o){return e.forEach(l=>{t=this.processors[l]?.process(t,s,i,o)??t}),t}};const Ok=Symbol("i18next/PATH_KEY");function n5(){const e=[],t=Object.create(null);let s;return t.get=(i,o)=>(s?.revoke?.(),o===Ok?e:(e.push(o),s=Proxy.revocable(i,t),s.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Fa(e,t){const{[Ok]:s}=e(n5()),i=t?.keySeparator??".",o=t?.nsSeparator??":",l=t?.enableSelector==="strict";if(s.length>1&&o){const u=t?.ns,d=l?Array.isArray(u)?u:u?[u]:null:Array.isArray(u)?u:null;if(d&&(l?d:d.length>1?d.slice(1):[]).includes(s[0]))return`${s[0]}${o}${s.slice(1).join(i)}`}return s.join(i)}const my=e=>!Tt(e)&&typeof e!="boolean"&&typeof e!="number";class sp extends eg{constructor(t,s={}){super(),qL(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=s,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=vi.create("translator"),this.checkedLoadedFor={}}changeLanguage(t){t&&(this.language=t)}exists(t,s={interpolation:{}}){const i={...s};if(t==null)return!1;const o=this.resolve(t,i);if(o?.res===void 0)return!1;const l=my(o.res);return!(i.returnObjects===!1&&l)}extractFromKey(t,s){let i=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let l=s.ns||this.options.defaultNS||[];const u=i&&t.includes(i),d=!this.options.userDefinedKeySeparator&&!s.keySeparator&&!this.options.userDefinedNsSeparator&&!s.nsSeparator&&!e5(t,i,o);if(u&&!d){const f=t.match(this.interpolator.nestingRegexp);if(f&&f.length>0)return{key:t,namespaces:Tt(l)?[l]:l};const g=t.split(i);(i!==o||i===o&&this.options.ns.includes(g[0]))&&(l=g.shift()),t=g.join(o)}return{key:t,namespaces:Tt(l)?[l]:l}}translate(t,s,i){let o=typeof s=="object"?{...s}:s;if(typeof o!="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),typeof o=="object"&&(o={...o}),o||(o={}),t==null)return"";typeof t=="function"&&(t=Fa(t,{...this.options,...o})),Array.isArray(t)||(t=[String(t)]),t=t.map(B=>typeof B=="function"?Fa(B,{...this.options,...o}):String(B));const l=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,u=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,{key:d,namespaces:f}=this.extractFromKey(t[t.length-1],o),g=f[f.length-1];let m=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;m===void 0&&(m=":");const h=o.lng||this.language,x=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h?.toLowerCase()==="cimode")return x?l?{res:`${g}${m}${d}`,usedKey:d,exactUsedKey:d,usedLng:h,usedNS:g,usedParams:this.getUsedParamsDetails(o)}:`${g}${m}${d}`:l?{res:d,usedKey:d,exactUsedKey:d,usedLng:h,usedNS:g,usedParams:this.getUsedParamsDetails(o)}:d;const S=this.resolve(t,o);let w=S?.res;const C=S?.usedKey||d,E=S?.exactUsedKey||d,R=["[object Number]","[object Function]","[object RegExp]"],O=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,T=!this.i18nFormat||this.i18nFormat.handleAsObject,A=o.count!==void 0&&!Tt(o.count),N=sp.hasDefaultValue(o),j=A?this.pluralResolver.getSuffix(h,o.count,o):"",D=o.ordinal&&A?this.pluralResolver.getSuffix(h,o.count,{ordinal:!1}):"",M=A&&!o.ordinal&&o.count===0,z=M&&o[`defaultValue${this.options.pluralSeparator}zero`]||o[`defaultValue${j}`]||o[`defaultValue${D}`]||o.defaultValue;let L=w;T&&!w&&N&&(L=z);const K=my(L),X=Object.prototype.toString.apply(L);if(T&&L&&K&&!R.includes(X)&&!(Tt(O)&&Array.isArray(L))){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const B=this.options.returnedObjectHandler?this.options.returnedObjectHandler(C,L,{...o,ns:f}):`key '${d} (${this.language})' returned an object instead of string.`;return l?(S.res=B,S.usedParams=this.getUsedParamsDetails(o),S):B}if(u){const B=Array.isArray(L),H=B?[]:{},U=B?E:C;for(const _ in L)if(Object.prototype.hasOwnProperty.call(L,_)){const Q=`${U}${u}${_}`;N&&!w?H[_]=this.translate(Q,{...o,defaultValue:my(z)?z[_]:void 0,joinArrays:!1,ns:f}):H[_]=this.translate(Q,{...o,joinArrays:!1,ns:f}),H[_]===Q&&(H[_]=L[_])}w=H}}else if(T&&Tt(O)&&Array.isArray(w))w=w.join(O),w&&(w=this.extendTranslation(w,t,o,S,i));else{let B=!1,H=!1;!this.isValidLookup(w)&&N&&(B=!0,w=z),this.isValidLookup(w)||(H=!0,w=d);const _=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&H?void 0:w,Q=N&&z!==w&&this.options.updateMissing;if(H||B||Q){if(this.logger.log(Q?"updateKey":"missingKey",h,g,A&&!Q?`${d}${this.pluralResolver.getSuffix(h,o.count,o)}`:d,Q?z:w),u){const ee=this.resolve(d,{...o,keySeparator:!1});ee&&ee.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let $=[];const q=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&q&&q[0])for(let ee=0;ee<q.length;ee++)$.push(q[ee]);else this.options.saveMissingTo==="all"?$=this.languageUtils.toResolveHierarchy(o.lng||this.language):$.push(o.lng||this.language);const Y=(ee,G,ae)=>{const I=N&&ae!==w?ae:_;this.options.missingKeyHandler?this.options.missingKeyHandler(ee,g,G,I,Q,o):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(ee,g,G,I,Q,o),this.emit("missingKey",ee,g,G,w)};this.options.saveMissing&&(this.options.saveMissingPlurals&&A?$.forEach(ee=>{const G=this.pluralResolver.getSuffixes(ee,o);M&&o[`defaultValue${this.options.pluralSeparator}zero`]&&!G.includes(`${this.options.pluralSeparator}zero`)&&G.push(`${this.options.pluralSeparator}zero`),G.forEach(ae=>{Y([ee],d+ae,o[`defaultValue${ae}`]||z)})}):Y($,d,z))}w=this.extendTranslation(w,t,o,S,i),H&&w===d&&this.options.appendNamespaceToMissingKey&&(w=`${g}${m}${d}`),(H||B)&&this.options.parseMissingKeyHandler&&(w=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${g}${m}${d}`:d,B?w:void 0,o))}return l?(S.res=w,S.usedParams=this.getUsedParamsDetails(o),S):w}extendTranslation(t,s,i,o,l){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const f=Tt(t)&&(i?.interpolation?.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let g;if(f){const h=t.match(this.interpolator.nestingRegexp);g=h&&h.length}let m=i.replace&&!Tt(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(m={...this.options.interpolation.defaultVariables,...m}),t=this.interpolator.interpolate(t,m,i.lng||this.language||o.usedLng,i),f){const h=t.match(this.interpolator.nestingRegexp),x=h&&h.length;g<x&&(i.nest=!1)}!i.lng&&o&&o.res&&(i.lng=this.language||o.usedLng),i.nest!==!1&&(t=this.interpolator.nest(t,(...h)=>l?.[0]===h[0]&&!i.context?(this.logger.warn(`It seems you are nesting recursively key: ${h[0]} in key: ${s[0]}`),null):this.translate(...h,s),i)),i.interpolation&&this.interpolator.reset()}const u=i.postProcess||this.options.postProcess,d=Tt(u)?[u]:u;return t!=null&&d?.length&&i.applyPostProcessor!==!1&&(t=kk.handle(d,t,s,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),t}resolve(t,s={}){let i,o,l,u,d;return Tt(t)&&(t=[t]),Array.isArray(t)&&(t=t.map(f=>typeof f=="function"?Fa(f,{...this.options,...s}):f)),t.forEach(f=>{if(this.isValidLookup(i))return;const g=this.extractFromKey(f,s),m=g.key;o=m;let h=g.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const x=s.count!==void 0&&!Tt(s.count),S=x&&!s.ordinal&&s.count===0,w=s.context!==void 0&&(Tt(s.context)||typeof s.context=="number")&&s.context!=="",C=s.lngs?s.lngs:this.languageUtils.toResolveHierarchy(s.lng||this.language,s.fallbackLng);h.forEach(E=>{this.isValidLookup(i)||(d=E,!this.checkedLoadedFor[`${C[0]}-${E}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(d)&&(this.checkedLoadedFor[`${C[0]}-${E}`]=!0,this.logger.warn(`key "${o}" for languages "${C.join(", ")}" won't get resolved as namespace "${d}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),C.forEach(R=>{if(this.isValidLookup(i))return;u=R;const O=[m];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(O,m,R,E,s);else{let A;x&&(A=this.pluralResolver.getSuffix(R,s.count,s));const N=`${this.options.pluralSeparator}zero`,j=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(x&&(s.ordinal&&A.startsWith(j)&&O.push(m+A.replace(j,this.options.pluralSeparator)),O.push(m+A),S&&O.push(m+N)),w){const D=`${m}${this.options.contextSeparator||"_"}${s.context}`;O.push(D),x&&(s.ordinal&&A.startsWith(j)&&O.push(D+A.replace(j,this.options.pluralSeparator)),O.push(D+A),S&&O.push(D+N))}}let T;for(;T=O.pop();)this.isValidLookup(i)||(l=T,i=this.getResource(R,E,T,s))}))})}),{res:i,usedKey:o,exactUsedKey:l,usedLng:u,usedNS:d}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,s,i,o={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,s,i,o):this.resourceStore.getResource(t,s,i,o)}getUsedParamsDetails(t={}){const s=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=t.replace&&!Tt(t.replace);let o=i?t.replace:t;if(i&&typeof t.count<"u"&&(o={...o,count:t.count}),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!i){o={...o};for(const l of s)delete o[l]}return o}static hasDefaultValue(t){const s="defaultValue";for(const i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&i.startsWith(s)&&t[i]!==void 0)return!0;return!1}}class EE{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=vi.create("languageUtils"),this.resolveHierarchyCache={}}clearCache(){this.resolveHierarchyCache={}}getScriptPartFromCode(t){if(t=ic(t),!t||!t.includes("-"))return null;const s=t.split("-");return s.length===2||(s.pop(),s[s.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(s.join("-"))}getLanguagePartFromCode(t){if(t=ic(t),!t||!t.includes("-"))return t;const s=t.split("-");return this.formatLanguageCode(s[0])}formatLanguageCode(t){if(Tt(t)&&t.includes("-")){let s;try{s=Intl.getCanonicalLocales(t)[0]}catch{}return s&&this.options.lowerCaseLng&&(s=s.toLowerCase()),s||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(t)}getBestMatchFromCodes(t){if(!t)return null;let s;return t.forEach(i=>{if(s)return;const o=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(o))&&(s=o)}),!s&&this.options.supportedLngs&&t.forEach(i=>{if(s)return;const o=this.getScriptPartFromCode(i);if(this.isSupportedCode(o))return s=o;const l=this.getLanguagePartFromCode(i);if(this.isSupportedCode(l))return s=l;s=this.options.supportedLngs.find(u=>u===l?!0:!u.includes("-")&&!l.includes("-")?!1:!!(u.includes("-")&&!l.includes("-")&&u.slice(0,u.indexOf("-"))===l))}),s||(s=this.getFallbackCodes(this.options.fallbackLng)[0]),s}getFallbackCodes(t,s){if(!t)return[];if(typeof t=="function"&&(t=t(s)),Tt(t)&&(t=[t]),Array.isArray(t))return t;if(!s)return t.default||[];let i=t[s];return i||(i=t[this.getScriptPartFromCode(s)]),i||(i=t[this.formatLanguageCode(s)]),i||(i=t[this.getLanguagePartFromCode(s)]),i||(i=t.default),i||[]}toResolveHierarchy(t,s){const i=this.options.fallbackLng,o=Array.isArray(i)?i.join("|"):i;o!==this._cachedFallbackLng&&(this.resolveHierarchyCache={},this._cachedFallbackLng=o);const l=s===void 0||s===!1||Tt(s),u=s===void 0&&typeof this.options.fallbackLng=="function",d=Tt(t)&&l&&!u;let f=null;if(d){let x;s===void 0?x="undefined":s===!1?x="boolean:false":x=`string:${s}`,f=`${t.length}:${t}|${x}`}if(f!==null){const x=this.resolveHierarchyCache[f];if(x!==void 0)return x.slice()}const g=this.getFallbackCodes((s===!1?[]:s)||this.options.fallbackLng||[],t),m=[],h=x=>{x&&(this.isSupportedCode(x)?m.push(x):this.logger.warn(`rejecting language code not found in supportedLngs: ${x}`))};return Tt(t)&&(t.includes("-")||t.includes("_"))?(this.options.load!=="languageOnly"&&h(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&h(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&h(this.getLanguagePartFromCode(t))):Tt(t)&&h(this.formatLanguageCode(t)),g.forEach(x=>{const S=this.formatLanguageCode(x);m.includes(S)||h(S)}),f!==null?(this.resolveHierarchyCache[f]=m,m.slice()):m}}const RE={zero:0,one:1,two:2,few:3,many:4,other:5},CE={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class r5{constructor(t,s={}){this.languageUtils=t,this.options=s,this.logger=vi.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,s={}){const i=ic(t==="dev"?"en":t),o=s.ordinal?"ordinal":"cardinal",l=JSON.stringify({cleanedCode:i,type:o});if(l in this.pluralRulesCache)return this.pluralRulesCache[l];let u;try{u=new Intl.PluralRules(i,{type:o})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),CE;if(!t.match(/-|_/))return CE;const f=this.languageUtils.getLanguagePartFromCode(t);u=this.getRule(f,s)}return this.pluralRulesCache[l]=u,u}needsPlural(t,s={}){let i=this.getRule(t,s);return i||(i=this.getRule("dev",s)),i?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,s,i={}){return this.getSuffixes(t,i).map(o=>`${s}${o}`)}getSuffixes(t,s={}){let i=this.getRule(t,s);return i||(i=this.getRule("dev",s)),i?i.resolvedOptions().pluralCategories.sort((o,l)=>RE[o]-RE[l]).map(o=>`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${o}`):[]}getSuffix(t,s,i={}){const o=this.getRule(t,i);return o?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${o.select(s)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",s,i))}}const TE=(e,t,s,i=".",o=!0)=>{let l=$L(e,t,s);return!l&&o&&Tt(s)&&(l=Gy(e,s,i),l===void 0&&(l=Gy(t,s,i))),l};class kE{constructor(t={}){this.logger=vi.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(s=>s),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:s,escapeValue:i,useRawValueToEscape:o,prefix:l,prefixEscaped:u,suffix:d,suffixEscaped:f,formatSeparator:g,unescapeSuffix:m,unescapePrefix:h,nestingPrefix:x,nestingPrefixEscaped:S,nestingSuffix:w,nestingSuffixEscaped:C,nestingOptionsSeparator:E,maxReplaces:R,alwaysFormat:O}=t.interpolation;this.escape=s!==void 0?s:XL,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=l?qi(l):u||"{{",this.suffix=d?qi(d):f||"}}",this.formatSeparator=g||",",this.unescapePrefix=m?"":h?qi(h):"-",this.unescapeSuffix=this.unescapePrefix?"":m?qi(m):"",this.nestingPrefix=x?qi(x):S||qi("$t("),this.nestingSuffix=w?qi(w):C||qi(")"),this.nestingOptionsSeparator=E||",",this.maxReplaces=R||1e3,this.alwaysFormat=O!==void 0?O:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(s,i)=>s?.source===i?(s.lastIndex=0,s):new RegExp(i,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']|"[^"]*"|'[^']*'|\\((?:[^()"']|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,s,i,o){let l,u,d;const f=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},g=C=>{if(!C.includes(this.formatSeparator)){const T=TE(s,f,C,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(T,void 0,i,{...o,...s,interpolationkey:C}):T}const E=C.split(this.formatSeparator),R=E.shift().trim(),O=E.join(this.formatSeparator).trim();return this.format(TE(s,f,R,this.options.keySeparator,this.options.ignoreJSONStructure),O,i,{...o,...s,interpolationkey:R})};this.resetRegExp(),!this.escapeValue&&typeof t=="string"&&/\$t\([^)]*\{[^}]*\{\{/.test(t)&&this.logger.warn("nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");const m=o?.missingInterpolationHandler||this.options.missingInterpolationHandler,h=o?.interpolation?.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,x=[{regex:this.regexpUnescape,safeValue:C=>C},{regex:this.regexp,safeValue:C=>this.escapeValue?this.escape(C):C}],S=[];let w=0;return x.forEach(C=>{for(d=0;l=C.regex.exec(t);){const E=l.index-w,R=S.find(([A,N])=>E>=A&&E<N);if(R){C.regex.lastIndex=R[1]+w;continue}const O=l[1].trim();if(u=g(O),u===void 0)if(typeof m=="function"){const A=m(t,l,o);u=Tt(A)?A:""}else if(o&&Object.prototype.hasOwnProperty.call(o,O))u="";else if(h){u=l[0];continue}else this.logger.warn(`missed to pass in variable ${O} for interpolating ${t}`),u="";else!Tt(u)&&!this.useRawValueToEscape&&(u=lh(u));const T=lh(C.safeValue(u));if(t=t.slice(0,l.index)+T+t.slice(l.index+l[0].length),h?(C.regex===this.regexpUnescape?S.push([l.index,l.index+T.length]):w+=T.length-l[0].length,C.regex.lastIndex+=T.length,C.regex.lastIndex-=l[0].length):C.regex.lastIndex=0,d++,d>=this.maxReplaces)break}}),t}nest(t,s,i={}){let o,l,u;const d=(h,x)=>{const S=this.nestingOptionsSeparator;if(!h.includes(S))return h;const w=h.split(new RegExp(`${qi(S)}[ ]*{`));let C=`{${w[1]}`;h=w[0],C=this.interpolate(C,u);const E=C.match(/'/g),R=C.match(/"/g);((E?.length??0)%2===0&&!R||(R?.length??0)%2!==0)&&(C=C.replace(/'/g,'"'));try{u=JSON.parse(C),x&&(u={...x,...u})}catch(O){return this.logger.warn(`failed parsing options string in nesting for key ${h}`,O),`${h}${S}${C}`}return u.defaultValue&&u.defaultValue.includes(this.prefix)&&delete u.defaultValue,h},f=new RegExp(this.nestingRegexp);let g="",m=0;for(;o=f.exec(t);){let h=[];u={...i},u=u.replace&&!Tt(u.replace)?u.replace:u,u.applyPostProcessor=!1,delete u.defaultValue;const x=/{.*}/s.test(o[1])?o[1].lastIndexOf("}")+1:o[1].indexOf(this.formatSeparator);if(x!==-1&&(h=o[1].slice(x).split(this.formatSeparator).map(S=>S.trim()).filter(Boolean),o[1]=o[1].slice(0,x)),l=s(d.call(this,o[1].trim(),u),u),l&&o[0]===t&&!Tt(l))return l;Tt(l)||(l=lh(l)),l||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),l=""),h.length&&(l=h.reduce((S,w)=>this.format(S,w,i.lng,{...i,interpolationkey:o[1].trim()}),l.trim())),g+=t.slice(m,o.index)+lh(l),m=f.lastIndex,this.regexp.lastIndex=0}return m?g+t.slice(m):t}}const s5=e=>{let t=e.toLowerCase().trim();const s={};if(e.includes("(")){const i=e.split("(");t=i[0].toLowerCase().trim();const o=i[1].slice(0,-1);t==="currency"&&!o.includes(":")?s.currency||(s.currency=o.trim()):t==="relativetime"&&!o.includes(":")?s.range||(s.range=o.trim()):o.split(";").forEach(u=>{if(u){const[d,...f]=u.split(":"),g=f.join(":").trim().replace(/^'+|'+$/g,""),m=d.trim();s[m]||(s[m]=g),g==="false"&&(s[m]=!1),g==="true"&&(s[m]=!0),isNaN(g)||(s[m]=parseInt(g,10))}})}return{formatName:t,formatOptions:s}},OE=e=>{const t={};return(s,i,o)=>{let l=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(l={...l,[o.interpolationkey]:void 0});let u;try{u=i+JSON.stringify(l)}catch{return e(ic(i),o)(s)}let d=t[u];return d||(d=e(ic(i),o),t[u]=d),d(s)}},i5=e=>(t,s,i)=>e(ic(s),i)(t);class a5{constructor(t={}){this.logger=vi.create("formatter"),this.options=t,this.init(t)}init(t,s={interpolation:{}}){this.formatSeparator=s.interpolation.formatSeparator||",";const i=s.cacheInBuiltFormats?OE:i5;this.formats={number:i((o,l)=>{const u=new Intl.NumberFormat(o,{...l});return d=>u.format(d)}),currency:i((o,l)=>{const u=new Intl.NumberFormat(o,{...l,style:"currency"});return d=>u.format(d)}),datetime:i((o,l)=>{const u=new Intl.DateTimeFormat(o,{...l});return d=>u.format(d)}),relativetime:i((o,l)=>{const u=new Intl.RelativeTimeFormat(o,{...l});return d=>u.format(d,l.range||"day")}),list:i((o,l)=>{const u=new Intl.ListFormat(o,{...l});return d=>u.format(d)})}}add(t,s){this.formats[t.toLowerCase().trim()]=s}addCached(t,s){this.formats[t.toLowerCase().trim()]=OE(s)}format(t,s,i,o={}){if(!s||t==null)return t;const l=s.split(this.formatSeparator),u=[];for(let f=0;f<l.length;f++){let g=l[f];for(;g.indexOf("(")>-1&&!g.includes(")")&&f+1<l.length;)g=`${g}${this.formatSeparator}${l[++f]}`;u.push(g)}return u.reduce((f,g)=>{const{formatName:m,formatOptions:h}=s5(g);if(this.formats[m]){let x=f;try{const S=o?.formatParams?.[o.interpolationkey]||{},w=S.locale||S.lng||o.locale||o.lng||i;x=this.formats[m](f,w,{...h,...o,...S})}catch(S){this.logger.warn(S)}return x}else this.logger.warn(`there was no format function for ${m}`);return f},t)}}const o5=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class l5 extends eg{constructor(t,s,i,o={}){super(),this.backend=t,this.store=s,this.services=i,this.languageUtils=i.languageUtils,this.options=o,this.logger=vi.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(i,o.backend,o)}queueLoad(t,s,i,o){const l={},u={},d={},f={};return t.forEach(g=>{let m=!0;s.forEach(h=>{const x=`${g}|${h}`;!i.reload&&this.store.hasResourceBundle(g,h)?this.state[x]=2:this.state[x]<0||(this.state[x]===1?u[x]===void 0&&(u[x]=!0):(this.state[x]=1,m=!1,u[x]===void 0&&(u[x]=!0),l[x]===void 0&&(l[x]=!0),f[h]===void 0&&(f[h]=!0)))}),m||(d[g]=!0)}),(Object.keys(l).length||Object.keys(u).length)&&this.queue.push({pending:u,pendingCount:Object.keys(u).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(l),pending:Object.keys(u),toLoadLanguages:Object.keys(d),toLoadNamespaces:Object.keys(f)}}loaded(t,s,i){const o=t.split("|"),l=o[0],u=o[1];s&&this.emit("failedLoading",l,u,s),!s&&i&&this.store.addResourceBundle(l,u,i,void 0,void 0,{skipCopy:!0}),this.state[t]=s?-1:2,s&&i&&(this.state[t]=0);const d={};this.queue.forEach(f=>{GL(f.loaded,[l],u),o5(f,t),s&&f.errors.push(s),f.pendingCount===0&&!f.done&&(Object.keys(f.loaded).forEach(g=>{d[g]||(d[g]={});const m=f.loaded[g];m.length&&m.forEach(h=>{d[g][h]===void 0&&(d[g][h]=!0)})}),f.done=!0,f.errors.length?f.callback(f.errors):f.callback())}),this.emit("loaded",d),this.queue=this.queue.filter(f=>!f.done)}read(t,s,i,o=0,l=this.retryTimeout,u){if(!t.length)return u(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:s,fcName:i,tried:o,wait:l,callback:u});return}this.readingCalls++;const d=(g,m)=>{if(this.readingCalls--,this.waitingReads.length>0){const h=this.waitingReads.shift();this.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(g&&m&&o<this.maxRetries){setTimeout(()=>{this.read(t,s,i,o+1,l*2,u)},l);return}u(g,m)},f=this.backend[i].bind(this.backend);if(f.length===2){try{const g=f(t,s);g&&typeof g.then=="function"?g.then(m=>d(null,m)).catch(d):d(null,g)}catch(g){d(g)}return}return f(t,s,d)}prepareLoading(t,s,i={},o){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();Tt(t)&&(t=this.languageUtils.toResolveHierarchy(t)),Tt(s)&&(s=[s]);const l=this.queueLoad(t,s,i,o);if(!l.toLoad.length)return l.pending.length||o(),null;l.toLoad.forEach(u=>{this.loadOne(u)})}load(t,s,i){this.prepareLoading(t,s,{},i)}reload(t,s,i){this.prepareLoading(t,s,{reload:!0},i)}loadOne(t,s=""){const i=t.split("|"),o=i[0],l=i[1];this.read(o,l,"read",void 0,void 0,(u,d)=>{u&&this.logger.warn(`${s}loading namespace ${l} for language ${o} failed`,u),!u&&d&&this.logger.log(`${s}loaded namespace ${l} for language ${o}`,d),this.loaded(t,u,d)})}saveMissing(t,s,i,o,l,u={},d=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(s)){this.logger.warn(`did not save key "${i}" as the namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(i==null||i==="")){if(this.backend?.create){const f={...u,isUpdate:l},g=this.backend.create.bind(this.backend);if(g.length<6)try{let m;g.length===5?m=g(t,s,i,o,f):m=g(t,s,i,o),m&&typeof m.then=="function"?m.then(h=>d(null,h)).catch(d):d(null,m)}catch(m){d(m)}else g(t,s,i,o,d,f)}!t||!t[0]||this.store.addResource(t[0],s,i,o)}}}const yy=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),Tt(e[1])&&(t.defaultValue=e[1]),Tt(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const s=e[3]||e[2];Object.keys(s).forEach(i=>{t[i]=s[i]})}return t},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),AE=e=>(Tt(e.ns)&&(e.ns=[e.ns]),Tt(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Tt(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),ch=()=>{},c5=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(s=>{typeof e[s]=="function"&&(e[s]=e[s].bind(e))})};class Nu extends eg{constructor(t={},s){if(super(),this.options=AE(t),this.services={},this.logger=vi,this.modules={external:[]},c5(this),s&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,s),this;setTimeout(()=>{this.init(t,s)},0)}}init(t={},s){this.isInitializing=!0,typeof t=="function"&&(s=t,t={}),t.defaultNS==null&&t.ns&&(Tt(t.ns)?t.defaultNS=t.ns:t.ns.includes("translation")||(t.defaultNS=t.ns[0]));const i=yy();this.options={...i,...this.options,...AE(t)},this.options.interpolation={...i.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=i.overloadTranslationOptionHandler);const o=g=>g?typeof g=="function"?new g:g:null;if(!this.options.isClone){this.modules.logger?vi.init(o(this.modules.logger),this.options):vi.init(null,this.options);let g;this.modules.formatter?g=this.modules.formatter:g=a5;const m=new EE(this.options);this.store=new wE(this.options.resources,this.options);const h=this.services;h.logger=vi,h.resourceStore=this.store,h.languageUtils=m,h.pluralResolver=new r5(m,{prepend:this.options.pluralSeparator}),g&&(h.formatter=o(g),h.formatter.init&&h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new kE(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new l5(o(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",(x,...S)=>{this.emit(x,...S)}),this.modules.languageDetector&&(h.languageDetector=o(this.modules.languageDetector),h.languageDetector.init&&h.languageDetector.init(h,this.options.detection,this.options)),this.modules.i18nFormat&&(h.i18nFormat=o(this.modules.i18nFormat),h.i18nFormat.init&&h.i18nFormat.init(this)),this.translator=new sp(this.services,this.options),this.translator.on("*",(x,...S)=>{this.emit(x,...S)}),this.modules.external.forEach(x=>{x.init&&x.init(this)})}if(this.format=this.options.interpolation.format,s||(s=ch),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const g=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);g.length>0&&g[0]!=="dev"&&(this.options.lng=g[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(g=>{this[g]=(...m)=>this.store[g](...m)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(g=>{this[g]=(...m)=>(this.store[g](...m),this)});const d=vu(),f=()=>{const g=(m,h)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),d.resolve(h),s(m,h)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return g(null,this.t.bind(this));this.changeLanguage(this.options.lng,g)};return this.options.resources||!this.options.initAsync?f():setTimeout(f,0),d}loadResources(t,s=ch){let i=s;const o=Tt(t)?t:this.language;if(typeof t=="function"&&(i=t),!this.options.resources||this.options.partialBundledLanguages){if(o?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const l=[],u=d=>{if(!d||d==="cimode")return;this.services.languageUtils.toResolveHierarchy(d).forEach(g=>{g!=="cimode"&&(l.includes(g)||l.push(g))})};o?u(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(f=>u(f)),this.options.preload?.forEach?.(d=>u(d)),this.services.backendConnector.load(l,this.options.ns,d=>{!d&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(d)})}else i(null)}reloadResources(t,s,i){const o=vu();return typeof t=="function"&&(i=t,t=void 0),typeof s=="function"&&(i=s,s=void 0),t||(t=this.languages),s||(s=this.options.ns),i||(i=ch),this.services.backendConnector.reload(t,s,l=>{o.resolve(),i(l)}),o}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&kk.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!["cimode","dev"].includes(t)){for(let s=0;s<this.languages.length;s++){const i=this.languages[s];if(!["cimode","dev"].includes(i)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}!this.resolvedLanguage&&!this.languages.includes(t)&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,s){this.isLanguageChangingTo=t;const i=vu();this.emit("languageChanging",t);const o=d=>{this.language=d,this.languages=this.services.languageUtils.toResolveHierarchy(d),this.resolvedLanguage=void 0,this.setResolvedLanguage(d)},l=(d,f)=>{f?this.isLanguageChangingTo===t&&(o(f),this.translator.changeLanguage(f),this.isLanguageChangingTo=void 0,this.emit("languageChanged",f),this.logger.log("languageChanged",f)):this.isLanguageChangingTo=void 0,i.resolve((...g)=>this.t(...g)),s&&s(d,(...g)=>this.t(...g))},u=d=>{!t&&!d&&this.services.languageDetector&&(d=[]);const f=Tt(d)?d:d&&d[0],g=this.store.hasLanguageSomeTranslations(f)?f:this.services.languageUtils.getBestMatchFromCodes(Tt(d)?[d]:d);g&&(this.language||o(g),this.translator.language||this.translator.changeLanguage(g),this.services.languageDetector?.cacheUserLanguage?.(g)),this.loadResources(g,m=>{l(m,g)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(u):this.services.languageDetector.detect(u):u(t),i}getFixedT(t,s,i,o){const l=o?.scopeNs,u=(d,f,...g)=>{let m;typeof f!="object"?m=this.options.overloadTranslationOptionHandler([d,f].concat(g)):m={...f},m.lng=m.lng||u.lng,m.lngs=m.lngs||u.lngs;const h=m.ns!==void 0&&m.ns!==null;m.ns=m.ns||u.ns,m.keyPrefix!==""&&(m.keyPrefix=m.keyPrefix||i||u.keyPrefix);const x={...this.options,...m};Array.isArray(l)&&!h&&(x.ns=l),typeof m.keyPrefix=="function"&&(m.keyPrefix=Fa(m.keyPrefix,x));const S=this.options.keySeparator||".";let w;return m.keyPrefix&&Array.isArray(d)?w=d.map(C=>(typeof C=="function"&&(C=Fa(C,x)),`${m.keyPrefix}${S}${C}`)):(typeof d=="function"&&(d=Fa(d,x)),w=m.keyPrefix?`${m.keyPrefix}${S}${d}`:d),this.t(w,m)};return Tt(t)?u.lng=t:u.lngs=t,u.ns=s,u.keyPrefix=i,u}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,s={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const i=s.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,l=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const u=(g,m)=>{const h=this.services.backendConnector.state[`${g}|${m}`];return h===-1||h===0||h===2};if(s.precheck){const g=s.precheck(this,u);if(g!==void 0)return g}if(this.hasResourceBundle(i,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages)return!0;const{languageUtils:d}=this.services,f=s.lng?d.isSupportedCode(i)&&d.toResolveHierarchy(i,!1)[0]:i;return!!((!f||u(f,t))&&(!o||u(l,t)))}loadNamespaces(t,s){const i=vu();return this.options.ns?(Tt(t)&&(t=[t]),t.forEach(o=>{this.options.ns.includes(o)||this.options.ns.push(o)}),this.loadResources(o=>{i.resolve(),s&&s(o)}),i):(s&&s(),Promise.resolve())}loadLanguages(t,s){const i=vu();Tt(t)&&(t=[t]);const o=this.options.preload||[],l=t.filter(u=>!o.includes(u)&&this.services.languageUtils.isSupportedCode(u));return l.length?(this.options.preload=o.concat(l),this.loadResources(u=>{i.resolve(),s&&s(u)}),i):(s&&s(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";try{const o=new Intl.Locale(t);if(o&&o.getTextInfo){const l=o.getTextInfo();if(l&&l.direction)return l.direction}}catch{}const s=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],i=this.services?.languageUtils||new EE(yy());return t.toLowerCase().indexOf("-latn")>1?"ltr":s.includes(i.getLanguagePartFromCode(t))||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},s){const i=new Nu(t,s);return i.createInstance=Nu.createInstance,i}cloneInstance(t={},s=ch){const i=t.forkResourceStore;i&&delete t.forkResourceStore;const o={...this.options,preload:!1,...t,isClone:!0},l=new Nu(o);if((t.debug!==void 0||t.prefix!==void 0)&&(l.logger=l.logger.clone(t)),["store","services","language"].forEach(d=>{l[d]=this[d]}),l.services={...this.services},l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},i){const d=g=>{const m=Array.isArray(g)?[...g]:{...g};return Object.keys(m).forEach(h=>{m[h]&&typeof m[h]=="object"&&(m[h]=d(m[h]))}),m},f=d(this.store.data);l.store=new wE(f,o),l.services.resourceStore=l.store}if(t.interpolation){const f={...yy().interpolation,...this.options.interpolation,...t.interpolation},g={...o,interpolation:f};l.services.interpolator=new kE(g)}return l.translator=new sp(l.services,o),l.translator.on("*",(d,...f)=>{l.emit(d,...f)}),l.init(o,s),l.translator.options=o,l.translator.backendConnector.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const pr=Nu.createInstance();pr.createInstance;pr.dir;pr.init;pr.loadResources;pr.reloadResources;pr.use;pr.changeLanguage;pr.getFixedT;pr.t;pr.exists;pr.setDefaultNamespace;pr.hasLoadedNamespace;pr.loadNamespaces;pr.loadLanguages;const u5={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,"!doctype":!0,"!DOCTYPE":!0},d5=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?("[^"]*"|'[^']*')/g;function ME(e){const t={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},s=e.match(/<\/?([^\s]+?)[/\s>]/);if(s&&(t.name=s[1],(u5[s[1]]||e.charAt(e.length-2)==="/")&&(t.voidElement=!0),t.name.startsWith("!--"))){const l=e.indexOf("-->");return{type:"comment",comment:l!==-1?e.slice(4,l):""}}const i=new RegExp(d5);let o=null;for(;o=i.exec(e),o!==null;)if(o[0].trim())if(o[1]){const l=o[1].trim();let u=[l,null];const d=l.indexOf("=");d>-1&&(u=[l.slice(0,d),l.slice(d+1)]),t.attrs[u[0]]=u[1],i.lastIndex--}else o[2]&&(t.attrs[o[2]]=o[3].trim().substring(1,o[3].length-1));return t}const uh=/<!--[\s\S]*?-->|<[a-zA-Z0-9\-!/](?:"[^"]*"|'[^']*'|[^'">])*>/g,f5=/<\/?([^\s]+?)[/\s>]/,h5=/^\s*$/,p5=/^(script|style)$/i,Eu="\0",g5=Object.create(null);function Ak(e){e.forEach(function(t){if(t.type==="text"){t.content=t.content.split(Eu).join("<");return}if(t.type==="comment"){t.comment=t.comment.split(Eu).join("<");return}for(const s in t.attrs){const i=t.attrs[s];typeof i=="string"&&i.indexOf(Eu)>-1&&(t.attrs[s]=i.split(Eu).join("<"))}t.children.length&&Ak(t.children)})}function m5(e,t){const s=t&&t.components||g5,i=t&&t.allowedTags;let o=!1;if(i){const w=typeof i=="function"?i:function(O){return i.indexOf(O)>-1};let C="",E=0;uh.lastIndex=0;let R;for(;R=uh.exec(e);){const O=R[0];C+=e.slice(E,R.index);const T=O.match(f5);O.startsWith("<!--")||T&&w(T[1])?(C+=O,E=R.index+O.length):(o=!0,C+=Eu,E=R.index+1,uh.lastIndex=E)}e=C+e.slice(E)}const l=[],u=[];let d,f=-1,g=!1,m=0,h;if(e.indexOf("<")!==0){const w=e.indexOf("<");l.push({type:"text",content:w===-1?e:e.substring(0,w)})}const x=[];let S;for(;S=uh.exec(e);)x.push(S);return x.forEach(function(w,C){const E=w[0];if(!E||E.startsWith("<!--"))return;let R=0,O=0,T=-1,A=null;for(let j=0;j<E.length;j++){const D=E.charAt(j);A?D===A&&(A=null):D==='"'||D==="'"?A=D:D==="<"?(R++,R===2&&(T=j)):D===">"&&O++}const N=T>-1&&/[a-zA-Z0-9\-!/]/.test(E.charAt(T+1));if(R>O&&N){const j=E.substring(0,T),D=E.substring(j.length);x[C][0]=D,x[C].index+=j.length}}),x.forEach(function(w,C){const E=w[0];if(!E)return;const R=w.index;if(R<m)return;if(g){if(E!=="</"+d.name+">")return;g=!1}const O=E.charAt(1)!=="/",T=E.startsWith("<!--"),A=R+E.length,N=e.charAt(A),j=x[C+1];let D;if(N==="<"&&j){const z=e.substring(A,j.index);D=z.split("<").length>z.split(">").length}let M;if(T){const z=ME(E);if(f<0)return l.push(z),l;M=u[f],M.children.push(z);const L=e.slice(A,j?j.index:void 0);return L.length>0&&M.children.push({type:"text",content:L}),l}if(O){f++,d=ME(E),d.type==="tag"&&s[d.name]&&(d.type="component",g=!0);let z=!1;if(!g&&!d.voidElement&&p5.test(d.name)){z=!0,h||(h=e.toLowerCase());const L=h.indexOf("</"+d.name.toLowerCase()+">",A),K=L===-1?e.length:L,X=e.slice(A,K);X&&d.children.push({type:"text",content:X}),m=K}!d.voidElement&&!g&&!z&&N&&N!=="<"&&d.children.push({type:"text",content:e.slice(A,j?j.index:void 0)}),f===0&&l.push(d),M=u[f-1],M&&M.children.push(d),u[f]=d}if((!O||d.voidElement)&&(f>-1&&(d.voidElement||d.name===E.slice(2,-1))&&(f--,d=f===-1?l:u[f]),!g&&(N!=="<"||D)&&N)){M=f===-1?l:u[f].children;const z=j?j.index:-1;let L=e.slice(A,z===-1?void 0:z);h5.test(L)&&(L=" "),(z>-1&&f+M.length>=0||L!==" ")&&M.push({type:"text",content:L})}}),o&&Ak(l),l}function y5(e){const t=[];for(const s in e)e[s]===null?t.push(s):t.push(s+'="'+String(e[s]).replace(/"/g,"&quot;")+'"');return t.length?" "+t.join(" "):""}function Mk(e,t){switch(t.type){case"text":return e+t.content;case"tag":{const s=t.voidElement&&t.name.toLowerCase()!=="!doctype"?"/>":">";return e+="<"+t.name+(t.attrs?y5(t.attrs):"")+s,t.voidElement?e:e+t.children.reduce(Mk,"")+"</"+t.name+">"}case"comment":return e+="<!--"+t.comment+"-->",e}}function v5(e){return e.reduce(function(t,s){return t+Mk("",s)},"")}var b5={parse:m5,stringify:v5};const Ah=(e,t,s,i)=>{const o=[s,{code:t,...i||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(o,"warn","react-i18next::",!0);Jr(o[0])&&(o[0]=`react-i18next:: ${o[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...o):console?.warn&&console.warn(...o)},NE={},Zl=(e,t,s,i)=>{Jr(s)&&NE[s]||(Jr(s)&&(NE[s]=new Date),Ah(e,t,s,i))},Nk=(e,t)=>()=>{if(e.isInitialized)t();else{const s=()=>{setTimeout(()=>{e.off("initialized",s)},0),t()};e.on("initialized",s)}},$y=(e,t,s)=>{e.loadNamespaces(t,Nk(e,s))},DE=(e,t,s,i)=>{if(Jr(s)&&(s=[s]),e.options.preload&&e.options.preload.indexOf(t)>-1)return $y(e,s,i);s.forEach(o=>{e.options.ns.indexOf(o)<0&&e.options.ns.push(o)}),e.loadLanguages(t,Nk(e,i))},x5=(e,t,s={})=>!t.languages||!t.languages.length?(Zl(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:s.lng,precheck:(i,o)=>{if(s.bindI18n&&s.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!o(i.isLanguageChangingTo,e))return!1}}),Jr=e=>typeof e=="string",yi=e=>typeof e=="object"&&e!==null,S5=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,w5={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},E5=e=>w5[e],Dk=e=>e.replace(S5,E5);let Qy={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Dk,transDefaultProps:void 0};const R5=(e={})=>{Qy={...Qy,...e}},db=()=>Qy;let jk;const C5=e=>{jk=e},fb=()=>jk,Mh=(e,t)=>{if(!e)return!1;const s=e.props?.children??e.children;return t?s.length>0:!!s},Ru=e=>{if(!e)return[];const t=e.props?.children??e.children;return e.props?.i18nIsDynamicList?Gi(t):t},T5=e=>Gi(e).every(b.isValidElement),Gi=e=>Array.isArray(e)?e:[e],k5=(e,t)=>{const s={...t};return s.props={...t.props,...e.props},s},O5=e=>{const t={};if(!e)return t;const s=i=>{Gi(i).forEach(l=>{Jr(l)||(Mh(l)?s(Ru(l)):yi(l)&&!b.isValidElement(l)&&Object.assign(t,l))})};return s(e),t},Xy=(e,t,s,i)=>{if(!e)return"";let o="";const l=Gi(e),u=t?.transSupportBasicHtmlNodes?t.transKeepBasicHtmlNodesFor??[]:[];return l.forEach((d,f)=>{if(Jr(d)){o+=`${d}`;return}if(b.isValidElement(d)){const{props:g,type:m}=d,h=Object.keys(g).length,x=u.indexOf(m)>-1,S=g.children;if(!S&&x&&!h){o+=`<${m}/>`;return}if(!S&&(!x||h)||g.i18nIsDynamicList){o+=`<${f}></${f}>`;return}if(x&&h<=1){const C=Jr(S)?S:Xy(S,t,s,i);o+=`<${m}>${C}</${m}>`;return}const w=Xy(S,t,s,i);o+=`<${f}>${w}</${f}>`;return}if(d===null){Ah(s,"TRANS_NULL_VALUE","Passed in a null value as child",{i18nKey:i});return}if(yi(d)){const{format:g,...m}=d,h=Object.keys(m);if(h.length===1){const x=g?`${h[0]}, ${g}`:h[0];o+=`{{${x}}}`;return}if(!h.length&&Object.keys(d).length===1&&"format"in d){o+="{{format}}";return}Ah(s,"TRANS_INVALID_OBJ","Invalid child - Object should only have keys {{ value, format }} (format is optional).",{i18nKey:i,child:d});return}Ah(s,"TRANS_INVALID_VAR","Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.",{i18nKey:i,child:d})}),o},A5=(e,t,s,i,o,l,u)=>{if(s==="")return[];const d=o.transKeepBasicHtmlNodesFor||[],f=s&&new RegExp(d.map(T=>`<${T}`).join("|")).test(s);if(!e&&!t&&!f&&!u)return[s];const g=t??{},m=T=>{Gi(T).forEach(N=>{Jr(N)||(Mh(N)?m(Ru(N)):yi(N)&&!b.isValidElement(N)&&Object.assign(g,N))})};m(e);const h=Object.keys(g),x=T=>/^\d+$/.test(T)||d.indexOf(T)>-1||h.indexOf(T)>-1,S=b5.parse(`<0>${s}</0>`,{allowedTags:x}),w={...g,...l},C=(T,A,N)=>{const j=Ru(T),D=R(j,A.children,N);return T5(j)&&D.length===0||T.props?.i18nIsDynamicList?j:D},E=(T,A,N,j,D)=>{T.dummy?(T.children=A,N.push(b.cloneElement(T,{key:j},D?void 0:A))):N.push(...b.Children.map([T],M=>{if(M.type===b.Fragment||M.props?.i18nIsDynamicList!==void 0){const L={key:j};return M&&M.props&&Object.keys(M.props).forEach(K=>{K==="children"||K==="i18nIsDynamicList"||(L[K]=M.props[K])}),b.createElement(M.type,L,D?null:A)}const z={key:j};return M&&M.props&&Object.keys(M.props).forEach(L=>{L==="ref"||L==="children"||(z[L]=M.props[L])}),b.cloneElement(M,z,D?null:A)}))},R=(T,A,N)=>{const j=Gi(T),D=Gi(A),M={};return D.reduce((z,L,K)=>{const X=L.children?.[0]?.content&&i.services.interpolator.interpolate(L.children[0].content,w,i.language);if(L.type==="tag"){let B=j[parseInt(L.name,10)];!B&&t&&(B=t[L.name]),N.length===1&&!B&&yi(N[0])&&(B=N[0][L.name]),B||(B={});const H={...L.attrs};u&&Object.keys(H).forEach(Y=>{const ee=H[Y];Jr(ee)&&(H[Y]=Dk(ee))});const U=Object.keys(H).length!==0?k5({props:H},B):B,_=b.isValidElement(U),Q=_&&Mh(L,!0)&&!L.voidElement,$=f&&yi(U)&&U.dummy&&!_,q=yi(t)&&Object.hasOwnProperty.call(t,L.name);if(Jr(U)){const Y=i.services.interpolator.interpolate(U,w,i.language);z.push(Y)}else if(Mh(U)||Q){const Y=C(U,L,N);E(U,Y,z,K)}else if($){const Y=R(j,L.children,N);E(U,Y,z,K)}else if(Number.isNaN(parseFloat(L.name)))if(q){const Y=C(U,L,N);E(U,Y,z,K,L.voidElement)}else if(o.transSupportBasicHtmlNodes&&d.indexOf(L.name)>-1)if(L.voidElement)z.push(b.createElement(L.name,{key:`${L.name}-${K}`}));else{const Y=M[L.name]||0;M[L.name]=Y+1;let ee,G=0;for(let F=0;F<j.length;F+=1){const Z=j[F];if(b.isValidElement(Z)&&Z.type===L.name){if(G===Y){ee=Z;break}G+=1}}const ae=ee?Gi(Ru(ee)):j,I=R(ae,L.children,N);z.push(b.createElement(L.name,{key:`${L.name}-${K}`},I))}else if(L.voidElement)z.push(`<${L.name} />`);else{const Y=R(j,L.children,N);z.push(`<${L.name}>${Y}</${L.name}>`)}else if(yi(U)&&!_){const Y=L.children[0]?X:null;Y&&z.push(Y)}else E(U,X,z,K,L.children.length!==1||!X)}else if(L.type==="text"){const B=o.transWrapTextNodes,H=typeof o.unescape=="function"?o.unescape:db().unescape,U=u?H(i.services.interpolator.interpolate(L.content,w,i.language)):i.services.interpolator.interpolate(L.content,w,i.language);B?z.push(b.createElement(B,{key:`${L.name}-${K}`},U)):z.push(U)}return z},[])},O=R([{dummy:!0,children:e||[]}],S,Gi(e||[]));return Ru(O[0])},Ik=(e,t,s)=>{const i=e.key||t,o=b.cloneElement(e,{key:i});if(!o.props||!o.props.children||s.indexOf(`${t}/>`)<0&&s.indexOf(`${t} />`)<0)return o;function l(){return b.createElement(b.Fragment,null,o)}return b.createElement(l,{key:i})},M5=(e,t)=>e.map((s,i)=>Ik(s,i,t)),N5=(e,t)=>{const s={};return Object.keys(e).forEach(i=>{Object.assign(s,{[i]:Ik(e[i],i,t)})}),s},D5=(e,t,s,i)=>e?Array.isArray(e)?M5(e,t):yi(e)?N5(e,t):(Zl(s,"TRANS_INVALID_COMPONENTS",'<Trans /> "components" prop expects an object or array',{i18nKey:i}),null):null,j5=e=>!yi(e)||Array.isArray(e)?!1:Object.keys(e).reduce((t,s)=>t&&Number.isNaN(Number.parseFloat(s)),!0);function I5({children:e,count:t,parent:s,i18nKey:i,context:o,tOptions:l={},values:u,defaults:d,components:f,ns:g,i18n:m,t:h,shouldUnescape:x,...S}){const w=m||fb();if(!w)return Zl(w,"NO_I18NEXT_INSTANCE","Trans: You need to pass in an i18next instance using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.",{i18nKey:i}),e;const C=h||w.t.bind(w)||(ee=>ee),E={...db(),...w.options?.react};let R=g||(C.ns?void 0:w.options?.defaultNS||"translation");Jr(R)&&(R=[R]);const{transDefaultProps:O}=E,T=O?.tOptions?{...O.tOptions,...l}:l,A=x??O?.shouldUnescape,N=O?.values?{...O.values,...u}:u,j=O?.components?{...O.components,...f}:f,D=Xy(e,E,w,i),M=Array.isArray(i)?i[i.length-1]:i,z=d||T?.defaultValue||D||E.transEmptyNodeValue||(typeof M=="function"?Fa(M):M),{hashTransKey:L}=E,K=i||(L?L(D||z):D||z);w.options?.interpolation?.defaultVariables?u={...w.options.interpolation.defaultVariables,...N}:u=N;const X=O5(e);X&&typeof X.count=="number"&&t===void 0&&(t=X.count),t===void 0&&(t=T?.count);const B=u||t!==void 0&&!w.options?.interpolation?.alwaysFormat||!e?T.interpolation:{interpolation:{...T.interpolation,prefix:"#$?",suffix:"?$#"}},H={...T,context:o||T.context,count:t,...u,...B,defaultValue:z,ns:R};let U=K?C(K,H):z;U===K&&z&&(U=z);const _=D5(j,U,w,i);let Q=_||e,$=null;j5(_)?($=_,Q=e):_&&!Array.isArray(_)&&($=_,Q=void 0);const q=A5(Q,$,U,w,E,H,A),Y=s??E.defaultTransParent;return Y?b.createElement(Y,S,q):q}const P5={type:"3rdParty",init(e){R5(e.options.react),C5(e)}},Pk=b.createContext();class L5{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(s=>{this.usedNamespaces[s]||(this.usedNamespaces[s]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}function tg({children:e,count:t,parent:s,i18nKey:i,context:o,tOptions:l={},values:u,defaults:d,components:f,ns:g,i18n:m,t:h,shouldUnescape:x,...S}){const{i18n:w,defaultNS:C}=b.useContext(Pk)||{},E=m||w||fb(),R=h||E?.t.bind(E);return I5({children:e,count:t,parent:s,i18nKey:i,context:o,tOptions:l,values:u,defaults:d,components:f,ns:g||(R?.ns?void 0:C||E?.options?.defaultNS),i18n:E,t:h,shouldUnescape:x,...S})}const z5=(e,t)=>{if(Jr(t))return t;if(yi(t)&&Jr(t.defaultValue))return t.defaultValue;if(typeof e=="function")return"";if(Array.isArray(e)){const s=e[e.length-1];return typeof s=="function"?"":s}return e},_5={t:z5,ready:!1},U5=()=>()=>{},pt=(e,t={})=>{const{i18n:s}=t,{i18n:i,defaultNS:o}=b.useContext(Pk)||{},l=s||i||fb();l&&!l.reportNamespaces&&(l.reportNamespaces=new L5),l||Zl(l,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.");const u=b.useMemo(()=>({...db(),...l?.options?.react,...t}),[l,t]),{useSuspense:d,keyPrefix:f,bindI18n:g,bindI18nStore:m}=u,h=o||l?.options?.defaultNS,x=Jr(h)?[h]:h||["translation"],S=JSON.stringify(x),w=b.useMemo(()=>x,[S]);l?.reportNamespaces?.addUsedNamespaces?.(w);const C=b.useRef(0),E=b.useCallback(H=>{if(!l)return U5;const U=()=>{C.current+=1,H()};return g&&l.on(g,U),m&&l.store.on(m,U),()=>{g&&g.split(" ").forEach(_=>l.off(_,U)),m&&m.split(" ").forEach(_=>l.store.off(_,U))}},[l,g,m]),R=b.useRef(),O=b.useCallback(()=>{if(!l)return _5;const H=!!(l.isInitialized||l.initializedStoreOnce)&&w.every(ee=>x5(ee,l,u)),U=t.lng||l.language,_=C.current,Q=typeof f=="function"?Fa(f,{...l.options,ns:w}):f,$=R.current;if($&&$.i18n===l&&$.ready===H&&$.lng===U&&$.namespaces===w&&$.keyPrefix===Q&&$.revision===_)return $;const Y={t:l.getFixedT(U,u.nsMode==="fallback"?w:w[0],f,{scopeNs:w}),i18n:l,ready:H,lng:U,namespaces:w,keyPrefix:Q,revision:_};return R.current=Y,Y},[l,w,f,u,t.lng]),[T,A]=b.useState(0);let{t:N,ready:j}=Kp.useSyncExternalStore(E,O,O),D;l&&d&&!j&&(D=new Promise(H=>{const U=()=>H();t.lng?DE(l,t.lng,w,U):$y(l,w,U)}),{t:N,ready:j}=O()),b.useEffect(()=>{if(l&&!j&&!d){const H=()=>A(U=>U+1);t.lng?DE(l,t.lng,w,H):$y(l,w,H)}},[l,t.lng,w,j,d,T]);const M=l||{},z=b.useRef(null),L=b.useRef(),K=H=>`${H.language}|${H.resolvedLanguage}|${H.languages?.join(",")}`,X=H=>{const U=Object.getOwnPropertyDescriptors(H);U.__original&&delete U.__original;const _=Object.create(Object.getPrototypeOf(H),U);if(!Object.prototype.hasOwnProperty.call(_,"__original"))try{Object.defineProperty(_,"__original",{value:H,writable:!1,enumerable:!1,configurable:!1})}catch{}return _},B=b.useMemo(()=>{const H=M,U=H&&K(H);let _=H;H&&(z.current&&z.current.__original===H?L.current!==U?(_=X(H),z.current=_,L.current=U):_=z.current:(_=X(H),z.current=_,L.current=U));const Q=!j&&!d?(...q)=>(Zl(l,"USE_T_BEFORE_READY","useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."),N(...q)):N,$=[Q,_,j];return $.t=Q,$.i18n=_,$.ready=j,$},[N,M,j,M.resolvedLanguage,M.language,M.languages]);if(l&&d&&!j){let H=!1;try{H=!1}catch{}throw H&&Zl(l,"SUSPENDED_WHILE_LOADING","useTranslation: suspended while translations are loading (useSuspense is true by default). Add a <Suspense> boundary above this component, or set react.useSuspense: false in the i18next init options. https://react.i18next.com/latest/usetranslation-hook"),D}return B};function Lk(e){var t,s,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(s=Lk(e[t]))&&(i&&(i+=" "),i+=s)}else for(s in e)e[s]&&(i&&(i+=" "),i+=s);return i}function H5(){for(var e,t,s=0,i="",o=arguments.length;s<o;s++)(e=arguments[s])&&(t=Lk(e))&&(i&&(i+=" "),i+=t);return i}const jE=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,IE=H5,Bo=(e,t)=>s=>{var i;if(t?.variants==null)return IE(e,s?.class,s?.className);const{variants:o,defaultVariants:l}=t,u=Object.keys(o).map(g=>{const m=s?.[g],h=l?.[g];if(m===null)return null;const x=jE(m)||jE(h);return o[g][x]}),d=s&&Object.entries(s).reduce((g,m)=>{let[h,x]=m;return x===void 0||(g[h]=x),g},{}),f=t==null||(i=t.compoundVariants)===null||i===void 0?void 0:i.reduce((g,m)=>{let{class:h,className:x,...S}=m;return Object.entries(S).every(w=>{let[C,E]=w;return Array.isArray(E)?E.includes({...l,...d}[C]):{...l,...d}[C]===E})?[...g,h,x]:g},[]);return IE(e,u,f,s?.class,s?.className)},zk=b.createContext(void 0);function ng(e=!1){const t=b.useContext(zk);if(t===void 0&&!e)throw new Error(cn(16));return t}function F5(e){const{focusableWhenDisabled:t,disabled:s,composite:i=!1,tabIndex:o=0,isNativeButton:l}=e,u=i&&t!==!1,d=i&&t===!1;return{props:b.useMemo(()=>{const g={onKeyDown(m){s&&t&&m.key!=="Tab"&&m.preventDefault()}};return i||(g.tabIndex=o,!l&&s&&(g.tabIndex=t?o:-1)),(l&&(t||u)||!l&&s)&&(g["aria-disabled"]=s),l&&(!t||d)&&(g.disabled=s),g},[i,s,t,u,d,l,o])}}function Io(e,t,{detail:s=0,pointerType:i=""}={}){e.dispatchEvent(new(Rn(e)).PointerEvent("click",{bubbles:!0,cancelable:!0,composed:!0,detail:s,pointerType:i,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function ns(e={}){const{disabled:t=!1,focusableWhenDisabled:s,tabIndex:i=0,native:o=!0,composite:l}=e,u=b.useRef(null),d=ng(!0),f=l??d!==void 0,{props:g}=F5({focusableWhenDisabled:s,disabled:t,composite:f,tabIndex:i,isNativeButton:o}),m=b.useCallback(()=>{const S=u.current;vy(S)&&f&&t&&g.disabled===void 0&&S.disabled&&(S.disabled=!1)},[t,g.disabled,f]);Pe(m,[m]);const h=b.useCallback((S={})=>{const{onClick:w,onMouseDown:C,onKeyUp:E,onKeyDown:R,onPointerDown:O,...T}=S;return Dr({onClick(A){if(t){A.preventDefault();return}w?.(A)},onMouseDown(A){t||C?.(A)},onKeyDown(A){if(t||(Gh(A),R?.(A),A.baseUIHandlerPrevented))return;const N=A.target===A.currentTarget,j=A.currentTarget,D=vy(j),M=!o&&B5(j),z=N&&(o?D:!M),L=A.key==="Enter",K=A.key===" ",X=j.getAttribute("role"),B=X?.startsWith("menuitem")||X==="option"||X==="gridcell";if(N&&f&&K){if(A.defaultPrevented&&B)return;A.preventDefault(),(!o||D)&&(A.preventBaseUIHandler(),Io(j,A));return}if(!z||o||!K&&!L){N&&M&&K&&A.preventDefault();return}A.defaultPrevented||(A.preventDefault(),L&&(A.preventBaseUIHandler(),Io(j,A)))},onKeyUp(A){if(!t){if(Gh(A),E?.(A),A.target===A.currentTarget&&o&&f&&vy(A.currentTarget)&&A.key===" "){A.preventDefault();return}A.baseUIHandlerPrevented||A.target===A.currentTarget&&!o&&!f&&!A.defaultPrevented&&A.key===" "&&(A.preventBaseUIHandler(),Io(A.currentTarget,A))}},onPointerDown(A){if(t){A.preventDefault();return}O?.(A)}},o?{type:"button"}:{role:"button"},g,T)},[t,g,f,o]),x=Be(S=>{u.current=S,m()});return{getButtonProps:h,buttonRef:x}}function vy(e){return bn(e)&&e.tagName==="BUTTON"}function B5(e){return bn(e)&&e.tagName==="A"&&!!e.href}const V5=b.forwardRef(function(t,s){const{render:i,className:o,disabled:l=!1,focusableWhenDisabled:u=!1,nativeButton:d=!0,style:f,...g}=t,{getButtonProps:m,buttonRef:h}=ns({disabled:l,focusableWhenDisabled:u,native:d});return bt("button",t,{state:{disabled:l},ref:[s,h],props:[g,m]})}),_k=Bo("group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-xs/relaxed font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border hover:bg-input/50 hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:bg-input/30",secondary:"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-7 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",xs:"h-5 gap-1 rounded-sm px-2 text-[0.625rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-2.5",sm:"h-6 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",lg:"h-8 gap-1 px-2.5 text-xs/relaxed has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-4",icon:"size-7 [&_svg:not([class*='size-'])]:size-3.5","icon-xs":"size-5 rounded-sm [&_svg:not([class*='size-'])]:size-2.5","icon-sm":"size-6 [&_svg:not([class*='size-'])]:size-3","icon-lg":"size-8 [&_svg:not([class*='size-'])]:size-4"}},defaultVariants:{variant:"default",size:"default"}});function We({className:e,variant:t="default",size:s="default",...i}){return v.jsx(V5,{"data-slot":"button",className:He(_k({variant:t,size:s,className:e})),...i})}const K5=Bo("group/code-block relative flex w-full min-w-0 flex-col overflow-hidden rounded-md text-sm has-[>[data-slot=code-block-content]:focus-visible]:ring-2 has-[>[data-slot=code-block-content]:focus-visible]:ring-ring/30 data-[size=sm]:text-xs",{variants:{variant:{default:"border border-input text-foreground has-[>[data-slot=code-block-content]:focus-visible]:border-ring dark:bg-input/30",destructive:"border border-destructive/30 text-destructive dark:border-destructive/40"}},defaultVariants:{variant:"default"}});function q5({className:e,variant:t="default",size:s="default",...i}){return v.jsx("div",{"data-slot":"code-block","data-variant":t,"data-size":s,className:He(K5({variant:t}),e),...i})}function Y5({className:e,...t}){return v.jsx("div",{"data-slot":"code-block-header",className:He("flex min-w-0 shrink-0 items-center gap-2 px-3 pt-3 text-muted-foreground group-data-[size=sm]/code-block:px-2 group-data-[size=sm]/code-block:pt-2 group-data-[variant=destructive]/code-block:text-destructive *:has-[>[data-slot=code-block-title]]:min-w-0",e),...t})}function G5({className:e,...t}){return v.jsx("div",{"data-slot":"code-block-title",className:He("min-w-0 truncate font-sans text-xs font-medium text-foreground group-data-[variant=destructive]/code-block:text-destructive [&_svg]:pointer-events-none [&_svg]:inline-block [&_svg]:align-middle [&_svg:not([class*='size-'])]:size-3.5 *:[svg]:me-1.5",e),...t})}function $5({className:e,...t}){return v.jsx("div",{"data-slot":"code-block-actions",className:He("-my-1 ms-auto -me-1.5 flex shrink-0 items-center gap-1 [[data-slot=code-block]>&]:absolute [[data-slot=code-block]>&]:end-2 [[data-slot=code-block]>&]:top-2 [[data-slot=code-block]>&]:z-10 [[data-slot=code-block]>&]:m-0 [[data-slot=code-block]>&]:opacity-0 [[data-slot=code-block]>&]:transition-opacity [[data-slot=code-block]>&]:group-focus-within/code-block:opacity-100 [[data-slot=code-block]>&]:group-hover/code-block:opacity-100 group-data-[size=sm]/code-block:[[data-slot=code-block]>&]:end-1.5 group-data-[size=sm]/code-block:[[data-slot=code-block]>&]:top-1.5 [[data-slot=code-block]>&]:pointer-coarse:opacity-100 [[data-slot=code-block]>&]:*:[button]:bg-background [[data-slot=code-block]>&]:*:[button]:ring-1 [[data-slot=code-block]>&]:*:[button]:ring-foreground/10",e),...t})}function Q5({value:e,variant:t="ghost",size:s="icon-xs",className:i,onClick:o,...l}){const[u,d]=b.useState(!1);return b.useEffect(()=>{if(!u)return;const f=setTimeout(()=>d(!1),2e3);return()=>clearTimeout(f)},[u]),v.jsxs(v.Fragment,{children:[v.jsx(We,{"data-slot":"code-block-copy-button","data-copied":u||void 0,variant:t,size:s,"aria-label":u?"Copied":"Copy",className:He(i),onClick:f=>{o?.(f),navigator.clipboard.writeText(e).then(()=>d(!0)).catch(()=>{})},...l,children:u?v.jsx(dd,{}):v.jsx(IT,{})}),v.jsx("span",{"aria-live":"polite",className:"sr-only",children:u?"Copied":""})]})}function X5({className:e,children:t,style:s,wrap:i=!1,lineNumbers:o=!1,startLine:l=1,...u}){return v.jsx("pre",{"data-slot":"code-block-content","data-wrap":i||void 0,"data-numbered":o||void 0,dir:"ltr",tabIndex:0,style:{counterReset:`line ${l-1}`,...s},className:He("min-h-0 min-w-0 scroll-fade-x scrollbar-thin overflow-auto px-3 py-3 text-start font-mono leading-relaxed outline-none group-has-data-[slot=code-block-footer]/code-block:pb-2 group-has-data-[slot=code-block-header]/code-block:pt-2 group-data-[size=sm]/code-block:px-2 group-data-[size=sm]/code-block:py-2 group-data-[size=sm]/code-block:group-has-data-[slot=code-block-header]/code-block:pt-1.5 data-wrap:scroll-fade-y data-wrap:wrap-break-word data-wrap:whitespace-pre-wrap",e),...u,children:v.jsx("code",{"data-slot":"code-block-code",className:"grid min-h-lh min-w-max content-start in-data-numbered:grid-cols-[auto_1fr] in-data-wrap:min-w-0",children:o&&typeof t=="string"?t.replace(/\n$/,"").split(`
11
+ `).map((d,f)=>v.jsx(W5,{children:d},f)):t})})}const Z5=Bo("relative -mx-3 block min-h-lh px-3 group-data-[size=sm]/code-block:-mx-2 group-data-[size=sm]/code-block:px-2 before:min-w-6 before:text-end before:text-muted-foreground after:absolute after:start-1 after:top-0 after:text-muted-foreground after:select-none in-data-numbered:col-span-2 in-data-numbered:grid in-data-numbered:grid-cols-subgrid in-data-numbered:gap-x-3 in-data-numbered:[counter-increment:line] in-data-numbered:before:content-[counter(line)] in-data-numbered:before:select-none in-data-numbered:supports-[content:counter(line)_/_'']:before:content-[counter(line)_/_'']",{variants:{variant:{default:"",added:"bg-muted after:content-['+']",removed:"bg-destructive/10 after:text-destructive after:content-['−']",highlighted:"bg-muted"}},defaultVariants:{variant:"default"}});function W5({className:e,variant:t="default",children:s,...i}){const o=s==null||s===""||Array.isArray(s)&&s.length===0;return v.jsx("span",{"data-slot":"code-block-line","data-variant":t,className:He(Z5({variant:t}),e),...i,children:v.jsx("span",{"data-slot":"code-block-line-content",className:"min-w-0",children:o?`
12
+ `:s})})}const Uk=b.createContext(void 0);function fd(e){const t=b.useContext(Uk);if(t===void 0&&!e)throw new Error(cn(47));return t}const J5={...$i,disabled:e=>e.disabled,instantType:e=>e.instantType==="trigger-change"&&!$i.open(e)?void 0:e.instantType,openMethod:e=>e.openMethod,openChangeReason:e=>e.openChangeReason,isPressOpenedByTrigger:(e,t)=>e.openChangeReason===Qs&&$i.isOpenedByTrigger(e,t),isTouchPressOpen:(e,t)=>t&&e.openMethod==="touch"&&e.openChangeReason===Qs,hasTriggerFocusGuards:(e,t)=>$i.isOpenedByTrigger(e,t)&&!e.focusManagerModal,modal:e=>e.modal,titleElementId:e=>e.titleElementId,descriptionElementId:e=>e.descriptionElementId,openOnHover:e=>e.openOnHover,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin};class ez extends cc{constructor(t,s,i){const o=new ld;super(tz(t,o,s,i),nz(o),J5)}setOpen=(t,s)=>{const i=s.reason===Kn,o=s.reason===Qs&&s.event.detail===0,l=!t&&(s.reason===rd||s.reason==null),u=Up(s),d=this.select("activeTriggerId");if(!t&&s.reason===dC&&s.trigger==null&&d!=null&&(s.trigger=this.context.triggerElements.getById(d)??this.select("activeTriggerElement")??void 0),this.context.onOpenChange?.(t,s),s.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(t,s);const f=()=>{const m=_p(this.state,t,s.trigger,u());m.openChangeReason=s.reason,this.update(m)};i?(this.context.stickIfOpen=!0,this.context.stickIfOpenTimeout.start(_C,()=>{this.context.stickIfOpen=!1}),hr.flushSync(f)):f();let g;o?g="click":l?g="dismiss":s.reason===Ba&&(g="focus"),this.set("instantType",g)}}function tz(e,t,s,i=!1){const o={...qp(t,s,i),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,openOnHover:!1,closeDelay:0,adaptiveOrigin:void 0,...e};return o.open&&e?.mounted===void 0&&(o.mounted=!0),o}function nz(e){return{popupRef:b.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:b.createRef(),beforeTriggerFocusGuardRef:b.createRef(),beforeContentFocusGuardRef:b.createRef(),stickIfOpenTimeout:new zs,stickIfOpen:!0,triggerElements:e}}const PE=Wu(function({props:t}){const{children:s,open:i,defaultOpen:o=!1,onOpenChange:l,onOpenChangeComplete:u,modal:d=!1,handle:f,triggerId:g,defaultTriggerId:m=null}=t,h=sz(f,{modal:d,open:o,openProp:i,activeTriggerId:m,triggerIdProp:g});h.useControlledProp("openProp",i),h.useControlledProp("triggerIdProp",g);const x=h.useState("open"),S=h.useState("mounted"),w=h.useState("payload");h.useContextCallback("onOpenChange",l),h.useContextCallback("onOpenChangeComplete",u),ZC(h,x),Fp(h);const{forceUnmount:C}=Bp(x,h,()=>{h.context.stickIfOpen=!0,h.set("openChangeReason",null)});h.useSyncedValues({modal:d}),b.useEffect(()=>{x||h.context.stickIfOpenTimeout.clear()},[h,x]),b.useImperativeHandle(t.actionsRef,()=>({unmount:C,close:()=>h.setOpen(!1,lt(sd))}),[C,h]);const E=x||S||f!=null;return v.jsxs(Uk.Provider,{value:h,children:[f&&v.jsx(zp,{handle:f,store:h}),E&&v.jsx(iz,{store:h,modal:d}),typeof s=="function"?s({payload:w}):s]})});function rz(e){return fd(!0)?v.jsx(PE,{props:e}):v.jsx(GC,{children:v.jsx(PE,{props:e})})}function sz(e,t){const s=Qv((i,o)=>new ez(t,i,o));return b.useEffect(()=>s.context.stickIfOpenTimeout.disposeEffect(),[s]),s}function iz({store:e,modal:t}){const s=e.useState("floatingRootContext"),i=ad(s,{outsidePressEvent:{mouse:t==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),o=i.reference,l=i.floating;return Vp(e,{activeTriggerProps:o,inactiveTriggerProps:o,popupProps:l}),null}const az=300;function Hk(e,t){function s(l,u,d){const f=l.currentTarget;hr.flushSync(()=>{e.setOpen(!1,lt(Ba,l.nativeEvent,f))}),X4(f.isConnected?f:t.current,u,d)?.focus()}function i(l){s(l,-1,e.select("positionerElement"))}function o(l){const u=e.select("positionerElement");u&&$l(l,u)?e.context.beforeContentFocusGuardRef.current?.focus():s(l,1,u)}return{handlePreFocusGuardFocus:i,handleFocusTargetFocus:o}}function oz(e){const t=b.useRef(""),s=b.useCallback(o=>{o.defaultPrevented||(t.current=o.pointerType,e(o,o.pointerType))},[e]);return{onClick:b.useCallback(o=>{if(o.detail===0){e(o,"keyboard");return}"pointerType"in o?e(o,o.pointerType):e(o,t.current),t.current=""},[e]),onPointerDown:s}}function dc(e,t){const s=b.useRef(e),i=Be(t);Pe(()=>{s.current!==e&&i(s.current),s.current=e},[e,i])}function hb(e,t){const s=Be((l,u)=>{(typeof e=="function"?e():e)||t(u||(xp?"touch":""))}),{onClick:i,onPointerDown:o}=oz(s);return b.useMemo(()=>({onClick:i,onPointerDown:o}),[i,o])}function Fk(e){const[t,s]=b.useState(null),i=hb(e,s);return dc(e,o=>{o&&!e&&s(null)}),b.useMemo(()=>({openMethod:t,triggerProps:i}),[t,i])}const lz=vp(function(t,s){const{render:i,className:o,style:l,disabled:u=!1,nativeButton:d=!0,handle:f,payload:g,openOnHover:m=!1,delay:h=az,closeDelay:x=0,id:S,...w}=t,C=fd(!0),R=Yp(f)??C;if(!R)throw new Error(cn(74));const O=$n(S),T=R.useState("isTriggerActive",O),A=R.useState("floatingRootContext"),N=R.useState("isOpenedByTrigger",O),j=R.useState("triggerPopupId",O),D=b.useRef(null),{registerTrigger:M,isMountedByThisTrigger:z}=Hp(O,D,R,{payload:g,disabled:u,openOnHover:m,closeDelay:x}),L=R.useState("isPressOpenedByTrigger",O),K=R.useState("isTouchPressOpen",m),X=R.useState("hasTriggerFocusGuards",O),B=Jv(A,{enabled:!u&&m&&!K,mouseOnly:!0,move:!1,handleClose:eb(),restMs:h,delay:{close:x},triggerElementRef:D,isActiveTrigger:T,isClosing:()=>R.select("transitionStatus")==="ending"}),H=Be(()=>R.context.stickIfOpen),U=Pp(A,{stickIfOpen:H}),_=hb(()=>R.select("open"),Z=>{R.set("openMethod",Z)}),Q=R.useState("triggerProps",z),{getButtonProps:$,buttonRef:q}=ns({disabled:u,native:d}),Y={open(Z){return L?Fu.open(Z):Tp.open(Z)}},{handlePreFocusGuardFocus:ee,handleFocusTargetFocus:G}=Hk(R,D),I=bt("button",t,{state:{disabled:u,open:N},ref:[q,s,M,D],props:[U.reference,B,Q,_,{[Kv]:"",id:O,"aria-haspopup":"dialog","aria-expanded":N,"aria-controls":j},w,$],stateAttributesMapping:Y}),F=v.jsx(b.Fragment,{children:I},O);return X?v.jsxs(b.Fragment,{children:[v.jsx(Va,{ref:R.context.beforeTriggerFocusGuardRef,onFocus:ee}),F,v.jsx(Va,{ref:R.context.triggerFocusTargetRef,onFocus:G})]}):F}),Bk=b.createContext(void 0);function cz(){const e=b.useContext(Bk);if(e===void 0)throw new Error(cn(45));return e}const uz=b.forwardRef(function(t,s){const{keepMounted:i=!1,...o}=t;return fd().useState("mounted")||i?v.jsx(Bk.Provider,{value:i,children:v.jsx(jp,{ref:s,...o})}):null}),Vk=b.createContext(void 0);function dz(){const e=b.useContext(Vk);if(!e)throw new Error(cn(46));return e}const rg=b.forwardRef(function(t,s){const{cutout:i,...o}=t;let l;if(i){const u=i.getBoundingClientRect();l=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${u.left}px ${u.top}px,${u.left}px ${u.bottom}px,${u.right}px ${u.bottom}px,${u.right}px ${u.top}px,${u.left}px ${u.top}px)`}return v.jsx("div",{ref:s,role:"presentation","data-base-ui-inert":"",...o,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:l}})});function Kk(e){const{store:t,domReference:s,positionerElement:i,open:o}=e,l=b.useRef(null),u=b.useRef(null),d=Lp(i);Pe(()=>{o||(u.current?.abort(),u.current=null,t.state.instantType==="trigger-change"&&t.set("instantType",void 0))},[o,t]),Pe(()=>{const f=s,g=l.current;if(f&&(l.current=f),!g||!f||f===g||!t.select("open"))return;t.set("instantType",void 0);const m=new AbortController;return u.current=m,d(()=>{t.select("open")&&t.set("instantType","trigger-change")},m.signal),()=>{m.abort()}},[s,d,t])}let LE={},zE={},_E="";function sg(e,t){return ed(e)?e:t}function UE(e,t,s){return/hidden|clip/.test(e.getComputedStyle(sg(t,s)).overflowY)}function fz(e){if(typeof document>"u")return!1;const t=qt(e);return Rn(t).innerWidth-t.documentElement.clientWidth>0}function hz(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const s=qt(e),i=s.documentElement,o=s.body,l=sg(i,o),u=l.style.overflowY,d=i.style.scrollbarGutter;i.style.scrollbarGutter="stable",l.style.overflowY="scroll";const f=l.offsetWidth;l.style.overflowY="hidden";const g=l.offsetWidth;return l.style.overflowY=u,i.style.scrollbarGutter=d,f===g}function pz(e){const t=qt(e),s=t.documentElement,i=t.body,o=sg(s,i),l={overflowY:o.style.overflowY,overflowX:o.style.overflowX};return Object.assign(o.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(o.style,l)}}function gz(e){const t=qt(e),s=t.documentElement,i=t.body,o=Rn(s);let l=0,u=0,d=!1;const f=Nr.create();if(Ri&&(o.visualViewport?.scale??1)!==1)return()=>{};function g(){const S=o.getComputedStyle(s),w=o.getComputedStyle(i),R=(S.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";l=s.scrollTop,u=s.scrollLeft,LE={scrollbarGutter:s.style.scrollbarGutter,overflowY:s.style.overflowY,overflowX:s.style.overflowX},_E=s.style.scrollBehavior,zE={position:i.style.position,height:i.style.height,width:i.style.width,boxSizing:i.style.boxSizing,overflowY:i.style.overflowY,overflowX:i.style.overflowX,scrollBehavior:i.style.scrollBehavior};const O=s.scrollHeight>s.clientHeight,T=s.scrollWidth>s.clientWidth,A=S.overflowY==="scroll"||w.overflowY==="scroll",N=S.overflowX==="scroll"||w.overflowX==="scroll",j=Math.max(0,o.innerWidth-i.clientWidth),D=Math.max(0,o.innerHeight-i.clientHeight),M=parseFloat(w.marginTop)+parseFloat(w.marginBottom),z=parseFloat(w.marginLeft)+parseFloat(w.marginRight),L=sg(s,i);if(d=hz(e),d){s.style.scrollbarGutter=R,L.style.overflowY="hidden",L.style.overflowX="hidden";return}Object.assign(s.style,{scrollbarGutter:R,overflowY:"hidden",overflowX:"hidden"}),(O||A)&&(s.style.overflowY="scroll"),(T||N)&&(s.style.overflowX="scroll"),Object.assign(i.style,{position:"relative",height:M||D?`calc(100dvh - ${M+D}px)`:"100dvh",width:z||j?`calc(100vw - ${z+j}px)`:"100vw",boxSizing:"border-box",overflowY:"hidden",overflowX:"hidden",scrollBehavior:"unset"}),i.scrollTop=l,i.scrollLeft=u,s.setAttribute("data-base-ui-scroll-locked",""),s.style.scrollBehavior="unset"}function m(){Object.assign(s.style,LE),Object.assign(i.style,zE),d||(s.scrollTop=l,s.scrollLeft=u,s.removeAttribute("data-base-ui-scroll-locked"),s.style.scrollBehavior=_E)}function h(){m(),f.request(g)}g();const x=Lt(o,"resize",h);return()=>{f.cancel(),m(),typeof o.removeEventListener=="function"&&x()}}class mz{lockCount=0;restore=null;timeoutLock=zs.create();timeoutUnlock=zs.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(t){if(this.lockCount===0||this.restore!==null)return;const s=qt(t),i=s.documentElement,o=s.body,l=Rn(i);if(UE(l,i,o)){const d=new l.MutationObserver(()=>{UE(l,i,o)||(d.disconnect(),this.restore=null,this.lock(t))}),f={attributes:!0};d.observe(i,f),d.observe(o,f),this.restore=()=>d.disconnect();return}const u=xp||!fz(t);this.restore=u?pz(t):gz(t)}}const yz=new mz;function qk(e=!0,t=null){Pe(()=>{if(e)return yz.acquire(t)},[e,t])}const vz=20;function pb(e,t,s,i){const[o,l]=b.useState(!1);Pe(()=>{if(!e||!t||s==null){l(!1);return}const u=qt(s).documentElement.clientWidth,d=s.offsetWidth;l(u>0&&d>0&&d>=u-vz)},[e,t,s]),qk(e&&(!t||o),i)}const bz=b.forwardRef(function(t,s){const{render:i,className:o,style:l,anchor:u,positionMethod:d,side:f,align:g,sideOffset:m,alignOffset:h,collisionBoundary:x="clipping-ancestors",collisionPadding:S,arrowPadding:w,sticky:C,disableAnchorTracking:E=!1,collisionAvoidance:R=qv,...O}=t,T=fd(),A=cz(),N=Gv(),j=T.useState("floatingRootContext"),D=T.useState("mounted"),M=T.useState("open"),z=T.useState("openChangeReason"),L=T.useState("activeTriggerElement"),K=T.useState("modal"),X=T.useState("openMethod"),B=T.useState("positionerElement"),H=T.useState("instantType"),U=T.useState("transitionStatus"),_=T.useState("adaptiveOrigin"),Q=Xp({anchor:u,floatingRootContext:j,positionMethod:d,mounted:D,side:f,sideOffset:m,align:g,alignOffset:h,arrowPadding:w,collisionBoundary:x,collisionPadding:S,sticky:C,disableAnchorTracking:E,keepMounted:A,nodeId:N,collisionAvoidance:R,adaptiveOrigin:_}),$=j.useState("domReferenceElement");Kk({store:T,domReference:$,positionerElement:B,open:M});const q=K===!0&&z!==Kn;pb(M&&q,X==="touch",B,L);const Y=T.useStateSetter("positionerElement"),ee={open:M,side:Q.side,align:Q.align,anchorHidden:Q.anchorHidden,instant:H},G=Zp(t,ee,{styles:Q.positionerStyles,transitionStatus:U,props:O,refs:[s,Y],hidden:!D,inert:!M});return v.jsxs(Vk.Provider,{value:Q,children:[D&&q&&v.jsx(rg,{inert:ud(!M),cutout:L}),v.jsx(YC,{id:N,children:G})]})}),Zy="ArrowUp",Wy="ArrowDown",Jy="ArrowLeft",ev="ArrowRight",tv="Home",nv="End",hd=new Set([Zy,Wy,Jy,ev,tv,nv]),Yk="Shift",xz=[Yk,"Control","Alt","Meta"];function Sz(e){return bn(e)&&e.tagName==="INPUT"}function HE(e){return!!(Sz(e)&&e.selectionStart!=null||bn(e)&&e.tagName==="TEXTAREA")}function FE(e,t,s,i){if(!e||!t||!t.scrollTo)return;let o=e.scrollLeft,l=e.scrollTop;const u=e.clientWidth<e.scrollWidth,d=e.clientHeight<e.scrollHeight;if(u&&i!=="vertical"){const f=BE(e,t,"left"),g=dh(e),m=dh(t);s==="ltr"&&(f+t.offsetWidth+m.scrollMarginRight>e.scrollLeft+e.clientWidth-g.scrollPaddingRight?o=f+t.offsetWidth+m.scrollMarginRight-e.clientWidth+g.scrollPaddingRight:f-m.scrollMarginLeft<e.scrollLeft+g.scrollPaddingLeft&&(o=f-m.scrollMarginLeft-g.scrollPaddingLeft)),s==="rtl"&&(f-m.scrollMarginLeft<e.scrollLeft+g.scrollPaddingLeft?o=f-m.scrollMarginLeft-g.scrollPaddingLeft:f+t.offsetWidth+m.scrollMarginRight>e.scrollLeft+e.clientWidth-g.scrollPaddingRight&&(o=f+t.offsetWidth+m.scrollMarginRight-e.clientWidth+g.scrollPaddingRight))}if(d&&i!=="horizontal"){const f=BE(e,t,"top"),g=dh(e),m=dh(t);f-m.scrollMarginTop<e.scrollTop+g.scrollPaddingTop?l=f-m.scrollMarginTop-g.scrollPaddingTop:f+t.offsetHeight+m.scrollMarginBottom>e.scrollTop+e.clientHeight-g.scrollPaddingBottom&&(l=f+t.offsetHeight+m.scrollMarginBottom-e.clientHeight+g.scrollPaddingBottom)}e.scrollTo({left:o,top:l,behavior:"auto"})}function BE(e,t,s){const i=s==="left"?"offsetLeft":"offsetTop";let o=0;for(;t.offsetParent&&(o+=t[i],t.offsetParent!==e);)t=t.offsetParent;return o}function dh(e){const t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}const wz=b.createContext(void 0);function ig(e){return b.useContext(wz)}const Ez=b.createContext(void 0);function Rz(){const[e,t]=b.useState(0),s=Be(()=>(t(o=>o+1),()=>{t(o=>Math.max(0,o-1))}));return{context:b.useMemo(()=>({register:s}),[s]),hasClosePart:e>0}}const Cz=b.forwardRef(function(t,s){const{render:i,className:o,style:l,initialFocus:u,finalFocus:d,...f}=t,g=fd(),m=dz(),h=ig()!=null,{context:x,hasClosePart:S}=Rz(),w=g.useState("open"),C=g.useState("openMethod"),E=g.useState("instantType"),R=g.useState("transitionStatus"),O=g.useState("popupProps"),T=g.useState("titleElementId"),A=g.useState("descriptionElementId"),N=g.useState("modal"),j=g.useState("mounted"),D=g.useState("openChangeReason"),M=g.useState("activeTriggerElement"),z=g.useState("floatingRootContext"),L=z.useState("floatingId"),K=g.useState("disabled"),X=g.useState("openOnHover"),B=g.useState("closeDelay");bs({open:w,ref:g.context.popupRef,onComplete(){w&&g.context.onOpenChangeComplete?.(!0)}}),Wv(z,{enabled:X&&!K,closeDelay:B});const H=u===void 0?XC(g.context.popupRef):u,U=N!==!1&&S;g.useSyncedValue("focusManagerModal",U);const _=g.useStateSetter("popupElement"),Q={open:w,side:m.side,align:m.align,instant:E,transitionStatus:R},$=bt("div",t,{state:Q,ref:[s,g.context.popupRef,_],props:[O,{id:L,role:"dialog",...od,"aria-labelledby":T,"aria-describedby":A,onKeyDown(q){h&&hd.has(q.key)&&q.stopPropagation()}},cd(R),f],stateAttributesMapping:kp});return v.jsx(Ip,{context:z,openInteractionType:C,modal:U,disabled:!j||D===Kn,initialFocus:H,returnFocus:d,restoreFocus:"popup",getInsideElements:()=>[g.context.beforeTriggerFocusGuardRef.current],previousFocusableElement:bn(M)?M:void 0,nextFocusableElement:g.context.triggerFocusTargetRef,beforeContentFocusGuardRef:g.context.beforeContentFocusGuardRef,children:v.jsx(Ez.Provider,{value:x,children:$})})});function gb({...e}){return v.jsx(rz,{"data-slot":"popover",...e})}function Gk({...e}){return v.jsx(lz,{"data-slot":"popover-trigger",...e})}function mb({anchor:e,align:t="center",alignOffset:s=0,side:i="bottom",sideOffset:o=4,className:l,...u}){return v.jsx(uz,{children:v.jsx(bz,{anchor:e,className:"isolate z-50 outline-none",align:t,alignOffset:s,side:i,sideOffset:o,children:v.jsx(Cz,{"data-slot":"popover-content",className:He("z-50 w-72 origin-(--transform-origin) rounded-lg bg-popover p-4 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",l),...u})})})}const $k=b.createContext(void 0),Ir=e=>{const t=b.useContext($k);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Tz=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),v.jsx($k.Provider,{value:e,children:t})),kz={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)};var Oz=class{#e=kz;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};const No=new Oz;function Az(e){setTimeout(e,0)}const Mz=typeof window>"u"||"Deno"in globalThis;function Vr(){}function Nz(e,t){return typeof e=="function"?e(t):e}function Qk(e){return typeof e=="number"&&e>=0&&e!==1/0}function Xk(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Pn(e,t){return typeof e=="function"?e(t):e}function VE(e,t){const{type:s="all",exact:i,fetchStatus:o,predicate:l,queryKey:u,stale:d}=e;if(u){if(i){if(t.queryHash!==yb(u,t.options))return!1}else if(!ac(t.queryKey,u))return!1}if(s!=="all"){const f=t.isActive();if(s==="active"&&!f||s==="inactive"&&f)return!1}return!(typeof d=="boolean"&&t.isStale()!==d||o&&o!==t.state.fetchStatus||l&&!l(t))}function KE(e,t){const{exact:s,status:i,predicate:o,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(s){if(Ho(t.options.mutationKey)!==Ho(l))return!1}else if(!ac(t.options.mutationKey,l))return!1}return!(i&&t.state.status!==i||o&&!o(t))}function yb(e,t){return(t?.queryKeyHashFn||Ho)(e)}function Ho(e){return JSON.stringify(e,(t,s)=>rv(s)?Object.keys(s).sort().reduce((i,o)=>(i[o]=s[o],i),{}):s)}function ac(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let i=0;i<t.length;i++)if(!ac(e[i],t[i]))return!1;return!0}const s=Object.keys(t);for(const i of s)if(!ac(e[i],t[i]))return!1;return!0}return!1}const Dz=Object.prototype.hasOwnProperty;function vb(e,t,s=0){if(e===t)return e;if(s>500)return t;const i=qE(e)&&qE(t);if(!i&&!(rv(e)&&rv(t)))return t;const o=(i?e:Object.keys(e)).length,l=i?t:Object.keys(t),u=l.length,d=i?new Array(u):{};let f=0;for(let g=0;g<u;g++){const m=i?g:l[g],h=e[m],x=t[m];if(h===x){d[m]=h,(i?g<o:Dz.call(e,m))&&f++;continue}if(h===null||x===null||typeof h!="object"||typeof x!="object"){d[m]=x;continue}const S=vb(h,x,s+1);d[m]=S,S===h&&f++}return o===u&&f===o?e:d}function Nh(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const s in e)if(e[s]!==t[s])return!1;return!0}function qE(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function rv(e){if(!YE(e))return!1;const t=Object.getPrototypeOf(e),s=t?.constructor;if(s===void 0)return!0;if(typeof s!="function")return!1;const i=s.prototype;return!(!YE(i)||!i.hasOwnProperty("isPrototypeOf")||t!==Object.prototype)}function YE(e){return Object.prototype.toString.call(e)==="[object Object]"}function jz(e){return new Promise(t=>{No.setTimeout(t,e)})}function sv(e,t,s){return typeof s.structuralSharing=="function"?s.structuralSharing(e,t):s.structuralSharing!==!1?vb(e,t):t}function Iz(e,t,s=0){const i=[...e,t];return s&&i.length>s?i.slice(1):i}function Pz(e,t,s=0){const i=[t,...e];return s&&i.length>s?i.slice(0,-1):i}const bb=Symbol();function Zk(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===bb?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function xb(e,t){return typeof e=="function"?e(...t):!!e}function Lz(e,t,s){let i=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??=t(),i||(i=!0,o.aborted?s():o.addEventListener("abort",s,{once:!0})),o)}),e}let zz=()=>Mz;const Sb=()=>zz();var fc=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},_z=class extends fc{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}};const wb=new _z,Uz=Az;function Hz(){let e=[],t=0,s=d=>{d()},i=d=>{d()},o=Uz;const l=d=>{t?e.push(d):o(()=>{s(d)})},u=()=>{const d=e;e=[],d.length&&o(()=>{i(()=>{d.forEach(f=>{s(f)})})})};return{batch:d=>{let f;t++;try{f=d()}finally{t--,t||u()}return f},batchCalls:d=>(...f)=>{l(()=>{d(...f)})},schedule:l,setNotifyFunction:d=>{s=d},setBatchNotifyFunction:d=>{i=d},setScheduler:d=>{o=d}}}const tr=Hz();var Fz=class extends fc{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),s=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};const ip=new Fz;function Bz(e){return Math.min(1e3*2**e,3e4)}function Wk(e){return(e??"online")==="online"?ip.isOnline():!0}var iv=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Jk(e){let t=!1,s=0,i,o="pending",l,u;const d=new Promise((O,T)=>{l=O,u=T});d.catch(Vr);const f=()=>o!=="pending",g=O=>{if(!f()){const T=new iv(O);C(T),e.onCancel?.(T)}},m=()=>{t=!0},h=()=>{t=!1},x=()=>wb.isFocused()&&(e.networkMode==="always"||ip.isOnline())&&e.canRun(),S=()=>Wk(e.networkMode)&&e.canRun(),w=O=>{f()||(i?.(),o="resolved",l(O))},C=O=>{f()||(i?.(),o="rejected",u(O))},E=O=>new Promise(T=>{i=A=>{(f()||O())&&T(A)},e.onPause?.()}).then(()=>{i=void 0,f()||e.onContinue?.()}),R=()=>{if(f())return;let O;const T=s===0?e.initialPromise:void 0;try{O=T??e.fn()}catch(A){O=Promise.reject(A)}Promise.resolve(O).then(w).catch(A=>{if(f())return;const N=e.retry??(Sb()?0:3),j=e.retryDelay??Bz,D=typeof j=="function"?j(s,A):j,M=N===!0||typeof N=="number"&&s<N||typeof N=="function"&&N(s,A);if(t||!M){C(A);return}s++,e.onFail?.(s,A),jz(D).then(()=>x()?void 0:E(x)).then(()=>{t?C(A):R()})})};return{promise:d,status:()=>o,cancel:g,continue:()=>(i?.(),d),cancelRetry:m,continueRetry:h,canStart:S,start:()=>(S()?R():E(S).then(R),d)}}var eO=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Qk(this.gcTime)&&(this.#e=No.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Sb()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(No.clearTimeout(this.#e),this.#e=void 0)}};function Vz(e){return{onFetch:(t,s)=>{const i=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,l=t.state.data?.pages||[],u=t.state.data?.pageParams||[];let d={pages:[],pageParams:[]},f=0;const g=async()=>{let m=!1;const h=w=>{Lz(w,()=>t.signal,()=>m=!0)},x=Zk(t.options,t.fetchOptions),S=async(w,C,E)=>{if(m)return Promise.reject(t.signal.reason);if(C==null&&w.pages.length)return Promise.resolve(w);const O=(()=>{const j={client:t.client,queryKey:t.queryKey,pageParam:C,direction:E?"backward":"forward",meta:t.options.meta};return h(j),j})(),T=await x(O),{maxPages:A}=t.options,N=E?Pz:Iz;return{pages:N(w.pages,T,A),pageParams:N(w.pageParams,C,A)}};if(o&&l.length){const w=o==="backward",C=w?Kz:GE,E={pages:l,pageParams:u};d=await S(E,C(i,E),w)}else{const w=e??l.length;do{const C=f===0?u[0]===void 0?i.initialPageParam:u[0]:GE(i,d);if(f>0&&C==null)break;d=await S(d,C),f++}while(f<w)}return d};t.options.persister?t.fetchFn=()=>t.options.persister?.(g,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s):t.fetchFn=g}}}function GE(e,{pages:t,pageParams:s}){const i=t.length-1;return t.length>0?e.getNextPageParam(t[i],t,s[i],s):void 0}function Kz(e,{pages:t,pageParams:s}){return t.length>0?e.getPreviousPageParam?.(t[0],t,s[0],s):void 0}var qz=class extends eO{#e;#t;#n;#r;#i;#s;#a;#l;constructor(e){super(),this.#l=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=QE(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#s?.promise}setOptions(e){if(this.options={...this.#a,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=QE(this.options);t.data!==void 0&&(this.setState($E(t.data,t.dataUpdatedAt)),this.#t=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(e,t){const s=sv(this.state.data,e,this.options);return this.#o({data:s,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),s}setState(e){this.#o({type:"setState",state:e})}cancel(e){const t=this.#s?.promise;return this.#s?.cancel(e),t?t.then(Vr).catch(Vr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Pn(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===bb||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Pn(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!Xk(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#s?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#s?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){const t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#s&&(this.#l||this.state.fetchStatus==="paused"&&this.state.status==="pending"?this.#s.cancel({revert:!0}):this.#s.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#s?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#s)return this.#s.continueRetry(),this.#s.promise}if(e&&this.setOptions(e),!this.options.queryFn){const f=this.observers.find(g=>g.options.queryFn);f&&this.setOptions(f.options)}const s=new AbortController,i=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(this.#l=!0,s.signal)})},o=()=>{const f=Zk(this.options,t),m=(()=>{const h={client:this.#i,queryKey:this.queryKey,meta:this.meta};return i(h),h})();return this.#l=!1,this.options.persister?this.options.persister(f,m,this):f(m)},u=(()=>{const f={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:o};return i(f),f})();(this.#e==="infinite"?Vz(this.options.pages):this.options.behavior)?.onFetch(u,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==u.fetchOptions?.meta)&&this.#o({type:"fetch",meta:u.fetchOptions?.meta});const d=this.#s=Jk({initialPromise:t?.initialPromise,fn:u.fetchFn,onCancel:f=>{f instanceof iv&&f.revert&&this.setState({...this.#n,fetchStatus:"idle"}),s.abort()},onFail:(f,g)=>{this.#o({type:"failed",failureCount:f,error:g})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0});try{const f=await d.start();if(f===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(f),this.#r.config.onSuccess?.(f,this),this.#r.config.onSettled?.(f,this.state.error,this),f}catch(f){if(f instanceof iv){if(f.silent)return this.#s.promise;if(f.revert){if(this.state.data===void 0)throw f;return this.state.data}}throw this.#o({type:"error",error:f}),this.#r.config.onError?.(f,this),this.#r.config.onSettled?.(this.state.data,f,this),f}finally{this.#s===d&&(this.#s=void 0),this.scheduleGc()}}#o(e){const t=s=>{switch(e.type){case"failed":return{...s,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...tO(s.data,this.options),fetchMeta:e.meta??null};case"success":const i={...s,...$E(e.data,e.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?i:void 0,i;case"error":const o=e.error;return{...s,error:o,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...e.state}}};this.state=t(this.state),tr.batch(()=>{this.observers.slice().forEach(s=>{s.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function tO(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Wk(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function $E(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function QE(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,s=t!==void 0,i=s?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:s?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var Yz=class extends fc{#e;#t=void 0;#n=void 0;#r=void 0;#i;#s;#a;#l;#o;#h;#u;#d;#c;#p=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#a=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),XE(this.#t,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return av(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return av(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#S(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,s=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Pn(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#t.setOptions(this.options),t._defaulted&&!Nh(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const i=this.hasListeners();i&&ZE(this.#t,s,this.options,t)&&this.#f(),this.updateResult(),i&&(this.#t!==s||Pn(this.options.enabled,this.#t)!==Pn(t.enabled,this.#t)||Pn(this.options.staleTime,this.#t)!==Pn(t.staleTime,this.#t))&&this.#m();const o=this.#y();i&&(this.#t!==s||Pn(this.options.enabled,this.#t)!==Pn(t.enabled,this.#t)||o!==this.#c)&&this.#v(o)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),s=this.createResult(t,e);return Nh(this.getCurrentResult(),s)||(this.#r=s,this.#s=this.options,this.#i=this.#t.state),s}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(s,i)=>(this.trackProp(i),t?.(i),Reflect.get(s,i))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),s=this.#e.getQueryCache().build(this.#e,t);let i=()=>{},o;const l=new Promise(u=>{o=u,i=this.#e.getQueryCache().subscribe(d=>{d.type==="updated"&&d.query.queryHash===s.queryHash&&s.state.data!==void 0&&(i(),u(this.createResult(s,t)))})});return Promise.race([s.fetch(t).then(()=>{const u=this.createResult(s,t);return o?.(u),u}).finally(()=>{i()}),l])}fetch(e){return this.#f({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#f(e){this.#w();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Vr)),t}#g(e){return!Sb()&&Pn(this.options.enabled,this.#t)!==!1&&Qk(e)}#m(){this.#x();const e=Pn(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#g(e))return;const t=Xk(this.#r.dataUpdatedAt,e)+1;this.#u=No.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#y(){return Pn(this.options.refetchInterval,this.#t)??!1}#v(e){this.#S(),this.#c=e,!(this.#c===0||!this.#g(this.#c))&&(this.#d=No.setInterval(()=>{(this.options.refetchIntervalInBackground||wb.isFocused())&&this.#f()},this.#c))}#b(){this.#m(),this.#v(this.#y())}#x(){this.#u!==void 0&&(No.clearTimeout(this.#u),this.#u=void 0)}#S(){this.#d!==void 0&&(No.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){const s=this.#t,i=this.options,o=this.#r,l=this.#i,u=this.#s,d=e!==s?e.state:this.#n,{state:f}=e;let g={...f},m=!1,h;if(t._optimisticResults){const N=this.hasListeners(),j=!N&&XE(e,t),D=N&&ZE(e,s,t,i);(j||D)&&(g={...g,...tO(f.data,e.options)}),t._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:x,errorUpdatedAt:S,status:w}=g;h=g.data;let C=!1;if(t.placeholderData!==void 0&&h===void 0&&w==="pending"){let N;o?.isPlaceholderData&&t.placeholderData===u?.placeholderData?(N=o.data,C=!0):N=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,N!==void 0&&(w="success",h=sv(o?.data,N,t),m=!0)}if(t.select&&h!==void 0&&!C)if(o&&h===l?.data&&t.select===this.#l)h=this.#o;else try{this.#l=t.select,h=t.select(h),h=sv(o?.data,h,t),this.#o=h,this.#a=null}catch(N){this.#a=N}else h===void 0&&(this.#a=null);this.#a&&(x=this.#a,h=this.#o,S=Date.now(),w="error",m=!1);const E=g.fetchStatus==="fetching",R=w==="pending",O=w==="error",T=R&&E,A=h!==void 0;return{status:w,fetchStatus:g.fetchStatus,isPending:R,isSuccess:w==="success",isError:O,isInitialLoading:T,isLoading:T,data:h,dataUpdatedAt:g.dataUpdatedAt,error:x,errorUpdatedAt:S,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:g.dataUpdateCount>d.dataUpdateCount||g.errorUpdateCount>d.errorUpdateCount,isFetching:E,isRefetching:E&&!R,isLoadingError:O&&!A,isPaused:g.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:O&&A,isStale:Eb(e,t),refetch:this.refetch,isEnabled:Pn(t.enabled,e)!==!1}}updateResult(){const e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#s=this.options,this.#i.data!==void 0&&(this.#h=this.#t),Nh(t,e))return;this.#r=t;const i=(()=>{if(!e)return!0;const{notifyOnChangeProps:o}=this.options,l=typeof o=="function"?o():o;if(l==="all"||!l&&!this.#p.size)return!0;const u=new Set(l??this.#p);return this.options.throwOnError&&u.add("error"),Object.keys(this.#r).some(d=>{const f=d;return this.#r[f]!==e[f]&&u.has(f)})})();tr.batch(()=>{i&&this.listeners.forEach(o=>{o(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}#w(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}};function Gz(e,t){return Pn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Pn(t.retryOnMount,e)===!1)}function XE(e,t){return Gz(e,t)||e.state.data!==void 0&&av(e,t,t.refetchOnMount)}function av(e,t,s){if(Pn(t.enabled,e)!==!1&&Pn(t.staleTime,e)!=="static"){const i=Pn(s,e);return i==="always"||i!==!1&&Eb(e,t)}return!1}function ZE(e,t,s,i){return(e!==t||Pn(i.enabled,e)===!1)&&(!s.suspense||e.state.status!=="error")&&Eb(e,s)}function Eb(e,t){return Pn(t.enabled,e)!==!1&&e.isStaleByTime(Pn(t.staleTime,e))}var $z=class extends eO{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||nO(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(e){const t=()=>{this.#i({type:"continue"})},s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},i=this.#r=Jk({fn:()=>this.options.mutationFn?this.options.mutationFn(e,s):Promise.reject(new Error("No mutationFn found")),onFail:(u,d)=>{this.#i({type:"failed",failureCount:u,error:d})},onPause:()=>{this.#i({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),o=this.state.status==="pending",l=!i.canStart();try{if(o)t();else{this.#i({type:"pending",variables:e,isPaused:l}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,s);const d=await this.options.onMutate?.(e,s);d!==this.state.context&&this.#i({type:"pending",context:d,variables:e,isPaused:l})}const u=await i.start();return await this.#n.config.onSuccess?.(u,e,this.state.context,this,s),await this.options.onSuccess?.(u,e,this.state.context,s),await this.#n.config.onSettled?.(u,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(u,null,e,this.state.context,s),this.#i({type:"success",data:u}),u}catch(u){try{await this.#n.config.onError?.(u,e,this.state.context,this,s)}catch(d){Promise.reject(d)}try{await this.options.onError?.(u,e,this.state.context,s)}catch(d){Promise.reject(d)}try{await this.#n.config.onSettled?.(void 0,u,this.state.variables,this.state.context,this,s)}catch(d){Promise.reject(d)}try{await this.options.onSettled?.(void 0,u,e,this.state.context,s)}catch(d){Promise.reject(d)}throw this.#i({type:"error",error:u}),u}finally{this.#r===i&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){const t=s=>{switch(e.type){case"failed":return{...s,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...s,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:e.error,failureCount:s.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),tr.batch(()=>{this.#t.forEach(s=>{s.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function nO(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Qz=class extends fc{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,t,s){const i=new $z({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:s});return this.add(i),i}add(e){this.#e.add(e);const t=fh(e);if(typeof t=="string"){const s=this.#t.get(t);s?s.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=fh(e);if(typeof t=="string"){const s=this.#t.get(t);if(s)if(s.length>1){const i=s.indexOf(e);i!==-1&&s.splice(i,1)}else s[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=fh(e);if(typeof t=="string"){const s=this.#t.get(t)?.find(i=>i.state.status==="pending");return!s||s===e}else return!0}runNext(e){const t=fh(e);return typeof t=="string"?this.#t.get(t)?.find(s=>s!==e&&s.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){tr.batch(()=>{const e=this.getAll();this.#e.clear(),this.#t.clear(),e.forEach(t=>{this.notify({type:"removed",mutation:t})})})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(s=>KE(t,s))}findAll(e={}){return this.getAll().filter(t=>KE(e,t))}notify(e){tr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return tr.batch(()=>Promise.all(e.map(t=>t.continue().catch(Vr))))}};function fh(e){return e.options.scope?.id}var Xz=class extends fc{#e;#t=void 0;#n;#r;constructor(t,s){super(),this.#e=t,this.setOptions(s),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const s=this.options;this.options=this.#e.defaultMutationOptions(t),Nh(this.options,s)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),s?.mutationKey&&this.options.mutationKey&&Ho(s.mutationKey)!==Ho(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#n&&(this.#n.addObserver(this),this.#i())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#i(),this.#s(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#s()}mutate(t,s){return this.#r=s,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(t)}#i(){const t=this.#n?.state??nO();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#s(t){tr.batch(()=>{const s=this.#r;if(s&&this.hasListeners()){const i=this.#t.variables,o=this.#t.context,l={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{s.onSuccess?.(t.data,i,o,l)}catch(u){Promise.reject(u)}try{s.onSettled?.(t.data,null,i,o,l)}catch(u){Promise.reject(u)}}else if(t?.type==="error"){try{s.onError?.(t.error,i,o,l)}catch(u){Promise.reject(u)}try{s.onSettled?.(void 0,t.error,i,o,l)}catch(u){Promise.reject(u)}}}this.listeners.forEach(i=>{i(this.#t)})})}},rO=class extends fc{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,s){const i=t.queryKey,o=t.queryHash??yb(i,t);let l=this.get(o);return l||(l=new qz({client:e,queryKey:i,queryHash:o,options:e.defaultQueryOptions(t),state:s,defaultOptions:e.getQueryDefaults(i)}),this.add(l)),l}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){this.#e.get(e.queryHash)===e&&(e.destroy(),this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){tr.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(s=>VE(t,s))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(s=>VE(e,s)):t}notify(e){tr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){tr.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){tr.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Zz=class{#e;#t;#n;#r;#i;#s;#a;#l;constructor(e={}){this.#e=e.queryCache||new rO,this.#t=e.mutationCache||new Qz,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#a=wb.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#l=ip.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#a?.(),this.#a=void 0,this.#l?.(),this.#l=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),s=this.#e.build(this,t),i=s.state.data;return i===void 0?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime(Pn(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:s})=>[t,s.data])}setQueryData(e,t,s){const i=this.defaultQueryOptions({queryKey:e}),o=this.#e.get(i.queryHash)?.state.data,l=Nz(t,o);if(l!==void 0)return this.#e.build(this,i).setData(l,{...s,manual:!0})}setQueriesData(e,t,s){return tr.batch(()=>this.#e.findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,t,s)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;tr.batch(()=>{t.findAll(e).forEach(s=>{t.remove(s)})})}resetQueries(e,t){const s=this.#e;return tr.batch(()=>{const i=s.findAll(e),o=new Set(i);return i.forEach(l=>{l.reset()}),this.refetchQueries({type:"active",predicate:l=>o.has(l)},t)})}cancelQueries(e,t={}){const s={revert:!0,...t},i=tr.batch(()=>this.#e.findAll(e).map(o=>o.cancel(s)));return Promise.all(i).then(Vr).catch(Vr)}invalidateQueries(e,t={}){return tr.batch(()=>(this.#e.findAll(e).forEach(s=>{s.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const s={...t,cancelRefetch:t.cancelRefetch??!0},i=tr.batch(()=>this.#e.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let l=o.fetch(void 0,s);return s.throwOnError||(l=l.catch(Vr)),o.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(i).then(Vr)}async query(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const s=this.#e.build(this,t),i=s.isStaleByTime(Pn(t.staleTime,s))?await s.fetch(t):s.state.data,o=t.select;return o?o(i):i}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const s=this.#e.build(this,t);return s.isStaleByTime(Pn(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Vr).catch(Vr)}infiniteQuery(e){return e._type="infinite",this.query(e)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Vr).catch(Vr)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return ip.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(Ho(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#r.values()],s={};return t.forEach(i=>{ac(e,i.queryKey)&&Object.assign(s,i.defaultOptions)}),s}setMutationDefaults(e,t){this.#i.set(Ho(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#i.values()],s={};return t.forEach(i=>{ac(e,i.mutationKey)&&Object.assign(s,i.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=yb(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===bb&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}};const sO=b.createContext(!1),Wz=()=>b.useContext(sO);sO.Provider;function Jz(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const e_=b.createContext(Jz()),t_=()=>b.useContext(e_),n_=(e,t,s)=>{const i=s?.state.status==="error"&&typeof e.throwOnError=="function"?xb(e.throwOnError,[s.state.error,s]):e.throwOnError;(e.suspense||i)&&(t.isReset()||(e.retryOnMount=!1))},r_=e=>{b.useEffect(()=>{e.clearReset()},[e])},s_=({result:e,errorResetBoundary:t,throwOnError:s,query:i,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&i&&(o&&e.data===void 0||xb(s,[e.error,i])),i_=e=>{if(e.suspense){const s=o=>o==="static"?o:Math.max(o??1e3,1e3),i=e.staleTime;e.staleTime=typeof i=="function"?(...o)=>s(i(...o)):s(i),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},a_=(e,t)=>e?.suspense&&t.isPending,o_=(e,t,s)=>t.fetchOptimistic(e).catch(()=>{s.clearReset()});function l_(e,t,s){const i=Wz(),o=t_(),l=Ir(s),u=l.defaultQueryOptions(e),d=l.getQueryCache().get(u.queryHash),f=e.subscribed!==!1;u._optimisticResults=i?"isRestoring":f?"optimistic":void 0,i_(u),n_(u,o,d),r_(o);const[g]=b.useState(()=>new t(l,u)),m=g.getOptimisticResult(u),h=!i&&f;if(b.useSyncExternalStore(b.useCallback(x=>{const S=h?g.subscribe(tr.batchCalls(x)):Vr;return g.updateResult(),S},[g,h]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),b.useEffect(()=>{g.setOptions(u)},[u,g]),a_(u,m))throw o_(u,g,o);if(s_({result:m,errorResetBoundary:o,throwOnError:u.throwOnError,query:d,suspense:u.suspense}))throw m.error;return u.notifyOnChangeProps?m:g.trackResult(m)}function ti(e,t){return l_(e,Yz,t)}function ag(e,t){const s=Ir(t);return u_({filters:{...e,status:"pending"}},s).length}function c_(){let e;return(t,s)=>{let i=[],o;return()=>{const l=t.findAll(s.filters),u=l.flatMap(d=>[d,d.state]);return(!o||u.length!==i.length||u.some((d,f)=>!Object.is(d,i[f])))&&(i=u,o=vb(e,l.map(d=>s.select?s.select(d):d.state)),e=o),o}}}function u_(e={},t){const s=Ir(t).getMutationCache(),[i]=b.useState(()=>c_()),o=i(s,e);return b.useSyncExternalStore(b.useCallback(l=>s.subscribe(tr.batchCalls(l)),[s]),o,o)}function nr(e,t){const s=Ir(t),[i]=b.useState(()=>new Xz(s,e));b.useEffect(()=>{i.setOptions(e)},[i,e]);const o=b.useSyncExternalStore(b.useCallback(u=>i.subscribe(tr.batchCalls(u)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),l=b.useCallback((...u)=>{i.mutate(u[0],u[1]).catch(Vr)},[i]);if(o.error&&xb(i.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:l,mutateAsync:o.mutate}}const pd="/api/settings";function d_(e){return hc({signal:e})}function f_(e){return hc({method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(e)})}function h_(){return hc({method:"POST"},`${pd}/config-folder/open`)}function p_(e){return hc({signal:e},`${pd}/skill-copy`)}function g_(e){return hc({method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)},`${pd}/skill-copy`)}function m_(e){return hc({signal:e},`${pd}/skill-status`)}async function hc(e,t=pd){const s=await fetch(t,e);if(!s.ok)throw new Error(await y_(s));return s.json()}async function y_(e){try{return(await e.json()).error?.message??`Request failed with status ${e.status}`}catch{return`Request failed with status ${e.status}`}}const iO=["skill-status"];function v_(){return ti({queryKey:iO,queryFn:({signal:e})=>m_(e),retry:!1})}const by=768;function Rb(){const[e,t]=b.useState(void 0);return b.useEffect(()=>{const s=window.matchMedia(`(max-width: ${by-1}px)`),i=()=>{t(window.innerWidth<by)};return s.addEventListener("change",i),t(window.innerWidth<by),()=>s.removeEventListener("change",i)},[]),!!e}const b_={agents:"statusBar.targetAgents",claude:"statusBar.targetClaude"},x_={missing:"statusBar.statusMissing",outdated:"statusBar.statusOutdated",current:"statusBar.statusCurrent"},ov={missing:"text-red-600 dark:text-red-400",outdated:"text-amber-600 dark:text-amber-400",current:"text-emerald-600 dark:text-emerald-400"},aO={missing:CL,outdated:ub,current:MT};function S_(){const{t:e}=pt(),t=Rb(),s=b.useRef(null),[i,o]=b.useState(!1),l=v_(),u=l.data?.targets??[],d=u.length>0?E_(u):void 0,f=d?aO[d]:void 0,g=u.filter(({status:h})=>h!=="current"),m=`foundry settings download-skill --target ${g.map(({target:h})=>h==="agents"?".agents":".claude").join(",")}`;return v.jsxs("div",{ref:s,"data-slot":"skill-status-bar",className:`
13
+ fixed inset-x-0 bottom-0 z-20 flex h-6 items-center justify-between
14
+ gap-3 border-t bg-background/95 px-3 text-[11px] text-muted-foreground
15
+ backdrop-blur-sm
16
+ `,children:[v.jsx("span",{"data-slot":"skill-status-version",className:"min-w-0 truncate",children:l.data?e("statusBar.foundryVersion",{version:l.data.version}):e("statusBar.foundry")}),v.jsxs(gb,{open:i,onOpenChange:o,children:[v.jsxs(Gk,{openOnHover:!t,delay:120,"aria-label":e("statusBar.skillStatus"),className:`
17
+ flex h-5 cursor-pointer items-center gap-1.5 rounded-sm px-1.5
18
+ outline-none
19
+ hover:bg-muted hover:text-foreground
20
+ focus-visible:ring-2 focus-visible:ring-ring/50
21
+ `,children:[v.jsx("span",{children:e("statusBar.skill")}),l.isPending&&v.jsx("span",{className:`
22
+ size-1.5 animate-pulse rounded-full bg-muted-foreground
23
+ `}),l.isError&&v.jsx(ub,{className:`
24
+ size-3 text-amber-600
25
+ dark:text-amber-400
26
+ `}),f&&d&&v.jsx(f,{className:`
27
+ size-3
28
+ ${ov[d]}
29
+ `})]}),v.jsx(mb,{anchor:t?s:void 0,side:"top",align:t?"center":"end",sideOffset:8,className:`
30
+ w-[calc(100vw-2rem)] max-w-[calc(100vw-2rem)]
31
+ md:w-116
32
+ `,children:v.jsxs("div",{className:"flex flex-col gap-3",children:[l.isPending&&v.jsx("p",{className:"text-xs text-muted-foreground",children:e("statusBar.skillChecking")}),l.isError&&v.jsx("p",{className:`
33
+ text-xs text-amber-600
34
+ dark:text-amber-400
35
+ `,children:e("statusBar.skillUnavailable")}),u.length>0&&v.jsx("div",{className:"flex flex-col gap-3",children:u.map(h=>v.jsx(w_,{...h},h.target))}),g.length>0&&v.jsxs("div",{className:"flex flex-col gap-1.5",children:[v.jsx("p",{className:"text-[11px] text-muted-foreground",children:v.jsx(tg,{i18nKey:"statusBar.skillRefreshHint",components:{settings:v.jsx("a",{href:"#/settings?panel=advanced",onClick:()=>o(!1),className:`
36
+ font-medium text-foreground underline
37
+ underline-offset-2
38
+ `})}})}),v.jsxs(q5,{size:"sm",children:[v.jsxs(Y5,{children:[v.jsxs(G5,{children:[v.jsx(VL,{}),e("statusBar.terminal")]}),v.jsx($5,{children:v.jsx(Q5,{value:m,"aria-label":e("statusBar.copyCommand")})})]}),v.jsx(X5,{wrap:!0,children:m})]})]})]})})]})]})}function w_({target:e,status:t,destination:s}){const{t:i}=pt(),o=aO[t];return v.jsxs("div",{className:"flex flex-col gap-1",children:[v.jsxs("div",{className:"flex items-center justify-between gap-2",children:[v.jsxs("span",{className:`
39
+ flex items-center gap-1.5 text-xs font-medium text-foreground
40
+ `,children:[v.jsx(o,{className:`
41
+ size-3
42
+ ${ov[t]}
43
+ `}),i(b_[e])]}),v.jsx("span",{className:`
44
+ text-[11px]
45
+ ${ov[t]}
46
+ `,children:i(x_[t])})]}),v.jsx("code",{className:"font-mono text-[11px] break-all text-muted-foreground",children:s})]})}function E_(e){return e.some(({status:t})=>t==="missing")?"missing":e.some(({status:t})=>t==="outdated")?"outdated":"current"}var oO=e=>{throw TypeError(e)},lO=(e,t,s)=>t.has(e)||oO("Cannot "+s),Ns=(e,t,s)=>(lO(e,t,"read from private field"),s?s.call(e):t.get(e)),Cu=(e,t,s)=>t.has(e)?oO("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),gi=(e,t,s,i)=>(lO(e,t,"write to private field"),t.set(e,s),s),og=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,lg=/^[\\/]{2}/;function cO(e,t){return t+e.replace(/\\/g,"/")}var WE="popstate";function JE(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function R_(e={}){function t(o,l){let{pathname:u="/",search:d="",hash:f=""}=ni(o.location.hash.substring(1));return!u.startsWith("/")&&!u.startsWith(".")&&(u="/"+u),Vu("",{pathname:u,search:d,hash:f},l.state&&l.state.usr||null,l.state&&l.state.key||"default")}function s(o,l){let u=o.document.querySelector("base"),d="";if(u&&u.getAttribute("href")){let f=o.location.href,g=f.indexOf("#");d=g===-1?f:f.slice(0,g)}return d+"#"+(typeof l=="string"?l:jr(l))}function i(o,l){Hn(o.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(l)})`)}return T_(t,s,i,e)}function _t(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Hn(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function C_(){return Math.random().toString(36).substring(2,10)}function eR(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Vu(e,t,s=null,i,o){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?ni(t):t,state:s,key:t&&t.key||i||C_(),mask:o}}function jr({pathname:e="/",search:t="",hash:s=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),s&&s!=="#"&&(e+=s.charAt(0)==="#"?s:"#"+s),e}function ni(e){let t={};if(e){let s=e.indexOf("#");s>=0&&(t.hash=e.substring(s),e=e.substring(0,s));let i=e.indexOf("?");i>=0&&(t.search=e.substring(i),e=e.substring(0,i)),e&&(t.pathname=e)}return t}function T_(e,t,s,i={}){let{window:o=document.defaultView,v5Compat:l=!1}=i,u=o.history,d="POP",f=null,g=m();g==null&&(g=0,u.replaceState({...u.state,idx:g},""));function m(){return(u.state||{idx:null}).idx}function h(){d="POP";let E=m(),R=E==null?null:E-g;g=E,f&&f({action:d,location:C.location,delta:R})}function x(E,R){d="PUSH";let O=JE(E)?E:Vu(C.location,E,R);s&&s(O,E),g=m()+1;let T=eR(O,g),A=C.createHref(O.mask||O);try{u.pushState(T,"",A)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;o.location.assign(A)}l&&f&&f({action:d,location:C.location,delta:1})}function S(E,R){d="REPLACE";let O=JE(E)?E:Vu(C.location,E,R);s&&s(O,E),g=m();let T=eR(O,g),A=C.createHref(O.mask||O);u.replaceState(T,"",A),l&&f&&f({action:d,location:C.location,delta:0})}function w(E){return uO(o,E)}let C={get action(){return d},get location(){return e(o,u)},listen(E){if(f)throw new Error("A history only accepts one active listener");return o.addEventListener(WE,h),f=E,()=>{o.removeEventListener(WE,h),f=null}},createHref(E){return t(o,E)},createURL:w,encodeLocation(E){let R=w(E);return{pathname:R.pathname,search:R.search,hash:R.hash}},push:x,replace:S,go(E){return u.go(E)}};return C}function uO(e,t,s=!1){let i="http://localhost";e&&(i=e.location.origin!=="null"?e.location.origin:e.location.href),_t(i,"No window.location.(origin|href) available to create URL");let o=typeof t=="string"?t:jr(t);return o=o.replace(/ $/,"%20"),!s&&lg.test(o)&&(o=i+o),new URL(o,i)}var Tu,tR=class{constructor(e){if(Cu(this,Tu,new Map),e)for(let[t,s]of e)this.set(t,s)}get(e){if(Ns(this,Tu).has(e))return Ns(this,Tu).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){Ns(this,Tu).set(e,t)}};Tu=new WeakMap;var k_=new Set(["lazy","caseSensitive","path","id","index","children"]);function O_(e){return k_.has(e)}var A_=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function M_(e){return A_.has(e)}function N_(e){return e.index===!0}function Ku(e,t,s=[],i={},o=!1){return e.map((l,u)=>{let d=[...s,String(u)],f=typeof l.id=="string"?l.id:d.join("-");if(_t(l.index!==!0||!l.children,"Cannot specify children on an index route"),_t(o||!i[f],`Found a route id collision on id "${f}". Route id's must be globally unique within Data Router usages`),N_(l)){let g={...l,id:f};return i[f]=nR(g,t(g)),g}else{let g={...l,id:f,children:void 0};return i[f]=nR(g,t(g)),l.children&&(g.children=Ku(l.children,t,d,i,o)),g}})}function nR(e,t){return Object.assign(e,{...t,...typeof t.lazy=="object"&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function dO(e,t,s="/"){return Ys(e,t,s,!1)}function Ys(e,t,s,i,o){let l=typeof t=="string"?ni(t):t,u=ts(l.pathname||"/",s);if(u==null)return null;let d=o??Dh(e),f=null,g=mO(u);for(let m=0;f==null&&m<d.length;++m)f=B_(d[m],g,i);return f}function D_(e,t){let{route:s,pathname:i,params:o}=e;return{id:s.id,pathname:i,params:o,data:t[s.id],loaderData:t[s.id],handle:s.handle}}function Dh(e){let t=fO(e);return j_(t),t}function fO(e,t=[],s=[],i="",o=!1){let l=(u,d,f=o,g)=>{let m={relativePath:g===void 0?u.path||"":g,caseSensitive:u.caseSensitive===!0,childrenIndex:d,route:u};if(m.relativePath.startsWith("/")){if(!m.relativePath.startsWith(i)&&f)return;_t(m.relativePath.startsWith(i),`Absolute route path "${m.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(i.length)}let h=Ps([i,m.relativePath]),x=s.concat(m);u.children&&u.children.length>0&&(_t(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),fO(u.children,t,x,h,f)),!(u.path==null&&!u.index)&&t.push({path:h,score:H_(h,u.index),routesMeta:x.map((S,w)=>{let[C,E]=gO(S.relativePath,S.caseSensitive,w===x.length-1);return{...S,matcher:C,compiledParams:E}})})};return e.forEach((u,d)=>{if(u.path===""||!u.path?.includes("?"))l(u,d);else for(let f of hO(u.path))l(u,d,!0,f)}),t}function hO(e){let t=e.split("/");if(t.length===0)return[];let[s,...i]=t,o=s.endsWith("?"),l=s.replace(/\?$/,"");if(i.length===0)return o?[l,""]:[l];let u=hO(i.join("/")),d=[];return d.push(...u.map(f=>f===""?l:[l,f].join("/"))),o&&d.push(...u),d.map(f=>e.startsWith("/")&&f===""?"/":f)}function j_(e){e.sort((t,s)=>t.score!==s.score?s.score-t.score:F_(t.routesMeta.map(i=>i.childrenIndex),s.routesMeta.map(i=>i.childrenIndex)))}var I_=/^:[\w-]+$/,P_=3,L_=2,z_=1,__=10,U_=-2,rR=e=>e==="*";function H_(e,t){let s=e.split("/"),i=s.length;return s.some(rR)&&(i+=U_),t&&(i+=L_),s.filter(o=>!rR(o)).reduce((o,l)=>o+(I_.test(l)?P_:l===""?z_:__),i)}function F_(e,t){return e.length===t.length&&e.slice(0,-1).every((i,o)=>i===t[o])?e[e.length-1]-t[t.length-1]:0}function B_(e,t,s=!1){let{routesMeta:i}=e,o={},l="/",u=[];for(let d=0;d<i.length;++d){let f=i[d],g=d===i.length-1,m=l==="/"?t:t.slice(l.length)||"/",h={path:f.relativePath,caseSensitive:f.caseSensitive,end:g},x=f.matcher&&f.compiledParams?pO(h,m,f.matcher,f.compiledParams):qu(h,m),S=f.route;if(!x&&g&&s&&!i[i.length-1].route.index&&(x=qu({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},m)),!x)return null;Object.assign(o,x.params),u.push({params:o,pathname:Ps([l,x.pathname]),pathnameBase:q_(Ps([l,x.pathnameBase])),route:S}),x.pathnameBase!=="/"&&(l=Ps([l,x.pathnameBase]))}return u}function qu(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[s,i]=gO(e.path,e.caseSensitive,e.end);return pO(e,t,s,i)}function pO(e,t,s,i){let o=t.match(s);if(!o)return null;let l=o[0],u=oc(l,1),d=o.slice(1);return{params:i.reduce((g,{paramName:m,isOptional:h},x)=>{if(m==="*"){let w=d[x]||"";u=oc(l.slice(0,l.length-w.length),1)}const S=d[x];return h&&!S?g[m]=void 0:g[m]=(S||"").replace(/%2F/g,"/"),g},{}),pathname:l,pathnameBase:u,pattern:e}}function gO(e,t=!1,s=!0){Hn(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let i=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(u,d,f,g,m)=>{if(i.push({paramName:d,isOptional:f!=null}),f){let h=m.charAt(g+u.length);return h&&h!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(i.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),i]}function mO(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Hn(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function ts(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let s=t.endsWith("/")?t.length-1:t.length,i=e.charAt(s);return i&&i!=="/"?null:e.slice(s)||"/"}function V_({basename:e,pathname:t}){return t==="/"?e:Ps([e,t])}var Cb=e=>og.test(e);function K_(e,t="/"){let{pathname:s,search:i="",hash:o=""}=typeof e=="string"?ni(e):e,l;return s?(s=Tb(s),s.startsWith("/")||s.startsWith("\\")?l=sR(s.substring(1),"/"):l=sR(s,t)):l=t,{pathname:l,search:Y_(i),hash:G_(o)}}function sR(e,t){let s=oc(t).split("/");return e.split("/").forEach(o=>{o===".."?s.length>1&&s.pop():o!=="."&&s.push(o)}),s.length>1?s.join("/"):"/"}function xy(e,t,s,i){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(i)}]. Please separate it out to the \`to.${s}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function yO(e){return e.filter((t,s)=>s===0||t.route.path&&t.route.path.length>0)}function cg(e){let t=yO(e);return t.map((s,i)=>i===t.length-1?s.pathname:s.pathnameBase)}function gd(e,t,s,i=!1){let o;typeof e=="string"?o=ni(e):(o={...e},_t(!o.pathname||!o.pathname.includes("?"),xy("?","pathname","search",o)),_t(!o.pathname||!o.pathname.includes("#"),xy("#","pathname","hash",o)),_t(!o.search||!o.search.includes("#"),xy("#","search","hash",o)));let l=e===""||o.pathname==="",u=l?"/":o.pathname,d;if(u==null)d=s;else{let h=t.length-1;if(!i&&u.startsWith("..")){let x=u.split("/");for(;x[0]==="..";)x.shift(),h-=1;o.pathname=x.join("/")}d=h>=0?t[h]:"/"}let f=K_(o,d),g=u&&u!=="/"&&u.endsWith("/"),m=(l||u===".")&&s.endsWith("/");return!f.pathname.endsWith("/")&&(g||m)&&(f.pathname+="/"),f}var Tb=e=>e.replace(/[\\/]{2,}/g,"/"),Ps=e=>Tb(e.join("/"));function oc(e,t=0){let s=e.length;for(;s>t&&e.charCodeAt(s-1)===47;)s--;return s===e.length?e:e.slice(0,s)}var q_=e=>oc(e).replace(/^\/*/,"/"),Y_=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,G_=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,$_=["EvalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],md=class{constructor(e,t,s,i=!1){this.status=e,this.statusText=t||"",this.internal=i,s instanceof Error?(this.data=s.toString(),this.error=s):this.data=s}};function Yu(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function yd(e){let t=e.map(s=>s.route.path).filter(Boolean);return Ps(t)||"/"}var vO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function bO(e,t){let s=e;if(typeof s!="string"||!og.test(s))return{absoluteURL:void 0,isExternal:!1,to:s};let i=s,o=!1;if(vO)try{let l=new URL(window.location.href),u=lg.test(s)?new URL(cO(s,l.protocol)):new URL(s),d=ts(u.pathname,t);u.origin===l.origin&&d!=null?s=d+u.search+u.hash:o=!0}catch{Hn(!1,`<Link to="${s}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:i,isExternal:o,to:s}}var Ua=Symbol("Uninstrumented");function Q_(e,t){let s={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(o=>o({id:t.id,index:t.index,path:t.path,instrument(l){let u=Object.keys(s);for(let d of u)l[d]&&s[d].push(l[d])}}));let i={};if(typeof t.lazy=="function"&&s.lazy.length>0){let o=Vl(s.lazy,t.lazy,()=>{});o&&(i.lazy=o)}if(typeof t.lazy=="object"){let o=t.lazy;["middleware","loader","action"].forEach(l=>{let u=o[l],d=s[`lazy.${l}`];if(typeof u=="function"&&d.length>0){let f=Vl(d,u,()=>{});f&&(i.lazy=Object.assign(i.lazy||{},{[l]:f}))}})}return["loader","action"].forEach(o=>{let l=t[o];if(typeof l=="function"&&s[o].length>0){let u=l[Ua]??l,d=Vl(s[o],u,(...f)=>iR(f[0]));d&&(o==="loader"&&u.hydrate===!0&&(d.hydrate=!0),d[Ua]=u,i[o]=d)}}),t.middleware&&t.middleware.length>0&&s.middleware.length>0&&(i.middleware=t.middleware.map(o=>{let l=o[Ua]??o,u=Vl(s.middleware,l,(...d)=>iR(d[0]));return u?(u[Ua]=l,u):o})),i}function X_(e,t){let s={navigate:[],fetch:[]};if(t.forEach(i=>i({instrument(o){let l=Object.keys(o);for(let u of l)o[u]&&s[u].push(o[u])}})),s.navigate.length>0){let i=e.navigate[Ua]??e.navigate,o=Vl(s.navigate,i,(...l)=>{let[u,d]=l;return{to:typeof u=="number"||typeof u=="string"?u:u?jr(u):".",...aR(e,d??{})}});o&&(o[Ua]=i,e.navigate=o)}if(s.fetch.length>0){let i=e.fetch[Ua]??e.fetch,o=Vl(s.fetch,i,(...l)=>{let[u,,d,f]=l;return{href:d??".",fetcherKey:u,...aR(e,f??{})}});o&&(o[Ua]=i,e.fetch=o)}return e}function Vl(e,t,s){return e.length===0?null:async(...i)=>{let o=await xO(e,s(...i),()=>t(...i),e.length-1);if(o.type==="error")throw o.value;return o.value}}async function xO(e,t,s,i){let o=e[i],l;if(o){let u,d=async()=>(u?console.error("You cannot call instrumented handlers more than once"):u=xO(e,t,s,i-1),l=await u,_t(l,"Expected a result"),l.type==="error"&&l.value instanceof Error?{status:"error",error:l.value}:{status:"success",error:void 0});try{await o(d,t)}catch(f){console.error("An instrumentation function threw an error:",f)}u||await d(),await u}else try{l={type:"success",value:await s()}}catch(u){l={type:"error",value:u}}return l||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function iR(e){let{request:t,context:s,params:i,pattern:o}=e;return{request:Z_(t),params:{...i},pattern:o,context:W_(s)}}function aR(e,t){return{currentUrl:jr(e.state.location),..."formMethod"in t?{formMethod:t.formMethod}:{},..."formEncType"in t?{formEncType:t.formEncType}:{},..."formData"in t?{formData:t.formData}:{},..."body"in t?{body:t.body}:{}}}function Z_(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function W_(e){if(e6(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var J_=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function e6(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===J_}var oR=new URL("http://localhost");function kb(e){if(e.createURL)return e.createURL("/");try{return new URL(e.createHref("/"),oR)}catch{return oR}}function Sy(e,t){return e.origin===t.origin&&(e.origin!=="null"||e.protocol===t.protocol&&e.host===t.host)}function t6(e,t){if(e.startsWith("//"))return!0;let s=t.protocol.toLowerCase();return e.toLowerCase().startsWith(s)?t.host===""||e.slice(s.length).startsWith("//"):!1}function Wl(e,t,s,i){let o=null;try{o=e==null?null:new URL(e,s)}catch{}let l=new URL(t,s),u=o!=null&&!Sy(o,s),d=!Sy(l,s);if(i==="reject"){if(u||d)throw new Error("External navigation is not allowed")}else if(d&&(o==null||!t6(e,o)||!Sy(o,l)))throw new Error("External navigation is not allowed")}var SO=["POST","PUT","PATCH","DELETE"],n6=new Set(SO),r6=["GET",...SO],s6=new Set(r6),wO=new Set([301,302,303,307,308]),i6=new Set([307,308]),wy={state:"idle",location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},a6={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},_l={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},o6=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),EO="remix-router-transitions",RO=Symbol("ResetLoaderData"),Ao,Ul,Ia,Hl,l6=class{constructor(e){Cu(this,Ao),Cu(this,Ul),Cu(this,Ia),Cu(this,Hl),gi(this,Ao,e),gi(this,Ul,Dh(e))}get stableRoutes(){return Ns(this,Ao)}get activeRoutes(){return Ns(this,Ia)??Ns(this,Ao)}get branches(){return Ns(this,Hl)??Ns(this,Ul)}get hasHMRRoutes(){return Ns(this,Ia)!=null}setRoutes(e){gi(this,Ao,e),gi(this,Ul,Dh(e))}setHmrRoutes(e){gi(this,Ia,e),gi(this,Hl,Dh(e))}commitHmrRoutes(){Ns(this,Ia)&&(gi(this,Ao,Ns(this,Ia)),gi(this,Ul,Ns(this,Hl)),gi(this,Ia,void 0),gi(this,Hl,void 0))}};Ao=new WeakMap;Ul=new WeakMap;Ia=new WeakMap;Hl=new WeakMap;function c6(e){const t=e.window?e.window:typeof window<"u"?window:void 0,s=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u";_t(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let i=e.hydrationRouteProperties||[],o=e.mapRouteProperties||o6,l=o;if(e.instrumentations){let V=e.instrumentations;l=J=>({...o(J),...Q_(V.map(re=>re.route).filter(Boolean),J)})}let u={},d=new l6(Ku(e.routes,l,void 0,u)),f=e.basename||"/";f.startsWith("/")||(f=`/${f}`);let g=e.dataStrategy||p6,m={...e.future},h=null,x=new Set,S=null,w=null,C=null,E=null,R=e.hydrationData!=null,O=Ys(d.activeRoutes,e.history.location,f,!1,d.branches),T=!1,A=null,N,j;if(O==null&&!e.patchRoutesOnNavigation){let V=Ds(404,{pathname:e.history.location.pathname}),{matches:J,route:re}=hh(d.activeRoutes);N=!0,j=!N,O=J,A={[re.id]:V}}else if(O&&!e.hydrationData&&Ie(O,d.activeRoutes,e.history.location.pathname).active&&(O=null),O)if(O.some(V=>V.route.lazy))N=!1,j=!N;else if(!O.some(V=>Ob(V.route)))N=!0,j=!N;else{let V=e.hydrationData?e.hydrationData.loaderData:null,J=e.hydrationData?e.hydrationData.errors:null,re=O;if(J){let ve=O.findIndex(Se=>J[Se.route.id]!==void 0);re=re.slice(0,ve+1)}j=!1,N=!0,re.forEach(ve=>{let Se=CO(ve.route,V,J);j=j||Se.renderFallback,N=N&&!Se.shouldLoad})}else{N=!1,j=!N,O=[];let V=Ie(null,d.activeRoutes,e.history.location.pathname);V.active&&V.matches&&(T=!0,O=V.matches)}let D,M={historyAction:e.history.action,location:e.history.location,matches:O,initialized:N,renderFallback:j,navigation:wy,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||A,fetchers:new Map,blockers:new Map},z="POP",L=null,K=!1,X,B=!1,H=new Map,U=null,_=!1,Q=!1,$=new Set,q=new Map,Y=0,ee=-1,G=new Map,ae=new Set,I=new Map,F=new Map,Z=new Set,ne=new Map,ye,se=null;function ge(){if(h=e.history.listen(({action:V,location:J,delta:re})=>{if(ye){ye(),ye=void 0;return}Hn(ne.size===0||re!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let ve=St({currentLocation:M.location,nextLocation:J,historyAction:V});if(ve&&re!=null){let Se=new Promise(qe=>{ye=qe});e.history.go(re*-1),ht(ve,{state:"blocked",location:J,proceed(){ht(ve,{state:"proceeding",proceed:void 0,reset:void 0,location:J}),Se.then(()=>e.history.go(re))},reset(){let qe=new Map(M.blockers);qe.set(ve,_l),Re({blockers:qe})}}),L?.resolve(),L=null;return}return ze(V,J)}),s){j6(t,H);let V=()=>I6(t,H);t.addEventListener("pagehide",V),U=()=>t.removeEventListener("pagehide",V)}return M.initialized||ze("POP",M.location,{initialHydration:!0}),D}function fe(){h&&h(),U&&U(),x.clear(),X&&X.abort(),M.fetchers.forEach((V,J)=>Nt(M.fetchers,J)),M.blockers.forEach((V,J)=>Zt(J))}function ce(V){if(x.add(V),S){let{newErrors:J}=S;S=null,V(M,{deletedFetchers:[],newErrors:J,viewTransitionOpts:void 0,flushSync:!1})}return()=>x.delete(V)}function Re(V,J={}){V.matches&&(V.matches=V.matches.map(Se=>{let qe=u[Se.route.id],Ke=Se.route;return Ke.element!==qe.element||Ke.errorElement!==qe.errorElement||Ke.hydrateFallbackElement!==qe.hydrateFallbackElement?{...Se,route:qe}:Se})),M={...M,...V};let re=[],ve=[];M.fetchers.forEach((Se,qe)=>{Se.state==="idle"&&(Z.has(qe)?re.push(qe):ve.push(qe))}),Z.forEach(Se=>{!M.fetchers.has(Se)&&!q.has(Se)&&re.push(Se)}),x.size===0&&(S={newErrors:V.errors??null}),[...x].forEach(Se=>Se(M,{deletedFetchers:re,newErrors:V.errors??null,viewTransitionOpts:J.viewTransitionOpts,flushSync:J.flushSync===!0})),re.forEach(Se=>Nt(M.fetchers,Se)),ve.forEach(Se=>M.fetchers.delete(Se))}function be(V,J,{flushSync:re}={}){let ve=M.actionData!=null&&M.navigation.formMethod!=null&&Mr(M.navigation.formMethod)&&M.navigation.state==="loading"&&V.state?._isRedirect!==!0,Se;J.actionData?Object.keys(J.actionData).length>0?Se=J.actionData:Se=null:ve?Se=M.actionData:Se=null;let qe=J.loaderData?yR(M.loaderData,J.loaderData,J.matches||[],J.errors):M.loaderData,Ke=M.blockers;Ke.size>0&&(Ke=new Map(Ke),Ke.forEach((nt,Rt)=>Ke.set(Rt,_l)));let Xe=_?!1:at(V,J.matches||M.matches),Qe=K===!0||M.navigation.formMethod!=null&&Mr(M.navigation.formMethod)&&V.state?._isRedirect!==!0;d.commitHmrRoutes(),_||z==="POP"||(z==="PUSH"?e.history.push(V,V.state):z==="REPLACE"&&e.history.replace(V,V.state));let ct;if(z==="POP"&&!_&&V!==M.location){let nt=H.get(M.location.pathname);nt&&nt.has(V.pathname)?ct={currentLocation:M.location,nextLocation:V}:H.has(V.pathname)&&(ct={currentLocation:V,nextLocation:M.location})}else if(B){let nt=H.get(M.location.pathname);nt?nt.add(V.pathname):(nt=new Set([V.pathname]),H.set(M.location.pathname,nt)),ct={currentLocation:M.location,nextLocation:V}}Re({...J,actionData:Se,loaderData:qe,historyAction:z,location:V,initialized:!0,renderFallback:!1,navigation:wy,revalidation:"idle",restoreScrollPosition:Xe,preventScrollReset:Qe,blockers:Ke},{viewTransitionOpts:ct,flushSync:re===!0}),z="POP",K=!1,B=!1,_=!1,Q=!1,L?.resolve(),L=null,se?.resolve(),se=null}async function Le(V,J){if(L?.resolve(),L=null,typeof V=="number"){L||(L=SR());let Bt=L.promise;return e.history.go(V),Bt}let re=lv(M.location,M.matches,f,V,J?.fromRouteId,J?.relative),{path:ve,submission:Se,error:qe}=lR(!1,re,J),Ke;if(J?.mask){let Bt=typeof J.mask=="string"?ni(J.mask):{...M.location.mask,...J.mask};if(Ke={pathname:Bt.pathname??"",search:Bt.search??"",hash:Bt.hash??""},lg.test(Ke.pathname))throw new Error("External navigation is not allowed");Ke.pathname.startsWith("\\")&&(Ke.pathname=Ke.pathname.replace(/^\\+/,"/")),Wl(typeof J.mask=="string"?J.mask:jr(J.mask),jr(Ke),e.history.createURL("/"),"reject")}let Xe=M.location,Qe=Vu(Xe,ve,J&&J.state,void 0,Ke);Qe={...Qe,...e.history.encodeLocation(Qe)},Wl(V==null?e.history.createHref(M.location):typeof V=="string"?V:jr(V),e.history.createHref(Qe.mask||Qe),e.history.createURL("/"),"reject");let ct=J&&J.replace!=null?J.replace:void 0,nt="PUSH";ct===!0?nt="REPLACE":ct===!1||Se!=null&&Mr(Se.formMethod)&&Se.formAction===M.location.pathname+M.location.search&&(nt="REPLACE");let Rt=J&&"preventScrollReset"in J?J.preventScrollReset===!0:void 0,ft=(J&&J.flushSync)===!0,Yt=St({currentLocation:Xe,nextLocation:Qe,historyAction:nt});if(Yt){ht(Yt,{state:"blocked",location:Qe,proceed(){ht(Yt,{state:"proceeding",proceed:void 0,reset:void 0,location:Qe}),Le(V,J)},reset(){let Bt=new Map(M.blockers);Bt.set(Yt,_l),Re({blockers:Bt})}});return}await ze(nt,Qe,{submission:Se,pendingError:qe,preventScrollReset:Rt,replace:J&&J.replace,enableViewTransition:J&&J.viewTransition,flushSync:ft,callSiteDefaultShouldRevalidate:J&&J.defaultShouldRevalidate})}function Oe(){se||(se=SR()),Me(),Re({revalidation:"loading"});let V=se.promise;return M.navigation.state==="submitting"?V:M.navigation.state==="idle"?(ze(M.historyAction,M.location,{startUninterruptedRevalidation:!0}),V):(ze(z||M.historyAction,M.navigation.location,{overrideNavigation:M.navigation,enableViewTransition:B===!0}),V)}async function ze(V,J,re){X&&X.abort(),X=null,z=V,_=(re&&re.startUninterruptedRevalidation)===!0,je(M.location,M.matches),K=(re&&re.preventScrollReset)===!0,B=(re&&re.enableViewTransition)===!0;let ve=d.activeRoutes,Se=re?.initialHydration&&M.matches&&M.matches.length>0&&!T?M.matches:Ys(ve,J,f,!1,d.branches),qe=(re&&re.flushSync)===!0;if(Se&&M.initialized&&!Q&&E6(M.location,J)&&!(re&&re.submission&&Mr(re.submission.formMethod))){be(J,{matches:Se},{flushSync:qe});return}let Ke=Ie(Se,ve,J.pathname);if(Ke.active&&Ke.matches&&(Se=Ke.matches),!Se){let{error:Gt,notFoundMatches:Vt,route:Cn}=yt(J.pathname);be(J,{matches:Vt,loaderData:{},errors:{[Cn.id]:Gt}},{flushSync:qe});return}let Xe=re&&re.overrideNavigation?{...re.overrideNavigation,matches:Se,historyAction:V}:void 0;X=new AbortController;let Qe=Fl(e.history,J,X.signal,re&&re.submission),ct=e.getContext?await e.getContext():new tR,nt;if(re&&re.pendingError)nt=[za(Se).route.id,{type:"error",error:re.pendingError}];else if(re&&re.submission&&Mr(re.submission.formMethod)){let Gt=await Ve(Qe,J,re.submission,Se,V,ct,Ke.active,re&&re.initialHydration===!0,{replace:re.replace,flushSync:qe});if(Gt.shortCircuited)return;if(Gt.pendingActionResult){let[Vt,Cn]=Gt.pendingActionResult;if(ms(Cn)&&Yu(Cn.error)&&Cn.error.status===404){X=null,be(J,{matches:Gt.matches,loaderData:{},errors:{[Vt]:Cn.error}});return}}Se=Gt.matches||Se,nt=Gt.pendingActionResult,Xe=Ey(J,Se,V,re.submission),qe=!1,Ke.active=!1,Qe=Fl(e.history,Qe.url,Qe.signal)}let{shortCircuited:Rt,matches:ft,loaderData:Yt,errors:Bt,workingFetchers:On}=await ke(Qe,J,Se,V,ct,Ke.active,Xe,re&&re.submission,re&&re.fetcherSubmission,re&&re.replace,re&&re.initialHydration===!0,qe,nt,re&&re.callSiteDefaultShouldRevalidate);Rt||(X=null,be(J,{matches:ft||Se,...vR(nt),loaderData:Yt,errors:Bt,...On?{fetchers:On}:{}}))}async function Ve(V,J,re,ve,Se,qe,Ke,Xe,Qe={}){Me();let ct=N6(J,ve,Se,re);if(Re({navigation:ct},{flushSync:Qe.flushSync===!0}),Ke){let ft=await _e(ve,J.pathname,V.signal);if(ft.type==="aborted")return{shortCircuited:!0};if(ft.type==="error"){if(ft.partialMatches.length===0){let{matches:Bt,route:On}=hh(d.activeRoutes);return{matches:Bt,pendingActionResult:[On.id,{type:"error",error:ft.error}]}}let Yt=za(ft.partialMatches).route.id;return{matches:ft.partialMatches,pendingActionResult:[Yt,{type:"error",error:ft.error}]}}else if(ft.matches)ve=ft.matches;else{let{notFoundMatches:Yt,error:Bt,route:On}=yt(J.pathname);return{matches:Yt,pendingActionResult:[On.id,{type:"error",error:Bt}]}}}let nt,Rt=jh(ve,J);if(!Rt.route.action&&!Rt.route.lazy)nt={type:"error",error:Ds(405,{method:V.method,pathname:J.pathname,routeId:Rt.route.id})};else{let ft=Jl(l,u,V,J,ve,Rt,Xe?[]:i,qe),Yt=await Ee(V,J,ft,qe,null);if(nt=Yt[Rt.route.id],!nt){for(let Bt of ve)if(Yt[Bt.route.id]){nt=Yt[Bt.route.id];break}}if(V.signal.aborted)return{shortCircuited:!0}}if(Do(nt)){let ft;return Qe&&Qe.replace!=null?ft=Qe.replace:ft=pR(nt.response.headers.get("Location"),new URL(V.url),f,e.history)===M.location.pathname+M.location.search,await de(V,nt,!0,{submission:re,replace:ft}),{shortCircuited:!0}}if(ms(nt)){let ft=za(ve,Rt.route.id);return(Qe&&Qe.replace)!==!0&&(z="PUSH"),{matches:ve,pendingActionResult:[ft.route.id,nt,Rt.route.id]}}return{matches:ve,pendingActionResult:[Rt.route.id,nt]}}async function ke(V,J,re,ve,Se,qe,Ke,Xe,Qe,ct,nt,Rt,ft,Yt){let Bt=Ke||Ey(J,re,ve,Xe),On=Xe||Qe||xR(Bt),Gt=!_&&!nt;if(qe){if(Gt){let qn=Ue(ft);Re({navigation:Bt,...qn!==void 0?{actionData:qn}:{}},{flushSync:Rt})}let zt=await _e(re,J.pathname,V.signal);if(zt.type==="aborted")return{shortCircuited:!0};if(zt.type==="error"){if(zt.partialMatches.length===0){let{matches:Fn,route:gr}=hh(d.activeRoutes);return{matches:Fn,loaderData:{},errors:{[gr.id]:zt.error}}}let qn=za(zt.partialMatches).route.id;return{matches:zt.partialMatches,loaderData:{},errors:{[qn]:zt.error}}}else if(zt.matches)re=zt.matches;else{let{error:qn,notFoundMatches:Fn,route:gr}=yt(J.pathname);return{matches:Fn,loaderData:{},errors:{[gr.id]:qn}}}}let Vt=d.activeRoutes,{dsMatches:Cn,revalidatingFetchers:Tn}=cR(V,Se,l,u,e.history,M,re,On,J,nt?[]:i,nt===!0,Q,$,Z,I,ae,Vt,f,e.patchRoutesOnNavigation!=null,d.branches,ft,Yt);if(ee=++Y,!e.dataStrategy&&!Cn.some(zt=>zt.shouldLoad)&&!Cn.some(zt=>zt.route.middleware&&zt.route.middleware.length>0)&&Tn.length===0){let zt=new Map(M.fetchers),qn=nn(zt);return be(J,{matches:re,loaderData:{},errors:ft&&ms(ft[1])?{[ft[0]]:ft[1].error}:null,...vR(ft),...qn?{fetchers:zt}:{}},{flushSync:Rt}),{shortCircuited:!0}}if(Gt){let zt={};if(!qe){zt.navigation=Bt;let qn=Ue(ft);qn!==void 0&&(zt.actionData=qn)}Tn.length>0&&(zt.fetchers=xe(Tn)),Re(zt,{flushSync:Rt})}Tn.forEach(zt=>{tn(zt.key),zt.controller&&q.set(zt.key,zt.controller)});let rs=()=>Tn.forEach(zt=>tn(zt.key));X&&X.signal.addEventListener("abort",rs);let{loaderResults:fn,fetcherResults:hn}=await Ge(Cn,Tn,V,J,Se);if(V.signal.aborted)return{shortCircuited:!0};X&&X.signal.removeEventListener("abort",rs),Tn.forEach(zt=>q.delete(zt.key));let An=ph(fn);if(An)return await de(V,An.result,!0,{replace:ct}),{shortCircuited:!0};if(An=ph(hn),An)return ae.add(An.key),await de(V,An.result,!0,{replace:ct}),{shortCircuited:!0};let jn=new Map(M.fetchers),{loaderData:Mi,errors:Pr}=mR(M,re,fn,ft,Tn,hn,jn);nt&&M.errors&&(Pr={...M.errors,...Pr});let Us=nn(jn),ss=et(ee,jn),Ss=Us||ss||Tn.length>0;return{matches:re,loaderData:Mi,errors:Pr,...Ss?{workingFetchers:jn}:{}}}function Ue(V){if(V&&!ms(V[1]))return{[V[0]]:V[1].data};if(M.actionData)return Object.keys(M.actionData).length===0?null:M.actionData}function xe(V){let J=new Map(M.fetchers);return V.forEach(re=>{let ve=J.get(re.key),Se=bu(void 0,ve?ve.data:void 0);J.set(re.key,Se)}),J}async function Fe(V,J,re,ve){tn(V);let Se=(ve&&ve.flushSync)===!0,qe=d.activeRoutes,Ke=lv(M.location,M.matches,f,re,J,ve?.relative),Xe=Ys(qe,Ke,f,!1,d.branches),Qe=Ie(Xe,qe,Ke);if(Qe.active&&Qe.matches&&(Xe=Qe.matches),!Xe){xt(V,J,Ds(404,{pathname:Ke}),{flushSync:Se});return}let{path:ct,submission:nt,error:Rt}=lR(!0,Ke,ve);if(Rt){xt(V,J,Rt,{flushSync:Se});return}let ft=e.getContext?await e.getContext():new tR,Yt=(ve&&ve.preventScrollReset)===!0;if(nt&&Mr(nt.formMethod)){await Ze(V,J,ct,Xe,ft,Qe.active,Se,Yt,nt,ve&&ve.defaultShouldRevalidate);return}I.set(V,{routeId:J,path:ct}),await ot(V,J,ct,Xe,ft,Qe.active,Se,Yt,nt)}async function Ze(V,J,re,ve,Se,qe,Ke,Xe,Qe,ct){Me(),I.delete(V);let nt=M.fetchers.get(V);De(V,D6(Qe,nt),{flushSync:Ke});let Rt=new AbortController,ft=Fl(e.history,re,Rt.signal,Qe);if(qe){let we=await _e(ve,new URL(ft.url).pathname,ft.signal,V);if(we.type==="aborted")return;if(we.type==="error"){xt(V,J,we.error,{flushSync:Ke});return}else if(we.matches)ve=we.matches;else{xt(V,J,Ds(404,{pathname:re}),{flushSync:Ke});return}}let Yt=jh(ve,re);if(!Yt.route.action&&!Yt.route.lazy){let we=Ds(405,{method:Qe.formMethod,pathname:re,routeId:J});xt(V,J,we,{flushSync:Ke});return}q.set(V,Rt);let Bt=Y,On=Jl(l,u,ft,re,ve,Yt,i,Se),Gt=await Ee(ft,re,On,Se,V),Vt=Gt[Yt.route.id];if(!Vt){for(let we of On)if(Gt[we.route.id]){Vt=Gt[we.route.id];break}}if(ft.signal.aborted){q.get(V)===Rt&&q.delete(V);return}if(Z.has(V)){if(Do(Vt)||ms(Vt)){De(V,mi(void 0));return}}else{if(Do(Vt))if(q.delete(V),ee>Bt){De(V,mi(void 0));return}else return ae.add(V),De(V,bu(Qe)),de(ft,Vt,!1,{fetcherSubmission:Qe,preventScrollReset:Xe});if(ms(Vt)){xt(V,J,Vt.error);return}}let Cn=M.navigation.location||M.location,Tn=Fl(e.history,Cn,Rt.signal),rs=d.activeRoutes,fn=M.navigation.state!=="idle"?Ys(rs,M.navigation.location,f,!1,d.branches):M.matches;_t(fn,"Didn't find any matches after fetcher action");let hn=++Y;G.set(V,hn);let{dsMatches:An,revalidatingFetchers:jn}=cR(Tn,Se,l,u,e.history,M,fn,Qe,Cn,i,!1,Q,$,Z,I,ae,rs,f,e.patchRoutesOnNavigation!=null,d.branches,[Yt.route.id,Vt],ct),Mi=bu(Qe,Vt.data),Pr=new Map(M.fetchers);Pr.set(V,Mi),jn.filter(we=>we.key!==V).forEach(we=>{let rt=we.key,Ot=Pr.get(rt),Ct=bu(void 0,Ot?Ot.data:void 0);Pr.set(rt,Ct),tn(rt),we.controller&&q.set(rt,we.controller)}),Re({fetchers:Pr});let Us=()=>jn.forEach(we=>tn(we.key));Rt.signal.addEventListener("abort",Us);let{loaderResults:ss,fetcherResults:Ss}=await Ge(An,jn,Tn,Cn,Se);if(Rt.signal.aborted)return;Rt.signal.removeEventListener("abort",Us),G.delete(V),q.delete(V),jn.forEach(we=>q.delete(we.key));let zt=M.fetchers.has(V),qn=we=>{if(!zt)return we;let rt=new Map(we.fetchers);return rt.set(V,mi(Vt.data)),{...we,fetchers:rt}},Fn=ph(ss);if(Fn)return M=qn(M),de(Tn,Fn.result,!1,{preventScrollReset:Xe});if(Fn=ph(Ss),Fn)return ae.add(Fn.key),M=qn(M),de(Tn,Fn.result,!1,{preventScrollReset:Xe});let gr=new Map(M.fetchers);zt&&gr.set(V,mi(Vt.data));let{loaderData:pe,errors:Ae}=mR(M,fn,ss,void 0,jn,Ss,gr);et(hn,gr),M.navigation.state==="loading"&&hn>ee?(_t(z,"Expected pending action"),X&&X.abort(),be(M.navigation.location,{matches:fn,loaderData:pe,errors:Ae,fetchers:gr})):(Re({errors:Ae,loaderData:yR(M.loaderData,pe,fn,Ae),fetchers:gr}),Q=!1)}async function ot(V,J,re,ve,Se,qe,Ke,Xe,Qe){let ct=M.fetchers.get(V);De(V,bu(Qe,ct?ct.data:void 0),{flushSync:Ke});let nt=new AbortController,Rt=Fl(e.history,re,nt.signal);if(qe){let Vt=await _e(ve,new URL(Rt.url).pathname,Rt.signal,V);if(Vt.type==="aborted")return;if(Vt.type==="error"){xt(V,J,Vt.error,{flushSync:Ke});return}else if(Vt.matches)ve=Vt.matches;else{xt(V,J,Ds(404,{pathname:re}),{flushSync:Ke});return}}let ft=jh(ve,re);q.set(V,nt);let Yt=Y,Bt=Jl(l,u,Rt,re,ve,ft,i,Se),On=await Ee(Rt,re,Bt,Se,V),Gt=On[ft.route.id];if(!Gt){for(let Vt of ve)if(On[Vt.route.id]){Gt=On[Vt.route.id];break}}if(q.get(V)===nt&&q.delete(V),!Rt.signal.aborted){if(Z.has(V)){De(V,mi(void 0));return}if(Do(Gt))if(ee>Yt){De(V,mi(void 0));return}else{ae.add(V),await de(Rt,Gt,!1,{preventScrollReset:Xe});return}if(ms(Gt)){xt(V,J,Gt.error);return}De(V,mi(Gt.data))}}async function de(V,J,re,{submission:ve,fetcherSubmission:Se,preventScrollReset:qe,replace:Ke}={}){re||(L?.resolve(),L=null),J.response.headers.has("X-Remix-Revalidate")&&(Q=!0);let Xe=J.response.headers.get("Location");_t(Xe,"Expected a Location header on the redirect Response");let Qe=Xe,ct=new URL(V.url);Xe=pR(Xe,ct,f,e.history),Wl(Qe,Xe,ct,"allow-explicit");let nt=Vu(M.location,Xe,{_isRedirect:!0});if(s){let Gt=!1;if(J.response.headers.has("X-Remix-Reload-Document"))Gt=!0;else if(Cb(Xe)){const Vt=uO(t,Xe,!0);Gt=Vt.origin!==t.location.origin||ts(Vt.pathname,f)==null}if(Gt){Ke?t.location.replace(Xe):t.location.assign(Xe);return}}X=null;let Rt=Ke===!0||J.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:ft,formAction:Yt,formEncType:Bt}=M.navigation;!ve&&!Se&&ft&&Yt&&Bt&&(ve=xR(M.navigation));let On=ve||Se;if(i6.has(J.response.status)&&On&&Mr(On.formMethod))await ze(Rt,nt,{submission:{...On,formAction:Xe},preventScrollReset:qe||K,enableViewTransition:re?B:void 0});else{let Gt=Ey(nt,[],Rt,ve);await ze(Rt,nt,{overrideNavigation:Gt,fetcherSubmission:Se,preventScrollReset:qe||K,enableViewTransition:re?B:void 0})}}async function Ee(V,J,re,ve,Se){let qe,Ke={};try{qe=await m6(g,V,J,re,Se,ve,!1)}catch(Xe){return re.filter(Qe=>Qe.shouldLoad).forEach(Qe=>{Ke[Qe.route.id]={type:"error",error:Xe}}),Ke}if(V.signal.aborted)return Ke;if(!Mr(V.method))for(let Xe of re){if(qe[Xe.route.id]?.type==="error")break;!qe.hasOwnProperty(Xe.route.id)&&!M.loaderData.hasOwnProperty(Xe.route.id)&&(!M.errors||!M.errors.hasOwnProperty(Xe.route.id))&&Xe.shouldCallHandler()&&(qe[Xe.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${Xe.route.id}`)})}for(let[Xe,Qe]of Object.entries(qe))if(k6(Qe)){let ct=Qe.result;Ke[Xe]={type:"redirect",response:x6(ct,V,Xe,re,f)}}else Ke[Xe]=await b6(Qe);return Ke}async function Ge(V,J,re,ve,Se){let qe=Ee(re,ve,V,Se,null),Ke=Promise.all(J.map(async ct=>{if(ct.matches&&ct.match&&ct.request&&ct.controller){let Rt=(await Ee(ct.request,ct.path,ct.matches,Se,ct.key))[ct.match.route.id];return{[ct.key]:Rt}}else return Promise.resolve({[ct.key]:{type:"error",error:Ds(404,{pathname:ct.path})}})})),Xe=await qe,Qe=(await Ke).reduce((ct,nt)=>Object.assign(ct,nt),{});return{loaderResults:Xe,fetcherResults:Qe}}function Me(){Q=!0,I.forEach((V,J)=>{q.has(J)&&$.add(J),tn(J)})}function De(V,J,re={}){let ve=new Map(M.fetchers);ve.set(V,J),Re({fetchers:ve},{flushSync:(re&&re.flushSync)===!0})}function xt(V,J,re,ve={}){let Se=za(M.matches,J),qe=new Map(M.fetchers);Nt(qe,V),Re({errors:{[Se.route.id]:re},fetchers:qe},{flushSync:(ve&&ve.flushSync)===!0})}function dt(V){return F.set(V,(F.get(V)||0)+1),Z.has(V)&&Z.delete(V),M.fetchers.get(V)||a6}function gt(V,J){tn(V,J?.reason),De(V,mi(null))}function Nt(V,J){let re=M.fetchers.get(J);q.has(J)&&!(re&&re.state==="loading"&&G.has(J))&&tn(J),I.delete(J),G.delete(J),ae.delete(J),Z.delete(J),$.delete(J),V.delete(J)}function jt(V){let J=(F.get(V)||0)-1;J<=0?(F.delete(V),Z.add(V)):F.set(V,J),Re({fetchers:new Map(M.fetchers)})}function tn(V,J){let re=q.get(V);re&&(re.abort(J),q.delete(V))}function an(V,J){for(let re of V){let ve=J.get(re);_t(ve,`Expected fetcher: ${re}`);let Se=mi(ve.data);J.set(re,Se)}}function nn(V){let J=[],re=!1;for(let ve of ae){let Se=V.get(ve);_t(Se,`Expected fetcher: ${ve}`),Se.state==="loading"&&(ae.delete(ve),J.push(ve),re=!0)}return an(J,V),re}function et(V,J){let re=[];for(let[ve,Se]of G)if(Se<V){let qe=J.get(ve);_t(qe,`Expected fetcher: ${ve}`),qe.state==="loading"&&(tn(ve),G.delete(ve),re.push(ve))}return an(re,J),re.length>0}function Et(V,J){let re=M.blockers.get(V)||_l;return ne.get(V)!==J&&ne.set(V,J),re}function Zt(V){M.blockers.delete(V),ne.delete(V)}function ht(V,J){let re=M.blockers.get(V)||_l;_t(re.state==="unblocked"&&J.state==="blocked"||re.state==="blocked"&&J.state==="blocked"||re.state==="blocked"&&J.state==="proceeding"||re.state==="blocked"&&J.state==="unblocked"||re.state==="proceeding"&&J.state==="unblocked",`Invalid blocker state transition: ${re.state} -> ${J.state}`);let ve=new Map(M.blockers);ve.set(V,J),Re({blockers:ve})}function St({currentLocation:V,nextLocation:J,historyAction:re}){if(ne.size===0)return;ne.size>1&&Hn(!1,"A router only supports one blocker at a time");let ve=Array.from(ne.entries()),[Se,qe]=ve[ve.length-1],Ke=M.blockers.get(Se);if(!(Ke&&Ke.state==="proceeding")&&qe({currentLocation:V,nextLocation:J,historyAction:re}))return Se}function yt(V){let J=Ds(404,{pathname:V}),re=d.activeRoutes,{matches:ve,route:Se}=hh(re);return{notFoundMatches:ve,route:Se,error:J}}function Ut(V,J,re){if(w=V,E=J,C=re||null,!R&&M.navigation===wy){R=!0;let ve=at(M.location,M.matches);ve!=null&&Re({restoreScrollPosition:ve})}return()=>{w=null,E=null,C=null}}function dn(V,J){return C&&C(V,J.map(ve=>D_(ve,M.loaderData)))||V.key}function je(V,J){if(w&&E){let re=dn(V,J);w[re]=E()}}function at(V,J){if(w){let re=dn(V,J),ve=w[re];if(typeof ve=="number")return ve}return null}function Ie(V,J,re){if(e.patchRoutesOnNavigation){let ve=d.branches;if(V){if(Object.keys(V[0].params).length>0)return{active:!0,matches:Ys(J,re,f,!0,ve)}}else return{active:!0,matches:Ys(J,re,f,!0,ve)||[]}}return{active:!1,matches:null}}async function _e(V,J,re,ve){if(!e.patchRoutesOnNavigation)return{type:"success",matches:V};let Se=V;for(;;){let qe=u;try{await e.patchRoutesOnNavigation({signal:re,path:J,matches:Se,fetcherKey:ve,patch:(ct,nt)=>{re.aborted||uR(ct,nt,d,qe,l,!1)}})}catch(ct){return{type:"error",error:ct,partialMatches:Se}}if(re.aborted)return{type:"aborted"};let Ke=d.branches,Xe=Ys(d.activeRoutes,J,f,!1,Ke),Qe=null;if(Xe){if(Object.keys(Xe[0].params).length===0)return{type:"success",matches:Xe};if(Qe=Ys(d.activeRoutes,J,f,!0,Ke),!(Qe&&Se.length<Qe.length&&$e(Se,Qe.slice(0,Se.length))))return{type:"success",matches:Xe}}if(Qe||(Qe=Ys(d.activeRoutes,J,f,!0,Ke)),!Qe||$e(Se,Qe))return{type:"success",matches:null};Se=Qe}}function $e(V,J){return V.length===J.length&&V.every((re,ve)=>re.route.id===J[ve].route.id)}function tt(V){u={},d.setHmrRoutes(Ku(V,l,void 0,u))}function kt(V,J,re=!1){uR(V,J,d,u,l,re),d.hasHMRRoutes||Re({})}return D={get basename(){return f},get future(){return m},get state(){return M},get routes(){return d.stableRoutes},get branches(){return d.branches},get manifest(){return u},get window(){return t},initialize:ge,subscribe:ce,enableScrollRestoration:Ut,navigate:Le,fetch:Fe,revalidate:Oe,createHref:V=>e.history.createHref(V),createURL:V=>e.history.createURL(V),encodeLocation:V=>e.history.encodeLocation(V),getFetcher:dt,resetFetcher:gt,deleteFetcher:jt,dispose:fe,getBlocker:Et,deleteBlocker:Zt,patchRoutes:kt,_internalFetchControllers:q,_internalSetRoutes:tt,_internalSetStateDoNotUseOrYouWillBreakYourApp(V){Re(V)}},e.instrumentations&&(D=X_(D,e.instrumentations.map(V=>V.router).filter(Boolean))),D}function u6(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function lv(e,t,s,i,o,l){let u,d;if(o){u=[];for(let g of t)if(u.push(g),g.route.id===o){d=g;break}}else u=t,d=t[t.length-1];let f=gd(i||".",cg(u),ts(e.pathname,s)||e.pathname,l==="path");if(i==null&&(f.search=e.search,f.hash=e.hash),(i==null||i===""||i===".")&&d){let g=Mb(f.search);if(d.route.index&&!g)f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index";else if(!d.route.index&&g){let m=new URLSearchParams(f.search),h=m.getAll("index");m.delete("index"),h.filter(S=>S).forEach(S=>m.append("index",S));let x=m.toString();f.search=x?`?${x}`:""}}return s!=="/"&&(f.pathname=V_({basename:s,pathname:f.pathname})),jr(f)}function lR(e,t,s){if(!s||!u6(s))return{path:t};if(s.formMethod&&!M6(s.formMethod))return{path:t,error:Ds(405,{method:s.formMethod})};let i=()=>({path:t,error:Ds(400,{type:"invalid-body"})}),l=(s.formMethod||"get").toUpperCase(),u=DO(t);if(s.body!==void 0){if(s.formEncType==="text/plain"){if(!Mr(l))return i();let h=typeof s.body=="string"?s.body:s.body instanceof FormData||s.body instanceof URLSearchParams?Array.from(s.body.entries()).reduce((x,[S,w])=>`${x}${S}=${w}
47
+ `,""):String(s.body);return{path:t,submission:{formMethod:l,formAction:u,formEncType:s.formEncType,formData:void 0,json:void 0,text:h}}}else if(s.formEncType==="application/json"){if(!Mr(l))return i();try{let h=typeof s.body=="string"?JSON.parse(s.body):s.body;return{path:t,submission:{formMethod:l,formAction:u,formEncType:s.formEncType,formData:void 0,json:h,text:void 0}}}catch{return i()}}}_t(typeof FormData=="function","FormData is not available in this environment");let d,f;if(s.formData)d=dv(s.formData),f=s.formData;else if(s.body instanceof FormData)d=dv(s.body),f=s.body;else if(s.body instanceof URLSearchParams)d=s.body,f=gR(d);else if(s.body==null)d=new URLSearchParams,f=new FormData;else try{d=new URLSearchParams(s.body),f=gR(d)}catch{return i()}let g={formMethod:l,formAction:u,formEncType:s&&s.formEncType||"application/x-www-form-urlencoded",formData:f,json:void 0,text:void 0};if(Mr(g.formMethod))return{path:t,submission:g};let m=ni(t);return e&&m.search&&Mb(m.search)&&d.append("index",""),m.search=`?${d}`,{path:jr(m),submission:g}}function cR(e,t,s,i,o,l,u,d,f,g,m,h,x,S,w,C,E,R,O,T,A,N){let j=A?ms(A[1])?A[1].error:A[1].data:void 0,D=o.createURL(l.location),M=o.createURL(f),z;if(m&&l.errors){let _=Object.keys(l.errors)[0];z=u.findIndex(Q=>Q.route.id===_)}else if(A&&ms(A[1])){let _=A[0];z=u.findIndex(Q=>Q.route.id===_)-1}let L=A?A[1].statusCode:void 0,K=L&&L>=400,X={currentUrl:D,currentParams:l.matches[0]?.params||{},nextUrl:M,nextParams:u[0].params,...d,actionResult:j,actionStatus:L},B=yd(u),H=u.map((_,Q)=>{let{route:$}=_,q=null;if(z!=null&&Q>z)q=!1;else if($.lazy)q=!0;else if(!Ob($))q=!1;else if(m){let{shouldLoad:ae}=CO($,l.loaderData,l.errors);q=ae}else d6(l.loaderData,l.matches[Q],_)&&(q=!0);if(q!==null)return cv(s,i,e,f,B,_,g,t,q);let Y=!1;typeof N=="boolean"?Y=N:K?Y=!1:(h||D.pathname+D.search===M.pathname+M.search||D.search!==M.search||f6(l.matches[Q],_))&&(Y=!0);let ee={...X,defaultShouldRevalidate:Y},G=Du(_,ee);return cv(s,i,e,f,B,_,g,t,G,ee,N)}),U=[];return w.forEach((_,Q)=>{if(m||!u.some(F=>F.route.id===_.routeId)||S.has(Q))return;let $=l.fetchers.get(Q),q=$&&$.state!=="idle"&&$.data===void 0,Y=Ys(E,_.path,R??"/",!1,T);if(!Y){if(O&&q)return;U.push({key:Q,routeId:_.routeId,path:_.path,matches:null,match:null,request:null,controller:null});return}if(C.has(Q))return;let ee=jh(Y,_.path),G=new AbortController,ae=Fl(o,_.path,G.signal),I=null;if(x.has(Q))x.delete(Q),I=Jl(s,i,ae,_.path,Y,ee,g,t);else if(q)h&&(I=Jl(s,i,ae,_.path,Y,ee,g,t));else{let F;typeof N=="boolean"?F=N:K?F=!1:F=h;let Z={...X,defaultShouldRevalidate:F};Du(ee,Z)&&(I=Jl(s,i,ae,_.path,Y,ee,g,t,Z))}I&&U.push({key:Q,routeId:_.routeId,path:_.path,matches:I,match:ee,request:ae,controller:G})}),{dsMatches:H,revalidatingFetchers:U}}function Ob(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function CO(e,t,s){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!Ob(e))return{shouldLoad:!1,renderFallback:!1};let i=t!=null&&e.id in t,o=s!=null&&s[e.id]!==void 0;if(!i&&o)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader=="function"&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!i};let l=!i&&!o;return{shouldLoad:l,renderFallback:l}}function d6(e,t,s){let i=!t||s.route.id!==t.route.id,o=!e.hasOwnProperty(s.route.id);return i||o}function f6(e,t){let s=e.route.path;return e.pathname!==t.pathname||s!=null&&s.endsWith("*")&&e.params["*"]!==t.params["*"]}function Du(e,t){if(e.route.shouldRevalidate){let s=e.route.shouldRevalidate(t);if(typeof s=="boolean")return s}return t.defaultShouldRevalidate}function uR(e,t,s,i,o,l){let u;if(e){let g=i[e];_t(g,`No route found to patch children into: routeId = ${e}`),g.children||(g.children=[]),u=g.children}else u=s.activeRoutes;let d=[],f=[];if(t.forEach(g=>{let m=u.find(h=>TO(g,h));m?f.push({existingRoute:m,newRoute:g}):d.push(g)}),d.length>0){let g=Ku(d,o,[e||"_","patch",String(u?.length||"0")],i);u.push(...g)}if(l&&f.length>0)for(let g=0;g<f.length;g++){let{existingRoute:m,newRoute:h}=f[g],x=m,[S]=Ku([h],o,[],{},!0);Object.assign(x,{element:S.element?S.element:x.element,errorElement:S.errorElement?S.errorElement:x.errorElement,hydrateFallbackElement:S.hydrateFallbackElement?S.hydrateFallbackElement:x.hydrateFallbackElement})}s.hasHMRRoutes||s.setRoutes([...s.activeRoutes])}function TO(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children?.every((s,i)=>t.children?.some(o=>TO(s,o)))??!1:!1}var dR=new WeakMap,kO=({key:e,route:t,manifest:s,mapRouteProperties:i})=>{let o=s[t.id];if(_t(o,"No route found in manifest"),!o.lazy||typeof o.lazy!="object")return;let l=o.lazy[e];if(!l)return;let u=dR.get(o);u||(u={},dR.set(o,u));let d=u[e];if(d)return d;let f=(async()=>{let g=O_(e),h=o[e]!==void 0&&e!=="hasErrorBoundary";if(g)Hn(!g,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),u[e]=Promise.resolve();else if(h)Hn(!1,`Route "${o.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let x=await l();x!=null&&(Object.assign(o,{[e]:x}),Object.assign(o,i(o)))}typeof o.lazy=="object"&&(o.lazy[e]=void 0,Object.values(o.lazy).every(x=>x===void 0)&&(o.lazy=void 0))})();return u[e]=f,f},fR=new WeakMap;function h6(e,t,s,i,o){let l=s[e.id];if(_t(l,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let m=fR.get(l);if(m)return{lazyRoutePromise:m,lazyHandlerPromise:m};let h=(async()=>{_t(typeof e.lazy=="function","No lazy route function found");let x=await e.lazy(),S={};for(let w in x){let C=x[w];if(C===void 0)continue;let E=M_(w),O=l[w]!==void 0&&w!=="hasErrorBoundary";E?Hn(!E,"Route property "+w+" is not a supported property to be returned from a lazy route function. This property will be ignored."):O?Hn(!O,`Route "${l.id}" has a static property "${w}" defined but its lazy function is also returning a value for this property. The lazy route property "${w}" will be ignored.`):S[w]=C}Object.assign(l,S),Object.assign(l,{...i(l),lazy:void 0})})();return fR.set(l,h),h.catch(()=>{}),{lazyRoutePromise:h,lazyHandlerPromise:h}}let u=Object.keys(e.lazy),d=[],f;for(let m of u){if(o&&o.includes(m))continue;let h=kO({key:m,route:e,manifest:s,mapRouteProperties:i});h&&(d.push(h),m===t&&(f=h))}let g=d.length>0?Promise.all(d).then(()=>{}):void 0;return g?.catch(()=>{}),f?.catch(()=>{}),{lazyRoutePromise:g,lazyHandlerPromise:f}}async function hR(e){let t=e.matches.filter(o=>o.shouldLoad),s={};return(await Promise.all(t.map(o=>o.resolve()))).forEach((o,l)=>{s[t[l].route.id]=o}),s}async function p6(e){return e.matches.some(t=>t.route.middleware)?OO(e,()=>hR(e)):hR(e)}function OO(e,t){return g6(e,t,i=>{if(A6(i))throw i;return i},C6,s);function s(i,o,l){if(l)return Promise.resolve(Object.assign(l.value,{[o]:{type:"error",result:i}}));{let{matches:u}=e,d=Math.min(Math.max(u.findIndex(g=>g.route.id===o),0),Math.max(u.findIndex(g=>g.shouldCallHandler()),0)),f=za(u,u[d].route.id).route.id;return Promise.resolve({[f]:{type:"error",result:i}})}}}async function g6(e,t,s,i,o){let{matches:l,...u}=e,d=l.flatMap(g=>g.route.middleware?g.route.middleware.map(m=>[g.route.id,m]):[]);return await AO(u,d,t,s,i,o)}async function AO(e,t,s,i,o,l,u=0){let{request:d}=e;if(d.signal.aborted)throw d.signal.reason??new Error(`Request aborted: ${d.method} ${d.url}`);let f=t[u];if(!f)return await s();let[g,m]=f,h,x=async()=>{if(h)throw new Error("You may only call `next()` once per middleware");try{return h={value:await AO(e,t,s,i,o,l,u+1)},h.value}catch(S){return h={value:await l(S,g,h)},h.value}};try{let S=await m(e,x),w=S!=null?i(S):void 0;return o(w)?w:h?w??h.value:(h={value:await x()},h.value)}catch(S){return await l(S,g,h)}}function MO(e,t,s,i,o){let l=kO({key:"middleware",route:i.route,manifest:t,mapRouteProperties:e}),u=h6(i.route,Mr(s.method)?"action":"loader",t,e,o);return{middleware:l,route:u.lazyRoutePromise,handler:u.lazyHandlerPromise}}function cv(e,t,s,i,o,l,u,d,f,g=null,m){let h=!1,x=MO(e,t,s,l,u);return{...l,_lazyPromises:x,shouldLoad:f,shouldRevalidateArgs:g,shouldCallHandler(S){return h=!0,g?typeof m=="boolean"?Du(l,{...g,defaultShouldRevalidate:m}):typeof S=="boolean"?Du(l,{...g,defaultShouldRevalidate:S}):Du(l,g):f},resolve(S){let{lazy:w,loader:C,middleware:E}=l.route,R=h||f||S&&!Mr(s.method)&&(w||C),O=E&&E.length>0&&!C&&!w;return R&&(Mr(s.method)||!O)?y6({request:s,path:i,pattern:o,match:l,lazyHandlerPromise:x?.handler,lazyRoutePromise:x?.route,handlerOverride:S,scopedContext:d}):Promise.resolve({type:"data",result:void 0})}}}function Jl(e,t,s,i,o,l,u,d,f=null){return o.map(g=>g.route.id!==l.route.id?{...g,shouldLoad:!1,shouldRevalidateArgs:f,shouldCallHandler:()=>!1,_lazyPromises:MO(e,t,s,g,u),resolve:()=>Promise.resolve({type:"data",result:void 0})}:cv(e,t,s,i,yd(o),g,u,d,!0,f))}async function m6(e,t,s,i,o,l,u){i.some(m=>m._lazyPromises?.middleware)&&await Promise.all(i.map(m=>m._lazyPromises?.middleware));let d={request:t,url:NO(t,s),pattern:yd(i),params:i[0].params,context:l,matches:i},g=await e({...d,fetcherKey:o,runClientMiddleware:m=>{let h=d;return OO(h,()=>m({...h,fetcherKey:o,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(i.flatMap(m=>[m._lazyPromises?.handler,m._lazyPromises?.route]))}catch{}return g}async function y6({request:e,path:t,pattern:s,match:i,lazyHandlerPromise:o,lazyRoutePromise:l,handlerOverride:u,scopedContext:d}){let f,g,m=Mr(e.method),h=m?"action":"loader",x=S=>{let w,C=new Promise((O,T)=>w=T);g=()=>w(),e.signal.addEventListener("abort",g);let E=O=>typeof S!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${h}" [routeId: ${i.route.id}]`)):S({request:e,url:NO(e,t),pattern:s,params:i.params,context:d},...O!==void 0?[O]:[]),R=(async()=>{try{return{type:"data",result:await(u?u(T=>E(T)):E())}}catch(O){return{type:"error",result:O}}})();return Promise.race([R,C])};try{let S=m?i.route.action:i.route.loader;if(o||l)if(S){let w,[C]=await Promise.all([x(S).catch(E=>{w=E}),o,l]);if(w!==void 0)throw w;f=C}else{await o;let w=m?i.route.action:i.route.loader;if(w)[f]=await Promise.all([x(w),l]);else if(h==="action"){let C=new URL(e.url),E=C.pathname+C.search;throw Ds(405,{method:e.method,pathname:E,routeId:i.route.id})}else return{type:"data",result:void 0}}else if(S)f=await x(S);else{let w=new URL(e.url),C=w.pathname+w.search;throw Ds(404,{pathname:C})}}catch(S){return{type:"error",result:S}}finally{g&&e.signal.removeEventListener("abort",g)}return f}async function v6(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function b6(e){let{result:t,type:s}=e;if(Ab(t)){let i;try{i=await v6(t)}catch(o){return{type:"error",error:o}}return s==="error"?{type:"error",error:new md(t.status,t.statusText,i),statusCode:t.status,headers:t.headers}:{type:"data",data:i,statusCode:t.status,headers:t.headers}}return s==="error"?bR(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:R6(t),statusCode:Yu(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:Yu(t)?t.status:void 0}:bR(t)?{type:"data",data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function x6(e,t,s,i,o){let l=e.headers.get("Location");if(_t(l,"Redirects returned/thrown from loaders/actions must have a Location header"),!Cb(l)){let u=i.slice(0,i.findIndex(d=>d.route.id===s)+1);l=lv(new URL(t.url),u,o,l),e.headers.set("Location",l)}return e}var S6=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function uv(e){try{return S6.includes(new URL(e).protocol)}catch{return!1}}function pR(e,t,s,i){if(Cb(e)){let o=e,l=lg.test(o)?new URL(cO(o,t.protocol)):new URL(o);if(uv(l.toString()))throw new Error("Invalid redirect location");let u=ts(l.pathname,s)!=null;if(l.origin===t.origin&&u)return Tb(l.pathname)+l.search+l.hash}try{let o=i.createURL(e);if(uv(o.toString()))throw new Error("Invalid redirect location")}catch{}return e}function Fl(e,t,s,i){let o=e.createURL(DO(t)).toString(),l={signal:s};if(i&&Mr(i.formMethod)){let{formMethod:u,formEncType:d}=i;l.method=u.toUpperCase(),d==="application/json"?(l.headers=new Headers({"Content-Type":d}),l.body=JSON.stringify(i.json)):d==="text/plain"?l.body=i.text:d==="application/x-www-form-urlencoded"&&i.formData?l.body=dv(i.formData):l.body=i.formData}return new Request(o,l)}function NO(e,t){let s=new URL(e.url),i=typeof t=="string"?ni(t):t;if(s.pathname=i.pathname||"/",i.search){let o=new URLSearchParams(i.search),l=o.getAll("index");o.delete("index");for(let u of l.filter(Boolean))o.append("index",u);s.search=o.size?`?${o.toString()}`:""}else s.search="";return s.hash=i.hash||"",s}function dv(e){let t=new URLSearchParams;for(let[s,i]of e.entries())t.append(s,typeof i=="string"?i:i.name);return t}function gR(e){let t=new FormData;for(let[s,i]of e.entries())t.append(s,i);return t}function w6(e,t,s,i=!1,o=!1){let l={},u=null,d,f=!1,g={},m=s&&ms(s[1])?s[1].error:void 0;return e.forEach(h=>{if(!(h.route.id in t))return;let x=h.route.id,S=t[x];if(_t(!Do(S),"Cannot handle redirect results in processLoaderData"),ms(S)){let w=S.error;if(m!==void 0&&(w=m,m=void 0),u=u||{},o)u[x]=w;else{let C=za(e,x);u[C.route.id]==null&&(u[C.route.id]=w)}i||(l[x]=RO),f||(f=!0,d=Yu(S.error)?S.error.status:500),S.headers&&(g[x]=S.headers)}else l[x]=S.data,S.statusCode&&S.statusCode!==200&&!f&&(d=S.statusCode),S.headers&&(g[x]=S.headers)}),m!==void 0&&s&&(u={[s[0]]:m},s[2]&&(l[s[2]]=void 0)),{loaderData:l,errors:u,statusCode:d||200,loaderHeaders:g}}function mR(e,t,s,i,o,l,u){let{loaderData:d,errors:f}=w6(t,s,i);return o.filter(g=>!g.matches||g.matches.some(m=>m.shouldLoad)).forEach(g=>{let{key:m,match:h,controller:x}=g;if(x&&x.signal.aborted)return;let S=l[m];if(_t(S,"Did not find corresponding fetcher result"),ms(S)){let w=za(e.matches,h?.route.id);f&&f[w.route.id]||(f={...f,[w.route.id]:S.error}),u.delete(m)}else if(Do(S))_t(!1,"Unhandled fetcher revalidation redirect");else{let w=mi(S.data);u.set(m,w)}}),{loaderData:d,errors:f}}function yR(e,t,s,i){let o=Object.entries(t).filter(([,l])=>l!==RO).reduce((l,[u,d])=>(l[u]=d,l),{});for(let l of s){let u=l.route.id;if(!t.hasOwnProperty(u)&&e.hasOwnProperty(u)&&l.route.loader&&(o[u]=e[u]),i&&i.hasOwnProperty(u))break}return o}function vR(e){return e?ms(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function za(e,t){return(t?e.slice(0,e.findIndex(i=>i.route.id===t)+1):[...e]).reverse().find(i=>i.route.hasErrorBoundary===!0)||e[0]}function hh(e){let t=e.length===1?e[0]:e.find(s=>s.index||!s.path||s.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Ds(e,{pathname:t,routeId:s,method:i,type:o,message:l}={}){let u="Unknown Server Error",d="Unknown @remix-run/router error";return e===400?(u="Bad Request",i&&t&&s?d=`You made a ${i} request to "${t}" but did not provide a \`loader\` for route "${s}", so there is no way to handle the request.`:o==="invalid-body"&&(d="Unable to encode submission body")):e===403?(u="Forbidden",d=`Route "${s}" does not match URL "${t}"`):e===404?(u="Not Found",d=`No route matches URL "${t}"`):e===405&&(u="Method Not Allowed",i&&t&&s?d=`You made a ${i.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${s}", so there is no way to handle the request.`:i&&(d=`Invalid request method "${i.toUpperCase()}"`)),new md(e||500,u,new Error(d),!0)}function ph(e){let t=Object.entries(e);for(let s=t.length-1;s>=0;s--){let[i,o]=t[s];if(Do(o))return{key:i,result:o}}}function DO(e){let t=typeof e=="string"?ni(e):e;return jr({...t,hash:""})}function E6(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function R6(e){return new md(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function C6(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,s])=>typeof t=="string"&&T6(s))}function T6(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function k6(e){return Ab(e.result)&&wO.has(e.result.status)}function ms(e){return e.type==="error"}function Do(e){return(e&&e.type)==="redirect"}function bR(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Ab(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function O6(e){return wO.has(e)}function A6(e){return Ab(e)&&O6(e.status)&&e.headers.has("Location")}function M6(e){return s6.has(e.toUpperCase())}function Mr(e){return n6.has(e.toUpperCase())}function Mb(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function jh(e,t){let s=typeof t=="string"?ni(t).search:t.search;if(e[e.length-1].route.index&&Mb(s||""))return e[e.length-1];let i=yO(e);return i[i.length-1]}function xR(e){let{formMethod:t,formAction:s,formEncType:i,text:o,formData:l,json:u}=e;if(!(!t||!s||!i)){if(o!=null)return{formMethod:t,formAction:s,formEncType:i,formData:void 0,json:void 0,text:o};if(l!=null)return{formMethod:t,formAction:s,formEncType:i,formData:l,json:void 0,text:void 0};if(u!==void 0)return{formMethod:t,formAction:s,formEncType:i,formData:void 0,json:u,text:void 0}}}function Ey(e,t,s,i){return i?{state:"loading",location:e,matches:t,historyAction:s,formMethod:i.formMethod,formAction:i.formAction,formEncType:i.formEncType,formData:i.formData,json:i.json,text:i.text}:{state:"loading",location:e,matches:t,historyAction:s,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function N6(e,t,s,i){return{state:"submitting",location:e,matches:t,historyAction:s,formMethod:i.formMethod,formAction:i.formAction,formEncType:i.formEncType,formData:i.formData,json:i.json,text:i.text}}function bu(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function D6(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function mi(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function j6(e,t){try{let s=e.sessionStorage.getItem(EO);if(s){let i=JSON.parse(s);for(let[o,l]of Object.entries(i||{}))l&&Array.isArray(l)&&t.set(o,new Set(l||[]))}}catch{}}function I6(e,t){if(t.size>0){let s={};for(let[i,o]of t)s[i]=[...o];try{e.sessionStorage.setItem(EO,JSON.stringify(s))}catch(i){Hn(!1,`Failed to save applied view transitions in sessionStorage (${i}).`)}}}function SR(){let e,t,s=new Promise((i,o)=>{e=async l=>{i(l);try{await s}catch{}},t=async l=>{o(l);try{await s}catch{}}});return{promise:s,resolve:e,reject:t}}var Vo=b.createContext(null);Vo.displayName="DataRouter";var vd=b.createContext(null);vd.displayName="DataRouterState";var jO=b.createContext(!1);function IO(){return b.useContext(jO)}var Nb=b.createContext({isTransitioning:!1});Nb.displayName="ViewTransition";var PO=b.createContext(new Map);PO.displayName="Fetchers";var P6=b.createContext(null);P6.displayName="Await";var xs=b.createContext(null);xs.displayName="Navigation";var ug=b.createContext(null);ug.displayName="Location";var _s=b.createContext({outlet:null,matches:[],isDataRoute:!1});_s.displayName="Route";var Db=b.createContext(null);Db.displayName="RouteError";var LO="REACT_ROUTER_ERROR",L6="REDIRECT",z6="ROUTE_ERROR_RESPONSE";function _6(e){if(e.startsWith(`${LO}:${L6}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function U6(e){if(e.startsWith(`${LO}:${z6}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new md(t.status,t.statusText,t.data)}catch{}}function H6(e,{relative:t}={}){_t(Ko(),"useHref() may be used only in the context of a <Router> component.");let{basename:s,navigator:i}=b.useContext(xs),{hash:o,pathname:l,search:u}=bd(e,{relative:t}),d=l;return s!=="/"&&(d=l==="/"?s:Ps([s,l])),i.createHref({pathname:d,search:u,hash:o})}function Ko(){return b.useContext(ug)!=null}function Tr(){return _t(Ko(),"useLocation() may be used only in the context of a <Router> component."),b.useContext(ug).location}function F6(e){_t(Ko(),"useMatch() may be used only in the context of a <Router> component.");let{pathname:t}=Tr();return b.useMemo(()=>qu(e,mO(t)),[t,e])}var zO="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function _O(e){b.useContext(xs).static||b.useLayoutEffect(e)}function qo(){let{isDataRoute:e}=b.useContext(_s);return e?r8():B6()}function B6(){_t(Ko(),"useNavigate() may be used only in the context of a <Router> component.");let e=b.useContext(Vo),{basename:t,navigator:s}=b.useContext(xs),{matches:i}=b.useContext(_s),{pathname:o}=Tr(),l=JSON.stringify(cg(i)),u=b.useRef(!1);return _O(()=>{u.current=!0}),b.useCallback((f,g={})=>{if(Hn(u.current,zO),!u.current)return;if(typeof f=="number"){s.go(f);return}let m=gd(f,JSON.parse(l),o,g.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:Ps([t,m.pathname])),Wl(typeof f=="string"?f:jr(f),s.createHref(m),kb(s),"reject"),(g.replace?s.replace:s.push)(m,g.state,g)},[t,s,l,o,e])}var V6=b.createContext(null);function K6(e){let t=b.useContext(_s).outlet;return b.useMemo(()=>t&&b.createElement(V6.Provider,{value:e},t),[t,e])}function q6(){let{matches:e}=b.useContext(_s);return e[e.length-1]?.params??{}}function bd(e,{relative:t}={}){let{matches:s}=b.useContext(_s),{pathname:i}=Tr(),o=JSON.stringify(cg(s));return b.useMemo(()=>gd(e,JSON.parse(o),i,t==="path"),[e,o,i,t])}function Y6(e,t,s){_t(Ko(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=b.useContext(xs),{matches:o}=b.useContext(_s),l=o[o.length-1],u=l?l.params:{},d=l?l.pathname:"/",f=l?l.pathnameBase:"/",g=l&&l.route;{let E=g&&g.path||"";BO(d,!g||E.endsWith("*")||E.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${E}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
48
+
49
+ Please change the parent <Route path="${E}"> to <Route path="${E==="/"?"*":`${E}/*`}">.`)}let m=Tr(),h;h=m;let x=h.pathname||"/",S=x;if(f!=="/"){let E=f.replace(/^\//,"").split("/");S="/"+x.replace(/^\//,"").split("/").slice(E.length).join("/")}let w=s&&s.state.matches.length?s.state.matches.map(E=>Object.assign(E,{route:s.manifest[E.route.id]||E.route})):dO(e,{pathname:S});return Hn(g||w!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),Hn(w==null||w[w.length-1].route.element!==void 0||w[w.length-1].route.Component!==void 0||w[w.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),Z6(w&&w.map(E=>Object.assign({},E,{params:Object.assign({},u,E.params),pathname:Ps([f,i.encodeLocation?i.encodeLocation(E.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?f:Ps([f,i.encodeLocation?i.encodeLocation(E.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathnameBase])})),o,s)}function G6(){let e=e8(),t=Yu(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),s=e instanceof Error?e.stack:null,i="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:i},l={padding:"2px 4px",backgroundColor:i},u=null;return console.error("Error handled by React Router default ErrorBoundary:",e),u=b.createElement(b.Fragment,null,b.createElement("p",null,"💿 Hey developer 👋"),b.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",b.createElement("code",{style:l},"ErrorBoundary")," or"," ",b.createElement("code",{style:l},"errorElement")," prop on your route.")),b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},t),s?b.createElement("pre",{style:o},s):null,u)}var $6=b.createElement(G6,null),UO=class extends b.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const s=U6(e.digest);s&&(e=s)}let t=e!==void 0?b.createElement(_s.Provider,{value:this.props.routeContext},b.createElement(Db.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?b.createElement(Q6,{error:e},t):t}};UO.contextType=jO;var Ry=new WeakMap;function Q6({children:e,error:t}){let{basename:s,navigator:i}=b.useContext(xs);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let o=_6(t.digest);if(o){let l=Ry.get(t);if(l)throw l;let u=bO(o.location,s),d=u.absoluteURL||u.to;if(Wl(o.location,d,kb(i),"allow-explicit"),uv(d))throw new Error("Invalid redirect location");if(vO&&!Ry.get(t))if(u.isExternal||o.reloadDocument)window.location.href=d;else{const f=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(u.to,{replace:o.replace}));throw Ry.set(t,f),f}return b.createElement("meta",{httpEquiv:"refresh",content:`0;url=${d}`})}}return e}function X6({routeContext:e,match:t,children:s}){let i=b.useContext(Vo);return i&&i.static&&i.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=t.route.id),b.createElement(_s.Provider,{value:e},s)}function Z6(e,t=[],s){let i=s?.state;if(e==null){if(!i)return null;if(i.errors)e=i.matches;else if(t.length===0&&!i.initialized&&i.matches.length>0)e=i.matches;else return null}let o=e,l=i?.errors;if(l!=null){let m=o.findIndex(h=>h.route.id&&l?.[h.route.id]!==void 0);_t(m>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),o=o.slice(0,Math.min(o.length,m+1))}let u=!1,d=-1;if(s&&i){u=i.renderFallback;for(let m=0;m<o.length;m++){let h=o[m];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(d=m),h.route.id){let{loaderData:x,errors:S}=i,w=h.route.loader&&!x.hasOwnProperty(h.route.id)&&(!S||S[h.route.id]===void 0);if(h.route.lazy||w){s.isStatic&&(u=!0),d>=0?o=o.slice(0,d+1):o=[o[0]];break}}}}let f=s?.onError,g=i&&f?(m,h)=>{f(m,{location:i.location,params:i.matches?.[0]?.params??{},pattern:yd(i.matches),errorInfo:h})}:void 0;return o.reduceRight((m,h,x)=>{let S,w=!1,C=null,E=null;i&&(S=l&&h.route.id?l[h.route.id]:void 0,C=h.route.errorElement||$6,u&&(d<0&&x===0?(BO("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,E=null):d===x&&(w=!0,E=h.route.hydrateFallbackElement||null)));let R=t.concat(o.slice(0,x+1)),O=()=>{let T;return S?T=C:w?T=E:h.route.Component?T=b.createElement(h.route.Component,null):h.route.element?T=h.route.element:T=m,b.createElement(X6,{match:h,routeContext:{outlet:m,matches:R,isDataRoute:i!=null},children:T})};return i&&(h.route.ErrorBoundary||h.route.errorElement||x===0)?b.createElement(UO,{location:i.location,revalidation:i.revalidation,component:C,error:S,children:O(),routeContext:{outlet:null,matches:R,isDataRoute:!0},onError:g}):O()},null)}function jb(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function HO(e){let t=b.useContext(Vo);return _t(t,jb(e)),t}function FO(e){let t=b.useContext(vd);return _t(t,jb(e)),t}function W6(e){let t=b.useContext(_s);return _t(t,jb(e)),t}function Ib(e){let t=W6(e),s=t.matches[t.matches.length-1];return _t(s.route.id,`${e} can only be used on routes that contain a unique "id"`),s.route.id}function J6(){return Ib("useRouteId")}function e8(){let e=b.useContext(Db),t=FO("useRouteError"),s=Ib("useRouteError");return e!==void 0?e:t.errors?.[s]}var t8=0;function n8(e){let{router:t,basename:s}=HO("useBlocker"),i=FO("useBlocker"),[o,l]=b.useState(""),u=b.useCallback(d=>{if(typeof e!="function")return!!e;if(s==="/")return e(d);let{currentLocation:f,nextLocation:g,historyAction:m}=d;return e({currentLocation:{...f,pathname:ts(f.pathname,s)||f.pathname},nextLocation:{...g,pathname:ts(g.pathname,s)||g.pathname},historyAction:m})},[s,e]);return b.useEffect(()=>{let d=String(++t8);return l(d),()=>t.deleteBlocker(d)},[t]),b.useEffect(()=>{o!==""&&t.getBlocker(o,u)},[t,o,u]),o&&i.blockers.has(o)?i.blockers.get(o):_l}function r8(){let{router:e}=HO("useNavigate"),t=Ib("useNavigate"),s=b.useRef(!1);return _O(()=>{s.current=!0}),b.useCallback(async(o,l={})=>{Hn(s.current,zO),s.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:t,...l}))},[e,t])}var wR={};function BO(e,t,s){!t&&!wR[e]&&(wR[e]=!0,Hn(!1,s))}var ER={};function RR(e,t){!e&&!ER[t]&&(ER[t]=!0,console.warn(t))}var s8="useOptimistic",CR=rC[s8],i8=()=>{};function a8(e){return CR?CR(e):[e,i8]}function o8(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&Hn(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:b.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&Hn(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:b.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&Hn(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:b.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var l8=["HydrateFallback","hydrateFallbackElement"],c8=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=s=>{this.status==="pending"&&(this.status="resolved",e(s))},this.reject=s=>{this.status==="pending"&&(this.status="rejected",t(s))}})}};function u8({router:e,flushSync:t,onError:s,useTransitions:i}){i=IO()||i;let[l,u]=b.useState(e.state),[d,f]=a8(l),[g,m]=b.useState(),[h,x]=b.useState({isTransitioning:!1}),[S,w]=b.useState(),[C,E]=b.useState(),[R,O]=b.useState(),T=b.useRef(new Map),A=b.useCallback((M,{deletedFetchers:z,newErrors:L,flushSync:K,viewTransitionOpts:X})=>{L&&s&&Object.values(L).forEach(H=>s(H,{location:M.location,params:M.matches[0]?.params??{},pattern:yd(M.matches)})),M.fetchers.forEach((H,U)=>{H.data!==void 0&&T.current.set(U,H.data)}),z.forEach(H=>T.current.delete(H)),RR(K===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let B=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(RR(X==null||B,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!X||!B){t&&K?t(()=>u(M)):i===!1?u(M):b.startTransition(()=>{i===!0&&f(H=>TR(H,M)),u(M)});return}if(t&&K){t(()=>{C&&(S?.resolve(),C.skipTransition()),x({isTransitioning:!0,flushSync:!0,currentLocation:X.currentLocation,nextLocation:X.nextLocation})});let H=e.window.document.startViewTransition(()=>{t(()=>u(M))});H.finished.finally(()=>{t(()=>{w(void 0),E(void 0),m(void 0),x({isTransitioning:!1})})}),t(()=>E(H));return}C?(S?.resolve(),C.skipTransition(),O({state:M,currentLocation:X.currentLocation,nextLocation:X.nextLocation})):(m(M),x({isTransitioning:!0,flushSync:!1,currentLocation:X.currentLocation,nextLocation:X.nextLocation}))},[e.window,t,C,S,i,f,s]);b.useLayoutEffect(()=>e.subscribe(A),[e,A]),b.useEffect(()=>{h.isTransitioning&&!h.flushSync&&w(new c8)},[h]),b.useEffect(()=>{if(S&&g&&e.window){let M=g,z=S.promise,L=e.window.document.startViewTransition(async()=>{i===!1?u(M):b.startTransition(()=>{i===!0&&f(K=>TR(K,M)),u(M)}),await z});L.finished.finally(()=>{w(void 0),E(void 0),m(void 0),x({isTransitioning:!1})}),E(L)}},[g,S,e.window,i,f]),b.useEffect(()=>{S&&g&&d.location.key===g.location.key&&S.resolve()},[S,C,d.location,g]),b.useEffect(()=>{!h.isTransitioning&&R&&(m(R.state),x({isTransitioning:!0,flushSync:!1,currentLocation:R.currentLocation,nextLocation:R.nextLocation}),O(void 0))},[h.isTransitioning,R]);let N=b.useMemo(()=>({createHref:e.createHref,createURL:e.createURL,encodeLocation:e.encodeLocation,go:M=>e.navigate(M),push:(M,z,L)=>e.navigate(M,{state:z,preventScrollReset:L?.preventScrollReset}),replace:(M,z,L)=>e.navigate(M,{replace:!0,state:z,preventScrollReset:L?.preventScrollReset})}),[e]),j=e.basename||"/",D=b.useMemo(()=>({router:e,navigator:N,static:!1,basename:j,onError:s}),[e,N,j,s]);return b.createElement(b.Fragment,null,b.createElement(Vo.Provider,{value:D},b.createElement(vd.Provider,{value:d},b.createElement(PO.Provider,{value:T.current},b.createElement(Nb.Provider,{value:h},b.createElement(p8,{basename:j,location:d.location,navigationType:d.historyAction,navigator:N,useTransitions:i},b.createElement(d8,{routes:e.routes,manifest:e.manifest,future:e.future,state:d,isStatic:!1,onError:s})))))),null)}function TR(e,t){return{...e,navigation:t.navigation.state!=="idle"?t.navigation:e.navigation,revalidation:t.revalidation!=="idle"?t.revalidation:e.revalidation,actionData:t.navigation.state!=="submitting"?t.actionData:e.actionData,fetchers:t.fetchers}}var d8=b.memo(f8);function f8({routes:e,manifest:t,future:s,state:i,isStatic:o,onError:l}){return Y6(e,void 0,{manifest:t,state:i,isStatic:o,onError:l})}function h8({to:e,replace:t,state:s,relative:i}){_t(Ko(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o,navigator:l}=b.useContext(xs);Hn(!o,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:u}=b.useContext(_s),{pathname:d}=Tr(),f=qo(),g=gd(e,cg(u),d,i==="path");Wl(typeof e=="string"?e:jr(e),l.createHref(g),kb(l),"reject");let m=JSON.stringify(g);return b.useEffect(()=>{f(JSON.parse(m),{replace:t,state:s,relative:i})},[f,m,i,t,s]),null}function VO(e){return K6(e.context)}function p8({basename:e="/",children:t=null,location:s,navigationType:i="POP",navigator:o,static:l=!1,useTransitions:u}){_t(!Ko(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),f=b.useMemo(()=>({basename:d,navigator:o,static:l,useTransitions:u,future:{}}),[d,o,l,u]);typeof s=="string"&&(s=ni(s));let{pathname:g="/",search:m="",hash:h="",state:x=null,key:S="default",mask:w}=s,C=b.useMemo(()=>{let E=ts(g,d);return E==null?null:{location:{pathname:E,search:m,hash:h,state:x,key:S,mask:w},navigationType:i}},[d,g,m,h,x,S,i,w]);return Hn(C!=null,`<Router basename="${d}"> is not able to match the URL "${g}${m}${h}" because it does not start with the basename, so the <Router> won't render anything.`),C==null?null:b.createElement(xs.Provider,{value:f},b.createElement(ug.Provider,{children:t,value:C}))}var Ih="get",Ph="application/x-www-form-urlencoded";function dg(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function g8(e){return dg(e)&&e.tagName.toLowerCase()==="button"}function m8(e){return dg(e)&&e.tagName.toLowerCase()==="form"}function y8(e){return dg(e)&&e.tagName.toLowerCase()==="input"}function v8(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function b8(e,t){return e.button===0&&(!t||t==="_self")&&!v8(e)}function fv(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,s)=>{let i=e[s];return t.concat(Array.isArray(i)?i.map(o=>[s,o]):[[s,i]])},[]))}function x8(e,t){let s=fv(e);return t&&t.forEach((i,o)=>{s.has(o)||t.getAll(o).forEach(l=>{s.append(o,l)})}),s}var gh=null;function S8(){if(gh===null)try{new FormData(document.createElement("form"),0),gh=!1}catch{gh=!0}return gh}var w8=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Cy(e){return e!=null&&!w8.has(e)?(Hn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ph}"`),null):e}function E8(e,t){let s,i,o,l,u;if(m8(e)){let d=e.getAttribute("action");i=d?ts(d,t):null,s=e.getAttribute("method")||Ih,o=Cy(e.getAttribute("enctype"))||Ph,l=new FormData(e)}else if(g8(e)||y8(e)&&(e.type==="submit"||e.type==="image")){let d=e.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||d.getAttribute("action");if(i=f?ts(f,t):null,s=e.getAttribute("formmethod")||d.getAttribute("method")||Ih,o=Cy(e.getAttribute("formenctype"))||Cy(d.getAttribute("enctype"))||Ph,l=new FormData(d,e),!S8()){let{name:g,type:m,value:h}=e;if(m==="image"){let x=g?`${g}.`:"";l.append(`${x}x`,"0"),l.append(`${x}y`,"0")}else g&&l.append(g,h)}}else{if(dg(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');s=Ih,i=null,o=Ph,u=e}return l&&o==="text/plain"&&(u=l,l=void 0),{action:i,method:s.toLowerCase(),encType:o,formData:l,body:u}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Pb(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function KO(e,t,s,i){let o=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return s?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${i}`:o.pathname=`${o.pathname}.${i}`:o.pathname==="/"?o.pathname=`_root.${i}`:t&&ts(o.pathname,t)==="/"?o.pathname=`${oc(t)}/_root.${i}`:o.pathname=`${oc(o.pathname)}.${i}`,o}async function R8(e,t){if(e.id in t)return t[e.id];try{let s=await import(e.module);return t[e.id]=s,s}catch(s){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(s),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function C8(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function T8(e,t,s){let i=await Promise.all(e.map(async o=>{let l=t.routes[o.route.id];if(l){let u=await R8(l,s);return u.links?u.links():[]}return[]}));return M8(i.flat(1).filter(C8).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function kR(e,t,s,i,o,l){let u=(f,g)=>s[g]?f.route.id!==s[g].route.id:!0,d=(f,g)=>s[g].pathname!==f.pathname||s[g].route.path?.endsWith("*")&&s[g].params["*"]!==f.params["*"];return l==="assets"?t.filter((f,g)=>u(f,g)||d(f,g)):l==="data"?t.filter((f,g)=>{let m=i.routes[f.route.id];if(!m||!m.hasLoader)return!1;if(u(f,g)||d(f,g))return!0;if(f.route.shouldRevalidate){let h=f.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:s[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:f.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function k8(e,t,{includeHydrateFallback:s}={}){return O8(e.map(i=>{let o=t.routes[i.route.id];if(!o)return[];let l=[o.module];return o.clientActionModule&&(l=l.concat(o.clientActionModule)),o.clientLoaderModule&&(l=l.concat(o.clientLoaderModule)),s&&o.hydrateFallbackModule&&(l=l.concat(o.hydrateFallbackModule)),o.imports&&(l=l.concat(o.imports)),l}).flat(1))}function O8(e){return[...new Set(e)]}function A8(e){let t={},s=Object.keys(e).sort();for(let i of s)t[i]=e[i];return t}function M8(e,t){let s=new Set;return new Set(t),e.reduce((i,o)=>{let l=JSON.stringify(A8(o));return s.has(l)||(s.add(l),i.push({key:l,link:o})),i},[])}function Lb(){let e=b.useContext(Vo);return Pb(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function N8(){let e=b.useContext(vd);return Pb(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var zb=b.createContext(void 0);zb.displayName="FrameworkContext";function fg(){let e=b.useContext(zb);return Pb(e,"You must render this element inside a <HydratedRouter> element"),e}function D8(e,t){let s=b.useContext(zb),[i,o]=b.useState(!1),[l,u]=b.useState(!1),{onFocus:d,onBlur:f,onMouseEnter:g,onMouseLeave:m,onTouchStart:h}=t,x=b.useRef(null);b.useEffect(()=>{if(e==="render"&&u(!0),e==="viewport"){let C=R=>{R.forEach(O=>{u(O.isIntersecting)})},E=new IntersectionObserver(C,{threshold:.5});return x.current&&E.observe(x.current),()=>{E.disconnect()}}},[e]),b.useEffect(()=>{if(i){let C=setTimeout(()=>{u(!0)},100);return()=>{clearTimeout(C)}}},[i]);let S=()=>{o(!0)},w=()=>{o(!1),u(!1)};return s?e!=="intent"?[l,x,{}]:[l,x,{onFocus:xu(d,S),onBlur:xu(f,w),onMouseEnter:xu(g,S),onMouseLeave:xu(m,w),onTouchStart:xu(h,S)}]:[!1,x,{}]}function xu(e,t){return s=>{e&&e(s),s.defaultPrevented||t(s)}}function j8({page:e,...t}){let s=IO(),{nonce:i}=fg(),{router:o}=Lb(),l=b.useMemo(()=>dO(o.routes,e,o.basename),[o.routes,e,o.basename]);return l?(t.nonce==null&&i&&(t={...t,nonce:i}),s?b.createElement(P8,{page:e,matches:l,...t}):b.createElement(L8,{page:e,matches:l,...t})):null}function I8(e){let{manifest:t,routeModules:s}=fg(),[i,o]=b.useState([]);return b.useEffect(()=>{let l=!1;return T8(e,t,s).then(u=>{l||o(u)}),()=>{l=!0}},[e,t,s]),i}function P8({page:e,matches:t,...s}){let i=Tr(),{future:o}=fg(),{basename:l}=Lb(),u=b.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let d=KO(e,l,o.v8_trailingSlashAwareDataRequests,"rsc"),f=!1,g=[];for(let m of t)typeof m.route.shouldRevalidate=="function"?f=!0:g.push(m.route.id);return f&&g.length>0&&d.searchParams.set("_routes",g.join(",")),[d.pathname+d.search]},[l,o.v8_trailingSlashAwareDataRequests,e,i,t]);return b.createElement(b.Fragment,null,u.map(d=>b.createElement("link",{key:d,rel:"prefetch",as:"fetch",href:d,...s})))}function L8({page:e,matches:t,...s}){let i=Tr(),{future:o,manifest:l,routeModules:u}=fg(),{basename:d}=Lb(),{loaderData:f,matches:g}=N8(),m=b.useMemo(()=>kR(e,t,g,l,i,"data"),[e,t,g,l,i]),h=b.useMemo(()=>kR(e,t,g,l,i,"assets"),[e,t,g,l,i]),x=b.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let C=new Set,E=!1;if(t.forEach(O=>{let T=l.routes[O.route.id];!T||!T.hasLoader||(!m.some(A=>A.route.id===O.route.id)&&O.route.id in f&&u[O.route.id]?.shouldRevalidate||T.hasClientLoader?E=!0:C.add(O.route.id))}),C.size===0)return[];let R=KO(e,d,o.v8_trailingSlashAwareDataRequests,"data");return E&&C.size>0&&R.searchParams.set("_routes",t.filter(O=>C.has(O.route.id)).map(O=>O.route.id).join(",")),[R.pathname+R.search]},[d,o.v8_trailingSlashAwareDataRequests,f,i,l,m,t,e,u]),S=b.useMemo(()=>k8(h,l),[h,l]),w=I8(h);return b.createElement(b.Fragment,null,x.map(C=>b.createElement("link",{key:C,rel:"prefetch",as:"fetch",href:C,...s})),S.map(C=>b.createElement("link",{key:C,rel:"modulepreload",href:C,...s})),w.map(({key:C,link:E})=>b.createElement("link",{key:C,nonce:s.nonce,...E,crossOrigin:E.crossOrigin??s.crossOrigin})))}function z8(...e){return t=>{e.forEach(s=>{typeof s=="function"?s(t):s!=null&&(s.current=t)})}}var _8=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{_8&&(window.__reactRouterVersion="7.18.5")}catch{}function U8(e,t){return c6({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:R_({window:t?.window}),hydrationData:H8(),routes:e,mapRouteProperties:o8,hydrationRouteProperties:l8,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,instrumentations:t?.instrumentations}).initialize()}function H8(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:F8(e.errors)}),e}function F8(e){if(!e)return null;let t=Object.entries(e),s={};for(let[i,o]of t)if(o&&o.__type==="RouteErrorResponse")s[i]=new md(o.status,o.statusText,o.data,o.internal===!0);else if(o&&o.__type==="Error"){if(typeof o.__subType=="string"&&$_.includes(o.__subType)){let l=window[o.__subType];if(typeof l=="function")try{let u=new l(o.message);u.stack="",s[i]=u}catch{}}if(s[i]==null){let l=new Error(o.message);l.stack="",s[i]=l}}else s[i]=o;return s}var xd=b.forwardRef(function({onClick:t,discover:s="render",prefetch:i="none",relative:o,reloadDocument:l,replace:u,mask:d,state:f,target:g,to:m,preventScrollReset:h,viewTransition:x,defaultShouldRevalidate:S,...w},C){let{basename:E,navigator:R,useTransitions:O}=b.useContext(xs),T=typeof m=="string"&&og.test(m),A=bO(m,E);m=A.to;let N=H6(m,{relative:o}),j=Tr(),D=null;if(d){let U=gd(d,[],j.mask?j.mask.pathname:"/",!0);E!=="/"&&(U.pathname=U.pathname==="/"?E:Ps([E,U.pathname])),D=R.createHref(U)}let[M,z,L]=D8(i,w),K=K8(m,{replace:u,mask:d,state:f,target:g,preventScrollReset:h,relative:o,viewTransition:x,defaultShouldRevalidate:S,useTransitions:O});function X(U){t&&t(U),U.defaultPrevented||K(U)}let B=!(A.isExternal||l),H=b.createElement("a",{...w,...L,href:(B?D:void 0)||A.absoluteURL||N,onClick:B?X:t,ref:z8(C,z),target:g,"data-discover":!T&&s==="render"?"true":void 0});return M&&!T?b.createElement(b.Fragment,null,H,b.createElement(j8,{page:N})):H});xd.displayName="Link";var ju=b.forwardRef(function({"aria-current":t="page",caseSensitive:s=!1,className:i="",end:o=!1,style:l,to:u,viewTransition:d,children:f,...g},m){let h=bd(u,{relative:g.relative}),x=Tr(),S=b.useContext(vd),{navigator:w,basename:C}=b.useContext(xs),E=S!=null&&Z8(h)&&d===!0,R=w.encodeLocation?w.encodeLocation(h).pathname:h.pathname,O=x.pathname,T=S&&S.navigation&&S.navigation.location?S.navigation.location.pathname:null;s||(O=O.toLowerCase(),T=T?T.toLowerCase():null,R=R.toLowerCase()),T&&C&&(T=ts(T,C)||T);const A=R!=="/"&&R.endsWith("/")?R.length-1:R.length;let N=O===R||!o&&O.startsWith(R)&&O.charAt(A)==="/",j=T!=null&&(T===R||!o&&T.startsWith(R)&&T.charAt(R.length)==="/"),D={isActive:N,isPending:j,isTransitioning:E},M=N?t:void 0,z;typeof i=="function"?z=i(D):z=[i,N?"active":null,j?"pending":null,E?"transitioning":null].filter(Boolean).join(" ");let L=typeof l=="function"?l(D):l;return b.createElement(xd,{...g,"aria-current":M,className:z,ref:m,style:L,to:u,viewTransition:d},typeof f=="function"?f(D):f)});ju.displayName="NavLink";var B8=b.forwardRef(({discover:e="render",fetcherKey:t,navigate:s,reloadDocument:i,replace:o,state:l,method:u=Ih,action:d,onSubmit:f,relative:g,preventScrollReset:m,viewTransition:h,defaultShouldRevalidate:x,...S},w)=>{let{useTransitions:C}=b.useContext(xs),E=$8(),R=Q8(d,{relative:g}),O=u.toLowerCase()==="get"?"get":"post",T=typeof d=="string"&&og.test(d),A=N=>{if(f&&f(N),N.defaultPrevented)return;N.preventDefault();let j=N.nativeEvent.submitter,D=j?.getAttribute("formmethod")||u,M=()=>E(j||N.currentTarget,{fetcherKey:t,method:D,navigate:s,replace:o,state:l,relative:g,preventScrollReset:m,viewTransition:h,defaultShouldRevalidate:x});C&&s!==!1?b.startTransition(()=>M()):M()};return b.createElement("form",{ref:w,method:O,action:R,onSubmit:i?f:A,...S,"data-discover":!T&&e==="render"?"true":void 0})});B8.displayName="Form";function V8(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function qO(e){let t=b.useContext(Vo);return _t(t,V8(e)),t}function K8(e,{target:t,replace:s,mask:i,state:o,preventScrollReset:l,relative:u,viewTransition:d,defaultShouldRevalidate:f,useTransitions:g}={}){let m=qo(),h=Tr(),x=bd(e,{relative:u});return b.useCallback(S=>{if(b8(S,t)){S.preventDefault();let w=s!==void 0?s:jr(h)===jr(x),C=()=>m(e,{replace:w,mask:i,state:o,preventScrollReset:l,relative:u,viewTransition:d,defaultShouldRevalidate:f});g?b.startTransition(()=>C()):C()}},[h,m,x,s,i,o,t,e,l,u,d,f,g])}function q8(e){Hn(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=b.useRef(fv(e)),s=b.useRef(!1),i=Tr(),o=b.useMemo(()=>x8(i.search,s.current?null:t.current),[i.search]),l=qo(),u=b.useCallback((d,f)=>{const g=fv(typeof d=="function"?d(new URLSearchParams(o)):d);s.current=!0,l("?"+g,f)},[l,o]);return[o,u]}var Y8=0,G8=()=>`__${String(++Y8)}__`;function $8(){let{router:e}=qO("useSubmit"),{basename:t}=b.useContext(xs),s=J6(),i=e.fetch,o=e.navigate;return b.useCallback(async(l,u={})=>{let{action:d,method:f,encType:g,formData:m,body:h}=E8(l,t);if(u.navigate===!1){let x=u.fetcherKey||G8();await i(x,s,u.action||d,{defaultShouldRevalidate:u.defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:m,body:h,formMethod:u.method||f,formEncType:u.encType||g,flushSync:u.flushSync})}else await o(u.action||d,{defaultShouldRevalidate:u.defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:m,body:h,formMethod:u.method||f,formEncType:u.encType||g,replace:u.replace,state:u.state,fromRouteId:s,flushSync:u.flushSync,viewTransition:u.viewTransition})},[i,o,t,s])}function Q8(e,{relative:t}={}){let{basename:s}=b.useContext(xs),i=b.useContext(_s);_t(i,"useFormAction must be used inside a RouteContext");let[o]=i.matches.slice(-1),l={...bd(e||".",{relative:t})},u=Tr();if(e==null){l.search=u.search;let d=new URLSearchParams(l.search),f=d.getAll("index");if(f.some(m=>m==="")){d.delete("index"),f.filter(h=>h).forEach(h=>d.append("index",h));let m=d.toString();l.search=m?`?${m}`:""}}return(!e||e===".")&&o.route.index&&(l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index"),s!=="/"&&(l.pathname=l.pathname==="/"?s:Ps([s,l.pathname])),jr(l)}function X8(e,t){let{capture:s}={};b.useEffect(()=>{let i=s!=null?{capture:s}:void 0;return window.addEventListener("beforeunload",e,i),()=>{window.removeEventListener("beforeunload",e,i)}},[e,s])}function Z8(e,{relative:t}={}){let s=b.useContext(Nb);_t(s!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=qO("useViewTransitionState"),o=bd(e,{relative:t});if(!s.isTransitioning)return!1;let l=ts(s.currentLocation.pathname,i)||s.currentLocation.pathname,u=ts(s.nextLocation.pathname,i)||s.nextLocation.pathname;return qu(o.pathname,u)!=null||qu(o.pathname,l)!=null}function W8(e){return b.createElement(u8,{flushSync:hr.flushSync,...e})}function Si({controlled:e,default:t,name:s,state:i="value"}){const{current:o}=b.useRef(e!==void 0),[l,u]=b.useState(()=>t),d=o&&e!==void 0?e:l,f=b.useCallback(g=>{o||u(g)},[]);return[d,f]}function J8(e){const{open:t,defaultOpen:s=!1,onOpenChange:i,disabled:o}=e,[l,u]=Si({controlled:t,default:s,name:"Collapsible",state:"open"}),{mounted:d,setMounted:f,transitionStatus:g}=Za(l,!0,!0),m=$n(),[h,x]=b.useState(),S=h===null?void 0:h??m,w=Be(C=>{const E=!l,R=lt(Qs,C.nativeEvent);i(E,R),!R.isCanceled&&u(E)});return b.useMemo(()=>({defaultPanelId:m,disabled:o,handleTrigger:w,mounted:d,open:l,panelId:S,setMounted:f,setOpen:u,setPanelIdState:x,transitionStatus:g}),[m,o,w,d,l,S,f,u,x,g])}const YO=b.createContext(void 0);function GO(){const e=b.useContext(YO);if(e===void 0)throw new Error(cn(15));return e}const eU="data-open",tU="data-closed",mh=Iv,nU="data-panel-open",rU={[eU]:""},sU={[tU]:""},iU={open(e){return e?{[nU]:""}:null}},aU={open(e){return e?rU:sU}},$O={...aU,...ei},oU=b.forwardRef(function(t,s){const{render:i,className:o,defaultOpen:l=!1,disabled:u=!1,onOpenChange:d,open:f,style:g,...m}=t,h=Be(d),x=J8({open:f,defaultOpen:l,onOpenChange:h,disabled:u}),S=b.useMemo(()=>({open:x.open,disabled:x.disabled,transitionStatus:x.transitionStatus}),[x.open,x.disabled,x.transitionStatus]),w=b.useMemo(()=>({...x,onOpenChange:h,state:S}),[x,h,S]),C=bt("div",t,{state:S,ref:s,props:m,stateAttributesMapping:$O});return v.jsx(YO.Provider,{value:w,children:C})}),lU={...iU,...ei},cU=b.forwardRef(function(t,s){const{panelId:i,open:o,handleTrigger:l,state:u,disabled:d}=GO(),{className:f,disabled:g=d,render:m,nativeButton:h=!0,style:x,...S}=t,{getButtonProps:w,buttonRef:C}=ns({disabled:g,native:h});return bt("button",t,{state:u,ref:[s,C],props:[{"aria-controls":o?i:void 0,"aria-expanded":o,onClick:l},S,w],stateAttributesMapping:lU})}),Ll={height:void 0,width:void 0};function uU(e){const{externalRef:t,hiddenUntilFound:s,id:i,keepMounted:o,mounted:l,onOpenChange:u,open:d,setMounted:f,setOpen:g,transitionStatus:m}=e,h=b.useRef(null),x=b.useRef(null),[S,w]=b.useState(Ll),C=b.useRef(Ll),E=b.useRef(!1),R=b.useRef(d),O=b.useRef(!1),[T,A]=b.useState(!1),N=b.useRef(null),j=es(t,h),D=Ln(d),M=Lp(h),z=!d&&!l,L=T?"idle":m,K=d&&(R.current||O.current),X=!d&&l&&x.current==="css-animation"&&S.height===void 0&&S.width===void 0?C.current:S,B=s&&z&&x.current!=="css-animation",H=Be((q,Y=!0)=>{Y&&(C.current=q),w(q)}),U=Be(()=>{N.current?.(),N.current=null}),_=Be(q=>{U(),N.current=()=>{N.current=null,q()}}),Q=Be(()=>{d&&l&&x.current==="css-animation"&&(O.current=!0)});Pe(()=>{!T||m==="starting"||A(!1)},[T,m]),b.useEffect(()=>()=>{Q(),U()},[Q,U]),Pe(()=>{d||(R.current=!1,O.current=!1);const q=h.current;if(!q)return;!d&&N.current&&U();const Y=dU(q,K);if(x.current=Y,d&&m==="idle"&&R.current&&Y==="css-animation"){C.current=zl(q);return}if(d&&m==="starting"){const ae=E.current;if(E.current=!1,Y==="none"){H(zl(q)),A(!0);return}if(Y==="css-transition"){const Z=fU(q);if(H(zl(q)),!ae)return Z;const ne=yh(q,"transition-duration","0s");return _(ne),A(!0),Z}H(zl(q));const I=yh(q,"animation-name","none");if(!ae){I();return}const F=yh(q,"animation-duration","0s");I(),_(F),A(!0);return}if(!d&&l&&(m==="idle"||m==="starting")){if(Y==="none"){H(Ll,!1),f(!1);return}H(zl(q));return}if(m!=="ending")return;if(Y==="none"){f(!1);return}const ee=zl(q);if(!(ee.height>0||ee.width>0)){f(!1);return}H(ee),Y==="css-animation"&&yh(q,"animation-name","none")()},[l,d,U,H,f,_,K,m]),bs({enabled:d&&l&&L==="idle",open:!0,ref:h,onComplete(){d&&H(Ll,!1)}}),b.useEffect(()=>{if(d||!l||L!=="ending")return;if(!h.current){f(!1),H(Ll,!1);return}const Y=new AbortController;let ee=-1;function G(){D.current||(f(!1),H(Ll,!1))}return ee=Nr.request(()=>{M(G,Y.signal)}),()=>{Nr.cancel(ee),Y.abort()}},[D,l,d,L,M,H,f]),Pe(()=>{const q=h.current;!q||!s||!z||q.setAttribute("hidden","until-found")},[z,s]),b.useEffect(function(){const Y=h.current;if(!Y)return;const ee=zs.create();let G=-1;const ae=(Z,ne)=>{ee.start(0,()=>{D.current||(G=Nr.request(()=>{D.current||(Z&&(E.current=!1),ne&&Y.setAttribute(mh,""),Y.setAttribute("hidden","until-found"))}))})},F=Lt(Y,"beforematch",Z=>{const ne=lt(Cr,Z);if(u(!0,ne),ne.isCanceled){ae(!1,!1);return}E.current=!0;const ye=Y.hasAttribute(mh);Y.removeAttribute(mh),g(!0),ae(!0,ye)});return()=>{ee.clear(),Nr.cancel(G),F()}},[D,u,g]);const $=o||s||l||d;return{height:X.height,props:{...B?{[mh]:""}:void 0,hidden:z,id:i},ref:j,shouldPreventOpenAnimation:K,shouldRender:$,transitionStatus:L,width:X.width}}function zl(e){return{height:e.scrollHeight,width:e.scrollWidth}}function dU(e,t){const s=Rn(e).getComputedStyle(e),i=(s.animationName.split(",").map(l=>l.trim()).some(l=>l!==""&&l!=="none")||t)&&OR(s.animationDuration),o=OR(s.transitionDuration);return i&&o||o?"css-transition":i?"css-animation":"none"}function OR(e){return e.split(",").map(t=>t.trim()).some(t=>t!==""&&Number.parseFloat(t)>0)}function yh(e,t,s){const i=e.style.getPropertyValue(t),o=e.style.getPropertyPriority(t);return e.style.setProperty(t,s),()=>{if(i===""){e.style.removeProperty(t);return}e.style.setProperty(t,i,o)}}function fU(e){const t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(o=>{e.style.setProperty(o,"initial","important")});function s(){Object.entries(t).forEach(([o,l])=>{if(l===""){e.style.removeProperty(o);return}e.style.setProperty(o,l)})}const i=Nr.request(s);return()=>{Nr.cancel(i),s()}}const hU="--collapsible-panel-height",pU="--collapsible-panel-width",gU=b.forwardRef(function(t,s){const{className:i,hiddenUntilFound:o,keepMounted:l,render:u,id:d,style:f,...g}=t,{defaultPanelId:m,mounted:h,onOpenChange:x,open:S,setMounted:w,setPanelIdState:C,setOpen:E,state:R,transitionStatus:O}=GO(),T=o??!1,A=l??!1,N=d||void 0,j=N??m;Pe(()=>(C(Q=>N??(Q===null?void 0:Q)),()=>{C(Q=>Q===N?null:Q)}),[N,C]);const{height:D,props:M,ref:z,shouldPreventOpenAnimation:L,shouldRender:K,transitionStatus:X,width:B}=uU({externalRef:s,hiddenUntilFound:T,id:j,keepMounted:A,mounted:h,onOpenChange:x,open:S,setMounted:w,setOpen:E,transitionStatus:O}),H={...R,transitionStatus:X},U=NC(f,H),_=bt("div",{...t,style:void 0},{state:H,ref:z,props:[M,{style:{[hU]:D===void 0?"auto":`${D}px`,[pU]:B===void 0?"auto":`${B}px`}},g,U?{style:U}:void 0,L?{style:{animationName:"none"}}:void 0],stateAttributesMapping:$O});return K?_:null});function mU({...e}){return v.jsx(oU,{"data-slot":"collapsible",...e})}function yU({...e}){return v.jsx(cU,{"data-slot":"collapsible-trigger",...e})}function vU({...e}){return v.jsx(gU,{"data-slot":"collapsible-content",...e})}const QO=b.createContext(void 0);function bU(e){const t=b.useContext(QO);if(t===void 0)throw new Error(cn(33));return t}const hg=b.createContext(void 0);function sa(e){const t=b.useContext(hg);if(t===void 0&&!e)throw new Error(cn(36));return t}const XO=b.createContext(void 0);function pg(e=!0){const t=b.useContext(XO);if(t===void 0&&!e)throw new Error(cn(25));return t}const ZO=b.createContext(null);function gg(e="root"){const t=b.useContext(ZO),s=b.useContext(hg);return t===null||s===void 0?null:(e==="submenu-trigger"?s.virtualFocus||s.parentVirtualFocus:s.virtualFocus)?t:null}const xU={visible:!0,ref:null};function SU(){return xU}function WO(e,t,s="root"){const i=gg(s),l=((s==="submenu-trigger"?i?.useSubmenuTrigger:i?.useItem)??SU)({label:e.label,children:e.children,render:e.render}),u=es(t,l.ref);return{visible:l.visible,ref:u,props:l.props}}function wU(e){e.preventDefault()}function EU(e){const{closeOnClick:t,highlighted:s,id:i,nodeId:o,store:l,typingRef:u,itemRef:d,itemMetadata:f}=e,g=sa(),m=pg(!0),h=f.type==="submenu-trigger",x=h?g.parentVirtualFocus:g.virtualFocus,w=(h&&g.parent.type==="menu"?g.parent.store:g.store).useState("webkitAriaSelected",s),{events:C}=l.useState("floatingTreeRoot"),E=l.useState("open"),R=m!==void 0,O=!x&&E&&s?0:-1;return b.useMemo(()=>({id:i,role:"menuitem",tabIndex:O,"aria-selected":w,onMouseDown:x?wU:void 0,onKeyDown(T){T.key===" "&&u?.current&&T.preventDefault()},onMouseMove(T){o&&C.emit("itemhover",{nodeId:o,target:T.currentTarget})},onClick(T){t&&C.emit("close",{domEvent:T.nativeEvent,reason:jo})},onMouseUp(T){if(m){const A=m.initialCursorPointRef.current;if(m.initialCursorPointRef.current=null,R&&A&&Math.abs(T.clientX-A.x)<=1&&Math.abs(T.clientY-A.y)<=1||R&&!kv&&T.button===2)return}d.current&&l.context.allowMouseUpTriggerRef.current&&(!R||T.button===2)&&f.type==="regular-item"&&Io(d.current,T,{detail:1,pointerType:"mouse"})}}),[t,O,i,C,o,l.context.allowMouseUpTriggerRef,u,d,m,R,f.type,w,x])}const JO={type:"regular-item"};function eA(e){const{closeOnClick:t,disabled:s,highlighted:i,id:o,store:l,typingRef:u=l.context.typingRef,nativeButton:d,itemMetadata:f,nodeId:g}=e,m=b.useRef(null),{getButtonProps:h,buttonRef:x}=ns({disabled:s,focusableWhenDisabled:!0,native:d,composite:!0}),S=EU({closeOnClick:t,highlighted:i,id:o,nodeId:g,store:l,typingRef:u,itemRef:m,itemMetadata:f}),w=b.useCallback(E=>Dr(S,{onMouseEnter(R){f.type==="submenu-trigger"&&f.setActive(R.nativeEvent)}},E,h),[S,h,f]),C=es(m,x);return b.useMemo(()=>({getItemProps:w,itemRef:C}),[w,C])}const tA=b.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function RU(){return b.useContext(tA)}function Sd(e={}){const{guess:t,label:s,metadata:i,textRef:o,index:l}=e,{register:u,unregister:d,subscribeMapChange:f,nextIndexRef:g}=RU(),m=b.useRef(-1),[h,x]=b.useState(l==null&&t?()=>{if(m.current===-1){const E=g.current;g.current+=1,m.current=E}return m.current}:-1),S=l??h,w=b.useRef(null),C=b.useCallback(E=>{const R=w.current;R&&d(R),w.current=E,E&&u(E,{metadata:i??null,index:l??null,label:s,textRef:o})},[l,u,d,i,s,o]);return Pe(()=>{if(l==null)return f(E=>{const R=w.current?E.get(w.current)?.index:null;R!=null&&x(R)})},[l,f]),{ref:C,index:S}}const CU="data-checked",TU="data-unchecked",nA={checked(e){return e?{[CU]:""}:{[TU]:""}},...ei},_b=b.createContext(void 0);function kU(){const e=b.useContext(_b);if(e===void 0)throw new Error(cn(31));return e}const OU=b.forwardRef(function(t,s){const{render:i,className:o,style:l,...u}=t,[d,f]=b.useState(void 0),g=bt("div",t,{ref:s,props:{role:"group","aria-labelledby":d,...u}});return v.jsx(_b.Provider,{value:f,children:g})}),AU=b.forwardRef(function(t,s){const i=gg()?.Group??OU;return v.jsx(i,{...t,ref:s})}),MU=b.forwardRef(function(t,s){const{render:i,className:o,style:l,id:u,...d}=t,f=$n(u),g=kU();return Pe(()=>(g(f),()=>{g(m=>m===f?void 0:m)}),[g,f]),bt("div",t,{ref:s,props:{id:f,"aria-hidden":!0,...d}})}),NU=b.forwardRef(function(t,s){const{render:i,className:o,id:l,label:u,nativeButton:d=!1,disabled:f=!1,closeOnClick:g=!0,style:m,...h}=t,{store:x}=sa(),S=Sd({guess:!0,label:u}),w=$n(l),C=x.useState("disabled"),E=x.useState("isActive",S.index),R=x.useState("floatingNodeId"),O=x.useState("itemProps"),T=f||C,{getItemProps:A,itemRef:N}=eA({closeOnClick:g,disabled:T,highlighted:E,id:w,store:x,nativeButton:d,nodeId:R,itemMetadata:JO});return bt("div",t,{state:{disabled:T,highlighted:E},props:[O,h,A],ref:[N,s,S.ref]})}),rA=b.forwardRef(function(t,s){const i=WO(t,s);return i.visible?v.jsx(NU,{...t,ref:i.ref}):null}),DU=b.createContext(void 0);function jU(){return b.useContext(DU)}function IU(e,t){const s=Vv(e.render);if(b.isValidElement(s)){const i=s.props;if(Object.hasOwn(i,"id"))return i.id??""}return e.id??t}function PU(e,t,s){const i=IU(e,t),o=i===t?void 0:i,l=b.useCallback(u=>s?.(u?o:void 0),[o,s]);return[i,l]}function LU(e,t,s){const i=Vv(e.render),o=b.isValidElement(i)?i.props:void 0,l=e["aria-label"]??o?.["aria-label"];let u=e["aria-labelledby"]??o?.["aria-labelledby"];return u==null&&!l&&(u=t?t.id||void 0:s||void 0),u}const zU=b.forwardRef(function(t,s){const{render:i,className:o,style:l,finalFocus:u,id:d,initialFocus:f,...g}=t,{store:m,defaultFloatingId:h,setRenderedFloatingId:x,virtualFocus:S,orientation:w}=sa(),C=jU(),{side:E,align:R}=bU(),O=ig()!=null,T=m.useState("open"),A=m.useState("transitionStatus"),N=m.useState("popupProps"),j=m.useState("mounted"),D=m.useState("instantType"),M=m.useState("activeTriggerElement"),z=m.useState("parent"),L=m.useState("lastOpenChangeReason"),K=m.useState("rootId"),X=m.useState("floatingRootContext"),B=m.useState("floatingTreeRoot"),H=m.useState("closeDelay"),U=m.useState("hoverEnabled"),_=m.useState("disabled"),Q=m.useState("openMethod"),$=m.useState("activeTriggerId"),q=m.useState("listElement"),[Y,ee]=PU(t,h,x),G=LU(t,M,$),ae=z.type==="menu"?C:void 0,I=z.type==="context-menu";let F=f??z.type!=="menu";f===void 0&&q&&z.type!=="menu"&&(F=()=>m.state.activeIndex!==null?!1:q),bs({open:T,ref:m.context.popupRef,onComplete(){T&&m.context.onOpenChangeComplete?.(!0)}}),b.useEffect(()=>{function be(Le){m.setOpen(!1,lt(Le.reason,Le.domEvent))}return B.events.on("close",be),()=>{B.events.off("close",be)}},[B.events,m]),Wv(X,{enabled:U&&!_&&!I&&z.type!=="menubar",closeDelay:H});const Z=m.useStateSetter("popupElement"),ne=b.useContext(ZO)?.useParentHandoff??UU,{parentVirtualFocusRef:ye,handleFocus:se}=ne(m,z,T,S),ge={transitionStatus:A,side:E,align:R,open:T,nested:z.type==="menu",instant:D},fe=bt("div",t,{state:ge,ref:[s,m.context.popupRef,Z,ee],stateAttributesMapping:kp,props:[N,{id:Y,...q?{role:"presentation"}:{role:"menu","aria-orientation":w==="horizontal"?"horizontal":void 0,"aria-labelledby":G},onKeyDown(be){ae?.onPopupKeyDown?.(be),O&&hd.has(be.key)&&be.stopPropagation()},onFocus:se},cd(A),g,{"data-rootownerid":K}]});let ce=z.type===void 0||I;(M||z.type==="menubar"&&L!==Op)&&(ce=!0);const Re=ae?.getReturnElement??ye;return v.jsx(Ip,{context:X,openInteractionType:Q,modal:I,disabled:!j,returnFocus:u??Re??ce,explicitReturnFocus:u===void 0&&Re?!1:void 0,initialFocus:F,restoreFocus:!0,getInsideElements:z.type===void 0?()=>[m.context.beforeTriggerFocusGuardRef.current]:void 0,externalTree:z.type!=="menubar"?B:void 0,previousFocusableElement:M,nextFocusableElement:z.type===void 0?m.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:m.context.beforeContentFocusGuardRef,children:fe})}),_U={parentVirtualFocusRef:void 0,handleFocus:void 0};function UU(){return _U}const sA=b.forwardRef(function(t,s){const i=gg()?.Popup??zU;return v.jsx(i,{...t,ref:s})}),iA=b.createContext(void 0);function HU(){const e=b.useContext(iA);if(e===void 0)throw new Error(cn(32));return e}const aA=b.forwardRef(function(t,s){const{keepMounted:i=!1,...o}=t,{store:l,parent:u}=sa();if(!(l.useState("mounted")||i))return null;const g=u.type==="menu"||u.type==="menubar"?"group":void 0;return v.jsx(iA.Provider,{value:i,children:v.jsx(jp,{ref:s,...o,portalOwnerRole:g})})});function mg(e){const{children:t,elementsRef:s,labelsRef:i,onMapChange:o}=e,l=Be(o),[,u]=b.useState(0),d=rr(BU).current,f=rr(FU).current,g=b.useRef(0),m=b.useRef(!0),h=b.useRef(null),x=b.useRef(null),S=Be(()=>{m.current||(m.current=!0,u(N=>N+1))}),w=Be((N,j)=>{f.set(N,j),S()}),C=Be(N=>{f.delete(N),S()}),E=Be(N=>{const j=new Map;return s.current.length=0,i&&(i.current.length=0),N.forEach(D=>{j.set(D.element,{...D.registration.metadata??{},index:D.index}),s.current[D.index]=D.element,i&&(i.current[D.index]=D.registration.label!==void 0?D.registration.label:D.registration.textRef?.current?.textContent??D.element.textContent)}),g.current=s.current.length,j});function R(N){if(x.current?.disconnect(),x.current=null,typeof MutationObserver!="function"||N.length<2)return;const j=new MutationObserver(M=>{if(!qU(M))return;let z=null;for(const L of N)if(L.isConnected){if(z&&oA(z,L)>0){j.disconnect(),S();return}z=L}});x.current=j;const D=new Set;for(let M=1;M<N.length;M+=1){const z=KU(N[M-1],N[M]);z&&D.add(z)}D.forEach(M=>j.observe(M,{childList:!0}))}const O=Be(()=>{const[N,j]=VU(f),D=E(N),M=h.current,z=!M||M.length!==N.length||N.some((L,K)=>{const X=M[K];return L.index!==X.index||L.element!==X.element||L.registration.index!==X.registration.index||L.registration.metadata!==X.registration.metadata});R(j),h.current=N,m.current=!1,z&&(d.forEach(L=>L(D)),l(D))});Pe(()=>(!m.current&&h.current&&E(h.current),()=>{s.current=[],i&&(i.current=[])}),[s,i,E]),Pe(()=>{m.current&&O()}),Pe(()=>()=>{x.current?.disconnect(),m.current=!0},[]);const T=Be(N=>(d.add(N),()=>{d.delete(N)})),A=b.useMemo(()=>({register:w,unregister:C,subscribeMapChange:T,nextIndexRef:g}),[w,C,T,g]);return v.jsx(tA.Provider,{value:A,children:t})}function FU(){return new Map}function BU(){return new Set}function VU(e){const t=new Set,s=[],i=[];e.forEach((l,u)=>{if(!u.isConnected)return;const d=l.index,f={index:d??-1,element:u,registration:l};d===null?i.push(f):d>=0&&(t.add(d),s.push(f))});let o=0;return i.sort((l,u)=>oA(l.element,u.element)),i.forEach(l=>{for(;t.has(o);)o+=1;l.index=o,s.push(l),o+=1}),t.size>0&&s.sort((l,u)=>l.index-u.index),[s,i.map(l=>l.element)]}function KU(e,t){let s=e.parentElement;for(;s&&!s.contains(t);)s=s.parentElement;return s}function qU(e){for(const t of e)for(let s=0;s<t.removedNodes.length;s+=1)if(t.removedNodes[s].isConnected)return!0;return!1}function oA(e,t){return e.nextElementSibling===t?-1:t.nextElementSibling===e?1:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}const lA=b.forwardRef(function(t,s){const{anchor:i,positionMethod:o="absolute",className:l,render:u,side:d,align:f,sideOffset:g=0,alignOffset:m=0,collisionBoundary:h="clipping-ancestors",collisionPadding:x=5,arrowPadding:S=5,sticky:w=!1,disableAnchorTracking:C=!1,collisionAvoidance:E=UC,style:R,...O}=t,{store:T,virtualFocus:A,syncHighlightedItem:N}=sa(),j=HU(),D=pg(!0),M=T.useState("parent"),z=T.useState("floatingRootContext"),L=T.useState("floatingTreeRoot"),K=T.useState("mounted"),X=T.useState("open"),B=T.useState("modal"),H=T.useState("openMethod"),U=T.useState("activeTriggerElement"),_=T.useState("transitionStatus"),Q=T.useState("positionerElement"),$=T.useState("instantType"),q=T.useState("adaptiveOrigin"),Y=T.useState("lastOpenChangeReason"),ee=T.useState("floatingNodeId"),G=T.useState("floatingParentNodeId"),ae=z.useState("domReferenceElement");let I=i,F=g,Z=m,ne=f,ye=E;M.type==="context-menu"&&(I=i??M.context?.anchor,ne=ne??"start",!d&&ne!=="center"&&(Z=t.alignOffset??2,F=t.sideOffset??-5));let se=d,ge=ne;M.type==="menu"?(se=se??"inline-end",ge=ge??"start",ye=t.collisionAvoidance??qv):M.type==="menubar"&&(se=se??(M.context.orientation==="vertical"?"inline-end":"bottom"),ge=ge??"start");const fe=M.type==="context-menu",ce=Xp({anchor:I,floatingRootContext:z,positionMethod:D?"fixed":o,mounted:K,side:se,sideOffset:F,align:ge,alignOffset:Z,arrowPadding:fe?0:S,collisionBoundary:h,collisionPadding:x,sticky:w,nodeId:ee,keepMounted:j,disableAnchorTracking:C,collisionAvoidance:ye,shift:fe?{crossAxis:!("side"in ye&&ye.side==="flip"),rootBoundary:"layoutViewport"}:void 0,externalTree:L,adaptiveOrigin:q,lazyFlip:A?"placement":!1});b.useEffect(()=>{function Ue(xe){xe.open&&(xe.parentNodeId===ee&&T.set("hoverEnabled",!1),xe.nodeId!==ee&&xe.parentNodeId===T.select("floatingParentNodeId")&&T.setOpen(!1,lt(Su)))}return L.events.on("menuopenchange",Ue),()=>{L.events.off("menuopenchange",Ue)}},[T,L.events,ee]),b.useEffect(()=>{if(T.select("floatingParentNodeId")==null)return;function Ue(xe){if(xe.open||xe.nodeId!==T.select("floatingParentNodeId"))return;const Fe=xe.reason??Su;T.setOpen(!1,lt(Fe))}return L.events.on("menuopenchange",Ue),()=>{L.events.off("menuopenchange",Ue)}},[L.events,T]);const Re=Un();b.useEffect(()=>{X||Re.clear()},[X,Re]),b.useEffect(()=>{function Ue(xe){if(!(!X||xe.nodeId!==T.select("floatingParentNodeId")))if(xe.target&&U&&U!==xe.target){const Fe=T.select("closeDelay");Fe>0?Re.isStarted()||Re.start(Fe,()=>{T.setOpen(!1,lt(Su))}):T.setOpen(!1,lt(Su))}else Re.clear()}return L.events.on("itemhover",Ue),()=>{L.events.off("itemhover",Ue)}},[L.events,X,U,T,Re]),b.useEffect(()=>{const Ue={open:X,nodeId:ee,parentNodeId:G,reason:T.select("lastOpenChangeReason")};L.events.emit("menuopenchange",Ue)},[L.events,X,T,ee,G]),Kk({store:T,domReference:ae,positionerElement:Q,open:X});const be={open:X,side:ce.side,align:ce.align,anchorHidden:ce.anchorHidden,nested:M.type==="menu",instant:$},Le=M.type==="menubar"&&M.context.modal;pb(X&&(Le||B&&Y!==Kn),H==="touch",Q,U);const ze=Zp(t,be,{styles:ce.positionerStyles,transitionStatus:_,props:O,refs:[s,T.useStateSetter("positionerElement")],hidden:!K,inert:!X}),Ve=K&&M.type!=="menu"&&(M.type!=="menubar"&&B&&Y!==Kn||M.type==="menubar"&&M.context.modal);let ke=null;return M.type==="menubar"?ke=M.context.contentElement:M.type===void 0&&(ke=U),v.jsxs(QO.Provider,{value:ce,children:[Ve&&v.jsx(rg,{ref:M.type==="context-menu"||M.type==="nested-context-menu"?M.context.internalBackdropRef:null,inert:ud(!X),cutout:ke}),v.jsx(YC,{id:ee,children:v.jsx(mg,{elementsRef:T.context.itemDomElements,labelsRef:T.context.itemLabels,onMapChange:N,children:ze})})]})}),cA=b.createContext(void 0);function YU(){const e=b.useContext(cA);if(e===void 0)throw new Error(cn(34));return e}const GU=b.forwardRef(function(t,s){const{render:i,className:o,value:l,defaultValue:u,onValueChange:d,disabled:f=!1,style:g,"aria-labelledby":m,...h}=t,[x,S]=b.useState(void 0),[w,C]=Si({controlled:l,default:u,name:"MenuRadioGroup"}),E=Be((A,N)=>{d?.(A,N),!N.isCanceled&&C(A)}),O=bt("div",t,{state:{disabled:f},ref:s,props:{role:"group","aria-labelledby":m??x,"aria-disabled":f||void 0,...h}}),T=b.useMemo(()=>({value:w,setValue:E,disabled:f}),[w,E,f]);return v.jsx(_b.Provider,{value:S,children:v.jsx(cA.Provider,{value:T,children:O})})}),$U=b.memo(b.forwardRef(function(t,s){const i=gg()?.RadioGroup??GU;return v.jsx(i,{...t,ref:s})})),uA=b.createContext(void 0);function QU(){const e=b.useContext(uA);if(e===void 0)throw new Error(cn(35));return e}const XU=b.forwardRef(function(t,s){const{render:i,className:o,id:l,label:u,nativeButton:d=!1,disabled:f=!1,closeOnClick:g=!1,value:m,style:h,...x}=t,{store:S}=sa(),{value:w,setValue:C,disabled:E}=YU(),R=Sd({guess:!0,label:u}),O=$n(l),T=S.useState("isActive",R.index),A=S.useState("floatingNodeId"),N=S.useState("itemProps"),j=S.useState("disabled"),D=f||E||j,M=w===m,{getItemProps:z,itemRef:L}=eA({closeOnClick:g,disabled:D,highlighted:T,id:O,store:S,nativeButton:d,nodeId:A,itemMetadata:JO}),K=b.useMemo(()=>({disabled:D,highlighted:T,checked:M}),[D,T,M]);function X(H){const U=lt(jo,H.nativeEvent,void 0,{preventUnmountOnClose:En});C(m,U)}const B=bt("div",t,{state:K,stateAttributesMapping:nA,props:[N,{role:"menuitemradio","aria-checked":M,onClick:X},x,z],ref:[L,s,R.ref]});return v.jsx(uA.Provider,{value:K,children:B})}),ZU=b.forwardRef(function(t,s){const i=WO(t,s);return i.visible?v.jsx(XU,{...t,ref:i.ref}):null}),WU=b.forwardRef(function(t,s){const{render:i,className:o,style:l,keepMounted:u=!1,...d}=t,f=QU(),g=b.useRef(null),{transitionStatus:m,mounted:h,setMounted:x}=Za(f.checked);bs({batch:!0,enabled:!f.checked,open:f.checked,ref:g,onComplete(){f.checked||x(!1)}});const S={checked:f.checked,disabled:f.disabled,highlighted:f.highlighted,transitionStatus:m};return bt("span",t,{state:S,stateAttributesMapping:nA,ref:[s,g],props:{"aria-hidden":!0,...d},enabled:u||h})}),JU=b.createContext(null);function dA(e){return b.useContext(JU)}function eH(e){return e==null?Cr:e.type.startsWith("key")?fC:e.type.startsWith("mouse")||e.type.startsWith("pointer")?E4:Cr}const tH={...$i,disabled:e=>e.parent.type==="menubar"&&e.parent.context.disabled||e.disabled,modal:e=>(e.parent.type===void 0||e.parent.type==="context-menu")&&(e.modal??!0),openMethod:e=>e.openMethod,keyboardOpen:e=>e.keyboardOpen,allowMouseEnter:e=>e.allowMouseEnter,highlightItemOnHover:e=>e.highlightItemOnHover,parent:e=>e.parent,rootId:e=>e.parent.type==="menu"?e.parent.store.select("rootId"):e.parent.type!==void 0?e.parent.context.rootId:e.rootId,activeIndex:e=>e.activeIndex,listElement:e=>e.listElement,triggerControlsId:(e,t)=>{const s=$i.triggerPopupId(e,t);return s?e.listElement?.id||s:void 0},filterTriggerProps:e=>e.filterTriggerProps,inputProps:e=>e.inputProps,webkitAriaSelected:(e,t)=>Ri&&e.inputFocused&&t?!0:void 0,highlightedItemId:e=>e.highlightedItem?.id||void 0,isActive:(e,t)=>e.activeIndex===t,hoverEnabled:e=>e.hoverEnabled,instantType:e=>e.instantType==="trigger-change"&&!$i.open(e)?void 0:e.instantType,lastOpenChangeReason:e=>e.openChangeReason,floatingTreeRoot:e=>e.parent.type==="menu"?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot,floatingNodeId:e=>e.floatingNodeId,floatingParentNodeId:e=>e.floatingParentNodeId,itemProps:e=>e.itemProps,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin,keyboardEventRelay:e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type==="menu")return e.parent.store.select("keyboardEventRelay")}};class nH extends cc{constructor(t,s,i=!1){const o=new ld,l=sH(o,s,i,t);super(l,rH(o),tH),this.observe("parent",u=>{u.type==="menu"?this.context.allowMouseUpTriggerRef=u.store.context.allowMouseUpTriggerRef:u.type!==void 0&&(this.context.allowMouseUpTriggerRef=u.context.allowMouseUpTriggerRef)})}subscribeToParentMenu(){const t=this.state.parent;if(t.type!=="menu")return;let s=t.store.select("rootId"),i=t.store.select("floatingTreeRoot"),o=t.store.select("keyboardEventRelay");return t.store.subscribe(()=>{const l=t.store.select("rootId"),u=t.store.select("floatingTreeRoot"),d=t.store.select("keyboardEventRelay");s===l&&i===u&&o===d||(s=l,i=u,o=d,this.notifyAll())})}setOpen(t,s){this.state.floatingRootContext.context.events.emit("setOpen",{open:t,eventDetails:s})}setActiveIndex(t,s,i){if(this.state.activeIndex!==t){const l=(t===null?void 0:this.context.itemDomElements.current[t])===this.context.reportedItem;this.context.highlightReason=l?"none":s,this.context.highlightEvent=l?void 0:i}this.set("activeIndex",t)}highlightItem(t,s,i){const o=this.context.itemDomElements.current.indexOf(t);o>-1&&this.setActiveIndex(o,s,i)}}function rH(e){return{positionerRef:b.createRef(),popupRef:b.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},highlightReason:"none",highlightEvent:void 0,reportedItem:void 0,allowMouseUpTriggerRef:{current:!1},virtualFocusRef:void 0,triggerFocusTargetRef:b.createRef(),beforeTriggerFocusGuardRef:b.createRef(),beforeContentFocusGuardRef:b.createRef(),onOpenChangeComplete:void 0,triggerElements:e}}function sH(e,t,s=!1,i){return{...qp(e,t,s),disabled:!1,modal:!0,openMethod:null,keyboardOpen:!1,allowMouseEnter:!1,highlightItemOnHover:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,listElement:null,filterTriggerProps:Xt,inputProps:Xt,inputFocused:!1,highlightedItem:void 0,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new Yv,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:Xt,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0,...i}}const AR=b.createContext(null);function fA(e,t){return(e===Qs||e===jo)&&t?.detail===0}function iH(e,t){return e===Vh||fA(e,t)}const aH=Wu(function(t){const{children:s,open:i,onOpenChange:o,onOpenChangeComplete:l,onItemHighlighted:u,defaultOpen:d=!1,disabled:f=!1,modal:g,loopFocus:m=!0,orientation:h="vertical",actionsRef:x,closeParentOnEsc:S=!1,handle:w,triggerId:C,defaultTriggerId:E=null,highlightItemOnHover:R=!0,isSubmenu:O=!1,virtualFocus:T=!1,virtualFocusRef:A,allowEscape:N=!0,resetOnPointerLeave:j=!0}=t,D=pg(!0),M=sa(!0),z=dA(!0),L=M?.store,K=M?.virtualFocus??!1,X=b.useMemo(()=>O&&L?{type:"menu",store:L}:z?{type:"menubar",context:z}:D&&!L?{type:"context-menu",context:D}:{type:void 0},[D,L,z,O]),B=$n(),H=$n(),[U,_]=b.useState(void 0),Q=(U??H)||void 0,$=Qa(),q=X.type==="menu"?X.store:void 0,Y=(i??d)&&q?.state.transitionStatus==="starting",ee=rr(()=>Y?q?.state.instantType:void 0).current,G=rr(()=>{const Ie=new nH({open:d,openProp:i,activeTriggerId:E,triggerIdProp:C,parent:X,disabled:f,highlightItemOnHover:R,modal:X.type===void 0?g:void 0,rootId:B,instantType:ee},Q,$!=null);return Ie.context.virtualFocusRef=A,Ie}).current;G.useControlledProp("openProp",i),G.useControlledProp("triggerIdProp",C),G.useContextCallback("onOpenChangeComplete",l);const ae=G.useState("floatingTreeRoot"),I=Gv(ae),F=G.useState("open"),Z=G.useState("activeTriggerElement"),ne=G.useState("positionerElement"),ye=G.useState("hoverEnabled"),se=G.useState("disabled"),ge=G.useState("lastOpenChangeReason"),fe=G.useState("parent"),ce=G.useState("activeIndex"),Re=G.useState("keyboardOpen"),be=G.useState("payload"),Le=G.useState("floatingParentNodeId"),Oe=b.useRef(null),ze=b.useRef(fe.type!=="context-menu"),Ve=Un(),ke=b.useRef(!0),Ue=Un(),xe=Le!=null,{openMethod:Fe,triggerProps:Ze}=Fk(F);G.useSyncedValues({disabled:f,highlightItemOnHover:R,modal:fe.type===void 0?g:void 0,openMethod:Fe,rootId:B}),Fp(G);const{forceUnmount:ot,transitionStatus:de}=Bp(F,G,()=>{G.set("allowMouseEnter",!1)},Y),Ee=Lp(G.context.popupRef);b.useEffect(()=>{if(ee===void 0)return;const Ie=()=>{G.state.instantType===ee&&G.set("instantType",void 0)};if(!F){Ie();return}if(de!==void 0)return;if(G.context.popupRef.current==null){Ie();return}const _e=new AbortController;return Ee(Ie,_e.signal),()=>{_e.abort()}},[ee,F,de,Ee,G]),Pe(()=>{D&&!M?G.update({parent:{type:"context-menu",context:D},floatingNodeId:I,floatingParentNodeId:$}):(M||!G.select("activeTriggerElement"))&&G.update({floatingNodeId:I,floatingParentNodeId:$})},[D,M,I,$,Z,G]),b.useEffect(()=>{if(F||(Oe.current=null),fe.type==="context-menu"){if(!F){Ve.clear(),ze.current=!1;return}Ve.start(500,()=>{ze.current=!0})}},[Ve,F,fe.type]),Pe(()=>{!F&&!ye&&G.set("hoverEnabled",!0)},[F,ye,G]);const Ge=Be((Ie,_e)=>{const $e=_e.reason;if(!Ie&&!G.select("open")||F===Ie&&_e.trigger===Z&&ge===$e)return;const tt=Up(_e);if(!Ie&&_e.trigger==null&&(_e.trigger=Z??void 0),o?.(Ie,_e),_e.isCanceled)return;G.state.floatingRootContext.dispatchOpenChange(Ie,_e);const kt=_e.event;if(Ie===!1&&$e!==jo&&kt?.type==="click"&&kt.pointerType==="touch"&&!ke.current)return;Ie&&$e===Kl?(ke.current=!1,Ue.start(300,()=>{ke.current=!0})):(ke.current=!0,Ue.clear());const V=!Ie&&($e===rd||$e==null);Oe.current=_e.event;const J=_p(G.state,Ie,_e.trigger,tt());J.openChangeReason=$e,J.keyboardOpen=Ie&&iH($e,kt),fe.type==="menubar"&&($e===Kl||$e===Ba||$e===Kn||$e===Vh||$e===Su)?J.instantType="group":fA($e,kt)?J.instantType="click":V?J.instantType="dismiss":J.instantType=void 0,G.update(J)}),Me=$C({popupStore:G,floatingRootContext:G.state.floatingRootContext,floatingId:Q,nested:$!=null,onOpenChange:Ge}),De=Me.context.events;Pe(()=>{const Ie=({open:_e,eventDetails:$e})=>Ge(_e,$e);return De.on("setOpen",Ie),()=>{De?.off("setOpen",Ie)}},[De,Ge]),Pe(()=>G.subscribeToParentMenu(),[G]);const xt=b.useCallback(()=>{G.setOpen(!1,lt(sd))},[G]);b.useImperativeHandle(x,()=>({unmount:ot,close:xt}),[ot,xt]);let dt;fe.type==="context-menu"&&(dt=fe.context),b.useImperativeHandle(dt?.positionerRef,()=>ne,[ne]),b.useImperativeHandle(dt?.actionsRef,()=>({setOpen:Ge}),[Ge]);const gt=ad(Me,{enabled:!se,bubbles:{escapeKey:S&&fe.type==="menu"},outsidePress(){return fe.type!=="context-menu"||Oe.current?.type==="contextmenu"?!0:ze.current},externalTree:xe?ae:void 0}),Nt=Qp(),jt=sT(Me,{enabled:!se,listRef:G.context.itemDomElements,activeIndex:ce,virtual:T,nested:fe.type==="menubar"||!T&&fe.type!==void 0,parentOrientation:fe.type==="menubar"?fe.context.orientation:void 0,loopFocus:m,focusItemOnOpen:T?Re:void 0,allowEscape:T&&m&&N,orientation:h,triggerOrientation:T?"vertical":h,rtl:Nt==="rtl",disabledIndices:Ls,onNavigate(Ie,_e){G.setActiveIndex(Ie,eH(_e),_e?.nativeEvent)},openOnArrowKeyDown:fe.type!=="context-menu"&&!(T&&O),externalTree:!T&&xe?ae:void 0,nestedReturnFocusRef:q?.context.virtualFocusRef,focusItemOnHover:R,resetOnPointerLeave:j}),tn=b.useCallback(Ie=>{G.context.typingRef.current=Ie},[G]),an=iT(Me,{enabled:!se&&!T,listRef:G.context.itemLabels,elementsRef:G.context.itemDomElements,activeIndex:ce,resetMs:hI,onMatch:(Ie,_e)=>{F&&Ie!==ce&&G.setActiveIndex(Ie,fC,_e.nativeEvent)},onTyping:tn}),nn=Be(u),et=b.useRef(-1),Et=Be(()=>{const Ie=G.state.activeIndex,_e=Ie===null?void 0:G.context.itemDomElements.current[Ie]??void 0;if(_e?.isConnected===!1)return;const $e=_e===void 0?-1:Ie;if(et.current===$e&&G.context.reportedItem===_e)return;et.current=$e,G.context.reportedItem=_e,T&&G.set("highlightedItem",_e);const{highlightReason:tt,highlightEvent:kt}=G.context;G.context.highlightReason=Cr,G.context.highlightEvent=void 0,u&&nn(_e,w4(tt,kt,{label:_e===void 0?void 0:G.context.itemLabels.current[$e]??void 0}))});Pe(()=>{Et()},[ce,Et]);const Zt=b.useMemo(()=>{if(!T)return jt.reference;if(!jt.trigger)return Xt;const{onFocus:Ie,..._e}=jt.trigger;return _e},[T,jt.reference,jt.trigger]);G.useSyncedValue("inputProps",T?jt.reference??Xt:Xt);const ht=b.useMemo(()=>{const Ie=Dr(an.reference,Zt,gt.reference,{onMouseMove(){G.set("allowMouseEnter",!0)}},Ze);return Ie["aria-haspopup"]="menu",Ie["aria-expanded"]=F,Ie},[G,an.reference,Zt,gt.reference,Ze,F]),St=b.useMemo(()=>{const Ie=Dr(jt.trigger,gt.trigger,Ze);return Ie["aria-haspopup"]="menu",Ie["aria-expanded"]=!1,Ie},[jt.trigger,gt.trigger,Ze]);rr(()=>(G.update({inactiveTriggerProps:St}),null));const yt=b.useMemo(()=>Dr(od,{onMouseMove(){G.set("allowMouseEnter",!0),fe.type==="menu"&&G.set("hoverEnabled",!1)},onClick(){G.select("hoverEnabled")&&G.set("hoverEnabled",!1)},onKeyDown(Ie){const _e=G.select("keyboardEventRelay");_e&&!Ie.isPropagationStopped()&&_e(Ie)}},an.floating,jt.floating,gt.floating),[fe.type,G,an.floating,jt.floating,gt.floating]),Ut=jt.item??Xt;Vp(G,{floatingRootContext:Me,activeTriggerProps:ht,inactiveTriggerProps:St,popupProps:yt,itemProps:Ut});const dn=b.useMemo(()=>({store:G,parent:X,orientation:h,loopFocus:m,allowEscape:N,defaultFloatingId:H,setRenderedFloatingId:_,virtualFocus:T,parentVirtualFocus:K,syncHighlightedItem:Et}),[G,X,h,m,N,H,T,K,Et]),je=typeof s=="function"?s({payload:be}):s;let at=v.jsxs(hg.Provider,{value:dn,children:[w&&v.jsx(zp,{handle:w,store:G}),je]});return(fe.type===void 0||fe.type==="context-menu")&&(at=v.jsx(GC,{externalTree:ae,children:at})),at});function hA(e){const t=b.useContext(AR);if(t===null)return v.jsx(aH,{...e});const s=t.Root;return v.jsx(AR.Provider,{value:null,children:v.jsx(s,{...t.options,...e})})}const vh=5;function pA(e,t){const s=oH(t);return e.clientX>=s.left-vh&&e.clientX<=s.right+vh&&e.clientY>=s.top-vh&&e.clientY<=s.bottom+vh}function oH(e){const t=e.getBoundingClientRect(),s=Rn(e);if(Ov)return t;const i=s.getComputedStyle(e,"::before"),o=s.getComputedStyle(e,"::after");if(!(i.content!=="none"||o.content!=="none"))return t;const u=parseFloat(i.width)||0,d=parseFloat(i.height)||0,f=parseFloat(o.width)||0,g=parseFloat(o.height)||0,m=Math.max(t.width,u,f),h=Math.max(t.height,d,g),x=m-t.width,S=h-t.height;return{left:t.left-x/2,right:t.right+x/2,top:t.top-S/2,bottom:t.bottom+S/2}}function gA(e={}){const{highlightItemOnHover:t,highlightedIndex:s,onHighlightedIndexChange:i}=ng(),{ref:o,index:l}=Sd(e),u=s===l,d=b.useRef(null),f=es(o,d);return{compositeProps:{tabIndex:u?0:-1,onFocus(){i(l)},onMouseMove(){const m=d.current;if(!t||!m)return;const h=m.hasAttribute("disabled")||m.ariaDisabled==="true";!u&&!h&&m.focus()}},compositeRef:f,index:l}}function Ub(e){const{render:t,className:s,style:i,state:o=Xt,props:l=Ls,refs:u=Ls,metadata:d,stateAttributesMapping:f,tag:g="div",...m}=e,{compositeProps:h,compositeRef:x}=gA({metadata:d});return bt(g,e,{state:o,ref:[x,...u],props:[h,...l,m],stateAttributesMapping:f})}function Hb(e){if(bn(e)&&e.hasAttribute("data-rootownerid"))return e.getAttribute("data-rootownerid");if(!Xi(e))return Hb(Ji(e))}function lH(e){const{enabled:t=!0,mouseDownAction:s,open:i}=e,o=b.useRef(!1);return b.useMemo(()=>t?{onMouseDown:l=>{(s==="open"&&!i||s==="close"&&i)&&(o.current=!0,qt(l.currentTarget).addEventListener("click",()=>{o.current=!1},{once:!0}))},onClick:l=>{o.current&&(o.current=!1,l.preventBaseUIHandler())}}:Xt,[t,s,i])}const cH=vp(function(t,s){const{render:i,className:o,style:l,disabled:u=!1,nativeButton:d=!0,id:f,openOnHover:g,delay:m=100,closeDelay:h=0,handle:x,payload:S,...w}=t,C=sa(!0),R=Yp(x)??C?.store;if(!R)throw new Error(cn(85));const O=$n(f),T=R.useState("isTriggerActive",O),A=R.useState("floatingRootContext"),N=R.useState("isOpenedByTrigger",O),j=R.useState("triggerControlsId",O),D=b.useRef(null),M=dH(),z=ng(!0),L=Xa(),K=b.useMemo(()=>L??new Yv,[L]),X=Gv(K),B=Qa(),{registerTrigger:H,isMountedByThisTrigger:U}=Hp(O,D,R,{payload:S,closeDelay:h,parent:M,floatingTreeRoot:K,floatingNodeId:X,floatingParentNodeId:B,keyboardEventRelay:z?.relayKeyboardEvent}),_=M.type==="menubar",Q=R.useState("disabled"),$=u||Q||_&&M.context.disabled,{getButtonProps:q,buttonRef:Y}=ns({disabled:$,native:d});b.useEffect(()=>{!N&&M.type===void 0&&(R.context.allowMouseUpTriggerRef.current=!1)},[R,N,M.type]);const ee=b.useRef(null),G=Un(),ae=Be(Ue=>{if(!ee.current)return;G.clear(),R.context.allowMouseUpTriggerRef.current=!1;const xe=Ue.target;st(ee.current,xe)||st(R.select("positionerElement"),xe)||xe===ee.current||xe!=null&&Hb(xe)===R.select("rootId")||pA(Ue,ee.current)||K.events.emit("close",{domEvent:Ue,reason:Pv})});b.useEffect(()=>{const Ue=qt(ee.current);if(N&&R.select("lastOpenChangeReason")===Kn)return Ue.addEventListener("mouseup",ae,{once:!0}),()=>{Ue.removeEventListener("mouseup",ae)}},[N,ae,R]);const I=_&&M.context.hasSubmenuOpen,Z=Jv(A,{enabled:(g??I)&&!$&&(!_||I&&!U),handleClose:eb({blockPointerEvents:!_}),mouseOnly:!0,move:!1,restMs:M.type===void 0?m:void 0,delay:{close:h},triggerElementRef:D,externalTree:K,isActiveTrigger:T,isClosing:()=>R.select("transitionStatus")==="ending"}),ne=uH(N,R.select("lastOpenChangeReason")),ye=Pp(A,{enabled:!$,event:N&&_?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:M.type===void 0?ne:!1}),se=nT(A,{enabled:!$&&I}),ge=lH({open:N,enabled:_,mouseDownAction:"open"}),fe=b.useMemo(()=>Dr(se.reference,ye.reference),[se.reference,ye.reference]),ce=R.useState("triggerProps",U),Re=R.useState("filterTriggerProps"),{handlePreFocusGuardFocus:be,handleFocusTargetFocus:Le}=Hk(R,D),Oe={disabled:$,open:N},ze=[ee,s,Y,H,D],Ve=[fe,Z??Xt,ce,{"aria-haspopup":"menu","aria-controls":j,id:O,onMouseDown:Ue=>{if(R.select("open"))return;G.start(200,()=>{R.context.allowMouseUpTriggerRef.current=!0}),qt(Ue.currentTarget).addEventListener("mouseup",ae,{once:!0})}},Re,_?{role:"menuitem"}:{},ge,w,q],ke=bt("button",t,{enabled:!_,stateAttributesMapping:Fu,state:Oe,ref:ze,props:Ve});return _?v.jsx(Ub,{tag:"button",render:i,className:o,style:l,state:Oe,refs:ze,props:Ve,stateAttributesMapping:Fu}):N?v.jsxs(b.Fragment,{children:[v.jsx(Va,{ref:R.context.beforeTriggerFocusGuardRef,onFocus:be},`${O}-pre-focus-guard`),v.jsx(b.Fragment,{children:ke},O),v.jsx(Va,{ref:R.context.triggerFocusTargetRef,onFocus:Le},`${O}-post-focus-guard`)]}):v.jsx(b.Fragment,{children:ke},O)});function uH(e,t){const s=Un(),[i,o]=b.useState(!1);return Pe(()=>{e&&t===Kn?(o(!0),s.start(_C,()=>{o(!1)})):e||(s.clear(),o(!1))},[e,t,s]),i}function dH(){const e=dA();return b.useMemo(()=>e?{type:"menubar",context:e}:{type:void 0},[e])}const fH=b.forwardRef(function(t,s){const{className:i,render:o,orientation:l="horizontal",style:u,...d}=t;return bt("div",t,{state:{orientation:l},ref:s,props:[{role:"separator","aria-orientation":l},d]})});function mA(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}function ap(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function hH(e){return typeof e=="object"&&e!=null&&Array.isArray(e.items)}function yA(e){return hH(e?.[0])}function pH(e){return yA(e)?e.flatMap(t=>t.items):e}function gH(e){if(!Array.isArray(e))return e!=null&&"null"in e;const t=e;if(yA(t)){for(const s of t)for(const i of s.items)if(i&&i.value==null&&i.label!=null)return!0;return!1}for(const s of t)if(s&&s.value==null&&s.label!=null)return!0;return!1}function vA(e,t){if(t&&e!=null)return t(e)??"";if(e&&typeof e=="object"){if("label"in e&&e.label!=null)return String(e.label);if("value"in e)return String(e.value)}return ap(e)}function Bl(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?ap(e.value):ap(e)}function bA(e,t,s){function i(){return vA(e,s)}if(s&&e!=null)return s(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return(Object.hasOwn(t,e)?t[e]:void 0)??i();if(Array.isArray(t)){const l=pH(t);if(e==null||typeof e!="object"){const u=l.find(d=>d.value===e);return u&&u.label!=null?u.label:i()}if("value"in e){const u=l.find(d=>d&&d.value===e.value);if(u&&u.label!=null)return u.label}}return i()}function mH(e,t,s){return e.reduce((i,o,l)=>(l>0&&i.push(", "),i.push(v.jsx(b.Fragment,{children:bA(o,t,s)},l)),i),[])}function Yo({...e}){return v.jsx(hA,{"data-slot":"dropdown-menu",...e})}function Go({...e}){return v.jsx(cH,{"data-slot":"dropdown-menu-trigger",...e})}function $o({align:e="start",alignOffset:t=0,side:s="bottom",sideOffset:i=4,className:o,...l}){return v.jsx(aA,{children:v.jsx(lA,{className:"isolate z-50 outline-none",align:e,alignOffset:t,side:s,sideOffset:i,children:v.jsx(sA,{"data-slot":"dropdown-menu-content",className:He("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",o),...l})})})}function xA({...e}){return v.jsx(AU,{"data-slot":"dropdown-menu-group",...e})}function SA({className:e,inset:t,...s}){return v.jsx(MU,{"data-slot":"dropdown-menu-label","data-inset":t,className:He("px-2 py-1.5 text-xs text-muted-foreground data-inset:pl-7.5",e),...s})}function pc({className:e,inset:t,variant:s="default",...i}){return v.jsx(rA,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":s,className:He("group/dropdown-menu-item relative flex min-h-7 cursor-default items-center gap-2 rounded-md px-2 py-1 text-xs/relaxed outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7.5 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 data-[variant=destructive]:*:[svg]:text-destructive",e),...i})}function yH({...e}){return v.jsx($U,{"data-slot":"dropdown-menu-radio-group",...e})}function vH({className:e,children:t,inset:s,...i}){return v.jsxs(ZU,{"data-slot":"dropdown-menu-radio-item","data-inset":s,className:He("relative flex min-h-7 cursor-default items-center gap-2 rounded-md py-1.5 pr-8 pl-2 text-xs outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7.5 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",e),...i,children:[v.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center","data-slot":"dropdown-menu-radio-item-indicator",children:v.jsx(WU,{children:v.jsx(dd,{})})}),t]})}function Fb(e){return bt(e.defaultTagName??"div",e,e)}const bH="data-valid",xH="data-invalid",SH={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},wH={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},EH={disabled:!1,...wH},gc={valid(e){return e===null?null:e?{[bH]:""}:{[xH]:""}}},RH={invalid:void 0,name:void 0,validityData:{state:SH,errors:[],error:"",value:"",initialValue:null},setValidityData:En,disabled:void 0,setTouched:En,setDirty:En,setFilled:En,setFocused:En,focusOwnerRef:{current:void 0},validationMode:"onSubmit",shouldValidateOnChange:()=>!1,state:EH,registerFieldControl:En,validation:{getValidationProps:(e,t=Xt)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:En,getInputControl:()=>null,commit:async()=>{},change:En}},CH=b.createContext(RH);function ia(e=!0){const t=b.useContext(CH);if(t.setValidityData===En&&!e)throw new Error(cn(28));return t}const TH=b.createContext(void 0);function kH(e=!1){const t=b.useContext(TH);if(!t&&!e)throw new Error(cn(86));return t}const OH=b.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:En,validationMode:"onSubmit",submitCountRef:{current:0}});function wd(){return b.useContext(OH)}const AH=b.createContext({controlId:void 0,registerControlId:En,resetControlId:En,labelId:void 0,setLabelId:En,messageIds:[],setMessageIds:En,getDescriptionProps:e=>e});function Qo(){return b.useContext(AH)}function Bb(e,t,s,i=!0,o,l){const[u,d]=b.useState(),f=$n(o?`${o}-label`:void 0),g=!!l?.trim(),h=e??(g?void 0:t)??u;return Pe(()=>{const x=e||t||g||!i?void 0:MH(s.current,f);u!==x&&d(x)}),h}function MH(e,t){const s=NH(e);if(s)return!s.id&&t&&(s.id=t),s.id||void 0}function NH(e){if(!e)return;const t=e.parentElement;if(t&&t.tagName==="LABEL")return t;const s=e.id;if(s){const o=e.nextElementSibling;if(o&&o.htmlFor===s)return o}const i=e.labels;return i&&i[0]}function mc(e={}){const{id:t,enabled:s=!0}=e,{controlId:i,registerControlId:o,resetControlId:l}=Qo(),u=$n(),d=rr(()=>Symbol()),f=b.useRef(!1),g=b.useRef(!1),m=Be(()=>{!f.current||o===En||(f.current=!1,o(d.current,void 0))});return Pe(()=>{if(!s||o===En){m();return}let h;if(t!==void 0)g.current=!0,h=t;else if(g.current)h=u;else{l();return}if(h===void 0){m();return}f.current=!0,o(d.current,h)},[t,s,o,l,u,d,m]),Pe(()=>m,[m]),(s?i:void 0)??t??u}function DH(e,t){return e.matches(":disabled")?!1:!t||e.form===t?!0:e.form===null&&!e.hasAttribute("form")}const jH=b.createContext({disabled:!1});function wA(){return b.useContext(jH)}function Ed(e,t,s){const{setFocused:i,focusOwnerRef:o}=ia(),l=Be(u=>{(u?!e:o.current===l)&&(o.current=u&&l,i(u))});return Pe(()=>{const u=t.current;return u?.getRootNode()?.activeElement===u&&l(!0),()=>l(!1)},[e,t,l]),l}function Rd(e,t,s,i,o=!0,l){const{registerFieldControl:u}=ia(),d=rr(()=>Symbol());Pe(()=>{const f=d.current;if(!o){u(f,void 0);return}u(f,{controlRef:e,getValue:i,id:t,name:l,value:s})},[e,o,i,t,l,u,d,s]),Pe(()=>{const f=d.current;return()=>{u(f,void 0)}},[u,d])}const IH=b.forwardRef(function(t,s){const{render:i,className:o,id:l,name:u,value:d,disabled:f=!1,onValueChange:g,defaultValue:m,autoFocus:h=!1,style:x,...S}=t,{state:w,name:C,disabled:E,setTouched:R,setDirty:O,validityData:T,setFilled:A,validationMode:N,validation:j}=ia(),{clearErrors:D,elementRef:M,submitCountRef:z}=wd(),L=E||f,K=C??u,X={...w,disabled:L},{labelId:B}=Qo(),H=mc({id:l}),U=d!==void 0,_=d==null?void 0:String(d),Q=Be(()=>j.inputRef.current?.value);Rd(j.inputRef,H,_,Q,!L,u),Pe(()=>{const G=_??j.inputRef.current?.value;G!==void 0&&A(G!=="")},[_,m,j.inputRef,A]),dc(_,()=>{_!==void 0&&(D(K),O(_!==(T.initialValue??"")),j.change(_))});const $=b.useRef(null),q=Ed(L,$),Y=Un();return bt("input",t,{ref:[s,$],state:X,props:[{id:H,disabled:L,name:K,ref:j.inputRef,"aria-labelledby":B,autoFocus:h,...U?{value:d}:{defaultValue:m},onChange(G){const ae=G.currentTarget.value,I=lt(Cr,G.nativeEvent);g?.(ae,I),!U&&(O(ae!==(T.initialValue??"")),A(ae!==""),!G.nativeEvent.defaultPrevented&&!I.isCanceled&&(D(K),j.change(ae)))},onFocus(){q(!0)},onBlur(G){if(R(!0),q(!1),N==="onBlur"){const ae=G.currentTarget.value;j.commit(ae),U&&queueMicrotask(()=>{const I=j.inputRef.current?.value;I!==void 0&&I!==ae&&I!==(T.initialValue??"")&&j.commit(I)})}},onKeyDown(G){if(G.currentTarget.tagName==="INPUT"&&G.key==="Enter"){R(!0);const ae=G.currentTarget.value,I=G.currentTarget.form;if(I&&I===M.current&&!G.defaultPrevented){const F=G.currentTarget,Z=z.current;Y.start(0,()=>{z.current===Z&&j.commit(F.value)})}else j.commit(ae)}}},S,G=>j.getValidationProps(L,G)],stateAttributesMapping:gc})}),PH=b.forwardRef(function(t,s){return v.jsx(IH,{ref:s,...t})});function Cd({className:e,type:t,...s}){return v.jsx(PH,{type:t,"data-slot":"input",className:He("h-7 w-full min-w-0 rounded-md border border-input bg-input/20 px-2 py-0.5 text-sm transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-xs/relaxed file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 md:text-xs/relaxed dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...s})}function EA({className:e,orientation:t="horizontal",...s}){return v.jsx(fH,{"data-slot":"separator",orientation:t,className:He("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",e),...s})}const RA=b.createContext(void 0);function Wa(e){const t=b.useContext(RA);if(!e&&t===void 0)throw new Error(cn(27));return t}const CA=b.forwardRef(function(t,s){const{render:i,className:o,style:l,forceRender:u=!1,...d}=t,f=Wa(),g=f.useState("open"),m=f.useState("nested"),h=f.useState("mounted"),x=f.useState("transitionStatus");return bt("div",t,{state:{open:g,transitionStatus:x},ref:[f.context.backdropRef,s],stateAttributesMapping:kp,props:[{role:"presentation",hidden:!h,style:{userSelect:"none",WebkitUserSelect:"none"}},d],enabled:u||!m})}),yg=b.forwardRef(function(t,s){const{render:i,className:o,style:l,disabled:u=!1,nativeButton:d=!0,...f}=t,g=Wa(),m=g.useState("open"),{getButtonProps:h,buttonRef:x}=ns({disabled:u,native:d}),S={disabled:u};function w(C){m&&g.setOpen(!1,lt(dC,C.nativeEvent))}return bt("button",t,{state:S,ref:[s,x],props:[{onClick:w},f,h]})}),TA=b.forwardRef(function(t,s){const{render:i,className:o,style:l,id:u,...d}=t,f=Wa(),g=$n(u);return f.useSyncedValueWithCleanup("descriptionElementId",g),bt("p",t,{ref:s,props:[{id:g},d]})}),kA=b.createContext(void 0);function LH(){const e=b.useContext(kA);if(e===void 0)throw new Error(cn(26));return e}const zH="--nested-dialogs",_H="data-nested-dialog-open",UH={...td,...ei,nestedDialogOpen(e){return e?{[_H]:""}:null}},OA=b.forwardRef(function(t,s){const{render:i,className:o,style:l,finalFocus:u,initialFocus:d,...f}=t,g=Wa(),m=g.useState("descriptionElementId"),h=g.useState("disablePointerDismissal"),x=g.useState("floatingRootContext"),S=g.useState("popupProps"),w=g.useState("modal"),C=g.useState("mounted"),E=g.useState("nested"),R=g.useState("nestedOpenDialogCount"),O=g.useState("open"),T=g.useState("openMethod"),A=g.useState("titleElementId"),N=g.useState("transitionStatus"),j=g.useState("role"),D=x.useState("floatingId");LH(),bs({open:O,ref:g.context.popupRef,onComplete(){O&&g.context.onOpenChangeComplete?.(!0)}});const M=d===void 0?XC(g.context.popupRef):d,z=R>0,L=g.useStateSetter("popupElement"),X=bt("div",t,{state:{open:O,nested:E,transitionStatus:N,nestedDialogOpen:z},props:[S,{id:D,"aria-labelledby":A,"aria-describedby":m,role:j,...od,hidden:!C,onKeyDown(B){hd.has(B.key)&&B.stopPropagation()},style:{[zH]:R}},f],ref:[s,g.context.popupRef,L],stateAttributesMapping:UH});return v.jsx(Ip,{context:x,openInteractionType:T,disabled:!C,closeOnFocusOut:!h,initialFocus:M,returnFocus:u,modal:w!==!1,restoreFocus:"popup",children:X})}),AA=b.forwardRef(function(t,s){const{keepMounted:i=!1,...o}=t,l=Wa(),u=l.useState("mounted"),d=l.useState("modal"),f=l.useState("open");return u||i?v.jsx(kA.Provider,{value:i,children:v.jsxs(jp,{ref:s,...o,children:[u&&d===!0&&v.jsx(rg,{ref:l.context.internalBackdropRef,inert:ud(!f)}),t.children]})}):null});function HH({store:e,parentContext:t,isDrawer:s}){const i=e.useState("open"),o=e.useState("mounted"),l=e.useState("disablePointerDismissal"),u=e.useState("modal"),d=e.useState("popupElement"),f=e.useState("floatingRootContext"),[g,m]=b.useState(0),[h,x]=b.useState(0),S=g===0,w=ad(f,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:u==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(C){if(!e.context.outsidePressEnabledRef.current||"button"in C&&C.button!==0)return!1;if("touches"in C){if(C.type==="touchend"){if(C.changedTouches.length!==1||C.touches.length!==0)return!1}else if(C.touches.length!==1)return!1}const E=sr(C);if(S&&!l){if(u){const R=e.context.internalBackdropRef.current,O=e.context.backdropRef.current;return R||O?R===E||O===E||st(E,d)&&!E?.hasAttribute("data-base-ui-portal"):!0}return!0}return!1},escapeKey:S});return qk(i&&u===!0,d),e.useContextCallback("onNestedDialogOpen",(C,E)=>{!e.select("open")&&!e.select("mounted")||(m(C),x(E))}),Pe(()=>{!i&&!o&&(m(0),x(0))},[i,o]),Pe(()=>(t?.onNestedDialogOpen&&i&&t.onNestedDialogOpen(g+1,h+(s?1:0)),()=>{t?.onNestedDialogOpen&&i&&t.onNestedDialogOpen(0,0)}),[s,i,g,h,t]),Vp(e,{activeTriggerProps:w.reference,inactiveTriggerProps:w.trigger,popupProps:w.floating,nestedOpenDialogCount:g,nestedOpenDrawerCount:h}),null}const FH={...$i,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role};class BH extends cc{constructor(t,s,i){const o=new ld,l=VH(t,o,s,i);super(l,KH(o),FH)}setOpen=(t,s)=>{s.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!t&&s.trigger==null&&this.state.activeTriggerId!=null&&(s.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(t,s),!s.isCanceled&&(this.state.floatingRootContext.dispatchOpenChange(t,s),this.update(_p(this.state,t,s.trigger)))}}function VH(e,t,s,i=!1){return{...qp(t,s,i),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...e}}function KH(e){return{popupRef:b.createRef(),backdropRef:b.createRef(),internalBackdropRef:b.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function qH(e,t){const{children:s,open:i,defaultOpen:o=!1,onOpenChange:l,onOpenChangeComplete:u,disablePointerDismissal:d=!1,modal:f=!0,actionsRef:g,handle:m,triggerId:h,defaultTriggerId:x=null}=t,S=e==="drawer",w=f,C=d,E="dialog",R=Wa(!0),O=R!=null,T={modal:w,disablePointerDismissal:C,nested:O,role:E},A=Qv((L,K)=>new BH({open:o,openProp:i,activeTriggerId:x,triggerIdProp:h,...T},L,K),!0);A.useControlledProp("openProp",i),A.useControlledProp("triggerIdProp",h),A.useSyncedValues(T),A.useContextCallback("onOpenChange",l),A.useContextCallback("onOpenChangeComplete",u);const N=A.useState("open"),j=A.useState("mounted"),D=A.useState("payload");ZC(A,N),Fp(A);const{forceUnmount:M}=Bp(N,A);b.useImperativeHandle(g,()=>({unmount:M,close:()=>A.setOpen(!1,lt(sd))}),[M,A]);const z=N||j||m!=null;return v.jsxs(RA.Provider,{value:A,children:[m&&v.jsx(zp,{handle:m,store:A}),z&&v.jsx(HH,{store:A,parentContext:R?.context,isDrawer:S}),typeof s=="function"?s({payload:D}):s]})}const MA=Wu(function(t){return qH("dialog",t)}),NA=b.forwardRef(function(t,s){const{render:i,className:o,style:l,id:u,...d}=t,f=Wa(),g=$n(u);return f.useSyncedValueWithCleanup("titleElementId",g),bt("h2",t,{ref:s,props:[{id:g},d]})}),YH=vp(function(t,s){const{render:i,className:o,style:l,disabled:u=!1,nativeButton:d=!0,id:f,payload:g,handle:m,...h}=t,x=Wa(!0),w=Yp(m)??x;if(!w)throw new Error(cn(79));const C=$n(f),E=w.useState("floatingRootContext"),R=w.useState("isOpenedByTrigger",C),O=w.useState("triggerPopupId",C),T=b.useRef(null),{registerTrigger:A,isMountedByThisTrigger:N}=Hp(C,T,w,{payload:g}),{getButtonProps:j,buttonRef:D}=ns({disabled:u,native:d}),M=Pp(E),z=hb(()=>w.select("open"),X=>{w.set("openMethod",X)}),L={disabled:u,open:R},K=w.useState("triggerProps",N);return bt("button",t,{state:L,ref:[D,s,A,T],props:[M.reference,K,z,{[Kv]:"",id:C,"aria-haspopup":"dialog","aria-expanded":R,"aria-controls":O},h,j],stateAttributesMapping:Tp})});function Vb({...e}){return v.jsx(MA,{"data-slot":"sheet",...e})}function DA({...e}){return v.jsx(YH,{"data-slot":"sheet-trigger",...e})}function GH({...e}){return v.jsx(AA,{"data-slot":"sheet-portal",...e})}function $H({className:e,...t}){return v.jsx(CA,{"data-slot":"sheet-overlay",className:He("fixed inset-0 z-50 bg-black/80 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",e),...t})}function Kb({className:e,children:t,side:s="right",showCloseButton:i=!0,...o}){const{t:l}=pt();return v.jsxs(GH,{children:[v.jsx($H,{}),v.jsxs(OA,{"data-slot":"sheet-content","data-side":s,className:He("fixed z-50 flex flex-col bg-popover bg-clip-padding text-xs/relaxed text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-10 data-[side=bottom]:data-starting-style:translate-y-10 data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:-translate-x-10 data-[side=left]:data-starting-style:-translate-x-10 data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-10 data-[side=right]:data-starting-style:translate-x-10 data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:-translate-y-10 data-[side=top]:data-starting-style:-translate-y-10 data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",e),...o,children:[t,i&&v.jsxs(yg,{"data-slot":"sheet-close",render:v.jsx(We,{variant:"ghost",className:"absolute top-4 right-4",size:"icon-sm"}),children:[v.jsx(ra,{}),v.jsx("span",{className:"sr-only",children:l("a11y.close")})]})]})]})}function jA({className:e,...t}){return v.jsx("div",{"data-slot":"sheet-header",className:He("flex flex-col gap-1.5 p-6",e),...t})}function qb({className:e,...t}){return v.jsx(NA,{"data-slot":"sheet-title",className:He("font-heading text-sm font-medium text-foreground",e),...t})}function QH({className:e,...t}){return v.jsx(TA,{"data-slot":"sheet-description",className:He("text-xs/relaxed text-muted-foreground",e),...t})}function Gn({className:e,...t}){return v.jsx("div",{"data-slot":"skeleton",className:He("animate-pulse rounded-md bg-muted",e),...t})}const XH="sidebar_state",ZH=3600*24*7,WH="16rem",JH="18rem",eF="3rem",tF="b",IA=b.createContext(null);function yc(){const e=b.useContext(IA);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function nF({defaultOpen:e=!0,open:t,onOpenChange:s,className:i,style:o,children:l,...u}){const d=Rb(),[f,g]=b.useState(!1),[m,h]=b.useState(e),x=t??m,S=b.useCallback(R=>{const O=typeof R=="function"?R(x):R;s?s(O):h(O),document.cookie=`${XH}=${O}; path=/; max-age=${ZH}`},[s,x]),w=b.useCallback(()=>d?g(R=>!R):S(R=>!R),[d,S,g]);b.useEffect(()=>{const R=O=>{O.key===tF&&(O.metaKey||O.ctrlKey)&&(O.preventDefault(),w())};return window.addEventListener("keydown",R),()=>window.removeEventListener("keydown",R)},[w]);const C=x?"expanded":"collapsed",E=b.useMemo(()=>({state:C,open:x,setOpen:S,isMobile:d,openMobile:f,setOpenMobile:g,toggleSidebar:w}),[C,x,S,d,f,g,w]);return v.jsx(IA.Provider,{value:E,children:v.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":WH,"--sidebar-width-icon":eF,...o},className:He("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",i),...u,children:l})})}function rF({side:e="left",variant:t="sidebar",collapsible:s="offcanvas",className:i,children:o,dir:l,...u}){const{t:d}=pt(),{isMobile:f,state:g,openMobile:m,setOpenMobile:h}=yc();return s==="none"?v.jsx("div",{"data-slot":"sidebar",className:He("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",i),...u,children:o}):f?v.jsx(Vb,{open:m,onOpenChange:h,...u,children:v.jsxs(Kb,{dir:l,"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":JH},side:e,children:[v.jsxs(jA,{className:"sr-only",children:[v.jsx(qb,{children:d("a11y.sidebar")}),v.jsx(QH,{children:d("a11y.sidebarDescription")})]}),v.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):v.jsxs("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":g,"data-collapsible":g==="collapsed"?s:"","data-variant":t,"data-side":e,"data-slot":"sidebar",children:[v.jsx("div",{"data-slot":"sidebar-gap",className:He("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),v.jsx("div",{"data-slot":"sidebar-container","data-side":e,className:He("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:-left-(--sidebar-width) data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:-right-(--sidebar-width) md:flex",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",i),...u,children:v.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border",children:o})})]})}function sF({className:e,onClick:t,...s}){const{t:i}=pt(),{toggleSidebar:o}=yc();return v.jsxs(We,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:He(e),onClick:l=>{t?.(l),o()},...s,children:[v.jsx(HL,{}),v.jsx("span",{className:"sr-only",children:i("a11y.toggleSidebar")})]})}function iF({className:e,...t}){const{t:s}=pt(),{toggleSidebar:i}=yc();return v.jsx("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":s("a11y.toggleSidebar"),tabIndex:-1,onClick:i,title:s("a11y.toggleSidebar"),className:He("absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:inset-s-1/2 after:w-0.5 hover:after:bg-sidebar-border sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})}function aF({className:e,...t}){return v.jsx("main",{"data-slot":"sidebar-inset",className:He("relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",e),...t})}function oF({className:e,...t}){return v.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:He("flex flex-col gap-2 p-2",e),...t})}function lF({className:e,...t}){return v.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:He("no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})}function cF({className:e,...t}){return v.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:He("relative flex w-full min-w-0 flex-col px-2 py-1",e),...t})}function PA({className:e,...t}){return v.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:He("flex w-full min-w-0 flex-col gap-px",e),...t})}function Lh({className:e,...t}){return v.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:He("group/menu-item relative",e),...t})}const uF=Bo("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-[calc(var(--radius-sm)+2px)] p-2 text-left text-xs ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]"},size:{default:"h-8 text-xs",sm:"h-7 text-xs",lg:"h-12 text-xs group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function zh({render:e,isActive:t=!1,variant:s="default",size:i="default",tooltip:o,className:l,...u}){const{isMobile:d,state:f}=yc(),g=Fb({defaultTagName:"button",props:Dr({className:He(uF({variant:s,size:i}),l)},u),render:o?v.jsx(ep,{render:e}):e,state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:i,active:t}});return o?(typeof o=="string"&&(o={children:o}),v.jsxs(Jh,{children:[g,v.jsx(tp,{side:"right",align:"center",hidden:f!=="collapsed"||d,...o})]})):g}function dF({className:e,...t}){return v.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:He("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5 group-data-[collapsible=icon]:hidden",e),...t})}function fF({className:e,...t}){return v.jsx("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:He("group/menu-sub-item relative",e),...t})}function hF({render:e,size:t="md",isActive:s=!1,className:i,...o}){return Fb({defaultTagName:"a",props:Dr({className:He("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden group-data-[collapsible=icon]:hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-xs data-[size=sm]:text-xs data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground",i)},o),render:e,state:{slot:"sidebar-menu-sub-button",sidebar:"menu-sub-button",size:t,active:s}})}function pF({items:e}){const{t}=pt(),{pathname:s}=Tr(),{isMobile:i,state:o}=yc(),l=o==="collapsed"&&!i,u=d=>s===d||s.startsWith(`${d}/`);return v.jsx(cF,{children:v.jsx(PA,{children:e.map(d=>{const f=d.icon,g=d.items?.some(m=>u(m.url))??!1;return d.items?l?v.jsx(Lh,{children:v.jsxs(Yo,{children:[v.jsxs(Go,{render:v.jsx(zh,{tooltip:t(d.titleKey),isActive:g}),children:[v.jsx(f,{}),v.jsx("span",{children:t(d.titleKey)})]}),v.jsx($o,{className:"w-40",side:"right",align:"start",sideOffset:4,children:v.jsxs(xA,{children:[v.jsx(SA,{children:t(d.titleKey)}),d.items.map(m=>v.jsx(pc,{className:"cursor-pointer",render:v.jsx(ju,{to:m.url}),children:v.jsx("span",{children:t(m.titleKey)})},m.titleKey))]})})]})},d.titleKey):v.jsxs(mU,{defaultOpen:g,className:"group/collapsible",render:v.jsx(Lh,{}),children:[v.jsxs(yU,{render:v.jsx(zh,{tooltip:t(d.titleKey),isActive:g}),children:[v.jsx(f,{}),v.jsx("span",{children:t(d.titleKey)}),v.jsx(sb,{className:`
50
+ ml-auto transition-transform duration-200
51
+ group-data-open/collapsible:rotate-90
52
+ `})]}),v.jsx(vU,{children:v.jsx(dF,{children:d.items.map(m=>v.jsx(fF,{children:v.jsx(hF,{isActive:u(m.url),render:v.jsx(ju,{to:m.url}),children:v.jsx("span",{children:t(m.titleKey)})})},m.titleKey))})})]},`${d.titleKey}-${g?"active":"inactive"}`):v.jsx(Lh,{children:v.jsxs(zh,{tooltip:t(d.titleKey),isActive:s===d.url,render:v.jsx(ju,{to:d.url??"/dashboard"}),children:[v.jsx(f,{}),v.jsx("span",{children:t(d.titleKey)})]})},d.titleKey)})})})}const Yb=[{titleKey:"nav.dashboard",url:"/dashboard",icon:jL},{titleKey:"nav.library",icon:IL,items:[{titleKey:"nav.instructions",url:"/library/instructions"},{titleKey:"nav.skills",url:"/library/skills"}]},{titleKey:"nav.models",icon:nb,items:[{titleKey:"nav.genesis",url:"/models/genesis"},{titleKey:"nav.explorer",url:"/models/explorer"},{titleKey:"nav.quantum",url:"/models/quantum"}]}],gF=new Map([["/settings","nav.settings"],...Yb.flatMap(e=>[...e.url?[[e.url,e.titleKey]]:[],...e.items?.map(t=>[t.url,t.titleKey])??[]])]);function LA(e){return e.startsWith("/library/skills/")?"nav.skills":gF.get(e)??"nav.dashboard"}const mF=Yb.flatMap(e=>[...e.url?[e.url]:[],...e.items?.map(t=>t.url)??[]]),yF=mF;function vF({...e}){const{t}=pt(),s=Tr(),{pathname:i}=s,{isMobile:o,setOpenMobile:l}=yc();return b.useEffect(()=>{o&&l(!1)},[o,i,l]),v.jsxs(rF,{collapsible:"icon",...e,children:[v.jsx(lF,{children:v.jsx(pF,{items:Yb})}),v.jsx(oF,{children:v.jsx(PA,{children:v.jsx(Lh,{children:v.jsxs(zh,{tooltip:t("nav.settings"),render:v.jsx(ju,{to:"/settings",state:{backTo:jr(s)}}),children:[v.jsx(BL,{}),v.jsx("span",{children:t("nav.settings")})]})})})}),v.jsx(iF,{})]})}function bF({className:e,...t}){return v.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:He(e),...t})}function xF({className:e,...t}){return v.jsx("ol",{"data-slot":"breadcrumb-list",className:He("flex flex-wrap items-center gap-1.5 text-xs/relaxed wrap-break-word text-muted-foreground",e),...t})}function SF({className:e,...t}){return v.jsx("li",{"data-slot":"breadcrumb-item",className:He("inline-flex items-center gap-1",e),...t})}function wF({className:e,render:t,...s}){return Fb({defaultTagName:"a",props:Dr({className:He("transition-colors hover:text-foreground",e)},s),render:t,state:{slot:"breadcrumb-link"}})}function EF({className:e,...t}){return v.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:He("font-normal text-foreground",e),...t})}function RF({children:e,className:t,...s}){return v.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:He("[&>svg]:size-3.5",t),...s,children:e??v.jsx(sb,{})})}function CF({items:e}){const{t}=pt();return v.jsx(bF,{"aria-label":t("a11y.breadcrumb"),className:"min-w-0",children:v.jsx(xF,{className:"flex-nowrap text-sm font-medium text-foreground",children:e.map((s,i)=>v.jsxs(b.Fragment,{children:[i>0&&v.jsx(RF,{}),v.jsx(SF,{className:s.to?"shrink-0":"min-w-0",children:s.to?v.jsx(wF,{render:v.jsx(xd,{to:s.to}),className:"truncate",title:s.label,children:s.label}):v.jsx(EF,{className:"truncate font-medium",title:s.label,children:s.label})})]},s.to??s.label))})})}const vg=b.createContext(null);vg.displayName="PageHeaderActionsContext";function TF({children:e}){const[t,s]=b.useState(null);return v.jsx(vg,{value:{container:t,setContainer:s},children:e})}function kF(){const e=b.use(vg);if(!e)throw new Error("PageHeaderActionsSlot must be used within PageHeaderActionsProvider");const t=e.setContainer,s=b.useCallback(i=>{t(i)},[t]);return v.jsx("div",{ref:s,className:"ml-auto flex shrink-0 items-center gap-2 px-4"})}function zA({children:e}){const t=b.use(vg);return t?.container?hr.createPortal(e,t.container):null}function OF(){const{t:e}=pt(),{pathname:t}=Tr(),s=F6("/library/skills/:name");return v.jsx(TF,{children:v.jsxs(nF,{className:"h-svh pb-6",children:[v.jsx(vF,{className:"pb-6"}),v.jsxs(aF,{className:s?"h-full min-w-0 overflow-hidden":"min-w-0",children:[v.jsxs("header",{className:`
53
+ flex h-16 shrink-0 items-center gap-2 transition-[width,height]
54
+ ease-linear
55
+ group-has-data-[collapsible=icon]/sidebar-wrapper:h-12
56
+ `,children:[v.jsxs("div",{className:"flex min-w-0 items-center gap-2 px-4",children:[v.jsx(sF,{size:"icon",className:"-ml-1"}),v.jsx(EA,{orientation:"vertical",className:`
57
+ mr-2
58
+ data-vertical:h-4 data-vertical:self-auto
59
+ `}),v.jsx(CF,{items:s?[{label:e("nav.skills"),to:"/library/skills"},{label:s.params.name??""}]:[{label:e(LA(t))}]})]}),v.jsx(kF,{})]}),v.jsx(VO,{})]})]})})}function AF(){const{t:e}=pt(),{pathname:t,state:s}=Tr(),i=qo(),o=MF(s)?s.backTo:"/dashboard",l=()=>{i(o)};return v.jsxs("div",{"data-slot":"full-screen-layout",className:"flex h-dvh flex-col overflow-hidden bg-background pb-6",children:[v.jsx("header",{className:`
60
+ flex h-16 shrink-0 items-center gap-2 transition-[width,height]
61
+ ease-linear
62
+ `,children:v.jsxs("div",{className:"flex items-center gap-2 px-4",children:[v.jsxs(We,{variant:"ghost",size:"icon",className:"-ml-1",onClick:l,children:[v.jsx(wL,{}),v.jsx("span",{className:"sr-only",children:e("a11y.goBack")})]}),v.jsx(EA,{orientation:"vertical",className:`
63
+ mr-2
64
+ data-vertical:h-4 data-vertical:self-auto
65
+ `}),v.jsx("span",{className:"text-sm font-medium",children:e(LA(t))})]})}),v.jsx("main",{className:"min-h-0 flex-1 overflow-hidden",children:v.jsx(VO,{})})]})}function MF(e){return typeof e=="object"&&e!==null&&"backTo"in e&&typeof e.backTo=="string"&&e.backTo.length>0}function NF(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return b.useMemo(()=>i=>{t.forEach(o=>o(i))},t)}const bg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function vc(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Gb(e){return"nodeType"in e}function qr(e){var t,s;return e?vc(e)?e:Gb(e)&&(t=(s=e.ownerDocument)==null?void 0:s.defaultView)!=null?t:window:window}function $b(e){const{Document:t}=qr(e);return e instanceof t}function Td(e){return vc(e)?!1:e instanceof qr(e).HTMLElement}function _A(e){return e instanceof qr(e).SVGElement}function bc(e){return e?vc(e)?e.document:Gb(e)?$b(e)?e:Td(e)||_A(e)?e.ownerDocument:document:document:document}const Xs=bg?b.useLayoutEffect:b.useEffect;function xg(e){const t=b.useRef(e);return Xs(()=>{t.current=e}),b.useCallback(function(){for(var s=arguments.length,i=new Array(s),o=0;o<s;o++)i[o]=arguments[o];return t.current==null?void 0:t.current(...i)},[])}function DF(){const e=b.useRef(null),t=b.useCallback((i,o)=>{e.current=setInterval(i,o)},[]),s=b.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,s]}function Gu(e,t){t===void 0&&(t=[e]);const s=b.useRef(e);return Xs(()=>{s.current!==e&&(s.current=e)},t),s}function kd(e,t){const s=b.useRef();return b.useMemo(()=>{const i=e(s.current);return s.current=i,i},[...t])}function op(e){const t=xg(e),s=b.useRef(null),i=b.useCallback(o=>{o!==s.current&&t?.(o,s.current),s.current=o},[]);return[s,i]}function lp(e){const t=b.useRef();return b.useEffect(()=>{t.current=e},[e]),t.current}let Ty={};function Od(e,t){return b.useMemo(()=>{if(t)return t;const s=Ty[e]==null?0:Ty[e]+1;return Ty[e]=s,e+"-"+s},[e,t])}function UA(e){return function(t){for(var s=arguments.length,i=new Array(s>1?s-1:0),o=1;o<s;o++)i[o-1]=arguments[o];return i.reduce((l,u)=>{const d=Object.entries(u);for(const[f,g]of d){const m=l[f];m!=null&&(l[f]=m+e*g)}return l},{...t})}}const ec=UA(1),$u=UA(-1);function jF(e){return"clientX"in e&&"clientY"in e}function Sg(e){if(!e)return!1;const{KeyboardEvent:t}=qr(e.target);return t&&e instanceof t}function IF(e){if(!e)return!1;const{TouchEvent:t}=qr(e.target);return t&&e instanceof t}function cp(e){if(IF(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:s}=e.touches[0];return{x:t,y:s}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:s}=e.changedTouches[0];return{x:t,y:s}}}return jF(e)?{x:e.clientX,y:e.clientY}:null}const Ga=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:s}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(s?Math.round(s):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:s}=e;return"scaleX("+t+") scaleY("+s+")"}},Transform:{toString(e){if(e)return[Ga.Translate.toString(e),Ga.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:s,easing:i}=e;return t+" "+s+"ms "+i}}}),MR="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function PF(e){return e.matches(MR)?e:e.querySelector(MR)}const LF={display:"none"};function zF(e){let{id:t,value:s}=e;return Ne.createElement("div",{id:t,style:LF},s)}function _F(e){let{id:t,announcement:s,ariaLiveType:i="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return Ne.createElement("div",{id:t,style:o,role:"status","aria-live":i,"aria-atomic":!0},s)}function UF(){const[e,t]=b.useState("");return{announce:b.useCallback(i=>{i!=null&&t(i)},[]),announcement:e}}const HA=b.createContext(null);function HF(e){const t=b.useContext(HA);b.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function FF(){const[e]=b.useState(()=>new Set),t=b.useCallback(i=>(e.add(i),()=>e.delete(i)),[e]);return[b.useCallback(i=>{let{type:o,event:l}=i;e.forEach(u=>{var d;return(d=u[o])==null?void 0:d.call(u,l)})},[e]),t]}const BF={draggable:`
66
+ To pick up a draggable item, press the space bar.
67
+ While dragging, use the arrow keys to move the item.
68
+ Press space again to drop the item in its new position, or press escape to cancel.
69
+ `},VF={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:s}=e;return s?"Draggable item "+t.id+" was moved over droppable area "+s.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:s}=e;return s?"Draggable item "+t.id+" was dropped over droppable area "+s.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function KF(e){let{announcements:t=VF,container:s,hiddenTextDescribedById:i,screenReaderInstructions:o=BF}=e;const{announce:l,announcement:u}=UF(),d=Od("DndLiveRegion"),[f,g]=b.useState(!1);if(b.useEffect(()=>{g(!0)},[]),HF(b.useMemo(()=>({onDragStart(h){let{active:x}=h;l(t.onDragStart({active:x}))},onDragMove(h){let{active:x,over:S}=h;t.onDragMove&&l(t.onDragMove({active:x,over:S}))},onDragOver(h){let{active:x,over:S}=h;l(t.onDragOver({active:x,over:S}))},onDragEnd(h){let{active:x,over:S}=h;l(t.onDragEnd({active:x,over:S}))},onDragCancel(h){let{active:x,over:S}=h;l(t.onDragCancel({active:x,over:S}))}}),[l,t])),!f)return null;const m=Ne.createElement(Ne.Fragment,null,Ne.createElement(zF,{id:i,value:o.draggable}),Ne.createElement(_F,{id:d,announcement:u}));return s?hr.createPortal(m,s):m}var or;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(or||(or={}));function up(){}function ky(e,t){return b.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function qF(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return b.useMemo(()=>[...t].filter(i=>i!=null),[...t])}const Zs=Object.freeze({x:0,y:0});function Qb(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function YF(e,t){const s=cp(e);if(!s)return"0 0";const i={x:(s.x-t.left)/t.width*100,y:(s.y-t.top)/t.height*100};return i.x+"% "+i.y+"%"}function Xb(e,t){let{data:{value:s}}=e,{data:{value:i}}=t;return s-i}function GF(e,t){let{data:{value:s}}=e,{data:{value:i}}=t;return i-s}function hv(e){let{left:t,top:s,height:i,width:o}=e;return[{x:t,y:s},{x:t+o,y:s},{x:t,y:s+i},{x:t+o,y:s+i}]}function FA(e,t){if(!e||e.length===0)return null;const[s]=e;return s[t]}function NR(e,t,s){return t===void 0&&(t=e.left),s===void 0&&(s=e.top),{x:t+e.width*.5,y:s+e.height*.5}}const $F=e=>{let{collisionRect:t,droppableRects:s,droppableContainers:i}=e;const o=NR(t,t.left,t.top),l=[];for(const u of i){const{id:d}=u,f=s.get(d);if(f){const g=Qb(NR(f),o);l.push({id:d,data:{droppableContainer:u,value:g}})}}return l.sort(Xb)},QF=e=>{let{collisionRect:t,droppableRects:s,droppableContainers:i}=e;const o=hv(t),l=[];for(const u of i){const{id:d}=u,f=s.get(d);if(f){const g=hv(f),m=o.reduce((x,S,w)=>x+Qb(g[w],S),0),h=Number((m/4).toFixed(4));l.push({id:d,data:{droppableContainer:u,value:h}})}}return l.sort(Xb)};function XF(e,t){const s=Math.max(t.top,e.top),i=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),l=Math.min(t.top+t.height,e.top+e.height),u=o-i,d=l-s;if(i<o&&s<l){const f=t.width*t.height,g=e.width*e.height,m=u*d,h=m/(f+g-m);return Number(h.toFixed(4))}return 0}const ZF=e=>{let{collisionRect:t,droppableRects:s,droppableContainers:i}=e;const o=[];for(const l of i){const{id:u}=l,d=s.get(u);if(d){const f=XF(d,t);f>0&&o.push({id:u,data:{droppableContainer:l,value:f}})}}return o.sort(GF)};function WF(e,t){const{top:s,left:i,bottom:o,right:l}=t;return s<=e.y&&e.y<=o&&i<=e.x&&e.x<=l}const JF=e=>{let{droppableContainers:t,droppableRects:s,pointerCoordinates:i}=e;if(!i)return[];const o=[];for(const l of t){const{id:u}=l,d=s.get(u);if(d&&WF(i,d)){const g=hv(d).reduce((h,x)=>h+Qb(i,x),0),m=Number((g/4).toFixed(4));o.push({id:u,data:{droppableContainer:l,value:m}})}}return o.sort(Xb)};function e7(e,t,s){return{...e,scaleX:t&&s?t.width/s.width:1,scaleY:t&&s?t.height/s.height:1}}function BA(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Zs}function t7(e){return function(s){for(var i=arguments.length,o=new Array(i>1?i-1:0),l=1;l<i;l++)o[l-1]=arguments[l];return o.reduce((u,d)=>({...u,top:u.top+e*d.y,bottom:u.bottom+e*d.y,left:u.left+e*d.x,right:u.right+e*d.x}),{...s})}}const n7=t7(1);function VA(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function r7(e,t,s){const i=VA(t);if(!i)return e;const{scaleX:o,scaleY:l,x:u,y:d}=i,f=e.left-u-(1-o)*parseFloat(s),g=e.top-d-(1-l)*parseFloat(s.slice(s.indexOf(" ")+1)),m=o?e.width/o:e.width,h=l?e.height/l:e.height;return{width:m,height:h,top:g,right:f+m,bottom:g+h,left:f}}const s7={ignoreTransform:!1};function xc(e,t){t===void 0&&(t=s7);let s=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:g,transformOrigin:m}=qr(e).getComputedStyle(e);g&&(s=r7(s,g,m))}const{top:i,left:o,width:l,height:u,bottom:d,right:f}=s;return{top:i,left:o,width:l,height:u,bottom:d,right:f}}function DR(e){return xc(e,{ignoreTransform:!0})}function i7(e){const t=e.innerWidth,s=e.innerHeight;return{top:0,left:0,right:t,bottom:s,width:t,height:s}}function a7(e,t){return t===void 0&&(t=qr(e).getComputedStyle(e)),t.position==="fixed"}function o7(e,t){t===void 0&&(t=qr(e).getComputedStyle(e));const s=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const l=t[o];return typeof l=="string"?s.test(l):!1})}function wg(e,t){const s=[];function i(o){if(t!=null&&s.length>=t||!o)return s;if($b(o)&&o.scrollingElement!=null&&!s.includes(o.scrollingElement))return s.push(o.scrollingElement),s;if(!Td(o)||_A(o)||s.includes(o))return s;const l=qr(e).getComputedStyle(o);return o!==e&&o7(o,l)&&s.push(o),a7(o,l)?s:i(o.parentNode)}return e?i(e):s}function KA(e){const[t]=wg(e,1);return t??null}function Oy(e){return!bg||!e?null:vc(e)?e:Gb(e)?$b(e)||e===bc(e).scrollingElement?window:Td(e)?e:null:null}function qA(e){return vc(e)?e.scrollX:e.scrollLeft}function YA(e){return vc(e)?e.scrollY:e.scrollTop}function pv(e){return{x:qA(e),y:YA(e)}}var fr;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(fr||(fr={}));function GA(e){return!bg||!e?!1:e===document.scrollingElement}function $A(e){const t={x:0,y:0},s=GA(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},i={x:e.scrollWidth-s.width,y:e.scrollHeight-s.height},o=e.scrollTop<=t.y,l=e.scrollLeft<=t.x,u=e.scrollTop>=i.y,d=e.scrollLeft>=i.x;return{isTop:o,isLeft:l,isBottom:u,isRight:d,maxScroll:i,minScroll:t}}const l7={x:.2,y:.2};function c7(e,t,s,i,o){let{top:l,left:u,right:d,bottom:f}=s;i===void 0&&(i=10),o===void 0&&(o=l7);const{isTop:g,isBottom:m,isLeft:h,isRight:x}=$A(e),S={x:0,y:0},w={x:0,y:0},C={height:t.height*o.y,width:t.width*o.x};return!g&&l<=t.top+C.height?(S.y=fr.Backward,w.y=i*Math.abs((t.top+C.height-l)/C.height)):!m&&f>=t.bottom-C.height&&(S.y=fr.Forward,w.y=i*Math.abs((t.bottom-C.height-f)/C.height)),!x&&d>=t.right-C.width?(S.x=fr.Forward,w.x=i*Math.abs((t.right-C.width-d)/C.width)):!h&&u<=t.left+C.width&&(S.x=fr.Backward,w.x=i*Math.abs((t.left+C.width-u)/C.width)),{direction:S,speed:w}}function u7(e){if(e===document.scrollingElement){const{innerWidth:l,innerHeight:u}=window;return{top:0,left:0,right:l,bottom:u,width:l,height:u}}const{top:t,left:s,right:i,bottom:o}=e.getBoundingClientRect();return{top:t,left:s,right:i,bottom:o,width:e.clientWidth,height:e.clientHeight}}function QA(e){return e.reduce((t,s)=>ec(t,pv(s)),Zs)}function d7(e){return e.reduce((t,s)=>t+qA(s),0)}function f7(e){return e.reduce((t,s)=>t+YA(s),0)}function XA(e,t){if(t===void 0&&(t=xc),!e)return;const{top:s,left:i,bottom:o,right:l}=t(e);KA(e)&&(o<=0||l<=0||s>=window.innerHeight||i>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const h7=[["x",["left","right"],d7],["y",["top","bottom"],f7]];class Zb{constructor(t,s){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const i=wg(s),o=QA(i);this.rect={...t},this.width=t.width,this.height=t.height;for(const[l,u,d]of h7)for(const f of u)Object.defineProperty(this,f,{get:()=>{const g=d(i),m=o[l]-g;return this.rect[f]+m},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Iu{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(s=>{var i;return(i=this.target)==null?void 0:i.removeEventListener(...s)})},this.target=t}add(t,s,i){var o;(o=this.target)==null||o.addEventListener(t,s,i),this.listeners.push([t,s,i])}}function p7(e){const{EventTarget:t}=qr(e);return e instanceof t?e:bc(e)}function Ay(e,t){const s=Math.abs(e.x),i=Math.abs(e.y);return typeof t=="number"?Math.sqrt(s**2+i**2)>t:"x"in t&&"y"in t?s>t.x&&i>t.y:"x"in t?s>t.x:"y"in t?i>t.y:!1}var js;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(js||(js={}));function jR(e){e.preventDefault()}function g7(e){e.stopPropagation()}var en;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(en||(en={}));const ZA={start:[en.Space,en.Enter],cancel:[en.Esc],end:[en.Space,en.Enter,en.Tab]},m7=(e,t)=>{let{currentCoordinates:s}=t;switch(e.code){case en.Right:return{...s,x:s.x+25};case en.Left:return{...s,x:s.x-25};case en.Down:return{...s,y:s.y+25};case en.Up:return{...s,y:s.y-25}}};class Wb{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:s}}=t;this.props=t,this.listeners=new Iu(bc(s)),this.windowListeners=new Iu(qr(s)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(js.Resize,this.handleCancel),this.windowListeners.add(js.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(js.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:s}=this.props,i=t.node.current;i&&XA(i),s(Zs)}handleKeyDown(t){if(Sg(t)){const{active:s,context:i,options:o}=this.props,{keyboardCodes:l=ZA,coordinateGetter:u=m7,scrollBehavior:d="smooth"}=o,{code:f}=t;if(l.end.includes(f)){this.handleEnd(t);return}if(l.cancel.includes(f)){this.handleCancel(t);return}const{collisionRect:g}=i.current,m=g?{x:g.left,y:g.top}:Zs;this.referenceCoordinates||(this.referenceCoordinates=m);const h=u(t,{active:s,context:i.current,currentCoordinates:m});if(h){const x=$u(h,m),S={x:0,y:0},{scrollableAncestors:w}=i.current;for(const C of w){const E=t.code,{isTop:R,isRight:O,isLeft:T,isBottom:A,maxScroll:N,minScroll:j}=$A(C),D=u7(C),M={x:Math.min(E===en.Right?D.right-D.width/2:D.right,Math.max(E===en.Right?D.left:D.left+D.width/2,h.x)),y:Math.min(E===en.Down?D.bottom-D.height/2:D.bottom,Math.max(E===en.Down?D.top:D.top+D.height/2,h.y))},z=E===en.Right&&!O||E===en.Left&&!T,L=E===en.Down&&!A||E===en.Up&&!R;if(z&&M.x!==h.x){const K=C.scrollLeft+x.x,X=E===en.Right&&K<=N.x||E===en.Left&&K>=j.x;if(X&&!x.y){C.scrollTo({left:K,behavior:d});return}X?S.x=C.scrollLeft-K:S.x=E===en.Right?C.scrollLeft-N.x:C.scrollLeft-j.x,S.x&&C.scrollBy({left:-S.x,behavior:d});break}else if(L&&M.y!==h.y){const K=C.scrollTop+x.y,X=E===en.Down&&K<=N.y||E===en.Up&&K>=j.y;if(X&&!x.x){C.scrollTo({top:K,behavior:d});return}X?S.y=C.scrollTop-K:S.y=E===en.Down?C.scrollTop-N.y:C.scrollTop-j.y,S.y&&C.scrollBy({top:-S.y,behavior:d});break}}this.handleMove(t,ec($u(h,this.referenceCoordinates),S))}}}handleMove(t,s){const{onMove:i}=this.props;t.preventDefault(),i(s)}handleEnd(t){const{onEnd:s}=this.props;t.preventDefault(),this.detach(),s()}handleCancel(t){const{onCancel:s}=this.props;t.preventDefault(),this.detach(),s()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Wb.activators=[{eventName:"onKeyDown",handler:(e,t,s)=>{let{keyboardCodes:i=ZA,onActivation:o}=t,{active:l}=s;const{code:u}=e.nativeEvent;if(i.start.includes(u)){const d=l.activatorNode.current;return d&&e.target!==d?!1:(e.preventDefault(),o?.({event:e.nativeEvent}),!0)}return!1}}];function IR(e){return!!(e&&"distance"in e)}function PR(e){return!!(e&&"delay"in e)}class Jb{constructor(t,s,i){var o;i===void 0&&(i=p7(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=s;const{event:l}=t,{target:u}=l;this.props=t,this.events=s,this.document=bc(u),this.documentListeners=new Iu(this.document),this.listeners=new Iu(i),this.windowListeners=new Iu(qr(u)),this.initialCoordinates=(o=cp(l))!=null?o:Zs,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:s,bypassActivationConstraint:i}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(js.Resize,this.handleCancel),this.windowListeners.add(js.DragStart,jR),this.windowListeners.add(js.VisibilityChange,this.handleCancel),this.windowListeners.add(js.ContextMenu,jR),this.documentListeners.add(js.Keydown,this.handleKeydown),s){if(i!=null&&i({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(PR(s)){this.timeoutId=setTimeout(this.handleStart,s.delay),this.handlePending(s);return}if(IR(s)){this.handlePending(s);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,s){const{active:i,onPending:o}=this.props;o(i,t,this.initialCoordinates,s)}handleStart(){const{initialCoordinates:t}=this,{onStart:s}=this.props;t&&(this.activated=!0,this.documentListeners.add(js.Click,g7,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(js.SelectionChange,this.removeTextSelection),s(t))}handleMove(t){var s;const{activated:i,initialCoordinates:o,props:l}=this,{onMove:u,options:{activationConstraint:d}}=l;if(!o)return;const f=(s=cp(t))!=null?s:Zs,g=$u(o,f);if(!i&&d){if(IR(d)){if(d.tolerance!=null&&Ay(g,d.tolerance))return this.handleCancel();if(Ay(g,d.distance))return this.handleStart()}if(PR(d)&&Ay(g,d.tolerance))return this.handleCancel();this.handlePending(d,g);return}t.cancelable&&t.preventDefault(),u(f)}handleEnd(){const{onAbort:t,onEnd:s}=this.props;this.detach(),this.activated||t(this.props.active),s()}handleCancel(){const{onAbort:t,onCancel:s}=this.props;this.detach(),this.activated||t(this.props.active),s()}handleKeydown(t){t.code===en.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const y7={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class WA extends Jb{constructor(t){const{event:s}=t,i=bc(s.target);super(t,y7,i)}}WA.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:s}=e,{onActivation:i}=t;return!s.isPrimary||s.button!==0?!1:(i?.({event:s}),!0)}}];const v7={move:{name:"mousemove"},end:{name:"mouseup"}};var gv;(function(e){e[e.RightClick=2]="RightClick"})(gv||(gv={}));class JA extends Jb{constructor(t){super(t,v7,bc(t.event.target))}}JA.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:s}=e,{onActivation:i}=t;return s.button===gv.RightClick?!1:(i?.({event:s}),!0)}}];const My={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class eM extends Jb{constructor(t){super(t,My)}static setup(){return window.addEventListener(My.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(My.move.name,t)};function t(){}}}eM.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:s}=e,{onActivation:i}=t;const{touches:o}=s;return o.length>1?!1:(i?.({event:s}),!0)}}];var Pu;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Pu||(Pu={}));var dp;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(dp||(dp={}));function b7(e){let{acceleration:t,activator:s=Pu.Pointer,canScroll:i,draggingRect:o,enabled:l,interval:u=5,order:d=dp.TreeOrder,pointerCoordinates:f,scrollableAncestors:g,scrollableAncestorRects:m,delta:h,threshold:x}=e;const S=S7({delta:h,disabled:!l}),[w,C]=DF(),E=b.useRef({x:0,y:0}),R=b.useRef({x:0,y:0}),O=b.useMemo(()=>{switch(s){case Pu.Pointer:return f?{top:f.y,bottom:f.y,left:f.x,right:f.x}:null;case Pu.DraggableRect:return o}},[s,o,f]),T=b.useRef(null),A=b.useCallback(()=>{const j=T.current;if(!j)return;const D=E.current.x*R.current.x,M=E.current.y*R.current.y;j.scrollBy(D,M)},[]),N=b.useMemo(()=>d===dp.TreeOrder?[...g].reverse():g,[d,g]);b.useEffect(()=>{if(!l||!g.length||!O){C();return}for(const j of N){if(i?.(j)===!1)continue;const D=g.indexOf(j),M=m[D];if(!M)continue;const{direction:z,speed:L}=c7(j,M,O,t,x);for(const K of["x","y"])S[K][z[K]]||(L[K]=0,z[K]=0);if(L.x>0||L.y>0){C(),T.current=j,w(A,u),E.current=L,R.current=z;return}}E.current={x:0,y:0},R.current={x:0,y:0},C()},[t,A,i,C,l,u,JSON.stringify(O),JSON.stringify(S),w,g,N,m,JSON.stringify(x)])}const x7={x:{[fr.Backward]:!1,[fr.Forward]:!1},y:{[fr.Backward]:!1,[fr.Forward]:!1}};function S7(e){let{delta:t,disabled:s}=e;const i=lp(t);return kd(o=>{if(s||!i||!o)return x7;const l={x:Math.sign(t.x-i.x),y:Math.sign(t.y-i.y)};return{x:{[fr.Backward]:o.x[fr.Backward]||l.x===-1,[fr.Forward]:o.x[fr.Forward]||l.x===1},y:{[fr.Backward]:o.y[fr.Backward]||l.y===-1,[fr.Forward]:o.y[fr.Forward]||l.y===1}}},[s,t,i])}function w7(e,t){const s=t!=null?e.get(t):void 0,i=s?s.node.current:null;return kd(o=>{var l;return t==null?null:(l=i??o)!=null?l:null},[i,t])}function E7(e,t){return b.useMemo(()=>e.reduce((s,i)=>{const{sensor:o}=i,l=o.activators.map(u=>({eventName:u.eventName,handler:t(u.handler,i)}));return[...s,...l]},[]),[e,t])}var Qu;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Qu||(Qu={}));var mv;(function(e){e.Optimized="optimized"})(mv||(mv={}));const LR=new Map;function R7(e,t){let{dragging:s,dependencies:i,config:o}=t;const[l,u]=b.useState(null),{frequency:d,measure:f,strategy:g}=o,m=b.useRef(e),h=E(),x=Gu(h),S=b.useCallback(function(R){R===void 0&&(R=[]),!x.current&&u(O=>O===null?R:O.concat(R.filter(T=>!O.includes(T))))},[x]),w=b.useRef(null),C=kd(R=>{if(h&&!s)return LR;if(!R||R===LR||m.current!==e||l!=null){const O=new Map;for(let T of e){if(!T)continue;if(l&&l.length>0&&!l.includes(T.id)&&T.rect.current){O.set(T.id,T.rect.current);continue}const A=T.node.current,N=A?new Zb(f(A),A):null;T.rect.current=N,N&&O.set(T.id,N)}return O}return R},[e,l,s,h,f]);return b.useEffect(()=>{m.current=e},[e]),b.useEffect(()=>{h||S()},[s,h]),b.useEffect(()=>{l&&l.length>0&&u(null)},[JSON.stringify(l)]),b.useEffect(()=>{h||typeof d!="number"||w.current!==null||(w.current=setTimeout(()=>{S(),w.current=null},d))},[d,h,S,...i]),{droppableRects:C,measureDroppableContainers:S,measuringScheduled:l!=null};function E(){switch(g){case Qu.Always:return!1;case Qu.BeforeDragging:return s;default:return!s}}}function ex(e,t){return kd(s=>e?s||(typeof t=="function"?t(e):e):null,[t,e])}function C7(e,t){return ex(e,t)}function T7(e){let{callback:t,disabled:s}=e;const i=xg(t),o=b.useMemo(()=>{if(s||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:l}=window;return new l(i)},[i,s]);return b.useEffect(()=>()=>o?.disconnect(),[o]),o}function Eg(e){let{callback:t,disabled:s}=e;const i=xg(t),o=b.useMemo(()=>{if(s||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:l}=window;return new l(i)},[s]);return b.useEffect(()=>()=>o?.disconnect(),[o]),o}function k7(e){return new Zb(xc(e),e)}function zR(e,t,s){t===void 0&&(t=k7);const[i,o]=b.useState(null);function l(){o(f=>{if(!e)return null;if(e.isConnected===!1){var g;return(g=f??s)!=null?g:null}const m=t(e);return JSON.stringify(f)===JSON.stringify(m)?f:m})}const u=T7({callback(f){if(e)for(const g of f){const{type:m,target:h}=g;if(m==="childList"&&h instanceof HTMLElement&&h.contains(e)){l();break}}}}),d=Eg({callback:l});return Xs(()=>{l(),e?(d?.observe(e),u?.observe(document.body,{childList:!0,subtree:!0})):(d?.disconnect(),u?.disconnect())},[e]),i}function O7(e){const t=ex(e);return BA(e,t)}const _R=[];function A7(e){const t=b.useRef(e),s=kd(i=>e?i&&i!==_R&&e&&t.current&&e.parentNode===t.current.parentNode?i:wg(e):_R,[e]);return b.useEffect(()=>{t.current=e},[e]),s}function M7(e){const[t,s]=b.useState(null),i=b.useRef(e),o=b.useCallback(l=>{const u=Oy(l.target);u&&s(d=>d?(d.set(u,pv(u)),new Map(d)):null)},[]);return b.useEffect(()=>{const l=i.current;if(e!==l){u(l);const d=e.map(f=>{const g=Oy(f);return g?(g.addEventListener("scroll",o,{passive:!0}),[g,pv(g)]):null}).filter(f=>f!=null);s(d.length?new Map(d):null),i.current=e}return()=>{u(e),u(l)};function u(d){d.forEach(f=>{const g=Oy(f);g?.removeEventListener("scroll",o)})}},[o,e]),b.useMemo(()=>e.length?t?Array.from(t.values()).reduce((l,u)=>ec(l,u),Zs):QA(e):Zs,[e,t])}function UR(e,t){t===void 0&&(t=[]);const s=b.useRef(null);return b.useEffect(()=>{s.current=null},t),b.useEffect(()=>{const i=e!==Zs;i&&!s.current&&(s.current=e),!i&&s.current&&(s.current=null)},[e]),s.current?$u(e,s.current):Zs}function N7(e){b.useEffect(()=>{if(!bg)return;const t=e.map(s=>{let{sensor:i}=s;return i.setup==null?void 0:i.setup()});return()=>{for(const s of t)s?.()}},e.map(t=>{let{sensor:s}=t;return s}))}function D7(e,t){return b.useMemo(()=>e.reduce((s,i)=>{let{eventName:o,handler:l}=i;return s[o]=u=>{l(u,t)},s},{}),[e,t])}function tM(e){return b.useMemo(()=>e?i7(e):null,[e])}const HR=[];function j7(e,t){t===void 0&&(t=xc);const[s]=e,i=tM(s?qr(s):null),[o,l]=b.useState(HR);function u(){l(()=>e.length?e.map(f=>GA(f)?i:new Zb(t(f),f)):HR)}const d=Eg({callback:u});return Xs(()=>{d?.disconnect(),u(),e.forEach(f=>d?.observe(f))},[e]),o}function nM(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Td(t)?t:e}function I7(e){let{measure:t}=e;const[s,i]=b.useState(null),o=b.useCallback(g=>{for(const{target:m}of g)if(Td(m)){i(h=>{const x=t(m);return h?{...h,width:x.width,height:x.height}:x});break}},[t]),l=Eg({callback:o}),u=b.useCallback(g=>{const m=nM(g);l?.disconnect(),m&&l?.observe(m),i(m?t(m):null)},[t,l]),[d,f]=op(u);return b.useMemo(()=>({nodeRef:d,rect:s,setRef:f}),[s,d,f])}const P7=[{sensor:WA,options:{}},{sensor:Wb,options:{}}],L7={current:{}},_h={draggable:{measure:DR},droppable:{measure:DR,strategy:Qu.WhileDragging,frequency:mv.Optimized},dragOverlay:{measure:xc}};class Lu extends Map{get(t){var s;return t!=null&&(s=super.get(t))!=null?s:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:s}=t;return!s})}getNodeFor(t){var s,i;return(s=(i=this.get(t))==null?void 0:i.node.current)!=null?s:void 0}}const z7={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Lu,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:up},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:_h,measureDroppableContainers:up,windowRect:null,measuringScheduled:!1},rM={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:up,draggableNodes:new Map,over:null,measureDroppableContainers:up},Ad=b.createContext(rM),sM=b.createContext(z7);function _7(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Lu}}}function U7(e,t){switch(t.type){case or.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case or.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case or.DragEnd:case or.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case or.RegisterDroppable:{const{element:s}=t,{id:i}=s,o=new Lu(e.droppable.containers);return o.set(i,s),{...e,droppable:{...e.droppable,containers:o}}}case or.SetDroppableDisabled:{const{id:s,key:i,disabled:o}=t,l=e.droppable.containers.get(s);if(!l||i!==l.key)return e;const u=new Lu(e.droppable.containers);return u.set(s,{...l,disabled:o}),{...e,droppable:{...e.droppable,containers:u}}}case or.UnregisterDroppable:{const{id:s,key:i}=t,o=e.droppable.containers.get(s);if(!o||i!==o.key)return e;const l=new Lu(e.droppable.containers);return l.delete(s),{...e,droppable:{...e.droppable,containers:l}}}default:return e}}function H7(e){let{disabled:t}=e;const{active:s,activatorEvent:i,draggableNodes:o}=b.useContext(Ad),l=lp(i),u=lp(s?.id);return b.useEffect(()=>{if(!t&&!i&&l&&u!=null){if(!Sg(l)||document.activeElement===l.target)return;const d=o.get(u);if(!d)return;const{activatorNode:f,node:g}=d;if(!f.current&&!g.current)return;requestAnimationFrame(()=>{for(const m of[f.current,g.current]){if(!m)continue;const h=PF(m);if(h){h.focus();break}}})}},[i,t,o,u,l]),null}function iM(e,t){let{transform:s,...i}=t;return e!=null&&e.length?e.reduce((o,l)=>l({transform:o,...i}),s):s}function F7(e){return b.useMemo(()=>({draggable:{..._h.draggable,...e?.draggable},droppable:{..._h.droppable,...e?.droppable},dragOverlay:{..._h.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function B7(e){let{activeNode:t,measure:s,initialRect:i,config:o=!0}=e;const l=b.useRef(!1),{x:u,y:d}=typeof o=="boolean"?{x:o,y:o}:o;Xs(()=>{if(!u&&!d||!t){l.current=!1;return}if(l.current||!i)return;const g=t?.node.current;if(!g||g.isConnected===!1)return;const m=s(g),h=BA(m,i);if(u||(h.x=0),d||(h.y=0),l.current=!0,Math.abs(h.x)>0||Math.abs(h.y)>0){const x=KA(g);x&&x.scrollBy({top:h.y,left:h.x})}},[t,u,d,i,s])}const Rg=b.createContext({...Zs,scaleX:1,scaleY:1});var La;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(La||(La={}));const V7=b.memo(function(t){var s,i,o,l;let{id:u,accessibility:d,autoScroll:f=!0,children:g,sensors:m=P7,collisionDetection:h=ZF,measuring:x,modifiers:S,...w}=t;const C=b.useReducer(U7,void 0,_7),[E,R]=C,[O,T]=FF(),[A,N]=b.useState(La.Uninitialized),j=A===La.Initialized,{draggable:{active:D,nodes:M,translate:z},droppable:{containers:L}}=E,K=D!=null?M.get(D):null,X=b.useRef({initial:null,translated:null}),B=b.useMemo(()=>{var St;return D!=null?{id:D,data:(St=K?.data)!=null?St:L7,rect:X}:null},[D,K]),H=b.useRef(null),[U,_]=b.useState(null),[Q,$]=b.useState(null),q=Gu(w,Object.values(w)),Y=Od("DndDescribedBy",u),ee=b.useMemo(()=>L.getEnabled(),[L]),G=F7(x),{droppableRects:ae,measureDroppableContainers:I,measuringScheduled:F}=R7(ee,{dragging:j,dependencies:[z.x,z.y],config:G.droppable}),Z=w7(M,D),ne=b.useMemo(()=>Q?cp(Q):null,[Q]),ye=ht(),se=C7(Z,G.draggable.measure);B7({activeNode:D!=null?M.get(D):null,config:ye.layoutShiftCompensation,initialRect:se,measure:G.draggable.measure});const ge=zR(Z,G.draggable.measure,se),fe=zR(Z?Z.parentElement:null),ce=b.useRef({activatorEvent:null,active:null,activeNode:Z,collisionRect:null,collisions:null,droppableRects:ae,draggableNodes:M,draggingNode:null,draggingNodeRect:null,droppableContainers:L,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Re=L.getNodeFor((s=ce.current.over)==null?void 0:s.id),be=I7({measure:G.dragOverlay.measure}),Le=(i=be.nodeRef.current)!=null?i:Z,Oe=j?(o=be.rect)!=null?o:ge:null,ze=!!(be.nodeRef.current&&be.rect),Ve=O7(ze?null:ge),ke=tM(Le?qr(Le):null),Ue=A7(j?Re??Z:null),xe=j7(Ue),Fe=iM(S,{transform:{x:z.x-Ve.x,y:z.y-Ve.y,scaleX:1,scaleY:1},activatorEvent:Q,active:B,activeNodeRect:ge,containerNodeRect:fe,draggingNodeRect:Oe,over:ce.current.over,overlayNodeRect:be.rect,scrollableAncestors:Ue,scrollableAncestorRects:xe,windowRect:ke}),Ze=ne?ec(ne,z):null,ot=M7(Ue),de=UR(ot),Ee=UR(ot,[ge]),Ge=ec(Fe,de),Me=Oe?n7(Oe,Fe):null,De=B&&Me?h({active:B,collisionRect:Me,droppableRects:ae,droppableContainers:ee,pointerCoordinates:Ze}):null,xt=FA(De,"id"),[dt,gt]=b.useState(null),Nt=ze?Fe:ec(Fe,Ee),jt=e7(Nt,(l=dt?.rect)!=null?l:null,ge),tn=b.useRef(null),an=b.useCallback((St,yt)=>{let{sensor:Ut,options:dn}=yt;if(H.current==null)return;const je=M.get(H.current);if(!je)return;const at=St.nativeEvent,Ie=new Ut({active:H.current,activeNode:je,event:at,options:dn,context:ce,onAbort($e){if(!M.get($e))return;const{onDragAbort:kt}=q.current,V={id:$e};kt?.(V),O({type:"onDragAbort",event:V})},onPending($e,tt,kt,V){if(!M.get($e))return;const{onDragPending:re}=q.current,ve={id:$e,constraint:tt,initialCoordinates:kt,offset:V};re?.(ve),O({type:"onDragPending",event:ve})},onStart($e){const tt=H.current;if(tt==null)return;const kt=M.get(tt);if(!kt)return;const{onDragStart:V}=q.current,J={activatorEvent:at,active:{id:tt,data:kt.data,rect:X}};hr.unstable_batchedUpdates(()=>{V?.(J),N(La.Initializing),R({type:or.DragStart,initialCoordinates:$e,active:tt}),O({type:"onDragStart",event:J}),_(tn.current),$(at)})},onMove($e){R({type:or.DragMove,coordinates:$e})},onEnd:_e(or.DragEnd),onCancel:_e(or.DragCancel)});tn.current=Ie;function _e($e){return async function(){const{active:kt,collisions:V,over:J,scrollAdjustedTranslate:re}=ce.current;let ve=null;if(kt&&re){const{cancelDrop:Se}=q.current;ve={activatorEvent:at,active:kt,collisions:V,delta:re,over:J},$e===or.DragEnd&&typeof Se=="function"&&await Promise.resolve(Se(ve))&&($e=or.DragCancel)}H.current=null,hr.unstable_batchedUpdates(()=>{R({type:$e}),N(La.Uninitialized),gt(null),_(null),$(null),tn.current=null;const Se=$e===or.DragEnd?"onDragEnd":"onDragCancel";if(ve){const qe=q.current[Se];qe?.(ve),O({type:Se,event:ve})}})}}},[M]),nn=b.useCallback((St,yt)=>(Ut,dn)=>{const je=Ut.nativeEvent,at=M.get(dn);if(H.current!==null||!at||je.dndKit||je.defaultPrevented)return;const Ie={active:at};St(Ut,yt.options,Ie)===!0&&(je.dndKit={capturedBy:yt.sensor},H.current=dn,an(Ut,yt))},[M,an]),et=E7(m,nn);N7(m),Xs(()=>{ge&&A===La.Initializing&&N(La.Initialized)},[ge,A]),b.useEffect(()=>{const{onDragMove:St}=q.current,{active:yt,activatorEvent:Ut,collisions:dn,over:je}=ce.current;if(!yt||!Ut)return;const at={active:yt,activatorEvent:Ut,collisions:dn,delta:{x:Ge.x,y:Ge.y},over:je};hr.unstable_batchedUpdates(()=>{St?.(at),O({type:"onDragMove",event:at})})},[Ge.x,Ge.y]),b.useEffect(()=>{const{active:St,activatorEvent:yt,collisions:Ut,droppableContainers:dn,scrollAdjustedTranslate:je}=ce.current;if(!St||H.current==null||!yt||!je)return;const{onDragOver:at}=q.current,Ie=dn.get(xt),_e=Ie&&Ie.rect.current?{id:Ie.id,rect:Ie.rect.current,data:Ie.data,disabled:Ie.disabled}:null,$e={active:St,activatorEvent:yt,collisions:Ut,delta:{x:je.x,y:je.y},over:_e};hr.unstable_batchedUpdates(()=>{gt(_e),at?.($e),O({type:"onDragOver",event:$e})})},[xt]),Xs(()=>{ce.current={activatorEvent:Q,active:B,activeNode:Z,collisionRect:Me,collisions:De,droppableRects:ae,draggableNodes:M,draggingNode:Le,draggingNodeRect:Oe,droppableContainers:L,over:dt,scrollableAncestors:Ue,scrollAdjustedTranslate:Ge},X.current={initial:Oe,translated:Me}},[B,Z,De,Me,M,Le,Oe,ae,L,dt,Ue,Ge]),b7({...ye,delta:z,draggingRect:Me,pointerCoordinates:Ze,scrollableAncestors:Ue,scrollableAncestorRects:xe});const Et=b.useMemo(()=>({active:B,activeNode:Z,activeNodeRect:ge,activatorEvent:Q,collisions:De,containerNodeRect:fe,dragOverlay:be,draggableNodes:M,droppableContainers:L,droppableRects:ae,over:dt,measureDroppableContainers:I,scrollableAncestors:Ue,scrollableAncestorRects:xe,measuringConfiguration:G,measuringScheduled:F,windowRect:ke}),[B,Z,ge,Q,De,fe,be,M,L,ae,dt,I,Ue,xe,G,F,ke]),Zt=b.useMemo(()=>({activatorEvent:Q,activators:et,active:B,activeNodeRect:ge,ariaDescribedById:{draggable:Y},dispatch:R,draggableNodes:M,over:dt,measureDroppableContainers:I}),[Q,et,B,ge,R,Y,M,dt,I]);return Ne.createElement(HA.Provider,{value:T},Ne.createElement(Ad.Provider,{value:Zt},Ne.createElement(sM.Provider,{value:Et},Ne.createElement(Rg.Provider,{value:jt},g)),Ne.createElement(H7,{disabled:d?.restoreFocus===!1})),Ne.createElement(KF,{...d,hiddenTextDescribedById:Y}));function ht(){const St=U?.autoScrollEnabled===!1,yt=typeof f=="object"?f.enabled===!1:f===!1,Ut=j&&!St&&!yt;return typeof f=="object"?{...f,enabled:Ut}:{enabled:Ut}}}),K7=b.createContext(null),FR="button",q7="Draggable";function aM(e){let{id:t,data:s,disabled:i=!1,attributes:o}=e;const l=Od(q7),{activators:u,activatorEvent:d,active:f,activeNodeRect:g,ariaDescribedById:m,draggableNodes:h,over:x}=b.useContext(Ad),{role:S=FR,roleDescription:w="draggable",tabIndex:C=0}=o??{},E=f?.id===t,R=b.useContext(E?Rg:K7),[O,T]=op(),[A,N]=op(),j=D7(u,t),D=Gu(s);Xs(()=>(h.set(t,{id:t,key:l,node:O,activatorNode:A,data:D}),()=>{const z=h.get(t);z&&z.key===l&&h.delete(t)}),[h,t]);const M=b.useMemo(()=>({role:S,tabIndex:C,"aria-disabled":i,"aria-pressed":E&&S===FR?!0:void 0,"aria-roledescription":w,"aria-describedby":m.draggable}),[i,S,C,E,w,m.draggable]);return{active:f,activatorEvent:d,activeNodeRect:g,attributes:M,isDragging:E,listeners:i?void 0:j,node:O,over:x,setNodeRef:T,setActivatorNodeRef:N,transform:R}}function oM(){return b.useContext(sM)}const Y7="Droppable",G7={timeout:25};function lM(e){let{data:t,disabled:s=!1,id:i,resizeObserverConfig:o}=e;const l=Od(Y7),{active:u,dispatch:d,over:f,measureDroppableContainers:g}=b.useContext(Ad),m=b.useRef({disabled:s}),h=b.useRef(!1),x=b.useRef(null),S=b.useRef(null),{disabled:w,updateMeasurementsFor:C,timeout:E}={...G7,...o},R=Gu(C??i),O=b.useCallback(()=>{if(!h.current){h.current=!0;return}S.current!=null&&clearTimeout(S.current),S.current=setTimeout(()=>{g(Array.isArray(R.current)?R.current:[R.current]),S.current=null},E)},[E]),T=Eg({callback:O,disabled:w||!u}),A=b.useCallback((M,z)=>{T&&(z&&(T.unobserve(z),h.current=!1),M&&T.observe(M))},[T]),[N,j]=op(A),D=Gu(t);return b.useEffect(()=>{!T||!N.current||(T.disconnect(),h.current=!1,T.observe(N.current))},[N,T]),b.useEffect(()=>(d({type:or.RegisterDroppable,element:{id:i,key:l,disabled:s,node:N,rect:x,data:D}}),()=>d({type:or.UnregisterDroppable,key:l,id:i})),[i]),b.useEffect(()=>{s!==m.current.disabled&&(d({type:or.SetDroppableDisabled,id:i,key:l,disabled:s}),m.current.disabled=s)},[i,l,s,d]),{active:u,rect:x,isOver:f?.id===i,node:N,over:f,setNodeRef:j}}function $7(e){let{animation:t,children:s}=e;const[i,o]=b.useState(null),[l,u]=b.useState(null),d=lp(s);return!s&&!i&&d&&o(d),Xs(()=>{if(!l)return;const f=i?.key,g=i?.props.id;if(f==null||g==null){o(null);return}Promise.resolve(t(g,l)).then(()=>{o(null)})},[t,i,l]),Ne.createElement(Ne.Fragment,null,s,i?b.cloneElement(i,{ref:u}):null)}const Q7={x:0,y:0,scaleX:1,scaleY:1};function X7(e){let{children:t}=e;return Ne.createElement(Ad.Provider,{value:rM},Ne.createElement(Rg.Provider,{value:Q7},t))}const Z7={position:"fixed",touchAction:"none"},W7=e=>Sg(e)?"transform 250ms ease":void 0,J7=b.forwardRef((e,t)=>{let{as:s,activatorEvent:i,adjustScale:o,children:l,className:u,rect:d,style:f,transform:g,transition:m=W7}=e;if(!d)return null;const h=o?g:{...g,scaleX:1,scaleY:1},x={...Z7,width:d.width,height:d.height,top:d.top,left:d.left,transform:Ga.Transform.toString(h),transformOrigin:o&&i?YF(i,d):void 0,transition:typeof m=="function"?m(i):m,...f};return Ne.createElement(s,{className:u,style:x,ref:t},l)}),eB=e=>t=>{let{active:s,dragOverlay:i}=t;const o={},{styles:l,className:u}=e;if(l!=null&&l.active)for(const[d,f]of Object.entries(l.active))f!==void 0&&(o[d]=s.node.style.getPropertyValue(d),s.node.style.setProperty(d,f));if(l!=null&&l.dragOverlay)for(const[d,f]of Object.entries(l.dragOverlay))f!==void 0&&i.node.style.setProperty(d,f);return u!=null&&u.active&&s.node.classList.add(u.active),u!=null&&u.dragOverlay&&i.node.classList.add(u.dragOverlay),function(){for(const[f,g]of Object.entries(o))s.node.style.setProperty(f,g);u!=null&&u.active&&s.node.classList.remove(u.active)}},tB=e=>{let{transform:{initial:t,final:s}}=e;return[{transform:Ga.Transform.toString(t)},{transform:Ga.Transform.toString(s)}]},nB={duration:250,easing:"ease",keyframes:tB,sideEffects:eB({styles:{active:{opacity:"0"}}})};function rB(e){let{config:t,draggableNodes:s,droppableContainers:i,measuringConfiguration:o}=e;return xg((l,u)=>{if(t===null)return;const d=s.get(l);if(!d)return;const f=d.node.current;if(!f)return;const g=nM(u);if(!g)return;const{transform:m}=qr(u).getComputedStyle(u),h=VA(m);if(!h)return;const x=typeof t=="function"?t:sB(t);return XA(f,o.draggable.measure),x({active:{id:l,data:d.data,node:f,rect:o.draggable.measure(f)},draggableNodes:s,dragOverlay:{node:u,rect:o.dragOverlay.measure(g)},droppableContainers:i,measuringConfiguration:o,transform:h})})}function sB(e){const{duration:t,easing:s,sideEffects:i,keyframes:o}={...nB,...e};return l=>{let{active:u,dragOverlay:d,transform:f,...g}=l;if(!t)return;const m={x:d.rect.left-u.rect.left,y:d.rect.top-u.rect.top},h={scaleX:f.scaleX!==1?u.rect.width*f.scaleX/d.rect.width:1,scaleY:f.scaleY!==1?u.rect.height*f.scaleY/d.rect.height:1},x={x:f.x-m.x,y:f.y-m.y,...h},S=o({...g,active:u,dragOverlay:d,transform:{initial:f,final:x}}),[w]=S,C=S[S.length-1];if(JSON.stringify(w)===JSON.stringify(C))return;const E=i?.({active:u,dragOverlay:d,...g}),R=d.node.animate(S,{duration:t,easing:s,fill:"forwards"});return new Promise(O=>{R.onfinish=()=>{E?.(),O()}})}}let BR=0;function iB(e){return b.useMemo(()=>{if(e!=null)return BR++,BR},[e])}const aB=Ne.memo(e=>{let{adjustScale:t=!1,children:s,dropAnimation:i,style:o,transition:l,modifiers:u,wrapperElement:d="div",className:f,zIndex:g=999}=e;const{activatorEvent:m,active:h,activeNodeRect:x,containerNodeRect:S,draggableNodes:w,droppableContainers:C,dragOverlay:E,over:R,measuringConfiguration:O,scrollableAncestors:T,scrollableAncestorRects:A,windowRect:N}=oM(),j=b.useContext(Rg),D=iB(h?.id),M=iM(u,{activatorEvent:m,active:h,activeNodeRect:x,containerNodeRect:S,draggingNodeRect:E.rect,over:R,overlayNodeRect:E.rect,scrollableAncestors:T,scrollableAncestorRects:A,transform:j,windowRect:N}),z=ex(x),L=rB({config:i,draggableNodes:w,droppableContainers:C,measuringConfiguration:O}),K=z?E.setRef:void 0;return Ne.createElement(X7,null,Ne.createElement($7,{animation:L},h&&D?Ne.createElement(J7,{key:D,id:h.id,ref:K,as:d,activatorEvent:m,adjustScale:t,className:f,transition:l,rect:z,style:{zIndex:g,...o},transform:M},s):null))});function tx(e,t,s){const i=e.slice();return i.splice(s<0?i.length+s:s,0,i.splice(t,1)[0]),i}function oB(e,t){return e.reduce((s,i,o)=>{const l=t.get(i);return l&&(s[o]=l),s},Array(e.length))}function bh(e){return e!==null&&e>=0}function lB(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let s=0;s<e.length;s++)if(e[s]!==t[s])return!1;return!0}function cB(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const cM=e=>{let{rects:t,activeIndex:s,overIndex:i,index:o}=e;const l=tx(t,i,s),u=t[o],d=l[o];return!d||!u?null:{x:d.left-u.left,y:d.top-u.top,scaleX:d.width/u.width,scaleY:d.height/u.height}},xh={scaleX:1,scaleY:1},uB=e=>{var t;let{activeIndex:s,activeNodeRect:i,index:o,rects:l,overIndex:u}=e;const d=(t=l[s])!=null?t:i;if(!d)return null;if(o===s){const g=l[u];return g?{x:0,y:s<u?g.top+g.height-(d.top+d.height):g.top-d.top,...xh}:null}const f=dB(l,o,s);return o>s&&o<=u?{x:0,y:-d.height-f,...xh}:o<s&&o>=u?{x:0,y:d.height+f,...xh}:{x:0,y:0,...xh}};function dB(e,t,s){const i=e[t],o=e[t-1],l=e[t+1];return i?s<t?o?i.top-(o.top+o.height):l?l.top-(i.top+i.height):0:l?l.top-(i.top+i.height):o?i.top-(o.top+o.height):0:0}const uM="Sortable",dM=Ne.createContext({activeIndex:-1,containerId:uM,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:cM,disabled:{draggable:!1,droppable:!1}});function fB(e){let{children:t,id:s,items:i,strategy:o=cM,disabled:l=!1}=e;const{active:u,dragOverlay:d,droppableRects:f,over:g,measureDroppableContainers:m}=oM(),h=Od(uM,s),x=d.rect!==null,S=b.useMemo(()=>i.map(j=>typeof j=="object"&&"id"in j?j.id:j),[i]),w=u!=null,C=u?S.indexOf(u.id):-1,E=g?S.indexOf(g.id):-1,R=b.useRef(S),O=!lB(S,R.current),T=E!==-1&&C===-1||O,A=cB(l);Xs(()=>{O&&w&&m(S)},[O,S,w,m]),b.useEffect(()=>{R.current=S},[S]);const N=b.useMemo(()=>({activeIndex:C,containerId:h,disabled:A,disableTransforms:T,items:S,overIndex:E,useDragOverlay:x,sortedRects:oB(S,f),strategy:o}),[C,h,A.draggable,A.droppable,T,S,E,f,x,o]);return Ne.createElement(dM.Provider,{value:N},t)}const hB=e=>{let{id:t,items:s,activeIndex:i,overIndex:o}=e;return tx(s,i,o).indexOf(t)},pB=e=>{let{containerId:t,isSorting:s,wasDragging:i,index:o,items:l,newIndex:u,previousItems:d,previousContainerId:f,transition:g}=e;return!g||!i||d!==l&&o===u?!1:s?!0:u!==o&&t===f},gB={duration:200,easing:"ease"},fM="transform",mB=Ga.Transition.toString({property:fM,duration:0,easing:"linear"}),yB={roleDescription:"sortable"};function vB(e){let{disabled:t,index:s,node:i,rect:o}=e;const[l,u]=b.useState(null),d=b.useRef(s);return Xs(()=>{if(!t&&s!==d.current&&i.current){const f=o.current;if(f){const g=xc(i.current,{ignoreTransform:!0}),m={x:f.left-g.left,y:f.top-g.top,scaleX:f.width/g.width,scaleY:f.height/g.height};(m.x||m.y)&&u(m)}}s!==d.current&&(d.current=s)},[t,s,i,o]),b.useEffect(()=>{l&&u(null)},[l]),l}function bB(e){let{animateLayoutChanges:t=pB,attributes:s,disabled:i,data:o,getNewIndex:l=hB,id:u,strategy:d,resizeObserverConfig:f,transition:g=gB}=e;const{items:m,containerId:h,activeIndex:x,disabled:S,disableTransforms:w,sortedRects:C,overIndex:E,useDragOverlay:R,strategy:O}=b.useContext(dM),T=xB(i,S),A=m.indexOf(u),N=b.useMemo(()=>({sortable:{containerId:h,index:A,items:m},...o}),[h,o,A,m]),j=b.useMemo(()=>m.slice(m.indexOf(u)),[m,u]),{rect:D,node:M,isOver:z,setNodeRef:L}=lM({id:u,data:N,disabled:T.droppable,resizeObserverConfig:{updateMeasurementsFor:j,...f}}),{active:K,activatorEvent:X,activeNodeRect:B,attributes:H,setNodeRef:U,listeners:_,isDragging:Q,over:$,setActivatorNodeRef:q,transform:Y}=aM({id:u,data:N,attributes:{...yB,...s},disabled:T.draggable}),ee=NF(L,U),G=!!K,ae=G&&!w&&bh(x)&&bh(E),I=!R&&Q,F=I&&ae?Y:null,ne=ae?F??(d??O)({rects:C,activeNodeRect:B,activeIndex:x,overIndex:E,index:A}):null,ye=bh(x)&&bh(E)?l({id:u,items:m,activeIndex:x,overIndex:E}):A,se=K?.id,ge=b.useRef({activeId:se,items:m,newIndex:ye,containerId:h}),fe=m!==ge.current.items,ce=t({active:K,containerId:h,isDragging:Q,isSorting:G,id:u,index:A,items:m,newIndex:ge.current.newIndex,previousItems:ge.current.items,previousContainerId:ge.current.containerId,transition:g,wasDragging:ge.current.activeId!=null}),Re=vB({disabled:!ce,index:A,node:M,rect:D});return b.useEffect(()=>{G&&ge.current.newIndex!==ye&&(ge.current.newIndex=ye),h!==ge.current.containerId&&(ge.current.containerId=h),m!==ge.current.items&&(ge.current.items=m)},[G,ye,h,m]),b.useEffect(()=>{if(se===ge.current.activeId)return;if(se!=null&&ge.current.activeId==null){ge.current.activeId=se;return}const Le=setTimeout(()=>{ge.current.activeId=se},50);return()=>clearTimeout(Le)},[se]),{active:K,activeIndex:x,attributes:H,data:N,rect:D,index:A,newIndex:ye,items:m,isOver:z,isSorting:G,isDragging:Q,listeners:_,node:M,overIndex:E,over:$,setNodeRef:ee,setActivatorNodeRef:q,setDroppableNodeRef:L,setDraggableNodeRef:U,transform:Re??ne,transition:be()};function be(){if(Re||fe&&ge.current.newIndex===A)return mB;if(!(I&&!Sg(X)||!g)&&(G||ce))return Ga.Transition.toString({...g,property:fM})}}function xB(e,t){var s,i;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(s=e?.draggable)!=null?s:t.draggable,droppable:(i=e?.droppable)!=null?i:t.droppable}}function fp(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const SB=[en.Down,en.Right,en.Up,en.Left],wB=(e,t)=>{let{context:{active:s,collisionRect:i,droppableRects:o,droppableContainers:l,over:u,scrollableAncestors:d}}=t;if(SB.includes(e.code)){if(e.preventDefault(),!s||!i)return;const f=[];l.getEnabled().forEach(h=>{if(!h||h!=null&&h.disabled)return;const x=o.get(h.id);if(x)switch(e.code){case en.Down:i.top<x.top&&f.push(h);break;case en.Up:i.top>x.top&&f.push(h);break;case en.Left:i.left>x.left&&f.push(h);break;case en.Right:i.left<x.left&&f.push(h);break}});const g=QF({collisionRect:i,droppableRects:o,droppableContainers:f});let m=FA(g,"id");if(m===u?.id&&g.length>1&&(m=g[1].id),m!=null){const h=l.get(s.id),x=l.get(m),S=x?o.get(x.id):null,w=x?.node.current;if(w&&S&&h&&x){const E=wg(w).some((j,D)=>d[D]!==j),R=hM(h,x),O=EB(h,x),T=E||!R?{x:0,y:0}:{x:O?i.width-S.width:0,y:O?i.height-S.height:0},A={x:S.left,y:S.top};return T.x&&T.y?A:$u(A,T)}}}};function hM(e,t){return!fp(e)||!fp(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function EB(e,t){return!fp(e)||!fp(t)||!hM(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}function Qi({className:e,size:t="default",...s}){return v.jsx("div",{"data-slot":"card","data-size":t,className:He("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-lg bg-card py-(--card-spacing) text-xs/relaxed text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] *:[img:first-child]:rounded-t-lg *:[img:last-child]:rounded-b-lg",e),...s})}function RB({className:e,...t}){return v.jsx("div",{"data-slot":"card-header",className:He("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-lg px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...t})}function CB({className:e,...t}){return v.jsx("div",{"data-slot":"card-content",className:He("px-(--card-spacing)",e),...t})}const pM=b.createContext(void 0);function TB(){const e=b.useContext(pM);if(e===void 0)throw new Error(cn(63));return e}const kB="data-checked",OB="data-unchecked",gM={...gc,checked(e){return e?{[kB]:""}:{[OB]:""}}},AB=b.forwardRef(function(t,s){const{checked:i,className:o,defaultChecked:l,"aria-labelledby":u,form:d,id:f,inputRef:g,name:m,nativeButton:h=!1,onCheckedChange:x,readOnly:S=!1,required:w=!1,disabled:C=!1,render:E,uncheckedValue:R,value:O,style:T,...A}=t,{clearErrors:N}=wd(),{state:j,setTouched:D,setDirty:M,validityData:z,setFilled:L,validationMode:K,disabled:X,name:B,validation:H}=ia(),{labelId:U}=Qo(),_=X||C,Q=B??m,$=b.useRef(null),q=es($,g,H.inputRef),Y=b.useRef(null),ee=Ed(_,Y),G=$n(),ae=mc({id:f}),I=h?void 0:ae,[F,Z]=Si({controlled:i,default:!!l,name:"Switch",state:"checked"});Rd(Y,G,F,void 0,!_,m),Pe(()=>{L(F)},[F,L]),dc(F,()=>{N(Q),M(F!==z.initialValue),H.change(F)});const{getButtonProps:ne,buttonRef:ye}=ns({disabled:_,native:h}),se=Bb(u,U,$,!h,I,A["aria-label"]),ge={id:h?ae:G,role:"switch","aria-checked":F,"aria-readonly":S||void 0,"aria-required":w||void 0,"aria-labelledby":se,onFocus(){ee(!0)},onBlur(){const be=$.current;!be||_||(D(!0),ee(!1),K==="onBlur"&&H.commit(be.checked))},onClick(be){if(S||_)return;be.preventDefault();const Le=$.current;Le&&Io(Le,be)}},fe={...H.getValidationProps(_),checked:F,disabled:_,form:d,id:I,name:Q,required:w,style:Q?Ap:id,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:q,onChange(be){if(be.nativeEvent.defaultPrevented)return;if(S){be.preventDefault();return}const Le=be.currentTarget.checked,Oe=lt(Cr,be.nativeEvent);x?.(Le,Oe),!Oe.isCanceled&&Z(Le)},onClick(be){be.stopPropagation()},onFocus(){Y.current?.focus()},...O!==void 0?{value:O}:Xt},ce=b.useMemo(()=>({...j,checked:F,disabled:_,readOnly:S,required:w}),[j,F,_,S,w]),Re=bt("span",t,{state:ce,ref:[s,Y,ye],props:[ge,A,ne,be=>H.getValidationProps(_,be)],stateAttributesMapping:gM});return v.jsxs(pM.Provider,{value:ce,children:[Re,!F&&Q&&R!==void 0&&v.jsx("input",{type:"hidden",form:d,name:Q,value:R,disabled:_}),v.jsx("input",{...fe,suppressHydrationWarning:!0})]})}),MB=b.forwardRef(function(t,s){const{render:i,className:o,style:l,...u}=t,d=TB();return bt("span",t,{state:d,ref:s,stateAttributesMapping:gM,props:u})});function NB({className:e,...t}){return v.jsx(AB,{"data-slot":"switch",className:He(`
70
+ peer relative inline-flex h-4 w-7 shrink-0 items-center rounded-full
71
+ border border-transparent bg-input p-0.5 transition-colors outline-none
72
+ focus-visible:border-ring focus-visible:ring-2
73
+ focus-visible:ring-ring/30 disabled:cursor-not-allowed
74
+ disabled:opacity-50 data-checked:bg-primary
75
+ `,e),...t,children:v.jsx(MB,{"data-slot":"switch-thumb",className:`
76
+ pointer-events-none block size-3 rounded-full bg-background shadow-sm
77
+ transition-transform data-checked:translate-x-3
78
+ `})})}function DB(e){return`library:${e}`}function mM(e,t){return`assigned:${e}:${t}`}function yM(e){return`agent:${e}`}function jB(e){return String(e).startsWith("assigned:")}function yv(e){return nx(e)&&e.type==="library-instruction"&&typeof e.instructionId=="string"}function tc(e){return nx(e)&&e.type==="assigned-instruction"&&typeof e.agentId=="string"&&typeof e.instructionId=="string"}function VR(e){return nx(e)&&e.type==="agent"&&typeof e.agentId=="string"}function nx(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const IB="data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eOpenAI%3c/title%3e%3cpath%20d='M9.205%208.658v-2.26c0-.19.072-.333.238-.428l4.543-2.616c.619-.357%201.356-.523%202.117-.523%202.854%200%204.662%202.212%204.662%204.566%200%20.167%200%20.357-.024.547l-4.71-2.759a.797.797%200%2000-.856%200l-5.97%203.473zm10.609%208.8V12.06c0-.333-.143-.57-.429-.737l-5.97-3.473%201.95-1.118a.433.433%200%2001.476%200l4.543%202.617c1.309.76%202.189%202.378%202.189%203.948%200%201.808-1.07%203.473-2.76%204.163zM7.802%2012.703l-1.95-1.142c-.167-.095-.239-.238-.239-.428V5.899c0-2.545%201.95-4.472%204.591-4.472%201%200%201.927.333%202.712.928L8.23%205.067c-.285.166-.428.404-.428.737v6.898zM12%2015.128l-2.795-1.57v-3.33L12%208.658l2.795%201.57v3.33L12%2015.128zm1.796%207.23c-1%200-1.927-.332-2.712-.927l4.686-2.712c.285-.166.428-.404.428-.737v-6.898l1.974%201.142c.167.095.238.238.238.428v5.233c0%202.545-1.974%204.472-4.614%204.472zm-5.637-5.303l-4.544-2.617c-1.308-.761-2.188-2.378-2.188-3.948A4.482%204.482%200%20014.21%206.327v5.423c0%20.333.143.571.428.738l5.947%203.449-1.95%201.118a.432.432%200%2001-.476%200zm-.262%203.9c-2.688%200-4.662-2.021-4.662-4.519%200-.19.024-.38.047-.57l4.686%202.71c.286.167.571.167.856%200l5.97-3.448v2.26c0%20.19-.07.333-.237.428l-4.543%202.616c-.619.357-1.356.523-2.117.523zm5.899%202.83a5.947%205.947%200%20005.827-4.756C22.287%2018.339%2024%2015.84%2024%2013.296c0-1.665-.713-3.282-1.998-4.448.119-.5.19-.999.19-1.498%200-3.401-2.759-5.947-5.946-5.947-.642%200-1.26.095-1.88.31A5.962%205.962%200%200010.205%200a5.947%205.947%200%2000-5.827%204.757C1.713%205.447%200%207.945%200%2010.49c0%201.666.713%203.283%201.998%204.448-.119.5-.19%201-.19%201.499%200%203.401%202.759%205.946%205.946%205.946.642%200%201.26-.095%201.88-.309a5.96%205.96%200%20004.162%201.713z'%3e%3c/path%3e%3c/svg%3e",PB='<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>OpenAI</title><path d="M9.205 8.658v-2.26c0-.19.072-.333.238-.428l4.543-2.616c.619-.357 1.356-.523 2.117-.523 2.854 0 4.662 2.212 4.662 4.566 0 .167 0 .357-.024.547l-4.71-2.759a.797.797 0 00-.856 0l-5.97 3.473zm10.609 8.8V12.06c0-.333-.143-.57-.429-.737l-5.97-3.473 1.95-1.118a.433.433 0 01.476 0l4.543 2.617c1.309.76 2.189 2.378 2.189 3.948 0 1.808-1.07 3.473-2.76 4.163zM7.802 12.703l-1.95-1.142c-.167-.095-.239-.238-.239-.428V5.899c0-2.545 1.95-4.472 4.591-4.472 1 0 1.927.333 2.712.928L8.23 5.067c-.285.166-.428.404-.428.737v6.898zM12 15.128l-2.795-1.57v-3.33L12 8.658l2.795 1.57v3.33L12 15.128zm1.796 7.23c-1 0-1.927-.332-2.712-.927l4.686-2.712c.285-.166.428-.404.428-.737v-6.898l1.974 1.142c.167.095.238.238.238.428v5.233c0 2.545-1.974 4.472-4.614 4.472zm-5.637-5.303l-4.544-2.617c-1.308-.761-2.188-2.378-2.188-3.948A4.482 4.482 0 014.21 6.327v5.423c0 .333.143.571.428.738l5.947 3.449-1.95 1.118a.432.432 0 01-.476 0zm-.262 3.9c-2.688 0-4.662-2.021-4.662-4.519 0-.19.024-.38.047-.57l4.686 2.71c.286.167.571.167.856 0l5.97-3.448v2.26c0 .19-.07.333-.237.428l-4.543 2.616c-.619.357-1.356.523-2.117.523zm5.899 2.83a5.947 5.947 0 005.827-4.756C22.287 18.339 24 15.84 24 13.296c0-1.665-.713-3.282-1.998-4.448.119-.5.19-.999.19-1.498 0-3.401-2.759-5.947-5.946-5.947-.642 0-1.26.095-1.88.31A5.962 5.962 0 0010.205 0a5.947 5.947 0 00-5.827 4.757C1.713 5.447 0 7.945 0 10.49c0 1.666.713 3.283 1.998 4.448-.119.5-.19 1-.19 1.499 0 3.401 2.759 5.946 5.946 5.946.642 0 1.26-.095 1.88-.309a5.96 5.96 0 004.162 1.713z"></path></svg>',LB="data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eClaude%20Code%3c/title%3e%3cpath%20clip-rule='evenodd'%20d='M20.998%2010.949H24v3.102h-3v3.028h-1.487V20H18v-2.921h-1.487V20H15v-2.921H9V20H7.488v-2.921H6V20H4.487v-2.921H3V14.05H0V10.95h3V5h17.998v5.949zM6%2010.949h1.488V8.102H6v2.847zm10.51%200H18V8.102h-1.49v2.847z'%20fill='%23D97757'%20fill-rule='evenodd'%3e%3c/path%3e%3c/svg%3e",zB='<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Claude Code</title><path clip-rule="evenodd" d="M20.998 10.949H24v3.102h-3v3.028h-1.487V20H18v-2.921h-1.487V20H15v-2.921H9V20H7.488v-2.921H6V20H4.487v-2.921H3V14.05H0V10.95h3V5h17.998v5.949zM6 10.949h1.488V8.102H6v2.847zm10.51 0H18V8.102h-1.49v2.847z"></path></svg>',_B={openai:{src:IB,monochromeSvg:PB,invertInDark:!0},claudecode:{src:LB,monochromeSvg:zB,invertInDark:!1}};function rx({icon:e,monochrome:t=!1,className:s}){const i=_B[e];return v.jsx("div",{"aria-hidden":"true",className:He(`
79
+ flex size-8 shrink-0 items-center justify-center rounded-md bg-muted
80
+ text-foreground
81
+ `,t&&"text-muted-foreground",s),children:i?v.jsxs(v.Fragment,{children:[v.jsx("span",{hidden:!t,className:`
82
+ size-4
83
+ [&_svg]:size-full
84
+ `,dangerouslySetInnerHTML:{__html:i.monochromeSvg}}),v.jsx("img",{hidden:t,src:i.src,alt:"",draggable:!1,className:He("size-4",i.invertInDark&&"dark:invert")})]}):v.jsx(nb,{className:"size-4"})})}function UB({agent:e,instructionsById:t,isInstructionsLoading:s,isPending:i,isReapplying:o,onRemoveInstruction:l,onToggle:u,onReapply:d,onOpenFile:f}){const{t:g}=pt(),{isOver:m,setNodeRef:h}=lM({id:yM(e.id),data:{type:"agent",agentId:e.id},disabled:i}),x=e.enabled||e.instructionIds.length>0,S=e.enabled?g("agents.reapplyHint"):g("agents.reapplyDisabledHint"),w=g(x?e.enabled?"agents.toggleOnHint":"agents.toggleOffHint":"agents.enableRequiresInstruction");return v.jsxs(Qi,{"data-agent-id":e.id,ref:h,className:He("gap-0 py-0 transition-shadow",m&&"ring-2 ring-ring/40"),children:[v.jsxs("div",{className:"flex items-center gap-3 p-3",children:[v.jsx(rx,{icon:e.icon}),v.jsxs("div",{className:"min-w-0 flex-1",children:[v.jsx("div",{className:"truncate text-sm font-medium",children:e.name}),v.jsx("button",{type:"button",className:`
85
+ block max-w-full truncate font-mono text-[11px]
86
+ text-muted-foreground
87
+ hover:text-foreground hover:underline
88
+ `,"aria-label":g("agents.openFileAria",{name:e.name}),onClick:()=>{f(e.id)},children:e.instructionFile})]}),v.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[v.jsxs(Jh,{children:[v.jsx(ep,{render:v.jsx("span",{className:"inline-flex"}),children:v.jsx(We,{type:"button",variant:"ghost",size:"icon","aria-label":g("agents.reapplyAria",{name:e.name}),disabled:i||!e.enabled,onClick:()=>{d(e.id)},children:v.jsx(FL,{className:He(o&&"animate-spin")})})}),v.jsx(tp,{children:S})]}),v.jsxs(Jh,{children:[v.jsx(ep,{render:v.jsx("span",{className:"inline-flex"}),children:v.jsx(NB,{checked:e.enabled,disabled:i||!x,"aria-label":g("agents.toggleAria",{name:e.name}),onCheckedChange:C=>{u(e.id,C)}})}),v.jsx(tp,{children:w})]})]})]}),v.jsx("div",{className:"border-t border-border/60 p-3",children:e.instructionIds.length===0?v.jsx("div",{className:`
89
+ flex min-h-20 items-center justify-center rounded-md border
90
+ border-dashed border-border px-4 text-center text-xs
91
+ text-muted-foreground
92
+ `,children:g("agents.emptyAssigned")}):v.jsx(fB,{items:e.instructionIds.map(C=>mM(e.id,C)),strategy:uB,children:v.jsx("ol",{className:"flex flex-col gap-1",children:e.instructionIds.map((C,E)=>{const R=t.get(C),O=R?.name??C;return v.jsx(HB,{agentId:e.id,index:E,instructionId:C,instructionName:s&&!R?g("agents.loadingInstruction"):O,isPending:i,onRemove:l},C)})})})})]})}function HB({agentId:e,index:t,instructionId:s,instructionName:i,isPending:o,onRemove:l}){const{t:u}=pt(),{attributes:d,isDragging:f,isOver:g,listeners:m,setNodeRef:h,transform:x,transition:S}=bB({id:mM(e,s),animateLayoutChanges:()=>!1,data:{type:"assigned-instruction",agentId:e,instructionId:s},disabled:o});return v.jsxs("li",{...d,...m,ref:h,"data-instruction-id":s,style:{transform:Ga.Transform.toString(x),transition:S},className:He(`
93
+ group flex items-center gap-2 rounded-md border border-transparent
94
+ bg-muted/40 px-2 py-1.5
95
+ `,g&&"border-ring bg-muted",f&&"z-10",o?"cursor-default":`
96
+ cursor-grab
97
+ active:cursor-grabbing
98
+ `),children:[v.jsx(ob,{"aria-hidden":"true",className:`
99
+ size-3.5 shrink-0 text-muted-foreground
100
+ group-active:cursor-grabbing
101
+ `}),v.jsx("span",{className:`
102
+ w-4 shrink-0 text-center font-mono text-[10px] text-muted-foreground
103
+ `,children:t+1}),v.jsx("span",{className:"min-w-0 flex-1 truncate text-xs",children:i}),v.jsx(We,{type:"button",variant:"ghost",size:"icon","aria-label":u("agents.removeInstructionAria",{name:i}),disabled:o,onClick:()=>{l(e,s)},onKeyDown:w=>{w.stopPropagation()},onPointerDown:w=>{w.stopPropagation()},children:v.jsx(ra,{})})]})}const sx="/api/agents";class vM extends Error{constructor(t,s){super(s),this.code=t,this.name="AgentApiError"}code}function bM(e){return Sc(sx,{signal:e})}function FB(e,t){return Sc(`${sx}/${encodeURIComponent(e)}/skills`,{signal:t})}const BB=e=>["agents",e,"skills"];function VB(e,t){return Sc(Cg(e,"instructions"),{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({instructionIds:t})})}function KB(e,t){return Sc(Cg(e,"enabled"),{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({enabled:t})})}function qB(e){return Sc(Cg(e,"reapply"),{method:"POST"})}function YB(e){return Sc(Cg(e,"open-file"),{method:"POST"})}function Cg(e,t){return`${sx}/${encodeURIComponent(e)}/${t}`}async function Sc(e,t){const s=await fetch(e,t);if(!s.ok){const i=await GB(s);throw new vM(i.code,i.message)}return s.json()}async function GB(e){try{const t=await e.json();return{code:t.error?.code??"AGENT_REQUEST_FAILED",message:t.error?.message??`Request failed with status ${e.status}`}}catch{return{code:"AGENT_REQUEST_FAILED",message:`Request failed with status ${e.status}`}}}const Ar=["agents"],Sh=["agents","update"];function $B(){const{t:e}=pt(),t=Ir(),s=ti({queryKey:Ar,queryFn:({signal:h})=>bM(h),retry:!1});function i(h){t.setQueryData(Ar,x=>x?.map(S=>S.id===h.id?h:S))}const o=nr({mutationKey:Sh,mutationFn:({agentId:h,instructionIds:x})=>VB(h,x),onMutate:async({previous:h})=>(await t.cancelQueries({queryKey:Ar}),{previous:h}),onError:(h,x,S)=>{S?.previous&&t.setQueryData(Ar,S.previous),Ft.error(e("agents.updateError"))},onSuccess:i,onSettled:()=>t.invalidateQueries({queryKey:Ar})}),l=nr({mutationKey:Sh,mutationFn:({agentId:h,enabled:x})=>KB(h,x),onMutate:async({agentId:h,enabled:x})=>{await t.cancelQueries({queryKey:Ar});const S=t.getQueryData(Ar);return t.setQueryData(Ar,w=>w?.map(C=>C.id===h?{...C,enabled:x}:C)),{previous:S}},onError:(h,x,S)=>{S?.previous&&t.setQueryData(Ar,S.previous),Ft.error(e("agents.enableError"))},onSuccess:h=>{i(h),Ft.success(e(h.enabled?"agents.applied":"agents.removed"))},onSettled:()=>t.invalidateQueries({queryKey:Ar})}),u=nr({mutationKey:Sh,mutationFn:h=>qB(h),onSuccess:h=>{i(h),Ft.success(e("agents.reapplied"))},onError:()=>{Ft.error(e("agents.reapplyError"))},onSettled:()=>t.invalidateQueries({queryKey:Ar})}),d=nr({mutationKey:Sh,mutationFn:h=>YB(h),onError:h=>{Ft.error(e(h instanceof vM&&h.code==="AGENT_FILE_NOT_FOUND"?"agents.fileMissing":"agents.openFileError"))}}),f=[o,l,u,d],g=new Set;for(const h of f){if(!h.isPending)continue;const x=QB(h.variables);x&&g.add(x)}const m=new Set(u.isPending&&typeof u.variables=="string"?[u.variables]:[]);return{agents:s.data??[],isLoading:s.isPending,isError:s.isError&&s.data===void 0,retry:s.refetch,pendingAgentIds:g,reapplyingAgentIds:m,updateInstructions:(h,x)=>{const S=t.getQueryData(Ar);t.setQueryData(Ar,w=>w?.map(C=>C.id===h?{...C,instructionIds:x,enabled:x.length>0&&C.enabled}:C)),o.mutate({agentId:h,instructionIds:x,previous:S})},setEnabled:(h,x)=>{l.mutate({agentId:h,enabled:x})},reapply:h=>{u.mutate(h)},openFile:h=>{d.mutate(h)}}}function QB(e){if(typeof e=="string")return e;if(e&&typeof e=="object"&&"agentId"in e){const t=e.agentId;return typeof t=="string"?t:void 0}}function ea({className:e,description:t,icon:s,title:i}){let o=null;return t!=null&&(o=v.jsx("p",{className:"max-w-64 text-xs/relaxed text-muted-foreground",children:t})),v.jsxs("div",{"data-slot":"empty",className:He(`
104
+ flex w-full flex-1 flex-col items-center justify-center gap-2 px-4
105
+ py-10 text-center
106
+ `,e),children:[s&&v.jsx("div",{className:`
107
+ flex size-8 items-center justify-center rounded-md bg-muted
108
+ text-muted-foreground
109
+ `,children:v.jsx(s,{"aria-hidden":"true",className:"size-4"})}),v.jsx("div",{className:"text-sm font-medium",children:i}),o]})}function XB(e){const[t,s]=b.useState({getBoundingClientRect(){return DOMRect.fromRect({width:0,height:0,x:0,y:0})}}),i=b.useRef(null),o=b.useRef(null),l=b.useRef(null),u=b.useRef(null),d=b.useRef(!0),f=b.useRef(null),g=lc(),m=b.useMemo(()=>({anchor:t,setAnchor:s,actionsRef:l,backdropRef:i,internalBackdropRef:o,positionerRef:u,allowMouseUpTriggerRef:d,initialCursorPointRef:f,rootId:g}),[t,g]);return v.jsx(XO.Provider,{value:m,children:v.jsx(hg.Provider,{value:void 0,children:v.jsx(hA,{...e})})})}const KR=500,ZB=b.forwardRef(function(t,s){const{render:i,className:o,style:l,...u}=t,{setAnchor:d,actionsRef:f,internalBackdropRef:g,backdropRef:m,positionerRef:h,allowMouseUpTriggerRef:x,initialCursorPointRef:S,rootId:w}=pg(!1),{store:C}=sa(!1),E=C.useState("open"),R=C.useState("disabled"),O=b.useRef(null),T=b.useRef(null),A=Un(),N=Un(),j=b.useRef(!1),D=b.useRef(null);function M(U,_,Q){const $=Q.type.startsWith("touch");S.current={x:U,y:_},d({getBoundingClientRect(){return DOMRect.fromRect({width:$?10:0,height:$?10:0,x:U,y:_})}}),j.current=!1,f.current?.setOpen(!0,lt(Qs,Q)),N.start(KR,()=>{j.current=!0})}function z(U){if(R)return;x.current=!0,Gs(U),M(U.clientX,U.clientY,U.nativeEvent);const _=qt(O.current);D.current?.abort();const Q=new AbortController;D.current=Q,_.addEventListener("mouseup",$=>{if(x.current=!1,!j.current)return;N.clear(),j.current=!1;const q=sr($);st(h.current,q)||w&&q&&Hb(q)===w||f.current?.setOpen(!1,lt(Pv,$))},{once:!0,signal:Q.signal})}function L(){A.clear(),T.current=null}function K(U){if(R){L();return}if(x.current=!1,U.touches.length!==1){L();return}U.stopPropagation();const _=U.touches[0],Q={x:_.clientX,y:_.clientY};T.current=Q,A.start(KR,()=>{M(Q.x,Q.y,U.nativeEvent)})}function X(U){if(U.touches.length!==1){L();return}if(A.isStarted()&&T.current){const _=U.touches[0],Q=10,$=Math.abs(_.clientX-T.current.x),q=Math.abs(_.clientY-T.current.y);($>Q||q>Q)&&L()}}return b.useEffect(()=>()=>{D.current?.abort()},[]),b.useEffect(()=>{function U(Q){if(R)return;const q=sr(Q);(st(O.current,q)||st(g.current,q)||st(m.current,q))&&Q.preventDefault()}const _=qt(O.current);return Lt(_,"contextmenu",U)},[m,R,g]),bt("div",t,{state:{open:E},ref:[O,s],props:[{onContextMenu:z,onTouchStart:K,onTouchMove:X,onTouchEnd:L,onTouchCancel:L,style:{WebkitTouchCallout:"none"}},u],stateAttributesMapping:Fu})}),WB=lA;function Tg({...e}){return v.jsx(XB,{"data-slot":"context-menu",...e})}function kg({className:e,...t}){return v.jsx(ZB,{"data-slot":"context-menu-trigger",className:He("select-none",e),...t})}function Og({className:e,align:t="start",alignOffset:s=4,side:i="right",sideOffset:o=0,...l}){return v.jsx(aA,{children:v.jsx(WB,{className:"isolate z-50 outline-none",align:t,alignOffset:s,side:i,sideOffset:o,children:v.jsx(sA,{"data-slot":"context-menu-content",className:He("z-50 max-h-(--available-height) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...l})})})}function Ag({className:e,inset:t,variant:s="default",...i}){return v.jsx(rA,{"data-slot":"context-menu-item","data-inset":t,"data-variant":s,className:He("group/context-menu-item relative flex min-h-7 cursor-default items-center gap-2 rounded-md px-2 py-1 text-xs/relaxed outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7.5 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 data-[variant=destructive]:*:[svg]:text-destructive",e),...i})}function JB({instructions:e,isLoading:t,isError:s,onRetry:i,onEdit:o,onDelete:l,onPreload:u}){const{t:d}=pt();return t?v.jsx(Qi,{className:"gap-0 py-0",children:v.jsx("div",{className:"divide-y",children:[0,1,2].map(f=>v.jsxs("div",{className:"flex items-center gap-2 p-3",children:[v.jsx(Gn,{className:"size-3.5 rounded-sm"}),v.jsx(Gn,{className:"h-4 w-2/3"})]},f))})}):s?v.jsxs(Qi,{className:"items-start gap-3 p-4",children:[v.jsx("p",{className:"text-xs text-muted-foreground",children:d("instructions.loadError")}),v.jsxs(We,{type:"button",variant:"outline",onClick:i,children:[v.jsx(pk,{}),v.jsx("span",{children:d("common.retry")})]})]}):e.length===0?v.jsx(Qi,{className:"gap-0 py-0",children:v.jsx(ea,{icon:ab,title:d("instructions.emptyTitle"),description:d("instructions.emptyDescription")})}):v.jsx(Qi,{className:"gap-0 py-0",children:v.jsx("ul",{"aria-label":d("instructions.listAria"),className:"divide-y",children:e.map(f=>v.jsx(e9,{instruction:f,onRequestDelete:()=>l(f),onEdit:()=>{o(f)},onPreload:u},f.id))})})}function e9({instruction:e,onEdit:t,onPreload:s,onRequestDelete:i}){const{t:o}=pt(),{attributes:l,isDragging:u,listeners:d,setNodeRef:f}=aM({id:DB(e.id),data:{type:"library-instruction",instructionId:e.id}});return v.jsxs(Tg,{children:[v.jsxs(kg,{ref:f,render:v.jsx("li",{...d,"data-instruction-id":e.id,className:He(`
110
+ group flex cursor-grab items-center gap-2 py-2.5 pr-1 pl-3
111
+ hover:bg-muted/40
112
+ active:cursor-grabbing
113
+ `,u&&"opacity-40")}),children:[v.jsx(ob,{"aria-hidden":"true",className:"size-3.5 shrink-0 text-muted-foreground"}),v.jsx("button",{...l,type:"button",className:`
114
+ flex min-w-0 flex-1 cursor-grab items-center gap-2 text-left text-xs
115
+ outline-none
116
+ focus-visible:underline focus-visible:underline-offset-3
117
+ active:cursor-grabbing
118
+ `,onClick:t,onFocus:s,onPointerEnter:s,children:v.jsx("span",{className:"min-w-0 flex-1 truncate",children:e.name})}),v.jsxs(Yo,{children:[v.jsx(Go,{render:v.jsx(We,{type:"button",variant:"ghost",size:"icon","aria-label":o("instructions.actionsAria",{name:e.name}),className:`
119
+ -my-1.5 shrink-0 text-muted-foreground opacity-0
120
+ transition-opacity
121
+ group-hover:opacity-100
122
+ focus-visible:opacity-100
123
+ data-popup-open:opacity-100
124
+ [@media(hover:none)]:opacity-100
125
+ `,onKeyDown:g=>{g.stopPropagation()},onMouseDown:g=>{g.stopPropagation()},onPointerDown:g=>{g.stopPropagation()},onTouchStart:g=>{g.stopPropagation()}}),children:v.jsx(ib,{})}),v.jsx($o,{align:"end",className:"w-40",children:v.jsx(qR,{Item:pc,onDelete:i,onEdit:t})})]})]}),v.jsx(Og,{children:v.jsx(qR,{Item:Ag,onDelete:i,onEdit:t})})]})}function qR({Item:e,onEdit:t,onDelete:s}){const{t:i}=pt();return v.jsxs(v.Fragment,{children:[v.jsxs(e,{onClick:t,children:[v.jsx(uk,{}),v.jsx("span",{children:i("instructions.edit")})]}),v.jsxs(e,{variant:"destructive",onClick:s,children:[v.jsx(cb,{}),v.jsx("span",{children:i("instructions.delete")})]})]})}const t9=["YYYY-MM-DD HH:mm:ss","YYYY-MM-DD","YYYY/MM/DD HH:mm:ss","DD/MM/YYYY HH:mm:ss","MM/DD/YYYY hh:mm:ss A","HH:mm:ss"],n9=["America/Los_Angeles","America/New_York","Asia/Shanghai","Asia/Taipei","Asia/Tokyo","UTC"],r9=1,s9="settings.changed",i9=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});function a9(e,t){return i9.compare(e,t)}const o9=64,l9=1024,c9=/^[\p{L}\p{N}]+(?:-[\p{L}\p{N}]+)*$/u;function xM(e){return e.trim().normalize("NFKC")}function u9(e){const t=xM(e);return[...t].length<=o9&&t===t.toLowerCase()&&c9.test(t)}function d9(e){return e.length>0&&e.length<=1024&&e.split("/").every(t=>t.length>0&&t.length<=255&&t!=="."&&t!==".."&&!/[\\<>:"|?*]/u.test(t)&&!new RegExp("\\p{Cc}","u").test(t)&&!/[. ]$/u.test(t)&&!/^(?:con|prn|aux|nul|com[1-9]|lpt[1-9])(?:\.|$)/iu.test(t))}function SM({className:e,...t}){return v.jsx("label",{"data-slot":"label",className:He("flex items-center gap-2 text-xs/relaxed leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function ta({children:e,className:t,...s}){return v.jsxs(SM,{className:He("gap-1",t),...s,children:[e,v.jsx("span",{"aria-hidden":"true",className:"text-destructive",children:"*"})]})}function Ti({...e}){return v.jsx(MA,{"data-slot":"dialog",...e})}function f9({...e}){return v.jsx(AA,{"data-slot":"dialog-portal",...e})}function Md({...e}){return v.jsx(yg,{"data-slot":"dialog-close",...e})}function h9({className:e,...t}){return v.jsx(CA,{"data-slot":"dialog-overlay",className:He("fixed inset-0 isolate z-50 bg-black/80 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...t})}function ki({className:e,children:t,showCloseButton:s=!0,...i}){return v.jsxs(f9,{children:[v.jsx(h9,{}),v.jsxs(OA,{"data-slot":"dialog-content",className:He("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-xs/relaxed text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...i,children:[t,s&&v.jsxs(yg,{"data-slot":"dialog-close",render:v.jsx(We,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm"}),children:[v.jsx(ra,{}),v.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Ws({className:e,...t}){return v.jsx("div",{"data-slot":"dialog-header",className:He("flex flex-col gap-1",e),...t})}function wi({className:e,showCloseButton:t=!1,children:s,...i}){return v.jsxs("div",{"data-slot":"dialog-footer",className:He("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...i,children:[s,t&&v.jsx(yg,{render:v.jsx(We,{variant:"outline"}),children:"Close"})]})}function Js({className:e,...t}){return v.jsx(NA,{"data-slot":"dialog-title",className:He("font-heading text-sm font-medium",e),...t})}function Ei({className:e,...t}){return v.jsx(TA,{"data-slot":"dialog-description",className:He("text-xs/relaxed text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...t})}const ix="/api/instructions";class wM extends Error{constructor(t,s){super(s),this.code=t,this.name="InstructionApiError"}code}function p9(e){return ax(ix,{signal:e})}function g9(e){return ax(ix,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)})}function m9(e,t){return ax(EM(e),{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(t)})}async function y9(e){const t=await fetch(EM(e),{method:"DELETE"});if(t.ok)return;const s=await RM(t);throw new wM(s.code,s.message)}async function ax(e,t){const s=await fetch(e,t);if(!s.ok){const i=await RM(s);throw new wM(i.code,i.message)}return s.json()}function EM(e){return`${ix}/${encodeURIComponent(e)}`}async function RM(e){try{const t=await e.json();return{code:t.error?.code??"INSTRUCTION_REQUEST_FAILED",message:t.error?.message??`Request failed with status ${e.status}`}}catch{return{code:"INSTRUCTION_REQUEST_FAILED",message:`Request failed with status ${e.status}`}}}const Xu=["instructions"];function v9(){const e=ti({queryKey:Xu,queryFn:({signal:t})=>p9(t),retry:!1});return{instructions:e.data??[],isLoading:e.isPending,isError:e.isError&&e.data===void 0,retry:e.refetch}}const b9="modulepreload",x9=function(e){return"/"+e},YR={},S9=function(t,s,i){let o=Promise.resolve();if(s&&s.length>0){let f=function(g){return Promise.all(g.map(m=>Promise.resolve(m).then(h=>({status:"fulfilled",value:h}),h=>({status:"rejected",reason:h}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),d=u?.nonce||u?.getAttribute("nonce");o=f(s.map(g=>{if(g=x9(g),g in YR)return;YR[g]=!0;const m=g.endsWith(".css"),h=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${h}`))return;const x=document.createElement("link");if(x.rel=m?"stylesheet":b9,m||(x.as="script"),x.crossOrigin="",x.href=g,d&&x.setAttribute("nonce",d),document.head.appendChild(x),m)return new Promise((S,w)=>{x.addEventListener("load",S),x.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${g}`)))})}))}function l(u){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=u,window.dispatchEvent(d),!d.defaultPrevented)throw u}return o.then(u=>{for(const d of u||[])d.status==="rejected"&&l(d.reason);return t().catch(l)})},CM=()=>S9(()=>import("./code-editor-CL0sQ6qH.js").then(e=>e.j2),__vite__mapDeps([0,1]));function Ny(){CM()}const w9=b.lazy(async()=>({default:(await CM()).CodeEditor}));function TM(e){const{t}=pt();return v.jsx(b.Suspense,{fallback:v.jsx("div",{style:{height:e.height??"16rem"},className:`
126
+ flex items-center justify-center text-xs text-muted-foreground
127
+ `,children:t("editor.loading")}),children:v.jsx(w9,{...e})})}const E9="16rem";function GR({instruction:e,onClose:t}){const{t:s}=pt(),i=Ir(),o=b.useId(),l=b.useId(),u=e!==void 0,[d,f]=b.useState(e?.name??""),[g,m]=b.useState(e?.content??""),h=nr({mutationFn:T=>e?m9(e.id,T):g9(T),onSuccess:T=>{i.setQueryData(Xu,A=>[...(A??[]).filter(N=>N.id!==T.id),T].toSorted((N,j)=>a9(N.name,j.name))),i.invalidateQueries({queryKey:Xu}),Ft.success(s(u?"instructions.updated":"instructions.created")),t()},onError:()=>{Ft.error(s(u?"instructions.updateError":"instructions.error"))}}),x=h.isPending,S=!!(d.trim()&&g.trim())&&!x,w=u?"instructions.editTitle":"instructions.createTitle",C=u?"instructions.updating":"instructions.creating",E=u?"instructions.updateSave":"instructions.save",R=u?lb:uc;function O(){x||t()}return v.jsx(Ti,{open:!0,onOpenChange:T=>{T||O()},children:v.jsxs(ki,{showCloseButton:!1,className:`
128
+ grid max-h-[calc(100vh-2rem)] grid-rows-[auto_minmax(0,1fr)_auto]
129
+ overflow-hidden
130
+ sm:max-w-3xl
131
+ `,children:[v.jsxs("form",{className:"contents","aria-busy":x,onSubmit:T=>{T.preventDefault(),S&&h.mutate({name:d.trim(),content:g})},children:[v.jsx(Ws,{className:"pr-8",children:v.jsx(Js,{children:s(w)})}),v.jsxs("div",{className:"flex min-h-0 flex-col gap-3 overflow-y-auto pr-1",children:[v.jsxs("div",{className:"flex flex-col gap-2",children:[v.jsx(ta,{htmlFor:o,children:s("instructions.name")}),v.jsx(Cd,{id:o,autoFocus:!0,required:!0,maxLength:200,value:d,disabled:x,placeholder:s("instructions.namePlaceholder"),onChange:T=>{f(T.target.value)}})]}),v.jsxs("div",{className:"flex flex-col gap-2",children:[v.jsx(ta,{id:l,children:s("instructions.content")}),v.jsx("div",{role:"group","aria-labelledby":l,"aria-required":"true",className:`
132
+ overflow-hidden rounded-md border border-input bg-input/20
133
+ focus-within:border-ring focus-within:ring-2
134
+ focus-within:ring-ring/30
135
+ `,children:v.jsx(TM,{height:E9,value:g,ariaLabel:s("instructions.content"),placeholder:s("instructions.contentPlaceholder"),readOnly:x,onChange:m})})]})]}),v.jsxs(wi,{children:[v.jsx(We,{type:"button",variant:"ghost",disabled:x,onClick:O,children:s("common.cancel")}),v.jsxs(We,{type:"submit",disabled:!S,children:[x?v.jsx(Kr,{className:"animate-spin"}):v.jsx(R,{}),v.jsx("span",{children:s(x?C:E)})]})]})]}),v.jsxs(Md,{disabled:x,render:v.jsx(We,{variant:"ghost",size:"icon",className:"absolute top-2 right-2"}),children:[v.jsx(ra,{}),v.jsx("span",{className:"sr-only",children:s("a11y.close")})]})]})})}function R9({instruction:e,onClose:t}){const{t:s}=pt(),i=Ir(),o=nr({mutationFn:()=>y9(e.id),onSuccess:()=>{i.setQueryData(Xu,u=>u?.filter(({id:d})=>d!==e.id)),i.setQueryData(Ar,u=>u?.map(d=>{const f=d.instructionIds.filter(g=>g!==e.id);return{...d,instructionIds:f,enabled:f.length>0&&d.enabled}})),i.invalidateQueries({queryKey:Xu}),i.invalidateQueries({queryKey:Ar}),Ft.success(s("instructions.deleted")),t()},onError:()=>Ft.error(s("instructions.deleteError"))}),l=()=>{o.isPending||t()};return v.jsx(Ti,{open:!0,onOpenChange:u=>{u||l()},children:v.jsxs(ki,{showCloseButton:!1,children:[v.jsxs(Ws,{children:[v.jsx(Js,{children:s("instructions.deleteConfirmTitle")}),v.jsx(Ei,{children:s("instructions.deleteConfirmDescription",{name:e.name})})]}),v.jsxs(wi,{children:[v.jsx(We,{type:"button",variant:"ghost",disabled:o.isPending,onClick:l,children:s("common.cancel")}),v.jsxs(We,{type:"button",variant:"destructive",disabled:o.isPending,onClick:()=>o.mutate(),children:[o.isPending&&v.jsx(Kr,{className:"animate-spin"}),v.jsx("span",{children:s("instructions.delete")})]})]})]})})}const C9=e=>{const t=e.active.data.current;if(tc(t))return T9(e,t.agentId);const s=e.pointerCoordinates?JF(e):$F(e),i=s.filter(({id:o})=>jB(o));return i.length>0?i:s};function T9(e,t){const s=e.collisionRect.left+e.collisionRect.width/2,i=e.collisionRect.top+e.collisionRect.height/2,o=e.droppableRects.get(yM(t));if(o&&(s<o.left||s>o.left+o.width||i<o.top||i>o.top+o.height))return[];let l;for(const u of e.droppableContainers){const d=u.data.current;if(!tc(d)||d.agentId!==t)continue;const f=e.droppableRects.get(u.id);if(!f)continue;const g=(f.left+f.width/2-s)**2+(f.top+f.height/2-i)**2;(!l||g<l.distance)&&(l={id:u.id,distance:g})}return l?[{id:l.id}]:[]}function k9(){const{t:e}=pt(),[t,s]=b.useState(null),[i,o]=b.useState(!1),[l,u]=b.useState(null),[d,f]=b.useState(null),g=v9(),m=$B(),h=qF(ky(JA,{activationConstraint:{distance:4}}),ky(eM,{activationConstraint:{delay:200,tolerance:8}}),ky(Wb,{coordinateGetter:wB})),x=b.useMemo(()=>new Map(g.instructions.map(N=>[N.id,N])),[g.instructions]),S=d?g.instructions.find(({id:N})=>N===d):void 0,w=t?.data.current,C=O9(w),E=C?x.get(C)?.name??C:"",R=t?.rect.current.initial?.width;function O(N,j,D){const M=m.agents.find(({id:K})=>K===N);if(!M||m.pendingAgentIds.has(N))return;if(M.instructionIds.includes(j)){Ft.error(e("agents.duplicateError"));return}const z=[...M.instructionIds],L=D?z.indexOf(D):-1;z.splice(L<0?z.length:L,0,j),m.updateInstructions(N,z)}function T(N,j){const D=m.agents.find(({id:M})=>M===N);!D||m.pendingAgentIds.has(N)||m.updateInstructions(N,D.instructionIds.filter(M=>M!==j))}function A({active:N,over:j}){if(s(null),!j)return;const D=N.data.current,M=j.data.current;if(yv(D)){if(VR(M)){O(M.agentId,D.instructionId);return}tc(M)&&O(M.agentId,D.instructionId,M.instructionId);return}if(!tc(D))return;const z=m.agents.find(({id:H})=>H===D.agentId);if(!z||m.pendingAgentIds.has(z.id))return;const L=z.instructionIds,K=L.indexOf(D.instructionId),X=tc(M)&&M.agentId===D.agentId?L.indexOf(M.instructionId):VR(M)&&M.agentId===D.agentId?L.length-1:-1;if(K===X||K===-1||X===-1)return;const B=tx([...L],K,X);B.length===L.length&&B.every((H,U)=>H===L[U])||m.updateInstructions(z.id,B)}return v.jsxs(V7,{sensors:h,collisionDetection:C9,onDragStart:({active:N})=>{s(N)},onDragCancel:()=>{s(null)},onDragEnd:A,children:[v.jsxs("div",{className:`
136
+ grid min-h-0 flex-1 gap-4 overflow-hidden p-4
137
+ max-md:overflow-y-auto
138
+ md:grid-cols-2
139
+ `,children:[v.jsx(zA,{children:v.jsxs(We,{type:"button",onFocus:Ny,onPointerEnter:Ny,onClick:()=>{o(!0)},children:[v.jsx(uc,{}),v.jsx("span",{children:e("instructions.create")})]})}),v.jsxs("section",{className:"flex min-h-0 flex-col gap-2",children:[v.jsxs("div",{className:"flex items-baseline justify-between gap-3 px-1",children:[v.jsx("h2",{className:"text-xs font-medium text-muted-foreground",children:e("nav.instructions")}),v.jsx("span",{className:"truncate text-[11px] text-muted-foreground",children:e("instructions.dragHint")})]}),v.jsx("div",{className:`
140
+ min-h-0 flex-1 overflow-y-auto p-1
141
+ max-md:max-h-64
142
+ `,children:v.jsx(JB,{instructions:g.instructions,isLoading:g.isLoading,isError:g.isError,onRetry:()=>{g.retry()},onEdit:N=>{f(N.id)},onDelete:N=>{u(N)},onPreload:Ny})})]}),v.jsxs("section",{className:"flex min-h-0 flex-col gap-2",children:[v.jsxs("div",{className:"flex items-baseline justify-between gap-3 px-1",children:[v.jsx("h2",{className:"text-xs font-medium text-muted-foreground",children:e("agents.title")}),v.jsx("span",{className:"truncate text-[11px] text-muted-foreground",children:e("agents.orderHint")})]}),v.jsxs("div",{className:`
143
+ flex min-h-0 flex-1 flex-col gap-3 p-1
144
+ max-md:pb-2
145
+ md:overflow-y-auto
146
+ `,children:[m.isLoading&&v.jsx(A9,{}),!m.isLoading&&m.isError&&v.jsxs(Qi,{className:"items-start gap-3 p-4",children:[v.jsx("p",{className:"text-xs text-muted-foreground",children:e("agents.loadError")}),v.jsxs(We,{type:"button",variant:"outline",onClick:()=>{m.retry()},children:[v.jsx(pk,{}),v.jsx("span",{children:e("common.retry")})]})]}),!m.isLoading&&!m.isError&&m.agents.map(N=>v.jsx(UB,{agent:N,instructionsById:x,isInstructionsLoading:g.isLoading,isPending:m.pendingAgentIds.has(N.id),isReapplying:m.reapplyingAgentIds.has(N.id),onRemoveInstruction:T,onToggle:(j,D)=>{m.setEnabled(j,D)},onReapply:j=>{m.reapply(j)},onOpenFile:j=>{m.openFile(j)}},N.id))]})]}),l&&v.jsx(R9,{instruction:l,onClose:()=>u(null)}),i&&v.jsx(GR,{onClose:()=>{o(!1)}}),S&&v.jsx(GR,{instruction:S,onClose:()=>{f(null)}})]}),yv(w)&&v.jsx(aB,{dropAnimation:null,children:E&&v.jsxs("div",{style:{width:R},className:"flex items-center gap-2 bg-card px-3 py-2.5 text-xs",children:[v.jsx(ob,{className:"size-3.5 text-muted-foreground"}),v.jsx("span",{className:"truncate",children:E})]})})]})}function O9(e){if(yv(e)||tc(e))return e.instructionId}function A9(){return v.jsx(v.Fragment,{children:[0,1].map(e=>v.jsxs(Qi,{className:"gap-0 py-0",children:[v.jsxs("div",{className:"flex items-center gap-3 p-3",children:[v.jsx(Gn,{className:"size-8 rounded-md"}),v.jsxs("div",{className:"min-w-0 flex-1",children:[v.jsx(Gn,{className:"h-4 w-24"}),v.jsx(Gn,{className:"mt-2 h-3 w-40"})]}),v.jsx(Gn,{className:"h-4 w-7 rounded-full"})]}),v.jsx("div",{className:"border-t border-border/60 p-3",children:v.jsx(Gn,{className:"h-20 w-full"})})]},e))})}class $a extends Error{constructor(t,s){super(s),this.code=t,this.name="SkillApiError"}code}async function Oi(e,t){const s=await fetch(e,t);if(!s.ok){const i=await s.json();throw new $a(i.error?.code??"SKILL_REQUEST_FAILED",i.error?.message??`Request failed with status ${s.status}`)}return s.status===204?void 0:s.json()}function M9(e){return Oi("/api/skills",{signal:e})}function kM(e,t){return Oi(`/api/skills/${encodeURIComponent(e)}`,{signal:t})}function N9(e){return Oi("/api/skills",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)})}function D9(e){return Oi("/api/skills/import/local",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)})}function j9(e){return Oi("/api/skills/import/url",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)})}function I9(e,t){return Oi(`/api/skills/${encodeURIComponent(e)}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(t)})}function P9(e){return Oi(`/api/skills/${encodeURIComponent(e)}`,{method:"DELETE"})}function OM(e){return Oi("/api/skills/agents/assignments",{signal:e})}function AM(e,t,s){return Oi(`/api/skills/${encodeURIComponent(e)}/agents/${encodeURIComponent(t)}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({assigned:s})})}const Nd=["skills"],Po=e=>["skills",e],zu=["skills","agents","assignments"];function L9(e,t){return Oi(`/api/skills/${encodeURIComponent(e)}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({files:t})})}const MM=["skill-batch-assignment"];function z9({className:e,...t}){return v.jsx("textarea",{"data-slot":"textarea",className:He("flex field-sizing-content min-h-16 w-full resize-none rounded-md border border-input bg-input/20 px-2 py-2 text-sm transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 md:text-xs/relaxed dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...t})}function vv({skill:e,onClose:t,onSaved:s}){const{t:i}=pt(),o=qo(),l=Ir(),u=b.useId(),d=b.useId(),f=e!==void 0,[g,m]=b.useState(e?.name??""),[h,x]=b.useState(e?.description??""),S=nr({mutationFn:R=>e?I9(e.name,R):N9(R),onSuccess:R=>{const O=e?l.getQueryData(Po(e.name)):void 0;e&&e.name!==R.name&&l.removeQueries({queryKey:Po(e.name),exact:!0}),O?.files&&l.setQueryData(Po(R.name),{...O,...R}),l.invalidateQueries({queryKey:Nd}),Ft.success(i(f?"skills.updated":"skills.created")),t(),s?.(R),f||o(`/library/skills/${encodeURIComponent(R.name)}`)},onError:R=>{R instanceof $a&&R.code==="SKILL_LINK_CONFLICT"?Ft.error(i("skills.linkConflict")):R instanceof $a&&R.code==="SKILL_NAME_CONFLICT"?Ft.error(i("skills.nameConflict")):Ft.error(i(f?"skills.updateError":"skills.createError"))}}),w=S.isPending,C=u9(g)&&!!h.trim()&&!w;function E(){w||t()}return v.jsx(Ti,{open:!0,onOpenChange:R=>{R||E()},children:v.jsxs(ki,{showCloseButton:!1,className:`
147
+ max-h-[calc(100vh-2rem)] overflow-y-auto
148
+ sm:max-w-120
149
+ `,children:[v.jsxs("form",{className:"flex flex-col gap-4","aria-busy":w,onSubmit:R=>{R.preventDefault(),C&&S.mutate({name:xM(g),description:h.trim()})},children:[v.jsxs(Ws,{className:"pr-8",children:[v.jsx(Js,{children:i(f?"skills.editTitle":"skills.createManually")}),v.jsx(Ei,{children:i(f?"skills.editDescription":"skills.createManuallyDescription")})]}),v.jsxs("div",{className:"flex flex-col gap-2",children:[v.jsx(ta,{htmlFor:u,children:i("skills.name")}),v.jsx(Cd,{id:u,autoFocus:!0,required:!0,"aria-describedby":`${u}-hint`,placeholder:i("skills.namePlaceholder"),value:g,disabled:w,onChange:R=>{m(R.target.value)}}),v.jsx("p",{id:`${u}-hint`,className:"text-xs text-muted-foreground",children:i("skills.nameHint")})]}),v.jsxs("div",{className:"flex flex-col gap-2",children:[v.jsx(ta,{htmlFor:d,children:i("skills.description")}),v.jsx(z9,{id:d,required:!0,rows:3,maxLength:l9,placeholder:i("skills.descriptionPlaceholder"),value:h,disabled:w,onChange:R=>{x(R.target.value)}})]}),v.jsxs(wi,{children:[v.jsx(We,{type:"button",variant:"ghost",disabled:w,onClick:E,children:i("common.cancel")}),v.jsxs(We,{type:"submit",disabled:!C,children:[w?v.jsx(Kr,{className:"animate-spin"}):f?v.jsx(lb,{}):v.jsx(uc,{}),v.jsx("span",{children:i(w?f?"skills.updating":"skills.creating":f?"skills.saveChanges":"skills.create")})]})]})]}),v.jsxs(Md,{disabled:w,render:v.jsx(We,{variant:"ghost",size:"icon",className:"absolute top-2 right-2"}),children:[v.jsx(ra,{}),v.jsx("span",{className:"sr-only",children:i("a11y.close")})]})]})})}class bv extends Error{constructor(t,s){super(s),this.code=t}code}async function _9(e){const t=await fetch("/api/file-picker",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)});if(!t.ok){const s=await t.json();throw new bv(s.error?.code??"FILE_PICKER_FAILED",s.error?.message??"Unable to open file picker")}return(await t.json()).path}function U9({isPending:e,onClose:t,onImport:s}){const{t:i}=pt(),o=b.useId(),[l,u]=b.useState("");let d=!1;try{const g=new URL(l.trim());d=["http:","https:"].includes(g.protocol)&&!g.username&&!g.password}catch{}function f(){e||t()}return v.jsx(Ti,{open:!0,onOpenChange:g=>{g||f()},children:v.jsxs(ki,{showCloseButton:!1,className:`
150
+ max-h-[calc(100vh-2rem)] overflow-y-auto
151
+ sm:max-w-120
152
+ `,children:[v.jsxs("form",{className:"flex flex-col gap-4","aria-busy":e,onSubmit:g=>{g.preventDefault(),d&&!e&&s(l.trim())},children:[v.jsxs(Ws,{className:"pr-8",children:[v.jsx(Js,{children:i("skills.importUrl")}),v.jsx(Ei,{children:i("skills.importUrlDescription")})]}),v.jsxs("div",{className:"flex flex-col gap-2",children:[v.jsx(ta,{htmlFor:o,children:i("skills.url")}),v.jsx(Cd,{id:o,autoFocus:!0,required:!0,type:"url",placeholder:i("skills.importUrlHint"),autoComplete:"off",spellCheck:!1,value:l,disabled:e,onChange:g=>u(g.target.value)})]}),v.jsxs(wi,{children:[v.jsx(We,{type:"button",variant:"ghost",disabled:e,onClick:f,children:i("common.cancel")}),v.jsxs(We,{type:"submit",disabled:!d||e,children:[e?v.jsx(Kr,{className:"animate-spin"}):v.jsx(Jp,{}),v.jsx("span",{children:i(e?"skills.importing":"skills.importSubmit")})]})]})]}),v.jsxs(Md,{disabled:e,render:v.jsx(We,{variant:"ghost",size:"icon",className:"absolute top-2 right-2"}),children:[v.jsx(ra,{}),v.jsx("span",{className:"sr-only",children:i("a11y.close")})]})]})})}const H9=[{titleKey:"skills.createManually",descriptionKey:"skills.createManuallyDescription",icon:uc},{titleKey:"skills.importLocal",descriptionKey:"skills.importLocalDescription",icon:GT},{titleKey:"skills.importUrl",descriptionKey:"skills.importUrlDescription",icon:Jp}],$R={SKILL_IMPORT_INVALID_URL:"skills.importInvalidUrl",SKILL_IMPORT_UNSUPPORTED_URL_FILE:"skills.importUnsupportedUrlFile",SKILL_IMPORT_DOWNLOAD_FAILED:"skills.importDownloadFailed",SKILL_IMPORT_DOWNLOAD_TIMEOUT:"skills.importDownloadTimeout",SKILL_NAME_CONFLICT:"skills.importNameConflict",SKILL_IMPORT_TOO_LARGE:"skills.importTooLarge",SKILL_IMPORT_READ_FAILED:"skills.importReadError",SKILL_IMPORT_INVALID_SOURCE:"skills.importInvalidSource",SKILL_IMPORT_SYMLINK_SOURCE:"skills.importSymlinkSource",SKILL_IMPORT_MISSING_SKILL_MD:"skills.importMissingSkillMd",SKILL_IMPORT_INVALID_METADATA:"skills.importInvalidMetadata",SKILL_IMPORT_INVALID_PATH:"skills.importInvalidPath",SKILL_IMPORT_DUPLICATE_PATH:"skills.importDuplicatePath",SKILL_IMPORT_INVALID_ENCODING:"skills.importInvalidEncoding",SKILL_IMPORT_UNSUPPORTED_ENTRIES:"skills.importUnsupportedEntries",SKILL_IMPORT_TOO_MANY_ENTRIES:"skills.importTooManyEntries",SKILL_IMPORT_SKILL_MD_TOO_LARGE:"skills.importSkillMdTooLarge",SKILL_IMPORT_INVALID_ARCHIVE:"skills.importInvalidArchive",SKILL_IMPORT_NO_SKILLS:"skills.importNoSkills",INVALID_SKILL_INPUT:"skills.importInvalid"};function F9({onCreateManually:e}){const{t}=pt(),s=Ir(),i=qo(),[o,l]=b.useState(!1),u=nr({mutationFn:m=>"url"in m?j9(m):D9(m),onSuccess:m=>{l(!1),s.invalidateQueries({queryKey:Nd});const h=t("skills.importSummary",{imported:m.imported.length,skipped:m.skipped.length});m.skipped.length>0?Ft.warning(h,{description:v.jsx("ul",{className:"max-h-40 overflow-y-auto",children:m.skipped.map(x=>v.jsxs("li",{className:"wrap-break-word",children:[x.source,":",t(x.code==="SKILL_NAME_CONFLICT"?"skills.importSkippedConflict":$R[x.code]??"skills.importSkippedInvalid")]},x.source))})}):Ft.success(h),m.imported.length===1&&m.skipped.length===0&&i(`/library/skills/${encodeURIComponent(m.imported[0].name)}`)},onError:m=>{const h=m instanceof $a?$R[m.code]:void 0;Ft.error(t(h??"skills.importError"))}}),d=nr({mutationFn:()=>_9({kind:"file-or-directory",title:t("skills.importLocal"),extensions:["skill","zip"]}),onSuccess:m=>{m!==null&&u.mutate({path:m})},onError:m=>{let h="filePicker.error";m instanceof bv&&m.code==="FILE_PICKER_UNAVAILABLE"?h="filePicker.unavailable":m instanceof bv&&m.code==="FILE_PICKER_BUSY"&&(h="filePicker.busy"),Ft.error(t(h))}}),f=d.isPending||u.isPending;let g="skills.new";return d.isPending?g="filePicker.selecting":u.isPending&&(g="skills.importing"),v.jsxs(v.Fragment,{children:[v.jsxs(Yo,{children:[v.jsxs(Go,{render:v.jsx(We,{type:"button",disabled:f}),children:[f?v.jsx(Kr,{className:"animate-spin"}):v.jsx(uc,{}),v.jsx("span",{children:t(g)}),v.jsx(rb,{})]}),v.jsx($o,{align:"end",className:"w-max max-w-[min(20rem,calc(100vw-2rem))]",children:H9.map(({titleKey:m,descriptionKey:h,icon:x})=>v.jsxs(pc,{className:"items-start gap-2 p-2",onClick:()=>{m==="skills.createManually"?e():m==="skills.importLocal"?d.mutate():l(!0)},children:[v.jsx(x,{"aria-hidden":"true",className:"mt-0.5 size-4"}),v.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5 whitespace-normal",children:[v.jsx("span",{className:"text-sm",children:t(m)}),v.jsx("span",{className:"text-xs text-muted-foreground",children:t(h)})]})]},m))})]}),o&&v.jsx(U9,{isPending:u.isPending,onClose:()=>l(!1),onImport:m=>u.mutate({url:m})})]})}function B9(e){if(!e)return null;for(const t of e.elements){const s=t.tagName;if(s==="BUTTON"||s==="INPUT"){const i=t;if(i.type==="submit")return i}}return null}const V9="data-checked",K9="data-unchecked";function NM(e){return{checked(t){return e.indeterminate?{}:t?{[V9]:""}:{[K9]:""}},...gc}}const q9=b.createContext(void 0);function Y9(){return b.useContext(q9)}const DM=b.createContext(void 0);function G9(){const e=b.useContext(DM);if(e===void 0)throw new Error(cn(14));return e}const $9="data-parent",Q9=b.forwardRef(function(t,s){const{checked:i,className:o,defaultChecked:l=!1,"aria-labelledby":u,disabled:d=!1,form:f,id:g,indeterminate:m=!1,inputRef:h,name:x,onCheckedChange:S,parent:w=!1,readOnly:C=!1,render:E,required:R=!1,uncheckedValue:O,value:T,nativeButton:A=!1,style:N,...j}=t,{clearErrors:D}=wd(),{disabled:M,name:z,setDirty:L,setFilled:K,setTouched:X,state:B,validationMode:H,validityData:U,validation:_}=ia(),Q=wA(),{labelId:$,registerControlId:q,getDescriptionProps:Y}=Qo(),ee=Y9(),G=ee?.allValues===void 0?void 0:ee.parent,ae=G!==void 0,I=M||Q.disabled||ee?.disabled||d,F=z??x,Z=T??F,ne=$n(),ye=ee?.registerControlId!==q,se=mc({id:g||void 0,enabled:ye}),ge=A?se:ne;let fe={};ae&&(w?fe=G.getParentProps():Z!==void 0&&(fe=G.getChildProps(Z)));const{checked:ce=i,indeterminate:Re=m,onCheckedChange:be,...Le}=fe,Oe=ee?.value,ze=b.useRef(null),Ve=Ed(I,ze),{getButtonProps:ke,buttonRef:Ue}=ns({disabled:I,native:A}),xe=ee?.validation??_,[Fe,Ze]=Si({controlled:Z!==void 0&&Oe!==void 0&&!w?Oe.includes(Z):ce,default:l,name:"Checkbox",state:"checked"}),ot=ae?!!ce:Fe,de=ae&&Re||m;Rd(ze,ne,Fe,void 0,!ee&&!I,x);const Ee=G?.registerChildId,Ge=b.useRef(null),Me=xe.registerInput,De=ee?Z:void 0,xt=b.useCallback(et=>Me(et,{controlRef:ze,value:De}),[Me,De]),dt=es(h,Ge,w?void 0:xt),gt=Bb(u,$,Ge,!A,se,j["aria-label"]);Pe(()=>{Ge.current&&(Ge.current.indeterminate=de),ee||K(Fe)},[Fe,de,ee,K]),dc(Fe,()=>{ee||(D(F),L(Fe!==U.initialValue),xe.change(Fe))});const Nt=Dr({checked:Fe,disabled:I,form:f,name:w?void 0:F,id:A?void 0:se,required:R,ref:dt,style:F?Ap:id,tabIndex:-1,type:"checkbox","aria-hidden":!0,onChange(et){if(et.nativeEvent.defaultPrevented)return;if(C){et.preventDefault();return}const Et=et.currentTarget.checked,Zt=lt(Cr,et.nativeEvent);if(S?.(Et,Zt),!Zt.isCanceled&&(be?.(Et,Zt),!Zt.isCanceled&&(Ze(Et),Z!==void 0&&ee!==void 0&&!w&&!ae))){const ht=Et?[...ee.value,Z]:ee.value.filter(St=>St!==Z);ee.setValue(ht,Zt)}},onClick(et){et.stopPropagation()},onFocus(){ze.current?.focus()}},T!==void 0?{value:(ee?Fe&&T:T)||""}:Xt,Y,et=>xe.getValidationProps(I,et));b.useEffect(()=>{if(!G||Z===void 0)return;const et=G.disabledStatesRef.current;return et.set(Z,I),()=>{et.delete(Z)}},[G,I,Z]);const jt=b.useMemo(()=>({...B,checked:ot,disabled:I,readOnly:C,required:R,indeterminate:de}),[B,ot,I,C,R,de]),tn=NM(jt),an=bt("span",t,{state:jt,ref:[Ue,ze,s],props:[{id:ge,role:"checkbox","aria-checked":de?"mixed":ot,"aria-readonly":C||void 0,"aria-required":R||void 0,"aria-labelledby":gt,[$9]:w?"":void 0,onFocus(){Ve(!0)},onBlur(){const et=Ge.current;et&&(X(!0),Ve(!1),H==="onBlur"&&xe.commit(ee?Oe:et.checked))},onKeyDown(et){if(et.key!=="Enter"||(et.preventBaseUIHandler(),et.defaultPrevented))return;const Et=Ge.current?.form??null,Zt=et.currentTarget,ht=et.nativeEvent,St=et.preventDefault,yt=ht.preventDefault;let Ut=!1;et.preventDefault=()=>{Ut=!0,St.call(et)},ht.preventDefault=()=>{Ut=!0,yt.call(ht)},yt.call(ht),Rn(Zt).queueMicrotask(()=>{et.preventDefault=St,ht.preventDefault=yt,Ut||B9(Et)?.click()})},onClick(et){if(C||I)return;et.preventDefault();const Et=Ge.current;Et&&Io(Et,et)}},j,Le,ke,Y,et=>xe.getValidationProps(I,et)],stateAttributesMapping:tn}),nn=an.props.id;return Pe(()=>{if(!(!Ee||w||Z===void 0||nn===void 0))return Ee(Z,nn)},[Ee,w,Z,nn]),v.jsxs(DM.Provider,{value:jt,children:[an,!Fe&&!ee&&F&&!w&&O!==void 0&&v.jsx("input",{type:"hidden",form:f,name:F,value:O,disabled:I}),v.jsx("input",{...Nt,suppressHydrationWarning:!0})]})}),X9=b.forwardRef(function(t,s){const{render:i,className:o,style:l,keepMounted:u=!1,...d}=t,f=G9(),g=f.checked||f.indeterminate,{mounted:m,transitionStatus:h,setMounted:x}=Za(g),S=b.useRef(null),w={...f,transitionStatus:h};bs({batch:!0,enabled:!g,open:g,ref:S,onComplete(){g||x(!1)}});const E={...NM(f),...ei},R=u||m,O=bt("span",t,{ref:[s,S],state:w,stateAttributesMapping:E,props:d});return R?O:null});function jM({className:e,...t}){return v.jsx(Q9,{"data-slot":"checkbox",className:He("peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-shadow outline-none group-has-disabled/field:opacity-50 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary",e),...t,children:v.jsx(X9,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none [&>svg]:size-3.5",children:v.jsx(dd,{})})})}function IM({skill:e,to:t,isSelected:s=!1,leading:i,trailing:o,className:l}){const u=v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"min-w-0 truncate font-medium",children:e.name}),v.jsx("span",{className:"min-w-0 flex-1 basis-0 truncate text-muted-foreground",children:e.description})]});return v.jsxs("div",{role:"listitem","data-selected":s||void 0,className:He(`
153
+ group flex h-9 items-center rounded-md px-2 transition-colors
154
+ hover:bg-muted/50
155
+ has-aria-expanded:bg-muted/50
156
+ data-selected:bg-muted/50
157
+ `,l),children:[i,t?v.jsx(xd,{to:t,className:`
158
+ flex min-w-0 flex-1 items-center gap-2 rounded-sm text-sm
159
+ focus-visible:outline-2 focus-visible:outline-ring
160
+ `,children:u}):v.jsx("div",{className:"flex min-w-0 flex-1 items-center gap-2 text-sm",children:u}),o]})}const PM=b.createContext(void 0);function Z9(){return b.useContext(PM)}const W9=b.forwardRef(function(t,s){const{className:i,defaultPressed:o=!1,disabled:l=!1,form:u,onPressedChange:d,pressed:f,render:g,type:m,value:h,nativeButton:x=!0,style:S,...w}=t,C=$n(h||void 0),E=Z9(),R=E?.value??[],O=(l||E?.disabled)??!1,[T,A]=Si({controlled:E?C!==void 0&&R.indexOf(C)>-1:f,default:o,name:"Toggle",state:"pressed"}),{getButtonProps:N,buttonRef:j}=ns({disabled:O,native:x}),D={disabled:O,pressed:T},M=[j,s],z=[{"aria-pressed":T,onClick(X){const B=!T,H=lt(Cr,X.nativeEvent);d?.(B,H),!H.isCanceled&&(C&&E?.setGroupValue?.(C,B,H),!H.isCanceled&&A(B))}},w,N],L=bt("button",t,{enabled:!E,state:D,ref:M,props:z}),K=b.useMemo(()=>({disabled:O,focusableWhenDisabled:!1}),[O]);return E?v.jsx(Ub,{tag:"button",render:g,className:i,style:S,metadata:K,state:D,refs:M,props:z}):L}),Mg="data-composite-item-active";function J9(e){const{loopFocus:t=!0,orientation:s="both",grid:i,onLoop:o,direction:l,highlightedIndex:u,onHighlightedIndexChange:d,rootRef:f,enableHomeAndEndKeys:g=!1,stopEventPropagation:m,disabledIndices:h,modifierKeys:x=Ls}=e,[S,w]=b.useState(0),C=i!=null,E=b.useRef(null),R=es(E,f),O=b.useRef([]),T=b.useRef(!1),A=b.useRef(null),N=u??S,j=Be((K,X=!1)=>{if(A.current=O.current[K]??null,(d??w)(K),X){const B=O.current[K];FE(E.current,B,l,s)}}),D=Be(K=>{if(K.size===0)return;if(T.current){const U=O.current,_=U.indexOf(A.current);if(_===-1){const Q=U[N];!Q||Gl(U,N,h)?j(eV(U,h)):A.current=Q}else _!==N&&j(_);return}T.current=!0;const X=Array.from(K.keys()),B=X.find(U=>U?.hasAttribute(Mg))??null,H=B?K.get(B)?.index??-1:-1;if(H!==-1)j(H);else if(Gl(X,N,h)){const U=Yl(X,{disabledIndices:h});ql(X,U)||j(U)}FE(E.current,B,l,s)});Pe(()=>{if(h==null||u!=null||!T.current)return;const K=O.current;if(Gl(K,N,h)){const X=Yl(K,{disabledIndices:h});ql(K,X)||j(X)}},[h,u,N,O,j]);const M=Be((K,X,B)=>o?o(K,X,B,O):B),z=Be(K=>{const X=K.key===tv||K.key===nv;if(!hd.has(K.key)||!g&&X||tV(K,x)||!E.current)return;const H=l==="rtl",U=H?Jy:ev,_=H?ev:Jy,Q=s==="vertical"?Wy:U,$=s==="vertical"?Zy:_,q=sr(K.nativeEvent);if(q!=null&&HE(q)&&!mA(q)){const F=q.selectionStart,Z=q.selectionEnd,ne=q.value;if(F==null||K.shiftKey||F!==Z||K.key!==$&&F<ne.length||K.key!==Q&&F>0)return}let Y=N;const ee=Ch(O,h),G=Fy(O,h);i!=null&&(Y=i({disabledIndices:h,elementsRef:O,event:K,highlightedIndex:N,loopFocus:t,maxIndex:G,minIndex:ee,onLoop:M,orientation:s,rtl:H}));const ae=s!=="vertical"&&K.key===U||s!=="horizontal"&&K.key===Wy,I=s!=="vertical"&&K.key===_||s!=="horizontal"&&K.key===Zy;g&&(K.key===tv?Y=ee:K.key===nv&&(Y=G)),Y===N&&(ae||I)&&(t&&Y===G&&ae?(Y=ee,o&&(Y=o(K,N,Y,O))):t&&Y===ee&&I?(Y=G,o&&(Y=o(K,N,Y,O))):Y=Yl(O.current,{startingIndex:Y,decrement:I,disabledIndices:h})),Y!==N&&!ql(O.current,Y)&&(m&&K.stopPropagation(),(C||X||ae||I)&&K.preventDefault(),j(Y,!0),queueMicrotask(()=>{O.current[Y]?.focus()}))});return{props:{ref:R,onFocus(K){const X=E.current,B=sr(K.nativeEvent);!X||B==null||!HE(B)||B.setSelectionRange(0,B.value.length)},onKeyDown:z},highlightedIndex:N,onHighlightedIndexChange:j,elementsRef:O,onMapChange:D,relayKeyboardEvent:z}}function eV(e,t){let s=-1;for(let i=0;i<e.length;i+=1){const o=e[i];if(!(!o||Gl(e,i,t))){if(o.hasAttribute(Mg))return i;s===-1&&(s=i)}}return Math.max(s,0)}function tV(e,t){for(const s of xz)if(!t.includes(s)&&e.getModifierState(s))return!0;return!1}function ox(e){const{render:t,className:s,style:i,refs:o=Ls,props:l=Ls,state:u=Xt,stateAttributesMapping:d,highlightedIndex:f,onHighlightedIndexChange:g,orientation:m,grid:h,loopFocus:x,onLoop:S,enableHomeAndEndKeys:w,onMapChange:C,stopEventPropagation:E=!0,rootRef:R,disabledIndices:O,modifierKeys:T,highlightItemOnHover:A=!1,tag:N="div",...j}=e,D=Qp(),{props:M,highlightedIndex:z,onHighlightedIndexChange:L,elementsRef:K,onMapChange:X,relayKeyboardEvent:B}=J9({grid:h,loopFocus:x,onLoop:S,orientation:m,highlightedIndex:f,onHighlightedIndexChange:g,rootRef:R,stopEventPropagation:E,enableHomeAndEndKeys:w,direction:D,disabledIndices:O,modifierKeys:T}),H=bt(N,e,{state:u,ref:o,props:[M,...l,j],stateAttributesMapping:d}),U=b.useMemo(()=>({highlightedIndex:z,onHighlightedIndexChange:L,highlightItemOnHover:A,relayKeyboardEvent:B}),[z,L,A,B]);return v.jsx(zk.Provider,{value:U,children:v.jsx(mg,{elementsRef:K,onMapChange:_=>{C?.(_),X(_)},children:H})})}const nV=b.createContext(void 0);function rV(){return b.useContext(nV)}const sV=b.forwardRef(function(t,s){const{defaultValue:i,disabled:o=!1,loopFocus:l=!0,onValueChange:u,orientation:d="horizontal",multiple:f=!1,value:g,className:m,render:h,style:x,...S}=t,w=ig(),C=rV(),E=i??Ls,R=g!==void 0||i!==void 0,O=(w?.disabled??!1)||(C?.disabled??!1)||o,[T,A]=Si({controlled:g,default:E,name:"ToggleGroup",state:"value"}),N=Be((L,K,X)=>{let B;f?(B=T.slice(),K?B.push(L):B.splice(T.indexOf(L),1)):B=K?[L]:[],u?.(B,X),!X.isCanceled&&A(B)}),j={disabled:O,multiple:f,orientation:d},D=b.useMemo(()=>({disabled:O,setGroupValue:N,value:T,isValueInitialized:R}),[O,N,T,R]),M={role:"group"},z=bt("div",t,{enabled:!!w,state:j,ref:s,props:[M,S]});return v.jsx(PM.Provider,{value:D,children:w?z:v.jsx(ox,{render:h,className:m,style:x,state:j,refs:[s],props:[M,S],loopFocus:l,enableHomeAndEndKeys:!0,orientation:d})})}),iV=Bo("group/toggle inline-flex items-center justify-center gap-1 rounded-md text-xs font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-muted"},size:{default:"h-7 min-w-7 px-2 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",sm:"h-6 min-w-6 rounded-[min(var(--radius-md),8px)] px-2 text-[0.625rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",lg:"h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2"}},defaultVariants:{variant:"default",size:"default"}}),LM=b.createContext({size:"default",variant:"default",spacing:2,orientation:"horizontal"});function aV({className:e,variant:t,size:s,spacing:i=2,orientation:o="horizontal",children:l,...u}){return v.jsx(sV,{"data-slot":"toggle-group","data-variant":t,"data-size":s,"data-spacing":i,"data-orientation":o,style:{"--gap":i},className:He("group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-md data-[size=sm]:rounded-[min(var(--radius-md),8px)] data-vertical:flex-col data-vertical:items-stretch",e),...u,children:v.jsx(LM.Provider,{value:{variant:t,size:s,spacing:i,orientation:o},children:l})})}function oV({className:e,children:t,variant:s="default",size:i="default",...o}){const l=b.useContext(LM);return v.jsx(W9,{"data-slot":"toggle-group-item","data-variant":l.variant||s,"data-size":l.size||i,"data-spacing":l.spacing,className:He("shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-md group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-md group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-md group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-md group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t",iV({variant:l.variant||s,size:l.size||i}),e),...o,children:t})}function zM({agents:e,value:t,onValueChange:s,label:i,disabled:o=!1,shouldShowNames:l=!1}){return v.jsx(aV,{multiple:!0,value:t,onValueChange:s,disabled:o,"aria-label":i,className:"max-w-full flex-wrap",children:e.map(u=>v.jsxs(oV,{value:u.id,"aria-label":u.name,title:u.name,className:He("disabled:opacity-100",!l&&"size-7 p-0"),children:[v.jsx(rx,{icon:u.icon,monochrome:!t.includes(u.id),className:"size-4 rounded-none bg-transparent"}),l&&v.jsx("span",{children:u.name})]},u.id))})}function _M({name:e}){const{t}=pt(),s=Ir(),i=ti({queryKey:zu,queryFn:({signal:f})=>OM(f)}),o=["skill-assignment",e],l=ag({mutationKey:o})>0,u=nr({mutationKey:o,mutationFn:({id:f,assigned:g})=>AM(e,f,g),onSuccess:f=>{s.setQueryData(zu,g=>g&&{...g,skills:g.skills.map(m=>m.name===f.name?f:m)})},onError:f=>{Ft.error(t(f instanceof $a&&f.code==="SKILL_LINK_CONFLICT"?"skills.linkConflict":"skills.assignmentError"))},onSettled:()=>s.invalidateQueries({queryKey:zu})});if(i.isPending)return v.jsx(Gn,{className:"h-7 w-16"});if(i.isError)return v.jsx(We,{variant:"ghost",onClick:()=>{i.refetch()},children:t("common.retry")});if(i.data.agents.length===0)return v.jsx("span",{className:"text-xs text-muted-foreground",children:t("skills.noAgents")});const d=i.data.skills.find(f=>f.name===e)?.agentIds??[];return v.jsx("div",{"aria-busy":l,children:v.jsx(zM,{agents:i.data.agents,value:d,disabled:l,label:t("skills.assignTitle",{name:e}),onValueChange:f=>{const g=i.data.agents.find(m=>f.includes(m.id)!==d.includes(m.id))?.id;g&&!l&&u.mutate({id:g,assigned:f.includes(g)})}})})}function lV({skill:e,isSelected:t,selectionDisabled:s,onSelectedChange:i,onEdit:o,onDelete:l,onAssign:u}){const{t:d}=pt();return v.jsxs(Tg,{children:[v.jsx(kg,{className:"contents",children:v.jsx(IM,{skill:e,to:`/library/skills/${encodeURIComponent(e.name)}`,isSelected:t,leading:v.jsx("div",{className:"flex w-8 shrink-0 items-center",children:v.jsx(jM,{checked:t,disabled:s,onCheckedChange:i,"aria-label":d("skills.selectAria",{name:e.name}),className:`
161
+ opacity-0
162
+ group-focus-within:opacity-100
163
+ group-hover:opacity-100
164
+ focus-visible:opacity-100
165
+ data-checked:opacity-100
166
+ [@media(hover:none)]:opacity-100
167
+ `})}),trailing:!t&&v.jsxs(v.Fragment,{children:[v.jsx("div",{className:`
168
+ ml-2 hidden shrink-0
169
+ md:block
170
+ `,children:v.jsx(_M,{name:e.name})}),v.jsx("div",{className:`
171
+ flex w-9 shrink-0 justify-end overflow-hidden
172
+ md:w-0
173
+ md:group-focus-within:w-9
174
+ md:group-hover:w-9
175
+ md:group-has-aria-expanded:w-9
176
+ [@media(hover:none)]:w-9
177
+ `,children:v.jsxs(Yo,{children:[v.jsx(Go,{render:v.jsx(We,{type:"button",variant:"ghost",size:"icon","aria-label":d("skills.actionsAria",{name:e.name}),className:"shrink-0 text-muted-foreground"}),children:v.jsx(ib,{})}),v.jsx($o,{align:"end",className:"w-40",children:v.jsx(QR,{Item:pc,onEdit:o,onDelete:l,onAssign:u})})]})})]})})}),!t&&v.jsx(Og,{children:v.jsx(QR,{Item:Ag,onEdit:o,onDelete:l,onAssign:u})})]})}function QR({Item:e,onEdit:t,onDelete:s,onAssign:i}){const{t:o}=pt();return v.jsxs(v.Fragment,{children:[v.jsxs(e,{onClick:i,children:[v.jsx(Ek,{}),v.jsx("span",{children:o("skills.assign")})]}),v.jsxs(e,{onClick:t,children:[v.jsx(uk,{}),v.jsx("span",{children:o("skills.edit")})]}),v.jsxs(e,{variant:"destructive",onClick:s,children:[v.jsx(cb,{}),v.jsx("span",{children:o("skills.delete")})]})]})}function cV({skill:e,onClose:t}){const{t:s}=pt(),i=Ir(),o=nr({mutationFn:()=>P9(e.name),onSuccess:()=>{i.removeQueries({queryKey:Po(e.name),exact:!0}),i.invalidateQueries({queryKey:Nd}),Ft.success(s("skills.deleted")),t()},onError:()=>Ft.error(s("skills.deleteError"))}),l=()=>{o.isPending||t()};return v.jsx(Ti,{open:!0,onOpenChange:u=>{u||l()},children:v.jsxs(ki,{showCloseButton:!1,children:[v.jsxs(Ws,{children:[v.jsx(Js,{children:s("skills.deleteConfirmTitle")}),v.jsx(Ei,{children:v.jsx(tg,{i18nKey:"skills.deleteConfirmDescription",values:{name:e.name},components:{skillName:v.jsx("code",{className:`
178
+ rounded-sm bg-muted px-1 py-0.5 font-mono wrap-anywhere
179
+ `})}})})]}),v.jsxs(wi,{children:[v.jsx(We,{type:"button",variant:"ghost",disabled:o.isPending,onClick:l,children:s("common.cancel")}),v.jsxs(We,{type:"button",variant:"destructive",disabled:o.isPending,onClick:()=>o.mutate(),children:[o.isPending&&v.jsx(Kr,{className:"animate-spin"}),v.jsx("span",{children:s("skills.delete")})]})]})]})})}function uV({skill:e,onClose:t}){const{t:s}=pt();return v.jsx(Ti,{open:!0,onOpenChange:i=>{i||t()},children:v.jsxs(ki,{children:[v.jsxs(Ws,{children:[v.jsx(Js,{className:"pr-6 leading-relaxed",children:v.jsx(tg,{i18nKey:"skills.assignDialogTitle",values:{name:e.name},components:{skillName:v.jsx("code",{className:`
180
+ rounded-sm bg-muted px-1 py-0.5 font-mono text-sm
181
+ wrap-anywhere
182
+ `})}})}),v.jsx(Ei,{children:s("skills.assignDescription")})]}),v.jsx(_M,{name:e.name})]})})}function dV(e,t,s,i){return s.flatMap(o=>t.filter(l=>(e.find(u=>u.name===l)?.agentIds.includes(o)??!1)!==i).map(l=>({name:l,agentId:o,isAssigned:i})))}function fV({names:e,onAssigned:t}){const{t:s}=pt(),i=Ir(),[o,l]=b.useState(!1),[u,d]=b.useState([]),f=ag({mutationKey:["skill-assignment"]})>0,g=ti({queryKey:zu,queryFn:({signal:S})=>OM(S),enabled:o}),m=nr({mutationKey:MM,mutationFn:async S=>{let w=0;const C=[];for(const{name:E,agentId:R,isAssigned:O}of S)try{await AM(E,R,O),w+=1}catch(T){C.push(T)}return{completed:w,errors:C}},onSuccess:async({completed:S,errors:w})=>{if(await i.invalidateQueries({queryKey:zu}),w.length>0){Ft.error(s("skills.batchAssignPartial",{completed:S,failed:w.length}),{description:s(w.some(C=>C instanceof $a&&C.code==="SKILL_LINK_CONFLICT")?"skills.linkConflict":"skills.assignmentError")});return}Ft.success(s("skills.batchAssigned")),l(!1),t()}}),h=!g.isSuccess||u.length===0||m.isPending||f;function x(S){h||m.mutate(dV(g.data.skills,e,u,S))}return v.jsxs(gb,{open:o,onOpenChange:S=>{m.isPending||(l(S),S||d([]))},children:[v.jsxs(Gk,{render:v.jsx(We,{variant:"outline",disabled:f||m.isPending}),children:[v.jsx(Ek,{}),v.jsx("span",{children:s("skills.batch")}),v.jsx("span",{className:"text-muted-foreground tabular-nums",children:e.length})]}),v.jsx(mb,{align:"end","aria-label":s("skills.batch"),children:v.jsxs("div",{className:"flex flex-col gap-4","aria-busy":m.isPending,children:[v.jsxs("div",{className:"flex flex-col gap-2",children:[g.isPending&&v.jsx(Gn,{className:"h-16 w-full"}),g.isError&&v.jsxs("div",{role:"alert",className:"space-y-2",children:[v.jsx("p",{className:"text-xs text-muted-foreground",children:s("skills.assignmentError")}),v.jsx(We,{type:"button",variant:"outline",disabled:g.isFetching,onClick:()=>{g.refetch()},children:s("common.retry")})]}),g.isSuccess&&g.data.agents.length===0&&v.jsx("p",{className:"text-xs text-muted-foreground",children:s("skills.noAgents")}),g.isSuccess&&v.jsx(zM,{agents:g.data.agents,value:u,onValueChange:d,label:s("skills.batch"),disabled:m.isPending,shouldShowNames:!0})]}),v.jsxs("div",{className:"flex justify-end gap-2",children:[v.jsxs(We,{type:"button",variant:"outline",disabled:h,onClick:()=>x(!1),children:[m.isPending&&!m.variables[0]?.isAssigned&&v.jsx(Kr,{className:"animate-spin"}),v.jsx("span",{children:s("skills.unassign")})]}),v.jsxs(We,{type:"button",disabled:h,onClick:()=>x(!0),children:[m.isPending&&m.variables[0]?.isAssigned&&v.jsx(Kr,{className:"animate-spin"}),v.jsx("span",{children:s("skills.assign")})]})]})]})})]})}const UM=b.createContext(void 0);function lx(){const e=b.useContext(UM);if(e===void 0)throw new Error(cn(64));return e}const hV="data-activation-direction",Ng={tabActivationDirection:e=>({[hV]:e})},pV=b.forwardRef(function(t,s){const{className:i,defaultValue:o=0,onValueChange:l,orientation:u="horizontal",render:d,value:f,style:g,...m}=t,h=t.defaultValue!==void 0,x=b.useRef([]),[S,w]=b.useState(()=>new Map),[C,E]=Si({controlled:f,default:o,name:"Tabs",state:"value"}),R=f!==void 0,[O,T]=b.useState(()=>new Map),A=b.useRef(void 0),N=b.useCallback(ye=>xv(O,ye),[O]),[j,D]=b.useState(()=>({previousValue:C,tabActivationDirection:"none"})),{previousValue:M,tabActivationDirection:z}=j;let L=z,K=!1;M!==C&&(L=XR(M,C,u,O),K=M!=null&&C!=null&&N(C)==null);const X=K?M:C,B=M!==X||z!==L;Pe(()=>{B&&D({previousValue:X,tabActivationDirection:L})},[X,B,L]);const H=Be((ye,se)=>{const ge=XR(C,ye,u,O);se.activationDirection=ge,l?.(ye,se),!se.isCanceled&&E(()=>ye)}),U=Be((ye,se)=>{l?.(ye,lt(se,void 0,void 0,{activationDirection:"none"}))}),_=Be((ye,se)=>(w(ge=>{const fe=new Map(ge);return fe.set(ye,se),fe}),()=>{w(ge=>{if(ge.get(ye)!==se)return ge;const fe=new Map(ge);return fe.delete(ye),fe})})),Q=b.useCallback(ye=>S.get(ye),[S]),$=b.useCallback(ye=>{for(const se of O.values())if(ye===se.value)return se.id},[O]),q=b.useMemo(()=>({getTabElementBySelectedValue:N,getTabIdByPanelValue:$,getTabPanelIdByValue:Q,onValueChange:H,orientation:u,registerMountedTabPanel:_,setTabMap:T,tabActivationDirection:L,value:C}),[N,$,Q,H,u,_,T,L,C]),Y=b.useMemo(()=>{for(const ye of O.values())if(ye.value===C)return ye},[O,C]),ee=b.useMemo(()=>{for(const ye of O.values())if(!ye.disabled)return ye.value},[O]),G=b.useRef(!h),ae=b.useRef(o),I=b.useRef(h),F=b.useRef(!1);Pe(()=>{if(R)return;function ye(ce,Re){E(()=>ce),D({previousValue:ce,tabActivationDirection:"none"}),U(ce,Re),G.current=!1}if(O.size===0){F.current&&C!==null&&!A.current?.isConnected&&ye(null,kw);return}F.current=!0,A.current=O.keys().next().value;const se=Y?.disabled,ge=Y==null&&C!==null;if(!se&&C===ae.current&&(I.current=!1),I.current&&se&&C===ae.current)return;const fe=G.current;if(se||ge){const ce=ee??null;if(C===ce){G.current=!1;return}let Re=kw;fe?Re=Ow:se&&(Re=hC),ye(ce,Re);return}fe&&Y!=null&&(U(C,Ow),G.current=!1)},[ee,R,U,Y,E,O,C]);const ne=bt("div",t,{state:{orientation:u,tabActivationDirection:L},ref:s,props:m,stateAttributesMapping:Ng});return v.jsx(UM.Provider,{value:q,children:v.jsx(mg,{elementsRef:x,children:ne})})});function xv(e,t){for(const[s,i]of e.entries())if(t===i.value)return s;return null}function XR(e,t,s,i){if(e==null||t==null)return"none";const[o,l,u]=s==="horizontal"?["left","left","right"]:["top","up","down"],d=xv(i,e),f=xv(i,t);if(d==null||f==null)return d!==f&&(typeof e=="number"||typeof e=="string")&&typeof e==typeof t?t>e?u:l:"none";const g=d.getBoundingClientRect()[o],m=f.getBoundingClientRect()[o];return m<g?l:m>g?u:"none"}const HM=b.createContext(void 0);function gV(){const e=b.useContext(HM);if(e===void 0)throw new Error(cn(65));return e}const mV=b.forwardRef(function(t,s){const{className:i,disabled:o=!1,render:l,value:u,id:d,nativeButton:f=!0,style:g,...m}=t,{value:h,getTabPanelIdByValue:x,onValueChange:S,orientation:w,tabActivationDirection:C}=lx(),{activateOnFocus:E,registerTabResizeObserverElement:R,tabsListElement:O}=gV(),{highlightedIndex:T,onHighlightedIndexChange:A}=ng(),N=$n(d),j=b.useMemo(()=>({disabled:o,id:N,value:u}),[o,N,u]),{compositeProps:D,compositeRef:M,index:z}=gA({metadata:j}),L=u===h,K=b.useRef(!1),X=b.useRef(null),B=Be(F=>{X.current?.(),X.current=F?R(F):null});Pe(()=>{if(K.current){K.current=!1;return}if(!(L&&z>-1&&T!==z))return;const F=O;if(F!=null){const Z=Br(qt(F));if(Z&&st(F,Z))return}o||A(z)},[L,z,T,A,o,O]);const{getButtonProps:H,buttonRef:U}=ns({disabled:o,native:f,focusableWhenDisabled:!0}),_=x(u),Q=b.useRef(!1),$=b.useRef(!1);function q(F){S(u,lt(Cr,F.nativeEvent,void 0,{activationDirection:"none"}))}function Y(F){L||o||q(F)}function ee(F){L||o||E&&(!Q.current||$.current)&&q(F)}function G(F){if(L||o)return;Q.current=!0,$.current=F.button===0;const Z=qt(F.currentTarget);function ne(){Q.current=!1,$.current=!1,Z.removeEventListener("pointerup",ne),Z.removeEventListener("pointercancel",ne)}Z.addEventListener("pointerup",ne),Z.addEventListener("pointercancel",ne)}return bt("button",t,{state:{disabled:o,active:L,orientation:w,tabActivationDirection:C},ref:[s,U,M,B],props:[D,{role:"tab","aria-controls":_,"aria-selected":L,id:N,onClick:Y,onFocus:ee,onPointerDown:G,[Mg]:L?"":void 0,onKeyDownCapture(){K.current=!0}},m,H],stateAttributesMapping:Ng})}),yV=b.createContext(void 0),vV={disableStyleElements:!1};function bV(){return b.useContext(yV)??vV}const xV="data-index",SV={...Ng,...ei},wV=b.forwardRef(function(t,s){const{className:i,value:o,render:l,keepMounted:u=!1,style:d,...f}=t,{value:g,getTabIdByPanelValue:m,orientation:h,tabActivationDirection:x,registerMountedTabPanel:S}=lx(),w=$n(),{ref:C,index:E}=Sd(),R=o===g,{mounted:O,transitionStatus:T,setMounted:A}=Za(R),N=!O,j=m(o),D={hidden:N,orientation:h,tabActivationDirection:x,transitionStatus:T},M=b.useRef(null),z=bt("div",t,{state:D,ref:[s,C,M],props:[{"aria-labelledby":j,hidden:N,id:w,role:"tabpanel",tabIndex:R?0:-1,inert:ud(!R),[xV]:E},f],stateAttributesMapping:SV});return bs({open:R,ref:M,onComplete(){R||A(!1)}}),Pe(()=>{if(!(w==null||N&&!u))return S(o,w)},[N,u,o,w,S]),u||O?z:null}),EV=b.forwardRef(function(t,s){const{activateOnFocus:i=!1,className:o,loopFocus:l=!0,render:u,style:d,...f}=t,{orientation:g,setTabMap:m,tabActivationDirection:h}=lx(),[x,S]=b.useState(0),[w,C]=b.useState(null),E=b.useRef(new Set),R=b.useRef(new Set),O=b.useRef(null);Pe(()=>{if(typeof ResizeObserver>"u")return;const M=new ResizeObserver(()=>{E.current.forEach(z=>{z()})});return O.current=M,w&&M.observe(w),R.current.forEach(z=>{M.observe(z)}),()=>{M.disconnect(),O.current=null}},[w]);const T=Be(M=>(E.current.add(M),()=>{E.current.delete(M)})),A=Be(M=>(R.current.add(M),O.current?.observe(M),()=>{R.current.delete(M),O.current?.unobserve(M)})),N={orientation:g,tabActivationDirection:h},j={"aria-orientation":g==="vertical"?"vertical":void 0,role:"tablist"},D=b.useMemo(()=>({activateOnFocus:i,registerIndicatorUpdateListener:T,registerTabResizeObserverElement:A,tabsListElement:w}),[i,T,A,w]);return v.jsx(HM.Provider,{value:D,children:v.jsx(ox,{render:u,className:o,style:d,state:N,refs:[s,C],props:[j,f],stateAttributesMapping:Ng,highlightedIndex:x,enableHomeAndEndKeys:!0,loopFocus:l,orientation:g,onHighlightedIndexChange:S,onMapChange:m,disabledIndices:Ls})})});function RV({className:e,...t}){return v.jsx(pV,{"data-slot":"tabs",className:He("flex flex-col gap-2",e),...t})}function CV({className:e,...t}){return v.jsx(EV,{"data-slot":"tabs-list",className:He("inline-flex h-8 w-fit items-center justify-center rounded-md bg-muted p-0.5 text-muted-foreground",e),...t})}function TV({className:e,...t}){return v.jsx(mV,{"data-slot":"tabs-trigger",className:He("inline-flex h-full flex-1 items-center justify-center gap-1.5 rounded-sm border border-transparent px-2 text-xs font-medium whitespace-nowrap transition-all outline-none hover:text-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:pointer-events-none disabled:opacity-50 data-active:bg-background data-active:text-foreground data-active:shadow-xs [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",e),...t})}function kV({className:e,...t}){return v.jsx(wV,{"data-slot":"tabs-content",className:He("min-h-0 flex-1 outline-none",e),...t})}function OV(){const{t:e}=pt(),[t,s]=b.useState(!1),[i,o]=b.useState(null),l=ti({queryKey:Ar,queryFn:({signal:f})=>bM(f),enabled:t}),u=(l.data??[]).filter(({capabilities:f})=>f.skills),d=u.find(({id:f})=>f===i)??u.find(({id:f})=>f==="chatgpt")??u.at(0);return v.jsxs(Vb,{open:t,onOpenChange:f=>{s(f),f||o(null)},children:[v.jsxs(DA,{render:v.jsx(We,{type:"button",variant:"outline",className:"max-sm:size-7 max-sm:p-0",title:e("skills.inAgents")}),children:[v.jsx(nb,{}),v.jsx("span",{className:`
183
+ sr-only
184
+ sm:not-sr-only
185
+ `,children:e("skills.inAgents")})]}),v.jsxs(Kb,{className:"data-[side=right]:sm:max-w-2xl",children:[v.jsx(jA,{className:"pr-12",children:v.jsx(qb,{children:e("skills.inAgents")})}),v.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-3 px-4 pb-4",children:[l.isPending&&v.jsxs("div",{className:"flex flex-col gap-2","aria-busy":"true",children:[v.jsx(Gn,{className:"h-8 w-full"}),[0,1,2].map(f=>v.jsx(Gn,{className:"h-9 w-full"},f))]}),l.isError&&v.jsxs("div",{role:"alert",className:"flex flex-1 flex-col items-center justify-center",children:[v.jsx(ea,{icon:Uo,title:e("skills.inAgentsLoadError"),className:"flex-none"}),v.jsx(We,{variant:"outline",onClick:()=>{l.refetch()},children:e("common.retry")})]}),l.isSuccess&&u.length===0&&v.jsx(ea,{icon:Uo,title:e("skills.noAgents")}),l.isSuccess&&d&&v.jsxs(RV,{value:d.id,onValueChange:f=>{typeof f=="string"&&o(f)},className:"flex min-h-0 flex-1 flex-col gap-3",children:[v.jsx(CV,{"aria-label":e("skills.inAgents"),className:"grid w-full grid-cols-2",children:u.map(f=>v.jsxs(TV,{value:f.id,className:"w-full",children:[v.jsx(rx,{icon:f.icon,monochrome:d.id!==f.id,className:"size-4 rounded-none bg-transparent"}),v.jsx("span",{children:f.name})]},f.id))}),v.jsx(kV,{value:d.id,className:"flex flex-col",children:v.jsx(AV,{agentId:d.id,enabled:t})})]})]})]})]})}function AV({agentId:e,enabled:t}){const{t:s}=pt(),i=ti({queryKey:BB(e),queryFn:({signal:o})=>FB(e,o),enabled:t});return i.isPending?v.jsx("div",{className:"flex flex-col gap-2","aria-busy":"true",children:[0,1,2].map(o=>v.jsx(Gn,{className:"h-9 w-full"},o))}):i.isError?v.jsxs("div",{role:"alert",className:"flex flex-1 flex-col items-center justify-center",children:[v.jsx(ea,{icon:Uo,title:s("skills.inAgentsLoadError"),className:"flex-none"}),v.jsx(We,{variant:"outline",onClick:()=>{i.refetch()},children:s("common.retry")})]}):i.data.length===0?v.jsx(ea,{icon:Uo,title:s("skills.inAgentsEmptyTitle"),description:s("skills.inAgentsEmptyDescription")}):v.jsx("div",{role:"list",className:"min-h-0 flex-1 overflow-y-auto",children:i.data.map(o=>v.jsx(IM,{skill:o},o.directoryName))})}function MV(){const{t:e}=pt(),[t,s]=b.useState(!1),[i,o]=b.useState(null),[l,u]=b.useState(null),[d,f]=b.useState(null),[g,m]=b.useState([]),h=ag({mutationKey:MM})>0,x=ti({queryKey:Nd,queryFn:({signal:E})=>M9(E)}),S=x.isSuccess?x.data.filter(E=>g.includes(E.name)):[],w=x.isSuccess&&x.data.length>0&&S.length===x.data.length,C=e(w?"skills.deselectAll":"skills.selectAll");return v.jsxs(v.Fragment,{children:[v.jsxs(zA,{children:[S.length>0&&v.jsx(fV,{names:S.map(E=>E.name),onAssigned:()=>m([])}),v.jsxs(We,{type:"button",variant:"outline",className:"max-sm:size-7 max-sm:p-0",title:C,"aria-pressed":w,disabled:h||!x.isSuccess||x.data.length===0,onClick:()=>{x.isSuccess&&m(w?[]:x.data.map(E=>E.name))},children:[v.jsx(PL,{}),v.jsx("span",{className:`
186
+ sr-only
187
+ sm:not-sr-only
188
+ `,children:C})]}),v.jsx(F9,{onCreateManually:()=>{s(!0)}}),v.jsx(OV,{})]}),v.jsxs("div",{className:"flex min-h-0 flex-1 flex-col overflow-y-auto p-4",children:[x.isPending&&v.jsx(Gn,{className:"h-16 w-full"}),x.isError&&v.jsxs("div",{role:"alert",className:"flex flex-1 flex-col items-center justify-center",children:[v.jsx(ea,{icon:Uo,title:e("skills.loadError"),className:"flex-none"}),v.jsx(We,{variant:"outline",onClick:()=>{x.refetch()},children:e("common.retry")})]}),x.isSuccess&&x.data.length===0&&v.jsx(ea,{icon:Uo,title:e("skills.emptyTitle"),description:e("skills.emptyDescription")}),x.isSuccess&&x.data.length>0&&v.jsx("div",{role:"list",children:x.data.map(E=>v.jsx(lV,{skill:E,isSelected:g.includes(E.name),selectionDisabled:h,onSelectedChange:R=>{m(O=>R?[...O,E.name]:O.filter(T=>T!==E.name))},onEdit:()=>o(E),onDelete:()=>u(E),onAssign:()=>f(E)},E.name))})]}),t&&v.jsx(vv,{onClose:()=>{s(!1)}}),i&&v.jsx(vv,{skill:i,onClose:()=>o(null)}),l&&v.jsx(cV,{skill:l,onClose:()=>u(null)}),d&&v.jsx(uV,{skill:d,onClose:()=>f(null)})]})}function hp(e,t){for(const s of e){if(s.path===t)return s;if(!s.children)continue;const i=hp(s.children,t);if(i)return i}}function pp(e,t,s){return e.flatMap(i=>{if(i.path===t){const o=s(i);return o?[o]:[]}return i.children?[{...i,children:pp(i.children,t,s)}]:[i]})}function NV(e,t,s){return t?pp(e,t,i=>i.children?{...i,children:[...i.children,s]}:i):[...e,s]}function DV({files:e,parent:t,kind:s,onCreate:i,onCancel:o}){const{t:l}=pt(),[u,d]=b.useState(""),[f,g]=b.useState(!1),m=b.useRef(null),h=b.useRef(!1),x=b.useId(),S=u.trim(),w=t?`${t}/${S}`:S,C=d9(S)&&!S.includes("/"),E=S!==""&&hp(e,w)!==void 0,R=E?l("skills.fileConflict"):f&&!C?l("skills.invalidEntryName"):null;b.useEffect(()=>{const T=requestAnimationFrame(()=>m.current?.focus());return()=>cancelAnimationFrame(T)},[]);const O=()=>{h.current||(g(!0),!(!C||E)&&(h.current=!0,i(s==="directory"?{path:w,children:[]}:{path:w,content:""})))};return v.jsxs("form",{onSubmit:T=>{T.preventDefault(),O()},onKeyDown:T=>{T.key==="Escape"&&(T.preventDefault(),T.stopPropagation(),h.current=!0,o())},children:[v.jsxs("div",{className:`
189
+ flex h-7 min-w-0 items-center gap-1.5 border-x border-transparent pl-2
190
+ `,children:[v.jsx("span",{className:"size-3 shrink-0"}),s==="directory"?v.jsx(XT,{className:"size-3.5 shrink-0"}):v.jsx(ab,{className:"size-3.5 shrink-0"}),v.jsx(Cd,{ref:m,required:!0,"aria-label":l(s==="directory"?"skills.newFolder":"skills.newFile"),"aria-invalid":!!R,"aria-describedby":R?x:void 0,maxLength:255,value:u,className:"min-w-0 flex-1",onKeyDown:T=>{T.key==="Enter"&&T.nativeEvent.isComposing&&T.preventDefault()},onChange:T=>d(T.target.value),onBlur:()=>{S===""&&!h.current?(h.current=!0,o()):O()}})]}),R&&v.jsx("p",{id:x,role:"alert",className:"mt-1 px-2 text-xs text-destructive",children:R})]})}function jV({entry:e,anchor:t,isOpen:s,onOpenChange:i,onConfirm:o}){const{t:l}=pt(),u=b.useId(),d=b.useId();return v.jsx(gb,{open:s,onOpenChange:i,children:v.jsx(mb,{anchor:t,align:"start","aria-labelledby":u,"aria-describedby":d,finalFocus:()=>t.current?.querySelector("button")??!1,className:"max-w-[calc(100vw-1.5rem)]",children:v.jsxs("div",{className:"flex flex-col gap-3",children:[v.jsx("h2",{id:u,className:"text-sm font-medium",children:l("skills.delete")}),v.jsx("p",{id:d,className:"text-xs wrap-anywhere text-muted-foreground",children:v.jsx(tg,{i18nKey:"skills.deleteEntryDescription",values:{path:e.path},components:{entryPath:v.jsx("code",{className:`
191
+ rounded-sm bg-muted px-1 py-0.5 font-mono wrap-anywhere
192
+ `})}})}),v.jsxs("div",{className:"flex justify-end gap-2",children:[v.jsx(We,{variant:"ghost",onClick:()=>i(!1),children:l("common.cancel")}),v.jsx(We,{variant:"destructive",onClick:o,children:l("skills.delete")})]})]})})})}function gp({entry:e,Item:t,onAction:s}){const{t:i}=pt(),o=e?.path??"";return v.jsxs(v.Fragment,{children:[(!e||e.children)&&v.jsxs(v.Fragment,{children:[v.jsxs(t,{onClick:()=>s({type:"create",parent:o,kind:"file"}),children:[v.jsx(OL,{}),i("skills.newFile")]}),v.jsxs(t,{onClick:()=>s({type:"create",parent:o,kind:"directory"}),children:[v.jsx(ML,{}),i("skills.newFolder")]})]}),e&&e.path!=="SKILL.md"&&v.jsxs(t,{variant:"destructive",onClick:()=>s({type:"delete",entry:e}),children:[v.jsx(cb,{}),i("skills.delete")]})]})}function IV({entry:e,onAction:t,children:s,isActive:i=!1}){const{t:o}=pt(),l=b.useRef(null),[u,d]=b.useState(!1),f=m=>{m.type==="delete"?d(!0):t(m)},g=He(_k({variant:"ghost"}),`
193
+ group/file relative flex w-full min-w-0 justify-start p-0
194
+ data-active:bg-muted data-active:text-foreground
195
+ `);return e?.path==="SKILL.md"?v.jsx("div",{className:g,"data-active":i||void 0,children:s}):v.jsxs(v.Fragment,{children:[v.jsxs(Tg,{children:[v.jsxs(kg,{render:v.jsx("div",{ref:l,className:g,"data-active":i||void 0}),children:[s,v.jsxs(Yo,{children:[v.jsx(Go,{render:v.jsx(We,{variant:"link",size:"icon","aria-label":o("skills.fileActions",{path:e?.path??o("skills.files")}),className:`
196
+ absolute right-0 shrink-0 text-inherit
197
+ data-popup-open:opacity-100
198
+ md:opacity-0
199
+ md:group-focus-within/file:opacity-100
200
+ md:group-hover/file:opacity-100
201
+ [@media(hover:none)]:opacity-100
202
+ `}),children:v.jsx(ib,{})}),v.jsx($o,{align:"end",children:v.jsx(gp,{Item:pc,entry:e,onAction:f})})]})]}),v.jsx(Og,{children:v.jsx(gp,{Item:Ag,entry:e,onAction:f})})]}),e&&v.jsx(jV,{entry:e,anchor:l,isOpen:u,onOpenChange:d,onConfirm:()=>{d(!1),t({type:"delete",entry:e})}})]})}const cx=b.createContext({creation:null,render:()=>null});cx.displayName="InlineEntryContext";function PV({files:e,selectedPath:t,onSelect:s,onOverview:i,onAction:o,onCreate:l,overviewDisabled:u=!1}){const{t:d}=pt(),[f,g]=b.useState(!1),[m,h]=b.useState(null),x=Rb(),S=R=>{u||(R.type==="create"?h(R):(h(null),o(R)))},w=v.jsxs(We,{variant:"ghost",className:`
203
+ shrink-0 justify-start
204
+ md:gap-1.5 md:pl-6.5
205
+ `,"aria-haspopup":"dialog",disabled:u,onClick:()=>{g(!1),i()},children:[v.jsx(vk,{}),v.jsx("span",{children:d("skills.overview")})]}),C=()=>m&&v.jsx(DV,{files:e,parent:m.parent,kind:m.kind,onCancel:()=>h(null),onCreate:R=>{l(R,m.parent),h(null),R.children||g(!1)}},`${m.parent}/${m.kind}`),E=v.jsxs(v.Fragment,{children:[v.jsx(cx,{value:{creation:m,render:C},children:v.jsx(FM,{parent:"",entries:e,selectedPath:t,onSelect:R=>{g(!1),s(R)},onAction:S})}),v.jsxs(Tg,{children:[v.jsx(kg,{render:v.jsx("div",{className:"min-h-16 flex-1"})}),v.jsx(Og,{children:v.jsx(gp,{Item:Ag,onAction:S})})]})]});return v.jsxs(v.Fragment,{children:[v.jsxs("nav",{"aria-label":d("skills.fileNavigation"),className:`
206
+ hidden w-56 shrink-0 flex-col gap-2 overflow-y-auto border-r p-3
207
+ md:flex
208
+ `,children:[w,!x&&E]}),v.jsxs("div",{className:`
209
+ flex shrink-0 items-center gap-2 border-b p-2
210
+ md:hidden
211
+ `,children:[w,v.jsxs(Vb,{open:f,onOpenChange:R=>{g(R),R||h(null)},children:[v.jsxs(DA,{render:v.jsx(We,{variant:"outline"}),children:[v.jsx(AL,{}),v.jsx("span",{children:d("skills.files")})]}),v.jsxs(Kb,{side:"left","aria-describedby":void 0,children:[v.jsx(qb,{className:"sr-only",children:d("skills.fileNavigation")}),v.jsxs("nav",{"aria-label":d("skills.fileNavigation"),className:`
212
+ flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto px-3 pt-14
213
+ pb-3
214
+ `,children:[v.jsxs(Yo,{children:[v.jsxs(Go,{render:v.jsx(We,{variant:"outline",className:"w-full shrink-0 justify-start"}),children:[v.jsx(uc,{}),v.jsx("span",{children:d("skills.newEntry")})]}),v.jsx($o,{align:"start",children:v.jsx(gp,{Item:pc,onAction:S})})]}),E]})]})]})]})]})}function FM({entries:e,parent:t,selectedPath:s,onSelect:i,onAction:o}){const l=b.use(cx),u=e.toSorted((d,f)=>!!d.children==!!f.children?d.path.localeCompare(f.path):d.children?-1:1);return v.jsxs("ul",{className:"min-w-0 shrink-0",children:[l.creation?.parent===t&&v.jsx("li",{children:l.render()}),u.map(d=>v.jsx(LV,{entry:d,selectedPath:s,onSelect:i,onAction:o},d.path))]})}function LV({entry:e,selectedPath:t,onSelect:s,onAction:i}){const[o,l]=b.useState(!0),u=e.children!==void 0;return v.jsxs("li",{className:"min-w-0",children:[v.jsx(IV,{entry:e,isActive:t===e.path,onAction:d=>{d.type==="create"&&l(!0),i(d)},children:v.jsxs("button",{type:"button","aria-current":!u&&t===e.path?"page":void 0,"aria-expanded":u?o:void 0,className:`
215
+ flex h-7 w-full min-w-0 flex-1 items-center gap-1.5 rounded-md pr-9
216
+ pl-2 text-left text-xs font-normal outline-none
217
+ focus-visible:ring-2 focus-visible:ring-ring
218
+ `,onClick:()=>{u?l(!o):s(e.path)},children:[v.jsx("span",{className:"flex size-3 shrink-0 items-center justify-center",children:u&&v.jsx(sb,{className:He("size-3 transition-transform",o&&`
219
+ rotate-90
220
+ `)})}),u?v.jsx(XT,{className:"size-3.5 shrink-0"}):v.jsx(ab,{className:"size-3.5 shrink-0"}),v.jsx("span",{className:"truncate",title:e.path,children:e.path.split("/").at(-1)})]})}),u&&o&&v.jsx("div",{className:"ml-3 border-l pl-1",children:v.jsx(FM,{parent:e.path,entries:e.children,selectedPath:t,onSelect:s,onAction:i})})]})}function zV({skill:e}){const{t}=pt(),s=qo(),i=Ir(),[o,l]=b.useState(!1),[u,d]=b.useState("SKILL.md"),[f,g]=b.useState(e.files),[m,h]=b.useState(e.files),[x,S]=b.useState(!1),w=hp(f,u),C=w?.content??"",E=JSON.stringify(f)!==JSON.stringify(m),R=nr({mutationFn:()=>L9(e.name,f),onSuccess:A=>{g(A.files),h(A.files),i.setQueryData(Po(e.name),A),i.invalidateQueries({queryKey:Nd}),Ft.success(t("skills.contentSaved"))},onError:()=>Ft.error(t("skills.contentSaveError"))}),O=n8(E||R.isPending);X8(b.useCallback(A=>{(E||R.isPending)&&A.preventDefault()},[E,R.isPending]));const T=()=>{E&&!R.isPending&&R.mutate()};return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:`
221
+ flex min-h-0 flex-1 flex-col border-t
222
+ md:flex-row
223
+ `,children:[v.jsx(PV,{files:f,overviewDisabled:R.isPending,selectedPath:u,onSelect:d,onCreate:(A,N)=>{R.isPending||(g(j=>NV(j,N,A)),A.children||d(A.path))},onAction:A=>{if(R.isPending||A.type!=="delete")return;const N=A.entry.path;g(j=>pp(j,N,()=>null)),(u===N||u.startsWith(`${N}/`))&&d("SKILL.md")},onOverview:()=>{E?S(!0):l(!0)}}),v.jsxs("section",{className:"flex min-h-0 min-w-0 flex-1 flex-col","aria-labelledby":"skill-file-title",children:[v.jsxs("header",{className:`
224
+ flex h-10 shrink-0 items-center justify-between gap-2 border-b
225
+ px-4
226
+ `,children:[v.jsx("h1",{id:"skill-file-title",className:"min-w-0 truncate font-mono text-xs font-medium",title:u,children:u}),v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("span",{role:"status",className:"text-xs text-muted-foreground",children:t(R.isPending?"skills.contentSaving":E?"skills.unsavedChanges":"skills.allChangesSaved")}),v.jsxs(We,{disabled:!E||R.isPending,onClick:T,children:[R.isPending?v.jsx(Kr,{className:"animate-spin"}):v.jsx(lb,{}),v.jsx("span",{children:t("skills.saveContent")})]})]})]}),v.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:w?.content===null?v.jsx(ea,{title:t("skills.fileNotEditable")}):v.jsx(TM,{height:"100%",path:`foundry://skills/${encodeURIComponent(e.name)}/${u.split("/").map(A=>encodeURIComponent(A)).join("/")}`,value:C,ariaLabel:t("skills.fileEditor",{file:u}),placeholder:u==="SKILL.md"?t("skills.contentPlaceholder"):"",readOnly:R.isPending,showLineNumbers:!0,onChange:A=>g(N=>pp(N,u,j=>({path:j.path,content:A}))),onSave:T},u)})]})]}),o&&v.jsx(vv,{skill:e,onClose:()=>l(!1),onSaved:A=>{A.name===e.name?i.query({queryKey:Po(e.name),queryFn:({signal:N})=>kM(e.name,N)}).then(N=>{g(N.files),h(N.files)}).catch(()=>Ft.error(t("skills.loadError"))):s(`/library/skills/${encodeURIComponent(A.name)}`,{replace:!0})}}),v.jsx(Ti,{open:O.state==="blocked"||x,onOpenChange:A=>{A||(O.reset?.(),S(!1))},children:v.jsxs(ki,{showCloseButton:!1,children:[v.jsxs(Ws,{children:[v.jsx(Js,{children:t("skills.leaveTitle")}),v.jsx(Ei,{children:t("skills.leaveDescription")})]}),v.jsxs(wi,{children:[v.jsx(We,{variant:"ghost",onClick:()=>{O.reset?.(),S(!1)},children:t("skills.keepEditing")}),v.jsx(We,{variant:"destructive",disabled:R.isPending,onClick:()=>{g(m),hp(m,u)||d("SKILL.md"),x?(l(!0),S(!1)):O.proceed?.()},children:t("skills.discardChanges")})]})]})})]})}function _V(){const{t:e}=pt(),{name:t=""}=q6(),s=ti({queryKey:Po(t),queryFn:({signal:i})=>kM(t,i),retry:(i,o)=>!(o instanceof $a&&o.code==="SKILL_NOT_FOUND")&&i<2});if(s.isPending)return v.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-4 p-4","aria-busy":"true",children:[v.jsx(Gn,{className:"h-7 w-48"}),v.jsx(Gn,{className:"min-h-24 flex-1"})]});if(s.isError&&s.data===void 0){const i=s.error instanceof $a&&s.error.code==="SKILL_NOT_FOUND";return v.jsxs("div",{role:"alert",className:"flex flex-1 flex-col items-center justify-center p-4",children:[v.jsx(ea,{icon:Uo,title:e(i?"skills.notFound":"skills.loadError"),className:"flex-none"}),v.jsxs("div",{className:"flex gap-2",children:[v.jsx(We,{variant:"outline",render:v.jsx(xd,{to:"/library/skills"}),children:e("skills.backToSkills")}),!i&&v.jsx(We,{onClick:()=>{s.refetch()},children:e("common.retry")})]})]})}return v.jsx(zV,{skill:s.data},s.data.name)}function Ja({label:e,description:t,children:s,className:i,controlClassName:o}){return v.jsxs("div",{className:He(`
227
+ flex flex-col items-start gap-3 p-4
228
+ min-[680px]:min-h-16 min-[680px]:flex-row min-[680px]:items-center
229
+ min-[680px]:justify-between min-[680px]:gap-8
230
+ `,i),children:[v.jsxs("div",{className:"min-w-0",children:[v.jsx("div",{className:"text-sm font-medium",children:e}),t&&v.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:t})]}),v.jsx("div",{className:He(`
231
+ min-w-0
232
+ max-[680px]:w-full
233
+ min-[680px]:shrink-0
234
+ `,o),children:s})]})}function UV({configFolder:e}){const{t}=pt(),s=b.useRef(null),i=nr({mutationFn:async f=>{await navigator.clipboard.writeText(f)},onSuccess:()=>{Ft.success(t("settings.configFolderCopied"))},onError:()=>{Ft.error(t("settings.errors.copyConfigFolder"))}}),o=nr({mutationFn:h_,onError:()=>{Ft.error(t("settings.errors.openConfigFolder"))}}),l=i.isSuccess&&i.variables===e,u=!e||i.isPending||o.isPending,d=t(l?"settings.configFolderCopied":"settings.copyConfigFolder");return v.jsx(Ja,{label:t("settings.configFolder"),controlClassName:"min-[680px]:shrink",children:v.jsxs("div",{className:`
235
+ flex min-w-0 items-center justify-end gap-2
236
+ max-[680px]:justify-start
237
+ `,children:[e&&v.jsx("span",{className:`
238
+ min-w-0 font-mono text-xs break-all text-muted-foreground
239
+ select-text
240
+ `,children:e}),v.jsx(We,{type:"button",variant:"ghost",size:"icon","aria-label":d,title:d,disabled:u,"aria-busy":i.isPending,onClick:()=>{!e||u||(s.current&&clearTimeout(s.current),i.mutate(e,{onSuccess:()=>{s.current=setTimeout(()=>i.reset(),2e3)}}))},children:l?v.jsx(dd,{}):v.jsx(IT,{})}),v.jsxs(We,{type:"button",variant:"outline",disabled:u,"aria-busy":o.isPending,onClick:()=>{u||o.mutate()},children:[o.isPending?v.jsx(Kr,{className:"animate-spin"}):v.jsx(GT,{}),v.jsx("span",{children:t("settings.openFolder")})]})]})})}function HV({onClose:e}){const{t}=pt(),s=Ir(),i=b.useId(),[o,l]=b.useState(["agents"]),u=ti({queryKey:["skill-targets"],queryFn:({signal:f})=>p_(f),retry:!1}),d=nr({mutationFn:g_,onSuccess:()=>{s.invalidateQueries({queryKey:iO}),Ft.success(t("settings.skillDownloaded")),e()},onError:()=>Ft.error(t("settings.errors.downloadSkill"))});return v.jsx(Ti,{open:!0,onOpenChange:f=>{!f&&!d.isPending&&e()},children:v.jsxs(ki,{showCloseButton:!1,children:[v.jsxs("form",{className:"flex flex-col gap-4","aria-busy":d.isPending,onSubmit:f=>{f.preventDefault(),o.length>0&&u.isSuccess&&!d.isPending&&d.mutate({targets:o})},children:[v.jsxs(Ws,{children:[v.jsx(Js,{children:t("settings.downloadSkill")}),v.jsx(Ei,{children:t("settings.downloadSkillDescription")})]}),v.jsxs("div",{className:"flex flex-col gap-2",children:[v.jsx(ta,{id:i,children:t("settings.skillTargets")}),u.isPending&&v.jsxs("div",{className:"space-y-2",children:[v.jsx(Gn,{className:"h-12 w-full"}),v.jsx(Gn,{className:"h-12 w-full"})]}),u.isError&&v.jsx(We,{type:"button",variant:"outline",disabled:u.isFetching,onClick:()=>{u.refetch()},children:t("common.retry")}),u.data&&v.jsx("div",{role:"group","aria-labelledby":i,"aria-required":"true",className:"flex flex-col gap-2",children:u.data.targets.map(({target:f,destination:g})=>v.jsxs(SM,{className:"flex items-start gap-3 rounded-lg border p-3",children:[v.jsx(jM,{checked:o.includes(f),disabled:d.isPending,onCheckedChange:m=>{l(h=>m?[...h,f]:h.filter(x=>x!==f))}}),v.jsxs("span",{className:"flex min-w-0 flex-col gap-1",children:[v.jsx("span",{children:f==="agents"?".agents":".claude"}),v.jsx("span",{className:`
241
+ font-mono text-xs font-normal break-all
242
+ text-muted-foreground
243
+ `,children:g})]})]},f))})]}),v.jsxs(wi,{children:[v.jsx(We,{type:"button",variant:"ghost",disabled:d.isPending,onClick:e,children:t("common.cancel")}),v.jsxs(We,{type:"submit",disabled:o.length===0||!u.isSuccess||d.isPending,children:[d.isPending?v.jsx(Kr,{className:"animate-spin"}):v.jsx(Jp,{}),v.jsx("span",{children:t(d.isPending?"settings.downloadingSkill":"settings.downloadSkill")})]})]})]}),v.jsxs(Md,{disabled:d.isPending,render:v.jsx(We,{variant:"ghost",size:"icon",className:"absolute top-2 right-2"}),children:[v.jsx(ra,{}),v.jsx("span",{className:"sr-only",children:t("a11y.close")})]})]})})}function FV({disabled:e=!1}){const{t}=pt(),[s,i]=b.useState(!1);return v.jsxs(Ja,{label:v.jsxs("span",{className:"flex items-center gap-1",children:[t("settings.downloadSkill"),v.jsxs(Jh,{children:[v.jsx(ep,{render:v.jsx(We,{type:"button",variant:"ghost",size:"icon",className:"shrink-0 text-muted-foreground","aria-label":t("settings.aboutFoundrySkill")}),children:v.jsx(RL,{})}),v.jsx(tp,{children:t("settings.foundrySkillHint")})]})]}),children:[v.jsxs(We,{type:"button",variant:"outline",disabled:e,onClick:()=>i(!0),children:[v.jsx(Jp,{}),t("settings.downloadSkill")]}),s&&v.jsx(HV,{onClose:()=>i(!1)})]})}function BV({className:e,...t}){return v.jsx("div",{"data-slot":"input-group",role:"group",className:He("group/input-group relative flex h-7 w-full min-w-0 items-center rounded-md border border-input bg-input/20 transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-data-[align=block-end]:rounded-md has-data-[align=block-start]:rounded-md has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-2 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/30 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-2 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[textarea]:rounded-md has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",e),...t})}const VV=Bo("flex h-auto cursor-text items-center justify-center gap-1 py-2 text-xs/relaxed font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 **:data-[slot=kbd]:rounded-[calc(var(--radius-sm)-2px)] **:data-[slot=kbd]:bg-muted-foreground/10 **:data-[slot=kbd]:px-1 **:data-[slot=kbd]:text-[0.625rem] [&>svg:not([class*='size-'])]:size-3.5",{variants:{align:{"inline-start":"order-first pl-2 has-[>button]:ml-[-0.275rem] has-[>kbd]:ml-[-0.275rem]","inline-end":"order-last pr-2 has-[>button]:mr-[-0.275rem] has-[>kbd]:mr-[-0.275rem]","block-start":"order-first w-full justify-start px-2 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}});function KV({className:e,align:t="inline-start",...s}){return v.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:He(VV({align:t}),e),onClick:i=>{i.target.closest("button")||i.currentTarget.parentElement?.querySelector("input")?.focus()},...s})}const qV=Bo("flex items-center gap-2 rounded-md text-xs/relaxed shadow-none",{variants:{size:{xs:"h-5 gap-1 rounded-[calc(var(--radius-sm)-2px)] px-1 [&>svg:not([class*='size-'])]:size-3",sm:"gap-1","icon-xs":"size-6 p-0 has-[>svg]:p-0","icon-sm":"size-7 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});function YV({className:e,type:t="button",variant:s="ghost",size:i="xs",...o}){return v.jsx(We,{type:t,"data-size":i,variant:s,className:He(qV({size:i}),e),...o})}function GV({className:e,...t}){return v.jsx(Cd,{"data-slot":"input-group-control",className:He("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",e),...t})}function Sv({id:e,disabled:t,...s}){const{t:i}=pt(),o=b.useId(),l=e??o,[u,d]=b.useState(!1),f=i(u?"a11y.hidePassword":"a11y.showPassword");return v.jsxs(BV,{"data-disabled":t,children:[v.jsx(GV,{...s,id:l,type:u?"text":"password",disabled:t}),v.jsx(KV,{align:"inline-end",children:v.jsx(YV,{type:"button",size:"icon-xs","aria-label":f,"aria-controls":l,title:f,disabled:t,onClick:()=>d(g=>!g),children:u?v.jsx(TL,{}):v.jsx(kL,{})})})]})}function $V(e,t){const s=URL.createObjectURL(e),i=document.createElement("a");i.href=s,i.download=t,document.body.append(i),i.click(),i.remove(),setTimeout(()=>URL.revokeObjectURL(s),1e3)}async function QV(e){const t=await fetch("/api/data-export",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error("Unable to export data");const s=t.headers.get("content-disposition")??"",i=/filename="([^"]+)"/u.exec(s)?.[1]??"foundry.foundry-backup";$V(await t.blob(),i)}function XV({onClose:e}){const{t}=pt(),s=b.useId(),i=b.useId(),[o,l]=b.useState(""),[u,d]=b.useState(""),f=nr({mutationFn:QV,onSuccess:()=>{Ft.success(t("dataExport.exported")),e()},onError:()=>{Ft.error(t("dataExport.error"))}});return v.jsx(Ti,{open:!0,onOpenChange:g=>{!g&&!f.isPending&&e()},children:v.jsxs(ki,{showCloseButton:!1,children:[v.jsxs("form",{className:"flex flex-col gap-4","aria-busy":f.isPending,onSubmit:g=>{if(g.preventDefault(),!(!o||!u||f.isPending)){if(o!==u){Ft.error(t("dataExport.passphraseMismatch"));return}f.mutate({passphrase:o})}},children:[v.jsxs(Ws,{children:[v.jsx(Js,{children:t("dataExport.title")}),v.jsx(Ei,{children:t("dataExport.description")})]}),v.jsxs("div",{className:"flex flex-col gap-2",children:[v.jsx(ta,{htmlFor:s,children:t("dataExport.passphrase")}),v.jsx(Sv,{id:s,autoComplete:"new-password",required:!0,value:o,disabled:f.isPending,onChange:g=>l(g.target.value)})]}),v.jsxs("div",{className:"flex flex-col gap-2",children:[v.jsx(ta,{htmlFor:i,children:t("dataExport.confirmPassphrase")}),v.jsx(Sv,{id:i,autoComplete:"new-password",required:!0,value:u,disabled:f.isPending,"aria-invalid":u.length>0&&o!==u,onChange:g=>d(g.target.value)})]}),v.jsxs("p",{className:"flex items-start gap-2 text-xs text-muted-foreground",children:[v.jsx(LL,{className:"size-4 shrink-0"}),v.jsx("span",{children:t("dataExport.passphraseHint")})]}),v.jsxs(wi,{children:[v.jsx(We,{type:"button",variant:"ghost",disabled:f.isPending,onClick:e,children:t("common.cancel")}),v.jsxs(We,{type:"submit",disabled:!o||!u||f.isPending,children:[f.isPending?v.jsx(Kr,{className:"animate-spin"}):v.jsx(BT,{}),v.jsx("span",{children:t(f.isPending?"dataExport.exporting":"dataExport.action")})]})]})]}),v.jsxs(Md,{disabled:f.isPending,render:v.jsx(We,{variant:"ghost",size:"icon",className:"absolute top-2 right-2"}),children:[v.jsx(ra,{}),v.jsx("span",{className:"sr-only",children:t("a11y.close")})]})]})})}function ZV({disabled:e=!1}){const{t}=pt(),[s,i]=b.useState(!1);return v.jsxs(Ja,{label:t("settings.export"),children:[v.jsxs(We,{type:"button",variant:"outline",disabled:e,onClick:()=>i(!0),children:[v.jsx(BT,{}),t("settings.export")]}),s&&v.jsx(XV,{onClose:()=>i(!1)})]})}class ux extends Error{constructor(t){super(t),this.code=t}code}async function WV(e,t){const s=await fetch("/api/data-import",{method:"POST",headers:{"content-type":"application/octet-stream","x-foundry-passphrase":encodeURIComponent(t)},body:e});return await BM(s),s.json()}async function JV(e){const t=await fetch("/api/data-import/agents",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)});await BM(t)}async function BM(e){if(e.ok)return;let t="IMPORT_FAILED";try{const i=(await e.json()).error?.code;(i==="INVALID_BACKUP"||i==="INVALID_PASSPHRASE"||i==="IMPORT_CHANGED"||i==="AGENT_APPLY_FAILED")&&(t=i)}catch{}throw new ux(t)}function eK({file:e,onClose:t}){const{t:s}=pt(),i=b.useId(),[o,l]=b.useState(""),u=nr({mutationFn:()=>WV(e,o),onSuccess:()=>l(""),onError:h=>Ft.error(s(Dy(h)))}),d=nr({mutationFn:h=>JV({apply:h,agentRevision:u.data.agentRevision}),onSuccess:()=>location.replace(`${location.pathname}${location.search}`),onError:h=>Ft.error(s(Dy(h)))}),f=u.isPending||d.isPending||d.isSuccess,g=d.error instanceof ux&&d.error.code==="IMPORT_CHANGED",m=()=>{f||(g?location.replace(`${location.pathname}${location.search}`):u.isSuccess?d.mutate(!1):t())};return v.jsx(Ti,{open:!0,onOpenChange:h=>{h||m()},children:v.jsxs(ki,{showCloseButton:!1,children:[u.isSuccess?v.jsxs("div",{className:"flex flex-col gap-4","aria-busy":f,children:[v.jsxs(Ws,{children:[v.jsx(Js,{children:s("dataImport.applyTitle")}),v.jsx(Ei,{children:s("dataImport.applyDescription")})]}),d.isError&&v.jsx("p",{role:"alert",className:"text-sm text-destructive",children:s(Dy(d.error))}),v.jsxs(wi,{children:[v.jsx(We,{type:"button",variant:"ghost",disabled:f,onClick:m,children:s("dataImport.skipAgents")}),v.jsxs(We,{type:"button",disabled:f||g,onClick:()=>d.mutate(!0),children:[d.isPending&&v.jsx(Kr,{className:"animate-spin"}),v.jsx("span",{children:s("dataImport.applyAgents")})]})]})]}):v.jsxs("form",{className:"flex flex-col gap-4","aria-busy":f,onSubmit:h=>{h.preventDefault(),!f&&o&&u.mutate()},children:[v.jsxs(Ws,{children:[v.jsx(Js,{children:s("dataImport.title")}),v.jsx(Ei,{className:"break-all",children:e.name})]}),v.jsxs("div",{className:"flex flex-col gap-2",children:[v.jsx(ta,{htmlFor:i,children:s("dataImport.passphrase")}),v.jsx(Sv,{id:i,autoComplete:"current-password",required:!0,value:o,disabled:f,onChange:h=>l(h.target.value)})]}),v.jsx("p",{className:"text-xs text-muted-foreground",children:s("dataImport.replaceWarning")}),v.jsxs(wi,{children:[v.jsx(We,{type:"button",variant:"ghost",disabled:f,onClick:m,children:s("common.cancel")}),v.jsxs(We,{type:"submit",variant:"destructive",disabled:f||!o,children:[f?v.jsx(Kr,{className:"animate-spin"}):v.jsx(HT,{}),v.jsx("span",{children:s("dataImport.replaceAction")})]})]})]}),v.jsxs(We,{type:"button",disabled:f,onClick:m,variant:"ghost",size:"icon",className:"absolute top-2 right-2",children:[v.jsx(ra,{}),v.jsx("span",{className:"sr-only",children:s("a11y.close")})]})]})})}function Dy(e){if(e instanceof ux)switch(e.code){case"IMPORT_CHANGED":return"dataImport.changed";case"AGENT_APPLY_FAILED":return"dataImport.applyError";case"INVALID_BACKUP":return"dataImport.invalidBackup";case"INVALID_PASSPHRASE":return"dataImport.invalidPassphrase"}return"dataImport.error"}function tK({disabled:e=!1}){const{t}=pt(),s=b.useRef(null),[i,o]=b.useState(null);return v.jsxs(Ja,{label:t("settings.import"),children:[v.jsx("input",{ref:s,type:"file",accept:".foundry-backup,application/octet-stream",hidden:!0,onChange:l=>{o(l.target.files?.[0]??null),l.target.value=""}}),v.jsxs(We,{type:"button",variant:"outline",disabled:e,onClick:()=>s.current?.click(),children:[v.jsx(HT,{}),t("settings.import")]}),i&&v.jsx(eK,{file:i,onClose:()=>o(null)})]})}const nK="data-checked",rK="data-unchecked",wv={checked(e){return e?{[nK]:""}:{[rK]:""}},...ei,...gc},VM=b.createContext(void 0);function sK(){return b.useContext(VM)}const KM=b.createContext(void 0);function iK(){const e=b.useContext(KM);if(e===void 0)throw new Error(cn(52));return e}const aK=b.forwardRef(function(t,s){const{render:i,className:o,disabled:l=!1,readOnly:u=!1,required:d=!1,"aria-labelledby":f,value:g,inputRef:m,nativeButton:h=!1,id:x,style:S,...w}=t,C=sK(),{disabled:E,readOnly:R,required:O,form:T,checkedValue:A,touched:N=!1,validation:j,name:D,setCheckedValue:M=En,setTouched:z=En,registerInputRef:L=En}=C??{},{setTouched:K,setFilled:X,state:B,disabled:H}=ia(),U=wA(),{labelId:_,getDescriptionProps:Q}=Qo(),$=H||U.disabled||E||l,q=R||u,Y=O||d,ee=T,G=C?A===g:g==="",ae=b.useRef(null),I=Ed($,ae),F=b.useRef(null),Z=j?.registerInput,ne=b.useCallback(Ze=>Z?.(Ze,{controlRef:ae,value:void 0}),[Z]),ye=es(m,F,L,ne);Pe(()=>{F.current?.checked&&X(!0)},[X]),Pe(()=>{if(F.current){if($&&G){L(null);return}L(F.current)}},[G,$,L]);const se=$n(),ge=mc({id:x}),fe=h?void 0:ge,ce=Bb(f,_,F,!h,fe,w["aria-label"]),Re={role:"radio","aria-checked":G,"aria-labelledby":ce,[Mg]:G?"":void 0,id:h?ge:se,onKeyDown(Ze){Ze.key==="Enter"&&Ze.preventDefault()},onClick(Ze){if(Ze.defaultPrevented||$||q)return;Ze.preventDefault();const ot=F.current;ot&&Io(ot,Ze)},onFocus(Ze){I(!0),!(Ze.defaultPrevented||$||q||!N)&&(F.current?.click(),z(!1))},onBlur(){C||I(!1)}},{getButtonProps:be,buttonRef:Le}=ns({disabled:$,native:h,composite:!1}),Oe={type:"radio",ref:ye,form:ee,id:fe,name:D,tabIndex:-1,style:D?Ap:id,"aria-hidden":!0,...g!==void 0?{value:ap(g)}:Xt,disabled:$,checked:G,required:Y,readOnly:q,onChange(Ze){if(Ze.nativeEvent.defaultPrevented||$||q||g===void 0)return;const ot=lt(Cr,Ze.nativeEvent);M(g,ot),!ot.isCanceled&&K(!0)},onClick(Ze){Ze.stopPropagation()},onFocus(){ae.current?.focus()}},ze=b.useMemo(()=>({...B,required:Y,disabled:$,readOnly:q,checked:G}),[B,$,q,G,Y]),Ve=ze,ke=C!==void 0,Ue=[s,ae,Le],xe=[Re,w,be,Q,j?Ze=>j.getValidationProps($,Ze):Xt],Fe=bt("span",t,{enabled:!ke,state:ze,ref:Ue,props:xe,stateAttributesMapping:wv});return v.jsxs(KM.Provider,{value:Ve,children:[ke?v.jsx(Ub,{tag:"span",render:i,className:o,style:S,state:ze,refs:Ue,props:xe,stateAttributesMapping:wv}):Fe,v.jsx("input",{...Oe,suppressHydrationWarning:!0})]})}),oK=b.forwardRef(function(t,s){const{render:i,className:o,style:l,keepMounted:u=!1,...d}=t,f=iK(),g=f.checked,{mounted:m,transitionStatus:h,setMounted:x}=Za(g),S={...f,transitionStatus:h},w=b.useRef(null),C=u||m,E=bt("span",t,{ref:[s,w],state:S,props:d,stateAttributesMapping:wv});return bs({batch:!0,enabled:!g,open:g,ref:w,onComplete(){g||x(!1)}}),C?E:null}),lK=[Yk],cK=b.forwardRef(function(t,s){const{render:i,className:o,disabled:l,readOnly:u,required:d,onValueChange:f,value:g,defaultValue:m,form:h,name:x,inputRef:S,id:w,style:C,...E}=t,{setTouched:R,setFocused:O,validationMode:T,name:A,disabled:N,state:j,validation:D,setDirty:M,setFilled:z,validityData:L}=ia(),{labelId:K}=Qo(),{clearErrors:X,elementRef:B}=wd(),H=kH(!0),U=N||l,_=A??x,Q=$n(w),[$,q]=Si({controlled:g,default:m,name:"RadioGroup",state:"value"}),[Y,ee]=b.useState(!1),G=Be((Oe,ze)=>{f?.(Oe,ze),!ze.isCanceled&&q(Oe)}),ae=D.getInputControl,I=b.useMemo(()=>({get current(){return ae()}}),[ae]),F=b.useRef(null),Z=b.useRef(null),ne=es(F,S),ye=b.useRef(ne),se=Be(Oe=>{F.current===Oe&&ye.current===ne||(ye.current=ne,ne?.(Oe))});Pe(()=>{se(F.current)},[ne,se]);const ge=Be(Oe=>{if(Oe){if(!Oe.disabled){Z.current||(Z.current=Oe);const ze=F.current;(Oe.checked||ze==null||ze.disabled)&&se(Oe)}return()=>{Z.current===Oe&&(Z.current=null),F.current===Oe&&se(null)}}}),fe=Be(()=>{const Oe=B.current;if(!Oe)return $??null;for(const ze of D.registeredInputs.keys())if(ze.checked&&DH(ze,Oe))return $??null;return null});Rd(I,Q,$??null,fe,!U,x),dc($,()=>{X(_),M($!==L.initialValue),z($!=null),D.change($);const Oe=Z.current;$==null&&Oe&&!Oe.disabled&&se(Oe)});const ce=K??H?.legendId,Re={...j,disabled:U??!1,required:d??!1,readOnly:u??!1},be=b.useMemo(()=>({checkedValue:$,disabled:U,form:h,validation:D,name:_,readOnly:u,registerInputRef:ge,required:d,setCheckedValue:G,setTouched:ee,touched:Y}),[$,U,h,D,_,u,ge,d,G,ee,Y]),Le={id:w,role:"radiogroup","aria-required":d||void 0,"aria-disabled":U||void 0,"aria-readonly":u||void 0,"aria-labelledby":ce,onBlur(Oe){st(Oe.currentTarget,Oe.relatedTarget)||(ee(!1),R(!0),O(!1),T==="onBlur"&&D.commit($))},onKeyDownCapture(Oe){Oe.key.startsWith("Arrow")&&ee(!0)}};return v.jsx(VM.Provider,{value:be,children:v.jsx(ox,{render:i,className:o,style:C,state:Re,props:[Le,E,Oe=>D.getValidationProps(U??!1,Oe)],refs:[s],stateAttributesMapping:gc,enableHomeAndEndKeys:!1,modifierKeys:lK})})});function uK({className:e,...t}){return v.jsx(cK,{"data-slot":"radio-group",className:He("grid w-full gap-3",e),...t})}function dK({className:e,...t}){return v.jsx(aK,{"data-slot":"radio-group-item",className:He("group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none group-has-focus-visible/field-label:ring-0 group-has-focus-visible/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 dark:data-checked:bg-primary",e),...t,children:v.jsx(oK,{"data-slot":"radio-group-indicator",className:"flex size-4 items-center justify-center",children:v.jsx("span",{className:"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground"})})})}const fK=[{value:"system",labelKey:"common.system"},{value:"light",labelKey:"theme.light"},{value:"dark",labelKey:"theme.dark"}];function hK({value:e,onValueChange:t,disabled:s=!1}){const{t:i}=pt();return v.jsx(Ja,{label:i("settings.colorTheme"),children:v.jsx(uK,{"aria-label":i("settings.colorTheme"),value:e,onValueChange:t,disabled:s,"aria-busy":s,className:"flex w-auto flex-row flex-wrap items-center gap-x-6 gap-y-2",children:fK.map(o=>v.jsxs("label",{className:He("flex items-center gap-2 text-sm select-none",o.value===e?"font-medium text-foreground":"text-muted-foreground",s?"cursor-not-allowed opacity-60":"cursor-pointer"),children:[v.jsx(dK,{value:o.value,disabled:s}),v.jsx("span",{children:i(o.labelKey)})]},o.value))})})}function pK(e){const t=b.useRef(!0);t.current&&(t.current=!1,e())}const qM=b.createContext(void 0),YM=b.createContext(void 0);function Ai(){const e=b.useContext(qM);if(e===void 0)throw new Error(cn(60));return e}function GM(){const e=b.useContext(YM);if(e===void 0)throw new Error(cn(61));return e}function gK(e,t,s=Object.is){const{length:i}=e;if(i!==t.length)return!1;for(let o=0;o<i;o+=1)if(!s(e[o],t[o]))return!1;return!0}const $M=(e,t)=>Object.is(e,t);function Fo(e,t,s){return e==null||t==null?Object.is(e,t):s(e,t)}function mK(e,t,s){return Array.isArray(e)&&Array.isArray(t)?!gK(e,t,(i,o)=>Fo(i,o,s)):e!==t}function Ev(e,t,s){return e?e.some(i=>i===void 0?!1:Fo(t,i,s)):!1}function Uh(e,t,s){return e?e.findIndex(i=>i===void 0?!1:Fo(i,t,s)):-1}function yK(e,t){if(t!==$M)return i=>Ev(e,i,t);const s=new Set(e);return s.delete(void 0),i=>s.has(i)&&(i!==0||e.some(o=>Object.is(i,o)))}function QM(e,t,s,i){const o=i&&Array.isArray(t)?e.findIndex(yK(t,s)):Uh(e,t,s);return o===-1?null:o}function vK(e,t,s,i,o,l){return Ev(i,t,o)?l!=null&&e>l&&Ev(i,s[l],o)?l:e:e===l?QM(s,i,o,!0):l}function bK(e,t,s){return e.filter(i=>!Fo(t,i,s))}const xK={id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,multiple:e=>e.multiple,disabled:e=>e.disabled,readOnly:e=>e.readOnly,required:e=>e.required,highlightItemOnHover:e=>e.highlightItemOnHover,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{const{value:t,multiple:s,itemToStringValue:i}=e;return t==null?!1:s&&Array.isArray(t)?t.length>0:Bl(t,i)!==""},hasNullItemLabel:(e,t)=>t?gH(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{const s=e.isItemEqualToValue,i=e.value;return e.multiple?Array.isArray(i)&&i.some(o=>Fo(t,o,s)):Fo(t,i,s)},isSelectedByFocus:(e,t)=>e.selectedIndex===t,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,itemRoot:e=>e.itemRoot,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows};function ku(e,t=Number.MIN_SAFE_INTEGER,s=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,s))}const $s=1;function dx(e,t){return Math.max(0,e-t)}function mp(e,t){if(t<=0)return 0;const s=ku(e,0,t),i=s,o=t-s,l=i<=$s,u=o<=$s;return l&&u?i<=o?0:t:l?0:u?t:s}function SK(e){const{id:t,value:s,defaultValue:i=null,onValueChange:o,open:l,defaultOpen:u=!1,onOpenChange:d,name:f,form:g,autoComplete:m,disabled:h=!1,readOnly:x=!1,required:S=!1,modal:w=!0,actionsRef:C,inputRef:E,onOpenChangeComplete:R,items:O,multiple:T=!1,itemToStringLabel:A,itemToStringValue:N,isItemEqualToValue:j=$M,highlightItemOnHover:D=!0,children:M}=e,{clearErrors:z}=wd(),{setDirty:L,setTouched:K,setFocused:X,validityData:B,setFilled:H,name:U,disabled:_,validation:Q,validationMode:$}=ia(),q=mc({id:t}),Y=_||h,ee=U??f,[G,ae]=Si({controlled:s,default:T?i??Ls:i,name:"Select",state:"value"}),[I,F]=Si({controlled:l,default:u,name:"Select",state:"open"}),Z=b.useRef([]),ne=b.useRef([]),ye=b.useRef(null),se=b.useRef(null),ge=b.useRef(0),fe=b.useRef(null),ce=b.useRef([]),Re=b.useRef(!1),be=b.useRef(null),Le=b.useRef(null),Oe=b.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),ze=b.useRef(!1),Ve=b.useRef(G),{openMethod:ke,triggerProps:Ue}=Fk(I),xe=rr(()=>new cc({id:q,labelId:void 0,modal:w,multiple:T,disabled:Y,readOnly:x,required:S,highlightItemOnHover:D,itemToStringLabel:A,itemToStringValue:N,isItemEqualToValue:j,value:G,open:I,mounted:I,transitionStatus:void 0,items:O,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:Xt,triggerProps:Xt,itemRoot:{props:Xt,multiple:T,disabled:Y,readOnly:x,isItemEqualToValue:j},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1},{setValue:En,setOpen:En,handleScrollArrowVisibility:En,onOpenChangeComplete:En,listRef:Z,popupRef:ye,scrollHandlerRef:se,scrollArrowsMountedCountRef:ge,valueRef:fe,valuesRef:ce,labelsRef:ne,typingRef:Re,selectionRef:Oe,firstItemTextRef:be,selectedItemTextRef:Le,alignItemWithTriggerActiveRef:ze,initialValueRef:Ve},xK)).current,[Fe,Ze]=b.useState(!1),{mounted:ot,transitionStatus:de,forceUnmount:Ee}=QC({open:I,ref:ye,preventUnmountOnClose:Fe,setPreventUnmountOnClose:Ze,onUnmount(){xe.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),R?.(!1)}}),Ge=xe.useState("activeIndex"),Me=xe.useState("selectedIndex"),De=xe.useState("triggerElement"),xt=xe.useState("positionerElement"),dt=nP(ke),gt=ke??dt,Nt=b.useMemo(()=>T?"":Bl(G,N),[T,G,N]),jt=b.useMemo(()=>T&&Array.isArray(G)?G.map(V=>Bl(V,N)):Bl(G,N),[T,G,N]),tn=Ln(De),an=Be(()=>jt);Rd(tn,q,G,an,!Y,f);const nn=T?Array.isArray(G)&&G.length>0:G!=null&&Nt!=="";Pe(()=>{H(nn)},[nn,H]),Pe(function(){const J=QM(ce.current,G,j,T);J===null&&(Le.current=null),!I&&xe.set("selectedIndex",J)},[T,I,G,j,xe]),dc(G,()=>{z(ee),L(mK(G,B.initialValue,j)),Q.change(G)});const et=Be((V,J)=>{const re=J,ve=Up(re);d?.(V,re),!J.isCanceled&&(V||Ze(ve()),F(V),!V&&(J.reason===Ba||J.reason===Op)&&(K(!0),X(!1),$==="onBlur"&&Q.commit(G)))});b.useImperativeHandle(C,()=>({unmount:Ee,close:()=>{xe.state.open&&et(!1,lt(sd))}}),[Ee,et,xe]);const Et=Be((V,J)=>{o?.(V,J),!J.isCanceled&&ae(V)}),Zt=Be(V=>{const J=dx(V.scrollHeight,V.clientHeight),re=mp(V.scrollTop,J),ve=re>0,Se=re<J;xe.set("scrollUpArrowVisible",ve),xe.set("scrollDownArrowVisible",Se)}),ht=_I({open:I,onOpenChange:et,elements:{reference:De,floating:xt}}),St=Pp(ht,{enabled:!Y,event:"mousedown"}),yt=ad(ht),Ut=sT(ht,{enabled:!Y,listRef:Z,activeIndex:Ge,selectedIndex:Me,disabledIndices:Ls,onNavigate(V){V===null&&!I||xe.set("activeIndex",V)},focusItemOnHover:D}),dn=iT(ht,{enabled:!Y&&(I||!x&&!T),listRef:ne,activeIndex:Ge,selectedIndex:Me,disabledIndices:V=>mA(Z.current[V]),onMatch(V){I?xe.set("activeIndex",V):Et(ce.current[V],lt(Cr))},onTyping(V){Re.current=V}}),je=b.useMemo(()=>Dr(dn.reference,Ut.reference,yt.reference,St.reference,Ue),[St.reference,dn.reference,Ut.reference,yt.reference,Ue]),at=b.useMemo(()=>Dr(od,dn.floating,Ut.floating,yt.floating),[dn.floating,Ut.floating,yt.floating]),Ie=Ut.item??Xt,_e=b.useMemo(()=>({props:Ie,multiple:T,disabled:Y,readOnly:x,isItemEqualToValue:j}),[Ie,T,Y,x,j]);xe.useContextCallback("setValue",Et),xe.useContextCallback("setOpen",et),xe.useContextCallback("handleScrollArrowVisibility",Zt),xe.useContextCallback("onOpenChangeComplete",R),pK(()=>{xe.update({popupProps:at,triggerProps:je,itemRoot:_e})}),xe.useSyncedValues({id:q,modal:w,multiple:T,disabled:Y,readOnly:x,required:S,highlightItemOnHover:D,value:G,open:I,mounted:ot,transitionStatus:de,popupProps:at,triggerProps:je,itemRoot:_e,items:O,itemToStringLabel:A,itemToStringValue:N,isItemEqualToValue:j,openMethod:gt});const $e=es(E,Q.inputRef),tt=T?void 0:ee,kt=b.useMemo(()=>!T||!Array.isArray(G)||!ee?null:G.map(V=>{const J=Bl(V,N);return v.jsx("input",{type:"hidden",form:g,name:ee,value:J,disabled:Y},J)}),[T,G,g,ee,N,Y]);return v.jsxs(qM.Provider,{value:xe,children:[v.jsx(YM.Provider,{value:ht,children:M}),v.jsx("input",{...Q.getValidationProps(Y,{onFocus(){xe.state.triggerElement?.focus({focusVisible:!0})},onChange(V){if(V.nativeEvent.defaultPrevented||Y||x)return;const J=V.currentTarget.value,re=lt(Cr,V.nativeEvent);function ve(){if(T)return;const Se=J.toLowerCase();let qe=ce.current.findIndex(Xe=>Bl(Xe,N).toLowerCase()===Se||vA(Xe,A).toLowerCase()===Se);qe===-1&&(qe=ce.current.findIndex((Xe,Qe)=>{const ct=ne.current[Qe];return ct!=null&&ct.toLowerCase()===Se}));const Ke=ce.current[qe];Ke!=null&&Et(Ke,re)}xe.set("forceMount",!0),queueMicrotask(ve)}}),id:q&&tt==null?`${q}-hidden-input`:void 0,form:g,name:tt,autoComplete:m,value:Nt,disabled:Y,required:S&&!(T&&nn),readOnly:x,ref:$e,style:ee?Ap:id,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),kt]})}function wK(e,t){return e??t}const EK="data-popup-side",RK=400,CK={...Fu,...gc,popupSide:e=>e?{[EK]:e}:null,value:()=>null},TK=b.forwardRef(function(t,s){const{render:i,className:o,id:l,disabled:u=!1,nativeButton:d=!0,style:f,...g}=t,{setTouched:m,validationMode:h,validation:x,state:S,disabled:w}=ia(),{labelId:C}=Qo(),E=Ai(),R=E.useState("readOnly"),O=E.useState("required"),T=E.useState("disabled"),A=w||T||u,N=E.useState("open"),j=E.useState("mounted"),D=E.useState("value"),M=E.useState("triggerProps"),z=E.useState("positionerElement"),L=E.useState("listElement"),K=E.useState("popupSide"),X=E.useState("id"),B=E.useState("labelId"),H=E.useState("hasSelectedValue"),U=j&&z?K:null,_=l??X,Q=wK(C,B);mc({id:l});const $=Ln(z),q=b.useRef(null),Y=Ed(A,q),{getButtonProps:ee,buttonRef:G}=ns({disabled:A,native:d}),ae=E.useStateSetter("triggerElement"),I=Un(),F=Un(),Z=Un();b.useEffect(()=>{if(N)return Z.start(RK,()=>{E.context.selectionRef.current.allowUnselectedMouseUp=!0,E.context.selectionRef.current.allowSelectedMouseUp=!0}),()=>{Z.clear()};E.context.selectionRef.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},F.clear()},[N,E,F,Z]);const ne=Dr(M,{id:_,role:"combobox","aria-expanded":N,"aria-haspopup":"listbox","aria-controls":N?L?.id??Bh(z)?.id:void 0,"aria-labelledby":Q,"aria-readonly":R||void 0,"aria-required":O||void 0,tabIndex:A?-1:0,onFocus(ge){Y(!0),N&&E.context.alignItemWithTriggerActiveRef.current&&E.context.setOpen(!1,lt(Cr,ge.nativeEvent)),I.start(0,()=>{E.set("forceMount",!0)})},onBlur(ge){st(z,ge.relatedTarget)||(m(!0),Y(!1),h==="onBlur"&&x.commit(D))},onMouseDown(ge){if(N)return;const fe=qt(ge.currentTarget);function ce(Re){if(!q.current)return;const be=Re.target;st(q.current,be)||st($.current,be)||pA(Re,q.current)||E.context.setOpen(!1,lt(Pv,Re))}F.start(0,()=>{fe.addEventListener("mouseup",ce,{once:!0})})}},g,ee),ye=x.getValidationProps(A,ne);ye.role="combobox";const se={...S,open:N,disabled:A,value:D,readOnly:R,popupSide:U,placeholder:!H};return bt("button",t,{ref:[s,q,G,ae],state:se,stateAttributesMapping:CK,props:ye})}),kK={value:()=>null},OK=b.forwardRef(function(t,s){const{className:i,render:o,children:l,placeholder:u,style:d,...f}=t,g=Ai(),m=g.useState("value"),h=g.useState("items"),x=g.useState("itemToStringLabel"),S=g.useState("hasSelectedValue"),w=!S&&u!=null&&l==null,C=g.useState("hasNullItemLabel",w),E={value:m,placeholder:!S};let R=null;return typeof l=="function"?R=l(m):l!=null?R=l:w&&!C?R=u:Array.isArray(m)?R=mH(m,h,x):R=bA(m,h,x),bt("span",t,{state:E,ref:[s,g.context.valueRef],props:[{children:R},f],stateAttributesMapping:kK})}),AK=b.forwardRef(function(t,s){const{render:i,className:o,style:l,...u}=t,g={open:Ai().useState("open")};return bt("span",t,{state:g,ref:s,props:[{"aria-hidden":!0,children:"▼"},u],stateAttributesMapping:Tp})}),MK=b.forwardRef(function(t,s){const i=Ai(),o=i.useState("mounted"),l=i.useState("forceMount");return o||l?v.jsx(jp,{ref:s,...t}):null}),XM=b.createContext(void 0);function fx(){const e=b.useContext(XM);if(!e)throw new Error(cn(59));return e}function yp(e,t){e&&Object.assign(e.style,t)}const ZM={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},NK={position:"fixed"},DK=b.forwardRef(function(t,s){const{anchor:i,className:o,render:l,positionMethod:u,side:d,align:f,sideOffset:g,alignOffset:m,collisionBoundary:h="clipping-ancestors",collisionPadding:x,arrowPadding:S,sticky:w,disableAnchorTracking:C,alignItemWithTrigger:E=!0,collisionAvoidance:R=UC,style:O,...T}=t,A=Ai(),N=GM(),j=A.useState("open"),D=A.useState("mounted"),M=A.useState("modal"),z=A.useState("value"),L=A.useState("openMethod"),K=A.useState("positionerElement"),X=A.useState("triggerElement"),B=A.useState("isItemEqualToValue"),H=A.useState("transitionStatus"),U=b.useRef(null),_=b.useRef(null),[Q,$]=b.useState(E),q=D&&Q&&L!=="touch";!D&&Q!==E&&$(E),b.useImperativeHandle(A.context.alignItemWithTriggerActiveRef,()=>q),pb((q||M)&&j,L==="touch",K,X);const Y=Xp({anchor:i,floatingRootContext:N,positionMethod:u,mounted:D,side:d,sideOffset:g,align:f,alignOffset:m,arrowPadding:S,collisionBoundary:h,collisionPadding:x,sticky:w,disableAnchorTracking:C??q,collisionAvoidance:R,keepMounted:!0}),ee=q?"none":Y.side,G=q?NK:Y.positionerStyles,ae={open:j,side:ee,align:Y.align,anchorHidden:Y.anchorHidden};Pe(()=>{A.set("popupSide",Y.side)},[A,Y.side]);const I=A.useStateSetter("positionerElement"),F=Zp(t,ae,{styles:G,transitionStatus:H,props:T,refs:[s,I],hidden:!D,inert:!j}),Z=b.useRef(0),ne=Be(se=>{if(A.context.valuesRef.current.length===0)return;const ge=Z.current;Z.current=se.size;const fe=lt(Cr);if(ge!==0&&!A.state.multiple&&z!==null&&Uh(A.context.valuesRef.current,z,B)===-1){const Re=A.context.initialValueRef.current,Le=Re!=null&&Uh(A.context.valuesRef.current,Re,B)!==-1?Re:null;A.context.setValue(Le,fe),Le===null&&(A.set("selectedIndex",null),A.context.selectedItemTextRef.current=null)}if(ge!==0&&A.state.multiple&&Array.isArray(z)){const ce=z.filter(Re=>Uh(A.context.valuesRef.current,Re,B)!==-1);ce.length!==z.length&&(A.context.setValue(ce,fe),ce.length===0&&(A.set("selectedIndex",null),A.context.selectedItemTextRef.current=null))}if(j&&q){A.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const ce={height:""};yp(K,ce),yp(A.context.popupRef.current,ce)}}),ye=b.useMemo(()=>({...Y,side:ee,alignItemWithTriggerActive:q,setControlledAlignItemWithTrigger:$,scrollUpArrowRef:U,scrollDownArrowRef:_}),[Y,ee,q,$]);return v.jsx(mg,{elementsRef:A.context.listRef,labelsRef:A.context.labelsRef,onMapChange:ne,children:v.jsxs(XM.Provider,{value:ye,children:[D&&M&&v.jsx(rg,{inert:ud(!j),cutout:X}),F]})})}),wh="base-ui-disable-scrollbar",Rv={className:wh,getElement(e){return v.jsx("style",{nonce:e,href:wh,precedence:"base-ui:low",children:`.${wh}{scrollbar-width:none}.${wh}::-webkit-scrollbar{display:none}`})}},ZR="--transform-origin",jK={...td,...ei},IK=b.forwardRef(function(t,s){const{render:i,className:o,style:l,finalFocus:u,...d}=t,f=Ai(),g=f.useState("multiple"),m=f.useState("readOnly"),h=f.useState("highlightItemOnHover"),x=GM(),{side:S,align:w,alignItemWithTriggerActive:C,isPositioned:E,setControlledAlignItemWithTrigger:R}=fx(),O=ig()!=null,T=Qp(),{nonce:A,disableStyleElements:N}=bV(),j=f.useState("id"),D=f.useState("open"),M=f.useState("openMethod"),z=f.useState("mounted"),L=f.useState("popupProps"),K=f.useState("transitionStatus"),X=f.useState("triggerElement"),B=f.useState("positionerElement"),H=f.useState("listElement"),U=b.useRef(!1),_=b.useRef(!1),Q=b.useRef({}),$=rc(),q=Be(ae=>{if(!B||!f.context.popupRef.current||!_.current)return;const I=B.style.top==="0px",F=B.style.bottom==="0px";if(U.current||!C||!I&&!F){f.context.handleScrollArrowVisibility(ae);return}const Z=JR(B),ne=Ou(B.getBoundingClientRect().height,"y",Z),ye=qt(B),se=Rn(B),ge=se.getComputedStyle(B),fe=parseFloat(ge.marginTop),ce=parseFloat(ge.marginBottom),Re=WR(se.getComputedStyle(f.context.popupRef.current)),be=Math.min(ye.documentElement.clientHeight-fe-ce,Re),Le=ae.scrollTop,Oe=Eh(ae);let ze=null;const Ve=Fe=>{B.style.height=`${Fe}px`},ke=I?Oe-Le:Le,Ue=Math.min(ne+ke,be);if(ke<=$s){const Fe=ku(ke,0,be-ne);Fe>0&&Ve(ne+Fe),ae.scrollTop=I?Oe:0,be-(ne+Fe)<=$s&&(U.current=!0),f.context.handleScrollArrowVisibility(ae);return}if(be-Ue>$s)ze=I?1/0:0;else if(F&&Le<Oe){const Fe=ne+ke-be;ze=Le-(ke-Fe)}const xe=Math.ceil(Ue);if(xe!==0&&Ve(xe),ze!=null){const Fe=ku(ze,0,Eh(ae));Math.abs(ae.scrollTop-Fe)>$s&&(ae.scrollTop=Fe)}xe>=be-$s&&(U.current=!0),f.context.handleScrollArrowVisibility(ae)});b.useImperativeHandle(f.context.scrollHandlerRef,()=>q,[q]),bs({open:D,ref:f.context.popupRef,onComplete(){D&&f.context.onOpenChangeComplete(!0)}});const Y={open:D,transitionStatus:K,side:S,align:w};Pe(()=>{!B||!f.context.popupRef.current||Object.keys(Q.current).length||(Q.current={top:B.style.top||"0",left:B.style.left||"0",right:B.style.right,height:B.style.height,bottom:B.style.bottom,minHeight:B.style.minHeight,maxHeight:B.style.maxHeight,marginTop:B.style.marginTop,marginBottom:B.style.marginBottom})},[f,B]),Pe(()=>{D||C||(_.current=!1,U.current=!1,yp(B,Q.current))},[D,C,B]),Pe(()=>{const ae=f.context.popupRef.current;if(!D||!X||!B||!ae||C&&!E||f.state.transitionStatus==="ending")return;if(_.current=!0,ae.style.removeProperty(ZR),!C){$.request(()=>f.context.handleScrollArrowVisibility(H||ae));return}const I=PK(ae);try{let F=f.context.selectedItemTextRef.current;F?.isConnected||(F=!f.select("hasSelectedValue")&&f.context.firstItemTextRef.current?.isConnected?f.context.firstItemTextRef.current:null);const Z=f.context.valueRef.current,ne=Rn(B),ye=ne.getComputedStyle(B),se=ne.getComputedStyle(ae),ge=qt(X),fe=JR(X),ce=Rh(X.getBoundingClientRect(),fe),Re=Rh(B.getBoundingClientRect(),fe),be=ce.height,Le=H||ae,Oe=Le.scrollHeight,ze=parseFloat(se.borderBottomWidth),Ve=parseFloat(ye.marginTop)||10,ke=parseFloat(ye.marginBottom)||10,Ue=parseFloat(ye.minHeight)||100,xe=WR(se),Fe=5,Ze=5,ot=20,de=ge.documentElement.clientHeight-Ve-ke,Ee=ge.documentElement.clientWidth,Ge=de-ce.bottom+be;let Me,De=T==="rtl"?ce.right-Re.width:ce.left,xt=0;if(F&&Z){const ht=Rh(Z.getBoundingClientRect(),fe);Me=Rh(F.getBoundingClientRect(),fe),De=Re.left+(T==="rtl"?ht.right-Me.right:ht.left-Me.left);const St=ht.top-ce.top+ht.height/2;xt=Me.top-Re.top+Me.height/2-St}const dt=Ge+xt+ke+ze;let gt=Math.min(de,dt);const Nt=de-Ve-ke,jt=dt-gt,tn=Ee-Ze;B.style.left=`${ku(De,Fe,tn-Re.width)}px`,B.style.height=`${gt}px`,B.style.maxHeight="none",B.style.marginTop=`${Ve}px`,B.style.marginBottom=`${ke}px`,ae.style.height="100%";const an=Eh(Le),nn=jt>=an-$s;nn&&(gt=Math.min(de,Re.height)-(jt-an));const et=ce.top<ot||ce.bottom>de-ot||Math.ceil(gt)+$s<Math.min(Oe,Ue),Et=(ne.visualViewport?.scale??1)!==1&&Ri;if(et||Et){yp(B,Q.current),R(!1);return}const Zt=Math.max(Ue,gt);if(nn){const ht=Math.max(0,de-dt);B.style.top=Re.height>=Nt?"0":`${ht}px`,B.style.height=`${gt}px`,Le.scrollTop=Eh(Le)}else B.style.bottom="0",Le.scrollTop=jt;if(Me){const ht=Re.top,St=Re.height,yt=Me.top+Me.height/2,Ut=ku(St>0?(yt-ht)/St*100:50,0,100);ae.style.setProperty(ZR,`50% ${Ut}%`)}(Zt===de||gt>=xe)&&(U.current=!0),f.context.handleScrollArrowVisibility(Le),h&&f.state.selectedIndex===null&&f.state.activeIndex===null&&f.context.listRef.current[0]!=null&&f.set("activeIndex",0)}finally{I()}},[f,D,B,X,C,R,$,H,h,T,E]),b.useEffect(()=>{if(!C||!B||!D)return;const ae=Rn(B);function I(F){f.context.setOpen(!1,lt(R4,F))}return Lt(ae,"resize",I)},[f,C,B,D]);const ee={...H?{role:"presentation"}:{role:"listbox","aria-multiselectable":g||void 0,"aria-readonly":m||void 0,id:`${j}-list`},onKeyDown(ae){O&&hd.has(ae.key)&&ae.stopPropagation()},onScroll(ae){H||q(ae.currentTarget)},...C&&{style:H?{height:"100%"}:ZM},className:!H&&C?Rv.className:void 0},G=bt("div",t,{ref:[s,f.context.popupRef],state:Y,stateAttributesMapping:jK,props:[L,ee,cd(K),d]});return v.jsxs(b.Fragment,{children:[!N&&Rv.getElement(A),v.jsx(Ip,{context:x,modal:!1,disabled:!z,openInteractionType:M,returnFocus:u,restoreFocus:!0,children:G})]})});function WR(e){const t=e.maxHeight;return t.endsWith("px")&&parseFloat(t)||1/0}function Eh(e){return dx(e.scrollHeight,e.clientHeight)}function JR(e){return dT.getScale(e)}function Ou(e,t,s){return e/s[t]}function Rh(e,t){return Bu({x:Ou(e.x,"x",t),y:Ou(e.y,"y",t),width:Ou(e.width,"x",t),height:Ou(e.height,"y",t)})}const eC=[["transform","none"],["scale","1"],["translate","0 0"]];function PK(e){const{style:t}=e,s={};for(const[i,o]of eC)s[i]=t.getPropertyValue(i),t.setProperty(i,o,"important");return()=>{for(const[i]of eC){const o=s[i];o?t.setProperty(i,o):t.removeProperty(i)}}}const LK=b.forwardRef(function(t,s){const{render:i,className:o,style:l,...u}=t,d=Ai(),f=d.useState("multiple"),g=d.useState("readOnly"),{alignItemWithTriggerActive:m}=fx(),h=d.useState("hasScrollArrows"),x=d.useState("openMethod"),w={id:`${d.useState("id")}-list`,role:"listbox","aria-multiselectable":f||void 0,"aria-readonly":g||void 0,onScroll(E){d.context.scrollHandlerRef.current?.(E.currentTarget)},...m&&{style:ZM},className:h&&x!=="touch"?Rv.className:void 0},C=d.useStateSetter("listElement");return bt("div",t,{ref:[s,C],props:[w,u]})}),WM=b.createContext(void 0);function JM(){const e=b.useContext(WM);if(!e)throw new Error(cn(57));return e}const zK=b.memo(b.forwardRef(function(t,s){const{render:i,className:o,style:l,value:u=null,label:d,disabled:f=!1,nativeButton:g=!1,...m}=t,h=b.useRef(null),x=Sd({guess:!0,label:d,textRef:h}),S=Ai(),{props:w,multiple:C,disabled:E,readOnly:R,isItemEqualToValue:O}=S.useState("itemRoot"),T=E||f,A=S.useState("isActive",x.index),N=S.useState("open"),j=S.useState("isSelected",u),D=S.useState("isSelectedByFocus",x.index),M=x.index,z=b.useRef(null);Pe(()=>{const Y=S.context.valuesRef.current;return Y[M]=u,()=>{delete Y[M]}},[M,u,S]),Pe(()=>{const Y=S.state.value,ee=S.state.selectedIndex;let G=ee,ae;C&&Array.isArray(Y)?(G=vK(M,u,S.context.valuesRef.current,Y,O,ee),ae=G===M,M===ee&&!ae&&(S.context.selectedItemTextRef.current=null)):(ae=Y!==void 0&&Fo(u,Y,O),ae&&(G=M)),S.set("selectedIndex",G),ae&&h.current&&(S.context.selectedItemTextRef.current=h.current)},[M,C,O,S,u]);const L=b.useRef("mouse"),K=b.useRef(!1),{getButtonProps:X,buttonRef:B}=ns({disabled:T,focusableWhenDisabled:!0,native:g,composite:!0}),H={disabled:T,selected:j,highlighted:A};function U(Y){if(E||R)return;const ee=S.state.value;if(C){const G=Array.isArray(ee)?ee:[],ae=j?bK(G,u,O):[...G,u];S.context.setValue(ae,lt(jo,Y))}else S.context.setValue(u,lt(jo,Y)),S.context.setOpen(!1,lt(jo,Y))}function _(){S.context.selectionRef.current.dragY=0}const Q={role:"option","aria-selected":j,tabIndex:N&&A?0:-1,onKeyDown(Y){S.set("activeIndex",M),Y.key===" "&&S.context.typingRef.current&&Y.preventDefault()},onClick(Y){const ee=L.current!=="touch",G=Y.nativeEvent.pointerType,ae=ee&&nc(Y.nativeEvent)&&(G!==void 0||A),I=ee&&!ae&&!K.current;K.current=!1,!(T||I)&&U(Y.nativeEvent)},onPointerEnter(Y){L.current=Y.pointerType},onPointerMove(Y){if(Y.pointerType==="mouse"&&Y.buttons===1){const ee=S.context.selectionRef.current;ee.dragY+=Y.movementY,ee.dragY**2>=64&&(ee.allowUnselectedMouseUp=!0)}},onPointerDown(Y){L.current=Y.pointerType,K.current=!0,_()},onMouseUp(){if(_(),T||L.current==="touch"||K.current)return;const Y=!S.context.selectionRef.current.allowSelectedMouseUp&&j,ee=!S.context.selectionRef.current.allowUnselectedMouseUp&&!j;Y||ee||(K.current=!0,z.current?.click(),K.current=!1)}},$=bt("div",t,{ref:[B,s,x.ref,z],state:H,props:[w,Q,m,X]}),q=b.useMemo(()=>({selected:j,index:M,textRef:h,selectedByFocus:D}),[j,M,h,D]);return v.jsx(WM.Provider,{value:q,children:$})})),_K=b.memo(b.forwardRef(function(t,s){const{render:i,className:o,style:l,keepMounted:u,selected:d,...f}=t,g=b.useRef(null),{transitionStatus:m,setMounted:h}=Za(d),S=bt("span",t,{ref:[s,g],state:{selected:d,transitionStatus:m},props:[{"aria-hidden":!0,children:"✔️"},f],stateAttributesMapping:ei});return bs({batch:!0,enabled:!d,open:d,ref:g,onComplete(){d||h(!1)}}),S})),UK=b.forwardRef(function(t,s){const{selected:i}=JM();return t.keepMounted||i?v.jsx(_K,{...t,selected:i,ref:s}):null}),HK=b.memo(b.forwardRef(function(t,s){const{index:i,textRef:o,selectedByFocus:l}=JM(),u=Ai(),{render:d,className:f,style:g,...m}=t,h=b.useCallback(S=>{S&&(i===0&&(u.context.firstItemTextRef.current=S),l&&(u.context.selectedItemTextRef.current=S))},[u,i,l]);return bt("div",t,{ref:[h,s,o],props:m})})),eN=b.forwardRef(function(t,s){const{render:i,className:o,style:l,direction:u,keepMounted:d,...f}=t,g=u==="up",m=Ai(),{side:h,scrollDownArrowRef:x,scrollUpArrowRef:S}=fx(),w=g?"scrollUpArrowVisible":"scrollDownArrowVisible",C=m.useState(w),E=m.useState("openMethod"),R=C&&E!=="touch",O=Un(),T=g?S:x,{mounted:A,transitionStatus:N,setMounted:j}=Za(R);Pe(()=>(m.context.scrollArrowsMountedCountRef.current+=1,m.set("hasScrollArrows",!0),()=>{m.context.scrollArrowsMountedCountRef.current=Math.max(0,m.context.scrollArrowsMountedCountRef.current-1),m.context.scrollArrowsMountedCountRef.current===0&&m.set("hasScrollArrows",!1)}),[m]),bs({open:R,ref:T,onComplete(){R||j(!1)}});const z=bt("div",t,{ref:[s,T],state:{direction:u,visible:R,side:h,transitionStatus:N},props:[{"aria-hidden":!0,children:g?"▲":"▼",style:{position:"absolute"},onMouseMove(K){if(K.movementX===0&&K.movementY===0||O.isStarted())return;m.set("activeIndex",null);function X(){const B=m.state.listElement??m.context.popupRef.current;if(!B)return;m.set("activeIndex",null),m.context.handleScrollArrowVisibility(B);const H=dx(B.scrollHeight,B.clientHeight),U=mp(B.scrollTop,H),_=U===(g?0:H),Q=m.context.listRef.current;if(U!==B.scrollTop&&(B.scrollTop=U),_){O.clear();return}if(Q.length>0){const $=T.current?.offsetHeight||0;B.scrollTop=FK(Q,g,U,B.clientHeight,$,H)}O.start(40,X)}O.start(40,X)},onMouseLeave(){O.clear()}},f],stateAttributesMapping:ei});return A||d?z:null});function FK(e,t,s,i,o,l){if(t){let m=0;const h=s+o-$s;for(let w=0;w<e.length;w+=1){const C=e[w];if(C&&C.offsetTop>=h){m=w;break}}const x=Math.max(0,m-1),S=e[x];return x<m&&S?mp(S.offsetTop-o,l):0}let u=e.length-1;const d=s+i-o+$s;for(let m=0;m<e.length;m+=1){const h=e[m];if(h&&h.offsetTop+h.offsetHeight>d){u=Math.max(0,m-1);break}}const f=Math.min(e.length-1,u+1),g=e[f];return f>u&&g?mp(g.offsetTop+g.offsetHeight-i+o,l):l}const BK=b.forwardRef(function(t,s){return v.jsx(eN,{...t,ref:s,direction:"down"})}),VK=b.forwardRef(function(t,s){return v.jsx(eN,{...t,ref:s,direction:"up"})}),hx=SK;function px({className:e,...t}){return v.jsx(OK,{"data-slot":"select-value",className:He("flex flex-1 text-left",e),...t})}function gx({className:e,size:t="default",children:s,...i}){return v.jsxs(TK,{"data-slot":"select-trigger","data-size":t,className:He("flex w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-input/20 px-2 py-1.5 text-xs/relaxed whitespace-nowrap transition-colors outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-7 data-[size=sm]:h-6 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",e),...i,children:[s,v.jsx(AK,{render:v.jsx(rb,{className:"pointer-events-none size-3.5 text-muted-foreground"})})]})}function mx({className:e,children:t,side:s="bottom",sideOffset:i=4,align:o="center",alignOffset:l=0,alignItemWithTrigger:u=!0,...d}){return v.jsx(MK,{children:v.jsx(DK,{side:s,sideOffset:i,align:o,alignOffset:l,alignItemWithTrigger:u,className:"isolate z-50",children:v.jsxs(IK,{"data-slot":"select-content","data-align-trigger":u,className:He("relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...d,children:[v.jsx(KK,{}),v.jsx(LK,{children:t}),v.jsx(qK,{})]})})})}function yx({className:e,children:t,...s}){return v.jsxs(zK,{"data-slot":"select-item",className:He("relative flex min-h-7 w-full cursor-default items-center gap-2 rounded-md px-2 py-1 text-xs/relaxed outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...s,children:[v.jsx(HK,{className:"flex flex-1 shrink-0 gap-2 whitespace-nowrap",children:t}),v.jsx(UK,{render:v.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center"}),children:v.jsx(dd,{className:"pointer-events-none"})})]})}function KK({className:e,...t}){return v.jsx(VK,{"data-slot":"select-scroll-up-button",className:He("top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-3.5",e),...t,children:v.jsx(EL,{})})}function qK({className:e,...t}){return v.jsx(BK,{"data-slot":"select-scroll-down-button",className:He("bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-3.5",e),...t,children:v.jsx(rb,{})})}const tN=["en-US","zh-CN","zh-TW","ja-JP"],YK={"en-US":"English","zh-CN":"简体中文","zh-TW":"繁體中文","ja-JP":"日本語"},GK={"skills.invalidEntryName":"Enter a valid file or folder name without slashes.","skills.newEntry":"New","skills.newFile":"New file","skills.newFolder":"New folder","skills.fileActions":"Actions for {{path}}","skills.fileConflict":"A file or folder with this name already exists.","skills.fileOperationError":"Unable to update skill files. Please try again.","skills.deleteEntryDescription":"Remove <entryPath>{{path}}</entryPath> and its contents. Deletion takes effect when you save the skill.","skills.createEntryDescription":"Create in {{path}}. Enter a single file or folder name.","skills.entryName":"Name","skills.fileWorking":"Working…","skills.createEntry":"Create","skills.fileNotEditable":"This file is binary or exceeds the 2 MiB editing limit.","skills.fileLoadError":"Unable to load this file.","editor.loading":"Loading editor…","skills.saveContent":"Save","skills.contentSaving":"Saving…","skills.contentSaved":"Content saved.","skills.contentSaveError":"Unable to save content. Please try again.","skills.unsavedChanges":"Unsaved changes","skills.allChangesSaved":"All changes saved","skills.contentPlaceholder":"Write skill instructions in Markdown.","skills.fileEditor":"Edit {{file}}","skills.leaveTitle":"Discard unsaved changes?","skills.leaveDescription":"Your changes have not been saved. Save them before leaving, or discard them to continue.","skills.keepEditing":"Keep editing","skills.discardChanges":"Discard changes","skills.overview":"Overview","skills.files":"Files","skills.fileNavigation":"Skill files","skills.selectAria":"Select {{name}}","skills.selectAll":"Select all","skills.deselectAll":"Deselect all","skills.batch":"Batch","skills.batchAssigned":"Skill assignments updated.","skills.batchAssignPartial":"{{completed}} changes saved; {{failed}} failed. Retry to finish.","skills.unassign":"Unassign","skills.assign":"Assign","skills.assignTitle":"Assign {{name}}","skills.assignDialogTitle":"Assign <skillName>{{name}}</skillName>","skills.assignDescription":"Select agents to create skill links. Deselect an agent to remove its link. Changes apply immediately.","skills.assignAgentAria":"Assign {{name}} to {{agent}}","skills.assignmentError":"Unable to update skill assignment. Please try again.","skills.noAgents":"No agents available.","skills.linkConflict":"An unrelated skill entry exists in an agent folder. Resolve the conflict and retry.","skills.edit":"Edit","skills.editTitle":"Edit skill","skills.editDescription":"Update the name and description. Changes also sync to agents this skill is assigned to.","skills.saveChanges":"Save changes","skills.updating":"Saving…","skills.updated":"Skill updated.","skills.updateError":"Unable to update the skill. Please try again.","skills.delete":"Delete","skills.deleted":"Skill deleted.","skills.deleteError":"Unable to delete the skill. Please try again.","skills.deleteConfirmTitle":"Delete skill","skills.deleteConfirmDescription":"<skillName>{{name}}</skillName> and all files in its folder will be permanently deleted. The skill will also be removed from assigned agents.","skills.actionsAria":"Actions for {{name}}","skills.inAgents":"Skills in your agents","skills.inAgentsLoadError":"Unable to read agent skills. Please try again.","skills.inAgentsEmptyTitle":"No skills found","skills.inAgentsEmptyDescription":"This agent’s skills directory is empty.","nav.dashboard":"Dashboard","nav.library":"Library","nav.skills":"Skills","skills.name":"Name","skills.namePlaceholder":"e.g. knowledge-wiki","skills.nameHint":"Unique in your skill library. Use 1–64 Unicode letters or digits, lowercase where applicable, with single hyphens between words.","skills.description":"Description","skills.descriptionPlaceholder":"Describe when an agent should use this skill.","skills.create":"Create skill","skills.creating":"Creating…","skills.created":"Skill created.","skills.createError":"Unable to create the skill. Please try again.","skills.nameConflict":"A skill with this name already exists. Choose a different name.","skills.loadError":"Unable to load skills. Please try again.","skills.emptyTitle":"No skills yet","skills.emptyDescription":"Create a skill to start building your library.","skills.notFound":"Skill not found","skills.backToSkills":"Back to Skills","skills.content":"Content","skills.noContent":"No content yet","skills.new":"New skill","skills.createManually":"Create manually","skills.createManuallyDescription":"Start from a blank SKILL.md.","skills.importLocal":"Import from local","skills.importLocalDescription":"Pick one skill folder or one .skill / .zip archive.","skills.importing":"Importing…","skills.importSummary":"Imported {{imported}} skills; skipped {{skipped}}.","skills.importSkippedInvalid":"Invalid skill folder.","skills.importSkippedConflict":"Name already exists.","filePicker.selecting":"Selecting…","filePicker.error":"Unable to open the file picker. Please try again.","filePicker.unavailable":"Native file selection is unavailable on this computer.","filePicker.busy":"A file picker is already open.","skills.importReadError":"Unable to read the selected path. Check that it exists and is accessible.","skills.importInvalid":"Invalid skill.","skills.importInvalidSource":"Select one skill folder or one .skill / .zip archive.","skills.importSymlinkSource":"Symbolic-link skill sources are not supported. Select the original skill folder or archive.","skills.importMissingSkillMd":"The selected skill must contain SKILL.md at its root.","skills.importInvalidMetadata":"SKILL.md must be UTF-8 Markdown with a valid name and description in YAML frontmatter.","skills.importInvalidPath":"The skill contains an unsafe or conflicting file path.","skills.importDuplicatePath":"The skill contains duplicate file paths.","skills.importInvalidEncoding":"The skill contains a file with invalid encoding.","skills.importUnsupportedEntries":"The skill contains symbolic links or unsupported entries.","skills.importTooManyEntries":"A skill can contain at most 5,000 entries.","skills.importSkillMdTooLarge":"SKILL.md must be at most 2 MiB.","skills.importInvalidArchive":"The selected .skill or .zip archive is invalid.","skills.importNoSkills":"The source contains no skill folders.","skills.importTooLarge":"Skills must be at most 32 MiB.","skills.importNameConflict":"A skill with this name already exists. The existing skill was not overwritten.","skills.importError":"Unable to import the skill. Please try again.","skills.importUrl":"Import from URL","skills.importUrlDescription":"Fetch a published skill by URL.","skills.url":"URL","skills.importSubmit":"Import","skills.importUrlHint":"Enter a direct .skill, .zip, or SKILL.md file URL.","skills.importInvalidUrl":"Enter an HTTP or HTTPS URL without embedded credentials.","skills.importUnsupportedUrlFile":"Use a direct .skill, .zip, or SKILL.md file link. Folder and HTML pages are not supported.","skills.importDownloadFailed":"Unable to download the file. Check the URL and try again.","skills.importDownloadTimeout":"The download timed out. Try again or import the file locally.","nav.instructions":"Instructions","nav.models":"Models","nav.genesis":"Genesis","nav.explorer":"Explorer","nav.quantum":"Quantum","instructions.create":"New instruction","instructions.createTitle":"New instruction","instructions.name":"Name","instructions.namePlaceholder":"e.g. Code review checklist","instructions.content":"Content","instructions.contentPlaceholder":"Write Markdown instructions. Content is saved as Markdown.","instructions.save":"Create instruction","instructions.creating":"Creating…","instructions.created":"Instruction created.","instructions.error":"Unable to create the instruction. Please try again.","instructions.editTitle":"Edit instruction","instructions.updateSave":"Save changes","instructions.updating":"Saving…","instructions.updated":"Instruction updated. Enabled agent files were synchronized.","instructions.updateError":"Unable to update the instruction. Please try again.","instructions.edit":"Edit","instructions.delete":"Delete","instructions.deleted":"Instruction deleted.","instructions.deleteError":"Unable to delete the instruction. Please try again.","instructions.deleteConfirmTitle":"Delete instruction?","instructions.deleteConfirmDescription":'"{{name}}" will be removed from the library and every agent. This cannot be undone.',"instructions.dragHint":"Drag an instruction to an agent","instructions.listAria":"Instructions","instructions.actionsAria":"Actions for {{name}}","instructions.emptyTitle":"No instructions yet","instructions.emptyDescription":"Create an instruction from the New instruction action in the page header.","instructions.loadError":"Unable to load instructions. Please try again.","agents.title":"Agents","agents.orderHint":"Order controls how instructions are combined","agents.loadError":"Unable to load agents. Please try again.","agents.updateError":"Unable to update the agent instructions.","agents.enableError":"Unable to update the agent.","agents.reapplyError":"Unable to reapply the agent instructions.","agents.reapplyHint":"Rewrite the managed instruction block.","agents.reapplyDisabledHint":"Enable instructions before reapplying.","agents.openFileError":"Unable to open the instruction file.","agents.fileMissing":"The instruction file does not exist yet.","agents.duplicateError":"This instruction is already assigned to the agent.","agents.applied":"Instructions applied.","agents.removed":"Foundry instructions removed.","agents.reapplied":"Instructions reapplied.","agents.enableRequiresInstruction":"Add at least one instruction first.","agents.toggleOnHint":"Remove Foundry instructions from this file.","agents.toggleOffHint":"Write Foundry instructions to this file.","agents.emptyAssigned":"Drag instructions here","agents.loadingInstruction":"Loading instruction…","agents.openFileAria":"Open instruction file for {{name}}","agents.reapplyAria":"Reapply instructions for {{name}}","agents.toggleAria":"Apply instructions to {{name}}","agents.removeInstructionAria":"Remove {{name}} from this agent","common.retry":"Retry","settings.downloadSkill":"Download Skill","settings.skillTargets":"Install targets","settings.aboutFoundrySkill":"About the Foundry Skill","settings.foundrySkillHint":"Download the Foundry Skill to teach agents how to operate Foundry through the Foundry CLI.","settings.downloadSkillDescription":"Choose user-level folders to install the Foundry agent skill. Existing copies will be replaced.","settings.skillDownloaded":"Skill installed.","settings.errors.downloadSkill":"Unable to download the skill. Please try again.","settings.errors.skillTargets":"Unable to load skill destinations. Please try again.","settings.downloadingSkill":"Downloading…","timeZone.losAngeles":"Los Angeles","timeZone.newYork":"New York","timeZone.shanghai":"Shanghai","timeZone.taipei":"Taipei","timeZone.tokyo":"Tokyo","timeZone.utc":"Coordinated Universal Time (UTC)","dataImport.title":"Import data","dataImport.passphrase":"Backup passphrase","dataImport.replaceAction":"Replace and import","dataImport.replaceWarning":"Importing replaces local settings, Instructions, Skills, and Agent configuration with this backup. Existing data will not be merged. Agent files and links are updated only if you choose Apply after import.","dataImport.applyTitle":"Import complete. Apply Agent configuration?","dataImport.applyDescription":"Apply the imported configuration to this machine’s Agent instructions and Skill links. Choosing not to apply clears Agent configuration in Foundry and leaves existing Agent files and links in place.","dataImport.skipAgents":"Do not apply","dataImport.applyAgents":"Apply configuration","dataImport.changed":"Agent configuration has changed since this import. Close this dialog to reload the current data.","dataImport.applyError":"Data was imported, but Agent configuration could not be applied. Check file access and Skill destination conflicts, then retry.","dataImport.error":"Unable to import data. Please try again.","dataImport.invalidBackup":"This backup is invalid or unsupported.","dataImport.invalidPassphrase":"The passphrase is incorrect or the backup is corrupted.","nav.settings":"Settings","settings.workspace":"Workspace","settings.appearance":"Appearance","settings.appearanceAria":"Appearance settings","settings.languageRegion":"Language & Region","settings.languageRegionAria":"Language & Region settings","settings.advanced":"Advanced","settings.advancedAria":"Advanced settings","settings.export":"Export","dataExport.title":"Export data","dataExport.action":"Export","dataExport.description":"Download an encrypted backup of your Foundry data.","dataExport.passphrase":"Passphrase","dataExport.confirmPassphrase":"Confirm passphrase","dataExport.passphraseHint":"Keep this passphrase. You will need it to import the backup; it cannot be recovered.","dataExport.passphraseMismatch":"The passphrases do not match.","dataExport.exporting":"Exporting…","dataExport.exported":"Backup download started.","dataExport.error":"Unable to export data. Please try again.","common.cancel":"Cancel","settings.import":"Import","settings.configFolder":"Config Folder","settings.openFolder":"Open","settings.copyConfigFolder":"Copy config folder path","settings.configFolderCopied":"Config folder path copied","settings.errors.copyConfigFolder":"Unable to copy the config folder path.","settings.errors.openConfigFolder":"Unable to open the config folder.","settings.language":"Language","settings.timeFormat":"Time format","settings.timeZone":"Time zone","settings.colorTheme":"Color theme","settings.navigation":"Settings navigation","settings.openNavigation":"Open settings navigation","settings.errors.load":"Unable to load settings.","settings.errors.theme":"Unable to update the color theme.","settings.errors.language":"Unable to update the language.","settings.errors.timeFormat":"Unable to update the time format.","settings.errors.timeZone":"Unable to update the time zone.","common.system":"System","theme.light":"Light","theme.dark":"Dark","statusBar.foundry":"Foundry","statusBar.foundryVersion":"Foundry v{{version}}","statusBar.skill":"Skill","statusBar.skillStatus":"Foundry skill status","statusBar.skillChecking":"Checking skill…","statusBar.skillUnavailable":"Skill status unavailable","statusBar.skillRefreshHint":"Copy the command below into your terminal, or open <settings>Advanced settings</settings> to download the Skill again.","statusBar.copyCommand":"Copy command","statusBar.terminal":"Terminal","statusBar.targetAgents":"ChatGPT","statusBar.targetClaude":"Claude Code","statusBar.statusMissing":"Not installed","statusBar.statusOutdated":"Differs from the bundled skill","statusBar.statusCurrent":"Up to date","a11y.breadcrumb":"Breadcrumb","a11y.goBack":"Go back","a11y.close":"Close","a11y.showPassword":"Reveal password","a11y.hidePassword":"Hide password","a11y.sidebar":"Sidebar","a11y.sidebarDescription":"Displays the mobile sidebar.","a11y.toggleSidebar":"Toggle sidebar"},$K={"skills.invalidEntryName":"请输入有效的文件或文件夹名称,不包含斜杠。","skills.newEntry":"新建","skills.newFile":"新增文件","skills.newFolder":"新增文件夹","skills.fileActions":"{{path}} 的操作","skills.fileConflict":"已存在同名文件或文件夹。","skills.fileOperationError":"无法修改技能文件,请重试。","skills.deleteEntryDescription":"移除 <entryPath>{{path}}</entryPath> 及其中的所有内容,保存技能后才会删除并同步到 Agent。","skills.createEntryDescription":"在 {{path}} 中创建,请输入单个文件或文件夹名称。","skills.entryName":"名称","skills.fileWorking":"处理中…","skills.createEntry":"创建","skills.fileNotEditable":"此文件为二进制文件,或超过 2 MiB 编辑上限。","skills.fileLoadError":"无法加载此文件。","editor.loading":"正在加载编辑器…","skills.saveContent":"保存","skills.contentSaving":"保存中…","skills.contentSaved":"内容已保存。","skills.contentSaveError":"无法保存内容,请重试。","skills.unsavedChanges":"未保存的修改","skills.allChangesSaved":"已全部保存","skills.contentPlaceholder":"使用 Markdown 编写技能指令。","skills.fileEditor":"编辑 {{file}}","skills.leaveTitle":"放弃未保存的修改?","skills.leaveDescription":"当前修改尚未保存。请先保存,或放弃修改后继续。","skills.keepEditing":"继续编辑","skills.discardChanges":"放弃修改","skills.overview":"概览","skills.files":"文件","skills.fileNavigation":"技能文件","skills.selectAria":"选择 {{name}}","skills.selectAll":"全选","skills.deselectAll":"取消全选","skills.batch":"批量操作","skills.batchAssigned":"技能分配已更新。","skills.batchAssignPartial":"{{completed}} 项更改已保存,{{failed}} 项失败,请重试以完成更改。","skills.unassign":"取消分配","skills.assign":"分配","skills.assignTitle":"分配 {{name}}","skills.assignDialogTitle":"分配 <skillName>{{name}}</skillName>","skills.assignDescription":"选择 Agent 创建技能链接,取消选择则解除链接。更改立即生效。","skills.assignAgentAria":"将 {{name}} 分配给 {{agent}}","skills.assignmentError":"无法更新技能分配,请重试。","skills.noAgents":"暂无可用的 Agent。","skills.linkConflict":"Agent 技能目录中存在同名的其他内容,请处理冲突后重试。","skills.edit":"修改","skills.editTitle":"修改技能","skills.editDescription":"更新名称和描述,已分配给 Agent 的技能也会同步更新。","skills.saveChanges":"保存修改","skills.updating":"保存中…","skills.updated":"技能已更新。","skills.updateError":"无法修改技能,请重试。","skills.delete":"删除","skills.deleted":"技能已删除。","skills.deleteError":"无法删除技能,请重试。","skills.deleteConfirmTitle":"删除技能","skills.deleteConfirmDescription":"<skillName>{{name}}</skillName> 及其文件夹中的所有文件将被永久删除。已分配给 Agent 的技能也会同步移除。","skills.actionsAria":"{{name}} 的操作","skills.inAgents":"Agent 中的技能","skills.inAgentsLoadError":"无法读取 Agent 技能,请重试。","skills.inAgentsEmptyTitle":"未找到技能","skills.inAgentsEmptyDescription":"该 Agent 的技能目录为空。","nav.dashboard":"仪表盘","nav.library":"资料库","nav.skills":"技能","skills.name":"名称","skills.namePlaceholder":"例如:knowledge-wiki","skills.nameHint":"名称在技能库中必须唯一。使用 1–64 个 Unicode 字母或数字,字母有大小写时使用小写,单个连字符可用于分隔单词。","skills.description":"描述","skills.descriptionPlaceholder":"描述 Agent 应在什么情况下使用此技能。","skills.create":"创建技能","skills.creating":"创建中…","skills.created":"技能已创建。","skills.createError":"无法创建技能,请重试。","skills.nameConflict":"已存在同名技能,请使用其他名称。","skills.loadError":"无法加载技能,请重试。","skills.emptyTitle":"暂无技能","skills.emptyDescription":"创建一个技能,开始构建你的技能库。","skills.notFound":"未找到技能","skills.backToSkills":"返回技能库","skills.content":"内容","skills.noContent":"暂无内容","skills.new":"新建技能","skills.createManually":"手动创建","skills.createManuallyDescription":"从空白的 SKILL.md 开始。","skills.importLocal":"从本地导入","skills.importLocalDescription":"选择一个技能文件夹或一个 .skill / .zip 压缩包。","skills.importing":"正在导入…","skills.importSummary":"已导入 {{imported}} 个技能,跳过 {{skipped}} 项。","skills.importSkippedInvalid":"技能文件夹不符合规范。","skills.importSkippedConflict":"技能名称已存在。","filePicker.selecting":"正在选择…","filePicker.error":"无法打开文件选择器,请重试。","filePicker.unavailable":"当前电脑无法使用原生文件选择器。","filePicker.busy":"已有文件选择器打开,请先完成选择。","skills.importReadError":"无法读取所选路径,请确认文件存在且具有访问权限。","skills.importInvalid":"技能格式无效。","skills.importInvalidSource":"请选择一个技能文件夹或一个 .skill / .zip 压缩包。","skills.importSymlinkSource":"不支持导入符号链接形式的技能来源,请选择原始技能文件夹或压缩包。","skills.importMissingSkillMd":"所选技能必须在根目录包含 SKILL.md。","skills.importInvalidMetadata":"SKILL.md 必须是 UTF-8 Markdown,并在 YAML 元数据中包含有效的 name 和 description。","skills.importInvalidPath":"技能包含不安全或冲突的文件路径。","skills.importDuplicatePath":"技能包含重复的文件路径。","skills.importInvalidEncoding":"技能包含编码无效的文件。","skills.importUnsupportedEntries":"技能包含符号链接或不支持的条目。","skills.importTooManyEntries":"技能最多包含 5,000 个条目。","skills.importSkillMdTooLarge":"SKILL.md 不能超过 2 MiB。","skills.importInvalidArchive":"所选 .skill 或 .zip 压缩包无效。","skills.importNoSkills":"所选来源中没有技能文件夹。","skills.importTooLarge":"技能总大小不能超过 32 MiB。","skills.importNameConflict":"已存在同名技能,现有技能不会被覆盖。","skills.importError":"无法导入技能,请重试。","skills.importUrl":"从 URL 导入","skills.importUrlDescription":"通过 URL 获取已发布的技能。","skills.url":"URL","skills.importSubmit":"导入","skills.importUrlHint":"请输入 .skill、.zip 或 SKILL.md 文件直链。","skills.importInvalidUrl":"请输入不含账号密码的 HTTP 或 HTTPS URL。","skills.importUnsupportedUrlFile":"请使用 .skill、.zip 或 SKILL.md 文件直链,不支持文件夹和 HTML 网页。","skills.importDownloadFailed":"文件下载失败,请检查链接后重试。","skills.importDownloadTimeout":"下载超时,请重试或下载后从本地导入。","nav.instructions":"指令","nav.models":"模型","nav.genesis":"创世","nav.explorer":"探索","nav.quantum":"量子","instructions.create":"新建指令","instructions.createTitle":"新建指令","instructions.name":"名称","instructions.namePlaceholder":"例如:代码审查清单","instructions.content":"内容","instructions.contentPlaceholder":"编写 Markdown 指令。内容将以 Markdown 格式保存。","instructions.save":"创建指令","instructions.creating":"创建中…","instructions.created":"指令已创建。","instructions.error":"无法创建指令,请重试。","instructions.editTitle":"编辑指令","instructions.updateSave":"保存修改","instructions.updating":"保存中…","instructions.updated":"指令已更新,已启用的 Agent 指令文件已同步。","instructions.updateError":"无法更新指令,请重试。","instructions.edit":"编辑","instructions.delete":"删除","instructions.deleted":"指令已删除。","instructions.deleteError":"无法删除指令,请重试。","instructions.deleteConfirmTitle":"删除指令?","instructions.deleteConfirmDescription":"“{{name}}”将从指令库和所有 Agent 中移除,此操作无法撤销。","instructions.dragHint":"将指令拖到 Agent 上","instructions.listAria":"指令列表","instructions.actionsAria":"{{name}} 的操作","instructions.emptyTitle":"还没有指令","instructions.emptyDescription":"使用页面右上角的“新建指令”操作创建第一条指令。","instructions.loadError":"无法加载指令,请重试。","agents.title":"Agents","agents.orderHint":"顺序决定指令的拼接方式","agents.loadError":"无法加载 Agent,请重试。","agents.updateError":"无法更新 Agent 的指令。","agents.enableError":"无法更新 Agent。","agents.reapplyError":"无法重新写入 Agent 指令。","agents.reapplyHint":"重新生成文件中的 Foundry 指令块。","agents.reapplyDisabledHint":"启用指令后才能重新写入。","agents.openFileError":"无法打开指令文件。","agents.fileMissing":"指令文件尚不存在。","agents.duplicateError":"该指令已经添加到此 Agent。","agents.applied":"指令已写入。","agents.removed":"Foundry 指令已移除。","agents.reapplied":"指令已重新写入。","agents.enableRequiresInstruction":"请先添加至少一条指令。","agents.toggleOnHint":"从文件中移除 Foundry 指令。","agents.toggleOffHint":"将 Foundry 指令写入此文件。","agents.emptyAssigned":"将指令拖到这里","agents.loadingInstruction":"正在加载指令…","agents.openFileAria":"打开 {{name}} 的指令文件","agents.reapplyAria":"重新写入 {{name}} 的指令","agents.toggleAria":"将指令应用到 {{name}}","agents.removeInstructionAria":"从此 Agent 移除 {{name}}","common.retry":"重试","settings.downloadSkill":"下载 Skill","settings.skillTargets":"安装目标","settings.aboutFoundrySkill":"关于 Foundry Skill","settings.foundrySkillHint":"下载 Foundry Skill,让 Agent 了解如何通过 Foundry CLI 操作 Foundry。","settings.downloadSkillDescription":"选择用于安装 Foundry Agent Skill 的用户目录,已有副本将被替换。","settings.skillDownloaded":"Skill 已安装。","settings.errors.downloadSkill":"无法下载 Skill,请重试。","settings.errors.skillTargets":"无法加载 Skill 目标路径,请重试。","settings.downloadingSkill":"下载中…","timeZone.losAngeles":"洛杉矶","timeZone.newYork":"纽约","timeZone.shanghai":"上海","timeZone.taipei":"台北","timeZone.tokyo":"东京","timeZone.utc":"协调世界时(UTC)","dataImport.title":"导入数据","dataImport.passphrase":"备份密码","dataImport.replaceAction":"覆盖并导入","dataImport.replaceWarning":"导入会用备份替换本地设置、Instructions、Skills 和 Agent 配置,不会合并现有数据。导入后选择应用配置,才会更新本机 Agent 文件和链接。","dataImport.applyTitle":"导入完成,是否应用 Agent 配置?","dataImport.applyDescription":"应用后,将根据导入的配置更新本机 Agent 的 Instructions 和 Skill 链接。选择不应用将清空 Foundry 中的 Agent 配置,保留本机现有 Agent 文件和链接。","dataImport.skipAgents":"不应用","dataImport.applyAgents":"应用配置","dataImport.changed":"Agent 配置在本次导入后已发生变化。请关闭弹窗,重新加载当前数据。","dataImport.applyError":"数据已导入,但 Agent 配置未能应用。请检查文件访问权限和 Skill 目标位置冲突后重试。","dataImport.error":"无法导入数据,请重试。","dataImport.invalidBackup":"备份无效或不受支持。","dataImport.invalidPassphrase":"密码不正确或备份已损坏。","nav.settings":"设置","settings.workspace":"工作区","settings.appearance":"外观","settings.appearanceAria":"外观设置","settings.languageRegion":"语言和地区","settings.languageRegionAria":"语言和地区设置","settings.advanced":"高级","settings.advancedAria":"高级设置","settings.export":"导出","dataExport.title":"导出数据","dataExport.action":"导出","dataExport.description":"下载当前 Foundry 数据的加密备份。","dataExport.passphrase":"密码","dataExport.confirmPassphrase":"确认密码","dataExport.passphraseHint":"请保存此密码,导入备份时需要使用。密码无法找回。","dataExport.passphraseMismatch":"两次输入的密码不一致。","dataExport.exporting":"导出中…","dataExport.exported":"已开始下载数据备份。","dataExport.error":"无法导出数据,请重试。","common.cancel":"取消","settings.import":"导入","settings.configFolder":"配置文件夹","settings.openFolder":"打开","settings.copyConfigFolder":"复制配置文件夹路径","settings.configFolderCopied":"已复制配置文件夹路径","settings.errors.copyConfigFolder":"无法复制配置文件夹路径。","settings.errors.openConfigFolder":"无法打开配置文件夹。","settings.language":"语言","settings.timeFormat":"时间格式","settings.timeZone":"时区","settings.colorTheme":"颜色主题","settings.navigation":"设置导航","settings.openNavigation":"打开设置导航","settings.errors.load":"无法加载设置。","settings.errors.theme":"无法更新颜色主题。","settings.errors.language":"无法更新语言。","settings.errors.timeFormat":"无法更新时间格式。","settings.errors.timeZone":"无法更新时区。","common.system":"跟随系统","theme.light":"浅色","theme.dark":"深色","statusBar.foundry":"Foundry","statusBar.foundryVersion":"Foundry v{{version}}","statusBar.skill":"Skill","statusBar.skillStatus":"Foundry Skill 状态","statusBar.skillChecking":"正在检查 Skill…","statusBar.skillUnavailable":"无法获取 Skill 状态","statusBar.skillRefreshHint":"复制下面的命令到终端执行,或前往 <settings>高级设置</settings> 重新下载 Skill。","statusBar.copyCommand":"复制命令","statusBar.terminal":"终端","statusBar.targetAgents":"ChatGPT","statusBar.targetClaude":"Claude Code","statusBar.statusMissing":"未安装","statusBar.statusOutdated":"与当前 Foundry 版本不一致","statusBar.statusCurrent":"已是最新","a11y.breadcrumb":"面包屑导航","a11y.goBack":"返回","a11y.close":"关闭","a11y.showPassword":"显示密码","a11y.hidePassword":"隐藏密码","a11y.sidebar":"侧边栏","a11y.sidebarDescription":"显示移动端侧边栏。","a11y.toggleSidebar":"切换侧边栏"},QK={"skills.invalidEntryName":"請輸入有效的檔案或資料夾名稱,不包含斜線。","skills.newEntry":"新增","skills.newFile":"新增檔案","skills.newFolder":"新增資料夾","skills.fileActions":"{{path}} 的操作","skills.fileConflict":"已存在同名檔案或資料夾。","skills.fileOperationError":"無法修改技能檔案,請重試。","skills.deleteEntryDescription":"移除 <entryPath>{{path}}</entryPath> 及其中的所有內容,儲存技能後才會刪除並同步至 Agent。","skills.createEntryDescription":"在 {{path}} 中建立,請輸入單一檔案或資料夾名稱。","skills.entryName":"名稱","skills.fileWorking":"處理中…","skills.createEntry":"建立","skills.fileNotEditable":"此檔案為二進位檔案,或超過 2 MiB 編輯上限。","skills.fileLoadError":"無法載入此檔案。","editor.loading":"正在載入編輯器…","skills.saveContent":"儲存","skills.contentSaving":"儲存中…","skills.contentSaved":"內容已儲存。","skills.contentSaveError":"無法儲存內容,請重試。","skills.unsavedChanges":"未儲存的修改","skills.allChangesSaved":"已全部儲存","skills.contentPlaceholder":"使用 Markdown 編寫技能指令。","skills.fileEditor":"編輯 {{file}}","skills.leaveTitle":"放棄未儲存的修改?","skills.leaveDescription":"目前修改尚未儲存。請先儲存,或放棄修改後繼續。","skills.keepEditing":"繼續編輯","skills.discardChanges":"放棄修改","skills.overview":"概覽","skills.files":"檔案","skills.fileNavigation":"技能檔案","skills.selectAria":"選擇 {{name}}","skills.selectAll":"全選","skills.deselectAll":"取消全選","skills.batch":"批次操作","skills.batchAssigned":"技能分配已更新。","skills.batchAssignPartial":"{{completed}} 項變更已儲存,{{failed}} 項失敗,請重試以完成變更。","skills.unassign":"取消分配","skills.assign":"分配","skills.assignTitle":"分配 {{name}}","skills.assignDialogTitle":"分配 <skillName>{{name}}</skillName>","skills.assignDescription":"選擇 Agent 建立技能連結,取消選擇則解除連結。變更立即生效。","skills.assignAgentAria":"將 {{name}} 分配給 {{agent}}","skills.assignmentError":"無法更新技能分配,請重試。","skills.noAgents":"暫無可用的 Agent。","skills.linkConflict":"Agent 技能目錄中存在同名的其他內容,請處理衝突後重試。","skills.edit":"修改","skills.editTitle":"修改技能","skills.editDescription":"更新名稱和描述,已分配給 Agent 的技能也會同步更新。","skills.saveChanges":"儲存修改","skills.updating":"儲存中…","skills.updated":"技能已更新。","skills.updateError":"無法修改技能,請重試。","skills.delete":"刪除","skills.deleted":"技能已刪除。","skills.deleteError":"無法刪除技能,請重試。","skills.deleteConfirmTitle":"刪除技能","skills.deleteConfirmDescription":"<skillName>{{name}}</skillName> 及其資料夾中的所有檔案將被永久刪除。已分配給 Agent 的技能也會同步移除。","skills.actionsAria":"{{name}} 的操作","skills.inAgents":"Agent 中的技能","skills.inAgentsLoadError":"無法讀取 Agent 技能,請重試。","skills.inAgentsEmptyTitle":"找不到技能","skills.inAgentsEmptyDescription":"該 Agent 的技能目錄是空的。","nav.dashboard":"儀表板","nav.library":"資料庫","nav.skills":"技能","skills.name":"名稱","skills.namePlaceholder":"例如:knowledge-wiki","skills.nameHint":"名稱在技能庫中必須唯一。使用 1–64 個 Unicode 字母或數字,字母有大小寫時使用小寫,單一連字號可用於分隔單字。","skills.description":"描述","skills.descriptionPlaceholder":"描述 Agent 應在什麼情況下使用此技能。","skills.create":"建立技能","skills.creating":"建立中…","skills.created":"技能已建立。","skills.createError":"無法建立技能,請重試。","skills.nameConflict":"已存在同名技能,請使用其他名稱。","skills.loadError":"無法載入技能,請重試。","skills.emptyTitle":"尚無技能","skills.emptyDescription":"建立一個技能,開始建構你的技能庫。","skills.notFound":"找不到技能","skills.backToSkills":"返回技能庫","skills.content":"內容","skills.noContent":"尚無內容","skills.new":"新增技能","skills.createManually":"手動建立","skills.createManuallyDescription":"從空白的 SKILL.md 開始。","skills.importLocal":"從本機匯入","skills.importLocalDescription":"選擇一個技能資料夾或一個 .skill / .zip 壓縮檔。","skills.importing":"正在匯入…","skills.importSummary":"已匯入 {{imported}} 個技能,略過 {{skipped}} 項。","skills.importSkippedInvalid":"技能資料夾不符合規範。","skills.importSkippedConflict":"技能名稱已存在。","filePicker.selecting":"正在選擇…","filePicker.error":"無法開啟檔案選擇器,請重試。","filePicker.unavailable":"目前電腦無法使用原生檔案選擇器。","filePicker.busy":"已有檔案選擇器開啟,請先完成選擇。","skills.importReadError":"無法讀取所選路徑,請確認檔案存在且具有存取權限。","skills.importInvalid":"技能格式無效。","skills.importInvalidSource":"請選擇一個技能資料夾或一個 .skill / .zip 壓縮檔。","skills.importSymlinkSource":"不支援匯入符號連結形式的技能來源,請選擇原始技能資料夾或壓縮檔。","skills.importMissingSkillMd":"所選技能必須在根目錄包含 SKILL.md。","skills.importInvalidMetadata":"SKILL.md 必須是 UTF-8 Markdown,並在 YAML 中繼資料中包含有效的 name 與 description。","skills.importInvalidPath":"技能包含不安全或衝突的檔案路徑。","skills.importDuplicatePath":"技能包含重複的檔案路徑。","skills.importInvalidEncoding":"技能包含編碼無效的檔案。","skills.importUnsupportedEntries":"技能包含符號連結或不支援的項目。","skills.importTooManyEntries":"技能最多包含 5,000 個項目。","skills.importSkillMdTooLarge":"SKILL.md 不能超過 2 MiB。","skills.importInvalidArchive":"所選 .skill 或 .zip 壓縮檔無效。","skills.importNoSkills":"所選來源中沒有技能資料夾。","skills.importTooLarge":"技能總大小不能超過 32 MiB。","skills.importNameConflict":"已存在同名技能,現有技能不會被覆蓋。","skills.importError":"無法匯入技能,請重試。","skills.importUrl":"從 URL 匯入","skills.importUrlDescription":"透過 URL 取得已發布的技能。","skills.url":"URL","skills.importSubmit":"匯入","skills.importUrlHint":"請輸入 .skill、.zip 或 SKILL.md 檔案直連。","skills.importInvalidUrl":"請輸入不含帳號密碼的 HTTP 或 HTTPS URL。","skills.importUnsupportedUrlFile":"請使用 .skill、.zip 或 SKILL.md 檔案直連,不支援資料夾和 HTML 網頁。","skills.importDownloadFailed":"檔案下載失敗,請檢查連結後重試。","skills.importDownloadTimeout":"下載逾時,請重試或下載後從本機匯入。","nav.instructions":"指令","nav.models":"模型","nav.genesis":"創世","nav.explorer":"探索","nav.quantum":"量子","instructions.create":"新增指令","instructions.createTitle":"新增指令","instructions.name":"名稱","instructions.namePlaceholder":"例如:程式碼審查清單","instructions.content":"內容","instructions.contentPlaceholder":"撰寫 Markdown 指令。內容將以 Markdown 格式儲存。","instructions.save":"建立指令","instructions.creating":"建立中…","instructions.created":"指令已建立。","instructions.error":"無法建立指令,請重試。","instructions.editTitle":"編輯指令","instructions.updateSave":"儲存修改","instructions.updating":"儲存中…","instructions.updated":"指令已更新,已啟用的 Agent 指令檔案已同步。","instructions.updateError":"無法更新指令,請重試。","instructions.edit":"編輯","instructions.delete":"刪除","instructions.deleted":"指令已刪除。","instructions.deleteError":"無法刪除指令,請重試。","instructions.deleteConfirmTitle":"刪除指令?","instructions.deleteConfirmDescription":"「{{name}}」將從指令庫和所有 Agent 中移除,此操作無法復原。","instructions.dragHint":"將指令拖到 Agent 上","instructions.listAria":"指令列表","instructions.actionsAria":"{{name}} 的操作","instructions.emptyTitle":"尚無指令","instructions.emptyDescription":"使用頁面右上角的「新增指令」操作建立第一條指令。","instructions.loadError":"無法載入指令,請重試。","agents.title":"Agents","agents.orderHint":"順序決定指令的拼接方式","agents.loadError":"無法載入 Agent,請重試。","agents.updateError":"無法更新 Agent 的指令。","agents.enableError":"無法更新 Agent。","agents.reapplyError":"無法重新寫入 Agent 指令。","agents.reapplyHint":"重新產生檔案中的 Foundry 指令區塊。","agents.reapplyDisabledHint":"啟用指令後才能重新寫入。","agents.openFileError":"無法開啟指令檔案。","agents.fileMissing":"指令檔案尚不存在。","agents.duplicateError":"此指令已經加入此 Agent。","agents.applied":"指令已寫入。","agents.removed":"Foundry 指令已移除。","agents.reapplied":"指令已重新寫入。","agents.enableRequiresInstruction":"請先加入至少一條指令。","agents.toggleOnHint":"從檔案中移除 Foundry 指令。","agents.toggleOffHint":"將 Foundry 指令寫入此檔案。","agents.emptyAssigned":"將指令拖到這裡","agents.loadingInstruction":"正在載入指令…","agents.openFileAria":"開啟 {{name}} 的指令檔案","agents.reapplyAria":"重新寫入 {{name}} 的指令","agents.toggleAria":"將指令套用到 {{name}}","agents.removeInstructionAria":"從此 Agent 移除 {{name}}","common.retry":"重試","settings.downloadSkill":"下載 Skill","settings.skillTargets":"安裝目標","settings.aboutFoundrySkill":"關於 Foundry Skill","settings.foundrySkillHint":"下載 Foundry Skill,讓 Agent 瞭解如何透過 Foundry CLI 操作 Foundry。","settings.downloadSkillDescription":"選擇用於安裝 Foundry Agent Skill 的使用者目錄,已有副本將被替換。","settings.skillDownloaded":"Skill 已安裝。","settings.errors.downloadSkill":"無法下載 Skill,請重試。","settings.errors.skillTargets":"無法載入 Skill 目標路徑,請重試。","settings.downloadingSkill":"下載中…","timeZone.losAngeles":"洛杉磯","timeZone.newYork":"紐約","timeZone.shanghai":"上海","timeZone.taipei":"臺北","timeZone.tokyo":"東京","timeZone.utc":"協調世界時(UTC)","dataImport.title":"匯入資料","dataImport.passphrase":"備份密碼","dataImport.replaceAction":"覆蓋並匯入","dataImport.replaceWarning":"匯入會以備份替換本機設定、Instructions、Skills 和 Agent 設定,不會合併現有資料。匯入後選擇套用設定,才會更新本機 Agent 檔案和連結。","dataImport.applyTitle":"匯入完成,是否套用 Agent 設定?","dataImport.applyDescription":"套用後,將依匯入的設定更新本機 Agent 的 Instructions 和 Skill 連結。選擇不套用將清空 Foundry 中的 Agent 設定,保留本機現有 Agent 檔案和連結。","dataImport.skipAgents":"不套用","dataImport.applyAgents":"套用設定","dataImport.changed":"Agent 設定在本次匯入後已變更。請關閉對話框,重新載入目前資料。","dataImport.applyError":"資料已匯入,但無法套用 Agent 設定。請檢查檔案存取權限與 Skill 目標位置衝突後重試。","dataImport.error":"無法匯入資料,請重試。","dataImport.invalidBackup":"備份無效或不受支援。","dataImport.invalidPassphrase":"密碼不正確或備份已損壞。","nav.settings":"設定","settings.workspace":"工作區","settings.appearance":"外觀","settings.appearanceAria":"外觀設定","settings.languageRegion":"語言與地區","settings.languageRegionAria":"語言與地區設定","settings.advanced":"進階","settings.advancedAria":"進階設定","settings.export":"匯出","dataExport.title":"匯出資料","dataExport.action":"匯出","dataExport.description":"下載目前 Foundry 資料的加密備份。","dataExport.passphrase":"密碼","dataExport.confirmPassphrase":"確認密碼","dataExport.passphraseHint":"請保留此密碼,匯入備份時需要使用。密碼無法復原。","dataExport.passphraseMismatch":"兩次輸入的密碼不一致。","dataExport.exporting":"匯出中…","dataExport.exported":"已開始下載資料備份。","dataExport.error":"無法匯出資料,請重試。","common.cancel":"取消","settings.import":"匯入","settings.configFolder":"設定資料夾","settings.openFolder":"開啟","settings.copyConfigFolder":"複製設定資料夾路徑","settings.configFolderCopied":"已複製設定資料夾路徑","settings.errors.copyConfigFolder":"無法複製設定資料夾路徑。","settings.errors.openConfigFolder":"無法開啟設定資料夾。","settings.language":"語言","settings.timeFormat":"時間格式","settings.timeZone":"時區","settings.colorTheme":"色彩主題","settings.navigation":"設定導覽","settings.openNavigation":"開啟設定導覽","settings.errors.load":"無法載入設定。","settings.errors.theme":"無法更新色彩主題。","settings.errors.language":"無法更新語言。","settings.errors.timeFormat":"無法更新時間格式。","settings.errors.timeZone":"無法更新時區。","common.system":"跟隨系統","theme.light":"淺色","theme.dark":"深色","statusBar.foundry":"Foundry","statusBar.foundryVersion":"Foundry v{{version}}","statusBar.skill":"Skill","statusBar.skillStatus":"Foundry Skill 狀態","statusBar.skillChecking":"正在檢查 Skill…","statusBar.skillUnavailable":"無法取得 Skill 狀態","statusBar.skillRefreshHint":"複製下方指令到終端機執行,或前往 <settings>進階設定</settings> 重新下載 Skill。","statusBar.copyCommand":"複製指令","statusBar.terminal":"終端機","statusBar.targetAgents":"ChatGPT","statusBar.targetClaude":"Claude Code","statusBar.statusMissing":"未安裝","statusBar.statusOutdated":"與目前 Foundry 版本不一致","statusBar.statusCurrent":"已是最新","a11y.breadcrumb":"麵包屑導覽","a11y.goBack":"返回","a11y.close":"關閉","a11y.showPassword":"顯示密碼","a11y.hidePassword":"隱藏密碼","a11y.sidebar":"側邊欄","a11y.sidebarDescription":"顯示行動版側邊欄。","a11y.toggleSidebar":"切換側邊欄"},XK={"skills.invalidEntryName":"スラッシュを含まない有効なファイル名またはフォルダー名を入力してください。","skills.newEntry":"新規","skills.newFile":"新規ファイル","skills.newFolder":"新規フォルダー","skills.fileActions":"{{path}} の操作","skills.fileConflict":"同じ名前のファイルまたはフォルダーが存在します。","skills.fileOperationError":"スキルファイルを更新できませんでした。もう一度お試しください。","skills.deleteEntryDescription":"<entryPath>{{path}}</entryPath> とその内容を削除します。スキルを保存すると削除が反映されます。","skills.createEntryDescription":"{{path}} に作成します。ファイルまたはフォルダーの名前を入力してください。","skills.entryName":"名前","skills.fileWorking":"処理中…","skills.createEntry":"作成","skills.fileNotEditable":"バイナリファイル、または編集上限の 2 MiB を超えています。","skills.fileLoadError":"ファイルを読み込めませんでした。","editor.loading":"エディターを読み込み中…","skills.saveContent":"保存","skills.contentSaving":"保存中…","skills.contentSaved":"内容を保存しました。","skills.contentSaveError":"内容を保存できませんでした。もう一度お試しください。","skills.unsavedChanges":"未保存の変更","skills.allChangesSaved":"すべて保存済み","skills.contentPlaceholder":"Markdown でスキルの指示を記述します。","skills.fileEditor":"{{file}} を編集","skills.leaveTitle":"未保存の変更を破棄しますか?","skills.leaveDescription":"変更はまだ保存されていません。保存するか、変更を破棄して続行してください。","skills.keepEditing":"編集を続ける","skills.discardChanges":"変更を破棄","skills.overview":"概要","skills.files":"ファイル","skills.fileNavigation":"スキルファイル","skills.selectAria":"{{name}} を選択","skills.selectAll":"すべて選択","skills.deselectAll":"すべての選択を解除","skills.batch":"一括操作","skills.batchAssigned":"スキルの割り当てを更新しました。","skills.batchAssignPartial":"{{completed}} 件成功、{{failed}} 件失敗しました。再試行して完了してください。","skills.unassign":"割り当て解除","skills.assign":"割り当て","skills.assignTitle":"{{name}} の割り当て","skills.assignDialogTitle":"<skillName>{{name}}</skillName> の割り当て","skills.assignDescription":"エージェントを選択するとスキルへのリンクを作成し、選択を解除するとリンクを削除します。変更はすぐに反映されます。","skills.assignAgentAria":"{{name}} を {{agent}} に割り当て","skills.assignmentError":"スキルの割り当てを更新できませんでした。もう一度お試しください。","skills.noAgents":"利用可能なエージェントがありません。","skills.linkConflict":"エージェントのスキルフォルダーに別の同名項目があります。競合を解消して再試行してください。","skills.edit":"編集","skills.editTitle":"スキルを編集","skills.editDescription":"名前と説明を更新します。このスキルが割り当てられているエージェントにも変更が反映されます。","skills.saveChanges":"変更を保存","skills.updating":"保存中…","skills.updated":"スキルを更新しました。","skills.updateError":"スキルを更新できません。再試行してください。","skills.delete":"削除","skills.deleted":"スキルを削除しました。","skills.deleteError":"スキルを削除できません。再試行してください。","skills.deleteConfirmTitle":"スキルを削除","skills.deleteConfirmDescription":"<skillName>{{name}}</skillName> とフォルダー内のすべてのファイルが完全に削除されます。割り当て済みのエージェントからもスキルが削除されます。","skills.actionsAria":"{{name}} の操作","skills.inAgents":"エージェントのスキル","skills.inAgentsLoadError":"エージェントのスキルを読み込めませんでした。もう一度お試しください。","skills.inAgentsEmptyTitle":"スキルが見つかりません","skills.inAgentsEmptyDescription":"このエージェントのスキルディレクトリは空です。","nav.dashboard":"ダッシュボード","nav.library":"ライブラリ","nav.skills":"スキル","skills.name":"名前","skills.namePlaceholder":"例:knowledge-wiki","skills.nameHint":"スキルライブラリ内で一意の名前にしてください。1〜64 文字の Unicode 文字または数字を使用し、大文字・小文字がある場合は小文字にしてください。単語は単一のハイフンで区切れます。","skills.description":"説明","skills.descriptionPlaceholder":"エージェントがこのスキルを使う場面を説明してください。","skills.create":"スキルを作成","skills.creating":"作成中…","skills.created":"スキルを作成しました。","skills.createError":"スキルを作成できませんでした。もう一度お試しください。","skills.nameConflict":"同じ名前のスキルが存在します。別の名前を指定してください。","skills.loadError":"スキルを読み込めませんでした。もう一度お試しください。","skills.emptyTitle":"スキルはまだありません","skills.emptyDescription":"スキルを作成してライブラリを構築しましょう。","skills.notFound":"スキルが見つかりません","skills.backToSkills":"スキル一覧に戻る","skills.content":"内容","skills.noContent":"内容はまだありません","skills.new":"新規スキル","skills.createManually":"手動で作成","skills.createManuallyDescription":"空の SKILL.md から始めます。","skills.importLocal":"ローカルからインポート","skills.importLocalDescription":"スキルフォルダーまたは .skill / .zip アーカイブを1つ選択します。","skills.importing":"インポート中…","skills.importSummary":"{{imported}} 個のスキルをインポートし、{{skipped}} 件をスキップしました。","skills.importSkippedInvalid":"無効なスキルフォルダーです。","skills.importSkippedConflict":"同名のスキルが存在します。","filePicker.selecting":"選択中…","filePicker.error":"ファイル選択ダイアログを開けませんでした。もう一度お試しください。","filePicker.unavailable":"このコンピューターではネイティブファイル選択を利用できません。","filePicker.busy":"ファイル選択ダイアログが既に開いています。","skills.importReadError":"選択したパスを読み取れません。存在とアクセス権を確認してください。","skills.importInvalid":"スキルの形式が無効です。","skills.importInvalidSource":"スキルフォルダーまたは .skill / .zip アーカイブを1つ選択してください。","skills.importSymlinkSource":"シンボリックリンクのスキルソースはインポートできません。元のスキルフォルダーまたはアーカイブを選択してください。","skills.importMissingSkillMd":"選択したスキルのルートに SKILL.md が必要です。","skills.importInvalidMetadata":"SKILL.md は UTF-8 の Markdown で、YAML に有効な name と description が必要です。","skills.importInvalidPath":"スキルに安全でない、または競合するファイルパスがあります。","skills.importDuplicatePath":"スキルに重複したファイルパスがあります。","skills.importInvalidEncoding":"スキルにエンコーディングが無効なファイルがあります。","skills.importUnsupportedEntries":"スキルにシンボリックリンクまたは未対応の項目があります。","skills.importTooManyEntries":"スキルに含められる項目は最大 5,000 件です。","skills.importSkillMdTooLarge":"SKILL.md は 2 MiB 以下にしてください。","skills.importInvalidArchive":"選択した .skill または .zip アーカイブが無効です。","skills.importNoSkills":"選択したソースにスキルフォルダーがありません。","skills.importTooLarge":"スキルの合計サイズは 32 MiB 以下にしてください。","skills.importNameConflict":"同じ名前のスキルが既に存在します。既存のスキルは上書きされません。","skills.importError":"スキルをインポートできませんでした。もう一度お試しください。","skills.importUrl":"URL からインポート","skills.importUrlDescription":"URL から公開済みのスキルを取得します。","skills.url":"URL","skills.importSubmit":"インポート","skills.importUrlHint":".skill、.zip、または SKILL.md の直接リンクを入力してください。","skills.importInvalidUrl":"認証情報を含まない HTTP または HTTPS URL を入力してください。","skills.importUnsupportedUrlFile":".skill、.zip、または SKILL.md の直接リンクを使用してください。フォルダーや HTML ページには対応していません。","skills.importDownloadFailed":"ダウンロードできませんでした。URL を確認して再試行してください。","skills.importDownloadTimeout":"ダウンロードがタイムアウトしました。再試行するか、ローカルからインポートしてください。","nav.instructions":"指示","nav.models":"モデル","nav.genesis":"ジェネシス","nav.explorer":"エクスプローラー","nav.quantum":"クォンタム","instructions.create":"新しい指示","instructions.createTitle":"新しい指示","instructions.name":"名前","instructions.namePlaceholder":"例:コードレビューチェックリスト","instructions.content":"内容","instructions.contentPlaceholder":"Markdown の指示を入力。内容は Markdown 形式で保存されます。","instructions.save":"指示を作成","instructions.creating":"作成中…","instructions.created":"指示を作成しました。","instructions.error":"指示を作成できませんでした。もう一度お試しください。","instructions.editTitle":"指示を編集","instructions.updateSave":"変更を保存","instructions.updating":"保存中…","instructions.updated":"指示を更新しました。有効な Agent の指示ファイルも同期しました。","instructions.updateError":"指示を更新できませんでした。もう一度お試しください。","instructions.edit":"編集","instructions.delete":"削除","instructions.deleted":"指示を削除しました。","instructions.deleteError":"指示を削除できませんでした。もう一度お試しください。","instructions.deleteConfirmTitle":"指示を削除しますか?","instructions.deleteConfirmDescription":"「{{name}}」はライブラリとすべての Agent から削除されます。この操作は取り消せません。","instructions.dragHint":"指示を Agent にドラッグ","instructions.listAria":"指示一覧","instructions.actionsAria":"{{name}} の操作","instructions.emptyTitle":"指示はまだありません","instructions.emptyDescription":"ページ右上の「新しい指示」から最初の指示を作成してください。","instructions.loadError":"指示を読み込めませんでした。もう一度お試しください。","agents.title":"Agents","agents.orderHint":"順序が指示の結合順になります","agents.loadError":"Agent を読み込めませんでした。もう一度お試しください。","agents.updateError":"Agent の指示を更新できませんでした。","agents.enableError":"Agent を更新できませんでした。","agents.reapplyError":"Agent の指示を再書き込みできませんでした。","agents.reapplyHint":"管理対象の指示ブロックを再生成します。","agents.reapplyDisabledHint":"再書き込みするには指示を有効にしてください。","agents.openFileError":"指示ファイルを開けませんでした。","agents.fileMissing":"指示ファイルはまだ存在しません。","agents.duplicateError":"この指示はすでに Agent に追加されています。","agents.applied":"指示を書き込みました。","agents.removed":"Foundry の指示を削除しました。","agents.reapplied":"指示を再書き込みしました。","agents.enableRequiresInstruction":"先に指示を 1 つ以上追加してください。","agents.toggleOnHint":"このファイルから Foundry の指示を削除します。","agents.toggleOffHint":"Foundry の指示をこのファイルに書き込みます。","agents.emptyAssigned":"ここに指示をドラッグ","agents.loadingInstruction":"指示を読み込み中…","agents.openFileAria":"{{name}} の指示ファイルを開く","agents.reapplyAria":"{{name}} の指示を再書き込み","agents.toggleAria":"{{name}} に指示を適用","agents.removeInstructionAria":"この Agent から {{name}} を削除","common.retry":"再試行","settings.downloadSkill":"Skill をダウンロード","settings.skillTargets":"インストール先","settings.aboutFoundrySkill":"Foundry Skill について","settings.foundrySkillHint":"Foundry Skill をダウンロードして、Agent に Foundry CLI を使った Foundry の操作方法を伝えます。","settings.downloadSkillDescription":"Foundry Agent Skill のインストール先を選択します。既存のコピーは置き換えられます。","settings.skillDownloaded":"Skill をインストールしました。","settings.errors.downloadSkill":"Skill をダウンロードできません。再試行してください。","settings.errors.skillTargets":"Skill の保存先を取得できません。再試行してください。","settings.downloadingSkill":"ダウンロード中…","timeZone.losAngeles":"ロサンゼルス","timeZone.newYork":"ニューヨーク","timeZone.shanghai":"上海","timeZone.taipei":"台北","timeZone.tokyo":"東京","timeZone.utc":"協定世界時(UTC)","dataImport.title":"データをインポート","dataImport.passphrase":"バックアップのパスフレーズ","dataImport.replaceAction":"上書きしてインポート","dataImport.replaceWarning":"バックアップでローカルの設定、Instructions、Skills、Agent 設定を置き換えます。既存データとの結合は行われません。Agent のファイルとリンクは、インポート後に適用を選んだ場合にのみ更新されます。","dataImport.applyTitle":"インポート完了。Agent 設定を適用しますか?","dataImport.applyDescription":"インポートした設定で、このマシンの Agent の Instructions と Skill リンクを更新します。適用しない場合は Foundry の Agent 設定を空にし、既存の Agent ファイルとリンクを保持します。","dataImport.skipAgents":"適用しない","dataImport.applyAgents":"設定を適用","dataImport.changed":"インポート後に Agent 設定が変更されました。このダイアログを閉じて現在のデータを再読み込みしてください。","dataImport.applyError":"データはインポートされましたが、Agent 設定を適用できませんでした。ファイルへのアクセス権限と Skill の配置先の競合を確認して再試行してください。","dataImport.error":"データをインポートできませんでした。もう一度お試しください。","dataImport.invalidBackup":"バックアップが無効または未対応です。","dataImport.invalidPassphrase":"パスフレーズが違うか、バックアップが破損しています。","nav.settings":"設定","settings.workspace":"ワークスペース","settings.appearance":"外観","settings.appearanceAria":"外観設定","settings.languageRegion":"言語と地域","settings.languageRegionAria":"言語と地域の設定","settings.advanced":"詳細設定","settings.advancedAria":"詳細設定","settings.export":"エクスポート","dataExport.title":"データをエクスポート","dataExport.action":"エクスポート","dataExport.description":"Foundry のデータを暗号化したバックアップとしてダウンロードします。","dataExport.passphrase":"パスフレーズ","dataExport.confirmPassphrase":"パスフレーズの確認","dataExport.passphraseHint":"インポート時に必要なため、このパスフレーズを保管してください。復元はできません。","dataExport.passphraseMismatch":"パスフレーズが一致しません。","dataExport.exporting":"エクスポート中…","dataExport.exported":"バックアップのダウンロードを開始しました。","dataExport.error":"データをエクスポートできませんでした。もう一度お試しください。","common.cancel":"キャンセル","settings.import":"インポート","settings.configFolder":"設定フォルダー","settings.openFolder":"開く","settings.copyConfigFolder":"設定フォルダーのパスをコピー","settings.configFolderCopied":"設定フォルダーのパスをコピーしました","settings.errors.copyConfigFolder":"設定フォルダーのパスをコピーできませんでした。","settings.errors.openConfigFolder":"設定フォルダーを開けませんでした。","settings.language":"言語","settings.timeFormat":"時刻形式","settings.timeZone":"タイムゾーン","settings.colorTheme":"カラーテーマ","settings.navigation":"設定ナビゲーション","settings.openNavigation":"設定ナビゲーションを開く","settings.errors.load":"設定を読み込めませんでした。","settings.errors.theme":"カラーテーマを更新できませんでした。","settings.errors.language":"言語を更新できませんでした。","settings.errors.timeFormat":"時刻形式を更新できませんでした。","settings.errors.timeZone":"タイムゾーンを更新できませんでした。","common.system":"システム","theme.light":"ライト","theme.dark":"ダーク","statusBar.foundry":"Foundry","statusBar.foundryVersion":"Foundry v{{version}}","statusBar.skill":"Skill","statusBar.skillStatus":"Foundry Skill の状態","statusBar.skillChecking":"Skill を確認中…","statusBar.skillUnavailable":"Skill の状態を取得できません","statusBar.skillRefreshHint":"下のコマンドをターミナルで実行するか、<settings>詳細設定</settings> に移動して Skill を再ダウンロードしてください。","statusBar.copyCommand":"コマンドをコピー","statusBar.terminal":"ターミナル","statusBar.targetAgents":"ChatGPT","statusBar.targetClaude":"Claude Code","statusBar.statusMissing":"未インストール","statusBar.statusOutdated":"同梱の Skill と一致しません","statusBar.statusCurrent":"最新です","a11y.breadcrumb":"パンくずリスト","a11y.goBack":"戻る","a11y.close":"閉じる","a11y.showPassword":"パスワードを表示","a11y.hidePassword":"パスワードを非表示","a11y.sidebar":"サイドバー","a11y.sidebarDescription":"モバイル用サイドバーを表示します。","a11y.toggleSidebar":"サイドバーを切り替える"},ZK={"en-US":{translation:GK},"zh-CN":{translation:$K},"zh-TW":{translation:QK},"ja-JP":{translation:XK}};function WK({value:e,onValueChange:t,disabled:s=!1}){const{t:i}=pt(),o=[{value:"system",label:i("common.system")},...tN.map(l=>({value:l,label:YK[l]}))];return v.jsx(Ja,{label:i("settings.language"),children:v.jsxs(hx,{items:o,value:e,onValueChange:l=>{l&&t(l)},disabled:s,children:[v.jsx(gx,{"aria-label":i("settings.language"),className:"w-52",children:v.jsx(px,{})}),v.jsx(mx,{children:o.map(l=>v.jsx(yx,{value:l.value,children:l.label},l.value))})]})})}const tC=t9.map(e=>({value:e,label:e}));function JK({value:e,onValueChange:t,disabled:s=!1}){const{t:i}=pt();return v.jsx(Ja,{label:i("settings.timeFormat"),children:v.jsxs(hx,{items:tC,value:e,onValueChange:o=>{o&&t(o)},disabled:s,children:[v.jsx(gx,{"aria-label":i("settings.timeFormat"),className:"w-52",children:v.jsx(px,{})}),v.jsx(mx,{children:tC.map(o=>v.jsx(yx,{value:o.value,children:o.label},o.value))})]})})}const eq={"America/Los_Angeles":"timeZone.losAngeles","America/New_York":"timeZone.newYork","Asia/Shanghai":"timeZone.shanghai","Asia/Taipei":"timeZone.taipei","Asia/Tokyo":"timeZone.tokyo",UTC:"timeZone.utc"};function tq({value:e,onValueChange:t,disabled:s=!1}){const{t:i}=pt(),o=n9.map(l=>({value:l,label:i(eq[l])}));return v.jsx(Ja,{label:i("settings.timeZone"),children:v.jsxs(hx,{items:o,value:e,onValueChange:l=>{l&&t(l)},disabled:s,children:[v.jsx(gx,{"aria-label":i("settings.timeZone"),className:"w-52",children:v.jsx(px,{})}),v.jsx(mx,{children:o.map(l=>v.jsx(yx,{value:l.value,children:l.label},l.value))})]})})}const Pa=["settings"],Hh=["settings","update"];function vx(){const{t:e}=pt(),t=Ir(),s=ag({mutationKey:Hh})>0,i=ti({queryKey:Pa,queryFn:({signal:h})=>d_(h),staleTime:1/0,retry:!1}),o=nr({mutationKey:Hh,mutationFn:f_,onMutate:async h=>{await t.cancelQueries({queryKey:Pa});const x=t.getQueryData(Pa);return x&&t.setQueryData(Pa,nq(x,h)),{previous:x}},onSuccess:h=>{t.setQueryData(Pa,h)},onError:(h,x,S)=>{S?.previous&&t.setQueryData(Pa,S.previous),Ft.error(e(rq(x)))},onSettled:()=>t.invalidateQueries({queryKey:Pa})}),l=i.data??null,u=l?.workspace.appearance["color-theme"]??"system",d=l?.workspace["language-region"].language??"system",f=l?.workspace["language-region"]["time-format"]??"YYYY-MM-DD HH:mm:ss",g=l?.workspace["language-region"]["time-zone"]??"America/Los_Angeles";function m(h){!l||t.isMutating({mutationKey:Hh})>0||o.mutate(h)}return{settings:l,theme:u,language:d,timeFormat:f,timeZone:g,isLoading:i.isPending,isUpdating:s,setTheme:h=>{h!==u&&m({theme:h})},setLanguage:h=>{h!==d&&m({language:h})},setTimeFormat:h=>{h!==f&&m({timeFormat:h})},setTimeZone:h=>{h!==g&&m({timezone:h})}}}function nq(e,t){const s=e.workspace,i=s["language-region"];return{...e,workspace:{appearance:{"color-theme":t.theme??s.appearance["color-theme"]},"language-region":{language:t.language??i.language,"time-format":t.timeFormat??i["time-format"],"time-zone":t.timezone??i["time-zone"]}}}}function rq(e){return e.theme!==void 0?"settings.errors.theme":e.language!==void 0?"settings.errors.language":e.timeFormat!==void 0?"settings.errors.timeFormat":"settings.errors.timeZone"}const Mo=[{id:"appearance",labelKey:"settings.appearance",ariaKey:"settings.appearanceAria",icon:UL},{id:"language-region",labelKey:"settings.languageRegion",ariaKey:"settings.languageRegionAria",icon:DL},{id:"advanced",labelKey:"settings.advanced",ariaKey:"settings.advancedAria",icon:vk}];function sq(){const{t:e}=pt(),{state:t}=Tr(),[s,i]=q8(),o=Mo.find(({id:T})=>T===s.get("panel"))?.id??Mo[0].id,l=T=>{i(A=>{const N=new URLSearchParams(A);return N.set("panel",T),N},{state:t})},{settings:u,theme:d,language:f,timeFormat:g,timeZone:m,isLoading:h,isUpdating:x,setTheme:S,setLanguage:w,setTimeFormat:C,setTimeZone:E}=vx(),R=Mo.find(T=>T.id===o)?.ariaKey??"settings.appearanceAria",O=Mo.find(T=>T.id===o)?.labelKey??"settings.appearance";return v.jsxs("div",{className:`
244
+ grid h-full min-h-0 grid-cols-[260px_minmax(0,1fr)]
245
+ max-[680px]:grid-cols-1
246
+ `,children:[v.jsx("aside",{className:`
247
+ hidden min-h-0 overflow-y-auto p-4
248
+ min-[680px]:block
249
+ `,children:v.jsx(iq,{activeSection:o,onSectionChange:l})}),v.jsxs("section",{"aria-label":e(R),className:"min-h-0 overflow-y-auto p-4",children:[v.jsxs("div",{className:`
250
+ mb-3 flex items-center gap-3
251
+ min-[680px]:hidden
252
+ `,children:[v.jsxs(Yo,{children:[v.jsx(Go,{render:v.jsx(We,{type:"button",variant:"outline",size:"icon","aria-label":e("settings.openNavigation")}),children:v.jsx(zL,{})}),v.jsx($o,{side:"bottom",align:"start",sideOffset:8,"aria-label":e("settings.navigation"),className:"w-56",children:v.jsxs(xA,{children:[v.jsx(SA,{children:e("settings.workspace")}),v.jsx(yH,{value:o,onValueChange:T=>{const A=Mo.find(({id:N})=>N===T);A&&l(A.id)},children:Mo.map(({id:T,labelKey:A,icon:N})=>v.jsxs(vH,{value:T,closeOnClick:!0,children:[v.jsx(N,{}),e(A)]},T))})]})})]}),v.jsx("span",{className:"min-w-0 truncate text-sm font-medium",children:e(O)})]}),v.jsxs(Qi,{className:"gap-0 py-0",children:[h&&v.jsxs("div",{className:`
253
+ flex flex-col items-start gap-3 p-4
254
+ min-[680px]:min-h-16 min-[680px]:flex-row
255
+ min-[680px]:items-center min-[680px]:justify-between
256
+ min-[680px]:gap-8
257
+ `,children:[v.jsx(Gn,{className:"h-4 w-24"}),v.jsxs("div",{className:"flex items-center gap-6",children:[v.jsx(Gn,{className:"h-4 w-16"}),v.jsx(Gn,{className:"h-4 w-10"}),v.jsx(Gn,{className:"h-4 w-10"})]})]}),!h&&o==="appearance"&&v.jsx(hK,{value:d,onValueChange:T=>{S(T)},disabled:x||!u}),!h&&o==="language-region"&&v.jsxs("div",{className:"divide-y",children:[v.jsx(WK,{value:f,onValueChange:T=>{w(T)},disabled:x||!u}),v.jsx(tq,{value:m,onValueChange:T=>{E(T)},disabled:x||!u}),v.jsx(JK,{value:g,onValueChange:T=>{C(T)},disabled:x||!u})]}),!h&&o==="advanced"&&v.jsxs("div",{className:"divide-y",children:[v.jsx(ZV,{disabled:x||!u}),v.jsx(tK,{disabled:x||!u}),v.jsx(UV,{configFolder:u?.configFolder}),v.jsx(FV,{disabled:x||!u})]})]})]})]})}function iq({activeSection:e,onSectionChange:t}){const{t:s}=pt();return v.jsx("nav",{"aria-label":s("settings.navigation"),children:v.jsxs(Qi,{size:"sm",children:[v.jsx(RB,{children:v.jsx("h2",{className:"text-xs font-medium text-muted-foreground",children:s("settings.workspace")})}),v.jsx(CB,{className:"flex flex-col gap-1",children:Mo.map(({id:i,labelKey:o,icon:l})=>{const u=i===e;return v.jsxs(We,{type:"button",variant:u?"secondary":"ghost","aria-current":u?"page":void 0,onClick:()=>{t(i)},className:"w-full justify-start gap-2",children:[v.jsx(l,{className:u?void 0:"text-muted-foreground"}),v.jsx("span",{children:s(o)})]},i)})})]})})}pr.use(P5).init({resources:ZK,lng:nN(),fallbackLng:"en-US",supportedLngs:[...tN],keySeparator:!1,interpolation:{escapeValue:!1},react:{useSuspense:!1}});function nN(){const e=new Intl.DateTimeFormat().resolvedOptions().locale.toLowerCase();return e.startsWith("zh-tw")||e.startsWith("zh-hk")||e.startsWith("zh-mo")||e.startsWith("zh-hant")?"zh-TW":e.startsWith("zh")?"zh-CN":e.startsWith("ja")?"ja-JP":"en-US"}function aq(){const e=Ir();b.useEffect(()=>{const t=new EventSource("/api/events"),s=()=>{e.invalidateQueries({queryKey:Pa,refetchType:e.isMutating({mutationKey:Hh})>0?"none":"active"})},i=o=>{try{const l=JSON.parse(o.data);typeof l=="object"&&l!==null&&"version"in l&&l.version===r9&&"type"in l&&l.type===s9&&s()}catch{}};return t.addEventListener("open",s),t.addEventListener("foundry",i),()=>{t.removeEventListener("open",s),t.removeEventListener("foundry",i),t.close()}},[e])}const Cv=matchMedia("(prefers-color-scheme: dark)");function oq(e){return Cv.addEventListener("change",e),()=>Cv.removeEventListener("change",e)}function lq(){return Cv.matches?"dark":"light"}function cq({children:e}){aq();const{theme:t,language:s}=vx(),i=b.useSyncExternalStore(oq,lq),o=t==="system"?i:t,l=s==="system"?nN():s;return b.useLayoutEffect(()=>{const u=document.documentElement;u.classList.toggle("dark",o==="dark"),u.style.colorScheme=o},[o]),b.useLayoutEffect(()=>{pr.changeLanguage(l),document.documentElement.lang=l},[l]),e}const uq=new Zz({queryCache:new rO({onError:(e,t)=>{t.queryKey[0]==="skill-targets"?Ft.error(pr.t("settings.errors.skillTargets")):t.queryKey[0]==="settings"&&Ft.error(pr.t("settings.errors.load"))}})});function dq(){return null}function fq(e){switch(e){case"/library/instructions":return v.jsx(k9,{});case"/library/skills":return v.jsx(MV,{});default:return v.jsx(dq,{})}}const hq=U8([{element:v.jsx(OF,{}),children:[...yF.map(e=>({path:e,element:fq(e)})),{path:"/library/skills/:name",element:v.jsx(_V,{})}]},{element:v.jsx(AF,{}),children:[{path:"/settings",element:v.jsx(sq,{})}]},{path:"*",element:v.jsx(h8,{to:"/dashboard",replace:!0})}]);function pq(){return v.jsx(Tz,{client:uq,children:v.jsx(DP,{children:v.jsx(cq,{children:v.jsx(gq,{})})})})}function gq(){const{theme:e}=vx();return v.jsxs(v.Fragment,{children:[v.jsx(W8,{router:hq}),v.jsx(S_,{}),v.jsx(KL,{theme:e,position:"top-center"})]})}Fj.createRoot(document.getElementById("root")).render(v.jsx(b.StrictMode,{children:v.jsx(pq,{})}));export{Ne as W,S9 as _,v as j,b as r,pt as u};