ldrouter 1.5.1

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 (64) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/LICENSE +21 -0
  3. package/README.md +101 -0
  4. package/dist/cli.js +13 -0
  5. package/dist/server/app.js +138 -0
  6. package/dist/server/auth/api-key.js +75 -0
  7. package/dist/server/auth/crypto.js +94 -0
  8. package/dist/server/auth/ids.js +40 -0
  9. package/dist/server/auth/middleware.js +36 -0
  10. package/dist/server/auth/recovery.js +11 -0
  11. package/dist/server/caching/store.js +119 -0
  12. package/dist/server/config/index.js +96 -0
  13. package/dist/server/db/index.js +64 -0
  14. package/dist/server/db/migrate.js +408 -0
  15. package/dist/server/db/repositories/audit.js +75 -0
  16. package/dist/server/db/repositories/settings.js +63 -0
  17. package/dist/server/db/schema.js +396 -0
  18. package/dist/server/errors.js +65 -0
  19. package/dist/server/gateway/runner.js +745 -0
  20. package/dist/server/logging/logger.js +35 -0
  21. package/dist/server/maintenance/retention.js +48 -0
  22. package/dist/server/metrics/registry.js +169 -0
  23. package/dist/server/protocols/anthropic.js +154 -0
  24. package/dist/server/protocols/canonical.js +201 -0
  25. package/dist/server/providers/index.js +89 -0
  26. package/dist/server/routes/admin/aliases.js +98 -0
  27. package/dist/server/routes/admin/api-keys.js +194 -0
  28. package/dist/server/routes/admin/audit.js +19 -0
  29. package/dist/server/routes/admin/auth.js +124 -0
  30. package/dist/server/routes/admin/backup.js +113 -0
  31. package/dist/server/routes/admin/combos.js +198 -0
  32. package/dist/server/routes/admin/dashboard.js +55 -0
  33. package/dist/server/routes/admin/models.js +178 -0
  34. package/dist/server/routes/admin/providers.js +212 -0
  35. package/dist/server/routes/admin/requests.js +156 -0
  36. package/dist/server/routes/admin/settings.js +197 -0
  37. package/dist/server/routes/admin/setup.js +80 -0
  38. package/dist/server/routes/admin/stats.js +180 -0
  39. package/dist/server/routes/admin.js +39 -0
  40. package/dist/server/routes/gateway/anthropic.js +112 -0
  41. package/dist/server/routes/gateway/openai.js +257 -0
  42. package/dist/server/routes/gateway.js +7 -0
  43. package/dist/server/routes/health.js +27 -0
  44. package/dist/server/routing/capabilities.js +52 -0
  45. package/dist/server/routing/circuit.js +37 -0
  46. package/dist/server/routing/combo.js +100 -0
  47. package/dist/server/routing/quota.js +51 -0
  48. package/dist/server/routing/ratelimit.js +58 -0
  49. package/dist/server/routing/resolver.js +43 -0
  50. package/dist/server/security/redact.js +111 -0
  51. package/dist/server/selfupdate/index.js +154 -0
  52. package/dist/server/upstream/client.js +179 -0
  53. package/dist/server/util/cidr.js +91 -0
  54. package/dist/server/util/client-ip.js +15 -0
  55. package/dist/server/util/stable-json.js +19 -0
  56. package/dist/shared/types.js +2 -0
  57. package/dist/web/assets/index-COSbvF8Z.css +1 -0
  58. package/dist/web/assets/index-DbnEzuxq.js +251 -0
  59. package/dist/web/favicon.png +0 -0
  60. package/dist/web/index.html +15 -0
  61. package/dist/web/logo.png +0 -0
  62. package/migrations/0001_initial_schema.sql +323 -0
  63. package/migrations/0002_source_api_key_secrets.sql +7 -0
  64. package/package.json +117 -0
@@ -0,0 +1,251 @@
1
+ var ey=a=>{throw TypeError(a)};var ty=(a,l,o)=>l.has(a)||ey("Cannot "+o);var Pt=(a,l,o)=>(ty(a,l,"read from private field"),o?o.call(a):l.get(a)),ny=(a,l,o)=>l.has(a)?ey("Cannot add the same private member more than once"):l instanceof WeakSet?l.add(a):l.set(a,o),nf=(a,l,o,i)=>(ty(a,l,"write to private field"),i?i.call(a,o):l.set(a,o),o);function Cw(a,l){for(var o=0;o<l.length;o++){const i=l[o];if(typeof i!="string"&&!Array.isArray(i)){for(const u in i)if(u!=="default"&&!(u in a)){const f=Object.getOwnPropertyDescriptor(i,u);f&&Object.defineProperty(a,u,f.get?f:{enumerable:!0,get:()=>i[u]})}}}return Object.freeze(Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}))}(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))i(u);new MutationObserver(u=>{for(const f of u)if(f.type==="childList")for(const h of f.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&i(h)}).observe(document,{childList:!0,subtree:!0});function o(u){const f={};return u.integrity&&(f.integrity=u.integrity),u.referrerPolicy&&(f.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?f.credentials="include":u.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function i(u){if(u.ep)return;u.ep=!0;const f=o(u);fetch(u.href,f)}})();function Wf(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var af={exports:{}},hi={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var ay;function Ew(){if(ay)return hi;ay=1;var a=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function o(i,u,f){var h=null;if(f!==void 0&&(h=""+f),u.key!==void 0&&(h=""+u.key),"key"in u){f={};for(var p in u)p!=="key"&&(f[p]=u[p])}else f=u;return u=f.ref,{$$typeof:a,type:i,key:h,ref:u!==void 0?u:null,props:f}}return hi.Fragment=l,hi.jsx=o,hi.jsxs=o,hi}var ly;function Rw(){return ly||(ly=1,af.exports=Ew()),af.exports}var s=Rw(),lf={exports:{}},Re={};/**
10
+ * @license React
11
+ * react.production.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var ry;function Tw(){if(ry)return Re;ry=1;var a=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),h=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),S=Symbol.for("react.activity"),b=Symbol.iterator;function x(M){return M===null||typeof M!="object"?null:(M=b&&M[b]||M["@@iterator"],typeof M=="function"?M:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,C={};function R(M,H,K){this.props=M,this.context=H,this.refs=C,this.updater=K||T}R.prototype.isReactComponent={},R.prototype.setState=function(M,H){if(typeof M!="object"&&typeof M!="function"&&M!=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,M,H,"setState")},R.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function A(){}A.prototype=R.prototype;function N(M,H,K){this.props=M,this.context=H,this.refs=C,this.updater=K||T}var _=N.prototype=new A;_.constructor=N,j(_,R.prototype),_.isPureReactComponent=!0;var P=Array.isArray;function q(){}var z={H:null,A:null,T:null,S:null},U=Object.prototype.hasOwnProperty;function ee(M,H,K){var B=K.ref;return{$$typeof:a,type:M,key:H,ref:B!==void 0?B:null,props:K}}function ae(M,H){return ee(M.type,H,M.props)}function oe(M){return typeof M=="object"&&M!==null&&M.$$typeof===a}function Z(M){var H={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(K){return H[K]})}var ie=/\/+/g;function se(M,H){return typeof M=="object"&&M!==null&&M.key!=null?Z(""+M.key):H.toString(36)}function he(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(q,q):(M.status="pending",M.then(function(H){M.status==="pending"&&(M.status="fulfilled",M.value=H)},function(H){M.status==="pending"&&(M.status="rejected",M.reason=H)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function k(M,H,K,B,ne){var de=typeof M;(de==="undefined"||de==="boolean")&&(M=null);var re=!1;if(M===null)re=!0;else switch(de){case"bigint":case"string":case"number":re=!0;break;case"object":switch(M.$$typeof){case a:case l:re=!0;break;case w:return re=M._init,k(re(M._payload),H,K,B,ne)}}if(re)return ne=ne(M),re=B===""?"."+se(M,0):B,P(ne)?(K="",re!=null&&(K=re.replace(ie,"$&/")+"/"),k(ne,H,K,"",function(De){return De})):ne!=null&&(oe(ne)&&(ne=ae(ne,K+(ne.key==null||M&&M.key===ne.key?"":(""+ne.key).replace(ie,"$&/")+"/")+re)),H.push(ne)),1;re=0;var ue=B===""?".":B+":";if(P(M))for(var ge=0;ge<M.length;ge++)B=M[ge],de=ue+se(B,ge),re+=k(B,H,K,de,ne);else if(ge=x(M),typeof ge=="function")for(M=ge.call(M),ge=0;!(B=M.next()).done;)B=B.value,de=ue+se(B,ge++),re+=k(B,H,K,de,ne);else if(de==="object"){if(typeof M.then=="function")return k(he(M),H,K,B,ne);throw H=String(M),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return re}function $(M,H,K){if(M==null)return M;var B=[],ne=0;return k(M,B,"","",function(de){return H.call(K,de,ne++)}),B}function te(M){if(M._status===-1){var H=M._result;H=H(),H.then(function(K){(M._status===0||M._status===-1)&&(M._status=1,M._result=K)},function(K){(M._status===0||M._status===-1)&&(M._status=2,M._result=K)}),M._status===-1&&(M._status=0,M._result=H)}if(M._status===1)return M._result.default;throw M._result}var J=typeof reportError=="function"?reportError:function(M){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M),error:M});if(!window.dispatchEvent(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",M);return}console.error(M)},W={map:$,forEach:function(M,H,K){$(M,function(){H.apply(this,arguments)},K)},count:function(M){var H=0;return $(M,function(){H++}),H},toArray:function(M){return $(M,function(H){return H})||[]},only:function(M){if(!oe(M))throw Error("React.Children.only expected to receive a single React element child.");return M}};return Re.Activity=S,Re.Children=W,Re.Component=R,Re.Fragment=o,Re.Profiler=u,Re.PureComponent=N,Re.StrictMode=i,Re.Suspense=v,Re.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=z,Re.__COMPILER_RUNTIME={__proto__:null,c:function(M){return z.H.useMemoCache(M)}},Re.cache=function(M){return function(){return M.apply(null,arguments)}},Re.cacheSignal=function(){return null},Re.cloneElement=function(M,H,K){if(M==null)throw Error("The argument must be a React element, but you passed "+M+".");var B=j({},M.props),ne=M.key;if(H!=null)for(de in H.key!==void 0&&(ne=""+H.key),H)!U.call(H,de)||de==="key"||de==="__self"||de==="__source"||de==="ref"&&H.ref===void 0||(B[de]=H[de]);var de=arguments.length-2;if(de===1)B.children=K;else if(1<de){for(var re=Array(de),ue=0;ue<de;ue++)re[ue]=arguments[ue+2];B.children=re}return ee(M.type,ne,B)},Re.createContext=function(M){return M={$$typeof:h,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null},M.Provider=M,M.Consumer={$$typeof:f,_context:M},M},Re.createElement=function(M,H,K){var B,ne={},de=null;if(H!=null)for(B in H.key!==void 0&&(de=""+H.key),H)U.call(H,B)&&B!=="key"&&B!=="__self"&&B!=="__source"&&(ne[B]=H[B]);var re=arguments.length-2;if(re===1)ne.children=K;else if(1<re){for(var ue=Array(re),ge=0;ge<re;ge++)ue[ge]=arguments[ge+2];ne.children=ue}if(M&&M.defaultProps)for(B in re=M.defaultProps,re)ne[B]===void 0&&(ne[B]=re[B]);return ee(M,de,ne)},Re.createRef=function(){return{current:null}},Re.forwardRef=function(M){return{$$typeof:p,render:M}},Re.isValidElement=oe,Re.lazy=function(M){return{$$typeof:w,_payload:{_status:-1,_result:M},_init:te}},Re.memo=function(M,H){return{$$typeof:g,type:M,compare:H===void 0?null:H}},Re.startTransition=function(M){var H=z.T,K={};z.T=K;try{var B=M(),ne=z.S;ne!==null&&ne(K,B),typeof B=="object"&&B!==null&&typeof B.then=="function"&&B.then(q,J)}catch(de){J(de)}finally{H!==null&&K.types!==null&&(H.types=K.types),z.T=H}},Re.unstable_useCacheRefresh=function(){return z.H.useCacheRefresh()},Re.use=function(M){return z.H.use(M)},Re.useActionState=function(M,H,K){return z.H.useActionState(M,H,K)},Re.useCallback=function(M,H){return z.H.useCallback(M,H)},Re.useContext=function(M){return z.H.useContext(M)},Re.useDebugValue=function(){},Re.useDeferredValue=function(M,H){return z.H.useDeferredValue(M,H)},Re.useEffect=function(M,H){return z.H.useEffect(M,H)},Re.useEffectEvent=function(M){return z.H.useEffectEvent(M)},Re.useId=function(){return z.H.useId()},Re.useImperativeHandle=function(M,H,K){return z.H.useImperativeHandle(M,H,K)},Re.useInsertionEffect=function(M,H){return z.H.useInsertionEffect(M,H)},Re.useLayoutEffect=function(M,H){return z.H.useLayoutEffect(M,H)},Re.useMemo=function(M,H){return z.H.useMemo(M,H)},Re.useOptimistic=function(M,H){return z.H.useOptimistic(M,H)},Re.useReducer=function(M,H,K){return z.H.useReducer(M,H,K)},Re.useRef=function(M){return z.H.useRef(M)},Re.useState=function(M){return z.H.useState(M)},Re.useSyncExternalStore=function(M,H,K){return z.H.useSyncExternalStore(M,H,K)},Re.useTransition=function(){return z.H.useTransition()},Re.version="19.2.8",Re}var oy;function eh(){return oy||(oy=1,lf.exports=Tw()),lf.exports}var m=eh();const le=Wf(m),ho=Cw({__proto__:null,default:le},[m]);var rf={exports:{}},mi={},of={exports:{}},sf={};/**
18
+ * @license React
19
+ * scheduler.production.js
20
+ *
21
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var iy;function Nw(){return iy||(iy=1,(function(a){function l(k,$){var te=k.length;k.push($);e:for(;0<te;){var J=te-1>>>1,W=k[J];if(0<u(W,$))k[J]=$,k[te]=W,te=J;else break e}}function o(k){return k.length===0?null:k[0]}function i(k){if(k.length===0)return null;var $=k[0],te=k.pop();if(te!==$){k[0]=te;e:for(var J=0,W=k.length,M=W>>>1;J<M;){var H=2*(J+1)-1,K=k[H],B=H+1,ne=k[B];if(0>u(K,te))B<W&&0>u(ne,K)?(k[J]=ne,k[B]=te,J=B):(k[J]=K,k[H]=te,J=H);else if(B<W&&0>u(ne,te))k[J]=ne,k[B]=te,J=B;else break e}}return $}function u(k,$){var te=k.sortIndex-$.sortIndex;return te!==0?te:k.id-$.id}if(a.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;a.unstable_now=function(){return f.now()}}else{var h=Date,p=h.now();a.unstable_now=function(){return h.now()-p}}var v=[],g=[],w=1,S=null,b=3,x=!1,T=!1,j=!1,C=!1,R=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;function _(k){for(var $=o(g);$!==null;){if($.callback===null)i(g);else if($.startTime<=k)i(g),$.sortIndex=$.expirationTime,l(v,$);else break;$=o(g)}}function P(k){if(j=!1,_(k),!T)if(o(v)!==null)T=!0,q||(q=!0,Z());else{var $=o(g);$!==null&&he(P,$.startTime-k)}}var q=!1,z=-1,U=5,ee=-1;function ae(){return C?!0:!(a.unstable_now()-ee<U)}function oe(){if(C=!1,q){var k=a.unstable_now();ee=k;var $=!0;try{e:{T=!1,j&&(j=!1,A(z),z=-1),x=!0;var te=b;try{t:{for(_(k),S=o(v);S!==null&&!(S.expirationTime>k&&ae());){var J=S.callback;if(typeof J=="function"){S.callback=null,b=S.priorityLevel;var W=J(S.expirationTime<=k);if(k=a.unstable_now(),typeof W=="function"){S.callback=W,_(k),$=!0;break t}S===o(v)&&i(v),_(k)}else i(v);S=o(v)}if(S!==null)$=!0;else{var M=o(g);M!==null&&he(P,M.startTime-k),$=!1}}break e}finally{S=null,b=te,x=!1}$=void 0}}finally{$?Z():q=!1}}}var Z;if(typeof N=="function")Z=function(){N(oe)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,se=ie.port2;ie.port1.onmessage=oe,Z=function(){se.postMessage(null)}}else Z=function(){R(oe,0)};function he(k,$){z=R(function(){k(a.unstable_now())},$)}a.unstable_IdlePriority=5,a.unstable_ImmediatePriority=1,a.unstable_LowPriority=4,a.unstable_NormalPriority=3,a.unstable_Profiling=null,a.unstable_UserBlockingPriority=2,a.unstable_cancelCallback=function(k){k.callback=null},a.unstable_forceFrameRate=function(k){0>k||125<k?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):U=0<k?Math.floor(1e3/k):5},a.unstable_getCurrentPriorityLevel=function(){return b},a.unstable_next=function(k){switch(b){case 1:case 2:case 3:var $=3;break;default:$=b}var te=b;b=$;try{return k()}finally{b=te}},a.unstable_requestPaint=function(){C=!0},a.unstable_runWithPriority=function(k,$){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var te=b;b=k;try{return $()}finally{b=te}},a.unstable_scheduleCallback=function(k,$,te){var J=a.unstable_now();switch(typeof te=="object"&&te!==null?(te=te.delay,te=typeof te=="number"&&0<te?J+te:J):te=J,k){case 1:var W=-1;break;case 2:W=250;break;case 5:W=1073741823;break;case 4:W=1e4;break;default:W=5e3}return W=te+W,k={id:w++,callback:$,priorityLevel:k,startTime:te,expirationTime:W,sortIndex:-1},te>J?(k.sortIndex=te,l(g,k),o(v)===null&&k===o(g)&&(j?(A(z),z=-1):j=!0,he(P,te-J))):(k.sortIndex=W,l(v,k),T||x||(T=!0,q||(q=!0,Z()))),k},a.unstable_shouldYield=ae,a.unstable_wrapCallback=function(k){var $=b;return function(){var te=b;b=$;try{return k.apply(this,arguments)}finally{b=te}}}})(sf)),sf}var sy;function Aw(){return sy||(sy=1,of.exports=Nw()),of.exports}var cf={exports:{}},qt={};/**
26
+ * @license React
27
+ * react-dom.production.js
28
+ *
29
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var cy;function Mw(){if(cy)return qt;cy=1;var a=eh();function l(v){var g="https://react.dev/errors/"+v;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var w=2;w<arguments.length;w++)g+="&args[]="+encodeURIComponent(arguments[w])}return"Minified React error #"+v+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var i={d:{f:o,r:function(){throw Error(l(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},u=Symbol.for("react.portal");function f(v,g,w){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:S==null?null:""+S,children:v,containerInfo:g,implementation:w}}var h=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function p(v,g){if(v==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return qt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,qt.createPortal=function(v,g){var w=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(l(299));return f(v,g,null,w)},qt.flushSync=function(v){var g=h.T,w=i.p;try{if(h.T=null,i.p=2,v)return v()}finally{h.T=g,i.p=w,i.d.f()}},qt.preconnect=function(v,g){typeof v=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,i.d.C(v,g))},qt.prefetchDNS=function(v){typeof v=="string"&&i.d.D(v)},qt.preinit=function(v,g){if(typeof v=="string"&&g&&typeof g.as=="string"){var w=g.as,S=p(w,g.crossOrigin),b=typeof g.integrity=="string"?g.integrity:void 0,x=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;w==="style"?i.d.S(v,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:S,integrity:b,fetchPriority:x}):w==="script"&&i.d.X(v,{crossOrigin:S,integrity:b,fetchPriority:x,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},qt.preinitModule=function(v,g){if(typeof v=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var w=p(g.as,g.crossOrigin);i.d.M(v,{crossOrigin:w,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&i.d.M(v)},qt.preload=function(v,g){if(typeof v=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var w=g.as,S=p(w,g.crossOrigin);i.d.L(v,w,{crossOrigin:S,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},qt.preloadModule=function(v,g){if(typeof v=="string")if(g){var w=p(g.as,g.crossOrigin);i.d.m(v,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:w,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else i.d.m(v)},qt.requestFormReset=function(v){i.d.r(v)},qt.unstable_batchedUpdates=function(v,g){return v(g)},qt.useFormState=function(v,g,w){return h.H.useFormState(v,g,w)},qt.useFormStatus=function(){return h.H.useHostTransitionStatus()},qt.version="19.2.8",qt}var uy;function Jy(){if(uy)return cf.exports;uy=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(l){console.error(l)}}return a(),cf.exports=Mw(),cf.exports}/**
34
+ * @license React
35
+ * react-dom-client.production.js
36
+ *
37
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
38
+ *
39
+ * This source code is licensed under the MIT license found in the
40
+ * LICENSE file in the root directory of this source tree.
41
+ */var dy;function _w(){if(dy)return mi;dy=1;var a=Aw(),l=eh(),o=Jy();function i(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function h(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function v(e){if(f(e)!==e)throw Error(i(188))}function g(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(i(188));return t!==e?null:e}for(var n=e,r=t;;){var c=n.return;if(c===null)break;var d=c.alternate;if(d===null){if(r=c.return,r!==null){n=r;continue}break}if(c.child===d.child){for(d=c.child;d;){if(d===n)return v(c),e;if(d===r)return v(c),t;d=d.sibling}throw Error(i(188))}if(n.return!==r.return)n=c,r=d;else{for(var y=!1,E=c.child;E;){if(E===n){y=!0,n=c,r=d;break}if(E===r){y=!0,r=c,n=d;break}E=E.sibling}if(!y){for(E=d.child;E;){if(E===n){y=!0,n=d,r=c;break}if(E===r){y=!0,r=d,n=c;break}E=E.sibling}if(!y)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function w(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=w(e),t!==null)return t;e=e.sibling}return null}var S=Object.assign,b=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),T=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),N=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),q=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),ee=Symbol.for("react.activity"),ae=Symbol.for("react.memo_cache_sentinel"),oe=Symbol.iterator;function Z(e){return e===null||typeof e!="object"?null:(e=oe&&e[oe]||e["@@iterator"],typeof e=="function"?e:null)}var ie=Symbol.for("react.client.reference");function se(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ie?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case j:return"Fragment";case R:return"Profiler";case C:return"StrictMode";case P:return"Suspense";case q:return"SuspenseList";case ee:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case T:return"Portal";case N:return e.displayName||"Context";case A:return(e._context.displayName||"Context")+".Consumer";case _:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case z:return t=e.displayName||null,t!==null?t:se(e.type)||"Memo";case U:t=e._payload,e=e._init;try{return se(e(t))}catch{}}return null}var he=Array.isArray,k=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},J=[],W=-1;function M(e){return{current:e}}function H(e){0>W||(e.current=J[W],J[W]=null,W--)}function K(e,t){W++,J[W]=e.current,e.current=t}var B=M(null),ne=M(null),de=M(null),re=M(null);function ue(e,t){switch(K(de,t),K(ne,e),K(B,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?jg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=jg(t),e=Cg(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}H(B),K(B,e)}function ge(){H(B),H(ne),H(de)}function De(e){e.memoizedState!==null&&K(re,e);var t=B.current,n=Cg(t,e.type);t!==n&&(K(ne,e),K(B,n))}function _e(e){ne.current===e&&(H(B),H(ne)),re.current===e&&(H(re),ci._currentValue=te)}var Oe,qe;function yt(e){if(Oe===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Oe=t&&t[1]||"",qe=-1<n.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+Oe+e+qe}var Ht=!1;function Kt(e,t){if(!e||Ht)return"";Ht=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var F=function(){throw Error()};if(Object.defineProperty(F.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(F,[])}catch(I){var G=I}Reflect.construct(e,[],F)}else{try{F.call()}catch(I){G=I}e.call(F.prototype)}}else{try{throw Error()}catch(I){G=I}(F=e())&&typeof F.catch=="function"&&F.catch(function(){})}}catch(I){if(I&&G&&typeof I.stack=="string")return[I.stack,G.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=r.DetermineComponentFrameRoot(),y=d[0],E=d[1];if(y&&E){var O=y.split(`
44
+ `),Y=E.split(`
45
+ `);for(c=r=0;r<O.length&&!O[r].includes("DetermineComponentFrameRoot");)r++;for(;c<Y.length&&!Y[c].includes("DetermineComponentFrameRoot");)c++;if(r===O.length||c===Y.length)for(r=O.length-1,c=Y.length-1;1<=r&&0<=c&&O[r]!==Y[c];)c--;for(;1<=r&&0<=c;r--,c--)if(O[r]!==Y[c]){if(r!==1||c!==1)do if(r--,c--,0>c||O[r]!==Y[c]){var X=`
46
+ `+O[r].replace(" at new "," at ");return e.displayName&&X.includes("<anonymous>")&&(X=X.replace("<anonymous>",e.displayName)),X}while(1<=r&&0<=c);break}}}finally{Ht=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?yt(n):""}function Wn(e,t){switch(e.tag){case 26:case 27:case 5:return yt(e.type);case 16:return yt("Lazy");case 13:return e.child!==t&&t!==null?yt("Suspense Fallback"):yt("Suspense");case 19:return yt("SuspenseList");case 0:case 15:return Kt(e.type,!1);case 11:return Kt(e.type.render,!1);case 1:return Kt(e.type,!0);case 31:return yt("Activity");default:return""}}function jn(e){try{var t="",n=null;do t+=Wn(e,n),n=e,e=e.return;while(e);return t}catch(r){return`
47
+ Error generating stack: `+r.message+`
48
+ `+r.stack}}var Hl=Object.prototype.hasOwnProperty,nl=a.unstable_scheduleCallback,Hn=a.unstable_cancelCallback,ya=a.unstable_shouldYield,xa=a.unstable_requestPaint,Vt=a.unstable_now,Pc=a.unstable_getCurrentPriorityLevel,Yt=a.unstable_ImmediatePriority,ba=a.unstable_UserBlockingPriority,pr=a.unstable_NormalPriority,qc=a.unstable_LowPriority,Bl=a.unstable_IdlePriority,Vc=a.log,ki=a.unstable_setDisableYieldValue,Sa=null,xt=null;function Bn(e){if(typeof Vc=="function"&&ki(e),xt&&typeof xt.setStrictMode=="function")try{xt.setStrictMode(Sa,e)}catch{}}var bt=Math.clz32?Math.clz32:Li,Yc=Math.log,Gc=Math.LN2;function Li(e){return e>>>=0,e===0?32:31-(Yc(e)/Gc|0)|0}var Pl=256,vr=262144,al=4194304;function Bt(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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 e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function gr(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var c=0,d=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var E=r&134217727;return E!==0?(r=E&~d,r!==0?c=Bt(r):(y&=E,y!==0?c=Bt(y):n||(n=E&~e,n!==0&&(c=Bt(n))))):(E=r&~d,E!==0?c=Bt(E):y!==0?c=Bt(y):n||(n=r&~e,n!==0&&(c=Bt(n)))),c===0?0:t!==0&&t!==c&&(t&d)===0&&(d=c&-c,n=t&-t,d>=n||d===32&&(n&4194048)!==0)?t:c}function je(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Qe(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 at(){var e=al;return al<<=1,(al&62914560)===0&&(al=4194304),e}function Gt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ot(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ea(e,t,n,r,c,d){var y=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var E=e.entanglements,O=e.expirationTimes,Y=e.hiddenUpdates;for(n=y&~n;0<n;){var X=31-bt(n),F=1<<X;E[X]=0,O[X]=-1;var G=Y[X];if(G!==null)for(Y[X]=null,X=0;X<G.length;X++){var I=G[X];I!==null&&(I.lane&=-536870913)}n&=~F}r!==0&&ta(e,r,0),d!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=d&~(y&~t))}function ta(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-bt(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Xt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-bt(n),c=1<<r;c&t|e[r]&t&&(e[r]|=t),n&=~c}}function Pn(e,t){var n=t&-t;return n=(n&42)!==0?1:Ic(n),(n&(e.suspendedLanes|t))!==0?0:n}function Ic(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function $c(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function sm(){var e=$.p;return e!==0?e:(e=window.event,e===void 0?32:Kg(e.type))}function cm(e,t){var n=$.p;try{return $.p=e,t()}finally{$.p=n}}var ll=Math.random().toString(36).slice(2),Dt="__reactFiber$"+ll,Qt="__reactProps$"+ll,yr="__reactContainer$"+ll,Kc="__reactEvents$"+ll,h1="__reactListeners$"+ll,m1="__reactHandles$"+ll,um="__reactResources$"+ll,Co="__reactMarker$"+ll;function Xc(e){delete e[Dt],delete e[Qt],delete e[Kc],delete e[h1],delete e[m1]}function xr(e){var t=e[Dt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[yr]||n[Dt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=_g(e);e!==null;){if(n=e[Dt])return n;e=_g(e)}return t}e=n,n=e.parentNode}return null}function br(e){if(e=e[Dt]||e[yr]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Eo(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Sr(e){var t=e[um];return t||(t=e[um]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Nt(e){e[Co]=!0}var dm=new Set,fm={};function ql(e,t){wr(e,t),wr(e+"Capture",t)}function wr(e,t){for(fm[e]=t,e=0;e<t.length;e++)dm.add(t[e])}var p1=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]*$"),hm={},mm={};function v1(e){return Hl.call(mm,e)?!0:Hl.call(hm,e)?!1:p1.test(e)?mm[e]=!0:(hm[e]=!0,!1)}function Ui(e,t,n){if(v1(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var r=t.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function Hi(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function wa(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+r)}}function Cn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function pm(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function g1(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var c=r.get,d=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(y){n=""+y,d.call(this,y)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(y){n=""+y},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Qc(e){if(!e._valueTracker){var t=pm(e)?"checked":"value";e._valueTracker=g1(e,t,""+e[t])}}function vm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=pm(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Bi(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var y1=/[\n"\\]/g;function En(e){return e.replace(y1,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Zc(e,t,n,r,c,d,y,E){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),t!=null?y==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Cn(t)):e.value!==""+Cn(t)&&(e.value=""+Cn(t)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),t!=null?Fc(e,y,Cn(t)):n!=null?Fc(e,y,Cn(n)):r!=null&&e.removeAttribute("value"),c==null&&d!=null&&(e.defaultChecked=!!d),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?e.name=""+Cn(E):e.removeAttribute("name")}function gm(e,t,n,r,c,d,y,E){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),t!=null||n!=null){if(!(d!=="submit"&&d!=="reset"||t!=null)){Qc(e);return}n=n!=null?""+Cn(n):"",t=t!=null?""+Cn(t):n,E||t===e.value||(e.value=t),e.defaultValue=t}r=r??c,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=E?e.checked:!!r,e.defaultChecked=!!r,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y),Qc(e)}function Fc(e,t,n){t==="number"&&Bi(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function jr(e,t,n,r){if(e=e.options,t){t={};for(var c=0;c<n.length;c++)t["$"+n[c]]=!0;for(n=0;n<e.length;n++)c=t.hasOwnProperty("$"+e[n].value),e[n].selected!==c&&(e[n].selected=c),c&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Cn(n),t=null,c=0;c<e.length;c++){if(e[c].value===n){e[c].selected=!0,r&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function ym(e,t,n){if(t!=null&&(t=""+Cn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Cn(n):""}function xm(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(he(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n==null&&(n=""),t=n}n=Cn(t),e.defaultValue=n,r=e.textContent,r===n&&r!==""&&r!==null&&(e.value=r),Qc(e)}function Cr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var x1=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 bm(e,t,n){var r=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,n):typeof n!="number"||n===0||x1.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Sm(e,t,n){if(t!=null&&typeof t!="object")throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf("--")===0?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="");for(var c in t)r=t[c],t.hasOwnProperty(c)&&n[c]!==r&&bm(e,c,r)}else for(var d in t)t.hasOwnProperty(d)&&bm(e,d,t[d])}function Jc(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var b1=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"]]),S1=/^[\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 Pi(e){return S1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ja(){}var Wc=null;function eu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Er=null,Rr=null;function wm(e){var t=br(e);if(t&&(e=t.stateNode)){var n=e[Qt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Zc(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+En(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var c=r[Qt]||null;if(!c)throw Error(i(90));Zc(r,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&vm(r)}break e;case"textarea":ym(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&jr(e,!!n.multiple,t,!1)}}}var tu=!1;function jm(e,t,n){if(tu)return e(t,n);tu=!0;try{var r=e(t);return r}finally{if(tu=!1,(Er!==null||Rr!==null)&&(Ts(),Er&&(t=Er,e=Rr,Rr=Er=null,wm(t),e)))for(t=0;t<e.length;t++)wm(e[t])}}function Ro(e,t){var n=e.stateNode;if(n===null)return null;var r=n[Qt]||null;if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(i(231,t,typeof n));return n}var Ca=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),nu=!1;if(Ca)try{var To={};Object.defineProperty(To,"passive",{get:function(){nu=!0}}),window.addEventListener("test",To,To),window.removeEventListener("test",To,To)}catch{nu=!1}var rl=null,au=null,qi=null;function Cm(){if(qi)return qi;var e,t=au,n=t.length,r,c="value"in rl?rl.value:rl.textContent,d=c.length;for(e=0;e<n&&t[e]===c[e];e++);var y=n-e;for(r=1;r<=y&&t[n-r]===c[d-r];r++);return qi=c.slice(e,1<r?1-r:void 0)}function Vi(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Yi(){return!0}function Em(){return!1}function Zt(e){function t(n,r,c,d,y){this._reactName=n,this._targetInst=c,this.type=r,this.nativeEvent=d,this.target=y,this.currentTarget=null;for(var E in e)e.hasOwnProperty(E)&&(n=e[E],this[E]=n?n(d):d[E]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?Yi:Em,this.isPropagationStopped=Em,this}return S(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Yi)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Yi)},persist:function(){},isPersistent:Yi}),t}var Vl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Gi=Zt(Vl),No=S({},Vl,{view:0,detail:0}),w1=Zt(No),lu,ru,Ao,Ii=S({},No,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:iu,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ao&&(Ao&&e.type==="mousemove"?(lu=e.screenX-Ao.screenX,ru=e.screenY-Ao.screenY):ru=lu=0,Ao=e),lu)},movementY:function(e){return"movementY"in e?e.movementY:ru}}),Rm=Zt(Ii),j1=S({},Ii,{dataTransfer:0}),C1=Zt(j1),E1=S({},No,{relatedTarget:0}),ou=Zt(E1),R1=S({},Vl,{animationName:0,elapsedTime:0,pseudoElement:0}),T1=Zt(R1),N1=S({},Vl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),A1=Zt(N1),M1=S({},Vl,{data:0}),Tm=Zt(M1),_1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},O1={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"},D1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function z1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=D1[e])?!!t[e]:!1}function iu(){return z1}var k1=S({},No,{key:function(e){if(e.key){var t=_1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Vi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?O1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:iu,charCode:function(e){return e.type==="keypress"?Vi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Vi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),L1=Zt(k1),U1=S({},Ii,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Nm=Zt(U1),H1=S({},No,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:iu}),B1=Zt(H1),P1=S({},Vl,{propertyName:0,elapsedTime:0,pseudoElement:0}),q1=Zt(P1),V1=S({},Ii,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Y1=Zt(V1),G1=S({},Vl,{newState:0,oldState:0}),I1=Zt(G1),$1=[9,13,27,32],su=Ca&&"CompositionEvent"in window,Mo=null;Ca&&"documentMode"in document&&(Mo=document.documentMode);var K1=Ca&&"TextEvent"in window&&!Mo,Am=Ca&&(!su||Mo&&8<Mo&&11>=Mo),Mm=" ",_m=!1;function Om(e,t){switch(e){case"keyup":return $1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Dm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Tr=!1;function X1(e,t){switch(e){case"compositionend":return Dm(t);case"keypress":return t.which!==32?null:(_m=!0,Mm);case"textInput":return e=t.data,e===Mm&&_m?null:e;default:return null}}function Q1(e,t){if(Tr)return e==="compositionend"||!su&&Om(e,t)?(e=Cm(),qi=au=rl=null,Tr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Am&&t.locale!=="ko"?null:t.data;default:return null}}var Z1={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 zm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Z1[e.type]:t==="textarea"}function km(e,t,n,r){Er?Rr?Rr.push(r):Rr=[r]:Er=r,t=zs(t,"onChange"),0<t.length&&(n=new Gi("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var _o=null,Oo=null;function F1(e){gg(e,0)}function $i(e){var t=Eo(e);if(vm(t))return e}function Lm(e,t){if(e==="change")return t}var Um=!1;if(Ca){var cu;if(Ca){var uu="oninput"in document;if(!uu){var Hm=document.createElement("div");Hm.setAttribute("oninput","return;"),uu=typeof Hm.oninput=="function"}cu=uu}else cu=!1;Um=cu&&(!document.documentMode||9<document.documentMode)}function Bm(){_o&&(_o.detachEvent("onpropertychange",Pm),Oo=_o=null)}function Pm(e){if(e.propertyName==="value"&&$i(Oo)){var t=[];km(t,Oo,e,eu(e)),jm(F1,t)}}function J1(e,t,n){e==="focusin"?(Bm(),_o=t,Oo=n,_o.attachEvent("onpropertychange",Pm)):e==="focusout"&&Bm()}function W1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return $i(Oo)}function eS(e,t){if(e==="click")return $i(t)}function tS(e,t){if(e==="input"||e==="change")return $i(t)}function nS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var cn=typeof Object.is=="function"?Object.is:nS;function Do(e,t){if(cn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var c=n[r];if(!Hl.call(t,c)||!cn(e[c],t[c]))return!1}return!0}function qm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Vm(e,t){var n=qm(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=qm(n)}}function Ym(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ym(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Gm(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Bi(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Bi(e.document)}return t}function du(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var aS=Ca&&"documentMode"in document&&11>=document.documentMode,Nr=null,fu=null,zo=null,hu=!1;function Im(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;hu||Nr==null||Nr!==Bi(r)||(r=Nr,"selectionStart"in r&&du(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),zo&&Do(zo,r)||(zo=r,r=zs(fu,"onSelect"),0<r.length&&(t=new Gi("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Nr)))}function Yl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ar={animationend:Yl("Animation","AnimationEnd"),animationiteration:Yl("Animation","AnimationIteration"),animationstart:Yl("Animation","AnimationStart"),transitionrun:Yl("Transition","TransitionRun"),transitionstart:Yl("Transition","TransitionStart"),transitioncancel:Yl("Transition","TransitionCancel"),transitionend:Yl("Transition","TransitionEnd")},mu={},$m={};Ca&&($m=document.createElement("div").style,"AnimationEvent"in window||(delete Ar.animationend.animation,delete Ar.animationiteration.animation,delete Ar.animationstart.animation),"TransitionEvent"in window||delete Ar.transitionend.transition);function Gl(e){if(mu[e])return mu[e];if(!Ar[e])return e;var t=Ar[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in $m)return mu[e]=t[n];return e}var Km=Gl("animationend"),Xm=Gl("animationiteration"),Qm=Gl("animationstart"),lS=Gl("transitionrun"),rS=Gl("transitionstart"),oS=Gl("transitioncancel"),Zm=Gl("transitionend"),Fm=new Map,pu="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(" ");pu.push("scrollEnd");function qn(e,t){Fm.set(e,t),ql(t,[e])}var Ki=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Rn=[],Mr=0,vu=0;function Xi(){for(var e=Mr,t=vu=Mr=0;t<e;){var n=Rn[t];Rn[t++]=null;var r=Rn[t];Rn[t++]=null;var c=Rn[t];Rn[t++]=null;var d=Rn[t];if(Rn[t++]=null,r!==null&&c!==null){var y=r.pending;y===null?c.next=c:(c.next=y.next,y.next=c),r.pending=c}d!==0&&Jm(n,c,d)}}function Qi(e,t,n,r){Rn[Mr++]=e,Rn[Mr++]=t,Rn[Mr++]=n,Rn[Mr++]=r,vu|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function gu(e,t,n,r){return Qi(e,t,n,r),Zi(e)}function Il(e,t){return Qi(e,null,null,t),Zi(e)}function Jm(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var c=!1,d=e.return;d!==null;)d.childLanes|=n,r=d.alternate,r!==null&&(r.childLanes|=n),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(c=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,c&&t!==null&&(c=31-bt(n),e=d.hiddenUpdates,r=e[c],r===null?e[c]=[t]:r.push(t),t.lane=n|536870912),d):null}function Zi(e){if(50<ni)throw ni=0,Rd=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var _r={};function iS(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function un(e,t,n,r){return new iS(e,t,n,r)}function yu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ea(e,t){var n=e.alternate;return n===null?(n=un(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Wm(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Fi(e,t,n,r,c,d){var y=0;if(r=e,typeof e=="function")yu(e)&&(y=1);else if(typeof e=="string")y=fw(e,n,B.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ee:return e=un(31,n,t,c),e.elementType=ee,e.lanes=d,e;case j:return $l(n.children,c,d,t);case C:y=8,c|=24;break;case R:return e=un(12,n,t,c|2),e.elementType=R,e.lanes=d,e;case P:return e=un(13,n,t,c),e.elementType=P,e.lanes=d,e;case q:return e=un(19,n,t,c),e.elementType=q,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case N:y=10;break e;case A:y=9;break e;case _:y=11;break e;case z:y=14;break e;case U:y=16,r=null;break e}y=29,n=Error(i(130,e===null?"null":typeof e,"")),r=null}return t=un(y,n,t,c),t.elementType=e,t.type=r,t.lanes=d,t}function $l(e,t,n,r){return e=un(7,e,r,t),e.lanes=n,e}function xu(e,t,n){return e=un(6,e,null,t),e.lanes=n,e}function ep(e){var t=un(18,null,null,0);return t.stateNode=e,t}function bu(e,t,n){return t=un(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var tp=new WeakMap;function Tn(e,t){if(typeof e=="object"&&e!==null){var n=tp.get(e);return n!==void 0?n:(t={value:e,source:t,stack:jn(t)},tp.set(e,t),t)}return{value:e,source:t,stack:jn(t)}}var Or=[],Dr=0,Ji=null,ko=0,Nn=[],An=0,ol=null,na=1,aa="";function Ra(e,t){Or[Dr++]=ko,Or[Dr++]=Ji,Ji=e,ko=t}function np(e,t,n){Nn[An++]=na,Nn[An++]=aa,Nn[An++]=ol,ol=e;var r=na;e=aa;var c=32-bt(r)-1;r&=~(1<<c),n+=1;var d=32-bt(t)+c;if(30<d){var y=c-c%5;d=(r&(1<<y)-1).toString(32),r>>=y,c-=y,na=1<<32-bt(t)+c|n<<c|r,aa=d+e}else na=1<<d|n<<c|r,aa=e}function Su(e){e.return!==null&&(Ra(e,1),np(e,1,0))}function wu(e){for(;e===Ji;)Ji=Or[--Dr],Or[Dr]=null,ko=Or[--Dr],Or[Dr]=null;for(;e===ol;)ol=Nn[--An],Nn[An]=null,aa=Nn[--An],Nn[An]=null,na=Nn[--An],Nn[An]=null}function ap(e,t){Nn[An++]=na,Nn[An++]=aa,Nn[An++]=ol,na=t.id,aa=t.overflow,ol=e}var zt=null,ct=null,Be=!1,il=null,Mn=!1,ju=Error(i(519));function sl(e){var t=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Lo(Tn(t,e)),ju}function lp(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Dt]=e,t[Qt]=r,n){case"dialog":ke("cancel",t),ke("close",t);break;case"iframe":case"object":case"embed":ke("load",t);break;case"video":case"audio":for(n=0;n<li.length;n++)ke(li[n],t);break;case"source":ke("error",t);break;case"img":case"image":case"link":ke("error",t),ke("load",t);break;case"details":ke("toggle",t);break;case"input":ke("invalid",t),gm(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":ke("invalid",t);break;case"textarea":ke("invalid",t),xm(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||r.suppressHydrationWarning===!0||Sg(t.textContent,n)?(r.popover!=null&&(ke("beforetoggle",t),ke("toggle",t)),r.onScroll!=null&&ke("scroll",t),r.onScrollEnd!=null&&ke("scrollend",t),r.onClick!=null&&(t.onclick=ja),t=!0):t=!1,t||sl(e,!0)}function rp(e){for(zt=e.return;zt;)switch(zt.tag){case 5:case 31:case 13:Mn=!1;return;case 27:case 3:Mn=!0;return;default:zt=zt.return}}function zr(e){if(e!==zt)return!1;if(!Be)return rp(e),Be=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||qd(e.type,e.memoizedProps)),n=!n),n&&ct&&sl(e),rp(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));ct=Mg(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));ct=Mg(e)}else t===27?(t=ct,wl(e.type)?(e=$d,$d=null,ct=e):ct=t):ct=zt?On(e.stateNode.nextSibling):null;return!0}function Kl(){ct=zt=null,Be=!1}function Cu(){var e=il;return e!==null&&(en===null?en=e:en.push.apply(en,e),il=null),e}function Lo(e){il===null?il=[e]:il.push(e)}var Eu=M(null),Xl=null,Ta=null;function cl(e,t,n){K(Eu,t._currentValue),t._currentValue=n}function Na(e){e._currentValue=Eu.current,H(Eu)}function Ru(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Tu(e,t,n,r){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var d=c.dependencies;if(d!==null){var y=c.child;d=d.firstContext;e:for(;d!==null;){var E=d;d=c;for(var O=0;O<t.length;O++)if(E.context===t[O]){d.lanes|=n,E=d.alternate,E!==null&&(E.lanes|=n),Ru(d.return,n,e),r||(y=null);break e}d=E.next}}else if(c.tag===18){if(y=c.return,y===null)throw Error(i(341));y.lanes|=n,d=y.alternate,d!==null&&(d.lanes|=n),Ru(y,n,e),y=null}else y=c.child;if(y!==null)y.return=c;else for(y=c;y!==null;){if(y===e){y=null;break}if(c=y.sibling,c!==null){c.return=y.return,y=c;break}y=y.return}c=y}}function kr(e,t,n,r){e=null;for(var c=t,d=!1;c!==null;){if(!d){if((c.flags&524288)!==0)d=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var y=c.alternate;if(y===null)throw Error(i(387));if(y=y.memoizedProps,y!==null){var E=c.type;cn(c.pendingProps.value,y.value)||(e!==null?e.push(E):e=[E])}}else if(c===re.current){if(y=c.alternate,y===null)throw Error(i(387));y.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(ci):e=[ci])}c=c.return}e!==null&&Tu(t,e,n,r),t.flags|=262144}function Wi(e){for(e=e.firstContext;e!==null;){if(!cn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ql(e){Xl=e,Ta=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function kt(e){return op(Xl,e)}function es(e,t){return Xl===null&&Ql(e),op(e,t)}function op(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Ta===null){if(e===null)throw Error(i(308));Ta=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ta=Ta.next=t;return n}var sS=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},cS=a.unstable_scheduleCallback,uS=a.unstable_NormalPriority,St={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Nu(){return{controller:new sS,data:new Map,refCount:0}}function Uo(e){e.refCount--,e.refCount===0&&cS(uS,function(){e.controller.abort()})}var Ho=null,Au=0,Lr=0,Ur=null;function dS(e,t){if(Ho===null){var n=Ho=[];Au=0,Lr=Od(),Ur={status:"pending",value:void 0,then:function(r){n.push(r)}}}return Au++,t.then(ip,ip),t}function ip(){if(--Au===0&&Ho!==null){Ur!==null&&(Ur.status="fulfilled");var e=Ho;Ho=null,Lr=0,Ur=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function fS(e,t){var n=[],r={status:"pending",value:null,reason:null,then:function(c){n.push(c)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var c=0;c<n.length;c++)(0,n[c])(t)},function(c){for(r.status="rejected",r.reason=c,c=0;c<n.length;c++)(0,n[c])(void 0)}),r}var sp=k.S;k.S=function(e,t){Iv=Vt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&dS(e,t),sp!==null&&sp(e,t)};var Zl=M(null);function Mu(){var e=Zl.current;return e!==null?e:lt.pooledCache}function ts(e,t){t===null?K(Zl,Zl.current):K(Zl,t.pool)}function cp(){var e=Mu();return e===null?null:{parent:St._currentValue,pool:e}}var Hr=Error(i(460)),_u=Error(i(474)),ns=Error(i(542)),as={then:function(){}};function up(e){return e=e.status,e==="fulfilled"||e==="rejected"}function dp(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(ja,ja),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,hp(e),e;default:if(typeof t.status=="string")t.then(ja,ja);else{if(e=lt,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=r}},function(r){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,hp(e),e}throw Jl=t,Hr}}function Fl(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Jl=n,Hr):n}}var Jl=null;function fp(){if(Jl===null)throw Error(i(459));var e=Jl;return Jl=null,e}function hp(e){if(e===Hr||e===ns)throw Error(i(483))}var Br=null,Bo=0;function ls(e){var t=Bo;return Bo+=1,Br===null&&(Br=[]),dp(Br,e,t)}function Po(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function rs(e,t){throw t.$$typeof===b?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function mp(e){function t(L,D){if(e){var V=L.deletions;V===null?(L.deletions=[D],L.flags|=16):V.push(D)}}function n(L,D){if(!e)return null;for(;D!==null;)t(L,D),D=D.sibling;return null}function r(L){for(var D=new Map;L!==null;)L.key!==null?D.set(L.key,L):D.set(L.index,L),L=L.sibling;return D}function c(L,D){return L=Ea(L,D),L.index=0,L.sibling=null,L}function d(L,D,V){return L.index=V,e?(V=L.alternate,V!==null?(V=V.index,V<D?(L.flags|=67108866,D):V):(L.flags|=67108866,D)):(L.flags|=1048576,D)}function y(L){return e&&L.alternate===null&&(L.flags|=67108866),L}function E(L,D,V,Q){return D===null||D.tag!==6?(D=xu(V,L.mode,Q),D.return=L,D):(D=c(D,V),D.return=L,D)}function O(L,D,V,Q){var ye=V.type;return ye===j?X(L,D,V.props.children,Q,V.key):D!==null&&(D.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===U&&Fl(ye)===D.type)?(D=c(D,V.props),Po(D,V),D.return=L,D):(D=Fi(V.type,V.key,V.props,null,L.mode,Q),Po(D,V),D.return=L,D)}function Y(L,D,V,Q){return D===null||D.tag!==4||D.stateNode.containerInfo!==V.containerInfo||D.stateNode.implementation!==V.implementation?(D=bu(V,L.mode,Q),D.return=L,D):(D=c(D,V.children||[]),D.return=L,D)}function X(L,D,V,Q,ye){return D===null||D.tag!==7?(D=$l(V,L.mode,Q,ye),D.return=L,D):(D=c(D,V),D.return=L,D)}function F(L,D,V){if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return D=xu(""+D,L.mode,V),D.return=L,D;if(typeof D=="object"&&D!==null){switch(D.$$typeof){case x:return V=Fi(D.type,D.key,D.props,null,L.mode,V),Po(V,D),V.return=L,V;case T:return D=bu(D,L.mode,V),D.return=L,D;case U:return D=Fl(D),F(L,D,V)}if(he(D)||Z(D))return D=$l(D,L.mode,V,null),D.return=L,D;if(typeof D.then=="function")return F(L,ls(D),V);if(D.$$typeof===N)return F(L,es(L,D),V);rs(L,D)}return null}function G(L,D,V,Q){var ye=D!==null?D.key:null;if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return ye!==null?null:E(L,D,""+V,Q);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case x:return V.key===ye?O(L,D,V,Q):null;case T:return V.key===ye?Y(L,D,V,Q):null;case U:return V=Fl(V),G(L,D,V,Q)}if(he(V)||Z(V))return ye!==null?null:X(L,D,V,Q,null);if(typeof V.then=="function")return G(L,D,ls(V),Q);if(V.$$typeof===N)return G(L,D,es(L,V),Q);rs(L,V)}return null}function I(L,D,V,Q,ye){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return L=L.get(V)||null,E(D,L,""+Q,ye);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case x:return L=L.get(Q.key===null?V:Q.key)||null,O(D,L,Q,ye);case T:return L=L.get(Q.key===null?V:Q.key)||null,Y(D,L,Q,ye);case U:return Q=Fl(Q),I(L,D,V,Q,ye)}if(he(Q)||Z(Q))return L=L.get(V)||null,X(D,L,Q,ye,null);if(typeof Q.then=="function")return I(L,D,V,ls(Q),ye);if(Q.$$typeof===N)return I(L,D,V,es(D,Q),ye);rs(D,Q)}return null}function fe(L,D,V,Q){for(var ye=null,Ve=null,me=D,Ne=D=0,He=null;me!==null&&Ne<V.length;Ne++){me.index>Ne?(He=me,me=null):He=me.sibling;var Ye=G(L,me,V[Ne],Q);if(Ye===null){me===null&&(me=He);break}e&&me&&Ye.alternate===null&&t(L,me),D=d(Ye,D,Ne),Ve===null?ye=Ye:Ve.sibling=Ye,Ve=Ye,me=He}if(Ne===V.length)return n(L,me),Be&&Ra(L,Ne),ye;if(me===null){for(;Ne<V.length;Ne++)me=F(L,V[Ne],Q),me!==null&&(D=d(me,D,Ne),Ve===null?ye=me:Ve.sibling=me,Ve=me);return Be&&Ra(L,Ne),ye}for(me=r(me);Ne<V.length;Ne++)He=I(me,L,Ne,V[Ne],Q),He!==null&&(e&&He.alternate!==null&&me.delete(He.key===null?Ne:He.key),D=d(He,D,Ne),Ve===null?ye=He:Ve.sibling=He,Ve=He);return e&&me.forEach(function(Tl){return t(L,Tl)}),Be&&Ra(L,Ne),ye}function we(L,D,V,Q){if(V==null)throw Error(i(151));for(var ye=null,Ve=null,me=D,Ne=D=0,He=null,Ye=V.next();me!==null&&!Ye.done;Ne++,Ye=V.next()){me.index>Ne?(He=me,me=null):He=me.sibling;var Tl=G(L,me,Ye.value,Q);if(Tl===null){me===null&&(me=He);break}e&&me&&Tl.alternate===null&&t(L,me),D=d(Tl,D,Ne),Ve===null?ye=Tl:Ve.sibling=Tl,Ve=Tl,me=He}if(Ye.done)return n(L,me),Be&&Ra(L,Ne),ye;if(me===null){for(;!Ye.done;Ne++,Ye=V.next())Ye=F(L,Ye.value,Q),Ye!==null&&(D=d(Ye,D,Ne),Ve===null?ye=Ye:Ve.sibling=Ye,Ve=Ye);return Be&&Ra(L,Ne),ye}for(me=r(me);!Ye.done;Ne++,Ye=V.next())Ye=I(me,L,Ne,Ye.value,Q),Ye!==null&&(e&&Ye.alternate!==null&&me.delete(Ye.key===null?Ne:Ye.key),D=d(Ye,D,Ne),Ve===null?ye=Ye:Ve.sibling=Ye,Ve=Ye);return e&&me.forEach(function(jw){return t(L,jw)}),Be&&Ra(L,Ne),ye}function tt(L,D,V,Q){if(typeof V=="object"&&V!==null&&V.type===j&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case x:e:{for(var ye=V.key;D!==null;){if(D.key===ye){if(ye=V.type,ye===j){if(D.tag===7){n(L,D.sibling),Q=c(D,V.props.children),Q.return=L,L=Q;break e}}else if(D.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===U&&Fl(ye)===D.type){n(L,D.sibling),Q=c(D,V.props),Po(Q,V),Q.return=L,L=Q;break e}n(L,D);break}else t(L,D);D=D.sibling}V.type===j?(Q=$l(V.props.children,L.mode,Q,V.key),Q.return=L,L=Q):(Q=Fi(V.type,V.key,V.props,null,L.mode,Q),Po(Q,V),Q.return=L,L=Q)}return y(L);case T:e:{for(ye=V.key;D!==null;){if(D.key===ye)if(D.tag===4&&D.stateNode.containerInfo===V.containerInfo&&D.stateNode.implementation===V.implementation){n(L,D.sibling),Q=c(D,V.children||[]),Q.return=L,L=Q;break e}else{n(L,D);break}else t(L,D);D=D.sibling}Q=bu(V,L.mode,Q),Q.return=L,L=Q}return y(L);case U:return V=Fl(V),tt(L,D,V,Q)}if(he(V))return fe(L,D,V,Q);if(Z(V)){if(ye=Z(V),typeof ye!="function")throw Error(i(150));return V=ye.call(V),we(L,D,V,Q)}if(typeof V.then=="function")return tt(L,D,ls(V),Q);if(V.$$typeof===N)return tt(L,D,es(L,V),Q);rs(L,V)}return typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint"?(V=""+V,D!==null&&D.tag===6?(n(L,D.sibling),Q=c(D,V),Q.return=L,L=Q):(n(L,D),Q=xu(V,L.mode,Q),Q.return=L,L=Q),y(L)):n(L,D)}return function(L,D,V,Q){try{Bo=0;var ye=tt(L,D,V,Q);return Br=null,ye}catch(me){if(me===Hr||me===ns)throw me;var Ve=un(29,me,null,L.mode);return Ve.lanes=Q,Ve.return=L,Ve}finally{}}}var Wl=mp(!0),pp=mp(!1),ul=!1;function Ou(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Du(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function dl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function fl(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Xe&2)!==0){var c=r.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),r.pending=t,t=Zi(e),Jm(e,null,n),t}return Qi(e,r,t,n),Zi(e)}function qo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Xt(e,n)}}function zu(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var c=null,d=null;if(n=n.firstBaseUpdate,n!==null){do{var y={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};d===null?c=d=y:d=d.next=y,n=n.next}while(n!==null);d===null?c=d=t:d=d.next=t}else c=d=t;n={baseState:r.baseState,firstBaseUpdate:c,lastBaseUpdate:d,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var ku=!1;function Vo(){if(ku){var e=Ur;if(e!==null)throw e}}function Yo(e,t,n,r){ku=!1;var c=e.updateQueue;ul=!1;var d=c.firstBaseUpdate,y=c.lastBaseUpdate,E=c.shared.pending;if(E!==null){c.shared.pending=null;var O=E,Y=O.next;O.next=null,y===null?d=Y:y.next=Y,y=O;var X=e.alternate;X!==null&&(X=X.updateQueue,E=X.lastBaseUpdate,E!==y&&(E===null?X.firstBaseUpdate=Y:E.next=Y,X.lastBaseUpdate=O))}if(d!==null){var F=c.baseState;y=0,X=Y=O=null,E=d;do{var G=E.lane&-536870913,I=G!==E.lane;if(I?(Ue&G)===G:(r&G)===G){G!==0&&G===Lr&&(ku=!0),X!==null&&(X=X.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var fe=e,we=E;G=t;var tt=n;switch(we.tag){case 1:if(fe=we.payload,typeof fe=="function"){F=fe.call(tt,F,G);break e}F=fe;break e;case 3:fe.flags=fe.flags&-65537|128;case 0:if(fe=we.payload,G=typeof fe=="function"?fe.call(tt,F,G):fe,G==null)break e;F=S({},F,G);break e;case 2:ul=!0}}G=E.callback,G!==null&&(e.flags|=64,I&&(e.flags|=8192),I=c.callbacks,I===null?c.callbacks=[G]:I.push(G))}else I={lane:G,tag:E.tag,payload:E.payload,callback:E.callback,next:null},X===null?(Y=X=I,O=F):X=X.next=I,y|=G;if(E=E.next,E===null){if(E=c.shared.pending,E===null)break;I=E,E=I.next,I.next=null,c.lastBaseUpdate=I,c.shared.pending=null}}while(!0);X===null&&(O=F),c.baseState=O,c.firstBaseUpdate=Y,c.lastBaseUpdate=X,d===null&&(c.shared.lanes=0),gl|=y,e.lanes=y,e.memoizedState=F}}function vp(e,t){if(typeof e!="function")throw Error(i(191,e));e.call(t)}function gp(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)vp(n[e],t)}var Pr=M(null),os=M(0);function yp(e,t){e=Ua,K(os,e),K(Pr,t),Ua=e|t.baseLanes}function Lu(){K(os,Ua),K(Pr,Pr.current)}function Uu(){Ua=os.current,H(Pr),H(os)}var dn=M(null),_n=null;function hl(e){var t=e.alternate;K(vt,vt.current&1),K(dn,e),_n===null&&(t===null||Pr.current!==null||t.memoizedState!==null)&&(_n=e)}function Hu(e){K(vt,vt.current),K(dn,e),_n===null&&(_n=e)}function xp(e){e.tag===22?(K(vt,vt.current),K(dn,e),_n===null&&(_n=e)):ml()}function ml(){K(vt,vt.current),K(dn,dn.current)}function fn(e){H(dn),_n===e&&(_n=null),H(vt)}var vt=M(0);function is(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Gd(n)||Id(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Aa=0,Te=null,We=null,wt=null,ss=!1,qr=!1,er=!1,cs=0,Go=0,Vr=null,hS=0;function mt(){throw Error(i(321))}function Bu(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!cn(e[n],t[n]))return!1;return!0}function Pu(e,t,n,r,c,d){return Aa=d,Te=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,k.H=e===null||e.memoizedState===null?nv:td,er=!1,d=n(r,c),er=!1,qr&&(d=Sp(t,n,r,c)),bp(e),d}function bp(e){k.H=Ko;var t=We!==null&&We.next!==null;if(Aa=0,wt=We=Te=null,ss=!1,Go=0,Vr=null,t)throw Error(i(300));e===null||jt||(e=e.dependencies,e!==null&&Wi(e)&&(jt=!0))}function Sp(e,t,n,r){Te=e;var c=0;do{if(qr&&(Vr=null),Go=0,qr=!1,25<=c)throw Error(i(301));if(c+=1,wt=We=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}k.H=av,d=t(n,r)}while(qr);return d}function mS(){var e=k.H,t=e.useState()[0];return t=typeof t.then=="function"?Io(t):t,e=e.useState()[0],(We!==null?We.memoizedState:null)!==e&&(Te.flags|=1024),t}function qu(){var e=cs!==0;return cs=0,e}function Vu(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Yu(e){if(ss){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ss=!1}Aa=0,wt=We=Te=null,qr=!1,Go=cs=0,Vr=null}function It(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return wt===null?Te.memoizedState=wt=e:wt=wt.next=e,wt}function gt(){if(We===null){var e=Te.alternate;e=e!==null?e.memoizedState:null}else e=We.next;var t=wt===null?Te.memoizedState:wt.next;if(t!==null)wt=t,We=e;else{if(e===null)throw Te.alternate===null?Error(i(467)):Error(i(310));We=e,e={memoizedState:We.memoizedState,baseState:We.baseState,baseQueue:We.baseQueue,queue:We.queue,next:null},wt===null?Te.memoizedState=wt=e:wt=wt.next=e}return wt}function us(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Io(e){var t=Go;return Go+=1,Vr===null&&(Vr=[]),e=dp(Vr,e,t),t=Te,(wt===null?t.memoizedState:wt.next)===null&&(t=t.alternate,k.H=t===null||t.memoizedState===null?nv:td),e}function ds(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Io(e);if(e.$$typeof===N)return kt(e)}throw Error(i(438,String(e)))}function Gu(e){var t=null,n=Te.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=Te.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=us(),Te.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=ae;return t.index++,n}function Ma(e,t){return typeof t=="function"?t(e):t}function fs(e){var t=gt();return Iu(t,We,e)}function Iu(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var c=e.baseQueue,d=r.pending;if(d!==null){if(c!==null){var y=c.next;c.next=d.next,d.next=y}t.baseQueue=c=d,r.pending=null}if(d=e.baseState,c===null)e.memoizedState=d;else{t=c.next;var E=y=null,O=null,Y=t,X=!1;do{var F=Y.lane&-536870913;if(F!==Y.lane?(Ue&F)===F:(Aa&F)===F){var G=Y.revertLane;if(G===0)O!==null&&(O=O.next={lane:0,revertLane:0,gesture:null,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null}),F===Lr&&(X=!0);else if((Aa&G)===G){Y=Y.next,G===Lr&&(X=!0);continue}else F={lane:0,revertLane:Y.revertLane,gesture:null,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},O===null?(E=O=F,y=d):O=O.next=F,Te.lanes|=G,gl|=G;F=Y.action,er&&n(d,F),d=Y.hasEagerState?Y.eagerState:n(d,F)}else G={lane:F,revertLane:Y.revertLane,gesture:Y.gesture,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},O===null?(E=O=G,y=d):O=O.next=G,Te.lanes|=F,gl|=F;Y=Y.next}while(Y!==null&&Y!==t);if(O===null?y=d:O.next=E,!cn(d,e.memoizedState)&&(jt=!0,X&&(n=Ur,n!==null)))throw n;e.memoizedState=d,e.baseState=y,e.baseQueue=O,r.lastRenderedState=d}return c===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function $u(e){var t=gt(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,c=n.pending,d=t.memoizedState;if(c!==null){n.pending=null;var y=c=c.next;do d=e(d,y.action),y=y.next;while(y!==c);cn(d,t.memoizedState)||(jt=!0),t.memoizedState=d,t.baseQueue===null&&(t.baseState=d),n.lastRenderedState=d}return[d,r]}function wp(e,t,n){var r=Te,c=gt(),d=Be;if(d){if(n===void 0)throw Error(i(407));n=n()}else n=t();var y=!cn((We||c).memoizedState,n);if(y&&(c.memoizedState=n,jt=!0),c=c.queue,Qu(Ep.bind(null,r,c,e),[e]),c.getSnapshot!==t||y||wt!==null&&wt.memoizedState.tag&1){if(r.flags|=2048,Yr(9,{destroy:void 0},Cp.bind(null,r,c,n,t),null),lt===null)throw Error(i(349));d||(Aa&127)!==0||jp(r,t,n)}return n}function jp(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Te.updateQueue,t===null?(t=us(),Te.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Cp(e,t,n,r){t.value=n,t.getSnapshot=r,Rp(t)&&Tp(e)}function Ep(e,t,n){return n(function(){Rp(t)&&Tp(e)})}function Rp(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!cn(e,n)}catch{return!0}}function Tp(e){var t=Il(e,2);t!==null&&tn(t,e,2)}function Ku(e){var t=It();if(typeof e=="function"){var n=e;if(e=n(),er){Bn(!0);try{n()}finally{Bn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ma,lastRenderedState:e},t}function Np(e,t,n,r){return e.baseState=n,Iu(e,We,typeof r=="function"?r:Ma)}function pS(e,t,n,r,c){if(ps(e))throw Error(i(485));if(e=t.action,e!==null){var d={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){d.listeners.push(y)}};k.T!==null?n(!0):d.isTransition=!1,r(d),n=t.pending,n===null?(d.next=t.pending=d,Ap(t,d)):(d.next=n.next,t.pending=n.next=d)}}function Ap(e,t){var n=t.action,r=t.payload,c=e.state;if(t.isTransition){var d=k.T,y={};k.T=y;try{var E=n(c,r),O=k.S;O!==null&&O(y,E),Mp(e,t,E)}catch(Y){Xu(e,t,Y)}finally{d!==null&&y.types!==null&&(d.types=y.types),k.T=d}}else try{d=n(c,r),Mp(e,t,d)}catch(Y){Xu(e,t,Y)}}function Mp(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(r){_p(e,t,r)},function(r){return Xu(e,t,r)}):_p(e,t,n)}function _p(e,t,n){t.status="fulfilled",t.value=n,Op(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ap(e,n)))}function Xu(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=n,Op(t),t=t.next;while(t!==r)}e.action=null}function Op(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Dp(e,t){return t}function zp(e,t){if(Be){var n=lt.formState;if(n!==null){e:{var r=Te;if(Be){if(ct){t:{for(var c=ct,d=Mn;c.nodeType!==8;){if(!d){c=null;break t}if(c=On(c.nextSibling),c===null){c=null;break t}}d=c.data,c=d==="F!"||d==="F"?c:null}if(c){ct=On(c.nextSibling),r=c.data==="F!";break e}}sl(r)}r=!1}r&&(t=n[0])}}return n=It(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dp,lastRenderedState:t},n.queue=r,n=Wp.bind(null,Te,r),r.dispatch=n,r=Ku(!1),d=ed.bind(null,Te,!1,r.queue),r=It(),c={state:t,dispatch:null,action:e,pending:null},r.queue=c,n=pS.bind(null,Te,c,d,n),c.dispatch=n,r.memoizedState=e,[t,n,!1]}function kp(e){var t=gt();return Lp(t,We,e)}function Lp(e,t,n){if(t=Iu(e,t,Dp)[0],e=fs(Ma)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=Io(t)}catch(y){throw y===Hr?ns:y}else r=t;t=gt();var c=t.queue,d=c.dispatch;return n!==t.memoizedState&&(Te.flags|=2048,Yr(9,{destroy:void 0},vS.bind(null,c,n),null)),[r,d,e]}function vS(e,t){e.action=t}function Up(e){var t=gt(),n=We;if(n!==null)return Lp(t,n,e);gt(),t=t.memoizedState,n=gt();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Yr(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=Te.updateQueue,t===null&&(t=us(),Te.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Hp(){return gt().memoizedState}function hs(e,t,n,r){var c=It();Te.flags|=e,c.memoizedState=Yr(1|t,{destroy:void 0},n,r===void 0?null:r)}function ms(e,t,n,r){var c=gt();r=r===void 0?null:r;var d=c.memoizedState.inst;We!==null&&r!==null&&Bu(r,We.memoizedState.deps)?c.memoizedState=Yr(t,d,n,r):(Te.flags|=e,c.memoizedState=Yr(1|t,d,n,r))}function Bp(e,t){hs(8390656,8,e,t)}function Qu(e,t){ms(2048,8,e,t)}function gS(e){Te.flags|=4;var t=Te.updateQueue;if(t===null)t=us(),Te.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Pp(e){var t=gt().memoizedState;return gS({ref:t,nextImpl:e}),function(){if((Xe&2)!==0)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function qp(e,t){return ms(4,2,e,t)}function Vp(e,t){return ms(4,4,e,t)}function Yp(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Gp(e,t,n){n=n!=null?n.concat([e]):null,ms(4,4,Yp.bind(null,t,e),n)}function Zu(){}function Ip(e,t){var n=gt();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Bu(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function $p(e,t){var n=gt();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Bu(t,r[1]))return r[0];if(r=e(),er){Bn(!0);try{e()}finally{Bn(!1)}}return n.memoizedState=[r,t],r}function Fu(e,t,n){return n===void 0||(Aa&1073741824)!==0&&(Ue&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Kv(),Te.lanes|=e,gl|=e,n)}function Kp(e,t,n,r){return cn(n,t)?n:Pr.current!==null?(e=Fu(e,n,r),cn(e,t)||(jt=!0),e):(Aa&42)===0||(Aa&1073741824)!==0&&(Ue&261930)===0?(jt=!0,e.memoizedState=n):(e=Kv(),Te.lanes|=e,gl|=e,t)}function Xp(e,t,n,r,c){var d=$.p;$.p=d!==0&&8>d?d:8;var y=k.T,E={};k.T=E,ed(e,!1,t,n);try{var O=c(),Y=k.S;if(Y!==null&&Y(E,O),O!==null&&typeof O=="object"&&typeof O.then=="function"){var X=fS(O,r);$o(e,t,X,pn(e))}else $o(e,t,r,pn(e))}catch(F){$o(e,t,{then:function(){},status:"rejected",reason:F},pn())}finally{$.p=d,y!==null&&E.types!==null&&(y.types=E.types),k.T=y}}function yS(){}function Ju(e,t,n,r){if(e.tag!==5)throw Error(i(476));var c=Qp(e).queue;Xp(e,c,t,te,n===null?yS:function(){return Zp(e),n(r)})}function Qp(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ma,lastRenderedState:te},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ma,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Zp(e){var t=Qp(e);t.next===null&&(t=e.alternate.memoizedState),$o(e,t.next.queue,{},pn())}function Wu(){return kt(ci)}function Fp(){return gt().memoizedState}function Jp(){return gt().memoizedState}function xS(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pn();e=dl(n);var r=fl(t,e,n);r!==null&&(tn(r,t,n),qo(r,t,n)),t={cache:Nu()},e.payload=t;return}t=t.return}}function bS(e,t,n){var r=pn();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ps(e)?ev(t,n):(n=gu(e,t,n,r),n!==null&&(tn(n,e,r),tv(n,t,r)))}function Wp(e,t,n){var r=pn();$o(e,t,n,r)}function $o(e,t,n,r){var c={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(ps(e))ev(t,c);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var y=t.lastRenderedState,E=d(y,n);if(c.hasEagerState=!0,c.eagerState=E,cn(E,y))return Qi(e,t,c,0),lt===null&&Xi(),!1}catch{}finally{}if(n=gu(e,t,c,r),n!==null)return tn(n,e,r),tv(n,t,r),!0}return!1}function ed(e,t,n,r){if(r={lane:2,revertLane:Od(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},ps(e)){if(t)throw Error(i(479))}else t=gu(e,n,r,2),t!==null&&tn(t,e,2)}function ps(e){var t=e.alternate;return e===Te||t!==null&&t===Te}function ev(e,t){qr=ss=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function tv(e,t,n){if((n&4194048)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Xt(e,n)}}var Ko={readContext:kt,use:ds,useCallback:mt,useContext:mt,useEffect:mt,useImperativeHandle:mt,useLayoutEffect:mt,useInsertionEffect:mt,useMemo:mt,useReducer:mt,useRef:mt,useState:mt,useDebugValue:mt,useDeferredValue:mt,useTransition:mt,useSyncExternalStore:mt,useId:mt,useHostTransitionStatus:mt,useFormState:mt,useActionState:mt,useOptimistic:mt,useMemoCache:mt,useCacheRefresh:mt};Ko.useEffectEvent=mt;var nv={readContext:kt,use:ds,useCallback:function(e,t){return It().memoizedState=[e,t===void 0?null:t],e},useContext:kt,useEffect:Bp,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,hs(4194308,4,Yp.bind(null,t,e),n)},useLayoutEffect:function(e,t){return hs(4194308,4,e,t)},useInsertionEffect:function(e,t){hs(4,2,e,t)},useMemo:function(e,t){var n=It();t=t===void 0?null:t;var r=e();if(er){Bn(!0);try{e()}finally{Bn(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=It();if(n!==void 0){var c=n(t);if(er){Bn(!0);try{n(t)}finally{Bn(!1)}}}else c=t;return r.memoizedState=r.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},r.queue=e,e=e.dispatch=bS.bind(null,Te,e),[r.memoizedState,e]},useRef:function(e){var t=It();return e={current:e},t.memoizedState=e},useState:function(e){e=Ku(e);var t=e.queue,n=Wp.bind(null,Te,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Zu,useDeferredValue:function(e,t){var n=It();return Fu(n,e,t)},useTransition:function(){var e=Ku(!1);return e=Xp.bind(null,Te,e.queue,!0,!1),It().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=Te,c=It();if(Be){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),lt===null)throw Error(i(349));(Ue&127)!==0||jp(r,t,n)}c.memoizedState=n;var d={value:n,getSnapshot:t};return c.queue=d,Bp(Ep.bind(null,r,d,e),[e]),r.flags|=2048,Yr(9,{destroy:void 0},Cp.bind(null,r,d,n,t),null),n},useId:function(){var e=It(),t=lt.identifierPrefix;if(Be){var n=aa,r=na;n=(r&~(1<<32-bt(r)-1)).toString(32)+n,t="_"+t+"R_"+n,n=cs++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=hS++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Wu,useFormState:zp,useActionState:zp,useOptimistic:function(e){var t=It();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=ed.bind(null,Te,!0,n),n.dispatch=t,[e,t]},useMemoCache:Gu,useCacheRefresh:function(){return It().memoizedState=xS.bind(null,Te)},useEffectEvent:function(e){var t=It(),n={impl:e};return t.memoizedState=n,function(){if((Xe&2)!==0)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},td={readContext:kt,use:ds,useCallback:Ip,useContext:kt,useEffect:Qu,useImperativeHandle:Gp,useInsertionEffect:qp,useLayoutEffect:Vp,useMemo:$p,useReducer:fs,useRef:Hp,useState:function(){return fs(Ma)},useDebugValue:Zu,useDeferredValue:function(e,t){var n=gt();return Kp(n,We.memoizedState,e,t)},useTransition:function(){var e=fs(Ma)[0],t=gt().memoizedState;return[typeof e=="boolean"?e:Io(e),t]},useSyncExternalStore:wp,useId:Fp,useHostTransitionStatus:Wu,useFormState:kp,useActionState:kp,useOptimistic:function(e,t){var n=gt();return Np(n,We,e,t)},useMemoCache:Gu,useCacheRefresh:Jp};td.useEffectEvent=Pp;var av={readContext:kt,use:ds,useCallback:Ip,useContext:kt,useEffect:Qu,useImperativeHandle:Gp,useInsertionEffect:qp,useLayoutEffect:Vp,useMemo:$p,useReducer:$u,useRef:Hp,useState:function(){return $u(Ma)},useDebugValue:Zu,useDeferredValue:function(e,t){var n=gt();return We===null?Fu(n,e,t):Kp(n,We.memoizedState,e,t)},useTransition:function(){var e=$u(Ma)[0],t=gt().memoizedState;return[typeof e=="boolean"?e:Io(e),t]},useSyncExternalStore:wp,useId:Fp,useHostTransitionStatus:Wu,useFormState:Up,useActionState:Up,useOptimistic:function(e,t){var n=gt();return We!==null?Np(n,We,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Gu,useCacheRefresh:Jp};av.useEffectEvent=Pp;function nd(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:S({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ad={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=pn(),c=dl(r);c.payload=t,n!=null&&(c.callback=n),t=fl(e,c,r),t!==null&&(tn(t,e,r),qo(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=pn(),c=dl(r);c.tag=1,c.payload=t,n!=null&&(c.callback=n),t=fl(e,c,r),t!==null&&(tn(t,e,r),qo(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=pn(),r=dl(n);r.tag=2,t!=null&&(r.callback=t),t=fl(e,r,n),t!==null&&(tn(t,e,n),qo(t,e,n))}};function lv(e,t,n,r,c,d,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,d,y):t.prototype&&t.prototype.isPureReactComponent?!Do(n,r)||!Do(c,d):!0}function rv(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ad.enqueueReplaceState(t,t.state,null)}function tr(e,t){var n=t;if("ref"in t){n={};for(var r in t)r!=="ref"&&(n[r]=t[r])}if(e=e.defaultProps){n===t&&(n=S({},n));for(var c in e)n[c]===void 0&&(n[c]=e[c])}return n}function ov(e){Ki(e)}function iv(e){console.error(e)}function sv(e){Ki(e)}function vs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function cv(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function ld(e,t,n){return n=dl(n),n.tag=3,n.payload={element:null},n.callback=function(){vs(e,t)},n}function uv(e){return e=dl(e),e.tag=3,e}function dv(e,t,n,r){var c=n.type.getDerivedStateFromError;if(typeof c=="function"){var d=r.value;e.payload=function(){return c(d)},e.callback=function(){cv(t,n,r)}}var y=n.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){cv(t,n,r),typeof c!="function"&&(yl===null?yl=new Set([this]):yl.add(this));var E=r.stack;this.componentDidCatch(r.value,{componentStack:E!==null?E:""})})}function SS(e,t,n,r,c){if(n.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=n.alternate,t!==null&&kr(t,n,c,!0),n=dn.current,n!==null){switch(n.tag){case 31:case 13:return _n===null?Ns():n.alternate===null&&pt===0&&(pt=3),n.flags&=-257,n.flags|=65536,n.lanes=c,r===as?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Ad(e,r,c)),!1;case 22:return n.flags|=65536,r===as?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Ad(e,r,c)),!1}throw Error(i(435,n.tag))}return Ad(e,r,c),Ns(),!1}if(Be)return t=dn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,r!==ju&&(e=Error(i(422),{cause:r}),Lo(Tn(e,n)))):(r!==ju&&(t=Error(i(423),{cause:r}),Lo(Tn(t,n))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,r=Tn(r,n),c=ld(e.stateNode,r,c),zu(e,c),pt!==4&&(pt=2)),!1;var d=Error(i(520),{cause:r});if(d=Tn(d,n),ti===null?ti=[d]:ti.push(d),pt!==4&&(pt=2),t===null)return!0;r=Tn(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=c&-c,n.lanes|=e,e=ld(n.stateNode,r,e),zu(n,e),!1;case 1:if(t=n.type,d=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(yl===null||!yl.has(d))))return n.flags|=65536,c&=-c,n.lanes|=c,c=uv(c),dv(c,e,n,r),zu(n,c),!1}n=n.return}while(n!==null);return!1}var rd=Error(i(461)),jt=!1;function Lt(e,t,n,r){t.child=e===null?pp(t,null,n,r):Wl(t,e.child,n,r)}function fv(e,t,n,r,c){n=n.render;var d=t.ref;if("ref"in r){var y={};for(var E in r)E!=="ref"&&(y[E]=r[E])}else y=r;return Ql(t),r=Pu(e,t,n,y,d,c),E=qu(),e!==null&&!jt?(Vu(e,t,c),_a(e,t,c)):(Be&&E&&Su(t),t.flags|=1,Lt(e,t,r,c),t.child)}function hv(e,t,n,r,c){if(e===null){var d=n.type;return typeof d=="function"&&!yu(d)&&d.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=d,mv(e,t,d,r,c)):(e=Fi(n.type,null,r,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,!hd(e,c)){var y=d.memoizedProps;if(n=n.compare,n=n!==null?n:Do,n(y,r)&&e.ref===t.ref)return _a(e,t,c)}return t.flags|=1,e=Ea(d,r),e.ref=t.ref,e.return=t,t.child=e}function mv(e,t,n,r,c){if(e!==null){var d=e.memoizedProps;if(Do(d,r)&&e.ref===t.ref)if(jt=!1,t.pendingProps=r=d,hd(e,c))(e.flags&131072)!==0&&(jt=!0);else return t.lanes=e.lanes,_a(e,t,c)}return od(e,t,n,r,c)}function pv(e,t,n,r){var c=r.children,d=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if((t.flags&128)!==0){if(d=d!==null?d.baseLanes|n:n,e!==null){for(r=t.child=e.child,c=0;r!==null;)c=c|r.lanes|r.childLanes,r=r.sibling;r=c&~d}else r=0,t.child=null;return vv(e,t,d,n,r)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ts(t,d!==null?d.cachePool:null),d!==null?yp(t,d):Lu(),xp(t);else return r=t.lanes=536870912,vv(e,t,d!==null?d.baseLanes|n:n,n,r)}else d!==null?(ts(t,d.cachePool),yp(t,d),ml(),t.memoizedState=null):(e!==null&&ts(t,null),Lu(),ml());return Lt(e,t,c,n),t.child}function Xo(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function vv(e,t,n,r,c){var d=Mu();return d=d===null?null:{parent:St._currentValue,pool:d},t.memoizedState={baseLanes:n,cachePool:d},e!==null&&ts(t,null),Lu(),xp(t),e!==null&&kr(e,t,r,!0),t.childLanes=c,null}function gs(e,t){return t=xs({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function gv(e,t,n){return Wl(t,e.child,null,n),e=gs(t,t.pendingProps),e.flags|=2,fn(t),t.memoizedState=null,e}function wS(e,t,n){var r=t.pendingProps,c=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Be){if(r.mode==="hidden")return e=gs(t,r),t.lanes=536870912,Xo(null,e);if(Hu(t),(e=ct)?(e=Ag(e,Mn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ol!==null?{id:na,overflow:aa}:null,retryLane:536870912,hydrationErrors:null},n=ep(e),n.return=t,t.child=n,zt=t,ct=null)):e=null,e===null)throw sl(t);return t.lanes=536870912,null}return gs(t,r)}var d=e.memoizedState;if(d!==null){var y=d.dehydrated;if(Hu(t),c)if(t.flags&256)t.flags&=-257,t=gv(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(jt||kr(e,t,n,!1),c=(n&e.childLanes)!==0,jt||c){if(r=lt,r!==null&&(y=Pn(r,n),y!==0&&y!==d.retryLane))throw d.retryLane=y,Il(e,y),tn(r,e,y),rd;Ns(),t=gv(e,t,n)}else e=d.treeContext,ct=On(y.nextSibling),zt=t,Be=!0,il=null,Mn=!1,e!==null&&ap(t,e),t=gs(t,r),t.flags|=4096;return t}return e=Ea(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ys(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function od(e,t,n,r,c){return Ql(t),n=Pu(e,t,n,r,void 0,c),r=qu(),e!==null&&!jt?(Vu(e,t,c),_a(e,t,c)):(Be&&r&&Su(t),t.flags|=1,Lt(e,t,n,c),t.child)}function yv(e,t,n,r,c,d){return Ql(t),t.updateQueue=null,n=Sp(t,r,n,c),bp(e),r=qu(),e!==null&&!jt?(Vu(e,t,d),_a(e,t,d)):(Be&&r&&Su(t),t.flags|=1,Lt(e,t,n,d),t.child)}function xv(e,t,n,r,c){if(Ql(t),t.stateNode===null){var d=_r,y=n.contextType;typeof y=="object"&&y!==null&&(d=kt(y)),d=new n(r,d),t.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=ad,t.stateNode=d,d._reactInternals=t,d=t.stateNode,d.props=r,d.state=t.memoizedState,d.refs={},Ou(t),y=n.contextType,d.context=typeof y=="object"&&y!==null?kt(y):_r,d.state=t.memoizedState,y=n.getDerivedStateFromProps,typeof y=="function"&&(nd(t,n,y,r),d.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(y=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),y!==d.state&&ad.enqueueReplaceState(d,d.state,null),Yo(t,r,d,c),Vo(),d.state=t.memoizedState),typeof d.componentDidMount=="function"&&(t.flags|=4194308),r=!0}else if(e===null){d=t.stateNode;var E=t.memoizedProps,O=tr(n,E);d.props=O;var Y=d.context,X=n.contextType;y=_r,typeof X=="object"&&X!==null&&(y=kt(X));var F=n.getDerivedStateFromProps;X=typeof F=="function"||typeof d.getSnapshotBeforeUpdate=="function",E=t.pendingProps!==E,X||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(E||Y!==y)&&rv(t,d,r,y),ul=!1;var G=t.memoizedState;d.state=G,Yo(t,r,d,c),Vo(),Y=t.memoizedState,E||G!==Y||ul?(typeof F=="function"&&(nd(t,n,F,r),Y=t.memoizedState),(O=ul||lv(t,n,O,r,G,Y,y))?(X||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(t.flags|=4194308)):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=Y),d.props=r,d.state=Y,d.context=y,r=O):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{d=t.stateNode,Du(e,t),y=t.memoizedProps,X=tr(n,y),d.props=X,F=t.pendingProps,G=d.context,Y=n.contextType,O=_r,typeof Y=="object"&&Y!==null&&(O=kt(Y)),E=n.getDerivedStateFromProps,(Y=typeof E=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(y!==F||G!==O)&&rv(t,d,r,O),ul=!1,G=t.memoizedState,d.state=G,Yo(t,r,d,c),Vo();var I=t.memoizedState;y!==F||G!==I||ul||e!==null&&e.dependencies!==null&&Wi(e.dependencies)?(typeof E=="function"&&(nd(t,n,E,r),I=t.memoizedState),(X=ul||lv(t,n,X,r,G,I,O)||e!==null&&e.dependencies!==null&&Wi(e.dependencies))?(Y||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(r,I,O),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(r,I,O)),typeof d.componentDidUpdate=="function"&&(t.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof d.componentDidUpdate!="function"||y===e.memoizedProps&&G===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&G===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=I),d.props=r,d.state=I,d.context=O,r=X):(typeof d.componentDidUpdate!="function"||y===e.memoizedProps&&G===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&G===e.memoizedState||(t.flags|=1024),r=!1)}return d=r,ys(e,t),r=(t.flags&128)!==0,d||r?(d=t.stateNode,n=r&&typeof n.getDerivedStateFromError!="function"?null:d.render(),t.flags|=1,e!==null&&r?(t.child=Wl(t,e.child,null,c),t.child=Wl(t,null,n,c)):Lt(e,t,n,c),t.memoizedState=d.state,e=t.child):e=_a(e,t,c),e}function bv(e,t,n,r){return Kl(),t.flags|=256,Lt(e,t,n,r),t.child}var id={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function sd(e){return{baseLanes:e,cachePool:cp()}}function cd(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=mn),e}function Sv(e,t,n){var r=t.pendingProps,c=!1,d=(t.flags&128)!==0,y;if((y=d)||(y=e!==null&&e.memoizedState===null?!1:(vt.current&2)!==0),y&&(c=!0,t.flags&=-129),y=(t.flags&32)!==0,t.flags&=-33,e===null){if(Be){if(c?hl(t):ml(),(e=ct)?(e=Ag(e,Mn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ol!==null?{id:na,overflow:aa}:null,retryLane:536870912,hydrationErrors:null},n=ep(e),n.return=t,t.child=n,zt=t,ct=null)):e=null,e===null)throw sl(t);return Id(e)?t.lanes=32:t.lanes=536870912,null}var E=r.children;return r=r.fallback,c?(ml(),c=t.mode,E=xs({mode:"hidden",children:E},c),r=$l(r,c,n,null),E.return=t,r.return=t,E.sibling=r,t.child=E,r=t.child,r.memoizedState=sd(n),r.childLanes=cd(e,y,n),t.memoizedState=id,Xo(null,r)):(hl(t),ud(t,E))}var O=e.memoizedState;if(O!==null&&(E=O.dehydrated,E!==null)){if(d)t.flags&256?(hl(t),t.flags&=-257,t=dd(e,t,n)):t.memoizedState!==null?(ml(),t.child=e.child,t.flags|=128,t=null):(ml(),E=r.fallback,c=t.mode,r=xs({mode:"visible",children:r.children},c),E=$l(E,c,n,null),E.flags|=2,r.return=t,E.return=t,r.sibling=E,t.child=r,Wl(t,e.child,null,n),r=t.child,r.memoizedState=sd(n),r.childLanes=cd(e,y,n),t.memoizedState=id,t=Xo(null,r));else if(hl(t),Id(E)){if(y=E.nextSibling&&E.nextSibling.dataset,y)var Y=y.dgst;y=Y,r=Error(i(419)),r.stack="",r.digest=y,Lo({value:r,source:null,stack:null}),t=dd(e,t,n)}else if(jt||kr(e,t,n,!1),y=(n&e.childLanes)!==0,jt||y){if(y=lt,y!==null&&(r=Pn(y,n),r!==0&&r!==O.retryLane))throw O.retryLane=r,Il(e,r),tn(y,e,r),rd;Gd(E)||Ns(),t=dd(e,t,n)}else Gd(E)?(t.flags|=192,t.child=e.child,t=null):(e=O.treeContext,ct=On(E.nextSibling),zt=t,Be=!0,il=null,Mn=!1,e!==null&&ap(t,e),t=ud(t,r.children),t.flags|=4096);return t}return c?(ml(),E=r.fallback,c=t.mode,O=e.child,Y=O.sibling,r=Ea(O,{mode:"hidden",children:r.children}),r.subtreeFlags=O.subtreeFlags&65011712,Y!==null?E=Ea(Y,E):(E=$l(E,c,n,null),E.flags|=2),E.return=t,r.return=t,r.sibling=E,t.child=r,Xo(null,r),r=t.child,E=e.child.memoizedState,E===null?E=sd(n):(c=E.cachePool,c!==null?(O=St._currentValue,c=c.parent!==O?{parent:O,pool:O}:c):c=cp(),E={baseLanes:E.baseLanes|n,cachePool:c}),r.memoizedState=E,r.childLanes=cd(e,y,n),t.memoizedState=id,Xo(e.child,r)):(hl(t),n=e.child,e=n.sibling,n=Ea(n,{mode:"visible",children:r.children}),n.return=t,n.sibling=null,e!==null&&(y=t.deletions,y===null?(t.deletions=[e],t.flags|=16):y.push(e)),t.child=n,t.memoizedState=null,n)}function ud(e,t){return t=xs({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function xs(e,t){return e=un(22,e,null,t),e.lanes=0,e}function dd(e,t,n){return Wl(t,e.child,null,n),e=ud(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function wv(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ru(e.return,t,n)}function fd(e,t,n,r,c,d){var y=e.memoizedState;y===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:c,treeForkCount:d}:(y.isBackwards=t,y.rendering=null,y.renderingStartTime=0,y.last=r,y.tail=n,y.tailMode=c,y.treeForkCount=d)}function jv(e,t,n){var r=t.pendingProps,c=r.revealOrder,d=r.tail;r=r.children;var y=vt.current,E=(y&2)!==0;if(E?(y=y&1|2,t.flags|=128):y&=1,K(vt,y),Lt(e,t,r,n),r=Be?ko:0,!E&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&wv(e,n,t);else if(e.tag===19)wv(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(c){case"forwards":for(n=t.child,c=null;n!==null;)e=n.alternate,e!==null&&is(e)===null&&(c=n),n=n.sibling;n=c,n===null?(c=t.child,t.child=null):(c=n.sibling,n.sibling=null),fd(t,!1,c,n,d,r);break;case"backwards":case"unstable_legacy-backwards":for(n=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&is(e)===null){t.child=c;break}e=c.sibling,c.sibling=n,n=c,c=e}fd(t,!0,n,null,d,r);break;case"together":fd(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function _a(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),gl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(kr(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=Ea(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ea(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function hd(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Wi(e)))}function jS(e,t,n){switch(t.tag){case 3:ue(t,t.stateNode.containerInfo),cl(t,St,e.memoizedState.cache),Kl();break;case 27:case 5:De(t);break;case 4:ue(t,t.stateNode.containerInfo);break;case 10:cl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Hu(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated!==null?(hl(t),t.flags|=128,null):(n&t.child.childLanes)!==0?Sv(e,t,n):(hl(t),e=_a(e,t,n),e!==null?e.sibling:null);hl(t);break;case 19:var c=(e.flags&128)!==0;if(r=(n&t.childLanes)!==0,r||(kr(e,t,n,!1),r=(n&t.childLanes)!==0),c){if(r)return jv(e,t,n);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),K(vt,vt.current),r)break;return null;case 22:return t.lanes=0,pv(e,t,n,t.pendingProps);case 24:cl(t,St,e.memoizedState.cache)}return _a(e,t,n)}function Cv(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)jt=!0;else{if(!hd(e,n)&&(t.flags&128)===0)return jt=!1,jS(e,t,n);jt=(e.flags&131072)!==0}else jt=!1,Be&&(t.flags&1048576)!==0&&np(t,ko,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=Fl(t.elementType),t.type=e,typeof e=="function")yu(e)?(r=tr(e,r),t.tag=1,t=xv(null,t,e,r,n)):(t.tag=0,t=od(null,t,e,r,n));else{if(e!=null){var c=e.$$typeof;if(c===_){t.tag=11,t=fv(null,t,e,r,n);break e}else if(c===z){t.tag=14,t=hv(null,t,e,r,n);break e}}throw t=se(e)||e,Error(i(306,t,""))}}return t;case 0:return od(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,c=tr(r,t.pendingProps),xv(e,t,r,c,n);case 3:e:{if(ue(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var d=t.memoizedState;c=d.element,Du(e,t),Yo(t,r,null,n);var y=t.memoizedState;if(r=y.cache,cl(t,St,r),r!==d.cache&&Tu(t,[St],n,!0),Vo(),r=y.element,d.isDehydrated)if(d={element:r,isDehydrated:!1,cache:y.cache},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){t=bv(e,t,r,n);break e}else if(r!==c){c=Tn(Error(i(424)),t),Lo(c),t=bv(e,t,r,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(ct=On(e.firstChild),zt=t,Be=!0,il=null,Mn=!0,n=pp(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Kl(),r===c){t=_a(e,t,n);break e}Lt(e,t,r,n)}t=t.child}return t;case 26:return ys(e,t),e===null?(n=kg(t.type,null,t.pendingProps,null))?t.memoizedState=n:Be||(n=t.type,e=t.pendingProps,r=ks(de.current).createElement(n),r[Dt]=t,r[Qt]=e,Ut(r,n,e),Nt(r),t.stateNode=r):t.memoizedState=kg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return De(t),e===null&&Be&&(r=t.stateNode=Og(t.type,t.pendingProps,de.current),zt=t,Mn=!0,c=ct,wl(t.type)?($d=c,ct=On(r.firstChild)):ct=c),Lt(e,t,t.pendingProps.children,n),ys(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Be&&((c=r=ct)&&(r=WS(r,t.type,t.pendingProps,Mn),r!==null?(t.stateNode=r,zt=t,ct=On(r.firstChild),Mn=!1,c=!0):c=!1),c||sl(t)),De(t),c=t.type,d=t.pendingProps,y=e!==null?e.memoizedProps:null,r=d.children,qd(c,d)?r=null:y!==null&&qd(c,y)&&(t.flags|=32),t.memoizedState!==null&&(c=Pu(e,t,mS,null,null,n),ci._currentValue=c),ys(e,t),Lt(e,t,r,n),t.child;case 6:return e===null&&Be&&((e=n=ct)&&(n=ew(n,t.pendingProps,Mn),n!==null?(t.stateNode=n,zt=t,ct=null,e=!0):e=!1),e||sl(t)),null;case 13:return Sv(e,t,n);case 4:return ue(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Wl(t,null,r,n):Lt(e,t,r,n),t.child;case 11:return fv(e,t,t.type,t.pendingProps,n);case 7:return Lt(e,t,t.pendingProps,n),t.child;case 8:return Lt(e,t,t.pendingProps.children,n),t.child;case 12:return Lt(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,cl(t,t.type,r.value),Lt(e,t,r.children,n),t.child;case 9:return c=t.type._context,r=t.pendingProps.children,Ql(t),c=kt(c),r=r(c),t.flags|=1,Lt(e,t,r,n),t.child;case 14:return hv(e,t,t.type,t.pendingProps,n);case 15:return mv(e,t,t.type,t.pendingProps,n);case 19:return jv(e,t,n);case 31:return wS(e,t,n);case 22:return pv(e,t,n,t.pendingProps);case 24:return Ql(t),r=kt(St),e===null?(c=Mu(),c===null&&(c=lt,d=Nu(),c.pooledCache=d,d.refCount++,d!==null&&(c.pooledCacheLanes|=n),c=d),t.memoizedState={parent:r,cache:c},Ou(t),cl(t,St,c)):((e.lanes&n)!==0&&(Du(e,t),Yo(t,null,null,n),Vo()),c=e.memoizedState,d=t.memoizedState,c.parent!==r?(c={parent:r,cache:r},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),cl(t,St,r)):(r=d.cache,cl(t,St,r),r!==c.cache&&Tu(t,[St],n,!0))),Lt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Oa(e){e.flags|=4}function md(e,t,n,r,c){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(Fv())e.flags|=8192;else throw Jl=as,_u}else e.flags&=-16777217}function Ev(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Pg(t))if(Fv())e.flags|=8192;else throw Jl=as,_u}function bs(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?at():536870912,e.lanes|=t,Kr|=t)}function Qo(e,t){if(!Be)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ut(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var c=e.child;c!==null;)n|=c.lanes|c.childLanes,r|=c.subtreeFlags&65011712,r|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)n|=c.lanes|c.childLanes,r|=c.subtreeFlags,r|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function CS(e,t,n){var r=t.pendingProps;switch(wu(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ut(t),null;case 1:return ut(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Na(St),ge(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(zr(t)?Oa(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Cu())),ut(t),null;case 26:var c=t.type,d=t.memoizedState;return e===null?(Oa(t),d!==null?(ut(t),Ev(t,d)):(ut(t),md(t,c,null,r,n))):d?d!==e.memoizedState?(Oa(t),ut(t),Ev(t,d)):(ut(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&Oa(t),ut(t),md(t,c,e,r,n)),null;case 27:if(_e(t),n=de.current,c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Oa(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return ut(t),null}e=B.current,zr(t)?lp(t):(e=Og(c,r,n),t.stateNode=e,Oa(t))}return ut(t),null;case 5:if(_e(t),c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Oa(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return ut(t),null}if(d=B.current,zr(t))lp(t);else{var y=ks(de.current);switch(d){case 1:d=y.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:d=y.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":d=y.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":d=y.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":d=y.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof r.is=="string"?y.createElement("select",{is:r.is}):y.createElement("select"),r.multiple?d.multiple=!0:r.size&&(d.size=r.size);break;default:d=typeof r.is=="string"?y.createElement(c,{is:r.is}):y.createElement(c)}}d[Dt]=t,d[Qt]=r;e:for(y=t.child;y!==null;){if(y.tag===5||y.tag===6)d.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===t)break e;for(;y.sibling===null;){if(y.return===null||y.return===t)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}t.stateNode=d;e:switch(Ut(d,c,r),c){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&Oa(t)}}return ut(t),md(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Oa(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(i(166));if(e=de.current,zr(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,c=zt,c!==null)switch(c.tag){case 27:case 5:r=c.memoizedProps}e[Dt]=t,e=!!(e.nodeValue===n||r!==null&&r.suppressHydrationWarning===!0||Sg(e.nodeValue,n)),e||sl(t,!0)}else e=ks(e).createTextNode(r),e[Dt]=t,t.stateNode=e}return ut(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=zr(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(557));e[Dt]=t}else Kl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ut(t),e=!1}else n=Cu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(fn(t),t):(fn(t),null);if((t.flags&128)!==0)throw Error(i(558))}return ut(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=zr(t),r!==null&&r.dehydrated!==null){if(e===null){if(!c)throw Error(i(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(i(317));c[Dt]=t}else Kl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ut(t),c=!1}else c=Cu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(fn(t),t):(fn(t),null)}return fn(t),(t.flags&128)!==0?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,c=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(c=r.alternate.memoizedState.cachePool.pool),d=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(d=r.memoizedState.cachePool.pool),d!==c&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),bs(t,t.updateQueue),ut(t),null);case 4:return ge(),e===null&&Ld(t.stateNode.containerInfo),ut(t),null;case 10:return Na(t.type),ut(t),null;case 19:if(H(vt),r=t.memoizedState,r===null)return ut(t),null;if(c=(t.flags&128)!==0,d=r.rendering,d===null)if(c)Qo(r,!1);else{if(pt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(d=is(e),d!==null){for(t.flags|=128,Qo(r,!1),e=d.updateQueue,t.updateQueue=e,bs(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Wm(n,e),n=n.sibling;return K(vt,vt.current&1|2),Be&&Ra(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Vt()>Es&&(t.flags|=128,c=!0,Qo(r,!1),t.lanes=4194304)}else{if(!c)if(e=is(d),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,bs(t,e),Qo(r,!0),r.tail===null&&r.tailMode==="hidden"&&!d.alternate&&!Be)return ut(t),null}else 2*Vt()-r.renderingStartTime>Es&&n!==536870912&&(t.flags|=128,c=!0,Qo(r,!1),t.lanes=4194304);r.isBackwards?(d.sibling=t.child,t.child=d):(e=r.last,e!==null?e.sibling=d:t.child=d,r.last=d)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Vt(),e.sibling=null,n=vt.current,K(vt,c?n&1|2:n&1),Be&&Ra(t,r.treeForkCount),e):(ut(t),null);case 22:case 23:return fn(t),Uu(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?(n&536870912)!==0&&(t.flags&128)===0&&(ut(t),t.subtreeFlags&6&&(t.flags|=8192)):ut(t),n=t.updateQueue,n!==null&&bs(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&H(Zl),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Na(St),ut(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function ES(e,t){switch(wu(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Na(St),ge(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return _e(t),null;case 31:if(t.memoizedState!==null){if(fn(t),t.alternate===null)throw Error(i(340));Kl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(fn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Kl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return H(vt),null;case 4:return ge(),null;case 10:return Na(t.type),null;case 22:case 23:return fn(t),Uu(),e!==null&&H(Zl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Na(St),null;case 25:return null;default:return null}}function Rv(e,t){switch(wu(t),t.tag){case 3:Na(St),ge();break;case 26:case 27:case 5:_e(t);break;case 4:ge();break;case 31:t.memoizedState!==null&&fn(t);break;case 13:fn(t);break;case 19:H(vt);break;case 10:Na(t.type);break;case 22:case 23:fn(t),Uu(),e!==null&&H(Zl);break;case 24:Na(St)}}function Zo(e,t){try{var n=t.updateQueue,r=n!==null?n.lastEffect:null;if(r!==null){var c=r.next;n=c;do{if((n.tag&e)===e){r=void 0;var d=n.create,y=n.inst;r=d(),y.destroy=r}n=n.next}while(n!==c)}}catch(E){Je(t,t.return,E)}}function pl(e,t,n){try{var r=t.updateQueue,c=r!==null?r.lastEffect:null;if(c!==null){var d=c.next;r=d;do{if((r.tag&e)===e){var y=r.inst,E=y.destroy;if(E!==void 0){y.destroy=void 0,c=t;var O=n,Y=E;try{Y()}catch(X){Je(c,O,X)}}}r=r.next}while(r!==d)}}catch(X){Je(t,t.return,X)}}function Tv(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{gp(t,n)}catch(r){Je(e,e.return,r)}}}function Nv(e,t,n){n.props=tr(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){Je(e,t,r)}}function Fo(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n=="function"?e.refCleanup=n(r):n.current=r}}catch(c){Je(e,t,c)}}function la(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r=="function")try{r()}catch(c){Je(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(c){Je(e,t,c)}else n.current=null}function Av(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(c){Je(e,e.return,c)}}function pd(e,t,n){try{var r=e.stateNode;KS(r,e.type,n,t),r[Qt]=t}catch(c){Je(e,e.return,c)}}function Mv(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&wl(e.type)||e.tag===4}function vd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Mv(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&wl(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function gd(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ja));else if(r!==4&&(r===27&&wl(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(gd(e,t,n),e=e.sibling;e!==null;)gd(e,t,n),e=e.sibling}function Ss(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&wl(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Ss(e,t,n),e=e.sibling;e!==null;)Ss(e,t,n),e=e.sibling}function _v(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);Ut(t,r,n),t[Dt]=e,t[Qt]=n}catch(d){Je(e,e.return,d)}}var Da=!1,Ct=!1,yd=!1,Ov=typeof WeakSet=="function"?WeakSet:Set,At=null;function RS(e,t){if(e=e.containerInfo,Bd=Vs,e=Gm(e),du(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var c=r.anchorOffset,d=r.focusNode;r=r.focusOffset;try{n.nodeType,d.nodeType}catch{n=null;break e}var y=0,E=-1,O=-1,Y=0,X=0,F=e,G=null;t:for(;;){for(var I;F!==n||c!==0&&F.nodeType!==3||(E=y+c),F!==d||r!==0&&F.nodeType!==3||(O=y+r),F.nodeType===3&&(y+=F.nodeValue.length),(I=F.firstChild)!==null;)G=F,F=I;for(;;){if(F===e)break t;if(G===n&&++Y===c&&(E=y),G===d&&++X===r&&(O=y),(I=F.nextSibling)!==null)break;F=G,G=F.parentNode}F=I}n=E===-1||O===-1?null:{start:E,end:O}}else n=null}n=n||{start:0,end:0}}else n=null;for(Pd={focusedElem:e,selectionRange:n},Vs=!1,At=t;At!==null;)if(t=At,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,At=e;else for(;At!==null;){switch(t=At,d=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)c=e[n],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,n=t,c=d.memoizedProps,d=d.memoizedState,r=n.stateNode;try{var fe=tr(n.type,c);e=r.getSnapshotBeforeUpdate(fe,d),r.__reactInternalSnapshotBeforeUpdate=e}catch(we){Je(n,n.return,we)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Yd(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Yd(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,At=e;break}At=t.return}}function Dv(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:ka(e,n),r&4&&Zo(5,n);break;case 1:if(ka(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(y){Je(n,n.return,y)}else{var c=tr(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(y){Je(n,n.return,y)}}r&64&&Tv(n),r&512&&Fo(n,n.return);break;case 3:if(ka(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{gp(e,t)}catch(y){Je(n,n.return,y)}}break;case 27:t===null&&r&4&&_v(n);case 26:case 5:ka(e,n),t===null&&r&4&&Av(n),r&512&&Fo(n,n.return);break;case 12:ka(e,n);break;case 31:ka(e,n),r&4&&Lv(e,n);break;case 13:ka(e,n),r&4&&Uv(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=kS.bind(null,n),tw(e,n))));break;case 22:if(r=n.memoizedState!==null||Da,!r){t=t!==null&&t.memoizedState!==null||Ct,c=Da;var d=Ct;Da=r,(Ct=t)&&!d?La(e,n,(n.subtreeFlags&8772)!==0):ka(e,n),Da=c,Ct=d}break;case 30:break;default:ka(e,n)}}function zv(e){var t=e.alternate;t!==null&&(e.alternate=null,zv(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Xc(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ft=null,Ft=!1;function za(e,t,n){for(n=n.child;n!==null;)kv(e,t,n),n=n.sibling}function kv(e,t,n){if(xt&&typeof xt.onCommitFiberUnmount=="function")try{xt.onCommitFiberUnmount(Sa,n)}catch{}switch(n.tag){case 26:Ct||la(n,t),za(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Ct||la(n,t);var r=ft,c=Ft;wl(n.type)&&(ft=n.stateNode,Ft=!1),za(e,t,n),oi(n.stateNode),ft=r,Ft=c;break;case 5:Ct||la(n,t);case 6:if(r=ft,c=Ft,ft=null,za(e,t,n),ft=r,Ft=c,ft!==null)if(Ft)try{(ft.nodeType===9?ft.body:ft.nodeName==="HTML"?ft.ownerDocument.body:ft).removeChild(n.stateNode)}catch(d){Je(n,t,d)}else try{ft.removeChild(n.stateNode)}catch(d){Je(n,t,d)}break;case 18:ft!==null&&(Ft?(e=ft,Tg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),to(e)):Tg(ft,n.stateNode));break;case 4:r=ft,c=Ft,ft=n.stateNode.containerInfo,Ft=!0,za(e,t,n),ft=r,Ft=c;break;case 0:case 11:case 14:case 15:pl(2,n,t),Ct||pl(4,n,t),za(e,t,n);break;case 1:Ct||(la(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"&&Nv(n,t,r)),za(e,t,n);break;case 21:za(e,t,n);break;case 22:Ct=(r=Ct)||n.memoizedState!==null,za(e,t,n),Ct=r;break;default:za(e,t,n)}}function Lv(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{to(e)}catch(n){Je(t,t.return,n)}}}function Uv(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{to(e)}catch(n){Je(t,t.return,n)}}function TS(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Ov),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Ov),t;default:throw Error(i(435,e.tag))}}function ws(e,t){var n=TS(e);t.forEach(function(r){if(!n.has(r)){n.add(r);var c=LS.bind(null,e,r);r.then(c,c)}})}function Jt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var c=n[r],d=e,y=t,E=y;e:for(;E!==null;){switch(E.tag){case 27:if(wl(E.type)){ft=E.stateNode,Ft=!1;break e}break;case 5:ft=E.stateNode,Ft=!1;break e;case 3:case 4:ft=E.stateNode.containerInfo,Ft=!0;break e}E=E.return}if(ft===null)throw Error(i(160));kv(d,y,c),ft=null,Ft=!1,d=c.alternate,d!==null&&(d.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Hv(t,e),t=t.sibling}var Vn=null;function Hv(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Jt(t,e),Wt(e),r&4&&(pl(3,e,e.return),Zo(3,e),pl(5,e,e.return));break;case 1:Jt(t,e),Wt(e),r&512&&(Ct||n===null||la(n,n.return)),r&64&&Da&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var c=Vn;if(Jt(t,e),Wt(e),r&512&&(Ct||n===null||la(n,n.return)),r&4){var d=n!==null?n.memoizedState:null;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){e:{r=e.type,n=e.memoizedProps,c=c.ownerDocument||c;t:switch(r){case"title":d=c.getElementsByTagName("title")[0],(!d||d[Co]||d[Dt]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=c.createElement(r),c.head.insertBefore(d,c.querySelector("head > title"))),Ut(d,r,n),d[Dt]=e,Nt(d),r=d;break e;case"link":var y=Hg("link","href",c).get(r+(n.href||""));if(y){for(var E=0;E<y.length;E++)if(d=y[E],d.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&d.getAttribute("rel")===(n.rel==null?null:n.rel)&&d.getAttribute("title")===(n.title==null?null:n.title)&&d.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){y.splice(E,1);break t}}d=c.createElement(r),Ut(d,r,n),c.head.appendChild(d);break;case"meta":if(y=Hg("meta","content",c).get(r+(n.content||""))){for(E=0;E<y.length;E++)if(d=y[E],d.getAttribute("content")===(n.content==null?null:""+n.content)&&d.getAttribute("name")===(n.name==null?null:n.name)&&d.getAttribute("property")===(n.property==null?null:n.property)&&d.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&d.getAttribute("charset")===(n.charSet==null?null:n.charSet)){y.splice(E,1);break t}}d=c.createElement(r),Ut(d,r,n),c.head.appendChild(d);break;default:throw Error(i(468,r))}d[Dt]=e,Nt(d),r=d}e.stateNode=r}else Bg(c,e.type,e.stateNode);else e.stateNode=Ug(c,r,e.memoizedProps);else d!==r?(d===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):d.count--,r===null?Bg(c,e.type,e.stateNode):Ug(c,r,e.memoizedProps)):r===null&&e.stateNode!==null&&pd(e,e.memoizedProps,n.memoizedProps)}break;case 27:Jt(t,e),Wt(e),r&512&&(Ct||n===null||la(n,n.return)),n!==null&&r&4&&pd(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Jt(t,e),Wt(e),r&512&&(Ct||n===null||la(n,n.return)),e.flags&32){c=e.stateNode;try{Cr(c,"")}catch(fe){Je(e,e.return,fe)}}r&4&&e.stateNode!=null&&(c=e.memoizedProps,pd(e,c,n!==null?n.memoizedProps:c)),r&1024&&(yd=!0);break;case 6:if(Jt(t,e),Wt(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(fe){Je(e,e.return,fe)}}break;case 3:if(Hs=null,c=Vn,Vn=Ls(t.containerInfo),Jt(t,e),Vn=c,Wt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{to(t.containerInfo)}catch(fe){Je(e,e.return,fe)}yd&&(yd=!1,Bv(e));break;case 4:r=Vn,Vn=Ls(e.stateNode.containerInfo),Jt(t,e),Wt(e),Vn=r;break;case 12:Jt(t,e),Wt(e);break;case 31:Jt(t,e),Wt(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ws(e,r)));break;case 13:Jt(t,e),Wt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Cs=Vt()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ws(e,r)));break;case 22:c=e.memoizedState!==null;var O=n!==null&&n.memoizedState!==null,Y=Da,X=Ct;if(Da=Y||c,Ct=X||O,Jt(t,e),Ct=X,Da=Y,Wt(e),r&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(n===null||O||Da||Ct||nr(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){O=n=t;try{if(d=O.stateNode,c)y=d.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{E=O.stateNode;var F=O.memoizedProps.style,G=F!=null&&F.hasOwnProperty("display")?F.display:null;E.style.display=G==null||typeof G=="boolean"?"":(""+G).trim()}}catch(fe){Je(O,O.return,fe)}}}else if(t.tag===6){if(n===null){O=t;try{O.stateNode.nodeValue=c?"":O.memoizedProps}catch(fe){Je(O,O.return,fe)}}}else if(t.tag===18){if(n===null){O=t;try{var I=O.stateNode;c?Ng(I,!0):Ng(O.stateNode,!1)}catch(fe){Je(O,O.return,fe)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,ws(e,n))));break;case 19:Jt(t,e),Wt(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ws(e,r)));break;case 30:break;case 21:break;default:Jt(t,e),Wt(e)}}function Wt(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Mv(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode,d=vd(e);Ss(e,d,c);break;case 5:var y=n.stateNode;n.flags&32&&(Cr(y,""),n.flags&=-33);var E=vd(e);Ss(e,E,y);break;case 3:case 4:var O=n.stateNode.containerInfo,Y=vd(e);gd(e,Y,O);break;default:throw Error(i(161))}}catch(X){Je(e,e.return,X)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Bv(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Bv(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ka(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Dv(e,t.alternate,t),t=t.sibling}function nr(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:pl(4,t,t.return),nr(t);break;case 1:la(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&Nv(t,t.return,n),nr(t);break;case 27:oi(t.stateNode);case 26:case 5:la(t,t.return),nr(t);break;case 22:t.memoizedState===null&&nr(t);break;case 30:nr(t);break;default:nr(t)}e=e.sibling}}function La(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var r=t.alternate,c=e,d=t,y=d.flags;switch(d.tag){case 0:case 11:case 15:La(c,d,n),Zo(4,d);break;case 1:if(La(c,d,n),r=d,c=r.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(Y){Je(r,r.return,Y)}if(r=d,c=r.updateQueue,c!==null){var E=r.stateNode;try{var O=c.shared.hiddenCallbacks;if(O!==null)for(c.shared.hiddenCallbacks=null,c=0;c<O.length;c++)vp(O[c],E)}catch(Y){Je(r,r.return,Y)}}n&&y&64&&Tv(d),Fo(d,d.return);break;case 27:_v(d);case 26:case 5:La(c,d,n),n&&r===null&&y&4&&Av(d),Fo(d,d.return);break;case 12:La(c,d,n);break;case 31:La(c,d,n),n&&y&4&&Lv(c,d);break;case 13:La(c,d,n),n&&y&4&&Uv(c,d);break;case 22:d.memoizedState===null&&La(c,d,n),Fo(d,d.return);break;case 30:break;default:La(c,d,n)}t=t.sibling}}function xd(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Uo(n))}function bd(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Uo(e))}function Yn(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Pv(e,t,n,r),t=t.sibling}function Pv(e,t,n,r){var c=t.flags;switch(t.tag){case 0:case 11:case 15:Yn(e,t,n,r),c&2048&&Zo(9,t);break;case 1:Yn(e,t,n,r);break;case 3:Yn(e,t,n,r),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Uo(e)));break;case 12:if(c&2048){Yn(e,t,n,r),e=t.stateNode;try{var d=t.memoizedProps,y=d.id,E=d.onPostCommit;typeof E=="function"&&E(y,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(O){Je(t,t.return,O)}}else Yn(e,t,n,r);break;case 31:Yn(e,t,n,r);break;case 13:Yn(e,t,n,r);break;case 23:break;case 22:d=t.stateNode,y=t.alternate,t.memoizedState!==null?d._visibility&2?Yn(e,t,n,r):Jo(e,t):d._visibility&2?Yn(e,t,n,r):(d._visibility|=2,Gr(e,t,n,r,(t.subtreeFlags&10256)!==0||!1)),c&2048&&xd(y,t);break;case 24:Yn(e,t,n,r),c&2048&&bd(t.alternate,t);break;default:Yn(e,t,n,r)}}function Gr(e,t,n,r,c){for(c=c&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var d=e,y=t,E=n,O=r,Y=y.flags;switch(y.tag){case 0:case 11:case 15:Gr(d,y,E,O,c),Zo(8,y);break;case 23:break;case 22:var X=y.stateNode;y.memoizedState!==null?X._visibility&2?Gr(d,y,E,O,c):Jo(d,y):(X._visibility|=2,Gr(d,y,E,O,c)),c&&Y&2048&&xd(y.alternate,y);break;case 24:Gr(d,y,E,O,c),c&&Y&2048&&bd(y.alternate,y);break;default:Gr(d,y,E,O,c)}t=t.sibling}}function Jo(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,c=r.flags;switch(r.tag){case 22:Jo(n,r),c&2048&&xd(r.alternate,r);break;case 24:Jo(n,r),c&2048&&bd(r.alternate,r);break;default:Jo(n,r)}t=t.sibling}}var Wo=8192;function Ir(e,t,n){if(e.subtreeFlags&Wo)for(e=e.child;e!==null;)qv(e,t,n),e=e.sibling}function qv(e,t,n){switch(e.tag){case 26:Ir(e,t,n),e.flags&Wo&&e.memoizedState!==null&&hw(n,Vn,e.memoizedState,e.memoizedProps);break;case 5:Ir(e,t,n);break;case 3:case 4:var r=Vn;Vn=Ls(e.stateNode.containerInfo),Ir(e,t,n),Vn=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Wo,Wo=16777216,Ir(e,t,n),Wo=r):Ir(e,t,n));break;default:Ir(e,t,n)}}function Vv(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function ei(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];At=r,Gv(r,e)}Vv(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Yv(e),e=e.sibling}function Yv(e){switch(e.tag){case 0:case 11:case 15:ei(e),e.flags&2048&&pl(9,e,e.return);break;case 3:ei(e);break;case 12:ei(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,js(e)):ei(e);break;default:ei(e)}}function js(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];At=r,Gv(r,e)}Vv(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:pl(8,t,t.return),js(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,js(t));break;default:js(t)}e=e.sibling}}function Gv(e,t){for(;At!==null;){var n=At;switch(n.tag){case 0:case 11:case 15:pl(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Uo(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,At=r;else e:for(n=e;At!==null;){r=At;var c=r.sibling,d=r.return;if(zv(r),r===n){At=null;break e}if(c!==null){c.return=d,At=c;break e}At=d}}}var NS={getCacheForType:function(e){var t=kt(St),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return kt(St).controller.signal}},AS=typeof WeakMap=="function"?WeakMap:Map,Xe=0,lt=null,ze=null,Ue=0,Fe=0,hn=null,vl=!1,$r=!1,Sd=!1,Ua=0,pt=0,gl=0,ar=0,wd=0,mn=0,Kr=0,ti=null,en=null,jd=!1,Cs=0,Iv=0,Es=1/0,Rs=null,yl=null,Rt=0,xl=null,Xr=null,Ha=0,Cd=0,Ed=null,$v=null,ni=0,Rd=null;function pn(){return(Xe&2)!==0&&Ue!==0?Ue&-Ue:k.T!==null?Od():sm()}function Kv(){if(mn===0)if((Ue&536870912)===0||Be){var e=vr;vr<<=1,(vr&3932160)===0&&(vr=262144),mn=e}else mn=536870912;return e=dn.current,e!==null&&(e.flags|=32),mn}function tn(e,t,n){(e===lt&&(Fe===2||Fe===9)||e.cancelPendingCommit!==null)&&(Qr(e,0),bl(e,Ue,mn,!1)),Ot(e,n),((Xe&2)===0||e!==lt)&&(e===lt&&((Xe&2)===0&&(ar|=n),pt===4&&bl(e,Ue,mn,!1)),ra(e))}function Xv(e,t,n){if((Xe&6)!==0)throw Error(i(327));var r=!n&&(t&127)===0&&(t&e.expiredLanes)===0||je(e,t),c=r?OS(e,t):Nd(e,t,!0),d=r;do{if(c===0){$r&&!r&&bl(e,t,0,!1);break}else{if(n=e.current.alternate,d&&!MS(n)){c=Nd(e,t,!1),d=!1;continue}if(c===2){if(d=t,e.errorRecoveryDisabledLanes&d)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){t=y;e:{var E=e;c=ti;var O=E.current.memoizedState.isDehydrated;if(O&&(Qr(E,y).flags|=256),y=Nd(E,y,!1),y!==2){if(Sd&&!O){E.errorRecoveryDisabledLanes|=d,ar|=d,c=4;break e}d=en,en=c,d!==null&&(en===null?en=d:en.push.apply(en,d))}c=y}if(d=!1,c!==2)continue}}if(c===1){Qr(e,0),bl(e,t,0,!0);break}e:{switch(r=e,d=c,d){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:bl(r,t,mn,!vl);break e;case 2:en=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(c=Cs+300-Vt(),10<c)){if(bl(r,t,mn,!vl),gr(r,0,!0)!==0)break e;Ha=t,r.timeoutHandle=Eg(Qv.bind(null,r,n,en,Rs,jd,t,mn,ar,Kr,vl,d,"Throttled",-0,0),c);break e}Qv(r,n,en,Rs,jd,t,mn,ar,Kr,vl,d,null,-0,0)}}break}while(!0);ra(e)}function Qv(e,t,n,r,c,d,y,E,O,Y,X,F,G,I){if(e.timeoutHandle=-1,F=t.subtreeFlags,F&8192||(F&16785408)===16785408){F={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ja},qv(t,d,F);var fe=(d&62914560)===d?Cs-Vt():(d&4194048)===d?Iv-Vt():0;if(fe=mw(F,fe),fe!==null){Ha=d,e.cancelPendingCommit=fe(ag.bind(null,e,t,d,n,r,c,y,E,O,X,F,null,G,I)),bl(e,d,y,!Y);return}}ag(e,t,d,n,r,c,y,E,O)}function MS(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var c=n[r],d=c.getSnapshot;c=c.value;try{if(!cn(d(),c))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function bl(e,t,n,r){t&=~wd,t&=~ar,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var c=t;0<c;){var d=31-bt(c),y=1<<d;r[d]=-1,c&=~y}n!==0&&ta(e,n,t)}function Ts(){return(Xe&6)===0?(ai(0),!1):!0}function Td(){if(ze!==null){if(Fe===0)var e=ze.return;else e=ze,Ta=Xl=null,Yu(e),Br=null,Bo=0,e=ze;for(;e!==null;)Rv(e.alternate,e),e=e.return;ze=null}}function Qr(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,ZS(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Ha=0,Td(),lt=e,ze=n=Ea(e.current,null),Ue=t,Fe=0,hn=null,vl=!1,$r=je(e,t),Sd=!1,Kr=mn=wd=ar=gl=pt=0,en=ti=null,jd=!1,(t&8)!==0&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var c=31-bt(r),d=1<<c;t|=e[c],r&=~d}return Ua=t,Xi(),n}function Zv(e,t){Te=null,k.H=Ko,t===Hr||t===ns?(t=fp(),Fe=3):t===_u?(t=fp(),Fe=4):Fe=t===rd?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,hn=t,ze===null&&(pt=1,vs(e,Tn(t,e.current)))}function Fv(){var e=dn.current;return e===null?!0:(Ue&4194048)===Ue?_n===null:(Ue&62914560)===Ue||(Ue&536870912)!==0?e===_n:!1}function Jv(){var e=k.H;return k.H=Ko,e===null?Ko:e}function Wv(){var e=k.A;return k.A=NS,e}function Ns(){pt=4,vl||(Ue&4194048)!==Ue&&dn.current!==null||($r=!0),(gl&134217727)===0&&(ar&134217727)===0||lt===null||bl(lt,Ue,mn,!1)}function Nd(e,t,n){var r=Xe;Xe|=2;var c=Jv(),d=Wv();(lt!==e||Ue!==t)&&(Rs=null,Qr(e,t)),t=!1;var y=pt;e:do try{if(Fe!==0&&ze!==null){var E=ze,O=hn;switch(Fe){case 8:Td(),y=6;break e;case 3:case 2:case 9:case 6:dn.current===null&&(t=!0);var Y=Fe;if(Fe=0,hn=null,Zr(e,E,O,Y),n&&$r){y=0;break e}break;default:Y=Fe,Fe=0,hn=null,Zr(e,E,O,Y)}}_S(),y=pt;break}catch(X){Zv(e,X)}while(!0);return t&&e.shellSuspendCounter++,Ta=Xl=null,Xe=r,k.H=c,k.A=d,ze===null&&(lt=null,Ue=0,Xi()),y}function _S(){for(;ze!==null;)eg(ze)}function OS(e,t){var n=Xe;Xe|=2;var r=Jv(),c=Wv();lt!==e||Ue!==t?(Rs=null,Es=Vt()+500,Qr(e,t)):$r=je(e,t);e:do try{if(Fe!==0&&ze!==null){t=ze;var d=hn;t:switch(Fe){case 1:Fe=0,hn=null,Zr(e,t,d,1);break;case 2:case 9:if(up(d)){Fe=0,hn=null,tg(t);break}t=function(){Fe!==2&&Fe!==9||lt!==e||(Fe=7),ra(e)},d.then(t,t);break e;case 3:Fe=7;break e;case 4:Fe=5;break e;case 7:up(d)?(Fe=0,hn=null,tg(t)):(Fe=0,hn=null,Zr(e,t,d,7));break;case 5:var y=null;switch(ze.tag){case 26:y=ze.memoizedState;case 5:case 27:var E=ze;if(y?Pg(y):E.stateNode.complete){Fe=0,hn=null;var O=E.sibling;if(O!==null)ze=O;else{var Y=E.return;Y!==null?(ze=Y,As(Y)):ze=null}break t}}Fe=0,hn=null,Zr(e,t,d,5);break;case 6:Fe=0,hn=null,Zr(e,t,d,6);break;case 8:Td(),pt=6;break e;default:throw Error(i(462))}}DS();break}catch(X){Zv(e,X)}while(!0);return Ta=Xl=null,k.H=r,k.A=c,Xe=n,ze!==null?0:(lt=null,Ue=0,Xi(),pt)}function DS(){for(;ze!==null&&!ya();)eg(ze)}function eg(e){var t=Cv(e.alternate,e,Ua);e.memoizedProps=e.pendingProps,t===null?As(e):ze=t}function tg(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=yv(n,t,t.pendingProps,t.type,void 0,Ue);break;case 11:t=yv(n,t,t.pendingProps,t.type.render,t.ref,Ue);break;case 5:Yu(t);default:Rv(n,t),t=ze=Wm(t,Ua),t=Cv(n,t,Ua)}e.memoizedProps=e.pendingProps,t===null?As(e):ze=t}function Zr(e,t,n,r){Ta=Xl=null,Yu(t),Br=null,Bo=0;var c=t.return;try{if(SS(e,c,t,n,Ue)){pt=1,vs(e,Tn(n,e.current)),ze=null;return}}catch(d){if(c!==null)throw ze=c,d;pt=1,vs(e,Tn(n,e.current)),ze=null;return}t.flags&32768?(Be||r===1?e=!0:$r||(Ue&536870912)!==0?e=!1:(vl=e=!0,(r===2||r===9||r===3||r===6)&&(r=dn.current,r!==null&&r.tag===13&&(r.flags|=16384))),ng(t,e)):As(t)}function As(e){var t=e;do{if((t.flags&32768)!==0){ng(t,vl);return}e=t.return;var n=CS(t.alternate,t,Ua);if(n!==null){ze=n;return}if(t=t.sibling,t!==null){ze=t;return}ze=t=e}while(t!==null);pt===0&&(pt=5)}function ng(e,t){do{var n=ES(e.alternate,e);if(n!==null){n.flags&=32767,ze=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){ze=e;return}ze=e=n}while(e!==null);pt=6,ze=null}function ag(e,t,n,r,c,d,y,E,O){e.cancelPendingCommit=null;do Ms();while(Rt!==0);if((Xe&6)!==0)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(d=t.lanes|t.childLanes,d|=vu,ea(e,n,d,y,E,O),e===lt&&(ze=lt=null,Ue=0),Xr=t,xl=e,Ha=n,Cd=d,Ed=c,$v=r,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,US(pr,function(){return sg(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||r){r=k.T,k.T=null,c=$.p,$.p=2,y=Xe,Xe|=4;try{RS(e,t,n)}finally{Xe=y,$.p=c,k.T=r}}Rt=1,lg(),rg(),og()}}function lg(){if(Rt===1){Rt=0;var e=xl,t=Xr,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=k.T,k.T=null;var r=$.p;$.p=2;var c=Xe;Xe|=4;try{Hv(t,e);var d=Pd,y=Gm(e.containerInfo),E=d.focusedElem,O=d.selectionRange;if(y!==E&&E&&E.ownerDocument&&Ym(E.ownerDocument.documentElement,E)){if(O!==null&&du(E)){var Y=O.start,X=O.end;if(X===void 0&&(X=Y),"selectionStart"in E)E.selectionStart=Y,E.selectionEnd=Math.min(X,E.value.length);else{var F=E.ownerDocument||document,G=F&&F.defaultView||window;if(G.getSelection){var I=G.getSelection(),fe=E.textContent.length,we=Math.min(O.start,fe),tt=O.end===void 0?we:Math.min(O.end,fe);!I.extend&&we>tt&&(y=tt,tt=we,we=y);var L=Vm(E,we),D=Vm(E,tt);if(L&&D&&(I.rangeCount!==1||I.anchorNode!==L.node||I.anchorOffset!==L.offset||I.focusNode!==D.node||I.focusOffset!==D.offset)){var V=F.createRange();V.setStart(L.node,L.offset),I.removeAllRanges(),we>tt?(I.addRange(V),I.extend(D.node,D.offset)):(V.setEnd(D.node,D.offset),I.addRange(V))}}}}for(F=[],I=E;I=I.parentNode;)I.nodeType===1&&F.push({element:I,left:I.scrollLeft,top:I.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<F.length;E++){var Q=F[E];Q.element.scrollLeft=Q.left,Q.element.scrollTop=Q.top}}Vs=!!Bd,Pd=Bd=null}finally{Xe=c,$.p=r,k.T=n}}e.current=t,Rt=2}}function rg(){if(Rt===2){Rt=0;var e=xl,t=Xr,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=k.T,k.T=null;var r=$.p;$.p=2;var c=Xe;Xe|=4;try{Dv(e,t.alternate,t)}finally{Xe=c,$.p=r,k.T=n}}Rt=3}}function og(){if(Rt===4||Rt===3){Rt=0,xa();var e=xl,t=Xr,n=Ha,r=$v;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Rt=5:(Rt=0,Xr=xl=null,ig(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(yl=null),$c(n),t=t.stateNode,xt&&typeof xt.onCommitFiberRoot=="function")try{xt.onCommitFiberRoot(Sa,t,void 0,(t.current.flags&128)===128)}catch{}if(r!==null){t=k.T,c=$.p,$.p=2,k.T=null;try{for(var d=e.onRecoverableError,y=0;y<r.length;y++){var E=r[y];d(E.value,{componentStack:E.stack})}}finally{k.T=t,$.p=c}}(Ha&3)!==0&&Ms(),ra(e),c=e.pendingLanes,(n&261930)!==0&&(c&42)!==0?e===Rd?ni++:(ni=0,Rd=e):ni=0,ai(0)}}function ig(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Uo(t)))}function Ms(){return lg(),rg(),og(),sg()}function sg(){if(Rt!==5)return!1;var e=xl,t=Cd;Cd=0;var n=$c(Ha),r=k.T,c=$.p;try{$.p=32>n?32:n,k.T=null,n=Ed,Ed=null;var d=xl,y=Ha;if(Rt=0,Xr=xl=null,Ha=0,(Xe&6)!==0)throw Error(i(331));var E=Xe;if(Xe|=4,Yv(d.current),Pv(d,d.current,y,n),Xe=E,ai(0,!1),xt&&typeof xt.onPostCommitFiberRoot=="function")try{xt.onPostCommitFiberRoot(Sa,d)}catch{}return!0}finally{$.p=c,k.T=r,ig(e,t)}}function cg(e,t,n){t=Tn(n,t),t=ld(e.stateNode,t,2),e=fl(e,t,2),e!==null&&(Ot(e,2),ra(e))}function Je(e,t,n){if(e.tag===3)cg(e,e,n);else for(;t!==null;){if(t.tag===3){cg(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(yl===null||!yl.has(r))){e=Tn(n,e),n=uv(2),r=fl(t,n,2),r!==null&&(dv(n,r,t,e),Ot(r,2),ra(r));break}}t=t.return}}function Ad(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new AS;var c=new Set;r.set(t,c)}else c=r.get(t),c===void 0&&(c=new Set,r.set(t,c));c.has(n)||(Sd=!0,c.add(n),e=zS.bind(null,e,t,n),t.then(e,e))}function zS(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,lt===e&&(Ue&n)===n&&(pt===4||pt===3&&(Ue&62914560)===Ue&&300>Vt()-Cs?(Xe&2)===0&&Qr(e,0):wd|=n,Kr===Ue&&(Kr=0)),ra(e)}function ug(e,t){t===0&&(t=at()),e=Il(e,t),e!==null&&(Ot(e,t),ra(e))}function kS(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ug(e,n)}function LS(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,c=e.memoizedState;c!==null&&(n=c.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),ug(e,n)}function US(e,t){return nl(e,t)}var _s=null,Fr=null,Md=!1,Os=!1,_d=!1,Sl=0;function ra(e){e!==Fr&&e.next===null&&(Fr===null?_s=Fr=e:Fr=Fr.next=e),Os=!0,Md||(Md=!0,BS())}function ai(e,t){if(!_d&&Os){_d=!0;do for(var n=!1,r=_s;r!==null;){if(e!==0){var c=r.pendingLanes;if(c===0)var d=0;else{var y=r.suspendedLanes,E=r.pingedLanes;d=(1<<31-bt(42|e)+1)-1,d&=c&~(y&~E),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(n=!0,mg(r,d))}else d=Ue,d=gr(r,r===lt?d:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(d&3)===0||je(r,d)||(n=!0,mg(r,d));r=r.next}while(n);_d=!1}}function HS(){dg()}function dg(){Os=Md=!1;var e=0;Sl!==0&&QS()&&(e=Sl);for(var t=Vt(),n=null,r=_s;r!==null;){var c=r.next,d=fg(r,t);d===0?(r.next=null,n===null?_s=c:n.next=c,c===null&&(Fr=n)):(n=r,(e!==0||(d&3)!==0)&&(Os=!0)),r=c}Rt!==0&&Rt!==5||ai(e),Sl!==0&&(Sl=0)}function fg(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,c=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var y=31-bt(d),E=1<<y,O=c[y];O===-1?((E&n)===0||(E&r)!==0)&&(c[y]=Qe(E,t)):O<=t&&(e.expiredLanes|=E),d&=~E}if(t=lt,n=Ue,n=gr(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Fe===2||Fe===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Hn(r),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||je(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Hn(r),$c(n)){case 2:case 8:n=ba;break;case 32:n=pr;break;case 268435456:n=Bl;break;default:n=pr}return r=hg.bind(null,e),n=nl(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Hn(r),e.callbackPriority=2,e.callbackNode=null,2}function hg(e,t){if(Rt!==0&&Rt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Ms()&&e.callbackNode!==n)return null;var r=Ue;return r=gr(e,e===lt?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Xv(e,r,t),fg(e,Vt()),e.callbackNode!=null&&e.callbackNode===n?hg.bind(null,e):null)}function mg(e,t){if(Ms())return null;Xv(e,t,!0)}function BS(){FS(function(){(Xe&6)!==0?nl(Yt,HS):dg()})}function Od(){if(Sl===0){var e=Lr;e===0&&(e=Pl,Pl<<=1,(Pl&261888)===0&&(Pl=256)),Sl=e}return Sl}function pg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Pi(""+e)}function vg(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function PS(e,t,n,r,c){if(t==="submit"&&n&&n.stateNode===c){var d=pg((c[Qt]||null).action),y=r.submitter;y&&(t=(t=y[Qt]||null)?pg(t.formAction):y.getAttribute("formAction"),t!==null&&(d=t,y=null));var E=new Gi("action","action",null,r,c);e.push({event:E,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Sl!==0){var O=y?vg(c,y):new FormData(c);Ju(n,{pending:!0,data:O,method:c.method,action:d},null,O)}}else typeof d=="function"&&(E.preventDefault(),O=y?vg(c,y):new FormData(c),Ju(n,{pending:!0,data:O,method:c.method,action:d},d,O))},currentTarget:c}]})}}for(var Dd=0;Dd<pu.length;Dd++){var zd=pu[Dd],qS=zd.toLowerCase(),VS=zd[0].toUpperCase()+zd.slice(1);qn(qS,"on"+VS)}qn(Km,"onAnimationEnd"),qn(Xm,"onAnimationIteration"),qn(Qm,"onAnimationStart"),qn("dblclick","onDoubleClick"),qn("focusin","onFocus"),qn("focusout","onBlur"),qn(lS,"onTransitionRun"),qn(rS,"onTransitionStart"),qn(oS,"onTransitionCancel"),qn(Zm,"onTransitionEnd"),wr("onMouseEnter",["mouseout","mouseover"]),wr("onMouseLeave",["mouseout","mouseover"]),wr("onPointerEnter",["pointerout","pointerover"]),wr("onPointerLeave",["pointerout","pointerover"]),ql("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ql("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ql("onBeforeInput",["compositionend","keypress","textInput","paste"]),ql("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ql("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ql("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var li="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(" "),YS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(li));function gg(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],c=r.event;r=r.listeners;e:{var d=void 0;if(t)for(var y=r.length-1;0<=y;y--){var E=r[y],O=E.instance,Y=E.currentTarget;if(E=E.listener,O!==d&&c.isPropagationStopped())break e;d=E,c.currentTarget=Y;try{d(c)}catch(X){Ki(X)}c.currentTarget=null,d=O}else for(y=0;y<r.length;y++){if(E=r[y],O=E.instance,Y=E.currentTarget,E=E.listener,O!==d&&c.isPropagationStopped())break e;d=E,c.currentTarget=Y;try{d(c)}catch(X){Ki(X)}c.currentTarget=null,d=O}}}}function ke(e,t){var n=t[Kc];n===void 0&&(n=t[Kc]=new Set);var r=e+"__bubble";n.has(r)||(yg(t,e,2,!1),n.add(r))}function kd(e,t,n){var r=0;t&&(r|=4),yg(n,e,r,t)}var Ds="_reactListening"+Math.random().toString(36).slice(2);function Ld(e){if(!e[Ds]){e[Ds]=!0,dm.forEach(function(n){n!=="selectionchange"&&(YS.has(n)||kd(n,!1,e),kd(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ds]||(t[Ds]=!0,kd("selectionchange",!1,t))}}function yg(e,t,n,r){switch(Kg(t)){case 2:var c=gw;break;case 8:c=yw;break;default:c=Fd}n=c.bind(null,t,n,e),c=void 0,!nu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),r?c!==void 0?e.addEventListener(t,n,{capture:!0,passive:c}):e.addEventListener(t,n,!0):c!==void 0?e.addEventListener(t,n,{passive:c}):e.addEventListener(t,n,!1)}function Ud(e,t,n,r,c){var d=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var y=r.tag;if(y===3||y===4){var E=r.stateNode.containerInfo;if(E===c)break;if(y===4)for(y=r.return;y!==null;){var O=y.tag;if((O===3||O===4)&&y.stateNode.containerInfo===c)return;y=y.return}for(;E!==null;){if(y=xr(E),y===null)return;if(O=y.tag,O===5||O===6||O===26||O===27){r=d=y;continue e}E=E.parentNode}}r=r.return}jm(function(){var Y=d,X=eu(n),F=[];e:{var G=Fm.get(e);if(G!==void 0){var I=Gi,fe=e;switch(e){case"keypress":if(Vi(n)===0)break e;case"keydown":case"keyup":I=L1;break;case"focusin":fe="focus",I=ou;break;case"focusout":fe="blur",I=ou;break;case"beforeblur":case"afterblur":I=ou;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":I=Rm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":I=C1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":I=B1;break;case Km:case Xm:case Qm:I=T1;break;case Zm:I=q1;break;case"scroll":case"scrollend":I=w1;break;case"wheel":I=Y1;break;case"copy":case"cut":case"paste":I=A1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":I=Nm;break;case"toggle":case"beforetoggle":I=I1}var we=(t&4)!==0,tt=!we&&(e==="scroll"||e==="scrollend"),L=we?G!==null?G+"Capture":null:G;we=[];for(var D=Y,V;D!==null;){var Q=D;if(V=Q.stateNode,Q=Q.tag,Q!==5&&Q!==26&&Q!==27||V===null||L===null||(Q=Ro(D,L),Q!=null&&we.push(ri(D,Q,V))),tt)break;D=D.return}0<we.length&&(G=new I(G,fe,null,n,X),F.push({event:G,listeners:we}))}}if((t&7)===0){e:{if(G=e==="mouseover"||e==="pointerover",I=e==="mouseout"||e==="pointerout",G&&n!==Wc&&(fe=n.relatedTarget||n.fromElement)&&(xr(fe)||fe[yr]))break e;if((I||G)&&(G=X.window===X?X:(G=X.ownerDocument)?G.defaultView||G.parentWindow:window,I?(fe=n.relatedTarget||n.toElement,I=Y,fe=fe?xr(fe):null,fe!==null&&(tt=f(fe),we=fe.tag,fe!==tt||we!==5&&we!==27&&we!==6)&&(fe=null)):(I=null,fe=Y),I!==fe)){if(we=Rm,Q="onMouseLeave",L="onMouseEnter",D="mouse",(e==="pointerout"||e==="pointerover")&&(we=Nm,Q="onPointerLeave",L="onPointerEnter",D="pointer"),tt=I==null?G:Eo(I),V=fe==null?G:Eo(fe),G=new we(Q,D+"leave",I,n,X),G.target=tt,G.relatedTarget=V,Q=null,xr(X)===Y&&(we=new we(L,D+"enter",fe,n,X),we.target=V,we.relatedTarget=tt,Q=we),tt=Q,I&&fe)t:{for(we=GS,L=I,D=fe,V=0,Q=L;Q;Q=we(Q))V++;Q=0;for(var ye=D;ye;ye=we(ye))Q++;for(;0<V-Q;)L=we(L),V--;for(;0<Q-V;)D=we(D),Q--;for(;V--;){if(L===D||D!==null&&L===D.alternate){we=L;break t}L=we(L),D=we(D)}we=null}else we=null;I!==null&&xg(F,G,I,we,!1),fe!==null&&tt!==null&&xg(F,tt,fe,we,!0)}}e:{if(G=Y?Eo(Y):window,I=G.nodeName&&G.nodeName.toLowerCase(),I==="select"||I==="input"&&G.type==="file")var Ve=Lm;else if(zm(G))if(Um)Ve=tS;else{Ve=W1;var me=J1}else I=G.nodeName,!I||I.toLowerCase()!=="input"||G.type!=="checkbox"&&G.type!=="radio"?Y&&Jc(Y.elementType)&&(Ve=Lm):Ve=eS;if(Ve&&(Ve=Ve(e,Y))){km(F,Ve,n,X);break e}me&&me(e,G,Y),e==="focusout"&&Y&&G.type==="number"&&Y.memoizedProps.value!=null&&Fc(G,"number",G.value)}switch(me=Y?Eo(Y):window,e){case"focusin":(zm(me)||me.contentEditable==="true")&&(Nr=me,fu=Y,zo=null);break;case"focusout":zo=fu=Nr=null;break;case"mousedown":hu=!0;break;case"contextmenu":case"mouseup":case"dragend":hu=!1,Im(F,n,X);break;case"selectionchange":if(aS)break;case"keydown":case"keyup":Im(F,n,X)}var Ne;if(su)e:{switch(e){case"compositionstart":var He="onCompositionStart";break e;case"compositionend":He="onCompositionEnd";break e;case"compositionupdate":He="onCompositionUpdate";break e}He=void 0}else Tr?Om(e,n)&&(He="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(He="onCompositionStart");He&&(Am&&n.locale!=="ko"&&(Tr||He!=="onCompositionStart"?He==="onCompositionEnd"&&Tr&&(Ne=Cm()):(rl=X,au="value"in rl?rl.value:rl.textContent,Tr=!0)),me=zs(Y,He),0<me.length&&(He=new Tm(He,e,null,n,X),F.push({event:He,listeners:me}),Ne?He.data=Ne:(Ne=Dm(n),Ne!==null&&(He.data=Ne)))),(Ne=K1?X1(e,n):Q1(e,n))&&(He=zs(Y,"onBeforeInput"),0<He.length&&(me=new Tm("onBeforeInput","beforeinput",null,n,X),F.push({event:me,listeners:He}),me.data=Ne)),PS(F,e,Y,n,X)}gg(F,t)})}function ri(e,t,n){return{instance:e,listener:t,currentTarget:n}}function zs(e,t){for(var n=t+"Capture",r=[];e!==null;){var c=e,d=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||d===null||(c=Ro(e,n),c!=null&&r.unshift(ri(e,c,d)),c=Ro(e,t),c!=null&&r.push(ri(e,c,d))),e.tag===3)return r;e=e.return}return[]}function GS(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function xg(e,t,n,r,c){for(var d=t._reactName,y=[];n!==null&&n!==r;){var E=n,O=E.alternate,Y=E.stateNode;if(E=E.tag,O!==null&&O===r)break;E!==5&&E!==26&&E!==27||Y===null||(O=Y,c?(Y=Ro(n,d),Y!=null&&y.unshift(ri(n,Y,O))):c||(Y=Ro(n,d),Y!=null&&y.push(ri(n,Y,O)))),n=n.return}y.length!==0&&e.push({event:t,listeners:y})}var IS=/\r\n?/g,$S=/\u0000|\uFFFD/g;function bg(e){return(typeof e=="string"?e:""+e).replace(IS,`
49
+ `).replace($S,"")}function Sg(e,t){return t=bg(t),bg(e)===t}function et(e,t,n,r,c,d){switch(n){case"children":typeof r=="string"?t==="body"||t==="textarea"&&r===""||Cr(e,r):(typeof r=="number"||typeof r=="bigint")&&t!=="body"&&Cr(e,""+r);break;case"className":Hi(e,"class",r);break;case"tabIndex":Hi(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":Hi(e,n,r);break;case"style":Sm(e,r,d);break;case"data":if(t!=="object"){Hi(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=Pi(""+r),e.setAttribute(n,r);break;case"action":case"formAction":if(typeof r=="function"){e.setAttribute(n,"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 d=="function"&&(n==="formAction"?(t!=="input"&&et(e,t,"name",c.name,c,null),et(e,t,"formEncType",c.formEncType,c,null),et(e,t,"formMethod",c.formMethod,c,null),et(e,t,"formTarget",c.formTarget,c,null)):(et(e,t,"encType",c.encType,c,null),et(e,t,"method",c.method,c,null),et(e,t,"target",c.target,c,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=Pi(""+r),e.setAttribute(n,r);break;case"onClick":r!=null&&(e.onclick=ja);break;case"onScroll":r!=null&&ke("scroll",e);break;case"onScrollEnd":r!=null&&ke("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(i(61));if(n=r.__html,n!=null){if(c.children!=null)throw Error(i(60));e.innerHTML=n}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}n=Pi(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,""+r):e.removeAttribute(n);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":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":r===!0?e.setAttribute(n,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,r):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case"popover":ke("beforetoggle",e),ke("toggle",e),Ui(e,"popover",r);break;case"xlinkActuate":wa(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":wa(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":wa(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":wa(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":wa(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":wa(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":wa(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":wa(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":wa(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":Ui(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=b1.get(n)||n,Ui(e,n,r))}}function Hd(e,t,n,r,c,d){switch(n){case"style":Sm(e,r,d);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(i(61));if(n=r.__html,n!=null){if(c.children!=null)throw Error(i(60));e.innerHTML=n}}break;case"children":typeof r=="string"?Cr(e,r):(typeof r=="number"||typeof r=="bigint")&&Cr(e,""+r);break;case"onScroll":r!=null&&ke("scroll",e);break;case"onScrollEnd":r!=null&&ke("scrollend",e);break;case"onClick":r!=null&&(e.onclick=ja);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!fm.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(c=n.endsWith("Capture"),t=n.slice(2,c?n.length-7:void 0),d=e[Qt]||null,d=d!=null?d[n]:null,typeof d=="function"&&e.removeEventListener(t,d,c),typeof r=="function")){typeof d!="function"&&d!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,c);break e}n in e?e[n]=r:r===!0?e.setAttribute(n,""):Ui(e,n,r)}}}function Ut(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ke("error",e),ke("load",e);var r=!1,c=!1,d;for(d in n)if(n.hasOwnProperty(d)){var y=n[d];if(y!=null)switch(d){case"src":r=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:et(e,t,d,y,n,null)}}c&&et(e,t,"srcSet",n.srcSet,n,null),r&&et(e,t,"src",n.src,n,null);return;case"input":ke("invalid",e);var E=d=y=c=null,O=null,Y=null;for(r in n)if(n.hasOwnProperty(r)){var X=n[r];if(X!=null)switch(r){case"name":c=X;break;case"type":y=X;break;case"checked":O=X;break;case"defaultChecked":Y=X;break;case"value":d=X;break;case"defaultValue":E=X;break;case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(i(137,t));break;default:et(e,t,r,X,n,null)}}gm(e,d,E,O,Y,y,c,!1);return;case"select":ke("invalid",e),r=y=d=null;for(c in n)if(n.hasOwnProperty(c)&&(E=n[c],E!=null))switch(c){case"value":d=E;break;case"defaultValue":y=E;break;case"multiple":r=E;default:et(e,t,c,E,n,null)}t=d,n=y,e.multiple=!!r,t!=null?jr(e,!!r,t,!1):n!=null&&jr(e,!!r,n,!0);return;case"textarea":ke("invalid",e),d=c=r=null;for(y in n)if(n.hasOwnProperty(y)&&(E=n[y],E!=null))switch(y){case"value":r=E;break;case"defaultValue":c=E;break;case"children":d=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(i(91));break;default:et(e,t,y,E,n,null)}xm(e,r,c,d);return;case"option":for(O in n)if(n.hasOwnProperty(O)&&(r=n[O],r!=null))switch(O){case"selected":e.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:et(e,t,O,r,n,null)}return;case"dialog":ke("beforetoggle",e),ke("toggle",e),ke("cancel",e),ke("close",e);break;case"iframe":case"object":ke("load",e);break;case"video":case"audio":for(r=0;r<li.length;r++)ke(li[r],e);break;case"image":ke("error",e),ke("load",e);break;case"details":ke("toggle",e);break;case"embed":case"source":case"link":ke("error",e),ke("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Y in n)if(n.hasOwnProperty(Y)&&(r=n[Y],r!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:et(e,t,Y,r,n,null)}return;default:if(Jc(t)){for(X in n)n.hasOwnProperty(X)&&(r=n[X],r!==void 0&&Hd(e,t,X,r,n,void 0));return}}for(E in n)n.hasOwnProperty(E)&&(r=n[E],r!=null&&et(e,t,E,r,n,null))}function KS(e,t,n,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,d=null,y=null,E=null,O=null,Y=null,X=null;for(I in n){var F=n[I];if(n.hasOwnProperty(I)&&F!=null)switch(I){case"checked":break;case"value":break;case"defaultValue":O=F;default:r.hasOwnProperty(I)||et(e,t,I,null,r,F)}}for(var G in r){var I=r[G];if(F=n[G],r.hasOwnProperty(G)&&(I!=null||F!=null))switch(G){case"type":d=I;break;case"name":c=I;break;case"checked":Y=I;break;case"defaultChecked":X=I;break;case"value":y=I;break;case"defaultValue":E=I;break;case"children":case"dangerouslySetInnerHTML":if(I!=null)throw Error(i(137,t));break;default:I!==F&&et(e,t,G,I,r,F)}}Zc(e,y,E,O,Y,X,d,c);return;case"select":I=y=E=G=null;for(d in n)if(O=n[d],n.hasOwnProperty(d)&&O!=null)switch(d){case"value":break;case"multiple":I=O;default:r.hasOwnProperty(d)||et(e,t,d,null,r,O)}for(c in r)if(d=r[c],O=n[c],r.hasOwnProperty(c)&&(d!=null||O!=null))switch(c){case"value":G=d;break;case"defaultValue":E=d;break;case"multiple":y=d;default:d!==O&&et(e,t,c,d,r,O)}t=E,n=y,r=I,G!=null?jr(e,!!n,G,!1):!!r!=!!n&&(t!=null?jr(e,!!n,t,!0):jr(e,!!n,n?[]:"",!1));return;case"textarea":I=G=null;for(E in n)if(c=n[E],n.hasOwnProperty(E)&&c!=null&&!r.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:et(e,t,E,null,r,c)}for(y in r)if(c=r[y],d=n[y],r.hasOwnProperty(y)&&(c!=null||d!=null))switch(y){case"value":G=c;break;case"defaultValue":I=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(i(91));break;default:c!==d&&et(e,t,y,c,r,d)}ym(e,G,I);return;case"option":for(var fe in n)if(G=n[fe],n.hasOwnProperty(fe)&&G!=null&&!r.hasOwnProperty(fe))switch(fe){case"selected":e.selected=!1;break;default:et(e,t,fe,null,r,G)}for(O in r)if(G=r[O],I=n[O],r.hasOwnProperty(O)&&G!==I&&(G!=null||I!=null))switch(O){case"selected":e.selected=G&&typeof G!="function"&&typeof G!="symbol";break;default:et(e,t,O,G,r,I)}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 we in n)G=n[we],n.hasOwnProperty(we)&&G!=null&&!r.hasOwnProperty(we)&&et(e,t,we,null,r,G);for(Y in r)if(G=r[Y],I=n[Y],r.hasOwnProperty(Y)&&G!==I&&(G!=null||I!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(i(137,t));break;default:et(e,t,Y,G,r,I)}return;default:if(Jc(t)){for(var tt in n)G=n[tt],n.hasOwnProperty(tt)&&G!==void 0&&!r.hasOwnProperty(tt)&&Hd(e,t,tt,void 0,r,G);for(X in r)G=r[X],I=n[X],!r.hasOwnProperty(X)||G===I||G===void 0&&I===void 0||Hd(e,t,X,G,r,I);return}}for(var L in n)G=n[L],n.hasOwnProperty(L)&&G!=null&&!r.hasOwnProperty(L)&&et(e,t,L,null,r,G);for(F in r)G=r[F],I=n[F],!r.hasOwnProperty(F)||G===I||G==null&&I==null||et(e,t,F,G,r,I)}function wg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function XS(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),r=0;r<n.length;r++){var c=n[r],d=c.transferSize,y=c.initiatorType,E=c.duration;if(d&&E&&wg(y)){for(y=0,E=c.responseEnd,r+=1;r<n.length;r++){var O=n[r],Y=O.startTime;if(Y>E)break;var X=O.transferSize,F=O.initiatorType;X&&wg(F)&&(O=O.responseEnd,y+=X*(O<E?1:(E-Y)/(O-Y)))}if(--r,t+=8*(d+y)/(c.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Bd=null,Pd=null;function ks(e){return e.nodeType===9?e:e.ownerDocument}function jg(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Cg(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function qd(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Vd=null;function QS(){var e=window.event;return e&&e.type==="popstate"?e===Vd?!1:(Vd=e,!0):(Vd=null,!1)}var Eg=typeof setTimeout=="function"?setTimeout:void 0,ZS=typeof clearTimeout=="function"?clearTimeout:void 0,Rg=typeof Promise=="function"?Promise:void 0,FS=typeof queueMicrotask=="function"?queueMicrotask:typeof Rg<"u"?function(e){return Rg.resolve(null).then(e).catch(JS)}:Eg;function JS(e){setTimeout(function(){throw e})}function wl(e){return e==="head"}function Tg(e,t){var n=t,r=0;do{var c=n.nextSibling;if(e.removeChild(n),c&&c.nodeType===8)if(n=c.data,n==="/$"||n==="/&"){if(r===0){e.removeChild(c),to(t);return}r--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")r++;else if(n==="html")oi(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,oi(n);for(var d=n.firstChild;d;){var y=d.nextSibling,E=d.nodeName;d[Co]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&d.rel.toLowerCase()==="stylesheet"||n.removeChild(d),d=y}}else n==="body"&&oi(e.ownerDocument.body);n=c}while(n);to(t)}function Ng(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),r&&r.nodeType===8)if(n=r.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=r}while(n)}function Yd(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Yd(n),Xc(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function WS(e,t,n,r){for(;e.nodeType===1;){var c=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[Co])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var d=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=On(e.nextSibling),e===null)break}return null}function ew(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=On(e.nextSibling),e===null))return null;return e}function Ag(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=On(e.nextSibling),e===null))return null;return e}function Gd(e){return e.data==="$?"||e.data==="$~"}function Id(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function tw(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function On(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var $d=null;function Mg(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return On(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function _g(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function Og(e,t,n){switch(t=ks(n),e){case"html":if(e=t.documentElement,!e)throw Error(i(452));return e;case"head":if(e=t.head,!e)throw Error(i(453));return e;case"body":if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function oi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Xc(e)}var Dn=new Map,Dg=new Set;function Ls(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ba=$.d;$.d={f:nw,r:aw,D:lw,C:rw,L:ow,m:iw,X:cw,S:sw,M:uw};function nw(){var e=Ba.f(),t=Ts();return e||t}function aw(e){var t=br(e);t!==null&&t.tag===5&&t.type==="form"?Zp(t):Ba.r(e)}var Jr=typeof document>"u"?null:document;function zg(e,t,n){var r=Jr;if(r&&typeof t=="string"&&t){var c=En(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof n=="string"&&(c+='[crossorigin="'+n+'"]'),Dg.has(c)||(Dg.add(c),e={rel:e,crossOrigin:n,href:t},r.querySelector(c)===null&&(t=r.createElement("link"),Ut(t,"link",e),Nt(t),r.head.appendChild(t)))}}function lw(e){Ba.D(e),zg("dns-prefetch",e,null)}function rw(e,t){Ba.C(e,t),zg("preconnect",e,t)}function ow(e,t,n){Ba.L(e,t,n);var r=Jr;if(r&&e&&t){var c='link[rel="preload"][as="'+En(t)+'"]';t==="image"&&n&&n.imageSrcSet?(c+='[imagesrcset="'+En(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(c+='[imagesizes="'+En(n.imageSizes)+'"]')):c+='[href="'+En(e)+'"]';var d=c;switch(t){case"style":d=Wr(e);break;case"script":d=eo(e)}Dn.has(d)||(e=S({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Dn.set(d,e),r.querySelector(c)!==null||t==="style"&&r.querySelector(ii(d))||t==="script"&&r.querySelector(si(d))||(t=r.createElement("link"),Ut(t,"link",e),Nt(t),r.head.appendChild(t)))}}function iw(e,t){Ba.m(e,t);var n=Jr;if(n&&e){var r=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+En(r)+'"][href="'+En(e)+'"]',d=c;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=eo(e)}if(!Dn.has(d)&&(e=S({rel:"modulepreload",href:e},t),Dn.set(d,e),n.querySelector(c)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(si(d)))return}r=n.createElement("link"),Ut(r,"link",e),Nt(r),n.head.appendChild(r)}}}function sw(e,t,n){Ba.S(e,t,n);var r=Jr;if(r&&e){var c=Sr(r).hoistableStyles,d=Wr(e);t=t||"default";var y=c.get(d);if(!y){var E={loading:0,preload:null};if(y=r.querySelector(ii(d)))E.loading=5;else{e=S({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Dn.get(d))&&Kd(e,n);var O=y=r.createElement("link");Nt(O),Ut(O,"link",e),O._p=new Promise(function(Y,X){O.onload=Y,O.onerror=X}),O.addEventListener("load",function(){E.loading|=1}),O.addEventListener("error",function(){E.loading|=2}),E.loading|=4,Us(y,t,r)}y={type:"stylesheet",instance:y,count:1,state:E},c.set(d,y)}}}function cw(e,t){Ba.X(e,t);var n=Jr;if(n&&e){var r=Sr(n).hoistableScripts,c=eo(e),d=r.get(c);d||(d=n.querySelector(si(c)),d||(e=S({src:e,async:!0},t),(t=Dn.get(c))&&Xd(e,t),d=n.createElement("script"),Nt(d),Ut(d,"link",e),n.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},r.set(c,d))}}function uw(e,t){Ba.M(e,t);var n=Jr;if(n&&e){var r=Sr(n).hoistableScripts,c=eo(e),d=r.get(c);d||(d=n.querySelector(si(c)),d||(e=S({src:e,async:!0,type:"module"},t),(t=Dn.get(c))&&Xd(e,t),d=n.createElement("script"),Nt(d),Ut(d,"link",e),n.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},r.set(c,d))}}function kg(e,t,n,r){var c=(c=de.current)?Ls(c):null;if(!c)throw Error(i(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Wr(n.href),n=Sr(c).hoistableStyles,r=n.get(t),r||(r={type:"style",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Wr(n.href);var d=Sr(c).hoistableStyles,y=d.get(e);if(y||(c=c.ownerDocument||c,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,y),(d=c.querySelector(ii(e)))&&!d._p&&(y.instance=d,y.state.loading=5),Dn.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Dn.set(e,n),d||dw(c,e,n,y.state))),t&&r===null)throw Error(i(528,""));return y}if(t&&r!==null)throw Error(i(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=eo(n),n=Sr(c).hoistableScripts,r=n.get(t),r||(r={type:"script",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Wr(e){return'href="'+En(e)+'"'}function ii(e){return'link[rel="stylesheet"]['+e+"]"}function Lg(e){return S({},e,{"data-precedence":e.precedence,precedence:null})}function dw(e,t,n,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=1:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2}),Ut(t,"link",n),Nt(t),e.head.appendChild(t))}function eo(e){return'[src="'+En(e)+'"]'}function si(e){return"script[async]"+e}function Ug(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+En(n.href)+'"]');if(r)return t.instance=r,Nt(r),r;var c=S({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),Nt(r),Ut(r,"style",c),Us(r,n.precedence,e),t.instance=r;case"stylesheet":c=Wr(n.href);var d=e.querySelector(ii(c));if(d)return t.state.loading|=4,t.instance=d,Nt(d),d;r=Lg(n),(c=Dn.get(c))&&Kd(r,c),d=(e.ownerDocument||e).createElement("link"),Nt(d);var y=d;return y._p=new Promise(function(E,O){y.onload=E,y.onerror=O}),Ut(d,"link",r),t.state.loading|=4,Us(d,n.precedence,e),t.instance=d;case"script":return d=eo(n.src),(c=e.querySelector(si(d)))?(t.instance=c,Nt(c),c):(r=n,(c=Dn.get(d))&&(r=S({},n),Xd(r,c)),e=e.ownerDocument||e,c=e.createElement("script"),Nt(c),Ut(c,"link",r),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(i(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(r=t.instance,t.state.loading|=4,Us(r,n.precedence,e));return t.instance}function Us(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=r.length?r[r.length-1]:null,d=c,y=0;y<r.length;y++){var E=r[y];if(E.dataset.precedence===t)d=E;else if(d!==c)break}d?d.parentNode.insertBefore(e,d.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Kd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Xd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Hs=null;function Hg(e,t,n){if(Hs===null){var r=new Map,c=Hs=new Map;c.set(n,r)}else c=Hs,r=c.get(n),r||(r=new Map,c.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),c=0;c<n.length;c++){var d=n[c];if(!(d[Co]||d[Dt]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var y=d.getAttribute(t)||"";y=e+y;var E=r.get(y);E?E.push(d):r.set(y,[d])}}return r}function Bg(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function fw(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Pg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function hw(e,t,n,r){if(n.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var c=Wr(r.href),d=t.querySelector(ii(c));if(d){t=d._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Bs.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=d,Nt(d);return}d=t.ownerDocument||t,r=Lg(r),(c=Dn.get(c))&&Kd(r,c),d=d.createElement("link"),Nt(d);var y=d;y._p=new Promise(function(E,O){y.onload=E,y.onerror=O}),Ut(d,"link",r),n.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=Bs.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Qd=0;function mw(e,t){return e.stylesheets&&e.count===0&&qs(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&qs(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+t);0<e.imgBytes&&Qd===0&&(Qd=62500*XS());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&qs(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>Qd?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(c)}}:null}function Bs(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)qs(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ps=null;function qs(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ps=new Map,t.forEach(pw,e),Ps=null,Bs.call(e))}function pw(e,t){if(!(t.state.loading&4)){var n=Ps.get(e);if(n)var r=n.get(null);else{n=new Map,Ps.set(e,n);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<c.length;d++){var y=c[d];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(n.set(y.dataset.precedence,y),r=y)}r&&n.set(null,r)}c=t.instance,y=c.getAttribute("data-precedence"),d=n.get(y)||r,d===r&&n.set(null,c),n.set(y,c),this.count++,r=Bs.bind(this),c.addEventListener("load",r),c.addEventListener("error",r),d?d.parentNode.insertBefore(c,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var ci={$$typeof:N,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function vw(e,t,n,r,c,d,y,E,O){this.tag=1,this.containerInfo=e,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=Gt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gt(0),this.hiddenUpdates=Gt(null),this.identifierPrefix=r,this.onUncaughtError=c,this.onCaughtError=d,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=O,this.incompleteTransitions=new Map}function qg(e,t,n,r,c,d,y,E,O,Y,X,F){return e=new vw(e,t,n,y,O,Y,X,F,E),t=1,d===!0&&(t|=24),d=un(3,null,null,t),e.current=d,d.stateNode=e,t=Nu(),t.refCount++,e.pooledCache=t,t.refCount++,d.memoizedState={element:r,isDehydrated:n,cache:t},Ou(d),e}function Vg(e){return e?(e=_r,e):_r}function Yg(e,t,n,r,c,d){c=Vg(c),r.context===null?r.context=c:r.pendingContext=c,r=dl(t),r.payload={element:n},d=d===void 0?null:d,d!==null&&(r.callback=d),n=fl(e,r,t),n!==null&&(tn(n,e,t),qo(n,e,t))}function Gg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Zd(e,t){Gg(e,t),(e=e.alternate)&&Gg(e,t)}function Ig(e){if(e.tag===13||e.tag===31){var t=Il(e,67108864);t!==null&&tn(t,e,67108864),Zd(e,67108864)}}function $g(e){if(e.tag===13||e.tag===31){var t=pn();t=Ic(t);var n=Il(e,t);n!==null&&tn(n,e,t),Zd(e,t)}}var Vs=!0;function gw(e,t,n,r){var c=k.T;k.T=null;var d=$.p;try{$.p=2,Fd(e,t,n,r)}finally{$.p=d,k.T=c}}function yw(e,t,n,r){var c=k.T;k.T=null;var d=$.p;try{$.p=8,Fd(e,t,n,r)}finally{$.p=d,k.T=c}}function Fd(e,t,n,r){if(Vs){var c=Jd(r);if(c===null)Ud(e,t,r,Ys,n),Xg(e,r);else if(bw(c,e,t,n,r))r.stopPropagation();else if(Xg(e,r),t&4&&-1<xw.indexOf(e)){for(;c!==null;){var d=br(c);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var y=Bt(d.pendingLanes);if(y!==0){var E=d;for(E.pendingLanes|=2,E.entangledLanes|=2;y;){var O=1<<31-bt(y);E.entanglements[1]|=O,y&=~O}ra(d),(Xe&6)===0&&(Es=Vt()+500,ai(0))}}break;case 31:case 13:E=Il(d,2),E!==null&&tn(E,d,2),Ts(),Zd(d,2)}if(d=Jd(r),d===null&&Ud(e,t,r,Ys,n),d===c)break;c=d}c!==null&&r.stopPropagation()}else Ud(e,t,r,null,n)}}function Jd(e){return e=eu(e),Wd(e)}var Ys=null;function Wd(e){if(Ys=null,e=xr(e),e!==null){var t=f(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=h(t),e!==null)return e;e=null}else if(n===31){if(e=p(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Ys=e,null}function Kg(e){switch(e){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(Pc()){case Yt:return 2;case ba:return 8;case pr:case qc:return 32;case Bl:return 268435456;default:return 32}default:return 32}}var ef=!1,jl=null,Cl=null,El=null,ui=new Map,di=new Map,Rl=[],xw="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 Xg(e,t){switch(e){case"focusin":case"focusout":jl=null;break;case"dragenter":case"dragleave":Cl=null;break;case"mouseover":case"mouseout":El=null;break;case"pointerover":case"pointerout":ui.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":di.delete(t.pointerId)}}function fi(e,t,n,r,c,d){return e===null||e.nativeEvent!==d?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:d,targetContainers:[c]},t!==null&&(t=br(t),t!==null&&Ig(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function bw(e,t,n,r,c){switch(t){case"focusin":return jl=fi(jl,e,t,n,r,c),!0;case"dragenter":return Cl=fi(Cl,e,t,n,r,c),!0;case"mouseover":return El=fi(El,e,t,n,r,c),!0;case"pointerover":var d=c.pointerId;return ui.set(d,fi(ui.get(d)||null,e,t,n,r,c)),!0;case"gotpointercapture":return d=c.pointerId,di.set(d,fi(di.get(d)||null,e,t,n,r,c)),!0}return!1}function Qg(e){var t=xr(e.target);if(t!==null){var n=f(t);if(n!==null){if(t=n.tag,t===13){if(t=h(n),t!==null){e.blockedOn=t,cm(e.priority,function(){$g(n)});return}}else if(t===31){if(t=p(n),t!==null){e.blockedOn=t,cm(e.priority,function(){$g(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Gs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Jd(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Wc=r,n.target.dispatchEvent(r),Wc=null}else return t=br(n),t!==null&&Ig(t),e.blockedOn=n,!1;t.shift()}return!0}function Zg(e,t,n){Gs(e)&&n.delete(t)}function Sw(){ef=!1,jl!==null&&Gs(jl)&&(jl=null),Cl!==null&&Gs(Cl)&&(Cl=null),El!==null&&Gs(El)&&(El=null),ui.forEach(Zg),di.forEach(Zg)}function Is(e,t){e.blockedOn===t&&(e.blockedOn=null,ef||(ef=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,Sw)))}var $s=null;function Fg(e){$s!==e&&($s=e,a.unstable_scheduleCallback(a.unstable_NormalPriority,function(){$s===e&&($s=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],c=e[t+2];if(typeof r!="function"){if(Wd(r||n)===null)continue;break}var d=br(n);d!==null&&(e.splice(t,3),t-=3,Ju(d,{pending:!0,data:c,method:n.method,action:r},r,c))}}))}function to(e){function t(O){return Is(O,e)}jl!==null&&Is(jl,e),Cl!==null&&Is(Cl,e),El!==null&&Is(El,e),ui.forEach(t),di.forEach(t);for(var n=0;n<Rl.length;n++){var r=Rl[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Rl.length&&(n=Rl[0],n.blockedOn===null);)Qg(n),n.blockedOn===null&&Rl.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var c=n[r],d=n[r+1],y=c[Qt]||null;if(typeof d=="function")y||Fg(n);else if(y){var E=null;if(d&&d.hasAttribute("formAction")){if(c=d,y=d[Qt]||null)E=y.formAction;else if(Wd(c)!==null)continue}else E=y.action;typeof E=="function"?n[r+1]=E:(n.splice(r,3),r-=3),Fg(n)}}}function Jg(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(y){return c=y})},focusReset:"manual",scroll:"manual"})}function t(){c!==null&&(c(),c=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,c=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),c!==null&&(c(),c=null)}}}function tf(e){this._internalRoot=e}Ks.prototype.render=tf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current,r=pn();Yg(n,r,e,t,null,null)},Ks.prototype.unmount=tf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Yg(e.current,2,null,e,null,null),Ts(),t[yr]=null}};function Ks(e){this._internalRoot=e}Ks.prototype.unstable_scheduleHydration=function(e){if(e){var t=sm();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Rl.length&&t!==0&&t<Rl[n].priority;n++);Rl.splice(n,0,e),n===0&&Qg(e)}};var Wg=l.version;if(Wg!=="19.2.8")throw Error(i(527,Wg,"19.2.8"));$.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(i(188)):(e=Object.keys(e).join(","),Error(i(268,e)));return e=g(t),e=e!==null?w(e):null,e=e===null?null:e.stateNode,e};var ww={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:k,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Xs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xs.isDisabled&&Xs.supportsFiber)try{Sa=Xs.inject(ww),xt=Xs}catch{}}return mi.createRoot=function(e,t){if(!u(e))throw Error(i(299));var n=!1,r="",c=ov,d=iv,y=sv;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(d=t.onCaughtError),t.onRecoverableError!==void 0&&(y=t.onRecoverableError)),t=qg(e,1,!1,null,null,n,r,null,c,d,y,Jg),e[yr]=t.current,Ld(e),new tf(t)},mi.hydrateRoot=function(e,t,n){if(!u(e))throw Error(i(299));var r=!1,c="",d=ov,y=iv,E=sv,O=null;return n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(c=n.identifierPrefix),n.onUncaughtError!==void 0&&(d=n.onUncaughtError),n.onCaughtError!==void 0&&(y=n.onCaughtError),n.onRecoverableError!==void 0&&(E=n.onRecoverableError),n.formState!==void 0&&(O=n.formState)),t=qg(e,1,!0,t,n??null,r,c,O,d,y,E,Jg),t.context=Vg(null),n=t.current,r=pn(),r=Ic(r),c=dl(r),c.callback=null,fl(n,c,r),n=r,t.current.lanes=n,Ot(t,n),ra(t),e[yr]=t.current,Ld(e),new Ks(t)},mi.version="19.2.8",mi}var fy;function Ow(){if(fy)return rf.exports;fy=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(l){console.error(l)}}return a(),rf.exports=_w(),rf.exports}var Dw=Ow();const zw=Wf(Dw);/**
50
+ * react-router v7.18.2
51
+ *
52
+ * Copyright (c) Remix Software Inc.
53
+ *
54
+ * This source code is licensed under the MIT license found in the
55
+ * LICENSE.md file in the root directory of this source tree.
56
+ *
57
+ * @license MIT
58
+ */var th=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Wy=/^[\\/]{2}/;function kw(a,l){return l+a.replace(/\\/g,"/")}var hy="popstate";function my(a){return typeof a=="object"&&a!=null&&"pathname"in a&&"search"in a&&"hash"in a&&"state"in a&&"key"in a}function Lw(a={}){function l(i,u){var g;let f=(g=u.state)==null?void 0:g.masked,{pathname:h,search:p,hash:v}=f||i.location;return Nf("",{pathname:h,search:p,hash:v},u.state&&u.state.usr||null,u.state&&u.state.key||"default",f?{pathname:i.location.pathname,search:i.location.search,hash:i.location.hash}:void 0)}function o(i,u){return typeof u=="string"?u:Si(u)}return Hw(l,o,null,a)}function ht(a,l){if(a===!1||a===null||typeof a>"u")throw new Error(l)}function Kn(a,l){if(!a){typeof console<"u"&&console.warn(l);try{throw new Error(l)}catch{}}}function Uw(){return Math.random().toString(36).substring(2,10)}function py(a,l){return{usr:a.state,key:a.key,idx:l,masked:a.mask?{pathname:a.pathname,search:a.search,hash:a.hash}:void 0}}function Nf(a,l,o=null,i,u){return{pathname:typeof a=="string"?a:a.pathname,search:"",hash:"",...typeof l=="string"?mo(l):l,state:o,key:l&&l.key||i||Uw(),mask:u}}function Si({pathname:a="/",search:l="",hash:o=""}){return l&&l!=="?"&&(a+=l.charAt(0)==="?"?l:"?"+l),o&&o!=="#"&&(a+=o.charAt(0)==="#"?o:"#"+o),a}function mo(a){let l={};if(a){let o=a.indexOf("#");o>=0&&(l.hash=a.substring(o),a=a.substring(0,o));let i=a.indexOf("?");i>=0&&(l.search=a.substring(i),a=a.substring(0,i)),a&&(l.pathname=a)}return l}function Hw(a,l,o,i={}){let{window:u=document.defaultView,v5Compat:f=!1}=i,h=u.history,p="POP",v=null,g=w();g==null&&(g=0,h.replaceState({...h.state,idx:g},""));function w(){return(h.state||{idx:null}).idx}function S(){p="POP";let C=w(),R=C==null?null:C-g;g=C,v&&v({action:p,location:j.location,delta:R})}function b(C,R){p="PUSH";let A=my(C)?C:Nf(j.location,C,R);g=w()+1;let N=py(A,g),_=j.createHref(A.mask||A);try{h.pushState(N,"",_)}catch(P){if(P instanceof DOMException&&P.name==="DataCloneError")throw P;u.location.assign(_)}f&&v&&v({action:p,location:j.location,delta:1})}function x(C,R){p="REPLACE";let A=my(C)?C:Nf(j.location,C,R);g=w();let N=py(A,g),_=j.createHref(A.mask||A);h.replaceState(N,"",_),f&&v&&v({action:p,location:j.location,delta:0})}function T(C){return Bw(u,C)}let j={get action(){return p},get location(){return a(u,h)},listen(C){if(v)throw new Error("A history only accepts one active listener");return u.addEventListener(hy,S),v=C,()=>{u.removeEventListener(hy,S),v=null}},createHref(C){return l(u,C)},createURL:T,encodeLocation(C){let R=T(C);return{pathname:R.pathname,search:R.search,hash:R.hash}},push:b,replace:x,go(C){return h.go(C)}};return j}function Bw(a,l,o=!1){let i="http://localhost";a&&(i=a.location.origin!=="null"?a.location.origin:a.location.href),ht(i,"No window.location.(origin|href) available to create URL");let u=typeof l=="string"?l:Si(l);return u=u.replace(/ $/,"%20"),!o&&Wy.test(u)&&(u=i+u),new URL(u,i)}function ex(a,l,o="/"){return Pw(a,l,o,!1)}function Pw(a,l,o,i,u){let f=typeof l=="string"?mo(l):l,h=Ka(f.pathname||"/",o);if(h==null)return null;let p=qw(a),v=null,g=Jw(h);for(let w=0;v==null&&w<p.length;++w)v=Fw(p[w],g,i);return v}function qw(a){let l=tx(a);return Vw(l),l}function tx(a,l=[],o=[],i="",u=!1){let f=(h,p,v=u,g)=>{let w={relativePath:g===void 0?h.path||"":g,caseSensitive:h.caseSensitive===!0,childrenIndex:p,route:h};if(w.relativePath.startsWith("/")){if(!w.relativePath.startsWith(i)&&v)return;ht(w.relativePath.startsWith(i),`Absolute route path "${w.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),w.relativePath=w.relativePath.slice(i.length)}let S=$n([i,w.relativePath]),b=o.concat(w);h.children&&h.children.length>0&&(ht(h.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${S}".`),tx(h.children,l,b,S,v)),!(h.path==null&&!h.index)&&l.push({path:S,score:Qw(S,h.index),routesMeta:b.map((x,T)=>{let[j,C]=lx(x.relativePath,x.caseSensitive,T===b.length-1);return{...x,matcher:j,compiledParams:C}})})};return a.forEach((h,p)=>{var v;if(h.path===""||!((v=h.path)!=null&&v.includes("?")))f(h,p);else for(let g of nx(h.path))f(h,p,!0,g)}),l}function nx(a){let l=a.split("/");if(l.length===0)return[];let[o,...i]=l,u=o.endsWith("?"),f=o.replace(/\?$/,"");if(i.length===0)return u?[f,""]:[f];let h=nx(i.join("/")),p=[];return p.push(...h.map(v=>v===""?f:[f,v].join("/"))),u&&p.push(...h),p.map(v=>a.startsWith("/")&&v===""?"/":v)}function Vw(a){a.sort((l,o)=>l.score!==o.score?o.score-l.score:Zw(l.routesMeta.map(i=>i.childrenIndex),o.routesMeta.map(i=>i.childrenIndex)))}var Yw=/^:[\w-]+$/,Gw=3,Iw=2,$w=1,Kw=10,Xw=-2,vy=a=>a==="*";function Qw(a,l){let o=a.split("/"),i=o.length;return o.some(vy)&&(i+=Xw),l&&(i+=Iw),o.filter(u=>!vy(u)).reduce((u,f)=>u+(Yw.test(f)?Gw:f===""?$w:Kw),i)}function Zw(a,l){return a.length===l.length&&a.slice(0,-1).every((i,u)=>i===l[u])?a[a.length-1]-l[l.length-1]:0}function Fw(a,l,o=!1){let{routesMeta:i}=a,u={},f="/",h=[];for(let p=0;p<i.length;++p){let v=i[p],g=p===i.length-1,w=f==="/"?l:l.slice(f.length)||"/",S={path:v.relativePath,caseSensitive:v.caseSensitive,end:g},b=v.matcher&&v.compiledParams?ax(S,w,v.matcher,v.compiledParams):dc(S,w),x=v.route;if(!b&&g&&o&&!i[i.length-1].route.index&&(b=dc({path:v.relativePath,caseSensitive:v.caseSensitive,end:!1},w)),!b)return null;Object.assign(u,b.params),h.push({params:u,pathname:$n([f,b.pathname]),pathnameBase:tj($n([f,b.pathnameBase])),route:x}),b.pathnameBase!=="/"&&(f=$n([f,b.pathnameBase]))}return h}function dc(a,l){typeof a=="string"&&(a={path:a,caseSensitive:!1,end:!0});let[o,i]=lx(a.path,a.caseSensitive,a.end);return ax(a,l,o,i)}function ax(a,l,o,i){let u=l.match(o);if(!u)return null;let f=u[0],h=f.replace(/(.)\/+$/,"$1"),p=u.slice(1);return{params:i.reduce((g,{paramName:w,isOptional:S},b)=>{if(w==="*"){let T=p[b]||"";h=f.slice(0,f.length-T.length).replace(/(.)\/+$/,"$1")}const x=p[b];return S&&!x?g[w]=void 0:g[w]=(x||"").replace(/%2F/g,"/"),g},{}),pathname:f,pathnameBase:h,pattern:a}}function lx(a,l=!1,o=!0){Kn(a==="*"||!a.endsWith("*")||a.endsWith("/*"),`Route path "${a}" will be treated as if it were "${a.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${a.replace(/\*$/,"/*")}".`);let i=[],u="^"+a.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(h,p,v,g,w)=>{if(i.push({paramName:p,isOptional:v!=null}),v){let S=w.charAt(g+h.length);return S&&S!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return a.endsWith("*")?(i.push({paramName:"*"}),u+=a==="*"||a==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):o?u+="\\/*$":a!==""&&a!=="/"&&(u+="(?:(?=\\/|$))"),[new RegExp(u,l?void 0:"i"),i]}function Jw(a){try{return a.split("/").map(l=>decodeURIComponent(l).replace(/\//g,"%2F")).join("/")}catch(l){return Kn(!1,`The URL path "${a}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${l}).`),a}}function Ka(a,l){if(l==="/")return a;if(!a.toLowerCase().startsWith(l.toLowerCase()))return null;let o=l.endsWith("/")?l.length-1:l.length,i=a.charAt(o);return i&&i!=="/"?null:a.slice(o)||"/"}function Ww(a,l="/"){let{pathname:o,search:i="",hash:u=""}=typeof a=="string"?mo(a):a,f;return o?(o=rx(o),o.startsWith("/")?f=gy(o.substring(1),"/"):f=gy(o,l)):f=l,{pathname:f,search:nj(i),hash:aj(u)}}function gy(a,l){let o=fc(l).split("/");return a.split("/").forEach(u=>{u===".."?o.length>1&&o.pop():u!=="."&&o.push(u)}),o.length>1?o.join("/"):"/"}function uf(a,l,o,i){return`Cannot include a '${a}' character in a manually specified \`to.${l}\` field [${JSON.stringify(i)}]. Please separate it out to the \`to.${o}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function ej(a){return a.filter((l,o)=>o===0||l.route.path&&l.route.path.length>0)}function nh(a){let l=ej(a);return l.map((o,i)=>i===l.length-1?o.pathname:o.pathnameBase)}function yc(a,l,o,i=!1){let u;typeof a=="string"?u=mo(a):(u={...a},ht(!u.pathname||!u.pathname.includes("?"),uf("?","pathname","search",u)),ht(!u.pathname||!u.pathname.includes("#"),uf("#","pathname","hash",u)),ht(!u.search||!u.search.includes("#"),uf("#","search","hash",u)));let f=a===""||u.pathname==="",h=f?"/":u.pathname,p;if(h==null)p=o;else{let S=l.length-1;if(!i&&h.startsWith("..")){let b=h.split("/");for(;b[0]==="..";)b.shift(),S-=1;u.pathname=b.join("/")}p=S>=0?l[S]:"/"}let v=Ww(u,p),g=h&&h!=="/"&&h.endsWith("/"),w=(f||h===".")&&o.endsWith("/");return!v.pathname.endsWith("/")&&(g||w)&&(v.pathname+="/"),v}var rx=a=>a.replace(/[\\/]{2,}/g,"/"),$n=a=>rx(a.join("/")),fc=a=>a.replace(/\/+$/,""),tj=a=>fc(a).replace(/^\/*/,"/"),nj=a=>!a||a==="?"?"":a.startsWith("?")?a:"?"+a,aj=a=>!a||a==="#"?"":a.startsWith("#")?a:"#"+a,lj=class{constructor(a,l,o,i=!1){this.status=a,this.statusText=l||"",this.internal=i,o instanceof Error?(this.data=o.toString(),this.error=o):this.data=o}};function rj(a){return a!=null&&typeof a.status=="number"&&typeof a.statusText=="string"&&typeof a.internal=="boolean"&&"data"in a}function oj(a){let l=a.map(o=>o.route.path).filter(Boolean);return $n(l)||"/"}var ox=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ix(a,l){let o=a;if(typeof o!="string"||!th.test(o))return{absoluteURL:void 0,isExternal:!1,to:o};let i=o,u=!1;if(ox)try{let f=new URL(window.location.href),h=Wy.test(o)?new URL(kw(o,f.protocol)):new URL(o),p=Ka(h.pathname,l);h.origin===f.origin&&p!=null?o=p+h.search+h.hash:u=!0}catch{Kn(!1,`<Link to="${o}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:i,isExternal:u,to:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var sx=["POST","PUT","PATCH","DELETE"];new Set(sx);var ij=["GET",...sx];new Set(ij);var sj=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function cj(a){try{return sj.includes(new URL(a).protocol)}catch{return!1}}var po=m.createContext(null);po.displayName="DataRouter";var xc=m.createContext(null);xc.displayName="DataRouterState";var cx=m.createContext(!1);function uj(){return m.useContext(cx)}var ux=m.createContext({isTransitioning:!1});ux.displayName="ViewTransition";var dj=m.createContext(new Map);dj.displayName="Fetchers";var fj=m.createContext(null);fj.displayName="Await";var bn=m.createContext(null);bn.displayName="Navigation";var Ri=m.createContext(null);Ri.displayName="Location";var va=m.createContext({outlet:null,matches:[],isDataRoute:!1});va.displayName="Route";var ah=m.createContext(null);ah.displayName="RouteError";var dx="REACT_ROUTER_ERROR",hj="REDIRECT",mj="ROUTE_ERROR_RESPONSE";function pj(a){if(a.startsWith(`${dx}:${hj}:{`))try{let l=JSON.parse(a.slice(28));if(typeof l=="object"&&l&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.location=="string"&&typeof l.reloadDocument=="boolean"&&typeof l.replace=="boolean")return l}catch{}}function vj(a){if(a.startsWith(`${dx}:${mj}:{`))try{let l=JSON.parse(a.slice(40));if(typeof l=="object"&&l&&typeof l.status=="number"&&typeof l.statusText=="string")return new lj(l.status,l.statusText,l.data)}catch{}}function gj(a,{relative:l}={}){ht(vo(),"useHref() may be used only in the context of a <Router> component.");let{basename:o,navigator:i}=m.useContext(bn),{hash:u,pathname:f,search:h}=Ti(a,{relative:l}),p=f;return o!=="/"&&(p=f==="/"?o:$n([o,f])),i.createHref({pathname:p,search:h,hash:u})}function vo(){return m.useContext(Ri)!=null}function Sn(){return ht(vo(),"useLocation() may be used only in the context of a <Router> component."),m.useContext(Ri).location}var fx="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function hx(a){m.useContext(bn).static||m.useLayoutEffect(a)}function bc(){let{isDataRoute:a}=m.useContext(va);return a?Mj():yj()}function yj(){ht(vo(),"useNavigate() may be used only in the context of a <Router> component.");let a=m.useContext(po),{basename:l,navigator:o}=m.useContext(bn),{matches:i}=m.useContext(va),{pathname:u}=Sn(),f=JSON.stringify(nh(i)),h=m.useRef(!1);return hx(()=>{h.current=!0}),m.useCallback((v,g={})=>{if(Kn(h.current,fx),!h.current)return;if(typeof v=="number"){o.go(v);return}let w=yc(v,JSON.parse(f),u,g.relative==="path");a==null&&l!=="/"&&(w.pathname=w.pathname==="/"?l:$n([l,w.pathname])),(g.replace?o.replace:o.push)(w,g.state,g)},[l,o,f,u,a])}m.createContext(null);function Ti(a,{relative:l}={}){let{matches:o}=m.useContext(va),{pathname:i}=Sn(),u=JSON.stringify(nh(o));return m.useMemo(()=>yc(a,JSON.parse(u),i,l==="path"),[a,u,i,l])}function xj(a,l){return mx(a,l)}function mx(a,l,o){var C;ht(vo(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=m.useContext(bn),{matches:u}=m.useContext(va),f=u[u.length-1],h=f?f.params:{},p=f?f.pathname:"/",v=f?f.pathnameBase:"/",g=f&&f.route;{let R=g&&g.path||"";vx(p,!g||R.endsWith("*")||R.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${R}">) 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.
59
+
60
+ Please change the parent <Route path="${R}"> to <Route path="${R==="/"?"*":`${R}/*`}">.`)}let w=Sn(),S;if(l){let R=typeof l=="string"?mo(l):l;ht(v==="/"||((C=R.pathname)==null?void 0:C.startsWith(v)),`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 "${v}" but pathname "${R.pathname}" was given in the \`location\` prop.`),S=R}else S=w;let b=S.pathname||"/",x=b;if(v!=="/"){let R=v.replace(/^\//,"").split("/");x="/"+b.replace(/^\//,"").split("/").slice(R.length).join("/")}let T=o&&o.state.matches.length?o.state.matches.map(R=>Object.assign(R,{route:o.manifest[R.route.id]||R.route})):ex(a,{pathname:x});Kn(g||T!=null,`No routes matched location "${S.pathname}${S.search}${S.hash}" `),Kn(T==null||T[T.length-1].route.element!==void 0||T[T.length-1].route.Component!==void 0||T[T.length-1].route.lazy!==void 0,`Matched leaf route at location "${S.pathname}${S.search}${S.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 j=Cj(T&&T.map(R=>Object.assign({},R,{params:Object.assign({},h,R.params),pathname:$n([v,i.encodeLocation?i.encodeLocation(R.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:R.pathname]),pathnameBase:R.pathnameBase==="/"?v:$n([v,i.encodeLocation?i.encodeLocation(R.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:R.pathnameBase])})),u,o);return l&&j?m.createElement(Ri.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...S},navigationType:"POP"}},j):j}function bj(){let a=Aj(),l=rj(a)?`${a.status} ${a.statusText}`:a instanceof Error?a.message:JSON.stringify(a),o=a instanceof Error?a.stack:null,i="rgba(200,200,200, 0.5)",u={padding:"0.5rem",backgroundColor:i},f={padding:"2px 4px",backgroundColor:i},h=null;return console.error("Error handled by React Router default ErrorBoundary:",a),h=m.createElement(m.Fragment,null,m.createElement("p",null,"💿 Hey developer 👋"),m.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",m.createElement("code",{style:f},"ErrorBoundary")," or"," ",m.createElement("code",{style:f},"errorElement")," prop on your route.")),m.createElement(m.Fragment,null,m.createElement("h2",null,"Unexpected Application Error!"),m.createElement("h3",{style:{fontStyle:"italic"}},l),o?m.createElement("pre",{style:u},o):null,h)}var Sj=m.createElement(bj,null),px=class extends m.Component{constructor(a){super(a),this.state={location:a.location,revalidation:a.revalidation,error:a.error}}static getDerivedStateFromError(a){return{error:a}}static getDerivedStateFromProps(a,l){return l.location!==a.location||l.revalidation!=="idle"&&a.revalidation==="idle"?{error:a.error,location:a.location,revalidation:a.revalidation}:{error:a.error!==void 0?a.error:l.error,location:l.location,revalidation:a.revalidation||l.revalidation}}componentDidCatch(a,l){this.props.onError?this.props.onError(a,l):console.error("React Router caught the following error during render",a)}render(){let a=this.state.error;if(this.context&&typeof a=="object"&&a&&"digest"in a&&typeof a.digest=="string"){const o=vj(a.digest);o&&(a=o)}let l=a!==void 0?m.createElement(va.Provider,{value:this.props.routeContext},m.createElement(ah.Provider,{value:a,children:this.props.component})):this.props.children;return this.context?m.createElement(wj,{error:a},l):l}};px.contextType=cx;var df=new WeakMap;function wj({children:a,error:l}){let{basename:o}=m.useContext(bn);if(typeof l=="object"&&l&&"digest"in l&&typeof l.digest=="string"){let i=pj(l.digest);if(i){let u=df.get(l);if(u)throw u;let f=ix(i.location,o),h=f.absoluteURL||f.to;if(cj(h))throw new Error("Invalid redirect location");if(ox&&!df.get(l))if(f.isExternal||i.reloadDocument)window.location.href=h;else{const p=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(f.to,{replace:i.replace}));throw df.set(l,p),p}return m.createElement("meta",{httpEquiv:"refresh",content:`0;url=${h}`})}}return a}function jj({routeContext:a,match:l,children:o}){let i=m.useContext(po);return i&&i.static&&i.staticContext&&(l.route.errorElement||l.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=l.route.id),m.createElement(va.Provider,{value:a},o)}function Cj(a,l=[],o){let i=o==null?void 0:o.state;if(a==null){if(!i)return null;if(i.errors)a=i.matches;else if(l.length===0&&!i.initialized&&i.matches.length>0)a=i.matches;else return null}let u=a,f=i==null?void 0:i.errors;if(f!=null){let w=u.findIndex(S=>S.route.id&&(f==null?void 0:f[S.route.id])!==void 0);ht(w>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(f).join(",")}`),u=u.slice(0,Math.min(u.length,w+1))}let h=!1,p=-1;if(o&&i){h=i.renderFallback;for(let w=0;w<u.length;w++){let S=u[w];if((S.route.HydrateFallback||S.route.hydrateFallbackElement)&&(p=w),S.route.id){let{loaderData:b,errors:x}=i,T=S.route.loader&&!b.hasOwnProperty(S.route.id)&&(!x||x[S.route.id]===void 0);if(S.route.lazy||T){o.isStatic&&(h=!0),p>=0?u=u.slice(0,p+1):u=[u[0]];break}}}}let v=o==null?void 0:o.onError,g=i&&v?(w,S)=>{var b,x;v(w,{location:i.location,params:((x=(b=i.matches)==null?void 0:b[0])==null?void 0:x.params)??{},pattern:oj(i.matches),errorInfo:S})}:void 0;return u.reduceRight((w,S,b)=>{let x,T=!1,j=null,C=null;i&&(x=f&&S.route.id?f[S.route.id]:void 0,j=S.route.errorElement||Sj,h&&(p<0&&b===0?(vx("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),T=!0,C=null):p===b&&(T=!0,C=S.route.hydrateFallbackElement||null)));let R=l.concat(u.slice(0,b+1)),A=()=>{let N;return x?N=j:T?N=C:S.route.Component?N=m.createElement(S.route.Component,null):S.route.element?N=S.route.element:N=w,m.createElement(jj,{match:S,routeContext:{outlet:w,matches:R,isDataRoute:i!=null},children:N})};return i&&(S.route.ErrorBoundary||S.route.errorElement||b===0)?m.createElement(px,{location:i.location,revalidation:i.revalidation,component:j,error:x,children:A(),routeContext:{outlet:null,matches:R,isDataRoute:!0},onError:g}):A()},null)}function lh(a){return`${a} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ej(a){let l=m.useContext(po);return ht(l,lh(a)),l}function Rj(a){let l=m.useContext(xc);return ht(l,lh(a)),l}function Tj(a){let l=m.useContext(va);return ht(l,lh(a)),l}function rh(a){let l=Tj(a),o=l.matches[l.matches.length-1];return ht(o.route.id,`${a} can only be used on routes that contain a unique "id"`),o.route.id}function Nj(){return rh("useRouteId")}function Aj(){var i;let a=m.useContext(ah),l=Rj("useRouteError"),o=rh("useRouteError");return a!==void 0?a:(i=l.errors)==null?void 0:i[o]}function Mj(){let{router:a}=Ej("useNavigate"),l=rh("useNavigate"),o=m.useRef(!1);return hx(()=>{o.current=!0}),m.useCallback(async(u,f={})=>{Kn(o.current,fx),o.current&&(typeof u=="number"?await a.navigate(u):await a.navigate(u,{fromRouteId:l,...f}))},[a,l])}var yy={};function vx(a,l,o){!l&&!yy[a]&&(yy[a]=!0,Kn(!1,o))}m.memo(_j);function _j({routes:a,manifest:l,future:o,state:i,isStatic:u,onError:f}){return mx(a,void 0,{manifest:l,state:i,isStatic:u,onError:f})}function Af({to:a,replace:l,state:o,relative:i}){ht(vo(),"<Navigate> may be used only in the context of a <Router> component.");let{static:u}=m.useContext(bn);Kn(!u,"<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:f}=m.useContext(va),{pathname:h}=Sn(),p=bc(),v=yc(a,nh(f),h,i==="path"),g=JSON.stringify(v);return m.useEffect(()=>{p(JSON.parse(g),{replace:l,state:o,relative:i})},[p,g,i,l,o]),null}function nn(a){ht(!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 Oj({basename:a="/",children:l=null,location:o,navigationType:i="POP",navigator:u,static:f=!1,useTransitions:h}){ht(!vo(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let p=a.replace(/^\/*/,"/"),v=m.useMemo(()=>({basename:p,navigator:u,static:f,useTransitions:h,future:{}}),[p,u,f,h]);typeof o=="string"&&(o=mo(o));let{pathname:g="/",search:w="",hash:S="",state:b=null,key:x="default",mask:T}=o,j=m.useMemo(()=>{let C=Ka(g,p);return C==null?null:{location:{pathname:C,search:w,hash:S,state:b,key:x,mask:T},navigationType:i}},[p,g,w,S,b,x,i,T]);return Kn(j!=null,`<Router basename="${p}"> is not able to match the URL "${g}${w}${S}" because it does not start with the basename, so the <Router> won't render anything.`),j==null?null:m.createElement(bn.Provider,{value:v},m.createElement(Ri.Provider,{children:l,value:j}))}function gx({children:a,location:l}){return xj(Mf(a),l)}function Mf(a,l=[]){let o=[];return m.Children.forEach(a,(i,u)=>{if(!m.isValidElement(i))return;let f=[...l,u];if(i.type===m.Fragment){o.push.apply(o,Mf(i.props.children,f));return}ht(i.type===nn,`[${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>`),ht(!i.props.index||!i.props.children,"An index route cannot have child routes.");let h={id:i.props.id||f.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&&(h.children=Mf(i.props.children,f)),o.push(h)}),o}var rc="get",oc="application/x-www-form-urlencoded";function Sc(a){return typeof HTMLElement<"u"&&a instanceof HTMLElement}function Dj(a){return Sc(a)&&a.tagName.toLowerCase()==="button"}function zj(a){return Sc(a)&&a.tagName.toLowerCase()==="form"}function kj(a){return Sc(a)&&a.tagName.toLowerCase()==="input"}function Lj(a){return!!(a.metaKey||a.altKey||a.ctrlKey||a.shiftKey)}function Uj(a,l){return a.button===0&&(!l||l==="_self")&&!Lj(a)}var Qs=null;function Hj(){if(Qs===null)try{new FormData(document.createElement("form"),0),Qs=!1}catch{Qs=!0}return Qs}var Bj=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ff(a){return a!=null&&!Bj.has(a)?(Kn(!1,`"${a}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${oc}"`),null):a}function Pj(a,l){let o,i,u,f,h;if(zj(a)){let p=a.getAttribute("action");i=p?Ka(p,l):null,o=a.getAttribute("method")||rc,u=ff(a.getAttribute("enctype"))||oc,f=new FormData(a)}else if(Dj(a)||kj(a)&&(a.type==="submit"||a.type==="image")){let p=a.form;if(p==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let v=a.getAttribute("formaction")||p.getAttribute("action");if(i=v?Ka(v,l):null,o=a.getAttribute("formmethod")||p.getAttribute("method")||rc,u=ff(a.getAttribute("formenctype"))||ff(p.getAttribute("enctype"))||oc,f=new FormData(p,a),!Hj()){let{name:g,type:w,value:S}=a;if(w==="image"){let b=g?`${g}.`:"";f.append(`${b}x`,"0"),f.append(`${b}y`,"0")}else g&&f.append(g,S)}}else{if(Sc(a))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');o=rc,i=null,u=oc,h=a}return f&&u==="text/plain"&&(h=f,f=void 0),{action:i,method:o.toLowerCase(),encType:u,formData:f,body:h}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function oh(a,l){if(a===!1||a===null||typeof a>"u")throw new Error(l)}function yx(a,l,o,i){let u=typeof a=="string"?new URL(a,typeof window>"u"?"server://singlefetch/":window.location.origin):a;return o?u.pathname.endsWith("/")?u.pathname=`${u.pathname}_.${i}`:u.pathname=`${u.pathname}.${i}`:u.pathname==="/"?u.pathname=`_root.${i}`:l&&Ka(u.pathname,l)==="/"?u.pathname=`${fc(l)}/_root.${i}`:u.pathname=`${fc(u.pathname)}.${i}`,u}async function qj(a,l){if(a.id in l)return l[a.id];try{let o=await import(a.module);return l[a.id]=o,o}catch(o){return console.error(`Error loading route module \`${a.module}\`, reloading page...`),console.error(o),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Vj(a){return a==null?!1:a.href==null?a.rel==="preload"&&typeof a.imageSrcSet=="string"&&typeof a.imageSizes=="string":typeof a.rel=="string"&&typeof a.href=="string"}async function Yj(a,l,o){let i=await Promise.all(a.map(async u=>{let f=l.routes[u.route.id];if(f){let h=await qj(f,o);return h.links?h.links():[]}return[]}));return Kj(i.flat(1).filter(Vj).filter(u=>u.rel==="stylesheet"||u.rel==="preload").map(u=>u.rel==="stylesheet"?{...u,rel:"prefetch",as:"style"}:{...u,rel:"prefetch"}))}function xy(a,l,o,i,u,f){let h=(v,g)=>o[g]?v.route.id!==o[g].route.id:!0,p=(v,g)=>{var w;return o[g].pathname!==v.pathname||((w=o[g].route.path)==null?void 0:w.endsWith("*"))&&o[g].params["*"]!==v.params["*"]};return f==="assets"?l.filter((v,g)=>h(v,g)||p(v,g)):f==="data"?l.filter((v,g)=>{var S;let w=i.routes[v.route.id];if(!w||!w.hasLoader)return!1;if(h(v,g)||p(v,g))return!0;if(v.route.shouldRevalidate){let b=v.route.shouldRevalidate({currentUrl:new URL(u.pathname+u.search+u.hash,window.origin),currentParams:((S=o[0])==null?void 0:S.params)||{},nextUrl:new URL(a,window.origin),nextParams:v.params,defaultShouldRevalidate:!0});if(typeof b=="boolean")return b}return!0}):[]}function Gj(a,l,{includeHydrateFallback:o}={}){return Ij(a.map(i=>{let u=l.routes[i.route.id];if(!u)return[];let f=[u.module];return u.clientActionModule&&(f=f.concat(u.clientActionModule)),u.clientLoaderModule&&(f=f.concat(u.clientLoaderModule)),o&&u.hydrateFallbackModule&&(f=f.concat(u.hydrateFallbackModule)),u.imports&&(f=f.concat(u.imports)),f}).flat(1))}function Ij(a){return[...new Set(a)]}function $j(a){let l={},o=Object.keys(a).sort();for(let i of o)l[i]=a[i];return l}function Kj(a,l){let o=new Set;return new Set(l),a.reduce((i,u)=>{let f=JSON.stringify($j(u));return o.has(f)||(o.add(f),i.push({key:f,link:u})),i},[])}function ih(){let a=m.useContext(po);return oh(a,"You must render this element inside a <DataRouterContext.Provider> element"),a}function Xj(){let a=m.useContext(xc);return oh(a,"You must render this element inside a <DataRouterStateContext.Provider> element"),a}var sh=m.createContext(void 0);sh.displayName="FrameworkContext";function wc(){let a=m.useContext(sh);return oh(a,"You must render this element inside a <HydratedRouter> element"),a}function Qj(a,l){let o=m.useContext(sh),[i,u]=m.useState(!1),[f,h]=m.useState(!1),{onFocus:p,onBlur:v,onMouseEnter:g,onMouseLeave:w,onTouchStart:S}=l,b=m.useRef(null);m.useEffect(()=>{if(a==="render"&&h(!0),a==="viewport"){let j=R=>{R.forEach(A=>{h(A.isIntersecting)})},C=new IntersectionObserver(j,{threshold:.5});return b.current&&C.observe(b.current),()=>{C.disconnect()}}},[a]),m.useEffect(()=>{if(i){let j=setTimeout(()=>{h(!0)},100);return()=>{clearTimeout(j)}}},[i]);let x=()=>{u(!0)},T=()=>{u(!1),h(!1)};return o?a!=="intent"?[f,b,{}]:[f,b,{onFocus:pi(p,x),onBlur:pi(v,T),onMouseEnter:pi(g,x),onMouseLeave:pi(w,T),onTouchStart:pi(S,x)}]:[!1,b,{}]}function pi(a,l){return o=>{a&&a(o),o.defaultPrevented||l(o)}}function Zj({page:a,...l}){let o=uj(),{nonce:i}=wc(),{router:u}=ih(),f=m.useMemo(()=>ex(u.routes,a,u.basename),[u.routes,a,u.basename]);return f?(l.nonce==null&&i&&(l={...l,nonce:i}),o?m.createElement(Jj,{page:a,matches:f,...l}):m.createElement(Wj,{page:a,matches:f,...l})):null}function Fj(a){let{manifest:l,routeModules:o}=wc(),[i,u]=m.useState([]);return m.useEffect(()=>{let f=!1;return Yj(a,l,o).then(h=>{f||u(h)}),()=>{f=!0}},[a,l,o]),i}function Jj({page:a,matches:l,...o}){let i=Sn(),{future:u}=wc(),{basename:f}=ih(),h=m.useMemo(()=>{if(a===i.pathname+i.search+i.hash)return[];let p=yx(a,f,u.v8_trailingSlashAwareDataRequests,"rsc"),v=!1,g=[];for(let w of l)typeof w.route.shouldRevalidate=="function"?v=!0:g.push(w.route.id);return v&&g.length>0&&p.searchParams.set("_routes",g.join(",")),[p.pathname+p.search]},[f,u.v8_trailingSlashAwareDataRequests,a,i,l]);return m.createElement(m.Fragment,null,h.map(p=>m.createElement("link",{key:p,rel:"prefetch",as:"fetch",href:p,...o})))}function Wj({page:a,matches:l,...o}){let i=Sn(),{future:u,manifest:f,routeModules:h}=wc(),{basename:p}=ih(),{loaderData:v,matches:g}=Xj(),w=m.useMemo(()=>xy(a,l,g,f,i,"data"),[a,l,g,f,i]),S=m.useMemo(()=>xy(a,l,g,f,i,"assets"),[a,l,g,f,i]),b=m.useMemo(()=>{if(a===i.pathname+i.search+i.hash)return[];let j=new Set,C=!1;if(l.forEach(A=>{var _;let N=f.routes[A.route.id];!N||!N.hasLoader||(!w.some(P=>P.route.id===A.route.id)&&A.route.id in v&&((_=h[A.route.id])!=null&&_.shouldRevalidate)||N.hasClientLoader?C=!0:j.add(A.route.id))}),j.size===0)return[];let R=yx(a,p,u.v8_trailingSlashAwareDataRequests,"data");return C&&j.size>0&&R.searchParams.set("_routes",l.filter(A=>j.has(A.route.id)).map(A=>A.route.id).join(",")),[R.pathname+R.search]},[p,u.v8_trailingSlashAwareDataRequests,v,i,f,w,l,a,h]),x=m.useMemo(()=>Gj(S,f),[S,f]),T=Fj(S);return m.createElement(m.Fragment,null,b.map(j=>m.createElement("link",{key:j,rel:"prefetch",as:"fetch",href:j,...o})),x.map(j=>m.createElement("link",{key:j,rel:"modulepreload",href:j,...o})),T.map(({key:j,link:C})=>m.createElement("link",{key:j,nonce:o.nonce,...C,crossOrigin:C.crossOrigin??o.crossOrigin})))}function eC(...a){return l=>{a.forEach(o=>{typeof o=="function"?o(l):o!=null&&(o.current=l)})}}var tC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{tC&&(window.__reactRouterVersion="7.18.2")}catch{}function nC({basename:a,children:l,useTransitions:o,window:i}){let u=m.useRef();u.current==null&&(u.current=Lw({window:i,v5Compat:!0}));let f=u.current,[h,p]=m.useState({action:f.action,location:f.location}),v=m.useCallback(g=>{o===!1?p(g):m.startTransition(()=>p(g))},[o]);return m.useLayoutEffect(()=>f.listen(v),[f,v]),m.createElement(Oj,{basename:a,children:l,location:h.location,navigationType:h.action,navigator:f,useTransitions:o})}var oo=m.forwardRef(function({onClick:l,discover:o="render",prefetch:i="none",relative:u,reloadDocument:f,replace:h,mask:p,state:v,target:g,to:w,preventScrollReset:S,viewTransition:b,defaultShouldRevalidate:x,...T},j){let{basename:C,navigator:R,useTransitions:A}=m.useContext(bn),N=typeof w=="string"&&th.test(w),_=ix(w,C);w=_.to;let P=gj(w,{relative:u}),q=Sn(),z=null;if(p){let he=yc(p,[],q.mask?q.mask.pathname:"/",!0);C!=="/"&&(he.pathname=he.pathname==="/"?C:$n([C,he.pathname])),z=R.createHref(he)}let[U,ee,ae]=Qj(i,T),oe=rC(w,{replace:h,mask:p,state:v,target:g,preventScrollReset:S,relative:u,viewTransition:b,defaultShouldRevalidate:x,useTransitions:A});function Z(he){l&&l(he),he.defaultPrevented||oe(he)}let ie=!(_.isExternal||f),se=m.createElement("a",{...T,...ae,href:(ie?z:void 0)||_.absoluteURL||P,onClick:ie?Z:l,ref:eC(j,ee),target:g,"data-discover":!N&&o==="render"?"true":void 0});return U&&!N?m.createElement(m.Fragment,null,se,m.createElement(Zj,{page:P})):se});oo.displayName="Link";var xx=m.forwardRef(function({"aria-current":l="page",caseSensitive:o=!1,className:i="",end:u=!1,style:f,to:h,viewTransition:p,children:v,...g},w){let S=Ti(h,{relative:g.relative}),b=Sn(),x=m.useContext(xc),{navigator:T,basename:j}=m.useContext(bn),C=x!=null&&uC(S)&&p===!0,R=T.encodeLocation?T.encodeLocation(S).pathname:S.pathname,A=b.pathname,N=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;o||(A=A.toLowerCase(),N=N?N.toLowerCase():null,R=R.toLowerCase()),N&&j&&(N=Ka(N,j)||N);const _=R!=="/"&&R.endsWith("/")?R.length-1:R.length;let P=A===R||!u&&A.startsWith(R)&&A.charAt(_)==="/",q=N!=null&&(N===R||!u&&N.startsWith(R)&&N.charAt(R.length)==="/"),z={isActive:P,isPending:q,isTransitioning:C},U=P?l:void 0,ee;typeof i=="function"?ee=i(z):ee=[i,P?"active":null,q?"pending":null,C?"transitioning":null].filter(Boolean).join(" ");let ae=typeof f=="function"?f(z):f;return m.createElement(oo,{...g,"aria-current":U,className:ee,ref:w,style:ae,to:h,viewTransition:p},typeof v=="function"?v(z):v)});xx.displayName="NavLink";var aC=m.forwardRef(({discover:a="render",fetcherKey:l,navigate:o,reloadDocument:i,replace:u,state:f,method:h=rc,action:p,onSubmit:v,relative:g,preventScrollReset:w,viewTransition:S,defaultShouldRevalidate:b,...x},T)=>{let{useTransitions:j}=m.useContext(bn),C=sC(),R=cC(p,{relative:g}),A=h.toLowerCase()==="get"?"get":"post",N=typeof p=="string"&&th.test(p),_=P=>{if(v&&v(P),P.defaultPrevented)return;P.preventDefault();let q=P.nativeEvent.submitter,z=(q==null?void 0:q.getAttribute("formmethod"))||h,U=()=>C(q||P.currentTarget,{fetcherKey:l,method:z,navigate:o,replace:u,state:f,relative:g,preventScrollReset:w,viewTransition:S,defaultShouldRevalidate:b});j&&o!==!1?m.startTransition(()=>U()):U()};return m.createElement("form",{ref:T,method:A,action:R,onSubmit:i?v:_,...x,"data-discover":!N&&a==="render"?"true":void 0})});aC.displayName="Form";function lC(a){return`${a} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function bx(a){let l=m.useContext(po);return ht(l,lC(a)),l}function rC(a,{target:l,replace:o,mask:i,state:u,preventScrollReset:f,relative:h,viewTransition:p,defaultShouldRevalidate:v,useTransitions:g}={}){let w=bc(),S=Sn(),b=Ti(a,{relative:h});return m.useCallback(x=>{if(Uj(x,l)){x.preventDefault();let T=o!==void 0?o:Si(S)===Si(b),j=()=>w(a,{replace:T,mask:i,state:u,preventScrollReset:f,relative:h,viewTransition:p,defaultShouldRevalidate:v});g?m.startTransition(()=>j()):j()}},[S,w,b,o,i,u,l,a,f,h,p,v,g])}var oC=0,iC=()=>`__${String(++oC)}__`;function sC(){let{router:a}=bx("useSubmit"),{basename:l}=m.useContext(bn),o=Nj(),i=a.fetch,u=a.navigate;return m.useCallback(async(f,h={})=>{let{action:p,method:v,encType:g,formData:w,body:S}=Pj(f,l);if(h.navigate===!1){let b=h.fetcherKey||iC();await i(b,o,h.action||p,{defaultShouldRevalidate:h.defaultShouldRevalidate,preventScrollReset:h.preventScrollReset,formData:w,body:S,formMethod:h.method||v,formEncType:h.encType||g,flushSync:h.flushSync})}else await u(h.action||p,{defaultShouldRevalidate:h.defaultShouldRevalidate,preventScrollReset:h.preventScrollReset,formData:w,body:S,formMethod:h.method||v,formEncType:h.encType||g,replace:h.replace,state:h.state,fromRouteId:o,flushSync:h.flushSync,viewTransition:h.viewTransition})},[i,u,l,o])}function cC(a,{relative:l}={}){let{basename:o}=m.useContext(bn),i=m.useContext(va);ht(i,"useFormAction must be used inside a RouteContext");let[u]=i.matches.slice(-1),f={...Ti(a||".",{relative:l})},h=Sn();if(a==null){f.search=h.search;let p=new URLSearchParams(f.search),v=p.getAll("index");if(v.some(w=>w==="")){p.delete("index"),v.filter(S=>S).forEach(S=>p.append("index",S));let w=p.toString();f.search=w?`?${w}`:""}}return(!a||a===".")&&u.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),o!=="/"&&(f.pathname=f.pathname==="/"?o:$n([o,f.pathname])),Si(f)}function uC(a,{relative:l}={}){let o=m.useContext(ux);ht(o!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=bx("useViewTransitionState"),u=Ti(a,{relative:l});if(!o.isTransitioning)return!1;let f=Ka(o.currentLocation.pathname,i)||o.currentLocation.pathname,h=Ka(o.nextLocation.pathname,i)||o.nextLocation.pathname;return dc(u.pathname,h)!=null||dc(u.pathname,f)!=null}var go=Jy();const dC=Wf(go),fC="";class hC extends Error{constructor(l,o,i){var u;super(typeof i=="object"&&i&&"error"in i?String(((u=i.error)==null?void 0:u.message)??i):"Request failed"),this.status=l,this.type=o,this.body=i}}async function vi(a,l,o,i){var v;const u=o!==void 0,f=await fetch(`${fC}${l}`,{method:a,headers:{...u?{"content-type":"application/json"}:{},...(i==null?void 0:i.headers)??{}},body:u?JSON.stringify(o):void 0,credentials:"include",...i}),h=await f.text();let p;try{p=h?JSON.parse(h):void 0}catch{p=h}if(!f.ok)throw new hC(f.status,typeof p=="object"&&p&&"error"in p?String(((v=p.error)==null?void 0:v.type)??"error"):"error",p);return p}const Ce={get:(a,l)=>vi("GET",a,void 0,l),post:(a,l,o)=>vi("POST",a,l,o),patch:(a,l,o)=>vi("PATCH",a,l,o),put:(a,l,o)=>vi("PUT",a,l,o),del:a=>vi("DELETE",a)},Sx=m.createContext(void 0);function mC({children:a}){const[l,o]=m.useState(null),[i,u]=m.useState(!0),f=m.useCallback(async()=>{try{const v=await Ce.get("/api/admin/me");o(v)}catch{o(null)}finally{u(!1)}},[]);m.useEffect(()=>{f()},[f]);const h=m.useCallback(async(v,g,w,S)=>{const b={username:v,password:g};w&&(b.totp=w),S&&(b.recoveryCode=S);try{const x=await Ce.post("/api/admin/login",b);return o({id:"admin",username:x.username,totpEnabled:x.totpEnabled}),{totpRequired:!1}}catch(x){const T=x.status,j=x.type;if(T===401&&j==="totp_required")return{totpRequired:!0};throw x}},[]),p=m.useCallback(async()=>{await Ce.post("/api/admin/logout"),o(null)},[]);return s.jsx(Sx.Provider,{value:{user:l,loading:i,login:h,logout:p,refresh:f},children:a})}function ch(){const a=m.useContext(Sx);if(!a)throw new Error("useAuth must be inside AuthProvider");return a}/**
61
+ * @license lucide-react v0.469.0 - ISC
62
+ *
63
+ * This source code is licensed under the ISC license.
64
+ * See the LICENSE file in the root directory of this source tree.
65
+ */const pC=a=>a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),wx=(...a)=>a.filter((l,o,i)=>!!l&&l.trim()!==""&&i.indexOf(l)===o).join(" ").trim();/**
66
+ * @license lucide-react v0.469.0 - ISC
67
+ *
68
+ * This source code is licensed under the ISC license.
69
+ * See the LICENSE file in the root directory of this source tree.
70
+ */var vC={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"};/**
71
+ * @license lucide-react v0.469.0 - ISC
72
+ *
73
+ * This source code is licensed under the ISC license.
74
+ * See the LICENSE file in the root directory of this source tree.
75
+ */const gC=m.forwardRef(({color:a="currentColor",size:l=24,strokeWidth:o=2,absoluteStrokeWidth:i,className:u="",children:f,iconNode:h,...p},v)=>m.createElement("svg",{ref:v,...vC,width:l,height:l,stroke:a,strokeWidth:i?Number(o)*24/Number(l):o,className:wx("lucide",u),...p},[...h.map(([g,w])=>m.createElement(g,w)),...Array.isArray(f)?f:[f]]));/**
76
+ * @license lucide-react v0.469.0 - ISC
77
+ *
78
+ * This source code is licensed under the ISC license.
79
+ * See the LICENSE file in the root directory of this source tree.
80
+ */const st=(a,l)=>{const o=m.forwardRef(({className:i,...u},f)=>m.createElement(gC,{ref:f,iconNode:l,className:wx(`lucide-${pC(a)}`,i),...u}));return o.displayName=`${a}`,o};/**
81
+ * @license lucide-react v0.469.0 - ISC
82
+ *
83
+ * This source code is licensed under the ISC license.
84
+ * See the LICENSE file in the root directory of this source tree.
85
+ */const yC=st("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
86
+ * @license lucide-react v0.469.0 - ISC
87
+ *
88
+ * This source code is licensed under the ISC license.
89
+ * See the LICENSE file in the root directory of this source tree.
90
+ */const xC=st("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);/**
91
+ * @license lucide-react v0.469.0 - ISC
92
+ *
93
+ * This source code is licensed under the ISC license.
94
+ * See the LICENSE file in the root directory of this source tree.
95
+ */const jx=st("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
96
+ * @license lucide-react v0.469.0 - ISC
97
+ *
98
+ * This source code is licensed under the ISC license.
99
+ * See the LICENSE file in the root directory of this source tree.
100
+ */const bC=st("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
101
+ * @license lucide-react v0.469.0 - ISC
102
+ *
103
+ * This source code is licensed under the ISC license.
104
+ * See the LICENSE file in the root directory of this source tree.
105
+ */const SC=st("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
106
+ * @license lucide-react v0.469.0 - ISC
107
+ *
108
+ * This source code is licensed under the ISC license.
109
+ * See the LICENSE file in the root directory of this source tree.
110
+ */const wC=st("CodeXml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);/**
111
+ * @license lucide-react v0.469.0 - ISC
112
+ *
113
+ * This source code is licensed under the ISC license.
114
+ * See the LICENSE file in the root directory of this source tree.
115
+ */const jC=st("Cog",[["path",{d:"M12 20a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z",key:"sobvz5"}],["path",{d:"M12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z",key:"11i496"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 22v-2",key:"1osdcq"}],["path",{d:"m17 20.66-1-1.73",key:"eq3orb"}],["path",{d:"M11 10.27 7 3.34",key:"16pf9h"}],["path",{d:"m20.66 17-1.73-1",key:"sg0v6f"}],["path",{d:"m3.34 7 1.73 1",key:"1ulond"}],["path",{d:"M14 12h8",key:"4f43i9"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"m20.66 7-1.73 1",key:"1ow05n"}],["path",{d:"m3.34 17 1.73-1",key:"nuk764"}],["path",{d:"m17 3.34-1 1.73",key:"2wel8s"}],["path",{d:"m11 13.73-4 6.93",key:"794ttg"}]]);/**
116
+ * @license lucide-react v0.469.0 - ISC
117
+ *
118
+ * This source code is licensed under the ISC license.
119
+ * See the LICENSE file in the root directory of this source tree.
120
+ */const hf=st("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
121
+ * @license lucide-react v0.469.0 - ISC
122
+ *
123
+ * This source code is licensed under the ISC license.
124
+ * See the LICENSE file in the root directory of this source tree.
125
+ */const Cx=st("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
126
+ * @license lucide-react v0.469.0 - ISC
127
+ *
128
+ * This source code is licensed under the ISC license.
129
+ * See the LICENSE file in the root directory of this source tree.
130
+ */const CC=st("Eye",[["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"}]]);/**
131
+ * @license lucide-react v0.469.0 - ISC
132
+ *
133
+ * This source code is licensed under the ISC license.
134
+ * See the LICENSE file in the root directory of this source tree.
135
+ */const EC=st("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
136
+ * @license lucide-react v0.469.0 - ISC
137
+ *
138
+ * This source code is licensed under the ISC license.
139
+ * See the LICENSE file in the root directory of this source tree.
140
+ */const RC=st("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/**
141
+ * @license lucide-react v0.469.0 - ISC
142
+ *
143
+ * This source code is licensed under the ISC license.
144
+ * See the LICENSE file in the root directory of this source tree.
145
+ */const Ex=st("KeyRound",[["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"}]]);/**
146
+ * @license lucide-react v0.469.0 - ISC
147
+ *
148
+ * This source code is licensed under the ISC license.
149
+ * See the LICENSE file in the root directory of this source tree.
150
+ */const Rx=st("Layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);/**
151
+ * @license lucide-react v0.469.0 - ISC
152
+ *
153
+ * This source code is licensed under the ISC license.
154
+ * See the LICENSE file in the root directory of this source tree.
155
+ */const mf=st("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
156
+ * @license lucide-react v0.469.0 - ISC
157
+ *
158
+ * This source code is licensed under the ISC license.
159
+ * See the LICENSE file in the root directory of this source tree.
160
+ */const TC=st("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
161
+ * @license lucide-react v0.469.0 - ISC
162
+ *
163
+ * This source code is licensed under the ISC license.
164
+ * See the LICENSE file in the root directory of this source tree.
165
+ */const NC=st("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
166
+ * @license lucide-react v0.469.0 - ISC
167
+ *
168
+ * This source code is licensed under the ISC license.
169
+ * See the LICENSE file in the root directory of this source tree.
170
+ */const AC=st("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
171
+ * @license lucide-react v0.469.0 - ISC
172
+ *
173
+ * This source code is licensed under the ISC license.
174
+ * See the LICENSE file in the root directory of this source tree.
175
+ */const Tx=st("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/**
176
+ * @license lucide-react v0.469.0 - ISC
177
+ *
178
+ * This source code is licensed under the ISC license.
179
+ * See the LICENSE file in the root directory of this source tree.
180
+ */const MC=st("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
181
+ * @license lucide-react v0.469.0 - ISC
182
+ *
183
+ * This source code is licensed under the ISC license.
184
+ * See the LICENSE file in the root directory of this source tree.
185
+ */const Ni=st("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
186
+ * @license lucide-react v0.469.0 - ISC
187
+ *
188
+ * This source code is licensed under the ISC license.
189
+ * See the LICENSE file in the root directory of this source tree.
190
+ */const _C=st("ScrollText",[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);/**
191
+ * @license lucide-react v0.469.0 - ISC
192
+ *
193
+ * This source code is licensed under the ISC license.
194
+ * See the LICENSE file in the root directory of this source tree.
195
+ */const OC=st("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
196
+ * @license lucide-react v0.469.0 - ISC
197
+ *
198
+ * This source code is licensed under the ISC license.
199
+ * See the LICENSE file in the root directory of this source tree.
200
+ */const DC=st("Sun",[["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"}]]);/**
201
+ * @license lucide-react v0.469.0 - ISC
202
+ *
203
+ * This source code is licensed under the ISC license.
204
+ * See the LICENSE file in the root directory of this source tree.
205
+ */const zC=st("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
206
+ * @license lucide-react v0.469.0 - ISC
207
+ *
208
+ * This source code is licensed under the ISC license.
209
+ * See the LICENSE file in the root directory of this source tree.
210
+ */const kC=st("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Nx(a){var l,o,i="";if(typeof a=="string"||typeof a=="number")i+=a;else if(typeof a=="object")if(Array.isArray(a)){var u=a.length;for(l=0;l<u;l++)a[l]&&(o=Nx(a[l]))&&(i&&(i+=" "),i+=o)}else for(o in a)a[o]&&(i&&(i+=" "),i+=o);return i}function Ax(){for(var a,l,o=0,i="",u=arguments.length;o<u;o++)(a=arguments[o])&&(l=Nx(a))&&(i&&(i+=" "),i+=l);return i}const uh="-",LC=a=>{const l=HC(a),{conflictingClassGroups:o,conflictingClassGroupModifiers:i}=a;return{getClassGroupId:h=>{const p=h.split(uh);return p[0]===""&&p.length!==1&&p.shift(),Mx(p,l)||UC(h)},getConflictingClassGroupIds:(h,p)=>{const v=o[h]||[];return p&&i[h]?[...v,...i[h]]:v}}},Mx=(a,l)=>{var h;if(a.length===0)return l.classGroupId;const o=a[0],i=l.nextPart.get(o),u=i?Mx(a.slice(1),i):void 0;if(u)return u;if(l.validators.length===0)return;const f=a.join(uh);return(h=l.validators.find(({validator:p})=>p(f)))==null?void 0:h.classGroupId},by=/^\[(.+)\]$/,UC=a=>{if(by.test(a)){const l=by.exec(a)[1],o=l==null?void 0:l.substring(0,l.indexOf(":"));if(o)return"arbitrary.."+o}},HC=a=>{const{theme:l,prefix:o}=a,i={nextPart:new Map,validators:[]};return PC(Object.entries(a.classGroups),o).forEach(([f,h])=>{_f(h,i,f,l)}),i},_f=(a,l,o,i)=>{a.forEach(u=>{if(typeof u=="string"){const f=u===""?l:Sy(l,u);f.classGroupId=o;return}if(typeof u=="function"){if(BC(u)){_f(u(i),l,o,i);return}l.validators.push({validator:u,classGroupId:o});return}Object.entries(u).forEach(([f,h])=>{_f(h,Sy(l,f),o,i)})})},Sy=(a,l)=>{let o=a;return l.split(uh).forEach(i=>{o.nextPart.has(i)||o.nextPart.set(i,{nextPart:new Map,validators:[]}),o=o.nextPart.get(i)}),o},BC=a=>a.isThemeGetter,PC=(a,l)=>l?a.map(([o,i])=>{const u=i.map(f=>typeof f=="string"?l+f:typeof f=="object"?Object.fromEntries(Object.entries(f).map(([h,p])=>[l+h,p])):f);return[o,u]}):a,qC=a=>{if(a<1)return{get:()=>{},set:()=>{}};let l=0,o=new Map,i=new Map;const u=(f,h)=>{o.set(f,h),l++,l>a&&(l=0,i=o,o=new Map)};return{get(f){let h=o.get(f);if(h!==void 0)return h;if((h=i.get(f))!==void 0)return u(f,h),h},set(f,h){o.has(f)?o.set(f,h):u(f,h)}}},_x="!",VC=a=>{const{separator:l,experimentalParseClassName:o}=a,i=l.length===1,u=l[0],f=l.length,h=p=>{const v=[];let g=0,w=0,S;for(let C=0;C<p.length;C++){let R=p[C];if(g===0){if(R===u&&(i||p.slice(C,C+f)===l)){v.push(p.slice(w,C)),w=C+f;continue}if(R==="/"){S=C;continue}}R==="["?g++:R==="]"&&g--}const b=v.length===0?p:p.substring(w),x=b.startsWith(_x),T=x?b.substring(1):b,j=S&&S>w?S-w:void 0;return{modifiers:v,hasImportantModifier:x,baseClassName:T,maybePostfixModifierPosition:j}};return o?p=>o({className:p,parseClassName:h}):h},YC=a=>{if(a.length<=1)return a;const l=[];let o=[];return a.forEach(i=>{i[0]==="["?(l.push(...o.sort(),i),o=[]):o.push(i)}),l.push(...o.sort()),l},GC=a=>({cache:qC(a.cacheSize),parseClassName:VC(a),...LC(a)}),IC=/\s+/,$C=(a,l)=>{const{parseClassName:o,getClassGroupId:i,getConflictingClassGroupIds:u}=l,f=[],h=a.trim().split(IC);let p="";for(let v=h.length-1;v>=0;v-=1){const g=h[v],{modifiers:w,hasImportantModifier:S,baseClassName:b,maybePostfixModifierPosition:x}=o(g);let T=!!x,j=i(T?b.substring(0,x):b);if(!j){if(!T){p=g+(p.length>0?" "+p:p);continue}if(j=i(b),!j){p=g+(p.length>0?" "+p:p);continue}T=!1}const C=YC(w).join(":"),R=S?C+_x:C,A=R+j;if(f.includes(A))continue;f.push(A);const N=u(j,T);for(let _=0;_<N.length;++_){const P=N[_];f.push(R+P)}p=g+(p.length>0?" "+p:p)}return p};function KC(){let a=0,l,o,i="";for(;a<arguments.length;)(l=arguments[a++])&&(o=Ox(l))&&(i&&(i+=" "),i+=o);return i}const Ox=a=>{if(typeof a=="string")return a;let l,o="";for(let i=0;i<a.length;i++)a[i]&&(l=Ox(a[i]))&&(o&&(o+=" "),o+=l);return o};function XC(a,...l){let o,i,u,f=h;function h(v){const g=l.reduce((w,S)=>S(w),a());return o=GC(g),i=o.cache.get,u=o.cache.set,f=p,p(v)}function p(v){const g=i(v);if(g)return g;const w=$C(v,o);return u(v,w),w}return function(){return f(KC.apply(null,arguments))}}const dt=a=>{const l=o=>o[a]||[];return l.isThemeGetter=!0,l},Dx=/^\[(?:([a-z-]+):)?(.+)\]$/i,QC=/^\d+\/\d+$/,ZC=new Set(["px","full","screen"]),FC=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,JC=/\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$/,WC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,e2=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,t2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Pa=a=>io(a)||ZC.has(a)||QC.test(a),Nl=a=>yo(a,"length",c2),io=a=>!!a&&!Number.isNaN(Number(a)),pf=a=>yo(a,"number",io),gi=a=>!!a&&Number.isInteger(Number(a)),n2=a=>a.endsWith("%")&&io(a.slice(0,-1)),Ae=a=>Dx.test(a),Al=a=>FC.test(a),a2=new Set(["length","size","percentage"]),l2=a=>yo(a,a2,zx),r2=a=>yo(a,"position",zx),o2=new Set(["image","url"]),i2=a=>yo(a,o2,d2),s2=a=>yo(a,"",u2),yi=()=>!0,yo=(a,l,o)=>{const i=Dx.exec(a);return i?i[1]?typeof l=="string"?i[1]===l:l.has(i[1]):o(i[2]):!1},c2=a=>JC.test(a)&&!WC.test(a),zx=()=>!1,u2=a=>e2.test(a),d2=a=>t2.test(a),f2=()=>{const a=dt("colors"),l=dt("spacing"),o=dt("blur"),i=dt("brightness"),u=dt("borderColor"),f=dt("borderRadius"),h=dt("borderSpacing"),p=dt("borderWidth"),v=dt("contrast"),g=dt("grayscale"),w=dt("hueRotate"),S=dt("invert"),b=dt("gap"),x=dt("gradientColorStops"),T=dt("gradientColorStopPositions"),j=dt("inset"),C=dt("margin"),R=dt("opacity"),A=dt("padding"),N=dt("saturate"),_=dt("scale"),P=dt("sepia"),q=dt("skew"),z=dt("space"),U=dt("translate"),ee=()=>["auto","contain","none"],ae=()=>["auto","hidden","clip","visible","scroll"],oe=()=>["auto",Ae,l],Z=()=>[Ae,l],ie=()=>["",Pa,Nl],se=()=>["auto",io,Ae],he=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],k=()=>["solid","dashed","dotted","double","none"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],te=()=>["start","end","center","between","around","evenly","stretch"],J=()=>["","0",Ae],W=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>[io,Ae];return{cacheSize:500,separator:":",theme:{colors:[yi],spacing:[Pa,Nl],blur:["none","",Al,Ae],brightness:M(),borderColor:[a],borderRadius:["none","","full",Al,Ae],borderSpacing:Z(),borderWidth:ie(),contrast:M(),grayscale:J(),hueRotate:M(),invert:J(),gap:Z(),gradientColorStops:[a],gradientColorStopPositions:[n2,Nl],inset:oe(),margin:oe(),opacity:M(),padding:Z(),saturate:M(),scale:M(),sepia:J(),skew:M(),space:Z(),translate:Z()},classGroups:{aspect:[{aspect:["auto","square","video",Ae]}],container:["container"],columns:[{columns:[Al]}],"break-after":[{"break-after":W()}],"break-before":[{"break-before":W()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...he(),Ae]}],overflow:[{overflow:ae()}],"overflow-x":[{"overflow-x":ae()}],"overflow-y":[{"overflow-y":ae()}],overscroll:[{overscroll:ee()}],"overscroll-x":[{"overscroll-x":ee()}],"overscroll-y":[{"overscroll-y":ee()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[j]}],"inset-x":[{"inset-x":[j]}],"inset-y":[{"inset-y":[j]}],start:[{start:[j]}],end:[{end:[j]}],top:[{top:[j]}],right:[{right:[j]}],bottom:[{bottom:[j]}],left:[{left:[j]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",gi,Ae]}],basis:[{basis:oe()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ae]}],grow:[{grow:J()}],shrink:[{shrink:J()}],order:[{order:["first","last","none",gi,Ae]}],"grid-cols":[{"grid-cols":[yi]}],"col-start-end":[{col:["auto",{span:["full",gi,Ae]},Ae]}],"col-start":[{"col-start":se()}],"col-end":[{"col-end":se()}],"grid-rows":[{"grid-rows":[yi]}],"row-start-end":[{row:["auto",{span:[gi,Ae]},Ae]}],"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":["auto","min","max","fr",Ae]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ae]}],gap:[{gap:[b]}],"gap-x":[{"gap-x":[b]}],"gap-y":[{"gap-y":[b]}],"justify-content":[{justify:["normal",...te()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...te(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...te(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[A]}],px:[{px:[A]}],py:[{py:[A]}],ps:[{ps:[A]}],pe:[{pe:[A]}],pt:[{pt:[A]}],pr:[{pr:[A]}],pb:[{pb:[A]}],pl:[{pl:[A]}],m:[{m:[C]}],mx:[{mx:[C]}],my:[{my:[C]}],ms:[{ms:[C]}],me:[{me:[C]}],mt:[{mt:[C]}],mr:[{mr:[C]}],mb:[{mb:[C]}],ml:[{ml:[C]}],"space-x":[{"space-x":[z]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[z]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ae,l]}],"min-w":[{"min-w":[Ae,l,"min","max","fit"]}],"max-w":[{"max-w":[Ae,l,"none","full","min","max","fit","prose",{screen:[Al]},Al]}],h:[{h:[Ae,l,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ae,l,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ae,l,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ae,l,"auto","min","max","fit"]}],"font-size":[{text:["base",Al,Nl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",pf]}],"font-family":[{font:[yi]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ae]}],"line-clamp":[{"line-clamp":["none",io,pf]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Pa,Ae]}],"list-image":[{"list-image":["none",Ae]}],"list-style-type":[{list:["none","disc","decimal",Ae]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[a]}],"placeholder-opacity":[{"placeholder-opacity":[R]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[a]}],"text-opacity":[{"text-opacity":[R]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...k(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Pa,Nl]}],"underline-offset":[{"underline-offset":["auto",Pa,Ae]}],"text-decoration-color":[{decoration:[a]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ae]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[R]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...he(),r2]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",l2]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},i2]}],"bg-color":[{bg:[a]}],"gradient-from-pos":[{from:[T]}],"gradient-via-pos":[{via:[T]}],"gradient-to-pos":[{to:[T]}],"gradient-from":[{from:[x]}],"gradient-via":[{via:[x]}],"gradient-to":[{to:[x]}],rounded:[{rounded:[f]}],"rounded-s":[{"rounded-s":[f]}],"rounded-e":[{"rounded-e":[f]}],"rounded-t":[{"rounded-t":[f]}],"rounded-r":[{"rounded-r":[f]}],"rounded-b":[{"rounded-b":[f]}],"rounded-l":[{"rounded-l":[f]}],"rounded-ss":[{"rounded-ss":[f]}],"rounded-se":[{"rounded-se":[f]}],"rounded-ee":[{"rounded-ee":[f]}],"rounded-es":[{"rounded-es":[f]}],"rounded-tl":[{"rounded-tl":[f]}],"rounded-tr":[{"rounded-tr":[f]}],"rounded-br":[{"rounded-br":[f]}],"rounded-bl":[{"rounded-bl":[f]}],"border-w":[{border:[p]}],"border-w-x":[{"border-x":[p]}],"border-w-y":[{"border-y":[p]}],"border-w-s":[{"border-s":[p]}],"border-w-e":[{"border-e":[p]}],"border-w-t":[{"border-t":[p]}],"border-w-r":[{"border-r":[p]}],"border-w-b":[{"border-b":[p]}],"border-w-l":[{"border-l":[p]}],"border-opacity":[{"border-opacity":[R]}],"border-style":[{border:[...k(),"hidden"]}],"divide-x":[{"divide-x":[p]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[p]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[R]}],"divide-style":[{divide:k()}],"border-color":[{border:[u]}],"border-color-x":[{"border-x":[u]}],"border-color-y":[{"border-y":[u]}],"border-color-s":[{"border-s":[u]}],"border-color-e":[{"border-e":[u]}],"border-color-t":[{"border-t":[u]}],"border-color-r":[{"border-r":[u]}],"border-color-b":[{"border-b":[u]}],"border-color-l":[{"border-l":[u]}],"divide-color":[{divide:[u]}],"outline-style":[{outline:["",...k()]}],"outline-offset":[{"outline-offset":[Pa,Ae]}],"outline-w":[{outline:[Pa,Nl]}],"outline-color":[{outline:[a]}],"ring-w":[{ring:ie()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[a]}],"ring-opacity":[{"ring-opacity":[R]}],"ring-offset-w":[{"ring-offset":[Pa,Nl]}],"ring-offset-color":[{"ring-offset":[a]}],shadow:[{shadow:["","inner","none",Al,s2]}],"shadow-color":[{shadow:[yi]}],opacity:[{opacity:[R]}],"mix-blend":[{"mix-blend":[...$(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":$()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[i]}],contrast:[{contrast:[v]}],"drop-shadow":[{"drop-shadow":["","none",Al,Ae]}],grayscale:[{grayscale:[g]}],"hue-rotate":[{"hue-rotate":[w]}],invert:[{invert:[S]}],saturate:[{saturate:[N]}],sepia:[{sepia:[P]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[v]}],"backdrop-grayscale":[{"backdrop-grayscale":[g]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[w]}],"backdrop-invert":[{"backdrop-invert":[S]}],"backdrop-opacity":[{"backdrop-opacity":[R]}],"backdrop-saturate":[{"backdrop-saturate":[N]}],"backdrop-sepia":[{"backdrop-sepia":[P]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[h]}],"border-spacing-x":[{"border-spacing-x":[h]}],"border-spacing-y":[{"border-spacing-y":[h]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ae]}],duration:[{duration:M()}],ease:[{ease:["linear","in","out","in-out",Ae]}],delay:[{delay:M()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ae]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[gi,Ae]}],"translate-x":[{"translate-x":[U]}],"translate-y":[{"translate-y":[U]}],"skew-x":[{"skew-x":[q]}],"skew-y":[{"skew-y":[q]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ae]}],accent:[{accent:["auto",a]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ae]}],"caret-color":[{caret:[a]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Z()}],"scroll-mx":[{"scroll-mx":Z()}],"scroll-my":[{"scroll-my":Z()}],"scroll-ms":[{"scroll-ms":Z()}],"scroll-me":[{"scroll-me":Z()}],"scroll-mt":[{"scroll-mt":Z()}],"scroll-mr":[{"scroll-mr":Z()}],"scroll-mb":[{"scroll-mb":Z()}],"scroll-ml":[{"scroll-ml":Z()}],"scroll-p":[{"scroll-p":Z()}],"scroll-px":[{"scroll-px":Z()}],"scroll-py":[{"scroll-py":Z()}],"scroll-ps":[{"scroll-ps":Z()}],"scroll-pe":[{"scroll-pe":Z()}],"scroll-pt":[{"scroll-pt":Z()}],"scroll-pr":[{"scroll-pr":Z()}],"scroll-pb":[{"scroll-pb":Z()}],"scroll-pl":[{"scroll-pl":Z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ae]}],fill:[{fill:[a,"none"]}],"stroke-w":[{stroke:[Pa,Nl,pf]}],stroke:[{stroke:[a,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},h2=XC(f2);function Ee(...a){return h2(Ax(a))}function gn(a,l="—"){return a==null||Number.isNaN(a)?l:a.toLocaleString()}function xi(a,l=1,o="—"){return a==null||Number.isNaN(a)?o:`${(a*100).toFixed(l)}%`}function so(a){return a?a<1e3?`${Math.round(a)} ms`:`${(a/1e3).toFixed(2)} s`:"—"}function dh(a){if(!a)return"—";try{return new Date(a).toLocaleString()}catch{return a}}function m2(a,l=8){return a?a.length>l?`${a.slice(0,l)}…`:a:"—"}const p2=[{to:"/",label:"Dashboard",icon:RC,end:!0},{to:"/providers",label:"Providers",icon:Tx},{to:"/models",label:"Models",icon:xC},{to:"/combos",label:"Combos",icon:Rx},{to:"/aliases",label:"Aliases",icon:wC},{to:"/api-keys",label:"API Keys",icon:Ex},{to:"/requests",label:"Requests",icon:yC},{to:"/statistics",label:"Statistics",icon:EC},{to:"/audit",label:"Audit Logs",icon:_C},{to:"/settings",label:"Settings",icon:jC}];function v2(){return s.jsxs("aside",{className:"hidden w-60 shrink-0 border-r bg-sidebar text-sidebar-foreground md:flex md:flex-col",children:[s.jsxs("div",{className:"flex h-14 items-center gap-2 border-b px-4",children:[s.jsx("img",{src:"/logo.png",alt:"LateDev Router",className:"h-7 w-7 object-contain"}),s.jsx("div",{className:"font-semibold tracking-tight",children:"LateDev Router"})]}),s.jsx("nav",{className:"flex-1 space-y-0.5 p-2",children:p2.map(a=>s.jsxs(xx,{to:a.to,end:a.end,className:({isActive:l})=>Ee("flex items-center gap-2 rounded-md px-3 py-2 text-sm transition-colors",l?"bg-primary/10 text-primary font-medium":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:[s.jsx(a.icon,{className:"h-4 w-4"}),a.label]},a.to))}),s.jsxs("div",{className:"border-t p-3 text-xs text-muted-foreground flex items-center gap-2",children:[s.jsx(OC,{className:"h-3.5 w-3.5 text-primary"})," v0.1.0"]})]})}var g2=Object.defineProperty,fh=(a,l)=>g2(a,"name",{value:l,configurable:!0});function Of(a,l){if(typeof a=="function")return a(l);a!=null&&(a.current=l)}fh(Of,"setRef");function kx(...a){return l=>{let o=!1;const i=a.map(u=>{const f=Of(u,l);return!o&&typeof f=="function"&&(o=!0),f});if(o)return()=>{for(let u=0;u<i.length;u++){const f=i[u];typeof f=="function"?f():Of(a[u],null)}}}}fh(kx,"composeRefs");function Pe(...a){return m.useCallback(kx(...a),a)}fh(Pe,"useComposedRefs");var y2=Object.defineProperty,Fn=(a,l)=>y2(a,"name",{value:l,configurable:!0});function ha(a){const l=m.forwardRef((o,i)=>{let{children:u,...f}=o,h=null,p=!1;const v=[];Df(u)&&typeof Zs=="function"&&(u=Zs(u._payload)),m.Children.forEach(u,b=>{var x;if(Px(b)){p=!0;const T=b;let j="child"in T.props?T.props.child:T.props.children;Df(j)&&typeof Zs=="function"&&(j=Zs(j._payload)),h=b2(T,j),v.push((x=h==null?void 0:h.props)==null?void 0:x.children)}else v.push(b)}),h?h=m.cloneElement(h,void 0,v):!p&&m.Children.count(u)===1&&m.isValidElement(u)&&(h=u);const g=h?Bx(h):void 0,w=Pe(i,g);if(!h){if(u||u===0)throw new Error(p?j2(a):w2(a));return u}const S=Hx(f,h.props??{});return h.type!==m.Fragment&&(S.ref=i?w:g),m.cloneElement(h,S)});return l.displayName=`${a}.Slot`,l}Fn(ha,"createSlot");var x2=ha("Slot"),Lx=Symbol.for("radix.slottable");function Ux(a){const l=Fn(o=>"child"in o?o.children(o.child):o.children,"Slottable");return l.displayName=`${a}.Slottable`,l.__radixId=Lx,l}Fn(Ux,"createSlottable");var b2=Fn((a,l)=>{if("child"in a.props){const o=a.props.child;return m.isValidElement(o)?m.cloneElement(o,void 0,a.props.children(o.props.children)):null}return m.isValidElement(l)?l:null},"getSlottableElementFromSlottable");function Hx(a,l){const o={...l};for(const i in l){const u=a[i],f=l[i];/^on[A-Z]/.test(i)?u&&f?o[i]=(...p)=>{const v=f(...p);return u(...p),v}:u&&(o[i]=u):i==="style"?o[i]={...u,...f}:i==="className"&&(o[i]=[u,f].filter(Boolean).join(" "))}return{...a,...o}}Fn(Hx,"mergeProps");function Bx(a){var i,u;let l=(i=Object.getOwnPropertyDescriptor(a.props,"ref"))==null?void 0:i.get,o=l&&"isReactWarning"in l&&l.isReactWarning;return o?a.ref:(l=(u=Object.getOwnPropertyDescriptor(a,"ref"))==null?void 0:u.get,o=l&&"isReactWarning"in l&&l.isReactWarning,o?a.props.ref:a.props.ref||a.ref)}Fn(Bx,"getElementRef");function Px(a){return m.isValidElement(a)&&typeof a.type=="function"&&"__radixId"in a.type&&a.type.__radixId===Lx}Fn(Px,"isSlottable");var S2=Symbol.for("react.lazy");function Df(a){return a!=null&&typeof a=="object"&&"$$typeof"in a&&a.$$typeof===S2&&"_payload"in a&&qx(a._payload)}Fn(Df,"isLazyComponent");function qx(a){return typeof a=="object"&&a!==null&&"then"in a}Fn(qx,"isPromiseLike");var w2=Fn(a=>`${a} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),j2=Fn(a=>`${a} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),Zs=ho[" use ".trim().toString()];const wy=a=>typeof a=="boolean"?`${a}`:a===0?"0":a,jy=Ax,Vx=(a,l)=>o=>{var i;if((l==null?void 0:l.variants)==null)return jy(a,o==null?void 0:o.class,o==null?void 0:o.className);const{variants:u,defaultVariants:f}=l,h=Object.keys(u).map(g=>{const w=o==null?void 0:o[g],S=f==null?void 0:f[g];if(w===null)return null;const b=wy(w)||wy(S);return u[g][b]}),p=o&&Object.entries(o).reduce((g,w)=>{let[S,b]=w;return b===void 0||(g[S]=b),g},{}),v=l==null||(i=l.compoundVariants)===null||i===void 0?void 0:i.reduce((g,w)=>{let{class:S,className:b,...x}=w;return Object.entries(x).every(T=>{let[j,C]=T;return Array.isArray(C)?C.includes({...f,...p}[j]):{...f,...p}[j]===C})?[...g,S,b]:g},[]);return jy(a,h,v,o==null?void 0:o.class,o==null?void 0:o.className)},C2=Vx("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-6",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),ve=m.forwardRef(({className:a,variant:l,size:o,asChild:i=!1,...u},f)=>{const h=i?x2:"button";return s.jsx(h,{className:Ee(C2({variant:l,size:o,className:a})),ref:f,...u})});ve.displayName="Button";const Yx=m.createContext(void 0);function E2({children:a,defaultTheme:l="system",storageKey:o="latedev-theme"}){const[i,u]=m.useState(()=>localStorage.getItem(o)||l);m.useEffect(()=>{const h=window.document.documentElement;if(h.classList.remove("light","dark"),i==="system"){const p=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";h.classList.add(p);return}h.classList.add(i)},[i]);const f={theme:i,setTheme:h=>{localStorage.setItem(o,h),u(h)}};return s.jsx(Yx.Provider,{value:f,children:a})}function R2(){const a=m.useContext(Yx);if(!a)throw new Error("useTheme must be used within ThemeProvider");return a}var T2=Object.defineProperty,xo=(a,l)=>T2(a,"name",{value:l,configurable:!0}),Gx=!!(typeof window<"u"&&window.document&&window.document.createElement);function xe(a,l,{checkForDefaultPrevented:o=!0}={}){return xo(function(u){if(a==null||a(u),o===!1||!u||!u.defaultPrevented)return l==null?void 0:l(u)},"handleEvent")}xo(xe,"composeEventHandlers");function N2(a){var l;if(!Gx)throw new Error("Cannot access window outside of the DOM");return((l=a==null?void 0:a.ownerDocument)==null?void 0:l.defaultView)??window}xo(N2,"getOwnerWindow");function zf(a){if(!Gx)throw new Error("Cannot access document outside of the DOM");return(a==null?void 0:a.ownerDocument)??document}xo(zf,"getOwnerDocument");function Ix(a,l=!1){const{activeElement:o}=zf(a);if(!(o!=null&&o.nodeName))return null;if($x(o)&&o.contentDocument)return Ix(o.contentDocument.body,l);if(l){const i=o.getAttribute("aria-activedescendant");if(i){const u=zf(o).getElementById(i);if(u)return u}}return o}xo(Ix,"getActiveElement");function $x(a){return a.tagName==="IFRAME"}xo($x,"isFrame");var A2=Object.defineProperty,zn=(a,l)=>A2(a,"name",{value:l,configurable:!0});function M2(a,l){const o=m.createContext(l);o.displayName=a+"Context";const i=zn(f=>{const{children:h,...p}=f,v=m.useMemo(()=>p,Object.values(p));return s.jsx(o.Provider,{value:v,children:h})},"Provider");i.displayName=a+"Provider";function u(f,h={}){const{optional:p=!1}=h,v=m.useContext(o);if(v)return v;if(l!==void 0)return l;if(!p)throw new Error(`\`${f}\` must be used within \`${a}\``)}return zn(u,"useContext"),[i,u]}zn(M2,"createContext");function sn(a,l=[]){let o=[];function i(f,h){const p=m.createContext(h);p.displayName=f+"Context";const v=o.length;o=[...o,h];const g=zn(S=>{var R;const{scope:b,children:x,...T}=S,j=((R=b==null?void 0:b[a])==null?void 0:R[v])||p,C=m.useMemo(()=>T,Object.values(T));return s.jsx(j.Provider,{value:C,children:x})},"Provider");g.displayName=f+"Provider";function w(S,b,x={}){var R;const{optional:T=!1}=x,j=((R=b==null?void 0:b[a])==null?void 0:R[v])||p,C=m.useContext(j);if(C)return C;if(h!==void 0)return h;if(!T)throw new Error(`\`${S}\` must be used within \`${f}\``)}return zn(w,"useContext"),[g,w]}zn(i,"createContext");const u=zn(()=>{const f=o.map(h=>m.createContext(h));return zn(function(p){const v=(p==null?void 0:p[a])||f;return m.useMemo(()=>({[`__scope${a}`]:{...p,[a]:v}}),[p,v])},"useScope")},"createScope");return u.scopeName=a,[i,Kx(u,...l)]}zn(sn,"createContextScope");function Kx(...a){const l=a[0];if(a.length===1)return l;const o=zn(()=>{const i=a.map(u=>({useScope:u(),scopeName:u.scopeName}));return zn(function(f){const h=i.reduce((p,{useScope:v,scopeName:g})=>{const S=v(f)[`__scope${g}`];return{...p,...S}},{});return m.useMemo(()=>({[`__scope${l.scopeName}`]:h}),[h])},"useComposedScopes")},"createScope");return o.scopeName=l.scopeName,o}zn(Kx,"composeContextScopes");var Tt=globalThis!=null&&globalThis.document?m.useLayoutEffect:()=>{},_2=Object.defineProperty,O2=(a,l)=>_2(a,"name",{value:l,configurable:!0}),Cy=ho[" useEffectEvent ".trim().toString()],Ey=ho[" useInsertionEffect ".trim().toString()];function Xx(a){if(typeof Cy=="function")return Cy(a);const l=m.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof Ey=="function"?Ey(()=>{l.current=a}):Tt(()=>{l.current=a}),m.useMemo(()=>((...o)=>{var i;return(i=l.current)==null?void 0:i.call(l,...o)}),[])}O2(Xx,"useEffectEvent");var D2=Object.defineProperty,Ai=(a,l)=>D2(a,"name",{value:l,configurable:!0}),z2=ho[" useInsertionEffect ".trim().toString()]||Tt;function Xa({prop:a,defaultProp:l,onChange:o=Ai(()=>{},"onChange"),caller:i}){const[u,f,h]=Qx({defaultProp:l,onChange:o}),p=a!==void 0,v=p?a:u,g=m.useCallback(w=>{var S;if(p){const b=Zx(w)?w(a):w;b!==a&&((S=h.current)==null||S.call(h,b))}else f(w)},[p,a,f,h]);return[v,g]}Ai(Xa,"useControllableState");function Qx({defaultProp:a,onChange:l}){const[o,i]=m.useState(a),u=m.useRef(o),f=m.useRef(l);return z2(()=>{f.current=l},[l]),m.useEffect(()=>{var h;u.current!==o&&((h=f.current)==null||h.call(f,o),u.current=o)},[o,u]),[o,i,f]}Ai(Qx,"useUncontrolledState");function Zx(a){return typeof a=="function"}Ai(Zx,"isFunction");var Ry=Symbol("RADIX:SYNC_STATE");function k2(a,l,o,i){const{prop:u,defaultProp:f,onChange:h,caller:p}=l,v=u!==void 0,g=Xx(h),w=[{...o,state:f}];i&&w.push(i);const[S,b]=m.useReducer((C,R)=>{if(R.type===Ry)return{...C,state:R.state};const A=a(C,R);return v&&!Object.is(A.state,C.state)&&g(A.state),A},...w),x=S.state,T=m.useRef(x);m.useEffect(()=>{T.current!==x&&(T.current=x,v||g(x))},[x,T,v]);const j=m.useMemo(()=>u!==void 0?{...S,state:u}:S,[S,u]);return m.useEffect(()=>{v&&!Object.is(u,S.state)&&b({type:Ry,state:u})},[u,S.state,v]),[j,b]}Ai(k2,"useControllableStateReducer");var L2=Object.defineProperty,U2=(a,l)=>L2(a,"name",{value:l,configurable:!0}),H2=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Le=H2.reduce((a,l)=>{const o=ha(`Primitive.${l}`),i=m.forwardRef((u,f)=>{const{asChild:h,...p}=u,v=h?o:l;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(v,{...p,ref:f})});return i.displayName=`Primitive.${l}`,{...a,[l]:i}},{});function hh(a,l){a&&go.flushSync(()=>a.dispatchEvent(l))}U2(hh,"dispatchDiscreteCustomEvent");var B2=Object.defineProperty,_t=(a,l)=>B2(a,"name",{value:l,configurable:!0});function jc(a){const l=a+"CollectionProvider",[o,i]=sn(l),[u,f]=o(l,{collectionRef:{current:null},itemMap:new Map}),h=_t(j=>{const{scope:C,children:R}=j,A=m.useRef(null),N=m.useRef(new Map).current;return s.jsx(u,{scope:C,itemMap:N,collectionRef:A,children:R})},"CollectionProvider");h.displayName=l;const p=a+"CollectionSlot",v=ha(p),g=m.forwardRef((j,C)=>{const{scope:R,children:A}=j,N=f(p,R),_=Pe(C,N.collectionRef);return s.jsx(v,{ref:_,children:A})});g.displayName=p;const w=a+"CollectionItemSlot",S="data-radix-collection-item",b=ha(w),x=m.forwardRef((j,C)=>{const{scope:R,children:A,...N}=j,_=m.useRef(null),P=Pe(C,_),q=f(w,R);return m.useEffect(()=>(q.itemMap.set(_,{ref:_,...N}),()=>void q.itemMap.delete(_))),s.jsx(b,{[S]:"",ref:P,children:A})});x.displayName=w;function T(j){const C=f(a+"CollectionConsumer",j);return m.useCallback(()=>{const A=C.collectionRef.current;if(!A)return[];const N=Array.from(A.querySelectorAll(`[${S}]`));return Array.from(C.itemMap.values()).sort((q,z)=>N.indexOf(q.ref.current)-N.indexOf(z.ref.current))},[C.collectionRef,C.itemMap])}return _t(T,"useCollection"),[{Provider:h,Slot:g,ItemSlot:x},T,i]}_t(jc,"createCollection");var Ty=new WeakMap,Et,vn,vf=(vn=class extends Map{constructor(o){super(o);ny(this,Et);nf(this,Et,[...super.keys()]),Ty.set(this,!0)}set(o,i){return Ty.get(this)&&(this.has(o)?Pt(this,Et)[Pt(this,Et).indexOf(o)]=o:Pt(this,Et).push(o)),super.set(o,i),this}insert(o,i,u){const f=this.has(i),h=Pt(this,Et).length,p=mh(o);let v=p>=0?p:h+p;const g=v<0||v>=h?-1:v;if(g===this.size||f&&g===this.size-1||g===-1)return this.set(i,u),this;const w=this.size+(f?0:1);p<0&&v++;const S=[...Pt(this,Et)];let b,x=!1;for(let T=v;T<w;T++)if(v===T){let j=S[T];S[T]===i&&(j=S[T+1]),f&&this.delete(i),b=this.get(j),this.set(i,u)}else{!x&&S[T-1]===i&&(x=!0);const j=S[x?T:T-1],C=b;b=this.get(j),this.delete(j),this.set(j,C)}return this}with(o,i,u){const f=new vn(this);return f.insert(o,i,u),f}before(o){const i=Pt(this,Et).indexOf(o)-1;if(!(i<0))return this.entryAt(i)}setBefore(o,i,u){const f=Pt(this,Et).indexOf(o);return f===-1?this:this.insert(f,i,u)}after(o){let i=Pt(this,Et).indexOf(o);if(i=i===-1||i===this.size-1?-1:i+1,i!==-1)return this.entryAt(i)}setAfter(o,i,u){const f=Pt(this,Et).indexOf(o);return f===-1?this:this.insert(f+1,i,u)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return nf(this,Et,[]),super.clear()}delete(o){const i=super.delete(o);return i&&Pt(this,Et).splice(Pt(this,Et).indexOf(o),1),i}deleteAt(o){const i=this.keyAt(o);return i!==void 0?this.delete(i):!1}at(o){const i=ic(Pt(this,Et),o);if(i!==void 0)return this.get(i)}entryAt(o){const i=ic(Pt(this,Et),o);if(i!==void 0)return[i,this.get(i)]}indexOf(o){return Pt(this,Et).indexOf(o)}keyAt(o){return ic(Pt(this,Et),o)}from(o,i){const u=this.indexOf(o);if(u===-1)return;let f=u+i;return f<0&&(f=0),f>=this.size&&(f=this.size-1),this.at(f)}keyFrom(o,i){const u=this.indexOf(o);if(u===-1)return;let f=u+i;return f<0&&(f=0),f>=this.size&&(f=this.size-1),this.keyAt(f)}find(o,i){let u=0;for(const f of this){if(Reflect.apply(o,i,[f,u,this]))return f;u++}}findIndex(o,i){let u=0;for(const f of this){if(Reflect.apply(o,i,[f,u,this]))return u;u++}return-1}filter(o,i){const u=[];let f=0;for(const h of this)Reflect.apply(o,i,[h,f,this])&&u.push(h),f++;return new vn(u)}map(o,i){const u=[];let f=0;for(const h of this)u.push([h[0],Reflect.apply(o,i,[h,f,this])]),f++;return new vn(u)}reduce(...o){const[i,u]=o;let f=0,h=u??this.at(0);for(const p of this)f===0&&o.length===1?h=p:h=Reflect.apply(i,this,[h,p,f,this]),f++;return h}reduceRight(...o){const[i,u]=o;let f=u??this.at(-1);for(let h=this.size-1;h>=0;h--){const p=this.at(h);h===this.size-1&&o.length===1?f=p:f=Reflect.apply(i,this,[f,p,h,this])}return f}toSorted(o){const i=[...this.entries()].sort(o);return new vn(i)}toReversed(){const o=new vn;for(let i=this.size-1;i>=0;i--){const u=this.keyAt(i),f=this.get(u);o.set(u,f)}return o}toSpliced(...o){const i=[...this.entries()];return i.splice(...o),new vn(i)}slice(o,i){const u=new vn;let f=this.size-1;if(o===void 0)return u;o<0&&(o=o+this.size),i!==void 0&&i>0&&(f=i-1);for(let h=o;h<=f;h++){const p=this.keyAt(h),v=this.get(p);u.set(p,v)}return u}every(o,i){let u=0;for(const f of this){if(!Reflect.apply(o,i,[f,u,this]))return!1;u++}return!0}some(o,i){let u=0;for(const f of this){if(Reflect.apply(o,i,[f,u,this]))return!0;u++}return!1}},Et=new WeakMap,_t(vn,"OrderedDict"),vn);function ic(a,l){if("at"in Array.prototype)return Array.prototype.at.call(a,l);const o=Fx(a,l);return o===-1?void 0:a[o]}_t(ic,"at");function Fx(a,l){const o=a.length,i=mh(l),u=i>=0?i:o+i;return u<0||u>=o?-1:u}_t(Fx,"toSafeIndex");function mh(a){return a!==a||a===0?0:Math.trunc(a)}_t(mh,"toSafeInteger");function P2(a){const l=a+"CollectionProvider",[o,i]=sn(l),[u,f]=o(l,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new vf,setItemMap:_t(()=>{},"setItemMap")}),h=_t(({state:N,..._})=>N?s.jsx(v,{..._,state:N}):s.jsx(p,{..._}),"CollectionProvider");h.displayName=l;const p=_t(N=>{const _=C();return s.jsx(v,{...N,state:_})},"CollectionInit");p.displayName=l+"Init";const v=_t(N=>{const{scope:_,children:P,state:q}=N,z=m.useRef(null),[U,ee]=m.useState(null),ae=Pe(z,ee),[oe,Z]=q;return m.useEffect(()=>{if(!U)return;const ie=eb(()=>{});return ie.observe(U,{childList:!0,subtree:!0}),()=>{ie.disconnect()}},[U]),s.jsx(u,{scope:_,itemMap:oe,setItemMap:Z,collectionRef:ae,collectionRefObject:z,collectionElement:U,children:P})},"CollectionProviderImpl");v.displayName=l+"Impl";const g=a+"CollectionSlot",w=ha(g),S=m.forwardRef((N,_)=>{const{scope:P,children:q}=N,z=f(g,P),U=Pe(_,z.collectionRef);return s.jsx(w,{ref:U,children:q})});S.displayName=g;const b=a+"CollectionItemSlot",x="data-radix-collection-item",T=ha(b),j=m.forwardRef((N,_)=>{const{scope:P,children:q,...z}=N,U=m.useRef(null),[ee,ae]=m.useState(null),oe=Pe(_,U,ae),Z=f(b,P),{setItemMap:ie}=Z,se=m.useRef(z);Jx(se.current,z)||(se.current=z);const he=se.current;return m.useEffect(()=>{const k=he;return ie($=>ee?$.has(ee)?$.set(ee,{...k,element:ee}).toSorted(kf):($.set(ee,{...k,element:ee}),$.toSorted(kf)):$),()=>{ie($=>!ee||!$.has(ee)?$:($.delete(ee),new vf($)))}},[ee,he,ie]),s.jsx(T,{[x]:"",ref:oe,children:q})});j.displayName=b;function C(){return m.useState(new vf)}_t(C,"useInitCollection");function R(N){const{itemMap:_}=f(a+"CollectionConsumer",N);return _}return _t(R,"useCollection"),[{Provider:h,Slot:S,ItemSlot:j},{createCollectionScope:i,useCollection:R,useInitCollection:C}]}_t(P2,"createCollection");function Jx(a,l){if(a===l)return!0;if(typeof a!="object"||typeof l!="object"||a==null||l==null)return!1;const o=Object.keys(a),i=Object.keys(l);if(o.length!==i.length)return!1;for(const u of o)if(!Object.prototype.hasOwnProperty.call(l,u)||a[u]!==l[u])return!1;return!0}_t(Jx,"shallowEqual");function Wx(a,l){return!!(l.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_PRECEDING)}_t(Wx,"isElementPreceding");function kf(a,l){return!a[1].element||!l[1].element?0:Wx(a[1].element,l[1].element)?-1:1}_t(kf,"sortByDocumentPosition");function eb(a){return new MutationObserver(o=>{for(const i of o)if(i.type==="childList"){a();return}})}_t(eb,"getChildListObserver");var q2=Object.defineProperty,V2=(a,l)=>q2(a,"name",{value:l,configurable:!0}),Y2=m.createContext(void 0);function Mi(a){const l=m.useContext(Y2);return a||l||"ltr"}V2(Mi,"useDirection");var G2=Object.defineProperty,I2=(a,l)=>G2(a,"name",{value:l,configurable:!0});function Un(a){const l=m.useRef(a);return m.useEffect(()=>{l.current=a}),m.useMemo(()=>((...o)=>{var i;return(i=l.current)==null?void 0:i.call(l,...o)}),[])}I2(Un,"useCallbackRef");var $2=Object.defineProperty,Mt=(a,l)=>$2(a,"name",{value:l,configurable:!0}),Lf="dismissableLayer.update",K2="dismissableLayer.pointerDownOutside",X2="dismissableLayer.focusOutside",Ny,tb=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Cc=m.forwardRef(Mt(function(l,o){const{disableOutsidePointerEvents:i=!1,deferPointerDownOutside:u=!1,onEscapeKeyDown:f,onPointerDownOutside:h,onFocusOutside:p,onInteractOutside:v,onDismiss:g,...w}=l,S=m.useContext(tb),[b,x]=m.useState(null),T=(b==null?void 0:b.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,j]=m.useState({}),C=Pe(o,x),R=Array.from(S.layers),[A]=[...S.layersWithOutsidePointerEventsDisabled].slice(-1),N=A?R.indexOf(A):-1,_=b?R.indexOf(b):-1,P=S.layersWithOutsidePointerEventsDisabled.size>0,q=_>=N,z=m.useRef(!1),U=ab(Z=>{h==null||h(Z),v==null||v(Z),Z.defaultPrevented||g==null||g()},{ownerDocument:T,deferPointerDownOutside:u,isDeferredPointerDownOutsideRef:z,dismissableSurfaces:S.dismissableSurfaces,shouldHandlePointerDownOutside:m.useCallback(Z=>{if(!(Z instanceof Node))return!1;const ie=[...S.branches].some(se=>se.contains(Z));return q&&!ie},[S.branches,q])}),ee=lb(Z=>{if(u&&z.current)return;const ie=Z.target;[...S.branches].some(he=>he.contains(ie))||(p==null||p(Z),v==null||v(Z),Z.defaultPrevented||g==null||g())},T),ae=b?_===R.length-1:!1,oe=Un(Z=>{Z.key==="Escape"&&(f==null||f(Z),!Z.defaultPrevented&&g&&(Z.preventDefault(),g()))});return m.useEffect(()=>{if(ae)return T.addEventListener("keydown",oe,{capture:!0}),()=>T.removeEventListener("keydown",oe,{capture:!0})},[T,ae,oe]),m.useEffect(()=>{if(b)return i&&(S.layersWithOutsidePointerEventsDisabled.size===0&&(Ny=T.body.style.pointerEvents,T.body.style.pointerEvents="none"),S.layersWithOutsidePointerEventsDisabled.add(b)),S.layers.add(b),Uf(),()=>{i&&(S.layersWithOutsidePointerEventsDisabled.delete(b),S.layersWithOutsidePointerEventsDisabled.size===0&&(T.body.style.pointerEvents=Ny))}},[b,T,i,S]),m.useEffect(()=>()=>{b&&(S.layers.delete(b),S.layersWithOutsidePointerEventsDisabled.delete(b),Uf())},[b,S]),m.useEffect(()=>{const Z=Mt(()=>j({}),"handleUpdate");return document.addEventListener(Lf,Z),()=>document.removeEventListener(Lf,Z)},[]),s.jsx(Le.div,{...w,ref:C,style:{pointerEvents:P?q?"auto":"none":void 0,...l.style},onFocusCapture:xe(l.onFocusCapture,ee.onFocusCapture),onBlurCapture:xe(l.onBlurCapture,ee.onBlurCapture),onPointerDownCapture:xe(l.onPointerDownCapture,U.onPointerDownCapture)})},"DismissableLayer"));function nb(){const a=m.useContext(tb),[l,o]=m.useState(null);return m.useEffect(()=>{if(l)return a.dismissableSurfaces.add(l),()=>{a.dismissableSurfaces.delete(l)}},[l,a.dismissableSurfaces]),o}Mt(nb,"useDismissableLayerSurface");var Q2=Mt(()=>!0,"IS_TRUE");function ab(a,l){const{ownerDocument:o=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:i=!1,isDeferredPointerDownOutsideRef:u,dismissableSurfaces:f,shouldHandlePointerDownOutside:h=Q2}=l,p=Un(a),v=m.useRef(!1),g=m.useRef(!1),w=m.useRef(new Map),S=m.useRef(()=>{});return m.useEffect(()=>{function b(){g.current=!1,u.current=!1,w.current.clear()}Mt(b,"resetOutsideInteraction");function x(){return Array.from(w.current.values()).some(Boolean)}Mt(x,"isOutsideInteractionIntercepted");function T(N){if(!g.current)return;const _=N.target;_ instanceof Node&&[...f].some(q=>q.contains(_))||w.current.set(N.type,!0),N.type==="click"&&window.setTimeout(()=>{g.current&&S.current()},0)}Mt(T,"handleInteractionCapture");function j(N){g.current&&w.current.set(N.type,!1)}Mt(j,"handleInteractionBubble");const C=Mt(N=>{if(N.target&&!v.current){let _=function(){o.removeEventListener("click",S.current);const q=x();b(),q||ph(K2,p,P,{discrete:!0})};if(Mt(_,"handleAndDispatchPointerDownOutsideEvent"),!h(N.target)){o.removeEventListener("click",S.current),b(),v.current=!1;return}const P={originalEvent:N};g.current=!0,u.current=i&&N.button===0,w.current.clear(),!i||N.button!==0?_():(o.removeEventListener("click",S.current),S.current=_,o.addEventListener("click",S.current,{once:!0}))}else o.removeEventListener("click",S.current),b();v.current=!1},"handlePointerDown"),R=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const N of R)o.addEventListener(N,T,!0),o.addEventListener(N,j);const A=window.setTimeout(()=>{o.addEventListener("pointerdown",C)},0);return()=>{window.clearTimeout(A),o.removeEventListener("pointerdown",C),o.removeEventListener("click",S.current);for(const N of R)o.removeEventListener(N,T,!0),o.removeEventListener(N,j)}},[o,p,i,u,f,h]),{onPointerDownCapture:Mt(()=>v.current=!0,"onPointerDownCapture")}}Mt(ab,"usePointerDownOutside");function lb(a,l=globalThis==null?void 0:globalThis.document){const o=Un(a),i=m.useRef(!1);return m.useEffect(()=>{const u=Mt(f=>{f.target&&!i.current&&ph(X2,o,{originalEvent:f},{discrete:!1})},"handleFocus");return l.addEventListener("focusin",u),()=>l.removeEventListener("focusin",u)},[l,o]),{onFocusCapture:Mt(()=>i.current=!0,"onFocusCapture"),onBlurCapture:Mt(()=>i.current=!1,"onBlurCapture")}}Mt(lb,"useFocusOutside");function Uf(){const a=new CustomEvent(Lf);document.dispatchEvent(a)}Mt(Uf,"dispatchUpdate");function ph(a,l,o,{discrete:i}){const u=o.originalEvent.target,f=new CustomEvent(a,{bubbles:!1,cancelable:!0,detail:o});l&&u.addEventListener(a,l,{once:!0}),i?hh(u,f):u.dispatchEvent(f)}Mt(ph,"handleAndDispatchCustomEvent");var Z2=Object.defineProperty,vh=(a,l)=>Z2(a,"name",{value:l,configurable:!0}),Fs=0,oa=null;function F2(a){return _i(),a.children}vh(F2,"FocusGuards");function _i(){m.useEffect(()=>{oa||(oa={start:Hf(),end:Hf()});const{start:a,end:l}=oa;return document.body.firstElementChild!==a&&document.body.insertAdjacentElement("afterbegin",a),document.body.lastElementChild!==l&&document.body.insertAdjacentElement("beforeend",l),Fs++,()=>{Fs===1&&(oa==null||oa.start.remove(),oa==null||oa.end.remove(),oa=null),Fs=Math.max(0,Fs-1)}},[])}vh(_i,"useFocusGuards");function Hf(){const a=document.createElement("span");return a.setAttribute("data-radix-focus-guard",""),a.tabIndex=0,a.style.outline="none",a.style.opacity="0",a.style.position="fixed",a.style.pointerEvents="none",a}vh(Hf,"createFocusGuard");var J2=Object.defineProperty,$t=(a,l)=>J2(a,"name",{value:l,configurable:!0}),gf="focusScope.autoFocusOnMount",yf="focusScope.autoFocusOnUnmount",Ay={bubbles:!1,cancelable:!0},gh=m.forwardRef($t(function(l,o){const{loop:i=!1,trapped:u=!1,onMountAutoFocus:f,onUnmountAutoFocus:h,...p}=l,[v,g]=m.useState(null),w=Un(f),S=Un(h),b=m.useRef(null),x=Pe(o,g),T=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(u){let C=function(_){if(T.paused||!v)return;const P=_.target;v.contains(P)?b.current=P:qa(b.current,{select:!0})},R=function(_){if(T.paused||!v)return;const P=_.relatedTarget;P!==null&&(v.contains(P)||qa(b.current,{select:!0}))},A=function(_){if(document.activeElement===document.body)for(const q of _)q.removedNodes.length>0&&qa(v)};$t(C,"handleFocusIn"),$t(R,"handleFocusOut"),$t(A,"handleMutations"),document.addEventListener("focusin",C),document.addEventListener("focusout",R);const N=new MutationObserver(A);return v&&N.observe(v,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",R),N.disconnect()}}},[u,v,T.paused]),m.useEffect(()=>{if(v){My.add(T);const C=document.activeElement;if(!v.contains(C)){const A=new CustomEvent(gf,Ay);v.addEventListener(gf,w),v.dispatchEvent(A),A.defaultPrevented||(rb(ub(yh(v)),{select:!0}),document.activeElement===C&&qa(v))}return()=>{v.removeEventListener(gf,w),setTimeout(()=>{const A=new CustomEvent(yf,Ay);v.addEventListener(yf,S),v.dispatchEvent(A),A.defaultPrevented||qa(C??document.body,{select:!0}),v.removeEventListener(yf,S),My.remove(T)},0)}}},[v,w,S,T]);const j=m.useCallback(C=>{if(!i&&!u||T.paused)return;const R=C.key==="Tab"&&!C.altKey&&!C.ctrlKey&&!C.metaKey,A=document.activeElement;if(R&&A){const N=C.currentTarget,[_,P]=ob(N);_&&P?!C.shiftKey&&A===P?(C.preventDefault(),i&&qa(_,{select:!0})):C.shiftKey&&A===_&&(C.preventDefault(),i&&qa(P,{select:!0})):A===N&&C.preventDefault()}},[i,u,T.paused]);return s.jsx(Le.div,{tabIndex:-1,...p,ref:x,onKeyDown:j})},"FocusScope"));function rb(a,{select:l=!1}={}){const o=document.activeElement;for(const i of a)if(qa(i,{select:l}),document.activeElement!==o)return}$t(rb,"focusFirst");function ob(a){const l=yh(a),o=Bf(l,a),i=Bf(l.reverse(),a);return[o,i]}$t(ob,"getTabbableEdges");function yh(a){const l=[],o=document.createTreeWalker(a,NodeFilter.SHOW_ELEMENT,{acceptNode:$t(i=>{const u=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||u?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;o.nextNode();)l.push(o.currentNode);return l}$t(yh,"getTabbableCandidates");function Bf(a,l){const o=typeof l.checkVisibility=="function"&&l.checkVisibility({checkVisibilityCSS:!0});for(const i of a)if(!(o?!i.checkVisibility({checkVisibilityCSS:!0}):ib(i,{upTo:l})))return i}$t(Bf,"findVisible");function ib(a,{upTo:l}){if(getComputedStyle(a).visibility==="hidden")return!0;for(;a;){if(l!==void 0&&a===l)return!1;if(getComputedStyle(a).display==="none")return!0;a=a.parentElement}return!1}$t(ib,"isHidden");function sb(a){return a instanceof HTMLInputElement&&"select"in a}$t(sb,"isSelectableInput");function qa(a,{select:l=!1}={}){if(a&&a.focus){const o=document.activeElement;a.focus({preventScroll:!0}),a!==o&&sb(a)&&l&&a.select()}}$t(qa,"focus");var My=cb();function cb(){let a=[];return{add(l){const o=a[0];l!==o&&(o==null||o.pause()),a=Pf(a,l),a.unshift(l)},remove(l){var o;a=Pf(a,l),(o=a[0])==null||o.resume()}}}$t(cb,"createFocusScopesStack");function Pf(a,l){const o=[...a],i=o.indexOf(l);return i!==-1&&o.splice(i,1),o}$t(Pf,"arrayRemove");function ub(a){return a.filter(l=>l.tagName!=="A")}$t(ub,"removeLinks");var W2=Object.defineProperty,eE=(a,l)=>W2(a,"name",{value:l,configurable:!0}),tE=ho[" useId ".trim().toString()]||(()=>{}),nE=0;function ca(a){const[l,o]=m.useState(tE());return Tt(()=>{a||o(i=>i??String(nE++))},[a]),a||(l?`radix-${l}`:"")}eE(ca,"useId");const aE=["top","right","bottom","left"],Dl=Math.min,Va=Math.max,hc=Math.round,Js=Math.floor,Ya=a=>({x:a,y:a}),lE={left:"right",right:"left",bottom:"top",top:"bottom"};function db(a,l,o){return Va(a,Dl(l,o))}function Qa(a,l){return typeof a=="function"?a(l):a}function zl(a){return a.split("-")[0]}function bo(a){return a.split("-")[1]}function xh(a){return a==="x"?"y":"x"}function bh(a){return a==="y"?"height":"width"}function sa(a){const l=a[0];return l==="t"||l==="b"?"y":"x"}function Sh(a){return xh(sa(a))}function rE(a,l,o){o===void 0&&(o=!1);const i=bo(a),u=Sh(a),f=bh(u);let h=u==="x"?i===(o?"end":"start")?"right":"left":i==="start"?"bottom":"top";return l.reference[f]>l.floating[f]&&(h=mc(h)),[h,mc(h)]}function oE(a){const l=mc(a);return[qf(a),l,qf(l)]}function qf(a){return a.includes("start")?a.replace("start","end"):a.replace("end","start")}const _y=["left","right"],Oy=["right","left"],iE=["top","bottom"],sE=["bottom","top"];function cE(a,l,o){switch(a){case"top":case"bottom":return o?l?Oy:_y:l?_y:Oy;case"left":case"right":return l?iE:sE;default:return[]}}function uE(a,l,o,i){const u=bo(a);let f=cE(zl(a),o==="start",i);return u&&(f=f.map(h=>h+"-"+u),l&&(f=f.concat(f.map(qf)))),f}function mc(a){const l=zl(a);return lE[l]+a.slice(l.length)}function dE(a){var l,o,i,u;return{top:(l=a.top)!=null?l:0,right:(o=a.right)!=null?o:0,bottom:(i=a.bottom)!=null?i:0,left:(u=a.left)!=null?u:0}}function fb(a){return typeof a!="number"?dE(a):{top:a,right:a,bottom:a,left:a}}function pc(a){const{x:l,y:o,width:i,height:u}=a;return{width:i,height:u,top:o,left:l,right:l+i,bottom:o+u,x:l,y:o}}function Dy(a,l,o){let{reference:i,floating:u}=a;const f=sa(l),h=Sh(l),p=bh(h),v=zl(l),g=f==="y",w=i.x+i.width/2-u.width/2,S=i.y+i.height/2-u.height/2,b=i[p]/2-u[p]/2;let x;switch(v){case"top":x={x:w,y:i.y-u.height};break;case"bottom":x={x:w,y:i.y+i.height};break;case"right":x={x:i.x+i.width,y:S};break;case"left":x={x:i.x-u.width,y:S};break;default:x={x:i.x,y:i.y}}const T=bo(l);return T&&(x[h]+=b*(T==="end"?1:-1)*(o&&g?-1:1)),x}async function fE(a,l){var o;l===void 0&&(l={});const{x:i,y:u,platform:f,rects:h,elements:p,strategy:v}=a,{boundary:g="clippingAncestors",rootBoundary:w="viewport",elementContext:S="floating",altBoundary:b=!1,padding:x=0}=Qa(l,a),T=fb(x),C=p[b?S==="floating"?"reference":"floating":S],R=pc(await f.getClippingRect({element:(o=await(f.isElement==null?void 0:f.isElement(C)))==null||o?C:C.contextElement||await(f.getDocumentElement==null?void 0:f.getDocumentElement(p.floating)),boundary:g,rootBoundary:w,strategy:v})),A=S==="floating"?{x:i,y:u,width:h.floating.width,height:h.floating.height}:h.reference,N=await(f.getOffsetParent==null?void 0:f.getOffsetParent(p.floating)),_=await(f.isElement==null?void 0:f.isElement(N))&&await(f.getScale==null?void 0:f.getScale(N))||{x:1,y:1},P=pc(f.convertOffsetParentRelativeRectToViewportRelativeRect?await f.convertOffsetParentRelativeRectToViewportRelativeRect({elements:p,rect:A,offsetParent:N,strategy:v}):A);return{top:(R.top-P.top+T.top)/_.y,bottom:(P.bottom-R.bottom+T.bottom)/_.y,left:(R.left-P.left+T.left)/_.x,right:(P.right-R.right+T.right)/_.x}}const hE=50,mE=async(a,l,o)=>{const{placement:i="bottom",strategy:u="absolute",middleware:f=[],platform:h}=o,p=h.detectOverflow?h:{...h,detectOverflow:fE},v=await(h.isRTL==null?void 0:h.isRTL(l));let g=await h.getElementRects({reference:a,floating:l,strategy:u}),{x:w,y:S}=Dy(g,i,v),b=i,x=0;const T={};for(let j=0;j<f.length;j++){const C=f[j];if(!C)continue;const{name:R,fn:A}=C,{x:N,y:_,data:P,reset:q}=await A({x:w,y:S,initialPlacement:i,placement:b,strategy:u,middlewareData:T,rects:g,platform:p,elements:{reference:a,floating:l}});w=N??w,S=_??S,T[R]={...T[R],...P},q&&x<hE&&(x++,typeof q=="object"&&(q.placement&&(b=q.placement),q.rects&&(g=q.rects===!0?await h.getElementRects({reference:a,floating:l,strategy:u}):q.rects),{x:w,y:S}=Dy(g,b,v)),j=-1)}return{x:w,y:S,placement:b,strategy:u,middlewareData:T}},pE=a=>({name:"arrow",options:a,async fn(l){const{x:o,y:i,placement:u,rects:f,platform:h,elements:p,middlewareData:v}=l,{element:g,padding:w=0}=Qa(a,l)||{};if(g==null)return{};const S=fb(w),b={x:o,y:i},x=Sh(u),T=bh(x),j=await h.getDimensions(g),C=x==="y",R=C?"top":"left",A=C?"bottom":"right",N=C?"clientHeight":"clientWidth",_=f.reference[T]+f.reference[x]-b[x]-f.floating[T],P=b[x]-f.reference[x],q=await(h.getOffsetParent==null?void 0:h.getOffsetParent(g));let z=q?q[N]:0;(!z||!await(h.isElement==null?void 0:h.isElement(q)))&&(z=p.floating[N]||f.floating[T]);const U=_/2-P/2,ee=z/2-j[T]/2-1,ae=Dl(S[R],ee),oe=Dl(S[A],ee),Z=z-j[T]-oe,ie=z/2-j[T]/2+U,se=db(ae,ie,Z),he=!v.arrow&&bo(u)!=null&&ie!==se&&f.reference[T]/2-(ie<ae?ae:oe)-j[T]/2<0,k=he?ie<ae?ie-ae:ie-Z:0;return{[x]:b[x]+k,data:{[x]:se,centerOffset:ie-se-k,...he&&{alignmentOffset:k}},reset:he}}}),vE=function(a){return a===void 0&&(a={}),{name:"flip",options:a,async fn(l){var o,i;const{placement:u,middlewareData:f,rects:h,initialPlacement:p,platform:v,elements:g}=l,{mainAxis:w=!0,crossAxis:S=!0,fallbackPlacements:b,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:T="none",flipAlignment:j=!0,...C}=Qa(a,l);if((o=f.arrow)!=null&&o.alignmentOffset)return{};const R=zl(u),A=sa(p),N=zl(p)===p,_=await(v.isRTL==null?void 0:v.isRTL(g.floating)),P=b||(N||!j?[mc(p)]:oE(p)),q=T!=="none";!b&&q&&P.push(...uE(p,j,T,_));const z=[p,...P],U=await v.detectOverflow(l,C),ee=[];let ae=((i=f.flip)==null?void 0:i.overflows)||[];if(w&&ee.push(U[R]),S){const se=rE(u,h,_);ee.push(U[se[0]],U[se[1]])}if(ae=[...ae,{placement:u,overflows:ee}],!ee.every(se=>se<=0)){var oe,Z;const se=(((oe=f.flip)==null?void 0:oe.index)||0)+1,he=z[se];if(he&&(!(S==="alignment"?A!==sa(he):!1)||ae.every(te=>sa(te.placement)===A?te.overflows[0]>0:!0)))return{data:{index:se,overflows:ae},reset:{placement:he}};let k=(Z=ae.filter($=>$.overflows[0]<=0).sort(($,te)=>$.overflows[1]-te.overflows[1])[0])==null?void 0:Z.placement;if(!k)switch(x){case"bestFit":{var ie;const $=(ie=ae.filter(te=>{if(q){const J=sa(te.placement);return J===A||J==="y"}return!0}).map(te=>[te.placement,te.overflows.filter(J=>J>0).reduce((J,W)=>J+W,0)]).sort((te,J)=>te[1]-J[1])[0])==null?void 0:ie[0];$&&(k=$);break}case"initialPlacement":k=p;break}if(u!==k)return{reset:{placement:k}}}return{}}}};function zy(a,l){return{top:a.top-l.height,right:a.right-l.width,bottom:a.bottom-l.height,left:a.left-l.width}}function ky(a){return aE.some(l=>a[l]>=0)}const gE=function(a){return a===void 0&&(a={}),{name:"hide",options:a,async fn(l){const{rects:o,platform:i}=l,{strategy:u="referenceHidden",...f}=Qa(a,l);switch(u){case"referenceHidden":{const h=await i.detectOverflow(l,{...f,elementContext:"reference"}),p=zy(h,o.reference);return{data:{referenceHiddenOffsets:p,referenceHidden:ky(p)}}}case"escaped":{const h=await i.detectOverflow(l,{...f,altBoundary:!0}),p=zy(h,o.floating);return{data:{escapedOffsets:p,escaped:ky(p)}}}default:return{}}}}},hb=new Set(["left","top"]);async function yE(a,l){const{placement:o,platform:i,elements:u}=a,f=await(i.isRTL==null?void 0:i.isRTL(u.floating)),h=zl(o),p=bo(o),v=sa(o)==="y",g=hb.has(h)?-1:1,w=f&&v?-1:1,S=Qa(l,a);let{mainAxis:b,crossAxis:x,alignmentAxis:T}=typeof S=="number"?{mainAxis:S,crossAxis:0,alignmentAxis:null}:{mainAxis:S.mainAxis||0,crossAxis:S.crossAxis||0,alignmentAxis:S.alignmentAxis};return p&&typeof T=="number"&&(x=p==="end"?T*-1:T),v?{x:x*w,y:b*g}:{x:b*g,y:x*w}}const xE=function(a){return a===void 0&&(a=0),{name:"offset",options:a,async fn(l){var o,i;const{x:u,y:f,placement:h,middlewareData:p}=l,v=await yE(l,a);return h===((o=p.offset)==null?void 0:o.placement)&&(i=p.arrow)!=null&&i.alignmentOffset?{}:{x:u+v.x,y:f+v.y,data:{...v,placement:h}}}}},bE=function(a){return a===void 0&&(a={}),{name:"shift",options:a,async fn(l){const{x:o,y:i,placement:u,platform:f}=l,{mainAxis:h=!0,crossAxis:p=!1,limiter:v={fn:A=>{let{x:N,y:_}=A;return{x:N,y:_}}},...g}=Qa(a,l),w={x:o,y:i},S=await f.detectOverflow(l,g),b=sa(u),x=xh(b);let T=w[x],j=w[b];const C=(A,N)=>db(N+S[A==="y"?"top":"left"],N,N-S[A==="y"?"bottom":"right"]);h&&(T=C(x,T)),p&&(j=C(b,j));const R=v.fn({...l,[x]:T,[b]:j});return{...R,data:{x:R.x-o,y:R.y-i,enabled:{[x]:h,[b]:p}}}}}},SE=function(a){return a===void 0&&(a={}),{options:a,fn(l){var o,i;const{x:u,y:f,placement:h,rects:p,middlewareData:v}=l,{offset:g=0,mainAxis:w=!0,crossAxis:S=!0}=Qa(a,l),b={x:u,y:f},x=sa(h),T=xh(x);let j=b[T],C=b[x];const R=Qa(g,l),A=typeof R=="number"?{mainAxis:R,crossAxis:0}:{mainAxis:(o=R.mainAxis)!=null?o:0,crossAxis:(i=R.crossAxis)!=null?i:0};if(w){const P=T==="y"?"height":"width",q=p.reference[T]-p.floating[P]+A.mainAxis,z=p.reference[T]+p.reference[P]-A.mainAxis;j<q?j=q:j>z&&(j=z)}if(S){var N,_;const P=T==="y"?"width":"height",q=hb.has(zl(h)),z=p.reference[x]-p.floating[P]+(q&&((N=v.offset)==null?void 0:N[x])||0)+(q?0:A.crossAxis),U=p.reference[x]+p.reference[P]+(q?0:((_=v.offset)==null?void 0:_[x])||0)-(q?A.crossAxis:0);C<z?C=z:C>U&&(C=U)}return{[T]:j,[x]:C}}}},wE=function(a){return a===void 0&&(a={}),{name:"size",options:a,async fn(l){const{placement:o,rects:i,platform:u,elements:f}=l,{apply:h=()=>{},...p}=Qa(a,l),v=await u.detectOverflow(l,p),g=zl(o),w=bo(o),S=sa(o)==="y",{width:b,height:x}=i.floating;let T,j;g==="top"||g==="bottom"?(T=g,j=w===(await(u.isRTL==null?void 0:u.isRTL(f.floating))?"start":"end")?"left":"right"):(j=g,T=w==="end"?"top":"bottom");const C=x-v.top-v.bottom,R=b-v.left-v.right,A=Dl(x-v[T],C),N=Dl(b-v[j],R),_=l.middlewareData.shift,P=!_;let q=A,z=N;_!=null&&_.enabled.x&&(z=R),_!=null&&_.enabled.y&&(q=C),P&&!w&&(S?z=b-2*Va(v.left,v.right):q=x-2*Va(v.top,v.bottom)),await h({...l,availableWidth:z,availableHeight:q});const U=await u.getDimensions(f.floating);return b!==U.width||x!==U.height?{reset:{rects:!0}}:{}}}};function Ec(){return typeof window<"u"}function So(a){return mb(a)?(a.nodeName||"").toLowerCase():"#document"}function rn(a){var l;return(a==null||(l=a.ownerDocument)==null?void 0:l.defaultView)||window}function Ja(a){var l;return(l=(mb(a)?a.ownerDocument:a.document)||window.document)==null?void 0:l.documentElement}function mb(a){return Ec()?a instanceof Node||a instanceof rn(a).Node:!1}function ma(a){return Ec()?a instanceof Element||a instanceof rn(a).Element:!1}function Ll(a){return Ec()?a instanceof HTMLElement||a instanceof rn(a).HTMLElement:!1}function Ly(a){return!Ec()||typeof ShadowRoot>"u"?!1:a instanceof ShadowRoot||a instanceof rn(a).ShadowRoot}function Rc(a){const{overflow:l,overflowX:o,overflowY:i,display:u}=pa(a);return/auto|scroll|overlay|hidden|clip/.test(l+i+o)&&u!=="inline"&&u!=="contents"}function jE(a){return/^(table|td|th)$/.test(So(a))}function Tc(a){try{if(a.matches(":popover-open"))return!0}catch{}try{return a.matches(":modal")}catch{return!1}}const CE=/transform|translate|scale|rotate|perspective|filter/,EE=/paint|layout|strict|content/,lr=a=>!!a&&a!=="none";let xf;function wh(a){const l=ma(a)?pa(a):a;return lr(l.transform)||lr(l.translate)||lr(l.scale)||lr(l.rotate)||lr(l.perspective)||!jh()&&(lr(l.backdropFilter)||lr(l.filter))||CE.test(l.willChange||"")||EE.test(l.contain||"")}function RE(a){let l=or(a);for(;Ll(l)&&!wi(l);){if(wh(l))return l;if(Tc(l))return null;l=or(l)}return null}function jh(){return xf==null&&(xf=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),xf}function wi(a){return/^(html|body|#document)$/.test(So(a))}function pa(a){return rn(a).getComputedStyle(a)}function Nc(a){return ma(a)?{scrollLeft:a.scrollLeft,scrollTop:a.scrollTop}:{scrollLeft:a.scrollX,scrollTop:a.scrollY}}function or(a){if(So(a)==="html")return a;const l=a.assignedSlot||a.parentNode||Ly(a)&&a.host||Ja(a);return Ly(l)?l.host:l}function pb(a){const l=or(a);return wi(l)?(a.ownerDocument||a).body:Ll(l)&&Rc(l)?l:pb(l)}function ji(a,l,o){var i;l===void 0&&(l=[]),o===void 0&&(o=!0);const u=pb(a),f=u===((i=a.ownerDocument)==null?void 0:i.body),h=rn(u);if(f){const p=Vf(h);return l.concat(h,h.visualViewport||[],Rc(u)?u:[],p&&o?ji(p):[])}else return l.concat(u,ji(u,[],o))}function Vf(a){return a.parent&&Object.getPrototypeOf(a.parent)?a.frameElement:null}function vb(a){const l=pa(a);let o=parseFloat(l.width)||0,i=parseFloat(l.height)||0;const u=Ll(a),f=u?a.offsetWidth:o,h=u?a.offsetHeight:i,p=hc(o)!==f||hc(i)!==h;return p&&(o=f,i=h),{width:o,height:i,$:p}}function Ch(a){return ma(a)?a:a.contextElement}function co(a){const l=Ch(a);if(!Ll(l))return Ya(1);const o=l.getBoundingClientRect(),{width:i,height:u,$:f}=vb(l);let h=(f?hc(o.width):o.width)/i,p=(f?hc(o.height):o.height)/u;return(!h||!Number.isFinite(h))&&(h=1),(!p||!Number.isFinite(p))&&(p=1),{x:h,y:p}}const TE=Ya(0);function gb(a){const l=rn(a);return!jh()||!l.visualViewport?TE:{x:l.visualViewport.offsetLeft,y:l.visualViewport.offsetTop}}function NE(a,l,o){return l===void 0&&(l=!1),!!o&&l&&o===rn(a)}function ir(a,l,o,i){l===void 0&&(l=!1),o===void 0&&(o=!1);const u=a.getBoundingClientRect(),f=Ch(a);let h=Ya(1);l&&(i?ma(i)&&(h=co(i)):h=co(a));const p=NE(f,o,i)?gb(f):Ya(0);let v=(u.left+p.x)/h.x,g=(u.top+p.y)/h.y,w=u.width/h.x,S=u.height/h.y;if(f&&i){const b=rn(f),x=ma(i)?rn(i):i;let T=b,j=Vf(T);for(;j&&x!==T;){const C=co(j),R=j.getBoundingClientRect(),A=pa(j),N=R.left+(j.clientLeft+parseFloat(A.paddingLeft))*C.x,_=R.top+(j.clientTop+parseFloat(A.paddingTop))*C.y;v*=C.x,g*=C.y,w*=C.x,S*=C.y,v+=N,g+=_,T=rn(j),j=Vf(T)}}return pc({width:w,height:S,x:v,y:g})}function Ac(a,l){const o=Nc(a).scrollLeft;return l?l.left+o:ir(Ja(a)).left+o}function yb(a,l){const o=a.getBoundingClientRect(),i=o.left+l.scrollLeft-Ac(a,o),u=o.top+l.scrollTop;return{x:i,y:u}}function AE(a){let{elements:l,rect:o,offsetParent:i,strategy:u}=a;const f=u==="fixed",h=Ja(i),p=l?Tc(l.floating):!1;if(i===h||p&&f)return o;let v={scrollLeft:0,scrollTop:0},g=Ya(1);const w=Ya(0),S=Ll(i);if((S||!f)&&((So(i)!=="body"||Rc(h))&&(v=Nc(i)),S)){const x=ir(i);g=co(i),w.x=x.x+i.clientLeft,w.y=x.y+i.clientTop}const b=h&&!S&&!f?yb(h,v):Ya(0);return{width:o.width*g.x,height:o.height*g.y,x:o.x*g.x-v.scrollLeft*g.x+w.x+b.x,y:o.y*g.y-v.scrollTop*g.y+w.y+b.y}}function ME(a){return a.getClientRects?Array.from(a.getClientRects()):[]}function _E(a){const l=Nc(a),o=a.ownerDocument.body,i=Va(a.scrollWidth,a.clientWidth,o.scrollWidth,o.clientWidth),u=Va(a.scrollHeight,a.clientHeight,o.scrollHeight,o.clientHeight);let f=-l.scrollLeft+Ac(a);const h=-l.scrollTop;return pa(o).direction==="rtl"&&(f+=Va(a.clientWidth,o.clientWidth)-i),{width:i,height:u,x:f,y:h}}const OE=25;function DE(a,l,o){o===void 0&&(o="viewport");const i=o==="layoutViewport",u=rn(a),f=Ja(a),h=u.visualViewport;let p=f.clientWidth,v=f.clientHeight,g=0,w=0;if(h){const b=!jh()||l==="fixed";i?b||(g=-h.offsetLeft,w=-h.offsetTop):(p=h.width,v=h.height,b&&(g=h.offsetLeft,w=h.offsetTop))}if(Ac(f)<=0){const b=f.ownerDocument,x=b.body,T=getComputedStyle(x),j=b.compatMode==="CSS1Compat"&&parseFloat(T.marginLeft)+parseFloat(T.marginRight)||0,C=Math.abs(f.clientWidth-x.clientWidth-j),R=getComputedStyle(f).scrollbarGutter==="stable both-edges"?C/2:C;R<=OE&&(p-=R)}return{width:p,height:v,x:g,y:w}}function zE(a,l){const o=ir(a,!0,l==="fixed"),i=o.top+a.clientTop,u=o.left+a.clientLeft,f=co(a),h=a.clientWidth*f.x,p=a.clientHeight*f.y,v=u*f.x,g=i*f.y;return{width:h,height:p,x:v,y:g}}function Uy(a,l,o){let i;if(l==="viewport"||l==="layoutViewport")i=DE(a,o,l);else if(l==="document")i=_E(Ja(a));else if(ma(l))i=zE(l,o);else{const u=gb(a);i={x:l.x-u.x,y:l.y-u.y,width:l.width,height:l.height}}return pc(i)}function kE(a,l){const o=l.get(a);if(o)return o;let i=ji(a,[],!1).filter(p=>ma(p)&&So(p)!=="body"),u=null;const f=pa(a).position==="fixed";let h=f?or(a):a;for(;ma(h)&&!wi(h);){const p=pa(h),v=wh(h),g=u?u.position:f?"fixed":"";!v&&(g==="fixed"||g==="absolute"&&p.position==="static")?i=i.filter(S=>S!==h):u=p,h=or(h)}return l.set(a,i),i}function LE(a){let{element:l,boundary:o,rootBoundary:i,strategy:u}=a;const h=[...o==="clippingAncestors"?Tc(l)?[]:kE(l,this._c):[].concat(o),i],p=Uy(l,h[0],u);let v=p.top,g=p.right,w=p.bottom,S=p.left;for(let b=1;b<h.length;b++){const x=Uy(l,h[b],u);v=Va(x.top,v),g=Dl(x.right,g),w=Dl(x.bottom,w),S=Va(x.left,S)}return{width:g-S,height:w-v,x:S,y:v}}function UE(a){const{width:l,height:o}=vb(a);return{width:l,height:o}}function HE(a,l,o){const i=Ll(l),u=Ja(l),f=o==="fixed",h=ir(a,!0,f,l);let p={scrollLeft:0,scrollTop:0};const v=Ya(0);if((i||!f)&&((So(l)!=="body"||Rc(u))&&(p=Nc(l)),i)){const b=ir(l,!0,f,l);v.x=b.x+l.clientLeft,v.y=b.y+l.clientTop}!i&&u&&(v.x=Ac(u));const g=u&&!i&&!f?yb(u,p):Ya(0),w=h.left+p.scrollLeft-v.x-g.x,S=h.top+p.scrollTop-v.y-g.y;return{x:w,y:S,width:h.width,height:h.height}}function bf(a){return pa(a).position==="static"}function Hy(a,l){if(!Ll(a)||pa(a).position==="fixed")return null;if(l)return l(a);let o=a.offsetParent;return Ja(a)===o&&(o=o.ownerDocument.body),o}function xb(a,l){const o=rn(a);if(Tc(a))return o;if(!Ll(a)){let u=or(a);for(;u&&!wi(u);){if(ma(u)&&!bf(u))return u;u=or(u)}return o}let i=Hy(a,l);for(;i&&jE(i)&&bf(i);)i=Hy(i,l);return i&&wi(i)&&bf(i)&&!wh(i)?o:i||RE(a)||o}const BE=async function(a){const l=this.getOffsetParent||xb,o=this.getDimensions,i=await o(a.floating);return{reference:HE(a.reference,await l(a.floating),a.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function PE(a){return pa(a).direction==="rtl"}const qE={convertOffsetParentRelativeRectToViewportRelativeRect:AE,getDocumentElement:Ja,getClippingRect:LE,getOffsetParent:xb,getElementRects:BE,getClientRects:ME,getDimensions:UE,getScale:co,isElement:ma,isRTL:PE};function bb(a,l){return a.x===l.x&&a.y===l.y&&a.width===l.width&&a.height===l.height}function VE(a,l,o){let i=null,u;const f=Ja(a);function h(){var w;clearTimeout(u),(w=i)==null||w.disconnect(),i=null}function p(w,S){w===void 0&&(w=!1),S===void 0&&(S=1),h();const b=a.getBoundingClientRect(),{left:x,top:T,width:j,height:C}=b;if(w||l(),!j||!C)return;const R=Js(T),A=Js(f.clientWidth-(x+j)),N=Js(f.clientHeight-(T+C)),_=Js(x),q={rootMargin:-R+"px "+-A+"px "+-N+"px "+-_+"px",threshold:Va(0,Dl(1,S))||1};let z=!0;function U(ee){const ae=ee[0].intersectionRatio;if(!bb(b,a.getBoundingClientRect()))return p();if(ae!==S){if(!z)return p();ae?p(!1,ae):u=setTimeout(()=>{p(!1,1e-7)},1e3)}z=!1}try{i=new IntersectionObserver(U,{...q,root:f.ownerDocument})}catch{i=new IntersectionObserver(U,q)}i.observe(a)}const v=rn(a),g=()=>p(o);return v.addEventListener("resize",g),p(!0),()=>{v.removeEventListener("resize",g),h()}}function YE(a,l,o,i){i===void 0&&(i={});const{ancestorScroll:u=!0,ancestorResize:f=!0,elementResize:h=typeof ResizeObserver=="function",layoutShift:p=typeof IntersectionObserver=="function",animationFrame:v=!1}=i,g=Ch(a),w=u||f?[...g?ji(g):[],...l?ji(l):[]]:[];w.forEach(R=>{u&&R.addEventListener("scroll",o),f&&R.addEventListener("resize",o)});const S=g&&p?VE(g,o,f):null;let b=-1,x=null;h&&(x=new ResizeObserver(R=>{let[A]=R;A&&A.target===g&&x&&l&&(x.unobserve(l),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var N;(N=x)==null||N.observe(l)})),o()}),g&&!v&&x.observe(g),l&&x.observe(l));let T,j=v?ir(a):null;v&&C();function C(){const R=ir(a);j&&!bb(j,R)&&o(),j=R,T=requestAnimationFrame(C)}return o(),()=>{var R;w.forEach(A=>{u&&A.removeEventListener("scroll",o),f&&A.removeEventListener("resize",o)}),S==null||S(),(R=x)==null||R.disconnect(),x=null,v&&cancelAnimationFrame(T)}}const GE=xE,IE=bE,$E=vE,KE=wE,XE=gE,By=pE,QE=SE,ZE=(a,l,o)=>{const i=new Map,u=o??{},f={...qE,...u.platform,_c:i};return mE(a,l,{...u,platform:f})};var FE=typeof document<"u",JE=function(){},sc=FE?m.useLayoutEffect:JE;function vc(a,l){if(a===l)return!0;if(typeof a!=typeof l)return!1;if(typeof a=="function"&&a.toString()===l.toString())return!0;let o,i,u;if(a&&l&&typeof a=="object"){if(Array.isArray(a)){if(o=a.length,o!==l.length)return!1;for(i=o;i--!==0;)if(!vc(a[i],l[i]))return!1;return!0}if(u=Object.keys(a),o=u.length,o!==Object.keys(l).length)return!1;for(i=o;i--!==0;)if(!{}.hasOwnProperty.call(l,u[i]))return!1;for(i=o;i--!==0;){const f=u[i];if(!(f==="_owner"&&a.$$typeof)&&!vc(a[f],l[f]))return!1}return!0}return a!==a&&l!==l}function Sb(a){return typeof window>"u"?1:(a.ownerDocument.defaultView||window).devicePixelRatio||1}function Py(a,l){const o=Sb(a);return Math.round(l*o)/o}function Sf(a){const l=m.useRef(a);return sc(()=>{l.current=a}),l}function WE(a){a===void 0&&(a={});const{placement:l="bottom",strategy:o="absolute",middleware:i=[],platform:u,elements:{reference:f,floating:h}={},transform:p=!0,whileElementsMounted:v,open:g}=a,[w,S]=m.useState({x:0,y:0,strategy:o,placement:l,middlewareData:{},isPositioned:!1}),[b,x]=m.useState(i);vc(b,i)||x(i);const[T,j]=m.useState(null),[C,R]=m.useState(null),A=m.useCallback(te=>{te!==q.current&&(q.current=te,j(te))},[]),N=m.useCallback(te=>{te!==z.current&&(z.current=te,R(te))},[]),_=f||T,P=h||C,q=m.useRef(null),z=m.useRef(null),U=m.useRef(w),ee=v!=null,ae=Sf(v),oe=Sf(u),Z=Sf(g),ie=m.useCallback(()=>{if(!q.current||!z.current)return;const te={placement:l,strategy:o,middleware:b};oe.current&&(te.platform=oe.current),ZE(q.current,z.current,te).then(J=>{const W={...J,isPositioned:Z.current!==!1};se.current&&!vc(U.current,W)&&(U.current=W,go.flushSync(()=>{S(W)}))})},[b,l,o,oe,Z]);sc(()=>{g===!1&&U.current.isPositioned&&(U.current.isPositioned=!1,S(te=>({...te,isPositioned:!1})))},[g]);const se=m.useRef(!1);sc(()=>(se.current=!0,()=>{se.current=!1}),[]),sc(()=>{if(_&&(q.current=_),P&&(z.current=P),_&&P){if(ae.current)return ae.current(_,P,ie);ie()}},[_,P,ie,ae,ee]);const he=m.useMemo(()=>({reference:q,floating:z,setReference:A,setFloating:N}),[A,N]),k=m.useMemo(()=>({reference:_,floating:P}),[_,P]),$=m.useMemo(()=>{const te={position:o,left:0,top:0};if(!k.floating)return te;const J=Py(k.floating,w.x),W=Py(k.floating,w.y);return p?{...te,transform:"translate("+J+"px, "+W+"px)",...Sb(k.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:J,top:W}},[o,p,k.floating,w.x,w.y]);return m.useMemo(()=>({...w,update:ie,refs:he,elements:k,floatingStyles:$}),[w,ie,he,k,$])}const eR=a=>{function l(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:a,fn(o){const{element:i,padding:u}=typeof a=="function"?a(o):a;return i&&l(i)?i.current!=null?By({element:i.current,padding:u}).fn(o):{}:i?By({element:i,padding:u}).fn(o):{}}}},tR=(a,l)=>{const o=GE(a);return{name:o.name,fn:o.fn,options:[a,l]}},nR=(a,l)=>{const o=IE(a);return{name:o.name,fn:o.fn,options:[a,l]}},aR=(a,l)=>({fn:QE(a).fn,options:[a,l]}),lR=(a,l)=>{const o=$E(a);return{name:o.name,fn:o.fn,options:[a,l]}},rR=(a,l)=>{const o=KE(a);return{name:o.name,fn:o.fn,options:[a,l]}},oR=(a,l)=>{const o=XE(a);return{name:o.name,fn:o.fn,options:[a,l]}},iR=(a,l)=>{const o=eR(a);return{name:o.name,fn:o.fn,options:[a,l]}};var sR=Object.defineProperty,cR=(a,l)=>sR(a,"name",{value:l,configurable:!0});function Mc(a){const[l,o]=m.useState(void 0);return Tt(()=>{if(a){o({width:a.offsetWidth,height:a.offsetHeight});const i=new ResizeObserver(u=>{if(!Array.isArray(u)||!u.length)return;const f=u[0];let h,p;if("borderBoxSize"in f){const v=f.borderBoxSize,g=Array.isArray(v)?v[0]:v;h=g.inlineSize,p=g.blockSize}else h=a.offsetWidth,p=a.offsetHeight;o({width:h,height:p})});return i.observe(a,{box:"border-box"}),()=>i.unobserve(a)}else o(void 0)},[a]),l}cR(Mc,"useSize");var uR=Object.defineProperty,_l=(a,l)=>uR(a,"name",{value:l,configurable:!0}),wb="Popper",[jb,wo]=sn(wb),[dR,Cb]=jb(wb),fR=_l(a=>{const{__scopePopper:l,children:o}=a,[i,u]=m.useState(null),[f,h]=m.useState(void 0);return s.jsx(dR,{scope:l,anchor:i,onAnchorChange:u,placementState:f,setPlacementState:h,children:o})},"Popper"),hR="PopperAnchor",mR=m.forwardRef(_l(function(l,o){const{__scopePopper:i,virtualRef:u,...f}=l,h=Cb(hR,i),p=m.useRef(null),v=h.onAnchorChange,g=m.useCallback(j=>{p.current=j,j&&v(j)},[v]),w=Pe(o,g),S=m.useRef(null);m.useEffect(()=>{if(!u)return;const j=S.current;S.current=u.current,j!==S.current&&v(S.current)});const b=h.placementState&&_c(h.placementState),x=b==null?void 0:b[0],T=b==null?void 0:b[1];return u?null:s.jsx(Le.div,{"data-radix-popper-side":x,"data-radix-popper-align":T,...f,ref:w})},"PopperAnchor")),Eb="PopperContent",[pR,S_]=jb(Eb),vR=m.forwardRef(_l(function(l,o){var ge,De,_e,Oe,qe,yt,Ht;const{__scopePopper:i,side:u="bottom",sideOffset:f=0,align:h="center",alignOffset:p=0,arrowPadding:v=0,avoidCollisions:g=!0,collisionBoundary:w=[],collisionPadding:S=0,sticky:b="partial",hideWhenDetached:x=!1,updatePositionStrategy:T="optimized",onPlaced:j,...C}=l,R=Cb(Eb,i),[A,N]=m.useState(null),_=Pe(o,N),[P,q]=m.useState(null),z=Mc(P),U=(z==null?void 0:z.width)??0,ee=(z==null?void 0:z.height)??0,ae=u+(h!=="center"?"-"+h:""),oe=typeof S=="number"?S:{top:0,right:0,bottom:0,left:0,...S},Z=Array.isArray(w)?w:[w],ie=Z.length>0,se={padding:oe,boundary:Z.filter(Rb),altBoundary:ie},{refs:he,floatingStyles:k,placement:$,isPositioned:te,middlewareData:J}=WE({strategy:"fixed",placement:ae,whileElementsMounted:_l((...Kt)=>YE(...Kt,{animationFrame:T==="always"}),"whileElementsMounted"),elements:{reference:R.anchor},middleware:[tR({mainAxis:f+ee,alignmentAxis:p}),g&&nR({mainAxis:!0,crossAxis:!1,limiter:b==="partial"?aR():void 0,...se}),g&&lR({...se}),rR({...se,apply:_l(({elements:Kt,rects:Wn,availableWidth:jn,availableHeight:Hl})=>{const{width:nl,height:Hn}=Wn.reference,ya=Kt.floating.style;ya.setProperty("--radix-popper-available-width",`${jn}px`),ya.setProperty("--radix-popper-available-height",`${Hl}px`),ya.setProperty("--radix-popper-anchor-width",`${nl}px`),ya.setProperty("--radix-popper-anchor-height",`${Hn}px`)},"apply")}),P&&iR({element:P,padding:v}),gR({arrowWidth:U,arrowHeight:ee}),x&&oR({strategy:"referenceHidden",...se,boundary:ie?se.boundary:void 0})]}),W=R.setPlacementState;Tt(()=>(W($),()=>{W(void 0)}),[$,W]);const[M,H]=_c($),K=Un(j);Tt(()=>{te&&(K==null||K())},[te,K]);const B=(ge=J.arrow)==null?void 0:ge.x,ne=(De=J.arrow)==null?void 0:De.y,de=((_e=J.arrow)==null?void 0:_e.centerOffset)!==0,[re,ue]=m.useState();return Tt(()=>{A&&ue(window.getComputedStyle(A).zIndex)},[A]),s.jsx("div",{ref:he.setFloating,"data-radix-popper-content-wrapper":"",style:{...k,transform:te?k.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:re,"--radix-popper-transform-origin":[(Oe=J.transformOrigin)==null?void 0:Oe.x,(qe=J.transformOrigin)==null?void 0:qe.y].join(" "),...((yt=J.hide)==null?void 0:yt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:l.dir,children:s.jsx(pR,{scope:i,placedSide:M,placedAlign:H,onArrowChange:q,arrowX:B,arrowY:ne,shouldHideArrow:de,children:s.jsx(Le.div,{"data-side":M,"data-align":H,...C,ref:_,style:{...C.style,animation:te?(Ht=C.style)==null?void 0:Ht.animation:"none"}})})})},"PopperContent"));function Rb(a){return a!==null}_l(Rb,"isNotNull");var gR=_l(a=>({name:"transformOrigin",options:a,fn(l){var C,R,A;const{placement:o,rects:i,middlewareData:u}=l,h=((C=u.arrow)==null?void 0:C.centerOffset)!==0,p=h?0:a.arrowWidth,v=h?0:a.arrowHeight,[g,w]=_c(o),S={start:"0%",center:"50%",end:"100%"}[w],b=(((R=u.arrow)==null?void 0:R.x)??0)+p/2,x=(((A=u.arrow)==null?void 0:A.y)??0)+v/2;let T="",j="";return g==="bottom"?(T=h?S:`${b}px`,j=`${-v}px`):g==="top"?(T=h?S:`${b}px`,j=`${i.floating.height+v}px`):g==="right"?(T=`${-v}px`,j=h?S:`${x}px`):g==="left"&&(T=`${i.floating.width+v}px`,j=h?S:`${x}px`),{data:{x:T,y:j}}}}),"transformOrigin");function _c(a){const[l,o="center"]=a.split("-");return[l,o]}_l(_c,"getSideAndAlignFromPlacement");var Tb=fR,Nb=mR,Eh=vR,yR=Object.defineProperty,xR=(a,l)=>yR(a,"name",{value:l,configurable:!0}),Rh=m.forwardRef(xR(function(l,o){var v;const{container:i,...u}=l,[f,h]=m.useState(!1);Tt(()=>h(!0),[]);const p=i||f&&((v=globalThis==null?void 0:globalThis.document)==null?void 0:v.body);return p?go.createPortal(s.jsx(Le.div,{...u,ref:o}),p):null},"Portal")),bR=Object.defineProperty,Za=(a,l)=>bR(a,"name",{value:l,configurable:!0});function Ab(a,l){return m.useReducer((o,i)=>l[o][i]??o,a)}Za(Ab,"useStateMachine");var Wa=Za(a=>{const{present:l,children:o}=a,i=Mb(l),u=typeof o=="function"?o({present:i.isPresent}):m.Children.only(o),f=_b(i.ref,Ob(u));return typeof o=="function"||i.isPresent?m.cloneElement(u,{ref:f}):null},"Presence");function Mb(a){const[l,o]=m.useState(),i=m.useRef(null),u=m.useRef(a),f=m.useRef("none"),h=m.useRef(void 0),p=a?"mounted":"unmounted",[v,g]=Ab(p,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{v==="mounted"?(f.current=h.current??ro(i.current),h.current=void 0):f.current="none"},[v]),Tt(()=>{const w=i.current,S=u.current;if(S!==a){const x=f.current,T=ro(w);a?(h.current=T,g("MOUNT")):T==="none"||(w==null?void 0:w.display)==="none"?g("UNMOUNT"):g(S&&x!==T?"ANIMATION_OUT":"UNMOUNT"),u.current=a}},[a,g]),Tt(()=>{if(l){let w;const S=l.ownerDocument.defaultView??window,b=Za(T=>{const C=ro(i.current).includes(CSS.escape(T.animationName));if(T.target===l&&C&&(g("ANIMATION_END"),!u.current)){const R=l.style.animationFillMode;l.style.animationFillMode="forwards",w=S.setTimeout(()=>{l.style.animationFillMode==="forwards"&&(l.style.animationFillMode=R)})}},"handleAnimationEnd"),x=Za(T=>{T.target===l&&(f.current=ro(i.current))},"handleAnimationStart");return l.addEventListener("animationstart",x),l.addEventListener("animationcancel",b),l.addEventListener("animationend",b),()=>{S.clearTimeout(w),l.removeEventListener("animationstart",x),l.removeEventListener("animationcancel",b),l.removeEventListener("animationend",b)}}else g("ANIMATION_END")},[l,g]),{isPresent:["mounted","unmountSuspended"].includes(v),ref:m.useCallback(w=>{if(w){const S=getComputedStyle(w);i.current=S,h.current=ro(S)}else i.current=null;o(w)},[])}}Za(Mb,"usePresence");function Yf(a,l){if(typeof a=="function")return a(l);a!=null&&(a.current=l)}Za(Yf,"setRef");function _b(...a){const l=m.useRef(a);return l.current=a,m.useCallback(o=>{const i=l.current;let u=!1;const f=i.map(h=>{const p=Yf(h,o);return!u&&typeof p=="function"&&(u=!0),p});if(u)return()=>{for(let h=0;h<f.length;h++){const p=f[h];typeof p=="function"?p():Yf(i[h],null)}}},[])}Za(_b,"useStableComposedRefs");function ro(a){return(a==null?void 0:a.animationName)||"none"}Za(ro,"getAnimationName");function Ob(a){var i,u;let l=(i=Object.getOwnPropertyDescriptor(a.props,"ref"))==null?void 0:i.get,o=l&&"isReactWarning"in l&&l.isReactWarning;return o?a.ref:(l=(u=Object.getOwnPropertyDescriptor(a,"ref"))==null?void 0:u.get,o=l&&"isReactWarning"in l&&l.isReactWarning,o?a.props.ref:a.props.ref||a.ref)}Za(Ob,"getElementRef");var SR=Object.defineProperty,Th=(a,l)=>SR(a,"name",{value:l,configurable:!0}),wf=!1;function Db(){const[a,l]=m.useState(wf);return m.useEffect(()=>{wf||(wf=!0,l(!0))},[]),a}Th(Db,"useIsHydrated");var zb=ho[" useSyncExternalStore ".trim().toString()];function kb(){return()=>{}}Th(kb,"subscribe");function Lb(){return zb(kb,()=>!0,()=>!1)}Th(Lb,"useIsHydratedModern");var wR=typeof zb=="function"?Lb:Db,jR=Object.defineProperty,ur=(a,l)=>jR(a,"name",{value:l,configurable:!0}),jf="rovingFocusGroup.onEntryFocus",CR={bubbles:!1,cancelable:!0},Oc="RovingFocusGroup",[Gf,Ub,ER]=jc(Oc),[RR,Dc]=sn(Oc,[ER]),[TR,NR]=RR(Oc),AR=m.forwardRef(ur(function(l,o){return s.jsx(Gf.Provider,{scope:l.__scopeRovingFocusGroup,children:s.jsx(Gf.Slot,{scope:l.__scopeRovingFocusGroup,children:s.jsx(MR,{...l,ref:o})})})},"RovingFocusGroup")),MR=m.forwardRef(ur(function(l,o){const{__scopeRovingFocusGroup:i,orientation:u,loop:f=!1,dir:h,currentTabStopId:p,defaultCurrentTabStopId:v,onCurrentTabStopIdChange:g,onEntryFocus:w,preventScrollOnEntryFocus:S=!1,...b}=l,x=m.useRef(null),T=Pe(o,x),j=Mi(h),[C,R]=Xa({prop:p,defaultProp:v??null,onChange:g,caller:Oc}),[A,N]=m.useState(!1),_=Un(w),P=Ub(i),q=m.useRef(!1),[z,U]=m.useState(0);return m.useEffect(()=>{const ee=x.current;if(ee)return ee.addEventListener(jf,_),()=>ee.removeEventListener(jf,_)},[_]),s.jsx(TR,{scope:i,orientation:u,dir:j,loop:f,currentTabStopId:C,onItemFocus:m.useCallback(ee=>R(ee),[R]),onItemShiftTab:m.useCallback(()=>N(!0),[]),onFocusableItemAdd:m.useCallback(()=>U(ee=>ee+1),[]),onFocusableItemRemove:m.useCallback(()=>U(ee=>ee-1),[]),children:s.jsx(Le.div,{tabIndex:A||z===0?-1:0,"data-orientation":u,...b,ref:T,style:{outline:"none",...l.style},onMouseDown:xe(l.onMouseDown,()=>{q.current=!0}),onFocus:xe(l.onFocus,ee=>{const ae=!q.current;if(ee.target===ee.currentTarget&&ae&&!A){const oe=new CustomEvent(jf,CR);if(ee.currentTarget.dispatchEvent(oe),!oe.defaultPrevented){const Z=P().filter($=>$.focusable),ie=Z.find($=>$.active),se=Z.find($=>$.id===C),k=[ie,se,...Z].filter(Boolean).map($=>$.ref.current);Nh(k,S)}}q.current=!1}),onBlur:xe(l.onBlur,()=>N(!1))})})},"RovingFocusGroupImpl")),_R="RovingFocusGroupItem",OR=m.forwardRef(ur(function(l,o){const{__scopeRovingFocusGroup:i,focusable:u=!0,active:f=!1,tabStopId:h,children:p,...v}=l,g=ca(),w=h||g,S=NR(_R,i),b=S.currentTabStopId===w,x=Ub(i),{onFocusableItemAdd:T,onFocusableItemRemove:j,currentTabStopId:C}=S,R=wR();return Tt(()=>{if(!(!R||!u))return T(),()=>j()},[R,u,T,j]),m.useEffect(()=>{if(!(R||!u))return T(),()=>j()},[R,u,T,j]),s.jsx(Gf.ItemSlot,{scope:i,id:w,focusable:u,active:f,children:s.jsx(Le.span,{tabIndex:b?0:-1,"data-orientation":S.orientation,...v,ref:o,onMouseDown:xe(l.onMouseDown,A=>{u?S.onItemFocus(w):A.preventDefault()}),onFocus:xe(l.onFocus,()=>S.onItemFocus(w)),onKeyDown:xe(l.onKeyDown,A=>{if(A.key==="Tab"&&A.shiftKey){S.onItemShiftTab();return}if(A.target!==A.currentTarget)return;const N=Bb(A,S.orientation,S.dir);if(N!==void 0){if(A.metaKey||A.ctrlKey||A.altKey||A.shiftKey)return;A.preventDefault();let P=x().filter(q=>q.focusable).map(q=>q.ref.current);if(N==="last")P.reverse();else if(N==="prev"||N==="next"){N==="prev"&&P.reverse();const q=P.indexOf(A.currentTarget);P=S.loop?Pb(P,q+1):P.slice(q+1)}setTimeout(()=>Nh(P))}}),children:typeof p=="function"?p({isCurrentTabStop:b,hasTabStop:C!=null}):p})})},"RovingFocusGroupItem")),DR={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Hb(a,l){return l!=="rtl"?a:a==="ArrowLeft"?"ArrowRight":a==="ArrowRight"?"ArrowLeft":a}ur(Hb,"getDirectionAwareKey");function Bb(a,l,o){const i=Hb(a.key,o);if(!(l==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(l==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return DR[i]}ur(Bb,"getFocusIntent");function Nh(a,l=!1){const o=document.activeElement;for(const i of a)if(i===o||(i.focus({preventScroll:l}),document.activeElement!==o))return}ur(Nh,"focusFirst");function Pb(a,l){return a.map((o,i)=>a[(l+i)%a.length])}ur(Pb,"wrapArray");var qb=AR,Vb=OR,zR=function(a){if(typeof document>"u")return null;var l=Array.isArray(a)?a[0]:a;return l.ownerDocument.body},no=new WeakMap,Ws=new WeakMap,ec={},Cf=0,Yb=function(a){return a&&(a.host||Yb(a.parentNode))},kR=function(a,l){return l.map(function(o){if(a.contains(o))return o;var i=Yb(o);return i&&a.contains(i)?i:(console.error("aria-hidden",o,"in not contained inside",a,". Doing nothing"),null)}).filter(function(o){return!!o})},LR=function(a,l,o,i){var u=kR(l,Array.isArray(a)?a:[a]);ec[o]||(ec[o]=new WeakMap);var f=ec[o],h=[],p=new Set,v=new Set(u),g=function(S){!S||p.has(S)||(p.add(S),g(S.parentNode))};u.forEach(g);var w=function(S){!S||v.has(S)||Array.prototype.forEach.call(S.children,function(b){if(p.has(b))w(b);else try{var x=b.getAttribute(i),T=x!==null&&x!=="false",j=(no.get(b)||0)+1,C=(f.get(b)||0)+1;no.set(b,j),f.set(b,C),h.push(b),j===1&&T&&Ws.set(b,!0),C===1&&b.setAttribute(o,"true"),T||b.setAttribute(i,"true")}catch(R){console.error("aria-hidden: cannot operate on ",b,R)}})};return w(l),p.clear(),Cf++,function(){h.forEach(function(S){var b=no.get(S)-1,x=f.get(S)-1;no.set(S,b),f.set(S,x),b||(Ws.has(S)||S.removeAttribute(i),Ws.delete(S)),x||S.removeAttribute(o)}),Cf--,Cf||(no=new WeakMap,no=new WeakMap,Ws=new WeakMap,ec={})}},Ah=function(a,l,o){o===void 0&&(o="data-aria-hidden");var i=Array.from(Array.isArray(a)?a:[a]),u=zR(a);return u?(i.push.apply(i,Array.from(u.querySelectorAll("[aria-live], script"))),LR(i,u,o,"aria-hidden")):function(){return null}},ia=function(){return ia=Object.assign||function(l){for(var o,i=1,u=arguments.length;i<u;i++){o=arguments[i];for(var f in o)Object.prototype.hasOwnProperty.call(o,f)&&(l[f]=o[f])}return l},ia.apply(this,arguments)};function Gb(a,l){var o={};for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&l.indexOf(i)<0&&(o[i]=a[i]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function")for(var u=0,i=Object.getOwnPropertySymbols(a);u<i.length;u++)l.indexOf(i[u])<0&&Object.prototype.propertyIsEnumerable.call(a,i[u])&&(o[i[u]]=a[i[u]]);return o}function UR(a,l,o){if(o||arguments.length===2)for(var i=0,u=l.length,f;i<u;i++)(f||!(i in l))&&(f||(f=Array.prototype.slice.call(l,0,i)),f[i]=l[i]);return a.concat(f||Array.prototype.slice.call(l))}var cc="right-scroll-bar-position",uc="width-before-scroll-bar",HR="with-scroll-bars-hidden",BR="--removed-body-scroll-bar-size";function Ef(a,l){return typeof a=="function"?a(l):a&&(a.current=l),a}function PR(a,l){var o=m.useState(function(){return{value:a,callback:l,facade:{get current(){return o.value},set current(i){var u=o.value;u!==i&&(o.value=i,o.callback(i,u))}}}})[0];return o.callback=l,o.facade}var qR=typeof window<"u"?m.useLayoutEffect:m.useEffect,qy=new WeakMap;function VR(a,l){var o=PR(null,function(i){return a.forEach(function(u){return Ef(u,i)})});return qR(function(){var i=qy.get(o);if(i){var u=new Set(i),f=new Set(a),h=o.current;u.forEach(function(p){f.has(p)||Ef(p,null)}),f.forEach(function(p){u.has(p)||Ef(p,h)})}qy.set(o,a)},[a]),o}function YR(a){return a}function GR(a,l){l===void 0&&(l=YR);var o=[],i=!1,u={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return o.length?o[o.length-1]:a},useMedium:function(f){var h=l(f,i);return o.push(h),function(){o=o.filter(function(p){return p!==h})}},assignSyncMedium:function(f){for(i=!0;o.length;){var h=o;o=[],h.forEach(f)}o={push:function(p){return f(p)},filter:function(){return o}}},assignMedium:function(f){i=!0;var h=[];if(o.length){var p=o;o=[],p.forEach(f),h=o}var v=function(){var w=h;h=[],w.forEach(f)},g=function(){return Promise.resolve().then(v)};g(),o={push:function(w){h.push(w),g()},filter:function(w){return h=h.filter(w),o}}}};return u}function IR(a){a===void 0&&(a={});var l=GR(null);return l.options=ia({async:!0,ssr:!1},a),l}var Ib=function(a){var l=a.sideCar,o=Gb(a,["sideCar"]);if(!l)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=l.read();if(!i)throw new Error("Sidecar medium not found");return m.createElement(i,ia({},o))};Ib.isSideCarExport=!0;function $R(a,l){return a.useMedium(l),Ib}var $b=IR(),Rf=function(){},zc=m.forwardRef(function(a,l){var o=m.useRef(null),i=m.useState({onScrollCapture:Rf,onWheelCapture:Rf,onTouchMoveCapture:Rf}),u=i[0],f=i[1],h=a.forwardProps,p=a.children,v=a.className,g=a.removeScrollBar,w=a.enabled,S=a.shards,b=a.sideCar,x=a.noRelative,T=a.noIsolation,j=a.inert,C=a.allowPinchZoom,R=a.as,A=R===void 0?"div":R,N=a.gapMode,_=Gb(a,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=b,q=VR([o,l]),z=ia(ia({},_),u);return m.createElement(m.Fragment,null,w&&m.createElement(P,{sideCar:$b,removeScrollBar:g,shards:S,noRelative:x,noIsolation:T,inert:j,setCallbacks:f,allowPinchZoom:!!C,lockRef:o,gapMode:N}),h?m.cloneElement(m.Children.only(p),ia(ia({},z),{ref:q})):m.createElement(A,ia({},z,{className:v,ref:q}),p))});zc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};zc.classNames={fullWidth:uc,zeroRight:cc};var KR=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function XR(){if(!document)return null;var a=document.createElement("style");a.type="text/css";var l=KR();return l&&a.setAttribute("nonce",l),a}function QR(a,l){a.styleSheet?a.styleSheet.cssText=l:a.appendChild(document.createTextNode(l))}function ZR(a){var l=document.head||document.getElementsByTagName("head")[0];l.appendChild(a)}var FR=function(){var a=0,l=null;return{add:function(o){a==0&&(l=XR())&&(QR(l,o),ZR(l)),a++},remove:function(){a--,!a&&l&&(l.parentNode&&l.parentNode.removeChild(l),l=null)}}},JR=function(){var a=FR();return function(l,o){m.useEffect(function(){return a.add(l),function(){a.remove()}},[l&&o])}},Kb=function(){var a=JR(),l=function(o){var i=o.styles,u=o.dynamic;return a(i,u),null};return l},WR={left:0,top:0,right:0,gap:0},Tf=function(a){return parseInt(a||"",10)||0},eT=function(a){var l=window.getComputedStyle(document.body),o=l[a==="padding"?"paddingLeft":"marginLeft"],i=l[a==="padding"?"paddingTop":"marginTop"],u=l[a==="padding"?"paddingRight":"marginRight"];return[Tf(o),Tf(i),Tf(u)]},tT=function(a){if(a===void 0&&(a="margin"),typeof window>"u")return WR;var l=eT(a),o=document.documentElement.clientWidth,i=window.innerWidth;return{left:l[0],top:l[1],right:l[2],gap:Math.max(0,i-o+l[2]-l[0])}},nT=Kb(),uo="data-scroll-locked",aT=function(a,l,o,i){var u=a.left,f=a.top,h=a.right,p=a.gap;return o===void 0&&(o="margin"),`
211
+ .`.concat(HR,` {
212
+ overflow: hidden `).concat(i,`;
213
+ padding-right: `).concat(p,"px ").concat(i,`;
214
+ }
215
+ body[`).concat(uo,`] {
216
+ overflow: hidden `).concat(i,`;
217
+ overscroll-behavior: contain;
218
+ `).concat([l&&"position: relative ".concat(i,";"),o==="margin"&&`
219
+ padding-left: `.concat(u,`px;
220
+ padding-top: `).concat(f,`px;
221
+ padding-right: `).concat(h,`px;
222
+ margin-left:0;
223
+ margin-top:0;
224
+ margin-right: `).concat(p,"px ").concat(i,`;
225
+ `),o==="padding"&&"padding-right: ".concat(p,"px ").concat(i,";")].filter(Boolean).join(""),`
226
+ }
227
+
228
+ .`).concat(cc,` {
229
+ right: `).concat(p,"px ").concat(i,`;
230
+ }
231
+
232
+ .`).concat(uc,` {
233
+ margin-right: `).concat(p,"px ").concat(i,`;
234
+ }
235
+
236
+ .`).concat(cc," .").concat(cc,` {
237
+ right: 0 `).concat(i,`;
238
+ }
239
+
240
+ .`).concat(uc," .").concat(uc,` {
241
+ margin-right: 0 `).concat(i,`;
242
+ }
243
+
244
+ body[`).concat(uo,`] {
245
+ `).concat(BR,": ").concat(p,`px;
246
+ }
247
+ `)},Vy=function(){var a=parseInt(document.body.getAttribute(uo)||"0",10);return isFinite(a)?a:0},lT=function(){m.useEffect(function(){return document.body.setAttribute(uo,(Vy()+1).toString()),function(){var a=Vy()-1;a<=0?document.body.removeAttribute(uo):document.body.setAttribute(uo,a.toString())}},[])},rT=function(a){var l=a.noRelative,o=a.noImportant,i=a.gapMode,u=i===void 0?"margin":i;lT();var f=m.useMemo(function(){return tT(u)},[u]);return m.createElement(nT,{styles:aT(f,!l,u,o?"":"!important")})},If=!1;if(typeof window<"u")try{var tc=Object.defineProperty({},"passive",{get:function(){return If=!0,!0}});window.addEventListener("test",tc,tc),window.removeEventListener("test",tc,tc)}catch{If=!1}var ao=If?{passive:!1}:!1,oT=function(a){return a.tagName==="TEXTAREA"},Xb=function(a,l){if(!(a instanceof Element))return!1;var o=window.getComputedStyle(a);return o[l]!=="hidden"&&!(o.overflowY===o.overflowX&&!oT(a)&&o[l]==="visible")},iT=function(a){return Xb(a,"overflowY")},sT=function(a){return Xb(a,"overflowX")},Yy=function(a,l){var o=l.ownerDocument,i=l;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var u=Qb(a,i);if(u){var f=Zb(a,i),h=f[1],p=f[2];if(h>p)return!0}i=i.parentNode}while(i&&i!==o.body);return!1},cT=function(a){var l=a.scrollTop,o=a.scrollHeight,i=a.clientHeight;return[l,o,i]},uT=function(a){var l=a.scrollLeft,o=a.scrollWidth,i=a.clientWidth;return[l,o,i]},Qb=function(a,l){return a==="v"?iT(l):sT(l)},Zb=function(a,l){return a==="v"?cT(l):uT(l)},dT=function(a,l){return a==="h"&&l==="rtl"?-1:1},fT=function(a,l,o,i,u){var f=dT(a,window.getComputedStyle(l).direction),h=f*i,p=o.target,v=l.contains(p),g=!1,w=h>0,S=0,b=0;do{if(!p)break;var x=Zb(a,p),T=x[0],j=x[1],C=x[2],R=j-C-f*T;(T||R)&&Qb(a,p)&&(S+=R,b+=T);var A=p.parentNode;p=A&&A.nodeType===Node.DOCUMENT_FRAGMENT_NODE?A.host:A}while(!v&&p!==document.body||v&&(l.contains(p)||l===p));return(w&&Math.abs(S)<1||!w&&Math.abs(b)<1)&&(g=!0),g},nc=function(a){return"changedTouches"in a?[a.changedTouches[0].clientX,a.changedTouches[0].clientY]:[0,0]},Gy=function(a){return[a.deltaX,a.deltaY]},Iy=function(a){return a&&"current"in a?a.current:a},hT=function(a,l){return a[0]===l[0]&&a[1]===l[1]},mT=function(a){return`
248
+ .block-interactivity-`.concat(a,` {pointer-events: none;}
249
+ .allow-interactivity-`).concat(a,` {pointer-events: all;}
250
+ `)},pT=0,lo=[];function vT(a){var l=m.useRef([]),o=m.useRef([0,0]),i=m.useRef(),u=m.useState(pT++)[0],f=m.useState(Kb)[0],h=m.useRef(a);m.useEffect(function(){h.current=a},[a]),m.useEffect(function(){if(a.inert){document.body.classList.add("block-interactivity-".concat(u));var j=UR([a.lockRef.current],(a.shards||[]).map(Iy),!0).filter(Boolean);return j.forEach(function(C){return C.classList.add("allow-interactivity-".concat(u))}),function(){document.body.classList.remove("block-interactivity-".concat(u)),j.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(u))})}}},[a.inert,a.lockRef.current,a.shards]);var p=m.useCallback(function(j,C){if("touches"in j&&j.touches.length===2||j.type==="wheel"&&j.ctrlKey)return!h.current.allowPinchZoom;var R=nc(j),A=o.current,N="deltaX"in j?j.deltaX:A[0]-R[0],_="deltaY"in j?j.deltaY:A[1]-R[1],P,q=j.target,z=Math.abs(N)>Math.abs(_)?"h":"v";if("touches"in j&&z==="h"&&q.type==="range")return!1;var U=window.getSelection(),ee=U&&U.anchorNode,ae=ee?ee===q||ee.contains(q):!1;if(ae)return!1;var oe=Yy(z,q);if(!oe)return!0;if(oe?P=z:(P=z==="v"?"h":"v",oe=Yy(z,q)),!oe)return!1;if(!i.current&&"changedTouches"in j&&(N||_)&&(i.current=P),!P)return!0;var Z=i.current||P;return fT(Z,C,j,Z==="h"?N:_)},[]),v=m.useCallback(function(j){var C=j;if(!(!lo.length||lo[lo.length-1]!==f)){var R="deltaY"in C?Gy(C):nc(C),A=l.current.filter(function(P){return P.name===C.type&&(P.target===C.target||C.target===P.shadowParent)&&hT(P.delta,R)})[0];if(A&&A.should){C.cancelable&&C.preventDefault();return}if(!A){var N=(h.current.shards||[]).map(Iy).filter(Boolean).filter(function(P){return P.contains(C.target)}),_=N.length>0?p(C,N[0]):!h.current.noIsolation;_&&C.cancelable&&C.preventDefault()}}},[]),g=m.useCallback(function(j,C,R,A){var N={name:j,delta:C,target:R,should:A,shadowParent:gT(R)};l.current.push(N),setTimeout(function(){l.current=l.current.filter(function(_){return _!==N})},1)},[]),w=m.useCallback(function(j){o.current=nc(j),i.current=void 0},[]),S=m.useCallback(function(j){g(j.type,Gy(j),j.target,p(j,a.lockRef.current))},[]),b=m.useCallback(function(j){g(j.type,nc(j),j.target,p(j,a.lockRef.current))},[]);m.useEffect(function(){return lo.push(f),a.setCallbacks({onScrollCapture:S,onWheelCapture:S,onTouchMoveCapture:b}),document.addEventListener("wheel",v,ao),document.addEventListener("touchmove",v,ao),document.addEventListener("touchstart",w,ao),function(){lo=lo.filter(function(j){return j!==f}),document.removeEventListener("wheel",v,ao),document.removeEventListener("touchmove",v,ao),document.removeEventListener("touchstart",w,ao)}},[]);var x=a.removeScrollBar,T=a.inert;return m.createElement(m.Fragment,null,T?m.createElement(f,{styles:mT(u)}):null,x?m.createElement(rT,{noRelative:a.noRelative,gapMode:a.gapMode}):null)}function gT(a){for(var l=null;a!==null;)a instanceof ShadowRoot&&(l=a.host,a=a.host),a=a.parentNode;return l}const yT=$R($b,vT);var kc=m.forwardRef(function(a,l){return m.createElement(zc,ia({},a,{ref:l,sideCar:yT}))});kc.classNames=zc.classNames;var xT=Object.defineProperty,ot=(a,l)=>xT(a,"name",{value:l,configurable:!0}),bT=["Enter"," "],ST=["ArrowDown","PageUp","Home"],Fb=["ArrowUp","PageDown","End"],wT=[...ST,...Fb],Lc="Menu",[$f,jT,CT]=jc(Lc),[dr,Jb]=sn(Lc,[CT,wo,Dc]),Mh=wo(),Wb=Dc(),[ET,Oi]=dr(Lc),[RT,_h]=dr(Lc),TT=ot(a=>{const{__scopeMenu:l,open:o=!1,children:i,dir:u,onOpenChange:f,modal:h=!0}=a,p=Mh(l),[v,g]=m.useState(null),w=m.useRef(!1),S=Un(f),b=Mi(u);return m.useEffect(()=>{const x=ot(()=>{w.current=!0,document.addEventListener("pointerdown",T,{capture:!0,once:!0}),document.addEventListener("pointermove",T,{capture:!0,once:!0})},"handleKeyDown"),T=ot(()=>w.current=!1,"handlePointer");return document.addEventListener("keydown",x,{capture:!0}),()=>{document.removeEventListener("keydown",x,{capture:!0}),document.removeEventListener("pointerdown",T,{capture:!0}),document.removeEventListener("pointermove",T,{capture:!0})}},[]),m.useEffect(()=>{if(!o)return;const x=ot(()=>S(!1),"handleBlur");return window.addEventListener("blur",x),()=>window.removeEventListener("blur",x)},[o,S]),s.jsx(Tb,{...p,children:s.jsx(ET,{scope:l,open:o,onOpenChange:S,content:v,onContentChange:g,children:s.jsx(RT,{scope:l,onClose:m.useCallback(()=>S(!1),[S]),isUsingKeyboardRef:w,dir:b,modal:h,children:i})})})},"Menu"),NT=m.forwardRef(ot(function(l,o){const{__scopeMenu:i,...u}=l,f=Mh(i);return s.jsx(Nb,{...f,...u,ref:o})},"MenuAnchor")),e0="MenuPortal",[AT,MT]=dr(e0,{forceMount:void 0}),_T=ot(a=>{const{__scopeMenu:l,forceMount:o,children:i,container:u}=a,f=Oi(e0,l);return s.jsx(AT,{scope:l,forceMount:o,children:s.jsx(Wa,{present:o||f.open,children:s.jsx(Rh,{asChild:!0,container:u,children:i})})})},"MenuPortal"),Ol="MenuContent",[OT,t0]=dr(Ol),DT=m.forwardRef(ot(function(l,o){const i=MT(Ol,l.__scopeMenu),{forceMount:u=i.forceMount,...f}=l,h=Oi(Ol,l.__scopeMenu),p=_h(Ol,l.__scopeMenu);return s.jsx($f.Provider,{scope:l.__scopeMenu,children:s.jsx(Wa,{present:u||h.open,children:s.jsx($f.Slot,{scope:l.__scopeMenu,children:p.modal?s.jsx(zT,{...f,ref:o}):s.jsx(kT,{...f,ref:o})})})})},"MenuContent")),zT=m.forwardRef(ot(function(l,o){const i=Oi(Ol,l.__scopeMenu),u=m.useRef(null),f=Pe(o,u);return m.useEffect(()=>{const h=u.current;if(h)return Ah(h)},[]),s.jsx(n0,{...l,ref:f,trapFocus:i.open,disableOutsidePointerEvents:i.open,disableOutsideScroll:!0,onFocusOutside:xe(l.onFocusOutside,h=>h.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>i.onOpenChange(!1)})},"MenuRootContentModal")),kT=m.forwardRef(ot(function(l,o){const i=Oi(Ol,l.__scopeMenu);return s.jsx(n0,{...l,ref:o,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>i.onOpenChange(!1)})},"MenuRootContentNonModal")),LT=ha("MenuContent.ScrollLock"),n0=m.forwardRef(ot(function(l,o){const{__scopeMenu:i,loop:u=!1,trapFocus:f,onOpenAutoFocus:h,onCloseAutoFocus:p,disableOutsidePointerEvents:v,onEntryFocus:g,onEscapeKeyDown:w,onPointerDownOutside:S,onFocusOutside:b,onInteractOutside:x,onDismiss:T,disableOutsideScroll:j,...C}=l,R=Oi(Ol,i),A=_h(Ol,i),N=Mh(i),_=Wb(i),P=jT(i),[q,z]=m.useState(null),U=m.useRef(null),ee=Pe(o,U,R.onContentChange),ae=m.useRef(0),oe=m.useRef(""),Z=m.useRef(0),ie=m.useRef(null),se=m.useRef("right"),he=m.useRef(0),k=j?kc:m.Fragment,$=j?{as:LT,allowPinchZoom:!0}:void 0,te=ot(W=>{var ue,ge;const M=oe.current+W,H=P().filter(De=>!De.disabled),K=document.activeElement,B=(ue=H.find(De=>De.ref.current===K))==null?void 0:ue.textValue,ne=H.map(De=>De.textValue),de=i0(ne,M,B),re=(ge=H.find(De=>De.textValue===de))==null?void 0:ge.ref.current;ot((function De(_e){oe.current=_e,window.clearTimeout(ae.current),_e!==""&&(ae.current=window.setTimeout(()=>De(""),1e3))}),"updateSearch")(M),re&&setTimeout(()=>re.focus())},"handleTypeaheadSearch");m.useEffect(()=>()=>window.clearTimeout(ae.current),[]),_i();const J=m.useCallback(W=>{var H,K;return se.current===((H=ie.current)==null?void 0:H.side)&&c0(W,(K=ie.current)==null?void 0:K.area)},[]);return s.jsx(OT,{scope:i,searchRef:oe,onItemEnter:m.useCallback(W=>{J(W)&&W.preventDefault()},[J]),onItemLeave:m.useCallback(W=>{var M;J(W)||((M=U.current)==null||M.focus(),z(null))},[J]),onTriggerLeave:m.useCallback(W=>{J(W)&&W.preventDefault()},[J]),pointerGraceTimerRef:Z,onPointerGraceIntentChange:m.useCallback(W=>{ie.current=W},[]),children:s.jsx(k,{...$,children:s.jsx(gh,{asChild:!0,trapped:f,onMountAutoFocus:xe(h,W=>{var M;W.preventDefault(),(M=U.current)==null||M.focus({preventScroll:!0})}),onUnmountAutoFocus:p,children:s.jsx(Cc,{asChild:!0,disableOutsidePointerEvents:v,onEscapeKeyDown:w,onPointerDownOutside:S,onFocusOutside:b,onInteractOutside:x,onDismiss:T,children:s.jsx(qb,{asChild:!0,..._,dir:A.dir,orientation:"vertical",loop:u,currentTabStopId:q,onCurrentTabStopIdChange:z,onEntryFocus:xe(g,W=>{A.isUsingKeyboardRef.current||W.preventDefault()}),preventScrollOnEntryFocus:!0,children:s.jsx(Eh,{role:"menu","aria-orientation":"vertical","data-state":a0(R.open),"data-radix-menu-content":"",dir:A.dir,...N,...C,ref:ee,style:{outline:"none",...C.style},onKeyDown:xe(C.onKeyDown,W=>{const H=W.target.closest("[data-radix-menu-content]")===W.currentTarget,K=W.ctrlKey||W.altKey||W.metaKey,B=W.key.length===1;H&&(W.key==="Tab"&&W.preventDefault(),!K&&B&&te(W.key));const ne=U.current;if(W.target!==ne||!wT.includes(W.key))return;W.preventDefault();const re=P().filter(ue=>!ue.disabled).map(ue=>ue.ref.current);Fb.includes(W.key)&&re.reverse(),r0(re)}),onBlur:xe(l.onBlur,W=>{W.currentTarget.contains(W.target)||(window.clearTimeout(ae.current),oe.current="")}),onPointerMove:xe(l.onPointerMove,gc(W=>{const M=W.target,H=he.current!==W.clientX;if(W.currentTarget.contains(M)&&H){const K=W.clientX>he.current?"right":"left";se.current=K,he.current=W.clientX}}))})})})})})})},"MenuContentImpl")),UT=m.forwardRef(ot(function(l,o){const{__scopeMenu:i,...u}=l;return s.jsx(Le.div,{...u,ref:o})},"MenuLabel")),Kf="MenuItem",$y="menu.itemSelect",HT=m.forwardRef(ot(function(l,o){const{disabled:i=!1,onSelect:u,...f}=l,h=m.useRef(null),p=_h(Kf,l.__scopeMenu),v=t0(Kf,l.__scopeMenu),g=Pe(o,h),w=m.useRef(!1),S=ot(()=>{const b=h.current;if(!i&&b){const x=new CustomEvent($y,{bubbles:!0,cancelable:!0});b.addEventListener($y,T=>u==null?void 0:u(T),{once:!0}),hh(b,x),x.defaultPrevented?w.current=!1:p.onClose()}},"handleSelect");return s.jsx(BT,{...f,ref:g,disabled:i,onClick:xe(l.onClick,S),onPointerDown:b=>{var x;(x=l.onPointerDown)==null||x.call(l,b),w.current=!0},onPointerUp:xe(l.onPointerUp,b=>{var x;w.current||(x=b.currentTarget)==null||x.click()}),onKeyDown:xe(l.onKeyDown,b=>{i||b.target!==b.currentTarget||v.searchRef.current!==""&&b.key===" "||bT.includes(b.key)&&(b.currentTarget.click(),b.preventDefault())})})},"MenuItem")),BT=m.forwardRef(ot(function(l,o){const{__scopeMenu:i,disabled:u=!1,textValue:f,...h}=l,p=t0(Kf,i),v=Wb(i),g=m.useRef(null),w=Pe(o,g),[S,b]=m.useState(!1),[x,T]=m.useState("");return m.useEffect(()=>{const j=g.current;j&&T((j.textContent??"").trim())},[h.children]),s.jsx($f.ItemSlot,{scope:i,disabled:u,textValue:f??x,children:s.jsx(Vb,{asChild:!0,...v,focusable:!u,children:s.jsx(Le.div,{role:"menuitem","data-highlighted":S?"":void 0,"aria-disabled":u||void 0,"data-disabled":u?"":void 0,...h,ref:w,onPointerMove:xe(l.onPointerMove,gc(j=>{u?p.onItemLeave(j):(p.onItemEnter(j),j.defaultPrevented||j.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:xe(l.onPointerLeave,gc(j=>p.onItemLeave(j))),onFocus:xe(l.onFocus,()=>b(!0)),onBlur:xe(l.onBlur,()=>b(!1))})})})},"MenuItemImpl")),PT="MenuRadioGroup",[w_,j_]=dr(PT,{value:void 0,onValueChange:ot(()=>{},"onValueChange")}),qT="MenuItemIndicator",[C_,E_]=dr(qT,{checked:!1}),VT=m.forwardRef(ot(function(l,o){const{__scopeMenu:i,...u}=l;return s.jsx(Le.div,{role:"separator","aria-orientation":"horizontal",...u,ref:o})},"MenuSeparator")),YT="MenuSub",[R_,T_]=dr(YT);function a0(a){return a?"open":"closed"}ot(a0,"getOpenState");function l0(a){return a==="indeterminate"}ot(l0,"isIndeterminate");function GT(a){return l0(a)?"indeterminate":a?"checked":"unchecked"}ot(GT,"getCheckedState");function r0(a){const l=document.activeElement;for(const o of a)if(o===l||(o.focus(),document.activeElement!==l))return}ot(r0,"focusFirst");function o0(a,l){return a.map((o,i)=>a[(l+i)%a.length])}ot(o0,"wrapArray");function i0(a,l,o){const u=l.length>1&&Array.from(l).every(g=>g===l[0])?l[0]:l,f=o?a.indexOf(o):-1;let h=o0(a,Math.max(f,0));u.length===1&&(h=h.filter(g=>g!==o));const v=h.find(g=>g.toLowerCase().startsWith(u.toLowerCase()));return v!==o?v:void 0}ot(i0,"getNextMatch");function s0(a,l){const{x:o,y:i}=a;let u=!1;for(let f=0,h=l.length-1;f<l.length;h=f++){const p=l[f],v=l[h],g=p.x,w=p.y,S=v.x,b=v.y;w>i!=b>i&&o<(S-g)*(i-w)/(b-w)+g&&(u=!u)}return u}ot(s0,"isPointInPolygon");function c0(a,l){if(!l)return!1;const o={x:a.clientX,y:a.clientY};return s0(o,l)}ot(c0,"isPointerInGraceArea");function gc(a){return l=>l.pointerType==="mouse"?a(l):void 0}ot(gc,"whenMouse");var IT=TT,$T=NT,KT=_T,XT=DT,QT=UT,ZT=HT,FT=VT,JT=Object.defineProperty,fr=(a,l)=>JT(a,"name",{value:l,configurable:!0}),Oh="DropdownMenu",[WT,N_]=sn(Oh,[Jb]),hr=Jb(),[eN,u0]=WT(Oh),tN=fr(a=>{const{__scopeDropdownMenu:l,children:o,dir:i,open:u,defaultOpen:f,onOpenChange:h,modal:p=!0}=a,v=hr(l),g=m.useRef(null),[w,S]=Xa({prop:u,defaultProp:f??!1,onChange:h,caller:Oh});return s.jsx(eN,{scope:l,triggerId:ca(),triggerRef:g,contentId:ca(),open:w,onOpenChange:S,onOpenToggle:m.useCallback(()=>S(b=>!b),[S]),modal:p,children:s.jsx(IT,{...v,open:w,onOpenChange:S,dir:i,modal:p,children:o})})},"DropdownMenu"),nN="DropdownMenuTrigger",aN=m.forwardRef(fr(function(l,o){const{__scopeDropdownMenu:i,disabled:u=!1,...f}=l,h=u0(nN,i),p=hr(i),v=Pe(o,h.triggerRef);return s.jsx($T,{asChild:!0,...p,children:s.jsx(Le.button,{type:"button",id:h.triggerId,"aria-haspopup":"menu","aria-expanded":h.open,"aria-controls":h.open?h.contentId:void 0,"data-state":h.open?"open":"closed","data-disabled":u?"":void 0,disabled:u,...f,ref:v,onPointerDown:xe(l.onPointerDown,g=>{!u&&g.button===0&&g.ctrlKey===!1&&(h.onOpenToggle(),h.open||g.preventDefault())}),onKeyDown:xe(l.onKeyDown,g=>{u||(["Enter"," "].includes(g.key)&&h.onOpenToggle(),g.key==="ArrowDown"&&h.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(g.key)&&g.preventDefault())})})})},"DropdownMenuTrigger")),lN=fr(a=>{const{__scopeDropdownMenu:l,...o}=a,i=hr(l);return s.jsx(KT,{...i,...o})},"DropdownMenuPortal"),rN="DropdownMenuContent",oN=m.forwardRef(fr(function(l,o){const{__scopeDropdownMenu:i,...u}=l,f=u0(rN,i),h=hr(i),p=m.useRef(!1);return s.jsx(XT,{id:f.contentId,"aria-labelledby":f.triggerId,...h,...u,ref:o,onCloseAutoFocus:xe(l.onCloseAutoFocus,v=>{var g;p.current||(g=f.triggerRef.current)==null||g.focus(),p.current=!1,v.preventDefault()}),onInteractOutside:xe(l.onInteractOutside,v=>{const g=v.detail.originalEvent,w=g.button===0&&g.ctrlKey===!0,S=g.button===2||w;(!f.modal||S)&&(p.current=!0)}),style:{...l.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuContent")),iN=m.forwardRef(fr(function(l,o){const{__scopeDropdownMenu:i,...u}=l,f=hr(i);return s.jsx(QT,{...f,...u,ref:o})},"DropdownMenuLabel")),sN=m.forwardRef(fr(function(l,o){const{__scopeDropdownMenu:i,...u}=l,f=hr(i);return s.jsx(ZT,{...f,...u,ref:o})},"DropdownMenuItem")),cN=m.forwardRef(fr(function(l,o){const{__scopeDropdownMenu:i,...u}=l,f=hr(i);return s.jsx(FT,{...f,...u,ref:o})},"DropdownMenuSeparator")),uN=tN,dN=aN,fN=lN,d0=oN,f0=iN,h0=sN,m0=cN;const hN=uN,mN=dN,p0=m.forwardRef(({className:a,sideOffset:l=4,...o},i)=>s.jsx(fN,{children:s.jsx(d0,{ref:i,sideOffset:l,className:Ee("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",a),...o})}));p0.displayName=d0.displayName;const v0=m.forwardRef(({className:a,inset:l,...o},i)=>s.jsx(h0,{ref:i,className:Ee("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",l&&"pl-8",a),...o}));v0.displayName=h0.displayName;const pN=m.forwardRef(({className:a,...l},o)=>s.jsx(f0,{ref:o,className:Ee("px-2 py-1.5 text-sm font-semibold",a),...l}));pN.displayName=f0.displayName;const vN=m.forwardRef(({className:a,...l},o)=>s.jsx(m0,{ref:o,className:Ee("-mx-1 my-1 h-px bg-muted",a),...l}));vN.displayName=m0.displayName;function gN(){const{theme:a,setTheme:l}=R2(),{user:o,logout:i}=ch(),[u,f]=m.useState(!1),h=a==="light"?DC:a==="dark"?AC:NC;return s.jsxs("header",{className:"flex h-14 items-center justify-between border-b bg-background px-4",children:[s.jsx("div",{className:"text-sm text-muted-foreground",children:"Admin"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ve,{variant:"ghost",size:"icon",onClick:()=>l(a==="dark"?"light":"dark"),children:s.jsx(h,{className:"h-4 w-4"})}),s.jsxs(hN,{open:u,onOpenChange:f,children:[s.jsx(mN,{asChild:!0,children:s.jsx(ve,{variant:"ghost",children:(o==null?void 0:o.username)??"admin"})}),s.jsx(p0,{align:"end",children:s.jsxs(v0,{onClick:()=>void i(),children:[s.jsx(TC,{className:"mr-2 h-4 w-4"})," Sign out"]})})]})]})]})}const Me=m.forwardRef(({className:a,type:l,...o},i)=>s.jsx("input",{type:l,className:Ee("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",a),ref:i,...o}));Me.displayName="Input";var yN=Object.defineProperty,xN=(a,l)=>yN(a,"name",{value:l,configurable:!0}),bN=m.forwardRef(xN(function(l,o){return s.jsx(Le.label,{...l,ref:o,onMouseDown:i=>{var f;i.target.closest("button, input, select, textarea")||((f=l.onMouseDown)==null||f.call(l,i),!i.defaultPrevented&&i.detail>1&&i.preventDefault())}})},"Label")),g0=bN;const Se=m.forwardRef(({className:a,...l},o)=>s.jsx(g0,{ref:o,className:Ee("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",a),...l}));Se.displayName=g0.displayName;const Ge=m.forwardRef(({className:a,...l},o)=>s.jsx("div",{ref:o,className:Ee("rounded-lg border bg-card text-card-foreground shadow-sm",a),...l}));Ge.displayName="Card";const Ie=m.forwardRef(({className:a,...l},o)=>s.jsx("div",{ref:o,className:Ee("flex flex-col space-y-1.5 p-6",a),...l}));Ie.displayName="CardHeader";const $e=m.forwardRef(({className:a,...l},o)=>s.jsx("h3",{ref:o,className:Ee("text-lg font-semibold leading-none tracking-tight",a),...l}));$e.displayName="CardTitle";const on=m.forwardRef(({className:a,...l},o)=>s.jsx("p",{ref:o,className:Ee("text-sm text-muted-foreground",a),...l}));on.displayName="CardDescription";const Ke=m.forwardRef(({className:a,...l},o)=>s.jsx("div",{ref:o,className:Ee("p-6 pt-0",a),...l}));Ke.displayName="CardContent";const y0=m.forwardRef(({className:a,...l},o)=>s.jsx("div",{ref:o,className:Ee("flex items-center p-6 pt-0",a),...l}));y0.displayName="CardFooter";var SN=a=>{switch(a){case"success":return CN;case"info":return RN;case"warning":return EN;case"error":return TN;default:return null}},wN=Array(12).fill(0),jN=({visible:a,className:l})=>le.createElement("div",{className:["sonner-loading-wrapper",l].filter(Boolean).join(" "),"data-visible":a},le.createElement("div",{className:"sonner-spinner"},wN.map((o,i)=>le.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${i}`})))),CN=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},le.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"})),EN=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},le.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"})),RN=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},le.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"})),TN=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},le.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"})),NN=le.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"},le.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),le.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),AN=()=>{let[a,l]=le.useState(document.hidden);return le.useEffect(()=>{let o=()=>{l(document.hidden)};return document.addEventListener("visibilitychange",o),()=>window.removeEventListener("visibilitychange",o)},[]),a},Xf=1,MN=class{constructor(){this.subscribe=a=>(this.subscribers.push(a),()=>{let l=this.subscribers.indexOf(a);this.subscribers.splice(l,1)}),this.publish=a=>{this.subscribers.forEach(l=>l(a))},this.addToast=a=>{this.publish(a),this.toasts=[...this.toasts,a]},this.create=a=>{var l;let{message:o,...i}=a,u=typeof(a==null?void 0:a.id)=="number"||((l=a.id)==null?void 0:l.length)>0?a.id:Xf++,f=this.toasts.find(p=>p.id===u),h=a.dismissible===void 0?!0:a.dismissible;return this.dismissedToasts.has(u)&&this.dismissedToasts.delete(u),f?this.toasts=this.toasts.map(p=>p.id===u?(this.publish({...p,...a,id:u,title:o}),{...p,...a,id:u,dismissible:h,title:o}):p):this.addToast({title:o,...i,dismissible:h,id:u}),u},this.dismiss=a=>(this.dismissedToasts.add(a),a||this.toasts.forEach(l=>{this.subscribers.forEach(o=>o({id:l.id,dismiss:!0}))}),this.subscribers.forEach(l=>l({id:a,dismiss:!0})),a),this.message=(a,l)=>this.create({...l,message:a}),this.error=(a,l)=>this.create({...l,message:a,type:"error"}),this.success=(a,l)=>this.create({...l,type:"success",message:a}),this.info=(a,l)=>this.create({...l,type:"info",message:a}),this.warning=(a,l)=>this.create({...l,type:"warning",message:a}),this.loading=(a,l)=>this.create({...l,type:"loading",message:a}),this.promise=(a,l)=>{if(!l)return;let o;l.loading!==void 0&&(o=this.create({...l,promise:a,type:"loading",message:l.loading,description:typeof l.description!="function"?l.description:void 0}));let i=a instanceof Promise?a:a(),u=o!==void 0,f,h=i.then(async v=>{if(f=["resolve",v],le.isValidElement(v))u=!1,this.create({id:o,type:"default",message:v});else if(ON(v)&&!v.ok){u=!1;let g=typeof l.error=="function"?await l.error(`HTTP error! status: ${v.status}`):l.error,w=typeof l.description=="function"?await l.description(`HTTP error! status: ${v.status}`):l.description;this.create({id:o,type:"error",message:g,description:w})}else if(l.success!==void 0){u=!1;let g=typeof l.success=="function"?await l.success(v):l.success,w=typeof l.description=="function"?await l.description(v):l.description;this.create({id:o,type:"success",message:g,description:w})}}).catch(async v=>{if(f=["reject",v],l.error!==void 0){u=!1;let g=typeof l.error=="function"?await l.error(v):l.error,w=typeof l.description=="function"?await l.description(v):l.description;this.create({id:o,type:"error",message:g,description:w})}}).finally(()=>{var v;u&&(this.dismiss(o),o=void 0),(v=l.finally)==null||v.call(l)}),p=()=>new Promise((v,g)=>h.then(()=>f[0]==="reject"?g(f[1]):v(f[1])).catch(g));return typeof o!="string"&&typeof o!="number"?{unwrap:p}:Object.assign(o,{unwrap:p})},this.custom=(a,l)=>{let o=(l==null?void 0:l.id)||Xf++;return this.create({jsx:a(o),id:o,...l}),o},this.getActiveToasts=()=>this.toasts.filter(a=>!this.dismissedToasts.has(a.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},an=new MN,_N=(a,l)=>{let o=(l==null?void 0:l.id)||Xf++;return an.addToast({title:a,...l,id:o}),o},ON=a=>a&&typeof a=="object"&&"ok"in a&&typeof a.ok=="boolean"&&"status"in a&&typeof a.status=="number",DN=_N,zN=()=>an.toasts,kN=()=>an.getActiveToasts(),be=Object.assign(DN,{success:an.success,info:an.info,warning:an.warning,error:an.error,custom:an.custom,message:an.message,promise:an.promise,dismiss:an.dismiss,loading:an.loading},{getHistory:zN,getToasts:kN});function LN(a,{insertAt:l}={}){if(typeof document>"u")return;let o=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",l==="top"&&o.firstChild?o.insertBefore(i,o.firstChild):o.appendChild(i),i.styleSheet?i.styleSheet.cssText=a:i.appendChild(document.createTextNode(a))}LN(`:where(html[dir="ltr"]),:where([data-sonner-toaster][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%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][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%)}:where([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:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([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);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([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 #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([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)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([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;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([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);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-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([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}:where([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}:where([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, 0px)) translate(var(--swipe-amount-x, 0px));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{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{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{0%{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-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--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-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-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-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, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--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-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-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],[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],[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],[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],[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:nth-child(1){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)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{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%)}
251
+ `);function ac(a){return a.label!==void 0}var UN=3,HN="32px",BN="16px",Ky=4e3,PN=356,qN=14,VN=20,YN=200;function Gn(...a){return a.filter(Boolean).join(" ")}function GN(a){let[l,o]=a.split("-"),i=[];return l&&i.push(l),o&&i.push(o),i}var IN=a=>{var l,o,i,u,f,h,p,v,g,w,S;let{invert:b,toast:x,unstyled:T,interacting:j,setHeights:C,visibleToasts:R,heights:A,index:N,toasts:_,expanded:P,removeToast:q,defaultRichColors:z,closeButton:U,style:ee,cancelButtonStyle:ae,actionButtonStyle:oe,className:Z="",descriptionClassName:ie="",duration:se,position:he,gap:k,loadingIcon:$,expandByDefault:te,classNames:J,icons:W,closeButtonAriaLabel:M="Close toast",pauseWhenPageIsHidden:H}=a,[K,B]=le.useState(null),[ne,de]=le.useState(null),[re,ue]=le.useState(!1),[ge,De]=le.useState(!1),[_e,Oe]=le.useState(!1),[qe,yt]=le.useState(!1),[Ht,Kt]=le.useState(!1),[Wn,jn]=le.useState(0),[Hl,nl]=le.useState(0),Hn=le.useRef(x.duration||se||Ky),ya=le.useRef(null),xa=le.useRef(null),Vt=N===0,Pc=N+1<=R,Yt=x.type,ba=x.dismissible!==!1,pr=x.className||"",qc=x.descriptionClassName||"",Bl=le.useMemo(()=>A.findIndex(je=>je.toastId===x.id)||0,[A,x.id]),Vc=le.useMemo(()=>{var je;return(je=x.closeButton)!=null?je:U},[x.closeButton,U]),ki=le.useMemo(()=>x.duration||se||Ky,[x.duration,se]),Sa=le.useRef(0),xt=le.useRef(0),Bn=le.useRef(0),bt=le.useRef(null),[Yc,Gc]=he.split("-"),Li=le.useMemo(()=>A.reduce((je,Qe,at)=>at>=Bl?je:je+Qe.height,0),[A,Bl]),Pl=AN(),vr=x.invert||b,al=Yt==="loading";xt.current=le.useMemo(()=>Bl*k+Li,[Bl,Li]),le.useEffect(()=>{Hn.current=ki},[ki]),le.useEffect(()=>{ue(!0)},[]),le.useEffect(()=>{let je=xa.current;if(je){let Qe=je.getBoundingClientRect().height;return nl(Qe),C(at=>[{toastId:x.id,height:Qe,position:x.position},...at]),()=>C(at=>at.filter(Gt=>Gt.toastId!==x.id))}},[C,x.id]),le.useLayoutEffect(()=>{if(!re)return;let je=xa.current,Qe=je.style.height;je.style.height="auto";let at=je.getBoundingClientRect().height;je.style.height=Qe,nl(at),C(Gt=>Gt.find(Ot=>Ot.toastId===x.id)?Gt.map(Ot=>Ot.toastId===x.id?{...Ot,height:at}:Ot):[{toastId:x.id,height:at,position:x.position},...Gt])},[re,x.title,x.description,C,x.id]);let Bt=le.useCallback(()=>{De(!0),jn(xt.current),C(je=>je.filter(Qe=>Qe.toastId!==x.id)),setTimeout(()=>{q(x)},YN)},[x,q,C,xt]);le.useEffect(()=>{if(x.promise&&Yt==="loading"||x.duration===1/0||x.type==="loading")return;let je;return P||j||H&&Pl?(()=>{if(Bn.current<Sa.current){let Qe=new Date().getTime()-Sa.current;Hn.current=Hn.current-Qe}Bn.current=new Date().getTime()})():Hn.current!==1/0&&(Sa.current=new Date().getTime(),je=setTimeout(()=>{var Qe;(Qe=x.onAutoClose)==null||Qe.call(x,x),Bt()},Hn.current)),()=>clearTimeout(je)},[P,j,x,Yt,H,Pl,Bt]),le.useEffect(()=>{x.delete&&Bt()},[Bt,x.delete]);function gr(){var je,Qe,at;return W!=null&&W.loading?le.createElement("div",{className:Gn(J==null?void 0:J.loader,(je=x==null?void 0:x.classNames)==null?void 0:je.loader,"sonner-loader"),"data-visible":Yt==="loading"},W.loading):$?le.createElement("div",{className:Gn(J==null?void 0:J.loader,(Qe=x==null?void 0:x.classNames)==null?void 0:Qe.loader,"sonner-loader"),"data-visible":Yt==="loading"},$):le.createElement(jN,{className:Gn(J==null?void 0:J.loader,(at=x==null?void 0:x.classNames)==null?void 0:at.loader),visible:Yt==="loading"})}return le.createElement("li",{tabIndex:0,ref:xa,className:Gn(Z,pr,J==null?void 0:J.toast,(l=x==null?void 0:x.classNames)==null?void 0:l.toast,J==null?void 0:J.default,J==null?void 0:J[Yt],(o=x==null?void 0:x.classNames)==null?void 0:o[Yt]),"data-sonner-toast":"","data-rich-colors":(i=x.richColors)!=null?i:z,"data-styled":!(x.jsx||x.unstyled||T),"data-mounted":re,"data-promise":!!x.promise,"data-swiped":Ht,"data-removed":ge,"data-visible":Pc,"data-y-position":Yc,"data-x-position":Gc,"data-index":N,"data-front":Vt,"data-swiping":_e,"data-dismissible":ba,"data-type":Yt,"data-invert":vr,"data-swipe-out":qe,"data-swipe-direction":ne,"data-expanded":!!(P||te&&re),style:{"--index":N,"--toasts-before":N,"--z-index":_.length-N,"--offset":`${ge?Wn:xt.current}px`,"--initial-height":te?"auto":`${Hl}px`,...ee,...x.style},onDragEnd:()=>{Oe(!1),B(null),bt.current=null},onPointerDown:je=>{al||!ba||(ya.current=new Date,jn(xt.current),je.target.setPointerCapture(je.pointerId),je.target.tagName!=="BUTTON"&&(Oe(!0),bt.current={x:je.clientX,y:je.clientY}))},onPointerUp:()=>{var je,Qe,at,Gt;if(qe||!ba)return;bt.current=null;let Ot=Number(((je=xa.current)==null?void 0:je.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),ea=Number(((Qe=xa.current)==null?void 0:Qe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ta=new Date().getTime()-((at=ya.current)==null?void 0:at.getTime()),Xt=K==="x"?Ot:ea,Pn=Math.abs(Xt)/ta;if(Math.abs(Xt)>=VN||Pn>.11){jn(xt.current),(Gt=x.onDismiss)==null||Gt.call(x,x),de(K==="x"?Ot>0?"right":"left":ea>0?"down":"up"),Bt(),yt(!0),Kt(!1);return}Oe(!1),B(null)},onPointerMove:je=>{var Qe,at,Gt,Ot;if(!bt.current||!ba||((Qe=window.getSelection())==null?void 0:Qe.toString().length)>0)return;let ea=je.clientY-bt.current.y,ta=je.clientX-bt.current.x,Xt=(at=a.swipeDirections)!=null?at:GN(he);!K&&(Math.abs(ta)>1||Math.abs(ea)>1)&&B(Math.abs(ta)>Math.abs(ea)?"x":"y");let Pn={x:0,y:0};K==="y"?(Xt.includes("top")||Xt.includes("bottom"))&&(Xt.includes("top")&&ea<0||Xt.includes("bottom")&&ea>0)&&(Pn.y=ea):K==="x"&&(Xt.includes("left")||Xt.includes("right"))&&(Xt.includes("left")&&ta<0||Xt.includes("right")&&ta>0)&&(Pn.x=ta),(Math.abs(Pn.x)>0||Math.abs(Pn.y)>0)&&Kt(!0),(Gt=xa.current)==null||Gt.style.setProperty("--swipe-amount-x",`${Pn.x}px`),(Ot=xa.current)==null||Ot.style.setProperty("--swipe-amount-y",`${Pn.y}px`)}},Vc&&!x.jsx?le.createElement("button",{"aria-label":M,"data-disabled":al,"data-close-button":!0,onClick:al||!ba?()=>{}:()=>{var je;Bt(),(je=x.onDismiss)==null||je.call(x,x)},className:Gn(J==null?void 0:J.closeButton,(u=x==null?void 0:x.classNames)==null?void 0:u.closeButton)},(f=W==null?void 0:W.close)!=null?f:NN):null,x.jsx||m.isValidElement(x.title)?x.jsx?x.jsx:typeof x.title=="function"?x.title():x.title:le.createElement(le.Fragment,null,Yt||x.icon||x.promise?le.createElement("div",{"data-icon":"",className:Gn(J==null?void 0:J.icon,(h=x==null?void 0:x.classNames)==null?void 0:h.icon)},x.promise||x.type==="loading"&&!x.icon?x.icon||gr():null,x.type!=="loading"?x.icon||(W==null?void 0:W[Yt])||SN(Yt):null):null,le.createElement("div",{"data-content":"",className:Gn(J==null?void 0:J.content,(p=x==null?void 0:x.classNames)==null?void 0:p.content)},le.createElement("div",{"data-title":"",className:Gn(J==null?void 0:J.title,(v=x==null?void 0:x.classNames)==null?void 0:v.title)},typeof x.title=="function"?x.title():x.title),x.description?le.createElement("div",{"data-description":"",className:Gn(ie,qc,J==null?void 0:J.description,(g=x==null?void 0:x.classNames)==null?void 0:g.description)},typeof x.description=="function"?x.description():x.description):null),m.isValidElement(x.cancel)?x.cancel:x.cancel&&ac(x.cancel)?le.createElement("button",{"data-button":!0,"data-cancel":!0,style:x.cancelButtonStyle||ae,onClick:je=>{var Qe,at;ac(x.cancel)&&ba&&((at=(Qe=x.cancel).onClick)==null||at.call(Qe,je),Bt())},className:Gn(J==null?void 0:J.cancelButton,(w=x==null?void 0:x.classNames)==null?void 0:w.cancelButton)},x.cancel.label):null,m.isValidElement(x.action)?x.action:x.action&&ac(x.action)?le.createElement("button",{"data-button":!0,"data-action":!0,style:x.actionButtonStyle||oe,onClick:je=>{var Qe,at;ac(x.action)&&((at=(Qe=x.action).onClick)==null||at.call(Qe,je),!je.defaultPrevented&&Bt())},className:Gn(J==null?void 0:J.actionButton,(S=x==null?void 0:x.classNames)==null?void 0:S.actionButton)},x.action.label):null))};function Xy(){if(typeof window>"u"||typeof document>"u")return"ltr";let a=document.documentElement.getAttribute("dir");return a==="auto"||!a?window.getComputedStyle(document.documentElement).direction:a}function $N(a,l){let o={};return[a,l].forEach((i,u)=>{let f=u===1,h=f?"--mobile-offset":"--offset",p=f?BN:HN;function v(g){["top","right","bottom","left"].forEach(w=>{o[`${h}-${w}`]=typeof g=="number"?`${g}px`:g})}typeof i=="number"||typeof i=="string"?v(i):typeof i=="object"?["top","right","bottom","left"].forEach(g=>{i[g]===void 0?o[`${h}-${g}`]=p:o[`${h}-${g}`]=typeof i[g]=="number"?`${i[g]}px`:i[g]}):v(p)}),o}var KN=m.forwardRef(function(a,l){let{invert:o,position:i="bottom-right",hotkey:u=["altKey","KeyT"],expand:f,closeButton:h,className:p,offset:v,mobileOffset:g,theme:w="light",richColors:S,duration:b,style:x,visibleToasts:T=UN,toastOptions:j,dir:C=Xy(),gap:R=qN,loadingIcon:A,icons:N,containerAriaLabel:_="Notifications",pauseWhenPageIsHidden:P}=a,[q,z]=le.useState([]),U=le.useMemo(()=>Array.from(new Set([i].concat(q.filter(H=>H.position).map(H=>H.position)))),[q,i]),[ee,ae]=le.useState([]),[oe,Z]=le.useState(!1),[ie,se]=le.useState(!1),[he,k]=le.useState(w!=="system"?w:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),$=le.useRef(null),te=u.join("+").replace(/Key/g,"").replace(/Digit/g,""),J=le.useRef(null),W=le.useRef(!1),M=le.useCallback(H=>{z(K=>{var B;return(B=K.find(ne=>ne.id===H.id))!=null&&B.delete||an.dismiss(H.id),K.filter(({id:ne})=>ne!==H.id)})},[]);return le.useEffect(()=>an.subscribe(H=>{if(H.dismiss){z(K=>K.map(B=>B.id===H.id?{...B,delete:!0}:B));return}setTimeout(()=>{dC.flushSync(()=>{z(K=>{let B=K.findIndex(ne=>ne.id===H.id);return B!==-1?[...K.slice(0,B),{...K[B],...H},...K.slice(B+1)]:[H,...K]})})})}),[]),le.useEffect(()=>{if(w!=="system"){k(w);return}if(w==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?k("dark"):k("light")),typeof window>"u")return;let H=window.matchMedia("(prefers-color-scheme: dark)");try{H.addEventListener("change",({matches:K})=>{k(K?"dark":"light")})}catch{H.addListener(({matches:B})=>{try{k(B?"dark":"light")}catch(ne){console.error(ne)}})}},[w]),le.useEffect(()=>{q.length<=1&&Z(!1)},[q]),le.useEffect(()=>{let H=K=>{var B,ne;u.every(de=>K[de]||K.code===de)&&(Z(!0),(B=$.current)==null||B.focus()),K.code==="Escape"&&(document.activeElement===$.current||(ne=$.current)!=null&&ne.contains(document.activeElement))&&Z(!1)};return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)},[u]),le.useEffect(()=>{if($.current)return()=>{J.current&&(J.current.focus({preventScroll:!0}),J.current=null,W.current=!1)}},[$.current]),le.createElement("section",{ref:l,"aria-label":`${_} ${te}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},U.map((H,K)=>{var B;let[ne,de]=H.split("-");return q.length?le.createElement("ol",{key:H,dir:C==="auto"?Xy():C,tabIndex:-1,ref:$,className:p,"data-sonner-toaster":!0,"data-theme":he,"data-y-position":ne,"data-lifted":oe&&q.length>1&&!f,"data-x-position":de,style:{"--front-toast-height":`${((B=ee[0])==null?void 0:B.height)||0}px`,"--width":`${PN}px`,"--gap":`${R}px`,...x,...$N(v,g)},onBlur:re=>{W.current&&!re.currentTarget.contains(re.relatedTarget)&&(W.current=!1,J.current&&(J.current.focus({preventScroll:!0}),J.current=null))},onFocus:re=>{re.target instanceof HTMLElement&&re.target.dataset.dismissible==="false"||W.current||(W.current=!0,J.current=re.relatedTarget)},onMouseEnter:()=>Z(!0),onMouseMove:()=>Z(!0),onMouseLeave:()=>{ie||Z(!1)},onDragEnd:()=>Z(!1),onPointerDown:re=>{re.target instanceof HTMLElement&&re.target.dataset.dismissible==="false"||se(!0)},onPointerUp:()=>se(!1)},q.filter(re=>!re.position&&K===0||re.position===H).map((re,ue)=>{var ge,De;return le.createElement(IN,{key:re.id,icons:N,index:ue,toast:re,defaultRichColors:S,duration:(ge=j==null?void 0:j.duration)!=null?ge:b,className:j==null?void 0:j.className,descriptionClassName:j==null?void 0:j.descriptionClassName,invert:o,visibleToasts:T,closeButton:(De=j==null?void 0:j.closeButton)!=null?De:h,interacting:ie,position:H,style:j==null?void 0:j.style,unstyled:j==null?void 0:j.unstyled,classNames:j==null?void 0:j.classNames,cancelButtonStyle:j==null?void 0:j.cancelButtonStyle,actionButtonStyle:j==null?void 0:j.actionButtonStyle,removeToast:M,toasts:q.filter(_e=>_e.position==re.position),heights:ee.filter(_e=>_e.position==re.position),setHeights:ae,expandByDefault:f,gap:R,loadingIcon:A,expanded:oe,pauseWhenPageIsHidden:P,swipeDirections:a.swipeDirections})})):null}))});function XN(){const{login:a}=ch(),[l,o]=m.useState("admin"),[i,u]=m.useState(""),[f,h]=m.useState(""),[p,v]=m.useState(""),[g,w]=m.useState(!1),[S,b]=m.useState(!1),x=bc(),T=Sn();return s.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background p-4",children:s.jsxs(Ge,{className:"w-full max-w-sm",children:[s.jsxs(Ie,{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("img",{src:"/logo.png",alt:"LateDev Router",className:"h-8 w-8 object-contain"}),s.jsx($e,{children:"Sign in"})]}),s.jsx(on,{children:"Enter your admin credentials."})]}),s.jsxs(Ke,{className:"space-y-3",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx(Se,{children:"Username"}),s.jsx(Me,{value:l,onChange:j=>o(j.target.value),autoFocus:!0})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx(Se,{children:"Password"}),s.jsx(Me,{type:"password",value:i,onChange:j=>u(j.target.value)})]}),g&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx(Se,{children:"2FA code (or recovery code)"}),s.jsx(Me,{value:f,onChange:j=>h(j.target.value),placeholder:"123456",maxLength:6})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx(Se,{children:"Recovery code (alternative)"}),s.jsx(Me,{value:p,onChange:j=>v(j.target.value),placeholder:"ABCD12-EF3456"})]})]})]}),s.jsx("div",{className:"px-6 pb-6",children:s.jsx(ve,{className:"w-full",disabled:S,onClick:async()=>{var j,C;b(!0);try{if((await a(l,i,f||void 0,p||void 0)).totpRequired){w(!0);return}const A=((C=(j=T.state)==null?void 0:j.from)==null?void 0:C.pathname)??"/";x(A,{replace:!0})}catch(R){be.error(R.message)}finally{b(!1)}},children:"Sign in"})})]})})}function QN(){const[a,l]=m.useState("admin"),[o,i]=m.useState(""),[u,f]=m.useState(""),[h,p]=m.useState(!1),[v,g]=m.useState(!0),w=bc();m.useEffect(()=>{Ce.get("/api/admin/setup/status").then(x=>g(!x.masterKeyConfigured)).catch(()=>g(!0))},[]);const S=!v||u.trim().length>=32,b=!h&&o.length>=12&&S;return s.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background p-4",children:s.jsxs(Ge,{className:"w-full max-w-md",children:[s.jsxs(Ie,{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("img",{src:"/logo.png",alt:"LateDev Router",className:"h-8 w-8 object-contain rounded"}),s.jsx($e,{children:"Welcome to LateDev Router"})]}),s.jsx(on,{children:"Set up the administrator account to get started."})]}),s.jsxs(Ke,{className:"space-y-3",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx(Se,{children:"Username"}),s.jsx(Me,{value:a,onChange:x=>l(x.target.value)})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx(Se,{children:"Password (12+ chars)"}),s.jsx(Me,{type:"password",value:o,onChange:x=>i(x.target.value)})]}),v&&s.jsxs("div",{className:"space-y-1",children:[s.jsx(Se,{children:"Master encryption key (required, 32+ chars)"}),s.jsx(Me,{type:"password",value:u,onChange:x=>f(x.target.value),placeholder:"Paste or generate a 32+ character key"}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Provider API keys are encrypted with this key (AES-256-GCM). Store it somewhere safe — if it is lost, stored provider credentials cannot be recovered. Generate one with:"," ",s.jsx("code",{className:"break-all",children:`node -e "console.log(require('crypto').randomBytes(32).toString('base64'))"`})]})]})]}),s.jsx(y0,{children:s.jsx(ve,{disabled:!b,onClick:async()=>{p(!0);try{await Ce.post("/api/admin/setup",{username:a,password:o,setupMasterKey:v?u.trim():void 0}),be.success("Admin account created"),w("/login",{replace:!0})}catch(x){be.error(x.message)}finally{p(!1)}},children:"Create admin"})})]})})}function ga({title:a,description:l,actions:o,className:i}){return s.jsxs("div",{className:Ee("mb-6 flex items-start justify-between gap-4",i),children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:a}),l&&s.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:l})]}),o&&s.jsx("div",{className:"flex items-center gap-2",children:o})]})}const ZN=Vx("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground",success:"border-transparent bg-emerald-600 text-white",warning:"border-transparent bg-amber-500 text-white",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function it({className:a,variant:l,...o}){return s.jsx("div",{className:Ee(ZN({variant:l}),a),...o})}function FN(){const[a,l]=m.useState(null);return m.useEffect(()=>{Ce.get("/api/admin/dashboard").then(l).catch(()=>l(null))},[]),a?s.jsxs("div",{children:[s.jsx(ga,{title:"Dashboard",description:"Operational summary for today",actions:s.jsxs("div",{className:"flex gap-2",children:[s.jsx(ve,{asChild:!0,variant:"outline",size:"sm",children:s.jsxs(oo,{to:"/providers",children:[s.jsx(Ni,{className:"mr-1 h-4 w-4"})," Provider"]})}),s.jsx(ve,{asChild:!0,variant:"outline",size:"sm",children:s.jsxs(oo,{to:"/combos",children:[s.jsx(Rx,{className:"mr-1 h-4 w-4"})," Combo"]})}),s.jsx(ve,{asChild:!0,variant:"outline",size:"sm",children:s.jsxs(oo,{to:"/api-keys",children:[s.jsx(Ex,{className:"mr-1 h-4 w-4"})," API Key"]})})]})}),s.jsxs("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:[s.jsxs(Ge,{children:[s.jsx(Ie,{className:"pb-1",children:s.jsx($e,{className:"text-sm text-muted-foreground",children:"Requests today"})}),s.jsx(Ke,{className:"text-2xl font-semibold",children:gn(a.today.total)})]}),s.jsxs(Ge,{children:[s.jsx(Ie,{className:"pb-1",children:s.jsx($e,{className:"text-sm text-muted-foreground",children:"Success rate"})}),s.jsx(Ke,{className:"text-2xl font-semibold",children:a.today.total?xi(a.today.success/a.today.total):"—"})]}),s.jsxs(Ge,{children:[s.jsx(Ie,{className:"pb-1",children:s.jsx($e,{className:"text-sm text-muted-foreground",children:"Failed"})}),s.jsx(Ke,{className:"text-2xl font-semibold",children:gn(a.today.failed)})]}),s.jsxs(Ge,{children:[s.jsx(Ie,{className:"pb-1",children:s.jsx($e,{className:"text-sm text-muted-foreground",children:"Tokens today"})}),s.jsx(Ke,{className:"text-2xl font-semibold",children:gn(a.today.totalTokens)})]})]}),s.jsxs("div",{className:"mt-6 grid gap-4 lg:grid-cols-2",children:[s.jsxs(Ge,{children:[s.jsxs(Ie,{children:[s.jsx($e,{className:"text-base",children:"Provider health"}),s.jsxs(on,{children:[a.providers.length," configured"]})]}),s.jsxs(Ke,{className:"space-y-2",children:[a.providers.length===0&&s.jsxs("p",{className:"text-sm text-muted-foreground",children:["No providers yet. ",s.jsx(oo,{to:"/providers",className:"text-primary",children:"Add one"}),"."]}),a.providers.map(o=>s.jsxs("div",{className:"flex items-center justify-between rounded border p-2 text-sm",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Tx,{className:"h-4 w-4 text-muted-foreground"}),s.jsx("span",{className:"font-medium",children:o.name}),s.jsx("span",{className:"text-xs text-muted-foreground",children:o.slug}),s.jsx(it,{variant:"outline",className:"ml-2",children:o.type})]}),s.jsx(it,{variant:o.health==="healthy"?"success":o.health==="down"?"destructive":"secondary",children:o.health})]},o.id))]})]}),s.jsxs(Ge,{children:[s.jsxs(Ie,{children:[s.jsx($e,{className:"text-base",children:"Recent failures"}),s.jsx(on,{children:"Today"})]}),s.jsxs(Ke,{className:"space-y-1 text-sm",children:[a.recentFailures.length===0&&s.jsx("p",{className:"text-muted-foreground",children:"No failures today."}),a.recentFailures.map(o=>{var i;return s.jsxs("div",{className:"flex items-center justify-between border-b py-1 last:border-0",children:[s.jsxs("div",{children:[s.jsx("span",{className:"font-mono text-xs",children:o.requestedModel}),s.jsxs("div",{className:"text-xs text-muted-foreground",children:[o.errorType??`HTTP ${o.httpStatus}`," — ",(i=o.errorMessage)==null?void 0:i.slice(0,60)]})]}),s.jsx("span",{className:"text-xs text-muted-foreground",children:dh(o.createdAt)})]},o.id)})]})]})]})]}):s.jsx("div",{className:"text-muted-foreground",children:"Loading…"})}const Xn=m.forwardRef(({className:a,...l},o)=>s.jsx("div",{className:"relative w-full overflow-auto",children:s.jsx("table",{ref:o,className:Ee("w-full caption-bottom text-sm",a),...l})}));Xn.displayName="Table";const Qn=m.forwardRef(({className:a,...l},o)=>s.jsx("thead",{ref:o,className:Ee("[&_tr]:border-b",a),...l}));Qn.displayName="TableHeader";const Zn=m.forwardRef(({className:a,...l},o)=>s.jsx("tbody",{ref:o,className:Ee("[&_tr:last-child]:border-0",a),...l}));Zn.displayName="TableBody";const Ze=m.forwardRef(({className:a,...l},o)=>s.jsx("tr",{ref:o,className:Ee("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",a),...l}));Ze.displayName="TableRow";const pe=m.forwardRef(({className:a,...l},o)=>s.jsx("th",{ref:o,className:Ee("h-10 px-2 text-left align-middle font-medium text-muted-foreground",a),...l}));pe.displayName="TableHead";const ce=m.forwardRef(({className:a,...l},o)=>s.jsx("td",{ref:o,className:Ee("p-2 align-middle",a),...l}));ce.displayName="TableCell";var JN=Object.defineProperty,wn=(a,l)=>JN(a,"name",{value:l,configurable:!0}),Dh="Dialog",[x0,b0]=sn(Dh),[WN,Jn]=x0(Dh),S0=wn(a=>{const{__scopeDialog:l,children:o,open:i,defaultOpen:u,onOpenChange:f,modal:h=!0}=a,p=m.useRef(null),v=m.useRef(null),[g,w]=Xa({prop:i,defaultProp:u??!1,onChange:f,caller:Dh}),[S,b]=m.useState(0),[x,T]=m.useState(0);return s.jsx(WN,{scope:l,triggerRef:p,contentRef:v,contentId:ca(),titleId:ca(),descriptionId:ca(),titlePresent:S>0,descriptionPresent:x>0,setTitleCount:b,setDescriptionCount:T,open:g,onOpenChange:w,onOpenToggle:m.useCallback(()=>w(j=>!j),[w]),modal:h,children:o})},"Dialog"),eA="DialogTrigger",w0=m.forwardRef(wn(function(l,o){const{__scopeDialog:i,...u}=l,f=Jn(eA,i),h=Pe(o,f.triggerRef);return s.jsx(Le.button,{type:"button","aria-haspopup":"dialog","aria-expanded":f.open,"aria-controls":f.open?f.contentId:void 0,"data-state":Uc(f.open),...u,ref:h,onClick:xe(l.onClick,f.onOpenToggle)})},"DialogTrigger")),j0="DialogPortal",[tA,C0]=x0(j0,{forceMount:void 0}),E0=wn(a=>{const{__scopeDialog:l,forceMount:o,children:i,container:u}=a,f=Jn(j0,l);return s.jsx(tA,{scope:l,forceMount:o,children:m.Children.map(i,h=>s.jsx(Wa,{present:o||f.open,children:s.jsx(Rh,{asChild:!0,container:u,children:h})}))})},"DialogPortal"),Qf="DialogOverlay",zh=m.forwardRef(wn(function(l,o){const i=C0(Qf,l.__scopeDialog),{forceMount:u=i.forceMount,...f}=l,h=Jn(Qf,l.__scopeDialog);return h.modal?s.jsx(Wa,{present:u||h.open,children:s.jsx(aA,{...f,ref:o})}):null},"DialogOverlay")),nA=ha("DialogOverlay.RemoveScroll"),aA=m.forwardRef(wn(function(l,o){const{__scopeDialog:i,...u}=l,f=Jn(Qf,i),h=nb(),p=Pe(o,h);return s.jsx(kc,{as:nA,allowPinchZoom:!0,shards:[f.contentRef],children:s.jsx(Le.div,{"data-state":Uc(f.open),...u,ref:p,style:{pointerEvents:"auto",...u.style}})})},"DialogOverlayImpl")),Ci="DialogContent",kh=m.forwardRef(wn(function(l,o){const i=C0(Ci,l.__scopeDialog),{forceMount:u=i.forceMount,...f}=l,h=Jn(Ci,l.__scopeDialog);return s.jsx(Wa,{present:u||h.open,children:h.modal?s.jsx(lA,{...f,ref:o}):s.jsx(rA,{...f,ref:o})})},"DialogContent")),lA=m.forwardRef(wn(function(l,o){const i=Jn(Ci,l.__scopeDialog),u=m.useRef(null),f=Pe(o,i.contentRef,u);return m.useEffect(()=>{const h=u.current;if(h)return Ah(h)},[]),s.jsx(R0,{...l,ref:f,trapFocus:i.open,disableOutsidePointerEvents:i.open,onCloseAutoFocus:xe(l.onCloseAutoFocus,h=>{var p;h.preventDefault(),(p=i.triggerRef.current)==null||p.focus()}),onPointerDownOutside:xe(l.onPointerDownOutside,h=>{const p=h.detail.originalEvent,v=p.button===0&&p.ctrlKey===!0;(p.button===2||v)&&h.preventDefault()}),onFocusOutside:xe(l.onFocusOutside,h=>h.preventDefault())})},"DialogContentModal")),rA=m.forwardRef(wn(function(l,o){const i=Jn(Ci,l.__scopeDialog),u=m.useRef(!1),f=m.useRef(!1);return s.jsx(R0,{...l,ref:o,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:h=>{var p,v;(p=l.onCloseAutoFocus)==null||p.call(l,h),h.defaultPrevented||(u.current||(v=i.triggerRef.current)==null||v.focus(),h.preventDefault()),u.current=!1,f.current=!1},onInteractOutside:h=>{var g,w;(g=l.onInteractOutside)==null||g.call(l,h),h.defaultPrevented||(u.current=!0,h.detail.originalEvent.type==="pointerdown"&&(f.current=!0));const p=h.target;((w=i.triggerRef.current)==null?void 0:w.contains(p))&&h.preventDefault(),h.detail.originalEvent.type==="focusin"&&f.current&&h.preventDefault()}})},"DialogContentNonModal")),R0=m.forwardRef(wn(function(l,o){const{__scopeDialog:i,trapFocus:u,onOpenAutoFocus:f,onCloseAutoFocus:h,...p}=l,v=Jn(Ci,i);return _i(),s.jsx(s.Fragment,{children:s.jsx(gh,{asChild:!0,loop:!0,trapped:u,onMountAutoFocus:f,onUnmountAutoFocus:h,children:s.jsx(Cc,{role:"dialog",id:v.contentId,"aria-describedby":v.descriptionPresent?v.descriptionId:void 0,"aria-labelledby":v.titlePresent?v.titleId:void 0,"data-state":Uc(v.open),...p,ref:o,deferPointerDownOutside:!0,onDismiss:()=>v.onOpenChange(!1)})})})},"DialogContentImpl")),oA="DialogTitle",Lh=m.forwardRef(wn(function(l,o){const{__scopeDialog:i,...u}=l,f=Jn(oA,i),{setTitleCount:h}=f;return Tt(()=>(h(p=>p+1),()=>h(p=>p-1)),[h]),s.jsx(Le.h2,{id:f.titleId,...u,ref:o})},"DialogTitle")),iA="DialogDescription",Uh=m.forwardRef(wn(function(l,o){const{__scopeDialog:i,...u}=l,f=Jn(iA,i),{setDescriptionCount:h}=f;return Tt(()=>(h(p=>p+1),()=>h(p=>p-1)),[h]),s.jsx(Le.p,{id:f.descriptionId,...u,ref:o})},"DialogDescription")),sA="DialogClose",Hh=m.forwardRef(wn(function(l,o){const{__scopeDialog:i,...u}=l,f=Jn(sA,i);return s.jsx(Le.button,{type:"button",...u,ref:o,onClick:xe(l.onClick,()=>f.onOpenChange(!1))})},"DialogClose"));function Uc(a){return a?"open":"closed"}wn(Uc,"getState");const Ga=S0,Di=w0,cA=E0,T0=m.forwardRef(({className:a,...l},o)=>s.jsx(zh,{ref:o,className:Ee("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...l}));T0.displayName=zh.displayName;const ua=m.forwardRef(({className:a,children:l,...o},i)=>s.jsxs(cA,{children:[s.jsx(T0,{}),s.jsxs(kh,{ref:i,className:Ee("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 sm:rounded-lg",a),...o,children:[l,s.jsxs(Hh,{className:"absolute right-4 top-4 rounded-sm opacity-70 hover:opacity-100",children:[s.jsx(kC,{className:"h-4 w-4"}),s.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));ua.displayName=kh.displayName;const da=({className:a,...l})=>s.jsx("div",{className:Ee("flex flex-col space-y-1.5 text-center sm:text-left",a),...l});da.displayName="DialogHeader";const Ia=({className:a,...l})=>s.jsx("div",{className:Ee("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",a),...l});Ia.displayName="DialogFooter";const fa=m.forwardRef(({className:a,...l},o)=>s.jsx(Lh,{ref:o,className:Ee("text-lg font-semibold leading-none tracking-tight",a),...l}));fa.displayName=Lh.displayName;const Zf=m.forwardRef(({className:a,...l},o)=>s.jsx(Uh,{ref:o,className:Ee("text-sm text-muted-foreground",a),...l}));Zf.displayName=Uh.displayName;var uA=Object.defineProperty,el=(a,l)=>uA(a,"name",{value:l,configurable:!0}),dA="AlertDialog",[fA,A_]=sn(dA,[b0]),tl=b0(),hA=el(a=>{const{__scopeAlertDialog:l,...o}=a,i=tl(l);return s.jsx(S0,{...i,...o,modal:!0})},"AlertDialog"),mA=m.forwardRef(el(function(l,o){const{__scopeAlertDialog:i,...u}=l,f=tl(i);return s.jsx(w0,{...f,...u,ref:o})},"AlertDialogTrigger")),pA=el(a=>{const{__scopeAlertDialog:l,...o}=a,i=tl(l);return s.jsx(E0,{...i,...o})},"AlertDialogPortal"),vA=m.forwardRef(el(function(l,o){const{__scopeAlertDialog:i,...u}=l,f=tl(i);return s.jsx(zh,{...f,...u,ref:o})},"AlertDialogOverlay")),gA="AlertDialogContent",[yA,xA]=fA(gA),bA=m.forwardRef(el(function(l,o){const{__scopeAlertDialog:i,children:u,...f}=l,h=tl(i),p=m.useRef(null),v=Pe(o,p),g=m.useRef(null);return s.jsx(yA,{scope:i,cancelRef:g,children:s.jsx(kh,{role:"alertdialog",...h,...f,ref:v,onOpenAutoFocus:xe(f.onOpenAutoFocus,w=>{var S;w.preventDefault(),(S=g.current)==null||S.focus({preventScroll:!0})}),onPointerDownOutside:w=>w.preventDefault(),onInteractOutside:w=>w.preventDefault(),children:u})})},"AlertDialogContent")),SA=m.forwardRef(el(function(l,o){const{__scopeAlertDialog:i,...u}=l,f=tl(i);return s.jsx(Lh,{...f,...u,ref:o})},"AlertDialogTitle")),wA=m.forwardRef(el(function(l,o){const{__scopeAlertDialog:i,...u}=l,f=tl(i);return s.jsx(Uh,{...f,...u,ref:o})},"AlertDialogDescription")),jA=m.forwardRef(el(function(l,o){const{__scopeAlertDialog:i,...u}=l,f=tl(i);return s.jsx(Hh,{...f,...u,ref:o})},"AlertDialogAction")),CA="AlertDialogCancel",EA=m.forwardRef(el(function(l,o){const{__scopeAlertDialog:i,...u}=l,{cancelRef:f}=xA(CA,i),h=tl(i),p=Pe(o,f);return s.jsx(Hh,{...h,...u,ref:p})},"AlertDialogCancel")),RA=hA,TA=mA,NA=pA,N0=vA,A0=bA,M0=jA,_0=EA,O0=SA,D0=wA;const z0=RA,AA=TA,MA=NA,k0=m.forwardRef(({className:a,...l},o)=>s.jsx(N0,{ref:o,className:Ee("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...l}));k0.displayName=N0.displayName;const Bh=m.forwardRef(({className:a,...l},o)=>s.jsxs(MA,{children:[s.jsx(k0,{}),s.jsx(A0,{ref:o,className:Ee("fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg sm:max-w-[425px]",a),...l})]}));Bh.displayName=A0.displayName;const L0=({className:a,...l})=>s.jsx("div",{className:Ee("flex flex-col space-y-2 text-center sm:text-left",a),...l}),U0=({className:a,...l})=>s.jsx("div",{className:Ee("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",a),...l}),Ph=m.forwardRef(({className:a,...l},o)=>s.jsx(O0,{ref:o,className:Ee("text-lg font-semibold",a),...l}));Ph.displayName=O0.displayName;const qh=m.forwardRef(({className:a,...l},o)=>s.jsx(D0,{ref:o,className:Ee("text-sm text-muted-foreground",a),...l}));qh.displayName=D0.displayName;const Vh=m.forwardRef(({className:a,...l},o)=>s.jsx(M0,{ref:o,className:Ee("inline-flex h-9 items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90",a),...l}));Vh.displayName=M0.displayName;const Yh=m.forwardRef(({className:a,...l},o)=>s.jsx(_0,{ref:o,className:Ee("inline-flex h-9 items-center justify-center rounded-md border border-input bg-background px-4 py-2 text-sm font-medium hover:bg-accent",a),...l}));Yh.displayName=_0.displayName;var _A=Object.defineProperty,OA=(a,l)=>_A(a,"name",{value:l,configurable:!0});function Ff(a,[l,o]){return Math.min(o,Math.max(l,a))}OA(Ff,"clamp");var DA=Object.defineProperty,zA=(a,l)=>DA(a,"name",{value:l,configurable:!0});function H0(a){const l=m.useRef({value:a,previous:a});return m.useMemo(()=>(l.current.value!==a&&(l.current.previous=l.current.value,l.current.value=a),l.current.previous),[a])}zA(H0,"usePrevious");var kA=Object.defineProperty,LA=(a,l)=>kA(a,"name",{value:l,configurable:!0}),B0=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"}),UA=m.forwardRef(LA(function(l,o){return s.jsx(Le.span,{...l,ref:o,style:{...B0,...l.style}})},"VisuallyHidden")),HA=UA,BA=Object.defineProperty,nt=(a,l)=>BA(a,"name",{value:l,configurable:!0}),PA=[" ","Enter","ArrowUp","ArrowDown"],qA=[" ","Enter"],fo="Select",[Hc,Gh,VA]=jc(fo),[mr,M_]=sn(fo,[VA,wo]),Ih=wo(),[YA,Ul]=mr(fo),[GA,IA]=mr(fo);function P0(a){const{__scopeSelect:l,children:o,open:i,defaultOpen:u,onOpenChange:f,value:h,defaultValue:p,onValueChange:v,dir:g,name:w,autoComplete:S,disabled:b,required:x,form:T,internal_do_not_use_render:j}=a,C=Ih(l),[R,A]=m.useState(null),[N,_]=m.useState(null),[P,q]=m.useState(!1),z=Mi(g),[U,ee]=Xa({prop:i,defaultProp:u??!1,onChange:f,caller:fo}),[ae,oe]=Xa({prop:h,defaultProp:p,onChange:v,caller:fo}),Z=m.useRef(null),ie=m.useRef(ae);m.useEffect(()=>{const H=T?R==null?void 0:R.ownerDocument.getElementById(T):R==null?void 0:R.form;if(H instanceof HTMLFormElement){const K=nt(()=>oe(ie.current),"reset");return H.addEventListener("reset",K),()=>H.removeEventListener("reset",K)}},[T,R,oe]);const se=R?!!T||!!R.closest("form"):!0,[he,k]=m.useState(new Set),$=ca(),te=Array.from(he).map(H=>H.props.value).join(";"),J=m.useCallback(H=>{k(K=>new Set(K).add(H))},[]),W=m.useCallback(H=>{k(K=>{const B=new Set(K);return B.delete(H),B})},[]),M={required:x,trigger:R,onTriggerChange:A,valueNode:N,onValueNodeChange:_,valueNodeHasChildren:P,onValueNodeHasChildrenChange:q,contentId:$,value:ae,onValueChange:oe,open:U,onOpenChange:ee,dir:z,triggerPointerDownPosRef:Z,disabled:b,name:w,autoComplete:S,form:T,nativeOptions:he,nativeSelectKey:te,isFormControl:se};return s.jsx(Tb,{...C,children:s.jsx(YA,{scope:l,...M,children:s.jsx(Hc.Provider,{scope:l,children:s.jsx(GA,{scope:l,onNativeOptionAdd:J,onNativeOptionRemove:W,children:$0(j)?j(M):o})})})})}nt(P0,"SelectProvider");var $A=nt(a=>{const{__scopeSelect:l,children:o,...i}=a;return s.jsx(P0,{__scopeSelect:l,...i,internal_do_not_use_render:({isFormControl:u})=>s.jsxs(s.Fragment,{children:[o,u?s.jsx(mM,{__scopeSelect:l}):null]})})},"Select"),KA="SelectTrigger",q0=m.forwardRef(nt(function(l,o){const{__scopeSelect:i,disabled:u=!1,...f}=l,h=Ih(i),p=Ul(KA,i),v=p.disabled||u,g=Pe(o,p.onTriggerChange),w=Gh(i),S=m.useRef("touch"),[b,x,T]=$h(C=>{const R=w().filter(_=>!_.disabled),A=R.find(_=>_.value===p.value),N=Kh(R,C,A);N!==void 0&&p.onValueChange(N.value)}),j=nt(C=>{v||(p.onOpenChange(!0),T()),C&&(p.triggerPointerDownPosRef.current={x:Math.round(C.pageX),y:Math.round(C.pageY)})},"handleOpen");return s.jsx(Nb,{asChild:!0,...h,children:s.jsx(Le.button,{type:"button",role:"combobox","aria-controls":p.open?p.contentId:void 0,"aria-expanded":p.open,"aria-required":p.required,"aria-autocomplete":"none",dir:p.dir,"data-state":p.open?"open":"closed",disabled:v,"data-disabled":v?"":void 0,"data-placeholder":zi(p.value)?"":void 0,...f,ref:g,onClick:xe(f.onClick,C=>{C.currentTarget.focus(),S.current!=="mouse"&&j(C)}),onPointerDown:xe(f.onPointerDown,C=>{S.current=C.pointerType;const R=C.target;R.hasPointerCapture(C.pointerId)&&R.releasePointerCapture(C.pointerId),C.button===0&&C.ctrlKey===!1&&C.pointerType==="mouse"&&(j(C),C.preventDefault())}),onKeyDown:xe(f.onKeyDown,C=>{const R=b.current!=="";!(C.ctrlKey||C.altKey||C.metaKey)&&C.key.length===1&&x(C.key),!(R&&C.key===" ")&&PA.includes(C.key)&&(j(),C.preventDefault())})})})},"SelectTrigger")),XA="SelectValue",QA=m.forwardRef(nt(function(l,o){const{__scopeSelect:i,className:u,style:f,children:h,placeholder:p="",...v}=l,g=Ul(XA,i),{onValueNodeHasChildrenChange:w}=g,S=h!==void 0,b=Pe(o,g.onValueNodeChange);Tt(()=>{w(S)},[w,S]);const x=zi(g.value);return s.jsx(Le.span,{...v,asChild:x?!1:v.asChild,ref:b,style:{pointerEvents:"none"},children:s.jsx(m.Fragment,{children:x?p:h},x?"placeholder":"value")})},"SelectValue")),ZA=m.forwardRef(nt(function(l,o){const{__scopeSelect:i,children:u,...f}=l;return s.jsx(Le.span,{"aria-hidden":!0,...f,ref:o,children:u||"▼"})},"SelectIcon")),FA="SelectPortal",[JA,WA]=mr(FA,{forceMount:void 0}),eM=nt(a=>{const{__scopeSelect:l,forceMount:o,...i}=a;return s.jsx(JA,{scope:a.__scopeSelect,forceMount:o,children:s.jsx(Rh,{asChild:!0,...i})})},"SelectPortal"),sr="SelectContent",V0=m.forwardRef(nt(function(l,o){const i=WA(sr,l.__scopeSelect),{forceMount:u=i.forceMount,...f}=l,h=Ul(sr,l.__scopeSelect),[p,v]=m.useState();return Tt(()=>{v(new DocumentFragment)},[]),s.jsx(Wa,{present:u||h.open,children:({present:g})=>g?s.jsx(aM,{...f,ref:o}):s.jsx(tM,{...f,fragment:p})})},"SelectContent")),tM=m.forwardRef(nt(function(l,o){const{__scopeSelect:i,children:u,fragment:f}=l;return f?go.createPortal(s.jsx(Y0,{scope:i,children:s.jsx(Hc.Slot,{scope:i,children:s.jsx("div",{ref:o,children:u})})}),f):null},"SelectContentFragment")),In=10,[Y0,Bc]=mr(sr),nM=ha("SelectContent.RemoveScroll"),aM=m.forwardRef(nt(function(l,o){const{__scopeSelect:i}=l,{position:u="item-aligned",onCloseAutoFocus:f,onEscapeKeyDown:h,onPointerDownOutside:p,side:v,sideOffset:g,align:w,alignOffset:S,arrowPadding:b,collisionBoundary:x,collisionPadding:T,sticky:j,hideWhenDetached:C,avoidCollisions:R,...A}=l,N=Ul(sr,i),[_,P]=m.useState(null),[q,z]=m.useState(null),U=Pe(o,P),[ee,ae]=m.useState(null),[oe,Z]=m.useState(null),ie=Gh(i),[se,he]=m.useState(!1),k=m.useRef(!1);m.useEffect(()=>{if(_)return Ah(_)},[_]),_i();const $=m.useCallback(ue=>{const[ge,...De]=ie().map(qe=>qe.ref.current),[_e]=De.slice(-1),Oe=document.activeElement;for(const qe of ue)if(qe===Oe||(qe==null||qe.scrollIntoView({block:"nearest"}),qe===ge&&q&&(q.scrollTop=0),qe===_e&&q&&(q.scrollTop=q.scrollHeight),qe==null||qe.focus(),document.activeElement!==Oe))return},[ie,q]),te=m.useCallback(()=>$([ee,_]),[$,ee,_]);m.useEffect(()=>{se&&te()},[se,te]);const{onOpenChange:J,triggerPointerDownPosRef:W}=N;m.useEffect(()=>{if(_){let ue={x:0,y:0};const ge=nt(_e=>{var Oe,qe;ue={x:Math.abs(Math.round(_e.pageX)-(((Oe=W.current)==null?void 0:Oe.x)??0)),y:Math.abs(Math.round(_e.pageY)-(((qe=W.current)==null?void 0:qe.y)??0))}},"handlePointerMove"),De=nt(_e=>{ue.x<=10&&ue.y<=10?_e.preventDefault():_e.composedPath().includes(_)||J(!1),document.removeEventListener("pointermove",ge),W.current=null},"handlePointerUp");return W.current!==null&&(document.addEventListener("pointermove",ge),document.addEventListener("pointerup",De,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ge),document.removeEventListener("pointerup",De,{capture:!0})}}},[_,J,W]),m.useEffect(()=>{const ue=nt(()=>J(!1),"close");return window.addEventListener("blur",ue),window.addEventListener("resize",ue),()=>{window.removeEventListener("blur",ue),window.removeEventListener("resize",ue)}},[J]);const[M,H]=$h(ue=>{const ge=ie().filter(Oe=>!Oe.disabled),De=ge.find(Oe=>Oe.ref.current===document.activeElement),_e=Kh(ge,ue,De);_e&&setTimeout(()=>{var Oe;return(Oe=_e.ref.current)==null?void 0:Oe.focus()})}),K=m.useCallback((ue,ge,De)=>{const _e=!k.current&&!De;(N.value!==void 0&&N.value===ge||_e)&&(ae(ue),_e&&(k.current=!0))},[N.value]),B=m.useCallback(()=>_==null?void 0:_.focus(),[_]),ne=m.useCallback((ue,ge,De)=>{const _e=!k.current&&!De;(N.value!==void 0&&N.value===ge||_e)&&Z(ue)},[N.value]),de=u==="popper"?Qy:lM,re=de===Qy?{side:v,sideOffset:g,align:w,alignOffset:S,arrowPadding:b,collisionBoundary:x,collisionPadding:T,sticky:j,hideWhenDetached:C,avoidCollisions:R}:{};return s.jsx(Y0,{scope:i,content:_,viewport:q,onViewportChange:z,itemRefCallback:K,selectedItem:ee,onItemLeave:B,itemTextRefCallback:ne,focusSelectedItem:te,selectedItemText:oe,position:u,isPositioned:se,searchRef:M,children:s.jsx(kc,{as:nM,allowPinchZoom:!0,children:s.jsx(gh,{asChild:!0,trapped:N.open,onMountAutoFocus:ue=>{ue.preventDefault()},onUnmountAutoFocus:xe(f,ue=>{var ge;(ge=N.trigger)==null||ge.focus({preventScroll:!0}),ue.preventDefault()}),children:s.jsx(Cc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:h,onPointerDownOutside:p,onFocusOutside:ue=>ue.preventDefault(),onDismiss:()=>N.onOpenChange(!1),children:s.jsx(de,{role:"listbox",id:N.contentId,"data-state":N.open?"open":"closed",dir:N.dir,onContextMenu:ue=>ue.preventDefault(),...A,...re,onPlaced:()=>he(!0),ref:U,style:{display:"flex",flexDirection:"column",outline:"none",...A.style},onKeyDown:xe(A.onKeyDown,ue=>{const ge=ue.ctrlKey||ue.altKey||ue.metaKey;if(ue.key==="Tab"&&ue.preventDefault(),!ge&&ue.key.length===1&&H(ue.key),["ArrowUp","ArrowDown","Home","End"].includes(ue.key)){let _e=ie().filter(Oe=>!Oe.disabled).map(Oe=>Oe.ref.current);if(["ArrowUp","End"].includes(ue.key)&&(_e=_e.slice().reverse()),["ArrowUp","ArrowDown"].includes(ue.key)){const Oe=ue.target,qe=_e.indexOf(Oe);_e=_e.slice(qe+1)}setTimeout(()=>$(_e)),ue.preventDefault()}})})})})})})},"SelectContentImpl")),lM=m.forwardRef(nt(function(l,o){const{__scopeSelect:i,onPlaced:u,...f}=l,h=Ul(sr,i),p=Bc(sr,i),[v,g]=m.useState(null),[w,S]=m.useState(null),b=Pe(o,S),x=Gh(i),T=m.useRef(!1),j=m.useRef(!0),{viewport:C,selectedItem:R,selectedItemText:A,focusSelectedItem:N}=p,_=m.useCallback(()=>{if(h.trigger&&h.valueNode&&v&&w&&C&&R&&A){const U=h.trigger.getBoundingClientRect(),ee=w.getBoundingClientRect(),ae=h.valueNode.getBoundingClientRect(),oe=A.getBoundingClientRect();if(h.dir!=="rtl"){const Oe=oe.left-ee.left,qe=ae.left-Oe,yt=U.left-qe,Ht=U.width+yt,Kt=Math.max(Ht,ee.width),Wn=window.innerWidth-In,jn=Ff(qe,[In,Math.max(In,Wn-Kt)]);v.style.minWidth=Ht+"px",v.style.left=jn+"px"}else{const Oe=ee.right-oe.right,qe=window.innerWidth-ae.right-Oe,yt=window.innerWidth-U.right-qe,Ht=U.width+yt,Kt=Math.max(Ht,ee.width),Wn=window.innerWidth-In,jn=Ff(qe,[In,Math.max(In,Wn-Kt)]);v.style.minWidth=Ht+"px",v.style.right=jn+"px"}const Z=x(),ie=window.innerHeight-In*2,se=C.scrollHeight,he=window.getComputedStyle(w),k=parseInt(he.borderTopWidth,10),$=parseInt(he.paddingTop,10),te=parseInt(he.borderBottomWidth,10),J=parseInt(he.paddingBottom,10),W=k+$+se+J+te,M=Math.min(R.offsetHeight*5,W),H=window.getComputedStyle(C),K=parseInt(H.paddingTop,10),B=parseInt(H.paddingBottom,10),ne=U.top+U.height/2-In,de=ie-ne,re=R.offsetHeight/2,ue=R.offsetTop+re,ge=k+$+ue,De=W-ge;if(ge<=ne){const Oe=Z.length>0&&R===Z[Z.length-1].ref.current;v.style.bottom="0px";const qe=w.clientHeight-C.offsetTop-C.offsetHeight,yt=Math.max(de,re+(Oe?B:0)+qe+te),Ht=ge+yt;v.style.height=Ht+"px"}else{const Oe=Z.length>0&&R===Z[0].ref.current;v.style.top="0px";const yt=Math.max(ne,k+C.offsetTop+(Oe?K:0)+re)+De;v.style.height=yt+"px",C.scrollTop=ge-ne+C.offsetTop}v.style.margin=`${In}px 0`,v.style.minHeight=M+"px",v.style.maxHeight=ie+"px",u==null||u(),requestAnimationFrame(()=>T.current=!0)}},[x,h.trigger,h.valueNode,v,w,C,R,A,h.dir,u]);Tt(()=>_(),[_]);const[P,q]=m.useState();Tt(()=>{w&&q(window.getComputedStyle(w).zIndex)},[w]);const z=m.useCallback(U=>{U&&j.current===!0&&(_(),N==null||N(),j.current=!1)},[_,N]);return s.jsx(rM,{scope:i,contentWrapper:v,shouldExpandOnScrollRef:T,onScrollButtonChange:z,children:s.jsx("div",{ref:g,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:P},children:s.jsx(Le.div,{...f,ref:b,style:{boxSizing:"border-box",maxHeight:"100%",...f.style}})})})},"SelectItemAlignedPosition")),Qy=m.forwardRef(nt(function(l,o){const{__scopeSelect:i,align:u="start",collisionPadding:f=In,...h}=l,p=Ih(i);return s.jsx(Eh,{...p,...h,ref:o,align:u,collisionPadding:f,style:{boxSizing:"border-box",...h.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)"}})},"SelectPopperPosition")),[rM,oM]=mr(sr,{}),Zy="SelectViewport",iM=m.forwardRef(nt(function(l,o){const{__scopeSelect:i,nonce:u,...f}=l,h=Bc(Zy,i),p=oM(Zy,i),v=Pe(o,h.onViewportChange),g=m.useRef(0);return s.jsxs(s.Fragment,{children:[s.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:u}),s.jsx(Hc.Slot,{scope:i,children:s.jsx(Le.div,{"data-radix-select-viewport":"",role:"presentation",...f,ref:v,style:{position:"relative",flex:1,overflow:"hidden auto",...f.style},onScroll:xe(f.onScroll,w=>{const S=w.currentTarget,{contentWrapper:b,shouldExpandOnScrollRef:x}=p;if(x!=null&&x.current&&b){const T=Math.abs(g.current-S.scrollTop);if(T>0){const j=window.innerHeight-In*2,C=parseFloat(b.style.minHeight),R=parseFloat(b.style.height),A=Math.max(C,R);if(A<j){const N=A+T,_=Math.min(j,N),P=N-_;b.style.height=_+"px",b.style.bottom==="0px"&&(S.scrollTop=P>0?P:0,b.style.justifyContent="flex-end")}}}g.current=S.scrollTop})})})]})},"SelectViewport")),sM="SelectGroup",[__,O_]=mr(sM),Jf="SelectItem",[cM,G0]=mr(Jf),I0=m.forwardRef(nt(function(l,o){const{__scopeSelect:i,value:u,disabled:f=!1,textValue:h,...p}=l,v=Ul(Jf,i),g=Bc(Jf,i),w=v.value===u,[S,b]=m.useState(h??""),[x,T]=m.useState(!1),j=Un(_=>{var P;return(P=g.itemRefCallback)==null?void 0:P.call(g,_,u,f)}),C=Pe(o,j),R=ca(),A=m.useRef("touch"),N=nt(()=>{f||(v.onValueChange(u),v.onOpenChange(!1))},"handleSelect");return s.jsx(cM,{scope:i,value:u,disabled:f,textId:R,isSelected:w,onItemTextChange:m.useCallback(_=>{b(P=>P||((_==null?void 0:_.textContent)??"").trim())},[]),children:s.jsx(Hc.ItemSlot,{scope:i,value:u,disabled:f,textValue:S,children:s.jsx(Le.div,{role:"option","aria-labelledby":R,"data-highlighted":x?"":void 0,"aria-selected":w&&x,"data-state":w?"checked":"unchecked","aria-disabled":f||void 0,"data-disabled":f?"":void 0,tabIndex:f?void 0:-1,...p,ref:C,onFocus:xe(p.onFocus,()=>T(!0)),onBlur:xe(p.onBlur,()=>T(!1)),onClick:xe(p.onClick,()=>{A.current!=="mouse"&&N()}),onPointerUp:xe(p.onPointerUp,()=>{A.current==="mouse"&&N()}),onPointerDown:xe(p.onPointerDown,_=>{A.current=_.pointerType}),onPointerMove:xe(p.onPointerMove,_=>{var P;A.current=_.pointerType,f?(P=g.onItemLeave)==null||P.call(g):A.current==="mouse"&&_.currentTarget.focus({preventScroll:!0})}),onPointerLeave:xe(p.onPointerLeave,_=>{var P;_.currentTarget===document.activeElement&&((P=g.onItemLeave)==null||P.call(g))}),onKeyDown:xe(p.onKeyDown,_=>{var q;f||_.target!==_.currentTarget||((q=g.searchRef)==null?void 0:q.current)!==""&&_.key===" "||(qA.includes(_.key)&&N(),_.key===" "&&_.preventDefault())})})})})},"SelectItem")),lc="SelectItemText",uM=m.forwardRef(nt(function(l,o){const{__scopeSelect:i,className:u,style:f,...h}=l,p=Ul(lc,i),v=Bc(lc,i),g=G0(lc,i),w=IA(lc,i),[S,b]=m.useState(null),x=Un(N=>{var _;return(_=v.itemTextRefCallback)==null?void 0:_.call(v,N,g.value,g.disabled)}),T=Pe(o,b,g.onItemTextChange,x),j=S==null?void 0:S.textContent,C=m.useMemo(()=>s.jsx("option",{value:g.value,disabled:g.disabled,children:j},g.value),[g.disabled,g.value,j]),{onNativeOptionAdd:R,onNativeOptionRemove:A}=w;return Tt(()=>(R(C),()=>A(C)),[R,A,C]),s.jsxs(s.Fragment,{children:[s.jsx(Le.span,{id:g.textId,...h,ref:T}),g.isSelected&&p.valueNode&&!p.valueNodeHasChildren&&!zi(p.value)?go.createPortal(h.children,p.valueNode):null]})},"SelectItemText")),dM="SelectItemIndicator",fM=m.forwardRef(nt(function(l,o){const{__scopeSelect:i,...u}=l;return G0(dM,i).isSelected?s.jsx(Le.span,{"aria-hidden":!0,...u,ref:o}):null},"SelectItemIndicator")),hM="SelectBubbleInput",mM=m.forwardRef(nt(function({__scopeSelect:l,...o},i){const u=Ul(hM,l),{value:f,onValueChange:h,required:p,disabled:v,name:g,autoComplete:w,form:S}=u,{nativeOptions:b,nativeSelectKey:x}=u,T=m.useRef(null),j=Pe(i,T),C=f??"",R=H0(C),A=Array.from(b).some(N=>(N.props.value??"")==="");return m.useEffect(()=>{const N=T.current;if(!N)return;const _=window.HTMLSelectElement.prototype,q=Object.getOwnPropertyDescriptor(_,"value").set;if(R!==C&&q){const z=new Event("change",{bubbles:!0});q.call(N,C),N.dispatchEvent(z)}},[R,C]),s.jsxs(Le.select,{"aria-hidden":!0,required:p,tabIndex:-1,name:g,autoComplete:w,disabled:v,form:S,onChange:N=>h(N.target.value),...o,style:{...B0,...o.style},ref:j,defaultValue:C,children:[zi(f)&&!A?s.jsx("option",{value:""}):null,Array.from(b)]},x)},"SelectBubbleInput"));function $0(a){return typeof a=="function"}nt($0,"isFunction");function zi(a){return a===""||a===void 0}nt(zi,"shouldShowPlaceholder");function $h(a){const l=Un(a),o=m.useRef(""),i=m.useRef(0),u=m.useCallback(h=>{const p=o.current+h;l(p),nt((function v(g){o.current=g,window.clearTimeout(i.current),g!==""&&(i.current=window.setTimeout(()=>v(""),1e3))}),"updateSearch")(p)},[l]),f=m.useCallback(()=>{o.current="",window.clearTimeout(i.current)},[]);return m.useEffect(()=>()=>window.clearTimeout(i.current),[]),[o,u,f]}nt($h,"useTypeaheadSearch");function Kh(a,l,o){const u=l.length>1&&Array.from(l).every(g=>g===l[0])?l[0]:l,f=o?a.indexOf(o):-1;let h=K0(a,Math.max(f,0));u.length===1&&(h=h.filter(g=>g!==o));const v=h.find(g=>g.textValue.toLowerCase().startsWith(u.toLowerCase()));return v!==o?v:void 0}nt(Kh,"findNextItem");function K0(a,l){return a.map((o,i)=>a[(l+i)%a.length])}nt(K0,"wrapArray");const kn=$A,Ln=QA,yn=m.forwardRef(({className:a,children:l,...o},i)=>s.jsxs(q0,{ref:i,className:Ee("flex h-9 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",a),...o,children:[l,s.jsx(ZA,{asChild:!0,children:s.jsx(bC,{className:"h-4 w-4 opacity-50"})})]}));yn.displayName=q0.displayName;const xn=m.forwardRef(({className:a,children:l,position:o="popper",...i},u)=>s.jsx(eM,{children:s.jsx(V0,{ref:u,className:Ee("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md",a),position:o,...i,children:s.jsx(iM,{className:Ee("p-1",o==="popper"&&"w-full min-w-[var(--radix-select-trigger-width)]"),children:l})})}));xn.displayName=V0.displayName;const rt=m.forwardRef(({className:a,children:l,...o},i)=>s.jsxs(I0,{ref:i,className:Ee("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),...o,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(fM,{children:s.jsx(jx,{className:"h-4 w-4"})})}),s.jsx(uM,{children:l})]}));rt.displayName=I0.displayName;var pM=Object.defineProperty,kl=(a,l)=>pM(a,"name",{value:l,configurable:!0}),Xh="Switch",[vM,D_]=sn(Xh),[gM,Qh]=vM(Xh);function X0(a){const{__scopeSwitch:l,checked:o,children:i,defaultChecked:u,disabled:f,form:h,name:p,onCheckedChange:v,required:g,value:w="on",internal_do_not_use_render:S}=a,[b,x]=Xa({prop:o,defaultProp:u??!1,onChange:v,caller:Xh}),[T,j]=m.useState(null),[C,R]=m.useState(null),A=m.useRef(!1),[N,_]=m.useReducer(z=>z+1,0),P=T?!!h||!!T.closest("form"):!0,q={checked:b,setChecked:x,disabled:f,control:T,setControl:j,name:p,form:h,value:w,hasConsumerStoppedPropagationRef:A,userInteractionCount:N,onUserInteraction:_,required:g,defaultChecked:u,isFormControl:P,bubbleInput:C,setBubbleInput:R};return s.jsx(gM,{scope:l,...q,children:Z0(S)?S(q):i})}kl(X0,"SwitchProvider");var yM="SwitchTrigger",xM=m.forwardRef(kl(function({__scopeSwitch:l,onClick:o,...i},u){const{control:f,form:h,value:p,disabled:v,checked:g,required:w,setControl:S,setChecked:b,hasConsumerStoppedPropagationRef:x,onUserInteraction:T,isFormControl:j,bubbleInput:C}=Qh(yM,l),R=Pe(u,S),A=m.useRef(g);return m.useEffect(()=>{const N=h?f==null?void 0:f.ownerDocument.getElementById(h):f==null?void 0:f.form;if(N instanceof HTMLFormElement){const _=kl(()=>b(A.current),"reset");return N.addEventListener("reset",_),()=>N.removeEventListener("reset",_)}},[f,h,b]),s.jsx(Le.button,{type:"button",role:"switch","aria-checked":g,"aria-required":w,"data-state":Zh(g),"data-disabled":v?"":void 0,disabled:v,value:p,...i,ref:R,onClick:xe(o,N=>{T(),b(_=>!_),C&&j&&(x.current=N.isPropagationStopped(),x.current||N.stopPropagation())})})},"SwitchTrigger")),Q0=m.forwardRef(kl(function(l,o){const{__scopeSwitch:i,name:u,checked:f,defaultChecked:h,required:p,disabled:v,value:g,onCheckedChange:w,form:S,...b}=l;return s.jsx(X0,{__scopeSwitch:i,checked:f,defaultChecked:h,disabled:v,required:p,onCheckedChange:w,name:u,form:S,value:g,internal_do_not_use_render:({isFormControl:x})=>s.jsxs(s.Fragment,{children:[s.jsx(xM,{...b,ref:o,__scopeSwitch:i}),x&&s.jsx(jM,{__scopeSwitch:i})]})})},"Switch")),bM="SwitchThumb",SM=m.forwardRef(kl(function(l,o){const{__scopeSwitch:i,...u}=l,f=Qh(bM,i);return s.jsx(Le.span,{"data-state":Zh(f.checked),"data-disabled":f.disabled?"":void 0,...u,ref:o})},"SwitchThumb")),wM="SwitchBubbleInput",jM=m.forwardRef(kl(function({__scopeSwitch:l,onClick:o,...i},u){const{control:f,hasConsumerStoppedPropagationRef:h,userInteractionCount:p,checked:v,defaultChecked:g,required:w,disabled:S,name:b,value:x,form:T,bubbleInput:j,setBubbleInput:C}=Qh(wM,l),R=Pe(u,C),A=Mc(f),N=m.useRef(!1),_=m.useRef(v),P=m.useRef(p);m.useEffect(()=>{const z=j;if(!z)return;const U=window.HTMLInputElement.prototype,ae=Object.getOwnPropertyDescriptor(U,"checked").set,oe=p!==P.current;P.current=p;const Z=_.current!==v;_.current=v;const ie=!(oe&&h.current);if(Z&&ae){N.current=!oe;const se=new Event("click",{bubbles:ie});ae.call(z,v),z.dispatchEvent(se),N.current=!1}},[j,v,h,p]);const q=m.useRef(v);return s.jsx(Le.input,{type:"checkbox","aria-hidden":!0,defaultChecked:g??q.current,required:w,disabled:S,name:b,value:x,form:T,...i,tabIndex:-1,ref:R,onClick:xe(o,z=>{N.current&&z.stopPropagation()}),style:{...i.style,...A,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"SwitchBubbleInput"));function Z0(a){return typeof a=="function"}kl(Z0,"isFunction");function Zh(a){return a?"checked":"unchecked"}kl(Zh,"getState");const cr=m.forwardRef(({className:a,...l},o)=>s.jsx(Q0,{className:Ee("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",a),...l,ref:o,children:s.jsx(SM,{className:Ee("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));cr.displayName=Q0.displayName;const rr={name:"",slug:"",type:"openai",baseUrl:"https://api.openai.com",apiKey:"",customHeaders:"",enabled:!0};function CM(){const[a,l]=m.useState([]),[o,i]=m.useState(!1),[u,f]=m.useState(rr),[h,p]=m.useState(!1),[v,g]=m.useState(null),[w,S]=m.useState(null),[b,x]=m.useState(rr),[T,j]=m.useState(null),[C,R]=m.useState(!1),A=()=>Ce.get("/api/admin/providers").then(U=>l(U.providers));m.useEffect(()=>{A()},[]);const N=async()=>{p(!0);try{let U;if(u.customHeaders.trim())try{U=JSON.parse(u.customHeaders)}catch{throw new Error("Custom headers must be valid JSON object")}await Ce.post("/api/admin/providers",{name:u.name,slug:u.slug||void 0,type:u.type,baseUrl:u.baseUrl,apiKey:u.apiKey,customHeaders:U,enabled:u.enabled}),be.success("Provider created"),i(!1),f(rr),A()}catch(U){be.error(U.message)}finally{p(!1)}},_=async U=>{g(U);try{const ee=await Ce.post(`/api/admin/providers/${U}/test`);be.success(ee.ok?`Connection OK: ${ee.detail}`:`Failed: ${ee.detail}`),A()}catch(ee){be.error(ee.message)}finally{g(null)}},P=U=>{S(U.id),x({...rr,name:U.name,slug:U.slug||"",type:U.type,baseUrl:U.baseUrl,apiKey:"",customHeaders:"",enabled:U.enabled})},q=async()=>{if(w){p(!0);try{let U;if(b.customHeaders.trim())try{U=JSON.parse(b.customHeaders)}catch{throw new Error("Custom headers must be valid JSON object")}await Ce.patch("/api/admin/providers",{id:w,name:b.name,slug:b.slug||void 0,type:b.type,baseUrl:b.baseUrl,apiKey:b.apiKey||void 0,customHeaders:U,enabled:b.enabled}),be.success("Provider updated"),S(null),x(rr),A()}catch(U){be.error(U.message)}finally{p(!1)}}},z=async U=>{R(!0);try{await Ce.del(`/api/admin/providers/${U}`),be.success("Provider removed"),A()}catch(ee){be.error(ee.message)}finally{R(!1),j(null)}};return s.jsxs("div",{children:[s.jsx(ga,{title:"Providers",description:"Upstream LLM providers and their credentials",actions:s.jsxs(Ga,{open:o,onOpenChange:i,children:[s.jsx(Di,{asChild:!0,children:s.jsxs(ve,{children:[s.jsx(Ni,{className:"mr-1 h-4 w-4"})," Add provider"]})}),s.jsxs(ua,{children:[s.jsx(da,{children:s.jsx(fa,{children:"New provider"})}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx(Se,{children:"Name"}),s.jsx(Me,{value:u.name,onChange:U=>f({...u,name:U.target.value})})]}),s.jsxs("div",{children:[s.jsx(Se,{children:"Slug (optional)"}),s.jsx(Me,{value:u.slug,onChange:U=>f({...u,slug:U.target.value})})]}),s.jsxs("div",{children:[s.jsx(Se,{children:"Type"}),s.jsxs(kn,{value:u.type,onValueChange:U=>f({...u,type:U}),children:[s.jsx(yn,{children:s.jsx(Ln,{})}),s.jsxs(xn,{children:[s.jsx(rt,{value:"openai",children:"OpenAI-compatible"}),s.jsx(rt,{value:"anthropic",children:"Anthropic-compatible"})]})]})]}),s.jsxs("div",{children:[s.jsx(Se,{children:"Base URL"}),s.jsx(Me,{value:u.baseUrl,onChange:U=>f({...u,baseUrl:U.target.value})})]}),s.jsxs("div",{children:[s.jsx(Se,{children:"API key"}),s.jsx(Me,{type:"password",value:u.apiKey,onChange:U=>f({...u,apiKey:U.target.value})})]}),s.jsxs("div",{children:[s.jsx(Se,{children:"Custom headers (JSON)"}),s.jsx(Me,{value:u.customHeaders,onChange:U=>f({...u,customHeaders:U.target.value}),placeholder:'{"X-Org":"acme"}'})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(cr,{checked:u.enabled,onCheckedChange:U=>f({...u,enabled:U})}),s.jsx(Se,{children:"Enabled"})]})]}),s.jsxs(Ia,{children:[s.jsx(ve,{variant:"outline",onClick:()=>i(!1),children:"Cancel"}),s.jsx(ve,{disabled:h||!u.name||!u.apiKey,onClick:N,children:"Create"})]})]})]})}),s.jsxs(Ge,{children:[s.jsxs(Ie,{children:[s.jsx($e,{className:"text-base",children:"All providers"}),s.jsxs(on,{children:[a.length," total"]})]}),s.jsx(Ke,{children:s.jsxs(Xn,{children:[s.jsx(Qn,{children:s.jsxs(Ze,{children:[s.jsx(pe,{children:"Name"}),s.jsx(pe,{children:"Type"}),s.jsx(pe,{children:"Base URL"}),s.jsx(pe,{children:"Models"}),s.jsx(pe,{children:"Health"}),s.jsx(pe,{children:"Enabled"}),s.jsx(pe,{className:"text-right",children:"Actions"})]})}),s.jsxs(Zn,{children:[a.length===0&&s.jsx(Ze,{children:s.jsx(ce,{colSpan:7,className:"text-center text-muted-foreground",children:"No providers yet."})}),a.map(U=>s.jsxs(Ze,{children:[s.jsxs(ce,{className:"font-medium",children:[U.name," ",s.jsx("span",{className:"text-xs text-muted-foreground",children:U.slug})]}),s.jsx(ce,{children:s.jsx(it,{variant:"outline",children:U.type})}),s.jsx(ce,{className:"text-xs text-muted-foreground",children:U.baseUrl}),s.jsx(ce,{children:U.modelCount}),s.jsx(ce,{children:s.jsx(it,{variant:U.health==="healthy"?"success":U.health==="down"?"destructive":"secondary",children:U.health})}),s.jsx(ce,{children:U.enabled?"Yes":"No"}),s.jsx(ce,{className:"text-right",children:s.jsxs("div",{className:"flex justify-end gap-1",children:[s.jsx(ve,{size:"sm",variant:"outline",disabled:v===U.id,onClick:()=>_(U.id),children:s.jsx(MC,{className:"h-3 w-3"})}),s.jsx(ve,{size:"sm",variant:"outline",onClick:()=>P(U),children:"✎"}),s.jsx(ve,{size:"sm",variant:"outline",onClick:()=>j(U.id),children:s.jsx(zC,{className:"h-3 w-3"})})]})})]},U.id))]})]})})]}),s.jsx(Ga,{open:!!w,onOpenChange:U=>{U||(S(null),x(rr))},children:s.jsxs(ua,{children:[s.jsx(da,{children:s.jsx(fa,{children:"Edit provider"})}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx(Se,{children:"Name"}),s.jsx(Me,{value:b.name,onChange:U=>x({...b,name:U.target.value})})]}),s.jsxs("div",{children:[s.jsx(Se,{children:"Slug (optional)"}),s.jsx(Me,{value:b.slug,onChange:U=>x({...b,slug:U.target.value})})]}),s.jsxs("div",{children:[s.jsx(Se,{children:"Type"}),s.jsxs(kn,{value:b.type,onValueChange:U=>x({...b,type:U}),children:[s.jsx(yn,{children:s.jsx(Ln,{})}),s.jsxs(xn,{children:[s.jsx(rt,{value:"openai",children:"OpenAI-compatible"}),s.jsx(rt,{value:"anthropic",children:"Anthropic-compatible"})]})]})]}),s.jsxs("div",{children:[s.jsx(Se,{children:"Base URL"}),s.jsx(Me,{value:b.baseUrl,onChange:U=>x({...b,baseUrl:U.target.value})})]}),s.jsxs("div",{children:[s.jsx(Se,{children:"API key (leave empty to keep current)"}),s.jsx(Me,{type:"password",value:b.apiKey,onChange:U=>x({...b,apiKey:U.target.value})})]}),s.jsxs("div",{children:[s.jsx(Se,{children:"Custom headers (JSON)"}),s.jsx(Me,{value:b.customHeaders,onChange:U=>x({...b,customHeaders:U.target.value}),placeholder:'{"X-Org":"acme"}'})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(cr,{checked:b.enabled,onCheckedChange:U=>x({...b,enabled:U})}),s.jsx(Se,{children:"Enabled"})]})]}),s.jsxs(Ia,{children:[s.jsx(ve,{variant:"outline",onClick:()=>{S(null),x(rr)},children:"Cancel"}),s.jsx(ve,{disabled:h||!b.name,onClick:q,children:"Save changes"})]})]})}),s.jsx(z0,{open:!!T,onOpenChange:U=>{U||j(null)},children:s.jsxs(Bh,{children:[s.jsxs(L0,{children:[s.jsx(Ph,{children:"Delete provider?"}),s.jsx(qh,{children:"This will soft-disable the provider if models depend on it."})]}),s.jsxs(U0,{children:[s.jsx(Yh,{children:"Cancel"}),s.jsx(Vh,{disabled:C,onClick:U=>{T&&(U.preventDefault(),z(T))},children:C?"Deleting…":"Delete"})]})]})})]})}var EM=Object.defineProperty,Fa=(a,l)=>EM(a,"name",{value:l,configurable:!0}),Fh="Checkbox",[RM,z_]=sn(Fh),[TM,Jh]=RM(Fh);function F0(a){const{__scopeCheckbox:l,checked:o,children:i,defaultChecked:u,disabled:f,form:h,name:p,onCheckedChange:v,required:g,value:w="on",internal_do_not_use_render:S}=a,[b,x]=Xa({prop:o,defaultProp:u??!1,onChange:v,caller:Fh}),[T,j]=m.useState(null),[C,R]=m.useState(null),A=m.useRef(!1),[N,_]=m.useReducer(z=>z+1,0),P=T?!!h||!!T.closest("form"):!0,q={checked:b,disabled:f,setChecked:x,control:T,setControl:j,name:p,form:h,value:w,hasConsumerStoppedPropagationRef:A,userInteractionCount:N,onUserInteraction:_,required:g,defaultChecked:$a(u)?!1:u,isFormControl:P,bubbleInput:C,setBubbleInput:R};return s.jsx(TM,{scope:l,...q,children:W0(S)?S(q):i})}Fa(F0,"CheckboxProvider");var NM="CheckboxTrigger",AM=m.forwardRef(Fa(function({__scopeCheckbox:l,onKeyDown:o,onClick:i,...u},f){const{control:h,value:p,disabled:v,checked:g,required:w,setControl:S,setChecked:b,hasConsumerStoppedPropagationRef:x,onUserInteraction:T,isFormControl:j,bubbleInput:C}=Jh(NM,l),R=Pe(f,S),A=m.useRef(g);return m.useEffect(()=>{const N=h==null?void 0:h.form;if(N){const _=Fa(()=>b(A.current),"reset");return N.addEventListener("reset",_),()=>N.removeEventListener("reset",_)}},[h,b]),s.jsx(Le.button,{type:"button",role:"checkbox","aria-checked":$a(g)?"mixed":g,"aria-required":w,"data-state":Wh(g),"data-disabled":v?"":void 0,disabled:v,value:p,...u,ref:R,onKeyDown:xe(o,N=>{N.key==="Enter"&&N.preventDefault()}),onClick:xe(i,N=>{T(),b(_=>$a(_)?!0:!_),C&&j&&(x.current=N.isPropagationStopped(),x.current||N.stopPropagation())})})},"CheckboxTrigger")),J0=m.forwardRef(Fa(function(l,o){const{__scopeCheckbox:i,name:u,checked:f,defaultChecked:h,required:p,disabled:v,value:g,onCheckedChange:w,form:S,...b}=l;return s.jsx(F0,{__scopeCheckbox:i,checked:f,defaultChecked:h,disabled:v,required:p,onCheckedChange:w,name:u,form:S,value:g,internal_do_not_use_render:({isFormControl:x})=>s.jsxs(s.Fragment,{children:[s.jsx(AM,{...b,ref:o,__scopeCheckbox:i}),x&&s.jsx(DM,{__scopeCheckbox:i})]})})},"Checkbox")),MM="CheckboxIndicator",_M=m.forwardRef(Fa(function(l,o){const{__scopeCheckbox:i,forceMount:u,...f}=l,h=Jh(MM,i);return s.jsx(Wa,{present:u||$a(h.checked)||h.checked===!0,children:s.jsx(Le.span,{"data-state":Wh(h.checked),"data-disabled":h.disabled?"":void 0,...f,ref:o,style:{pointerEvents:"none",...l.style}})})},"CheckboxIndicator")),OM="CheckboxBubbleInput",DM=m.forwardRef(Fa(function({__scopeCheckbox:l,onClick:o,...i},u){const{control:f,hasConsumerStoppedPropagationRef:h,userInteractionCount:p,checked:v,defaultChecked:g,required:w,disabled:S,name:b,value:x,form:T,bubbleInput:j,setBubbleInput:C}=Jh(OM,l),R=Pe(u,C),A=Mc(f),N=m.useRef(!1),_=m.useRef(v),P=m.useRef(p);m.useEffect(()=>{const z=j;if(!z)return;const U=window.HTMLInputElement.prototype,ae=Object.getOwnPropertyDescriptor(U,"checked").set,oe=p!==P.current;P.current=p;const Z=_.current!==v;_.current=v;const ie=!(oe&&h.current);if(Z&&ae){N.current=!oe;const se=new Event("click",{bubbles:ie});z.indeterminate=$a(v),ae.call(z,$a(v)?!1:v),z.dispatchEvent(se),N.current=!1}},[j,v,h,p]);const q=m.useRef($a(v)?!1:v);return s.jsx(Le.input,{type:"checkbox","aria-hidden":!0,defaultChecked:g??q.current,required:w,disabled:S,name:b,value:x,form:T,...i,tabIndex:-1,ref:R,onClick:xe(o,z=>{N.current&&z.stopPropagation()}),style:{...i.style,...A,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"CheckboxBubbleInput"));function W0(a){return typeof a=="function"}Fa(W0,"isFunction");function $a(a){return a==="indeterminate"}Fa($a,"isIndeterminate");function Wh(a){return $a(a)?"indeterminate":a?"checked":"unchecked"}Fa(Wh,"getState");const em=m.forwardRef(({className:a,...l},o)=>s.jsx(J0,{ref:o,className:Ee("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",a),...l,children:s.jsx(_M,{className:Ee("flex items-center justify-center text-current"),children:s.jsx(jx,{className:"h-3.5 w-3.5"})})}));em.displayName=J0.displayName;function zM(){const[a,l]=m.useState([]),[o,i]=m.useState([]),[u,f]=m.useState("all"),[h,p]=m.useState(!1),[v,g]=m.useState(""),[w,S]=m.useState([]),[b,x]=m.useState(new Set),[T,j]=m.useState(!1),[C,R]=m.useState(""),A=async()=>{const[z,U]=await Promise.all([Ce.get("/api/admin/models"),Ce.get("/api/admin/providers")]);l(z.models),i(U.providers)};m.useEffect(()=>{A()},[]);const N=a.filter(z=>!(u!=="all"&&z.providerId!==u||C&&!z.publicModelId.toLowerCase().includes(C.toLowerCase()))),_=async()=>{if(v){j(!0);try{const z=await Ce.post(`/api/admin/providers/${v}/discover`);S(z.models),x(new Set)}catch(z){be.error(z.message)}finally{j(!1)}}},P=async()=>{if(b.size!==0)try{const z=await Ce.post("/api/admin/models/import",{providerId:v,modelIds:Array.from(b)});be.success(`Imported ${z.imported} of ${z.requested}`),p(!1),S([]),x(new Set),A()}catch(z){be.error(z.message)}},q=(z,U)=>{Ce.post(`/api/admin/models/${z}/toggle`).then(()=>A()).catch(ee=>be.error(ee.message))};return s.jsxs("div",{children:[s.jsx(ga,{title:"Models",description:"Physical models imported from providers",actions:s.jsxs(Ga,{open:h,onOpenChange:p,children:[s.jsx(Di,{asChild:!0,children:s.jsxs(ve,{variant:"outline",children:[s.jsx(Cx,{className:"mr-1 h-4 w-4"})," Fetch models"]})}),s.jsxs(ua,{className:"max-w-2xl",children:[s.jsx(da,{children:s.jsx(fa,{children:"Discover models"})}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-end gap-2",children:[s.jsx("div",{className:"flex-1",children:s.jsxs(kn,{value:v,onValueChange:g,children:[s.jsx(yn,{children:s.jsx(Ln,{placeholder:"Choose provider"})}),s.jsx(xn,{children:o.map(z=>s.jsx(rt,{value:z.id,children:z.name},z.id))})]})}),s.jsx(ve,{onClick:_,disabled:!v||T,children:T?"Fetching…":"Fetch"})]}),w.length>0&&s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"text-sm text-muted-foreground",children:[w.length," discovered · ",b.size," selected"]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(ve,{variant:"outline",size:"sm",onClick:()=>x(new Set(w.filter(z=>!z.alreadyImported).map(z=>z.upstreamId))),children:"Select All (new)"}),s.jsx(ve,{variant:"outline",size:"sm",onClick:()=>x(new Set),children:"Clear"})]})]}),s.jsx("div",{className:"max-h-80 space-y-1 overflow-auto rounded border p-2",children:w.map(z=>s.jsxs("label",{className:"flex items-center gap-2 rounded p-1 text-sm hover:bg-accent",children:[s.jsx(em,{checked:b.has(z.upstreamId),onCheckedChange:U=>{const ee=new Set(b);U?ee.add(z.upstreamId):ee.delete(z.upstreamId),x(ee)}}),s.jsx("span",{className:"font-mono text-xs",children:z.upstreamId}),z.alreadyImported&&s.jsx(it,{variant:"secondary",children:"imported"})]},z.upstreamId))})]})]}),s.jsxs(Ia,{children:[s.jsx(ve,{variant:"outline",onClick:()=>p(!1),children:"Cancel"}),s.jsxs(ve,{disabled:b.size===0,onClick:P,children:["Import ",b.size||""]})]})]})]})}),s.jsxs(Ge,{children:[s.jsxs(Ie,{children:[s.jsx($e,{className:"text-base",children:"All models"}),s.jsxs(on,{children:[a.length," total"]})]}),s.jsxs(Ke,{children:[s.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[s.jsxs(kn,{value:u,onValueChange:f,children:[s.jsx(yn,{className:"w-56",children:s.jsx(Ln,{})}),s.jsxs(xn,{children:[s.jsx(rt,{value:"all",children:"All providers"}),o.map(z=>s.jsx(rt,{value:z.id,children:z.name},z.id))]})]}),s.jsx(Me,{className:"max-w-xs",placeholder:"Search public ID",value:C,onChange:z=>R(z.target.value)})]}),s.jsxs(Xn,{children:[s.jsx(Qn,{children:s.jsxs(Ze,{children:[s.jsx(pe,{children:"Public ID"}),s.jsx(pe,{children:"Provider"}),s.jsx(pe,{children:"Upstream ID"}),s.jsx(pe,{children:"Capabilities"}),s.jsx(pe,{children:"Available"}),s.jsx(pe,{children:"Enabled"}),s.jsx(pe,{})]})}),s.jsxs(Zn,{children:[N.length===0&&s.jsx(Ze,{children:s.jsx(ce,{colSpan:7,className:"text-center text-muted-foreground",children:"No models"})}),N.map(z=>s.jsxs(Ze,{children:[s.jsx(ce,{className:"font-mono text-xs",children:z.publicModelId}),s.jsx(ce,{children:z.providerSlug}),s.jsx(ce,{className:"text-xs text-muted-foreground",children:z.upstreamModelId}),s.jsx(ce,{className:"space-x-1",children:Object.entries(z.capabilities).filter(([,U])=>U===!0).slice(0,4).map(([U])=>s.jsx(it,{variant:"outline",className:"mr-1",children:U},U))}),s.jsx(ce,{children:z.upstreamAvailable?s.jsx(it,{variant:"success",children:"up"}):s.jsx(it,{variant:"destructive",children:"down"})}),s.jsx(ce,{children:z.enabled?"Yes":"No"}),s.jsx(ce,{className:"text-right",children:s.jsx(ve,{size:"sm",variant:"outline",onClick:()=>q(z.id,!z.enabled),children:z.enabled?"Disable":"Enable"})})]},z.id))]})]})]})]})]})}function kM(){const[a,l]=m.useState([]),[o,i]=m.useState([]),[u,f]=m.useState(!1),[h,p]=m.useState({name:"",slug:"",mode:"fallback",enabled:!0,members:[]}),v=async()=>{const[x,T]=await Promise.all([Ce.get("/api/admin/combos"),Ce.get("/api/admin/models")]);l(x.combos),i(T.models)};m.useEffect(()=>{v()},[]);const g=x=>{p(T=>({...T,members:[...T.members,{modelId:x,weight:1,position:T.members.length,enabled:!0}]}))},w=x=>{p(T=>({...T,members:T.members.filter((j,C)=>C!==x).map((j,C)=>({...j,position:C}))}))},S=async()=>{if(h.members.length===0){be.error("Add at least one member");return}try{await Ce.post("/api/admin/combos",{name:h.name,slug:h.slug||void 0,mode:h.mode,enabled:h.enabled,members:h.members}),be.success("Combo created"),f(!1),p({name:"",slug:"",mode:"fallback",enabled:!0,members:[]}),v()}catch(x){be.error(x.message)}},b=async x=>{if(confirm("Delete this combo?"))try{await Ce.del(`/api/admin/combos/${x}`),be.success("Combo removed"),v()}catch(T){be.error(T.message)}};return s.jsxs("div",{children:[s.jsx(ga,{title:"Combos",description:"Virtual models combining physical models",actions:s.jsxs(Ga,{open:u,onOpenChange:f,children:[s.jsx(Di,{asChild:!0,children:s.jsxs(ve,{children:[s.jsx(Ni,{className:"mr-1 h-4 w-4"})," New combo"]})}),s.jsxs(ua,{className:"max-w-2xl",children:[s.jsx(da,{children:s.jsx(fa,{children:"New combo"})}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx(Se,{children:"Name"}),s.jsx(Me,{value:h.name,onChange:x=>p({...h,name:x.target.value})})]}),s.jsxs("div",{children:[s.jsx(Se,{children:"Slug (optional — leave empty to use the name as the model ID)"}),s.jsx(Me,{value:h.slug,onChange:x=>p({...h,slug:x.target.value}),placeholder:"empty → gpt-5.5 · set → combo/gpt-5.5"})]}),s.jsxs("div",{children:[s.jsx(Se,{children:"Mode"}),s.jsxs(kn,{value:h.mode,onValueChange:x=>p({...h,mode:x}),children:[s.jsx(yn,{children:s.jsx(Ln,{})}),s.jsxs(xn,{children:[s.jsx(rt,{value:"fallback",children:"Fallback (ordered)"}),s.jsx(rt,{value:"weighted_round_robin",children:"Weighted round-robin"})]})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(cr,{checked:h.enabled,onCheckedChange:x=>p({...h,enabled:x})}),s.jsx(Se,{children:"Enabled"})]}),s.jsxs("div",{children:[s.jsx(Se,{children:"Members"}),s.jsxs(kn,{onValueChange:g,children:[s.jsx(yn,{children:s.jsx(Ln,{placeholder:"Add a model"})}),s.jsx(xn,{children:o.map(x=>s.jsx(rt,{value:x.id,children:x.publicModelId},x.id))})]}),s.jsx("div",{className:"mt-2 space-y-1",children:h.members.map((x,T)=>{var j;return s.jsxs("div",{className:"flex items-center gap-2 rounded border p-2 text-sm",children:[s.jsx("span",{className:"font-mono text-xs",children:(j=o.find(C=>C.id===x.modelId))==null?void 0:j.publicModelId}),s.jsx(Me,{type:"number",min:1,value:x.weight,onChange:C=>{const R=Number(C.target.value);p(A=>({...A,members:A.members.map((N,_)=>_===T?{...N,weight:R}:N)}))},className:"w-20"}),s.jsx(ve,{size:"sm",variant:"outline",onClick:()=>w(T),children:"Remove"})]},T)})})]})]}),s.jsxs(Ia,{children:[s.jsx(ve,{variant:"outline",onClick:()=>f(!1),children:"Cancel"}),s.jsx(ve,{disabled:!h.name,onClick:S,children:"Create"})]})]})]})}),s.jsxs(Ge,{children:[s.jsxs(Ie,{children:[s.jsx($e,{className:"text-base",children:"All combos"}),s.jsxs(on,{children:[a.length," total"]})]}),s.jsx(Ke,{children:s.jsxs(Xn,{children:[s.jsx(Qn,{children:s.jsxs(Ze,{children:[s.jsx(pe,{children:"Public ID"}),s.jsx(pe,{children:"Mode"}),s.jsx(pe,{children:"Members"}),s.jsx(pe,{children:"Healthy"}),s.jsx(pe,{children:"Enabled"}),s.jsx(pe,{})]})}),s.jsxs(Zn,{children:[a.length===0&&s.jsx(Ze,{children:s.jsx(ce,{colSpan:6,className:"text-center text-muted-foreground",children:"No combos yet."})}),a.map(x=>s.jsxs(Ze,{children:[s.jsx(ce,{className:"font-mono text-xs",children:x.publicModelId}),s.jsx(ce,{children:s.jsx(it,{variant:"outline",children:x.mode})}),s.jsx(ce,{children:x.memberCount}),s.jsx(ce,{children:x.healthyMemberCount}),s.jsx(ce,{children:x.enabled?"Yes":"No"}),s.jsx(ce,{className:"text-right",children:s.jsx(ve,{size:"sm",variant:"outline",onClick:()=>b(x.id),children:"Delete"})})]},x.id))]})]})})]})]})}function LM(){const[a,l]=m.useState([]),[o,i]=m.useState([]),[u,f]=m.useState([]),[h,p]=m.useState(!1),[v,g]=m.useState({alias:"",targetKind:"model",targetId:"",enabled:!0}),w=async()=>{const[b,x,T]=await Promise.all([Ce.get("/api/admin/aliases"),Ce.get("/api/admin/models"),Ce.get("/api/admin/combos")]);l(b.aliases),i(x.models),f(T.combos)};m.useEffect(()=>{w()},[]);const S=async()=>{try{await Ce.post("/api/admin/aliases",v),be.success("Alias created"),p(!1),g({alias:"",targetKind:"model",targetId:"",enabled:!0}),w()}catch(b){be.error(b.message)}};return s.jsxs("div",{children:[s.jsx(ga,{title:"Aliases",description:"Stable client-visible names for models or combos",actions:s.jsxs(Ga,{open:h,onOpenChange:p,children:[s.jsx(Di,{asChild:!0,children:s.jsxs(ve,{children:[s.jsx(Ni,{className:"mr-1 h-4 w-4"})," New alias"]})}),s.jsxs(ua,{children:[s.jsx(da,{children:s.jsx(fa,{children:"New alias"})}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx(Se,{children:"Alias"}),s.jsx(Me,{value:v.alias,onChange:b=>g({...v,alias:b.target.value}),placeholder:"coding"})]}),s.jsxs("div",{children:[s.jsx(Se,{children:"Target type"}),s.jsxs(kn,{value:v.targetKind,onValueChange:b=>g({...v,targetKind:b}),children:[s.jsx(yn,{children:s.jsx(Ln,{})}),s.jsxs(xn,{children:[s.jsx(rt,{value:"model",children:"Model"}),s.jsx(rt,{value:"combo",children:"Combo"})]})]})]}),s.jsxs("div",{children:[s.jsx(Se,{children:"Target"}),s.jsxs(kn,{value:v.targetId,onValueChange:b=>g({...v,targetId:b}),children:[s.jsx(yn,{children:s.jsx(Ln,{placeholder:"Choose target"})}),s.jsx(xn,{children:(v.targetKind==="model"?o:u).map(b=>s.jsx(rt,{value:b.id,children:b.publicModelId},b.id))})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(cr,{checked:v.enabled,onCheckedChange:b=>g({...v,enabled:b})}),s.jsx(Se,{children:"Enabled"})]})]}),s.jsxs(Ia,{children:[s.jsx(ve,{variant:"outline",onClick:()=>p(!1),children:"Cancel"}),s.jsx(ve,{disabled:!v.alias||!v.targetId,onClick:S,children:"Create"})]})]})]})}),s.jsxs(Ge,{children:[s.jsxs(Ie,{children:[s.jsx($e,{className:"text-base",children:"All aliases"}),s.jsxs(on,{children:[a.length," total"]})]}),s.jsx(Ke,{children:s.jsxs(Xn,{children:[s.jsx(Qn,{children:s.jsxs(Ze,{children:[s.jsx(pe,{children:"Alias"}),s.jsx(pe,{children:"Target"}),s.jsx(pe,{children:"Type"}),s.jsx(pe,{children:"Enabled"}),s.jsx(pe,{})]})}),s.jsxs(Zn,{children:[a.length===0&&s.jsx(Ze,{children:s.jsx(ce,{colSpan:5,className:"text-center text-muted-foreground",children:"No aliases yet."})}),a.map(b=>s.jsxs(Ze,{children:[s.jsx(ce,{className:"font-mono text-xs",children:b.alias}),s.jsx(ce,{className:"font-mono text-xs",children:b.targetName??b.targetId}),s.jsx(ce,{children:s.jsx(it,{variant:"outline",children:b.targetKind})}),s.jsx(ce,{children:b.enabled?"Yes":"No"}),s.jsx(ce,{className:"text-right",children:s.jsx(ve,{size:"sm",variant:"outline",onClick:async()=>{await Ce.del(`/api/admin/aliases/${b.id}`),be.success("Removed"),w()},children:"Delete"})})]},b.id))]})]})})]})]})}function UM(){const[a,l]=m.useState([]),[o,i]=m.useState([]),[u,f]=m.useState([]),[h,p]=m.useState(!1),[v,g]=m.useState(null),[w,S]=m.useState(null),[b,x]=m.useState({name:"",expiresAt:"",allowAll:!0,permissions:[],rpmLimit:"",tpmLimit:"",concurrency:"",customSecret:""}),T=async()=>{const[R,A,N]=await Promise.all([Ce.get("/api/admin/api-keys"),Ce.get("/api/admin/models"),Ce.get("/api/admin/combos")]);l(R.apiKeys),i(A.models),f(N.combos)};m.useEffect(()=>{T()},[]);const j=async()=>{try{const R=await Ce.post("/api/admin/api-keys",{name:b.name,expiresAt:b.expiresAt||null,allowAllModels:b.allowAll,permissions:b.allowAll?void 0:b.permissions,rpmLimit:b.rpmLimit?Number(b.rpmLimit):null,tpmLimit:b.tpmLimit?Number(b.tpmLimit):null,maxConcurrent:b.concurrency?Number(b.concurrency):null,...b.customSecret.trim()?{secret:b.customSecret.trim()}:{}});p(!1),g({secret:R.secret,name:R.name}),x({name:"",expiresAt:"",allowAll:!0,permissions:[],rpmLimit:"",tpmLimit:"",concurrency:"",customSecret:""}),T()}catch(R){be.error(R.message)}},C=async R=>{window.confirm("Revoke this API key?")&&(await Ce.post(`/api/admin/api-keys/${R}/revoke`),be.success("Revoked"),T())};return s.jsxs("div",{children:[s.jsx(ga,{title:"API Keys",description:"Gateway bearer keys for client applications",actions:s.jsxs(Ga,{open:h,onOpenChange:p,children:[s.jsx(Di,{asChild:!0,children:s.jsxs(ve,{children:[s.jsx(Ni,{className:"mr-1 h-4 w-4"})," New key"]})}),s.jsxs(ua,{className:"max-w-2xl",children:[s.jsx(da,{children:s.jsx(fa,{children:"New API key"})}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx(Se,{children:"Name"}),s.jsx(Me,{value:b.name,onChange:R=>x({...b,name:R.target.value})})]}),s.jsxs("div",{children:[s.jsx(Se,{children:"Expires (optional)"}),s.jsx(Me,{type:"datetime-local",value:b.expiresAt,onChange:R=>x({...b,expiresAt:R.target.value})})]}),s.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[s.jsxs("div",{children:[s.jsx(Se,{children:"RPM limit"}),s.jsx(Me,{value:b.rpmLimit,onChange:R=>x({...b,rpmLimit:R.target.value}),type:"number"})]}),s.jsxs("div",{children:[s.jsx(Se,{children:"TPM limit"}),s.jsx(Me,{value:b.tpmLimit,onChange:R=>x({...b,tpmLimit:R.target.value}),type:"number"})]}),s.jsxs("div",{children:[s.jsx(Se,{children:"Concurrency"}),s.jsx(Me,{value:b.concurrency,onChange:R=>x({...b,concurrency:R.target.value}),type:"number"})]})]}),s.jsxs("div",{children:[s.jsx(Se,{children:"Key value (optional)"}),s.jsx(Me,{value:b.customSecret,onChange:R=>x({...b,customSecret:R.target.value}),placeholder:"Leave empty to auto-generate ld-…"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"If provided, this exact value is stored as the key. Otherwise a random ld-… key is generated."})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(cr,{checked:b.allowAll,onCheckedChange:R=>x({...b,allowAll:R})}),s.jsx(Se,{children:"Allow all current and future models"})]}),!b.allowAll&&s.jsxs("div",{children:[s.jsx(Se,{children:"Scope"}),s.jsx("div",{className:"max-h-48 space-y-1 overflow-auto rounded border p-2",children:[...o.map(R=>({targetKind:"model",targetId:R.id,label:R.publicModelId})),...u.map(R=>({targetKind:"combo",targetId:R.id,label:R.publicModelId}))].map(R=>{const A=b.permissions.some(N=>N.targetKind===R.targetKind&&N.targetId===R.targetId);return s.jsxs("label",{className:"flex items-center gap-2 rounded p-1 text-sm hover:bg-accent",children:[s.jsx(em,{checked:A,onCheckedChange:N=>{x(_=>({..._,permissions:N?[..._.permissions,{targetKind:R.targetKind,targetId:R.targetId}]:_.permissions.filter(P=>!(P.targetKind===R.targetKind&&P.targetId===R.targetId))}))}}),s.jsx("span",{className:"font-mono text-xs",children:R.label}),s.jsx(it,{variant:"outline",className:"ml-1",children:R.targetKind})]},`${R.targetKind}:${R.targetId}`)})})]})]}),s.jsxs(Ia,{children:[s.jsx(ve,{variant:"outline",onClick:()=>p(!1),children:"Cancel"}),s.jsx(ve,{disabled:!b.name,onClick:j,children:"Create"})]})]})]})}),s.jsxs(Ge,{children:[s.jsxs(Ie,{children:[s.jsx($e,{className:"text-base",children:"All keys"}),s.jsxs(on,{children:[a.length," total"]})]}),s.jsx(Ke,{children:s.jsxs(Xn,{children:[s.jsx(Qn,{children:s.jsxs(Ze,{children:[s.jsx(pe,{children:"Name"}),s.jsx(pe,{children:"Prefix"}),s.jsx(pe,{children:"Status"}),s.jsx(pe,{children:"Scope"}),s.jsx(pe,{children:"RPM/TPM/Conc"}),s.jsx(pe,{})]})}),s.jsxs(Zn,{children:[a.length===0&&s.jsx(Ze,{children:s.jsx(ce,{colSpan:6,className:"text-center text-muted-foreground",children:"No API keys yet."})}),a.map(R=>s.jsxs(Ze,{children:[s.jsx(ce,{className:"font-medium",children:R.name}),s.jsxs(ce,{className:"font-mono text-xs",children:[R.keyPrefix,"…"]}),s.jsx(ce,{children:R.enabled?s.jsx(it,{variant:"success",children:"enabled"}):s.jsx(it,{variant:"destructive",children:"disabled"})}),s.jsx(ce,{children:R.allowAllModels?"all":`${R.modelScopeCount} scoped`}),s.jsx(ce,{className:"text-xs",children:[R.rpmLimit,R.tpmLimit,R.concurrencyLimit].map((A,N)=>A?["","RPM","TPM","Conc"][N+1]:null).filter(Boolean).join(" / ")||"—"}),s.jsx(ce,{className:"text-right",children:s.jsxs("div",{className:"flex items-center justify-end gap-1",children:[R.secret&&s.jsxs(s.Fragment,{children:[s.jsx(ve,{size:"sm",variant:"ghost",title:"Copy secret",onClick:()=>{navigator.clipboard.writeText(R.secret),be.success("Copied")},children:s.jsx(hf,{className:"h-3.5 w-3.5"})}),s.jsx(ve,{size:"sm",variant:"ghost",title:"Show secret",onClick:()=>S({secret:R.secret,name:R.name}),children:s.jsx(CC,{className:"h-3.5 w-3.5"})})]}),s.jsx(ve,{size:"sm",variant:"outline",onClick:()=>C(R.id),children:"Revoke"})]})})]},R.id))]})]})})]}),s.jsx(Ga,{open:!!v,onOpenChange:R=>{R||g(null)},children:s.jsxs(ua,{children:[s.jsxs(da,{children:[s.jsx(fa,{children:"API key created"}),s.jsx(Zf,{children:"Copy now — this secret will not be shown again."})]}),s.jsx("div",{className:"rounded border bg-muted p-3 font-mono text-xs break-all",children:v==null?void 0:v.secret}),s.jsxs(Ia,{children:[s.jsxs(ve,{onClick:()=>{v&&(navigator.clipboard.writeText(v.secret),be.success("Copied"))},children:[s.jsx(hf,{className:"mr-1 h-4 w-4"})," Copy"]}),s.jsx(ve,{variant:"outline",onClick:()=>g(null),children:"I have saved it"})]})]})}),s.jsx(Ga,{open:!!w,onOpenChange:R=>{R||S(null)},children:s.jsxs(ua,{children:[s.jsxs(da,{children:[s.jsxs(fa,{children:["API key: ",w==null?void 0:w.name]}),s.jsx(Zf,{children:"Full secret for this key, readable any time."})]}),s.jsx("div",{className:"rounded border bg-muted p-3 font-mono text-xs break-all",children:w==null?void 0:w.secret}),s.jsxs(Ia,{children:[s.jsxs(ve,{onClick:()=>{w&&(navigator.clipboard.writeText(w.secret),be.success("Copied"))},children:[s.jsx(hf,{className:"mr-1 h-4 w-4"})," Copy"]}),s.jsx(ve,{variant:"outline",onClick:()=>S(null),children:"Close"})]})]})})]})}function HM(){const[a,l]=m.useState([]),[o,i]=m.useState(0),[u,f]=m.useState(0),[h,p]=m.useState({success:"all",protocol:"all",streaming:"all",model:""}),[v,g]=m.useState(null),[w,S]=m.useState(null),b=50,x=m.useCallback(async()=>{const j=new URLSearchParams;j.set("limit",String(b)),j.set("offset",String(u)),h.success!=="all"&&j.set("success",h.success),h.protocol!=="all"&&j.set("protocol",h.protocol),h.streaming!=="all"&&j.set("streaming",h.streaming),h.model&&j.set("requestedModel",h.model);const C=await Ce.get(`/api/admin/requests?${j.toString()}`);l(C.requests),i(C.total)},[u,h]);m.useEffect(()=>{x()},[x]);const T=async j=>{g(j);const C=await Ce.get(`/api/admin/requests/${j}`);S(C)};return s.jsxs("div",{children:[s.jsx(ga,{title:"Requests",description:`${o} matching · server-side paginated`}),s.jsxs(Ge,{children:[s.jsxs(Ie,{children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsxs(kn,{value:h.success,onValueChange:j=>{f(0),p({...h,success:j})},children:[s.jsx(yn,{className:"w-36",children:s.jsx(Ln,{})}),s.jsxs(xn,{children:[s.jsx(rt,{value:"all",children:"All"}),s.jsx(rt,{value:"true",children:"Success"}),s.jsx(rt,{value:"false",children:"Failed"})]})]}),s.jsxs(kn,{value:h.protocol,onValueChange:j=>{f(0),p({...h,protocol:j})},children:[s.jsx(yn,{className:"w-32",children:s.jsx(Ln,{})}),s.jsxs(xn,{children:[s.jsx(rt,{value:"all",children:"Any protocol"}),s.jsx(rt,{value:"openai",children:"OpenAI"}),s.jsx(rt,{value:"anthropic",children:"Anthropic"})]})]}),s.jsxs(kn,{value:h.streaming,onValueChange:j=>{f(0),p({...h,streaming:j})},children:[s.jsx(yn,{className:"w-32",children:s.jsx(Ln,{})}),s.jsxs(xn,{children:[s.jsx(rt,{value:"all",children:"Any"}),s.jsx(rt,{value:"true",children:"Streaming"}),s.jsx(rt,{value:"false",children:"Non-stream"})]})]}),s.jsx(Me,{className:"max-w-xs",placeholder:"Model contains…",value:h.model,onChange:j=>{f(0),p({...h,model:j.target.value})}})]}),s.jsx($e,{className:"mt-3 text-base",children:"Results"})]}),s.jsxs(Ke,{children:[s.jsxs(Xn,{children:[s.jsx(Qn,{children:s.jsxs(Ze,{children:[s.jsx(pe,{children:"Time"}),s.jsx(pe,{children:"Status"}),s.jsx(pe,{children:"Requested"}),s.jsx(pe,{children:"Final"}),s.jsx(pe,{children:"Tokens"}),s.jsx(pe,{children:"Latency"}),s.jsx(pe,{children:"Attempts"}),s.jsx(pe,{children:"Key"}),s.jsx(pe,{children:"IP"}),s.jsx(pe,{})]})}),s.jsxs(Zn,{children:[a.length===0&&s.jsx(Ze,{children:s.jsx(ce,{colSpan:10,className:"text-center text-muted-foreground",children:"No requests yet."})}),a.map(j=>s.jsxs(Ze,{className:"cursor-pointer",onClick:()=>T(j.id),children:[s.jsx(ce,{className:"text-xs",children:dh(j.createdAt)}),s.jsx(ce,{children:j.success?s.jsx(it,{variant:"success",children:j.httpStatus}):s.jsx(it,{variant:"destructive",children:j.httpStatus})}),s.jsx(ce,{className:"font-mono text-xs",children:j.requestedModel}),s.jsx(ce,{className:"font-mono text-xs text-muted-foreground",children:j.finalModelPublicId??"—"}),s.jsxs(ce,{className:"text-xs",children:[gn(j.inputTokens+j.outputTokens)," ",j.cacheReadTokens?s.jsxs("span",{className:"text-amber-600",children:["(+",j.cacheReadTokens," cache)"]}):null]}),s.jsxs(ce,{className:"text-xs",children:[so(j.totalLatencyMs),j.ttftMs?s.jsxs("span",{className:"text-muted-foreground",children:[" · ttft ",j.ttftMs,"ms"]}):null]}),s.jsxs(ce,{className:"text-xs",children:[j.attemptsCount,j.gatewayCacheHit?s.jsx(it,{variant:"secondary",className:"ml-1",children:"cache"}):null]}),s.jsx(ce,{className:"text-xs",children:j.apiKeyName??"—"}),s.jsx(ce,{className:"text-xs",children:j.clientIp}),s.jsx(ce,{className:"text-right",children:s.jsx(ve,{size:"sm",variant:"ghost",children:"View"})})]},j.id))]})]}),s.jsxs("div",{className:"mt-3 flex items-center justify-between",children:[s.jsxs("span",{className:"text-xs text-muted-foreground",children:["Showing ",u+1,"–",Math.min(u+b,o)," of ",o]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(ve,{size:"sm",variant:"outline",disabled:u===0,onClick:()=>f(Math.max(0,u-b)),children:"Prev"}),s.jsx(ve,{size:"sm",variant:"outline",disabled:u+b>=o,onClick:()=>f(u+b),children:"Next"})]})]})]})]}),s.jsx(Ga,{open:!!v,onOpenChange:j=>{j||(g(null),S(null))},children:s.jsxs(ua,{className:"max-w-3xl",children:[s.jsx(da,{children:s.jsxs(fa,{children:["Request ",m2(v,16)]})}),w?s.jsxs("div",{className:"space-y-3 text-sm",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-muted-foreground text-xs",children:"Status"}),w.request.success?s.jsx(it,{variant:"success",children:w.request.httpStatus}):s.jsx(it,{variant:"destructive",children:w.request.httpStatus})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-muted-foreground text-xs",children:"Latency"}),so(w.request.totalLatencyMs)]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-muted-foreground text-xs",children:"Tokens"}),"in ",gn(w.request.inputTokens)," · out ",gn(w.request.outputTokens)," · cache ",gn(w.request.cacheReadTokens)]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-muted-foreground text-xs",children:"Attempts"}),w.request.attemptsCount]})]}),w.request.errorType&&s.jsxs("div",{className:"rounded border border-destructive/40 bg-destructive/10 p-2",children:[s.jsx("div",{className:"text-xs text-muted-foreground",children:"Error"}),s.jsxs("div",{className:"font-mono text-xs",children:[w.request.errorType,": ",w.request.errorMessage]})]}),w.attempts.length>0&&s.jsxs("div",{children:[s.jsx("div",{className:"text-xs text-muted-foreground",children:"Attempts"}),s.jsxs(Xn,{children:[s.jsx(Qn,{children:s.jsxs(Ze,{children:[s.jsx(pe,{children:"#"}),s.jsx(pe,{children:"Provider"}),s.jsx(pe,{children:"Model"}),s.jsx(pe,{children:"Status"}),s.jsx(pe,{children:"Latency"}),s.jsx(pe,{children:"Reason"})]})}),s.jsx(Zn,{children:w.attempts.map(j=>s.jsxs(Ze,{children:[s.jsx(ce,{children:j.attemptNumber}),s.jsx(ce,{children:j.providerName}),s.jsx(ce,{className:"font-mono text-xs",children:j.modelPublicId}),s.jsx(ce,{children:j.success?s.jsx(it,{variant:"success",children:String(j.statusCode??"OK")}):s.jsx(it,{variant:"destructive",children:String(j.statusCode??"err")})}),s.jsx(ce,{className:"text-xs",children:so(j.latencyMs)}),s.jsx(ce,{className:"text-xs",children:j.failureReason??j.selectionReason})]},j.id))})]})]})]}):s.jsx("div",{className:"text-muted-foreground",children:"Loading…"})]})})]})}var BM=Object.defineProperty,jo=(a,l)=>BM(a,"name",{value:l,configurable:!0}),tm="Tabs",[PM,k_]=sn(tm,[Dc]),e1=Dc(),[qM,nm]=PM(tm),VM=m.forwardRef(jo(function(l,o){const{__scopeTabs:i,value:u,onValueChange:f,defaultValue:h,orientation:p="horizontal",dir:v,activationMode:g="automatic",...w}=l,S=Mi(v),[b,x]=Xa({prop:u,onChange:f,defaultProp:h??"",caller:tm});return s.jsx(qM,{scope:i,baseId:ca(),value:b,onValueChange:x,orientation:p,dir:S,activationMode:g,children:s.jsx(Le.div,{dir:S,"data-orientation":p,...w,ref:o})})},"Tabs")),YM="TabsList",GM=m.forwardRef(jo(function(l,o){const{__scopeTabs:i,loop:u=!0,...f}=l,h=nm(YM,i),p=e1(i);return s.jsx(qb,{asChild:!0,...p,orientation:h.orientation,dir:h.dir,loop:u,children:s.jsx(Le.div,{role:"tablist","aria-orientation":h.orientation,...f,ref:o})})},"TabsList")),IM="TabsTrigger",$M=m.forwardRef(jo(function(l,o){const{__scopeTabs:i,value:u,disabled:f=!1,...h}=l,p=nm(IM,i),v=e1(i),g=am(p.baseId,u),w=lm(p.baseId,u),S=u===p.value;return s.jsx(Vb,{asChild:!0,...v,focusable:!f,active:S,children:s.jsx(Le.button,{type:"button",role:"tab","aria-selected":S,"aria-controls":w,"data-state":S?"active":"inactive","data-disabled":f?"":void 0,disabled:f,id:g,...h,ref:o,onMouseDown:xe(l.onMouseDown,b=>{!f&&b.button===0&&b.ctrlKey===!1?p.onValueChange(u):b.preventDefault()}),onKeyDown:xe(l.onKeyDown,b=>{f||b.target!==b.currentTarget||[" ","Enter"].includes(b.key)&&p.onValueChange(u)}),onFocus:xe(l.onFocus,()=>{const b=p.activationMode!=="manual";!S&&!f&&b&&p.onValueChange(u)})})})},"TabsTrigger")),KM="TabsContent",XM=m.forwardRef(jo(function(l,o){const{__scopeTabs:i,value:u,forceMount:f,children:h,...p}=l,v=nm(KM,i),g=am(v.baseId,u),w=lm(v.baseId,u),S=u===v.value,b=m.useRef(S);return m.useEffect(()=>{const x=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(x)},[]),s.jsx(Wa,{present:f||S,children:({present:x})=>s.jsx(Le.div,{"data-state":S?"active":"inactive","data-orientation":v.orientation,role:"tabpanel","aria-labelledby":g,hidden:!x,id:w,tabIndex:0,...p,ref:o,style:{...l.style,animationDuration:b.current?"0s":void 0},children:x&&h})})},"TabsContent"));function am(a,l){return`${a}-trigger-${l}`}jo(am,"makeTriggerId");function lm(a,l){return`${a}-content-${l}`}jo(lm,"makeContentId");var QM=VM,t1=GM,n1=$M,a1=XM;const l1=QM,rm=m.forwardRef(({className:a,...l},o)=>s.jsx(t1,{ref:o,className:Ee("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",a),...l}));rm.displayName=t1.displayName;const Ml=m.forwardRef(({className:a,...l},o)=>s.jsx(n1,{ref:o,className:Ee("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",a),...l}));Ml.displayName=n1.displayName;const bi=m.forwardRef(({className:a,...l},o)=>s.jsx(a1,{ref:o,className:Ee("mt-2 ring-offset-background focus-visible:outline-none",a),...l}));bi.displayName=a1.displayName;function ZM(){const[a,l]=m.useState("7d"),[o,i]=m.useState(null),[u,f]=m.useState(!0),[h,p]=m.useState(null);if(m.useEffect(()=>{f(!0),p(null),Ce.get(`/api/admin/stats?preset=${a}`).then(g=>{i(g)}).catch(g=>{p(g.message)}).finally(()=>f(!1))},[a]),u)return s.jsx("div",{className:"text-muted-foreground",children:"Loading…"});if(h||!o)return s.jsxs("div",{className:"text-destructive",children:["Failed to load statistics: ",h??"unknown error"]});const v=o.summary;return s.jsxs("div",{children:[s.jsx(ga,{title:"Statistics",description:"Aggregated metrics for the selected range",actions:s.jsx(l1,{value:a,onValueChange:g=>l(g),children:s.jsxs(rm,{children:[s.jsx(Ml,{value:"today",children:"Today"}),s.jsx(Ml,{value:"7d",children:"7 days"}),s.jsx(Ml,{value:"30d",children:"30 days"})]})})}),s.jsxs("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:[s.jsxs(Ge,{children:[s.jsx(Ie,{className:"pb-1",children:s.jsx($e,{className:"text-sm text-muted-foreground",children:"Requests"})}),s.jsx(Ke,{className:"text-2xl font-semibold",children:gn(v.totalRequests)})]}),s.jsxs(Ge,{children:[s.jsx(Ie,{className:"pb-1",children:s.jsx($e,{className:"text-sm text-muted-foreground",children:"Success rate"})}),s.jsx(Ke,{className:"text-2xl font-semibold",children:xi(v.successRate)})]}),s.jsxs(Ge,{children:[s.jsx(Ie,{className:"pb-1",children:s.jsx($e,{className:"text-sm text-muted-foreground",children:"Total tokens"})}),s.jsx(Ke,{className:"text-2xl font-semibold",children:gn(v.totalTokens)})]}),s.jsxs(Ge,{children:[s.jsx(Ie,{className:"pb-1",children:s.jsx($e,{className:"text-sm text-muted-foreground",children:"Cache hit rate"})}),s.jsx(Ke,{className:"text-2xl font-semibold",children:xi(v.cacheHitRate)})]}),s.jsxs(Ge,{children:[s.jsx(Ie,{className:"pb-1",children:s.jsx($e,{className:"text-sm text-muted-foreground",children:"Avg latency"})}),s.jsx(Ke,{children:so(v.averageLatencyMs)})]}),s.jsxs(Ge,{children:[s.jsx(Ie,{className:"pb-1",children:s.jsx($e,{className:"text-sm text-muted-foreground",children:"p95 latency"})}),s.jsx(Ke,{children:so(v.p95LatencyMs)})]}),s.jsxs(Ge,{children:[s.jsx(Ie,{className:"pb-1",children:s.jsx($e,{className:"text-sm text-muted-foreground",children:"Avg TTFT"})}),s.jsx(Ke,{children:v.averageTtftMs?so(v.averageTtftMs):"—"})]}),s.jsxs(Ge,{children:[s.jsx(Ie,{className:"pb-1",children:s.jsx($e,{className:"text-sm text-muted-foreground",children:"Fallback rate"})}),s.jsx(Ke,{children:xi(v.fallbackRate)})]})]}),s.jsxs("div",{className:"mt-6 grid gap-4 lg:grid-cols-2",children:[s.jsxs(Ge,{children:[s.jsx(Ie,{children:s.jsx($e,{className:"text-base",children:"Top models"})}),s.jsx(Ke,{children:s.jsxs(Xn,{children:[s.jsx(Qn,{children:s.jsxs(Ze,{children:[s.jsx(pe,{children:"Model"}),s.jsx(pe,{children:"Requests"}),s.jsx(pe,{children:"Errors"}),s.jsx(pe,{children:"Tokens"})]})}),s.jsxs(Zn,{children:[o.topModels.length===0&&s.jsx(Ze,{children:s.jsx(ce,{colSpan:4,className:"text-muted-foreground text-center",children:"No data"})}),o.topModels.map(g=>s.jsxs(Ze,{children:[s.jsx(ce,{className:"font-mono text-xs",children:g.publicId}),s.jsx(ce,{children:gn(g.requests)}),s.jsx(ce,{children:xi(g.errorRate)}),s.jsx(ce,{children:gn(g.totalTokens)})]},g.publicId))]})]})})]}),s.jsxs(Ge,{children:[s.jsx(Ie,{children:s.jsx($e,{className:"text-base",children:"Top API keys"})}),s.jsx(Ke,{children:s.jsxs(Xn,{children:[s.jsx(Qn,{children:s.jsxs(Ze,{children:[s.jsx(pe,{children:"Key"}),s.jsx(pe,{children:"Requests"}),s.jsx(pe,{children:"Tokens"})]})}),s.jsxs(Zn,{children:[o.topApiKeys.length===0&&s.jsx(Ze,{children:s.jsx(ce,{colSpan:3,className:"text-muted-foreground text-center",children:"No data"})}),o.topApiKeys.map((g,w)=>s.jsxs(Ze,{children:[s.jsx(ce,{children:g.name}),s.jsx(ce,{children:gn(g.requests)}),s.jsx(ce,{children:gn(g.totalTokens)})]},w))]})]})})]})]}),s.jsxs(Ge,{className:"mt-6",children:[s.jsxs(Ie,{children:[s.jsx($e,{className:"text-base",children:"Series (requests / errors over time)"}),s.jsxs(on,{children:["Buckets: ",o.range.bucket]})]}),s.jsx(Ke,{children:s.jsx("div",{className:"grid grid-cols-12 gap-1 text-xs",children:o.series.map(g=>s.jsxs("div",{className:"flex flex-col items-center",title:`${g.t}: ${g.requests} req, ${g.errors} err`,children:[s.jsx("div",{className:"w-full bg-primary/80",style:{height:`${Math.min(80,g.requests*4)}px`}}),s.jsx("div",{className:"text-[10px] text-muted-foreground",children:g.t.slice(5,10)})]},g.t))})})]})]})}function FM(){const[a,l]=m.useState([]),[o,i]=m.useState(0);return m.useEffect(()=>{Ce.get("/api/admin/audit?limit=200").then(u=>{l(u.rows),i(u.total)})},[]),s.jsxs("div",{children:[s.jsx(ga,{title:"Audit Logs",description:`${o} entries · immutable`}),s.jsxs(Ge,{children:[s.jsx(Ie,{children:s.jsx($e,{className:"text-base",children:"All entries"})}),s.jsx(Ke,{children:s.jsxs(Xn,{children:[s.jsx(Qn,{children:s.jsxs(Ze,{children:[s.jsx(pe,{children:"Time"}),s.jsx(pe,{children:"Action"}),s.jsx(pe,{children:"Status"}),s.jsx(pe,{children:"Target"}),s.jsx(pe,{children:"IP"}),s.jsx(pe,{children:"Actor"})]})}),s.jsxs(Zn,{children:[a.length===0&&s.jsx(Ze,{children:s.jsx(ce,{colSpan:6,className:"text-center text-muted-foreground",children:"No audit events yet."})}),a.map(u=>s.jsxs(Ze,{children:[s.jsx(ce,{className:"text-xs",children:dh(u.createdAt)}),s.jsx(ce,{className:"font-mono text-xs",children:u.action}),s.jsx(ce,{children:u.success?s.jsx(it,{variant:"success",children:"ok"}):s.jsx(it,{variant:"destructive",children:"fail"})}),s.jsx(ce,{className:"text-xs",children:u.targetName??u.targetId??"—"}),s.jsx(ce,{className:"text-xs",children:u.ip}),s.jsx(ce,{className:"text-xs",children:u.actor})]},u.id))]})]})})]})]})}function JM(){const[a,l]=m.useState(null),[o,i]=m.useState(null),[u,f]=m.useState({current:"",next:""}),[h,p]=m.useState(null),[v,g]=m.useState(!1),[w,S]=m.useState("idle"),[b,x]=m.useState(null),T=async(B=!1)=>{S("checking"),x(null);try{const ne=await Ce.get(`/api/admin/update/check${B?"?force=1":""}`);p(ne),S("idle")}catch(ne){x(ne.message),S("error")}},j=async()=>{g(!0),S("installing"),x(null);try{await Ce.post("/api/admin/update/run"),S("restarting"),be.success("Update installed — restarting the gateway. The page will reload shortly.");const B=setInterval(()=>{fetch("/health").then(ne=>{ne.ok&&(clearInterval(B),window.location.reload())}).catch(()=>{})},3e3);setTimeout(()=>clearInterval(B),12e4)}catch(B){be.error(B.message),x(B.message),S("error")}finally{g(!1)}},[C,R]=m.useState("disabled"),[A,N]=m.useState(""),[_,P]=m.useState(""),[q,z]=m.useState(""),[U,ee]=m.useState([]),[ae,oe]=m.useState(""),[Z,ie]=m.useState(""),[se,he]=m.useState(!1),[k,$]=m.useState(null),te=async()=>{const B=await Ce.get("/api/admin/settings");l(B.settings);const ne=await Ce.get("/api/admin/settings/system");i(ne);try{const de=await Ce.get("/api/admin/me");R(de.totpEnabled?"enabled":"disabled")}catch{}};if(m.useEffect(()=>{te(),T()},[]),!a)return s.jsx("div",{className:"text-muted-foreground",children:"Loading…"});const J=async B=>{try{await Ce.patch("/api/admin/settings",B),be.success("Saved"),te()}catch(ne){be.error(ne.message)}},W=async()=>{try{const B=await Ce.post("/api/admin/account/totp/begin");N(B.secret),P(B.qr),R("setup"),be.info("Scan the QR code with your authenticator app")}catch(B){be.error(B.message)}},M=async()=>{if(!q||q.length!==6){be.error("Enter a 6-digit code");return}try{const B=await Ce.post("/api/admin/account/totp/verify",{code:q});ee(B.recoveryCodes),R("showingRecovery"),be.success("TOTP enabled successfully")}catch(B){be.error(B.message)}},H=async()=>{if(!ae){be.error("Enter your password");return}if(!Z){be.error("Enter a TOTP code or recovery code");return}try{await Ce.post("/api/admin/account/totp/disable",{password:ae,totp:Z}),R("disabled"),oe(""),ie(""),be.success("TOTP disabled"),te()}catch(B){be.error(B.message)}},K=async()=>{he(!0);try{const B=await Ce.post("/api/admin/account/totp/recovery/regenerate",{password:ae,totp:Z});ee(B.recoveryCodes),R("showingRecovery"),be.success("Recovery codes regenerated")}catch(B){be.error(B.message)}he(!1)};return s.jsxs("div",{children:[s.jsx(ga,{title:"Settings",description:"Logging, security, backup, and system info"}),s.jsxs(l1,{defaultValue:"logging",children:[s.jsxs(rm,{children:[s.jsx(Ml,{value:"logging",children:"Logging"}),s.jsx(Ml,{value:"security",children:"Security"}),s.jsx(Ml,{value:"backup",children:"Backup"}),s.jsx(Ml,{value:"system",children:"System"})]}),s.jsx(bi,{value:"logging",children:s.jsxs(Ge,{children:[s.jsx(Ie,{children:s.jsx($e,{className:"text-base",children:"Logging policy"})}),s.jsxs(Ke,{className:"space-y-3",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx(Se,{children:"Request-content logging"}),s.jsxs(kn,{value:a.contentLogMode,onValueChange:B=>J({contentLogMode:B}),children:[s.jsx(yn,{children:s.jsx(Ln,{})}),s.jsxs(xn,{children:[s.jsx(rt,{value:"off",children:"Off"}),s.jsx(rt,{value:"metadata",children:"Metadata only (default)"}),s.jsx(rt,{value:"prompt",children:"Prompt (sanitized)"}),s.jsx(rt,{value:"prompt_and_response",children:"Prompt + response (sanitized)"})]})]})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx(Se,{children:"Retention (days)"}),s.jsx(Me,{type:"number",min:1,max:3650,value:a.retentionDays,onChange:B=>J({retentionDays:Number(B.target.value)})})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx(Se,{children:"Database size limit (MB)"}),s.jsx(Me,{type:"number",min:64,value:a.dbSizeLimitMb,onChange:B=>J({dbSizeLimitMb:Number(B.target.value)})})]}),s.jsx("div",{className:"flex items-center gap-2 pt-2",children:s.jsx(ve,{onClick:async()=>{const B=await Ce.post("/api/admin/settings/cleanup");be.success(`Deleted ${B.deletedRequests} old requests`)},children:"Run cleanup now"})})]})]})}),s.jsx(bi,{value:"security",children:s.jsxs(Ge,{children:[s.jsxs(Ie,{children:[s.jsx($e,{className:"text-base",children:"Security"}),s.jsx(on,{children:"Change password, 2FA, and trusted proxy configuration"})]}),s.jsxs(Ke,{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(Se,{children:"Trusted proxy hops"}),s.jsx(Me,{type:"number",min:0,max:8,value:a.trustProxyHops,onChange:B=>J({trustProxyHops:Number(B.target.value)})}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"0 = never trust X-Forwarded-For (direct exposure). 1+ only when behind a single trusted reverse proxy."})]}),s.jsxs("div",{className:"space-y-2 border-t pt-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Se,{className:"text-base",children:"TOTP 2FA"}),C==="enabled"?s.jsx("span",{className:"rounded bg-green-100 px-2 py-0.5 text-xs font-medium text-green-800 dark:bg-green-900 dark:text-green-200",children:"Enabled"}):null,C==="disabled"?s.jsx("span",{className:"rounded bg-muted px-2 py-0.5 text-xs font-medium text-muted-foreground",children:"Disabled"}):null]}),C==="disabled"&&s.jsx(ve,{variant:"outline",onClick:W,children:"Enable TOTP"}),C==="setup"&&s.jsxs("div",{className:"space-y-3 rounded border p-3",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:"Scan this QR code with your authenticator app, or enter the secret manually."}),_&&s.jsx("img",{src:_,alt:"TOTP QR code",className:"h-40 w-40"}),s.jsxs("div",{className:"text-xs font-mono text-muted-foreground",children:["Secret: ",A]}),s.jsxs("div",{className:"flex items-end gap-2",children:[s.jsxs("div",{className:"flex-1",children:[s.jsx(Se,{children:"Verify code"}),s.jsx(Me,{value:q,onChange:B=>z(B.target.value),placeholder:"123456",maxLength:6})]}),s.jsx(ve,{disabled:q.length<6,onClick:M,children:"Verify & enable"})]})]}),C==="showingRecovery"&&s.jsxs("div",{className:"space-y-3 rounded border border-amber-500/40 bg-amber-50 p-3 dark:bg-amber-950/20",children:[s.jsx("p",{className:"text-sm font-medium",children:"Recovery codes — save these now!"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Each code can be used once to log in without your TOTP device. They will not be shown again."}),s.jsx("div",{className:"space-y-1",children:U.map((B,ne)=>s.jsx("div",{className:"font-mono text-xs",children:B},ne))}),s.jsx(ve,{onClick:()=>{R("enabled"),be.success("Recovery codes saved")},children:"I have saved them"})]}),C==="enabled"&&s.jsxs("div",{className:"space-y-3 rounded border p-3",children:[s.jsxs("div",{className:"grid gap-2 sm:grid-cols-2",children:[s.jsxs("div",{children:[s.jsx(Se,{children:"Password"}),s.jsx(Me,{type:"password",value:ae,onChange:B=>oe(B.target.value),placeholder:"Current password"})]}),s.jsxs("div",{children:[s.jsx(Se,{children:"TOTP code"}),s.jsx(Me,{value:Z,onChange:B=>ie(B.target.value),placeholder:"123456",maxLength:6})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ve,{variant:"outline",size:"sm",disabled:se||!ae||Z.length<6,onClick:K,children:"Regenerate recovery codes"}),s.jsx(ve,{variant:"destructive",size:"sm",disabled:!ae||Z.length<6,onClick:H,children:"Disable TOTP"})]})]})]}),s.jsxs("div",{className:"space-y-2 border-t pt-4",children:[s.jsx(Se,{children:"Change password"}),s.jsx(Me,{type:"password",placeholder:"Current password",value:u.current,onChange:B=>f({...u,current:B.target.value})}),s.jsx(Me,{type:"password",placeholder:"New password (12+ chars)",value:u.next,onChange:B=>f({...u,next:B.target.value})}),s.jsx(ve,{disabled:!u.current||u.next.length<12,onClick:async()=>{try{await Ce.post("/api/admin/account/password",{currentPassword:u.current,newPassword:u.next}),be.success("Password changed"),f({current:"",next:""})}catch(B){be.error(B.message)}},children:"Change password"})]})]})]})}),s.jsx(bi,{value:"backup",children:s.jsxs(Ge,{children:[s.jsxs(Ie,{children:[s.jsx($e,{className:"text-base",children:"Backup & restore"}),s.jsx(on,{children:"Download a snapshot or restore from a previous backup"})]}),s.jsxs(Ke,{className:"space-y-3",children:[s.jsx(ve,{onClick:async()=>{try{const B=await fetch("/api/admin/backup/create",{method:"POST",credentials:"include"});if(!B.ok)throw new Error("Backup failed");const ne=await B.blob(),de=URL.createObjectURL(ne),re=document.createElement("a");re.href=de,re.download="latedev-backup.json",re.click(),URL.revokeObjectURL(de),be.success("Backup downloaded")}catch(B){be.error(B.message)}},children:"Download backup"}),s.jsxs(z0,{open:k!==null,onOpenChange:B=>{B||$(null)},children:[s.jsx(AA,{asChild:!0,children:s.jsxs("div",{children:[s.jsx(Se,{children:"Restore from backup file"}),s.jsx(Me,{type:"file",accept:".json,application/json","data-testid":"restore-file",onChange:B=>{var de;const ne=(de=B.target.files)==null?void 0:de[0];$(ne??null)}})]})}),s.jsxs(Bh,{children:[s.jsxs(L0,{children:[s.jsx(Ph,{children:"Restore backup?"}),s.jsxs(qh,{children:["Restoring will replace the entire current database with the selected backup (",(k==null?void 0:k.name)??"file","). This cannot be undone. A snapshot of the current database is kept for rollback only if validation fails."]})]}),s.jsxs(U0,{children:[s.jsx(Yh,{children:"Cancel"}),s.jsx(Vh,{onClick:async()=>{var ne,de;const B=k;if(B)try{const re=await fetch("/api/admin/backup/restore",{method:"POST",body:B,credentials:"include",headers:{"content-type":"application/json"}});if(!re.ok)throw new Error(((de=(ne=await re.json())==null?void 0:ne.error)==null?void 0:de.message)??"Restore failed");be.success("Restored. Please restart the gateway."),$(null)}catch(re){be.error(re.message)}},children:"Restore"})]})]})]})]})]})}),s.jsxs(bi,{value:"system",children:[s.jsxs(Ge,{children:[s.jsx(Ie,{children:s.jsx($e,{className:"text-base",children:"System"})}),s.jsxs(Ke,{className:"space-y-2 text-sm",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-muted-foreground",children:"App version:"})," ",o==null?void 0:o.appVersion]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-muted-foreground",children:"Data directory:"})," ",s.jsx("span",{className:"font-mono",children:o==null?void 0:o.dataDir})]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-muted-foreground",children:"Encryption:"})," ",o!=null&&o.masterKeyConfigured?"Configured":"Not configured"," (v",o==null?void 0:o.masterKeyVersion,")"]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-muted-foreground",children:"Environment:"})," ",o==null?void 0:o.environment]}),s.jsxs("div",{className:"flex items-center gap-2 pt-2",children:[s.jsx(cr,{checked:a.gatewayCacheEnabled,onCheckedChange:B=>J({gatewayCacheEnabled:B})}),s.jsx(Se,{children:"Gateway response cache (disabled by default)"})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[s.jsxs("div",{children:[s.jsx(Se,{children:"Cache TTL (s)"}),s.jsx(Me,{type:"number",min:1,value:a.gatewayCacheDefaultTtlSeconds,onChange:B=>J({gatewayCacheDefaultTtlSeconds:Number(B.target.value)})})]}),s.jsxs("div",{children:[s.jsx(Se,{children:"Cache max size (MB)"}),s.jsx(Me,{type:"number",min:1,value:a.gatewayCacheMaxSizeMb,onChange:B=>J({gatewayCacheMaxSizeMb:Number(B.target.value)})})]})]}),s.jsx(ve,{variant:"outline",onClick:async()=>{const B=await Ce.post("/api/admin/settings/cache/clear");be.success(`Cleared ${B.deleted} entries`)},children:"Clear gateway cache"})]})]}),s.jsxs(Ge,{className:"mt-4",children:[s.jsxs(Ie,{children:[s.jsx($e,{className:"text-base",children:"Updates"}),s.jsx(on,{children:"Automatic updates from the npm registry"})]}),s.jsxs(Ke,{className:"space-y-3 text-sm",children:[w==="checking"&&!h&&s.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[s.jsx(mf,{className:"h-4 w-4 animate-spin"})," Checking for updates…"]}),h&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-xs text-muted-foreground",children:"Current version"}),s.jsxs("div",{className:"font-mono",children:["v",h.currentVersion]})]}),s.jsx("span",{className:"text-muted-foreground",children:"→"}),s.jsxs("div",{children:[s.jsx("div",{className:"text-xs text-muted-foreground",children:"Latest version"}),s.jsx("div",{className:"font-mono",children:h.latestVersion?`v${h.latestVersion}`:"—"})]}),h.status.docker?s.jsx(it,{variant:"secondary",children:"Docker"}):h.latestVersion===null?s.jsx(it,{variant:"secondary",children:"Registry unreachable"}):h.hasUpdate?s.jsx(it,{variant:"success",children:"Update available"}):s.jsxs(it,{variant:"outline",children:[s.jsx(SC,{className:"mr-1 h-3 w-3"})," Up to date"]})]}),h.status.docker&&s.jsx("p",{className:"text-muted-foreground",children:"This instance runs in Docker — update by pulling the new image tag instead."}),!h.status.docker&&h.latestVersion===null&&s.jsxs("p",{className:"text-muted-foreground",children:["Could not reach the npm registry (offline or blocked). ",b&&s.jsx("span",{className:"text-destructive",children:b})]}),w==="installing"&&s.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[s.jsx(mf,{className:"h-4 w-4 animate-spin"})," Downloading and installing the update… this can take a minute."]}),w==="restarting"&&s.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[s.jsx(mf,{className:"h-4 w-4 animate-spin"})," Update installed — restarting the gateway. This page reloads automatically."]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[!h.status.docker&&h.hasUpdate&&w==="idle"&&s.jsxs(ve,{disabled:v,onClick:j,children:[s.jsx(Cx,{className:"mr-1 h-4 w-4"})," Update now"]}),h.hasUpdate&&h.changelogUrl&&s.jsx(ve,{variant:"outline",asChild:!0,children:s.jsx("a",{href:h.changelogUrl,target:"_blank",rel:"noreferrer",children:"View changes"})}),w==="idle"&&s.jsx(ve,{variant:"ghost",disabled:v,onClick:()=>T(!0),children:"Check again"})]})]})]})]})]})]})]})}function WM({children:a}){const{user:l,loading:o}=ch(),i=Sn();return o?s.jsx("div",{className:"flex h-screen items-center justify-center text-muted-foreground",children:"Loading…"}):l?s.jsx(s.Fragment,{children:a}):s.jsx(Af,{to:"/login",state:{from:i},replace:!0})}function e_(){return s.jsxs("div",{className:"flex h-screen bg-background text-foreground",children:[s.jsx(v2,{}),s.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[s.jsx(gN,{}),s.jsx("main",{className:"flex-1 overflow-auto p-6",children:s.jsxs(gx,{children:[s.jsx(nn,{index:!0,element:s.jsx(FN,{})}),s.jsx(nn,{path:"/providers",element:s.jsx(CM,{})}),s.jsx(nn,{path:"/models",element:s.jsx(zM,{})}),s.jsx(nn,{path:"/combos",element:s.jsx(kM,{})}),s.jsx(nn,{path:"/aliases",element:s.jsx(LM,{})}),s.jsx(nn,{path:"/api-keys",element:s.jsx(UM,{})}),s.jsx(nn,{path:"/requests",element:s.jsx(HM,{})}),s.jsx(nn,{path:"/statistics",element:s.jsx(ZM,{})}),s.jsx(nn,{path:"/audit",element:s.jsx(FM,{})}),s.jsx(nn,{path:"/settings/*",element:s.jsx(JM,{})})]})})]})]})}function t_({children:a}){const[l,o]=m.useState(null),i=Sn();return m.useEffect(()=>{Ce.get("/api/admin/setup/status").then(u=>o(u.setupComplete)).catch(()=>o(!0))},[]),l===null?s.jsx("div",{className:"flex h-screen items-center justify-center text-muted-foreground",children:"Loading…"}):!l&&i.pathname!=="/setup"?s.jsx(Af,{to:"/setup",replace:!0}):l&&i.pathname==="/setup"?s.jsx(Af,{to:"/",replace:!0}):s.jsx(s.Fragment,{children:a})}function n_(){return s.jsx(mC,{children:s.jsx(t_,{children:s.jsxs(gx,{children:[s.jsx(nn,{path:"/setup",element:s.jsx(QN,{})}),s.jsx(nn,{path:"/login",element:s.jsx(XN,{})}),s.jsx(nn,{path:"/*",element:s.jsx(WM,{children:s.jsx(e_,{})})})]})})})}const a_=KN;var l_=Object.defineProperty,ln=(a,l)=>l_(a,"name",{value:l,configurable:!0}),[om,L_]=sn("Tooltip",[wo]),r_=wo(),o_="TooltipProvider",i_=700,Fy="tooltip.open",[s_,c_]=om(o_),u_=ln(a=>{const{__scopeTooltip:l,delayDuration:o=i_,skipDelayDuration:i=300,disableHoverableContent:u=!1,children:f}=a,h=m.useRef(!0),p=m.useRef(!1),v=m.useRef(0);return m.useEffect(()=>{const g=v.current;return()=>window.clearTimeout(g)},[]),s.jsx(s_,{scope:l,isOpenDelayedRef:h,delayDuration:o,onOpen:m.useCallback(()=>{i<=0||(window.clearTimeout(v.current),h.current=!1)},[i]),onClose:m.useCallback(()=>{i<=0||(window.clearTimeout(v.current),v.current=window.setTimeout(()=>h.current=!0,i))},[i]),isPointerInTransitRef:p,onPointerInTransitChange:m.useCallback(g=>{p.current=g},[]),disableHoverableContent:u,children:f})},"TooltipProvider"),d_="Tooltip",[U_,im]=om(d_),f_="TooltipPortal",[H_,h_]=om(f_,{forceMount:void 0}),Ei="TooltipContent",m_=m.forwardRef(ln(function(l,o){const i=h_(Ei,l.__scopeTooltip),{forceMount:u=i.forceMount,side:f="top",...h}=l,p=im(Ei,l.__scopeTooltip);return s.jsx(Wa,{present:u||p.open,children:p.disableHoverableContent?s.jsx(r1,{side:f,...h,ref:o}):s.jsx(p_,{side:f,...h,ref:o})})},"TooltipContent")),p_=m.forwardRef(ln(function(l,o){const i=im(Ei,l.__scopeTooltip),u=c_(Ei,l.__scopeTooltip),f=m.useRef(null),h=Pe(o,f),[p,v]=m.useState(null),{trigger:g,onClose:w}=i,S=f.current,{onPointerInTransitChange:b}=u,x=m.useCallback(()=>{v(null),b(!1)},[b]),T=m.useCallback((j,C)=>{const R=j.currentTarget,A={x:j.clientX,y:j.clientY},N=o1(A,R.getBoundingClientRect()),_=i1(A,N),P=s1(C.getBoundingClientRect()),q=u1([..._,...P]);v(q),b(!0)},[b]);return m.useEffect(()=>()=>x(),[x]),m.useEffect(()=>{if(g&&S){const j=ln(R=>T(R,S),"handleTriggerLeave"),C=ln(R=>T(R,g),"handleContentLeave");return g.addEventListener("pointerleave",j),S.addEventListener("pointerleave",C),()=>{g.removeEventListener("pointerleave",j),S.removeEventListener("pointerleave",C)}}},[g,S,T,x]),m.useEffect(()=>{if(p){const j=ln(C=>{const R=C.target,A={x:C.clientX,y:C.clientY},N=(g==null?void 0:g.contains(R))||(S==null?void 0:S.contains(R)),_=!c1(A,p);N?x():_&&(x(),w())},"handleTrackPointerGrace");return document.addEventListener("pointermove",j),()=>document.removeEventListener("pointermove",j)}},[g,S,p,w,x]),s.jsx(r1,{...l,ref:h})},"TooltipContentHoverable")),v_=Ux("TooltipContent"),r1=m.forwardRef(ln(function(l,o){const{__scopeTooltip:i,children:u,"aria-label":f,id:h,onEscapeKeyDown:p,onPointerDownOutside:v,...g}=l,w=im(Ei,i),S=r_(i),{onClose:b}=w;m.useEffect(()=>(document.addEventListener(Fy,b),()=>document.removeEventListener(Fy,b)),[b]),m.useEffect(()=>{if(w.trigger){const T=ln(j=>{j.target instanceof Node&&j.target.contains(w.trigger)&&b()},"handleScroll");return window.addEventListener("scroll",T,{capture:!0}),()=>window.removeEventListener("scroll",T,{capture:!0})}},[w.trigger,b]);const{setContentId:x}=w;return Tt(()=>(x(h),()=>{x(void 0)}),[h,x]),s.jsx(Cc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:p,onPointerDownOutside:v,onFocusOutside:T=>T.preventDefault(),onDismiss:b,children:s.jsxs(Eh,{"data-state":w.stateAttribute,role:f?void 0:"tooltip",id:f?void 0:w.contentId,...S,...g,ref:o,style:{...g.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[s.jsx(v_,{children:u}),f?s.jsx(HA,{id:w.contentId,role:"tooltip",children:f}):null]})})},"TooltipContentImpl"));function o1(a,l){const o=Math.abs(l.top-a.y),i=Math.abs(l.bottom-a.y),u=Math.abs(l.right-a.x),f=Math.abs(l.left-a.x);switch(Math.min(o,i,u,f)){case f:return"left";case u:return"right";case o:return"top";case i:return"bottom";default:throw new Error("unreachable")}}ln(o1,"getExitSideFromRect");function i1(a,l,o=5){const i=[];switch(l){case"top":i.push({x:a.x-o,y:a.y+o},{x:a.x+o,y:a.y+o});break;case"bottom":i.push({x:a.x-o,y:a.y-o},{x:a.x+o,y:a.y-o});break;case"left":i.push({x:a.x+o,y:a.y-o},{x:a.x+o,y:a.y+o});break;case"right":i.push({x:a.x-o,y:a.y-o},{x:a.x-o,y:a.y+o});break}return i}ln(i1,"getPaddedExitPoints");function s1(a){const{top:l,right:o,bottom:i,left:u}=a;return[{x:u,y:l},{x:o,y:l},{x:o,y:i},{x:u,y:i}]}ln(s1,"getPointsFromRect");function c1(a,l){const{x:o,y:i}=a;let u=!1;for(let f=0,h=l.length-1;f<l.length;h=f++){const p=l[f],v=l[h],g=p.x,w=p.y,S=v.x,b=v.y;w>i!=b>i&&o<(S-g)*(i-w)/(b-w)+g&&(u=!u)}return u}ln(c1,"isPointInPolygon");function u1(a){const l=a.slice();return l.sort((o,i)=>o.x<i.x?-1:o.x>i.x?1:o.y<i.y?-1:o.y>i.y?1:0),d1(l)}ln(u1,"getHull");function d1(a){if(a.length<=1)return a.slice();const l=[];for(let i=0;i<a.length;i++){const u=a[i];for(;l.length>=2;){const f=l[l.length-1],h=l[l.length-2];if((f.x-h.x)*(u.y-h.y)>=(f.y-h.y)*(u.x-h.x))l.pop();else break}l.push(u)}l.pop();const o=[];for(let i=a.length-1;i>=0;i--){const u=a[i];for(;o.length>=2;){const f=o[o.length-1],h=o[o.length-2];if((f.x-h.x)*(u.y-h.y)>=(f.y-h.y)*(u.x-h.x))o.pop();else break}o.push(u)}return o.pop(),l.length===1&&o.length===1&&l[0].x===o[0].x&&l[0].y===o[0].y?l:l.concat(o)}ln(d1,"getHullPresorted");var g_=u_,f1=m_;const y_=g_,x_=m.forwardRef(({className:a,sideOffset:l=4,...o},i)=>s.jsx(f1,{ref:i,sideOffset:l,className:Ee("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95",a),...o}));x_.displayName=f1.displayName;zw.createRoot(document.getElementById("root")).render(s.jsx(le.StrictMode,{children:s.jsx(E2,{defaultTheme:"dark",storageKey:"latedev-theme",children:s.jsxs(y_,{children:[s.jsx(nC,{children:s.jsx(n_,{})}),s.jsx(a_,{position:"top-right"})]})})}));