@nick3/copilot-api 1.4.5 → 1.4.9

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.
Files changed (37) hide show
  1. package/README.md +14 -6
  2. package/dist/{account-DhQb2A6q.js → account-CipKmikF.js} +2 -2
  3. package/dist/{account-DhQb2A6q.js.map → account-CipKmikF.js.map} +1 -1
  4. package/dist/{accounts-manager-BsGuQhKM.js → accounts-manager-Cjrd_el_.js} +249 -83
  5. package/dist/accounts-manager-Cjrd_el_.js.map +1 -0
  6. package/dist/{accounts-registry-c7rs5Ed9.js → accounts-registry-CQYvRe65.js} +3 -3
  7. package/dist/{accounts-registry-c7rs5Ed9.js.map → accounts-registry-CQYvRe65.js.map} +1 -1
  8. package/dist/admin/assets/index-BFvCJZIK.js +57 -0
  9. package/dist/admin/assets/index-CsAeel_7.css +1 -0
  10. package/dist/admin/index.html +2 -2
  11. package/dist/{auth-BAEHgP-a.js → auth-1gAffrpI.js} +6 -6
  12. package/dist/{auth-BAEHgP-a.js.map → auth-1gAffrpI.js.map} +1 -1
  13. package/dist/{check-usage-Dbthad7V.js → check-usage-CsRu467P.js} +5 -5
  14. package/dist/{check-usage-Dbthad7V.js.map → check-usage-CsRu467P.js.map} +1 -1
  15. package/dist/{debug-hQJWwXtC.js → debug-BzR5ZQUk.js} +3 -3
  16. package/dist/{debug-hQJWwXtC.js.map → debug-BzR5ZQUk.js.map} +1 -1
  17. package/dist/{get-copilot-token-BySQCue6.js → get-copilot-token-BbpphnmV.js} +3 -3
  18. package/dist/{get-copilot-token-BySQCue6.js.map → get-copilot-token-BbpphnmV.js.map} +1 -1
  19. package/dist/main.js +6 -7
  20. package/dist/main.js.map +1 -1
  21. package/dist/{paths-DoT4SZ8f.js → paths-Cvzy-eLX.js} +2 -2
  22. package/dist/{paths-DoT4SZ8f.js.map → paths-Cvzy-eLX.js.map} +1 -1
  23. package/dist/{poll-access-token-CKc0_m42.js → poll-access-token-CGfLFzMq.js} +3 -3
  24. package/dist/{poll-access-token-CKc0_m42.js.map → poll-access-token-CGfLFzMq.js.map} +1 -1
  25. package/dist/{server-D_7gI9hx.js → server-DqwhClJ-.js} +187 -152
  26. package/dist/server-DqwhClJ-.js.map +1 -0
  27. package/dist/{start-DItwCYda.js → start-B1_Ols5Z.js} +16 -18
  28. package/dist/start-B1_Ols5Z.js.map +1 -0
  29. package/dist/{utils-BIK3ym34.js → utils-DY-jLXwO.js} +34 -10
  30. package/dist/utils-DY-jLXwO.js.map +1 -0
  31. package/package.json +3 -1
  32. package/dist/accounts-manager-BsGuQhKM.js.map +0 -1
  33. package/dist/admin/assets/index-Y2SvOXge.js +0 -57
  34. package/dist/admin/assets/index-geiCIixE.css +0 -1
  35. package/dist/server-D_7gI9hx.js.map +0 -1
  36. package/dist/start-DItwCYda.js.map +0 -1
  37. package/dist/utils-BIK3ym34.js.map +0 -1
@@ -1,57 +0,0 @@
1
- function uN(e,n){for(var s=0;s<n.length;s++){const i=n[s];if(typeof i!="string"&&!Array.isArray(i)){for(const r in i)if(r!=="default"&&!(r in e)){const c=Object.getOwnPropertyDescriptor(i,r);c&&Object.defineProperty(e,r,c.get?c:{enumerable:!0,get:()=>i[r]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const c of r)if(c.type==="childList")for(const u of c.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function s(r){const c={};return r.integrity&&(c.integrity=r.integrity),r.referrerPolicy&&(c.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?c.credentials="include":r.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function i(r){if(r.ep)return;r.ep=!0;const c=s(r);fetch(r.href,c)}})();function dp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Sh={exports:{}},Yr={};var vb;function dN(){if(vb)return Yr;vb=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function s(i,r,c){var u=null;if(c!==void 0&&(u=""+c),r.key!==void 0&&(u=""+r.key),"key"in r){c={};for(var d in r)d!=="key"&&(c[d]=r[d])}else c=r;return r=c.ref,{$$typeof:e,type:i,key:u,ref:r!==void 0?r:null,props:c}}return Yr.Fragment=n,Yr.jsx=s,Yr.jsxs=s,Yr}var yb;function fN(){return yb||(yb=1,Sh.exports=dN()),Sh.exports}var m=fN(),wh={exports:{}},je={};var xb;function hN(){if(xb)return je;xb=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),b=Symbol.iterator;function w(P){return P===null||typeof P!="object"?null:(P=b&&P[b]||P["@@iterator"],typeof P=="function"?P:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,A={};function T(P,X,G){this.props=P,this.context=X,this.refs=A,this.updater=G||E}T.prototype.isReactComponent={},T.prototype.setState=function(P,X){if(typeof P!="object"&&typeof P!="function"&&P!=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,P,X,"setState")},T.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function N(){}N.prototype=T.prototype;function R(P,X,G){this.props=P,this.context=X,this.refs=A,this.updater=G||E}var _=R.prototype=new N;_.constructor=R,C(_,T.prototype),_.isPureReactComponent=!0;var M=Array.isArray;function U(){}var L={H:null,A:null,T:null,S:null},O=Object.prototype.hasOwnProperty;function K(P,X,G){var te=G.ref;return{$$typeof:e,type:P,key:X,ref:te!==void 0?te:null,props:G}}function Z(P,X){return K(P.type,X,P.props)}function J(P){return typeof P=="object"&&P!==null&&P.$$typeof===e}function se(P){var X={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(G){return X[G]})}var I=/\/+/g;function ne(P,X){return typeof P=="object"&&P!==null&&P.key!=null?se(""+P.key):X.toString(36)}function le(P){switch(P.status){case"fulfilled":return P.value;case"rejected":throw P.reason;default:switch(typeof P.status=="string"?P.then(U,U):(P.status="pending",P.then(function(X){P.status==="pending"&&(P.status="fulfilled",P.value=X)},function(X){P.status==="pending"&&(P.status="rejected",P.reason=X)})),P.status){case"fulfilled":return P.value;case"rejected":throw P.reason}}throw P}function D(P,X,G,te,ce){var me=typeof P;(me==="undefined"||me==="boolean")&&(P=null);var ae=!1;if(P===null)ae=!0;else switch(me){case"bigint":case"string":case"number":ae=!0;break;case"object":switch(P.$$typeof){case e:case n:ae=!0;break;case y:return ae=P._init,D(ae(P._payload),X,G,te,ce)}}if(ae)return ce=ce(P),ae=te===""?"."+ne(P,0):te,M(ce)?(G="",ae!=null&&(G=ae.replace(I,"$&/")+"/"),D(ce,X,G,"",function(Te){return Te})):ce!=null&&(J(ce)&&(ce=Z(ce,G+(ce.key==null||P&&P.key===ce.key?"":(""+ce.key).replace(I,"$&/")+"/")+ae)),X.push(ce)),1;ae=0;var de=te===""?".":te+":";if(M(P))for(var we=0;we<P.length;we++)te=P[we],me=de+ne(te,we),ae+=D(te,X,G,me,ce);else if(we=w(P),typeof we=="function")for(P=we.call(P),we=0;!(te=P.next()).done;)te=te.value,me=de+ne(te,we++),ae+=D(te,X,G,me,ce);else if(me==="object"){if(typeof P.then=="function")return D(le(P),X,G,te,ce);throw X=String(P),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}return ae}function H(P,X,G){if(P==null)return P;var te=[],ce=0;return D(P,te,"","",function(me){return X.call(G,me,ce++)}),te}function V(P){if(P._status===-1){var X=P._result;X=X(),X.then(function(G){(P._status===0||P._status===-1)&&(P._status=1,P._result=G)},function(G){(P._status===0||P._status===-1)&&(P._status=2,P._result=G)}),P._status===-1&&(P._status=0,P._result=X)}if(P._status===1)return P._result.default;throw P._result}var oe=typeof reportError=="function"?reportError:function(P){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var X=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof P=="object"&&P!==null&&typeof P.message=="string"?String(P.message):String(P),error:P});if(!window.dispatchEvent(X))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",P);return}console.error(P)},ue={map:H,forEach:function(P,X,G){H(P,function(){X.apply(this,arguments)},G)},count:function(P){var X=0;return H(P,function(){X++}),X},toArray:function(P){return H(P,function(X){return X})||[]},only:function(P){if(!J(P))throw Error("React.Children.only expected to receive a single React element child.");return P}};return je.Activity=g,je.Children=ue,je.Component=T,je.Fragment=s,je.Profiler=r,je.PureComponent=R,je.StrictMode=i,je.Suspense=f,je.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=L,je.__COMPILER_RUNTIME={__proto__:null,c:function(P){return L.H.useMemoCache(P)}},je.cache=function(P){return function(){return P.apply(null,arguments)}},je.cacheSignal=function(){return null},je.cloneElement=function(P,X,G){if(P==null)throw Error("The argument must be a React element, but you passed "+P+".");var te=C({},P.props),ce=P.key;if(X!=null)for(me in X.key!==void 0&&(ce=""+X.key),X)!O.call(X,me)||me==="key"||me==="__self"||me==="__source"||me==="ref"&&X.ref===void 0||(te[me]=X[me]);var me=arguments.length-2;if(me===1)te.children=G;else if(1<me){for(var ae=Array(me),de=0;de<me;de++)ae[de]=arguments[de+2];te.children=ae}return K(P.type,ce,te)},je.createContext=function(P){return P={$$typeof:u,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null},P.Provider=P,P.Consumer={$$typeof:c,_context:P},P},je.createElement=function(P,X,G){var te,ce={},me=null;if(X!=null)for(te in X.key!==void 0&&(me=""+X.key),X)O.call(X,te)&&te!=="key"&&te!=="__self"&&te!=="__source"&&(ce[te]=X[te]);var ae=arguments.length-2;if(ae===1)ce.children=G;else if(1<ae){for(var de=Array(ae),we=0;we<ae;we++)de[we]=arguments[we+2];ce.children=de}if(P&&P.defaultProps)for(te in ae=P.defaultProps,ae)ce[te]===void 0&&(ce[te]=ae[te]);return K(P,me,ce)},je.createRef=function(){return{current:null}},je.forwardRef=function(P){return{$$typeof:d,render:P}},je.isValidElement=J,je.lazy=function(P){return{$$typeof:y,_payload:{_status:-1,_result:P},_init:V}},je.memo=function(P,X){return{$$typeof:h,type:P,compare:X===void 0?null:X}},je.startTransition=function(P){var X=L.T,G={};L.T=G;try{var te=P(),ce=L.S;ce!==null&&ce(G,te),typeof te=="object"&&te!==null&&typeof te.then=="function"&&te.then(U,oe)}catch(me){oe(me)}finally{X!==null&&G.types!==null&&(X.types=G.types),L.T=X}},je.unstable_useCacheRefresh=function(){return L.H.useCacheRefresh()},je.use=function(P){return L.H.use(P)},je.useActionState=function(P,X,G){return L.H.useActionState(P,X,G)},je.useCallback=function(P,X){return L.H.useCallback(P,X)},je.useContext=function(P){return L.H.useContext(P)},je.useDebugValue=function(){},je.useDeferredValue=function(P,X){return L.H.useDeferredValue(P,X)},je.useEffect=function(P,X){return L.H.useEffect(P,X)},je.useEffectEvent=function(P){return L.H.useEffectEvent(P)},je.useId=function(){return L.H.useId()},je.useImperativeHandle=function(P,X,G){return L.H.useImperativeHandle(P,X,G)},je.useInsertionEffect=function(P,X){return L.H.useInsertionEffect(P,X)},je.useLayoutEffect=function(P,X){return L.H.useLayoutEffect(P,X)},je.useMemo=function(P,X){return L.H.useMemo(P,X)},je.useOptimistic=function(P,X){return L.H.useOptimistic(P,X)},je.useReducer=function(P,X,G){return L.H.useReducer(P,X,G)},je.useRef=function(P){return L.H.useRef(P)},je.useState=function(P){return L.H.useState(P)},je.useSyncExternalStore=function(P,X,G){return L.H.useSyncExternalStore(P,X,G)},je.useTransition=function(){return L.H.useTransition()},je.version="19.2.3",je}var bb;function Fu(){return bb||(bb=1,wh.exports=hN()),wh.exports}var x=Fu();const ie=dp(x),fp=uN({__proto__:null,default:ie},[x]);var Eh={exports:{}},Gr={},Ch={exports:{}},Th={};var Sb;function mN(){return Sb||(Sb=1,(function(e){function n(D,H){var V=D.length;D.push(H);e:for(;0<V;){var oe=V-1>>>1,ue=D[oe];if(0<r(ue,H))D[oe]=H,D[V]=ue,V=oe;else break e}}function s(D){return D.length===0?null:D[0]}function i(D){if(D.length===0)return null;var H=D[0],V=D.pop();if(V!==H){D[0]=V;e:for(var oe=0,ue=D.length,P=ue>>>1;oe<P;){var X=2*(oe+1)-1,G=D[X],te=X+1,ce=D[te];if(0>r(G,V))te<ue&&0>r(ce,G)?(D[oe]=ce,D[te]=V,oe=te):(D[oe]=G,D[X]=V,oe=X);else if(te<ue&&0>r(ce,V))D[oe]=ce,D[te]=V,oe=te;else break e}}return H}function r(D,H){var V=D.sortIndex-H.sortIndex;return V!==0?V:D.id-H.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var u=Date,d=u.now();e.unstable_now=function(){return u.now()-d}}var f=[],h=[],y=1,g=null,b=3,w=!1,E=!1,C=!1,A=!1,T=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;function _(D){for(var H=s(h);H!==null;){if(H.callback===null)i(h);else if(H.startTime<=D)i(h),H.sortIndex=H.expirationTime,n(f,H);else break;H=s(h)}}function M(D){if(C=!1,_(D),!E)if(s(f)!==null)E=!0,U||(U=!0,se());else{var H=s(h);H!==null&&le(M,H.startTime-D)}}var U=!1,L=-1,O=5,K=-1;function Z(){return A?!0:!(e.unstable_now()-K<O)}function J(){if(A=!1,U){var D=e.unstable_now();K=D;var H=!0;try{e:{E=!1,C&&(C=!1,N(L),L=-1),w=!0;var V=b;try{t:{for(_(D),g=s(f);g!==null&&!(g.expirationTime>D&&Z());){var oe=g.callback;if(typeof oe=="function"){g.callback=null,b=g.priorityLevel;var ue=oe(g.expirationTime<=D);if(D=e.unstable_now(),typeof ue=="function"){g.callback=ue,_(D),H=!0;break t}g===s(f)&&i(f),_(D)}else i(f);g=s(f)}if(g!==null)H=!0;else{var P=s(h);P!==null&&le(M,P.startTime-D),H=!1}}break e}finally{g=null,b=V,w=!1}H=void 0}}finally{H?se():U=!1}}}var se;if(typeof R=="function")se=function(){R(J)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,ne=I.port2;I.port1.onmessage=J,se=function(){ne.postMessage(null)}}else se=function(){T(J,0)};function le(D,H){L=T(function(){D(e.unstable_now())},H)}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(D){D.callback=null},e.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<D?Math.floor(1e3/D):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(D){switch(b){case 1:case 2:case 3:var H=3;break;default:H=b}var V=b;b=H;try{return D()}finally{b=V}},e.unstable_requestPaint=function(){A=!0},e.unstable_runWithPriority=function(D,H){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var V=b;b=D;try{return H()}finally{b=V}},e.unstable_scheduleCallback=function(D,H,V){var oe=e.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?oe+V:oe):V=oe,D){case 1:var ue=-1;break;case 2:ue=250;break;case 5:ue=1073741823;break;case 4:ue=1e4;break;default:ue=5e3}return ue=V+ue,D={id:y++,callback:H,priorityLevel:D,startTime:V,expirationTime:ue,sortIndex:-1},V>oe?(D.sortIndex=V,n(h,D),s(f)===null&&D===s(h)&&(C?(N(L),L=-1):C=!0,le(M,V-oe))):(D.sortIndex=ue,n(f,D),E||w||(E=!0,U||(U=!0,se()))),D},e.unstable_shouldYield=Z,e.unstable_wrapCallback=function(D){var H=b;return function(){var V=b;b=H;try{return D.apply(this,arguments)}finally{b=V}}}})(Th)),Th}var wb;function pN(){return wb||(wb=1,Ch.exports=mN()),Ch.exports}var Ah={exports:{}},Jt={};var Eb;function gN(){if(Eb)return Jt;Eb=1;var e=Fu();function n(f){var h="https://react.dev/errors/"+f;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)h+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+f+"; 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(n(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},r=Symbol.for("react.portal");function c(f,h,y){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:r,key:g==null?null:""+g,children:f,containerInfo:h,implementation:y}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(f,h){if(f==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Jt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,Jt.createPortal=function(f,h){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(n(299));return c(f,h,null,y)},Jt.flushSync=function(f){var h=u.T,y=i.p;try{if(u.T=null,i.p=2,f)return f()}finally{u.T=h,i.p=y,i.d.f()}},Jt.preconnect=function(f,h){typeof f=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,i.d.C(f,h))},Jt.prefetchDNS=function(f){typeof f=="string"&&i.d.D(f)},Jt.preinit=function(f,h){if(typeof f=="string"&&h&&typeof h.as=="string"){var y=h.as,g=d(y,h.crossOrigin),b=typeof h.integrity=="string"?h.integrity:void 0,w=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;y==="style"?i.d.S(f,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:g,integrity:b,fetchPriority:w}):y==="script"&&i.d.X(f,{crossOrigin:g,integrity:b,fetchPriority:w,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Jt.preinitModule=function(f,h){if(typeof f=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var y=d(h.as,h.crossOrigin);i.d.M(f,{crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&i.d.M(f)},Jt.preload=function(f,h){if(typeof f=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var y=h.as,g=d(y,h.crossOrigin);i.d.L(f,y,{crossOrigin:g,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})}},Jt.preloadModule=function(f,h){if(typeof f=="string")if(h){var y=d(h.as,h.crossOrigin);i.d.m(f,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else i.d.m(f)},Jt.requestFormReset=function(f){i.d.r(f)},Jt.unstable_batchedUpdates=function(f,h){return f(h)},Jt.useFormState=function(f,h,y){return u.H.useFormState(f,h,y)},Jt.useFormStatus=function(){return u.H.useHostTransitionStatus()},Jt.version="19.2.3",Jt}var Cb;function g1(){if(Cb)return Ah.exports;Cb=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(n){console.error(n)}}return e(),Ah.exports=gN(),Ah.exports}var Tb;function vN(){if(Tb)return Gr;Tb=1;var e=pN(),n=Fu(),s=g1();function i(t){var a="https://react.dev/errors/"+t;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)a+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+t+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function c(t){var a=t,o=t;if(t.alternate)for(;a.return;)a=a.return;else{t=a;do a=t,(a.flags&4098)!==0&&(o=a.return),t=a.return;while(t)}return a.tag===3?o:null}function u(t){if(t.tag===13){var a=t.memoizedState;if(a===null&&(t=t.alternate,t!==null&&(a=t.memoizedState)),a!==null)return a.dehydrated}return null}function d(t){if(t.tag===31){var a=t.memoizedState;if(a===null&&(t=t.alternate,t!==null&&(a=t.memoizedState)),a!==null)return a.dehydrated}return null}function f(t){if(c(t)!==t)throw Error(i(188))}function h(t){var a=t.alternate;if(!a){if(a=c(t),a===null)throw Error(i(188));return a!==t?null:t}for(var o=t,l=a;;){var p=o.return;if(p===null)break;var v=p.alternate;if(v===null){if(l=p.return,l!==null){o=l;continue}break}if(p.child===v.child){for(v=p.child;v;){if(v===o)return f(p),t;if(v===l)return f(p),a;v=v.sibling}throw Error(i(188))}if(o.return!==l.return)o=p,l=v;else{for(var S=!1,j=p.child;j;){if(j===o){S=!0,o=p,l=v;break}if(j===l){S=!0,l=p,o=v;break}j=j.sibling}if(!S){for(j=v.child;j;){if(j===o){S=!0,o=v,l=p;break}if(j===l){S=!0,l=v,o=p;break}j=j.sibling}if(!S)throw Error(i(189))}}if(o.alternate!==l)throw Error(i(190))}if(o.tag!==3)throw Error(i(188));return o.stateNode.current===o?t:a}function y(t){var a=t.tag;if(a===5||a===26||a===27||a===6)return t;for(t=t.child;t!==null;){if(a=y(t),a!==null)return a;t=t.sibling}return null}var g=Object.assign,b=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),N=Symbol.for("react.consumer"),R=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),U=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),K=Symbol.for("react.activity"),Z=Symbol.for("react.memo_cache_sentinel"),J=Symbol.iterator;function se(t){return t===null||typeof t!="object"?null:(t=J&&t[J]||t["@@iterator"],typeof t=="function"?t:null)}var I=Symbol.for("react.client.reference");function ne(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===I?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case C:return"Fragment";case T:return"Profiler";case A:return"StrictMode";case M:return"Suspense";case U:return"SuspenseList";case K:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case E:return"Portal";case R:return t.displayName||"Context";case N:return(t._context.displayName||"Context")+".Consumer";case _:var a=t.render;return t=t.displayName,t||(t=a.displayName||a.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case L:return a=t.displayName||null,a!==null?a:ne(t.type)||"Memo";case O:a=t._payload,t=t._init;try{return ne(t(a))}catch{}}return null}var le=Array.isArray,D=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V={pending:!1,data:null,method:null,action:null},oe=[],ue=-1;function P(t){return{current:t}}function X(t){0>ue||(t.current=oe[ue],oe[ue]=null,ue--)}function G(t,a){ue++,oe[ue]=t.current,t.current=a}var te=P(null),ce=P(null),me=P(null),ae=P(null);function de(t,a){switch(G(me,a),G(ce,t),G(te,null),a.nodeType){case 9:case 11:t=(t=a.documentElement)&&(t=t.namespaceURI)?Ux(t):0;break;default:if(t=a.tagName,a=a.namespaceURI)a=Ux(a),t=Hx(a,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}X(te),G(te,t)}function we(){X(te),X(ce),X(me)}function Te(t){t.memoizedState!==null&&G(ae,t);var a=te.current,o=Hx(a,t.type);a!==o&&(G(ce,t),G(te,o))}function Ne(t){ce.current===t&&(X(te),X(ce)),ae.current===t&&(X(ae),Fr._currentValue=V)}var _e,vt;function ot(t){if(_e===void 0)try{throw Error()}catch(o){var a=o.stack.trim().match(/\n( *(at )?)/);_e=a&&a[1]||"",vt=-1<o.stack.indexOf(`
2
- at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
3
- `+_e+t+vt}var jn=!1;function Gt(t,a){if(!t||jn)return"";jn=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(a){var ee=function(){throw Error()};if(Object.defineProperty(ee.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ee,[])}catch(Y){var $=Y}Reflect.construct(t,[],ee)}else{try{ee.call()}catch(Y){$=Y}t.call(ee.prototype)}}else{try{throw Error()}catch(Y){$=Y}(ee=t())&&typeof ee.catch=="function"&&ee.catch(function(){})}}catch(Y){if(Y&&$&&typeof Y.stack=="string")return[Y.stack,$.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var v=l.DetermineComponentFrameRoot(),S=v[0],j=v[1];if(S&&j){var k=S.split(`
4
- `),q=j.split(`
5
- `);for(p=l=0;l<k.length&&!k[l].includes("DetermineComponentFrameRoot");)l++;for(;p<q.length&&!q[p].includes("DetermineComponentFrameRoot");)p++;if(l===k.length||p===q.length)for(l=k.length-1,p=q.length-1;1<=l&&0<=p&&k[l]!==q[p];)p--;for(;1<=l&&0<=p;l--,p--)if(k[l]!==q[p]){if(l!==1||p!==1)do if(l--,p--,0>p||k[l]!==q[p]){var Q=`
6
- `+k[l].replace(" at new "," at ");return t.displayName&&Q.includes("<anonymous>")&&(Q=Q.replace("<anonymous>",t.displayName)),Q}while(1<=l&&0<=p);break}}}finally{jn=!1,Error.prepareStackTrace=o}return(o=t?t.displayName||t.name:"")?ot(o):""}function nn(t,a){switch(t.tag){case 26:case 27:case 5:return ot(t.type);case 16:return ot("Lazy");case 13:return t.child!==a&&a!==null?ot("Suspense Fallback"):ot("Suspense");case 19:return ot("SuspenseList");case 0:case 15:return Gt(t.type,!1);case 11:return Gt(t.type.render,!1);case 1:return Gt(t.type,!0);case 31:return ot("Activity");default:return""}}function Ea(t){try{var a="",o=null;do a+=nn(t,o),o=t,t=t.return;while(t);return a}catch(l){return`
7
- Error generating stack: `+l.message+`
8
- `+l.stack}}var Ht=Object.prototype.hasOwnProperty,Ua=e.unstable_scheduleCallback,Ha=e.unstable_cancelCallback,Mt=e.unstable_shouldYield,Un=e.unstable_requestPaint,_t=e.unstable_now,bs=e.unstable_getCurrentPriorityLevel,dn=e.unstable_ImmediatePriority,la=e.unstable_UserBlockingPriority,Hn=e.unstable_NormalPriority,Ia=e.unstable_LowPriority,Nn=e.unstable_IdlePriority,Ss=e.log,In=e.unstable_setDisableYieldValue,ca=null,Ot=null;function an(t){if(typeof Ss=="function"&&In(t),Ot&&typeof Ot.setStrictMode=="function")try{Ot.setStrictMode(ca,t)}catch{}}var bt=Math.clz32?Math.clz32:fn,oi=Math.log,lt=Math.LN2;function fn(t){return t>>>=0,t===0?32:31-(oi(t)/lt|0)|0}var sn=256,hn=262144,ua=4194304;function ct(t){var a=t&42;if(a!==0)return a;switch(t&-t){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 t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Ce(t,a,o){var l=t.pendingLanes;if(l===0)return 0;var p=0,v=t.suspendedLanes,S=t.pingedLanes;t=t.warmLanes;var j=l&134217727;return j!==0?(l=j&~v,l!==0?p=ct(l):(S&=j,S!==0?p=ct(S):o||(o=j&~t,o!==0&&(p=ct(o))))):(j=l&~v,j!==0?p=ct(j):S!==0?p=ct(S):o||(o=l&~t,o!==0&&(p=ct(o)))),p===0?0:a!==0&&a!==p&&(a&v)===0&&(v=p&-p,o=a&-a,v>=o||v===32&&(o&4194048)!==0)?a:p}function Qe(t,a){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&a)===0}function St(t,a){switch(t){case 1:case 2:case 4:case 8:case 64:return a+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 a+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 Vt(){var t=ua;return ua<<=1,(ua&62914560)===0&&(ua=4194304),t}function Ca(t){for(var a=[],o=0;31>o;o++)a.push(t);return a}function et(t,a){t.pendingLanes|=a,a!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Xt(t,a,o,l,p,v){var S=t.pendingLanes;t.pendingLanes=o,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=o,t.entangledLanes&=o,t.errorRecoveryDisabledLanes&=o,t.shellSuspendCounter=0;var j=t.entanglements,k=t.expirationTimes,q=t.hiddenUpdates;for(o=S&~o;0<o;){var Q=31-bt(o),ee=1<<Q;j[Q]=0,k[Q]=-1;var $=q[Q];if($!==null)for(q[Q]=null,Q=0;Q<$.length;Q++){var Y=$[Q];Y!==null&&(Y.lane&=-536870913)}o&=~ee}l!==0&&Fa(t,l,0),v!==0&&p===0&&t.tag!==0&&(t.suspendedLanes|=v&~(S&~a))}function Fa(t,a,o){t.pendingLanes|=a,t.suspendedLanes&=~a;var l=31-bt(a);t.entangledLanes|=a,t.entanglements[l]=t.entanglements[l]|1073741824|o&261930}function Zt(t,a){var o=t.entangledLanes|=a;for(t=t.entanglements;o;){var l=31-bt(o),p=1<<l;p&a|t[l]&a&&(t[l]|=a),o&=~p}}function Qt(t,a){var o=a&-a;return o=(o&42)!==0?1:ws(o),(o&(t.suspendedLanes|a))!==0?0:o}function ws(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function Rn(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function sr(){var t=H.p;return t!==0?t:(t=window.event,t===void 0?32:ub(t.type))}function Ol(t,a){var o=H.p;try{return H.p=t,a()}finally{H.p=o}}var Ta=Math.random().toString(36).slice(2),Dt="__reactFiber$"+Ta,fe="__reactProps$"+Ta,be="__reactContainer$"+Ta,wt="__reactEvents$"+Ta,ri="__reactListeners$"+Ta,Dl="__reactHandles$"+Ta,Pl="__reactResources$"+Ta,Es="__reactMarker$"+Ta;function fd(t){delete t[Dt],delete t[fe],delete t[wt],delete t[ri],delete t[Dl]}function qi(t){var a=t[Dt];if(a)return a;for(var o=t.parentNode;o;){if(a=o[be]||o[Dt]){if(o=a.alternate,a.child!==null||o!==null&&o.child!==null)for(t=Gx(t);t!==null;){if(o=t[Dt])return o;t=Gx(t)}return a}t=o,o=t.parentNode}return null}function $i(t){if(t=t[Dt]||t[be]){var a=t.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return t}return null}function ir(t){var a=t.tag;if(a===5||a===26||a===27||a===6)return t.stateNode;throw Error(i(33))}function Ki(t){var a=t[Pl];return a||(a=t[Pl]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function Bt(t){t[Es]=!0}var Ng=new Set,Rg={};function li(t,a){Yi(t,a),Yi(t+"Capture",a)}function Yi(t,a){for(Rg[t]=a,t=0;t<a.length;t++)Ng.add(a[t])}var tA=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]*$"),Mg={},_g={};function nA(t){return Ht.call(_g,t)?!0:Ht.call(Mg,t)?!1:tA.test(t)?_g[t]=!0:(Mg[t]=!0,!1)}function kl(t,a,o){if(nA(a))if(o===null)t.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":t.removeAttribute(a);return;case"boolean":var l=a.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){t.removeAttribute(a);return}}t.setAttribute(a,""+o)}}function Ll(t,a,o){if(o===null)t.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttribute(a,""+o)}}function qa(t,a,o,l){if(l===null)t.removeAttribute(o);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(o);return}t.setAttributeNS(a,o,""+l)}}function Fn(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Og(t){var a=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function aA(t,a,o){var l=Object.getOwnPropertyDescriptor(t.constructor.prototype,a);if(!t.hasOwnProperty(a)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var p=l.get,v=l.set;return Object.defineProperty(t,a,{configurable:!0,get:function(){return p.call(this)},set:function(S){o=""+S,v.call(this,S)}}),Object.defineProperty(t,a,{enumerable:l.enumerable}),{getValue:function(){return o},setValue:function(S){o=""+S},stopTracking:function(){t._valueTracker=null,delete t[a]}}}}function hd(t){if(!t._valueTracker){var a=Og(t)?"checked":"value";t._valueTracker=aA(t,a,""+t[a])}}function Dg(t){if(!t)return!1;var a=t._valueTracker;if(!a)return!0;var o=a.getValue(),l="";return t&&(l=Og(t)?t.checked?"true":"false":t.value),t=l,t!==o?(a.setValue(t),!0):!1}function zl(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var sA=/[\n"\\]/g;function qn(t){return t.replace(sA,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function md(t,a,o,l,p,v,S,j){t.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?t.type=S:t.removeAttribute("type"),a!=null?S==="number"?(a===0&&t.value===""||t.value!=a)&&(t.value=""+Fn(a)):t.value!==""+Fn(a)&&(t.value=""+Fn(a)):S!=="submit"&&S!=="reset"||t.removeAttribute("value"),a!=null?pd(t,S,Fn(a)):o!=null?pd(t,S,Fn(o)):l!=null&&t.removeAttribute("value"),p==null&&v!=null&&(t.defaultChecked=!!v),p!=null&&(t.checked=p&&typeof p!="function"&&typeof p!="symbol"),j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"?t.name=""+Fn(j):t.removeAttribute("name")}function Pg(t,a,o,l,p,v,S,j){if(v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(t.type=v),a!=null||o!=null){if(!(v!=="submit"&&v!=="reset"||a!=null)){hd(t);return}o=o!=null?""+Fn(o):"",a=a!=null?""+Fn(a):o,j||a===t.value||(t.value=a),t.defaultValue=a}l=l??p,l=typeof l!="function"&&typeof l!="symbol"&&!!l,t.checked=j?t.checked:!!l,t.defaultChecked=!!l,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(t.name=S),hd(t)}function pd(t,a,o){a==="number"&&zl(t.ownerDocument)===t||t.defaultValue===""+o||(t.defaultValue=""+o)}function Gi(t,a,o,l){if(t=t.options,a){a={};for(var p=0;p<o.length;p++)a["$"+o[p]]=!0;for(o=0;o<t.length;o++)p=a.hasOwnProperty("$"+t[o].value),t[o].selected!==p&&(t[o].selected=p),p&&l&&(t[o].defaultSelected=!0)}else{for(o=""+Fn(o),a=null,p=0;p<t.length;p++){if(t[p].value===o){t[p].selected=!0,l&&(t[p].defaultSelected=!0);return}a!==null||t[p].disabled||(a=t[p])}a!==null&&(a.selected=!0)}}function kg(t,a,o){if(a!=null&&(a=""+Fn(a),a!==t.value&&(t.value=a),o==null)){t.defaultValue!==a&&(t.defaultValue=a);return}t.defaultValue=o!=null?""+Fn(o):""}function Lg(t,a,o,l){if(a==null){if(l!=null){if(o!=null)throw Error(i(92));if(le(l)){if(1<l.length)throw Error(i(93));l=l[0]}o=l}o==null&&(o=""),a=o}o=Fn(a),t.defaultValue=o,l=t.textContent,l===o&&l!==""&&l!==null&&(t.value=l),hd(t)}function Xi(t,a){if(a){var o=t.firstChild;if(o&&o===t.lastChild&&o.nodeType===3){o.nodeValue=a;return}}t.textContent=a}var iA=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 zg(t,a,o){var l=a.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?l?t.setProperty(a,""):a==="float"?t.cssFloat="":t[a]="":l?t.setProperty(a,o):typeof o!="number"||o===0||iA.has(a)?a==="float"?t.cssFloat=o:t[a]=(""+o).trim():t[a]=o+"px"}function Vg(t,a,o){if(a!=null&&typeof a!="object")throw Error(i(62));if(t=t.style,o!=null){for(var l in o)!o.hasOwnProperty(l)||a!=null&&a.hasOwnProperty(l)||(l.indexOf("--")===0?t.setProperty(l,""):l==="float"?t.cssFloat="":t[l]="");for(var p in a)l=a[p],a.hasOwnProperty(p)&&o[p]!==l&&zg(t,p,l)}else for(var v in a)a.hasOwnProperty(v)&&zg(t,v,a[v])}function gd(t){if(t.indexOf("-")===-1)return!1;switch(t){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 oA=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),rA=/^[\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 Vl(t){return rA.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function $a(){}var vd=null;function yd(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Zi=null,Qi=null;function Bg(t){var a=$i(t);if(a&&(t=a.stateNode)){var o=t[fe]||null;e:switch(t=a.stateNode,a.type){case"input":if(md(t,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),a=o.name,o.type==="radio"&&a!=null){for(o=t;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+qn(""+a)+'"][type="radio"]'),a=0;a<o.length;a++){var l=o[a];if(l!==t&&l.form===t.form){var p=l[fe]||null;if(!p)throw Error(i(90));md(l,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(a=0;a<o.length;a++)l=o[a],l.form===t.form&&Dg(l)}break e;case"textarea":kg(t,o.value,o.defaultValue);break e;case"select":a=o.value,a!=null&&Gi(t,!!o.multiple,a,!1)}}}var xd=!1;function Ug(t,a,o){if(xd)return t(a,o);xd=!0;try{var l=t(a);return l}finally{if(xd=!1,(Zi!==null||Qi!==null)&&(Tc(),Zi&&(a=Zi,t=Qi,Qi=Zi=null,Bg(a),t)))for(a=0;a<t.length;a++)Bg(t[a])}}function or(t,a){var o=t.stateNode;if(o===null)return null;var l=o[fe]||null;if(l===null)return null;o=l[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(t=t.type,l=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!l;break e;default:t=!1}if(t)return null;if(o&&typeof o!="function")throw Error(i(231,a,typeof o));return o}var Ka=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),bd=!1;if(Ka)try{var rr={};Object.defineProperty(rr,"passive",{get:function(){bd=!0}}),window.addEventListener("test",rr,rr),window.removeEventListener("test",rr,rr)}catch{bd=!1}var Cs=null,Sd=null,Bl=null;function Hg(){if(Bl)return Bl;var t,a=Sd,o=a.length,l,p="value"in Cs?Cs.value:Cs.textContent,v=p.length;for(t=0;t<o&&a[t]===p[t];t++);var S=o-t;for(l=1;l<=S&&a[o-l]===p[v-l];l++);return Bl=p.slice(t,1<l?1-l:void 0)}function Ul(t){var a=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&a===13&&(t=13)):t=a,t===10&&(t=13),32<=t||t===13?t:0}function Hl(){return!0}function Ig(){return!1}function mn(t){function a(o,l,p,v,S){this._reactName=o,this._targetInst=p,this.type=l,this.nativeEvent=v,this.target=S,this.currentTarget=null;for(var j in t)t.hasOwnProperty(j)&&(o=t[j],this[j]=o?o(v):v[j]);return this.isDefaultPrevented=(v.defaultPrevented!=null?v.defaultPrevented:v.returnValue===!1)?Hl:Ig,this.isPropagationStopped=Ig,this}return g(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=Hl)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=Hl)},persist:function(){},isPersistent:Hl}),a}var ci={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Il=mn(ci),lr=g({},ci,{view:0,detail:0}),lA=mn(lr),wd,Ed,cr,Fl=g({},lr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Td,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==cr&&(cr&&t.type==="mousemove"?(wd=t.screenX-cr.screenX,Ed=t.screenY-cr.screenY):Ed=wd=0,cr=t),wd)},movementY:function(t){return"movementY"in t?t.movementY:Ed}}),Fg=mn(Fl),cA=g({},Fl,{dataTransfer:0}),uA=mn(cA),dA=g({},lr,{relatedTarget:0}),Cd=mn(dA),fA=g({},ci,{animationName:0,elapsedTime:0,pseudoElement:0}),hA=mn(fA),mA=g({},ci,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),pA=mn(mA),gA=g({},ci,{data:0}),qg=mn(gA),vA={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},yA={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"},xA={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function bA(t){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(t):(t=xA[t])?!!a[t]:!1}function Td(){return bA}var SA=g({},lr,{key:function(t){if(t.key){var a=vA[t.key]||t.key;if(a!=="Unidentified")return a}return t.type==="keypress"?(t=Ul(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?yA[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Td,charCode:function(t){return t.type==="keypress"?Ul(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Ul(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),wA=mn(SA),EA=g({},Fl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),$g=mn(EA),CA=g({},lr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Td}),TA=mn(CA),AA=g({},ci,{propertyName:0,elapsedTime:0,pseudoElement:0}),jA=mn(AA),NA=g({},Fl,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),RA=mn(NA),MA=g({},ci,{newState:0,oldState:0}),_A=mn(MA),OA=[9,13,27,32],Ad=Ka&&"CompositionEvent"in window,ur=null;Ka&&"documentMode"in document&&(ur=document.documentMode);var DA=Ka&&"TextEvent"in window&&!ur,Kg=Ka&&(!Ad||ur&&8<ur&&11>=ur),Yg=" ",Gg=!1;function Xg(t,a){switch(t){case"keyup":return OA.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Zg(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Ji=!1;function PA(t,a){switch(t){case"compositionend":return Zg(a);case"keypress":return a.which!==32?null:(Gg=!0,Yg);case"textInput":return t=a.data,t===Yg&&Gg?null:t;default:return null}}function kA(t,a){if(Ji)return t==="compositionend"||!Ad&&Xg(t,a)?(t=Hg(),Bl=Sd=Cs=null,Ji=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return Kg&&a.locale!=="ko"?null:a.data;default:return null}}var LA={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 Qg(t){var a=t&&t.nodeName&&t.nodeName.toLowerCase();return a==="input"?!!LA[t.type]:a==="textarea"}function Jg(t,a,o,l){Zi?Qi?Qi.push(l):Qi=[l]:Zi=l,a=Oc(a,"onChange"),0<a.length&&(o=new Il("onChange","change",null,o,l),t.push({event:o,listeners:a}))}var dr=null,fr=null;function zA(t){Px(t,0)}function ql(t){var a=ir(t);if(Dg(a))return t}function Wg(t,a){if(t==="change")return a}var ev=!1;if(Ka){var jd;if(Ka){var Nd="oninput"in document;if(!Nd){var tv=document.createElement("div");tv.setAttribute("oninput","return;"),Nd=typeof tv.oninput=="function"}jd=Nd}else jd=!1;ev=jd&&(!document.documentMode||9<document.documentMode)}function nv(){dr&&(dr.detachEvent("onpropertychange",av),fr=dr=null)}function av(t){if(t.propertyName==="value"&&ql(fr)){var a=[];Jg(a,fr,t,yd(t)),Ug(zA,a)}}function VA(t,a,o){t==="focusin"?(nv(),dr=a,fr=o,dr.attachEvent("onpropertychange",av)):t==="focusout"&&nv()}function BA(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return ql(fr)}function UA(t,a){if(t==="click")return ql(a)}function HA(t,a){if(t==="input"||t==="change")return ql(a)}function IA(t,a){return t===a&&(t!==0||1/t===1/a)||t!==t&&a!==a}var Mn=typeof Object.is=="function"?Object.is:IA;function hr(t,a){if(Mn(t,a))return!0;if(typeof t!="object"||t===null||typeof a!="object"||a===null)return!1;var o=Object.keys(t),l=Object.keys(a);if(o.length!==l.length)return!1;for(l=0;l<o.length;l++){var p=o[l];if(!Ht.call(a,p)||!Mn(t[p],a[p]))return!1}return!0}function sv(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function iv(t,a){var o=sv(t);t=0;for(var l;o;){if(o.nodeType===3){if(l=t+o.textContent.length,t<=a&&l>=a)return{node:o,offset:a-t};t=l}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=sv(o)}}function ov(t,a){return t&&a?t===a?!0:t&&t.nodeType===3?!1:a&&a.nodeType===3?ov(t,a.parentNode):"contains"in t?t.contains(a):t.compareDocumentPosition?!!(t.compareDocumentPosition(a)&16):!1:!1}function rv(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var a=zl(t.document);a instanceof t.HTMLIFrameElement;){try{var o=typeof a.contentWindow.location.href=="string"}catch{o=!1}if(o)t=a.contentWindow;else break;a=zl(t.document)}return a}function Rd(t){var a=t&&t.nodeName&&t.nodeName.toLowerCase();return a&&(a==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||a==="textarea"||t.contentEditable==="true")}var FA=Ka&&"documentMode"in document&&11>=document.documentMode,Wi=null,Md=null,mr=null,_d=!1;function lv(t,a,o){var l=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;_d||Wi==null||Wi!==zl(l)||(l=Wi,"selectionStart"in l&&Rd(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),mr&&hr(mr,l)||(mr=l,l=Oc(Md,"onSelect"),0<l.length&&(a=new Il("onSelect","select",null,a,o),t.push({event:a,listeners:l}),a.target=Wi)))}function ui(t,a){var o={};return o[t.toLowerCase()]=a.toLowerCase(),o["Webkit"+t]="webkit"+a,o["Moz"+t]="moz"+a,o}var eo={animationend:ui("Animation","AnimationEnd"),animationiteration:ui("Animation","AnimationIteration"),animationstart:ui("Animation","AnimationStart"),transitionrun:ui("Transition","TransitionRun"),transitionstart:ui("Transition","TransitionStart"),transitioncancel:ui("Transition","TransitionCancel"),transitionend:ui("Transition","TransitionEnd")},Od={},cv={};Ka&&(cv=document.createElement("div").style,"AnimationEvent"in window||(delete eo.animationend.animation,delete eo.animationiteration.animation,delete eo.animationstart.animation),"TransitionEvent"in window||delete eo.transitionend.transition);function di(t){if(Od[t])return Od[t];if(!eo[t])return t;var a=eo[t],o;for(o in a)if(a.hasOwnProperty(o)&&o in cv)return Od[t]=a[o];return t}var uv=di("animationend"),dv=di("animationiteration"),fv=di("animationstart"),qA=di("transitionrun"),$A=di("transitionstart"),KA=di("transitioncancel"),hv=di("transitionend"),mv=new Map,Dd="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Dd.push("scrollEnd");function da(t,a){mv.set(t,a),li(a,[t])}var $l=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},$n=[],to=0,Pd=0;function Kl(){for(var t=to,a=Pd=to=0;a<t;){var o=$n[a];$n[a++]=null;var l=$n[a];$n[a++]=null;var p=$n[a];$n[a++]=null;var v=$n[a];if($n[a++]=null,l!==null&&p!==null){var S=l.pending;S===null?p.next=p:(p.next=S.next,S.next=p),l.pending=p}v!==0&&pv(o,p,v)}}function Yl(t,a,o,l){$n[to++]=t,$n[to++]=a,$n[to++]=o,$n[to++]=l,Pd|=l,t.lanes|=l,t=t.alternate,t!==null&&(t.lanes|=l)}function kd(t,a,o,l){return Yl(t,a,o,l),Gl(t)}function fi(t,a){return Yl(t,null,null,a),Gl(t)}function pv(t,a,o){t.lanes|=o;var l=t.alternate;l!==null&&(l.lanes|=o);for(var p=!1,v=t.return;v!==null;)v.childLanes|=o,l=v.alternate,l!==null&&(l.childLanes|=o),v.tag===22&&(t=v.stateNode,t===null||t._visibility&1||(p=!0)),t=v,v=v.return;return t.tag===3?(v=t.stateNode,p&&a!==null&&(p=31-bt(o),t=v.hiddenUpdates,l=t[p],l===null?t[p]=[a]:l.push(a),a.lane=o|536870912),v):null}function Gl(t){if(50<Lr)throw Lr=0,$f=null,Error(i(185));for(var a=t.return;a!==null;)t=a,a=t.return;return t.tag===3?t.stateNode:null}var no={};function YA(t,a,o,l){this.tag=t,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _n(t,a,o,l){return new YA(t,a,o,l)}function Ld(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Ya(t,a){var o=t.alternate;return o===null?(o=_n(t.tag,a,t.key,t.mode),o.elementType=t.elementType,o.type=t.type,o.stateNode=t.stateNode,o.alternate=t,t.alternate=o):(o.pendingProps=a,o.type=t.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=t.flags&65011712,o.childLanes=t.childLanes,o.lanes=t.lanes,o.child=t.child,o.memoizedProps=t.memoizedProps,o.memoizedState=t.memoizedState,o.updateQueue=t.updateQueue,a=t.dependencies,o.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},o.sibling=t.sibling,o.index=t.index,o.ref=t.ref,o.refCleanup=t.refCleanup,o}function gv(t,a){t.flags&=65011714;var o=t.alternate;return o===null?(t.childLanes=0,t.lanes=a,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=o.childLanes,t.lanes=o.lanes,t.child=o.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=o.memoizedProps,t.memoizedState=o.memoizedState,t.updateQueue=o.updateQueue,t.type=o.type,a=o.dependencies,t.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),t}function Xl(t,a,o,l,p,v){var S=0;if(l=t,typeof t=="function")Ld(t)&&(S=1);else if(typeof t=="string")S=Jj(t,o,te.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case K:return t=_n(31,o,a,p),t.elementType=K,t.lanes=v,t;case C:return hi(o.children,p,v,a);case A:S=8,p|=24;break;case T:return t=_n(12,o,a,p|2),t.elementType=T,t.lanes=v,t;case M:return t=_n(13,o,a,p),t.elementType=M,t.lanes=v,t;case U:return t=_n(19,o,a,p),t.elementType=U,t.lanes=v,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case R:S=10;break e;case N:S=9;break e;case _:S=11;break e;case L:S=14;break e;case O:S=16,l=null;break e}S=29,o=Error(i(130,t===null?"null":typeof t,"")),l=null}return a=_n(S,o,a,p),a.elementType=t,a.type=l,a.lanes=v,a}function hi(t,a,o,l){return t=_n(7,t,l,a),t.lanes=o,t}function zd(t,a,o){return t=_n(6,t,null,a),t.lanes=o,t}function vv(t){var a=_n(18,null,null,0);return a.stateNode=t,a}function Vd(t,a,o){return a=_n(4,t.children!==null?t.children:[],t.key,a),a.lanes=o,a.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},a}var yv=new WeakMap;function Kn(t,a){if(typeof t=="object"&&t!==null){var o=yv.get(t);return o!==void 0?o:(a={value:t,source:a,stack:Ea(a)},yv.set(t,a),a)}return{value:t,source:a,stack:Ea(a)}}var ao=[],so=0,Zl=null,pr=0,Yn=[],Gn=0,Ts=null,Aa=1,ja="";function Ga(t,a){ao[so++]=pr,ao[so++]=Zl,Zl=t,pr=a}function xv(t,a,o){Yn[Gn++]=Aa,Yn[Gn++]=ja,Yn[Gn++]=Ts,Ts=t;var l=Aa;t=ja;var p=32-bt(l)-1;l&=~(1<<p),o+=1;var v=32-bt(a)+p;if(30<v){var S=p-p%5;v=(l&(1<<S)-1).toString(32),l>>=S,p-=S,Aa=1<<32-bt(a)+p|o<<p|l,ja=v+t}else Aa=1<<v|o<<p|l,ja=t}function Bd(t){t.return!==null&&(Ga(t,1),xv(t,1,0))}function Ud(t){for(;t===Zl;)Zl=ao[--so],ao[so]=null,pr=ao[--so],ao[so]=null;for(;t===Ts;)Ts=Yn[--Gn],Yn[Gn]=null,ja=Yn[--Gn],Yn[Gn]=null,Aa=Yn[--Gn],Yn[Gn]=null}function bv(t,a){Yn[Gn++]=Aa,Yn[Gn++]=ja,Yn[Gn++]=Ts,Aa=a.id,ja=a.overflow,Ts=t}var It=null,tt=null,Ve=!1,As=null,Xn=!1,Hd=Error(i(519));function js(t){var a=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw gr(Kn(a,t)),Hd}function Sv(t){var a=t.stateNode,o=t.type,l=t.memoizedProps;switch(a[Dt]=t,a[fe]=l,o){case"dialog":ke("cancel",a),ke("close",a);break;case"iframe":case"object":case"embed":ke("load",a);break;case"video":case"audio":for(o=0;o<Vr.length;o++)ke(Vr[o],a);break;case"source":ke("error",a);break;case"img":case"image":case"link":ke("error",a),ke("load",a);break;case"details":ke("toggle",a);break;case"input":ke("invalid",a),Pg(a,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":ke("invalid",a);break;case"textarea":ke("invalid",a),Lg(a,l.value,l.defaultValue,l.children)}o=l.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||a.textContent===""+o||l.suppressHydrationWarning===!0||Vx(a.textContent,o)?(l.popover!=null&&(ke("beforetoggle",a),ke("toggle",a)),l.onScroll!=null&&ke("scroll",a),l.onScrollEnd!=null&&ke("scrollend",a),l.onClick!=null&&(a.onclick=$a),a=!0):a=!1,a||js(t,!0)}function wv(t){for(It=t.return;It;)switch(It.tag){case 5:case 31:case 13:Xn=!1;return;case 27:case 3:Xn=!0;return;default:It=It.return}}function io(t){if(t!==It)return!1;if(!Ve)return wv(t),Ve=!0,!1;var a=t.tag,o;if((o=a!==3&&a!==27)&&((o=a===5)&&(o=t.type,o=!(o!=="form"&&o!=="button")||oh(t.type,t.memoizedProps)),o=!o),o&&tt&&js(t),wv(t),a===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(i(317));tt=Yx(t)}else if(a===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(i(317));tt=Yx(t)}else a===27?(a=tt,Hs(t.type)?(t=dh,dh=null,tt=t):tt=a):tt=It?Qn(t.stateNode.nextSibling):null;return!0}function mi(){tt=It=null,Ve=!1}function Id(){var t=As;return t!==null&&(yn===null?yn=t:yn.push.apply(yn,t),As=null),t}function gr(t){As===null?As=[t]:As.push(t)}var Fd=P(null),pi=null,Xa=null;function Ns(t,a,o){G(Fd,a._currentValue),a._currentValue=o}function Za(t){t._currentValue=Fd.current,X(Fd)}function qd(t,a,o){for(;t!==null;){var l=t.alternate;if((t.childLanes&a)!==a?(t.childLanes|=a,l!==null&&(l.childLanes|=a)):l!==null&&(l.childLanes&a)!==a&&(l.childLanes|=a),t===o)break;t=t.return}}function $d(t,a,o,l){var p=t.child;for(p!==null&&(p.return=t);p!==null;){var v=p.dependencies;if(v!==null){var S=p.child;v=v.firstContext;e:for(;v!==null;){var j=v;v=p;for(var k=0;k<a.length;k++)if(j.context===a[k]){v.lanes|=o,j=v.alternate,j!==null&&(j.lanes|=o),qd(v.return,o,t),l||(S=null);break e}v=j.next}}else if(p.tag===18){if(S=p.return,S===null)throw Error(i(341));S.lanes|=o,v=S.alternate,v!==null&&(v.lanes|=o),qd(S,o,t),S=null}else S=p.child;if(S!==null)S.return=p;else for(S=p;S!==null;){if(S===t){S=null;break}if(p=S.sibling,p!==null){p.return=S.return,S=p;break}S=S.return}p=S}}function oo(t,a,o,l){t=null;for(var p=a,v=!1;p!==null;){if(!v){if((p.flags&524288)!==0)v=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var S=p.alternate;if(S===null)throw Error(i(387));if(S=S.memoizedProps,S!==null){var j=p.type;Mn(p.pendingProps.value,S.value)||(t!==null?t.push(j):t=[j])}}else if(p===ae.current){if(S=p.alternate,S===null)throw Error(i(387));S.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(t!==null?t.push(Fr):t=[Fr])}p=p.return}t!==null&&$d(a,t,o,l),a.flags|=262144}function Ql(t){for(t=t.firstContext;t!==null;){if(!Mn(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function gi(t){pi=t,Xa=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Ft(t){return Ev(pi,t)}function Jl(t,a){return pi===null&&gi(t),Ev(t,a)}function Ev(t,a){var o=a._currentValue;if(a={context:a,memoizedValue:o,next:null},Xa===null){if(t===null)throw Error(i(308));Xa=a,t.dependencies={lanes:0,firstContext:a},t.flags|=524288}else Xa=Xa.next=a;return o}var GA=typeof AbortController<"u"?AbortController:function(){var t=[],a=this.signal={aborted:!1,addEventListener:function(o,l){t.push(l)}};this.abort=function(){a.aborted=!0,t.forEach(function(o){return o()})}},XA=e.unstable_scheduleCallback,ZA=e.unstable_NormalPriority,Et={$$typeof:R,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Kd(){return{controller:new GA,data:new Map,refCount:0}}function vr(t){t.refCount--,t.refCount===0&&XA(ZA,function(){t.controller.abort()})}var yr=null,Yd=0,ro=0,lo=null;function QA(t,a){if(yr===null){var o=yr=[];Yd=0,ro=Qf(),lo={status:"pending",value:void 0,then:function(l){o.push(l)}}}return Yd++,a.then(Cv,Cv),a}function Cv(){if(--Yd===0&&yr!==null){lo!==null&&(lo.status="fulfilled");var t=yr;yr=null,ro=0,lo=null;for(var a=0;a<t.length;a++)(0,t[a])()}}function JA(t,a){var o=[],l={status:"pending",value:null,reason:null,then:function(p){o.push(p)}};return t.then(function(){l.status="fulfilled",l.value=a;for(var p=0;p<o.length;p++)(0,o[p])(a)},function(p){for(l.status="rejected",l.reason=p,p=0;p<o.length;p++)(0,o[p])(void 0)}),l}var Tv=D.S;D.S=function(t,a){lx=_t(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&QA(t,a),Tv!==null&&Tv(t,a)};var vi=P(null);function Gd(){var t=vi.current;return t!==null?t:Ze.pooledCache}function Wl(t,a){a===null?G(vi,vi.current):G(vi,a.pool)}function Av(){var t=Gd();return t===null?null:{parent:Et._currentValue,pool:t}}var co=Error(i(460)),Xd=Error(i(474)),ec=Error(i(542)),tc={then:function(){}};function jv(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Nv(t,a,o){switch(o=t[o],o===void 0?t.push(a):o!==a&&(a.then($a,$a),a=o),a.status){case"fulfilled":return a.value;case"rejected":throw t=a.reason,Mv(t),t;default:if(typeof a.status=="string")a.then($a,$a);else{if(t=Ze,t!==null&&100<t.shellSuspendCounter)throw Error(i(482));t=a,t.status="pending",t.then(function(l){if(a.status==="pending"){var p=a;p.status="fulfilled",p.value=l}},function(l){if(a.status==="pending"){var p=a;p.status="rejected",p.reason=l}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw t=a.reason,Mv(t),t}throw xi=a,co}}function yi(t){try{var a=t._init;return a(t._payload)}catch(o){throw o!==null&&typeof o=="object"&&typeof o.then=="function"?(xi=o,co):o}}var xi=null;function Rv(){if(xi===null)throw Error(i(459));var t=xi;return xi=null,t}function Mv(t){if(t===co||t===ec)throw Error(i(483))}var uo=null,xr=0;function nc(t){var a=xr;return xr+=1,uo===null&&(uo=[]),Nv(uo,t,a)}function br(t,a){a=a.props.ref,t.ref=a!==void 0?a:null}function ac(t,a){throw a.$$typeof===b?Error(i(525)):(t=Object.prototype.toString.call(a),Error(i(31,t==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":t)))}function _v(t){function a(B,z){if(t){var F=B.deletions;F===null?(B.deletions=[z],B.flags|=16):F.push(z)}}function o(B,z){if(!t)return null;for(;z!==null;)a(B,z),z=z.sibling;return null}function l(B){for(var z=new Map;B!==null;)B.key!==null?z.set(B.key,B):z.set(B.index,B),B=B.sibling;return z}function p(B,z){return B=Ya(B,z),B.index=0,B.sibling=null,B}function v(B,z,F){return B.index=F,t?(F=B.alternate,F!==null?(F=F.index,F<z?(B.flags|=67108866,z):F):(B.flags|=67108866,z)):(B.flags|=1048576,z)}function S(B){return t&&B.alternate===null&&(B.flags|=67108866),B}function j(B,z,F,W){return z===null||z.tag!==6?(z=zd(F,B.mode,W),z.return=B,z):(z=p(z,F),z.return=B,z)}function k(B,z,F,W){var Se=F.type;return Se===C?Q(B,z,F.props.children,W,F.key):z!==null&&(z.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===O&&yi(Se)===z.type)?(z=p(z,F.props),br(z,F),z.return=B,z):(z=Xl(F.type,F.key,F.props,null,B.mode,W),br(z,F),z.return=B,z)}function q(B,z,F,W){return z===null||z.tag!==4||z.stateNode.containerInfo!==F.containerInfo||z.stateNode.implementation!==F.implementation?(z=Vd(F,B.mode,W),z.return=B,z):(z=p(z,F.children||[]),z.return=B,z)}function Q(B,z,F,W,Se){return z===null||z.tag!==7?(z=hi(F,B.mode,W,Se),z.return=B,z):(z=p(z,F),z.return=B,z)}function ee(B,z,F){if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return z=zd(""+z,B.mode,F),z.return=B,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case w:return F=Xl(z.type,z.key,z.props,null,B.mode,F),br(F,z),F.return=B,F;case E:return z=Vd(z,B.mode,F),z.return=B,z;case O:return z=yi(z),ee(B,z,F)}if(le(z)||se(z))return z=hi(z,B.mode,F,null),z.return=B,z;if(typeof z.then=="function")return ee(B,nc(z),F);if(z.$$typeof===R)return ee(B,Jl(B,z),F);ac(B,z)}return null}function $(B,z,F,W){var Se=z!==null?z.key:null;if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return Se!==null?null:j(B,z,""+F,W);if(typeof F=="object"&&F!==null){switch(F.$$typeof){case w:return F.key===Se?k(B,z,F,W):null;case E:return F.key===Se?q(B,z,F,W):null;case O:return F=yi(F),$(B,z,F,W)}if(le(F)||se(F))return Se!==null?null:Q(B,z,F,W,null);if(typeof F.then=="function")return $(B,z,nc(F),W);if(F.$$typeof===R)return $(B,z,Jl(B,F),W);ac(B,F)}return null}function Y(B,z,F,W,Se){if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return B=B.get(F)||null,j(z,B,""+W,Se);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case w:return B=B.get(W.key===null?F:W.key)||null,k(z,B,W,Se);case E:return B=B.get(W.key===null?F:W.key)||null,q(z,B,W,Se);case O:return W=yi(W),Y(B,z,F,W,Se)}if(le(W)||se(W))return B=B.get(F)||null,Q(z,B,W,Se,null);if(typeof W.then=="function")return Y(B,z,F,nc(W),Se);if(W.$$typeof===R)return Y(B,z,F,Jl(z,W),Se);ac(z,W)}return null}function pe(B,z,F,W){for(var Se=null,Ue=null,ye=z,Me=z=0,ze=null;ye!==null&&Me<F.length;Me++){ye.index>Me?(ze=ye,ye=null):ze=ye.sibling;var He=$(B,ye,F[Me],W);if(He===null){ye===null&&(ye=ze);break}t&&ye&&He.alternate===null&&a(B,ye),z=v(He,z,Me),Ue===null?Se=He:Ue.sibling=He,Ue=He,ye=ze}if(Me===F.length)return o(B,ye),Ve&&Ga(B,Me),Se;if(ye===null){for(;Me<F.length;Me++)ye=ee(B,F[Me],W),ye!==null&&(z=v(ye,z,Me),Ue===null?Se=ye:Ue.sibling=ye,Ue=ye);return Ve&&Ga(B,Me),Se}for(ye=l(ye);Me<F.length;Me++)ze=Y(ye,B,Me,F[Me],W),ze!==null&&(t&&ze.alternate!==null&&ye.delete(ze.key===null?Me:ze.key),z=v(ze,z,Me),Ue===null?Se=ze:Ue.sibling=ze,Ue=ze);return t&&ye.forEach(function(Ks){return a(B,Ks)}),Ve&&Ga(B,Me),Se}function Ee(B,z,F,W){if(F==null)throw Error(i(151));for(var Se=null,Ue=null,ye=z,Me=z=0,ze=null,He=F.next();ye!==null&&!He.done;Me++,He=F.next()){ye.index>Me?(ze=ye,ye=null):ze=ye.sibling;var Ks=$(B,ye,He.value,W);if(Ks===null){ye===null&&(ye=ze);break}t&&ye&&Ks.alternate===null&&a(B,ye),z=v(Ks,z,Me),Ue===null?Se=Ks:Ue.sibling=Ks,Ue=Ks,ye=ze}if(He.done)return o(B,ye),Ve&&Ga(B,Me),Se;if(ye===null){for(;!He.done;Me++,He=F.next())He=ee(B,He.value,W),He!==null&&(z=v(He,z,Me),Ue===null?Se=He:Ue.sibling=He,Ue=He);return Ve&&Ga(B,Me),Se}for(ye=l(ye);!He.done;Me++,He=F.next())He=Y(ye,B,Me,He.value,W),He!==null&&(t&&He.alternate!==null&&ye.delete(He.key===null?Me:He.key),z=v(He,z,Me),Ue===null?Se=He:Ue.sibling=He,Ue=He);return t&&ye.forEach(function(cN){return a(B,cN)}),Ve&&Ga(B,Me),Se}function Xe(B,z,F,W){if(typeof F=="object"&&F!==null&&F.type===C&&F.key===null&&(F=F.props.children),typeof F=="object"&&F!==null){switch(F.$$typeof){case w:e:{for(var Se=F.key;z!==null;){if(z.key===Se){if(Se=F.type,Se===C){if(z.tag===7){o(B,z.sibling),W=p(z,F.props.children),W.return=B,B=W;break e}}else if(z.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===O&&yi(Se)===z.type){o(B,z.sibling),W=p(z,F.props),br(W,F),W.return=B,B=W;break e}o(B,z);break}else a(B,z);z=z.sibling}F.type===C?(W=hi(F.props.children,B.mode,W,F.key),W.return=B,B=W):(W=Xl(F.type,F.key,F.props,null,B.mode,W),br(W,F),W.return=B,B=W)}return S(B);case E:e:{for(Se=F.key;z!==null;){if(z.key===Se)if(z.tag===4&&z.stateNode.containerInfo===F.containerInfo&&z.stateNode.implementation===F.implementation){o(B,z.sibling),W=p(z,F.children||[]),W.return=B,B=W;break e}else{o(B,z);break}else a(B,z);z=z.sibling}W=Vd(F,B.mode,W),W.return=B,B=W}return S(B);case O:return F=yi(F),Xe(B,z,F,W)}if(le(F))return pe(B,z,F,W);if(se(F)){if(Se=se(F),typeof Se!="function")throw Error(i(150));return F=Se.call(F),Ee(B,z,F,W)}if(typeof F.then=="function")return Xe(B,z,nc(F),W);if(F.$$typeof===R)return Xe(B,z,Jl(B,F),W);ac(B,F)}return typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint"?(F=""+F,z!==null&&z.tag===6?(o(B,z.sibling),W=p(z,F),W.return=B,B=W):(o(B,z),W=zd(F,B.mode,W),W.return=B,B=W),S(B)):o(B,z)}return function(B,z,F,W){try{xr=0;var Se=Xe(B,z,F,W);return uo=null,Se}catch(ye){if(ye===co||ye===ec)throw ye;var Ue=_n(29,ye,null,B.mode);return Ue.lanes=W,Ue.return=B,Ue}}}var bi=_v(!0),Ov=_v(!1),Rs=!1;function Zd(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Qd(t,a){t=t.updateQueue,a.updateQueue===t&&(a.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Ms(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function _s(t,a,o){var l=t.updateQueue;if(l===null)return null;if(l=l.shared,(Fe&2)!==0){var p=l.pending;return p===null?a.next=a:(a.next=p.next,p.next=a),l.pending=a,a=Gl(t),pv(t,null,o),a}return Yl(t,l,a,o),Gl(t)}function Sr(t,a,o){if(a=a.updateQueue,a!==null&&(a=a.shared,(o&4194048)!==0)){var l=a.lanes;l&=t.pendingLanes,o|=l,a.lanes=o,Zt(t,o)}}function Jd(t,a){var o=t.updateQueue,l=t.alternate;if(l!==null&&(l=l.updateQueue,o===l)){var p=null,v=null;if(o=o.firstBaseUpdate,o!==null){do{var S={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};v===null?p=v=S:v=v.next=S,o=o.next}while(o!==null);v===null?p=v=a:v=v.next=a}else p=v=a;o={baseState:l.baseState,firstBaseUpdate:p,lastBaseUpdate:v,shared:l.shared,callbacks:l.callbacks},t.updateQueue=o;return}t=o.lastBaseUpdate,t===null?o.firstBaseUpdate=a:t.next=a,o.lastBaseUpdate=a}var Wd=!1;function wr(){if(Wd){var t=lo;if(t!==null)throw t}}function Er(t,a,o,l){Wd=!1;var p=t.updateQueue;Rs=!1;var v=p.firstBaseUpdate,S=p.lastBaseUpdate,j=p.shared.pending;if(j!==null){p.shared.pending=null;var k=j,q=k.next;k.next=null,S===null?v=q:S.next=q,S=k;var Q=t.alternate;Q!==null&&(Q=Q.updateQueue,j=Q.lastBaseUpdate,j!==S&&(j===null?Q.firstBaseUpdate=q:j.next=q,Q.lastBaseUpdate=k))}if(v!==null){var ee=p.baseState;S=0,Q=q=k=null,j=v;do{var $=j.lane&-536870913,Y=$!==j.lane;if(Y?(Le&$)===$:(l&$)===$){$!==0&&$===ro&&(Wd=!0),Q!==null&&(Q=Q.next={lane:0,tag:j.tag,payload:j.payload,callback:null,next:null});e:{var pe=t,Ee=j;$=a;var Xe=o;switch(Ee.tag){case 1:if(pe=Ee.payload,typeof pe=="function"){ee=pe.call(Xe,ee,$);break e}ee=pe;break e;case 3:pe.flags=pe.flags&-65537|128;case 0:if(pe=Ee.payload,$=typeof pe=="function"?pe.call(Xe,ee,$):pe,$==null)break e;ee=g({},ee,$);break e;case 2:Rs=!0}}$=j.callback,$!==null&&(t.flags|=64,Y&&(t.flags|=8192),Y=p.callbacks,Y===null?p.callbacks=[$]:Y.push($))}else Y={lane:$,tag:j.tag,payload:j.payload,callback:j.callback,next:null},Q===null?(q=Q=Y,k=ee):Q=Q.next=Y,S|=$;if(j=j.next,j===null){if(j=p.shared.pending,j===null)break;Y=j,j=Y.next,Y.next=null,p.lastBaseUpdate=Y,p.shared.pending=null}}while(!0);Q===null&&(k=ee),p.baseState=k,p.firstBaseUpdate=q,p.lastBaseUpdate=Q,v===null&&(p.shared.lanes=0),Ls|=S,t.lanes=S,t.memoizedState=ee}}function Dv(t,a){if(typeof t!="function")throw Error(i(191,t));t.call(a)}function Pv(t,a){var o=t.callbacks;if(o!==null)for(t.callbacks=null,t=0;t<o.length;t++)Dv(o[t],a)}var fo=P(null),sc=P(0);function kv(t,a){t=is,G(sc,t),G(fo,a),is=t|a.baseLanes}function ef(){G(sc,is),G(fo,fo.current)}function tf(){is=sc.current,X(fo),X(sc)}var On=P(null),Zn=null;function Os(t){var a=t.alternate;G(yt,yt.current&1),G(On,t),Zn===null&&(a===null||fo.current!==null||a.memoizedState!==null)&&(Zn=t)}function nf(t){G(yt,yt.current),G(On,t),Zn===null&&(Zn=t)}function Lv(t){t.tag===22?(G(yt,yt.current),G(On,t),Zn===null&&(Zn=t)):Ds()}function Ds(){G(yt,yt.current),G(On,On.current)}function Dn(t){X(On),Zn===t&&(Zn=null),X(yt)}var yt=P(0);function ic(t){for(var a=t;a!==null;){if(a.tag===13){var o=a.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||ch(o)||uh(o)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break;for(;a.sibling===null;){if(a.return===null||a.return===t)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var Qa=0,Re=null,Ye=null,Ct=null,oc=!1,ho=!1,Si=!1,rc=0,Cr=0,mo=null,WA=0;function ut(){throw Error(i(321))}function af(t,a){if(a===null)return!1;for(var o=0;o<a.length&&o<t.length;o++)if(!Mn(t[o],a[o]))return!1;return!0}function sf(t,a,o,l,p,v){return Qa=v,Re=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,D.H=t===null||t.memoizedState===null?xy:bf,Si=!1,v=o(l,p),Si=!1,ho&&(v=Vv(a,o,l,p)),zv(t),v}function zv(t){D.H=jr;var a=Ye!==null&&Ye.next!==null;if(Qa=0,Ct=Ye=Re=null,oc=!1,Cr=0,mo=null,a)throw Error(i(300));t===null||Tt||(t=t.dependencies,t!==null&&Ql(t)&&(Tt=!0))}function Vv(t,a,o,l){Re=t;var p=0;do{if(ho&&(mo=null),Cr=0,ho=!1,25<=p)throw Error(i(301));if(p+=1,Ct=Ye=null,t.updateQueue!=null){var v=t.updateQueue;v.lastEffect=null,v.events=null,v.stores=null,v.memoCache!=null&&(v.memoCache.index=0)}D.H=by,v=a(o,l)}while(ho);return v}function ej(){var t=D.H,a=t.useState()[0];return a=typeof a.then=="function"?Tr(a):a,t=t.useState()[0],(Ye!==null?Ye.memoizedState:null)!==t&&(Re.flags|=1024),a}function of(){var t=rc!==0;return rc=0,t}function rf(t,a,o){a.updateQueue=t.updateQueue,a.flags&=-2053,t.lanes&=~o}function lf(t){if(oc){for(t=t.memoizedState;t!==null;){var a=t.queue;a!==null&&(a.pending=null),t=t.next}oc=!1}Qa=0,Ct=Ye=Re=null,ho=!1,Cr=rc=0,mo=null}function on(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ct===null?Re.memoizedState=Ct=t:Ct=Ct.next=t,Ct}function xt(){if(Ye===null){var t=Re.alternate;t=t!==null?t.memoizedState:null}else t=Ye.next;var a=Ct===null?Re.memoizedState:Ct.next;if(a!==null)Ct=a,Ye=t;else{if(t===null)throw Re.alternate===null?Error(i(467)):Error(i(310));Ye=t,t={memoizedState:Ye.memoizedState,baseState:Ye.baseState,baseQueue:Ye.baseQueue,queue:Ye.queue,next:null},Ct===null?Re.memoizedState=Ct=t:Ct=Ct.next=t}return Ct}function lc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Tr(t){var a=Cr;return Cr+=1,mo===null&&(mo=[]),t=Nv(mo,t,a),a=Re,(Ct===null?a.memoizedState:Ct.next)===null&&(a=a.alternate,D.H=a===null||a.memoizedState===null?xy:bf),t}function cc(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Tr(t);if(t.$$typeof===R)return Ft(t)}throw Error(i(438,String(t)))}function cf(t){var a=null,o=Re.updateQueue;if(o!==null&&(a=o.memoCache),a==null){var l=Re.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(a={data:l.data.map(function(p){return p.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),o===null&&(o=lc(),Re.updateQueue=o),o.memoCache=a,o=a.data[a.index],o===void 0)for(o=a.data[a.index]=Array(t),l=0;l<t;l++)o[l]=Z;return a.index++,o}function Ja(t,a){return typeof a=="function"?a(t):a}function uc(t){var a=xt();return uf(a,Ye,t)}function uf(t,a,o){var l=t.queue;if(l===null)throw Error(i(311));l.lastRenderedReducer=o;var p=t.baseQueue,v=l.pending;if(v!==null){if(p!==null){var S=p.next;p.next=v.next,v.next=S}a.baseQueue=p=v,l.pending=null}if(v=t.baseState,p===null)t.memoizedState=v;else{a=p.next;var j=S=null,k=null,q=a,Q=!1;do{var ee=q.lane&-536870913;if(ee!==q.lane?(Le&ee)===ee:(Qa&ee)===ee){var $=q.revertLane;if($===0)k!==null&&(k=k.next={lane:0,revertLane:0,gesture:null,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null}),ee===ro&&(Q=!0);else if((Qa&$)===$){q=q.next,$===ro&&(Q=!0);continue}else ee={lane:0,revertLane:q.revertLane,gesture:null,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null},k===null?(j=k=ee,S=v):k=k.next=ee,Re.lanes|=$,Ls|=$;ee=q.action,Si&&o(v,ee),v=q.hasEagerState?q.eagerState:o(v,ee)}else $={lane:ee,revertLane:q.revertLane,gesture:q.gesture,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null},k===null?(j=k=$,S=v):k=k.next=$,Re.lanes|=ee,Ls|=ee;q=q.next}while(q!==null&&q!==a);if(k===null?S=v:k.next=j,!Mn(v,t.memoizedState)&&(Tt=!0,Q&&(o=lo,o!==null)))throw o;t.memoizedState=v,t.baseState=S,t.baseQueue=k,l.lastRenderedState=v}return p===null&&(l.lanes=0),[t.memoizedState,l.dispatch]}function df(t){var a=xt(),o=a.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=t;var l=o.dispatch,p=o.pending,v=a.memoizedState;if(p!==null){o.pending=null;var S=p=p.next;do v=t(v,S.action),S=S.next;while(S!==p);Mn(v,a.memoizedState)||(Tt=!0),a.memoizedState=v,a.baseQueue===null&&(a.baseState=v),o.lastRenderedState=v}return[v,l]}function Bv(t,a,o){var l=Re,p=xt(),v=Ve;if(v){if(o===void 0)throw Error(i(407));o=o()}else o=a();var S=!Mn((Ye||p).memoizedState,o);if(S&&(p.memoizedState=o,Tt=!0),p=p.queue,mf(Iv.bind(null,l,p,t),[t]),p.getSnapshot!==a||S||Ct!==null&&Ct.memoizedState.tag&1){if(l.flags|=2048,po(9,{destroy:void 0},Hv.bind(null,l,p,o,a),null),Ze===null)throw Error(i(349));v||(Qa&127)!==0||Uv(l,a,o)}return o}function Uv(t,a,o){t.flags|=16384,t={getSnapshot:a,value:o},a=Re.updateQueue,a===null?(a=lc(),Re.updateQueue=a,a.stores=[t]):(o=a.stores,o===null?a.stores=[t]:o.push(t))}function Hv(t,a,o,l){a.value=o,a.getSnapshot=l,Fv(a)&&qv(t)}function Iv(t,a,o){return o(function(){Fv(a)&&qv(t)})}function Fv(t){var a=t.getSnapshot;t=t.value;try{var o=a();return!Mn(t,o)}catch{return!0}}function qv(t){var a=fi(t,2);a!==null&&xn(a,t,2)}function ff(t){var a=on();if(typeof t=="function"){var o=t;if(t=o(),Si){an(!0);try{o()}finally{an(!1)}}}return a.memoizedState=a.baseState=t,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ja,lastRenderedState:t},a}function $v(t,a,o,l){return t.baseState=o,uf(t,Ye,typeof l=="function"?l:Ja)}function tj(t,a,o,l,p){if(hc(t))throw Error(i(485));if(t=a.action,t!==null){var v={payload:p,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(S){v.listeners.push(S)}};D.T!==null?o(!0):v.isTransition=!1,l(v),o=a.pending,o===null?(v.next=a.pending=v,Kv(a,v)):(v.next=o.next,a.pending=o.next=v)}}function Kv(t,a){var o=a.action,l=a.payload,p=t.state;if(a.isTransition){var v=D.T,S={};D.T=S;try{var j=o(p,l),k=D.S;k!==null&&k(S,j),Yv(t,a,j)}catch(q){hf(t,a,q)}finally{v!==null&&S.types!==null&&(v.types=S.types),D.T=v}}else try{v=o(p,l),Yv(t,a,v)}catch(q){hf(t,a,q)}}function Yv(t,a,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(l){Gv(t,a,l)},function(l){return hf(t,a,l)}):Gv(t,a,o)}function Gv(t,a,o){a.status="fulfilled",a.value=o,Xv(a),t.state=o,a=t.pending,a!==null&&(o=a.next,o===a?t.pending=null:(o=o.next,a.next=o,Kv(t,o)))}function hf(t,a,o){var l=t.pending;if(t.pending=null,l!==null){l=l.next;do a.status="rejected",a.reason=o,Xv(a),a=a.next;while(a!==l)}t.action=null}function Xv(t){t=t.listeners;for(var a=0;a<t.length;a++)(0,t[a])()}function Zv(t,a){return a}function Qv(t,a){if(Ve){var o=Ze.formState;if(o!==null){e:{var l=Re;if(Ve){if(tt){t:{for(var p=tt,v=Xn;p.nodeType!==8;){if(!v){p=null;break t}if(p=Qn(p.nextSibling),p===null){p=null;break t}}v=p.data,p=v==="F!"||v==="F"?p:null}if(p){tt=Qn(p.nextSibling),l=p.data==="F!";break e}}js(l)}l=!1}l&&(a=o[0])}}return o=on(),o.memoizedState=o.baseState=a,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zv,lastRenderedState:a},o.queue=l,o=gy.bind(null,Re,l),l.dispatch=o,l=ff(!1),v=xf.bind(null,Re,!1,l.queue),l=on(),p={state:a,dispatch:null,action:t,pending:null},l.queue=p,o=tj.bind(null,Re,p,v,o),p.dispatch=o,l.memoizedState=t,[a,o,!1]}function Jv(t){var a=xt();return Wv(a,Ye,t)}function Wv(t,a,o){if(a=uf(t,a,Zv)[0],t=uc(Ja)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var l=Tr(a)}catch(S){throw S===co?ec:S}else l=a;a=xt();var p=a.queue,v=p.dispatch;return o!==a.memoizedState&&(Re.flags|=2048,po(9,{destroy:void 0},nj.bind(null,p,o),null)),[l,v,t]}function nj(t,a){t.action=a}function ey(t){var a=xt(),o=Ye;if(o!==null)return Wv(a,o,t);xt(),a=a.memoizedState,o=xt();var l=o.queue.dispatch;return o.memoizedState=t,[a,l,!1]}function po(t,a,o,l){return t={tag:t,create:o,deps:l,inst:a,next:null},a=Re.updateQueue,a===null&&(a=lc(),Re.updateQueue=a),o=a.lastEffect,o===null?a.lastEffect=t.next=t:(l=o.next,o.next=t,t.next=l,a.lastEffect=t),t}function ty(){return xt().memoizedState}function dc(t,a,o,l){var p=on();Re.flags|=t,p.memoizedState=po(1|a,{destroy:void 0},o,l===void 0?null:l)}function fc(t,a,o,l){var p=xt();l=l===void 0?null:l;var v=p.memoizedState.inst;Ye!==null&&l!==null&&af(l,Ye.memoizedState.deps)?p.memoizedState=po(a,v,o,l):(Re.flags|=t,p.memoizedState=po(1|a,v,o,l))}function ny(t,a){dc(8390656,8,t,a)}function mf(t,a){fc(2048,8,t,a)}function aj(t){Re.flags|=4;var a=Re.updateQueue;if(a===null)a=lc(),Re.updateQueue=a,a.events=[t];else{var o=a.events;o===null?a.events=[t]:o.push(t)}}function ay(t){var a=xt().memoizedState;return aj({ref:a,nextImpl:t}),function(){if((Fe&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}function sy(t,a){return fc(4,2,t,a)}function iy(t,a){return fc(4,4,t,a)}function oy(t,a){if(typeof a=="function"){t=t();var o=a(t);return function(){typeof o=="function"?o():a(null)}}if(a!=null)return t=t(),a.current=t,function(){a.current=null}}function ry(t,a,o){o=o!=null?o.concat([t]):null,fc(4,4,oy.bind(null,a,t),o)}function pf(){}function ly(t,a){var o=xt();a=a===void 0?null:a;var l=o.memoizedState;return a!==null&&af(a,l[1])?l[0]:(o.memoizedState=[t,a],t)}function cy(t,a){var o=xt();a=a===void 0?null:a;var l=o.memoizedState;if(a!==null&&af(a,l[1]))return l[0];if(l=t(),Si){an(!0);try{t()}finally{an(!1)}}return o.memoizedState=[l,a],l}function gf(t,a,o){return o===void 0||(Qa&1073741824)!==0&&(Le&261930)===0?t.memoizedState=a:(t.memoizedState=o,t=ux(),Re.lanes|=t,Ls|=t,o)}function uy(t,a,o,l){return Mn(o,a)?o:fo.current!==null?(t=gf(t,o,l),Mn(t,a)||(Tt=!0),t):(Qa&42)===0||(Qa&1073741824)!==0&&(Le&261930)===0?(Tt=!0,t.memoizedState=o):(t=ux(),Re.lanes|=t,Ls|=t,a)}function dy(t,a,o,l,p){var v=H.p;H.p=v!==0&&8>v?v:8;var S=D.T,j={};D.T=j,xf(t,!1,a,o);try{var k=p(),q=D.S;if(q!==null&&q(j,k),k!==null&&typeof k=="object"&&typeof k.then=="function"){var Q=JA(k,l);Ar(t,a,Q,Ln(t))}else Ar(t,a,l,Ln(t))}catch(ee){Ar(t,a,{then:function(){},status:"rejected",reason:ee},Ln())}finally{H.p=v,S!==null&&j.types!==null&&(S.types=j.types),D.T=S}}function sj(){}function vf(t,a,o,l){if(t.tag!==5)throw Error(i(476));var p=fy(t).queue;dy(t,p,a,V,o===null?sj:function(){return hy(t),o(l)})}function fy(t){var a=t.memoizedState;if(a!==null)return a;a={memoizedState:V,baseState:V,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ja,lastRenderedState:V},next:null};var o={};return a.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ja,lastRenderedState:o},next:null},t.memoizedState=a,t=t.alternate,t!==null&&(t.memoizedState=a),a}function hy(t){var a=fy(t);a.next===null&&(a=t.alternate.memoizedState),Ar(t,a.next.queue,{},Ln())}function yf(){return Ft(Fr)}function my(){return xt().memoizedState}function py(){return xt().memoizedState}function ij(t){for(var a=t.return;a!==null;){switch(a.tag){case 24:case 3:var o=Ln();t=Ms(o);var l=_s(a,t,o);l!==null&&(xn(l,a,o),Sr(l,a,o)),a={cache:Kd()},t.payload=a;return}a=a.return}}function oj(t,a,o){var l=Ln();o={lane:l,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},hc(t)?vy(a,o):(o=kd(t,a,o,l),o!==null&&(xn(o,t,l),yy(o,a,l)))}function gy(t,a,o){var l=Ln();Ar(t,a,o,l)}function Ar(t,a,o,l){var p={lane:l,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(hc(t))vy(a,p);else{var v=t.alternate;if(t.lanes===0&&(v===null||v.lanes===0)&&(v=a.lastRenderedReducer,v!==null))try{var S=a.lastRenderedState,j=v(S,o);if(p.hasEagerState=!0,p.eagerState=j,Mn(j,S))return Yl(t,a,p,0),Ze===null&&Kl(),!1}catch{}if(o=kd(t,a,p,l),o!==null)return xn(o,t,l),yy(o,a,l),!0}return!1}function xf(t,a,o,l){if(l={lane:2,revertLane:Qf(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},hc(t)){if(a)throw Error(i(479))}else a=kd(t,o,l,2),a!==null&&xn(a,t,2)}function hc(t){var a=t.alternate;return t===Re||a!==null&&a===Re}function vy(t,a){ho=oc=!0;var o=t.pending;o===null?a.next=a:(a.next=o.next,o.next=a),t.pending=a}function yy(t,a,o){if((o&4194048)!==0){var l=a.lanes;l&=t.pendingLanes,o|=l,a.lanes=o,Zt(t,o)}}var jr={readContext:Ft,use:cc,useCallback:ut,useContext:ut,useEffect:ut,useImperativeHandle:ut,useLayoutEffect:ut,useInsertionEffect:ut,useMemo:ut,useReducer:ut,useRef:ut,useState:ut,useDebugValue:ut,useDeferredValue:ut,useTransition:ut,useSyncExternalStore:ut,useId:ut,useHostTransitionStatus:ut,useFormState:ut,useActionState:ut,useOptimistic:ut,useMemoCache:ut,useCacheRefresh:ut};jr.useEffectEvent=ut;var xy={readContext:Ft,use:cc,useCallback:function(t,a){return on().memoizedState=[t,a===void 0?null:a],t},useContext:Ft,useEffect:ny,useImperativeHandle:function(t,a,o){o=o!=null?o.concat([t]):null,dc(4194308,4,oy.bind(null,a,t),o)},useLayoutEffect:function(t,a){return dc(4194308,4,t,a)},useInsertionEffect:function(t,a){dc(4,2,t,a)},useMemo:function(t,a){var o=on();a=a===void 0?null:a;var l=t();if(Si){an(!0);try{t()}finally{an(!1)}}return o.memoizedState=[l,a],l},useReducer:function(t,a,o){var l=on();if(o!==void 0){var p=o(a);if(Si){an(!0);try{o(a)}finally{an(!1)}}}else p=a;return l.memoizedState=l.baseState=p,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:p},l.queue=t,t=t.dispatch=oj.bind(null,Re,t),[l.memoizedState,t]},useRef:function(t){var a=on();return t={current:t},a.memoizedState=t},useState:function(t){t=ff(t);var a=t.queue,o=gy.bind(null,Re,a);return a.dispatch=o,[t.memoizedState,o]},useDebugValue:pf,useDeferredValue:function(t,a){var o=on();return gf(o,t,a)},useTransition:function(){var t=ff(!1);return t=dy.bind(null,Re,t.queue,!0,!1),on().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,a,o){var l=Re,p=on();if(Ve){if(o===void 0)throw Error(i(407));o=o()}else{if(o=a(),Ze===null)throw Error(i(349));(Le&127)!==0||Uv(l,a,o)}p.memoizedState=o;var v={value:o,getSnapshot:a};return p.queue=v,ny(Iv.bind(null,l,v,t),[t]),l.flags|=2048,po(9,{destroy:void 0},Hv.bind(null,l,v,o,a),null),o},useId:function(){var t=on(),a=Ze.identifierPrefix;if(Ve){var o=ja,l=Aa;o=(l&~(1<<32-bt(l)-1)).toString(32)+o,a="_"+a+"R_"+o,o=rc++,0<o&&(a+="H"+o.toString(32)),a+="_"}else o=WA++,a="_"+a+"r_"+o.toString(32)+"_";return t.memoizedState=a},useHostTransitionStatus:yf,useFormState:Qv,useActionState:Qv,useOptimistic:function(t){var a=on();a.memoizedState=a.baseState=t;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=o,a=xf.bind(null,Re,!0,o),o.dispatch=a,[t,a]},useMemoCache:cf,useCacheRefresh:function(){return on().memoizedState=ij.bind(null,Re)},useEffectEvent:function(t){var a=on(),o={impl:t};return a.memoizedState=o,function(){if((Fe&2)!==0)throw Error(i(440));return o.impl.apply(void 0,arguments)}}},bf={readContext:Ft,use:cc,useCallback:ly,useContext:Ft,useEffect:mf,useImperativeHandle:ry,useInsertionEffect:sy,useLayoutEffect:iy,useMemo:cy,useReducer:uc,useRef:ty,useState:function(){return uc(Ja)},useDebugValue:pf,useDeferredValue:function(t,a){var o=xt();return uy(o,Ye.memoizedState,t,a)},useTransition:function(){var t=uc(Ja)[0],a=xt().memoizedState;return[typeof t=="boolean"?t:Tr(t),a]},useSyncExternalStore:Bv,useId:my,useHostTransitionStatus:yf,useFormState:Jv,useActionState:Jv,useOptimistic:function(t,a){var o=xt();return $v(o,Ye,t,a)},useMemoCache:cf,useCacheRefresh:py};bf.useEffectEvent=ay;var by={readContext:Ft,use:cc,useCallback:ly,useContext:Ft,useEffect:mf,useImperativeHandle:ry,useInsertionEffect:sy,useLayoutEffect:iy,useMemo:cy,useReducer:df,useRef:ty,useState:function(){return df(Ja)},useDebugValue:pf,useDeferredValue:function(t,a){var o=xt();return Ye===null?gf(o,t,a):uy(o,Ye.memoizedState,t,a)},useTransition:function(){var t=df(Ja)[0],a=xt().memoizedState;return[typeof t=="boolean"?t:Tr(t),a]},useSyncExternalStore:Bv,useId:my,useHostTransitionStatus:yf,useFormState:ey,useActionState:ey,useOptimistic:function(t,a){var o=xt();return Ye!==null?$v(o,Ye,t,a):(o.baseState=t,[t,o.queue.dispatch])},useMemoCache:cf,useCacheRefresh:py};by.useEffectEvent=ay;function Sf(t,a,o,l){a=t.memoizedState,o=o(l,a),o=o==null?a:g({},a,o),t.memoizedState=o,t.lanes===0&&(t.updateQueue.baseState=o)}var wf={enqueueSetState:function(t,a,o){t=t._reactInternals;var l=Ln(),p=Ms(l);p.payload=a,o!=null&&(p.callback=o),a=_s(t,p,l),a!==null&&(xn(a,t,l),Sr(a,t,l))},enqueueReplaceState:function(t,a,o){t=t._reactInternals;var l=Ln(),p=Ms(l);p.tag=1,p.payload=a,o!=null&&(p.callback=o),a=_s(t,p,l),a!==null&&(xn(a,t,l),Sr(a,t,l))},enqueueForceUpdate:function(t,a){t=t._reactInternals;var o=Ln(),l=Ms(o);l.tag=2,a!=null&&(l.callback=a),a=_s(t,l,o),a!==null&&(xn(a,t,o),Sr(a,t,o))}};function Sy(t,a,o,l,p,v,S){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(l,v,S):a.prototype&&a.prototype.isPureReactComponent?!hr(o,l)||!hr(p,v):!0}function wy(t,a,o,l){t=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(o,l),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(o,l),a.state!==t&&wf.enqueueReplaceState(a,a.state,null)}function wi(t,a){var o=a;if("ref"in a){o={};for(var l in a)l!=="ref"&&(o[l]=a[l])}if(t=t.defaultProps){o===a&&(o=g({},o));for(var p in t)o[p]===void 0&&(o[p]=t[p])}return o}function Ey(t){$l(t)}function Cy(t){console.error(t)}function Ty(t){$l(t)}function mc(t,a){try{var o=t.onUncaughtError;o(a.value,{componentStack:a.stack})}catch(l){setTimeout(function(){throw l})}}function Ay(t,a,o){try{var l=t.onCaughtError;l(o.value,{componentStack:o.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function Ef(t,a,o){return o=Ms(o),o.tag=3,o.payload={element:null},o.callback=function(){mc(t,a)},o}function jy(t){return t=Ms(t),t.tag=3,t}function Ny(t,a,o,l){var p=o.type.getDerivedStateFromError;if(typeof p=="function"){var v=l.value;t.payload=function(){return p(v)},t.callback=function(){Ay(a,o,l)}}var S=o.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(t.callback=function(){Ay(a,o,l),typeof p!="function"&&(zs===null?zs=new Set([this]):zs.add(this));var j=l.stack;this.componentDidCatch(l.value,{componentStack:j!==null?j:""})})}function rj(t,a,o,l,p){if(o.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(a=o.alternate,a!==null&&oo(a,o,p,!0),o=On.current,o!==null){switch(o.tag){case 31:case 13:return Zn===null?Ac():o.alternate===null&&dt===0&&(dt=3),o.flags&=-257,o.flags|=65536,o.lanes=p,l===tc?o.flags|=16384:(a=o.updateQueue,a===null?o.updateQueue=new Set([l]):a.add(l),Gf(t,l,p)),!1;case 22:return o.flags|=65536,l===tc?o.flags|=16384:(a=o.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([l])},o.updateQueue=a):(o=a.retryQueue,o===null?a.retryQueue=new Set([l]):o.add(l)),Gf(t,l,p)),!1}throw Error(i(435,o.tag))}return Gf(t,l,p),Ac(),!1}if(Ve)return a=On.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=p,l!==Hd&&(t=Error(i(422),{cause:l}),gr(Kn(t,o)))):(l!==Hd&&(a=Error(i(423),{cause:l}),gr(Kn(a,o))),t=t.current.alternate,t.flags|=65536,p&=-p,t.lanes|=p,l=Kn(l,o),p=Ef(t.stateNode,l,p),Jd(t,p),dt!==4&&(dt=2)),!1;var v=Error(i(520),{cause:l});if(v=Kn(v,o),kr===null?kr=[v]:kr.push(v),dt!==4&&(dt=2),a===null)return!0;l=Kn(l,o),o=a;do{switch(o.tag){case 3:return o.flags|=65536,t=p&-p,o.lanes|=t,t=Ef(o.stateNode,l,t),Jd(o,t),!1;case 1:if(a=o.type,v=o.stateNode,(o.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(zs===null||!zs.has(v))))return o.flags|=65536,p&=-p,o.lanes|=p,p=jy(p),Ny(p,t,o,l),Jd(o,p),!1}o=o.return}while(o!==null);return!1}var Cf=Error(i(461)),Tt=!1;function qt(t,a,o,l){a.child=t===null?Ov(a,null,o,l):bi(a,t.child,o,l)}function Ry(t,a,o,l,p){o=o.render;var v=a.ref;if("ref"in l){var S={};for(var j in l)j!=="ref"&&(S[j]=l[j])}else S=l;return gi(a),l=sf(t,a,o,S,v,p),j=of(),t!==null&&!Tt?(rf(t,a,p),Wa(t,a,p)):(Ve&&j&&Bd(a),a.flags|=1,qt(t,a,l,p),a.child)}function My(t,a,o,l,p){if(t===null){var v=o.type;return typeof v=="function"&&!Ld(v)&&v.defaultProps===void 0&&o.compare===null?(a.tag=15,a.type=v,_y(t,a,v,l,p)):(t=Xl(o.type,null,l,a,a.mode,p),t.ref=a.ref,t.return=a,a.child=t)}if(v=t.child,!Of(t,p)){var S=v.memoizedProps;if(o=o.compare,o=o!==null?o:hr,o(S,l)&&t.ref===a.ref)return Wa(t,a,p)}return a.flags|=1,t=Ya(v,l),t.ref=a.ref,t.return=a,a.child=t}function _y(t,a,o,l,p){if(t!==null){var v=t.memoizedProps;if(hr(v,l)&&t.ref===a.ref)if(Tt=!1,a.pendingProps=l=v,Of(t,p))(t.flags&131072)!==0&&(Tt=!0);else return a.lanes=t.lanes,Wa(t,a,p)}return Tf(t,a,o,l,p)}function Oy(t,a,o,l){var p=l.children,v=t!==null?t.memoizedState:null;if(t===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((a.flags&128)!==0){if(v=v!==null?v.baseLanes|o:o,t!==null){for(l=a.child=t.child,p=0;l!==null;)p=p|l.lanes|l.childLanes,l=l.sibling;l=p&~v}else l=0,a.child=null;return Dy(t,a,v,o,l)}if((o&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},t!==null&&Wl(a,v!==null?v.cachePool:null),v!==null?kv(a,v):ef(),Lv(a);else return l=a.lanes=536870912,Dy(t,a,v!==null?v.baseLanes|o:o,o,l)}else v!==null?(Wl(a,v.cachePool),kv(a,v),Ds(),a.memoizedState=null):(t!==null&&Wl(a,null),ef(),Ds());return qt(t,a,p,o),a.child}function Nr(t,a){return t!==null&&t.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function Dy(t,a,o,l,p){var v=Gd();return v=v===null?null:{parent:Et._currentValue,pool:v},a.memoizedState={baseLanes:o,cachePool:v},t!==null&&Wl(a,null),ef(),Lv(a),t!==null&&oo(t,a,l,!0),a.childLanes=p,null}function pc(t,a){return a=vc({mode:a.mode,children:a.children},t.mode),a.ref=t.ref,t.child=a,a.return=t,a}function Py(t,a,o){return bi(a,t.child,null,o),t=pc(a,a.pendingProps),t.flags|=2,Dn(a),a.memoizedState=null,t}function lj(t,a,o){var l=a.pendingProps,p=(a.flags&128)!==0;if(a.flags&=-129,t===null){if(Ve){if(l.mode==="hidden")return t=pc(a,l),a.lanes=536870912,Nr(null,t);if(nf(a),(t=tt)?(t=Kx(t,Xn),t=t!==null&&t.data==="&"?t:null,t!==null&&(a.memoizedState={dehydrated:t,treeContext:Ts!==null?{id:Aa,overflow:ja}:null,retryLane:536870912,hydrationErrors:null},o=vv(t),o.return=a,a.child=o,It=a,tt=null)):t=null,t===null)throw js(a);return a.lanes=536870912,null}return pc(a,l)}var v=t.memoizedState;if(v!==null){var S=v.dehydrated;if(nf(a),p)if(a.flags&256)a.flags&=-257,a=Py(t,a,o);else if(a.memoizedState!==null)a.child=t.child,a.flags|=128,a=null;else throw Error(i(558));else if(Tt||oo(t,a,o,!1),p=(o&t.childLanes)!==0,Tt||p){if(l=Ze,l!==null&&(S=Qt(l,o),S!==0&&S!==v.retryLane))throw v.retryLane=S,fi(t,S),xn(l,t,S),Cf;Ac(),a=Py(t,a,o)}else t=v.treeContext,tt=Qn(S.nextSibling),It=a,Ve=!0,As=null,Xn=!1,t!==null&&bv(a,t),a=pc(a,l),a.flags|=4096;return a}return t=Ya(t.child,{mode:l.mode,children:l.children}),t.ref=a.ref,a.child=t,t.return=a,t}function gc(t,a){var o=a.ref;if(o===null)t!==null&&t.ref!==null&&(a.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(i(284));(t===null||t.ref!==o)&&(a.flags|=4194816)}}function Tf(t,a,o,l,p){return gi(a),o=sf(t,a,o,l,void 0,p),l=of(),t!==null&&!Tt?(rf(t,a,p),Wa(t,a,p)):(Ve&&l&&Bd(a),a.flags|=1,qt(t,a,o,p),a.child)}function ky(t,a,o,l,p,v){return gi(a),a.updateQueue=null,o=Vv(a,l,o,p),zv(t),l=of(),t!==null&&!Tt?(rf(t,a,v),Wa(t,a,v)):(Ve&&l&&Bd(a),a.flags|=1,qt(t,a,o,v),a.child)}function Ly(t,a,o,l,p){if(gi(a),a.stateNode===null){var v=no,S=o.contextType;typeof S=="object"&&S!==null&&(v=Ft(S)),v=new o(l,v),a.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,v.updater=wf,a.stateNode=v,v._reactInternals=a,v=a.stateNode,v.props=l,v.state=a.memoizedState,v.refs={},Zd(a),S=o.contextType,v.context=typeof S=="object"&&S!==null?Ft(S):no,v.state=a.memoizedState,S=o.getDerivedStateFromProps,typeof S=="function"&&(Sf(a,o,S,l),v.state=a.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(S=v.state,typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount(),S!==v.state&&wf.enqueueReplaceState(v,v.state,null),Er(a,l,v,p),wr(),v.state=a.memoizedState),typeof v.componentDidMount=="function"&&(a.flags|=4194308),l=!0}else if(t===null){v=a.stateNode;var j=a.memoizedProps,k=wi(o,j);v.props=k;var q=v.context,Q=o.contextType;S=no,typeof Q=="object"&&Q!==null&&(S=Ft(Q));var ee=o.getDerivedStateFromProps;Q=typeof ee=="function"||typeof v.getSnapshotBeforeUpdate=="function",j=a.pendingProps!==j,Q||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(j||q!==S)&&wy(a,v,l,S),Rs=!1;var $=a.memoizedState;v.state=$,Er(a,l,v,p),wr(),q=a.memoizedState,j||$!==q||Rs?(typeof ee=="function"&&(Sf(a,o,ee,l),q=a.memoizedState),(k=Rs||Sy(a,o,k,l,$,q,S))?(Q||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(a.flags|=4194308)):(typeof v.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=l,a.memoizedState=q),v.props=l,v.state=q,v.context=S,l=k):(typeof v.componentDidMount=="function"&&(a.flags|=4194308),l=!1)}else{v=a.stateNode,Qd(t,a),S=a.memoizedProps,Q=wi(o,S),v.props=Q,ee=a.pendingProps,$=v.context,q=o.contextType,k=no,typeof q=="object"&&q!==null&&(k=Ft(q)),j=o.getDerivedStateFromProps,(q=typeof j=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(S!==ee||$!==k)&&wy(a,v,l,k),Rs=!1,$=a.memoizedState,v.state=$,Er(a,l,v,p),wr();var Y=a.memoizedState;S!==ee||$!==Y||Rs||t!==null&&t.dependencies!==null&&Ql(t.dependencies)?(typeof j=="function"&&(Sf(a,o,j,l),Y=a.memoizedState),(Q=Rs||Sy(a,o,Q,l,$,Y,k)||t!==null&&t.dependencies!==null&&Ql(t.dependencies))?(q||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(l,Y,k),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(l,Y,k)),typeof v.componentDidUpdate=="function"&&(a.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof v.componentDidUpdate!="function"||S===t.memoizedProps&&$===t.memoizedState||(a.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||S===t.memoizedProps&&$===t.memoizedState||(a.flags|=1024),a.memoizedProps=l,a.memoizedState=Y),v.props=l,v.state=Y,v.context=k,l=Q):(typeof v.componentDidUpdate!="function"||S===t.memoizedProps&&$===t.memoizedState||(a.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||S===t.memoizedProps&&$===t.memoizedState||(a.flags|=1024),l=!1)}return v=l,gc(t,a),l=(a.flags&128)!==0,v||l?(v=a.stateNode,o=l&&typeof o.getDerivedStateFromError!="function"?null:v.render(),a.flags|=1,t!==null&&l?(a.child=bi(a,t.child,null,p),a.child=bi(a,null,o,p)):qt(t,a,o,p),a.memoizedState=v.state,t=a.child):t=Wa(t,a,p),t}function zy(t,a,o,l){return mi(),a.flags|=256,qt(t,a,o,l),a.child}var Af={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function jf(t){return{baseLanes:t,cachePool:Av()}}function Nf(t,a,o){return t=t!==null?t.childLanes&~o:0,a&&(t|=kn),t}function Vy(t,a,o){var l=a.pendingProps,p=!1,v=(a.flags&128)!==0,S;if((S=v)||(S=t!==null&&t.memoizedState===null?!1:(yt.current&2)!==0),S&&(p=!0,a.flags&=-129),S=(a.flags&32)!==0,a.flags&=-33,t===null){if(Ve){if(p?Os(a):Ds(),(t=tt)?(t=Kx(t,Xn),t=t!==null&&t.data!=="&"?t:null,t!==null&&(a.memoizedState={dehydrated:t,treeContext:Ts!==null?{id:Aa,overflow:ja}:null,retryLane:536870912,hydrationErrors:null},o=vv(t),o.return=a,a.child=o,It=a,tt=null)):t=null,t===null)throw js(a);return uh(t)?a.lanes=32:a.lanes=536870912,null}var j=l.children;return l=l.fallback,p?(Ds(),p=a.mode,j=vc({mode:"hidden",children:j},p),l=hi(l,p,o,null),j.return=a,l.return=a,j.sibling=l,a.child=j,l=a.child,l.memoizedState=jf(o),l.childLanes=Nf(t,S,o),a.memoizedState=Af,Nr(null,l)):(Os(a),Rf(a,j))}var k=t.memoizedState;if(k!==null&&(j=k.dehydrated,j!==null)){if(v)a.flags&256?(Os(a),a.flags&=-257,a=Mf(t,a,o)):a.memoizedState!==null?(Ds(),a.child=t.child,a.flags|=128,a=null):(Ds(),j=l.fallback,p=a.mode,l=vc({mode:"visible",children:l.children},p),j=hi(j,p,o,null),j.flags|=2,l.return=a,j.return=a,l.sibling=j,a.child=l,bi(a,t.child,null,o),l=a.child,l.memoizedState=jf(o),l.childLanes=Nf(t,S,o),a.memoizedState=Af,a=Nr(null,l));else if(Os(a),uh(j)){if(S=j.nextSibling&&j.nextSibling.dataset,S)var q=S.dgst;S=q,l=Error(i(419)),l.stack="",l.digest=S,gr({value:l,source:null,stack:null}),a=Mf(t,a,o)}else if(Tt||oo(t,a,o,!1),S=(o&t.childLanes)!==0,Tt||S){if(S=Ze,S!==null&&(l=Qt(S,o),l!==0&&l!==k.retryLane))throw k.retryLane=l,fi(t,l),xn(S,t,l),Cf;ch(j)||Ac(),a=Mf(t,a,o)}else ch(j)?(a.flags|=192,a.child=t.child,a=null):(t=k.treeContext,tt=Qn(j.nextSibling),It=a,Ve=!0,As=null,Xn=!1,t!==null&&bv(a,t),a=Rf(a,l.children),a.flags|=4096);return a}return p?(Ds(),j=l.fallback,p=a.mode,k=t.child,q=k.sibling,l=Ya(k,{mode:"hidden",children:l.children}),l.subtreeFlags=k.subtreeFlags&65011712,q!==null?j=Ya(q,j):(j=hi(j,p,o,null),j.flags|=2),j.return=a,l.return=a,l.sibling=j,a.child=l,Nr(null,l),l=a.child,j=t.child.memoizedState,j===null?j=jf(o):(p=j.cachePool,p!==null?(k=Et._currentValue,p=p.parent!==k?{parent:k,pool:k}:p):p=Av(),j={baseLanes:j.baseLanes|o,cachePool:p}),l.memoizedState=j,l.childLanes=Nf(t,S,o),a.memoizedState=Af,Nr(t.child,l)):(Os(a),o=t.child,t=o.sibling,o=Ya(o,{mode:"visible",children:l.children}),o.return=a,o.sibling=null,t!==null&&(S=a.deletions,S===null?(a.deletions=[t],a.flags|=16):S.push(t)),a.child=o,a.memoizedState=null,o)}function Rf(t,a){return a=vc({mode:"visible",children:a},t.mode),a.return=t,t.child=a}function vc(t,a){return t=_n(22,t,null,a),t.lanes=0,t}function Mf(t,a,o){return bi(a,t.child,null,o),t=Rf(a,a.pendingProps.children),t.flags|=2,a.memoizedState=null,t}function By(t,a,o){t.lanes|=a;var l=t.alternate;l!==null&&(l.lanes|=a),qd(t.return,a,o)}function _f(t,a,o,l,p,v){var S=t.memoizedState;S===null?t.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:l,tail:o,tailMode:p,treeForkCount:v}:(S.isBackwards=a,S.rendering=null,S.renderingStartTime=0,S.last=l,S.tail=o,S.tailMode=p,S.treeForkCount=v)}function Uy(t,a,o){var l=a.pendingProps,p=l.revealOrder,v=l.tail;l=l.children;var S=yt.current,j=(S&2)!==0;if(j?(S=S&1|2,a.flags|=128):S&=1,G(yt,S),qt(t,a,l,o),l=Ve?pr:0,!j&&t!==null&&(t.flags&128)!==0)e:for(t=a.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&By(t,o,a);else if(t.tag===19)By(t,o,a);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===a)break e;for(;t.sibling===null;){if(t.return===null||t.return===a)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(p){case"forwards":for(o=a.child,p=null;o!==null;)t=o.alternate,t!==null&&ic(t)===null&&(p=o),o=o.sibling;o=p,o===null?(p=a.child,a.child=null):(p=o.sibling,o.sibling=null),_f(a,!1,p,o,v,l);break;case"backwards":case"unstable_legacy-backwards":for(o=null,p=a.child,a.child=null;p!==null;){if(t=p.alternate,t!==null&&ic(t)===null){a.child=p;break}t=p.sibling,p.sibling=o,o=p,p=t}_f(a,!0,o,null,v,l);break;case"together":_f(a,!1,null,null,void 0,l);break;default:a.memoizedState=null}return a.child}function Wa(t,a,o){if(t!==null&&(a.dependencies=t.dependencies),Ls|=a.lanes,(o&a.childLanes)===0)if(t!==null){if(oo(t,a,o,!1),(o&a.childLanes)===0)return null}else return null;if(t!==null&&a.child!==t.child)throw Error(i(153));if(a.child!==null){for(t=a.child,o=Ya(t,t.pendingProps),a.child=o,o.return=a;t.sibling!==null;)t=t.sibling,o=o.sibling=Ya(t,t.pendingProps),o.return=a;o.sibling=null}return a.child}function Of(t,a){return(t.lanes&a)!==0?!0:(t=t.dependencies,!!(t!==null&&Ql(t)))}function cj(t,a,o){switch(a.tag){case 3:de(a,a.stateNode.containerInfo),Ns(a,Et,t.memoizedState.cache),mi();break;case 27:case 5:Te(a);break;case 4:de(a,a.stateNode.containerInfo);break;case 10:Ns(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,nf(a),null;break;case 13:var l=a.memoizedState;if(l!==null)return l.dehydrated!==null?(Os(a),a.flags|=128,null):(o&a.child.childLanes)!==0?Vy(t,a,o):(Os(a),t=Wa(t,a,o),t!==null?t.sibling:null);Os(a);break;case 19:var p=(t.flags&128)!==0;if(l=(o&a.childLanes)!==0,l||(oo(t,a,o,!1),l=(o&a.childLanes)!==0),p){if(l)return Uy(t,a,o);a.flags|=128}if(p=a.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),G(yt,yt.current),l)break;return null;case 22:return a.lanes=0,Oy(t,a,o,a.pendingProps);case 24:Ns(a,Et,t.memoizedState.cache)}return Wa(t,a,o)}function Hy(t,a,o){if(t!==null)if(t.memoizedProps!==a.pendingProps)Tt=!0;else{if(!Of(t,o)&&(a.flags&128)===0)return Tt=!1,cj(t,a,o);Tt=(t.flags&131072)!==0}else Tt=!1,Ve&&(a.flags&1048576)!==0&&xv(a,pr,a.index);switch(a.lanes=0,a.tag){case 16:e:{var l=a.pendingProps;if(t=yi(a.elementType),a.type=t,typeof t=="function")Ld(t)?(l=wi(t,l),a.tag=1,a=Ly(null,a,t,l,o)):(a.tag=0,a=Tf(null,a,t,l,o));else{if(t!=null){var p=t.$$typeof;if(p===_){a.tag=11,a=Ry(null,a,t,l,o);break e}else if(p===L){a.tag=14,a=My(null,a,t,l,o);break e}}throw a=ne(t)||t,Error(i(306,a,""))}}return a;case 0:return Tf(t,a,a.type,a.pendingProps,o);case 1:return l=a.type,p=wi(l,a.pendingProps),Ly(t,a,l,p,o);case 3:e:{if(de(a,a.stateNode.containerInfo),t===null)throw Error(i(387));l=a.pendingProps;var v=a.memoizedState;p=v.element,Qd(t,a),Er(a,l,null,o);var S=a.memoizedState;if(l=S.cache,Ns(a,Et,l),l!==v.cache&&$d(a,[Et],o,!0),wr(),l=S.element,v.isDehydrated)if(v={element:l,isDehydrated:!1,cache:S.cache},a.updateQueue.baseState=v,a.memoizedState=v,a.flags&256){a=zy(t,a,l,o);break e}else if(l!==p){p=Kn(Error(i(424)),a),gr(p),a=zy(t,a,l,o);break e}else for(t=a.stateNode.containerInfo,t.nodeType===9?t=t.body:t=t.nodeName==="HTML"?t.ownerDocument.body:t,tt=Qn(t.firstChild),It=a,Ve=!0,As=null,Xn=!0,o=Ov(a,null,l,o),a.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(mi(),l===p){a=Wa(t,a,o);break e}qt(t,a,l,o)}a=a.child}return a;case 26:return gc(t,a),t===null?(o=Jx(a.type,null,a.pendingProps,null))?a.memoizedState=o:Ve||(o=a.type,t=a.pendingProps,l=Dc(me.current).createElement(o),l[Dt]=a,l[fe]=t,$t(l,o,t),Bt(l),a.stateNode=l):a.memoizedState=Jx(a.type,t.memoizedProps,a.pendingProps,t.memoizedState),null;case 27:return Te(a),t===null&&Ve&&(l=a.stateNode=Xx(a.type,a.pendingProps,me.current),It=a,Xn=!0,p=tt,Hs(a.type)?(dh=p,tt=Qn(l.firstChild)):tt=p),qt(t,a,a.pendingProps.children,o),gc(t,a),t===null&&(a.flags|=4194304),a.child;case 5:return t===null&&Ve&&((p=l=tt)&&(l=Bj(l,a.type,a.pendingProps,Xn),l!==null?(a.stateNode=l,It=a,tt=Qn(l.firstChild),Xn=!1,p=!0):p=!1),p||js(a)),Te(a),p=a.type,v=a.pendingProps,S=t!==null?t.memoizedProps:null,l=v.children,oh(p,v)?l=null:S!==null&&oh(p,S)&&(a.flags|=32),a.memoizedState!==null&&(p=sf(t,a,ej,null,null,o),Fr._currentValue=p),gc(t,a),qt(t,a,l,o),a.child;case 6:return t===null&&Ve&&((t=o=tt)&&(o=Uj(o,a.pendingProps,Xn),o!==null?(a.stateNode=o,It=a,tt=null,t=!0):t=!1),t||js(a)),null;case 13:return Vy(t,a,o);case 4:return de(a,a.stateNode.containerInfo),l=a.pendingProps,t===null?a.child=bi(a,null,l,o):qt(t,a,l,o),a.child;case 11:return Ry(t,a,a.type,a.pendingProps,o);case 7:return qt(t,a,a.pendingProps,o),a.child;case 8:return qt(t,a,a.pendingProps.children,o),a.child;case 12:return qt(t,a,a.pendingProps.children,o),a.child;case 10:return l=a.pendingProps,Ns(a,a.type,l.value),qt(t,a,l.children,o),a.child;case 9:return p=a.type._context,l=a.pendingProps.children,gi(a),p=Ft(p),l=l(p),a.flags|=1,qt(t,a,l,o),a.child;case 14:return My(t,a,a.type,a.pendingProps,o);case 15:return _y(t,a,a.type,a.pendingProps,o);case 19:return Uy(t,a,o);case 31:return lj(t,a,o);case 22:return Oy(t,a,o,a.pendingProps);case 24:return gi(a),l=Ft(Et),t===null?(p=Gd(),p===null&&(p=Ze,v=Kd(),p.pooledCache=v,v.refCount++,v!==null&&(p.pooledCacheLanes|=o),p=v),a.memoizedState={parent:l,cache:p},Zd(a),Ns(a,Et,p)):((t.lanes&o)!==0&&(Qd(t,a),Er(a,null,null,o),wr()),p=t.memoizedState,v=a.memoizedState,p.parent!==l?(p={parent:l,cache:l},a.memoizedState=p,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=p),Ns(a,Et,l)):(l=v.cache,Ns(a,Et,l),l!==p.cache&&$d(a,[Et],o,!0))),qt(t,a,a.pendingProps.children,o),a.child;case 29:throw a.pendingProps}throw Error(i(156,a.tag))}function es(t){t.flags|=4}function Df(t,a,o,l,p){if((a=(t.mode&32)!==0)&&(a=!1),a){if(t.flags|=16777216,(p&335544128)===p)if(t.stateNode.complete)t.flags|=8192;else if(mx())t.flags|=8192;else throw xi=tc,Xd}else t.flags&=-16777217}function Iy(t,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!ab(a))if(mx())t.flags|=8192;else throw xi=tc,Xd}function yc(t,a){a!==null&&(t.flags|=4),t.flags&16384&&(a=t.tag!==22?Vt():536870912,t.lanes|=a,xo|=a)}function Rr(t,a){if(!Ve)switch(t.tailMode){case"hidden":a=t.tail;for(var o=null;a!==null;)a.alternate!==null&&(o=a),a=a.sibling;o===null?t.tail=null:o.sibling=null;break;case"collapsed":o=t.tail;for(var l=null;o!==null;)o.alternate!==null&&(l=o),o=o.sibling;l===null?a||t.tail===null?t.tail=null:t.tail.sibling=null:l.sibling=null}}function nt(t){var a=t.alternate!==null&&t.alternate.child===t.child,o=0,l=0;if(a)for(var p=t.child;p!==null;)o|=p.lanes|p.childLanes,l|=p.subtreeFlags&65011712,l|=p.flags&65011712,p.return=t,p=p.sibling;else for(p=t.child;p!==null;)o|=p.lanes|p.childLanes,l|=p.subtreeFlags,l|=p.flags,p.return=t,p=p.sibling;return t.subtreeFlags|=l,t.childLanes=o,a}function uj(t,a,o){var l=a.pendingProps;switch(Ud(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return nt(a),null;case 1:return nt(a),null;case 3:return o=a.stateNode,l=null,t!==null&&(l=t.memoizedState.cache),a.memoizedState.cache!==l&&(a.flags|=2048),Za(Et),we(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(t===null||t.child===null)&&(io(a)?es(a):t===null||t.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Id())),nt(a),null;case 26:var p=a.type,v=a.memoizedState;return t===null?(es(a),v!==null?(nt(a),Iy(a,v)):(nt(a),Df(a,p,null,l,o))):v?v!==t.memoizedState?(es(a),nt(a),Iy(a,v)):(nt(a),a.flags&=-16777217):(t=t.memoizedProps,t!==l&&es(a),nt(a),Df(a,p,t,l,o)),null;case 27:if(Ne(a),o=me.current,p=a.type,t!==null&&a.stateNode!=null)t.memoizedProps!==l&&es(a);else{if(!l){if(a.stateNode===null)throw Error(i(166));return nt(a),null}t=te.current,io(a)?Sv(a):(t=Xx(p,l,o),a.stateNode=t,es(a))}return nt(a),null;case 5:if(Ne(a),p=a.type,t!==null&&a.stateNode!=null)t.memoizedProps!==l&&es(a);else{if(!l){if(a.stateNode===null)throw Error(i(166));return nt(a),null}if(v=te.current,io(a))Sv(a);else{var S=Dc(me.current);switch(v){case 1:v=S.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:v=S.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":v=S.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":v=S.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":v=S.createElement("div"),v.innerHTML="<script><\/script>",v=v.removeChild(v.firstChild);break;case"select":v=typeof l.is=="string"?S.createElement("select",{is:l.is}):S.createElement("select"),l.multiple?v.multiple=!0:l.size&&(v.size=l.size);break;default:v=typeof l.is=="string"?S.createElement(p,{is:l.is}):S.createElement(p)}}v[Dt]=a,v[fe]=l;e:for(S=a.child;S!==null;){if(S.tag===5||S.tag===6)v.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===a)break e;for(;S.sibling===null;){if(S.return===null||S.return===a)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}a.stateNode=v;e:switch($t(v,p,l),p){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&es(a)}}return nt(a),Df(a,a.type,t===null?null:t.memoizedProps,a.pendingProps,o),null;case 6:if(t&&a.stateNode!=null)t.memoizedProps!==l&&es(a);else{if(typeof l!="string"&&a.stateNode===null)throw Error(i(166));if(t=me.current,io(a)){if(t=a.stateNode,o=a.memoizedProps,l=null,p=It,p!==null)switch(p.tag){case 27:case 5:l=p.memoizedProps}t[Dt]=a,t=!!(t.nodeValue===o||l!==null&&l.suppressHydrationWarning===!0||Vx(t.nodeValue,o)),t||js(a,!0)}else t=Dc(t).createTextNode(l),t[Dt]=a,a.stateNode=t}return nt(a),null;case 31:if(o=a.memoizedState,t===null||t.memoizedState!==null){if(l=io(a),o!==null){if(t===null){if(!l)throw Error(i(318));if(t=a.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(i(557));t[Dt]=a}else mi(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;nt(a),t=!1}else o=Id(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=o),t=!0;if(!t)return a.flags&256?(Dn(a),a):(Dn(a),null);if((a.flags&128)!==0)throw Error(i(558))}return nt(a),null;case 13:if(l=a.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(p=io(a),l!==null&&l.dehydrated!==null){if(t===null){if(!p)throw Error(i(318));if(p=a.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(i(317));p[Dt]=a}else mi(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;nt(a),p=!1}else p=Id(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=p),p=!0;if(!p)return a.flags&256?(Dn(a),a):(Dn(a),null)}return Dn(a),(a.flags&128)!==0?(a.lanes=o,a):(o=l!==null,t=t!==null&&t.memoizedState!==null,o&&(l=a.child,p=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(p=l.alternate.memoizedState.cachePool.pool),v=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(v=l.memoizedState.cachePool.pool),v!==p&&(l.flags|=2048)),o!==t&&o&&(a.child.flags|=8192),yc(a,a.updateQueue),nt(a),null);case 4:return we(),t===null&&th(a.stateNode.containerInfo),nt(a),null;case 10:return Za(a.type),nt(a),null;case 19:if(X(yt),l=a.memoizedState,l===null)return nt(a),null;if(p=(a.flags&128)!==0,v=l.rendering,v===null)if(p)Rr(l,!1);else{if(dt!==0||t!==null&&(t.flags&128)!==0)for(t=a.child;t!==null;){if(v=ic(t),v!==null){for(a.flags|=128,Rr(l,!1),t=v.updateQueue,a.updateQueue=t,yc(a,t),a.subtreeFlags=0,t=o,o=a.child;o!==null;)gv(o,t),o=o.sibling;return G(yt,yt.current&1|2),Ve&&Ga(a,l.treeForkCount),a.child}t=t.sibling}l.tail!==null&&_t()>Ec&&(a.flags|=128,p=!0,Rr(l,!1),a.lanes=4194304)}else{if(!p)if(t=ic(v),t!==null){if(a.flags|=128,p=!0,t=t.updateQueue,a.updateQueue=t,yc(a,t),Rr(l,!0),l.tail===null&&l.tailMode==="hidden"&&!v.alternate&&!Ve)return nt(a),null}else 2*_t()-l.renderingStartTime>Ec&&o!==536870912&&(a.flags|=128,p=!0,Rr(l,!1),a.lanes=4194304);l.isBackwards?(v.sibling=a.child,a.child=v):(t=l.last,t!==null?t.sibling=v:a.child=v,l.last=v)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=_t(),t.sibling=null,o=yt.current,G(yt,p?o&1|2:o&1),Ve&&Ga(a,l.treeForkCount),t):(nt(a),null);case 22:case 23:return Dn(a),tf(),l=a.memoizedState!==null,t!==null?t.memoizedState!==null!==l&&(a.flags|=8192):l&&(a.flags|=8192),l?(o&536870912)!==0&&(a.flags&128)===0&&(nt(a),a.subtreeFlags&6&&(a.flags|=8192)):nt(a),o=a.updateQueue,o!==null&&yc(a,o.retryQueue),o=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),l=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(l=a.memoizedState.cachePool.pool),l!==o&&(a.flags|=2048),t!==null&&X(vi),null;case 24:return o=null,t!==null&&(o=t.memoizedState.cache),a.memoizedState.cache!==o&&(a.flags|=2048),Za(Et),nt(a),null;case 25:return null;case 30:return null}throw Error(i(156,a.tag))}function dj(t,a){switch(Ud(a),a.tag){case 1:return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 3:return Za(Et),we(),t=a.flags,(t&65536)!==0&&(t&128)===0?(a.flags=t&-65537|128,a):null;case 26:case 27:case 5:return Ne(a),null;case 31:if(a.memoizedState!==null){if(Dn(a),a.alternate===null)throw Error(i(340));mi()}return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 13:if(Dn(a),t=a.memoizedState,t!==null&&t.dehydrated!==null){if(a.alternate===null)throw Error(i(340));mi()}return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 19:return X(yt),null;case 4:return we(),null;case 10:return Za(a.type),null;case 22:case 23:return Dn(a),tf(),t!==null&&X(vi),t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 24:return Za(Et),null;case 25:return null;default:return null}}function Fy(t,a){switch(Ud(a),a.tag){case 3:Za(Et),we();break;case 26:case 27:case 5:Ne(a);break;case 4:we();break;case 31:a.memoizedState!==null&&Dn(a);break;case 13:Dn(a);break;case 19:X(yt);break;case 10:Za(a.type);break;case 22:case 23:Dn(a),tf(),t!==null&&X(vi);break;case 24:Za(Et)}}function Mr(t,a){try{var o=a.updateQueue,l=o!==null?o.lastEffect:null;if(l!==null){var p=l.next;o=p;do{if((o.tag&t)===t){l=void 0;var v=o.create,S=o.inst;l=v(),S.destroy=l}o=o.next}while(o!==p)}}catch(j){Ke(a,a.return,j)}}function Ps(t,a,o){try{var l=a.updateQueue,p=l!==null?l.lastEffect:null;if(p!==null){var v=p.next;l=v;do{if((l.tag&t)===t){var S=l.inst,j=S.destroy;if(j!==void 0){S.destroy=void 0,p=a;var k=o,q=j;try{q()}catch(Q){Ke(p,k,Q)}}}l=l.next}while(l!==v)}}catch(Q){Ke(a,a.return,Q)}}function qy(t){var a=t.updateQueue;if(a!==null){var o=t.stateNode;try{Pv(a,o)}catch(l){Ke(t,t.return,l)}}}function $y(t,a,o){o.props=wi(t.type,t.memoizedProps),o.state=t.memoizedState;try{o.componentWillUnmount()}catch(l){Ke(t,a,l)}}function _r(t,a){try{var o=t.ref;if(o!==null){switch(t.tag){case 26:case 27:case 5:var l=t.stateNode;break;case 30:l=t.stateNode;break;default:l=t.stateNode}typeof o=="function"?t.refCleanup=o(l):o.current=l}}catch(p){Ke(t,a,p)}}function Na(t,a){var o=t.ref,l=t.refCleanup;if(o!==null)if(typeof l=="function")try{l()}catch(p){Ke(t,a,p)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(p){Ke(t,a,p)}else o.current=null}function Ky(t){var a=t.type,o=t.memoizedProps,l=t.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":o.autoFocus&&l.focus();break e;case"img":o.src?l.src=o.src:o.srcSet&&(l.srcset=o.srcSet)}}catch(p){Ke(t,t.return,p)}}function Pf(t,a,o){try{var l=t.stateNode;Dj(l,t.type,o,a),l[fe]=a}catch(p){Ke(t,t.return,p)}}function Yy(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Hs(t.type)||t.tag===4}function kf(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Yy(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Hs(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Lf(t,a,o){var l=t.tag;if(l===5||l===6)t=t.stateNode,a?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(t,a):(a=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,a.appendChild(t),o=o._reactRootContainer,o!=null||a.onclick!==null||(a.onclick=$a));else if(l!==4&&(l===27&&Hs(t.type)&&(o=t.stateNode,a=null),t=t.child,t!==null))for(Lf(t,a,o),t=t.sibling;t!==null;)Lf(t,a,o),t=t.sibling}function xc(t,a,o){var l=t.tag;if(l===5||l===6)t=t.stateNode,a?o.insertBefore(t,a):o.appendChild(t);else if(l!==4&&(l===27&&Hs(t.type)&&(o=t.stateNode),t=t.child,t!==null))for(xc(t,a,o),t=t.sibling;t!==null;)xc(t,a,o),t=t.sibling}function Gy(t){var a=t.stateNode,o=t.memoizedProps;try{for(var l=t.type,p=a.attributes;p.length;)a.removeAttributeNode(p[0]);$t(a,l,o),a[Dt]=t,a[fe]=o}catch(v){Ke(t,t.return,v)}}var ts=!1,At=!1,zf=!1,Xy=typeof WeakSet=="function"?WeakSet:Set,Ut=null;function fj(t,a){if(t=t.containerInfo,sh=Uc,t=rv(t),Rd(t)){if("selectionStart"in t)var o={start:t.selectionStart,end:t.selectionEnd};else e:{o=(o=t.ownerDocument)&&o.defaultView||window;var l=o.getSelection&&o.getSelection();if(l&&l.rangeCount!==0){o=l.anchorNode;var p=l.anchorOffset,v=l.focusNode;l=l.focusOffset;try{o.nodeType,v.nodeType}catch{o=null;break e}var S=0,j=-1,k=-1,q=0,Q=0,ee=t,$=null;t:for(;;){for(var Y;ee!==o||p!==0&&ee.nodeType!==3||(j=S+p),ee!==v||l!==0&&ee.nodeType!==3||(k=S+l),ee.nodeType===3&&(S+=ee.nodeValue.length),(Y=ee.firstChild)!==null;)$=ee,ee=Y;for(;;){if(ee===t)break t;if($===o&&++q===p&&(j=S),$===v&&++Q===l&&(k=S),(Y=ee.nextSibling)!==null)break;ee=$,$=ee.parentNode}ee=Y}o=j===-1||k===-1?null:{start:j,end:k}}else o=null}o=o||{start:0,end:0}}else o=null;for(ih={focusedElem:t,selectionRange:o},Uc=!1,Ut=a;Ut!==null;)if(a=Ut,t=a.child,(a.subtreeFlags&1028)!==0&&t!==null)t.return=a,Ut=t;else for(;Ut!==null;){switch(a=Ut,v=a.alternate,t=a.flags,a.tag){case 0:if((t&4)!==0&&(t=a.updateQueue,t=t!==null?t.events:null,t!==null))for(o=0;o<t.length;o++)p=t[o],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&v!==null){t=void 0,o=a,p=v.memoizedProps,v=v.memoizedState,l=o.stateNode;try{var pe=wi(o.type,p);t=l.getSnapshotBeforeUpdate(pe,v),l.__reactInternalSnapshotBeforeUpdate=t}catch(Ee){Ke(o,o.return,Ee)}}break;case 3:if((t&1024)!==0){if(t=a.stateNode.containerInfo,o=t.nodeType,o===9)lh(t);else if(o===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":lh(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(i(163))}if(t=a.sibling,t!==null){t.return=a.return,Ut=t;break}Ut=a.return}}function Zy(t,a,o){var l=o.flags;switch(o.tag){case 0:case 11:case 15:as(t,o),l&4&&Mr(5,o);break;case 1:if(as(t,o),l&4)if(t=o.stateNode,a===null)try{t.componentDidMount()}catch(S){Ke(o,o.return,S)}else{var p=wi(o.type,a.memoizedProps);a=a.memoizedState;try{t.componentDidUpdate(p,a,t.__reactInternalSnapshotBeforeUpdate)}catch(S){Ke(o,o.return,S)}}l&64&&qy(o),l&512&&_r(o,o.return);break;case 3:if(as(t,o),l&64&&(t=o.updateQueue,t!==null)){if(a=null,o.child!==null)switch(o.child.tag){case 27:case 5:a=o.child.stateNode;break;case 1:a=o.child.stateNode}try{Pv(t,a)}catch(S){Ke(o,o.return,S)}}break;case 27:a===null&&l&4&&Gy(o);case 26:case 5:as(t,o),a===null&&l&4&&Ky(o),l&512&&_r(o,o.return);break;case 12:as(t,o);break;case 31:as(t,o),l&4&&Wy(t,o);break;case 13:as(t,o),l&4&&ex(t,o),l&64&&(t=o.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(o=Sj.bind(null,o),Hj(t,o))));break;case 22:if(l=o.memoizedState!==null||ts,!l){a=a!==null&&a.memoizedState!==null||At,p=ts;var v=At;ts=l,(At=a)&&!v?ss(t,o,(o.subtreeFlags&8772)!==0):as(t,o),ts=p,At=v}break;case 30:break;default:as(t,o)}}function Qy(t){var a=t.alternate;a!==null&&(t.alternate=null,Qy(a)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(a=t.stateNode,a!==null&&fd(a)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var at=null,pn=!1;function ns(t,a,o){for(o=o.child;o!==null;)Jy(t,a,o),o=o.sibling}function Jy(t,a,o){if(Ot&&typeof Ot.onCommitFiberUnmount=="function")try{Ot.onCommitFiberUnmount(ca,o)}catch{}switch(o.tag){case 26:At||Na(o,a),ns(t,a,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:At||Na(o,a);var l=at,p=pn;Hs(o.type)&&(at=o.stateNode,pn=!1),ns(t,a,o),Ur(o.stateNode),at=l,pn=p;break;case 5:At||Na(o,a);case 6:if(l=at,p=pn,at=null,ns(t,a,o),at=l,pn=p,at!==null)if(pn)try{(at.nodeType===9?at.body:at.nodeName==="HTML"?at.ownerDocument.body:at).removeChild(o.stateNode)}catch(v){Ke(o,a,v)}else try{at.removeChild(o.stateNode)}catch(v){Ke(o,a,v)}break;case 18:at!==null&&(pn?(t=at,qx(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,o.stateNode),jo(t)):qx(at,o.stateNode));break;case 4:l=at,p=pn,at=o.stateNode.containerInfo,pn=!0,ns(t,a,o),at=l,pn=p;break;case 0:case 11:case 14:case 15:Ps(2,o,a),At||Ps(4,o,a),ns(t,a,o);break;case 1:At||(Na(o,a),l=o.stateNode,typeof l.componentWillUnmount=="function"&&$y(o,a,l)),ns(t,a,o);break;case 21:ns(t,a,o);break;case 22:At=(l=At)||o.memoizedState!==null,ns(t,a,o),At=l;break;default:ns(t,a,o)}}function Wy(t,a){if(a.memoizedState===null&&(t=a.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{jo(t)}catch(o){Ke(a,a.return,o)}}}function ex(t,a){if(a.memoizedState===null&&(t=a.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{jo(t)}catch(o){Ke(a,a.return,o)}}function hj(t){switch(t.tag){case 31:case 13:case 19:var a=t.stateNode;return a===null&&(a=t.stateNode=new Xy),a;case 22:return t=t.stateNode,a=t._retryCache,a===null&&(a=t._retryCache=new Xy),a;default:throw Error(i(435,t.tag))}}function bc(t,a){var o=hj(t);a.forEach(function(l){if(!o.has(l)){o.add(l);var p=wj.bind(null,t,l);l.then(p,p)}})}function gn(t,a){var o=a.deletions;if(o!==null)for(var l=0;l<o.length;l++){var p=o[l],v=t,S=a,j=S;e:for(;j!==null;){switch(j.tag){case 27:if(Hs(j.type)){at=j.stateNode,pn=!1;break e}break;case 5:at=j.stateNode,pn=!1;break e;case 3:case 4:at=j.stateNode.containerInfo,pn=!0;break e}j=j.return}if(at===null)throw Error(i(160));Jy(v,S,p),at=null,pn=!1,v=p.alternate,v!==null&&(v.return=null),p.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)tx(a,t),a=a.sibling}var fa=null;function tx(t,a){var o=t.alternate,l=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:gn(a,t),vn(t),l&4&&(Ps(3,t,t.return),Mr(3,t),Ps(5,t,t.return));break;case 1:gn(a,t),vn(t),l&512&&(At||o===null||Na(o,o.return)),l&64&&ts&&(t=t.updateQueue,t!==null&&(l=t.callbacks,l!==null&&(o=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=o===null?l:o.concat(l))));break;case 26:var p=fa;if(gn(a,t),vn(t),l&512&&(At||o===null||Na(o,o.return)),l&4){var v=o!==null?o.memoizedState:null;if(l=t.memoizedState,o===null)if(l===null)if(t.stateNode===null){e:{l=t.type,o=t.memoizedProps,p=p.ownerDocument||p;t:switch(l){case"title":v=p.getElementsByTagName("title")[0],(!v||v[Es]||v[Dt]||v.namespaceURI==="http://www.w3.org/2000/svg"||v.hasAttribute("itemprop"))&&(v=p.createElement(l),p.head.insertBefore(v,p.querySelector("head > title"))),$t(v,l,o),v[Dt]=t,Bt(v),l=v;break e;case"link":var S=tb("link","href",p).get(l+(o.href||""));if(S){for(var j=0;j<S.length;j++)if(v=S[j],v.getAttribute("href")===(o.href==null||o.href===""?null:o.href)&&v.getAttribute("rel")===(o.rel==null?null:o.rel)&&v.getAttribute("title")===(o.title==null?null:o.title)&&v.getAttribute("crossorigin")===(o.crossOrigin==null?null:o.crossOrigin)){S.splice(j,1);break t}}v=p.createElement(l),$t(v,l,o),p.head.appendChild(v);break;case"meta":if(S=tb("meta","content",p).get(l+(o.content||""))){for(j=0;j<S.length;j++)if(v=S[j],v.getAttribute("content")===(o.content==null?null:""+o.content)&&v.getAttribute("name")===(o.name==null?null:o.name)&&v.getAttribute("property")===(o.property==null?null:o.property)&&v.getAttribute("http-equiv")===(o.httpEquiv==null?null:o.httpEquiv)&&v.getAttribute("charset")===(o.charSet==null?null:o.charSet)){S.splice(j,1);break t}}v=p.createElement(l),$t(v,l,o),p.head.appendChild(v);break;default:throw Error(i(468,l))}v[Dt]=t,Bt(v),l=v}t.stateNode=l}else nb(p,t.type,t.stateNode);else t.stateNode=eb(p,l,t.memoizedProps);else v!==l?(v===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):v.count--,l===null?nb(p,t.type,t.stateNode):eb(p,l,t.memoizedProps)):l===null&&t.stateNode!==null&&Pf(t,t.memoizedProps,o.memoizedProps)}break;case 27:gn(a,t),vn(t),l&512&&(At||o===null||Na(o,o.return)),o!==null&&l&4&&Pf(t,t.memoizedProps,o.memoizedProps);break;case 5:if(gn(a,t),vn(t),l&512&&(At||o===null||Na(o,o.return)),t.flags&32){p=t.stateNode;try{Xi(p,"")}catch(pe){Ke(t,t.return,pe)}}l&4&&t.stateNode!=null&&(p=t.memoizedProps,Pf(t,p,o!==null?o.memoizedProps:p)),l&1024&&(zf=!0);break;case 6:if(gn(a,t),vn(t),l&4){if(t.stateNode===null)throw Error(i(162));l=t.memoizedProps,o=t.stateNode;try{o.nodeValue=l}catch(pe){Ke(t,t.return,pe)}}break;case 3:if(Lc=null,p=fa,fa=Pc(a.containerInfo),gn(a,t),fa=p,vn(t),l&4&&o!==null&&o.memoizedState.isDehydrated)try{jo(a.containerInfo)}catch(pe){Ke(t,t.return,pe)}zf&&(zf=!1,nx(t));break;case 4:l=fa,fa=Pc(t.stateNode.containerInfo),gn(a,t),vn(t),fa=l;break;case 12:gn(a,t),vn(t);break;case 31:gn(a,t),vn(t),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,bc(t,l)));break;case 13:gn(a,t),vn(t),t.child.flags&8192&&t.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(wc=_t()),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,bc(t,l)));break;case 22:p=t.memoizedState!==null;var k=o!==null&&o.memoizedState!==null,q=ts,Q=At;if(ts=q||p,At=Q||k,gn(a,t),At=Q,ts=q,vn(t),l&8192)e:for(a=t.stateNode,a._visibility=p?a._visibility&-2:a._visibility|1,p&&(o===null||k||ts||At||Ei(t)),o=null,a=t;;){if(a.tag===5||a.tag===26){if(o===null){k=o=a;try{if(v=k.stateNode,p)S=v.style,typeof S.setProperty=="function"?S.setProperty("display","none","important"):S.display="none";else{j=k.stateNode;var ee=k.memoizedProps.style,$=ee!=null&&ee.hasOwnProperty("display")?ee.display:null;j.style.display=$==null||typeof $=="boolean"?"":(""+$).trim()}}catch(pe){Ke(k,k.return,pe)}}}else if(a.tag===6){if(o===null){k=a;try{k.stateNode.nodeValue=p?"":k.memoizedProps}catch(pe){Ke(k,k.return,pe)}}}else if(a.tag===18){if(o===null){k=a;try{var Y=k.stateNode;p?$x(Y,!0):$x(k.stateNode,!1)}catch(pe){Ke(k,k.return,pe)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===t)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break e;for(;a.sibling===null;){if(a.return===null||a.return===t)break e;o===a&&(o=null),a=a.return}o===a&&(o=null),a.sibling.return=a.return,a=a.sibling}l&4&&(l=t.updateQueue,l!==null&&(o=l.retryQueue,o!==null&&(l.retryQueue=null,bc(t,o))));break;case 19:gn(a,t),vn(t),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,bc(t,l)));break;case 30:break;case 21:break;default:gn(a,t),vn(t)}}function vn(t){var a=t.flags;if(a&2){try{for(var o,l=t.return;l!==null;){if(Yy(l)){o=l;break}l=l.return}if(o==null)throw Error(i(160));switch(o.tag){case 27:var p=o.stateNode,v=kf(t);xc(t,v,p);break;case 5:var S=o.stateNode;o.flags&32&&(Xi(S,""),o.flags&=-33);var j=kf(t);xc(t,j,S);break;case 3:case 4:var k=o.stateNode.containerInfo,q=kf(t);Lf(t,q,k);break;default:throw Error(i(161))}}catch(Q){Ke(t,t.return,Q)}t.flags&=-3}a&4096&&(t.flags&=-4097)}function nx(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var a=t;nx(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),t=t.sibling}}function as(t,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)Zy(t,a.alternate,a),a=a.sibling}function Ei(t){for(t=t.child;t!==null;){var a=t;switch(a.tag){case 0:case 11:case 14:case 15:Ps(4,a,a.return),Ei(a);break;case 1:Na(a,a.return);var o=a.stateNode;typeof o.componentWillUnmount=="function"&&$y(a,a.return,o),Ei(a);break;case 27:Ur(a.stateNode);case 26:case 5:Na(a,a.return),Ei(a);break;case 22:a.memoizedState===null&&Ei(a);break;case 30:Ei(a);break;default:Ei(a)}t=t.sibling}}function ss(t,a,o){for(o=o&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var l=a.alternate,p=t,v=a,S=v.flags;switch(v.tag){case 0:case 11:case 15:ss(p,v,o),Mr(4,v);break;case 1:if(ss(p,v,o),l=v,p=l.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(q){Ke(l,l.return,q)}if(l=v,p=l.updateQueue,p!==null){var j=l.stateNode;try{var k=p.shared.hiddenCallbacks;if(k!==null)for(p.shared.hiddenCallbacks=null,p=0;p<k.length;p++)Dv(k[p],j)}catch(q){Ke(l,l.return,q)}}o&&S&64&&qy(v),_r(v,v.return);break;case 27:Gy(v);case 26:case 5:ss(p,v,o),o&&l===null&&S&4&&Ky(v),_r(v,v.return);break;case 12:ss(p,v,o);break;case 31:ss(p,v,o),o&&S&4&&Wy(p,v);break;case 13:ss(p,v,o),o&&S&4&&ex(p,v);break;case 22:v.memoizedState===null&&ss(p,v,o),_r(v,v.return);break;case 30:break;default:ss(p,v,o)}a=a.sibling}}function Vf(t,a){var o=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),t=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(t=a.memoizedState.cachePool.pool),t!==o&&(t!=null&&t.refCount++,o!=null&&vr(o))}function Bf(t,a){t=null,a.alternate!==null&&(t=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==t&&(a.refCount++,t!=null&&vr(t))}function ha(t,a,o,l){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)ax(t,a,o,l),a=a.sibling}function ax(t,a,o,l){var p=a.flags;switch(a.tag){case 0:case 11:case 15:ha(t,a,o,l),p&2048&&Mr(9,a);break;case 1:ha(t,a,o,l);break;case 3:ha(t,a,o,l),p&2048&&(t=null,a.alternate!==null&&(t=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==t&&(a.refCount++,t!=null&&vr(t)));break;case 12:if(p&2048){ha(t,a,o,l),t=a.stateNode;try{var v=a.memoizedProps,S=v.id,j=v.onPostCommit;typeof j=="function"&&j(S,a.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(k){Ke(a,a.return,k)}}else ha(t,a,o,l);break;case 31:ha(t,a,o,l);break;case 13:ha(t,a,o,l);break;case 23:break;case 22:v=a.stateNode,S=a.alternate,a.memoizedState!==null?v._visibility&2?ha(t,a,o,l):Or(t,a):v._visibility&2?ha(t,a,o,l):(v._visibility|=2,go(t,a,o,l,(a.subtreeFlags&10256)!==0||!1)),p&2048&&Vf(S,a);break;case 24:ha(t,a,o,l),p&2048&&Bf(a.alternate,a);break;default:ha(t,a,o,l)}}function go(t,a,o,l,p){for(p=p&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var v=t,S=a,j=o,k=l,q=S.flags;switch(S.tag){case 0:case 11:case 15:go(v,S,j,k,p),Mr(8,S);break;case 23:break;case 22:var Q=S.stateNode;S.memoizedState!==null?Q._visibility&2?go(v,S,j,k,p):Or(v,S):(Q._visibility|=2,go(v,S,j,k,p)),p&&q&2048&&Vf(S.alternate,S);break;case 24:go(v,S,j,k,p),p&&q&2048&&Bf(S.alternate,S);break;default:go(v,S,j,k,p)}a=a.sibling}}function Or(t,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var o=t,l=a,p=l.flags;switch(l.tag){case 22:Or(o,l),p&2048&&Vf(l.alternate,l);break;case 24:Or(o,l),p&2048&&Bf(l.alternate,l);break;default:Or(o,l)}a=a.sibling}}var Dr=8192;function vo(t,a,o){if(t.subtreeFlags&Dr)for(t=t.child;t!==null;)sx(t,a,o),t=t.sibling}function sx(t,a,o){switch(t.tag){case 26:vo(t,a,o),t.flags&Dr&&t.memoizedState!==null&&Wj(o,fa,t.memoizedState,t.memoizedProps);break;case 5:vo(t,a,o);break;case 3:case 4:var l=fa;fa=Pc(t.stateNode.containerInfo),vo(t,a,o),fa=l;break;case 22:t.memoizedState===null&&(l=t.alternate,l!==null&&l.memoizedState!==null?(l=Dr,Dr=16777216,vo(t,a,o),Dr=l):vo(t,a,o));break;default:vo(t,a,o)}}function ix(t){var a=t.alternate;if(a!==null&&(t=a.child,t!==null)){a.child=null;do a=t.sibling,t.sibling=null,t=a;while(t!==null)}}function Pr(t){var a=t.deletions;if((t.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var l=a[o];Ut=l,rx(l,t)}ix(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)ox(t),t=t.sibling}function ox(t){switch(t.tag){case 0:case 11:case 15:Pr(t),t.flags&2048&&Ps(9,t,t.return);break;case 3:Pr(t);break;case 12:Pr(t);break;case 22:var a=t.stateNode;t.memoizedState!==null&&a._visibility&2&&(t.return===null||t.return.tag!==13)?(a._visibility&=-3,Sc(t)):Pr(t);break;default:Pr(t)}}function Sc(t){var a=t.deletions;if((t.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var l=a[o];Ut=l,rx(l,t)}ix(t)}for(t=t.child;t!==null;){switch(a=t,a.tag){case 0:case 11:case 15:Ps(8,a,a.return),Sc(a);break;case 22:o=a.stateNode,o._visibility&2&&(o._visibility&=-3,Sc(a));break;default:Sc(a)}t=t.sibling}}function rx(t,a){for(;Ut!==null;){var o=Ut;switch(o.tag){case 0:case 11:case 15:Ps(8,o,a);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var l=o.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:vr(o.memoizedState.cache)}if(l=o.child,l!==null)l.return=o,Ut=l;else e:for(o=t;Ut!==null;){l=Ut;var p=l.sibling,v=l.return;if(Qy(l),l===o){Ut=null;break e}if(p!==null){p.return=v,Ut=p;break e}Ut=v}}}var mj={getCacheForType:function(t){var a=Ft(Et),o=a.data.get(t);return o===void 0&&(o=t(),a.data.set(t,o)),o},cacheSignal:function(){return Ft(Et).controller.signal}},pj=typeof WeakMap=="function"?WeakMap:Map,Fe=0,Ze=null,Pe=null,Le=0,$e=0,Pn=null,ks=!1,yo=!1,Uf=!1,is=0,dt=0,Ls=0,Ci=0,Hf=0,kn=0,xo=0,kr=null,yn=null,If=!1,wc=0,lx=0,Ec=1/0,Cc=null,zs=null,Pt=0,Vs=null,bo=null,os=0,Ff=0,qf=null,cx=null,Lr=0,$f=null;function Ln(){return(Fe&2)!==0&&Le!==0?Le&-Le:D.T!==null?Qf():sr()}function ux(){if(kn===0)if((Le&536870912)===0||Ve){var t=hn;hn<<=1,(hn&3932160)===0&&(hn=262144),kn=t}else kn=536870912;return t=On.current,t!==null&&(t.flags|=32),kn}function xn(t,a,o){(t===Ze&&($e===2||$e===9)||t.cancelPendingCommit!==null)&&(So(t,0),Bs(t,Le,kn,!1)),et(t,o),((Fe&2)===0||t!==Ze)&&(t===Ze&&((Fe&2)===0&&(Ci|=o),dt===4&&Bs(t,Le,kn,!1)),Ra(t))}function dx(t,a,o){if((Fe&6)!==0)throw Error(i(327));var l=!o&&(a&127)===0&&(a&t.expiredLanes)===0||Qe(t,a),p=l?yj(t,a):Yf(t,a,!0),v=l;do{if(p===0){yo&&!l&&Bs(t,a,0,!1);break}else{if(o=t.current.alternate,v&&!gj(o)){p=Yf(t,a,!1),v=!1;continue}if(p===2){if(v=a,t.errorRecoveryDisabledLanes&v)var S=0;else S=t.pendingLanes&-536870913,S=S!==0?S:S&536870912?536870912:0;if(S!==0){a=S;e:{var j=t;p=kr;var k=j.current.memoizedState.isDehydrated;if(k&&(So(j,S).flags|=256),S=Yf(j,S,!1),S!==2){if(Uf&&!k){j.errorRecoveryDisabledLanes|=v,Ci|=v,p=4;break e}v=yn,yn=p,v!==null&&(yn===null?yn=v:yn.push.apply(yn,v))}p=S}if(v=!1,p!==2)continue}}if(p===1){So(t,0),Bs(t,a,0,!0);break}e:{switch(l=t,v=p,v){case 0:case 1:throw Error(i(345));case 4:if((a&4194048)!==a)break;case 6:Bs(l,a,kn,!ks);break e;case 2:yn=null;break;case 3:case 5:break;default:throw Error(i(329))}if((a&62914560)===a&&(p=wc+300-_t(),10<p)){if(Bs(l,a,kn,!ks),Ce(l,0,!0)!==0)break e;os=a,l.timeoutHandle=Ix(fx.bind(null,l,o,yn,Cc,If,a,kn,Ci,xo,ks,v,"Throttled",-0,0),p);break e}fx(l,o,yn,Cc,If,a,kn,Ci,xo,ks,v,null,-0,0)}}break}while(!0);Ra(t)}function fx(t,a,o,l,p,v,S,j,k,q,Q,ee,$,Y){if(t.timeoutHandle=-1,ee=a.subtreeFlags,ee&8192||(ee&16785408)===16785408){ee={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:$a},sx(a,v,ee);var pe=(v&62914560)===v?wc-_t():(v&4194048)===v?lx-_t():0;if(pe=eN(ee,pe),pe!==null){os=v,t.cancelPendingCommit=pe(bx.bind(null,t,a,v,o,l,p,S,j,k,Q,ee,null,$,Y)),Bs(t,v,S,!q);return}}bx(t,a,v,o,l,p,S,j,k)}function gj(t){for(var a=t;;){var o=a.tag;if((o===0||o===11||o===15)&&a.flags&16384&&(o=a.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var l=0;l<o.length;l++){var p=o[l],v=p.getSnapshot;p=p.value;try{if(!Mn(v(),p))return!1}catch{return!1}}if(o=a.child,a.subtreeFlags&16384&&o!==null)o.return=a,a=o;else{if(a===t)break;for(;a.sibling===null;){if(a.return===null||a.return===t)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function Bs(t,a,o,l){a&=~Hf,a&=~Ci,t.suspendedLanes|=a,t.pingedLanes&=~a,l&&(t.warmLanes|=a),l=t.expirationTimes;for(var p=a;0<p;){var v=31-bt(p),S=1<<v;l[v]=-1,p&=~S}o!==0&&Fa(t,o,a)}function Tc(){return(Fe&6)===0?(zr(0),!1):!0}function Kf(){if(Pe!==null){if($e===0)var t=Pe.return;else t=Pe,Xa=pi=null,lf(t),uo=null,xr=0,t=Pe;for(;t!==null;)Fy(t.alternate,t),t=t.return;Pe=null}}function So(t,a){var o=t.timeoutHandle;o!==-1&&(t.timeoutHandle=-1,Lj(o)),o=t.cancelPendingCommit,o!==null&&(t.cancelPendingCommit=null,o()),os=0,Kf(),Ze=t,Pe=o=Ya(t.current,null),Le=a,$e=0,Pn=null,ks=!1,yo=Qe(t,a),Uf=!1,xo=kn=Hf=Ci=Ls=dt=0,yn=kr=null,If=!1,(a&8)!==0&&(a|=a&32);var l=t.entangledLanes;if(l!==0)for(t=t.entanglements,l&=a;0<l;){var p=31-bt(l),v=1<<p;a|=t[p],l&=~v}return is=a,Kl(),o}function hx(t,a){Re=null,D.H=jr,a===co||a===ec?(a=Rv(),$e=3):a===Xd?(a=Rv(),$e=4):$e=a===Cf?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,Pn=a,Pe===null&&(dt=1,mc(t,Kn(a,t.current)))}function mx(){var t=On.current;return t===null?!0:(Le&4194048)===Le?Zn===null:(Le&62914560)===Le||(Le&536870912)!==0?t===Zn:!1}function px(){var t=D.H;return D.H=jr,t===null?jr:t}function gx(){var t=D.A;return D.A=mj,t}function Ac(){dt=4,ks||(Le&4194048)!==Le&&On.current!==null||(yo=!0),(Ls&134217727)===0&&(Ci&134217727)===0||Ze===null||Bs(Ze,Le,kn,!1)}function Yf(t,a,o){var l=Fe;Fe|=2;var p=px(),v=gx();(Ze!==t||Le!==a)&&(Cc=null,So(t,a)),a=!1;var S=dt;e:do try{if($e!==0&&Pe!==null){var j=Pe,k=Pn;switch($e){case 8:Kf(),S=6;break e;case 3:case 2:case 9:case 6:On.current===null&&(a=!0);var q=$e;if($e=0,Pn=null,wo(t,j,k,q),o&&yo){S=0;break e}break;default:q=$e,$e=0,Pn=null,wo(t,j,k,q)}}vj(),S=dt;break}catch(Q){hx(t,Q)}while(!0);return a&&t.shellSuspendCounter++,Xa=pi=null,Fe=l,D.H=p,D.A=v,Pe===null&&(Ze=null,Le=0,Kl()),S}function vj(){for(;Pe!==null;)vx(Pe)}function yj(t,a){var o=Fe;Fe|=2;var l=px(),p=gx();Ze!==t||Le!==a?(Cc=null,Ec=_t()+500,So(t,a)):yo=Qe(t,a);e:do try{if($e!==0&&Pe!==null){a=Pe;var v=Pn;t:switch($e){case 1:$e=0,Pn=null,wo(t,a,v,1);break;case 2:case 9:if(jv(v)){$e=0,Pn=null,yx(a);break}a=function(){$e!==2&&$e!==9||Ze!==t||($e=7),Ra(t)},v.then(a,a);break e;case 3:$e=7;break e;case 4:$e=5;break e;case 7:jv(v)?($e=0,Pn=null,yx(a)):($e=0,Pn=null,wo(t,a,v,7));break;case 5:var S=null;switch(Pe.tag){case 26:S=Pe.memoizedState;case 5:case 27:var j=Pe;if(S?ab(S):j.stateNode.complete){$e=0,Pn=null;var k=j.sibling;if(k!==null)Pe=k;else{var q=j.return;q!==null?(Pe=q,jc(q)):Pe=null}break t}}$e=0,Pn=null,wo(t,a,v,5);break;case 6:$e=0,Pn=null,wo(t,a,v,6);break;case 8:Kf(),dt=6;break e;default:throw Error(i(462))}}xj();break}catch(Q){hx(t,Q)}while(!0);return Xa=pi=null,D.H=l,D.A=p,Fe=o,Pe!==null?0:(Ze=null,Le=0,Kl(),dt)}function xj(){for(;Pe!==null&&!Mt();)vx(Pe)}function vx(t){var a=Hy(t.alternate,t,is);t.memoizedProps=t.pendingProps,a===null?jc(t):Pe=a}function yx(t){var a=t,o=a.alternate;switch(a.tag){case 15:case 0:a=ky(o,a,a.pendingProps,a.type,void 0,Le);break;case 11:a=ky(o,a,a.pendingProps,a.type.render,a.ref,Le);break;case 5:lf(a);default:Fy(o,a),a=Pe=gv(a,is),a=Hy(o,a,is)}t.memoizedProps=t.pendingProps,a===null?jc(t):Pe=a}function wo(t,a,o,l){Xa=pi=null,lf(a),uo=null,xr=0;var p=a.return;try{if(rj(t,p,a,o,Le)){dt=1,mc(t,Kn(o,t.current)),Pe=null;return}}catch(v){if(p!==null)throw Pe=p,v;dt=1,mc(t,Kn(o,t.current)),Pe=null;return}a.flags&32768?(Ve||l===1?t=!0:yo||(Le&536870912)!==0?t=!1:(ks=t=!0,(l===2||l===9||l===3||l===6)&&(l=On.current,l!==null&&l.tag===13&&(l.flags|=16384))),xx(a,t)):jc(a)}function jc(t){var a=t;do{if((a.flags&32768)!==0){xx(a,ks);return}t=a.return;var o=uj(a.alternate,a,is);if(o!==null){Pe=o;return}if(a=a.sibling,a!==null){Pe=a;return}Pe=a=t}while(a!==null);dt===0&&(dt=5)}function xx(t,a){do{var o=dj(t.alternate,t);if(o!==null){o.flags&=32767,Pe=o;return}if(o=t.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!a&&(t=t.sibling,t!==null)){Pe=t;return}Pe=t=o}while(t!==null);dt=6,Pe=null}function bx(t,a,o,l,p,v,S,j,k){t.cancelPendingCommit=null;do Nc();while(Pt!==0);if((Fe&6)!==0)throw Error(i(327));if(a!==null){if(a===t.current)throw Error(i(177));if(v=a.lanes|a.childLanes,v|=Pd,Xt(t,o,v,S,j,k),t===Ze&&(Pe=Ze=null,Le=0),bo=a,Vs=t,os=o,Ff=v,qf=p,cx=l,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,Ej(Hn,function(){return Tx(),null})):(t.callbackNode=null,t.callbackPriority=0),l=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||l){l=D.T,D.T=null,p=H.p,H.p=2,S=Fe,Fe|=4;try{fj(t,a,o)}finally{Fe=S,H.p=p,D.T=l}}Pt=1,Sx(),wx(),Ex()}}function Sx(){if(Pt===1){Pt=0;var t=Vs,a=bo,o=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||o){o=D.T,D.T=null;var l=H.p;H.p=2;var p=Fe;Fe|=4;try{tx(a,t);var v=ih,S=rv(t.containerInfo),j=v.focusedElem,k=v.selectionRange;if(S!==j&&j&&j.ownerDocument&&ov(j.ownerDocument.documentElement,j)){if(k!==null&&Rd(j)){var q=k.start,Q=k.end;if(Q===void 0&&(Q=q),"selectionStart"in j)j.selectionStart=q,j.selectionEnd=Math.min(Q,j.value.length);else{var ee=j.ownerDocument||document,$=ee&&ee.defaultView||window;if($.getSelection){var Y=$.getSelection(),pe=j.textContent.length,Ee=Math.min(k.start,pe),Xe=k.end===void 0?Ee:Math.min(k.end,pe);!Y.extend&&Ee>Xe&&(S=Xe,Xe=Ee,Ee=S);var B=iv(j,Ee),z=iv(j,Xe);if(B&&z&&(Y.rangeCount!==1||Y.anchorNode!==B.node||Y.anchorOffset!==B.offset||Y.focusNode!==z.node||Y.focusOffset!==z.offset)){var F=ee.createRange();F.setStart(B.node,B.offset),Y.removeAllRanges(),Ee>Xe?(Y.addRange(F),Y.extend(z.node,z.offset)):(F.setEnd(z.node,z.offset),Y.addRange(F))}}}}for(ee=[],Y=j;Y=Y.parentNode;)Y.nodeType===1&&ee.push({element:Y,left:Y.scrollLeft,top:Y.scrollTop});for(typeof j.focus=="function"&&j.focus(),j=0;j<ee.length;j++){var W=ee[j];W.element.scrollLeft=W.left,W.element.scrollTop=W.top}}Uc=!!sh,ih=sh=null}finally{Fe=p,H.p=l,D.T=o}}t.current=a,Pt=2}}function wx(){if(Pt===2){Pt=0;var t=Vs,a=bo,o=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||o){o=D.T,D.T=null;var l=H.p;H.p=2;var p=Fe;Fe|=4;try{Zy(t,a.alternate,a)}finally{Fe=p,H.p=l,D.T=o}}Pt=3}}function Ex(){if(Pt===4||Pt===3){Pt=0,Un();var t=Vs,a=bo,o=os,l=cx;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?Pt=5:(Pt=0,bo=Vs=null,Cx(t,t.pendingLanes));var p=t.pendingLanes;if(p===0&&(zs=null),Rn(o),a=a.stateNode,Ot&&typeof Ot.onCommitFiberRoot=="function")try{Ot.onCommitFiberRoot(ca,a,void 0,(a.current.flags&128)===128)}catch{}if(l!==null){a=D.T,p=H.p,H.p=2,D.T=null;try{for(var v=t.onRecoverableError,S=0;S<l.length;S++){var j=l[S];v(j.value,{componentStack:j.stack})}}finally{D.T=a,H.p=p}}(os&3)!==0&&Nc(),Ra(t),p=t.pendingLanes,(o&261930)!==0&&(p&42)!==0?t===$f?Lr++:(Lr=0,$f=t):Lr=0,zr(0)}}function Cx(t,a){(t.pooledCacheLanes&=a)===0&&(a=t.pooledCache,a!=null&&(t.pooledCache=null,vr(a)))}function Nc(){return Sx(),wx(),Ex(),Tx()}function Tx(){if(Pt!==5)return!1;var t=Vs,a=Ff;Ff=0;var o=Rn(os),l=D.T,p=H.p;try{H.p=32>o?32:o,D.T=null,o=qf,qf=null;var v=Vs,S=os;if(Pt=0,bo=Vs=null,os=0,(Fe&6)!==0)throw Error(i(331));var j=Fe;if(Fe|=4,ox(v.current),ax(v,v.current,S,o),Fe=j,zr(0,!1),Ot&&typeof Ot.onPostCommitFiberRoot=="function")try{Ot.onPostCommitFiberRoot(ca,v)}catch{}return!0}finally{H.p=p,D.T=l,Cx(t,a)}}function Ax(t,a,o){a=Kn(o,a),a=Ef(t.stateNode,a,2),t=_s(t,a,2),t!==null&&(et(t,2),Ra(t))}function Ke(t,a,o){if(t.tag===3)Ax(t,t,o);else for(;a!==null;){if(a.tag===3){Ax(a,t,o);break}else if(a.tag===1){var l=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(zs===null||!zs.has(l))){t=Kn(o,t),o=jy(2),l=_s(a,o,2),l!==null&&(Ny(o,l,a,t),et(l,2),Ra(l));break}}a=a.return}}function Gf(t,a,o){var l=t.pingCache;if(l===null){l=t.pingCache=new pj;var p=new Set;l.set(a,p)}else p=l.get(a),p===void 0&&(p=new Set,l.set(a,p));p.has(o)||(Uf=!0,p.add(o),t=bj.bind(null,t,a,o),a.then(t,t))}function bj(t,a,o){var l=t.pingCache;l!==null&&l.delete(a),t.pingedLanes|=t.suspendedLanes&o,t.warmLanes&=~o,Ze===t&&(Le&o)===o&&(dt===4||dt===3&&(Le&62914560)===Le&&300>_t()-wc?(Fe&2)===0&&So(t,0):Hf|=o,xo===Le&&(xo=0)),Ra(t)}function jx(t,a){a===0&&(a=Vt()),t=fi(t,a),t!==null&&(et(t,a),Ra(t))}function Sj(t){var a=t.memoizedState,o=0;a!==null&&(o=a.retryLane),jx(t,o)}function wj(t,a){var o=0;switch(t.tag){case 31:case 13:var l=t.stateNode,p=t.memoizedState;p!==null&&(o=p.retryLane);break;case 19:l=t.stateNode;break;case 22:l=t.stateNode._retryCache;break;default:throw Error(i(314))}l!==null&&l.delete(a),jx(t,o)}function Ej(t,a){return Ua(t,a)}var Rc=null,Eo=null,Xf=!1,Mc=!1,Zf=!1,Us=0;function Ra(t){t!==Eo&&t.next===null&&(Eo===null?Rc=Eo=t:Eo=Eo.next=t),Mc=!0,Xf||(Xf=!0,Tj())}function zr(t,a){if(!Zf&&Mc){Zf=!0;do for(var o=!1,l=Rc;l!==null;){if(t!==0){var p=l.pendingLanes;if(p===0)var v=0;else{var S=l.suspendedLanes,j=l.pingedLanes;v=(1<<31-bt(42|t)+1)-1,v&=p&~(S&~j),v=v&201326741?v&201326741|1:v?v|2:0}v!==0&&(o=!0,_x(l,v))}else v=Le,v=Ce(l,l===Ze?v:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(v&3)===0||Qe(l,v)||(o=!0,_x(l,v));l=l.next}while(o);Zf=!1}}function Cj(){Nx()}function Nx(){Mc=Xf=!1;var t=0;Us!==0&&kj()&&(t=Us);for(var a=_t(),o=null,l=Rc;l!==null;){var p=l.next,v=Rx(l,a);v===0?(l.next=null,o===null?Rc=p:o.next=p,p===null&&(Eo=o)):(o=l,(t!==0||(v&3)!==0)&&(Mc=!0)),l=p}Pt!==0&&Pt!==5||zr(t),Us!==0&&(Us=0)}function Rx(t,a){for(var o=t.suspendedLanes,l=t.pingedLanes,p=t.expirationTimes,v=t.pendingLanes&-62914561;0<v;){var S=31-bt(v),j=1<<S,k=p[S];k===-1?((j&o)===0||(j&l)!==0)&&(p[S]=St(j,a)):k<=a&&(t.expiredLanes|=j),v&=~j}if(a=Ze,o=Le,o=Ce(t,t===a?o:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),l=t.callbackNode,o===0||t===a&&($e===2||$e===9)||t.cancelPendingCommit!==null)return l!==null&&l!==null&&Ha(l),t.callbackNode=null,t.callbackPriority=0;if((o&3)===0||Qe(t,o)){if(a=o&-o,a===t.callbackPriority)return a;switch(l!==null&&Ha(l),Rn(o)){case 2:case 8:o=la;break;case 32:o=Hn;break;case 268435456:o=Nn;break;default:o=Hn}return l=Mx.bind(null,t),o=Ua(o,l),t.callbackPriority=a,t.callbackNode=o,a}return l!==null&&l!==null&&Ha(l),t.callbackPriority=2,t.callbackNode=null,2}function Mx(t,a){if(Pt!==0&&Pt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var o=t.callbackNode;if(Nc()&&t.callbackNode!==o)return null;var l=Le;return l=Ce(t,t===Ze?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),l===0?null:(dx(t,l,a),Rx(t,_t()),t.callbackNode!=null&&t.callbackNode===o?Mx.bind(null,t):null)}function _x(t,a){if(Nc())return null;dx(t,a,!0)}function Tj(){zj(function(){(Fe&6)!==0?Ua(dn,Cj):Nx()})}function Qf(){if(Us===0){var t=ro;t===0&&(t=sn,sn<<=1,(sn&261888)===0&&(sn=256)),Us=t}return Us}function Ox(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Vl(""+t)}function Dx(t,a){var o=a.ownerDocument.createElement("input");return o.name=a.name,o.value=a.value,t.id&&o.setAttribute("form",t.id),a.parentNode.insertBefore(o,a),t=new FormData(t),o.parentNode.removeChild(o),t}function Aj(t,a,o,l,p){if(a==="submit"&&o&&o.stateNode===p){var v=Ox((p[fe]||null).action),S=l.submitter;S&&(a=(a=S[fe]||null)?Ox(a.formAction):S.getAttribute("formAction"),a!==null&&(v=a,S=null));var j=new Il("action","action",null,l,p);t.push({event:j,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Us!==0){var k=S?Dx(p,S):new FormData(p);vf(o,{pending:!0,data:k,method:p.method,action:v},null,k)}}else typeof v=="function"&&(j.preventDefault(),k=S?Dx(p,S):new FormData(p),vf(o,{pending:!0,data:k,method:p.method,action:v},v,k))},currentTarget:p}]})}}for(var Jf=0;Jf<Dd.length;Jf++){var Wf=Dd[Jf],jj=Wf.toLowerCase(),Nj=Wf[0].toUpperCase()+Wf.slice(1);da(jj,"on"+Nj)}da(uv,"onAnimationEnd"),da(dv,"onAnimationIteration"),da(fv,"onAnimationStart"),da("dblclick","onDoubleClick"),da("focusin","onFocus"),da("focusout","onBlur"),da(qA,"onTransitionRun"),da($A,"onTransitionStart"),da(KA,"onTransitionCancel"),da(hv,"onTransitionEnd"),Yi("onMouseEnter",["mouseout","mouseover"]),Yi("onMouseLeave",["mouseout","mouseover"]),Yi("onPointerEnter",["pointerout","pointerover"]),Yi("onPointerLeave",["pointerout","pointerover"]),li("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),li("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),li("onBeforeInput",["compositionend","keypress","textInput","paste"]),li("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),li("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),li("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Vr="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(" "),Rj=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Vr));function Px(t,a){a=(a&4)!==0;for(var o=0;o<t.length;o++){var l=t[o],p=l.event;l=l.listeners;e:{var v=void 0;if(a)for(var S=l.length-1;0<=S;S--){var j=l[S],k=j.instance,q=j.currentTarget;if(j=j.listener,k!==v&&p.isPropagationStopped())break e;v=j,p.currentTarget=q;try{v(p)}catch(Q){$l(Q)}p.currentTarget=null,v=k}else for(S=0;S<l.length;S++){if(j=l[S],k=j.instance,q=j.currentTarget,j=j.listener,k!==v&&p.isPropagationStopped())break e;v=j,p.currentTarget=q;try{v(p)}catch(Q){$l(Q)}p.currentTarget=null,v=k}}}}function ke(t,a){var o=a[wt];o===void 0&&(o=a[wt]=new Set);var l=t+"__bubble";o.has(l)||(kx(a,t,2,!1),o.add(l))}function eh(t,a,o){var l=0;a&&(l|=4),kx(o,t,l,a)}var _c="_reactListening"+Math.random().toString(36).slice(2);function th(t){if(!t[_c]){t[_c]=!0,Ng.forEach(function(o){o!=="selectionchange"&&(Rj.has(o)||eh(o,!1,t),eh(o,!0,t))});var a=t.nodeType===9?t:t.ownerDocument;a===null||a[_c]||(a[_c]=!0,eh("selectionchange",!1,a))}}function kx(t,a,o,l){switch(ub(a)){case 2:var p=aN;break;case 8:p=sN;break;default:p=gh}o=p.bind(null,a,o,t),p=void 0,!bd||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(p=!0),l?p!==void 0?t.addEventListener(a,o,{capture:!0,passive:p}):t.addEventListener(a,o,!0):p!==void 0?t.addEventListener(a,o,{passive:p}):t.addEventListener(a,o,!1)}function nh(t,a,o,l,p){var v=l;if((a&1)===0&&(a&2)===0&&l!==null)e:for(;;){if(l===null)return;var S=l.tag;if(S===3||S===4){var j=l.stateNode.containerInfo;if(j===p)break;if(S===4)for(S=l.return;S!==null;){var k=S.tag;if((k===3||k===4)&&S.stateNode.containerInfo===p)return;S=S.return}for(;j!==null;){if(S=qi(j),S===null)return;if(k=S.tag,k===5||k===6||k===26||k===27){l=v=S;continue e}j=j.parentNode}}l=l.return}Ug(function(){var q=v,Q=yd(o),ee=[];e:{var $=mv.get(t);if($!==void 0){var Y=Il,pe=t;switch(t){case"keypress":if(Ul(o)===0)break e;case"keydown":case"keyup":Y=wA;break;case"focusin":pe="focus",Y=Cd;break;case"focusout":pe="blur",Y=Cd;break;case"beforeblur":case"afterblur":Y=Cd;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Y=Fg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Y=uA;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Y=TA;break;case uv:case dv:case fv:Y=hA;break;case hv:Y=jA;break;case"scroll":case"scrollend":Y=lA;break;case"wheel":Y=RA;break;case"copy":case"cut":case"paste":Y=pA;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Y=$g;break;case"toggle":case"beforetoggle":Y=_A}var Ee=(a&4)!==0,Xe=!Ee&&(t==="scroll"||t==="scrollend"),B=Ee?$!==null?$+"Capture":null:$;Ee=[];for(var z=q,F;z!==null;){var W=z;if(F=W.stateNode,W=W.tag,W!==5&&W!==26&&W!==27||F===null||B===null||(W=or(z,B),W!=null&&Ee.push(Br(z,W,F))),Xe)break;z=z.return}0<Ee.length&&($=new Y($,pe,null,o,Q),ee.push({event:$,listeners:Ee}))}}if((a&7)===0){e:{if($=t==="mouseover"||t==="pointerover",Y=t==="mouseout"||t==="pointerout",$&&o!==vd&&(pe=o.relatedTarget||o.fromElement)&&(qi(pe)||pe[be]))break e;if((Y||$)&&($=Q.window===Q?Q:($=Q.ownerDocument)?$.defaultView||$.parentWindow:window,Y?(pe=o.relatedTarget||o.toElement,Y=q,pe=pe?qi(pe):null,pe!==null&&(Xe=c(pe),Ee=pe.tag,pe!==Xe||Ee!==5&&Ee!==27&&Ee!==6)&&(pe=null)):(Y=null,pe=q),Y!==pe)){if(Ee=Fg,W="onMouseLeave",B="onMouseEnter",z="mouse",(t==="pointerout"||t==="pointerover")&&(Ee=$g,W="onPointerLeave",B="onPointerEnter",z="pointer"),Xe=Y==null?$:ir(Y),F=pe==null?$:ir(pe),$=new Ee(W,z+"leave",Y,o,Q),$.target=Xe,$.relatedTarget=F,W=null,qi(Q)===q&&(Ee=new Ee(B,z+"enter",pe,o,Q),Ee.target=F,Ee.relatedTarget=Xe,W=Ee),Xe=W,Y&&pe)t:{for(Ee=Mj,B=Y,z=pe,F=0,W=B;W;W=Ee(W))F++;W=0;for(var Se=z;Se;Se=Ee(Se))W++;for(;0<F-W;)B=Ee(B),F--;for(;0<W-F;)z=Ee(z),W--;for(;F--;){if(B===z||z!==null&&B===z.alternate){Ee=B;break t}B=Ee(B),z=Ee(z)}Ee=null}else Ee=null;Y!==null&&Lx(ee,$,Y,Ee,!1),pe!==null&&Xe!==null&&Lx(ee,Xe,pe,Ee,!0)}}e:{if($=q?ir(q):window,Y=$.nodeName&&$.nodeName.toLowerCase(),Y==="select"||Y==="input"&&$.type==="file")var Ue=Wg;else if(Qg($))if(ev)Ue=HA;else{Ue=BA;var ye=VA}else Y=$.nodeName,!Y||Y.toLowerCase()!=="input"||$.type!=="checkbox"&&$.type!=="radio"?q&&gd(q.elementType)&&(Ue=Wg):Ue=UA;if(Ue&&(Ue=Ue(t,q))){Jg(ee,Ue,o,Q);break e}ye&&ye(t,$,q),t==="focusout"&&q&&$.type==="number"&&q.memoizedProps.value!=null&&pd($,"number",$.value)}switch(ye=q?ir(q):window,t){case"focusin":(Qg(ye)||ye.contentEditable==="true")&&(Wi=ye,Md=q,mr=null);break;case"focusout":mr=Md=Wi=null;break;case"mousedown":_d=!0;break;case"contextmenu":case"mouseup":case"dragend":_d=!1,lv(ee,o,Q);break;case"selectionchange":if(FA)break;case"keydown":case"keyup":lv(ee,o,Q)}var Me;if(Ad)e:{switch(t){case"compositionstart":var ze="onCompositionStart";break e;case"compositionend":ze="onCompositionEnd";break e;case"compositionupdate":ze="onCompositionUpdate";break e}ze=void 0}else Ji?Xg(t,o)&&(ze="onCompositionEnd"):t==="keydown"&&o.keyCode===229&&(ze="onCompositionStart");ze&&(Kg&&o.locale!=="ko"&&(Ji||ze!=="onCompositionStart"?ze==="onCompositionEnd"&&Ji&&(Me=Hg()):(Cs=Q,Sd="value"in Cs?Cs.value:Cs.textContent,Ji=!0)),ye=Oc(q,ze),0<ye.length&&(ze=new qg(ze,t,null,o,Q),ee.push({event:ze,listeners:ye}),Me?ze.data=Me:(Me=Zg(o),Me!==null&&(ze.data=Me)))),(Me=DA?PA(t,o):kA(t,o))&&(ze=Oc(q,"onBeforeInput"),0<ze.length&&(ye=new qg("onBeforeInput","beforeinput",null,o,Q),ee.push({event:ye,listeners:ze}),ye.data=Me)),Aj(ee,t,q,o,Q)}Px(ee,a)})}function Br(t,a,o){return{instance:t,listener:a,currentTarget:o}}function Oc(t,a){for(var o=a+"Capture",l=[];t!==null;){var p=t,v=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||v===null||(p=or(t,o),p!=null&&l.unshift(Br(t,p,v)),p=or(t,a),p!=null&&l.push(Br(t,p,v))),t.tag===3)return l;t=t.return}return[]}function Mj(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Lx(t,a,o,l,p){for(var v=a._reactName,S=[];o!==null&&o!==l;){var j=o,k=j.alternate,q=j.stateNode;if(j=j.tag,k!==null&&k===l)break;j!==5&&j!==26&&j!==27||q===null||(k=q,p?(q=or(o,v),q!=null&&S.unshift(Br(o,q,k))):p||(q=or(o,v),q!=null&&S.push(Br(o,q,k)))),o=o.return}S.length!==0&&t.push({event:a,listeners:S})}var _j=/\r\n?/g,Oj=/\u0000|\uFFFD/g;function zx(t){return(typeof t=="string"?t:""+t).replace(_j,`
9
- `).replace(Oj,"")}function Vx(t,a){return a=zx(a),zx(t)===a}function Ge(t,a,o,l,p,v){switch(o){case"children":typeof l=="string"?a==="body"||a==="textarea"&&l===""||Xi(t,l):(typeof l=="number"||typeof l=="bigint")&&a!=="body"&&Xi(t,""+l);break;case"className":Ll(t,"class",l);break;case"tabIndex":Ll(t,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Ll(t,o,l);break;case"style":Vg(t,l,v);break;case"data":if(a!=="object"){Ll(t,"data",l);break}case"src":case"href":if(l===""&&(a!=="a"||o!=="href")){t.removeAttribute(o);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){t.removeAttribute(o);break}l=Vl(""+l),t.setAttribute(o,l);break;case"action":case"formAction":if(typeof l=="function"){t.setAttribute(o,"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 v=="function"&&(o==="formAction"?(a!=="input"&&Ge(t,a,"name",p.name,p,null),Ge(t,a,"formEncType",p.formEncType,p,null),Ge(t,a,"formMethod",p.formMethod,p,null),Ge(t,a,"formTarget",p.formTarget,p,null)):(Ge(t,a,"encType",p.encType,p,null),Ge(t,a,"method",p.method,p,null),Ge(t,a,"target",p.target,p,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){t.removeAttribute(o);break}l=Vl(""+l),t.setAttribute(o,l);break;case"onClick":l!=null&&(t.onclick=$a);break;case"onScroll":l!=null&&ke("scroll",t);break;case"onScrollEnd":l!=null&&ke("scrollend",t);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(i(61));if(o=l.__html,o!=null){if(p.children!=null)throw Error(i(60));t.innerHTML=o}}break;case"multiple":t.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":t.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){t.removeAttribute("xlink:href");break}o=Vl(""+l),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(o,""+l):t.removeAttribute(o);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(o,""):t.removeAttribute(o);break;case"capture":case"download":l===!0?t.setAttribute(o,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(o,l):t.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?t.setAttribute(o,l):t.removeAttribute(o);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?t.removeAttribute(o):t.setAttribute(o,l);break;case"popover":ke("beforetoggle",t),ke("toggle",t),kl(t,"popover",l);break;case"xlinkActuate":qa(t,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":qa(t,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":qa(t,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":qa(t,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":qa(t,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":qa(t,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":qa(t,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":qa(t,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":qa(t,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":kl(t,"is",l);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=oA.get(o)||o,kl(t,o,l))}}function ah(t,a,o,l,p,v){switch(o){case"style":Vg(t,l,v);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(i(61));if(o=l.__html,o!=null){if(p.children!=null)throw Error(i(60));t.innerHTML=o}}break;case"children":typeof l=="string"?Xi(t,l):(typeof l=="number"||typeof l=="bigint")&&Xi(t,""+l);break;case"onScroll":l!=null&&ke("scroll",t);break;case"onScrollEnd":l!=null&&ke("scrollend",t);break;case"onClick":l!=null&&(t.onclick=$a);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Rg.hasOwnProperty(o))e:{if(o[0]==="o"&&o[1]==="n"&&(p=o.endsWith("Capture"),a=o.slice(2,p?o.length-7:void 0),v=t[fe]||null,v=v!=null?v[o]:null,typeof v=="function"&&t.removeEventListener(a,v,p),typeof l=="function")){typeof v!="function"&&v!==null&&(o in t?t[o]=null:t.hasAttribute(o)&&t.removeAttribute(o)),t.addEventListener(a,l,p);break e}o in t?t[o]=l:l===!0?t.setAttribute(o,""):kl(t,o,l)}}}function $t(t,a,o){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ke("error",t),ke("load",t);var l=!1,p=!1,v;for(v in o)if(o.hasOwnProperty(v)){var S=o[v];if(S!=null)switch(v){case"src":l=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:Ge(t,a,v,S,o,null)}}p&&Ge(t,a,"srcSet",o.srcSet,o,null),l&&Ge(t,a,"src",o.src,o,null);return;case"input":ke("invalid",t);var j=v=S=p=null,k=null,q=null;for(l in o)if(o.hasOwnProperty(l)){var Q=o[l];if(Q!=null)switch(l){case"name":p=Q;break;case"type":S=Q;break;case"checked":k=Q;break;case"defaultChecked":q=Q;break;case"value":v=Q;break;case"defaultValue":j=Q;break;case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(i(137,a));break;default:Ge(t,a,l,Q,o,null)}}Pg(t,v,j,k,q,S,p,!1);return;case"select":ke("invalid",t),l=S=v=null;for(p in o)if(o.hasOwnProperty(p)&&(j=o[p],j!=null))switch(p){case"value":v=j;break;case"defaultValue":S=j;break;case"multiple":l=j;default:Ge(t,a,p,j,o,null)}a=v,o=S,t.multiple=!!l,a!=null?Gi(t,!!l,a,!1):o!=null&&Gi(t,!!l,o,!0);return;case"textarea":ke("invalid",t),v=p=l=null;for(S in o)if(o.hasOwnProperty(S)&&(j=o[S],j!=null))switch(S){case"value":l=j;break;case"defaultValue":p=j;break;case"children":v=j;break;case"dangerouslySetInnerHTML":if(j!=null)throw Error(i(91));break;default:Ge(t,a,S,j,o,null)}Lg(t,l,p,v);return;case"option":for(k in o)o.hasOwnProperty(k)&&(l=o[k],l!=null)&&(k==="selected"?t.selected=l&&typeof l!="function"&&typeof l!="symbol":Ge(t,a,k,l,o,null));return;case"dialog":ke("beforetoggle",t),ke("toggle",t),ke("cancel",t),ke("close",t);break;case"iframe":case"object":ke("load",t);break;case"video":case"audio":for(l=0;l<Vr.length;l++)ke(Vr[l],t);break;case"image":ke("error",t),ke("load",t);break;case"details":ke("toggle",t);break;case"embed":case"source":case"link":ke("error",t),ke("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(q in o)if(o.hasOwnProperty(q)&&(l=o[q],l!=null))switch(q){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:Ge(t,a,q,l,o,null)}return;default:if(gd(a)){for(Q in o)o.hasOwnProperty(Q)&&(l=o[Q],l!==void 0&&ah(t,a,Q,l,o,void 0));return}}for(j in o)o.hasOwnProperty(j)&&(l=o[j],l!=null&&Ge(t,a,j,l,o,null))}function Dj(t,a,o,l){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,v=null,S=null,j=null,k=null,q=null,Q=null;for(Y in o){var ee=o[Y];if(o.hasOwnProperty(Y)&&ee!=null)switch(Y){case"checked":break;case"value":break;case"defaultValue":k=ee;default:l.hasOwnProperty(Y)||Ge(t,a,Y,null,l,ee)}}for(var $ in l){var Y=l[$];if(ee=o[$],l.hasOwnProperty($)&&(Y!=null||ee!=null))switch($){case"type":v=Y;break;case"name":p=Y;break;case"checked":q=Y;break;case"defaultChecked":Q=Y;break;case"value":S=Y;break;case"defaultValue":j=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(i(137,a));break;default:Y!==ee&&Ge(t,a,$,Y,l,ee)}}md(t,S,j,k,q,Q,v,p);return;case"select":Y=S=j=$=null;for(v in o)if(k=o[v],o.hasOwnProperty(v)&&k!=null)switch(v){case"value":break;case"multiple":Y=k;default:l.hasOwnProperty(v)||Ge(t,a,v,null,l,k)}for(p in l)if(v=l[p],k=o[p],l.hasOwnProperty(p)&&(v!=null||k!=null))switch(p){case"value":$=v;break;case"defaultValue":j=v;break;case"multiple":S=v;default:v!==k&&Ge(t,a,p,v,l,k)}a=j,o=S,l=Y,$!=null?Gi(t,!!o,$,!1):!!l!=!!o&&(a!=null?Gi(t,!!o,a,!0):Gi(t,!!o,o?[]:"",!1));return;case"textarea":Y=$=null;for(j in o)if(p=o[j],o.hasOwnProperty(j)&&p!=null&&!l.hasOwnProperty(j))switch(j){case"value":break;case"children":break;default:Ge(t,a,j,null,l,p)}for(S in l)if(p=l[S],v=o[S],l.hasOwnProperty(S)&&(p!=null||v!=null))switch(S){case"value":$=p;break;case"defaultValue":Y=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(i(91));break;default:p!==v&&Ge(t,a,S,p,l,v)}kg(t,$,Y);return;case"option":for(var pe in o)$=o[pe],o.hasOwnProperty(pe)&&$!=null&&!l.hasOwnProperty(pe)&&(pe==="selected"?t.selected=!1:Ge(t,a,pe,null,l,$));for(k in l)$=l[k],Y=o[k],l.hasOwnProperty(k)&&$!==Y&&($!=null||Y!=null)&&(k==="selected"?t.selected=$&&typeof $!="function"&&typeof $!="symbol":Ge(t,a,k,$,l,Y));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 Ee in o)$=o[Ee],o.hasOwnProperty(Ee)&&$!=null&&!l.hasOwnProperty(Ee)&&Ge(t,a,Ee,null,l,$);for(q in l)if($=l[q],Y=o[q],l.hasOwnProperty(q)&&$!==Y&&($!=null||Y!=null))switch(q){case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(i(137,a));break;default:Ge(t,a,q,$,l,Y)}return;default:if(gd(a)){for(var Xe in o)$=o[Xe],o.hasOwnProperty(Xe)&&$!==void 0&&!l.hasOwnProperty(Xe)&&ah(t,a,Xe,void 0,l,$);for(Q in l)$=l[Q],Y=o[Q],!l.hasOwnProperty(Q)||$===Y||$===void 0&&Y===void 0||ah(t,a,Q,$,l,Y);return}}for(var B in o)$=o[B],o.hasOwnProperty(B)&&$!=null&&!l.hasOwnProperty(B)&&Ge(t,a,B,null,l,$);for(ee in l)$=l[ee],Y=o[ee],!l.hasOwnProperty(ee)||$===Y||$==null&&Y==null||Ge(t,a,ee,$,l,Y)}function Bx(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Pj(){if(typeof performance.getEntriesByType=="function"){for(var t=0,a=0,o=performance.getEntriesByType("resource"),l=0;l<o.length;l++){var p=o[l],v=p.transferSize,S=p.initiatorType,j=p.duration;if(v&&j&&Bx(S)){for(S=0,j=p.responseEnd,l+=1;l<o.length;l++){var k=o[l],q=k.startTime;if(q>j)break;var Q=k.transferSize,ee=k.initiatorType;Q&&Bx(ee)&&(k=k.responseEnd,S+=Q*(k<j?1:(j-q)/(k-q)))}if(--l,a+=8*(v+S)/(p.duration/1e3),t++,10<t)break}}if(0<t)return a/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var sh=null,ih=null;function Dc(t){return t.nodeType===9?t:t.ownerDocument}function Ux(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Hx(t,a){if(t===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&a==="foreignObject"?0:t}function oh(t,a){return t==="textarea"||t==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var rh=null;function kj(){var t=window.event;return t&&t.type==="popstate"?t===rh?!1:(rh=t,!0):(rh=null,!1)}var Ix=typeof setTimeout=="function"?setTimeout:void 0,Lj=typeof clearTimeout=="function"?clearTimeout:void 0,Fx=typeof Promise=="function"?Promise:void 0,zj=typeof queueMicrotask=="function"?queueMicrotask:typeof Fx<"u"?function(t){return Fx.resolve(null).then(t).catch(Vj)}:Ix;function Vj(t){setTimeout(function(){throw t})}function Hs(t){return t==="head"}function qx(t,a){var o=a,l=0;do{var p=o.nextSibling;if(t.removeChild(o),p&&p.nodeType===8)if(o=p.data,o==="/$"||o==="/&"){if(l===0){t.removeChild(p),jo(a);return}l--}else if(o==="$"||o==="$?"||o==="$~"||o==="$!"||o==="&")l++;else if(o==="html")Ur(t.ownerDocument.documentElement);else if(o==="head"){o=t.ownerDocument.head,Ur(o);for(var v=o.firstChild;v;){var S=v.nextSibling,j=v.nodeName;v[Es]||j==="SCRIPT"||j==="STYLE"||j==="LINK"&&v.rel.toLowerCase()==="stylesheet"||o.removeChild(v),v=S}}else o==="body"&&Ur(t.ownerDocument.body);o=p}while(o);jo(a)}function $x(t,a){var o=t;t=0;do{var l=o.nextSibling;if(o.nodeType===1?a?(o._stashedDisplay=o.style.display,o.style.display="none"):(o.style.display=o._stashedDisplay||"",o.getAttribute("style")===""&&o.removeAttribute("style")):o.nodeType===3&&(a?(o._stashedText=o.nodeValue,o.nodeValue=""):o.nodeValue=o._stashedText||""),l&&l.nodeType===8)if(o=l.data,o==="/$"){if(t===0)break;t--}else o!=="$"&&o!=="$?"&&o!=="$~"&&o!=="$!"||t++;o=l}while(o)}function lh(t){var a=t.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var o=a;switch(a=a.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":lh(o),fd(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}t.removeChild(o)}}function Bj(t,a,o,l){for(;t.nodeType===1;){var p=o;if(t.nodeName.toLowerCase()!==a.toLowerCase()){if(!l&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(l){if(!t[Es])switch(a){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(v=t.getAttribute("rel"),v==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(v!==p.rel||t.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||t.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||t.getAttribute("title")!==(p.title==null?null:p.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(v=t.getAttribute("src"),(v!==(p.src==null?null:p.src)||t.getAttribute("type")!==(p.type==null?null:p.type)||t.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&v&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(a==="input"&&t.type==="hidden"){var v=p.name==null?null:""+p.name;if(p.type==="hidden"&&t.getAttribute("name")===v)return t}else return t;if(t=Qn(t.nextSibling),t===null)break}return null}function Uj(t,a,o){if(a==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!o||(t=Qn(t.nextSibling),t===null))return null;return t}function Kx(t,a){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=Qn(t.nextSibling),t===null))return null;return t}function ch(t){return t.data==="$?"||t.data==="$~"}function uh(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function Hj(t,a){var o=t.ownerDocument;if(t.data==="$~")t._reactRetry=a;else if(t.data!=="$?"||o.readyState!=="loading")a();else{var l=function(){a(),o.removeEventListener("DOMContentLoaded",l)};o.addEventListener("DOMContentLoaded",l),t._reactRetry=l}}function Qn(t){for(;t!=null;t=t.nextSibling){var a=t.nodeType;if(a===1||a===3)break;if(a===8){if(a=t.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return t}var dh=null;function Yx(t){t=t.nextSibling;for(var a=0;t;){if(t.nodeType===8){var o=t.data;if(o==="/$"||o==="/&"){if(a===0)return Qn(t.nextSibling);a--}else o!=="$"&&o!=="$!"&&o!=="$?"&&o!=="$~"&&o!=="&"||a++}t=t.nextSibling}return null}function Gx(t){t=t.previousSibling;for(var a=0;t;){if(t.nodeType===8){var o=t.data;if(o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"){if(a===0)return t;a--}else o!=="/$"&&o!=="/&"||a++}t=t.previousSibling}return null}function Xx(t,a,o){switch(a=Dc(o),t){case"html":if(t=a.documentElement,!t)throw Error(i(452));return t;case"head":if(t=a.head,!t)throw Error(i(453));return t;case"body":if(t=a.body,!t)throw Error(i(454));return t;default:throw Error(i(451))}}function Ur(t){for(var a=t.attributes;a.length;)t.removeAttributeNode(a[0]);fd(t)}var Jn=new Map,Zx=new Set;function Pc(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var rs=H.d;H.d={f:Ij,r:Fj,D:qj,C:$j,L:Kj,m:Yj,X:Xj,S:Gj,M:Zj};function Ij(){var t=rs.f(),a=Tc();return t||a}function Fj(t){var a=$i(t);a!==null&&a.tag===5&&a.type==="form"?hy(a):rs.r(t)}var Co=typeof document>"u"?null:document;function Qx(t,a,o){var l=Co;if(l&&typeof a=="string"&&a){var p=qn(a);p='link[rel="'+t+'"][href="'+p+'"]',typeof o=="string"&&(p+='[crossorigin="'+o+'"]'),Zx.has(p)||(Zx.add(p),t={rel:t,crossOrigin:o,href:a},l.querySelector(p)===null&&(a=l.createElement("link"),$t(a,"link",t),Bt(a),l.head.appendChild(a)))}}function qj(t){rs.D(t),Qx("dns-prefetch",t,null)}function $j(t,a){rs.C(t,a),Qx("preconnect",t,a)}function Kj(t,a,o){rs.L(t,a,o);var l=Co;if(l&&t&&a){var p='link[rel="preload"][as="'+qn(a)+'"]';a==="image"&&o&&o.imageSrcSet?(p+='[imagesrcset="'+qn(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(p+='[imagesizes="'+qn(o.imageSizes)+'"]')):p+='[href="'+qn(t)+'"]';var v=p;switch(a){case"style":v=To(t);break;case"script":v=Ao(t)}Jn.has(v)||(t=g({rel:"preload",href:a==="image"&&o&&o.imageSrcSet?void 0:t,as:a},o),Jn.set(v,t),l.querySelector(p)!==null||a==="style"&&l.querySelector(Hr(v))||a==="script"&&l.querySelector(Ir(v))||(a=l.createElement("link"),$t(a,"link",t),Bt(a),l.head.appendChild(a)))}}function Yj(t,a){rs.m(t,a);var o=Co;if(o&&t){var l=a&&typeof a.as=="string"?a.as:"script",p='link[rel="modulepreload"][as="'+qn(l)+'"][href="'+qn(t)+'"]',v=p;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":v=Ao(t)}if(!Jn.has(v)&&(t=g({rel:"modulepreload",href:t},a),Jn.set(v,t),o.querySelector(p)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(Ir(v)))return}l=o.createElement("link"),$t(l,"link",t),Bt(l),o.head.appendChild(l)}}}function Gj(t,a,o){rs.S(t,a,o);var l=Co;if(l&&t){var p=Ki(l).hoistableStyles,v=To(t);a=a||"default";var S=p.get(v);if(!S){var j={loading:0,preload:null};if(S=l.querySelector(Hr(v)))j.loading=5;else{t=g({rel:"stylesheet",href:t,"data-precedence":a},o),(o=Jn.get(v))&&fh(t,o);var k=S=l.createElement("link");Bt(k),$t(k,"link",t),k._p=new Promise(function(q,Q){k.onload=q,k.onerror=Q}),k.addEventListener("load",function(){j.loading|=1}),k.addEventListener("error",function(){j.loading|=2}),j.loading|=4,kc(S,a,l)}S={type:"stylesheet",instance:S,count:1,state:j},p.set(v,S)}}}function Xj(t,a){rs.X(t,a);var o=Co;if(o&&t){var l=Ki(o).hoistableScripts,p=Ao(t),v=l.get(p);v||(v=o.querySelector(Ir(p)),v||(t=g({src:t,async:!0},a),(a=Jn.get(p))&&hh(t,a),v=o.createElement("script"),Bt(v),$t(v,"link",t),o.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},l.set(p,v))}}function Zj(t,a){rs.M(t,a);var o=Co;if(o&&t){var l=Ki(o).hoistableScripts,p=Ao(t),v=l.get(p);v||(v=o.querySelector(Ir(p)),v||(t=g({src:t,async:!0,type:"module"},a),(a=Jn.get(p))&&hh(t,a),v=o.createElement("script"),Bt(v),$t(v,"link",t),o.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},l.set(p,v))}}function Jx(t,a,o,l){var p=(p=me.current)?Pc(p):null;if(!p)throw Error(i(446));switch(t){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(a=To(o.href),o=Ki(p).hoistableStyles,l=o.get(a),l||(l={type:"style",instance:null,count:0,state:null},o.set(a,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){t=To(o.href);var v=Ki(p).hoistableStyles,S=v.get(t);if(S||(p=p.ownerDocument||p,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},v.set(t,S),(v=p.querySelector(Hr(t)))&&!v._p&&(S.instance=v,S.state.loading=5),Jn.has(t)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},Jn.set(t,o),v||Qj(p,t,o,S.state))),a&&l===null)throw Error(i(528,""));return S}if(a&&l!==null)throw Error(i(529,""));return null;case"script":return a=o.async,o=o.src,typeof o=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=Ao(o),o=Ki(p).hoistableScripts,l=o.get(a),l||(l={type:"script",instance:null,count:0,state:null},o.set(a,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,t))}}function To(t){return'href="'+qn(t)+'"'}function Hr(t){return'link[rel="stylesheet"]['+t+"]"}function Wx(t){return g({},t,{"data-precedence":t.precedence,precedence:null})}function Qj(t,a,o,l){t.querySelector('link[rel="preload"][as="style"]['+a+"]")?l.loading=1:(a=t.createElement("link"),l.preload=a,a.addEventListener("load",function(){return l.loading|=1}),a.addEventListener("error",function(){return l.loading|=2}),$t(a,"link",o),Bt(a),t.head.appendChild(a))}function Ao(t){return'[src="'+qn(t)+'"]'}function Ir(t){return"script[async]"+t}function eb(t,a,o){if(a.count++,a.instance===null)switch(a.type){case"style":var l=t.querySelector('style[data-href~="'+qn(o.href)+'"]');if(l)return a.instance=l,Bt(l),l;var p=g({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return l=(t.ownerDocument||t).createElement("style"),Bt(l),$t(l,"style",p),kc(l,o.precedence,t),a.instance=l;case"stylesheet":p=To(o.href);var v=t.querySelector(Hr(p));if(v)return a.state.loading|=4,a.instance=v,Bt(v),v;l=Wx(o),(p=Jn.get(p))&&fh(l,p),v=(t.ownerDocument||t).createElement("link"),Bt(v);var S=v;return S._p=new Promise(function(j,k){S.onload=j,S.onerror=k}),$t(v,"link",l),a.state.loading|=4,kc(v,o.precedence,t),a.instance=v;case"script":return v=Ao(o.src),(p=t.querySelector(Ir(v)))?(a.instance=p,Bt(p),p):(l=o,(p=Jn.get(v))&&(l=g({},o),hh(l,p)),t=t.ownerDocument||t,p=t.createElement("script"),Bt(p),$t(p,"link",l),t.head.appendChild(p),a.instance=p);case"void":return null;default:throw Error(i(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(l=a.instance,a.state.loading|=4,kc(l,o.precedence,t));return a.instance}function kc(t,a,o){for(var l=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=l.length?l[l.length-1]:null,v=p,S=0;S<l.length;S++){var j=l[S];if(j.dataset.precedence===a)v=j;else if(v!==p)break}v?v.parentNode.insertBefore(t,v.nextSibling):(a=o.nodeType===9?o.head:o,a.insertBefore(t,a.firstChild))}function fh(t,a){t.crossOrigin==null&&(t.crossOrigin=a.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=a.referrerPolicy),t.title==null&&(t.title=a.title)}function hh(t,a){t.crossOrigin==null&&(t.crossOrigin=a.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=a.referrerPolicy),t.integrity==null&&(t.integrity=a.integrity)}var Lc=null;function tb(t,a,o){if(Lc===null){var l=new Map,p=Lc=new Map;p.set(o,l)}else p=Lc,l=p.get(o),l||(l=new Map,p.set(o,l));if(l.has(t))return l;for(l.set(t,null),o=o.getElementsByTagName(t),p=0;p<o.length;p++){var v=o[p];if(!(v[Es]||v[Dt]||t==="link"&&v.getAttribute("rel")==="stylesheet")&&v.namespaceURI!=="http://www.w3.org/2000/svg"){var S=v.getAttribute(a)||"";S=t+S;var j=l.get(S);j?j.push(v):l.set(S,[v])}}return l}function nb(t,a,o){t=t.ownerDocument||t,t.head.insertBefore(o,a==="title"?t.querySelector("head > title"):null)}function Jj(t,a,o){if(o===1||a.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;return a.rel==="stylesheet"?(t=a.disabled,typeof a.precedence=="string"&&t==null):!0;case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function ab(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function Wj(t,a,o,l){if(o.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var p=To(l.href),v=a.querySelector(Hr(p));if(v){a=v._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(t.count++,t=zc.bind(t),a.then(t,t)),o.state.loading|=4,o.instance=v,Bt(v);return}v=a.ownerDocument||a,l=Wx(l),(p=Jn.get(p))&&fh(l,p),v=v.createElement("link"),Bt(v);var S=v;S._p=new Promise(function(j,k){S.onload=j,S.onerror=k}),$t(v,"link",l),o.instance=v}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(o,a),(a=o.state.preload)&&(o.state.loading&3)===0&&(t.count++,o=zc.bind(t),a.addEventListener("load",o),a.addEventListener("error",o))}}var mh=0;function eN(t,a){return t.stylesheets&&t.count===0&&Bc(t,t.stylesheets),0<t.count||0<t.imgCount?function(o){var l=setTimeout(function(){if(t.stylesheets&&Bc(t,t.stylesheets),t.unsuspend){var v=t.unsuspend;t.unsuspend=null,v()}},6e4+a);0<t.imgBytes&&mh===0&&(mh=62500*Pj());var p=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&Bc(t,t.stylesheets),t.unsuspend)){var v=t.unsuspend;t.unsuspend=null,v()}},(t.imgBytes>mh?50:800)+a);return t.unsuspend=o,function(){t.unsuspend=null,clearTimeout(l),clearTimeout(p)}}:null}function zc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Bc(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Vc=null;function Bc(t,a){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Vc=new Map,a.forEach(tN,t),Vc=null,zc.call(t))}function tN(t,a){if(!(a.state.loading&4)){var o=Vc.get(t);if(o)var l=o.get(null);else{o=new Map,Vc.set(t,o);for(var p=t.querySelectorAll("link[data-precedence],style[data-precedence]"),v=0;v<p.length;v++){var S=p[v];(S.nodeName==="LINK"||S.getAttribute("media")!=="not all")&&(o.set(S.dataset.precedence,S),l=S)}l&&o.set(null,l)}p=a.instance,S=p.getAttribute("data-precedence"),v=o.get(S)||l,v===l&&o.set(null,p),o.set(S,p),this.count++,l=zc.bind(this),p.addEventListener("load",l),p.addEventListener("error",l),v?v.parentNode.insertBefore(p,v.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(p,t.firstChild)),a.state.loading|=4}}var Fr={$$typeof:R,Provider:null,Consumer:null,_currentValue:V,_currentValue2:V,_threadCount:0};function nN(t,a,o,l,p,v,S,j,k){this.tag=1,this.containerInfo=t,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=Ca(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ca(0),this.hiddenUpdates=Ca(null),this.identifierPrefix=l,this.onUncaughtError=p,this.onCaughtError=v,this.onRecoverableError=S,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=k,this.incompleteTransitions=new Map}function sb(t,a,o,l,p,v,S,j,k,q,Q,ee){return t=new nN(t,a,o,S,k,q,Q,ee,j),a=1,v===!0&&(a|=24),v=_n(3,null,null,a),t.current=v,v.stateNode=t,a=Kd(),a.refCount++,t.pooledCache=a,a.refCount++,v.memoizedState={element:l,isDehydrated:o,cache:a},Zd(v),t}function ib(t){return t?(t=no,t):no}function ob(t,a,o,l,p,v){p=ib(p),l.context===null?l.context=p:l.pendingContext=p,l=Ms(a),l.payload={element:o},v=v===void 0?null:v,v!==null&&(l.callback=v),o=_s(t,l,a),o!==null&&(xn(o,t,a),Sr(o,t,a))}function rb(t,a){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var o=t.retryLane;t.retryLane=o!==0&&o<a?o:a}}function ph(t,a){rb(t,a),(t=t.alternate)&&rb(t,a)}function lb(t){if(t.tag===13||t.tag===31){var a=fi(t,67108864);a!==null&&xn(a,t,67108864),ph(t,67108864)}}function cb(t){if(t.tag===13||t.tag===31){var a=Ln();a=ws(a);var o=fi(t,a);o!==null&&xn(o,t,a),ph(t,a)}}var Uc=!0;function aN(t,a,o,l){var p=D.T;D.T=null;var v=H.p;try{H.p=2,gh(t,a,o,l)}finally{H.p=v,D.T=p}}function sN(t,a,o,l){var p=D.T;D.T=null;var v=H.p;try{H.p=8,gh(t,a,o,l)}finally{H.p=v,D.T=p}}function gh(t,a,o,l){if(Uc){var p=vh(l);if(p===null)nh(t,a,l,Hc,o),db(t,l);else if(oN(p,t,a,o,l))l.stopPropagation();else if(db(t,l),a&4&&-1<iN.indexOf(t)){for(;p!==null;){var v=$i(p);if(v!==null)switch(v.tag){case 3:if(v=v.stateNode,v.current.memoizedState.isDehydrated){var S=ct(v.pendingLanes);if(S!==0){var j=v;for(j.pendingLanes|=2,j.entangledLanes|=2;S;){var k=1<<31-bt(S);j.entanglements[1]|=k,S&=~k}Ra(v),(Fe&6)===0&&(Ec=_t()+500,zr(0))}}break;case 31:case 13:j=fi(v,2),j!==null&&xn(j,v,2),Tc(),ph(v,2)}if(v=vh(l),v===null&&nh(t,a,l,Hc,o),v===p)break;p=v}p!==null&&l.stopPropagation()}else nh(t,a,l,null,o)}}function vh(t){return t=yd(t),yh(t)}var Hc=null;function yh(t){if(Hc=null,t=qi(t),t!==null){var a=c(t);if(a===null)t=null;else{var o=a.tag;if(o===13){if(t=u(a),t!==null)return t;t=null}else if(o===31){if(t=d(a),t!==null)return t;t=null}else if(o===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;t=null}else a!==t&&(t=null)}}return Hc=t,null}function ub(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(bs()){case dn:return 2;case la:return 8;case Hn:case Ia:return 32;case Nn:return 268435456;default:return 32}default:return 32}}var xh=!1,Is=null,Fs=null,qs=null,qr=new Map,$r=new Map,$s=[],iN="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 db(t,a){switch(t){case"focusin":case"focusout":Is=null;break;case"dragenter":case"dragleave":Fs=null;break;case"mouseover":case"mouseout":qs=null;break;case"pointerover":case"pointerout":qr.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":$r.delete(a.pointerId)}}function Kr(t,a,o,l,p,v){return t===null||t.nativeEvent!==v?(t={blockedOn:a,domEventName:o,eventSystemFlags:l,nativeEvent:v,targetContainers:[p]},a!==null&&(a=$i(a),a!==null&&lb(a)),t):(t.eventSystemFlags|=l,a=t.targetContainers,p!==null&&a.indexOf(p)===-1&&a.push(p),t)}function oN(t,a,o,l,p){switch(a){case"focusin":return Is=Kr(Is,t,a,o,l,p),!0;case"dragenter":return Fs=Kr(Fs,t,a,o,l,p),!0;case"mouseover":return qs=Kr(qs,t,a,o,l,p),!0;case"pointerover":var v=p.pointerId;return qr.set(v,Kr(qr.get(v)||null,t,a,o,l,p)),!0;case"gotpointercapture":return v=p.pointerId,$r.set(v,Kr($r.get(v)||null,t,a,o,l,p)),!0}return!1}function fb(t){var a=qi(t.target);if(a!==null){var o=c(a);if(o!==null){if(a=o.tag,a===13){if(a=u(o),a!==null){t.blockedOn=a,Ol(t.priority,function(){cb(o)});return}}else if(a===31){if(a=d(o),a!==null){t.blockedOn=a,Ol(t.priority,function(){cb(o)});return}}else if(a===3&&o.stateNode.current.memoizedState.isDehydrated){t.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Ic(t){if(t.blockedOn!==null)return!1;for(var a=t.targetContainers;0<a.length;){var o=vh(t.nativeEvent);if(o===null){o=t.nativeEvent;var l=new o.constructor(o.type,o);vd=l,o.target.dispatchEvent(l),vd=null}else return a=$i(o),a!==null&&lb(a),t.blockedOn=o,!1;a.shift()}return!0}function hb(t,a,o){Ic(t)&&o.delete(a)}function rN(){xh=!1,Is!==null&&Ic(Is)&&(Is=null),Fs!==null&&Ic(Fs)&&(Fs=null),qs!==null&&Ic(qs)&&(qs=null),qr.forEach(hb),$r.forEach(hb)}function Fc(t,a){t.blockedOn===a&&(t.blockedOn=null,xh||(xh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,rN)))}var qc=null;function mb(t){qc!==t&&(qc=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){qc===t&&(qc=null);for(var a=0;a<t.length;a+=3){var o=t[a],l=t[a+1],p=t[a+2];if(typeof l!="function"){if(yh(l||o)===null)continue;break}var v=$i(o);v!==null&&(t.splice(a,3),a-=3,vf(v,{pending:!0,data:p,method:o.method,action:l},l,p))}}))}function jo(t){function a(k){return Fc(k,t)}Is!==null&&Fc(Is,t),Fs!==null&&Fc(Fs,t),qs!==null&&Fc(qs,t),qr.forEach(a),$r.forEach(a);for(var o=0;o<$s.length;o++){var l=$s[o];l.blockedOn===t&&(l.blockedOn=null)}for(;0<$s.length&&(o=$s[0],o.blockedOn===null);)fb(o),o.blockedOn===null&&$s.shift();if(o=(t.ownerDocument||t).$$reactFormReplay,o!=null)for(l=0;l<o.length;l+=3){var p=o[l],v=o[l+1],S=p[fe]||null;if(typeof v=="function")S||mb(o);else if(S){var j=null;if(v&&v.hasAttribute("formAction")){if(p=v,S=v[fe]||null)j=S.formAction;else if(yh(p)!==null)continue}else j=S.action;typeof j=="function"?o[l+1]=j:(o.splice(l,3),l-=3),mb(o)}}}function pb(){function t(v){v.canIntercept&&v.info==="react-transition"&&v.intercept({handler:function(){return new Promise(function(S){return p=S})},focusReset:"manual",scroll:"manual"})}function a(){p!==null&&(p(),p=null),l||setTimeout(o,20)}function o(){if(!l&&!navigation.transition){var v=navigation.currentEntry;v&&v.url!=null&&navigation.navigate(v.url,{state:v.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,p=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(o,100),function(){l=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),p!==null&&(p(),p=null)}}}function bh(t){this._internalRoot=t}$c.prototype.render=bh.prototype.render=function(t){var a=this._internalRoot;if(a===null)throw Error(i(409));var o=a.current,l=Ln();ob(o,l,t,a,null,null)},$c.prototype.unmount=bh.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var a=t.containerInfo;ob(t.current,2,null,t,null,null),Tc(),a[be]=null}};function $c(t){this._internalRoot=t}$c.prototype.unstable_scheduleHydration=function(t){if(t){var a=sr();t={blockedOn:null,target:t,priority:a};for(var o=0;o<$s.length&&a!==0&&a<$s[o].priority;o++);$s.splice(o,0,t),o===0&&fb(t)}};var gb=n.version;if(gb!=="19.2.3")throw Error(i(527,gb,"19.2.3"));H.findDOMNode=function(t){var a=t._reactInternals;if(a===void 0)throw typeof t.render=="function"?Error(i(188)):(t=Object.keys(t).join(","),Error(i(268,t)));return t=h(a),t=t!==null?y(t):null,t=t===null?null:t.stateNode,t};var lN={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Kc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Kc.isDisabled&&Kc.supportsFiber)try{ca=Kc.inject(lN),Ot=Kc}catch{}}return Gr.createRoot=function(t,a){if(!r(t))throw Error(i(299));var o=!1,l="",p=Ey,v=Cy,S=Ty;return a!=null&&(a.unstable_strictMode===!0&&(o=!0),a.identifierPrefix!==void 0&&(l=a.identifierPrefix),a.onUncaughtError!==void 0&&(p=a.onUncaughtError),a.onCaughtError!==void 0&&(v=a.onCaughtError),a.onRecoverableError!==void 0&&(S=a.onRecoverableError)),a=sb(t,1,!1,null,null,o,l,null,p,v,S,pb),t[be]=a.current,th(t),new bh(a)},Gr.hydrateRoot=function(t,a,o){if(!r(t))throw Error(i(299));var l=!1,p="",v=Ey,S=Cy,j=Ty,k=null;return o!=null&&(o.unstable_strictMode===!0&&(l=!0),o.identifierPrefix!==void 0&&(p=o.identifierPrefix),o.onUncaughtError!==void 0&&(v=o.onUncaughtError),o.onCaughtError!==void 0&&(S=o.onCaughtError),o.onRecoverableError!==void 0&&(j=o.onRecoverableError),o.formState!==void 0&&(k=o.formState)),a=sb(t,1,!0,a,o??null,l,p,k,v,S,j,pb),a.context=ib(null),o=a.current,l=Ln(),l=ws(l),p=Ms(l),p.callback=null,_s(o,p,l),o=l,a.current.lanes=o,et(a,o),Ra(a),t[be]=a.current,th(t),new $c(a)},Gr.version="19.2.3",Gr}var Ab;function yN(){if(Ab)return Eh.exports;Ab=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(n){console.error(n)}}return e(),Eh.exports=vN(),Eh.exports}var xN=yN();var jb="popstate";function bN(e={}){function n(r,c){let{pathname:u="/",search:d="",hash:f=""}=Fi(r.location.hash.substring(1));return!u.startsWith("/")&&!u.startsWith(".")&&(u="/"+u),mm("",{pathname:u,search:d,hash:f},c.state&&c.state.usr||null,c.state&&c.state.key||"default")}function s(r,c){let u=r.document.querySelector("base"),d="";if(u&&u.getAttribute("href")){let f=r.location.href,h=f.indexOf("#");d=h===-1?f:f.slice(0,h)}return d+"#"+(typeof c=="string"?c:cl(c))}function i(r,c){An(r.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(c)})`)}return wN(n,s,i,e)}function it(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function An(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function SN(){return Math.random().toString(36).substring(2,10)}function Nb(e,n){return{usr:e.state,key:e.key,idx:n}}function mm(e,n,s=null,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof n=="string"?Fi(n):n,state:s,key:n&&n.key||i||SN()}}function cl({pathname:e="/",search:n="",hash:s=""}){return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),s&&s!=="#"&&(e+=s.charAt(0)==="#"?s:"#"+s),e}function Fi(e){let n={};if(e){let s=e.indexOf("#");s>=0&&(n.hash=e.substring(s),e=e.substring(0,s));let i=e.indexOf("?");i>=0&&(n.search=e.substring(i),e=e.substring(0,i)),e&&(n.pathname=e)}return n}function wN(e,n,s,i={}){let{window:r=document.defaultView,v5Compat:c=!1}=i,u=r.history,d="POP",f=null,h=y();h==null&&(h=0,u.replaceState({...u.state,idx:h},""));function y(){return(u.state||{idx:null}).idx}function g(){d="POP";let A=y(),T=A==null?null:A-h;h=A,f&&f({action:d,location:C.location,delta:T})}function b(A,T){d="PUSH";let N=mm(C.location,A,T);s&&s(N,A),h=y()+1;let R=Nb(N,h),_=C.createHref(N);try{u.pushState(R,"",_)}catch(M){if(M instanceof DOMException&&M.name==="DataCloneError")throw M;r.location.assign(_)}c&&f&&f({action:d,location:C.location,delta:1})}function w(A,T){d="REPLACE";let N=mm(C.location,A,T);s&&s(N,A),h=y();let R=Nb(N,h),_=C.createHref(N);u.replaceState(R,"",_),c&&f&&f({action:d,location:C.location,delta:0})}function E(A){return EN(A)}let C={get action(){return d},get location(){return e(r,u)},listen(A){if(f)throw new Error("A history only accepts one active listener");return r.addEventListener(jb,g),f=A,()=>{r.removeEventListener(jb,g),f=null}},createHref(A){return n(r,A)},createURL:E,encodeLocation(A){let T=E(A);return{pathname:T.pathname,search:T.search,hash:T.hash}},push:b,replace:w,go(A){return u.go(A)}};return C}function EN(e,n=!1){let s="http://localhost";typeof window<"u"&&(s=window.location.origin!=="null"?window.location.origin:window.location.href),it(s,"No window.location.(origin|href) available to create URL");let i=typeof e=="string"?e:cl(e);return i=i.replace(/ $/,"%20"),!n&&i.startsWith("//")&&(i=s+i),new URL(i,s)}function v1(e,n,s="/"){return CN(e,n,s,!1)}function CN(e,n,s,i){let r=typeof n=="string"?Fi(n):n,c=hs(r.pathname||"/",s);if(c==null)return null;let u=y1(e);TN(u);let d=null;for(let f=0;d==null&&f<u.length;++f){let h=LN(c);d=PN(u[f],h,i)}return d}function y1(e,n=[],s=[],i="",r=!1){let c=(u,d,f=r,h)=>{let y={relativePath:h===void 0?u.path||"":h,caseSensitive:u.caseSensitive===!0,childrenIndex:d,route:u};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(i)&&f)return;it(y.relativePath.startsWith(i),`Absolute route path "${y.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(i.length)}let g=fs([i,y.relativePath]),b=s.concat(y);u.children&&u.children.length>0&&(it(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),y1(u.children,n,b,g,f)),!(u.path==null&&!u.index)&&n.push({path:g,score:ON(g,u.index),routesMeta:b})};return e.forEach((u,d)=>{if(u.path===""||!u.path?.includes("?"))c(u,d);else for(let f of x1(u.path))c(u,d,!0,f)}),n}function x1(e){let n=e.split("/");if(n.length===0)return[];let[s,...i]=n,r=s.endsWith("?"),c=s.replace(/\?$/,"");if(i.length===0)return r?[c,""]:[c];let u=x1(i.join("/")),d=[];return d.push(...u.map(f=>f===""?c:[c,f].join("/"))),r&&d.push(...u),d.map(f=>e.startsWith("/")&&f===""?"/":f)}function TN(e){e.sort((n,s)=>n.score!==s.score?s.score-n.score:DN(n.routesMeta.map(i=>i.childrenIndex),s.routesMeta.map(i=>i.childrenIndex)))}var AN=/^:[\w-]+$/,jN=3,NN=2,RN=1,MN=10,_N=-2,Rb=e=>e==="*";function ON(e,n){let s=e.split("/"),i=s.length;return s.some(Rb)&&(i+=_N),n&&(i+=NN),s.filter(r=>!Rb(r)).reduce((r,c)=>r+(AN.test(c)?jN:c===""?RN:MN),i)}function DN(e,n){return e.length===n.length&&e.slice(0,-1).every((i,r)=>i===n[r])?e[e.length-1]-n[n.length-1]:0}function PN(e,n,s=!1){let{routesMeta:i}=e,r={},c="/",u=[];for(let d=0;d<i.length;++d){let f=i[d],h=d===i.length-1,y=c==="/"?n:n.slice(c.length)||"/",g=wu({path:f.relativePath,caseSensitive:f.caseSensitive,end:h},y),b=f.route;if(!g&&h&&s&&!i[i.length-1].route.index&&(g=wu({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},y)),!g)return null;Object.assign(r,g.params),u.push({params:r,pathname:fs([c,g.pathname]),pathnameBase:UN(fs([c,g.pathnameBase])),route:b}),g.pathnameBase!=="/"&&(c=fs([c,g.pathnameBase]))}return u}function wu(e,n){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[s,i]=kN(e.path,e.caseSensitive,e.end),r=n.match(s);if(!r)return null;let c=r[0],u=c.replace(/(.)\/+$/,"$1"),d=r.slice(1);return{params:i.reduce((h,{paramName:y,isOptional:g},b)=>{if(y==="*"){let E=d[b]||"";u=c.slice(0,c.length-E.length).replace(/(.)\/+$/,"$1")}const w=d[b];return g&&!w?h[y]=void 0:h[y]=(w||"").replace(/%2F/g,"/"),h},{}),pathname:c,pathnameBase:u,pattern:e}}function kN(e,n=!1,s=!0){An(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=[],r="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(u,d,f)=>(i.push({paramName:d,isOptional:f!=null}),f?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(i.push({paramName:"*"}),r+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?r+="\\/*$":e!==""&&e!=="/"&&(r+="(?:(?=\\/|$))"),[new RegExp(r,n?void 0:"i"),i]}function LN(e){try{return e.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return An(!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 (${n}).`),e}}function hs(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let s=n.endsWith("/")?n.length-1:n.length,i=e.charAt(s);return i&&i!=="/"?null:e.slice(s)||"/"}var b1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,zN=e=>b1.test(e);function VN(e,n="/"){let{pathname:s,search:i="",hash:r=""}=typeof e=="string"?Fi(e):e,c;if(s)if(zN(s))c=s;else{if(s.includes("//")){let u=s;s=s.replace(/\/\/+/g,"/"),An(!1,`Pathnames cannot have embedded double slashes - normalizing ${u} -> ${s}`)}s.startsWith("/")?c=Mb(s.substring(1),"/"):c=Mb(s,n)}else c=n;return{pathname:c,search:HN(i),hash:IN(r)}}function Mb(e,n){let s=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(r=>{r===".."?s.length>1&&s.pop():r!=="."&&s.push(r)}),s.length>1?s.join("/"):"/"}function jh(e,n,s,i){return`Cannot include a '${e}' character in a manually specified \`to.${n}\` 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 BN(e){return e.filter((n,s)=>s===0||n.route.path&&n.route.path.length>0)}function hp(e){let n=BN(e);return n.map((s,i)=>i===n.length-1?s.pathname:s.pathnameBase)}function mp(e,n,s,i=!1){let r;typeof e=="string"?r=Fi(e):(r={...e},it(!r.pathname||!r.pathname.includes("?"),jh("?","pathname","search",r)),it(!r.pathname||!r.pathname.includes("#"),jh("#","pathname","hash",r)),it(!r.search||!r.search.includes("#"),jh("#","search","hash",r)));let c=e===""||r.pathname==="",u=c?"/":r.pathname,d;if(u==null)d=s;else{let g=n.length-1;if(!i&&u.startsWith("..")){let b=u.split("/");for(;b[0]==="..";)b.shift(),g-=1;r.pathname=b.join("/")}d=g>=0?n[g]:"/"}let f=VN(r,d),h=u&&u!=="/"&&u.endsWith("/"),y=(c||u===".")&&s.endsWith("/");return!f.pathname.endsWith("/")&&(h||y)&&(f.pathname+="/"),f}var fs=e=>e.join("/").replace(/\/\/+/g,"/"),UN=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),HN=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,IN=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,FN=class{constructor(e,n,s,i=!1){this.status=e,this.statusText=n||"",this.internal=i,s instanceof Error?(this.data=s.toString(),this.error=s):this.data=s}};function qN(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function $N(e){return e.map(n=>n.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var S1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function w1(e,n){let s=e;if(typeof s!="string"||!b1.test(s))return{absoluteURL:void 0,isExternal:!1,to:s};let i=s,r=!1;if(S1)try{let c=new URL(window.location.href),u=s.startsWith("//")?new URL(c.protocol+s):new URL(s),d=hs(u.pathname,n);u.origin===c.origin&&d!=null?s=d+u.search+u.hash:r=!0}catch{An(!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:r,to:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var E1=["POST","PUT","PATCH","DELETE"];new Set(E1);var KN=["GET",...E1];new Set(KN);var Ko=x.createContext(null);Ko.displayName="DataRouter";var qu=x.createContext(null);qu.displayName="DataRouterState";var YN=x.createContext(!1),C1=x.createContext({isTransitioning:!1});C1.displayName="ViewTransition";var GN=x.createContext(new Map);GN.displayName="Fetchers";var XN=x.createContext(null);XN.displayName="Await";var Bn=x.createContext(null);Bn.displayName="Navigation";var wl=x.createContext(null);wl.displayName="Location";var ra=x.createContext({outlet:null,matches:[],isDataRoute:!1});ra.displayName="Route";var pp=x.createContext(null);pp.displayName="RouteError";var T1="REACT_ROUTER_ERROR",ZN="REDIRECT",QN="ROUTE_ERROR_RESPONSE";function JN(e){if(e.startsWith(`${T1}:${ZN}:{`))try{let n=JSON.parse(e.slice(28));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.location=="string"&&typeof n.reloadDocument=="boolean"&&typeof n.replace=="boolean")return n}catch{}}function WN(e){if(e.startsWith(`${T1}:${QN}:{`))try{let n=JSON.parse(e.slice(40));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string")return new FN(n.status,n.statusText,n.data)}catch{}}function eR(e,{relative:n}={}){it(Yo(),"useHref() may be used only in the context of a <Router> component.");let{basename:s,navigator:i}=x.useContext(Bn),{hash:r,pathname:c,search:u}=El(e,{relative:n}),d=c;return s!=="/"&&(d=c==="/"?s:fs([s,c])),i.createHref({pathname:d,search:u,hash:r})}function Yo(){return x.useContext(wl)!=null}function Va(){return it(Yo(),"useLocation() may be used only in the context of a <Router> component."),x.useContext(wl).location}var A1="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function j1(e){x.useContext(Bn).static||x.useLayoutEffect(e)}function gp(){let{isDataRoute:e}=x.useContext(ra);return e?gR():tR()}function tR(){it(Yo(),"useNavigate() may be used only in the context of a <Router> component.");let e=x.useContext(Ko),{basename:n,navigator:s}=x.useContext(Bn),{matches:i}=x.useContext(ra),{pathname:r}=Va(),c=JSON.stringify(hp(i)),u=x.useRef(!1);return j1(()=>{u.current=!0}),x.useCallback((f,h={})=>{if(An(u.current,A1),!u.current)return;if(typeof f=="number"){s.go(f);return}let y=mp(f,JSON.parse(c),r,h.relative==="path");e==null&&n!=="/"&&(y.pathname=y.pathname==="/"?n:fs([n,y.pathname])),(h.replace?s.replace:s.push)(y,h.state,h)},[n,s,c,r,e])}var nR=x.createContext(null);function aR(e){let n=x.useContext(ra).outlet;return x.useMemo(()=>n&&x.createElement(nR.Provider,{value:e},n),[n,e])}function sR(){let{matches:e}=x.useContext(ra),n=e[e.length-1];return n?n.params:{}}function El(e,{relative:n}={}){let{matches:s}=x.useContext(ra),{pathname:i}=Va(),r=JSON.stringify(hp(s));return x.useMemo(()=>mp(e,JSON.parse(r),i,n==="path"),[e,r,i,n])}function iR(e,n){return N1(e,n)}function N1(e,n,s,i,r){it(Yo(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:c}=x.useContext(Bn),{matches:u}=x.useContext(ra),d=u[u.length-1],f=d?d.params:{},h=d?d.pathname:"/",y=d?d.pathnameBase:"/",g=d&&d.route;{let N=g&&g.path||"";M1(h,!g||N.endsWith("*")||N.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${N}">) 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.
10
-
11
- Please change the parent <Route path="${N}"> to <Route path="${N==="/"?"*":`${N}/*`}">.`)}let b=Va(),w;if(n){let N=typeof n=="string"?Fi(n):n;it(y==="/"||N.pathname?.startsWith(y),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${y}" but pathname "${N.pathname}" was given in the \`location\` prop.`),w=N}else w=b;let E=w.pathname||"/",C=E;if(y!=="/"){let N=y.replace(/^\//,"").split("/");C="/"+E.replace(/^\//,"").split("/").slice(N.length).join("/")}let A=v1(e,{pathname:C});An(g||A!=null,`No routes matched location "${w.pathname}${w.search}${w.hash}" `),An(A==null||A[A.length-1].route.element!==void 0||A[A.length-1].route.Component!==void 0||A[A.length-1].route.lazy!==void 0,`Matched leaf route at location "${w.pathname}${w.search}${w.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.`);let T=uR(A&&A.map(N=>Object.assign({},N,{params:Object.assign({},f,N.params),pathname:fs([y,c.encodeLocation?c.encodeLocation(N.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathname]),pathnameBase:N.pathnameBase==="/"?y:fs([y,c.encodeLocation?c.encodeLocation(N.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathnameBase])})),u,s,i,r);return n&&T?x.createElement(wl.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...w},navigationType:"POP"}},T):T}function oR(){let e=pR(),n=qN(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)",r={padding:"0.5rem",backgroundColor:i},c={padding:"2px 4px",backgroundColor:i},u=null;return console.error("Error handled by React Router default ErrorBoundary:",e),u=x.createElement(x.Fragment,null,x.createElement("p",null,"💿 Hey developer 👋"),x.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",x.createElement("code",{style:c},"ErrorBoundary")," or"," ",x.createElement("code",{style:c},"errorElement")," prop on your route.")),x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},n),s?x.createElement("pre",{style:r},s):null,u)}var rR=x.createElement(oR,null),R1=class extends x.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,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){this.props.onError?this.props.onError(e,n):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=WN(e.digest);s&&(e=s)}let n=e!==void 0?x.createElement(ra.Provider,{value:this.props.routeContext},x.createElement(pp.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?x.createElement(lR,{error:e},n):n}};R1.contextType=YN;var Nh=new WeakMap;function lR({children:e,error:n}){let{basename:s}=x.useContext(Bn);if(typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){let i=JN(n.digest);if(i){let r=Nh.get(n);if(r)throw r;let c=w1(i.location,s);if(S1&&!Nh.get(n))if(c.isExternal||i.reloadDocument)window.location.href=c.absoluteURL||c.to;else{const u=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(c.to,{replace:i.replace}));throw Nh.set(n,u),u}return x.createElement("meta",{httpEquiv:"refresh",content:`0;url=${c.absoluteURL||c.to}`})}}return e}function cR({routeContext:e,match:n,children:s}){let i=x.useContext(Ko);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),x.createElement(ra.Provider,{value:e},s)}function uR(e,n=[],s=null,i=null,r=null){if(e==null){if(!s)return null;if(s.errors)e=s.matches;else if(n.length===0&&!s.initialized&&s.matches.length>0)e=s.matches;else return null}let c=e,u=s?.errors;if(u!=null){let y=c.findIndex(g=>g.route.id&&u?.[g.route.id]!==void 0);it(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),c=c.slice(0,Math.min(c.length,y+1))}let d=!1,f=-1;if(s)for(let y=0;y<c.length;y++){let g=c[y];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(f=y),g.route.id){let{loaderData:b,errors:w}=s,E=g.route.loader&&!b.hasOwnProperty(g.route.id)&&(!w||w[g.route.id]===void 0);if(g.route.lazy||E){d=!0,f>=0?c=c.slice(0,f+1):c=[c[0]];break}}}let h=s&&i?(y,g)=>{i(y,{location:s.location,params:s.matches?.[0]?.params??{},unstable_pattern:$N(s.matches),errorInfo:g})}:void 0;return c.reduceRight((y,g,b)=>{let w,E=!1,C=null,A=null;s&&(w=u&&g.route.id?u[g.route.id]:void 0,C=g.route.errorElement||rR,d&&(f<0&&b===0?(M1("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),E=!0,A=null):f===b&&(E=!0,A=g.route.hydrateFallbackElement||null)));let T=n.concat(c.slice(0,b+1)),N=()=>{let R;return w?R=C:E?R=A:g.route.Component?R=x.createElement(g.route.Component,null):g.route.element?R=g.route.element:R=y,x.createElement(cR,{match:g,routeContext:{outlet:y,matches:T,isDataRoute:s!=null},children:R})};return s&&(g.route.ErrorBoundary||g.route.errorElement||b===0)?x.createElement(R1,{location:s.location,revalidation:s.revalidation,component:C,error:w,children:N(),routeContext:{outlet:null,matches:T,isDataRoute:!0},onError:h}):N()},null)}function vp(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function dR(e){let n=x.useContext(Ko);return it(n,vp(e)),n}function fR(e){let n=x.useContext(qu);return it(n,vp(e)),n}function hR(e){let n=x.useContext(ra);return it(n,vp(e)),n}function yp(e){let n=hR(e),s=n.matches[n.matches.length-1];return it(s.route.id,`${e} can only be used on routes that contain a unique "id"`),s.route.id}function mR(){return yp("useRouteId")}function pR(){let e=x.useContext(pp),n=fR("useRouteError"),s=yp("useRouteError");return e!==void 0?e:n.errors?.[s]}function gR(){let{router:e}=dR("useNavigate"),n=yp("useNavigate"),s=x.useRef(!1);return j1(()=>{s.current=!0}),x.useCallback(async(r,c={})=>{An(s.current,A1),s.current&&(typeof r=="number"?await e.navigate(r):await e.navigate(r,{fromRouteId:n,...c}))},[e,n])}var _b={};function M1(e,n,s){!n&&!_b[e]&&(_b[e]=!0,An(!1,s))}x.memo(vR);function vR({routes:e,future:n,state:s,onError:i}){return N1(e,void 0,s,i,n)}function yR({to:e,replace:n,state:s,relative:i}){it(Yo(),"<Navigate> may be used only in the context of a <Router> component.");let{static:r}=x.useContext(Bn);An(!r,"<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:c}=x.useContext(ra),{pathname:u}=Va(),d=gp(),f=mp(e,hp(c),u,i==="path"),h=JSON.stringify(f);return x.useEffect(()=>{d(JSON.parse(h),{replace:n,state:s,relative:i})},[d,h,i,n,s]),null}function xR(e){return aR(e.context)}function cs(e){it(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function bR({basename:e="/",children:n=null,location:s,navigationType:i="POP",navigator:r,static:c=!1,unstable_useTransitions:u}){it(!Yo(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),f=x.useMemo(()=>({basename:d,navigator:r,static:c,unstable_useTransitions:u,future:{}}),[d,r,c,u]);typeof s=="string"&&(s=Fi(s));let{pathname:h="/",search:y="",hash:g="",state:b=null,key:w="default"}=s,E=x.useMemo(()=>{let C=hs(h,d);return C==null?null:{location:{pathname:C,search:y,hash:g,state:b,key:w},navigationType:i}},[d,h,y,g,b,w,i]);return An(E!=null,`<Router basename="${d}"> is not able to match the URL "${h}${y}${g}" because it does not start with the basename, so the <Router> won't render anything.`),E==null?null:x.createElement(Bn.Provider,{value:f},x.createElement(wl.Provider,{children:n,value:E}))}function SR({children:e,location:n}){return iR(pm(e),n)}function pm(e,n=[]){let s=[];return x.Children.forEach(e,(i,r)=>{if(!x.isValidElement(i))return;let c=[...n,r];if(i.type===x.Fragment){s.push.apply(s,pm(i.props.children,c));return}it(i.type===cs,`[${typeof i.type=="string"?i.type:i.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),it(!i.props.index||!i.props.children,"An index route cannot have child routes.");let u={id:i.props.id||c.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,middleware:i.props.middleware,loader:i.props.loader,action:i.props.action,hydrateFallbackElement:i.props.hydrateFallbackElement,HydrateFallback:i.props.HydrateFallback,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.hasErrorBoundary===!0||i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(u.children=pm(i.props.children,c)),s.push(u)}),s}var cu="get",uu="application/x-www-form-urlencoded";function $u(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function wR(e){return $u(e)&&e.tagName.toLowerCase()==="button"}function ER(e){return $u(e)&&e.tagName.toLowerCase()==="form"}function CR(e){return $u(e)&&e.tagName.toLowerCase()==="input"}function TR(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function AR(e,n){return e.button===0&&(!n||n==="_self")&&!TR(e)}function gm(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((n,s)=>{let i=e[s];return n.concat(Array.isArray(i)?i.map(r=>[s,r]):[[s,i]])},[]))}function jR(e,n){let s=gm(e);return n&&n.forEach((i,r)=>{s.has(r)||n.getAll(r).forEach(c=>{s.append(r,c)})}),s}var Yc=null;function NR(){if(Yc===null)try{new FormData(document.createElement("form"),0),Yc=!1}catch{Yc=!0}return Yc}var RR=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Rh(e){return e!=null&&!RR.has(e)?(An(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${uu}"`),null):e}function MR(e,n){let s,i,r,c,u;if(ER(e)){let d=e.getAttribute("action");i=d?hs(d,n):null,s=e.getAttribute("method")||cu,r=Rh(e.getAttribute("enctype"))||uu,c=new FormData(e)}else if(wR(e)||CR(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?hs(f,n):null,s=e.getAttribute("formmethod")||d.getAttribute("method")||cu,r=Rh(e.getAttribute("formenctype"))||Rh(d.getAttribute("enctype"))||uu,c=new FormData(d,e),!NR()){let{name:h,type:y,value:g}=e;if(y==="image"){let b=h?`${h}.`:"";c.append(`${b}x`,"0"),c.append(`${b}y`,"0")}else h&&c.append(h,g)}}else{if($u(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');s=cu,i=null,r=uu,u=e}return c&&r==="text/plain"&&(u=c,c=void 0),{action:i,method:s.toLowerCase(),encType:r,formData:c,body:u}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function xp(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function _R(e,n,s){let i=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return i.pathname==="/"?i.pathname=`_root.${s}`:n&&hs(i.pathname,n)==="/"?i.pathname=`${n.replace(/\/$/,"")}/_root.${s}`:i.pathname=`${i.pathname.replace(/\/$/,"")}.${s}`,i}async function OR(e,n){if(e.id in n)return n[e.id];try{let s=await import(e.module);return n[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 DR(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 PR(e,n,s){let i=await Promise.all(e.map(async r=>{let c=n.routes[r.route.id];if(c){let u=await OR(c,s);return u.links?u.links():[]}return[]}));return VR(i.flat(1).filter(DR).filter(r=>r.rel==="stylesheet"||r.rel==="preload").map(r=>r.rel==="stylesheet"?{...r,rel:"prefetch",as:"style"}:{...r,rel:"prefetch"}))}function Ob(e,n,s,i,r,c){let u=(f,h)=>s[h]?f.route.id!==s[h].route.id:!0,d=(f,h)=>s[h].pathname!==f.pathname||s[h].route.path?.endsWith("*")&&s[h].params["*"]!==f.params["*"];return c==="assets"?n.filter((f,h)=>u(f,h)||d(f,h)):c==="data"?n.filter((f,h)=>{let y=i.routes[f.route.id];if(!y||!y.hasLoader)return!1;if(u(f,h)||d(f,h))return!0;if(f.route.shouldRevalidate){let g=f.route.shouldRevalidate({currentUrl:new URL(r.pathname+r.search+r.hash,window.origin),currentParams:s[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:f.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function kR(e,n,{includeHydrateFallback:s}={}){return LR(e.map(i=>{let r=n.routes[i.route.id];if(!r)return[];let c=[r.module];return r.clientActionModule&&(c=c.concat(r.clientActionModule)),r.clientLoaderModule&&(c=c.concat(r.clientLoaderModule)),s&&r.hydrateFallbackModule&&(c=c.concat(r.hydrateFallbackModule)),r.imports&&(c=c.concat(r.imports)),c}).flat(1))}function LR(e){return[...new Set(e)]}function zR(e){let n={},s=Object.keys(e).sort();for(let i of s)n[i]=e[i];return n}function VR(e,n){let s=new Set;return new Set(n),e.reduce((i,r)=>{let c=JSON.stringify(zR(r));return s.has(c)||(s.add(c),i.push({key:c,link:r})),i},[])}function _1(){let e=x.useContext(Ko);return xp(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function BR(){let e=x.useContext(qu);return xp(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var bp=x.createContext(void 0);bp.displayName="FrameworkContext";function O1(){let e=x.useContext(bp);return xp(e,"You must render this element inside a <HydratedRouter> element"),e}function UR(e,n){let s=x.useContext(bp),[i,r]=x.useState(!1),[c,u]=x.useState(!1),{onFocus:d,onBlur:f,onMouseEnter:h,onMouseLeave:y,onTouchStart:g}=n,b=x.useRef(null);x.useEffect(()=>{if(e==="render"&&u(!0),e==="viewport"){let C=T=>{T.forEach(N=>{u(N.isIntersecting)})},A=new IntersectionObserver(C,{threshold:.5});return b.current&&A.observe(b.current),()=>{A.disconnect()}}},[e]),x.useEffect(()=>{if(i){let C=setTimeout(()=>{u(!0)},100);return()=>{clearTimeout(C)}}},[i]);let w=()=>{r(!0)},E=()=>{r(!1),u(!1)};return s?e!=="intent"?[c,b,{}]:[c,b,{onFocus:Xr(d,w),onBlur:Xr(f,E),onMouseEnter:Xr(h,w),onMouseLeave:Xr(y,E),onTouchStart:Xr(g,w)}]:[!1,b,{}]}function Xr(e,n){return s=>{e&&e(s),s.defaultPrevented||n(s)}}function HR({page:e,...n}){let{router:s}=_1(),i=x.useMemo(()=>v1(s.routes,e,s.basename),[s.routes,e,s.basename]);return i?x.createElement(FR,{page:e,matches:i,...n}):null}function IR(e){let{manifest:n,routeModules:s}=O1(),[i,r]=x.useState([]);return x.useEffect(()=>{let c=!1;return PR(e,n,s).then(u=>{c||r(u)}),()=>{c=!0}},[e,n,s]),i}function FR({page:e,matches:n,...s}){let i=Va(),{manifest:r,routeModules:c}=O1(),{basename:u}=_1(),{loaderData:d,matches:f}=BR(),h=x.useMemo(()=>Ob(e,n,f,r,i,"data"),[e,n,f,r,i]),y=x.useMemo(()=>Ob(e,n,f,r,i,"assets"),[e,n,f,r,i]),g=x.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let E=new Set,C=!1;if(n.forEach(T=>{let N=r.routes[T.route.id];!N||!N.hasLoader||(!h.some(R=>R.route.id===T.route.id)&&T.route.id in d&&c[T.route.id]?.shouldRevalidate||N.hasClientLoader?C=!0:E.add(T.route.id))}),E.size===0)return[];let A=_R(e,u,"data");return C&&E.size>0&&A.searchParams.set("_routes",n.filter(T=>E.has(T.route.id)).map(T=>T.route.id).join(",")),[A.pathname+A.search]},[u,d,i,r,h,n,e,c]),b=x.useMemo(()=>kR(y,r),[y,r]),w=IR(y);return x.createElement(x.Fragment,null,g.map(E=>x.createElement("link",{key:E,rel:"prefetch",as:"fetch",href:E,...s})),b.map(E=>x.createElement("link",{key:E,rel:"modulepreload",href:E,...s})),w.map(({key:E,link:C})=>x.createElement("link",{key:E,nonce:s.nonce,...C})))}function qR(...e){return n=>{e.forEach(s=>{typeof s=="function"?s(n):s!=null&&(s.current=n)})}}var $R=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{$R&&(window.__reactRouterVersion="7.11.0")}catch{}function KR({basename:e,children:n,unstable_useTransitions:s,window:i}){let r=x.useRef();r.current==null&&(r.current=bN({window:i,v5Compat:!0}));let c=r.current,[u,d]=x.useState({action:c.action,location:c.location}),f=x.useCallback(h=>{s===!1?d(h):x.startTransition(()=>d(h))},[s]);return x.useLayoutEffect(()=>c.listen(f),[c,f]),x.createElement(bR,{basename:e,children:n,location:u.location,navigationType:u.action,navigator:c,unstable_useTransitions:s})}var D1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Pi=x.forwardRef(function({onClick:n,discover:s="render",prefetch:i="none",relative:r,reloadDocument:c,replace:u,state:d,target:f,to:h,preventScrollReset:y,viewTransition:g,unstable_defaultShouldRevalidate:b,...w},E){let{basename:C,unstable_useTransitions:A}=x.useContext(Bn),T=typeof h=="string"&&D1.test(h),N=w1(h,C);h=N.to;let R=eR(h,{relative:r}),[_,M,U]=UR(i,w),L=XR(h,{replace:u,state:d,target:f,preventScrollReset:y,relative:r,viewTransition:g,unstable_defaultShouldRevalidate:b,unstable_useTransitions:A});function O(Z){n&&n(Z),Z.defaultPrevented||L(Z)}let K=x.createElement("a",{...w,...U,href:N.absoluteURL||R,onClick:N.isExternal||c?n:O,ref:qR(E,M),target:f,"data-discover":!T&&s==="render"?"true":void 0});return _&&!T?x.createElement(x.Fragment,null,K,x.createElement(HR,{page:R})):K});Pi.displayName="Link";var P1=x.forwardRef(function({"aria-current":n="page",caseSensitive:s=!1,className:i="",end:r=!1,style:c,to:u,viewTransition:d,children:f,...h},y){let g=El(u,{relative:h.relative}),b=Va(),w=x.useContext(qu),{navigator:E,basename:C}=x.useContext(Bn),A=w!=null&&tM(g)&&d===!0,T=E.encodeLocation?E.encodeLocation(g).pathname:g.pathname,N=b.pathname,R=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;s||(N=N.toLowerCase(),R=R?R.toLowerCase():null,T=T.toLowerCase()),R&&C&&(R=hs(R,C)||R);const _=T!=="/"&&T.endsWith("/")?T.length-1:T.length;let M=N===T||!r&&N.startsWith(T)&&N.charAt(_)==="/",U=R!=null&&(R===T||!r&&R.startsWith(T)&&R.charAt(T.length)==="/"),L={isActive:M,isPending:U,isTransitioning:A},O=M?n:void 0,K;typeof i=="function"?K=i(L):K=[i,M?"active":null,U?"pending":null,A?"transitioning":null].filter(Boolean).join(" ");let Z=typeof c=="function"?c(L):c;return x.createElement(Pi,{...h,"aria-current":O,className:K,ref:y,style:Z,to:u,viewTransition:d},typeof f=="function"?f(L):f)});P1.displayName="NavLink";var YR=x.forwardRef(({discover:e="render",fetcherKey:n,navigate:s,reloadDocument:i,replace:r,state:c,method:u=cu,action:d,onSubmit:f,relative:h,preventScrollReset:y,viewTransition:g,unstable_defaultShouldRevalidate:b,...w},E)=>{let{unstable_useTransitions:C}=x.useContext(Bn),A=WR(),T=eM(d,{relative:h}),N=u.toLowerCase()==="get"?"get":"post",R=typeof d=="string"&&D1.test(d),_=M=>{if(f&&f(M),M.defaultPrevented)return;M.preventDefault();let U=M.nativeEvent.submitter,L=U?.getAttribute("formmethod")||u,O=()=>A(U||M.currentTarget,{fetcherKey:n,method:L,navigate:s,replace:r,state:c,relative:h,preventScrollReset:y,viewTransition:g,unstable_defaultShouldRevalidate:b});C&&s!==!1?x.startTransition(()=>O()):O()};return x.createElement("form",{ref:E,method:N,action:T,onSubmit:i?f:_,...w,"data-discover":!R&&e==="render"?"true":void 0})});YR.displayName="Form";function GR(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function k1(e){let n=x.useContext(Ko);return it(n,GR(e)),n}function XR(e,{target:n,replace:s,state:i,preventScrollReset:r,relative:c,viewTransition:u,unstable_defaultShouldRevalidate:d,unstable_useTransitions:f}={}){let h=gp(),y=Va(),g=El(e,{relative:c});return x.useCallback(b=>{if(AR(b,n)){b.preventDefault();let w=s!==void 0?s:cl(y)===cl(g),E=()=>h(e,{replace:w,state:i,preventScrollReset:r,relative:c,viewTransition:u,unstable_defaultShouldRevalidate:d});f?x.startTransition(()=>E()):E()}},[y,h,g,s,i,n,e,r,c,u,d,f])}function ZR(e){An(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 n=x.useRef(gm(e)),s=x.useRef(!1),i=Va(),r=x.useMemo(()=>jR(i.search,s.current?null:n.current),[i.search]),c=gp(),u=x.useCallback((d,f)=>{const h=gm(typeof d=="function"?d(new URLSearchParams(r)):d);s.current=!0,c("?"+h,f)},[c,r]);return[r,u]}var QR=0,JR=()=>`__${String(++QR)}__`;function WR(){let{router:e}=k1("useSubmit"),{basename:n}=x.useContext(Bn),s=mR(),i=e.fetch,r=e.navigate;return x.useCallback(async(c,u={})=>{let{action:d,method:f,encType:h,formData:y,body:g}=MR(c,n);if(u.navigate===!1){let b=u.fetcherKey||JR();await i(b,s,u.action||d,{unstable_defaultShouldRevalidate:u.unstable_defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:y,body:g,formMethod:u.method||f,formEncType:u.encType||h,flushSync:u.flushSync})}else await r(u.action||d,{unstable_defaultShouldRevalidate:u.unstable_defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:y,body:g,formMethod:u.method||f,formEncType:u.encType||h,replace:u.replace,state:u.state,fromRouteId:s,flushSync:u.flushSync,viewTransition:u.viewTransition})},[i,r,n,s])}function eM(e,{relative:n}={}){let{basename:s}=x.useContext(Bn),i=x.useContext(ra);it(i,"useFormAction must be used inside a RouteContext");let[r]=i.matches.slice(-1),c={...El(e||".",{relative:n})},u=Va();if(e==null){c.search=u.search;let d=new URLSearchParams(c.search),f=d.getAll("index");if(f.some(y=>y==="")){d.delete("index"),f.filter(g=>g).forEach(g=>d.append("index",g));let y=d.toString();c.search=y?`?${y}`:""}}return(!e||e===".")&&r.route.index&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),s!=="/"&&(c.pathname=c.pathname==="/"?s:fs([s,c.pathname])),cl(c)}function tM(e,{relative:n}={}){let s=x.useContext(C1);it(s!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=k1("useViewTransitionState"),r=El(e,{relative:n});if(!s.isTransitioning)return!1;let c=hs(s.currentLocation.pathname,i)||s.currentLocation.pathname,u=hs(s.nextLocation.pathname,i)||s.nextLocation.pathname;return wu(r.pathname,u)!=null||wu(r.pathname,c)!=null}var Cl=g1();const L1=dp(Cl);var nM=(e,n,s,i,r,c,u,d)=>{let f=document.documentElement,h=["light","dark"];function y(w){(Array.isArray(e)?e:[e]).forEach(E=>{let C=E==="class",A=C&&c?r.map(T=>c[T]||T):r;C?(f.classList.remove(...A),f.classList.add(c&&c[w]?c[w]:w)):f.setAttribute(E,w)}),g(w)}function g(w){d&&h.includes(w)&&(f.style.colorScheme=w)}function b(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(i)y(i);else try{let w=localStorage.getItem(n)||s,E=u&&w==="system"?b():w;y(E)}catch{}},Db=["light","dark"],z1="(prefers-color-scheme: dark)",aM=typeof window>"u",Sp=x.createContext(void 0),sM={setTheme:e=>{},themes:[]},V1=()=>{var e;return(e=x.useContext(Sp))!=null?e:sM},iM=e=>x.useContext(Sp)?x.createElement(x.Fragment,null,e.children):x.createElement(rM,{...e}),oM=["light","dark"],rM=({forcedTheme:e,disableTransitionOnChange:n=!1,enableSystem:s=!0,enableColorScheme:i=!0,storageKey:r="theme",themes:c=oM,defaultTheme:u=s?"system":"light",attribute:d="data-theme",value:f,children:h,nonce:y,scriptProps:g})=>{let[b,w]=x.useState(()=>cM(r,u)),[E,C]=x.useState(()=>b==="system"?Mh():b),A=f?Object.values(f):c,T=x.useCallback(M=>{let U=M;if(!U)return;M==="system"&&s&&(U=Mh());let L=f?f[U]:U,O=n?uM(y):null,K=document.documentElement,Z=J=>{J==="class"?(K.classList.remove(...A),L&&K.classList.add(L)):J.startsWith("data-")&&(L?K.setAttribute(J,L):K.removeAttribute(J))};if(Array.isArray(d)?d.forEach(Z):Z(d),i){let J=Db.includes(u)?u:null,se=Db.includes(U)?U:J;K.style.colorScheme=se}O?.()},[y]),N=x.useCallback(M=>{let U=typeof M=="function"?M(b):M;w(U);try{localStorage.setItem(r,U)}catch{}},[b]),R=x.useCallback(M=>{let U=Mh(M);C(U),b==="system"&&s&&!e&&T("system")},[b,e]);x.useEffect(()=>{let M=window.matchMedia(z1);return M.addListener(R),R(M),()=>M.removeListener(R)},[R]),x.useEffect(()=>{let M=U=>{U.key===r&&(U.newValue?w(U.newValue):N(u))};return window.addEventListener("storage",M),()=>window.removeEventListener("storage",M)},[N]),x.useEffect(()=>{T(e??b)},[e,b]);let _=x.useMemo(()=>({theme:b,setTheme:N,forcedTheme:e,resolvedTheme:b==="system"?E:b,themes:s?[...c,"system"]:c,systemTheme:s?E:void 0}),[b,N,e,E,s,c]);return x.createElement(Sp.Provider,{value:_},x.createElement(lM,{forcedTheme:e,storageKey:r,attribute:d,enableSystem:s,enableColorScheme:i,defaultTheme:u,value:f,themes:c,nonce:y,scriptProps:g}),h)},lM=x.memo(({forcedTheme:e,storageKey:n,attribute:s,enableSystem:i,enableColorScheme:r,defaultTheme:c,value:u,themes:d,nonce:f,scriptProps:h})=>{let y=JSON.stringify([s,n,c,e,d,u,i,r]).slice(1,-1);return x.createElement("script",{...h,suppressHydrationWarning:!0,nonce:typeof window>"u"?f:"",dangerouslySetInnerHTML:{__html:`(${nM.toString()})(${y})`}})}),cM=(e,n)=>{if(aM)return;let s;try{s=localStorage.getItem(e)||void 0}catch{}return s||n},uM=e=>{let n=document.createElement("style");return e&&n.setAttribute("nonce",e),n.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(n),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(n)},1)}},Mh=e=>(e||(e=window.matchMedia(z1)),e.matches?"dark":"light");const Ae=e=>typeof e=="string",Zr=()=>{let e,n;const s=new Promise((i,r)=>{e=i,n=r});return s.resolve=e,s.reject=n,s},Pb=e=>e==null?"":""+e,dM=(e,n,s)=>{e.forEach(i=>{n[i]&&(s[i]=n[i])})},fM=/###/g,kb=e=>e&&e.indexOf("###")>-1?e.replace(fM,"."):e,Lb=e=>!e||Ae(e),nl=(e,n,s)=>{const i=Ae(n)?n.split("."):n;let r=0;for(;r<i.length-1;){if(Lb(e))return{};const c=kb(i[r]);!e[c]&&s&&(e[c]=new s),Object.prototype.hasOwnProperty.call(e,c)?e=e[c]:e={},++r}return Lb(e)?{}:{obj:e,k:kb(i[r])}},zb=(e,n,s)=>{const{obj:i,k:r}=nl(e,n,Object);if(i!==void 0||n.length===1){i[r]=s;return}let c=n[n.length-1],u=n.slice(0,n.length-1),d=nl(e,u,Object);for(;d.obj===void 0&&u.length;)c=`${u[u.length-1]}.${c}`,u=u.slice(0,u.length-1),d=nl(e,u,Object),d?.obj&&typeof d.obj[`${d.k}.${c}`]<"u"&&(d.obj=void 0);d.obj[`${d.k}.${c}`]=s},hM=(e,n,s,i)=>{const{obj:r,k:c}=nl(e,n,Object);r[c]=r[c]||[],r[c].push(s)},Eu=(e,n)=>{const{obj:s,k:i}=nl(e,n);if(s&&Object.prototype.hasOwnProperty.call(s,i))return s[i]},mM=(e,n,s)=>{const i=Eu(e,s);return i!==void 0?i:Eu(n,s)},B1=(e,n,s)=>{for(const i in n)i!=="__proto__"&&i!=="constructor"&&(i in e?Ae(e[i])||e[i]instanceof String||Ae(n[i])||n[i]instanceof String?s&&(e[i]=n[i]):B1(e[i],n[i],s):e[i]=n[i]);return e},No=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var pM={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const gM=e=>Ae(e)?e.replace(/[&<>"'\/]/g,n=>pM[n]):e;class vM{constructor(n){this.capacity=n,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(n){const s=this.regExpMap.get(n);if(s!==void 0)return s;const i=new RegExp(n);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(n,i),this.regExpQueue.push(n),i}}const yM=[" ",",","?","!",";"],xM=new vM(20),bM=(e,n,s)=>{n=n||"",s=s||"";const i=yM.filter(u=>n.indexOf(u)<0&&s.indexOf(u)<0);if(i.length===0)return!0;const r=xM.getRegExp(`(${i.map(u=>u==="?"?"\\?":u).join("|")})`);let c=!r.test(e);if(!c){const u=e.indexOf(s);u>0&&!r.test(e.substring(0,u))&&(c=!0)}return c},vm=(e,n,s=".")=>{if(!e)return;if(e[n])return Object.prototype.hasOwnProperty.call(e,n)?e[n]:void 0;const i=n.split(s);let r=e;for(let c=0;c<i.length;){if(!r||typeof r!="object")return;let u,d="";for(let f=c;f<i.length;++f)if(f!==c&&(d+=s),d+=i[f],u=r[d],u!==void 0){if(["string","number","boolean"].indexOf(typeof u)>-1&&f<i.length-1)continue;c+=f-c+1;break}r=u}return r},ul=e=>e?.replace("_","-"),SM={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,n){console?.[e]?.apply?.(console,n)}};class Cu{constructor(n,s={}){this.init(n,s)}init(n,s={}){this.prefix=s.prefix||"i18next:",this.logger=n||SM,this.options=s,this.debug=s.debug}log(...n){return this.forward(n,"log","",!0)}warn(...n){return this.forward(n,"warn","",!0)}error(...n){return this.forward(n,"error","")}deprecate(...n){return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(n,s,i,r){return r&&!this.debug?null:(Ae(n[0])&&(n[0]=`${i}${this.prefix} ${n[0]}`),this.logger[s](n))}create(n){return new Cu(this.logger,{prefix:`${this.prefix}:${n}:`,...this.options})}clone(n){return n=n||this.options,n.prefix=n.prefix||this.prefix,new Cu(this.logger,n)}}var Oa=new Cu;class Ku{constructor(){this.observers={}}on(n,s){return n.split(" ").forEach(i=>{this.observers[i]||(this.observers[i]=new Map);const r=this.observers[i].get(s)||0;this.observers[i].set(s,r+1)}),this}off(n,s){if(this.observers[n]){if(!s){delete this.observers[n];return}this.observers[n].delete(s)}}emit(n,...s){this.observers[n]&&Array.from(this.observers[n].entries()).forEach(([r,c])=>{for(let u=0;u<c;u++)r(...s)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([r,c])=>{for(let u=0;u<c;u++)r.apply(r,[n,...s])})}}class Vb extends Ku{constructor(n,s={ns:["translation"],defaultNS:"translation"}){super(),this.data=n||{},this.options=s,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(n){this.options.ns.indexOf(n)<0&&this.options.ns.push(n)}removeNamespaces(n){const s=this.options.ns.indexOf(n);s>-1&&this.options.ns.splice(s,1)}getResource(n,s,i,r={}){const c=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,u=r.ignoreJSONStructure!==void 0?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let d;n.indexOf(".")>-1?d=n.split("."):(d=[n,s],i&&(Array.isArray(i)?d.push(...i):Ae(i)&&c?d.push(...i.split(c)):d.push(i)));const f=Eu(this.data,d);return!f&&!s&&!i&&n.indexOf(".")>-1&&(n=d[0],s=d[1],i=d.slice(2).join(".")),f||!u||!Ae(i)?f:vm(this.data?.[n]?.[s],i,c)}addResource(n,s,i,r,c={silent:!1}){const u=c.keySeparator!==void 0?c.keySeparator:this.options.keySeparator;let d=[n,s];i&&(d=d.concat(u?i.split(u):i)),n.indexOf(".")>-1&&(d=n.split("."),r=s,s=d[1]),this.addNamespaces(s),zb(this.data,d,r),c.silent||this.emit("added",n,s,i,r)}addResources(n,s,i,r={silent:!1}){for(const c in i)(Ae(i[c])||Array.isArray(i[c]))&&this.addResource(n,s,c,i[c],{silent:!0});r.silent||this.emit("added",n,s,i)}addResourceBundle(n,s,i,r,c,u={silent:!1,skipCopy:!1}){let d=[n,s];n.indexOf(".")>-1&&(d=n.split("."),r=i,i=s,s=d[1]),this.addNamespaces(s);let f=Eu(this.data,d)||{};u.skipCopy||(i=JSON.parse(JSON.stringify(i))),r?B1(f,i,c):f={...f,...i},zb(this.data,d,f),u.silent||this.emit("added",n,s,i)}removeResourceBundle(n,s){this.hasResourceBundle(n,s)&&delete this.data[n][s],this.removeNamespaces(s),this.emit("removed",n,s)}hasResourceBundle(n,s){return this.getResource(n,s)!==void 0}getResourceBundle(n,s){return s||(s=this.options.defaultNS),this.getResource(n,s)}getDataByLanguage(n){return this.data[n]}hasLanguageSomeTranslations(n){const s=this.getDataByLanguage(n);return!!(s&&Object.keys(s)||[]).find(r=>s[r]&&Object.keys(s[r]).length>0)}toJSON(){return this.data}}var U1={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,n,s,i,r){return e.forEach(c=>{n=this.processors[c]?.process(n,s,i,r)??n}),n}};const H1=Symbol("i18next/PATH_KEY");function wM(){const e=[],n=Object.create(null);let s;return n.get=(i,r)=>(s?.revoke?.(),r===H1?e:(e.push(r),s=Proxy.revocable(i,n),s.proxy)),Proxy.revocable(Object.create(null),n).proxy}function Tu(e,n){const{[H1]:s}=e(wM());return s.join(n?.keySeparator??".")}const Bb={},_h=e=>!Ae(e)&&typeof e!="boolean"&&typeof e!="number";class Au extends Ku{constructor(n,s={}){super(),dM(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],n,this),this.options=s,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Oa.create("translator")}changeLanguage(n){n&&(this.language=n)}exists(n,s={interpolation:{}}){const i={...s};if(n==null)return!1;const r=this.resolve(n,i);if(r?.res===void 0)return!1;const c=_h(r.res);return!(i.returnObjects===!1&&c)}extractFromKey(n,s){let i=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const r=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let c=s.ns||this.options.defaultNS||[];const u=i&&n.indexOf(i)>-1,d=!this.options.userDefinedKeySeparator&&!s.keySeparator&&!this.options.userDefinedNsSeparator&&!s.nsSeparator&&!bM(n,i,r);if(u&&!d){const f=n.match(this.interpolator.nestingRegexp);if(f&&f.length>0)return{key:n,namespaces:Ae(c)?[c]:c};const h=n.split(i);(i!==r||i===r&&this.options.ns.indexOf(h[0])>-1)&&(c=h.shift()),n=h.join(r)}return{key:n,namespaces:Ae(c)?[c]:c}}translate(n,s,i){let r=typeof s=="object"?{...s}:s;if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),n==null)return"";typeof n=="function"&&(n=Tu(n,{...this.options,...r})),Array.isArray(n)||(n=[String(n)]);const c=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,u=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:d,namespaces:f}=this.extractFromKey(n[n.length-1],r),h=f[f.length-1];let y=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;y===void 0&&(y=":");const g=r.lng||this.language,b=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(g?.toLowerCase()==="cimode")return b?c?{res:`${h}${y}${d}`,usedKey:d,exactUsedKey:d,usedLng:g,usedNS:h,usedParams:this.getUsedParamsDetails(r)}:`${h}${y}${d}`:c?{res:d,usedKey:d,exactUsedKey:d,usedLng:g,usedNS:h,usedParams:this.getUsedParamsDetails(r)}:d;const w=this.resolve(n,r);let E=w?.res;const C=w?.usedKey||d,A=w?.exactUsedKey||d,T=["[object Number]","[object Function]","[object RegExp]"],N=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,R=!this.i18nFormat||this.i18nFormat.handleAsObject,_=r.count!==void 0&&!Ae(r.count),M=Au.hasDefaultValue(r),U=_?this.pluralResolver.getSuffix(g,r.count,r):"",L=r.ordinal&&_?this.pluralResolver.getSuffix(g,r.count,{ordinal:!1}):"",O=_&&!r.ordinal&&r.count===0,K=O&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${U}`]||r[`defaultValue${L}`]||r.defaultValue;let Z=E;R&&!E&&M&&(Z=K);const J=_h(Z),se=Object.prototype.toString.apply(Z);if(R&&Z&&J&&T.indexOf(se)<0&&!(Ae(N)&&Array.isArray(Z))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const I=this.options.returnedObjectHandler?this.options.returnedObjectHandler(C,Z,{...r,ns:f}):`key '${d} (${this.language})' returned an object instead of string.`;return c?(w.res=I,w.usedParams=this.getUsedParamsDetails(r),w):I}if(u){const I=Array.isArray(Z),ne=I?[]:{},le=I?A:C;for(const D in Z)if(Object.prototype.hasOwnProperty.call(Z,D)){const H=`${le}${u}${D}`;M&&!E?ne[D]=this.translate(H,{...r,defaultValue:_h(K)?K[D]:void 0,joinArrays:!1,ns:f}):ne[D]=this.translate(H,{...r,joinArrays:!1,ns:f}),ne[D]===H&&(ne[D]=Z[D])}E=ne}}else if(R&&Ae(N)&&Array.isArray(E))E=E.join(N),E&&(E=this.extendTranslation(E,n,r,i));else{let I=!1,ne=!1;!this.isValidLookup(E)&&M&&(I=!0,E=K),this.isValidLookup(E)||(ne=!0,E=d);const D=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&ne?void 0:E,H=M&&K!==E&&this.options.updateMissing;if(ne||I||H){if(this.logger.log(H?"updateKey":"missingKey",g,h,d,H?K:E),u){const P=this.resolve(d,{...r,keySeparator:!1});P&&P.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 V=[];const oe=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&oe&&oe[0])for(let P=0;P<oe.length;P++)V.push(oe[P]);else this.options.saveMissingTo==="all"?V=this.languageUtils.toResolveHierarchy(r.lng||this.language):V.push(r.lng||this.language);const ue=(P,X,G)=>{const te=M&&G!==E?G:D;this.options.missingKeyHandler?this.options.missingKeyHandler(P,h,X,te,H,r):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(P,h,X,te,H,r),this.emit("missingKey",P,h,X,E)};this.options.saveMissing&&(this.options.saveMissingPlurals&&_?V.forEach(P=>{const X=this.pluralResolver.getSuffixes(P,r);O&&r[`defaultValue${this.options.pluralSeparator}zero`]&&X.indexOf(`${this.options.pluralSeparator}zero`)<0&&X.push(`${this.options.pluralSeparator}zero`),X.forEach(G=>{ue([P],d+G,r[`defaultValue${G}`]||K)})}):ue(V,d,K))}E=this.extendTranslation(E,n,r,w,i),ne&&E===d&&this.options.appendNamespaceToMissingKey&&(E=`${h}${y}${d}`),(ne||I)&&this.options.parseMissingKeyHandler&&(E=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${h}${y}${d}`:d,I?E:void 0,r))}return c?(w.res=E,w.usedParams=this.getUsedParamsDetails(r),w):E}extendTranslation(n,s,i,r,c){if(this.i18nFormat?.parse)n=this.i18nFormat.parse(n,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const f=Ae(n)&&(i?.interpolation?.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let h;if(f){const g=n.match(this.interpolator.nestingRegexp);h=g&&g.length}let y=i.replace&&!Ae(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(y={...this.options.interpolation.defaultVariables,...y}),n=this.interpolator.interpolate(n,y,i.lng||this.language||r.usedLng,i),f){const g=n.match(this.interpolator.nestingRegexp),b=g&&g.length;h<b&&(i.nest=!1)}!i.lng&&r&&r.res&&(i.lng=this.language||r.usedLng),i.nest!==!1&&(n=this.interpolator.nest(n,(...g)=>c?.[0]===g[0]&&!i.context?(this.logger.warn(`It seems you are nesting recursively key: ${g[0]} in key: ${s[0]}`),null):this.translate(...g,s),i)),i.interpolation&&this.interpolator.reset()}const u=i.postProcess||this.options.postProcess,d=Ae(u)?[u]:u;return n!=null&&d?.length&&i.applyPostProcessor!==!1&&(n=U1.handle(d,n,s,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),n}resolve(n,s={}){let i,r,c,u,d;return Ae(n)&&(n=[n]),n.forEach(f=>{if(this.isValidLookup(i))return;const h=this.extractFromKey(f,s),y=h.key;r=y;let g=h.namespaces;this.options.fallbackNS&&(g=g.concat(this.options.fallbackNS));const b=s.count!==void 0&&!Ae(s.count),w=b&&!s.ordinal&&s.count===0,E=s.context!==void 0&&(Ae(s.context)||typeof s.context=="number")&&s.context!=="",C=s.lngs?s.lngs:this.languageUtils.toResolveHierarchy(s.lng||this.language,s.fallbackLng);g.forEach(A=>{this.isValidLookup(i)||(d=A,!Bb[`${C[0]}-${A}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(d)&&(Bb[`${C[0]}-${A}`]=!0,this.logger.warn(`key "${r}" 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(T=>{if(this.isValidLookup(i))return;u=T;const N=[y];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(N,y,T,A,s);else{let _;b&&(_=this.pluralResolver.getSuffix(T,s.count,s));const M=`${this.options.pluralSeparator}zero`,U=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(b&&(s.ordinal&&_.indexOf(U)===0&&N.push(y+_.replace(U,this.options.pluralSeparator)),N.push(y+_),w&&N.push(y+M)),E){const L=`${y}${this.options.contextSeparator||"_"}${s.context}`;N.push(L),b&&(s.ordinal&&_.indexOf(U)===0&&N.push(L+_.replace(U,this.options.pluralSeparator)),N.push(L+_),w&&N.push(L+M))}}let R;for(;R=N.pop();)this.isValidLookup(i)||(c=R,i=this.getResource(T,A,R,s))}))})}),{res:i,usedKey:r,exactUsedKey:c,usedLng:u,usedNS:d}}isValidLookup(n){return n!==void 0&&!(!this.options.returnNull&&n===null)&&!(!this.options.returnEmptyString&&n==="")}getResource(n,s,i,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(n,s,i,r):this.resourceStore.getResource(n,s,i,r)}getUsedParamsDetails(n={}){const s=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=n.replace&&!Ae(n.replace);let r=i?n.replace:n;if(i&&typeof n.count<"u"&&(r.count=n.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!i){r={...r};for(const c of s)delete r[c]}return r}static hasDefaultValue(n){const s="defaultValue";for(const i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&s===i.substring(0,s.length)&&n[i]!==void 0)return!0;return!1}}class Ub{constructor(n){this.options=n,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Oa.create("languageUtils")}getScriptPartFromCode(n){if(n=ul(n),!n||n.indexOf("-")<0)return null;const s=n.split("-");return s.length===2||(s.pop(),s[s.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(s.join("-"))}getLanguagePartFromCode(n){if(n=ul(n),!n||n.indexOf("-")<0)return n;const s=n.split("-");return this.formatLanguageCode(s[0])}formatLanguageCode(n){if(Ae(n)&&n.indexOf("-")>-1){let s;try{s=Intl.getCanonicalLocales(n)[0]}catch{}return s&&this.options.lowerCaseLng&&(s=s.toLowerCase()),s||(this.options.lowerCaseLng?n.toLowerCase():n)}return this.options.cleanCode||this.options.lowerCaseLng?n.toLowerCase():n}isSupportedCode(n){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(n=this.getLanguagePartFromCode(n)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(n)>-1}getBestMatchFromCodes(n){if(!n)return null;let s;return n.forEach(i=>{if(s)return;const r=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(r))&&(s=r)}),!s&&this.options.supportedLngs&&n.forEach(i=>{if(s)return;const r=this.getScriptPartFromCode(i);if(this.isSupportedCode(r))return s=r;const c=this.getLanguagePartFromCode(i);if(this.isSupportedCode(c))return s=c;s=this.options.supportedLngs.find(u=>{if(u===c)return u;if(!(u.indexOf("-")<0&&c.indexOf("-")<0)&&(u.indexOf("-")>0&&c.indexOf("-")<0&&u.substring(0,u.indexOf("-"))===c||u.indexOf(c)===0&&c.length>1))return u})}),s||(s=this.getFallbackCodes(this.options.fallbackLng)[0]),s}getFallbackCodes(n,s){if(!n)return[];if(typeof n=="function"&&(n=n(s)),Ae(n)&&(n=[n]),Array.isArray(n))return n;if(!s)return n.default||[];let i=n[s];return i||(i=n[this.getScriptPartFromCode(s)]),i||(i=n[this.formatLanguageCode(s)]),i||(i=n[this.getLanguagePartFromCode(s)]),i||(i=n.default),i||[]}toResolveHierarchy(n,s){const i=this.getFallbackCodes((s===!1?[]:s)||this.options.fallbackLng||[],n),r=[],c=u=>{u&&(this.isSupportedCode(u)?r.push(u):this.logger.warn(`rejecting language code not found in supportedLngs: ${u}`))};return Ae(n)&&(n.indexOf("-")>-1||n.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&c(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&c(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&c(this.getLanguagePartFromCode(n))):Ae(n)&&c(this.formatLanguageCode(n)),i.forEach(u=>{r.indexOf(u)<0&&c(this.formatLanguageCode(u))}),r}}const Hb={zero:0,one:1,two:2,few:3,many:4,other:5},Ib={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class EM{constructor(n,s={}){this.languageUtils=n,this.options=s,this.logger=Oa.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(n,s={}){const i=ul(n==="dev"?"en":n),r=s.ordinal?"ordinal":"cardinal",c=JSON.stringify({cleanedCode:i,type:r});if(c in this.pluralRulesCache)return this.pluralRulesCache[c];let u;try{u=new Intl.PluralRules(i,{type:r})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Ib;if(!n.match(/-|_/))return Ib;const f=this.languageUtils.getLanguagePartFromCode(n);u=this.getRule(f,s)}return this.pluralRulesCache[c]=u,u}needsPlural(n,s={}){let i=this.getRule(n,s);return i||(i=this.getRule("dev",s)),i?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(n,s,i={}){return this.getSuffixes(n,i).map(r=>`${s}${r}`)}getSuffixes(n,s={}){let i=this.getRule(n,s);return i||(i=this.getRule("dev",s)),i?i.resolvedOptions().pluralCategories.sort((r,c)=>Hb[r]-Hb[c]).map(r=>`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${r}`):[]}getSuffix(n,s,i={}){const r=this.getRule(n,i);return r?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${r.select(s)}`:(this.logger.warn(`no plural rule found for: ${n}`),this.getSuffix("dev",s,i))}}const Fb=(e,n,s,i=".",r=!0)=>{let c=mM(e,n,s);return!c&&r&&Ae(s)&&(c=vm(e,s,i),c===void 0&&(c=vm(n,s,i))),c},Oh=e=>e.replace(/\$/g,"$$$$");class qb{constructor(n={}){this.logger=Oa.create("interpolator"),this.options=n,this.format=n?.interpolation?.format||(s=>s),this.init(n)}init(n={}){n.interpolation||(n.interpolation={escapeValue:!0});const{escape:s,escapeValue:i,useRawValueToEscape:r,prefix:c,prefixEscaped:u,suffix:d,suffixEscaped:f,formatSeparator:h,unescapeSuffix:y,unescapePrefix:g,nestingPrefix:b,nestingPrefixEscaped:w,nestingSuffix:E,nestingSuffixEscaped:C,nestingOptionsSeparator:A,maxReplaces:T,alwaysFormat:N}=n.interpolation;this.escape=s!==void 0?s:gM,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=r!==void 0?r:!1,this.prefix=c?No(c):u||"{{",this.suffix=d?No(d):f||"}}",this.formatSeparator=h||",",this.unescapePrefix=y?"":g||"-",this.unescapeSuffix=this.unescapePrefix?"":y||"",this.nestingPrefix=b?No(b):w||No("$t("),this.nestingSuffix=E?No(E):C||No(")"),this.nestingOptionsSeparator=A||",",this.maxReplaces=T||1e3,this.alwaysFormat=N!==void 0?N:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const n=(s,i)=>s?.source===i?(s.lastIndex=0,s):new RegExp(i,"g");this.regexp=n(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=n(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=n(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(n,s,i,r){let c,u,d;const f=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},h=w=>{if(w.indexOf(this.formatSeparator)<0){const T=Fb(s,f,w,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(T,void 0,i,{...r,...s,interpolationkey:w}):T}const E=w.split(this.formatSeparator),C=E.shift().trim(),A=E.join(this.formatSeparator).trim();return this.format(Fb(s,f,C,this.options.keySeparator,this.options.ignoreJSONStructure),A,i,{...r,...s,interpolationkey:C})};this.resetRegExp();const y=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,g=r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:w=>Oh(w)},{regex:this.regexp,safeValue:w=>this.escapeValue?Oh(this.escape(w)):Oh(w)}].forEach(w=>{for(d=0;c=w.regex.exec(n);){const E=c[1].trim();if(u=h(E),u===void 0)if(typeof y=="function"){const A=y(n,c,r);u=Ae(A)?A:""}else if(r&&Object.prototype.hasOwnProperty.call(r,E))u="";else if(g){u=c[0];continue}else this.logger.warn(`missed to pass in variable ${E} for interpolating ${n}`),u="";else!Ae(u)&&!this.useRawValueToEscape&&(u=Pb(u));const C=w.safeValue(u);if(n=n.replace(c[0],C),g?(w.regex.lastIndex+=u.length,w.regex.lastIndex-=c[0].length):w.regex.lastIndex=0,d++,d>=this.maxReplaces)break}}),n}nest(n,s,i={}){let r,c,u;const d=(f,h)=>{const y=this.nestingOptionsSeparator;if(f.indexOf(y)<0)return f;const g=f.split(new RegExp(`${y}[ ]*{`));let b=`{${g[1]}`;f=g[0],b=this.interpolate(b,u);const w=b.match(/'/g),E=b.match(/"/g);((w?.length??0)%2===0&&!E||E.length%2!==0)&&(b=b.replace(/'/g,'"'));try{u=JSON.parse(b),h&&(u={...h,...u})}catch(C){return this.logger.warn(`failed parsing options string in nesting for key ${f}`,C),`${f}${y}${b}`}return u.defaultValue&&u.defaultValue.indexOf(this.prefix)>-1&&delete u.defaultValue,f};for(;r=this.nestingRegexp.exec(n);){let f=[];u={...i},u=u.replace&&!Ae(u.replace)?u.replace:u,u.applyPostProcessor=!1,delete u.defaultValue;const h=/{.*}/.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(h!==-1&&(f=r[1].slice(h).split(this.formatSeparator).map(y=>y.trim()).filter(Boolean),r[1]=r[1].slice(0,h)),c=s(d.call(this,r[1].trim(),u),u),c&&r[0]===n&&!Ae(c))return c;Ae(c)||(c=Pb(c)),c||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${n}`),c=""),f.length&&(c=f.reduce((y,g)=>this.format(y,g,i.lng,{...i,interpolationkey:r[1].trim()}),c.trim())),n=n.replace(r[0],c),this.regexp.lastIndex=0}return n}}const CM=e=>{let n=e.toLowerCase().trim();const s={};if(e.indexOf("(")>-1){const i=e.split("(");n=i[0].toLowerCase().trim();const r=i[1].substring(0,i[1].length-1);n==="currency"&&r.indexOf(":")<0?s.currency||(s.currency=r.trim()):n==="relativetime"&&r.indexOf(":")<0?s.range||(s.range=r.trim()):r.split(";").forEach(u=>{if(u){const[d,...f]=u.split(":"),h=f.join(":").trim().replace(/^'+|'+$/g,""),y=d.trim();s[y]||(s[y]=h),h==="false"&&(s[y]=!1),h==="true"&&(s[y]=!0),isNaN(h)||(s[y]=parseInt(h,10))}})}return{formatName:n,formatOptions:s}},$b=e=>{const n={};return(s,i,r)=>{let c=r;r&&r.interpolationkey&&r.formatParams&&r.formatParams[r.interpolationkey]&&r[r.interpolationkey]&&(c={...c,[r.interpolationkey]:void 0});const u=i+JSON.stringify(c);let d=n[u];return d||(d=e(ul(i),r),n[u]=d),d(s)}},TM=e=>(n,s,i)=>e(ul(s),i)(n);class AM{constructor(n={}){this.logger=Oa.create("formatter"),this.options=n,this.init(n)}init(n,s={interpolation:{}}){this.formatSeparator=s.interpolation.formatSeparator||",";const i=s.cacheInBuiltFormats?$b:TM;this.formats={number:i((r,c)=>{const u=new Intl.NumberFormat(r,{...c});return d=>u.format(d)}),currency:i((r,c)=>{const u=new Intl.NumberFormat(r,{...c,style:"currency"});return d=>u.format(d)}),datetime:i((r,c)=>{const u=new Intl.DateTimeFormat(r,{...c});return d=>u.format(d)}),relativetime:i((r,c)=>{const u=new Intl.RelativeTimeFormat(r,{...c});return d=>u.format(d,c.range||"day")}),list:i((r,c)=>{const u=new Intl.ListFormat(r,{...c});return d=>u.format(d)})}}add(n,s){this.formats[n.toLowerCase().trim()]=s}addCached(n,s){this.formats[n.toLowerCase().trim()]=$b(s)}format(n,s,i,r={}){const c=s.split(this.formatSeparator);if(c.length>1&&c[0].indexOf("(")>1&&c[0].indexOf(")")<0&&c.find(d=>d.indexOf(")")>-1)){const d=c.findIndex(f=>f.indexOf(")")>-1);c[0]=[c[0],...c.splice(1,d)].join(this.formatSeparator)}return c.reduce((d,f)=>{const{formatName:h,formatOptions:y}=CM(f);if(this.formats[h]){let g=d;try{const b=r?.formatParams?.[r.interpolationkey]||{},w=b.locale||b.lng||r.locale||r.lng||i;g=this.formats[h](d,w,{...y,...r,...b})}catch(b){this.logger.warn(b)}return g}else this.logger.warn(`there was no format function for ${h}`);return d},n)}}const jM=(e,n)=>{e.pending[n]!==void 0&&(delete e.pending[n],e.pendingCount--)};class NM extends Ku{constructor(n,s,i,r={}){super(),this.backend=n,this.store=s,this.services=i,this.languageUtils=i.languageUtils,this.options=r,this.logger=Oa.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(i,r.backend,r)}queueLoad(n,s,i,r){const c={},u={},d={},f={};return n.forEach(h=>{let y=!0;s.forEach(g=>{const b=`${h}|${g}`;!i.reload&&this.store.hasResourceBundle(h,g)?this.state[b]=2:this.state[b]<0||(this.state[b]===1?u[b]===void 0&&(u[b]=!0):(this.state[b]=1,y=!1,u[b]===void 0&&(u[b]=!0),c[b]===void 0&&(c[b]=!0),f[g]===void 0&&(f[g]=!0)))}),y||(d[h]=!0)}),(Object.keys(c).length||Object.keys(u).length)&&this.queue.push({pending:u,pendingCount:Object.keys(u).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(c),pending:Object.keys(u),toLoadLanguages:Object.keys(d),toLoadNamespaces:Object.keys(f)}}loaded(n,s,i){const r=n.split("|"),c=r[0],u=r[1];s&&this.emit("failedLoading",c,u,s),!s&&i&&this.store.addResourceBundle(c,u,i,void 0,void 0,{skipCopy:!0}),this.state[n]=s?-1:2,s&&i&&(this.state[n]=0);const d={};this.queue.forEach(f=>{hM(f.loaded,[c],u),jM(f,n),s&&f.errors.push(s),f.pendingCount===0&&!f.done&&(Object.keys(f.loaded).forEach(h=>{d[h]||(d[h]={});const y=f.loaded[h];y.length&&y.forEach(g=>{d[h][g]===void 0&&(d[h][g]=!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(n,s,i,r=0,c=this.retryTimeout,u){if(!n.length)return u(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:n,ns:s,fcName:i,tried:r,wait:c,callback:u});return}this.readingCalls++;const d=(h,y)=>{if(this.readingCalls--,this.waitingReads.length>0){const g=this.waitingReads.shift();this.read(g.lng,g.ns,g.fcName,g.tried,g.wait,g.callback)}if(h&&y&&r<this.maxRetries){setTimeout(()=>{this.read.call(this,n,s,i,r+1,c*2,u)},c);return}u(h,y)},f=this.backend[i].bind(this.backend);if(f.length===2){try{const h=f(n,s);h&&typeof h.then=="function"?h.then(y=>d(null,y)).catch(d):d(null,h)}catch(h){d(h)}return}return f(n,s,d)}prepareLoading(n,s,i={},r){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();Ae(n)&&(n=this.languageUtils.toResolveHierarchy(n)),Ae(s)&&(s=[s]);const c=this.queueLoad(n,s,i,r);if(!c.toLoad.length)return c.pending.length||r(),null;c.toLoad.forEach(u=>{this.loadOne(u)})}load(n,s,i){this.prepareLoading(n,s,{},i)}reload(n,s,i){this.prepareLoading(n,s,{reload:!0},i)}loadOne(n,s=""){const i=n.split("|"),r=i[0],c=i[1];this.read(r,c,"read",void 0,void 0,(u,d)=>{u&&this.logger.warn(`${s}loading namespace ${c} for language ${r} failed`,u),!u&&d&&this.logger.log(`${s}loaded namespace ${c} for language ${r}`,d),this.loaded(n,u,d)})}saveMissing(n,s,i,r,c,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:c},h=this.backend.create.bind(this.backend);if(h.length<6)try{let y;h.length===5?y=h(n,s,i,r,f):y=h(n,s,i,r),y&&typeof y.then=="function"?y.then(g=>d(null,g)).catch(d):d(null,y)}catch(y){d(y)}else h(n,s,i,r,d,f)}!n||!n[0]||this.store.addResource(n[0],s,i,r)}}}const Dh=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",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 n={};if(typeof e[1]=="object"&&(n=e[1]),Ae(e[1])&&(n.defaultValue=e[1]),Ae(e[2])&&(n.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const s=e[3]||e[2];Object.keys(s).forEach(i=>{n[i]=s[i]})}return n},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Kb=e=>(Ae(e.ns)&&(e.ns=[e.ns]),Ae(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Ae(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e),Gc=()=>{},RM=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(s=>{typeof e[s]=="function"&&(e[s]=e[s].bind(e))})},MM=e=>!!(e?.modules?.backend?.name?.indexOf("Locize")>0||e?.modules?.backend?.constructor?.name?.indexOf("Locize")>0||e?.options?.backend?.backends&&e.options.backend.backends.some(n=>n?.name.indexOf("Locize")>0||n?.constructor?.name.indexOf("Locize")>0));class al extends Ku{constructor(n={},s){if(super(),this.options=Kb(n),this.services={},this.logger=Oa,this.modules={external:[]},RM(this),s&&!this.isInitialized&&!n.isClone){if(!this.options.initAsync)return this.init(n,s),this;setTimeout(()=>{this.init(n,s)},0)}}init(n={},s){this.isInitializing=!0,typeof n=="function"&&(s=n,n={}),n.defaultNS==null&&n.ns&&(Ae(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const i=Dh();this.options={...i,...this.options,...Kb(n)},this.options.interpolation={...i.interpolation,...this.options.interpolation},n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=i.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!MM(this)&&typeof console<"u"&&typeof console.info<"u"&&console.info("🌐 i18next is maintained with support from locize.com — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙");const r=h=>h?typeof h=="function"?new h:h:null;if(!this.options.isClone){this.modules.logger?Oa.init(r(this.modules.logger),this.options):Oa.init(null,this.options);let h;this.modules.formatter?h=this.modules.formatter:h=AM;const y=new Ub(this.options);this.store=new Vb(this.options.resources,this.options);const g=this.services;g.logger=Oa,g.resourceStore=this.store,g.languageUtils=y,g.pluralResolver=new EM(y,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==i.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),h&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(g.formatter=r(h),g.formatter.init&&g.formatter.init(g,this.options),this.options.interpolation.format=g.formatter.format.bind(g.formatter)),g.interpolator=new qb(this.options),g.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},g.backendConnector=new NM(r(this.modules.backend),g.resourceStore,g,this.options),g.backendConnector.on("*",(w,...E)=>{this.emit(w,...E)}),this.modules.languageDetector&&(g.languageDetector=r(this.modules.languageDetector),g.languageDetector.init&&g.languageDetector.init(g,this.options.detection,this.options)),this.modules.i18nFormat&&(g.i18nFormat=r(this.modules.i18nFormat),g.i18nFormat.init&&g.i18nFormat.init(this)),this.translator=new Au(this.services,this.options),this.translator.on("*",(w,...E)=>{this.emit(w,...E)}),this.modules.external.forEach(w=>{w.init&&w.init(this)})}if(this.format=this.options.interpolation.format,s||(s=Gc),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const h=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);h.length>0&&h[0]!=="dev"&&(this.options.lng=h[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(h=>{this[h]=(...y)=>this.store[h](...y)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(h=>{this[h]=(...y)=>(this.store[h](...y),this)});const d=Zr(),f=()=>{const h=(y,g)=>{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(g),s(y,g)};if(this.languages&&!this.isInitialized)return h(null,this.t.bind(this));this.changeLanguage(this.options.lng,h)};return this.options.resources||!this.options.initAsync?f():setTimeout(f,0),d}loadResources(n,s=Gc){let i=s;const r=Ae(n)?n:this.language;if(typeof n=="function"&&(i=n),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const c=[],u=d=>{if(!d||d==="cimode")return;this.services.languageUtils.toResolveHierarchy(d).forEach(h=>{h!=="cimode"&&c.indexOf(h)<0&&c.push(h)})};r?u(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(f=>u(f)),this.options.preload?.forEach?.(d=>u(d)),this.services.backendConnector.load(c,this.options.ns,d=>{!d&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(d)})}else i(null)}reloadResources(n,s,i){const r=Zr();return typeof n=="function"&&(i=n,n=void 0),typeof s=="function"&&(i=s,s=void 0),n||(n=this.languages),s||(s=this.options.ns),i||(i=Gc),this.services.backendConnector.reload(n,s,c=>{r.resolve(),i(c)}),r}use(n){if(!n)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!n.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return n.type==="backend"&&(this.modules.backend=n),(n.type==="logger"||n.log&&n.warn&&n.error)&&(this.modules.logger=n),n.type==="languageDetector"&&(this.modules.languageDetector=n),n.type==="i18nFormat"&&(this.modules.i18nFormat=n),n.type==="postProcessor"&&U1.addPostProcessor(n),n.type==="formatter"&&(this.modules.formatter=n),n.type==="3rdParty"&&this.modules.external.push(n),this}setResolvedLanguage(n){if(!(!n||!this.languages)&&!(["cimode","dev"].indexOf(n)>-1)){for(let s=0;s<this.languages.length;s++){const i=this.languages[s];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}!this.resolvedLanguage&&this.languages.indexOf(n)<0&&this.store.hasLanguageSomeTranslations(n)&&(this.resolvedLanguage=n,this.languages.unshift(n))}}changeLanguage(n,s){this.isLanguageChangingTo=n;const i=Zr();this.emit("languageChanging",n);const r=d=>{this.language=d,this.languages=this.services.languageUtils.toResolveHierarchy(d),this.resolvedLanguage=void 0,this.setResolvedLanguage(d)},c=(d,f)=>{f?this.isLanguageChangingTo===n&&(r(f),this.translator.changeLanguage(f),this.isLanguageChangingTo=void 0,this.emit("languageChanged",f),this.logger.log("languageChanged",f)):this.isLanguageChangingTo=void 0,i.resolve((...h)=>this.t(...h)),s&&s(d,(...h)=>this.t(...h))},u=d=>{!n&&!d&&this.services.languageDetector&&(d=[]);const f=Ae(d)?d:d&&d[0],h=this.store.hasLanguageSomeTranslations(f)?f:this.services.languageUtils.getBestMatchFromCodes(Ae(d)?[d]:d);h&&(this.language||r(h),this.translator.language||this.translator.changeLanguage(h),this.services.languageDetector?.cacheUserLanguage?.(h)),this.loadResources(h,y=>{c(y,h)})};return!n&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!n&&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(n),i}getFixedT(n,s,i){const r=(c,u,...d)=>{let f;typeof u!="object"?f=this.options.overloadTranslationOptionHandler([c,u].concat(d)):f={...u},f.lng=f.lng||r.lng,f.lngs=f.lngs||r.lngs,f.ns=f.ns||r.ns,f.keyPrefix!==""&&(f.keyPrefix=f.keyPrefix||i||r.keyPrefix);const h=this.options.keySeparator||".";let y;return f.keyPrefix&&Array.isArray(c)?y=c.map(g=>(typeof g=="function"&&(g=Tu(g,{...this.options,...u})),`${f.keyPrefix}${h}${g}`)):(typeof c=="function"&&(c=Tu(c,{...this.options,...u})),y=f.keyPrefix?`${f.keyPrefix}${h}${c}`:c),this.t(y,f)};return Ae(n)?r.lng=n:r.lngs=n,r.ns=s,r.keyPrefix=i,r}t(...n){return this.translator?.translate(...n)}exists(...n){return this.translator?.exists(...n)}setDefaultNamespace(n){this.options.defaultNS=n}hasLoadedNamespace(n,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],r=this.options?this.options.fallbackLng:!1,c=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const u=(d,f)=>{const h=this.services.backendConnector.state[`${d}|${f}`];return h===-1||h===0||h===2};if(s.precheck){const d=s.precheck(this,u);if(d!==void 0)return d}return!!(this.hasResourceBundle(i,n)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||u(i,n)&&(!r||u(c,n)))}loadNamespaces(n,s){const i=Zr();return this.options.ns?(Ae(n)&&(n=[n]),n.forEach(r=>{this.options.ns.indexOf(r)<0&&this.options.ns.push(r)}),this.loadResources(r=>{i.resolve(),s&&s(r)}),i):(s&&s(),Promise.resolve())}loadLanguages(n,s){const i=Zr();Ae(n)&&(n=[n]);const r=this.options.preload||[],c=n.filter(u=>r.indexOf(u)<0&&this.services.languageUtils.isSupportedCode(u));return c.length?(this.options.preload=r.concat(c),this.loadResources(u=>{i.resolve(),s&&s(u)}),i):(s&&s(),Promise.resolve())}dir(n){if(n||(n=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!n)return"rtl";try{const r=new Intl.Locale(n);if(r&&r.getTextInfo){const c=r.getTextInfo();if(c&&c.direction)return c.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 Ub(Dh());return n.toLowerCase().indexOf("-latn")>1?"ltr":s.indexOf(i.getLanguagePartFromCode(n))>-1||n.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(n={},s){const i=new al(n,s);return i.createInstance=al.createInstance,i}cloneInstance(n={},s=Gc){const i=n.forkResourceStore;i&&delete n.forkResourceStore;const r={...this.options,...n,isClone:!0},c=new al(r);if((n.debug!==void 0||n.prefix!==void 0)&&(c.logger=c.logger.clone(n)),["store","services","language"].forEach(d=>{c[d]=this[d]}),c.services={...this.services},c.services.utils={hasLoadedNamespace:c.hasLoadedNamespace.bind(c)},i){const d=Object.keys(this.store.data).reduce((f,h)=>(f[h]={...this.store.data[h]},f[h]=Object.keys(f[h]).reduce((y,g)=>(y[g]={...f[h][g]},y),f[h]),f),{});c.store=new Vb(d,r),c.services.resourceStore=c.store}if(n.interpolation){const f={...Dh().interpolation,...this.options.interpolation,...n.interpolation},h={...r,interpolation:f};c.services.interpolator=new qb(h)}return c.translator=new Au(c.services,r),c.translator.on("*",(d,...f)=>{c.emit(d,...f)}),c.init(r,s),c.translator.options=r,c.translator.backendConnector.services.utils={hasLoadedNamespace:c.hasLoadedNamespace.bind(c)},c}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const st=al.createInstance();st.createInstance;st.dir;st.init;st.loadResources;st.reloadResources;st.use;st.changeLanguage;st.getFixedT;st.t;st.exists;st.setDefaultNamespace;st.hasLoadedNamespace;st.loadNamespaces;st.loadLanguages;var Ph,Yb;function _M(){return Yb||(Yb=1,Ph={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}),Ph}var OM=_M();const DM=dp(OM);var PM=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function Gb(e){var n={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},s=e.match(/<\/?([^\s]+?)[/\s>]/);if(s&&(n.name=s[1],(DM[s[1]]||e.charAt(e.length-2)==="/")&&(n.voidElement=!0),n.name.startsWith("!--"))){var i=e.indexOf("-->");return{type:"comment",comment:i!==-1?e.slice(4,i):""}}for(var r=new RegExp(PM),c=null;(c=r.exec(e))!==null;)if(c[0].trim())if(c[1]){var u=c[1].trim(),d=[u,""];u.indexOf("=")>-1&&(d=u.split("=")),n.attrs[d[0]]=d[1],r.lastIndex--}else c[2]&&(n.attrs[c[2]]=c[3].trim().substring(1,c[3].length-1));return n}var kM=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,LM=/^\s*$/,zM=Object.create(null);function I1(e,n){switch(n.type){case"text":return e+n.content;case"tag":return e+="<"+n.name+(n.attrs?(function(s){var i=[];for(var r in s)i.push(r+'="'+s[r]+'"');return i.length?" "+i.join(" "):""})(n.attrs):"")+(n.voidElement?"/>":">"),n.voidElement?e:e+n.children.reduce(I1,"")+"</"+n.name+">";case"comment":return e+"<!--"+n.comment+"-->"}}var VM={parse:function(e,n){n||(n={}),n.components||(n.components=zM);var s,i=[],r=[],c=-1,u=!1;if(e.indexOf("<")!==0){var d=e.indexOf("<");i.push({type:"text",content:d===-1?e:e.substring(0,d)})}return e.replace(kM,function(f,h){if(u){if(f!=="</"+s.name+">")return;u=!1}var y,g=f.charAt(1)!=="/",b=f.startsWith("<!--"),w=h+f.length,E=e.charAt(w);if(b){var C=Gb(f);return c<0?(i.push(C),i):((y=r[c]).children.push(C),i)}if(g&&(c++,(s=Gb(f)).type==="tag"&&n.components[s.name]&&(s.type="component",u=!0),s.voidElement||u||!E||E==="<"||s.children.push({type:"text",content:e.slice(w,e.indexOf("<",w))}),c===0&&i.push(s),(y=r[c-1])&&y.children.push(s),r[c]=s),(!g||s.voidElement)&&(c>-1&&(s.voidElement||s.name===f.slice(2,-1))&&(c--,s=c===-1?i:r[c]),!u&&E!=="<"&&E)){y=c===-1?i:r[c].children;var A=e.indexOf("<",w),T=e.slice(w,A===-1?void 0:A);LM.test(T)&&(T=" "),(A>-1&&c+y.length>=0||T!==" ")&&y.push({type:"text",content:T})}}),i},stringify:function(e){return e.reduce(function(n,s){return n+I1("",s)},"")}};const du=(e,n,s,i)=>{const r=[s,{code:n,...i||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(r,"warn","react-i18next::",!0);Tn(r[0])&&(r[0]=`react-i18next:: ${r[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...r):console?.warn&&console.warn(...r)},Xb={},Yu=(e,n,s,i)=>{Tn(s)&&Xb[s]||(Tn(s)&&(Xb[s]=new Date),du(e,n,s,i))},F1=(e,n)=>()=>{if(e.isInitialized)n();else{const s=()=>{setTimeout(()=>{e.off("initialized",s)},0),n()};e.on("initialized",s)}},ym=(e,n,s)=>{e.loadNamespaces(n,F1(e,s))},Zb=(e,n,s,i)=>{if(Tn(s)&&(s=[s]),e.options.preload&&e.options.preload.indexOf(n)>-1)return ym(e,s,i);s.forEach(r=>{e.options.ns.indexOf(r)<0&&e.options.ns.push(r)}),e.loadLanguages(n,F1(e,i))},BM=(e,n,s={})=>!n.languages||!n.languages.length?(Yu(n,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:n.languages}),!0):n.hasLoadedNamespace(e,{lng:s.lng,precheck:(i,r)=>{if(s.bindI18n&&s.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!r(i.isLanguageChangingTo,e))return!1}}),Tn=e=>typeof e=="string",ds=e=>typeof e=="object"&&e!==null,UM=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,HM={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},IM=e=>HM[e],q1=e=>e.replace(UM,IM);let xm={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:q1,transDefaultProps:void 0};const FM=(e={})=>{xm={...xm,...e}},wp=()=>xm;let $1;const qM=e=>{$1=e},Ep=()=>$1,fu=(e,n)=>{if(!e)return!1;const s=e.props?.children??e.children;return n?s.length>0:!!s},hu=e=>{if(!e)return[];const n=e.props?.children??e.children;return e.props?.i18nIsDynamicList?Ri(n):n},$M=e=>Array.isArray(e)&&e.every(x.isValidElement),Ri=e=>Array.isArray(e)?e:[e],KM=(e,n)=>{const s={...n};return s.props={...n.props,...e.props},s},YM=e=>{const n={};if(!e)return n;const s=i=>{Ri(i).forEach(c=>{Tn(c)||(fu(c)?s(hu(c)):ds(c)&&!x.isValidElement(c)&&Object.assign(n,c))})};return s(e),n},K1=(e,n,s,i)=>{if(!e)return"";let r="";const c=Ri(e),u=n?.transSupportBasicHtmlNodes?n.transKeepBasicHtmlNodesFor??[]:[];return c.forEach((d,f)=>{if(Tn(d)){r+=`${d}`;return}if(x.isValidElement(d)){const{props:h,type:y}=d,g=Object.keys(h).length,b=u.indexOf(y)>-1,w=h.children;if(!w&&b&&!g){r+=`<${y}/>`;return}if(!w&&(!b||g)||h.i18nIsDynamicList){r+=`<${f}></${f}>`;return}if(b&&g===1&&Tn(w)){r+=`<${y}>${w}</${y}>`;return}const E=K1(w,n,s,i);r+=`<${f}>${E}</${f}>`;return}if(d===null){du(s,"TRANS_NULL_VALUE","Passed in a null value as child",{i18nKey:i});return}if(ds(d)){const{format:h,...y}=d,g=Object.keys(y);if(g.length===1){const b=h?`${g[0]}, ${h}`:g[0];r+=`{{${b}}}`;return}du(s,"TRANS_INVALID_OBJ","Invalid child - Object should only have keys {{ value, format }} (format is optional).",{i18nKey:i,child:d});return}du(s,"TRANS_INVALID_VAR","Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.",{i18nKey:i,child:d})}),r},GM=(e,n=[],s={})=>{if(!e)return e;const i=Object.keys(s),r=[...n,...i];let c="",u=0;for(;u<e.length;)if(e[u]==="<"){let d=!1;const f=e.slice(u).match(/^<\/(\d+|[a-zA-Z][a-zA-Z0-9_-]*)>/);if(f){const h=f[1];(/^\d+$/.test(h)||r.includes(h))&&(d=!0,c+=f[0],u+=f[0].length)}if(!d){const h=e.slice(u).match(/^<(\d+|[a-zA-Z][a-zA-Z0-9_-]*)(\s+[\w-]+(?:=(?:"[^"]*"|'[^']*'|[^\s>]+))?)*\s*(\/)?>/);if(h){const y=h[1];(/^\d+$/.test(y)||r.includes(y))&&(d=!0,c+=h[0],u+=h[0].length)}}d||(c+="&lt;",u+=1)}else c+=e[u],u+=1;return c},XM=(e,n,s,i,r,c,u)=>{if(s==="")return[];const d=r.transKeepBasicHtmlNodesFor||[],f=s&&new RegExp(d.map(N=>`<${N}`).join("|")).test(s);if(!e&&!n&&!f&&!u)return[s];const h=n??{},y=N=>{Ri(N).forEach(_=>{Tn(_)||(fu(_)?y(hu(_)):ds(_)&&!x.isValidElement(_)&&Object.assign(h,_))})};y(e);const g=GM(s,d,h),b=VM.parse(`<0>${g}</0>`),w={...h,...c},E=(N,R,_)=>{const M=hu(N),U=A(M,R.children,_);return $M(M)&&U.length===0||N.props?.i18nIsDynamicList?M:U},C=(N,R,_,M,U)=>{N.dummy?(N.children=R,_.push(x.cloneElement(N,{key:M},U?void 0:R))):_.push(...x.Children.map([N],L=>{const O="data-i18n-is-dynamic-list",K={key:M,[O]:void 0};return L&&L.props&&Object.keys(L.props).forEach(Z=>{Z==="ref"||Z==="children"||Z==="i18nIsDynamicList"||Z===O||(K[Z]=L.props[Z])}),x.cloneElement(L,K,U?null:R)}))},A=(N,R,_)=>{const M=Ri(N);return Ri(R).reduce((L,O,K)=>{const Z=O.children?.[0]?.content&&i.services.interpolator.interpolate(O.children[0].content,w,i.language);if(O.type==="tag"){let J=M[parseInt(O.name,10)];!J&&n&&(J=n[O.name]),_.length===1&&!J&&(J=_[0][O.name]),J||(J={});const se={...O.attrs};u&&Object.keys(se).forEach(V=>{const oe=se[V];Tn(oe)&&(se[V]=q1(oe))});const I=Object.keys(se).length!==0?KM({props:se},J):J,ne=x.isValidElement(I),le=ne&&fu(O,!0)&&!O.voidElement,D=f&&ds(I)&&I.dummy&&!ne,H=ds(n)&&Object.hasOwnProperty.call(n,O.name);if(Tn(I)){const V=i.services.interpolator.interpolate(I,w,i.language);L.push(V)}else if(fu(I)||le){const V=E(I,O,_);C(I,V,L,K)}else if(D){const V=A(M,O.children,_);C(I,V,L,K)}else if(Number.isNaN(parseFloat(O.name)))if(H){const V=E(I,O,_);C(I,V,L,K,O.voidElement)}else if(r.transSupportBasicHtmlNodes&&d.indexOf(O.name)>-1)if(O.voidElement)L.push(x.createElement(O.name,{key:`${O.name}-${K}`}));else{const V=A(M,O.children,_);L.push(x.createElement(O.name,{key:`${O.name}-${K}`},V))}else if(O.voidElement)L.push(`<${O.name} />`);else{const V=A(M,O.children,_);L.push(`<${O.name}>${V}</${O.name}>`)}else if(ds(I)&&!ne){const V=O.children[0]?Z:null;V&&L.push(V)}else C(I,Z,L,K,O.children.length!==1||!Z)}else if(O.type==="text"){const J=r.transWrapTextNodes,se=typeof r.unescape=="function"?r.unescape:wp().unescape,I=u?se(i.services.interpolator.interpolate(O.content,w,i.language)):i.services.interpolator.interpolate(O.content,w,i.language);J?L.push(x.createElement(J,{key:`${O.name}-${K}`},I)):L.push(I)}return L},[])},T=A([{dummy:!0,children:e||[]}],b,Ri(e||[]));return hu(T[0])},Y1=(e,n,s)=>{const i=e.key||n,r=x.cloneElement(e,{key:i});if(!r.props||!r.props.children||s.indexOf(`${n}/>`)<0&&s.indexOf(`${n} />`)<0)return r;function c(){return x.createElement(x.Fragment,null,r)}return x.createElement(c,{key:i})},ZM=(e,n)=>e.map((s,i)=>Y1(s,i,n)),QM=(e,n)=>{const s={};return Object.keys(e).forEach(i=>{Object.assign(s,{[i]:Y1(e[i],i,n)})}),s},JM=(e,n,s,i)=>e?Array.isArray(e)?ZM(e,n):ds(e)?QM(e,n):(Yu(s,"TRANS_INVALID_COMPONENTS",'<Trans /> "components" prop expects an object or array',{i18nKey:i}),null):null,WM=e=>!ds(e)||Array.isArray(e)?!1:Object.keys(e).reduce((n,s)=>n&&Number.isNaN(Number.parseFloat(s)),!0);function e2({children:e,count:n,parent:s,i18nKey:i,context:r,tOptions:c={},values:u,defaults:d,components:f,ns:h,i18n:y,t:g,shouldUnescape:b,...w}){const E=y||Ep();if(!E)return Yu(E,"NO_I18NEXT_INSTANCE","Trans: You need to pass in an i18next instance using i18nextReactModule",{i18nKey:i}),e;const C=g||E.t.bind(E)||(ue=>ue),A={...wp(),...E.options?.react};let T=h||C.ns||E.options?.defaultNS;T=Tn(T)?[T]:T||["translation"];const{transDefaultProps:N}=A,R=N?.tOptions?{...N.tOptions,...c}:c,_=b??N?.shouldUnescape,M=N?.values?{...N.values,...u}:u,U=N?.components?{...N.components,...f}:f,L=K1(e,A,E,i),O=d||R?.defaultValue||L||A.transEmptyNodeValue||(typeof i=="function"?Tu(i):i),{hashTransKey:K}=A,Z=i||(K?K(L||O):L||O);E.options?.interpolation?.defaultVariables?u=M&&Object.keys(M).length>0?{...M,...E.options.interpolation.defaultVariables}:{...E.options.interpolation.defaultVariables}:u=M;const J=YM(e);J&&typeof J.count=="number"&&n===void 0&&(n=J.count);const se=u||n!==void 0&&!E.options?.interpolation?.alwaysFormat||!e?R.interpolation:{interpolation:{...R.interpolation,prefix:"#$?",suffix:"?$#"}},I={...R,context:r||R.context,count:n,...u,...se,defaultValue:O,ns:T};let ne=Z?C(Z,I):O;ne===Z&&O&&(ne=O);const le=JM(U,ne,E,i);let D=le||e,H=null;WM(le)&&(H=le,D=e);const V=XM(D,H,ne,E,A,I,_),oe=s??A.defaultTransParent;return oe?x.createElement(oe,w,V):V}const t2={type:"3rdParty",init(e){FM(e.options.react),qM(e)}},G1=x.createContext();class n2{constructor(){this.usedNamespaces={}}addUsedNamespaces(n){n.forEach(s=>{this.usedNamespaces[s]||(this.usedNamespaces[s]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}function Qb({children:e,count:n,parent:s,i18nKey:i,context:r,tOptions:c={},values:u,defaults:d,components:f,ns:h,i18n:y,t:g,shouldUnescape:b,...w}){const{i18n:E,defaultNS:C}=x.useContext(G1)||{},A=y||E||Ep(),T=g||A?.t.bind(A);return e2({children:e,count:n,parent:s,i18nKey:i,context:r,tOptions:c,values:u,defaults:d,components:f,ns:h||T?.ns||C||A?.options?.defaultNS,i18n:A,t:g,shouldUnescape:b,...w})}var kh={exports:{}},Lh={};var Jb;function a2(){if(Jb)return Lh;Jb=1;var e=Fu();function n(g,b){return g===b&&(g!==0||1/g===1/b)||g!==g&&b!==b}var s=typeof Object.is=="function"?Object.is:n,i=e.useState,r=e.useEffect,c=e.useLayoutEffect,u=e.useDebugValue;function d(g,b){var w=b(),E=i({inst:{value:w,getSnapshot:b}}),C=E[0].inst,A=E[1];return c(function(){C.value=w,C.getSnapshot=b,f(C)&&A({inst:C})},[g,w,b]),r(function(){return f(C)&&A({inst:C}),g(function(){f(C)&&A({inst:C})})},[g]),u(w),w}function f(g){var b=g.getSnapshot;g=g.value;try{var w=b();return!s(g,w)}catch{return!0}}function h(g,b){return b()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:d;return Lh.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y,Lh}var Wb;function s2(){return Wb||(Wb=1,kh.exports=a2()),kh.exports}var i2=s2();const o2=(e,n)=>Tn(n)?n:ds(n)&&Tn(n.defaultValue)?n.defaultValue:Array.isArray(e)?e[e.length-1]:e,r2={t:o2,ready:!1},l2=()=>()=>{},qe=(e,n={})=>{const{i18n:s}=n,{i18n:i,defaultNS:r}=x.useContext(G1)||{},c=s||i||Ep();c&&!c.reportNamespaces&&(c.reportNamespaces=new n2),c||Yu(c,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const u=x.useMemo(()=>({...wp(),...c?.options?.react,...n}),[c,n]),{useSuspense:d,keyPrefix:f}=u,h=r||c?.options?.defaultNS,y=Tn(h)?[h]:h||["translation"],g=x.useMemo(()=>y,y);c?.reportNamespaces?.addUsedNamespaces?.(g);const b=x.useRef(0),w=x.useCallback(K=>{if(!c)return l2;const{bindI18n:Z,bindI18nStore:J}=u,se=()=>{b.current+=1,K()};return Z&&c.on(Z,se),J&&c.store.on(J,se),()=>{Z&&Z.split(" ").forEach(I=>c.off(I,se)),J&&J.split(" ").forEach(I=>c.store.off(I,se))}},[c,u]),E=x.useRef(),C=x.useCallback(()=>{if(!c)return r2;const K=!!(c.isInitialized||c.initializedStoreOnce)&&g.every(le=>BM(le,c,u)),Z=n.lng||c.language,J=b.current,se=E.current;if(se&&se.ready===K&&se.lng===Z&&se.keyPrefix===f&&se.revision===J)return se;const ne={t:c.getFixedT(Z,u.nsMode==="fallback"?g:g[0],f),ready:K,lng:Z,keyPrefix:f,revision:J};return E.current=ne,ne},[c,g,f,u,n.lng]),[A,T]=x.useState(0),{t:N,ready:R}=i2.useSyncExternalStore(w,C,C);x.useEffect(()=>{if(c&&!R&&!d){const K=()=>T(Z=>Z+1);n.lng?Zb(c,n.lng,g,K):ym(c,g,K)}},[c,n.lng,g,R,d,A]);const _=c||{},M=x.useRef(null),U=x.useRef(),L=K=>{const Z=Object.getOwnPropertyDescriptors(K);Z.__original&&delete Z.__original;const J=Object.create(Object.getPrototypeOf(K),Z);if(!Object.prototype.hasOwnProperty.call(J,"__original"))try{Object.defineProperty(J,"__original",{value:K,writable:!1,enumerable:!1,configurable:!1})}catch{}return J},O=x.useMemo(()=>{const K=_,Z=K?.language;let J=K;K&&(M.current&&M.current.__original===K?U.current!==Z?(J=L(K),M.current=J,U.current=Z):J=M.current:(J=L(K),M.current=J,U.current=Z));const se=[N,J,R];return se.t=N,se.i18n=J,se.ready=R,se},[N,_,R,_.resolvedLanguage,_.language,_.languages]);if(c&&d&&!R)throw new Promise(K=>{const Z=()=>K();n.lng?Zb(c,n.lng,g,Z):ym(c,g,Z)});return O},c2={title:"Copilot API Admin",language:"Language"},u2={enUS:"English",zhCN:"简体中文"},d2={accounts:"Accounts",requests:"Requests",models:"Models",settings:"Settings",openNavigation:"Open navigation"},f2={label:"Theme",system:"System",light:"Light",dark:"Dark"},h2={label:"Motion",magic:"Magic",subtle:"Subtle",off:"Off",reducedMotionEnabled:"Reduced motion is enabled in system settings"},m2={set:"set",unset:"unset",test:"Test",testing:"Testing...",clear:"Clear",save:"Save",saving:"Saving...",refresh:"Refresh",refreshing:"Refreshing...",retry:"Retry",errors:"Errors",tokens:"Tokens",failed:"Failed",errorRate:"Error rate",tokensPerRequest:"Tokens / req",avgDurationMs:"Avg duration (ms)",lastRequest:"Last req",account:"Account",status:"Status",avgMs:"Avg ms",clearFilter:"Clear filter",statusFailed:"failed",statusOk:"ok",used:"Used",remaining:"Remaining",unlimited:"unlimited",apply:"Apply",any:"(any)",yes:"yes",no:"no",from:"From",to:"To",time:"Time",path:"Path",endpoint:"Endpoint",model:"Model",cost:"Cost",quota:"Quota",durationAbbrev:"Dur",loading:"Loading...",loadMore:"Load more",noMore:"No more",clearFilters:"Clear filters",back:"Back",download:"Download",copyJson:"Copy JSON"},p2={trigger:"Token",title:"Admin token",description:"Used as <1>x-admin-token</1> when calling <3>/api/admin/*</3>. Stored in <5>localStorage</5>.",inputPlaceholder:"Enter token",remoteNote:"If the server is not running on localhost, you must set <1>ADMIN_TOKEN</1> on the server to enable remote access.",connected:"Connected: DB v{{version}} · {{path}}",validation:{empty:"Token cannot be empty."},toast:{adminApiOk:"Admin API access OK",adminApiFailed:"Admin API access failed",tokenSaved:"Token saved",tokenCleared:"Token cleared"}},g2={loadFailedTitle:"Failed to load accounts",statsWindowLabel:"Stats window",window:{last24h:"Last 24h",last7d:"Last 7d",thisMonth:"This month"},dbInfo:"DB v{{version}} · {{path}}",tableDescription:"Click an account to filter requests.",filterAccountPlaceholder:"Filter account",premiumReq:"Premium req",empty:{noAccountsTitle:"No accounts",noMatchesTitle:"No matches",noAccountsDescription:"No accounts found.",noMatchesDescription:"No accounts match the current filter."},premiumQuotaUsedAria:"Premium interactions quota used"},v2={loadFailedTitle:"Failed to load requests",description:"Filter and inspect recent requests.",tabs:{quick:"Quick",advanced:"Advanced"},filters:{timeRange:"Time range",hasError:"Has error",upstreamModel:"Upstream model",clientModel:"Client model"},timeRange:{last15m:"Last 15m",last1h:"Last 1h",last6h:"Last 6h",last24h:"Last 24h",last7d:"Last 7d",custom:"Custom..."},validation:{title:"Invalid time range",fromMsMustBeNumber:"from_ms must be a number (milliseconds)",toMsMustBeNumber:"to_ms must be a number (milliseconds)",fromMsMustBeLteToMs:"from_ms must be <= to_ms"},empty:{noRequestsTitle:"No requests",noResultsForFilters:"No results for the current filters.",noRequestsFound:"No requests found."}},y2={title:"Models",description:"View available models and their metadata.",totalCount:"{{count}} models",loadFailedTitle:"Failed to load models",toast:{loadFailed:"Failed to load models"},columns:{name:"Model",endpoints:"Endpoints",originalId:"Model ID",aliases:"Aliases",context:"Context",features:"Features",multiplier:"Multiplier"},contextTooltip:"↓ Max input tokens: {{input}} | ↑ Max output tokens: {{output}}",badges:{preview:"preview",premium:"premium"},features:{tools:"tools",vision:"vision",structuredOutputs:"structured",streaming:"streaming",parallelTools:"parallel tools"},empty:{title:"No models",description:"No models found."}},x2={loadFailedTitle:"Failed to load request",title:"Request",notFoundTitle:"Request not found",notFoundDescription:"Request not found.",summaryTitle:"Summary",rawTitle:"Raw",rawDescription:"Full record as JSON.",searchPlaceholder:"Search key/value",toast:{copiedJson:"Copied JSON",copyFailed:"Copy failed",downloadedJson:"Downloaded JSON",downloadFailed:"Download failed"},fields:{time:"time",path:"path",endpoint:"endpoint",account:"account",userId:"user_id",safetyIdentifier:"safety_identifier",promptCacheKey:"prompt_cache_key",initiator:"initiator",upstreamRequestId:"upstream_request_id",model:"model",client:"client",tokens:"tokens",quota:"quota"},badges:{durMs:"dur_ms",ttfbMs:"ttfb_ms"},tokens:{in:"in",out:"out",total:"total",cached:"cached"},quota:{before:"before",after:"after",diff:"diff"}},b2={expand:"Expand",collapse:"Collapse",root:"(root)",more:"… {{count}} more",arrayLabel:"Array({{count}})",objectLabel:"Object({{count}})",expandAll:"Expand all",collapseAll:"Collapse all",statusCollapsed:"collapsed",statusExpanded:"expanded",statusDepth:"depth<{{depth}}"},S2={subtitle:"Manage server configuration and feature flags.",configPath:"Config path: {{path}}",note:"Changes take effect after saving.",errorTitle:"Failed to load settings",sections:{general:"General",loadBalancing:"Load balancing",reasoning:"Reasoning",aliases:"Aliases",prompts:"Prompts",advanced:"Advanced"},navigation:{ariaLabel:"Settings sections"},saveButton:{saving:"Saving...",saveChanges:"Save changes"},toast:{loadModelsFailed:"Failed to load models",loadConfigFailed:"Failed to load config",configSaved:"Config saved",saveConfigFailed:"Failed to save config"},common:{defaultOption:"(default)",customModel:"Custom: {{value}}",remove:"Remove",allow:"allow",block:"block",jsonMode:"JSON mode",invalidJsonTitle:"Invalid JSON",selectModelPlaceholder:"Select model",noModelsAvailable:"No models available"},general:{title:"General",description:"Basic configuration.",smallModel:"Small model",smallModelManual:"Small model (manual)",smallModelPlaceholder:"Select small model",smallModelInputPlaceholder:"gpt-5-mini",smallModelHint:"Controls which model receives lightweight/free requests when routing.",apiKeysLabel:"API keys",apiKeysPlaceholder:"one key per line",apiKeysHint:"One key per line (or comma-separated). Leave empty to disable request authentication.",legacyAuthNote:"Legacy fallback remains enabled for env {{env}} or config.apiKey when auth.apiKeys is empty.",anthropicApiKeyLabel:"Anthropic API key",anthropicApiKeyPlaceholder:"sk-ant-...",anthropicApiKeyHint:"Optional. Used for exact Claude /v1/messages/count_tokens calls; without it, the server falls back to local token estimation.",anthropicApiKeyEnvNote:"Runtime fallback remains available through env {{env}}. Leaving this field empty does not override a server-side environment variable.",showAnthropicApiKey:"Show",hideAnthropicApiKey:"Hide"},loadBalancing:{title:"Load balancing",description:"Toggle free account load balancing.",freeModelLabel:"Free model request load balancing",freeModelHint:"When enabled, downstream requests for free models are distributed across multiple upstream accounts."},reasoning:{title:"Reasoning efforts",description:"Override model reasoning effort levels.",hint:"Define per-model reasoning effort (optional).",jsonPlaceholder:'{ "gpt-5-mini": "low" }',emptyState:"No reasoning overrides. Add a model below.",itemHint:"Overrides reasoning effort for this model.",addButton:"Add model override"},prompts:{title:"Extra prompts",description:"Inject extra system prompts per model.",hint:"Add or edit prompt snippets injected for specific models.",jsonPlaceholder:'{ "gpt-5-mini": "..." }',emptyState:"No extra prompts configured.",promptPlaceholder:"System prompt snippet...",itemHint:"Adds prompt content before model execution.",addButton:"Add prompt"},aliases:{title:"Model aliases",description:"Map friendly alias names to upstream model IDs.",defaultBehaviorHint:"Default behavior: {{behavior}} original model IDs. Each alias can override this setting.",jsonPlaceholder:'{ "fast": { "target": "gpt-5-mini", "allowOriginal": true } }',aliasPlaceholder:"Alias",selectTargetPlaceholder:"Select target model",selectOption:"(select)",originalModelPlaceholder:"Original model ID",useDefault:"Use default",allowOriginal:"Allow original model ID",blockOriginal:"Block original model ID",emptyState:"No model aliases configured.",addButton:"Add alias"},advanced:{title:"Advanced",description:"Feature flags and experimental toggles.",modelRefreshIntervalLabel:"Model refresh interval (hours)",modelRefreshIntervalHint:"Set to 0 to disable automatic refresh.",modelRefreshIntervalError:"Must be a non-negative number.",allowOriginalModelNamesLabel:"Allow original model names",allowOriginalModelNamesHint:"Default behavior when aliases do not override original model IDs.",useFunctionApplyPatchLabel:"Use function apply_patch",useFunctionApplyPatchHint:"Enables function-level patches in responses routing.",forceAgentLabel:"Force agent header",forceAgentHint:"Affects Copilot Premium request consumption counting: when off, every agent conversation request counts as 1 (same as the VS Code extension); when on, multiple requests in the same session count only once per model.",compactUseSmallModelLabel:"Compact uses small model",compactUseSmallModelHint:"When enabled, compact requests use the configured smallModel; otherwise they use the requested model.",messageStartInputTokensFallbackLabel:"Estimate input tokens at stream start",messageStartInputTokensFallbackHint:"When enabled, estimates message_start input tokens when upstream usage is unavailable.",useMessagesApiLabel:"Enable Messages API",useMessagesApiHint:"When enabled, Claude-family models may use Copilot's native /v1/messages endpoint.",responsesApiContextManagementModelsLabel:"Responses API context_management models",responsesApiContextManagementModelsPlaceholder:"one model id per line",responsesApiContextManagementModelsHint:"List of model IDs that should receive Responses API context_management compaction instructions.",providersTitle:"Providers",providersDescription:"Configure upstream providers (currently anthropic only). Each provider key becomes a route prefix (/:provider/v1/messages).",providersIssueTitle:"Invalid providers",providersEmptyState:"No providers configured.",providersAddProvider:"Add provider",providersNamePlaceholder:"Provider key (route prefix)",providersEnabledLabel:"Enabled",providersBaseUrlLabel:"Base URL",providersBaseUrlPlaceholder:"https://api.anthropic.com",providersApiKeyLabel:"API key",providersApiKeyPlaceholder:"sk-...",providersModelsLabel:"Model defaults",providersModelsEmptyState:"No per-model defaults.",providersAddModel:"Add model",providersModelIdPlaceholder:"Model id"}},w2={title:"Not found",description:"The page you are looking for does not exist."},E2={app:c2,locale:u2,nav:d2,theme:f2,motion:h2,common:m2,tokenDialog:p2,accountsPage:g2,requestsPage:v2,modelsPage:y2,requestDetailPage:x2,jsonViewer:b2,settingsPage:S2,notFound:w2},C2={title:"Copilot API 管理后台",language:"语言"},T2={enUS:"English",zhCN:"简体中文"},A2={accounts:"账号",requests:"请求",models:"模型",settings:"设置",openNavigation:"打开导航"},j2={label:"主题",system:"跟随系统",light:"浅色",dark:"深色"},N2={label:"动效",magic:"炫酷",subtle:"柔和",off:"关闭",reducedMotionEnabled:"系统设置已启用减少动态效果"},R2={set:"已设置",unset:"未设置",test:"测试",testing:"测试中…",clear:"清除",save:"保存",saving:"保存中…",refresh:"刷新",refreshing:"刷新中…",retry:"重试",errors:"错误",tokens:"Tokens",failed:"失败",errorRate:"错误率",tokensPerRequest:"Tokens/请求",avgDurationMs:"平均耗时(ms)",lastRequest:"最近请求",account:"账号",status:"状态",avgMs:"平均 ms",clearFilter:"清除筛选",statusFailed:"失败",statusOk:"正常",used:"已用",remaining:"剩余",unlimited:"无限",apply:"应用",any:"(任意)",yes:"是",no:"否",from:"从",to:"到",time:"时间",path:"路径",endpoint:"端点",model:"模型",cost:"成本",quota:"额度",durationAbbrev:"耗时",loading:"加载中…",loadMore:"加载更多",noMore:"没有更多",clearFilters:"清除筛选",back:"返回",download:"下载",copyJson:"复制 JSON"},M2={trigger:"Token",title:"管理 Token",description:"调用 <3>/api/admin/*</3> 时会使用 <1>x-admin-token</1> 请求头。存储在 <5>localStorage</5> 中。",inputPlaceholder:"输入 Token",remoteNote:"如果服务端不在 localhost 运行,你必须在服务端设置 <1>ADMIN_TOKEN</1> 才能启用远程访问。",connected:"已连接:DB v{{version}} · {{path}}",validation:{empty:"Token 不能为空。"},toast:{adminApiOk:"Admin API 访问正常",adminApiFailed:"Admin API 访问失败",tokenSaved:"Token 已保存",tokenCleared:"Token 已清除"}},_2={loadFailedTitle:"加载账号失败",statsWindowLabel:"统计窗口",window:{last24h:"最近 24 小时",last7d:"最近 7 天",thisMonth:"本月"},dbInfo:"DB v{{version}} · {{path}}",tableDescription:"点击账号可筛选请求。",filterAccountPlaceholder:"筛选账号",premiumReq:"Premium 请求",empty:{noAccountsTitle:"无账号",noMatchesTitle:"无匹配结果",noAccountsDescription:"未找到账号。",noMatchesDescription:"没有账号匹配当前筛选条件。"},premiumQuotaUsedAria:"Premium 交互额度使用量"},O2={loadFailedTitle:"加载请求失败",description:"筛选并查看最近的请求。",tabs:{quick:"快速",advanced:"高级"},filters:{timeRange:"时间范围",hasError:"有错误",upstreamModel:"上游模型",clientModel:"客户端模型"},timeRange:{last15m:"最近 15 分钟",last1h:"最近 1 小时",last6h:"最近 6 小时",last24h:"最近 24 小时",last7d:"最近 7 天",custom:"自定义…"},validation:{title:"时间范围无效",fromMsMustBeNumber:"from_ms 必须是数字(毫秒)",toMsMustBeNumber:"to_ms 必须是数字(毫秒)",fromMsMustBeLteToMs:"from_ms 必须 <= to_ms"},empty:{noRequestsTitle:"无请求",noResultsForFilters:"当前筛选条件下没有结果。",noRequestsFound:"未找到请求。"}},D2={title:"模型",description:"查看当前可用模型及其元数据。",totalCount:"共 {{count}} 个模型",loadFailedTitle:"加载模型失败",toast:{loadFailed:"加载模型失败"},columns:{name:"模型",endpoints:"端点",originalId:"模型ID",aliases:"别名",context:"上下文大小",features:"功能",multiplier:"乘数"},contextTooltip:"↓ 最大输入令牌数:{{input}} | ↑ 最大输出令牌数:{{output}}",badges:{preview:"预览",premium:"高级"},features:{tools:"工具",vision:"视觉",structuredOutputs:"结构化",streaming:"流式",parallelTools:"并行工具"},empty:{title:"无模型",description:"未找到模型。"}},P2={loadFailedTitle:"加载请求详情失败",title:"请求",notFoundTitle:"请求不存在",notFoundDescription:"请求不存在。",summaryTitle:"摘要",rawTitle:"原始数据",rawDescription:"完整记录(JSON)。",searchPlaceholder:"搜索键/值",toast:{copiedJson:"已复制 JSON",copyFailed:"复制失败",downloadedJson:"已下载 JSON",downloadFailed:"下载失败"},fields:{time:"时间",path:"路径",endpoint:"端点",account:"账号",userId:"user_id",safetyIdentifier:"safety_identifier",promptCacheKey:"prompt_cache_key",initiator:"initiator",upstreamRequestId:"upstream_request_id",model:"模型",client:"客户端",tokens:"tokens",quota:"额度"},badges:{durMs:"dur_ms",ttfbMs:"ttfb_ms"},tokens:{in:"输入",out:"输出",total:"总计",cached:"缓存"},quota:{before:"之前",after:"之后",diff:"变化"}},k2={expand:"展开",collapse:"折叠",root:"(根)",more:"… 还有 {{count}} 项",arrayLabel:"数组({{count}})",objectLabel:"对象({{count}})",expandAll:"全部展开",collapseAll:"全部折叠",statusCollapsed:"已折叠",statusExpanded:"已展开",statusDepth:"层级<{{depth}}"},L2={subtitle:"管理服务端配置和功能开关。",configPath:"配置路径:{{path}}",note:"更改在保存后生效。",errorTitle:"加载设置失败",sections:{general:"通用",loadBalancing:"负载均衡",reasoning:"推理",aliases:"别名",prompts:"提示词",advanced:"高级"},navigation:{ariaLabel:"设置分区"},saveButton:{saving:"保存中…",saveChanges:"保存更改"},toast:{loadModelsFailed:"加载模型失败",loadConfigFailed:"加载配置失败",configSaved:"配置已保存",saveConfigFailed:"保存配置失败"},common:{defaultOption:"(默认)",customModel:"自定义:{{value}}",remove:"移除",allow:"允许",block:"阻止",jsonMode:"JSON 模式",invalidJsonTitle:"无效的 JSON",selectModelPlaceholder:"选择模型",noModelsAvailable:"没有可用模型"},general:{title:"通用",description:"基础配置。",smallModel:"小模型",smallModelManual:"小模型(手动)",smallModelPlaceholder:"选择小模型",smallModelInputPlaceholder:"gpt-5-mini",smallModelHint:"控制路由时接收轻量/免费请求的模型。",apiKeysLabel:"API 密钥列表",apiKeysPlaceholder:"每行一个密钥",apiKeysHint:"支持每行一个或逗号分隔;留空表示关闭请求鉴权。",legacyAuthNote:"当 auth.apiKeys 为空时,仍会回退使用环境变量 {{env}} 或 config.apiKey(兼容旧配置)。",anthropicApiKeyLabel:"Anthropic API Key",anthropicApiKeyPlaceholder:"sk-ant-...",anthropicApiKeyHint:"可选。用于 Claude `/v1/messages/count_tokens` 的精确计数;未配置时,服务端会回退到本地 token 估算。",anthropicApiKeyEnvNote:"运行时仍可通过环境变量 {{env}} 回退提供。将此输入框留空并不会覆盖服务端已设置的环境变量。",showAnthropicApiKey:"显示",hideAnthropicApiKey:"隐藏"},loadBalancing:{title:"负载均衡",description:"切换免费账号负载均衡。",freeModelLabel:"免费模型请求负载均衡",freeModelHint:"启用后,当下游请求免费模型时,请求会在多个可用上游账号之间分配。"},reasoning:{title:"推理强度",description:"覆盖模型的推理强度等级。",hint:"定义每个模型的推理强度(可选)。",jsonPlaceholder:'{ \\"gpt-5-mini\\": \\"low\\" }',emptyState:"没有推理覆盖。请在下方添加模型。",itemHint:"覆盖该模型的推理强度。",addButton:"添加模型覆盖"},prompts:{title:"额外提示词",description:"为每个模型注入额外的 system prompt。",hint:"为指定模型添加或编辑注入的 prompt 片段。",jsonPlaceholder:'{ \\"gpt-5-mini\\": \\"...\\" }',emptyState:"未配置额外提示词。",promptPlaceholder:"System prompt 片段…",itemHint:"在模型执行前追加 prompt 内容。",addButton:"添加提示词"},aliases:{title:"模型别名",description:"将友好别名映射到上游模型 ID。",defaultBehaviorHint:"默认行为:{{behavior}} 原始模型 ID。每个别名可覆盖此设置。",jsonPlaceholder:'{ \\"fast\\": { \\"target\\": \\"gpt-5-mini\\", \\"allowOriginal\\": true } }',aliasPlaceholder:"别名",selectTargetPlaceholder:"选择目标模型",selectOption:"(选择)",originalModelPlaceholder:"原始模型 ID",useDefault:"使用默认值",allowOriginal:"允许原始模型 ID",blockOriginal:"阻止原始模型 ID",emptyState:"未配置模型别名。",addButton:"添加别名"},advanced:{title:"高级",description:"功能开关与实验选项。",modelRefreshIntervalLabel:"模型列表刷新间隔(小时)",modelRefreshIntervalHint:"设置为 0 表示关闭自动刷新。",modelRefreshIntervalError:"必须是非负数字。",allowOriginalModelNamesLabel:"允许原始模型名",allowOriginalModelNamesHint:"当别名未覆盖时的默认行为。",useFunctionApplyPatchLabel:"启用 function apply_patch",useFunctionApplyPatchHint:"在响应路由中启用函数级补丁。",forceAgentLabel:"强制 Agent 请求头",forceAgentHint:"影响 Copilot高级请求消耗的计次:关闭时,每次与 Agent 的对话请求都会计 1 次(与 VS Code 插件一致);开启时,同一会话内对同一模型的多次请求只计 1 次。",compactUseSmallModelLabel:"compact 使用小模型",compactUseSmallModelHint:"启用后,compact 请求使用配置的小模型;否则使用请求的模型。",messageStartInputTokensFallbackLabel:"在流开始时估算输入 tokens",messageStartInputTokensFallbackHint:"启用后,当上游 usage 不可用时,会估算 message_start 的 input tokens。",useMessagesApiLabel:"启用 Messages API",useMessagesApiHint:"启用后,支持 Copilot 原生 /v1/messages 的 Claude 系列模型将优先走 Messages API。",responsesApiContextManagementModelsLabel:"Responses API context_management 模型列表",responsesApiContextManagementModelsPlaceholder:"每行一个 model id",responsesApiContextManagementModelsHint:"这些模型将收到 Responses API 的 context_management 压缩指令。",providersTitle:"上游 Providers",providersDescription:"配置上游 provider(目前仅支持 anthropic)。每个 provider key 会作为路由前缀(/:provider/v1/messages)。",providersIssueTitle:"Providers 配置无效",providersEmptyState:"未配置 providers。",providersAddProvider:"添加 provider",providersNamePlaceholder:"Provider key(路由前缀)",providersEnabledLabel:"启用",providersBaseUrlLabel:"Base URL",providersBaseUrlPlaceholder:"https://api.anthropic.com",providersApiKeyLabel:"API Key",providersApiKeyPlaceholder:"sk-...",providersModelsLabel:"模型默认参数",providersModelsEmptyState:"未配置按模型的默认参数。",providersAddModel:"添加模型",providersModelIdPlaceholder:"Model id"}},z2={title:"未找到页面",description:"你访问的页面不存在。"},V2={app:C2,locale:T2,nav:A2,theme:j2,motion:N2,common:R2,tokenDialog:M2,accountsPage:_2,requestsPage:O2,modelsPage:D2,requestDetailPage:P2,jsonViewer:k2,settingsPage:L2,notFound:z2},dl="en-US",B2=["en-US","zh-CN"],X1="locale";function bm(e){if(!e)return dl;const n=e.toLowerCase().trim().replace(/_/g,"-");return n.startsWith("zh")?"zh-CN":n.startsWith("en")?"en-US":dl}function Z1(){if(typeof window>"u")return dl;try{const e=globalThis.localStorage.getItem(X1);if(e)return bm(e);const n=Array.isArray(navigator.languages)&&navigator.languages[0]||navigator.language;return bm(n)}catch{return dl}}st.use(t2).init({resources:{"en-US":{translation:E2},"zh-CN":{translation:V2}},lng:Z1(),fallbackLng:dl,supportedLngs:[...B2],interpolation:{escapeValue:!1},react:{useSuspense:!1},initImmediate:!1});const U2=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),H2=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,s,i)=>i?i.toUpperCase():s.toLowerCase()),e0=e=>{const n=H2(e);return n.charAt(0).toUpperCase()+n.slice(1)},Q1=(...e)=>e.filter((n,s,i)=>!!n&&n.trim()!==""&&i.indexOf(n)===s).join(" ").trim(),I2=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0};var F2={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const q2=x.forwardRef(({color:e="currentColor",size:n=24,strokeWidth:s=2,absoluteStrokeWidth:i,className:r="",children:c,iconNode:u,...d},f)=>x.createElement("svg",{ref:f,...F2,width:n,height:n,stroke:e,strokeWidth:i?Number(s)*24/Number(n):s,className:Q1("lucide",r),...!c&&!I2(d)&&{"aria-hidden":"true"},...d},[...u.map(([h,y])=>x.createElement(h,y)),...Array.isArray(c)?c:[c]]));const Rt=(e,n)=>{const s=x.forwardRef(({className:i,...r},c)=>x.createElement(q2,{ref:c,iconNode:n,className:Q1(`lucide-${U2(e0(e))}`,`lucide-${e}`,i),...r}));return s.displayName=e0(e),s};const $2=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],K2=Rt("arrow-left",$2);const Y2=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],G2=Rt("check",Y2);const X2=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Cp=Rt("chevron-down",X2);const Z2=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Q2=Rt("chevron-right",Z2);const J2=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],W2=Rt("chevron-up",J2);const e_=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],J1=Rt("circle-check",e_);const t_=[["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"}]],n_=Rt("download",t_);const a_=[["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"}]],s_=Rt("eye-off",a_);const i_=[["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"}]],o_=Rt("eye",i_);const r_=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],l_=Rt("globe",r_);const c_=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],W1=Rt("info",c_);const u_=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],d_=Rt("key-round",u_);const f_=[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]],h_=Rt("laptop",f_);const m_=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],p_=Rt("loader-circle",m_);const g_=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],v_=Rt("menu",g_);const y_=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],x_=Rt("moon",y_);const b_=[["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"}]],ew=Rt("octagon-x",b_);const S_=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],w_=Rt("sun",S_);const E_=[["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"}]],tw=Rt("triangle-alert",E_);const C_=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],nw=Rt("x",C_),aw=x.createContext(null),Sm="magic",T_={preference:Sm,effective:Sm,reducedMotion:!1,setPreference:()=>{}};function A_({children:e}){return x.useEffect(()=>{document.documentElement.dataset.motion=Sm},[]),m.jsx(aw.Provider,{value:T_,children:e})}function Gu(){const e=x.useContext(aw);if(!e)throw new Error("useMotionPreference must be used within MotionPreferenceProvider");return e}function sw(e){var n,s,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(n=0;n<r;n++)e[n]&&(s=sw(e[n]))&&(i&&(i+=" "),i+=s)}else for(s in e)e[s]&&(i&&(i+=" "),i+=s);return i}function iw(){for(var e,n,s=0,i="",r=arguments.length;s<r;s++)(e=arguments[s])&&(n=sw(e))&&(i&&(i+=" "),i+=n);return i}const j_=(e,n)=>{const s=new Array(e.length+n.length);for(let i=0;i<e.length;i++)s[i]=e[i];for(let i=0;i<n.length;i++)s[e.length+i]=n[i];return s},N_=(e,n)=>({classGroupId:e,validator:n}),ow=(e=new Map,n=null,s)=>({nextPart:e,validators:n,classGroupId:s}),ju="-",t0=[],R_="arbitrary..",M_=e=>{const n=O_(e),{conflictingClassGroups:s,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return __(u);const d=u.split(ju),f=d[0]===""&&d.length>1?1:0;return rw(d,f,n)},getConflictingClassGroupIds:(u,d)=>{if(d){const f=i[u],h=s[u];return f?h?j_(h,f):f:h||t0}return s[u]||t0}}},rw=(e,n,s)=>{if(e.length-n===0)return s.classGroupId;const r=e[n],c=s.nextPart.get(r);if(c){const h=rw(e,n+1,c);if(h)return h}const u=s.validators;if(u===null)return;const d=n===0?e.join(ju):e.slice(n).join(ju),f=u.length;for(let h=0;h<f;h++){const y=u[h];if(y.validator(d))return y.classGroupId}},__=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=e.slice(1,-1),s=n.indexOf(":"),i=n.slice(0,s);return i?R_+i:void 0})(),O_=e=>{const{theme:n,classGroups:s}=e;return D_(s,n)},D_=(e,n)=>{const s=ow();for(const i in e){const r=e[i];Tp(r,s,i,n)}return s},Tp=(e,n,s,i)=>{const r=e.length;for(let c=0;c<r;c++){const u=e[c];P_(u,n,s,i)}},P_=(e,n,s,i)=>{if(typeof e=="string"){k_(e,n,s);return}if(typeof e=="function"){L_(e,n,s,i);return}z_(e,n,s,i)},k_=(e,n,s)=>{const i=e===""?n:lw(n,e);i.classGroupId=s},L_=(e,n,s,i)=>{if(V_(e)){Tp(e(i),n,s,i);return}n.validators===null&&(n.validators=[]),n.validators.push(N_(s,e))},z_=(e,n,s,i)=>{const r=Object.entries(e),c=r.length;for(let u=0;u<c;u++){const[d,f]=r[u];Tp(f,lw(n,d),s,i)}},lw=(e,n)=>{let s=e;const i=n.split(ju),r=i.length;for(let c=0;c<r;c++){const u=i[c];let d=s.nextPart.get(u);d||(d=ow(),s.nextPart.set(u,d)),s=d}return s},V_=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,B_=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,s=Object.create(null),i=Object.create(null);const r=(c,u)=>{s[c]=u,n++,n>e&&(n=0,i=s,s=Object.create(null))};return{get(c){let u=s[c];if(u!==void 0)return u;if((u=i[c])!==void 0)return r(c,u),u},set(c,u){c in s?s[c]=u:r(c,u)}}},wm="!",n0=":",U_=[],a0=(e,n,s,i,r)=>({modifiers:e,hasImportantModifier:n,baseClassName:s,maybePostfixModifierPosition:i,isExternal:r}),H_=e=>{const{prefix:n,experimentalParseClassName:s}=e;let i=r=>{const c=[];let u=0,d=0,f=0,h;const y=r.length;for(let C=0;C<y;C++){const A=r[C];if(u===0&&d===0){if(A===n0){c.push(r.slice(f,C)),f=C+1;continue}if(A==="/"){h=C;continue}}A==="["?u++:A==="]"?u--:A==="("?d++:A===")"&&d--}const g=c.length===0?r:r.slice(f);let b=g,w=!1;g.endsWith(wm)?(b=g.slice(0,-1),w=!0):g.startsWith(wm)&&(b=g.slice(1),w=!0);const E=h&&h>f?h-f:void 0;return a0(c,w,b,E)};if(n){const r=n+n0,c=i;i=u=>u.startsWith(r)?c(u.slice(r.length)):a0(U_,!1,u,void 0,!0)}if(s){const r=i;i=c=>s({className:c,parseClassName:r})}return i},I_=e=>{const n=new Map;return e.orderSensitiveModifiers.forEach((s,i)=>{n.set(s,1e6+i)}),s=>{const i=[];let r=[];for(let c=0;c<s.length;c++){const u=s[c],d=u[0]==="[",f=n.has(u);d||f?(r.length>0&&(r.sort(),i.push(...r),r=[]),i.push(u)):r.push(u)}return r.length>0&&(r.sort(),i.push(...r)),i}},F_=e=>({cache:B_(e.cacheSize),parseClassName:H_(e),sortModifiers:I_(e),...M_(e)}),q_=/\s+/,$_=(e,n)=>{const{parseClassName:s,getClassGroupId:i,getConflictingClassGroupIds:r,sortModifiers:c}=n,u=[],d=e.trim().split(q_);let f="";for(let h=d.length-1;h>=0;h-=1){const y=d[h],{isExternal:g,modifiers:b,hasImportantModifier:w,baseClassName:E,maybePostfixModifierPosition:C}=s(y);if(g){f=y+(f.length>0?" "+f:f);continue}let A=!!C,T=i(A?E.substring(0,C):E);if(!T){if(!A){f=y+(f.length>0?" "+f:f);continue}if(T=i(E),!T){f=y+(f.length>0?" "+f:f);continue}A=!1}const N=b.length===0?"":b.length===1?b[0]:c(b).join(":"),R=w?N+wm:N,_=R+T;if(u.indexOf(_)>-1)continue;u.push(_);const M=r(T,A);for(let U=0;U<M.length;++U){const L=M[U];u.push(R+L)}f=y+(f.length>0?" "+f:f)}return f},K_=(...e)=>{let n=0,s,i,r="";for(;n<e.length;)(s=e[n++])&&(i=cw(s))&&(r&&(r+=" "),r+=i);return r},cw=e=>{if(typeof e=="string")return e;let n,s="";for(let i=0;i<e.length;i++)e[i]&&(n=cw(e[i]))&&(s&&(s+=" "),s+=n);return s},Y_=(e,...n)=>{let s,i,r,c;const u=f=>{const h=n.reduce((y,g)=>g(y),e());return s=F_(h),i=s.cache.get,r=s.cache.set,c=d,d(f)},d=f=>{const h=i(f);if(h)return h;const y=$_(f,s);return r(f,y),y};return c=u,(...f)=>c(K_(...f))},G_=[],kt=e=>{const n=s=>s[e]||G_;return n.isThemeGetter=!0,n},uw=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,dw=/^\((?:(\w[\w-]*):)?(.+)\)$/i,X_=/^\d+\/\d+$/,Z_=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Q_=/\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$/,J_=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,W_=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,eO=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ro=e=>X_.test(e),Oe=e=>!!e&&!Number.isNaN(Number(e)),Ys=e=>!!e&&Number.isInteger(Number(e)),zh=e=>e.endsWith("%")&&Oe(e.slice(0,-1)),ls=e=>Z_.test(e),tO=()=>!0,nO=e=>Q_.test(e)&&!J_.test(e),fw=()=>!1,aO=e=>W_.test(e),sO=e=>eO.test(e),iO=e=>!ge(e)&&!ve(e),oO=e=>Go(e,pw,fw),ge=e=>uw.test(e),Ti=e=>Go(e,gw,nO),Vh=e=>Go(e,dO,Oe),s0=e=>Go(e,hw,fw),rO=e=>Go(e,mw,sO),Xc=e=>Go(e,vw,aO),ve=e=>dw.test(e),Qr=e=>Xo(e,gw),lO=e=>Xo(e,fO),i0=e=>Xo(e,hw),cO=e=>Xo(e,pw),uO=e=>Xo(e,mw),Zc=e=>Xo(e,vw,!0),Go=(e,n,s)=>{const i=uw.exec(e);return i?i[1]?n(i[1]):s(i[2]):!1},Xo=(e,n,s=!1)=>{const i=dw.exec(e);return i?i[1]?n(i[1]):s:!1},hw=e=>e==="position"||e==="percentage",mw=e=>e==="image"||e==="url",pw=e=>e==="length"||e==="size"||e==="bg-size",gw=e=>e==="length",dO=e=>e==="number",fO=e=>e==="family-name",vw=e=>e==="shadow",hO=()=>{const e=kt("color"),n=kt("font"),s=kt("text"),i=kt("font-weight"),r=kt("tracking"),c=kt("leading"),u=kt("breakpoint"),d=kt("container"),f=kt("spacing"),h=kt("radius"),y=kt("shadow"),g=kt("inset-shadow"),b=kt("text-shadow"),w=kt("drop-shadow"),E=kt("blur"),C=kt("perspective"),A=kt("aspect"),T=kt("ease"),N=kt("animate"),R=()=>["auto","avoid","all","avoid-page","page","left","right","column"],_=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],M=()=>[..._(),ve,ge],U=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto","contain","none"],O=()=>[ve,ge,f],K=()=>[Ro,"full","auto",...O()],Z=()=>[Ys,"none","subgrid",ve,ge],J=()=>["auto",{span:["full",Ys,ve,ge]},Ys,ve,ge],se=()=>[Ys,"auto",ve,ge],I=()=>["auto","min","max","fr",ve,ge],ne=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],le=()=>["start","end","center","stretch","center-safe","end-safe"],D=()=>["auto",...O()],H=()=>[Ro,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...O()],V=()=>[e,ve,ge],oe=()=>[..._(),i0,s0,{position:[ve,ge]}],ue=()=>["no-repeat",{repeat:["","x","y","space","round"]}],P=()=>["auto","cover","contain",cO,oO,{size:[ve,ge]}],X=()=>[zh,Qr,Ti],G=()=>["","none","full",h,ve,ge],te=()=>["",Oe,Qr,Ti],ce=()=>["solid","dashed","dotted","double"],me=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ae=()=>[Oe,zh,i0,s0],de=()=>["","none",E,ve,ge],we=()=>["none",Oe,ve,ge],Te=()=>["none",Oe,ve,ge],Ne=()=>[Oe,ve,ge],_e=()=>[Ro,"full",...O()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ls],breakpoint:[ls],color:[tO],container:[ls],"drop-shadow":[ls],ease:["in","out","in-out"],font:[iO],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ls],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ls],shadow:[ls],spacing:["px",Oe],text:[ls],"text-shadow":[ls],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ro,ge,ve,A]}],container:["container"],columns:[{columns:[Oe,ge,ve,d]}],"break-after":[{"break-after":R()}],"break-before":[{"break-before":R()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:M()}],overflow:[{overflow:U()}],"overflow-x":[{"overflow-x":U()}],"overflow-y":[{"overflow-y":U()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:K()}],"inset-x":[{"inset-x":K()}],"inset-y":[{"inset-y":K()}],start:[{start:K()}],end:[{end:K()}],top:[{top:K()}],right:[{right:K()}],bottom:[{bottom:K()}],left:[{left:K()}],visibility:["visible","invisible","collapse"],z:[{z:[Ys,"auto",ve,ge]}],basis:[{basis:[Ro,"full","auto",d,...O()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Oe,Ro,"auto","initial","none",ge]}],grow:[{grow:["",Oe,ve,ge]}],shrink:[{shrink:["",Oe,ve,ge]}],order:[{order:[Ys,"first","last","none",ve,ge]}],"grid-cols":[{"grid-cols":Z()}],"col-start-end":[{col:J()}],"col-start":[{"col-start":se()}],"col-end":[{"col-end":se()}],"grid-rows":[{"grid-rows":Z()}],"row-start-end":[{row:J()}],"row-start":[{"row-start":se()}],"row-end":[{"row-end":se()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":I()}],"auto-rows":[{"auto-rows":I()}],gap:[{gap:O()}],"gap-x":[{"gap-x":O()}],"gap-y":[{"gap-y":O()}],"justify-content":[{justify:[...ne(),"normal"]}],"justify-items":[{"justify-items":[...le(),"normal"]}],"justify-self":[{"justify-self":["auto",...le()]}],"align-content":[{content:["normal",...ne()]}],"align-items":[{items:[...le(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...le(),{baseline:["","last"]}]}],"place-content":[{"place-content":ne()}],"place-items":[{"place-items":[...le(),"baseline"]}],"place-self":[{"place-self":["auto",...le()]}],p:[{p:O()}],px:[{px:O()}],py:[{py:O()}],ps:[{ps:O()}],pe:[{pe:O()}],pt:[{pt:O()}],pr:[{pr:O()}],pb:[{pb:O()}],pl:[{pl:O()}],m:[{m:D()}],mx:[{mx:D()}],my:[{my:D()}],ms:[{ms:D()}],me:[{me:D()}],mt:[{mt:D()}],mr:[{mr:D()}],mb:[{mb:D()}],ml:[{ml:D()}],"space-x":[{"space-x":O()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":O()}],"space-y-reverse":["space-y-reverse"],size:[{size:H()}],w:[{w:[d,"screen",...H()]}],"min-w":[{"min-w":[d,"screen","none",...H()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[u]},...H()]}],h:[{h:["screen","lh",...H()]}],"min-h":[{"min-h":["screen","lh","none",...H()]}],"max-h":[{"max-h":["screen","lh",...H()]}],"font-size":[{text:["base",s,Qr,Ti]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,ve,Vh]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",zh,ge]}],"font-family":[{font:[lO,ge,n]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[r,ve,ge]}],"line-clamp":[{"line-clamp":[Oe,"none",ve,Vh]}],leading:[{leading:[c,...O()]}],"list-image":[{"list-image":["none",ve,ge]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ve,ge]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:V()}],"text-color":[{text:V()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ce(),"wavy"]}],"text-decoration-thickness":[{decoration:[Oe,"from-font","auto",ve,Ti]}],"text-decoration-color":[{decoration:V()}],"underline-offset":[{"underline-offset":[Oe,"auto",ve,ge]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ve,ge]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ve,ge]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:oe()}],"bg-repeat":[{bg:ue()}],"bg-size":[{bg:P()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ys,ve,ge],radial:["",ve,ge],conic:[Ys,ve,ge]},uO,rO]}],"bg-color":[{bg:V()}],"gradient-from-pos":[{from:X()}],"gradient-via-pos":[{via:X()}],"gradient-to-pos":[{to:X()}],"gradient-from":[{from:V()}],"gradient-via":[{via:V()}],"gradient-to":[{to:V()}],rounded:[{rounded:G()}],"rounded-s":[{"rounded-s":G()}],"rounded-e":[{"rounded-e":G()}],"rounded-t":[{"rounded-t":G()}],"rounded-r":[{"rounded-r":G()}],"rounded-b":[{"rounded-b":G()}],"rounded-l":[{"rounded-l":G()}],"rounded-ss":[{"rounded-ss":G()}],"rounded-se":[{"rounded-se":G()}],"rounded-ee":[{"rounded-ee":G()}],"rounded-es":[{"rounded-es":G()}],"rounded-tl":[{"rounded-tl":G()}],"rounded-tr":[{"rounded-tr":G()}],"rounded-br":[{"rounded-br":G()}],"rounded-bl":[{"rounded-bl":G()}],"border-w":[{border:te()}],"border-w-x":[{"border-x":te()}],"border-w-y":[{"border-y":te()}],"border-w-s":[{"border-s":te()}],"border-w-e":[{"border-e":te()}],"border-w-t":[{"border-t":te()}],"border-w-r":[{"border-r":te()}],"border-w-b":[{"border-b":te()}],"border-w-l":[{"border-l":te()}],"divide-x":[{"divide-x":te()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":te()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ce(),"hidden","none"]}],"divide-style":[{divide:[...ce(),"hidden","none"]}],"border-color":[{border:V()}],"border-color-x":[{"border-x":V()}],"border-color-y":[{"border-y":V()}],"border-color-s":[{"border-s":V()}],"border-color-e":[{"border-e":V()}],"border-color-t":[{"border-t":V()}],"border-color-r":[{"border-r":V()}],"border-color-b":[{"border-b":V()}],"border-color-l":[{"border-l":V()}],"divide-color":[{divide:V()}],"outline-style":[{outline:[...ce(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Oe,ve,ge]}],"outline-w":[{outline:["",Oe,Qr,Ti]}],"outline-color":[{outline:V()}],shadow:[{shadow:["","none",y,Zc,Xc]}],"shadow-color":[{shadow:V()}],"inset-shadow":[{"inset-shadow":["none",g,Zc,Xc]}],"inset-shadow-color":[{"inset-shadow":V()}],"ring-w":[{ring:te()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:V()}],"ring-offset-w":[{"ring-offset":[Oe,Ti]}],"ring-offset-color":[{"ring-offset":V()}],"inset-ring-w":[{"inset-ring":te()}],"inset-ring-color":[{"inset-ring":V()}],"text-shadow":[{"text-shadow":["none",b,Zc,Xc]}],"text-shadow-color":[{"text-shadow":V()}],opacity:[{opacity:[Oe,ve,ge]}],"mix-blend":[{"mix-blend":[...me(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":me()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Oe]}],"mask-image-linear-from-pos":[{"mask-linear-from":ae()}],"mask-image-linear-to-pos":[{"mask-linear-to":ae()}],"mask-image-linear-from-color":[{"mask-linear-from":V()}],"mask-image-linear-to-color":[{"mask-linear-to":V()}],"mask-image-t-from-pos":[{"mask-t-from":ae()}],"mask-image-t-to-pos":[{"mask-t-to":ae()}],"mask-image-t-from-color":[{"mask-t-from":V()}],"mask-image-t-to-color":[{"mask-t-to":V()}],"mask-image-r-from-pos":[{"mask-r-from":ae()}],"mask-image-r-to-pos":[{"mask-r-to":ae()}],"mask-image-r-from-color":[{"mask-r-from":V()}],"mask-image-r-to-color":[{"mask-r-to":V()}],"mask-image-b-from-pos":[{"mask-b-from":ae()}],"mask-image-b-to-pos":[{"mask-b-to":ae()}],"mask-image-b-from-color":[{"mask-b-from":V()}],"mask-image-b-to-color":[{"mask-b-to":V()}],"mask-image-l-from-pos":[{"mask-l-from":ae()}],"mask-image-l-to-pos":[{"mask-l-to":ae()}],"mask-image-l-from-color":[{"mask-l-from":V()}],"mask-image-l-to-color":[{"mask-l-to":V()}],"mask-image-x-from-pos":[{"mask-x-from":ae()}],"mask-image-x-to-pos":[{"mask-x-to":ae()}],"mask-image-x-from-color":[{"mask-x-from":V()}],"mask-image-x-to-color":[{"mask-x-to":V()}],"mask-image-y-from-pos":[{"mask-y-from":ae()}],"mask-image-y-to-pos":[{"mask-y-to":ae()}],"mask-image-y-from-color":[{"mask-y-from":V()}],"mask-image-y-to-color":[{"mask-y-to":V()}],"mask-image-radial":[{"mask-radial":[ve,ge]}],"mask-image-radial-from-pos":[{"mask-radial-from":ae()}],"mask-image-radial-to-pos":[{"mask-radial-to":ae()}],"mask-image-radial-from-color":[{"mask-radial-from":V()}],"mask-image-radial-to-color":[{"mask-radial-to":V()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":_()}],"mask-image-conic-pos":[{"mask-conic":[Oe]}],"mask-image-conic-from-pos":[{"mask-conic-from":ae()}],"mask-image-conic-to-pos":[{"mask-conic-to":ae()}],"mask-image-conic-from-color":[{"mask-conic-from":V()}],"mask-image-conic-to-color":[{"mask-conic-to":V()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:oe()}],"mask-repeat":[{mask:ue()}],"mask-size":[{mask:P()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ve,ge]}],filter:[{filter:["","none",ve,ge]}],blur:[{blur:de()}],brightness:[{brightness:[Oe,ve,ge]}],contrast:[{contrast:[Oe,ve,ge]}],"drop-shadow":[{"drop-shadow":["","none",w,Zc,Xc]}],"drop-shadow-color":[{"drop-shadow":V()}],grayscale:[{grayscale:["",Oe,ve,ge]}],"hue-rotate":[{"hue-rotate":[Oe,ve,ge]}],invert:[{invert:["",Oe,ve,ge]}],saturate:[{saturate:[Oe,ve,ge]}],sepia:[{sepia:["",Oe,ve,ge]}],"backdrop-filter":[{"backdrop-filter":["","none",ve,ge]}],"backdrop-blur":[{"backdrop-blur":de()}],"backdrop-brightness":[{"backdrop-brightness":[Oe,ve,ge]}],"backdrop-contrast":[{"backdrop-contrast":[Oe,ve,ge]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Oe,ve,ge]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Oe,ve,ge]}],"backdrop-invert":[{"backdrop-invert":["",Oe,ve,ge]}],"backdrop-opacity":[{"backdrop-opacity":[Oe,ve,ge]}],"backdrop-saturate":[{"backdrop-saturate":[Oe,ve,ge]}],"backdrop-sepia":[{"backdrop-sepia":["",Oe,ve,ge]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":O()}],"border-spacing-x":[{"border-spacing-x":O()}],"border-spacing-y":[{"border-spacing-y":O()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ve,ge]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Oe,"initial",ve,ge]}],ease:[{ease:["linear","initial",T,ve,ge]}],delay:[{delay:[Oe,ve,ge]}],animate:[{animate:["none",N,ve,ge]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,ve,ge]}],"perspective-origin":[{"perspective-origin":M()}],rotate:[{rotate:we()}],"rotate-x":[{"rotate-x":we()}],"rotate-y":[{"rotate-y":we()}],"rotate-z":[{"rotate-z":we()}],scale:[{scale:Te()}],"scale-x":[{"scale-x":Te()}],"scale-y":[{"scale-y":Te()}],"scale-z":[{"scale-z":Te()}],"scale-3d":["scale-3d"],skew:[{skew:Ne()}],"skew-x":[{"skew-x":Ne()}],"skew-y":[{"skew-y":Ne()}],transform:[{transform:[ve,ge,"","none","gpu","cpu"]}],"transform-origin":[{origin:M()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:_e()}],"translate-x":[{"translate-x":_e()}],"translate-y":[{"translate-y":_e()}],"translate-z":[{"translate-z":_e()}],"translate-none":["translate-none"],accent:[{accent:V()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:V()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ve,ge]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ve,ge]}],fill:[{fill:["none",...V()]}],"stroke-w":[{stroke:[Oe,Qr,Ti,Vh]}],stroke:[{stroke:["none",...V()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},mO=Y_(hO);function re(...e){return mO(iw(e))}function Em({children:e,className:n,speed:s=1,colorFrom:i="#ffaa40",colorTo:r="#9c40ff",...c}){const{effective:u}=Gu(),d=u!=="off";return m.jsx("span",{style:{"--bg-size":`${s*300}%`,"--color-from":i,"--color-to":r},className:re("inline bg-gradient-to-r from-[var(--color-from)] via-[var(--color-to)] to-[var(--color-from)] bg-[length:var(--bg-size)_100%] bg-clip-text text-transparent",d&&"animate-gradient",n),...c,children:e})}function o0(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function Zo(...e){return n=>{let s=!1;const i=e.map(r=>{const c=o0(r,n);return!s&&typeof c=="function"&&(s=!0),c});if(s)return()=>{for(let r=0;r<i.length;r++){const c=i[r];typeof c=="function"?c():o0(e[r],null)}}}}function gt(...e){return x.useCallback(Zo(...e),e)}var pO=Symbol.for("react.lazy"),Nu=fp[" use ".trim().toString()];function gO(e){return typeof e=="object"&&e!==null&&"then"in e}function yw(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===pO&&"_payload"in e&&gO(e._payload)}function xw(e){const n=vO(e),s=x.forwardRef((i,r)=>{let{children:c,...u}=i;yw(c)&&typeof Nu=="function"&&(c=Nu(c._payload));const d=x.Children.toArray(c),f=d.find(xO);if(f){const h=f.props.children,y=d.map(g=>g===f?x.Children.count(h)>1?x.Children.only(null):x.isValidElement(h)?h.props.children:null:g);return m.jsx(n,{...u,ref:r,children:x.isValidElement(h)?x.cloneElement(h,void 0,y):null})}return m.jsx(n,{...u,ref:r,children:c})});return s.displayName=`${e}.Slot`,s}var Ap=xw("Slot");function vO(e){const n=x.forwardRef((s,i)=>{let{children:r,...c}=s;if(yw(r)&&typeof Nu=="function"&&(r=Nu(r._payload)),x.isValidElement(r)){const u=SO(r),d=bO(c,r.props);return r.type!==x.Fragment&&(d.ref=i?Zo(i,u):u),x.cloneElement(r,d)}return x.Children.count(r)>1?x.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var yO=Symbol("radix.slottable");function xO(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===yO}function bO(e,n){const s={...n};for(const i in n){const r=e[i],c=n[i];/^on[A-Z]/.test(i)?r&&c?s[i]=(...d)=>{const f=c(...d);return r(...d),f}:r&&(s[i]=r):i==="style"?s[i]={...r,...c}:i==="className"&&(s[i]=[r,c].filter(Boolean).join(" "))}return{...e,...s}}function SO(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=n&&"isReactWarning"in n&&n.isReactWarning;return s?e.ref:(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,s=n&&"isReactWarning"in n&&n.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}const r0=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,l0=iw,jp=(e,n)=>s=>{var i;if(n?.variants==null)return l0(e,s?.class,s?.className);const{variants:r,defaultVariants:c}=n,u=Object.keys(r).map(h=>{const y=s?.[h],g=c?.[h];if(y===null)return null;const b=r0(y)||r0(g);return r[h][b]}),d=s&&Object.entries(s).reduce((h,y)=>{let[g,b]=y;return b===void 0||(h[g]=b),h},{}),f=n==null||(i=n.compoundVariants)===null||i===void 0?void 0:i.reduce((h,y)=>{let{class:g,className:b,...w}=y;return Object.entries(w).every(E=>{let[C,A]=E;return Array.isArray(A)?A.includes({...c,...d}[C]):{...c,...d}[C]===A})?[...h,g,b]:h},[]);return l0(e,u,f,s?.class,s?.className)},wO=jp("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function pt({className:e,variant:n="default",size:s="default",asChild:i=!1,...r}){const c=i?Ap:"button";return m.jsx(c,{"data-slot":"button","data-variant":n,"data-size":s,className:re(wO({variant:n,size:s,className:e})),...r})}function Be(e,n,{checkForDefaultPrevented:s=!0}={}){return function(r){if(e?.(r),s===!1||!r.defaultPrevented)return n?.(r)}}function EO(e,n){const s=x.createContext(n),i=c=>{const{children:u,...d}=c,f=x.useMemo(()=>d,Object.values(d));return m.jsx(s.Provider,{value:f,children:u})};i.displayName=e+"Provider";function r(c){const u=x.useContext(s);if(u)return u;if(n!==void 0)return n;throw new Error(`\`${c}\` must be used within \`${e}\``)}return[i,r]}function Qo(e,n=[]){let s=[];function i(c,u){const d=x.createContext(u),f=s.length;s=[...s,u];const h=g=>{const{scope:b,children:w,...E}=g,C=b?.[e]?.[f]||d,A=x.useMemo(()=>E,Object.values(E));return m.jsx(C.Provider,{value:A,children:w})};h.displayName=c+"Provider";function y(g,b){const w=b?.[e]?.[f]||d,E=x.useContext(w);if(E)return E;if(u!==void 0)return u;throw new Error(`\`${g}\` must be used within \`${c}\``)}return[h,y]}const r=()=>{const c=s.map(u=>x.createContext(u));return function(d){const f=d?.[e]||c;return x.useMemo(()=>({[`__scope${e}`]:{...d,[e]:f}}),[d,f])}};return r.scopeName=e,[i,CO(r,...n)]}function CO(...e){const n=e[0];if(e.length===1)return n;const s=()=>{const i=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(c){const u=i.reduce((d,{useScope:f,scopeName:h})=>{const g=f(c)[`__scope${h}`];return{...d,...g}},{});return x.useMemo(()=>({[`__scope${n.scopeName}`]:u}),[u])}};return s.scopeName=n.scopeName,s}var tn=globalThis?.document?x.useLayoutEffect:()=>{},TO=fp[" useId ".trim().toString()]||(()=>{}),AO=0;function Qs(e){const[n,s]=x.useState(TO());return tn(()=>{s(i=>i??String(AO++))},[e]),e||(n?`radix-${n}`:"")}var jO=fp[" useInsertionEffect ".trim().toString()]||tn;function fl({prop:e,defaultProp:n,onChange:s=()=>{},caller:i}){const[r,c,u]=NO({defaultProp:n,onChange:s}),d=e!==void 0,f=d?e:r;{const y=x.useRef(e!==void 0);x.useEffect(()=>{const g=y.current;g!==d&&console.warn(`${i} is changing from ${g?"controlled":"uncontrolled"} to ${d?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),y.current=d},[d,i])}const h=x.useCallback(y=>{if(d){const g=RO(y)?y(e):y;g!==e&&u.current?.(g)}else c(y)},[d,e,c,u]);return[f,h]}function NO({defaultProp:e,onChange:n}){const[s,i]=x.useState(e),r=x.useRef(s),c=x.useRef(n);return jO(()=>{c.current=n},[n]),x.useEffect(()=>{r.current!==s&&(c.current?.(s),r.current=s)},[s,r]),[s,i,c]}function RO(e){return typeof e=="function"}function MO(e){const n=_O(e),s=x.forwardRef((i,r)=>{const{children:c,...u}=i,d=x.Children.toArray(c),f=d.find(DO);if(f){const h=f.props.children,y=d.map(g=>g===f?x.Children.count(h)>1?x.Children.only(null):x.isValidElement(h)?h.props.children:null:g);return m.jsx(n,{...u,ref:r,children:x.isValidElement(h)?x.cloneElement(h,void 0,y):null})}return m.jsx(n,{...u,ref:r,children:c})});return s.displayName=`${e}.Slot`,s}function _O(e){const n=x.forwardRef((s,i)=>{const{children:r,...c}=s;if(x.isValidElement(r)){const u=kO(r),d=PO(c,r.props);return r.type!==x.Fragment&&(d.ref=i?Zo(i,u):u),x.cloneElement(r,d)}return x.Children.count(r)>1?x.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var OO=Symbol("radix.slottable");function DO(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===OO}function PO(e,n){const s={...n};for(const i in n){const r=e[i],c=n[i];/^on[A-Z]/.test(i)?r&&c?s[i]=(...d)=>{const f=c(...d);return r(...d),f}:r&&(s[i]=r):i==="style"?s[i]={...r,...c}:i==="className"&&(s[i]=[r,c].filter(Boolean).join(" "))}return{...e,...s}}function kO(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=n&&"isReactWarning"in n&&n.isReactWarning;return s?e.ref:(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,s=n&&"isReactWarning"in n&&n.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}var LO=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ie=LO.reduce((e,n)=>{const s=MO(`Primitive.${n}`),i=x.forwardRef((r,c)=>{const{asChild:u,...d}=r,f=u?s:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(f,{...d,ref:c})});return i.displayName=`Primitive.${n}`,{...e,[n]:i}},{});function zO(e,n){e&&Cl.flushSync(()=>e.dispatchEvent(n))}function Js(e){const n=x.useRef(e);return x.useEffect(()=>{n.current=e}),x.useMemo(()=>(...s)=>n.current?.(...s),[])}function VO(e,n=globalThis?.document){const s=Js(e);x.useEffect(()=>{const i=r=>{r.key==="Escape"&&s(r)};return n.addEventListener("keydown",i,{capture:!0}),()=>n.removeEventListener("keydown",i,{capture:!0})},[s,n])}var BO="DismissableLayer",Cm="dismissableLayer.update",UO="dismissableLayer.pointerDownOutside",HO="dismissableLayer.focusOutside",c0,bw=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Np=x.forwardRef((e,n)=>{const{disableOutsidePointerEvents:s=!1,onEscapeKeyDown:i,onPointerDownOutside:r,onFocusOutside:c,onInteractOutside:u,onDismiss:d,...f}=e,h=x.useContext(bw),[y,g]=x.useState(null),b=y?.ownerDocument??globalThis?.document,[,w]=x.useState({}),E=gt(n,L=>g(L)),C=Array.from(h.layers),[A]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),T=C.indexOf(A),N=y?C.indexOf(y):-1,R=h.layersWithOutsidePointerEventsDisabled.size>0,_=N>=T,M=qO(L=>{const O=L.target,K=[...h.branches].some(Z=>Z.contains(O));!_||K||(r?.(L),u?.(L),L.defaultPrevented||d?.())},b),U=$O(L=>{const O=L.target;[...h.branches].some(Z=>Z.contains(O))||(c?.(L),u?.(L),L.defaultPrevented||d?.())},b);return VO(L=>{N===h.layers.size-1&&(i?.(L),!L.defaultPrevented&&d&&(L.preventDefault(),d()))},b),x.useEffect(()=>{if(y)return s&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(c0=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(y)),h.layers.add(y),u0(),()=>{s&&h.layersWithOutsidePointerEventsDisabled.size===1&&(b.body.style.pointerEvents=c0)}},[y,b,s,h]),x.useEffect(()=>()=>{y&&(h.layers.delete(y),h.layersWithOutsidePointerEventsDisabled.delete(y),u0())},[y,h]),x.useEffect(()=>{const L=()=>w({});return document.addEventListener(Cm,L),()=>document.removeEventListener(Cm,L)},[]),m.jsx(Ie.div,{...f,ref:E,style:{pointerEvents:R?_?"auto":"none":void 0,...e.style},onFocusCapture:Be(e.onFocusCapture,U.onFocusCapture),onBlurCapture:Be(e.onBlurCapture,U.onBlurCapture),onPointerDownCapture:Be(e.onPointerDownCapture,M.onPointerDownCapture)})});Np.displayName=BO;var IO="DismissableLayerBranch",FO=x.forwardRef((e,n)=>{const s=x.useContext(bw),i=x.useRef(null),r=gt(n,i);return x.useEffect(()=>{const c=i.current;if(c)return s.branches.add(c),()=>{s.branches.delete(c)}},[s.branches]),m.jsx(Ie.div,{...e,ref:r})});FO.displayName=IO;function qO(e,n=globalThis?.document){const s=Js(e),i=x.useRef(!1),r=x.useRef(()=>{});return x.useEffect(()=>{const c=d=>{if(d.target&&!i.current){let f=function(){Sw(UO,s,h,{discrete:!0})};const h={originalEvent:d};d.pointerType==="touch"?(n.removeEventListener("click",r.current),r.current=f,n.addEventListener("click",r.current,{once:!0})):f()}else n.removeEventListener("click",r.current);i.current=!1},u=window.setTimeout(()=>{n.addEventListener("pointerdown",c)},0);return()=>{window.clearTimeout(u),n.removeEventListener("pointerdown",c),n.removeEventListener("click",r.current)}},[n,s]),{onPointerDownCapture:()=>i.current=!0}}function $O(e,n=globalThis?.document){const s=Js(e),i=x.useRef(!1);return x.useEffect(()=>{const r=c=>{c.target&&!i.current&&Sw(HO,s,{originalEvent:c},{discrete:!1})};return n.addEventListener("focusin",r),()=>n.removeEventListener("focusin",r)},[n,s]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function u0(){const e=new CustomEvent(Cm);document.dispatchEvent(e)}function Sw(e,n,s,{discrete:i}){const r=s.originalEvent.target,c=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:s});n&&r.addEventListener(e,n,{once:!0}),i?zO(r,c):r.dispatchEvent(c)}var Bh="focusScope.autoFocusOnMount",Uh="focusScope.autoFocusOnUnmount",d0={bubbles:!1,cancelable:!0},KO="FocusScope",Rp=x.forwardRef((e,n)=>{const{loop:s=!1,trapped:i=!1,onMountAutoFocus:r,onUnmountAutoFocus:c,...u}=e,[d,f]=x.useState(null),h=Js(r),y=Js(c),g=x.useRef(null),b=gt(n,C=>f(C)),w=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(i){let C=function(R){if(w.paused||!d)return;const _=R.target;d.contains(_)?g.current=_:Xs(g.current,{select:!0})},A=function(R){if(w.paused||!d)return;const _=R.relatedTarget;_!==null&&(d.contains(_)||Xs(g.current,{select:!0}))},T=function(R){if(document.activeElement===document.body)for(const M of R)M.removedNodes.length>0&&Xs(d)};document.addEventListener("focusin",C),document.addEventListener("focusout",A);const N=new MutationObserver(T);return d&&N.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",A),N.disconnect()}}},[i,d,w.paused]),x.useEffect(()=>{if(d){h0.add(w);const C=document.activeElement;if(!d.contains(C)){const T=new CustomEvent(Bh,d0);d.addEventListener(Bh,h),d.dispatchEvent(T),T.defaultPrevented||(YO(JO(ww(d)),{select:!0}),document.activeElement===C&&Xs(d))}return()=>{d.removeEventListener(Bh,h),setTimeout(()=>{const T=new CustomEvent(Uh,d0);d.addEventListener(Uh,y),d.dispatchEvent(T),T.defaultPrevented||Xs(C??document.body,{select:!0}),d.removeEventListener(Uh,y),h0.remove(w)},0)}}},[d,h,y,w]);const E=x.useCallback(C=>{if(!s&&!i||w.paused)return;const A=C.key==="Tab"&&!C.altKey&&!C.ctrlKey&&!C.metaKey,T=document.activeElement;if(A&&T){const N=C.currentTarget,[R,_]=GO(N);R&&_?!C.shiftKey&&T===_?(C.preventDefault(),s&&Xs(R,{select:!0})):C.shiftKey&&T===R&&(C.preventDefault(),s&&Xs(_,{select:!0})):T===N&&C.preventDefault()}},[s,i,w.paused]);return m.jsx(Ie.div,{tabIndex:-1,...u,ref:b,onKeyDown:E})});Rp.displayName=KO;function YO(e,{select:n=!1}={}){const s=document.activeElement;for(const i of e)if(Xs(i,{select:n}),document.activeElement!==s)return}function GO(e){const n=ww(e),s=f0(n,e),i=f0(n.reverse(),e);return[s,i]}function ww(e){const n=[],s=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const r=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||r?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)n.push(s.currentNode);return n}function f0(e,n){for(const s of e)if(!XO(s,{upTo:n}))return s}function XO(e,{upTo:n}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n!==void 0&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function ZO(e){return e instanceof HTMLInputElement&&"select"in e}function Xs(e,{select:n=!1}={}){if(e&&e.focus){const s=document.activeElement;e.focus({preventScroll:!0}),e!==s&&ZO(e)&&n&&e.select()}}var h0=QO();function QO(){let e=[];return{add(n){const s=e[0];n!==s&&s?.pause(),e=m0(e,n),e.unshift(n)},remove(n){e=m0(e,n),e[0]?.resume()}}}function m0(e,n){const s=[...e],i=s.indexOf(n);return i!==-1&&s.splice(i,1),s}function JO(e){return e.filter(n=>n.tagName!=="A")}var WO="Portal",Mp=x.forwardRef((e,n)=>{const{container:s,...i}=e,[r,c]=x.useState(!1);tn(()=>c(!0),[]);const u=s||r&&globalThis?.document?.body;return u?L1.createPortal(m.jsx(Ie.div,{...i,ref:n}),u):null});Mp.displayName=WO;function eD(e,n){return x.useReducer((s,i)=>n[s][i]??s,e)}var Tl=e=>{const{present:n,children:s}=e,i=tD(n),r=typeof s=="function"?s({present:i.isPresent}):x.Children.only(s),c=gt(i.ref,nD(r));return typeof s=="function"||i.isPresent?x.cloneElement(r,{ref:c}):null};Tl.displayName="Presence";function tD(e){const[n,s]=x.useState(),i=x.useRef(null),r=x.useRef(e),c=x.useRef("none"),u=e?"mounted":"unmounted",[d,f]=eD(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const h=Qc(i.current);c.current=d==="mounted"?h:"none"},[d]),tn(()=>{const h=i.current,y=r.current;if(y!==e){const b=c.current,w=Qc(h);e?f("MOUNT"):w==="none"||h?.display==="none"?f("UNMOUNT"):f(y&&b!==w?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,f]),tn(()=>{if(n){let h;const y=n.ownerDocument.defaultView??window,g=w=>{const C=Qc(i.current).includes(CSS.escape(w.animationName));if(w.target===n&&C&&(f("ANIMATION_END"),!r.current)){const A=n.style.animationFillMode;n.style.animationFillMode="forwards",h=y.setTimeout(()=>{n.style.animationFillMode==="forwards"&&(n.style.animationFillMode=A)})}},b=w=>{w.target===n&&(c.current=Qc(i.current))};return n.addEventListener("animationstart",b),n.addEventListener("animationcancel",g),n.addEventListener("animationend",g),()=>{y.clearTimeout(h),n.removeEventListener("animationstart",b),n.removeEventListener("animationcancel",g),n.removeEventListener("animationend",g)}}else f("ANIMATION_END")},[n,f]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:x.useCallback(h=>{i.current=h?getComputedStyle(h):null,s(h)},[])}}function Qc(e){return e?.animationName||"none"}function nD(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=n&&"isReactWarning"in n&&n.isReactWarning;return s?e.ref:(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,s=n&&"isReactWarning"in n&&n.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}var Hh=0;function Ew(){x.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??p0()),document.body.insertAdjacentElement("beforeend",e[1]??p0()),Hh++,()=>{Hh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),Hh--}},[])}function p0(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var _a=function(){return _a=Object.assign||function(n){for(var s,i=1,r=arguments.length;i<r;i++){s=arguments[i];for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&(n[c]=s[c])}return n},_a.apply(this,arguments)};function Cw(e,n){var s={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&n.indexOf(i)<0&&(s[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(e);r<i.length;r++)n.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(s[i[r]]=e[i[r]]);return s}function aD(e,n,s){if(s||arguments.length===2)for(var i=0,r=n.length,c;i<r;i++)(c||!(i in n))&&(c||(c=Array.prototype.slice.call(n,0,i)),c[i]=n[i]);return e.concat(c||Array.prototype.slice.call(n))}var mu="right-scroll-bar-position",pu="width-before-scroll-bar",sD="with-scroll-bars-hidden",iD="--removed-body-scroll-bar-size";function Ih(e,n){return typeof e=="function"?e(n):e&&(e.current=n),e}function oD(e,n){var s=x.useState(function(){return{value:e,callback:n,facade:{get current(){return s.value},set current(i){var r=s.value;r!==i&&(s.value=i,s.callback(i,r))}}}})[0];return s.callback=n,s.facade}var rD=typeof window<"u"?x.useLayoutEffect:x.useEffect,g0=new WeakMap;function lD(e,n){var s=oD(null,function(i){return e.forEach(function(r){return Ih(r,i)})});return rD(function(){var i=g0.get(s);if(i){var r=new Set(i),c=new Set(e),u=s.current;r.forEach(function(d){c.has(d)||Ih(d,null)}),c.forEach(function(d){r.has(d)||Ih(d,u)})}g0.set(s,e)},[e]),s}function cD(e){return e}function uD(e,n){n===void 0&&(n=cD);var s=[],i=!1,r={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return s.length?s[s.length-1]:e},useMedium:function(c){var u=n(c,i);return s.push(u),function(){s=s.filter(function(d){return d!==u})}},assignSyncMedium:function(c){for(i=!0;s.length;){var u=s;s=[],u.forEach(c)}s={push:function(d){return c(d)},filter:function(){return s}}},assignMedium:function(c){i=!0;var u=[];if(s.length){var d=s;s=[],d.forEach(c),u=s}var f=function(){var y=u;u=[],y.forEach(c)},h=function(){return Promise.resolve().then(f)};h(),s={push:function(y){u.push(y),h()},filter:function(y){return u=u.filter(y),s}}}};return r}function dD(e){e===void 0&&(e={});var n=uD(null);return n.options=_a({async:!0,ssr:!1},e),n}var Tw=function(e){var n=e.sideCar,s=Cw(e,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=n.read();if(!i)throw new Error("Sidecar medium not found");return x.createElement(i,_a({},s))};Tw.isSideCarExport=!0;function fD(e,n){return e.useMedium(n),Tw}var Aw=dD(),Fh=function(){},Xu=x.forwardRef(function(e,n){var s=x.useRef(null),i=x.useState({onScrollCapture:Fh,onWheelCapture:Fh,onTouchMoveCapture:Fh}),r=i[0],c=i[1],u=e.forwardProps,d=e.children,f=e.className,h=e.removeScrollBar,y=e.enabled,g=e.shards,b=e.sideCar,w=e.noRelative,E=e.noIsolation,C=e.inert,A=e.allowPinchZoom,T=e.as,N=T===void 0?"div":T,R=e.gapMode,_=Cw(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),M=b,U=lD([s,n]),L=_a(_a({},_),r);return x.createElement(x.Fragment,null,y&&x.createElement(M,{sideCar:Aw,removeScrollBar:h,shards:g,noRelative:w,noIsolation:E,inert:C,setCallbacks:c,allowPinchZoom:!!A,lockRef:s,gapMode:R}),u?x.cloneElement(x.Children.only(d),_a(_a({},L),{ref:U})):x.createElement(N,_a({},L,{className:f,ref:U}),d))});Xu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Xu.classNames={fullWidth:pu,zeroRight:mu};var hD=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function mD(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=hD();return n&&e.setAttribute("nonce",n),e}function pD(e,n){e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}function gD(e){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(e)}var vD=function(){var e=0,n=null;return{add:function(s){e==0&&(n=mD())&&(pD(n,s),gD(n)),e++},remove:function(){e--,!e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},yD=function(){var e=vD();return function(n,s){x.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&s])}},jw=function(){var e=yD(),n=function(s){var i=s.styles,r=s.dynamic;return e(i,r),null};return n},xD={left:0,top:0,right:0,gap:0},qh=function(e){return parseInt(e||"",10)||0},bD=function(e){var n=window.getComputedStyle(document.body),s=n[e==="padding"?"paddingLeft":"marginLeft"],i=n[e==="padding"?"paddingTop":"marginTop"],r=n[e==="padding"?"paddingRight":"marginRight"];return[qh(s),qh(i),qh(r)]},SD=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return xD;var n=bD(e),s=document.documentElement.clientWidth,i=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,i-s+n[2]-n[0])}},wD=jw(),Uo="data-scroll-locked",ED=function(e,n,s,i){var r=e.left,c=e.top,u=e.right,d=e.gap;return s===void 0&&(s="margin"),`
12
- .`.concat(sD,` {
13
- overflow: hidden `).concat(i,`;
14
- padding-right: `).concat(d,"px ").concat(i,`;
15
- }
16
- body[`).concat(Uo,`] {
17
- overflow: hidden `).concat(i,`;
18
- overscroll-behavior: contain;
19
- `).concat([n&&"position: relative ".concat(i,";"),s==="margin"&&`
20
- padding-left: `.concat(r,`px;
21
- padding-top: `).concat(c,`px;
22
- padding-right: `).concat(u,`px;
23
- margin-left:0;
24
- margin-top:0;
25
- margin-right: `).concat(d,"px ").concat(i,`;
26
- `),s==="padding"&&"padding-right: ".concat(d,"px ").concat(i,";")].filter(Boolean).join(""),`
27
- }
28
-
29
- .`).concat(mu,` {
30
- right: `).concat(d,"px ").concat(i,`;
31
- }
32
-
33
- .`).concat(pu,` {
34
- margin-right: `).concat(d,"px ").concat(i,`;
35
- }
36
-
37
- .`).concat(mu," .").concat(mu,` {
38
- right: 0 `).concat(i,`;
39
- }
40
-
41
- .`).concat(pu," .").concat(pu,` {
42
- margin-right: 0 `).concat(i,`;
43
- }
44
-
45
- body[`).concat(Uo,`] {
46
- `).concat(iD,": ").concat(d,`px;
47
- }
48
- `)},v0=function(){var e=parseInt(document.body.getAttribute(Uo)||"0",10);return isFinite(e)?e:0},CD=function(){x.useEffect(function(){return document.body.setAttribute(Uo,(v0()+1).toString()),function(){var e=v0()-1;e<=0?document.body.removeAttribute(Uo):document.body.setAttribute(Uo,e.toString())}},[])},TD=function(e){var n=e.noRelative,s=e.noImportant,i=e.gapMode,r=i===void 0?"margin":i;CD();var c=x.useMemo(function(){return SD(r)},[r]);return x.createElement(wD,{styles:ED(c,!n,r,s?"":"!important")})},Tm=!1;if(typeof window<"u")try{var Jc=Object.defineProperty({},"passive",{get:function(){return Tm=!0,!0}});window.addEventListener("test",Jc,Jc),window.removeEventListener("test",Jc,Jc)}catch{Tm=!1}var Mo=Tm?{passive:!1}:!1,AD=function(e){return e.tagName==="TEXTAREA"},Nw=function(e,n){if(!(e instanceof Element))return!1;var s=window.getComputedStyle(e);return s[n]!=="hidden"&&!(s.overflowY===s.overflowX&&!AD(e)&&s[n]==="visible")},jD=function(e){return Nw(e,"overflowY")},ND=function(e){return Nw(e,"overflowX")},y0=function(e,n){var s=n.ownerDocument,i=n;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var r=Rw(e,i);if(r){var c=Mw(e,i),u=c[1],d=c[2];if(u>d)return!0}i=i.parentNode}while(i&&i!==s.body);return!1},RD=function(e){var n=e.scrollTop,s=e.scrollHeight,i=e.clientHeight;return[n,s,i]},MD=function(e){var n=e.scrollLeft,s=e.scrollWidth,i=e.clientWidth;return[n,s,i]},Rw=function(e,n){return e==="v"?jD(n):ND(n)},Mw=function(e,n){return e==="v"?RD(n):MD(n)},_D=function(e,n){return e==="h"&&n==="rtl"?-1:1},OD=function(e,n,s,i,r){var c=_D(e,window.getComputedStyle(n).direction),u=c*i,d=s.target,f=n.contains(d),h=!1,y=u>0,g=0,b=0;do{if(!d)break;var w=Mw(e,d),E=w[0],C=w[1],A=w[2],T=C-A-c*E;(E||T)&&Rw(e,d)&&(g+=T,b+=E);var N=d.parentNode;d=N&&N.nodeType===Node.DOCUMENT_FRAGMENT_NODE?N.host:N}while(!f&&d!==document.body||f&&(n.contains(d)||n===d));return(y&&Math.abs(g)<1||!y&&Math.abs(b)<1)&&(h=!0),h},Wc=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},x0=function(e){return[e.deltaX,e.deltaY]},b0=function(e){return e&&"current"in e?e.current:e},DD=function(e,n){return e[0]===n[0]&&e[1]===n[1]},PD=function(e){return`
49
- .block-interactivity-`.concat(e,` {pointer-events: none;}
50
- .allow-interactivity-`).concat(e,` {pointer-events: all;}
51
- `)},kD=0,_o=[];function LD(e){var n=x.useRef([]),s=x.useRef([0,0]),i=x.useRef(),r=x.useState(kD++)[0],c=x.useState(jw)[0],u=x.useRef(e);x.useEffect(function(){u.current=e},[e]),x.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var C=aD([e.lockRef.current],(e.shards||[]).map(b0),!0).filter(Boolean);return C.forEach(function(A){return A.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),C.forEach(function(A){return A.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var d=x.useCallback(function(C,A){if("touches"in C&&C.touches.length===2||C.type==="wheel"&&C.ctrlKey)return!u.current.allowPinchZoom;var T=Wc(C),N=s.current,R="deltaX"in C?C.deltaX:N[0]-T[0],_="deltaY"in C?C.deltaY:N[1]-T[1],M,U=C.target,L=Math.abs(R)>Math.abs(_)?"h":"v";if("touches"in C&&L==="h"&&U.type==="range")return!1;var O=window.getSelection(),K=O&&O.anchorNode,Z=K?K===U||K.contains(U):!1;if(Z)return!1;var J=y0(L,U);if(!J)return!0;if(J?M=L:(M=L==="v"?"h":"v",J=y0(L,U)),!J)return!1;if(!i.current&&"changedTouches"in C&&(R||_)&&(i.current=M),!M)return!0;var se=i.current||M;return OD(se,A,C,se==="h"?R:_)},[]),f=x.useCallback(function(C){var A=C;if(!(!_o.length||_o[_o.length-1]!==c)){var T="deltaY"in A?x0(A):Wc(A),N=n.current.filter(function(M){return M.name===A.type&&(M.target===A.target||A.target===M.shadowParent)&&DD(M.delta,T)})[0];if(N&&N.should){A.cancelable&&A.preventDefault();return}if(!N){var R=(u.current.shards||[]).map(b0).filter(Boolean).filter(function(M){return M.contains(A.target)}),_=R.length>0?d(A,R[0]):!u.current.noIsolation;_&&A.cancelable&&A.preventDefault()}}},[]),h=x.useCallback(function(C,A,T,N){var R={name:C,delta:A,target:T,should:N,shadowParent:zD(T)};n.current.push(R),setTimeout(function(){n.current=n.current.filter(function(_){return _!==R})},1)},[]),y=x.useCallback(function(C){s.current=Wc(C),i.current=void 0},[]),g=x.useCallback(function(C){h(C.type,x0(C),C.target,d(C,e.lockRef.current))},[]),b=x.useCallback(function(C){h(C.type,Wc(C),C.target,d(C,e.lockRef.current))},[]);x.useEffect(function(){return _o.push(c),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:b}),document.addEventListener("wheel",f,Mo),document.addEventListener("touchmove",f,Mo),document.addEventListener("touchstart",y,Mo),function(){_o=_o.filter(function(C){return C!==c}),document.removeEventListener("wheel",f,Mo),document.removeEventListener("touchmove",f,Mo),document.removeEventListener("touchstart",y,Mo)}},[]);var w=e.removeScrollBar,E=e.inert;return x.createElement(x.Fragment,null,E?x.createElement(c,{styles:PD(r)}):null,w?x.createElement(TD,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function zD(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}const VD=fD(Aw,LD);var _p=x.forwardRef(function(e,n){return x.createElement(Xu,_a({},e,{ref:n,sideCar:VD}))});_p.classNames=Xu.classNames;var BD=function(e){if(typeof document>"u")return null;var n=Array.isArray(e)?e[0]:e;return n.ownerDocument.body},Oo=new WeakMap,eu=new WeakMap,tu={},$h=0,_w=function(e){return e&&(e.host||_w(e.parentNode))},UD=function(e,n){return n.map(function(s){if(e.contains(s))return s;var i=_w(s);return i&&e.contains(i)?i:(console.error("aria-hidden",s,"in not contained inside",e,". Doing nothing"),null)}).filter(function(s){return!!s})},HD=function(e,n,s,i){var r=UD(n,Array.isArray(e)?e:[e]);tu[s]||(tu[s]=new WeakMap);var c=tu[s],u=[],d=new Set,f=new Set(r),h=function(g){!g||d.has(g)||(d.add(g),h(g.parentNode))};r.forEach(h);var y=function(g){!g||f.has(g)||Array.prototype.forEach.call(g.children,function(b){if(d.has(b))y(b);else try{var w=b.getAttribute(i),E=w!==null&&w!=="false",C=(Oo.get(b)||0)+1,A=(c.get(b)||0)+1;Oo.set(b,C),c.set(b,A),u.push(b),C===1&&E&&eu.set(b,!0),A===1&&b.setAttribute(s,"true"),E||b.setAttribute(i,"true")}catch(T){console.error("aria-hidden: cannot operate on ",b,T)}})};return y(n),d.clear(),$h++,function(){u.forEach(function(g){var b=Oo.get(g)-1,w=c.get(g)-1;Oo.set(g,b),c.set(g,w),b||(eu.has(g)||g.removeAttribute(i),eu.delete(g)),w||g.removeAttribute(s)}),$h--,$h||(Oo=new WeakMap,Oo=new WeakMap,eu=new WeakMap,tu={})}},Ow=function(e,n,s){s===void 0&&(s="data-aria-hidden");var i=Array.from(Array.isArray(e)?e:[e]),r=BD(e);return r?(i.push.apply(i,Array.from(r.querySelectorAll("[aria-live], script"))),HD(i,r,s,"aria-hidden")):function(){return null}};function ID(e){const n=FD(e),s=x.forwardRef((i,r)=>{const{children:c,...u}=i,d=x.Children.toArray(c),f=d.find($D);if(f){const h=f.props.children,y=d.map(g=>g===f?x.Children.count(h)>1?x.Children.only(null):x.isValidElement(h)?h.props.children:null:g);return m.jsx(n,{...u,ref:r,children:x.isValidElement(h)?x.cloneElement(h,void 0,y):null})}return m.jsx(n,{...u,ref:r,children:c})});return s.displayName=`${e}.Slot`,s}function FD(e){const n=x.forwardRef((s,i)=>{const{children:r,...c}=s;if(x.isValidElement(r)){const u=YD(r),d=KD(c,r.props);return r.type!==x.Fragment&&(d.ref=i?Zo(i,u):u),x.cloneElement(r,d)}return x.Children.count(r)>1?x.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var qD=Symbol("radix.slottable");function $D(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===qD}function KD(e,n){const s={...n};for(const i in n){const r=e[i],c=n[i];/^on[A-Z]/.test(i)?r&&c?s[i]=(...d)=>{const f=c(...d);return r(...d),f}:r&&(s[i]=r):i==="style"?s[i]={...r,...c}:i==="className"&&(s[i]=[r,c].filter(Boolean).join(" "))}return{...e,...s}}function YD(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=n&&"isReactWarning"in n&&n.isReactWarning;return s?e.ref:(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,s=n&&"isReactWarning"in n&&n.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}var Zu="Dialog",[Dw]=Qo(Zu),[GD,wa]=Dw(Zu),Pw=e=>{const{__scopeDialog:n,children:s,open:i,defaultOpen:r,onOpenChange:c,modal:u=!0}=e,d=x.useRef(null),f=x.useRef(null),[h,y]=fl({prop:i,defaultProp:r??!1,onChange:c,caller:Zu});return m.jsx(GD,{scope:n,triggerRef:d,contentRef:f,contentId:Qs(),titleId:Qs(),descriptionId:Qs(),open:h,onOpenChange:y,onOpenToggle:x.useCallback(()=>y(g=>!g),[y]),modal:u,children:s})};Pw.displayName=Zu;var kw="DialogTrigger",Lw=x.forwardRef((e,n)=>{const{__scopeDialog:s,...i}=e,r=wa(kw,s),c=gt(n,r.triggerRef);return m.jsx(Ie.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Pp(r.open),...i,ref:c,onClick:Be(e.onClick,r.onOpenToggle)})});Lw.displayName=kw;var Op="DialogPortal",[XD,zw]=Dw(Op,{forceMount:void 0}),Vw=e=>{const{__scopeDialog:n,forceMount:s,children:i,container:r}=e,c=wa(Op,n);return m.jsx(XD,{scope:n,forceMount:s,children:x.Children.map(i,u=>m.jsx(Tl,{present:s||c.open,children:m.jsx(Mp,{asChild:!0,container:r,children:u})}))})};Vw.displayName=Op;var Ru="DialogOverlay",Bw=x.forwardRef((e,n)=>{const s=zw(Ru,e.__scopeDialog),{forceMount:i=s.forceMount,...r}=e,c=wa(Ru,e.__scopeDialog);return c.modal?m.jsx(Tl,{present:i||c.open,children:m.jsx(QD,{...r,ref:n})}):null});Bw.displayName=Ru;var ZD=ID("DialogOverlay.RemoveScroll"),QD=x.forwardRef((e,n)=>{const{__scopeDialog:s,...i}=e,r=wa(Ru,s);return m.jsx(_p,{as:ZD,allowPinchZoom:!0,shards:[r.contentRef],children:m.jsx(Ie.div,{"data-state":Pp(r.open),...i,ref:n,style:{pointerEvents:"auto",...i.style}})})}),zi="DialogContent",Uw=x.forwardRef((e,n)=>{const s=zw(zi,e.__scopeDialog),{forceMount:i=s.forceMount,...r}=e,c=wa(zi,e.__scopeDialog);return m.jsx(Tl,{present:i||c.open,children:c.modal?m.jsx(JD,{...r,ref:n}):m.jsx(WD,{...r,ref:n})})});Uw.displayName=zi;var JD=x.forwardRef((e,n)=>{const s=wa(zi,e.__scopeDialog),i=x.useRef(null),r=gt(n,s.contentRef,i);return x.useEffect(()=>{const c=i.current;if(c)return Ow(c)},[]),m.jsx(Hw,{...e,ref:r,trapFocus:s.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Be(e.onCloseAutoFocus,c=>{c.preventDefault(),s.triggerRef.current?.focus()}),onPointerDownOutside:Be(e.onPointerDownOutside,c=>{const u=c.detail.originalEvent,d=u.button===0&&u.ctrlKey===!0;(u.button===2||d)&&c.preventDefault()}),onFocusOutside:Be(e.onFocusOutside,c=>c.preventDefault())})}),WD=x.forwardRef((e,n)=>{const s=wa(zi,e.__scopeDialog),i=x.useRef(!1),r=x.useRef(!1);return m.jsx(Hw,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:c=>{e.onCloseAutoFocus?.(c),c.defaultPrevented||(i.current||s.triggerRef.current?.focus(),c.preventDefault()),i.current=!1,r.current=!1},onInteractOutside:c=>{e.onInteractOutside?.(c),c.defaultPrevented||(i.current=!0,c.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const u=c.target;s.triggerRef.current?.contains(u)&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&r.current&&c.preventDefault()}})}),Hw=x.forwardRef((e,n)=>{const{__scopeDialog:s,trapFocus:i,onOpenAutoFocus:r,onCloseAutoFocus:c,...u}=e,d=wa(zi,s),f=x.useRef(null),h=gt(n,f);return Ew(),m.jsxs(m.Fragment,{children:[m.jsx(Rp,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:r,onUnmountAutoFocus:c,children:m.jsx(Np,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":Pp(d.open),...u,ref:h,onDismiss:()=>d.onOpenChange(!1)})}),m.jsxs(m.Fragment,{children:[m.jsx(eP,{titleId:d.titleId}),m.jsx(nP,{contentRef:f,descriptionId:d.descriptionId})]})]})}),Dp="DialogTitle",Iw=x.forwardRef((e,n)=>{const{__scopeDialog:s,...i}=e,r=wa(Dp,s);return m.jsx(Ie.h2,{id:r.titleId,...i,ref:n})});Iw.displayName=Dp;var Fw="DialogDescription",qw=x.forwardRef((e,n)=>{const{__scopeDialog:s,...i}=e,r=wa(Fw,s);return m.jsx(Ie.p,{id:r.descriptionId,...i,ref:n})});qw.displayName=Fw;var $w="DialogClose",Kw=x.forwardRef((e,n)=>{const{__scopeDialog:s,...i}=e,r=wa($w,s);return m.jsx(Ie.button,{type:"button",...i,ref:n,onClick:Be(e.onClick,()=>r.onOpenChange(!1))})});Kw.displayName=$w;function Pp(e){return e?"open":"closed"}var Yw="DialogTitleWarning",[X6,Gw]=EO(Yw,{contentName:zi,titleName:Dp,docsSlug:"dialog"}),eP=({titleId:e})=>{const n=Gw(Yw),s=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.
52
-
53
- If you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.
54
-
55
- For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return x.useEffect(()=>{e&&(document.getElementById(e)||console.error(s))},[s,e]),null},tP="DialogDescriptionWarning",nP=({contentRef:e,descriptionId:n})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Gw(tP).contentName}}.`;return x.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");n&&r&&(document.getElementById(n)||console.warn(i))},[i,e,n]),null},Xw=Pw,Zw=Lw,Qw=Vw,Jw=Bw,Ww=Uw,eE=Iw,aP=qw,tE=Kw;function sP({...e}){return m.jsx(Xw,{"data-slot":"sheet",...e})}function iP({...e}){return m.jsx(Zw,{"data-slot":"sheet-trigger",...e})}function oP({...e}){return m.jsx(Qw,{"data-slot":"sheet-portal",...e})}function rP({className:e,...n}){return m.jsx(Jw,{"data-slot":"sheet-overlay",className:re("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...n})}function lP({className:e,children:n,side:s="right",...i}){return m.jsxs(oP,{children:[m.jsx(rP,{}),m.jsxs(Ww,{"data-slot":"sheet-content",className:re("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",s==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",s==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",s==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",s==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",e),...i,children:[n,m.jsxs(tE,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none",children:[m.jsx(nw,{className:"size-4"}),m.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function cP({className:e,...n}){return m.jsx("div",{"data-slot":"sheet-header",className:re("flex flex-col gap-1.5 p-4",e),...n})}function uP({className:e,...n}){return m.jsx(eE,{"data-slot":"sheet-title",className:re("text-foreground font-semibold",e),...n})}function dP(e){try{globalThis.localStorage.setItem(X1,e)}catch{}}const nE=x.createContext(null);function fP({children:e}){const[n,s]=x.useState(()=>Z1()),i=x.useCallback(c=>{s(c)},[]);x.useEffect(()=>{dP(n)},[n]),x.useEffect(()=>{document.documentElement.lang=n,st.changeLanguage(n)},[n]);const r=x.useMemo(()=>({locale:n,setLocale:i}),[n,i]);return m.jsx(nE.Provider,{value:r,children:e})}function hP(){const e=x.useContext(nE);if(!e)throw new Error("useLocalePreference must be used within LocalePreferenceProvider");return e}function S0(e,[n,s]){return Math.min(s,Math.max(n,e))}function w0(e){const n=mP(e),s=x.forwardRef((i,r)=>{const{children:c,...u}=i,d=x.Children.toArray(c),f=d.find(gP);if(f){const h=f.props.children,y=d.map(g=>g===f?x.Children.count(h)>1?x.Children.only(null):x.isValidElement(h)?h.props.children:null:g);return m.jsx(n,{...u,ref:r,children:x.isValidElement(h)?x.cloneElement(h,void 0,y):null})}return m.jsx(n,{...u,ref:r,children:c})});return s.displayName=`${e}.Slot`,s}function mP(e){const n=x.forwardRef((s,i)=>{const{children:r,...c}=s;if(x.isValidElement(r)){const u=yP(r),d=vP(c,r.props);return r.type!==x.Fragment&&(d.ref=i?Zo(i,u):u),x.cloneElement(r,d)}return x.Children.count(r)>1?x.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var pP=Symbol("radix.slottable");function gP(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===pP}function vP(e,n){const s={...n};for(const i in n){const r=e[i],c=n[i];/^on[A-Z]/.test(i)?r&&c?s[i]=(...d)=>{const f=c(...d);return r(...d),f}:r&&(s[i]=r):i==="style"?s[i]={...r,...c}:i==="className"&&(s[i]=[r,c].filter(Boolean).join(" "))}return{...e,...s}}function yP(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=n&&"isReactWarning"in n&&n.isReactWarning;return s?e.ref:(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,s=n&&"isReactWarning"in n&&n.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}function aE(e){const n=e+"CollectionProvider",[s,i]=Qo(n),[r,c]=s(n,{collectionRef:{current:null},itemMap:new Map}),u=C=>{const{scope:A,children:T}=C,N=ie.useRef(null),R=ie.useRef(new Map).current;return m.jsx(r,{scope:A,itemMap:R,collectionRef:N,children:T})};u.displayName=n;const d=e+"CollectionSlot",f=w0(d),h=ie.forwardRef((C,A)=>{const{scope:T,children:N}=C,R=c(d,T),_=gt(A,R.collectionRef);return m.jsx(f,{ref:_,children:N})});h.displayName=d;const y=e+"CollectionItemSlot",g="data-radix-collection-item",b=w0(y),w=ie.forwardRef((C,A)=>{const{scope:T,children:N,...R}=C,_=ie.useRef(null),M=gt(A,_),U=c(y,T);return ie.useEffect(()=>(U.itemMap.set(_,{ref:_,...R}),()=>{U.itemMap.delete(_)})),m.jsx(b,{[g]:"",ref:M,children:N})});w.displayName=y;function E(C){const A=c(e+"CollectionConsumer",C);return ie.useCallback(()=>{const N=A.collectionRef.current;if(!N)return[];const R=Array.from(N.querySelectorAll(`[${g}]`));return Array.from(A.itemMap.values()).sort((U,L)=>R.indexOf(U.ref.current)-R.indexOf(L.ref.current))},[A.collectionRef,A.itemMap])}return[{Provider:u,Slot:h,ItemSlot:w},E,i]}var xP=x.createContext(void 0);function kp(e){const n=x.useContext(xP);return e||n||"ltr"}const bP=["top","right","bottom","left"],Ws=Math.min,zn=Math.max,Mu=Math.round,nu=Math.floor,Pa=e=>({x:e,y:e}),SP={left:"right",right:"left",bottom:"top",top:"bottom"},wP={start:"end",end:"start"};function Am(e,n,s){return zn(e,Ws(n,s))}function ms(e,n){return typeof e=="function"?e(n):e}function ps(e){return e.split("-")[0]}function Jo(e){return e.split("-")[1]}function Lp(e){return e==="x"?"y":"x"}function zp(e){return e==="y"?"height":"width"}const EP=new Set(["top","bottom"]);function Da(e){return EP.has(ps(e))?"y":"x"}function Vp(e){return Lp(Da(e))}function CP(e,n,s){s===void 0&&(s=!1);const i=Jo(e),r=Vp(e),c=zp(r);let u=r==="x"?i===(s?"end":"start")?"right":"left":i==="start"?"bottom":"top";return n.reference[c]>n.floating[c]&&(u=_u(u)),[u,_u(u)]}function TP(e){const n=_u(e);return[jm(e),n,jm(n)]}function jm(e){return e.replace(/start|end/g,n=>wP[n])}const E0=["left","right"],C0=["right","left"],AP=["top","bottom"],jP=["bottom","top"];function NP(e,n,s){switch(e){case"top":case"bottom":return s?n?C0:E0:n?E0:C0;case"left":case"right":return n?AP:jP;default:return[]}}function RP(e,n,s,i){const r=Jo(e);let c=NP(ps(e),s==="start",i);return r&&(c=c.map(u=>u+"-"+r),n&&(c=c.concat(c.map(jm)))),c}function _u(e){return e.replace(/left|right|bottom|top/g,n=>SP[n])}function MP(e){return{top:0,right:0,bottom:0,left:0,...e}}function sE(e){return typeof e!="number"?MP(e):{top:e,right:e,bottom:e,left:e}}function Ou(e){const{x:n,y:s,width:i,height:r}=e;return{width:i,height:r,top:s,left:n,right:n+i,bottom:s+r,x:n,y:s}}function T0(e,n,s){let{reference:i,floating:r}=e;const c=Da(n),u=Vp(n),d=zp(u),f=ps(n),h=c==="y",y=i.x+i.width/2-r.width/2,g=i.y+i.height/2-r.height/2,b=i[d]/2-r[d]/2;let w;switch(f){case"top":w={x:y,y:i.y-r.height};break;case"bottom":w={x:y,y:i.y+i.height};break;case"right":w={x:i.x+i.width,y:g};break;case"left":w={x:i.x-r.width,y:g};break;default:w={x:i.x,y:i.y}}switch(Jo(n)){case"start":w[u]-=b*(s&&h?-1:1);break;case"end":w[u]+=b*(s&&h?-1:1);break}return w}const _P=async(e,n,s)=>{const{placement:i="bottom",strategy:r="absolute",middleware:c=[],platform:u}=s,d=c.filter(Boolean),f=await(u.isRTL==null?void 0:u.isRTL(n));let h=await u.getElementRects({reference:e,floating:n,strategy:r}),{x:y,y:g}=T0(h,i,f),b=i,w={},E=0;for(let C=0;C<d.length;C++){const{name:A,fn:T}=d[C],{x:N,y:R,data:_,reset:M}=await T({x:y,y:g,initialPlacement:i,placement:b,strategy:r,middlewareData:w,rects:h,platform:u,elements:{reference:e,floating:n}});y=N??y,g=R??g,w={...w,[A]:{...w[A],..._}},M&&E<=50&&(E++,typeof M=="object"&&(M.placement&&(b=M.placement),M.rects&&(h=M.rects===!0?await u.getElementRects({reference:e,floating:n,strategy:r}):M.rects),{x:y,y:g}=T0(h,b,f)),C=-1)}return{x:y,y:g,placement:b,strategy:r,middlewareData:w}};async function hl(e,n){var s;n===void 0&&(n={});const{x:i,y:r,platform:c,rects:u,elements:d,strategy:f}=e,{boundary:h="clippingAncestors",rootBoundary:y="viewport",elementContext:g="floating",altBoundary:b=!1,padding:w=0}=ms(n,e),E=sE(w),A=d[b?g==="floating"?"reference":"floating":g],T=Ou(await c.getClippingRect({element:(s=await(c.isElement==null?void 0:c.isElement(A)))==null||s?A:A.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(d.floating)),boundary:h,rootBoundary:y,strategy:f})),N=g==="floating"?{x:i,y:r,width:u.floating.width,height:u.floating.height}:u.reference,R=await(c.getOffsetParent==null?void 0:c.getOffsetParent(d.floating)),_=await(c.isElement==null?void 0:c.isElement(R))?await(c.getScale==null?void 0:c.getScale(R))||{x:1,y:1}:{x:1,y:1},M=Ou(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:N,offsetParent:R,strategy:f}):N);return{top:(T.top-M.top+E.top)/_.y,bottom:(M.bottom-T.bottom+E.bottom)/_.y,left:(T.left-M.left+E.left)/_.x,right:(M.right-T.right+E.right)/_.x}}const OP=e=>({name:"arrow",options:e,async fn(n){const{x:s,y:i,placement:r,rects:c,platform:u,elements:d,middlewareData:f}=n,{element:h,padding:y=0}=ms(e,n)||{};if(h==null)return{};const g=sE(y),b={x:s,y:i},w=Vp(r),E=zp(w),C=await u.getDimensions(h),A=w==="y",T=A?"top":"left",N=A?"bottom":"right",R=A?"clientHeight":"clientWidth",_=c.reference[E]+c.reference[w]-b[w]-c.floating[E],M=b[w]-c.reference[w],U=await(u.getOffsetParent==null?void 0:u.getOffsetParent(h));let L=U?U[R]:0;(!L||!await(u.isElement==null?void 0:u.isElement(U)))&&(L=d.floating[R]||c.floating[E]);const O=_/2-M/2,K=L/2-C[E]/2-1,Z=Ws(g[T],K),J=Ws(g[N],K),se=Z,I=L-C[E]-J,ne=L/2-C[E]/2+O,le=Am(se,ne,I),D=!f.arrow&&Jo(r)!=null&&ne!==le&&c.reference[E]/2-(ne<se?Z:J)-C[E]/2<0,H=D?ne<se?ne-se:ne-I:0;return{[w]:b[w]+H,data:{[w]:le,centerOffset:ne-le-H,...D&&{alignmentOffset:H}},reset:D}}}),DP=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(n){var s,i;const{placement:r,middlewareData:c,rects:u,initialPlacement:d,platform:f,elements:h}=n,{mainAxis:y=!0,crossAxis:g=!0,fallbackPlacements:b,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:E="none",flipAlignment:C=!0,...A}=ms(e,n);if((s=c.arrow)!=null&&s.alignmentOffset)return{};const T=ps(r),N=Da(d),R=ps(d)===d,_=await(f.isRTL==null?void 0:f.isRTL(h.floating)),M=b||(R||!C?[_u(d)]:TP(d)),U=E!=="none";!b&&U&&M.push(...RP(d,C,E,_));const L=[d,...M],O=await hl(n,A),K=[];let Z=((i=c.flip)==null?void 0:i.overflows)||[];if(y&&K.push(O[T]),g){const ne=CP(r,u,_);K.push(O[ne[0]],O[ne[1]])}if(Z=[...Z,{placement:r,overflows:K}],!K.every(ne=>ne<=0)){var J,se;const ne=(((J=c.flip)==null?void 0:J.index)||0)+1,le=L[ne];if(le&&(!(g==="alignment"?N!==Da(le):!1)||Z.every(V=>Da(V.placement)===N?V.overflows[0]>0:!0)))return{data:{index:ne,overflows:Z},reset:{placement:le}};let D=(se=Z.filter(H=>H.overflows[0]<=0).sort((H,V)=>H.overflows[1]-V.overflows[1])[0])==null?void 0:se.placement;if(!D)switch(w){case"bestFit":{var I;const H=(I=Z.filter(V=>{if(U){const oe=Da(V.placement);return oe===N||oe==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(oe=>oe>0).reduce((oe,ue)=>oe+ue,0)]).sort((V,oe)=>V[1]-oe[1])[0])==null?void 0:I[0];H&&(D=H);break}case"initialPlacement":D=d;break}if(r!==D)return{reset:{placement:D}}}return{}}}};function A0(e,n){return{top:e.top-n.height,right:e.right-n.width,bottom:e.bottom-n.height,left:e.left-n.width}}function j0(e){return bP.some(n=>e[n]>=0)}const PP=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(n){const{rects:s}=n,{strategy:i="referenceHidden",...r}=ms(e,n);switch(i){case"referenceHidden":{const c=await hl(n,{...r,elementContext:"reference"}),u=A0(c,s.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:j0(u)}}}case"escaped":{const c=await hl(n,{...r,altBoundary:!0}),u=A0(c,s.floating);return{data:{escapedOffsets:u,escaped:j0(u)}}}default:return{}}}}},iE=new Set(["left","top"]);async function kP(e,n){const{placement:s,platform:i,elements:r}=e,c=await(i.isRTL==null?void 0:i.isRTL(r.floating)),u=ps(s),d=Jo(s),f=Da(s)==="y",h=iE.has(u)?-1:1,y=c&&f?-1:1,g=ms(n,e);let{mainAxis:b,crossAxis:w,alignmentAxis:E}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return d&&typeof E=="number"&&(w=d==="end"?E*-1:E),f?{x:w*y,y:b*h}:{x:b*h,y:w*y}}const LP=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var s,i;const{x:r,y:c,placement:u,middlewareData:d}=n,f=await kP(n,e);return u===((s=d.offset)==null?void 0:s.placement)&&(i=d.arrow)!=null&&i.alignmentOffset?{}:{x:r+f.x,y:c+f.y,data:{...f,placement:u}}}}},zP=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:s,y:i,placement:r}=n,{mainAxis:c=!0,crossAxis:u=!1,limiter:d={fn:A=>{let{x:T,y:N}=A;return{x:T,y:N}}},...f}=ms(e,n),h={x:s,y:i},y=await hl(n,f),g=Da(ps(r)),b=Lp(g);let w=h[b],E=h[g];if(c){const A=b==="y"?"top":"left",T=b==="y"?"bottom":"right",N=w+y[A],R=w-y[T];w=Am(N,w,R)}if(u){const A=g==="y"?"top":"left",T=g==="y"?"bottom":"right",N=E+y[A],R=E-y[T];E=Am(N,E,R)}const C=d.fn({...n,[b]:w,[g]:E});return{...C,data:{x:C.x-s,y:C.y-i,enabled:{[b]:c,[g]:u}}}}}},VP=function(e){return e===void 0&&(e={}),{options:e,fn(n){const{x:s,y:i,placement:r,rects:c,middlewareData:u}=n,{offset:d=0,mainAxis:f=!0,crossAxis:h=!0}=ms(e,n),y={x:s,y:i},g=Da(r),b=Lp(g);let w=y[b],E=y[g];const C=ms(d,n),A=typeof C=="number"?{mainAxis:C,crossAxis:0}:{mainAxis:0,crossAxis:0,...C};if(f){const R=b==="y"?"height":"width",_=c.reference[b]-c.floating[R]+A.mainAxis,M=c.reference[b]+c.reference[R]-A.mainAxis;w<_?w=_:w>M&&(w=M)}if(h){var T,N;const R=b==="y"?"width":"height",_=iE.has(ps(r)),M=c.reference[g]-c.floating[R]+(_&&((T=u.offset)==null?void 0:T[g])||0)+(_?0:A.crossAxis),U=c.reference[g]+c.reference[R]+(_?0:((N=u.offset)==null?void 0:N[g])||0)-(_?A.crossAxis:0);E<M?E=M:E>U&&(E=U)}return{[b]:w,[g]:E}}}},BP=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(n){var s,i;const{placement:r,rects:c,platform:u,elements:d}=n,{apply:f=()=>{},...h}=ms(e,n),y=await hl(n,h),g=ps(r),b=Jo(r),w=Da(r)==="y",{width:E,height:C}=c.floating;let A,T;g==="top"||g==="bottom"?(A=g,T=b===(await(u.isRTL==null?void 0:u.isRTL(d.floating))?"start":"end")?"left":"right"):(T=g,A=b==="end"?"top":"bottom");const N=C-y.top-y.bottom,R=E-y.left-y.right,_=Ws(C-y[A],N),M=Ws(E-y[T],R),U=!n.middlewareData.shift;let L=_,O=M;if((s=n.middlewareData.shift)!=null&&s.enabled.x&&(O=R),(i=n.middlewareData.shift)!=null&&i.enabled.y&&(L=N),U&&!b){const Z=zn(y.left,0),J=zn(y.right,0),se=zn(y.top,0),I=zn(y.bottom,0);w?O=E-2*(Z!==0||J!==0?Z+J:zn(y.left,y.right)):L=C-2*(se!==0||I!==0?se+I:zn(y.top,y.bottom))}await f({...n,availableWidth:O,availableHeight:L});const K=await u.getDimensions(d.floating);return E!==K.width||C!==K.height?{reset:{rects:!0}}:{}}}};function Qu(){return typeof window<"u"}function Wo(e){return oE(e)?(e.nodeName||"").toLowerCase():"#document"}function Vn(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function Ba(e){var n;return(n=(oE(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function oE(e){return Qu()?e instanceof Node||e instanceof Vn(e).Node:!1}function xa(e){return Qu()?e instanceof Element||e instanceof Vn(e).Element:!1}function za(e){return Qu()?e instanceof HTMLElement||e instanceof Vn(e).HTMLElement:!1}function N0(e){return!Qu()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Vn(e).ShadowRoot}const UP=new Set(["inline","contents"]);function Al(e){const{overflow:n,overflowX:s,overflowY:i,display:r}=ba(e);return/auto|scroll|overlay|hidden|clip/.test(n+i+s)&&!UP.has(r)}const HP=new Set(["table","td","th"]);function IP(e){return HP.has(Wo(e))}const FP=[":popover-open",":modal"];function Ju(e){return FP.some(n=>{try{return e.matches(n)}catch{return!1}})}const qP=["transform","translate","scale","rotate","perspective"],$P=["transform","translate","scale","rotate","perspective","filter"],KP=["paint","layout","strict","content"];function Bp(e){const n=Up(),s=xa(e)?ba(e):e;return qP.some(i=>s[i]?s[i]!=="none":!1)||(s.containerType?s.containerType!=="normal":!1)||!n&&(s.backdropFilter?s.backdropFilter!=="none":!1)||!n&&(s.filter?s.filter!=="none":!1)||$P.some(i=>(s.willChange||"").includes(i))||KP.some(i=>(s.contain||"").includes(i))}function YP(e){let n=ei(e);for(;za(n)&&!Fo(n);){if(Bp(n))return n;if(Ju(n))return null;n=ei(n)}return null}function Up(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const GP=new Set(["html","body","#document"]);function Fo(e){return GP.has(Wo(e))}function ba(e){return Vn(e).getComputedStyle(e)}function Wu(e){return xa(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ei(e){if(Wo(e)==="html")return e;const n=e.assignedSlot||e.parentNode||N0(e)&&e.host||Ba(e);return N0(n)?n.host:n}function rE(e){const n=ei(e);return Fo(n)?e.ownerDocument?e.ownerDocument.body:e.body:za(n)&&Al(n)?n:rE(n)}function ml(e,n,s){var i;n===void 0&&(n=[]),s===void 0&&(s=!0);const r=rE(e),c=r===((i=e.ownerDocument)==null?void 0:i.body),u=Vn(r);if(c){const d=Nm(u);return n.concat(u,u.visualViewport||[],Al(r)?r:[],d&&s?ml(d):[])}return n.concat(r,ml(r,[],s))}function Nm(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function lE(e){const n=ba(e);let s=parseFloat(n.width)||0,i=parseFloat(n.height)||0;const r=za(e),c=r?e.offsetWidth:s,u=r?e.offsetHeight:i,d=Mu(s)!==c||Mu(i)!==u;return d&&(s=c,i=u),{width:s,height:i,$:d}}function Hp(e){return xa(e)?e:e.contextElement}function Ho(e){const n=Hp(e);if(!za(n))return Pa(1);const s=n.getBoundingClientRect(),{width:i,height:r,$:c}=lE(n);let u=(c?Mu(s.width):s.width)/i,d=(c?Mu(s.height):s.height)/r;return(!u||!Number.isFinite(u))&&(u=1),(!d||!Number.isFinite(d))&&(d=1),{x:u,y:d}}const XP=Pa(0);function cE(e){const n=Vn(e);return!Up()||!n.visualViewport?XP:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function ZP(e,n,s){return n===void 0&&(n=!1),!s||n&&s!==Vn(e)?!1:n}function Vi(e,n,s,i){n===void 0&&(n=!1),s===void 0&&(s=!1);const r=e.getBoundingClientRect(),c=Hp(e);let u=Pa(1);n&&(i?xa(i)&&(u=Ho(i)):u=Ho(e));const d=ZP(c,s,i)?cE(c):Pa(0);let f=(r.left+d.x)/u.x,h=(r.top+d.y)/u.y,y=r.width/u.x,g=r.height/u.y;if(c){const b=Vn(c),w=i&&xa(i)?Vn(i):i;let E=b,C=Nm(E);for(;C&&i&&w!==E;){const A=Ho(C),T=C.getBoundingClientRect(),N=ba(C),R=T.left+(C.clientLeft+parseFloat(N.paddingLeft))*A.x,_=T.top+(C.clientTop+parseFloat(N.paddingTop))*A.y;f*=A.x,h*=A.y,y*=A.x,g*=A.y,f+=R,h+=_,E=Vn(C),C=Nm(E)}}return Ou({width:y,height:g,x:f,y:h})}function ed(e,n){const s=Wu(e).scrollLeft;return n?n.left+s:Vi(Ba(e)).left+s}function uE(e,n){const s=e.getBoundingClientRect(),i=s.left+n.scrollLeft-ed(e,s),r=s.top+n.scrollTop;return{x:i,y:r}}function QP(e){let{elements:n,rect:s,offsetParent:i,strategy:r}=e;const c=r==="fixed",u=Ba(i),d=n?Ju(n.floating):!1;if(i===u||d&&c)return s;let f={scrollLeft:0,scrollTop:0},h=Pa(1);const y=Pa(0),g=za(i);if((g||!g&&!c)&&((Wo(i)!=="body"||Al(u))&&(f=Wu(i)),za(i))){const w=Vi(i);h=Ho(i),y.x=w.x+i.clientLeft,y.y=w.y+i.clientTop}const b=u&&!g&&!c?uE(u,f):Pa(0);return{width:s.width*h.x,height:s.height*h.y,x:s.x*h.x-f.scrollLeft*h.x+y.x+b.x,y:s.y*h.y-f.scrollTop*h.y+y.y+b.y}}function JP(e){return Array.from(e.getClientRects())}function WP(e){const n=Ba(e),s=Wu(e),i=e.ownerDocument.body,r=zn(n.scrollWidth,n.clientWidth,i.scrollWidth,i.clientWidth),c=zn(n.scrollHeight,n.clientHeight,i.scrollHeight,i.clientHeight);let u=-s.scrollLeft+ed(e);const d=-s.scrollTop;return ba(i).direction==="rtl"&&(u+=zn(n.clientWidth,i.clientWidth)-r),{width:r,height:c,x:u,y:d}}const R0=25;function ek(e,n){const s=Vn(e),i=Ba(e),r=s.visualViewport;let c=i.clientWidth,u=i.clientHeight,d=0,f=0;if(r){c=r.width,u=r.height;const y=Up();(!y||y&&n==="fixed")&&(d=r.offsetLeft,f=r.offsetTop)}const h=ed(i);if(h<=0){const y=i.ownerDocument,g=y.body,b=getComputedStyle(g),w=y.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,E=Math.abs(i.clientWidth-g.clientWidth-w);E<=R0&&(c-=E)}else h<=R0&&(c+=h);return{width:c,height:u,x:d,y:f}}const tk=new Set(["absolute","fixed"]);function nk(e,n){const s=Vi(e,!0,n==="fixed"),i=s.top+e.clientTop,r=s.left+e.clientLeft,c=za(e)?Ho(e):Pa(1),u=e.clientWidth*c.x,d=e.clientHeight*c.y,f=r*c.x,h=i*c.y;return{width:u,height:d,x:f,y:h}}function M0(e,n,s){let i;if(n==="viewport")i=ek(e,s);else if(n==="document")i=WP(Ba(e));else if(xa(n))i=nk(n,s);else{const r=cE(e);i={x:n.x-r.x,y:n.y-r.y,width:n.width,height:n.height}}return Ou(i)}function dE(e,n){const s=ei(e);return s===n||!xa(s)||Fo(s)?!1:ba(s).position==="fixed"||dE(s,n)}function ak(e,n){const s=n.get(e);if(s)return s;let i=ml(e,[],!1).filter(d=>xa(d)&&Wo(d)!=="body"),r=null;const c=ba(e).position==="fixed";let u=c?ei(e):e;for(;xa(u)&&!Fo(u);){const d=ba(u),f=Bp(u);!f&&d.position==="fixed"&&(r=null),(c?!f&&!r:!f&&d.position==="static"&&!!r&&tk.has(r.position)||Al(u)&&!f&&dE(e,u))?i=i.filter(y=>y!==u):r=d,u=ei(u)}return n.set(e,i),i}function sk(e){let{element:n,boundary:s,rootBoundary:i,strategy:r}=e;const u=[...s==="clippingAncestors"?Ju(n)?[]:ak(n,this._c):[].concat(s),i],d=u[0],f=u.reduce((h,y)=>{const g=M0(n,y,r);return h.top=zn(g.top,h.top),h.right=Ws(g.right,h.right),h.bottom=Ws(g.bottom,h.bottom),h.left=zn(g.left,h.left),h},M0(n,d,r));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function ik(e){const{width:n,height:s}=lE(e);return{width:n,height:s}}function ok(e,n,s){const i=za(n),r=Ba(n),c=s==="fixed",u=Vi(e,!0,c,n);let d={scrollLeft:0,scrollTop:0};const f=Pa(0);function h(){f.x=ed(r)}if(i||!i&&!c)if((Wo(n)!=="body"||Al(r))&&(d=Wu(n)),i){const w=Vi(n,!0,c,n);f.x=w.x+n.clientLeft,f.y=w.y+n.clientTop}else r&&h();c&&!i&&r&&h();const y=r&&!i&&!c?uE(r,d):Pa(0),g=u.left+d.scrollLeft-f.x-y.x,b=u.top+d.scrollTop-f.y-y.y;return{x:g,y:b,width:u.width,height:u.height}}function Kh(e){return ba(e).position==="static"}function _0(e,n){if(!za(e)||ba(e).position==="fixed")return null;if(n)return n(e);let s=e.offsetParent;return Ba(e)===s&&(s=s.ownerDocument.body),s}function fE(e,n){const s=Vn(e);if(Ju(e))return s;if(!za(e)){let r=ei(e);for(;r&&!Fo(r);){if(xa(r)&&!Kh(r))return r;r=ei(r)}return s}let i=_0(e,n);for(;i&&IP(i)&&Kh(i);)i=_0(i,n);return i&&Fo(i)&&Kh(i)&&!Bp(i)?s:i||YP(e)||s}const rk=async function(e){const n=this.getOffsetParent||fE,s=this.getDimensions,i=await s(e.floating);return{reference:ok(e.reference,await n(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function lk(e){return ba(e).direction==="rtl"}const ck={convertOffsetParentRelativeRectToViewportRelativeRect:QP,getDocumentElement:Ba,getClippingRect:sk,getOffsetParent:fE,getElementRects:rk,getClientRects:JP,getDimensions:ik,getScale:Ho,isElement:xa,isRTL:lk};function hE(e,n){return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height}function uk(e,n){let s=null,i;const r=Ba(e);function c(){var d;clearTimeout(i),(d=s)==null||d.disconnect(),s=null}function u(d,f){d===void 0&&(d=!1),f===void 0&&(f=1),c();const h=e.getBoundingClientRect(),{left:y,top:g,width:b,height:w}=h;if(d||n(),!b||!w)return;const E=nu(g),C=nu(r.clientWidth-(y+b)),A=nu(r.clientHeight-(g+w)),T=nu(y),R={rootMargin:-E+"px "+-C+"px "+-A+"px "+-T+"px",threshold:zn(0,Ws(1,f))||1};let _=!0;function M(U){const L=U[0].intersectionRatio;if(L!==f){if(!_)return u();L?u(!1,L):i=setTimeout(()=>{u(!1,1e-7)},1e3)}L===1&&!hE(h,e.getBoundingClientRect())&&u(),_=!1}try{s=new IntersectionObserver(M,{...R,root:r.ownerDocument})}catch{s=new IntersectionObserver(M,R)}s.observe(e)}return u(!0),c}function dk(e,n,s,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:c=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:f=!1}=i,h=Hp(e),y=r||c?[...h?ml(h):[],...ml(n)]:[];y.forEach(T=>{r&&T.addEventListener("scroll",s,{passive:!0}),c&&T.addEventListener("resize",s)});const g=h&&d?uk(h,s):null;let b=-1,w=null;u&&(w=new ResizeObserver(T=>{let[N]=T;N&&N.target===h&&w&&(w.unobserve(n),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var R;(R=w)==null||R.observe(n)})),s()}),h&&!f&&w.observe(h),w.observe(n));let E,C=f?Vi(e):null;f&&A();function A(){const T=Vi(e);C&&!hE(C,T)&&s(),C=T,E=requestAnimationFrame(A)}return s(),()=>{var T;y.forEach(N=>{r&&N.removeEventListener("scroll",s),c&&N.removeEventListener("resize",s)}),g?.(),(T=w)==null||T.disconnect(),w=null,f&&cancelAnimationFrame(E)}}const fk=LP,hk=zP,mk=DP,pk=BP,gk=PP,O0=OP,vk=VP,yk=(e,n,s)=>{const i=new Map,r={platform:ck,...s},c={...r.platform,_c:i};return _P(e,n,{...r,platform:c})};var xk=typeof document<"u",bk=function(){},gu=xk?x.useLayoutEffect:bk;function Du(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(typeof e=="function"&&e.toString()===n.toString())return!0;let s,i,r;if(e&&n&&typeof e=="object"){if(Array.isArray(e)){if(s=e.length,s!==n.length)return!1;for(i=s;i--!==0;)if(!Du(e[i],n[i]))return!1;return!0}if(r=Object.keys(e),s=r.length,s!==Object.keys(n).length)return!1;for(i=s;i--!==0;)if(!{}.hasOwnProperty.call(n,r[i]))return!1;for(i=s;i--!==0;){const c=r[i];if(!(c==="_owner"&&e.$$typeof)&&!Du(e[c],n[c]))return!1}return!0}return e!==e&&n!==n}function mE(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function D0(e,n){const s=mE(e);return Math.round(n*s)/s}function Yh(e){const n=x.useRef(e);return gu(()=>{n.current=e}),n}function Sk(e){e===void 0&&(e={});const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:r,elements:{reference:c,floating:u}={},transform:d=!0,whileElementsMounted:f,open:h}=e,[y,g]=x.useState({x:0,y:0,strategy:s,placement:n,middlewareData:{},isPositioned:!1}),[b,w]=x.useState(i);Du(b,i)||w(i);const[E,C]=x.useState(null),[A,T]=x.useState(null),N=x.useCallback(V=>{V!==U.current&&(U.current=V,C(V))},[]),R=x.useCallback(V=>{V!==L.current&&(L.current=V,T(V))},[]),_=c||E,M=u||A,U=x.useRef(null),L=x.useRef(null),O=x.useRef(y),K=f!=null,Z=Yh(f),J=Yh(r),se=Yh(h),I=x.useCallback(()=>{if(!U.current||!L.current)return;const V={placement:n,strategy:s,middleware:b};J.current&&(V.platform=J.current),yk(U.current,L.current,V).then(oe=>{const ue={...oe,isPositioned:se.current!==!1};ne.current&&!Du(O.current,ue)&&(O.current=ue,Cl.flushSync(()=>{g(ue)}))})},[b,n,s,J,se]);gu(()=>{h===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,g(V=>({...V,isPositioned:!1})))},[h]);const ne=x.useRef(!1);gu(()=>(ne.current=!0,()=>{ne.current=!1}),[]),gu(()=>{if(_&&(U.current=_),M&&(L.current=M),_&&M){if(Z.current)return Z.current(_,M,I);I()}},[_,M,I,Z,K]);const le=x.useMemo(()=>({reference:U,floating:L,setReference:N,setFloating:R}),[N,R]),D=x.useMemo(()=>({reference:_,floating:M}),[_,M]),H=x.useMemo(()=>{const V={position:s,left:0,top:0};if(!D.floating)return V;const oe=D0(D.floating,y.x),ue=D0(D.floating,y.y);return d?{...V,transform:"translate("+oe+"px, "+ue+"px)",...mE(D.floating)>=1.5&&{willChange:"transform"}}:{position:s,left:oe,top:ue}},[s,d,D.floating,y.x,y.y]);return x.useMemo(()=>({...y,update:I,refs:le,elements:D,floatingStyles:H}),[y,I,le,D,H])}const wk=e=>{function n(s){return{}.hasOwnProperty.call(s,"current")}return{name:"arrow",options:e,fn(s){const{element:i,padding:r}=typeof e=="function"?e(s):e;return i&&n(i)?i.current!=null?O0({element:i.current,padding:r}).fn(s):{}:i?O0({element:i,padding:r}).fn(s):{}}}},Ek=(e,n)=>({...fk(e),options:[e,n]}),Ck=(e,n)=>({...hk(e),options:[e,n]}),Tk=(e,n)=>({...vk(e),options:[e,n]}),Ak=(e,n)=>({...mk(e),options:[e,n]}),jk=(e,n)=>({...pk(e),options:[e,n]}),Nk=(e,n)=>({...gk(e),options:[e,n]}),Rk=(e,n)=>({...wk(e),options:[e,n]});var Mk="Arrow",pE=x.forwardRef((e,n)=>{const{children:s,width:i=10,height:r=5,...c}=e;return m.jsx(Ie.svg,{...c,ref:n,width:i,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?s:m.jsx("polygon",{points:"0,0 30,0 15,10"})})});pE.displayName=Mk;var _k=pE;function Ok(e){const[n,s]=x.useState(void 0);return tn(()=>{if(e){s({width:e.offsetWidth,height:e.offsetHeight});const i=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const c=r[0];let u,d;if("borderBoxSize"in c){const f=c.borderBoxSize,h=Array.isArray(f)?f[0]:f;u=h.inlineSize,d=h.blockSize}else u=e.offsetWidth,d=e.offsetHeight;s({width:u,height:d})});return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}else s(void 0)},[e]),n}var Ip="Popper",[gE,vE]=Qo(Ip),[Dk,yE]=gE(Ip),xE=e=>{const{__scopePopper:n,children:s}=e,[i,r]=x.useState(null);return m.jsx(Dk,{scope:n,anchor:i,onAnchorChange:r,children:s})};xE.displayName=Ip;var bE="PopperAnchor",SE=x.forwardRef((e,n)=>{const{__scopePopper:s,virtualRef:i,...r}=e,c=yE(bE,s),u=x.useRef(null),d=gt(n,u),f=x.useRef(null);return x.useEffect(()=>{const h=f.current;f.current=i?.current||u.current,h!==f.current&&c.onAnchorChange(f.current)}),i?null:m.jsx(Ie.div,{...r,ref:d})});SE.displayName=bE;var Fp="PopperContent",[Pk,kk]=gE(Fp),wE=x.forwardRef((e,n)=>{const{__scopePopper:s,side:i="bottom",sideOffset:r=0,align:c="center",alignOffset:u=0,arrowPadding:d=0,avoidCollisions:f=!0,collisionBoundary:h=[],collisionPadding:y=0,sticky:g="partial",hideWhenDetached:b=!1,updatePositionStrategy:w="optimized",onPlaced:E,...C}=e,A=yE(Fp,s),[T,N]=x.useState(null),R=gt(n,ae=>N(ae)),[_,M]=x.useState(null),U=Ok(_),L=U?.width??0,O=U?.height??0,K=i+(c!=="center"?"-"+c:""),Z=typeof y=="number"?y:{top:0,right:0,bottom:0,left:0,...y},J=Array.isArray(h)?h:[h],se=J.length>0,I={padding:Z,boundary:J.filter(zk),altBoundary:se},{refs:ne,floatingStyles:le,placement:D,isPositioned:H,middlewareData:V}=Sk({strategy:"fixed",placement:K,whileElementsMounted:(...ae)=>dk(...ae,{animationFrame:w==="always"}),elements:{reference:A.anchor},middleware:[Ek({mainAxis:r+O,alignmentAxis:u}),f&&Ck({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?Tk():void 0,...I}),f&&Ak({...I}),jk({...I,apply:({elements:ae,rects:de,availableWidth:we,availableHeight:Te})=>{const{width:Ne,height:_e}=de.reference,vt=ae.floating.style;vt.setProperty("--radix-popper-available-width",`${we}px`),vt.setProperty("--radix-popper-available-height",`${Te}px`),vt.setProperty("--radix-popper-anchor-width",`${Ne}px`),vt.setProperty("--radix-popper-anchor-height",`${_e}px`)}}),_&&Rk({element:_,padding:d}),Vk({arrowWidth:L,arrowHeight:O}),b&&Nk({strategy:"referenceHidden",...I})]}),[oe,ue]=TE(D),P=Js(E);tn(()=>{H&&P?.()},[H,P]);const X=V.arrow?.x,G=V.arrow?.y,te=V.arrow?.centerOffset!==0,[ce,me]=x.useState();return tn(()=>{T&&me(window.getComputedStyle(T).zIndex)},[T]),m.jsx("div",{ref:ne.setFloating,"data-radix-popper-content-wrapper":"",style:{...le,transform:H?le.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ce,"--radix-popper-transform-origin":[V.transformOrigin?.x,V.transformOrigin?.y].join(" "),...V.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:m.jsx(Pk,{scope:s,placedSide:oe,onArrowChange:M,arrowX:X,arrowY:G,shouldHideArrow:te,children:m.jsx(Ie.div,{"data-side":oe,"data-align":ue,...C,ref:R,style:{...C.style,animation:H?void 0:"none"}})})})});wE.displayName=Fp;var EE="PopperArrow",Lk={top:"bottom",right:"left",bottom:"top",left:"right"},CE=x.forwardRef(function(n,s){const{__scopePopper:i,...r}=n,c=kk(EE,i),u=Lk[c.placedSide];return m.jsx("span",{ref:c.onArrowChange,style:{position:"absolute",left:c.arrowX,top:c.arrowY,[u]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[c.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[c.placedSide],visibility:c.shouldHideArrow?"hidden":void 0},children:m.jsx(_k,{...r,ref:s,style:{...r.style,display:"block"}})})});CE.displayName=EE;function zk(e){return e!==null}var Vk=e=>({name:"transformOrigin",options:e,fn(n){const{placement:s,rects:i,middlewareData:r}=n,u=r.arrow?.centerOffset!==0,d=u?0:e.arrowWidth,f=u?0:e.arrowHeight,[h,y]=TE(s),g={start:"0%",center:"50%",end:"100%"}[y],b=(r.arrow?.x??0)+d/2,w=(r.arrow?.y??0)+f/2;let E="",C="";return h==="bottom"?(E=u?g:`${b}px`,C=`${-f}px`):h==="top"?(E=u?g:`${b}px`,C=`${i.floating.height+f}px`):h==="right"?(E=`${-f}px`,C=u?g:`${w}px`):h==="left"&&(E=`${i.floating.width+f}px`,C=u?g:`${w}px`),{data:{x:E,y:C}}}});function TE(e){const[n,s="center"]=e.split("-");return[n,s]}var Bk=xE,Uk=SE,Hk=wE,Ik=CE;function Fk(e){const n=qk(e),s=x.forwardRef((i,r)=>{const{children:c,...u}=i,d=x.Children.toArray(c),f=d.find(Kk);if(f){const h=f.props.children,y=d.map(g=>g===f?x.Children.count(h)>1?x.Children.only(null):x.isValidElement(h)?h.props.children:null:g);return m.jsx(n,{...u,ref:r,children:x.isValidElement(h)?x.cloneElement(h,void 0,y):null})}return m.jsx(n,{...u,ref:r,children:c})});return s.displayName=`${e}.Slot`,s}function qk(e){const n=x.forwardRef((s,i)=>{const{children:r,...c}=s;if(x.isValidElement(r)){const u=Gk(r),d=Yk(c,r.props);return r.type!==x.Fragment&&(d.ref=i?Zo(i,u):u),x.cloneElement(r,d)}return x.Children.count(r)>1?x.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var $k=Symbol("radix.slottable");function Kk(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===$k}function Yk(e,n){const s={...n};for(const i in n){const r=e[i],c=n[i];/^on[A-Z]/.test(i)?r&&c?s[i]=(...d)=>{const f=c(...d);return r(...d),f}:r&&(s[i]=r):i==="style"?s[i]={...r,...c}:i==="className"&&(s[i]=[r,c].filter(Boolean).join(" "))}return{...e,...s}}function Gk(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=n&&"isReactWarning"in n&&n.isReactWarning;return s?e.ref:(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,s=n&&"isReactWarning"in n&&n.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}function Xk(e){const n=x.useRef({value:e,previous:e});return x.useMemo(()=>(n.current.value!==e&&(n.current.previous=n.current.value,n.current.value=e),n.current.previous),[e])}var AE=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Zk="VisuallyHidden",Qk=x.forwardRef((e,n)=>m.jsx(Ie.span,{...e,ref:n,style:{...AE,...e.style}}));Qk.displayName=Zk;var Jk=[" ","Enter","ArrowUp","ArrowDown"],Wk=[" ","Enter"],Bi="Select",[td,nd,eL]=aE(Bi),[er]=Qo(Bi,[eL,vE]),ad=vE(),[tL,ni]=er(Bi),[nL,aL]=er(Bi),jE=e=>{const{__scopeSelect:n,children:s,open:i,defaultOpen:r,onOpenChange:c,value:u,defaultValue:d,onValueChange:f,dir:h,name:y,autoComplete:g,disabled:b,required:w,form:E}=e,C=ad(n),[A,T]=x.useState(null),[N,R]=x.useState(null),[_,M]=x.useState(!1),U=kp(h),[L,O]=fl({prop:i,defaultProp:r??!1,onChange:c,caller:Bi}),[K,Z]=fl({prop:u,defaultProp:d,onChange:f,caller:Bi}),J=x.useRef(null),se=A?E||!!A.closest("form"):!0,[I,ne]=x.useState(new Set),le=Array.from(I).map(D=>D.props.value).join(";");return m.jsx(Bk,{...C,children:m.jsxs(tL,{required:w,scope:n,trigger:A,onTriggerChange:T,valueNode:N,onValueNodeChange:R,valueNodeHasChildren:_,onValueNodeHasChildrenChange:M,contentId:Qs(),value:K,onValueChange:Z,open:L,onOpenChange:O,dir:U,triggerPointerDownPosRef:J,disabled:b,children:[m.jsx(td.Provider,{scope:n,children:m.jsx(nL,{scope:e.__scopeSelect,onNativeOptionAdd:x.useCallback(D=>{ne(H=>new Set(H).add(D))},[]),onNativeOptionRemove:x.useCallback(D=>{ne(H=>{const V=new Set(H);return V.delete(D),V})},[]),children:s})}),se?m.jsxs(XE,{"aria-hidden":!0,required:w,tabIndex:-1,name:y,autoComplete:g,value:K,onChange:D=>Z(D.target.value),disabled:b,form:E,children:[K===void 0?m.jsx("option",{value:""}):null,Array.from(I)]},le):null]})})};jE.displayName=Bi;var NE="SelectTrigger",RE=x.forwardRef((e,n)=>{const{__scopeSelect:s,disabled:i=!1,...r}=e,c=ad(s),u=ni(NE,s),d=u.disabled||i,f=gt(n,u.onTriggerChange),h=nd(s),y=x.useRef("touch"),[g,b,w]=QE(C=>{const A=h().filter(R=>!R.disabled),T=A.find(R=>R.value===u.value),N=JE(A,C,T);N!==void 0&&u.onValueChange(N.value)}),E=C=>{d||(u.onOpenChange(!0),w()),C&&(u.triggerPointerDownPosRef.current={x:Math.round(C.pageX),y:Math.round(C.pageY)})};return m.jsx(Uk,{asChild:!0,...c,children:m.jsx(Ie.button,{type:"button",role:"combobox","aria-controls":u.contentId,"aria-expanded":u.open,"aria-required":u.required,"aria-autocomplete":"none",dir:u.dir,"data-state":u.open?"open":"closed",disabled:d,"data-disabled":d?"":void 0,"data-placeholder":ZE(u.value)?"":void 0,...r,ref:f,onClick:Be(r.onClick,C=>{C.currentTarget.focus(),y.current!=="mouse"&&E(C)}),onPointerDown:Be(r.onPointerDown,C=>{y.current=C.pointerType;const A=C.target;A.hasPointerCapture(C.pointerId)&&A.releasePointerCapture(C.pointerId),C.button===0&&C.ctrlKey===!1&&C.pointerType==="mouse"&&(E(C),C.preventDefault())}),onKeyDown:Be(r.onKeyDown,C=>{const A=g.current!=="";!(C.ctrlKey||C.altKey||C.metaKey)&&C.key.length===1&&b(C.key),!(A&&C.key===" ")&&Jk.includes(C.key)&&(E(),C.preventDefault())})})})});RE.displayName=NE;var ME="SelectValue",_E=x.forwardRef((e,n)=>{const{__scopeSelect:s,className:i,style:r,children:c,placeholder:u="",...d}=e,f=ni(ME,s),{onValueNodeHasChildrenChange:h}=f,y=c!==void 0,g=gt(n,f.onValueNodeChange);return tn(()=>{h(y)},[h,y]),m.jsx(Ie.span,{...d,ref:g,style:{pointerEvents:"none"},children:ZE(f.value)?m.jsx(m.Fragment,{children:u}):c})});_E.displayName=ME;var sL="SelectIcon",OE=x.forwardRef((e,n)=>{const{__scopeSelect:s,children:i,...r}=e;return m.jsx(Ie.span,{"aria-hidden":!0,...r,ref:n,children:i||"▼"})});OE.displayName=sL;var iL="SelectPortal",DE=e=>m.jsx(Mp,{asChild:!0,...e});DE.displayName=iL;var Ui="SelectContent",PE=x.forwardRef((e,n)=>{const s=ni(Ui,e.__scopeSelect),[i,r]=x.useState();if(tn(()=>{r(new DocumentFragment)},[]),!s.open){const c=i;return c?Cl.createPortal(m.jsx(kE,{scope:e.__scopeSelect,children:m.jsx(td.Slot,{scope:e.__scopeSelect,children:m.jsx("div",{children:e.children})})}),c):null}return m.jsx(LE,{...e,ref:n})});PE.displayName=Ui;var pa=10,[kE,ai]=er(Ui),oL="SelectContentImpl",rL=Fk("SelectContent.RemoveScroll"),LE=x.forwardRef((e,n)=>{const{__scopeSelect:s,position:i="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:c,onPointerDownOutside:u,side:d,sideOffset:f,align:h,alignOffset:y,arrowPadding:g,collisionBoundary:b,collisionPadding:w,sticky:E,hideWhenDetached:C,avoidCollisions:A,...T}=e,N=ni(Ui,s),[R,_]=x.useState(null),[M,U]=x.useState(null),L=gt(n,ae=>_(ae)),[O,K]=x.useState(null),[Z,J]=x.useState(null),se=nd(s),[I,ne]=x.useState(!1),le=x.useRef(!1);x.useEffect(()=>{if(R)return Ow(R)},[R]),Ew();const D=x.useCallback(ae=>{const[de,...we]=se().map(_e=>_e.ref.current),[Te]=we.slice(-1),Ne=document.activeElement;for(const _e of ae)if(_e===Ne||(_e?.scrollIntoView({block:"nearest"}),_e===de&&M&&(M.scrollTop=0),_e===Te&&M&&(M.scrollTop=M.scrollHeight),_e?.focus(),document.activeElement!==Ne))return},[se,M]),H=x.useCallback(()=>D([O,R]),[D,O,R]);x.useEffect(()=>{I&&H()},[I,H]);const{onOpenChange:V,triggerPointerDownPosRef:oe}=N;x.useEffect(()=>{if(R){let ae={x:0,y:0};const de=Te=>{ae={x:Math.abs(Math.round(Te.pageX)-(oe.current?.x??0)),y:Math.abs(Math.round(Te.pageY)-(oe.current?.y??0))}},we=Te=>{ae.x<=10&&ae.y<=10?Te.preventDefault():R.contains(Te.target)||V(!1),document.removeEventListener("pointermove",de),oe.current=null};return oe.current!==null&&(document.addEventListener("pointermove",de),document.addEventListener("pointerup",we,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",de),document.removeEventListener("pointerup",we,{capture:!0})}}},[R,V,oe]),x.useEffect(()=>{const ae=()=>V(!1);return window.addEventListener("blur",ae),window.addEventListener("resize",ae),()=>{window.removeEventListener("blur",ae),window.removeEventListener("resize",ae)}},[V]);const[ue,P]=QE(ae=>{const de=se().filter(Ne=>!Ne.disabled),we=de.find(Ne=>Ne.ref.current===document.activeElement),Te=JE(de,ae,we);Te&&setTimeout(()=>Te.ref.current.focus())}),X=x.useCallback((ae,de,we)=>{const Te=!le.current&&!we;(N.value!==void 0&&N.value===de||Te)&&(K(ae),Te&&(le.current=!0))},[N.value]),G=x.useCallback(()=>R?.focus(),[R]),te=x.useCallback((ae,de,we)=>{const Te=!le.current&&!we;(N.value!==void 0&&N.value===de||Te)&&J(ae)},[N.value]),ce=i==="popper"?Rm:zE,me=ce===Rm?{side:d,sideOffset:f,align:h,alignOffset:y,arrowPadding:g,collisionBoundary:b,collisionPadding:w,sticky:E,hideWhenDetached:C,avoidCollisions:A}:{};return m.jsx(kE,{scope:s,content:R,viewport:M,onViewportChange:U,itemRefCallback:X,selectedItem:O,onItemLeave:G,itemTextRefCallback:te,focusSelectedItem:H,selectedItemText:Z,position:i,isPositioned:I,searchRef:ue,children:m.jsx(_p,{as:rL,allowPinchZoom:!0,children:m.jsx(Rp,{asChild:!0,trapped:N.open,onMountAutoFocus:ae=>{ae.preventDefault()},onUnmountAutoFocus:Be(r,ae=>{N.trigger?.focus({preventScroll:!0}),ae.preventDefault()}),children:m.jsx(Np,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:ae=>ae.preventDefault(),onDismiss:()=>N.onOpenChange(!1),children:m.jsx(ce,{role:"listbox",id:N.contentId,"data-state":N.open?"open":"closed",dir:N.dir,onContextMenu:ae=>ae.preventDefault(),...T,...me,onPlaced:()=>ne(!0),ref:L,style:{display:"flex",flexDirection:"column",outline:"none",...T.style},onKeyDown:Be(T.onKeyDown,ae=>{const de=ae.ctrlKey||ae.altKey||ae.metaKey;if(ae.key==="Tab"&&ae.preventDefault(),!de&&ae.key.length===1&&P(ae.key),["ArrowUp","ArrowDown","Home","End"].includes(ae.key)){let Te=se().filter(Ne=>!Ne.disabled).map(Ne=>Ne.ref.current);if(["ArrowUp","End"].includes(ae.key)&&(Te=Te.slice().reverse()),["ArrowUp","ArrowDown"].includes(ae.key)){const Ne=ae.target,_e=Te.indexOf(Ne);Te=Te.slice(_e+1)}setTimeout(()=>D(Te)),ae.preventDefault()}})})})})})})});LE.displayName=oL;var lL="SelectItemAlignedPosition",zE=x.forwardRef((e,n)=>{const{__scopeSelect:s,onPlaced:i,...r}=e,c=ni(Ui,s),u=ai(Ui,s),[d,f]=x.useState(null),[h,y]=x.useState(null),g=gt(n,L=>y(L)),b=nd(s),w=x.useRef(!1),E=x.useRef(!0),{viewport:C,selectedItem:A,selectedItemText:T,focusSelectedItem:N}=u,R=x.useCallback(()=>{if(c.trigger&&c.valueNode&&d&&h&&C&&A&&T){const L=c.trigger.getBoundingClientRect(),O=h.getBoundingClientRect(),K=c.valueNode.getBoundingClientRect(),Z=T.getBoundingClientRect();if(c.dir!=="rtl"){const Ne=Z.left-O.left,_e=K.left-Ne,vt=L.left-_e,ot=L.width+vt,jn=Math.max(ot,O.width),Gt=window.innerWidth-pa,nn=S0(_e,[pa,Math.max(pa,Gt-jn)]);d.style.minWidth=ot+"px",d.style.left=nn+"px"}else{const Ne=O.right-Z.right,_e=window.innerWidth-K.right-Ne,vt=window.innerWidth-L.right-_e,ot=L.width+vt,jn=Math.max(ot,O.width),Gt=window.innerWidth-pa,nn=S0(_e,[pa,Math.max(pa,Gt-jn)]);d.style.minWidth=ot+"px",d.style.right=nn+"px"}const J=b(),se=window.innerHeight-pa*2,I=C.scrollHeight,ne=window.getComputedStyle(h),le=parseInt(ne.borderTopWidth,10),D=parseInt(ne.paddingTop,10),H=parseInt(ne.borderBottomWidth,10),V=parseInt(ne.paddingBottom,10),oe=le+D+I+V+H,ue=Math.min(A.offsetHeight*5,oe),P=window.getComputedStyle(C),X=parseInt(P.paddingTop,10),G=parseInt(P.paddingBottom,10),te=L.top+L.height/2-pa,ce=se-te,me=A.offsetHeight/2,ae=A.offsetTop+me,de=le+D+ae,we=oe-de;if(de<=te){const Ne=J.length>0&&A===J[J.length-1].ref.current;d.style.bottom="0px";const _e=h.clientHeight-C.offsetTop-C.offsetHeight,vt=Math.max(ce,me+(Ne?G:0)+_e+H),ot=de+vt;d.style.height=ot+"px"}else{const Ne=J.length>0&&A===J[0].ref.current;d.style.top="0px";const vt=Math.max(te,le+C.offsetTop+(Ne?X:0)+me)+we;d.style.height=vt+"px",C.scrollTop=de-te+C.offsetTop}d.style.margin=`${pa}px 0`,d.style.minHeight=ue+"px",d.style.maxHeight=se+"px",i?.(),requestAnimationFrame(()=>w.current=!0)}},[b,c.trigger,c.valueNode,d,h,C,A,T,c.dir,i]);tn(()=>R(),[R]);const[_,M]=x.useState();tn(()=>{h&&M(window.getComputedStyle(h).zIndex)},[h]);const U=x.useCallback(L=>{L&&E.current===!0&&(R(),N?.(),E.current=!1)},[R,N]);return m.jsx(uL,{scope:s,contentWrapper:d,shouldExpandOnScrollRef:w,onScrollButtonChange:U,children:m.jsx("div",{ref:f,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:m.jsx(Ie.div,{...r,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});zE.displayName=lL;var cL="SelectPopperPosition",Rm=x.forwardRef((e,n)=>{const{__scopeSelect:s,align:i="start",collisionPadding:r=pa,...c}=e,u=ad(s);return m.jsx(Hk,{...u,...c,ref:n,align:i,collisionPadding:r,style:{boxSizing:"border-box",...c.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Rm.displayName=cL;var[uL,qp]=er(Ui,{}),Mm="SelectViewport",VE=x.forwardRef((e,n)=>{const{__scopeSelect:s,nonce:i,...r}=e,c=ai(Mm,s),u=qp(Mm,s),d=gt(n,c.onViewportChange),f=x.useRef(0);return m.jsxs(m.Fragment,{children:[m.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),m.jsx(td.Slot,{scope:s,children:m.jsx(Ie.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:d,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:Be(r.onScroll,h=>{const y=h.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:b}=u;if(b?.current&&g){const w=Math.abs(f.current-y.scrollTop);if(w>0){const E=window.innerHeight-pa*2,C=parseFloat(g.style.minHeight),A=parseFloat(g.style.height),T=Math.max(C,A);if(T<E){const N=T+w,R=Math.min(E,N),_=N-R;g.style.height=R+"px",g.style.bottom==="0px"&&(y.scrollTop=_>0?_:0,g.style.justifyContent="flex-end")}}}f.current=y.scrollTop})})})]})});VE.displayName=Mm;var BE="SelectGroup",[dL,fL]=er(BE),hL=x.forwardRef((e,n)=>{const{__scopeSelect:s,...i}=e,r=Qs();return m.jsx(dL,{scope:s,id:r,children:m.jsx(Ie.div,{role:"group","aria-labelledby":r,...i,ref:n})})});hL.displayName=BE;var UE="SelectLabel",mL=x.forwardRef((e,n)=>{const{__scopeSelect:s,...i}=e,r=fL(UE,s);return m.jsx(Ie.div,{id:r.id,...i,ref:n})});mL.displayName=UE;var Pu="SelectItem",[pL,HE]=er(Pu),IE=x.forwardRef((e,n)=>{const{__scopeSelect:s,value:i,disabled:r=!1,textValue:c,...u}=e,d=ni(Pu,s),f=ai(Pu,s),h=d.value===i,[y,g]=x.useState(c??""),[b,w]=x.useState(!1),E=gt(n,N=>f.itemRefCallback?.(N,i,r)),C=Qs(),A=x.useRef("touch"),T=()=>{r||(d.onValueChange(i),d.onOpenChange(!1))};if(i==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return m.jsx(pL,{scope:s,value:i,disabled:r,textId:C,isSelected:h,onItemTextChange:x.useCallback(N=>{g(R=>R||(N?.textContent??"").trim())},[]),children:m.jsx(td.ItemSlot,{scope:s,value:i,disabled:r,textValue:y,children:m.jsx(Ie.div,{role:"option","aria-labelledby":C,"data-highlighted":b?"":void 0,"aria-selected":h&&b,"data-state":h?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...u,ref:E,onFocus:Be(u.onFocus,()=>w(!0)),onBlur:Be(u.onBlur,()=>w(!1)),onClick:Be(u.onClick,()=>{A.current!=="mouse"&&T()}),onPointerUp:Be(u.onPointerUp,()=>{A.current==="mouse"&&T()}),onPointerDown:Be(u.onPointerDown,N=>{A.current=N.pointerType}),onPointerMove:Be(u.onPointerMove,N=>{A.current=N.pointerType,r?f.onItemLeave?.():A.current==="mouse"&&N.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Be(u.onPointerLeave,N=>{N.currentTarget===document.activeElement&&f.onItemLeave?.()}),onKeyDown:Be(u.onKeyDown,N=>{f.searchRef?.current!==""&&N.key===" "||(Wk.includes(N.key)&&T(),N.key===" "&&N.preventDefault())})})})})});IE.displayName=Pu;var el="SelectItemText",FE=x.forwardRef((e,n)=>{const{__scopeSelect:s,className:i,style:r,...c}=e,u=ni(el,s),d=ai(el,s),f=HE(el,s),h=aL(el,s),[y,g]=x.useState(null),b=gt(n,T=>g(T),f.onItemTextChange,T=>d.itemTextRefCallback?.(T,f.value,f.disabled)),w=y?.textContent,E=x.useMemo(()=>m.jsx("option",{value:f.value,disabled:f.disabled,children:w},f.value),[f.disabled,f.value,w]),{onNativeOptionAdd:C,onNativeOptionRemove:A}=h;return tn(()=>(C(E),()=>A(E)),[C,A,E]),m.jsxs(m.Fragment,{children:[m.jsx(Ie.span,{id:f.textId,...c,ref:b}),f.isSelected&&u.valueNode&&!u.valueNodeHasChildren?Cl.createPortal(c.children,u.valueNode):null]})});FE.displayName=el;var qE="SelectItemIndicator",$E=x.forwardRef((e,n)=>{const{__scopeSelect:s,...i}=e;return HE(qE,s).isSelected?m.jsx(Ie.span,{"aria-hidden":!0,...i,ref:n}):null});$E.displayName=qE;var _m="SelectScrollUpButton",KE=x.forwardRef((e,n)=>{const s=ai(_m,e.__scopeSelect),i=qp(_m,e.__scopeSelect),[r,c]=x.useState(!1),u=gt(n,i.onScrollButtonChange);return tn(()=>{if(s.viewport&&s.isPositioned){let d=function(){const h=f.scrollTop>0;c(h)};const f=s.viewport;return d(),f.addEventListener("scroll",d),()=>f.removeEventListener("scroll",d)}},[s.viewport,s.isPositioned]),r?m.jsx(GE,{...e,ref:u,onAutoScroll:()=>{const{viewport:d,selectedItem:f}=s;d&&f&&(d.scrollTop=d.scrollTop-f.offsetHeight)}}):null});KE.displayName=_m;var Om="SelectScrollDownButton",YE=x.forwardRef((e,n)=>{const s=ai(Om,e.__scopeSelect),i=qp(Om,e.__scopeSelect),[r,c]=x.useState(!1),u=gt(n,i.onScrollButtonChange);return tn(()=>{if(s.viewport&&s.isPositioned){let d=function(){const h=f.scrollHeight-f.clientHeight,y=Math.ceil(f.scrollTop)<h;c(y)};const f=s.viewport;return d(),f.addEventListener("scroll",d),()=>f.removeEventListener("scroll",d)}},[s.viewport,s.isPositioned]),r?m.jsx(GE,{...e,ref:u,onAutoScroll:()=>{const{viewport:d,selectedItem:f}=s;d&&f&&(d.scrollTop=d.scrollTop+f.offsetHeight)}}):null});YE.displayName=Om;var GE=x.forwardRef((e,n)=>{const{__scopeSelect:s,onAutoScroll:i,...r}=e,c=ai("SelectScrollButton",s),u=x.useRef(null),d=nd(s),f=x.useCallback(()=>{u.current!==null&&(window.clearInterval(u.current),u.current=null)},[]);return x.useEffect(()=>()=>f(),[f]),tn(()=>{d().find(y=>y.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[d]),m.jsx(Ie.div,{"aria-hidden":!0,...r,ref:n,style:{flexShrink:0,...r.style},onPointerDown:Be(r.onPointerDown,()=>{u.current===null&&(u.current=window.setInterval(i,50))}),onPointerMove:Be(r.onPointerMove,()=>{c.onItemLeave?.(),u.current===null&&(u.current=window.setInterval(i,50))}),onPointerLeave:Be(r.onPointerLeave,()=>{f()})})}),gL="SelectSeparator",vL=x.forwardRef((e,n)=>{const{__scopeSelect:s,...i}=e;return m.jsx(Ie.div,{"aria-hidden":!0,...i,ref:n})});vL.displayName=gL;var Dm="SelectArrow",yL=x.forwardRef((e,n)=>{const{__scopeSelect:s,...i}=e,r=ad(s),c=ni(Dm,s),u=ai(Dm,s);return c.open&&u.position==="popper"?m.jsx(Ik,{...r,...i,ref:n}):null});yL.displayName=Dm;var xL="SelectBubbleInput",XE=x.forwardRef(({__scopeSelect:e,value:n,...s},i)=>{const r=x.useRef(null),c=gt(i,r),u=Xk(n);return x.useEffect(()=>{const d=r.current;if(!d)return;const f=window.HTMLSelectElement.prototype,y=Object.getOwnPropertyDescriptor(f,"value").set;if(u!==n&&y){const g=new Event("change",{bubbles:!0});y.call(d,n),d.dispatchEvent(g)}},[u,n]),m.jsx(Ie.select,{...s,style:{...AE,...s.style},ref:c,defaultValue:n})});XE.displayName=xL;function ZE(e){return e===""||e===void 0}function QE(e){const n=Js(e),s=x.useRef(""),i=x.useRef(0),r=x.useCallback(u=>{const d=s.current+u;n(d),(function f(h){s.current=h,window.clearTimeout(i.current),h!==""&&(i.current=window.setTimeout(()=>f(""),1e3))})(d)},[n]),c=x.useCallback(()=>{s.current="",window.clearTimeout(i.current)},[]);return x.useEffect(()=>()=>window.clearTimeout(i.current),[]),[s,r,c]}function JE(e,n,s){const r=n.length>1&&Array.from(n).every(h=>h===n[0])?n[0]:n,c=s?e.indexOf(s):-1;let u=bL(e,Math.max(c,0));r.length===1&&(u=u.filter(h=>h!==s));const f=u.find(h=>h.textValue.toLowerCase().startsWith(r.toLowerCase()));return f!==s?f:void 0}function bL(e,n){return e.map((s,i)=>e[(n+i)%e.length])}var SL=jE,wL=RE,EL=_E,CL=OE,TL=DE,AL=PE,jL=VE,NL=IE,RL=FE,ML=$E,_L=KE,OL=YE;function aa({...e}){return m.jsx(SL,{"data-slot":"select",...e})}function sa({...e}){return m.jsx(EL,{"data-slot":"select-value",...e})}function ia({className:e,size:n="default",children:s,...i}){return m.jsxs(wL,{"data-slot":"select-trigger","data-size":n,className:re("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...i,children:[s,m.jsx(CL,{asChild:!0,children:m.jsx(Cp,{className:"size-4 opacity-50"})})]})}function oa({className:e,children:n,position:s="item-aligned",align:i="center",...r}){return m.jsx(TL,{children:m.jsxs(AL,{"data-slot":"select-content",className:re("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",s==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:s,align:i,...r,children:[m.jsx(DL,{}),m.jsx(jL,{className:re("p-1",s==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:n}),m.jsx(PL,{})]})})}function De({className:e,children:n,...s}){return m.jsxs(NL,{"data-slot":"select-item",className:re("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_span:last-child]:flex [&_span:last-child]:items-center [&_span:last-child]:gap-2",e),...s,children:[m.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:m.jsx(ML,{children:m.jsx(G2,{className:"size-4"})})}),m.jsx(RL,{children:n})]})}function DL({className:e,...n}){return m.jsx(_L,{"data-slot":"select-scroll-up-button",className:re("flex cursor-default items-center justify-center py-1",e),...n,children:m.jsx(W2,{className:"size-4"})})}function PL({className:e,...n}){return m.jsx(OL,{"data-slot":"select-scroll-down-button",className:re("flex cursor-default items-center justify-center py-1",e),...n,children:m.jsx(Cp,{className:"size-4"})})}function kL(){const{t:e}=qe(),{locale:n,setLocale:s}=hP();return m.jsxs(aa,{value:n,onValueChange:i=>s(bm(i)),children:[m.jsxs(ia,{size:"sm",className:"w-[8.5rem]","aria-label":e("app.language"),children:[m.jsx(l_,{className:"size-4"}),m.jsx(sa,{})]}),m.jsxs(oa,{align:"end",children:[m.jsx(De,{value:"en-US",children:e("locale.enUS")}),m.jsx(De,{value:"zh-CN",children:e("locale.zhCN")})]})]})}function LL({theme:e}){return e==="light"?m.jsx(w_,{className:"size-4"}):e==="dark"?m.jsx(x_,{className:"size-4"}):m.jsx(h_,{className:"size-4"})}function zL(){const{t:e}=qe(),{theme:n,setTheme:s}=V1();return m.jsxs(aa,{value:n??"system",onValueChange:s,children:[m.jsxs(ia,{size:"sm",className:"w-[8.5rem]","aria-label":e("theme.label"),children:[m.jsx(LL,{theme:n}),m.jsx(sa,{})]}),m.jsxs(oa,{align:"end",children:[m.jsx(De,{value:"system",children:e("theme.system")}),m.jsx(De,{value:"light",children:e("theme.light")}),m.jsx(De,{value:"dark",children:e("theme.dark")})]})]})}function VL(e){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css",n.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}const BL=e=>{switch(e){case"success":return IL;case"info":return qL;case"warning":return FL;case"error":return $L;default:return null}},UL=Array(12).fill(0),HL=({visible:e,className:n})=>ie.createElement("div",{className:["sonner-loading-wrapper",n].filter(Boolean).join(" "),"data-visible":e},ie.createElement("div",{className:"sonner-spinner"},UL.map((s,i)=>ie.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${i}`})))),IL=ie.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ie.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"})),FL=ie.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ie.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"})),qL=ie.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ie.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"})),$L=ie.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ie.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"})),KL=ie.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"},ie.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ie.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),YL=()=>{const[e,n]=ie.useState(document.hidden);return ie.useEffect(()=>{const s=()=>{n(document.hidden)};return document.addEventListener("visibilitychange",s),()=>window.removeEventListener("visibilitychange",s)},[]),e};let Pm=1;class GL{constructor(){this.subscribe=n=>(this.subscribers.push(n),()=>{const s=this.subscribers.indexOf(n);this.subscribers.splice(s,1)}),this.publish=n=>{this.subscribers.forEach(s=>s(n))},this.addToast=n=>{this.publish(n),this.toasts=[...this.toasts,n]},this.create=n=>{var s;const{message:i,...r}=n,c=typeof n?.id=="number"||((s=n.id)==null?void 0:s.length)>0?n.id:Pm++,u=this.toasts.find(f=>f.id===c),d=n.dismissible===void 0?!0:n.dismissible;return this.dismissedToasts.has(c)&&this.dismissedToasts.delete(c),u?this.toasts=this.toasts.map(f=>f.id===c?(this.publish({...f,...n,id:c,title:i}),{...f,...n,id:c,dismissible:d,title:i}):f):this.addToast({title:i,...r,dismissible:d,id:c}),c},this.dismiss=n=>(n?(this.dismissedToasts.add(n),requestAnimationFrame(()=>this.subscribers.forEach(s=>s({id:n,dismiss:!0})))):this.toasts.forEach(s=>{this.subscribers.forEach(i=>i({id:s.id,dismiss:!0}))}),n),this.message=(n,s)=>this.create({...s,message:n}),this.error=(n,s)=>this.create({...s,message:n,type:"error"}),this.success=(n,s)=>this.create({...s,type:"success",message:n}),this.info=(n,s)=>this.create({...s,type:"info",message:n}),this.warning=(n,s)=>this.create({...s,type:"warning",message:n}),this.loading=(n,s)=>this.create({...s,type:"loading",message:n}),this.promise=(n,s)=>{if(!s)return;let i;s.loading!==void 0&&(i=this.create({...s,promise:n,type:"loading",message:s.loading,description:typeof s.description!="function"?s.description:void 0}));const r=Promise.resolve(n instanceof Function?n():n);let c=i!==void 0,u;const d=r.then(async h=>{if(u=["resolve",h],ie.isValidElement(h))c=!1,this.create({id:i,type:"default",message:h});else if(ZL(h)&&!h.ok){c=!1;const g=typeof s.error=="function"?await s.error(`HTTP error! status: ${h.status}`):s.error,b=typeof s.description=="function"?await s.description(`HTTP error! status: ${h.status}`):s.description,E=typeof g=="object"&&!ie.isValidElement(g)?g:{message:g};this.create({id:i,type:"error",description:b,...E})}else if(h instanceof Error){c=!1;const g=typeof s.error=="function"?await s.error(h):s.error,b=typeof s.description=="function"?await s.description(h):s.description,E=typeof g=="object"&&!ie.isValidElement(g)?g:{message:g};this.create({id:i,type:"error",description:b,...E})}else if(s.success!==void 0){c=!1;const g=typeof s.success=="function"?await s.success(h):s.success,b=typeof s.description=="function"?await s.description(h):s.description,E=typeof g=="object"&&!ie.isValidElement(g)?g:{message:g};this.create({id:i,type:"success",description:b,...E})}}).catch(async h=>{if(u=["reject",h],s.error!==void 0){c=!1;const y=typeof s.error=="function"?await s.error(h):s.error,g=typeof s.description=="function"?await s.description(h):s.description,w=typeof y=="object"&&!ie.isValidElement(y)?y:{message:y};this.create({id:i,type:"error",description:g,...w})}}).finally(()=>{c&&(this.dismiss(i),i=void 0),s.finally==null||s.finally.call(s)}),f=()=>new Promise((h,y)=>d.then(()=>u[0]==="reject"?y(u[1]):h(u[1])).catch(y));return typeof i!="string"&&typeof i!="number"?{unwrap:f}:Object.assign(i,{unwrap:f})},this.custom=(n,s)=>{const i=s?.id||Pm++;return this.create({jsx:n(i),id:i,...s}),i},this.getActiveToasts=()=>this.toasts.filter(n=>!this.dismissedToasts.has(n.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const bn=new GL,XL=(e,n)=>{const s=n?.id||Pm++;return bn.addToast({title:e,...n,id:s}),s},ZL=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",QL=XL,JL=()=>bn.toasts,WL=()=>bn.getActiveToasts(),Wt=Object.assign(QL,{success:bn.success,info:bn.info,warning:bn.warning,error:bn.error,custom:bn.custom,message:bn.message,promise:bn.promise,dismiss:bn.dismiss,loading:bn.loading},{getHistory:JL,getToasts:WL});VL("[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}[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(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);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]{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 au(e){return e.label!==void 0}const e4=3,t4="24px",n4="16px",P0=4e3,a4=356,s4=14,i4=45,o4=200;function Ma(...e){return e.filter(Boolean).join(" ")}function r4(e){const[n,s]=e.split("-"),i=[];return n&&i.push(n),s&&i.push(s),i}const l4=e=>{var n,s,i,r,c,u,d,f,h;const{invert:y,toast:g,unstyled:b,interacting:w,setHeights:E,visibleToasts:C,heights:A,index:T,toasts:N,expanded:R,removeToast:_,defaultRichColors:M,closeButton:U,style:L,cancelButtonStyle:O,actionButtonStyle:K,className:Z="",descriptionClassName:J="",duration:se,position:I,gap:ne,expandByDefault:le,classNames:D,icons:H,closeButtonAriaLabel:V="Close toast"}=e,[oe,ue]=ie.useState(null),[P,X]=ie.useState(null),[G,te]=ie.useState(!1),[ce,me]=ie.useState(!1),[ae,de]=ie.useState(!1),[we,Te]=ie.useState(!1),[Ne,_e]=ie.useState(!1),[vt,ot]=ie.useState(0),[jn,Gt]=ie.useState(0),nn=ie.useRef(g.duration||se||P0),Ea=ie.useRef(null),Ht=ie.useRef(null),Ua=T===0,Ha=T+1<=C,Mt=g.type,Un=g.dismissible!==!1,_t=g.className||"",bs=g.descriptionClassName||"",dn=ie.useMemo(()=>A.findIndex(Ce=>Ce.toastId===g.id)||0,[A,g.id]),la=ie.useMemo(()=>{var Ce;return(Ce=g.closeButton)!=null?Ce:U},[g.closeButton,U]),Hn=ie.useMemo(()=>g.duration||se||P0,[g.duration,se]),Ia=ie.useRef(0),Nn=ie.useRef(0),Ss=ie.useRef(0),In=ie.useRef(null),[ca,Ot]=I.split("-"),an=ie.useMemo(()=>A.reduce((Ce,Qe,St)=>St>=dn?Ce:Ce+Qe.height,0),[A,dn]),bt=YL(),oi=g.invert||y,lt=Mt==="loading";Nn.current=ie.useMemo(()=>dn*ne+an,[dn,an]),ie.useEffect(()=>{nn.current=Hn},[Hn]),ie.useEffect(()=>{te(!0)},[]),ie.useEffect(()=>{const Ce=Ht.current;if(Ce){const Qe=Ce.getBoundingClientRect().height;return Gt(Qe),E(St=>[{toastId:g.id,height:Qe,position:g.position},...St]),()=>E(St=>St.filter(Vt=>Vt.toastId!==g.id))}},[E,g.id]),ie.useLayoutEffect(()=>{if(!G)return;const Ce=Ht.current,Qe=Ce.style.height;Ce.style.height="auto";const St=Ce.getBoundingClientRect().height;Ce.style.height=Qe,Gt(St),E(Vt=>Vt.find(et=>et.toastId===g.id)?Vt.map(et=>et.toastId===g.id?{...et,height:St}:et):[{toastId:g.id,height:St,position:g.position},...Vt])},[G,g.title,g.description,E,g.id,g.jsx,g.action,g.cancel]);const fn=ie.useCallback(()=>{me(!0),ot(Nn.current),E(Ce=>Ce.filter(Qe=>Qe.toastId!==g.id)),setTimeout(()=>{_(g)},o4)},[g,_,E,Nn]);ie.useEffect(()=>{if(g.promise&&Mt==="loading"||g.duration===1/0||g.type==="loading")return;let Ce;return R||w||bt?(()=>{if(Ss.current<Ia.current){const Vt=new Date().getTime()-Ia.current;nn.current=nn.current-Vt}Ss.current=new Date().getTime()})():nn.current!==1/0&&(Ia.current=new Date().getTime(),Ce=setTimeout(()=>{g.onAutoClose==null||g.onAutoClose.call(g,g),fn()},nn.current)),()=>clearTimeout(Ce)},[R,w,g,Mt,bt,fn]),ie.useEffect(()=>{g.delete&&(fn(),g.onDismiss==null||g.onDismiss.call(g,g))},[fn,g.delete]);function sn(){var Ce;if(H?.loading){var Qe;return ie.createElement("div",{className:Ma(D?.loader,g==null||(Qe=g.classNames)==null?void 0:Qe.loader,"sonner-loader"),"data-visible":Mt==="loading"},H.loading)}return ie.createElement(HL,{className:Ma(D?.loader,g==null||(Ce=g.classNames)==null?void 0:Ce.loader),visible:Mt==="loading"})}const hn=g.icon||H?.[Mt]||BL(Mt);var ua,ct;return ie.createElement("li",{tabIndex:0,ref:Ht,className:Ma(Z,_t,D?.toast,g==null||(n=g.classNames)==null?void 0:n.toast,D?.default,D?.[Mt],g==null||(s=g.classNames)==null?void 0:s[Mt]),"data-sonner-toast":"","data-rich-colors":(ua=g.richColors)!=null?ua:M,"data-styled":!(g.jsx||g.unstyled||b),"data-mounted":G,"data-promise":!!g.promise,"data-swiped":Ne,"data-removed":ce,"data-visible":Ha,"data-y-position":ca,"data-x-position":Ot,"data-index":T,"data-front":Ua,"data-swiping":ae,"data-dismissible":Un,"data-type":Mt,"data-invert":oi,"data-swipe-out":we,"data-swipe-direction":P,"data-expanded":!!(R||le&&G),"data-testid":g.testId,style:{"--index":T,"--toasts-before":T,"--z-index":N.length-T,"--offset":`${ce?vt:Nn.current}px`,"--initial-height":le?"auto":`${jn}px`,...L,...g.style},onDragEnd:()=>{de(!1),ue(null),In.current=null},onPointerDown:Ce=>{Ce.button!==2&&(lt||!Un||(Ea.current=new Date,ot(Nn.current),Ce.target.setPointerCapture(Ce.pointerId),Ce.target.tagName!=="BUTTON"&&(de(!0),In.current={x:Ce.clientX,y:Ce.clientY})))},onPointerUp:()=>{var Ce,Qe,St;if(we||!Un)return;In.current=null;const Vt=Number(((Ce=Ht.current)==null?void 0:Ce.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ca=Number(((Qe=Ht.current)==null?void 0:Qe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),et=new Date().getTime()-((St=Ea.current)==null?void 0:St.getTime()),Xt=oe==="x"?Vt:Ca,Fa=Math.abs(Xt)/et;if(Math.abs(Xt)>=i4||Fa>.11){ot(Nn.current),g.onDismiss==null||g.onDismiss.call(g,g),X(oe==="x"?Vt>0?"right":"left":Ca>0?"down":"up"),fn(),Te(!0);return}else{var Zt,Qt;(Zt=Ht.current)==null||Zt.style.setProperty("--swipe-amount-x","0px"),(Qt=Ht.current)==null||Qt.style.setProperty("--swipe-amount-y","0px")}_e(!1),de(!1),ue(null)},onPointerMove:Ce=>{var Qe,St,Vt;if(!In.current||!Un||((Qe=window.getSelection())==null?void 0:Qe.toString().length)>0)return;const et=Ce.clientY-In.current.y,Xt=Ce.clientX-In.current.x;var Fa;const Zt=(Fa=e.swipeDirections)!=null?Fa:r4(I);!oe&&(Math.abs(Xt)>1||Math.abs(et)>1)&&ue(Math.abs(Xt)>Math.abs(et)?"x":"y");let Qt={x:0,y:0};const ws=Rn=>1/(1.5+Math.abs(Rn)/20);if(oe==="y"){if(Zt.includes("top")||Zt.includes("bottom"))if(Zt.includes("top")&&et<0||Zt.includes("bottom")&&et>0)Qt.y=et;else{const Rn=et*ws(et);Qt.y=Math.abs(Rn)<Math.abs(et)?Rn:et}}else if(oe==="x"&&(Zt.includes("left")||Zt.includes("right")))if(Zt.includes("left")&&Xt<0||Zt.includes("right")&&Xt>0)Qt.x=Xt;else{const Rn=Xt*ws(Xt);Qt.x=Math.abs(Rn)<Math.abs(Xt)?Rn:Xt}(Math.abs(Qt.x)>0||Math.abs(Qt.y)>0)&&_e(!0),(St=Ht.current)==null||St.style.setProperty("--swipe-amount-x",`${Qt.x}px`),(Vt=Ht.current)==null||Vt.style.setProperty("--swipe-amount-y",`${Qt.y}px`)}},la&&!g.jsx&&Mt!=="loading"?ie.createElement("button",{"aria-label":V,"data-disabled":lt,"data-close-button":!0,onClick:lt||!Un?()=>{}:()=>{fn(),g.onDismiss==null||g.onDismiss.call(g,g)},className:Ma(D?.closeButton,g==null||(i=g.classNames)==null?void 0:i.closeButton)},(ct=H?.close)!=null?ct:KL):null,(Mt||g.icon||g.promise)&&g.icon!==null&&(H?.[Mt]!==null||g.icon)?ie.createElement("div",{"data-icon":"",className:Ma(D?.icon,g==null||(r=g.classNames)==null?void 0:r.icon)},g.promise||g.type==="loading"&&!g.icon?g.icon||sn():null,g.type!=="loading"?hn:null):null,ie.createElement("div",{"data-content":"",className:Ma(D?.content,g==null||(c=g.classNames)==null?void 0:c.content)},ie.createElement("div",{"data-title":"",className:Ma(D?.title,g==null||(u=g.classNames)==null?void 0:u.title)},g.jsx?g.jsx:typeof g.title=="function"?g.title():g.title),g.description?ie.createElement("div",{"data-description":"",className:Ma(J,bs,D?.description,g==null||(d=g.classNames)==null?void 0:d.description)},typeof g.description=="function"?g.description():g.description):null),ie.isValidElement(g.cancel)?g.cancel:g.cancel&&au(g.cancel)?ie.createElement("button",{"data-button":!0,"data-cancel":!0,style:g.cancelButtonStyle||O,onClick:Ce=>{au(g.cancel)&&Un&&(g.cancel.onClick==null||g.cancel.onClick.call(g.cancel,Ce),fn())},className:Ma(D?.cancelButton,g==null||(f=g.classNames)==null?void 0:f.cancelButton)},g.cancel.label):null,ie.isValidElement(g.action)?g.action:g.action&&au(g.action)?ie.createElement("button",{"data-button":!0,"data-action":!0,style:g.actionButtonStyle||K,onClick:Ce=>{au(g.action)&&(g.action.onClick==null||g.action.onClick.call(g.action,Ce),!Ce.defaultPrevented&&fn())},className:Ma(D?.actionButton,g==null||(h=g.classNames)==null?void 0:h.actionButton)},g.action.label):null)};function k0(){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 c4(e,n){const s={};return[e,n].forEach((i,r)=>{const c=r===1,u=c?"--mobile-offset":"--offset",d=c?n4:t4;function f(h){["top","right","bottom","left"].forEach(y=>{s[`${u}-${y}`]=typeof h=="number"?`${h}px`:h})}typeof i=="number"||typeof i=="string"?f(i):typeof i=="object"?["top","right","bottom","left"].forEach(h=>{i[h]===void 0?s[`${u}-${h}`]=d:s[`${u}-${h}`]=typeof i[h]=="number"?`${i[h]}px`:i[h]}):f(d)}),s}const u4=ie.forwardRef(function(n,s){const{id:i,invert:r,position:c="bottom-right",hotkey:u=["altKey","KeyT"],expand:d,closeButton:f,className:h,offset:y,mobileOffset:g,theme:b="light",richColors:w,duration:E,style:C,visibleToasts:A=e4,toastOptions:T,dir:N=k0(),gap:R=s4,icons:_,containerAriaLabel:M="Notifications"}=n,[U,L]=ie.useState([]),O=ie.useMemo(()=>i?U.filter(G=>G.toasterId===i):U.filter(G=>!G.toasterId),[U,i]),K=ie.useMemo(()=>Array.from(new Set([c].concat(O.filter(G=>G.position).map(G=>G.position)))),[O,c]),[Z,J]=ie.useState([]),[se,I]=ie.useState(!1),[ne,le]=ie.useState(!1),[D,H]=ie.useState(b!=="system"?b:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),V=ie.useRef(null),oe=u.join("+").replace(/Key/g,"").replace(/Digit/g,""),ue=ie.useRef(null),P=ie.useRef(!1),X=ie.useCallback(G=>{L(te=>{var ce;return(ce=te.find(me=>me.id===G.id))!=null&&ce.delete||bn.dismiss(G.id),te.filter(({id:me})=>me!==G.id)})},[]);return ie.useEffect(()=>bn.subscribe(G=>{if(G.dismiss){requestAnimationFrame(()=>{L(te=>te.map(ce=>ce.id===G.id?{...ce,delete:!0}:ce))});return}setTimeout(()=>{L1.flushSync(()=>{L(te=>{const ce=te.findIndex(me=>me.id===G.id);return ce!==-1?[...te.slice(0,ce),{...te[ce],...G},...te.slice(ce+1)]:[G,...te]})})})}),[U]),ie.useEffect(()=>{if(b!=="system"){H(b);return}if(b==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?H("dark"):H("light")),typeof window>"u")return;const G=window.matchMedia("(prefers-color-scheme: dark)");try{G.addEventListener("change",({matches:te})=>{H(te?"dark":"light")})}catch{G.addListener(({matches:ce})=>{try{H(ce?"dark":"light")}catch(me){console.error(me)}})}},[b]),ie.useEffect(()=>{U.length<=1&&I(!1)},[U]),ie.useEffect(()=>{const G=te=>{var ce;if(u.every(de=>te[de]||te.code===de)){var ae;I(!0),(ae=V.current)==null||ae.focus()}te.code==="Escape"&&(document.activeElement===V.current||(ce=V.current)!=null&&ce.contains(document.activeElement))&&I(!1)};return document.addEventListener("keydown",G),()=>document.removeEventListener("keydown",G)},[u]),ie.useEffect(()=>{if(V.current)return()=>{ue.current&&(ue.current.focus({preventScroll:!0}),ue.current=null,P.current=!1)}},[V.current]),ie.createElement("section",{ref:s,"aria-label":`${M} ${oe}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},K.map((G,te)=>{var ce;const[me,ae]=G.split("-");return O.length?ie.createElement("ol",{key:G,dir:N==="auto"?k0():N,tabIndex:-1,ref:V,className:h,"data-sonner-toaster":!0,"data-sonner-theme":D,"data-y-position":me,"data-x-position":ae,style:{"--front-toast-height":`${((ce=Z[0])==null?void 0:ce.height)||0}px`,"--width":`${a4}px`,"--gap":`${R}px`,...C,...c4(y,g)},onBlur:de=>{P.current&&!de.currentTarget.contains(de.relatedTarget)&&(P.current=!1,ue.current&&(ue.current.focus({preventScroll:!0}),ue.current=null))},onFocus:de=>{de.target instanceof HTMLElement&&de.target.dataset.dismissible==="false"||P.current||(P.current=!0,ue.current=de.relatedTarget)},onMouseEnter:()=>I(!0),onMouseMove:()=>I(!0),onMouseLeave:()=>{ne||I(!1)},onDragEnd:()=>I(!1),onPointerDown:de=>{de.target instanceof HTMLElement&&de.target.dataset.dismissible==="false"||le(!0)},onPointerUp:()=>le(!1)},O.filter(de=>!de.position&&te===0||de.position===G).map((de,we)=>{var Te,Ne;return ie.createElement(l4,{key:de.id,icons:_,index:we,toast:de,defaultRichColors:w,duration:(Te=T?.duration)!=null?Te:E,className:T?.className,descriptionClassName:T?.descriptionClassName,invert:r,visibleToasts:A,closeButton:(Ne=T?.closeButton)!=null?Ne:f,interacting:ne,position:G,style:T?.style,unstyled:T?.unstyled,classNames:T?.classNames,cancelButtonStyle:T?.cancelButtonStyle,actionButtonStyle:T?.actionButtonStyle,closeButtonAriaLabel:T?.closeButtonAriaLabel,removeToast:X,toasts:O.filter(_e=>_e.position==de.position),heights:Z.filter(_e=>_e.position==de.position),setHeights:J,expandByDefault:d,gap:R,expanded:se,swipeDirections:n.swipeDirections})})):null}))}),Mi="adminToken";function km(){if(typeof window>"u")return"";try{const e=window.localStorage.getItem(Mi)||"";if(e)return e;const n=window.sessionStorage.getItem(Mi)||"";if(n)return window.localStorage.setItem(Mi,n),window.sessionStorage.removeItem(Mi),n}catch{}return""}function L0(e){if(!(typeof window>"u"))try{const n=e.trim();n?window.localStorage.setItem(Mi,n):window.localStorage.removeItem(Mi),window.sessionStorage.removeItem(Mi)}catch{}}const WE=x.createContext(null);function d4({children:e}){const[n,s]=x.useState(()=>km()),i=x.useMemo(()=>({token:n,setToken:r=>{L0(r),s(km())},clearToken:()=>{L0(""),s("")}}),[n]);return m.jsx(WE.Provider,{value:i,children:e})}function f4(){const e=x.useContext(WE);if(!e)throw new Error("useAdminToken must be used within <AdminTokenProvider />");return e}const Lm="admin-ui:admin-token-required";class gs extends Error{status;responseText;constructor(n,s){super(`HTTP ${n}: ${s}`),this.name="AdminApiError",this.status=n,this.responseText=s}}function z0(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}async function si(e,n,s){const i=s?.trim()??km(),r=new Headers(n?.headers??void 0);i&&r.set("x-admin-token",i),n?.body&&!r.has("content-type")&&r.set("content-type","application/json");const c=await fetch(e,{...n,headers:r});if(!c.ok){const u=await c.text().catch(()=>"");let d=u;try{const f=JSON.parse(u);if(z0(f)&&"error"in f){const h=f.error;z0(h)&&typeof h.message=="string"&&(d=h.message)}}catch{}throw(c.status===401||c.status===403)&&typeof window<"u"&&window.dispatchEvent(new Event(Lm)),new gs(c.status,d)}return await c.json()}async function zm(e){return si("/api/admin/meta",void 0,e)}async function h4(e){const n=new URLSearchParams;return n.set("since_ms",String(e.sinceMs)),n.set("include_stats","1"),si(`/api/admin/accounts?${n.toString()}`)}async function m4(e){const n=new URLSearchParams;return e.account_id&&n.set("account_id",e.account_id),e.upstream_model&&n.set("upstream_model",e.upstream_model),e.client_model&&n.set("client_model",e.client_model),e.upstream_endpoint&&n.set("upstream_endpoint",e.upstream_endpoint),e.path&&n.set("path",e.path),e.status&&n.set("status",e.status),e.has_error&&n.set("has_error",e.has_error),e.from_ms&&n.set("from_ms",e.from_ms),e.to_ms&&n.set("to_ms",e.to_ms),n.set("limit",String(e.limit??50)),e.cursor_id!=null&&n.set("cursor_id",String(e.cursor_id)),si(`/api/admin/requests?${n.toString()}`)}async function p4(e){return si(`/api/admin/requests/${encodeURIComponent(e)}`)}async function g4(){return si("/api/admin/config")}async function v4(e){return si("/api/admin/config",{method:"POST",body:JSON.stringify(e)})}async function y4(){return si("/api/admin/models")}async function x4(){return si("/api/admin/models/details")}const b4=jp("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function un({className:e,variant:n,asChild:s=!1,...i}){const r=s?Ap:"span";return m.jsx(r,{"data-slot":"badge",className:re(b4({variant:n}),e),...i})}function S4({...e}){return m.jsx(Xw,{"data-slot":"dialog",...e})}function w4({...e}){return m.jsx(Zw,{"data-slot":"dialog-trigger",...e})}function E4({...e}){return m.jsx(Qw,{"data-slot":"dialog-portal",...e})}function C4({className:e,...n}){return m.jsx(Jw,{"data-slot":"dialog-overlay",className:re("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...n})}function T4({className:e,children:n,showCloseButton:s=!0,...i}){return m.jsxs(E4,{children:[m.jsx(C4,{}),m.jsxs(Ww,{"data-slot":"dialog-content",className:re("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 outline-none sm:max-w-lg",e),...i,children:[n,s&&m.jsxs(tE,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[m.jsx(nw,{}),m.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function A4({className:e,...n}){return m.jsx("div",{"data-slot":"dialog-header",className:re("flex flex-col gap-2 text-center sm:text-left",e),...n})}function j4({className:e,...n}){return m.jsx("div",{"data-slot":"dialog-footer",className:re("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...n})}function N4({className:e,...n}){return m.jsx(eE,{"data-slot":"dialog-title",className:re("text-lg leading-none font-semibold",e),...n})}function R4({className:e,...n}){return m.jsx(aP,{"data-slot":"dialog-description",className:re("text-muted-foreground text-sm",e),...n})}function mt({className:e,type:n,...s}){return m.jsx("input",{type:n,"data-slot":"input",className:re("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...s})}var M4=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_4=M4.reduce((e,n)=>{const s=xw(`Primitive.${n}`),i=x.forwardRef((r,c)=>{const{asChild:u,...d}=r,f=u?s:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(f,{...d,ref:c})});return i.displayName=`Primitive.${n}`,{...e,[n]:i}},{}),O4="Label",eC=x.forwardRef((e,n)=>m.jsx(_4.label,{...e,ref:n,onMouseDown:s=>{s.target.closest("button, input, select, textarea")||(e.onMouseDown?.(s),!s.defaultPrevented&&s.detail>1&&s.preventDefault())}}));eC.displayName=O4;var D4=eC;function ft({className:e,...n}){return m.jsx(D4,{"data-slot":"label",className:re("flex items-center gap-2 text-sm 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),...n})}const P4=jp(re("relative cursor-pointer group transition-all animate-rainbow","inline-flex items-center justify-center gap-2 shrink-0","rounded-md outline-none focus-visible:ring-[3px] aria-invalid:border-destructive","text-sm font-medium whitespace-nowrap","disabled:pointer-events-none disabled:opacity-50","[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0"),{variants:{variant:{default:"border-0 bg-[linear-gradient(#121213,#121213),linear-gradient(#121213_50%,rgba(18,18,19,0.6)_80%,rgba(18,18,19,0)),linear-gradient(90deg,var(--color-1),var(--color-5),var(--color-3),var(--color-4),var(--color-2))] bg-[length:200%] text-primary-foreground [background-clip:padding-box,border-box,border-box] [background-origin:border-box] [border:calc(0.125rem)_solid_transparent] before:absolute before:bottom-[-20%] before:left-1/2 before:z-0 before:h-1/5 before:w-3/5 before:-translate-x-1/2 before:animate-rainbow before:bg-[linear-gradient(90deg,var(--color-1),var(--color-5),var(--color-3),var(--color-4),var(--color-2))] before:[filter:blur(0.75rem)] dark:bg-[linear-gradient(#fff,#fff),linear-gradient(#fff_50%,rgba(255,255,255,0.6)_80%,rgba(0,0,0,0)),linear-gradient(90deg,var(--color-1),var(--color-5),var(--color-3),var(--color-4),var(--color-2))]",outline:"border border-input border-b-transparent bg-[linear-gradient(#ffffff,#ffffff),linear-gradient(#ffffff_50%,rgba(18,18,19,0.6)_80%,rgba(18,18,19,0)),linear-gradient(90deg,var(--color-1),var(--color-5),var(--color-3),var(--color-4),var(--color-2))] bg-[length:200%] text-accent-foreground [background-clip:padding-box,border-box,border-box] [background-origin:border-box] before:absolute before:bottom-[-20%] before:left-1/2 before:z-0 before:h-1/5 before:w-3/5 before:-translate-x-1/2 before:animate-rainbow before:bg-[linear-gradient(90deg,var(--color-1),var(--color-5),var(--color-3),var(--color-4),var(--color-2))] before:[filter:blur(0.75rem)] dark:bg-[linear-gradient(#0a0a0a,#0a0a0a),linear-gradient(#0a0a0a_50%,rgba(255,255,255,0.6)_80%,rgba(0,0,0,0)),linear-gradient(90deg,var(--color-1),var(--color-5),var(--color-3),var(--color-4),var(--color-2))]"},size:{default:"h-9 px-4 py-2",sm:"h-8 gap-1.5 px-3 text-xs",lg:"h-11 px-8",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}}),Hi=ie.forwardRef(({className:e,variant:n,size:s,asChild:i=!1,...r},c)=>{const u=i?Ap:"button";return m.jsx(u,{"data-slot":"button",className:re(P4({variant:n,size:s,className:e})),ref:c,...r})});Hi.displayName="RainbowButton";function k4(){const{t:e}=qe(),{token:n,setToken:s,clearToken:i}=f4(),[r,c]=x.useState(!1),[u,d]=x.useState(n),[f,h]=x.useState(!1),[y,g]=x.useState(!1),[b,w]=x.useState(null),[E,C]=x.useState(null),A=e(n?"common.set":"common.unset");x.useEffect(()=>{if(typeof window>"u")return;function _(){c(!0)}return window.addEventListener(Lm,_),()=>{window.removeEventListener(Lm,_)}},[]),x.useEffect(()=>{r&&d(n),r&&w(null)},[r,n]);async function T(){h(!0),C(null),w(null);try{const _=await zm(u);C(_),Wt.success(e("tokenDialog.toast.adminApiOk"))}catch(_){const M=_ instanceof gs?_.message:String(_);Wt.error(e("tokenDialog.toast.adminApiFailed"),{description:M})}finally{h(!1)}}async function N(){const _=u.trim();if(!_){w(e("tokenDialog.validation.empty"));return}g(!0),w(null),C(null);try{const M=await zm(_);C(M),s(_),c(!1),Wt.success(e("tokenDialog.toast.tokenSaved"))}catch(M){const U=M instanceof gs?M.message:String(M);w(U)}finally{g(!1)}}function R(){i(),d(""),w(null),C(null),Wt.success(e("tokenDialog.toast.tokenCleared"))}return m.jsxs(S4,{open:r,onOpenChange:c,children:[m.jsx(w4,{asChild:!0,children:m.jsxs(pt,{variant:"outline",className:"gap-2",children:[m.jsx(d_,{className:"size-4"}),e("tokenDialog.trigger"),m.jsx(un,{variant:n?"secondary":"outline",className:"ml-1 hidden sm:inline-flex",children:A})]})}),m.jsxs(T4,{children:[m.jsxs(A4,{children:[m.jsx(N4,{children:e("tokenDialog.title")}),m.jsx(R4,{children:m.jsxs(Qb,{i18nKey:"tokenDialog.description",children:["Used as ",m.jsx("code",{children:"x-admin-token"})," when calling ",m.jsx("code",{children:"/api/admin/*"}),". Stored in ",m.jsx("code",{children:"localStorage"}),"."]})})]}),m.jsxs("div",{className:"grid gap-2",children:[m.jsx(ft,{htmlFor:"admin-token",children:"x-admin-token"}),m.jsx(mt,{id:"admin-token",type:"password",placeholder:e("tokenDialog.inputPlaceholder"),value:u,onChange:_=>{d(_.target.value),b&&w(null)},autoComplete:"off"}),b?m.jsx("p",{className:"text-destructive text-xs",children:b}):null,m.jsx("p",{className:"text-muted-foreground text-xs",children:m.jsxs(Qb,{i18nKey:"tokenDialog.remoteNote",children:["If the server is not running on localhost, you must set ",m.jsx("code",{children:"ADMIN_TOKEN"})," on the server to enable remote access."]})}),E?.dbPath&&m.jsx("p",{className:"text-muted-foreground text-xs",children:e("tokenDialog.connected",{version:E.userVersion??"?",path:E.dbPath})})]}),m.jsxs(j4,{className:"gap-2 sm:gap-2",children:[m.jsx(pt,{variant:"secondary",onClick:T,disabled:f||y,children:e(f?"common.testing":"common.test")}),m.jsx(pt,{variant:"outline",onClick:R,disabled:!n&&!u.trim()||f||y,children:e("common.clear")}),m.jsx(Hi,{onClick:N,className:"h-9 px-4",disabled:f||y,children:e(y?"common.saving":"common.save")})]})]})]})}function L4({to:e,label:n}){return m.jsx(P1,{to:e,className:({isActive:s})=>re("text-sm font-medium transition-colors hover:text-foreground",s?"text-foreground":"text-muted-foreground"),children:n})}const z4=[{to:"/accounts",labelKey:"nav.accounts"},{to:"/requests",labelKey:"nav.requests"},{to:"/models",labelKey:"nav.models"},{to:"/settings",labelKey:"nav.settings"}];function V0(){const{t:e}=qe();return m.jsx(m.Fragment,{children:z4.map(n=>m.jsx(L4,{to:n.to,label:e(n.labelKey)},n.to))})}function V4(){const{t:e}=qe();return m.jsxs("div",{className:"min-h-svh bg-background text-foreground",children:[m.jsx("header",{className:"bg-background/70 sticky top-0 z-50 border-b backdrop-blur",children:m.jsxs("div",{className:"flex w-full items-center gap-3 px-4 py-3 lg:px-6",children:[m.jsx("div",{className:"md:hidden",children:m.jsxs(sP,{children:[m.jsx(iP,{asChild:!0,children:m.jsx(pt,{variant:"outline",size:"icon","aria-label":e("nav.openNavigation"),children:m.jsx(v_,{className:"size-4"})})}),m.jsxs(lP,{side:"left",className:"w-72",children:[m.jsx(cP,{children:m.jsx(uP,{children:m.jsx(Em,{className:"text-base font-semibold",children:e("app.title")})})}),m.jsx("nav",{className:"mt-4 flex flex-col gap-3",children:m.jsx(V0,{})})]})]})}),m.jsx("div",{className:"min-w-0",children:m.jsx(Em,{className:"text-base font-semibold",children:e("app.title")})}),m.jsx("nav",{className:"hidden items-center gap-5 md:flex",children:m.jsx(V0,{})}),m.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[m.jsx(kL,{}),m.jsx(zL,{}),m.jsx(k4,{})]})]})}),m.jsx("main",{className:"w-full px-4 py-4 lg:px-6 lg:py-6",children:m.jsx(xR,{})})]})}function Jr(e){return String(e).padStart(2,"0")}function pl(e){if(e==null)return"";const n=new Date(e);if(Number.isNaN(n.getTime()))return"";const s=n.getFullYear(),i=Jr(n.getMonth()+1),r=Jr(n.getDate()),c=Jr(n.getHours()),u=Jr(n.getMinutes()),d=Jr(n.getSeconds());return`${s}-${i}-${r} ${c}:${u}:${d}`}function ya(e){return e==null||!Number.isFinite(e)?"":Intl.NumberFormat("en-US").format(e)}function B4(e){return e==="success"?m.jsx(J1,{className:"size-4"}):e==="warning"?m.jsx(tw,{className:"size-4"}):e==="error"?m.jsx(ew,{className:"size-4"}):m.jsx(W1,{className:"size-4"})}function U4(e){switch(e){case"success":return"border-emerald-500/20 bg-emerald-500/10";case"warning":return"border-amber-500/20 bg-amber-500/10";case"error":return"border-destructive/20 bg-destructive/10";default:return"border-border/60 bg-muted/30"}}function Sn({variant:e="info",title:n,description:s,actionLabel:i,onAction:r,className:c}){const u=B4(e);return m.jsxs("div",{role:e==="error"?"alert":"status",className:re("flex items-start gap-3 rounded-lg border p-3",U4(e),c),children:[m.jsx("div",{className:"mt-0.5 shrink-0 text-foreground",children:u}),m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsx("div",{className:"text-sm font-medium leading-5",children:n}),s?m.jsx("div",{className:"text-muted-foreground mt-1 text-sm leading-5",children:s}):null]}),i&&r?m.jsx(pt,{type:"button",variant:"outline",size:"sm",onClick:r,className:"shrink-0",children:i}):null]})}function _i({className:e,...n}){const{effective:s}=Gu();return m.jsx("div",{"data-slot":"skeleton","aria-hidden":"true",className:re("bg-muted rounded-md",s==="off"?void 0:"animate-pulse",e),...n})}function en({className:e,...n}){return m.jsx("div",{"data-slot":"card",className:re("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...n})}function rn({className:e,...n}){return m.jsx("div",{"data-slot":"card-header",className:re("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...n})}function ln({className:e,...n}){return m.jsx("div",{"data-slot":"card-title",className:re("leading-none font-semibold",e),...n})}function wn({className:e,...n}){return m.jsx("div",{"data-slot":"card-description",className:re("text-muted-foreground text-sm",e),...n})}function H4({className:e,...n}){return m.jsx("div",{"data-slot":"card-action",className:re("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...n})}function En({className:e,...n}){return m.jsx("div",{"data-slot":"card-content",className:re("px-6",e),...n})}function sd({className:e,...n}){return m.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:m.jsx("table",{"data-slot":"table",className:re("w-full caption-bottom text-sm",e),...n})})}function $p({className:e,...n}){return m.jsx("thead",{"data-slot":"table-header",className:re("[&_tr]:border-b",e),...n})}function id({className:e,...n}){return m.jsx("tbody",{"data-slot":"table-body",className:re("[&_tr:last-child]:border-0",e),...n})}function Je({className:e,...n}){return m.jsx("tr",{"data-slot":"table-row",className:re("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...n})}function zt({className:e,...n}){return m.jsx("th",{"data-slot":"table-head",className:re("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...n})}function xe({className:e,...n}){return m.jsx("td",{"data-slot":"table-cell",className:re("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...n})}function I4(e,n,s){return Math.min(s,Math.max(n,e))}function F4({value:e=0,className:n,indicatorClassName:s,style:i,...r}){const{effective:c}=Gu(),u=Number.isFinite(e)?I4(e,0,100):0,d=c!=="off",f=c==="magic",h=c==="subtle"?"4s":"2.2s";return m.jsx("div",{"data-slot":"progress",role:"progressbar","aria-valuenow":Math.round(u),"aria-valuemin":0,"aria-valuemax":100,className:re("bg-muted/60 relative h-1.5 w-full overflow-hidden rounded-full ring-1 ring-border/40",n),style:{...i,"--speed":h},...r,children:m.jsx("div",{"data-slot":"progress-indicator",className:re("relative h-full rounded-full","[container-type:inline-size] overflow-hidden","transition-[width] duration-700 ease-out","bg-[linear-gradient(90deg,var(--color-1),var(--color-5),var(--color-3),var(--color-4),var(--color-2))] bg-[length:200%_100%]",d?"animate-rainbow":void 0,f?"before:absolute before:inset-y-0 before:left-0 before:w-3/5 before:rounded-full before:bg-[linear-gradient(90deg,transparent,rgba(255,255,255,0.55),transparent)] before:opacity-50 before:animate-shimmer-slide before:content-['']":void 0,"dark:shadow-[0_0_12px_rgba(255,255,255,0.12)] shadow-[0_0_8px_rgba(0,0,0,0.06)]",s),style:{width:`${u}%`}})})}const q4=({children:e,className:n,...s})=>m.jsx("div",{className:re("grid w-full auto-rows-[22rem] grid-cols-3 gap-4",n),...s,children:e}),tC=x.createContext({});function Kp(e){const n=x.useRef(null);return n.current===null&&(n.current=e()),n.current}const Yp=typeof window<"u",nC=Yp?x.useLayoutEffect:x.useEffect,Gp=x.createContext(null);function Xp(e,n){e.indexOf(n)===-1&&e.push(n)}function Zp(e,n){const s=e.indexOf(n);s>-1&&e.splice(s,1)}const vs=(e,n,s)=>s>n?n:s<e?e:s;let Qp=()=>{};const ys={},aC=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function sC(e){return typeof e=="object"&&e!==null}const iC=e=>/^0[^.\s]+$/u.test(e);function Jp(e){let n;return()=>(n===void 0&&(n=e()),n)}const na=e=>e,$4=(e,n)=>s=>n(e(s)),jl=(...e)=>e.reduce($4),gl=(e,n,s)=>{const i=n-e;return i===0?1:(s-e)/i};class Wp{constructor(){this.subscriptions=[]}add(n){return Xp(this.subscriptions,n),()=>Zp(this.subscriptions,n)}notify(n,s,i){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](n,s,i);else for(let c=0;c<r;c++){const u=this.subscriptions[c];u&&u(n,s,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ka=e=>e*1e3,ta=e=>e/1e3;function oC(e,n){return n?e*(1e3/n):0}const rC=(e,n,s)=>(((1-3*s+3*n)*e+(3*s-6*n))*e+3*n)*e,K4=1e-7,Y4=12;function G4(e,n,s,i,r){let c,u,d=0;do u=n+(s-n)/2,c=rC(u,i,r)-e,c>0?s=u:n=u;while(Math.abs(c)>K4&&++d<Y4);return u}function Nl(e,n,s,i){if(e===n&&s===i)return na;const r=c=>G4(c,0,1,e,s);return c=>c===0||c===1?c:rC(r(c),n,i)}const lC=e=>n=>n<=.5?e(2*n)/2:(2-e(2*(1-n)))/2,cC=e=>n=>1-e(1-n),uC=Nl(.33,1.53,.69,.99),eg=cC(uC),dC=lC(eg),fC=e=>(e*=2)<1?.5*eg(e):.5*(2-Math.pow(2,-10*(e-1))),tg=e=>1-Math.sin(Math.acos(e)),hC=cC(tg),mC=lC(tg),X4=Nl(.42,0,1,1),Z4=Nl(0,0,.58,1),pC=Nl(.42,0,.58,1),Q4=e=>Array.isArray(e)&&typeof e[0]!="number",gC=e=>Array.isArray(e)&&typeof e[0]=="number",J4={linear:na,easeIn:X4,easeInOut:pC,easeOut:Z4,circIn:tg,circInOut:mC,circOut:hC,backIn:eg,backInOut:dC,backOut:uC,anticipate:fC},W4=e=>typeof e=="string",B0=e=>{if(gC(e)){Qp(e.length===4);const[n,s,i,r]=e;return Nl(n,s,i,r)}else if(W4(e))return J4[e];return e},su=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function e5(e,n){let s=new Set,i=new Set,r=!1,c=!1;const u=new WeakSet;let d={delta:0,timestamp:0,isProcessing:!1};function f(y){u.has(y)&&(h.schedule(y),e()),y(d)}const h={schedule:(y,g=!1,b=!1)=>{const E=b&&r?s:i;return g&&u.add(y),E.has(y)||E.add(y),y},cancel:y=>{i.delete(y),u.delete(y)},process:y=>{if(d=y,r){c=!0;return}r=!0,[s,i]=[i,s],s.forEach(f),s.clear(),r=!1,c&&(c=!1,h.process(y))}};return h}const t5=40;function vC(e,n){let s=!1,i=!0;const r={delta:0,timestamp:0,isProcessing:!1},c=()=>s=!0,u=su.reduce((R,_)=>(R[_]=e5(c),R),{}),{setup:d,read:f,resolveKeyframes:h,preUpdate:y,update:g,preRender:b,render:w,postRender:E}=u,C=()=>{const R=ys.useManualTiming?r.timestamp:performance.now();s=!1,ys.useManualTiming||(r.delta=i?1e3/60:Math.max(Math.min(R-r.timestamp,t5),1)),r.timestamp=R,r.isProcessing=!0,d.process(r),f.process(r),h.process(r),y.process(r),g.process(r),b.process(r),w.process(r),E.process(r),r.isProcessing=!1,s&&n&&(i=!1,e(C))},A=()=>{s=!0,i=!0,r.isProcessing||e(C)};return{schedule:su.reduce((R,_)=>{const M=u[_];return R[_]=(U,L=!1,O=!1)=>(s||A(),M.schedule(U,L,O)),R},{}),cancel:R=>{for(let _=0;_<su.length;_++)u[su[_]].cancel(R)},state:r,steps:u}}const{schedule:We,cancel:xs,state:Yt,steps:Gh}=vC(typeof requestAnimationFrame<"u"?requestAnimationFrame:na,!0);let vu;function n5(){vu=void 0}const Cn={now:()=>(vu===void 0&&Cn.set(Yt.isProcessing||ys.useManualTiming?Yt.timestamp:performance.now()),vu),set:e=>{vu=e,queueMicrotask(n5)}},yC=e=>n=>typeof n=="string"&&n.startsWith(e),xC=yC("--"),a5=yC("var(--"),ng=e=>a5(e)?s5.test(e.split("/*")[0].trim()):!1,s5=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,tr={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},vl={...tr,transform:e=>vs(0,1,e)},iu={...tr,default:1},sl=e=>Math.round(e*1e5)/1e5,ag=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function i5(e){return e==null}const o5=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,sg=(e,n)=>s=>!!(typeof s=="string"&&o5.test(s)&&s.startsWith(e)||n&&!i5(s)&&Object.prototype.hasOwnProperty.call(s,n)),bC=(e,n,s)=>i=>{if(typeof i!="string")return i;const[r,c,u,d]=i.match(ag);return{[e]:parseFloat(r),[n]:parseFloat(c),[s]:parseFloat(u),alpha:d!==void 0?parseFloat(d):1}},r5=e=>vs(0,255,e),Xh={...tr,transform:e=>Math.round(r5(e))},Oi={test:sg("rgb","red"),parse:bC("red","green","blue"),transform:({red:e,green:n,blue:s,alpha:i=1})=>"rgba("+Xh.transform(e)+", "+Xh.transform(n)+", "+Xh.transform(s)+", "+sl(vl.transform(i))+")"};function l5(e){let n="",s="",i="",r="";return e.length>5?(n=e.substring(1,3),s=e.substring(3,5),i=e.substring(5,7),r=e.substring(7,9)):(n=e.substring(1,2),s=e.substring(2,3),i=e.substring(3,4),r=e.substring(4,5),n+=n,s+=s,i+=i,r+=r),{red:parseInt(n,16),green:parseInt(s,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}}const Vm={test:sg("#"),parse:l5,transform:Oi.transform},Rl=e=>({test:n=>typeof n=="string"&&n.endsWith(e)&&n.split(" ").length===1,parse:parseFloat,transform:n=>`${n}${e}`}),Zs=Rl("deg"),La=Rl("%"),he=Rl("px"),c5=Rl("vh"),u5=Rl("vw"),U0={...La,parse:e=>La.parse(e)/100,transform:e=>La.transform(e*100)},ko={test:sg("hsl","hue"),parse:bC("hue","saturation","lightness"),transform:({hue:e,saturation:n,lightness:s,alpha:i=1})=>"hsla("+Math.round(e)+", "+La.transform(sl(n))+", "+La.transform(sl(s))+", "+sl(vl.transform(i))+")"},jt={test:e=>Oi.test(e)||Vm.test(e)||ko.test(e),parse:e=>Oi.test(e)?Oi.parse(e):ko.test(e)?ko.parse(e):Vm.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Oi.transform(e):ko.transform(e),getAnimatableNone:e=>{const n=jt.parse(e);return n.alpha=0,jt.transform(n)}},d5=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function f5(e){return isNaN(e)&&typeof e=="string"&&(e.match(ag)?.length||0)+(e.match(d5)?.length||0)>0}const SC="number",wC="color",h5="var",m5="var(",H0="${}",p5=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function yl(e){const n=e.toString(),s=[],i={color:[],number:[],var:[]},r=[];let c=0;const d=n.replace(p5,f=>(jt.test(f)?(i.color.push(c),r.push(wC),s.push(jt.parse(f))):f.startsWith(m5)?(i.var.push(c),r.push(h5),s.push(f)):(i.number.push(c),r.push(SC),s.push(parseFloat(f))),++c,H0)).split(H0);return{values:s,split:d,indexes:i,types:r}}function EC(e){return yl(e).values}function CC(e){const{split:n,types:s}=yl(e),i=n.length;return r=>{let c="";for(let u=0;u<i;u++)if(c+=n[u],r[u]!==void 0){const d=s[u];d===SC?c+=sl(r[u]):d===wC?c+=jt.transform(r[u]):c+=r[u]}return c}}const g5=e=>typeof e=="number"?0:jt.test(e)?jt.getAnimatableNone(e):e;function v5(e){const n=EC(e);return CC(e)(n.map(g5))}const ti={test:f5,parse:EC,createTransformer:CC,getAnimatableNone:v5};function Zh(e,n,s){return s<0&&(s+=1),s>1&&(s-=1),s<1/6?e+(n-e)*6*s:s<1/2?n:s<2/3?e+(n-e)*(2/3-s)*6:e}function y5({hue:e,saturation:n,lightness:s,alpha:i}){e/=360,n/=100,s/=100;let r=0,c=0,u=0;if(!n)r=c=u=s;else{const d=s<.5?s*(1+n):s+n-s*n,f=2*s-d;r=Zh(f,d,e+1/3),c=Zh(f,d,e),u=Zh(f,d,e-1/3)}return{red:Math.round(r*255),green:Math.round(c*255),blue:Math.round(u*255),alpha:i}}function ku(e,n){return s=>s>0?n:e}const rt=(e,n,s)=>e+(n-e)*s,Qh=(e,n,s)=>{const i=e*e,r=s*(n*n-i)+i;return r<0?0:Math.sqrt(r)},x5=[Vm,Oi,ko],b5=e=>x5.find(n=>n.test(e));function I0(e){const n=b5(e);if(!n)return!1;let s=n.parse(e);return n===ko&&(s=y5(s)),s}const F0=(e,n)=>{const s=I0(e),i=I0(n);if(!s||!i)return ku(e,n);const r={...s};return c=>(r.red=Qh(s.red,i.red,c),r.green=Qh(s.green,i.green,c),r.blue=Qh(s.blue,i.blue,c),r.alpha=rt(s.alpha,i.alpha,c),Oi.transform(r))},Bm=new Set(["none","hidden"]);function S5(e,n){return Bm.has(e)?s=>s<=0?e:n:s=>s>=1?n:e}function w5(e,n){return s=>rt(e,n,s)}function ig(e){return typeof e=="number"?w5:typeof e=="string"?ng(e)?ku:jt.test(e)?F0:T5:Array.isArray(e)?TC:typeof e=="object"?jt.test(e)?F0:E5:ku}function TC(e,n){const s=[...e],i=s.length,r=e.map((c,u)=>ig(c)(c,n[u]));return c=>{for(let u=0;u<i;u++)s[u]=r[u](c);return s}}function E5(e,n){const s={...e,...n},i={};for(const r in s)e[r]!==void 0&&n[r]!==void 0&&(i[r]=ig(e[r])(e[r],n[r]));return r=>{for(const c in i)s[c]=i[c](r);return s}}function C5(e,n){const s=[],i={color:0,var:0,number:0};for(let r=0;r<n.values.length;r++){const c=n.types[r],u=e.indexes[c][i[c]],d=e.values[u]??0;s[r]=d,i[c]++}return s}const T5=(e,n)=>{const s=ti.createTransformer(n),i=yl(e),r=yl(n);return i.indexes.var.length===r.indexes.var.length&&i.indexes.color.length===r.indexes.color.length&&i.indexes.number.length>=r.indexes.number.length?Bm.has(e)&&!r.values.length||Bm.has(n)&&!i.values.length?S5(e,n):jl(TC(C5(i,r),r.values),s):ku(e,n)};function AC(e,n,s){return typeof e=="number"&&typeof n=="number"&&typeof s=="number"?rt(e,n,s):ig(e)(e,n)}const A5=e=>{const n=({timestamp:s})=>e(s);return{start:(s=!0)=>We.update(n,s),stop:()=>xs(n),now:()=>Yt.isProcessing?Yt.timestamp:Cn.now()}},jC=(e,n,s=10)=>{let i="";const r=Math.max(Math.round(n/s),2);for(let c=0;c<r;c++)i+=Math.round(e(c/(r-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},Lu=2e4;function og(e){let n=0;const s=50;let i=e.next(n);for(;!i.done&&n<Lu;)n+=s,i=e.next(n);return n>=Lu?1/0:n}function j5(e,n=100,s){const i=s({...e,keyframes:[0,n]}),r=Math.min(og(i),Lu);return{type:"keyframes",ease:c=>i.next(r*c).value/n,duration:ta(r)}}const N5=5;function NC(e,n,s){const i=Math.max(n-N5,0);return oC(s-e(i),n-i)}const ht={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Jh=.001;function R5({duration:e=ht.duration,bounce:n=ht.bounce,velocity:s=ht.velocity,mass:i=ht.mass}){let r,c,u=1-n;u=vs(ht.minDamping,ht.maxDamping,u),e=vs(ht.minDuration,ht.maxDuration,ta(e)),u<1?(r=h=>{const y=h*u,g=y*e,b=y-s,w=Um(h,u),E=Math.exp(-g);return Jh-b/w*E},c=h=>{const g=h*u*e,b=g*s+s,w=Math.pow(u,2)*Math.pow(h,2)*e,E=Math.exp(-g),C=Um(Math.pow(h,2),u);return(-r(h)+Jh>0?-1:1)*((b-w)*E)/C}):(r=h=>{const y=Math.exp(-h*e),g=(h-s)*e+1;return-Jh+y*g},c=h=>{const y=Math.exp(-h*e),g=(s-h)*(e*e);return y*g});const d=5/e,f=_5(r,c,d);if(e=ka(e),isNaN(f))return{stiffness:ht.stiffness,damping:ht.damping,duration:e};{const h=Math.pow(f,2)*i;return{stiffness:h,damping:u*2*Math.sqrt(i*h),duration:e}}}const M5=12;function _5(e,n,s){let i=s;for(let r=1;r<M5;r++)i=i-e(i)/n(i);return i}function Um(e,n){return e*Math.sqrt(1-n*n)}const O5=["duration","bounce"],D5=["stiffness","damping","mass"];function q0(e,n){return n.some(s=>e[s]!==void 0)}function P5(e){let n={velocity:ht.velocity,stiffness:ht.stiffness,damping:ht.damping,mass:ht.mass,isResolvedFromDuration:!1,...e};if(!q0(e,D5)&&q0(e,O5))if(e.visualDuration){const s=e.visualDuration,i=2*Math.PI/(s*1.2),r=i*i,c=2*vs(.05,1,1-(e.bounce||0))*Math.sqrt(r);n={...n,mass:ht.mass,stiffness:r,damping:c}}else{const s=R5(e);n={...n,...s,mass:ht.mass},n.isResolvedFromDuration=!0}return n}function zu(e=ht.visualDuration,n=ht.bounce){const s=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:n}:e;let{restSpeed:i,restDelta:r}=s;const c=s.keyframes[0],u=s.keyframes[s.keyframes.length-1],d={done:!1,value:c},{stiffness:f,damping:h,mass:y,duration:g,velocity:b,isResolvedFromDuration:w}=P5({...s,velocity:-ta(s.velocity||0)}),E=b||0,C=h/(2*Math.sqrt(f*y)),A=u-c,T=ta(Math.sqrt(f/y)),N=Math.abs(A)<5;i||(i=N?ht.restSpeed.granular:ht.restSpeed.default),r||(r=N?ht.restDelta.granular:ht.restDelta.default);let R;if(C<1){const M=Um(T,C);R=U=>{const L=Math.exp(-C*T*U);return u-L*((E+C*T*A)/M*Math.sin(M*U)+A*Math.cos(M*U))}}else if(C===1)R=M=>u-Math.exp(-T*M)*(A+(E+T*A)*M);else{const M=T*Math.sqrt(C*C-1);R=U=>{const L=Math.exp(-C*T*U),O=Math.min(M*U,300);return u-L*((E+C*T*A)*Math.sinh(O)+M*A*Math.cosh(O))/M}}const _={calculatedDuration:w&&g||null,next:M=>{const U=R(M);if(w)d.done=M>=g;else{let L=M===0?E:0;C<1&&(L=M===0?ka(E):NC(R,M,U));const O=Math.abs(L)<=i,K=Math.abs(u-U)<=r;d.done=O&&K}return d.value=d.done?u:U,d},toString:()=>{const M=Math.min(og(_),Lu),U=jC(L=>_.next(M*L).value,M,30);return M+"ms "+U},toTransition:()=>{}};return _}zu.applyToOptions=e=>{const n=j5(e,100,zu);return e.ease=n.ease,e.duration=ka(n.duration),e.type="keyframes",e};function Hm({keyframes:e,velocity:n=0,power:s=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:c=500,modifyTarget:u,min:d,max:f,restDelta:h=.5,restSpeed:y}){const g=e[0],b={done:!1,value:g},w=O=>d!==void 0&&O<d||f!==void 0&&O>f,E=O=>d===void 0?f:f===void 0||Math.abs(d-O)<Math.abs(f-O)?d:f;let C=s*n;const A=g+C,T=u===void 0?A:u(A);T!==A&&(C=T-g);const N=O=>-C*Math.exp(-O/i),R=O=>T+N(O),_=O=>{const K=N(O),Z=R(O);b.done=Math.abs(K)<=h,b.value=b.done?T:Z};let M,U;const L=O=>{w(b.value)&&(M=O,U=zu({keyframes:[b.value,E(b.value)],velocity:NC(R,O,b.value),damping:r,stiffness:c,restDelta:h,restSpeed:y}))};return L(0),{calculatedDuration:null,next:O=>{let K=!1;return!U&&M===void 0&&(K=!0,_(O),L(O)),M!==void 0&&O>=M?U.next(O-M):(!K&&_(O),b)}}}function k5(e,n,s){const i=[],r=s||ys.mix||AC,c=e.length-1;for(let u=0;u<c;u++){let d=r(e[u],e[u+1]);if(n){const f=Array.isArray(n)?n[u]||na:n;d=jl(f,d)}i.push(d)}return i}function RC(e,n,{clamp:s=!0,ease:i,mixer:r}={}){const c=e.length;if(Qp(c===n.length),c===1)return()=>n[0];if(c===2&&n[0]===n[1])return()=>n[1];const u=e[0]===e[1];e[0]>e[c-1]&&(e=[...e].reverse(),n=[...n].reverse());const d=k5(n,i,r),f=d.length,h=y=>{if(u&&y<e[0])return n[0];let g=0;if(f>1)for(;g<e.length-2&&!(y<e[g+1]);g++);const b=gl(e[g],e[g+1],y);return d[g](b)};return s?y=>h(vs(e[0],e[c-1],y)):h}function L5(e,n){const s=e[e.length-1];for(let i=1;i<=n;i++){const r=gl(0,n,i);e.push(rt(s,1,r))}}function z5(e){const n=[0];return L5(n,e.length-1),n}function V5(e,n){return e.map(s=>s*n)}function B5(e,n){return e.map(()=>n||pC).splice(0,e.length-1)}function il({duration:e=300,keyframes:n,times:s,ease:i="easeInOut"}){const r=Q4(i)?i.map(B0):B0(i),c={done:!1,value:n[0]},u=V5(s&&s.length===n.length?s:z5(n),e),d=RC(u,n,{ease:Array.isArray(r)?r:B5(n,r)});return{calculatedDuration:e,next:f=>(c.value=d(f),c.done=f>=e,c)}}const U5=e=>e!==null;function rg(e,{repeat:n,repeatType:s="loop"},i,r=1){const c=e.filter(U5),d=r<0||n&&s!=="loop"&&n%2===1?0:c.length-1;return!d||i===void 0?c[d]:i}const H5={decay:Hm,inertia:Hm,tween:il,keyframes:il,spring:zu};function MC(e){typeof e.type=="string"&&(e.type=H5[e.type])}class lg{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(n=>{this.resolve=n})}notifyFinished(){this.resolve()}then(n,s){return this.finished.then(n,s)}}const I5=e=>e/100;class od extends lg{constructor(n){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:s}=this.options;s&&s.updatedAt!==Cn.now()&&this.tick(Cn.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=n,this.initAnimation(),this.play(),n.autoplay===!1&&this.pause()}initAnimation(){const{options:n}=this;MC(n);const{type:s=il,repeat:i=0,repeatDelay:r=0,repeatType:c,velocity:u=0}=n;let{keyframes:d}=n;const f=s||il;f!==il&&typeof d[0]!="number"&&(this.mixKeyframes=jl(I5,AC(d[0],d[1])),d=[0,100]);const h=f({...n,keyframes:d});c==="mirror"&&(this.mirroredGenerator=f({...n,keyframes:[...d].reverse(),velocity:-u})),h.calculatedDuration===null&&(h.calculatedDuration=og(h));const{calculatedDuration:y}=h;this.calculatedDuration=y,this.resolvedDuration=y+r,this.totalDuration=this.resolvedDuration*(i+1)-r,this.generator=h}updateTime(n){const s=Math.round(n-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=s}tick(n,s=!1){const{generator:i,totalDuration:r,mixKeyframes:c,mirroredGenerator:u,resolvedDuration:d,calculatedDuration:f}=this;if(this.startTime===null)return i.next(0);const{delay:h=0,keyframes:y,repeat:g,repeatType:b,repeatDelay:w,type:E,onUpdate:C,finalKeyframe:A}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,n):this.speed<0&&(this.startTime=Math.min(n-r/this.speed,this.startTime)),s?this.currentTime=n:this.updateTime(n);const T=this.currentTime-h*(this.playbackSpeed>=0?1:-1),N=this.playbackSpeed>=0?T<0:T>r;this.currentTime=Math.max(T,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=r);let R=this.currentTime,_=i;if(g){const O=Math.min(this.currentTime,r)/d;let K=Math.floor(O),Z=O%1;!Z&&O>=1&&(Z=1),Z===1&&K--,K=Math.min(K,g+1),K%2&&(b==="reverse"?(Z=1-Z,w&&(Z-=w/d)):b==="mirror"&&(_=u)),R=vs(0,1,Z)*d}const M=N?{done:!1,value:y[0]}:_.next(R);c&&(M.value=c(M.value));let{done:U}=M;!N&&f!==null&&(U=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const L=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&U);return L&&E!==Hm&&(M.value=rg(y,this.options,A,this.speed)),C&&C(M.value),L&&this.finish(),M}then(n,s){return this.finished.then(n,s)}get duration(){return ta(this.calculatedDuration)}get iterationDuration(){const{delay:n=0}=this.options||{};return this.duration+ta(n)}get time(){return ta(this.currentTime)}set time(n){n=ka(n),this.currentTime=n,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=n:this.driver&&(this.startTime=this.driver.now()-n/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(n){this.updateTime(Cn.now());const s=this.playbackSpeed!==n;this.playbackSpeed=n,s&&(this.time=ta(this.currentTime))}play(){if(this.isStopped)return;const{driver:n=A5,startTime:s}=this.options;this.driver||(this.driver=n(r=>this.tick(r))),this.options.onPlay?.();const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=s??i),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Cn.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(n){return this.startTime=0,this.tick(n,!0)}attachTimeline(n){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),n.observe(this)}}function F5(e){for(let n=1;n<e.length;n++)e[n]??(e[n]=e[n-1])}const Di=e=>e*180/Math.PI,Im=e=>{const n=Di(Math.atan2(e[1],e[0]));return Fm(n)},q5={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Im,rotateZ:Im,skewX:e=>Di(Math.atan(e[1])),skewY:e=>Di(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Fm=e=>(e=e%360,e<0&&(e+=360),e),$0=Im,K0=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Y0=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),$5={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:K0,scaleY:Y0,scale:e=>(K0(e)+Y0(e))/2,rotateX:e=>Fm(Di(Math.atan2(e[6],e[5]))),rotateY:e=>Fm(Di(Math.atan2(-e[2],e[0]))),rotateZ:$0,rotate:$0,skewX:e=>Di(Math.atan(e[4])),skewY:e=>Di(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function qm(e){return e.includes("scale")?1:0}function $m(e,n){if(!e||e==="none")return qm(n);const s=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,r;if(s)i=$5,r=s;else{const d=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=q5,r=d}if(!r)return qm(n);const c=i[n],u=r[1].split(",").map(Y5);return typeof c=="function"?c(u):u[c]}const K5=(e,n)=>{const{transform:s="none"}=getComputedStyle(e);return $m(s,n)};function Y5(e){return parseFloat(e.trim())}const nr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ar=new Set(nr),G0=e=>e===tr||e===he,G5=new Set(["x","y","z"]),X5=nr.filter(e=>!G5.has(e));function Z5(e){const n=[];return X5.forEach(s=>{const i=e.getValue(s);i!==void 0&&(n.push([s,i.get()]),i.set(s.startsWith("scale")?1:0))}),n}const ki={width:({x:e},{paddingLeft:n="0",paddingRight:s="0"})=>e.max-e.min-parseFloat(n)-parseFloat(s),height:({y:e},{paddingTop:n="0",paddingBottom:s="0"})=>e.max-e.min-parseFloat(n)-parseFloat(s),top:(e,{top:n})=>parseFloat(n),left:(e,{left:n})=>parseFloat(n),bottom:({y:e},{top:n})=>parseFloat(n)+(e.max-e.min),right:({x:e},{left:n})=>parseFloat(n)+(e.max-e.min),x:(e,{transform:n})=>$m(n,"x"),y:(e,{transform:n})=>$m(n,"y")};ki.translateX=ki.x;ki.translateY=ki.y;const Li=new Set;let Km=!1,Ym=!1,Gm=!1;function _C(){if(Ym){const e=Array.from(Li).filter(i=>i.needsMeasurement),n=new Set(e.map(i=>i.element)),s=new Map;n.forEach(i=>{const r=Z5(i);r.length&&(s.set(i,r),i.render())}),e.forEach(i=>i.measureInitialState()),n.forEach(i=>{i.render();const r=s.get(i);r&&r.forEach(([c,u])=>{i.getValue(c)?.set(u)})}),e.forEach(i=>i.measureEndState()),e.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}Ym=!1,Km=!1,Li.forEach(e=>e.complete(Gm)),Li.clear()}function OC(){Li.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Ym=!0)})}function Q5(){Gm=!0,OC(),_C(),Gm=!1}class cg{constructor(n,s,i,r,c,u=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...n],this.onComplete=s,this.name=i,this.motionValue=r,this.element=c,this.isAsync=u}scheduleResolve(){this.state="scheduled",this.isAsync?(Li.add(this),Km||(Km=!0,We.read(OC),We.resolveKeyframes(_C))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:n,name:s,element:i,motionValue:r}=this;if(n[0]===null){const c=r?.get(),u=n[n.length-1];if(c!==void 0)n[0]=c;else if(i&&s){const d=i.readValue(s,u);d!=null&&(n[0]=d)}n[0]===void 0&&(n[0]=u),r&&c===void 0&&r.set(n[0])}F5(n)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(n=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,n),Li.delete(this)}cancel(){this.state==="scheduled"&&(Li.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const J5=e=>e.startsWith("--");function W5(e,n,s){J5(n)?e.style.setProperty(n,s):e.style[n]=s}const e3=Jp(()=>window.ScrollTimeline!==void 0),t3={};function n3(e,n){const s=Jp(e);return()=>t3[n]??s()}const DC=n3(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),tl=([e,n,s,i])=>`cubic-bezier(${e}, ${n}, ${s}, ${i})`,X0={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:tl([0,.65,.55,1]),circOut:tl([.55,0,1,.45]),backIn:tl([.31,.01,.66,-.59]),backOut:tl([.33,1.53,.69,.99])};function PC(e,n){if(e)return typeof e=="function"?DC()?jC(e,n):"ease-out":gC(e)?tl(e):Array.isArray(e)?e.map(s=>PC(s,n)||X0.easeOut):X0[e]}function a3(e,n,s,{delay:i=0,duration:r=300,repeat:c=0,repeatType:u="loop",ease:d="easeOut",times:f}={},h=void 0){const y={[n]:s};f&&(y.offset=f);const g=PC(d,r);Array.isArray(g)&&(y.easing=g);const b={delay:i,duration:r,easing:Array.isArray(g)?"linear":g,fill:"both",iterations:c+1,direction:u==="reverse"?"alternate":"normal"};return h&&(b.pseudoElement=h),e.animate(y,b)}function kC(e){return typeof e=="function"&&"applyToOptions"in e}function s3({type:e,...n}){return kC(e)&&DC()?e.applyToOptions(n):(n.duration??(n.duration=300),n.ease??(n.ease="easeOut"),n)}class i3 extends lg{constructor(n){if(super(),this.finishedTime=null,this.isStopped=!1,!n)return;const{element:s,name:i,keyframes:r,pseudoElement:c,allowFlatten:u=!1,finalKeyframe:d,onComplete:f}=n;this.isPseudoElement=!!c,this.allowFlatten=u,this.options=n,Qp(typeof n.type!="string");const h=s3(n);this.animation=a3(s,i,r,h,c),h.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!c){const y=rg(r,this.options,d,this.speed);this.updateMotionValue?this.updateMotionValue(y):W5(s,i,y),this.animation.cancel()}f?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:n}=this;n==="idle"||n==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const n=this.animation.effect?.getComputedTiming?.().duration||0;return ta(Number(n))}get iterationDuration(){const{delay:n=0}=this.options||{};return this.duration+ta(n)}get time(){return ta(Number(this.animation.currentTime)||0)}set time(n){this.finishedTime=null,this.animation.currentTime=ka(n)}get speed(){return this.animation.playbackRate}set speed(n){n<0&&(this.finishedTime=null),this.animation.playbackRate=n}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(n){this.animation.startTime=n}attachTimeline({timeline:n,observe:s}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,n&&e3()?(this.animation.timeline=n,na):s(this)}}const LC={anticipate:fC,backInOut:dC,circInOut:mC};function o3(e){return e in LC}function r3(e){typeof e.ease=="string"&&o3(e.ease)&&(e.ease=LC[e.ease])}const Z0=10;class l3 extends i3{constructor(n){r3(n),MC(n),super(n),n.startTime&&(this.startTime=n.startTime),this.options=n}updateMotionValue(n){const{motionValue:s,onUpdate:i,onComplete:r,element:c,...u}=this.options;if(!s)return;if(n!==void 0){s.set(n);return}const d=new od({...u,autoplay:!1}),f=ka(this.finishedTime??this.time);s.setWithVelocity(d.sample(f-Z0).value,d.sample(f).value,Z0),d.stop()}}const Q0=(e,n)=>n==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ti.test(e)||e==="0")&&!e.startsWith("url("));function c3(e){const n=e[0];if(e.length===1)return!0;for(let s=0;s<e.length;s++)if(e[s]!==n)return!0}function u3(e,n,s,i){const r=e[0];if(r===null)return!1;if(n==="display"||n==="visibility")return!0;const c=e[e.length-1],u=Q0(r,n),d=Q0(c,n);return!u||!d?!1:c3(e)||(s==="spring"||kC(s))&&i}function Xm(e){e.duration=0,e.type="keyframes"}const d3=new Set(["opacity","clipPath","filter","transform"]),f3=Jp(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function h3(e){const{motionValue:n,name:s,repeatDelay:i,repeatType:r,damping:c,type:u}=e;if(!(n?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:f,transformTemplate:h}=n.owner.getProps();return f3()&&s&&d3.has(s)&&(s!=="transform"||!h)&&!f&&!i&&r!=="mirror"&&c!==0&&u!=="inertia"}const m3=40;class p3 extends lg{constructor({autoplay:n=!0,delay:s=0,type:i="keyframes",repeat:r=0,repeatDelay:c=0,repeatType:u="loop",keyframes:d,name:f,motionValue:h,element:y,...g}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Cn.now();const b={autoplay:n,delay:s,type:i,repeat:r,repeatDelay:c,repeatType:u,name:f,motionValue:h,element:y,...g},w=y?.KeyframeResolver||cg;this.keyframeResolver=new w(d,(E,C,A)=>this.onKeyframesResolved(E,C,b,!A),f,h,y),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(n,s,i,r){this.keyframeResolver=void 0;const{name:c,type:u,velocity:d,delay:f,isHandoff:h,onUpdate:y}=i;this.resolvedAt=Cn.now(),u3(n,c,u,d)||((ys.instantAnimations||!f)&&y?.(rg(n,i,s)),n[0]=n[n.length-1],Xm(i),i.repeat=0);const b={startTime:r?this.resolvedAt?this.resolvedAt-this.createdAt>m3?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:s,...i,keyframes:n},w=!h&&h3(b)?new l3({...b,element:b.motionValue.owner.current}):new od(b);w.finished.then(()=>this.notifyFinished()).catch(na),this.pendingTimeline&&(this.stopTimeline=w.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=w}get finished(){return this._animation?this.animation.finished:this._finished}then(n,s){return this.finished.finally(n).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Q5()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(n){this.animation.time=n}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(n){this.animation.speed=n}get startTime(){return this.animation.startTime}attachTimeline(n){return this._animation?this.stopTimeline=this.animation.attachTimeline(n):this.pendingTimeline=n,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const g3=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function v3(e){const n=g3.exec(e);if(!n)return[,];const[,s,i,r]=n;return[`--${s??i}`,r]}function zC(e,n,s=1){const[i,r]=v3(e);if(!i)return;const c=window.getComputedStyle(n).getPropertyValue(i);if(c){const u=c.trim();return aC(u)?parseFloat(u):u}return ng(r)?zC(r,n,s+1):r}function ug(e,n){return e?.[n]??e?.default??e}const VC=new Set(["width","height","top","left","right","bottom",...nr]),y3={test:e=>e==="auto",parse:e=>e},BC=e=>n=>n.test(e),UC=[tr,he,La,Zs,u5,c5,y3],J0=e=>UC.find(BC(e));function x3(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||iC(e):!0}const b3=new Set(["brightness","contrast","saturate","opacity"]);function S3(e){const[n,s]=e.slice(0,-1).split("(");if(n==="drop-shadow")return e;const[i]=s.match(ag)||[];if(!i)return e;const r=s.replace(i,"");let c=b3.has(n)?1:0;return i!==s&&(c*=100),n+"("+c+r+")"}const w3=/\b([a-z-]*)\(.*?\)/gu,Zm={...ti,getAnimatableNone:e=>{const n=e.match(w3);return n?n.map(S3).join(" "):e}},W0={...tr,transform:Math.round},E3={rotate:Zs,rotateX:Zs,rotateY:Zs,rotateZ:Zs,scale:iu,scaleX:iu,scaleY:iu,scaleZ:iu,skew:Zs,skewX:Zs,skewY:Zs,distance:he,translateX:he,translateY:he,translateZ:he,x:he,y:he,z:he,perspective:he,transformPerspective:he,opacity:vl,originX:U0,originY:U0,originZ:he},dg={borderWidth:he,borderTopWidth:he,borderRightWidth:he,borderBottomWidth:he,borderLeftWidth:he,borderRadius:he,radius:he,borderTopLeftRadius:he,borderTopRightRadius:he,borderBottomRightRadius:he,borderBottomLeftRadius:he,width:he,maxWidth:he,height:he,maxHeight:he,top:he,right:he,bottom:he,left:he,inset:he,insetBlock:he,insetBlockStart:he,insetBlockEnd:he,insetInline:he,insetInlineStart:he,insetInlineEnd:he,padding:he,paddingTop:he,paddingRight:he,paddingBottom:he,paddingLeft:he,paddingBlock:he,paddingBlockStart:he,paddingBlockEnd:he,paddingInline:he,paddingInlineStart:he,paddingInlineEnd:he,margin:he,marginTop:he,marginRight:he,marginBottom:he,marginLeft:he,marginBlock:he,marginBlockStart:he,marginBlockEnd:he,marginInline:he,marginInlineStart:he,marginInlineEnd:he,backgroundPositionX:he,backgroundPositionY:he,...E3,zIndex:W0,fillOpacity:vl,strokeOpacity:vl,numOctaves:W0},C3={...dg,color:jt,backgroundColor:jt,outlineColor:jt,fill:jt,stroke:jt,borderColor:jt,borderTopColor:jt,borderRightColor:jt,borderBottomColor:jt,borderLeftColor:jt,filter:Zm,WebkitFilter:Zm},HC=e=>C3[e];function IC(e,n){let s=HC(e);return s!==Zm&&(s=ti),s.getAnimatableNone?s.getAnimatableNone(n):void 0}const T3=new Set(["auto","none","0"]);function A3(e,n,s){let i=0,r;for(;i<e.length&&!r;){const c=e[i];typeof c=="string"&&!T3.has(c)&&yl(c).values.length&&(r=e[i]),i++}if(r&&s)for(const c of n)e[c]=IC(s,r)}class j3 extends cg{constructor(n,s,i,r,c){super(n,s,i,r,c,!0)}readKeyframes(){const{unresolvedKeyframes:n,element:s,name:i}=this;if(!s||!s.current)return;super.readKeyframes();for(let f=0;f<n.length;f++){let h=n[f];if(typeof h=="string"&&(h=h.trim(),ng(h))){const y=zC(h,s.current);y!==void 0&&(n[f]=y),f===n.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!VC.has(i)||n.length!==2)return;const[r,c]=n,u=J0(r),d=J0(c);if(u!==d)if(G0(u)&&G0(d))for(let f=0;f<n.length;f++){const h=n[f];typeof h=="string"&&(n[f]=parseFloat(h))}else ki[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:n,name:s}=this,i=[];for(let r=0;r<n.length;r++)(n[r]===null||x3(n[r]))&&i.push(r);i.length&&A3(n,i,s)}measureInitialState(){const{element:n,unresolvedKeyframes:s,name:i}=this;if(!n||!n.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ki[i](n.measureViewportBox(),window.getComputedStyle(n.current)),s[0]=this.measuredOrigin;const r=s[s.length-1];r!==void 0&&n.getValue(i,r).jump(r,!1)}measureEndState(){const{element:n,name:s,unresolvedKeyframes:i}=this;if(!n||!n.current)return;const r=n.getValue(s);r&&r.jump(this.measuredOrigin,!1);const c=i.length-1,u=i[c];i[c]=ki[s](n.measureViewportBox(),window.getComputedStyle(n.current)),u!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=u),this.removedTransforms?.length&&this.removedTransforms.forEach(([d,f])=>{n.getValue(d).set(f)}),this.resolveNoneKeyframes()}}function FC(e,n,s){if(e instanceof EventTarget)return[e];if(typeof e=="string"){const r=document.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e)}const qC=(e,n)=>n&&typeof e=="number"?n.transform(e):e;function N3(e){return sC(e)&&"offsetHeight"in e}const eS=30,R3=e=>!isNaN(parseFloat(e)),ol={current:void 0};class M3{constructor(n,s={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const r=Cn.now();if(this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const c of this.dependents)c.dirty()},this.hasAnimated=!1,this.setCurrent(n),this.owner=s.owner}setCurrent(n){this.current=n,this.updatedAt=Cn.now(),this.canTrackVelocity===null&&n!==void 0&&(this.canTrackVelocity=R3(this.current))}setPrevFrameValue(n=this.current){this.prevFrameValue=n,this.prevUpdatedAt=this.updatedAt}onChange(n){return this.on("change",n)}on(n,s){this.events[n]||(this.events[n]=new Wp);const i=this.events[n].add(s);return n==="change"?()=>{i(),We.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const n in this.events)this.events[n].clear()}attach(n,s){this.passiveEffect=n,this.stopPassiveEffect=s}set(n){this.passiveEffect?this.passiveEffect(n,this.updateAndNotify):this.updateAndNotify(n)}setWithVelocity(n,s,i){this.set(s),this.prev=void 0,this.prevFrameValue=n,this.prevUpdatedAt=this.updatedAt-i}jump(n,s=!0){this.updateAndNotify(n),this.prev=n,this.prevUpdatedAt=this.prevFrameValue=void 0,s&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(n){this.dependents||(this.dependents=new Set),this.dependents.add(n)}removeDependent(n){this.dependents&&this.dependents.delete(n)}get(){return ol.current&&ol.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const n=Cn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||n-this.updatedAt>eS)return 0;const s=Math.min(this.updatedAt-this.prevUpdatedAt,eS);return oC(parseFloat(this.current)-parseFloat(this.prevFrameValue),s)}start(n){return this.stop(),new Promise(s=>{this.hasAnimated=!0,this.animation=n(s),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ii(e,n){return new M3(e,n)}const{schedule:fg}=vC(queueMicrotask,!1),ga={x:!1,y:!1};function $C(){return ga.x||ga.y}function _3(e){return e==="x"||e==="y"?ga[e]?null:(ga[e]=!0,()=>{ga[e]=!1}):ga.x||ga.y?null:(ga.x=ga.y=!0,()=>{ga.x=ga.y=!1})}function KC(e,n){const s=FC(e),i=new AbortController,r={passive:!0,...n,signal:i.signal};return[s,r,()=>i.abort()]}function tS(e){return!(e.pointerType==="touch"||$C())}function O3(e,n,s={}){const[i,r,c]=KC(e,s),u=d=>{if(!tS(d))return;const{target:f}=d,h=n(f,d);if(typeof h!="function"||!f)return;const y=g=>{tS(g)&&(h(g),f.removeEventListener("pointerleave",y))};f.addEventListener("pointerleave",y,r)};return i.forEach(d=>{d.addEventListener("pointerenter",u,r)}),c}const YC=(e,n)=>n?e===n?!0:YC(e,n.parentElement):!1,hg=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,D3=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function P3(e){return D3.has(e.tagName)||e.tabIndex!==-1}const yu=new WeakSet;function nS(e){return n=>{n.key==="Enter"&&e(n)}}function Wh(e,n){e.dispatchEvent(new PointerEvent("pointer"+n,{isPrimary:!0,bubbles:!0}))}const k3=(e,n)=>{const s=e.currentTarget;if(!s)return;const i=nS(()=>{if(yu.has(s))return;Wh(s,"down");const r=nS(()=>{Wh(s,"up")}),c=()=>Wh(s,"cancel");s.addEventListener("keyup",r,n),s.addEventListener("blur",c,n)});s.addEventListener("keydown",i,n),s.addEventListener("blur",()=>s.removeEventListener("keydown",i),n)};function aS(e){return hg(e)&&!$C()}function L3(e,n,s={}){const[i,r,c]=KC(e,s),u=d=>{const f=d.currentTarget;if(!aS(d))return;yu.add(f);const h=n(f,d),y=(w,E)=>{window.removeEventListener("pointerup",g),window.removeEventListener("pointercancel",b),yu.has(f)&&yu.delete(f),aS(w)&&typeof h=="function"&&h(w,{success:E})},g=w=>{y(w,f===window||f===document||s.useGlobalTarget||YC(f,w.target))},b=w=>{y(w,!1)};window.addEventListener("pointerup",g,r),window.addEventListener("pointercancel",b,r)};return i.forEach(d=>{(s.useGlobalTarget?window:d).addEventListener("pointerdown",u,r),N3(d)&&(d.addEventListener("focus",h=>k3(h,r)),!P3(d)&&!d.hasAttribute("tabindex")&&(d.tabIndex=0))}),c}function GC(e){return sC(e)&&"ownerSVGElement"in e}function z3(e){return GC(e)&&e.tagName==="svg"}function V3(...e){const n=!Array.isArray(e[0]),s=n?0:-1,i=e[0+s],r=e[1+s],c=e[2+s],u=e[3+s],d=RC(r,c,u);return n?d(i):d}const Nt=e=>!!(e&&e.getVelocity);function B3(e,n,s){const i=e.get();let r=null,c=i,u;const d=typeof i=="string"?i.replace(/[\d.-]/g,""):void 0,f=()=>{r&&(r.stop(),r=null)},h=()=>{f(),r=new od({keyframes:[iS(e.get()),iS(c)],velocity:e.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...s,onUpdate:u})};if(e.attach((y,g)=>{c=y,u=b=>g(sS(b,d)),We.postRender(h)},f),Nt(n)){const y=n.on("change",b=>e.set(sS(b,d))),g=e.on("destroy",y);return()=>{y(),g()}}return f}function sS(e,n){return n?e+n:e}function iS(e){return typeof e=="number"?e:parseFloat(e)}const U3=[...UC,jt,ti],H3=e=>U3.find(BC(e)),rd=x.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function I3(e=!0){const n=x.useContext(Gp);if(n===null)return[!0,null];const{isPresent:s,onExitComplete:i,register:r}=n,c=x.useId();x.useEffect(()=>{if(e)return r(c)},[e]);const u=x.useCallback(()=>e&&i&&i(c),[c,i,e]);return!s&&i?[!1,u]:[!0]}const XC=x.createContext({strict:!1}),oS={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},qo={};for(const e in oS)qo[e]={isEnabled:n=>oS[e].some(s=>!!n[s])};function F3(e){for(const n in e)qo[n]={...qo[n],...e[n]}}const q3=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Vu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||q3.has(e)}let ZC=e=>!Vu(e);function $3(e){typeof e=="function"&&(ZC=n=>n.startsWith("on")?!Vu(n):e(n))}try{$3(require("@emotion/is-prop-valid").default)}catch{}function K3(e,n,s){const i={};for(const r in e)r==="values"&&typeof e.values=="object"||(ZC(r)||s===!0&&Vu(r)||!n&&!Vu(r)||e.draggable&&r.startsWith("onDrag"))&&(i[r]=e[r]);return i}const ld=x.createContext({});function cd(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function xl(e){return typeof e=="string"||Array.isArray(e)}const mg=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],pg=["initial",...mg];function ud(e){return cd(e.animate)||pg.some(n=>xl(e[n]))}function QC(e){return!!(ud(e)||e.variants)}function Y3(e,n){if(ud(e)){const{initial:s,animate:i}=e;return{initial:s===!1||xl(s)?s:void 0,animate:xl(i)?i:void 0}}return e.inherit!==!1?n:{}}function G3(e){const{initial:n,animate:s}=Y3(e,x.useContext(ld));return x.useMemo(()=>({initial:n,animate:s}),[rS(n),rS(s)])}function rS(e){return Array.isArray(e)?e.join(" "):e}function lS(e,n){return n.max===n.min?0:e/(n.max-n.min)*100}const Wr={correct:(e,n)=>{if(!n.target)return e;if(typeof e=="string")if(he.test(e))e=parseFloat(e);else return e;const s=lS(e,n.target.x),i=lS(e,n.target.y);return`${s}% ${i}%`}},X3={correct:(e,{treeScale:n,projectionDelta:s})=>{const i=e,r=ti.parse(e);if(r.length>5)return i;const c=ti.createTransformer(e),u=typeof r[0]!="number"?1:0,d=s.x.scale*n.x,f=s.y.scale*n.y;r[0+u]/=d,r[1+u]/=f;const h=rt(d,f,.5);return typeof r[2+u]=="number"&&(r[2+u]/=h),typeof r[3+u]=="number"&&(r[3+u]/=h),c(r)}},Qm={borderRadius:{...Wr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Wr,borderTopRightRadius:Wr,borderBottomLeftRadius:Wr,borderBottomRightRadius:Wr,boxShadow:X3};function JC(e,{layout:n,layoutId:s}){return ar.has(e)||e.startsWith("origin")||(n||s!==void 0)&&(!!Qm[e]||e==="opacity")}const Z3={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Q3=nr.length;function J3(e,n,s){let i="",r=!0;for(let c=0;c<Q3;c++){const u=nr[c],d=e[u];if(d===void 0)continue;let f=!0;if(typeof d=="number"?f=d===(u.startsWith("scale")?1:0):f=parseFloat(d)===0,!f||s){const h=qC(d,dg[u]);if(!f){r=!1;const y=Z3[u]||u;i+=`${y}(${h}) `}s&&(n[u]=h)}}return i=i.trim(),s?i=s(n,r?"":i):r&&(i="none"),i}function gg(e,n,s){const{style:i,vars:r,transformOrigin:c}=e;let u=!1,d=!1;for(const f in n){const h=n[f];if(ar.has(f)){u=!0;continue}else if(xC(f)){r[f]=h;continue}else{const y=qC(h,dg[f]);f.startsWith("origin")?(d=!0,c[f]=y):i[f]=y}}if(n.transform||(u||s?i.transform=J3(n,e.transform,s):i.transform&&(i.transform="none")),d){const{originX:f="50%",originY:h="50%",originZ:y=0}=c;i.transformOrigin=`${f} ${h} ${y}`}}const vg=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function WC(e,n,s){for(const i in n)!Nt(n[i])&&!JC(i,s)&&(e[i]=n[i])}function W3({transformTemplate:e},n){return x.useMemo(()=>{const s=vg();return gg(s,n,e),Object.assign({},s.vars,s.style)},[n])}function ez(e,n){const s=e.style||{},i={};return WC(i,s,e),Object.assign(i,W3(e,n)),i}function tz(e,n){const s={},i=ez(e,n);return e.drag&&e.dragListener!==!1&&(s.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(s.tabIndex=0),s.style=i,s}const nz={offset:"stroke-dashoffset",array:"stroke-dasharray"},az={offset:"strokeDashoffset",array:"strokeDasharray"};function sz(e,n,s=1,i=0,r=!0){e.pathLength=1;const c=r?nz:az;e[c.offset]=he.transform(-i);const u=he.transform(n),d=he.transform(s);e[c.array]=`${u} ${d}`}function eT(e,{attrX:n,attrY:s,attrScale:i,pathLength:r,pathSpacing:c=1,pathOffset:u=0,...d},f,h,y){if(gg(e,d,h),f){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:g,style:b}=e;g.transform&&(b.transform=g.transform,delete g.transform),(b.transform||g.transformOrigin)&&(b.transformOrigin=g.transformOrigin??"50% 50%",delete g.transformOrigin),b.transform&&(b.transformBox=y?.transformBox??"fill-box",delete g.transformBox),n!==void 0&&(g.x=n),s!==void 0&&(g.y=s),i!==void 0&&(g.scale=i),r!==void 0&&sz(g,r,c,u,!1)}const tT=()=>({...vg(),attrs:{}}),nT=e=>typeof e=="string"&&e.toLowerCase()==="svg";function iz(e,n,s,i){const r=x.useMemo(()=>{const c=tT();return eT(c,n,nT(i),e.transformTemplate,e.style),{...c.attrs,style:{...c.style}}},[n]);if(e.style){const c={};WC(c,e.style,e),r.style={...c,...r.style}}return r}const oz=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function yg(e){return typeof e!="string"||e.includes("-")?!1:!!(oz.indexOf(e)>-1||/[A-Z]/u.test(e))}function rz(e,n,s,{latestValues:i},r,c=!1,u){const f=(u??yg(e)?iz:tz)(n,i,r,e),h=K3(n,typeof e=="string",c),y=e!==x.Fragment?{...h,...f,ref:s}:{},{children:g}=n,b=x.useMemo(()=>Nt(g)?g.get():g,[g]);return x.createElement(e,{...y,children:b})}function cS(e){const n=[{},{}];return e?.values.forEach((s,i)=>{n[0][i]=s.get(),n[1][i]=s.getVelocity()}),n}function xg(e,n,s,i){if(typeof n=="function"){const[r,c]=cS(i);n=n(s!==void 0?s:e.custom,r,c)}if(typeof n=="string"&&(n=e.variants&&e.variants[n]),typeof n=="function"){const[r,c]=cS(i);n=n(s!==void 0?s:e.custom,r,c)}return n}function xu(e){return Nt(e)?e.get():e}function lz({scrapeMotionValuesFromProps:e,createRenderState:n},s,i,r){return{latestValues:cz(s,i,r,e),renderState:n()}}function cz(e,n,s,i){const r={},c=i(e,{});for(const b in c)r[b]=xu(c[b]);let{initial:u,animate:d}=e;const f=ud(e),h=QC(e);n&&h&&!f&&e.inherit!==!1&&(u===void 0&&(u=n.initial),d===void 0&&(d=n.animate));let y=s?s.initial===!1:!1;y=y||u===!1;const g=y?d:u;if(g&&typeof g!="boolean"&&!cd(g)){const b=Array.isArray(g)?g:[g];for(let w=0;w<b.length;w++){const E=xg(e,b[w]);if(E){const{transitionEnd:C,transition:A,...T}=E;for(const N in T){let R=T[N];if(Array.isArray(R)){const _=y?R.length-1:0;R=R[_]}R!==null&&(r[N]=R)}for(const N in C)r[N]=C[N]}}}return r}const aT=e=>(n,s)=>{const i=x.useContext(ld),r=x.useContext(Gp),c=()=>lz(e,n,i,r);return s?c():Kp(c)};function bg(e,n,s){const{style:i}=e,r={};for(const c in i)(Nt(i[c])||n.style&&Nt(n.style[c])||JC(c,e)||s?.getValue(c)?.liveStyle!==void 0)&&(r[c]=i[c]);return r}const uz=aT({scrapeMotionValuesFromProps:bg,createRenderState:vg});function sT(e,n,s){const i=bg(e,n,s);for(const r in e)if(Nt(e[r])||Nt(n[r])){const c=nr.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;i[c]=e[r]}return i}const dz=aT({scrapeMotionValuesFromProps:sT,createRenderState:tT}),fz=Symbol.for("motionComponentSymbol");function Lo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function hz(e,n,s){return x.useCallback(i=>{i&&e.onMount&&e.onMount(i),n&&(i?n.mount(i):n.unmount()),s&&(typeof s=="function"?s(i):Lo(s)&&(s.current=i))},[n])}const Sg=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),mz="framerAppearId",iT="data-"+Sg(mz),oT=x.createContext({});function pz(e,n,s,i,r,c){const{visualElement:u}=x.useContext(ld),d=x.useContext(XC),f=x.useContext(Gp),h=x.useContext(rd).reducedMotion,y=x.useRef(null);i=i||d.renderer,!y.current&&i&&(y.current=i(e,{visualState:n,parent:u,props:s,presenceContext:f,blockInitialAnimation:f?f.initial===!1:!1,reducedMotionConfig:h,isSVG:c}));const g=y.current,b=x.useContext(oT);g&&!g.projection&&r&&(g.type==="html"||g.type==="svg")&&gz(y.current,s,r,b);const w=x.useRef(!1);x.useInsertionEffect(()=>{g&&w.current&&g.update(s,f)});const E=s[iT],C=x.useRef(!!E&&!window.MotionHandoffIsComplete?.(E)&&window.MotionHasOptimisedAnimation?.(E));return nC(()=>{g&&(w.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),C.current&&g.animationState&&g.animationState.animateChanges())}),x.useEffect(()=>{g&&(!C.current&&g.animationState&&g.animationState.animateChanges(),C.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(E)}),C.current=!1),g.enteringChildren=void 0)}),g}function gz(e,n,s,i){const{layoutId:r,layout:c,drag:u,dragConstraints:d,layoutScroll:f,layoutRoot:h,layoutCrossfade:y}=n;e.projection=new s(e.latestValues,n["data-framer-portal-id"]?void 0:rT(e.parent)),e.projection.setOptions({layoutId:r,layout:c,alwaysMeasureLayout:!!u||d&&Lo(d),visualElement:e,animationType:typeof c=="string"?c:"both",initialPromotionConfig:i,crossfade:y,layoutScroll:f,layoutRoot:h})}function rT(e){if(e)return e.options.allowProjection!==!1?e.projection:rT(e.parent)}function em(e,{forwardMotionProps:n=!1,type:s}={},i,r){i&&F3(i);const c=s?s==="svg":yg(e),u=c?dz:uz;function d(h,y){let g;const b={...x.useContext(rd),...h,layoutId:vz(h)},{isStatic:w}=b,E=G3(h),C=u(h,w);if(!w&&Yp){yz();const A=xz(b);g=A.MeasureLayout,E.visualElement=pz(e,C,b,r,A.ProjectionNode,c)}return m.jsxs(ld.Provider,{value:E,children:[g&&E.visualElement?m.jsx(g,{visualElement:E.visualElement,...b}):null,rz(e,h,hz(C,E.visualElement,y),C,w,n,c)]})}d.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const f=x.forwardRef(d);return f[fz]=e,f}function vz({layoutId:e}){const n=x.useContext(tC).id;return n&&e!==void 0?n+"-"+e:e}function yz(e,n){x.useContext(XC).strict}function xz(e){const{drag:n,layout:s}=qo;if(!n&&!s)return{};const i={...n,...s};return{MeasureLayout:n?.isEnabled(e)||s?.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function bz(e,n){if(typeof Proxy>"u")return em;const s=new Map,i=(c,u)=>em(c,u,e,n),r=(c,u)=>i(c,u);return new Proxy(r,{get:(c,u)=>u==="create"?i:(s.has(u)||s.set(u,em(u,void 0,e,n)),s.get(u))})}function lT({top:e,left:n,right:s,bottom:i}){return{x:{min:n,max:s},y:{min:e,max:i}}}function Sz({x:e,y:n}){return{top:n.min,right:e.max,bottom:n.max,left:e.min}}function wz(e,n){if(!n)return e;const s=n({x:e.left,y:e.top}),i=n({x:e.right,y:e.bottom});return{top:s.y,left:s.x,bottom:i.y,right:i.x}}function tm(e){return e===void 0||e===1}function Jm({scale:e,scaleX:n,scaleY:s}){return!tm(e)||!tm(n)||!tm(s)}function ji(e){return Jm(e)||cT(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function cT(e){return uS(e.x)||uS(e.y)}function uS(e){return e&&e!=="0%"}function Bu(e,n,s){const i=e-s,r=n*i;return s+r}function dS(e,n,s,i,r){return r!==void 0&&(e=Bu(e,r,i)),Bu(e,s,i)+n}function Wm(e,n=0,s=1,i,r){e.min=dS(e.min,n,s,i,r),e.max=dS(e.max,n,s,i,r)}function uT(e,{x:n,y:s}){Wm(e.x,n.translate,n.scale,n.originPoint),Wm(e.y,s.translate,s.scale,s.originPoint)}const fS=.999999999999,hS=1.0000000000001;function Ez(e,n,s,i=!1){const r=s.length;if(!r)return;n.x=n.y=1;let c,u;for(let d=0;d<r;d++){c=s[d],u=c.projectionDelta;const{visualElement:f}=c.options;f&&f.props.style&&f.props.style.display==="contents"||(i&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Vo(e,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),u&&(n.x*=u.x.scale,n.y*=u.y.scale,uT(e,u)),i&&ji(c.latestValues)&&Vo(e,c.latestValues))}n.x<hS&&n.x>fS&&(n.x=1),n.y<hS&&n.y>fS&&(n.y=1)}function zo(e,n){e.min=e.min+n,e.max=e.max+n}function mS(e,n,s,i,r=.5){const c=rt(e.min,e.max,r);Wm(e,n,s,c,i)}function Vo(e,n){mS(e.x,n.x,n.scaleX,n.scale,n.originX),mS(e.y,n.y,n.scaleY,n.scale,n.originY)}function dT(e,n){return lT(wz(e.getBoundingClientRect(),n))}function Cz(e,n,s){const i=dT(e,s),{scroll:r}=n;return r&&(zo(i.x,r.offset.x),zo(i.y,r.offset.y)),i}const pS=()=>({translate:0,scale:1,origin:0,originPoint:0}),Bo=()=>({x:pS(),y:pS()}),gS=()=>({min:0,max:0}),Lt=()=>({x:gS(),y:gS()}),ep={current:null},fT={current:!1};function Tz(){if(fT.current=!0,!!Yp)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),n=()=>ep.current=e.matches;e.addEventListener("change",n),n()}else ep.current=!1}const Az=new WeakMap;function jz(e,n,s){for(const i in n){const r=n[i],c=s[i];if(Nt(r))e.addValue(i,r);else if(Nt(c))e.addValue(i,Ii(r,{owner:e}));else if(c!==r)if(e.hasValue(i)){const u=e.getValue(i);u.liveStyle===!0?u.jump(r):u.hasAnimated||u.set(r)}else{const u=e.getStaticValue(i);e.addValue(i,Ii(u!==void 0?u:r,{owner:e}))}}for(const i in s)n[i]===void 0&&e.removeValue(i);return n}const vS=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Nz{scrapeMotionValuesFromProps(n,s,i){return{}}constructor({parent:n,props:s,presenceContext:i,reducedMotionConfig:r,blockInitialAnimation:c,visualState:u},d={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=cg,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const b=Cn.now();this.renderScheduledAt<b&&(this.renderScheduledAt=b,We.render(this.render,!1,!0))};const{latestValues:f,renderState:h}=u;this.latestValues=f,this.baseTarget={...f},this.initialValues=s.initial?{...f}:{},this.renderState=h,this.parent=n,this.props=s,this.presenceContext=i,this.depth=n?n.depth+1:0,this.reducedMotionConfig=r,this.options=d,this.blockInitialAnimation=!!c,this.isControllingVariants=ud(s),this.isVariantNode=QC(s),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(n&&n.current);const{willChange:y,...g}=this.scrapeMotionValuesFromProps(s,{},this);for(const b in g){const w=g[b];f[b]!==void 0&&Nt(w)&&w.set(f[b])}}mount(n){this.current=n,Az.set(n,this),this.projection&&!this.projection.instance&&this.projection.mount(n),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,i)=>this.bindToMotionValue(i,s)),fT.current||Tz(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ep.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),xs(this.notifyUpdate),xs(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const s=this.features[n];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(n){this.children.add(n),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(n)}removeChild(n){this.children.delete(n),this.enteringChildren&&this.enteringChildren.delete(n)}bindToMotionValue(n,s){this.valueSubscriptions.has(n)&&this.valueSubscriptions.get(n)();const i=ar.has(n);i&&this.onBindTransform&&this.onBindTransform();const r=s.on("change",u=>{this.latestValues[n]=u,this.props.onUpdate&&We.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let c;window.MotionCheckAppearSync&&(c=window.MotionCheckAppearSync(this,n,s)),this.valueSubscriptions.set(n,()=>{r(),c&&c(),s.owner&&s.stop()})}sortNodePosition(n){return!this.current||!this.sortInstanceNodePosition||this.type!==n.type?0:this.sortInstanceNodePosition(this.current,n.current)}updateFeatures(){let n="animation";for(n in qo){const s=qo[n];if(!s)continue;const{isEnabled:i,Feature:r}=s;if(!this.features[n]&&r&&i(this.props)&&(this.features[n]=new r(this)),this.features[n]){const c=this.features[n];c.isMounted?c.update():(c.mount(),c.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Lt()}getStaticValue(n){return this.latestValues[n]}setStaticValue(n,s){this.latestValues[n]=s}update(n,s){(n.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=n,this.prevPresenceContext=this.presenceContext,this.presenceContext=s;for(let i=0;i<vS.length;i++){const r=vS[i];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const c="on"+r,u=n[c];u&&(this.propEventSubscriptions[r]=this.on(r,u))}this.prevMotionValues=jz(this,this.scrapeMotionValuesFromProps(n,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(n){return this.props.variants?this.props.variants[n]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(n){const s=this.getClosestVariantNode();if(s)return s.variantChildren&&s.variantChildren.add(n),()=>s.variantChildren.delete(n)}addValue(n,s){const i=this.values.get(n);s!==i&&(i&&this.removeValue(n),this.bindToMotionValue(n,s),this.values.set(n,s),this.latestValues[n]=s.get())}removeValue(n){this.values.delete(n);const s=this.valueSubscriptions.get(n);s&&(s(),this.valueSubscriptions.delete(n)),delete this.latestValues[n],this.removeValueFromRenderState(n,this.renderState)}hasValue(n){return this.values.has(n)}getValue(n,s){if(this.props.values&&this.props.values[n])return this.props.values[n];let i=this.values.get(n);return i===void 0&&s!==void 0&&(i=Ii(s===null?void 0:s,{owner:this}),this.addValue(n,i)),i}readValue(n,s){let i=this.latestValues[n]!==void 0||!this.current?this.latestValues[n]:this.getBaseTargetFromProps(this.props,n)??this.readValueFromInstance(this.current,n,this.options);return i!=null&&(typeof i=="string"&&(aC(i)||iC(i))?i=parseFloat(i):!H3(i)&&ti.test(s)&&(i=IC(n,s)),this.setBaseTarget(n,Nt(i)?i.get():i)),Nt(i)?i.get():i}setBaseTarget(n,s){this.baseTarget[n]=s}getBaseTarget(n){const{initial:s}=this.props;let i;if(typeof s=="string"||typeof s=="object"){const c=xg(this.props,s,this.presenceContext?.custom);c&&(i=c[n])}if(s&&i!==void 0)return i;const r=this.getBaseTargetFromProps(this.props,n);return r!==void 0&&!Nt(r)?r:this.initialValues[n]!==void 0&&i===void 0?void 0:this.baseTarget[n]}on(n,s){return this.events[n]||(this.events[n]=new Wp),this.events[n].add(s)}notify(n,...s){this.events[n]&&this.events[n].notify(...s)}scheduleRenderMicrotask(){fg.render(this.render)}}class hT extends Nz{constructor(){super(...arguments),this.KeyframeResolver=j3}sortInstanceNodePosition(n,s){return n.compareDocumentPosition(s)&2?1:-1}getBaseTargetFromProps(n,s){return n.style?n.style[s]:void 0}removeValueFromRenderState(n,{vars:s,style:i}){delete s[n],delete i[n]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:n}=this.props;Nt(n)&&(this.childSubscription=n.on("change",s=>{this.current&&(this.current.textContent=`${s}`)}))}}function mT(e,{style:n,vars:s},i,r){const c=e.style;let u;for(u in n)c[u]=n[u];r?.applyProjectionStyles(c,i);for(u in s)c.setProperty(u,s[u])}function Rz(e){return window.getComputedStyle(e)}class Mz extends hT{constructor(){super(...arguments),this.type="html",this.renderInstance=mT}readValueFromInstance(n,s){if(ar.has(s))return this.projection?.isProjecting?qm(s):K5(n,s);{const i=Rz(n),r=(xC(s)?i.getPropertyValue(s):i[s])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(n,{transformPagePoint:s}){return dT(n,s)}build(n,s,i){gg(n,s,i.transformTemplate)}scrapeMotionValuesFromProps(n,s,i){return bg(n,s,i)}}const pT=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function _z(e,n,s,i){mT(e,n,void 0,i);for(const r in n.attrs)e.setAttribute(pT.has(r)?r:Sg(r),n.attrs[r])}class Oz extends hT{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Lt}getBaseTargetFromProps(n,s){return n[s]}readValueFromInstance(n,s){if(ar.has(s)){const i=HC(s);return i&&i.default||0}return s=pT.has(s)?s:Sg(s),n.getAttribute(s)}scrapeMotionValuesFromProps(n,s,i){return sT(n,s,i)}build(n,s,i){eT(n,s,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(n,s,i,r){_z(n,s,i,r)}mount(n){this.isSVGTag=nT(n.tagName),super.mount(n)}}const Dz=(e,n)=>n.isSVG??yg(e)?new Oz(n):new Mz(n,{allowProjection:e!==x.Fragment});function Io(e,n,s){const i=e.getProps();return xg(i,n,s!==void 0?s:i.custom,e)}const tp=e=>Array.isArray(e);function Pz(e,n,s){e.hasValue(n)?e.getValue(n).set(s):e.addValue(n,Ii(s))}function kz(e){return tp(e)?e[e.length-1]||0:e}function Lz(e,n){const s=Io(e,n);let{transitionEnd:i={},transition:r={},...c}=s||{};c={...c,...i};for(const u in c){const d=kz(c[u]);Pz(e,u,d)}}function zz(e){return!!(Nt(e)&&e.add)}function np(e,n){const s=e.getValue("willChange");if(zz(s))return s.add(n);if(!s&&ys.WillChange){const i=new ys.WillChange("auto");e.addValue("willChange",i),i.add(n)}}function gT(e){return e.props[iT]}const Vz=e=>e!==null;function Bz(e,{repeat:n,repeatType:s="loop"},i){const r=e.filter(Vz),c=n&&s!=="loop"&&n%2===1?0:r.length-1;return r[c]}const Uz={type:"spring",stiffness:500,damping:25,restSpeed:10},Hz=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Iz={type:"keyframes",duration:.8},Fz={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},qz=(e,{keyframes:n})=>n.length>2?Iz:ar.has(e)?e.startsWith("scale")?Hz(n[1]):Uz:Fz;function $z({when:e,delay:n,delayChildren:s,staggerChildren:i,staggerDirection:r,repeat:c,repeatType:u,repeatDelay:d,from:f,elapsed:h,...y}){return!!Object.keys(y).length}const wg=(e,n,s,i={},r,c)=>u=>{const d=ug(i,e)||{},f=d.delay||i.delay||0;let{elapsed:h=0}=i;h=h-ka(f);const y={keyframes:Array.isArray(s)?s:[null,s],ease:"easeOut",velocity:n.getVelocity(),...d,delay:-h,onUpdate:b=>{n.set(b),d.onUpdate&&d.onUpdate(b)},onComplete:()=>{u(),d.onComplete&&d.onComplete()},name:e,motionValue:n,element:c?void 0:r};$z(d)||Object.assign(y,qz(e,y)),y.duration&&(y.duration=ka(y.duration)),y.repeatDelay&&(y.repeatDelay=ka(y.repeatDelay)),y.from!==void 0&&(y.keyframes[0]=y.from);let g=!1;if((y.type===!1||y.duration===0&&!y.repeatDelay)&&(Xm(y),y.delay===0&&(g=!0)),(ys.instantAnimations||ys.skipAnimations)&&(g=!0,Xm(y),y.delay=0),y.allowFlatten=!d.type&&!d.ease,g&&!c&&n.get()!==void 0){const b=Bz(y.keyframes,d);if(b!==void 0){We.update(()=>{y.onUpdate(b),y.onComplete()});return}}return d.isSync?new od(y):new p3(y)};function Kz({protectedKeys:e,needsAnimating:n},s){const i=e.hasOwnProperty(s)&&n[s]!==!0;return n[s]=!1,i}function vT(e,n,{delay:s=0,transitionOverride:i,type:r}={}){let{transition:c=e.getDefaultTransition(),transitionEnd:u,...d}=n;i&&(c=i);const f=[],h=r&&e.animationState&&e.animationState.getState()[r];for(const y in d){const g=e.getValue(y,e.latestValues[y]??null),b=d[y];if(b===void 0||h&&Kz(h,y))continue;const w={delay:s,...ug(c||{},y)},E=g.get();if(E!==void 0&&!g.isAnimating&&!Array.isArray(b)&&b===E&&!w.velocity)continue;let C=!1;if(window.MotionHandoffAnimation){const T=gT(e);if(T){const N=window.MotionHandoffAnimation(T,y,We);N!==null&&(w.startTime=N,C=!0)}}np(e,y),g.start(wg(y,g,b,e.shouldReduceMotion&&VC.has(y)?{type:!1}:w,e,C));const A=g.animation;A&&f.push(A)}return u&&Promise.all(f).then(()=>{We.update(()=>{u&&Lz(e,u)})}),f}function yT(e,n,s,i=0,r=1){const c=Array.from(e).sort((h,y)=>h.sortNodePosition(y)).indexOf(n),u=e.size,d=(u-1)*i;return typeof s=="function"?s(c,u):r===1?c*i:d-c*i}function ap(e,n,s={}){const i=Io(e,n,s.type==="exit"?e.presenceContext?.custom:void 0);let{transition:r=e.getDefaultTransition()||{}}=i||{};s.transitionOverride&&(r=s.transitionOverride);const c=i?()=>Promise.all(vT(e,i,s)):()=>Promise.resolve(),u=e.variantChildren&&e.variantChildren.size?(f=0)=>{const{delayChildren:h=0,staggerChildren:y,staggerDirection:g}=r;return Yz(e,n,f,h,y,g,s)}:()=>Promise.resolve(),{when:d}=r;if(d){const[f,h]=d==="beforeChildren"?[c,u]:[u,c];return f().then(()=>h())}else return Promise.all([c(),u(s.delay)])}function Yz(e,n,s=0,i=0,r=0,c=1,u){const d=[];for(const f of e.variantChildren)f.notify("AnimationStart",n),d.push(ap(f,n,{...u,delay:s+(typeof i=="function"?0:i)+yT(e.variantChildren,f,i,r,c)}).then(()=>f.notify("AnimationComplete",n)));return Promise.all(d)}function Gz(e,n,s={}){e.notify("AnimationStart",n);let i;if(Array.isArray(n)){const r=n.map(c=>ap(e,c,s));i=Promise.all(r)}else if(typeof n=="string")i=ap(e,n,s);else{const r=typeof n=="function"?Io(e,n,s.custom):n;i=Promise.all(vT(e,r,s))}return i.then(()=>{e.notify("AnimationComplete",n)})}function xT(e,n){if(!Array.isArray(n))return!1;const s=n.length;if(s!==e.length)return!1;for(let i=0;i<s;i++)if(n[i]!==e[i])return!1;return!0}const Xz=pg.length;function bT(e){if(!e)return;if(!e.isControllingVariants){const s=e.parent?bT(e.parent)||{}:{};return e.props.initial!==void 0&&(s.initial=e.props.initial),s}const n={};for(let s=0;s<Xz;s++){const i=pg[s],r=e.props[i];(xl(r)||r===!1)&&(n[i]=r)}return n}const Zz=[...mg].reverse(),Qz=mg.length;function Jz(e){return n=>Promise.all(n.map(({animation:s,options:i})=>Gz(e,s,i)))}function Wz(e){let n=Jz(e),s=yS(),i=!0;const r=f=>(h,y)=>{const g=Io(e,y,f==="exit"?e.presenceContext?.custom:void 0);if(g){const{transition:b,transitionEnd:w,...E}=g;h={...h,...E,...w}}return h};function c(f){n=f(e)}function u(f){const{props:h}=e,y=bT(e.parent)||{},g=[],b=new Set;let w={},E=1/0;for(let A=0;A<Qz;A++){const T=Zz[A],N=s[T],R=h[T]!==void 0?h[T]:y[T],_=xl(R),M=T===f?N.isActive:null;M===!1&&(E=A);let U=R===y[T]&&R!==h[T]&&_;if(U&&i&&e.manuallyAnimateOnMount&&(U=!1),N.protectedKeys={...w},!N.isActive&&M===null||!R&&!N.prevProp||cd(R)||typeof R=="boolean")continue;const L=eV(N.prevProp,R);let O=L||T===f&&N.isActive&&!U&&_||A>E&&_,K=!1;const Z=Array.isArray(R)?R:[R];let J=Z.reduce(r(T),{});M===!1&&(J={});const{prevResolvedValues:se={}}=N,I={...se,...J},ne=H=>{O=!0,b.has(H)&&(K=!0,b.delete(H)),N.needsAnimating[H]=!0;const V=e.getValue(H);V&&(V.liveStyle=!1)};for(const H in I){const V=J[H],oe=se[H];if(w.hasOwnProperty(H))continue;let ue=!1;tp(V)&&tp(oe)?ue=!xT(V,oe):ue=V!==oe,ue?V!=null?ne(H):b.add(H):V!==void 0&&b.has(H)?ne(H):N.protectedKeys[H]=!0}N.prevProp=R,N.prevResolvedValues=J,N.isActive&&(w={...w,...J}),i&&e.blockInitialAnimation&&(O=!1);const le=U&&L;O&&(!le||K)&&g.push(...Z.map(H=>{const V={type:T};if(typeof H=="string"&&i&&!le&&e.manuallyAnimateOnMount&&e.parent){const{parent:oe}=e,ue=Io(oe,H);if(oe.enteringChildren&&ue){const{delayChildren:P}=ue.transition||{};V.delay=yT(oe.enteringChildren,e,P)}}return{animation:H,options:V}}))}if(b.size){const A={};if(typeof h.initial!="boolean"){const T=Io(e,Array.isArray(h.initial)?h.initial[0]:h.initial);T&&T.transition&&(A.transition=T.transition)}b.forEach(T=>{const N=e.getBaseTarget(T),R=e.getValue(T);R&&(R.liveStyle=!0),A[T]=N??null}),g.push({animation:A})}let C=!!g.length;return i&&(h.initial===!1||h.initial===h.animate)&&!e.manuallyAnimateOnMount&&(C=!1),i=!1,C?n(g):Promise.resolve()}function d(f,h){if(s[f].isActive===h)return Promise.resolve();e.variantChildren?.forEach(g=>g.animationState?.setActive(f,h)),s[f].isActive=h;const y=u(f);for(const g in s)s[g].protectedKeys={};return y}return{animateChanges:u,setActive:d,setAnimateFunction:c,getState:()=>s,reset:()=>{s=yS()}}}function eV(e,n){return typeof n=="string"?n!==e:Array.isArray(n)?!xT(n,e):!1}function Ai(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function yS(){return{animate:Ai(!0),whileInView:Ai(),whileHover:Ai(),whileTap:Ai(),whileDrag:Ai(),whileFocus:Ai(),exit:Ai()}}class ii{constructor(n){this.isMounted=!1,this.node=n}update(){}}class tV extends ii{constructor(n){super(n),n.animationState||(n.animationState=Wz(n))}updateAnimationControlsSubscription(){const{animate:n}=this.node.getProps();cd(n)&&(this.unmountControls=n.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:n}=this.node.getProps(),{animate:s}=this.node.prevProps||{};n!==s&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let nV=0;class aV extends ii{constructor(){super(...arguments),this.id=nV++}update(){if(!this.node.presenceContext)return;const{isPresent:n,onExitComplete:s}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||n===i)return;const r=this.node.animationState.setActive("exit",!n);s&&!n&&r.then(()=>{s(this.id)})}mount(){const{register:n,onExitComplete:s}=this.node.presenceContext||{};s&&s(this.id),n&&(this.unmount=n(this.id))}unmount(){}}const sV={animation:{Feature:tV},exit:{Feature:aV}};function bl(e,n,s,i={passive:!0}){return e.addEventListener(n,s,i),()=>e.removeEventListener(n,s)}function Ml(e){return{point:{x:e.pageX,y:e.pageY}}}const iV=e=>n=>hg(n)&&e(n,Ml(n));function rl(e,n,s,i){return bl(e,n,iV(s),i)}const ST=1e-4,oV=1-ST,rV=1+ST,wT=.01,lV=0-wT,cV=0+wT;function cn(e){return e.max-e.min}function uV(e,n,s){return Math.abs(e-n)<=s}function xS(e,n,s,i=.5){e.origin=i,e.originPoint=rt(n.min,n.max,e.origin),e.scale=cn(s)/cn(n),e.translate=rt(s.min,s.max,e.origin)-e.originPoint,(e.scale>=oV&&e.scale<=rV||isNaN(e.scale))&&(e.scale=1),(e.translate>=lV&&e.translate<=cV||isNaN(e.translate))&&(e.translate=0)}function ll(e,n,s,i){xS(e.x,n.x,s.x,i?i.originX:void 0),xS(e.y,n.y,s.y,i?i.originY:void 0)}function bS(e,n,s){e.min=s.min+n.min,e.max=e.min+cn(n)}function dV(e,n,s){bS(e.x,n.x,s.x),bS(e.y,n.y,s.y)}function SS(e,n,s){e.min=n.min-s.min,e.max=e.min+cn(n)}function Uu(e,n,s){SS(e.x,n.x,s.x),SS(e.y,n.y,s.y)}function Wn(e){return[e("x"),e("y")]}const ET=({current:e})=>e?e.ownerDocument.defaultView:null,wS=(e,n)=>Math.abs(e-n);function fV(e,n){const s=wS(e.x,n.x),i=wS(e.y,n.y);return Math.sqrt(s**2+i**2)}class CT{constructor(n,s,{transformPagePoint:i,contextWindow:r=window,dragSnapToOrigin:c=!1,distanceThreshold:u=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=am(this.lastMoveEventInfo,this.history),w=this.startEvent!==null,E=fV(b.offset,{x:0,y:0})>=this.distanceThreshold;if(!w&&!E)return;const{point:C}=b,{timestamp:A}=Yt;this.history.push({...C,timestamp:A});const{onStart:T,onMove:N}=this.handlers;w||(T&&T(this.lastMoveEvent,b),this.startEvent=this.lastMoveEvent),N&&N(this.lastMoveEvent,b)},this.handlePointerMove=(b,w)=>{this.lastMoveEvent=b,this.lastMoveEventInfo=nm(w,this.transformPagePoint),We.update(this.updatePoint,!0)},this.handlePointerUp=(b,w)=>{this.end();const{onEnd:E,onSessionEnd:C,resumeAnimation:A}=this.handlers;if(this.dragSnapToOrigin&&A&&A(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const T=am(b.type==="pointercancel"?this.lastMoveEventInfo:nm(w,this.transformPagePoint),this.history);this.startEvent&&E&&E(b,T),C&&C(b,T)},!hg(n))return;this.dragSnapToOrigin=c,this.handlers=s,this.transformPagePoint=i,this.distanceThreshold=u,this.contextWindow=r||window;const d=Ml(n),f=nm(d,this.transformPagePoint),{point:h}=f,{timestamp:y}=Yt;this.history=[{...h,timestamp:y}];const{onSessionStart:g}=s;g&&g(n,am(f,this.history)),this.removeListeners=jl(rl(this.contextWindow,"pointermove",this.handlePointerMove),rl(this.contextWindow,"pointerup",this.handlePointerUp),rl(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(n){this.handlers=n}end(){this.removeListeners&&this.removeListeners(),xs(this.updatePoint)}}function nm(e,n){return n?{point:n(e.point)}:e}function ES(e,n){return{x:e.x-n.x,y:e.y-n.y}}function am({point:e},n){return{point:e,delta:ES(e,TT(n)),offset:ES(e,hV(n)),velocity:mV(n,.1)}}function hV(e){return e[0]}function TT(e){return e[e.length-1]}function mV(e,n){if(e.length<2)return{x:0,y:0};let s=e.length-1,i=null;const r=TT(e);for(;s>=0&&(i=e[s],!(r.timestamp-i.timestamp>ka(n)));)s--;if(!i)return{x:0,y:0};const c=ta(r.timestamp-i.timestamp);if(c===0)return{x:0,y:0};const u={x:(r.x-i.x)/c,y:(r.y-i.y)/c};return u.x===1/0&&(u.x=0),u.y===1/0&&(u.y=0),u}function pV(e,{min:n,max:s},i){return n!==void 0&&e<n?e=i?rt(n,e,i.min):Math.max(e,n):s!==void 0&&e>s&&(e=i?rt(s,e,i.max):Math.min(e,s)),e}function CS(e,n,s){return{min:n!==void 0?e.min+n:void 0,max:s!==void 0?e.max+s-(e.max-e.min):void 0}}function gV(e,{top:n,left:s,bottom:i,right:r}){return{x:CS(e.x,s,r),y:CS(e.y,n,i)}}function TS(e,n){let s=n.min-e.min,i=n.max-e.max;return n.max-n.min<e.max-e.min&&([s,i]=[i,s]),{min:s,max:i}}function vV(e,n){return{x:TS(e.x,n.x),y:TS(e.y,n.y)}}function yV(e,n){let s=.5;const i=cn(e),r=cn(n);return r>i?s=gl(n.min,n.max-i,e.min):i>r&&(s=gl(e.min,e.max-r,n.min)),vs(0,1,s)}function xV(e,n){const s={};return n.min!==void 0&&(s.min=n.min-e.min),n.max!==void 0&&(s.max=n.max-e.min),s}const sp=.35;function bV(e=sp){return e===!1?e=0:e===!0&&(e=sp),{x:AS(e,"left","right"),y:AS(e,"top","bottom")}}function AS(e,n,s){return{min:jS(e,n),max:jS(e,s)}}function jS(e,n){return typeof e=="number"?e:e[n]||0}const SV=new WeakMap;class wV{constructor(n){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Lt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=n}start(n,{snapToCursor:s=!1,distanceThreshold:i}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const c=g=>{const{dragSnapToOrigin:b}=this.getProps();b?this.pauseAnimation():this.stopAnimation(),s&&this.snapToCursor(Ml(g).point)},u=(g,b)=>{const{drag:w,dragPropagation:E,onDragStart:C}=this.getProps();if(w&&!E&&(this.openDragLock&&this.openDragLock(),this.openDragLock=_3(w),!this.openDragLock))return;this.latestPointerEvent=g,this.latestPanInfo=b,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Wn(T=>{let N=this.getAxisMotionValue(T).get()||0;if(La.test(N)){const{projection:R}=this.visualElement;if(R&&R.layout){const _=R.layout.layoutBox[T];_&&(N=cn(_)*(parseFloat(N)/100))}}this.originPoint[T]=N}),C&&We.postRender(()=>C(g,b)),np(this.visualElement,"transform");const{animationState:A}=this.visualElement;A&&A.setActive("whileDrag",!0)},d=(g,b)=>{this.latestPointerEvent=g,this.latestPanInfo=b;const{dragPropagation:w,dragDirectionLock:E,onDirectionLock:C,onDrag:A}=this.getProps();if(!w&&!this.openDragLock)return;const{offset:T}=b;if(E&&this.currentDirection===null){this.currentDirection=EV(T),this.currentDirection!==null&&C&&C(this.currentDirection);return}this.updateAxis("x",b.point,T),this.updateAxis("y",b.point,T),this.visualElement.render(),A&&A(g,b)},f=(g,b)=>{this.latestPointerEvent=g,this.latestPanInfo=b,this.stop(g,b),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>Wn(g=>this.getAnimationState(g)==="paused"&&this.getAxisMotionValue(g).animation?.play()),{dragSnapToOrigin:y}=this.getProps();this.panSession=new CT(n,{onSessionStart:c,onStart:u,onMove:d,onSessionEnd:f,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:y,distanceThreshold:i,contextWindow:ET(this.visualElement)})}stop(n,s){const i=n||this.latestPointerEvent,r=s||this.latestPanInfo,c=this.isDragging;if(this.cancel(),!c||!r||!i)return;const{velocity:u}=r;this.startAnimation(u);const{onDragEnd:d}=this.getProps();d&&We.postRender(()=>d(i,r))}cancel(){this.isDragging=!1;const{projection:n,animationState:s}=this.visualElement;n&&(n.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),s&&s.setActive("whileDrag",!1)}updateAxis(n,s,i){const{drag:r}=this.getProps();if(!i||!ou(n,r,this.currentDirection))return;const c=this.getAxisMotionValue(n);let u=this.originPoint[n]+i[n];this.constraints&&this.constraints[n]&&(u=pV(u,this.constraints[n],this.elastic[n])),c.set(u)}resolveConstraints(){const{dragConstraints:n,dragElastic:s}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;n&&Lo(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=gV(i.layoutBox,n):this.constraints=!1,this.elastic=bV(s),r!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Wn(c=>{this.constraints!==!1&&this.getAxisMotionValue(c)&&(this.constraints[c]=xV(i.layoutBox[c],this.constraints[c]))})}resolveRefConstraints(){const{dragConstraints:n,onMeasureDragConstraints:s}=this.getProps();if(!n||!Lo(n))return!1;const i=n.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const c=Cz(i,r.root,this.visualElement.getTransformPagePoint());let u=vV(r.layout.layoutBox,c);if(s){const d=s(Sz(u));this.hasMutatedConstraints=!!d,d&&(u=lT(d))}return u}startAnimation(n){const{drag:s,dragMomentum:i,dragElastic:r,dragTransition:c,dragSnapToOrigin:u,onDragTransitionEnd:d}=this.getProps(),f=this.constraints||{},h=Wn(y=>{if(!ou(y,s,this.currentDirection))return;let g=f&&f[y]||{};u&&(g={min:0,max:0});const b=r?200:1e6,w=r?40:1e7,E={type:"inertia",velocity:i?n[y]:0,bounceStiffness:b,bounceDamping:w,timeConstant:750,restDelta:1,restSpeed:10,...c,...g};return this.startAxisValueAnimation(y,E)});return Promise.all(h).then(d)}startAxisValueAnimation(n,s){const i=this.getAxisMotionValue(n);return np(this.visualElement,n),i.start(wg(n,i,0,s,this.visualElement,!1))}stopAnimation(){Wn(n=>this.getAxisMotionValue(n).stop())}pauseAnimation(){Wn(n=>this.getAxisMotionValue(n).animation?.pause())}getAnimationState(n){return this.getAxisMotionValue(n).animation?.state}getAxisMotionValue(n){const s=`_drag${n.toUpperCase()}`,i=this.visualElement.getProps(),r=i[s];return r||this.visualElement.getValue(n,(i.initial?i.initial[n]:void 0)||0)}snapToCursor(n){Wn(s=>{const{drag:i}=this.getProps();if(!ou(s,i,this.currentDirection))return;const{projection:r}=this.visualElement,c=this.getAxisMotionValue(s);if(r&&r.layout){const{min:u,max:d}=r.layout.layoutBox[s];c.set(n[s]-rt(u,d,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:n,dragConstraints:s}=this.getProps(),{projection:i}=this.visualElement;if(!Lo(s)||!i||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Wn(u=>{const d=this.getAxisMotionValue(u);if(d&&this.constraints!==!1){const f=d.get();r[u]=yV({min:f,max:f},this.constraints[u])}});const{transformTemplate:c}=this.visualElement.getProps();this.visualElement.current.style.transform=c?c({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),Wn(u=>{if(!ou(u,n,null))return;const d=this.getAxisMotionValue(u),{min:f,max:h}=this.constraints[u];d.set(rt(f,h,r[u]))})}addListeners(){if(!this.visualElement.current)return;SV.set(this.visualElement,this);const n=this.visualElement.current,s=rl(n,"pointerdown",f=>{const{drag:h,dragListener:y=!0}=this.getProps();h&&y&&this.start(f)}),i=()=>{const{dragConstraints:f}=this.getProps();Lo(f)&&f.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,c=r.addEventListener("measure",i);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),We.read(i);const u=bl(window,"resize",()=>this.scalePositionWithinConstraints()),d=r.addEventListener("didUpdate",(({delta:f,hasLayoutChanged:h})=>{this.isDragging&&h&&(Wn(y=>{const g=this.getAxisMotionValue(y);g&&(this.originPoint[y]+=f[y].translate,g.set(g.get()+f[y].translate))}),this.visualElement.render())}));return()=>{u(),s(),c(),d&&d()}}getProps(){const n=this.visualElement.getProps(),{drag:s=!1,dragDirectionLock:i=!1,dragPropagation:r=!1,dragConstraints:c=!1,dragElastic:u=sp,dragMomentum:d=!0}=n;return{...n,drag:s,dragDirectionLock:i,dragPropagation:r,dragConstraints:c,dragElastic:u,dragMomentum:d}}}function ou(e,n,s){return(n===!0||n===e)&&(s===null||s===e)}function EV(e,n=10){let s=null;return Math.abs(e.y)>n?s="y":Math.abs(e.x)>n&&(s="x"),s}class CV extends ii{constructor(n){super(n),this.removeGroupControls=na,this.removeListeners=na,this.controls=new wV(n)}mount(){const{dragControls:n}=this.node.getProps();n&&(this.removeGroupControls=n.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||na}update(){const{dragControls:n}=this.node.getProps(),{dragControls:s}=this.node.prevProps||{};n!==s&&(this.removeGroupControls(),n&&(this.removeGroupControls=n.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners()}}const NS=e=>(n,s)=>{e&&We.postRender(()=>e(n,s))};class TV extends ii{constructor(){super(...arguments),this.removePointerDownListener=na}onPointerDown(n){this.session=new CT(n,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ET(this.node)})}createPanHandlers(){const{onPanSessionStart:n,onPanStart:s,onPan:i,onPanEnd:r}=this.node.getProps();return{onSessionStart:NS(n),onStart:NS(s),onMove:i,onEnd:(c,u)=>{delete this.session,r&&We.postRender(()=>r(c,u))}}}mount(){this.removePointerDownListener=rl(this.node.current,"pointerdown",n=>this.onPointerDown(n))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const bu={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let sm=!1;class AV extends x.Component{componentDidMount(){const{visualElement:n,layoutGroup:s,switchLayoutGroup:i,layoutId:r}=this.props,{projection:c}=n;c&&(s.group&&s.group.add(c),i&&i.register&&r&&i.register(c),sm&&c.root.didUpdate(),c.addEventListener("animationComplete",()=>{this.safeToRemove()}),c.setOptions({...c.options,onExitComplete:()=>this.safeToRemove()})),bu.hasEverUpdated=!0}getSnapshotBeforeUpdate(n){const{layoutDependency:s,visualElement:i,drag:r,isPresent:c}=this.props,{projection:u}=i;return u&&(u.isPresent=c,sm=!0,r||n.layoutDependency!==s||s===void 0||n.isPresent!==c?u.willUpdate():this.safeToRemove(),n.isPresent!==c&&(c?u.promote():u.relegate()||We.postRender(()=>{const d=u.getStack();(!d||!d.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:n}=this.props.visualElement;n&&(n.root.didUpdate(),fg.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:n,layoutGroup:s,switchLayoutGroup:i}=this.props,{projection:r}=n;sm=!0,r&&(r.scheduleCheckAfterUnmount(),s&&s.group&&s.group.remove(r),i&&i.deregister&&i.deregister(r))}safeToRemove(){const{safeToRemove:n}=this.props;n&&n()}render(){return null}}function AT(e){const[n,s]=I3(),i=x.useContext(tC);return m.jsx(AV,{...e,layoutGroup:i,switchLayoutGroup:x.useContext(oT),isPresent:n,safeToRemove:s})}function jV(e,n,s){const i=Nt(e)?e:Ii(e);return i.start(wg("",i,n,s)),i.animation}const NV=(e,n)=>e.depth-n.depth;class RV{constructor(){this.children=[],this.isDirty=!1}add(n){Xp(this.children,n),this.isDirty=!0}remove(n){Zp(this.children,n),this.isDirty=!0}forEach(n){this.isDirty&&this.children.sort(NV),this.isDirty=!1,this.children.forEach(n)}}function MV(e,n){const s=Cn.now(),i=({timestamp:r})=>{const c=r-s;c>=n&&(xs(i),e(c-n))};return We.setup(i,!0),()=>xs(i)}const jT=["TopLeft","TopRight","BottomLeft","BottomRight"],_V=jT.length,RS=e=>typeof e=="string"?parseFloat(e):e,MS=e=>typeof e=="number"||he.test(e);function OV(e,n,s,i,r,c){r?(e.opacity=rt(0,s.opacity??1,DV(i)),e.opacityExit=rt(n.opacity??1,0,PV(i))):c&&(e.opacity=rt(n.opacity??1,s.opacity??1,i));for(let u=0;u<_V;u++){const d=`border${jT[u]}Radius`;let f=_S(n,d),h=_S(s,d);if(f===void 0&&h===void 0)continue;f||(f=0),h||(h=0),f===0||h===0||MS(f)===MS(h)?(e[d]=Math.max(rt(RS(f),RS(h),i),0),(La.test(h)||La.test(f))&&(e[d]+="%")):e[d]=h}(n.rotate||s.rotate)&&(e.rotate=rt(n.rotate||0,s.rotate||0,i))}function _S(e,n){return e[n]!==void 0?e[n]:e.borderRadius}const DV=NT(0,.5,hC),PV=NT(.5,.95,na);function NT(e,n,s){return i=>i<e?0:i>n?1:s(gl(e,n,i))}function OS(e,n){e.min=n.min,e.max=n.max}function ma(e,n){OS(e.x,n.x),OS(e.y,n.y)}function DS(e,n){e.translate=n.translate,e.scale=n.scale,e.originPoint=n.originPoint,e.origin=n.origin}function PS(e,n,s,i,r){return e-=n,e=Bu(e,1/s,i),r!==void 0&&(e=Bu(e,1/r,i)),e}function kV(e,n=0,s=1,i=.5,r,c=e,u=e){if(La.test(n)&&(n=parseFloat(n),n=rt(u.min,u.max,n/100)-u.min),typeof n!="number")return;let d=rt(c.min,c.max,i);e===c&&(d-=n),e.min=PS(e.min,n,s,d,r),e.max=PS(e.max,n,s,d,r)}function kS(e,n,[s,i,r],c,u){kV(e,n[s],n[i],n[r],n.scale,c,u)}const LV=["x","scaleX","originX"],zV=["y","scaleY","originY"];function LS(e,n,s,i){kS(e.x,n,LV,s?s.x:void 0,i?i.x:void 0),kS(e.y,n,zV,s?s.y:void 0,i?i.y:void 0)}function zS(e){return e.translate===0&&e.scale===1}function RT(e){return zS(e.x)&&zS(e.y)}function VS(e,n){return e.min===n.min&&e.max===n.max}function VV(e,n){return VS(e.x,n.x)&&VS(e.y,n.y)}function BS(e,n){return Math.round(e.min)===Math.round(n.min)&&Math.round(e.max)===Math.round(n.max)}function MT(e,n){return BS(e.x,n.x)&&BS(e.y,n.y)}function US(e){return cn(e.x)/cn(e.y)}function HS(e,n){return e.translate===n.translate&&e.scale===n.scale&&e.originPoint===n.originPoint}class BV{constructor(){this.members=[]}add(n){Xp(this.members,n),n.scheduleRender()}remove(n){if(Zp(this.members,n),n===this.prevLead&&(this.prevLead=void 0),n===this.lead){const s=this.members[this.members.length-1];s&&this.promote(s)}}relegate(n){const s=this.members.findIndex(r=>n===r);if(s===0)return!1;let i;for(let r=s;r>=0;r--){const c=this.members[r];if(c.isPresent!==!1){i=c;break}}return i?(this.promote(i),!0):!1}promote(n,s){const i=this.lead;if(n!==i&&(this.prevLead=i,this.lead=n,n.show(),i)){i.instance&&i.scheduleRender(),n.scheduleRender(),n.resumeFrom=i,s&&(n.resumeFrom.preserveOpacity=!0),i.snapshot&&(n.snapshot=i.snapshot,n.snapshot.latestValues=i.animationValues||i.latestValues),n.root&&n.root.isUpdating&&(n.isLayoutDirty=!0);const{crossfade:r}=n.options;r===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(n=>{const{options:s,resumingFrom:i}=n;s.onExitComplete&&s.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(n=>{n.instance&&n.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function UV(e,n,s){let i="";const r=e.x.translate/n.x,c=e.y.translate/n.y,u=s?.z||0;if((r||c||u)&&(i=`translate3d(${r}px, ${c}px, ${u}px) `),(n.x!==1||n.y!==1)&&(i+=`scale(${1/n.x}, ${1/n.y}) `),s){const{transformPerspective:h,rotate:y,rotateX:g,rotateY:b,skewX:w,skewY:E}=s;h&&(i=`perspective(${h}px) ${i}`),y&&(i+=`rotate(${y}deg) `),g&&(i+=`rotateX(${g}deg) `),b&&(i+=`rotateY(${b}deg) `),w&&(i+=`skewX(${w}deg) `),E&&(i+=`skewY(${E}deg) `)}const d=e.x.scale*n.x,f=e.y.scale*n.y;return(d!==1||f!==1)&&(i+=`scale(${d}, ${f})`),i||"none"}const im=["","X","Y","Z"],HV=1e3;let IV=0;function om(e,n,s,i){const{latestValues:r}=n;r[e]&&(s[e]=r[e],n.setStaticValue(e,0),i&&(i[e]=0))}function _T(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:n}=e.options;if(!n)return;const s=gT(n);if(window.MotionHasOptimisedAnimation(s,"transform")){const{layout:r,layoutId:c}=e.options;window.MotionCancelOptimisedAnimation(s,"transform",We,!(r||c))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&_T(i)}function OT({attachResizeListener:e,defaultParent:n,measureScroll:s,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(u={},d=n?.()){this.id=IV++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach($V),this.nodes.forEach(XV),this.nodes.forEach(ZV),this.nodes.forEach(KV)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=u,this.root=d?d.root||d:this,this.path=d?[...d.path,d]:[],this.parent=d,this.depth=d?d.depth+1:0;for(let f=0;f<this.path.length;f++)this.path[f].shouldResetTransform=!0;this.root===this&&(this.nodes=new RV)}addEventListener(u,d){return this.eventHandlers.has(u)||this.eventHandlers.set(u,new Wp),this.eventHandlers.get(u).add(d)}notifyListeners(u,...d){const f=this.eventHandlers.get(u);f&&f.notify(...d)}hasListeners(u){return this.eventHandlers.has(u)}mount(u){if(this.instance)return;this.isSVG=GC(u)&&!z3(u),this.instance=u;const{layoutId:d,layout:f,visualElement:h}=this.options;if(h&&!h.current&&h.mount(u),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(f||d)&&(this.isLayoutDirty=!0),e){let y,g=0;const b=()=>this.root.updateBlockedByResize=!1;We.read(()=>{g=window.innerWidth}),e(u,()=>{const w=window.innerWidth;w!==g&&(g=w,this.root.updateBlockedByResize=!0,y&&y(),y=MV(b,250),bu.hasAnimatedSinceResize&&(bu.hasAnimatedSinceResize=!1,this.nodes.forEach(qS)))})}d&&this.root.registerSharedNode(d,this),this.options.animate!==!1&&h&&(d||f)&&this.addEventListener("didUpdate",({delta:y,hasLayoutChanged:g,hasRelativeLayoutChanged:b,layout:w})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const E=this.options.transition||h.getDefaultTransition()||tB,{onLayoutAnimationStart:C,onLayoutAnimationComplete:A}=h.getProps(),T=!this.targetLayout||!MT(this.targetLayout,w),N=!g&&b;if(this.options.layoutRoot||this.resumeFrom||N||g&&(T||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const R={...ug(E,"layout"),onPlay:C,onComplete:A};(h.shouldReduceMotion||this.options.layoutRoot)&&(R.delay=0,R.type=!1),this.startAnimation(R),this.setAnimationOrigin(y,N)}else g||qS(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=w})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const u=this.getStack();u&&u.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),xs(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(QV),this.animationId++)}getTransformTemplate(){const{visualElement:u}=this.options;return u&&u.getProps().transformTemplate}willUpdate(u=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&_T(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let y=0;y<this.path.length;y++){const g=this.path[y];g.shouldResetTransform=!0,g.updateScroll("snapshot"),g.options.layoutRoot&&g.willUpdate(!1)}const{layoutId:d,layout:f}=this.options;if(d===void 0&&!f)return;const h=this.getTransformTemplate();this.prevTransformTemplateValue=h?h(this.latestValues,""):void 0,this.updateSnapshot(),u&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(IS);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(FS);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(GV),this.nodes.forEach(FV),this.nodes.forEach(qV)):this.nodes.forEach(FS),this.clearAllSnapshots();const d=Cn.now();Yt.delta=vs(0,1e3/60,d-Yt.timestamp),Yt.timestamp=d,Yt.isProcessing=!0,Gh.update.process(Yt),Gh.preRender.process(Yt),Gh.render.process(Yt),Yt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,fg.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(YV),this.sharedNodes.forEach(JV)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,We.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){We.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!cn(this.snapshot.measuredBox.x)&&!cn(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let f=0;f<this.path.length;f++)this.path[f].updateScroll();const u=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Lt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:d}=this.options;d&&d.notify("LayoutMeasure",this.layout.layoutBox,u?u.layoutBox:void 0)}updateScroll(u="measure"){let d=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===u&&(d=!1),d&&this.instance){const f=i(this.instance);this.scroll={animationId:this.root.animationId,phase:u,isRoot:f,offset:s(this.instance),wasRoot:this.scroll?this.scroll.isRoot:f}}}resetTransform(){if(!r)return;const u=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,d=this.projectionDelta&&!RT(this.projectionDelta),f=this.getTransformTemplate(),h=f?f(this.latestValues,""):void 0,y=h!==this.prevTransformTemplateValue;u&&this.instance&&(d||ji(this.latestValues)||y)&&(r(this.instance,h),this.shouldResetTransform=!1,this.scheduleRender())}measure(u=!0){const d=this.measurePageBox();let f=this.removeElementScroll(d);return u&&(f=this.removeTransform(f)),nB(f),{animationId:this.root.animationId,measuredBox:d,layoutBox:f,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:u}=this.options;if(!u)return Lt();const d=u.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(aB))){const{scroll:h}=this.root;h&&(zo(d.x,h.offset.x),zo(d.y,h.offset.y))}return d}removeElementScroll(u){const d=Lt();if(ma(d,u),this.scroll?.wasRoot)return d;for(let f=0;f<this.path.length;f++){const h=this.path[f],{scroll:y,options:g}=h;h!==this.root&&y&&g.layoutScroll&&(y.wasRoot&&ma(d,u),zo(d.x,y.offset.x),zo(d.y,y.offset.y))}return d}applyTransform(u,d=!1){const f=Lt();ma(f,u);for(let h=0;h<this.path.length;h++){const y=this.path[h];!d&&y.options.layoutScroll&&y.scroll&&y!==y.root&&Vo(f,{x:-y.scroll.offset.x,y:-y.scroll.offset.y}),ji(y.latestValues)&&Vo(f,y.latestValues)}return ji(this.latestValues)&&Vo(f,this.latestValues),f}removeTransform(u){const d=Lt();ma(d,u);for(let f=0;f<this.path.length;f++){const h=this.path[f];if(!h.instance||!ji(h.latestValues))continue;Jm(h.latestValues)&&h.updateSnapshot();const y=Lt(),g=h.measurePageBox();ma(y,g),LS(d,h.latestValues,h.snapshot?h.snapshot.layoutBox:void 0,y)}return ji(this.latestValues)&&LS(d,this.latestValues),d}setTargetDelta(u){this.targetDelta=u,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(u){this.options={...this.options,...u,crossfade:u.crossfade!==void 0?u.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Yt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(u=!1){const d=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=d.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=d.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=d.isSharedProjectionDirty);const f=!!this.resumingFrom||this!==d;if(!(u||f&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:y,layoutId:g}=this.options;if(!this.layout||!(y||g))return;this.resolvedRelativeTargetAt=Yt.timestamp;const b=this.getClosestProjectingParent();b&&this.linkedParentVersion!==b.layoutVersion&&!b.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(b&&b.layout?this.createRelativeTarget(b,this.layout.layoutBox,b.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Lt(),this.targetWithTransforms=Lt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),dV(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ma(this.target,this.layout.layoutBox),uT(this.target,this.targetDelta)):ma(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,b&&!!b.resumingFrom==!!this.resumingFrom&&!b.options.layoutScroll&&b.target&&this.animationProgress!==1?this.createRelativeTarget(b,this.target,b.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Jm(this.parent.latestValues)||cT(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(u,d,f){this.relativeParent=u,this.linkedParentVersion=u.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Lt(),this.relativeTargetOrigin=Lt(),Uu(this.relativeTargetOrigin,d,f),ma(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const u=this.getLead(),d=!!this.resumingFrom||this!==u;let f=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(f=!1),d&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(f=!1),this.resolvedRelativeTargetAt===Yt.timestamp&&(f=!1),f)return;const{layout:h,layoutId:y}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(h||y))return;ma(this.layoutCorrected,this.layout.layoutBox);const g=this.treeScale.x,b=this.treeScale.y;Ez(this.layoutCorrected,this.treeScale,this.path,d),u.layout&&!u.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(u.target=u.layout.layoutBox,u.targetWithTransforms=Lt());const{target:w}=u;if(!w){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(DS(this.prevProjectionDelta.x,this.projectionDelta.x),DS(this.prevProjectionDelta.y,this.projectionDelta.y)),ll(this.projectionDelta,this.layoutCorrected,w,this.latestValues),(this.treeScale.x!==g||this.treeScale.y!==b||!HS(this.projectionDelta.x,this.prevProjectionDelta.x)||!HS(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",w))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(u=!0){if(this.options.visualElement?.scheduleRender(),u){const d=this.getStack();d&&d.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Bo(),this.projectionDelta=Bo(),this.projectionDeltaWithTransform=Bo()}setAnimationOrigin(u,d=!1){const f=this.snapshot,h=f?f.latestValues:{},y={...this.latestValues},g=Bo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!d;const b=Lt(),w=f?f.source:void 0,E=this.layout?this.layout.source:void 0,C=w!==E,A=this.getStack(),T=!A||A.members.length<=1,N=!!(C&&!T&&this.options.crossfade===!0&&!this.path.some(eB));this.animationProgress=0;let R;this.mixTargetDelta=_=>{const M=_/1e3;$S(g.x,u.x,M),$S(g.y,u.y,M),this.setTargetDelta(g),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Uu(b,this.layout.layoutBox,this.relativeParent.layout.layoutBox),WV(this.relativeTarget,this.relativeTargetOrigin,b,M),R&&VV(this.relativeTarget,R)&&(this.isProjectionDirty=!1),R||(R=Lt()),ma(R,this.relativeTarget)),C&&(this.animationValues=y,OV(y,h,this.latestValues,M,N,T)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=M},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(u){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(xs(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=We.update(()=>{bu.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ii(0)),this.currentAnimation=jV(this.motionValue,[0,1e3],{...u,velocity:0,isSync:!0,onUpdate:d=>{this.mixTargetDelta(d),u.onUpdate&&u.onUpdate(d)},onStop:()=>{},onComplete:()=>{u.onComplete&&u.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const u=this.getStack();u&&u.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(HV),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const u=this.getLead();let{targetWithTransforms:d,target:f,layout:h,latestValues:y}=u;if(!(!d||!f||!h)){if(this!==u&&this.layout&&h&&DT(this.options.animationType,this.layout.layoutBox,h.layoutBox)){f=this.target||Lt();const g=cn(this.layout.layoutBox.x);f.x.min=u.target.x.min,f.x.max=f.x.min+g;const b=cn(this.layout.layoutBox.y);f.y.min=u.target.y.min,f.y.max=f.y.min+b}ma(d,f),Vo(d,y),ll(this.projectionDeltaWithTransform,this.layoutCorrected,d,y)}}registerSharedNode(u,d){this.sharedNodes.has(u)||this.sharedNodes.set(u,new BV),this.sharedNodes.get(u).add(d);const h=d.options.initialPromotionConfig;d.promote({transition:h?h.transition:void 0,preserveFollowOpacity:h&&h.shouldPreserveFollowOpacity?h.shouldPreserveFollowOpacity(d):void 0})}isLead(){const u=this.getStack();return u?u.lead===this:!0}getLead(){const{layoutId:u}=this.options;return u?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:u}=this.options;return u?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:u}=this.options;if(u)return this.root.sharedNodes.get(u)}promote({needsReset:u,transition:d,preserveFollowOpacity:f}={}){const h=this.getStack();h&&h.promote(this,f),u&&(this.projectionDelta=void 0,this.needsReset=!0),d&&this.setOptions({transition:d})}relegate(){const u=this.getStack();return u?u.relegate(this):!1}resetSkewAndRotation(){const{visualElement:u}=this.options;if(!u)return;let d=!1;const{latestValues:f}=u;if((f.z||f.rotate||f.rotateX||f.rotateY||f.rotateZ||f.skewX||f.skewY)&&(d=!0),!d)return;const h={};f.z&&om("z",u,h,this.animationValues);for(let y=0;y<im.length;y++)om(`rotate${im[y]}`,u,h,this.animationValues),om(`skew${im[y]}`,u,h,this.animationValues);u.render();for(const y in h)u.setStaticValue(y,h[y]),this.animationValues&&(this.animationValues[y]=h[y]);u.scheduleRender()}applyProjectionStyles(u,d){if(!this.instance||this.isSVG)return;if(!this.isVisible){u.visibility="hidden";return}const f=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,u.visibility="",u.opacity="",u.pointerEvents=xu(d?.pointerEvents)||"",u.transform=f?f(this.latestValues,""):"none";return}const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){this.options.layoutId&&(u.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,u.pointerEvents=xu(d?.pointerEvents)||""),this.hasProjected&&!ji(this.latestValues)&&(u.transform=f?f({},""):"none",this.hasProjected=!1);return}u.visibility="";const y=h.animationValues||h.latestValues;this.applyTransformsToTarget();let g=UV(this.projectionDeltaWithTransform,this.treeScale,y);f&&(g=f(y,g)),u.transform=g;const{x:b,y:w}=this.projectionDelta;u.transformOrigin=`${b.origin*100}% ${w.origin*100}% 0`,h.animationValues?u.opacity=h===this?y.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:y.opacityExit:u.opacity=h===this?y.opacity!==void 0?y.opacity:"":y.opacityExit!==void 0?y.opacityExit:0;for(const E in Qm){if(y[E]===void 0)continue;const{correct:C,applyTo:A,isCSSVariable:T}=Qm[E],N=g==="none"?y[E]:C(y[E],h);if(A){const R=A.length;for(let _=0;_<R;_++)u[A[_]]=N}else T?this.options.visualElement.renderState.vars[E]=N:u[E]=N}this.options.layoutId&&(u.pointerEvents=h===this?xu(d?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(u=>u.currentAnimation?.stop()),this.root.nodes.forEach(IS),this.root.sharedNodes.clear()}}}function FV(e){e.updateLayout()}function qV(e){const n=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=e.layout,{animationType:r}=e.options,c=n.source!==e.layout.source;r==="size"?Wn(y=>{const g=c?n.measuredBox[y]:n.layoutBox[y],b=cn(g);g.min=s[y].min,g.max=g.min+b}):DT(r,n.layoutBox,s)&&Wn(y=>{const g=c?n.measuredBox[y]:n.layoutBox[y],b=cn(s[y]);g.max=g.min+b,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[y].max=e.relativeTarget[y].min+b)});const u=Bo();ll(u,s,n.layoutBox);const d=Bo();c?ll(d,e.applyTransform(i,!0),n.measuredBox):ll(d,s,n.layoutBox);const f=!RT(u);let h=!1;if(!e.resumeFrom){const y=e.getClosestProjectingParent();if(y&&!y.resumeFrom){const{snapshot:g,layout:b}=y;if(g&&b){const w=Lt();Uu(w,n.layoutBox,g.layoutBox);const E=Lt();Uu(E,s,b.layoutBox),MT(w,E)||(h=!0),y.options.layoutRoot&&(e.relativeTarget=E,e.relativeTargetOrigin=w,e.relativeParent=y)}}}e.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:d,layoutDelta:u,hasLayoutChanged:f,hasRelativeLayoutChanged:h})}else if(e.isLead()){const{onExitComplete:s}=e.options;s&&s()}e.options.transition=void 0}function $V(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function KV(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function YV(e){e.clearSnapshot()}function IS(e){e.clearMeasurements()}function FS(e){e.isLayoutDirty=!1}function GV(e){const{visualElement:n}=e.options;n&&n.getProps().onBeforeLayoutMeasure&&n.notify("BeforeLayoutMeasure"),e.resetTransform()}function qS(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function XV(e){e.resolveTargetDelta()}function ZV(e){e.calcProjection()}function QV(e){e.resetSkewAndRotation()}function JV(e){e.removeLeadSnapshot()}function $S(e,n,s){e.translate=rt(n.translate,0,s),e.scale=rt(n.scale,1,s),e.origin=n.origin,e.originPoint=n.originPoint}function KS(e,n,s,i){e.min=rt(n.min,s.min,i),e.max=rt(n.max,s.max,i)}function WV(e,n,s,i){KS(e.x,n.x,s.x,i),KS(e.y,n.y,s.y,i)}function eB(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const tB={duration:.45,ease:[.4,0,.1,1]},YS=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),GS=YS("applewebkit/")&&!YS("chrome/")?Math.round:na;function XS(e){e.min=GS(e.min),e.max=GS(e.max)}function nB(e){XS(e.x),XS(e.y)}function DT(e,n,s){return e==="position"||e==="preserve-aspect"&&!uV(US(n),US(s),.2)}function aB(e){return e!==e.root&&e.scroll?.wasRoot}const sB=OT({attachResizeListener:(e,n)=>bl(e,"resize",n),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),rm={current:void 0},PT=OT({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!rm.current){const e=new sB({});e.mount(window),e.setOptions({layoutScroll:!0}),rm.current=e}return rm.current},resetTransform:(e,n)=>{e.style.transform=n!==void 0?n:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),iB={pan:{Feature:TV},drag:{Feature:CV,ProjectionNode:PT,MeasureLayout:AT}};function ZS(e,n,s){const{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",s==="Start");const r="onHover"+s,c=i[r];c&&We.postRender(()=>c(n,Ml(n)))}class oB extends ii{mount(){const{current:n}=this.node;n&&(this.unmount=O3(n,(s,i)=>(ZS(this.node,i,"Start"),r=>ZS(this.node,r,"End"))))}unmount(){}}class rB extends ii{constructor(){super(...arguments),this.isActive=!1}onFocus(){let n=!1;try{n=this.node.current.matches(":focus-visible")}catch{n=!0}!n||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=jl(bl(this.node.current,"focus",()=>this.onFocus()),bl(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function QS(e,n,s){const{props:i}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap",s==="Start");const r="onTap"+(s==="End"?"":s),c=i[r];c&&We.postRender(()=>c(n,Ml(n)))}class lB extends ii{mount(){const{current:n}=this.node;n&&(this.unmount=L3(n,(s,i)=>(QS(this.node,i,"Start"),(r,{success:c})=>QS(this.node,r,c?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const ip=new WeakMap,lm=new WeakMap,cB=e=>{const n=ip.get(e.target);n&&n(e)},uB=e=>{e.forEach(cB)};function dB({root:e,...n}){const s=e||document;lm.has(s)||lm.set(s,{});const i=lm.get(s),r=JSON.stringify(n);return i[r]||(i[r]=new IntersectionObserver(uB,{root:e,...n})),i[r]}function fB(e,n,s){const i=dB(n);return ip.set(e,s),i.observe(e),()=>{ip.delete(e),i.unobserve(e)}}const hB={some:0,all:1};class mB extends ii{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:n={}}=this.node.getProps(),{root:s,margin:i,amount:r="some",once:c}=n,u={root:s?s.current:void 0,rootMargin:i,threshold:typeof r=="number"?r:hB[r]},d=f=>{const{isIntersecting:h}=f;if(this.isInView===h||(this.isInView=h,c&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:y,onViewportLeave:g}=this.node.getProps(),b=h?y:g;b&&b(f)};return fB(this.node.current,u,d)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:n,prevProps:s}=this.node;["amount","margin","root"].some(pB(n,s))&&this.startObserver()}unmount(){}}function pB({viewport:e={}},{viewport:n={}}={}){return s=>e[s]!==n[s]}const gB={inView:{Feature:mB},tap:{Feature:lB},focus:{Feature:rB},hover:{Feature:oB}},vB={layout:{ProjectionNode:PT,MeasureLayout:AT}},yB={...sV,...gB,...iB,...vB},op=bz(yB,Dz);function Sl(e){const n=Kp(()=>Ii(e)),{isStatic:s}=x.useContext(rd);if(s){const[,i]=x.useState(e);x.useEffect(()=>n.on("change",i),[])}return n}function Eg(e,n){const s=Sl(n()),i=()=>s.set(n());return i(),nC(()=>{const r=()=>We.preRender(i,!1,!0),c=e.map(u=>u.on("change",r));return()=>{c.forEach(u=>u()),xs(i)}}),s}function JS(e,...n){const s=e.length;function i(){let r="";for(let c=0;c<s;c++){r+=e[c];const u=n[c];u&&(r+=Nt(u)?u.get():u)}return r}return Eg(n.filter(Nt),i)}function xB(e){ol.current=[],e();const n=Eg(ol.current,e);return ol.current=void 0,n}function bB(e,n,s,i){if(typeof e=="function")return xB(e);const r=V3(n,s,i);return Array.isArray(e)?WS(e,r):WS([e],([c])=>r(c))}function WS(e,n){const s=Kp(()=>[]);return Eg(e,()=>{s.length=0;const i=e.length;for(let r=0;r<i;r++)s[r]=e[r].get();return n(s)})}function SB(e,n={}){const{isStatic:s}=x.useContext(rd),i=()=>Nt(e)?e.get():e;if(s)return bB(i);const r=Sl(i());return x.useInsertionEffect(()=>B3(r,e,n),[r,JSON.stringify(n)]),r}const wB={some:0,all:1};function EB(e,n,{root:s,margin:i,amount:r="some"}={}){const c=FC(e),u=new WeakMap,d=h=>{h.forEach(y=>{const g=u.get(y.target);if(y.isIntersecting!==!!g)if(y.isIntersecting){const b=n(y.target,y);typeof b=="function"?u.set(y.target,b):f.unobserve(y.target)}else typeof g=="function"&&(g(y),u.delete(y.target))})},f=new IntersectionObserver(d,{root:s,rootMargin:i,threshold:typeof r=="number"?r:wB[r]});return c.forEach(h=>f.observe(h)),()=>f.disconnect()}function CB(e,{root:n,margin:s,amount:i,once:r=!1,initial:c=!1}={}){const[u,d]=x.useState(c);return x.useEffect(()=>{if(!e.current||r&&u)return;const f=()=>(d(!0),r?void 0:()=>d(!1)),h={root:n&&n.current||void 0,margin:s,amount:i};return EB(e.current,f,h)},[n,e,s,r,i]),u}function us({children:e,className:n,gradientSize:s=200,gradientColor:i="#262626",gradientOpacity:r=.8,gradientFrom:c="#9E7AFF",gradientTo:u="#FE8BBB"}){const d=Sl(-s),f=Sl(-s),h=JS`radial-gradient(${s}px circle at ${d}px ${f}px, ${c}, ${u}, var(--border) 100%)`,y=JS`radial-gradient(${s}px circle at ${d}px ${f}px, ${i}, transparent 100%)`,g=x.useCallback(()=>{d.set(-s),f.set(-s)},[s,d,f]),b=x.useCallback(w=>{const E=w.currentTarget.getBoundingClientRect();d.set(w.clientX-E.left),f.set(w.clientY-E.top)},[d,f]);return x.useEffect(()=>{g()},[g]),x.useEffect(()=>{const w=C=>{C.relatedTarget||g()},E=()=>{document.visibilityState!=="visible"&&g()};return window.addEventListener("pointerout",w),window.addEventListener("blur",g),document.addEventListener("visibilitychange",E),()=>{window.removeEventListener("pointerout",w),window.removeEventListener("blur",g),document.removeEventListener("visibilitychange",E)}},[g]),m.jsxs("div",{className:re("group relative rounded-[inherit]",n),onPointerMove:b,onPointerLeave:g,onPointerEnter:g,children:[m.jsx(op.div,{className:"bg-border pointer-events-none absolute inset-0 rounded-[inherit] duration-300 group-hover:opacity-100",style:{background:h}}),m.jsx("div",{className:"bg-background absolute inset-px rounded-[inherit]"}),m.jsx(op.div,{className:"pointer-events-none absolute inset-px rounded-[inherit] opacity-0 transition-opacity duration-300 group-hover:opacity-100",style:{background:y,opacity:r}}),m.jsx("div",{className:"relative",children:e})]})}function TB({value:e,startValue:n=0,direction:s="up",delay:i=0,className:r,decimalPlaces:c=0,...u}){const d=x.useRef(null),f=Sl(s==="down"?e:n),h=SB(f,{damping:60,stiffness:100}),y=CB(d,{once:!0,margin:"0px"});return x.useEffect(()=>{if(y){const g=setTimeout(()=>{f.set(s==="down"?n:e)},i*1e3);return()=>clearTimeout(g)}},[f,y,i,e,s,n]),x.useEffect(()=>h.on("change",g=>{d.current&&(d.current.textContent=Intl.NumberFormat("en-US",{minimumFractionDigits:c,maximumFractionDigits:c}).format(Number(g.toFixed(c))))}),[h,c]),m.jsx("span",{ref:d,className:re("inline-block tracking-wider text-black tabular-nums dark:text-white",r),...u,children:n})}function cm(e){return e.reduce((n,s)=>n+(s??0),0)}function e1(e,n){if(e==="this_month"){const r=new Date(n),c=new Date(r.getFullYear(),r.getMonth(),1).getTime();return{sinceMs:c,fromMs:String(c),toMs:String(n)}}const s=Number(e),i=n-s;return{sinceMs:i,fromMs:String(i),toMs:String(n)}}function AB(e){return Math.min(100,Math.max(0,e))}function t1(e){return ya(e)||"—"}function jB(e){let n=0,s=0;for(const i of e){const r=i.stats?.request_count??0,c=i.stats?.avg_duration_ms??0;r>0&&c>0&&(n+=r,s+=r*c)}return n>0?Math.round(s/n):0}function Gs({value:e,decimalPlaces:n=0}){return m.jsx(TB,{value:e,decimalPlaces:n})}const va=[null,null,"hidden lg:table-cell",null,null,"hidden xl:table-cell","hidden xl:table-cell","hidden lg:table-cell"];function NB({rows:e}){const n=va.length;return m.jsx(m.Fragment,{children:Array.from({length:e}).map((s,i)=>m.jsx(Je,{children:Array.from({length:n}).map((r,c)=>m.jsx(xe,{className:re("py-3",va[c]),children:m.jsx(_i,{className:c===0?"h-4 w-56":"h-4 w-24"})},c))},i))})}function RB(){const{t:e}=qe(),[n,s]=x.useState("this_month"),[i,r]=x.useState(!1),[c,u]=x.useState(null),[d,f]=x.useState(""),[h,y]=x.useState("requests"),[g,b]=x.useState([]),[w,E]=x.useState(null),C=x.useCallback(async()=>{r(!0),u(null);try{const M=Date.now(),{sinceMs:U}=e1(n,M),[L,O]=await Promise.all([h4({sinceMs:U,includeStats:!0}),zm()]);b(L.items),E(O)}catch(M){const U=M instanceof gs?M.message:String(M);u(U),Wt.error(st.t("accountsPage.loadFailedTitle"),{description:U})}finally{r(!1)}},[n]);x.useEffect(()=>{C()},[C]);const A=x.useMemo(()=>{const M=g.length,U=g.filter(I=>I.runtime?.failed).length,L=cm(g.map(I=>I.stats?.request_count)),O=cm(g.map(I=>I.stats?.error_count)),K=cm(g.map(I=>I.stats?.tokens_total)),Z=jB(g),J=L>0?O/L*100:0,se=L>0?K/L:0;return{totalAccounts:M,failedAccounts:U,totalRequests:L,totalErrors:O,totalTokens:K,avgDurationMs:Z,errorRatePct:J,tokensPerRequest:se}},[g]),T=x.useMemo(()=>{const M=d.trim().toLowerCase(),L=[...M?g.filter(O=>O.account_id.toLowerCase().includes(M)):g];return L.sort((O,K)=>h==="account"?O.account_id.localeCompare(K.account_id):h==="last_req"?(K.stats?.last_request_at_ms??0)-(O.stats?.last_request_at_ms??0):h==="errors"?(K.stats?.error_count??0)-(O.stats?.error_count??0):h==="tokens"?(K.stats?.tokens_total??0)-(O.stats?.tokens_total??0):(K.stats?.request_count??0)-(O.stats?.request_count??0)),L},[g,d,h]),N=Date.now(),{fromMs:R,toMs:_}=e1(n,N);return m.jsxs("div",{className:"space-y-4",children:[m.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("span",{className:"text-muted-foreground text-sm",children:e("accountsPage.statsWindowLabel")}),m.jsxs(aa,{value:n,onValueChange:M=>s(M),children:[m.jsx(ia,{size:"sm",className:"w-40",children:m.jsx(sa,{})}),m.jsxs(oa,{children:[m.jsx(De,{value:"86400000",children:e("accountsPage.window.last24h")}),m.jsx(De,{value:"604800000",children:e("accountsPage.window.last7d")}),m.jsx(De,{value:"this_month",children:e("accountsPage.window.thisMonth")})]})]})]}),m.jsx(Hi,{onClick:C,disabled:i,size:"sm",children:e(i?"common.refreshing":"common.refresh")}),m.jsx("div",{className:"text-muted-foreground ml-auto text-sm",children:w?.dbPath?e("accountsPage.dbInfo",{version:w.userVersion??"?",path:w.dbPath}):null})]}),c?m.jsx(Sn,{variant:"error",title:e("accountsPage.loadFailedTitle"),description:c,actionLabel:e("common.retry"),onAction:()=>{C()}}):null,m.jsxs(q4,{className:"auto-rows-min grid-cols-1 gap-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-6 2xl:grid-cols-8",children:[m.jsx(us,{className:"rounded-xl",children:m.jsxs("div",{className:"p-4",children:[m.jsx("div",{className:"text-muted-foreground text-xs",children:e("nav.accounts")}),m.jsx("div",{className:"mt-1 text-2xl font-semibold",children:m.jsx(Gs,{value:A.totalAccounts})})]})}),m.jsx(us,{className:"rounded-xl",children:m.jsxs("div",{className:"p-4",children:[m.jsx("div",{className:"text-muted-foreground text-xs",children:e("common.failed")}),m.jsx("div",{className:"mt-1 text-2xl font-semibold",children:m.jsx(Gs,{value:A.failedAccounts})})]})}),m.jsx(us,{className:"rounded-xl",children:m.jsxs("div",{className:"p-4",children:[m.jsx("div",{className:"text-muted-foreground text-xs",children:e("nav.requests")}),m.jsx("div",{className:"mt-1 text-2xl font-semibold",children:m.jsx(Gs,{value:A.totalRequests})})]})}),m.jsx(us,{className:"rounded-xl",children:m.jsxs("div",{className:"p-4",children:[m.jsx("div",{className:"text-muted-foreground text-xs",children:e("common.errors")}),m.jsx("div",{className:"mt-1 text-2xl font-semibold",children:m.jsx(Gs,{value:A.totalErrors})})]})}),m.jsx(us,{className:"rounded-xl",children:m.jsxs("div",{className:"p-4",children:[m.jsx("div",{className:"text-muted-foreground text-xs",children:e("common.errorRate")}),m.jsxs("div",{className:"mt-1 flex items-baseline gap-1 text-2xl font-semibold",children:[m.jsx(Gs,{value:A.errorRatePct,decimalPlaces:1}),m.jsx("span",{className:"text-muted-foreground text-sm",children:"%"})]})]})}),m.jsx(us,{className:"rounded-xl",children:m.jsxs("div",{className:"p-4",children:[m.jsx("div",{className:"text-muted-foreground text-xs",children:e("common.tokensPerRequest")}),m.jsx("div",{className:"mt-1 text-2xl font-semibold",children:m.jsx(Gs,{value:A.tokensPerRequest,decimalPlaces:1})})]})}),m.jsx(us,{className:"rounded-xl",children:m.jsxs("div",{className:"p-4",children:[m.jsx("div",{className:"text-muted-foreground text-xs",children:e("common.tokens")}),m.jsx("div",{className:"mt-1 text-2xl font-semibold",children:m.jsx(Gs,{value:A.totalTokens})})]})}),m.jsx(us,{className:"rounded-xl",children:m.jsxs("div",{className:"p-4",children:[m.jsx("div",{className:"text-muted-foreground text-xs",children:e("common.avgDurationMs")}),m.jsx("div",{className:"mt-1 text-2xl font-semibold",children:m.jsx(Gs,{value:A.avgDurationMs})})]})})]}),m.jsxs(en,{className:"gap-4 py-4",children:[m.jsxs(rn,{className:"px-4",children:[m.jsx(ln,{children:e("nav.accounts")}),m.jsx(wn,{className:"hidden sm:block",children:e("accountsPage.tableDescription")})]}),m.jsxs(En,{className:"space-y-3 px-4",children:[m.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[m.jsx(mt,{placeholder:e("accountsPage.filterAccountPlaceholder"),value:d,onChange:M=>f(M.target.value),className:"h-8 sm:max-w-xs"}),m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsxs(aa,{value:h,onValueChange:M=>y(M),children:[m.jsx(ia,{size:"sm",className:"w-40",children:m.jsx(sa,{})}),m.jsxs(oa,{align:"end",children:[m.jsx(De,{value:"requests",children:e("nav.requests")}),m.jsx(De,{value:"errors",children:e("common.errors")}),m.jsx(De,{value:"tokens",children:e("common.tokens")}),m.jsx(De,{value:"last_req",children:e("common.lastRequest")}),m.jsx(De,{value:"account",children:e("common.account")})]})]}),m.jsxs("div",{className:"text-muted-foreground text-sm tabular-nums",children:[T.length,"/",g.length]})]})]}),m.jsxs(sd,{className:"[&_th]:h-9 [&_td]:py-1.5",children:[m.jsx($p,{children:m.jsxs(Je,{children:[m.jsx(zt,{children:e("common.account")}),m.jsx(zt,{children:e("common.status")}),m.jsx(zt,{className:re(va[2]),children:e("accountsPage.premiumReq")}),m.jsx(zt,{children:e("nav.requests")}),m.jsx(zt,{children:e("common.errors")}),m.jsx(zt,{className:re(va[5]),children:e("common.tokens")}),m.jsx(zt,{className:re(va[6]),children:e("common.avgMs")}),m.jsx(zt,{className:re(va[7]),children:e("common.lastRequest")})]})}),m.jsx(id,{children:i&&g.length===0?m.jsx(NB,{rows:6}):T.length===0?m.jsx(Je,{children:m.jsx(xe,{colSpan:va.length,children:m.jsx(Sn,{variant:"info",title:g.length===0?e("accountsPage.empty.noAccountsTitle"):e("accountsPage.empty.noMatchesTitle"),description:g.length===0?e("accountsPage.empty.noAccountsDescription"):e("accountsPage.empty.noMatchesDescription"),actionLabel:d.trim()?e("common.clearFilter"):void 0,onAction:d.trim()?()=>f(""):void 0})})}):T.map(M=>{const U=M.runtime?.failed,L=U?m.jsx(un,{variant:"destructive",children:e("common.statusFailed")}):m.jsx(un,{variant:"secondary",children:e("common.statusOk")}),O=M.runtime?.entitlement,K=M.runtime?.remaining,Z=O!=null&&K!=null?O-K:void 0,J=O!=null&&O>0&&Z!=null?Z/O*100:void 0,se=J!=null&&Number.isFinite(J)?AB(J):void 0,I=M.runtime?.unlimited?m.jsx(un,{variant:"secondary",children:e("common.unlimited")}):m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsxs("div",{className:"flex items-baseline justify-between gap-2 text-xs whitespace-nowrap",children:[m.jsxs("div",{className:"flex items-baseline gap-1",children:[m.jsx("span",{className:"text-muted-foreground",children:e("common.used")}),m.jsx("span",{className:"tabular-nums font-medium",children:t1(Z)})]}),m.jsxs("div",{className:"flex items-baseline gap-1",children:[m.jsx("span",{className:"text-muted-foreground",children:e("common.remaining")}),m.jsx("span",{className:"tabular-nums font-medium",children:t1(K)})]})]}),se!=null?m.jsx(F4,{value:se,className:"h-1.5","aria-label":e("accountsPage.premiumQuotaUsedAria")}):null]}),ne=M.stats?.last_request_at_ms?pl(M.stats.last_request_at_ms):"";return m.jsxs(Je,{children:[m.jsx(xe,{className:"font-mono",children:m.jsx(Pi,{to:`/requests?account_id=${encodeURIComponent(M.account_id)}&from_ms=${R}&to_ms=${_}`,className:"underline decoration-border hover:decoration-foreground",children:M.account_id})}),m.jsx(xe,{children:m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsx("div",{children:L}),U&&M.runtime?.failureReason?m.jsx("div",{className:"text-muted-foreground text-xs",children:M.runtime.failureReason}):null]})}),m.jsx(xe,{className:re(va[2],"whitespace-normal"),children:I}),m.jsx(xe,{children:ya(M.stats?.request_count)}),m.jsx(xe,{children:ya(M.stats?.error_count)}),m.jsx(xe,{className:re(va[5]),children:ya(M.stats?.tokens_total)}),m.jsx(xe,{className:re(va[6]),children:M.stats?.avg_duration_ms!=null?ya(Math.round(M.stats.avg_duration_ms)):""}),m.jsx(xe,{className:re(va[7],"font-mono text-xs"),children:ne})]},M.account_id)})})]})]})]})]})}const Ni=[null,null,null,null,null,null];function n1(e){return e==null||!Number.isFinite(e)||e<=0?"":e>=1e3?`${Math.floor(e/1e3)}K`:String(Math.floor(e))}function a1(e){return e==null||!Number.isFinite(e)||e<=0?"—":String(Math.floor(e))}function ru(e,n,s){const i=e?.trim(),r=n?.trim();if(!i&&!r)return 0;if(!i)return 1;if(!r)return-1;const c=i.toLowerCase().localeCompare(r.toLowerCase());return s==="asc"?c:-c}function um(e,n,s){const i=typeof e=="number"&&Number.isFinite(e)?e:null,r=typeof n=="number"&&Number.isFinite(n)?n:null;if(i==null&&r==null)return 0;if(i==null)return 1;if(r==null)return-1;const c=i-r;return c===0?0:s==="asc"?c:-c}function s1(e){if(!e||e.length===0)return null;const n=e.map(s=>s.trim().toLowerCase()).filter(s=>s.length>0).sort();return n.length>0?n.join("|"):null}function i1(e){const n=[];return e.tool_calls&&n.push("tool_calls"),e.vision&&n.push("vision"),e.structured_outputs&&n.push("structured_outputs"),e.streaming&&n.push("streaming"),e.parallel_tool_calls&&n.push("parallel_tool_calls"),n.length>0?n.join("|"):null}function Do({columnKey:e,label:n,sortKey:s,sortDir:i,onSort:r,className:c}){const u=s===e;let d="none";return u&&(d=i==="asc"?"ascending":"descending"),m.jsx(zt,{"aria-sort":d,className:c,children:m.jsxs("button",{type:"button",onClick:()=>r(e),className:re("flex w-full cursor-pointer select-none items-center gap-1 text-left","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"),children:[m.jsx("span",{children:n}),u?m.jsx("span",{className:"text-muted-foreground",children:i==="asc"?"↑":"↓"}):null]})})}function MB({rows:e}){const n=Ni.length;return m.jsx(m.Fragment,{children:Array.from({length:e}).map((s,i)=>m.jsx(Je,{children:Array.from({length:n}).map((r,c)=>m.jsx(xe,{className:re("py-3",Ni[c]),children:m.jsx(_i,{className:c===0?"h-4 w-48":"h-4 w-28"})},c))},i))})}function _B({supports:e}){const{t:n}=qe(),s=[];return e.tool_calls&&s.push({key:"tool_calls",label:n("modelsPage.features.tools")}),e.vision&&s.push({key:"vision",label:n("modelsPage.features.vision")}),e.structured_outputs&&s.push({key:"structured_outputs",label:n("modelsPage.features.structuredOutputs")}),e.streaming&&s.push({key:"streaming",label:n("modelsPage.features.streaming")}),e.parallel_tool_calls&&s.push({key:"parallel_tool_calls",label:n("modelsPage.features.parallelTools")}),s.length===0?m.jsx("span",{className:"text-muted-foreground",children:"—"}):m.jsx("div",{className:"flex flex-wrap gap-1 whitespace-normal",children:s.map(i=>m.jsx(un,{variant:"outline",className:"text-xs",children:i.label},i.key))})}function OB({endpoints:e}){return!e||e.length===0?m.jsx("span",{className:"text-muted-foreground",children:"—"}):m.jsx("div",{className:"flex flex-wrap gap-1 whitespace-normal",children:e.map(n=>m.jsx(un,{variant:"secondary",className:"font-mono text-xs",children:n},n))})}function DB({limits:e}){const{t:n}=qe(),s=n1(e.max_prompt_tokens),i=n1(e.max_output_tokens),r=n("modelsPage.contextTooltip",{input:a1(e.max_prompt_tokens),output:a1(e.max_output_tokens)});return m.jsxs("div",{title:r,"aria-label":r,className:"flex items-center gap-3 tabular-nums cursor-help",children:[m.jsx("span",{className:"text-muted-foreground",children:"↓"}),m.jsx("span",{children:s||"—"}),m.jsx("span",{className:"text-muted-foreground",children:"↑"}),m.jsx("span",{children:i||"—"})]})}function PB({billing:e}){const{t:n}=qe(),s=e?.multiplier;return s==null?m.jsx("span",{className:"text-muted-foreground",children:"—"}):m.jsxs("div",{className:"flex items-center gap-2 tabular-nums",children:[m.jsxs("span",{children:[s,"x"]}),e?.is_premium?m.jsx(un,{variant:"default",className:"text-xs",children:n("modelsPage.badges.premium")}):null]})}function kB(){const{t:e}=qe(),[n,s]=x.useState(!0),[i,r]=x.useState(null),[c,u]=x.useState([]),[d,f]=x.useState({key:null,dir:"asc"}),{key:h,dir:y}=d,g=x.useCallback(E=>{f(C=>C.key===E?{key:C.key,dir:C.dir==="asc"?"desc":"asc"}:{key:E,dir:"asc"})},[]),b=x.useMemo(()=>h?[...c].sort((E,C)=>{let A=0;switch(h){case"name":A=ru(E.name,C.name,y);break;case"endpoints":A=ru(s1(E.supported_endpoints),s1(C.supported_endpoints),y);break;case"originalId":A=ru(E.id,C.id,y);break;case"context":A=um(E.capabilities.limits.max_prompt_tokens,C.capabilities.limits.max_prompt_tokens,y),A===0&&(A=um(E.capabilities.limits.max_output_tokens,C.capabilities.limits.max_output_tokens,y));break;case"features":A=ru(i1(E.capabilities.supports),i1(C.capabilities.supports),y);break;case"multiplier":A=um(E.billing?.multiplier,C.billing?.multiplier,y);break;default:A=0}return A!==0?A:E.id.localeCompare(C.id)}):c,[c,y,h]),w=x.useCallback(async()=>{s(!0),r(null);try{const E=await x4();u(E.items)}catch(E){const C=E instanceof gs?E.message:String(E);r(C),Wt.error(st.t("modelsPage.toast.loadFailed"),{description:C})}finally{s(!1)}},[]);return x.useEffect(()=>{w()},[w]),m.jsxs("div",{className:"space-y-4",children:[i?m.jsx(Sn,{variant:"error",title:e("modelsPage.loadFailedTitle"),description:i,actionLabel:e("common.retry"),onAction:()=>{w()}}):null,m.jsxs(en,{children:[m.jsxs(rn,{children:[m.jsx(ln,{children:e("modelsPage.title")}),m.jsx(wn,{children:e("modelsPage.description")})]}),m.jsxs(En,{className:"space-y-3",children:[m.jsx("div",{className:"text-muted-foreground text-sm",children:e("modelsPage.totalCount",{count:c.length})}),m.jsxs(sd,{children:[m.jsx($p,{children:m.jsxs(Je,{children:[m.jsx(Do,{columnKey:"name",label:e("modelsPage.columns.name"),sortKey:h,sortDir:y,onSort:g}),m.jsx(Do,{columnKey:"endpoints",label:e("modelsPage.columns.endpoints"),sortKey:h,sortDir:y,onSort:g,className:re(Ni[1])}),m.jsx(Do,{columnKey:"originalId",label:e("modelsPage.columns.originalId"),sortKey:h,sortDir:y,onSort:g,className:re(Ni[2])}),m.jsx(Do,{columnKey:"context",label:e("modelsPage.columns.context"),sortKey:h,sortDir:y,onSort:g}),m.jsx(Do,{columnKey:"features",label:e("modelsPage.columns.features"),sortKey:h,sortDir:y,onSort:g}),m.jsx(Do,{columnKey:"multiplier",label:e("modelsPage.columns.multiplier"),sortKey:h,sortDir:y,onSort:g})]})}),m.jsxs(id,{children:[n&&c.length===0&&m.jsx(MB,{rows:10}),!n&&c.length===0&&m.jsx(Je,{children:m.jsx(xe,{colSpan:Ni.length,children:m.jsx(Sn,{variant:"info",title:e("modelsPage.empty.title"),description:e("modelsPage.empty.description")})})}),c.length>0&&b.map(E=>m.jsxs(Je,{children:[m.jsx(xe,{children:m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("span",{children:E.name}),E.preview?m.jsx(un,{variant:"outline",className:"text-xs",children:e("modelsPage.badges.preview")}):null]})}),m.jsx(xe,{className:re(Ni[1],"max-w-[26rem]"),children:m.jsx(OB,{endpoints:E.supported_endpoints})}),m.jsx(xe,{className:re(Ni[2],"max-w-[26rem]"),children:m.jsxs("div",{className:"flex flex-wrap items-center gap-1 whitespace-normal",children:[m.jsx("span",{className:"font-mono text-xs",children:E.id}),E.aliases.map(C=>m.jsx(un,{variant:"outline",className:"font-mono text-xs",children:C},C))]})}),m.jsx(xe,{children:m.jsx(DB,{limits:E.capabilities.limits})}),m.jsx(xe,{children:m.jsx(_B,{supports:E.capabilities.supports})}),m.jsx(xe,{children:m.jsx(PB,{billing:E.billing})})]},E.id))]})]})]})]})]})}function LB(){const{t:e}=qe();return m.jsx(en,{children:m.jsxs(rn,{children:[m.jsx(ln,{children:e("notFound.title")}),m.jsx(wn,{children:e("notFound.description")})]})})}const lu=200;function zB(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function Hu(e,n){const s=n?.trim();if(!s)return e;const i=e.toLowerCase(),r=s.toLowerCase(),c=[];let u=0;for(;u<e.length;){const d=i.indexOf(r,u);if(d===-1){c.push(e.slice(u));break}d>u&&c.push(e.slice(u,d)),c.push(m.jsx("mark",{className:"bg-accent/50 text-foreground rounded px-0.5",children:e.slice(d,d+r.length)},`${d}-${r}`)),u=d+r.length}return m.jsx(m.Fragment,{children:c})}function VB(e,n,s){if(e==null)return m.jsx("span",{className:"text-muted-foreground",children:"null"});if(typeof e=="string")return m.jsxs("span",{className:"text-foreground",children:['"',Hu(e,n),'"']});if(typeof e=="number"){const i=String(e);if(!s||!/_at_ms$/.test(s))return m.jsx("span",{className:"text-foreground",children:i});if(e<9466848e5||e>41024448e5)return m.jsx("span",{className:"text-foreground",children:i});const u=pl(e);return u?m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"text-foreground",title:u,children:i}),m.jsxs("span",{className:"text-muted-foreground ml-1",children:["(",Hu(u,n),")"]})]}):m.jsx("span",{className:"text-foreground",children:i})}return typeof e=="boolean"?m.jsx("span",{className:"text-foreground",children:e?"true":"false"}):m.jsx("span",{className:"text-foreground",children:String(e)})}function dm({depth:e,name:n,valuePreview:s,expanded:i,toggle:r,t:c}){return m.jsxs("div",{className:"flex items-start gap-2",style:{paddingLeft:e*12},children:[r?m.jsx("button",{type:"button",onClick:r,className:"text-muted-foreground hover:text-foreground mt-0.5","aria-label":c(i?"jsonViewer.collapse":"jsonViewer.expand"),children:i?m.jsx(Cp,{className:"size-4"}):m.jsx(Q2,{className:"size-4"})}):m.jsx("span",{className:"size-4"}),n?m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"text-muted-foreground",children:n}),m.jsx("span",{className:"text-muted-foreground",children:":"})]}):m.jsx("span",{className:"text-muted-foreground",children:c("jsonViewer.root")}),m.jsx("span",{className:"min-w-0 break-words",children:s})]})}function rp({value:e,name:n,path:s,depth:i,search:r,baseExpandDepth:c,expandedPaths:u,collapsedPaths:d,onToggle:f,t:h}){const y=zB(e),g=Array.isArray(e),b=y||g,w=b&&(d.has(s)?!1:u.has(s)?!0:i<c);if(!b)return m.jsx(dm,{depth:i,name:n?Hu(n,r):void 0,valuePreview:VB(e,r,n),expanded:!1,t:h});const E=g?e.length:Object.keys(e).length,C=g?h("jsonViewer.arrayLabel",{count:E}):h("jsonViewer.objectLabel",{count:E});return m.jsxs("div",{className:"space-y-1",children:[m.jsx(dm,{depth:i,name:n?Hu(n,r):void 0,valuePreview:m.jsx("span",{className:"text-muted-foreground",children:C}),expanded:w,toggle:()=>f(s,!w),t:h}),w?m.jsxs("div",{className:"space-y-1",children:[g?e.slice(0,lu).map((A,T)=>m.jsx(rp,{value:A,name:`[${T}]`,path:`${s}[${T}]`,depth:i+1,search:r,baseExpandDepth:c,expandedPaths:u,collapsedPaths:d,onToggle:f,t:h},`${s}[${T}]`)):Object.entries(e).slice(0,lu).map(([A,T])=>m.jsx(rp,{value:T,name:A,path:`${s}.${A}`,depth:i+1,search:r,baseExpandDepth:c,expandedPaths:u,collapsedPaths:d,onToggle:f,t:h},`${s}.${A}`)),E>lu?m.jsx(dm,{depth:i+1,valuePreview:m.jsx("span",{className:"text-muted-foreground",children:h("jsonViewer.more",{count:E-lu})}),expanded:!1,t:h}):null]}):null]})}function BB({value:e,search:n,defaultExpandedDepth:s=2,className:i}){const[r,c]=x.useState(s),[u,d]=x.useState(()=>new Set),[f,h]=x.useState(()=>new Set),{t:y}=qe();function g(C,A){if(A){h(T=>{const N=new Set(T);return N.delete(C),N}),d(T=>{const N=new Set(T);return N.add(C),N});return}d(T=>{const N=new Set(T);return N.delete(C),N}),h(T=>{const N=new Set(T);return N.add(C),N})}function b(){c(99),h(new Set),d(new Set)}function w(){c(0),d(new Set),h(new Set)}function E(){return r===0?y("jsonViewer.statusCollapsed"):r>=99?y("jsonViewer.statusExpanded"):y("jsonViewer.statusDepth",{depth:r})}return m.jsxs("div",{className:re("space-y-3",i),children:[m.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[m.jsx(pt,{type:"button",variant:"outline",size:"sm",onClick:b,children:y("jsonViewer.expandAll")}),m.jsx(pt,{type:"button",variant:"outline",size:"sm",onClick:w,children:y("jsonViewer.collapseAll")}),m.jsx("span",{className:"text-muted-foreground ml-auto text-xs",children:E()})]}),m.jsx("div",{className:"bg-muted/20 overflow-auto rounded-md border p-3 font-mono text-xs",children:m.jsx(rp,{value:e,path:"$",depth:0,search:n,baseExpandDepth:r,expandedPaths:u,collapsedPaths:f,onToggle:g,t:y})})]})}const Cg=({className:e,size:n=50,delay:s=0,duration:i=6,colorFrom:r="#ffaa40",colorTo:c="#9c40ff",transition:u,style:d,reverse:f=!1,initialOffset:h=0,borderWidth:y=1})=>{const{effective:g}=Gu();if(g==="off")return null;const b=g==="subtle"?i*2:i;return m.jsx("div",{className:"pointer-events-none absolute inset-0 rounded-[inherit] border-(length:--border-beam-width) border-transparent [mask-image:linear-gradient(transparent,transparent),linear-gradient(#000,#000)] [mask-composite:intersect] [mask-clip:padding-box,border-box]",style:{"--border-beam-width":`${y}px`},children:m.jsx(op.div,{className:re("absolute aspect-square","bg-gradient-to-l from-[var(--color-from)] via-[var(--color-to)] to-transparent",e),style:{width:n,offsetPath:`rect(0 auto auto 0 round ${n}px)`,"--color-from":r,"--color-to":c,...d},initial:{offsetDistance:`${h}%`},animate:{offsetDistance:f?[`${100-h}%`,`${-h}%`]:[`${h}%`,`${100+h}%`]},transition:{repeat:1/0,ease:"linear",duration:b,delay:-s,...u}})})};function UB({status:e}){return e>=400?m.jsx(un,{variant:"destructive",children:e}):m.jsx(un,{variant:"secondary",children:e})}function HB(){const{t:e}=qe(),{requestId:n=""}=sR(),i=Va().state?.fromSearch,r=i?`/requests?${i}`:"/requests",[c,u]=x.useState(!0),[d,f]=x.useState(null),[h,y]=x.useState("");x.useEffect(()=>{let E=!1;async function C(){u(!0);try{const A=await p4(n);if(E)return;f(A.item)}catch(A){const T=A instanceof gs?A.message:String(A);if(Wt.error(st.t("requestDetailPage.loadFailedTitle"),{description:T}),E)return;f(null)}finally{E||u(!1)}}return n&&C(),()=>{E=!0}},[n]);async function g(){if(d)try{const E=JSON.stringify(d,null,2);await navigator.clipboard.writeText(E),Wt.success(e("requestDetailPage.toast.copiedJson"))}catch(E){Wt.error(e("requestDetailPage.toast.copyFailed"),{description:String(E)})}}function b(){if(d)try{const E=JSON.stringify(d,null,2),C=new Blob([E],{type:"application/json"}),A=URL.createObjectURL(C),T=document.createElement("a");T.href=A,T.download=`${d.request_id}.json`,T.click(),URL.revokeObjectURL(A),Wt.success(e("requestDetailPage.toast.downloadedJson"))}catch(E){Wt.error(e("requestDetailPage.toast.downloadFailed"),{description:String(E)})}}if(c)return m.jsxs(en,{children:[m.jsxs(rn,{children:[m.jsx(ln,{children:e("requestDetailPage.title")}),m.jsx(wn,{children:m.jsx(_i,{className:"h-4 w-40"})})]}),m.jsx(En,{children:m.jsxs("div",{className:"space-y-2",children:[m.jsx(_i,{className:"h-4 w-64"}),m.jsx(_i,{className:"h-4 w-48"}),m.jsx(_i,{className:"h-24 w-full"})]})})]});if(!d)return m.jsxs(en,{children:[m.jsxs(rn,{children:[m.jsx(ln,{children:e("requestDetailPage.title")}),m.jsx(wn,{children:e("requestDetailPage.notFoundDescription")})]}),m.jsx(En,{children:m.jsx(Sn,{variant:"warning",title:e("requestDetailPage.notFoundTitle"),description:`request_id: ${n}`})})]});const w=d.premium_unlimited_after?"∞":d.premium_remaining_after!=null?ya(d.premium_remaining_after):"";return m.jsxs("div",{className:"space-y-4",children:[m.jsx("div",{className:"flex items-center gap-2",children:m.jsx(pt,{variant:"ghost",size:"sm",asChild:!0,children:m.jsxs(Pi,{to:r,children:[m.jsx(K2,{className:"size-4"}),e("common.back")]})})}),m.jsxs("div",{className:"relative",children:[m.jsx(Cg,{className:"opacity-40",borderWidth:1}),m.jsx(en,{className:"relative",children:m.jsxs(rn,{children:[m.jsxs(ln,{className:"flex flex-wrap items-center gap-2",children:[m.jsx("span",{className:"font-mono text-sm",children:d.request_id}),m.jsx(UB,{status:d.http_status}),typeof d.duration_ms=="number"?m.jsxs(un,{variant:"outline",children:[e("requestDetailPage.badges.durMs"),":"," ",ya(d.duration_ms)]}):null,typeof d.ttfb_ms=="number"?m.jsxs(un,{variant:"outline",children:[e("requestDetailPage.badges.ttfbMs"),":"," ",ya(d.ttfb_ms)]}):null]}),m.jsx(wn,{className:"font-mono text-xs",children:pl(d.started_at_ms)})]})})]}),m.jsxs("div",{className:"grid grid-cols-1 gap-3 lg:grid-cols-2 xl:grid-cols-[1fr_2fr]",children:[m.jsxs(en,{children:[m.jsx(rn,{children:m.jsx(ln,{children:e("requestDetailPage.summaryTitle")})}),m.jsx(En,{children:m.jsx(sd,{children:m.jsxs(id,{children:[m.jsxs(Je,{children:[m.jsx(xe,{className:"w-36 text-muted-foreground",children:e("requestDetailPage.fields.time")}),m.jsx(xe,{className:"font-mono text-xs",children:pl(d.started_at_ms)})]}),m.jsxs(Je,{children:[m.jsx(xe,{className:"text-muted-foreground",children:e("requestDetailPage.fields.path")}),m.jsx(xe,{className:"font-mono text-xs whitespace-normal break-words",children:m.jsx(Pi,{to:`/requests?path=${encodeURIComponent(d.path)}`,className:"underline decoration-border hover:decoration-foreground",children:d.path})})]}),m.jsxs(Je,{children:[m.jsx(xe,{className:"text-muted-foreground",children:e("requestDetailPage.fields.endpoint")}),m.jsx(xe,{className:"font-mono text-xs whitespace-normal break-words",children:d.upstream_endpoint||""})]}),m.jsxs(Je,{children:[m.jsx(xe,{className:"text-muted-foreground",children:e("requestDetailPage.fields.account")}),m.jsx(xe,{className:"font-mono text-xs whitespace-normal break-words",children:d.account_id?m.jsx(Pi,{to:`/requests?account_id=${encodeURIComponent(d.account_id)}`,className:"underline decoration-border hover:decoration-foreground",children:d.account_id}):""})]}),m.jsxs(Je,{children:[m.jsx(xe,{className:"text-muted-foreground",children:e("requestDetailPage.fields.userId")}),m.jsx(xe,{className:"font-mono text-xs whitespace-normal break-words",children:d.user_id||""})]}),m.jsxs(Je,{children:[m.jsx(xe,{className:"text-muted-foreground",children:e("requestDetailPage.fields.safetyIdentifier")}),m.jsx(xe,{className:"font-mono text-xs whitespace-normal break-words",children:d.safety_identifier||""})]}),m.jsxs(Je,{children:[m.jsx(xe,{className:"text-muted-foreground",children:e("requestDetailPage.fields.promptCacheKey")}),m.jsx(xe,{className:"font-mono text-xs whitespace-normal break-words",children:d.prompt_cache_key||""})]}),m.jsxs(Je,{children:[m.jsx(xe,{className:"text-muted-foreground",children:e("requestDetailPage.fields.initiator")}),m.jsx(xe,{className:"font-mono text-xs whitespace-normal break-words",children:d.initiator||""})]}),m.jsxs(Je,{children:[m.jsx(xe,{className:"text-muted-foreground",children:e("requestDetailPage.fields.upstreamRequestId")}),m.jsx(xe,{className:"font-mono text-xs whitespace-normal break-words",children:d.upstream_request_id||""})]}),m.jsxs(Je,{children:[m.jsx(xe,{className:"text-muted-foreground",children:e("requestDetailPage.fields.model")}),m.jsx(xe,{className:"font-mono text-xs",children:d.upstream_model||""})]}),m.jsxs(Je,{children:[m.jsx(xe,{className:"text-muted-foreground",children:e("requestDetailPage.fields.client")}),m.jsxs(xe,{className:"font-mono text-xs whitespace-normal break-words",children:[d.client_ip||"",d.user_agent?` (${d.user_agent})`:""]})]}),m.jsxs(Je,{children:[m.jsx(xe,{className:"text-muted-foreground",children:e("requestDetailPage.fields.tokens")}),m.jsxs(xe,{className:"font-mono text-xs whitespace-normal break-words",children:[m.jsxs("span",{children:[e("requestDetailPage.tokens.in"),"=",d.tokens_input??""]})," ",m.jsxs("span",{children:[e("requestDetailPage.tokens.out"),"=",d.tokens_output??""]})," ",m.jsxs("span",{children:[e("requestDetailPage.tokens.total"),"=",d.tokens_total??""]})," ",m.jsxs("span",{children:[e("requestDetailPage.tokens.cached"),"=",d.tokens_cached_input??""]})]})]}),m.jsxs(Je,{children:[m.jsx(xe,{className:"text-muted-foreground",children:e("requestDetailPage.fields.quota")}),m.jsxs(xe,{className:"font-mono text-xs whitespace-normal break-words",children:[m.jsxs("span",{children:[e("requestDetailPage.quota.before"),"=",d.premium_remaining_before??""]})," ",m.jsxs("span",{children:[e("requestDetailPage.quota.after"),"=",d.premium_remaining_after??""]})," ",m.jsxs("span",{children:[e("requestDetailPage.quota.diff"),"=",d.premium_remaining_diff??""," ","(",w,")"]})]})]})]})})})]}),m.jsxs(en,{children:[m.jsxs(rn,{children:[m.jsx(ln,{children:e("requestDetailPage.rawTitle")}),m.jsx(wn,{children:e("requestDetailPage.rawDescription")})]}),m.jsxs(En,{className:"space-y-3",children:[m.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center",children:[m.jsx(mt,{placeholder:e("requestDetailPage.searchPlaceholder"),value:h,onChange:E=>y(E.target.value),className:"h-8 sm:max-w-xs"}),m.jsxs("div",{className:"flex items-center gap-2 sm:ml-auto",children:[m.jsxs(pt,{type:"button",variant:"outline",size:"sm",onClick:b,children:[m.jsx(n_,{className:"size-4"}),e("common.download")]}),m.jsx(Hi,{onClick:()=>{g()},size:"sm",children:e("common.copyJson")})]})]}),m.jsx(BB,{value:d,search:h})]})]})]})]})}var fm="rovingFocusGroup.onEntryFocus",IB={bubbles:!1,cancelable:!0},_l="RovingFocusGroup",[lp,kT,FB]=aE(_l),[qB,LT]=Qo(_l,[FB]),[$B,KB]=qB(_l),zT=x.forwardRef((e,n)=>m.jsx(lp.Provider,{scope:e.__scopeRovingFocusGroup,children:m.jsx(lp.Slot,{scope:e.__scopeRovingFocusGroup,children:m.jsx(YB,{...e,ref:n})})}));zT.displayName=_l;var YB=x.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:s,orientation:i,loop:r=!1,dir:c,currentTabStopId:u,defaultCurrentTabStopId:d,onCurrentTabStopIdChange:f,onEntryFocus:h,preventScrollOnEntryFocus:y=!1,...g}=e,b=x.useRef(null),w=gt(n,b),E=kp(c),[C,A]=fl({prop:u,defaultProp:d??null,onChange:f,caller:_l}),[T,N]=x.useState(!1),R=Js(h),_=kT(s),M=x.useRef(!1),[U,L]=x.useState(0);return x.useEffect(()=>{const O=b.current;if(O)return O.addEventListener(fm,R),()=>O.removeEventListener(fm,R)},[R]),m.jsx($B,{scope:s,orientation:i,dir:E,loop:r,currentTabStopId:C,onItemFocus:x.useCallback(O=>A(O),[A]),onItemShiftTab:x.useCallback(()=>N(!0),[]),onFocusableItemAdd:x.useCallback(()=>L(O=>O+1),[]),onFocusableItemRemove:x.useCallback(()=>L(O=>O-1),[]),children:m.jsx(Ie.div,{tabIndex:T||U===0?-1:0,"data-orientation":i,...g,ref:w,style:{outline:"none",...e.style},onMouseDown:Be(e.onMouseDown,()=>{M.current=!0}),onFocus:Be(e.onFocus,O=>{const K=!M.current;if(O.target===O.currentTarget&&K&&!T){const Z=new CustomEvent(fm,IB);if(O.currentTarget.dispatchEvent(Z),!Z.defaultPrevented){const J=_().filter(D=>D.focusable),se=J.find(D=>D.active),I=J.find(D=>D.id===C),le=[se,I,...J].filter(Boolean).map(D=>D.ref.current);UT(le,y)}}M.current=!1}),onBlur:Be(e.onBlur,()=>N(!1))})})}),VT="RovingFocusGroupItem",BT=x.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:s,focusable:i=!0,active:r=!1,tabStopId:c,children:u,...d}=e,f=Qs(),h=c||f,y=KB(VT,s),g=y.currentTabStopId===h,b=kT(s),{onFocusableItemAdd:w,onFocusableItemRemove:E,currentTabStopId:C}=y;return x.useEffect(()=>{if(i)return w(),()=>E()},[i,w,E]),m.jsx(lp.ItemSlot,{scope:s,id:h,focusable:i,active:r,children:m.jsx(Ie.span,{tabIndex:g?0:-1,"data-orientation":y.orientation,...d,ref:n,onMouseDown:Be(e.onMouseDown,A=>{i?y.onItemFocus(h):A.preventDefault()}),onFocus:Be(e.onFocus,()=>y.onItemFocus(h)),onKeyDown:Be(e.onKeyDown,A=>{if(A.key==="Tab"&&A.shiftKey){y.onItemShiftTab();return}if(A.target!==A.currentTarget)return;const T=ZB(A,y.orientation,y.dir);if(T!==void 0){if(A.metaKey||A.ctrlKey||A.altKey||A.shiftKey)return;A.preventDefault();let R=b().filter(_=>_.focusable).map(_=>_.ref.current);if(T==="last")R.reverse();else if(T==="prev"||T==="next"){T==="prev"&&R.reverse();const _=R.indexOf(A.currentTarget);R=y.loop?QB(R,_+1):R.slice(_+1)}setTimeout(()=>UT(R))}}),children:typeof u=="function"?u({isCurrentTabStop:g,hasTabStop:C!=null}):u})})});BT.displayName=VT;var GB={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function XB(e,n){return n!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function ZB(e,n,s){const i=XB(e.key,s);if(!(n==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(n==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return GB[i]}function UT(e,n=!1){const s=document.activeElement;for(const i of e)if(i===s||(i.focus({preventScroll:n}),document.activeElement!==s))return}function QB(e,n){return e.map((s,i)=>e[(n+i)%e.length])}var JB=zT,WB=BT,dd="Tabs",[e6]=Qo(dd,[LT]),HT=LT(),[t6,Tg]=e6(dd),IT=x.forwardRef((e,n)=>{const{__scopeTabs:s,value:i,onValueChange:r,defaultValue:c,orientation:u="horizontal",dir:d,activationMode:f="automatic",...h}=e,y=kp(d),[g,b]=fl({prop:i,onChange:r,defaultProp:c??"",caller:dd});return m.jsx(t6,{scope:s,baseId:Qs(),value:g,onValueChange:b,orientation:u,dir:y,activationMode:f,children:m.jsx(Ie.div,{dir:y,"data-orientation":u,...h,ref:n})})});IT.displayName=dd;var FT="TabsList",qT=x.forwardRef((e,n)=>{const{__scopeTabs:s,loop:i=!0,...r}=e,c=Tg(FT,s),u=HT(s);return m.jsx(JB,{asChild:!0,...u,orientation:c.orientation,dir:c.dir,loop:i,children:m.jsx(Ie.div,{role:"tablist","aria-orientation":c.orientation,...r,ref:n})})});qT.displayName=FT;var $T="TabsTrigger",KT=x.forwardRef((e,n)=>{const{__scopeTabs:s,value:i,disabled:r=!1,...c}=e,u=Tg($T,s),d=HT(s),f=XT(u.baseId,i),h=ZT(u.baseId,i),y=i===u.value;return m.jsx(WB,{asChild:!0,...d,focusable:!r,active:y,children:m.jsx(Ie.button,{type:"button",role:"tab","aria-selected":y,"aria-controls":h,"data-state":y?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:f,...c,ref:n,onMouseDown:Be(e.onMouseDown,g=>{!r&&g.button===0&&g.ctrlKey===!1?u.onValueChange(i):g.preventDefault()}),onKeyDown:Be(e.onKeyDown,g=>{[" ","Enter"].includes(g.key)&&u.onValueChange(i)}),onFocus:Be(e.onFocus,()=>{const g=u.activationMode!=="manual";!y&&!r&&g&&u.onValueChange(i)})})})});KT.displayName=$T;var YT="TabsContent",GT=x.forwardRef((e,n)=>{const{__scopeTabs:s,value:i,forceMount:r,children:c,...u}=e,d=Tg(YT,s),f=XT(d.baseId,i),h=ZT(d.baseId,i),y=i===d.value,g=x.useRef(y);return x.useEffect(()=>{const b=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(b)},[]),m.jsx(Tl,{present:r||y,children:({present:b})=>m.jsx(Ie.div,{"data-state":y?"active":"inactive","data-orientation":d.orientation,role:"tabpanel","aria-labelledby":f,hidden:!b,id:h,tabIndex:0,...u,ref:n,style:{...e.style,animationDuration:g.current?"0s":void 0},children:b&&c})})});GT.displayName=YT;function XT(e,n){return`${e}-trigger-${n}`}function ZT(e,n){return`${e}-content-${n}`}var n6=IT,a6=qT,s6=KT,i6=GT;function o6({className:e,...n}){return m.jsx(n6,{"data-slot":"tabs",className:re("flex flex-col gap-2",e),...n})}function r6({className:e,...n}){return m.jsx(a6,{"data-slot":"tabs-list",className:re("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...n})}function o1({className:e,...n}){return m.jsx(s6,{"data-slot":"tabs-trigger",className:re("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n})}function r1({className:e,...n}){return m.jsx(i6,{"data-slot":"tabs-content",className:re("flex-1 outline-none",e),...n})}function hm(e){return{account_id:e.get("account_id")||"",upstream_model:e.get("upstream_model")||"",client_model:e.get("client_model")||"",upstream_endpoint:e.get("upstream_endpoint")||"",path:e.get("path")||"",status:e.get("status")||"",has_error:e.get("has_error")||"",from_ms:e.get("from_ms")||"",to_ms:e.get("to_ms")||""}}function l6(e){const n=new URLSearchParams;return[["account_id",e.account_id],["upstream_model",e.upstream_model],["client_model",e.client_model],["upstream_endpoint",e.upstream_endpoint],["path",e.path],["status",e.status],["has_error",e.has_error],["from_ms",e.from_ms],["to_ms",e.to_ms]].forEach(([s,i])=>{const r=i.trim();r&&n.set(s,r)}),n}function l1(e){const n=e.trim();if(!n)return null;const s=Number(n);if(!Number.isFinite(s))return null;const i=Math.trunc(s);return i<0?null:i}function c6(e,n){const s=l1(e),i=l1(n);return e.trim()&&s===null?"requestsPage.validation.fromMsMustBeNumber":n.trim()&&i===null?"requestsPage.validation.toMsMustBeNumber":s!==null&&i!==null&&s>i?"requestsPage.validation.fromMsMustBeLteToMs":null}function c1(e){if(!e)return"";const n=Date.parse(e);return Number.isFinite(n)?String(n):""}function u1(e){const n=Number(e);if(!Number.isFinite(n))return"";const s=new Date(n),i=h=>String(h).padStart(2,"0"),r=s.getFullYear(),c=i(s.getMonth()+1),u=i(s.getDate()),d=i(s.getHours()),f=i(s.getMinutes());return`${r}-${c}-${u}T${d}:${f}`}function u6(e){const n=Date.now(),i={"15m":900*1e3,"1h":3600*1e3,"6h":360*60*1e3,"24h":1440*60*1e3,"7d":10080*60*1e3}[e];return{from_ms:String(n-i),to_ms:String(n)}}const Kt=[null,null,"hidden md:table-cell","hidden md:table-cell","hidden lg:table-cell","hidden xl:table-cell","hidden xl:table-cell","hidden 2xl:table-cell","hidden lg:table-cell",null];function d6({rows:e}){const n=Kt.length;return m.jsx(m.Fragment,{children:Array.from({length:e}).map((s,i)=>m.jsx(Je,{children:Array.from({length:n}).map((r,c)=>m.jsx(xe,{className:re("py-3",Kt[c]),children:m.jsx(_i,{className:c===1?"h-4 w-56":"h-4 w-24"})},c))},i))})}function f6(){const{t:e}=qe(),[n,s]=ZR(),[i,r]=x.useState(()=>hm(n)),[c,u]=x.useState([]),[d,f]=x.useState(null),[h,y]=x.useState(!1),[g,b]=x.useState(!1),[w,E]=x.useState(null),C=x.useMemo(()=>hm(n),[n]),[A,T]=x.useState(()=>{const I=hm(n);return I.from_ms||I.to_ms?"custom":"__any__"});x.useEffect(()=>{r(C);const I=!!(C.from_ms||C.to_ms);T(ne=>I?ne==="__any__"?"custom":ne:"__any__")},[C]);const N=x.useMemo(()=>{const I=c6(i.from_ms,i.to_ms);return I?e(I):null},[i.from_ms,i.to_ms,e]),R=x.useCallback(async({reset:I,cursor:ne})=>{b(!0),E(null);try{const le=await m4({...C,limit:50,cursor_id:I?null:ne});u(D=>I?le.items:D.concat(le.items)),f(le.next_cursor_id??null),y(!!le.has_more)}catch(le){const D=le instanceof gs?le.message:String(le);E(D),Wt.error(st.t("requestsPage.loadFailedTitle"),{description:D}),I&&u([]),y(!1),f(null)}finally{b(!1)}},[C]);x.useEffect(()=>{R({reset:!0,cursor:null})},[R]);function _(){N||s(l6(i))}function M(){s(new URLSearchParams)}function U(I){if(T(I),I==="__any__"){r(D=>({...D,from_ms:"",to_ms:""}));return}if(I==="custom")return;const{from_ms:ne,to_ms:le}=u6(I);r(D=>({...D,from_ms:ne,to_ms:le}))}const L=x.useMemo(()=>A==="custom"?u1(i.from_ms):"",[i.from_ms,A]),O=x.useMemo(()=>A==="custom"?u1(i.to_ms):"",[i.to_ms,A]),K=!g&&!N,Z=Kt.length,J=n.toString().length>0;let se=e("common.noMore");return h&&(se=e(g?"common.loading":"common.loadMore")),m.jsxs("div",{className:"space-y-4",children:[m.jsxs(en,{className:"gap-4 py-4",children:[m.jsxs(rn,{className:"px-4",children:[m.jsx(ln,{children:e("nav.requests")}),m.jsx(wn,{className:"hidden sm:block",children:e("requestsPage.description")}),m.jsxs(H4,{className:"flex items-center gap-2",children:[m.jsx(pt,{type:"button",variant:"outline",size:"sm",onClick:M,disabled:!J||g,children:e("common.clear")}),m.jsx(Hi,{onClick:_,disabled:!K,size:"sm",children:e("common.apply")})]})]}),m.jsxs(En,{className:"space-y-3 px-4",children:[m.jsxs(o6,{defaultValue:"quick",className:"gap-1.5",children:[m.jsxs(r6,{className:"h-8 p-[2px]",children:[m.jsx(o1,{value:"quick",children:e("requestsPage.tabs.quick")}),m.jsx(o1,{value:"advanced",children:e("requestsPage.tabs.advanced")})]}),m.jsx(r1,{value:"quick",children:m.jsxs("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-6",children:[m.jsxs("div",{className:"grid gap-1.5",children:[m.jsx(ft,{htmlFor:"account_id",className:"text-muted-foreground lg:text-xs",children:e("common.account")}),m.jsx(mt,{id:"account_id",className:"h-8",placeholder:"octocat",value:i.account_id,onChange:I=>r(ne=>({...ne,account_id:I.target.value}))})]}),m.jsxs("div",{className:"grid gap-1.5",children:[m.jsx(ft,{className:"text-muted-foreground lg:text-xs",children:e("requestsPage.filters.timeRange")}),m.jsxs(aa,{value:A,onValueChange:I=>U(I),children:[m.jsx(ia,{size:"sm",className:"w-full",children:m.jsx(sa,{})}),m.jsxs(oa,{children:[m.jsx(De,{value:"__any__",children:e("common.any")}),m.jsx(De,{value:"15m",children:e("requestsPage.timeRange.last15m")}),m.jsx(De,{value:"1h",children:e("requestsPage.timeRange.last1h")}),m.jsx(De,{value:"6h",children:e("requestsPage.timeRange.last6h")}),m.jsx(De,{value:"24h",children:e("requestsPage.timeRange.last24h")}),m.jsx(De,{value:"7d",children:e("requestsPage.timeRange.last7d")}),m.jsx(De,{value:"custom",children:e("requestsPage.timeRange.custom")})]})]})]}),m.jsxs("div",{className:"grid gap-1.5",children:[m.jsx(ft,{htmlFor:"status",className:"text-muted-foreground lg:text-xs",children:e("common.status")}),m.jsx(mt,{id:"status",className:"h-8",placeholder:"200",value:i.status,onChange:I=>r(ne=>({...ne,status:I.target.value}))})]}),m.jsxs("div",{className:"grid gap-1.5",children:[m.jsx(ft,{className:"text-muted-foreground lg:text-xs",children:e("requestsPage.filters.hasError")}),m.jsxs(aa,{value:i.has_error||"__any__",onValueChange:I=>r(ne=>({...ne,has_error:I==="__any__"?"":I})),children:[m.jsx(ia,{size:"sm",className:"w-full",children:m.jsx(sa,{})}),m.jsxs(oa,{children:[m.jsx(De,{value:"__any__",children:e("common.any")}),m.jsx(De,{value:"1",children:e("common.yes")}),m.jsx(De,{value:"0",children:e("common.no")})]})]})]}),A==="custom"?m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"grid gap-1.5",children:[m.jsx(ft,{htmlFor:"from_dt",className:"text-muted-foreground lg:text-xs",children:e("common.from")}),m.jsx(mt,{id:"from_dt",className:"h-8",type:"datetime-local",value:L,onChange:I=>{T("custom"),r(ne=>({...ne,from_ms:c1(I.target.value)}))}})]}),m.jsxs("div",{className:"grid gap-1.5",children:[m.jsx(ft,{htmlFor:"to_dt",className:"text-muted-foreground lg:text-xs",children:e("common.to")}),m.jsx(mt,{id:"to_dt",className:"h-8",type:"datetime-local",value:O,onChange:I=>{T("custom"),r(ne=>({...ne,to_ms:c1(I.target.value)}))}})]})]}):null]})}),m.jsx(r1,{value:"advanced",children:m.jsxs("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:[m.jsxs("div",{className:"grid gap-1.5",children:[m.jsx(ft,{htmlFor:"upstream_model",className:"text-muted-foreground lg:text-xs",children:e("requestsPage.filters.upstreamModel")}),m.jsx(mt,{id:"upstream_model",className:"h-8",placeholder:"gpt-5",value:i.upstream_model,onChange:I=>r(ne=>({...ne,upstream_model:I.target.value}))})]}),m.jsxs("div",{className:"grid gap-1.5",children:[m.jsx(ft,{htmlFor:"client_model",className:"text-muted-foreground lg:text-xs",children:e("requestsPage.filters.clientModel")}),m.jsx(mt,{id:"client_model",className:"h-8",placeholder:"claude-sonnet-4",value:i.client_model,onChange:I=>r(ne=>({...ne,client_model:I.target.value}))})]}),m.jsxs("div",{className:"grid gap-1.5",children:[m.jsx(ft,{htmlFor:"upstream_endpoint",className:"text-muted-foreground lg:text-xs",children:e("common.endpoint")}),m.jsx(mt,{id:"upstream_endpoint",className:"h-8",placeholder:"/responses",value:i.upstream_endpoint,onChange:I=>r(ne=>({...ne,upstream_endpoint:I.target.value}))})]}),m.jsxs("div",{className:"grid gap-1.5",children:[m.jsx(ft,{htmlFor:"path",className:"text-muted-foreground lg:text-xs",children:e("common.path")}),m.jsx(mt,{id:"path",className:"h-8",placeholder:"/v1/messages",value:i.path,onChange:I=>r(ne=>({...ne,path:I.target.value}))})]})]})})]}),N?m.jsx(Sn,{variant:"warning",title:e("requestsPage.validation.title"),description:N}):null]})]}),m.jsxs("div",{className:"relative",children:[m.jsx(Cg,{className:"opacity-30",borderWidth:1}),m.jsx(en,{className:"relative gap-4 py-4",children:m.jsxs(En,{className:"space-y-4 px-4",children:[w&&c.length>0?m.jsx(Sn,{variant:"error",title:e("requestsPage.loadFailedTitle"),description:w,actionLabel:e("common.retry"),onAction:()=>{R({reset:!0,cursor:null})}}):null,m.jsxs(sd,{className:"[&_th]:h-9 [&_td]:py-1.5",children:[m.jsx($p,{children:m.jsxs(Je,{children:[m.jsx(zt,{children:e("common.time")}),m.jsx(zt,{children:e("common.path")}),m.jsx(zt,{className:re(Kt[2]),children:e("common.endpoint")}),m.jsx(zt,{className:re(Kt[3]),children:e("common.account")}),m.jsx(zt,{className:re(Kt[4]),children:e("common.model")}),m.jsx(zt,{className:re(Kt[5]),children:e("common.tokens")}),m.jsx(zt,{className:re(Kt[6]),children:e("common.cost")}),m.jsx(zt,{className:re(Kt[7]),children:e("common.quota")}),m.jsx(zt,{className:re(Kt[8]),children:e("common.durationAbbrev")}),m.jsx(zt,{children:e("common.status")})]})}),m.jsx(id,{children:w&&!g&&c.length===0?m.jsx(Je,{children:m.jsx(xe,{colSpan:Z,children:m.jsx(Sn,{variant:"error",title:e("requestsPage.loadFailedTitle"),description:w,actionLabel:e("common.retry"),onAction:()=>{R({reset:!0,cursor:null})}})})}):g&&c.length===0?m.jsx(d6,{rows:6}):c.length===0?m.jsx(Je,{children:m.jsx(xe,{colSpan:Z,children:m.jsx(Sn,{variant:"info",title:e("requestsPage.empty.noRequestsTitle"),description:e(J?"requestsPage.empty.noResultsForFilters":"requestsPage.empty.noRequestsFound"),actionLabel:J?e("common.clearFilters"):void 0,onAction:J?M:void 0})})}):c.map(I=>{const ne=I.premium_unlimited_after?"∞":I.premium_remaining_after!=null?ya(I.premium_remaining_after):"",le=I.http_status>=400?m.jsx(un,{variant:"destructive",children:I.http_status}):m.jsx(un,{variant:"secondary",children:I.http_status});return m.jsxs(Je,{children:[m.jsx(xe,{className:"font-mono text-xs",children:pl(I.started_at_ms)}),m.jsx(xe,{className:"font-mono whitespace-normal break-words",children:m.jsx(Pi,{to:`/request/${encodeURIComponent(I.request_id)}`,state:{fromSearch:n.toString()},className:"underline decoration-border hover:decoration-foreground",children:I.path})}),m.jsx(xe,{className:re(Kt[2],"font-mono text-xs whitespace-normal break-words"),children:I.upstream_endpoint||""}),m.jsx(xe,{className:re(Kt[3],"font-mono text-xs whitespace-normal break-words"),children:I.account_id||""}),m.jsx(xe,{className:re(Kt[4],"font-mono text-xs"),children:I.upstream_model||""}),m.jsx(xe,{className:re(Kt[5],"font-mono text-xs"),children:I.tokens_total!=null?ya(I.tokens_total):""}),m.jsx(xe,{className:re(Kt[6],"font-mono text-xs"),children:I.cost_units??""}),m.jsx(xe,{className:re(Kt[7],"font-mono text-xs"),children:ne}),m.jsx(xe,{className:re(Kt[8],"font-mono text-xs"),children:I.duration_ms!=null?ya(I.duration_ms):""}),m.jsx(xe,{children:le})]},I.request_id)})})]}),m.jsx("div",{className:"flex items-center justify-end gap-2",children:m.jsx(Hi,{onClick:()=>{R({reset:!1,cursor:d})},disabled:g||!h,size:"sm",children:se})})]})})]})]})}function h6({saving:e,canSave:n,onSave:s,className:i}){const{t:r}=qe();return m.jsx("div",{className:re("fixed bottom-6 right-6 z-50","shadow-lg rounded-full",i),children:m.jsx(Hi,{type:"button",size:"lg",onClick:s,disabled:!n,className:"shadow-2xl",children:r(e?"settingsPage.saveButton.saving":"settingsPage.saveButton.saveChanges")})})}function m6({sections:e,activeSection:n,onSectionClick:s,className:i}){const{t:r}=qe();return m.jsxs("nav",{className:re("sticky top-6 space-y-1 rounded-lg border bg-card p-2",i),"aria-label":r("settingsPage.navigation.ariaLabel"),children:[m.jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground uppercase tracking-wider",children:r("nav.settings")}),e.map(c=>{const u=n===c.id;return m.jsx("button",{type:"button",onClick:()=>s(c.id),className:re("w-full text-left px-3 py-2 rounded-md text-sm transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",u&&"bg-accent/50"),"aria-current":u?"page":void 0,"aria-controls":c.id,children:u?m.jsx(Em,{speed:1.5,colorFrom:"#9E7AFF",colorTo:"#FE8BBB",className:"font-medium",children:c.label}):m.jsx("span",{className:"text-muted-foreground",children:c.label})},c.id)})]})}const Po=x.forwardRef(({id:e,isActive:n,children:s,className:i},r)=>m.jsx("div",{ref:r,id:e,"data-section-id":e,className:re("relative scroll-mt-6",i),children:m.jsxs(us,{className:"rounded-xl overflow-hidden",gradientSize:200,gradientOpacity:.6,children:[n&&m.jsx(Cg,{size:50,duration:6,colorFrom:"#9E7AFF",colorTo:"#FE8BBB",borderWidth:2,className:"opacity-70"}),m.jsx("div",{className:"relative",children:s})]})}));Po.displayName="SettingsSectionCard";function p6({sectionIds:e,rootMargin:n="-20% 0px -60% 0px",threshold:s=.5}){const[i,r]=x.useState(e[0]??""),c=x.useRef(new Map),u=x.useRef(null),d=x.useCallback((h,y)=>{if(y)c.current.set(h,y),u.current?.observe(y);else{const g=c.current.get(h);g&&u.current?.unobserve(g),c.current.delete(h)}},[]),f=x.useCallback(h=>{const y=c.current.get(h);y&&y.scrollIntoView({behavior:"smooth",block:"start"})},[]);return x.useEffect(()=>{const h=new IntersectionObserver(y=>{const g=y.filter(b=>b.isIntersecting);if(g.length>0){g.sort((E,C)=>E.boundingClientRect.top-C.boundingClientRect.top);const w=g[0].target.dataset.sectionId;w&&r(w)}},{rootMargin:n,threshold:s});u.current=h;for(const y of c.current.values())h.observe(y);return()=>{h.disconnect(),u.current=null}},[n,s]),{activeSection:i,registerSection:d,scrollToSection:f}}function g6({className:e,checked:n,defaultChecked:s,onCheckedChange:i,disabled:r,onClick:c,type:u="button",...d},f){const h=n!==void 0,[y,g]=x.useState(s??!1),b=h?n:y;function w(E){if(c?.(E),E.defaultPrevented||r)return;const C=!b;h||g(C),i?.(C)}return m.jsx("button",{ref:f,type:u,role:"switch","aria-checked":!!b,"data-state":b?"checked":"unchecked","data-disabled":r?"true":"false",className:re("inline-flex h-6 w-11 shrink-0 items-center rounded-full border border-input bg-input/30 shadow-xs transition-[color,box-shadow] outline-none","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",b?"bg-primary border-primary":"bg-input/30",e),onClick:w,disabled:r,...d,children:m.jsx("span",{"data-state":b?"checked":"unchecked",className:re("pointer-events-none inline-block size-4 rounded-full bg-background shadow-sm transition-transform",b?"translate-x-5":"translate-x-1")})})}const ea=x.forwardRef(g6);ea.displayName="Switch";function $o({className:e,...n}){return m.jsx("textarea",{"data-slot":"textarea",className:re("placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input min-h-[96px] w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...n})}const v6=["general","reasoning","aliases","prompts","advanced"],cp=["none","minimal","low","medium","high","xhigh"];function Ag({next:e,record:n,setJson:s,setError:i,setMode:r}){e&&s(JSON.stringify(n??{},null,2)),i(null),r(e?"json":"form")}function jg({value:e,parse:n,setJson:s,setError:i,onRecord:r}){s(e);const c=n(e);if("error"in c){i(c.error);return}i(null),r(c.record)}function Iu(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Sa(){return typeof globalThis.crypto?.randomUUID=="function"?globalThis.crypto.randomUUID():`${Date.now()}-${Math.random().toString(16).slice(2)}`}function y6(e){return Array.isArray(e)?[...new Set(e.filter(n=>typeof n=="string").map(n=>n.trim()).filter(n=>n.length>0))]:[]}function d1(e){const n=y6(e.auth?.apiKeys);if(n.length>0)return n;const s=e.apiKey?.trim();return s?[s]:[]}function x6(e){return QT(e)}function QT(e){return[...new Set(e.split(/\r?\n|,/).map(n=>n.trim()).filter(n=>n.length>0))]}function f1(e){return e?Object.entries(e).map(([n,s])=>({id:Sa(),model:n,prompt:s})):[]}function h1(e){return e?Object.entries(e).map(([n,s])=>({id:Sa(),model:n,effort:s})):[]}function up(e){return e?Object.entries(e).map(([n,s])=>typeof s=="string"?{id:Sa(),alias:n,target:s,allowOriginal:void 0}:{id:Sa(),alias:n,target:s.target,allowOriginal:s.allowOriginal}):[]}function m1(e){const n={};for(const s of e){const i=s.model.trim();i&&(n[i]=s.prompt)}return n}function p1(e){const n={};for(const s of e){const i=s.model.trim();i&&(n[i]=s.effort)}return n}const JT=new Set(["__proto__","constructor","prototype"]);function Su(e){const n=Object.create(null),s=new Set;for(const i of e){const r=i.alias.trim(),c=i.target.trim();if(!r||!c)continue;const u=r.toLowerCase();JT.has(u)||u!==c.toLowerCase()&&(s.has(u)||(s.add(u),n[r]=i.allowOriginal===void 0?{target:c}:{target:c,allowOriginal:i.allowOriginal}))}return n}const WT=new Set(["__proto__","constructor","prototype"]);function b6(e){return e?Object.entries(e).map(([n,s])=>({id:Sa(),name:n,enabled:s.enabled??!0,baseUrl:s.baseUrl??"",apiKey:s.apiKey??"",models:Object.entries(s.models??{}).map(([i,r])=>({id:Sa(),model:i,temperature:r.temperature===void 0?"":String(r.temperature),topP:r.topP===void 0?"":String(r.topP),topK:r.topK===void 0?"":String(r.topK)}))})):[]}function S6(e){return e.enabled===!1||e.baseUrl.trim()||e.apiKey.trim()?!0:e.models.some(n=>!!n.model.trim()||!!n.temperature.trim()||!!n.topP.trim()||!!n.topK.trim())}function w6(e,n,s){const i=e.model.trim(),r=e.temperature.trim(),c=e.topP.trim(),u=e.topK.trim(),d=!!(r||c||u);if(!i)return d?{error:`Provider '${n}': model id is required when setting overrides.`}:{record:null};const f=i.toLowerCase();if(WT.has(f))return{error:`Provider '${n}' model '${i}' is not allowed.`};if(s.has(f))return{error:`Provider '${n}' model '${i}' is duplicated.`};const h={};if(r){const y=Number(r);if(!Number.isFinite(y)||y<0)return{error:`Provider '${n}' model '${i}': temperature must be a non-negative number.`};h.temperature=y}if(c){const y=Number(c);if(!Number.isFinite(y)||y<0)return{error:`Provider '${n}' model '${i}': topP must be a non-negative number.`};h.topP=y}if(u){const y=Number(u);if(!Number.isFinite(y)||y<0)return{error:`Provider '${n}' model '${i}': topK must be a non-negative number.`};h.topK=y}return Object.keys(h).length===0?{record:null}:(s.add(f),{record:{modelId:i,config:h}})}function E6(e,n){const s=Object.create(null),i=new Set;for(const r of e){const c=w6(r,n,i);if("error"in c)return c;c.record&&(s[c.record.modelId]=c.record.config)}return{record:s}}function C6(e){const n=Object.create(null),s=new Set;for(const i of e){const r=i.name.trim();if(!r){if(S6(i))return{error:"Provider name is required."};continue}const c=r.toLowerCase();if(WT.has(c))return{error:`Provider '${r}' is not allowed.`};if(s.has(c))return{error:`Provider '${r}' is duplicated.`};s.add(c);const u=i.baseUrl.trim(),d=i.apiKey.trim(),f={type:"anthropic",enabled:i.enabled,baseUrl:u||void 0,apiKey:d||void 0},h=E6(i.models,r);if("error"in h)return h;Object.keys(h.record).length>0&&(f.models=h.record),n[r]=f}return{record:n}}function T6(e){const[n,s]=x.useState([]),[i,r]=x.useState(null),c=x.useCallback(w=>{s(b6(w)),r(null)},[]),u=x.useCallback(w=>{s(w);const E=C6(w);if("error"in E){r(E.error);return}r(null),e(E.record)},[e]),d=x.useCallback(()=>{u(n.concat({id:Sa(),name:"",enabled:!0,baseUrl:"",apiKey:"",models:[]}))},[n,u]),f=x.useCallback(w=>{u(n.filter(E=>E.id!==w))},[n,u]),h=x.useCallback((w,E)=>{const C=n.map(A=>A.id===w?{...A,...E}:A);u(C)},[n,u]),y=x.useCallback(w=>{const E=n.map(C=>C.id!==w?C:{...C,models:C.models.concat({id:Sa(),model:"",temperature:"",topP:"",topK:""})});u(E)},[n,u]),g=x.useCallback((w,E)=>{const C=n.map(A=>A.id!==w?A:{...A,models:A.models.filter(T=>T.id!==E)});u(C)},[n,u]),b=x.useCallback((w,E,C)=>{const A=n.map(T=>T.id!==w?T:{...T,models:T.models.map(N=>N.id===E?{...N,...C}:N)});u(A)},[n,u]);return{items:n,issue:i,onAddProvider:d,onRemoveProvider:f,onUpdateProvider:h,onAddModel:y,onRemoveModel:g,onUpdateModel:b,setFromRecord:c}}function A6(e){if(!e.trim())return{record:{}};try{const n=JSON.parse(e);if(!Iu(n))return{error:"extraPrompts JSON must be an object of string values."};const s={};for(const[i,r]of Object.entries(n)){if(typeof r!="string")return{error:`extraPrompts.${i} must be a string.`};s[i]=r}return{record:s}}catch{return{error:"extraPrompts JSON is not valid."}}}function j6(e){if(!e.trim())return{record:{}};try{const n=JSON.parse(e);if(!Iu(n))return{error:"modelReasoningEfforts JSON must be an object."};const s={};for(const[i,r]of Object.entries(n)){if(typeof r!="string")return{error:`modelReasoningEfforts.${i} must be a string.`};if(!cp.includes(r))return{error:`modelReasoningEfforts.${i} must be one of ${cp.join(", ")}.`};s[i]=r}return{record:s}}catch{return{error:"modelReasoningEfforts JSON is not valid."}}}function N6(e){if(!e.trim())return{record:{}};try{const n=JSON.parse(e);if(!Iu(n))return{error:"modelAliases JSON must be an object."};const s=Object.create(null),i=new Set;for(const[r,c]of Object.entries(n)){const u=r.trim();if(!u)return{error:"modelAliases keys must be non-empty strings."};const d=u.toLowerCase();if(JT.has(d))return{error:`modelAliases.${r} is not allowed.`};let f,h;if(typeof c=="string")f=c.trim();else if(Iu(c)){const y=c.target;if(typeof y!="string")return{error:`modelAliases.${r}.target must be a string.`};if(f=y.trim(),"allowOriginal"in c){if(typeof c.allowOriginal!="boolean")return{error:`modelAliases.${r}.allowOriginal must be a boolean.`};h=c.allowOriginal}}else return{error:`modelAliases.${r} must be a string or object.`};if(!f)return{error:`modelAliases.${r} must be a non-empty string.`};if(d===f.toLowerCase())return{error:`modelAliases.${r} cannot map to itself.`};if(i.has(d))return{error:`modelAliases.${r} conflicts with another alias.`};i.add(d),s[u]=h===void 0?{target:f}:{target:f,allowOriginal:h}}return{record:s}}catch{return{error:"modelAliases JSON is not valid."}}}function R6(e){const[n,s]=x.useState("form"),[i,r]=x.useState([]),[c,u]=x.useState(""),[d,f]=x.useState(null),h=x.useMemo(()=>d?`extraPrompts: ${d}`:null,[d]),y=x.useCallback(T=>{r(f1(T)),u(JSON.stringify(T??{},null,2)),f(null)},[]),g=x.useCallback(T=>{r(T),e(m1(T))},[e]),b=x.useCallback(T=>{jg({value:T,parse:A6,setJson:u,setError:f,onRecord:N=>g(f1(N))})},[g]),w=x.useCallback(T=>{Ag({next:T,record:m1(i),setJson:u,setError:f,setMode:s})},[i]),E=x.useCallback(()=>{g(i.concat({id:Sa(),model:"",prompt:""}))},[i,g]),C=x.useCallback(T=>{g(i.filter(N=>N.id!==T))},[i,g]),A=x.useCallback((T,N)=>{const R=i.map(_=>_.id===T?{..._,...N}:_);g(R)},[i,g]);return{mode:n,items:i,json:c,jsonIssue:h,onToggleMode:w,onJsonChange:b,onAddItem:E,onRemoveItem:C,onUpdateItem:A,setFromRecord:y}}function M6(e){const[n,s]=x.useState("form"),[i,r]=x.useState([]),[c,u]=x.useState(""),[d,f]=x.useState(null),h=x.useMemo(()=>d?`modelReasoningEfforts: ${d}`:null,[d]),y=x.useCallback(T=>{r(h1(T)),u(JSON.stringify(T??{},null,2)),f(null)},[]),g=x.useCallback(T=>{r(T),e(p1(T))},[e]),b=x.useCallback(T=>{jg({value:T,parse:j6,setJson:u,setError:f,onRecord:N=>g(h1(N))})},[g]),w=x.useCallback(T=>{Ag({next:T,record:p1(i),setJson:u,setError:f,setMode:s})},[i]),E=x.useCallback(()=>{g(i.concat({id:Sa(),model:"",effort:"high"}))},[i,g]),C=x.useCallback(T=>{g(i.filter(N=>N.id!==T))},[i,g]),A=x.useCallback((T,N)=>{const R=i.map(_=>_.id===T?{..._,...N}:_);g(R)},[i,g]);return{mode:n,items:i,json:c,jsonIssue:h,onToggleMode:w,onJsonChange:b,onAddItem:E,onRemoveItem:C,onUpdateItem:A,setFromRecord:y}}function _6(e){const[n,s]=x.useState("form"),[i,r]=x.useState([]),[c,u]=x.useState(""),[d,f]=x.useState(null),h=x.useMemo(()=>d?`modelAliases: ${d}`:null,[d]),y=x.useCallback(T=>{const N=up(T),R=Su(N);r(N),u(JSON.stringify(R,null,2)),f(null)},[]),g=x.useCallback(T=>{r(T),e(Su(T))},[e]),b=x.useCallback(T=>{jg({value:T,parse:N6,setJson:u,setError:f,onRecord:N=>g(up(N))})},[g]),w=x.useCallback(T=>{Ag({next:T,record:Su(i),setJson:u,setError:f,setMode:s})},[i]),E=x.useCallback(()=>{g(i.concat({id:Sa(),alias:"",target:"",allowOriginal:void 0}))},[i,g]),C=x.useCallback(T=>{g(i.filter(N=>N.id!==T))},[i,g]),A=x.useCallback((T,N)=>{const R=i.map(_=>_.id===T?{..._,...N}:_);g(R)},[i,g]);return{mode:n,items:i,json:c,jsonIssue:h,onToggleMode:w,onJsonChange:b,onAddItem:E,onRemoveItem:C,onUpdateItem:A,setFromRecord:y}}function O6({hasModels:e,smallModelLabel:n,smallModelValue:s,smallModelInputValue:i,models:r,authApiKeysValue:c,anthropicApiKeyValue:u,legacyAuthNote:d,anthropicApiKeyEnvNote:f,onSmallModelSelect:h,onSmallModelInput:y,onAuthApiKeysChange:g,onAnthropicApiKeyChange:b}){const{t:w}=qe(),[E,C]=x.useState(!1),A=e&&s!=="__default__"&&!r.includes(s);return m.jsxs(en,{className:"gap-4 py-4",children:[m.jsxs(rn,{className:"px-4",children:[m.jsx(ln,{children:w("settingsPage.general.title")}),m.jsx(wn,{className:"hidden sm:block",children:w("settingsPage.general.description")})]}),m.jsxs(En,{className:"space-y-4 px-4",children:[m.jsxs("div",{className:"grid gap-2",children:[m.jsx(ft,{className:"text-muted-foreground text-xs",children:n}),e?m.jsxs(aa,{value:s,onValueChange:h,children:[m.jsx(ia,{className:"w-full",children:m.jsx(sa,{placeholder:w("settingsPage.general.smallModelPlaceholder")})}),m.jsxs(oa,{children:[m.jsx(De,{value:"__default__",children:w("settingsPage.common.defaultOption")}),A?m.jsx(De,{value:s,children:w("settingsPage.common.customModel",{value:s})}):null,r.map(T=>m.jsx(De,{value:T,children:T},T))]})]}):m.jsx(mt,{placeholder:w("settingsPage.general.smallModelInputPlaceholder"),value:i,onChange:T=>y(T.target.value)}),m.jsx("div",{className:"text-muted-foreground text-xs",children:w("settingsPage.general.smallModelHint")})]}),m.jsxs("div",{className:"grid gap-2",children:[m.jsx(ft,{className:"text-muted-foreground text-xs",children:w("settingsPage.general.apiKeysLabel")}),m.jsx($o,{autoComplete:"off",placeholder:w("settingsPage.general.apiKeysPlaceholder"),value:c,onChange:T=>g(T.target.value),className:"min-h-[96px] font-mono text-xs"}),m.jsx("div",{className:"text-muted-foreground text-xs",children:w("settingsPage.general.apiKeysHint")}),m.jsx("div",{className:"text-muted-foreground text-xs",children:d})]}),m.jsxs("div",{className:"grid gap-2",children:[m.jsx(ft,{className:"text-muted-foreground text-xs",children:w("settingsPage.general.anthropicApiKeyLabel")}),m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(mt,{autoComplete:"off",type:E?"text":"password",placeholder:w("settingsPage.general.anthropicApiKeyPlaceholder"),value:u,onChange:T=>b(T.target.value),className:"font-mono text-xs"}),m.jsxs(pt,{type:"button",variant:"outline",className:"shrink-0",onClick:()=>C(T=>!T),"aria-label":w(E?"settingsPage.general.hideAnthropicApiKey":"settingsPage.general.showAnthropicApiKey"),children:[E?m.jsx(s_,{}):m.jsx(o_,{}),m.jsx("span",{className:"hidden sm:inline",children:w(E?"settingsPage.general.hideAnthropicApiKey":"settingsPage.general.showAnthropicApiKey")})]})]}),m.jsx("div",{className:"text-muted-foreground text-xs",children:w("settingsPage.general.anthropicApiKeyHint")}),m.jsx("div",{className:"text-muted-foreground text-xs",children:f})]})]})]})}function D6({mode:e,json:n,jsonIssue:s,items:i,models:r,onToggleMode:c,onJsonChange:u,onAddItem:d,onRemoveItem:f,onUpdateItem:h}){const y="__default__",g=r.length>0,{t:b}=qe();return m.jsxs(en,{className:"gap-4 py-4",children:[m.jsxs(rn,{className:"px-4",children:[m.jsx(ln,{children:b("settingsPage.reasoning.title")}),m.jsx(wn,{className:"hidden sm:block",children:b("settingsPage.reasoning.description")})]}),m.jsxs(En,{className:"space-y-3 px-4",children:[m.jsxs("div",{className:"flex items-center justify-between gap-3",children:[m.jsx("div",{className:"text-muted-foreground text-xs",children:b("settingsPage.reasoning.hint")}),m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(ea,{checked:e==="json",onCheckedChange:c}),m.jsx(ft,{className:"text-muted-foreground text-xs",children:b("settingsPage.common.jsonMode")})]})]}),e==="json"?m.jsxs("div",{className:"space-y-2",children:[m.jsx($o,{value:n,onChange:w=>u(w.target.value),className:"min-h-[160px] lg:min-h-[120px] max-h-[36vh] overflow-auto font-mono text-xs",placeholder:b("settingsPage.reasoning.jsonPlaceholder")}),s?m.jsx(Sn,{variant:"warning",title:b("settingsPage.common.invalidJsonTitle"),description:s}):null]}):m.jsxs("div",{className:"space-y-2",children:[i.length===0?m.jsx("div",{className:"text-muted-foreground text-sm",children:b("settingsPage.reasoning.emptyState")}):i.map(w=>{const E=w.model||y,C=E!==y&&!r.includes(E),A=!g&&!C;return m.jsxs("div",{className:"grid gap-2 rounded-lg border p-3",children:[m.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[m.jsxs(aa,{value:E,onValueChange:T=>h(w.id,{model:T===y?"":T}),disabled:A,children:[m.jsx(ia,{className:"min-w-[220px]",children:m.jsx(sa,{placeholder:b(g?"settingsPage.common.selectModelPlaceholder":"settingsPage.common.noModelsAvailable")})}),m.jsxs(oa,{children:[m.jsx(De,{value:y,children:b("settingsPage.common.defaultOption")}),C?m.jsx(De,{value:E,children:b("settingsPage.common.customModel",{value:E})}):null,r.map(T=>m.jsx(De,{value:T,children:T},T))]})]}),m.jsxs(aa,{value:w.effort,onValueChange:T=>h(w.id,{effort:T}),children:[m.jsx(ia,{className:"w-40",children:m.jsx(sa,{})}),m.jsx(oa,{children:cp.map(T=>m.jsx(De,{value:T,children:T},T))})]}),m.jsx(pt,{type:"button",variant:"outline",size:"sm",onClick:()=>f(w.id),children:b("settingsPage.common.remove")})]}),m.jsx("div",{className:"text-muted-foreground text-xs",children:b("settingsPage.reasoning.itemHint")})]},w.id)}),m.jsx(pt,{type:"button",variant:"outline",size:"sm",onClick:d,children:b("settingsPage.reasoning.addButton")})]})]})]})}function P6({mode:e,json:n,jsonIssue:s,items:i,models:r,onToggleMode:c,onJsonChange:u,onAddItem:d,onRemoveItem:f,onUpdateItem:h}){const y="__default__",g=r.length>0,{t:b}=qe();return m.jsxs(en,{className:"gap-4 py-4",children:[m.jsxs(rn,{className:"px-4",children:[m.jsx(ln,{children:b("settingsPage.prompts.title")}),m.jsx(wn,{className:"hidden sm:block",children:b("settingsPage.prompts.description")})]}),m.jsxs(En,{className:"space-y-3 px-4",children:[m.jsxs("div",{className:"flex items-center justify-between gap-3",children:[m.jsx("div",{className:"text-muted-foreground text-xs",children:b("settingsPage.prompts.hint")}),m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(ea,{checked:e==="json",onCheckedChange:c}),m.jsx(ft,{className:"text-muted-foreground text-xs",children:b("settingsPage.common.jsonMode")})]})]}),e==="json"?m.jsxs("div",{className:"space-y-2",children:[m.jsx($o,{value:n,onChange:w=>u(w.target.value),className:"min-h-[200px] lg:min-h-[140px] max-h-[40vh] overflow-auto font-mono text-xs",placeholder:b("settingsPage.prompts.jsonPlaceholder")}),s?m.jsx(Sn,{variant:"warning",title:b("settingsPage.common.invalidJsonTitle"),description:s}):null]}):m.jsxs("div",{className:"space-y-2",children:[i.length===0?m.jsx("div",{className:"text-muted-foreground text-sm",children:b("settingsPage.prompts.emptyState")}):i.map(w=>{const E=w.model||y,C=E!==y&&!r.includes(E),A=!g&&!C;return m.jsxs("div",{className:"grid gap-2 rounded-lg border p-3",children:[m.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[m.jsxs(aa,{value:E,onValueChange:T=>h(w.id,{model:T===y?"":T}),disabled:A,children:[m.jsx(ia,{className:"min-w-[220px]",children:m.jsx(sa,{placeholder:b(g?"settingsPage.common.selectModelPlaceholder":"settingsPage.common.noModelsAvailable")})}),m.jsxs(oa,{children:[m.jsx(De,{value:y,children:b("settingsPage.common.defaultOption")}),C?m.jsx(De,{value:E,children:b("settingsPage.common.customModel",{value:E})}):null,r.map(T=>m.jsx(De,{value:T,children:T},T))]})]}),m.jsx(pt,{type:"button",variant:"outline",size:"sm",onClick:()=>f(w.id),children:b("settingsPage.common.remove")})]}),m.jsx($o,{value:w.prompt,onChange:T=>h(w.id,{prompt:T.target.value}),className:"min-h-[120px] lg:min-h-[96px] max-h-[30vh] overflow-auto font-mono text-xs",placeholder:b("settingsPage.prompts.promptPlaceholder")}),m.jsx("div",{className:"text-muted-foreground text-xs",children:b("settingsPage.prompts.itemHint")})]},w.id)}),m.jsx(pt,{type:"button",variant:"outline",size:"sm",onClick:d,children:b("settingsPage.prompts.addButton")})]})]})]})}function k6({allowOriginalModelNamesForAliases:e,mode:n,onToggleMode:s}){const{t:i}=qe(),r=i(e?"settingsPage.common.allow":"settingsPage.common.block");return m.jsxs("div",{className:"flex items-center justify-between gap-3",children:[m.jsx("div",{className:"text-muted-foreground text-xs",children:i("settingsPage.aliases.defaultBehaviorHint",{behavior:r})}),m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(ea,{checked:n==="json",onCheckedChange:s}),m.jsx(ft,{className:"text-muted-foreground text-xs",children:i("settingsPage.common.jsonMode")})]})]})}function L6({json:e,jsonIssue:n,onJsonChange:s}){const{t:i}=qe();return m.jsxs("div",{className:"space-y-2",children:[m.jsx($o,{value:e,onChange:r=>s(r.target.value),className:"min-h-[160px] lg:min-h-[120px] max-h-[36vh] overflow-auto font-mono text-xs",placeholder:i("settingsPage.aliases.jsonPlaceholder")}),n?m.jsx(Sn,{variant:"warning",title:i("settingsPage.common.invalidJsonTitle"),description:n}):null]})}function z6({item:e,models:n,emptyTargetValue:s,allowOriginalDefaultValue:i,hasModels:r,onUpdateItem:c,onRemoveItem:u}){const{t:d}=qe(),f=e.target||s,h=f!==s&&!n.includes(f),y=!r&&!h,g=e.allowOriginal===void 0?i:e.allowOriginal?"allow":"block";return m.jsx("div",{className:"grid gap-2 rounded-lg border p-3",children:m.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[m.jsx(mt,{className:"min-w-[180px]",placeholder:d("settingsPage.aliases.aliasPlaceholder"),value:e.alias,onChange:b=>c(e.id,{alias:b.target.value})}),m.jsxs(aa,{value:f,onValueChange:b=>c(e.id,{target:b===s?"":b}),disabled:y,children:[m.jsx(ia,{className:"min-w-[220px]",children:m.jsx(sa,{placeholder:d(r?"settingsPage.aliases.selectTargetPlaceholder":"settingsPage.common.noModelsAvailable")})}),m.jsxs(oa,{children:[m.jsx(De,{value:s,children:d("settingsPage.aliases.selectOption")}),h?m.jsx(De,{value:f,children:d("settingsPage.common.customModel",{value:f})}):null,n.map(b=>m.jsx(De,{value:b,children:b},b))]})]}),m.jsxs(aa,{value:g,onValueChange:b=>c(e.id,{allowOriginal:b===i?void 0:b==="allow"}),children:[m.jsx(ia,{className:"min-w-[200px]",children:m.jsx(sa,{placeholder:d("settingsPage.aliases.originalModelPlaceholder")})}),m.jsxs(oa,{children:[m.jsx(De,{value:i,children:d("settingsPage.aliases.useDefault")}),m.jsx(De,{value:"allow",children:d("settingsPage.aliases.allowOriginal")}),m.jsx(De,{value:"block",children:d("settingsPage.aliases.blockOriginal")})]})]}),m.jsx(pt,{type:"button",variant:"outline",size:"sm",onClick:()=>u(e.id),children:d("settingsPage.common.remove")})]})})}function V6({items:e,models:n,emptyTargetValue:s,allowOriginalDefaultValue:i,hasModels:r,onAddItem:c,onRemoveItem:u,onUpdateItem:d}){const{t:f}=qe();return m.jsxs("div",{className:"space-y-2",children:[e.length===0?m.jsx("div",{className:"text-muted-foreground text-sm",children:f("settingsPage.aliases.emptyState")}):e.map(h=>m.jsx(z6,{item:h,models:n,emptyTargetValue:s,allowOriginalDefaultValue:i,hasModels:r,onUpdateItem:d,onRemoveItem:u},h.id)),m.jsx(pt,{type:"button",variant:"outline",size:"sm",onClick:c,children:f("settingsPage.aliases.addButton")})]})}function B6({allowOriginalModelNamesForAliases:e,mode:n,json:s,jsonIssue:i,items:r,models:c,onToggleMode:u,onJsonChange:d,onAddItem:f,onRemoveItem:h,onUpdateItem:y}){const g="__target__",b="__allow_original_default__",w=c.length>0,{t:E}=qe();return m.jsxs(en,{className:"gap-4 py-4",children:[m.jsxs(rn,{className:"px-4",children:[m.jsx(ln,{children:E("settingsPage.aliases.title")}),m.jsx(wn,{className:"hidden sm:block",children:E("settingsPage.aliases.description")})]}),m.jsxs(En,{className:"space-y-3 px-4",children:[m.jsx(k6,{allowOriginalModelNamesForAliases:e,mode:n,onToggleMode:u}),n==="json"?m.jsx(L6,{json:s,jsonIssue:i,onJsonChange:d}):m.jsx(V6,{items:r,models:c,emptyTargetValue:g,allowOriginalDefaultValue:b,hasModels:w,onAddItem:f,onRemoveItem:h,onUpdateItem:y})]})]})}function U6({loadBalancingEnabled:e,modelRefreshIntervalInput:n,modelRefreshIntervalIssue:s,allowOriginalModelNamesForAliases:i,useFunctionApplyPatch:r,forceAgent:c,compactUseSmallModel:u,messageStartInputTokensFallback:d,useMessagesApi:f,responsesApiContextManagementModelsValue:h,onToggleLoadBalancing:y,onModelRefreshIntervalChange:g,onToggleAllowOriginalModelNamesForAliases:b,onToggleUseFunctionApplyPatch:w,onToggleForceAgent:E,onToggleCompactUseSmallModel:C,onToggleMessageStartInputTokensFallback:A,onToggleUseMessagesApi:T,onResponsesApiContextManagementModelsChange:N}){const{t:R}=qe();return m.jsxs(en,{className:"gap-4 py-4",children:[m.jsxs(rn,{className:"px-4",children:[m.jsx(ln,{children:R("settingsPage.advanced.title")}),m.jsx(wn,{className:"hidden sm:block",children:R("settingsPage.advanced.description")})]}),m.jsxs(En,{className:"space-y-3 px-4",children:[m.jsxs("div",{className:"flex items-center justify-between gap-4",children:[m.jsxs("div",{className:"space-y-1",children:[m.jsx("div",{className:"text-sm font-medium",children:R("settingsPage.loadBalancing.freeModelLabel")}),m.jsx("div",{className:"text-muted-foreground text-xs",children:R("settingsPage.loadBalancing.freeModelHint")})]}),m.jsx(ea,{checked:e,onCheckedChange:y})]}),m.jsxs("div",{className:"grid gap-2",children:[m.jsx(ft,{className:"text-muted-foreground text-xs",children:R("settingsPage.advanced.modelRefreshIntervalLabel")}),m.jsx(mt,{type:"number",min:"0",step:"0.5",value:n,onChange:_=>g(_.target.value)}),m.jsx("div",{className:"text-muted-foreground text-xs",children:R("settingsPage.advanced.modelRefreshIntervalHint")}),s?m.jsx("div",{className:"text-destructive text-xs",children:s}):null]}),m.jsxs("div",{className:"flex items-center justify-between gap-4",children:[m.jsxs("div",{className:"space-y-1",children:[m.jsx("div",{className:"text-sm font-medium",children:R("settingsPage.advanced.allowOriginalModelNamesLabel")}),m.jsx("div",{className:"text-muted-foreground text-xs",children:R("settingsPage.advanced.allowOriginalModelNamesHint")})]}),m.jsx(ea,{checked:i,onCheckedChange:b})]}),m.jsxs("div",{className:"flex items-center justify-between gap-4",children:[m.jsxs("div",{className:"space-y-1",children:[m.jsx("div",{className:"text-sm font-medium",children:R("settingsPage.advanced.useFunctionApplyPatchLabel")}),m.jsx("div",{className:"text-muted-foreground text-xs",children:R("settingsPage.advanced.useFunctionApplyPatchHint")})]}),m.jsx(ea,{checked:r,onCheckedChange:w})]}),m.jsxs("div",{className:"flex items-center justify-between gap-4",children:[m.jsxs("div",{className:"space-y-1",children:[m.jsx("div",{className:"text-sm font-medium",children:R("settingsPage.advanced.forceAgentLabel")}),m.jsx("div",{className:"text-muted-foreground text-xs",children:R("settingsPage.advanced.forceAgentHint")})]}),m.jsx(ea,{checked:c,onCheckedChange:E})]}),m.jsxs("div",{className:"flex items-center justify-between gap-4",children:[m.jsxs("div",{className:"space-y-1",children:[m.jsx("div",{className:"text-sm font-medium",children:R("settingsPage.advanced.compactUseSmallModelLabel")}),m.jsx("div",{className:"text-muted-foreground text-xs",children:R("settingsPage.advanced.compactUseSmallModelHint")})]}),m.jsx(ea,{checked:u,onCheckedChange:C})]}),m.jsxs("div",{className:"flex items-center justify-between gap-4",children:[m.jsxs("div",{className:"space-y-1",children:[m.jsx("div",{className:"text-sm font-medium",children:R("settingsPage.advanced.messageStartInputTokensFallbackLabel")}),m.jsx("div",{className:"text-muted-foreground text-xs",children:R("settingsPage.advanced.messageStartInputTokensFallbackHint")})]}),m.jsx(ea,{checked:d,onCheckedChange:A})]}),m.jsxs("div",{className:"flex items-center justify-between gap-4",children:[m.jsxs("div",{className:"space-y-1",children:[m.jsx("div",{className:"text-sm font-medium",children:R("settingsPage.advanced.useMessagesApiLabel")}),m.jsx("div",{className:"text-muted-foreground text-xs",children:R("settingsPage.advanced.useMessagesApiHint")})]}),m.jsx(ea,{checked:f,onCheckedChange:T})]}),m.jsxs("div",{className:"grid gap-2",children:[m.jsx(ft,{className:"text-muted-foreground text-xs",children:R("settingsPage.advanced.responsesApiContextManagementModelsLabel")}),m.jsx($o,{autoComplete:"off",placeholder:R("settingsPage.advanced.responsesApiContextManagementModelsPlaceholder"),value:h,onChange:_=>N(_.target.value),className:"min-h-[96px] font-mono text-xs"}),m.jsx("div",{className:"text-muted-foreground text-xs",children:R("settingsPage.advanced.responsesApiContextManagementModelsHint")})]})]})]})}function H6({providerId:e,item:n,onRemoveModel:s,onUpdateModel:i}){const{t:r}=qe();return m.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[m.jsx(mt,{className:"min-w-[180px]",placeholder:r("settingsPage.advanced.providersModelIdPlaceholder"),value:n.model,onChange:c=>i(e,n.id,{model:c.target.value})}),m.jsx(mt,{className:"w-28",type:"number",step:"0.1",min:"0",placeholder:"temperature",value:n.temperature,onChange:c=>i(e,n.id,{temperature:c.target.value})}),m.jsx(mt,{className:"w-28",type:"number",step:"0.01",min:"0",placeholder:"topP",value:n.topP,onChange:c=>i(e,n.id,{topP:c.target.value})}),m.jsx(mt,{className:"w-28",type:"number",step:"1",min:"0",placeholder:"topK",value:n.topK,onChange:c=>i(e,n.id,{topK:c.target.value})}),m.jsx(pt,{type:"button",variant:"outline",size:"sm",onClick:()=>s(e,n.id),children:r("settingsPage.common.remove")})]})}function I6({item:e,onRemoveProvider:n,onUpdateProvider:s,onAddModel:i,onRemoveModel:r,onUpdateModel:c}){const{t:u}=qe();return m.jsxs("div",{className:"grid gap-3 rounded-lg border p-3",children:[m.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[m.jsx(mt,{className:"min-w-[200px]",placeholder:u("settingsPage.advanced.providersNamePlaceholder"),value:e.name,onChange:d=>s(e.id,{name:d.target.value})}),m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(ea,{checked:e.enabled,onCheckedChange:d=>s(e.id,{enabled:d})}),m.jsx(ft,{className:"text-muted-foreground text-xs",children:u("settingsPage.advanced.providersEnabledLabel")})]}),m.jsx(pt,{type:"button",variant:"outline",size:"sm",onClick:()=>n(e.id),children:u("settingsPage.common.remove")})]}),m.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[m.jsxs("div",{className:"grid gap-2",children:[m.jsx(ft,{className:"text-muted-foreground text-xs",children:u("settingsPage.advanced.providersBaseUrlLabel")}),m.jsx(mt,{autoComplete:"off",placeholder:u("settingsPage.advanced.providersBaseUrlPlaceholder"),value:e.baseUrl,onChange:d=>s(e.id,{baseUrl:d.target.value})})]}),m.jsxs("div",{className:"grid gap-2",children:[m.jsx(ft,{className:"text-muted-foreground text-xs",children:u("settingsPage.advanced.providersApiKeyLabel")}),m.jsx(mt,{type:"password",autoComplete:"off",placeholder:u("settingsPage.advanced.providersApiKeyPlaceholder"),value:e.apiKey,onChange:d=>s(e.id,{apiKey:d.target.value})})]})]}),m.jsxs("div",{className:"space-y-2",children:[m.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[m.jsx("div",{className:"text-sm font-medium",children:u("settingsPage.advanced.providersModelsLabel")}),m.jsx(pt,{type:"button",variant:"outline",size:"sm",onClick:()=>i(e.id),children:u("settingsPage.advanced.providersAddModel")})]}),e.models.length===0?m.jsx("div",{className:"text-muted-foreground text-xs",children:u("settingsPage.advanced.providersModelsEmptyState")}):e.models.map(d=>m.jsx(H6,{providerId:e.id,item:d,onUpdateModel:c,onRemoveModel:r},d.id))]})]})}function F6({items:e,issue:n,onAddProvider:s,onRemoveProvider:i,onUpdateProvider:r,onAddModel:c,onRemoveModel:u,onUpdateModel:d}){const{t:f}=qe();return m.jsxs(en,{className:"gap-4 py-4",children:[m.jsxs(rn,{className:"px-4",children:[m.jsx(ln,{children:f("settingsPage.advanced.providersTitle")}),m.jsx(wn,{className:"hidden sm:block",children:f("settingsPage.advanced.providersDescription")})]}),m.jsxs(En,{className:"space-y-3 px-4",children:[n?m.jsx(Sn,{variant:"warning",title:f("settingsPage.advanced.providersIssueTitle"),description:n}):null,e.length===0?m.jsx("div",{className:"text-muted-foreground text-sm",children:f("settingsPage.advanced.providersEmptyState")}):e.map(h=>m.jsx(I6,{item:h,onRemoveProvider:i,onUpdateProvider:r,onAddModel:c,onRemoveModel:u,onUpdateModel:d},h.id)),m.jsx(pt,{type:"button",variant:"outline",size:"sm",onClick:s,children:f("settingsPage.advanced.providersAddProvider")})]})]})}function q6(){const{t:e}=qe(),[n,s]=x.useState(!1),[i,r]=x.useState(!1),[c,u]=x.useState(null),[d,f]=x.useState(null),[h,y]=x.useState([]),[g,b]=x.useState({}),[w,E]=x.useState(""),[C,A]=x.useState(null),[T,N]=x.useState(""),R=R6(fe=>b(be=>({...be,extraPrompts:fe}))),_=M6(fe=>b(be=>({...be,modelReasoningEfforts:fe}))),M=_6(fe=>b(be=>({...be,modelAliases:fe}))),U=T6(fe=>b(be=>({...be,providers:fe}))),{mode:L,items:O,json:K,jsonIssue:Z,onToggleMode:J,onJsonChange:se,onAddItem:I,onRemoveItem:ne,onUpdateItem:le,setFromRecord:D}=R,{mode:H,items:V,json:oe,jsonIssue:ue,onToggleMode:P,onJsonChange:X,onAddItem:G,onRemoveItem:te,onUpdateItem:ce,setFromRecord:me}=_,{mode:ae,items:de,json:we,jsonIssue:Te,onToggleMode:Ne,onJsonChange:_e,onAddItem:vt,onRemoveItem:ot,onUpdateItem:jn,setFromRecord:Gt}=M,{items:nn,issue:Ea,onAddProvider:Ht,onRemoveProvider:Ua,onUpdateProvider:Ha,onAddModel:Mt,onRemoveModel:Un,onUpdateModel:_t,setFromRecord:bs}=U,dn=x.useCallback(fe=>{const{_configPath:be,...wt}=fe,ri=up(wt.modelAliases),Dl=Su(ri),Pl=d1(wt),Es=wt.modelRefreshIntervalHours;f(be??null),b({...wt,auth:{apiKeys:Pl},modelAliases:Dl}),D(wt.extraPrompts),me(wt.modelReasoningEfforts),Gt(Dl),bs(wt.providers),E(typeof Es=="number"?String(Es):""),A(null),N(wt.responsesApiContextManagementModels?.join(`
56
- `)??"")},[D,me,Gt,bs,E,A,N]),la=x.useCallback(async()=>{s(!0),u(null);try{const[fe,be]=await Promise.allSettled([g4(),y4()]);if(fe.status==="fulfilled")dn(fe.value);else throw fe.reason;be.status==="fulfilled"?y(be.value.items??[]):(y([]),Wt.error(st.t("settingsPage.toast.loadModelsFailed"),{description:be.reason instanceof Error?be.reason.message:String(be.reason)}))}catch(fe){const be=fe instanceof gs?fe.message:String(fe);u(be),Wt.error(st.t("settingsPage.toast.loadConfigFailed"),{description:be})}finally{s(!1)}},[dn]);x.useEffect(()=>{la()},[la]);const Hn=x.useCallback(async()=>{r(!0),u(null);try{const fe=await v4(g);dn(fe),Wt.success(st.t("settingsPage.toast.configSaved"))}catch(fe){const be=fe instanceof gs?fe.message:String(fe);u(be),Wt.error(st.t("settingsPage.toast.saveConfigFailed"),{description:be})}finally{r(!1)}},[dn,g]),Ia=x.useCallback(()=>{la()},[la]),Nn=x.useCallback(()=>{Hn()},[Hn]),Ss=x.useCallback(fe=>{b(be=>({...be,smallModel:fe==="__default__"?"":fe}))},[b]),In=x.useCallback(fe=>{b(be=>({...be,smallModel:fe}))},[b]),ca=x.useCallback(fe=>{const be=x6(fe);b(wt=>({...wt,auth:{apiKeys:be},apiKey:void 0}))},[b]),Ot=x.useCallback(fe=>{b(be=>({...be,anthropicApiKey:fe}))},[b]),an=x.useCallback(fe=>{b(be=>({...be,freeModelLoadBalancing:fe}))},[b]),bt=x.useCallback(fe=>{E(fe);const be=fe.trim();if(!be){A(null),b(ri=>({...ri,modelRefreshIntervalHours:void 0}));return}const wt=Number(be);if(!Number.isFinite(wt)||wt<0){A(e("settingsPage.advanced.modelRefreshIntervalError"));return}A(null),b(ri=>({...ri,modelRefreshIntervalHours:wt}))},[b,E,A,e]),oi=x.useCallback(fe=>{b(be=>({...be,allowOriginalModelNamesForAliases:fe}))},[b]),lt=x.useCallback(fe=>{b(be=>({...be,useFunctionApplyPatch:fe}))},[b]),fn=x.useCallback(fe=>{b(be=>({...be,forceAgent:fe}))},[b]),sn=x.useCallback(fe=>{b(be=>({...be,compactUseSmallModel:fe}))},[b]),hn=x.useCallback(fe=>{b(be=>({...be,messageStartInputTokensFallback:fe}))},[b]),ua=x.useCallback(fe=>{b(be=>({...be,useMessagesApi:fe}))},[b]),ct=x.useCallback(fe=>{N(fe);const be=QT(fe);b(wt=>({...wt,responsesApiContextManagementModels:be}))},[b,N]),Ce=h.length>0,Qe=g.smallModel?g.smallModel:"__default__",St=!i&&!n&&!(L==="json"&&Z)&&!(H==="json"&&ue)&&!(ae==="json"&&Te)&&!C&&!Ea,Vt=e("settingsPage.general.legacyAuthNote",{env:"COPILOT_API_KEY"}),Ca=e(Ce?"settingsPage.general.smallModel":"settingsPage.general.smallModelManual"),et=g.smallModel??"",Xt=d1(g).join(`
57
- `),Fa=g.anthropicApiKey??"",Zt=e("settingsPage.general.anthropicApiKeyEnvNote",{env:"ANTHROPIC_API_KEY"}),Qt=g.freeModelLoadBalancing??!0,ws=g.allowOriginalModelNamesForAliases??!1,Rn=g.useFunctionApplyPatch??!0,sr=g.forceAgent??!1,Ol=g.compactUseSmallModel??!0,Ta=g.messageStartInputTokensFallback??!1,Dt=g.useMessagesApi??!0;return{loading:n,saving:i,error:c,configPath:d,canSave:St,onReload:Ia,onSave:Nn,hasModels:Ce,smallModelLabel:Ca,smallModelValue:Qe,smallModelInputValue:et,models:h,authApiKeysValue:Xt,anthropicApiKeyValue:Fa,legacyAuthNote:Vt,anthropicApiKeyEnvNote:Zt,onSmallModelSelect:Ss,onSmallModelInput:In,onAuthApiKeysChange:ca,onAnthropicApiKeyChange:Ot,loadBalancingEnabled:Qt,onLoadBalancingToggle:an,modelRefreshIntervalInput:w,modelRefreshIntervalIssue:C,onModelRefreshIntervalChange:bt,allowOriginalModelNamesForAliases:ws,reasoningMode:H,reasoningJson:oe,reasoningJsonIssue:ue,reasoningItems:V,onReasoningToggleMode:P,onReasoningJsonChange:X,onReasoningAddItem:G,onReasoningRemoveItem:te,onReasoningUpdateItem:ce,extraMode:L,extraJson:K,extraJsonIssue:Z,extraItems:O,onExtraToggleMode:J,onExtraJsonChange:se,onExtraAddItem:I,onExtraRemoveItem:ne,onExtraUpdateItem:le,aliasMode:ae,aliasJson:we,aliasJsonIssue:Te,aliasItems:de,onAliasToggleMode:Ne,onAliasJsonChange:_e,onAliasAddItem:vt,onAliasRemoveItem:ot,onAliasUpdateItem:jn,useFunctionApplyPatch:Rn,forceAgent:sr,compactUseSmallModel:Ol,messageStartInputTokensFallback:Ta,useMessagesApi:Dt,responsesApiContextManagementModelsValue:T,onUseMessagesApiToggle:ua,onResponsesApiContextManagementModelsChange:ct,providersItems:nn,providersIssue:Ea,onProvidersAddProvider:Ht,onProvidersRemoveProvider:Ua,onProvidersUpdateProvider:Ha,onProvidersAddModel:Mt,onProvidersRemoveModel:Un,onProvidersUpdateModel:_t,onAllowOriginalModelNamesForAliasesToggle:oi,onUseFunctionApplyPatchToggle:lt,onForceAgentToggle:fn,onCompactUseSmallModelToggle:sn,onMessageStartInputTokensFallbackToggle:hn}}function $6({loading:e,saving:n,error:s,configPath:i,canSave:r,onReload:c,onSave:u,hasModels:d,smallModelLabel:f,smallModelValue:h,smallModelInputValue:y,models:g,authApiKeysValue:b,anthropicApiKeyValue:w,legacyAuthNote:E,anthropicApiKeyEnvNote:C,onSmallModelSelect:A,onSmallModelInput:T,onAuthApiKeysChange:N,onAnthropicApiKeyChange:R,loadBalancingEnabled:_,onLoadBalancingToggle:M,modelRefreshIntervalInput:U,modelRefreshIntervalIssue:L,onModelRefreshIntervalChange:O,reasoningMode:K,reasoningJson:Z,reasoningJsonIssue:J,reasoningItems:se,onReasoningToggleMode:I,onReasoningJsonChange:ne,onReasoningAddItem:le,onReasoningRemoveItem:D,onReasoningUpdateItem:H,extraMode:V,extraJson:oe,extraJsonIssue:ue,extraItems:P,onExtraToggleMode:X,onExtraJsonChange:G,onExtraAddItem:te,onExtraRemoveItem:ce,onExtraUpdateItem:me,aliasMode:ae,aliasJson:de,aliasJsonIssue:we,aliasItems:Te,onAliasToggleMode:Ne,onAliasJsonChange:_e,onAliasAddItem:vt,onAliasRemoveItem:ot,onAliasUpdateItem:jn,allowOriginalModelNamesForAliases:Gt,useFunctionApplyPatch:nn,forceAgent:Ea,compactUseSmallModel:Ht,messageStartInputTokensFallback:Ua,useMessagesApi:Ha,responsesApiContextManagementModelsValue:Mt,onUseMessagesApiToggle:Un,onResponsesApiContextManagementModelsChange:_t,providersItems:bs,providersIssue:dn,onProvidersAddProvider:la,onProvidersRemoveProvider:Hn,onProvidersUpdateProvider:Ia,onProvidersAddModel:Nn,onProvidersRemoveModel:Ss,onProvidersUpdateModel:In,onAllowOriginalModelNamesForAliasesToggle:ca,onUseFunctionApplyPatchToggle:Ot,onForceAgentToggle:an,onCompactUseSmallModelToggle:bt,onMessageStartInputTokensFallbackToggle:oi}){const{t:lt}=qe(),fn=x.useMemo(()=>[{id:"general",label:lt("settingsPage.sections.general")},{id:"reasoning",label:lt("settingsPage.sections.reasoning")},{id:"aliases",label:lt("settingsPage.sections.aliases")},{id:"prompts",label:lt("settingsPage.sections.prompts")},{id:"advanced",label:lt("settingsPage.sections.advanced")}],[lt]),{activeSection:sn,registerSection:hn,scrollToSection:ua}=p6({sectionIds:[...v6]});return m.jsxs("div",{className:"space-y-4",children:[m.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[m.jsxs("div",{className:"min-w-0",children:[m.jsx("div",{className:"text-lg font-semibold",children:lt("nav.settings")}),m.jsx("div",{className:"text-muted-foreground text-sm",children:lt("settingsPage.subtitle")})]}),m.jsxs("div",{className:"ml-auto flex flex-col items-end gap-1 text-right",children:[m.jsx("div",{className:"flex flex-wrap items-center gap-2",children:m.jsx(pt,{type:"button",variant:"outline",size:"sm",onClick:c,disabled:e||n,children:lt(e?"common.refreshing":"common.refresh")})}),i?m.jsx("div",{className:"text-muted-foreground text-xs leading-tight hidden sm:block",children:lt("settingsPage.configPath",{path:i})}):null,m.jsx("div",{className:"text-muted-foreground text-xs leading-tight hidden sm:block",children:lt("settingsPage.note")})]})]}),s?m.jsx(Sn,{variant:"error",title:lt("settingsPage.errorTitle"),description:s,actionLabel:lt("common.retry"),onAction:c}):null,m.jsxs("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-12",children:[m.jsx("aside",{className:"hidden lg:block lg:col-span-2",children:m.jsx(m6,{sections:fn,activeSection:sn,onSectionClick:ua})}),m.jsxs("main",{className:"space-y-6 lg:col-span-10",children:[m.jsx(Po,{id:"general",isActive:sn==="general",ref:ct=>hn("general",ct),children:m.jsx(O6,{hasModels:d,smallModelLabel:f,smallModelValue:h,smallModelInputValue:y,models:g,authApiKeysValue:b,anthropicApiKeyValue:w,legacyAuthNote:E,anthropicApiKeyEnvNote:C,onSmallModelSelect:A,onSmallModelInput:T,onAuthApiKeysChange:N,onAnthropicApiKeyChange:R})}),m.jsx(Po,{id:"reasoning",isActive:sn==="reasoning",ref:ct=>hn("reasoning",ct),children:m.jsx(D6,{mode:K,json:Z,jsonIssue:J,items:se,models:g,onToggleMode:I,onJsonChange:ne,onAddItem:le,onRemoveItem:D,onUpdateItem:H})}),m.jsx(Po,{id:"aliases",isActive:sn==="aliases",ref:ct=>hn("aliases",ct),children:m.jsx(B6,{allowOriginalModelNamesForAliases:Gt,mode:ae,json:de,jsonIssue:we,items:Te,models:g,onToggleMode:Ne,onJsonChange:_e,onAddItem:vt,onRemoveItem:ot,onUpdateItem:jn})}),m.jsx(Po,{id:"prompts",isActive:sn==="prompts",ref:ct=>hn("prompts",ct),children:m.jsx(P6,{mode:V,json:oe,jsonIssue:ue,items:P,models:g,onToggleMode:X,onJsonChange:G,onAddItem:te,onRemoveItem:ce,onUpdateItem:me})}),m.jsx(Po,{id:"advanced",isActive:sn==="advanced",ref:ct=>hn("advanced",ct),children:m.jsxs("div",{className:"space-y-6",children:[m.jsx(U6,{loadBalancingEnabled:_,modelRefreshIntervalInput:U,modelRefreshIntervalIssue:L,allowOriginalModelNamesForAliases:Gt,useFunctionApplyPatch:nn,forceAgent:Ea,compactUseSmallModel:Ht,messageStartInputTokensFallback:Ua,useMessagesApi:Ha,responsesApiContextManagementModelsValue:Mt,onToggleLoadBalancing:M,onModelRefreshIntervalChange:O,onToggleAllowOriginalModelNamesForAliases:ca,onToggleUseFunctionApplyPatch:Ot,onToggleForceAgent:an,onToggleCompactUseSmallModel:bt,onToggleMessageStartInputTokensFallback:oi,onToggleUseMessagesApi:Un,onResponsesApiContextManagementModelsChange:_t}),m.jsx(F6,{items:bs,issue:dn,onAddProvider:la,onRemoveProvider:Hn,onUpdateProvider:Ia,onAddModel:Nn,onRemoveModel:Ss,onUpdateModel:In})]})})]})]}),m.jsx(h6,{saving:n,canSave:r,onSave:u})]})}function K6(){const e=q6();return m.jsx($6,{...e})}function Y6(){return m.jsx(SR,{children:m.jsxs(cs,{element:m.jsx(V4,{}),children:[m.jsx(cs,{path:"/",element:m.jsx(yR,{to:"/accounts",replace:!0})}),m.jsx(cs,{path:"/accounts",element:m.jsx(RB,{})}),m.jsx(cs,{path:"/requests",element:m.jsx(f6,{})}),m.jsx(cs,{path:"/models",element:m.jsx(kB,{})}),m.jsx(cs,{path:"/settings",element:m.jsx(K6,{})}),m.jsx(cs,{path:"/request/:requestId",element:m.jsx(HB,{})}),m.jsx(cs,{path:"*",element:m.jsx(LB,{})})]})})}const G6=({...e})=>{const{resolvedTheme:n}=V1(),s=n==="dark"?"dark":n==="light"?"light":"system";return m.jsx(u4,{theme:s,className:"toaster group",icons:{success:m.jsx(J1,{className:"size-4"}),info:m.jsx(W1,{className:"size-4"}),warning:m.jsx(tw,{className:"size-4"}),error:m.jsx(ew,{className:"size-4"}),loading:m.jsx(p_,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},...e})},eA=document.querySelector("#root");if(!eA)throw new Error("Root element not found");xN.createRoot(eA).render(m.jsx(x.StrictMode,{children:m.jsx(iM,{attribute:"class",defaultTheme:"system",enableSystem:!0,children:m.jsx(fP,{children:m.jsx(d4,{children:m.jsxs(A_,{children:[m.jsx(KR,{children:m.jsx(Y6,{})}),m.jsx(G6,{})]})})})})}));