@skybridge/devtools 0.0.0-dev.f091fae → 0.0.0-dev.f1cf3cc

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,183 @@
1
+ var HU=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var gxe=HU((Zo,Xo)=>{function GU(e,t){for(var r=0;r<t.length;r++){const i=t[r];if(typeof i!="string"&&!Array.isArray(i)){for(const s in i)if(s!=="default"&&!(s in e)){const l=Object.getOwnPropertyDescriptor(i,s);l&&Object.defineProperty(e,s,l.get?l:{enumerable:!0,get:()=>i[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&i(c)}).observe(document,{childList:!0,subtree:!0});function r(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerPolicy&&(l.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?l.credentials="include":s.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(s){if(s.ep)return;s.ep=!0;const l=r(s);fetch(s.href,l)}})();var p1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Il(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Vx={exports:{}},Ev={};var F5;function KU(){if(F5)return Ev;F5=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(i,s,l){var c=null;if(l!==void 0&&(c=""+l),s.key!==void 0&&(c=""+s.key),"key"in s){l={};for(var f in s)f!=="key"&&(l[f]=s[f])}else l=s;return s=l.ref,{$$typeof:e,type:i,key:c,ref:s!==void 0?s:null,props:l}}return Ev.Fragment=t,Ev.jsx=r,Ev.jsxs=r,Ev}var B5;function YU(){return B5||(B5=1,Vx.exports=KU()),Vx.exports}var k=YU(),Fx={exports:{}},Wt={};var H5;function ZU(){if(H5)return Wt;H5=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),v=Symbol.iterator;function w(N){return N===null||typeof N!="object"?null:(N=v&&N[v]||N["@@iterator"],typeof N=="function"?N:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,x={};function R(N,I,U){this.props=N,this.context=I,this.refs=x,this.updater=U||b}R.prototype.isReactComponent={},R.prototype.setState=function(N,I){if(typeof N!="object"&&typeof N!="function"&&N!=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,N,I,"setState")},R.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function S(){}S.prototype=R.prototype;function T(N,I,U){this.props=N,this.context=I,this.refs=x,this.updater=U||b}var E=T.prototype=new S;E.constructor=T,_(E,R.prototype),E.isPureReactComponent=!0;var O=Array.isArray;function C(){}var M={H:null,A:null,T:null,S:null},D=Object.prototype.hasOwnProperty;function $(N,I,U){var P=U.ref;return{$$typeof:e,type:N,key:I,ref:P!==void 0?P:null,props:U}}function q(N,I){return $(N.type,I,N.props)}function L(N){return typeof N=="object"&&N!==null&&N.$$typeof===e}function V(N){var I={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(U){return I[U]})}var F=/\/+/g;function re(N,I){return typeof N=="object"&&N!==null&&N.key!=null?V(""+N.key):I.toString(36)}function ae(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(C,C):(N.status="pending",N.then(function(I){N.status==="pending"&&(N.status="fulfilled",N.value=I)},function(I){N.status==="pending"&&(N.status="rejected",N.reason=I)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function K(N,I,U,P,G){var ee=typeof N;(ee==="undefined"||ee==="boolean")&&(N=null);var ue=!1;if(N===null)ue=!0;else switch(ee){case"bigint":case"string":case"number":ue=!0;break;case"object":switch(N.$$typeof){case e:case t:ue=!0;break;case m:return ue=N._init,K(ue(N._payload),I,U,P,G)}}if(ue)return G=G(N),ue=P===""?"."+re(N,0):P,O(G)?(U="",ue!=null&&(U=ue.replace(F,"$&/")+"/"),K(G,I,U,"",function(Oe){return Oe})):G!=null&&(L(G)&&(G=q(G,U+(G.key==null||N&&N.key===G.key?"":(""+G.key).replace(F,"$&/")+"/")+ue)),I.push(G)),1;ue=0;var ve=P===""?".":P+":";if(O(N))for(var Ee=0;Ee<N.length;Ee++)P=N[Ee],ee=ve+re(P,Ee),ue+=K(P,I,U,ee,G);else if(Ee=w(N),typeof Ee=="function")for(N=Ee.call(N),Ee=0;!(P=N.next()).done;)P=P.value,ee=ve+re(P,Ee++),ue+=K(P,I,U,ee,G);else if(ee==="object"){if(typeof N.then=="function")return K(ae(N),I,U,P,G);throw I=String(N),Error("Objects are not valid as a React child (found: "+(I==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":I)+"). If you meant to render a collection of children, use an array instead.")}return ue}function B(N,I,U){if(N==null)return N;var P=[],G=0;return K(N,P,"","",function(ee){return I.call(U,ee,G++)}),P}function Y(N){if(N._status===-1){var I=N._result;I=I(),I.then(function(U){(N._status===0||N._status===-1)&&(N._status=1,N._result=U)},function(U){(N._status===0||N._status===-1)&&(N._status=2,N._result=U)}),N._status===-1&&(N._status=0,N._result=I)}if(N._status===1)return N._result.default;throw N._result}var fe=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var I=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(I))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},se={map:B,forEach:function(N,I,U){B(N,function(){I.apply(this,arguments)},U)},count:function(N){var I=0;return B(N,function(){I++}),I},toArray:function(N){return B(N,function(I){return I})||[]},only:function(N){if(!L(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return Wt.Activity=g,Wt.Children=se,Wt.Component=R,Wt.Fragment=r,Wt.Profiler=s,Wt.PureComponent=T,Wt.StrictMode=i,Wt.Suspense=d,Wt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,Wt.__COMPILER_RUNTIME={__proto__:null,c:function(N){return M.H.useMemoCache(N)}},Wt.cache=function(N){return function(){return N.apply(null,arguments)}},Wt.cacheSignal=function(){return null},Wt.cloneElement=function(N,I,U){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var P=_({},N.props),G=N.key;if(I!=null)for(ee in I.key!==void 0&&(G=""+I.key),I)!D.call(I,ee)||ee==="key"||ee==="__self"||ee==="__source"||ee==="ref"&&I.ref===void 0||(P[ee]=I[ee]);var ee=arguments.length-2;if(ee===1)P.children=U;else if(1<ee){for(var ue=Array(ee),ve=0;ve<ee;ve++)ue[ve]=arguments[ve+2];P.children=ue}return $(N.type,G,P)},Wt.createContext=function(N){return N={$$typeof:c,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:l,_context:N},N},Wt.createElement=function(N,I,U){var P,G={},ee=null;if(I!=null)for(P in I.key!==void 0&&(ee=""+I.key),I)D.call(I,P)&&P!=="key"&&P!=="__self"&&P!=="__source"&&(G[P]=I[P]);var ue=arguments.length-2;if(ue===1)G.children=U;else if(1<ue){for(var ve=Array(ue),Ee=0;Ee<ue;Ee++)ve[Ee]=arguments[Ee+2];G.children=ve}if(N&&N.defaultProps)for(P in ue=N.defaultProps,ue)G[P]===void 0&&(G[P]=ue[P]);return $(N,ee,G)},Wt.createRef=function(){return{current:null}},Wt.forwardRef=function(N){return{$$typeof:f,render:N}},Wt.isValidElement=L,Wt.lazy=function(N){return{$$typeof:m,_payload:{_status:-1,_result:N},_init:Y}},Wt.memo=function(N,I){return{$$typeof:h,type:N,compare:I===void 0?null:I}},Wt.startTransition=function(N){var I=M.T,U={};M.T=U;try{var P=N(),G=M.S;G!==null&&G(U,P),typeof P=="object"&&P!==null&&typeof P.then=="function"&&P.then(C,fe)}catch(ee){fe(ee)}finally{I!==null&&U.types!==null&&(I.types=U.types),M.T=I}},Wt.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},Wt.use=function(N){return M.H.use(N)},Wt.useActionState=function(N,I,U){return M.H.useActionState(N,I,U)},Wt.useCallback=function(N,I){return M.H.useCallback(N,I)},Wt.useContext=function(N){return M.H.useContext(N)},Wt.useDebugValue=function(){},Wt.useDeferredValue=function(N,I){return M.H.useDeferredValue(N,I)},Wt.useEffect=function(N,I){return M.H.useEffect(N,I)},Wt.useEffectEvent=function(N){return M.H.useEffectEvent(N)},Wt.useId=function(){return M.H.useId()},Wt.useImperativeHandle=function(N,I,U){return M.H.useImperativeHandle(N,I,U)},Wt.useInsertionEffect=function(N,I){return M.H.useInsertionEffect(N,I)},Wt.useLayoutEffect=function(N,I){return M.H.useLayoutEffect(N,I)},Wt.useMemo=function(N,I){return M.H.useMemo(N,I)},Wt.useOptimistic=function(N,I){return M.H.useOptimistic(N,I)},Wt.useReducer=function(N,I,U){return M.H.useReducer(N,I,U)},Wt.useRef=function(N){return M.H.useRef(N)},Wt.useState=function(N){return M.H.useState(N)},Wt.useSyncExternalStore=function(N,I,U){return M.H.useSyncExternalStore(N,I,U)},Wt.useTransition=function(){return M.H.useTransition()},Wt.version="19.2.4",Wt}var G5;function wm(){return G5||(G5=1,Fx.exports=ZU()),Fx.exports}var j=wm();const Ho=Il(j),Nb=GU({__proto__:null,default:Ho},[j]);var Bx={exports:{}},xv={},Hx={exports:{}},Gx={};var K5;function XU(){return K5||(K5=1,(function(e){function t(K,B){var Y=K.length;K.push(B);e:for(;0<Y;){var fe=Y-1>>>1,se=K[fe];if(0<s(se,B))K[fe]=B,K[Y]=se,Y=fe;else break e}}function r(K){return K.length===0?null:K[0]}function i(K){if(K.length===0)return null;var B=K[0],Y=K.pop();if(Y!==B){K[0]=Y;e:for(var fe=0,se=K.length,N=se>>>1;fe<N;){var I=2*(fe+1)-1,U=K[I],P=I+1,G=K[P];if(0>s(U,Y))P<se&&0>s(G,U)?(K[fe]=G,K[P]=Y,fe=P):(K[fe]=U,K[I]=Y,fe=I);else if(P<se&&0>s(G,Y))K[fe]=G,K[P]=Y,fe=P;else break e}}return B}function s(K,B){var Y=K.sortIndex-B.sortIndex;return Y!==0?Y:K.id-B.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var d=[],h=[],m=1,g=null,v=3,w=!1,b=!1,_=!1,x=!1,R=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function E(K){for(var B=r(h);B!==null;){if(B.callback===null)i(h);else if(B.startTime<=K)i(h),B.sortIndex=B.expirationTime,t(d,B);else break;B=r(h)}}function O(K){if(_=!1,E(K),!b)if(r(d)!==null)b=!0,C||(C=!0,V());else{var B=r(h);B!==null&&ae(O,B.startTime-K)}}var C=!1,M=-1,D=5,$=-1;function q(){return x?!0:!(e.unstable_now()-$<D)}function L(){if(x=!1,C){var K=e.unstable_now();$=K;var B=!0;try{e:{b=!1,_&&(_=!1,S(M),M=-1),w=!0;var Y=v;try{t:{for(E(K),g=r(d);g!==null&&!(g.expirationTime>K&&q());){var fe=g.callback;if(typeof fe=="function"){g.callback=null,v=g.priorityLevel;var se=fe(g.expirationTime<=K);if(K=e.unstable_now(),typeof se=="function"){g.callback=se,E(K),B=!0;break t}g===r(d)&&i(d),E(K)}else i(d);g=r(d)}if(g!==null)B=!0;else{var N=r(h);N!==null&&ae(O,N.startTime-K),B=!1}}break e}finally{g=null,v=Y,w=!1}B=void 0}}finally{B?V():C=!1}}}var V;if(typeof T=="function")V=function(){T(L)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,re=F.port2;F.port1.onmessage=L,V=function(){re.postMessage(null)}}else V=function(){R(L,0)};function ae(K,B){M=R(function(){K(e.unstable_now())},B)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(K){K.callback=null},e.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"):D=0<K?Math.floor(1e3/K):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_next=function(K){switch(v){case 1:case 2:case 3:var B=3;break;default:B=v}var Y=v;v=B;try{return K()}finally{v=Y}},e.unstable_requestPaint=function(){x=!0},e.unstable_runWithPriority=function(K,B){switch(K){case 1:case 2:case 3:case 4:case 5:break;default:K=3}var Y=v;v=K;try{return B()}finally{v=Y}},e.unstable_scheduleCallback=function(K,B,Y){var fe=e.unstable_now();switch(typeof Y=="object"&&Y!==null?(Y=Y.delay,Y=typeof Y=="number"&&0<Y?fe+Y:fe):Y=fe,K){case 1:var se=-1;break;case 2:se=250;break;case 5:se=1073741823;break;case 4:se=1e4;break;default:se=5e3}return se=Y+se,K={id:m++,callback:B,priorityLevel:K,startTime:Y,expirationTime:se,sortIndex:-1},Y>fe?(K.sortIndex=Y,t(h,K),r(d)===null&&K===r(h)&&(_?(S(M),M=-1):_=!0,ae(O,Y-fe))):(K.sortIndex=se,t(d,K),b||w||(b=!0,C||(C=!0,V()))),K},e.unstable_shouldYield=q,e.unstable_wrapCallback=function(K){var B=v;return function(){var Y=v;v=B;try{return K.apply(this,arguments)}finally{v=Y}}}})(Gx)),Gx}var Y5;function KN(){return Y5||(Y5=1,Hx.exports=XU()),Hx.exports}var Kx={exports:{}},xi={};var Z5;function QU(){if(Z5)return xi;Z5=1;var e=wm();function t(d){var h="https://react.dev/errors/"+d;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)h+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+d+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var i={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},s=Symbol.for("react.portal");function l(d,h,m){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:g==null?null:""+g,children:d,containerInfo:h,implementation:m}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(d,h){if(d==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return xi.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,xi.createPortal=function(d,h){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return l(d,h,null,m)},xi.flushSync=function(d){var h=c.T,m=i.p;try{if(c.T=null,i.p=2,d)return d()}finally{c.T=h,i.p=m,i.d.f()}},xi.preconnect=function(d,h){typeof d=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,i.d.C(d,h))},xi.prefetchDNS=function(d){typeof d=="string"&&i.d.D(d)},xi.preinit=function(d,h){if(typeof d=="string"&&h&&typeof h.as=="string"){var m=h.as,g=f(m,h.crossOrigin),v=typeof h.integrity=="string"?h.integrity:void 0,w=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;m==="style"?i.d.S(d,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:g,integrity:v,fetchPriority:w}):m==="script"&&i.d.X(d,{crossOrigin:g,integrity:v,fetchPriority:w,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},xi.preinitModule=function(d,h){if(typeof d=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var m=f(h.as,h.crossOrigin);i.d.M(d,{crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&i.d.M(d)},xi.preload=function(d,h){if(typeof d=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var m=h.as,g=f(m,h.crossOrigin);i.d.L(d,m,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},xi.preloadModule=function(d,h){if(typeof d=="string")if(h){var m=f(h.as,h.crossOrigin);i.d.m(d,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else i.d.m(d)},xi.requestFormReset=function(d){i.d.r(d)},xi.unstable_batchedUpdates=function(d,h){return d(h)},xi.useFormState=function(d,h,m){return c.H.useFormState(d,h,m)},xi.useFormStatus=function(){return c.H.useHostTransitionStatus()},xi.version="19.2.4",xi}var X5;function YN(){if(X5)return Kx.exports;X5=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Kx.exports=QU(),Kx.exports}var Q5;function WU(){if(Q5)return xv;Q5=1;var e=KN(),t=wm(),r=YN();function i(n){var a="https://react.dev/errors/"+n;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)a+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+n+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function l(n){var a=n,o=n;if(n.alternate)for(;a.return;)a=a.return;else{n=a;do a=n,(a.flags&4098)!==0&&(o=a.return),n=a.return;while(n)}return a.tag===3?o:null}function c(n){if(n.tag===13){var a=n.memoizedState;if(a===null&&(n=n.alternate,n!==null&&(a=n.memoizedState)),a!==null)return a.dehydrated}return null}function f(n){if(n.tag===31){var a=n.memoizedState;if(a===null&&(n=n.alternate,n!==null&&(a=n.memoizedState)),a!==null)return a.dehydrated}return null}function d(n){if(l(n)!==n)throw Error(i(188))}function h(n){var a=n.alternate;if(!a){if(a=l(n),a===null)throw Error(i(188));return a!==n?null:n}for(var o=n,u=a;;){var p=o.return;if(p===null)break;var y=p.alternate;if(y===null){if(u=p.return,u!==null){o=u;continue}break}if(p.child===y.child){for(y=p.child;y;){if(y===o)return d(p),n;if(y===u)return d(p),a;y=y.sibling}throw Error(i(188))}if(o.return!==u.return)o=p,u=y;else{for(var A=!1,z=p.child;z;){if(z===o){A=!0,o=p,u=y;break}if(z===u){A=!0,u=p,o=y;break}z=z.sibling}if(!A){for(z=y.child;z;){if(z===o){A=!0,o=y,u=p;break}if(z===u){A=!0,u=y,o=p;break}z=z.sibling}if(!A)throw Error(i(189))}}if(o.alternate!==u)throw Error(i(190))}if(o.tag!==3)throw Error(i(188));return o.stateNode.current===o?n:a}function m(n){var a=n.tag;if(a===5||a===26||a===27||a===6)return n;for(n=n.child;n!==null;){if(a=m(n),a!==null)return a;n=n.sibling}return null}var g=Object.assign,v=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),S=Symbol.for("react.consumer"),T=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),$=Symbol.for("react.activity"),q=Symbol.for("react.memo_cache_sentinel"),L=Symbol.iterator;function V(n){return n===null||typeof n!="object"?null:(n=L&&n[L]||n["@@iterator"],typeof n=="function"?n:null)}var F=Symbol.for("react.client.reference");function re(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===F?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case _:return"Fragment";case R:return"Profiler";case x:return"StrictMode";case O:return"Suspense";case C:return"SuspenseList";case $:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case b:return"Portal";case T:return n.displayName||"Context";case S:return(n._context.displayName||"Context")+".Consumer";case E:var a=n.render;return n=n.displayName,n||(n=a.displayName||a.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case M:return a=n.displayName||null,a!==null?a:re(n.type)||"Memo";case D:a=n._payload,n=n._init;try{return re(n(a))}catch{}}return null}var ae=Array.isArray,K=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y={pending:!1,data:null,method:null,action:null},fe=[],se=-1;function N(n){return{current:n}}function I(n){0>se||(n.current=fe[se],fe[se]=null,se--)}function U(n,a){se++,fe[se]=n.current,n.current=a}var P=N(null),G=N(null),ee=N(null),ue=N(null);function ve(n,a){switch(U(ee,a),U(G,n),U(P,null),a.nodeType){case 9:case 11:n=(n=a.documentElement)&&(n=n.namespaceURI)?H0(n):0;break;default:if(n=a.tagName,a=a.namespaceURI)a=H0(a),n=G0(a,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}I(P),U(P,n)}function Ee(){I(P),I(G),I(ee)}function Oe(n){n.memoizedState!==null&&U(ue,n);var a=P.current,o=G0(a,n.type);a!==o&&(U(G,n),U(P,o))}function de(n){G.current===n&&(I(P),I(G)),ue.current===n&&(I(ue),tl._currentValue=Y)}var te,Se;function we(n){if(te===void 0)try{throw Error()}catch(o){var a=o.stack.trim().match(/\n( *(at )?)/);te=a&&a[1]||"",Se=-1<o.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+te+n+Se}var $e=!1;function Te(n,a){if(!n||$e)return"";$e=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(a){var me=function(){throw Error()};if(Object.defineProperty(me.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(me,[])}catch(ce){var le=ce}Reflect.construct(n,[],me)}else{try{me.call()}catch(ce){le=ce}n.call(me.prototype)}}else{try{throw Error()}catch(ce){le=ce}(me=n())&&typeof me.catch=="function"&&me.catch(function(){})}}catch(ce){if(ce&&le&&typeof ce.stack=="string")return[ce.stack,le.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var y=u.DetermineComponentFrameRoot(),A=y[0],z=y[1];if(A&&z){var H=A.split(`
4
+ `),oe=z.split(`
5
+ `);for(p=u=0;u<H.length&&!H[u].includes("DetermineComponentFrameRoot");)u++;for(;p<oe.length&&!oe[p].includes("DetermineComponentFrameRoot");)p++;if(u===H.length||p===oe.length)for(u=H.length-1,p=oe.length-1;1<=u&&0<=p&&H[u]!==oe[p];)p--;for(;1<=u&&0<=p;u--,p--)if(H[u]!==oe[p]){if(u!==1||p!==1)do if(u--,p--,0>p||H[u]!==oe[p]){var he=`
6
+ `+H[u].replace(" at new "," at ");return n.displayName&&he.includes("<anonymous>")&&(he=he.replace("<anonymous>",n.displayName)),he}while(1<=u&&0<=p);break}}}finally{$e=!1,Error.prepareStackTrace=o}return(o=n?n.displayName||n.name:"")?we(o):""}function Pe(n,a){switch(n.tag){case 26:case 27:case 5:return we(n.type);case 16:return we("Lazy");case 13:return n.child!==a&&a!==null?we("Suspense Fallback"):we("Suspense");case 19:return we("SuspenseList");case 0:case 15:return Te(n.type,!1);case 11:return Te(n.type.render,!1);case 1:return Te(n.type,!0);case 31:return we("Activity");default:return""}}function Ge(n){try{var a="",o=null;do a+=Pe(n,o),o=n,n=n.return;while(n);return a}catch(u){return`
7
+ Error generating stack: `+u.message+`
8
+ `+u.stack}}var Ce=Object.prototype.hasOwnProperty,Be=e.unstable_scheduleCallback,Fe=e.unstable_cancelCallback,Je=e.unstable_shouldYield,ke=e.unstable_requestPaint,Ue=e.unstable_now,Xe=e.unstable_getCurrentPriorityLevel,Mt=e.unstable_ImmediatePriority,Ae=e.unstable_UserBlockingPriority,xe=e.unstable_NormalPriority,Ne=e.unstable_LowPriority,Ke=e.unstable_IdlePriority,vt=e.log,Xt=e.unstable_setDisableYieldValue,Vt=null,wt=null;function Ht(n){if(typeof vt=="function"&&Xt(n),wt&&typeof wt.setStrictMode=="function")try{wt.setStrictMode(Vt,n)}catch{}}var Rt=Math.clz32?Math.clz32:Gt,Qt=Math.log,_n=Math.LN2;function Gt(n){return n>>>=0,n===0?32:31-(Qt(n)/_n|0)|0}var Tn=256,En=262144,Pn=4194304;function Dt(n){var a=n&42;if(a!==0)return a;switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function xn(n,a,o){var u=n.pendingLanes;if(u===0)return 0;var p=0,y=n.suspendedLanes,A=n.pingedLanes;n=n.warmLanes;var z=u&134217727;return z!==0?(u=z&~y,u!==0?p=Dt(u):(A&=z,A!==0?p=Dt(A):o||(o=z&~n,o!==0&&(p=Dt(o))))):(z=u&~y,z!==0?p=Dt(z):A!==0?p=Dt(A):o||(o=u&~n,o!==0&&(p=Dt(o)))),p===0?0:a!==0&&a!==p&&(a&y)===0&&(y=p&-p,o=a&-a,y>=o||y===32&&(o&4194048)!==0)?a:p}function Kt(n,a){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&a)===0}function sr(n,a){switch(n){case 1:case 2:case 4:case 8:case 64:return a+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function wr(){var n=Pn;return Pn<<=1,(Pn&62914560)===0&&(Pn=4194304),n}function qr(n){for(var a=[],o=0;31>o;o++)a.push(n);return a}function ft(n,a){n.pendingLanes|=a,a!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function tn(n,a,o,u,p,y){var A=n.pendingLanes;n.pendingLanes=o,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=o,n.entangledLanes&=o,n.errorRecoveryDisabledLanes&=o,n.shellSuspendCounter=0;var z=n.entanglements,H=n.expirationTimes,oe=n.hiddenUpdates;for(o=A&~o;0<o;){var he=31-Rt(o),me=1<<he;z[he]=0,H[he]=-1;var le=oe[he];if(le!==null)for(oe[he]=null,he=0;he<le.length;he++){var ce=le[he];ce!==null&&(ce.lane&=-536870913)}o&=~me}u!==0&&Fn(n,u,0),y!==0&&p===0&&n.tag!==0&&(n.suspendedLanes|=y&~(A&~a))}function Fn(n,a,o){n.pendingLanes|=a,n.suspendedLanes&=~a;var u=31-Rt(a);n.entangledLanes|=a,n.entanglements[u]=n.entanglements[u]|1073741824|o&261930}function on(n,a){var o=n.entangledLanes|=a;for(n=n.entanglements;o;){var u=31-Rt(o),p=1<<u;p&a|n[u]&a&&(n[u]|=a),o&=~p}}function Cn(n,a){var o=a&-a;return o=(o&42)!==0?1:Ft(o),(o&(n.suspendedLanes|a))!==0?0:o}function Ft(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function Vr(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function Pr(){var n=B.p;return n!==0?n:(n=window.event,n===void 0?32:mv(n.type))}function $a(n,a){var o=B.p;try{return B.p=n,a()}finally{B.p=o}}var nr=Math.random().toString(36).slice(2),$t="__reactFiber$"+nr,sn="__reactProps$"+nr,Ir="__reactContainer$"+nr,Ua="__reactEvents$"+nr,ts="__reactListeners$"+nr,yf="__reactHandles$"+nr,ml="__reactResources$"+nr,fo="__reactMarker$"+nr;function Bl(n){delete n[$t],delete n[sn],delete n[Ua],delete n[ts],delete n[yf]}function Oi(n){var a=n[$t];if(a)return a;for(var o=n.parentNode;o;){if(a=o[Ir]||o[$t]){if(o=a.alternate,a.child!==null||o!==null&&o.child!==null)for(n=J0(n);n!==null;){if(o=n[$t])return o;n=J0(n)}return a}n=o,o=n.parentNode}return null}function Ri(n){if(n=n[$t]||n[Ir]){var a=n.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return n}return null}function ho(n){var a=n.tag;if(a===5||a===26||a===27||a===6)return n.stateNode;throw Error(i(33))}function Ai(n){var a=n[ml];return a||(a=n[ml]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function yn(n){n[fo]=!0}var Sc=new Set,Hl={};function qa(n,a){wi(n,a),wi(n+"Capture",a)}function wi(n,a){for(Hl[n]=a,n=0;n<a.length;n++)Sc.add(a[n])}var Hm=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]*$"),Gl={},Pa={};function fp(n){return Ce.call(Pa,n)?!0:Ce.call(Gl,n)?!1:Hm.test(n)?Pa[n]=!0:(Gl[n]=!0,!1)}function Ss(n,a,o){if(fp(a))if(o===null)n.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":n.removeAttribute(a);return;case"boolean":var u=a.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){n.removeAttribute(a);return}}n.setAttribute(a,""+o)}}function ns(n,a,o){if(o===null)n.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(a);return}n.setAttribute(a,""+o)}}function Wr(n,a,o,u){if(u===null)n.removeAttribute(o);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(o);return}n.setAttributeNS(a,o,""+u)}}function rr(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function wc(n){var a=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function Gm(n,a,o){var u=Object.getOwnPropertyDescriptor(n.constructor.prototype,a);if(!n.hasOwnProperty(a)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var p=u.get,y=u.set;return Object.defineProperty(n,a,{configurable:!0,get:function(){return p.call(this)},set:function(A){o=""+A,y.call(this,A)}}),Object.defineProperty(n,a,{enumerable:u.enumerable}),{getValue:function(){return o},setValue:function(A){o=""+A},stopTracking:function(){n._valueTracker=null,delete n[a]}}}}function gl(n){if(!n._valueTracker){var a=wc(n)?"checked":"value";n._valueTracker=Gm(n,a,""+n[a])}}function vf(n){if(!n)return!1;var a=n._valueTracker;if(!a)return!0;var o=a.getValue(),u="";return n&&(u=wc(n)?n.checked?"true":"false":n.value),n=u,n!==o?(a.setValue(n),!0):!1}function po(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var Km=/[\n"\\]/g;function Bn(n){return n.replace(Km,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function Kl(n,a,o,u,p,y,A,z){n.name="",A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?n.type=A:n.removeAttribute("type"),a!=null?A==="number"?(a===0&&n.value===""||n.value!=a)&&(n.value=""+rr(a)):n.value!==""+rr(a)&&(n.value=""+rr(a)):A!=="submit"&&A!=="reset"||n.removeAttribute("value"),a!=null?Yl(n,A,rr(a)):o!=null?Yl(n,A,rr(o)):u!=null&&n.removeAttribute("value"),p==null&&y!=null&&(n.defaultChecked=!!y),p!=null&&(n.checked=p&&typeof p!="function"&&typeof p!="symbol"),z!=null&&typeof z!="function"&&typeof z!="symbol"&&typeof z!="boolean"?n.name=""+rr(z):n.removeAttribute("name")}function bf(n,a,o,u,p,y,A,z){if(y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(n.type=y),a!=null||o!=null){if(!(y!=="submit"&&y!=="reset"||a!=null)){gl(n);return}o=o!=null?""+rr(o):"",a=a!=null?""+rr(a):o,z||a===n.value||(n.value=a),n.defaultValue=a}u=u??p,u=typeof u!="function"&&typeof u!="symbol"&&!!u,n.checked=z?n.checked:!!u,n.defaultChecked=!!u,A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"&&(n.name=A),gl(n)}function Yl(n,a,o){a==="number"&&po(n.ownerDocument)===n||n.defaultValue===""+o||(n.defaultValue=""+o)}function Mi(n,a,o,u){if(n=n.options,a){a={};for(var p=0;p<o.length;p++)a["$"+o[p]]=!0;for(o=0;o<n.length;o++)p=a.hasOwnProperty("$"+n[o].value),n[o].selected!==p&&(n[o].selected=p),p&&u&&(n[o].defaultSelected=!0)}else{for(o=""+rr(o),a=null,p=0;p<n.length;p++){if(n[p].value===o){n[p].selected=!0,u&&(n[p].defaultSelected=!0);return}a!==null||n[p].disabled||(a=n[p])}a!==null&&(a.selected=!0)}}function yl(n,a,o){if(a!=null&&(a=""+rr(a),a!==n.value&&(n.value=a),o==null)){n.defaultValue!==a&&(n.defaultValue=a);return}n.defaultValue=o!=null?""+rr(o):""}function Sf(n,a,o,u){if(a==null){if(u!=null){if(o!=null)throw Error(i(92));if(ae(u)){if(1<u.length)throw Error(i(93));u=u[0]}o=u}o==null&&(o=""),a=o}o=rr(a),n.defaultValue=o,u=n.textContent,u===o&&u!==""&&u!==null&&(n.value=u),gl(n)}function ne(n,a){if(a){var o=n.firstChild;if(o&&o===n.lastChild&&o.nodeType===3){o.nodeValue=a;return}}n.textContent=a}var Z=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 X(n,a,o){var u=a.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?u?n.setProperty(a,""):a==="float"?n.cssFloat="":n[a]="":u?n.setProperty(a,o):typeof o!="number"||o===0||Z.has(a)?a==="float"?n.cssFloat=o:n[a]=(""+o).trim():n[a]=o+"px"}function W(n,a,o){if(a!=null&&typeof a!="object")throw Error(i(62));if(n=n.style,o!=null){for(var u in o)!o.hasOwnProperty(u)||a!=null&&a.hasOwnProperty(u)||(u.indexOf("--")===0?n.setProperty(u,""):u==="float"?n.cssFloat="":n[u]="");for(var p in a)u=a[p],a.hasOwnProperty(p)&&o[p]!==u&&X(n,p,u)}else for(var y in a)a.hasOwnProperty(y)&&X(n,y,a[y])}function ge(n){if(n.indexOf("-")===-1)return!1;switch(n){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Re=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"]]),_e=/^[\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 ye(n){return _e.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function Me(){}var Ie=null;function Ye(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var He=null,lt=null;function We(n){var a=Ri(n);if(a&&(n=a.stateNode)){var o=n[sn]||null;e:switch(n=a.stateNode,a.type){case"input":if(Kl(n,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),a=o.name,o.type==="radio"&&a!=null){for(o=n;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+Bn(""+a)+'"][type="radio"]'),a=0;a<o.length;a++){var u=o[a];if(u!==n&&u.form===n.form){var p=u[sn]||null;if(!p)throw Error(i(90));Kl(u,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(a=0;a<o.length;a++)u=o[a],u.form===n.form&&vf(u)}break e;case"textarea":yl(n,o.value,o.defaultValue);break e;case"select":a=o.value,a!=null&&Mi(n,!!o.multiple,a,!1)}}}var Bt=!1;function hn(n,a,o){if(Bt)return n(a,o);Bt=!0;try{var u=n(a);return u}finally{if(Bt=!1,(He!==null||lt!==null)&&(ku(),He&&(a=He,n=lt,lt=He=null,We(a),n)))for(a=0;a<n.length;a++)We(n[a])}}function bt(n,a){var o=n.stateNode;if(o===null)return null;var u=o[sn]||null;if(u===null)return null;o=u[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(n=n.type,u=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!u;break e;default:n=!1}if(n)return null;if(o&&typeof o!="function")throw Error(i(231,a,typeof o));return o}var jt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Er=!1;if(jt)try{var An={};Object.defineProperty(An,"passive",{get:function(){Er=!0}}),window.addEventListener("test",An,An),window.removeEventListener("test",An,An)}catch{Er=!1}var ar=null,Jr=null,ji=null;function rs(){if(ji)return ji;var n,a=Jr,o=a.length,u,p="value"in ar?ar.value:ar.textContent,y=p.length;for(n=0;n<o&&a[n]===p[n];n++);var A=o-n;for(u=1;u<=A&&a[o-u]===p[y-u];u++);return ji=p.slice(n,1<u?1-u:void 0)}function Ei(n){var a=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&a===13&&(n=13)):n=a,n===10&&(n=13),32<=n||n===13?n:0}function la(){return!0}function Ec(){return!1}function Ln(n){function a(o,u,p,y,A){this._reactName=o,this._targetInst=p,this.type=u,this.nativeEvent=y,this.target=A,this.currentTarget=null;for(var z in n)n.hasOwnProperty(z)&&(o=n[z],this[z]=o?o(y):y[z]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?la:Ec,this.isPropagationStopped=Ec,this}return g(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=la)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=la)},persist:function(){},isPersistent:la}),a}var Ia={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ki=Ln(Ia),Di=g({},Ia,{view:0,detail:0}),wf=Ln(Di),ws,Zl,ro,Xl=g({},Di,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xf,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==ro&&(ro&&n.type==="mousemove"?(ws=n.screenX-ro.screenX,Zl=n.screenY-ro.screenY):Zl=ws=0,ro=n),ws)},movementY:function(n){return"movementY"in n?n.movementY:Zl}}),Ym=Ln(Xl),q2=g({},Xl,{dataTransfer:0}),V2=Ln(q2),F2=g({},Di,{relatedTarget:0}),Ef=Ln(F2),B2=g({},Ia,{animationName:0,elapsedTime:0,pseudoElement:0}),H2=Ln(B2),G2=g({},Ia,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),K2=Ln(G2),Y2=g({},Ia,{data:0}),Zm=Ln(Y2),Z2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},X2={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"},Q2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function W2(n){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(n):(n=Q2[n])?!!a[n]:!1}function xf(){return W2}var J2=g({},Di,{key:function(n){if(n.key){var a=Z2[n.key]||n.key;if(a!=="Unidentified")return a}return n.type==="keypress"?(n=Ei(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?X2[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xf,charCode:function(n){return n.type==="keypress"?Ei(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Ei(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),eE=Ln(J2),tE=g({},Xl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Xm=Ln(tE),nE=g({},Di,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xf}),rE=Ln(nE),aE=g({},Ia,{propertyName:0,elapsedTime:0,pseudoElement:0}),iE=Ln(aE),oE=g({},Xl,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),sE=Ln(oE),lE=g({},Ia,{newState:0,oldState:0}),uE=Ln(lE),cE=[9,13,27,32],_f=jt&&"CompositionEvent"in window,Es=null;jt&&"documentMode"in document&&(Es=document.documentMode);var fE=jt&&"TextEvent"in window&&!Es,Qm=jt&&(!_f||Es&&8<Es&&11>=Es),Wm=" ",Jm=!1;function eg(n,a){switch(n){case"keyup":return cE.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function tg(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var mo=!1;function dE(n,a){switch(n){case"compositionend":return tg(a);case"keypress":return a.which!==32?null:(Jm=!0,Wm);case"textInput":return n=a.data,n===Wm&&Jm?null:n;default:return null}}function hE(n,a){if(mo)return n==="compositionend"||!_f&&eg(n,a)?(n=rs(),ji=Jr=ar=null,mo=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return Qm&&a.locale!=="ko"?null:a.data;default:return null}}var pE={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 ng(n){var a=n&&n.nodeName&&n.nodeName.toLowerCase();return a==="input"?!!pE[n.type]:a==="textarea"}function rg(n,a,o,u){He?lt?lt.push(u):lt=[u]:He=u,a=Lu(a,"onChange"),0<a.length&&(o=new ki("onChange","change",null,o,u),n.push({event:o,listeners:a}))}var xs=null,_s=null;function mE(n){L0(n,0)}function Ql(n){var a=ho(n);if(vf(a))return n}function ag(n,a){if(n==="change")return a}var ig=!1;if(jt){var Tf;if(jt){var Cf="oninput"in document;if(!Cf){var og=document.createElement("div");og.setAttribute("oninput","return;"),Cf=typeof og.oninput=="function"}Tf=Cf}else Tf=!1;ig=Tf&&(!document.documentMode||9<document.documentMode)}function sg(){xs&&(xs.detachEvent("onpropertychange",lg),_s=xs=null)}function lg(n){if(n.propertyName==="value"&&Ql(_s)){var a=[];rg(a,_s,n,Ye(n)),hn(mE,a)}}function gE(n,a,o){n==="focusin"?(sg(),xs=a,_s=o,xs.attachEvent("onpropertychange",lg)):n==="focusout"&&sg()}function yE(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Ql(_s)}function vE(n,a){if(n==="click")return Ql(a)}function bE(n,a){if(n==="input"||n==="change")return Ql(a)}function SE(n,a){return n===a&&(n!==0||1/n===1/a)||n!==n&&a!==a}var lr=typeof Object.is=="function"?Object.is:SE;function Ts(n,a){if(lr(n,a))return!0;if(typeof n!="object"||n===null||typeof a!="object"||a===null)return!1;var o=Object.keys(n),u=Object.keys(a);if(o.length!==u.length)return!1;for(u=0;u<o.length;u++){var p=o[u];if(!Ce.call(a,p)||!lr(n[p],a[p]))return!1}return!0}function ug(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function cg(n,a){var o=ug(n);n=0;for(var u;o;){if(o.nodeType===3){if(u=n+o.textContent.length,n<=a&&u>=a)return{node:o,offset:a-n};n=u}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=ug(o)}}function fg(n,a){return n&&a?n===a?!0:n&&n.nodeType===3?!1:a&&a.nodeType===3?fg(n,a.parentNode):"contains"in n?n.contains(a):n.compareDocumentPosition?!!(n.compareDocumentPosition(a)&16):!1:!1}function dg(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var a=po(n.document);a instanceof n.HTMLIFrameElement;){try{var o=typeof a.contentWindow.location.href=="string"}catch{o=!1}if(o)n=a.contentWindow;else break;a=po(n.document)}return a}function Of(n){var a=n&&n.nodeName&&n.nodeName.toLowerCase();return a&&(a==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||a==="textarea"||n.contentEditable==="true")}var wE=jt&&"documentMode"in document&&11>=document.documentMode,go=null,Rf=null,Cs=null,Af=!1;function hg(n,a,o){var u=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Af||go==null||go!==po(u)||(u=go,"selectionStart"in u&&Of(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Cs&&Ts(Cs,u)||(Cs=u,u=Lu(Rf,"onSelect"),0<u.length&&(a=new ki("onSelect","select",null,a,o),n.push({event:a,listeners:u}),a.target=go)))}function Ni(n,a){var o={};return o[n.toLowerCase()]=a.toLowerCase(),o["Webkit"+n]="webkit"+a,o["Moz"+n]="moz"+a,o}var yo={animationend:Ni("Animation","AnimationEnd"),animationiteration:Ni("Animation","AnimationIteration"),animationstart:Ni("Animation","AnimationStart"),transitionrun:Ni("Transition","TransitionRun"),transitionstart:Ni("Transition","TransitionStart"),transitioncancel:Ni("Transition","TransitionCancel"),transitionend:Ni("Transition","TransitionEnd")},Mf={},pg={};jt&&(pg=document.createElement("div").style,"AnimationEvent"in window||(delete yo.animationend.animation,delete yo.animationiteration.animation,delete yo.animationstart.animation),"TransitionEvent"in window||delete yo.transitionend.transition);function zi(n){if(Mf[n])return Mf[n];if(!yo[n])return n;var a=yo[n],o;for(o in a)if(a.hasOwnProperty(o)&&o in pg)return Mf[n]=a[o];return n}var mg=zi("animationend"),gg=zi("animationiteration"),yg=zi("animationstart"),EE=zi("transitionrun"),xE=zi("transitionstart"),_E=zi("transitioncancel"),vg=zi("transitionend"),bg=new Map,jf="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(" ");jf.push("scrollEnd");function Fr(n,a){bg.set(n,a),qa(a,[n])}var Wl=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},xr=[],vo=0,kf=0;function Jl(){for(var n=vo,a=kf=vo=0;a<n;){var o=xr[a];xr[a++]=null;var u=xr[a];xr[a++]=null;var p=xr[a];xr[a++]=null;var y=xr[a];if(xr[a++]=null,u!==null&&p!==null){var A=u.pending;A===null?p.next=p:(p.next=A.next,A.next=p),u.pending=p}y!==0&&Sg(o,p,y)}}function eu(n,a,o,u){xr[vo++]=n,xr[vo++]=a,xr[vo++]=o,xr[vo++]=u,kf|=u,n.lanes|=u,n=n.alternate,n!==null&&(n.lanes|=u)}function Df(n,a,o,u){return eu(n,a,o,u),tu(n)}function $i(n,a){return eu(n,null,null,a),tu(n)}function Sg(n,a,o){n.lanes|=o;var u=n.alternate;u!==null&&(u.lanes|=o);for(var p=!1,y=n.return;y!==null;)y.childLanes|=o,u=y.alternate,u!==null&&(u.childLanes|=o),y.tag===22&&(n=y.stateNode,n===null||n._visibility&1||(p=!0)),n=y,y=y.return;return n.tag===3?(y=n.stateNode,p&&a!==null&&(p=31-Rt(o),n=y.hiddenUpdates,u=n[p],u===null?n[p]=[a]:u.push(a),a.lane=o|536870912),y):null}function tu(n){if(50<Ys)throw Ys=0,Vd=null,Error(i(185));for(var a=n.return;a!==null;)n=a,a=n.return;return n.tag===3?n.stateNode:null}var bo={};function TE(n,a,o,u){this.tag=n,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ur(n,a,o,u){return new TE(n,a,o,u)}function Nf(n){return n=n.prototype,!(!n||!n.isReactComponent)}function pa(n,a){var o=n.alternate;return o===null?(o=ur(n.tag,a,n.key,n.mode),o.elementType=n.elementType,o.type=n.type,o.stateNode=n.stateNode,o.alternate=n,n.alternate=o):(o.pendingProps=a,o.type=n.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=n.flags&65011712,o.childLanes=n.childLanes,o.lanes=n.lanes,o.child=n.child,o.memoizedProps=n.memoizedProps,o.memoizedState=n.memoizedState,o.updateQueue=n.updateQueue,a=n.dependencies,o.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},o.sibling=n.sibling,o.index=n.index,o.ref=n.ref,o.refCleanup=n.refCleanup,o}function wg(n,a){n.flags&=65011714;var o=n.alternate;return o===null?(n.childLanes=0,n.lanes=a,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=o.childLanes,n.lanes=o.lanes,n.child=o.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=o.memoizedProps,n.memoizedState=o.memoizedState,n.updateQueue=o.updateQueue,n.type=o.type,a=o.dependencies,n.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),n}function nu(n,a,o,u,p,y){var A=0;if(u=n,typeof n=="function")Nf(n)&&(A=1);else if(typeof n=="string")A=Mx(n,o,P.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case $:return n=ur(31,o,a,p),n.elementType=$,n.lanes=y,n;case _:return Pi(o.children,p,y,a);case x:A=8,p|=24;break;case R:return n=ur(12,o,a,p|2),n.elementType=R,n.lanes=y,n;case O:return n=ur(13,o,a,p),n.elementType=O,n.lanes=y,n;case C:return n=ur(19,o,a,p),n.elementType=C,n.lanes=y,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case T:A=10;break e;case S:A=9;break e;case E:A=11;break e;case M:A=14;break e;case D:A=16,u=null;break e}A=29,o=Error(i(130,n===null?"null":typeof n,"")),u=null}return a=ur(A,o,a,p),a.elementType=n,a.type=u,a.lanes=y,a}function Pi(n,a,o,u){return n=ur(7,n,u,a),n.lanes=o,n}function zf(n,a,o){return n=ur(6,n,null,a),n.lanes=o,n}function Eg(n){var a=ur(18,null,null,0);return a.stateNode=n,a}function $f(n,a,o){return a=ur(4,n.children!==null?n.children:[],n.key,a),a.lanes=o,a.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},a}var xg=new WeakMap;function _r(n,a){if(typeof n=="object"&&n!==null){var o=xg.get(n);return o!==void 0?o:(a={value:n,source:a,stack:Ge(a)},xg.set(n,a),a)}return{value:n,source:a,stack:Ge(a)}}var So=[],wo=0,ru=null,Os=0,Tr=[],Cr=0,Va=null,na=1,ra="";function ma(n,a){So[wo++]=Os,So[wo++]=ru,ru=n,Os=a}function _g(n,a,o){Tr[Cr++]=na,Tr[Cr++]=ra,Tr[Cr++]=Va,Va=n;var u=na;n=ra;var p=32-Rt(u)-1;u&=~(1<<p),o+=1;var y=32-Rt(a)+p;if(30<y){var A=p-p%5;y=(u&(1<<A)-1).toString(32),u>>=A,p-=A,na=1<<32-Rt(a)+p|o<<p|u,ra=y+n}else na=1<<y|o<<p|u,ra=n}function Pf(n){n.return!==null&&(ma(n,1),_g(n,1,0))}function If(n){for(;n===ru;)ru=So[--wo],So[wo]=null,Os=So[--wo],So[wo]=null;for(;n===Va;)Va=Tr[--Cr],Tr[Cr]=null,ra=Tr[--Cr],Tr[Cr]=null,na=Tr[--Cr],Tr[Cr]=null}function Tg(n,a){Tr[Cr++]=na,Tr[Cr++]=ra,Tr[Cr++]=Va,na=a.id,ra=a.overflow,Va=n}var jn=null,Nt=null,st=!1,Fa=null,Or=!1,Lf=Error(i(519));function Ba(n){var a=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Rs(_r(a,n)),Lf}function Cg(n){var a=n.stateNode,o=n.type,u=n.memoizedProps;switch(a[$t]=n,a[sn]=u,o){case"dialog":nt("cancel",a),nt("close",a);break;case"iframe":case"object":case"embed":nt("load",a);break;case"video":case"audio":for(o=0;o<Xs.length;o++)nt(Xs[o],a);break;case"source":nt("error",a);break;case"img":case"image":case"link":nt("error",a),nt("load",a);break;case"details":nt("toggle",a);break;case"input":nt("invalid",a),bf(a,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":nt("invalid",a);break;case"textarea":nt("invalid",a),Sf(a,u.value,u.defaultValue,u.children)}o=u.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||a.textContent===""+o||u.suppressHydrationWarning===!0||F0(a.textContent,o)?(u.popover!=null&&(nt("beforetoggle",a),nt("toggle",a)),u.onScroll!=null&&nt("scroll",a),u.onScrollEnd!=null&&nt("scrollend",a),u.onClick!=null&&(a.onclick=Me),a=!0):a=!1,a||Ba(n,!0)}function Og(n){for(jn=n.return;jn;)switch(jn.tag){case 5:case 31:case 13:Or=!1;return;case 27:case 3:Or=!0;return;default:jn=jn.return}}function Eo(n){if(n!==jn)return!1;if(!st)return Og(n),st=!0,!1;var a=n.tag,o;if((o=a!==3&&a!==27)&&((o=a===5)&&(o=n.type,o=!(o!=="form"&&o!=="button")||rh(n.type,n.memoizedProps)),o=!o),o&&Nt&&Ba(n),Og(n),a===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(317));Nt=W0(n)}else if(a===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(317));Nt=W0(n)}else a===27?(a=Nt,ai(n.type)?(n=lh,lh=null,Nt=n):Nt=a):Nt=jn?Ar(n.stateNode.nextSibling):null;return!0}function Ii(){Nt=jn=null,st=!1}function Uf(){var n=Fa;return n!==null&&(Wn===null?Wn=n:Wn.push.apply(Wn,n),Fa=null),n}function Rs(n){Fa===null?Fa=[n]:Fa.push(n)}var qf=N(null),Li=null,ga=null;function Ha(n,a,o){U(qf,a._currentValue),a._currentValue=o}function ya(n){n._currentValue=qf.current,I(qf)}function Vf(n,a,o){for(;n!==null;){var u=n.alternate;if((n.childLanes&a)!==a?(n.childLanes|=a,u!==null&&(u.childLanes|=a)):u!==null&&(u.childLanes&a)!==a&&(u.childLanes|=a),n===o)break;n=n.return}}function Ff(n,a,o,u){var p=n.child;for(p!==null&&(p.return=n);p!==null;){var y=p.dependencies;if(y!==null){var A=p.child;y=y.firstContext;e:for(;y!==null;){var z=y;y=p;for(var H=0;H<a.length;H++)if(z.context===a[H]){y.lanes|=o,z=y.alternate,z!==null&&(z.lanes|=o),Vf(y.return,o,n),u||(A=null);break e}y=z.next}}else if(p.tag===18){if(A=p.return,A===null)throw Error(i(341));A.lanes|=o,y=A.alternate,y!==null&&(y.lanes|=o),Vf(A,o,n),A=null}else A=p.child;if(A!==null)A.return=p;else for(A=p;A!==null;){if(A===n){A=null;break}if(p=A.sibling,p!==null){p.return=A.return,A=p;break}A=A.return}p=A}}function xo(n,a,o,u){n=null;for(var p=a,y=!1;p!==null;){if(!y){if((p.flags&524288)!==0)y=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var A=p.alternate;if(A===null)throw Error(i(387));if(A=A.memoizedProps,A!==null){var z=p.type;lr(p.pendingProps.value,A.value)||(n!==null?n.push(z):n=[z])}}else if(p===ue.current){if(A=p.alternate,A===null)throw Error(i(387));A.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(n!==null?n.push(tl):n=[tl])}p=p.return}n!==null&&Ff(a,n,o,u),a.flags|=262144}function au(n){for(n=n.firstContext;n!==null;){if(!lr(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function Ui(n){Li=n,ga=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function kn(n){return Rg(Li,n)}function iu(n,a){return Li===null&&Ui(n),Rg(n,a)}function Rg(n,a){var o=a._currentValue;if(a={context:a,memoizedValue:o,next:null},ga===null){if(n===null)throw Error(i(308));ga=a,n.dependencies={lanes:0,firstContext:a},n.flags|=524288}else ga=ga.next=a;return o}var CE=typeof AbortController<"u"?AbortController:function(){var n=[],a=this.signal={aborted:!1,addEventListener:function(o,u){n.push(u)}};this.abort=function(){a.aborted=!0,n.forEach(function(o){return o()})}},OE=e.unstable_scheduleCallback,RE=e.unstable_NormalPriority,ln={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Bf(){return{controller:new CE,data:new Map,refCount:0}}function As(n){n.refCount--,n.refCount===0&&OE(RE,function(){n.controller.abort()})}var Ms=null,Hf=0,_o=0,To=null;function AE(n,a){if(Ms===null){var o=Ms=[];Hf=0,_o=Yd(),To={status:"pending",value:void 0,then:function(u){o.push(u)}}}return Hf++,a.then(Ag,Ag),a}function Ag(){if(--Hf===0&&Ms!==null){To!==null&&(To.status="fulfilled");var n=Ms;Ms=null,_o=0,To=null;for(var a=0;a<n.length;a++)(0,n[a])()}}function ME(n,a){var o=[],u={status:"pending",value:null,reason:null,then:function(p){o.push(p)}};return n.then(function(){u.status="fulfilled",u.value=a;for(var p=0;p<o.length;p++)(0,o[p])(a)},function(p){for(u.status="rejected",u.reason=p,p=0;p<o.length;p++)(0,o[p])(void 0)}),u}var Mg=K.S;K.S=function(n,a){h0=Ue(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&AE(n,a),Mg!==null&&Mg(n,a)};var qi=N(null);function Gf(){var n=qi.current;return n!==null?n:At.pooledCache}function ou(n,a){a===null?U(qi,qi.current):U(qi,a.pool)}function jg(){var n=Gf();return n===null?null:{parent:ln._currentValue,pool:n}}var Co=Error(i(460)),Kf=Error(i(474)),su=Error(i(542)),lu={then:function(){}};function kg(n){return n=n.status,n==="fulfilled"||n==="rejected"}function Dg(n,a,o){switch(o=n[o],o===void 0?n.push(a):o!==a&&(a.then(Me,Me),a=o),a.status){case"fulfilled":return a.value;case"rejected":throw n=a.reason,zg(n),n;default:if(typeof a.status=="string")a.then(Me,Me);else{if(n=At,n!==null&&100<n.shellSuspendCounter)throw Error(i(482));n=a,n.status="pending",n.then(function(u){if(a.status==="pending"){var p=a;p.status="fulfilled",p.value=u}},function(u){if(a.status==="pending"){var p=a;p.status="rejected",p.reason=u}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw n=a.reason,zg(n),n}throw Fi=a,Co}}function Vi(n){try{var a=n._init;return a(n._payload)}catch(o){throw o!==null&&typeof o=="object"&&typeof o.then=="function"?(Fi=o,Co):o}}var Fi=null;function Ng(){if(Fi===null)throw Error(i(459));var n=Fi;return Fi=null,n}function zg(n){if(n===Co||n===su)throw Error(i(483))}var Oo=null,js=0;function uu(n){var a=js;return js+=1,Oo===null&&(Oo=[]),Dg(Oo,n,a)}function ks(n,a){a=a.props.ref,n.ref=a!==void 0?a:null}function cu(n,a){throw a.$$typeof===v?Error(i(525)):(n=Object.prototype.toString.call(a),Error(i(31,n==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":n)))}function $g(n){function a(J,Q){if(n){var ie=J.deletions;ie===null?(J.deletions=[Q],J.flags|=16):ie.push(Q)}}function o(J,Q){if(!n)return null;for(;Q!==null;)a(J,Q),Q=Q.sibling;return null}function u(J){for(var Q=new Map;J!==null;)J.key!==null?Q.set(J.key,J):Q.set(J.index,J),J=J.sibling;return Q}function p(J,Q){return J=pa(J,Q),J.index=0,J.sibling=null,J}function y(J,Q,ie){return J.index=ie,n?(ie=J.alternate,ie!==null?(ie=ie.index,ie<Q?(J.flags|=67108866,Q):ie):(J.flags|=67108866,Q)):(J.flags|=1048576,Q)}function A(J){return n&&J.alternate===null&&(J.flags|=67108866),J}function z(J,Q,ie,pe){return Q===null||Q.tag!==6?(Q=zf(ie,J.mode,pe),Q.return=J,Q):(Q=p(Q,ie),Q.return=J,Q)}function H(J,Q,ie,pe){var Le=ie.type;return Le===_?he(J,Q,ie.props.children,pe,ie.key):Q!==null&&(Q.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===D&&Vi(Le)===Q.type)?(Q=p(Q,ie.props),ks(Q,ie),Q.return=J,Q):(Q=nu(ie.type,ie.key,ie.props,null,J.mode,pe),ks(Q,ie),Q.return=J,Q)}function oe(J,Q,ie,pe){return Q===null||Q.tag!==4||Q.stateNode.containerInfo!==ie.containerInfo||Q.stateNode.implementation!==ie.implementation?(Q=$f(ie,J.mode,pe),Q.return=J,Q):(Q=p(Q,ie.children||[]),Q.return=J,Q)}function he(J,Q,ie,pe,Le){return Q===null||Q.tag!==7?(Q=Pi(ie,J.mode,pe,Le),Q.return=J,Q):(Q=p(Q,ie),Q.return=J,Q)}function me(J,Q,ie){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return Q=zf(""+Q,J.mode,ie),Q.return=J,Q;if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case w:return ie=nu(Q.type,Q.key,Q.props,null,J.mode,ie),ks(ie,Q),ie.return=J,ie;case b:return Q=$f(Q,J.mode,ie),Q.return=J,Q;case D:return Q=Vi(Q),me(J,Q,ie)}if(ae(Q)||V(Q))return Q=Pi(Q,J.mode,ie,null),Q.return=J,Q;if(typeof Q.then=="function")return me(J,uu(Q),ie);if(Q.$$typeof===T)return me(J,iu(J,Q),ie);cu(J,Q)}return null}function le(J,Q,ie,pe){var Le=Q!==null?Q.key:null;if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return Le!==null?null:z(J,Q,""+ie,pe);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case w:return ie.key===Le?H(J,Q,ie,pe):null;case b:return ie.key===Le?oe(J,Q,ie,pe):null;case D:return ie=Vi(ie),le(J,Q,ie,pe)}if(ae(ie)||V(ie))return Le!==null?null:he(J,Q,ie,pe,null);if(typeof ie.then=="function")return le(J,Q,uu(ie),pe);if(ie.$$typeof===T)return le(J,Q,iu(J,ie),pe);cu(J,ie)}return null}function ce(J,Q,ie,pe,Le){if(typeof pe=="string"&&pe!==""||typeof pe=="number"||typeof pe=="bigint")return J=J.get(ie)||null,z(Q,J,""+pe,Le);if(typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case w:return J=J.get(pe.key===null?ie:pe.key)||null,H(Q,J,pe,Le);case b:return J=J.get(pe.key===null?ie:pe.key)||null,oe(Q,J,pe,Le);case D:return pe=Vi(pe),ce(J,Q,ie,pe,Le)}if(ae(pe)||V(pe))return J=J.get(ie)||null,he(Q,J,pe,Le,null);if(typeof pe.then=="function")return ce(J,Q,ie,uu(pe),Le);if(pe.$$typeof===T)return ce(J,Q,ie,iu(Q,pe),Le);cu(Q,pe)}return null}function je(J,Q,ie,pe){for(var Le=null,dt=null,ze=Q,Qe=Q=0,it=null;ze!==null&&Qe<ie.length;Qe++){ze.index>Qe?(it=ze,ze=null):it=ze.sibling;var ht=le(J,ze,ie[Qe],pe);if(ht===null){ze===null&&(ze=it);break}n&&ze&&ht.alternate===null&&a(J,ze),Q=y(ht,Q,Qe),dt===null?Le=ht:dt.sibling=ht,dt=ht,ze=it}if(Qe===ie.length)return o(J,ze),st&&ma(J,Qe),Le;if(ze===null){for(;Qe<ie.length;Qe++)ze=me(J,ie[Qe],pe),ze!==null&&(Q=y(ze,Q,Qe),dt===null?Le=ze:dt.sibling=ze,dt=ze);return st&&ma(J,Qe),Le}for(ze=u(ze);Qe<ie.length;Qe++)it=ce(ze,J,Qe,ie[Qe],pe),it!==null&&(n&&it.alternate!==null&&ze.delete(it.key===null?Qe:it.key),Q=y(it,Q,Qe),dt===null?Le=it:dt.sibling=it,dt=it);return n&&ze.forEach(function(ui){return a(J,ui)}),st&&ma(J,Qe),Le}function qe(J,Q,ie,pe){if(ie==null)throw Error(i(151));for(var Le=null,dt=null,ze=Q,Qe=Q=0,it=null,ht=ie.next();ze!==null&&!ht.done;Qe++,ht=ie.next()){ze.index>Qe?(it=ze,ze=null):it=ze.sibling;var ui=le(J,ze,ht.value,pe);if(ui===null){ze===null&&(ze=it);break}n&&ze&&ui.alternate===null&&a(J,ze),Q=y(ui,Q,Qe),dt===null?Le=ui:dt.sibling=ui,dt=ui,ze=it}if(ht.done)return o(J,ze),st&&ma(J,Qe),Le;if(ze===null){for(;!ht.done;Qe++,ht=ie.next())ht=me(J,ht.value,pe),ht!==null&&(Q=y(ht,Q,Qe),dt===null?Le=ht:dt.sibling=ht,dt=ht);return st&&ma(J,Qe),Le}for(ze=u(ze);!ht.done;Qe++,ht=ie.next())ht=ce(ze,J,Qe,ht.value,pe),ht!==null&&(n&&ht.alternate!==null&&ze.delete(ht.key===null?Qe:ht.key),Q=y(ht,Q,Qe),dt===null?Le=ht:dt.sibling=ht,dt=ht);return n&&ze.forEach(function(qx){return a(J,qx)}),st&&ma(J,Qe),Le}function Ot(J,Q,ie,pe){if(typeof ie=="object"&&ie!==null&&ie.type===_&&ie.key===null&&(ie=ie.props.children),typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case w:e:{for(var Le=ie.key;Q!==null;){if(Q.key===Le){if(Le=ie.type,Le===_){if(Q.tag===7){o(J,Q.sibling),pe=p(Q,ie.props.children),pe.return=J,J=pe;break e}}else if(Q.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===D&&Vi(Le)===Q.type){o(J,Q.sibling),pe=p(Q,ie.props),ks(pe,ie),pe.return=J,J=pe;break e}o(J,Q);break}else a(J,Q);Q=Q.sibling}ie.type===_?(pe=Pi(ie.props.children,J.mode,pe,ie.key),pe.return=J,J=pe):(pe=nu(ie.type,ie.key,ie.props,null,J.mode,pe),ks(pe,ie),pe.return=J,J=pe)}return A(J);case b:e:{for(Le=ie.key;Q!==null;){if(Q.key===Le)if(Q.tag===4&&Q.stateNode.containerInfo===ie.containerInfo&&Q.stateNode.implementation===ie.implementation){o(J,Q.sibling),pe=p(Q,ie.children||[]),pe.return=J,J=pe;break e}else{o(J,Q);break}else a(J,Q);Q=Q.sibling}pe=$f(ie,J.mode,pe),pe.return=J,J=pe}return A(J);case D:return ie=Vi(ie),Ot(J,Q,ie,pe)}if(ae(ie))return je(J,Q,ie,pe);if(V(ie)){if(Le=V(ie),typeof Le!="function")throw Error(i(150));return ie=Le.call(ie),qe(J,Q,ie,pe)}if(typeof ie.then=="function")return Ot(J,Q,uu(ie),pe);if(ie.$$typeof===T)return Ot(J,Q,iu(J,ie),pe);cu(J,ie)}return typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint"?(ie=""+ie,Q!==null&&Q.tag===6?(o(J,Q.sibling),pe=p(Q,ie),pe.return=J,J=pe):(o(J,Q),pe=zf(ie,J.mode,pe),pe.return=J,J=pe),A(J)):o(J,Q)}return function(J,Q,ie,pe){try{js=0;var Le=Ot(J,Q,ie,pe);return Oo=null,Le}catch(ze){if(ze===Co||ze===su)throw ze;var dt=ur(29,ze,null,J.mode);return dt.lanes=pe,dt.return=J,dt}}}var Bi=$g(!0),Pg=$g(!1),Ga=!1;function Yf(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Zf(n,a){n=n.updateQueue,a.updateQueue===n&&(a.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function Ka(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function Ya(n,a,o){var u=n.updateQueue;if(u===null)return null;if(u=u.shared,(yt&2)!==0){var p=u.pending;return p===null?a.next=a:(a.next=p.next,p.next=a),u.pending=a,a=tu(n),Sg(n,null,o),a}return eu(n,u,a,o),tu(n)}function Ds(n,a,o){if(a=a.updateQueue,a!==null&&(a=a.shared,(o&4194048)!==0)){var u=a.lanes;u&=n.pendingLanes,o|=u,a.lanes=o,on(n,o)}}function Xf(n,a){var o=n.updateQueue,u=n.alternate;if(u!==null&&(u=u.updateQueue,o===u)){var p=null,y=null;if(o=o.firstBaseUpdate,o!==null){do{var A={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};y===null?p=y=A:y=y.next=A,o=o.next}while(o!==null);y===null?p=y=a:y=y.next=a}else p=y=a;o={baseState:u.baseState,firstBaseUpdate:p,lastBaseUpdate:y,shared:u.shared,callbacks:u.callbacks},n.updateQueue=o;return}n=o.lastBaseUpdate,n===null?o.firstBaseUpdate=a:n.next=a,o.lastBaseUpdate=a}var Qf=!1;function Ns(){if(Qf){var n=To;if(n!==null)throw n}}function zs(n,a,o,u){Qf=!1;var p=n.updateQueue;Ga=!1;var y=p.firstBaseUpdate,A=p.lastBaseUpdate,z=p.shared.pending;if(z!==null){p.shared.pending=null;var H=z,oe=H.next;H.next=null,A===null?y=oe:A.next=oe,A=H;var he=n.alternate;he!==null&&(he=he.updateQueue,z=he.lastBaseUpdate,z!==A&&(z===null?he.firstBaseUpdate=oe:z.next=oe,he.lastBaseUpdate=H))}if(y!==null){var me=p.baseState;A=0,he=oe=H=null,z=y;do{var le=z.lane&-536870913,ce=le!==z.lane;if(ce?(at&le)===le:(u&le)===le){le!==0&&le===_o&&(Qf=!0),he!==null&&(he=he.next={lane:0,tag:z.tag,payload:z.payload,callback:null,next:null});e:{var je=n,qe=z;le=a;var Ot=o;switch(qe.tag){case 1:if(je=qe.payload,typeof je=="function"){me=je.call(Ot,me,le);break e}me=je;break e;case 3:je.flags=je.flags&-65537|128;case 0:if(je=qe.payload,le=typeof je=="function"?je.call(Ot,me,le):je,le==null)break e;me=g({},me,le);break e;case 2:Ga=!0}}le=z.callback,le!==null&&(n.flags|=64,ce&&(n.flags|=8192),ce=p.callbacks,ce===null?p.callbacks=[le]:ce.push(le))}else ce={lane:le,tag:z.tag,payload:z.payload,callback:z.callback,next:null},he===null?(oe=he=ce,H=me):he=he.next=ce,A|=le;if(z=z.next,z===null){if(z=p.shared.pending,z===null)break;ce=z,z=ce.next,ce.next=null,p.lastBaseUpdate=ce,p.shared.pending=null}}while(!0);he===null&&(H=me),p.baseState=H,p.firstBaseUpdate=oe,p.lastBaseUpdate=he,y===null&&(p.shared.lanes=0),Ja|=A,n.lanes=A,n.memoizedState=me}}function Ig(n,a){if(typeof n!="function")throw Error(i(191,n));n.call(a)}function Lg(n,a){var o=n.callbacks;if(o!==null)for(n.callbacks=null,n=0;n<o.length;n++)Ig(o[n],a)}var Ro=N(null),fu=N(0);function Ug(n,a){n=Ca,U(fu,n),U(Ro,a),Ca=n|a.baseLanes}function Wf(){U(fu,Ca),U(Ro,Ro.current)}function Jf(){Ca=fu.current,I(Ro),I(fu)}var cr=N(null),Rr=null;function Za(n){var a=n.alternate;U(nn,nn.current&1),U(cr,n),Rr===null&&(a===null||Ro.current!==null||a.memoizedState!==null)&&(Rr=n)}function ed(n){U(nn,nn.current),U(cr,n),Rr===null&&(Rr=n)}function qg(n){n.tag===22?(U(nn,nn.current),U(cr,n),Rr===null&&(Rr=n)):Xa()}function Xa(){U(nn,nn.current),U(cr,cr.current)}function fr(n){I(cr),Rr===n&&(Rr=null),I(nn)}var nn=N(0);function du(n){for(var a=n;a!==null;){if(a.tag===13){var o=a.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||oh(o)||sh(o)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===n)break;for(;a.sibling===null;){if(a.return===null||a.return===n)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var va=0,Ze=null,Tt=null,un=null,hu=!1,Ao=!1,Hi=!1,pu=0,$s=0,Mo=null,jE=0;function Yt(){throw Error(i(321))}function td(n,a){if(a===null)return!1;for(var o=0;o<a.length&&o<n.length;o++)if(!lr(n[o],a[o]))return!1;return!0}function nd(n,a,o,u,p,y){return va=y,Ze=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,K.H=n===null||n.memoizedState===null?_y:yd,Hi=!1,y=o(u,p),Hi=!1,Ao&&(y=Fg(a,o,u,p)),Vg(n),y}function Vg(n){K.H=Ls;var a=Tt!==null&&Tt.next!==null;if(va=0,un=Tt=Ze=null,hu=!1,$s=0,Mo=null,a)throw Error(i(300));n===null||cn||(n=n.dependencies,n!==null&&au(n)&&(cn=!0))}function Fg(n,a,o,u){Ze=n;var p=0;do{if(Ao&&(Mo=null),$s=0,Ao=!1,25<=p)throw Error(i(301));if(p+=1,un=Tt=null,n.updateQueue!=null){var y=n.updateQueue;y.lastEffect=null,y.events=null,y.stores=null,y.memoCache!=null&&(y.memoCache.index=0)}K.H=Ty,y=a(o,u)}while(Ao);return y}function kE(){var n=K.H,a=n.useState()[0];return a=typeof a.then=="function"?Ps(a):a,n=n.useState()[0],(Tt!==null?Tt.memoizedState:null)!==n&&(Ze.flags|=1024),a}function rd(){var n=pu!==0;return pu=0,n}function ad(n,a,o){a.updateQueue=n.updateQueue,a.flags&=-2053,n.lanes&=~o}function id(n){if(hu){for(n=n.memoizedState;n!==null;){var a=n.queue;a!==null&&(a.pending=null),n=n.next}hu=!1}va=0,un=Tt=Ze=null,Ao=!1,$s=pu=0,Mo=null}function Vn(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return un===null?Ze.memoizedState=un=n:un=un.next=n,un}function rn(){if(Tt===null){var n=Ze.alternate;n=n!==null?n.memoizedState:null}else n=Tt.next;var a=un===null?Ze.memoizedState:un.next;if(a!==null)un=a,Tt=n;else{if(n===null)throw Ze.alternate===null?Error(i(467)):Error(i(310));Tt=n,n={memoizedState:Tt.memoizedState,baseState:Tt.baseState,baseQueue:Tt.baseQueue,queue:Tt.queue,next:null},un===null?Ze.memoizedState=un=n:un=un.next=n}return un}function mu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ps(n){var a=$s;return $s+=1,Mo===null&&(Mo=[]),n=Dg(Mo,n,a),a=Ze,(un===null?a.memoizedState:un.next)===null&&(a=a.alternate,K.H=a===null||a.memoizedState===null?_y:yd),n}function gu(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Ps(n);if(n.$$typeof===T)return kn(n)}throw Error(i(438,String(n)))}function od(n){var a=null,o=Ze.updateQueue;if(o!==null&&(a=o.memoCache),a==null){var u=Ze.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(a={data:u.data.map(function(p){return p.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),o===null&&(o=mu(),Ze.updateQueue=o),o.memoCache=a,o=a.data[a.index],o===void 0)for(o=a.data[a.index]=Array(n),u=0;u<n;u++)o[u]=q;return a.index++,o}function ba(n,a){return typeof a=="function"?a(n):a}function yu(n){var a=rn();return sd(a,Tt,n)}function sd(n,a,o){var u=n.queue;if(u===null)throw Error(i(311));u.lastRenderedReducer=o;var p=n.baseQueue,y=u.pending;if(y!==null){if(p!==null){var A=p.next;p.next=y.next,y.next=A}a.baseQueue=p=y,u.pending=null}if(y=n.baseState,p===null)n.memoizedState=y;else{a=p.next;var z=A=null,H=null,oe=a,he=!1;do{var me=oe.lane&-536870913;if(me!==oe.lane?(at&me)===me:(va&me)===me){var le=oe.revertLane;if(le===0)H!==null&&(H=H.next={lane:0,revertLane:0,gesture:null,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null}),me===_o&&(he=!0);else if((va&le)===le){oe=oe.next,le===_o&&(he=!0);continue}else me={lane:0,revertLane:oe.revertLane,gesture:null,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null},H===null?(z=H=me,A=y):H=H.next=me,Ze.lanes|=le,Ja|=le;me=oe.action,Hi&&o(y,me),y=oe.hasEagerState?oe.eagerState:o(y,me)}else le={lane:me,revertLane:oe.revertLane,gesture:oe.gesture,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null},H===null?(z=H=le,A=y):H=H.next=le,Ze.lanes|=me,Ja|=me;oe=oe.next}while(oe!==null&&oe!==a);if(H===null?A=y:H.next=z,!lr(y,n.memoizedState)&&(cn=!0,he&&(o=To,o!==null)))throw o;n.memoizedState=y,n.baseState=A,n.baseQueue=H,u.lastRenderedState=y}return p===null&&(u.lanes=0),[n.memoizedState,u.dispatch]}function ld(n){var a=rn(),o=a.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=n;var u=o.dispatch,p=o.pending,y=a.memoizedState;if(p!==null){o.pending=null;var A=p=p.next;do y=n(y,A.action),A=A.next;while(A!==p);lr(y,a.memoizedState)||(cn=!0),a.memoizedState=y,a.baseQueue===null&&(a.baseState=y),o.lastRenderedState=y}return[y,u]}function Bg(n,a,o){var u=Ze,p=rn(),y=st;if(y){if(o===void 0)throw Error(i(407));o=o()}else o=a();var A=!lr((Tt||p).memoizedState,o);if(A&&(p.memoizedState=o,cn=!0),p=p.queue,fd(Kg.bind(null,u,p,n),[n]),p.getSnapshot!==a||A||un!==null&&un.memoizedState.tag&1){if(u.flags|=2048,jo(9,{destroy:void 0},Gg.bind(null,u,p,o,a),null),At===null)throw Error(i(349));y||(va&127)!==0||Hg(u,a,o)}return o}function Hg(n,a,o){n.flags|=16384,n={getSnapshot:a,value:o},a=Ze.updateQueue,a===null?(a=mu(),Ze.updateQueue=a,a.stores=[n]):(o=a.stores,o===null?a.stores=[n]:o.push(n))}function Gg(n,a,o,u){a.value=o,a.getSnapshot=u,Yg(a)&&Zg(n)}function Kg(n,a,o){return o(function(){Yg(a)&&Zg(n)})}function Yg(n){var a=n.getSnapshot;n=n.value;try{var o=a();return!lr(n,o)}catch{return!0}}function Zg(n){var a=$i(n,2);a!==null&&Jn(a,n,2)}function ud(n){var a=Vn();if(typeof n=="function"){var o=n;if(n=o(),Hi){Ht(!0);try{o()}finally{Ht(!1)}}}return a.memoizedState=a.baseState=n,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ba,lastRenderedState:n},a}function Xg(n,a,o,u){return n.baseState=o,sd(n,Tt,typeof u=="function"?u:ba)}function DE(n,a,o,u,p){if(Su(n))throw Error(i(485));if(n=a.action,n!==null){var y={payload:p,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(A){y.listeners.push(A)}};K.T!==null?o(!0):y.isTransition=!1,u(y),o=a.pending,o===null?(y.next=a.pending=y,Qg(a,y)):(y.next=o.next,a.pending=o.next=y)}}function Qg(n,a){var o=a.action,u=a.payload,p=n.state;if(a.isTransition){var y=K.T,A={};K.T=A;try{var z=o(p,u),H=K.S;H!==null&&H(A,z),Wg(n,a,z)}catch(oe){cd(n,a,oe)}finally{y!==null&&A.types!==null&&(y.types=A.types),K.T=y}}else try{y=o(p,u),Wg(n,a,y)}catch(oe){cd(n,a,oe)}}function Wg(n,a,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(u){Jg(n,a,u)},function(u){return cd(n,a,u)}):Jg(n,a,o)}function Jg(n,a,o){a.status="fulfilled",a.value=o,ey(a),n.state=o,a=n.pending,a!==null&&(o=a.next,o===a?n.pending=null:(o=o.next,a.next=o,Qg(n,o)))}function cd(n,a,o){var u=n.pending;if(n.pending=null,u!==null){u=u.next;do a.status="rejected",a.reason=o,ey(a),a=a.next;while(a!==u)}n.action=null}function ey(n){n=n.listeners;for(var a=0;a<n.length;a++)(0,n[a])()}function ty(n,a){return a}function ny(n,a){if(st){var o=At.formState;if(o!==null){e:{var u=Ze;if(st){if(Nt){t:{for(var p=Nt,y=Or;p.nodeType!==8;){if(!y){p=null;break t}if(p=Ar(p.nextSibling),p===null){p=null;break t}}y=p.data,p=y==="F!"||y==="F"?p:null}if(p){Nt=Ar(p.nextSibling),u=p.data==="F!";break e}}Ba(u)}u=!1}u&&(a=o[0])}}return o=Vn(),o.memoizedState=o.baseState=a,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ty,lastRenderedState:a},o.queue=u,o=wy.bind(null,Ze,u),u.dispatch=o,u=ud(!1),y=gd.bind(null,Ze,!1,u.queue),u=Vn(),p={state:a,dispatch:null,action:n,pending:null},u.queue=p,o=DE.bind(null,Ze,p,y,o),p.dispatch=o,u.memoizedState=n,[a,o,!1]}function ry(n){var a=rn();return ay(a,Tt,n)}function ay(n,a,o){if(a=sd(n,a,ty)[0],n=yu(ba)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var u=Ps(a)}catch(A){throw A===Co?su:A}else u=a;a=rn();var p=a.queue,y=p.dispatch;return o!==a.memoizedState&&(Ze.flags|=2048,jo(9,{destroy:void 0},NE.bind(null,p,o),null)),[u,y,n]}function NE(n,a){n.action=a}function iy(n){var a=rn(),o=Tt;if(o!==null)return ay(a,o,n);rn(),a=a.memoizedState,o=rn();var u=o.queue.dispatch;return o.memoizedState=n,[a,u,!1]}function jo(n,a,o,u){return n={tag:n,create:o,deps:u,inst:a,next:null},a=Ze.updateQueue,a===null&&(a=mu(),Ze.updateQueue=a),o=a.lastEffect,o===null?a.lastEffect=n.next=n:(u=o.next,o.next=n,n.next=u,a.lastEffect=n),n}function oy(){return rn().memoizedState}function vu(n,a,o,u){var p=Vn();Ze.flags|=n,p.memoizedState=jo(1|a,{destroy:void 0},o,u===void 0?null:u)}function bu(n,a,o,u){var p=rn();u=u===void 0?null:u;var y=p.memoizedState.inst;Tt!==null&&u!==null&&td(u,Tt.memoizedState.deps)?p.memoizedState=jo(a,y,o,u):(Ze.flags|=n,p.memoizedState=jo(1|a,y,o,u))}function sy(n,a){vu(8390656,8,n,a)}function fd(n,a){bu(2048,8,n,a)}function zE(n){Ze.flags|=4;var a=Ze.updateQueue;if(a===null)a=mu(),Ze.updateQueue=a,a.events=[n];else{var o=a.events;o===null?a.events=[n]:o.push(n)}}function ly(n){var a=rn().memoizedState;return zE({ref:a,nextImpl:n}),function(){if((yt&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}function uy(n,a){return bu(4,2,n,a)}function cy(n,a){return bu(4,4,n,a)}function fy(n,a){if(typeof a=="function"){n=n();var o=a(n);return function(){typeof o=="function"?o():a(null)}}if(a!=null)return n=n(),a.current=n,function(){a.current=null}}function dy(n,a,o){o=o!=null?o.concat([n]):null,bu(4,4,fy.bind(null,a,n),o)}function dd(){}function hy(n,a){var o=rn();a=a===void 0?null:a;var u=o.memoizedState;return a!==null&&td(a,u[1])?u[0]:(o.memoizedState=[n,a],n)}function py(n,a){var o=rn();a=a===void 0?null:a;var u=o.memoizedState;if(a!==null&&td(a,u[1]))return u[0];if(u=n(),Hi){Ht(!0);try{n()}finally{Ht(!1)}}return o.memoizedState=[u,a],u}function hd(n,a,o){return o===void 0||(va&1073741824)!==0&&(at&261930)===0?n.memoizedState=a:(n.memoizedState=o,n=m0(),Ze.lanes|=n,Ja|=n,o)}function my(n,a,o,u){return lr(o,a)?o:Ro.current!==null?(n=hd(n,o,u),lr(n,a)||(cn=!0),n):(va&42)===0||(va&1073741824)!==0&&(at&261930)===0?(cn=!0,n.memoizedState=o):(n=m0(),Ze.lanes|=n,Ja|=n,a)}function gy(n,a,o,u,p){var y=B.p;B.p=y!==0&&8>y?y:8;var A=K.T,z={};K.T=z,gd(n,!1,a,o);try{var H=p(),oe=K.S;if(oe!==null&&oe(z,H),H!==null&&typeof H=="object"&&typeof H.then=="function"){var he=ME(H,u);Is(n,a,he,pr(n))}else Is(n,a,u,pr(n))}catch(me){Is(n,a,{then:function(){},status:"rejected",reason:me},pr())}finally{B.p=y,A!==null&&z.types!==null&&(A.types=z.types),K.T=A}}function $E(){}function pd(n,a,o,u){if(n.tag!==5)throw Error(i(476));var p=yy(n).queue;gy(n,p,a,Y,o===null?$E:function(){return vy(n),o(u)})}function yy(n){var a=n.memoizedState;if(a!==null)return a;a={memoizedState:Y,baseState:Y,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ba,lastRenderedState:Y},next:null};var o={};return a.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ba,lastRenderedState:o},next:null},n.memoizedState=a,n=n.alternate,n!==null&&(n.memoizedState=a),a}function vy(n){var a=yy(n);a.next===null&&(a=n.alternate.memoizedState),Is(n,a.next.queue,{},pr())}function md(){return kn(tl)}function by(){return rn().memoizedState}function Sy(){return rn().memoizedState}function PE(n){for(var a=n.return;a!==null;){switch(a.tag){case 24:case 3:var o=pr();n=Ka(o);var u=Ya(a,n,o);u!==null&&(Jn(u,a,o),Ds(u,a,o)),a={cache:Bf()},n.payload=a;return}a=a.return}}function IE(n,a,o){var u=pr();o={lane:u,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Su(n)?Ey(a,o):(o=Df(n,a,o,u),o!==null&&(Jn(o,n,u),xy(o,a,u)))}function wy(n,a,o){var u=pr();Is(n,a,o,u)}function Is(n,a,o,u){var p={lane:u,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(Su(n))Ey(a,p);else{var y=n.alternate;if(n.lanes===0&&(y===null||y.lanes===0)&&(y=a.lastRenderedReducer,y!==null))try{var A=a.lastRenderedState,z=y(A,o);if(p.hasEagerState=!0,p.eagerState=z,lr(z,A))return eu(n,a,p,0),At===null&&Jl(),!1}catch{}if(o=Df(n,a,p,u),o!==null)return Jn(o,n,u),xy(o,a,u),!0}return!1}function gd(n,a,o,u){if(u={lane:2,revertLane:Yd(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Su(n)){if(a)throw Error(i(479))}else a=Df(n,o,u,2),a!==null&&Jn(a,n,2)}function Su(n){var a=n.alternate;return n===Ze||a!==null&&a===Ze}function Ey(n,a){Ao=hu=!0;var o=n.pending;o===null?a.next=a:(a.next=o.next,o.next=a),n.pending=a}function xy(n,a,o){if((o&4194048)!==0){var u=a.lanes;u&=n.pendingLanes,o|=u,a.lanes=o,on(n,o)}}var Ls={readContext:kn,use:gu,useCallback:Yt,useContext:Yt,useEffect:Yt,useImperativeHandle:Yt,useLayoutEffect:Yt,useInsertionEffect:Yt,useMemo:Yt,useReducer:Yt,useRef:Yt,useState:Yt,useDebugValue:Yt,useDeferredValue:Yt,useTransition:Yt,useSyncExternalStore:Yt,useId:Yt,useHostTransitionStatus:Yt,useFormState:Yt,useActionState:Yt,useOptimistic:Yt,useMemoCache:Yt,useCacheRefresh:Yt};Ls.useEffectEvent=Yt;var _y={readContext:kn,use:gu,useCallback:function(n,a){return Vn().memoizedState=[n,a===void 0?null:a],n},useContext:kn,useEffect:sy,useImperativeHandle:function(n,a,o){o=o!=null?o.concat([n]):null,vu(4194308,4,fy.bind(null,a,n),o)},useLayoutEffect:function(n,a){return vu(4194308,4,n,a)},useInsertionEffect:function(n,a){vu(4,2,n,a)},useMemo:function(n,a){var o=Vn();a=a===void 0?null:a;var u=n();if(Hi){Ht(!0);try{n()}finally{Ht(!1)}}return o.memoizedState=[u,a],u},useReducer:function(n,a,o){var u=Vn();if(o!==void 0){var p=o(a);if(Hi){Ht(!0);try{o(a)}finally{Ht(!1)}}}else p=a;return u.memoizedState=u.baseState=p,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:p},u.queue=n,n=n.dispatch=IE.bind(null,Ze,n),[u.memoizedState,n]},useRef:function(n){var a=Vn();return n={current:n},a.memoizedState=n},useState:function(n){n=ud(n);var a=n.queue,o=wy.bind(null,Ze,a);return a.dispatch=o,[n.memoizedState,o]},useDebugValue:dd,useDeferredValue:function(n,a){var o=Vn();return hd(o,n,a)},useTransition:function(){var n=ud(!1);return n=gy.bind(null,Ze,n.queue,!0,!1),Vn().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,a,o){var u=Ze,p=Vn();if(st){if(o===void 0)throw Error(i(407));o=o()}else{if(o=a(),At===null)throw Error(i(349));(at&127)!==0||Hg(u,a,o)}p.memoizedState=o;var y={value:o,getSnapshot:a};return p.queue=y,sy(Kg.bind(null,u,y,n),[n]),u.flags|=2048,jo(9,{destroy:void 0},Gg.bind(null,u,y,o,a),null),o},useId:function(){var n=Vn(),a=At.identifierPrefix;if(st){var o=ra,u=na;o=(u&~(1<<32-Rt(u)-1)).toString(32)+o,a="_"+a+"R_"+o,o=pu++,0<o&&(a+="H"+o.toString(32)),a+="_"}else o=jE++,a="_"+a+"r_"+o.toString(32)+"_";return n.memoizedState=a},useHostTransitionStatus:md,useFormState:ny,useActionState:ny,useOptimistic:function(n){var a=Vn();a.memoizedState=a.baseState=n;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=o,a=gd.bind(null,Ze,!0,o),o.dispatch=a,[n,a]},useMemoCache:od,useCacheRefresh:function(){return Vn().memoizedState=PE.bind(null,Ze)},useEffectEvent:function(n){var a=Vn(),o={impl:n};return a.memoizedState=o,function(){if((yt&2)!==0)throw Error(i(440));return o.impl.apply(void 0,arguments)}}},yd={readContext:kn,use:gu,useCallback:hy,useContext:kn,useEffect:fd,useImperativeHandle:dy,useInsertionEffect:uy,useLayoutEffect:cy,useMemo:py,useReducer:yu,useRef:oy,useState:function(){return yu(ba)},useDebugValue:dd,useDeferredValue:function(n,a){var o=rn();return my(o,Tt.memoizedState,n,a)},useTransition:function(){var n=yu(ba)[0],a=rn().memoizedState;return[typeof n=="boolean"?n:Ps(n),a]},useSyncExternalStore:Bg,useId:by,useHostTransitionStatus:md,useFormState:ry,useActionState:ry,useOptimistic:function(n,a){var o=rn();return Xg(o,Tt,n,a)},useMemoCache:od,useCacheRefresh:Sy};yd.useEffectEvent=ly;var Ty={readContext:kn,use:gu,useCallback:hy,useContext:kn,useEffect:fd,useImperativeHandle:dy,useInsertionEffect:uy,useLayoutEffect:cy,useMemo:py,useReducer:ld,useRef:oy,useState:function(){return ld(ba)},useDebugValue:dd,useDeferredValue:function(n,a){var o=rn();return Tt===null?hd(o,n,a):my(o,Tt.memoizedState,n,a)},useTransition:function(){var n=ld(ba)[0],a=rn().memoizedState;return[typeof n=="boolean"?n:Ps(n),a]},useSyncExternalStore:Bg,useId:by,useHostTransitionStatus:md,useFormState:iy,useActionState:iy,useOptimistic:function(n,a){var o=rn();return Tt!==null?Xg(o,Tt,n,a):(o.baseState=n,[n,o.queue.dispatch])},useMemoCache:od,useCacheRefresh:Sy};Ty.useEffectEvent=ly;function vd(n,a,o,u){a=n.memoizedState,o=o(u,a),o=o==null?a:g({},a,o),n.memoizedState=o,n.lanes===0&&(n.updateQueue.baseState=o)}var bd={enqueueSetState:function(n,a,o){n=n._reactInternals;var u=pr(),p=Ka(u);p.payload=a,o!=null&&(p.callback=o),a=Ya(n,p,u),a!==null&&(Jn(a,n,u),Ds(a,n,u))},enqueueReplaceState:function(n,a,o){n=n._reactInternals;var u=pr(),p=Ka(u);p.tag=1,p.payload=a,o!=null&&(p.callback=o),a=Ya(n,p,u),a!==null&&(Jn(a,n,u),Ds(a,n,u))},enqueueForceUpdate:function(n,a){n=n._reactInternals;var o=pr(),u=Ka(o);u.tag=2,a!=null&&(u.callback=a),a=Ya(n,u,o),a!==null&&(Jn(a,n,o),Ds(a,n,o))}};function Cy(n,a,o,u,p,y,A){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(u,y,A):a.prototype&&a.prototype.isPureReactComponent?!Ts(o,u)||!Ts(p,y):!0}function Oy(n,a,o,u){n=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(o,u),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(o,u),a.state!==n&&bd.enqueueReplaceState(a,a.state,null)}function Gi(n,a){var o=a;if("ref"in a){o={};for(var u in a)u!=="ref"&&(o[u]=a[u])}if(n=n.defaultProps){o===a&&(o=g({},o));for(var p in n)o[p]===void 0&&(o[p]=n[p])}return o}function Ry(n){Wl(n)}function Ay(n){console.error(n)}function My(n){Wl(n)}function wu(n,a){try{var o=n.onUncaughtError;o(a.value,{componentStack:a.stack})}catch(u){setTimeout(function(){throw u})}}function jy(n,a,o){try{var u=n.onCaughtError;u(o.value,{componentStack:o.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function Sd(n,a,o){return o=Ka(o),o.tag=3,o.payload={element:null},o.callback=function(){wu(n,a)},o}function ky(n){return n=Ka(n),n.tag=3,n}function Dy(n,a,o,u){var p=o.type.getDerivedStateFromError;if(typeof p=="function"){var y=u.value;n.payload=function(){return p(y)},n.callback=function(){jy(a,o,u)}}var A=o.stateNode;A!==null&&typeof A.componentDidCatch=="function"&&(n.callback=function(){jy(a,o,u),typeof p!="function"&&(ei===null?ei=new Set([this]):ei.add(this));var z=u.stack;this.componentDidCatch(u.value,{componentStack:z!==null?z:""})})}function LE(n,a,o,u,p){if(o.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(a=o.alternate,a!==null&&xo(a,o,p,!0),o=cr.current,o!==null){switch(o.tag){case 31:case 13:return Rr===null?Du():o.alternate===null&&Zt===0&&(Zt=3),o.flags&=-257,o.flags|=65536,o.lanes=p,u===lu?o.flags|=16384:(a=o.updateQueue,a===null?o.updateQueue=new Set([u]):a.add(u),Hd(n,u,p)),!1;case 22:return o.flags|=65536,u===lu?o.flags|=16384:(a=o.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([u])},o.updateQueue=a):(o=a.retryQueue,o===null?a.retryQueue=new Set([u]):o.add(u)),Hd(n,u,p)),!1}throw Error(i(435,o.tag))}return Hd(n,u,p),Du(),!1}if(st)return a=cr.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=p,u!==Lf&&(n=Error(i(422),{cause:u}),Rs(_r(n,o)))):(u!==Lf&&(a=Error(i(423),{cause:u}),Rs(_r(a,o))),n=n.current.alternate,n.flags|=65536,p&=-p,n.lanes|=p,u=_r(u,o),p=Sd(n.stateNode,u,p),Xf(n,p),Zt!==4&&(Zt=2)),!1;var y=Error(i(520),{cause:u});if(y=_r(y,o),Ks===null?Ks=[y]:Ks.push(y),Zt!==4&&(Zt=2),a===null)return!0;u=_r(u,o),o=a;do{switch(o.tag){case 3:return o.flags|=65536,n=p&-p,o.lanes|=n,n=Sd(o.stateNode,u,n),Xf(o,n),!1;case 1:if(a=o.type,y=o.stateNode,(o.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(ei===null||!ei.has(y))))return o.flags|=65536,p&=-p,o.lanes|=p,p=ky(p),Dy(p,n,o,u),Xf(o,p),!1}o=o.return}while(o!==null);return!1}var wd=Error(i(461)),cn=!1;function Dn(n,a,o,u){a.child=n===null?Pg(a,null,o,u):Bi(a,n.child,o,u)}function Ny(n,a,o,u,p){o=o.render;var y=a.ref;if("ref"in u){var A={};for(var z in u)z!=="ref"&&(A[z]=u[z])}else A=u;return Ui(a),u=nd(n,a,o,A,y,p),z=rd(),n!==null&&!cn?(ad(n,a,p),Sa(n,a,p)):(st&&z&&Pf(a),a.flags|=1,Dn(n,a,u,p),a.child)}function zy(n,a,o,u,p){if(n===null){var y=o.type;return typeof y=="function"&&!Nf(y)&&y.defaultProps===void 0&&o.compare===null?(a.tag=15,a.type=y,$y(n,a,y,u,p)):(n=nu(o.type,null,u,a,a.mode,p),n.ref=a.ref,n.return=a,a.child=n)}if(y=n.child,!Ad(n,p)){var A=y.memoizedProps;if(o=o.compare,o=o!==null?o:Ts,o(A,u)&&n.ref===a.ref)return Sa(n,a,p)}return a.flags|=1,n=pa(y,u),n.ref=a.ref,n.return=a,a.child=n}function $y(n,a,o,u,p){if(n!==null){var y=n.memoizedProps;if(Ts(y,u)&&n.ref===a.ref)if(cn=!1,a.pendingProps=u=y,Ad(n,p))(n.flags&131072)!==0&&(cn=!0);else return a.lanes=n.lanes,Sa(n,a,p)}return Ed(n,a,o,u,p)}function Py(n,a,o,u){var p=u.children,y=n!==null?n.memoizedState:null;if(n===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((a.flags&128)!==0){if(y=y!==null?y.baseLanes|o:o,n!==null){for(u=a.child=n.child,p=0;u!==null;)p=p|u.lanes|u.childLanes,u=u.sibling;u=p&~y}else u=0,a.child=null;return Iy(n,a,y,o,u)}if((o&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},n!==null&&ou(a,y!==null?y.cachePool:null),y!==null?Ug(a,y):Wf(),qg(a);else return u=a.lanes=536870912,Iy(n,a,y!==null?y.baseLanes|o:o,o,u)}else y!==null?(ou(a,y.cachePool),Ug(a,y),Xa(),a.memoizedState=null):(n!==null&&ou(a,null),Wf(),Xa());return Dn(n,a,p,o),a.child}function Us(n,a){return n!==null&&n.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function Iy(n,a,o,u,p){var y=Gf();return y=y===null?null:{parent:ln._currentValue,pool:y},a.memoizedState={baseLanes:o,cachePool:y},n!==null&&ou(a,null),Wf(),qg(a),n!==null&&xo(n,a,u,!0),a.childLanes=p,null}function Eu(n,a){return a=_u({mode:a.mode,children:a.children},n.mode),a.ref=n.ref,n.child=a,a.return=n,a}function Ly(n,a,o){return Bi(a,n.child,null,o),n=Eu(a,a.pendingProps),n.flags|=2,fr(a),a.memoizedState=null,n}function UE(n,a,o){var u=a.pendingProps,p=(a.flags&128)!==0;if(a.flags&=-129,n===null){if(st){if(u.mode==="hidden")return n=Eu(a,u),a.lanes=536870912,Us(null,n);if(ed(a),(n=Nt)?(n=Q0(n,Or),n=n!==null&&n.data==="&"?n:null,n!==null&&(a.memoizedState={dehydrated:n,treeContext:Va!==null?{id:na,overflow:ra}:null,retryLane:536870912,hydrationErrors:null},o=Eg(n),o.return=a,a.child=o,jn=a,Nt=null)):n=null,n===null)throw Ba(a);return a.lanes=536870912,null}return Eu(a,u)}var y=n.memoizedState;if(y!==null){var A=y.dehydrated;if(ed(a),p)if(a.flags&256)a.flags&=-257,a=Ly(n,a,o);else if(a.memoizedState!==null)a.child=n.child,a.flags|=128,a=null;else throw Error(i(558));else if(cn||xo(n,a,o,!1),p=(o&n.childLanes)!==0,cn||p){if(u=At,u!==null&&(A=Cn(u,o),A!==0&&A!==y.retryLane))throw y.retryLane=A,$i(n,A),Jn(u,n,A),wd;Du(),a=Ly(n,a,o)}else n=y.treeContext,Nt=Ar(A.nextSibling),jn=a,st=!0,Fa=null,Or=!1,n!==null&&Tg(a,n),a=Eu(a,u),a.flags|=4096;return a}return n=pa(n.child,{mode:u.mode,children:u.children}),n.ref=a.ref,a.child=n,n.return=a,n}function xu(n,a){var o=a.ref;if(o===null)n!==null&&n.ref!==null&&(a.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(i(284));(n===null||n.ref!==o)&&(a.flags|=4194816)}}function Ed(n,a,o,u,p){return Ui(a),o=nd(n,a,o,u,void 0,p),u=rd(),n!==null&&!cn?(ad(n,a,p),Sa(n,a,p)):(st&&u&&Pf(a),a.flags|=1,Dn(n,a,o,p),a.child)}function Uy(n,a,o,u,p,y){return Ui(a),a.updateQueue=null,o=Fg(a,u,o,p),Vg(n),u=rd(),n!==null&&!cn?(ad(n,a,y),Sa(n,a,y)):(st&&u&&Pf(a),a.flags|=1,Dn(n,a,o,y),a.child)}function qy(n,a,o,u,p){if(Ui(a),a.stateNode===null){var y=bo,A=o.contextType;typeof A=="object"&&A!==null&&(y=kn(A)),y=new o(u,y),a.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,y.updater=bd,a.stateNode=y,y._reactInternals=a,y=a.stateNode,y.props=u,y.state=a.memoizedState,y.refs={},Yf(a),A=o.contextType,y.context=typeof A=="object"&&A!==null?kn(A):bo,y.state=a.memoizedState,A=o.getDerivedStateFromProps,typeof A=="function"&&(vd(a,o,A,u),y.state=a.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(A=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),A!==y.state&&bd.enqueueReplaceState(y,y.state,null),zs(a,u,y,p),Ns(),y.state=a.memoizedState),typeof y.componentDidMount=="function"&&(a.flags|=4194308),u=!0}else if(n===null){y=a.stateNode;var z=a.memoizedProps,H=Gi(o,z);y.props=H;var oe=y.context,he=o.contextType;A=bo,typeof he=="object"&&he!==null&&(A=kn(he));var me=o.getDerivedStateFromProps;he=typeof me=="function"||typeof y.getSnapshotBeforeUpdate=="function",z=a.pendingProps!==z,he||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(z||oe!==A)&&Oy(a,y,u,A),Ga=!1;var le=a.memoizedState;y.state=le,zs(a,u,y,p),Ns(),oe=a.memoizedState,z||le!==oe||Ga?(typeof me=="function"&&(vd(a,o,me,u),oe=a.memoizedState),(H=Ga||Cy(a,o,H,u,le,oe,A))?(he||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(a.flags|=4194308)):(typeof y.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=u,a.memoizedState=oe),y.props=u,y.state=oe,y.context=A,u=H):(typeof y.componentDidMount=="function"&&(a.flags|=4194308),u=!1)}else{y=a.stateNode,Zf(n,a),A=a.memoizedProps,he=Gi(o,A),y.props=he,me=a.pendingProps,le=y.context,oe=o.contextType,H=bo,typeof oe=="object"&&oe!==null&&(H=kn(oe)),z=o.getDerivedStateFromProps,(oe=typeof z=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(A!==me||le!==H)&&Oy(a,y,u,H),Ga=!1,le=a.memoizedState,y.state=le,zs(a,u,y,p),Ns();var ce=a.memoizedState;A!==me||le!==ce||Ga||n!==null&&n.dependencies!==null&&au(n.dependencies)?(typeof z=="function"&&(vd(a,o,z,u),ce=a.memoizedState),(he=Ga||Cy(a,o,he,u,le,ce,H)||n!==null&&n.dependencies!==null&&au(n.dependencies))?(oe||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(u,ce,H),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(u,ce,H)),typeof y.componentDidUpdate=="function"&&(a.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof y.componentDidUpdate!="function"||A===n.memoizedProps&&le===n.memoizedState||(a.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||A===n.memoizedProps&&le===n.memoizedState||(a.flags|=1024),a.memoizedProps=u,a.memoizedState=ce),y.props=u,y.state=ce,y.context=H,u=he):(typeof y.componentDidUpdate!="function"||A===n.memoizedProps&&le===n.memoizedState||(a.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||A===n.memoizedProps&&le===n.memoizedState||(a.flags|=1024),u=!1)}return y=u,xu(n,a),u=(a.flags&128)!==0,y||u?(y=a.stateNode,o=u&&typeof o.getDerivedStateFromError!="function"?null:y.render(),a.flags|=1,n!==null&&u?(a.child=Bi(a,n.child,null,p),a.child=Bi(a,null,o,p)):Dn(n,a,o,p),a.memoizedState=y.state,n=a.child):n=Sa(n,a,p),n}function Vy(n,a,o,u){return Ii(),a.flags|=256,Dn(n,a,o,u),a.child}var xd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function _d(n){return{baseLanes:n,cachePool:jg()}}function Td(n,a,o){return n=n!==null?n.childLanes&~o:0,a&&(n|=hr),n}function Fy(n,a,o){var u=a.pendingProps,p=!1,y=(a.flags&128)!==0,A;if((A=y)||(A=n!==null&&n.memoizedState===null?!1:(nn.current&2)!==0),A&&(p=!0,a.flags&=-129),A=(a.flags&32)!==0,a.flags&=-33,n===null){if(st){if(p?Za(a):Xa(),(n=Nt)?(n=Q0(n,Or),n=n!==null&&n.data!=="&"?n:null,n!==null&&(a.memoizedState={dehydrated:n,treeContext:Va!==null?{id:na,overflow:ra}:null,retryLane:536870912,hydrationErrors:null},o=Eg(n),o.return=a,a.child=o,jn=a,Nt=null)):n=null,n===null)throw Ba(a);return sh(n)?a.lanes=32:a.lanes=536870912,null}var z=u.children;return u=u.fallback,p?(Xa(),p=a.mode,z=_u({mode:"hidden",children:z},p),u=Pi(u,p,o,null),z.return=a,u.return=a,z.sibling=u,a.child=z,u=a.child,u.memoizedState=_d(o),u.childLanes=Td(n,A,o),a.memoizedState=xd,Us(null,u)):(Za(a),Cd(a,z))}var H=n.memoizedState;if(H!==null&&(z=H.dehydrated,z!==null)){if(y)a.flags&256?(Za(a),a.flags&=-257,a=Od(n,a,o)):a.memoizedState!==null?(Xa(),a.child=n.child,a.flags|=128,a=null):(Xa(),z=u.fallback,p=a.mode,u=_u({mode:"visible",children:u.children},p),z=Pi(z,p,o,null),z.flags|=2,u.return=a,z.return=a,u.sibling=z,a.child=u,Bi(a,n.child,null,o),u=a.child,u.memoizedState=_d(o),u.childLanes=Td(n,A,o),a.memoizedState=xd,a=Us(null,u));else if(Za(a),sh(z)){if(A=z.nextSibling&&z.nextSibling.dataset,A)var oe=A.dgst;A=oe,u=Error(i(419)),u.stack="",u.digest=A,Rs({value:u,source:null,stack:null}),a=Od(n,a,o)}else if(cn||xo(n,a,o,!1),A=(o&n.childLanes)!==0,cn||A){if(A=At,A!==null&&(u=Cn(A,o),u!==0&&u!==H.retryLane))throw H.retryLane=u,$i(n,u),Jn(A,n,u),wd;oh(z)||Du(),a=Od(n,a,o)}else oh(z)?(a.flags|=192,a.child=n.child,a=null):(n=H.treeContext,Nt=Ar(z.nextSibling),jn=a,st=!0,Fa=null,Or=!1,n!==null&&Tg(a,n),a=Cd(a,u.children),a.flags|=4096);return a}return p?(Xa(),z=u.fallback,p=a.mode,H=n.child,oe=H.sibling,u=pa(H,{mode:"hidden",children:u.children}),u.subtreeFlags=H.subtreeFlags&65011712,oe!==null?z=pa(oe,z):(z=Pi(z,p,o,null),z.flags|=2),z.return=a,u.return=a,u.sibling=z,a.child=u,Us(null,u),u=a.child,z=n.child.memoizedState,z===null?z=_d(o):(p=z.cachePool,p!==null?(H=ln._currentValue,p=p.parent!==H?{parent:H,pool:H}:p):p=jg(),z={baseLanes:z.baseLanes|o,cachePool:p}),u.memoizedState=z,u.childLanes=Td(n,A,o),a.memoizedState=xd,Us(n.child,u)):(Za(a),o=n.child,n=o.sibling,o=pa(o,{mode:"visible",children:u.children}),o.return=a,o.sibling=null,n!==null&&(A=a.deletions,A===null?(a.deletions=[n],a.flags|=16):A.push(n)),a.child=o,a.memoizedState=null,o)}function Cd(n,a){return a=_u({mode:"visible",children:a},n.mode),a.return=n,n.child=a}function _u(n,a){return n=ur(22,n,null,a),n.lanes=0,n}function Od(n,a,o){return Bi(a,n.child,null,o),n=Cd(a,a.pendingProps.children),n.flags|=2,a.memoizedState=null,n}function By(n,a,o){n.lanes|=a;var u=n.alternate;u!==null&&(u.lanes|=a),Vf(n.return,a,o)}function Rd(n,a,o,u,p,y){var A=n.memoizedState;A===null?n.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:u,tail:o,tailMode:p,treeForkCount:y}:(A.isBackwards=a,A.rendering=null,A.renderingStartTime=0,A.last=u,A.tail=o,A.tailMode=p,A.treeForkCount=y)}function Hy(n,a,o){var u=a.pendingProps,p=u.revealOrder,y=u.tail;u=u.children;var A=nn.current,z=(A&2)!==0;if(z?(A=A&1|2,a.flags|=128):A&=1,U(nn,A),Dn(n,a,u,o),u=st?Os:0,!z&&n!==null&&(n.flags&128)!==0)e:for(n=a.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&By(n,o,a);else if(n.tag===19)By(n,o,a);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===a)break e;for(;n.sibling===null;){if(n.return===null||n.return===a)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(p){case"forwards":for(o=a.child,p=null;o!==null;)n=o.alternate,n!==null&&du(n)===null&&(p=o),o=o.sibling;o=p,o===null?(p=a.child,a.child=null):(p=o.sibling,o.sibling=null),Rd(a,!1,p,o,y,u);break;case"backwards":case"unstable_legacy-backwards":for(o=null,p=a.child,a.child=null;p!==null;){if(n=p.alternate,n!==null&&du(n)===null){a.child=p;break}n=p.sibling,p.sibling=o,o=p,p=n}Rd(a,!0,o,null,y,u);break;case"together":Rd(a,!1,null,null,void 0,u);break;default:a.memoizedState=null}return a.child}function Sa(n,a,o){if(n!==null&&(a.dependencies=n.dependencies),Ja|=a.lanes,(o&a.childLanes)===0)if(n!==null){if(xo(n,a,o,!1),(o&a.childLanes)===0)return null}else return null;if(n!==null&&a.child!==n.child)throw Error(i(153));if(a.child!==null){for(n=a.child,o=pa(n,n.pendingProps),a.child=o,o.return=a;n.sibling!==null;)n=n.sibling,o=o.sibling=pa(n,n.pendingProps),o.return=a;o.sibling=null}return a.child}function Ad(n,a){return(n.lanes&a)!==0?!0:(n=n.dependencies,!!(n!==null&&au(n)))}function qE(n,a,o){switch(a.tag){case 3:ve(a,a.stateNode.containerInfo),Ha(a,ln,n.memoizedState.cache),Ii();break;case 27:case 5:Oe(a);break;case 4:ve(a,a.stateNode.containerInfo);break;case 10:Ha(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,ed(a),null;break;case 13:var u=a.memoizedState;if(u!==null)return u.dehydrated!==null?(Za(a),a.flags|=128,null):(o&a.child.childLanes)!==0?Fy(n,a,o):(Za(a),n=Sa(n,a,o),n!==null?n.sibling:null);Za(a);break;case 19:var p=(n.flags&128)!==0;if(u=(o&a.childLanes)!==0,u||(xo(n,a,o,!1),u=(o&a.childLanes)!==0),p){if(u)return Hy(n,a,o);a.flags|=128}if(p=a.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),U(nn,nn.current),u)break;return null;case 22:return a.lanes=0,Py(n,a,o,a.pendingProps);case 24:Ha(a,ln,n.memoizedState.cache)}return Sa(n,a,o)}function Gy(n,a,o){if(n!==null)if(n.memoizedProps!==a.pendingProps)cn=!0;else{if(!Ad(n,o)&&(a.flags&128)===0)return cn=!1,qE(n,a,o);cn=(n.flags&131072)!==0}else cn=!1,st&&(a.flags&1048576)!==0&&_g(a,Os,a.index);switch(a.lanes=0,a.tag){case 16:e:{var u=a.pendingProps;if(n=Vi(a.elementType),a.type=n,typeof n=="function")Nf(n)?(u=Gi(n,u),a.tag=1,a=qy(null,a,n,u,o)):(a.tag=0,a=Ed(null,a,n,u,o));else{if(n!=null){var p=n.$$typeof;if(p===E){a.tag=11,a=Ny(null,a,n,u,o);break e}else if(p===M){a.tag=14,a=zy(null,a,n,u,o);break e}}throw a=re(n)||n,Error(i(306,a,""))}}return a;case 0:return Ed(n,a,a.type,a.pendingProps,o);case 1:return u=a.type,p=Gi(u,a.pendingProps),qy(n,a,u,p,o);case 3:e:{if(ve(a,a.stateNode.containerInfo),n===null)throw Error(i(387));u=a.pendingProps;var y=a.memoizedState;p=y.element,Zf(n,a),zs(a,u,null,o);var A=a.memoizedState;if(u=A.cache,Ha(a,ln,u),u!==y.cache&&Ff(a,[ln],o,!0),Ns(),u=A.element,y.isDehydrated)if(y={element:u,isDehydrated:!1,cache:A.cache},a.updateQueue.baseState=y,a.memoizedState=y,a.flags&256){a=Vy(n,a,u,o);break e}else if(u!==p){p=_r(Error(i(424)),a),Rs(p),a=Vy(n,a,u,o);break e}else for(n=a.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,Nt=Ar(n.firstChild),jn=a,st=!0,Fa=null,Or=!0,o=Pg(a,null,u,o),a.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(Ii(),u===p){a=Sa(n,a,o);break e}Dn(n,a,u,o)}a=a.child}return a;case 26:return xu(n,a),n===null?(o=rv(a.type,null,a.pendingProps,null))?a.memoizedState=o:st||(o=a.type,n=a.pendingProps,u=Uu(ee.current).createElement(o),u[$t]=a,u[sn]=n,Nn(u,o,n),yn(u),a.stateNode=u):a.memoizedState=rv(a.type,n.memoizedProps,a.pendingProps,n.memoizedState),null;case 27:return Oe(a),n===null&&st&&(u=a.stateNode=ev(a.type,a.pendingProps,ee.current),jn=a,Or=!0,p=Nt,ai(a.type)?(lh=p,Nt=Ar(u.firstChild)):Nt=p),Dn(n,a,a.pendingProps.children,o),xu(n,a),n===null&&(a.flags|=4194304),a.child;case 5:return n===null&&st&&((p=u=Nt)&&(u=yx(u,a.type,a.pendingProps,Or),u!==null?(a.stateNode=u,jn=a,Nt=Ar(u.firstChild),Or=!1,p=!0):p=!1),p||Ba(a)),Oe(a),p=a.type,y=a.pendingProps,A=n!==null?n.memoizedProps:null,u=y.children,rh(p,y)?u=null:A!==null&&rh(p,A)&&(a.flags|=32),a.memoizedState!==null&&(p=nd(n,a,kE,null,null,o),tl._currentValue=p),xu(n,a),Dn(n,a,u,o),a.child;case 6:return n===null&&st&&((n=o=Nt)&&(o=vx(o,a.pendingProps,Or),o!==null?(a.stateNode=o,jn=a,Nt=null,n=!0):n=!1),n||Ba(a)),null;case 13:return Fy(n,a,o);case 4:return ve(a,a.stateNode.containerInfo),u=a.pendingProps,n===null?a.child=Bi(a,null,u,o):Dn(n,a,u,o),a.child;case 11:return Ny(n,a,a.type,a.pendingProps,o);case 7:return Dn(n,a,a.pendingProps,o),a.child;case 8:return Dn(n,a,a.pendingProps.children,o),a.child;case 12:return Dn(n,a,a.pendingProps.children,o),a.child;case 10:return u=a.pendingProps,Ha(a,a.type,u.value),Dn(n,a,u.children,o),a.child;case 9:return p=a.type._context,u=a.pendingProps.children,Ui(a),p=kn(p),u=u(p),a.flags|=1,Dn(n,a,u,o),a.child;case 14:return zy(n,a,a.type,a.pendingProps,o);case 15:return $y(n,a,a.type,a.pendingProps,o);case 19:return Hy(n,a,o);case 31:return UE(n,a,o);case 22:return Py(n,a,o,a.pendingProps);case 24:return Ui(a),u=kn(ln),n===null?(p=Gf(),p===null&&(p=At,y=Bf(),p.pooledCache=y,y.refCount++,y!==null&&(p.pooledCacheLanes|=o),p=y),a.memoizedState={parent:u,cache:p},Yf(a),Ha(a,ln,p)):((n.lanes&o)!==0&&(Zf(n,a),zs(a,null,null,o),Ns()),p=n.memoizedState,y=a.memoizedState,p.parent!==u?(p={parent:u,cache:u},a.memoizedState=p,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=p),Ha(a,ln,u)):(u=y.cache,Ha(a,ln,u),u!==p.cache&&Ff(a,[ln],o,!0))),Dn(n,a,a.pendingProps.children,o),a.child;case 29:throw a.pendingProps}throw Error(i(156,a.tag))}function wa(n){n.flags|=4}function Md(n,a,o,u,p){if((a=(n.mode&32)!==0)&&(a=!1),a){if(n.flags|=16777216,(p&335544128)===p)if(n.stateNode.complete)n.flags|=8192;else if(b0())n.flags|=8192;else throw Fi=lu,Kf}else n.flags&=-16777217}function Ky(n,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!lv(a))if(b0())n.flags|=8192;else throw Fi=lu,Kf}function Tu(n,a){a!==null&&(n.flags|=4),n.flags&16384&&(a=n.tag!==22?wr():536870912,n.lanes|=a,zo|=a)}function qs(n,a){if(!st)switch(n.tailMode){case"hidden":a=n.tail;for(var o=null;a!==null;)a.alternate!==null&&(o=a),a=a.sibling;o===null?n.tail=null:o.sibling=null;break;case"collapsed":o=n.tail;for(var u=null;o!==null;)o.alternate!==null&&(u=o),o=o.sibling;u===null?a||n.tail===null?n.tail=null:n.tail.sibling=null:u.sibling=null}}function zt(n){var a=n.alternate!==null&&n.alternate.child===n.child,o=0,u=0;if(a)for(var p=n.child;p!==null;)o|=p.lanes|p.childLanes,u|=p.subtreeFlags&65011712,u|=p.flags&65011712,p.return=n,p=p.sibling;else for(p=n.child;p!==null;)o|=p.lanes|p.childLanes,u|=p.subtreeFlags,u|=p.flags,p.return=n,p=p.sibling;return n.subtreeFlags|=u,n.childLanes=o,a}function VE(n,a,o){var u=a.pendingProps;switch(If(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return zt(a),null;case 1:return zt(a),null;case 3:return o=a.stateNode,u=null,n!==null&&(u=n.memoizedState.cache),a.memoizedState.cache!==u&&(a.flags|=2048),ya(ln),Ee(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(n===null||n.child===null)&&(Eo(a)?wa(a):n===null||n.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Uf())),zt(a),null;case 26:var p=a.type,y=a.memoizedState;return n===null?(wa(a),y!==null?(zt(a),Ky(a,y)):(zt(a),Md(a,p,null,u,o))):y?y!==n.memoizedState?(wa(a),zt(a),Ky(a,y)):(zt(a),a.flags&=-16777217):(n=n.memoizedProps,n!==u&&wa(a),zt(a),Md(a,p,n,u,o)),null;case 27:if(de(a),o=ee.current,p=a.type,n!==null&&a.stateNode!=null)n.memoizedProps!==u&&wa(a);else{if(!u){if(a.stateNode===null)throw Error(i(166));return zt(a),null}n=P.current,Eo(a)?Cg(a):(n=ev(p,u,o),a.stateNode=n,wa(a))}return zt(a),null;case 5:if(de(a),p=a.type,n!==null&&a.stateNode!=null)n.memoizedProps!==u&&wa(a);else{if(!u){if(a.stateNode===null)throw Error(i(166));return zt(a),null}if(y=P.current,Eo(a))Cg(a);else{var A=Uu(ee.current);switch(y){case 1:y=A.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:y=A.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":y=A.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":y=A.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":y=A.createElement("div"),y.innerHTML="<script><\/script>",y=y.removeChild(y.firstChild);break;case"select":y=typeof u.is=="string"?A.createElement("select",{is:u.is}):A.createElement("select"),u.multiple?y.multiple=!0:u.size&&(y.size=u.size);break;default:y=typeof u.is=="string"?A.createElement(p,{is:u.is}):A.createElement(p)}}y[$t]=a,y[sn]=u;e:for(A=a.child;A!==null;){if(A.tag===5||A.tag===6)y.appendChild(A.stateNode);else if(A.tag!==4&&A.tag!==27&&A.child!==null){A.child.return=A,A=A.child;continue}if(A===a)break e;for(;A.sibling===null;){if(A.return===null||A.return===a)break e;A=A.return}A.sibling.return=A.return,A=A.sibling}a.stateNode=y;e:switch(Nn(y,p,u),p){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&wa(a)}}return zt(a),Md(a,a.type,n===null?null:n.memoizedProps,a.pendingProps,o),null;case 6:if(n&&a.stateNode!=null)n.memoizedProps!==u&&wa(a);else{if(typeof u!="string"&&a.stateNode===null)throw Error(i(166));if(n=ee.current,Eo(a)){if(n=a.stateNode,o=a.memoizedProps,u=null,p=jn,p!==null)switch(p.tag){case 27:case 5:u=p.memoizedProps}n[$t]=a,n=!!(n.nodeValue===o||u!==null&&u.suppressHydrationWarning===!0||F0(n.nodeValue,o)),n||Ba(a,!0)}else n=Uu(n).createTextNode(u),n[$t]=a,a.stateNode=n}return zt(a),null;case 31:if(o=a.memoizedState,n===null||n.memoizedState!==null){if(u=Eo(a),o!==null){if(n===null){if(!u)throw Error(i(318));if(n=a.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(557));n[$t]=a}else Ii(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;zt(a),n=!1}else o=Uf(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=o),n=!0;if(!n)return a.flags&256?(fr(a),a):(fr(a),null);if((a.flags&128)!==0)throw Error(i(558))}return zt(a),null;case 13:if(u=a.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(p=Eo(a),u!==null&&u.dehydrated!==null){if(n===null){if(!p)throw Error(i(318));if(p=a.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(i(317));p[$t]=a}else Ii(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;zt(a),p=!1}else p=Uf(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=p),p=!0;if(!p)return a.flags&256?(fr(a),a):(fr(a),null)}return fr(a),(a.flags&128)!==0?(a.lanes=o,a):(o=u!==null,n=n!==null&&n.memoizedState!==null,o&&(u=a.child,p=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(p=u.alternate.memoizedState.cachePool.pool),y=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(y=u.memoizedState.cachePool.pool),y!==p&&(u.flags|=2048)),o!==n&&o&&(a.child.flags|=8192),Tu(a,a.updateQueue),zt(a),null);case 4:return Ee(),n===null&&Wd(a.stateNode.containerInfo),zt(a),null;case 10:return ya(a.type),zt(a),null;case 19:if(I(nn),u=a.memoizedState,u===null)return zt(a),null;if(p=(a.flags&128)!==0,y=u.rendering,y===null)if(p)qs(u,!1);else{if(Zt!==0||n!==null&&(n.flags&128)!==0)for(n=a.child;n!==null;){if(y=du(n),y!==null){for(a.flags|=128,qs(u,!1),n=y.updateQueue,a.updateQueue=n,Tu(a,n),a.subtreeFlags=0,n=o,o=a.child;o!==null;)wg(o,n),o=o.sibling;return U(nn,nn.current&1|2),st&&ma(a,u.treeForkCount),a.child}n=n.sibling}u.tail!==null&&Ue()>Mu&&(a.flags|=128,p=!0,qs(u,!1),a.lanes=4194304)}else{if(!p)if(n=du(y),n!==null){if(a.flags|=128,p=!0,n=n.updateQueue,a.updateQueue=n,Tu(a,n),qs(u,!0),u.tail===null&&u.tailMode==="hidden"&&!y.alternate&&!st)return zt(a),null}else 2*Ue()-u.renderingStartTime>Mu&&o!==536870912&&(a.flags|=128,p=!0,qs(u,!1),a.lanes=4194304);u.isBackwards?(y.sibling=a.child,a.child=y):(n=u.last,n!==null?n.sibling=y:a.child=y,u.last=y)}return u.tail!==null?(n=u.tail,u.rendering=n,u.tail=n.sibling,u.renderingStartTime=Ue(),n.sibling=null,o=nn.current,U(nn,p?o&1|2:o&1),st&&ma(a,u.treeForkCount),n):(zt(a),null);case 22:case 23:return fr(a),Jf(),u=a.memoizedState!==null,n!==null?n.memoizedState!==null!==u&&(a.flags|=8192):u&&(a.flags|=8192),u?(o&536870912)!==0&&(a.flags&128)===0&&(zt(a),a.subtreeFlags&6&&(a.flags|=8192)):zt(a),o=a.updateQueue,o!==null&&Tu(a,o.retryQueue),o=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==o&&(a.flags|=2048),n!==null&&I(qi),null;case 24:return o=null,n!==null&&(o=n.memoizedState.cache),a.memoizedState.cache!==o&&(a.flags|=2048),ya(ln),zt(a),null;case 25:return null;case 30:return null}throw Error(i(156,a.tag))}function FE(n,a){switch(If(a),a.tag){case 1:return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 3:return ya(ln),Ee(),n=a.flags,(n&65536)!==0&&(n&128)===0?(a.flags=n&-65537|128,a):null;case 26:case 27:case 5:return de(a),null;case 31:if(a.memoizedState!==null){if(fr(a),a.alternate===null)throw Error(i(340));Ii()}return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 13:if(fr(a),n=a.memoizedState,n!==null&&n.dehydrated!==null){if(a.alternate===null)throw Error(i(340));Ii()}return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 19:return I(nn),null;case 4:return Ee(),null;case 10:return ya(a.type),null;case 22:case 23:return fr(a),Jf(),n!==null&&I(qi),n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 24:return ya(ln),null;case 25:return null;default:return null}}function Yy(n,a){switch(If(a),a.tag){case 3:ya(ln),Ee();break;case 26:case 27:case 5:de(a);break;case 4:Ee();break;case 31:a.memoizedState!==null&&fr(a);break;case 13:fr(a);break;case 19:I(nn);break;case 10:ya(a.type);break;case 22:case 23:fr(a),Jf(),n!==null&&I(qi);break;case 24:ya(ln)}}function Vs(n,a){try{var o=a.updateQueue,u=o!==null?o.lastEffect:null;if(u!==null){var p=u.next;o=p;do{if((o.tag&n)===n){u=void 0;var y=o.create,A=o.inst;u=y(),A.destroy=u}o=o.next}while(o!==p)}}catch(z){xt(a,a.return,z)}}function Qa(n,a,o){try{var u=a.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var y=p.next;u=y;do{if((u.tag&n)===n){var A=u.inst,z=A.destroy;if(z!==void 0){A.destroy=void 0,p=a;var H=o,oe=z;try{oe()}catch(he){xt(p,H,he)}}}u=u.next}while(u!==y)}}catch(he){xt(a,a.return,he)}}function Zy(n){var a=n.updateQueue;if(a!==null){var o=n.stateNode;try{Lg(a,o)}catch(u){xt(n,n.return,u)}}}function Xy(n,a,o){o.props=Gi(n.type,n.memoizedProps),o.state=n.memoizedState;try{o.componentWillUnmount()}catch(u){xt(n,a,u)}}function Fs(n,a){try{var o=n.ref;if(o!==null){switch(n.tag){case 26:case 27:case 5:var u=n.stateNode;break;case 30:u=n.stateNode;break;default:u=n.stateNode}typeof o=="function"?n.refCleanup=o(u):o.current=u}}catch(p){xt(n,a,p)}}function aa(n,a){var o=n.ref,u=n.refCleanup;if(o!==null)if(typeof u=="function")try{u()}catch(p){xt(n,a,p)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(p){xt(n,a,p)}else o.current=null}function Qy(n){var a=n.type,o=n.memoizedProps,u=n.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":o.autoFocus&&u.focus();break e;case"img":o.src?u.src=o.src:o.srcSet&&(u.srcset=o.srcSet)}}catch(p){xt(n,n.return,p)}}function jd(n,a,o){try{var u=n.stateNode;fx(u,n.type,o,a),u[sn]=a}catch(p){xt(n,n.return,p)}}function Wy(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&ai(n.type)||n.tag===4}function kd(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Wy(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&ai(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function Dd(n,a,o){var u=n.tag;if(u===5||u===6)n=n.stateNode,a?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(n,a):(a=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,a.appendChild(n),o=o._reactRootContainer,o!=null||a.onclick!==null||(a.onclick=Me));else if(u!==4&&(u===27&&ai(n.type)&&(o=n.stateNode,a=null),n=n.child,n!==null))for(Dd(n,a,o),n=n.sibling;n!==null;)Dd(n,a,o),n=n.sibling}function Cu(n,a,o){var u=n.tag;if(u===5||u===6)n=n.stateNode,a?o.insertBefore(n,a):o.appendChild(n);else if(u!==4&&(u===27&&ai(n.type)&&(o=n.stateNode),n=n.child,n!==null))for(Cu(n,a,o),n=n.sibling;n!==null;)Cu(n,a,o),n=n.sibling}function Jy(n){var a=n.stateNode,o=n.memoizedProps;try{for(var u=n.type,p=a.attributes;p.length;)a.removeAttributeNode(p[0]);Nn(a,u,o),a[$t]=n,a[sn]=o}catch(y){xt(n,n.return,y)}}var Ea=!1,fn=!1,Nd=!1,e0=typeof WeakSet=="function"?WeakSet:Set,On=null;function BE(n,a){if(n=n.containerInfo,th=Ku,n=dg(n),Of(n)){if("selectionStart"in n)var o={start:n.selectionStart,end:n.selectionEnd};else e:{o=(o=n.ownerDocument)&&o.defaultView||window;var u=o.getSelection&&o.getSelection();if(u&&u.rangeCount!==0){o=u.anchorNode;var p=u.anchorOffset,y=u.focusNode;u=u.focusOffset;try{o.nodeType,y.nodeType}catch{o=null;break e}var A=0,z=-1,H=-1,oe=0,he=0,me=n,le=null;t:for(;;){for(var ce;me!==o||p!==0&&me.nodeType!==3||(z=A+p),me!==y||u!==0&&me.nodeType!==3||(H=A+u),me.nodeType===3&&(A+=me.nodeValue.length),(ce=me.firstChild)!==null;)le=me,me=ce;for(;;){if(me===n)break t;if(le===o&&++oe===p&&(z=A),le===y&&++he===u&&(H=A),(ce=me.nextSibling)!==null)break;me=le,le=me.parentNode}me=ce}o=z===-1||H===-1?null:{start:z,end:H}}else o=null}o=o||{start:0,end:0}}else o=null;for(nh={focusedElem:n,selectionRange:o},Ku=!1,On=a;On!==null;)if(a=On,n=a.child,(a.subtreeFlags&1028)!==0&&n!==null)n.return=a,On=n;else for(;On!==null;){switch(a=On,y=a.alternate,n=a.flags,a.tag){case 0:if((n&4)!==0&&(n=a.updateQueue,n=n!==null?n.events:null,n!==null))for(o=0;o<n.length;o++)p=n[o],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&y!==null){n=void 0,o=a,p=y.memoizedProps,y=y.memoizedState,u=o.stateNode;try{var je=Gi(o.type,p);n=u.getSnapshotBeforeUpdate(je,y),u.__reactInternalSnapshotBeforeUpdate=n}catch(qe){xt(o,o.return,qe)}}break;case 3:if((n&1024)!==0){if(n=a.stateNode.containerInfo,o=n.nodeType,o===9)ih(n);else if(o===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":ih(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(i(163))}if(n=a.sibling,n!==null){n.return=a.return,On=n;break}On=a.return}}function t0(n,a,o){var u=o.flags;switch(o.tag){case 0:case 11:case 15:_a(n,o),u&4&&Vs(5,o);break;case 1:if(_a(n,o),u&4)if(n=o.stateNode,a===null)try{n.componentDidMount()}catch(A){xt(o,o.return,A)}else{var p=Gi(o.type,a.memoizedProps);a=a.memoizedState;try{n.componentDidUpdate(p,a,n.__reactInternalSnapshotBeforeUpdate)}catch(A){xt(o,o.return,A)}}u&64&&Zy(o),u&512&&Fs(o,o.return);break;case 3:if(_a(n,o),u&64&&(n=o.updateQueue,n!==null)){if(a=null,o.child!==null)switch(o.child.tag){case 27:case 5:a=o.child.stateNode;break;case 1:a=o.child.stateNode}try{Lg(n,a)}catch(A){xt(o,o.return,A)}}break;case 27:a===null&&u&4&&Jy(o);case 26:case 5:_a(n,o),a===null&&u&4&&Qy(o),u&512&&Fs(o,o.return);break;case 12:_a(n,o);break;case 31:_a(n,o),u&4&&a0(n,o);break;case 13:_a(n,o),u&4&&i0(n,o),u&64&&(n=o.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(o=JE.bind(null,o),bx(n,o))));break;case 22:if(u=o.memoizedState!==null||Ea,!u){a=a!==null&&a.memoizedState!==null||fn,p=Ea;var y=fn;Ea=u,(fn=a)&&!y?Ta(n,o,(o.subtreeFlags&8772)!==0):_a(n,o),Ea=p,fn=y}break;case 30:break;default:_a(n,o)}}function n0(n){var a=n.alternate;a!==null&&(n.alternate=null,n0(a)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(a=n.stateNode,a!==null&&Bl(a)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var Pt=null,Zn=!1;function xa(n,a,o){for(o=o.child;o!==null;)r0(n,a,o),o=o.sibling}function r0(n,a,o){if(wt&&typeof wt.onCommitFiberUnmount=="function")try{wt.onCommitFiberUnmount(Vt,o)}catch{}switch(o.tag){case 26:fn||aa(o,a),xa(n,a,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:fn||aa(o,a);var u=Pt,p=Zn;ai(o.type)&&(Pt=o.stateNode,Zn=!1),xa(n,a,o),Ws(o.stateNode),Pt=u,Zn=p;break;case 5:fn||aa(o,a);case 6:if(u=Pt,p=Zn,Pt=null,xa(n,a,o),Pt=u,Zn=p,Pt!==null)if(Zn)try{(Pt.nodeType===9?Pt.body:Pt.nodeName==="HTML"?Pt.ownerDocument.body:Pt).removeChild(o.stateNode)}catch(y){xt(o,a,y)}else try{Pt.removeChild(o.stateNode)}catch(y){xt(o,a,y)}break;case 18:Pt!==null&&(Zn?(n=Pt,Z0(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,o.stateNode),Fo(n)):Z0(Pt,o.stateNode));break;case 4:u=Pt,p=Zn,Pt=o.stateNode.containerInfo,Zn=!0,xa(n,a,o),Pt=u,Zn=p;break;case 0:case 11:case 14:case 15:Qa(2,o,a),fn||Qa(4,o,a),xa(n,a,o);break;case 1:fn||(aa(o,a),u=o.stateNode,typeof u.componentWillUnmount=="function"&&Xy(o,a,u)),xa(n,a,o);break;case 21:xa(n,a,o);break;case 22:fn=(u=fn)||o.memoizedState!==null,xa(n,a,o),fn=u;break;default:xa(n,a,o)}}function a0(n,a){if(a.memoizedState===null&&(n=a.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{Fo(n)}catch(o){xt(a,a.return,o)}}}function i0(n,a){if(a.memoizedState===null&&(n=a.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{Fo(n)}catch(o){xt(a,a.return,o)}}function HE(n){switch(n.tag){case 31:case 13:case 19:var a=n.stateNode;return a===null&&(a=n.stateNode=new e0),a;case 22:return n=n.stateNode,a=n._retryCache,a===null&&(a=n._retryCache=new e0),a;default:throw Error(i(435,n.tag))}}function Ou(n,a){var o=HE(n);a.forEach(function(u){if(!o.has(u)){o.add(u);var p=ex.bind(null,n,u);u.then(p,p)}})}function Xn(n,a){var o=a.deletions;if(o!==null)for(var u=0;u<o.length;u++){var p=o[u],y=n,A=a,z=A;e:for(;z!==null;){switch(z.tag){case 27:if(ai(z.type)){Pt=z.stateNode,Zn=!1;break e}break;case 5:Pt=z.stateNode,Zn=!1;break e;case 3:case 4:Pt=z.stateNode.containerInfo,Zn=!0;break e}z=z.return}if(Pt===null)throw Error(i(160));r0(y,A,p),Pt=null,Zn=!1,y=p.alternate,y!==null&&(y.return=null),p.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)o0(a,n),a=a.sibling}var Br=null;function o0(n,a){var o=n.alternate,u=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Xn(a,n),Qn(n),u&4&&(Qa(3,n,n.return),Vs(3,n),Qa(5,n,n.return));break;case 1:Xn(a,n),Qn(n),u&512&&(fn||o===null||aa(o,o.return)),u&64&&Ea&&(n=n.updateQueue,n!==null&&(u=n.callbacks,u!==null&&(o=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=o===null?u:o.concat(u))));break;case 26:var p=Br;if(Xn(a,n),Qn(n),u&512&&(fn||o===null||aa(o,o.return)),u&4){var y=o!==null?o.memoizedState:null;if(u=n.memoizedState,o===null)if(u===null)if(n.stateNode===null){e:{u=n.type,o=n.memoizedProps,p=p.ownerDocument||p;t:switch(u){case"title":y=p.getElementsByTagName("title")[0],(!y||y[fo]||y[$t]||y.namespaceURI==="http://www.w3.org/2000/svg"||y.hasAttribute("itemprop"))&&(y=p.createElement(u),p.head.insertBefore(y,p.querySelector("head > title"))),Nn(y,u,o),y[$t]=n,yn(y),u=y;break e;case"link":var A=ov("link","href",p).get(u+(o.href||""));if(A){for(var z=0;z<A.length;z++)if(y=A[z],y.getAttribute("href")===(o.href==null||o.href===""?null:o.href)&&y.getAttribute("rel")===(o.rel==null?null:o.rel)&&y.getAttribute("title")===(o.title==null?null:o.title)&&y.getAttribute("crossorigin")===(o.crossOrigin==null?null:o.crossOrigin)){A.splice(z,1);break t}}y=p.createElement(u),Nn(y,u,o),p.head.appendChild(y);break;case"meta":if(A=ov("meta","content",p).get(u+(o.content||""))){for(z=0;z<A.length;z++)if(y=A[z],y.getAttribute("content")===(o.content==null?null:""+o.content)&&y.getAttribute("name")===(o.name==null?null:o.name)&&y.getAttribute("property")===(o.property==null?null:o.property)&&y.getAttribute("http-equiv")===(o.httpEquiv==null?null:o.httpEquiv)&&y.getAttribute("charset")===(o.charSet==null?null:o.charSet)){A.splice(z,1);break t}}y=p.createElement(u),Nn(y,u,o),p.head.appendChild(y);break;default:throw Error(i(468,u))}y[$t]=n,yn(y),u=y}n.stateNode=u}else sv(p,n.type,n.stateNode);else n.stateNode=iv(p,u,n.memoizedProps);else y!==u?(y===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):y.count--,u===null?sv(p,n.type,n.stateNode):iv(p,u,n.memoizedProps)):u===null&&n.stateNode!==null&&jd(n,n.memoizedProps,o.memoizedProps)}break;case 27:Xn(a,n),Qn(n),u&512&&(fn||o===null||aa(o,o.return)),o!==null&&u&4&&jd(n,n.memoizedProps,o.memoizedProps);break;case 5:if(Xn(a,n),Qn(n),u&512&&(fn||o===null||aa(o,o.return)),n.flags&32){p=n.stateNode;try{ne(p,"")}catch(je){xt(n,n.return,je)}}u&4&&n.stateNode!=null&&(p=n.memoizedProps,jd(n,p,o!==null?o.memoizedProps:p)),u&1024&&(Nd=!0);break;case 6:if(Xn(a,n),Qn(n),u&4){if(n.stateNode===null)throw Error(i(162));u=n.memoizedProps,o=n.stateNode;try{o.nodeValue=u}catch(je){xt(n,n.return,je)}}break;case 3:if(Fu=null,p=Br,Br=qu(a.containerInfo),Xn(a,n),Br=p,Qn(n),u&4&&o!==null&&o.memoizedState.isDehydrated)try{Fo(a.containerInfo)}catch(je){xt(n,n.return,je)}Nd&&(Nd=!1,s0(n));break;case 4:u=Br,Br=qu(n.stateNode.containerInfo),Xn(a,n),Qn(n),Br=u;break;case 12:Xn(a,n),Qn(n);break;case 31:Xn(a,n),Qn(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,Ou(n,u)));break;case 13:Xn(a,n),Qn(n),n.child.flags&8192&&n.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(Au=Ue()),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,Ou(n,u)));break;case 22:p=n.memoizedState!==null;var H=o!==null&&o.memoizedState!==null,oe=Ea,he=fn;if(Ea=oe||p,fn=he||H,Xn(a,n),fn=he,Ea=oe,Qn(n),u&8192)e:for(a=n.stateNode,a._visibility=p?a._visibility&-2:a._visibility|1,p&&(o===null||H||Ea||fn||Ki(n)),o=null,a=n;;){if(a.tag===5||a.tag===26){if(o===null){H=o=a;try{if(y=H.stateNode,p)A=y.style,typeof A.setProperty=="function"?A.setProperty("display","none","important"):A.display="none";else{z=H.stateNode;var me=H.memoizedProps.style,le=me!=null&&me.hasOwnProperty("display")?me.display:null;z.style.display=le==null||typeof le=="boolean"?"":(""+le).trim()}}catch(je){xt(H,H.return,je)}}}else if(a.tag===6){if(o===null){H=a;try{H.stateNode.nodeValue=p?"":H.memoizedProps}catch(je){xt(H,H.return,je)}}}else if(a.tag===18){if(o===null){H=a;try{var ce=H.stateNode;p?X0(ce,!0):X0(H.stateNode,!1)}catch(je){xt(H,H.return,je)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===n)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===n)break e;for(;a.sibling===null;){if(a.return===null||a.return===n)break e;o===a&&(o=null),a=a.return}o===a&&(o=null),a.sibling.return=a.return,a=a.sibling}u&4&&(u=n.updateQueue,u!==null&&(o=u.retryQueue,o!==null&&(u.retryQueue=null,Ou(n,o))));break;case 19:Xn(a,n),Qn(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,Ou(n,u)));break;case 30:break;case 21:break;default:Xn(a,n),Qn(n)}}function Qn(n){var a=n.flags;if(a&2){try{for(var o,u=n.return;u!==null;){if(Wy(u)){o=u;break}u=u.return}if(o==null)throw Error(i(160));switch(o.tag){case 27:var p=o.stateNode,y=kd(n);Cu(n,y,p);break;case 5:var A=o.stateNode;o.flags&32&&(ne(A,""),o.flags&=-33);var z=kd(n);Cu(n,z,A);break;case 3:case 4:var H=o.stateNode.containerInfo,oe=kd(n);Dd(n,oe,H);break;default:throw Error(i(161))}}catch(he){xt(n,n.return,he)}n.flags&=-3}a&4096&&(n.flags&=-4097)}function s0(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var a=n;s0(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),n=n.sibling}}function _a(n,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)t0(n,a.alternate,a),a=a.sibling}function Ki(n){for(n=n.child;n!==null;){var a=n;switch(a.tag){case 0:case 11:case 14:case 15:Qa(4,a,a.return),Ki(a);break;case 1:aa(a,a.return);var o=a.stateNode;typeof o.componentWillUnmount=="function"&&Xy(a,a.return,o),Ki(a);break;case 27:Ws(a.stateNode);case 26:case 5:aa(a,a.return),Ki(a);break;case 22:a.memoizedState===null&&Ki(a);break;case 30:Ki(a);break;default:Ki(a)}n=n.sibling}}function Ta(n,a,o){for(o=o&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var u=a.alternate,p=n,y=a,A=y.flags;switch(y.tag){case 0:case 11:case 15:Ta(p,y,o),Vs(4,y);break;case 1:if(Ta(p,y,o),u=y,p=u.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(oe){xt(u,u.return,oe)}if(u=y,p=u.updateQueue,p!==null){var z=u.stateNode;try{var H=p.shared.hiddenCallbacks;if(H!==null)for(p.shared.hiddenCallbacks=null,p=0;p<H.length;p++)Ig(H[p],z)}catch(oe){xt(u,u.return,oe)}}o&&A&64&&Zy(y),Fs(y,y.return);break;case 27:Jy(y);case 26:case 5:Ta(p,y,o),o&&u===null&&A&4&&Qy(y),Fs(y,y.return);break;case 12:Ta(p,y,o);break;case 31:Ta(p,y,o),o&&A&4&&a0(p,y);break;case 13:Ta(p,y,o),o&&A&4&&i0(p,y);break;case 22:y.memoizedState===null&&Ta(p,y,o),Fs(y,y.return);break;case 30:break;default:Ta(p,y,o)}a=a.sibling}}function zd(n,a){var o=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),n=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(n=a.memoizedState.cachePool.pool),n!==o&&(n!=null&&n.refCount++,o!=null&&As(o))}function $d(n,a){n=null,a.alternate!==null&&(n=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==n&&(a.refCount++,n!=null&&As(n))}function Hr(n,a,o,u){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)l0(n,a,o,u),a=a.sibling}function l0(n,a,o,u){var p=a.flags;switch(a.tag){case 0:case 11:case 15:Hr(n,a,o,u),p&2048&&Vs(9,a);break;case 1:Hr(n,a,o,u);break;case 3:Hr(n,a,o,u),p&2048&&(n=null,a.alternate!==null&&(n=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==n&&(a.refCount++,n!=null&&As(n)));break;case 12:if(p&2048){Hr(n,a,o,u),n=a.stateNode;try{var y=a.memoizedProps,A=y.id,z=y.onPostCommit;typeof z=="function"&&z(A,a.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(H){xt(a,a.return,H)}}else Hr(n,a,o,u);break;case 31:Hr(n,a,o,u);break;case 13:Hr(n,a,o,u);break;case 23:break;case 22:y=a.stateNode,A=a.alternate,a.memoizedState!==null?y._visibility&2?Hr(n,a,o,u):Bs(n,a):y._visibility&2?Hr(n,a,o,u):(y._visibility|=2,ko(n,a,o,u,(a.subtreeFlags&10256)!==0||!1)),p&2048&&zd(A,a);break;case 24:Hr(n,a,o,u),p&2048&&$d(a.alternate,a);break;default:Hr(n,a,o,u)}}function ko(n,a,o,u,p){for(p=p&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var y=n,A=a,z=o,H=u,oe=A.flags;switch(A.tag){case 0:case 11:case 15:ko(y,A,z,H,p),Vs(8,A);break;case 23:break;case 22:var he=A.stateNode;A.memoizedState!==null?he._visibility&2?ko(y,A,z,H,p):Bs(y,A):(he._visibility|=2,ko(y,A,z,H,p)),p&&oe&2048&&zd(A.alternate,A);break;case 24:ko(y,A,z,H,p),p&&oe&2048&&$d(A.alternate,A);break;default:ko(y,A,z,H,p)}a=a.sibling}}function Bs(n,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var o=n,u=a,p=u.flags;switch(u.tag){case 22:Bs(o,u),p&2048&&zd(u.alternate,u);break;case 24:Bs(o,u),p&2048&&$d(u.alternate,u);break;default:Bs(o,u)}a=a.sibling}}var Hs=8192;function Do(n,a,o){if(n.subtreeFlags&Hs)for(n=n.child;n!==null;)u0(n,a,o),n=n.sibling}function u0(n,a,o){switch(n.tag){case 26:Do(n,a,o),n.flags&Hs&&n.memoizedState!==null&&jx(o,Br,n.memoizedState,n.memoizedProps);break;case 5:Do(n,a,o);break;case 3:case 4:var u=Br;Br=qu(n.stateNode.containerInfo),Do(n,a,o),Br=u;break;case 22:n.memoizedState===null&&(u=n.alternate,u!==null&&u.memoizedState!==null?(u=Hs,Hs=16777216,Do(n,a,o),Hs=u):Do(n,a,o));break;default:Do(n,a,o)}}function c0(n){var a=n.alternate;if(a!==null&&(n=a.child,n!==null)){a.child=null;do a=n.sibling,n.sibling=null,n=a;while(n!==null)}}function Gs(n){var a=n.deletions;if((n.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var u=a[o];On=u,d0(u,n)}c0(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)f0(n),n=n.sibling}function f0(n){switch(n.tag){case 0:case 11:case 15:Gs(n),n.flags&2048&&Qa(9,n,n.return);break;case 3:Gs(n);break;case 12:Gs(n);break;case 22:var a=n.stateNode;n.memoizedState!==null&&a._visibility&2&&(n.return===null||n.return.tag!==13)?(a._visibility&=-3,Ru(n)):Gs(n);break;default:Gs(n)}}function Ru(n){var a=n.deletions;if((n.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var u=a[o];On=u,d0(u,n)}c0(n)}for(n=n.child;n!==null;){switch(a=n,a.tag){case 0:case 11:case 15:Qa(8,a,a.return),Ru(a);break;case 22:o=a.stateNode,o._visibility&2&&(o._visibility&=-3,Ru(a));break;default:Ru(a)}n=n.sibling}}function d0(n,a){for(;On!==null;){var o=On;switch(o.tag){case 0:case 11:case 15:Qa(8,o,a);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var u=o.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:As(o.memoizedState.cache)}if(u=o.child,u!==null)u.return=o,On=u;else e:for(o=n;On!==null;){u=On;var p=u.sibling,y=u.return;if(n0(u),u===o){On=null;break e}if(p!==null){p.return=y,On=p;break e}On=y}}}var GE={getCacheForType:function(n){var a=kn(ln),o=a.data.get(n);return o===void 0&&(o=n(),a.data.set(n,o)),o},cacheSignal:function(){return kn(ln).controller.signal}},KE=typeof WeakMap=="function"?WeakMap:Map,yt=0,At=null,tt=null,at=0,Et=0,dr=null,Wa=!1,No=!1,Pd=!1,Ca=0,Zt=0,Ja=0,Yi=0,Id=0,hr=0,zo=0,Ks=null,Wn=null,Ld=!1,Au=0,h0=0,Mu=1/0,ju=null,ei=null,vn=0,ti=null,$o=null,Oa=0,Ud=0,qd=null,p0=null,Ys=0,Vd=null;function pr(){return(yt&2)!==0&&at!==0?at&-at:K.T!==null?Yd():Pr()}function m0(){if(hr===0)if((at&536870912)===0||st){var n=En;En<<=1,(En&3932160)===0&&(En=262144),hr=n}else hr=536870912;return n=cr.current,n!==null&&(n.flags|=32),hr}function Jn(n,a,o){(n===At&&(Et===2||Et===9)||n.cancelPendingCommit!==null)&&(Po(n,0),ni(n,at,hr,!1)),ft(n,o),((yt&2)===0||n!==At)&&(n===At&&((yt&2)===0&&(Yi|=o),Zt===4&&ni(n,at,hr,!1)),ia(n))}function g0(n,a,o){if((yt&6)!==0)throw Error(i(327));var u=!o&&(a&127)===0&&(a&n.expiredLanes)===0||Kt(n,a),p=u?XE(n,a):Bd(n,a,!0),y=u;do{if(p===0){No&&!u&&ni(n,a,0,!1);break}else{if(o=n.current.alternate,y&&!YE(o)){p=Bd(n,a,!1),y=!1;continue}if(p===2){if(y=a,n.errorRecoveryDisabledLanes&y)var A=0;else A=n.pendingLanes&-536870913,A=A!==0?A:A&536870912?536870912:0;if(A!==0){a=A;e:{var z=n;p=Ks;var H=z.current.memoizedState.isDehydrated;if(H&&(Po(z,A).flags|=256),A=Bd(z,A,!1),A!==2){if(Pd&&!H){z.errorRecoveryDisabledLanes|=y,Yi|=y,p=4;break e}y=Wn,Wn=p,y!==null&&(Wn===null?Wn=y:Wn.push.apply(Wn,y))}p=A}if(y=!1,p!==2)continue}}if(p===1){Po(n,0),ni(n,a,0,!0);break}e:{switch(u=n,y=p,y){case 0:case 1:throw Error(i(345));case 4:if((a&4194048)!==a)break;case 6:ni(u,a,hr,!Wa);break e;case 2:Wn=null;break;case 3:case 5:break;default:throw Error(i(329))}if((a&62914560)===a&&(p=Au+300-Ue(),10<p)){if(ni(u,a,hr,!Wa),xn(u,0,!0)!==0)break e;Oa=a,u.timeoutHandle=K0(y0.bind(null,u,o,Wn,ju,Ld,a,hr,Yi,zo,Wa,y,"Throttled",-0,0),p);break e}y0(u,o,Wn,ju,Ld,a,hr,Yi,zo,Wa,y,null,-0,0)}}break}while(!0);ia(n)}function y0(n,a,o,u,p,y,A,z,H,oe,he,me,le,ce){if(n.timeoutHandle=-1,me=a.subtreeFlags,me&8192||(me&16785408)===16785408){me={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Me},u0(a,y,me);var je=(y&62914560)===y?Au-Ue():(y&4194048)===y?h0-Ue():0;if(je=kx(me,je),je!==null){Oa=y,n.cancelPendingCommit=je(T0.bind(null,n,a,y,o,u,p,A,z,H,he,me,null,le,ce)),ni(n,y,A,!oe);return}}T0(n,a,y,o,u,p,A,z,H)}function YE(n){for(var a=n;;){var o=a.tag;if((o===0||o===11||o===15)&&a.flags&16384&&(o=a.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var u=0;u<o.length;u++){var p=o[u],y=p.getSnapshot;p=p.value;try{if(!lr(y(),p))return!1}catch{return!1}}if(o=a.child,a.subtreeFlags&16384&&o!==null)o.return=a,a=o;else{if(a===n)break;for(;a.sibling===null;){if(a.return===null||a.return===n)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function ni(n,a,o,u){a&=~Id,a&=~Yi,n.suspendedLanes|=a,n.pingedLanes&=~a,u&&(n.warmLanes|=a),u=n.expirationTimes;for(var p=a;0<p;){var y=31-Rt(p),A=1<<y;u[y]=-1,p&=~A}o!==0&&Fn(n,o,a)}function ku(){return(yt&6)===0?(Zs(0),!1):!0}function Fd(){if(tt!==null){if(Et===0)var n=tt.return;else n=tt,ga=Li=null,id(n),Oo=null,js=0,n=tt;for(;n!==null;)Yy(n.alternate,n),n=n.return;tt=null}}function Po(n,a){var o=n.timeoutHandle;o!==-1&&(n.timeoutHandle=-1,px(o)),o=n.cancelPendingCommit,o!==null&&(n.cancelPendingCommit=null,o()),Oa=0,Fd(),At=n,tt=o=pa(n.current,null),at=a,Et=0,dr=null,Wa=!1,No=Kt(n,a),Pd=!1,zo=hr=Id=Yi=Ja=Zt=0,Wn=Ks=null,Ld=!1,(a&8)!==0&&(a|=a&32);var u=n.entangledLanes;if(u!==0)for(n=n.entanglements,u&=a;0<u;){var p=31-Rt(u),y=1<<p;a|=n[p],u&=~y}return Ca=a,Jl(),o}function v0(n,a){Ze=null,K.H=Ls,a===Co||a===su?(a=Ng(),Et=3):a===Kf?(a=Ng(),Et=4):Et=a===wd?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,dr=a,tt===null&&(Zt=1,wu(n,_r(a,n.current)))}function b0(){var n=cr.current;return n===null?!0:(at&4194048)===at?Rr===null:(at&62914560)===at||(at&536870912)!==0?n===Rr:!1}function S0(){var n=K.H;return K.H=Ls,n===null?Ls:n}function w0(){var n=K.A;return K.A=GE,n}function Du(){Zt=4,Wa||(at&4194048)!==at&&cr.current!==null||(No=!0),(Ja&134217727)===0&&(Yi&134217727)===0||At===null||ni(At,at,hr,!1)}function Bd(n,a,o){var u=yt;yt|=2;var p=S0(),y=w0();(At!==n||at!==a)&&(ju=null,Po(n,a)),a=!1;var A=Zt;e:do try{if(Et!==0&&tt!==null){var z=tt,H=dr;switch(Et){case 8:Fd(),A=6;break e;case 3:case 2:case 9:case 6:cr.current===null&&(a=!0);var oe=Et;if(Et=0,dr=null,Io(n,z,H,oe),o&&No){A=0;break e}break;default:oe=Et,Et=0,dr=null,Io(n,z,H,oe)}}ZE(),A=Zt;break}catch(he){v0(n,he)}while(!0);return a&&n.shellSuspendCounter++,ga=Li=null,yt=u,K.H=p,K.A=y,tt===null&&(At=null,at=0,Jl()),A}function ZE(){for(;tt!==null;)E0(tt)}function XE(n,a){var o=yt;yt|=2;var u=S0(),p=w0();At!==n||at!==a?(ju=null,Mu=Ue()+500,Po(n,a)):No=Kt(n,a);e:do try{if(Et!==0&&tt!==null){a=tt;var y=dr;t:switch(Et){case 1:Et=0,dr=null,Io(n,a,y,1);break;case 2:case 9:if(kg(y)){Et=0,dr=null,x0(a);break}a=function(){Et!==2&&Et!==9||At!==n||(Et=7),ia(n)},y.then(a,a);break e;case 3:Et=7;break e;case 4:Et=5;break e;case 7:kg(y)?(Et=0,dr=null,x0(a)):(Et=0,dr=null,Io(n,a,y,7));break;case 5:var A=null;switch(tt.tag){case 26:A=tt.memoizedState;case 5:case 27:var z=tt;if(A?lv(A):z.stateNode.complete){Et=0,dr=null;var H=z.sibling;if(H!==null)tt=H;else{var oe=z.return;oe!==null?(tt=oe,Nu(oe)):tt=null}break t}}Et=0,dr=null,Io(n,a,y,5);break;case 6:Et=0,dr=null,Io(n,a,y,6);break;case 8:Fd(),Zt=6;break e;default:throw Error(i(462))}}QE();break}catch(he){v0(n,he)}while(!0);return ga=Li=null,K.H=u,K.A=p,yt=o,tt!==null?0:(At=null,at=0,Jl(),Zt)}function QE(){for(;tt!==null&&!Je();)E0(tt)}function E0(n){var a=Gy(n.alternate,n,Ca);n.memoizedProps=n.pendingProps,a===null?Nu(n):tt=a}function x0(n){var a=n,o=a.alternate;switch(a.tag){case 15:case 0:a=Uy(o,a,a.pendingProps,a.type,void 0,at);break;case 11:a=Uy(o,a,a.pendingProps,a.type.render,a.ref,at);break;case 5:id(a);default:Yy(o,a),a=tt=wg(a,Ca),a=Gy(o,a,Ca)}n.memoizedProps=n.pendingProps,a===null?Nu(n):tt=a}function Io(n,a,o,u){ga=Li=null,id(a),Oo=null,js=0;var p=a.return;try{if(LE(n,p,a,o,at)){Zt=1,wu(n,_r(o,n.current)),tt=null;return}}catch(y){if(p!==null)throw tt=p,y;Zt=1,wu(n,_r(o,n.current)),tt=null;return}a.flags&32768?(st||u===1?n=!0:No||(at&536870912)!==0?n=!1:(Wa=n=!0,(u===2||u===9||u===3||u===6)&&(u=cr.current,u!==null&&u.tag===13&&(u.flags|=16384))),_0(a,n)):Nu(a)}function Nu(n){var a=n;do{if((a.flags&32768)!==0){_0(a,Wa);return}n=a.return;var o=VE(a.alternate,a,Ca);if(o!==null){tt=o;return}if(a=a.sibling,a!==null){tt=a;return}tt=a=n}while(a!==null);Zt===0&&(Zt=5)}function _0(n,a){do{var o=FE(n.alternate,n);if(o!==null){o.flags&=32767,tt=o;return}if(o=n.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!a&&(n=n.sibling,n!==null)){tt=n;return}tt=n=o}while(n!==null);Zt=6,tt=null}function T0(n,a,o,u,p,y,A,z,H){n.cancelPendingCommit=null;do zu();while(vn!==0);if((yt&6)!==0)throw Error(i(327));if(a!==null){if(a===n.current)throw Error(i(177));if(y=a.lanes|a.childLanes,y|=kf,tn(n,o,y,A,z,H),n===At&&(tt=At=null,at=0),$o=a,ti=n,Oa=o,Ud=y,qd=p,p0=u,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,tx(xe,function(){return M0(),null})):(n.callbackNode=null,n.callbackPriority=0),u=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||u){u=K.T,K.T=null,p=B.p,B.p=2,A=yt,yt|=4;try{BE(n,a,o)}finally{yt=A,B.p=p,K.T=u}}vn=1,C0(),O0(),R0()}}function C0(){if(vn===1){vn=0;var n=ti,a=$o,o=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||o){o=K.T,K.T=null;var u=B.p;B.p=2;var p=yt;yt|=4;try{o0(a,n);var y=nh,A=dg(n.containerInfo),z=y.focusedElem,H=y.selectionRange;if(A!==z&&z&&z.ownerDocument&&fg(z.ownerDocument.documentElement,z)){if(H!==null&&Of(z)){var oe=H.start,he=H.end;if(he===void 0&&(he=oe),"selectionStart"in z)z.selectionStart=oe,z.selectionEnd=Math.min(he,z.value.length);else{var me=z.ownerDocument||document,le=me&&me.defaultView||window;if(le.getSelection){var ce=le.getSelection(),je=z.textContent.length,qe=Math.min(H.start,je),Ot=H.end===void 0?qe:Math.min(H.end,je);!ce.extend&&qe>Ot&&(A=Ot,Ot=qe,qe=A);var J=cg(z,qe),Q=cg(z,Ot);if(J&&Q&&(ce.rangeCount!==1||ce.anchorNode!==J.node||ce.anchorOffset!==J.offset||ce.focusNode!==Q.node||ce.focusOffset!==Q.offset)){var ie=me.createRange();ie.setStart(J.node,J.offset),ce.removeAllRanges(),qe>Ot?(ce.addRange(ie),ce.extend(Q.node,Q.offset)):(ie.setEnd(Q.node,Q.offset),ce.addRange(ie))}}}}for(me=[],ce=z;ce=ce.parentNode;)ce.nodeType===1&&me.push({element:ce,left:ce.scrollLeft,top:ce.scrollTop});for(typeof z.focus=="function"&&z.focus(),z=0;z<me.length;z++){var pe=me[z];pe.element.scrollLeft=pe.left,pe.element.scrollTop=pe.top}}Ku=!!th,nh=th=null}finally{yt=p,B.p=u,K.T=o}}n.current=a,vn=2}}function O0(){if(vn===2){vn=0;var n=ti,a=$o,o=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||o){o=K.T,K.T=null;var u=B.p;B.p=2;var p=yt;yt|=4;try{t0(n,a.alternate,a)}finally{yt=p,B.p=u,K.T=o}}vn=3}}function R0(){if(vn===4||vn===3){vn=0,ke();var n=ti,a=$o,o=Oa,u=p0;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?vn=5:(vn=0,$o=ti=null,A0(n,n.pendingLanes));var p=n.pendingLanes;if(p===0&&(ei=null),Vr(o),a=a.stateNode,wt&&typeof wt.onCommitFiberRoot=="function")try{wt.onCommitFiberRoot(Vt,a,void 0,(a.current.flags&128)===128)}catch{}if(u!==null){a=K.T,p=B.p,B.p=2,K.T=null;try{for(var y=n.onRecoverableError,A=0;A<u.length;A++){var z=u[A];y(z.value,{componentStack:z.stack})}}finally{K.T=a,B.p=p}}(Oa&3)!==0&&zu(),ia(n),p=n.pendingLanes,(o&261930)!==0&&(p&42)!==0?n===Vd?Ys++:(Ys=0,Vd=n):Ys=0,Zs(0)}}function A0(n,a){(n.pooledCacheLanes&=a)===0&&(a=n.pooledCache,a!=null&&(n.pooledCache=null,As(a)))}function zu(){return C0(),O0(),R0(),M0()}function M0(){if(vn!==5)return!1;var n=ti,a=Ud;Ud=0;var o=Vr(Oa),u=K.T,p=B.p;try{B.p=32>o?32:o,K.T=null,o=qd,qd=null;var y=ti,A=Oa;if(vn=0,$o=ti=null,Oa=0,(yt&6)!==0)throw Error(i(331));var z=yt;if(yt|=4,f0(y.current),l0(y,y.current,A,o),yt=z,Zs(0,!1),wt&&typeof wt.onPostCommitFiberRoot=="function")try{wt.onPostCommitFiberRoot(Vt,y)}catch{}return!0}finally{B.p=p,K.T=u,A0(n,a)}}function j0(n,a,o){a=_r(o,a),a=Sd(n.stateNode,a,2),n=Ya(n,a,2),n!==null&&(ft(n,2),ia(n))}function xt(n,a,o){if(n.tag===3)j0(n,n,o);else for(;a!==null;){if(a.tag===3){j0(a,n,o);break}else if(a.tag===1){var u=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(ei===null||!ei.has(u))){n=_r(o,n),o=ky(2),u=Ya(a,o,2),u!==null&&(Dy(o,u,a,n),ft(u,2),ia(u));break}}a=a.return}}function Hd(n,a,o){var u=n.pingCache;if(u===null){u=n.pingCache=new KE;var p=new Set;u.set(a,p)}else p=u.get(a),p===void 0&&(p=new Set,u.set(a,p));p.has(o)||(Pd=!0,p.add(o),n=WE.bind(null,n,a,o),a.then(n,n))}function WE(n,a,o){var u=n.pingCache;u!==null&&u.delete(a),n.pingedLanes|=n.suspendedLanes&o,n.warmLanes&=~o,At===n&&(at&o)===o&&(Zt===4||Zt===3&&(at&62914560)===at&&300>Ue()-Au?(yt&2)===0&&Po(n,0):Id|=o,zo===at&&(zo=0)),ia(n)}function k0(n,a){a===0&&(a=wr()),n=$i(n,a),n!==null&&(ft(n,a),ia(n))}function JE(n){var a=n.memoizedState,o=0;a!==null&&(o=a.retryLane),k0(n,o)}function ex(n,a){var o=0;switch(n.tag){case 31:case 13:var u=n.stateNode,p=n.memoizedState;p!==null&&(o=p.retryLane);break;case 19:u=n.stateNode;break;case 22:u=n.stateNode._retryCache;break;default:throw Error(i(314))}u!==null&&u.delete(a),k0(n,o)}function tx(n,a){return Be(n,a)}var $u=null,Lo=null,Gd=!1,Pu=!1,Kd=!1,ri=0;function ia(n){n!==Lo&&n.next===null&&(Lo===null?$u=Lo=n:Lo=Lo.next=n),Pu=!0,Gd||(Gd=!0,rx())}function Zs(n,a){if(!Kd&&Pu){Kd=!0;do for(var o=!1,u=$u;u!==null;){if(n!==0){var p=u.pendingLanes;if(p===0)var y=0;else{var A=u.suspendedLanes,z=u.pingedLanes;y=(1<<31-Rt(42|n)+1)-1,y&=p&~(A&~z),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(o=!0,$0(u,y))}else y=at,y=xn(u,u===At?y:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(y&3)===0||Kt(u,y)||(o=!0,$0(u,y));u=u.next}while(o);Kd=!1}}function nx(){D0()}function D0(){Pu=Gd=!1;var n=0;ri!==0&&hx()&&(n=ri);for(var a=Ue(),o=null,u=$u;u!==null;){var p=u.next,y=N0(u,a);y===0?(u.next=null,o===null?$u=p:o.next=p,p===null&&(Lo=o)):(o=u,(n!==0||(y&3)!==0)&&(Pu=!0)),u=p}vn!==0&&vn!==5||Zs(n),ri!==0&&(ri=0)}function N0(n,a){for(var o=n.suspendedLanes,u=n.pingedLanes,p=n.expirationTimes,y=n.pendingLanes&-62914561;0<y;){var A=31-Rt(y),z=1<<A,H=p[A];H===-1?((z&o)===0||(z&u)!==0)&&(p[A]=sr(z,a)):H<=a&&(n.expiredLanes|=z),y&=~z}if(a=At,o=at,o=xn(n,n===a?o:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u=n.callbackNode,o===0||n===a&&(Et===2||Et===9)||n.cancelPendingCommit!==null)return u!==null&&u!==null&&Fe(u),n.callbackNode=null,n.callbackPriority=0;if((o&3)===0||Kt(n,o)){if(a=o&-o,a===n.callbackPriority)return a;switch(u!==null&&Fe(u),Vr(o)){case 2:case 8:o=Ae;break;case 32:o=xe;break;case 268435456:o=Ke;break;default:o=xe}return u=z0.bind(null,n),o=Be(o,u),n.callbackPriority=a,n.callbackNode=o,a}return u!==null&&u!==null&&Fe(u),n.callbackPriority=2,n.callbackNode=null,2}function z0(n,a){if(vn!==0&&vn!==5)return n.callbackNode=null,n.callbackPriority=0,null;var o=n.callbackNode;if(zu()&&n.callbackNode!==o)return null;var u=at;return u=xn(n,n===At?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u===0?null:(g0(n,u,a),N0(n,Ue()),n.callbackNode!=null&&n.callbackNode===o?z0.bind(null,n):null)}function $0(n,a){if(zu())return null;g0(n,a,!0)}function rx(){mx(function(){(yt&6)!==0?Be(Mt,nx):D0()})}function Yd(){if(ri===0){var n=_o;n===0&&(n=Tn,Tn<<=1,(Tn&261888)===0&&(Tn=256)),ri=n}return ri}function P0(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:ye(""+n)}function I0(n,a){var o=a.ownerDocument.createElement("input");return o.name=a.name,o.value=a.value,n.id&&o.setAttribute("form",n.id),a.parentNode.insertBefore(o,a),n=new FormData(n),o.parentNode.removeChild(o),n}function ax(n,a,o,u,p){if(a==="submit"&&o&&o.stateNode===p){var y=P0((p[sn]||null).action),A=u.submitter;A&&(a=(a=A[sn]||null)?P0(a.formAction):A.getAttribute("formAction"),a!==null&&(y=a,A=null));var z=new ki("action","action",null,u,p);n.push({event:z,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(ri!==0){var H=A?I0(p,A):new FormData(p);pd(o,{pending:!0,data:H,method:p.method,action:y},null,H)}}else typeof y=="function"&&(z.preventDefault(),H=A?I0(p,A):new FormData(p),pd(o,{pending:!0,data:H,method:p.method,action:y},y,H))},currentTarget:p}]})}}for(var Zd=0;Zd<jf.length;Zd++){var Xd=jf[Zd],ix=Xd.toLowerCase(),ox=Xd[0].toUpperCase()+Xd.slice(1);Fr(ix,"on"+ox)}Fr(mg,"onAnimationEnd"),Fr(gg,"onAnimationIteration"),Fr(yg,"onAnimationStart"),Fr("dblclick","onDoubleClick"),Fr("focusin","onFocus"),Fr("focusout","onBlur"),Fr(EE,"onTransitionRun"),Fr(xE,"onTransitionStart"),Fr(_E,"onTransitionCancel"),Fr(vg,"onTransitionEnd"),wi("onMouseEnter",["mouseout","mouseover"]),wi("onMouseLeave",["mouseout","mouseover"]),wi("onPointerEnter",["pointerout","pointerover"]),wi("onPointerLeave",["pointerout","pointerover"]),qa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),qa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),qa("onBeforeInput",["compositionend","keypress","textInput","paste"]),qa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),qa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),qa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Xs="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(" "),sx=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Xs));function L0(n,a){a=(a&4)!==0;for(var o=0;o<n.length;o++){var u=n[o],p=u.event;u=u.listeners;e:{var y=void 0;if(a)for(var A=u.length-1;0<=A;A--){var z=u[A],H=z.instance,oe=z.currentTarget;if(z=z.listener,H!==y&&p.isPropagationStopped())break e;y=z,p.currentTarget=oe;try{y(p)}catch(he){Wl(he)}p.currentTarget=null,y=H}else for(A=0;A<u.length;A++){if(z=u[A],H=z.instance,oe=z.currentTarget,z=z.listener,H!==y&&p.isPropagationStopped())break e;y=z,p.currentTarget=oe;try{y(p)}catch(he){Wl(he)}p.currentTarget=null,y=H}}}}function nt(n,a){var o=a[Ua];o===void 0&&(o=a[Ua]=new Set);var u=n+"__bubble";o.has(u)||(U0(a,n,2,!1),o.add(u))}function Qd(n,a,o){var u=0;a&&(u|=4),U0(o,n,u,a)}var Iu="_reactListening"+Math.random().toString(36).slice(2);function Wd(n){if(!n[Iu]){n[Iu]=!0,Sc.forEach(function(o){o!=="selectionchange"&&(sx.has(o)||Qd(o,!1,n),Qd(o,!0,n))});var a=n.nodeType===9?n:n.ownerDocument;a===null||a[Iu]||(a[Iu]=!0,Qd("selectionchange",!1,a))}}function U0(n,a,o,u){switch(mv(a)){case 2:var p=zx;break;case 8:p=$x;break;default:p=hh}o=p.bind(null,a,o,n),p=void 0,!Er||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(p=!0),u?p!==void 0?n.addEventListener(a,o,{capture:!0,passive:p}):n.addEventListener(a,o,!0):p!==void 0?n.addEventListener(a,o,{passive:p}):n.addEventListener(a,o,!1)}function Jd(n,a,o,u,p){var y=u;if((a&1)===0&&(a&2)===0&&u!==null)e:for(;;){if(u===null)return;var A=u.tag;if(A===3||A===4){var z=u.stateNode.containerInfo;if(z===p)break;if(A===4)for(A=u.return;A!==null;){var H=A.tag;if((H===3||H===4)&&A.stateNode.containerInfo===p)return;A=A.return}for(;z!==null;){if(A=Oi(z),A===null)return;if(H=A.tag,H===5||H===6||H===26||H===27){u=y=A;continue e}z=z.parentNode}}u=u.return}hn(function(){var oe=y,he=Ye(o),me=[];e:{var le=bg.get(n);if(le!==void 0){var ce=ki,je=n;switch(n){case"keypress":if(Ei(o)===0)break e;case"keydown":case"keyup":ce=eE;break;case"focusin":je="focus",ce=Ef;break;case"focusout":je="blur",ce=Ef;break;case"beforeblur":case"afterblur":ce=Ef;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ce=Ym;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ce=V2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ce=rE;break;case mg:case gg:case yg:ce=H2;break;case vg:ce=iE;break;case"scroll":case"scrollend":ce=wf;break;case"wheel":ce=sE;break;case"copy":case"cut":case"paste":ce=K2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ce=Xm;break;case"toggle":case"beforetoggle":ce=uE}var qe=(a&4)!==0,Ot=!qe&&(n==="scroll"||n==="scrollend"),J=qe?le!==null?le+"Capture":null:le;qe=[];for(var Q=oe,ie;Q!==null;){var pe=Q;if(ie=pe.stateNode,pe=pe.tag,pe!==5&&pe!==26&&pe!==27||ie===null||J===null||(pe=bt(Q,J),pe!=null&&qe.push(Qs(Q,pe,ie))),Ot)break;Q=Q.return}0<qe.length&&(le=new ce(le,je,null,o,he),me.push({event:le,listeners:qe}))}}if((a&7)===0){e:{if(le=n==="mouseover"||n==="pointerover",ce=n==="mouseout"||n==="pointerout",le&&o!==Ie&&(je=o.relatedTarget||o.fromElement)&&(Oi(je)||je[Ir]))break e;if((ce||le)&&(le=he.window===he?he:(le=he.ownerDocument)?le.defaultView||le.parentWindow:window,ce?(je=o.relatedTarget||o.toElement,ce=oe,je=je?Oi(je):null,je!==null&&(Ot=l(je),qe=je.tag,je!==Ot||qe!==5&&qe!==27&&qe!==6)&&(je=null)):(ce=null,je=oe),ce!==je)){if(qe=Ym,pe="onMouseLeave",J="onMouseEnter",Q="mouse",(n==="pointerout"||n==="pointerover")&&(qe=Xm,pe="onPointerLeave",J="onPointerEnter",Q="pointer"),Ot=ce==null?le:ho(ce),ie=je==null?le:ho(je),le=new qe(pe,Q+"leave",ce,o,he),le.target=Ot,le.relatedTarget=ie,pe=null,Oi(he)===oe&&(qe=new qe(J,Q+"enter",je,o,he),qe.target=ie,qe.relatedTarget=Ot,pe=qe),Ot=pe,ce&&je)t:{for(qe=lx,J=ce,Q=je,ie=0,pe=J;pe;pe=qe(pe))ie++;pe=0;for(var Le=Q;Le;Le=qe(Le))pe++;for(;0<ie-pe;)J=qe(J),ie--;for(;0<pe-ie;)Q=qe(Q),pe--;for(;ie--;){if(J===Q||Q!==null&&J===Q.alternate){qe=J;break t}J=qe(J),Q=qe(Q)}qe=null}else qe=null;ce!==null&&q0(me,le,ce,qe,!1),je!==null&&Ot!==null&&q0(me,Ot,je,qe,!0)}}e:{if(le=oe?ho(oe):window,ce=le.nodeName&&le.nodeName.toLowerCase(),ce==="select"||ce==="input"&&le.type==="file")var dt=ag;else if(ng(le))if(ig)dt=bE;else{dt=yE;var ze=gE}else ce=le.nodeName,!ce||ce.toLowerCase()!=="input"||le.type!=="checkbox"&&le.type!=="radio"?oe&&ge(oe.elementType)&&(dt=ag):dt=vE;if(dt&&(dt=dt(n,oe))){rg(me,dt,o,he);break e}ze&&ze(n,le,oe),n==="focusout"&&oe&&le.type==="number"&&oe.memoizedProps.value!=null&&Yl(le,"number",le.value)}switch(ze=oe?ho(oe):window,n){case"focusin":(ng(ze)||ze.contentEditable==="true")&&(go=ze,Rf=oe,Cs=null);break;case"focusout":Cs=Rf=go=null;break;case"mousedown":Af=!0;break;case"contextmenu":case"mouseup":case"dragend":Af=!1,hg(me,o,he);break;case"selectionchange":if(wE)break;case"keydown":case"keyup":hg(me,o,he)}var Qe;if(_f)e:{switch(n){case"compositionstart":var it="onCompositionStart";break e;case"compositionend":it="onCompositionEnd";break e;case"compositionupdate":it="onCompositionUpdate";break e}it=void 0}else mo?eg(n,o)&&(it="onCompositionEnd"):n==="keydown"&&o.keyCode===229&&(it="onCompositionStart");it&&(Qm&&o.locale!=="ko"&&(mo||it!=="onCompositionStart"?it==="onCompositionEnd"&&mo&&(Qe=rs()):(ar=he,Jr="value"in ar?ar.value:ar.textContent,mo=!0)),ze=Lu(oe,it),0<ze.length&&(it=new Zm(it,n,null,o,he),me.push({event:it,listeners:ze}),Qe?it.data=Qe:(Qe=tg(o),Qe!==null&&(it.data=Qe)))),(Qe=fE?dE(n,o):hE(n,o))&&(it=Lu(oe,"onBeforeInput"),0<it.length&&(ze=new Zm("onBeforeInput","beforeinput",null,o,he),me.push({event:ze,listeners:it}),ze.data=Qe)),ax(me,n,oe,o,he)}L0(me,a)})}function Qs(n,a,o){return{instance:n,listener:a,currentTarget:o}}function Lu(n,a){for(var o=a+"Capture",u=[];n!==null;){var p=n,y=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||y===null||(p=bt(n,o),p!=null&&u.unshift(Qs(n,p,y)),p=bt(n,a),p!=null&&u.push(Qs(n,p,y))),n.tag===3)return u;n=n.return}return[]}function lx(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function q0(n,a,o,u,p){for(var y=a._reactName,A=[];o!==null&&o!==u;){var z=o,H=z.alternate,oe=z.stateNode;if(z=z.tag,H!==null&&H===u)break;z!==5&&z!==26&&z!==27||oe===null||(H=oe,p?(oe=bt(o,y),oe!=null&&A.unshift(Qs(o,oe,H))):p||(oe=bt(o,y),oe!=null&&A.push(Qs(o,oe,H)))),o=o.return}A.length!==0&&n.push({event:a,listeners:A})}var ux=/\r\n?/g,cx=/\u0000|\uFFFD/g;function V0(n){return(typeof n=="string"?n:""+n).replace(ux,`
9
+ `).replace(cx,"")}function F0(n,a){return a=V0(a),V0(n)===a}function Ct(n,a,o,u,p,y){switch(o){case"children":typeof u=="string"?a==="body"||a==="textarea"&&u===""||ne(n,u):(typeof u=="number"||typeof u=="bigint")&&a!=="body"&&ne(n,""+u);break;case"className":ns(n,"class",u);break;case"tabIndex":ns(n,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":ns(n,o,u);break;case"style":W(n,u,y);break;case"data":if(a!=="object"){ns(n,"data",u);break}case"src":case"href":if(u===""&&(a!=="a"||o!=="href")){n.removeAttribute(o);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(o);break}u=ye(""+u),n.setAttribute(o,u);break;case"action":case"formAction":if(typeof u=="function"){n.setAttribute(o,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof y=="function"&&(o==="formAction"?(a!=="input"&&Ct(n,a,"name",p.name,p,null),Ct(n,a,"formEncType",p.formEncType,p,null),Ct(n,a,"formMethod",p.formMethod,p,null),Ct(n,a,"formTarget",p.formTarget,p,null)):(Ct(n,a,"encType",p.encType,p,null),Ct(n,a,"method",p.method,p,null),Ct(n,a,"target",p.target,p,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(o);break}u=ye(""+u),n.setAttribute(o,u);break;case"onClick":u!=null&&(n.onclick=Me);break;case"onScroll":u!=null&&nt("scroll",n);break;case"onScrollEnd":u!=null&&nt("scrollend",n);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(i(61));if(o=u.__html,o!=null){if(p.children!=null)throw Error(i(60));n.innerHTML=o}}break;case"multiple":n.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":n.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){n.removeAttribute("xlink:href");break}o=ye(""+u),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(o,""+u):n.removeAttribute(o);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":u&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(o,""):n.removeAttribute(o);break;case"capture":case"download":u===!0?n.setAttribute(o,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(o,u):n.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?n.setAttribute(o,u):n.removeAttribute(o);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?n.removeAttribute(o):n.setAttribute(o,u);break;case"popover":nt("beforetoggle",n),nt("toggle",n),Ss(n,"popover",u);break;case"xlinkActuate":Wr(n,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Wr(n,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Wr(n,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Wr(n,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Wr(n,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Wr(n,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Wr(n,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Wr(n,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Wr(n,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":Ss(n,"is",u);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=Re.get(o)||o,Ss(n,o,u))}}function eh(n,a,o,u,p,y){switch(o){case"style":W(n,u,y);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(i(61));if(o=u.__html,o!=null){if(p.children!=null)throw Error(i(60));n.innerHTML=o}}break;case"children":typeof u=="string"?ne(n,u):(typeof u=="number"||typeof u=="bigint")&&ne(n,""+u);break;case"onScroll":u!=null&&nt("scroll",n);break;case"onScrollEnd":u!=null&&nt("scrollend",n);break;case"onClick":u!=null&&(n.onclick=Me);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Hl.hasOwnProperty(o))e:{if(o[0]==="o"&&o[1]==="n"&&(p=o.endsWith("Capture"),a=o.slice(2,p?o.length-7:void 0),y=n[sn]||null,y=y!=null?y[o]:null,typeof y=="function"&&n.removeEventListener(a,y,p),typeof u=="function")){typeof y!="function"&&y!==null&&(o in n?n[o]=null:n.hasAttribute(o)&&n.removeAttribute(o)),n.addEventListener(a,u,p);break e}o in n?n[o]=u:u===!0?n.setAttribute(o,""):Ss(n,o,u)}}}function Nn(n,a,o){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":nt("error",n),nt("load",n);var u=!1,p=!1,y;for(y in o)if(o.hasOwnProperty(y)){var A=o[y];if(A!=null)switch(y){case"src":u=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:Ct(n,a,y,A,o,null)}}p&&Ct(n,a,"srcSet",o.srcSet,o,null),u&&Ct(n,a,"src",o.src,o,null);return;case"input":nt("invalid",n);var z=y=A=p=null,H=null,oe=null;for(u in o)if(o.hasOwnProperty(u)){var he=o[u];if(he!=null)switch(u){case"name":p=he;break;case"type":A=he;break;case"checked":H=he;break;case"defaultChecked":oe=he;break;case"value":y=he;break;case"defaultValue":z=he;break;case"children":case"dangerouslySetInnerHTML":if(he!=null)throw Error(i(137,a));break;default:Ct(n,a,u,he,o,null)}}bf(n,y,z,H,oe,A,p,!1);return;case"select":nt("invalid",n),u=A=y=null;for(p in o)if(o.hasOwnProperty(p)&&(z=o[p],z!=null))switch(p){case"value":y=z;break;case"defaultValue":A=z;break;case"multiple":u=z;default:Ct(n,a,p,z,o,null)}a=y,o=A,n.multiple=!!u,a!=null?Mi(n,!!u,a,!1):o!=null&&Mi(n,!!u,o,!0);return;case"textarea":nt("invalid",n),y=p=u=null;for(A in o)if(o.hasOwnProperty(A)&&(z=o[A],z!=null))switch(A){case"value":u=z;break;case"defaultValue":p=z;break;case"children":y=z;break;case"dangerouslySetInnerHTML":if(z!=null)throw Error(i(91));break;default:Ct(n,a,A,z,o,null)}Sf(n,u,p,y);return;case"option":for(H in o)o.hasOwnProperty(H)&&(u=o[H],u!=null)&&(H==="selected"?n.selected=u&&typeof u!="function"&&typeof u!="symbol":Ct(n,a,H,u,o,null));return;case"dialog":nt("beforetoggle",n),nt("toggle",n),nt("cancel",n),nt("close",n);break;case"iframe":case"object":nt("load",n);break;case"video":case"audio":for(u=0;u<Xs.length;u++)nt(Xs[u],n);break;case"image":nt("error",n),nt("load",n);break;case"details":nt("toggle",n);break;case"embed":case"source":case"link":nt("error",n),nt("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(oe in o)if(o.hasOwnProperty(oe)&&(u=o[oe],u!=null))switch(oe){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:Ct(n,a,oe,u,o,null)}return;default:if(ge(a)){for(he in o)o.hasOwnProperty(he)&&(u=o[he],u!==void 0&&eh(n,a,he,u,o,void 0));return}}for(z in o)o.hasOwnProperty(z)&&(u=o[z],u!=null&&Ct(n,a,z,u,o,null))}function fx(n,a,o,u){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,y=null,A=null,z=null,H=null,oe=null,he=null;for(ce in o){var me=o[ce];if(o.hasOwnProperty(ce)&&me!=null)switch(ce){case"checked":break;case"value":break;case"defaultValue":H=me;default:u.hasOwnProperty(ce)||Ct(n,a,ce,null,u,me)}}for(var le in u){var ce=u[le];if(me=o[le],u.hasOwnProperty(le)&&(ce!=null||me!=null))switch(le){case"type":y=ce;break;case"name":p=ce;break;case"checked":oe=ce;break;case"defaultChecked":he=ce;break;case"value":A=ce;break;case"defaultValue":z=ce;break;case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(i(137,a));break;default:ce!==me&&Ct(n,a,le,ce,u,me)}}Kl(n,A,z,H,oe,he,y,p);return;case"select":ce=A=z=le=null;for(y in o)if(H=o[y],o.hasOwnProperty(y)&&H!=null)switch(y){case"value":break;case"multiple":ce=H;default:u.hasOwnProperty(y)||Ct(n,a,y,null,u,H)}for(p in u)if(y=u[p],H=o[p],u.hasOwnProperty(p)&&(y!=null||H!=null))switch(p){case"value":le=y;break;case"defaultValue":z=y;break;case"multiple":A=y;default:y!==H&&Ct(n,a,p,y,u,H)}a=z,o=A,u=ce,le!=null?Mi(n,!!o,le,!1):!!u!=!!o&&(a!=null?Mi(n,!!o,a,!0):Mi(n,!!o,o?[]:"",!1));return;case"textarea":ce=le=null;for(z in o)if(p=o[z],o.hasOwnProperty(z)&&p!=null&&!u.hasOwnProperty(z))switch(z){case"value":break;case"children":break;default:Ct(n,a,z,null,u,p)}for(A in u)if(p=u[A],y=o[A],u.hasOwnProperty(A)&&(p!=null||y!=null))switch(A){case"value":le=p;break;case"defaultValue":ce=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(i(91));break;default:p!==y&&Ct(n,a,A,p,u,y)}yl(n,le,ce);return;case"option":for(var je in o)le=o[je],o.hasOwnProperty(je)&&le!=null&&!u.hasOwnProperty(je)&&(je==="selected"?n.selected=!1:Ct(n,a,je,null,u,le));for(H in u)le=u[H],ce=o[H],u.hasOwnProperty(H)&&le!==ce&&(le!=null||ce!=null)&&(H==="selected"?n.selected=le&&typeof le!="function"&&typeof le!="symbol":Ct(n,a,H,le,u,ce));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 qe in o)le=o[qe],o.hasOwnProperty(qe)&&le!=null&&!u.hasOwnProperty(qe)&&Ct(n,a,qe,null,u,le);for(oe in u)if(le=u[oe],ce=o[oe],u.hasOwnProperty(oe)&&le!==ce&&(le!=null||ce!=null))switch(oe){case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(i(137,a));break;default:Ct(n,a,oe,le,u,ce)}return;default:if(ge(a)){for(var Ot in o)le=o[Ot],o.hasOwnProperty(Ot)&&le!==void 0&&!u.hasOwnProperty(Ot)&&eh(n,a,Ot,void 0,u,le);for(he in u)le=u[he],ce=o[he],!u.hasOwnProperty(he)||le===ce||le===void 0&&ce===void 0||eh(n,a,he,le,u,ce);return}}for(var J in o)le=o[J],o.hasOwnProperty(J)&&le!=null&&!u.hasOwnProperty(J)&&Ct(n,a,J,null,u,le);for(me in u)le=u[me],ce=o[me],!u.hasOwnProperty(me)||le===ce||le==null&&ce==null||Ct(n,a,me,le,u,ce)}function B0(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function dx(){if(typeof performance.getEntriesByType=="function"){for(var n=0,a=0,o=performance.getEntriesByType("resource"),u=0;u<o.length;u++){var p=o[u],y=p.transferSize,A=p.initiatorType,z=p.duration;if(y&&z&&B0(A)){for(A=0,z=p.responseEnd,u+=1;u<o.length;u++){var H=o[u],oe=H.startTime;if(oe>z)break;var he=H.transferSize,me=H.initiatorType;he&&B0(me)&&(H=H.responseEnd,A+=he*(H<z?1:(z-oe)/(H-oe)))}if(--u,a+=8*(y+A)/(p.duration/1e3),n++,10<n)break}}if(0<n)return a/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var th=null,nh=null;function Uu(n){return n.nodeType===9?n:n.ownerDocument}function H0(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function G0(n,a){if(n===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&a==="foreignObject"?0:n}function rh(n,a){return n==="textarea"||n==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var ah=null;function hx(){var n=window.event;return n&&n.type==="popstate"?n===ah?!1:(ah=n,!0):(ah=null,!1)}var K0=typeof setTimeout=="function"?setTimeout:void 0,px=typeof clearTimeout=="function"?clearTimeout:void 0,Y0=typeof Promise=="function"?Promise:void 0,mx=typeof queueMicrotask=="function"?queueMicrotask:typeof Y0<"u"?function(n){return Y0.resolve(null).then(n).catch(gx)}:K0;function gx(n){setTimeout(function(){throw n})}function ai(n){return n==="head"}function Z0(n,a){var o=a,u=0;do{var p=o.nextSibling;if(n.removeChild(o),p&&p.nodeType===8)if(o=p.data,o==="/$"||o==="/&"){if(u===0){n.removeChild(p),Fo(a);return}u--}else if(o==="$"||o==="$?"||o==="$~"||o==="$!"||o==="&")u++;else if(o==="html")Ws(n.ownerDocument.documentElement);else if(o==="head"){o=n.ownerDocument.head,Ws(o);for(var y=o.firstChild;y;){var A=y.nextSibling,z=y.nodeName;y[fo]||z==="SCRIPT"||z==="STYLE"||z==="LINK"&&y.rel.toLowerCase()==="stylesheet"||o.removeChild(y),y=A}}else o==="body"&&Ws(n.ownerDocument.body);o=p}while(o);Fo(a)}function X0(n,a){var o=n;n=0;do{var u=o.nextSibling;if(o.nodeType===1?a?(o._stashedDisplay=o.style.display,o.style.display="none"):(o.style.display=o._stashedDisplay||"",o.getAttribute("style")===""&&o.removeAttribute("style")):o.nodeType===3&&(a?(o._stashedText=o.nodeValue,o.nodeValue=""):o.nodeValue=o._stashedText||""),u&&u.nodeType===8)if(o=u.data,o==="/$"){if(n===0)break;n--}else o!=="$"&&o!=="$?"&&o!=="$~"&&o!=="$!"||n++;o=u}while(o)}function ih(n){var a=n.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var o=a;switch(a=a.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":ih(o),Bl(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}n.removeChild(o)}}function yx(n,a,o,u){for(;n.nodeType===1;){var p=o;if(n.nodeName.toLowerCase()!==a.toLowerCase()){if(!u&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(u){if(!n[fo])switch(a){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(y=n.getAttribute("rel"),y==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(y!==p.rel||n.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||n.getAttribute("title")!==(p.title==null?null:p.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(y=n.getAttribute("src"),(y!==(p.src==null?null:p.src)||n.getAttribute("type")!==(p.type==null?null:p.type)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&y&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(a==="input"&&n.type==="hidden"){var y=p.name==null?null:""+p.name;if(p.type==="hidden"&&n.getAttribute("name")===y)return n}else return n;if(n=Ar(n.nextSibling),n===null)break}return null}function vx(n,a,o){if(a==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!o||(n=Ar(n.nextSibling),n===null))return null;return n}function Q0(n,a){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!a||(n=Ar(n.nextSibling),n===null))return null;return n}function oh(n){return n.data==="$?"||n.data==="$~"}function sh(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function bx(n,a){var o=n.ownerDocument;if(n.data==="$~")n._reactRetry=a;else if(n.data!=="$?"||o.readyState!=="loading")a();else{var u=function(){a(),o.removeEventListener("DOMContentLoaded",u)};o.addEventListener("DOMContentLoaded",u),n._reactRetry=u}}function Ar(n){for(;n!=null;n=n.nextSibling){var a=n.nodeType;if(a===1||a===3)break;if(a===8){if(a=n.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return n}var lh=null;function W0(n){n=n.nextSibling;for(var a=0;n;){if(n.nodeType===8){var o=n.data;if(o==="/$"||o==="/&"){if(a===0)return Ar(n.nextSibling);a--}else o!=="$"&&o!=="$!"&&o!=="$?"&&o!=="$~"&&o!=="&"||a++}n=n.nextSibling}return null}function J0(n){n=n.previousSibling;for(var a=0;n;){if(n.nodeType===8){var o=n.data;if(o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"){if(a===0)return n;a--}else o!=="/$"&&o!=="/&"||a++}n=n.previousSibling}return null}function ev(n,a,o){switch(a=Uu(o),n){case"html":if(n=a.documentElement,!n)throw Error(i(452));return n;case"head":if(n=a.head,!n)throw Error(i(453));return n;case"body":if(n=a.body,!n)throw Error(i(454));return n;default:throw Error(i(451))}}function Ws(n){for(var a=n.attributes;a.length;)n.removeAttributeNode(a[0]);Bl(n)}var Mr=new Map,tv=new Set;function qu(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var Ra=B.d;B.d={f:Sx,r:wx,D:Ex,C:xx,L:_x,m:Tx,X:Ox,S:Cx,M:Rx};function Sx(){var n=Ra.f(),a=ku();return n||a}function wx(n){var a=Ri(n);a!==null&&a.tag===5&&a.type==="form"?vy(a):Ra.r(n)}var Uo=typeof document>"u"?null:document;function nv(n,a,o){var u=Uo;if(u&&typeof a=="string"&&a){var p=Bn(a);p='link[rel="'+n+'"][href="'+p+'"]',typeof o=="string"&&(p+='[crossorigin="'+o+'"]'),tv.has(p)||(tv.add(p),n={rel:n,crossOrigin:o,href:a},u.querySelector(p)===null&&(a=u.createElement("link"),Nn(a,"link",n),yn(a),u.head.appendChild(a)))}}function Ex(n){Ra.D(n),nv("dns-prefetch",n,null)}function xx(n,a){Ra.C(n,a),nv("preconnect",n,a)}function _x(n,a,o){Ra.L(n,a,o);var u=Uo;if(u&&n&&a){var p='link[rel="preload"][as="'+Bn(a)+'"]';a==="image"&&o&&o.imageSrcSet?(p+='[imagesrcset="'+Bn(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(p+='[imagesizes="'+Bn(o.imageSizes)+'"]')):p+='[href="'+Bn(n)+'"]';var y=p;switch(a){case"style":y=qo(n);break;case"script":y=Vo(n)}Mr.has(y)||(n=g({rel:"preload",href:a==="image"&&o&&o.imageSrcSet?void 0:n,as:a},o),Mr.set(y,n),u.querySelector(p)!==null||a==="style"&&u.querySelector(Js(y))||a==="script"&&u.querySelector(el(y))||(a=u.createElement("link"),Nn(a,"link",n),yn(a),u.head.appendChild(a)))}}function Tx(n,a){Ra.m(n,a);var o=Uo;if(o&&n){var u=a&&typeof a.as=="string"?a.as:"script",p='link[rel="modulepreload"][as="'+Bn(u)+'"][href="'+Bn(n)+'"]',y=p;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":y=Vo(n)}if(!Mr.has(y)&&(n=g({rel:"modulepreload",href:n},a),Mr.set(y,n),o.querySelector(p)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(el(y)))return}u=o.createElement("link"),Nn(u,"link",n),yn(u),o.head.appendChild(u)}}}function Cx(n,a,o){Ra.S(n,a,o);var u=Uo;if(u&&n){var p=Ai(u).hoistableStyles,y=qo(n);a=a||"default";var A=p.get(y);if(!A){var z={loading:0,preload:null};if(A=u.querySelector(Js(y)))z.loading=5;else{n=g({rel:"stylesheet",href:n,"data-precedence":a},o),(o=Mr.get(y))&&uh(n,o);var H=A=u.createElement("link");yn(H),Nn(H,"link",n),H._p=new Promise(function(oe,he){H.onload=oe,H.onerror=he}),H.addEventListener("load",function(){z.loading|=1}),H.addEventListener("error",function(){z.loading|=2}),z.loading|=4,Vu(A,a,u)}A={type:"stylesheet",instance:A,count:1,state:z},p.set(y,A)}}}function Ox(n,a){Ra.X(n,a);var o=Uo;if(o&&n){var u=Ai(o).hoistableScripts,p=Vo(n),y=u.get(p);y||(y=o.querySelector(el(p)),y||(n=g({src:n,async:!0},a),(a=Mr.get(p))&&ch(n,a),y=o.createElement("script"),yn(y),Nn(y,"link",n),o.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},u.set(p,y))}}function Rx(n,a){Ra.M(n,a);var o=Uo;if(o&&n){var u=Ai(o).hoistableScripts,p=Vo(n),y=u.get(p);y||(y=o.querySelector(el(p)),y||(n=g({src:n,async:!0,type:"module"},a),(a=Mr.get(p))&&ch(n,a),y=o.createElement("script"),yn(y),Nn(y,"link",n),o.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},u.set(p,y))}}function rv(n,a,o,u){var p=(p=ee.current)?qu(p):null;if(!p)throw Error(i(446));switch(n){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(a=qo(o.href),o=Ai(p).hoistableStyles,u=o.get(a),u||(u={type:"style",instance:null,count:0,state:null},o.set(a,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){n=qo(o.href);var y=Ai(p).hoistableStyles,A=y.get(n);if(A||(p=p.ownerDocument||p,A={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},y.set(n,A),(y=p.querySelector(Js(n)))&&!y._p&&(A.instance=y,A.state.loading=5),Mr.has(n)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},Mr.set(n,o),y||Ax(p,n,o,A.state))),a&&u===null)throw Error(i(528,""));return A}if(a&&u!==null)throw Error(i(529,""));return null;case"script":return a=o.async,o=o.src,typeof o=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=Vo(o),o=Ai(p).hoistableScripts,u=o.get(a),u||(u={type:"script",instance:null,count:0,state:null},o.set(a,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,n))}}function qo(n){return'href="'+Bn(n)+'"'}function Js(n){return'link[rel="stylesheet"]['+n+"]"}function av(n){return g({},n,{"data-precedence":n.precedence,precedence:null})}function Ax(n,a,o,u){n.querySelector('link[rel="preload"][as="style"]['+a+"]")?u.loading=1:(a=n.createElement("link"),u.preload=a,a.addEventListener("load",function(){return u.loading|=1}),a.addEventListener("error",function(){return u.loading|=2}),Nn(a,"link",o),yn(a),n.head.appendChild(a))}function Vo(n){return'[src="'+Bn(n)+'"]'}function el(n){return"script[async]"+n}function iv(n,a,o){if(a.count++,a.instance===null)switch(a.type){case"style":var u=n.querySelector('style[data-href~="'+Bn(o.href)+'"]');if(u)return a.instance=u,yn(u),u;var p=g({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return u=(n.ownerDocument||n).createElement("style"),yn(u),Nn(u,"style",p),Vu(u,o.precedence,n),a.instance=u;case"stylesheet":p=qo(o.href);var y=n.querySelector(Js(p));if(y)return a.state.loading|=4,a.instance=y,yn(y),y;u=av(o),(p=Mr.get(p))&&uh(u,p),y=(n.ownerDocument||n).createElement("link"),yn(y);var A=y;return A._p=new Promise(function(z,H){A.onload=z,A.onerror=H}),Nn(y,"link",u),a.state.loading|=4,Vu(y,o.precedence,n),a.instance=y;case"script":return y=Vo(o.src),(p=n.querySelector(el(y)))?(a.instance=p,yn(p),p):(u=o,(p=Mr.get(y))&&(u=g({},o),ch(u,p)),n=n.ownerDocument||n,p=n.createElement("script"),yn(p),Nn(p,"link",u),n.head.appendChild(p),a.instance=p);case"void":return null;default:throw Error(i(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(u=a.instance,a.state.loading|=4,Vu(u,o.precedence,n));return a.instance}function Vu(n,a,o){for(var u=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=u.length?u[u.length-1]:null,y=p,A=0;A<u.length;A++){var z=u[A];if(z.dataset.precedence===a)y=z;else if(y!==p)break}y?y.parentNode.insertBefore(n,y.nextSibling):(a=o.nodeType===9?o.head:o,a.insertBefore(n,a.firstChild))}function uh(n,a){n.crossOrigin==null&&(n.crossOrigin=a.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=a.referrerPolicy),n.title==null&&(n.title=a.title)}function ch(n,a){n.crossOrigin==null&&(n.crossOrigin=a.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=a.referrerPolicy),n.integrity==null&&(n.integrity=a.integrity)}var Fu=null;function ov(n,a,o){if(Fu===null){var u=new Map,p=Fu=new Map;p.set(o,u)}else p=Fu,u=p.get(o),u||(u=new Map,p.set(o,u));if(u.has(n))return u;for(u.set(n,null),o=o.getElementsByTagName(n),p=0;p<o.length;p++){var y=o[p];if(!(y[fo]||y[$t]||n==="link"&&y.getAttribute("rel")==="stylesheet")&&y.namespaceURI!=="http://www.w3.org/2000/svg"){var A=y.getAttribute(a)||"";A=n+A;var z=u.get(A);z?z.push(y):u.set(A,[y])}}return u}function sv(n,a,o){n=n.ownerDocument||n,n.head.insertBefore(o,a==="title"?n.querySelector("head > title"):null)}function Mx(n,a,o){if(o===1||a.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;return a.rel==="stylesheet"?(n=a.disabled,typeof a.precedence=="string"&&n==null):!0;case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function lv(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function jx(n,a,o,u){if(o.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var p=qo(u.href),y=a.querySelector(Js(p));if(y){a=y._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(n.count++,n=Bu.bind(n),a.then(n,n)),o.state.loading|=4,o.instance=y,yn(y);return}y=a.ownerDocument||a,u=av(u),(p=Mr.get(p))&&uh(u,p),y=y.createElement("link"),yn(y);var A=y;A._p=new Promise(function(z,H){A.onload=z,A.onerror=H}),Nn(y,"link",u),o.instance=y}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(o,a),(a=o.state.preload)&&(o.state.loading&3)===0&&(n.count++,o=Bu.bind(n),a.addEventListener("load",o),a.addEventListener("error",o))}}var fh=0;function kx(n,a){return n.stylesheets&&n.count===0&&Gu(n,n.stylesheets),0<n.count||0<n.imgCount?function(o){var u=setTimeout(function(){if(n.stylesheets&&Gu(n,n.stylesheets),n.unsuspend){var y=n.unsuspend;n.unsuspend=null,y()}},6e4+a);0<n.imgBytes&&fh===0&&(fh=62500*dx());var p=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&Gu(n,n.stylesheets),n.unsuspend)){var y=n.unsuspend;n.unsuspend=null,y()}},(n.imgBytes>fh?50:800)+a);return n.unsuspend=o,function(){n.unsuspend=null,clearTimeout(u),clearTimeout(p)}}:null}function Bu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Gu(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var Hu=null;function Gu(n,a){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Hu=new Map,a.forEach(Dx,n),Hu=null,Bu.call(n))}function Dx(n,a){if(!(a.state.loading&4)){var o=Hu.get(n);if(o)var u=o.get(null);else{o=new Map,Hu.set(n,o);for(var p=n.querySelectorAll("link[data-precedence],style[data-precedence]"),y=0;y<p.length;y++){var A=p[y];(A.nodeName==="LINK"||A.getAttribute("media")!=="not all")&&(o.set(A.dataset.precedence,A),u=A)}u&&o.set(null,u)}p=a.instance,A=p.getAttribute("data-precedence"),y=o.get(A)||u,y===u&&o.set(null,p),o.set(A,p),this.count++,u=Bu.bind(this),p.addEventListener("load",u),p.addEventListener("error",u),y?y.parentNode.insertBefore(p,y.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(p,n.firstChild)),a.state.loading|=4}}var tl={$$typeof:T,Provider:null,Consumer:null,_currentValue:Y,_currentValue2:Y,_threadCount:0};function Nx(n,a,o,u,p,y,A,z,H){this.tag=1,this.containerInfo=n,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=qr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qr(0),this.hiddenUpdates=qr(null),this.identifierPrefix=u,this.onUncaughtError=p,this.onCaughtError=y,this.onRecoverableError=A,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=H,this.incompleteTransitions=new Map}function uv(n,a,o,u,p,y,A,z,H,oe,he,me){return n=new Nx(n,a,o,A,H,oe,he,me,z),a=1,y===!0&&(a|=24),y=ur(3,null,null,a),n.current=y,y.stateNode=n,a=Bf(),a.refCount++,n.pooledCache=a,a.refCount++,y.memoizedState={element:u,isDehydrated:o,cache:a},Yf(y),n}function cv(n){return n?(n=bo,n):bo}function fv(n,a,o,u,p,y){p=cv(p),u.context===null?u.context=p:u.pendingContext=p,u=Ka(a),u.payload={element:o},y=y===void 0?null:y,y!==null&&(u.callback=y),o=Ya(n,u,a),o!==null&&(Jn(o,n,a),Ds(o,n,a))}function dv(n,a){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var o=n.retryLane;n.retryLane=o!==0&&o<a?o:a}}function dh(n,a){dv(n,a),(n=n.alternate)&&dv(n,a)}function hv(n){if(n.tag===13||n.tag===31){var a=$i(n,67108864);a!==null&&Jn(a,n,67108864),dh(n,67108864)}}function pv(n){if(n.tag===13||n.tag===31){var a=pr();a=Ft(a);var o=$i(n,a);o!==null&&Jn(o,n,a),dh(n,a)}}var Ku=!0;function zx(n,a,o,u){var p=K.T;K.T=null;var y=B.p;try{B.p=2,hh(n,a,o,u)}finally{B.p=y,K.T=p}}function $x(n,a,o,u){var p=K.T;K.T=null;var y=B.p;try{B.p=8,hh(n,a,o,u)}finally{B.p=y,K.T=p}}function hh(n,a,o,u){if(Ku){var p=ph(u);if(p===null)Jd(n,a,u,Yu,o),gv(n,u);else if(Ix(p,n,a,o,u))u.stopPropagation();else if(gv(n,u),a&4&&-1<Px.indexOf(n)){for(;p!==null;){var y=Ri(p);if(y!==null)switch(y.tag){case 3:if(y=y.stateNode,y.current.memoizedState.isDehydrated){var A=Dt(y.pendingLanes);if(A!==0){var z=y;for(z.pendingLanes|=2,z.entangledLanes|=2;A;){var H=1<<31-Rt(A);z.entanglements[1]|=H,A&=~H}ia(y),(yt&6)===0&&(Mu=Ue()+500,Zs(0))}}break;case 31:case 13:z=$i(y,2),z!==null&&Jn(z,y,2),ku(),dh(y,2)}if(y=ph(u),y===null&&Jd(n,a,u,Yu,o),y===p)break;p=y}p!==null&&u.stopPropagation()}else Jd(n,a,u,null,o)}}function ph(n){return n=Ye(n),mh(n)}var Yu=null;function mh(n){if(Yu=null,n=Oi(n),n!==null){var a=l(n);if(a===null)n=null;else{var o=a.tag;if(o===13){if(n=c(a),n!==null)return n;n=null}else if(o===31){if(n=f(a),n!==null)return n;n=null}else if(o===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;n=null}else a!==n&&(n=null)}}return Yu=n,null}function mv(n){switch(n){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"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(Xe()){case Mt:return 2;case Ae:return 8;case xe:case Ne:return 32;case Ke:return 268435456;default:return 32}default:return 32}}var gh=!1,ii=null,oi=null,si=null,nl=new Map,rl=new Map,li=[],Px="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 gv(n,a){switch(n){case"focusin":case"focusout":ii=null;break;case"dragenter":case"dragleave":oi=null;break;case"mouseover":case"mouseout":si=null;break;case"pointerover":case"pointerout":nl.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":rl.delete(a.pointerId)}}function al(n,a,o,u,p,y){return n===null||n.nativeEvent!==y?(n={blockedOn:a,domEventName:o,eventSystemFlags:u,nativeEvent:y,targetContainers:[p]},a!==null&&(a=Ri(a),a!==null&&hv(a)),n):(n.eventSystemFlags|=u,a=n.targetContainers,p!==null&&a.indexOf(p)===-1&&a.push(p),n)}function Ix(n,a,o,u,p){switch(a){case"focusin":return ii=al(ii,n,a,o,u,p),!0;case"dragenter":return oi=al(oi,n,a,o,u,p),!0;case"mouseover":return si=al(si,n,a,o,u,p),!0;case"pointerover":var y=p.pointerId;return nl.set(y,al(nl.get(y)||null,n,a,o,u,p)),!0;case"gotpointercapture":return y=p.pointerId,rl.set(y,al(rl.get(y)||null,n,a,o,u,p)),!0}return!1}function yv(n){var a=Oi(n.target);if(a!==null){var o=l(a);if(o!==null){if(a=o.tag,a===13){if(a=c(o),a!==null){n.blockedOn=a,$a(n.priority,function(){pv(o)});return}}else if(a===31){if(a=f(o),a!==null){n.blockedOn=a,$a(n.priority,function(){pv(o)});return}}else if(a===3&&o.stateNode.current.memoizedState.isDehydrated){n.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}n.blockedOn=null}function Zu(n){if(n.blockedOn!==null)return!1;for(var a=n.targetContainers;0<a.length;){var o=ph(n.nativeEvent);if(o===null){o=n.nativeEvent;var u=new o.constructor(o.type,o);Ie=u,o.target.dispatchEvent(u),Ie=null}else return a=Ri(o),a!==null&&hv(a),n.blockedOn=o,!1;a.shift()}return!0}function vv(n,a,o){Zu(n)&&o.delete(a)}function Lx(){gh=!1,ii!==null&&Zu(ii)&&(ii=null),oi!==null&&Zu(oi)&&(oi=null),si!==null&&Zu(si)&&(si=null),nl.forEach(vv),rl.forEach(vv)}function Xu(n,a){n.blockedOn===a&&(n.blockedOn=null,gh||(gh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Lx)))}var Qu=null;function bv(n){Qu!==n&&(Qu=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Qu===n&&(Qu=null);for(var a=0;a<n.length;a+=3){var o=n[a],u=n[a+1],p=n[a+2];if(typeof u!="function"){if(mh(u||o)===null)continue;break}var y=Ri(o);y!==null&&(n.splice(a,3),a-=3,pd(y,{pending:!0,data:p,method:o.method,action:u},u,p))}}))}function Fo(n){function a(H){return Xu(H,n)}ii!==null&&Xu(ii,n),oi!==null&&Xu(oi,n),si!==null&&Xu(si,n),nl.forEach(a),rl.forEach(a);for(var o=0;o<li.length;o++){var u=li[o];u.blockedOn===n&&(u.blockedOn=null)}for(;0<li.length&&(o=li[0],o.blockedOn===null);)yv(o),o.blockedOn===null&&li.shift();if(o=(n.ownerDocument||n).$$reactFormReplay,o!=null)for(u=0;u<o.length;u+=3){var p=o[u],y=o[u+1],A=p[sn]||null;if(typeof y=="function")A||bv(o);else if(A){var z=null;if(y&&y.hasAttribute("formAction")){if(p=y,A=y[sn]||null)z=A.formAction;else if(mh(p)!==null)continue}else z=A.action;typeof z=="function"?o[u+1]=z:(o.splice(u,3),u-=3),bv(o)}}}function Sv(){function n(y){y.canIntercept&&y.info==="react-transition"&&y.intercept({handler:function(){return new Promise(function(A){return p=A})},focusReset:"manual",scroll:"manual"})}function a(){p!==null&&(p(),p=null),u||setTimeout(o,20)}function o(){if(!u&&!navigation.transition){var y=navigation.currentEntry;y&&y.url!=null&&navigation.navigate(y.url,{state:y.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,p=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(o,100),function(){u=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),p!==null&&(p(),p=null)}}}function yh(n){this._internalRoot=n}Wu.prototype.render=yh.prototype.render=function(n){var a=this._internalRoot;if(a===null)throw Error(i(409));var o=a.current,u=pr();fv(o,u,n,a,null,null)},Wu.prototype.unmount=yh.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var a=n.containerInfo;fv(n.current,2,null,n,null,null),ku(),a[Ir]=null}};function Wu(n){this._internalRoot=n}Wu.prototype.unstable_scheduleHydration=function(n){if(n){var a=Pr();n={blockedOn:null,target:n,priority:a};for(var o=0;o<li.length&&a!==0&&a<li[o].priority;o++);li.splice(o,0,n),o===0&&yv(n)}};var wv=t.version;if(wv!=="19.2.4")throw Error(i(527,wv,"19.2.4"));B.findDOMNode=function(n){var a=n._reactInternals;if(a===void 0)throw typeof n.render=="function"?Error(i(188)):(n=Object.keys(n).join(","),Error(i(268,n)));return n=h(a),n=n!==null?m(n):null,n=n===null?null:n.stateNode,n};var Ux={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:K,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ju=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ju.isDisabled&&Ju.supportsFiber)try{Vt=Ju.inject(Ux),wt=Ju}catch{}}return xv.createRoot=function(n,a){if(!s(n))throw Error(i(299));var o=!1,u="",p=Ry,y=Ay,A=My;return a!=null&&(a.unstable_strictMode===!0&&(o=!0),a.identifierPrefix!==void 0&&(u=a.identifierPrefix),a.onUncaughtError!==void 0&&(p=a.onUncaughtError),a.onCaughtError!==void 0&&(y=a.onCaughtError),a.onRecoverableError!==void 0&&(A=a.onRecoverableError)),a=uv(n,1,!1,null,null,o,u,null,p,y,A,Sv),n[Ir]=a.current,Wd(n),new yh(a)},xv.hydrateRoot=function(n,a,o){if(!s(n))throw Error(i(299));var u=!1,p="",y=Ry,A=Ay,z=My,H=null;return o!=null&&(o.unstable_strictMode===!0&&(u=!0),o.identifierPrefix!==void 0&&(p=o.identifierPrefix),o.onUncaughtError!==void 0&&(y=o.onUncaughtError),o.onCaughtError!==void 0&&(A=o.onCaughtError),o.onRecoverableError!==void 0&&(z=o.onRecoverableError),o.formState!==void 0&&(H=o.formState)),a=uv(n,1,!0,a,o??null,u,p,H,y,A,z,Sv),a.context=cv(null),o=a.current,u=pr(),u=Ft(u),p=Ka(u),p.callback=null,Ya(o,p,u),o=u,a.current.lanes=o,ft(a,o),ia(a),n[Ir]=a.current,Wd(n),new Wu(a)},xv.version="19.2.4",xv}var W5;function JU(){if(W5)return Bx.exports;W5=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Bx.exports=WU(),Bx.exports}var eq=JU(),Em=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},tq={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},nq=class{#e=tq;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},Mh=new nq;function rq(e){setTimeout(e,0)}var Ih=typeof window>"u"||"Deno"in globalThis;function Qi(){}function aq(e,t){return typeof e=="function"?e(t):e}function BT(e){return typeof e=="number"&&e>=0&&e!==1/0}function ZN(e,t){return Math.max(e+(t||0)-Date.now(),0)}function $c(e,t){return typeof e=="function"?e(t):e}function is(e,t){return typeof e=="function"?e(t):e}function J5(e,t){const{type:r="all",exact:i,fetchStatus:s,predicate:l,queryKey:c,stale:f}=e;if(c){if(i){if(t.queryHash!==IO(c,t.options))return!1}else if(!ib(t.queryKey,c))return!1}if(r!=="all"){const d=t.isActive();if(r==="active"&&!d||r==="inactive"&&d)return!1}return!(typeof f=="boolean"&&t.isStale()!==f||s&&s!==t.state.fetchStatus||l&&!l(t))}function eM(e,t){const{exact:r,status:i,predicate:s,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(r){if(Lh(t.options.mutationKey)!==Lh(l))return!1}else if(!ib(t.options.mutationKey,l))return!1}return!(i&&t.state.status!==i||s&&!s(t))}function IO(e,t){return(t?.queryKeyHashFn||Lh)(e)}function Lh(e){return JSON.stringify(e,(t,r)=>HT(r)?Object.keys(r).sort().reduce((i,s)=>(i[s]=r[s],i),{}):r)}function ib(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>ib(e[r],t[r])):!1}var iq=Object.prototype.hasOwnProperty;function XN(e,t,r=0){if(e===t)return e;if(r>500)return t;const i=tM(e)&&tM(t);if(!i&&!(HT(e)&&HT(t)))return t;const l=(i?e:Object.keys(e)).length,c=i?t:Object.keys(t),f=c.length,d=i?new Array(f):{};let h=0;for(let m=0;m<f;m++){const g=i?m:c[m],v=e[g],w=t[g];if(v===w){d[g]=v,(i?m<l:iq.call(e,g))&&h++;continue}if(v===null||w===null||typeof v!="object"||typeof w!="object"){d[g]=w;continue}const b=XN(v,w,r+1);d[g]=b,b===v&&h++}return l===f&&h===l?e:d}function iw(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function tM(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function HT(e){if(!nM(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!nM(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function nM(e){return Object.prototype.toString.call(e)==="[object Object]"}function oq(e){return new Promise(t=>{Mh.setTimeout(t,e)})}function GT(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?XN(e,t):t}function sq(e,t,r=0){const i=[...e,t];return r&&i.length>r?i.slice(1):i}function lq(e,t,r=0){const i=[t,...e];return r&&i.length>r?i.slice(0,-1):i}var LO=Symbol();function QN(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===LO?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function UO(e,t){return typeof e=="function"?e(...t):!!e}function uq(e,t,r){let i=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??=t(),i||(i=!0,s.aborted?r():s.addEventListener("abort",r,{once:!0})),s)}),e}var cq=class extends Em{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Ih&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},qO=new cq;function KT(){let e,t;const r=new Promise((s,l)=>{e=s,t=l});r.status="pending",r.catch(()=>{});function i(s){Object.assign(r,s),delete r.resolve,delete r.reject}return r.resolve=s=>{i({status:"fulfilled",value:s}),e(s)},r.reject=s=>{i({status:"rejected",reason:s}),t(s)},r}var fq=rq;function dq(){let e=[],t=0,r=f=>{f()},i=f=>{f()},s=fq;const l=f=>{t?e.push(f):s(()=>{r(f)})},c=()=>{const f=e;e=[],f.length&&s(()=>{i(()=>{f.forEach(d=>{r(d)})})})};return{batch:f=>{let d;t++;try{d=f()}finally{t--,t||c()}return d},batchCalls:f=>(...d)=>{l(()=>{f(...d)})},schedule:l,setNotifyFunction:f=>{r=f},setBatchNotifyFunction:f=>{i=f},setScheduler:f=>{s=f}}}var ja=dq(),hq=class extends Em{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Ih&&window.addEventListener){const t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(r=>{r(e)}))}isOnline(){return this.#e}},ow=new hq;function pq(e){return Math.min(1e3*2**e,3e4)}function WN(e){return(e??"online")==="online"?ow.isOnline():!0}var YT=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function JN(e){let t=!1,r=0,i;const s=KT(),l=()=>s.status!=="pending",c=_=>{if(!l()){const x=new YT(_);v(x),e.onCancel?.(x)}},f=()=>{t=!0},d=()=>{t=!1},h=()=>qO.isFocused()&&(e.networkMode==="always"||ow.isOnline())&&e.canRun(),m=()=>WN(e.networkMode)&&e.canRun(),g=_=>{l()||(i?.(),s.resolve(_))},v=_=>{l()||(i?.(),s.reject(_))},w=()=>new Promise(_=>{i=x=>{(l()||h())&&_(x)},e.onPause?.()}).then(()=>{i=void 0,l()||e.onContinue?.()}),b=()=>{if(l())return;let _;const x=r===0?e.initialPromise:void 0;try{_=x??e.fn()}catch(R){_=Promise.reject(R)}Promise.resolve(_).then(g).catch(R=>{if(l())return;const S=e.retry??(Ih?0:3),T=e.retryDelay??pq,E=typeof T=="function"?T(r,R):T,O=S===!0||typeof S=="number"&&r<S||typeof S=="function"&&S(r,R);if(t||!O){v(R);return}r++,e.onFail?.(r,R),oq(E).then(()=>h()?void 0:w()).then(()=>{t?v(R):b()})})};return{promise:s,status:()=>s.status,cancel:c,continue:()=>(i?.(),s),cancelRetry:f,continueRetry:d,canStart:m,start:()=>(m()?b():w().then(b),s)}}var ez=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),BT(this.gcTime)&&(this.#e=Mh.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ih?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Mh.clearTimeout(this.#e),this.#e=void 0)}},mq=class extends ez{#e;#t;#n;#a;#r;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#a=e.client,this.#n=this.#a.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=aM(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#o,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=aM(this.options);t.data!==void 0&&(this.setState(rM(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const r=GT(this.state.data,e,this.options);return this.#i({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),r}setState(e,t){this.#i({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Qi).catch(Qi):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>is(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===LO||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>$c(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!ZN(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#s?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const f=this.observers.find(d=>d.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,i=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(this.#s=!0,r.signal)})},s=()=>{const f=QN(this.options,t),h=(()=>{const m={client:this.#a,queryKey:this.queryKey,meta:this.meta};return i(m),m})();return this.#s=!1,this.options.persister?this.options.persister(f,h,this):f(h)},c=(()=>{const f={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#a,state:this.state,fetchFn:s};return i(f),f})();this.options.behavior?.onFetch(c,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#i({type:"fetch",meta:c.fetchOptions?.meta}),this.#r=JN({initialPromise:t?.initialPromise,fn:c.fetchFn,onCancel:f=>{f instanceof YT&&f.revert&&this.setState({...this.#t,fetchStatus:"idle"}),r.abort()},onFail:(f,d)=>{this.#i({type:"failed",failureCount:f,error:d})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0});try{const f=await this.#r.start();if(f===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(f),this.#n.config.onSuccess?.(f,this),this.#n.config.onSettled?.(f,this.state.error,this),f}catch(f){if(f instanceof YT){if(f.silent)return this.#r.promise;if(f.revert){if(this.state.data===void 0)throw f;return this.state.data}}throw this.#i({type:"error",error:f}),this.#n.config.onError?.(f,this),this.#n.config.onSettled?.(this.state.data,f,this),f}finally{this.scheduleGc()}}#i(e){const t=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...tz(r.data,this.options),fetchMeta:e.meta??null};case"success":const i={...r,...rM(e.data,e.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?i:void 0,i;case"error":const s=e.error;return{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=t(this.state),ja.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function tz(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:WN(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function rM(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function aM(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,i=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var gq=class extends Em{constructor(e,t){super(),this.options=t,this.#e=e,this.#i=null,this.#s=KT(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#a=void 0;#r;#o;#s;#i;#m;#d;#h;#u;#c;#l;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),iM(this.#t,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ZT(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ZT(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#S(),this.#w(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,r=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof is(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#E(),this.#t.setOptions(this.options),t._defaulted&&!iw(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const i=this.hasListeners();i&&oM(this.#t,r,this.options,t)&&this.#f(),this.updateResult(),i&&(this.#t!==r||is(this.options.enabled,this.#t)!==is(t.enabled,this.#t)||$c(this.options.staleTime,this.#t)!==$c(t.staleTime,this.#t))&&this.#g();const s=this.#y();i&&(this.#t!==r||is(this.options.enabled,this.#t)!==is(t.enabled,this.#t)||s!==this.#l)&&this.#v(s)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),r=this.createResult(t,e);return vq(this,r)&&(this.#a=r,this.#o=this.options,this.#r=this.#t.state),r}getCurrentResult(){return this.#a}trackResult(e,t){return new Proxy(e,{get:(r,i)=>(this.trackProp(i),t?.(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#s.status==="pending"&&this.#s.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,i))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),r=this.#e.getQueryCache().build(this.#e,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#f({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#a))}#f(e){this.#E();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Qi)),t}#g(){this.#S();const e=$c(this.options.staleTime,this.#t);if(Ih||this.#a.isStale||!BT(e))return;const r=ZN(this.#a.dataUpdatedAt,e)+1;this.#u=Mh.setTimeout(()=>{this.#a.isStale||this.updateResult()},r)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#w(),this.#l=e,!(Ih||is(this.options.enabled,this.#t)===!1||!BT(this.#l)||this.#l===0)&&(this.#c=Mh.setInterval(()=>{(this.options.refetchIntervalInBackground||qO.isFocused())&&this.#f()},this.#l))}#b(){this.#g(),this.#v(this.#y())}#S(){this.#u&&(Mh.clearTimeout(this.#u),this.#u=void 0)}#w(){this.#c&&(Mh.clearInterval(this.#c),this.#c=void 0)}createResult(e,t){const r=this.#t,i=this.options,s=this.#a,l=this.#r,c=this.#o,d=e!==r?e.state:this.#n,{state:h}=e;let m={...h},g=!1,v;if(t._optimisticResults){const D=this.hasListeners(),$=!D&&iM(e,t),q=D&&oM(e,r,t,i);($||q)&&(m={...m,...tz(h.data,e.options)}),t._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:w,errorUpdatedAt:b,status:_}=m;v=m.data;let x=!1;if(t.placeholderData!==void 0&&v===void 0&&_==="pending"){let D;s?.isPlaceholderData&&t.placeholderData===c?.placeholderData?(D=s.data,x=!0):D=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,D!==void 0&&(_="success",v=GT(s?.data,D,t),g=!0)}if(t.select&&v!==void 0&&!x)if(s&&v===l?.data&&t.select===this.#m)v=this.#d;else try{this.#m=t.select,v=t.select(v),v=GT(s?.data,v,t),this.#d=v,this.#i=null}catch(D){this.#i=D}this.#i&&(w=this.#i,v=this.#d,b=Date.now(),_="error");const R=m.fetchStatus==="fetching",S=_==="pending",T=_==="error",E=S&&R,O=v!==void 0,M={status:_,fetchStatus:m.fetchStatus,isPending:S,isSuccess:_==="success",isError:T,isInitialLoading:E,isLoading:E,data:v,dataUpdatedAt:m.dataUpdatedAt,error:w,errorUpdatedAt:b,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>d.dataUpdateCount||m.errorUpdateCount>d.errorUpdateCount,isFetching:R,isRefetching:R&&!S,isLoadingError:T&&!O,isPaused:m.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:T&&O,isStale:VO(e,t),refetch:this.refetch,promise:this.#s,isEnabled:is(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const D=M.data!==void 0,$=M.status==="error"&&!D,q=F=>{$?F.reject(M.error):D&&F.resolve(M.data)},L=()=>{const F=this.#s=M.promise=KT();q(F)},V=this.#s;switch(V.status){case"pending":e.queryHash===r.queryHash&&q(V);break;case"fulfilled":($||M.data!==V.value)&&L();break;case"rejected":(!$||M.error!==V.reason)&&L();break}}return M}updateResult(){const e=this.#a,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#o=this.options,this.#r.data!==void 0&&(this.#h=this.#t),iw(t,e))return;this.#a=t;const r=()=>{if(!e)return!0;const{notifyOnChangeProps:i}=this.options,s=typeof i=="function"?i():i;if(s==="all"||!s&&!this.#p.size)return!0;const l=new Set(s??this.#p);return this.options.throwOnError&&l.add("error"),Object.keys(this.#a).some(c=>{const f=c;return this.#a[f]!==e[f]&&l.has(f)})};this.#x({listeners:r()})}#E(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#x(e){ja.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#a)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function yq(e,t){return is(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function iM(e,t){return yq(e,t)||e.state.data!==void 0&&ZT(e,t,t.refetchOnMount)}function ZT(e,t,r){if(is(t.enabled,e)!==!1&&$c(t.staleTime,e)!=="static"){const i=typeof r=="function"?r(e):r;return i==="always"||i!==!1&&VO(e,t)}return!1}function oM(e,t,r,i){return(e!==t||is(i.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&VO(e,r)}function VO(e,t){return is(t.enabled,e)!==!1&&e.isStaleByTime($c(t.staleTime,e))}function vq(e,t){return!iw(e.getCurrentResult(),t)}function sM(e){return{onFetch:(t,r)=>{const i=t.options,s=t.fetchOptions?.meta?.fetchMore?.direction,l=t.state.data?.pages||[],c=t.state.data?.pageParams||[];let f={pages:[],pageParams:[]},d=0;const h=async()=>{let m=!1;const g=b=>{uq(b,()=>t.signal,()=>m=!0)},v=QN(t.options,t.fetchOptions),w=async(b,_,x)=>{if(m)return Promise.reject();if(_==null&&b.pages.length)return Promise.resolve(b);const S=(()=>{const C={client:t.client,queryKey:t.queryKey,pageParam:_,direction:x?"backward":"forward",meta:t.options.meta};return g(C),C})(),T=await v(S),{maxPages:E}=t.options,O=x?lq:sq;return{pages:O(b.pages,T,E),pageParams:O(b.pageParams,_,E)}};if(s&&l.length){const b=s==="backward",_=b?bq:lM,x={pages:l,pageParams:c},R=_(i,x);f=await w(x,R,b)}else{const b=e??l.length;do{const _=d===0?c[0]??i.initialPageParam:lM(i,f);if(d>0&&_==null)break;f=await w(f,_),d++}while(d<b)}return f};t.options.persister?t.fetchFn=()=>t.options.persister?.(h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=h}}}function lM(e,{pages:t,pageParams:r}){const i=t.length-1;return t.length>0?e.getNextPageParam(t[i],t,r[i],r):void 0}function bq(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}var Sq=class extends ez{#e;#t;#n;#a;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||nz(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#a?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#a=JN({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(new Error("No mutationFn found")),onFail:(l,c)=>{this.#r({type:"failed",failureCount:l,error:c})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const i=this.state.status==="pending",s=!this.#a.canStart();try{if(i)t();else{this.#r({type:"pending",variables:e,isPaused:s}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,r);const c=await this.options.onMutate?.(e,r);c!==this.state.context&&this.#r({type:"pending",context:c,variables:e,isPaused:s})}const l=await this.#a.start();return await this.#n.config.onSuccess?.(l,e,this.state.context,this,r),await this.options.onSuccess?.(l,e,this.state.context,r),await this.#n.config.onSettled?.(l,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(l,null,e,this.state.context,r),this.#r({type:"success",data:l}),l}catch(l){try{await this.#n.config.onError?.(l,e,this.state.context,this,r)}catch(c){Promise.reject(c)}try{await this.options.onError?.(l,e,this.state.context,r)}catch(c){Promise.reject(c)}try{await this.#n.config.onSettled?.(void 0,l,this.state.variables,this.state.context,this,r)}catch(c){Promise.reject(c)}try{await this.options.onSettled?.(void 0,l,e,this.state.context,r)}catch(c){Promise.reject(c)}throw this.#r({type:"error",error:l}),l}finally{this.#n.runNext(this)}}#r(e){const t=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),ja.batch(()=>{this.#t.forEach(r=>{r.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function nz(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var wq=class extends Em{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,r){const i=new Sq({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:r});return this.add(i),i}add(e){this.#e.add(e);const t=m1(e);if(typeof t=="string"){const r=this.#t.get(t);r?r.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=m1(e);if(typeof t=="string"){const r=this.#t.get(t);if(r)if(r.length>1){const i=r.indexOf(e);i!==-1&&r.splice(i,1)}else r[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=m1(e);if(typeof t=="string"){const i=this.#t.get(t)?.find(s=>s.state.status==="pending");return!i||i===e}else return!0}runNext(e){const t=m1(e);return typeof t=="string"?this.#t.get(t)?.find(i=>i!==e&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){ja.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(r=>eM(t,r))}findAll(e={}){return this.getAll().filter(t=>eM(e,t))}notify(e){ja.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return ja.batch(()=>Promise.all(e.map(t=>t.continue().catch(Qi))))}};function m1(e){return e.options.scope?.id}var Eq=class extends Em{#e;#t=void 0;#n;#a;constructor(t,r){super(),this.#e=t,this.setOptions(r),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const r=this.options;this.options=this.#e.defaultMutationOptions(t),iw(this.options,r)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),r?.mutationKey&&this.options.mutationKey&&Lh(r.mutationKey)!==Lh(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#o(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#o()}mutate(t,r){return this.#a=r,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(t)}#r(){const t=this.#n?.state??nz();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){ja.batch(()=>{if(this.#a&&this.hasListeners()){const r=this.#t.variables,i=this.#t.context,s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#a.onSuccess?.(t.data,r,i,s)}catch(l){Promise.reject(l)}try{this.#a.onSettled?.(t.data,null,r,i,s)}catch(l){Promise.reject(l)}}else if(t?.type==="error"){try{this.#a.onError?.(t.error,r,i,s)}catch(l){Promise.reject(l)}try{this.#a.onSettled?.(void 0,t.error,r,i,s)}catch(l){Promise.reject(l)}}}this.listeners.forEach(r=>{r(this.#t)})})}},xq=class extends Em{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,r){const i=t.queryKey,s=t.queryHash??IO(i,t);let l=this.get(s);return l||(l=new mq({client:e,queryKey:i,queryHash:s,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(l)),l}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){ja.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(r=>J5(t,r))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(r=>J5(e,r)):t}notify(e){ja.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){ja.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){ja.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},_q=class{#e;#t;#n;#a;#r;#o;#s;#i;constructor(e={}){this.#e=e.queryCache||new xq,this.#t=e.mutationCache||new wq,this.#n=e.defaultOptions||{},this.#a=new Map,this.#r=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#s=qO.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=ow.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#s?.(),this.#s=void 0,this.#i?.(),this.#i=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=this.#e.build(this,t),i=r.state.data;return i===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime($c(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:r})=>{const i=r.data;return[t,i]})}setQueryData(e,t,r){const i=this.defaultQueryOptions({queryKey:e}),l=this.#e.get(i.queryHash)?.state.data,c=aq(t,l);if(c!==void 0)return this.#e.build(this,i).setData(c,{...r,manual:!0})}setQueriesData(e,t,r){return ja.batch(()=>this.#e.findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,t,r)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;ja.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=this.#e;return ja.batch(()=>(r.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},i=ja.batch(()=>this.#e.findAll(e).map(s=>s.cancel(r)));return Promise.all(i).then(Qi).catch(Qi)}invalidateQueries(e,t={}){return ja.batch(()=>(this.#e.findAll(e).forEach(r=>{r.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},i=ja.batch(()=>this.#e.findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let l=s.fetch(void 0,r);return r.throwOnError||(l=l.catch(Qi)),s.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(i).then(Qi)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=this.#e.build(this,t);return r.isStaleByTime($c(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Qi).catch(Qi)}fetchInfiniteQuery(e){return e.behavior=sM(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Qi).catch(Qi)}ensureInfiniteQueryData(e){return e.behavior=sM(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return ow.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#a.set(Lh(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#a.values()],r={};return t.forEach(i=>{ib(e,i.queryKey)&&Object.assign(r,i.defaultOptions)}),r}setMutationDefaults(e,t){this.#r.set(Lh(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],r={};return t.forEach(i=>{ib(e,i.mutationKey)&&Object.assign(r,i.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=IO(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===LO&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},rz=j.createContext(void 0),az=e=>{const t=j.useContext(rz);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Tq=({client:e,children:t})=>(j.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),k.jsx(rz.Provider,{value:e,children:t})),iz=j.createContext(!1),Cq=()=>j.useContext(iz);iz.Provider;function Oq(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Rq=j.createContext(Oq()),Aq=()=>j.useContext(Rq),Mq=(e,t,r)=>{const i=r?.state.error&&typeof e.throwOnError=="function"?UO(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||i)&&(t.isReset()||(e.retryOnMount=!1))},jq=e=>{j.useEffect(()=>{e.clearReset()},[e])},kq=({result:e,errorResetBoundary:t,throwOnError:r,query:i,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&i&&(s&&e.data===void 0||UO(r,[e.error,i])),Dq=(e,t)=>t.state.data===void 0,Nq=e=>{if(e.suspense){const r=s=>s==="static"?s:Math.max(s??1e3,1e3),i=e.staleTime;e.staleTime=typeof i=="function"?(...s)=>r(i(...s)):r(i),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},zq=(e,t)=>e.isLoading&&e.isFetching&&!t,$q=(e,t)=>e?.suspense&&t.isPending,uM=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function Pq(e,t,r){const i=Cq(),s=Aq(),l=az(),c=l.defaultQueryOptions(e);l.getDefaultOptions().queries?._experimental_beforeQuery?.(c);const f=l.getQueryCache().get(c.queryHash);c._optimisticResults=i?"isRestoring":"optimistic",Nq(c),Mq(c,s,f),jq(s);const d=!l.getQueryCache().get(c.queryHash),[h]=j.useState(()=>new t(l,c)),m=h.getOptimisticResult(c),g=!i&&e.subscribed!==!1;if(j.useSyncExternalStore(j.useCallback(v=>{const w=g?h.subscribe(ja.batchCalls(v)):Qi;return h.updateResult(),w},[h,g]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),j.useEffect(()=>{h.setOptions(c)},[c,h]),$q(c,m))throw uM(c,h,s);if(kq({result:m,errorResetBoundary:s,throwOnError:c.throwOnError,query:f,suspense:c.suspense}))throw m.error;return l.getDefaultOptions().queries?._experimental_afterQuery?.(c,m),c.experimental_prefetchInRender&&!Ih&&zq(m,i)&&(d?uM(c,h,s):f?.promise)?.catch(Qi).finally(()=>{h.updateResult()}),c.notifyOnChangeProps?m:h.trackResult(m)}function oz(e,t){return Pq({...e,enabled:!0,suspense:!0,throwOnError:Dq,placeholderData:void 0},gq)}function Iq(e,t){const r=az(),[i]=j.useState(()=>new Eq(r,e));j.useEffect(()=>{i.setOptions(e)},[i,e]);const s=j.useSyncExternalStore(j.useCallback(c=>i.subscribe(ja.batchCalls(c)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),l=j.useCallback((c,f)=>{i.mutate(c,f).catch(Qi)},[i]);if(s.error&&UO(i.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:l,mutateAsync:s.mutate}}const FO=qq();function Lr(e,...t){if(!FO)return;const r=Uq(e,...t);performance.mark(r);try{console.log(e,...t)}catch{console.log(r)}}function Lq(e,...t){FO&&console.warn(e,...t)}function Uq(e,...t){return e.replace(/%[sfdO]/g,r=>{const i=t.shift();return r==="%O"&&i?JSON.stringify(i).replace(/"([^"]+)":/g,"$1:"):String(i)})}function qq(){try{const e="nuqs-localStorage-test";if(typeof localStorage>"u")return!1;localStorage.setItem(e,e);const t=localStorage.getItem(e)===e;return localStorage.removeItem(e),t&&(localStorage.getItem("debug")||"").includes("nuqs")}catch{return!1}}const Vq={303:"Multiple adapter contexts detected. This might happen in monorepos.",404:"nuqs requires an adapter to work with your framework.",409:"Multiple versions of the library are loaded. This may lead to unexpected behavior. Currently using `%s`, but `%s` (via the %s adapter) was about to load on top.",414:"Max safe URL length exceeded. Some browsers may not be able to accept this URL. Consider limiting the amount of state stored in the URL.",422:"Invalid options combination: `limitUrlUpdates: debounce` should be used in SSR scenarios, with `shallow: false`",429:"URL update rate-limited by the browser. Consider increasing `throttleMs` for key(s) `%s`. %O",500:"Empty search params cache. Search params can't be accessed in Layouts.",501:"Search params cache already populated. Have you called `parse` twice?"};function zb(e){return`[nuqs] ${Vq[e]}
10
+ See https://nuqs.dev/NUQS-${e}`}function Fq(e){if(e.size===0)return"";const t=[];for(const[i,s]of e.entries()){const l=i.replace(/#/g,"%23").replace(/&/g,"%26").replace(/\+/g,"%2B").replace(/=/g,"%3D").replace(/\?/g,"%3F");t.push(`${l}=${Bq(s)}`)}return"?"+t.join("&")}function Bq(e){return e.replace(/%/g,"%25").replace(/\+/g,"%2B").replace(/ /g,"+").replace(/#/g,"%23").replace(/&/g,"%26").replace(/"/g,"%22").replace(/'/g,"%27").replace(/`/g,"%60").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/[\x00-\x1F]/g,t=>encodeURIComponent(t))}const Uh=j.createContext({useAdapter(){throw new Error(zb(404))}});Uh.displayName="NuqsAdapterContext";FO&&typeof window<"u"&&(window.__NuqsAdapterContext&&window.__NuqsAdapterContext!==Uh&&console.error(zb(303)),window.__NuqsAdapterContext=Uh);function Hq(e){return({children:t,defaultOptions:r,processUrlSearchParams:i,...s})=>j.createElement(Uh.Provider,{...s,value:{useAdapter:e,defaultOptions:r,processUrlSearchParams:i}},t)}function Gq(e){const t=j.useContext(Uh);if(!("useAdapter"in t))throw new Error(zb(404));return t.useAdapter(e)}const Kq=()=>j.useContext(Uh).defaultOptions,Yq=()=>j.useContext(Uh).processUrlSearchParams;function Zq(){if(typeof window>"u"||!window.GestureEvent)return 50;try{const e=navigator.userAgent?.match(/version\/([\d\.]+) safari/i);return parseFloat(e[1])>=17?120:320}catch{return 320}}function Xq(e){return{method:"throttle",timeMs:e}}const Bv=Xq(Zq());function Qq(e){return e===null||Array.isArray(e)&&e.length===0}function Wq(e,t,r){if(typeof e=="string")r.set(t,e);else{r.delete(t);for(const i of e)r.append(t,i);r.has(t)||r.set(t,"")}return r}function BO(){const e=new Map;return{on(t,r){const i=e.get(t)||[];return i.push(r),e.set(t,i),()=>this.off(t,r)},off(t,r){const i=e.get(t);i&&e.set(t,i.filter(s=>s!==r))},emit(t,r){e.get(t)?.forEach(i=>i(r))}}}function XT(e,t,r){function i(){e(),r.removeEventListener("abort",l)}const s=setTimeout(i,t);function l(){clearTimeout(s),r.removeEventListener("abort",l)}r.addEventListener("abort",l)}function QT(){const e=Promise;if(Promise.hasOwnProperty("withResolvers"))return Promise.withResolvers();let t=()=>{},r=()=>{};return{promise:new e((i,s)=>{t=i,r=s}),resolve:t,reject:r}}function Jq(e,t){let r=t;for(let i=e.length-1;i>=0;i--){const s=e[i];if(!s)continue;const l=r;r=()=>s(l)}r()}function WT(){return new URLSearchParams(location.search)}var sz=class{updateMap=new Map;options={history:"replace",scroll:!1,shallow:!0};timeMs=Bv.timeMs;transitions=new Set;resolvers=null;controller=null;lastFlushedAt=0;resetQueueOnNextPush=!1;push({key:e,query:t,options:r},i=Bv.timeMs){this.resetQueueOnNextPush&&(this.reset(),this.resetQueueOnNextPush=!1),Lr("[nuqs gtq] Enqueueing %s=%s %O",e,t,r),this.updateMap.set(e,t),r.history==="push"&&(this.options.history="push"),r.scroll&&(this.options.scroll=!0),r.shallow===!1&&(this.options.shallow=!1),r.startTransition&&this.transitions.add(r.startTransition),(!Number.isFinite(this.timeMs)||i>this.timeMs)&&(this.timeMs=i)}getQueuedQuery(e){return this.updateMap.get(e)}getPendingPromise({getSearchParamsSnapshot:e=WT}){return this.resolvers?.promise??Promise.resolve(e())}flush({getSearchParamsSnapshot:e=WT,rateLimitFactor:t=1,...r},i){if(this.controller??=new AbortController,!Number.isFinite(this.timeMs))return Lr("[nuqs gtq] Skipping flush due to throttleMs=Infinity"),Promise.resolve(e());if(this.resolvers)return this.resolvers.promise;this.resolvers=QT();const s=()=>{this.lastFlushedAt=performance.now();const[c,f]=this.applyPendingUpdates({...r,autoResetQueueOnUpdate:r.autoResetQueueOnUpdate??!0,getSearchParamsSnapshot:e},i);f===null?(this.resolvers.resolve(c),this.resetQueueOnNextPush=!0):this.resolvers.reject(c),this.resolvers=null};return XT(()=>{const c=performance.now()-this.lastFlushedAt,f=this.timeMs,d=t*Math.max(0,f-c);Lr("[nuqs gtq] Scheduling flush in %f ms. Throttled at %f ms (x%f)",d,f,t),d===0?s():XT(s,d,this.controller.signal)},0,this.controller.signal),this.resolvers.promise}abort(){return this.controller?.abort(),this.controller=new AbortController,this.resolvers?.resolve(new URLSearchParams),this.resolvers=null,this.reset()}reset(){const e=Array.from(this.updateMap.keys());return Lr("[nuqs gtq] Resetting queue %s",JSON.stringify(Object.fromEntries(this.updateMap))),this.updateMap.clear(),this.transitions.clear(),this.options={history:"replace",scroll:!1,shallow:!0},this.timeMs=Bv.timeMs,e}applyPendingUpdates(e,t){const{updateUrl:r,getSearchParamsSnapshot:i}=e;let s=i();if(Lr("[nuqs gtq] Applying %d pending update(s) on top of %s",this.updateMap.size,s.toString()),this.updateMap.size===0)return[s,null];const l=Array.from(this.updateMap.entries()),c={...this.options},f=Array.from(this.transitions);e.autoResetQueueOnUpdate&&this.reset(),Lr("[nuqs gtq] Flushing queue %O with options %O",l,c);for(const[d,h]of l)h===null?s.delete(d):s=Wq(h,d,s);t&&(s=t(s));try{return Jq(f,()=>{r(s,c)}),[s,null]}catch(d){return console.error(zb(429),l.map(([h])=>h).join(),d),[s,d]}}};const NS=new sz;function eV(e,t,r){const i=j.useCallback(()=>{const l=Object.fromEntries(e.map(c=>[c,r(c)]));return[JSON.stringify(l),l]},[e.join(","),r]),s=j.useRef(null);return s.current===null&&(s.current=i()),j.useSyncExternalStore(j.useCallback(l=>{const c=e.map(f=>t(f,l));return()=>c.forEach(f=>f())},[e.join(","),t]),()=>{const[l,c]=i();return s.current[0]===l?s.current[1]:(s.current=[l,c],c)},()=>s.current[1])}var tV=class{callback;resolvers=QT();controller=new AbortController;queuedValue=void 0;constructor(e){this.callback=e}abort(){this.controller.abort(),this.queuedValue=void 0}push(e,t){return this.queuedValue=e,this.controller.abort(),this.controller=new AbortController,XT(()=>{const r=this.resolvers;try{Lr("[nuqs dq] Flushing debounce queue",e);const i=this.callback(e);Lr("[nuqs dq] Reset debounce queue %O",this.queuedValue),this.queuedValue=void 0,this.resolvers=QT(),i.then(s=>r.resolve(s)).catch(s=>r.reject(s))}catch(i){this.queuedValue=void 0,r.reject(i)}},t,this.controller.signal),this.resolvers.promise}},nV=class{throttleQueue;queues=new Map;queuedQuerySync=BO();constructor(e=new sz){this.throttleQueue=e}useQueuedQueries(e){return eV(e,(t,r)=>this.queuedQuerySync.on(t,r),t=>this.getQueuedQuery(t))}push(e,t,r,i){if(!Number.isFinite(t)){const c=r.getSearchParamsSnapshot??WT;return Promise.resolve(c())}const s=e.key;if(!this.queues.has(s)){Lr("[nuqs dqc] Creating debounce queue for `%s`",s);const c=new tV(f=>(this.throttleQueue.push(f),this.throttleQueue.flush(r,i).finally(()=>{this.queues.get(f.key)?.queuedValue===void 0&&(Lr("[nuqs dqc] Cleaning up empty queue for `%s`",f.key),this.queues.delete(f.key)),this.queuedQuerySync.emit(f.key)})));this.queues.set(s,c)}Lr("[nuqs dqc] Enqueueing debounce update %O",e);const l=this.queues.get(s).push(e,t);return this.queuedQuerySync.emit(s),l}abort(e){const t=this.queues.get(e);return t?(Lr("[nuqs dqc] Aborting debounce queue %s=%s",e,t.queuedValue?.query),this.queues.delete(e),t.abort(),this.queuedQuerySync.emit(e),r=>(r.then(t.resolvers.resolve,t.resolvers.reject),r)):r=>r}abortAll(){for(const[e,t]of this.queues.entries())Lr("[nuqs dqc] Aborting debounce queue %s=%s",e,t.queuedValue?.query),t.abort(),t.resolvers.resolve(new URLSearchParams),this.queuedQuerySync.emit(e);this.queues.clear()}getQueuedQuery(e){const t=this.queues.get(e)?.queuedValue?.query;return t!==void 0?t:this.throttleQueue.getQueuedQuery(e)}};const Yx=new nV(NS);function lz(e,t){return e===t?!0:e===null||t===null||typeof e=="string"||typeof t=="string"||e.length!==t.length?!1:e.every((r,i)=>r===t[i])}function cM(e,t,r){return i=>{if(!(t.length===0||t.some(l=>!lz(i.getAll(l),e.getAll(l)))))return Lr("[nuqs `%s`] no change, returning previous",t.join(","),i),i;const s=uz(e,t,r);return Lr("[nuqs `%s`] subbed search params change\n from %O\n to %O",t.join(","),i,s),s}}function uz(e,t,r){if(t.length===0)return e;const i=r?new URLSearchParams(e):e;for(const s of e.keys())t.includes(s)||i.delete(s);return i}const rV="__nuqs__",JT=BO();function aV(e){return function(r,i){const s=new URL(location.href);s.search=Fq(r),Lr("[nuqs react] Updating url: %s",s),e&&i.shallow===!1?(i.history==="push"?location.assign:location.replace).call(location,s):(i.history==="push"?history.pushState:history.replaceState).call(history,history.state,rV,s),JT.emit("update",r),i.scroll===!0&&window.scrollTo({top:0})}}const cz=j.createContext({fullPageNavigationOnShallowFalseUpdates:!1});function iV(e){const{fullPageNavigationOnShallowFalseUpdates:t}=j.useContext(cz),[r,i]=j.useState(()=>typeof location>"u"?new URLSearchParams:uz(new URLSearchParams(location.search),e,!1));return j.useEffect(()=>{const s=()=>{i(cM(new URLSearchParams(location.search),e,!1))},l=c=>{i(cM(c,e,!0))};return JT.on("update",l),window.addEventListener("popstate",s),()=>{JT.off("update",l),window.removeEventListener("popstate",s)}},[e.join("&")]),{searchParams:r,updateUrl:j.useMemo(()=>aV(t),[t])}}const oV=Hq(iV);function sV({children:e,fullPageNavigationOnShallowFalseUpdates:t=!1,...r}){return j.createElement(cz.Provider,{value:{fullPageNavigationOnShallowFalseUpdates:t}},j.createElement(oV,{...r,children:e}))}function tr(e,t="Assertion error"){if(!e)throw Error(t)}function tm({group:e}){const{orientation:t,panels:r}=e;return r.reduce((i,s)=>(i+=t==="horizontal"?s.element.offsetWidth:s.element.offsetHeight,i),0)}function eC(e,t){return Array.from(t).sort(e==="horizontal"?lV:uV)}function lV(e,t){const r=e.element.offsetLeft-t.element.offsetLeft;return r!==0?r:e.element.offsetWidth-t.element.offsetWidth}function uV(e,t){const r=e.element.offsetTop-t.element.offsetTop;return r!==0?r:e.element.offsetHeight-t.element.offsetHeight}function fz(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function dz(e,t){return{x:e.x>=t.left&&e.x<=t.right?0:Math.min(Math.abs(e.x-t.left),Math.abs(e.x-t.right)),y:e.y>=t.top&&e.y<=t.bottom?0:Math.min(Math.abs(e.y-t.top),Math.abs(e.y-t.bottom))}}function cV({orientation:e,rects:t,targetRect:r}){const i={x:r.x+r.width/2,y:r.y+r.height/2};let s,l=Number.MAX_VALUE;for(const c of t){const{x:f,y:d}=dz(i,c),h=e==="horizontal"?f:d;h<l&&(l=h,s=c)}return tr(s,"No rect found"),s}let g1;function fV(){return g1===void 0&&(typeof matchMedia=="function"?g1=!!matchMedia("(pointer:coarse)").matches:g1=!1),g1}function hz(e){const{element:t,orientation:r,panels:i,separators:s}=e,l=eC(r,Array.from(t.children).filter(fz).map(v=>({element:v}))).map(({element:v})=>v),c=[];let f=!1,d=!1,h=!1,m,g=[];for(const v of l)if(v.hasAttribute("data-panel")){v.ariaDisabled!==null&&(f=!0);const w=i.find(b=>b.element===v);if(w){if(m){const b=m.element.getBoundingClientRect(),_=v.getBoundingClientRect();let x;if(h){const R=r==="horizontal"?new DOMRect(b.right,b.top,0,b.height):new DOMRect(b.left,b.bottom,b.width,0),S=r==="horizontal"?new DOMRect(_.left,_.top,0,_.height):new DOMRect(_.left,_.top,_.width,0);switch(g.length){case 0:{x=[R,S];break}case 1:{const T=g[0],E=cV({orientation:r,rects:[b,_],targetRect:T.element.getBoundingClientRect()});x=[T,E===b?S:R];break}default:{x=g;break}}}else g.length?x=g:x=[r==="horizontal"?new DOMRect(b.right,_.top,_.left-b.right,_.height):new DOMRect(_.left,b.bottom,_.width,_.top-b.bottom)];for(const R of x){let S="width"in R?R:R.element.getBoundingClientRect();const T=fV()?e.resizeTargetMinimumSize.coarse:e.resizeTargetMinimumSize.fine;if(S.width<T){const O=T-S.width;S=new DOMRect(S.x-O/2,S.y,S.width+O,S.height)}if(S.height<T){const O=T-S.height;S=new DOMRect(S.x,S.y-O/2,S.width,S.height+O)}const E=!("width"in R);c.push({disabled:d||f&&!E,group:e,groupSize:tm({group:e}),panels:[m,w],separator:"width"in R?void 0:R,rect:S}),f=!1,d=!1}}h=!1,m=w,g=[]}}else if(v.hasAttribute("data-separator")){v.ariaDisabled!==null&&(d=!0);const w=s.find(b=>b.element===v);w?g.push(w):(m=void 0,g=[])}else h=!0;return c}function dV(e,t){const r=getComputedStyle(e),i=parseFloat(r.fontSize);return t*i}function hV(e,t){const r=getComputedStyle(e.ownerDocument.body),i=parseFloat(r.fontSize);return t*i}function pV(e){return e/100*window.innerHeight}function mV(e){return e/100*window.innerWidth}function gV(e){switch(typeof e){case"number":return[e,"px"];case"string":{const t=parseFloat(e);return e.endsWith("%")?[t,"%"]:e.endsWith("px")?[t,"px"]:e.endsWith("rem")?[t,"rem"]:e.endsWith("em")?[t,"em"]:e.endsWith("vh")?[t,"vh"]:e.endsWith("vw")?[t,"vw"]:[t,"%"]}}}function y1({groupSize:e,panelElement:t,styleProp:r}){let i;const[s,l]=gV(r);switch(l){case"%":{i=s/100*e;break}case"px":{i=s;break}case"rem":{i=hV(t,s);break}case"em":{i=dV(t,s);break}case"vh":{i=pV(s);break}case"vw":{i=mV(s);break}}return i}function cl(e){return parseFloat(e.toFixed(3))}function fM(e){const{panels:t}=e,r=tm({group:e});return r===0?t.map(i=>({collapsedSize:0,collapsible:i.panelConstraints.collapsible===!0,defaultSize:void 0,disabled:i.panelConstraints.disabled,minSize:0,maxSize:100,panelId:i.id})):t.map(i=>{const{element:s,panelConstraints:l}=i;let c=0;if(l.collapsedSize!==void 0){const m=y1({groupSize:r,panelElement:s,styleProp:l.collapsedSize});c=cl(m/r*100)}let f;if(l.defaultSize!==void 0){const m=y1({groupSize:r,panelElement:s,styleProp:l.defaultSize});f=cl(m/r*100)}let d=0;if(l.minSize!==void 0){const m=y1({groupSize:r,panelElement:s,styleProp:l.minSize});d=cl(m/r*100)}let h=100;if(l.maxSize!==void 0){const m=y1({groupSize:r,panelElement:s,styleProp:l.maxSize});h=cl(m/r*100)}return{collapsedSize:c,collapsible:l.collapsible===!0,defaultSize:f,disabled:l.disabled,minSize:d,maxSize:h,panelId:i.id}})}class yV{#e={};addListener(t,r){const i=this.#e[t];return i===void 0?this.#e[t]=[r]:i.includes(r)||i.push(r),()=>{this.removeListener(t,r)}}emit(t,r){const i=this.#e[t];if(i!==void 0)if(i.length===1)i[0].call(null,r);else{let s=!1,l=null;const c=Array.from(i);for(let f=0;f<c.length;f++){const d=c[f];try{d.call(null,r)}catch(h){l===null&&(s=!0,l=h)}}if(s)throw l}}removeAllListeners(){this.#e={}}removeListener(t,r){const i=this.#e[t];if(i!==void 0){const s=i.indexOf(r);s>=0&&i.splice(s,1)}}}function Wi(e,t,r=0){return Math.abs(cl(e)-cl(t))<=r}let as={cursorFlags:0,interactionState:{state:"inactive"},mountedGroups:new Map};const sc=new yV;function io(){return as}function Ji(e){const t=typeof e=="function"?e(as):e;if(as===t)return as;const r=as;return as={...as,...t},t.cursorFlags!==void 0&&sc.emit("cursorFlagsChange",as.cursorFlags),t.interactionState!==void 0&&sc.emit("interactionStateChange",as.interactionState),t.mountedGroups!==void 0&&(as.mountedGroups.forEach((i,s)=>{i.derivedPanelConstraints.forEach(l=>{if(l.collapsible){const{layout:c}=r.mountedGroups.get(s)??{};if(c){const f=Wi(l.collapsedSize,i.layout[l.panelId]),d=Wi(l.collapsedSize,c[l.panelId]);f&&!d&&(s.inMemoryLastExpandedPanelSizes[l.panelId]=c[l.panelId])}}})}),sc.emit("mountedGroupsChange",as.mountedGroups)),as}function vV(e,t,r){let i,s={x:1/0,y:1/0};for(const l of t){if(l.disabled)continue;const c=dz(r,l.rect);switch(e){case"horizontal":{c.x<=s.x&&(i=l,s=c);break}case"vertical":{c.y<=s.y&&(i=l,s=c);break}}}return i?{distance:s,hitRegion:i}:void 0}function bV(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}function SV(e,t){if(e===t)throw new Error("Cannot compare node with itself");const r={a:pM(e),b:pM(t)};let i;for(;r.a.at(-1)===r.b.at(-1);)i=r.a.pop(),r.b.pop();tr(i,"Stacking order can only be calculated for elements with a common ancestor");const s={a:hM(dM(r.a)),b:hM(dM(r.b))};if(s.a===s.b){const l=i.childNodes,c={a:r.a.at(-1),b:r.b.at(-1)};let f=l.length;for(;f--;){const d=l[f];if(d===c.a)return 1;if(d===c.b)return-1}}return Math.sign(s.a-s.b)}const wV=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function EV(e){const t=getComputedStyle(pz(e)??e).display;return t==="flex"||t==="inline-flex"}function xV(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||EV(e))||+t.opacity<1||"transform"in t&&t.transform!=="none"||"webkitTransform"in t&&t.webkitTransform!=="none"||"mixBlendMode"in t&&t.mixBlendMode!=="normal"||"filter"in t&&t.filter!=="none"||"webkitFilter"in t&&t.webkitFilter!=="none"||"isolation"in t&&t.isolation==="isolate"||wV.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function dM(e){let t=e.length;for(;t--;){const r=e[t];if(tr(r,"Missing node"),xV(r))return r}return null}function hM(e){return e&&Number(getComputedStyle(e).zIndex)||0}function pM(e){const t=[];for(;e;)t.push(e),e=pz(e);return t}function pz(e){const{parentNode:t}=e;return bV(t)?t.host:t}function _V(e,t){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function TV({groupElement:e,hitRegion:t,pointerEventTarget:r}){if(!fz(r)||r.contains(e)||e.contains(r))return!0;if(SV(r,e)>0){let i=r;for(;i;){if(i.contains(e))return!0;if(_V(i.getBoundingClientRect(),t))return!1;i=i.parentElement}}return!0}function HO(e,t){const r=[];return t.forEach((i,s)=>{if(s.disabled)return;const l=hz(s),c=vV(s.orientation,l,{x:e.clientX,y:e.clientY});c&&c.distance.x<=0&&c.distance.y<=0&&TV({groupElement:s.element,hitRegion:c.hitRegion.rect,pointerEventTarget:e.target})&&r.push(c.hitRegion)}),r}function CV(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!=t[r])return!1;return!0}function El(e,t){return Wi(e,t)?0:e>t?1:-1}function Ap({panelConstraints:e,prevSize:t,size:r}){const{collapsedSize:i=0,collapsible:s,disabled:l,maxSize:c=100,minSize:f=0}=e;if(l)return t;if(El(r,f)<0)if(s){const d=(i+f)/2;El(r,d)<0?r=i:r=f}else r=f;return r=Math.min(c,r),r=cl(r),r}function ob({delta:e,initialLayout:t,panelConstraints:r,pivotIndices:i,prevLayout:s,trigger:l}){if(Wi(e,0))return t;const c=Object.values(t),f=Object.values(s),d=[...c],[h,m]=i;tr(h!=null,"Invalid first pivot index"),tr(m!=null,"Invalid second pivot index");let g=0;switch(l){case"keyboard":{{const b=e<0?m:h,_=r[b];tr(_,`Panel constraints not found for index ${b}`);const{collapsedSize:x=0,collapsible:R,minSize:S=0}=_;if(R){const T=c[b];if(tr(T!=null,`Previous layout not found for panel index ${b}`),Wi(T,x)){const E=S-T;El(E,Math.abs(e))>0&&(e=e<0?0-E:E)}}}{const b=e<0?h:m,_=r[b];tr(_,`No panel constraints found for index ${b}`);const{collapsedSize:x=0,collapsible:R,minSize:S=0}=_;if(R){const T=c[b];if(tr(T!=null,`Previous layout not found for panel index ${b}`),Wi(T,S)){const E=T-x;El(E,Math.abs(e))>0&&(e=e<0?0-E:E)}}}break}default:{const b=e<0?m:h,_=r[b];tr(_,`Panel constraints not found for index ${b}`);const x=c[b],{collapsible:R,collapsedSize:S,minSize:T}=_;if(R&&El(x,T)<0)if(e>0){const E=T-S,O=E/2,C=x+e;El(C,T)<0&&(e=El(e,O)<=0?0:E)}else{const E=T-S,O=100-E/2,C=x-e;El(C,T)<0&&(e=El(100+e,O)>0?0:-E)}break}}{const b=e<0?1:-1;let _=e<0?m:h,x=0;for(;;){const S=c[_];tr(S!=null,`Previous layout not found for panel index ${_}`);const T=Ap({panelConstraints:r[_],prevSize:S,size:100})-S;if(x+=T,_+=b,_<0||_>=r.length)break}const R=Math.min(Math.abs(e),Math.abs(x));e=e<0?0-R:R}{let b=e<0?h:m;for(;b>=0&&b<r.length;){const _=Math.abs(e)-Math.abs(g),x=c[b];tr(x!=null,`Previous layout not found for panel index ${b}`);const R=x-_,S=Ap({panelConstraints:r[b],prevSize:x,size:R});if(!Wi(x,S)&&(g+=x-S,d[b]=S,g.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?b--:b++}}if(CV(f,d))return s;{const b=e<0?m:h,_=c[b];tr(_!=null,`Previous layout not found for panel index ${b}`);const x=_+g,R=Ap({panelConstraints:r[b],prevSize:_,size:x});if(d[b]=R,!Wi(R,x)){let S=x-R,T=e<0?m:h;for(;T>=0&&T<r.length;){const E=d[T];tr(E!=null,`Previous layout not found for panel index ${T}`);const O=E+S,C=Ap({panelConstraints:r[T],prevSize:E,size:O});if(Wi(E,C)||(S-=C-E,d[T]=C),Wi(S,0))break;e>0?T--:T++}}}const v=Object.values(d).reduce((b,_)=>_+b,0);if(!Wi(v,100,.1))return s;const w=Object.keys(s);return d.reduce((b,_,x)=>(b[w[x]]=_,b),{})}function qh(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(t[r]===void 0||El(e[r],t[r])!==0)return!1;return!0}function Vh({layout:e,panelConstraints:t}){const r=Object.values(e),i=[...r],s=i.reduce((f,d)=>f+d,0);if(i.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${i.map(f=>`${f}%`).join(", ")}`);if(!Wi(s,100)&&i.length>0)for(let f=0;f<t.length;f++){const d=i[f];tr(d!=null,`No layout data found for index ${f}`);const h=100/s*d;i[f]=h}let l=0;for(let f=0;f<t.length;f++){const d=r[f];tr(d!=null,`No layout data found for index ${f}`);const h=i[f];tr(h!=null,`No layout data found for index ${f}`);const m=Ap({panelConstraints:t[f],prevSize:d,size:h});h!=m&&(l+=h-m,i[f]=m)}if(!Wi(l,0))for(let f=0;f<t.length;f++){const d=i[f];tr(d!=null,`No layout data found for index ${f}`);const h=d+l,m=Ap({panelConstraints:t[f],prevSize:d,size:h});if(d!==m&&(l-=m-d,i[f]=m,Wi(l,0)))break}const c=Object.keys(e);return i.reduce((f,d,h)=>(f[c[h]]=d,f),{})}function mz({groupId:e,panelId:t}){const r=()=>{const{mountedGroups:f}=io();for(const[d,{defaultLayoutDeferred:h,derivedPanelConstraints:m,layout:g,separatorToPanels:v}]of f)if(d.id===e)return{defaultLayoutDeferred:h,derivedPanelConstraints:m,group:d,layout:g,separatorToPanels:v};throw Error(`Group ${e} not found`)},i=()=>{const f=r().derivedPanelConstraints.find(d=>d.panelId===t);if(f!==void 0)return f;throw Error(`Panel constraints not found for Panel ${t}`)},s=()=>{const f=r().group.panels.find(d=>d.id===t);if(f!==void 0)return f;throw Error(`Layout not found for Panel ${t}`)},l=()=>{const f=r().layout[t];if(f!==void 0)return f;throw Error(`Layout not found for Panel ${t}`)},c=f=>{const d=l();if(f===d)return;const{defaultLayoutDeferred:h,derivedPanelConstraints:m,group:g,layout:v,separatorToPanels:w}=r(),b=g.panels.findIndex(S=>S.id===t),_=b===g.panels.length-1,x=ob({delta:_?d-f:f-d,initialLayout:v,panelConstraints:m,pivotIndices:_?[b-1,b]:[b,b+1],prevLayout:v,trigger:"imperative-api"}),R=Vh({layout:x,panelConstraints:m});qh(v,R)||Ji(S=>({mountedGroups:new Map(S.mountedGroups).set(g,{defaultLayoutDeferred:h,derivedPanelConstraints:m,layout:R,separatorToPanels:w})}))};return{collapse:()=>{const{collapsible:f,collapsedSize:d}=i(),{mutableValues:h}=s(),m=l();f&&m!==d&&(h.expandToSize=m,c(d))},expand:()=>{const{collapsible:f,collapsedSize:d,minSize:h}=i(),{mutableValues:m}=s(),g=l();if(f&&g===d){let v=m.expandToSize??h;v===0&&(v=1),c(v)}},getSize:()=>{const{group:f}=r(),d=l(),{element:h}=s(),m=f.orientation==="horizontal"?h.offsetWidth:h.offsetHeight;return{asPercentage:d,inPixels:m}},isCollapsed:()=>{const{collapsible:f,collapsedSize:d}=i(),h=l();return f&&Wi(d,h)},resize:f=>{if(l()!==f){let d;switch(typeof f){case"number":{const{group:h}=r(),m=tm({group:h});d=cl(f/m*100);break}case"string":{d=parseFloat(f);break}}c(d)}}}}function mM(e){if(e.defaultPrevented)return;const{mountedGroups:t}=io();HO(e,t).forEach(r=>{if(r.separator){const i=r.panels.find(s=>s.panelConstraints.defaultSize!==void 0);if(i){const s=i.panelConstraints.defaultSize,l=mz({groupId:r.group.id,panelId:i.id});l&&s!==void 0&&(l.resize(s),e.preventDefault())}}})}function zS(e){const{mountedGroups:t}=io();for(const[r]of t)if(r.separators.some(i=>i.element===e))return r;throw Error("Could not find parent Group for separator element")}function gz({groupId:e}){const t=()=>{const{mountedGroups:r}=io();for(const[i,s]of r)if(i.id===e)return{group:i,...s};throw Error(`Could not find Group with id "${e}"`)};return{getLayout(){const{defaultLayoutDeferred:r,layout:i}=t();return r?{}:i},setLayout(r){const{defaultLayoutDeferred:i,derivedPanelConstraints:s,group:l,layout:c,separatorToPanels:f}=t(),d=Vh({layout:r,panelConstraints:s});if(i)return c;if(!qh(c,d)){Ji(m=>({mountedGroups:new Map(m.mountedGroups).set(l,{defaultLayoutDeferred:i,derivedPanelConstraints:s,layout:d,separatorToPanels:f})}));const h=l.panels.map(({id:m})=>m).join(",");l.inMemoryLayouts[h]=d}return d}}}function yz(e){const{mountedGroups:t}=io(),r=t.get(e);return tr(r,`Mounted Group ${e.id} not found`),r}function vh(e,t){const r=zS(e),i=yz(r),s=r.separators.find(m=>m.element===e);tr(s,"Matching separator not found");const l=i.separatorToPanels.get(s);tr(l,"Matching panels not found");const c=l.map(m=>r.panels.indexOf(m)),f=gz({groupId:r.id}).getLayout(),d=ob({delta:t,initialLayout:f,panelConstraints:i.derivedPanelConstraints,pivotIndices:c,prevLayout:f,trigger:"keyboard"}),h=Vh({layout:d,panelConstraints:i.derivedPanelConstraints});qh(f,h)||Ji(m=>({mountedGroups:new Map(m.mountedGroups).set(r,{defaultLayoutDeferred:i.defaultLayoutDeferred,derivedPanelConstraints:i.derivedPanelConstraints,layout:h,separatorToPanels:i.separatorToPanels})}))}function gM(e){if(e.defaultPrevented)return;const t=e.currentTarget,r=zS(t);if(!r.disabled)switch(e.key){case"ArrowDown":{e.preventDefault(),r.orientation==="vertical"&&vh(t,5);break}case"ArrowLeft":{e.preventDefault(),r.orientation==="horizontal"&&vh(t,-5);break}case"ArrowRight":{e.preventDefault(),r.orientation==="horizontal"&&vh(t,5);break}case"ArrowUp":{e.preventDefault(),r.orientation==="vertical"&&vh(t,-5);break}case"End":{e.preventDefault(),vh(t,100);break}case"Enter":{e.preventDefault();const i=zS(t),{derivedPanelConstraints:s,layout:l,separatorToPanels:c}=yz(i),f=i.separators.find(g=>g.element===t);tr(f,"Matching separator not found");const d=c.get(f);tr(d,"Matching panels not found");const h=d[0],m=s.find(g=>g.panelId===h.id);if(tr(m,"Panel metadata not found"),m.collapsible){const g=l[h.id],v=m.collapsedSize===g?i.inMemoryLastExpandedPanelSizes[h.id]??m.minSize:m.collapsedSize;vh(t,v-g)}break}case"F6":{e.preventDefault();const i=zS(t).separators.map(c=>c.element),s=Array.from(i).findIndex(c=>c===e.currentTarget);tr(s!==null,"Index not found");const l=e.shiftKey?s>0?s-1:i.length-1:s+1<i.length?s+1:0;i[l].focus();break}case"Home":{e.preventDefault(),vh(t,-100);break}}}function yM(e){if(e.defaultPrevented||e.pointerType==="mouse"&&e.button>0)return;const{mountedGroups:t}=io(),r=HO(e,t),i=new Map;let s=!1;r.forEach(l=>{l.separator&&(s||(s=!0,l.separator.element.focus()));const c=t.get(l.group);c&&i.set(l.group,c.layout)}),Ji({interactionState:{hitRegions:r,initialLayoutMap:i,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:"active"}}),r.length&&e.preventDefault()}const OV=e=>e,Zx=()=>{},vz=1,bz=2,Sz=4,wz=8,vM=3,bM=12;let v1;function SM(){return v1===void 0&&(v1=!1,typeof window<"u"&&(window.navigator.userAgent.includes("Chrome")||window.navigator.userAgent.includes("Firefox"))&&(v1=!0)),v1}function RV({cursorFlags:e,groups:t,state:r}){let i=0,s=0;switch(r){case"active":case"hover":t.forEach(l=>{if(!l.disableCursor)switch(l.orientation){case"horizontal":{i++;break}case"vertical":{s++;break}}})}if(!(i===0&&s===0)){switch(r){case"active":{if(e&&SM()){const l=(e&vz)!==0,c=(e&bz)!==0,f=(e&Sz)!==0,d=(e&wz)!==0;if(l)return f?"se-resize":d?"ne-resize":"e-resize";if(c)return f?"sw-resize":d?"nw-resize":"w-resize";if(f)return"s-resize";if(d)return"n-resize"}break}}return SM()?i>0&&s>0?"move":i>0?"ew-resize":"ns-resize":i>0&&s>0?"grab":i>0?"col-resize":"row-resize"}}const wM=new WeakMap;function GO(e){if(e.defaultView===null||e.defaultView===void 0)return;let{prevStyle:t,styleSheet:r}=wM.get(e)??{};r===void 0&&(r=new e.defaultView.CSSStyleSheet,e.adoptedStyleSheets.push(r));const{cursorFlags:i,interactionState:s}=io();switch(s.state){case"active":case"hover":{const l=RV({cursorFlags:i,groups:s.hitRegions.map(f=>f.group),state:s.state}),c=`*, *:hover {cursor: ${l} !important; ${s.state==="active"?"touch-action: none;":""} }`;if(t===c)return;t=c,l?r.cssRules.length===0?r.insertRule(c):r.replaceSync(c):r.cssRules.length===1&&r.deleteRule(0);break}case"inactive":{t=void 0,r.cssRules.length===1&&r.deleteRule(0);break}}wM.set(e,{prevStyle:t,styleSheet:r})}function Ez({document:e,event:t,hitRegions:r,initialLayoutMap:i,mountedGroups:s,pointerDownAtPoint:l,prevCursorFlags:c}){let f=0;const d=new Map(s);r.forEach(m=>{const{group:g,groupSize:v}=m,{disableCursor:w,orientation:b,panels:_}=g;let x=0;l?b==="horizontal"?x=(t.clientX-l.x)/v*100:x=(t.clientY-l.y)/v*100:b==="horizontal"?x=t.clientX<0?-100:100:x=t.clientY<0?-100:100;const R=i.get(g),{defaultLayoutDeferred:S,derivedPanelConstraints:T,layout:E,separatorToPanels:O}=s.get(g)??{defaultLayoutDeferred:!1};if(T&&R&&E&&O){const C=ob({delta:x,initialLayout:R,panelConstraints:T,pivotIndices:m.panels.map(M=>_.indexOf(M)),prevLayout:E,trigger:"mouse-or-touch"});if(qh(C,E)){if(x!==0&&!w)switch(b){case"horizontal":{f|=x<0?vz:bz;break}case"vertical":{f|=x<0?Sz:wz;break}}}else{d.set(m.group,{defaultLayoutDeferred:S,derivedPanelConstraints:T,layout:C,separatorToPanels:O});const M=m.group.panels.map(({id:D})=>D).join(",");m.group.inMemoryLayouts[M]=C}}});let h=0;t.movementX===0?h|=c&vM:h|=f&vM,t.movementY===0?h|=c&bM:h|=f&bM,Ji({cursorFlags:h,mountedGroups:d}),GO(e)}function EM(e){const{cursorFlags:t,interactionState:r,mountedGroups:i}=io();r.state==="active"&&Ez({document:e.currentTarget,event:e,hitRegions:r.hitRegions,initialLayoutMap:r.initialLayoutMap,mountedGroups:i,prevCursorFlags:t})}function xM(e){if(e.defaultPrevented)return;const{cursorFlags:t,interactionState:r,mountedGroups:i}=io();switch(r.state){case"active":{if(e.buttons===0){Ji(s=>s.interactionState.state==="inactive"?s:{cursorFlags:0,interactionState:{state:"inactive"}}),Ji(s=>({mountedGroups:new Map(s.mountedGroups)}));return}Ez({document:e.currentTarget,event:e,hitRegions:r.hitRegions,initialLayoutMap:r.initialLayoutMap,mountedGroups:i,pointerDownAtPoint:r.pointerDownAtPoint,prevCursorFlags:t});break}default:{const s=HO(e,i);s.length===0?r.state!=="inactive"&&Ji({interactionState:{state:"inactive"}}):Ji({interactionState:{hitRegions:s,state:"hover"}}),GO(e.currentTarget);break}}}function _M(e){if(e.relatedTarget instanceof HTMLIFrameElement){const{interactionState:t}=io();t.state==="hover"&&Ji({interactionState:{state:"inactive"}})}}function TM(e){if(e.defaultPrevented||e.pointerType==="mouse"&&e.button>0)return;const{interactionState:t}=io();t.state==="active"&&(Ji({cursorFlags:0,interactionState:{state:"inactive"}}),t.hitRegions.length>0&&(GO(e.currentTarget),Ji(r=>({mountedGroups:new Map(r.mountedGroups)})),e.preventDefault()))}function CM(e){let t=0,r=0;const i={};for(const l of e)if(l.defaultSize!==void 0){t++;const c=cl(l.defaultSize);r+=c,i[l.panelId]=c}else i[l.panelId]=void 0;const s=e.length-t;if(s!==0){const l=cl((100-r)/s);for(const c of e)c.defaultSize===void 0&&(i[c.panelId]=l)}return i}function AV(e,t,r){if(!r[0])return;const i=e.panels.find(d=>d.element===t);if(!i||!i.onResize)return;const s=tm({group:e}),l=e.orientation==="horizontal"?i.element.offsetWidth:i.element.offsetHeight,c=i.mutableValues.prevSize,f={asPercentage:cl(l/s*100),inPixels:l};i.mutableValues.prevSize=f,i.onResize(f,i.id,c)}function MV(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function jV(e,t){const r=e.map(s=>s.id),i=Object.keys(t);if(r.length!==i.length)return!1;for(const s of r)if(!i.includes(s))return!1;return!0}const dp=new Map;function kV(e){let t=!0;tr(e.element.ownerDocument.defaultView,"Cannot register an unmounted Group");const r=e.element.ownerDocument.defaultView.ResizeObserver,i=new Set,s=new Set,l=new r(b=>{for(const _ of b){const{borderBoxSize:x,target:R}=_;if(R===e.element){if(t){if(tm({group:e})===0)return;Ji(S=>{const T=S.mountedGroups.get(e);if(T){const E=fM(e),O=T.defaultLayoutDeferred?CM(E):T.layout,C=Vh({layout:O,panelConstraints:E});return!T.defaultLayoutDeferred&&qh(O,C)&&MV(T.derivedPanelConstraints,E)?S:{mountedGroups:new Map(S.mountedGroups).set(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:E,layout:C,separatorToPanels:T.separatorToPanels})}}return S})}}else AV(e,R,x)}});l.observe(e.element),e.panels.forEach(b=>{tr(!i.has(b.id),`Panel ids must be unique; id "${b.id}" was used more than once`),i.add(b.id),b.onResize&&l.observe(b.element)});const c=tm({group:e}),f=fM(e),d=e.panels.map(({id:b})=>b).join(",");let h=e.defaultLayout;h&&(jV(e.panels,h)||(h=void 0));const m=e.inMemoryLayouts[d]??h??CM(f),g=Vh({layout:m,panelConstraints:f}),v=hz(e),w=e.element.ownerDocument;return Ji(b=>{const _=new Map;return dp.set(w,(dp.get(w)??0)+1),v.forEach(x=>{x.separator&&_.set(x.separator,x.panels)}),{mountedGroups:new Map(b.mountedGroups).set(e,{defaultLayoutDeferred:c===0,derivedPanelConstraints:f,layout:g,separatorToPanels:_})}}),e.separators.forEach(b=>{tr(!s.has(b.id),`Separator ids must be unique; id "${b.id}" was used more than once`),s.add(b.id),b.element.addEventListener("keydown",gM)}),dp.get(w)===1&&(w.addEventListener("dblclick",mM,!0),w.addEventListener("pointerdown",yM,!0),w.addEventListener("pointerleave",EM),w.addEventListener("pointermove",xM),w.addEventListener("pointerout",_M),w.addEventListener("pointerup",TM,!0)),function(){t=!1,dp.set(w,Math.max(0,(dp.get(w)??0)-1)),Ji(b=>{const _=new Map(b.mountedGroups);return _.delete(e),{mountedGroups:_}}),e.separators.forEach(b=>{b.element.removeEventListener("keydown",gM)}),dp.get(w)||(w.removeEventListener("dblclick",mM,!0),w.removeEventListener("pointerdown",yM,!0),w.removeEventListener("pointerleave",EM),w.removeEventListener("pointermove",xM),w.removeEventListener("pointerout",_M),w.removeEventListener("pointerup",TM,!0)),l.disconnect()}}function DV(){const[e,t]=j.useState({}),r=j.useCallback(()=>t({}),[]);return[e,r]}function KO(e){const t=j.useId();return`${e??t}`}const Qh=typeof window<"u"?j.useLayoutEffect:j.useEffect;function Hv(e){const t=j.useRef(e);return Qh(()=>{t.current=e},[e]),j.useCallback((...r)=>t.current?.(...r),[t])}function YO(...e){return Hv(t=>{e.forEach(r=>{if(r)switch(typeof r){case"function":{r(t);break}case"object":{r.current=t;break}}})})}function NV(e){const t=j.useRef({...e});return Qh(()=>{for(const r in e)t.current[r]=e[r]},[e]),t.current}const xz=j.createContext(null);function zV(e,t){const r=j.useRef({getLayout:()=>({}),setLayout:OV});j.useImperativeHandle(t,()=>r.current,[]),Qh(()=>{Object.assign(r.current,gz({groupId:e}))})}function Mp({children:e,className:t,defaultLayout:r,disableCursor:i,disabled:s,elementRef:l,groupRef:c,id:f,onLayoutChange:d,onLayoutChanged:h,orientation:m="horizontal",resizeTargetMinimumSize:g={coarse:20,fine:10},style:v,...w}){const b=j.useRef({onLayoutChange:{},onLayoutChanged:{}}),_=Hv(L=>{qh(b.current.onLayoutChange,L)||(b.current.onLayoutChange=L,d?.(L))}),x=Hv(L=>{qh(b.current.onLayoutChanged,L)||(b.current.onLayoutChanged=L,h?.(L))}),R=KO(f),S=j.useRef(null),[T,E]=DV(),O=j.useRef({lastExpandedPanelSizes:{},layouts:{},panels:[],resizeTargetMinimumSize:g,separators:[]}),C=YO(S,l);zV(R,c);const M=Hv((L,V)=>{const{interactionState:F,mountedGroups:re}=io();for(const ae of re.keys())if(ae.id===L){const K=re.get(ae);if(K){let B=!1;return F.state==="active"&&(B=F.hitRegions.some(Y=>Y.group===ae)),{flexGrow:K.layout[V]??1,pointerEvents:B?"none":void 0}}}return{flexGrow:r?.[V]??1}}),D=j.useMemo(()=>({getPanelStyles:M,id:R,orientation:m,registerPanel:L=>{const V=O.current;return V.panels=eC(m,[...V.panels,L]),E(),()=>{V.panels=V.panels.filter(F=>F!==L),E()}},registerSeparator:L=>{const V=O.current;return V.separators=eC(m,[...V.separators,L]),E(),()=>{V.separators=V.separators.filter(F=>F!==L),E()}}}),[M,R,E,m]),$=NV({defaultLayout:r,disableCursor:i}),q=j.useRef(null);return Qh(()=>{const L=S.current;if(L===null)return;const V=O.current,F={defaultLayout:$.defaultLayout,disableCursor:!!$.disableCursor,disabled:!!s,element:L,id:R,inMemoryLastExpandedPanelSizes:O.current.lastExpandedPanelSizes,inMemoryLayouts:O.current.layouts,orientation:m,panels:V.panels,resizeTargetMinimumSize:V.resizeTargetMinimumSize,separators:V.separators};q.current=F;const re=kV(F),ae=io().mountedGroups.get(F);if(ae){const{defaultLayoutDeferred:Y,derivedPanelConstraints:fe,layout:se}=ae;!Y&&fe.length>0&&(_(se),x(se))}const K=sc.addListener("interactionStateChange",Y=>{Y.state}),B=sc.addListener("mountedGroupsChange",Y=>{const fe=Y.get(F);if(fe){const{defaultLayoutDeferred:se,derivedPanelConstraints:N,layout:I}=fe;if(se||N.length===0)return;const{interactionState:U}=io(),P=U.state!=="active";_(I),P&&x(I)}});return()=>{q.current=null,re(),K(),B()}},[s,R,x,_,m,T,$]),j.useEffect(()=>{const L=q.current;L&&(L.defaultLayout=r,L.disableCursor=!!i)}),k.jsx(xz.Provider,{value:D,children:k.jsx("div",{...w,className:t,"data-group":!0,"data-testid":R,id:R,ref:C,style:{height:"100%",width:"100%",overflow:"hidden",...v,display:"flex",flexDirection:m==="horizontal"?"row":"column",flexWrap:"nowrap"},children:e})})}Mp.displayName="Group";function Xx(e,t){return`react-resizable-panels:${[e,...t].join(":")}`}function $v({debounceSaveMs:e=100,panelIds:t,storage:r=localStorage,...i}){const s=t!==void 0,l="id"in i?i.id:i.groupId,c=Xx(l,t??[]),f=j.useSyncExternalStore($V,()=>r.getItem(c),()=>r.getItem(c)),d=j.useMemo(()=>f?JSON.parse(f):void 0,[f]),h=j.useRef(null),m=j.useCallback(()=>{const w=h.current;w&&(h.current=null,clearTimeout(w))},[]);j.useLayoutEffect(()=>()=>{m()},[m]);const g=j.useCallback(w=>{m();let b;s?b=Xx(l,Object.keys(w)):b=Xx(l,[]);try{r.setItem(b,JSON.stringify(w))}catch(_){console.error(_)}},[m,s,l,r]),v=j.useCallback(w=>{m(),e===0?g(w):h.current=setTimeout(()=>{g(w)},e)},[m,e,g]);return{defaultLayout:d,onLayoutChange:v,onLayoutChanged:g}}function $V(){return function(){}}function ZO(){const e=j.useContext(xz);return tr(e,"Group Context not found; did you render a Panel or Separator outside of a Group?"),e}function PV(e,t){const{id:r}=ZO(),i=j.useRef({collapse:Zx,expand:Zx,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:Zx});j.useImperativeHandle(t,()=>i.current,[]),Qh(()=>{Object.assign(i.current,mz({groupId:r,panelId:e}))})}function ul({children:e,className:t,collapsedSize:r="0%",collapsible:i=!1,defaultSize:s,disabled:l,elementRef:c,id:f,maxSize:d="100%",minSize:h="0%",onResize:m,panelRef:g,style:v,...w}){const b=!!f,_=KO(f),x=j.useRef(null),R=YO(x,c),{getPanelStyles:S,id:T,registerPanel:E}=ZO(),O=m!==null,C=Hv((D,$,q)=>{m?.(D,f,q)});Qh(()=>{const D=x.current;if(D!==null)return E({element:D,id:_,idIsStable:b,mutableValues:{expandToSize:void 0,prevSize:void 0},onResize:O?C:void 0,panelConstraints:{collapsedSize:r,collapsible:i,defaultSize:s,disabled:l,maxSize:d,minSize:h}})},[r,i,s,l,O,_,b,d,h,C,E]),PV(_,g);const M=j.useSyncExternalStore(D=>(sc.addListener("mountedGroupsChange",D),()=>{sc.removeListener("mountedGroupsChange",D)}),()=>JSON.stringify(S(T,_)),()=>JSON.stringify(S(T,_)));return k.jsx("div",{...w,"aria-disabled":l,"data-panel":!0,"data-testid":_,id:_,ref:R,style:{...IV,display:"flex",flexBasis:0,flexShrink:1,overflow:"hidden",...JSON.parse(M)},children:k.jsx("div",{className:t,style:{maxHeight:"100%",maxWidth:"100%",flexGrow:1,...v},children:e})})}ul.displayName="Panel";const IV={minHeight:0,maxHeight:"100%",height:"auto",minWidth:0,maxWidth:"100%",width:"auto",border:"none",borderWidth:0,padding:0,margin:0};function LV({layout:e,panelConstraints:t,panelId:r,panelIndex:i}){let s,l;const c=e[r],f=t.find(d=>d.panelId===r);if(f){const d=f.maxSize,h=f.collapsible?f.collapsedSize:f.minSize,m=[i,i+1];l=Vh({layout:ob({delta:h-c,initialLayout:e,panelConstraints:t,pivotIndices:m,prevLayout:e}),panelConstraints:t})[r],s=Vh({layout:ob({delta:d-c,initialLayout:e,panelConstraints:t,pivotIndices:m,prevLayout:e}),panelConstraints:t})[r]}return{valueControls:r,valueMax:s,valueMin:l,valueNow:c}}function jp({children:e,className:t,disabled:r,elementRef:i,id:s,style:l,...c}){const f=KO(s),[d,h]=j.useState({}),[m,g]=j.useState("inactive"),v=j.useRef(null),w=YO(v,i),{id:b,orientation:_,registerSeparator:x}=ZO(),R=_==="horizontal"?"vertical":"horizontal";return Qh(()=>{const S=v.current;if(S!==null){const T={disabled:r,element:S,id:f},E=x(T),O=sc.addListener("interactionStateChange",M=>{g(M.state!=="inactive"&&M.hitRegions.some(D=>D.separator===T)?M.state:"inactive")}),C=sc.addListener("mountedGroupsChange",M=>{M.forEach(({derivedPanelConstraints:D,layout:$,separatorToPanels:q},L)=>{if(L.id===b){const V=q.get(T);if(V){const F=V[0],re=L.panels.indexOf(F);h(LV({layout:$,panelConstraints:D,panelId:F.id,panelIndex:re}))}}})});return()=>{O(),C(),E()}}},[r,b,f,x]),k.jsx("div",{...c,"aria-controls":d.valueControls,"aria-disabled":r,"aria-orientation":R,"aria-valuemax":d.valueMax,"aria-valuemin":d.valueMin,"aria-valuenow":d.valueNow,children:e,className:t,"data-separator":r?"disabled":m,"data-testid":f,id:f,ref:w,role:"separator",style:{flexBasis:"auto",cursor:r?"not-allowed":void 0,...l,flexGrow:0,flexShrink:0},tabIndex:r?void 0:0})}jp.displayName="Separator";var _z=typeof global=="object"&&global&&global.Object===Object&&global,UV=typeof self=="object"&&self&&self.Object===Object&&self,Ll=_z||UV||Function("return this")(),fs=Ll.Symbol,Tz=Object.prototype,qV=Tz.hasOwnProperty,VV=Tz.toString,_v=fs?fs.toStringTag:void 0;function FV(e){var t=qV.call(e,_v),r=e[_v];try{e[_v]=void 0;var i=!0}catch{}var s=VV.call(e);return i&&(t?e[_v]=r:delete e[_v]),s}var BV=Object.prototype,HV=BV.toString;function GV(e){return HV.call(e)}var KV="[object Null]",YV="[object Undefined]",OM=fs?fs.toStringTag:void 0;function mc(e){return e==null?e===void 0?YV:KV:OM&&OM in Object(e)?FV(e):GV(e)}function ds(e){return e!=null&&typeof e=="object"}var ZV="[object Symbol]";function $b(e){return typeof e=="symbol"||ds(e)&&mc(e)==ZV}function xm(e,t){for(var r=-1,i=e==null?0:e.length,s=Array(i);++r<i;)s[r]=t(e[r],r,e);return s}var za=Array.isArray,RM=fs?fs.prototype:void 0,AM=RM?RM.toString:void 0;function Cz(e){if(typeof e=="string")return e;if(za(e))return xm(e,Cz)+"";if($b(e))return AM?AM.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var XV=/\s/;function QV(e){for(var t=e.length;t--&&XV.test(e.charAt(t)););return t}var WV=/^\s+/;function JV(e){return e&&e.slice(0,QV(e)+1).replace(WV,"")}function In(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var MM=NaN,eF=/^[-+]0x[0-9a-f]+$/i,tF=/^0b[01]+$/i,nF=/^0o[0-7]+$/i,rF=parseInt;function aF(e){if(typeof e=="number")return e;if($b(e))return MM;if(In(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=In(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=JV(e);var r=tF.test(e);return r||nF.test(e)?rF(e.slice(2),r?2:8):eF.test(e)?MM:+e}var jM=1/0,iF=17976931348623157e292;function oF(e){if(!e)return e===0?e:0;if(e=aF(e),e===jM||e===-jM){var t=e<0?-1:1;return t*iF}return e===e?e:0}function Oz(e){var t=oF(e),r=t%1;return t===t?r?t-r:t:0}function Hw(e){return e}var sF="[object AsyncFunction]",lF="[object Function]",uF="[object GeneratorFunction]",cF="[object Proxy]";function Pb(e){if(!In(e))return!1;var t=mc(e);return t==lF||t==uF||t==sF||t==cF}var Qx=Ll["__core-js_shared__"],kM=(function(){var e=/[^.]+$/.exec(Qx&&Qx.keys&&Qx.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function fF(e){return!!kM&&kM in e}var dF=Function.prototype,hF=dF.toString;function Wh(e){if(e!=null){try{return hF.call(e)}catch{}try{return e+""}catch{}}return""}var pF=/[\\^$.*+?()[\]{}|]/g,mF=/^\[object .+?Constructor\]$/,gF=Function.prototype,yF=Object.prototype,vF=gF.toString,bF=yF.hasOwnProperty,SF=RegExp("^"+vF.call(bF).replace(pF,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function wF(e){if(!In(e)||fF(e))return!1;var t=Pb(e)?SF:mF;return t.test(Wh(e))}function EF(e,t){return e?.[t]}function Jh(e,t){var r=EF(e,t);return wF(r)?r:void 0}var tC=Jh(Ll,"WeakMap"),DM=Object.create,Rz=(function(){function e(){}return function(t){if(!In(t))return{};if(DM)return DM(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})();function xF(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function $S(){}function XO(e,t){var r=-1,i=e.length;for(t||(t=Array(i));++r<i;)t[r]=e[r];return t}var _F=800,TF=16,CF=Date.now;function OF(e){var t=0,r=0;return function(){var i=CF(),s=TF-(i-r);if(r=i,s>0){if(++t>=_F)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function RF(e){return function(){return e}}var sw=(function(){try{var e=Jh(Object,"defineProperty");return e({},"",{}),e}catch{}})(),AF=sw?function(e,t){return sw(e,"toString",{configurable:!0,enumerable:!1,value:RF(t),writable:!0})}:Hw,Az=OF(AF);function QO(e,t){for(var r=-1,i=e==null?0:e.length;++r<i&&t(e[r],r,e)!==!1;);return e}function MF(e,t,r,i){for(var s=e.length,l=r+-1;++l<s;)if(t(e[l],l,e))return l;return-1}function jF(e){return e!==e}function kF(e,t,r){for(var i=r-1,s=e.length;++i<s;)if(e[i]===t)return i;return-1}function Mz(e,t,r){return t===t?kF(e,t,r):MF(e,jF,r)}function WO(e,t){var r=e==null?0:e.length;return!!r&&Mz(e,t,0)>-1}var DF=9007199254740991,NF=/^(?:0|[1-9]\d*)$/;function Gw(e,t){var r=typeof e;return t=t??DF,!!t&&(r=="number"||r!="symbol"&&NF.test(e))&&e>-1&&e%1==0&&e<t}function JO(e,t,r){t=="__proto__"&&sw?sw(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Ib(e,t){return e===t||e!==e&&t!==t}var zF=Object.prototype,$F=zF.hasOwnProperty;function Kw(e,t,r){var i=e[t];(!($F.call(e,t)&&Ib(i,r))||r===void 0&&!(t in e))&&JO(e,t,r)}function ep(e,t,r,i){var s=!r;r||(r={});for(var l=-1,c=t.length;++l<c;){var f=t[l],d=void 0;d===void 0&&(d=e[f]),s?JO(r,f,d):Kw(r,f,d)}return r}var NM=Math.max;function jz(e,t,r){return t=NM(t===void 0?e.length-1:t,0),function(){for(var i=arguments,s=-1,l=NM(i.length-t,0),c=Array(l);++s<l;)c[s]=i[t+s];s=-1;for(var f=Array(t+1);++s<t;)f[s]=i[s];return f[t]=r(c),xF(e,this,f)}}function Yw(e,t){return Az(jz(e,t,Hw),e+"")}var PF=9007199254740991;function eR(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=PF}function lf(e){return e!=null&&eR(e.length)&&!Pb(e)}function IF(e,t,r){if(!In(r))return!1;var i=typeof t;return(i=="number"?lf(r)&&Gw(t,r.length):i=="string"&&t in r)?Ib(r[t],e):!1}function kz(e){return Yw(function(t,r){var i=-1,s=r.length,l=s>1?r[s-1]:void 0,c=s>2?r[2]:void 0;for(l=e.length>3&&typeof l=="function"?(s--,l):void 0,c&&IF(r[0],r[1],c)&&(l=s<3?void 0:l,s=1),t=Object(t);++i<s;){var f=r[i];f&&e(t,f,i,l)}return t})}var LF=Object.prototype;function Lb(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||LF;return e===r}function Dz(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var UF="[object Arguments]";function zM(e){return ds(e)&&mc(e)==UF}var Nz=Object.prototype,qF=Nz.hasOwnProperty,VF=Nz.propertyIsEnumerable,nm=zM((function(){return arguments})())?zM:function(e){return ds(e)&&qF.call(e,"callee")&&!VF.call(e,"callee")};function FF(){return!1}var zz=typeof Zo=="object"&&Zo&&!Zo.nodeType&&Zo,$M=zz&&typeof Xo=="object"&&Xo&&!Xo.nodeType&&Xo,BF=$M&&$M.exports===zz,PM=BF?Ll.Buffer:void 0,HF=PM?PM.isBuffer:void 0,Fh=HF||FF,GF="[object Arguments]",KF="[object Array]",YF="[object Boolean]",ZF="[object Date]",XF="[object Error]",QF="[object Function]",WF="[object Map]",JF="[object Number]",eB="[object Object]",tB="[object RegExp]",nB="[object Set]",rB="[object String]",aB="[object WeakMap]",iB="[object ArrayBuffer]",oB="[object DataView]",sB="[object Float32Array]",lB="[object Float64Array]",uB="[object Int8Array]",cB="[object Int16Array]",fB="[object Int32Array]",dB="[object Uint8Array]",hB="[object Uint8ClampedArray]",pB="[object Uint16Array]",mB="[object Uint32Array]",jr={};jr[sB]=jr[lB]=jr[uB]=jr[cB]=jr[fB]=jr[dB]=jr[hB]=jr[pB]=jr[mB]=!0;jr[GF]=jr[KF]=jr[iB]=jr[YF]=jr[oB]=jr[ZF]=jr[XF]=jr[QF]=jr[WF]=jr[JF]=jr[eB]=jr[tB]=jr[nB]=jr[rB]=jr[aB]=!1;function gB(e){return ds(e)&&eR(e.length)&&!!jr[mc(e)]}function tR(e){return function(t){return e(t)}}var $z=typeof Zo=="object"&&Zo&&!Zo.nodeType&&Zo,Gv=$z&&typeof Xo=="object"&&Xo&&!Xo.nodeType&&Xo,yB=Gv&&Gv.exports===$z,Wx=yB&&_z.process,rm=(function(){try{var e=Gv&&Gv.require&&Gv.require("util").types;return e||Wx&&Wx.binding&&Wx.binding("util")}catch{}})(),IM=rm&&rm.isTypedArray,Ub=IM?tR(IM):gB,vB=Object.prototype,bB=vB.hasOwnProperty;function Pz(e,t){var r=za(e),i=!r&&nm(e),s=!r&&!i&&Fh(e),l=!r&&!i&&!s&&Ub(e),c=r||i||s||l,f=c?Dz(e.length,String):[],d=f.length;for(var h in e)(t||bB.call(e,h))&&!(c&&(h=="length"||s&&(h=="offset"||h=="parent")||l&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||Gw(h,d)))&&f.push(h);return f}function Iz(e,t){return function(r){return e(t(r))}}var SB=Iz(Object.keys,Object),wB=Object.prototype,EB=wB.hasOwnProperty;function Lz(e){if(!Lb(e))return SB(e);var t=[];for(var r in Object(e))EB.call(e,r)&&r!="constructor"&&t.push(r);return t}function ss(e){return lf(e)?Pz(e):Lz(e)}var xB=Object.prototype,_B=xB.hasOwnProperty,TB=kz(function(e,t){if(Lb(t)||lf(t)){ep(t,ss(t),e);return}for(var r in t)_B.call(t,r)&&Kw(e,r,t[r])});function CB(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var OB=Object.prototype,RB=OB.hasOwnProperty;function AB(e){if(!In(e))return CB(e);var t=Lb(e),r=[];for(var i in e)i=="constructor"&&(t||!RB.call(e,i))||r.push(i);return r}function qb(e){return lf(e)?Pz(e,!0):AB(e)}var MB=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,jB=/^\w*$/;function nR(e,t){if(za(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||$b(e)?!0:jB.test(e)||!MB.test(e)||t!=null&&e in Object(t)}var sb=Jh(Object,"create");function kB(){this.__data__=sb?sb(null):{},this.size=0}function DB(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var NB="__lodash_hash_undefined__",zB=Object.prototype,$B=zB.hasOwnProperty;function PB(e){var t=this.__data__;if(sb){var r=t[e];return r===NB?void 0:r}return $B.call(t,e)?t[e]:void 0}var IB=Object.prototype,LB=IB.hasOwnProperty;function UB(e){var t=this.__data__;return sb?t[e]!==void 0:LB.call(t,e)}var qB="__lodash_hash_undefined__";function VB(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=sb&&t===void 0?qB:t,this}function Bh(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Bh.prototype.clear=kB;Bh.prototype.delete=DB;Bh.prototype.get=PB;Bh.prototype.has=UB;Bh.prototype.set=VB;function FB(){this.__data__=[],this.size=0}function Zw(e,t){for(var r=e.length;r--;)if(Ib(e[r][0],t))return r;return-1}var BB=Array.prototype,HB=BB.splice;function GB(e){var t=this.__data__,r=Zw(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():HB.call(t,r,1),--this.size,!0}function KB(e){var t=this.__data__,r=Zw(t,e);return r<0?void 0:t[r][1]}function YB(e){return Zw(this.__data__,e)>-1}function ZB(e,t){var r=this.__data__,i=Zw(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function gc(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}gc.prototype.clear=FB;gc.prototype.delete=GB;gc.prototype.get=KB;gc.prototype.has=YB;gc.prototype.set=ZB;var lb=Jh(Ll,"Map");function XB(){this.size=0,this.__data__={hash:new Bh,map:new(lb||gc),string:new Bh}}function QB(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Xw(e,t){var r=e.__data__;return QB(t)?r[typeof t=="string"?"string":"hash"]:r.map}function WB(e){var t=Xw(this,e).delete(e);return this.size-=t?1:0,t}function JB(e){return Xw(this,e).get(e)}function eH(e){return Xw(this,e).has(e)}function tH(e,t){var r=Xw(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function yc(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}yc.prototype.clear=XB;yc.prototype.delete=WB;yc.prototype.get=JB;yc.prototype.has=eH;yc.prototype.set=tH;var nH="Expected a function";function rR(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(nH);var r=function(){var i=arguments,s=t?t.apply(this,i):i[0],l=r.cache;if(l.has(s))return l.get(s);var c=e.apply(this,i);return r.cache=l.set(s,c)||l,c};return r.cache=new(rR.Cache||yc),r}rR.Cache=yc;var rH=500;function aH(e){var t=rR(e,function(i){return r.size===rH&&r.clear(),i}),r=t.cache;return t}var iH=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,oH=/\\(\\)?/g,Uz=aH(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(iH,function(r,i,s,l){t.push(s?l.replace(oH,"$1"):i||r)}),t});function aR(e){return e==null?"":Cz(e)}function _m(e,t){return za(e)?e:nR(e,t)?[e]:Uz(aR(e))}function tp(e){if(typeof e=="string"||$b(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Qw(e,t){t=_m(t,e);for(var r=0,i=t.length;e!=null&&r<i;)e=e[tp(t[r++])];return r&&r==i?e:void 0}function Ve(e,t,r){var i=e==null?void 0:Qw(e,t);return i===void 0?r:i}function iR(e,t){for(var r=-1,i=t.length,s=e.length;++r<i;)e[s+r]=t[r];return e}var LM=fs?fs.isConcatSpreadable:void 0;function sH(e){return za(e)||nm(e)||!!(LM&&e&&e[LM])}function Vb(e,t,r,i,s){var l=-1,c=e.length;for(r||(r=sH),s||(s=[]);++l<c;){var f=e[l];t>0&&r(f)?t>1?Vb(f,t-1,r,i,s):iR(s,f):i||(s[s.length]=f)}return s}function nC(e){var t=e==null?0:e.length;return t?Vb(e,1):[]}function qz(e){return Az(jz(e,void 0,nC),e+"")}var Ww=Iz(Object.getPrototypeOf,Object),lH="[object Object]",uH=Function.prototype,cH=Object.prototype,Vz=uH.toString,fH=cH.hasOwnProperty,dH=Vz.call(Object);function Kc(e){if(!ds(e)||mc(e)!=lH)return!1;var t=Ww(e);if(t===null)return!0;var r=fH.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Vz.call(r)==dH}function hH(e,t,r){var i=-1,s=e.length;t<0&&(t=-t>s?0:s+t),r=r>s?s:r,r<0&&(r+=s),s=t>r?0:r-t>>>0,t>>>=0;for(var l=Array(s);++i<s;)l[i]=e[i+t];return l}function pH(e,t,r,i){var s=-1,l=e==null?0:e.length;for(i&&l&&(r=e[++s]);++s<l;)r=t(r,e[s],s,e);return r}function mH(){this.__data__=new gc,this.size=0}function gH(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function yH(e){return this.__data__.get(e)}function vH(e){return this.__data__.has(e)}var bH=200;function SH(e,t){var r=this.__data__;if(r instanceof gc){var i=r.__data__;if(!lb||i.length<bH-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new yc(i)}return r.set(e,t),this.size=r.size,this}function fl(e){var t=this.__data__=new gc(e);this.size=t.size}fl.prototype.clear=mH;fl.prototype.delete=gH;fl.prototype.get=yH;fl.prototype.has=vH;fl.prototype.set=SH;function wH(e,t){return e&&ep(t,ss(t),e)}function EH(e,t){return e&&ep(t,qb(t),e)}var Fz=typeof Zo=="object"&&Zo&&!Zo.nodeType&&Zo,UM=Fz&&typeof Xo=="object"&&Xo&&!Xo.nodeType&&Xo,xH=UM&&UM.exports===Fz,qM=xH?Ll.Buffer:void 0,VM=qM?qM.allocUnsafe:void 0;function Bz(e,t){if(t)return e.slice();var r=e.length,i=VM?VM(r):new e.constructor(r);return e.copy(i),i}function _H(e,t){for(var r=-1,i=e==null?0:e.length,s=0,l=[];++r<i;){var c=e[r];t(c,r,e)&&(l[s++]=c)}return l}function Hz(){return[]}var TH=Object.prototype,CH=TH.propertyIsEnumerable,FM=Object.getOwnPropertySymbols,oR=FM?function(e){return e==null?[]:(e=Object(e),_H(FM(e),function(t){return CH.call(e,t)}))}:Hz;function OH(e,t){return ep(e,oR(e),t)}var RH=Object.getOwnPropertySymbols,Gz=RH?function(e){for(var t=[];e;)iR(t,oR(e)),e=Ww(e);return t}:Hz;function AH(e,t){return ep(e,Gz(e),t)}function Kz(e,t,r){var i=t(e);return za(e)?i:iR(i,r(e))}function rC(e){return Kz(e,ss,oR)}function sR(e){return Kz(e,qb,Gz)}var aC=Jh(Ll,"DataView"),iC=Jh(Ll,"Promise"),Fp=Jh(Ll,"Set"),BM="[object Map]",MH="[object Object]",HM="[object Promise]",GM="[object Set]",KM="[object WeakMap]",YM="[object DataView]",jH=Wh(aC),kH=Wh(lb),DH=Wh(iC),NH=Wh(Fp),zH=Wh(tC),os=mc;(aC&&os(new aC(new ArrayBuffer(1)))!=YM||lb&&os(new lb)!=BM||iC&&os(iC.resolve())!=HM||Fp&&os(new Fp)!=GM||tC&&os(new tC)!=KM)&&(os=function(e){var t=mc(e),r=t==MH?e.constructor:void 0,i=r?Wh(r):"";if(i)switch(i){case jH:return YM;case kH:return BM;case DH:return HM;case NH:return GM;case zH:return KM}return t});var $H=Object.prototype,PH=$H.hasOwnProperty;function IH(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&PH.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var lw=Ll.Uint8Array;function lR(e){var t=new e.constructor(e.byteLength);return new lw(t).set(new lw(e)),t}function LH(e,t){var r=t?lR(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var UH=/\w*$/;function qH(e){var t=new e.constructor(e.source,UH.exec(e));return t.lastIndex=e.lastIndex,t}var ZM=fs?fs.prototype:void 0,XM=ZM?ZM.valueOf:void 0;function VH(e){return XM?Object(XM.call(e)):{}}function Yz(e,t){var r=t?lR(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var FH="[object Boolean]",BH="[object Date]",HH="[object Map]",GH="[object Number]",KH="[object RegExp]",YH="[object Set]",ZH="[object String]",XH="[object Symbol]",QH="[object ArrayBuffer]",WH="[object DataView]",JH="[object Float32Array]",eG="[object Float64Array]",tG="[object Int8Array]",nG="[object Int16Array]",rG="[object Int32Array]",aG="[object Uint8Array]",iG="[object Uint8ClampedArray]",oG="[object Uint16Array]",sG="[object Uint32Array]";function lG(e,t,r){var i=e.constructor;switch(t){case QH:return lR(e);case FH:case BH:return new i(+e);case WH:return LH(e,r);case JH:case eG:case tG:case nG:case rG:case aG:case iG:case oG:case sG:return Yz(e,r);case HH:return new i;case GH:case ZH:return new i(e);case KH:return qH(e);case YH:return new i;case XH:return VH(e)}}function Zz(e){return typeof e.constructor=="function"&&!Lb(e)?Rz(Ww(e)):{}}var uG="[object Map]";function cG(e){return ds(e)&&os(e)==uG}var QM=rm&&rm.isMap,fG=QM?tR(QM):cG,dG="[object Set]";function hG(e){return ds(e)&&os(e)==dG}var WM=rm&&rm.isSet,pG=WM?tR(WM):hG,mG=1,gG=2,yG=4,Xz="[object Arguments]",vG="[object Array]",bG="[object Boolean]",SG="[object Date]",wG="[object Error]",Qz="[object Function]",EG="[object GeneratorFunction]",xG="[object Map]",_G="[object Number]",Wz="[object Object]",TG="[object RegExp]",CG="[object Set]",OG="[object String]",RG="[object Symbol]",AG="[object WeakMap]",MG="[object ArrayBuffer]",jG="[object DataView]",kG="[object Float32Array]",DG="[object Float64Array]",NG="[object Int8Array]",zG="[object Int16Array]",$G="[object Int32Array]",PG="[object Uint8Array]",IG="[object Uint8ClampedArray]",LG="[object Uint16Array]",UG="[object Uint32Array]",gr={};gr[Xz]=gr[vG]=gr[MG]=gr[jG]=gr[bG]=gr[SG]=gr[kG]=gr[DG]=gr[NG]=gr[zG]=gr[$G]=gr[xG]=gr[_G]=gr[Wz]=gr[TG]=gr[CG]=gr[OG]=gr[RG]=gr[PG]=gr[IG]=gr[LG]=gr[UG]=!0;gr[wG]=gr[Qz]=gr[AG]=!1;function Kv(e,t,r,i,s,l){var c,f=t&mG,d=t&gG,h=t&yG;if(r&&(c=s?r(e,i,s,l):r(e)),c!==void 0)return c;if(!In(e))return e;var m=za(e);if(m){if(c=IH(e),!f)return XO(e,c)}else{var g=os(e),v=g==Qz||g==EG;if(Fh(e))return Bz(e,f);if(g==Wz||g==Xz||v&&!s){if(c=d||v?{}:Zz(e),!f)return d?AH(e,EH(c,e)):OH(e,wH(c,e))}else{if(!gr[g])return s?e:{};c=lG(e,g,f)}}l||(l=new fl);var w=l.get(e);if(w)return w;l.set(e,c),pG(e)?e.forEach(function(x){c.add(Kv(x,t,r,x,e,l))}):fG(e)&&e.forEach(function(x,R){c.set(R,Kv(x,t,r,R,e,l))});var b=h?d?sR:rC:d?qb:ss,_=m?void 0:b(e);return QO(_||e,function(x,R){_&&(R=x,x=e[R]),Kw(c,R,Kv(x,t,r,R,e,l))}),c}var qG=1,VG=4;function Fb(e){return Kv(e,qG|VG)}var FG="__lodash_hash_undefined__";function BG(e){return this.__data__.set(e,FG),this}function HG(e){return this.__data__.has(e)}function Hh(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new yc;++t<r;)this.add(e[t])}Hh.prototype.add=Hh.prototype.push=BG;Hh.prototype.has=HG;function GG(e,t){for(var r=-1,i=e==null?0:e.length;++r<i;)if(t(e[r],r,e))return!0;return!1}function ub(e,t){return e.has(t)}var KG=1,YG=2;function Jz(e,t,r,i,s,l){var c=r&KG,f=e.length,d=t.length;if(f!=d&&!(c&&d>f))return!1;var h=l.get(e),m=l.get(t);if(h&&m)return h==t&&m==e;var g=-1,v=!0,w=r&YG?new Hh:void 0;for(l.set(e,t),l.set(t,e);++g<f;){var b=e[g],_=t[g];if(i)var x=c?i(_,b,g,t,e,l):i(b,_,g,e,t,l);if(x!==void 0){if(x)continue;v=!1;break}if(w){if(!GG(t,function(R,S){if(!ub(w,S)&&(b===R||s(b,R,r,i,l)))return w.push(S)})){v=!1;break}}else if(!(b===_||s(b,_,r,i,l))){v=!1;break}}return l.delete(e),l.delete(t),v}function ZG(e){var t=-1,r=Array(e.size);return e.forEach(function(i,s){r[++t]=[s,i]}),r}function uR(e){var t=-1,r=Array(e.size);return e.forEach(function(i){r[++t]=i}),r}var XG=1,QG=2,WG="[object Boolean]",JG="[object Date]",eK="[object Error]",tK="[object Map]",nK="[object Number]",rK="[object RegExp]",aK="[object Set]",iK="[object String]",oK="[object Symbol]",sK="[object ArrayBuffer]",lK="[object DataView]",JM=fs?fs.prototype:void 0,Jx=JM?JM.valueOf:void 0;function uK(e,t,r,i,s,l,c){switch(r){case lK:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case sK:return!(e.byteLength!=t.byteLength||!l(new lw(e),new lw(t)));case WG:case JG:case nK:return Ib(+e,+t);case eK:return e.name==t.name&&e.message==t.message;case rK:case iK:return e==t+"";case tK:var f=ZG;case aK:var d=i&XG;if(f||(f=uR),e.size!=t.size&&!d)return!1;var h=c.get(e);if(h)return h==t;i|=QG,c.set(e,t);var m=Jz(f(e),f(t),i,s,l,c);return c.delete(e),m;case oK:if(Jx)return Jx.call(e)==Jx.call(t)}return!1}var cK=1,fK=Object.prototype,dK=fK.hasOwnProperty;function hK(e,t,r,i,s,l){var c=r&cK,f=rC(e),d=f.length,h=rC(t),m=h.length;if(d!=m&&!c)return!1;for(var g=d;g--;){var v=f[g];if(!(c?v in t:dK.call(t,v)))return!1}var w=l.get(e),b=l.get(t);if(w&&b)return w==t&&b==e;var _=!0;l.set(e,t),l.set(t,e);for(var x=c;++g<d;){v=f[g];var R=e[v],S=t[v];if(i)var T=c?i(S,R,v,t,e,l):i(R,S,v,e,t,l);if(!(T===void 0?R===S||s(R,S,r,i,l):T)){_=!1;break}x||(x=v=="constructor")}if(_&&!x){var E=e.constructor,O=t.constructor;E!=O&&"constructor"in e&&"constructor"in t&&!(typeof E=="function"&&E instanceof E&&typeof O=="function"&&O instanceof O)&&(_=!1)}return l.delete(e),l.delete(t),_}var pK=1,e3="[object Arguments]",t3="[object Array]",b1="[object Object]",mK=Object.prototype,n3=mK.hasOwnProperty;function gK(e,t,r,i,s,l){var c=za(e),f=za(t),d=c?t3:os(e),h=f?t3:os(t);d=d==e3?b1:d,h=h==e3?b1:h;var m=d==b1,g=h==b1,v=d==h;if(v&&Fh(e)){if(!Fh(t))return!1;c=!0,m=!1}if(v&&!m)return l||(l=new fl),c||Ub(e)?Jz(e,t,r,i,s,l):uK(e,t,d,r,i,s,l);if(!(r&pK)){var w=m&&n3.call(e,"__wrapped__"),b=g&&n3.call(t,"__wrapped__");if(w||b){var _=w?e.value():e,x=b?t.value():t;return l||(l=new fl),s(_,x,r,i,l)}}return v?(l||(l=new fl),hK(e,t,r,i,s,l)):!1}function Bb(e,t,r,i,s){return e===t?!0:e==null||t==null||!ds(e)&&!ds(t)?e!==e&&t!==t:gK(e,t,r,i,Bb,s)}var yK=1,vK=2;function bK(e,t,r,i){var s=r.length,l=s;if(e==null)return!l;for(e=Object(e);s--;){var c=r[s];if(c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++s<l;){c=r[s];var f=c[0],d=e[f],h=c[1];if(c[2]){if(d===void 0&&!(f in e))return!1}else{var m=new fl,g;if(!(g===void 0?Bb(h,d,yK|vK,i,m):g))return!1}}return!0}function e6(e){return e===e&&!In(e)}function SK(e){for(var t=ss(e),r=t.length;r--;){var i=t[r],s=e[i];t[r]=[i,s,e6(s)]}return t}function t6(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function wK(e){var t=SK(e);return t.length==1&&t[0][2]?t6(t[0][0],t[0][1]):function(r){return r===e||bK(r,e,t)}}function EK(e,t){return e!=null&&t in Object(e)}function n6(e,t,r){t=_m(t,e);for(var i=-1,s=t.length,l=!1;++i<s;){var c=tp(t[i]);if(!(l=e!=null&&r(e,c)))break;e=e[c]}return l||++i!=s?l:(s=e==null?0:e.length,!!s&&eR(s)&&Gw(c,s)&&(za(e)||nm(e)))}function r6(e,t){return e!=null&&n6(e,t,EK)}var xK=1,_K=2;function TK(e,t){return nR(e)&&e6(t)?t6(tp(e),t):function(r){var i=Ve(r,e);return i===void 0&&i===t?r6(r,e):Bb(t,i,xK|_K)}}function CK(e){return function(t){return t?.[e]}}function OK(e){return function(t){return Qw(t,e)}}function RK(e){return nR(e)?CK(tp(e)):OK(e)}function cR(e){return typeof e=="function"?e:e==null?Hw:typeof e=="object"?za(e)?TK(e[0],e[1]):wK(e):RK(e)}function AK(e){return function(t,r,i){for(var s=-1,l=Object(t),c=i(t),f=c.length;f--;){var d=c[++s];if(r(l[d],d,l)===!1)break}return t}}var a6=AK();function i6(e,t){return e&&a6(e,t,ss)}function MK(e,t){return function(r,i){if(r==null)return r;if(!lf(r))return e(r,i);for(var s=r.length,l=-1,c=Object(r);++l<s&&i(c[l],l,c)!==!1;);return r}}var o6=MK(i6);function oC(e,t,r){(r!==void 0&&!Ib(e[t],r)||r===void 0&&!(t in e))&&JO(e,t,r)}function cb(e){return ds(e)&&lf(e)}function sC(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function jK(e){return ep(e,qb(e))}function kK(e,t,r,i,s,l,c){var f=sC(e,r),d=sC(t,r),h=c.get(d);if(h){oC(e,r,h);return}var m=l?l(f,d,r+"",e,t,c):void 0,g=m===void 0;if(g){var v=za(d),w=!v&&Fh(d),b=!v&&!w&&Ub(d);m=d,v||w||b?za(f)?m=f:cb(f)?m=XO(f):w?(g=!1,m=Bz(d,!0)):b?(g=!1,m=Yz(d,!0)):m=[]:Kc(d)||nm(d)?(m=f,nm(f)?m=jK(f):(!In(f)||Pb(f))&&(m=Zz(d))):g=!1}g&&(c.set(d,m),s(m,d,i,l,c),c.delete(d)),oC(e,r,m)}function s6(e,t,r,i,s){e!==t&&a6(t,function(l,c){if(s||(s=new fl),In(l))kK(e,t,c,r,s6,i,s);else{var f=i?i(sC(e,c),l,c+"",e,t,s):void 0;f===void 0&&(f=l),oC(e,c,f)}},qb)}var DK=200;function NK(e,t,r,i){var s=-1,l=WO,c=!0,f=e.length,d=[],h=t.length;if(!f)return d;t.length>=DK&&(l=ub,c=!1,t=new Hh(t));e:for(;++s<f;){var m=e[s],g=m;if(m=m!==0?m:0,c&&g===g){for(var v=h;v--;)if(t[v]===g)continue e;d.push(m)}else l(t,g,i)||d.push(m)}return d}var zK=Yw(function(e,t){return cb(e)?NK(e,Vb(t,1,cb,!0)):[]});function l6(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function u6(e){return typeof e=="function"?e:Hw}function $K(e,t){var r=za(e)?QO:o6;return r(e,u6(t))}var PK=1/0;function IK(e){var t=e==null?0:e.length;return t?Vb(e,PK):[]}var LK=Object.prototype,UK=LK.hasOwnProperty;function qK(e,t){return e!=null&&UK.call(e,t)}function Mn(e,t){return e!=null&&n6(e,t,qK)}var VK="[object String]";function Yc(e){return typeof e=="string"||!za(e)&&ds(e)&&mc(e)==VK}function FK(e,t){return xm(t,function(r){return e[r]})}function BK(e){return e==null?[]:FK(e,ss(e))}var HK=Math.max;function GK(e,t,r,i){e=lf(e)?e:BK(e),r=r?Oz(r):0;var s=e.length;return r<0&&(r=HK(s+r,0)),Yc(e)?r<=s&&e.indexOf(t,r)>-1:!!s&&Mz(e,t,r)>-1}var KK=Math.min;function YK(e,t,r){for(var i=WO,s=e[0].length,l=e.length,c=l,f=Array(l),d=1/0,h=[];c--;){var m=e[c];d=KK(m.length,d),f[c]=s>=120&&m.length>=120?new Hh(c&&m):void 0}m=e[0];var g=-1,v=f[0];e:for(;++g<s&&h.length<d;){var w=m[g],b=w;if(w=w!==0?w:0,!(v?ub(v,b):i(h,b))){for(c=l;--c;){var _=f[c];if(!(_?ub(_,b):i(e[c],b)))continue e}v&&v.push(b),h.push(w)}}return h}function ZK(e){return cb(e)?e:[]}var r3=Yw(function(e){var t=xm(e,ZK);return t.length&&t[0]===e[0]?YK(t):[]});function XK(e,t){return t.length<2?e:Qw(e,hH(t,0,-1))}var QK="[object Map]",WK="[object Set]",JK=Object.prototype,eY=JK.hasOwnProperty;function oa(e){if(e==null)return!0;if(lf(e)&&(za(e)||typeof e=="string"||typeof e.splice=="function"||Fh(e)||Ub(e)||nm(e)))return!e.length;var t=os(e);if(t==QK||t==WK)return!e.size;if(Lb(e))return!Lz(e).length;for(var r in e)if(eY.call(e,r))return!1;return!0}function Pc(e,t){return Bb(e,t)}function tY(e,t,r){r=typeof r=="function"?r:void 0;var i=r?r(e,t):void 0;return i===void 0?Bb(e,t,void 0,r):!!i}var nY="[object Number]";function c6(e){return typeof e=="number"||ds(e)&&mc(e)==nY}function uw(e){return e==null}function f6(e){return e===void 0}var rY=kz(function(e,t,r){s6(e,t,r)}),aY=Object.prototype,iY=aY.hasOwnProperty;function d6(e,t){t=_m(t,e);var r=-1,i=t.length;if(!i)return!0;for(var s=e==null||typeof e!="object"&&typeof e!="function";++r<i;){var l=t[r];if(typeof l=="string"){if(l==="__proto__"&&!iY.call(e,"__proto__"))return!1;if(l==="constructor"&&r+1<i&&typeof t[r+1]=="string"&&t[r+1]==="prototype"){if(s&&r===0)continue;return!1}}}var c=XK(e,t);return c==null||delete c[tp(l6(t))]}function oY(e){return Kc(e)?void 0:e}var sY=1,lY=2,uY=4,fb=qz(function(e,t){var r={};if(e==null)return r;var i=!1;t=xm(t,function(l){return l=_m(l,e),i||(i=l.length>1),l}),ep(e,sR(e),r),i&&(r=Kv(r,sY|lY|uY,oY));for(var s=t.length;s--;)d6(r,t[s]);return r});function fR(e,t,r,i){if(!In(e))return e;t=_m(t,e);for(var s=-1,l=t.length,c=l-1,f=e;f!=null&&++s<l;){var d=tp(t[s]),h=r;if(d==="__proto__"||d==="constructor"||d==="prototype")return e;if(s!=c){var m=f[d];h=i?i(m,d,f):void 0,h===void 0&&(h=In(m)?m:Gw(t[s+1])?[]:{})}Kw(f,d,h),f=f[d]}return e}function h6(e,t,r){for(var i=-1,s=t.length,l={};++i<s;){var c=t[i],f=Qw(e,c);r(f,c)&&fR(l,_m(c,e),f)}return l}function cY(e,t){if(e==null)return{};var r=xm(sR(e),function(i){return[i]});return t=cR(t),h6(e,r,function(i,s){return t(i,s[0])})}function fY(e,t){return h6(e,t,function(r,i){return r6(e,i)})}var dR=qz(function(e,t){return e==null?{}:fY(e,t)});function dY(e,t,r,i,s){return s(e,function(l,c,f){r=i?(i=!1,l):t(r,l,c,f)}),r}function hY(e,t,r){var i=za(e)?pH:dY,s=arguments.length<3;return i(e,cR(t),r,s,o6)}function Gn(e,t,r){return e==null?e:fR(e,t,r)}function pY(e,t,r,i){return i=typeof i=="function"?i:void 0,e==null?e:fR(e,t,r,i)}var mY=9007199254740991,e_=4294967295,gY=Math.min;function p6(e,t){if(e=Oz(e),e<1||e>mY)return[];var r=e_,i=gY(e,e_);t=u6(t),e-=e_;for(var s=Dz(i,t);++r<e;)t(r);return s}function m6(e){return za(e)?xm(e,tp):$b(e)?[e]:XO(Uz(aR(e)))}function yY(e,t,r){var i=za(e),s=i||Fh(e)||Ub(e);if(t=cR(t),r==null){var l=e&&e.constructor;s?r=i?new l:[]:In(e)?r=Pb(l)?Rz(Ww(e)):{}:r={}}return(s?QO:i6)(e,function(c,f,d){return t(r,c,f,d)}),r}var vY=1/0,bY=Fp&&1/uR(new Fp([,-0]))[1]==vY?function(e){return new Fp(e)}:$S,SY=200;function g6(e,t,r){var i=-1,s=WO,l=e.length,c=!0,f=[],d=f;if(l>=SY){var h=bY(e);if(h)return uR(h);c=!1,s=ub,d=new Hh}else d=f;e:for(;++i<l;){var m=e[i],g=m;if(m=m!==0?m:0,c&&g===g){for(var v=d.length;v--;)if(d[v]===g)continue e;f.push(m)}else s(d,g,r)||(d!==f&&d.push(g),f.push(m))}return f}var wY=Yw(function(e){return g6(Vb(e,1,cb,!0))});function y6(e){return e&&e.length?g6(e):[]}var EY=0;function v6(e){var t=++EY;return aR(e)+t}function xY(e,t){return e==null?!0:d6(e,t)}const a3=e=>{let t;const r=new Set,i=(h,m)=>{const g=typeof h=="function"?h(t):h;if(!Object.is(g,t)){const v=t;t=m??(typeof g!="object"||g===null)?g:Object.assign({},t,g),r.forEach(w=>w(t,v))}},s=()=>t,f={setState:i,getState:s,getInitialState:()=>d,subscribe:h=>(r.add(h),()=>r.delete(h))},d=t=e(i,s,f);return f},_Y=(e=>e?a3(e):a3),TY=e=>e;function CY(e,t=TY){const r=Ho.useSyncExternalStore(e.subscribe,Ho.useCallback(()=>t(e.getState()),[e,t]),Ho.useCallback(()=>t(e.getInitialState()),[e,t]));return Ho.useDebugValue(r),r}const OY=e=>{const t=_Y(e),r=i=>CY(t,i);return Object.assign(r,t),r},RY=(e=>OY),Tm=RY()(e=>({tools:{},setToolData:(t,r)=>e(i=>S1(i,`tools.${t}`,{...i.tools[t],...r})),updateOpenaiObject:(t,r,i)=>e(s=>s.tools[t]?.openaiObject?S1(s,`tools.${t}.openaiObject.${r}`,i):s),pushOpenAiLog:(t,r)=>e(i=>{const s=i.tools[t]?.openaiLogs||[];return S1(i,`tools.${t}.openaiLogs`,[...s,{...r,id:crypto.randomUUID()}])}),setOpenInAppUrl:(t,r)=>e(i=>S1(i,`tools.${t}.openInAppUrl`,r))})),Cm=e=>{const{tools:t}=Tm();return t[e]},S1=(e,t,r)=>{const i=Fb(e);return Gn(i,t,r),i};function b6(e,t,r){try{return e(t)}catch(i){return Lq("[nuqs] Error while parsing value `%s`: %O"+(r?" (for key `%s`)":""),t,i,r),null}}function vc(e){function t(r){if(typeof r>"u")return null;let i="";if(Array.isArray(r)){if(r[0]===void 0)return null;i=r[0]}return typeof r=="string"&&(i=r),b6(e.parse,i)}return{type:"single",eq:(r,i)=>r===i,...e,parseServerSide:t,withDefault(r){return{...this,defaultValue:r,parseServerSide(i){return t(i)??r}}},withOptions(r){return{...this,...r}}}}const AY=vc({parse:e=>e,serialize:String});vc({parse:e=>{const t=parseInt(e);return t==t?t:null},serialize:e=>""+Math.round(e)});vc({parse:e=>{const t=parseInt(e);return t==t?t-1:null},serialize:e=>""+Math.round(e+1)});vc({parse:e=>{const t=parseInt(e,16);return t==t?t:null},serialize:e=>{const t=Math.round(e).toString(16);return(t.length&1?"0":"")+t}});vc({parse:e=>{const t=parseFloat(e);return t==t?t:null},serialize:String});vc({parse:e=>e.toLowerCase()==="true",serialize:String});function hR(e,t){return e.valueOf()===t.valueOf()}vc({parse:e=>{const t=parseInt(e);return t==t?new Date(t):null},serialize:e=>""+e.valueOf(),eq:hR});vc({parse:e=>{const t=new Date(e);return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString(),eq:hR});vc({parse:e=>{const t=new Date(e.slice(0,10));return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString().slice(0,10),eq:hR});const t_=BO(),MY={};function jY(e,t={}){const r=j.useId(),i=Kq(),s=Yq(),{history:l="replace",scroll:c=i?.scroll??!1,shallow:f=i?.shallow??!0,throttleMs:d=Bv.timeMs,limitUrlUpdates:h=i?.limitUrlUpdates,clearOnDefault:m=i?.clearOnDefault??!0,startTransition:g,urlKeys:v=MY}=t,w=Object.keys(e).join(","),b=j.useMemo(()=>Object.fromEntries(Object.keys(e).map(D=>[D,v[D]??D])),[w,JSON.stringify(v)]),_=Gq(Object.values(b)),x=_.searchParams,R=j.useRef({}),S=j.useMemo(()=>Object.fromEntries(Object.keys(e).map(D=>[D,e[D].defaultValue??null])),[Object.values(e).map(({defaultValue:D})=>D).join(",")]),T=Yx.useQueuedQueries(Object.values(b)),[E,O]=j.useState(()=>n_(e,v,x??new URLSearchParams,T).state),C=j.useRef(E);if(Lr("[nuq+ %s `%s`] render - state: %O, iSP: %s",r,w,E,x),Object.keys(R.current).join("&")!==Object.values(b).join("&")){const{state:D,hasChanged:$}=n_(e,v,x,T,R.current,C.current);$&&(Lr("[nuq+ %s `%s`] State changed: %O",r,w,{state:D,initialSearchParams:x,queuedQueries:T,queryRef:R.current,stateRef:C.current}),C.current=D,O(D)),R.current=Object.fromEntries(Object.entries(b).map(([q,L])=>[L,e[q]?.type==="multi"?x?.getAll(L):x?.get(L)??null]))}j.useEffect(()=>{const{state:D,hasChanged:$}=n_(e,v,x,T,R.current,C.current);$&&(Lr("[nuq+ %s `%s`] State changed: %O",r,w,{state:D,initialSearchParams:x,queuedQueries:T,queryRef:R.current,stateRef:C.current}),C.current=D,O(D))},[Object.values(b).map(D=>`${D}=${x?.getAll(D)}`).join("&"),JSON.stringify(T)]),j.useEffect(()=>{const D=Object.keys(e).reduce(($,q)=>($[q]=({state:L,query:V})=>{O(F=>{const{defaultValue:re}=e[q],ae=b[q],K=L??re??null,B=F[q]??re??null;return Object.is(B,K)?(Lr("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). no change, skipping, resolved: %O",r,w,ae,L,re,C.current),F):(C.current={...C.current,[q]:K},R.current[ae]=V,Lr("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). updateInternalState, resolved: %O",r,w,ae,L,re,C.current),C.current)})},$),{});for(const $ of Object.keys(e)){const q=b[$];Lr("[nuq+ %s `%s`] Subscribing to sync for `%s`",r,q,w),t_.on(q,D[$])}return()=>{for(const $ of Object.keys(e)){const q=b[$];Lr("[nuq+ %s `%s`] Unsubscribing to sync for `%s`",r,q,w),t_.off(q,D[$])}}},[w,b]);const M=j.useCallback((D,$={})=>{const q=Object.fromEntries(Object.keys(e).map(B=>[B,null])),L=typeof D=="function"?D(i3(C.current,S))??q:D??q;Lr("[nuq+ %s `%s`] setState: %O",r,w,L);let V,F=0,re=!1;const ae=[];for(let[B,Y]of Object.entries(L)){const fe=e[B],se=b[B];if(!fe||Y===void 0)continue;($.clearOnDefault??fe.clearOnDefault??m)&&Y!==null&&fe.defaultValue!==void 0&&(fe.eq??((U,P)=>U===P))(Y,fe.defaultValue)&&(Y=null);const N=Y===null?null:(fe.serialize??String)(Y);t_.emit(se,{state:Y,query:N});const I={key:se,query:N,options:{history:$.history??fe.history??l,shallow:$.shallow??fe.shallow??f,scroll:$.scroll??fe.scroll??c,startTransition:$.startTransition??fe.startTransition??g}};if($?.limitUrlUpdates?.method==="debounce"||h?.method==="debounce"||fe.limitUrlUpdates?.method==="debounce"){I.options.shallow===!0&&console.warn(zb(422));const U=$?.limitUrlUpdates?.timeMs??h?.timeMs??fe.limitUrlUpdates?.timeMs??Bv.timeMs,P=Yx.push(I,U,_,s);F<U&&(V=P,F=U)}else{const U=$?.limitUrlUpdates?.timeMs??fe?.limitUrlUpdates?.timeMs??h?.timeMs??$.throttleMs??fe.throttleMs??d;ae.push(Yx.abort(se)),NS.push(I,U),re=!0}}const K=ae.reduce((B,Y)=>Y(B),re?NS.flush(_,s):NS.getPendingPromise(_));return V??K},[w,l,f,c,d,h?.method,h?.timeMs,g,b,_.updateUrl,_.getSearchParamsSnapshot,_.rateLimitFactor,s,S]);return[j.useMemo(()=>i3(E,S),[E,S]),M]}function n_(e,t,r,i,s,l){let c=!1;const f=Object.entries(e).reduce((d,[h,m])=>{const g=t?.[h]??h,v=i[g],w=m.type==="multi"?[]:null,b=v===void 0?(m.type==="multi"?r?.getAll(g):r?.get(g))??w:v;return s&&l&&lz(s[g]??w,b)?(d[h]=l[h]??null,d):(c=!0,d[h]=(Qq(b)?null:b6(m.parse,b,g))??null,s&&(s[g]=b),d)},{});if(!c){const d=Object.keys(e),h=Object.keys(l??{});c=d.length!==h.length||d.some(m=>!h.includes(m))}return{state:f,hasChanged:c}}function i3(e,t){return Object.fromEntries(Object.keys(e).map(r=>[r,e[r]??t[r]??null]))}function kY(e,t={}){const{parse:r,type:i,serialize:s,eq:l,defaultValue:c,...f}=t,[{[e]:d},h]=jY({[e]:{parse:r??(m=>m),type:i,serialize:s,eq:l,defaultValue:c}},f);return[d,j.useCallback((m,g={})=>h(v=>({[e]:typeof m=="function"?m(v[e]):m}),g),[e,h])]}function pR(){return kY("tool",AY)}const DY=Object.freeze({status:"aborted"});function De(e,t,r){function i(f,d){if(f._zod||Object.defineProperty(f,"_zod",{value:{def:d,constr:c,traits:new Set},enumerable:!1}),f._zod.traits.has(e))return;f._zod.traits.add(e),t(f,d);const h=c.prototype,m=Object.keys(h);for(let g=0;g<m.length;g++){const v=m[g];v in f||(f[v]=h[v].bind(f))}}const s=r?.Parent??Object;class l extends s{}Object.defineProperty(l,"name",{value:e});function c(f){var d;const h=r?.Parent?new l:this;i(h,f),(d=h._zod).deferred??(d.deferred=[]);for(const m of h._zod.deferred)m();return h}return Object.defineProperty(c,"init",{value:i}),Object.defineProperty(c,Symbol.hasInstance,{value:f=>r?.Parent&&f instanceof r.Parent?!0:f?._zod?.traits?.has(e)}),Object.defineProperty(c,"name",{value:e}),c}class Bp extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class S6 extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const w6={};function Zc(e){return w6}function E6(e){const t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,s])=>t.indexOf(+i)===-1).map(([i,s])=>s)}function lC(e,t){return typeof t=="bigint"?t.toString():t}function Jw(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function mR(e){return e==null}function gR(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function NY(e,t){const r=(e.toString().split(".")[1]||"").length,i=t.toString();let s=(i.split(".")[1]||"").length;if(s===0&&/\d?e-\d?/.test(i)){const d=i.match(/\d?e-(\d?)/);d?.[1]&&(s=Number.parseInt(d[1]))}const l=r>s?r:s,c=Number.parseInt(e.toFixed(l).replace(".","")),f=Number.parseInt(t.toFixed(l).replace(".",""));return c%f/10**l}const o3=Symbol("evaluating");function Kn(e,t,r){let i;Object.defineProperty(e,t,{get(){if(i!==o3)return i===void 0&&(i=o3,i=r()),i},set(s){Object.defineProperty(e,t,{value:s})},configurable:!0})}function np(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function uf(...e){const t={};for(const r of e){const i=Object.getOwnPropertyDescriptors(r);Object.assign(t,i)}return Object.defineProperties({},t)}function s3(e){return JSON.stringify(e)}function zY(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const x6="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function db(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const $Y=Jw(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function am(e){if(db(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(db(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function _6(e){return am(e)?{...e}:Array.isArray(e)?[...e]:e}const PY=new Set(["string","number","symbol"]);function im(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function cf(e,t,r){const i=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(i._zod.parent=e),i}function St(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function IY(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const LY={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function UY(e,t){const r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const l=uf(e._zod.def,{get shape(){const c={};for(const f in t){if(!(f in r.shape))throw new Error(`Unrecognized key: "${f}"`);t[f]&&(c[f]=r.shape[f])}return np(this,"shape",c),c},checks:[]});return cf(e,l)}function qY(e,t){const r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const l=uf(e._zod.def,{get shape(){const c={...e._zod.def.shape};for(const f in t){if(!(f in r.shape))throw new Error(`Unrecognized key: "${f}"`);t[f]&&delete c[f]}return np(this,"shape",c),c},checks:[]});return cf(e,l)}function VY(e,t){if(!am(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0){const l=e._zod.def.shape;for(const c in t)if(Object.getOwnPropertyDescriptor(l,c)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const s=uf(e._zod.def,{get shape(){const l={...e._zod.def.shape,...t};return np(this,"shape",l),l}});return cf(e,s)}function FY(e,t){if(!am(t))throw new Error("Invalid input to safeExtend: expected a plain object");const r=uf(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return np(this,"shape",i),i}});return cf(e,r)}function BY(e,t){const r=uf(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t._zod.def.shape};return np(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:[]});return cf(e,r)}function HY(e,t,r){const s=t._zod.def.checks;if(s&&s.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const c=uf(t._zod.def,{get shape(){const f=t._zod.def.shape,d={...f};if(r)for(const h in r){if(!(h in f))throw new Error(`Unrecognized key: "${h}"`);r[h]&&(d[h]=e?new e({type:"optional",innerType:f[h]}):f[h])}else for(const h in f)d[h]=e?new e({type:"optional",innerType:f[h]}):f[h];return np(this,"shape",d),d},checks:[]});return cf(t,c)}function GY(e,t,r){const i=uf(t._zod.def,{get shape(){const s=t._zod.def.shape,l={...s};if(r)for(const c in r){if(!(c in l))throw new Error(`Unrecognized key: "${c}"`);r[c]&&(l[c]=new e({type:"nonoptional",innerType:s[c]}))}else for(const c in s)l[c]=new e({type:"nonoptional",innerType:s[c]});return np(this,"shape",l),l}});return cf(t,i)}function kp(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function Dp(e,t){return t.map(r=>{var i;return(i=r).path??(i.path=[]),r.path.unshift(e),r})}function w1(e){return typeof e=="string"?e:e?.message}function Xc(e,t,r){const i={...e,path:e.path??[]};if(!e.message){const s=w1(e.inst?._zod.def?.error?.(e))??w1(t?.error?.(e))??w1(r.customError?.(e))??w1(r.localeError?.(e))??"Invalid input";i.message=s}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}function yR(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function hb(...e){const[t,r,i]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:i}:{...t}}const T6=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,lC,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},C6=De("$ZodError",T6),O6=De("$ZodError",T6,{Parent:Error});function KY(e,t=r=>r.message){const r={},i=[];for(const s of e.issues)s.path.length>0?(r[s.path[0]]=r[s.path[0]]||[],r[s.path[0]].push(t(s))):i.push(t(s));return{formErrors:i,fieldErrors:r}}function YY(e,t=r=>r.message){const r={_errors:[]},i=s=>{for(const l of s.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(c=>i({issues:c}));else if(l.code==="invalid_key")i({issues:l.issues});else if(l.code==="invalid_element")i({issues:l.issues});else if(l.path.length===0)r._errors.push(t(l));else{let c=r,f=0;for(;f<l.path.length;){const d=l.path[f];f===l.path.length-1?(c[d]=c[d]||{_errors:[]},c[d]._errors.push(t(l))):c[d]=c[d]||{_errors:[]},c=c[d],f++}}};return i(e),r}const vR=e=>(t,r,i,s)=>{const l=i?Object.assign(i,{async:!1}):{async:!1},c=t._zod.run({value:r,issues:[]},l);if(c instanceof Promise)throw new Bp;if(c.issues.length){const f=new(s?.Err??e)(c.issues.map(d=>Xc(d,l,Zc())));throw x6(f,s?.callee),f}return c.value},bR=e=>async(t,r,i,s)=>{const l=i?Object.assign(i,{async:!0}):{async:!0};let c=t._zod.run({value:r,issues:[]},l);if(c instanceof Promise&&(c=await c),c.issues.length){const f=new(s?.Err??e)(c.issues.map(d=>Xc(d,l,Zc())));throw x6(f,s?.callee),f}return c.value},e2=e=>(t,r,i)=>{const s=i?{...i,async:!1}:{async:!1},l=t._zod.run({value:r,issues:[]},s);if(l instanceof Promise)throw new Bp;return l.issues.length?{success:!1,error:new(e??C6)(l.issues.map(c=>Xc(c,s,Zc())))}:{success:!0,data:l.value}},R6=e2(O6),t2=e=>async(t,r,i)=>{const s=i?Object.assign(i,{async:!0}):{async:!0};let l=t._zod.run({value:r,issues:[]},s);return l instanceof Promise&&(l=await l),l.issues.length?{success:!1,error:new e(l.issues.map(c=>Xc(c,s,Zc())))}:{success:!0,data:l.value}},ZY=t2(O6),XY=e=>(t,r,i)=>{const s=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return vR(e)(t,r,s)},QY=e=>(t,r,i)=>vR(e)(t,r,i),WY=e=>async(t,r,i)=>{const s=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return bR(e)(t,r,s)},JY=e=>async(t,r,i)=>bR(e)(t,r,i),eZ=e=>(t,r,i)=>{const s=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return e2(e)(t,r,s)},tZ=e=>(t,r,i)=>e2(e)(t,r,i),nZ=e=>async(t,r,i)=>{const s=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return t2(e)(t,r,s)},rZ=e=>async(t,r,i)=>t2(e)(t,r,i),aZ=/^[cC][^\s-]{8,}$/,iZ=/^[0-9a-z]+$/,oZ=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,sZ=/^[0-9a-vA-V]{20}$/,lZ=/^[A-Za-z0-9]{27}$/,uZ=/^[a-zA-Z0-9_-]{21}$/,cZ=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,fZ=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,l3=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,dZ=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,hZ="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function pZ(){return new RegExp(hZ,"u")}const mZ=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,gZ=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,yZ=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,vZ=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,bZ=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,A6=/^[A-Za-z0-9_-]*$/,SZ=/^\+[1-9]\d{6,14}$/,M6="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",wZ=new RegExp(`^${M6}$`);function j6(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function EZ(e){return new RegExp(`^${j6(e)}$`)}function xZ(e){const t=j6({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const i=`${t}(?:${r.join("|")})`;return new RegExp(`^${M6}T(?:${i})$`)}const _Z=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},TZ=/^-?\d+$/,k6=/^-?\d+(?:\.\d+)?$/,CZ=/^(?:true|false)$/i,OZ=/^null$/i,RZ=/^[^A-Z]*$/,AZ=/^[^a-z]*$/,lo=De("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),D6={number:"number",bigint:"bigint",object:"date"},N6=De("$ZodCheckLessThan",(e,t)=>{lo.init(e,t);const r=D6[typeof t.value];e._zod.onattach.push(i=>{const s=i._zod.bag,l=(t.inclusive?s.maximum:s.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<l&&(t.inclusive?s.maximum=t.value:s.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),z6=De("$ZodCheckGreaterThan",(e,t)=>{lo.init(e,t);const r=D6[typeof t.value];e._zod.onattach.push(i=>{const s=i._zod.bag,l=(t.inclusive?s.minimum:s.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>l&&(t.inclusive?s.minimum=t.value:s.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),MZ=De("$ZodCheckMultipleOf",(e,t)=>{lo.init(e,t),e._zod.onattach.push(r=>{var i;(i=r._zod.bag).multipleOf??(i.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):NY(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),jZ=De("$ZodCheckNumberFormat",(e,t)=>{lo.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),i=r?"int":"number",[s,l]=LY[t.format];e._zod.onattach.push(c=>{const f=c._zod.bag;f.format=t.format,f.minimum=s,f.maximum=l,r&&(f.pattern=TZ)}),e._zod.check=c=>{const f=c.value;if(r){if(!Number.isInteger(f)){c.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:f,inst:e});return}if(!Number.isSafeInteger(f)){f>0?c.issues.push({input:f,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):c.issues.push({input:f,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}f<s&&c.issues.push({origin:"number",input:f,code:"too_small",minimum:s,inclusive:!0,inst:e,continue:!t.abort}),f>l&&c.issues.push({origin:"number",input:f,code:"too_big",maximum:l,inclusive:!0,inst:e,continue:!t.abort})}}),kZ=De("$ZodCheckMaxLength",(e,t)=>{var r;lo.init(e,t),(r=e._zod.def).when??(r.when=i=>{const s=i.value;return!mR(s)&&s.length!==void 0}),e._zod.onattach.push(i=>{const s=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<s&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{const s=i.value;if(s.length<=t.maximum)return;const c=yR(s);i.issues.push({origin:c,code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),DZ=De("$ZodCheckMinLength",(e,t)=>{var r;lo.init(e,t),(r=e._zod.def).when??(r.when=i=>{const s=i.value;return!mR(s)&&s.length!==void 0}),e._zod.onattach.push(i=>{const s=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>s&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{const s=i.value;if(s.length>=t.minimum)return;const c=yR(s);i.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),NZ=De("$ZodCheckLengthEquals",(e,t)=>{var r;lo.init(e,t),(r=e._zod.def).when??(r.when=i=>{const s=i.value;return!mR(s)&&s.length!==void 0}),e._zod.onattach.push(i=>{const s=i._zod.bag;s.minimum=t.length,s.maximum=t.length,s.length=t.length}),e._zod.check=i=>{const s=i.value,l=s.length;if(l===t.length)return;const c=yR(s),f=l>t.length;i.issues.push({origin:c,...f?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),n2=De("$ZodCheckStringFormat",(e,t)=>{var r,i;lo.init(e,t),e._zod.onattach.push(s=>{const l=s._zod.bag;l.format=t.format,t.pattern&&(l.patterns??(l.patterns=new Set),l.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=s=>{t.pattern.lastIndex=0,!t.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:t.format,input:s.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),zZ=De("$ZodCheckRegex",(e,t)=>{n2.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),$Z=De("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=RZ),n2.init(e,t)}),PZ=De("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=AZ),n2.init(e,t)}),IZ=De("$ZodCheckIncludes",(e,t)=>{lo.init(e,t);const r=im(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=i,e._zod.onattach.push(s=>{const l=s._zod.bag;l.patterns??(l.patterns=new Set),l.patterns.add(i)}),e._zod.check=s=>{s.value.includes(t.includes,t.position)||s.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:s.value,inst:e,continue:!t.abort})}}),LZ=De("$ZodCheckStartsWith",(e,t)=>{lo.init(e,t);const r=new RegExp(`^${im(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{const s=i._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(r)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),UZ=De("$ZodCheckEndsWith",(e,t)=>{lo.init(e,t);const r=new RegExp(`.*${im(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{const s=i._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(r)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}}),qZ=De("$ZodCheckOverwrite",(e,t)=>{lo.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class VZ{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const i=t.split(`
11
+ `).filter(c=>c),s=Math.min(...i.map(c=>c.length-c.trimStart().length)),l=i.map(c=>c.slice(s)).map(c=>" ".repeat(this.indent*2)+c);for(const c of l)this.content.push(c)}compile(){const t=Function,r=this?.args,s=[...(this?.content??[""]).map(l=>` ${l}`)];return new t(...r,s.join(`
12
+ `))}}const FZ={major:4,minor:3,patch:6},Nr=De("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=FZ;const i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(const s of i)for(const l of s._zod.onattach)l(e);if(i.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const s=(c,f,d)=>{let h=kp(c),m;for(const g of f){if(g._zod.def.when){if(!g._zod.def.when(c))continue}else if(h)continue;const v=c.issues.length,w=g._zod.check(c);if(w instanceof Promise&&d?.async===!1)throw new Bp;if(m||w instanceof Promise)m=(m??Promise.resolve()).then(async()=>{await w,c.issues.length!==v&&(h||(h=kp(c,v)))});else{if(c.issues.length===v)continue;h||(h=kp(c,v))}}return m?m.then(()=>c):c},l=(c,f,d)=>{if(kp(c))return c.aborted=!0,c;const h=s(f,i,d);if(h instanceof Promise){if(d.async===!1)throw new Bp;return h.then(m=>e._zod.parse(m,d))}return e._zod.parse(h,d)};e._zod.run=(c,f)=>{if(f.skipChecks)return e._zod.parse(c,f);if(f.direction==="backward"){const h=e._zod.parse({value:c.value,issues:[]},{...f,skipChecks:!0});return h instanceof Promise?h.then(m=>l(m,c,f)):l(h,c,f)}const d=e._zod.parse(c,f);if(d instanceof Promise){if(f.async===!1)throw new Bp;return d.then(h=>s(h,i,f))}return s(d,i,f)}}Kn(e,"~standard",()=>({validate:s=>{try{const l=R6(e,s);return l.success?{value:l.data}:{issues:l.error?.issues}}catch{return ZY(e,s).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},vendor:"zod",version:1}))}),SR=De("$ZodString",(e,t)=>{Nr.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??_Z(e._zod.bag),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),Ur=De("$ZodStringFormat",(e,t)=>{n2.init(e,t),SR.init(e,t)}),BZ=De("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=fZ),Ur.init(e,t)}),HZ=De("$ZodUUID",(e,t)=>{if(t.version){const i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=l3(i))}else t.pattern??(t.pattern=l3());Ur.init(e,t)}),GZ=De("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=dZ),Ur.init(e,t)}),KZ=De("$ZodURL",(e,t)=>{Ur.init(e,t),e._zod.check=r=>{try{const i=r.value.trim(),s=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(s.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=s.href:r.value=i;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),YZ=De("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=pZ()),Ur.init(e,t)}),ZZ=De("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=uZ),Ur.init(e,t)}),XZ=De("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=aZ),Ur.init(e,t)}),QZ=De("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=iZ),Ur.init(e,t)}),WZ=De("$ZodULID",(e,t)=>{t.pattern??(t.pattern=oZ),Ur.init(e,t)}),JZ=De("$ZodXID",(e,t)=>{t.pattern??(t.pattern=sZ),Ur.init(e,t)}),eX=De("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=lZ),Ur.init(e,t)}),tX=De("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=xZ(t)),Ur.init(e,t)}),nX=De("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=wZ),Ur.init(e,t)}),rX=De("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=EZ(t)),Ur.init(e,t)}),aX=De("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=cZ),Ur.init(e,t)}),iX=De("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=mZ),Ur.init(e,t),e._zod.bag.format="ipv4"}),oX=De("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=gZ),Ur.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),sX=De("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=yZ),Ur.init(e,t)}),lX=De("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=vZ),Ur.init(e,t),e._zod.check=r=>{const i=r.value.split("/");try{if(i.length!==2)throw new Error;const[s,l]=i;if(!l)throw new Error;const c=Number(l);if(`${c}`!==l)throw new Error;if(c<0||c>128)throw new Error;new URL(`http://[${s}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function $6(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const uX=De("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=bZ),Ur.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{$6(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function cX(e){if(!A6.test(e))return!1;const t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return $6(r)}const fX=De("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=A6),Ur.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{cX(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),dX=De("$ZodE164",(e,t)=>{t.pattern??(t.pattern=SZ),Ur.init(e,t)});function hX(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[i]=r;if(!i)return!1;const s=JSON.parse(atob(i));return!("typ"in s&&s?.typ!=="JWT"||!s.alg||t&&(!("alg"in s)||s.alg!==t))}catch{return!1}}const pX=De("$ZodJWT",(e,t)=>{Ur.init(e,t),e._zod.check=r=>{hX(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),P6=De("$ZodNumber",(e,t)=>{Nr.init(e,t),e._zod.pattern=e._zod.bag.pattern??k6,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}const s=r.value;if(typeof s=="number"&&!Number.isNaN(s)&&Number.isFinite(s))return r;const l=typeof s=="number"?Number.isNaN(s)?"NaN":Number.isFinite(s)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:s,inst:e,...l?{received:l}:{}}),r}}),mX=De("$ZodNumberFormat",(e,t)=>{jZ.init(e,t),P6.init(e,t)}),gX=De("$ZodBoolean",(e,t)=>{Nr.init(e,t),e._zod.pattern=CZ,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=!!r.value}catch{}const s=r.value;return typeof s=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:s,inst:e}),r}}),yX=De("$ZodNull",(e,t)=>{Nr.init(e,t),e._zod.pattern=OZ,e._zod.values=new Set([null]),e._zod.parse=(r,i)=>{const s=r.value;return s===null||r.issues.push({expected:"null",code:"invalid_type",input:s,inst:e}),r}}),vX=De("$ZodAny",(e,t)=>{Nr.init(e,t),e._zod.parse=r=>r}),bX=De("$ZodUnknown",(e,t)=>{Nr.init(e,t),e._zod.parse=r=>r}),SX=De("$ZodNever",(e,t)=>{Nr.init(e,t),e._zod.parse=(r,i)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function u3(e,t,r){e.issues.length&&t.issues.push(...Dp(r,e.issues)),t.value[r]=e.value}const wX=De("$ZodArray",(e,t)=>{Nr.init(e,t),e._zod.parse=(r,i)=>{const s=r.value;if(!Array.isArray(s))return r.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),r;r.value=Array(s.length);const l=[];for(let c=0;c<s.length;c++){const f=s[c],d=t.element._zod.run({value:f,issues:[]},i);d instanceof Promise?l.push(d.then(h=>u3(h,r,c))):u3(d,r,c)}return l.length?Promise.all(l).then(()=>r):r}});function cw(e,t,r,i,s){if(e.issues.length){if(s&&!(r in i))return;t.issues.push(...Dp(r,e.issues))}e.value===void 0?r in i&&(t.value[r]=void 0):t.value[r]=e.value}function I6(e){const t=Object.keys(e.shape);for(const i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);const r=IY(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function L6(e,t,r,i,s,l){const c=[],f=s.keySet,d=s.catchall._zod,h=d.def.type,m=d.optout==="optional";for(const g in t){if(f.has(g))continue;if(h==="never"){c.push(g);continue}const v=d.run({value:t[g],issues:[]},i);v instanceof Promise?e.push(v.then(w=>cw(w,r,g,t,m))):cw(v,r,g,t,m)}return c.length&&r.issues.push({code:"unrecognized_keys",keys:c,input:t,inst:l}),e.length?Promise.all(e).then(()=>r):r}const EX=De("$ZodObject",(e,t)=>{if(Nr.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const f=t.shape;Object.defineProperty(t,"shape",{get:()=>{const d={...f};return Object.defineProperty(t,"shape",{value:d}),d}})}const i=Jw(()=>I6(t));Kn(e._zod,"propValues",()=>{const f=t.shape,d={};for(const h in f){const m=f[h]._zod;if(m.values){d[h]??(d[h]=new Set);for(const g of m.values)d[h].add(g)}}return d});const s=db,l=t.catchall;let c;e._zod.parse=(f,d)=>{c??(c=i.value);const h=f.value;if(!s(h))return f.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),f;f.value={};const m=[],g=c.shape;for(const v of c.keys){const w=g[v],b=w._zod.optout==="optional",_=w._zod.run({value:h[v],issues:[]},d);_ instanceof Promise?m.push(_.then(x=>cw(x,f,v,h,b))):cw(_,f,v,h,b)}return l?L6(m,h,f,d,i.value,e):m.length?Promise.all(m).then(()=>f):f}}),xX=De("$ZodObjectJIT",(e,t)=>{EX.init(e,t);const r=e._zod.parse,i=Jw(()=>I6(t)),s=v=>{const w=new VZ(["shape","payload","ctx"]),b=i.value,_=T=>{const E=s3(T);return`shape[${E}]._zod.run({ value: input[${E}], issues: [] }, ctx)`};w.write("const input = payload.value;");const x=Object.create(null);let R=0;for(const T of b.keys)x[T]=`key_${R++}`;w.write("const newResult = {};");for(const T of b.keys){const E=x[T],O=s3(T),M=v[T]?._zod?.optout==="optional";w.write(`const ${E} = ${_(T)};`),M?w.write(`
13
+ if (${E}.issues.length) {
14
+ if (${O} in input) {
15
+ payload.issues = payload.issues.concat(${E}.issues.map(iss => ({
16
+ ...iss,
17
+ path: iss.path ? [${O}, ...iss.path] : [${O}]
18
+ })));
19
+ }
20
+ }
21
+
22
+ if (${E}.value === undefined) {
23
+ if (${O} in input) {
24
+ newResult[${O}] = undefined;
25
+ }
26
+ } else {
27
+ newResult[${O}] = ${E}.value;
28
+ }
29
+
30
+ `):w.write(`
31
+ if (${E}.issues.length) {
32
+ payload.issues = payload.issues.concat(${E}.issues.map(iss => ({
33
+ ...iss,
34
+ path: iss.path ? [${O}, ...iss.path] : [${O}]
35
+ })));
36
+ }
37
+
38
+ if (${E}.value === undefined) {
39
+ if (${O} in input) {
40
+ newResult[${O}] = undefined;
41
+ }
42
+ } else {
43
+ newResult[${O}] = ${E}.value;
44
+ }
45
+
46
+ `)}w.write("payload.value = newResult;"),w.write("return payload;");const S=w.compile();return(T,E)=>S(v,T,E)};let l;const c=db,f=!w6.jitless,h=f&&$Y.value,m=t.catchall;let g;e._zod.parse=(v,w)=>{g??(g=i.value);const b=v.value;return c(b)?f&&h&&w?.async===!1&&w.jitless!==!0?(l||(l=s(t.shape)),v=l(v,w),m?L6([],b,v,w,g,e):v):r(v,w):(v.issues.push({expected:"object",code:"invalid_type",input:b,inst:e}),v)}});function c3(e,t,r,i){for(const l of e)if(l.issues.length===0)return t.value=l.value,t;const s=e.filter(l=>!kp(l));return s.length===1?(t.value=s[0].value,s[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(l=>l.issues.map(c=>Xc(c,i,Zc())))}),t)}const U6=De("$ZodUnion",(e,t)=>{Nr.init(e,t),Kn(e._zod,"optin",()=>t.options.some(s=>s._zod.optin==="optional")?"optional":void 0),Kn(e._zod,"optout",()=>t.options.some(s=>s._zod.optout==="optional")?"optional":void 0),Kn(e._zod,"values",()=>{if(t.options.every(s=>s._zod.values))return new Set(t.options.flatMap(s=>Array.from(s._zod.values)))}),Kn(e._zod,"pattern",()=>{if(t.options.every(s=>s._zod.pattern)){const s=t.options.map(l=>l._zod.pattern);return new RegExp(`^(${s.map(l=>gR(l.source)).join("|")})$`)}});const r=t.options.length===1,i=t.options[0]._zod.run;e._zod.parse=(s,l)=>{if(r)return i(s,l);let c=!1;const f=[];for(const d of t.options){const h=d._zod.run({value:s.value,issues:[]},l);if(h instanceof Promise)f.push(h),c=!0;else{if(h.issues.length===0)return h;f.push(h)}}return c?Promise.all(f).then(d=>c3(d,s,e,l)):c3(f,s,e,l)}}),_X=De("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,U6.init(e,t);const r=e._zod.parse;Kn(e._zod,"propValues",()=>{const s={};for(const l of t.options){const c=l._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(l)}"`);for(const[f,d]of Object.entries(c)){s[f]||(s[f]=new Set);for(const h of d)s[f].add(h)}}return s});const i=Jw(()=>{const s=t.options,l=new Map;for(const c of s){const f=c._zod.propValues?.[t.discriminator];if(!f||f.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(c)}"`);for(const d of f){if(l.has(d))throw new Error(`Duplicate discriminator value "${String(d)}"`);l.set(d,c)}}return l});e._zod.parse=(s,l)=>{const c=s.value;if(!db(c))return s.issues.push({code:"invalid_type",expected:"object",input:c,inst:e}),s;const f=i.value.get(c?.[t.discriminator]);return f?f._zod.run(s,l):t.unionFallback?r(s,l):(s.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:c,path:[t.discriminator],inst:e}),s)}}),TX=De("$ZodIntersection",(e,t)=>{Nr.init(e,t),e._zod.parse=(r,i)=>{const s=r.value,l=t.left._zod.run({value:s,issues:[]},i),c=t.right._zod.run({value:s,issues:[]},i);return l instanceof Promise||c instanceof Promise?Promise.all([l,c]).then(([d,h])=>f3(r,d,h)):f3(r,l,c)}});function uC(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(am(e)&&am(t)){const r=Object.keys(t),i=Object.keys(e).filter(l=>r.indexOf(l)!==-1),s={...e,...t};for(const l of i){const c=uC(e[l],t[l]);if(!c.valid)return{valid:!1,mergeErrorPath:[l,...c.mergeErrorPath]};s[l]=c.data}return{valid:!0,data:s}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let i=0;i<e.length;i++){const s=e[i],l=t[i],c=uC(s,l);if(!c.valid)return{valid:!1,mergeErrorPath:[i,...c.mergeErrorPath]};r.push(c.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function f3(e,t,r){const i=new Map;let s;for(const f of t.issues)if(f.code==="unrecognized_keys"){s??(s=f);for(const d of f.keys)i.has(d)||i.set(d,{}),i.get(d).l=!0}else e.issues.push(f);for(const f of r.issues)if(f.code==="unrecognized_keys")for(const d of f.keys)i.has(d)||i.set(d,{}),i.get(d).r=!0;else e.issues.push(f);const l=[...i].filter(([,f])=>f.l&&f.r).map(([f])=>f);if(l.length&&s&&e.issues.push({...s,keys:l}),kp(e))return e;const c=uC(t.value,r.value);if(!c.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`);return e.value=c.data,e}const CX=De("$ZodRecord",(e,t)=>{Nr.init(e,t),e._zod.parse=(r,i)=>{const s=r.value;if(!am(s))return r.issues.push({expected:"record",code:"invalid_type",input:s,inst:e}),r;const l=[],c=t.keyType._zod.values;if(c){r.value={};const f=new Set;for(const h of c)if(typeof h=="string"||typeof h=="number"||typeof h=="symbol"){f.add(typeof h=="number"?h.toString():h);const m=t.valueType._zod.run({value:s[h],issues:[]},i);m instanceof Promise?l.push(m.then(g=>{g.issues.length&&r.issues.push(...Dp(h,g.issues)),r.value[h]=g.value})):(m.issues.length&&r.issues.push(...Dp(h,m.issues)),r.value[h]=m.value)}let d;for(const h in s)f.has(h)||(d=d??[],d.push(h));d&&d.length>0&&r.issues.push({code:"unrecognized_keys",input:s,inst:e,keys:d})}else{r.value={};for(const f of Reflect.ownKeys(s)){if(f==="__proto__")continue;let d=t.keyType._zod.run({value:f,issues:[]},i);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof f=="string"&&k6.test(f)&&d.issues.length){const g=t.keyType._zod.run({value:Number(f),issues:[]},i);if(g instanceof Promise)throw new Error("Async schemas not supported in object keys currently");g.issues.length===0&&(d=g)}if(d.issues.length){t.mode==="loose"?r.value[f]=s[f]:r.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(g=>Xc(g,i,Zc())),input:f,path:[f],inst:e});continue}const m=t.valueType._zod.run({value:s[f],issues:[]},i);m instanceof Promise?l.push(m.then(g=>{g.issues.length&&r.issues.push(...Dp(f,g.issues)),r.value[d.value]=g.value})):(m.issues.length&&r.issues.push(...Dp(f,m.issues)),r.value[d.value]=m.value)}}return l.length?Promise.all(l).then(()=>r):r}}),OX=De("$ZodEnum",(e,t)=>{Nr.init(e,t);const r=E6(t.entries),i=new Set(r);e._zod.values=i,e._zod.pattern=new RegExp(`^(${r.filter(s=>PY.has(typeof s)).map(s=>typeof s=="string"?im(s):s.toString()).join("|")})$`),e._zod.parse=(s,l)=>{const c=s.value;return i.has(c)||s.issues.push({code:"invalid_value",values:r,input:c,inst:e}),s}}),RX=De("$ZodLiteral",(e,t)=>{if(Nr.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(i=>typeof i=="string"?im(i):i?im(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,s)=>{const l=i.value;return r.has(l)||i.issues.push({code:"invalid_value",values:t.values,input:l,inst:e}),i}}),AX=De("$ZodTransform",(e,t)=>{Nr.init(e,t),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new S6(e.constructor.name);const s=t.transform(r.value,r);if(i.async)return(s instanceof Promise?s:Promise.resolve(s)).then(c=>(r.value=c,r));if(s instanceof Promise)throw new Bp;return r.value=s,r}});function d3(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const q6=De("$ZodOptional",(e,t)=>{Nr.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Kn(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Kn(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${gR(r.source)})?$`):void 0}),e._zod.parse=(r,i)=>{if(t.innerType._zod.optin==="optional"){const s=t.innerType._zod.run(r,i);return s instanceof Promise?s.then(l=>d3(l,r.value)):d3(s,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,i)}}),MX=De("$ZodExactOptional",(e,t)=>{q6.init(e,t),Kn(e._zod,"values",()=>t.innerType._zod.values),Kn(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,i)=>t.innerType._zod.run(r,i)}),jX=De("$ZodNullable",(e,t)=>{Nr.init(e,t),Kn(e._zod,"optin",()=>t.innerType._zod.optin),Kn(e._zod,"optout",()=>t.innerType._zod.optout),Kn(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${gR(r.source)}|null)$`):void 0}),Kn(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,i)=>r.value===null?r:t.innerType._zod.run(r,i)}),kX=De("$ZodDefault",(e,t)=>{Nr.init(e,t),e._zod.optin="optional",Kn(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);if(r.value===void 0)return r.value=t.defaultValue,r;const s=t.innerType._zod.run(r,i);return s instanceof Promise?s.then(l=>h3(l,t)):h3(s,t)}});function h3(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const DX=De("$ZodPrefault",(e,t)=>{Nr.init(e,t),e._zod.optin="optional",Kn(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>(i.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,i))}),NX=De("$ZodNonOptional",(e,t)=>{Nr.init(e,t),Kn(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(i=>i!==void 0)):void 0}),e._zod.parse=(r,i)=>{const s=t.innerType._zod.run(r,i);return s instanceof Promise?s.then(l=>p3(l,e)):p3(s,e)}});function p3(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const zX=De("$ZodCatch",(e,t)=>{Nr.init(e,t),Kn(e._zod,"optin",()=>t.innerType._zod.optin),Kn(e._zod,"optout",()=>t.innerType._zod.optout),Kn(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);const s=t.innerType._zod.run(r,i);return s instanceof Promise?s.then(l=>(r.value=l.value,l.issues.length&&(r.value=t.catchValue({...r,error:{issues:l.issues.map(c=>Xc(c,i,Zc()))},input:r.value}),r.issues=[]),r)):(r.value=s.value,s.issues.length&&(r.value=t.catchValue({...r,error:{issues:s.issues.map(l=>Xc(l,i,Zc()))},input:r.value}),r.issues=[]),r)}}),$X=De("$ZodPipe",(e,t)=>{Nr.init(e,t),Kn(e._zod,"values",()=>t.in._zod.values),Kn(e._zod,"optin",()=>t.in._zod.optin),Kn(e._zod,"optout",()=>t.out._zod.optout),Kn(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,i)=>{if(i.direction==="backward"){const l=t.out._zod.run(r,i);return l instanceof Promise?l.then(c=>E1(c,t.in,i)):E1(l,t.in,i)}const s=t.in._zod.run(r,i);return s instanceof Promise?s.then(l=>E1(l,t.out,i)):E1(s,t.out,i)}});function E1(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const PX=De("$ZodReadonly",(e,t)=>{Nr.init(e,t),Kn(e._zod,"propValues",()=>t.innerType._zod.propValues),Kn(e._zod,"values",()=>t.innerType._zod.values),Kn(e._zod,"optin",()=>t.innerType?._zod?.optin),Kn(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);const s=t.innerType._zod.run(r,i);return s instanceof Promise?s.then(m3):m3(s)}});function m3(e){return e.value=Object.freeze(e.value),e}const IX=De("$ZodCustom",(e,t)=>{lo.init(e,t),Nr.init(e,t),e._zod.parse=(r,i)=>r,e._zod.check=r=>{const i=r.value,s=t.fn(i);if(s instanceof Promise)return s.then(l=>g3(l,r,i,e));g3(s,r,i,e)}});function g3(e,t,r,i){if(!e){const s={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(s.params=i._zod.def.params),t.issues.push(hb(s))}}var y3;class LX{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){const i=r[0];return this._map.set(t,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){const r=t._zod.parent;if(r){const i={...this.get(r)??{}};delete i.id;const s={...i,...this._map.get(t)};return Object.keys(s).length?s:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function UX(){return new LX}(y3=globalThis).__zod_globalRegistry??(y3.__zod_globalRegistry=UX());const Pv=globalThis.__zod_globalRegistry;function qX(e,t){return new e({type:"string",...St(t)})}function VX(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...St(t)})}function v3(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...St(t)})}function FX(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...St(t)})}function BX(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...St(t)})}function HX(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...St(t)})}function GX(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...St(t)})}function V6(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...St(t)})}function KX(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...St(t)})}function YX(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...St(t)})}function ZX(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...St(t)})}function XX(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...St(t)})}function QX(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...St(t)})}function WX(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...St(t)})}function JX(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...St(t)})}function eQ(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...St(t)})}function tQ(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...St(t)})}function nQ(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...St(t)})}function rQ(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...St(t)})}function aQ(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...St(t)})}function iQ(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...St(t)})}function oQ(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...St(t)})}function sQ(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...St(t)})}function lQ(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...St(t)})}function uQ(e,t){return new e({type:"string",format:"date",check:"string_format",...St(t)})}function cQ(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...St(t)})}function fQ(e,t){return new e({type:"string",format:"duration",check:"string_format",...St(t)})}function dQ(e,t){return new e({type:"number",checks:[],...St(t)})}function hQ(e,t){return new e({type:"number",coerce:!0,checks:[],...St(t)})}function pQ(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...St(t)})}function mQ(e,t){return new e({type:"boolean",...St(t)})}function gQ(e,t){return new e({type:"null",...St(t)})}function yQ(e){return new e({type:"any"})}function vQ(e){return new e({type:"unknown"})}function bQ(e,t){return new e({type:"never",...St(t)})}function b3(e,t){return new N6({check:"less_than",...St(t),value:e,inclusive:!1})}function r_(e,t){return new N6({check:"less_than",...St(t),value:e,inclusive:!0})}function S3(e,t){return new z6({check:"greater_than",...St(t),value:e,inclusive:!1})}function a_(e,t){return new z6({check:"greater_than",...St(t),value:e,inclusive:!0})}function w3(e,t){return new MZ({check:"multiple_of",...St(t),value:e})}function F6(e,t){return new kZ({check:"max_length",...St(t),maximum:e})}function fw(e,t){return new DZ({check:"min_length",...St(t),minimum:e})}function B6(e,t){return new NZ({check:"length_equals",...St(t),length:e})}function SQ(e,t){return new zZ({check:"string_format",format:"regex",...St(t),pattern:e})}function wQ(e){return new $Z({check:"string_format",format:"lowercase",...St(e)})}function EQ(e){return new PZ({check:"string_format",format:"uppercase",...St(e)})}function xQ(e,t){return new IZ({check:"string_format",format:"includes",...St(t),includes:e})}function _Q(e,t){return new LZ({check:"string_format",format:"starts_with",...St(t),prefix:e})}function TQ(e,t){return new UZ({check:"string_format",format:"ends_with",...St(t),suffix:e})}function Om(e){return new qZ({check:"overwrite",tx:e})}function CQ(e){return Om(t=>t.normalize(e))}function OQ(){return Om(e=>e.trim())}function RQ(){return Om(e=>e.toLowerCase())}function AQ(){return Om(e=>e.toUpperCase())}function MQ(){return Om(e=>zY(e))}function jQ(e,t,r){return new e({type:"array",element:t,...St(r)})}function kQ(e,t,r){const i=St(r);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function DQ(e,t,r){return new e({type:"custom",check:"custom",fn:t,...St(r)})}function NQ(e){const t=zQ(r=>(r.addIssue=i=>{if(typeof i=="string")r.issues.push(hb(i,r.value,t._zod.def));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=t),s.continue??(s.continue=!t._zod.def.abort),r.issues.push(hb(s))}},e(r.value,r)));return t}function zQ(e,t){const r=new lo({check:"custom",...St(t)});return r._zod.check=e,r}function H6(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Pv,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function da(e,t,r={path:[],schemaPath:[]}){var i;const s=e._zod.def,l=t.seen.get(e);if(l)return l.count++,r.schemaPath.includes(e)&&(l.cycle=r.path),l.schema;const c={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,c);const f=e._zod.toJSONSchema?.();if(f)c.schema=f;else{const m={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,c.schema,m);else{const v=c.schema,w=t.processors[s.type];if(!w)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${s.type}`);w(e,t,v,m)}const g=e._zod.parent;g&&(c.ref||(c.ref=g),da(g,t,m),t.seen.get(g).isParent=!0)}const d=t.metadataRegistry.get(e);return d&&Object.assign(c.schema,d),t.io==="input"&&Xi(e)&&(delete c.schema.examples,delete c.schema.default),t.io==="input"&&c.schema._prefault&&((i=c.schema).default??(i.default=c.schema._prefault)),delete c.schema._prefault,t.seen.get(e).schema}function G6(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=new Map;for(const c of e.seen.entries()){const f=e.metadataRegistry.get(c[0])?.id;if(f){const d=i.get(f);if(d&&d!==c[0])throw new Error(`Duplicate schema id "${f}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(f,c[0])}}const s=c=>{const f=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const g=e.external.registry.get(c[0])?.id,v=e.external.uri??(b=>b);if(g)return{ref:v(g)};const w=c[1].defId??c[1].schema.id??`schema${e.counter++}`;return c[1].defId=w,{defId:w,ref:`${v("__shared")}#/${f}/${w}`}}if(c[1]===r)return{ref:"#"};const h=`#/${f}/`,m=c[1].schema.id??`__schema${e.counter++}`;return{defId:m,ref:h+m}},l=c=>{if(c[1].schema.$ref)return;const f=c[1],{ref:d,defId:h}=s(c);f.def={...f.schema},h&&(f.defId=h);const m=f.schema;for(const g in m)delete m[g];m.$ref=d};if(e.cycles==="throw")for(const c of e.seen.entries()){const f=c[1];if(f.cycle)throw new Error(`Cycle detected: #/${f.cycle?.join("/")}/<root>
47
+
48
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const c of e.seen.entries()){const f=c[1];if(t===c[0]){l(c);continue}if(e.external){const h=e.external.registry.get(c[0])?.id;if(t!==c[0]&&h){l(c);continue}}if(e.metadataRegistry.get(c[0])?.id){l(c);continue}if(f.cycle){l(c);continue}if(f.count>1&&e.reused==="ref"){l(c);continue}}}function K6(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=c=>{const f=e.seen.get(c);if(f.ref===null)return;const d=f.def??f.schema,h={...d},m=f.ref;if(f.ref=null,m){i(m);const v=e.seen.get(m),w=v.schema;if(w.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(d.allOf=d.allOf??[],d.allOf.push(w)):Object.assign(d,w),Object.assign(d,h),c._zod.parent===m)for(const _ in d)_==="$ref"||_==="allOf"||_ in h||delete d[_];if(w.$ref&&v.def)for(const _ in d)_==="$ref"||_==="allOf"||_ in v.def&&JSON.stringify(d[_])===JSON.stringify(v.def[_])&&delete d[_]}const g=c._zod.parent;if(g&&g!==m){i(g);const v=e.seen.get(g);if(v?.schema.$ref&&(d.$ref=v.schema.$ref,v.def))for(const w in d)w==="$ref"||w==="allOf"||w in v.def&&JSON.stringify(d[w])===JSON.stringify(v.def[w])&&delete d[w]}e.override({zodSchema:c,jsonSchema:d,path:f.path??[]})};for(const c of[...e.seen.entries()].reverse())i(c[0]);const s={};if(e.target==="draft-2020-12"?s.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?s.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?s.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const c=e.external.registry.get(t)?.id;if(!c)throw new Error("Schema is missing an `id` property");s.$id=e.external.uri(c)}Object.assign(s,r.def??r.schema);const l=e.external?.defs??{};for(const c of e.seen.entries()){const f=c[1];f.def&&f.defId&&(l[f.defId]=f.def)}e.external||Object.keys(l).length>0&&(e.target==="draft-2020-12"?s.$defs=l:s.definitions=l);try{const c=JSON.parse(JSON.stringify(s));return Object.defineProperty(c,"~standard",{value:{...t["~standard"],jsonSchema:{input:dw(t,"input",e.processors),output:dw(t,"output",e.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function Xi(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return Xi(i.element,r);if(i.type==="set")return Xi(i.valueType,r);if(i.type==="lazy")return Xi(i.getter(),r);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return Xi(i.innerType,r);if(i.type==="intersection")return Xi(i.left,r)||Xi(i.right,r);if(i.type==="record"||i.type==="map")return Xi(i.keyType,r)||Xi(i.valueType,r);if(i.type==="pipe")return Xi(i.in,r)||Xi(i.out,r);if(i.type==="object"){for(const s in i.shape)if(Xi(i.shape[s],r))return!0;return!1}if(i.type==="union"){for(const s of i.options)if(Xi(s,r))return!0;return!1}if(i.type==="tuple"){for(const s of i.items)if(Xi(s,r))return!0;return!!(i.rest&&Xi(i.rest,r))}return!1}const $Q=(e,t={})=>r=>{const i=H6({...r,processors:t});return da(e,i),G6(i,e),K6(i,e)},dw=(e,t,r={})=>i=>{const{libraryOptions:s,target:l}=i??{},c=H6({...s??{},target:l,io:t,processors:r});return da(e,c),G6(c,e),K6(c,e)},PQ={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},IQ=(e,t,r,i)=>{const s=r;s.type="string";const{minimum:l,maximum:c,format:f,patterns:d,contentEncoding:h}=e._zod.bag;if(typeof l=="number"&&(s.minLength=l),typeof c=="number"&&(s.maxLength=c),f&&(s.format=PQ[f]??f,s.format===""&&delete s.format,f==="time"&&delete s.format),h&&(s.contentEncoding=h),d&&d.size>0){const m=[...d];m.length===1?s.pattern=m[0].source:m.length>1&&(s.allOf=[...m.map(g=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:g.source}))])}},LQ=(e,t,r,i)=>{const s=r,{minimum:l,maximum:c,format:f,multipleOf:d,exclusiveMaximum:h,exclusiveMinimum:m}=e._zod.bag;typeof f=="string"&&f.includes("int")?s.type="integer":s.type="number",typeof m=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(s.minimum=m,s.exclusiveMinimum=!0):s.exclusiveMinimum=m),typeof l=="number"&&(s.minimum=l,typeof m=="number"&&t.target!=="draft-04"&&(m>=l?delete s.minimum:delete s.exclusiveMinimum)),typeof h=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(s.maximum=h,s.exclusiveMaximum=!0):s.exclusiveMaximum=h),typeof c=="number"&&(s.maximum=c,typeof h=="number"&&t.target!=="draft-04"&&(h<=c?delete s.maximum:delete s.exclusiveMaximum)),typeof d=="number"&&(s.multipleOf=d)},UQ=(e,t,r,i)=>{r.type="boolean"},qQ=(e,t,r,i)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},VQ=(e,t,r,i)=>{r.not={}},FQ=(e,t,r,i)=>{},BQ=(e,t,r,i)=>{},HQ=(e,t,r,i)=>{const s=e._zod.def,l=E6(s.entries);l.every(c=>typeof c=="number")&&(r.type="number"),l.every(c=>typeof c=="string")&&(r.type="string"),r.enum=l},GQ=(e,t,r,i)=>{const s=e._zod.def,l=[];for(const c of s.values)if(c===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof c=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");l.push(Number(c))}else l.push(c);if(l.length!==0)if(l.length===1){const c=l[0];r.type=c===null?"null":typeof c,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[c]:r.const=c}else l.every(c=>typeof c=="number")&&(r.type="number"),l.every(c=>typeof c=="string")&&(r.type="string"),l.every(c=>typeof c=="boolean")&&(r.type="boolean"),l.every(c=>c===null)&&(r.type="null"),r.enum=l},KQ=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},YQ=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},ZQ=(e,t,r,i)=>{const s=r,l=e._zod.def,{minimum:c,maximum:f}=e._zod.bag;typeof c=="number"&&(s.minItems=c),typeof f=="number"&&(s.maxItems=f),s.type="array",s.items=da(l.element,t,{...i,path:[...i.path,"items"]})},XQ=(e,t,r,i)=>{const s=r,l=e._zod.def;s.type="object",s.properties={};const c=l.shape;for(const h in c)s.properties[h]=da(c[h],t,{...i,path:[...i.path,"properties",h]});const f=new Set(Object.keys(c)),d=new Set([...f].filter(h=>{const m=l.shape[h]._zod;return t.io==="input"?m.optin===void 0:m.optout===void 0}));d.size>0&&(s.required=Array.from(d)),l.catchall?._zod.def.type==="never"?s.additionalProperties=!1:l.catchall?l.catchall&&(s.additionalProperties=da(l.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(s.additionalProperties=!1)},QQ=(e,t,r,i)=>{const s=e._zod.def,l=s.inclusive===!1,c=s.options.map((f,d)=>da(f,t,{...i,path:[...i.path,l?"oneOf":"anyOf",d]}));l?r.oneOf=c:r.anyOf=c},WQ=(e,t,r,i)=>{const s=e._zod.def,l=da(s.left,t,{...i,path:[...i.path,"allOf",0]}),c=da(s.right,t,{...i,path:[...i.path,"allOf",1]}),f=h=>"allOf"in h&&Object.keys(h).length===1,d=[...f(l)?l.allOf:[l],...f(c)?c.allOf:[c]];r.allOf=d},JQ=(e,t,r,i)=>{const s=r,l=e._zod.def;s.type="object";const c=l.keyType,d=c._zod.bag?.patterns;if(l.mode==="loose"&&d&&d.size>0){const m=da(l.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});s.patternProperties={};for(const g of d)s.patternProperties[g.source]=m}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(s.propertyNames=da(l.keyType,t,{...i,path:[...i.path,"propertyNames"]})),s.additionalProperties=da(l.valueType,t,{...i,path:[...i.path,"additionalProperties"]});const h=c._zod.values;if(h){const m=[...h].filter(g=>typeof g=="string"||typeof g=="number");m.length>0&&(s.required=m)}},eW=(e,t,r,i)=>{const s=e._zod.def,l=da(s.innerType,t,i),c=t.seen.get(e);t.target==="openapi-3.0"?(c.ref=s.innerType,r.nullable=!0):r.anyOf=[l,{type:"null"}]},tW=(e,t,r,i)=>{const s=e._zod.def;da(s.innerType,t,i);const l=t.seen.get(e);l.ref=s.innerType},nW=(e,t,r,i)=>{const s=e._zod.def;da(s.innerType,t,i);const l=t.seen.get(e);l.ref=s.innerType,r.default=JSON.parse(JSON.stringify(s.defaultValue))},rW=(e,t,r,i)=>{const s=e._zod.def;da(s.innerType,t,i);const l=t.seen.get(e);l.ref=s.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(s.defaultValue)))},aW=(e,t,r,i)=>{const s=e._zod.def;da(s.innerType,t,i);const l=t.seen.get(e);l.ref=s.innerType;let c;try{c=s.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=c},iW=(e,t,r,i)=>{const s=e._zod.def,l=t.io==="input"?s.in._zod.def.type==="transform"?s.out:s.in:s.out;da(l,t,i);const c=t.seen.get(e);c.ref=l},oW=(e,t,r,i)=>{const s=e._zod.def;da(s.innerType,t,i);const l=t.seen.get(e);l.ref=s.innerType,r.readOnly=!0},Y6=(e,t,r,i)=>{const s=e._zod.def;da(s.innerType,t,i);const l=t.seen.get(e);l.ref=s.innerType};function r2(e){return!!e._zod}function kc(e,t){return r2(e)?R6(e,t):e.safeParse(t)}function Z6(e){if(!e)return;let t;if(r2(e)?t=e._zod?.def?.shape:t=e.shape,!!t){if(typeof t=="function")try{return t()}catch{return}return t}}function sW(e){if(r2(e)){const l=e._zod?.def;if(l){if(l.value!==void 0)return l.value;if(Array.isArray(l.values)&&l.values.length>0)return l.values[0]}}const r=e._def;if(r){if(r.value!==void 0)return r.value;if(Array.isArray(r.values)&&r.values.length>0)return r.values[0]}const i=e.value;if(i!==void 0)return i}const lW=De("ZodISODateTime",(e,t)=>{tX.init(e,t),Xr.init(e,t)});function X6(e){return lQ(lW,e)}const uW=De("ZodISODate",(e,t)=>{nX.init(e,t),Xr.init(e,t)});function cW(e){return uQ(uW,e)}const fW=De("ZodISOTime",(e,t)=>{rX.init(e,t),Xr.init(e,t)});function dW(e){return cQ(fW,e)}const hW=De("ZodISODuration",(e,t)=>{aX.init(e,t),Xr.init(e,t)});function pW(e){return fQ(hW,e)}const mW=(e,t)=>{C6.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>YY(e,r)},flatten:{value:r=>KY(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,lC,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,lC,2)}},isEmpty:{get(){return e.issues.length===0}}})},ys=De("ZodError",mW,{Parent:Error}),gW=vR(ys),yW=bR(ys),vW=e2(ys),bW=t2(ys),SW=XY(ys),wW=QY(ys),EW=WY(ys),xW=JY(ys),_W=eZ(ys),TW=tZ(ys),CW=nZ(ys),OW=rZ(ys),zr=De("ZodType",(e,t)=>(Nr.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:dw(e,"input"),output:dw(e,"output")}}),e.toJSONSchema=$Q(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(uf(t,{checks:[...t.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0}),e.with=e.check,e.clone=(r,i)=>cf(e,r,i),e.brand=()=>e,e.register=((r,i)=>(r.add(e,i),e)),e.parse=(r,i)=>gW(e,r,i,{callee:e.parse}),e.safeParse=(r,i)=>vW(e,r,i),e.parseAsync=async(r,i)=>yW(e,r,i,{callee:e.parseAsync}),e.safeParseAsync=async(r,i)=>bW(e,r,i),e.spa=e.safeParseAsync,e.encode=(r,i)=>SW(e,r,i),e.decode=(r,i)=>wW(e,r,i),e.encodeAsync=async(r,i)=>EW(e,r,i),e.decodeAsync=async(r,i)=>xW(e,r,i),e.safeEncode=(r,i)=>_W(e,r,i),e.safeDecode=(r,i)=>TW(e,r,i),e.safeEncodeAsync=async(r,i)=>CW(e,r,i),e.safeDecodeAsync=async(r,i)=>OW(e,r,i),e.refine=(r,i)=>e.check(SJ(r,i)),e.superRefine=r=>e.check(wJ(r)),e.overwrite=r=>e.check(Om(r)),e.optional=()=>ta(e),e.exactOptional=()=>sJ(e),e.nullable=()=>_3(e),e.nullish=()=>ta(_3(e)),e.nonoptional=r=>hJ(e,r),e.array=()=>et(e),e.or=r=>$r([e,r]),e.and=r=>ER(e,r),e.transform=r=>fC(e,r9(r)),e.default=r=>cJ(e,r),e.prefault=r=>dJ(e,r),e.catch=r=>mJ(e,r),e.pipe=r=>fC(e,r),e.readonly=()=>vJ(e),e.describe=r=>{const i=e.clone();return Pv.add(i,{description:r}),i},Object.defineProperty(e,"description",{get(){return Pv.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Pv.get(e);const i=e.clone();return Pv.add(i,r[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),Q6=De("_ZodString",(e,t)=>{SR.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(i,s,l)=>IQ(e,i,s);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...i)=>e.check(SQ(...i)),e.includes=(...i)=>e.check(xQ(...i)),e.startsWith=(...i)=>e.check(_Q(...i)),e.endsWith=(...i)=>e.check(TQ(...i)),e.min=(...i)=>e.check(fw(...i)),e.max=(...i)=>e.check(F6(...i)),e.length=(...i)=>e.check(B6(...i)),e.nonempty=(...i)=>e.check(fw(1,...i)),e.lowercase=i=>e.check(wQ(i)),e.uppercase=i=>e.check(EQ(i)),e.trim=()=>e.check(OQ()),e.normalize=(...i)=>e.check(CQ(...i)),e.toLowerCase=()=>e.check(RQ()),e.toUpperCase=()=>e.check(AQ()),e.slugify=()=>e.check(MQ())}),RW=De("ZodString",(e,t)=>{SR.init(e,t),Q6.init(e,t),e.email=r=>e.check(VX(AW,r)),e.url=r=>e.check(V6(W6,r)),e.jwt=r=>e.check(sQ(HW,r)),e.emoji=r=>e.check(KX(jW,r)),e.guid=r=>e.check(v3(E3,r)),e.uuid=r=>e.check(FX(x1,r)),e.uuidv4=r=>e.check(BX(x1,r)),e.uuidv6=r=>e.check(HX(x1,r)),e.uuidv7=r=>e.check(GX(x1,r)),e.nanoid=r=>e.check(YX(kW,r)),e.guid=r=>e.check(v3(E3,r)),e.cuid=r=>e.check(ZX(DW,r)),e.cuid2=r=>e.check(XX(NW,r)),e.ulid=r=>e.check(QX(zW,r)),e.base64=r=>e.check(aQ(VW,r)),e.base64url=r=>e.check(iQ(FW,r)),e.xid=r=>e.check(WX($W,r)),e.ksuid=r=>e.check(JX(PW,r)),e.ipv4=r=>e.check(eQ(IW,r)),e.ipv6=r=>e.check(tQ(LW,r)),e.cidrv4=r=>e.check(nQ(UW,r)),e.cidrv6=r=>e.check(rQ(qW,r)),e.e164=r=>e.check(oQ(BW,r)),e.datetime=r=>e.check(X6(r)),e.date=r=>e.check(cW(r)),e.time=r=>e.check(dW(r)),e.duration=r=>e.check(pW(r))});function be(e){return qX(RW,e)}const Xr=De("ZodStringFormat",(e,t)=>{Ur.init(e,t),Q6.init(e,t)}),AW=De("ZodEmail",(e,t)=>{GZ.init(e,t),Xr.init(e,t)}),E3=De("ZodGUID",(e,t)=>{BZ.init(e,t),Xr.init(e,t)}),x1=De("ZodUUID",(e,t)=>{HZ.init(e,t),Xr.init(e,t)}),W6=De("ZodURL",(e,t)=>{KZ.init(e,t),Xr.init(e,t)});function MW(e){return V6(W6,e)}const jW=De("ZodEmoji",(e,t)=>{YZ.init(e,t),Xr.init(e,t)}),kW=De("ZodNanoID",(e,t)=>{ZZ.init(e,t),Xr.init(e,t)}),DW=De("ZodCUID",(e,t)=>{XZ.init(e,t),Xr.init(e,t)}),NW=De("ZodCUID2",(e,t)=>{QZ.init(e,t),Xr.init(e,t)}),zW=De("ZodULID",(e,t)=>{WZ.init(e,t),Xr.init(e,t)}),$W=De("ZodXID",(e,t)=>{JZ.init(e,t),Xr.init(e,t)}),PW=De("ZodKSUID",(e,t)=>{eX.init(e,t),Xr.init(e,t)}),IW=De("ZodIPv4",(e,t)=>{iX.init(e,t),Xr.init(e,t)}),LW=De("ZodIPv6",(e,t)=>{oX.init(e,t),Xr.init(e,t)}),UW=De("ZodCIDRv4",(e,t)=>{sX.init(e,t),Xr.init(e,t)}),qW=De("ZodCIDRv6",(e,t)=>{lX.init(e,t),Xr.init(e,t)}),VW=De("ZodBase64",(e,t)=>{uX.init(e,t),Xr.init(e,t)}),FW=De("ZodBase64URL",(e,t)=>{fX.init(e,t),Xr.init(e,t)}),BW=De("ZodE164",(e,t)=>{dX.init(e,t),Xr.init(e,t)}),HW=De("ZodJWT",(e,t)=>{pX.init(e,t),Xr.init(e,t)}),wR=De("ZodNumber",(e,t)=>{P6.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(i,s,l)=>LQ(e,i,s),e.gt=(i,s)=>e.check(S3(i,s)),e.gte=(i,s)=>e.check(a_(i,s)),e.min=(i,s)=>e.check(a_(i,s)),e.lt=(i,s)=>e.check(b3(i,s)),e.lte=(i,s)=>e.check(r_(i,s)),e.max=(i,s)=>e.check(r_(i,s)),e.int=i=>e.check(x3(i)),e.safe=i=>e.check(x3(i)),e.positive=i=>e.check(S3(0,i)),e.nonnegative=i=>e.check(a_(0,i)),e.negative=i=>e.check(b3(0,i)),e.nonpositive=i=>e.check(r_(0,i)),e.multipleOf=(i,s)=>e.check(w3(i,s)),e.step=(i,s)=>e.check(w3(i,s)),e.finite=()=>e;const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function Yn(e){return dQ(wR,e)}const GW=De("ZodNumberFormat",(e,t)=>{mX.init(e,t),wR.init(e,t)});function x3(e){return pQ(GW,e)}const KW=De("ZodBoolean",(e,t)=>{gX.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>UQ(e,r,i)});function kr(e){return mQ(KW,e)}const YW=De("ZodNull",(e,t)=>{yX.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>qQ(e,r,i)});function J6(e){return gQ(YW,e)}const ZW=De("ZodAny",(e,t)=>{vX.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>FQ()});function XW(){return yQ(ZW)}const QW=De("ZodUnknown",(e,t)=>{bX.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>BQ()});function Yr(){return vQ(QW)}const WW=De("ZodNever",(e,t)=>{SX.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>VQ(e,r,i)});function JW(e){return bQ(WW,e)}const eJ=De("ZodArray",(e,t)=>{wX.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>ZQ(e,r,i,s),e.element=t.element,e.min=(r,i)=>e.check(fw(r,i)),e.nonempty=r=>e.check(fw(1,r)),e.max=(r,i)=>e.check(F6(r,i)),e.length=(r,i)=>e.check(B6(r,i)),e.unwrap=()=>e.element});function et(e,t){return jQ(eJ,e,t)}const e9=De("ZodObject",(e,t)=>{xX.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>XQ(e,r,i,s),Kn(e,"shape",()=>t.shape),e.keyof=()=>Wo(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Yr()}),e.loose=()=>e.clone({...e._zod.def,catchall:Yr()}),e.strict=()=>e.clone({...e._zod.def,catchall:JW()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>VY(e,r),e.safeExtend=r=>FY(e,r),e.merge=r=>BY(e,r),e.pick=r=>UY(e,r),e.omit=r=>qY(e,r),e.partial=(...r)=>HY(a9,e,r[0]),e.required=(...r)=>GY(i9,e,r[0])});function rt(e,t){const r={type:"object",shape:e??{},...St(t)};return new e9(r)}function mi(e,t){return new e9({type:"object",shape:e,catchall:Yr(),...St(t)})}const t9=De("ZodUnion",(e,t)=>{U6.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>QQ(e,r,i,s),e.options=t.options});function $r(e,t){return new t9({type:"union",options:e,...St(t)})}const tJ=De("ZodDiscriminatedUnion",(e,t)=>{t9.init(e,t),_X.init(e,t)});function n9(e,t,r){return new tJ({type:"union",options:t,discriminator:e,...St(r)})}const nJ=De("ZodIntersection",(e,t)=>{TX.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>WQ(e,r,i,s)});function ER(e,t){return new nJ({type:"intersection",left:e,right:t})}const rJ=De("ZodRecord",(e,t)=>{CX.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>JQ(e,r,i,s),e.keyType=t.keyType,e.valueType=t.valueType});function Zr(e,t,r){return new rJ({type:"record",keyType:e,valueType:t,...St(r)})}const cC=De("ZodEnum",(e,t)=>{OX.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(i,s,l)=>HQ(e,i,s),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(i,s)=>{const l={};for(const c of i)if(r.has(c))l[c]=t.entries[c];else throw new Error(`Key ${c} not found in enum`);return new cC({...t,checks:[],...St(s),entries:l})},e.exclude=(i,s)=>{const l={...t.entries};for(const c of i)if(r.has(c))delete l[c];else throw new Error(`Key ${c} not found in enum`);return new cC({...t,checks:[],...St(s),entries:l})}});function Wo(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new cC({type:"enum",entries:r,...St(t)})}const aJ=De("ZodLiteral",(e,t)=>{RX.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>GQ(e,r,i),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function _t(e,t){return new aJ({type:"literal",values:Array.isArray(e)?e:[e],...St(t)})}const iJ=De("ZodTransform",(e,t)=>{AX.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>YQ(e,r),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new S6(e.constructor.name);r.addIssue=l=>{if(typeof l=="string")r.issues.push(hb(l,r.value,t));else{const c=l;c.fatal&&(c.continue=!1),c.code??(c.code="custom"),c.input??(c.input=r.value),c.inst??(c.inst=e),r.issues.push(hb(c))}};const s=t.transform(r.value,r);return s instanceof Promise?s.then(l=>(r.value=l,r)):(r.value=s,r)}});function r9(e){return new iJ({type:"transform",transform:e})}const a9=De("ZodOptional",(e,t)=>{q6.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>Y6(e,r,i,s),e.unwrap=()=>e._zod.def.innerType});function ta(e){return new a9({type:"optional",innerType:e})}const oJ=De("ZodExactOptional",(e,t)=>{MX.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>Y6(e,r,i,s),e.unwrap=()=>e._zod.def.innerType});function sJ(e){return new oJ({type:"optional",innerType:e})}const lJ=De("ZodNullable",(e,t)=>{jX.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>eW(e,r,i,s),e.unwrap=()=>e._zod.def.innerType});function _3(e){return new lJ({type:"nullable",innerType:e})}const uJ=De("ZodDefault",(e,t)=>{kX.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>nW(e,r,i,s),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function cJ(e,t){return new uJ({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():_6(t)}})}const fJ=De("ZodPrefault",(e,t)=>{DX.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>rW(e,r,i,s),e.unwrap=()=>e._zod.def.innerType});function dJ(e,t){return new fJ({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():_6(t)}})}const i9=De("ZodNonOptional",(e,t)=>{NX.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>tW(e,r,i,s),e.unwrap=()=>e._zod.def.innerType});function hJ(e,t){return new i9({type:"nonoptional",innerType:e,...St(t)})}const pJ=De("ZodCatch",(e,t)=>{zX.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>aW(e,r,i,s),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function mJ(e,t){return new pJ({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const gJ=De("ZodPipe",(e,t)=>{$X.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>iW(e,r,i,s),e.in=t.in,e.out=t.out});function fC(e,t){return new gJ({type:"pipe",in:e,out:t})}const yJ=De("ZodReadonly",(e,t)=>{PX.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>oW(e,r,i,s),e.unwrap=()=>e._zod.def.innerType});function vJ(e){return new yJ({type:"readonly",innerType:e})}const o9=De("ZodCustom",(e,t)=>{IX.init(e,t),zr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>KQ(e,r)});function bJ(e,t){return kQ(o9,e??(()=>!0),t)}function SJ(e,t={}){return DQ(o9,e,t)}function wJ(e){return NQ(e)}function s9(e,t){return fC(r9(e),t)}const EJ={custom:"custom"};function xJ(e){return hQ(wR,e)}const a2="2025-11-25",_J=[a2,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],Oh="io.modelcontextprotocol/related-task",i2="2.0",gi=bJ(e=>e!==null&&(typeof e=="object"||typeof e=="function")),l9=$r([be(),Yn().int()]),u9=be();mi({ttl:$r([Yn(),J6()]).optional(),pollInterval:Yn().optional()});const TJ=rt({ttl:Yn().optional()}),CJ=rt({taskId:be()}),xR=mi({progressToken:l9.optional(),[Oh]:CJ.optional()}),Jo=rt({_meta:xR.optional()}),Hb=Jo.extend({task:TJ.optional()}),OJ=e=>Hb.safeParse(e).success,vi=rt({method:be(),params:Jo.loose().optional()}),vs=rt({_meta:xR.optional()}),bs=rt({method:be(),params:vs.loose().optional()}),bi=mi({_meta:xR.optional()}),o2=$r([be(),Yn().int()]),c9=rt({jsonrpc:_t(i2),id:o2,...vi.shape}).strict(),dC=e=>c9.safeParse(e).success,f9=rt({jsonrpc:_t(i2),...bs.shape}).strict(),RJ=e=>f9.safeParse(e).success,_R=rt({jsonrpc:_t(i2),id:o2,result:bi}).strict(),Iv=e=>_R.safeParse(e).success;var an;(function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(an||(an={}));const TR=rt({jsonrpc:_t(i2),id:o2.optional(),error:rt({code:Yn().int(),message:be(),data:Yr().optional()})}).strict(),AJ=e=>TR.safeParse(e).success,i_=$r([c9,f9,_R,TR]);$r([_R,TR]);const Np=bi.strict(),MJ=vs.extend({requestId:o2.optional(),reason:be().optional()}),CR=bs.extend({method:_t("notifications/cancelled"),params:MJ}),jJ=rt({src:be(),mimeType:be().optional(),sizes:et(be()).optional(),theme:Wo(["light","dark"]).optional()}),Gb=rt({icons:et(jJ).optional()}),om=rt({name:be(),title:be().optional()}),d9=om.extend({...om.shape,...Gb.shape,version:be(),websiteUrl:be().optional(),description:be().optional()}),kJ=ER(rt({applyDefaults:kr().optional()}),Zr(be(),Yr())),DJ=s9(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,ER(rt({form:kJ.optional(),url:gi.optional()}),Zr(be(),Yr()).optional())),NJ=mi({list:gi.optional(),cancel:gi.optional(),requests:mi({sampling:mi({createMessage:gi.optional()}).optional(),elicitation:mi({create:gi.optional()}).optional()}).optional()}),zJ=mi({list:gi.optional(),cancel:gi.optional(),requests:mi({tools:mi({call:gi.optional()}).optional()}).optional()}),$J=rt({experimental:Zr(be(),gi).optional(),sampling:rt({context:gi.optional(),tools:gi.optional()}).optional(),elicitation:DJ.optional(),roots:rt({listChanged:kr().optional()}).optional(),tasks:NJ.optional()}),PJ=Jo.extend({protocolVersion:be(),capabilities:$J,clientInfo:d9}),IJ=vi.extend({method:_t("initialize"),params:PJ}),LJ=rt({experimental:Zr(be(),gi).optional(),logging:gi.optional(),completions:gi.optional(),prompts:rt({listChanged:kr().optional()}).optional(),resources:rt({subscribe:kr().optional(),listChanged:kr().optional()}).optional(),tools:rt({listChanged:kr().optional()}).optional(),tasks:zJ.optional()}),h9=bi.extend({protocolVersion:be(),capabilities:LJ,serverInfo:d9,instructions:be().optional()}),p9=bs.extend({method:_t("notifications/initialized"),params:vs.optional()}),UJ=e=>p9.safeParse(e).success,OR=vi.extend({method:_t("ping"),params:Jo.optional()}),qJ=rt({progress:Yn(),total:ta(Yn()),message:ta(be())}),VJ=rt({...vs.shape,...qJ.shape,progressToken:l9}),RR=bs.extend({method:_t("notifications/progress"),params:VJ}),FJ=Jo.extend({cursor:u9.optional()}),Kb=vi.extend({params:FJ.optional()}),Yb=bi.extend({nextCursor:u9.optional()}),BJ=Wo(["working","input_required","completed","failed","cancelled"]),Zb=rt({taskId:be(),status:BJ,ttl:$r([Yn(),J6()]),createdAt:be(),lastUpdatedAt:be(),pollInterval:ta(Yn()),statusMessage:ta(be())}),pb=bi.extend({task:Zb}),HJ=vs.merge(Zb),hw=bs.extend({method:_t("notifications/tasks/status"),params:HJ}),AR=vi.extend({method:_t("tasks/get"),params:Jo.extend({taskId:be()})}),MR=bi.merge(Zb),jR=vi.extend({method:_t("tasks/result"),params:Jo.extend({taskId:be()})});bi.loose();const kR=Kb.extend({method:_t("tasks/list")}),DR=Yb.extend({tasks:et(Zb)}),NR=vi.extend({method:_t("tasks/cancel"),params:Jo.extend({taskId:be()})}),GJ=bi.merge(Zb),m9=rt({uri:be(),mimeType:ta(be()),_meta:Zr(be(),Yr()).optional()}),g9=m9.extend({text:be()}),zR=be().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),y9=m9.extend({blob:zR}),Xb=Wo(["user","assistant"]),Rm=rt({audience:et(Xb).optional(),priority:Yn().min(0).max(1).optional(),lastModified:X6({offset:!0}).optional()}),v9=rt({...om.shape,...Gb.shape,uri:be(),description:ta(be()),mimeType:ta(be()),annotations:Rm.optional(),_meta:ta(mi({}))}),KJ=rt({...om.shape,...Gb.shape,uriTemplate:be(),description:ta(be()),mimeType:ta(be()),annotations:Rm.optional(),_meta:ta(mi({}))}),YJ=Kb.extend({method:_t("resources/list")}),b9=Yb.extend({resources:et(v9)}),ZJ=Kb.extend({method:_t("resources/templates/list")}),S9=Yb.extend({resourceTemplates:et(KJ)}),$R=Jo.extend({uri:be()}),XJ=$R,QJ=vi.extend({method:_t("resources/read"),params:XJ}),w9=bi.extend({contents:et($r([g9,y9]))}),E9=bs.extend({method:_t("notifications/resources/list_changed"),params:vs.optional()}),WJ=$R,JJ=vi.extend({method:_t("resources/subscribe"),params:WJ}),eee=$R,tee=vi.extend({method:_t("resources/unsubscribe"),params:eee}),nee=vs.extend({uri:be()}),ree=bs.extend({method:_t("notifications/resources/updated"),params:nee}),aee=rt({name:be(),description:ta(be()),required:ta(kr())}),iee=rt({...om.shape,...Gb.shape,description:ta(be()),arguments:ta(et(aee)),_meta:ta(mi({}))}),oee=Kb.extend({method:_t("prompts/list")}),x9=Yb.extend({prompts:et(iee)}),see=Jo.extend({name:be(),arguments:Zr(be(),be()).optional()}),lee=vi.extend({method:_t("prompts/get"),params:see}),PR=rt({type:_t("text"),text:be(),annotations:Rm.optional(),_meta:Zr(be(),Yr()).optional()}),IR=rt({type:_t("image"),data:zR,mimeType:be(),annotations:Rm.optional(),_meta:Zr(be(),Yr()).optional()}),LR=rt({type:_t("audio"),data:zR,mimeType:be(),annotations:Rm.optional(),_meta:Zr(be(),Yr()).optional()}),uee=rt({type:_t("tool_use"),name:be(),id:be(),input:Zr(be(),Yr()),_meta:Zr(be(),Yr()).optional()}),cee=rt({type:_t("resource"),resource:$r([g9,y9]),annotations:Rm.optional(),_meta:Zr(be(),Yr()).optional()}),fee=v9.extend({type:_t("resource_link")}),UR=$r([PR,IR,LR,fee,cee]),dee=rt({role:Xb,content:UR}),_9=bi.extend({description:be().optional(),messages:et(dee)}),T9=bs.extend({method:_t("notifications/prompts/list_changed"),params:vs.optional()}),hee=rt({title:be().optional(),readOnlyHint:kr().optional(),destructiveHint:kr().optional(),idempotentHint:kr().optional(),openWorldHint:kr().optional()}),pee=rt({taskSupport:Wo(["required","optional","forbidden"]).optional()}),C9=rt({...om.shape,...Gb.shape,description:be().optional(),inputSchema:rt({type:_t("object"),properties:Zr(be(),gi).optional(),required:et(be()).optional()}).catchall(Yr()),outputSchema:rt({type:_t("object"),properties:Zr(be(),gi).optional(),required:et(be()).optional()}).catchall(Yr()).optional(),annotations:hee.optional(),execution:pee.optional(),_meta:Zr(be(),Yr()).optional()}),mee=Kb.extend({method:_t("tools/list")}),O9=Yb.extend({tools:et(C9)}),s2=bi.extend({content:et(UR).default([]),structuredContent:Zr(be(),Yr()).optional(),isError:kr().optional()});s2.or(bi.extend({toolResult:Yr()}));const gee=Hb.extend({name:be(),arguments:Zr(be(),Yr()).optional()}),yee=vi.extend({method:_t("tools/call"),params:gee}),R9=bs.extend({method:_t("notifications/tools/list_changed"),params:vs.optional()}),vee=rt({autoRefresh:kr().default(!0),debounceMs:Yn().int().nonnegative().default(300)}),A9=Wo(["debug","info","notice","warning","error","critical","alert","emergency"]),bee=Jo.extend({level:A9}),See=vi.extend({method:_t("logging/setLevel"),params:bee}),wee=vs.extend({level:A9,logger:be().optional(),data:Yr()}),Eee=bs.extend({method:_t("notifications/message"),params:wee}),xee=rt({name:be().optional()}),_ee=rt({hints:et(xee).optional(),costPriority:Yn().min(0).max(1).optional(),speedPriority:Yn().min(0).max(1).optional(),intelligencePriority:Yn().min(0).max(1).optional()}),Tee=rt({mode:Wo(["auto","required","none"]).optional()}),Cee=rt({type:_t("tool_result"),toolUseId:be().describe("The unique identifier for the corresponding tool call."),content:et(UR).default([]),structuredContent:rt({}).loose().optional(),isError:kr().optional(),_meta:Zr(be(),Yr()).optional()}),Oee=n9("type",[PR,IR,LR]),pw=n9("type",[PR,IR,LR,uee,Cee]),Ree=rt({role:Xb,content:$r([pw,et(pw)]),_meta:Zr(be(),Yr()).optional()}),Aee=Hb.extend({messages:et(Ree),modelPreferences:_ee.optional(),systemPrompt:be().optional(),includeContext:Wo(["none","thisServer","allServers"]).optional(),temperature:Yn().optional(),maxTokens:Yn().int(),stopSequences:et(be()).optional(),metadata:gi.optional(),tools:et(C9).optional(),toolChoice:Tee.optional()}),M9=vi.extend({method:_t("sampling/createMessage"),params:Aee}),j9=bi.extend({model:be(),stopReason:ta(Wo(["endTurn","stopSequence","maxTokens"]).or(be())),role:Xb,content:Oee}),Mee=bi.extend({model:be(),stopReason:ta(Wo(["endTurn","stopSequence","maxTokens","toolUse"]).or(be())),role:Xb,content:$r([pw,et(pw)])}),jee=rt({type:_t("boolean"),title:be().optional(),description:be().optional(),default:kr().optional()}),kee=rt({type:_t("string"),title:be().optional(),description:be().optional(),minLength:Yn().optional(),maxLength:Yn().optional(),format:Wo(["email","uri","date","date-time"]).optional(),default:be().optional()}),Dee=rt({type:Wo(["number","integer"]),title:be().optional(),description:be().optional(),minimum:Yn().optional(),maximum:Yn().optional(),default:Yn().optional()}),Nee=rt({type:_t("string"),title:be().optional(),description:be().optional(),enum:et(be()),default:be().optional()}),zee=rt({type:_t("string"),title:be().optional(),description:be().optional(),oneOf:et(rt({const:be(),title:be()})),default:be().optional()}),$ee=rt({type:_t("string"),title:be().optional(),description:be().optional(),enum:et(be()),enumNames:et(be()).optional(),default:be().optional()}),Pee=$r([Nee,zee]),Iee=rt({type:_t("array"),title:be().optional(),description:be().optional(),minItems:Yn().optional(),maxItems:Yn().optional(),items:rt({type:_t("string"),enum:et(be())}),default:et(be()).optional()}),Lee=rt({type:_t("array"),title:be().optional(),description:be().optional(),minItems:Yn().optional(),maxItems:Yn().optional(),items:rt({anyOf:et(rt({const:be(),title:be()}))}),default:et(be()).optional()}),Uee=$r([Iee,Lee]),qee=$r([$ee,Pee,Uee]),Vee=$r([qee,jee,kee,Dee]),Fee=Hb.extend({mode:_t("form").optional(),message:be(),requestedSchema:rt({type:_t("object"),properties:Zr(be(),Vee),required:et(be()).optional()})}),Bee=Hb.extend({mode:_t("url"),message:be(),elicitationId:be(),url:be().url()}),Hee=$r([Fee,Bee]),k9=vi.extend({method:_t("elicitation/create"),params:Hee}),Gee=vs.extend({elicitationId:be()}),Kee=bs.extend({method:_t("notifications/elicitation/complete"),params:Gee}),D9=bi.extend({action:Wo(["accept","decline","cancel"]),content:s9(e=>e===null?void 0:e,Zr(be(),$r([be(),Yn(),kr(),et(be())])).optional())}),Yee=rt({type:_t("ref/resource"),uri:be()}),Zee=rt({type:_t("ref/prompt"),name:be()}),Xee=Jo.extend({ref:$r([Zee,Yee]),argument:rt({name:be(),value:be()}),context:rt({arguments:Zr(be(),be()).optional()}).optional()}),Qee=vi.extend({method:_t("completion/complete"),params:Xee}),N9=bi.extend({completion:mi({values:et(be()).max(100),total:ta(Yn().int()),hasMore:ta(kr())})}),Wee=rt({uri:be().startsWith("file://"),name:be().optional(),_meta:Zr(be(),Yr()).optional()}),Jee=vi.extend({method:_t("roots/list"),params:Jo.optional()}),ete=bi.extend({roots:et(Wee)}),tte=bs.extend({method:_t("notifications/roots/list_changed"),params:vs.optional()});$r([OR,IJ,Qee,See,lee,oee,YJ,ZJ,QJ,JJ,tee,yee,mee,AR,jR,kR,NR]);$r([CR,RR,p9,tte,hw]);$r([Np,j9,Mee,D9,ete,MR,DR,pb]);$r([OR,M9,k9,Jee,AR,jR,kR,NR]);$r([CR,RR,Eee,ree,E9,R9,T9,hw,Kee]);$r([Np,h9,N9,_9,x9,b9,S9,w9,s2,O9,MR,DR,pb]);class It extends Error{constructor(t,r,i){super(`MCP error ${t}: ${r}`),this.code=t,this.data=i,this.name="McpError"}static fromError(t,r,i){if(t===an.UrlElicitationRequired&&i){const s=i;if(s.elicitations)return new nte(s.elicitations,r)}return new It(t,r,i)}}class nte extends It{constructor(t,r=`URL elicitation${t.length>1?"s":""} required`){super(an.UrlElicitationRequired,r,{elicitations:t})}get elicitations(){return this.data?.elicitations??[]}}function bh(e){return e==="completed"||e==="failed"||e==="cancelled"}new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function T3(e){const r=Z6(e)?.method;if(!r)throw new Error("Schema is missing a method literal");const i=sW(r);if(typeof i!="string")throw new Error("Schema method literal must be a string");return i}function C3(e,t){const r=kc(e,t);if(!r.success)throw r.error;return r.data}const rte=6e4;class ate{constructor(t){this._options=t,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(CR,r=>{this._oncancel(r)}),this.setNotificationHandler(RR,r=>{this._onprogress(r)}),this.setRequestHandler(OR,r=>({})),this._taskStore=t?.taskStore,this._taskMessageQueue=t?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(AR,async(r,i)=>{const s=await this._taskStore.getTask(r.params.taskId,i.sessionId);if(!s)throw new It(an.InvalidParams,"Failed to retrieve task: Task not found");return{...s}}),this.setRequestHandler(jR,async(r,i)=>{const s=async()=>{const l=r.params.taskId;if(this._taskMessageQueue){let f;for(;f=await this._taskMessageQueue.dequeue(l,i.sessionId);){if(f.type==="response"||f.type==="error"){const d=f.message,h=d.id,m=this._requestResolvers.get(h);if(m)if(this._requestResolvers.delete(h),f.type==="response")m(d);else{const g=d,v=new It(g.error.code,g.error.message,g.error.data);m(v)}else{const g=f.type==="response"?"Response":"Error";this._onerror(new Error(`${g} handler missing for request ${h}`))}continue}await this._transport?.send(f.message,{relatedRequestId:i.requestId})}}const c=await this._taskStore.getTask(l,i.sessionId);if(!c)throw new It(an.InvalidParams,`Task not found: ${l}`);if(!bh(c.status))return await this._waitForTaskUpdate(l,i.signal),await s();if(bh(c.status)){const f=await this._taskStore.getTaskResult(l,i.sessionId);return this._clearTaskQueue(l),{...f,_meta:{...f._meta,[Oh]:{taskId:l}}}}return await s()};return await s()}),this.setRequestHandler(kR,async(r,i)=>{try{const{tasks:s,nextCursor:l}=await this._taskStore.listTasks(r.params?.cursor,i.sessionId);return{tasks:s,nextCursor:l,_meta:{}}}catch(s){throw new It(an.InvalidParams,`Failed to list tasks: ${s instanceof Error?s.message:String(s)}`)}}),this.setRequestHandler(NR,async(r,i)=>{try{const s=await this._taskStore.getTask(r.params.taskId,i.sessionId);if(!s)throw new It(an.InvalidParams,`Task not found: ${r.params.taskId}`);if(bh(s.status))throw new It(an.InvalidParams,`Cannot cancel task in terminal status: ${s.status}`);await this._taskStore.updateTaskStatus(r.params.taskId,"cancelled","Client cancelled task execution.",i.sessionId),this._clearTaskQueue(r.params.taskId);const l=await this._taskStore.getTask(r.params.taskId,i.sessionId);if(!l)throw new It(an.InvalidParams,`Task not found after cancellation: ${r.params.taskId}`);return{_meta:{},...l}}catch(s){throw s instanceof It?s:new It(an.InvalidRequest,`Failed to cancel task: ${s instanceof Error?s.message:String(s)}`)}}))}async _oncancel(t){if(!t.params.requestId)return;this._requestHandlerAbortControllers.get(t.params.requestId)?.abort(t.params.reason)}_setupTimeout(t,r,i,s,l=!1){this._timeoutInfo.set(t,{timeoutId:setTimeout(s,r),startTime:Date.now(),timeout:r,maxTotalTimeout:i,resetTimeoutOnProgress:l,onTimeout:s})}_resetTimeout(t){const r=this._timeoutInfo.get(t);if(!r)return!1;const i=Date.now()-r.startTime;if(r.maxTotalTimeout&&i>=r.maxTotalTimeout)throw this._timeoutInfo.delete(t),It.fromError(an.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:r.maxTotalTimeout,totalElapsed:i});return clearTimeout(r.timeoutId),r.timeoutId=setTimeout(r.onTimeout,r.timeout),!0}_cleanupTimeout(t){const r=this._timeoutInfo.get(t);r&&(clearTimeout(r.timeoutId),this._timeoutInfo.delete(t))}async connect(t){this._transport=t;const r=this.transport?.onclose;this._transport.onclose=()=>{r?.(),this._onclose()};const i=this.transport?.onerror;this._transport.onerror=l=>{i?.(l),this._onerror(l)};const s=this._transport?.onmessage;this._transport.onmessage=(l,c)=>{s?.(l,c),Iv(l)||AJ(l)?this._onresponse(l):dC(l)?this._onrequest(l,c):RJ(l)?this._onnotification(l):this._onerror(new Error(`Unknown message type: ${JSON.stringify(l)}`))},await this._transport.start()}_onclose(){const t=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();const r=It.fromError(an.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(const i of t.values())i(r)}_onerror(t){this.onerror?.(t)}_onnotification(t){const r=this._notificationHandlers.get(t.method)??this.fallbackNotificationHandler;r!==void 0&&Promise.resolve().then(()=>r(t)).catch(i=>this._onerror(new Error(`Uncaught error in notification handler: ${i}`)))}_onrequest(t,r){const i=this._requestHandlers.get(t.method)??this.fallbackRequestHandler,s=this._transport,l=t.params?._meta?.[Oh]?.taskId;if(i===void 0){const m={jsonrpc:"2.0",id:t.id,error:{code:an.MethodNotFound,message:"Method not found"}};l&&this._taskMessageQueue?this._enqueueTaskMessage(l,{type:"error",message:m,timestamp:Date.now()},s?.sessionId).catch(g=>this._onerror(new Error(`Failed to enqueue error response: ${g}`))):s?.send(m).catch(g=>this._onerror(new Error(`Failed to send an error response: ${g}`)));return}const c=new AbortController;this._requestHandlerAbortControllers.set(t.id,c);const f=OJ(t.params)?t.params.task:void 0,d=this._taskStore?this.requestTaskStore(t,s?.sessionId):void 0,h={signal:c.signal,sessionId:s?.sessionId,_meta:t.params?._meta,sendNotification:async m=>{const g={relatedRequestId:t.id};l&&(g.relatedTask={taskId:l}),await this.notification(m,g)},sendRequest:async(m,g,v)=>{const w={...v,relatedRequestId:t.id};l&&!w.relatedTask&&(w.relatedTask={taskId:l});const b=w.relatedTask?.taskId??l;return b&&d&&await d.updateTaskStatus(b,"input_required"),await this.request(m,g,w)},authInfo:r?.authInfo,requestId:t.id,requestInfo:r?.requestInfo,taskId:l,taskStore:d,taskRequestedTtl:f?.ttl,closeSSEStream:r?.closeSSEStream,closeStandaloneSSEStream:r?.closeStandaloneSSEStream};Promise.resolve().then(()=>{f&&this.assertTaskHandlerCapability(t.method)}).then(()=>i(t,h)).then(async m=>{if(c.signal.aborted)return;const g={result:m,jsonrpc:"2.0",id:t.id};l&&this._taskMessageQueue?await this._enqueueTaskMessage(l,{type:"response",message:g,timestamp:Date.now()},s?.sessionId):await s?.send(g)},async m=>{if(c.signal.aborted)return;const g={jsonrpc:"2.0",id:t.id,error:{code:Number.isSafeInteger(m.code)?m.code:an.InternalError,message:m.message??"Internal error",...m.data!==void 0&&{data:m.data}}};l&&this._taskMessageQueue?await this._enqueueTaskMessage(l,{type:"error",message:g,timestamp:Date.now()},s?.sessionId):await s?.send(g)}).catch(m=>this._onerror(new Error(`Failed to send response: ${m}`))).finally(()=>{this._requestHandlerAbortControllers.delete(t.id)})}_onprogress(t){const{progressToken:r,...i}=t.params,s=Number(r),l=this._progressHandlers.get(s);if(!l){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(t)}`));return}const c=this._responseHandlers.get(s),f=this._timeoutInfo.get(s);if(f&&c&&f.resetTimeoutOnProgress)try{this._resetTimeout(s)}catch(d){this._responseHandlers.delete(s),this._progressHandlers.delete(s),this._cleanupTimeout(s),c(d);return}l(i)}_onresponse(t){const r=Number(t.id),i=this._requestResolvers.get(r);if(i){if(this._requestResolvers.delete(r),Iv(t))i(t);else{const c=new It(t.error.code,t.error.message,t.error.data);i(c)}return}const s=this._responseHandlers.get(r);if(s===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(t)}`));return}this._responseHandlers.delete(r),this._cleanupTimeout(r);let l=!1;if(Iv(t)&&t.result&&typeof t.result=="object"){const c=t.result;if(c.task&&typeof c.task=="object"){const f=c.task;typeof f.taskId=="string"&&(l=!0,this._taskProgressTokens.set(f.taskId,r))}}if(l||this._progressHandlers.delete(r),Iv(t))s(t);else{const c=It.fromError(t.error.code,t.error.message,t.error.data);s(c)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(t,r,i){const{task:s}=i??{};if(!s){try{yield{type:"result",result:await this.request(t,r,i)}}catch(c){yield{type:"error",error:c instanceof It?c:new It(an.InternalError,String(c))}}return}let l;try{const c=await this.request(t,pb,i);if(c.task)l=c.task.taskId,yield{type:"taskCreated",task:c.task};else throw new It(an.InternalError,"Task creation did not return a task");for(;;){const f=await this.getTask({taskId:l},i);if(yield{type:"taskStatus",task:f},bh(f.status)){f.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:l},r,i)}:f.status==="failed"?yield{type:"error",error:new It(an.InternalError,`Task ${l} failed`)}:f.status==="cancelled"&&(yield{type:"error",error:new It(an.InternalError,`Task ${l} was cancelled`)});return}if(f.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:l},r,i)};return}const d=f.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(h=>setTimeout(h,d)),i?.signal?.throwIfAborted()}}catch(c){yield{type:"error",error:c instanceof It?c:new It(an.InternalError,String(c))}}}request(t,r,i){const{relatedRequestId:s,resumptionToken:l,onresumptiontoken:c,task:f,relatedTask:d}=i??{};return new Promise((h,m)=>{const g=S=>{m(S)};if(!this._transport){g(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method),f&&this.assertTaskCapability(t.method)}catch(S){g(S);return}i?.signal?.throwIfAborted();const v=this._requestMessageId++,w={...t,jsonrpc:"2.0",id:v};i?.onprogress&&(this._progressHandlers.set(v,i.onprogress),w.params={...t.params,_meta:{...t.params?._meta||{},progressToken:v}}),f&&(w.params={...w.params,task:f}),d&&(w.params={...w.params,_meta:{...w.params?._meta||{},[Oh]:d}});const b=S=>{this._responseHandlers.delete(v),this._progressHandlers.delete(v),this._cleanupTimeout(v),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:v,reason:String(S)}},{relatedRequestId:s,resumptionToken:l,onresumptiontoken:c}).catch(E=>this._onerror(new Error(`Failed to send cancellation: ${E}`)));const T=S instanceof It?S:new It(an.RequestTimeout,String(S));m(T)};this._responseHandlers.set(v,S=>{if(!i?.signal?.aborted){if(S instanceof Error)return m(S);try{const T=kc(r,S.result);T.success?h(T.data):m(T.error)}catch(T){m(T)}}}),i?.signal?.addEventListener("abort",()=>{b(i?.signal?.reason)});const _=i?.timeout??rte,x=()=>b(It.fromError(an.RequestTimeout,"Request timed out",{timeout:_}));this._setupTimeout(v,_,i?.maxTotalTimeout,x,i?.resetTimeoutOnProgress??!1);const R=d?.taskId;if(R){const S=T=>{const E=this._responseHandlers.get(v);E?E(T):this._onerror(new Error(`Response handler missing for side-channeled request ${v}`))};this._requestResolvers.set(v,S),this._enqueueTaskMessage(R,{type:"request",message:w,timestamp:Date.now()}).catch(T=>{this._cleanupTimeout(v),m(T)})}else this._transport.send(w,{relatedRequestId:s,resumptionToken:l,onresumptiontoken:c}).catch(S=>{this._cleanupTimeout(v),m(S)})})}async getTask(t,r){return this.request({method:"tasks/get",params:t},MR,r)}async getTaskResult(t,r,i){return this.request({method:"tasks/result",params:t},r,i)}async listTasks(t,r){return this.request({method:"tasks/list",params:t},DR,r)}async cancelTask(t,r){return this.request({method:"tasks/cancel",params:t},GJ,r)}async notification(t,r){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(t.method);const i=r?.relatedTask?.taskId;if(i){const f={...t,jsonrpc:"2.0",params:{...t.params,_meta:{...t.params?._meta||{},[Oh]:r.relatedTask}}};await this._enqueueTaskMessage(i,{type:"notification",message:f,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&!r?.relatedRequestId&&!r?.relatedTask){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(t.method),!this._transport)return;let f={...t,jsonrpc:"2.0"};r?.relatedTask&&(f={...f,params:{...f.params,_meta:{...f.params?._meta||{},[Oh]:r.relatedTask}}}),this._transport?.send(f,r).catch(d=>this._onerror(d))});return}let c={...t,jsonrpc:"2.0"};r?.relatedTask&&(c={...c,params:{...c.params,_meta:{...c.params?._meta||{},[Oh]:r.relatedTask}}}),await this._transport.send(c,r)}setRequestHandler(t,r){const i=T3(t);this.assertRequestHandlerCapability(i),this._requestHandlers.set(i,(s,l)=>{const c=C3(t,s);return Promise.resolve(r(c,l))})}removeRequestHandler(t){this._requestHandlers.delete(t)}assertCanSetRequestHandler(t){if(this._requestHandlers.has(t))throw new Error(`A request handler for ${t} already exists, which would be overridden`)}setNotificationHandler(t,r){const i=T3(t);this._notificationHandlers.set(i,s=>{const l=C3(t,s);return Promise.resolve(r(l))})}removeNotificationHandler(t){this._notificationHandlers.delete(t)}_cleanupTaskProgressHandler(t){const r=this._taskProgressTokens.get(t);r!==void 0&&(this._progressHandlers.delete(r),this._taskProgressTokens.delete(t))}async _enqueueTaskMessage(t,r,i){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");const s=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(t,r,i,s)}async _clearTaskQueue(t,r){if(this._taskMessageQueue){const i=await this._taskMessageQueue.dequeueAll(t,r);for(const s of i)if(s.type==="request"&&dC(s.message)){const l=s.message.id,c=this._requestResolvers.get(l);c?(c(new It(an.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(l)):this._onerror(new Error(`Resolver missing for request ${l} during task ${t} cleanup`))}}}async _waitForTaskUpdate(t,r){let i=this._options?.defaultTaskPollInterval??1e3;try{const s=await this._taskStore?.getTask(t);s?.pollInterval&&(i=s.pollInterval)}catch{}return new Promise((s,l)=>{if(r.aborted){l(new It(an.InvalidRequest,"Request cancelled"));return}const c=setTimeout(s,i);r.addEventListener("abort",()=>{clearTimeout(c),l(new It(an.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(t,r){const i=this._taskStore;if(!i)throw new Error("No task store configured");return{createTask:async s=>{if(!t)throw new Error("No request provided");return await i.createTask(s,t.id,{method:t.method,params:t.params},r)},getTask:async s=>{const l=await i.getTask(s,r);if(!l)throw new It(an.InvalidParams,"Failed to retrieve task: Task not found");return l},storeTaskResult:async(s,l,c)=>{await i.storeTaskResult(s,l,c,r);const f=await i.getTask(s,r);if(f){const d=hw.parse({method:"notifications/tasks/status",params:f});await this.notification(d),bh(f.status)&&this._cleanupTaskProgressHandler(s)}},getTaskResult:s=>i.getTaskResult(s,r),updateTaskStatus:async(s,l,c)=>{const f=await i.getTask(s,r);if(!f)throw new It(an.InvalidParams,`Task "${s}" not found - it may have been cleaned up`);if(bh(f.status))throw new It(an.InvalidParams,`Cannot update task "${s}" from terminal status "${f.status}" to "${l}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await i.updateTaskStatus(s,l,c,r);const d=await i.getTask(s,r);if(d){const h=hw.parse({method:"notifications/tasks/status",params:d});await this.notification(h),bh(d.status)&&this._cleanupTaskProgressHandler(s)}},listTasks:s=>i.listTasks(s,r)}}}function O3(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function ite(e,t){const r={...e};for(const i in t){const s=i,l=t[s];if(l===void 0)continue;const c=r[s];O3(c)&&O3(l)?r[s]={...c,...l}:r[s]=l}return r}var _1={exports:{}},o_={},ec={},Sh={},s_={},l_={},u_={},R3;function mw(){return R3||(R3=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(S){if(super(),!e.IDENTIFIER.test(S))throw new Error("CodeGen: name must be a valid identifier");this.str=S}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class i extends t{constructor(S){super(),this._items=typeof S=="string"?[S]:S}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const S=this._items[0];return S===""||S==='""'}get str(){var S;return(S=this._str)!==null&&S!==void 0?S:this._str=this._items.reduce((T,E)=>`${T}${E}`,"")}get names(){var S;return(S=this._names)!==null&&S!==void 0?S:this._names=this._items.reduce((T,E)=>(E instanceof r&&(T[E.str]=(T[E.str]||0)+1),T),{})}}e._Code=i,e.nil=new i("");function s(R,...S){const T=[R[0]];let E=0;for(;E<S.length;)f(T,S[E]),T.push(R[++E]);return new i(T)}e._=s;const l=new i("+");function c(R,...S){const T=[w(R[0])];let E=0;for(;E<S.length;)T.push(l),f(T,S[E]),T.push(l,w(R[++E]));return d(T),new i(T)}e.str=c;function f(R,S){S instanceof i?R.push(...S._items):S instanceof r?R.push(S):R.push(g(S))}e.addCodeArg=f;function d(R){let S=1;for(;S<R.length-1;){if(R[S]===l){const T=h(R[S-1],R[S+1]);if(T!==void 0){R.splice(S-1,3,T);continue}R[S++]="+"}S++}}function h(R,S){if(S==='""')return R;if(R==='""')return S;if(typeof R=="string")return S instanceof r||R[R.length-1]!=='"'?void 0:typeof S!="string"?`${R.slice(0,-1)}${S}"`:S[0]==='"'?R.slice(0,-1)+S.slice(1):void 0;if(typeof S=="string"&&S[0]==='"'&&!(R instanceof r))return`"${R}${S.slice(1)}`}function m(R,S){return S.emptyStr()?R:R.emptyStr()?S:c`${R}${S}`}e.strConcat=m;function g(R){return typeof R=="number"||typeof R=="boolean"||R===null?R:w(Array.isArray(R)?R.join(","):R)}function v(R){return new i(w(R))}e.stringify=v;function w(R){return JSON.stringify(R).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=w;function b(R){return typeof R=="string"&&e.IDENTIFIER.test(R)?new i(`.${R}`):s`[${R}]`}e.getProperty=b;function _(R){if(typeof R=="string"&&e.IDENTIFIER.test(R))return new i(`${R}`);throw new Error(`CodeGen: invalid export name: ${R}, use explicit $id name mapping`)}e.getEsmExportName=_;function x(R){return new i(R.toString())}e.regexpCode=x})(u_)),u_}var c_={},A3;function M3(){return A3||(A3=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=mw();class r extends Error{constructor(h){super(`CodeGen: "code" for ${h} not defined`),this.value=h.value}}var i;(function(d){d[d.Started=0]="Started",d[d.Completed=1]="Completed"})(i||(e.UsedValueState=i={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class s{constructor({prefixes:h,parent:m}={}){this._names={},this._prefixes=h,this._parent=m}toName(h){return h instanceof t.Name?h:this.name(h)}name(h){return new t.Name(this._newName(h))}_newName(h){const m=this._names[h]||this._nameGroup(h);return`${h}${m.index++}`}_nameGroup(h){var m,g;if(!((g=(m=this._parent)===null||m===void 0?void 0:m._prefixes)===null||g===void 0)&&g.has(h)||this._prefixes&&!this._prefixes.has(h))throw new Error(`CodeGen: prefix "${h}" is not allowed in this scope`);return this._names[h]={prefix:h,index:0}}}e.Scope=s;class l extends t.Name{constructor(h,m){super(m),this.prefix=h}setValue(h,{property:m,itemIndex:g}){this.value=h,this.scopePath=(0,t._)`.${new t.Name(m)}[${g}]`}}e.ValueScopeName=l;const c=(0,t._)`\n`;class f extends s{constructor(h){super(h),this._values={},this._scope=h.scope,this.opts={...h,_n:h.lines?c:t.nil}}get(){return this._scope}name(h){return new l(h,this._newName(h))}value(h,m){var g;if(m.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const v=this.toName(h),{prefix:w}=v,b=(g=m.key)!==null&&g!==void 0?g:m.ref;let _=this._values[w];if(_){const S=_.get(b);if(S)return S}else _=this._values[w]=new Map;_.set(b,v);const x=this._scope[w]||(this._scope[w]=[]),R=x.length;return x[R]=m.ref,v.setValue(m,{property:w,itemIndex:R}),v}getValue(h,m){const g=this._values[h];if(g)return g.get(m)}scopeRefs(h,m=this._values){return this._reduceValues(m,g=>{if(g.scopePath===void 0)throw new Error(`CodeGen: name "${g}" has no value`);return(0,t._)`${h}${g.scopePath}`})}scopeCode(h=this._values,m,g){return this._reduceValues(h,v=>{if(v.value===void 0)throw new Error(`CodeGen: name "${v}" has no value`);return v.value.code},m,g)}_reduceValues(h,m,g={},v){let w=t.nil;for(const b in h){const _=h[b];if(!_)continue;const x=g[b]=g[b]||new Map;_.forEach(R=>{if(x.has(R))return;x.set(R,i.Started);let S=m(R);if(S){const T=this.opts.es5?e.varKinds.var:e.varKinds.const;w=(0,t._)`${w}${T} ${R} = ${S};${this.opts._n}`}else if(S=v?.(R))w=(0,t._)`${w}${S}${this.opts._n}`;else throw new r(R);x.set(R,i.Completed)})}return w}}e.ValueScope=f})(c_)),c_}var j3;function dn(){return j3||(j3=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=mw(),r=M3();var i=mw();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return i.Name}});var s=M3();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return s.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class l{optimizeNodes(){return this}optimizeNames(P,G){return this}}class c extends l{constructor(P,G,ee){super(),this.varKind=P,this.name=G,this.rhs=ee}render({es5:P,_n:G}){const ee=P?r.varKinds.var:this.varKind,ue=this.rhs===void 0?"":` = ${this.rhs}`;return`${ee} ${this.name}${ue};`+G}optimizeNames(P,G){if(P[this.name.str])return this.rhs&&(this.rhs=re(this.rhs,P,G)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class f extends l{constructor(P,G,ee){super(),this.lhs=P,this.rhs=G,this.sideEffects=ee}render({_n:P}){return`${this.lhs} = ${this.rhs};`+P}optimizeNames(P,G){if(!(this.lhs instanceof t.Name&&!P[this.lhs.str]&&!this.sideEffects))return this.rhs=re(this.rhs,P,G),this}get names(){const P=this.lhs instanceof t.Name?{}:{...this.lhs.names};return F(P,this.rhs)}}class d extends f{constructor(P,G,ee,ue){super(P,ee,ue),this.op=G}render({_n:P}){return`${this.lhs} ${this.op}= ${this.rhs};`+P}}class h extends l{constructor(P){super(),this.label=P,this.names={}}render({_n:P}){return`${this.label}:`+P}}class m extends l{constructor(P){super(),this.label=P,this.names={}}render({_n:P}){return`break${this.label?` ${this.label}`:""};`+P}}class g extends l{constructor(P){super(),this.error=P}render({_n:P}){return`throw ${this.error};`+P}get names(){return this.error.names}}class v extends l{constructor(P){super(),this.code=P}render({_n:P}){return`${this.code};`+P}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(P,G){return this.code=re(this.code,P,G),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class w extends l{constructor(P=[]){super(),this.nodes=P}render(P){return this.nodes.reduce((G,ee)=>G+ee.render(P),"")}optimizeNodes(){const{nodes:P}=this;let G=P.length;for(;G--;){const ee=P[G].optimizeNodes();Array.isArray(ee)?P.splice(G,1,...ee):ee?P[G]=ee:P.splice(G,1)}return P.length>0?this:void 0}optimizeNames(P,G){const{nodes:ee}=this;let ue=ee.length;for(;ue--;){const ve=ee[ue];ve.optimizeNames(P,G)||(ae(P,ve.names),ee.splice(ue,1))}return ee.length>0?this:void 0}get names(){return this.nodes.reduce((P,G)=>V(P,G.names),{})}}class b extends w{render(P){return"{"+P._n+super.render(P)+"}"+P._n}}class _ extends w{}class x extends b{}x.kind="else";class R extends b{constructor(P,G){super(G),this.condition=P}render(P){let G=`if(${this.condition})`+super.render(P);return this.else&&(G+="else "+this.else.render(P)),G}optimizeNodes(){super.optimizeNodes();const P=this.condition;if(P===!0)return this.nodes;let G=this.else;if(G){const ee=G.optimizeNodes();G=this.else=Array.isArray(ee)?new x(ee):ee}if(G)return P===!1?G instanceof R?G:G.nodes:this.nodes.length?this:new R(K(P),G instanceof R?[G]:G.nodes);if(!(P===!1||!this.nodes.length))return this}optimizeNames(P,G){var ee;if(this.else=(ee=this.else)===null||ee===void 0?void 0:ee.optimizeNames(P,G),!!(super.optimizeNames(P,G)||this.else))return this.condition=re(this.condition,P,G),this}get names(){const P=super.names;return F(P,this.condition),this.else&&V(P,this.else.names),P}}R.kind="if";class S extends b{}S.kind="for";class T extends S{constructor(P){super(),this.iteration=P}render(P){return`for(${this.iteration})`+super.render(P)}optimizeNames(P,G){if(super.optimizeNames(P,G))return this.iteration=re(this.iteration,P,G),this}get names(){return V(super.names,this.iteration.names)}}class E extends S{constructor(P,G,ee,ue){super(),this.varKind=P,this.name=G,this.from=ee,this.to=ue}render(P){const G=P.es5?r.varKinds.var:this.varKind,{name:ee,from:ue,to:ve}=this;return`for(${G} ${ee}=${ue}; ${ee}<${ve}; ${ee}++)`+super.render(P)}get names(){const P=F(super.names,this.from);return F(P,this.to)}}class O extends S{constructor(P,G,ee,ue){super(),this.loop=P,this.varKind=G,this.name=ee,this.iterable=ue}render(P){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(P)}optimizeNames(P,G){if(super.optimizeNames(P,G))return this.iterable=re(this.iterable,P,G),this}get names(){return V(super.names,this.iterable.names)}}class C extends b{constructor(P,G,ee){super(),this.name=P,this.args=G,this.async=ee}render(P){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(P)}}C.kind="func";class M extends w{render(P){return"return "+super.render(P)}}M.kind="return";class D extends b{render(P){let G="try"+super.render(P);return this.catch&&(G+=this.catch.render(P)),this.finally&&(G+=this.finally.render(P)),G}optimizeNodes(){var P,G;return super.optimizeNodes(),(P=this.catch)===null||P===void 0||P.optimizeNodes(),(G=this.finally)===null||G===void 0||G.optimizeNodes(),this}optimizeNames(P,G){var ee,ue;return super.optimizeNames(P,G),(ee=this.catch)===null||ee===void 0||ee.optimizeNames(P,G),(ue=this.finally)===null||ue===void 0||ue.optimizeNames(P,G),this}get names(){const P=super.names;return this.catch&&V(P,this.catch.names),this.finally&&V(P,this.finally.names),P}}class $ extends b{constructor(P){super(),this.error=P}render(P){return`catch(${this.error})`+super.render(P)}}$.kind="catch";class q extends b{render(P){return"finally"+super.render(P)}}q.kind="finally";class L{constructor(P,G={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...G,_n:G.lines?`
49
+ `:""},this._extScope=P,this._scope=new r.Scope({parent:P}),this._nodes=[new _]}toString(){return this._root.render(this.opts)}name(P){return this._scope.name(P)}scopeName(P){return this._extScope.name(P)}scopeValue(P,G){const ee=this._extScope.value(P,G);return(this._values[ee.prefix]||(this._values[ee.prefix]=new Set)).add(ee),ee}getScopeValue(P,G){return this._extScope.getValue(P,G)}scopeRefs(P){return this._extScope.scopeRefs(P,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(P,G,ee,ue){const ve=this._scope.toName(G);return ee!==void 0&&ue&&(this._constants[ve.str]=ee),this._leafNode(new c(P,ve,ee)),ve}const(P,G,ee){return this._def(r.varKinds.const,P,G,ee)}let(P,G,ee){return this._def(r.varKinds.let,P,G,ee)}var(P,G,ee){return this._def(r.varKinds.var,P,G,ee)}assign(P,G,ee){return this._leafNode(new f(P,G,ee))}add(P,G){return this._leafNode(new d(P,e.operators.ADD,G))}code(P){return typeof P=="function"?P():P!==t.nil&&this._leafNode(new v(P)),this}object(...P){const G=["{"];for(const[ee,ue]of P)G.length>1&&G.push(","),G.push(ee),(ee!==ue||this.opts.es5)&&(G.push(":"),(0,t.addCodeArg)(G,ue));return G.push("}"),new t._Code(G)}if(P,G,ee){if(this._blockNode(new R(P)),G&&ee)this.code(G).else().code(ee).endIf();else if(G)this.code(G).endIf();else if(ee)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(P){return this._elseNode(new R(P))}else(){return this._elseNode(new x)}endIf(){return this._endBlockNode(R,x)}_for(P,G){return this._blockNode(P),G&&this.code(G).endFor(),this}for(P,G){return this._for(new T(P),G)}forRange(P,G,ee,ue,ve=this.opts.es5?r.varKinds.var:r.varKinds.let){const Ee=this._scope.toName(P);return this._for(new E(ve,Ee,G,ee),()=>ue(Ee))}forOf(P,G,ee,ue=r.varKinds.const){const ve=this._scope.toName(P);if(this.opts.es5){const Ee=G instanceof t.Name?G:this.var("_arr",G);return this.forRange("_i",0,(0,t._)`${Ee}.length`,Oe=>{this.var(ve,(0,t._)`${Ee}[${Oe}]`),ee(ve)})}return this._for(new O("of",ue,ve,G),()=>ee(ve))}forIn(P,G,ee,ue=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(P,(0,t._)`Object.keys(${G})`,ee);const ve=this._scope.toName(P);return this._for(new O("in",ue,ve,G),()=>ee(ve))}endFor(){return this._endBlockNode(S)}label(P){return this._leafNode(new h(P))}break(P){return this._leafNode(new m(P))}return(P){const G=new M;if(this._blockNode(G),this.code(P),G.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(M)}try(P,G,ee){if(!G&&!ee)throw new Error('CodeGen: "try" without "catch" and "finally"');const ue=new D;if(this._blockNode(ue),this.code(P),G){const ve=this.name("e");this._currNode=ue.catch=new $(ve),G(ve)}return ee&&(this._currNode=ue.finally=new q,this.code(ee)),this._endBlockNode($,q)}throw(P){return this._leafNode(new g(P))}block(P,G){return this._blockStarts.push(this._nodes.length),P&&this.code(P).endBlock(G),this}endBlock(P){const G=this._blockStarts.pop();if(G===void 0)throw new Error("CodeGen: not in self-balancing block");const ee=this._nodes.length-G;if(ee<0||P!==void 0&&ee!==P)throw new Error(`CodeGen: wrong number of nodes: ${ee} vs ${P} expected`);return this._nodes.length=G,this}func(P,G=t.nil,ee,ue){return this._blockNode(new C(P,G,ee)),ue&&this.code(ue).endFunc(),this}endFunc(){return this._endBlockNode(C)}optimize(P=1){for(;P-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(P){return this._currNode.nodes.push(P),this}_blockNode(P){this._currNode.nodes.push(P),this._nodes.push(P)}_endBlockNode(P,G){const ee=this._currNode;if(ee instanceof P||G&&ee instanceof G)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${G?`${P.kind}/${G.kind}`:P.kind}"`)}_elseNode(P){const G=this._currNode;if(!(G instanceof R))throw new Error('CodeGen: "else" without "if"');return this._currNode=G.else=P,this}get _root(){return this._nodes[0]}get _currNode(){const P=this._nodes;return P[P.length-1]}set _currNode(P){const G=this._nodes;G[G.length-1]=P}}e.CodeGen=L;function V(U,P){for(const G in P)U[G]=(U[G]||0)+(P[G]||0);return U}function F(U,P){return P instanceof t._CodeOrName?V(U,P.names):U}function re(U,P,G){if(U instanceof t.Name)return ee(U);if(!ue(U))return U;return new t._Code(U._items.reduce((ve,Ee)=>(Ee instanceof t.Name&&(Ee=ee(Ee)),Ee instanceof t._Code?ve.push(...Ee._items):ve.push(Ee),ve),[]));function ee(ve){const Ee=G[ve.str];return Ee===void 0||P[ve.str]!==1?ve:(delete P[ve.str],Ee)}function ue(ve){return ve instanceof t._Code&&ve._items.some(Ee=>Ee instanceof t.Name&&P[Ee.str]===1&&G[Ee.str]!==void 0)}}function ae(U,P){for(const G in P)U[G]=(U[G]||0)-(P[G]||0)}function K(U){return typeof U=="boolean"||typeof U=="number"||U===null?!U:(0,t._)`!${I(U)}`}e.not=K;const B=N(e.operators.AND);function Y(...U){return U.reduce(B)}e.and=Y;const fe=N(e.operators.OR);function se(...U){return U.reduce(fe)}e.or=se;function N(U){return(P,G)=>P===t.nil?G:G===t.nil?P:(0,t._)`${I(P)} ${U} ${I(G)}`}function I(U){return U instanceof t.Name?U:(0,t._)`(${U})`}})(l_)),l_}var bn={},k3;function qn(){if(k3)return bn;k3=1,Object.defineProperty(bn,"__esModule",{value:!0}),bn.checkStrictMode=bn.getErrorPath=bn.Type=bn.useFunc=bn.setEvaluated=bn.evaluatedPropsToName=bn.mergeEvaluated=bn.eachItem=bn.unescapeJsonPointer=bn.escapeJsonPointer=bn.escapeFragment=bn.unescapeFragment=bn.schemaRefOrVal=bn.schemaHasRulesButRef=bn.schemaHasRules=bn.checkUnknownRules=bn.alwaysValidSchema=bn.toHash=void 0;const e=dn(),t=mw();function r(O){const C={};for(const M of O)C[M]=!0;return C}bn.toHash=r;function i(O,C){return typeof C=="boolean"?C:Object.keys(C).length===0?!0:(s(O,C),!l(C,O.self.RULES.all))}bn.alwaysValidSchema=i;function s(O,C=O.schema){const{opts:M,self:D}=O;if(!M.strictSchema||typeof C=="boolean")return;const $=D.RULES.keywords;for(const q in C)$[q]||E(O,`unknown keyword: "${q}"`)}bn.checkUnknownRules=s;function l(O,C){if(typeof O=="boolean")return!O;for(const M in O)if(C[M])return!0;return!1}bn.schemaHasRules=l;function c(O,C){if(typeof O=="boolean")return!O;for(const M in O)if(M!=="$ref"&&C.all[M])return!0;return!1}bn.schemaHasRulesButRef=c;function f({topSchemaRef:O,schemaPath:C},M,D,$){if(!$){if(typeof M=="number"||typeof M=="boolean")return M;if(typeof M=="string")return(0,e._)`${M}`}return(0,e._)`${O}${C}${(0,e.getProperty)(D)}`}bn.schemaRefOrVal=f;function d(O){return g(decodeURIComponent(O))}bn.unescapeFragment=d;function h(O){return encodeURIComponent(m(O))}bn.escapeFragment=h;function m(O){return typeof O=="number"?`${O}`:O.replace(/~/g,"~0").replace(/\//g,"~1")}bn.escapeJsonPointer=m;function g(O){return O.replace(/~1/g,"/").replace(/~0/g,"~")}bn.unescapeJsonPointer=g;function v(O,C){if(Array.isArray(O))for(const M of O)C(M);else C(O)}bn.eachItem=v;function w({mergeNames:O,mergeToName:C,mergeValues:M,resultToName:D}){return($,q,L,V)=>{const F=L===void 0?q:L instanceof e.Name?(q instanceof e.Name?O($,q,L):C($,q,L),L):q instanceof e.Name?(C($,L,q),q):M(q,L);return V===e.Name&&!(F instanceof e.Name)?D($,F):F}}bn.mergeEvaluated={props:w({mergeNames:(O,C,M)=>O.if((0,e._)`${M} !== true && ${C} !== undefined`,()=>{O.if((0,e._)`${C} === true`,()=>O.assign(M,!0),()=>O.assign(M,(0,e._)`${M} || {}`).code((0,e._)`Object.assign(${M}, ${C})`))}),mergeToName:(O,C,M)=>O.if((0,e._)`${M} !== true`,()=>{C===!0?O.assign(M,!0):(O.assign(M,(0,e._)`${M} || {}`),_(O,M,C))}),mergeValues:(O,C)=>O===!0?!0:{...O,...C},resultToName:b}),items:w({mergeNames:(O,C,M)=>O.if((0,e._)`${M} !== true && ${C} !== undefined`,()=>O.assign(M,(0,e._)`${C} === true ? true : ${M} > ${C} ? ${M} : ${C}`)),mergeToName:(O,C,M)=>O.if((0,e._)`${M} !== true`,()=>O.assign(M,C===!0?!0:(0,e._)`${M} > ${C} ? ${M} : ${C}`)),mergeValues:(O,C)=>O===!0?!0:Math.max(O,C),resultToName:(O,C)=>O.var("items",C)})};function b(O,C){if(C===!0)return O.var("props",!0);const M=O.var("props",(0,e._)`{}`);return C!==void 0&&_(O,M,C),M}bn.evaluatedPropsToName=b;function _(O,C,M){Object.keys(M).forEach(D=>O.assign((0,e._)`${C}${(0,e.getProperty)(D)}`,!0))}bn.setEvaluated=_;const x={};function R(O,C){return O.scopeValue("func",{ref:C,code:x[C.code]||(x[C.code]=new t._Code(C.code))})}bn.useFunc=R;var S;(function(O){O[O.Num=0]="Num",O[O.Str=1]="Str"})(S||(bn.Type=S={}));function T(O,C,M){if(O instanceof e.Name){const D=C===S.Num;return M?D?(0,e._)`"[" + ${O} + "]"`:(0,e._)`"['" + ${O} + "']"`:D?(0,e._)`"/" + ${O}`:(0,e._)`"/" + ${O}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return M?(0,e.getProperty)(O).toString():"/"+m(O)}bn.getErrorPath=T;function E(O,C,M=O.opts.strictSchema){if(M){if(C=`strict mode: ${C}`,M===!0)throw new Error(C);O.self.logger.warn(C)}}return bn.checkStrictMode=E,bn}var T1={},D3;function ff(){if(D3)return T1;D3=1,Object.defineProperty(T1,"__esModule",{value:!0});const e=dn(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return T1.default=t,T1}var N3;function l2(){return N3||(N3=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=dn(),r=qn(),i=ff();e.keywordError={message:({keyword:x})=>(0,t.str)`must pass "${x}" keyword validation`},e.keyword$DataError={message:({keyword:x,schemaType:R})=>R?(0,t.str)`"${x}" keyword must be ${R} ($data)`:(0,t.str)`"${x}" keyword is invalid ($data)`};function s(x,R=e.keywordError,S,T){const{it:E}=x,{gen:O,compositeRule:C,allErrors:M}=E,D=g(x,R,S);T??(C||M)?d(O,D):h(E,(0,t._)`[${D}]`)}e.reportError=s;function l(x,R=e.keywordError,S){const{it:T}=x,{gen:E,compositeRule:O,allErrors:C}=T,M=g(x,R,S);d(E,M),O||C||h(T,i.default.vErrors)}e.reportExtraError=l;function c(x,R){x.assign(i.default.errors,R),x.if((0,t._)`${i.default.vErrors} !== null`,()=>x.if(R,()=>x.assign((0,t._)`${i.default.vErrors}.length`,R),()=>x.assign(i.default.vErrors,null)))}e.resetErrorsCount=c;function f({gen:x,keyword:R,schemaValue:S,data:T,errsCount:E,it:O}){if(E===void 0)throw new Error("ajv implementation error");const C=x.name("err");x.forRange("i",E,i.default.errors,M=>{x.const(C,(0,t._)`${i.default.vErrors}[${M}]`),x.if((0,t._)`${C}.instancePath === undefined`,()=>x.assign((0,t._)`${C}.instancePath`,(0,t.strConcat)(i.default.instancePath,O.errorPath))),x.assign((0,t._)`${C}.schemaPath`,(0,t.str)`${O.errSchemaPath}/${R}`),O.opts.verbose&&(x.assign((0,t._)`${C}.schema`,S),x.assign((0,t._)`${C}.data`,T))})}e.extendErrors=f;function d(x,R){const S=x.const("err",R);x.if((0,t._)`${i.default.vErrors} === null`,()=>x.assign(i.default.vErrors,(0,t._)`[${S}]`),(0,t._)`${i.default.vErrors}.push(${S})`),x.code((0,t._)`${i.default.errors}++`)}function h(x,R){const{gen:S,validateName:T,schemaEnv:E}=x;E.$async?S.throw((0,t._)`new ${x.ValidationError}(${R})`):(S.assign((0,t._)`${T}.errors`,R),S.return(!1))}const m={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function g(x,R,S){const{createErrors:T}=x.it;return T===!1?(0,t._)`{}`:v(x,R,S)}function v(x,R,S={}){const{gen:T,it:E}=x,O=[w(E,S),b(x,S)];return _(x,R,O),T.object(...O)}function w({errorPath:x},{instancePath:R}){const S=R?(0,t.str)`${x}${(0,r.getErrorPath)(R,r.Type.Str)}`:x;return[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,S)]}function b({keyword:x,it:{errSchemaPath:R}},{schemaPath:S,parentSchema:T}){let E=T?R:(0,t.str)`${R}/${x}`;return S&&(E=(0,t.str)`${E}${(0,r.getErrorPath)(S,r.Type.Str)}`),[m.schemaPath,E]}function _(x,{params:R,message:S},T){const{keyword:E,data:O,schemaValue:C,it:M}=x,{opts:D,propertyName:$,topSchemaRef:q,schemaPath:L}=M;T.push([m.keyword,E],[m.params,typeof R=="function"?R(x):R||(0,t._)`{}`]),D.messages&&T.push([m.message,typeof S=="function"?S(x):S]),D.verbose&&T.push([m.schema,C],[m.parentSchema,(0,t._)`${q}${L}`],[i.default.data,O]),$&&T.push([m.propertyName,$])}})(s_)),s_}var z3;function ote(){if(z3)return Sh;z3=1,Object.defineProperty(Sh,"__esModule",{value:!0}),Sh.boolOrEmptySchema=Sh.topBoolOrEmptySchema=void 0;const e=l2(),t=dn(),r=ff(),i={message:"boolean schema is false"};function s(f){const{gen:d,schema:h,validateName:m}=f;h===!1?c(f,!1):typeof h=="object"&&h.$async===!0?d.return(r.default.data):(d.assign((0,t._)`${m}.errors`,null),d.return(!0))}Sh.topBoolOrEmptySchema=s;function l(f,d){const{gen:h,schema:m}=f;m===!1?(h.var(d,!1),c(f)):h.var(d,!0)}Sh.boolOrEmptySchema=l;function c(f,d){const{gen:h,data:m}=f,g={gen:h,keyword:"false schema",data:m,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:f};(0,e.reportError)(g,i,void 0,d)}return Sh}var ci={},wh={},$3;function z9(){if($3)return wh;$3=1,Object.defineProperty(wh,"__esModule",{value:!0}),wh.getRules=wh.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function r(s){return typeof s=="string"&&t.has(s)}wh.isJSONType=r;function i(){const s={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...s,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},s.number,s.string,s.array,s.object],post:{rules:[]},all:{},keywords:{}}}return wh.getRules=i,wh}var tc={},P3;function $9(){if(P3)return tc;P3=1,Object.defineProperty(tc,"__esModule",{value:!0}),tc.shouldUseRule=tc.shouldUseGroup=tc.schemaHasRulesForType=void 0;function e({schema:i,self:s},l){const c=s.RULES.types[l];return c&&c!==!0&&t(i,c)}tc.schemaHasRulesForType=e;function t(i,s){return s.rules.some(l=>r(i,l))}tc.shouldUseGroup=t;function r(i,s){var l;return i[s.keyword]!==void 0||((l=s.definition.implements)===null||l===void 0?void 0:l.some(c=>i[c]!==void 0))}return tc.shouldUseRule=r,tc}var I3;function gw(){if(I3)return ci;I3=1,Object.defineProperty(ci,"__esModule",{value:!0}),ci.reportTypeError=ci.checkDataTypes=ci.checkDataType=ci.coerceAndCheckDataType=ci.getJSONTypes=ci.getSchemaTypes=ci.DataType=void 0;const e=z9(),t=$9(),r=l2(),i=dn(),s=qn();var l;(function(S){S[S.Correct=0]="Correct",S[S.Wrong=1]="Wrong"})(l||(ci.DataType=l={}));function c(S){const T=f(S.type);if(T.includes("null")){if(S.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!T.length&&S.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');S.nullable===!0&&T.push("null")}return T}ci.getSchemaTypes=c;function f(S){const T=Array.isArray(S)?S:S?[S]:[];if(T.every(e.isJSONType))return T;throw new Error("type must be JSONType or JSONType[]: "+T.join(","))}ci.getJSONTypes=f;function d(S,T){const{gen:E,data:O,opts:C}=S,M=m(T,C.coerceTypes),D=T.length>0&&!(M.length===0&&T.length===1&&(0,t.schemaHasRulesForType)(S,T[0]));if(D){const $=b(T,O,C.strictNumbers,l.Wrong);E.if($,()=>{M.length?g(S,T,M):x(S)})}return D}ci.coerceAndCheckDataType=d;const h=new Set(["string","number","integer","boolean","null"]);function m(S,T){return T?S.filter(E=>h.has(E)||T==="array"&&E==="array"):[]}function g(S,T,E){const{gen:O,data:C,opts:M}=S,D=O.let("dataType",(0,i._)`typeof ${C}`),$=O.let("coerced",(0,i._)`undefined`);M.coerceTypes==="array"&&O.if((0,i._)`${D} == 'object' && Array.isArray(${C}) && ${C}.length == 1`,()=>O.assign(C,(0,i._)`${C}[0]`).assign(D,(0,i._)`typeof ${C}`).if(b(T,C,M.strictNumbers),()=>O.assign($,C))),O.if((0,i._)`${$} !== undefined`);for(const L of E)(h.has(L)||L==="array"&&M.coerceTypes==="array")&&q(L);O.else(),x(S),O.endIf(),O.if((0,i._)`${$} !== undefined`,()=>{O.assign(C,$),v(S,$)});function q(L){switch(L){case"string":O.elseIf((0,i._)`${D} == "number" || ${D} == "boolean"`).assign($,(0,i._)`"" + ${C}`).elseIf((0,i._)`${C} === null`).assign($,(0,i._)`""`);return;case"number":O.elseIf((0,i._)`${D} == "boolean" || ${C} === null
50
+ || (${D} == "string" && ${C} && ${C} == +${C})`).assign($,(0,i._)`+${C}`);return;case"integer":O.elseIf((0,i._)`${D} === "boolean" || ${C} === null
51
+ || (${D} === "string" && ${C} && ${C} == +${C} && !(${C} % 1))`).assign($,(0,i._)`+${C}`);return;case"boolean":O.elseIf((0,i._)`${C} === "false" || ${C} === 0 || ${C} === null`).assign($,!1).elseIf((0,i._)`${C} === "true" || ${C} === 1`).assign($,!0);return;case"null":O.elseIf((0,i._)`${C} === "" || ${C} === 0 || ${C} === false`),O.assign($,null);return;case"array":O.elseIf((0,i._)`${D} === "string" || ${D} === "number"
52
+ || ${D} === "boolean" || ${C} === null`).assign($,(0,i._)`[${C}]`)}}}function v({gen:S,parentData:T,parentDataProperty:E},O){S.if((0,i._)`${T} !== undefined`,()=>S.assign((0,i._)`${T}[${E}]`,O))}function w(S,T,E,O=l.Correct){const C=O===l.Correct?i.operators.EQ:i.operators.NEQ;let M;switch(S){case"null":return(0,i._)`${T} ${C} null`;case"array":M=(0,i._)`Array.isArray(${T})`;break;case"object":M=(0,i._)`${T} && typeof ${T} == "object" && !Array.isArray(${T})`;break;case"integer":M=D((0,i._)`!(${T} % 1) && !isNaN(${T})`);break;case"number":M=D();break;default:return(0,i._)`typeof ${T} ${C} ${S}`}return O===l.Correct?M:(0,i.not)(M);function D($=i.nil){return(0,i.and)((0,i._)`typeof ${T} == "number"`,$,E?(0,i._)`isFinite(${T})`:i.nil)}}ci.checkDataType=w;function b(S,T,E,O){if(S.length===1)return w(S[0],T,E,O);let C;const M=(0,s.toHash)(S);if(M.array&&M.object){const D=(0,i._)`typeof ${T} != "object"`;C=M.null?D:(0,i._)`!${T} || ${D}`,delete M.null,delete M.array,delete M.object}else C=i.nil;M.number&&delete M.integer;for(const D in M)C=(0,i.and)(C,w(D,T,E,O));return C}ci.checkDataTypes=b;const _={message:({schema:S})=>`must be ${S}`,params:({schema:S,schemaValue:T})=>typeof S=="string"?(0,i._)`{type: ${S}}`:(0,i._)`{type: ${T}}`};function x(S){const T=R(S);(0,r.reportError)(T,_)}ci.reportTypeError=x;function R(S){const{gen:T,data:E,schema:O}=S,C=(0,s.schemaRefOrVal)(S,O,"type");return{gen:T,keyword:"type",data:E,schema:O.type,schemaCode:C,schemaValue:C,parentSchema:O,params:{},it:S}}return ci}var Tv={},L3;function ste(){if(L3)return Tv;L3=1,Object.defineProperty(Tv,"__esModule",{value:!0}),Tv.assignDefaults=void 0;const e=dn(),t=qn();function r(s,l){const{properties:c,items:f}=s.schema;if(l==="object"&&c)for(const d in c)i(s,d,c[d].default);else l==="array"&&Array.isArray(f)&&f.forEach((d,h)=>i(s,h,d.default))}Tv.assignDefaults=r;function i(s,l,c){const{gen:f,compositeRule:d,data:h,opts:m}=s;if(c===void 0)return;const g=(0,e._)`${h}${(0,e.getProperty)(l)}`;if(d){(0,t.checkStrictMode)(s,`default is ignored for: ${g}`);return}let v=(0,e._)`${g} === undefined`;m.useDefaults==="empty"&&(v=(0,e._)`${v} || ${g} === null || ${g} === ""`),f.if(v,(0,e._)`${g} = ${(0,e.stringify)(c)}`)}return Tv}var il={},er={},U3;function hl(){if(U3)return er;U3=1,Object.defineProperty(er,"__esModule",{value:!0}),er.validateUnion=er.validateArray=er.usePattern=er.callValidateCode=er.schemaProperties=er.allSchemaProperties=er.noPropertyInData=er.propertyInData=er.isOwnProperty=er.hasPropFunc=er.reportMissingProp=er.checkMissingProp=er.checkReportMissingProp=void 0;const e=dn(),t=qn(),r=ff(),i=qn();function s(S,T){const{gen:E,data:O,it:C}=S;E.if(m(E,O,T,C.opts.ownProperties),()=>{S.setParams({missingProperty:(0,e._)`${T}`},!0),S.error()})}er.checkReportMissingProp=s;function l({gen:S,data:T,it:{opts:E}},O,C){return(0,e.or)(...O.map(M=>(0,e.and)(m(S,T,M,E.ownProperties),(0,e._)`${C} = ${M}`)))}er.checkMissingProp=l;function c(S,T){S.setParams({missingProperty:T},!0),S.error()}er.reportMissingProp=c;function f(S){return S.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}er.hasPropFunc=f;function d(S,T,E){return(0,e._)`${f(S)}.call(${T}, ${E})`}er.isOwnProperty=d;function h(S,T,E,O){const C=(0,e._)`${T}${(0,e.getProperty)(E)} !== undefined`;return O?(0,e._)`${C} && ${d(S,T,E)}`:C}er.propertyInData=h;function m(S,T,E,O){const C=(0,e._)`${T}${(0,e.getProperty)(E)} === undefined`;return O?(0,e.or)(C,(0,e.not)(d(S,T,E))):C}er.noPropertyInData=m;function g(S){return S?Object.keys(S).filter(T=>T!=="__proto__"):[]}er.allSchemaProperties=g;function v(S,T){return g(T).filter(E=>!(0,t.alwaysValidSchema)(S,T[E]))}er.schemaProperties=v;function w({schemaCode:S,data:T,it:{gen:E,topSchemaRef:O,schemaPath:C,errorPath:M},it:D},$,q,L){const V=L?(0,e._)`${S}, ${T}, ${O}${C}`:T,F=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,M)],[r.default.parentData,D.parentData],[r.default.parentDataProperty,D.parentDataProperty],[r.default.rootData,r.default.rootData]];D.opts.dynamicRef&&F.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const re=(0,e._)`${V}, ${E.object(...F)}`;return q!==e.nil?(0,e._)`${$}.call(${q}, ${re})`:(0,e._)`${$}(${re})`}er.callValidateCode=w;const b=(0,e._)`new RegExp`;function _({gen:S,it:{opts:T}},E){const O=T.unicodeRegExp?"u":"",{regExp:C}=T.code,M=C(E,O);return S.scopeValue("pattern",{key:M.toString(),ref:M,code:(0,e._)`${C.code==="new RegExp"?b:(0,i.useFunc)(S,C)}(${E}, ${O})`})}er.usePattern=_;function x(S){const{gen:T,data:E,keyword:O,it:C}=S,M=T.name("valid");if(C.allErrors){const $=T.let("valid",!0);return D(()=>T.assign($,!1)),$}return T.var(M,!0),D(()=>T.break()),M;function D($){const q=T.const("len",(0,e._)`${E}.length`);T.forRange("i",0,q,L=>{S.subschema({keyword:O,dataProp:L,dataPropType:t.Type.Num},M),T.if((0,e.not)(M),$)})}}er.validateArray=x;function R(S){const{gen:T,schema:E,keyword:O,it:C}=S;if(!Array.isArray(E))throw new Error("ajv implementation error");if(E.some(q=>(0,t.alwaysValidSchema)(C,q))&&!C.opts.unevaluated)return;const D=T.let("valid",!1),$=T.name("_valid");T.block(()=>E.forEach((q,L)=>{const V=S.subschema({keyword:O,schemaProp:L,compositeRule:!0},$);T.assign(D,(0,e._)`${D} || ${$}`),S.mergeValidEvaluated(V,$)||T.if((0,e.not)(D))})),S.result(D,()=>S.reset(),()=>S.error(!0))}return er.validateUnion=R,er}var q3;function lte(){if(q3)return il;q3=1,Object.defineProperty(il,"__esModule",{value:!0}),il.validateKeywordUsage=il.validSchemaType=il.funcKeywordCode=il.macroKeywordCode=void 0;const e=dn(),t=ff(),r=hl(),i=l2();function s(v,w){const{gen:b,keyword:_,schema:x,parentSchema:R,it:S}=v,T=w.macro.call(S.self,x,R,S),E=h(b,_,T);S.opts.validateSchema!==!1&&S.self.validateSchema(T,!0);const O=b.name("valid");v.subschema({schema:T,schemaPath:e.nil,errSchemaPath:`${S.errSchemaPath}/${_}`,topSchemaRef:E,compositeRule:!0},O),v.pass(O,()=>v.error(!0))}il.macroKeywordCode=s;function l(v,w){var b;const{gen:_,keyword:x,schema:R,parentSchema:S,$data:T,it:E}=v;d(E,w);const O=!T&&w.compile?w.compile.call(E.self,R,S,E):w.validate,C=h(_,x,O),M=_.let("valid");v.block$data(M,D),v.ok((b=w.valid)!==null&&b!==void 0?b:M);function D(){if(w.errors===!1)L(),w.modifying&&c(v),V(()=>v.error());else{const F=w.async?$():q();w.modifying&&c(v),V(()=>f(v,F))}}function $(){const F=_.let("ruleErrs",null);return _.try(()=>L((0,e._)`await `),re=>_.assign(M,!1).if((0,e._)`${re} instanceof ${E.ValidationError}`,()=>_.assign(F,(0,e._)`${re}.errors`),()=>_.throw(re))),F}function q(){const F=(0,e._)`${C}.errors`;return _.assign(F,null),L(e.nil),F}function L(F=w.async?(0,e._)`await `:e.nil){const re=E.opts.passContext?t.default.this:t.default.self,ae=!("compile"in w&&!T||w.schema===!1);_.assign(M,(0,e._)`${F}${(0,r.callValidateCode)(v,C,re,ae)}`,w.modifying)}function V(F){var re;_.if((0,e.not)((re=w.valid)!==null&&re!==void 0?re:M),F)}}il.funcKeywordCode=l;function c(v){const{gen:w,data:b,it:_}=v;w.if(_.parentData,()=>w.assign(b,(0,e._)`${_.parentData}[${_.parentDataProperty}]`))}function f(v,w){const{gen:b}=v;b.if((0,e._)`Array.isArray(${w})`,()=>{b.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${w} : ${t.default.vErrors}.concat(${w})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,i.extendErrors)(v)},()=>v.error())}function d({schemaEnv:v},w){if(w.async&&!v.$async)throw new Error("async keyword in sync schema")}function h(v,w,b){if(b===void 0)throw new Error(`keyword "${w}" failed to compile`);return v.scopeValue("keyword",typeof b=="function"?{ref:b}:{ref:b,code:(0,e.stringify)(b)})}function m(v,w,b=!1){return!w.length||w.some(_=>_==="array"?Array.isArray(v):_==="object"?v&&typeof v=="object"&&!Array.isArray(v):typeof v==_||b&&typeof v>"u")}il.validSchemaType=m;function g({schema:v,opts:w,self:b,errSchemaPath:_},x,R){if(Array.isArray(x.keyword)?!x.keyword.includes(R):x.keyword!==R)throw new Error("ajv implementation error");const S=x.dependencies;if(S?.some(T=>!Object.prototype.hasOwnProperty.call(v,T)))throw new Error(`parent schema must have dependencies of ${R}: ${S.join(",")}`);if(x.validateSchema&&!x.validateSchema(v[R])){const E=`keyword "${R}" value is invalid at path "${_}": `+b.errorsText(x.validateSchema.errors);if(w.validateSchema==="log")b.logger.error(E);else throw new Error(E)}}return il.validateKeywordUsage=g,il}var nc={},V3;function ute(){if(V3)return nc;V3=1,Object.defineProperty(nc,"__esModule",{value:!0}),nc.extendSubschemaMode=nc.extendSubschemaData=nc.getSubschema=void 0;const e=dn(),t=qn();function r(l,{keyword:c,schemaProp:f,schema:d,schemaPath:h,errSchemaPath:m,topSchemaRef:g}){if(c!==void 0&&d!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(c!==void 0){const v=l.schema[c];return f===void 0?{schema:v,schemaPath:(0,e._)`${l.schemaPath}${(0,e.getProperty)(c)}`,errSchemaPath:`${l.errSchemaPath}/${c}`}:{schema:v[f],schemaPath:(0,e._)`${l.schemaPath}${(0,e.getProperty)(c)}${(0,e.getProperty)(f)}`,errSchemaPath:`${l.errSchemaPath}/${c}/${(0,t.escapeFragment)(f)}`}}if(d!==void 0){if(h===void 0||m===void 0||g===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:d,schemaPath:h,topSchemaRef:g,errSchemaPath:m}}throw new Error('either "keyword" or "schema" must be passed')}nc.getSubschema=r;function i(l,c,{dataProp:f,dataPropType:d,data:h,dataTypes:m,propertyName:g}){if(h!==void 0&&f!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:v}=c;if(f!==void 0){const{errorPath:b,dataPathArr:_,opts:x}=c,R=v.let("data",(0,e._)`${c.data}${(0,e.getProperty)(f)}`,!0);w(R),l.errorPath=(0,e.str)`${b}${(0,t.getErrorPath)(f,d,x.jsPropertySyntax)}`,l.parentDataProperty=(0,e._)`${f}`,l.dataPathArr=[..._,l.parentDataProperty]}if(h!==void 0){const b=h instanceof e.Name?h:v.let("data",h,!0);w(b),g!==void 0&&(l.propertyName=g)}m&&(l.dataTypes=m);function w(b){l.data=b,l.dataLevel=c.dataLevel+1,l.dataTypes=[],c.definedProperties=new Set,l.parentData=c.data,l.dataNames=[...c.dataNames,b]}}nc.extendSubschemaData=i;function s(l,{jtdDiscriminator:c,jtdMetadata:f,compositeRule:d,createErrors:h,allErrors:m}){d!==void 0&&(l.compositeRule=d),h!==void 0&&(l.createErrors=h),m!==void 0&&(l.allErrors=m),l.jtdDiscriminator=c,l.jtdMetadata=f}return nc.extendSubschemaMode=s,nc}var Zi={},f_,F3;function P9(){return F3||(F3=1,f_=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var i,s,l;if(Array.isArray(t)){if(i=t.length,i!=r.length)return!1;for(s=i;s--!==0;)if(!e(t[s],r[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(l=Object.keys(t),i=l.length,i!==Object.keys(r).length)return!1;for(s=i;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,l[s]))return!1;for(s=i;s--!==0;){var c=l[s];if(!e(t[c],r[c]))return!1}return!0}return t!==t&&r!==r}),f_}var d_={exports:{}},B3;function cte(){if(B3)return d_.exports;B3=1;var e=d_.exports=function(i,s,l){typeof s=="function"&&(l=s,s={}),l=s.cb||l;var c=typeof l=="function"?l:l.pre||function(){},f=l.post||function(){};t(s,c,f,i,"",i)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function t(i,s,l,c,f,d,h,m,g,v){if(c&&typeof c=="object"&&!Array.isArray(c)){s(c,f,d,h,m,g,v);for(var w in c){var b=c[w];if(Array.isArray(b)){if(w in e.arrayKeywords)for(var _=0;_<b.length;_++)t(i,s,l,b[_],f+"/"+w+"/"+_,d,f,w,c,_)}else if(w in e.propsKeywords){if(b&&typeof b=="object")for(var x in b)t(i,s,l,b[x],f+"/"+w+"/"+r(x),d,f,w,c,x)}else(w in e.keywords||i.allKeys&&!(w in e.skipKeywords))&&t(i,s,l,b,f+"/"+w,d,f,w,c)}l(c,f,d,h,m,g,v)}}function r(i){return i.replace(/~/g,"~0").replace(/\//g,"~1")}return d_.exports}var H3;function u2(){if(H3)return Zi;H3=1,Object.defineProperty(Zi,"__esModule",{value:!0}),Zi.getSchemaRefs=Zi.resolveUrl=Zi.normalizeId=Zi._getFullPath=Zi.getFullPath=Zi.inlineRef=void 0;const e=qn(),t=P9(),r=cte(),i=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function s(_,x=!0){return typeof _=="boolean"?!0:x===!0?!c(_):x?f(_)<=x:!1}Zi.inlineRef=s;const l=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function c(_){for(const x in _){if(l.has(x))return!0;const R=_[x];if(Array.isArray(R)&&R.some(c)||typeof R=="object"&&c(R))return!0}return!1}function f(_){let x=0;for(const R in _){if(R==="$ref")return 1/0;if(x++,!i.has(R)&&(typeof _[R]=="object"&&(0,e.eachItem)(_[R],S=>x+=f(S)),x===1/0))return 1/0}return x}function d(_,x="",R){R!==!1&&(x=g(x));const S=_.parse(x);return h(_,S)}Zi.getFullPath=d;function h(_,x){return _.serialize(x).split("#")[0]+"#"}Zi._getFullPath=h;const m=/#\/?$/;function g(_){return _?_.replace(m,""):""}Zi.normalizeId=g;function v(_,x,R){return R=g(R),_.resolve(x,R)}Zi.resolveUrl=v;const w=/^[a-z_][-a-z0-9._]*$/i;function b(_,x){if(typeof _=="boolean")return{};const{schemaId:R,uriResolver:S}=this.opts,T=g(_[R]||x),E={"":T},O=d(S,T,!1),C={},M=new Set;return r(_,{allKeys:!0},(q,L,V,F)=>{if(F===void 0)return;const re=O+L;let ae=E[F];typeof q[R]=="string"&&(ae=K.call(this,q[R])),B.call(this,q.$anchor),B.call(this,q.$dynamicAnchor),E[L]=ae;function K(Y){const fe=this.opts.uriResolver.resolve;if(Y=g(ae?fe(ae,Y):Y),M.has(Y))throw $(Y);M.add(Y);let se=this.refs[Y];return typeof se=="string"&&(se=this.refs[se]),typeof se=="object"?D(q,se.schema,Y):Y!==g(re)&&(Y[0]==="#"?(D(q,C[Y],Y),C[Y]=q):this.refs[Y]=re),Y}function B(Y){if(typeof Y=="string"){if(!w.test(Y))throw new Error(`invalid anchor "${Y}"`);K.call(this,`#${Y}`)}}}),C;function D(q,L,V){if(L!==void 0&&!t(q,L))throw $(V)}function $(q){return new Error(`reference "${q}" resolves to more than one schema`)}}return Zi.getSchemaRefs=b,Zi}var G3;function c2(){if(G3)return ec;G3=1,Object.defineProperty(ec,"__esModule",{value:!0}),ec.getData=ec.KeywordCxt=ec.validateFunctionCode=void 0;const e=ote(),t=gw(),r=$9(),i=gw(),s=ste(),l=lte(),c=ute(),f=dn(),d=ff(),h=u2(),m=qn(),g=l2();function v(de){if(O(de)&&(M(de),E(de))){x(de);return}w(de,()=>(0,e.topBoolOrEmptySchema)(de))}ec.validateFunctionCode=v;function w({gen:de,validateName:te,schema:Se,schemaEnv:we,opts:$e},Te){$e.code.es5?de.func(te,(0,f._)`${d.default.data}, ${d.default.valCxt}`,we.$async,()=>{de.code((0,f._)`"use strict"; ${S(Se,$e)}`),_(de,$e),de.code(Te)}):de.func(te,(0,f._)`${d.default.data}, ${b($e)}`,we.$async,()=>de.code(S(Se,$e)).code(Te))}function b(de){return(0,f._)`{${d.default.instancePath}="", ${d.default.parentData}, ${d.default.parentDataProperty}, ${d.default.rootData}=${d.default.data}${de.dynamicRef?(0,f._)`, ${d.default.dynamicAnchors}={}`:f.nil}}={}`}function _(de,te){de.if(d.default.valCxt,()=>{de.var(d.default.instancePath,(0,f._)`${d.default.valCxt}.${d.default.instancePath}`),de.var(d.default.parentData,(0,f._)`${d.default.valCxt}.${d.default.parentData}`),de.var(d.default.parentDataProperty,(0,f._)`${d.default.valCxt}.${d.default.parentDataProperty}`),de.var(d.default.rootData,(0,f._)`${d.default.valCxt}.${d.default.rootData}`),te.dynamicRef&&de.var(d.default.dynamicAnchors,(0,f._)`${d.default.valCxt}.${d.default.dynamicAnchors}`)},()=>{de.var(d.default.instancePath,(0,f._)`""`),de.var(d.default.parentData,(0,f._)`undefined`),de.var(d.default.parentDataProperty,(0,f._)`undefined`),de.var(d.default.rootData,d.default.data),te.dynamicRef&&de.var(d.default.dynamicAnchors,(0,f._)`{}`)})}function x(de){const{schema:te,opts:Se,gen:we}=de;w(de,()=>{Se.$comment&&te.$comment&&F(de),q(de),we.let(d.default.vErrors,null),we.let(d.default.errors,0),Se.unevaluated&&R(de),D(de),re(de)})}function R(de){const{gen:te,validateName:Se}=de;de.evaluated=te.const("evaluated",(0,f._)`${Se}.evaluated`),te.if((0,f._)`${de.evaluated}.dynamicProps`,()=>te.assign((0,f._)`${de.evaluated}.props`,(0,f._)`undefined`)),te.if((0,f._)`${de.evaluated}.dynamicItems`,()=>te.assign((0,f._)`${de.evaluated}.items`,(0,f._)`undefined`))}function S(de,te){const Se=typeof de=="object"&&de[te.schemaId];return Se&&(te.code.source||te.code.process)?(0,f._)`/*# sourceURL=${Se} */`:f.nil}function T(de,te){if(O(de)&&(M(de),E(de))){C(de,te);return}(0,e.boolOrEmptySchema)(de,te)}function E({schema:de,self:te}){if(typeof de=="boolean")return!de;for(const Se in de)if(te.RULES.all[Se])return!0;return!1}function O(de){return typeof de.schema!="boolean"}function C(de,te){const{schema:Se,gen:we,opts:$e}=de;$e.$comment&&Se.$comment&&F(de),L(de),V(de);const Te=we.const("_errs",d.default.errors);D(de,Te),we.var(te,(0,f._)`${Te} === ${d.default.errors}`)}function M(de){(0,m.checkUnknownRules)(de),$(de)}function D(de,te){if(de.opts.jtd)return K(de,[],!1,te);const Se=(0,t.getSchemaTypes)(de.schema),we=(0,t.coerceAndCheckDataType)(de,Se);K(de,Se,!we,te)}function $(de){const{schema:te,errSchemaPath:Se,opts:we,self:$e}=de;te.$ref&&we.ignoreKeywordsWithRef&&(0,m.schemaHasRulesButRef)(te,$e.RULES)&&$e.logger.warn(`$ref: keywords ignored in schema at path "${Se}"`)}function q(de){const{schema:te,opts:Se}=de;te.default!==void 0&&Se.useDefaults&&Se.strictSchema&&(0,m.checkStrictMode)(de,"default is ignored in the schema root")}function L(de){const te=de.schema[de.opts.schemaId];te&&(de.baseId=(0,h.resolveUrl)(de.opts.uriResolver,de.baseId,te))}function V(de){if(de.schema.$async&&!de.schemaEnv.$async)throw new Error("async schema in sync schema")}function F({gen:de,schemaEnv:te,schema:Se,errSchemaPath:we,opts:$e}){const Te=Se.$comment;if($e.$comment===!0)de.code((0,f._)`${d.default.self}.logger.log(${Te})`);else if(typeof $e.$comment=="function"){const Pe=(0,f.str)`${we}/$comment`,Ge=de.scopeValue("root",{ref:te.root});de.code((0,f._)`${d.default.self}.opts.$comment(${Te}, ${Pe}, ${Ge}.schema)`)}}function re(de){const{gen:te,schemaEnv:Se,validateName:we,ValidationError:$e,opts:Te}=de;Se.$async?te.if((0,f._)`${d.default.errors} === 0`,()=>te.return(d.default.data),()=>te.throw((0,f._)`new ${$e}(${d.default.vErrors})`)):(te.assign((0,f._)`${we}.errors`,d.default.vErrors),Te.unevaluated&&ae(de),te.return((0,f._)`${d.default.errors} === 0`))}function ae({gen:de,evaluated:te,props:Se,items:we}){Se instanceof f.Name&&de.assign((0,f._)`${te}.props`,Se),we instanceof f.Name&&de.assign((0,f._)`${te}.items`,we)}function K(de,te,Se,we){const{gen:$e,schema:Te,data:Pe,allErrors:Ge,opts:Ce,self:Be}=de,{RULES:Fe}=Be;if(Te.$ref&&(Ce.ignoreKeywordsWithRef||!(0,m.schemaHasRulesButRef)(Te,Fe))){$e.block(()=>ue(de,"$ref",Fe.all.$ref.definition));return}Ce.jtd||Y(de,te),$e.block(()=>{for(const ke of Fe.rules)Je(ke);Je(Fe.post)});function Je(ke){(0,r.shouldUseGroup)(Te,ke)&&(ke.type?($e.if((0,i.checkDataType)(ke.type,Pe,Ce.strictNumbers)),B(de,ke),te.length===1&&te[0]===ke.type&&Se&&($e.else(),(0,i.reportTypeError)(de)),$e.endIf()):B(de,ke),Ge||$e.if((0,f._)`${d.default.errors} === ${we||0}`))}}function B(de,te){const{gen:Se,schema:we,opts:{useDefaults:$e}}=de;$e&&(0,s.assignDefaults)(de,te.type),Se.block(()=>{for(const Te of te.rules)(0,r.shouldUseRule)(we,Te)&&ue(de,Te.keyword,Te.definition,te.type)})}function Y(de,te){de.schemaEnv.meta||!de.opts.strictTypes||(fe(de,te),de.opts.allowUnionTypes||se(de,te),N(de,de.dataTypes))}function fe(de,te){if(te.length){if(!de.dataTypes.length){de.dataTypes=te;return}te.forEach(Se=>{U(de.dataTypes,Se)||G(de,`type "${Se}" not allowed by context "${de.dataTypes.join(",")}"`)}),P(de,te)}}function se(de,te){te.length>1&&!(te.length===2&&te.includes("null"))&&G(de,"use allowUnionTypes to allow union type keyword")}function N(de,te){const Se=de.self.RULES.all;for(const we in Se){const $e=Se[we];if(typeof $e=="object"&&(0,r.shouldUseRule)(de.schema,$e)){const{type:Te}=$e.definition;Te.length&&!Te.some(Pe=>I(te,Pe))&&G(de,`missing type "${Te.join(",")}" for keyword "${we}"`)}}}function I(de,te){return de.includes(te)||te==="number"&&de.includes("integer")}function U(de,te){return de.includes(te)||te==="integer"&&de.includes("number")}function P(de,te){const Se=[];for(const we of de.dataTypes)U(te,we)?Se.push(we):te.includes("integer")&&we==="number"&&Se.push("integer");de.dataTypes=Se}function G(de,te){const Se=de.schemaEnv.baseId+de.errSchemaPath;te+=` at "${Se}" (strictTypes)`,(0,m.checkStrictMode)(de,te,de.opts.strictTypes)}class ee{constructor(te,Se,we){if((0,l.validateKeywordUsage)(te,Se,we),this.gen=te.gen,this.allErrors=te.allErrors,this.keyword=we,this.data=te.data,this.schema=te.schema[we],this.$data=Se.$data&&te.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,m.schemaRefOrVal)(te,this.schema,we,this.$data),this.schemaType=Se.schemaType,this.parentSchema=te.schema,this.params={},this.it=te,this.def=Se,this.$data)this.schemaCode=te.gen.const("vSchema",Oe(this.$data,te));else if(this.schemaCode=this.schemaValue,!(0,l.validSchemaType)(this.schema,Se.schemaType,Se.allowUndefined))throw new Error(`${we} value must be ${JSON.stringify(Se.schemaType)}`);("code"in Se?Se.trackErrors:Se.errors!==!1)&&(this.errsCount=te.gen.const("_errs",d.default.errors))}result(te,Se,we){this.failResult((0,f.not)(te),Se,we)}failResult(te,Se,we){this.gen.if(te),we?we():this.error(),Se?(this.gen.else(),Se(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(te,Se){this.failResult((0,f.not)(te),void 0,Se)}fail(te){if(te===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(te),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(te){if(!this.$data)return this.fail(te);const{schemaCode:Se}=this;this.fail((0,f._)`${Se} !== undefined && (${(0,f.or)(this.invalid$data(),te)})`)}error(te,Se,we){if(Se){this.setParams(Se),this._error(te,we),this.setParams({});return}this._error(te,we)}_error(te,Se){(te?g.reportExtraError:g.reportError)(this,this.def.error,Se)}$dataError(){(0,g.reportError)(this,this.def.$dataError||g.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,g.resetErrorsCount)(this.gen,this.errsCount)}ok(te){this.allErrors||this.gen.if(te)}setParams(te,Se){Se?Object.assign(this.params,te):this.params=te}block$data(te,Se,we=f.nil){this.gen.block(()=>{this.check$data(te,we),Se()})}check$data(te=f.nil,Se=f.nil){if(!this.$data)return;const{gen:we,schemaCode:$e,schemaType:Te,def:Pe}=this;we.if((0,f.or)((0,f._)`${$e} === undefined`,Se)),te!==f.nil&&we.assign(te,!0),(Te.length||Pe.validateSchema)&&(we.elseIf(this.invalid$data()),this.$dataError(),te!==f.nil&&we.assign(te,!1)),we.else()}invalid$data(){const{gen:te,schemaCode:Se,schemaType:we,def:$e,it:Te}=this;return(0,f.or)(Pe(),Ge());function Pe(){if(we.length){if(!(Se instanceof f.Name))throw new Error("ajv implementation error");const Ce=Array.isArray(we)?we:[we];return(0,f._)`${(0,i.checkDataTypes)(Ce,Se,Te.opts.strictNumbers,i.DataType.Wrong)}`}return f.nil}function Ge(){if($e.validateSchema){const Ce=te.scopeValue("validate$data",{ref:$e.validateSchema});return(0,f._)`!${Ce}(${Se})`}return f.nil}}subschema(te,Se){const we=(0,c.getSubschema)(this.it,te);(0,c.extendSubschemaData)(we,this.it,te),(0,c.extendSubschemaMode)(we,te);const $e={...this.it,...we,items:void 0,props:void 0};return T($e,Se),$e}mergeEvaluated(te,Se){const{it:we,gen:$e}=this;we.opts.unevaluated&&(we.props!==!0&&te.props!==void 0&&(we.props=m.mergeEvaluated.props($e,te.props,we.props,Se)),we.items!==!0&&te.items!==void 0&&(we.items=m.mergeEvaluated.items($e,te.items,we.items,Se)))}mergeValidEvaluated(te,Se){const{it:we,gen:$e}=this;if(we.opts.unevaluated&&(we.props!==!0||we.items!==!0))return $e.if(Se,()=>this.mergeEvaluated(te,f.Name)),!0}}ec.KeywordCxt=ee;function ue(de,te,Se,we){const $e=new ee(de,Se,te);"code"in Se?Se.code($e,we):$e.$data&&Se.validate?(0,l.funcKeywordCode)($e,Se):"macro"in Se?(0,l.macroKeywordCode)($e,Se):(Se.compile||Se.validate)&&(0,l.funcKeywordCode)($e,Se)}const ve=/^\/(?:[^~]|~0|~1)*$/,Ee=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Oe(de,{dataLevel:te,dataNames:Se,dataPathArr:we}){let $e,Te;if(de==="")return d.default.rootData;if(de[0]==="/"){if(!ve.test(de))throw new Error(`Invalid JSON-pointer: ${de}`);$e=de,Te=d.default.rootData}else{const Be=Ee.exec(de);if(!Be)throw new Error(`Invalid JSON-pointer: ${de}`);const Fe=+Be[1];if($e=Be[2],$e==="#"){if(Fe>=te)throw new Error(Ce("property/index",Fe));return we[te-Fe]}if(Fe>te)throw new Error(Ce("data",Fe));if(Te=Se[te-Fe],!$e)return Te}let Pe=Te;const Ge=$e.split("/");for(const Be of Ge)Be&&(Te=(0,f._)`${Te}${(0,f.getProperty)((0,m.unescapeJsonPointer)(Be))}`,Pe=(0,f._)`${Pe} && ${Te}`);return Pe;function Ce(Be,Fe){return`Cannot access ${Be} ${Fe} levels up, current level is ${te}`}}return ec.getData=Oe,ec}var C1={},K3;function qR(){if(K3)return C1;K3=1,Object.defineProperty(C1,"__esModule",{value:!0});class e extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return C1.default=e,C1}var O1={},Y3;function f2(){if(Y3)return O1;Y3=1,Object.defineProperty(O1,"__esModule",{value:!0});const e=u2();class t extends Error{constructor(i,s,l,c){super(c||`can't resolve reference ${l} from id ${s}`),this.missingRef=(0,e.resolveUrl)(i,s,l),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(i,this.missingRef))}}return O1.default=t,O1}var Bo={},Z3;function VR(){if(Z3)return Bo;Z3=1,Object.defineProperty(Bo,"__esModule",{value:!0}),Bo.resolveSchema=Bo.getCompilingSchema=Bo.resolveRef=Bo.compileSchema=Bo.SchemaEnv=void 0;const e=dn(),t=qR(),r=ff(),i=u2(),s=qn(),l=c2();class c{constructor(R){var S;this.refs={},this.dynamicAnchors={};let T;typeof R.schema=="object"&&(T=R.schema),this.schema=R.schema,this.schemaId=R.schemaId,this.root=R.root||this,this.baseId=(S=R.baseId)!==null&&S!==void 0?S:(0,i.normalizeId)(T?.[R.schemaId||"$id"]),this.schemaPath=R.schemaPath,this.localRefs=R.localRefs,this.meta=R.meta,this.$async=T?.$async,this.refs={}}}Bo.SchemaEnv=c;function f(x){const R=m.call(this,x);if(R)return R;const S=(0,i.getFullPath)(this.opts.uriResolver,x.root.baseId),{es5:T,lines:E}=this.opts.code,{ownProperties:O}=this.opts,C=new e.CodeGen(this.scope,{es5:T,lines:E,ownProperties:O});let M;x.$async&&(M=C.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const D=C.scopeName("validate");x.validateName=D;const $={gen:C,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:C.scopeValue("schema",this.opts.code.source===!0?{ref:x.schema,code:(0,e.stringify)(x.schema)}:{ref:x.schema}),validateName:D,ValidationError:M,schema:x.schema,schemaEnv:x,rootId:S,baseId:x.baseId||S,schemaPath:e.nil,errSchemaPath:x.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let q;try{this._compilations.add(x),(0,l.validateFunctionCode)($),C.optimize(this.opts.code.optimize);const L=C.toString();q=`${C.scopeRefs(r.default.scope)}return ${L}`,this.opts.code.process&&(q=this.opts.code.process(q,x));const F=new Function(`${r.default.self}`,`${r.default.scope}`,q)(this,this.scope.get());if(this.scope.value(D,{ref:F}),F.errors=null,F.schema=x.schema,F.schemaEnv=x,x.$async&&(F.$async=!0),this.opts.code.source===!0&&(F.source={validateName:D,validateCode:L,scopeValues:C._values}),this.opts.unevaluated){const{props:re,items:ae}=$;F.evaluated={props:re instanceof e.Name?void 0:re,items:ae instanceof e.Name?void 0:ae,dynamicProps:re instanceof e.Name,dynamicItems:ae instanceof e.Name},F.source&&(F.source.evaluated=(0,e.stringify)(F.evaluated))}return x.validate=F,x}catch(L){throw delete x.validate,delete x.validateName,q&&this.logger.error("Error compiling schema, function code:",q),L}finally{this._compilations.delete(x)}}Bo.compileSchema=f;function d(x,R,S){var T;S=(0,i.resolveUrl)(this.opts.uriResolver,R,S);const E=x.refs[S];if(E)return E;let O=v.call(this,x,S);if(O===void 0){const C=(T=x.localRefs)===null||T===void 0?void 0:T[S],{schemaId:M}=this.opts;C&&(O=new c({schema:C,schemaId:M,root:x,baseId:R}))}if(O!==void 0)return x.refs[S]=h.call(this,O)}Bo.resolveRef=d;function h(x){return(0,i.inlineRef)(x.schema,this.opts.inlineRefs)?x.schema:x.validate?x:f.call(this,x)}function m(x){for(const R of this._compilations)if(g(R,x))return R}Bo.getCompilingSchema=m;function g(x,R){return x.schema===R.schema&&x.root===R.root&&x.baseId===R.baseId}function v(x,R){let S;for(;typeof(S=this.refs[R])=="string";)R=S;return S||this.schemas[R]||w.call(this,x,R)}function w(x,R){const S=this.opts.uriResolver.parse(R),T=(0,i._getFullPath)(this.opts.uriResolver,S);let E=(0,i.getFullPath)(this.opts.uriResolver,x.baseId,void 0);if(Object.keys(x.schema).length>0&&T===E)return _.call(this,S,x);const O=(0,i.normalizeId)(T),C=this.refs[O]||this.schemas[O];if(typeof C=="string"){const M=w.call(this,x,C);return typeof M?.schema!="object"?void 0:_.call(this,S,M)}if(typeof C?.schema=="object"){if(C.validate||f.call(this,C),O===(0,i.normalizeId)(R)){const{schema:M}=C,{schemaId:D}=this.opts,$=M[D];return $&&(E=(0,i.resolveUrl)(this.opts.uriResolver,E,$)),new c({schema:M,schemaId:D,root:x,baseId:E})}return _.call(this,S,C)}}Bo.resolveSchema=w;const b=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function _(x,{baseId:R,schema:S,root:T}){var E;if(((E=x.fragment)===null||E===void 0?void 0:E[0])!=="/")return;for(const M of x.fragment.slice(1).split("/")){if(typeof S=="boolean")return;const D=S[(0,s.unescapeFragment)(M)];if(D===void 0)return;S=D;const $=typeof S=="object"&&S[this.opts.schemaId];!b.has(M)&&$&&(R=(0,i.resolveUrl)(this.opts.uriResolver,R,$))}let O;if(typeof S!="boolean"&&S.$ref&&!(0,s.schemaHasRulesButRef)(S,this.RULES)){const M=(0,i.resolveUrl)(this.opts.uriResolver,R,S.$ref);O=w.call(this,T,M)}const{schemaId:C}=this.opts;if(O=O||new c({schema:S,schemaId:C,root:T,baseId:R}),O.schema!==O.root.schema)return O}return Bo}const fte="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",dte="Meta-schema for $data reference (JSON AnySchema extension proposal)",hte="object",pte=["$data"],mte={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},gte=!1,yte={$id:fte,description:dte,type:hte,required:pte,properties:mte,additionalProperties:gte};var R1={},Cv={exports:{}},h_,X3;function I9(){if(X3)return h_;X3=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),t=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function r(v){let w="",b=0,_=0;for(_=0;_<v.length;_++)if(b=v[_].charCodeAt(0),b!==48){if(!(b>=48&&b<=57||b>=65&&b<=70||b>=97&&b<=102))return"";w+=v[_];break}for(_+=1;_<v.length;_++){if(b=v[_].charCodeAt(0),!(b>=48&&b<=57||b>=65&&b<=70||b>=97&&b<=102))return"";w+=v[_]}return w}const i=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function s(v){return v.length=0,!0}function l(v,w,b){if(v.length){const _=r(v);if(_!=="")w.push(_);else return b.error=!0,!1;v.length=0}return!0}function c(v){let w=0;const b={error:!1,address:"",zone:""},_=[],x=[];let R=!1,S=!1,T=l;for(let E=0;E<v.length;E++){const O=v[E];if(!(O==="["||O==="]"))if(O===":"){if(R===!0&&(S=!0),!T(x,_,b))break;if(++w>7){b.error=!0;break}E>0&&v[E-1]===":"&&(R=!0),_.push(":");continue}else if(O==="%"){if(!T(x,_,b))break;T=s}else{x.push(O);continue}}return x.length&&(T===s?b.zone=x.join(""):S?_.push(x.join("")):_.push(r(x))),b.address=_.join(""),b}function f(v){if(d(v,":")<2)return{host:v,isIPV6:!1};const w=c(v);if(w.error)return{host:v,isIPV6:!1};{let b=w.address,_=w.address;return w.zone&&(b+="%"+w.zone,_+="%25"+w.zone),{host:b,isIPV6:!0,escapedHost:_}}}function d(v,w){let b=0;for(let _=0;_<v.length;_++)v[_]===w&&b++;return b}function h(v){let w=v;const b=[];let _=-1,x=0;for(;x=w.length;){if(x===1){if(w===".")break;if(w==="/"){b.push("/");break}else{b.push(w);break}}else if(x===2){if(w[0]==="."){if(w[1]===".")break;if(w[1]==="/"){w=w.slice(2);continue}}else if(w[0]==="/"&&(w[1]==="."||w[1]==="/")){b.push("/");break}}else if(x===3&&w==="/.."){b.length!==0&&b.pop(),b.push("/");break}if(w[0]==="."){if(w[1]==="."){if(w[2]==="/"){w=w.slice(3);continue}}else if(w[1]==="/"){w=w.slice(2);continue}}else if(w[0]==="/"&&w[1]==="."){if(w[2]==="/"){w=w.slice(2);continue}else if(w[2]==="."&&w[3]==="/"){w=w.slice(3),b.length!==0&&b.pop();continue}}if((_=w.indexOf("/",1))===-1){b.push(w);break}else b.push(w.slice(0,_)),w=w.slice(_)}return b.join("")}function m(v,w){const b=w!==!0?escape:unescape;return v.scheme!==void 0&&(v.scheme=b(v.scheme)),v.userinfo!==void 0&&(v.userinfo=b(v.userinfo)),v.host!==void 0&&(v.host=b(v.host)),v.path!==void 0&&(v.path=b(v.path)),v.query!==void 0&&(v.query=b(v.query)),v.fragment!==void 0&&(v.fragment=b(v.fragment)),v}function g(v){const w=[];if(v.userinfo!==void 0&&(w.push(v.userinfo),w.push("@")),v.host!==void 0){let b=unescape(v.host);if(!t(b)){const _=f(b);_.isIPV6===!0?b=`[${_.escapedHost}]`:b=v.host}w.push(b)}return(typeof v.port=="number"||typeof v.port=="string")&&(w.push(":"),w.push(String(v.port))),w.length?w.join(""):void 0}return h_={nonSimpleDomain:i,recomposeAuthority:g,normalizeComponentEncoding:m,removeDotSegments:h,isIPv4:t,isUUID:e,normalizeIPv6:f,stringArrayToHexStripped:r},h_}var p_,Q3;function vte(){if(Q3)return p_;Q3=1;const{isUUID:e}=I9(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,r=["http","https","ws","wss","urn","urn:uuid"];function i(O){return r.indexOf(O)!==-1}function s(O){return O.secure===!0?!0:O.secure===!1?!1:O.scheme?O.scheme.length===3&&(O.scheme[0]==="w"||O.scheme[0]==="W")&&(O.scheme[1]==="s"||O.scheme[1]==="S")&&(O.scheme[2]==="s"||O.scheme[2]==="S"):!1}function l(O){return O.host||(O.error=O.error||"HTTP URIs must have a host."),O}function c(O){const C=String(O.scheme).toLowerCase()==="https";return(O.port===(C?443:80)||O.port==="")&&(O.port=void 0),O.path||(O.path="/"),O}function f(O){return O.secure=s(O),O.resourceName=(O.path||"/")+(O.query?"?"+O.query:""),O.path=void 0,O.query=void 0,O}function d(O){if((O.port===(s(O)?443:80)||O.port==="")&&(O.port=void 0),typeof O.secure=="boolean"&&(O.scheme=O.secure?"wss":"ws",O.secure=void 0),O.resourceName){const[C,M]=O.resourceName.split("?");O.path=C&&C!=="/"?C:void 0,O.query=M,O.resourceName=void 0}return O.fragment=void 0,O}function h(O,C){if(!O.path)return O.error="URN can not be parsed",O;const M=O.path.match(t);if(M){const D=C.scheme||O.scheme||"urn";O.nid=M[1].toLowerCase(),O.nss=M[2];const $=`${D}:${C.nid||O.nid}`,q=E($);O.path=void 0,q&&(O=q.parse(O,C))}else O.error=O.error||"URN can not be parsed.";return O}function m(O,C){if(O.nid===void 0)throw new Error("URN without nid cannot be serialized");const M=C.scheme||O.scheme||"urn",D=O.nid.toLowerCase(),$=`${M}:${C.nid||D}`,q=E($);q&&(O=q.serialize(O,C));const L=O,V=O.nss;return L.path=`${D||C.nid}:${V}`,C.skipEscape=!0,L}function g(O,C){const M=O;return M.uuid=M.nss,M.nss=void 0,!C.tolerant&&(!M.uuid||!e(M.uuid))&&(M.error=M.error||"UUID is not valid."),M}function v(O){const C=O;return C.nss=(O.uuid||"").toLowerCase(),C}const w={scheme:"http",domainHost:!0,parse:l,serialize:c},b={scheme:"https",domainHost:w.domainHost,parse:l,serialize:c},_={scheme:"ws",domainHost:!0,parse:f,serialize:d},x={scheme:"wss",domainHost:_.domainHost,parse:_.parse,serialize:_.serialize},T={http:w,https:b,ws:_,wss:x,urn:{scheme:"urn",parse:h,serialize:m,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:g,serialize:v,skipNormalize:!0}};Object.setPrototypeOf(T,null);function E(O){return O&&(T[O]||T[O.toLowerCase()])||void 0}return p_={wsIsSecure:s,SCHEMES:T,isValidSchemeName:i,getSchemeHandler:E},p_}var W3;function L9(){if(W3)return Cv.exports;W3=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:r,normalizeComponentEncoding:i,isIPv4:s,nonSimpleDomain:l}=I9(),{SCHEMES:c,getSchemeHandler:f}=vte();function d(x,R){return typeof x=="string"?x=v(b(x,R),R):typeof x=="object"&&(x=b(v(x,R),R)),x}function h(x,R,S){const T=S?Object.assign({scheme:"null"},S):{scheme:"null"},E=m(b(x,T),b(R,T),T,!0);return T.skipEscape=!0,v(E,T)}function m(x,R,S,T){const E={};return T||(x=b(v(x,S),S),R=b(v(R,S),S)),S=S||{},!S.tolerant&&R.scheme?(E.scheme=R.scheme,E.userinfo=R.userinfo,E.host=R.host,E.port=R.port,E.path=t(R.path||""),E.query=R.query):(R.userinfo!==void 0||R.host!==void 0||R.port!==void 0?(E.userinfo=R.userinfo,E.host=R.host,E.port=R.port,E.path=t(R.path||""),E.query=R.query):(R.path?(R.path[0]==="/"?E.path=t(R.path):((x.userinfo!==void 0||x.host!==void 0||x.port!==void 0)&&!x.path?E.path="/"+R.path:x.path?E.path=x.path.slice(0,x.path.lastIndexOf("/")+1)+R.path:E.path=R.path,E.path=t(E.path)),E.query=R.query):(E.path=x.path,R.query!==void 0?E.query=R.query:E.query=x.query),E.userinfo=x.userinfo,E.host=x.host,E.port=x.port),E.scheme=x.scheme),E.fragment=R.fragment,E}function g(x,R,S){return typeof x=="string"?(x=unescape(x),x=v(i(b(x,S),!0),{...S,skipEscape:!0})):typeof x=="object"&&(x=v(i(x,!0),{...S,skipEscape:!0})),typeof R=="string"?(R=unescape(R),R=v(i(b(R,S),!0),{...S,skipEscape:!0})):typeof R=="object"&&(R=v(i(R,!0),{...S,skipEscape:!0})),x.toLowerCase()===R.toLowerCase()}function v(x,R){const S={host:x.host,scheme:x.scheme,userinfo:x.userinfo,port:x.port,path:x.path,query:x.query,nid:x.nid,nss:x.nss,uuid:x.uuid,fragment:x.fragment,reference:x.reference,resourceName:x.resourceName,secure:x.secure,error:""},T=Object.assign({},R),E=[],O=f(T.scheme||S.scheme);O&&O.serialize&&O.serialize(S,T),S.path!==void 0&&(T.skipEscape?S.path=unescape(S.path):(S.path=escape(S.path),S.scheme!==void 0&&(S.path=S.path.split("%3A").join(":")))),T.reference!=="suffix"&&S.scheme&&E.push(S.scheme,":");const C=r(S);if(C!==void 0&&(T.reference!=="suffix"&&E.push("//"),E.push(C),S.path&&S.path[0]!=="/"&&E.push("/")),S.path!==void 0){let M=S.path;!T.absolutePath&&(!O||!O.absolutePath)&&(M=t(M)),C===void 0&&M[0]==="/"&&M[1]==="/"&&(M="/%2F"+M.slice(2)),E.push(M)}return S.query!==void 0&&E.push("?",S.query),S.fragment!==void 0&&E.push("#",S.fragment),E.join("")}const w=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function b(x,R){const S=Object.assign({},R),T={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let E=!1;S.reference==="suffix"&&(S.scheme?x=S.scheme+":"+x:x="//"+x);const O=x.match(w);if(O){if(T.scheme=O[1],T.userinfo=O[3],T.host=O[4],T.port=parseInt(O[5],10),T.path=O[6]||"",T.query=O[7],T.fragment=O[8],isNaN(T.port)&&(T.port=O[5]),T.host)if(s(T.host)===!1){const D=e(T.host);T.host=D.host.toLowerCase(),E=D.isIPV6}else E=!0;T.scheme===void 0&&T.userinfo===void 0&&T.host===void 0&&T.port===void 0&&T.query===void 0&&!T.path?T.reference="same-document":T.scheme===void 0?T.reference="relative":T.fragment===void 0?T.reference="absolute":T.reference="uri",S.reference&&S.reference!=="suffix"&&S.reference!==T.reference&&(T.error=T.error||"URI is not a "+S.reference+" reference.");const C=f(S.scheme||T.scheme);if(!S.unicodeSupport&&(!C||!C.unicodeSupport)&&T.host&&(S.domainHost||C&&C.domainHost)&&E===!1&&l(T.host))try{T.host=URL.domainToASCII(T.host.toLowerCase())}catch(M){T.error=T.error||"Host's domain name can not be converted to ASCII: "+M}(!C||C&&!C.skipNormalize)&&(x.indexOf("%")!==-1&&(T.scheme!==void 0&&(T.scheme=unescape(T.scheme)),T.host!==void 0&&(T.host=unescape(T.host))),T.path&&(T.path=escape(unescape(T.path))),T.fragment&&(T.fragment=encodeURI(decodeURIComponent(T.fragment)))),C&&C.parse&&C.parse(T,S)}else T.error=T.error||"URI can not be parsed.";return T}const _={SCHEMES:c,normalize:d,resolve:h,resolveComponent:m,equal:g,serialize:v,parse:b};return Cv.exports=_,Cv.exports.default=_,Cv.exports.fastUri=_,Cv.exports}var J3;function bte(){if(J3)return R1;J3=1,Object.defineProperty(R1,"__esModule",{value:!0});const e=L9();return e.code='require("ajv/dist/runtime/uri").default',R1.default=e,R1}var e4;function Ste(){return e4||(e4=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=c2();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=dn();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const i=qR(),s=f2(),l=z9(),c=VR(),f=dn(),d=u2(),h=gw(),m=qn(),g=yte,v=bte(),w=(se,N)=>new RegExp(se,N);w.code="new RegExp";const b=["removeAdditional","useDefaults","coerceTypes"],_=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),x={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},R={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},S=200;function T(se){var N,I,U,P,G,ee,ue,ve,Ee,Oe,de,te,Se,we,$e,Te,Pe,Ge,Ce,Be,Fe,Je,ke,Ue,Xe;const Mt=se.strict,Ae=(N=se.code)===null||N===void 0?void 0:N.optimize,xe=Ae===!0||Ae===void 0?1:Ae||0,Ne=(U=(I=se.code)===null||I===void 0?void 0:I.regExp)!==null&&U!==void 0?U:w,Ke=(P=se.uriResolver)!==null&&P!==void 0?P:v.default;return{strictSchema:(ee=(G=se.strictSchema)!==null&&G!==void 0?G:Mt)!==null&&ee!==void 0?ee:!0,strictNumbers:(ve=(ue=se.strictNumbers)!==null&&ue!==void 0?ue:Mt)!==null&&ve!==void 0?ve:!0,strictTypes:(Oe=(Ee=se.strictTypes)!==null&&Ee!==void 0?Ee:Mt)!==null&&Oe!==void 0?Oe:"log",strictTuples:(te=(de=se.strictTuples)!==null&&de!==void 0?de:Mt)!==null&&te!==void 0?te:"log",strictRequired:(we=(Se=se.strictRequired)!==null&&Se!==void 0?Se:Mt)!==null&&we!==void 0?we:!1,code:se.code?{...se.code,optimize:xe,regExp:Ne}:{optimize:xe,regExp:Ne},loopRequired:($e=se.loopRequired)!==null&&$e!==void 0?$e:S,loopEnum:(Te=se.loopEnum)!==null&&Te!==void 0?Te:S,meta:(Pe=se.meta)!==null&&Pe!==void 0?Pe:!0,messages:(Ge=se.messages)!==null&&Ge!==void 0?Ge:!0,inlineRefs:(Ce=se.inlineRefs)!==null&&Ce!==void 0?Ce:!0,schemaId:(Be=se.schemaId)!==null&&Be!==void 0?Be:"$id",addUsedSchema:(Fe=se.addUsedSchema)!==null&&Fe!==void 0?Fe:!0,validateSchema:(Je=se.validateSchema)!==null&&Je!==void 0?Je:!0,validateFormats:(ke=se.validateFormats)!==null&&ke!==void 0?ke:!0,unicodeRegExp:(Ue=se.unicodeRegExp)!==null&&Ue!==void 0?Ue:!0,int32range:(Xe=se.int32range)!==null&&Xe!==void 0?Xe:!0,uriResolver:Ke}}class E{constructor(N={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,N=this.opts={...N,...T(N)};const{es5:I,lines:U}=this.opts.code;this.scope=new f.ValueScope({scope:{},prefixes:_,es5:I,lines:U}),this.logger=V(N.logger);const P=N.validateFormats;N.validateFormats=!1,this.RULES=(0,l.getRules)(),O.call(this,x,N,"NOT SUPPORTED"),O.call(this,R,N,"DEPRECATED","warn"),this._metaOpts=q.call(this),N.formats&&D.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),N.keywords&&$.call(this,N.keywords),typeof N.meta=="object"&&this.addMetaSchema(N.meta),M.call(this),N.validateFormats=P}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:N,meta:I,schemaId:U}=this.opts;let P=g;U==="id"&&(P={...g},P.id=P.$id,delete P.$id),I&&N&&this.addMetaSchema(P,P[U],!1)}defaultMeta(){const{meta:N,schemaId:I}=this.opts;return this.opts.defaultMeta=typeof N=="object"?N[I]||N:void 0}validate(N,I){let U;if(typeof N=="string"){if(U=this.getSchema(N),!U)throw new Error(`no schema with key or ref "${N}"`)}else U=this.compile(N);const P=U(I);return"$async"in U||(this.errors=U.errors),P}compile(N,I){const U=this._addSchema(N,I);return U.validate||this._compileSchemaEnv(U)}compileAsync(N,I){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:U}=this.opts;return P.call(this,N,I);async function P(Oe,de){await G.call(this,Oe.$schema);const te=this._addSchema(Oe,de);return te.validate||ee.call(this,te)}async function G(Oe){Oe&&!this.getSchema(Oe)&&await P.call(this,{$ref:Oe},!0)}async function ee(Oe){try{return this._compileSchemaEnv(Oe)}catch(de){if(!(de instanceof s.default))throw de;return ue.call(this,de),await ve.call(this,de.missingSchema),ee.call(this,Oe)}}function ue({missingSchema:Oe,missingRef:de}){if(this.refs[Oe])throw new Error(`AnySchema ${Oe} is loaded but ${de} cannot be resolved`)}async function ve(Oe){const de=await Ee.call(this,Oe);this.refs[Oe]||await G.call(this,de.$schema),this.refs[Oe]||this.addSchema(de,Oe,I)}async function Ee(Oe){const de=this._loading[Oe];if(de)return de;try{return await(this._loading[Oe]=U(Oe))}finally{delete this._loading[Oe]}}}addSchema(N,I,U,P=this.opts.validateSchema){if(Array.isArray(N)){for(const ee of N)this.addSchema(ee,void 0,U,P);return this}let G;if(typeof N=="object"){const{schemaId:ee}=this.opts;if(G=N[ee],G!==void 0&&typeof G!="string")throw new Error(`schema ${ee} must be string`)}return I=(0,d.normalizeId)(I||G),this._checkUnique(I),this.schemas[I]=this._addSchema(N,U,I,P,!0),this}addMetaSchema(N,I,U=this.opts.validateSchema){return this.addSchema(N,I,!0,U),this}validateSchema(N,I){if(typeof N=="boolean")return!0;let U;if(U=N.$schema,U!==void 0&&typeof U!="string")throw new Error("$schema must be a string");if(U=U||this.opts.defaultMeta||this.defaultMeta(),!U)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const P=this.validate(U,N);if(!P&&I){const G="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(G);else throw new Error(G)}return P}getSchema(N){let I;for(;typeof(I=C.call(this,N))=="string";)N=I;if(I===void 0){const{schemaId:U}=this.opts,P=new c.SchemaEnv({schema:{},schemaId:U});if(I=c.resolveSchema.call(this,P,N),!I)return;this.refs[N]=I}return I.validate||this._compileSchemaEnv(I)}removeSchema(N){if(N instanceof RegExp)return this._removeAllSchemas(this.schemas,N),this._removeAllSchemas(this.refs,N),this;switch(typeof N){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const I=C.call(this,N);return typeof I=="object"&&this._cache.delete(I.schema),delete this.schemas[N],delete this.refs[N],this}case"object":{const I=N;this._cache.delete(I);let U=N[this.opts.schemaId];return U&&(U=(0,d.normalizeId)(U),delete this.schemas[U],delete this.refs[U]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(N){for(const I of N)this.addKeyword(I);return this}addKeyword(N,I){let U;if(typeof N=="string")U=N,typeof I=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),I.keyword=U);else if(typeof N=="object"&&I===void 0){if(I=N,U=I.keyword,Array.isArray(U)&&!U.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(re.call(this,U,I),!I)return(0,m.eachItem)(U,G=>ae.call(this,G)),this;B.call(this,I);const P={...I,type:(0,h.getJSONTypes)(I.type),schemaType:(0,h.getJSONTypes)(I.schemaType)};return(0,m.eachItem)(U,P.type.length===0?G=>ae.call(this,G,P):G=>P.type.forEach(ee=>ae.call(this,G,P,ee))),this}getKeyword(N){const I=this.RULES.all[N];return typeof I=="object"?I.definition:!!I}removeKeyword(N){const{RULES:I}=this;delete I.keywords[N],delete I.all[N];for(const U of I.rules){const P=U.rules.findIndex(G=>G.keyword===N);P>=0&&U.rules.splice(P,1)}return this}addFormat(N,I){return typeof I=="string"&&(I=new RegExp(I)),this.formats[N]=I,this}errorsText(N=this.errors,{separator:I=", ",dataVar:U="data"}={}){return!N||N.length===0?"No errors":N.map(P=>`${U}${P.instancePath} ${P.message}`).reduce((P,G)=>P+I+G)}$dataMetaSchema(N,I){const U=this.RULES.all;N=JSON.parse(JSON.stringify(N));for(const P of I){const G=P.split("/").slice(1);let ee=N;for(const ue of G)ee=ee[ue];for(const ue in U){const ve=U[ue];if(typeof ve!="object")continue;const{$data:Ee}=ve.definition,Oe=ee[ue];Ee&&Oe&&(ee[ue]=fe(Oe))}}return N}_removeAllSchemas(N,I){for(const U in N){const P=N[U];(!I||I.test(U))&&(typeof P=="string"?delete N[U]:P&&!P.meta&&(this._cache.delete(P.schema),delete N[U]))}}_addSchema(N,I,U,P=this.opts.validateSchema,G=this.opts.addUsedSchema){let ee;const{schemaId:ue}=this.opts;if(typeof N=="object")ee=N[ue];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof N!="boolean")throw new Error("schema must be object or boolean")}let ve=this._cache.get(N);if(ve!==void 0)return ve;U=(0,d.normalizeId)(ee||U);const Ee=d.getSchemaRefs.call(this,N,U);return ve=new c.SchemaEnv({schema:N,schemaId:ue,meta:I,baseId:U,localRefs:Ee}),this._cache.set(ve.schema,ve),G&&!U.startsWith("#")&&(U&&this._checkUnique(U),this.refs[U]=ve),P&&this.validateSchema(N,!0),ve}_checkUnique(N){if(this.schemas[N]||this.refs[N])throw new Error(`schema with key or id "${N}" already exists`)}_compileSchemaEnv(N){if(N.meta?this._compileMetaSchema(N):c.compileSchema.call(this,N),!N.validate)throw new Error("ajv implementation error");return N.validate}_compileMetaSchema(N){const I=this.opts;this.opts=this._metaOpts;try{c.compileSchema.call(this,N)}finally{this.opts=I}}}E.ValidationError=i.default,E.MissingRefError=s.default,e.default=E;function O(se,N,I,U="error"){for(const P in se){const G=P;G in N&&this.logger[U](`${I}: option ${P}. ${se[G]}`)}}function C(se){return se=(0,d.normalizeId)(se),this.schemas[se]||this.refs[se]}function M(){const se=this.opts.schemas;if(se)if(Array.isArray(se))this.addSchema(se);else for(const N in se)this.addSchema(se[N],N)}function D(){for(const se in this.opts.formats){const N=this.opts.formats[se];N&&this.addFormat(se,N)}}function $(se){if(Array.isArray(se)){this.addVocabulary(se);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const N in se){const I=se[N];I.keyword||(I.keyword=N),this.addKeyword(I)}}function q(){const se={...this.opts};for(const N of b)delete se[N];return se}const L={log(){},warn(){},error(){}};function V(se){if(se===!1)return L;if(se===void 0)return console;if(se.log&&se.warn&&se.error)return se;throw new Error("logger must implement log, warn and error methods")}const F=/^[a-z_$][a-z0-9_$:-]*$/i;function re(se,N){const{RULES:I}=this;if((0,m.eachItem)(se,U=>{if(I.keywords[U])throw new Error(`Keyword ${U} is already defined`);if(!F.test(U))throw new Error(`Keyword ${U} has invalid name`)}),!!N&&N.$data&&!("code"in N||"validate"in N))throw new Error('$data keyword must have "code" or "validate" function')}function ae(se,N,I){var U;const P=N?.post;if(I&&P)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:G}=this;let ee=P?G.post:G.rules.find(({type:ve})=>ve===I);if(ee||(ee={type:I,rules:[]},G.rules.push(ee)),G.keywords[se]=!0,!N)return;const ue={keyword:se,definition:{...N,type:(0,h.getJSONTypes)(N.type),schemaType:(0,h.getJSONTypes)(N.schemaType)}};N.before?K.call(this,ee,ue,N.before):ee.rules.push(ue),G.all[se]=ue,(U=N.implements)===null||U===void 0||U.forEach(ve=>this.addKeyword(ve))}function K(se,N,I){const U=se.rules.findIndex(P=>P.keyword===I);U>=0?se.rules.splice(U,0,N):(se.rules.push(N),this.logger.warn(`rule ${I} is not defined`))}function B(se){let{metaSchema:N}=se;N!==void 0&&(se.$data&&this.opts.$data&&(N=fe(N)),se.validateSchema=this.compile(N,!0))}const Y={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function fe(se){return{anyOf:[se,Y]}}})(o_)),o_}var A1={},M1={},j1={},t4;function wte(){if(t4)return j1;t4=1,Object.defineProperty(j1,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return j1.default=e,j1}var xc={},n4;function Ete(){if(n4)return xc;n4=1,Object.defineProperty(xc,"__esModule",{value:!0}),xc.callRef=xc.getValidate=void 0;const e=f2(),t=hl(),r=dn(),i=ff(),s=VR(),l=qn(),c={keyword:"$ref",schemaType:"string",code(h){const{gen:m,schema:g,it:v}=h,{baseId:w,schemaEnv:b,validateName:_,opts:x,self:R}=v,{root:S}=b;if((g==="#"||g==="#/")&&w===S.baseId)return E();const T=s.resolveRef.call(R,S,w,g);if(T===void 0)throw new e.default(v.opts.uriResolver,w,g);if(T instanceof s.SchemaEnv)return O(T);return C(T);function E(){if(b===S)return d(h,_,b,b.$async);const M=m.scopeValue("root",{ref:S});return d(h,(0,r._)`${M}.validate`,S,S.$async)}function O(M){const D=f(h,M);d(h,D,M,M.$async)}function C(M){const D=m.scopeValue("schema",x.code.source===!0?{ref:M,code:(0,r.stringify)(M)}:{ref:M}),$=m.name("valid"),q=h.subschema({schema:M,dataTypes:[],schemaPath:r.nil,topSchemaRef:D,errSchemaPath:g},$);h.mergeEvaluated(q),h.ok($)}}};function f(h,m){const{gen:g}=h;return m.validate?g.scopeValue("validate",{ref:m.validate}):(0,r._)`${g.scopeValue("wrapper",{ref:m})}.validate`}xc.getValidate=f;function d(h,m,g,v){const{gen:w,it:b}=h,{allErrors:_,schemaEnv:x,opts:R}=b,S=R.passContext?i.default.this:r.nil;v?T():E();function T(){if(!x.$async)throw new Error("async schema referenced by sync schema");const M=w.let("valid");w.try(()=>{w.code((0,r._)`await ${(0,t.callValidateCode)(h,m,S)}`),C(m),_||w.assign(M,!0)},D=>{w.if((0,r._)`!(${D} instanceof ${b.ValidationError})`,()=>w.throw(D)),O(D),_||w.assign(M,!1)}),h.ok(M)}function E(){h.result((0,t.callValidateCode)(h,m,S),()=>C(m),()=>O(m))}function O(M){const D=(0,r._)`${M}.errors`;w.assign(i.default.vErrors,(0,r._)`${i.default.vErrors} === null ? ${D} : ${i.default.vErrors}.concat(${D})`),w.assign(i.default.errors,(0,r._)`${i.default.vErrors}.length`)}function C(M){var D;if(!b.opts.unevaluated)return;const $=(D=g?.validate)===null||D===void 0?void 0:D.evaluated;if(b.props!==!0)if($&&!$.dynamicProps)$.props!==void 0&&(b.props=l.mergeEvaluated.props(w,$.props,b.props));else{const q=w.var("props",(0,r._)`${M}.evaluated.props`);b.props=l.mergeEvaluated.props(w,q,b.props,r.Name)}if(b.items!==!0)if($&&!$.dynamicItems)$.items!==void 0&&(b.items=l.mergeEvaluated.items(w,$.items,b.items));else{const q=w.var("items",(0,r._)`${M}.evaluated.items`);b.items=l.mergeEvaluated.items(w,q,b.items,r.Name)}}}return xc.callRef=d,xc.default=c,xc}var r4;function xte(){if(r4)return M1;r4=1,Object.defineProperty(M1,"__esModule",{value:!0});const e=wte(),t=Ete(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return M1.default=r,M1}var k1={},D1={},a4;function _te(){if(a4)return D1;a4=1,Object.defineProperty(D1,"__esModule",{value:!0});const e=dn(),t=e.operators,r={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},i={message:({keyword:l,schemaCode:c})=>(0,e.str)`must be ${r[l].okStr} ${c}`,params:({keyword:l,schemaCode:c})=>(0,e._)`{comparison: ${r[l].okStr}, limit: ${c}}`},s={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:i,code(l){const{keyword:c,data:f,schemaCode:d}=l;l.fail$data((0,e._)`${f} ${r[c].fail} ${d} || isNaN(${f})`)}};return D1.default=s,D1}var N1={},i4;function Tte(){if(i4)return N1;i4=1,Object.defineProperty(N1,"__esModule",{value:!0});const e=dn(),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:i})=>(0,e.str)`must be multiple of ${i}`,params:({schemaCode:i})=>(0,e._)`{multipleOf: ${i}}`},code(i){const{gen:s,data:l,schemaCode:c,it:f}=i,d=f.opts.multipleOfPrecision,h=s.let("res"),m=d?(0,e._)`Math.abs(Math.round(${h}) - ${h}) > 1e-${d}`:(0,e._)`${h} !== parseInt(${h})`;i.fail$data((0,e._)`(${c} === 0 || (${h} = ${l}/${c}, ${m}))`)}};return N1.default=r,N1}var z1={},$1={},o4;function Cte(){if(o4)return $1;o4=1,Object.defineProperty($1,"__esModule",{value:!0});function e(t){const r=t.length;let i=0,s=0,l;for(;s<r;)i++,l=t.charCodeAt(s++),l>=55296&&l<=56319&&s<r&&(l=t.charCodeAt(s),(l&64512)===56320&&s++);return i}return $1.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',$1}var s4;function Ote(){if(s4)return z1;s4=1,Object.defineProperty(z1,"__esModule",{value:!0});const e=dn(),t=qn(),r=Cte(),s={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:l,schemaCode:c}){const f=l==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${f} than ${c} characters`},params:({schemaCode:l})=>(0,e._)`{limit: ${l}}`},code(l){const{keyword:c,data:f,schemaCode:d,it:h}=l,m=c==="maxLength"?e.operators.GT:e.operators.LT,g=h.opts.unicode===!1?(0,e._)`${f}.length`:(0,e._)`${(0,t.useFunc)(l.gen,r.default)}(${f})`;l.fail$data((0,e._)`${g} ${m} ${d}`)}};return z1.default=s,z1}var P1={},l4;function Rte(){if(l4)return P1;l4=1,Object.defineProperty(P1,"__esModule",{value:!0});const e=hl(),t=dn(),i={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:s})=>(0,t.str)`must match pattern "${s}"`,params:({schemaCode:s})=>(0,t._)`{pattern: ${s}}`},code(s){const{data:l,$data:c,schema:f,schemaCode:d,it:h}=s,m=h.opts.unicodeRegExp?"u":"",g=c?(0,t._)`(new RegExp(${d}, ${m}))`:(0,e.usePattern)(s,f);s.fail$data((0,t._)`!${g}.test(${l})`)}};return P1.default=i,P1}var I1={},u4;function Ate(){if(u4)return I1;u4=1,Object.defineProperty(I1,"__esModule",{value:!0});const e=dn(),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:s}){const l=i==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${l} than ${s} properties`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},code(i){const{keyword:s,data:l,schemaCode:c}=i,f=s==="maxProperties"?e.operators.GT:e.operators.LT;i.fail$data((0,e._)`Object.keys(${l}).length ${f} ${c}`)}};return I1.default=r,I1}var L1={},c4;function Mte(){if(c4)return L1;c4=1,Object.defineProperty(L1,"__esModule",{value:!0});const e=hl(),t=dn(),r=qn(),s={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:l}})=>(0,t.str)`must have required property '${l}'`,params:({params:{missingProperty:l}})=>(0,t._)`{missingProperty: ${l}}`},code(l){const{gen:c,schema:f,schemaCode:d,data:h,$data:m,it:g}=l,{opts:v}=g;if(!m&&f.length===0)return;const w=f.length>=v.loopRequired;if(g.allErrors?b():_(),v.strictRequired){const S=l.parentSchema.properties,{definedProperties:T}=l.it;for(const E of f)if(S?.[E]===void 0&&!T.has(E)){const O=g.schemaEnv.baseId+g.errSchemaPath,C=`required property "${E}" is not defined at "${O}" (strictRequired)`;(0,r.checkStrictMode)(g,C,g.opts.strictRequired)}}function b(){if(w||m)l.block$data(t.nil,x);else for(const S of f)(0,e.checkReportMissingProp)(l,S)}function _(){const S=c.let("missing");if(w||m){const T=c.let("valid",!0);l.block$data(T,()=>R(S,T)),l.ok(T)}else c.if((0,e.checkMissingProp)(l,f,S)),(0,e.reportMissingProp)(l,S),c.else()}function x(){c.forOf("prop",d,S=>{l.setParams({missingProperty:S}),c.if((0,e.noPropertyInData)(c,h,S,v.ownProperties),()=>l.error())})}function R(S,T){l.setParams({missingProperty:S}),c.forOf(S,d,()=>{c.assign(T,(0,e.propertyInData)(c,h,S,v.ownProperties)),c.if((0,t.not)(T),()=>{l.error(),c.break()})},t.nil)}}};return L1.default=s,L1}var U1={},f4;function jte(){if(f4)return U1;f4=1,Object.defineProperty(U1,"__esModule",{value:!0});const e=dn(),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:s}){const l=i==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${l} than ${s} items`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},code(i){const{keyword:s,data:l,schemaCode:c}=i,f=s==="maxItems"?e.operators.GT:e.operators.LT;i.fail$data((0,e._)`${l}.length ${f} ${c}`)}};return U1.default=r,U1}var q1={},V1={},d4;function FR(){if(d4)return V1;d4=1,Object.defineProperty(V1,"__esModule",{value:!0});const e=P9();return e.code='require("ajv/dist/runtime/equal").default',V1.default=e,V1}var h4;function kte(){if(h4)return q1;h4=1,Object.defineProperty(q1,"__esModule",{value:!0});const e=gw(),t=dn(),r=qn(),i=FR(),l={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:c,j:f}})=>(0,t.str)`must NOT have duplicate items (items ## ${f} and ${c} are identical)`,params:({params:{i:c,j:f}})=>(0,t._)`{i: ${c}, j: ${f}}`},code(c){const{gen:f,data:d,$data:h,schema:m,parentSchema:g,schemaCode:v,it:w}=c;if(!h&&!m)return;const b=f.let("valid"),_=g.items?(0,e.getSchemaTypes)(g.items):[];c.block$data(b,x,(0,t._)`${v} === false`),c.ok(b);function x(){const E=f.let("i",(0,t._)`${d}.length`),O=f.let("j");c.setParams({i:E,j:O}),f.assign(b,!0),f.if((0,t._)`${E} > 1`,()=>(R()?S:T)(E,O))}function R(){return _.length>0&&!_.some(E=>E==="object"||E==="array")}function S(E,O){const C=f.name("item"),M=(0,e.checkDataTypes)(_,C,w.opts.strictNumbers,e.DataType.Wrong),D=f.const("indices",(0,t._)`{}`);f.for((0,t._)`;${E}--;`,()=>{f.let(C,(0,t._)`${d}[${E}]`),f.if(M,(0,t._)`continue`),_.length>1&&f.if((0,t._)`typeof ${C} == "string"`,(0,t._)`${C} += "_"`),f.if((0,t._)`typeof ${D}[${C}] == "number"`,()=>{f.assign(O,(0,t._)`${D}[${C}]`),c.error(),f.assign(b,!1).break()}).code((0,t._)`${D}[${C}] = ${E}`)})}function T(E,O){const C=(0,r.useFunc)(f,i.default),M=f.name("outer");f.label(M).for((0,t._)`;${E}--;`,()=>f.for((0,t._)`${O} = ${E}; ${O}--;`,()=>f.if((0,t._)`${C}(${d}[${E}], ${d}[${O}])`,()=>{c.error(),f.assign(b,!1).break(M)})))}}};return q1.default=l,q1}var F1={},p4;function Dte(){if(p4)return F1;p4=1,Object.defineProperty(F1,"__esModule",{value:!0});const e=dn(),t=qn(),r=FR(),s={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:l})=>(0,e._)`{allowedValue: ${l}}`},code(l){const{gen:c,data:f,$data:d,schemaCode:h,schema:m}=l;d||m&&typeof m=="object"?l.fail$data((0,e._)`!${(0,t.useFunc)(c,r.default)}(${f}, ${h})`):l.fail((0,e._)`${m} !== ${f}`)}};return F1.default=s,F1}var B1={},m4;function Nte(){if(m4)return B1;m4=1,Object.defineProperty(B1,"__esModule",{value:!0});const e=dn(),t=qn(),r=FR(),s={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:l})=>(0,e._)`{allowedValues: ${l}}`},code(l){const{gen:c,data:f,$data:d,schema:h,schemaCode:m,it:g}=l;if(!d&&h.length===0)throw new Error("enum must have non-empty array");const v=h.length>=g.opts.loopEnum;let w;const b=()=>w??(w=(0,t.useFunc)(c,r.default));let _;if(v||d)_=c.let("valid"),l.block$data(_,x);else{if(!Array.isArray(h))throw new Error("ajv implementation error");const S=c.const("vSchema",m);_=(0,e.or)(...h.map((T,E)=>R(S,E)))}l.pass(_);function x(){c.assign(_,!1),c.forOf("v",m,S=>c.if((0,e._)`${b()}(${f}, ${S})`,()=>c.assign(_,!0).break()))}function R(S,T){const E=h[T];return typeof E=="object"&&E!==null?(0,e._)`${b()}(${f}, ${S}[${T}])`:(0,e._)`${f} === ${E}`}}};return B1.default=s,B1}var g4;function zte(){if(g4)return k1;g4=1,Object.defineProperty(k1,"__esModule",{value:!0});const e=_te(),t=Tte(),r=Ote(),i=Rte(),s=Ate(),l=Mte(),c=jte(),f=kte(),d=Dte(),h=Nte(),m=[e.default,t.default,r.default,i.default,s.default,l.default,c.default,f.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},d.default,h.default];return k1.default=m,k1}var H1={},hp={},y4;function U9(){if(y4)return hp;y4=1,Object.defineProperty(hp,"__esModule",{value:!0}),hp.validateAdditionalItems=void 0;const e=dn(),t=qn(),i={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:l}})=>(0,e.str)`must NOT have more than ${l} items`,params:({params:{len:l}})=>(0,e._)`{limit: ${l}}`},code(l){const{parentSchema:c,it:f}=l,{items:d}=c;if(!Array.isArray(d)){(0,t.checkStrictMode)(f,'"additionalItems" is ignored when "items" is not an array of schemas');return}s(l,d)}};function s(l,c){const{gen:f,schema:d,data:h,keyword:m,it:g}=l;g.items=!0;const v=f.const("len",(0,e._)`${h}.length`);if(d===!1)l.setParams({len:c.length}),l.pass((0,e._)`${v} <= ${c.length}`);else if(typeof d=="object"&&!(0,t.alwaysValidSchema)(g,d)){const b=f.var("valid",(0,e._)`${v} <= ${c.length}`);f.if((0,e.not)(b),()=>w(b)),l.ok(b)}function w(b){f.forRange("i",c.length,v,_=>{l.subschema({keyword:m,dataProp:_,dataPropType:t.Type.Num},b),g.allErrors||f.if((0,e.not)(b),()=>f.break())})}}return hp.validateAdditionalItems=s,hp.default=i,hp}var G1={},pp={},v4;function q9(){if(v4)return pp;v4=1,Object.defineProperty(pp,"__esModule",{value:!0}),pp.validateTuple=void 0;const e=dn(),t=qn(),r=hl(),i={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(l){const{schema:c,it:f}=l;if(Array.isArray(c))return s(l,"additionalItems",c);f.items=!0,!(0,t.alwaysValidSchema)(f,c)&&l.ok((0,r.validateArray)(l))}};function s(l,c,f=l.schema){const{gen:d,parentSchema:h,data:m,keyword:g,it:v}=l;_(h),v.opts.unevaluated&&f.length&&v.items!==!0&&(v.items=t.mergeEvaluated.items(d,f.length,v.items));const w=d.name("valid"),b=d.const("len",(0,e._)`${m}.length`);f.forEach((x,R)=>{(0,t.alwaysValidSchema)(v,x)||(d.if((0,e._)`${b} > ${R}`,()=>l.subschema({keyword:g,schemaProp:R,dataProp:R},w)),l.ok(w))});function _(x){const{opts:R,errSchemaPath:S}=v,T=f.length,E=T===x.minItems&&(T===x.maxItems||x[c]===!1);if(R.strictTuples&&!E){const O=`"${g}" is ${T}-tuple, but minItems or maxItems/${c} are not specified or different at path "${S}"`;(0,t.checkStrictMode)(v,O,R.strictTuples)}}}return pp.validateTuple=s,pp.default=i,pp}var b4;function $te(){if(b4)return G1;b4=1,Object.defineProperty(G1,"__esModule",{value:!0});const e=q9(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,e.validateTuple)(r,"items")};return G1.default=t,G1}var K1={},S4;function Pte(){if(S4)return K1;S4=1,Object.defineProperty(K1,"__esModule",{value:!0});const e=dn(),t=qn(),r=hl(),i=U9(),l={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:c}})=>(0,e.str)`must NOT have more than ${c} items`,params:({params:{len:c}})=>(0,e._)`{limit: ${c}}`},code(c){const{schema:f,parentSchema:d,it:h}=c,{prefixItems:m}=d;h.items=!0,!(0,t.alwaysValidSchema)(h,f)&&(m?(0,i.validateAdditionalItems)(c,m):c.ok((0,r.validateArray)(c)))}};return K1.default=l,K1}var Y1={},w4;function Ite(){if(w4)return Y1;w4=1,Object.defineProperty(Y1,"__esModule",{value:!0});const e=dn(),t=qn(),i={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:s,max:l}})=>l===void 0?(0,e.str)`must contain at least ${s} valid item(s)`:(0,e.str)`must contain at least ${s} and no more than ${l} valid item(s)`,params:({params:{min:s,max:l}})=>l===void 0?(0,e._)`{minContains: ${s}}`:(0,e._)`{minContains: ${s}, maxContains: ${l}}`},code(s){const{gen:l,schema:c,parentSchema:f,data:d,it:h}=s;let m,g;const{minContains:v,maxContains:w}=f;h.opts.next?(m=v===void 0?1:v,g=w):m=1;const b=l.const("len",(0,e._)`${d}.length`);if(s.setParams({min:m,max:g}),g===void 0&&m===0){(0,t.checkStrictMode)(h,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(g!==void 0&&m>g){(0,t.checkStrictMode)(h,'"minContains" > "maxContains" is always invalid'),s.fail();return}if((0,t.alwaysValidSchema)(h,c)){let T=(0,e._)`${b} >= ${m}`;g!==void 0&&(T=(0,e._)`${T} && ${b} <= ${g}`),s.pass(T);return}h.items=!0;const _=l.name("valid");g===void 0&&m===1?R(_,()=>l.if(_,()=>l.break())):m===0?(l.let(_,!0),g!==void 0&&l.if((0,e._)`${d}.length > 0`,x)):(l.let(_,!1),x()),s.result(_,()=>s.reset());function x(){const T=l.name("_valid"),E=l.let("count",0);R(T,()=>l.if(T,()=>S(E)))}function R(T,E){l.forRange("i",0,b,O=>{s.subschema({keyword:"contains",dataProp:O,dataPropType:t.Type.Num,compositeRule:!0},T),E()})}function S(T){l.code((0,e._)`${T}++`),g===void 0?l.if((0,e._)`${T} >= ${m}`,()=>l.assign(_,!0).break()):(l.if((0,e._)`${T} > ${g}`,()=>l.assign(_,!1).break()),m===1?l.assign(_,!0):l.if((0,e._)`${T} >= ${m}`,()=>l.assign(_,!0)))}}};return Y1.default=i,Y1}var m_={},E4;function Lte(){return E4||(E4=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=dn(),r=qn(),i=hl();e.error={message:({params:{property:d,depsCount:h,deps:m}})=>{const g=h===1?"property":"properties";return(0,t.str)`must have ${g} ${m} when property ${d} is present`},params:({params:{property:d,depsCount:h,deps:m,missingProperty:g}})=>(0,t._)`{property: ${d},
53
+ missingProperty: ${g},
54
+ depsCount: ${h},
55
+ deps: ${m}}`};const s={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(d){const[h,m]=l(d);c(d,h),f(d,m)}};function l({schema:d}){const h={},m={};for(const g in d){if(g==="__proto__")continue;const v=Array.isArray(d[g])?h:m;v[g]=d[g]}return[h,m]}function c(d,h=d.schema){const{gen:m,data:g,it:v}=d;if(Object.keys(h).length===0)return;const w=m.let("missing");for(const b in h){const _=h[b];if(_.length===0)continue;const x=(0,i.propertyInData)(m,g,b,v.opts.ownProperties);d.setParams({property:b,depsCount:_.length,deps:_.join(", ")}),v.allErrors?m.if(x,()=>{for(const R of _)(0,i.checkReportMissingProp)(d,R)}):(m.if((0,t._)`${x} && (${(0,i.checkMissingProp)(d,_,w)})`),(0,i.reportMissingProp)(d,w),m.else())}}e.validatePropertyDeps=c;function f(d,h=d.schema){const{gen:m,data:g,keyword:v,it:w}=d,b=m.name("valid");for(const _ in h)(0,r.alwaysValidSchema)(w,h[_])||(m.if((0,i.propertyInData)(m,g,_,w.opts.ownProperties),()=>{const x=d.subschema({keyword:v,schemaProp:_},b);d.mergeValidEvaluated(x,b)},()=>m.var(b,!0)),d.ok(b))}e.validateSchemaDeps=f,e.default=s})(m_)),m_}var Z1={},x4;function Ute(){if(x4)return Z1;x4=1,Object.defineProperty(Z1,"__esModule",{value:!0});const e=dn(),t=qn(),i={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:s})=>(0,e._)`{propertyName: ${s.propertyName}}`},code(s){const{gen:l,schema:c,data:f,it:d}=s;if((0,t.alwaysValidSchema)(d,c))return;const h=l.name("valid");l.forIn("key",f,m=>{s.setParams({propertyName:m}),s.subschema({keyword:"propertyNames",data:m,dataTypes:["string"],propertyName:m,compositeRule:!0},h),l.if((0,e.not)(h),()=>{s.error(!0),d.allErrors||l.break()})}),s.ok(h)}};return Z1.default=i,Z1}var X1={},_4;function V9(){if(_4)return X1;_4=1,Object.defineProperty(X1,"__esModule",{value:!0});const e=hl(),t=dn(),r=ff(),i=qn(),l={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:c})=>(0,t._)`{additionalProperty: ${c.additionalProperty}}`},code(c){const{gen:f,schema:d,parentSchema:h,data:m,errsCount:g,it:v}=c;if(!g)throw new Error("ajv implementation error");const{allErrors:w,opts:b}=v;if(v.props=!0,b.removeAdditional!=="all"&&(0,i.alwaysValidSchema)(v,d))return;const _=(0,e.allSchemaProperties)(h.properties),x=(0,e.allSchemaProperties)(h.patternProperties);R(),c.ok((0,t._)`${g} === ${r.default.errors}`);function R(){f.forIn("key",m,C=>{!_.length&&!x.length?E(C):f.if(S(C),()=>E(C))})}function S(C){let M;if(_.length>8){const D=(0,i.schemaRefOrVal)(v,h.properties,"properties");M=(0,e.isOwnProperty)(f,D,C)}else _.length?M=(0,t.or)(..._.map(D=>(0,t._)`${C} === ${D}`)):M=t.nil;return x.length&&(M=(0,t.or)(M,...x.map(D=>(0,t._)`${(0,e.usePattern)(c,D)}.test(${C})`))),(0,t.not)(M)}function T(C){f.code((0,t._)`delete ${m}[${C}]`)}function E(C){if(b.removeAdditional==="all"||b.removeAdditional&&d===!1){T(C);return}if(d===!1){c.setParams({additionalProperty:C}),c.error(),w||f.break();return}if(typeof d=="object"&&!(0,i.alwaysValidSchema)(v,d)){const M=f.name("valid");b.removeAdditional==="failing"?(O(C,M,!1),f.if((0,t.not)(M),()=>{c.reset(),T(C)})):(O(C,M),w||f.if((0,t.not)(M),()=>f.break()))}}function O(C,M,D){const $={keyword:"additionalProperties",dataProp:C,dataPropType:i.Type.Str};D===!1&&Object.assign($,{compositeRule:!0,createErrors:!1,allErrors:!1}),c.subschema($,M)}}};return X1.default=l,X1}var Q1={},T4;function qte(){if(T4)return Q1;T4=1,Object.defineProperty(Q1,"__esModule",{value:!0});const e=c2(),t=hl(),r=qn(),i=V9(),s={keyword:"properties",type:"object",schemaType:"object",code(l){const{gen:c,schema:f,parentSchema:d,data:h,it:m}=l;m.opts.removeAdditional==="all"&&d.additionalProperties===void 0&&i.default.code(new e.KeywordCxt(m,i.default,"additionalProperties"));const g=(0,t.allSchemaProperties)(f);for(const x of g)m.definedProperties.add(x);m.opts.unevaluated&&g.length&&m.props!==!0&&(m.props=r.mergeEvaluated.props(c,(0,r.toHash)(g),m.props));const v=g.filter(x=>!(0,r.alwaysValidSchema)(m,f[x]));if(v.length===0)return;const w=c.name("valid");for(const x of v)b(x)?_(x):(c.if((0,t.propertyInData)(c,h,x,m.opts.ownProperties)),_(x),m.allErrors||c.else().var(w,!0),c.endIf()),l.it.definedProperties.add(x),l.ok(w);function b(x){return m.opts.useDefaults&&!m.compositeRule&&f[x].default!==void 0}function _(x){l.subschema({keyword:"properties",schemaProp:x,dataProp:x},w)}}};return Q1.default=s,Q1}var W1={},C4;function Vte(){if(C4)return W1;C4=1,Object.defineProperty(W1,"__esModule",{value:!0});const e=hl(),t=dn(),r=qn(),i=qn(),s={keyword:"patternProperties",type:"object",schemaType:"object",code(l){const{gen:c,schema:f,data:d,parentSchema:h,it:m}=l,{opts:g}=m,v=(0,e.allSchemaProperties)(f),w=v.filter(E=>(0,r.alwaysValidSchema)(m,f[E]));if(v.length===0||w.length===v.length&&(!m.opts.unevaluated||m.props===!0))return;const b=g.strictSchema&&!g.allowMatchingProperties&&h.properties,_=c.name("valid");m.props!==!0&&!(m.props instanceof t.Name)&&(m.props=(0,i.evaluatedPropsToName)(c,m.props));const{props:x}=m;R();function R(){for(const E of v)b&&S(E),m.allErrors?T(E):(c.var(_,!0),T(E),c.if(_))}function S(E){for(const O in b)new RegExp(E).test(O)&&(0,r.checkStrictMode)(m,`property ${O} matches pattern ${E} (use allowMatchingProperties)`)}function T(E){c.forIn("key",d,O=>{c.if((0,t._)`${(0,e.usePattern)(l,E)}.test(${O})`,()=>{const C=w.includes(E);C||l.subschema({keyword:"patternProperties",schemaProp:E,dataProp:O,dataPropType:i.Type.Str},_),m.opts.unevaluated&&x!==!0?c.assign((0,t._)`${x}[${O}]`,!0):!C&&!m.allErrors&&c.if((0,t.not)(_),()=>c.break())})})}}};return W1.default=s,W1}var J1={},O4;function Fte(){if(O4)return J1;O4=1,Object.defineProperty(J1,"__esModule",{value:!0});const e=qn(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:i,schema:s,it:l}=r;if((0,e.alwaysValidSchema)(l,s)){r.fail();return}const c=i.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},c),r.failResult(c,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};return J1.default=t,J1}var eS={},R4;function Bte(){if(R4)return eS;R4=1,Object.defineProperty(eS,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:hl().validateUnion,error:{message:"must match a schema in anyOf"}};return eS.default=t,eS}var tS={},A4;function Hte(){if(A4)return tS;A4=1,Object.defineProperty(tS,"__esModule",{value:!0});const e=dn(),t=qn(),i={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:s})=>(0,e._)`{passingSchemas: ${s.passing}}`},code(s){const{gen:l,schema:c,parentSchema:f,it:d}=s;if(!Array.isArray(c))throw new Error("ajv implementation error");if(d.opts.discriminator&&f.discriminator)return;const h=c,m=l.let("valid",!1),g=l.let("passing",null),v=l.name("_valid");s.setParams({passing:g}),l.block(w),s.result(m,()=>s.reset(),()=>s.error(!0));function w(){h.forEach((b,_)=>{let x;(0,t.alwaysValidSchema)(d,b)?l.var(v,!0):x=s.subschema({keyword:"oneOf",schemaProp:_,compositeRule:!0},v),_>0&&l.if((0,e._)`${v} && ${m}`).assign(m,!1).assign(g,(0,e._)`[${g}, ${_}]`).else(),l.if(v,()=>{l.assign(m,!0),l.assign(g,_),x&&s.mergeEvaluated(x,e.Name)})})}}};return tS.default=i,tS}var nS={},M4;function Gte(){if(M4)return nS;M4=1,Object.defineProperty(nS,"__esModule",{value:!0});const e=qn(),t={keyword:"allOf",schemaType:"array",code(r){const{gen:i,schema:s,it:l}=r;if(!Array.isArray(s))throw new Error("ajv implementation error");const c=i.name("valid");s.forEach((f,d)=>{if((0,e.alwaysValidSchema)(l,f))return;const h=r.subschema({keyword:"allOf",schemaProp:d},c);r.ok(c),r.mergeEvaluated(h)})}};return nS.default=t,nS}var rS={},j4;function Kte(){if(j4)return rS;j4=1,Object.defineProperty(rS,"__esModule",{value:!0});const e=dn(),t=qn(),i={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:l})=>(0,e.str)`must match "${l.ifClause}" schema`,params:({params:l})=>(0,e._)`{failingKeyword: ${l.ifClause}}`},code(l){const{gen:c,parentSchema:f,it:d}=l;f.then===void 0&&f.else===void 0&&(0,t.checkStrictMode)(d,'"if" without "then" and "else" is ignored');const h=s(d,"then"),m=s(d,"else");if(!h&&!m)return;const g=c.let("valid",!0),v=c.name("_valid");if(w(),l.reset(),h&&m){const _=c.let("ifClause");l.setParams({ifClause:_}),c.if(v,b("then",_),b("else",_))}else h?c.if(v,b("then")):c.if((0,e.not)(v),b("else"));l.pass(g,()=>l.error(!0));function w(){const _=l.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},v);l.mergeEvaluated(_)}function b(_,x){return()=>{const R=l.subschema({keyword:_},v);c.assign(g,v),l.mergeValidEvaluated(R,g),x?c.assign(x,(0,e._)`${_}`):l.setParams({ifClause:_})}}}};function s(l,c){const f=l.schema[c];return f!==void 0&&!(0,t.alwaysValidSchema)(l,f)}return rS.default=i,rS}var aS={},k4;function Yte(){if(k4)return aS;k4=1,Object.defineProperty(aS,"__esModule",{value:!0});const e=qn(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:i,it:s}){i.if===void 0&&(0,e.checkStrictMode)(s,`"${r}" without "if" is ignored`)}};return aS.default=t,aS}var D4;function Zte(){if(D4)return H1;D4=1,Object.defineProperty(H1,"__esModule",{value:!0});const e=U9(),t=$te(),r=q9(),i=Pte(),s=Ite(),l=Lte(),c=Ute(),f=V9(),d=qte(),h=Vte(),m=Fte(),g=Bte(),v=Hte(),w=Gte(),b=Kte(),_=Yte();function x(R=!1){const S=[m.default,g.default,v.default,w.default,b.default,_.default,c.default,f.default,l.default,d.default,h.default];return R?S.push(t.default,i.default):S.push(e.default,r.default),S.push(s.default),S}return H1.default=x,H1}var iS={},oS={},N4;function Xte(){if(N4)return oS;N4=1,Object.defineProperty(oS,"__esModule",{value:!0});const e=dn(),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:i})=>(0,e.str)`must match format "${i}"`,params:({schemaCode:i})=>(0,e._)`{format: ${i}}`},code(i,s){const{gen:l,data:c,$data:f,schema:d,schemaCode:h,it:m}=i,{opts:g,errSchemaPath:v,schemaEnv:w,self:b}=m;if(!g.validateFormats)return;f?_():x();function _(){const R=l.scopeValue("formats",{ref:b.formats,code:g.code.formats}),S=l.const("fDef",(0,e._)`${R}[${h}]`),T=l.let("fType"),E=l.let("format");l.if((0,e._)`typeof ${S} == "object" && !(${S} instanceof RegExp)`,()=>l.assign(T,(0,e._)`${S}.type || "string"`).assign(E,(0,e._)`${S}.validate`),()=>l.assign(T,(0,e._)`"string"`).assign(E,S)),i.fail$data((0,e.or)(O(),C()));function O(){return g.strictSchema===!1?e.nil:(0,e._)`${h} && !${E}`}function C(){const M=w.$async?(0,e._)`(${S}.async ? await ${E}(${c}) : ${E}(${c}))`:(0,e._)`${E}(${c})`,D=(0,e._)`(typeof ${E} == "function" ? ${M} : ${E}.test(${c}))`;return(0,e._)`${E} && ${E} !== true && ${T} === ${s} && !${D}`}}function x(){const R=b.formats[d];if(!R){O();return}if(R===!0)return;const[S,T,E]=C(R);S===s&&i.pass(M());function O(){if(g.strictSchema===!1){b.logger.warn(D());return}throw new Error(D());function D(){return`unknown format "${d}" ignored in schema at path "${v}"`}}function C(D){const $=D instanceof RegExp?(0,e.regexpCode)(D):g.code.formats?(0,e._)`${g.code.formats}${(0,e.getProperty)(d)}`:void 0,q=l.scopeValue("formats",{key:d,ref:D,code:$});return typeof D=="object"&&!(D instanceof RegExp)?[D.type||"string",D.validate,(0,e._)`${q}.validate`]:["string",D,q]}function M(){if(typeof R=="object"&&!(R instanceof RegExp)&&R.async){if(!w.$async)throw new Error("async format in sync schema");return(0,e._)`await ${E}(${c})`}return typeof T=="function"?(0,e._)`${E}(${c})`:(0,e._)`${E}.test(${c})`}}}};return oS.default=r,oS}var z4;function Qte(){if(z4)return iS;z4=1,Object.defineProperty(iS,"__esModule",{value:!0});const t=[Xte().default];return iS.default=t,iS}var Eh={},$4;function Wte(){return $4||($4=1,Object.defineProperty(Eh,"__esModule",{value:!0}),Eh.contentVocabulary=Eh.metadataVocabulary=void 0,Eh.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Eh.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Eh}var P4;function Jte(){if(P4)return A1;P4=1,Object.defineProperty(A1,"__esModule",{value:!0});const e=xte(),t=zte(),r=Zte(),i=Qte(),s=Wte(),l=[e.default,t.default,(0,r.default)(),i.default,s.metadataVocabulary,s.contentVocabulary];return A1.default=l,A1}var sS={},Ov={},I4;function ene(){if(I4)return Ov;I4=1,Object.defineProperty(Ov,"__esModule",{value:!0}),Ov.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(Ov.DiscrError=e={})),Ov}var L4;function tne(){if(L4)return sS;L4=1,Object.defineProperty(sS,"__esModule",{value:!0});const e=dn(),t=ene(),r=VR(),i=f2(),s=qn(),c={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:f,tagName:d}})=>f===t.DiscrError.Tag?`tag "${d}" must be string`:`value of tag "${d}" must be in oneOf`,params:({params:{discrError:f,tag:d,tagName:h}})=>(0,e._)`{error: ${f}, tag: ${h}, tagValue: ${d}}`},code(f){const{gen:d,data:h,schema:m,parentSchema:g,it:v}=f,{oneOf:w}=g;if(!v.opts.discriminator)throw new Error("discriminator: requires discriminator option");const b=m.propertyName;if(typeof b!="string")throw new Error("discriminator: requires propertyName");if(m.mapping)throw new Error("discriminator: mapping is not supported");if(!w)throw new Error("discriminator: requires oneOf keyword");const _=d.let("valid",!1),x=d.const("tag",(0,e._)`${h}${(0,e.getProperty)(b)}`);d.if((0,e._)`typeof ${x} == "string"`,()=>R(),()=>f.error(!1,{discrError:t.DiscrError.Tag,tag:x,tagName:b})),f.ok(_);function R(){const E=T();d.if(!1);for(const O in E)d.elseIf((0,e._)`${x} === ${O}`),d.assign(_,S(E[O]));d.else(),f.error(!1,{discrError:t.DiscrError.Mapping,tag:x,tagName:b}),d.endIf()}function S(E){const O=d.name("valid"),C=f.subschema({keyword:"oneOf",schemaProp:E},O);return f.mergeEvaluated(C,e.Name),O}function T(){var E;const O={},C=D(g);let M=!0;for(let L=0;L<w.length;L++){let V=w[L];if(V?.$ref&&!(0,s.schemaHasRulesButRef)(V,v.self.RULES)){const re=V.$ref;if(V=r.resolveRef.call(v.self,v.schemaEnv.root,v.baseId,re),V instanceof r.SchemaEnv&&(V=V.schema),V===void 0)throw new i.default(v.opts.uriResolver,v.baseId,re)}const F=(E=V?.properties)===null||E===void 0?void 0:E[b];if(typeof F!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${b}"`);M=M&&(C||D(V)),$(F,L)}if(!M)throw new Error(`discriminator: "${b}" must be required`);return O;function D({required:L}){return Array.isArray(L)&&L.includes(b)}function $(L,V){if(L.const)q(L.const,V);else if(L.enum)for(const F of L.enum)q(F,V);else throw new Error(`discriminator: "properties/${b}" must have "const" or "enum"`)}function q(L,V){if(typeof L!="string"||L in O)throw new Error(`discriminator: "${b}" values must be unique strings`);O[L]=V}}}};return sS.default=c,sS}const nne="http://json-schema.org/draft-07/schema#",rne="http://json-schema.org/draft-07/schema#",ane="Core schema meta-schema",ine={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},one=["object","boolean"],sne={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},lne={$schema:nne,$id:rne,title:ane,definitions:ine,type:one,properties:sne,default:!0};var U4;function BR(){return U4||(U4=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const r=Ste(),i=Jte(),s=tne(),l=lne,c=["/properties"],f="http://json-schema.org/draft-07/schema";class d extends r.default{_addVocabularies(){super._addVocabularies(),i.default.forEach(b=>this.addVocabulary(b)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const b=this.opts.$data?this.$dataMetaSchema(l,c):l;this.addMetaSchema(b,f,!1),this.refs["http://json-schema.org/schema"]=f}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(f)?f:void 0)}}t.Ajv=d,e.exports=t=d,e.exports.Ajv=d,Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var h=c2();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return h.KeywordCxt}});var m=dn();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return m._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return m.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return m.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return m.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return m.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return m.CodeGen}});var g=qR();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return g.default}});var v=f2();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return v.default}})})(_1,_1.exports)),_1.exports}var une=BR();const F9=Il(une);var lS={exports:{}},g_={},q4;function cne(){return q4||(q4=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(L,V){return{validate:L,compare:V}}e.fullFormats={date:t(l,c),time:t(d(!0),h),"date-time":t(v(!0),w),"iso-time":t(d(),m),"iso-date-time":t(v(),b),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:R,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:q,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:T,int32:{type:"number",validate:C},int64:{type:"number",validate:M},float:{type:"number",validate:D},double:{type:"number",validate:D},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,c),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,h),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,w),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,m),"iso-date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,b),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function r(L){return L%4===0&&(L%100!==0||L%400===0)}const i=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,s=[0,31,28,31,30,31,30,31,31,30,31,30,31];function l(L){const V=i.exec(L);if(!V)return!1;const F=+V[1],re=+V[2],ae=+V[3];return re>=1&&re<=12&&ae>=1&&ae<=(re===2&&r(F)?29:s[re])}function c(L,V){if(L&&V)return L>V?1:L<V?-1:0}const f=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function d(L){return function(F){const re=f.exec(F);if(!re)return!1;const ae=+re[1],K=+re[2],B=+re[3],Y=re[4],fe=re[5]==="-"?-1:1,se=+(re[6]||0),N=+(re[7]||0);if(se>23||N>59||L&&!Y)return!1;if(ae<=23&&K<=59&&B<60)return!0;const I=K-N*fe,U=ae-se*fe-(I<0?1:0);return(U===23||U===-1)&&(I===59||I===-1)&&B<61}}function h(L,V){if(!(L&&V))return;const F=new Date("2020-01-01T"+L).valueOf(),re=new Date("2020-01-01T"+V).valueOf();if(F&&re)return F-re}function m(L,V){if(!(L&&V))return;const F=f.exec(L),re=f.exec(V);if(F&&re)return L=F[1]+F[2]+F[3],V=re[1]+re[2]+re[3],L>V?1:L<V?-1:0}const g=/t|\s/i;function v(L){const V=d(L);return function(re){const ae=re.split(g);return ae.length===2&&l(ae[0])&&V(ae[1])}}function w(L,V){if(!(L&&V))return;const F=new Date(L).valueOf(),re=new Date(V).valueOf();if(F&&re)return F-re}function b(L,V){if(!(L&&V))return;const[F,re]=L.split(g),[ae,K]=V.split(g),B=c(F,ae);if(B!==void 0)return B||h(re,K)}const _=/\/|:/,x=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function R(L){return _.test(L)&&x.test(L)}const S=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function T(L){return S.lastIndex=0,S.test(L)}const E=-2147483648,O=2**31-1;function C(L){return Number.isInteger(L)&&L<=O&&L>=E}function M(L){return Number.isInteger(L)}function D(){return!0}const $=/[^\\]\\Z/;function q(L){if($.test(L))return!1;try{return new RegExp(L),!0}catch{return!1}}})(g_)),g_}var y_={},V4;function fne(){return V4||(V4=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=BR(),r=dn(),i=r.operators,s={formatMaximum:{okStr:"<=",ok:i.LTE,fail:i.GT},formatMinimum:{okStr:">=",ok:i.GTE,fail:i.LT},formatExclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},formatExclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}},l={message:({keyword:f,schemaCode:d})=>(0,r.str)`should be ${s[f].okStr} ${d}`,params:({keyword:f,schemaCode:d})=>(0,r._)`{comparison: ${s[f].okStr}, limit: ${d}}`};e.formatLimitDefinition={keyword:Object.keys(s),type:"string",schemaType:"string",$data:!0,error:l,code(f){const{gen:d,data:h,schemaCode:m,keyword:g,it:v}=f,{opts:w,self:b}=v;if(!w.validateFormats)return;const _=new t.KeywordCxt(v,b.RULES.all.format.definition,"format");_.$data?x():R();function x(){const T=d.scopeValue("formats",{ref:b.formats,code:w.code.formats}),E=d.const("fmt",(0,r._)`${T}[${_.schemaCode}]`);f.fail$data((0,r.or)((0,r._)`typeof ${E} != "object"`,(0,r._)`${E} instanceof RegExp`,(0,r._)`typeof ${E}.compare != "function"`,S(E)))}function R(){const T=_.schema,E=b.formats[T];if(!E||E===!0)return;if(typeof E!="object"||E instanceof RegExp||typeof E.compare!="function")throw new Error(`"${g}": format "${T}" does not define "compare" function`);const O=d.scopeValue("formats",{key:T,ref:E,code:w.code.formats?(0,r._)`${w.code.formats}${(0,r.getProperty)(T)}`:void 0});f.fail$data(S(O))}function S(T){return(0,r._)`${T}.compare(${h}, ${m}) ${s[g].fail} 0`}},dependencies:["format"]};const c=f=>(f.addKeyword(e.formatLimitDefinition),f);e.default=c})(y_)),y_}var F4;function dne(){return F4||(F4=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=cne(),i=fne(),s=dn(),l=new s.Name("fullFormats"),c=new s.Name("fastFormats"),f=(h,m={keywords:!0})=>{if(Array.isArray(m))return d(h,m,r.fullFormats,l),h;const[g,v]=m.mode==="fast"?[r.fastFormats,c]:[r.fullFormats,l],w=m.formats||r.formatNames;return d(h,w,g,v),m.keywords&&(0,i.default)(h),h};f.get=(h,m="full")=>{const v=(m==="fast"?r.fastFormats:r.fullFormats)[h];if(!v)throw new Error(`Unknown format "${h}"`);return v};function d(h,m,g,v){var w,b;(w=(b=h.opts.code).formats)!==null&&w!==void 0||(b.formats=(0,s._)`require("ajv-formats/dist/formats").${v}`);for(const _ of m)h.addFormat(_,g[_])}e.exports=t=f,Object.defineProperty(t,"__esModule",{value:!0}),t.default=f})(lS,lS.exports)),lS.exports}var hne=dne();const pne=Il(hne);function mne(){const e=new F9({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return pne(e),e}class gne{constructor(t){this._ajv=t??mne()}getValidator(t){const r="$id"in t&&typeof t.$id=="string"?this._ajv.getSchema(t.$id)??this._ajv.compile(t):this._ajv.compile(t);return i=>r(i)?{valid:!0,data:i,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(r.errors)}}}class yne{constructor(t){this._client=t}async*callToolStream(t,r=s2,i){const s=this._client,l={...i,task:i?.task??(s.isToolTask(t.name)?{}:void 0)},c=s.requestStream({method:"tools/call",params:t},r,l),f=s.getToolOutputValidator(t.name);for await(const d of c){if(d.type==="result"&&f){const h=d.result;if(!h.structuredContent&&!h.isError){yield{type:"error",error:new It(an.InvalidRequest,`Tool ${t.name} has an output schema but did not return structured content`)};return}if(h.structuredContent)try{const m=f(h.structuredContent);if(!m.valid){yield{type:"error",error:new It(an.InvalidParams,`Structured content does not match the tool's output schema: ${m.errorMessage}`)};return}}catch(m){if(m instanceof It){yield{type:"error",error:m};return}yield{type:"error",error:new It(an.InvalidParams,`Failed to validate structured content: ${m instanceof Error?m.message:String(m)}`)};return}}yield d}}async getTask(t,r){return this._client.getTask({taskId:t},r)}async getTaskResult(t,r,i){return this._client.getTaskResult({taskId:t},r,i)}async listTasks(t,r){return this._client.listTasks(t?{cursor:t}:void 0,r)}async cancelTask(t,r){return this._client.cancelTask({taskId:t},r)}requestStream(t,r,i){return this._client.requestStream(t,r,i)}}function vne(e,t,r){if(!e)throw new Error(`${r} does not support task creation (required for ${t})`);switch(t){case"tools/call":if(!e.tools?.call)throw new Error(`${r} does not support task creation for tools/call (required for ${t})`);break}}function bne(e,t,r){if(!e)throw new Error(`${r} does not support task creation (required for ${t})`);switch(t){case"sampling/createMessage":if(!e.sampling?.createMessage)throw new Error(`${r} does not support task creation for sampling/createMessage (required for ${t})`);break;case"elicitation/create":if(!e.elicitation?.create)throw new Error(`${r} does not support task creation for elicitation/create (required for ${t})`);break}}function PS(e,t){if(!(!e||t===null||typeof t!="object")){if(e.type==="object"&&e.properties&&typeof e.properties=="object"){const r=t,i=e.properties;for(const s of Object.keys(i)){const l=i[s];r[s]===void 0&&Object.prototype.hasOwnProperty.call(l,"default")&&(r[s]=l.default),r[s]!==void 0&&PS(l,r[s])}}if(Array.isArray(e.anyOf))for(const r of e.anyOf)typeof r!="boolean"&&PS(r,t);if(Array.isArray(e.oneOf))for(const r of e.oneOf)typeof r!="boolean"&&PS(r,t)}}function Sne(e){if(!e)return{supportsFormMode:!1,supportsUrlMode:!1};const t=e.form!==void 0,r=e.url!==void 0;return{supportsFormMode:t||!t&&!r,supportsUrlMode:r}}class wne extends ate{constructor(t,r){super(r),this._clientInfo=t,this._cachedToolOutputValidators=new Map,this._cachedKnownTaskTools=new Set,this._cachedRequiredTaskTools=new Set,this._listChangedDebounceTimers=new Map,this._capabilities=r?.capabilities??{},this._jsonSchemaValidator=r?.jsonSchemaValidator??new gne,r?.listChanged&&(this._pendingListChangedConfig=r.listChanged)}_setupListChangedHandlers(t){t.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler("tools",R9,t.tools,async()=>(await this.listTools()).tools),t.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler("prompts",T9,t.prompts,async()=>(await this.listPrompts()).prompts),t.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler("resources",E9,t.resources,async()=>(await this.listResources()).resources)}get experimental(){return this._experimental||(this._experimental={tasks:new yne(this)}),this._experimental}registerCapabilities(t){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=ite(this._capabilities,t)}setRequestHandler(t,r){const s=Z6(t)?.method;if(!s)throw new Error("Schema is missing a method literal");let l;if(r2(s)){const f=s;l=f._zod?.def?.value??f.value}else{const f=s;l=f._def?.value??f.value}if(typeof l!="string")throw new Error("Schema method literal must be a string");const c=l;if(c==="elicitation/create"){const f=async(d,h)=>{const m=kc(k9,d);if(!m.success){const S=m.error instanceof Error?m.error.message:String(m.error);throw new It(an.InvalidParams,`Invalid elicitation request: ${S}`)}const{params:g}=m.data;g.mode=g.mode??"form";const{supportsFormMode:v,supportsUrlMode:w}=Sne(this._capabilities.elicitation);if(g.mode==="form"&&!v)throw new It(an.InvalidParams,"Client does not support form-mode elicitation requests");if(g.mode==="url"&&!w)throw new It(an.InvalidParams,"Client does not support URL-mode elicitation requests");const b=await Promise.resolve(r(d,h));if(g.task){const S=kc(pb,b);if(!S.success){const T=S.error instanceof Error?S.error.message:String(S.error);throw new It(an.InvalidParams,`Invalid task creation result: ${T}`)}return S.data}const _=kc(D9,b);if(!_.success){const S=_.error instanceof Error?_.error.message:String(_.error);throw new It(an.InvalidParams,`Invalid elicitation result: ${S}`)}const x=_.data,R=g.mode==="form"?g.requestedSchema:void 0;if(g.mode==="form"&&x.action==="accept"&&x.content&&R&&this._capabilities.elicitation?.form?.applyDefaults)try{PS(R,x.content)}catch{}return x};return super.setRequestHandler(t,f)}if(c==="sampling/createMessage"){const f=async(d,h)=>{const m=kc(M9,d);if(!m.success){const b=m.error instanceof Error?m.error.message:String(m.error);throw new It(an.InvalidParams,`Invalid sampling request: ${b}`)}const{params:g}=m.data,v=await Promise.resolve(r(d,h));if(g.task){const b=kc(pb,v);if(!b.success){const _=b.error instanceof Error?b.error.message:String(b.error);throw new It(an.InvalidParams,`Invalid task creation result: ${_}`)}return b.data}const w=kc(j9,v);if(!w.success){const b=w.error instanceof Error?w.error.message:String(w.error);throw new It(an.InvalidParams,`Invalid sampling result: ${b}`)}return w.data};return super.setRequestHandler(t,f)}return super.setRequestHandler(t,r)}assertCapability(t,r){if(!this._serverCapabilities?.[t])throw new Error(`Server does not support ${t} (required for ${r})`)}async connect(t,r){if(await super.connect(t),t.sessionId===void 0)try{const i=await this.request({method:"initialize",params:{protocolVersion:a2,capabilities:this._capabilities,clientInfo:this._clientInfo}},h9,r);if(i===void 0)throw new Error(`Server sent invalid initialize result: ${i}`);if(!_J.includes(i.protocolVersion))throw new Error(`Server's protocol version is not supported: ${i.protocolVersion}`);this._serverCapabilities=i.capabilities,this._serverVersion=i.serverInfo,t.setProtocolVersion&&t.setProtocolVersion(i.protocolVersion),this._instructions=i.instructions,await this.notification({method:"notifications/initialized"}),this._pendingListChangedConfig&&(this._setupListChangedHandlers(this._pendingListChangedConfig),this._pendingListChangedConfig=void 0)}catch(i){throw this.close(),i}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}getInstructions(){return this._instructions}assertCapabilityForMethod(t){switch(t){case"logging/setLevel":if(!this._serverCapabilities?.logging)throw new Error(`Server does not support logging (required for ${t})`);break;case"prompts/get":case"prompts/list":if(!this._serverCapabilities?.prompts)throw new Error(`Server does not support prompts (required for ${t})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!this._serverCapabilities?.resources)throw new Error(`Server does not support resources (required for ${t})`);if(t==="resources/subscribe"&&!this._serverCapabilities.resources.subscribe)throw new Error(`Server does not support resource subscriptions (required for ${t})`);break;case"tools/call":case"tools/list":if(!this._serverCapabilities?.tools)throw new Error(`Server does not support tools (required for ${t})`);break;case"completion/complete":if(!this._serverCapabilities?.completions)throw new Error(`Server does not support completions (required for ${t})`);break}}assertNotificationCapability(t){switch(t){case"notifications/roots/list_changed":if(!this._capabilities.roots?.listChanged)throw new Error(`Client does not support roots list changed notifications (required for ${t})`);break}}assertRequestHandlerCapability(t){if(this._capabilities)switch(t){case"sampling/createMessage":if(!this._capabilities.sampling)throw new Error(`Client does not support sampling capability (required for ${t})`);break;case"elicitation/create":if(!this._capabilities.elicitation)throw new Error(`Client does not support elicitation capability (required for ${t})`);break;case"roots/list":if(!this._capabilities.roots)throw new Error(`Client does not support roots capability (required for ${t})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw new Error(`Client does not support tasks capability (required for ${t})`);break}}assertTaskCapability(t){vne(this._serverCapabilities?.tasks?.requests,t,"Server")}assertTaskHandlerCapability(t){this._capabilities&&bne(this._capabilities.tasks?.requests,t,"Client")}async ping(t){return this.request({method:"ping"},Np,t)}async complete(t,r){return this.request({method:"completion/complete",params:t},N9,r)}async setLoggingLevel(t,r){return this.request({method:"logging/setLevel",params:{level:t}},Np,r)}async getPrompt(t,r){return this.request({method:"prompts/get",params:t},_9,r)}async listPrompts(t,r){return this.request({method:"prompts/list",params:t},x9,r)}async listResources(t,r){return this.request({method:"resources/list",params:t},b9,r)}async listResourceTemplates(t,r){return this.request({method:"resources/templates/list",params:t},S9,r)}async readResource(t,r){return this.request({method:"resources/read",params:t},w9,r)}async subscribeResource(t,r){return this.request({method:"resources/subscribe",params:t},Np,r)}async unsubscribeResource(t,r){return this.request({method:"resources/unsubscribe",params:t},Np,r)}async callTool(t,r=s2,i){if(this.isToolTaskRequired(t.name))throw new It(an.InvalidRequest,`Tool "${t.name}" requires task-based execution. Use client.experimental.tasks.callToolStream() instead.`);const s=await this.request({method:"tools/call",params:t},r,i),l=this.getToolOutputValidator(t.name);if(l){if(!s.structuredContent&&!s.isError)throw new It(an.InvalidRequest,`Tool ${t.name} has an output schema but did not return structured content`);if(s.structuredContent)try{const c=l(s.structuredContent);if(!c.valid)throw new It(an.InvalidParams,`Structured content does not match the tool's output schema: ${c.errorMessage}`)}catch(c){throw c instanceof It?c:new It(an.InvalidParams,`Failed to validate structured content: ${c instanceof Error?c.message:String(c)}`)}}return s}isToolTask(t){return this._serverCapabilities?.tasks?.requests?.tools?.call?this._cachedKnownTaskTools.has(t):!1}isToolTaskRequired(t){return this._cachedRequiredTaskTools.has(t)}cacheToolMetadata(t){this._cachedToolOutputValidators.clear(),this._cachedKnownTaskTools.clear(),this._cachedRequiredTaskTools.clear();for(const r of t){if(r.outputSchema){const s=this._jsonSchemaValidator.getValidator(r.outputSchema);this._cachedToolOutputValidators.set(r.name,s)}const i=r.execution?.taskSupport;(i==="required"||i==="optional")&&this._cachedKnownTaskTools.add(r.name),i==="required"&&this._cachedRequiredTaskTools.add(r.name)}}getToolOutputValidator(t){return this._cachedToolOutputValidators.get(t)}async listTools(t,r){const i=await this.request({method:"tools/list",params:t},O9,r);return this.cacheToolMetadata(i.tools),i}_setupListChangedHandler(t,r,i,s){const l=vee.safeParse(i);if(!l.success)throw new Error(`Invalid ${t} listChanged options: ${l.error.message}`);if(typeof i.onChanged!="function")throw new Error(`Invalid ${t} listChanged options: onChanged must be a function`);const{autoRefresh:c,debounceMs:f}=l.data,{onChanged:d}=i,h=async()=>{if(!c){d(null,null);return}try{const g=await s();d(null,g)}catch(g){const v=g instanceof Error?g:new Error(String(g));d(v,null)}},m=()=>{if(f){const g=this._listChangedDebounceTimers.get(t);g&&clearTimeout(g);const v=setTimeout(h,f);this._listChangedDebounceTimers.set(t,v)}else h()};this.setNotificationHandler(r,m)}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}}function hC(e){return e?e instanceof Headers?Object.fromEntries(e.entries()):Array.isArray(e)?Object.fromEntries(e):{...e}:{}}function Ene(e=fetch,t){return t?async(r,i)=>{const s={...t,...i,headers:i?.headers?{...hC(t.headers),...hC(i.headers)}:t.headers};return e(r,s)}:e}let HR;HR=globalThis.crypto;async function xne(e){return(await HR).getRandomValues(new Uint8Array(e))}async function _ne(e){const t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~",r=Math.pow(2,8)-Math.pow(2,8)%t.length;let i="";for(;i.length<e;){const s=await xne(e-i.length);for(const l of s)l<r&&(i+=t[l%t.length])}return i}async function Tne(e){return await _ne(e)}async function Cne(e){const t=await(await HR).subtle.digest("SHA-256",new TextEncoder().encode(e));return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}async function One(e){if(e||(e=43),e<43||e>128)throw`Expected a length between 43 and 128. Received ${e}.`;const t=await Tne(e),r=await Cne(t);return{code_verifier:t,code_challenge:r}}const hi=MW().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:EJ.custom,message:"URL must be parseable",fatal:!0}),DY}).refine(e=>{const t=new URL(e);return t.protocol!=="javascript:"&&t.protocol!=="data:"&&t.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),Rne=mi({resource:be().url(),authorization_servers:et(hi).optional(),jwks_uri:be().url().optional(),scopes_supported:et(be()).optional(),bearer_methods_supported:et(be()).optional(),resource_signing_alg_values_supported:et(be()).optional(),resource_name:be().optional(),resource_documentation:be().optional(),resource_policy_uri:be().url().optional(),resource_tos_uri:be().url().optional(),tls_client_certificate_bound_access_tokens:kr().optional(),authorization_details_types_supported:et(be()).optional(),dpop_signing_alg_values_supported:et(be()).optional(),dpop_bound_access_tokens_required:kr().optional()}),B9=mi({issuer:be(),authorization_endpoint:hi,token_endpoint:hi,registration_endpoint:hi.optional(),scopes_supported:et(be()).optional(),response_types_supported:et(be()),response_modes_supported:et(be()).optional(),grant_types_supported:et(be()).optional(),token_endpoint_auth_methods_supported:et(be()).optional(),token_endpoint_auth_signing_alg_values_supported:et(be()).optional(),service_documentation:hi.optional(),revocation_endpoint:hi.optional(),revocation_endpoint_auth_methods_supported:et(be()).optional(),revocation_endpoint_auth_signing_alg_values_supported:et(be()).optional(),introspection_endpoint:be().optional(),introspection_endpoint_auth_methods_supported:et(be()).optional(),introspection_endpoint_auth_signing_alg_values_supported:et(be()).optional(),code_challenge_methods_supported:et(be()).optional(),client_id_metadata_document_supported:kr().optional()}),Ane=mi({issuer:be(),authorization_endpoint:hi,token_endpoint:hi,userinfo_endpoint:hi.optional(),jwks_uri:hi,registration_endpoint:hi.optional(),scopes_supported:et(be()).optional(),response_types_supported:et(be()),response_modes_supported:et(be()).optional(),grant_types_supported:et(be()).optional(),acr_values_supported:et(be()).optional(),subject_types_supported:et(be()),id_token_signing_alg_values_supported:et(be()),id_token_encryption_alg_values_supported:et(be()).optional(),id_token_encryption_enc_values_supported:et(be()).optional(),userinfo_signing_alg_values_supported:et(be()).optional(),userinfo_encryption_alg_values_supported:et(be()).optional(),userinfo_encryption_enc_values_supported:et(be()).optional(),request_object_signing_alg_values_supported:et(be()).optional(),request_object_encryption_alg_values_supported:et(be()).optional(),request_object_encryption_enc_values_supported:et(be()).optional(),token_endpoint_auth_methods_supported:et(be()).optional(),token_endpoint_auth_signing_alg_values_supported:et(be()).optional(),display_values_supported:et(be()).optional(),claim_types_supported:et(be()).optional(),claims_supported:et(be()).optional(),service_documentation:be().optional(),claims_locales_supported:et(be()).optional(),ui_locales_supported:et(be()).optional(),claims_parameter_supported:kr().optional(),request_parameter_supported:kr().optional(),request_uri_parameter_supported:kr().optional(),require_request_uri_registration:kr().optional(),op_policy_uri:hi.optional(),op_tos_uri:hi.optional(),client_id_metadata_document_supported:kr().optional()}),Mne=rt({...Ane.shape,...B9.pick({code_challenge_methods_supported:!0}).shape}),jne=rt({access_token:be(),id_token:be().optional(),token_type:be(),expires_in:xJ().optional(),scope:be().optional(),refresh_token:be().optional()}).strip(),kne=rt({error:be(),error_description:be().optional(),error_uri:be().optional()}),B4=hi.optional().or(_t("").transform(()=>{})),Dne=rt({redirect_uris:et(hi),token_endpoint_auth_method:be().optional(),grant_types:et(be()).optional(),response_types:et(be()).optional(),client_name:be().optional(),client_uri:hi.optional(),logo_uri:B4,scope:be().optional(),contacts:et(be()).optional(),tos_uri:B4,policy_uri:be().optional(),jwks_uri:hi.optional(),jwks:XW().optional(),software_id:be().optional(),software_version:be().optional(),software_statement:be().optional()}).strip(),Nne=rt({client_id:be(),client_secret:be().optional(),client_id_issued_at:Yn().optional(),client_secret_expires_at:Yn().optional()}).strip(),zne=Dne.merge(Nne);rt({error:be(),error_description:be().optional()}).strip();rt({token:be(),token_type_hint:be().optional()}).strip();function $ne(e){const t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function Pne({requestedResource:e,configuredResource:t}){const r=typeof e=="string"?new URL(e):new URL(e.href),i=typeof t=="string"?new URL(t):new URL(t.href);if(r.origin!==i.origin||r.pathname.length<i.pathname.length)return!1;const s=r.pathname.endsWith("/")?r.pathname:r.pathname+"/",l=i.pathname.endsWith("/")?i.pathname:i.pathname+"/";return s.startsWith(l)}class La extends Error{constructor(t,r){super(t),this.errorUri=r,this.name=this.constructor.name}toResponseObject(){const t={error:this.errorCode,error_description:this.message};return this.errorUri&&(t.error_uri=this.errorUri),t}get errorCode(){return this.constructor.errorCode}}class pC extends La{}pC.errorCode="invalid_request";class yw extends La{}yw.errorCode="invalid_client";class vw extends La{}vw.errorCode="invalid_grant";class bw extends La{}bw.errorCode="unauthorized_client";class mC extends La{}mC.errorCode="unsupported_grant_type";class gC extends La{}gC.errorCode="invalid_scope";class yC extends La{}yC.errorCode="access_denied";class sm extends La{}sm.errorCode="server_error";class vC extends La{}vC.errorCode="temporarily_unavailable";class bC extends La{}bC.errorCode="unsupported_response_type";class SC extends La{}SC.errorCode="unsupported_token_type";class wC extends La{}wC.errorCode="invalid_token";class EC extends La{}EC.errorCode="method_not_allowed";class xC extends La{}xC.errorCode="too_many_requests";class Sw extends La{}Sw.errorCode="invalid_client_metadata";class _C extends La{}_C.errorCode="insufficient_scope";class TC extends La{}TC.errorCode="invalid_target";const Ine={[pC.errorCode]:pC,[yw.errorCode]:yw,[vw.errorCode]:vw,[bw.errorCode]:bw,[mC.errorCode]:mC,[gC.errorCode]:gC,[yC.errorCode]:yC,[sm.errorCode]:sm,[vC.errorCode]:vC,[bC.errorCode]:bC,[SC.errorCode]:SC,[wC.errorCode]:wC,[EC.errorCode]:EC,[xC.errorCode]:xC,[Sw.errorCode]:Sw,[_C.errorCode]:_C,[TC.errorCode]:TC};class mp extends Error{constructor(t){super(t??"Unauthorized")}}function Lne(e){return["client_secret_basic","client_secret_post","none"].includes(e)}const v_="code",b_="S256";function Une(e,t){const r=e.client_secret!==void 0;return t.length===0?r?"client_secret_post":"none":"token_endpoint_auth_method"in e&&e.token_endpoint_auth_method&&Lne(e.token_endpoint_auth_method)&&t.includes(e.token_endpoint_auth_method)?e.token_endpoint_auth_method:r&&t.includes("client_secret_basic")?"client_secret_basic":r&&t.includes("client_secret_post")?"client_secret_post":t.includes("none")?"none":r?"client_secret_post":"none"}function qne(e,t,r,i){const{client_id:s,client_secret:l}=t;switch(e){case"client_secret_basic":Vne(s,l,r);return;case"client_secret_post":Fne(s,l,i);return;case"none":Bne(s,i);return;default:throw new Error(`Unsupported client authentication method: ${e}`)}}function Vne(e,t,r){if(!t)throw new Error("client_secret_basic authentication requires a client_secret");const i=btoa(`${e}:${t}`);r.set("Authorization",`Basic ${i}`)}function Fne(e,t,r){r.set("client_id",e),t&&r.set("client_secret",t)}function Bne(e,t){t.set("client_id",e)}async function H9(e){const t=e instanceof Response?e.status:void 0,r=e instanceof Response?await e.text():e;try{const i=kne.parse(JSON.parse(r)),{error:s,error_description:l,error_uri:c}=i,f=Ine[s]||sm;return new f(l||"",c)}catch(i){const s=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${i}. Raw body: ${r}`;return new sm(s)}}async function uS(e,t){try{return await S_(e,t)}catch(r){if(r instanceof yw||r instanceof bw)return await e.invalidateCredentials?.("all"),await S_(e,t);if(r instanceof vw)return await e.invalidateCredentials?.("tokens"),await S_(e,t);throw r}}async function S_(e,{serverUrl:t,authorizationCode:r,scope:i,resourceMetadataUrl:s,fetchFn:l}){let c,f;try{c=await Kne(t,{resourceMetadataUrl:s},l),c.authorization_servers&&c.authorization_servers.length>0&&(f=c.authorization_servers[0])}catch{}f||(f=new URL("/",t));const d=await Gne(t,e,c),h=await Wne(f,{fetchFn:l});let m=await Promise.resolve(e.clientInformation());if(!m){if(r!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");const x=h?.client_id_metadata_document_supported===!0,R=e.clientMetadataUrl;if(R&&!Hne(R))throw new Sw(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${R}`);if(x&&R)m={client_id:R},await e.saveClientInformation?.(m);else{if(!e.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const T=await rre(f,{metadata:h,clientMetadata:e.clientMetadata,fetchFn:l});await e.saveClientInformation(T),m=T}}const g=!e.redirectUrl;if(r!==void 0||g){const x=await nre(e,f,{metadata:h,resource:d,authorizationCode:r,fetchFn:l});return await e.saveTokens(x),"AUTHORIZED"}const v=await e.tokens();if(v?.refresh_token)try{const x=await tre(f,{metadata:h,clientInformation:m,refreshToken:v.refresh_token,resource:d,addClientAuthentication:e.addClientAuthentication,fetchFn:l});return await e.saveTokens(x),"AUTHORIZED"}catch(x){if(!(!(x instanceof La)||x instanceof sm))throw x}const w=e.state?await e.state():void 0,{authorizationUrl:b,codeVerifier:_}=await Jne(f,{metadata:h,clientInformation:m,state:w,redirectUrl:e.redirectUrl,scope:i||c?.scopes_supported?.join(" ")||e.clientMetadata.scope,resource:d});return await e.saveCodeVerifier(_),await e.redirectToAuthorization(b),"REDIRECT"}function Hne(e){if(!e)return!1;try{const t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function Gne(e,t,r){const i=$ne(e);if(t.validateResourceURL)return await t.validateResourceURL(i,r?.resource);if(r){if(!Pne({requestedResource:i,configuredResource:r.resource}))throw new Error(`Protected resource ${r.resource} does not match expected ${i} (or origin)`);return new URL(r.resource)}}function H4(e){const t=e.headers.get("WWW-Authenticate");if(!t)return{};const[r,i]=t.split(" ");if(r.toLowerCase()!=="bearer"||!i)return{};const s=w_(e,"resource_metadata")||void 0;let l;if(s)try{l=new URL(s)}catch{}const c=w_(e,"scope")||void 0,f=w_(e,"error")||void 0;return{resourceMetadataUrl:l,scope:c,error:f}}function w_(e,t){const r=e.headers.get("WWW-Authenticate");if(!r)return null;const i=new RegExp(`${t}=(?:"([^"]+)"|([^\\s,]+))`),s=r.match(i);return s?s[1]||s[2]:null}async function Kne(e,t,r=fetch){const i=await Xne(e,"oauth-protected-resource",r,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!i||i.status===404)throw await i?.body?.cancel(),new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!i.ok)throw await i.body?.cancel(),new Error(`HTTP ${i.status} trying to load well-known OAuth protected resource metadata.`);return Rne.parse(await i.json())}async function GR(e,t,r=fetch){try{return await r(e,{headers:t})}catch(i){if(i instanceof TypeError)return t?GR(e,void 0,r):void 0;throw i}}function Yne(e,t="",r={}){return t.endsWith("/")&&(t=t.slice(0,-1)),r.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function G4(e,t,r=fetch){return await GR(e,{"MCP-Protocol-Version":t},r)}function Zne(e,t){return!e||e.status>=400&&e.status<500&&t!=="/"}async function Xne(e,t,r,i){const s=new URL(e),l=i?.protocolVersion??a2;let c;if(i?.metadataUrl)c=new URL(i.metadataUrl);else{const d=Yne(t,s.pathname);c=new URL(d,i?.metadataServerUrl??s),c.search=s.search}let f=await G4(c,l,r);if(!i?.metadataUrl&&Zne(f,s.pathname)){const d=new URL(`/.well-known/${t}`,s);f=await G4(d,l,r)}return f}function Qne(e){const t=typeof e=="string"?new URL(e):e,r=t.pathname!=="/",i=[];if(!r)return i.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"}),i.push({url:new URL("/.well-known/openid-configuration",t.origin),type:"oidc"}),i;let s=t.pathname;return s.endsWith("/")&&(s=s.slice(0,-1)),i.push({url:new URL(`/.well-known/oauth-authorization-server${s}`,t.origin),type:"oauth"}),i.push({url:new URL(`/.well-known/openid-configuration${s}`,t.origin),type:"oidc"}),i.push({url:new URL(`${s}/.well-known/openid-configuration`,t.origin),type:"oidc"}),i}async function Wne(e,{fetchFn:t=fetch,protocolVersion:r=a2}={}){const i={"MCP-Protocol-Version":r,Accept:"application/json"},s=Qne(e);for(const{url:l,type:c}of s){const f=await GR(l,i,t);if(f){if(!f.ok){if(await f.body?.cancel(),f.status>=400&&f.status<500)continue;throw new Error(`HTTP ${f.status} trying to load ${c==="oauth"?"OAuth":"OpenID provider"} metadata from ${l}`)}return c==="oauth"?B9.parse(await f.json()):Mne.parse(await f.json())}}}async function Jne(e,{metadata:t,clientInformation:r,redirectUrl:i,scope:s,state:l,resource:c}){let f;if(t){if(f=new URL(t.authorization_endpoint),!t.response_types_supported.includes(v_))throw new Error(`Incompatible auth server: does not support response type ${v_}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(b_))throw new Error(`Incompatible auth server: does not support code challenge method ${b_}`)}else f=new URL("/authorize",e);const d=await One(),h=d.code_verifier,m=d.code_challenge;return f.searchParams.set("response_type",v_),f.searchParams.set("client_id",r.client_id),f.searchParams.set("code_challenge",m),f.searchParams.set("code_challenge_method",b_),f.searchParams.set("redirect_uri",String(i)),l&&f.searchParams.set("state",l),s&&f.searchParams.set("scope",s),s?.includes("offline_access")&&f.searchParams.append("prompt","consent"),c&&f.searchParams.set("resource",c.href),{authorizationUrl:f,codeVerifier:h}}function ere(e,t,r){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(r)})}async function G9(e,{metadata:t,tokenRequestParams:r,clientInformation:i,addClientAuthentication:s,resource:l,fetchFn:c}){const f=t?.token_endpoint?new URL(t.token_endpoint):new URL("/token",e),d=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(l&&r.set("resource",l.href),s)await s(d,r,f,t);else if(i){const m=t?.token_endpoint_auth_methods_supported??[],g=Une(i,m);qne(g,i,d,r)}const h=await(c??fetch)(f,{method:"POST",headers:d,body:r});if(!h.ok)throw await H9(h);return jne.parse(await h.json())}async function tre(e,{metadata:t,clientInformation:r,refreshToken:i,resource:s,addClientAuthentication:l,fetchFn:c}){const f=new URLSearchParams({grant_type:"refresh_token",refresh_token:i}),d=await G9(e,{metadata:t,tokenRequestParams:f,clientInformation:r,addClientAuthentication:l,resource:s,fetchFn:c});return{refresh_token:i,...d}}async function nre(e,t,{metadata:r,resource:i,authorizationCode:s,fetchFn:l}={}){const c=e.clientMetadata.scope;let f;if(e.prepareTokenRequest&&(f=await e.prepareTokenRequest(c)),!f){if(!s)throw new Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!e.redirectUrl)throw new Error("redirectUrl is required for authorization_code flow");const h=await e.codeVerifier();f=ere(s,h,e.redirectUrl)}const d=await e.clientInformation();return G9(t,{metadata:r,tokenRequestParams:f,clientInformation:d??void 0,addClientAuthentication:e.addClientAuthentication,resource:i,fetchFn:l})}async function rre(e,{metadata:t,clientMetadata:r,fetchFn:i}){let s;if(t){if(!t.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");s=new URL(t.registration_endpoint)}else s=new URL("/register",e);const l=await(i??fetch)(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!l.ok)throw await H9(l);return zne.parse(await l.json())}class K4 extends Error{constructor(t,r){super(t),this.name="ParseError",this.type=r.type,this.field=r.field,this.value=r.value,this.line=r.line}}function E_(e){}function are(e){if(typeof e=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");const{onEvent:t=E_,onError:r=E_,onRetry:i=E_,onComment:s}=e;let l="",c=!0,f,d="",h="";function m(_){const x=c?_.replace(/^\xEF\xBB\xBF/,""):_,[R,S]=ire(`${l}${x}`);for(const T of R)g(T);l=S,c=!1}function g(_){if(_===""){w();return}if(_.startsWith(":")){s&&s(_.slice(_.startsWith(": ")?2:1));return}const x=_.indexOf(":");if(x!==-1){const R=_.slice(0,x),S=_[x+1]===" "?2:1,T=_.slice(x+S);v(R,T,_);return}v(_,"",_)}function v(_,x,R){switch(_){case"event":h=x;break;case"data":d=`${d}${x}
56
+ `;break;case"id":f=x.includes("\0")?void 0:x;break;case"retry":/^\d+$/.test(x)?i(parseInt(x,10)):r(new K4(`Invalid \`retry\` value: "${x}"`,{type:"invalid-retry",value:x,line:R}));break;default:r(new K4(`Unknown field "${_.length>20?`${_.slice(0,20)}…`:_}"`,{type:"unknown-field",field:_,value:x,line:R}));break}}function w(){d.length>0&&t({id:f,event:h||void 0,data:d.endsWith(`
57
+ `)?d.slice(0,-1):d}),f=void 0,d="",h=""}function b(_={}){l&&_.consume&&g(l),c=!0,f=void 0,d="",h="",l=""}return{feed:m,reset:b}}function ire(e){const t=[];let r="",i=0;for(;i<e.length;){const s=e.indexOf("\r",i),l=e.indexOf(`
58
+ `,i);let c=-1;if(s!==-1&&l!==-1?c=Math.min(s,l):s!==-1?s===e.length-1?c=-1:c=s:l!==-1&&(c=l),c===-1){r=e.slice(i);break}else{const f=e.slice(i,c);t.push(f),i=c+1,e[i-1]==="\r"&&e[i]===`
59
+ `&&i++}}return[t,r]}class ore extends TransformStream{constructor({onError:t,onRetry:r,onComment:i}={}){let s;super({start(l){s=are({onEvent:c=>{l.enqueue(c)},onError(c){t==="terminate"?l.error(c):typeof t=="function"&&t(c)},onRetry:r,onComment:i})},transform(l){s.feed(l)}})}}const sre={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2};class gp extends Error{constructor(t,r){super(`Streamable HTTP error: ${r}`),this.code=t}}class lre{constructor(t,r){this._hasCompletedAuthFlow=!1,this._url=t,this._resourceMetadataUrl=void 0,this._scope=void 0,this._requestInit=r?.requestInit,this._authProvider=r?.authProvider,this._fetch=r?.fetch,this._fetchWithInit=Ene(r?.fetch,r?.requestInit),this._sessionId=r?.sessionId,this._reconnectionOptions=r?.reconnectionOptions??sre}async _authThenStart(){if(!this._authProvider)throw new mp("No auth provider");let t;try{t=await uS(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(r){throw this.onerror?.(r),r}if(t!=="AUTHORIZED")throw new mp;return await this._startOrAuthSse({resumptionToken:void 0})}async _commonHeaders(){const t={};if(this._authProvider){const i=await this._authProvider.tokens();i&&(t.Authorization=`Bearer ${i.access_token}`)}this._sessionId&&(t["mcp-session-id"]=this._sessionId),this._protocolVersion&&(t["mcp-protocol-version"]=this._protocolVersion);const r=hC(this._requestInit?.headers);return new Headers({...t,...r})}async _startOrAuthSse(t){const{resumptionToken:r}=t;try{const i=await this._commonHeaders();i.set("Accept","text/event-stream"),r&&i.set("last-event-id",r);const s=await(this._fetch??fetch)(this._url,{method:"GET",headers:i,signal:this._abortController?.signal});if(!s.ok){if(await s.body?.cancel(),s.status===401&&this._authProvider)return await this._authThenStart();if(s.status===405)return;throw new gp(s.status,`Failed to open SSE stream: ${s.statusText}`)}this._handleSseStream(s.body,t,!0)}catch(i){throw this.onerror?.(i),i}}_getNextReconnectionDelay(t){if(this._serverRetryMs!==void 0)return this._serverRetryMs;const r=this._reconnectionOptions.initialReconnectionDelay,i=this._reconnectionOptions.reconnectionDelayGrowFactor,s=this._reconnectionOptions.maxReconnectionDelay;return Math.min(r*Math.pow(i,t),s)}_scheduleReconnection(t,r=0){const i=this._reconnectionOptions.maxRetries;if(r>=i){this.onerror?.(new Error(`Maximum reconnection attempts (${i}) exceeded.`));return}const s=this._getNextReconnectionDelay(r);this._reconnectionTimeout=setTimeout(()=>{this._startOrAuthSse(t).catch(l=>{this.onerror?.(new Error(`Failed to reconnect SSE stream: ${l instanceof Error?l.message:String(l)}`)),this._scheduleReconnection(t,r+1)})},s)}_handleSseStream(t,r,i){if(!t)return;const{onresumptiontoken:s,replayMessageId:l}=r;let c,f=!1,d=!1;(async()=>{try{const m=t.pipeThrough(new TextDecoderStream).pipeThrough(new ore({onRetry:w=>{this._serverRetryMs=w}})).getReader();for(;;){const{value:w,done:b}=await m.read();if(b)break;if(w.id&&(c=w.id,f=!0,s?.(w.id)),!!w.data&&(!w.event||w.event==="message"))try{const _=i_.parse(JSON.parse(w.data));Iv(_)&&(d=!0,l!==void 0&&(_.id=l)),this.onmessage?.(_)}catch(_){this.onerror?.(_)}}(i||f)&&!d&&this._abortController&&!this._abortController.signal.aborted&&this._scheduleReconnection({resumptionToken:c,onresumptiontoken:s,replayMessageId:l},0)}catch(m){if(this.onerror?.(new Error(`SSE stream disconnected: ${m}`)),(i||f)&&!d&&this._abortController&&!this._abortController.signal.aborted)try{this._scheduleReconnection({resumptionToken:c,onresumptiontoken:s,replayMessageId:l},0)}catch(w){this.onerror?.(new Error(`Failed to reconnect: ${w instanceof Error?w.message:String(w)}`))}}})()}async start(){if(this._abortController)throw new Error("StreamableHTTPClientTransport already started! If using Client class, note that connect() calls start() automatically.");this._abortController=new AbortController}async finishAuth(t){if(!this._authProvider)throw new mp("No auth provider");if(await uS(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new mp("Failed to authorize")}async close(){this._reconnectionTimeout&&(clearTimeout(this._reconnectionTimeout),this._reconnectionTimeout=void 0),this._abortController?.abort(),this.onclose?.()}async send(t,r){try{const{resumptionToken:i,onresumptiontoken:s}=r||{};if(i){this._startOrAuthSse({resumptionToken:i,replayMessageId:dC(t)?t.id:void 0}).catch(v=>this.onerror?.(v));return}const l=await this._commonHeaders();l.set("content-type","application/json"),l.set("accept","application/json, text/event-stream");const c={...this._requestInit,method:"POST",headers:l,body:JSON.stringify(t),signal:this._abortController?.signal},f=await(this._fetch??fetch)(this._url,c),d=f.headers.get("mcp-session-id");if(d&&(this._sessionId=d),!f.ok){const v=await f.text().catch(()=>null);if(f.status===401&&this._authProvider){if(this._hasCompletedAuthFlow)throw new gp(401,"Server returned 401 after successful authentication");const{resourceMetadataUrl:w,scope:b}=H4(f);if(this._resourceMetadataUrl=w,this._scope=b,await uS(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new mp;return this._hasCompletedAuthFlow=!0,this.send(t)}if(f.status===403&&this._authProvider){const{resourceMetadataUrl:w,scope:b,error:_}=H4(f);if(_==="insufficient_scope"){const x=f.headers.get("WWW-Authenticate");if(this._lastUpscopingHeader===x)throw new gp(403,"Server returned 403 after trying upscoping");if(b&&(this._scope=b),w&&(this._resourceMetadataUrl=w),this._lastUpscopingHeader=x??void 0,await uS(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetch})!=="AUTHORIZED")throw new mp;return this.send(t)}}throw new gp(f.status,`Error POSTing to endpoint: ${v}`)}if(this._hasCompletedAuthFlow=!1,this._lastUpscopingHeader=void 0,f.status===202){await f.body?.cancel(),UJ(t)&&this._startOrAuthSse({resumptionToken:void 0}).catch(v=>this.onerror?.(v));return}const m=(Array.isArray(t)?t:[t]).filter(v=>"method"in v&&"id"in v&&v.id!==void 0).length>0,g=f.headers.get("content-type");if(m)if(g?.includes("text/event-stream"))this._handleSseStream(f.body,{onresumptiontoken:s},!1);else if(g?.includes("application/json")){const v=await f.json(),w=Array.isArray(v)?v.map(b=>i_.parse(b)):[i_.parse(v)];for(const b of w)this.onmessage?.(b)}else throw await f.body?.cancel(),new gp(-1,`Unexpected content type: ${g}`);else await f.body?.cancel()}catch(i){throw this.onerror?.(i),i}}get sessionId(){return this._sessionId}async terminateSession(){if(this._sessionId)try{const t=await this._commonHeaders(),r={...this._requestInit,method:"DELETE",headers:t,signal:this._abortController?.signal},i=await(this._fetch??fetch)(this._url,r);if(await i.body?.cancel(),!i.ok&&i.status!==405)throw new gp(i.status,`Failed to terminate session: ${i.statusText}`);this._sessionId=void 0}catch(t){throw this.onerror?.(t),t}}setProtocolVersion(t){this._protocolVersion=t}get protocolVersion(){return this._protocolVersion}async resumeStream(t,r){await this._startOrAuthSse({resumptionToken:t,onresumptiontoken:r?.onresumptiontoken})}}class ure{client=null;transport=null;async connect(t){const r=typeof t=="string"?new URL(t):t;this.transport=new lre(r),this.client=new wne({name:"mcp-client",version:"1.0.0"},{capabilities:{experimental:{tools:{},resources:{},prompts:{}}}}),await this.client.connect(this.transport)}async listTools(){if(!this.client)throw new Error("Client not connected. Call connect() first.");try{return(await this.client.listTools()).tools}catch(t){if(t instanceof Error&&t.message.includes("MCP error -32601: Method not found"))return[];throw t}}async callTool(t,r){if(!this.client)throw new Error("Client not connected. Call connect() first.");const i=await this.client.callTool({name:t,arguments:r??{}}),{_meta:s,...l}=i;return{...l,meta:s}}async listResources(){if(!this.client)throw new Error("Client not connected. Call connect() first.");return(await this.client.listResources()).resources}async readResource(t){if(!this.client)throw new Error("Client not connected. Call connect() first.");return await this.client.readResource({uri:t})}async listPrompts(){if(!this.client)throw new Error("Client not connected. Call connect() first.");return(await this.client.listPrompts()).prompts}async getPrompt(t,r){if(!this.client)throw new Error("Client not connected. Call connect() first.");return await this.client.getPrompt({name:t,...r&&{arguments:r}})}getServerInfo(){if(!this.client)throw new Error("Client not connected. Call connect() first.");return this.client._serverVersion}async close(){this.client&&(await this.client.close(),this.client=null),this.transport&&(this.transport=null)}}const Am=new ure;Am.connect("http://localhost:3000/mcp").then(()=>{console.info("Connected to MCP server")});const cre={theme:"light",userAgent:{device:{type:"desktop"},capabilities:{hover:!0,touch:!1}},locale:"en-US",maxHeight:void 0,displayMode:"inline",safeArea:{insets:{top:0,bottom:0,left:0,right:0}},toolInput:{},toolOutput:null,toolResponseMetadata:null,view:{mode:"inline"},widgetState:null},K9=()=>{const{data:e}=oz({queryKey:["list-tools"],queryFn:()=>Am.listTools()});return e},fre=()=>Am.getServerInfo(),dre=()=>{const{setToolData:e}=Tm();return Iq({mutationFn:async({toolName:t,args:r})=>{e(t,{input:r??{},response:void 0,openaiRef:null,openaiLogs:[],openaiObject:null,openInAppUrl:null});const i=await Am.callTool(t,r);return e(t,{input:r??{},response:i,openaiRef:null,openaiLogs:[],openaiObject:{...cre,toolInput:r??{},toolOutput:i.structuredContent,toolResponseMetadata:i.meta??null,widgetState:null},openInAppUrl:null}),i}})},KR=()=>{const[e]=pR();return K9().find(r=>r.name===e)??null},df=()=>{const e=KR();if(!e)throw new Error("No tool is currently selected");return e},Y9=e=>oz({queryKey:["resource",e],queryFn:async()=>{if(!e)throw new Error("Resource URI is required");return await Am.readResource(e)}});const Z9=(...e)=>e.filter((t,r,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===r).join(" ").trim();const hre=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const pre=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,i)=>i?i.toUpperCase():r.toLowerCase());const Y4=e=>{const t=pre(e);return t.charAt(0).toUpperCase()+t.slice(1)};var mre={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const gre=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const yre=j.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:i,className:s="",children:l,iconNode:c,...f},d)=>j.createElement("svg",{ref:d,...mre,width:t,height:t,stroke:e,strokeWidth:i?Number(r)*24/Number(t):r,className:Z9("lucide",s),...!l&&!gre(f)&&{"aria-hidden":"true"},...f},[...c.map(([h,m])=>j.createElement(h,m)),...Array.isArray(l)?l:[l]]));const uo=(e,t)=>{const r=j.forwardRef(({className:i,...s},l)=>j.createElement(yre,{ref:l,iconNode:t,className:Z9(`lucide-${hre(Y4(e))}`,`lucide-${e}`,i),...s}));return r.displayName=Y4(e),r};const vre=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],YR=uo("check",vre);const bre=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],X9=uo("chevron-down",bre);const Sre=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],wre=uo("chevron-up",Sre);const Ere=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],xre=uo("chevrons-up-down",Ere);const _re=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Tre=uo("circle-alert",_re);const Cre=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Ore=uo("external-link",Cre);const Rre=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Are=uo("info",Rre);const Mre=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],jre=uo("loader-circle",Mre);const kre=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],Dre=uo("moon",kre);const Nre=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],zre=uo("play",Nre);const $re=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Pre=uo("search",$re);const Ire=[["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"}]],Lre=uo("sun",Ire);const Ure=[["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],qre=uo("trash",Ure);const Vre=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Fre=uo("x",Vre);function d2(){return typeof window<"u"}function hf(e){return ZR(e)?(e.nodeName||"").toLowerCase():"#document"}function ha(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ul(e){var t;return(t=(ZR(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ZR(e){return d2()?e instanceof Node||e instanceof ha(e).Node:!1}function ir(e){return d2()?e instanceof Element||e instanceof ha(e).Element:!1}function Gr(e){return d2()?e instanceof HTMLElement||e instanceof ha(e).HTMLElement:!1}function CC(e){return!d2()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ha(e).ShadowRoot}const Bre=new Set(["inline","contents"]);function rp(e){const{overflow:t,overflowX:r,overflowY:i,display:s}=Qo(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+r)&&!Bre.has(s)}const Hre=new Set(["table","td","th"]);function Gre(e){return Hre.has(hf(e))}const Kre=[":popover-open",":modal"];function h2(e){return Kre.some(t=>{try{return e.matches(t)}catch{return!1}})}const Yre=["transform","translate","scale","rotate","perspective"],Zre=["transform","translate","scale","rotate","perspective","filter"],Xre=["paint","layout","strict","content"];function XR(e){const t=p2(),r=ir(e)?Qo(e):e;return Yre.some(i=>r[i]?r[i]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||Zre.some(i=>(r.willChange||"").includes(i))||Xre.some(i=>(r.contain||"").includes(i))}function Qre(e){let t=cc(e);for(;Gr(t)&&!lc(t);){if(XR(t))return t;if(h2(t))return null;t=cc(t)}return null}function p2(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Wre=new Set(["html","body","#document"]);function lc(e){return Wre.has(hf(e))}function Qo(e){return ha(e).getComputedStyle(e)}function m2(e){return ir(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function cc(e){if(hf(e)==="html")return e;const t=e.assignedSlot||e.parentNode||CC(e)&&e.host||Ul(e);return CC(t)?t.host:t}function Q9(e){const t=cc(e);return lc(t)?e.ownerDocument?e.ownerDocument.body:e.body:Gr(t)&&rp(t)?t:Q9(t)}function Ic(e,t,r){var i;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=Q9(e),l=s===((i=e.ownerDocument)==null?void 0:i.body),c=ha(s);if(l){const f=OC(c);return t.concat(c,c.visualViewport||[],rp(s)?s:[],f&&r?Ic(f):[])}return t.concat(s,Ic(s,[],r))}function OC(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Z4={};function so(e,t){const r=j.useRef(Z4);return r.current===Z4&&(r.current=e(t)),r}const x_=Nb[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Jre=x_&&x_!==j.useLayoutEffect?x_:e=>e();function ot(e){const t=so(eae).current;return t.next=e,Jre(t.effect),t.trampoline}function eae(){const e={next:void 0,callback:tae,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function tae(){}const nae=()=>{},ct=typeof document<"u"?j.useLayoutEffect:nae;function RC(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const Yv={};function Qb(e,t,r,i,s){let l={...AC(e,Yv)};return t&&(l=Lv(l,t)),r&&(l=Lv(l,r)),i&&(l=Lv(l,i)),s&&(l=Lv(l,s)),l}function rae(e){if(e.length===0)return Yv;if(e.length===1)return AC(e[0],Yv);let t={...AC(e[0],Yv)};for(let r=1;r<e.length;r+=1)t=Lv(t,e[r]);return t}function Lv(e,t){return W9(t)?t(e):aae(e,t)}function aae(e,t){if(!t)return e;for(const r in t){const i=t[r];switch(r){case"style":{e[r]=RC(e.style,i);break}case"className":{e[r]=J9(e.className,i);break}default:iae(r,i)?e[r]=oae(e[r],i):e[r]=i}}return e}function iae(e,t){const r=e.charCodeAt(0),i=e.charCodeAt(1),s=e.charCodeAt(2);return r===111&&i===110&&s>=65&&s<=90&&(typeof t=="function"||typeof t>"u")}function W9(e){return typeof e=="function"}function AC(e,t){return W9(e)?e(t):e??Yv}function oae(e,t){return t?e?r=>{if(sae(r)){const s=r;MC(s);const l=t(s);return s.baseUIHandlerPrevented||e?.(s),l}const i=t(r);return e?.(r),i}:t:e}function MC(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function J9(e,t){return t?e?t+" "+e:t:e}function sae(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function Si(e,...t){const r=new URL("https://base-ui.com/production-error");return r.searchParams.set("code",e.toString()),t.forEach(i=>r.searchParams.append("args[]",i)),`Base UI error #${e}; visit ${r} for the full message.`}const e$=j.createContext(void 0);function t$(e=!1){const t=j.useContext(e$);if(t===void 0&&!e)throw new Error(Si(16));return t}function lae(e){const{focusableWhenDisabled:t,disabled:r,composite:i=!1,tabIndex:s=0,isNativeButton:l}=e,c=i&&t!==!1,f=i&&t===!1;return{props:j.useMemo(()=>{const h={onKeyDown(m){r&&t&&m.key!=="Tab"&&m.preventDefault()}};return i||(h.tabIndex=s,!l&&r&&(h.tabIndex=t?s:-1)),(l&&(t||c)||!l&&r)&&(h["aria-disabled"]=r),l&&(!t||f)&&(h.disabled=r),h},[i,r,t,c,f,l,s])}}function ap(e={}){const{disabled:t=!1,focusableWhenDisabled:r,tabIndex:i=0,native:s=!0}=e,l=j.useRef(null),c=t$(!0)!==void 0,f=ot(()=>{const v=l.current;return!!(v?.tagName==="A"&&v?.href)}),{props:d}=lae({focusableWhenDisabled:r,disabled:t,composite:c,tabIndex:i,isNativeButton:s}),h=j.useCallback(()=>{const v=l.current;uae(v)&&c&&t&&d.disabled===void 0&&v.disabled&&(v.disabled=!1)},[t,d.disabled,c]);ct(h,[h]);const m=j.useCallback((v={})=>{const{onClick:w,onMouseDown:b,onKeyUp:_,onKeyDown:x,onPointerDown:R,...S}=v;return Qb({type:s?"button":void 0,onClick(E){if(t){E.preventDefault();return}w?.(E)},onMouseDown(E){t||b?.(E)},onKeyDown(E){if(t||(MC(E),x?.(E)),E.baseUIHandlerPrevented)return;const O=E.target===E.currentTarget&&!s&&!f()&&!t,C=E.key==="Enter",M=E.key===" ";O&&((M||C)&&E.preventDefault(),C&&w?.(E))},onKeyUp(E){t||(MC(E),_?.(E)),!E.baseUIHandlerPrevented&&E.target===E.currentTarget&&!s&&!t&&E.key===" "&&w?.(E)},onPointerDown(E){if(t){E.preventDefault();return}R?.(E)}},s?void 0:{role:"button"},d,S)},[t,d,s,f]),g=ot(v=>{l.current=v,h()});return{getButtonProps:m,buttonRef:g}}function uae(e){return Gr(e)&&e.tagName==="BUTTON"}function fc(e,t,r,i){const s=so(n$).current;return fae(s,e,t,r,i)&&r$(s,[e,t,r,i]),s.callback}function cae(e){const t=so(n$).current;return dae(t,e)&&r$(t,e),t.callback}function n$(){return{callback:null,cleanup:null,refs:[]}}function fae(e,t,r,i,s){return e.refs[0]!==t||e.refs[1]!==r||e.refs[2]!==i||e.refs[3]!==s}function dae(e,t){return e.refs.length!==t.length||e.refs.some((r,i)=>r!==t[i])}function r$(e,t){if(e.refs=t,t.every(r=>r==null)){e.callback=null;return}e.callback=r=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),r!=null){const i=Array(t.length).fill(null);for(let s=0;s<t.length;s+=1){const l=t[s];if(l!=null)switch(typeof l){case"function":{const c=l(r);typeof c=="function"&&(i[s]=c);break}case"object":{l.current=r;break}}}e.cleanup=()=>{for(let s=0;s<t.length;s+=1){const l=t[s];if(l!=null)switch(typeof l){case"function":{const c=i[s];typeof c=="function"?c():l(null);break}case"object":{l.current=null;break}}}}}}}const hae=parseInt(j.version,10);function QR(e){return hae>=e}function X4(e){if(!j.isValidElement(e))return null;const t=e,r=t.props;return(QR(19)?r?.ref:t.ref)??null}function pae(e,t){const r={};for(const i in e){const s=e[i];if(t?.hasOwnProperty(i)){const l=t[i](s);l!=null&&Object.assign(r,l);continue}s===!0?r[`data-${i.toLowerCase()}`]="":s&&(r[`data-${i.toLowerCase()}`]=s.toString())}return r}function mae(e,t){return typeof e=="function"?e(t):e}function gae(e,t){return typeof e=="function"?e(t):e}function Yo(){}const lm=Object.freeze([]),Da=Object.freeze({}),yae=500,vae={style:{transition:"none"}},a$="data-base-ui-click-trigger",bae={fallbackAxisSide:"none"},Sae={fallbackAxisSide:"end"},wae={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function mr(e,t,r={}){const i=t.render,s=Eae(t,r);if(r.enabled===!1)return null;const l=r.state??Da;return xae(e,i,s,l)}function Eae(e,t={}){const{className:r,style:i,render:s}=e,{state:l=Da,ref:c,props:f,stateAttributesMapping:d,enabled:h=!0}=t,m=h?mae(r,l):void 0,g=h?gae(i,l):void 0,v=h?pae(l,d):Da,w=h?RC(v,Array.isArray(f)?rae(f):f)??Da:Da;return typeof document<"u"&&(h?Array.isArray(c)?w.ref=cae([w.ref,X4(s),...c]):w.ref=fc(w.ref,X4(s),c):fc(null,null)),h?(m!==void 0&&(w.className=J9(w.className,m)),g!==void 0&&(w.style=RC(w.style,g)),w):Da}function xae(e,t,r,i){if(t){if(typeof t=="function")return t(r,i);const s=Qb(r,t.props);return s.ref=r.ref,j.cloneElement(t,s)}if(e&&typeof e=="string")return _ae(e,r);throw new Error(Si(8))}function _ae(e,t){return e==="button"?j.createElement("button",{type:"button",...t,key:t.key}):e==="img"?j.createElement("img",{alt:"",...t,key:t.key}):j.createElement(e,t)}const Tae=j.forwardRef(function(t,r){const{render:i,className:s,disabled:l=!1,focusableWhenDisabled:c=!1,nativeButton:f=!0,...d}=t,{getButtonProps:h,buttonRef:m}=ap({disabled:l,focusableWhenDisabled:c,native:f}),g=j.useMemo(()=>({disabled:l}),[l]);return mr("button",t,{state:g,ref:[r,m],props:[d,h]})});function i$(e){var t,r,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=i$(e[t]))&&(i&&(i+=" "),i+=r)}else for(r in e)e[r]&&(i&&(i+=" "),i+=r);return i}function WR(){for(var e,t,r=0,i="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=i$(e))&&(i&&(i+=" "),i+=t);return i}const Q4=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,W4=WR,bc=(e,t)=>r=>{var i;if(t?.variants==null)return W4(e,r?.class,r?.className);const{variants:s,defaultVariants:l}=t,c=Object.keys(s).map(h=>{const m=r?.[h],g=l?.[h];if(m===null)return null;const v=Q4(m)||Q4(g);return s[h][v]}),f=r&&Object.entries(r).reduce((h,m)=>{let[g,v]=m;return v===void 0||(h[g]=v),h},{}),d=t==null||(i=t.compoundVariants)===null||i===void 0?void 0:i.reduce((h,m)=>{let{class:g,className:v,...w}=m;return Object.entries(w).every(b=>{let[_,x]=b;return Array.isArray(x)?x.includes({...l,...f}[_]):{...l,...f}[_]===x})?[...h,g,v]:h},[]);return W4(e,c,d,r?.class,r?.className)},Cae=(e,t)=>{const r=new Array(e.length+t.length);for(let i=0;i<e.length;i++)r[i]=e[i];for(let i=0;i<t.length;i++)r[e.length+i]=t[i];return r},Oae=(e,t)=>({classGroupId:e,validator:t}),o$=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),ww="-",J4=[],Rae="arbitrary..",Aae=e=>{const t=jae(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return Mae(c);const f=c.split(ww),d=f[0]===""&&f.length>1?1:0;return s$(f,d,t)},getConflictingClassGroupIds:(c,f)=>{if(f){const d=i[c],h=r[c];return d?h?Cae(h,d):d:h||J4}return r[c]||J4}}},s$=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const s=e[t],l=r.nextPart.get(s);if(l){const h=s$(e,t+1,l);if(h)return h}const c=r.validators;if(c===null)return;const f=t===0?e.join(ww):e.slice(t).join(ww),d=c.length;for(let h=0;h<d;h++){const m=c[h];if(m.validator(f))return m.classGroupId}},Mae=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),i=t.slice(0,r);return i?Rae+i:void 0})(),jae=e=>{const{theme:t,classGroups:r}=e;return kae(r,t)},kae=(e,t)=>{const r=o$();for(const i in e){const s=e[i];JR(s,r,i,t)}return r},JR=(e,t,r,i)=>{const s=e.length;for(let l=0;l<s;l++){const c=e[l];Dae(c,t,r,i)}},Dae=(e,t,r,i)=>{if(typeof e=="string"){Nae(e,t,r);return}if(typeof e=="function"){zae(e,t,r,i);return}$ae(e,t,r,i)},Nae=(e,t,r)=>{const i=e===""?t:l$(t,e);i.classGroupId=r},zae=(e,t,r,i)=>{if(Pae(e)){JR(e(i),t,r,i);return}t.validators===null&&(t.validators=[]),t.validators.push(Oae(r,e))},$ae=(e,t,r,i)=>{const s=Object.entries(e),l=s.length;for(let c=0;c<l;c++){const[f,d]=s[c];JR(d,l$(t,f),r,i)}},l$=(e,t)=>{let r=e;const i=t.split(ww),s=i.length;for(let l=0;l<s;l++){const c=i[l];let f=r.nextPart.get(c);f||(f=o$(),r.nextPart.set(c,f)),r=f}return r},Pae=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Iae=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),i=Object.create(null);const s=(l,c)=>{r[l]=c,t++,t>e&&(t=0,i=r,r=Object.create(null))};return{get(l){let c=r[l];if(c!==void 0)return c;if((c=i[l])!==void 0)return s(l,c),c},set(l,c){l in r?r[l]=c:s(l,c)}}},jC="!",ej=":",Lae=[],tj=(e,t,r,i,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:i,isExternal:s}),Uae=e=>{const{prefix:t,experimentalParseClassName:r}=e;let i=s=>{const l=[];let c=0,f=0,d=0,h;const m=s.length;for(let _=0;_<m;_++){const x=s[_];if(c===0&&f===0){if(x===ej){l.push(s.slice(d,_)),d=_+1;continue}if(x==="/"){h=_;continue}}x==="["?c++:x==="]"?c--:x==="("?f++:x===")"&&f--}const g=l.length===0?s:s.slice(d);let v=g,w=!1;g.endsWith(jC)?(v=g.slice(0,-1),w=!0):g.startsWith(jC)&&(v=g.slice(1),w=!0);const b=h&&h>d?h-d:void 0;return tj(l,w,v,b)};if(t){const s=t+ej,l=i;i=c=>c.startsWith(s)?l(c.slice(s.length)):tj(Lae,!1,c,void 0,!0)}if(r){const s=i;i=l=>r({className:l,parseClassName:s})}return i},qae=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,i)=>{t.set(r,1e6+i)}),r=>{const i=[];let s=[];for(let l=0;l<r.length;l++){const c=r[l],f=c[0]==="[",d=t.has(c);f||d?(s.length>0&&(s.sort(),i.push(...s),s=[]),i.push(c)):s.push(c)}return s.length>0&&(s.sort(),i.push(...s)),i}},Vae=e=>({cache:Iae(e.cacheSize),parseClassName:Uae(e),sortModifiers:qae(e),...Aae(e)}),Fae=/\s+/,Bae=(e,t)=>{const{parseClassName:r,getClassGroupId:i,getConflictingClassGroupIds:s,sortModifiers:l}=t,c=[],f=e.trim().split(Fae);let d="";for(let h=f.length-1;h>=0;h-=1){const m=f[h],{isExternal:g,modifiers:v,hasImportantModifier:w,baseClassName:b,maybePostfixModifierPosition:_}=r(m);if(g){d=m+(d.length>0?" "+d:d);continue}let x=!!_,R=i(x?b.substring(0,_):b);if(!R){if(!x){d=m+(d.length>0?" "+d:d);continue}if(R=i(b),!R){d=m+(d.length>0?" "+d:d);continue}x=!1}const S=v.length===0?"":v.length===1?v[0]:l(v).join(":"),T=w?S+jC:S,E=T+R;if(c.indexOf(E)>-1)continue;c.push(E);const O=s(R,x);for(let C=0;C<O.length;++C){const M=O[C];c.push(T+M)}d=m+(d.length>0?" "+d:d)}return d},Hae=(...e)=>{let t=0,r,i,s="";for(;t<e.length;)(r=e[t++])&&(i=u$(r))&&(s&&(s+=" "),s+=i);return s},u$=e=>{if(typeof e=="string")return e;let t,r="";for(let i=0;i<e.length;i++)e[i]&&(t=u$(e[i]))&&(r&&(r+=" "),r+=t);return r},Gae=(e,...t)=>{let r,i,s,l;const c=d=>{const h=t.reduce((m,g)=>g(m),e());return r=Vae(h),i=r.cache.get,s=r.cache.set,l=f,f(d)},f=d=>{const h=i(d);if(h)return h;const m=Bae(d,r);return s(d,m),m};return l=c,(...d)=>l(Hae(...d))},Kae=[],Aa=e=>{const t=r=>r[e]||Kae;return t.isThemeGetter=!0,t},c$=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,f$=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Yae=/^\d+\/\d+$/,Zae=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Xae=/\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$/,Qae=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Wae=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Jae=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,yp=e=>Yae.test(e),Sn=e=>!!e&&!Number.isNaN(Number(e)),_c=e=>!!e&&Number.isInteger(Number(e)),__=e=>e.endsWith("%")&&Sn(e.slice(0,-1)),rc=e=>Zae.test(e),eie=()=>!0,tie=e=>Xae.test(e)&&!Qae.test(e),d$=()=>!1,nie=e=>Wae.test(e),rie=e=>Jae.test(e),aie=e=>!pt(e)&&!mt(e),iie=e=>Mm(e,m$,d$),pt=e=>c$.test(e),xh=e=>Mm(e,g$,tie),T_=e=>Mm(e,cie,Sn),nj=e=>Mm(e,h$,d$),oie=e=>Mm(e,p$,rie),cS=e=>Mm(e,y$,nie),mt=e=>f$.test(e),Rv=e=>jm(e,g$),sie=e=>jm(e,fie),rj=e=>jm(e,h$),lie=e=>jm(e,m$),uie=e=>jm(e,p$),fS=e=>jm(e,y$,!0),Mm=(e,t,r)=>{const i=c$.exec(e);return i?i[1]?t(i[1]):r(i[2]):!1},jm=(e,t,r=!1)=>{const i=f$.exec(e);return i?i[1]?t(i[1]):r:!1},h$=e=>e==="position"||e==="percentage",p$=e=>e==="image"||e==="url",m$=e=>e==="length"||e==="size"||e==="bg-size",g$=e=>e==="length",cie=e=>e==="number",fie=e=>e==="family-name",y$=e=>e==="shadow",die=()=>{const e=Aa("color"),t=Aa("font"),r=Aa("text"),i=Aa("font-weight"),s=Aa("tracking"),l=Aa("leading"),c=Aa("breakpoint"),f=Aa("container"),d=Aa("spacing"),h=Aa("radius"),m=Aa("shadow"),g=Aa("inset-shadow"),v=Aa("text-shadow"),w=Aa("drop-shadow"),b=Aa("blur"),_=Aa("perspective"),x=Aa("aspect"),R=Aa("ease"),S=Aa("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],O=()=>[...E(),mt,pt],C=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto","contain","none"],D=()=>[mt,pt,d],$=()=>[yp,"full","auto",...D()],q=()=>[_c,"none","subgrid",mt,pt],L=()=>["auto",{span:["full",_c,mt,pt]},_c,mt,pt],V=()=>[_c,"auto",mt,pt],F=()=>["auto","min","max","fr",mt,pt],re=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ae=()=>["start","end","center","stretch","center-safe","end-safe"],K=()=>["auto",...D()],B=()=>[yp,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],Y=()=>[e,mt,pt],fe=()=>[...E(),rj,nj,{position:[mt,pt]}],se=()=>["no-repeat",{repeat:["","x","y","space","round"]}],N=()=>["auto","cover","contain",lie,iie,{size:[mt,pt]}],I=()=>[__,Rv,xh],U=()=>["","none","full",h,mt,pt],P=()=>["",Sn,Rv,xh],G=()=>["solid","dashed","dotted","double"],ee=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ue=()=>[Sn,__,rj,nj],ve=()=>["","none",b,mt,pt],Ee=()=>["none",Sn,mt,pt],Oe=()=>["none",Sn,mt,pt],de=()=>[Sn,mt,pt],te=()=>[yp,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[rc],breakpoint:[rc],color:[eie],container:[rc],"drop-shadow":[rc],ease:["in","out","in-out"],font:[aie],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[rc],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[rc],shadow:[rc],spacing:["px",Sn],text:[rc],"text-shadow":[rc],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",yp,pt,mt,x]}],container:["container"],columns:[{columns:[Sn,pt,mt,f]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:O()}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:$()}],"inset-x":[{"inset-x":$()}],"inset-y":[{"inset-y":$()}],start:[{start:$()}],end:[{end:$()}],top:[{top:$()}],right:[{right:$()}],bottom:[{bottom:$()}],left:[{left:$()}],visibility:["visible","invisible","collapse"],z:[{z:[_c,"auto",mt,pt]}],basis:[{basis:[yp,"full","auto",f,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Sn,yp,"auto","initial","none",pt]}],grow:[{grow:["",Sn,mt,pt]}],shrink:[{shrink:["",Sn,mt,pt]}],order:[{order:[_c,"first","last","none",mt,pt]}],"grid-cols":[{"grid-cols":q()}],"col-start-end":[{col:L()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":q()}],"row-start-end":[{row:L()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":F()}],"auto-rows":[{"auto-rows":F()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...re(),"normal"]}],"justify-items":[{"justify-items":[...ae(),"normal"]}],"justify-self":[{"justify-self":["auto",...ae()]}],"align-content":[{content:["normal",...re()]}],"align-items":[{items:[...ae(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ae(),{baseline:["","last"]}]}],"place-content":[{"place-content":re()}],"place-items":[{"place-items":[...ae(),"baseline"]}],"place-self":[{"place-self":["auto",...ae()]}],p:[{p:D()}],px:[{px:D()}],py:[{py:D()}],ps:[{ps:D()}],pe:[{pe:D()}],pt:[{pt:D()}],pr:[{pr:D()}],pb:[{pb:D()}],pl:[{pl:D()}],m:[{m:K()}],mx:[{mx:K()}],my:[{my:K()}],ms:[{ms:K()}],me:[{me:K()}],mt:[{mt:K()}],mr:[{mr:K()}],mb:[{mb:K()}],ml:[{ml:K()}],"space-x":[{"space-x":D()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":D()}],"space-y-reverse":["space-y-reverse"],size:[{size:B()}],w:[{w:[f,"screen",...B()]}],"min-w":[{"min-w":[f,"screen","none",...B()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[c]},...B()]}],h:[{h:["screen","lh",...B()]}],"min-h":[{"min-h":["screen","lh","none",...B()]}],"max-h":[{"max-h":["screen","lh",...B()]}],"font-size":[{text:["base",r,Rv,xh]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,mt,T_]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",__,pt]}],"font-family":[{font:[sie,pt,t]}],"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:[s,mt,pt]}],"line-clamp":[{"line-clamp":[Sn,"none",mt,T_]}],leading:[{leading:[l,...D()]}],"list-image":[{"list-image":["none",mt,pt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",mt,pt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Y()}],"text-color":[{text:Y()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...G(),"wavy"]}],"text-decoration-thickness":[{decoration:[Sn,"from-font","auto",mt,xh]}],"text-decoration-color":[{decoration:Y()}],"underline-offset":[{"underline-offset":[Sn,"auto",mt,pt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",mt,pt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",mt,pt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:fe()}],"bg-repeat":[{bg:se()}],"bg-size":[{bg:N()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},_c,mt,pt],radial:["",mt,pt],conic:[_c,mt,pt]},uie,oie]}],"bg-color":[{bg:Y()}],"gradient-from-pos":[{from:I()}],"gradient-via-pos":[{via:I()}],"gradient-to-pos":[{to:I()}],"gradient-from":[{from:Y()}],"gradient-via":[{via:Y()}],"gradient-to":[{to:Y()}],rounded:[{rounded:U()}],"rounded-s":[{"rounded-s":U()}],"rounded-e":[{"rounded-e":U()}],"rounded-t":[{"rounded-t":U()}],"rounded-r":[{"rounded-r":U()}],"rounded-b":[{"rounded-b":U()}],"rounded-l":[{"rounded-l":U()}],"rounded-ss":[{"rounded-ss":U()}],"rounded-se":[{"rounded-se":U()}],"rounded-ee":[{"rounded-ee":U()}],"rounded-es":[{"rounded-es":U()}],"rounded-tl":[{"rounded-tl":U()}],"rounded-tr":[{"rounded-tr":U()}],"rounded-br":[{"rounded-br":U()}],"rounded-bl":[{"rounded-bl":U()}],"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()}],"divide-x":[{"divide-x":P()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":P()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...G(),"hidden","none"]}],"divide-style":[{divide:[...G(),"hidden","none"]}],"border-color":[{border:Y()}],"border-color-x":[{"border-x":Y()}],"border-color-y":[{"border-y":Y()}],"border-color-s":[{"border-s":Y()}],"border-color-e":[{"border-e":Y()}],"border-color-t":[{"border-t":Y()}],"border-color-r":[{"border-r":Y()}],"border-color-b":[{"border-b":Y()}],"border-color-l":[{"border-l":Y()}],"divide-color":[{divide:Y()}],"outline-style":[{outline:[...G(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Sn,mt,pt]}],"outline-w":[{outline:["",Sn,Rv,xh]}],"outline-color":[{outline:Y()}],shadow:[{shadow:["","none",m,fS,cS]}],"shadow-color":[{shadow:Y()}],"inset-shadow":[{"inset-shadow":["none",g,fS,cS]}],"inset-shadow-color":[{"inset-shadow":Y()}],"ring-w":[{ring:P()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Y()}],"ring-offset-w":[{"ring-offset":[Sn,xh]}],"ring-offset-color":[{"ring-offset":Y()}],"inset-ring-w":[{"inset-ring":P()}],"inset-ring-color":[{"inset-ring":Y()}],"text-shadow":[{"text-shadow":["none",v,fS,cS]}],"text-shadow-color":[{"text-shadow":Y()}],opacity:[{opacity:[Sn,mt,pt]}],"mix-blend":[{"mix-blend":[...ee(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ee()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Sn]}],"mask-image-linear-from-pos":[{"mask-linear-from":ue()}],"mask-image-linear-to-pos":[{"mask-linear-to":ue()}],"mask-image-linear-from-color":[{"mask-linear-from":Y()}],"mask-image-linear-to-color":[{"mask-linear-to":Y()}],"mask-image-t-from-pos":[{"mask-t-from":ue()}],"mask-image-t-to-pos":[{"mask-t-to":ue()}],"mask-image-t-from-color":[{"mask-t-from":Y()}],"mask-image-t-to-color":[{"mask-t-to":Y()}],"mask-image-r-from-pos":[{"mask-r-from":ue()}],"mask-image-r-to-pos":[{"mask-r-to":ue()}],"mask-image-r-from-color":[{"mask-r-from":Y()}],"mask-image-r-to-color":[{"mask-r-to":Y()}],"mask-image-b-from-pos":[{"mask-b-from":ue()}],"mask-image-b-to-pos":[{"mask-b-to":ue()}],"mask-image-b-from-color":[{"mask-b-from":Y()}],"mask-image-b-to-color":[{"mask-b-to":Y()}],"mask-image-l-from-pos":[{"mask-l-from":ue()}],"mask-image-l-to-pos":[{"mask-l-to":ue()}],"mask-image-l-from-color":[{"mask-l-from":Y()}],"mask-image-l-to-color":[{"mask-l-to":Y()}],"mask-image-x-from-pos":[{"mask-x-from":ue()}],"mask-image-x-to-pos":[{"mask-x-to":ue()}],"mask-image-x-from-color":[{"mask-x-from":Y()}],"mask-image-x-to-color":[{"mask-x-to":Y()}],"mask-image-y-from-pos":[{"mask-y-from":ue()}],"mask-image-y-to-pos":[{"mask-y-to":ue()}],"mask-image-y-from-color":[{"mask-y-from":Y()}],"mask-image-y-to-color":[{"mask-y-to":Y()}],"mask-image-radial":[{"mask-radial":[mt,pt]}],"mask-image-radial-from-pos":[{"mask-radial-from":ue()}],"mask-image-radial-to-pos":[{"mask-radial-to":ue()}],"mask-image-radial-from-color":[{"mask-radial-from":Y()}],"mask-image-radial-to-color":[{"mask-radial-to":Y()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":E()}],"mask-image-conic-pos":[{"mask-conic":[Sn]}],"mask-image-conic-from-pos":[{"mask-conic-from":ue()}],"mask-image-conic-to-pos":[{"mask-conic-to":ue()}],"mask-image-conic-from-color":[{"mask-conic-from":Y()}],"mask-image-conic-to-color":[{"mask-conic-to":Y()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:fe()}],"mask-repeat":[{mask:se()}],"mask-size":[{mask:N()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",mt,pt]}],filter:[{filter:["","none",mt,pt]}],blur:[{blur:ve()}],brightness:[{brightness:[Sn,mt,pt]}],contrast:[{contrast:[Sn,mt,pt]}],"drop-shadow":[{"drop-shadow":["","none",w,fS,cS]}],"drop-shadow-color":[{"drop-shadow":Y()}],grayscale:[{grayscale:["",Sn,mt,pt]}],"hue-rotate":[{"hue-rotate":[Sn,mt,pt]}],invert:[{invert:["",Sn,mt,pt]}],saturate:[{saturate:[Sn,mt,pt]}],sepia:[{sepia:["",Sn,mt,pt]}],"backdrop-filter":[{"backdrop-filter":["","none",mt,pt]}],"backdrop-blur":[{"backdrop-blur":ve()}],"backdrop-brightness":[{"backdrop-brightness":[Sn,mt,pt]}],"backdrop-contrast":[{"backdrop-contrast":[Sn,mt,pt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Sn,mt,pt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Sn,mt,pt]}],"backdrop-invert":[{"backdrop-invert":["",Sn,mt,pt]}],"backdrop-opacity":[{"backdrop-opacity":[Sn,mt,pt]}],"backdrop-saturate":[{"backdrop-saturate":[Sn,mt,pt]}],"backdrop-sepia":[{"backdrop-sepia":["",Sn,mt,pt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":D()}],"border-spacing-x":[{"border-spacing-x":D()}],"border-spacing-y":[{"border-spacing-y":D()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",mt,pt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Sn,"initial",mt,pt]}],ease:[{ease:["linear","initial",R,mt,pt]}],delay:[{delay:[Sn,mt,pt]}],animate:[{animate:["none",S,mt,pt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[_,mt,pt]}],"perspective-origin":[{"perspective-origin":O()}],rotate:[{rotate:Ee()}],"rotate-x":[{"rotate-x":Ee()}],"rotate-y":[{"rotate-y":Ee()}],"rotate-z":[{"rotate-z":Ee()}],scale:[{scale:Oe()}],"scale-x":[{"scale-x":Oe()}],"scale-y":[{"scale-y":Oe()}],"scale-z":[{"scale-z":Oe()}],"scale-3d":["scale-3d"],skew:[{skew:de()}],"skew-x":[{"skew-x":de()}],"skew-y":[{"skew-y":de()}],transform:[{transform:[mt,pt,"","none","gpu","cpu"]}],"transform-origin":[{origin:O()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:te()}],"translate-x":[{"translate-x":te()}],"translate-y":[{"translate-y":te()}],"translate-z":[{"translate-z":te()}],"translate-none":["translate-none"],accent:[{accent:Y()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Y()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",mt,pt]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"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",mt,pt]}],fill:[{fill:["none",...Y()]}],"stroke-w":[{stroke:[Sn,Rv,xh,T_]}],stroke:[{stroke:["none",...Y()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},v$=Gae(die);function en(...e){return v$(WR(e))}const hie=bc("focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-none border border-transparent bg-clip-padding text-xs font-medium focus-visible:ring-1 aria-invalid:ring-1 [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground",destructive:"bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-none px-2 text-xs has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-none px-2.5 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",icon:"size-8","icon-xs":"size-6 rounded-none [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-none","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function Qc({className:e,variant:t="default",size:r="default",...i}){return k.jsx(Tae,{"data-slot":"button",className:en(hie({variant:t,size:r,className:e})),...i})}const pie=()=>{const e=fre(),t=e?.name,r=e?.version,[,i]=pR();return k.jsx("div",{className:"flex flex-col border-b border-border bg-background",children:k.jsxs("div",{className:"flex h-14 items-center justify-between px-4",children:[k.jsxs("div",{className:"flex items-center gap-4",children:[k.jsx("button",{type:"button",className:"font-semibold cursor-pointer",onClick:()=>{i(null)},children:"Skybridge"}),k.jsx("span",{className:"h-4 w-px bg-border","aria-hidden":"true"}),k.jsxs("div",{className:"flex items-center gap-4 rounded-md border border-border bg-muted px-2 py-1",children:[k.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:t}),k.jsxs("span",{className:"text-xs text-muted-foreground",children:["v",r]})]}),k.jsxs("span",{className:"flex items-center gap-1 rounded-full bg-green-100 px-2 py-0.5 text-xs font-semibold text-green-800",children:[k.jsx("span",{className:"h-2 w-2 rounded-full bg-green-500 mr-1 inline-block"}),"Connected"]})]}),k.jsx("div",{className:"flex items-center gap-2",children:k.jsx(Qc,{variant:"ghost",size:"sm",className:"h-8 gap-2",children:k.jsxs("a",{href:"https://docs.skybridge.tech/",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2",children:["Learn more about Skybridge",k.jsx(Ore,{className:"h-3.5 w-3.5"})]})})})]})})},b$=j.createContext({});function mie(e){const t=j.useRef(null);return t.current===null&&(t.current=e()),t.current}const S$=typeof window<"u",gie=S$?j.useLayoutEffect:j.useEffect,eA=j.createContext(null);function tA(e,t){e.indexOf(t)===-1&&e.push(t)}function nA(e,t){const r=e.indexOf(t);r>-1&&e.splice(r,1)}const zl=(e,t,r)=>r>t?t:r<e?e:r;let rA=()=>{};const dc={},w$=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function E$(e){return typeof e=="object"&&e!==null}const x$=e=>/^0[^.\s]+$/u.test(e);function aA(e){let t;return()=>(t===void 0&&(t=e()),t)}const cs=e=>e,yie=(e,t)=>r=>t(e(r)),Wb=(...e)=>e.reduce(yie),mb=(e,t,r)=>{const i=t-e;return i===0?1:(r-e)/i};class iA{constructor(){this.subscriptions=[]}add(t){return tA(this.subscriptions,t),()=>nA(this.subscriptions,t)}notify(t,r,i){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,r,i);else for(let l=0;l<s;l++){const c=this.subscriptions[l];c&&c(t,r,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const jl=e=>e*1e3,ls=e=>e/1e3;function _$(e,t){return t?e*(1e3/t):0}const T$=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,vie=1e-7,bie=12;function Sie(e,t,r,i,s){let l,c,f=0;do c=t+(r-t)/2,l=T$(c,i,s)-e,l>0?r=c:t=c;while(Math.abs(l)>vie&&++f<bie);return c}function Jb(e,t,r,i){if(e===t&&r===i)return cs;const s=l=>Sie(l,0,1,e,r);return l=>l===0||l===1?l:T$(s(l),t,i)}const C$=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,O$=e=>t=>1-e(1-t),R$=Jb(.33,1.53,.69,.99),oA=O$(R$),A$=C$(oA),M$=e=>(e*=2)<1?.5*oA(e):.5*(2-Math.pow(2,-10*(e-1))),sA=e=>1-Math.sin(Math.acos(e)),j$=O$(sA),k$=C$(sA),wie=Jb(.42,0,1,1),Eie=Jb(0,0,.58,1),D$=Jb(.42,0,.58,1),xie=e=>Array.isArray(e)&&typeof e[0]!="number",N$=e=>Array.isArray(e)&&typeof e[0]=="number",_ie={linear:cs,easeIn:wie,easeInOut:D$,easeOut:Eie,circIn:sA,circInOut:k$,circOut:j$,backIn:oA,backInOut:A$,backOut:R$,anticipate:M$},Tie=e=>typeof e=="string",aj=e=>{if(N$(e)){rA(e.length===4);const[t,r,i,s]=e;return Jb(t,r,i,s)}else if(Tie(e))return _ie[e];return e},dS=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Cie(e,t){let r=new Set,i=new Set,s=!1,l=!1;const c=new WeakSet;let f={delta:0,timestamp:0,isProcessing:!1};function d(m){c.has(m)&&(h.schedule(m),e()),m(f)}const h={schedule:(m,g=!1,v=!1)=>{const b=v&&s?r:i;return g&&c.add(m),b.has(m)||b.add(m),m},cancel:m=>{i.delete(m),c.delete(m)},process:m=>{if(f=m,s){l=!0;return}s=!0,[r,i]=[i,r],r.forEach(d),r.clear(),s=!1,l&&(l=!1,h.process(m))}};return h}const Oie=40;function z$(e,t){let r=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},l=()=>r=!0,c=dS.reduce((T,E)=>(T[E]=Cie(l),T),{}),{setup:f,read:d,resolveKeyframes:h,preUpdate:m,update:g,preRender:v,render:w,postRender:b}=c,_=()=>{const T=dc.useManualTiming?s.timestamp:performance.now();r=!1,dc.useManualTiming||(s.delta=i?1e3/60:Math.max(Math.min(T-s.timestamp,Oie),1)),s.timestamp=T,s.isProcessing=!0,f.process(s),d.process(s),h.process(s),m.process(s),g.process(s),v.process(s),w.process(s),b.process(s),s.isProcessing=!1,r&&t&&(i=!1,e(_))},x=()=>{r=!0,i=!0,s.isProcessing||e(_)};return{schedule:dS.reduce((T,E)=>{const O=c[E];return T[E]=(C,M=!1,D=!1)=>(r||x(),O.schedule(C,M,D)),T},{}),cancel:T=>{for(let E=0;E<dS.length;E++)c[dS[E]].cancel(T)},state:s,steps:c}}const{schedule:vr,cancel:Wc,state:fi,steps:C_}=z$(typeof requestAnimationFrame<"u"?requestAnimationFrame:cs,!0);let IS;function Rie(){IS=void 0}const eo={now:()=>(IS===void 0&&eo.set(fi.isProcessing||dc.useManualTiming?fi.timestamp:performance.now()),IS),set:e=>{IS=e,queueMicrotask(Rie)}},$$=e=>t=>typeof t=="string"&&t.startsWith(e),P$=$$("--"),Aie=$$("var(--"),lA=e=>Aie(e)?Mie.test(e.split("/*")[0].trim()):!1,Mie=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function ij(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const km={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},gb={...km,transform:e=>zl(0,1,e)},hS={...km,default:1},Zv=e=>Math.round(e*1e5)/1e5,uA=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function jie(e){return e==null}const kie=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,cA=(e,t)=>r=>!!(typeof r=="string"&&kie.test(r)&&r.startsWith(e)||t&&!jie(r)&&Object.prototype.hasOwnProperty.call(r,t)),I$=(e,t,r)=>i=>{if(typeof i!="string")return i;const[s,l,c,f]=i.match(uA);return{[e]:parseFloat(s),[t]:parseFloat(l),[r]:parseFloat(c),alpha:f!==void 0?parseFloat(f):1}},Die=e=>zl(0,255,e),O_={...km,transform:e=>Math.round(Die(e))},jh={test:cA("rgb","red"),parse:I$("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:i=1})=>"rgba("+O_.transform(e)+", "+O_.transform(t)+", "+O_.transform(r)+", "+Zv(gb.transform(i))+")"};function Nie(e){let t="",r="",i="",s="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),i=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),i=e.substring(3,4),s=e.substring(4,5),t+=t,r+=r,i+=i,s+=s),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}}const kC={test:cA("#"),parse:Nie,transform:jh.transform},e1=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Rc=e1("deg"),kl=e1("%"),gt=e1("px"),zie=e1("vh"),$ie=e1("vw"),oj={...kl,parse:e=>kl.parse(e)/100,transform:e=>kl.transform(e*100)},zp={test:cA("hsl","hue"),parse:I$("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:i=1})=>"hsla("+Math.round(e)+", "+kl.transform(Zv(t))+", "+kl.transform(Zv(r))+", "+Zv(gb.transform(i))+")"},ca={test:e=>jh.test(e)||kC.test(e)||zp.test(e),parse:e=>jh.test(e)?jh.parse(e):zp.test(e)?zp.parse(e):kC.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?jh.transform(e):zp.transform(e),getAnimatableNone:e=>{const t=ca.parse(e);return t.alpha=0,ca.transform(t)}},Pie=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Iie(e){return isNaN(e)&&typeof e=="string"&&(e.match(uA)?.length||0)+(e.match(Pie)?.length||0)>0}const L$="number",U$="color",Lie="var",Uie="var(",sj="${}",qie=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function yb(e){const t=e.toString(),r=[],i={color:[],number:[],var:[]},s=[];let l=0;const f=t.replace(qie,d=>(ca.test(d)?(i.color.push(l),s.push(U$),r.push(ca.parse(d))):d.startsWith(Uie)?(i.var.push(l),s.push(Lie),r.push(d)):(i.number.push(l),s.push(L$),r.push(parseFloat(d))),++l,sj)).split(sj);return{values:r,split:f,indexes:i,types:s}}function q$(e){return yb(e).values}function V$(e){const{split:t,types:r}=yb(e),i=t.length;return s=>{let l="";for(let c=0;c<i;c++)if(l+=t[c],s[c]!==void 0){const f=r[c];f===L$?l+=Zv(s[c]):f===U$?l+=ca.transform(s[c]):l+=s[c]}return l}}const Vie=e=>typeof e=="number"?0:ca.test(e)?ca.getAnimatableNone(e):e;function Fie(e){const t=q$(e);return V$(e)(t.map(Vie))}const Jc={test:Iie,parse:q$,createTransformer:V$,getAnimatableNone:Fie};function R_(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function Bie({hue:e,saturation:t,lightness:r,alpha:i}){e/=360,t/=100,r/=100;let s=0,l=0,c=0;if(!t)s=l=c=r;else{const f=r<.5?r*(1+t):r+t-r*t,d=2*r-f;s=R_(d,f,e+1/3),l=R_(d,f,e),c=R_(d,f,e-1/3)}return{red:Math.round(s*255),green:Math.round(l*255),blue:Math.round(c*255),alpha:i}}function Ew(e,t){return r=>r>0?t:e}const Kr=(e,t,r)=>e+(t-e)*r,A_=(e,t,r)=>{const i=e*e,s=r*(t*t-i)+i;return s<0?0:Math.sqrt(s)},Hie=[kC,jh,zp],Gie=e=>Hie.find(t=>t.test(e));function lj(e){const t=Gie(e);if(!t)return!1;let r=t.parse(e);return t===zp&&(r=Bie(r)),r}const uj=(e,t)=>{const r=lj(e),i=lj(t);if(!r||!i)return Ew(e,t);const s={...r};return l=>(s.red=A_(r.red,i.red,l),s.green=A_(r.green,i.green,l),s.blue=A_(r.blue,i.blue,l),s.alpha=Kr(r.alpha,i.alpha,l),jh.transform(s))},DC=new Set(["none","hidden"]);function Kie(e,t){return DC.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function Yie(e,t){return r=>Kr(e,t,r)}function fA(e){return typeof e=="number"?Yie:typeof e=="string"?lA(e)?Ew:ca.test(e)?uj:Qie:Array.isArray(e)?F$:typeof e=="object"?ca.test(e)?uj:Zie:Ew}function F$(e,t){const r=[...e],i=r.length,s=e.map((l,c)=>fA(l)(l,t[c]));return l=>{for(let c=0;c<i;c++)r[c]=s[c](l);return r}}function Zie(e,t){const r={...e,...t},i={};for(const s in r)e[s]!==void 0&&t[s]!==void 0&&(i[s]=fA(e[s])(e[s],t[s]));return s=>{for(const l in i)r[l]=i[l](s);return r}}function Xie(e,t){const r=[],i={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const l=t.types[s],c=e.indexes[l][i[l]],f=e.values[c]??0;r[s]=f,i[l]++}return r}const Qie=(e,t)=>{const r=Jc.createTransformer(t),i=yb(e),s=yb(t);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?DC.has(e)&&!s.values.length||DC.has(t)&&!i.values.length?Kie(e,t):Wb(F$(Xie(i,s),s.values),r):Ew(e,t)};function B$(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?Kr(e,t,r):fA(e)(e,t)}const Wie=e=>{const t=({timestamp:r})=>e(r);return{start:(r=!0)=>vr.update(t,r),stop:()=>Wc(t),now:()=>fi.isProcessing?fi.timestamp:eo.now()}},H$=(e,t,r=10)=>{let i="";const s=Math.max(Math.round(t/r),2);for(let l=0;l<s;l++)i+=Math.round(e(l/(s-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},xw=2e4;function dA(e){let t=0;const r=50;let i=e.next(t);for(;!i.done&&t<xw;)t+=r,i=e.next(t);return t>=xw?1/0:t}function Jie(e,t=100,r){const i=r({...e,keyframes:[0,t]}),s=Math.min(dA(i),xw);return{type:"keyframes",ease:l=>i.next(s*l).value/t,duration:ls(s)}}const eoe=5;function G$(e,t,r){const i=Math.max(t-eoe,0);return _$(r-e(i),t-i)}const ea={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},M_=.001;function toe({duration:e=ea.duration,bounce:t=ea.bounce,velocity:r=ea.velocity,mass:i=ea.mass}){let s,l,c=1-t;c=zl(ea.minDamping,ea.maxDamping,c),e=zl(ea.minDuration,ea.maxDuration,ls(e)),c<1?(s=h=>{const m=h*c,g=m*e,v=m-r,w=NC(h,c),b=Math.exp(-g);return M_-v/w*b},l=h=>{const g=h*c*e,v=g*r+r,w=Math.pow(c,2)*Math.pow(h,2)*e,b=Math.exp(-g),_=NC(Math.pow(h,2),c);return(-s(h)+M_>0?-1:1)*((v-w)*b)/_}):(s=h=>{const m=Math.exp(-h*e),g=(h-r)*e+1;return-M_+m*g},l=h=>{const m=Math.exp(-h*e),g=(r-h)*(e*e);return m*g});const f=5/e,d=roe(s,l,f);if(e=jl(e),isNaN(d))return{stiffness:ea.stiffness,damping:ea.damping,duration:e};{const h=Math.pow(d,2)*i;return{stiffness:h,damping:c*2*Math.sqrt(i*h),duration:e}}}const noe=12;function roe(e,t,r){let i=r;for(let s=1;s<noe;s++)i=i-e(i)/t(i);return i}function NC(e,t){return e*Math.sqrt(1-t*t)}const aoe=["duration","bounce"],ioe=["stiffness","damping","mass"];function cj(e,t){return t.some(r=>e[r]!==void 0)}function ooe(e){let t={velocity:ea.velocity,stiffness:ea.stiffness,damping:ea.damping,mass:ea.mass,isResolvedFromDuration:!1,...e};if(!cj(e,ioe)&&cj(e,aoe))if(e.visualDuration){const r=e.visualDuration,i=2*Math.PI/(r*1.2),s=i*i,l=2*zl(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:ea.mass,stiffness:s,damping:l}}else{const r=toe(e);t={...t,...r,mass:ea.mass},t.isResolvedFromDuration=!0}return t}function _w(e=ea.visualDuration,t=ea.bounce){const r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:i,restDelta:s}=r;const l=r.keyframes[0],c=r.keyframes[r.keyframes.length-1],f={done:!1,value:l},{stiffness:d,damping:h,mass:m,duration:g,velocity:v,isResolvedFromDuration:w}=ooe({...r,velocity:-ls(r.velocity||0)}),b=v||0,_=h/(2*Math.sqrt(d*m)),x=c-l,R=ls(Math.sqrt(d/m)),S=Math.abs(x)<5;i||(i=S?ea.restSpeed.granular:ea.restSpeed.default),s||(s=S?ea.restDelta.granular:ea.restDelta.default);let T;if(_<1){const O=NC(R,_);T=C=>{const M=Math.exp(-_*R*C);return c-M*((b+_*R*x)/O*Math.sin(O*C)+x*Math.cos(O*C))}}else if(_===1)T=O=>c-Math.exp(-R*O)*(x+(b+R*x)*O);else{const O=R*Math.sqrt(_*_-1);T=C=>{const M=Math.exp(-_*R*C),D=Math.min(O*C,300);return c-M*((b+_*R*x)*Math.sinh(D)+O*x*Math.cosh(D))/O}}const E={calculatedDuration:w&&g||null,next:O=>{const C=T(O);if(w)f.done=O>=g;else{let M=O===0?b:0;_<1&&(M=O===0?jl(b):G$(T,O,C));const D=Math.abs(M)<=i,$=Math.abs(c-C)<=s;f.done=D&&$}return f.value=f.done?c:C,f},toString:()=>{const O=Math.min(dA(E),xw),C=H$(M=>E.next(O*M).value,O,30);return O+"ms "+C},toTransition:()=>{}};return E}_w.applyToOptions=e=>{const t=Jie(e,100,_w);return e.ease=t.ease,e.duration=jl(t.duration),e.type="keyframes",e};function zC({keyframes:e,velocity:t=0,power:r=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:l=500,modifyTarget:c,min:f,max:d,restDelta:h=.5,restSpeed:m}){const g=e[0],v={done:!1,value:g},w=D=>f!==void 0&&D<f||d!==void 0&&D>d,b=D=>f===void 0?d:d===void 0||Math.abs(f-D)<Math.abs(d-D)?f:d;let _=r*t;const x=g+_,R=c===void 0?x:c(x);R!==x&&(_=R-g);const S=D=>-_*Math.exp(-D/i),T=D=>R+S(D),E=D=>{const $=S(D),q=T(D);v.done=Math.abs($)<=h,v.value=v.done?R:q};let O,C;const M=D=>{w(v.value)&&(O=D,C=_w({keyframes:[v.value,b(v.value)],velocity:G$(T,D,v.value),damping:s,stiffness:l,restDelta:h,restSpeed:m}))};return M(0),{calculatedDuration:null,next:D=>{let $=!1;return!C&&O===void 0&&($=!0,E(D),M(D)),O!==void 0&&D>=O?C.next(D-O):(!$&&E(D),v)}}}function soe(e,t,r){const i=[],s=r||dc.mix||B$,l=e.length-1;for(let c=0;c<l;c++){let f=s(e[c],e[c+1]);if(t){const d=Array.isArray(t)?t[c]||cs:t;f=Wb(d,f)}i.push(f)}return i}function loe(e,t,{clamp:r=!0,ease:i,mixer:s}={}){const l=e.length;if(rA(l===t.length),l===1)return()=>t[0];if(l===2&&t[0]===t[1])return()=>t[1];const c=e[0]===e[1];e[0]>e[l-1]&&(e=[...e].reverse(),t=[...t].reverse());const f=soe(t,i,s),d=f.length,h=m=>{if(c&&m<e[0])return t[0];let g=0;if(d>1)for(;g<e.length-2&&!(m<e[g+1]);g++);const v=mb(e[g],e[g+1],m);return f[g](v)};return r?m=>h(zl(e[0],e[l-1],m)):h}function uoe(e,t){const r=e[e.length-1];for(let i=1;i<=t;i++){const s=mb(0,t,i);e.push(Kr(r,1,s))}}function coe(e){const t=[0];return uoe(t,e.length-1),t}function foe(e,t){return e.map(r=>r*t)}function doe(e,t){return e.map(()=>t||D$).splice(0,e.length-1)}function Xv({duration:e=300,keyframes:t,times:r,ease:i="easeInOut"}){const s=xie(i)?i.map(aj):aj(i),l={done:!1,value:t[0]},c=foe(r&&r.length===t.length?r:coe(t),e),f=loe(c,t,{ease:Array.isArray(s)?s:doe(t,s)});return{calculatedDuration:e,next:d=>(l.value=f(d),l.done=d>=e,l)}}const hoe=e=>e!==null;function hA(e,{repeat:t,repeatType:r="loop"},i,s=1){const l=e.filter(hoe),f=s<0||t&&r!=="loop"&&t%2===1?0:l.length-1;return!f||i===void 0?l[f]:i}const poe={decay:zC,inertia:zC,tween:Xv,keyframes:Xv,spring:_w};function K$(e){typeof e.type=="string"&&(e.type=poe[e.type])}class pA{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,r){return this.finished.then(t,r)}}const moe=e=>e/100;class mA extends pA{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:r}=this.options;r&&r.updatedAt!==eo.now()&&this.tick(eo.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;K$(t);const{type:r=Xv,repeat:i=0,repeatDelay:s=0,repeatType:l,velocity:c=0}=t;let{keyframes:f}=t;const d=r||Xv;d!==Xv&&typeof f[0]!="number"&&(this.mixKeyframes=Wb(moe,B$(f[0],f[1])),f=[0,100]);const h=d({...t,keyframes:f});l==="mirror"&&(this.mirroredGenerator=d({...t,keyframes:[...f].reverse(),velocity:-c})),h.calculatedDuration===null&&(h.calculatedDuration=dA(h));const{calculatedDuration:m}=h;this.calculatedDuration=m,this.resolvedDuration=m+s,this.totalDuration=this.resolvedDuration*(i+1)-s,this.generator=h}updateTime(t){const r=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r}tick(t,r=!1){const{generator:i,totalDuration:s,mixKeyframes:l,mirroredGenerator:c,resolvedDuration:f,calculatedDuration:d}=this;if(this.startTime===null)return i.next(0);const{delay:h=0,keyframes:m,repeat:g,repeatType:v,repeatDelay:w,type:b,onUpdate:_,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),r?this.currentTime=t:this.updateTime(t);const R=this.currentTime-h*(this.playbackSpeed>=0?1:-1),S=this.playbackSpeed>=0?R<0:R>s;this.currentTime=Math.max(R,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let T=this.currentTime,E=i;if(g){const D=Math.min(this.currentTime,s)/f;let $=Math.floor(D),q=D%1;!q&&D>=1&&(q=1),q===1&&$--,$=Math.min($,g+1),$%2&&(v==="reverse"?(q=1-q,w&&(q-=w/f)):v==="mirror"&&(E=c)),T=zl(0,1,q)*f}const O=S?{done:!1,value:m[0]}:E.next(T);l&&(O.value=l(O.value));let{done:C}=O;!S&&d!==null&&(C=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const M=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return M&&b!==zC&&(O.value=hA(m,this.options,x,this.speed)),_&&_(O.value),M&&this.finish(),O}then(t,r){return this.finished.then(t,r)}get duration(){return ls(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ls(t)}get time(){return ls(this.currentTime)}set time(t){t=jl(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(eo.now());const r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=ls(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Wie,startTime:r}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),this.options.onPlay?.();const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=r??i),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(eo.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function goe(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const kh=e=>e*180/Math.PI,$C=e=>{const t=kh(Math.atan2(e[1],e[0]));return PC(t)},yoe={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:$C,rotateZ:$C,skewX:e=>kh(Math.atan(e[1])),skewY:e=>kh(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},PC=e=>(e=e%360,e<0&&(e+=360),e),fj=$C,dj=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),hj=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),voe={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:dj,scaleY:hj,scale:e=>(dj(e)+hj(e))/2,rotateX:e=>PC(kh(Math.atan2(e[6],e[5]))),rotateY:e=>PC(kh(Math.atan2(-e[2],e[0]))),rotateZ:fj,rotate:fj,skewX:e=>kh(Math.atan(e[4])),skewY:e=>kh(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function IC(e){return e.includes("scale")?1:0}function LC(e,t){if(!e||e==="none")return IC(t);const r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(r)i=voe,s=r;else{const f=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=yoe,s=f}if(!s)return IC(t);const l=i[t],c=s[1].split(",").map(Soe);return typeof l=="function"?l(c):c[l]}const boe=(e,t)=>{const{transform:r="none"}=getComputedStyle(e);return LC(r,t)};function Soe(e){return parseFloat(e.trim())}const Dm=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Nm=new Set(Dm),pj=e=>e===km||e===gt,woe=new Set(["x","y","z"]),Eoe=Dm.filter(e=>!woe.has(e));function xoe(e){const t=[];return Eoe.forEach(r=>{const i=e.getValue(r);i!==void 0&&(t.push([r,i.get()]),i.set(r.startsWith("scale")?1:0))}),t}const Dc={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>LC(t,"x"),y:(e,{transform:t})=>LC(t,"y")};Dc.translateX=Dc.x;Dc.translateY=Dc.y;const zh=new Set;let UC=!1,qC=!1,VC=!1;function Y$(){if(qC){const e=Array.from(zh).filter(i=>i.needsMeasurement),t=new Set(e.map(i=>i.element)),r=new Map;t.forEach(i=>{const s=xoe(i);s.length&&(r.set(i,s),i.render())}),e.forEach(i=>i.measureInitialState()),t.forEach(i=>{i.render();const s=r.get(i);s&&s.forEach(([l,c])=>{i.getValue(l)?.set(c)})}),e.forEach(i=>i.measureEndState()),e.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}qC=!1,UC=!1,zh.forEach(e=>e.complete(VC)),zh.clear()}function Z$(){zh.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(qC=!0)})}function _oe(){VC=!0,Z$(),Y$(),VC=!1}class gA{constructor(t,r,i,s,l,c=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=i,this.motionValue=s,this.element=l,this.isAsync=c}scheduleResolve(){this.state="scheduled",this.isAsync?(zh.add(this),UC||(UC=!0,vr.read(Z$),vr.resolveKeyframes(Y$))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:r,element:i,motionValue:s}=this;if(t[0]===null){const l=s?.get(),c=t[t.length-1];if(l!==void 0)t[0]=l;else if(i&&r){const f=i.readValue(r,c);f!=null&&(t[0]=f)}t[0]===void 0&&(t[0]=c),s&&l===void 0&&s.set(t[0])}goe(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),zh.delete(this)}cancel(){this.state==="scheduled"&&(zh.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Toe=e=>e.startsWith("--");function Coe(e,t,r){Toe(t)?e.style.setProperty(t,r):e.style[t]=r}const Ooe=aA(()=>window.ScrollTimeline!==void 0),Roe={};function Aoe(e,t){const r=aA(e);return()=>Roe[t]??r()}const X$=Aoe(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Uv=([e,t,r,i])=>`cubic-bezier(${e}, ${t}, ${r}, ${i})`,mj={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Uv([0,.65,.55,1]),circOut:Uv([.55,0,1,.45]),backIn:Uv([.31,.01,.66,-.59]),backOut:Uv([.33,1.53,.69,.99])};function Q$(e,t){if(e)return typeof e=="function"?X$()?H$(e,t):"ease-out":N$(e)?Uv(e):Array.isArray(e)?e.map(r=>Q$(r,t)||mj.easeOut):mj[e]}function Moe(e,t,r,{delay:i=0,duration:s=300,repeat:l=0,repeatType:c="loop",ease:f="easeOut",times:d}={},h=void 0){const m={[t]:r};d&&(m.offset=d);const g=Q$(f,s);Array.isArray(g)&&(m.easing=g);const v={delay:i,duration:s,easing:Array.isArray(g)?"linear":g,fill:"both",iterations:l+1,direction:c==="reverse"?"alternate":"normal"};return h&&(v.pseudoElement=h),e.animate(m,v)}function W$(e){return typeof e=="function"&&"applyToOptions"in e}function joe({type:e,...t}){return W$(e)&&X$()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class koe extends pA{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:r,name:i,keyframes:s,pseudoElement:l,allowFlatten:c=!1,finalKeyframe:f,onComplete:d}=t;this.isPseudoElement=!!l,this.allowFlatten=c,this.options=t,rA(typeof t.type!="string");const h=joe(t);this.animation=Moe(r,i,s,h,l),h.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!l){const m=hA(s,this.options,f,this.speed);this.updateMotionValue?this.updateMotionValue(m):Coe(r,i,m),this.animation.cancel()}d?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return ls(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ls(t)}get time(){return ls(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=jl(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&Ooe()?(this.animation.timeline=t,cs):r(this)}}const J$={anticipate:M$,backInOut:A$,circInOut:k$};function Doe(e){return e in J$}function Noe(e){typeof e.ease=="string"&&Doe(e.ease)&&(e.ease=J$[e.ease])}const j_=10;class zoe extends koe{constructor(t){Noe(t),K$(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:r,onUpdate:i,onComplete:s,element:l,...c}=this.options;if(!r)return;if(t!==void 0){r.set(t);return}const f=new mA({...c,autoplay:!1}),d=Math.max(j_,eo.now()-this.startTime),h=zl(0,j_,d-j_);r.setWithVelocity(f.sample(Math.max(0,d-h)).value,f.sample(d).value,h),f.stop()}}const gj=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Jc.test(e)||e==="0")&&!e.startsWith("url("));function $oe(e){const t=e[0];if(e.length===1)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}function Poe(e,t,r,i){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const l=e[e.length-1],c=gj(s,t),f=gj(l,t);return!c||!f?!1:$oe(e)||(r==="spring"||W$(r))&&i}function FC(e){e.duration=0,e.type="keyframes"}const Ioe=new Set(["opacity","clipPath","filter","transform"]),Loe=aA(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Uoe(e){const{motionValue:t,name:r,repeatDelay:i,repeatType:s,damping:l,type:c}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:d,transformTemplate:h}=t.owner.getProps();return Loe()&&r&&Ioe.has(r)&&(r!=="transform"||!h)&&!d&&!i&&s!=="mirror"&&l!==0&&c!=="inertia"}const qoe=40;class Voe extends pA{constructor({autoplay:t=!0,delay:r=0,type:i="keyframes",repeat:s=0,repeatDelay:l=0,repeatType:c="loop",keyframes:f,name:d,motionValue:h,element:m,...g}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=eo.now();const v={autoplay:t,delay:r,type:i,repeat:s,repeatDelay:l,repeatType:c,name:d,motionValue:h,element:m,...g},w=m?.KeyframeResolver||gA;this.keyframeResolver=new w(f,(b,_,x)=>this.onKeyframesResolved(b,_,v,!x),d,h,m),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,r,i,s){this.keyframeResolver=void 0;const{name:l,type:c,velocity:f,delay:d,isHandoff:h,onUpdate:m}=i;this.resolvedAt=eo.now(),Poe(t,l,c,f)||((dc.instantAnimations||!d)&&m?.(hA(t,i,r)),t[0]=t[t.length-1],FC(i),i.repeat=0);const v={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>qoe?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...i,keyframes:t},w=!h&&Uoe(v),b=v.motionValue?.owner?.current,_=w?new zoe({...v,element:b}):new mA(v);_.finished.then(()=>{this.notifyFinished()}).catch(cs),this.pendingTimeline&&(this.stopTimeline=_.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=_}get finished(){return this._animation?this.animation.finished:this._finished}then(t,r){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),_oe()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function e8(e,t,r,i=0,s=1){const l=Array.from(e).sort((h,m)=>h.sortNodePosition(m)).indexOf(t),c=e.size,f=(c-1)*i;return typeof r=="function"?r(l,c):s===1?l*i:f-l*i}const Foe=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Boe(e){const t=Foe.exec(e);if(!t)return[,];const[,r,i,s]=t;return[`--${r??i}`,s]}function t8(e,t,r=1){const[i,s]=Boe(e);if(!i)return;const l=window.getComputedStyle(t).getPropertyValue(i);if(l){const c=l.trim();return w$(c)?parseFloat(c):c}return lA(s)?t8(s,t,r+1):s}const Hoe={type:"spring",stiffness:500,damping:25,restSpeed:10},Goe=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Koe={type:"keyframes",duration:.8},Yoe={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Zoe=(e,{keyframes:t})=>t.length>2?Koe:Nm.has(e)?e.startsWith("scale")?Goe(t[1]):Hoe:Yoe,Xoe=e=>e!==null;function Qoe(e,{repeat:t,repeatType:r="loop"},i){const s=e.filter(Xoe),l=t&&r!=="loop"&&t%2===1?0:s.length-1;return s[l]}function n8(e,t){if(e?.inherit&&t){const{inherit:r,...i}=e;return{...t,...i}}return e}function yA(e,t){const r=e?.[t]??e?.default??e;return r!==e?n8(r,e):r}function Woe({when:e,delay:t,delayChildren:r,staggerChildren:i,staggerDirection:s,repeat:l,repeatType:c,repeatDelay:f,from:d,elapsed:h,...m}){return!!Object.keys(m).length}const vA=(e,t,r,i={},s,l)=>c=>{const f=yA(i,e)||{},d=f.delay||i.delay||0;let{elapsed:h=0}=i;h=h-jl(d);const m={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...f,delay:-h,onUpdate:v=>{t.set(v),f.onUpdate&&f.onUpdate(v)},onComplete:()=>{c(),f.onComplete&&f.onComplete()},name:e,motionValue:t,element:l?void 0:s};Woe(f)||Object.assign(m,Zoe(e,m)),m.duration&&(m.duration=jl(m.duration)),m.repeatDelay&&(m.repeatDelay=jl(m.repeatDelay)),m.from!==void 0&&(m.keyframes[0]=m.from);let g=!1;if((m.type===!1||m.duration===0&&!m.repeatDelay)&&(FC(m),m.delay===0&&(g=!0)),(dc.instantAnimations||dc.skipAnimations||s?.shouldSkipAnimations)&&(g=!0,FC(m),m.delay=0),m.allowFlatten=!f.type&&!f.ease,g&&!l&&t.get()!==void 0){const v=Qoe(m.keyframes,f);if(v!==void 0){vr.update(()=>{m.onUpdate(v),m.onComplete()});return}}return f.isSync?new mA(m):new Voe(m)};function yj(e){const t=[{},{}];return e?.values.forEach((r,i)=>{t[0][i]=r.get(),t[1][i]=r.getVelocity()}),t}function bA(e,t,r,i){if(typeof t=="function"){const[s,l]=yj(i);t=t(r!==void 0?r:e.custom,s,l)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,l]=yj(i);t=t(r!==void 0?r:e.custom,s,l)}return t}function Hp(e,t,r){const i=e.getProps();return bA(i,t,r!==void 0?r:i.custom,e)}const r8=new Set(["width","height","top","left","right","bottom",...Dm]),vj=30,Joe=e=>!isNaN(parseFloat(e));class ese{constructor(t,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const s=eo.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const l of this.dependents)l.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=r.owner}setCurrent(t){this.current=t,this.updatedAt=eo.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Joe(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new iA);const i=this.events[t].add(r);return t==="change"?()=>{i(),vr.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,r,i){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,r=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=eo.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>vj)return 0;const r=Math.min(this.updatedAt-this.prevUpdatedAt,vj);return _$(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function um(e,t){return new ese(e,t)}const BC=e=>Array.isArray(e);function tse(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,um(r))}function nse(e){return BC(e)?e[e.length-1]||0:e}function rse(e,t){const r=Hp(e,t);let{transitionEnd:i={},transition:s={},...l}=r||{};l={...l,...i};for(const c in l){const f=nse(l[c]);tse(e,c,f)}}const Ci=e=>!!(e&&e.getVelocity);function ase(e){return!!(Ci(e)&&e.add)}function HC(e,t){const r=e.getValue("willChange");if(ase(r))return r.add(t);if(!r&&dc.WillChange){const i=new dc.WillChange("auto");e.addValue("willChange",i),i.add(t)}}function SA(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const ise="framerAppearId",a8="data-"+SA(ise);function i8(e){return e.props[a8]}function ose({protectedKeys:e,needsAnimating:t},r){const i=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,i}function o8(e,t,{delay:r=0,transitionOverride:i,type:s}={}){let{transition:l,transitionEnd:c,...f}=t;const d=e.getDefaultTransition();l=l?n8(l,d):d;const h=l?.reduceMotion;i&&(l=i);const m=[],g=s&&e.animationState&&e.animationState.getState()[s];for(const v in f){const w=e.getValue(v,e.latestValues[v]??null),b=f[v];if(b===void 0||g&&ose(g,v))continue;const _={delay:r,...yA(l||{},v)},x=w.get();if(x!==void 0&&!w.isAnimating&&!Array.isArray(b)&&b===x&&!_.velocity)continue;let R=!1;if(window.MotionHandoffAnimation){const E=i8(e);if(E){const O=window.MotionHandoffAnimation(E,v,vr);O!==null&&(_.startTime=O,R=!0)}}HC(e,v);const S=h??e.shouldReduceMotion;w.start(vA(v,w,b,S&&r8.has(v)?{type:!1}:_,e,R));const T=w.animation;T&&m.push(T)}if(c){const v=()=>vr.update(()=>{c&&rse(e,c)});m.length?Promise.all(m).then(v):v()}return m}function GC(e,t,r={}){const i=Hp(e,t,r.type==="exit"?e.presenceContext?.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=i||{};r.transitionOverride&&(s=r.transitionOverride);const l=i?()=>Promise.all(o8(e,i,r)):()=>Promise.resolve(),c=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:h=0,staggerChildren:m,staggerDirection:g}=s;return sse(e,t,d,h,m,g,r)}:()=>Promise.resolve(),{when:f}=s;if(f){const[d,h]=f==="beforeChildren"?[l,c]:[c,l];return d().then(()=>h())}else return Promise.all([l(),c(r.delay)])}function sse(e,t,r=0,i=0,s=0,l=1,c){const f=[];for(const d of e.variantChildren)d.notify("AnimationStart",t),f.push(GC(d,t,{...c,delay:r+(typeof i=="function"?0:i)+e8(e.variantChildren,d,i,s,l)}).then(()=>d.notify("AnimationComplete",t)));return Promise.all(f)}function lse(e,t,r={}){e.notify("AnimationStart",t);let i;if(Array.isArray(t)){const s=t.map(l=>GC(e,l,r));i=Promise.all(s)}else if(typeof t=="string")i=GC(e,t,r);else{const s=typeof t=="function"?Hp(e,t,r.custom):t;i=Promise.all(o8(e,s,r))}return i.then(()=>{e.notify("AnimationComplete",t)})}const use={test:e=>e==="auto",parse:e=>e},s8=e=>t=>t.test(e),l8=[km,gt,kl,Rc,$ie,zie,use],bj=e=>l8.find(s8(e));function cse(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||x$(e):!0}const fse=new Set(["brightness","contrast","saturate","opacity"]);function dse(e){const[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=r.match(uA)||[];if(!i)return e;const s=r.replace(i,"");let l=fse.has(t)?1:0;return i!==r&&(l*=100),t+"("+l+s+")"}const hse=/\b([a-z-]*)\(.*?\)/gu,KC={...Jc,getAnimatableNone:e=>{const t=e.match(hse);return t?t.map(dse).join(" "):e}},Sj={...km,transform:Math.round},pse={rotate:Rc,rotateX:Rc,rotateY:Rc,rotateZ:Rc,scale:hS,scaleX:hS,scaleY:hS,scaleZ:hS,skew:Rc,skewX:Rc,skewY:Rc,distance:gt,translateX:gt,translateY:gt,translateZ:gt,x:gt,y:gt,z:gt,perspective:gt,transformPerspective:gt,opacity:gb,originX:oj,originY:oj,originZ:gt},wA={borderWidth:gt,borderTopWidth:gt,borderRightWidth:gt,borderBottomWidth:gt,borderLeftWidth:gt,borderRadius:gt,borderTopLeftRadius:gt,borderTopRightRadius:gt,borderBottomRightRadius:gt,borderBottomLeftRadius:gt,width:gt,maxWidth:gt,height:gt,maxHeight:gt,top:gt,right:gt,bottom:gt,left:gt,inset:gt,insetBlock:gt,insetBlockStart:gt,insetBlockEnd:gt,insetInline:gt,insetInlineStart:gt,insetInlineEnd:gt,padding:gt,paddingTop:gt,paddingRight:gt,paddingBottom:gt,paddingLeft:gt,paddingBlock:gt,paddingBlockStart:gt,paddingBlockEnd:gt,paddingInline:gt,paddingInlineStart:gt,paddingInlineEnd:gt,margin:gt,marginTop:gt,marginRight:gt,marginBottom:gt,marginLeft:gt,marginBlock:gt,marginBlockStart:gt,marginBlockEnd:gt,marginInline:gt,marginInlineStart:gt,marginInlineEnd:gt,fontSize:gt,backgroundPositionX:gt,backgroundPositionY:gt,...pse,zIndex:Sj,fillOpacity:gb,strokeOpacity:gb,numOctaves:Sj},mse={...wA,color:ca,backgroundColor:ca,outlineColor:ca,fill:ca,stroke:ca,borderColor:ca,borderTopColor:ca,borderRightColor:ca,borderBottomColor:ca,borderLeftColor:ca,filter:KC,WebkitFilter:KC},u8=e=>mse[e];function c8(e,t){let r=u8(e);return r!==KC&&(r=Jc),r.getAnimatableNone?r.getAnimatableNone(t):void 0}const gse=new Set(["auto","none","0"]);function yse(e,t,r){let i=0,s;for(;i<e.length&&!s;){const l=e[i];typeof l=="string"&&!gse.has(l)&&yb(l).values.length&&(s=e[i]),i++}if(s&&r)for(const l of t)e[l]=c8(r,s)}class vse extends gA{constructor(t,r,i,s,l){super(t,r,i,s,l,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:r,name:i}=this;if(!r||!r.current)return;super.readKeyframes();for(let m=0;m<t.length;m++){let g=t[m];if(typeof g=="string"&&(g=g.trim(),lA(g))){const v=t8(g,r.current);v!==void 0&&(t[m]=v),m===t.length-1&&(this.finalKeyframe=g)}}if(this.resolveNoneKeyframes(),!r8.has(i)||t.length!==2)return;const[s,l]=t,c=bj(s),f=bj(l),d=ij(s),h=ij(l);if(d!==h&&Dc[i]){this.needsMeasurement=!0;return}if(c!==f)if(pj(c)&&pj(f))for(let m=0;m<t.length;m++){const g=t[m];typeof g=="string"&&(t[m]=parseFloat(g))}else Dc[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:r}=this,i=[];for(let s=0;s<t.length;s++)(t[s]===null||cse(t[s]))&&i.push(s);i.length&&yse(t,i,r)}measureInitialState(){const{element:t,unresolvedKeyframes:r,name:i}=this;if(!t||!t.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Dc[i](t.measureViewportBox(),window.getComputedStyle(t.current)),r[0]=this.measuredOrigin;const s=r[r.length-1];s!==void 0&&t.getValue(i,s).jump(s,!1)}measureEndState(){const{element:t,name:r,unresolvedKeyframes:i}=this;if(!t||!t.current)return;const s=t.getValue(r);s&&s.jump(this.measuredOrigin,!1);const l=i.length-1,c=i[l];i[l]=Dc[r](t.measureViewportBox(),window.getComputedStyle(t.current)),c!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=c),this.removedTransforms?.length&&this.removedTransforms.forEach(([f,d])=>{t.getValue(f).set(d)}),this.resolveNoneKeyframes()}}function f8(e,t,r){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let i=document;const s=r?.[e]??i.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(i=>i!=null)}const d8=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function bse(e){return E$(e)&&"offsetHeight"in e}const{schedule:EA}=z$(queueMicrotask,!1),ll={x:!1,y:!1};function h8(){return ll.x||ll.y}function Sse(e){return e==="x"||e==="y"?ll[e]?null:(ll[e]=!0,()=>{ll[e]=!1}):ll.x||ll.y?null:(ll.x=ll.y=!0,()=>{ll.x=ll.y=!1})}function p8(e,t){const r=f8(e),i=new AbortController,s={passive:!0,...t,signal:i.signal};return[r,s,()=>i.abort()]}function wse(e){return!(e.pointerType==="touch"||h8())}function Ese(e,t,r={}){const[i,s,l]=p8(e,r);return i.forEach(c=>{let f=!1,d=!1,h;const m=()=>{c.removeEventListener("pointerleave",b)},g=x=>{h&&(h(x),h=void 0),m()},v=x=>{f=!1,window.removeEventListener("pointerup",v),window.removeEventListener("pointercancel",v),d&&(d=!1,g(x))},w=()=>{f=!0,window.addEventListener("pointerup",v,s),window.addEventListener("pointercancel",v,s)},b=x=>{if(x.pointerType!=="touch"){if(f){d=!0;return}g(x)}},_=x=>{if(!wse(x))return;d=!1;const R=t(c,x);typeof R=="function"&&(h=R,c.addEventListener("pointerleave",b,s))};c.addEventListener("pointerenter",_,s),c.addEventListener("pointerdown",w,s)}),l}const m8=(e,t)=>t?e===t?!0:m8(e,t.parentElement):!1,xA=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,xse=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function _se(e){return xse.has(e.tagName)||e.isContentEditable===!0}const Tse=new Set(["INPUT","SELECT","TEXTAREA"]);function Cse(e){return Tse.has(e.tagName)||e.isContentEditable===!0}const LS=new WeakSet;function wj(e){return t=>{t.key==="Enter"&&e(t)}}function k_(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Ose=(e,t)=>{const r=e.currentTarget;if(!r)return;const i=wj(()=>{if(LS.has(r))return;k_(r,"down");const s=wj(()=>{k_(r,"up")}),l=()=>k_(r,"cancel");r.addEventListener("keyup",s,t),r.addEventListener("blur",l,t)});r.addEventListener("keydown",i,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",i),t)};function Ej(e){return xA(e)&&!h8()}const xj=new WeakSet;function Rse(e,t,r={}){const[i,s,l]=p8(e,r),c=f=>{const d=f.currentTarget;if(!Ej(f)||xj.has(f))return;LS.add(d),r.stopPropagation&&xj.add(f);const h=t(d,f),m=(w,b)=>{window.removeEventListener("pointerup",g),window.removeEventListener("pointercancel",v),LS.has(d)&&LS.delete(d),Ej(w)&&typeof h=="function"&&h(w,{success:b})},g=w=>{m(w,d===window||d===document||r.useGlobalTarget||m8(d,w.target))},v=w=>{m(w,!1)};window.addEventListener("pointerup",g,s),window.addEventListener("pointercancel",v,s)};return i.forEach(f=>{(r.useGlobalTarget?window:f).addEventListener("pointerdown",c,s),bse(f)&&(f.addEventListener("focus",h=>Ose(h,s)),!_se(f)&&!f.hasAttribute("tabindex")&&(f.tabIndex=0))}),l}function _A(e){return E$(e)&&"ownerSVGElement"in e}const US=new WeakMap;let qS;const g8=(e,t,r)=>(i,s)=>s&&s[0]?s[0][e+"Size"]:_A(i)&&"getBBox"in i?i.getBBox()[t]:i[r],Ase=g8("inline","width","offsetWidth"),Mse=g8("block","height","offsetHeight");function jse({target:e,borderBoxSize:t}){US.get(e)?.forEach(r=>{r(e,{get width(){return Ase(e,t)},get height(){return Mse(e,t)}})})}function kse(e){e.forEach(jse)}function Dse(){typeof ResizeObserver>"u"||(qS=new ResizeObserver(kse))}function Nse(e,t){qS||Dse();const r=f8(e);return r.forEach(i=>{let s=US.get(i);s||(s=new Set,US.set(i,s)),s.add(t),qS?.observe(i)}),()=>{r.forEach(i=>{const s=US.get(i);s?.delete(t),s?.size||qS?.unobserve(i)})}}const VS=new Set;let $p;function zse(){$p=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};VS.forEach(t=>t(e))},window.addEventListener("resize",$p)}function $se(e){return VS.add(e),$p||zse(),()=>{VS.delete(e),!VS.size&&typeof $p=="function"&&(window.removeEventListener("resize",$p),$p=void 0)}}function _j(e,t){return typeof e=="function"?$se(e):Nse(e,t)}function Pse(e){return _A(e)&&e.tagName==="svg"}const Ise=[...l8,ca,Jc],Lse=e=>Ise.find(s8(e)),Tj=()=>({translate:0,scale:1,origin:0,originPoint:0}),Pp=()=>({x:Tj(),y:Tj()}),Cj=()=>({min:0,max:0}),Ma=()=>({x:Cj(),y:Cj()}),YC={current:null},y8={current:!1},Use=typeof window<"u";function qse(){if(y8.current=!0,!!Use)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>YC.current=e.matches;e.addEventListener("change",t),t()}else YC.current=!1}const Vse=new WeakMap;function g2(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function vb(e){return typeof e=="string"||Array.isArray(e)}const TA=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],CA=["initial",...TA];function y2(e){return g2(e.animate)||CA.some(t=>vb(e[t]))}function v8(e){return!!(y2(e)||e.variants)}function Fse(e,t,r){for(const i in t){const s=t[i],l=r[i];if(Ci(s))e.addValue(i,s);else if(Ci(l))e.addValue(i,um(s,{owner:e}));else if(l!==s)if(e.hasValue(i)){const c=e.getValue(i);c.liveStyle===!0?c.jump(s):c.hasAnimated||c.set(s)}else{const c=e.getStaticValue(i);e.addValue(i,um(c!==void 0?c:s,{owner:e}))}}for(const i in r)t[i]===void 0&&e.removeValue(i);return t}const Oj=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Tw={};function b8(e){Tw=e}function Bse(){return Tw}class Hse{scrapeMotionValuesFromProps(t,r,i){return{}}constructor({parent:t,props:r,presenceContext:i,reducedMotionConfig:s,skipAnimations:l,blockInitialAnimation:c,visualState:f},d={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=gA,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const w=eo.now();this.renderScheduledAt<w&&(this.renderScheduledAt=w,vr.render(this.render,!1,!0))};const{latestValues:h,renderState:m}=f;this.latestValues=h,this.baseTarget={...h},this.initialValues=r.initial?{...h}:{},this.renderState=m,this.parent=t,this.props=r,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=l,this.options=d,this.blockInitialAnimation=!!c,this.isControllingVariants=y2(r),this.isVariantNode=v8(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:g,...v}=this.scrapeMotionValuesFromProps(r,{},this);for(const w in v){const b=v[w];h[w]!==void 0&&Ci(b)&&b.set(h[w])}}mount(t){if(this.hasBeenMounted)for(const r in this.initialValues)this.values.get(r)?.jump(this.initialValues[r]),this.latestValues[r]=this.initialValues[r];this.current=t,Vse.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,i)=>this.bindToMotionValue(i,r)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(y8.current||qse(),this.shouldReduceMotion=YC.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Wc(this.notifyUpdate),Wc(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const r=this.features[t];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,r){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const i=Nm.has(t);i&&this.onBindTransform&&this.onBindTransform();const s=r.on("change",c=>{this.latestValues[t]=c,this.props.onUpdate&&vr.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let l;typeof window<"u"&&window.MotionCheckAppearSync&&(l=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{s(),l&&l(),r.owner&&r.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Tw){const r=Tw[t];if(!r)continue;const{isEnabled:i,Feature:s}=r;if(!this.features[t]&&s&&i(this.props)&&(this.features[t]=new s(this)),this.features[t]){const l=this.features[t];l.isMounted?l.update():(l.mount(),l.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ma()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let i=0;i<Oj.length;i++){const s=Oj[i];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const l="on"+s,c=t[l];c&&(this.propEventSubscriptions[s]=this.on(s,c))}this.prevMotionValues=Fse(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(t),()=>r.variantChildren.delete(t)}addValue(t,r){const i=this.values.get(t);r!==i&&(i&&this.removeValue(t),this.bindToMotionValue(t,r),this.values.set(t,r),this.latestValues[t]=r.get())}removeValue(t){this.values.delete(t);const r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let i=this.values.get(t);return i===void 0&&r!==void 0&&(i=um(r===null?void 0:r,{owner:this}),this.addValue(t,i)),i}readValue(t,r){let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(w$(i)||x$(i))?i=parseFloat(i):!Lse(i)&&Jc.test(r)&&(i=c8(t,r)),this.setBaseTarget(t,Ci(i)?i.get():i)),Ci(i)?i.get():i}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const l=bA(this.props,r,this.presenceContext?.custom);l&&(i=l[t])}if(r&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!Ci(s)?s:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new iA),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}scheduleRenderMicrotask(){EA.render(this.render)}}class S8 extends Hse{constructor(){super(...arguments),this.KeyframeResolver=vse}sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){const i=t.style;return i?i[r]:void 0}removeValueFromRenderState(t,{vars:r,style:i}){delete r[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ci(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}}class pf{constructor(t){this.isMounted=!1,this.node=t}update(){}}function w8({top:e,left:t,right:r,bottom:i}){return{x:{min:t,max:r},y:{min:e,max:i}}}function Gse({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Kse(e,t){if(!t)return e;const r=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:i.y,right:i.x}}function D_(e){return e===void 0||e===1}function ZC({scale:e,scaleX:t,scaleY:r}){return!D_(e)||!D_(t)||!D_(r)}function Rh(e){return ZC(e)||E8(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function E8(e){return Rj(e.x)||Rj(e.y)}function Rj(e){return e&&e!=="0%"}function Cw(e,t,r){const i=e-r,s=t*i;return r+s}function Aj(e,t,r,i,s){return s!==void 0&&(e=Cw(e,s,i)),Cw(e,r,i)+t}function XC(e,t=0,r=1,i,s){e.min=Aj(e.min,t,r,i,s),e.max=Aj(e.max,t,r,i,s)}function x8(e,{x:t,y:r}){XC(e.x,t.translate,t.scale,t.originPoint),XC(e.y,r.translate,r.scale,r.originPoint)}const Mj=.999999999999,jj=1.0000000000001;function Yse(e,t,r,i=!1){const s=r.length;if(!s)return;t.x=t.y=1;let l,c;for(let f=0;f<s;f++){l=r[f],c=l.projectionDelta;const{visualElement:d}=l.options;d&&d.props.style&&d.props.style.display==="contents"||(i&&l.options.layoutScroll&&l.scroll&&l!==l.root&&Lp(e,{x:-l.scroll.offset.x,y:-l.scroll.offset.y}),c&&(t.x*=c.x.scale,t.y*=c.y.scale,x8(e,c)),i&&Rh(l.latestValues)&&Lp(e,l.latestValues))}t.x<jj&&t.x>Mj&&(t.x=1),t.y<jj&&t.y>Mj&&(t.y=1)}function Ip(e,t){e.min=e.min+t,e.max=e.max+t}function kj(e,t,r,i,s=.5){const l=Kr(e.min,e.max,s);XC(e,t,r,l,i)}function Lp(e,t){kj(e.x,t.x,t.scaleX,t.scale,t.originX),kj(e.y,t.y,t.scaleY,t.scale,t.originY)}function _8(e,t){return w8(Kse(e.getBoundingClientRect(),t))}function Zse(e,t,r){const i=_8(e,r),{scroll:s}=t;return s&&(Ip(i.x,s.offset.x),Ip(i.y,s.offset.y)),i}const Xse={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Qse=Dm.length;function Wse(e,t,r){let i="",s=!0;for(let l=0;l<Qse;l++){const c=Dm[l],f=e[c];if(f===void 0)continue;let d=!0;if(typeof f=="number")d=f===(c.startsWith("scale")?1:0);else{const h=parseFloat(f);d=c.startsWith("scale")?h===1:h===0}if(!d||r){const h=d8(f,wA[c]);if(!d){s=!1;const m=Xse[c]||c;i+=`${m}(${h}) `}r&&(t[c]=h)}}return i=i.trim(),r?i=r(t,s?"":i):s&&(i="none"),i}function OA(e,t,r){const{style:i,vars:s,transformOrigin:l}=e;let c=!1,f=!1;for(const d in t){const h=t[d];if(Nm.has(d)){c=!0;continue}else if(P$(d)){s[d]=h;continue}else{const m=d8(h,wA[d]);d.startsWith("origin")?(f=!0,l[d]=m):i[d]=m}}if(t.transform||(c||r?i.transform=Wse(t,e.transform,r):i.transform&&(i.transform="none")),f){const{originX:d="50%",originY:h="50%",originZ:m=0}=l;i.transformOrigin=`${d} ${h} ${m}`}}function T8(e,{style:t,vars:r},i,s){const l=e.style;let c;for(c in t)l[c]=t[c];s?.applyProjectionStyles(l,i);for(c in r)l.setProperty(c,r[c])}function Dj(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Av={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(gt.test(e))e=parseFloat(e);else return e;const r=Dj(e,t.target.x),i=Dj(e,t.target.y);return`${r}% ${i}%`}},Jse={correct:(e,{treeScale:t,projectionDelta:r})=>{const i=e,s=Jc.parse(e);if(s.length>5)return i;const l=Jc.createTransformer(e),c=typeof s[0]!="number"?1:0,f=r.x.scale*t.x,d=r.y.scale*t.y;s[0+c]/=f,s[1+c]/=d;const h=Kr(f,d,.5);return typeof s[2+c]=="number"&&(s[2+c]/=h),typeof s[3+c]=="number"&&(s[3+c]/=h),l(s)}},QC={borderRadius:{...Av,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Av,borderTopRightRadius:Av,borderBottomLeftRadius:Av,borderBottomRightRadius:Av,boxShadow:Jse};function C8(e,{layout:t,layoutId:r}){return Nm.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!QC[e]||e==="opacity")}function RA(e,t,r){const i=e.style,s=t?.style,l={};if(!i)return l;for(const c in i)(Ci(i[c])||s&&Ci(s[c])||C8(c,e)||r?.getValue(c)?.liveStyle!==void 0)&&(l[c]=i[c]);return l}function ele(e){return window.getComputedStyle(e)}class tle extends S8{constructor(){super(...arguments),this.type="html",this.renderInstance=T8}readValueFromInstance(t,r){if(Nm.has(r))return this.projection?.isProjecting?IC(r):boe(t,r);{const i=ele(t),s=(P$(r)?i.getPropertyValue(r):i[r])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:r}){return _8(t,r)}build(t,r,i){OA(t,r,i.transformTemplate)}scrapeMotionValuesFromProps(t,r,i){return RA(t,r,i)}}const nle={offset:"stroke-dashoffset",array:"stroke-dasharray"},rle={offset:"strokeDashoffset",array:"strokeDasharray"};function ale(e,t,r=1,i=0,s=!0){e.pathLength=1;const l=s?nle:rle;e[l.offset]=`${-i}`,e[l.array]=`${t} ${r}`}const ile=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function O8(e,{attrX:t,attrY:r,attrScale:i,pathLength:s,pathSpacing:l=1,pathOffset:c=0,...f},d,h,m){if(OA(e,f,h),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:g,style:v}=e;g.transform&&(v.transform=g.transform,delete g.transform),(v.transform||g.transformOrigin)&&(v.transformOrigin=g.transformOrigin??"50% 50%",delete g.transformOrigin),v.transform&&(v.transformBox=m?.transformBox??"fill-box",delete g.transformBox);for(const w of ile)g[w]!==void 0&&(v[w]=g[w],delete g[w]);t!==void 0&&(g.x=t),r!==void 0&&(g.y=r),i!==void 0&&(g.scale=i),s!==void 0&&ale(g,s,l,c,!1)}const R8=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),A8=e=>typeof e=="string"&&e.toLowerCase()==="svg";function ole(e,t,r,i){T8(e,t,void 0,i);for(const s in t.attrs)e.setAttribute(R8.has(s)?s:SA(s),t.attrs[s])}function M8(e,t,r){const i=RA(e,t,r);for(const s in e)if(Ci(e[s])||Ci(t[s])){const l=Dm.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;i[l]=e[s]}return i}class sle extends S8{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ma}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(Nm.has(r)){const i=u8(r);return i&&i.default||0}return r=R8.has(r)?r:SA(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,i){return M8(t,r,i)}build(t,r,i){O8(t,r,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,r,i,s){ole(t,r,i,s)}mount(t){this.isSVGTag=A8(t.tagName),super.mount(t)}}const lle=CA.length;function j8(e){if(!e)return;if(!e.isControllingVariants){const r=e.parent?j8(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}const t={};for(let r=0;r<lle;r++){const i=CA[r],s=e.props[i];(vb(s)||s===!1)&&(t[i]=s)}return t}function k8(e,t){if(!Array.isArray(t))return!1;const r=t.length;if(r!==e.length)return!1;for(let i=0;i<r;i++)if(t[i]!==e[i])return!1;return!0}const ule=[...TA].reverse(),cle=TA.length;function fle(e){return t=>Promise.all(t.map(({animation:r,options:i})=>lse(e,r,i)))}function dle(e){let t=fle(e),r=Nj(),i=!0;const s=d=>(h,m)=>{const g=Hp(e,m,d==="exit"?e.presenceContext?.custom:void 0);if(g){const{transition:v,transitionEnd:w,...b}=g;h={...h,...b,...w}}return h};function l(d){t=d(e)}function c(d){const{props:h}=e,m=j8(e.parent)||{},g=[],v=new Set;let w={},b=1/0;for(let x=0;x<cle;x++){const R=ule[x],S=r[R],T=h[R]!==void 0?h[R]:m[R],E=vb(T),O=R===d?S.isActive:null;O===!1&&(b=x);let C=T===m[R]&&T!==h[R]&&E;if(C&&i&&e.manuallyAnimateOnMount&&(C=!1),S.protectedKeys={...w},!S.isActive&&O===null||!T&&!S.prevProp||g2(T)||typeof T=="boolean")continue;const M=hle(S.prevProp,T);let D=M||R===d&&S.isActive&&!C&&E||x>b&&E,$=!1;const q=Array.isArray(T)?T:[T];let L=q.reduce(s(R),{});O===!1&&(L={});const{prevResolvedValues:V={}}=S,F={...V,...L},re=B=>{D=!0,v.has(B)&&($=!0,v.delete(B)),S.needsAnimating[B]=!0;const Y=e.getValue(B);Y&&(Y.liveStyle=!1)};for(const B in F){const Y=L[B],fe=V[B];if(w.hasOwnProperty(B))continue;let se=!1;BC(Y)&&BC(fe)?se=!k8(Y,fe):se=Y!==fe,se?Y!=null?re(B):v.add(B):Y!==void 0&&v.has(B)?re(B):S.protectedKeys[B]=!0}S.prevProp=T,S.prevResolvedValues=L,S.isActive&&(w={...w,...L}),i&&e.blockInitialAnimation&&(D=!1);const ae=C&&M;D&&(!ae||$)&&g.push(...q.map(B=>{const Y={type:R};if(typeof B=="string"&&i&&!ae&&e.manuallyAnimateOnMount&&e.parent){const{parent:fe}=e,se=Hp(fe,B);if(fe.enteringChildren&&se){const{delayChildren:N}=se.transition||{};Y.delay=e8(fe.enteringChildren,e,N)}}return{animation:B,options:Y}}))}if(v.size){const x={};if(typeof h.initial!="boolean"){const R=Hp(e,Array.isArray(h.initial)?h.initial[0]:h.initial);R&&R.transition&&(x.transition=R.transition)}v.forEach(R=>{const S=e.getBaseTarget(R),T=e.getValue(R);T&&(T.liveStyle=!0),x[R]=S??null}),g.push({animation:x})}let _=!!g.length;return i&&(h.initial===!1||h.initial===h.animate)&&!e.manuallyAnimateOnMount&&(_=!1),i=!1,_?t(g):Promise.resolve()}function f(d,h){if(r[d].isActive===h)return Promise.resolve();e.variantChildren?.forEach(g=>g.animationState?.setActive(d,h)),r[d].isActive=h;const m=c(d);for(const g in r)r[g].protectedKeys={};return m}return{animateChanges:c,setActive:f,setAnimateFunction:l,getState:()=>r,reset:()=>{r=Nj()}}}function hle(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!k8(t,e):!1}function _h(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Nj(){return{animate:_h(!0),whileInView:_h(),whileHover:_h(),whileTap:_h(),whileDrag:_h(),whileFocus:_h(),exit:_h()}}function zj(e,t){e.min=t.min,e.max=t.max}function ol(e,t){zj(e.x,t.x),zj(e.y,t.y)}function $j(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const D8=1e-4,ple=1-D8,mle=1+D8,N8=.01,gle=0-N8,yle=0+N8;function to(e){return e.max-e.min}function vle(e,t,r){return Math.abs(e-t)<=r}function Pj(e,t,r,i=.5){e.origin=i,e.originPoint=Kr(t.min,t.max,e.origin),e.scale=to(r)/to(t),e.translate=Kr(r.min,r.max,e.origin)-e.originPoint,(e.scale>=ple&&e.scale<=mle||isNaN(e.scale))&&(e.scale=1),(e.translate>=gle&&e.translate<=yle||isNaN(e.translate))&&(e.translate=0)}function Qv(e,t,r,i){Pj(e.x,t.x,r.x,i?i.originX:void 0),Pj(e.y,t.y,r.y,i?i.originY:void 0)}function Ij(e,t,r){e.min=r.min+t.min,e.max=e.min+to(t)}function ble(e,t,r){Ij(e.x,t.x,r.x),Ij(e.y,t.y,r.y)}function Lj(e,t,r){e.min=t.min-r.min,e.max=e.min+to(t)}function Ow(e,t,r){Lj(e.x,t.x,r.x),Lj(e.y,t.y,r.y)}function Uj(e,t,r,i,s){return e-=t,e=Cw(e,1/r,i),s!==void 0&&(e=Cw(e,1/s,i)),e}function Sle(e,t=0,r=1,i=.5,s,l=e,c=e){if(kl.test(t)&&(t=parseFloat(t),t=Kr(c.min,c.max,t/100)-c.min),typeof t!="number")return;let f=Kr(l.min,l.max,i);e===l&&(f-=t),e.min=Uj(e.min,t,r,f,s),e.max=Uj(e.max,t,r,f,s)}function qj(e,t,[r,i,s],l,c){Sle(e,t[r],t[i],t[s],t.scale,l,c)}const wle=["x","scaleX","originX"],Ele=["y","scaleY","originY"];function Vj(e,t,r,i){qj(e.x,t,wle,r?r.x:void 0,i?i.x:void 0),qj(e.y,t,Ele,r?r.y:void 0,i?i.y:void 0)}function Fj(e){return e.translate===0&&e.scale===1}function z8(e){return Fj(e.x)&&Fj(e.y)}function Bj(e,t){return e.min===t.min&&e.max===t.max}function xle(e,t){return Bj(e.x,t.x)&&Bj(e.y,t.y)}function Hj(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function $8(e,t){return Hj(e.x,t.x)&&Hj(e.y,t.y)}function Gj(e){return to(e.x)/to(e.y)}function Kj(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Sl(e){return[e("x"),e("y")]}function _le(e,t,r){let i="";const s=e.x.translate/t.x,l=e.y.translate/t.y,c=r?.z||0;if((s||l||c)&&(i=`translate3d(${s}px, ${l}px, ${c}px) `),(t.x!==1||t.y!==1)&&(i+=`scale(${1/t.x}, ${1/t.y}) `),r){const{transformPerspective:h,rotate:m,rotateX:g,rotateY:v,skewX:w,skewY:b}=r;h&&(i=`perspective(${h}px) ${i}`),m&&(i+=`rotate(${m}deg) `),g&&(i+=`rotateX(${g}deg) `),v&&(i+=`rotateY(${v}deg) `),w&&(i+=`skewX(${w}deg) `),b&&(i+=`skewY(${b}deg) `)}const f=e.x.scale*t.x,d=e.y.scale*t.y;return(f!==1||d!==1)&&(i+=`scale(${f}, ${d})`),i||"none"}const P8=["TopLeft","TopRight","BottomLeft","BottomRight"],Tle=P8.length,Yj=e=>typeof e=="string"?parseFloat(e):e,Zj=e=>typeof e=="number"||gt.test(e);function Cle(e,t,r,i,s,l){s?(e.opacity=Kr(0,r.opacity??1,Ole(i)),e.opacityExit=Kr(t.opacity??1,0,Rle(i))):l&&(e.opacity=Kr(t.opacity??1,r.opacity??1,i));for(let c=0;c<Tle;c++){const f=`border${P8[c]}Radius`;let d=Xj(t,f),h=Xj(r,f);if(d===void 0&&h===void 0)continue;d||(d=0),h||(h=0),d===0||h===0||Zj(d)===Zj(h)?(e[f]=Math.max(Kr(Yj(d),Yj(h),i),0),(kl.test(h)||kl.test(d))&&(e[f]+="%")):e[f]=h}(t.rotate||r.rotate)&&(e.rotate=Kr(t.rotate||0,r.rotate||0,i))}function Xj(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Ole=I8(0,.5,j$),Rle=I8(.5,.95,cs);function I8(e,t,r){return i=>i<e?0:i>t?1:r(mb(e,t,i))}function Ale(e,t,r){const i=Ci(e)?e:um(e);return i.start(vA("",i,t,r)),i.animation}function bb(e,t,r,i={passive:!0}){return e.addEventListener(t,r,i),()=>e.removeEventListener(t,r)}const Mle=(e,t)=>e.depth-t.depth;class jle{constructor(){this.children=[],this.isDirty=!1}add(t){tA(this.children,t),this.isDirty=!0}remove(t){nA(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Mle),this.isDirty=!1,this.children.forEach(t)}}function kle(e,t){const r=eo.now(),i=({timestamp:s})=>{const l=s-r;l>=t&&(Wc(i),e(l-t))};return vr.setup(i,!0),()=>Wc(i)}function FS(e){return Ci(e)?e.get():e}class Dle{constructor(){this.members=[]}add(t){tA(this.members,t),t.scheduleRender()}remove(t){if(nA(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(t){const r=this.members.findIndex(s=>t===s);if(r===0)return!1;let i;for(let s=r;s>=0;s--){const l=this.members[s];if(l.isPresent!==!1){i=l;break}}return i?(this.promote(i),!0):!1}promote(t,r){const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender();const s=i.options.layoutDependency,l=t.options.layoutDependency;s!==void 0&&l!==void 0&&s===l||(t.resumeFrom=i,r&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0));const{crossfade:f}=t.options;f===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:r,resumingFrom:i}=t;r.onExitComplete&&r.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const BS={hasAnimatedSinceResize:!0,hasEverUpdated:!1},N_=["","X","Y","Z"],Nle=1e3;let zle=0;function z_(e,t,r,i){const{latestValues:s}=t;s[e]&&(r[e]=s[e],t.setStaticValue(e,0),i&&(i[e]=0))}function L8(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const r=i8(t);if(window.MotionHasOptimisedAnimation(r,"transform")){const{layout:s,layoutId:l}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",vr,!(s||l))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&L8(i)}function U8({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(c={},f=t?.()){this.id=zle++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Ile),this.nodes.forEach(Vle),this.nodes.forEach(Fle),this.nodes.forEach(Lle)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=c,this.root=f?f.root||f:this,this.path=f?[...f.path,f]:[],this.parent=f,this.depth=f?f.depth+1:0;for(let d=0;d<this.path.length;d++)this.path[d].shouldResetTransform=!0;this.root===this&&(this.nodes=new jle)}addEventListener(c,f){return this.eventHandlers.has(c)||this.eventHandlers.set(c,new iA),this.eventHandlers.get(c).add(f)}notifyListeners(c,...f){const d=this.eventHandlers.get(c);d&&d.notify(...f)}hasListeners(c){return this.eventHandlers.has(c)}mount(c){if(this.instance)return;this.isSVG=_A(c)&&!Pse(c),this.instance=c;const{layoutId:f,layout:d,visualElement:h}=this.options;if(h&&!h.current&&h.mount(c),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(d||f)&&(this.isLayoutDirty=!0),e){let m,g=0;const v=()=>this.root.updateBlockedByResize=!1;vr.read(()=>{g=window.innerWidth}),e(c,()=>{const w=window.innerWidth;w!==g&&(g=w,this.root.updateBlockedByResize=!0,m&&m(),m=kle(v,250),BS.hasAnimatedSinceResize&&(BS.hasAnimatedSinceResize=!1,this.nodes.forEach(Jj)))})}f&&this.root.registerSharedNode(f,this),this.options.animate!==!1&&h&&(f||d)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:g,hasRelativeLayoutChanged:v,layout:w})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const b=this.options.transition||h.getDefaultTransition()||Yle,{onLayoutAnimationStart:_,onLayoutAnimationComplete:x}=h.getProps(),R=!this.targetLayout||!$8(this.targetLayout,w),S=!g&&v;if(this.options.layoutRoot||this.resumeFrom||S||g&&(R||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const T={...yA(b,"layout"),onPlay:_,onComplete:x};(h.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T),this.setAnimationOrigin(m,S)}else g||Jj(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=w})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const c=this.getStack();c&&c.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Wc(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Ble),this.animationId++)}getTransformTemplate(){const{visualElement:c}=this.options;return c&&c.getProps().transformTemplate}willUpdate(c=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&L8(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let m=0;m<this.path.length;m++){const g=this.path[m];g.shouldResetTransform=!0,g.updateScroll("snapshot"),g.options.layoutRoot&&g.willUpdate(!1)}const{layoutId:f,layout:d}=this.options;if(f===void 0&&!d)return;const h=this.getTransformTemplate();this.prevTransformTemplateValue=h?h(this.latestValues,""):void 0,this.updateSnapshot(),c&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Qj);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Wj);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(qle),this.nodes.forEach($le),this.nodes.forEach(Ple)):this.nodes.forEach(Wj),this.clearAllSnapshots();const f=eo.now();fi.delta=zl(0,1e3/60,f-fi.timestamp),fi.timestamp=f,fi.isProcessing=!0,C_.update.process(fi),C_.preRender.process(fi),C_.render.process(fi),fi.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,EA.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ule),this.sharedNodes.forEach(Hle)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,vr.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){vr.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!to(this.snapshot.measuredBox.x)&&!to(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let d=0;d<this.path.length;d++)this.path[d].updateScroll();const c=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Ma(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:f}=this.options;f&&f.notify("LayoutMeasure",this.layout.layoutBox,c?c.layoutBox:void 0)}updateScroll(c="measure"){let f=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===c&&(f=!1),f&&this.instance){const d=i(this.instance);this.scroll={animationId:this.root.animationId,phase:c,isRoot:d,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:d}}}resetTransform(){if(!s)return;const c=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,f=this.projectionDelta&&!z8(this.projectionDelta),d=this.getTransformTemplate(),h=d?d(this.latestValues,""):void 0,m=h!==this.prevTransformTemplateValue;c&&this.instance&&(f||Rh(this.latestValues)||m)&&(s(this.instance,h),this.shouldResetTransform=!1,this.scheduleRender())}measure(c=!0){const f=this.measurePageBox();let d=this.removeElementScroll(f);return c&&(d=this.removeTransform(d)),Zle(d),{animationId:this.root.animationId,measuredBox:f,layoutBox:d,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:c}=this.options;if(!c)return Ma();const f=c.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Xle))){const{scroll:h}=this.root;h&&(Ip(f.x,h.offset.x),Ip(f.y,h.offset.y))}return f}removeElementScroll(c){const f=Ma();if(ol(f,c),this.scroll?.wasRoot)return f;for(let d=0;d<this.path.length;d++){const h=this.path[d],{scroll:m,options:g}=h;h!==this.root&&m&&g.layoutScroll&&(m.wasRoot&&ol(f,c),Ip(f.x,m.offset.x),Ip(f.y,m.offset.y))}return f}applyTransform(c,f=!1){const d=Ma();ol(d,c);for(let h=0;h<this.path.length;h++){const m=this.path[h];!f&&m.options.layoutScroll&&m.scroll&&m!==m.root&&Lp(d,{x:-m.scroll.offset.x,y:-m.scroll.offset.y}),Rh(m.latestValues)&&Lp(d,m.latestValues)}return Rh(this.latestValues)&&Lp(d,this.latestValues),d}removeTransform(c){const f=Ma();ol(f,c);for(let d=0;d<this.path.length;d++){const h=this.path[d];if(!h.instance||!Rh(h.latestValues))continue;ZC(h.latestValues)&&h.updateSnapshot();const m=Ma(),g=h.measurePageBox();ol(m,g),Vj(f,h.latestValues,h.snapshot?h.snapshot.layoutBox:void 0,m)}return Rh(this.latestValues)&&Vj(f,this.latestValues),f}setTargetDelta(c){this.targetDelta=c,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(c){this.options={...this.options,...c,crossfade:c.crossfade!==void 0?c.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==fi.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(c=!1){const f=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=f.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=f.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=f.isSharedProjectionDirty);const d=!!this.resumingFrom||this!==f;if(!(c||d&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:m,layoutId:g}=this.options;if(!this.layout||!(m||g))return;this.resolvedRelativeTargetAt=fi.timestamp;const v=this.getClosestProjectingParent();v&&this.linkedParentVersion!==v.layoutVersion&&!v.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(v&&v.layout?this.createRelativeTarget(v,this.layout.layoutBox,v.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ma(),this.targetWithTransforms=Ma()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),ble(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ol(this.target,this.layout.layoutBox),x8(this.target,this.targetDelta)):ol(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,v&&!!v.resumingFrom==!!this.resumingFrom&&!v.options.layoutScroll&&v.target&&this.animationProgress!==1?this.createRelativeTarget(v,this.target,v.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||ZC(this.parent.latestValues)||E8(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(c,f,d){this.relativeParent=c,this.linkedParentVersion=c.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ma(),this.relativeTargetOrigin=Ma(),Ow(this.relativeTargetOrigin,f,d),ol(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const c=this.getLead(),f=!!this.resumingFrom||this!==c;let d=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(d=!1),f&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(d=!1),this.resolvedRelativeTargetAt===fi.timestamp&&(d=!1),d)return;const{layout:h,layoutId:m}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(h||m))return;ol(this.layoutCorrected,this.layout.layoutBox);const g=this.treeScale.x,v=this.treeScale.y;Yse(this.layoutCorrected,this.treeScale,this.path,f),c.layout&&!c.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(c.target=c.layout.layoutBox,c.targetWithTransforms=Ma());const{target:w}=c;if(!w){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():($j(this.prevProjectionDelta.x,this.projectionDelta.x),$j(this.prevProjectionDelta.y,this.projectionDelta.y)),Qv(this.projectionDelta,this.layoutCorrected,w,this.latestValues),(this.treeScale.x!==g||this.treeScale.y!==v||!Kj(this.projectionDelta.x,this.prevProjectionDelta.x)||!Kj(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",w))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(c=!0){if(this.options.visualElement?.scheduleRender(),c){const f=this.getStack();f&&f.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Pp(),this.projectionDelta=Pp(),this.projectionDeltaWithTransform=Pp()}setAnimationOrigin(c,f=!1){const d=this.snapshot,h=d?d.latestValues:{},m={...this.latestValues},g=Pp();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!f;const v=Ma(),w=d?d.source:void 0,b=this.layout?this.layout.source:void 0,_=w!==b,x=this.getStack(),R=!x||x.members.length<=1,S=!!(_&&!R&&this.options.crossfade===!0&&!this.path.some(Kle));this.animationProgress=0;let T;this.mixTargetDelta=E=>{const O=E/1e3;ek(g.x,c.x,O),ek(g.y,c.y,O),this.setTargetDelta(g),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ow(v,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Gle(this.relativeTarget,this.relativeTargetOrigin,v,O),T&&xle(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=Ma()),ol(T,this.relativeTarget)),_&&(this.animationValues=m,Cle(m,h,this.latestValues,O,S,R)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=O},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(c){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Wc(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=vr.update(()=>{BS.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=um(0)),this.currentAnimation=Ale(this.motionValue,[0,1e3],{...c,velocity:0,isSync:!0,onUpdate:f=>{this.mixTargetDelta(f),c.onUpdate&&c.onUpdate(f)},onStop:()=>{},onComplete:()=>{c.onComplete&&c.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const c=this.getStack();c&&c.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Nle),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const c=this.getLead();let{targetWithTransforms:f,target:d,layout:h,latestValues:m}=c;if(!(!f||!d||!h)){if(this!==c&&this.layout&&h&&q8(this.options.animationType,this.layout.layoutBox,h.layoutBox)){d=this.target||Ma();const g=to(this.layout.layoutBox.x);d.x.min=c.target.x.min,d.x.max=d.x.min+g;const v=to(this.layout.layoutBox.y);d.y.min=c.target.y.min,d.y.max=d.y.min+v}ol(f,d),Lp(f,m),Qv(this.projectionDeltaWithTransform,this.layoutCorrected,f,m)}}registerSharedNode(c,f){this.sharedNodes.has(c)||this.sharedNodes.set(c,new Dle),this.sharedNodes.get(c).add(f);const h=f.options.initialPromotionConfig;f.promote({transition:h?h.transition:void 0,preserveFollowOpacity:h&&h.shouldPreserveFollowOpacity?h.shouldPreserveFollowOpacity(f):void 0})}isLead(){const c=this.getStack();return c?c.lead===this:!0}getLead(){const{layoutId:c}=this.options;return c?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:c}=this.options;return c?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:c}=this.options;if(c)return this.root.sharedNodes.get(c)}promote({needsReset:c,transition:f,preserveFollowOpacity:d}={}){const h=this.getStack();h&&h.promote(this,d),c&&(this.projectionDelta=void 0,this.needsReset=!0),f&&this.setOptions({transition:f})}relegate(){const c=this.getStack();return c?c.relegate(this):!1}resetSkewAndRotation(){const{visualElement:c}=this.options;if(!c)return;let f=!1;const{latestValues:d}=c;if((d.z||d.rotate||d.rotateX||d.rotateY||d.rotateZ||d.skewX||d.skewY)&&(f=!0),!f)return;const h={};d.z&&z_("z",c,h,this.animationValues);for(let m=0;m<N_.length;m++)z_(`rotate${N_[m]}`,c,h,this.animationValues),z_(`skew${N_[m]}`,c,h,this.animationValues);c.render();for(const m in h)c.setStaticValue(m,h[m]),this.animationValues&&(this.animationValues[m]=h[m]);c.scheduleRender()}applyProjectionStyles(c,f){if(!this.instance||this.isSVG)return;if(!this.isVisible){c.visibility="hidden";return}const d=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,c.visibility="",c.opacity="",c.pointerEvents=FS(f?.pointerEvents)||"",c.transform=d?d(this.latestValues,""):"none";return}const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){this.options.layoutId&&(c.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,c.pointerEvents=FS(f?.pointerEvents)||""),this.hasProjected&&!Rh(this.latestValues)&&(c.transform=d?d({},""):"none",this.hasProjected=!1);return}c.visibility="";const m=h.animationValues||h.latestValues;this.applyTransformsToTarget();let g=_le(this.projectionDeltaWithTransform,this.treeScale,m);d&&(g=d(m,g)),c.transform=g;const{x:v,y:w}=this.projectionDelta;c.transformOrigin=`${v.origin*100}% ${w.origin*100}% 0`,h.animationValues?c.opacity=h===this?m.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:m.opacityExit:c.opacity=h===this?m.opacity!==void 0?m.opacity:"":m.opacityExit!==void 0?m.opacityExit:0;for(const b in QC){if(m[b]===void 0)continue;const{correct:_,applyTo:x,isCSSVariable:R}=QC[b],S=g==="none"?m[b]:_(m[b],h);if(x){const T=x.length;for(let E=0;E<T;E++)c[x[E]]=S}else R?this.options.visualElement.renderState.vars[b]=S:c[b]=S}this.options.layoutId&&(c.pointerEvents=h===this?FS(f?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(c=>c.currentAnimation?.stop()),this.root.nodes.forEach(Qj),this.root.sharedNodes.clear()}}}function $le(e){e.updateLayout()}function Ple(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:s}=e.options,l=t.source!==e.layout.source;s==="size"?Sl(m=>{const g=l?t.measuredBox[m]:t.layoutBox[m],v=to(g);g.min=r[m].min,g.max=g.min+v}):q8(s,t.layoutBox,r)&&Sl(m=>{const g=l?t.measuredBox[m]:t.layoutBox[m],v=to(r[m]);g.max=g.min+v,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[m].max=e.relativeTarget[m].min+v)});const c=Pp();Qv(c,r,t.layoutBox);const f=Pp();l?Qv(f,e.applyTransform(i,!0),t.measuredBox):Qv(f,r,t.layoutBox);const d=!z8(c);let h=!1;if(!e.resumeFrom){const m=e.getClosestProjectingParent();if(m&&!m.resumeFrom){const{snapshot:g,layout:v}=m;if(g&&v){const w=Ma();Ow(w,t.layoutBox,g.layoutBox);const b=Ma();Ow(b,r,v.layoutBox),$8(w,b)||(h=!0),m.options.layoutRoot&&(e.relativeTarget=b,e.relativeTargetOrigin=w,e.relativeParent=m)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:f,layoutDelta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:h})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function Ile(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Lle(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Ule(e){e.clearSnapshot()}function Qj(e){e.clearMeasurements()}function Wj(e){e.isLayoutDirty=!1}function qle(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Jj(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Vle(e){e.resolveTargetDelta()}function Fle(e){e.calcProjection()}function Ble(e){e.resetSkewAndRotation()}function Hle(e){e.removeLeadSnapshot()}function ek(e,t,r){e.translate=Kr(t.translate,0,r),e.scale=Kr(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function tk(e,t,r,i){e.min=Kr(t.min,r.min,i),e.max=Kr(t.max,r.max,i)}function Gle(e,t,r,i){tk(e.x,t.x,r.x,i),tk(e.y,t.y,r.y,i)}function Kle(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Yle={duration:.45,ease:[.4,0,.1,1]},nk=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),rk=nk("applewebkit/")&&!nk("chrome/")?Math.round:cs;function ak(e){e.min=rk(e.min),e.max=rk(e.max)}function Zle(e){ak(e.x),ak(e.y)}function q8(e,t,r){return e==="position"||e==="preserve-aspect"&&!vle(Gj(t),Gj(r),.2)}function Xle(e){return e!==e.root&&e.scroll?.wasRoot}const Qle=U8({attachResizeListener:(e,t)=>bb(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),$_={current:void 0},V8=U8({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!$_.current){const e=new Qle({});e.mount(window),e.setOptions({layoutScroll:!0}),$_.current=e}return $_.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),F8=j.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Wle(e=!0){const t=j.useContext(eA);if(t===null)return[!0,null];const{isPresent:r,onExitComplete:i,register:s}=t,l=j.useId();j.useEffect(()=>{if(e)return s(l)},[e]);const c=j.useCallback(()=>e&&i&&i(l),[l,i,e]);return!r&&i?[!1,c]:[!0]}const B8=j.createContext({strict:!1}),ik={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let ok=!1;function Jle(){if(ok)return;const e={};for(const t in ik)e[t]={isEnabled:r=>ik[t].some(i=>!!r[i])};b8(e),ok=!0}function H8(){return Jle(),Bse()}function eue(e){const t=H8();for(const r in e)t[r]={...t[r],...e[r]};b8(t)}const tue=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Rw(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||tue.has(e)}let G8=e=>!Rw(e);function nue(e){typeof e=="function"&&(G8=t=>t.startsWith("on")?!Rw(t):e(t))}try{nue(require("@emotion/is-prop-valid").default)}catch{}function rue(e,t,r){const i={};for(const s in e)s==="values"&&typeof e.values=="object"||(G8(s)||r===!0&&Rw(s)||!t&&!Rw(s)||e.draggable&&s.startsWith("onDrag"))&&(i[s]=e[s]);return i}const v2=j.createContext({});function aue(e,t){if(y2(e)){const{initial:r,animate:i}=e;return{initial:r===!1||vb(r)?r:void 0,animate:vb(i)?i:void 0}}return e.inherit!==!1?t:{}}function iue(e){const{initial:t,animate:r}=aue(e,j.useContext(v2));return j.useMemo(()=>({initial:t,animate:r}),[sk(t),sk(r)])}function sk(e){return Array.isArray(e)?e.join(" "):e}const AA=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function K8(e,t,r){for(const i in t)!Ci(t[i])&&!C8(i,r)&&(e[i]=t[i])}function oue({transformTemplate:e},t){return j.useMemo(()=>{const r=AA();return OA(r,t,e),Object.assign({},r.vars,r.style)},[t])}function sue(e,t){const r=e.style||{},i={};return K8(i,r,e),Object.assign(i,oue(e,t)),i}function lue(e,t){const r={},i=sue(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=i,r}const Y8=()=>({...AA(),attrs:{}});function uue(e,t,r,i){const s=j.useMemo(()=>{const l=Y8();return O8(l,t,A8(i),e.transformTemplate,e.style),{...l.attrs,style:{...l.style}}},[t]);if(e.style){const l={};K8(l,e.style,e),s.style={...l,...s.style}}return s}const cue=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function MA(e){return typeof e!="string"||e.includes("-")?!1:!!(cue.indexOf(e)>-1||/[A-Z]/u.test(e))}function fue(e,t,r,{latestValues:i},s,l=!1,c){const d=(c??MA(e)?uue:lue)(t,i,s,e),h=rue(t,typeof e=="string",l),m=e!==j.Fragment?{...h,...d,ref:r}:{},{children:g}=t,v=j.useMemo(()=>Ci(g)?g.get():g,[g]);return j.createElement(e,{...m,children:v})}function due({scrapeMotionValuesFromProps:e,createRenderState:t},r,i,s){return{latestValues:hue(r,i,s,e),renderState:t()}}function hue(e,t,r,i){const s={},l=i(e,{});for(const v in l)s[v]=FS(l[v]);let{initial:c,animate:f}=e;const d=y2(e),h=v8(e);t&&h&&!d&&e.inherit!==!1&&(c===void 0&&(c=t.initial),f===void 0&&(f=t.animate));let m=r?r.initial===!1:!1;m=m||c===!1;const g=m?f:c;if(g&&typeof g!="boolean"&&!g2(g)){const v=Array.isArray(g)?g:[g];for(let w=0;w<v.length;w++){const b=bA(e,v[w]);if(b){const{transitionEnd:_,transition:x,...R}=b;for(const S in R){let T=R[S];if(Array.isArray(T)){const E=m?T.length-1:0;T=T[E]}T!==null&&(s[S]=T)}for(const S in _)s[S]=_[S]}}}return s}const Z8=e=>(t,r)=>{const i=j.useContext(v2),s=j.useContext(eA),l=()=>due(e,t,i,s);return r?l():mie(l)},pue=Z8({scrapeMotionValuesFromProps:RA,createRenderState:AA}),mue=Z8({scrapeMotionValuesFromProps:M8,createRenderState:Y8}),gue=Symbol.for("motionComponentSymbol");function yue(e,t,r){const i=j.useRef(r);j.useInsertionEffect(()=>{i.current=r});const s=j.useRef(null);return j.useCallback(l=>{l&&e.onMount?.(l),t&&(l?t.mount(l):t.unmount());const c=i.current;if(typeof c=="function")if(l){const f=c(l);typeof f=="function"&&(s.current=f)}else s.current?(s.current(),s.current=null):c(l);else c&&(c.current=l)},[t])}const X8=j.createContext({});function _p(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function vue(e,t,r,i,s,l){const{visualElement:c}=j.useContext(v2),f=j.useContext(B8),d=j.useContext(eA),h=j.useContext(F8),m=h.reducedMotion,g=h.skipAnimations,v=j.useRef(null),w=j.useRef(!1);i=i||f.renderer,!v.current&&i&&(v.current=i(e,{visualState:t,parent:c,props:r,presenceContext:d,blockInitialAnimation:d?d.initial===!1:!1,reducedMotionConfig:m,skipAnimations:g,isSVG:l}),w.current&&v.current&&(v.current.manuallyAnimateOnMount=!0));const b=v.current,_=j.useContext(X8);b&&!b.projection&&s&&(b.type==="html"||b.type==="svg")&&bue(v.current,r,s,_);const x=j.useRef(!1);j.useInsertionEffect(()=>{b&&x.current&&b.update(r,d)});const R=r[a8],S=j.useRef(!!R&&!window.MotionHandoffIsComplete?.(R)&&window.MotionHasOptimisedAnimation?.(R));return gie(()=>{w.current=!0,b&&(x.current=!0,window.MotionIsMounted=!0,b.updateFeatures(),b.scheduleRenderMicrotask(),S.current&&b.animationState&&b.animationState.animateChanges())}),j.useEffect(()=>{b&&(!S.current&&b.animationState&&b.animationState.animateChanges(),S.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(R)}),S.current=!1),b.enteringChildren=void 0)}),b}function bue(e,t,r,i){const{layoutId:s,layout:l,drag:c,dragConstraints:f,layoutScroll:d,layoutRoot:h,layoutCrossfade:m}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:Q8(e.parent)),e.projection.setOptions({layoutId:s,layout:l,alwaysMeasureLayout:!!c||f&&_p(f),visualElement:e,animationType:typeof l=="string"?l:"both",initialPromotionConfig:i,crossfade:m,layoutScroll:d,layoutRoot:h})}function Q8(e){if(e)return e.options.allowProjection!==!1?e.projection:Q8(e.parent)}function P_(e,{forwardMotionProps:t=!1,type:r}={},i,s){i&&eue(i);const l=r?r==="svg":MA(e),c=l?mue:pue;function f(h,m){let g;const v={...j.useContext(F8),...h,layoutId:Sue(h)},{isStatic:w}=v,b=iue(h),_=c(h,w);if(!w&&S$){wue();const x=Eue(v);g=x.MeasureLayout,b.visualElement=vue(e,_,v,s,x.ProjectionNode,l)}return k.jsxs(v2.Provider,{value:b,children:[g&&b.visualElement?k.jsx(g,{visualElement:b.visualElement,...v}):null,fue(e,h,yue(_,b.visualElement,m),_,w,t,l)]})}f.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const d=j.forwardRef(f);return d[gue]=e,d}function Sue({layoutId:e}){const t=j.useContext(b$).id;return t&&e!==void 0?t+"-"+e:e}function wue(e,t){j.useContext(B8).strict}function Eue(e){const t=H8(),{drag:r,layout:i}=t;if(!r&&!i)return{};const s={...r,...i};return{MeasureLayout:r?.isEnabled(e)||i?.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function xue(e,t){if(typeof Proxy>"u")return P_;const r=new Map,i=(l,c)=>P_(l,c,e,t),s=(l,c)=>i(l,c);return new Proxy(s,{get:(l,c)=>c==="create"?i:(r.has(c)||r.set(c,P_(c,void 0,e,t)),r.get(c))})}const _ue=(e,t)=>t.isSVG??MA(e)?new sle(t):new tle(t,{allowProjection:e!==j.Fragment});class Tue extends pf{constructor(t){super(t),t.animationState||(t.animationState=dle(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();g2(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let Cue=0;class Oue extends pf{constructor(){super(...arguments),this.id=Cue++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const s=this.node.animationState.setActive("exit",!t);r&&!t&&s.then(()=>{r(this.id)})}mount(){const{register:t,onExitComplete:r}=this.node.presenceContext||{};r&&r(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Rue={animation:{Feature:Tue},exit:{Feature:Oue}};function t1(e){return{point:{x:e.pageX,y:e.pageY}}}const Aue=e=>t=>xA(t)&&e(t,t1(t));function Wv(e,t,r,i){return bb(e,t,Aue(r),i)}const W8=({current:e})=>e?e.ownerDocument.defaultView:null,lk=(e,t)=>Math.abs(e-t);function Mue(e,t){const r=lk(e.x,t.x),i=lk(e.y,t.y);return Math.sqrt(r**2+i**2)}const uk=new Set(["auto","scroll"]);class J8{constructor(t,r,{transformPagePoint:i,contextWindow:s=window,dragSnapToOrigin:l=!1,distanceThreshold:c=3,element:f}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=w=>{this.handleScroll(w.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=L_(this.lastMoveEventInfo,this.history),b=this.startEvent!==null,_=Mue(w.offset,{x:0,y:0})>=this.distanceThreshold;if(!b&&!_)return;const{point:x}=w,{timestamp:R}=fi;this.history.push({...x,timestamp:R});const{onStart:S,onMove:T}=this.handlers;b||(S&&S(this.lastMoveEvent,w),this.startEvent=this.lastMoveEvent),T&&T(this.lastMoveEvent,w)},this.handlePointerMove=(w,b)=>{this.lastMoveEvent=w,this.lastMoveEventInfo=I_(b,this.transformPagePoint),vr.update(this.updatePoint,!0)},this.handlePointerUp=(w,b)=>{this.end();const{onEnd:_,onSessionEnd:x,resumeAnimation:R}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&R&&R(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const S=L_(w.type==="pointercancel"?this.lastMoveEventInfo:I_(b,this.transformPagePoint),this.history);this.startEvent&&_&&_(w,S),x&&x(w,S)},!xA(t))return;this.dragSnapToOrigin=l,this.handlers=r,this.transformPagePoint=i,this.distanceThreshold=c,this.contextWindow=s||window;const d=t1(t),h=I_(d,this.transformPagePoint),{point:m}=h,{timestamp:g}=fi;this.history=[{...m,timestamp:g}];const{onSessionStart:v}=r;v&&v(t,L_(h,this.history)),this.removeListeners=Wb(Wv(this.contextWindow,"pointermove",this.handlePointerMove),Wv(this.contextWindow,"pointerup",this.handlePointerUp),Wv(this.contextWindow,"pointercancel",this.handlePointerUp)),f&&this.startScrollTracking(f)}startScrollTracking(t){let r=t.parentElement;for(;r;){const i=getComputedStyle(r);(uk.has(i.overflowX)||uk.has(i.overflowY))&&this.scrollPositions.set(r,{x:r.scrollLeft,y:r.scrollTop}),r=r.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const r=this.scrollPositions.get(t);if(!r)return;const i=t===window,s=i?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},l={x:s.x-r.x,y:s.y-r.y};l.x===0&&l.y===0||(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=l.x,this.lastMoveEventInfo.point.y+=l.y):this.history.length>0&&(this.history[0].x-=l.x,this.history[0].y-=l.y),this.scrollPositions.set(t,s),vr.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Wc(this.updatePoint)}}function I_(e,t){return t?{point:t(e.point)}:e}function ck(e,t){return{x:e.x-t.x,y:e.y-t.y}}function L_({point:e},t){return{point:e,delta:ck(e,eP(t)),offset:ck(e,jue(t)),velocity:kue(t,.1)}}function jue(e){return e[0]}function eP(e){return e[e.length-1]}function kue(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,i=null;const s=eP(e);for(;r>=0&&(i=e[r],!(s.timestamp-i.timestamp>jl(t)));)r--;if(!i)return{x:0,y:0};i===e[0]&&e.length>2&&s.timestamp-i.timestamp>jl(t)*2&&(i=e[1]);const l=ls(s.timestamp-i.timestamp);if(l===0)return{x:0,y:0};const c={x:(s.x-i.x)/l,y:(s.y-i.y)/l};return c.x===1/0&&(c.x=0),c.y===1/0&&(c.y=0),c}function Due(e,{min:t,max:r},i){return t!==void 0&&e<t?e=i?Kr(t,e,i.min):Math.max(e,t):r!==void 0&&e>r&&(e=i?Kr(r,e,i.max):Math.min(e,r)),e}function fk(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function Nue(e,{top:t,left:r,bottom:i,right:s}){return{x:fk(e.x,r,s),y:fk(e.y,t,i)}}function dk(e,t){let r=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,i]=[i,r]),{min:r,max:i}}function zue(e,t){return{x:dk(e.x,t.x),y:dk(e.y,t.y)}}function $ue(e,t){let r=.5;const i=to(e),s=to(t);return s>i?r=mb(t.min,t.max-i,e.min):i>s&&(r=mb(e.min,e.max-s,t.min)),zl(0,1,r)}function Pue(e,t){const r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}const WC=.35;function Iue(e=WC){return e===!1?e=0:e===!0&&(e=WC),{x:hk(e,"left","right"),y:hk(e,"top","bottom")}}function hk(e,t,r){return{min:pk(e,t),max:pk(e,r)}}function pk(e,t){return typeof e=="number"?e:e[t]||0}const Lue=new WeakMap;class Uue{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ma(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:r=!1,distanceThreshold:i}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const l=g=>{r&&this.snapToCursor(t1(g).point),this.stopAnimation()},c=(g,v)=>{const{drag:w,dragPropagation:b,onDragStart:_}=this.getProps();if(w&&!b&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Sse(w),!this.openDragLock))return;this.latestPointerEvent=g,this.latestPanInfo=v,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Sl(R=>{let S=this.getAxisMotionValue(R).get()||0;if(kl.test(S)){const{projection:T}=this.visualElement;if(T&&T.layout){const E=T.layout.layoutBox[R];E&&(S=to(E)*(parseFloat(S)/100))}}this.originPoint[R]=S}),_&&vr.update(()=>_(g,v),!1,!0),HC(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},f=(g,v)=>{this.latestPointerEvent=g,this.latestPanInfo=v;const{dragPropagation:w,dragDirectionLock:b,onDirectionLock:_,onDrag:x}=this.getProps();if(!w&&!this.openDragLock)return;const{offset:R}=v;if(b&&this.currentDirection===null){this.currentDirection=Vue(R),this.currentDirection!==null&&_&&_(this.currentDirection);return}this.updateAxis("x",v.point,R),this.updateAxis("y",v.point,R),this.visualElement.render(),x&&vr.update(()=>x(g,v),!1,!0)},d=(g,v)=>{this.latestPointerEvent=g,this.latestPanInfo=v,this.stop(g,v),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>{const{dragSnapToOrigin:g}=this.getProps();(g||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:m}=this.getProps();this.panSession=new J8(t,{onSessionStart:l,onStart:c,onMove:f,onSessionEnd:d,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,distanceThreshold:i,contextWindow:W8(this.visualElement),element:this.visualElement.current})}stop(t,r){const i=t||this.latestPointerEvent,s=r||this.latestPanInfo,l=this.isDragging;if(this.cancel(),!l||!s||!i)return;const{velocity:c}=s;this.startAnimation(c);const{onDragEnd:f}=this.getProps();f&&vr.postRender(()=>f(i,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,r,i){const{drag:s}=this.getProps();if(!i||!pS(t,s,this.currentDirection))return;const l=this.getAxisMotionValue(t);let c=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(c=Due(c,this.constraints[t],this.elastic[t])),l.set(c)}resolveConstraints(){const{dragConstraints:t,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,s=this.constraints;t&&_p(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=Nue(i.layoutBox,t):this.constraints=!1,this.elastic=Iue(r),s!==this.constraints&&!_p(t)&&i&&this.constraints&&!this.hasMutatedConstraints&&Sl(l=>{this.constraints!==!1&&this.getAxisMotionValue(l)&&(this.constraints[l]=Pue(i.layoutBox[l],this.constraints[l]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!_p(t))return!1;const i=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const l=Zse(i,s.root,this.visualElement.getTransformPagePoint());let c=zue(s.layout.layoutBox,l);if(r){const f=r(Gse(c));this.hasMutatedConstraints=!!f,f&&(c=w8(f))}return c}startAnimation(t){const{drag:r,dragMomentum:i,dragElastic:s,dragTransition:l,dragSnapToOrigin:c,onDragTransitionEnd:f}=this.getProps(),d=this.constraints||{},h=Sl(m=>{if(!pS(m,r,this.currentDirection))return;let g=d&&d[m]||{};c&&(g={min:0,max:0});const v=s?200:1e6,w=s?40:1e7,b={type:"inertia",velocity:i?t[m]:0,bounceStiffness:v,bounceDamping:w,timeConstant:750,restDelta:1,restSpeed:10,...l,...g};return this.startAxisValueAnimation(m,b)});return Promise.all(h).then(f)}startAxisValueAnimation(t,r){const i=this.getAxisMotionValue(t);return HC(this.visualElement,t),i.start(vA(t,i,0,r,this.visualElement,!1))}stopAnimation(){Sl(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const r=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps(),s=i[r];return s||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){Sl(r=>{const{drag:i}=this.getProps();if(!pS(r,i,this.currentDirection))return;const{projection:s}=this.visualElement,l=this.getAxisMotionValue(r);if(s&&s.layout){const{min:c,max:f}=s.layout.layoutBox[r],d=l.get()||0;l.set(t[r]-Kr(c,f,.5)+d)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!_p(r)||!i||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Sl(c=>{const f=this.getAxisMotionValue(c);if(f&&this.constraints!==!1){const d=f.get();s[c]=$ue({min:d,max:d},this.constraints[c])}});const{transformTemplate:l}=this.visualElement.getProps();this.visualElement.current.style.transform=l?l({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.constraints=!1,this.resolveConstraints(),Sl(c=>{if(!pS(c,t,null))return;const f=this.getAxisMotionValue(c),{min:d,max:h}=this.constraints[c];f.set(Kr(d,h,s[c]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Lue.set(this.visualElement,this);const t=this.visualElement.current,r=Wv(t,"pointerdown",h=>{const{drag:m,dragListener:g=!0}=this.getProps(),v=h.target,w=v!==t&&Cse(v);m&&g&&!w&&this.start(h)});let i;const s=()=>{const{dragConstraints:h}=this.getProps();_p(h)&&h.current&&(this.constraints=this.resolveRefConstraints(),i||(i=que(t,h.current,()=>this.scalePositionWithinConstraints())))},{projection:l}=this.visualElement,c=l.addEventListener("measure",s);l&&!l.layout&&(l.root&&l.root.updateScroll(),l.updateLayout()),vr.read(s);const f=bb(window,"resize",()=>this.scalePositionWithinConstraints()),d=l.addEventListener("didUpdate",(({delta:h,hasLayoutChanged:m})=>{this.isDragging&&m&&(Sl(g=>{const v=this.getAxisMotionValue(g);v&&(this.originPoint[g]+=h[g].translate,v.set(v.get()+h[g].translate))}),this.visualElement.render())}));return()=>{f(),r(),c(),d&&d(),i&&i()}}getProps(){const t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:i=!1,dragPropagation:s=!1,dragConstraints:l=!1,dragElastic:c=WC,dragMomentum:f=!0}=t;return{...t,drag:r,dragDirectionLock:i,dragPropagation:s,dragConstraints:l,dragElastic:c,dragMomentum:f}}}function mk(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function que(e,t,r){const i=_j(e,mk(r)),s=_j(t,mk(r));return()=>{i(),s()}}function pS(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function Vue(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}class Fue extends pf{constructor(t){super(t),this.removeGroupControls=cs,this.removeListeners=cs,this.controls=new Uue(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||cs}update(){const{dragControls:t}=this.node.getProps(),{dragControls:r}=this.node.prevProps||{};t!==r&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const U_=e=>(t,r)=>{e&&vr.update(()=>e(t,r),!1,!0)};class Bue extends pf{constructor(){super(...arguments),this.removePointerDownListener=cs}onPointerDown(t){this.session=new J8(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:W8(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:r,onPan:i,onPanEnd:s}=this.node.getProps();return{onSessionStart:U_(t),onStart:U_(r),onMove:U_(i),onEnd:(l,c)=>{delete this.session,s&&vr.postRender(()=>s(l,c))}}}mount(){this.removePointerDownListener=Wv(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let q_=!1;class Hue extends j.Component{componentDidMount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:i,layoutId:s}=this.props,{projection:l}=t;l&&(r.group&&r.group.add(l),i&&i.register&&s&&i.register(l),q_&&l.root.didUpdate(),l.addEventListener("animationComplete",()=>{this.safeToRemove()}),l.setOptions({...l.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),BS.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:r,visualElement:i,drag:s,isPresent:l}=this.props,{projection:c}=i;return c&&(c.isPresent=l,t.layoutDependency!==r&&c.setOptions({...c.options,layoutDependency:r}),q_=!0,s||t.layoutDependency!==r||r===void 0||t.isPresent!==l?c.willUpdate():this.safeToRemove(),t.isPresent!==l&&(l?c.promote():c.relegate()||vr.postRender(()=>{const f=c.getStack();(!f||!f.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),EA.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:i}=this.props,{projection:s}=t;q_=!0,s&&(s.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(s),i&&i.deregister&&i.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function tP(e){const[t,r]=Wle(),i=j.useContext(b$);return k.jsx(Hue,{...e,layoutGroup:i,switchLayoutGroup:j.useContext(X8),isPresent:t,safeToRemove:r})}const Gue={pan:{Feature:Bue},drag:{Feature:Fue,ProjectionNode:V8,MeasureLayout:tP}};function gk(e,t,r){const{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",r==="Start");const s="onHover"+r,l=i[s];l&&vr.postRender(()=>l(t,t1(t)))}class Kue extends pf{mount(){const{current:t}=this.node;t&&(this.unmount=Ese(t,(r,i)=>(gk(this.node,i,"Start"),s=>gk(this.node,s,"End"))))}unmount(){}}class Yue extends pf{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Wb(bb(this.node.current,"focus",()=>this.onFocus()),bb(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function yk(e,t,r){const{props:i}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap",r==="Start");const s="onTap"+(r==="End"?"":r),l=i[s];l&&vr.postRender(()=>l(t,t1(t)))}class Zue extends pf{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:r,propagate:i}=this.node.props;this.unmount=Rse(t,(s,l)=>(yk(this.node,l,"Start"),(c,{success:f})=>yk(this.node,c,f?"End":"Cancel")),{useGlobalTarget:r,stopPropagation:i?.tap===!1})}unmount(){}}const JC=new WeakMap,V_=new WeakMap,Xue=e=>{const t=JC.get(e.target);t&&t(e)},Que=e=>{e.forEach(Xue)};function Wue({root:e,...t}){const r=e||document;V_.has(r)||V_.set(r,{});const i=V_.get(r),s=JSON.stringify(t);return i[s]||(i[s]=new IntersectionObserver(Que,{root:e,...t})),i[s]}function Jue(e,t,r){const i=Wue(t);return JC.set(e,r),i.observe(e),()=>{JC.delete(e),i.unobserve(e)}}const ece={some:0,all:1};class tce extends pf{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:r,margin:i,amount:s="some",once:l}=t,c={root:r?r.current:void 0,rootMargin:i,threshold:typeof s=="number"?s:ece[s]},f=d=>{const{isIntersecting:h}=d;if(this.isInView===h||(this.isInView=h,l&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:m,onViewportLeave:g}=this.node.getProps(),v=h?m:g;v&&v(d)};return Jue(this.node.current,c,f)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:r}=this.node;["amount","margin","root"].some(nce(t,r))&&this.startObserver()}unmount(){}}function nce({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}const rce={inView:{Feature:tce},tap:{Feature:Zue},focus:{Feature:Yue},hover:{Feature:Kue}},ace={layout:{ProjectionNode:V8,MeasureLayout:tP}},ice={...Rue,...rce,...Gue,...ace},vk=xue(ice,_ue),nP=Ho.memo(({className:e})=>{const t=["M-380 -189C-380 -189 -312 216 152 343C616 470 684 875 684 875","M-373 -197C-373 -197 -305 208 159 335C623 462 691 867 691 867","M-366 -205C-366 -205 -298 200 166 327C630 454 698 859 698 859","M-359 -213C-359 -213 -291 192 173 319C637 446 705 851 705 851","M-352 -221C-352 -221 -284 184 180 311C644 438 712 843 712 843","M-345 -229C-345 -229 -277 176 187 303C651 430 719 835 719 835","M-338 -237C-338 -237 -270 168 194 295C658 422 726 827 726 827","M-331 -245C-331 -245 -263 160 201 287C665 414 733 819 733 819","M-324 -253C-324 -253 -256 152 208 279C672 406 740 811 740 811","M-317 -261C-317 -261 -249 144 215 271C679 398 747 803 747 803","M-310 -269C-310 -269 -242 136 222 263C686 390 754 795 754 795","M-303 -277C-303 -277 -235 128 229 255C693 382 761 787 761 787","M-296 -285C-296 -285 -228 120 236 247C700 374 768 779 768 779","M-289 -293C-289 -293 -221 112 243 239C707 366 775 771 775 771","M-282 -301C-282 -301 -214 104 250 231C714 358 782 763 782 763","M-275 -309C-275 -309 -207 96 257 223C721 350 789 755 789 755","M-268 -317C-268 -317 -200 88 264 215C728 342 796 747 796 747","M-261 -325C-261 -325 -193 80 271 207C735 334 803 739 803 739","M-254 -333C-254 -333 -186 72 278 199C742 326 810 731 810 731","M-247 -341C-247 -341 -179 64 285 191C749 318 817 723 817 723","M-240 -349C-240 -349 -172 56 292 183C756 310 824 715 824 715","M-233 -357C-233 -357 -165 48 299 175C763 302 831 707 831 707","M-226 -365C-226 -365 -158 40 306 167C770 294 838 699 838 699","M-219 -373C-219 -373 -151 32 313 159C777 286 845 691 845 691","M-212 -381C-212 -381 -144 24 320 151C784 278 852 683 852 683","M-205 -389C-205 -389 -137 16 327 143C791 270 859 675 859 675","M-198 -397C-198 -397 -130 8 334 135C798 262 866 667 866 667","M-191 -405C-191 -405 -123 0 341 127C805 254 873 659 873 659","M-184 -413C-184 -413 -116 -8 348 119C812 246 880 651 880 651","M-177 -421C-177 -421 -109 -16 355 111C819 238 887 643 887 643","M-170 -429C-170 -429 -102 -24 362 103C826 230 894 635 894 635","M-163 -437C-163 -437 -95 -32 369 95C833 222 901 627 901 627","M-156 -445C-156 -445 -88 -40 376 87C840 214 908 619 908 619","M-149 -453C-149 -453 -81 -48 383 79C847 206 915 611 915 611","M-142 -461C-142 -461 -74 -56 390 71C854 198 922 603 922 603","M-135 -469C-135 -469 -67 -64 397 63C861 190 929 595 929 595","M-128 -477C-128 -477 -60 -72 404 55C868 182 936 587 936 587","M-121 -485C-121 -485 -53 -80 411 47C875 174 943 579 943 579","M-114 -493C-114 -493 -46 -88 418 39C882 166 950 571 950 571","M-107 -501C-107 -501 -39 -96 425 31C889 158 957 563 957 563","M-100 -509C-100 -509 -32 -104 432 23C896 150 964 555 964 555","M-93 -517C-93 -517 -25 -112 439 15C903 142 971 547 971 547","M-86 -525C-86 -525 -18 -120 446 7C910 134 978 539 978 539","M-79 -533C-79 -533 -11 -128 453 -1C917 126 985 531 985 531","M-72 -541C-72 -541 -4 -136 460 -9C924 118 992 523 992 523","M-65 -549C-65 -549 3 -144 467 -17C931 110 999 515 999 515","M-58 -557C-58 -557 10 -152 474 -25C938 102 1006 507 1006 507","M-51 -565C-51 -565 17 -160 481 -33C945 94 1013 499 1013 499","M-44 -573C-44 -573 24 -168 488 -41C952 86 1020 491 1020 491","M-37 -581C-37 -581 31 -176 495 -49C959 78 1027 483 1027 483"];return k.jsx("div",{className:en("absolute h-full w-full inset-0 mask-size-[40px] mask-repeat-[no-repeat] flex items-center justify-center",e),children:k.jsxs("svg",{className:"z-0 h-full w-full pointer-events-none absolute",width:"100%",height:"100%",viewBox:"0 0 696 316",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[k.jsx("title",{children:"Background Beams"}),k.jsx("path",{d:"M-380 -189C-380 -189 -312 216 152 343C616 470 684 875 684 875M-373 -197C-373 -197 -305 208 159 335C623 462 691 867 691 867M-366 -205C-366 -205 -298 200 166 327C630 454 698 859 698 859M-359 -213C-359 -213 -291 192 173 319C637 446 705 851 705 851M-352 -221C-352 -221 -284 184 180 311C644 438 712 843 712 843M-345 -229C-345 -229 -277 176 187 303C651 430 719 835 719 835M-338 -237C-338 -237 -270 168 194 295C658 422 726 827 726 827M-331 -245C-331 -245 -263 160 201 287C665 414 733 819 733 819M-324 -253C-324 -253 -256 152 208 279C672 406 740 811 740 811M-317 -261C-317 -261 -249 144 215 271C679 398 747 803 747 803M-310 -269C-310 -269 -242 136 222 263C686 390 754 795 754 795M-303 -277C-303 -277 -235 128 229 255C693 382 761 787 761 787M-296 -285C-296 -285 -228 120 236 247C700 374 768 779 768 779M-289 -293C-289 -293 -221 112 243 239C707 366 775 771 775 771M-282 -301C-282 -301 -214 104 250 231C714 358 782 763 782 763M-275 -309C-275 -309 -207 96 257 223C721 350 789 755 789 755M-268 -317C-268 -317 -200 88 264 215C728 342 796 747 796 747M-261 -325C-261 -325 -193 80 271 207C735 334 803 739 803 739M-254 -333C-254 -333 -186 72 278 199C742 326 810 731 810 731M-247 -341C-247 -341 -179 64 285 191C749 318 817 723 817 723M-240 -349C-240 -349 -172 56 292 183C756 310 824 715 824 715M-233 -357C-233 -357 -165 48 299 175C763 302 831 707 831 707M-226 -365C-226 -365 -158 40 306 167C770 294 838 699 838 699M-219 -373C-219 -373 -151 32 313 159C777 286 845 691 845 691M-212 -381C-212 -381 -144 24 320 151C784 278 852 683 852 683M-205 -389C-205 -389 -137 16 327 143C791 270 859 675 859 675M-198 -397C-198 -397 -130 8 334 135C798 262 866 667 866 667M-191 -405C-191 -405 -123 0 341 127C805 254 873 659 873 659M-184 -413C-184 -413 -116 -8 348 119C812 246 880 651 880 651M-177 -421C-177 -421 -109 -16 355 111C819 238 887 643 887 643M-170 -429C-170 -429 -102 -24 362 103C826 230 894 635 894 635M-163 -437C-163 -437 -95 -32 369 95C833 222 901 627 901 627M-156 -445C-156 -445 -88 -40 376 87C840 214 908 619 908 619M-149 -453C-149 -453 -81 -48 383 79C847 206 915 611 915 611M-142 -461C-142 -461 -74 -56 390 71C854 198 922 603 922 603M-135 -469C-135 -469 -67 -64 397 63C861 190 929 595 929 595M-128 -477C-128 -477 -60 -72 404 55C868 182 936 587 936 587M-121 -485C-121 -485 -53 -80 411 47C875 174 943 579 943 579M-114 -493C-114 -493 -46 -88 418 39C882 166 950 571 950 571M-107 -501C-107 -501 -39 -96 425 31C889 158 957 563 957 563M-100 -509C-100 -509 -32 -104 432 23C896 150 964 555 964 555M-93 -517C-93 -517 -25 -112 439 15C903 142 971 547 971 547M-86 -525C-86 -525 -18 -120 446 7C910 134 978 539 978 539M-79 -533C-79 -533 -11 -128 453 -1C917 126 985 531 985 531M-72 -541C-72 -541 -4 -136 460 -9C924 118 992 523 992 523M-65 -549C-65 -549 3 -144 467 -17C931 110 999 515 999 515M-58 -557C-58 -557 10 -152 474 -25C938 102 1006 507 1006 507M-51 -565C-51 -565 17 -160 481 -33C945 94 1013 499 1013 499M-44 -573C-44 -573 24 -168 488 -41C952 86 1020 491 1020 491M-37 -581C-37 -581 31 -176 495 -49C959 78 1027 483 1027 483M-30 -589C-30 -589 38 -184 502 -57C966 70 1034 475 1034 475M-23 -597C-23 -597 45 -192 509 -65C973 62 1041 467 1041 467M-16 -605C-16 -605 52 -200 516 -73C980 54 1048 459 1048 459M-9 -613C-9 -613 59 -208 523 -81C987 46 1055 451 1055 451M-2 -621C-2 -621 66 -216 530 -89C994 38 1062 443 1062 443M5 -629C5 -629 73 -224 537 -97C1001 30 1069 435 1069 435M12 -637C12 -637 80 -232 544 -105C1008 22 1076 427 1076 427M19 -645C19 -645 87 -240 551 -113C1015 14 1083 419 1083 419",stroke:"url(#paint0_radial_242_278)",strokeOpacity:"0.05",strokeWidth:"0.5"}),t.map((r,i)=>k.jsx(vk.path,{d:r,stroke:`url(#linearGradient-${i})`,strokeOpacity:"0.4",strokeWidth:"0.5"},`path-${i}`)),k.jsxs("defs",{children:[t.map((r,i)=>k.jsxs(vk.linearGradient,{id:`linearGradient-${i}`,initial:{x1:"0%",x2:"0%",y1:"0%",y2:"0%"},animate:{x1:["0%","100%"],x2:["0%","95%"],y1:["0%","100%"],y2:["0%",`${93+Math.random()*8}%`]},transition:{duration:Math.random()*10+10,ease:"easeInOut",repeat:1/0,delay:0},children:[k.jsx("stop",{stopColor:"#000000",stopOpacity:"0"}),k.jsx("stop",{stopColor:"#111111"}),k.jsx("stop",{offset:"32.5%",stopColor:"#666666"}),k.jsx("stop",{offset:"100%",stopColor:"#FFFFFF",stopOpacity:"0"})]},`gradient-${i}`)),k.jsxs("radialGradient",{id:"paint0_radial_242_278",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(352 34) rotate(90) scale(555 1560.62)",children:[k.jsx("stop",{offset:"0.0666667",stopColor:"var(--neutral-300)"}),k.jsx("stop",{offset:"0.243243",stopColor:"var(--neutral-300)"}),k.jsx("stop",{offset:"0.43594",stopColor:"white",stopOpacity:"0"})]})]})]})})});nP.displayName="BackgroundBeams";const oce=()=>k.jsxs(k.Fragment,{children:[k.jsx(nP,{className:"absolute inset-0"}),k.jsx("div",{className:"relative z-10 flex-1 flex items-center justify-center",children:k.jsxs("div",{className:"text-center",children:[k.jsx("h1",{className:"text-2xl font-semibold text-foreground mb-2",children:"Welcome to Skybridge"}),k.jsx("p",{className:"text-sm text-muted-foreground",children:"Choose a tool from the sidebar to begin"})]})})]});function Rn(e){return typeof e!="object"||e===null||typeof e.lastModified=="number"&&typeof File<"u"&&e instanceof File||typeof e.getMonth=="function"&&typeof Date<"u"&&e instanceof Date?!1:!Array.isArray(e)}function sce(e){return e.additionalItems===!0&&console.warn("additionalItems=true is currently not supported"),Rn(e.additionalItems)}function bk(e){if(e==="")return;if(e===null)return null;if(/\.$/.test(e)||/\.0$/.test(e)||/\.\d*0$/.test(e))return e;const t=Number(e);return typeof t=="number"&&!Number.isNaN(t)?t:e}const uc="__additional_property",Aw="additionalProperties",ef="allOf",$n="anyOf",hs="const",b2="default",jA="dependencies",lce="enum",pi="__errors",or="$id",kA="if",cm="items",uce="_$junk_option_schema_id$_",HS="$name",pn="oneOf",eO="patternProperties",Un="properties",F_="readonly",rP="required",Mw="submitButtonOptions",br="$ref",qv="$schema",aP="root",iP="_",cce=["discriminator","propertyName"],Sk="formContext",fce="layoutGridLookupMap",DA="__rjsf_additionalProperties",oP="__rjsf_rootSchema",dce="ui:field",NA="ui:widget",Lc="ui:options",tO="ui:globalOptions",hce="https://json-schema.org/draft/2019-09/schema",GS="https://json-schema.org/draft/2020-12/schema";function kt(e={},t={}){return e?Object.keys(e).filter(r=>r.indexOf("ui:")===0).reduce((r,i)=>{const s=e[i];return i===NA&&Rn(s)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),r):i===Lc&&Rn(s)?{...r,...s}:{...r,[i.substring(3)]:s}},{...t}):{...t}}function sP(e,t={},r){if(!(e.additionalProperties||e.patternProperties))return!1;const{expandable:i=!0}=kt(t);return i===!1?i:e.maxProperties!==void 0&&r?Object.keys(r).length<e.maxProperties:!0}function nO(e){const t={[pi]:[],addError(r){this[pi].push(r)}};if(Array.isArray(e))return e.reduce((r,i,s)=>({...r,[s]:nO(i)}),t);if(Kc(e)){const r=e;return Object.keys(r).reduce((i,s)=>({...i,[s]:nO(r[s])}),t)}return t}function yr(e,t){return tY(e,t,(r,i)=>{if(typeof r=="function"&&typeof i=="function")return!0})}const pce=Object.prototype;function Vv(e){for(const t in e)if(pce.hasOwnProperty.call(e,t))return!1;return!0}const mce=["array","boolean","integer","null","number","object","string"];new Set(mce);const gce=["$defs","definitions","properties","patternProperties","dependencies"];new Set(gce);const yce=["items","allOf","oneOf","anyOf"];new Set(yce);const vce=["items","additionalItems","additionalProperties","propertyNames","contains","if","then","else","not"];new Set(vce);function KS(e){return typeof e=="object"}function xl(e){return KS(e)?Vv(e):e===!0}function Up(e,t){return e<t?-1:e>t?1:0}function B_(e,t){const r=e.length;if(r===0)return t;let i=t.length;if(i===0)return e;if(r<i){const l=e;e=t,t=l,i=r}const s=new Set(e);for(let l=0;l<i;l++)s.add(t[l]);return Array.from(s)}function bce(e,t){const r=[];if(e.length===0||t.length===0)return r;if(e.length>t.length){const s=e;e=t,t=s}const i=new Set(t);for(let s=0;s<e.length&&i.size>0;s++){const l=e[s];i.delete(l)&&r.push(l)}return r}function wk(e){return e.length===0}function H_(e){return(t,r)=>{const i=t.length-r.length;if(i!==0)return i;for(let s=0;s<t.length;s++)if(t[s]!==r[s]){const l=e(t[s],r[s]);if(l!==0)return l}return 0}}function lP(e,{threshold:t=12}={}){return r=>{const i=r.length;if(i===0)return r;if(i<=t){const c=[];let f=0;e:for(let d=0;d<i;d++){const h=r[d];for(let m=0;m<f;m++)if(e(h,c[m])===0)continue e;f=c.push(h)}return c}const s=r.slice().sort(e);let l=0;for(let c=1;c<i;c++)e(s[l],s[c])!==0&&++l!==c&&(s[l]=s[c]);return s.length=l+1,s}}function Sce(e){return(t,r)=>{const i=[];let s=t.length,l=r.length;if(s===0||l===0)return i;if(s>l){const m=t;t=r,r=m;const g=s;s=l,l=g}const c=[...t].sort(e),f=[...r].sort(e);let d=0,h=0;for(;d<s&&h<l;){const m=e(c[d],f[h]);m===0?((i.length===0||e(i[i.length-1],c[d])!==0)&&i.push(c[d]),d++,h++):m<0?d++:h++}return i}}function wce(e,t){return r=>{if(e.has(r))return e.get(r);const i=t(r);return e.set(r,i),i}}const Ek=wce,uP=()=>0,Ece=e=>e===void 0,xce=e=>typeof e!="object",xk={boolean:0,number:1,string:2};function _ce(e,t){const r=typeof e,i=typeof t;return r===i?Up(e,t):xk[r]-xk[i]}function Tce(e,t){const r=e.length;if(r===0)return t;const i=t.length;if(i===0)return e;if(i>r){const c=e;e=t,t=c}const s=new Set(e),l=t.length;for(let c=0;c<l;c++){const f=t[c];s.has(f)||e.push(f)}return e}function S2(e,t,r=uP){return(i,s)=>e(i)?e(s)?r(i,s):-1:e(s)?1:t(i,s)}function Tp(e){return S2(Ece,e)}function Ac(e,t){return S2(r=>r===void 0||e(r),t)}function G_(e,t){return S2(Array.isArray,e,t)}const ua=Tp(Up),K_=Ac(e=>e===0,(e,t)=>e-t);function Cce({deduplicationCache:e=new WeakMap,sortedKeysCache:t=new WeakMap}={}){const r=Ek(t,_=>Object.keys(_).sort());function i(_){return(x,R)=>{const S=r(x),T=r(R),E=Math.min(S.length,T.length);for(let O=0;O<E;O++){const C=Up(S[O],T[O]);if(C!==0)return C}if(S.length!==T.length)return S.length-T.length;for(let O=0;O<E;O++){const C=S[O],M=_(x[C],R[C]);if(M!==0)return M}return 0}}function s(_){const x=H_(_),R=Ek(e,lP(_,{threshold:0}));return(S,T)=>x(R(S),R(T))}const l=s(Up);function c(_,x){if(KS(_)){if(KS(x)){const R=Object.keys(_),S=Object.keys(x),T=Tce(R,S),E=T.length;for(let O=0;O<E;O++){const C=T[O];if(_[C]===x[C])continue;const D=(b[C]??f)(_[C],x[C]);if(D!==0)return D}return 0}return x===!0&&Vv(_)?0:1}return KS(x)?_===!0&&Vv(x)?0:-1:Up(_,x)}const f=Tp(h),d=S2(xce,G_(i(f),H_(h)),_ce);function h(_,x){return _===null?-1:x===null?1:d(_,x)}const m=Tp(c),g=Ac(Vv,i(m)),v=Tp(s(c)),w=Ac(xl,c),b={$id:ua,$comment:ua,$defs:g,$ref:ua,$schema:ua,const:f,contains:m,contentEncoding:ua,contentMediaType:ua,default:f,definitions:g,description:ua,else:m,examples:f,exclusiveMaximum:ua,exclusiveMinimum:ua,format:ua,if:m,maximum:ua,maxItems:ua,maxLength:ua,maxProperties:ua,minimum:ua,multipleOf:ua,not:m,pattern:ua,propertyNames:m,readOnly:ua,then:m,title:ua,writeOnly:ua,uniqueItems:Ac(_=>_===!1,uP),minLength:K_,minItems:K_,minProperties:K_,required:Ac(wk,l),enum:Ac(wk,s(h)),type:Tp((_,x)=>{const R=Array.isArray(_),S=Array.isArray(x);return!R&&!S?Up(_,x):l(R?_:[_],S?x:[x])}),items:Ac(_=>!Array.isArray(_)&&xl(_),G_(c,H_(c))),anyOf:v,allOf:v,oneOf:v,properties:g,patternProperties:g,additionalProperties:w,additionalItems:w,dependencies:Ac(Vv,i(Tp(G_(c,l))))};return{compareSchemaValues:h,compareSchemaDefinitions:c}}function _k(e){return e}const cP=(e,t)=>e?cP(t%e,e):t,Oce=(e,t)=>Math.abs(e*t)/cP(e,t);function Rce(e,t){return e===t?e:`^(?=.*(?:${e}))(?=.*(?:${t})).*$`}function*Y_(e,t,r){const i=e.length,s=t.length;if(i>0&&s>0)for(let l=0;l<i;l++){const c=e[l];for(let f=0;f<s;f++)yield r(c,t[f])}}function Z_(e,t){return e||t}function Tk(e){return(t,r)=>{const i={...t},s=Object.keys(r),l=s.length;for(let c=0;c<l;c++){const f=s[c];i[f]=t[f]===void 0?r[f]:e(t[f],r[f])}return i}}function Ace(e){const t=new Map;for(const r of e)for(const i of r[0])t.set(i,r[1]);return t}function Th(e,t,r){r===void 0||xl(r)?delete e[t]:e[t]=r}const Mce=["properties","patternProperties","additionalProperties"];function Ck(e){const t=Object.keys(e),r=t.length,i=[];for(let s=0;s<r;s++){const l=t[s];i.push({regExp:new RegExp(l),schema:e[l]})}return[i,t]}const Ok=[[],[]];function Rk(e,t,r){const i=r.length;for(let s=0;s<i;s++){const l=r[s];if(!l.regExp.test(t))continue;const c=l.schema;if(c===!1)return!0;e.push(c)}return!1}const jce=["items","additionalItems"],kce=["if","then","else"];function Ak(e,t){return t.if!==void 0&&(e.if=t.if),t.then!==void 0&&(e.then=t.then),t.else!==void 0&&(e.else=t.else),e}function X_(e,t){if(e===t)return e;switch(e){case"number":if(t==="integer")return"integer";case"integer":if(t==="number")return"integer";default:return}}function Ch(e,t,r){return[e,t,r]}function Dce(e){const t=new Map;for(const[r,i,s]of e){const l=c=>{if(!s(c))throw new Error(`Schema keys '${r}' and '${i}' are conflicting (${r}: ${JSON.stringify(c[r])}, ${i}: ${JSON.stringify(c[i])})`)};for(const c of[[r,i],[i,r]]){let f=t.get(c[0]);f===void 0&&(f=[],t.set(c[0],f)),f.push({oppositeKey:c[1],check:l})}}return t}const Nce=[Ch("minimum","maximum",e=>e.maximum>=e.minimum),Ch("exclusiveMinimum","maximum",e=>e.maximum>e.exclusiveMinimum),Ch("minimum","exclusiveMaximum",e=>e.exclusiveMaximum>e.minimum),Ch("exclusiveMinimum","exclusiveMaximum",e=>e.exclusiveMaximum>e.exclusiveMinimum),Ch("minLength","maxLength",e=>e.maxLength>=e.minLength),Ch("minItems","maxItems",e=>e.maxItems>=e.minItems),Ch("minProperties","maxProperties",e=>e.maxProperties>=e.minProperties)];function zce({mergePatterns:e=Rce,isSubRegExp:t=Object.is,intersectJson:r=bce,deduplicateJsonSchemaDef:i=_k,defaultMerger:s=_k,assigners:l=[],checks:c=Nce,mergers:f}={}){function d(E){const O=E.length;let C=E[0];for(let M=1;M<O;M++){const D=R(C,E[M]);if(D===!1)return!1;xl(D)||(C=D)}return C}function h(E,O,C,M,D,$,q){if(E.length=0,C===!1)return!1;if(E.push(C),D!==void 0){if(D===!1)return!1;E.push(D)}if(Rk(E,O,$))return!1;const V=E.length<2;if(q===!1){if(V)return;if(Rk(E,O,M))return!1}else V&&q!==void 0&&E.push(q);return E.length===1?E[0]:d(E)}function m(E,O,C,M,D,$){const q=C.length;if(q>0&&D!==!1)if($)Object.assign(E,O);else for(let L=0;L<q;L++){const V=C[L];M.has(V)||(E[V]=R(O[V],D))}return E}const g=(E,{properties:O={},patternProperties:C,additionalProperties:M=!0},{properties:D={},patternProperties:$,additionalProperties:q=!0})=>{const L=xl(M),V=xl(q);if(L&&V)return Th(E,"properties",S(O,D)),Th(E,"patternProperties",C&&$?S(C,$):C??$),delete E.additionalProperties,E;const F=R(M,q);Th(E,"additionalProperties",F);const re={},ae=Object.keys(O),K=ae.length,[B,Y]=C?Ck(C):Ok,[fe,se]=$?Ck($):Ok,N=[],I=new Set,U=V?void 0:q;for(let Ee=0;Ee<K;Ee++){const Oe=ae[Ee];I.add(Oe);const de=h(N,Oe,O[Oe],B,D[Oe],fe,U);de!==void 0&&(re[Oe]=de)}const P=Object.keys(D),G=P.length,ee=L?void 0:M;for(let Ee=0;Ee<G;Ee++){const Oe=P[Ee];if(I.has(Oe))continue;const de=h(N,Oe,D[Oe],fe,void 0,B,ee);de!==void 0&&(re[Oe]=de)}Th(E,"properties",re);let ue={};const ve=new Set;if(Y.length>0&&se.length>0){const Ee=Y_(Y,se,(Oe,de)=>{t(Oe,de)&&ve.add(Oe),t(de,Oe)&&ve.add(de),ue[e(Oe,de)]=R(C[Oe],$[de])});for(;!Ee.next().done;);}return ue=m(ue,C,Y,ve,q,V),ue=m(ue,$,se,ve,M,L),Th(E,"patternProperties",ue),E},v=(E,{items:O=[],additionalItems:C},{items:M=[],additionalItems:D})=>{const $=Array.isArray(O),q=Array.isArray(M),L=[];if(E.items=L,$&&q){const[V,F,re]=O.length<M.length?[O.length,C,M]:[M.length,D,O];let ae=0;for(;ae<V;ae++)L.push(R(O[ae],M[ae]));if(F===!1)E.additionalItems=!1;else{const K=F===void 0||xl(F);for(;ae<re.length;ae++)L.push(K?re[ae]:R(re[ae],F));Th(E,"additionalItems",C!==void 0&&D!==void 0?R(C,D):C??D)}}else if($||q){const[V,F,re]=$?[O,M,C]:[M,O,D];Th(E,"additionalItems",re&&R(re,F));for(let ae=0;ae<V.length;ae++)L.push(R(V[ae],F))}else delete E.additionalItems,E.items=R(O,M);return E},w=(E,O,C)=>{Ak(E,O);const M=Ak({},C);return E.allOf===void 0?E.allOf=[M]:E.allOf=E.allOf.concat(M),E};function b(E,O){return i(Array.from(Y_(E,O,R)))}const _=Ace([[Mce,g],[jce,v],[kce,w],...l]),x=Dce(c);function R(E,O){if(E===!1||O===!1)return!1;if(xl(E))return xl(O)?!0:O;if(xl(O))return E;let C={...E};const M=new Set,D=new Set,$=Object.keys(O),q=$.length;for(let L=0;L<q;L++){const V=$[L],F=O[V];if(F===void 0)continue;const re=x.get(V);if(re!==void 0){const Y=re.length;for(let fe=0;fe<Y;fe++){const se=re[fe];E[se.oppositeKey]!==void 0&&D.add(se.check)}}const ae=E[V];if(ae===void 0){C[V]=F;continue}const K=_.get(V);if(K){M.add(K);continue}const B=T[V]??s;C[V]=B(ae,F)}for(const L of M)C=L(C,E,O);for(const L of D)L(C);return C}const S=Tk(R),T={$id:s,$ref:s,$schema:s,$comment:s,$defs:S,definitions:S,type:(E,O)=>{if(E===O)return E;const C=Array.isArray(E),M=Array.isArray(O);if(!C&&!M){const D=X_(E,O);if(D!==void 0)return D}else if(C||M){const D=new Set;if(C&&M)for(const q of Y_(E,O,X_))q!==void 0&&D.add(q);else{const q=C?E:O,L=C?O:E,V=q.length;for(let F=0;F<V;F++){const re=X_(L,q[F]);re!==void 0&&D.add(re)}}const $=D.size;if($===1)return D.values().next().value;if($>1)return Array.from(D)}throw new Error(`It is not possible to create an intersection of the following incompatible types: ${E.toString()}, ${O.toString()}`)},default:s,description:s,title:s,const:s,format:s,contentEncoding:s,contentMediaType:s,not:(E,O)=>{const C=i([E,O]);return C.length===1?C[0]:{anyOf:C}},pattern:e,readOnly:Z_,writeOnly:Z_,enum:(E,O)=>{const C=r(E,O);if(C.length===0)throw new Error(`Intersection of the following enums is empty: "${JSON.stringify(E)}", "${JSON.stringify(O)}"`);return C},anyOf:b,oneOf:b,allOf:(E,O)=>i(E.concat(O)),propertyNames:R,contains:R,dependencies:Tk((E,O)=>Array.isArray(E)?Array.isArray(O)?B_(E,O):R(O,{required:E}):Array.isArray(O)?R(E,{required:O}):R(E,O)),examples:(E,O)=>{if(!Array.isArray(E)||!Array.isArray(O))throw new Error(`Value of the 'examples' field should be an array, but got "${JSON.stringify(E)}" and "${JSON.stringify(O)}"`);return B_(E,O)},multipleOf:(E,O)=>{let C=1;for(;!Number.isInteger(E)||!Number.isInteger(O);)C*=10,E*=10,O*=10;return Oce(E,O)/C},exclusiveMaximum:Math.min,maximum:Math.min,maxItems:Math.min,maxLength:Math.min,maxProperties:Math.min,exclusiveMinimum:Math.max,minimum:Math.max,minItems:Math.max,minLength:Math.max,minProperties:Math.max,uniqueItems:Z_,required:B_,...f};return{mergeSchemaDefinitions:R,mergeArrayOfSchemaDefinitions:d}}function $ce(e){const t=[],r=[e];for(;r.length>0;){const i=r.pop();if(typeof i=="boolean"||i.allOf===void 0){t.push(i);continue}const{allOf:s,...l}=i;t.push(l);for(let c=s.length-1;c>=0;c--)r.push(s[c])}return t}function Pce(e){return t=>e($ce(t))}var Mv={},Mk;function Ice(){if(Mk)return Mv;Mk=1;var e=/~/,t=/~[01]/g;function r(h){switch(h){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+h)}function i(h){return e.test(h)?h.replace(t,r):h}function s(h,m,g){for(var v,w,b=1,_=m.length;b<_;){if(m[b]==="constructor"||m[b]==="prototype"||m[b]==="__proto__")return h;if(v=i(m[b++]),w=_>b,typeof h[v]>"u"&&(Array.isArray(h)&&v==="-"&&(v=h.length),w&&(m[b]!==""&&m[b]<1/0||m[b]==="-"?h[v]=[]:h[v]={})),!w)break;h=h[v]}var x=h[v];return g===void 0?delete h[v]:h[v]=g,x}function l(h){if(typeof h=="string"){if(h=h.split("/"),h[0]==="")return h;throw new Error("Invalid JSON pointer.")}else if(Array.isArray(h)){for(const m of h)if(typeof m!="string"&&typeof m!="number")throw new Error("Invalid JSON pointer. Must be of type string or number.");return h}throw new Error("Invalid JSON pointer.")}function c(h,m){if(typeof h!="object")throw new Error("Invalid input object.");m=l(m);var g=m.length;if(g===1)return h;for(var v=1;v<g;){if(h=h[i(m[v++])],g===v)return h;if(typeof h!="object"||h===null)return}}function f(h,m,g){if(typeof h!="object")throw new Error("Invalid input object.");if(m=l(m),m.length===0)throw new Error("Invalid JSON pointer for set.");return s(h,m,g)}function d(h){var m=l(h);return{get:function(g){return c(g,m)},set:function(g,v){return f(g,m,v)}}}return Mv.get=c,Mv.set=f,Mv.compile=d,Mv}var Lce=Ice();const Q_=Il(Lce);var Uce=L9();const zA=Il(Uce);function jw(e,t){if(or in e&&zA.equal(e[or],t))return e;for(const r of Object.values(e))if(Array.isArray(r)){for(const i of r)if(In(i)){const s=jw(i,t);if(s!==void 0)return s}}else if(In(r)){const i=jw(r,t);if(i!==void 0)return i}}function rO(e,t){const r=Ve(e,or,t);br in e&&(e={...e,[br]:zA.resolve(r,e[br])});for(const[i,s]of Object.entries(e))Array.isArray(s)?e={...e,[i]:s.map(l=>In(l)?rO(l,r):l)}:In(s)&&(e={...e,[i]:rO(s,r)});return e}function $A(e,t){const r=t[e];return[fb(t,[e]),r]}function fP(e,t={},r=[],i=Ve(t,[or])){const s=e||"";let l;if(s.startsWith("#")){const f=decodeURIComponent(s.substring(1));i===void 0||or in t&&t[or]===i?l=Q_.get(t,f):t[qv]===GS&&(l=jw(t,i.replace(/\/$/,"")),l!==void 0&&(l=Q_.get(l,f)))}else if(t[qv]===GS){const f=i?zA.resolve(i,s):s,[d,...h]=f.replace(/#\/?$/,"").split("#");l=jw(t,d.replace(/\/$/,"")),l!==void 0&&(i=l[or],oa(h)||(l=Q_.get(l,decodeURIComponent(h.join("#")))))}if(l===void 0)throw new Error(`Could not find a definition for ${e}.`);const c=l[br];if(c){if(r.includes(c)){if(r.length===1)throw new Error(`Definition for ${e} is a circular reference`);const[m,...g]=r,v=[...g,s,m].join(" -> ");throw new Error(`Definition for ${m} contains a circular reference through ${v}`)}const[f,d]=$A(br,l),h=fP(d,t,[...r,s],i);return Object.keys(f).length>0?t[qv]===hce||t[qv]===GS?{[ef]:[f,h]}:{...f,...h}:h}return l}function dP(e,t={},r=Ve(t,[or])){return fP(e,t,[],r)}function $l(e){let t;const r=Ve(e,cce);return Yc(r)?t=r:r!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof r}" instead`),t}function Sb(e){return Array.isArray(e)?"array":typeof e=="string"?"string":e==null?"null":typeof e=="boolean"?"boolean":isNaN(e)?typeof e=="object"?"object":"string":"number"}function dl(e){let{type:t}=e;return!t&&e.const?Sb(e.const):!t&&e.enum?"string":!t&&(e.properties||e.additionalProperties||e.patternProperties)?"object":(Array.isArray(t)&&(t.length===2&&t.includes("null")?t=t.find(r=>r!=="null"):t=t[0]),t)}function hc(e,t){const r=Object.assign({},e);return Object.keys(t).reduce((i,s)=>{const l=e?e[s]:{},c=t[s];return e&&s in e&&Rn(c)?i[s]=hc(l,c):e&&t&&(dl(e)==="object"||dl(t)==="object")&&s===rP&&Array.isArray(l)&&Array.isArray(c)?i[s]=wY(l,c):i[s]=c,i},r)}function hP(e,t,r){var i;if(e&&r){const s=Ve(e,r);if(s===void 0)return;for(let l=0;l<t.length;l++){const c=t[l],f=Ve(c,[Un,r],{});if(!(f.type==="object"||f.type==="array")&&(f.const===s||!((i=f.enum)===null||i===void 0)&&i.includes(s)))return l}}}function PA(e,t,r,i,s){if(t===void 0)return 0;const l=hP(t,r,s);if(c6(l))return l;for(let c=0;c<r.length;c++){const f=r[c];if(s&&Mn(f,[Un,s])){const d=Ve(t,s),h=Ve(f,[Un,s],{});if(e.isValid(h,d,i))return c}else if(f[Un]){const d={anyOf:Object.keys(f[Un]).map(m=>({required:[m]}))};let h;if(f.anyOf){const{...m}=f;m.allOf?m.allOf=m.allOf.slice():m.allOf=[],m.allOf.push(d),h=m}else h=Object.assign({},f,d);if(delete h.required,e.isValid(h,t,i))return c}else if(e.isValid(f,t,i))return c}return 0}function yi(e,t,r={},i,s,l=!1){return Ol(e,t,r,i,void 0,void 0,s,l)[0]}function qce(e,t,r,i,s,l,c){const{if:f,then:d,else:h,...m}=t,g=e.isValid(f,l||{},r);let v=[m],w=[];if(i)d&&typeof d!="boolean"&&(w=w.concat(Ol(e,d,r,l,i,s,c))),h&&typeof h!="boolean"&&(w=w.concat(Ol(e,h,r,l,i,s,c)));else{const b=g?d:h;b&&typeof b!="boolean"&&(w=w.concat(Ol(e,b,r,l,i,s,c)))}return w.length&&(v=w.map(b=>hc(m,b))),v.flatMap(b=>Ol(e,b,r,l,i,s,c))}function pP(e){return e.reduce((r,i)=>i.length>1?i.flatMap(s=>p6(r.length,l=>[...r[l]].concat(s))):(r.forEach(s=>s.push(i[0])),r),[[]])}function mP(e,t){return Object.keys(e.patternProperties).filter(r=>RegExp(r).test(t)).reduce((r,i)=>(Gn(r,[i],e.patternProperties[i]),r),{})}function Vce(e,t,r,i,s,l,c,f){const d=gP(e,t,r,i,s,l,c,f);if(d.length>1||d[0]!==t)return d;if(jA in t)return yP(e,t,r,i,s,l,c).flatMap(m=>Ol(e,m,r,l,i,s,c));if(ef in t&&Array.isArray(t[ef])){const h=t.allOf.map(g=>Ol(e,g,r,l,i,s,c));return pP(h).map(g=>({...t,allOf:g}))}return[t]}function gP(e,t,r,i,s,l,c,f){const d=Gp(t,r,s,void 0,f);return d!==t?Ol(e,d,r,l,i,s,c,f):[t]}function Gp(e,t,r,i,s){if(!Rn(e))return e;let l=e;if(br in l){const{$ref:c,...f}=l;if(r.includes(c))return l;r.push(c),l={...dP(c,t,i),...f},or in l&&(i=l[or])}if(Un in l){const c=[],f=yY(l[Un],(d,h,m)=>{const g=[...r];d[m]=Gp(h,t,g,i,s),c.push(g)},{});rY(r,y6(IK(c))),l={...l,[Un]:f}}if(cm in l&&!Array.isArray(l.items)&&typeof l.items!="boolean"&&(l={...l,items:Gp(l.items,t,r,i,s)}),s){let c,f;$n in e&&Array.isArray(e[$n])?(c=$n,f=l[$n]):pn in e&&Array.isArray(e[pn])&&(c=pn,f=l[pn]),c&&f&&(l={...l,[c]:f.map(d=>Gp(d,t,r,i,s))})}return yr(e,l)?e:l}function Fce(e,t,r,i,s){const l={...t,properties:{...t.properties}},c=i&&Rn(i)?i:{};return Object.keys(c).forEach(f=>{if(!(f in l.properties)){if(eO in l){const d=mP(l,f);if(!oa(d)){l.properties[f]=yi(e,{[ef]:Object.values(d)},r,Ve(c,[f]),s),Gn(l.properties,[f,uc],!0);return}}if(Aw in l&&l.additionalProperties!==!1){let d;typeof l.additionalProperties!="boolean"?br in l.additionalProperties?d=yi(e,{[br]:Ve(l.additionalProperties,[br])},r,c,s):"type"in l.additionalProperties?d={...l.additionalProperties}:$n in l.additionalProperties||pn in l.additionalProperties?d={type:"object",...l.additionalProperties}:d={type:Sb(Ve(c,[f]))}:d={type:Sb(Ve(c,[f]))},l.properties[f]=d,Gn(l.properties,[f,uc],!0)}else l.properties[f]={type:"null"},Gn(l.properties,[f,uc],!0)}}),l}const{compareSchemaDefinitions:Bce,compareSchemaValues:Hce}=Cce(),{mergeArrayOfSchemaDefinitions:Gce}=zce({intersectJson:Sce(Hce),deduplicateJsonSchemaDef:lP(Bce)}),Kce=Pce(Gce);function Yce(e){return Kce(e)}function Ol(e,t,r,i,s=!1,l=[],c,f){return Rn(t)?Vce(e,t,r,s,l,i,c,f).flatMap(h=>{var m;let g=h;if(kA in g)return qce(e,g,r,s,l,i,c);if(ef in g){if(s){const{allOf:w,...b}=g;return[...w,b]}try{const w=[],b=[];(m=g.allOf)===null||m===void 0||m.forEach(_=>{typeof _=="object"&&_.contains?w.push(_):b.push(_)}),w.length&&(g={...g,allOf:b}),g=c?c(g):Yce(g),w.length&&(g.allOf=w)}catch(w){console.warn(`could not merge subschemas in allOf:
60
+ `,w);const{allOf:b,..._}=g;return _}}return Un in g&&eO in g&&(g=Object.keys(g.properties).reduce((w,b)=>{const _=mP(w,b);return oa(_)||(w.properties[b]=yi(e,{allOf:[w.properties[b],...Object.values(_)]},r,Ve(i,[b]),c)),w},{...g,properties:{...g.properties}})),eO in g||Aw in g&&g.additionalProperties!==!1?Fce(e,g,r,i,c):g}):[{}]}function Zce(e,t,r,i,s){let l;const{oneOf:c,anyOf:f,...d}=t;if(Array.isArray(c)?l=c:Array.isArray(f)&&(l=f),l){const h=s===void 0&&i?{}:s,m=$l(t);l=l.map(v=>Gp(v,r,[]));const g=PA(e,h,l,r,m);if(i)return l.map(v=>hc(d,v));t=hc(d,l[g])}return[t]}function yP(e,t,r,i,s,l,c){const{dependencies:f,...d}=t;return Zce(e,d,r,i,l).flatMap(m=>vP(e,f,m,r,i,s,l,c))}function vP(e,t,r,i,s,l,c,f){let d=[r];for(const h in t){if(!s&&Ve(c,[h])===void 0||r.properties&&!(h in r.properties))continue;const[m,g]=$A(h,t);return Array.isArray(g)?d[0]=Xce(r,g):Rn(g)&&(d=Qce(e,r,i,h,g,s,l,c,f)),d.flatMap(v=>vP(e,m,v,i,s,l,c,f))}return d}function Xce(e,t){if(!t)return e;const r=Array.isArray(e.required)?Array.from(new Set([...e.required,...t])):t;return{...e,required:r}}function Qce(e,t,r,i,s,l,c,f,d){return Ol(e,s,r,f,l,c,d).flatMap(m=>{const{oneOf:g,...v}=m;if(t=hc(t,v),g===void 0)return t;const w=g.map(_=>typeof _=="boolean"||!(br in _)?[_]:gP(e,_,r,l,c,f));return pP(w).flatMap(_=>Wce(e,t,r,i,_,l,c,f,d))})}function Wce(e,t,r,i,s,l,c,f,d){const h=s.filter(m=>{if(typeof m=="boolean"||!m||!m.properties)return!1;const{[i]:g}=m.properties;if(g){const v={type:"object",properties:{[i]:g}};return e.isValid(v,f,r)||l}return!1});return!l&&h.length!==1?(console.warn("ignoring oneOf in dependencies because there isn't exactly one subschema that is valid"),[t]):h.flatMap(m=>{const g=m,[v]=$A(i,g.properties),w={...g,properties:v};return Ol(e,w,r,f,l,c,d).map(_=>hc(t,_))})}function Fv(e,t,r,i,s,l={},c){if(Array.isArray(r[s])){const d=$l(r)||i,h=r[s].map(g=>yi(e,g,t,l,c)),m=Ve(l,d);if(m!==void 0)return h.find(g=>Pc(Ve(g,[Un,d,b2],Ve(g,[Un,d,hs])),m))}}function bP(e,t,r,i,s){let l=r;if(Mn(r,br)&&(l=yi(e,r,t,void 0,s)),oa(i))return l;const c=Array.isArray(i)?i:i.split("."),[f,...d]=c;if(f&&Mn(l,f))return l=Ve(l,f),bP(e,t,l,d,s)}function YS(e,t,r,i,s,l){const c=bP(e,t,r,i,l);return c===void 0?s:c}const jk={title:"!@#$_UNKNOWN_$#@!"};function Jce(e,t,r,i,s={},l){const c=Array.isArray(i)?[...i]:i.split(".");let f=r;const d=c.pop();c.length&&c.forEach(v=>{f=YS(e,t,f,[Un,v],{},l),Mn(f,pn)?f=Fv(e,t,f,d,pn,Ve(s,v),l):Mn(f,$n)&&(f=Fv(e,t,f,d,$n,Ve(s,v),l))}),Mn(f,pn)?f=Fv(e,t,f,d,pn,s,l):Mn(f,$n)&&(f=Fv(e,t,f,d,$n,s,l));let h=YS(e,t,f,[Un,d],jk,l);h===jk&&(h=void 0);const m=YS(e,t,f,rP,[],l);let g;return h&&Array.isArray(m)&&(g=m.includes(d)),{field:h,isRequired:g}}const efe={type:"object",$id:uce,properties:{__not_really_there__:{type:"number"}}};function aO(e,t,r,i,s){let l=0;return r&&(In(r.properties)?l+=hY(r.properties,(c,f,d)=>{const h=Ve(i,d);if(typeof f=="boolean")return c;if(Mn(f,br)){const m=yi(e,f,t,h,s);return c+aO(e,t,m,h||{},s)}if((Mn(f,pn)||Mn(f,$n))&&h){const m=Mn(f,pn)?pn:$n,g=$l(f);return c+wb(e,t,h,Ve(f,m),-1,g,s)}if(f.type==="object")return In(h)&&(c+=1),c+aO(e,t,f,h,s);if(f.type===Sb(h)){let m=c+1;return f.default?m+=h===f.default?1:-1:f.const&&(m+=h===f.const?1:-1),m}return c},0):Yc(r.type)&&r.type===Sb(i)&&(l+=1)),l}function wb(e,t,r,i,s=-1,l,c){const f=i.map(v=>Gp(v,t,[])),d=hP(r,i,l);if(c6(d))return d;const h=f.reduce((v,w,b)=>(PA(e,r,[efe,w],t,l)===1&&v.push(b),v),[]);if(h.length===1)return h[0];h.length||p6(f.length,v=>h.push(v));const m=new Set,{bestIndex:g}=h.reduce((v,w)=>{const{bestScore:b}=v,_=f[w],x=aO(e,t,_,r,c);return m.add(x),x>b?{bestIndex:w,bestScore:x}:v},{bestIndex:s,bestScore:0});return m.size===1&&s>=0?s:g}function IA(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every(t=>Rn(t))}function Eb(e,t,r=!1,i=!1,s=!1){if(Array.isArray(t)){const l=Array.isArray(e)?e:[],c=s?l:t,f=s?t:l,d=c.map((h,m)=>f[m]!==void 0?Eb(l[m],t[m],r,i,s):h);return(r||s)&&d.length<f.length&&d.push(...f.slice(d.length)),d}if(Rn(t)){const l=Object.assign({},e);return Object.keys(t).reduce((c,f)=>{var d;const h=Ve(t,f),m=Rn(e)&&f in e,g=f in t,v=(d=Ve(e,f))!==null&&d!==void 0?d:{},w=m&&Object.entries(v).some(([,x])=>Rn(x)),b=m&&Rn(Ve(e,f)),_=g&&Rn(h);return b&&_&&!w?(c[f]={...Ve(e,f),...h},c):(c[f]=Eb(Ve(e,f),h,r,i,s&&(m||!g)),c)},l)}return i&&(e!==void 0&&uw(t)||typeof t=="number"&&isNaN(t))||s&&!uw(t)?e:t}function xb(e,t,r=!1){return Object.keys(t).reduce((i,s)=>{const l=e?e[s]:{},c=t[s];if(e&&s in e&&Rn(c))i[s]=xb(l,c,r);else if(r&&Array.isArray(l)&&Array.isArray(c)){let f=c;r==="preventDuplicates"&&(f=c.reduce((d,h)=>(l.includes(h)||d.push(h),d),[])),i[s]=l.concat(f)}else i[s]=c;return i},Object.assign({},e))}function SP(e){return Array.isArray(e.enum)&&e.enum.length===1||hs in e}function LA(e,t,r={},i){const s=yi(e,t,r,void 0,i),l=s.oneOf||s.anyOf;return Array.isArray(s.enum)?!0:Array.isArray(l)?l.every(c=>typeof c!="boolean"&&SP(c)):!1}function UA(e,t,r,i){return!t.uniqueItems||!t.items||typeof t.items=="boolean"?!1:LA(e,t.items,r,i)}function wP(e){const t=e[hs],r=dl(e);return Rn(t)&&Yc(t?.$data)&&r!=="object"&&r!=="array"}function tfe(e){if(lce in e&&Array.isArray(e.enum)&&e.enum.length===1)return e.enum[0];if(hs in e)return e.const;throw new Error("schema cannot be inferred as a constant")}function fm(e,t){if(e.enum){let l;if(t){const{enumNames:c}=kt(t);l=c}return e.enum.map((c,f)=>({label:l?.[f]||String(c),value:c}))}let r,i;e.anyOf?(r=e.anyOf,i=t?.anyOf):e.oneOf&&(r=e.oneOf,i=t?.oneOf);let s=$l(e);if(t){const{optionsSchemaSelector:l=s}=kt(t);s=l}return r&&r.map((l,c)=>{const{title:f}=kt(i?.[c]),d=l;let h,m=f;if(s){const g=Ve(d,[Un,s],{});h=Ve(g,b2,Ve(g,hs)),m=m||g?.title||d.title||String(h)}else h=tfe(d),m=m||d.title||String(h);return{schema:d,label:m,value:h}})}const nfe=["string","number","integer","boolean","null"];var dm;(function(e){e[e.Ignore=0]="Ignore",e[e.Invert=1]="Invert",e[e.Fallback=2]="Fallback"})(dm||(dm={}));function W_(e,t=dm.Ignore,r=-1){if(r>=0){if(Array.isArray(e.items)&&r<e.items.length){const i=e.items[r];if(typeof i!="boolean")return i}}else if(e.items&&!Array.isArray(e.items)&&typeof e.items!="boolean")return e.items;return t!==dm.Ignore&&Rn(e.additionalItems)?e.additionalItems:{}}function EP(e,t){const{default:r,type:i}=e;return Array.isArray(i)&&i.includes("null")&&oa(t)&&r===null?null:t}function kk(e,t,r,i,s,l=[],c={},f=!1,d=!1){const{emptyObjectFields:h="populateAllDefaults"}=c;if(i===!0||f)e[t]=r;else if(i==="excludeObjectChildren")(d&&r!==void 0||!Rn(r)||!oa(r))&&(e[t]=r);else if(h!=="skipDefaults"){const m=s===void 0?l.includes(t):s;Rn(r)?h==="skipEmptyDefaults"?oa(r)||(e[t]=r):(!oa(r)||l.includes(t))&&(m||h!=="populateRequiredDefaults")&&(e[t]=r):r!==void 0&&(h==="populateAllDefaults"||h==="skipEmptyDefaults"||m&&l.includes(t))&&(e[t]=r)}}function Uc(e,t,r={}){const{parentDefaults:i,rawFormData:s,rootSchema:l={},includeUndefinedValues:c=!1,_recurseList:f=[],experimental_defaultFormStateBehavior:d=void 0,experimental_customMergeAllOf:h=void 0,required:m,shouldMergeDefaultsIntoFormData:g=!1,initialDefaultsGenerated:v}=r;let w=Rn(s)?s:{};const b=Rn(t)?t:{};let _=i,x=null,R=d,S=f;if(b[hs]!==void 0&&d?.constAsDefaults!=="never"&&!wP(b))_=b[hs];else if(Rn(_)&&Rn(b.default)&&!b[$n]&&!b[pn]&&!b[br])_=xb(_,b.default);else if(b2 in b&&!b[$n]&&!b[pn]&&!b[br])_=b.default;else if(br in b){const O=b[br];f.includes(O)||(S=f.concat(O),x=dP(O,l));const C=s===void 0||Rn(s)&&oa(s);x&&!_&&C&&(_=b.default),g&&x&&!Rn(s)&&(w=s)}else if(jA in b){const O={...Dk(e,b,r,_),...w};x=yP(e,b,l,!1,[],O,h)[0]}else if(IA(b))_=b.items.map((O,C)=>Uc(e,O,{rootSchema:l,includeUndefinedValues:c,_recurseList:f,experimental_defaultFormStateBehavior:d,experimental_customMergeAllOf:h,parentDefaults:Array.isArray(i)?i[C]:void 0,rawFormData:w,required:m,shouldMergeDefaultsIntoFormData:g}));else if(pn in b){const{oneOf:O,...C}=b;if(O.length===0)return;const M=$l(b),{type:D="null"}=C;!Array.isArray(D)&&nfe.includes(D)&&R?.constAsDefaults==="skipOneOf"&&(R={...R,constAsDefaults:"never"}),x=O[wb(e,l,s??b.default,O,0,M,h)],x=hc(C,x)}else if($n in b){const{anyOf:O,...C}=b;if(O.length===0)return;const M=$l(b);x=O[wb(e,l,s??b.default,O,0,M,h)],x=hc(C,x)}if(x)return Uc(e,x,{rootSchema:l,includeUndefinedValues:c,_recurseList:S,experimental_defaultFormStateBehavior:R,experimental_customMergeAllOf:h,parentDefaults:_,rawFormData:s??w,required:m,shouldMergeDefaultsIntoFormData:g,initialDefaultsGenerated:v});_===void 0&&(_=b.default);const T=Dk(e,b,r,_);let E=T??_;if(g){const{arrayMinItems:O={}}=d||{},{mergeExtraDefaults:C}=O,M=rfe(e,b,l,s,d,h);(!Rn(s)||ef in b)&&(E=Eb(E,M,C,!0))}return E}function rfe(e,t,r,i,s,l){const c=!SP(t)&&LA(e,t,r,l);let f=i;if(c){const h=fm(t);f=h?.some(g=>yr(g.value,i))?i:void 0}return t[hs]&&s?.constAsDefaults==="always"&&(f=t.const),f}function afe(e,t,{rawFormData:r,rootSchema:i={},includeUndefinedValues:s=!1,_recurseList:l=[],experimental_defaultFormStateBehavior:c=void 0,experimental_customMergeAllOf:f=void 0,required:d,shouldMergeDefaultsIntoFormData:h,initialDefaultsGenerated:m}={},g){{const v=Rn(r)?r:{},w=t,_=c?.allOf==="populateDefaults"&&ef in w||c?.emptyObjectFields!=="skipEmptyDefaults"&&kA in w?yi(e,w,i,v,f):w,x=_[hs],R=Object.keys(_.properties||{}).reduce((S,T)=>{var E;const O=Ve(_,[Un,T],{}),C=Rn(x)&&x[T]!==void 0,M=(Rn(O)&&hs in O||C)&&c?.constAsDefaults!=="never"&&!wP(O),D=Uc(e,O,{rootSchema:i,_recurseList:l,experimental_defaultFormStateBehavior:c,experimental_customMergeAllOf:f,includeUndefinedValues:s===!0,parentDefaults:Ve(g,[T]),rawFormData:Ve(v,[T]),required:(E=_.required)===null||E===void 0?void 0:E.includes(T),shouldMergeDefaultsIntoFormData:h,initialDefaultsGenerated:m});return kk(S,T,D,s,d,_.required,c,M,O?.type==="null"),S},{});if(_.additionalProperties&&!m){const S=Rn(_.additionalProperties)?_.additionalProperties:{},T=new Set;Rn(g)&&Object.keys(g).filter(O=>!_.properties||!_.properties[O]).forEach(O=>T.add(O));const E=[];Object.keys(v).filter(O=>!_.properties||!_.properties[O]).forEach(O=>{T.add(O),E.push(O)}),T.forEach(O=>{var C;const M=Uc(e,S,{rootSchema:i,_recurseList:l,experimental_defaultFormStateBehavior:c,experimental_customMergeAllOf:f,includeUndefinedValues:s===!0,parentDefaults:Ve(g,[O]),rawFormData:Ve(v,[O]),required:(C=_.required)===null||C===void 0?void 0:C.includes(O),shouldMergeDefaultsIntoFormData:h,initialDefaultsGenerated:m});kk(R,O,M,s,d,E)})}return EP(t,R)}}function ife(e,t,{rawFormData:r,rootSchema:i={},_recurseList:s=[],experimental_defaultFormStateBehavior:l=void 0,experimental_customMergeAllOf:c=void 0,required:f,requiredAsRoot:d=!1,shouldMergeDefaultsIntoFormData:h,initialDefaultsGenerated:m}={},g){var v,w;const b=t,_=(v=l?.arrayMinItems)!==null&&v!==void 0?v:{},{populate:x,mergeExtraDefaults:R}=_,S=x==="never",T=x==="requiredOnly",E=x==="all"||!S&&!T,O=(w=_?.computeSkipPopulate)!==null&&w!==void 0?w:(()=>!1),M=l?.emptyObjectFields==="skipEmptyDefaults"?void 0:[];if(Array.isArray(g)&&(g=g.map((L,V)=>{const F=W_(b,dm.Fallback,V),re=Array.isArray(r)?r[V]:void 0;return Uc(e,F,{rootSchema:i,_recurseList:s,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:c,parentDefaults:L,rawFormData:re,required:f,shouldMergeDefaultsIntoFormData:h,initialDefaultsGenerated:m})})),Array.isArray(r)){const L=W_(b);if(S)g=r;else{const V=r.map((re,ae)=>Uc(e,L,{rootSchema:i,_recurseList:s,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:c,rawFormData:re,parentDefaults:Ve(g,[ae]),required:f,shouldMergeDefaultsIntoFormData:h,initialDefaultsGenerated:m}));g=Eb(g,V,(T&&f||E)&&R)}}if((Rn(b)&&hs in b&&l?.constAsDefaults!=="never")===!1){if(S)return g??M;if(T&&!f)return g||void 0}let $;const q=Array.isArray(g)?g.length:0;if(!b.minItems||UA(e,b,i,c)||O(e,b,i)||b.minItems<=q)$=g||!f&&!d?g:M;else{const L=g||[],V=W_(b,dm.Invert),F=V.default,re=Array.from({length:b.minItems-q},()=>Uc(e,V,{parentDefaults:F,rootSchema:i,_recurseList:s,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:c,required:f,shouldMergeDefaultsIntoFormData:h}));$=L.concat(re)}return EP(t,$)}function Dk(e,t,r={},i){switch(dl(t)){case"object":return afe(e,t,r,i);case"array":return ife(e,t,r,i)}}function xP(e,t,r,i,s=!1,l,c,f){if(!Rn(t))throw new Error("Invalid schema: "+t);const d=yi(e,t,i,r,c),h=Uc(e,d,{rootSchema:i,includeUndefinedValues:s,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:c,rawFormData:r,shouldMergeDefaultsIntoFormData:!0,initialDefaultsGenerated:f,requiredAsRoot:!0});if(d.type!=="object"&&Rn(d.default))return{...h,...r};if(Rn(r)||Array.isArray(r)){const{mergeDefaultsIntoFormData:m}=l||{};return Eb(h,r,!0,m==="useDefaultIfFormDataUndefined",!0)}return h}function _P(e={}){return"widget"in kt(e)&&kt(e).widget!=="hidden"}function TP(e,t,r={},i,s){if(r[NA]==="files")return!0;if(t.items){const l=yi(e,t.items,i,void 0,s);return l.type==="string"&&l.format==="data-url"}return!1}function ofe(e,t,r={},i,s,l){const c=kt(r,s),{label:f=!0}=c;let d=!!f;if(d){const h=dl(t),m=Ve(t,uc,!1);h==="array"&&(d=m||UA(e,t,i,l)||TP(e,t,r,i,l)||_P(r)),h==="object"&&(d=m),h==="boolean"&&r&&!r[NA]&&(d=!1),r&&r[dce]&&(d=!1)}return d}function Ah(e,t,r,i,s,l=[],c){if(br in t||jA in t||ef in t||kA in t){const d=yi(e,t,i,s,c);if(l.findIndex(m=>yr(m,d))===-1)return Ah(e,d,r,i,s,l.concat(d),c)}let f={[HS]:r.replace(/^\./,"")};if(pn in t||$n in t){const d=pn in t?t.oneOf:t.anyOf,h=$l(t),m=wb(e,i,s,d,0,h,c),g=d[m];f={...f,...Ah(e,g,r,i,s,l,c)}}if(Aw in t&&t[Aw]!==!1&&Gn(f,DA,!0),cm in t&&Array.isArray(s)){const{items:d,additionalItems:h}=t;Array.isArray(d)?s.forEach((m,g)=>{d[g]?f[g]=Ah(e,d[g],`${r}.${g}`,i,m,l,c):h?f[g]=Ah(e,h,`${r}.${g}`,i,m,l,c):console.warn(`Unable to generate path schema for "${r}.${g}". No schema defined for it`)}):s.forEach((m,g)=>{f[g]=Ah(e,d,`${r}.${g}`,i,m,l,c)})}else if(Un in t)for(const d in t.properties){const h=Ve(t,[Un,d],{});f[d]=Ah(e,h,`${r}.${d}`,i,Ve(s,[d]),l,c)}return f}function CP(e,t,r="",i,s,l){return Ah(e,t,r,i,s,void 0,l)}function OP(e,t){if(t.length===0&&typeof e!="object")return e;const r=dR(e,t);return Array.isArray(e)?Object.keys(r).map(i=>r[i]):r}function RP(e,t){const r=(s,l)=>typeof s!="object"||oa(s)||l&&!oa(s),i=(s,l=[],c=[[]])=>{const f=Object.keys(s);return f.forEach(d=>{const h=s[d];if(typeof h=="object"){const m=c.map(g=>[...g,d]);h[DA]&&h[HS]!==""?l.push(h[HS]):i(h,l,m)}else d===HS&&h!==""&&c.forEach(m=>{const g=Ve(t,m),v=f.length===1;(r(g,v)||Array.isArray(g)&&g.every(w=>r(w,v)))&&l.push(m)})}),l};return i(e)}function sfe(e,t,r={},i){const s=yi(e,t,r,i),l=CP(e,s,"",r,i),f=RP(l,i).map(d=>Array.isArray(d)?d.join("."):d);return OP(i,f)}const vp=Symbol("no Value");function iO(e,t,r,i,s={},l){let c;if(Mn(r,Un)){const f={};if(Mn(i,Un)){const m=Ve(i,Un,{});Object.keys(m).forEach(g=>{Mn(s,g)&&(f[g]=void 0)})}const d=Object.keys(Ve(r,Un,{})),h={};d.forEach(m=>{const g=Ve(s,m);let v=Ve(i,[Un,m],{}),w=Ve(r,[Un,m],{});Mn(v,br)&&(v=yi(e,v,t,g,l)),Mn(w,br)&&(w=yi(e,w,t,g,l));const b=Ve(v,"type"),_=Ve(w,"type");if(!b||b===_)if(Mn(f,m)&&delete f[m],_==="object"||_==="array"&&Array.isArray(g)){const x=iO(e,t,w,v,g,l);(x!==void 0||_==="array")&&(h[m]=x)}else{const x=Ve(w,"default",vp),R=Ve(v,"default",vp);x!==vp&&x!==g&&(R===g?f[m]=x:Ve(w,"readOnly")===!0&&(f[m]=void 0));const S=Ve(w,"const",vp),T=Ve(v,"const",vp);S!==vp&&S!==g&&(f[m]=T===g?S:void 0)}}),c={...typeof s=="string"||Array.isArray(s)?void 0:s,...f,...h}}else if(Ve(i,"type")==="array"&&Ve(r,"type")==="array"&&Array.isArray(s)){let f=Ve(i,"items"),d=Ve(r,"items");if(typeof f=="object"&&typeof d=="object"&&!Array.isArray(f)&&!Array.isArray(d)){Mn(f,br)&&(f=yi(e,f,t,s,l)),Mn(d,br)&&(d=yi(e,d,t,s,l));const h=Ve(f,"type"),m=Ve(d,"type");if(!h||h===m){const g=Ve(r,"maxItems",-1);m==="object"?c=s.reduce((v,w)=>{const b=iO(e,t,d,f,w,l);return b!==void 0&&(g<0||v.length<g)&&v.push(b),v},[]):c=g>0&&s.length>g?s.slice(0,g):s}}else typeof f=="boolean"&&typeof d=="boolean"&&f===d&&(c=s)}return c}class lfe{constructor(t,r,i,s){r&&r[qv]===GS?this.rootSchema=rO(r,Ve(r,or,"#")):this.rootSchema=r,this.validator=t,this.experimental_defaultFormStateBehavior=i,this.experimental_customMergeAllOf=s}getRootSchema(){return this.rootSchema}getValidator(){return this.validator}doesSchemaUtilsDiffer(t,r,i={},s){return!t||!r?!1:this.validator!==t||!yr(this.rootSchema,r)||!yr(this.experimental_defaultFormStateBehavior,i)||this.experimental_customMergeAllOf!==s}findFieldInSchema(t,r,i){return Jce(this.validator,this.rootSchema,t,r,i,this.experimental_customMergeAllOf)}findSelectedOptionInXxxOf(t,r,i,s){return Fv(this.validator,this.rootSchema,t,r,i,s,this.experimental_customMergeAllOf)}getDefaultFormState(t,r,i=!1,s){return xP(this.validator,t,r,this.rootSchema,i,this.experimental_defaultFormStateBehavior,this.experimental_customMergeAllOf,s)}getDisplayLabel(t,r,i){return ofe(this.validator,t,r,this.rootSchema,i,this.experimental_customMergeAllOf)}getClosestMatchingOption(t,r,i,s){return wb(this.validator,this.rootSchema,t,r,i,s,this.experimental_customMergeAllOf)}getFirstMatchingOption(t,r,i){return PA(this.validator,t,r,this.rootSchema,i)}getFromSchema(t,r,i){return YS(this.validator,this.rootSchema,t,r,i,this.experimental_customMergeAllOf)}isFilesArray(t,r){return TP(this.validator,t,r,this.rootSchema,this.experimental_customMergeAllOf)}isMultiSelect(t){return UA(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}isSelect(t){return LA(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}omitExtraData(t,r){return sfe(this.validator,t,this.rootSchema,r)}retrieveSchema(t,r,i){return yi(this.validator,t,this.rootSchema,r,this.experimental_customMergeAllOf,i)}sanitizeDataForNewSchema(t,r,i){return iO(this.validator,this.rootSchema,t,r,i,this.experimental_customMergeAllOf)}toPathSchema(t,r,i){return CP(this.validator,t,r,this.rootSchema,i,this.experimental_customMergeAllOf)}}function ufe(e,t,r={},i){return new lfe(e,t,r,i)}function cfe(e){var t;if(e.indexOf("data:")===-1)throw new Error("File is invalid: URI must be a dataURI");const i=e.slice(5).split(";base64,");if(i.length!==2)throw new Error("File is invalid: dataURI must be base64");const[s,l]=i,[c,...f]=s.split(";"),d=c||"",h=decodeURI(((t=f.map(m=>m.split("=")).find(([m])=>m==="name"))===null||t===void 0?void 0:t[1])||"unknown");try{const m=atob(l),g=new Array(m.length);for(let w=0;w<m.length;w++)g[w]=m.charCodeAt(w);return{blob:new window.Blob([new Uint8Array(g)],{type:d}),name:h}}catch(m){throw new Error("File is invalid: "+m.message)}}function Mc(e,t){let r=String(e);for(;r.length<t;)r="0"+r;return r}function AP(e,t){if(e<=0&&t<=0)e=new Date().getFullYear()+e,t=new Date().getFullYear()+t;else if(e<0||t<0)throw new Error(`Both start (${e}) and stop (${t}) must both be <= 0 or > 0, got one of each`);if(e>t)return AP(t,e).reverse();const r=[];for(let i=e;i<=t;i++)r.push({value:i,label:Mc(i,2)});return r}function Nk(e,t){if(Object.is(e,t))return!0;if(e==null||t==null||typeof e!="object"||typeof t!="object")return!1;const r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(let s=0;s<r.length;s++){const l=r[s];if(!Object.prototype.hasOwnProperty.call(t,l)||!Object.is(e[l],t[l]))return!1}return!0}function ffe(e,t){let r=e;if(Array.isArray(t)){const i=r.split(/(%\d)/);t.forEach((s,l)=>{const c=i.findIndex(f=>f===`%${l+1}`);c>=0&&(i[c]=s)}),r=i.join("")}return r}function dfe(e,t){return ffe(e,t)}function Na(e,t=[],r){if(Array.isArray(e))return e.map(l=>Na(l,t)).filter(l=>l!==r);const i=e===""||e===null?-1:Number(e),s=t[i];return s?s.value:r}function MP(e,t,r=[]){const i=Na(e,r);return Array.isArray(t)?t.filter(s=>!yr(s,i)):yr(i,t)?void 0:t}function n1(e,t){return Array.isArray(t)?t.some(r=>yr(r,e)):yr(t,e)}function jP(e,t=[],r=!1){const i=t.map((s,l)=>n1(s.value,e)?String(l):void 0).filter(s=>typeof s<"u");return r?i:i[0]}function kP(e,t,r=[]){const i=Na(e,r);if(!uw(i)){const s=r.findIndex(f=>i===f.value),l=r.map(({value:f})=>f);return t.slice(0,s).concat(i,t.slice(s)).sort((f,d)=>+(l.indexOf(f)>l.indexOf(d)))}return t}class DP{constructor(t){this.errorSchema={},this.resetAllErrors(t)}get ErrorSchema(){return this.errorSchema}getOrCreateErrorBlock(t){let i=Array.isArray(t)&&t.length>0||typeof t=="string"?Ve(this.errorSchema,t):this.errorSchema;return!i&&t&&(i={},pY(this.errorSchema,t,i,Object)),i}resetAllErrors(t){return this.errorSchema=t?Fb(t):{},this}addErrors(t,r){const i=this.getOrCreateErrorBlock(r);let s=Ve(i,pi);return Array.isArray(s)||(s=[],i[pi]=s),Array.isArray(t)?Gn(i,pi,[...new Set([...s,...t])]):Gn(i,pi,[...new Set([...s,t])]),this}setErrors(t,r){const i=this.getOrCreateErrorBlock(r),s=Array.isArray(t)?[...new Set([...t])]:[t];return Gn(i,pi,s),this}clearErrors(t){const r=this.getOrCreateErrorBlock(t);return Gn(r,pi,[]),this}}function zk(e,t){const r=Kc(e),i=Kc(t);if(e===t||!r&&!i)return[];if(r&&!i)return ss(e);if(!r&&i)return ss(t);{const s=ss(cY(e,(c,f)=>!yr(c,Ve(t,f)))),l=zK(ss(t),ss(e));return[...s,...l]}}function hfe(e,t,r=[1900,new Date().getFullYear()+2],i="YMD"){const{day:s,month:l,year:c,hour:f,minute:d,second:h}=e,m={type:"day",range:[1,31],value:s},g={type:"month",range:[1,12],value:l},v={type:"year",range:r,value:c},w=[];switch(i){case"MDY":w.push(g,m,v);break;case"DMY":w.push(m,g,v);break;default:w.push(v,g,m)}return t&&w.push({type:"hour",range:[0,23],value:f},{type:"minute",range:[0,59],value:d},{type:"second",range:[0,59],value:h}),w}function NP(e){const t={};return e.multipleOf&&(t.step=e.multipleOf),(e.minimum||e.minimum===0)&&(t.min=e.minimum),(e.maximum||e.maximum===0)&&(t.max=e.maximum),t}function zP(e,t,r={},i=!0){const s={type:t||"text",...NP(e)};return r.inputType?s.type=r.inputType:t||(e.type==="number"?(s.type="number",i&&s.step===void 0&&(s.step="any")):e.type==="integer"&&(s.type="number",s.step===void 0&&(s.step=1))),r.autocomplete&&(s.autoComplete=r.autocomplete),r.accept&&(s.accept=r.accept),s}const $k={props:{disabled:!1},submitText:"Submit",norender:!1};function $P(e={}){const t=kt(e);if(t&&t[Mw]){const r=t[Mw];return{...$k,...r}}return $k}function Ut(e,t,r={}){const{templates:i}=t;if(e==="ButtonTemplates")return i[e];if(Object.hasOwn(r,e)&&typeof r[e]=="string"&&Object.hasOwn(i,r[e])){const s=r[e];return i[s]}return r[e]||i[e]}function qA(){if(typeof process>"u"||Ve(process,"env.NODE_ENV")!=="test")return{};const e=new Map;return new Proxy({},{get(t,r){return e.has(r)||e.set(r,v6("test-id-")),e.get(r)}})}var J_={exports:{}},Hn={};var Pk;function pfe(){if(Pk)return Hn;Pk=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),f=Symbol.for("react.server_context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),w=Symbol.for("react.offscreen"),b;b=Symbol.for("react.module.reference");function _(x){if(typeof x=="object"&&x!==null){var R=x.$$typeof;switch(R){case e:switch(x=x.type,x){case r:case s:case i:case h:case m:return x;default:switch(x=x&&x.$$typeof,x){case f:case c:case d:case v:case g:case l:return x;default:return R}}case t:return R}}}return Hn.ContextConsumer=c,Hn.ContextProvider=l,Hn.Element=e,Hn.ForwardRef=d,Hn.Fragment=r,Hn.Lazy=v,Hn.Memo=g,Hn.Portal=t,Hn.Profiler=s,Hn.StrictMode=i,Hn.Suspense=h,Hn.SuspenseList=m,Hn.isAsyncMode=function(){return!1},Hn.isConcurrentMode=function(){return!1},Hn.isContextConsumer=function(x){return _(x)===c},Hn.isContextProvider=function(x){return _(x)===l},Hn.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===e},Hn.isForwardRef=function(x){return _(x)===d},Hn.isFragment=function(x){return _(x)===r},Hn.isLazy=function(x){return _(x)===v},Hn.isMemo=function(x){return _(x)===g},Hn.isPortal=function(x){return _(x)===t},Hn.isProfiler=function(x){return _(x)===s},Hn.isStrictMode=function(x){return _(x)===i},Hn.isSuspense=function(x){return _(x)===h},Hn.isSuspenseList=function(x){return _(x)===m},Hn.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===r||x===s||x===i||x===h||x===m||x===w||typeof x=="object"&&x!==null&&(x.$$typeof===v||x.$$typeof===g||x.$$typeof===l||x.$$typeof===c||x.$$typeof===d||x.$$typeof===b||x.getModuleId!==void 0)},Hn.typeOf=_,Hn}var Ik;function mfe(){return Ik||(Ik=1,J_.exports=pfe()),J_.exports}var gfe=mfe();const Lk=Il(gfe),eT={boolean:{checkbox:"CheckboxWidget",radio:"RadioWidget",select:"SelectWidget",hidden:"HiddenWidget"},string:{text:"TextWidget",password:"PasswordWidget",email:"EmailWidget",hostname:"TextWidget",ipv4:"TextWidget",ipv6:"TextWidget",uri:"URLWidget","data-url":"FileWidget",radio:"RadioWidget",select:"SelectWidget",textarea:"TextareaWidget",hidden:"HiddenWidget",date:"DateWidget",datetime:"DateTimeWidget","date-time":"DateTimeWidget","alt-date":"AltDateWidget","alt-datetime":"AltDateTimeWidget",time:"TimeWidget",color:"ColorWidget",file:"FileWidget"},number:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},integer:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},array:{select:"SelectWidget",checkboxes:"CheckboxesWidget",files:"FileWidget",hidden:"HiddenWidget"}};function yfe(e){let t=Ve(e,"MergedWidget");if(!t){const r=e.defaultProps&&e.defaultProps.options||{};t=({options:i,...s})=>k.jsx(e,{options:{...r,...i},...s}),Gn(e,"MergedWidget",t)}return t}function Pl(e,t,r={}){const i=dl(e);if(typeof t=="function"||t&&Lk.isForwardRef(j.createElement(t))||Lk.isMemo(t))return yfe(t);if(typeof t!="string")throw new Error(`Unsupported widget definition: ${typeof t} in schema: ${JSON.stringify(e)}`);if(t in r){const s=r[t];return Pl(e,s,r)}if(typeof i=="string"){if(!(i in eT))throw new Error(`No widget for type '${i}' in schema: ${JSON.stringify(e)}`);if(t in eT[i]){const s=r[eT[i][t]];return Pl(e,s,r)}}throw new Error(`No widget '${t}' for type '${i}' in schema: ${JSON.stringify(e)}`)}function vfe(e){let t=0;for(let r=0;r<e.length;r+=1){const i=e.charCodeAt(r);t=(t<<5)-t+i,t=t&t}return t.toString(16)}function bfe(e){const t=new Set;return JSON.stringify(e,(r,i)=>(t.add(r),i)),JSON.stringify(e,Array.from(t).sort())}function Rl(e){return vfe(bfe(e))}function Sfe(e){return Rl(e)}function wfe(e,t,r={}){try{return Pl(e,t,r),!0}catch(i){const s=i;if(s.message&&(s.message.startsWith("No widget")||s.message.startsWith("Unsupported widget")))return!1;throw i}}function ip(e,t){return`${Yc(e)?e:e[or]}__${t}`}function op(e){return ip(e,"description")}function VA(e){return ip(e,"error")}function _b(e){return ip(e,"examples")}function FA(e){return ip(e,"help")}function w2(e){return ip(e,"title")}function co(e,t=!1){const r=t?` ${_b(e)}`:"";return`${VA(e)} ${op(e)} ${FA(e)}${r}`}function $h(e,t){return`${e}-${t}`}function Al(e,t){return ip(e,t)}function tT(e,t){return ip(e,`optional${t}`)}function zm(e){return!uw(e)&&(!In(e)||Array.isArray(e)||!oa(e))}function Efe(e,t){const{rootSchema:r,schemaUtils:i}=e;if(Pc(t,r))return!0;if(br in r){const s=i.retrieveSchema(r);return Pc(t,s)}return!1}function PP(e,t,r){return t?r:e}function xfe(e){return e?new Date(e).toJSON():void 0}function BA(e,t,r){const i=[fce];return Mn(e,Sk)&&i.unshift(Sk),Ve(e,[...i,t],r)}function _fe(e,t){if(!Array.isArray(t))return e;const r=m=>m.reduce((g,v)=>(g[v]=!0,g),{}),i=m=>m.length>1?`properties '${m.join("', '")}'`:`property '${m[0]}'`,s=r(e),l=t.filter(m=>m==="*"||s[m]),c=r(l),f=e.filter(m=>!c[m]),d=l.indexOf("*");if(d===-1){if(f.length)throw new Error(`uiSchema order list does not contain ${i(f)}`);return l}if(d!==l.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");const h=[...l];return h.splice(d,1,...f),h}function nT(e,t=!0){if(!e)return{year:-1,month:-1,day:-1,hour:t?-1:0,minute:t?-1:0,second:t?-1:0};const r=new Date(e);if(Number.isNaN(r.getTime()))throw new Error("Unable to parse date "+e);return{year:r.getUTCFullYear(),month:r.getUTCMonth()+1,day:r.getUTCDate(),hour:t?r.getUTCHours():0,minute:t?r.getUTCMinutes():0,second:t?r.getUTCSeconds():0}}function Jv(e){if(e.const||e.enum&&e.enum.length===1&&e.enum[0]===!0)return!0;if(e.anyOf&&e.anyOf.length===1)return Jv(e.anyOf[0]);if(e.oneOf&&e.oneOf.length===1)return Jv(e.oneOf[0]);if(e.allOf){const t=r=>Jv(r);return e.allOf.some(t)}return!1}function IP(e,t,r,i="customDeep"){if(i==="always")return!0;if(i==="shallow"){const{props:c,state:f}=e;return!Nk(c,t)||!Nk(f,r)}const{props:s,state:l}=e;return!yr(s,t)||!yr(l,r)}function Uk(e){const t=y6(e.map(r=>In(r)?dl(r):void 0).flat().filter(r=>r!==void 0));return t.length===1?t[0]:t}function r1(e,t,r,i){const{enableOptionalDataFieldForType:s=[]}=kt(i,e.globalUiOptions);let l;return $n in t&&Array.isArray(t[$n])?l=Uk(t[$n]):pn in t&&Array.isArray(t[pn])?l=Uk(t[pn]):l=dl(t),!Efe(e,t)&&!r&&!!l&&!Array.isArray(l)&&!!s.find(c=>c===l)}function qk(e,t=!0){const{year:r,month:i,day:s,hour:l=0,minute:c=0,second:f=0}=e,d=Date.UTC(r,i-1,s,l,c,f),h=new Date(d).toJSON();return t?h:h.slice(0,10)}function HA(e,t=[]){if(!e)return[];let r=[];return pi in e&&(r=r.concat(e[pi].map(i=>{const s=`.${t.join(".")}`;return{property:s,message:i,stack:`${s} ${i}`}}))),Object.keys(e).reduce((i,s)=>{if(s!==pi){const l=e[s];Kc(l)&&(i=i.concat(HA(l,[...t,s])))}return i},r)}function Tfe(e){const t=new DP;return e.length&&e.forEach(r=>{const{property:i,message:s}=r,l=i==="."?[]:m6(i);l.length>0&&l[0]===""&&l.splice(0,1),s&&t.addErrors(s,l)}),t.ErrorSchema}function ps(e,t,r,i){const s=Array.isArray(r)?r:r?.path,l=e===""?[]:[e],c=s?s.concat(...l):l,f=[t.idPrefix,...c].join(t.idSeparator);let d;return t.nameGenerator&&c.length>0&&(d=t.nameGenerator(c,t.idPrefix,i)),{path:c,[or]:f,...d!==void 0&&{name:d}}}function LP(e){return Object.keys(e).reduce((t,r)=>{if(r==="addError")return t;{const i=e[r];return Kc(i)?{...t,[r]:LP(i)}:{...t,[r]:i}}},{})}function Cfe(e){return Object.values(e).every(t=>t!==-1)}function Ofe(e){const{className:t="form-control",type:r,range:i,value:s,select:l,rootId:c,name:f,disabled:d,readonly:h,autofocus:m,registry:g,onBlur:v,onFocus:w}=e,b=`${c}_${r}`,{SelectWidget:_}=g.widgets,x=j.useCallback(R=>l(r,R),[l,r]);return k.jsx(_,{schema:{type:"integer"},id:b,name:f,className:t,options:{enumOptions:AP(i[0],i[1])},placeholder:r,value:s,disabled:d,readonly:h,autofocus:m,onChange:x,onBlur:v,onFocus:w,registry:g,label:"","aria-describedby":co(c)})}function Rfe(e){const{time:t=!1,disabled:r=!1,readonly:i=!1,options:s,onChange:l,value:c}=e,[f,d]=j.useState(nT(c,t));j.useEffect(()=>{d(nT(c,t))},[t,c]);const h=j.useCallback((w,b)=>{const _={...f,[w]:typeof b>"u"?-1:b};Cfe(_)?l(qk(_,t)):d(_)},[f,l,t]),m=j.useCallback(w=>{w.preventDefault(),!(r||i)&&l(void 0)},[r,i,l]),g=j.useCallback(w=>{if(w.preventDefault(),r||i)return;const b=nT(new Date().toJSON(),t);l(qk(b,t))},[r,i,t,l]);return{elements:j.useMemo(()=>hfe(f,t,s.yearsRange,s.format),[f,t,s.yearsRange,s.format]),handleChange:h,handleClear:m,handleSetNow:g}}function sp(e){const t=j.useRef(e);return Pc(e,t.current)||(t.current=e),t.current}function Afe(e,t){return e.replace(";base64",`;name=${encodeURIComponent(t)};base64`)}function Mfe(e){const{name:t,size:r,type:i}=e;return new Promise((s,l)=>{const c=new window.FileReader;c.onerror=l,c.onload=f=>{var d;typeof((d=f.target)===null||d===void 0?void 0:d.result)=="string"?s({dataURL:Afe(f.target.result,t),name:t,size:r,type:i}):s({dataURL:null,name:t,size:r,type:i})},c.readAsDataURL(e)})}function jfe(e){return Promise.all(Array.from(e).map(Mfe))}function Vk(e){return e.reduce((t,r)=>{if(!r)return t;try{const{blob:i,name:s}=cfe(r);return[...t,{dataURL:r,name:s,size:i.size,type:i.type}]}catch{return t}},[])}function kfe(e,t,r=!1){const i=j.useMemo(()=>r&&e?Array.isArray(e)?e:[e]:[],[e,r]),s=j.useMemo(()=>Array.isArray(e)?Vk(e):Vk([e||""]),[e]),l=j.useCallback(f=>{jfe(f).then(d=>{const h=d.map(m=>m.dataURL||null);t(r?i.concat(...h):h[0])})},[i,r,t]),c=j.useCallback(f=>{if(r){const d=i.filter((h,m)=>m!==f);t(d)}else t(void 0)},[i,r,t]);return{filesInfo:s,handleChange:l,handleRemove:c}}function Dfe(e){if(!e)return"";const t=new Date(e),r=Mc(t.getFullYear(),4),i=Mc(t.getMonth()+1,2),s=Mc(t.getDate(),2),l=Mc(t.getHours(),2),c=Mc(t.getMinutes(),2),f=Mc(t.getSeconds(),2),d=Mc(t.getMilliseconds(),3);return`${r}-${i}-${s}T${l}:${c}:${f}.${d}`}function ZS(e,t,r=!1){if(!t)return e;const{errors:i,errorSchema:s}=e;let l=HA(t),c=t;return oa(s)||(c=xb(s,t,r?"preventDuplicates":!0),l=[...i].concat(l)),{errorSchema:c,errors:l}}function Nfe(e){for(const t in e){const r=e,i=r[t];t===br&&typeof i=="string"&&i.startsWith("#")?r[t]=oP+i:r[t]=GA(i)}return e}function zfe(e){for(let t=0;t<e.length;t++)e[t]=GA(e[t]);return e}function GA(e){return Array.isArray(e)?zfe([...e]):In(e)?Nfe({...e}):e}var gn;(function(e){e.ArrayItemTitle="Item",e.MissingItems="Missing items definition",e.EmptyArray="No items yet. Use the button below to add some.",e.YesLabel="Yes",e.NoLabel="No",e.CloseLabel="Close",e.ErrorsLabel="Errors",e.NewStringDefault="New Value",e.AddButton="Add",e.AddItemButton="Add Item",e.CopyButton="Copy",e.MoveDownButton="Move down",e.MoveUpButton="Move up",e.RemoveButton="Remove",e.NowLabel="Now",e.ClearLabel="Clear",e.AriaDateLabel="Select a date",e.PreviewLabel="Preview",e.DecrementAriaLabel="Decrease value by 1",e.IncrementAriaLabel="Increase value by 1",e.OptionalObjectAdd="Add data for optional field",e.OptionalObjectRemove="Remove data for optional field",e.OptionalObjectEmptyMsg="No data for optional field",e.Type="Type",e.Value="Value",e.ClearButton="clear input",e.UnknownFieldType="Unknown field type %1",e.OptionPrefix="Option %1",e.TitleOptionPrefix="%1 option %2",e.KeyLabel="%1 Key",e.InvalidObjectField='Invalid "%1" object field configuration: _%2_.',e.UnsupportedField="Unsupported field schema.",e.UnsupportedFieldWithId="Unsupported field schema for field `%1`.",e.UnsupportedFieldWithReason="Unsupported field schema: _%1_.",e.UnsupportedFieldWithIdAndReason="Unsupported field schema for field `%1`: _%2_.",e.FilesInfo="**%1** (%2, %3 bytes)"})(gn||(gn={}));function oO(){return v6("rjsf-array-item-")}function Fk(e){return Array.isArray(e)?e.map(t=>({key:oO(),item:t})):[]}function UP(e){return Array.isArray(e)?e.map(t=>t.item):[]}function $fe(e){return Array.isArray(e.type)?!e.type.includes("null"):e.type!=="null"}function qP(e,t,r,i){let{addable:s}=kt(i,e.globalUiOptions);return s!==!1&&(t.maxItems!==void 0?s=r.length<t.maxItems:s=!0),s}function VP(e,t,r,i){if(typeof e.items=="function")try{return e.items(t,r,i)}catch(s){console.error(`Error executing dynamic uiSchema.items function for item at index ${r}:`,s);return}else return e.items}function Pfe(e,t){const{schemaUtils:r,globalFormOptions:i}=e;let s=t.items;return i.useFallbackUiForUnsupportedType&&!s?s={}:IA(t)&&sce(t)&&(s=t.additionalItems),r.getDefaultFormState(s)}function Ife(e){const{schema:t,fieldPathId:r,uiSchema:i,formData:s=[],disabled:l=!1,readonly:c=!1,autofocus:f=!1,required:d=!1,placeholder:h,onBlur:m,onFocus:g,registry:v,rawErrors:w,name:b,onSelectChange:_}=e,{widgets:x,schemaUtils:R,globalFormOptions:S,globalUiOptions:T}=v,E=R.retrieveSchema(t.items,s),O=fm(E,i),{widget:C="select",title:M,...D}=kt(i,T),$=Pl(t,C,x),q=M??t.title??b,L=R.getDisplayLabel(t,i,T),V=sp(ps("",S,r,!0));return k.jsx($,{id:V[or],name:b,multiple:!0,onChange:_,onBlur:m,onFocus:g,options:{...D,enumOptions:O},schema:t,uiSchema:i,registry:v,value:s,disabled:l,readonly:c,required:d,label:q,hideLabel:!L,placeholder:h,autofocus:f,rawErrors:w,htmlName:V.name})}function Lfe(e){const{schema:t,fieldPathId:r,uiSchema:i,disabled:s=!1,readonly:l=!1,autofocus:c=!1,required:f=!1,hideError:d,placeholder:h,onBlur:m,onFocus:g,formData:v=[],registry:w,rawErrors:b,name:_,onSelectChange:x}=e,{widgets:R,schemaUtils:S,globalFormOptions:T,globalUiOptions:E}=w,{widget:O,title:C,...M}=kt(i,E),D=Pl(t,O,R),$=C??t.title??_,q=S.getDisplayLabel(t,i,E),L=sp(ps("",T,r,!0));return k.jsx(D,{id:L[or],name:_,multiple:!0,onChange:x,onBlur:m,onFocus:g,options:M,schema:t,uiSchema:i,registry:w,value:v,disabled:s,readonly:l,hideError:d,required:f,label:$,hideLabel:!q,placeholder:h,autofocus:c,rawErrors:b,htmlName:L.name})}function Ufe(e){const{schema:t,uiSchema:r,fieldPathId:i,name:s,disabled:l=!1,readonly:c=!1,autofocus:f=!1,required:d=!1,onBlur:h,onFocus:m,registry:g,formData:v=[],rawErrors:w,onSelectChange:b}=e,{widgets:_,schemaUtils:x,globalFormOptions:R,globalUiOptions:S}=g,{widget:T="files",title:E,...O}=kt(r,S),C=Pl(t,T,_),M=E??t.title??s,D=x.getDisplayLabel(t,r,S),$=sp(ps("",R,i,!0));return k.jsx(C,{options:O,id:$[or],name:s,multiple:!0,onChange:b,onBlur:h,onFocus:m,schema:t,uiSchema:r,value:v,disabled:l,readonly:c,required:d,registry:g,autofocus:f,rawErrors:w,label:M,hideLabel:!D,htmlName:$.name})}function FP(e){const{itemKey:t,index:r,name:i,disabled:s,hideError:l,readonly:c,registry:f,uiOptions:d,parentUiSchema:h,canAdd:m,canRemove:g=!0,canMoveUp:v,canMoveDown:w,itemSchema:b,itemData:_,itemUiSchema:x,itemFieldPathId:R,itemErrorSchema:S,autofocus:T,onBlur:E,onFocus:O,onChange:C,rawErrors:M,totalItems:D,title:$,handleAddItem:q,handleCopyItem:L,handleRemoveItem:V,handleReorderItems:F}=e,{schemaUtils:re,fields:{ArraySchemaField:ae,SchemaField:K},globalUiOptions:B}=f,Y=sp(R),fe=ae||K,se=Ut("ArrayFieldItemTemplate",f,d),N=re.getDisplayLabel(b,x,B),{description:I}=kt(x),U=!!I||!!b.description,{orderable:P=!0,removable:G=!0,copyable:ee=!1}=d,ue={moveUp:P&&v,moveDown:P&&w,copy:ee&&m,remove:G&&g,toolbar:!1};ue.toolbar=Object.keys(ue).some(we=>ue[we]);const ve=j.useCallback(we=>{q(we,r+1)},[q,r]),Ee=j.useCallback(we=>{L(we,r)},[L,r]),Oe=j.useCallback(we=>{V(we,r)},[V,r]),de=j.useCallback(we=>{F(we,r,r-1)},[F,r]),te=j.useCallback(we=>{F(we,r,r+1)},[F,r]),Se={children:k.jsx(fe,{name:i,title:$,index:r,schema:b,uiSchema:x,formData:_,errorSchema:S,fieldPathId:Y,required:$fe(b),onChange:C,onBlur:E,onFocus:O,registry:f,disabled:s,readonly:c,hideError:l,autofocus:T,rawErrors:M}),buttonsProps:{fieldPathId:Y,disabled:s,readonly:c,canAdd:m,hasCopy:ue.copy,hasMoveUp:ue.moveUp,hasMoveDown:ue.moveDown,hasRemove:ue.remove,index:r,totalItems:D,onAddItem:ve,onCopyItem:Ee,onRemoveItem:Oe,onMoveUpItem:de,onMoveDownItem:te,registry:f,schema:b,uiSchema:x},itemKey:t,className:"rjsf-array-item",disabled:s,hasToolbar:ue.toolbar,index:r,totalItems:D,readonly:c,registry:f,schema:b,uiSchema:x,parentUiSchema:h,displayLabel:N,hasDescription:U};return k.jsx(se,{...Se})}function qfe(e){const{schema:t,uiSchema:r={},errorSchema:i,fieldPathId:s,formData:l,name:c,title:f,disabled:d=!1,readonly:h=!1,autofocus:m=!1,required:g=!1,hideError:v=!1,registry:w,onBlur:b,onFocus:_,rawErrors:x,onChange:R,keyedFormData:S,handleAddItem:T,handleCopyItem:E,handleRemoveItem:O,handleReorderItems:C}=e,M=t.title||f||c,{schemaUtils:D,fields:$,formContext:q,globalFormOptions:L,globalUiOptions:V}=w,{OptionalDataControlsField:F}=$,re=kt(r,V),ae=In(t.items)?t.items:{},K=D.retrieveSchema(ae),B=UP(S),Y=r1(w,t,g,r),fe=zm(l),se=qP(w,t,B,r)&&(!Y||fe),N=fe?S:[],I=Y?" rjsf-optional-array-field":"",U=e.childFieldPathId??s,P=Y?k.jsx(F,{...e,fieldPathId:U}):void 0,G={canAdd:se,items:N.map((ue,ve)=>{const{key:Ee,item:Oe}=ue,de=Oe,te=D.retrieveSchema(ae,de),Se=i?i[ve]:void 0,we=ps(ve,L,U),$e=VP(r,Oe,ve,q),Te={itemKey:Ee,index:ve,name:c&&`${c}-${ve}`,registry:w,uiOptions:re,hideError:v,readonly:h,disabled:d,required:g,title:M?`${M}-${ve+1}`:void 0,canAdd:se,canMoveUp:ve>0,canMoveDown:ve<B.length-1,itemSchema:te,itemFieldPathId:we,itemErrorSchema:Se,itemData:de,itemUiSchema:$e,autofocus:m&&ve===0,onBlur:b,onFocus:_,rawErrors:x,totalItems:S.length,handleAddItem:T,handleCopyItem:E,handleRemoveItem:O,handleReorderItems:C,onChange:R};return k.jsx(FP,{...Te},Ee)}),className:`rjsf-field rjsf-field-array rjsf-field-array-of-${K.type}${I}`,disabled:d,fieldPathId:s,uiSchema:r,onAddClick:T,readonly:h,required:g,schema:t,title:M,formData:B,rawErrors:x,registry:w,optionalDataControl:P},ee=Ut("ArrayFieldTemplate",w,re);return k.jsx(ee,{...G})}function Vfe(e){const{schema:t,uiSchema:r={},formData:i,errorSchema:s,fieldPathId:l,name:c,title:f,disabled:d=!1,readonly:h=!1,autofocus:m=!1,required:g=!1,hideError:v=!1,registry:w,onBlur:b,onFocus:_,rawErrors:x,keyedFormData:R,onChange:S,handleAddItem:T,handleCopyItem:E,handleRemoveItem:O,handleReorderItems:C}=e;let{formData:M=[]}=e;const D=t.title||f||c,{schemaUtils:$,fields:q,formContext:L,globalFormOptions:V,globalUiOptions:F}=w,re=kt(r,F),{OptionalDataControlsField:ae}=q,K=r1(w,t,g,r),B=zm(i),fe=(In(t.items)?t.items:[]).map((ve,Ee)=>$.retrieveSchema(ve,M[Ee])),se=In(t.additionalItems)?$.retrieveSchema(t.additionalItems,i):null,N=e.childFieldPathId??l;M.length<fe.length&&(M=M.concat(new Array(fe.length-M.length)));const I=B?R:[],U=K?" rjsf-optional-array-field":"",P=K?k.jsx(ae,{...e,fieldPathId:N}):void 0,G=qP(w,t,M,r)&&!!se&&(!K||B),ee={canAdd:G,className:`rjsf-field rjsf-field-array rjsf-field-array-fixed-items${U}`,disabled:d,fieldPathId:l,formData:i,items:I.map((ve,Ee)=>{const{key:Oe,item:de}=ve,te=de,Se=Ee>=fe.length,we=(Se&&In(t.additionalItems)?$.retrieveSchema(t.additionalItems,te):fe[Ee])||{},$e=ps(Ee,V,N);let Te;Se?Te=r.additionalItems:Array.isArray(r.items)?Te=r.items[Ee]:Te=VP(r,de,Ee,L);const Pe=s?s[Ee]:void 0,Ge={index:Ee,itemKey:Oe,name:c&&`${c}-${Ee}`,registry:w,uiOptions:re,hideError:v,readonly:h,disabled:d,required:g,title:D?`${D}-${Ee+1}`:void 0,canAdd:G,canRemove:Se,canMoveUp:Ee>=fe.length+1,canMoveDown:Se&&Ee<M.length-1,itemSchema:we,itemData:te,itemUiSchema:Te,itemFieldPathId:$e,itemErrorSchema:Pe,autofocus:m&&Ee===0,onBlur:b,onFocus:_,rawErrors:x,totalItems:R.length,onChange:S,handleAddItem:T,handleCopyItem:E,handleRemoveItem:O,handleReorderItems:C};return k.jsx(FP,{...Ge},Oe)}),onAddClick:T,readonly:h,required:g,registry:w,schema:t,uiSchema:r,title:D,errorSchema:s,rawErrors:x,optionalDataControl:P},ue=Ut("ArrayFieldTemplate",w,re);return k.jsx(ue,{...ee})}function Ffe(e=[]){const t=j.useMemo(()=>Rl(e),[e]),[r,i]=j.useState(()=>({formDataHash:t,keyedFormData:Fk(e)}));let{keyedFormData:s,formDataHash:l}=r;if(t!==l){const f=Array.isArray(e)?e:[],d=s||[];s=f.length===d.length?d.map((h,m)=>({key:h.key,item:f[m]})):Fk(f),l=t,i({formDataHash:l,keyedFormData:s})}const c=j.useCallback(f=>{const d=UP(f),h=Rl(d);return i({formDataHash:h,keyedFormData:f}),d},[]);return{keyedFormData:s,updateKeyedFormData:c}}function Bfe(e){const{schema:t,uiSchema:r,errorSchema:i,fieldPathId:s,registry:l,formData:c,onChange:f}=e,{globalFormOptions:d,schemaUtils:h,translateString:m}=l,{keyedFormData:g,updateKeyedFormData:v}=Ffe(c),w=e.childFieldPathId??s,b=j.useCallback((C,M)=>{C&&C.preventDefault();let D;if(i){D={};for(const L in i){const V=parseInt(L);M===void 0||V<M?Gn(D,[V],i[L]):V>=M&&Gn(D,[V+1],i[L])}}const $={key:oO(),item:Pfe(l,t)},q=[...g];M!==void 0?q.splice(M,0,$):q.push($),f(v(q),w.path,D)},[g,l,t,f,v,i,w]),_=j.useCallback((C,M)=>{C&&C.preventDefault();let D;if(i){D={};for(const L in i){const V=parseInt(L);V<=M?Gn(D,[V],i[L]):V>M&&Gn(D,[V+1],i[L])}}const $={key:oO(),item:Fb(g[M].item)},q=[...g];M!==void 0?q.splice(M+1,0,$):q.push($),f(v(q),w.path,D)},[g,f,v,i,w]),x=j.useCallback((C,M)=>{C&&C.preventDefault();let D;if(i){D={};for(const q in i){const L=parseInt(q);L<M?Gn(D,[L],i[q]):L>M&&Gn(D,[L-1],i[q])}}const $=g.filter((q,L)=>L!==M);f(v($),w.path,D)},[g,f,v,i,w]),R=j.useCallback((C,M,D)=>{C&&(C.preventDefault(),C.currentTarget.blur());let $;if(i){$={};for(const V in i){const F=parseInt(V);F==M?Gn($,[D],i[M]):F==D?Gn($,[M],i[D]):Gn($,[V],i[F])}}function q(){const V=g.slice();return V.splice(M,1),V.splice(D,0,g[M]),V}const L=q();f(v(L),w.path,$)},[g,f,v,i,w]),S=j.useCallback((C,M,D,$)=>{f(C===void 0?null:C,M,D,$)},[f]),T=j.useCallback(C=>{f(C,w.path,void 0,w?.[or])},[f,w]),E={...e,formData:c,fieldPathId:w,onSelectChange:T},O={...e,handleAddItem:b,handleCopyItem:_,handleRemoveItem:x,handleReorderItems:R,keyedFormData:g,onChange:S};if(!(cm in t)){if(!d.useFallbackUiForUnsupportedType){const M=kt(r),D=Ut("UnsupportedFieldTemplate",l,M);return k.jsx(D,{schema:t,fieldPathId:s,reason:m(gn.MissingItems),registry:l})}const C={...t,[cm]:{type:void 0}};E.schema=C,O.schema=C}return h.isMultiSelect(E.schema)?k.jsx(Ife,{...E}):_P(r)?k.jsx(Lfe,{...E}):IA(E.schema)?k.jsx(Vfe,{...O}):h.isFilesArray(E.schema,r)?k.jsx(Ufe,{...E}):k.jsx(qfe,{...O})}function Hfe(e){const{schema:t,name:r,uiSchema:i,fieldPathId:s,formData:l,registry:c,required:f,disabled:d,readonly:h,hideError:m,autofocus:g,title:v,onChange:w,onFocus:b,onBlur:_,rawErrors:x}=e,{title:R}=t,{widgets:S,translateString:T,globalUiOptions:E}=c,{widget:O="checkbox",title:C,label:M=!0,enumNames:D,...$}=kt(i,E),q=Pl(t,O,S),L=T(gn.YesLabel),V=T(gn.NoLabel);let F;const re=C??R??v??r;if(Array.isArray(t.oneOf))F=fm({oneOf:t.oneOf.map(K=>{if(In(K))return{...K,title:K.title||(K.const===!0?L:V)}}).filter(K=>K)},i);else{const K=t.enum??[!0,!1];!D&&K.length===2&&K.every(B=>typeof B=="boolean")?F=[{value:K[0],label:K[0]?L:V},{value:K[1],label:K[1]?L:V}]:F=fm({enum:K},i)}const ae=j.useCallback((K,B,Y)=>w(K,s.path,B,Y),[w,s]);return k.jsx(q,{options:{...$,enumOptions:F},schema:t,uiSchema:i,id:s.$id,name:r,onChange:ae,onFocus:b,onBlur:_,label:re,hideLabel:!M,value:l,required:f,disabled:d,readonly:h,hideError:m,registry:c,autofocus:g,rawErrors:x,htmlName:s.name})}function Gfe(e){return{type:"string",enum:["string","number","boolean","object","array"],default:"string",title:e}}function Kfe(e){const t=typeof e;return t==="string"||t==="number"||t==="boolean"?t:t==="object"?Array.isArray(e)?"array":"object":"string"}function Yfe(e,t){switch(t){case"string":return String(e);case"number":{const r=Number(e);return isNaN(r)?0:r}case"boolean":return!!e;default:return e}}function Zfe(e){const{id:t,formData:r,displayLabel:i=!0,schema:s,name:l,uiSchema:c,required:f,disabled:d=!1,readonly:h=!1,onBlur:m,onFocus:g,registry:v,fieldPathId:w,onChange:b,errorSchema:_}=e,{translateString:x,fields:R,globalFormOptions:S}=v,[T,E]=j.useState(Kfe(r)),O=kt(c),C=sp(ps("__internal_type_selector",S,w)),M=x(gn.Type),D=j.useMemo(()=>Gfe(M),[M]),$=V=>{V!=null&&(E(V),b(Yfe(r,V),w.path,_,t))};if(!S.useFallbackUiForUnsupportedType){const{reason:V=x(gn.UnknownFieldType,[String(s.type)])}=e,F=Ut("UnsupportedFieldTemplate",v,O);return k.jsx(F,{schema:s,fieldPathId:w,reason:V,registry:v})}const q=Ut("FallbackFieldTemplate",v,O),{SchemaField:L}=R;return k.jsx(q,{schema:s,registry:v,typeSelector:k.jsx(L,{fieldPathId:C,name:`${l}__fallback_type`,schema:D,formData:T,onChange:$,onBlur:m,onFocus:g,registry:v,hideLabel:!i,disabled:d,readonly:h,required:f},r?Rl(r):"__empty__"),schemaField:k.jsx(L,{...e,schema:{type:T,title:x(gn.Value),...T==="object"&&{additionalProperties:!0}}})})}var Ml;(function(e){e.ROW="ui:row",e.COLUMN="ui:col",e.COLUMNS="ui:columns",e.CONDITION="ui:condition"})(Ml||(Ml={}));var eb;(function(e){e.ALL="all",e.SOME="some",e.NONE="none"})(eb||(eb={}));const Xfe=/^\$lookup=(.+)/,rT="layoutGrid";function Bk(e,t){return e??t}function Qfe(e){return/^\d+?$/.test(e)}const qc=qA();function Wfe(e,t,r,i,s){const l=Ve(r,[tO],{}),c=Ve(r,e),f={...Ve(c,[Lc],{}),...t,...l},d={...c};oa(f)||Gn(d,[Lc],f),oa(l)||Gn(d,[tO],l);let{readonly:h}=kt(d);return(s===!0||f6(h)&&i===!0)&&(h=!0,Mn(f,F_)?Gn(d,[Lc,F_],!0):Gn(d,`ui:${F_}`,!0)),{fieldUiSchema:d,uiReadonly:h}}function Jfe(e,t,r="$0m3tH1nG Un3xP3cT3d"){const i=nC([t]).sort(),s=nC([r]).sort();switch(e){case eb.ALL:return Pc(i,s);case eb.SOME:return r3(i,s).length>0;case eb.NONE:return r3(i,s).length===0;default:return!1}}function E2(e,t,r){let i={},s=e[t];if(Kc(s)){const{children:l,className:c,...f}=s;if(s=l,c){const h=c.split(" ").map(m=>BA(r,m,m)).join(" ");i={...f,className:h}}else i=f}if(!Array.isArray(s))throw new TypeError(`Expected array for "${t}" in ${JSON.stringify(e)}`);return{children:s,gridProps:i}}function Hk(e,t,r){let i;if(Qfe(r)&&e&&e?.type==="array"&&Mn(e,cm)){const s=Number(r),l=e[cm];Array.isArray(l)?s>l.length?i=l6(l):i=l[s]:i=l,t={[or]:t[or],path:[...t.path.slice(0,t.path.length-1),s]}}return{rawSchema:i,fieldPathId:t}}function ede(e,t,r,i,s){const{schemaUtils:l,globalFormOptions:c}=e;let f=r,d=s;const h=t.split("."),m=h.pop();let g=l.retrieveSchema(f,i),v=i,w=g.readOnly;h.forEach(x=>{if(d=ps(x,c,d),Mn(g,Un))f=Ve(g,[Un,x],{});else if(g&&(Mn(g,pn)||Mn(g,$n))){const R=Mn(g,pn)?pn:$n,S=l.findSelectedOptionInXxxOf(g,x,R,v);f=Ve(S,[Un,x],{})}else{const R=Hk(g,d,x);f=R.rawSchema??{},d=R.fieldPathId}v=Ve(v,x,{}),g=l.retrieveSchema(f,v),w=Bk(g.readOnly,w)});let b,_=!1;if(oa(g)&&(g=void 0),g&&m){if(g&&(Mn(g,pn)||Mn(g,$n))){const R=Mn(g,pn)?pn:$n;g=l.findSelectedOptionInXxxOf(g,m,R,v)}d=ps(m,c,d),_=g!==void 0&&Array.isArray(g.required)&&GK(g.required,m);const x=Hk(g,d,m);if(x.rawSchema?(g=x.rawSchema,d=x.fieldPathId):(g=Ve(g,[Un,m]),g=g&&l.retrieveSchema(g)),w=Bk(g?.readOnly,w),g&&(Mn(g,pn)||Mn(g,$n))){const R=Mn(g,pn)?pn:$n,S=$l(g);b={options:g[R],hasDiscriminator:!!S}}}return{schema:g,isRequired:_,isReadonly:w,optionsInfo:b,fieldPathId:d}}function tde(e,t){let r=e;return Yc(r)&&(r=BA(t,r)),Pb(r)?r:null}function nde(e,t){let r,i=null,s={},l;if(Yc(t)||f6(t))r=t??"";else{const{name:c="",render:f,...d}=t;r=c,s=d,oa(s)||$K(s,(h,m)=>{if(Yc(h)){const g=Xfe.exec(h);if(Array.isArray(g)&&g.length>1){const v=g[1];s[m]=BA(e,v,v)}}}),i=tde(f,e),!c&&i&&(l=k.jsx(i,{...d,"data-testid":qc.uiComponent}))}return{name:r,UIComponent:i,uiProps:s,rendered:l}}function x2(e){const{childrenLayoutGridSchemaId:t,...r}=e,{registry:i,schema:s,formData:l}=r,{schemaUtils:c}=i,f=c.retrieveSchema(s,l);return t.map(d=>j.createElement(KA,{...r,key:`layoutGrid-${Rl(d)}`,schema:f,layoutGridSchema:d}))}function rde(e){const{layoutGridSchema:t,...r}=e,{formData:i,registry:s}=r,{children:l,gridProps:c}=E2(t,Ml.CONDITION,s),{operator:f,field:d="",value:h}=c,m=Ve(i,d,null);return Jfe(f,m,h)?k.jsx(x2,{...r,childrenLayoutGridSchemaId:l}):null}function ade(e){const{layoutGridSchema:t,...r}=e,{registry:i,uiSchema:s}=r,{children:l,gridProps:c}=E2(t,Ml.COLUMN,i),f=kt(s),d=Ut("GridTemplate",i,f);return k.jsx(d,{column:!0,"data-testid":qc.col,...c,children:k.jsx(x2,{...r,childrenLayoutGridSchemaId:l})})}function ide(e){const{layoutGridSchema:t,...r}=e,{registry:i,uiSchema:s}=r,{children:l,gridProps:c}=E2(t,Ml.COLUMNS,i),f=kt(s),d=Ut("GridTemplate",i,f);return l.map(h=>k.jsx(d,{column:!0,"data-testid":qc.col,...c,children:k.jsx(x2,{...r,childrenLayoutGridSchemaId:[h]})},`column-${Rl(h)}`))}function ode(e){const{layoutGridSchema:t,...r}=e,{registry:i,uiSchema:s}=r,{children:l,gridProps:c}=E2(t,Ml.ROW,i),f=kt(s),d=Ut("GridTemplate",i,f);return k.jsx(d,{...c,"data-testid":qc.row,children:k.jsx(x2,{...r,childrenLayoutGridSchemaId:l})})}function sde(e){const{gridSchema:t,schema:r,uiSchema:i,errorSchema:s,fieldPathId:l,onBlur:c,onFocus:f,formData:d,readonly:h,registry:m,layoutGridSchema:g,...v}=e,{onChange:w}=v,{fields:b}=m,{SchemaField:_,LayoutMultiSchemaField:x}=b,R=nde(m,t),{name:S,UIComponent:T,uiProps:E}=R,{schema:O,isRequired:C,isReadonly:M,optionsInfo:D,fieldPathId:$}=ede(m,S,r,d,l),q=sp($);if(R.rendered)return R.rendered;if(O){const L=D?.hasDiscriminator?x:_,{fieldUiSchema:V,uiReadonly:F}=Wfe(S,E,i,M,h);return k.jsx(L,{"data-testid":D?.hasDiscriminator?qc.layoutMultiSchemaField:qc.field,...v,name:S,required:C,readonly:F,schema:O,uiSchema:V,errorSchema:Ve(s,S),fieldPathId:q,formData:Ve(d,S),onChange:w,onBlur:c,onFocus:f,options:D?.options,registry:m})}return T?k.jsx(T,{"data-testid":qc.uiComponent,...v,name:S,required:C,formData:d,readOnly:!!M||h,errorSchema:s,uiSchema:i,schema:r,fieldPathId:l,onBlur:c,onFocus:f,registry:m,...E}):null}function KA(e){const{uiSchema:t}=e;let{layoutGridSchema:r}=e;const i=kt(t);if(!r&&rT in i&&In(i[rT])&&(r=i[rT]),In(r)){if(Ml.ROW in r)return k.jsx(ode,{...e,layoutGridSchema:r});if(Ml.COLUMN in r)return k.jsx(ade,{...e,layoutGridSchema:r});if(Ml.COLUMNS in r)return k.jsx(ide,{...e,layoutGridSchema:r});if(Ml.CONDITION in r)return k.jsx(rde,{...e,layoutGridSchema:r})}return k.jsx(sde,{...e,gridSchema:r})}KA.TEST_IDS=qc;function lde(e){const{fieldPathId:t,title:r,schema:i,uiSchema:s,required:l,registry:c,name:f}=e,d=kt(s,c.globalUiOptions),{title:h}=d,{title:m}=i,g=h||r||m||f;if(!g)return null;const v=Ut("TitleFieldTemplate",c,d);return k.jsx(v,{id:w2(t),title:g,required:l,schema:i,uiSchema:s,registry:c})}function aT(e,t,r){const i="!@#!@$@#$!@$#";return e.map(({schema:l})=>l).find(l=>{const c=Ve(l,[Un,t]);return Ve(c,b2,Ve(c,hs,i))===r})}function Gk(e,t,r,i,s){const l=t.map(d=>r.retrieveSchema(d,s));let c=e;Mn(e,pn)?c={...e,[pn]:l}:Mn(e,$n)&&(c={...e,[$n]:l});const f=fm(c,i);if(!f)throw new Error(`No enumOptions were computed from the schema ${JSON.stringify(c)}`);return f}function ude(e){const{name:t,baseType:r,disabled:i=!1,formData:s,fieldPathId:l,onBlur:c,onChange:f,options:d,onFocus:h,registry:m,uiSchema:g,schema:v,autofocus:w,readonly:b,required:_,errorSchema:x,hideError:R=!1}=e,{widgets:S,schemaUtils:T,globalUiOptions:E}=m,[O,C]=j.useState(Gk(v,d,T,g,s)),M=Ve(l,or),D=$l(v),$=Ut("FieldErrorTemplate",m,d),q=Ut("FieldTemplate",m,d),L=Rl(v),V=Rl(d),F=g?Rl(g):"",re=s?Rl(s):"";j.useEffect(()=>{C(Gk(v,d,T,g,s))},[L,V,T,F,re]);const{widget:ae=D?"radio":"select",title:K="",placeholder:B="",optionsSchemaSelector:Y=D,hideError:fe,...se}=kt(g);if(!Y)throw new Error("No selector field provided for the LayoutMultiSchemaField");const N=Ve(s,Y);let I=Ve(O[0]?.schema,[Un,Y],{});const U=aT(O,Y,N);I=I?.type?I:{...I,type:U?.type||r};const P=Pl(I,ae,S),G=fe===void 0?R:!!fe,ee=Ve(x,[pi],[]),ue=fb(x,[pi]),ve=T.getDisplayLabel(v,g,E),Ee=te=>{const Se=aT(O,Y,te),we=aT(O,Y,N);let $e=T.sanitizeDataForNewSchema(Se,we,s);$e&&Se&&($e=T.getDefaultFormState(Se,$e,"excludeObjectChildren")),$e&&Gn($e,Y,te),f($e,l.path,void 0,M)},Oe={enumOptions:O,...se},de=!G&&ee.length>0?k.jsx($,{fieldPathId:l,schema:v,errors:ee,registry:m}):void 0;return k.jsx(q,{fieldPathId:l,id:M,schema:v,label:(K||v.title)??"",disabled:i||Array.isArray(O)&&oa(O),uiSchema:g,required:_,readonly:!!b,registry:m,displayLabel:ve,errors:de,onChange:f,onKeyRename:$S,onKeyRenameBlur:$S,onRemoveProperty:$S,children:k.jsx(P,{id:M,name:t,schema:v,label:(K||v.title)??"",disabled:i||Array.isArray(O)&&oa(O),uiSchema:g,autofocus:w,readonly:b,required:_,registry:m,multiple:!1,rawErrors:ee,hideError:G,hideLabel:!ve,errorSchema:ue,placeholder:B,onChange:Ee,onBlur:c,onFocus:h,value:N,options:Oe,htmlName:l.name})})}class Kk extends j.Component{constructor(t){super(t);const{formData:r,options:i,registry:{schemaUtils:s}}=this.props,l=i.map(c=>s.retrieveSchema(c,r));this.state={retrievedOptions:l,selectedOption:this.getMatchingOption(0,r,l)}}componentDidUpdate(t,r){const{formData:i,options:s,fieldPathId:l}=this.props,{selectedOption:c}=this.state;let f=this.state;if(!yr(t.options,s)){const{registry:{schemaUtils:d}}=this.props,h=s.map(m=>d.retrieveSchema(m,i));f={selectedOption:c,retrievedOptions:h}}if(!yr(i,t.formData)&&l.$id===t.fieldPathId.$id){const{retrievedOptions:d}=f,h=this.getMatchingOption(c,i,d);r&&h!==c&&(f={selectedOption:h,retrievedOptions:d})}f!==this.state&&this.setState(f)}getMatchingOption(t,r,i){const{schema:s,registry:{schemaUtils:l}}=this.props,c=$l(s);return l.getClosestMatchingOption(r,i,t,c)}onOptionChange=t=>{const{selectedOption:r,retrievedOptions:i}=this.state,{formData:s,onChange:l,registry:c,fieldPathId:f}=this.props,{schemaUtils:d}=c,h=t!==void 0?parseInt(t,10):-1;if(h===r)return;const m=h>=0?i[h]:void 0,g=r>=0?i[r]:void 0;let v=d.sanitizeDataForNewSchema(m,g,s);m&&(v=d.getDefaultFormState(m,v,"excludeObjectChildren")),this.setState({selectedOption:h},()=>{l(v,f.path,void 0,this.getFieldId())})};getFieldId(){const{fieldPathId:t,schema:r}=this.props;return`${t.$id}${r.oneOf?"__oneof_select":"__anyof_select"}`}render(){const{name:t,disabled:r=!1,errorSchema:i={},formData:s,onBlur:l,onFocus:c,readonly:f,required:d=!1,registry:h,schema:m,uiSchema:g}=this.props,{widgets:v,fields:w,translateString:b,globalUiOptions:_,schemaUtils:x}=h,{SchemaField:R}=w,S=Ut("MultiSchemaFieldTemplate",h,_),T=r1(h,m,d,g),E=zm(s),{selectedOption:O,retrievedOptions:C}=this.state,{widget:M="select",placeholder:D,autofocus:$,autocomplete:q,title:L=m.title,...V}=kt(g,_),F=Pl({type:"number"},M,v),re=Ve(i,pi,[]),ae=fb(i,[pi]),K=x.getDisplayLabel(m,g,_),B=O>=0&&C[O]||null;let Y;if(B){const{required:ee}=m;Y=ee?hc({required:ee},B):B}let fe=[];pn in m&&g&&pn in g?Array.isArray(g[pn])?fe=g[pn]:console.warn(`uiSchema.oneOf is not an array for "${L||t}"`):$n in m&&g&&$n in g&&(Array.isArray(g[$n])?fe=g[$n]:console.warn(`uiSchema.anyOf is not an array for "${L||t}"`));let se=g;O>=0&&fe.length>O&&(se=fe[O]);const N=L?gn.TitleOptionPrefix:gn.OptionPrefix,I=L?[L]:[],U=C.map((ee,ue)=>{const{title:ve=ee.title}=kt(fe[ue]);return{label:ve||b(N,I.concat(String(ue+1))),value:ue}}),P=!T||E?k.jsx(F,{id:this.getFieldId(),name:`${t}${m.oneOf?"__oneof_select":"__anyof_select"}`,schema:{type:"number",default:0},onChange:this.onOptionChange,onBlur:l,onFocus:c,disabled:r||oa(U),multiple:!1,rawErrors:re,errorSchema:ae,value:O>=0?O:void 0,options:{enumOptions:U,...V},registry:h,placeholder:D,autocomplete:q,autofocus:$,label:L??t,hideLabel:!K,readonly:f}):void 0,G=Y&&Y.type!=="null"&&k.jsx(R,{...this.props,schema:Y,uiSchema:se})||null;return k.jsx(S,{schema:m,registry:h,uiSchema:g,selector:P,optionSchemaField:G})}}const cde=/\.([0-9]*0)*$/,fde=/[0.]0*$/;function dde(e){const{registry:t,onChange:r,formData:i,value:s}=e,[l,c]=j.useState(s),{StringField:f}=t.fields;let d=i;const h=j.useCallback((m,g,v,w)=>{c(m),`${m}`.charAt(0)==="."&&(m=`0${m}`);const b=typeof m=="string"&&m.match(cde)?bk(m.replace(fde,"")):bk(m);r(b,g,v,w)},[r]);if(typeof l=="string"&&typeof d=="number"){const m=new RegExp(`^(${String(d).replace(".","\\.")})?\\.?0*$`);l.match(m)&&(d=l)}return k.jsx(f,{...e,formData:d,onChange:h})}function _l(){return _l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},_l.apply(null,arguments)}const mS=["strong","em","del","mark"],Yk=[["**",mS[0]],["__",mS[0]],["~~",mS[2]],["==",mS[3]],["*","em"],["_","em"]];function hde(e,t){for(var r=1,i=t+1;i<e.length&&r>0;)e[i]!=="\\"?(e[i]==="["&&r++,e[i]==="]"&&r--,i++):i+=2;if(r===0&&i<e.length&&(e[i]==="("||e[i]==="[")){var s=e[i]==="("?")":"]",l=1;for(i++;i<e.length&&l>0;)e[i]!=="\\"?(e[i]==="("&&s===")"&&l++,e[i]===s&&l--,i++):i+=2;if(l===0)return i}return-1}function pde(e,t){if(!t||!t.inline&&!t.simple)return null;var r=e[0];if(r!=="*"&&r!=="_"&&r!=="~"&&r!=="=")return null;for(var i="",s=0,l="",c=0;c<6;c++){var f=Yk[c][0];if(e.startsWith(f)&&e.length>=2*f.length){i=f,s=f.length,l=Yk[c][1];break}}if(!i)return null;for(var d=s,h=!1,m=!1,g="",v=0,w="",b=!1,_="";d<e.length;){var x=e[d];if(b)w+=x,b=!1,_=x,d++;else if(x!=="\\")if(x!=="`"||v!==0){if(x==="["&&!h&&v===0){var R=hde(e,d);if(R!==-1){w+=e.slice(d,R),d=R,_=e[R-1];continue}}if(m)w+=x,g?x===g&&(g=""):x==='"'||x==="'"?g=x:x===">"&&(m=!1),_=x,d++;else if(x!=="<"||h){if(x===`
61
+ `&&_===`
62
+ `&&!h&&v===0)return null;if(!h&&v===0){for(var S=0;d+S<e.length&&e[d+S]===i[0];)S++;if(S>=s&&(s!==1||i!=="*"&&i!=="_"||e[d-1]!==i&&e[d+1]!==i)){var T=[e.slice(0,d+S),l,w+e.slice(d+s,d+S)];return T.index=0,T.input=e,T}}w+=x,_=x,d++}else{var E=e[d+1],O=e.indexOf(">",d);if(O!==-1){var C=e.slice(d,O+1).endsWith("/>");E==="/"?v=Math.max(0,v-1):C||v++}m=!0,w+=x,_=x,d++}}else h=!h,w+=x,_=x,d++;else w+=x,b=!0,_=x,d++}return null}const mde=["children","options"],Zk=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce((e,t)=>(e[t.toLowerCase()]=t,e),{class:"className",for:"htmlFor"}),Xk={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},gde=["style","script","pre"],yde=["src","href","data","formAction","srcDoc","action"],vde=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,bde=/\n{2,}$/,Qk=/^(\s*>[\s\S]*?)(?=\n\n|$)/,Sde=/^ *> ?/gm,wde=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,Ede=/^ {2,}\n/,xde=/^(?:([-*_])( *\1){2,}) *(?:\n *)+\n/,Wk=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,Jk=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,_de=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,Tde=/^(?:\n *)*\n/,Cde=/\r\n?/g,Ode=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,Rde=/^\[\^([^\]]+)]/,Ade=/\f/g,Mde=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,jde=/^\[(x|\s)\]/,eD=/^(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,tD=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,nD=/^([^\n]+)\n *(=|-)\2{2,} *\n/,YA=/^<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>/i;function kde(e){const t=YA.exec(e);if(!t)return null;const r=t[1],i=r.toLowerCase(),s=i.length+1;let l=t[0].length;e[l]===`
63
+ `&&l++;const c=l;let f=l,d=1;const h=e.length;for(;d>0;){const g=e.indexOf("<",l);if(g===-1)return null;let v=-1,w=-1;if(e[g+1]==="/")w=g;else if(e[g+1]===i[0]||e[g+1]===r[0]){let b=!0;for(let _=0;_<i.length;_++){const x=e[g+1+_];if(x!==i[_]&&x!==r[_]){b=!1;break}}!b||e[g+s]!==" "&&e[g+s]!==">"||(v=g)}if(v!==-1||w!==-1)if(v!==-1&&(w===-1||v<w))l=v+s+1,d++;else{let b=w+2;for(;b<h;){const x=e[b];if(x!==" "&&x!==" "&&x!==`
64
+ `&&x!=="\r")break;b++}if(b+i.length>h)return null;let _=!0;for(let x=0;x<i.length;x++){const R=e[b+x];if(R!==i[x]&&R!==r[x]){_=!1;break}}if(!_){l=b;continue}for(b+=i.length;b<h;){const x=e[b];if(x!==" "&&x!==" "&&x!==`
65
+ `&&x!=="\r")break;b++}if(b>=h||e[b]!==">"){l=b;continue}f=w,l=b+1,d--}else l=g+1}let m=0;for(;l+m<h&&e[l+m]===`
66
+ `;)m++;return[e.slice(0,l+m),r,t[2],e.slice(c,f)]}const Dde=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,rD=/^<!--[\s\S]*?(?:-->)/,Nde=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,sO=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,zde=/^\{.*\}$/,$de=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,Pde=/^<([^ >]+[:@\/][^ >]+)>/,Ide=/-([a-z])?/gi,aD=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,Lde=/^[^\n]+(?: \n|\n{2,})/,Ude=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,qde=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,Vde=/^\[([^\]]*)\] ?\[([^\]]*)\]/,Fde=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,Bde=/\t/g,Hde=/(^ *\||\| *$)/g,Gde=/^ *:-+: *$/,Kde=/^ *:-+ *$/,Yde=/^ *-+: *$/,Zde=/^(:[a-zA-Z0-9-_]+:)/,Xde=/^\\([^0-9A-Za-z\s])/,Qde=/\\([^0-9A-Za-z\s])/g,Wde=/^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/,Jde=/^\n+/,ehe=/^([ \t]*)/,the=/(?:^|\n)( *)$/,ZA="(?:\\d+\\.)",XA="(?:[*+-])";function BP(e){return"( *)("+(e===1?ZA:XA)+") +"}const HP=BP(1),GP=BP(2);function KP(e){return RegExp("^"+(e===1?HP:GP))}const nhe=KP(1),rhe=KP(2);function YP(e){return RegExp("^"+(e===1?HP:GP)+"[^\\n]*(?:\\n(?!\\1"+(e===1?ZA:XA)+" )[^\\n]*)*(\\n|$)","gm")}const ahe=YP(1),ihe=YP(2);function ZP(e){const t=e===1?ZA:XA;return RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const XP=ZP(1),QP=ZP(2);function iD(e,t){const r=t===1,i=r?XP:QP,s=r?ahe:ihe,l=r?nhe:rhe;return{t:c=>l.test(c),o:Nc(function(c,f){const d=the.exec(f.prevCapture);return d&&(f.list||!f.inline&&!f.simple)?i.exec(c=d[1]+c):null}),u:1,i(c,f,d){const h=r?+c[2]:void 0,m=c[0].replace(bde,`
67
+ `).match(s),g=l.exec(m[0]),v=RegExp("^ {1,"+(g?g[0].length:0)+"}","gm");let w=!1;return{items:m.map(function(b,_){const x=b.replace(v,"").replace(l,""),R=_===m.length-1,S=bl(x,`
68
+
69
+ `)||R&&w;w=S;const T=d.inline,E=d.list;let O;d.list=!0,S?(d.inline=!1,O=tb(x)+`
70
+
71
+ `):(d.inline=!0,O=tb(x));const C=f(O,d);return d.inline=T,d.list=E,C}),ordered:r,start:h}}}}const ohe=RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),she=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;function oD(e){return typeof e=="string"}function tb(e){let t=e.length;for(;t>0&&e[t-1]<=" ";)t--;return e.slice(0,t)}function lO(e,t){return e.startsWith(t)}function bl(e,t){return e.indexOf(t)!==-1}function lhe(e,t,r){if(Array.isArray(r)){for(let i=0;i<r.length;i++)if(lO(e,r[i]))return!0;return!1}return r(e,t)}function jv(e){return e.replace(/[ÀÁÂÃÄÅàáâãä忯]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function uhe(e){return Yde.test(e)?"right":Gde.test(e)?"center":Kde.test(e)?"left":null}function sD(e,t,r,i){const s=r.inTable;r.inTable=!0;let l=[[]],c="";function f(){if(!c)return;const d=l[l.length-1];d.push.apply(d,t(c,r)),c=""}return e.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((d,h,m)=>{d.trim()==="|"&&(f(),i)?h!==0&&h!==m.length-1&&l.push([]):c+=d}),f(),r.inTable=s,l}function che(e,t,r){r.inline=!0;const i=e[2]?e[2].replace(Hde,"").split("|").map(uhe):[],s=e[3]?(function(c,f,d){return c.trim().split(`
72
+ `).map(function(h){return sD(h,f,d,!0)})})(e[3],t,r):[],l=sD(e[1],t,r,!!s.length);return r.inline=!1,s.length?{align:i,cells:s,header:l,type:"25"}:{children:l,type:"21"}}function lD(e,t){return e.align[t]==null?{}:{textAlign:e.align[t]}}function Nc(e){return e.inline=1,e}function Tc(e){return Nc(function(t,r){return r.inline?e.exec(t):null})}function gS(e){return Nc(function(t,r){return r.inline||r.simple?e.exec(t):null})}function ac(e){return function(t,r){return r.inline||r.simple?null:e.exec(t)}}function uD(e){return Nc(function(t){return e.exec(t)})}const fhe=/(javascript|vbscript|data(?!:image)):/i;function dhe(e){try{const t=decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"");if(fhe.test(t))return null}catch{return null}return e}function wl(e){return e&&e.replace(Qde,"$1")}function XS(e,t,r){const i=r.inline||!1,s=r.simple||!1;r.inline=!0,r.simple=!0;const l=e(t,r);return r.inline=i,r.simple=s,l}function hhe(e,t,r){const i=r.inline||!1,s=r.simple||!1;r.inline=!1,r.simple=!0;const l=e(t,r);return r.inline=i,r.simple=s,l}function phe(e,t,r){const i=r.inline||!1;r.inline=!1;const s=e(t,r);return r.inline=i,s}const mhe=(e,t,r)=>({children:XS(t,e[2],r)});function iT(){return{}}function ghe(...e){return e.filter(Boolean).join(" ")}function oT(e,t,r){let i=e;const s=t.split(".");for(;s.length&&(i=i[s[0]],i!==void 0);)s.shift();return i||r}function sT(e,t,r,i){if(!t||!t.trim())return null;const s=t.match(vde);return s?s.reduce(function(l,c){const f=c.indexOf("=");if(f!==-1){const d=(function(g){return g.indexOf("-")!==-1&&g.match(Nde)===null&&(g=g.replace(Ide,function(v,w){return w.toUpperCase()})),g})(c.slice(0,f)).trim(),h=Zk[d]||d;if(h==="ref")return l;const m=l[h]=(function(g,v,w,b){return v==="style"?(function(_){const x=[];if(!_)return x;let R="",S=0,T="";for(let O=0;O<_.length;O++){const C=_[O];if(C==='"'||C==="'")T?C===T&&(T="",S--):(T=C,S++);else if(C==="("&&R.endsWith("url"))S++;else if(C===")"&&S>0)S--;else if(C===";"&&S===0){const M=R.indexOf(":");M>0&&x.push([R.slice(0,M).trim(),R.slice(M+1).trim()]),R="";continue}R+=C}const E=R.indexOf(":");return E>0&&x.push([R.slice(0,E).trim(),R.slice(E+1).trim()]),x})(w).reduce(function(_,[x,R]){return _[x.replace(/(-[a-z])/g,S=>S[1].toUpperCase())]=b(R,g,x),_},{}):yde.indexOf(v)!==-1?b(wl(w),g,v):(w.match(zde)&&(w=wl(w.slice(1,w.length-1))),w==="true"||w!=="false"&&w)})(e,d,(function(g){const v=g[0];return(v==='"'||v==="'")&&g.length>=2&&g[g.length-1]===v?g.slice(1,-1):g})(c.slice(f+1).trim()),r);typeof m=="string"&&(YA.test(m)||sO.test(m))&&(l[h]=i(m.trim()))}else c!=="style"&&(l[Zk[c]||c]=!0);return l},{}):null}function cD(e,t){for(let r=0;r<e.length;r++)if(e[r].test(t))return!0;return!1}function yhe(e="",t={}){t.overrides=t.overrides||{},t.namedCodesToUnicode=t.namedCodesToUnicode?_l({},Xk,t.namedCodesToUnicode):Xk;const r=t.slugify||jv,i=t.sanitizer||dhe,s=t.createElement||j.createElement,l=[Qk,Wk,Jk,t.enforceAtxHeadings?tD:eD,nD,aD,XP,QP],c=[...l,Lde,YA,rD,sO];function f(b,_,...x){const R=oT(t.overrides,b+".props",{});return s((function(S,T){const E=oT(T,S);return E?typeof E=="function"||typeof E=="object"&&"render"in E?E:oT(T,S+".component",S):S})(b,t.overrides),_l({},_,R,{className:ghe(_?.className,R.className)||void 0}),...x)}function d(b){b=b.replace(Mde,"");let _=!1;t.forceInline?_=!0:t.forceBlock||(_=Fde.test(b)===!1);const x=v(_?b:tb(b).replace(Jde,"")+`
73
+
74
+ `,{inline:_});if(t.ast)return x;const R=w(x);for(;oD(R[R.length-1])&&!R[R.length-1].trim();)R.pop();if(h.length&&R.push(f("footer",{key:"footer"},h.map(function(E){return f("div",{id:r(E.identifier,jv),key:E.identifier},E.identifier,w(v(E.footnote,{inline:!0})))}))),t.wrapper===null)return R;const S=t.wrapper||(_?"span":"div");let T;if(R.length>1||t.forceWrapper)T=R;else{if(R.length===1)return T=R[0],typeof T=="string"?f("span",{key:"outer"},T):T;T=null}return s(S,_l({key:"outer"},t.wrapperProps),T)}const h=[],m={},g={0:{t:[">"],o:ac(Qk),u:1,i(b,_,x){const[,R,S]=b[0].replace(Sde,"").match(wde);return{alert:R,children:_(S,x)}}},1:{t:[" "],o:Tc(Ede),u:1,i:iT},2:{t:function(b,_){if(_.inline||_.simple)return!1;var x=b[0];return x==="-"||x==="*"||x==="_"},o:ac(xde),u:1,i:iT},3:{t:[" "],o:ac(Jk),u:0,i:b=>({lang:void 0,text:wl(tb(b[0].replace(/^ {4}/gm,"")))})},4:{t:["```","~~~"],o:ac(Wk),u:0,i:b=>({attrs:sT("code",b[3]||"",i,d),lang:b[2]||void 0,text:b[4],type:"3"})},5:{t:["`"],o:gS(_de),u:3,i:b=>({text:wl(b[2])})},6:{t:["[^"],o:ac(Ode),u:0,i:b=>(h.push({footnote:b[2],identifier:b[1]}),{})},7:{t:["[^"],o:Tc(Rde),u:1,i:b=>({target:"#"+r(b[1],jv),text:b[1]})},8:{t:["[ ]","[x]"],o:Tc(jde),u:1,i:b=>({completed:b[1].toLowerCase()==="x"})},9:{t:["#"],o:ac(t.enforceAtxHeadings?tD:eD),u:1,i:(b,_,x)=>({children:XS(_,b[2],x),id:r(b[2],jv),level:b[1].length})},10:{t:b=>{const _=b.indexOf(`
75
+ `);return _>0&&_<b.length-1&&(b[_+1]==="="||b[_+1]==="-")},o:ac(nD),u:1,i:(b,_,x)=>({children:XS(_,b[1],x),level:b[2]==="="?1:2,type:"9"})},11:{t:["<"],o:Nc(kde),u:1,i(b,_,x){const[,R]=b[3].match(ehe),S=RegExp("^"+R,"gm"),T=b[3].replace(S,""),E=cD(c,T)?phe:XS,O=b[1].toLowerCase(),C=gde.indexOf(O)!==-1,M=(C?O:b[1]).trim(),D={attrs:sT(M,b[2],i,d),noInnerParse:C,tag:M};if(x.inAnchor=x.inAnchor||O==="a",C)D.text=b[3];else{const $=x.inHTML;x.inHTML=!0,D.children=E(_,T,x),x.inHTML=$}return x.inAnchor=!1,D}},13:{t:["<"],o:uD(sO),u:1,i(b){const _=b[1].trim();return{attrs:sT(_,b[2]||"",i,d),tag:_}}},12:{t:["<!--"],o:uD(rD),u:1,i:()=>({})},14:{t:["!["],o:gS(she),u:1,i:b=>({alt:wl(b[1]),target:wl(b[2]),title:wl(b[3])})},15:{t:["["],o:Tc(ohe),u:3,i:(b,_,x)=>({children:hhe(_,b[1],x),target:wl(b[2]),title:wl(b[3])})},16:{t:function(b,_){return!(!_.inline||_.inAnchor)&&b[0]==="<"&&(bl(b,":")||bl(b,"@")||bl(b,"/"))},o:Tc(Pde),u:0,i(b){let _=b[1],x=!1;return bl(_,"@")&&!bl(_,"//")&&(x=!0,_=_.replace("mailto:","")),{children:[{text:_,type:"27"}],target:x?"mailto:"+_:_,type:"15"}}},17:{t:(b,_)=>!_.inAnchor&&!t.disableAutoLink&&lO(b,"http"),o:Tc($de),u:0,i:b=>({children:[{text:b[1],type:"27"}],target:b[1],title:void 0,type:"15"})},20:iD(0,1),30:iD(0,2),19:{t:[`
76
+ `],o:ac(Tde),u:3,i:iT},21:{t:function(b,_){return!_.inline&&!_.simple},o:Nc(function(b,_){if(_.inline||_.simple||_.inHTML&&!bl(b,`
77
+
78
+ `)&&!bl(_.prevCapture,`
79
+
80
+ `))return null;let x="",R=0;for(;;){const T=b.indexOf(`
81
+ `,R),E=b.slice(R,T===-1?void 0:T+1),O=b[R];if((O===">"||O==="#"||O==="|"||O==="`"||O==="~"||O==="*"||O==="-"||O==="_"||O===" ")&&cD(l,E)||(x+=E,T===-1||!E.trim()))break;R=T+1}const S=tb(x);return S===""?null:[x,,S]}),u:3,i:mhe},22:{t:["["],o:Tc(Ude),u:0,i:b=>(m[b[1]]={target:b[2],title:b[4]},{})},23:{t:["!["],o:gS(qde),u:0,i:b=>({alt:b[1]?wl(b[1]):void 0,ref:b[2]})},24:{t:b=>b[0]==="["&&!bl(b,"]("),o:Tc(Vde),u:0,i:(b,_,x)=>({children:_(b[1],x),fallbackChildren:b[0],ref:b[2]})},25:{t:["|"],o:ac(aD),u:1,i:che},27:{o:Nc(function(b,_){let x;return lO(b,":")&&(x=Zde.exec(b)),x||Wde.exec(b)}),u:4,i(b){const _=b[0];return{text:bl(_,"&")?_.replace(Dde,(x,R)=>t.namedCodesToUnicode[R]||x):_}}},34:{t:["*","_","~","="],o:Nc(pde),u:2,i:(b,_,x)=>({children:_(b[2],x),tag:b[1]})},28:{t:["\\"],o:gS(Xde),u:1,i:b=>({text:b[1],type:"27"})}};t.disableParsingRawHTML===!0&&(delete g[11],delete g[13]);const v=(function(b){var _=Object.keys(b);function x(R,S){var T=[];if(S.prevCapture=S.prevCapture||"",R.trim())for(;R;)for(var E=0;E<_.length;){var O=_[E],C=b[O];if(!C.t||lhe(R,S,C.t)){var M=C.o(R,S);if(M&&M[0]){R=R.substring(M[0].length);var D=C.i(M,x,S);S.prevCapture+=M[0],D.type||(D.type=O),T.push(D);break}E++}else E++}return S.prevCapture="",T}return _.sort(function(R,S){return b[R].u-b[S].u||(R<S?-1:1)}),function(R,S){return x((function(T){return T.replace(Cde,`
82
+ `).replace(Ade,"").replace(Bde," ")})(R),S)}})(g),w=(function(b,_,x,R,S){function T(E){return Array.isArray(E)?E.map(O=>"text"in O?O.text:""):"text"in E?E.text:""}return function E(O,C={}){const M=(C.renderDepth||0)+1;if(M>2500)return T(O);C.renderDepth=M;try{if(Array.isArray(O)){const $=C.key,q=[];let L=!1;for(let V=0;V<O.length;V++){C.key=V;const F=E(O[V],C),re=oD(F);re&&L?q[q.length-1]+=F:F!==null&&q.push(F),L=re}return C.key=$,C.renderDepth=M-1,q}const D=(function($,q,L){const V=()=>(function(F,re,ae,K,B,Y,fe){switch(F.type){case"0":{const se={key:ae.key};return F.alert&&(se.className="markdown-alert-"+Y(F.alert.toLowerCase(),jv),F.children.unshift({attrs:{},children:[{type:"27",text:F.alert}],noInnerParse:!0,type:"11",tag:"header"})),K("blockquote",se,re(F.children,ae))}case"1":return K("br",{key:ae.key});case"2":return K("hr",{key:ae.key});case"3":return K("pre",{key:ae.key},K("code",_l({},F.attrs,{className:F.lang?"lang-"+F.lang:""}),F.text));case"5":return K("code",{key:ae.key},F.text);case"7":return K("a",{key:ae.key,href:B(F.target,"a","href")},K("sup",{key:ae.key},F.text));case"8":return K("input",{checked:F.completed,key:ae.key,readOnly:!0,type:"checkbox"});case"9":return K("h"+F.level,{id:F.id,key:ae.key},re(F.children,ae));case"11":return K(F.tag,_l({key:ae.key},F.attrs),F.text||(F.children?re(F.children,ae):""));case"13":return K(F.tag,_l({},F.attrs,{key:ae.key}));case"14":return K("img",{key:ae.key,alt:F.alt||void 0,title:F.title||void 0,src:B(F.target,"img","src")});case"15":return K("a",{key:ae.key,href:B(F.target,"a","href"),title:F.title},re(F.children,ae));case"23":return fe[F.ref]?K("img",{key:ae.key,alt:F.alt,src:B(fe[F.ref].target,"img","src"),title:fe[F.ref].title}):null;case"24":return fe[F.ref]?K("a",{key:ae.key,href:B(fe[F.ref].target,"a","href"),title:fe[F.ref].title},re(F.children,ae)):K("span",{key:ae.key},F.fallbackChildren);case"25":{const se=F;return K("table",{key:ae.key},K("thead",null,K("tr",null,se.header.map(function(N,I){return K("th",{key:I,style:lD(se,I)},re(N,ae))}))),K("tbody",null,se.cells.map(function(N,I){return K("tr",{key:I},N.map(function(U,P){return K("td",{key:P,style:lD(se,P)},re(U,ae))}))})))}case"27":return F.text;case"34":return K(F.tag,{key:ae.key},re(F.children,ae));case"20":case"30":return K(F.ordered?"ol":"ul",{key:ae.key,start:F.type==="20"?F.start:void 0},F.items.map(function(se,N){return K("li",{key:N},re(se,ae))}));case"19":return`
83
+ `;case"21":return K("p",{key:ae.key},re(F.children,ae));default:return null}})($,q,L,_,x,R,S);return b?b(V,$,q,L):V()})(O,E,C);return C.renderDepth=M-1,D}catch(D){if(D instanceof RangeError&&D.message.includes("Maximum call stack"))return T(O);throw D}}})(t.renderRule,f,i,r,m);return d(e)}const a1=e=>{let{children:t,options:r}=e,i=(function(s,l){if(s==null)return{};var c={};for(var f in s)if({}.hasOwnProperty.call(s,f)){if(l.indexOf(f)!==-1)continue;c[f]=s[f]}return c})(e,mde);return yhe(t??"",_l({},r,{wrapperProps:_l({},r?.wrapperProps,i)}))},WP=Symbol("remove-this-key"),fD=Symbol("reset");function vhe(e,t){return Array.isArray(e.required)&&e.required.indexOf(t)!==-1}function bhe(e,t){switch(t){case"array":return[];case"boolean":return!1;case"null":return null;case"number":return 0;case"object":return{};default:return e(gn.NewStringDefault)}}function She(e){const{fieldPathId:t,schema:r,registry:i,uiSchema:s,errorSchema:l,formData:c,onChange:f,onBlur:d,onFocus:h,disabled:m,readonly:g,required:v,hideError:w,propertyName:b,handleKeyRename:_,handleRemoveProperty:x,addedByAdditionalProperties:R}=e,[S,T]=j.useState(!1),{globalFormOptions:E,fields:O}=i,{SchemaField:C}=O,M=sp(ps(b,E,t.path)),D=j.useCallback((V,F,re,ae)=>{V===void 0&&R&&(V=""),f(V,F,re,ae)},[f,R]),$=j.useCallback(V=>{b!==V&&T(!0),_(b,V)},[b,_]),q=j.useCallback(V=>{const{target:{value:F}}=V;$(F)},[$]),L=j.useCallback(()=>{x(b)},[b,x]);return k.jsx(C,{name:b,required:v,schema:r,uiSchema:s,errorSchema:l,fieldPathId:M,formData:c,wasPropertyKeyModified:S,onKeyRename:$,onKeyRenameBlur:q,onRemoveProperty:L,onChange:D,onBlur:d,onFocus:h,registry:i,disabled:m,readonly:g,hideError:w})}function whe(e){const{schema:t,uiSchema:r={},formData:i,errorSchema:s,fieldPathId:l,name:c,required:f=!1,disabled:d,readonly:h,hideError:m,onBlur:g,onFocus:v,onChange:w,registry:b,title:_}=e,{fields:x,schemaUtils:R,translateString:S,globalUiOptions:T}=b,{OptionalDataControlsField:E}=x,O=R.retrieveSchema(t,i,!0),C=kt(r,T),{properties:M={}}=O,D=e.childFieldPathId??l,$=C.title??O.title??_??c,q=C.description??O.description,L=r1(b,O,f,r),V=zm(i);let F=[];const re=j.useCallback((N,I)=>{const{duplicateKeySuffixSeparator:U="-"}=kt(r,T);let P=0,G=N;for(;Mn(I,G);)G=`${N}${U}${++P}`;return G},[r,T]),ae=j.useCallback(()=>{if(!(O.additionalProperties||O.patternProperties))return;const{translateString:N}=b,I={...i},U=re("newKey",I);if(O.patternProperties)Gn(I,U,null);else{let P,G,ee;if(In(O.additionalProperties)){P=O.additionalProperties.type,G=O.additionalProperties.const,ee=O.additionalProperties.default;let ve=O.additionalProperties;if(br in ve){const{schemaUtils:Ee}=b;ve=Ee.retrieveSchema({[br]:ve[br]},i),P=ve.type,G=ve.const,ee=ve.default}!P&&($n in ve||pn in ve)&&(P="object")}const ue=G??ee??bhe(N,P);Gn(I,U,ue)}w(I,D.path)},[i,w,b,D,re,O]),K=j.useCallback((N,I)=>{if(N!==I){const U=re(I,i),P={...i},G={[N]:U},ee=Object.keys(P).map(ve=>({[G[ve]||ve]:P[ve]})),ue=Object.assign({},...ee);w(ue,D.path)}},[i,w,D,re]),B=j.useCallback(N=>{w(WP,[...D.path,N])},[w,D]);if(!L||V)try{const N=Object.keys(M);F=_fe(N,C.order)}catch(N){return k.jsxs("div",{children:[k.jsx("p",{className:"rjsf-config-error",style:{color:"red"},children:k.jsx(a1,{options:{disableParsingRawHTML:!0},children:S(gn.InvalidObjectField,[c||"root",N.message])})}),k.jsx("pre",{children:JSON.stringify(O)})]})}const Y=Ut("ObjectFieldTemplate",b,C),fe=L?k.jsx(E,{...e,fieldPathId:D,schema:O}):void 0,se={title:C.label===!1?"":$,description:C.label===!1?void 0:q,properties:F.map(N=>{const I=Mn(O,[Un,N,uc]),U=I?r.additionalProperties:r[N],P=kt(U).widget==="hidden";return{content:k.jsx(She,{propertyName:N,required:vhe(O,N),schema:Ve(O,[Un,N],{}),uiSchema:U,errorSchema:Ve(s,[N]),fieldPathId:D,formData:Ve(i,[N]),handleKeyRename:K,handleRemoveProperty:B,addedByAdditionalProperties:I,onChange:w,onBlur:g,onFocus:v,registry:b,disabled:d,readonly:h,hideError:m},N),name:N,readonly:h,disabled:d,required:f,hidden:P}}),readonly:h,disabled:d,required:f,fieldPathId:l,uiSchema:r,errorSchema:s,schema:O,formData:i,registry:b,optionalDataControl:fe,className:L?"rjsf-optional-object-field":void 0};return k.jsx(Y,{...se,onAddProperty:ae})}function Ehe(e){const{schema:t,uiSchema:r={},formData:i,disabled:s=!1,readonly:l=!1,onChange:c,errorSchema:f,fieldPathId:d,registry:h}=e,{globalUiOptions:m={},schemaUtils:g,translateString:v}=h,w=kt(r,m),b=Ut("OptionalDataControlsTemplate",h,w),_=zm(i);let x,R,S,T;if(s||l)x=tT(d,"Msg"),R=_?void 0:v(gn.OptionalObjectEmptyMsg);else{const E=_?gn.OptionalObjectRemove:gn.OptionalObjectAdd;R=v(E),_?(x=tT(d,"Remove"),T=()=>c(void 0,d.path,f)):(x=tT(d,"Add"),S=()=>{let O=g.getDefaultFormState(t,i,"excludeObjectChildren");O===void 0&&(O=dl(t)==="array"?[]:{}),c(O,d.path,f)})}return R&&k.jsx(b,{id:x,registry:h,schema:t,uiSchema:r,label:R,onAddClick:S,onRemoveClick:T})}const xhe={array:"ArrayField",boolean:"BooleanField",integer:"NumberField",number:"NumberField",object:"ObjectField",string:"StringField",null:"NullField"};function _he(e,t,r){const i=t.field,{fields:s}=r;if(typeof i=="function")return i;if(typeof i=="string"&&i in s)return s[i];const l=dl(e),c=Array.isArray(l)?l[0]:l||"",f=e.$id;let d=xhe[c];return f&&f in s&&(d=f),!d&&(e.anyOf||e.oneOf)?()=>null:d in s?s[d]:s.FallbackField}function The(e){const{schema:t,fieldPathId:r,uiSchema:i,formData:s,errorSchema:l,name:c,onChange:f,onKeyRename:d,onKeyRenameBlur:h,onRemoveProperty:m,required:g=!1,registry:v,wasPropertyKeyModified:w=!1}=e,{schemaUtils:b,globalFormOptions:_,globalUiOptions:x,fields:R}=v,{AnyOfField:S,OneOfField:T}=R,E=kt(i,x),O=Ut("FieldTemplate",v,E),C=Ut("DescriptionFieldTemplate",v,E),M=Ut("FieldHelpTemplate",v,E),D=Ut("FieldErrorTemplate",v,E),$=b.retrieveSchema(t,s),q=r[or],L=j.useCallback((Te,Pe,Ge,Ce)=>f(Te,Pe,Ge,Ce||q),[q,f]),V=_he($,E,v),F=!!(E.disabled??e.disabled),re=!!(E.readonly??(e.readonly||e.schema.readOnly||$.readOnly)),ae=E.hideError,K=ae===void 0?e.hideError:!!ae,B=!!(E.autofocus??e.autofocus);if(Object.keys($).length===0)return null;let Y=b.getDisplayLabel($,i,x);const fe=E.field&&E.fieldReplacesAnyOrOneOf===!0;let se,N,I={fieldPathId:r};if(($n in $||pn in $)&&!fe&&!b.isSelect($)){$[$n]?(se=S,N=$[$n].map(Ge=>b.retrieveSchema(In(Ge)?Ge:{},s))):$[pn]&&(se=T,N=$[pn].map(Ge=>b.retrieveSchema(In(Ge)?Ge:{},s)));const Te=r1(v,$,g,i),Pe=zm(s);Y=Y&&(!Te||Pe),I={childFieldPathId:r,fieldPathId:ps("XxxOf",_,r)}}const{__errors:U,...P}=l||{},G=fb(i,["ui:classNames","classNames","ui:style"]);Lc in G&&(G[Lc]=fb(G[Lc],["classNames","style"]));const ee=k.jsx(V,{...e,onChange:L,...I,schema:$,uiSchema:G,disabled:F,readonly:re,hideError:K,autofocus:B,errorSchema:P,rawErrors:U}),ue=r[or];let ve;w?ve=c:ve=uc in $?c:E.title||e.schema.title||$.title||e.title||c;const Ee=E.description||e.schema.description||$.description||"",Oe=E.help,de=E.widget==="hidden",te=["rjsf-field",`rjsf-field-${dl($)}`];!K&&U&&U.length>0&&te.push("rjsf-field-error"),E.classNames&&te.push(E.classNames);const Se=k.jsx(M,{help:Oe,fieldPathId:r,schema:$,uiSchema:i,hasErrors:!K&&U&&U.length>0,registry:v}),we=K||se&&!b.isSelect($)?void 0:k.jsx(D,{errors:U,errorSchema:l,fieldPathId:r,schema:$,uiSchema:i,registry:v}),$e={description:k.jsx(C,{id:op(ue),description:Ee,schema:$,uiSchema:i,registry:v}),rawDescription:Ee,help:Se,rawHelp:typeof Oe=="string"?Oe:void 0,errors:we,rawErrors:K?void 0:U,fieldPathId:r,id:ue,label:ve,hidden:de,onChange:f,onKeyRename:d,onKeyRenameBlur:h,onRemoveProperty:m,required:g,disabled:F,readonly:re,hideError:K,displayLabel:Y,classNames:te.join(" ").trim(),style:E.style,formData:s,schema:$,uiSchema:i,registry:v};return k.jsx(O,{...$e,children:k.jsxs(k.Fragment,{children:[ee,se&&k.jsx(se,{name:c,disabled:F,readonly:re,hideError:K,errorSchema:l,formData:s,fieldPathId:r,onBlur:e.onBlur,onChange:e.onChange,onFocus:e.onFocus,options:N,registry:v,required:g,schema:$,uiSchema:i})]})})}class Che extends j.Component{shouldComponentUpdate(t){const{registry:{globalFormOptions:r}}=this.props,{experimental_componentUpdateStrategy:i="customDeep"}=r;return IP(this,t,this.state,i)}render(){return k.jsx(The,{...this.props})}}function Ohe(e){const{schema:t,name:r,uiSchema:i,fieldPathId:s,formData:l,required:c,disabled:f=!1,readonly:d=!1,autofocus:h=!1,onChange:m,onBlur:g,onFocus:v,registry:w,rawErrors:b,hideError:_,title:x}=e,{title:R,format:S}=t,{widgets:T,schemaUtils:E,globalUiOptions:O}=w,C=E.isSelect(t)?fm(t,i):void 0;let M=C?"select":"text";S&&wfe(t,S,T)&&(M=S);const{widget:D=M,placeholder:$="",title:q,...L}=kt(i),V=E.getDisplayLabel(t,i,O),F=q??x??R??r,re=Pl(t,D,T),ae=j.useCallback((K,B,Y)=>m(K,s.path,B,Y),[m,s]);return k.jsx(re,{options:{...L,enumOptions:C},schema:t,uiSchema:i,id:s.$id,name:r,label:F,hideLabel:!V,hideError:_,value:l,onChange:ae,onBlur:g,onFocus:v,required:c,disabled:f,readonly:d,autofocus:h,registry:w,placeholder:$,rawErrors:b,htmlName:s.name})}function Rhe(e){const{formData:t,onChange:r,fieldPathId:i}=e;return j.useEffect(()=>{t===void 0&&r(null,i.path)},[i,t,r]),null}function Ahe(){return{AnyOfField:Kk,ArrayField:Bfe,BooleanField:Hfe,FallbackField:Zfe,LayoutGridField:KA,LayoutHeaderField:lde,LayoutMultiSchemaField:ude,NumberField:dde,ObjectField:whe,OneOfField:Kk,OptionalDataControlsField:Ehe,SchemaField:Che,StringField:Ohe,NullField:Rhe}}function Mhe(e){const{fieldPathId:t,description:r,registry:i,schema:s,uiSchema:l}=e,c=kt(l,i.globalUiOptions),{label:f=!0}=c;if(!r||!f)return null;const d=Ut("DescriptionFieldTemplate",i,c);return k.jsx(d,{id:op(t),description:r,schema:s,uiSchema:l,registry:i})}function jhe(e){const{children:t,className:r,buttonsProps:i,displayLabel:s,hasDescription:l,hasToolbar:c,registry:f,uiSchema:d}=e,h=kt(d),m=Ut("ArrayFieldItemButtonsTemplate",f,h),g={flex:1,paddingLeft:6,paddingRight:6,fontWeight:"bold"},v=l?31:9,w={display:"flex",alignItems:s?"center":"baseline"},b={display:"flex",justifyContent:"flex-end",marginTop:s?`${v}px`:0};return k.jsxs("div",{className:r,style:w,children:[k.jsx("div",{className:c?"col-xs-9 col-md-10 col-xl-11":"col-xs-12",children:t}),c&&k.jsx("div",{className:"col-xs-3 col-md-2 col-xl-1 array-item-toolbox",children:k.jsx("div",{className:"btn-group",style:b,children:k.jsx(m,{...i,style:g})})})]})}function khe(e){const{disabled:t,hasCopy:r,hasMoveDown:i,hasMoveUp:s,hasRemove:l,fieldPathId:c,onCopyItem:f,onRemoveItem:d,onMoveDownItem:h,onMoveUpItem:m,readonly:g,registry:v,uiSchema:w}=e,{CopyButton:b,MoveDownButton:_,MoveUpButton:x,RemoveButton:R}=v.templates.ButtonTemplates;return k.jsxs(k.Fragment,{children:[(s||i)&&k.jsx(x,{id:Al(c,"moveUp"),className:"rjsf-array-item-move-up",disabled:t||g||!s,onClick:m,uiSchema:w,registry:v}),(s||i)&&k.jsx(_,{id:Al(c,"moveDown"),className:"rjsf-array-item-move-down",disabled:t||g||!i,onClick:h,uiSchema:w,registry:v}),r&&k.jsx(b,{id:Al(c,"copy"),className:"rjsf-array-item-copy",disabled:t||g,onClick:f,uiSchema:w,registry:v}),l&&k.jsx(R,{id:Al(c,"remove"),className:"rjsf-array-item-remove",disabled:t||g,onClick:d,uiSchema:w,registry:v})]})}function Dhe(e){const{canAdd:t,className:r,disabled:i,fieldPathId:s,uiSchema:l,items:c,optionalDataControl:f,onAddClick:d,readonly:h,registry:m,required:g,schema:v,title:w}=e,b=kt(l),_=Ut("ArrayFieldDescriptionTemplate",m,b),x=Ut("ArrayFieldTitleTemplate",m,b),R=!h&&!i,{ButtonTemplates:{AddButton:S}}=m.templates;return k.jsxs("fieldset",{className:r,id:s.$id,children:[k.jsx(x,{fieldPathId:s,title:b.title||w,required:g,schema:v,uiSchema:l,registry:m,optionalDataControl:R?f:void 0}),k.jsx(_,{fieldPathId:s,description:b.description||v.description,schema:v,uiSchema:l,registry:m}),R?void 0:f,k.jsx("div",{className:"row array-item-list",children:c}),t&&k.jsx(S,{id:Al(s,"add"),className:"rjsf-array-item-add",onClick:d,disabled:i||h,uiSchema:l,registry:m})]})}function Nhe(e){const{fieldPathId:t,title:r,schema:i,uiSchema:s,required:l,registry:c,optionalDataControl:f}=e,d=kt(s,c.globalUiOptions),{label:h=!0}=d;if(!r||!h)return null;const m=Ut("TitleFieldTemplate",c,d);return k.jsx(m,{id:w2(t),title:r,required:l,schema:i,uiSchema:s,registry:c,optionalDataControl:f})}function zhe(e){const{id:t,name:r,htmlName:i,value:s,readonly:l,disabled:c,autofocus:f,onBlur:d,onFocus:h,onChange:m,onChangeOverride:g,options:v,schema:w,uiSchema:b,registry:_,rawErrors:x,type:R,hideLabel:S,hideError:T,...E}=e,{ClearButton:O}=_.templates.ButtonTemplates;if(!t)throw console.log("No id for",e),new Error(`no id for props ${JSON.stringify(e)}`);const C={...E,...zP(w,R,v)};let M;C.type==="number"||C.type==="integer"?M=s||s===0?s:"":M=s??"";const D=j.useCallback(({target:{value:V}})=>m(V===""?v.emptyValue:V),[m,v]),$=j.useCallback(({target:V})=>d(t,V&&V.value),[d,t]),q=j.useCallback(({target:V})=>h(t,V&&V.value),[h,t]),L=j.useCallback(V=>{V.preventDefault(),V.stopPropagation(),m(v.emptyValue??"")},[m,v.emptyValue]);return k.jsxs(k.Fragment,{children:[k.jsx("input",{id:t,name:i||t,className:"form-control",readOnly:l,disabled:c,autoFocus:f,value:M,...C,list:w.examples?_b(t):void 0,onChange:g||D,onBlur:$,onFocus:q,"aria-describedby":co(t,!!w.examples)}),v.allowClearTextInputs&&!l&&!c&&M&&k.jsx(O,{registry:_,onClick:L}),Array.isArray(w.examples)&&k.jsx("datalist",{id:_b(t),children:w.examples.concat(w.default&&!w.examples.includes(w.default)?[w.default]:[]).map(V=>k.jsx("option",{value:V},V))},`datalist_${t}`)]})}function $he({uiSchema:e}){const{submitText:t,norender:r,props:i={}}=$P(e);return r?null:k.jsx("div",{children:k.jsx("button",{type:"submit",...i,className:`btn btn-info ${i.className||""}`,children:t})})}function tf(e){const{iconType:t="default",icon:r,className:i,uiSchema:s,registry:l,...c}=e;return k.jsx("button",{type:"button",className:`btn btn-${t} ${i}`,...c,children:k.jsx("i",{className:`glyphicon glyphicon-${r}`})})}function Phe(e){const{registry:{translateString:t}}=e;return k.jsx(tf,{title:t(gn.CopyButton),...e,icon:"copy"})}function Ihe(e){const{registry:{translateString:t}}=e;return k.jsx(tf,{title:t(gn.MoveDownButton),...e,icon:"arrow-down"})}function Lhe(e){const{registry:{translateString:t}}=e;return k.jsx(tf,{title:t(gn.MoveUpButton),...e,icon:"arrow-up"})}function Uhe(e){const{registry:{translateString:t}}=e;return k.jsx(tf,{title:t(gn.RemoveButton),...e,iconType:"danger",icon:"remove"})}function qhe({id:e,className:t,onClick:r,disabled:i,registry:s,...l}){const{translateString:c}=s;return k.jsx(tf,{id:e,iconType:"default",icon:"remove",className:"btn-clear col-xs-12",title:c(gn.ClearButton),onClick:r,disabled:i,registry:s,...l})}function Vhe({id:e,className:t,onClick:r,disabled:i,registry:s}){const{translateString:l}=s;return k.jsx("div",{className:"row",children:k.jsx("p",{className:`col-xs-4 col-sm-2 col-lg-1 col-xs-offset-8 col-sm-offset-10 col-lg-offset-11 text-right ${t}`,children:k.jsx(tf,{id:e,iconType:"info",icon:"plus",className:"btn-add col-xs-12",title:l(gn.AddButton),onClick:r,disabled:i,registry:s})})})}function Fhe(){return{SubmitButton:$he,AddButton:Vhe,CopyButton:Phe,MoveDownButton:Ihe,MoveUpButton:Lhe,RemoveButton:Uhe,ClearButton:qhe}}const JP=qA();function QA({description:e,registry:t,uiSchema:r={}}){const{globalUiOptions:i}=t;return kt(r,i).enableMarkdownInDescription&&typeof e=="string"?k.jsx(a1,{options:{disableParsingRawHTML:!0},"data-testid":JP.markdown,children:e}):e}QA.TEST_IDS=JP;function Bhe(e){const{id:t,description:r,registry:i,uiSchema:s}=e;return r?k.jsx("div",{id:t,className:"field-description",children:k.jsx(QA,{description:r,registry:i,uiSchema:s})}):null}function Hhe({errors:e,registry:t}){const{translateString:r}=t;return k.jsxs("div",{className:"panel panel-danger errors",children:[k.jsx("div",{className:"panel-heading",children:k.jsx("h3",{className:"panel-title",children:r(gn.ErrorsLabel)})}),k.jsx("ul",{className:"list-group",children:e.map((i,s)=>k.jsx("li",{className:"list-group-item text-danger",children:i.stack},s))})]})}function Ghe(e){const{schema:t,registry:r,typeSelector:i,schemaField:s}=e,l=Ut("MultiSchemaFieldTemplate",r);return k.jsx(l,{selector:i,optionSchemaField:s,schema:t,registry:r})}const Khe="*";function eI(e){const{label:t,required:r,id:i}=e;return t?k.jsxs("label",{className:"control-label",htmlFor:i,children:[t,r&&k.jsx("span",{className:"required",children:Khe})]}):null}function Yhe(e){const{id:t,label:r,children:i,errors:s,help:l,description:c,hidden:f,required:d,displayLabel:h,registry:m,uiSchema:g}=e,v=kt(g),w=Ut("WrapIfAdditionalTemplate",m,v);if(f)return k.jsx("div",{className:"hidden",children:i});const b=v.widget==="checkbox";return k.jsxs(w,{...e,children:[h&&!b&&k.jsx(eI,{label:r,required:d,id:t}),h&&c?c:null,i,s,l]})}function Zhe(e){const{errors:t=[],fieldPathId:r}=e;if(t.length===0)return null;const i=VA(r);return k.jsx("div",{children:k.jsx("ul",{id:i,className:"error-detail bs-callout bs-callout-info",children:t.filter(s=>!!s).map((s,l)=>k.jsx("li",{className:"text-danger",children:s},l))})})}const tI=qA();function WA({help:e,registry:t,uiSchema:r={}}){const{globalUiOptions:i}=t;return kt(r,i).enableMarkdownInHelp&&typeof e=="string"?k.jsx(a1,{options:{disableParsingRawHTML:!0},"data-testid":tI.markdown,children:e}):e}WA.TEST_IDS=tI;function Xhe(e){const{fieldPathId:t,help:r,uiSchema:i,registry:s}=e;return r?k.jsx("div",{id:FA(t),className:"help-block",children:k.jsx(WA,{help:r,registry:s,uiSchema:i})}):null}function Qhe(e){const{children:t,column:r,className:i,...s}=e;return k.jsx("div",{className:i,...s,children:t})}function Whe(e){const{selector:t,optionSchemaField:r}=e;return k.jsxs("div",{className:"panel panel-default panel-body",children:[k.jsx("div",{className:"form-group",children:t}),r]})}function Jhe(e){const{className:t,description:r,disabled:i,formData:s,fieldPathId:l,onAddProperty:c,optionalDataControl:f,properties:d,readonly:h,registry:m,required:g,schema:v,title:w,uiSchema:b}=e,_=kt(b),x=Ut("TitleFieldTemplate",m,_),R=Ut("DescriptionFieldTemplate",m,_);if((v.oneOf||v.anyOf)&&!v.properties&&d.length===0)return null;const T=!h&&!i,{ButtonTemplates:{AddButton:E}}=m.templates;return k.jsxs("fieldset",{className:t,id:l.$id,children:[w&&k.jsx(x,{id:w2(l),title:w,required:g,schema:v,uiSchema:b,registry:m,optionalDataControl:T?f:void 0}),r&&k.jsx(R,{id:op(l),description:r,schema:v,uiSchema:b,registry:m}),T?void 0:f,d.map(O=>O.content),sP(v,b,s)&&k.jsx(E,{id:Al(l,"add"),className:"rjsf-object-property-expand",onClick:c,disabled:i||h,uiSchema:b,registry:m})]})}function epe(e){const{id:t,registry:r,label:i,onAddClick:s,onRemoveClick:l}=e;return s?k.jsx(tf,{id:t,registry:r,icon:"plus",className:"rjsf-add-optional-data btn-sm",onClick:s,title:i}):l?k.jsx(tf,{id:t,registry:r,icon:"remove",className:"rjsf-remove-optional-data btn-sm",onClick:l,title:i}):k.jsx("em",{id:t,children:i})}const tpe="*";function npe(e){const{id:t,title:r,required:i,optionalDataControl:s}=e;return k.jsxs("legend",{id:t,children:[r,i&&k.jsx("span",{className:"required",children:tpe}),s&&k.jsx("span",{className:"pull-right",style:{marginBottom:"2px"},children:s})]})}function rpe(e){const{schema:t,fieldPathId:r,reason:i,registry:s}=e,{translateString:l}=s;let c=gn.UnsupportedField;const f=[];return r&&r.$id&&(c=gn.UnsupportedFieldWithId,f.push(r.$id)),i&&(c=c===gn.UnsupportedField?gn.UnsupportedFieldWithReason:gn.UnsupportedFieldWithIdAndReason,f.push(i)),k.jsxs("div",{className:"unsupported-field",children:[k.jsx("p",{children:k.jsx(a1,{options:{disableParsingRawHTML:!0},children:l(c,f)})}),t&&k.jsx("pre",{children:JSON.stringify(t,null,2)})]})}function ape(e){const{id:t,classNames:r,style:i,disabled:s,displayLabel:l,label:c,onKeyRenameBlur:f,onRemoveProperty:d,rawDescription:h,readonly:m,required:g,schema:v,hideError:w,rawErrors:b,children:_,uiSchema:x,registry:R}=e,{templates:S,translateString:T}=R,{RemoveButton:E}=S.ButtonTemplates,O=T(gn.KeyLabel,[c]),C=uc in v,M=!!h,D=["form-group",r];!w&&b&&b.length>0&&D.push("has-error has-danger");const $=D.join(" ").trim();if(!C)return k.jsx("div",{className:$,style:i,children:_});const q=M?46:26;return k.jsx("div",{className:$,style:i,children:k.jsxs("div",{className:"row",children:[k.jsx("div",{className:"col-xs-5 form-additional",children:k.jsxs("div",{className:"form-group",children:[l&&k.jsx(eI,{label:O,required:g,id:`${t}-key`}),l&&h&&k.jsx("div",{children:" "}),k.jsx("input",{className:"form-control",type:"text",id:`${t}-key`,onBlur:f,defaultValue:c})]})}),k.jsx("div",{className:"form-additional form-group col-xs-5",children:_}),k.jsx("div",{className:"col-xs-2",style:{marginTop:l?`${q}px`:void 0},children:k.jsx(E,{id:Al(t,"remove"),className:"rjsf-object-property-remove btn-block",style:{border:"0"},disabled:s||m,onClick:d,uiSchema:x,registry:R})})]})})}function ipe(){return{ArrayFieldDescriptionTemplate:Mhe,ArrayFieldItemTemplate:jhe,ArrayFieldItemButtonsTemplate:khe,ArrayFieldTemplate:Dhe,ArrayFieldTitleTemplate:Nhe,ButtonTemplates:Fhe(),BaseInputTemplate:zhe,DescriptionFieldTemplate:Bhe,ErrorListTemplate:Hhe,FallbackFieldTemplate:Ghe,FieldTemplate:Yhe,FieldErrorTemplate:Zhe,FieldHelpTemplate:Xhe,GridTemplate:Qhe,MultiSchemaFieldTemplate:Whe,ObjectFieldTemplate:Jhe,OptionalDataControlsTemplate:epe,TitleFieldTemplate:npe,UnsupportedFieldTemplate:rpe,WrapIfAdditionalTemplate:ape}}function ope(e){const{disabled:t=!1,readonly:r=!1,autofocus:i=!1,options:s,id:l,name:c,registry:f,onBlur:d,onFocus:h}=e,{translateString:m}=f,{elements:g,handleChange:v,handleClear:w,handleSetNow:b}=Rfe(e);return k.jsxs("ul",{className:"list-inline",children:[g.map((_,x)=>k.jsx("li",{className:"list-inline-item",children:k.jsx(Ofe,{rootId:l,name:c,select:v,..._,disabled:t,readonly:r,registry:f,onBlur:d,onFocus:h,autofocus:i&&x===0})},x)),(s.hideNowButton!=="undefined"?!s.hideNowButton:!0)&&k.jsx("li",{className:"list-inline-item",children:k.jsx("a",{href:"#",className:"btn btn-info btn-now",onClick:b,children:m(gn.NowLabel)})}),(s.hideClearButton!=="undefined"?!s.hideClearButton:!0)&&k.jsx("li",{className:"list-inline-item",children:k.jsx("a",{href:"#",className:"btn btn-warning btn-clear",onClick:w,children:m(gn.ClearLabel)})})]})}function spe({time:e=!0,...t}){const{AltDateWidget:r}=t.registry.widgets;return k.jsx(r,{time:e,...t})}function lpe({schema:e,uiSchema:t,options:r,id:i,value:s,disabled:l,readonly:c,label:f,hideLabel:d,autofocus:h=!1,onBlur:m,onFocus:g,onChange:v,registry:w,htmlName:b}){const _=Ut("DescriptionFieldTemplate",w,r),x=Jv(e),R=j.useCallback(M=>v(M.target.checked),[v]),S=j.useCallback(M=>m(i,M.target.checked),[m,i]),T=j.useCallback(M=>g(i,M.target.checked),[g,i]),C=kt(t).widget==="checkbox"?void 0:r.description??e.description;return k.jsxs("div",{className:`checkbox ${l||c?"disabled":""}`,children:[!d&&C&&k.jsx(_,{id:op(i),description:C,schema:e,uiSchema:t,registry:w}),k.jsxs("label",{children:[k.jsx("input",{type:"checkbox",id:i,name:b||i,checked:typeof s>"u"?!1:s,required:x,disabled:l||c,autoFocus:h,onChange:R,onBlur:S,onFocus:T,"aria-describedby":co(i)}),PP(k.jsx("span",{children:f}),d)]})]})}function upe({id:e,disabled:t,options:{inline:r=!1,enumOptions:i,enumDisabled:s,emptyValue:l},value:c,autofocus:f=!1,readonly:d,onChange:h,onBlur:m,onFocus:g,htmlName:v}){const w=Array.isArray(c)?c:[c],b=j.useCallback(({target:x})=>m(e,Na(x&&x.value,i,l)),[m,e,i,l]),_=j.useCallback(({target:x})=>g(e,Na(x&&x.value,i,l)),[g,e,i,l]);return k.jsx("div",{className:"checkboxes",id:e,children:Array.isArray(i)&&i.map((x,R)=>{const S=n1(x.value,w),T=Array.isArray(s)&&s.indexOf(x.value)!==-1,E=t||T||d?"disabled":"",O=M=>{M.target.checked?h(kP(R,w,i)):h(MP(R,w,i))},C=k.jsxs("span",{children:[k.jsx("input",{type:"checkbox",id:$h(e,R),name:v||e,checked:S,value:String(R),disabled:t||T||d,autoFocus:f&&R===0,onChange:O,onBlur:b,onFocus:_,"aria-describedby":co(e)}),k.jsx("span",{children:x.label})]});return r?k.jsx("label",{className:`checkbox-inline ${E}`,children:C},R):k.jsx("div",{className:`checkbox ${E}`,children:k.jsx("label",{children:C})},R)})})}function cpe(e){const{disabled:t,readonly:r,options:i,registry:s}=e,l=Ut("BaseInputTemplate",s,i);return k.jsx(l,{type:"color",...e,disabled:t||r})}function fpe(e){const{onChange:t,options:r,registry:i}=e,s=Ut("BaseInputTemplate",i,r),l=j.useCallback(c=>t(c||void 0),[t]);return k.jsx(s,{type:"date",...e,onChange:l})}function dpe(e){const{onChange:t,value:r,options:i,registry:s}=e,l=Ut("BaseInputTemplate",s,i);return k.jsx(l,{type:"datetime-local",...e,value:Dfe(r),onChange:c=>t(xfe(c))})}function hpe(e){const{options:t,registry:r}=e,i=Ut("BaseInputTemplate",r,t);return k.jsx(i,{type:"email",...e})}function ppe({fileInfo:e,registry:t}){const{translateString:r}=t,{dataURL:i,type:s,name:l}=e;return i?["image/jpeg","image/png"].includes(s)?k.jsx("img",{src:i,style:{maxWidth:"100%"},className:"file-preview"}):k.jsxs(k.Fragment,{children:[" ",k.jsx("a",{download:`preview-${l}`,href:i,className:"file-download",children:r(gn.PreviewLabel)})]}):null}function mpe({filesInfo:e,registry:t,preview:r,onRemove:i,options:s}){if(e.length===0)return null;const{translateString:l}=t,{RemoveButton:c}=Ut("ButtonTemplates",t,s);return k.jsx("ul",{className:"file-info",children:e.map((f,d)=>{const{name:h,size:m,type:g}=f,v=()=>i(d);return k.jsxs("li",{children:[k.jsx(a1,{children:l(gn.FilesInfo,[h,g,String(m)])}),r&&k.jsx(ppe,{fileInfo:f,registry:t}),k.jsx(c,{onClick:v,registry:t})]},d)})})}function gpe(e){const{disabled:t,readonly:r,required:i,multiple:s,onChange:l,value:c,options:f,registry:d}=e,{filesInfo:h,handleChange:m,handleRemove:g}=kfe(c,l,s),v=Ut("BaseInputTemplate",d,f),w=b=>{b.target.files&&m(b.target.files)};return k.jsxs("div",{children:[k.jsx(v,{...e,disabled:t||r,type:"file",required:c?!1:i,onChangeOverride:w,value:"",accept:f.accept?String(f.accept):void 0}),k.jsx(mpe,{filesInfo:h,onRemove:g,registry:d,preview:f.filePreview,options:f})]})}function ype({id:e,value:t,htmlName:r}){return k.jsx("input",{type:"hidden",id:e,name:r||e,value:typeof t>"u"?"":t})}function vpe(e){const{options:t,registry:r}=e,i=Ut("BaseInputTemplate",r,t);return k.jsx(i,{type:"password",...e})}function bpe({options:e,value:t,required:r,disabled:i,readonly:s,autofocus:l=!1,onBlur:c,onFocus:f,onChange:d,id:h,htmlName:m}){const{enumOptions:g,enumDisabled:v,inline:w,emptyValue:b}=e,_=j.useCallback(({target:R})=>c(h,Na(R&&R.value,g,b)),[c,g,b,h]),x=j.useCallback(({target:R})=>f(h,Na(R&&R.value,g,b)),[f,g,b,h]);return k.jsx("div",{className:"field-radio-group",id:h,role:"radiogroup",children:Array.isArray(g)&&g.map((R,S)=>{const T=n1(R.value,t),E=Array.isArray(v)&&v.indexOf(R.value)!==-1,O=i||E||s?"disabled":"",C=()=>d(R.value),M=k.jsxs("span",{children:[k.jsx("input",{type:"radio",id:$h(h,S),checked:T,name:m||h,required:r,value:String(S),disabled:i||E||s,autoFocus:l&&S===0,onChange:C,onBlur:_,onFocus:x,"aria-describedby":co(h)}),k.jsx("span",{children:R.label})]});return w?k.jsx("label",{className:`radio-inline ${O}`,children:M},S):k.jsx("div",{className:`radio ${O}`,children:k.jsx("label",{children:M})},S)})})}function Spe(e){const{value:t,registry:{templates:{BaseInputTemplate:r}}}=e;return k.jsxs("div",{className:"field-range-wrapper",children:[k.jsx(r,{type:"range",...e}),k.jsx("span",{className:"range-view",children:t})]})}function wpe({id:e,value:t,required:r,disabled:i,readonly:s,autofocus:l,onChange:c,onFocus:f,onBlur:d,schema:h,options:m,htmlName:g}){const{stars:v=5,shape:w="star"}=m,b=h.maximum?Math.min(h.maximum,5):Math.min(Math.max(v,1),5),_=h.minimum||0,x=j.useCallback(E=>{!i&&!s&&c(E)},[c,i,s]),R=j.useCallback(E=>{if(f){const O=Number(E.target.dataset.value);f(e,O)}},[f,e]),S=j.useCallback(E=>{if(d){const O=Number(E.target.dataset.value);d(e,O)}},[d,e]),T=E=>w==="heart"?E?"♥":"♡":E?"★":"☆";return k.jsx(k.Fragment,{children:k.jsxs("div",{className:"rating-widget",style:{display:"inline-flex",fontSize:"1.5rem",cursor:i||s?"default":"pointer"},children:[[...Array(b)].map((E,O)=>{const C=_+O,M=C<=t;return k.jsx("span",{onClick:()=>x(C),onFocus:R,onBlur:S,"data-value":C,tabIndex:i||s?-1:0,role:"radio","aria-checked":C===t,"aria-label":`${C} ${w==="heart"?"heart":"star"}${C===1?"":"s"}`,style:{color:M?"#FFD700":"#ccc",padding:"0 0.2rem",transition:"color 0.2s",userSelect:"none"},children:T(M)},O)}),k.jsx("input",{type:"hidden",id:e,name:g||e,value:t||"",required:r,disabled:i||s,"aria-hidden":"true"})]})})}function lT(e,t){return t?Array.from(e.target.options).slice().filter(r=>r.selected).map(r=>r.value):e.target.value}function Epe({schema:e,id:t,options:r,value:i,required:s,disabled:l,readonly:c,multiple:f=!1,autofocus:d=!1,onChange:h,onBlur:m,onFocus:g,placeholder:v,htmlName:w}){const{enumOptions:b,enumDisabled:_,emptyValue:x}=r,R=f?[]:"",S=j.useCallback(M=>{const D=lT(M,f);return g(t,Na(D,b,x))},[g,t,f,b,x]),T=j.useCallback(M=>{const D=lT(M,f);return m(t,Na(D,b,x))},[m,t,f,b,x]),E=j.useCallback(M=>{const D=lT(M,f);return h(Na(D,b,x))},[h,f,b,x]),O=jP(i,b,f),C=!f&&e.default===void 0;return k.jsxs("select",{id:t,name:w||t,multiple:f,role:"combobox",className:"form-control",value:typeof O>"u"?R:O,required:s,disabled:l||c,autoFocus:d,onBlur:T,onFocus:S,onChange:E,"aria-describedby":co(t),children:[C&&k.jsx("option",{value:"",children:v}),Array.isArray(b)&&b.map(({value:M,label:D},$)=>{const q=_&&_.indexOf(M)!==-1;return k.jsx("option",{value:String($),disabled:q,children:D},$)})]})}function xpe({id:e,options:t={},placeholder:r,value:i,required:s,disabled:l,readonly:c,autofocus:f=!1,onChange:d,onBlur:h,onFocus:m,htmlName:g}){const v=j.useCallback(({target:{value:_}})=>d(_===""?t.emptyValue:_),[d,t.emptyValue]),w=j.useCallback(({target:_})=>h(e,_&&_.value),[h,e]),b=j.useCallback(({target:_})=>m(e,_&&_.value),[e,m]);return k.jsx("textarea",{id:e,name:g||e,className:"form-control",value:i||"",placeholder:r,required:s,disabled:l,readOnly:c,autoFocus:f,rows:t.rows,onBlur:w,onFocus:b,onChange:v,"aria-describedby":co(e)})}function _pe(e){const{options:t,registry:r}=e,i=Ut("BaseInputTemplate",r,t);return k.jsx(i,{...e})}function Tpe(e){const{onChange:t,options:r,registry:i}=e,s=Ut("BaseInputTemplate",i,r),l=j.useCallback(c=>t(c?`${c}:00`:void 0),[t]);return k.jsx(s,{type:"time",...e,onChange:l})}function Cpe(e){const{options:t,registry:r}=e,i=Ut("BaseInputTemplate",r,t);return k.jsx(i,{type:"url",...e})}function Ope(e){const{options:t,registry:r}=e,i=Ut("BaseInputTemplate",r,t);return k.jsx(i,{type:"number",...e})}function Rpe(){return{AltDateWidget:ope,AltDateTimeWidget:spe,CheckboxWidget:lpe,CheckboxesWidget:upe,ColorWidget:cpe,DateWidget:fpe,DateTimeWidget:dpe,EmailWidget:hpe,FileWidget:gpe,HiddenWidget:ype,PasswordWidget:vpe,RadioWidget:bpe,RangeWidget:Spe,RatingWidget:wpe,SelectWidget:Epe,TextWidget:_pe,TextareaWidget:xpe,TimeWidget:Tpe,UpDownWidget:Ope,URLWidget:Cpe}}function Ape(){return{fields:Ahe(),templates:ipe(),widgets:Rpe(),rootSchema:{},formContext:{},translateString:dfe,globalFormOptions:{idPrefix:aP,idSeparator:iP,useFallbackUiForUnsupportedType:!1}}}function bp(e,t){return{...dR(e,["schema","uiSchema","fieldPathId","schemaUtils","formData","edit","errors","errorSchema"]),...t!==void 0&&{status:t}}}class Mpe extends j.Component{formElement;pendingChanges=[];_isProcessingUserChange=!1;constructor(t){if(super(t),!t.validator)throw new Error("A validator is required for Form functionality to work");const{formData:r,initialFormData:i,onChange:s}=t,l=r??i;this.state=this.getStateFromProps(t,l,void 0,void 0,void 0,!0),s&&!yr(this.state.formData,l)&&s(bp(this.state)),this.formElement=j.createRef()}getSnapshotBeforeUpdate(t,r){if(!yr(this.props,t)){const i=zk(this.props.formData,t.formData),s=zk(this.props.formData,this.state.formData),l=!yr(t.schema,this.props.schema),c=i.length>0||!yr(t.formData,this.props.formData),f=s.length>0||!yr(this.state.formData,this.props.formData),d=this.getStateFromProps(this.props,this.props.formData,l||c?void 0:this.state.retrievedSchema,l,i,!f),h=!yr(d,r);return{nextState:d,shouldUpdate:h}}return{shouldUpdate:!1}}componentDidUpdate(t,r,i){if(i.shouldUpdate){const{nextState:s}=i,l=!yr(s.formData,this.props.formData),c=this._isProcessingUserChange;if(this._isProcessingUserChange=!1,c&&l)return;l&&!yr(s.formData,r.formData)&&this.props.onChange&&this.props.onChange(bp(s)),this.setState(s)}}getStateFromProps(t,r,i,s=!1,l=[],c=!1){const f=this.state||{},d="schema"in t?t.schema:this.props.schema,h="validator"in t?t.validator:this.props.validator,m=("uiSchema"in t?t.uiSchema:this.props.uiSchema)||{},g=t.formData===void 0&&this.props.formData===void 0,v=typeof r<"u",w="liveValidate"in t?t.liveValidate:this.props.liveValidate,b=v&&!t.noValidate&&w,_="experimental_defaultFormStateBehavior"in t?t.experimental_defaultFormStateBehavior:this.props.experimental_defaultFormStateBehavior,x="experimental_customMergeAllOf"in t?t.experimental_customMergeAllOf:this.props.experimental_customMergeAllOf;let R=f.schemaUtils;(!R||R.doesSchemaUtilsDiffer(h,d,_,x))&&(R=ufe(h,d,_,x));const S=R.getRootSchema();let T=r;r===fD?T=void 0:r===void 0&&g&&(T=f.formData);const E=R.getDefaultFormState(S,T,!1,f.initialDefaultsGenerated),O=this.updateRetrievedSchema(i??R.retrieveSchema(S,E)),C=()=>t.noValidate||s?{errors:[],errorSchema:{}}:t.liveValidate?{errors:f.errors||[],errorSchema:f.errorSchema||{}}:{errors:f.schemaValidationErrors||[],errorSchema:f.schemaValidationErrorSchema||{}};let M,D,$=f.schemaValidationErrors,q=f.schemaValidationErrorSchema;if(b&&!c){const ae=this.liveValidate(S,R,f.errorSchema,E,void 0,f.customErrors,i,i!==void 0);M=ae.errors,D=ae.errorSchema,$=ae.schemaValidationErrors,q=ae.schemaValidationErrorSchema}else{const ae=C();if(M=ae.errors,D=ae.errorSchema,l.length>0&&!b){const B=l.reduce((Y,fe)=>(Y[fe]=void 0,Y),{});D=q=xb(ae.errorSchema,B,"preventDuplicates")}const K=this.mergeErrors({errorSchema:D,errors:M},t.extraErrors,f.customErrors);M=K.errors,D=K.errorSchema}const L=this.getRegistry(t,S,R),V=yr(f.registry,L)?f.registry:L,F=f.fieldPathId&&f.fieldPathId?.[or]===V.globalFormOptions.idPrefix?f.fieldPathId:ps("",V.globalFormOptions);return{schemaUtils:R,schema:S,uiSchema:m,fieldPathId:F,formData:E,edit:v,errors:M,errorSchema:D,schemaValidationErrors:$,schemaValidationErrorSchema:q,retrievedSchema:O,initialDefaultsGenerated:!0,registry:V}}shouldComponentUpdate(t,r){const{experimental_componentUpdateStrategy:i="customDeep"}=this.props;return IP(this,t,r,i)}validate(t,r=this.state.schema,i,s){const l=i||this.state.schemaUtils,{customValidate:c,transformErrors:f,uiSchema:d}=this.props,h=s??l.retrieveSchema(r,t);return l.getValidator().validateFormData(t,h,c,f,d)}renderErrors(t){const{errors:r,errorSchema:i,schema:s,uiSchema:l}=this.state,c=kt(l),f=Ut("ErrorListTemplate",t,c);return r&&r.length?k.jsx(f,{errors:r,errorSchema:i||{},schema:s,uiSchema:l,registry:t}):null}mergeErrors(t,r,i){let s=t.errorSchema,l=t.errors;if(r){const c=ZS(t,r);s=c.errorSchema,l=c.errors}if(i){const c=ZS(t,i.ErrorSchema,!0);s=c.errorSchema,l=c.errors}return{errors:l,errorSchema:s}}liveValidate(t,r,i,s,l,c,f,d=!1){const h=this.validate(s,t,r,f),m=h.errors;let g=h.errorSchema;d&&(g=xb(i,h.errorSchema,"preventDuplicates"));const v=m,w=g;return{...this.mergeErrors({errorSchema:g,errors:m},l,c),schemaValidationErrors:v,schemaValidationErrorSchema:w}}getUsedFormData=(t,r)=>OP(t,r);getFieldNames=(t,r)=>RP(t,r);omitExtraData=t=>{const{schema:r,schemaUtils:i}=this.state;return i.omitExtraData(r,t)};setFieldValue=(t,r)=>{const{registry:i}=this.state,s=Array.isArray(t)?t:t.split("."),l=ps("",i.globalFormOptions,s);this.onChange(r,s,void 0,l[or])};onChange=(t,r,i,s)=>{this.pendingChanges.push({newValue:t,path:r,newErrorSchema:i,id:s}),this.pendingChanges.length===1&&this.processPendingChange()};processPendingChange(){if(this.pendingChanges.length===0)return;this._isProcessingUserChange=!0;const{newValue:t,path:r,id:i}=this.pendingChanges[0],{newErrorSchema:s}=this.pendingChanges[0],{extraErrors:l,omitExtraData:c,liveOmit:f,noValidate:d,liveValidate:h,onChange:m}=this.props,{formData:g,schemaUtils:v,schema:w,fieldPathId:b,schemaValidationErrorSchema:_,errors:x}=this.state;let{customErrors:R,errorSchema:S}=this.state;const T=b.path[0]||"",E=!r||r.length===0||r.length===1&&r[0]===T;let O=this.state.retrievedSchema,C=E?t:Fb(g);const M=Rn(C)&&Object.keys(C).length>0&&Object.values(C).every(F=>F===void 0),D=g==null,$=M&&D?void 0:C;if(Rn(C)||Array.isArray(C)){t===WP?xY(C,r):E||Gn(C,r,t);const F=this.getStateFromProps(this.props,$,void 0,void 0,void 0,!0);C=F.formData,O=F.retrievedSchema}const q=!d&&(h===!0||h==="onChange");let L={formData:C,schema:w},V=C;if(c===!0&&(f===!0||f==="onChange")&&(V=this.omitExtraData(C),L={formData:V}),s){const F=E?_:Ve(_,r);if(!oa(F))E?S=s:Gn(S,r,s);else if(R||(R=new DP),E){const re=Ve(s,pi);re&&R.setErrors(re)}else Gn(R.ErrorSchema,r,s)}else R&&Ve(R.ErrorSchema,[...r,pi])&&R.clearErrors(r);if(q&&this.pendingChanges.length===1){const F=this.liveValidate(w,v,S,V,l,R,O);L={formData:V,...F,customErrors:R}}else if(!d&&s){const F=this.mergeErrors({errorSchema:S,errors:x},l,R);L={formData:V,...F,customErrors:R}}this.setState(L,()=>{m&&m(bp({...this.state,...L}),i),this.pendingChanges.shift(),this.processPendingChange()})}updateRetrievedSchema(t){return yr(t,this.state?.retrievedSchema)?this.state.retrievedSchema:t}reset=()=>{const{formData:t,initialFormData:r=fD,onChange:i}=this.props,c={formData:this.getStateFromProps(this.props,t??r,void 0,void 0,void 0,!0).formData,errorSchema:{},errors:[],schemaValidationErrors:[],schemaValidationErrorSchema:{},initialDefaultsGenerated:!1,customErrors:void 0};this.setState(c,()=>i&&i(bp({...this.state,...c})))};onBlur=(t,r)=>{const{onBlur:i,omitExtraData:s,liveOmit:l,liveValidate:c}=this.props;if(i&&i(t,r),s===!0&&l==="onBlur"||c==="onBlur"){const{onChange:f,extraErrors:d}=this.props,{formData:h}=this.state;let m=h,g={formData:m};if(s===!0&&l==="onBlur"&&(m=this.omitExtraData(h),g={formData:m}),c==="onBlur"){const{schema:w,schemaUtils:b,errorSchema:_,customErrors:x,retrievedSchema:R}=this.state,S=this.liveValidate(w,b,_,m,d,x,R);g={formData:m,...S,customErrors:x}}const v=Object.keys(g).filter(w=>!w.startsWith("schemaValidation")).some(w=>{const b=Ve(this.state,w),_=Ve(g,w);return!yr(b,_)});this.setState(g,()=>{f&&v&&f(bp({...this.state,...g}),t)})}};onFocus=(t,r)=>{const{onFocus:i}=this.props;i&&i(t,r)};onSubmit=t=>{if(t.preventDefault(),t.target!==t.currentTarget)return;t.persist();const{omitExtraData:r,extraErrors:i,noValidate:s,onSubmit:l}=this.props;let{formData:c}=this.state;if(r===!0&&(c=this.omitExtraData(c)),s||this.validateFormWithFormData(c)){const f=i||{},d=i?HA(i):[];this.setState({formData:c,errors:d,errorSchema:f,schemaValidationErrors:[],schemaValidationErrorSchema:{}},()=>{l&&l(bp({...this.state,formData:c},"submitted"),t)})}};getGlobalFormOptions(t){const{uiSchema:r={},experimental_componentUpdateStrategy:i,idSeparator:s=iP,idPrefix:l=aP,nameGenerator:c,useFallbackUiForUnsupportedType:f=!1}=t;return{idPrefix:r["ui:rootFieldId"]||l,idSeparator:s,useFallbackUiForUnsupportedType:f,...i!==void 0&&{experimental_componentUpdateStrategy:i},...c!==void 0&&{nameGenerator:c}}}getRegistry(t,r,i){const{translateString:s,uiSchema:l={}}=t,{fields:c,templates:f,widgets:d,formContext:h,translateString:m}=Ape();return{fields:{...c,...t.fields},templates:{...f,...t.templates,ButtonTemplates:{...f.ButtonTemplates,...t.templates?.ButtonTemplates}},widgets:{...d,...t.widgets},rootSchema:r,formContext:t.formContext||h,schemaUtils:i,translateString:s||m,globalUiOptions:l[tO],globalFormOptions:this.getGlobalFormOptions(t)}}submit=()=>{if(this.formElement.current){const t=new CustomEvent("submit",{cancelable:!0});t.preventDefault(),this.formElement.current.dispatchEvent(t),this.formElement.current.requestSubmit()}};focusOnError(t){const{idPrefix:r="root",idSeparator:i="_"}=this.props,{property:s}=t,l=m6(s);l[0]===""?l[0]=r:l.unshift(r);const c=l.join(i);let f=this.formElement.current.elements[c];f||(f=this.formElement.current.querySelector(`input[id^="${c}"`)),f&&f.length&&(f=f[0]),f&&f.focus()}validateFormWithFormData=t=>{const{extraErrors:r,extraErrorsBlockSubmit:i,focusOnFirstError:s,onError:l}=this.props,{errors:c}=this.state,f=this.validate(t);let d=f.errors,h=f.errorSchema;const m=d,g=h,v=d.length>0||r&&i;if(v){if(r){const w=ZS(f,r);h=w.errorSchema,d=w.errors}s&&(typeof s=="function"?s(d[0]):this.focusOnError(d[0])),this.setState({errors:d,errorSchema:h,schemaValidationErrors:m,schemaValidationErrorSchema:g},()=>{l?l(d):console.error("Form validation failed",d)})}else c.length>0&&this.setState({errors:[],errorSchema:{},schemaValidationErrors:[],schemaValidationErrorSchema:{}});return!v};validateForm(){const{omitExtraData:t}=this.props;let{formData:r}=this.state;return t===!0&&(r=this.omitExtraData(r)),this.validateFormWithFormData(r)}render(){const{children:t,id:r,className:i="",tagName:s,name:l,method:c,target:f,action:d,autoComplete:h,enctype:m,acceptCharset:g,noHtml5Validate:v=!1,disabled:w,readonly:b,showErrorList:_="top",_internalFormWrapper:x}=this.props,{schema:R,uiSchema:S,formData:T,errorSchema:E,fieldPathId:O,registry:C}=this.state,{SchemaField:M}=C.fields,{SubmitButton:D}=C.templates.ButtonTemplates,$=x?s:void 0,q=x||s||"form";let{[Mw]:L={}}=kt(S);w&&(L={...L,props:{...L.props,disabled:!0}});const V={[Lc]:{[Mw]:L}};return k.jsxs(q,{className:i||"rjsf",id:r,name:l,method:c,target:f,action:d,autoComplete:h,encType:m,acceptCharset:g,noValidate:v,onSubmit:this.onSubmit,as:$,ref:this.formElement,children:[_==="top"&&this.renderErrors(C),k.jsx(M,{name:"",schema:R,uiSchema:S,errorSchema:E,fieldPathId:O,formData:T,onChange:this.onChange,onBlur:this.onBlur,onFocus:this.onFocus,registry:C,disabled:w,readonly:b}),t||k.jsx(D,{uiSchema:V,registry:C}),_==="bottom"&&this.renderErrors(C)]})}}function jpe(e){return j.forwardRef(({fields:t,widgets:r,templates:i,...s},l)=>(t={...e?.fields,...t},r={...e?.widgets,...r},i={...e?.templates,...i,ButtonTemplates:{...e?.templates?.ButtonTemplates,...i?.ButtonTemplates}},k.jsx(Mpe,{...e,...s,fields:t,widgets:r,templates:i,ref:l})))}var yS={exports:{}},uT={},dD;function kpe(){return dD||(dD=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t($,q){return{validate:$,compare:q}}e.fullFormats={date:t(l,c),time:t(d,h),"date-time":t(g,v),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:_,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:D,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:R,int32:{type:"number",validate:E},int64:{type:"number",validate:O},float:{type:"number",validate:C},double:{type:"number",validate:C},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,c),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,h),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,v),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function r($){return $%4===0&&($%100!==0||$%400===0)}const i=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,s=[0,31,28,31,30,31,30,31,31,30,31,30,31];function l($){const q=i.exec($);if(!q)return!1;const L=+q[1],V=+q[2],F=+q[3];return V>=1&&V<=12&&F>=1&&F<=(V===2&&r(L)?29:s[V])}function c($,q){if($&&q)return $>q?1:$<q?-1:0}const f=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function d($,q){const L=f.exec($);if(!L)return!1;const V=+L[1],F=+L[2],re=+L[3],ae=L[5];return(V<=23&&F<=59&&re<=59||V===23&&F===59&&re===60)&&(!q||ae!=="")}function h($,q){if(!($&&q))return;const L=f.exec($),V=f.exec(q);if(L&&V)return $=L[1]+L[2]+L[3]+(L[4]||""),q=V[1]+V[2]+V[3]+(V[4]||""),$>q?1:$<q?-1:0}const m=/t|\s/i;function g($){const q=$.split(m);return q.length===2&&l(q[0])&&d(q[1],!0)}function v($,q){if(!($&&q))return;const[L,V]=$.split(m),[F,re]=q.split(m),ae=c(L,F);if(ae!==void 0)return ae||h(V,re)}const w=/\/|:/,b=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function _($){return w.test($)&&b.test($)}const x=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function R($){return x.lastIndex=0,x.test($)}const S=-2147483648,T=2**31-1;function E($){return Number.isInteger($)&&$<=T&&$>=S}function O($){return Number.isInteger($)}function C(){return!0}const M=/[^\\]\\Z/;function D($){if(M.test($))return!1;try{return new RegExp($),!0}catch{return!1}}})(uT)),uT}var cT={},hD;function Dpe(){return hD||(hD=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=BR(),r=dn(),i=r.operators,s={formatMaximum:{okStr:"<=",ok:i.LTE,fail:i.GT},formatMinimum:{okStr:">=",ok:i.GTE,fail:i.LT},formatExclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},formatExclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}},l={message:({keyword:f,schemaCode:d})=>r.str`should be ${s[f].okStr} ${d}`,params:({keyword:f,schemaCode:d})=>r._`{comparison: ${s[f].okStr}, limit: ${d}}`};e.formatLimitDefinition={keyword:Object.keys(s),type:"string",schemaType:"string",$data:!0,error:l,code(f){const{gen:d,data:h,schemaCode:m,keyword:g,it:v}=f,{opts:w,self:b}=v;if(!w.validateFormats)return;const _=new t.KeywordCxt(v,b.RULES.all.format.definition,"format");_.$data?x():R();function x(){const T=d.scopeValue("formats",{ref:b.formats,code:w.code.formats}),E=d.const("fmt",r._`${T}[${_.schemaCode}]`);f.fail$data(r.or(r._`typeof ${E} != "object"`,r._`${E} instanceof RegExp`,r._`typeof ${E}.compare != "function"`,S(E)))}function R(){const T=_.schema,E=b.formats[T];if(!E||E===!0)return;if(typeof E!="object"||E instanceof RegExp||typeof E.compare!="function")throw new Error(`"${g}": format "${T}" does not define "compare" function`);const O=d.scopeValue("formats",{key:T,ref:E,code:w.code.formats?r._`${w.code.formats}${r.getProperty(T)}`:void 0});f.fail$data(S(O))}function S(T){return r._`${T}.compare(${h}, ${m}) ${s[g].fail} 0`}},dependencies:["format"]};const c=f=>(f.addKeyword(e.formatLimitDefinition),f);e.default=c})(cT)),cT}var pD;function Npe(){return pD||(pD=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=kpe(),i=Dpe(),s=dn(),l=new s.Name("fullFormats"),c=new s.Name("fastFormats"),f=(h,m={keywords:!0})=>{if(Array.isArray(m))return d(h,m,r.fullFormats,l),h;const[g,v]=m.mode==="fast"?[r.fastFormats,c]:[r.fullFormats,l],w=m.formats||r.formatNames;return d(h,w,g,v),m.keywords&&i.default(h),h};f.get=(h,m="full")=>{const v=(m==="fast"?r.fastFormats:r.fullFormats)[h];if(!v)throw new Error(`Unknown format "${h}"`);return v};function d(h,m,g,v){var w,b;(w=(b=h.opts.code).formats)!==null&&w!==void 0||(b.formats=s._`require("ajv-formats/dist/formats").${v}`);for(const _ of m)h.addFormat(_,g[_])}e.exports=t=f,Object.defineProperty(t,"__esModule",{value:!0}),t.default=f})(yS,yS.exports)),yS.exports}var zpe=Npe();const mD=Il(zpe),$pe={allErrors:!0,multipleOfPrecision:8,strict:!1,verbose:!0,discriminator:!1},Ppe=/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/,Ipe=/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/;function Lpe(e,t,r={},i,s=F9,l){let c=new s({...$pe,...r});return i?mD(c,i):i!==!1&&mD(c),c.addFormat("data-url",Ipe),c.addFormat("color",Ppe),c.addKeyword(uc),c.addKeyword(DA),Array.isArray(e)&&c.addMetaSchema(e),In(t)&&Object.keys(t).forEach(f=>{c.addFormat(f,t[f])}),l&&(c=l(c)),c}function Upe(e=[],t){return e.map(i=>{var s;const{instancePath:l,keyword:c,params:f,schemaPath:d,parentSchema:h,...m}=i;let{message:g=""}=m,v=l.replace(/\//g,"."),w=`${v} ${g}`.trim(),b="";const _=[...((s=f.deps)===null||s===void 0?void 0:s.split(", "))||[],f.missingProperty,f.property].filter(x=>x);if(_.length>0)_.forEach(x=>{const R=v?`${v}.${x}`:x;let S=kt(Ve(t,`${R.replace(/^\./,"")}`)).title;if(S===void 0){const T=d.replace(/\/properties\//g,"/").split("/").slice(1,-1).concat([x]);S=kt(Ve(t,T)).title}if(S)g=g.replace(`'${x}'`,`'${S}'`),b=S;else{const T=Ve(h,[Un,x,"title"]);T&&(g=g.replace(`'${x}'`,`'${T}'`),b=T)}}),w=g;else{const x=kt(Ve(t,`${v.replace(/^\./,"")}`)).title;if(x)w=`'${x}' ${g}`.trim(),b=x;else{const R=h?.title;R&&(w=`'${R}' ${g}`.trim(),b=R)}}return"missingProperty"in f&&(v=v?`${v}.${f.missingProperty}`:f.missingProperty),{name:c,property:v,message:g,params:f,stack:w,schemaPath:d,title:b}}).reduce((i,s)=>{const{message:l,schemaPath:c}=s,f=c?.indexOf(`/${$n}/`),d=c?.indexOf(`/${pn}/`);let h;return f&&f>=0?h=c?.substring(0,f):d&&d>=0&&(h=c?.substring(0,d)),h&&i.find(g=>{var v;return g.message===l&&((v=g.schemaPath)===null||v===void 0?void 0:v.startsWith(h))})||i.push(s),i},[])}function qpe(e,t,r,i,s,l,c){const{validationError:f}=t;let d=Upe(t.errors,c);f&&(d=[...d,{stack:f.message}]),typeof l=="function"&&(d=l(d,c));let h=Tfe(d);if(f&&(h={...h,$schema:{__errors:[f.message]}}),typeof s!="function")return{errors:d,errorSchema:h};const m=xP(e,i,r,i,!0),g=s(m,nO(m),c,h),v=LP(g);return ZS({errors:d,errorSchema:h},v)}class Vpe{constructor(t,r){const{additionalMetaSchemas:i,customFormats:s,ajvOptionsOverrides:l,ajvFormatOptions:c,AjvClass:f,extenderFn:d}=t;this.ajv=Lpe(i,s,l,c,f,d),this.localizer=r}reset(){this.ajv.removeSchema()}rawValidation(t,r){var i,s;let l,c;try{t[or]&&(c=this.ajv.getSchema(t[or])),c===void 0&&(c=this.ajv.compile(t)),c(r)}catch(d){l=d}let f;return c&&(typeof this.localizer=="function"&&(((i=c.errors)!==null&&i!==void 0?i:[]).forEach(d=>{var h;["missingProperty","property"].forEach(m=>{var g;!((g=d.params)===null||g===void 0)&&g[m]&&(d.params[m]=`'${d.params[m]}'`)}),!((h=d.params)===null||h===void 0)&&h.deps&&(d.params.deps=d.params.deps.split(", ").map(m=>`'${m}'`).join(", "))}),this.localizer(c.errors),((s=c.errors)!==null&&s!==void 0?s:[]).forEach(d=>{var h;["missingProperty","property"].forEach(m=>{var g;!((g=d.params)===null||g===void 0)&&g[m]&&(d.params[m]=d.params[m].slice(1,-1))}),!((h=d.params)===null||h===void 0)&&h.deps&&(d.params.deps=d.params.deps.split(", ").map(m=>m.slice(1,-1)).join(", "))})),f=c.errors||void 0,c.errors=null),{errors:f,validationError:l}}validateFormData(t,r,i,s,l){const c=this.rawValidation(r,t);return qpe(this,c,t,r,i,s,l)}handleSchemaUpdate(t){var r,i;const s=(r=t[or])!==null&&r!==void 0?r:oP;this.ajv.getSchema(s)===void 0?this.ajv.addSchema(t,s):yr(t,(i=this.ajv.getSchema(s))===null||i===void 0?void 0:i.schema)||(this.ajv.removeSchema(s),this.ajv.addSchema(t,s))}isValid(t,r,i){var s;try{this.handleSchemaUpdate(i);const l=GA(t),c=(s=l[or])!==null&&s!==void 0?s:Sfe(l);let f;return f=this.ajv.getSchema(c),f===void 0&&(f=this.ajv.addSchema(l,c).getSchema(c)||this.ajv.compile(l)),f(r)}catch(l){return console.warn("Error encountered compiling schema:",l),!1}}}function Fpe(e={},t){return new Vpe(e,t)}const Bpe=Fpe();const Hpe=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Gpe=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,i)=>i?i.toUpperCase():r.toLowerCase()),gD=e=>{const t=Gpe(e);return t.charAt(0).toUpperCase()+t.slice(1)},nI=(...e)=>e.filter((t,r,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===r).join(" ").trim(),Kpe=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var Ype={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Zpe=j.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:i,className:s="",children:l,iconNode:c,...f},d)=>j.createElement("svg",{ref:d,...Ype,width:t,height:t,stroke:e,strokeWidth:i?Number(r)*24/Number(t):r,className:nI("lucide",s),...!l&&!Kpe(f)&&{"aria-hidden":"true"},...f},[...c.map(([h,m])=>j.createElement(h,m)),...Array.isArray(l)?l:[l]]));const ql=(e,t)=>{const r=j.forwardRef(({className:i,...s},l)=>j.createElement(Zpe,{ref:l,iconNode:t,className:nI(`lucide-${Hpe(gD(e))}`,`lucide-${e}`,i),...s}));return r.displayName=gD(e),r};const Xpe=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Qpe=ql("check",Xpe);const Wpe=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],rI=ql("chevron-down",Wpe);const Jpe=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],eme=ql("chevron-up",Jpe);const tme=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],nme=ql("circle-alert",tme);const rme=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],aI=ql("circle-plus",rme);const ame=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],ime=ql("circle",ame);const ome=[["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"}]],sme=ql("copy",ome);const lme=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],ume=ql("search",lme);const cme=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],fme=ql("trash-2",cme);const dme=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],iI=ql("x",dme);function yD(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function nf(...e){return t=>{let r=!1;const i=e.map(s=>{const l=yD(s,t);return!r&&typeof l=="function"&&(r=!0),l});if(r)return()=>{for(let s=0;s<i.length;s++){const l=i[s];typeof l=="function"?l():yD(e[s],null)}}}}function sa(...e){return j.useCallback(nf(...e),e)}var hme=Symbol.for("react.lazy"),kw=Nb[" use ".trim().toString()];function pme(e){return typeof e=="object"&&e!==null&&"then"in e}function oI(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===hme&&"_payload"in e&&pme(e._payload)}function sI(e){const t=mme(e),r=j.forwardRef((i,s)=>{let{children:l,...c}=i;oI(l)&&typeof kw=="function"&&(l=kw(l._payload));const f=j.Children.toArray(l),d=f.find(yme);if(d){const h=d.props.children,m=f.map(g=>g===d?j.Children.count(h)>1?j.Children.only(null):j.isValidElement(h)?h.props.children:null:g);return k.jsx(t,{...c,ref:s,children:j.isValidElement(h)?j.cloneElement(h,void 0,m):null})}return k.jsx(t,{...c,ref:s,children:l})});return r.displayName=`${e}.Slot`,r}var lI=sI("Slot");function mme(e){const t=j.forwardRef((r,i)=>{let{children:s,...l}=r;if(oI(s)&&typeof kw=="function"&&(s=kw(s._payload)),j.isValidElement(s)){const c=bme(s),f=vme(l,s.props);return s.type!==j.Fragment&&(f.ref=i?nf(i,c):c),j.cloneElement(s,f)}return j.Children.count(s)>1?j.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var gme=Symbol("radix.slottable");function yme(e){return j.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===gme}function vme(e,t){const r={...t};for(const i in t){const s=e[i],l=t[i];/^on[A-Z]/.test(i)?s&&l?r[i]=(...f)=>{const d=l(...f);return s(...f),d}:s&&(r[i]=s):i==="style"?r[i]={...s,...l}:i==="className"&&(r[i]=[s,l].filter(Boolean).join(" "))}return{...e,...r}}function bme(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function wn(...e){return v$(WR(e))}const Sme=bc("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",xs:"h-6 rounded-md gap-1 px-2 has-[>svg]:px-2",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function JA({className:e,variant:t,size:r,asChild:i=!1,...s}){const l=i?lI:"button";return k.jsx(l,{"data-slot":"button",className:wn(Sme({variant:t,size:r,className:e})),...s})}function wme({uiSchema:e,registry:t,className:r,...i}){const{translateString:s}=t;return k.jsx("div",{className:"p-0 m-0",children:k.jsxs(JA,{...i,className:wn("w-fit gap-2",r),variant:"outline",type:"button",children:[k.jsx(aI,{size:16})," ",s(gn.AddItemButton)]})})}function Eme(e){const{children:t,buttonsProps:r,displayLabel:i,hasDescription:s,hasToolbar:l,uiSchema:c,registry:f}=e,d=kt(c),h=Ut("ArrayFieldItemButtonsTemplate",f,d),m=s?-6:22;return k.jsx("div",{children:k.jsxs("div",{className:"mb-2 flex flex-row flex-wrap items-center",children:[k.jsx("div",{className:"grow shrink",children:t}),k.jsx("div",{className:"flex items-end justify-end p-0.5",children:l&&k.jsx("div",{className:"flex gap-2",style:{marginLeft:"5px",marginTop:i?`${m}px`:void 0},children:k.jsx(h,{...r})})})]})})}function xme(e){const{canAdd:t,disabled:r,fieldPathId:i,uiSchema:s,items:l,optionalDataControl:c,onAddClick:f,readonly:d,registry:h,required:m,schema:g,title:v}=e,w=kt(s),b=Ut("ArrayFieldDescriptionTemplate",h,w),_=Ut("ArrayFieldTitleTemplate",h,w),x=!d&&!r,{ButtonTemplates:{AddButton:R}}=h.templates;return k.jsx("div",{children:k.jsx("div",{className:"m-0 flex p-0",children:k.jsxs("div",{className:"m-0 w-full p-0",children:[k.jsx(_,{fieldPathId:i,title:w.title||v,schema:g,uiSchema:s,required:m,registry:h,optionalDataControl:x?c:void 0}),k.jsx(b,{fieldPathId:i,description:w.description||g.description,schema:g,uiSchema:s,registry:h}),k.jsxs("div",{className:"p-0 m-0 w-full mb-2",children:[x?void 0:c,l,t&&k.jsx("div",{className:"mt-2 flex justify-end",children:k.jsx(R,{id:Al(i,"add"),className:"rjsf-array-item-add",onClick:f,disabled:r||d,uiSchema:s,registry:h})})]},`array-item-list-${i.$id}`)]})})})}function uI({className:e,type:t,...r}){return k.jsx("input",{type:t,"data-slot":"input",className:wn("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...r})}function _me({id:e,htmlName:t,placeholder:r,required:i,readonly:s,disabled:l,type:c,value:f,onChange:d,onChangeOverride:h,onBlur:m,onFocus:g,autofocus:v,options:w,schema:b,rawErrors:_=[],children:x,extraProps:R,className:S,registry:T}){const{ClearButton:E}=T.templates.ButtonTemplates,O={...R,...zP(b,c,w)},C=({target:{value:q}})=>d(q===""?w.emptyValue:q),M=({target:q})=>m(e,q&&q.value),D=({target:q})=>g(e,q&&q.value),$=j.useCallback(q=>{var L;q.preventDefault(),q.stopPropagation(),d((L=w.emptyValue)!==null&&L!==void 0?L:"")},[d,w.emptyValue]);return k.jsxs("div",{className:"p-0.5",children:[k.jsx(uI,{id:e,name:t||e,type:c,placeholder:r,autoFocus:v,required:i,disabled:l,readOnly:s,className:wn({"border-destructive focus-visible:ring-0":_.length>0},S),list:b.examples?_b(e):void 0,...O,value:f||f===0?f:"",onChange:h||C,onBlur:M,onFocus:D,"aria-describedby":co(e,!!b.examples)}),w.allowClearTextInputs&&!s&&!l&&f&&k.jsx(E,{onClick:$,registry:T}),x,Array.isArray(b.examples)?k.jsx("datalist",{id:_b(e),children:b.examples.concat(b.default&&!b.examples.includes(b.default)?[b.default]:[]).map(q=>k.jsx("option",{value:q},q))}):null]})}function Tme({id:e,description:t,registry:r,uiSchema:i}){return t?k.jsx("div",{children:k.jsx("div",{id:e,className:"text-sm text-muted-foreground",children:k.jsx(QA,{description:t,registry:r,uiSchema:i})})}):null}const Cme=bc("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}},defaultVariants:{variant:"default"}});function Ome({className:e,variant:t,...r}){return k.jsx("div",{"data-slot":"alert",role:"alert",className:wn(Cme({variant:t}),e),...r})}function Rme({className:e,...t}){return k.jsx("div",{"data-slot":"alert-title",className:wn("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",e),...t})}function Ame({className:e,...t}){return k.jsx("div",{"data-slot":"alert-description",className:wn("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",e),...t})}function Mme({errors:e,registry:t}){const{translateString:r}=t;return k.jsxs(Ome,{variant:"destructive",className:"mb-2",children:[k.jsx(nme,{className:"h-4 w-4"}),k.jsx(Rme,{children:r(gn.ErrorsLabel)}),k.jsx(Ame,{className:"flex flex-col gap-1",children:e.map((i,s)=>k.jsxs("span",{children:["• ",i.stack]},s))})]})}function jme(e){const{errors:t=[],fieldPathId:r}=e;if(t.length===0)return null;const i=VA(r);return k.jsx("div",{className:"flex flex-col gap-1",id:i,children:t.map((s,l)=>k.jsx("span",{className:"text-xs font-medium text-destructive mb-1",children:s},l))})}function kme(e){const{fieldPathId:t,help:r,uiSchema:i,registry:s,hasErrors:l}=e;return r?k.jsx("span",{className:wn("text-xs font-medium text-muted-foreground",{"text-destructive":l}),id:FA(t),children:k.jsx(WA,{help:r,registry:s,uiSchema:i})}):null}function Dme({id:e,children:t,displayLabel:r,rawErrors:i=[],errors:s,help:l,description:c,rawDescription:f,classNames:d,style:h,disabled:m,label:g,hidden:v,onKeyRename:w,onKeyRenameBlur:b,onRemoveProperty:_,readonly:x,required:R,schema:S,uiSchema:T,registry:E}){const O=kt(T),C=Ut("WrapIfAdditionalTemplate",E,O);if(v)return k.jsx("div",{className:"hidden",children:t});const M=O.widget==="checkbox";return k.jsx(C,{classNames:d,style:h,disabled:m,id:e,label:g,displayLabel:r,onKeyRename:w,onKeyRenameBlur:b,onRemoveProperty:_,rawDescription:f,readonly:x,required:R,schema:S,uiSchema:T,registry:E,children:k.jsxs("div",{className:"flex flex-col gap-2",children:[r&&!M&&k.jsxs("label",{className:wn("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{" text-destructive":i.length>0}),htmlFor:e,children:[g,R?"*":null]}),t,r&&f&&!M&&k.jsx("span",{className:wn("text-xs font-medium text-muted-foreground",{" text-destructive":i.length>0}),children:c}),s,l]})})}function Nme(e){const{children:t,column:r,className:i,...s}=e;return k.jsx("div",{className:wn("grid gap-2",i),...s,children:t})}function $m(e){const{icon:t,iconType:r,className:i,uiSchema:s,registry:l,...c}=e;return k.jsx(JA,{size:"icon",variant:"outline",className:i,...c,type:"button",children:t})}function zme(e){const{registry:{translateString:t}}=e;return k.jsx($m,{title:t(gn.CopyButton),...e,icon:k.jsx(sme,{className:"h-4 w-4"})})}function $me(e){const{registry:{translateString:t}}=e;return k.jsx($m,{title:t(gn.MoveDownButton),...e,icon:k.jsx(rI,{className:"h-4 w-4"})})}function Pme(e){const{registry:{translateString:t}}=e;return k.jsx($m,{title:t(gn.MoveUpButton),...e,icon:k.jsx(eme,{className:"h-4 w-4"})})}function cI(e){const{registry:{translateString:t}}=e;return k.jsx($m,{title:t(gn.RemoveButton),...e,className:"border-destructive",icon:k.jsx(fme,{className:"h-4 w-4 stroke-destructive"})})}function Ime(e){const{registry:{translateString:t}}=e;return k.jsx($m,{title:t(gn.ClearButton),...e,icon:k.jsx(iI,{})})}function Lme({selector:e,optionSchemaField:t}){return k.jsxs("div",{className:wn("p-4 border rounded-md bg-background shadow-sm"),children:[k.jsx("div",{className:wn("mb-4"),children:e}),t]})}function Ume({description:e,title:t,properties:r,required:i,uiSchema:s,fieldPathId:l,schema:c,formData:f,optionalDataControl:d,onAddProperty:h,disabled:m,readonly:g,registry:v}){const w=kt(s),b=Ut("TitleFieldTemplate",v,w),_=Ut("DescriptionFieldTemplate",v,w),x=!g&&!m,{ButtonTemplates:{AddButton:R}}=v.templates;return k.jsxs(k.Fragment,{children:[t&&k.jsx(b,{id:w2(l),title:t,required:i,schema:c,uiSchema:s,registry:v,optionalDataControl:x?d:void 0}),e&&k.jsx(_,{id:op(l),description:e,schema:c,uiSchema:s,registry:v}),k.jsxs("div",{className:"flex flex-col gap-2",children:[x?void 0:d,r.map((S,T)=>k.jsx("div",{className:`${S.hidden?"hidden":""} flex`,children:k.jsx("div",{className:"w-full",children:S.content})},T)),sP(c,s,f)?k.jsx("div",{className:"mt-2 flex justify-end",children:k.jsx(R,{id:Al(l,"add"),onClick:h,disabled:m||g,className:"rjsf-object-property-expand",uiSchema:s,registry:v})}):null]})]})}function qme(e){const{id:t,registry:r,label:i,onAddClick:s,onRemoveClick:l}=e;return s?k.jsx($m,{id:t,registry:r,className:"rjsf-add-optional-data",onClick:s,title:i,icon:k.jsx(aI,{}),size:"xs"}):l?k.jsx(cI,{id:t,registry:r,className:"rjsf-remove-optional-data",onClick:l,title:i,size:"xs"}):k.jsx("em",{id:t,children:i})}function Vme(e){const{submitText:t,norender:r,props:i}=$P(e.uiSchema);return r?null:k.jsx("div",{children:k.jsx(JA,{type:"submit",...i,className:wn("my-2",i?.className),children:t})})}var ms=YN();const Fme=Il(ms);var Bme=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Vl=Bme.reduce((e,t)=>{const r=sI(`Primitive.${t}`),i=j.forwardRef((s,l)=>{const{asChild:c,...f}=s,d=c?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),k.jsx(d,{...f,ref:l})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{}),Hme="Separator",vD="horizontal",Gme=["horizontal","vertical"],fI=j.forwardRef((e,t)=>{const{decorative:r,orientation:i=vD,...s}=e,l=Kme(i)?i:vD,f=r?{role:"none"}:{"aria-orientation":l==="vertical"?l:void 0,role:"separator"};return k.jsx(Vl.div,{"data-orientation":l,...f,...s,ref:t})});fI.displayName=Hme;function Kme(e){return Gme.includes(e)}var Yme=fI;function dI({className:e,orientation:t="horizontal",decorative:r=!0,...i}){return k.jsx(Yme,{"data-slot":"separator",decorative:r,orientation:t,className:wn("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...i})}function Zme({id:e,title:t,uiSchema:r,optionalDataControl:i}){const s=kt(r);let l=k.jsx("h5",{children:s.title||t});return i&&(l=k.jsxs("div",{className:"flex flex-row",children:[k.jsx("div",{className:"flex-grow",children:l}),k.jsx("div",{className:"flex",children:i})]})),k.jsxs("div",{id:e,className:"my-1 flex flex-col gap-0.5",children:[l,k.jsx(dI,{dir:"horizontal",style:{height:"1px"},className:"my-1"})]})}function Xme({classNames:e,style:t,children:r,disabled:i,id:s,label:l,displayLabel:c,onRemoveProperty:f,onKeyRenameBlur:d,rawDescription:h,readonly:m,required:g,schema:v,uiSchema:w,registry:b}){const{templates:_,translateString:x}=b,{RemoveButton:R}=_.ButtonTemplates,S=x(gn.KeyLabel,[l]);if(!(uc in v))return k.jsx("div",{className:e,style:t,children:r});const O=c?22+(h?-28:0):0,C=`${s}-key`;return k.jsxs(k.Fragment,{children:[k.jsxs("div",{className:`grid grid-cols-12 col-span-12 items-center gap-2 ${e}`,style:t,children:[k.jsx("div",{className:"grid gap-2 col-span-5",children:k.jsxs("div",{className:"flex flex-col gap-2",children:[c&&k.jsx("label",{htmlFor:C,className:"text-sm font-medium text-muted-foreground leading-none",children:S}),k.jsx("div",{className:"pl-0.5",children:k.jsx(uI,{required:g,defaultValue:l,disabled:i||m,id:C,name:C,onBlur:m?void 0:d,type:"text",className:"w-full border shadow-sm"})}),!!h&&k.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:k.jsx("div",{className:"text-sm text-muted-foreground",children:" "})})]})}),k.jsx("div",{className:"grid gap-2 col-span-6 pr-0.5",children:r}),k.jsx("div",{className:"grid gap-2 col-span-1",style:{marginTop:`${O}px`},children:k.jsx(R,{id:Al(s,"remove"),iconType:"block",className:"rjsf-object-property-remove w-full",disabled:i||m,onClick:f,uiSchema:w,registry:b})})]}),k.jsx(dI,{dir:"horizontal",className:"mt-2"})]})}function Qme(){return{ArrayFieldItemTemplate:Eme,ArrayFieldTemplate:xme,BaseInputTemplate:_me,ButtonTemplates:{AddButton:wme,CopyButton:zme,MoveDownButton:$me,MoveUpButton:Pme,RemoveButton:cI,SubmitButton:Vme,ClearButton:Ime},DescriptionFieldTemplate:Tme,ErrorListTemplate:Mme,FieldErrorTemplate:jme,FieldHelpTemplate:kme,FieldTemplate:Dme,GridTemplate:Nme,MultiSchemaFieldTemplate:Lme,ObjectFieldTemplate:Ume,OptionalDataControlsTemplate:qme,TitleFieldTemplate:Zme,WrapIfAdditionalTemplate:Xme}}function Wme(e,t){const r=j.createContext(t),i=l=>{const{children:c,...f}=l,d=j.useMemo(()=>f,Object.values(f));return k.jsx(r.Provider,{value:d,children:c})};i.displayName=e+"Provider";function s(l){const c=j.useContext(r);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${l}\` must be used within \`${e}\``)}return[i,s]}function lp(e,t=[]){let r=[];function i(l,c){const f=j.createContext(c),d=r.length;r=[...r,c];const h=g=>{const{scope:v,children:w,...b}=g,_=v?.[e]?.[d]||f,x=j.useMemo(()=>b,Object.values(b));return k.jsx(_.Provider,{value:x,children:w})};h.displayName=l+"Provider";function m(g,v){const w=v?.[e]?.[d]||f,b=j.useContext(w);if(b)return b;if(c!==void 0)return c;throw new Error(`\`${g}\` must be used within \`${l}\``)}return[h,m]}const s=()=>{const l=r.map(c=>j.createContext(c));return function(f){const d=f?.[e]||l;return j.useMemo(()=>({[`__scope${e}`]:{...f,[e]:d}}),[f,d])}};return s.scopeName=e,[i,Jme(s,...t)]}function Jme(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const i=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(l){const c=i.reduce((f,{useScope:d,scopeName:h})=>{const g=d(l)[`__scope${h}`];return{...f,...g}},{});return j.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return r.scopeName=t.scopeName,r}function Dr(e,t,{checkForDefaultPrevented:r=!0}={}){return function(s){if(e?.(s),r===!1||!s.defaultPrevented)return t?.(s)}}var hm=globalThis?.document?j.useLayoutEffect:()=>{},ege=Nb[" useInsertionEffect ".trim().toString()]||hm;function i1({prop:e,defaultProp:t,onChange:r=()=>{},caller:i}){const[s,l,c]=tge({defaultProp:t,onChange:r}),f=e!==void 0,d=f?e:s;{const m=j.useRef(e!==void 0);j.useEffect(()=>{const g=m.current;g!==f&&console.warn(`${i} is changing from ${g?"controlled":"uncontrolled"} to ${f?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=f},[f,i])}const h=j.useCallback(m=>{if(f){const g=nge(m)?m(e):m;g!==e&&c.current?.(g)}else l(m)},[f,e,l,c]);return[d,h]}function tge({defaultProp:e,onChange:t}){const[r,i]=j.useState(e),s=j.useRef(r),l=j.useRef(t);return ege(()=>{l.current=t},[t]),j.useEffect(()=>{s.current!==r&&(l.current?.(r),s.current=r)},[r,s]),[r,i,l]}function nge(e){return typeof e=="function"}function e5(e){const t=j.useRef({value:e,previous:e});return j.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function t5(e){const[t,r]=j.useState(void 0);return hm(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const i=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const l=s[0];let c,f;if("borderBoxSize"in l){const d=l.borderBoxSize,h=Array.isArray(d)?d[0]:d;c=h.inlineSize,f=h.blockSize}else c=e.offsetWidth,f=e.offsetHeight;r({width:c,height:f})});return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}else r(void 0)},[e]),t}function rge(e,t){return j.useReducer((r,i)=>t[r][i]??r,e)}var Pm=e=>{const{present:t,children:r}=e,i=age(t),s=typeof r=="function"?r({present:i.isPresent}):j.Children.only(r),l=sa(i.ref,ige(s));return typeof r=="function"||i.isPresent?j.cloneElement(s,{ref:l}):null};Pm.displayName="Presence";function age(e){const[t,r]=j.useState(),i=j.useRef(null),s=j.useRef(e),l=j.useRef("none"),c=e?"mounted":"unmounted",[f,d]=rge(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return j.useEffect(()=>{const h=vS(i.current);l.current=f==="mounted"?h:"none"},[f]),hm(()=>{const h=i.current,m=s.current;if(m!==e){const v=l.current,w=vS(h);e?d("MOUNT"):w==="none"||h?.display==="none"?d("UNMOUNT"):d(m&&v!==w?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,d]),hm(()=>{if(t){let h;const m=t.ownerDocument.defaultView??window,g=w=>{const _=vS(i.current).includes(CSS.escape(w.animationName));if(w.target===t&&_&&(d("ANIMATION_END"),!s.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",h=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},v=w=>{w.target===t&&(l.current=vS(i.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",g),t.addEventListener("animationend",g),()=>{m.clearTimeout(h),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",g),t.removeEventListener("animationend",g)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:j.useCallback(h=>{i.current=h?getComputedStyle(h):null,r(h)},[])}}function vS(e){return e?.animationName||"none"}function ige(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function Dw(e){const t=oge(e),r=j.forwardRef((i,s)=>{const{children:l,...c}=i,f=j.Children.toArray(l),d=f.find(lge);if(d){const h=d.props.children,m=f.map(g=>g===d?j.Children.count(h)>1?j.Children.only(null):j.isValidElement(h)?h.props.children:null:g);return k.jsx(t,{...c,ref:s,children:j.isValidElement(h)?j.cloneElement(h,void 0,m):null})}return k.jsx(t,{...c,ref:s,children:l})});return r.displayName=`${e}.Slot`,r}function oge(e){const t=j.forwardRef((r,i)=>{const{children:s,...l}=r;if(j.isValidElement(s)){const c=cge(s),f=uge(l,s.props);return s.type!==j.Fragment&&(f.ref=i?nf(i,c):c),j.cloneElement(s,f)}return j.Children.count(s)>1?j.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var sge=Symbol("radix.slottable");function lge(e){return j.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sge}function uge(e,t){const r={...t};for(const i in t){const s=e[i],l=t[i];/^on[A-Z]/.test(i)?s&&l?r[i]=(...f)=>{const d=l(...f);return s(...f),d}:s&&(r[i]=s):i==="style"?r[i]={...s,...l}:i==="className"&&(r[i]=[s,l].filter(Boolean).join(" "))}return{...e,...r}}function cge(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var fge=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Qr=fge.reduce((e,t)=>{const r=Dw(`Primitive.${t}`),i=j.forwardRef((s,l)=>{const{asChild:c,...f}=s,d=c?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),k.jsx(d,{...f,ref:l})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{});function dge(e,t){e&&ms.flushSync(()=>e.dispatchEvent(t))}var _2="Checkbox",[hge]=lp(_2),[pge,n5]=hge(_2);function mge(e){const{__scopeCheckbox:t,checked:r,children:i,defaultChecked:s,disabled:l,form:c,name:f,onCheckedChange:d,required:h,value:m="on",internal_do_not_use_render:g}=e,[v,w]=i1({prop:r,defaultProp:s??!1,onChange:d,caller:_2}),[b,_]=j.useState(null),[x,R]=j.useState(null),S=j.useRef(!1),T=b?!!c||!!b.closest("form"):!0,E={checked:v,disabled:l,setChecked:w,control:b,setControl:_,name:f,form:c,value:m,hasConsumerStoppedPropagationRef:S,required:h,defaultChecked:Vc(s)?!1:s,isFormControl:T,bubbleInput:x,setBubbleInput:R};return k.jsx(pge,{scope:t,...E,children:gge(g)?g(E):i})}var hI="CheckboxTrigger",pI=j.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...i},s)=>{const{control:l,value:c,disabled:f,checked:d,required:h,setControl:m,setChecked:g,hasConsumerStoppedPropagationRef:v,isFormControl:w,bubbleInput:b}=n5(hI,e),_=sa(s,m),x=j.useRef(d);return j.useEffect(()=>{const R=l?.form;if(R){const S=()=>g(x.current);return R.addEventListener("reset",S),()=>R.removeEventListener("reset",S)}},[l,g]),k.jsx(Qr.button,{type:"button",role:"checkbox","aria-checked":Vc(d)?"mixed":d,"aria-required":h,"data-state":SI(d),"data-disabled":f?"":void 0,disabled:f,value:c,...i,ref:_,onKeyDown:Dr(t,R=>{R.key==="Enter"&&R.preventDefault()}),onClick:Dr(r,R=>{g(S=>Vc(S)?!0:!S),b&&w&&(v.current=R.isPropagationStopped(),v.current||R.stopPropagation())})})});pI.displayName=hI;var mI=j.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:i,checked:s,defaultChecked:l,required:c,disabled:f,value:d,onCheckedChange:h,form:m,...g}=e;return k.jsx(mge,{__scopeCheckbox:r,checked:s,defaultChecked:l,disabled:f,required:c,onCheckedChange:h,name:i,form:m,value:d,internal_do_not_use_render:({isFormControl:v})=>k.jsxs(k.Fragment,{children:[k.jsx(pI,{...g,ref:t,__scopeCheckbox:r}),v&&k.jsx(bI,{__scopeCheckbox:r})]})})});mI.displayName=_2;var gI="CheckboxIndicator",yI=j.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:i,...s}=e,l=n5(gI,r);return k.jsx(Pm,{present:i||Vc(l.checked)||l.checked===!0,children:k.jsx(Qr.span,{"data-state":SI(l.checked),"data-disabled":l.disabled?"":void 0,...s,ref:t,style:{pointerEvents:"none",...e.style}})})});yI.displayName=gI;var vI="CheckboxBubbleInput",bI=j.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:i,hasConsumerStoppedPropagationRef:s,checked:l,defaultChecked:c,required:f,disabled:d,name:h,value:m,form:g,bubbleInput:v,setBubbleInput:w}=n5(vI,e),b=sa(r,w),_=e5(l),x=t5(i);j.useEffect(()=>{const S=v;if(!S)return;const T=window.HTMLInputElement.prototype,O=Object.getOwnPropertyDescriptor(T,"checked").set,C=!s.current;if(_!==l&&O){const M=new Event("click",{bubbles:C});S.indeterminate=Vc(l),O.call(S,Vc(l)?!1:l),S.dispatchEvent(M)}},[v,_,l,s]);const R=j.useRef(Vc(l)?!1:l);return k.jsx(Qr.input,{type:"checkbox","aria-hidden":!0,defaultChecked:c??R.current,required:f,disabled:d,name:h,value:m,form:g,...t,tabIndex:-1,ref:b,style:{...t.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});bI.displayName=vI;function gge(e){return typeof e=="function"}function Vc(e){return e==="indeterminate"}function SI(e){return Vc(e)?"indeterminate":e?"checked":"unchecked"}function yge(e,t){if(e==null)return{};var r={},i=Object.keys(e),s,l;for(l=0;l<i.length;l++)s=i[l],!(t.indexOf(s)>=0)&&(r[s]=e[s]);return r}var vge=["color"],bge=j.forwardRef(function(e,t){var r=e.color,i=r===void 0?"currentColor":r,s=yge(e,vge);return j.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s,{ref:t}),j.createElement("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))});function wI({className:e,...t}){return k.jsx(mI,{"data-slot":"checkbox",className:wn("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:k.jsx(yI,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:k.jsx(bge,{className:"size-3.5"})})})}var Sge="Label",EI=j.forwardRef((e,t)=>k.jsx(Vl.label,{...e,ref:t,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));EI.displayName=Sge;var wge=EI;function r5({className:e,...t}){return k.jsx(wge,{"data-slot":"label",className:wn("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function Ege(e){const{id:t,htmlName:r,value:i,disabled:s,readonly:l,label:c,hideLabel:f,schema:d,autofocus:h,options:m,onChange:g,onBlur:v,onFocus:w,registry:b,uiSchema:_,className:x}=e,R=Jv(d),S=Ut("DescriptionFieldTemplate",b,m),T=M=>g(M),E=()=>v(t,i),O=()=>w(t,i),C=m.description||d.description;return k.jsxs("div",{className:`relative ${s||l?"cursor-not-allowed opacity-50":""}`,"aria-describedby":co(t),children:[!f&&C&&k.jsx(S,{id:op(t),description:C,schema:d,uiSchema:_,registry:b}),k.jsxs("div",{className:"flex items-center gap-2 my-2",children:[k.jsx(wI,{id:t,name:r||t,checked:typeof i>"u"?!1:!!i,required:R,disabled:s||l,autoFocus:h,onCheckedChange:T,onBlur:E,onFocus:O,className:x}),k.jsx(r5,{className:"leading-tight",htmlFor:t,children:PP(c,f||!c)})]})]})}function xge({id:e,htmlName:t,disabled:r,options:i,value:s,autofocus:l,readonly:c,required:f,onChange:d,onBlur:h,onFocus:m,className:g}){const{enumOptions:v,enumDisabled:w,inline:b,emptyValue:_}=i,x=Array.isArray(s)?s:[s],R=({target:T})=>h(e,Na(T&&T.value,v,_)),S=({target:T})=>m(e,Na(T&&T.value,v,_));return k.jsx("div",{className:wn({"flex flex-col gap-2":!b,"flex flex-row gap-4 flex-wrap":b}),children:Array.isArray(v)&&v.map((T,E)=>{const O=n1(T.value,x),C=Array.isArray(w)&&w.indexOf(T.value)!==-1,M=$h(e,E);return k.jsxs("div",{className:"flex items-center gap-2",children:[k.jsx(wI,{id:M,name:t||e,required:f,disabled:r||C||c,onCheckedChange:D=>{d(D?kP(E,x,v):MP(E,x,v))},className:g,checked:O,autoFocus:l&&E===0,onBlur:R,onFocus:S,"aria-describedby":co(e)}),k.jsx(r5,{className:"leading-tight",htmlFor:$h(e,E),children:T.label})]},M)})})}function xI(e){const t=e+"CollectionProvider",[r,i]=lp(t),[s,l]=r(t,{collectionRef:{current:null},itemMap:new Map}),c=_=>{const{scope:x,children:R}=_,S=Ho.useRef(null),T=Ho.useRef(new Map).current;return k.jsx(s,{scope:x,itemMap:T,collectionRef:S,children:R})};c.displayName=t;const f=e+"CollectionSlot",d=Dw(f),h=Ho.forwardRef((_,x)=>{const{scope:R,children:S}=_,T=l(f,R),E=sa(x,T.collectionRef);return k.jsx(d,{ref:E,children:S})});h.displayName=f;const m=e+"CollectionItemSlot",g="data-radix-collection-item",v=Dw(m),w=Ho.forwardRef((_,x)=>{const{scope:R,children:S,...T}=_,E=Ho.useRef(null),O=sa(x,E),C=l(m,R);return Ho.useEffect(()=>(C.itemMap.set(E,{ref:E,...T}),()=>{C.itemMap.delete(E)})),k.jsx(v,{[g]:"",ref:O,children:S})});w.displayName=m;function b(_){const x=l(e+"CollectionConsumer",_);return Ho.useCallback(()=>{const S=x.collectionRef.current;if(!S)return[];const T=Array.from(S.querySelectorAll(`[${g}]`));return Array.from(x.itemMap.values()).sort((C,M)=>T.indexOf(C.ref.current)-T.indexOf(M.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:c,Slot:h,ItemSlot:w},b,i]}var _ge=Nb[" useId ".trim().toString()]||(()=>{}),Tge=0;function Dl(e){const[t,r]=j.useState(_ge());return hm(()=>{r(i=>i??String(Tge++))},[e]),t?`radix-${t}`:""}function pm(e){const t=j.useRef(e);return j.useEffect(()=>{t.current=e}),j.useMemo(()=>(...r)=>t.current?.(...r),[])}var Cge=j.createContext(void 0);function a5(e){const t=j.useContext(Cge);return e||t||"ltr"}var fT="rovingFocusGroup.onEntryFocus",Oge={bubbles:!1,cancelable:!0},o1="RovingFocusGroup",[uO,_I,Rge]=xI(o1),[Age,TI]=lp(o1,[Rge]),[Mge,jge]=Age(o1),CI=j.forwardRef((e,t)=>k.jsx(uO.Provider,{scope:e.__scopeRovingFocusGroup,children:k.jsx(uO.Slot,{scope:e.__scopeRovingFocusGroup,children:k.jsx(kge,{...e,ref:t})})}));CI.displayName=o1;var kge=j.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:i,loop:s=!1,dir:l,currentTabStopId:c,defaultCurrentTabStopId:f,onCurrentTabStopIdChange:d,onEntryFocus:h,preventScrollOnEntryFocus:m=!1,...g}=e,v=j.useRef(null),w=sa(t,v),b=a5(l),[_,x]=i1({prop:c,defaultProp:f??null,onChange:d,caller:o1}),[R,S]=j.useState(!1),T=pm(h),E=_I(r),O=j.useRef(!1),[C,M]=j.useState(0);return j.useEffect(()=>{const D=v.current;if(D)return D.addEventListener(fT,T),()=>D.removeEventListener(fT,T)},[T]),k.jsx(Mge,{scope:r,orientation:i,dir:b,loop:s,currentTabStopId:_,onItemFocus:j.useCallback(D=>x(D),[x]),onItemShiftTab:j.useCallback(()=>S(!0),[]),onFocusableItemAdd:j.useCallback(()=>M(D=>D+1),[]),onFocusableItemRemove:j.useCallback(()=>M(D=>D-1),[]),children:k.jsx(Qr.div,{tabIndex:R||C===0?-1:0,"data-orientation":i,...g,ref:w,style:{outline:"none",...e.style},onMouseDown:Dr(e.onMouseDown,()=>{O.current=!0}),onFocus:Dr(e.onFocus,D=>{const $=!O.current;if(D.target===D.currentTarget&&$&&!R){const q=new CustomEvent(fT,Oge);if(D.currentTarget.dispatchEvent(q),!q.defaultPrevented){const L=E().filter(K=>K.focusable),V=L.find(K=>K.active),F=L.find(K=>K.id===_),ae=[V,F,...L].filter(Boolean).map(K=>K.ref.current);AI(ae,m)}}O.current=!1}),onBlur:Dr(e.onBlur,()=>S(!1))})})}),OI="RovingFocusGroupItem",RI=j.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:i=!0,active:s=!1,tabStopId:l,children:c,...f}=e,d=Dl(),h=l||d,m=jge(OI,r),g=m.currentTabStopId===h,v=_I(r),{onFocusableItemAdd:w,onFocusableItemRemove:b,currentTabStopId:_}=m;return j.useEffect(()=>{if(i)return w(),()=>b()},[i,w,b]),k.jsx(uO.ItemSlot,{scope:r,id:h,focusable:i,active:s,children:k.jsx(Qr.span,{tabIndex:g?0:-1,"data-orientation":m.orientation,...f,ref:t,onMouseDown:Dr(e.onMouseDown,x=>{i?m.onItemFocus(h):x.preventDefault()}),onFocus:Dr(e.onFocus,()=>m.onItemFocus(h)),onKeyDown:Dr(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){m.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const R=zge(x,m.orientation,m.dir);if(R!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let T=v().filter(E=>E.focusable).map(E=>E.ref.current);if(R==="last")T.reverse();else if(R==="prev"||R==="next"){R==="prev"&&T.reverse();const E=T.indexOf(x.currentTarget);T=m.loop?$ge(T,E+1):T.slice(E+1)}setTimeout(()=>AI(T))}}),children:typeof c=="function"?c({isCurrentTabStop:g,hasTabStop:_!=null}):c})})});RI.displayName=OI;var Dge={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Nge(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function zge(e,t,r){const i=Nge(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return Dge[i]}function AI(e,t=!1){const r=document.activeElement;for(const i of e)if(i===r||(i.focus({preventScroll:t}),document.activeElement!==r))return}function $ge(e,t){return e.map((r,i)=>e[(t+i)%e.length])}var Pge=CI,Ige=RI,i5="Radio",[Lge,MI]=lp(i5),[Uge,qge]=Lge(i5),jI=j.forwardRef((e,t)=>{const{__scopeRadio:r,name:i,checked:s=!1,required:l,disabled:c,value:f="on",onCheck:d,form:h,...m}=e,[g,v]=j.useState(null),w=sa(t,x=>v(x)),b=j.useRef(!1),_=g?h||!!g.closest("form"):!0;return k.jsxs(Uge,{scope:r,checked:s,disabled:c,children:[k.jsx(Qr.button,{type:"button",role:"radio","aria-checked":s,"data-state":zI(s),"data-disabled":c?"":void 0,disabled:c,value:f,...m,ref:w,onClick:Dr(e.onClick,x=>{s||d?.(),_&&(b.current=x.isPropagationStopped(),b.current||x.stopPropagation())})}),_&&k.jsx(NI,{control:g,bubbles:!b.current,name:i,value:f,checked:s,required:l,disabled:c,form:h,style:{transform:"translateX(-100%)"}})]})});jI.displayName=i5;var kI="RadioIndicator",DI=j.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:i,...s}=e,l=qge(kI,r);return k.jsx(Pm,{present:i||l.checked,children:k.jsx(Qr.span,{"data-state":zI(l.checked),"data-disabled":l.disabled?"":void 0,...s,ref:t})})});DI.displayName=kI;var Vge="RadioBubbleInput",NI=j.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:i=!0,...s},l)=>{const c=j.useRef(null),f=sa(c,l),d=e5(r),h=t5(t);return j.useEffect(()=>{const m=c.current;if(!m)return;const g=window.HTMLInputElement.prototype,w=Object.getOwnPropertyDescriptor(g,"checked").set;if(d!==r&&w){const b=new Event("click",{bubbles:i});w.call(m,r),m.dispatchEvent(b)}},[d,r,i]),k.jsx(Qr.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...s,tabIndex:-1,ref:f,style:{...s.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});NI.displayName=Vge;function zI(e){return e?"checked":"unchecked"}var Fge=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],T2="RadioGroup",[Bge]=lp(T2,[TI,MI]),$I=TI(),PI=MI(),[Hge,Gge]=Bge(T2),II=j.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:i,defaultValue:s,value:l,required:c=!1,disabled:f=!1,orientation:d,dir:h,loop:m=!0,onValueChange:g,...v}=e,w=$I(r),b=a5(h),[_,x]=i1({prop:l,defaultProp:s??null,onChange:g,caller:T2});return k.jsx(Hge,{scope:r,name:i,required:c,disabled:f,value:_,onValueChange:x,children:k.jsx(Pge,{asChild:!0,...w,orientation:d,dir:b,loop:m,children:k.jsx(Qr.div,{role:"radiogroup","aria-required":c,"aria-orientation":d,"data-disabled":f?"":void 0,dir:b,...v,ref:t})})})});II.displayName=T2;var LI="RadioGroupItem",UI=j.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:i,...s}=e,l=Gge(LI,r),c=l.disabled||i,f=$I(r),d=PI(r),h=j.useRef(null),m=sa(t,h),g=l.value===s.value,v=j.useRef(!1);return j.useEffect(()=>{const w=_=>{Fge.includes(_.key)&&(v.current=!0)},b=()=>v.current=!1;return document.addEventListener("keydown",w),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",w),document.removeEventListener("keyup",b)}},[]),k.jsx(Ige,{asChild:!0,...f,focusable:!c,active:g,children:k.jsx(jI,{disabled:c,required:l.required,checked:g,...d,...s,name:l.name,ref:m,onCheck:()=>l.onValueChange(s.value),onKeyDown:Dr(w=>{w.key==="Enter"&&w.preventDefault()}),onFocus:Dr(s.onFocus,()=>{v.current&&h.current?.click()})})})});UI.displayName=LI;var Kge="RadioGroupIndicator",qI=j.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...i}=e,s=PI(r);return k.jsx(DI,{...s,...i,ref:t})});qI.displayName=Kge;var Yge=II,Zge=UI,Xge=qI;function Qge({className:e,...t}){return k.jsx(Yge,{"data-slot":"radio-group",className:wn("grid gap-3",e),...t})}function Wge({className:e,...t}){return k.jsx(Zge,{"data-slot":"radio-group-item",className:wn("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:k.jsx(Xge,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:k.jsx(ime,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}function Jge({id:e,options:t,value:r,required:i,disabled:s,readonly:l,onChange:c,onBlur:f,onFocus:d,className:h}){const{enumOptions:m,enumDisabled:g,emptyValue:v}=t,w=R=>c(Na(R,m,v)),b=({target:R})=>f(e,Na(R&&R.value,m,v)),_=({target:R})=>d(e,Na(R&&R.value,m,v)),x=!!(t&&t.inline);return k.jsx("div",{className:"mb-0",children:k.jsx(Qge,{defaultValue:r?.toString(),required:i,disabled:s||l,onValueChange:R=>{w(R)},onBlur:b,onFocus:_,"aria-describedby":co(e),orientation:x?"horizontal":"vertical",className:wn("flex flex-wrap",{"flex-col":!x},h),children:Array.isArray(m)&&m.map((R,S)=>{const T=Array.isArray(g)&&g.indexOf(R.value)!==-1,E=n1(R.value,r);return k.jsxs("div",{className:"flex items-center gap-2",children:[k.jsx(Wge,{checked:E,value:S.toString(),id:$h(e,S),disabled:T}),k.jsx(r5,{className:"leading-tight",htmlFor:$h(e,S),children:R.label})]},$h(e,S))})})})}function VI(e,[t,r]){return Math.min(r,Math.max(t,e))}var FI=["PageUp","PageDown"],BI=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],HI={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Im="Slider",[cO,eye,tye]=xI(Im),[GI]=lp(Im,[tye]),[nye,C2]=GI(Im),KI=j.forwardRef((e,t)=>{const{name:r,min:i=0,max:s=100,step:l=1,orientation:c="horizontal",disabled:f=!1,minStepsBetweenThumbs:d=0,defaultValue:h=[i],value:m,onValueChange:g=()=>{},onValueCommit:v=()=>{},inverted:w=!1,form:b,..._}=e,x=j.useRef(new Set),R=j.useRef(0),T=c==="horizontal"?rye:aye,[E=[],O]=i1({prop:m,defaultProp:h,onChange:L=>{[...x.current][R.current]?.focus(),g(L)}}),C=j.useRef(E);function M(L){const V=uye(E,L);q(L,V)}function D(L){q(L,R.current)}function $(){const L=C.current[R.current];E[R.current]!==L&&v(E)}function q(L,V,{commit:F}={commit:!1}){const re=hye(l),ae=pye(Math.round((L-i)/l)*l+i,re),K=VI(ae,[i,s]);O((B=[])=>{const Y=sye(B,K,V);if(dye(Y,d*l)){R.current=Y.indexOf(K);const fe=String(Y)!==String(B);return fe&&F&&v(Y),fe?Y:B}else return B})}return k.jsx(nye,{scope:e.__scopeSlider,name:r,disabled:f,min:i,max:s,valueIndexToChangeRef:R,thumbs:x.current,values:E,orientation:c,form:b,children:k.jsx(cO.Provider,{scope:e.__scopeSlider,children:k.jsx(cO.Slot,{scope:e.__scopeSlider,children:k.jsx(T,{"aria-disabled":f,"data-disabled":f?"":void 0,..._,ref:t,onPointerDown:Dr(_.onPointerDown,()=>{f||(C.current=E)}),min:i,max:s,inverted:w,onSlideStart:f?void 0:M,onSlideMove:f?void 0:D,onSlideEnd:f?void 0:$,onHomeKeyDown:()=>!f&&q(i,0,{commit:!0}),onEndKeyDown:()=>!f&&q(s,E.length-1,{commit:!0}),onStepKeyDown:({event:L,direction:V})=>{if(!f){const ae=FI.includes(L.key)||L.shiftKey&&BI.includes(L.key)?10:1,K=R.current,B=E[K],Y=l*ae*V;q(B+Y,K,{commit:!0})}}})})})})});KI.displayName=Im;var[YI,ZI]=GI(Im,{startEdge:"left",endEdge:"right",size:"width",direction:1}),rye=j.forwardRef((e,t)=>{const{min:r,max:i,dir:s,inverted:l,onSlideStart:c,onSlideMove:f,onSlideEnd:d,onStepKeyDown:h,...m}=e,[g,v]=j.useState(null),w=sa(t,T=>v(T)),b=j.useRef(void 0),_=a5(s),x=_==="ltr",R=x&&!l||!x&&l;function S(T){const E=b.current||g.getBoundingClientRect(),O=[0,E.width],M=o5(O,R?[r,i]:[i,r]);return b.current=E,M(T-E.left)}return k.jsx(YI,{scope:e.__scopeSlider,startEdge:R?"left":"right",endEdge:R?"right":"left",direction:R?1:-1,size:"width",children:k.jsx(XI,{dir:_,"data-orientation":"horizontal",...m,ref:w,style:{...m.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:T=>{const E=S(T.clientX);c?.(E)},onSlideMove:T=>{const E=S(T.clientX);f?.(E)},onSlideEnd:()=>{b.current=void 0,d?.()},onStepKeyDown:T=>{const O=HI[R?"from-left":"from-right"].includes(T.key);h?.({event:T,direction:O?-1:1})}})})}),aye=j.forwardRef((e,t)=>{const{min:r,max:i,inverted:s,onSlideStart:l,onSlideMove:c,onSlideEnd:f,onStepKeyDown:d,...h}=e,m=j.useRef(null),g=sa(t,m),v=j.useRef(void 0),w=!s;function b(_){const x=v.current||m.current.getBoundingClientRect(),R=[0,x.height],T=o5(R,w?[i,r]:[r,i]);return v.current=x,T(_-x.top)}return k.jsx(YI,{scope:e.__scopeSlider,startEdge:w?"bottom":"top",endEdge:w?"top":"bottom",size:"height",direction:w?1:-1,children:k.jsx(XI,{"data-orientation":"vertical",...h,ref:g,style:{...h.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:_=>{const x=b(_.clientY);l?.(x)},onSlideMove:_=>{const x=b(_.clientY);c?.(x)},onSlideEnd:()=>{v.current=void 0,f?.()},onStepKeyDown:_=>{const R=HI[w?"from-bottom":"from-top"].includes(_.key);d?.({event:_,direction:R?-1:1})}})})}),XI=j.forwardRef((e,t)=>{const{__scopeSlider:r,onSlideStart:i,onSlideMove:s,onSlideEnd:l,onHomeKeyDown:c,onEndKeyDown:f,onStepKeyDown:d,...h}=e,m=C2(Im,r);return k.jsx(Qr.span,{...h,ref:t,onKeyDown:Dr(e.onKeyDown,g=>{g.key==="Home"?(c(g),g.preventDefault()):g.key==="End"?(f(g),g.preventDefault()):FI.concat(BI).includes(g.key)&&(d(g),g.preventDefault())}),onPointerDown:Dr(e.onPointerDown,g=>{const v=g.target;v.setPointerCapture(g.pointerId),g.preventDefault(),m.thumbs.has(v)?v.focus():i(g)}),onPointerMove:Dr(e.onPointerMove,g=>{g.target.hasPointerCapture(g.pointerId)&&s(g)}),onPointerUp:Dr(e.onPointerUp,g=>{const v=g.target;v.hasPointerCapture(g.pointerId)&&(v.releasePointerCapture(g.pointerId),l(g))})})}),QI="SliderTrack",WI=j.forwardRef((e,t)=>{const{__scopeSlider:r,...i}=e,s=C2(QI,r);return k.jsx(Qr.span,{"data-disabled":s.disabled?"":void 0,"data-orientation":s.orientation,...i,ref:t})});WI.displayName=QI;var fO="SliderRange",JI=j.forwardRef((e,t)=>{const{__scopeSlider:r,...i}=e,s=C2(fO,r),l=ZI(fO,r),c=j.useRef(null),f=sa(t,c),d=s.values.length,h=s.values.map(v=>n7(v,s.min,s.max)),m=d>1?Math.min(...h):0,g=100-Math.max(...h);return k.jsx(Qr.span,{"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,...i,ref:f,style:{...e.style,[l.startEdge]:m+"%",[l.endEdge]:g+"%"}})});JI.displayName=fO;var dO="SliderThumb",e7=j.forwardRef((e,t)=>{const r=eye(e.__scopeSlider),[i,s]=j.useState(null),l=sa(t,f=>s(f)),c=j.useMemo(()=>i?r().findIndex(f=>f.ref.current===i):-1,[r,i]);return k.jsx(iye,{...e,ref:l,index:c})}),iye=j.forwardRef((e,t)=>{const{__scopeSlider:r,index:i,name:s,...l}=e,c=C2(dO,r),f=ZI(dO,r),[d,h]=j.useState(null),m=sa(t,S=>h(S)),g=d?c.form||!!d.closest("form"):!0,v=t5(d),w=c.values[i],b=w===void 0?0:n7(w,c.min,c.max),_=lye(i,c.values.length),x=v?.[f.size],R=x?cye(x,b,f.direction):0;return j.useEffect(()=>{if(d)return c.thumbs.add(d),()=>{c.thumbs.delete(d)}},[d,c.thumbs]),k.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[f.startEdge]:`calc(${b}% + ${R}px)`},children:[k.jsx(cO.ItemSlot,{scope:e.__scopeSlider,children:k.jsx(Qr.span,{role:"slider","aria-label":e["aria-label"]||_,"aria-valuemin":c.min,"aria-valuenow":w,"aria-valuemax":c.max,"aria-orientation":c.orientation,"data-orientation":c.orientation,"data-disabled":c.disabled?"":void 0,tabIndex:c.disabled?void 0:0,...l,ref:m,style:w===void 0?{display:"none"}:e.style,onFocus:Dr(e.onFocus,()=>{c.valueIndexToChangeRef.current=i})})}),g&&k.jsx(t7,{name:s??(c.name?c.name+(c.values.length>1?"[]":""):void 0),form:c.form,value:w},i)]})});e7.displayName=dO;var oye="RadioBubbleInput",t7=j.forwardRef(({__scopeSlider:e,value:t,...r},i)=>{const s=j.useRef(null),l=sa(s,i),c=e5(t);return j.useEffect(()=>{const f=s.current;if(!f)return;const d=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(d,"value").set;if(c!==t&&m){const g=new Event("input",{bubbles:!0});m.call(f,t),f.dispatchEvent(g)}},[c,t]),k.jsx(Qr.input,{style:{display:"none"},...r,ref:l,defaultValue:t})});t7.displayName=oye;function sye(e=[],t,r){const i=[...e];return i[r]=t,i.sort((s,l)=>s-l)}function n7(e,t,r){const l=100/(r-t)*(e-t);return VI(l,[0,100])}function lye(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function uye(e,t){if(e.length===1)return 0;const r=e.map(s=>Math.abs(s-t)),i=Math.min(...r);return r.indexOf(i)}function cye(e,t,r){const i=e/2,l=o5([0,50],[0,i]);return(i-l(t)*r)*r}function fye(e){return e.slice(0,-1).map((t,r)=>e[r+1]-t)}function dye(e,t){if(t>0){const r=fye(e);return Math.min(...r)>=t}return!0}function o5(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const i=(t[1]-t[0])/(e[1]-e[0]);return t[0]+i*(r-e[0])}}function hye(e){return(String(e).split(".")[1]||"").length}function pye(e,t){const r=Math.pow(10,t);return Math.round(e*r)/r}var mye=KI,gye=WI,yye=JI,vye=e7;function bye({className:e,defaultValue:t,value:r,min:i=0,max:s=100,...l}){const c=j.useMemo(()=>Array.isArray(r)?r:Array.isArray(t)?t:[i,s],[r,t,i,s]);return k.jsxs(mye,{"data-slot":"slider",defaultValue:t,value:r,min:i,max:s,className:wn("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",e),...l,children:[k.jsx(gye,{"data-slot":"slider-track",className:wn("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:k.jsx(yye,{"data-slot":"slider-range",className:wn("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:c.length},(f,d)=>k.jsx(vye,{"data-slot":"slider-thumb",className:"border-primary bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},d))]})}const Sye=["name","min","max","step","orientation","disabled","defaultValue","value","onValueChange","className","dir","inverted","minStepsBetweenThumbs"];function wye({value:e,readonly:t,disabled:r,options:i,schema:s,onChange:l,label:c,id:f}){const d=g=>l(g[0]),h={...NP(s)},m={id:f,...dR(i.props||{},Sye)};return k.jsxs(k.Fragment,{children:[k.jsx(bye,{disabled:r||t,min:h.min,max:h.max,step:h.step,value:[e],onValueChange:d,...m,"aria-describedby":co(f)}),e]})}var bD=1,Eye=.9,xye=.8,_ye=.17,dT=.1,hT=.999,Tye=.9999,Cye=.99,Oye=/[\\\/_+.#"@\[\(\{&]/,Rye=/[\\\/_+.#"@\[\(\{&]/g,Aye=/[\s-]/,r7=/[\s-]/g;function hO(e,t,r,i,s,l,c){if(l===t.length)return s===e.length?bD:Cye;var f=`${s},${l}`;if(c[f]!==void 0)return c[f];for(var d=i.charAt(l),h=r.indexOf(d,s),m=0,g,v,w,b;h>=0;)g=hO(e,t,r,i,h+1,l+1,c),g>m&&(h===s?g*=bD:Oye.test(e.charAt(h-1))?(g*=xye,w=e.slice(s,h-1).match(Rye),w&&s>0&&(g*=Math.pow(hT,w.length))):Aye.test(e.charAt(h-1))?(g*=Eye,b=e.slice(s,h-1).match(r7),b&&s>0&&(g*=Math.pow(hT,b.length))):(g*=_ye,s>0&&(g*=Math.pow(hT,h-s))),e.charAt(h)!==t.charAt(l)&&(g*=Tye)),(g<dT&&r.charAt(h-1)===i.charAt(l+1)||i.charAt(l+1)===i.charAt(l)&&r.charAt(h-1)!==i.charAt(l))&&(v=hO(e,t,r,i,h+1,l+2,c),v*dT>g&&(g=v*dT)),g>m&&(m=g),h=r.indexOf(d,h+1);return c[f]=m,m}function SD(e){return e.toLowerCase().replace(r7," ")}function Mye(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,hO(e,t,SD(e),SD(t),0,0,{})}function jye(e,t=globalThis?.document){const r=pm(e);j.useEffect(()=>{const i=s=>{s.key==="Escape"&&r(s)};return t.addEventListener("keydown",i,{capture:!0}),()=>t.removeEventListener("keydown",i,{capture:!0})},[r,t])}var kye="DismissableLayer",pO="dismissableLayer.update",Dye="dismissableLayer.pointerDownOutside",Nye="dismissableLayer.focusOutside",wD,a7=j.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),i7=j.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:l,onInteractOutside:c,onDismiss:f,...d}=e,h=j.useContext(a7),[m,g]=j.useState(null),v=m?.ownerDocument??globalThis?.document,[,w]=j.useState({}),b=sa(t,M=>g(M)),_=Array.from(h.layers),[x]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),R=_.indexOf(x),S=m?_.indexOf(m):-1,T=h.layersWithOutsidePointerEventsDisabled.size>0,E=S>=R,O=Pye(M=>{const D=M.target,$=[...h.branches].some(q=>q.contains(D));!E||$||(s?.(M),c?.(M),M.defaultPrevented||f?.())},v),C=Iye(M=>{const D=M.target;[...h.branches].some(q=>q.contains(D))||(l?.(M),c?.(M),M.defaultPrevented||f?.())},v);return jye(M=>{S===h.layers.size-1&&(i?.(M),!M.defaultPrevented&&f&&(M.preventDefault(),f()))},v),j.useEffect(()=>{if(m)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(wD=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(m)),h.layers.add(m),ED(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=wD)}},[m,v,r,h]),j.useEffect(()=>()=>{m&&(h.layers.delete(m),h.layersWithOutsidePointerEventsDisabled.delete(m),ED())},[m,h]),j.useEffect(()=>{const M=()=>w({});return document.addEventListener(pO,M),()=>document.removeEventListener(pO,M)},[]),k.jsx(Qr.div,{...d,ref:b,style:{pointerEvents:T?E?"auto":"none":void 0,...e.style},onFocusCapture:Dr(e.onFocusCapture,C.onFocusCapture),onBlurCapture:Dr(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:Dr(e.onPointerDownCapture,O.onPointerDownCapture)})});i7.displayName=kye;var zye="DismissableLayerBranch",$ye=j.forwardRef((e,t)=>{const r=j.useContext(a7),i=j.useRef(null),s=sa(t,i);return j.useEffect(()=>{const l=i.current;if(l)return r.branches.add(l),()=>{r.branches.delete(l)}},[r.branches]),k.jsx(Qr.div,{...e,ref:s})});$ye.displayName=zye;function Pye(e,t=globalThis?.document){const r=pm(e),i=j.useRef(!1),s=j.useRef(()=>{});return j.useEffect(()=>{const l=f=>{if(f.target&&!i.current){let d=function(){o7(Dye,r,h,{discrete:!0})};const h={originalEvent:f};f.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=d,t.addEventListener("click",s.current,{once:!0})):d()}else t.removeEventListener("click",s.current);i.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",l),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>i.current=!0}}function Iye(e,t=globalThis?.document){const r=pm(e),i=j.useRef(!1);return j.useEffect(()=>{const s=l=>{l.target&&!i.current&&o7(Nye,r,{originalEvent:l},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,r]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function ED(){const e=new CustomEvent(pO);document.dispatchEvent(e)}function o7(e,t,r,{discrete:i}){const s=r.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),i?dge(s,l):s.dispatchEvent(l)}var pT="focusScope.autoFocusOnMount",mT="focusScope.autoFocusOnUnmount",xD={bubbles:!1,cancelable:!0},Lye="FocusScope",s7=j.forwardRef((e,t)=>{const{loop:r=!1,trapped:i=!1,onMountAutoFocus:s,onUnmountAutoFocus:l,...c}=e,[f,d]=j.useState(null),h=pm(s),m=pm(l),g=j.useRef(null),v=sa(t,_=>d(_)),w=j.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;j.useEffect(()=>{if(i){let _=function(T){if(w.paused||!f)return;const E=T.target;f.contains(E)?g.current=E:jc(g.current,{select:!0})},x=function(T){if(w.paused||!f)return;const E=T.relatedTarget;E!==null&&(f.contains(E)||jc(g.current,{select:!0}))},R=function(T){if(document.activeElement===document.body)for(const O of T)O.removedNodes.length>0&&jc(f)};document.addEventListener("focusin",_),document.addEventListener("focusout",x);const S=new MutationObserver(R);return f&&S.observe(f,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",_),document.removeEventListener("focusout",x),S.disconnect()}}},[i,f,w.paused]),j.useEffect(()=>{if(f){TD.add(w);const _=document.activeElement;if(!f.contains(_)){const R=new CustomEvent(pT,xD);f.addEventListener(pT,h),f.dispatchEvent(R),R.defaultPrevented||(Uye(Hye(l7(f)),{select:!0}),document.activeElement===_&&jc(f))}return()=>{f.removeEventListener(pT,h),setTimeout(()=>{const R=new CustomEvent(mT,xD);f.addEventListener(mT,m),f.dispatchEvent(R),R.defaultPrevented||jc(_??document.body,{select:!0}),f.removeEventListener(mT,m),TD.remove(w)},0)}}},[f,h,m,w]);const b=j.useCallback(_=>{if(!r&&!i||w.paused)return;const x=_.key==="Tab"&&!_.altKey&&!_.ctrlKey&&!_.metaKey,R=document.activeElement;if(x&&R){const S=_.currentTarget,[T,E]=qye(S);T&&E?!_.shiftKey&&R===E?(_.preventDefault(),r&&jc(T,{select:!0})):_.shiftKey&&R===T&&(_.preventDefault(),r&&jc(E,{select:!0})):R===S&&_.preventDefault()}},[r,i,w.paused]);return k.jsx(Qr.div,{tabIndex:-1,...c,ref:v,onKeyDown:b})});s7.displayName=Lye;function Uye(e,{select:t=!1}={}){const r=document.activeElement;for(const i of e)if(jc(i,{select:t}),document.activeElement!==r)return}function qye(e){const t=l7(e),r=_D(t,e),i=_D(t.reverse(),e);return[r,i]}function l7(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const s=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||s?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function _D(e,t){for(const r of e)if(!Vye(r,{upTo:t}))return r}function Vye(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Fye(e){return e instanceof HTMLInputElement&&"select"in e}function jc(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Fye(e)&&t&&e.select()}}var TD=Bye();function Bye(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=CD(e,t),e.unshift(t)},remove(t){e=CD(e,t),e[0]?.resume()}}}function CD(e,t){const r=[...e],i=r.indexOf(t);return i!==-1&&r.splice(i,1),r}function Hye(e){return e.filter(t=>t.tagName!=="A")}var Gye="Portal",u7=j.forwardRef((e,t)=>{const{container:r,...i}=e,[s,l]=j.useState(!1);hm(()=>l(!0),[]);const c=r||s&&globalThis?.document?.body;return c?Fme.createPortal(k.jsx(Qr.div,{...i,ref:t}),c):null});u7.displayName=Gye;var gT=0;function Kye(){j.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??OD()),document.body.insertAdjacentElement("beforeend",e[1]??OD()),gT++,()=>{gT===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),gT--}},[])}function OD(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Cl=function(){return Cl=Object.assign||function(t){for(var r,i=1,s=arguments.length;i<s;i++){r=arguments[i];for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&(t[l]=r[l])}return t},Cl.apply(this,arguments)};function c7(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(r[i[s]]=e[i[s]]);return r}function mO(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Yye(e,t,r){if(r||arguments.length===2)for(var i=0,s=t.length,l;i<s;i++)(l||!(i in t))&&(l||(l=Array.prototype.slice.call(t,0,i)),l[i]=t[i]);return e.concat(l||Array.prototype.slice.call(t))}var QS="right-scroll-bar-position",WS="width-before-scroll-bar",Zye="with-scroll-bars-hidden",Xye="--removed-body-scroll-bar-size";function yT(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Qye(e,t){var r=j.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(i){var s=r.value;s!==i&&(r.value=i,r.callback(i,s))}}}})[0];return r.callback=t,r.facade}var Wye=typeof window<"u"?j.useLayoutEffect:j.useEffect,RD=new WeakMap;function Jye(e,t){var r=Qye(null,function(i){return e.forEach(function(s){return yT(s,i)})});return Wye(function(){var i=RD.get(r);if(i){var s=new Set(i),l=new Set(e),c=r.current;s.forEach(function(f){l.has(f)||yT(f,null)}),l.forEach(function(f){s.has(f)||yT(f,c)})}RD.set(r,e)},[e]),r}function e0e(e){return e}function t0e(e,t){t===void 0&&(t=e0e);var r=[],i=!1,s={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(l){var c=t(l,i);return r.push(c),function(){r=r.filter(function(f){return f!==c})}},assignSyncMedium:function(l){for(i=!0;r.length;){var c=r;r=[],c.forEach(l)}r={push:function(f){return l(f)},filter:function(){return r}}},assignMedium:function(l){i=!0;var c=[];if(r.length){var f=r;r=[],f.forEach(l),c=r}var d=function(){var m=c;c=[],m.forEach(l)},h=function(){return Promise.resolve().then(d)};h(),r={push:function(m){c.push(m),h()},filter:function(m){return c=c.filter(m),r}}}};return s}function n0e(e){e===void 0&&(e={});var t=t0e(null);return t.options=Cl({async:!0,ssr:!1},e),t}var f7=function(e){var t=e.sideCar,r=c7(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=t.read();if(!i)throw new Error("Sidecar medium not found");return j.createElement(i,Cl({},r))};f7.isSideCarExport=!0;function r0e(e,t){return e.useMedium(t),f7}var d7=n0e(),vT=function(){},O2=j.forwardRef(function(e,t){var r=j.useRef(null),i=j.useState({onScrollCapture:vT,onWheelCapture:vT,onTouchMoveCapture:vT}),s=i[0],l=i[1],c=e.forwardProps,f=e.children,d=e.className,h=e.removeScrollBar,m=e.enabled,g=e.shards,v=e.sideCar,w=e.noRelative,b=e.noIsolation,_=e.inert,x=e.allowPinchZoom,R=e.as,S=R===void 0?"div":R,T=e.gapMode,E=c7(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),O=v,C=Jye([r,t]),M=Cl(Cl({},E),s);return j.createElement(j.Fragment,null,m&&j.createElement(O,{sideCar:d7,removeScrollBar:h,shards:g,noRelative:w,noIsolation:b,inert:_,setCallbacks:l,allowPinchZoom:!!x,lockRef:r,gapMode:T}),c?j.cloneElement(j.Children.only(f),Cl(Cl({},M),{ref:C})):j.createElement(S,Cl({},M,{className:d,ref:C}),f))});O2.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};O2.classNames={fullWidth:WS,zeroRight:QS};var a0e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function i0e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=a0e();return t&&e.setAttribute("nonce",t),e}function o0e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function s0e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var l0e=function(){var e=0,t=null;return{add:function(r){e==0&&(t=i0e())&&(o0e(t,r),s0e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},u0e=function(){var e=l0e();return function(t,r){j.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},h7=function(){var e=u0e(),t=function(r){var i=r.styles,s=r.dynamic;return e(i,s),null};return t},c0e={left:0,top:0,right:0,gap:0},bT=function(e){return parseInt(e||"",10)||0},f0e=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],i=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[bT(r),bT(i),bT(s)]},d0e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return c0e;var t=f0e(e),r=document.documentElement.clientWidth,i=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,i-r+t[2]-t[0])}},h0e=h7(),Kp="data-scroll-locked",p0e=function(e,t,r,i){var s=e.left,l=e.top,c=e.right,f=e.gap;return r===void 0&&(r="margin"),`
84
+ .`.concat(Zye,` {
85
+ overflow: hidden `).concat(i,`;
86
+ padding-right: `).concat(f,"px ").concat(i,`;
87
+ }
88
+ body[`).concat(Kp,`] {
89
+ overflow: hidden `).concat(i,`;
90
+ overscroll-behavior: contain;
91
+ `).concat([t&&"position: relative ".concat(i,";"),r==="margin"&&`
92
+ padding-left: `.concat(s,`px;
93
+ padding-top: `).concat(l,`px;
94
+ padding-right: `).concat(c,`px;
95
+ margin-left:0;
96
+ margin-top:0;
97
+ margin-right: `).concat(f,"px ").concat(i,`;
98
+ `),r==="padding"&&"padding-right: ".concat(f,"px ").concat(i,";")].filter(Boolean).join(""),`
99
+ }
100
+
101
+ .`).concat(QS,` {
102
+ right: `).concat(f,"px ").concat(i,`;
103
+ }
104
+
105
+ .`).concat(WS,` {
106
+ margin-right: `).concat(f,"px ").concat(i,`;
107
+ }
108
+
109
+ .`).concat(QS," .").concat(QS,` {
110
+ right: 0 `).concat(i,`;
111
+ }
112
+
113
+ .`).concat(WS," .").concat(WS,` {
114
+ margin-right: 0 `).concat(i,`;
115
+ }
116
+
117
+ body[`).concat(Kp,`] {
118
+ `).concat(Xye,": ").concat(f,`px;
119
+ }
120
+ `)},AD=function(){var e=parseInt(document.body.getAttribute(Kp)||"0",10);return isFinite(e)?e:0},m0e=function(){j.useEffect(function(){return document.body.setAttribute(Kp,(AD()+1).toString()),function(){var e=AD()-1;e<=0?document.body.removeAttribute(Kp):document.body.setAttribute(Kp,e.toString())}},[])},g0e=function(e){var t=e.noRelative,r=e.noImportant,i=e.gapMode,s=i===void 0?"margin":i;m0e();var l=j.useMemo(function(){return d0e(s)},[s]);return j.createElement(h0e,{styles:p0e(l,!t,s,r?"":"!important")})},gO=!1;if(typeof window<"u")try{var bS=Object.defineProperty({},"passive",{get:function(){return gO=!0,!0}});window.addEventListener("test",bS,bS),window.removeEventListener("test",bS,bS)}catch{gO=!1}var Sp=gO?{passive:!1}:!1,y0e=function(e){return e.tagName==="TEXTAREA"},p7=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!y0e(e)&&r[t]==="visible")},v0e=function(e){return p7(e,"overflowY")},b0e=function(e){return p7(e,"overflowX")},MD=function(e,t){var r=t.ownerDocument,i=t;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var s=m7(e,i);if(s){var l=g7(e,i),c=l[1],f=l[2];if(c>f)return!0}i=i.parentNode}while(i&&i!==r.body);return!1},S0e=function(e){var t=e.scrollTop,r=e.scrollHeight,i=e.clientHeight;return[t,r,i]},w0e=function(e){var t=e.scrollLeft,r=e.scrollWidth,i=e.clientWidth;return[t,r,i]},m7=function(e,t){return e==="v"?v0e(t):b0e(t)},g7=function(e,t){return e==="v"?S0e(t):w0e(t)},E0e=function(e,t){return e==="h"&&t==="rtl"?-1:1},x0e=function(e,t,r,i,s){var l=E0e(e,window.getComputedStyle(t).direction),c=l*i,f=r.target,d=t.contains(f),h=!1,m=c>0,g=0,v=0;do{if(!f)break;var w=g7(e,f),b=w[0],_=w[1],x=w[2],R=_-x-l*b;(b||R)&&m7(e,f)&&(g+=R,v+=b);var S=f.parentNode;f=S&&S.nodeType===Node.DOCUMENT_FRAGMENT_NODE?S.host:S}while(!d&&f!==document.body||d&&(t.contains(f)||t===f));return(m&&Math.abs(g)<1||!m&&Math.abs(v)<1)&&(h=!0),h},SS=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},jD=function(e){return[e.deltaX,e.deltaY]},kD=function(e){return e&&"current"in e?e.current:e},_0e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},T0e=function(e){return`
121
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
122
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
123
+ `)},C0e=0,wp=[];function O0e(e){var t=j.useRef([]),r=j.useRef([0,0]),i=j.useRef(),s=j.useState(C0e++)[0],l=j.useState(h7)[0],c=j.useRef(e);j.useEffect(function(){c.current=e},[e]),j.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var _=Yye([e.lockRef.current],(e.shards||[]).map(kD),!0).filter(Boolean);return _.forEach(function(x){return x.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),_.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var f=j.useCallback(function(_,x){if("touches"in _&&_.touches.length===2||_.type==="wheel"&&_.ctrlKey)return!c.current.allowPinchZoom;var R=SS(_),S=r.current,T="deltaX"in _?_.deltaX:S[0]-R[0],E="deltaY"in _?_.deltaY:S[1]-R[1],O,C=_.target,M=Math.abs(T)>Math.abs(E)?"h":"v";if("touches"in _&&M==="h"&&C.type==="range")return!1;var D=window.getSelection(),$=D&&D.anchorNode,q=$?$===C||$.contains(C):!1;if(q)return!1;var L=MD(M,C);if(!L)return!0;if(L?O=M:(O=M==="v"?"h":"v",L=MD(M,C)),!L)return!1;if(!i.current&&"changedTouches"in _&&(T||E)&&(i.current=O),!O)return!0;var V=i.current||O;return x0e(V,x,_,V==="h"?T:E)},[]),d=j.useCallback(function(_){var x=_;if(!(!wp.length||wp[wp.length-1]!==l)){var R="deltaY"in x?jD(x):SS(x),S=t.current.filter(function(O){return O.name===x.type&&(O.target===x.target||x.target===O.shadowParent)&&_0e(O.delta,R)})[0];if(S&&S.should){x.cancelable&&x.preventDefault();return}if(!S){var T=(c.current.shards||[]).map(kD).filter(Boolean).filter(function(O){return O.contains(x.target)}),E=T.length>0?f(x,T[0]):!c.current.noIsolation;E&&x.cancelable&&x.preventDefault()}}},[]),h=j.useCallback(function(_,x,R,S){var T={name:_,delta:x,target:R,should:S,shadowParent:R0e(R)};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(E){return E!==T})},1)},[]),m=j.useCallback(function(_){r.current=SS(_),i.current=void 0},[]),g=j.useCallback(function(_){h(_.type,jD(_),_.target,f(_,e.lockRef.current))},[]),v=j.useCallback(function(_){h(_.type,SS(_),_.target,f(_,e.lockRef.current))},[]);j.useEffect(function(){return wp.push(l),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:v}),document.addEventListener("wheel",d,Sp),document.addEventListener("touchmove",d,Sp),document.addEventListener("touchstart",m,Sp),function(){wp=wp.filter(function(_){return _!==l}),document.removeEventListener("wheel",d,Sp),document.removeEventListener("touchmove",d,Sp),document.removeEventListener("touchstart",m,Sp)}},[]);var w=e.removeScrollBar,b=e.inert;return j.createElement(j.Fragment,null,b?j.createElement(l,{styles:T0e(s)}):null,w?j.createElement(g0e,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function R0e(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const A0e=r0e(d7,O0e);var y7=j.forwardRef(function(e,t){return j.createElement(O2,Cl({},e,{ref:t,sideCar:A0e}))});y7.classNames=O2.classNames;var M0e=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ep=new WeakMap,wS=new WeakMap,ES={},ST=0,v7=function(e){return e&&(e.host||v7(e.parentNode))},j0e=function(e,t){return t.map(function(r){if(e.contains(r))return r;var i=v7(r);return i&&e.contains(i)?i:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},k0e=function(e,t,r,i){var s=j0e(t,Array.isArray(e)?e:[e]);ES[r]||(ES[r]=new WeakMap);var l=ES[r],c=[],f=new Set,d=new Set(s),h=function(g){!g||f.has(g)||(f.add(g),h(g.parentNode))};s.forEach(h);var m=function(g){!g||d.has(g)||Array.prototype.forEach.call(g.children,function(v){if(f.has(v))m(v);else try{var w=v.getAttribute(i),b=w!==null&&w!=="false",_=(Ep.get(v)||0)+1,x=(l.get(v)||0)+1;Ep.set(v,_),l.set(v,x),c.push(v),_===1&&b&&wS.set(v,!0),x===1&&v.setAttribute(r,"true"),b||v.setAttribute(i,"true")}catch(R){console.error("aria-hidden: cannot operate on ",v,R)}})};return m(t),f.clear(),ST++,function(){c.forEach(function(g){var v=Ep.get(g)-1,w=l.get(g)-1;Ep.set(g,v),l.set(g,w),v||(wS.has(g)||g.removeAttribute(i),wS.delete(g)),w||g.removeAttribute(r)}),ST--,ST||(Ep=new WeakMap,Ep=new WeakMap,wS=new WeakMap,ES={})}},D0e=function(e,t,r){r===void 0&&(r="data-aria-hidden");var i=Array.from(Array.isArray(e)?e:[e]),s=M0e(e);return s?(i.push.apply(i,Array.from(s.querySelectorAll("[aria-live], script"))),k0e(i,s,r,"aria-hidden")):function(){return null}},R2="Dialog",[b7]=lp(R2),[N0e,pl]=b7(R2),S7=e=>{const{__scopeDialog:t,children:r,open:i,defaultOpen:s,onOpenChange:l,modal:c=!0}=e,f=j.useRef(null),d=j.useRef(null),[h,m]=i1({prop:i,defaultProp:s??!1,onChange:l,caller:R2});return k.jsx(N0e,{scope:t,triggerRef:f,contentRef:d,contentId:Dl(),titleId:Dl(),descriptionId:Dl(),open:h,onOpenChange:m,onOpenToggle:j.useCallback(()=>m(g=>!g),[m]),modal:c,children:r})};S7.displayName=R2;var w7="DialogTrigger",z0e=j.forwardRef((e,t)=>{const{__scopeDialog:r,...i}=e,s=pl(w7,r),l=sa(t,s.triggerRef);return k.jsx(Qr.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":u5(s.open),...i,ref:l,onClick:Dr(e.onClick,s.onOpenToggle)})});z0e.displayName=w7;var s5="DialogPortal",[$0e,E7]=b7(s5,{forceMount:void 0}),x7=e=>{const{__scopeDialog:t,forceMount:r,children:i,container:s}=e,l=pl(s5,t);return k.jsx($0e,{scope:t,forceMount:r,children:j.Children.map(i,c=>k.jsx(Pm,{present:r||l.open,children:k.jsx(u7,{asChild:!0,container:s,children:c})}))})};x7.displayName=s5;var Nw="DialogOverlay",_7=j.forwardRef((e,t)=>{const r=E7(Nw,e.__scopeDialog),{forceMount:i=r.forceMount,...s}=e,l=pl(Nw,e.__scopeDialog);return l.modal?k.jsx(Pm,{present:i||l.open,children:k.jsx(I0e,{...s,ref:t})}):null});_7.displayName=Nw;var P0e=Dw("DialogOverlay.RemoveScroll"),I0e=j.forwardRef((e,t)=>{const{__scopeDialog:r,...i}=e,s=pl(Nw,r);return k.jsx(y7,{as:P0e,allowPinchZoom:!0,shards:[s.contentRef],children:k.jsx(Qr.div,{"data-state":u5(s.open),...i,ref:t,style:{pointerEvents:"auto",...i.style}})})}),Gh="DialogContent",T7=j.forwardRef((e,t)=>{const r=E7(Gh,e.__scopeDialog),{forceMount:i=r.forceMount,...s}=e,l=pl(Gh,e.__scopeDialog);return k.jsx(Pm,{present:i||l.open,children:l.modal?k.jsx(L0e,{...s,ref:t}):k.jsx(U0e,{...s,ref:t})})});T7.displayName=Gh;var L0e=j.forwardRef((e,t)=>{const r=pl(Gh,e.__scopeDialog),i=j.useRef(null),s=sa(t,r.contentRef,i);return j.useEffect(()=>{const l=i.current;if(l)return D0e(l)},[]),k.jsx(C7,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Dr(e.onCloseAutoFocus,l=>{l.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:Dr(e.onPointerDownOutside,l=>{const c=l.detail.originalEvent,f=c.button===0&&c.ctrlKey===!0;(c.button===2||f)&&l.preventDefault()}),onFocusOutside:Dr(e.onFocusOutside,l=>l.preventDefault())})}),U0e=j.forwardRef((e,t)=>{const r=pl(Gh,e.__scopeDialog),i=j.useRef(!1),s=j.useRef(!1);return k.jsx(C7,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{e.onCloseAutoFocus?.(l),l.defaultPrevented||(i.current||r.triggerRef.current?.focus(),l.preventDefault()),i.current=!1,s.current=!1},onInteractOutside:l=>{e.onInteractOutside?.(l),l.defaultPrevented||(i.current=!0,l.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const c=l.target;r.triggerRef.current?.contains(c)&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&s.current&&l.preventDefault()}})}),C7=j.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:l,...c}=e,f=pl(Gh,r),d=j.useRef(null),h=sa(t,d);return Kye(),k.jsxs(k.Fragment,{children:[k.jsx(s7,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:s,onUnmountAutoFocus:l,children:k.jsx(i7,{role:"dialog",id:f.contentId,"aria-describedby":f.descriptionId,"aria-labelledby":f.titleId,"data-state":u5(f.open),...c,ref:h,onDismiss:()=>f.onOpenChange(!1)})}),k.jsxs(k.Fragment,{children:[k.jsx(B0e,{titleId:f.titleId}),k.jsx(G0e,{contentRef:d,descriptionId:f.descriptionId})]})]})}),l5="DialogTitle",q0e=j.forwardRef((e,t)=>{const{__scopeDialog:r,...i}=e,s=pl(l5,r);return k.jsx(Qr.h2,{id:s.titleId,...i,ref:t})});q0e.displayName=l5;var O7="DialogDescription",V0e=j.forwardRef((e,t)=>{const{__scopeDialog:r,...i}=e,s=pl(O7,r);return k.jsx(Qr.p,{id:s.descriptionId,...i,ref:t})});V0e.displayName=O7;var R7="DialogClose",F0e=j.forwardRef((e,t)=>{const{__scopeDialog:r,...i}=e,s=pl(R7,r);return k.jsx(Qr.button,{type:"button",...i,ref:t,onClick:Dr(e.onClick,()=>s.onOpenChange(!1))})});F0e.displayName=R7;function u5(e){return e?"open":"closed"}var A7="DialogTitleWarning",[Sxe,M7]=Wme(A7,{contentName:Gh,titleName:l5,docsSlug:"dialog"}),B0e=({titleId:e})=>{const t=M7(A7),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
124
+
125
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
126
+
127
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return j.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},H0e="DialogDescriptionWarning",G0e=({contentRef:e,descriptionId:t})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${M7(H0e).contentName}}.`;return j.useEffect(()=>{const s=e.current?.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(i))},[i,e,t]),null},K0e=S7,Y0e=x7,Z0e=_7,X0e=T7,kv='[cmdk-group=""]',wT='[cmdk-group-items=""]',Q0e='[cmdk-group-heading=""]',j7='[cmdk-item=""]',DD=`${j7}:not([aria-disabled="true"])`,yO="cmdk-item-select",Cp="data-value",W0e=(e,t,r)=>Mye(e,t,r),k7=j.createContext(void 0),s1=()=>j.useContext(k7),D7=j.createContext(void 0),c5=()=>j.useContext(D7),N7=j.createContext(void 0),z7=j.forwardRef((e,t)=>{let r=Op(()=>{var I,U;return{search:"",value:(U=(I=e.value)!=null?I:e.defaultValue)!=null?U:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),i=Op(()=>new Set),s=Op(()=>new Map),l=Op(()=>new Map),c=Op(()=>new Set),f=$7(e),{label:d,children:h,value:m,onValueChange:g,filter:v,shouldFilter:w,loop:b,disablePointerSelection:_=!1,vimBindings:x=!0,...R}=e,S=Dl(),T=Dl(),E=Dl(),O=j.useRef(null),C=uve();Kh(()=>{if(m!==void 0){let I=m.trim();r.current.value=I,M.emit()}},[m]),Kh(()=>{C(6,F)},[]);let M=j.useMemo(()=>({subscribe:I=>(c.current.add(I),()=>c.current.delete(I)),snapshot:()=>r.current,setState:(I,U,P)=>{var G,ee,ue,ve;if(!Object.is(r.current[I],U)){if(r.current[I]=U,I==="search")V(),q(),C(1,L);else if(I==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let Ee=document.getElementById(E);Ee?Ee.focus():(G=document.getElementById(S))==null||G.focus()}if(C(7,()=>{var Ee;r.current.selectedItemId=(Ee=re())==null?void 0:Ee.id,M.emit()}),P||C(5,F),((ee=f.current)==null?void 0:ee.value)!==void 0){let Ee=U??"";(ve=(ue=f.current).onValueChange)==null||ve.call(ue,Ee);return}}M.emit()}},emit:()=>{c.current.forEach(I=>I())}}),[]),D=j.useMemo(()=>({value:(I,U,P)=>{var G;U!==((G=l.current.get(I))==null?void 0:G.value)&&(l.current.set(I,{value:U,keywords:P}),r.current.filtered.items.set(I,$(U,P)),C(2,()=>{q(),M.emit()}))},item:(I,U)=>(i.current.add(I),U&&(s.current.has(U)?s.current.get(U).add(I):s.current.set(U,new Set([I]))),C(3,()=>{V(),q(),r.current.value||L(),M.emit()}),()=>{l.current.delete(I),i.current.delete(I),r.current.filtered.items.delete(I);let P=re();C(4,()=>{V(),P?.getAttribute("id")===I&&L(),M.emit()})}),group:I=>(s.current.has(I)||s.current.set(I,new Set),()=>{l.current.delete(I),s.current.delete(I)}),filter:()=>f.current.shouldFilter,label:d||e["aria-label"],getDisablePointerSelection:()=>f.current.disablePointerSelection,listId:S,inputId:E,labelId:T,listInnerRef:O}),[]);function $(I,U){var P,G;let ee=(G=(P=f.current)==null?void 0:P.filter)!=null?G:W0e;return I?ee(I,r.current.search,U):0}function q(){if(!r.current.search||f.current.shouldFilter===!1)return;let I=r.current.filtered.items,U=[];r.current.filtered.groups.forEach(G=>{let ee=s.current.get(G),ue=0;ee.forEach(ve=>{let Ee=I.get(ve);ue=Math.max(Ee,ue)}),U.push([G,ue])});let P=O.current;ae().sort((G,ee)=>{var ue,ve;let Ee=G.getAttribute("id"),Oe=ee.getAttribute("id");return((ue=I.get(Oe))!=null?ue:0)-((ve=I.get(Ee))!=null?ve:0)}).forEach(G=>{let ee=G.closest(wT);ee?ee.appendChild(G.parentElement===ee?G:G.closest(`${wT} > *`)):P.appendChild(G.parentElement===P?G:G.closest(`${wT} > *`))}),U.sort((G,ee)=>ee[1]-G[1]).forEach(G=>{var ee;let ue=(ee=O.current)==null?void 0:ee.querySelector(`${kv}[${Cp}="${encodeURIComponent(G[0])}"]`);ue?.parentElement.appendChild(ue)})}function L(){let I=ae().find(P=>P.getAttribute("aria-disabled")!=="true"),U=I?.getAttribute(Cp);M.setState("value",U||void 0)}function V(){var I,U,P,G;if(!r.current.search||f.current.shouldFilter===!1){r.current.filtered.count=i.current.size;return}r.current.filtered.groups=new Set;let ee=0;for(let ue of i.current){let ve=(U=(I=l.current.get(ue))==null?void 0:I.value)!=null?U:"",Ee=(G=(P=l.current.get(ue))==null?void 0:P.keywords)!=null?G:[],Oe=$(ve,Ee);r.current.filtered.items.set(ue,Oe),Oe>0&&ee++}for(let[ue,ve]of s.current)for(let Ee of ve)if(r.current.filtered.items.get(Ee)>0){r.current.filtered.groups.add(ue);break}r.current.filtered.count=ee}function F(){var I,U,P;let G=re();G&&(((I=G.parentElement)==null?void 0:I.firstChild)===G&&((P=(U=G.closest(kv))==null?void 0:U.querySelector(Q0e))==null||P.scrollIntoView({block:"nearest"})),G.scrollIntoView({block:"nearest"}))}function re(){var I;return(I=O.current)==null?void 0:I.querySelector(`${j7}[aria-selected="true"]`)}function ae(){var I;return Array.from(((I=O.current)==null?void 0:I.querySelectorAll(DD))||[])}function K(I){let U=ae()[I];U&&M.setState("value",U.getAttribute(Cp))}function B(I){var U;let P=re(),G=ae(),ee=G.findIndex(ve=>ve===P),ue=G[ee+I];(U=f.current)!=null&&U.loop&&(ue=ee+I<0?G[G.length-1]:ee+I===G.length?G[0]:G[ee+I]),ue&&M.setState("value",ue.getAttribute(Cp))}function Y(I){let U=re(),P=U?.closest(kv),G;for(;P&&!G;)P=I>0?sve(P,kv):lve(P,kv),G=P?.querySelector(DD);G?M.setState("value",G.getAttribute(Cp)):B(I)}let fe=()=>K(ae().length-1),se=I=>{I.preventDefault(),I.metaKey?fe():I.altKey?Y(1):B(1)},N=I=>{I.preventDefault(),I.metaKey?K(0):I.altKey?Y(-1):B(-1)};return j.createElement(Vl.div,{ref:t,tabIndex:-1,...R,"cmdk-root":"",onKeyDown:I=>{var U;(U=R.onKeyDown)==null||U.call(R,I);let P=I.nativeEvent.isComposing||I.keyCode===229;if(!(I.defaultPrevented||P))switch(I.key){case"n":case"j":{x&&I.ctrlKey&&se(I);break}case"ArrowDown":{se(I);break}case"p":case"k":{x&&I.ctrlKey&&N(I);break}case"ArrowUp":{N(I);break}case"Home":{I.preventDefault(),K(0);break}case"End":{I.preventDefault(),fe();break}case"Enter":{I.preventDefault();let G=re();if(G){let ee=new Event(yO);G.dispatchEvent(ee)}}}}},j.createElement("label",{"cmdk-label":"",htmlFor:D.inputId,id:D.labelId,style:fve},d),A2(e,I=>j.createElement(D7.Provider,{value:M},j.createElement(k7.Provider,{value:D},I))))}),J0e=j.forwardRef((e,t)=>{var r,i;let s=Dl(),l=j.useRef(null),c=j.useContext(N7),f=s1(),d=$7(e),h=(i=(r=d.current)==null?void 0:r.forceMount)!=null?i:c?.forceMount;Kh(()=>{if(!h)return f.item(s,c?.id)},[h]);let m=P7(s,l,[e.value,e.children,l],e.keywords),g=c5(),v=rf(C=>C.value&&C.value===m.current),w=rf(C=>h||f.filter()===!1?!0:C.search?C.filtered.items.get(s)>0:!0);j.useEffect(()=>{let C=l.current;if(!(!C||e.disabled))return C.addEventListener(yO,b),()=>C.removeEventListener(yO,b)},[w,e.onSelect,e.disabled]);function b(){var C,M;_(),(M=(C=d.current).onSelect)==null||M.call(C,m.current)}function _(){g.setState("value",m.current,!0)}if(!w)return null;let{disabled:x,value:R,onSelect:S,forceMount:T,keywords:E,...O}=e;return j.createElement(Vl.div,{ref:nf(l,t),...O,id:s,"cmdk-item":"",role:"option","aria-disabled":!!x,"aria-selected":!!v,"data-disabled":!!x,"data-selected":!!v,onPointerMove:x||f.getDisablePointerSelection()?void 0:_,onClick:x?void 0:b},e.children)}),eve=j.forwardRef((e,t)=>{let{heading:r,children:i,forceMount:s,...l}=e,c=Dl(),f=j.useRef(null),d=j.useRef(null),h=Dl(),m=s1(),g=rf(w=>s||m.filter()===!1?!0:w.search?w.filtered.groups.has(c):!0);Kh(()=>m.group(c),[]),P7(c,f,[e.value,e.heading,d]);let v=j.useMemo(()=>({id:c,forceMount:s}),[s]);return j.createElement(Vl.div,{ref:nf(f,t),...l,"cmdk-group":"",role:"presentation",hidden:g?void 0:!0},r&&j.createElement("div",{ref:d,"cmdk-group-heading":"","aria-hidden":!0,id:h},r),A2(e,w=>j.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?h:void 0},j.createElement(N7.Provider,{value:v},w))))}),tve=j.forwardRef((e,t)=>{let{alwaysRender:r,...i}=e,s=j.useRef(null),l=rf(c=>!c.search);return!r&&!l?null:j.createElement(Vl.div,{ref:nf(s,t),...i,"cmdk-separator":"",role:"separator"})}),nve=j.forwardRef((e,t)=>{let{onValueChange:r,...i}=e,s=e.value!=null,l=c5(),c=rf(h=>h.search),f=rf(h=>h.selectedItemId),d=s1();return j.useEffect(()=>{e.value!=null&&l.setState("search",e.value)},[e.value]),j.createElement(Vl.input,{ref:t,...i,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":d.listId,"aria-labelledby":d.labelId,"aria-activedescendant":f,id:d.inputId,type:"text",value:s?e.value:c,onChange:h=>{s||l.setState("search",h.target.value),r?.(h.target.value)}})}),rve=j.forwardRef((e,t)=>{let{children:r,label:i="Suggestions",...s}=e,l=j.useRef(null),c=j.useRef(null),f=rf(h=>h.selectedItemId),d=s1();return j.useEffect(()=>{if(c.current&&l.current){let h=c.current,m=l.current,g,v=new ResizeObserver(()=>{g=requestAnimationFrame(()=>{let w=h.offsetHeight;m.style.setProperty("--cmdk-list-height",w.toFixed(1)+"px")})});return v.observe(h),()=>{cancelAnimationFrame(g),v.unobserve(h)}}},[]),j.createElement(Vl.div,{ref:nf(l,t),...s,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":f,"aria-label":i,id:d.listId},A2(e,h=>j.createElement("div",{ref:nf(c,d.listInnerRef),"cmdk-list-sizer":""},h)))}),ave=j.forwardRef((e,t)=>{let{open:r,onOpenChange:i,overlayClassName:s,contentClassName:l,container:c,...f}=e;return j.createElement(K0e,{open:r,onOpenChange:i},j.createElement(Y0e,{container:c},j.createElement(Z0e,{"cmdk-overlay":"",className:s}),j.createElement(X0e,{"aria-label":e.label,"cmdk-dialog":"",className:l},j.createElement(z7,{ref:t,...f}))))}),ive=j.forwardRef((e,t)=>rf(r=>r.filtered.count===0)?j.createElement(Vl.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),ove=j.forwardRef((e,t)=>{let{progress:r,children:i,label:s="Loading...",...l}=e;return j.createElement(Vl.div,{ref:t,...l,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":s},A2(e,c=>j.createElement("div",{"aria-hidden":!0},c)))}),es=Object.assign(z7,{List:rve,Item:J0e,Input:nve,Group:eve,Separator:tve,Dialog:ave,Empty:ive,Loading:ove});function sve(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function lve(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function $7(e){let t=j.useRef(e);return Kh(()=>{t.current=e}),t}var Kh=typeof window>"u"?j.useEffect:j.useLayoutEffect;function Op(e){let t=j.useRef();return t.current===void 0&&(t.current=e()),t}function rf(e){let t=c5(),r=()=>e(t.snapshot());return j.useSyncExternalStore(t.subscribe,r,r)}function P7(e,t,r,i=[]){let s=j.useRef(),l=s1();return Kh(()=>{var c;let f=(()=>{var h;for(let m of r){if(typeof m=="string")return m.trim();if(typeof m=="object"&&"current"in m)return m.current?(h=m.current.textContent)==null?void 0:h.trim():s.current}})(),d=i.map(h=>h.trim());l.value(e,f,d),(c=t.current)==null||c.setAttribute(Cp,f),s.current=f}),s}var uve=()=>{let[e,t]=j.useState(),r=Op(()=>new Map);return Kh(()=>{r.current.forEach(i=>i()),r.current=new Map},[e]),(i,s)=>{r.current.set(i,s),t({})}};function cve(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function A2({asChild:e,children:t},r){return e&&j.isValidElement(t)?j.cloneElement(cve(t),{ref:t.ref},r(t.props.children)):r(t)}var fve={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const dve=bc("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function hve({className:e,variant:t,asChild:r=!1,...i}){const s=r?lI:"span";return k.jsx(s,{"data-slot":"badge",className:wn(dve({variant:t}),e),...i})}const I7=j.forwardRef(({className:e,...t},r)=>k.jsx(es,{ref:r,"data-slot":"command",className:wn("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t})),pve=j.forwardRef(({className:e,...t},r)=>k.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[k.jsx(ume,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),k.jsx(es.Input,{ref:r,className:wn("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));pve.displayName=es.Input.displayName;function L7({className:e,...t}){return k.jsx(es.List,{"data-slot":"command-list",className:wn("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}function U7({className:e,...t}){return k.jsx(es.Group,{"data-slot":"command-group",className:wn("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...t})}function q7({className:e,...t}){return k.jsx(es.Item,{"data-slot":"command-item",className:wn("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function mve({multiple:e,items:t=[],selected:r,onValueChange:i,autoFocus:s=!1,disabled:l=!1,ariaDescribedby:c,ariaPlaceholder:f,onFocus:d,onBlur:h,className:m,id:g}){const v=j.useRef(null),[w,b]=j.useState(!1),[_,x]=j.useState(""),R=j.useMemo(()=>t.filter(M=>r.some(D=>Pc(M.value,D))),[t,r]),S=j.useMemo(()=>t.filter(M=>!R.some(D=>Pc(D.value,M.value))),[t,R]),T=j.useCallback(M=>{if(l)return;const D=R.filter($=>!Pc($.value,M.value));i?.(D.map($=>$.index))},[R,i,l]),E=j.useCallback(M=>{if(!(l||!v.current||v.current.value!==""))if(M.key==="Delete"||M.key==="Backspace"){const D=R.slice(0,-1);i?.(D.map($=>$.index))}else M.key==="Escape"&&v.current.blur()},[R,i,l]),O=j.useCallback(M=>{if(l)return;x("");const D=e?[...R,M]:[M];i?.(D.map($=>$.index))},[e,R,i,l]),C=j.useCallback(M=>{l||b(!0),d?.(M)},[l,d]);return k.jsxs(I7,{onKeyDown:E,className:wn("overflow-visible bg-transparent",m),autoFocus:s,"aria-disabled":l,onBlur:h,onFocus:C,"aria-describedby":c,"aria-placeholder":f,children:[k.jsx("div",{className:wn("group border border-input px-3 py-2 text-sm ring-offset-background rounded-md focus-within:ring-1 focus-within:ring-ring focus-within:ring-offset-1",l&&"opacity-50 cursor-not-allowed"),children:k.jsxs("div",{className:"flex gap-1 flex-wrap",children:[R.map(M=>k.jsxs(hve,{variant:"secondary",children:[M.label,k.jsx("button",{type:"button",className:"rtl:mr-1 ltr:ml-1 ring-offset-background rounded-full outline-none focus:ring-1 focus:ring-ring focus:ring-offset-1",onKeyDown:D=>D.key==="Enter"&&!l&&T(M),onMouseDown:D=>{D.preventDefault(),D.stopPropagation()},onClick:()=>T(M),disabled:l,children:k.jsx(iI,{className:wn("h-3 w-3 text-muted-foreground hover:text-foreground",l&&"pointer-events-none")})})]},M.value)),k.jsx(es.Input,{ref:v,value:_,onValueChange:x,onBlur:()=>b(!1),onFocus:()=>!l&&b(!0),placeholder:"Select ...",className:"rtl:mr-2 ltr:ml-2 bg-transparent outline-none placeholder:text-muted-foreground flex-1",disabled:l,"aria-controls":`command-item-input-${g}`,"aria-labelledby":`command-item-input-${g}`,id:`command-item-input-${g}`})]})}),w&&!l&&S.length>0&&k.jsx("div",{className:"relative mt-2",children:k.jsx("div",{className:"absolute w-full z-10 top-0 rounded-md border bg-popover text-popover-foreground shadow-md outline-none animate-in",children:k.jsx(U7,{className:"h-full overflow-auto",children:k.jsx(L7,{children:S.map(M=>k.jsx(q7,{disabled:M.disabled,onMouseDown:D=>{D.preventDefault(),D.stopPropagation()},"aria-controls":`${M.value}-command-item`,"aria-labelledby":`${M.value}-command-item`,id:`${M.value}-command-item`,onSelect:()=>O(M),className:"cursor-pointer",children:M.label},`${M.value}-command-item`))})})})})]})}function gve({items:e,selected:t,onValueChange:r,autoFocus:i=!1,disabled:s=!1,required:l=!1,placeholder:c="Select...",ariaDescribedby:f,ariaPlaceholder:d,onFocus:h,onBlur:m,className:g}){const[v,w]=j.useState(!1),b=e?.find(S=>S.value===t),_=j.useRef(null),x=j.useRef(null);j.useEffect(()=>{v&&_.current&&requestAnimationFrame(()=>{var S;(S=_.current)===null||S===void 0||S.scrollIntoView({block:"nearest"})})},[v]);const R=S=>{x.current&&!x.current.contains(S.relatedTarget)&&w(!1),m?.(S)};return k.jsxs(I7,{ref:x,className:wn("overflow-visible bg-transparent",g),autoFocus:i,"aria-disabled":s,onBlur:R,onFocus:h,"aria-describedby":f,"aria-placeholder":d,children:[k.jsxs("div",{onClick:()=>!s&&w(!v),className:wn("flex h-9 w-full items-center justify-between gap-2 whitespace-nowrap 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",!b&&l&&"border-red-500",s&&"opacity-50 cursor-not-allowed",g),children:[k.jsx("span",{className:wn("flex-1 line-clamp-1",!b&&"text-muted-foreground"),children:b?.label||c}),k.jsx(rI,{className:"h-4 w-4 opacity-50"})]}),k.jsx("div",{className:"relative",children:v&&e&&e.length>0?k.jsx("div",{style:{top:"0.5rem"},className:"absolute w-full z-10 rounded-md border bg-popover text-popover-foreground shadow-md outline-none",children:k.jsx(U7,{className:"h-full overflow-auto",children:k.jsx(L7,{children:e.map(S=>k.jsxs(q7,{ref:S.value===t?_:void 0,onMouseDown:T=>{T.preventDefault(),T.stopPropagation()},onSelect:()=>{S.disabled||(r?.(S.value),w(!1))},className:wn("cursor-pointer relative flex items-center justify-between rounded-sm py-1.5 gap-2 rtl:flex-row-reverse",S.value===t&&"font-semibold",S.disabled&&"opacity-50 cursor-not-allowed"),children:[k.jsx("span",{children:S.label}),k.jsx("span",{className:"flex h-3.5 w-3.5 items-center justify-center",children:S.value===t&&k.jsx(Qpe,{className:"h-4 w-4"})})]},S.value))})})}):null})]})}function yve({id:e,options:t,required:r,disabled:i,readonly:s,value:l,multiple:c,autofocus:f,onChange:d,onBlur:h,onFocus:m,defaultValue:g,placeholder:v,rawErrors:w=[],className:b}){const{enumOptions:_,enumDisabled:x,emptyValue:R}=t,S=()=>{m(e,Na(l,_,R))},T=()=>{h(e,Na(l,_,R))},E=_?.map(({value:C,label:M},D)=>({value:c?C:D.toString(),label:M,index:D,disabled:Array.isArray(x)&&x.includes(C)})),O=wn({"border-destructive":w.length>0},b);return k.jsx("div",{className:"p-0.5",children:c?k.jsx(mve,{id:e,autoFocus:f,disabled:i||s,multiple:!0,className:O,items:E,selected:l,onValueChange:C=>{d(Na(C,_,R))},onFocus:S,onBlur:T}):k.jsx(gve,{items:E,selected:jP(l??g,_,!1),onValueChange:C=>{d(Na(C,_,R))},autoFocus:f,disabled:i||s,required:r,placeholder:v,className:O,onFocus:S,onBlur:T,ariaDescribedby:co(e)})})}function vve({className:e,...t}){return k.jsx("textarea",{"data-slot":"textarea",className:wn("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}function bve({id:e,htmlName:t,placeholder:r,value:i,required:s,disabled:l,autofocus:c,readonly:f,onBlur:d,onFocus:h,onChange:m,options:g,className:v}){const w=({target:{value:x}})=>m(x===""?g.emptyValue:x),b=({target:x})=>d(e,x&&x.value),_=({target:x})=>h(e,x&&x.value);return k.jsx("div",{className:"flex p-0.5",children:k.jsx(vve,{id:e,name:t||e,placeholder:r,disabled:l,readOnly:f,value:i??"",required:s,autoFocus:c,rows:g.rows||5,onChange:w,onBlur:b,onFocus:_,"aria-describedby":co(e),className:v})})}function Sve(){return{CheckboxWidget:Ege,CheckboxesWidget:xge,RadioWidget:Jge,RangeWidget:wye,SelectWidget:yve,TextareaWidget:bve}}function wve(){return{templates:Qme(),widgets:Sve()}}function Eve(){return jpe(wve())}const xve=Eve();function Tb({controlled:e,default:t,name:r,state:i="value"}){const{current:s}=j.useRef(e!==void 0),[l,c]=j.useState(t),f=s?e:l,d=j.useCallback(h=>{s||c(h)},[]);return[f,d]}const V7=j.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function _ve(){return j.useContext(V7)}function f5(e){const{children:t,elementsRef:r,labelsRef:i,onMapChange:s}=e,l=ot(s),c=j.useRef(0),f=so(Cve).current,d=so(Tve).current,[h,m]=j.useState(0),g=j.useRef(h),v=ot((R,S)=>{d.set(R,S??null),g.current+=1,m(g.current)}),w=ot(R=>{d.delete(R),g.current+=1,m(g.current)}),b=j.useMemo(()=>{const R=new Map;return Array.from(d.keys()).filter(T=>T.isConnected).sort(Ove).forEach((T,E)=>{const O=d.get(T)??{};R.set(T,{...O,index:E})}),R},[d,h]);ct(()=>{if(typeof MutationObserver!="function"||b.size===0)return;const R=new MutationObserver(S=>{const T=new Set,E=O=>T.has(O)?T.delete(O):T.add(O);S.forEach(O=>{O.removedNodes.forEach(E),O.addedNodes.forEach(E)}),T.size===0&&(g.current+=1,m(g.current))});return b.forEach((S,T)=>{T.parentElement&&R.observe(T.parentElement,{childList:!0})}),()=>{R.disconnect()}},[b]),ct(()=>{g.current===h&&(r.current.length!==b.size&&(r.current.length=b.size),i&&i.current.length!==b.size&&(i.current.length=b.size),c.current=b.size),l(b)},[l,b,r,i,h]),ct(()=>()=>{r.current=[]},[r]),ct(()=>()=>{i&&(i.current=[])},[i]);const _=ot(R=>(f.add(R),()=>{f.delete(R)}));ct(()=>{f.forEach(R=>R(b))},[f,b]);const x=j.useMemo(()=>({register:v,unregister:w,subscribeMapChange:_,elementsRef:r,labelsRef:i,nextIndexRef:c}),[v,w,_,r,i,c]);return k.jsx(V7.Provider,{value:x,children:t})}function Tve(){return new Map}function Cve(){return new Set}function Ove(e,t){const r=e.compareDocumentPosition(t);return r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS?1:0}const Rve=j.createContext(void 0);function d5(){return j.useContext(Rve)?.direction??"ltr"}const F7=j.createContext(void 0);function h5(){const e=j.useContext(F7);if(e===void 0)throw new Error(Si(64));return e}let Ave=(function(e){return e.activationDirection="data-activation-direction",e.orientation="data-orientation",e})({});const p5={tabActivationDirection:e=>({[Ave.activationDirection]:e})},Mve=j.forwardRef(function(t,r){const{className:i,defaultValue:s=0,onValueChange:l,orientation:c="horizontal",render:f,value:d,...h}=t,m=d5(),g=Object.hasOwn(t,"defaultValue"),v=j.useRef([]),[w,b]=j.useState(()=>new Map),[_,x]=Tb({controlled:d,default:s,name:"Tabs",state:"value"}),R=d!==void 0,[S,T]=j.useState(()=>new Map),[E,O]=j.useState("none"),C=ot((B,Y)=>{l?.(B,Y),!Y.isCanceled&&(x(B),O(Y.activationDirection))}),M=ot((B,Y)=>{b(fe=>{if(fe.get(B)===Y)return fe;const se=new Map(fe);return se.set(B,Y),se})}),D=ot((B,Y)=>{b(fe=>{if(!fe.has(B)||fe.get(B)!==Y)return fe;const se=new Map(fe);return se.delete(B),se})}),$=j.useCallback(B=>w.get(B),[w]),q=j.useCallback(B=>{for(const Y of S.values())if(B===Y?.value)return Y?.id},[S]),L=j.useCallback(B=>{if(B===void 0)return null;for(const[Y,fe]of S.entries())if(fe!=null&&B===(fe.value??fe.index))return Y;return null},[S]),V=j.useMemo(()=>({direction:m,getTabElementBySelectedValue:L,getTabIdByPanelValue:q,getTabPanelIdByValue:$,onValueChange:C,orientation:c,registerMountedTabPanel:M,setTabMap:T,unregisterMountedTabPanel:D,tabActivationDirection:E,value:_}),[m,L,q,$,C,c,M,T,D,E,_]),F=j.useMemo(()=>{for(const B of S.values())if(B!=null&&B.value===_)return B},[S,_]),re=j.useMemo(()=>{for(const B of S.values())if(B!=null&&!B.disabled)return B.value},[S]);ct(()=>{if(R||S.size===0)return;const B=F?.disabled,Y=F==null&&_!==null;if(g&&B&&_===s||!B&&!Y)return;const se=re??null;_!==se&&(x(se),O("none"))},[s,re,g,R,F,O,x,S,_]);const K=mr("div",t,{state:{orientation:c,tabActivationDirection:E},ref:r,props:h,stateAttributesMapping:p5});return k.jsx(F7.Provider,{value:V,children:k.jsx(f5,{elementsRef:v,children:K})})});function gs(e){return e?.ownerDocument||document}const jve={...Nb};let ND=0;function kve(e,t="mui"){const[r,i]=j.useState(e),s=e||r;return j.useEffect(()=>{r==null&&(ND+=1,i(`${t}-${ND}`))},[r,t]),s}const zD=jve.useId;function Lm(e,t){if(zD!==void 0){const r=zD();return e??(t?`${t}-${r}`:r)}return kve(e,t)}function Um(e){return Lm(e,"base-ui")}const B7="data-composite-item-active";let H7=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function m5(e={}){const{label:t,metadata:r,textRef:i,indexGuessBehavior:s,index:l}=e,{register:c,unregister:f,subscribeMapChange:d,elementsRef:h,labelsRef:m,nextIndexRef:g}=_ve(),v=j.useRef(-1),[w,b]=j.useState(l??(s===H7.GuessFromOrder?()=>{if(v.current===-1){const R=g.current;g.current+=1,v.current=R}return v.current}:-1)),_=j.useRef(null),x=j.useCallback(R=>{if(_.current=R,w!==-1&&R!==null&&(h.current[w]=R,m)){const S=t!==void 0;m.current[w]=S?t:i?.current?.textContent??R.textContent}},[w,h,m,t,i]);return ct(()=>{if(l!=null)return;const R=_.current;if(R)return c(R,r),()=>{f(R)}},[l,c,f,r]),ct(()=>{if(l==null)return d(R=>{const S=_.current?R.get(_.current)?.index:null;S!=null&&b(S)})},[l,d,b]),j.useMemo(()=>({ref:x,index:w}),[w,x])}function Dve(e={}){const{highlightItemOnHover:t,highlightedIndex:r,onHighlightedIndexChange:i}=t$(),{ref:s,index:l}=m5(e),c=r===l,f=j.useRef(null),d=fc(s,f);return{compositeProps:j.useMemo(()=>({tabIndex:c?0:-1,onFocus(){i(l)},onMouseMove(){const m=f.current;if(!t||!m)return;const g=m.hasAttribute("disabled")||m.ariaDisabled==="true";!c&&!g&&m.focus()}}),[c,i,l,t]),compositeRef:d,index:l}}const G7=j.createContext(void 0);function Nve(){const e=j.useContext(G7);if(e===void 0)throw new Error(Si(65));return e}const af="none",Fc="trigger-press",Go="trigger-hover",g5="outside-press",ET="item-press",zve="close-press",Yh="focus-out",K7="escape-key",xT="list-navigation",$ve="cancel-open",Y7="imperative-action",Pve="window-resize";function mn(e,t,r,i){let s=!1,l=!1;const c=i??Da;return{reason:e,event:t??new Event("base-ui"),cancel(){s=!0},allowPropagation(){l=!0},get isCanceled(){return s},get isPropagationAllowed(){return l},trigger:r,...c}}const qm=typeof navigator<"u",_T=Uve(),Z7=Vve(),X7=qve(),Q7=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),W7=_T.platform==="MacIntel"&&_T.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(_T.platform),Ive=qm&&/apple/i.test(navigator.vendor),vO=qm&&/android/i.test(Z7)||/android/i.test(X7);qm&&Z7.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const Lve=X7.includes("jsdom/");function Uve(){if(!qm)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function qve(){if(!qm)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:r})=>`${t}/${r}`).join(" "):navigator.userAgent}function Vve(){if(!qm)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const bO="data-base-ui-focusable",J7="active",eL="selected",tL="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Bc="ArrowLeft",Hc="ArrowRight",y5="ArrowUp",l1="ArrowDown";function oc(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function zn(e,t){if(!e||!t)return!1;const r=t.getRootNode?.();if(e.contains(t))return!0;if(r&&CC(r)){let i=t;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function ao(e){return"composedPath"in e?e.composedPath()[0]:e.target}function sl(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const r=e;return r.target!=null&&t.contains(r.target)}function Fve(e){return e.matches("html,body")}function fa(e){return e?.ownerDocument||document}function nL(e){return Gr(e)&&e.matches(tL)}function SO(e){return e?e.getAttribute("role")==="combobox"&&nL(e):!1}function Cb(e){return e?e.hasAttribute(bO)?e:e.querySelector(`[${bO}]`)||e:null}function Ph(e,t,r=!0){return e.filter(s=>s.parentId===t&&(!r||s.context?.open)).flatMap(s=>[s,...Ph(e,s.id,r)])}function $D(e,t){let r=[],i=e.find(s=>s.id===t)?.parentId;for(;i;){const s=e.find(l=>l.id===i);i=s?.parentId,s&&(r=r.concat(s))}return r}function Ti(e){e.preventDefault(),e.stopPropagation()}function Bve(e){return"nativeEvent"in e}function rL(e){return e.mozInputSource===0&&e.isTrusted?!0:vO&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function aL(e){return Lve?!1:!vO&&e.width===0&&e.height===0||vO&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function mm(e,t){const r=["mouse","pen"];return t||r.push("",void 0),r.includes(e)}function iL(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const Hve=["top","right","bottom","left"],gm=Math.min,Ko=Math.max,zw=Math.round,qp=Math.floor,Nl=e=>({x:e,y:e}),Gve={left:"right",right:"left",bottom:"top",top:"bottom"},Kve={start:"end",end:"start"};function wO(e,t,r){return Ko(e,gm(t,r))}function pc(e,t){return typeof e=="function"?e(t):e}function oo(e){return e.split("-")[0]}function mf(e){return e.split("-")[1]}function v5(e){return e==="x"?"y":"x"}function b5(e){return e==="y"?"height":"width"}const Yve=new Set(["top","bottom"]);function us(e){return Yve.has(oo(e))?"y":"x"}function S5(e){return v5(us(e))}function Zve(e,t,r){r===void 0&&(r=!1);const i=mf(e),s=S5(e),l=b5(s);let c=s==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(c=$w(c)),[c,$w(c)]}function Xve(e){const t=$w(e);return[EO(e),t,EO(t)]}function EO(e){return e.replace(/start|end/g,t=>Kve[t])}const PD=["left","right"],ID=["right","left"],Qve=["top","bottom"],Wve=["bottom","top"];function Jve(e,t,r){switch(e){case"top":case"bottom":return r?t?ID:PD:t?PD:ID;case"left":case"right":return t?Qve:Wve;default:return[]}}function ebe(e,t,r,i){const s=mf(e);let l=Jve(oo(e),r==="start",i);return s&&(l=l.map(c=>c+"-"+s),t&&(l=l.concat(l.map(EO)))),l}function $w(e){return e.replace(/left|right|bottom|top/g,t=>Gve[t])}function tbe(e){return{top:0,right:0,bottom:0,left:0,...e}}function oL(e){return typeof e!="number"?tbe(e):{top:e,right:e,bottom:e,left:e}}function Pw(e){const{x:t,y:r,width:i,height:s}=e;return{width:i,height:s,top:r,left:t,right:t+i,bottom:r+s,x:t,y:r}}function xS(e,t,r){return Math.floor(e/t)!==r}function Yp(e,t){return t<0||t>=e.current.length}function JS(e,t){return di(e,{disabledIndices:t})}function xO(e,t){return di(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function di(e,{startingIndex:t=-1,decrement:r=!1,disabledIndices:i,amount:s=1}={}){let l=t;do l+=r?-s:s;while(l>=0&&l<=e.current.length-1&&Gc(e,l,i));return l}function sL(e,{event:t,orientation:r,loopFocus:i,rtl:s,cols:l,disabledIndices:c,minIndex:f,maxIndex:d,prevIndex:h,stopEvent:m=!1}){let g=h;const v=[],w={};let b=!1;{let R=null,S=-1;e.current.forEach((T,E)=>{if(T==null)return;const O=T.closest('[role="row"]');O&&(b=!0),(O!==R||S===-1)&&(R=O,S+=1,v[S]=[]),v[S].push(E),w[E]=S})}const _=b&&v.length>0&&v.some(R=>R.length!==l);function x(R){if(!_||h===-1)return;const S=w[h];if(S==null)return;const T=v[S].indexOf(h);let E=R==="up"?S-1:S+1;i&&(E<0?E=v.length-1:E>=v.length&&(E=0));const O=new Set;for(;E>=0&&E<v.length&&!O.has(E);){O.add(E);const C=v[E];if(C.length===0){E=R==="up"?E-1:E+1;continue}const M=Math.min(T,C.length-1);for(let D=M;D>=0;D-=1){const $=C[D];if(!Gc(e,$,c))return $}E=R==="up"?E-1:E+1,i&&(E<0?E=v.length-1:E>=v.length&&(E=0))}}if(t.key===y5){const R=x("up");if(R!==void 0)m&&Ti(t),g=R;else{if(m&&Ti(t),h===-1)g=d;else if(g=di(e,{startingIndex:g,amount:l,decrement:!0,disabledIndices:c}),i&&(h-l<f||g<0)){const S=h%l,T=d%l,E=d-(T-S);T===S?g=d:g=T>S?E:E-l}Yp(e,g)&&(g=h)}}if(t.key===l1){const R=x("down");R!==void 0?(m&&Ti(t),g=R):(m&&Ti(t),h===-1?g=f:(g=di(e,{startingIndex:h,amount:l,disabledIndices:c}),i&&h+l>d&&(g=di(e,{startingIndex:h%l-l,amount:l,disabledIndices:c}))),Yp(e,g)&&(g=h))}if(r==="both"){const R=qp(h/l);t.key===(s?Bc:Hc)&&(m&&Ti(t),h%l!==l-1?(g=di(e,{startingIndex:h,disabledIndices:c}),i&&xS(g,l,R)&&(g=di(e,{startingIndex:h-h%l-1,disabledIndices:c}))):i&&(g=di(e,{startingIndex:h-h%l-1,disabledIndices:c})),xS(g,l,R)&&(g=h)),t.key===(s?Hc:Bc)&&(m&&Ti(t),h%l!==0?(g=di(e,{startingIndex:h,decrement:!0,disabledIndices:c}),i&&xS(g,l,R)&&(g=di(e,{startingIndex:h+(l-h%l),decrement:!0,disabledIndices:c}))):i&&(g=di(e,{startingIndex:h+(l-h%l),decrement:!0,disabledIndices:c})),xS(g,l,R)&&(g=h));const S=qp(d/l)===R;Yp(e,g)&&(i&&S?g=t.key===(s?Hc:Bc)?d:di(e,{startingIndex:h-h%l-1,disabledIndices:c}):g=h)}return g}function lL(e,t,r){const i=[];let s=0;return e.forEach(({width:l,height:c},f)=>{let d=!1;for(r&&(s=0);!d;){const h=[];for(let m=0;m<l;m+=1)for(let g=0;g<c;g+=1)h.push(s+m+g*t);s%t+l<=t&&h.every(m=>i[m]==null)?(h.forEach(m=>{i[m]=f}),d=!0):s+=1}}),[...i]}function uL(e,t,r,i,s){if(e===-1)return-1;const l=r.indexOf(e),c=t[e];switch(s){case"tl":return l;case"tr":return c?l+c.width-1:l;case"bl":return c?l+(c.height-1)*i:l;case"br":return r.lastIndexOf(e);default:return-1}}function cL(e,t){return t.flatMap((r,i)=>e.includes(r)?[i]:[])}function Gc(e,t,r){if(typeof r=="function")return r(t);if(r)return r.includes(t);const i=e.current[t];return i?i.hasAttribute("disabled")||i.getAttribute("aria-disabled")==="true":!1}var nbe=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Iw=nbe.join(","),fL=typeof Element>"u",ym=fL?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Lw=!fL&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},Uw=function(t,r){var i;r===void 0&&(r=!0);var s=t==null||(i=t.getAttribute)===null||i===void 0?void 0:i.call(t,"inert"),l=s===""||s==="true",c=l||r&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Uw(t.parentNode));return c},rbe=function(t){var r,i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return i===""||i==="true"},dL=function(t,r,i){if(Uw(t))return[];var s=Array.prototype.slice.apply(t.querySelectorAll(Iw));return r&&ym.call(t,Iw)&&s.unshift(t),s=s.filter(i),s},qw=function(t,r,i){for(var s=[],l=Array.from(t);l.length;){var c=l.shift();if(!Uw(c,!1))if(c.tagName==="SLOT"){var f=c.assignedElements(),d=f.length?f:c.children,h=qw(d,!0,i);i.flatten?s.push.apply(s,h):s.push({scopeParent:c,candidates:h})}else{var m=ym.call(c,Iw);m&&i.filter(c)&&(r||!t.includes(c))&&s.push(c);var g=c.shadowRoot||typeof i.getShadowRoot=="function"&&i.getShadowRoot(c),v=!Uw(g,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(c));if(g&&v){var w=qw(g===!0?c.children:g.children,!0,i);i.flatten?s.push.apply(s,w):s.push({scopeParent:c,candidates:w})}else l.unshift.apply(l,c.children)}}return s},hL=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},pL=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||rbe(t))&&!hL(t)?0:t.tabIndex},abe=function(t,r){var i=pL(t);return i<0&&r&&!hL(t)?0:i},ibe=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},mL=function(t){return t.tagName==="INPUT"},obe=function(t){return mL(t)&&t.type==="hidden"},sbe=function(t){var r=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(i){return i.tagName==="SUMMARY"});return r},lbe=function(t,r){for(var i=0;i<t.length;i++)if(t[i].checked&&t[i].form===r)return t[i]},ube=function(t){if(!t.name)return!0;var r=t.form||Lw(t),i=function(f){return r.querySelectorAll('input[type="radio"][name="'+f+'"]')},s;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")s=i(window.CSS.escape(t.name));else try{s=i(t.name)}catch(c){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",c.message),!1}var l=lbe(s,t.form);return!l||l===t},cbe=function(t){return mL(t)&&t.type==="radio"},fbe=function(t){return cbe(t)&&!ube(t)},dbe=function(t){var r,i=t&&Lw(t),s=(r=i)===null||r===void 0?void 0:r.host,l=!1;if(i&&i!==t){var c,f,d;for(l=!!((c=s)!==null&&c!==void 0&&(f=c.ownerDocument)!==null&&f!==void 0&&f.contains(s)||t!=null&&(d=t.ownerDocument)!==null&&d!==void 0&&d.contains(t));!l&&s;){var h,m,g;i=Lw(s),s=(h=i)===null||h===void 0?void 0:h.host,l=!!((m=s)!==null&&m!==void 0&&(g=m.ownerDocument)!==null&&g!==void 0&&g.contains(s))}}return l},LD=function(t){var r=t.getBoundingClientRect(),i=r.width,s=r.height;return i===0&&s===0},hbe=function(t,r){var i=r.displayCheck,s=r.getShadowRoot;if(i==="full-native"&&"checkVisibility"in t){var l=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!l}if(getComputedStyle(t).visibility==="hidden")return!0;var c=ym.call(t,"details>summary:first-of-type"),f=c?t.parentElement:t;if(ym.call(f,"details:not([open]) *"))return!0;if(!i||i==="full"||i==="full-native"||i==="legacy-full"){if(typeof s=="function"){for(var d=t;t;){var h=t.parentElement,m=Lw(t);if(h&&!h.shadowRoot&&s(h)===!0)return LD(t);t.assignedSlot?t=t.assignedSlot:!h&&m!==t.ownerDocument?t=m.host:t=h}t=d}if(dbe(t))return!t.getClientRects().length;if(i!=="legacy-full")return!0}else if(i==="non-zero-area")return LD(t);return!1},pbe=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var r=t.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var i=0;i<r.children.length;i++){var s=r.children.item(i);if(s.tagName==="LEGEND")return ym.call(r,"fieldset[disabled] *")?!0:!s.contains(t)}return!0}r=r.parentElement}return!1},_O=function(t,r){return!(r.disabled||obe(r)||hbe(r,t)||sbe(r)||pbe(r))},TO=function(t,r){return!(fbe(r)||pL(r)<0||!_O(t,r))},mbe=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},gL=function(t){var r=[],i=[];return t.forEach(function(s,l){var c=!!s.scopeParent,f=c?s.scopeParent:s,d=abe(f,c),h=c?gL(s.candidates):f;d===0?c?r.push.apply(r,h):r.push(f):i.push({documentOrder:l,tabIndex:d,item:s,isScope:c,content:h})}),i.sort(ibe).reduce(function(s,l){return l.isScope?s.push.apply(s,l.content):s.push(l.content),s},[]).concat(r)},u1=function(t,r){r=r||{};var i;return r.getShadowRoot?i=qw([t],r.includeContainer,{filter:TO.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:mbe}):i=dL(t,r.includeContainer,TO.bind(null,r)),gL(i)},gbe=function(t,r){r=r||{};var i;return r.getShadowRoot?i=qw([t],r.includeContainer,{filter:_O.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):i=dL(t,r.includeContainer,_O.bind(null,r)),i},yL=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return ym.call(t,Iw)===!1?!1:TO(r,t)};const Vm=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function vL(e,t){const r=u1(e,Vm()),i=r.length;if(i===0)return;const s=oc(fa(e)),l=r.indexOf(s),c=l===-1?t===1?0:i-1:l+t;return r[c]}function w5(e){return vL(fa(e).body,1)||e}function bL(e){return vL(fa(e).body,-1)||e}function SL(e,t){if(!e)return null;const r=u1(fa(e).body,Vm()),i=r.length;if(i===0)return null;const s=r.indexOf(e);if(s===-1)return null;const l=(s+t+i)%i;return r[l]}function ybe(e){return SL(e,1)}function vbe(e){return SL(e,-1)}function Zp(e,t){const r=t||e.currentTarget,i=e.relatedTarget;return!i||!zn(r,i)}function bbe(e){u1(e,Vm()).forEach(r=>{r.dataset.tabindex=r.getAttribute("tabindex")||"",r.setAttribute("tabindex","-1")})}function UD(e){e.querySelectorAll("[data-tabindex]").forEach(r=>{const i=r.dataset.tabindex;delete r.dataset.tabindex,i?r.setAttribute("tabindex",i):r.removeAttribute("tabindex")})}const Sbe=j.forwardRef(function(t,r){const{className:i,disabled:s=!1,render:l,value:c,id:f,nativeButton:d=!0,...h}=t,{value:m,getTabPanelIdByValue:g,orientation:v}=h5(),{activateOnFocus:w,highlightedTabIndex:b,onTabActivation:_,setHighlightedTabIndex:x,tabsListElement:R}=Nve(),S=Um(f),T=j.useMemo(()=>({disabled:s,id:S,value:c}),[s,S,c]),{compositeProps:E,compositeRef:O,index:C}=Dve({metadata:T}),M=c===m,D=j.useRef(!1);ct(()=>{if(D.current){D.current=!1;return}if(!(M&&C>-1&&b!==C))return;const fe=R;if(fe!=null){const se=oc(gs(fe));if(se&&zn(fe,se))return}s||x(C)},[M,C,b,x,s,R]);const{getButtonProps:$,buttonRef:q}=ap({disabled:s,native:d,focusableWhenDisabled:!0}),L=g(c),V=j.useRef(!1),F=j.useRef(!1);function re(fe){M||s||_(c,mn(af,fe.nativeEvent,void 0,{activationDirection:"none"}))}function ae(fe){M||(C>-1&&!s&&x(C),!s&&w&&(!V.current||V.current&&F.current)&&_(c,mn(af,fe.nativeEvent,void 0,{activationDirection:"none"})))}function K(fe){if(M||s)return;V.current=!0;function se(){V.current=!1,F.current=!1}(!fe.button||fe.button===0)&&(F.current=!0,gs(fe.currentTarget).addEventListener("pointerup",se,{once:!0}))}const B=j.useMemo(()=>({disabled:s,active:M,orientation:v}),[s,M,v]);return mr("button",t,{state:B,ref:[r,q,O],props:[E,{role:"tab","aria-controls":L,"aria-selected":M,id:S,onClick:re,onFocus:ae,onPointerDown:K,[B7]:M?"":void 0,onKeyDownCapture(){D.current=!0}},h,$]})}),wbe=[];function E5(e){j.useEffect(e,wbe)}const Ebe=j.createContext(void 0),xbe={disableStyleElements:!1};function _be(){return j.useContext(Ebe)??xbe}let Tbe=(function(e){return e.index="data-index",e.activationDirection="data-activation-direction",e.orientation="data-orientation",e.hidden="data-hidden",e})({});const Cbe=j.forwardRef(function(t,r){const{className:i,value:s,render:l,keepMounted:c=!1,...f}=t,{value:d,getTabIdByPanelValue:h,orientation:m,tabActivationDirection:g,registerMountedTabPanel:v,unregisterMountedTabPanel:w}=h5(),b=Um(),_=j.useMemo(()=>({id:b,value:s}),[b,s]),{ref:x,index:R}=m5({metadata:_}),S=s!==d,T=h(s),E=j.useMemo(()=>({hidden:S,orientation:m,tabActivationDirection:g}),[S,m,g]),O=mr("div",t,{state:E,ref:[r,x],props:[{"aria-labelledby":T,hidden:S,id:b??void 0,role:"tabpanel",tabIndex:S?-1:0,[Tbe.index]:R},f],stateAttributesMapping:p5});return ct(()=>{if(!(S&&!c)&&b!=null)return v(s,b),()=>{w(s,b)}},[S,c,s,b,v,w]),!S||c?O:null});function Obe(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}const Xp="ArrowUp",Dh="ArrowDown",Ob="ArrowLeft",Qp="ArrowRight",c1="Home",f1="End",wL=new Set([Ob,Qp]),Rbe=new Set([Ob,Qp,c1,f1]),EL=new Set([Xp,Dh]),Abe=new Set([Xp,Dh,c1,f1]),xL=new Set([...wL,...EL]),Mbe=new Set([...xL,c1,f1]),x5=new Set([Xp,Dh,Ob,Qp,c1,f1]),jbe="Shift",kbe="Control",Dbe="Alt",Nbe="Meta",zbe=new Set([jbe,kbe,Dbe,Nbe]);function $be(e){return Gr(e)&&e.tagName==="INPUT"}function qD(e){return!!($be(e)&&e.selectionStart!=null||Gr(e)&&e.tagName==="TEXTAREA")}function VD(e,t,r,i){if(!e||!t||!t.scrollTo)return;let s=e.scrollLeft,l=e.scrollTop;const c=e.clientWidth<e.scrollWidth,f=e.clientHeight<e.scrollHeight;if(c&&i!=="vertical"){const d=FD(e,t,"left"),h=_S(e),m=_S(t);r==="ltr"&&(d+t.offsetWidth+m.scrollMarginRight>e.scrollLeft+e.clientWidth-h.scrollPaddingRight?s=d+t.offsetWidth+m.scrollMarginRight-e.clientWidth+h.scrollPaddingRight:d-m.scrollMarginLeft<e.scrollLeft+h.scrollPaddingLeft&&(s=d-m.scrollMarginLeft-h.scrollPaddingLeft)),r==="rtl"&&(d-m.scrollMarginRight<e.scrollLeft+h.scrollPaddingLeft?s=d-m.scrollMarginLeft-h.scrollPaddingLeft:d+t.offsetWidth+m.scrollMarginRight>e.scrollLeft+e.clientWidth-h.scrollPaddingRight&&(s=d+t.offsetWidth+m.scrollMarginRight-e.clientWidth+h.scrollPaddingRight))}if(f&&i!=="horizontal"){const d=FD(e,t,"top"),h=_S(e),m=_S(t);d-m.scrollMarginTop<e.scrollTop+h.scrollPaddingTop?l=d-m.scrollMarginTop-h.scrollPaddingTop:d+t.offsetHeight+m.scrollMarginBottom>e.scrollTop+e.clientHeight-h.scrollPaddingBottom&&(l=d+t.offsetHeight+m.scrollMarginBottom-e.clientHeight+h.scrollPaddingBottom)}e.scrollTo({left:s,top:l,behavior:"auto"})}function FD(e,t,r){const i=r==="left"?"offsetLeft":"offsetTop";let s=0;for(;t.offsetParent&&(s+=t[i],t.offsetParent!==e);)t=t.offsetParent;return s}function _S(e){const t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}const Pbe=[];function Ibe(e){const{itemSizes:t,cols:r=1,loopFocus:i=!0,dense:s=!1,orientation:l="both",direction:c,highlightedIndex:f,onHighlightedIndexChange:d,rootRef:h,enableHomeAndEndKeys:m=!1,stopEventPropagation:g=!1,disabledIndices:v,modifierKeys:w=Pbe}=e,[b,_]=j.useState(0),x=r>1,R=j.useRef(null),S=fc(R,h),T=j.useRef([]),E=j.useRef(!1),O=f??b,C=ot(($,q=!1)=>{if((d??_)($),q){const L=T.current[$];VD(R.current,L,c,l)}}),M=ot($=>{if($.size===0||E.current)return;E.current=!0;const q=Array.from($.keys()),L=q.find(F=>F?.hasAttribute(B7))??null,V=L?q.indexOf(L):-1;V!==-1&&C(V),VD(R.current,L,c,l)}),D=j.useMemo(()=>({"aria-orientation":l==="both"?void 0:l,ref:S,onFocus($){!R.current||!qD($.target)||$.target.setSelectionRange(0,$.target.value.length??0)},onKeyDown($){const q=m?Mbe:xL;if(!q.has($.key)||Lbe($,w)||!R.current)return;const V=c==="rtl",F=V?Ob:Qp,re={horizontal:F,vertical:Dh,both:F}[l],ae=V?Qp:Ob,K={horizontal:ae,vertical:Xp,both:ae}[l];if(qD($.target)&&!Obe($.target)){const U=$.target.selectionStart,P=$.target.selectionEnd,G=$.target.value??"";if(U==null||$.shiftKey||U!==P||$.key!==K&&U<G.length||$.key!==re&&U>0)return}let B=O;const Y=JS(T,v),fe=xO(T,v);if(x){const U=t||Array.from({length:T.current.length},()=>({width:1,height:1})),P=lL(U,r,s),G=P.findIndex(ue=>ue!=null&&!Gc(T,ue,v)),ee=P.reduce((ue,ve,Ee)=>ve!=null&&!Gc(T,ve,v)?Ee:ue,-1);B=P[sL({current:P.map(ue=>ue?T.current[ue]:null)},{event:$,orientation:l,loopFocus:i,cols:r,disabledIndices:cL([...v||T.current.map((ue,ve)=>Gc(T,ve)?ve:void 0),void 0],P),minIndex:G,maxIndex:ee,prevIndex:uL(O>fe?Y:O,U,P,r,$.key===Dh?"bl":$.key===Qp?"tr":"tl"),rtl:V})]}const se={horizontal:[F],vertical:[Dh],both:[F,Dh]}[l],N={horizontal:[ae],vertical:[Xp],both:[ae,Xp]}[l],I=x?q:{horizontal:m?Rbe:wL,vertical:m?Abe:EL,both:q}[l];m&&($.key===c1?B=Y:$.key===f1&&(B=fe)),B===O&&(se.includes($.key)||N.includes($.key))&&(i&&B===fe&&se.includes($.key)?B=Y:i&&B===Y&&N.includes($.key)?B=fe:B=di(T,{startingIndex:B,decrement:N.includes($.key),disabledIndices:v})),B!==O&&!Yp(T,B)&&(g&&$.stopPropagation(),I.has($.key)&&$.preventDefault(),C(B,!0),queueMicrotask(()=>{T.current[B]?.focus()}))}}),[r,s,c,v,T,m,O,x,t,i,S,w,C,l,g]);return j.useMemo(()=>({props:D,highlightedIndex:O,onHighlightedIndexChange:C,elementsRef:T,disabledIndices:v,onMapChange:M,relayKeyboardEvent:D.onKeyDown}),[D,O,C,T,v,M])}function Lbe(e,t){for(const r of zbe.values())if(!t.includes(r)&&e.getModifierState(r))return!0;return!1}function Ube(e){const{render:t,className:r,refs:i=lm,props:s=lm,state:l=Da,stateAttributesMapping:c,highlightedIndex:f,onHighlightedIndexChange:d,orientation:h,dense:m,itemSizes:g,loopFocus:v,cols:w,enableHomeAndEndKeys:b,onMapChange:_,stopEventPropagation:x=!0,rootRef:R,disabledIndices:S,modifierKeys:T,highlightItemOnHover:E=!1,tag:O="div",...C}=e,M=d5(),{props:D,highlightedIndex:$,onHighlightedIndexChange:q,elementsRef:L,onMapChange:V,relayKeyboardEvent:F}=Ibe({itemSizes:g,cols:w,loopFocus:v,dense:m,orientation:h,highlightedIndex:f,onHighlightedIndexChange:d,rootRef:R,stopEventPropagation:x,enableHomeAndEndKeys:b,direction:M,disabledIndices:S,modifierKeys:T}),re=mr(O,e,{state:l,ref:i,props:[D,...s,C],stateAttributesMapping:c}),ae=j.useMemo(()=>({highlightedIndex:$,onHighlightedIndexChange:q,highlightItemOnHover:E,relayKeyboardEvent:F}),[$,q,E,F]);return k.jsx(e$.Provider,{value:ae,children:k.jsx(f5,{elementsRef:L,onMapChange:K=>{_?.(K),V(K)},children:re})})}const qbe=j.forwardRef(function(t,r){const{activateOnFocus:i=!1,className:s,loopFocus:l=!0,render:c,...f}=t,{getTabElementBySelectedValue:d,onValueChange:h,orientation:m,value:g,setTabMap:v,tabActivationDirection:w}=h5(),[b,_]=j.useState(0),[x,R]=j.useState(null),S=Vbe(g,m,x,d),T=ot((M,D)=>{if(M!==g){const $=S(M);D.activationDirection=$,h(M,D)}}),E=j.useMemo(()=>({orientation:m,tabActivationDirection:w}),[m,w]),O={"aria-orientation":m==="vertical"?"vertical":void 0,role:"tablist"},C=j.useMemo(()=>({activateOnFocus:i,highlightedTabIndex:b,onTabActivation:T,setHighlightedTabIndex:_,tabsListElement:x,value:g}),[i,b,T,_,x,g]);return k.jsx(G7.Provider,{value:C,children:k.jsx(Ube,{render:c,className:s,state:E,refs:[r,R],props:[O,f],stateAttributesMapping:p5,highlightedIndex:b,enableHomeAndEndKeys:!0,loopFocus:l,orientation:m,onHighlightedIndexChange:_,onMapChange:v,disabledIndices:lm})})});function BD(e,t){const{left:r,top:i}=e.getBoundingClientRect(),{left:s,top:l}=t.getBoundingClientRect(),c=r-s,f=i-l;return{left:c,top:f}}function Vbe(e,t,r,i){const[s,l]=j.useState(null);return ct(()=>{if(e==null||r==null){l(null);return}const c=i(e);if(c==null){l(null);return}const{left:f,top:d}=BD(c,r);l(t==="horizontal"?f:d)},[t,i,r,e]),j.useCallback(c=>{if(c===e)return"none";if(c==null)return l(null),"none";if(c!=null&&r!=null){const f=i(c);if(f!=null){const{left:d,top:h}=BD(f,r);if(s==null)return l(t==="horizontal"?d:h),"none";if(t==="horizontal"){if(d<s)return l(d),"left";if(d>s)return l(d),"right"}else{if(h<s)return l(h),"up";if(h>s)return l(h),"down"}}}return"none"},[i,t,s,r,e])}function _L({className:e,orientation:t="horizontal",...r}){return k.jsx(Mve,{"data-slot":"tabs","data-orientation":t,className:en("gap-2 group/tabs flex data-[orientation=horizontal]:flex-col",e),...r})}const Fbe=bc("rounded-none p-[3px] group-data-horizontal/tabs:h-8 data-[variant=line]:rounded-none group/tabs-list text-muted-foreground inline-flex w-fit items-center justify-center group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function TL({className:e,variant:t="default",...r}){return k.jsx(qbe,{"data-slot":"tabs-list","data-variant":t,className:en(Fbe({variant:t}),e),...r})}function nb({className:e,...t}){return k.jsx(Sbe,{"data-slot":"tabs-trigger",className:en("gap-1.5 rounded-none border border-transparent px-1.5 py-0.5 text-xs font-medium group-data-vertical/tabs:py-[calc(--spacing(1.25))] [&_svg:not([class*='size-'])]:size-4 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground/60 hover:text-foreground dark:text-muted-foreground dark:hover:text-foreground relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center whitespace-nowrap transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent","data-active:bg-background dark:data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 data-active:text-foreground","after:bg-foreground after:absolute after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",e),...t})}function rb({className:e,...t}){return k.jsx(Cbe,{"data-slot":"tabs-content",className:en("text-xs/relaxed flex-1 outline-none",e),...t})}function Bbe({className:e,size:t="default",...r}){return k.jsx("div",{"data-slot":"card","data-size":t,className:en("ring-foreground/10 bg-card text-card-foreground gap-4 overflow-hidden rounded-none py-4 text-xs/relaxed ring-1 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-2 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-none *:[img:last-child]:rounded-none group/card flex flex-col",e),...r})}function Hbe({className:e,...t}){return k.jsx("div",{"data-slot":"card-content",className:en("px-4 group-data-[size=sm]/card:px-3",e),...t})}var CL=function(e){return typeof e=="function"},Gbe=function(e){return typeof e=="string"},OL=function(e){return typeof e=="number"};function HD(e,t){if(e===t)return!0;for(var r=0;r<e.length;r++)if(!Object.is(e[r],t[r]))return!1;return!0}function CO(e){var t=j.useRef(e);return t.current=e,t}var Kbe=function(e){var t=CO(e);j.useEffect(function(){return function(){t.current()}},[])},Ybe=!!(typeof window<"u"&&window.document&&window.document.createElement);function RL(e,t){if(Ybe){if(!e)return t;var r;return CL(e)?r=e():"current"in e?r=e.current:r=e,r}}var Zbe=function(e){var t=function(r,i,s){var l=j.useRef(!1),c=j.useRef([]),f=j.useRef([]),d=j.useRef(void 0);e(function(){var h,m=Array.isArray(s)?s:[s],g=m.map(function(v){return RL(v)});if(!l.current){l.current=!0,c.current=g,f.current=i,d.current=r();return}(g.length!==c.current.length||!HD(c.current,g)||!HD(f.current,i))&&((h=d.current)===null||h===void 0||h.call(d),c.current=g,f.current=i,d.current=r())}),Kbe(function(){var h;(h=d.current)===null||h===void 0||h.call(d),l.current=!1})};return t},Xbe=Zbe(j.useEffect),TT,GD;function Qbe(){if(GD)return TT;GD=1;var e=typeof Element<"u",t=typeof Map=="function",r=typeof Set=="function",i=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function s(l,c){if(l===c)return!0;if(l&&c&&typeof l=="object"&&typeof c=="object"){if(l.constructor!==c.constructor)return!1;var f,d,h;if(Array.isArray(l)){if(f=l.length,f!=c.length)return!1;for(d=f;d--!==0;)if(!s(l[d],c[d]))return!1;return!0}var m;if(t&&l instanceof Map&&c instanceof Map){if(l.size!==c.size)return!1;for(m=l.entries();!(d=m.next()).done;)if(!c.has(d.value[0]))return!1;for(m=l.entries();!(d=m.next()).done;)if(!s(d.value[1],c.get(d.value[0])))return!1;return!0}if(r&&l instanceof Set&&c instanceof Set){if(l.size!==c.size)return!1;for(m=l.entries();!(d=m.next()).done;)if(!c.has(d.value[0]))return!1;return!0}if(i&&ArrayBuffer.isView(l)&&ArrayBuffer.isView(c)){if(f=l.length,f!=c.length)return!1;for(d=f;d--!==0;)if(l[d]!==c[d])return!1;return!0}if(l.constructor===RegExp)return l.source===c.source&&l.flags===c.flags;if(l.valueOf!==Object.prototype.valueOf&&typeof l.valueOf=="function"&&typeof c.valueOf=="function")return l.valueOf()===c.valueOf();if(l.toString!==Object.prototype.toString&&typeof l.toString=="function"&&typeof c.toString=="function")return l.toString()===c.toString();if(h=Object.keys(l),f=h.length,f!==Object.keys(c).length)return!1;for(d=f;d--!==0;)if(!Object.prototype.hasOwnProperty.call(c,h[d]))return!1;if(e&&l instanceof Element)return!1;for(d=f;d--!==0;)if(!((h[d]==="_owner"||h[d]==="__v"||h[d]==="__o")&&l.$$typeof)&&!s(l[h[d]],c[h[d]]))return!1;return!0}return l!==l&&c!==c}return TT=function(c,f){try{return s(c,f)}catch(d){if((d.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw d}},TT}var Wbe=Qbe();const Jbe=Il(Wbe);var e1e=function(e,t){return e===void 0&&(e=[]),t===void 0&&(t=[]),Jbe(e,t)},t1e=function(e,t,r){var i=j.useRef(void 0),s=j.useRef(0);e1e(t,i.current)||(s.current+=1),i.current=t,Xbe(e,[s.current],r)},n1e=/(mac|iphone|ipod|ipad)/i.test(typeof navigator<"u"?navigator?.platform:""),AL={0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,pausebreak:19,capslock:20,esc:27,space:32,pageup:33,pagedown:34,end:35,home:36,leftarrow:37,uparrow:38,rightarrow:39,downarrow:40,insert:45,delete:46,a:65,b:66,c:67,d:68,e:69,f:70,g:71,h:72,i:73,j:74,k:75,l:76,m:77,n:78,o:79,p:80,q:81,r:82,s:83,t:84,u:85,v:86,w:87,x:88,y:89,z:90,leftwindowkey:91,rightwindowkey:92,meta:n1e?[91,93]:[91,92],selectkey:93,numpad0:96,numpad1:97,numpad2:98,numpad3:99,numpad4:100,numpad5:101,numpad6:102,numpad7:103,numpad8:104,numpad9:105,multiply:106,add:107,subtract:109,decimalpoint:110,divide:111,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,numlock:144,scrolllock:145,semicolon:186,equalsign:187,comma:188,dash:189,period:190,forwardslash:191,graveaccent:192,openbracket:219,backslash:220,closebracket:221,singlequote:222},OO={ctrl:function(e){return e.ctrlKey},shift:function(e){return e.shiftKey},alt:function(e){return e.altKey},meta:function(e){return e.type==="keyup"?AL.meta.includes(e.keyCode):e.metaKey}};function ML(e){return Gbe(e)||OL(e)}function r1e(e){var t=Object.keys(OO).reduce(function(r,i){return OO[i](e)?r+1:r},0);return[16,17,18,91,92].includes(e.keyCode)?t:t+1}function KD(e,t,r){var i,s;if(!e.key)return!1;if(OL(t))return e.keyCode===t?t:!1;var l=t.split("."),c=0;try{for(var f=mO(l),d=f.next();!d.done;d=f.next()){var h=d.value,m=OO[h],g=AL[h.toLowerCase()];(m&&m(e)||g&&g===e.keyCode)&&c++}}catch(v){i={error:v}}finally{try{d&&!d.done&&(s=f.return)&&s.call(f)}finally{if(i)throw i.error}}return r?c===l.length&&r1e(e)===l.length?t:!1:c===l.length?t:!1}function a1e(e,t){return CL(e)?e:ML(e)?function(r){return KD(r,e,t)}:Array.isArray(e)?function(r){return e.find(function(i){return KD(r,i,t)})}:function(){return!!e}}var i1e=["keydown"];function o1e(e,t,r){var i={},s=i.events,l=s===void 0?i1e:s,c=i.target,f=i.exactMatch,d=f===void 0?!1:f,h=i.useCapture,m=h===void 0?!1:h,g=CO(t),v=CO(e);t1e(function(){var w,b,_,x=RL(c,window);if(x){var R=function(O){var C,M=O,D=a1e(v.current,d),$=D(M),q=ML($)?$:M.key;if($)return(C=g.current)===null||C===void 0?void 0:C.call(g,M,q)};try{for(var S=mO(l),T=S.next();!T.done;T=S.next()){var E=T.value;(_=x?.addEventListener)===null||_===void 0||_.call(x,E,R,m)}}catch(O){w={error:O}}finally{try{T&&!T.done&&(b=S.return)&&b.call(S)}finally{if(w)throw w.error}}return function(){var O,C,M;try{for(var D=mO(l),$=D.next();!$.done;$=D.next()){var q=$.value;(M=x?.removeEventListener)===null||M===void 0||M.call(x,q,R,m)}}catch(L){O={error:L}}finally{try{$&&!$.done&&(C=D.return)&&C.call(D)}finally{if(O)throw O.error}}}}},[l],c)}const s1e=({validateForm:e,formData:t})=>{const r=df(),{mutateAsync:i,isPending:s}=dre(),l=async()=>{e&&!await e()||t&&await i({toolName:r.name,args:t})};return o1e("Enter",l),k.jsx("div",{className:"flex flex-col items-end gap-1",children:k.jsxs(Qc,{onClick:l,variant:"default",disabled:s,children:[s?k.jsx(jre,{className:"h-4 w-4 animate-spin"}):k.jsx(zre,{className:"h-4 w-4"}),"Call Tool"]})})};var ew={exports:{}},l1e=ew.exports,YD;function u1e(){return YD||(YD=1,(function(e,t){(function(r,i){e.exports=i(wm())})(l1e,r=>(()=>{var i={9735:(f,d)=>{d.__esModule=!0,d.default={scheme:"apathy",author:"jannik siebert (https://github.com/janniks)",base00:"#031A16",base01:"#0B342D",base02:"#184E45",base03:"#2B685E",base04:"#5F9C92",base05:"#81B5AC",base06:"#A7CEC8",base07:"#D2E7E4",base08:"#3E9688",base09:"#3E7996",base0A:"#3E4C96",base0B:"#883E96",base0C:"#963E4C",base0D:"#96883E",base0E:"#4C963E",base0F:"#3E965B"},f.exports=d.default},294:(f,d)=>{d.__esModule=!0,d.default={scheme:"ashes",author:"jannik siebert (https://github.com/janniks)",base00:"#1C2023",base01:"#393F45",base02:"#565E65",base03:"#747C84",base04:"#ADB3BA",base05:"#C7CCD1",base06:"#DFE2E5",base07:"#F3F4F5",base08:"#C7AE95",base09:"#C7C795",base0A:"#AEC795",base0B:"#95C7AE",base0C:"#95AEC7",base0D:"#AE95C7",base0E:"#C795AE",base0F:"#C79595"},f.exports=d.default},1733:(f,d)=>{d.__esModule=!0,d.default={scheme:"atelier dune",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune)",base00:"#20201d",base01:"#292824",base02:"#6e6b5e",base03:"#7d7a68",base04:"#999580",base05:"#a6a28c",base06:"#e8e4cf",base07:"#fefbec",base08:"#d73737",base09:"#b65611",base0A:"#cfb017",base0B:"#60ac39",base0C:"#1fad83",base0D:"#6684e1",base0E:"#b854d4",base0F:"#d43552"},f.exports=d.default},8974:(f,d)=>{d.__esModule=!0,d.default={scheme:"atelier forest",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest)",base00:"#1b1918",base01:"#2c2421",base02:"#68615e",base03:"#766e6b",base04:"#9c9491",base05:"#a8a19f",base06:"#e6e2e0",base07:"#f1efee",base08:"#f22c40",base09:"#df5320",base0A:"#d5911a",base0B:"#5ab738",base0C:"#00ad9c",base0D:"#407ee7",base0E:"#6666ea",base0F:"#c33ff3"},f.exports=d.default},6933:(f,d)=>{d.__esModule=!0,d.default={scheme:"atelier heath",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath)",base00:"#1b181b",base01:"#292329",base02:"#695d69",base03:"#776977",base04:"#9e8f9e",base05:"#ab9bab",base06:"#d8cad8",base07:"#f7f3f7",base08:"#ca402b",base09:"#a65926",base0A:"#bb8a35",base0B:"#379a37",base0C:"#159393",base0D:"#516aec",base0E:"#7b59c0",base0F:"#cc33cc"},f.exports=d.default},523:(f,d)=>{d.__esModule=!0,d.default={scheme:"atelier lakeside",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside/)",base00:"#161b1d",base01:"#1f292e",base02:"#516d7b",base03:"#5a7b8c",base04:"#7195a8",base05:"#7ea2b4",base06:"#c1e4f6",base07:"#ebf8ff",base08:"#d22d72",base09:"#935c25",base0A:"#8a8a0f",base0B:"#568c3b",base0C:"#2d8f6f",base0D:"#257fad",base0E:"#5d5db1",base0F:"#b72dd2"},f.exports=d.default},1223:(f,d)=>{d.__esModule=!0,d.default={scheme:"atelier seaside",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside/)",base00:"#131513",base01:"#242924",base02:"#5e6e5e",base03:"#687d68",base04:"#809980",base05:"#8ca68c",base06:"#cfe8cf",base07:"#f0fff0",base08:"#e6193c",base09:"#87711d",base0A:"#c3c322",base0B:"#29a329",base0C:"#1999b3",base0D:"#3d62f5",base0E:"#ad2bee",base0F:"#e619c3"},f.exports=d.default},1233:(f,d)=>{d.__esModule=!0,d.default={scheme:"bespin",author:"jan t. sott",base00:"#28211c",base01:"#36312e",base02:"#5e5d5c",base03:"#666666",base04:"#797977",base05:"#8a8986",base06:"#9d9b97",base07:"#baae9e",base08:"#cf6a4c",base09:"#cf7d34",base0A:"#f9ee98",base0B:"#54be0d",base0C:"#afc4db",base0D:"#5ea6ea",base0E:"#9b859d",base0F:"#937121"},f.exports=d.default},2847:(f,d)=>{d.__esModule=!0,d.default={scheme:"brewer",author:"timothée poisot (http://github.com/tpoisot)",base00:"#0c0d0e",base01:"#2e2f30",base02:"#515253",base03:"#737475",base04:"#959697",base05:"#b7b8b9",base06:"#dadbdc",base07:"#fcfdfe",base08:"#e31a1c",base09:"#e6550d",base0A:"#dca060",base0B:"#31a354",base0C:"#80b1d3",base0D:"#3182bd",base0E:"#756bb1",base0F:"#b15928"},f.exports=d.default},8120:(f,d)=>{d.__esModule=!0,d.default={scheme:"bright",author:"chris kempson (http://chriskempson.com)",base00:"#000000",base01:"#303030",base02:"#505050",base03:"#b0b0b0",base04:"#d0d0d0",base05:"#e0e0e0",base06:"#f5f5f5",base07:"#ffffff",base08:"#fb0120",base09:"#fc6d24",base0A:"#fda331",base0B:"#a1c659",base0C:"#76c7b7",base0D:"#6fb3d2",base0E:"#d381c3",base0F:"#be643c"},f.exports=d.default},6305:(f,d)=>{d.__esModule=!0,d.default={scheme:"chalk",author:"chris kempson (http://chriskempson.com)",base00:"#151515",base01:"#202020",base02:"#303030",base03:"#505050",base04:"#b0b0b0",base05:"#d0d0d0",base06:"#e0e0e0",base07:"#f5f5f5",base08:"#fb9fb1",base09:"#eda987",base0A:"#ddb26f",base0B:"#acc267",base0C:"#12cfc0",base0D:"#6fc2ef",base0E:"#e1a3ee",base0F:"#deaf8f"},f.exports=d.default},525:(f,d)=>{d.__esModule=!0,d.default={scheme:"codeschool",author:"brettof86",base00:"#232c31",base01:"#1c3657",base02:"#2a343a",base03:"#3f4944",base04:"#84898c",base05:"#9ea7a6",base06:"#a7cfa3",base07:"#b5d8f6",base08:"#2a5491",base09:"#43820d",base0A:"#a03b1e",base0B:"#237986",base0C:"#b02f30",base0D:"#484d79",base0E:"#c59820",base0F:"#c98344"},f.exports=d.default},4124:(f,d)=>{d.__esModule=!0,d.default={scheme:"colors",author:"mrmrs (http://clrs.cc)",base00:"#111111",base01:"#333333",base02:"#555555",base03:"#777777",base04:"#999999",base05:"#bbbbbb",base06:"#dddddd",base07:"#ffffff",base08:"#ff4136",base09:"#ff851b",base0A:"#ffdc00",base0B:"#2ecc40",base0C:"#7fdbff",base0D:"#0074d9",base0E:"#b10dc9",base0F:"#85144b"},f.exports=d.default},7167:(f,d)=>{d.__esModule=!0,d.default={scheme:"default",author:"chris kempson (http://chriskempson.com)",base00:"#181818",base01:"#282828",base02:"#383838",base03:"#585858",base04:"#b8b8b8",base05:"#d8d8d8",base06:"#e8e8e8",base07:"#f8f8f8",base08:"#ab4642",base09:"#dc9656",base0A:"#f7ca88",base0B:"#a1b56c",base0C:"#86c1b9",base0D:"#7cafc2",base0E:"#ba8baf",base0F:"#a16946"},f.exports=d.default},4582:(f,d)=>{d.__esModule=!0,d.default={scheme:"eighties",author:"chris kempson (http://chriskempson.com)",base00:"#2d2d2d",base01:"#393939",base02:"#515151",base03:"#747369",base04:"#a09f93",base05:"#d3d0c8",base06:"#e8e6df",base07:"#f2f0ec",base08:"#f2777a",base09:"#f99157",base0A:"#ffcc66",base0B:"#99cc99",base0C:"#66cccc",base0D:"#6699cc",base0E:"#cc99cc",base0F:"#d27b53"},f.exports=d.default},7096:(f,d)=>{d.__esModule=!0,d.default={scheme:"embers",author:"jannik siebert (https://github.com/janniks)",base00:"#16130F",base01:"#2C2620",base02:"#433B32",base03:"#5A5047",base04:"#8A8075",base05:"#A39A90",base06:"#BEB6AE",base07:"#DBD6D1",base08:"#826D57",base09:"#828257",base0A:"#6D8257",base0B:"#57826D",base0C:"#576D82",base0D:"#6D5782",base0E:"#82576D",base0F:"#825757"},f.exports=d.default},9887:(f,d)=>{d.__esModule=!0,d.default={scheme:"flat",author:"chris kempson (http://chriskempson.com)",base00:"#2C3E50",base01:"#34495E",base02:"#7F8C8D",base03:"#95A5A6",base04:"#BDC3C7",base05:"#e0e0e0",base06:"#f5f5f5",base07:"#ECF0F1",base08:"#E74C3C",base09:"#E67E22",base0A:"#F1C40F",base0B:"#2ECC71",base0C:"#1ABC9C",base0D:"#3498DB",base0E:"#9B59B6",base0F:"#be643c"},f.exports=d.default},7199:(f,d)=>{d.__esModule=!0,d.default={scheme:"google",author:"seth wright (http://sethawright.com)",base00:"#1d1f21",base01:"#282a2e",base02:"#373b41",base03:"#969896",base04:"#b4b7b4",base05:"#c5c8c6",base06:"#e0e0e0",base07:"#ffffff",base08:"#CC342B",base09:"#F96A38",base0A:"#FBA922",base0B:"#198844",base0C:"#3971ED",base0D:"#3971ED",base0E:"#A36AC7",base0F:"#3971ED"},f.exports=d.default},1985:(f,d)=>{d.__esModule=!0,d.default={scheme:"grayscale",author:"alexandre gavioli (https://github.com/alexx2/)",base00:"#101010",base01:"#252525",base02:"#464646",base03:"#525252",base04:"#ababab",base05:"#b9b9b9",base06:"#e3e3e3",base07:"#f7f7f7",base08:"#7c7c7c",base09:"#999999",base0A:"#a0a0a0",base0B:"#8e8e8e",base0C:"#868686",base0D:"#686868",base0E:"#747474",base0F:"#5e5e5e"},f.exports=d.default},8093:(f,d)=>{d.__esModule=!0,d.default={scheme:"green screen",author:"chris kempson (http://chriskempson.com)",base00:"#001100",base01:"#003300",base02:"#005500",base03:"#007700",base04:"#009900",base05:"#00bb00",base06:"#00dd00",base07:"#00ff00",base08:"#007700",base09:"#009900",base0A:"#007700",base0B:"#00bb00",base0C:"#005500",base0D:"#009900",base0E:"#00bb00",base0F:"#005500"},f.exports=d.default},1615:(f,d)=>{d.__esModule=!0,d.default={scheme:"harmonic16",author:"jannik siebert (https://github.com/janniks)",base00:"#0b1c2c",base01:"#223b54",base02:"#405c79",base03:"#627e99",base04:"#aabcce",base05:"#cbd6e2",base06:"#e5ebf1",base07:"#f7f9fb",base08:"#bf8b56",base09:"#bfbf56",base0A:"#8bbf56",base0B:"#56bf8b",base0C:"#568bbf",base0D:"#8b56bf",base0E:"#bf568b",base0F:"#bf5656"},f.exports=d.default},9063:(f,d)=>{d.__esModule=!0,d.default={scheme:"hopscotch",author:"jan t. sott",base00:"#322931",base01:"#433b42",base02:"#5c545b",base03:"#797379",base04:"#989498",base05:"#b9b5b8",base06:"#d5d3d5",base07:"#ffffff",base08:"#dd464c",base09:"#fd8b19",base0A:"#fdcc59",base0B:"#8fc13e",base0C:"#149b93",base0D:"#1290bf",base0E:"#c85e7c",base0F:"#b33508"},f.exports=d.default},9446:(f,d,h)=>{function m(te){return te&&te.__esModule?te.default:te}d.__esModule=!0;var g=h(1308);d.threezerotwofour=m(g);var v=h(9735);d.apathy=m(v);var w=h(294);d.ashes=m(w);var b=h(1733);d.atelierDune=m(b);var _=h(8974);d.atelierForest=m(_);var x=h(6933);d.atelierHeath=m(x);var R=h(523);d.atelierLakeside=m(R);var S=h(1223);d.atelierSeaside=m(S);var T=h(1233);d.bespin=m(T);var E=h(2847);d.brewer=m(E);var O=h(8120);d.bright=m(O);var C=h(6305);d.chalk=m(C);var M=h(525);d.codeschool=m(M);var D=h(4124);d.colors=m(D);var $=h(7167);d.default=m($);var q=h(4582);d.eighties=m(q);var L=h(7096);d.embers=m(L);var V=h(9887);d.flat=m(V);var F=h(7199);d.google=m(F);var re=h(1985);d.grayscale=m(re);var ae=h(8093);d.greenscreen=m(ae);var K=h(1615);d.harmonic=m(K);var B=h(9063);d.hopscotch=m(B);var Y=h(9033);d.isotope=m(Y);var fe=h(4112);d.marrakesh=m(fe);var se=h(9600);d.mocha=m(se);var N=h(1240);d.monokai=m(N);var I=h(9768);d.ocean=m(I);var U=h(8293);d.paraiso=m(U);var P=h(3093);d.pop=m(P);var G=h(1951);d.railscasts=m(G);var ee=h(6368);d.shapeshifter=m(ee);var ue=h(2317);d.solarized=m(ue);var ve=h(1091);d.summerfruit=m(ve);var Ee=h(6943);d.tomorrow=m(Ee);var Oe=h(5670);d.tube=m(Oe);var de=h(2536);d.twilight=m(de)},9033:(f,d)=>{d.__esModule=!0,d.default={scheme:"isotope",author:"jan t. sott",base00:"#000000",base01:"#404040",base02:"#606060",base03:"#808080",base04:"#c0c0c0",base05:"#d0d0d0",base06:"#e0e0e0",base07:"#ffffff",base08:"#ff0000",base09:"#ff9900",base0A:"#ff0099",base0B:"#33ff00",base0C:"#00ffff",base0D:"#0066ff",base0E:"#cc00ff",base0F:"#3300ff"},f.exports=d.default},4112:(f,d)=>{d.__esModule=!0,d.default={scheme:"marrakesh",author:"alexandre gavioli (http://github.com/alexx2/)",base00:"#201602",base01:"#302e00",base02:"#5f5b17",base03:"#6c6823",base04:"#86813b",base05:"#948e48",base06:"#ccc37a",base07:"#faf0a5",base08:"#c35359",base09:"#b36144",base0A:"#a88339",base0B:"#18974e",base0C:"#75a738",base0D:"#477ca1",base0E:"#8868b3",base0F:"#b3588e"},f.exports=d.default},9600:(f,d)=>{d.__esModule=!0,d.default={scheme:"mocha",author:"chris kempson (http://chriskempson.com)",base00:"#3B3228",base01:"#534636",base02:"#645240",base03:"#7e705a",base04:"#b8afad",base05:"#d0c8c6",base06:"#e9e1dd",base07:"#f5eeeb",base08:"#cb6077",base09:"#d28b71",base0A:"#f4bc87",base0B:"#beb55b",base0C:"#7bbda4",base0D:"#8ab3b5",base0E:"#a89bb9",base0F:"#bb9584"},f.exports=d.default},1240:(f,d)=>{d.__esModule=!0,d.default={scheme:"monokai",author:"wimer hazenberg (http://www.monokai.nl)",base00:"#272822",base01:"#383830",base02:"#49483e",base03:"#75715e",base04:"#a59f85",base05:"#f8f8f2",base06:"#f5f4f1",base07:"#f9f8f5",base08:"#f92672",base09:"#fd971f",base0A:"#f4bf75",base0B:"#a6e22e",base0C:"#a1efe4",base0D:"#66d9ef",base0E:"#ae81ff",base0F:"#cc6633"},f.exports=d.default},9768:(f,d)=>{d.__esModule=!0,d.default={scheme:"ocean",author:"chris kempson (http://chriskempson.com)",base00:"#2b303b",base01:"#343d46",base02:"#4f5b66",base03:"#65737e",base04:"#a7adba",base05:"#c0c5ce",base06:"#dfe1e8",base07:"#eff1f5",base08:"#bf616a",base09:"#d08770",base0A:"#ebcb8b",base0B:"#a3be8c",base0C:"#96b5b4",base0D:"#8fa1b3",base0E:"#b48ead",base0F:"#ab7967"},f.exports=d.default},8293:(f,d)=>{d.__esModule=!0,d.default={scheme:"paraiso",author:"jan t. sott",base00:"#2f1e2e",base01:"#41323f",base02:"#4f424c",base03:"#776e71",base04:"#8d8687",base05:"#a39e9b",base06:"#b9b6b0",base07:"#e7e9db",base08:"#ef6155",base09:"#f99b15",base0A:"#fec418",base0B:"#48b685",base0C:"#5bc4bf",base0D:"#06b6ef",base0E:"#815ba4",base0F:"#e96ba8"},f.exports=d.default},3093:(f,d)=>{d.__esModule=!0,d.default={scheme:"pop",author:"chris kempson (http://chriskempson.com)",base00:"#000000",base01:"#202020",base02:"#303030",base03:"#505050",base04:"#b0b0b0",base05:"#d0d0d0",base06:"#e0e0e0",base07:"#ffffff",base08:"#eb008a",base09:"#f29333",base0A:"#f8ca12",base0B:"#37b349",base0C:"#00aabb",base0D:"#0e5a94",base0E:"#b31e8d",base0F:"#7a2d00"},f.exports=d.default},1951:(f,d)=>{d.__esModule=!0,d.default={scheme:"railscasts",author:"ryan bates (http://railscasts.com)",base00:"#2b2b2b",base01:"#272935",base02:"#3a4055",base03:"#5a647e",base04:"#d4cfc9",base05:"#e6e1dc",base06:"#f4f1ed",base07:"#f9f7f3",base08:"#da4939",base09:"#cc7833",base0A:"#ffc66d",base0B:"#a5c261",base0C:"#519f50",base0D:"#6d9cbe",base0E:"#b6b3eb",base0F:"#bc9458"},f.exports=d.default},6368:(f,d)=>{d.__esModule=!0,d.default={scheme:"shapeshifter",author:"tyler benziger (http://tybenz.com)",base00:"#000000",base01:"#040404",base02:"#102015",base03:"#343434",base04:"#555555",base05:"#ababab",base06:"#e0e0e0",base07:"#f9f9f9",base08:"#e92f2f",base09:"#e09448",base0A:"#dddd13",base0B:"#0ed839",base0C:"#23edda",base0D:"#3b48e3",base0E:"#f996e2",base0F:"#69542d"},f.exports=d.default},2317:(f,d)=>{d.__esModule=!0,d.default={scheme:"solarized",author:"ethan schoonover (http://ethanschoonover.com/solarized)",base00:"#002b36",base01:"#073642",base02:"#586e75",base03:"#657b83",base04:"#839496",base05:"#93a1a1",base06:"#eee8d5",base07:"#fdf6e3",base08:"#dc322f",base09:"#cb4b16",base0A:"#b58900",base0B:"#859900",base0C:"#2aa198",base0D:"#268bd2",base0E:"#6c71c4",base0F:"#d33682"},f.exports=d.default},1091:(f,d)=>{d.__esModule=!0,d.default={scheme:"summerfruit",author:"christopher corley (http://cscorley.github.io/)",base00:"#151515",base01:"#202020",base02:"#303030",base03:"#505050",base04:"#B0B0B0",base05:"#D0D0D0",base06:"#E0E0E0",base07:"#FFFFFF",base08:"#FF0086",base09:"#FD8900",base0A:"#ABA800",base0B:"#00C918",base0C:"#1faaaa",base0D:"#3777E6",base0E:"#AD00A1",base0F:"#cc6633"},f.exports=d.default},1308:(f,d)=>{d.__esModule=!0,d.default={scheme:"threezerotwofour",author:"jan t. sott (http://github.com/idleberg)",base00:"#090300",base01:"#3a3432",base02:"#4a4543",base03:"#5c5855",base04:"#807d7c",base05:"#a5a2a2",base06:"#d6d5d4",base07:"#f7f7f7",base08:"#db2d20",base09:"#e8bbd0",base0A:"#fded02",base0B:"#01a252",base0C:"#b5e4f4",base0D:"#01a0e4",base0E:"#a16a94",base0F:"#cdab53"},f.exports=d.default},6943:(f,d)=>{d.__esModule=!0,d.default={scheme:"tomorrow",author:"chris kempson (http://chriskempson.com)",base00:"#1d1f21",base01:"#282a2e",base02:"#373b41",base03:"#969896",base04:"#b4b7b4",base05:"#c5c8c6",base06:"#e0e0e0",base07:"#ffffff",base08:"#cc6666",base09:"#de935f",base0A:"#f0c674",base0B:"#b5bd68",base0C:"#8abeb7",base0D:"#81a2be",base0E:"#b294bb",base0F:"#a3685a"},f.exports=d.default},5670:(f,d)=>{d.__esModule=!0,d.default={scheme:"london tube",author:"jan t. sott",base00:"#231f20",base01:"#1c3f95",base02:"#5a5758",base03:"#737171",base04:"#959ca1",base05:"#d9d8d8",base06:"#e7e7e8",base07:"#ffffff",base08:"#ee2e24",base09:"#f386a1",base0A:"#ffd204",base0B:"#00853e",base0C:"#85cebc",base0D:"#009ddc",base0E:"#98005d",base0F:"#b06110"},f.exports=d.default},2536:(f,d)=>{d.__esModule=!0,d.default={scheme:"twilight",author:"david hart (http://hart-dev.com)",base00:"#1e1e1e",base01:"#323537",base02:"#464b50",base03:"#5f5a60",base04:"#838184",base05:"#a7a7a7",base06:"#c3c3c3",base07:"#ffffff",base08:"#cf6a4c",base09:"#cda869",base0A:"#f9ee98",base0B:"#8f9d6a",base0C:"#afc4db",base0D:"#7587a6",base0E:"#9b859d",base0F:"#9b703f"},f.exports=d.default},6481:(f,d,h)=>{var m=h(4176),g={};for(var v in m)m.hasOwnProperty(v)&&(g[m[v]]=v);var w=f.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var b in w)if(w.hasOwnProperty(b)){if(!("channels"in w[b]))throw new Error("missing channels property: "+b);if(!("labels"in w[b]))throw new Error("missing channel labels property: "+b);if(w[b].labels.length!==w[b].channels)throw new Error("channel and label counts mismatch: "+b);var _=w[b].channels,x=w[b].labels;delete w[b].channels,delete w[b].labels,Object.defineProperty(w[b],"channels",{value:_}),Object.defineProperty(w[b],"labels",{value:x})}function R(S,T){return Math.pow(S[0]-T[0],2)+Math.pow(S[1]-T[1],2)+Math.pow(S[2]-T[2],2)}w.rgb.hsl=function(S){var T,E,O=S[0]/255,C=S[1]/255,M=S[2]/255,D=Math.min(O,C,M),$=Math.max(O,C,M),q=$-D;return $===D?T=0:O===$?T=(C-M)/q:C===$?T=2+(M-O)/q:M===$&&(T=4+(O-C)/q),(T=Math.min(60*T,360))<0&&(T+=360),E=(D+$)/2,[T,100*($===D?0:E<=.5?q/($+D):q/(2-$-D)),100*E]},w.rgb.hsv=function(S){var T,E,O,C,M,D=S[0]/255,$=S[1]/255,q=S[2]/255,L=Math.max(D,$,q),V=L-Math.min(D,$,q),F=function(re){return(L-re)/6/V+.5};return V===0?C=M=0:(M=V/L,T=F(D),E=F($),O=F(q),D===L?C=O-E:$===L?C=.3333333333333333+T-O:q===L&&(C=.6666666666666666+E-T),C<0?C+=1:C>1&&(C-=1)),[360*C,100*M,100*L]},w.rgb.hwb=function(S){var T=S[0],E=S[1],O=S[2];return[w.rgb.hsl(S)[0],100*(.00392156862745098*Math.min(T,Math.min(E,O))),100*(O=1-.00392156862745098*Math.max(T,Math.max(E,O)))]},w.rgb.cmyk=function(S){var T,E=S[0]/255,O=S[1]/255,C=S[2]/255;return[100*((1-E-(T=Math.min(1-E,1-O,1-C)))/(1-T)||0),100*((1-O-T)/(1-T)||0),100*((1-C-T)/(1-T)||0),100*T]},w.rgb.keyword=function(S){var T=g[S];if(T)return T;var E,O=1/0;for(var C in m)if(m.hasOwnProperty(C)){var M=R(S,m[C]);M<O&&(O=M,E=C)}return E},w.keyword.rgb=function(S){return m[S]},w.rgb.xyz=function(S){var T=S[0]/255,E=S[1]/255,O=S[2]/255;return[100*(.4124*(T=T>.04045?Math.pow((T+.055)/1.055,2.4):T/12.92)+.3576*(E=E>.04045?Math.pow((E+.055)/1.055,2.4):E/12.92)+.1805*(O=O>.04045?Math.pow((O+.055)/1.055,2.4):O/12.92)),100*(.2126*T+.7152*E+.0722*O),100*(.0193*T+.1192*E+.9505*O)]},w.rgb.lab=function(S){var T=w.rgb.xyz(S),E=T[0],O=T[1],C=T[2];return O/=100,C/=108.883,E=(E/=95.047)>.008856?Math.pow(E,.3333333333333333):7.787*E+.13793103448275862,[116*(O=O>.008856?Math.pow(O,.3333333333333333):7.787*O+.13793103448275862)-16,500*(E-O),200*(O-(C=C>.008856?Math.pow(C,.3333333333333333):7.787*C+.13793103448275862))]},w.hsl.rgb=function(S){var T,E,O,C,M,D=S[0]/360,$=S[1]/100,q=S[2]/100;if($===0)return[M=255*q,M,M];T=2*q-(E=q<.5?q*(1+$):q+$-q*$),C=[0,0,0];for(var L=0;L<3;L++)(O=D+.3333333333333333*-(L-1))<0&&O++,O>1&&O--,M=6*O<1?T+6*(E-T)*O:2*O<1?E:3*O<2?T+(E-T)*(.6666666666666666-O)*6:T,C[L]=255*M;return C},w.hsl.hsv=function(S){var T=S[0],E=S[1]/100,O=S[2]/100,C=E,M=Math.max(O,.01);return E*=(O*=2)<=1?O:2-O,C*=M<=1?M:2-M,[T,100*(O===0?2*C/(M+C):2*E/(O+E)),100*((O+E)/2)]},w.hsv.rgb=function(S){var T=S[0]/60,E=S[1]/100,O=S[2]/100,C=Math.floor(T)%6,M=T-Math.floor(T),D=255*O*(1-E),$=255*O*(1-E*M),q=255*O*(1-E*(1-M));switch(O*=255,C){case 0:return[O,q,D];case 1:return[$,O,D];case 2:return[D,O,q];case 3:return[D,$,O];case 4:return[q,D,O];case 5:return[O,D,$]}},w.hsv.hsl=function(S){var T,E,O,C=S[0],M=S[1]/100,D=S[2]/100,$=Math.max(D,.01);return O=(2-M)*D,E=M*$,[C,100*(E=(E/=(T=(2-M)*$)<=1?T:2-T)||0),100*(O/=2)]},w.hwb.rgb=function(S){var T,E,O,C,M,D,$,q=S[0]/360,L=S[1]/100,V=S[2]/100,F=L+V;switch(F>1&&(L/=F,V/=F),O=6*q-(T=Math.floor(6*q)),1&T&&(O=1-O),C=L+O*((E=1-V)-L),T){default:case 6:case 0:M=E,D=C,$=L;break;case 1:M=C,D=E,$=L;break;case 2:M=L,D=E,$=C;break;case 3:M=L,D=C,$=E;break;case 4:M=C,D=L,$=E;break;case 5:M=E,D=L,$=C}return[255*M,255*D,255*$]},w.cmyk.rgb=function(S){var T=S[0]/100,E=S[1]/100,O=S[2]/100,C=S[3]/100;return[255*(1-Math.min(1,T*(1-C)+C)),255*(1-Math.min(1,E*(1-C)+C)),255*(1-Math.min(1,O*(1-C)+C))]},w.xyz.rgb=function(S){var T,E,O,C=S[0]/100,M=S[1]/100,D=S[2]/100;return E=-.9689*C+1.8758*M+.0415*D,O=.0557*C+-.204*M+1.057*D,T=(T=3.2406*C+-1.5372*M+-.4986*D)>.0031308?1.055*Math.pow(T,.4166666666666667)-.055:12.92*T,E=E>.0031308?1.055*Math.pow(E,.4166666666666667)-.055:12.92*E,O=O>.0031308?1.055*Math.pow(O,.4166666666666667)-.055:12.92*O,[255*(T=Math.min(Math.max(0,T),1)),255*(E=Math.min(Math.max(0,E),1)),255*(O=Math.min(Math.max(0,O),1))]},w.xyz.lab=function(S){var T=S[0],E=S[1],O=S[2];return E/=100,O/=108.883,T=(T/=95.047)>.008856?Math.pow(T,.3333333333333333):7.787*T+.13793103448275862,[116*(E=E>.008856?Math.pow(E,.3333333333333333):7.787*E+.13793103448275862)-16,500*(T-E),200*(E-(O=O>.008856?Math.pow(O,.3333333333333333):7.787*O+.13793103448275862))]},w.lab.xyz=function(S){var T,E,O,C=S[0];T=S[1]/500+(E=(C+16)/116),O=E-S[2]/200;var M=Math.pow(E,3),D=Math.pow(T,3),$=Math.pow(O,3);return E=M>.008856?M:(E-.13793103448275862)/7.787,T=D>.008856?D:(T-.13793103448275862)/7.787,O=$>.008856?$:(O-.13793103448275862)/7.787,[T*=95.047,E*=100,O*=108.883]},w.lab.lch=function(S){var T,E=S[0],O=S[1],C=S[2];return(T=360*Math.atan2(C,O)/2/Math.PI)<0&&(T+=360),[E,Math.sqrt(O*O+C*C),T]},w.lch.lab=function(S){var T,E=S[0],O=S[1];return T=S[2]/360*2*Math.PI,[E,O*Math.cos(T),O*Math.sin(T)]},w.rgb.ansi16=function(S){var T=S[0],E=S[1],O=S[2],C=1 in arguments?arguments[1]:w.rgb.hsv(S)[2];if((C=Math.round(C/50))===0)return 30;var M=30+(Math.round(O/255)<<2|Math.round(E/255)<<1|Math.round(T/255));return C===2&&(M+=60),M},w.hsv.ansi16=function(S){return w.rgb.ansi16(w.hsv.rgb(S),S[2])},w.rgb.ansi256=function(S){var T=S[0],E=S[1],O=S[2];return T===E&&E===O?T<8?16:T>248?231:Math.round((T-8)/247*24)+232:16+36*Math.round(T/255*5)+6*Math.round(E/255*5)+Math.round(O/255*5)},w.ansi16.rgb=function(S){var T=S%10;if(T===0||T===7)return S>50&&(T+=3.5),[T=T/10.5*255,T,T];var E=.5*(1+~~(S>50));return[(1&T)*E*255,(T>>1&1)*E*255,(T>>2&1)*E*255]},w.ansi256.rgb=function(S){if(S>=232){var T=10*(S-232)+8;return[T,T,T]}var E;return S-=16,[Math.floor(S/36)/5*255,Math.floor((E=S%36)/6)/5*255,E%6/5*255]},w.rgb.hex=function(S){var T=(((255&Math.round(S[0]))<<16)+((255&Math.round(S[1]))<<8)+(255&Math.round(S[2]))).toString(16).toUpperCase();return"000000".substring(T.length)+T},w.hex.rgb=function(S){var T=S.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!T)return[0,0,0];var E=T[0];T[0].length===3&&(E=E.split("").map(function(C){return C+C}).join(""));var O=parseInt(E,16);return[O>>16&255,O>>8&255,255&O]},w.rgb.hcg=function(S){var T,E=S[0]/255,O=S[1]/255,C=S[2]/255,M=Math.max(Math.max(E,O),C),D=Math.min(Math.min(E,O),C),$=M-D;return T=$<=0?0:M===E?(O-C)/$%6:M===O?2+(C-E)/$:4+(E-O)/$+4,T/=6,[360*(T%=1),100*$,100*($<1?D/(1-$):0)]},w.hsl.hcg=function(S){var T=S[1]/100,E=S[2]/100,O=1,C=0;return(O=E<.5?2*T*E:2*T*(1-E))<1&&(C=(E-.5*O)/(1-O)),[S[0],100*O,100*C]},w.hsv.hcg=function(S){var T=S[1]/100,E=S[2]/100,O=T*E,C=0;return O<1&&(C=(E-O)/(1-O)),[S[0],100*O,100*C]},w.hcg.rgb=function(S){var T=S[0]/360,E=S[1]/100,O=S[2]/100;if(E===0)return[255*O,255*O,255*O];var C,M=[0,0,0],D=T%1*6,$=D%1,q=1-$;switch(Math.floor(D)){case 0:M[0]=1,M[1]=$,M[2]=0;break;case 1:M[0]=q,M[1]=1,M[2]=0;break;case 2:M[0]=0,M[1]=1,M[2]=$;break;case 3:M[0]=0,M[1]=q,M[2]=1;break;case 4:M[0]=$,M[1]=0,M[2]=1;break;default:M[0]=1,M[1]=0,M[2]=q}return C=(1-E)*O,[255*(E*M[0]+C),255*(E*M[1]+C),255*(E*M[2]+C)]},w.hcg.hsv=function(S){var T=S[1]/100,E=T+S[2]/100*(1-T),O=0;return E>0&&(O=T/E),[S[0],100*O,100*E]},w.hcg.hsl=function(S){var T=S[1]/100,E=S[2]/100*(1-T)+.5*T,O=0;return E>0&&E<.5?O=T/(2*E):E>=.5&&E<1&&(O=T/(2*(1-E))),[S[0],100*O,100*E]},w.hcg.hwb=function(S){var T=S[1]/100,E=T+S[2]/100*(1-T);return[S[0],100*(E-T),100*(1-E)]},w.hwb.hcg=function(S){var T=S[1]/100,E=1-S[2]/100,O=E-T,C=0;return O<1&&(C=(E-O)/(1-O)),[S[0],100*O,100*C]},w.apple.rgb=function(S){return[S[0]/65535*255,S[1]/65535*255,S[2]/65535*255]},w.rgb.apple=function(S){return[S[0]/255*65535,S[1]/255*65535,S[2]/255*65535]},w.gray.rgb=function(S){return[S[0]/100*255,S[0]/100*255,S[0]/100*255]},w.gray.hsl=w.gray.hsv=function(S){return[0,0,S[0]]},w.gray.hwb=function(S){return[0,100,S[0]]},w.gray.cmyk=function(S){return[0,0,0,S[0]]},w.gray.lab=function(S){return[S[0],0,0]},w.gray.hex=function(S){var T=255&Math.round(S[0]/100*255),E=((T<<16)+(T<<8)+T).toString(16).toUpperCase();return"000000".substring(E.length)+E},w.rgb.gray=function(S){return[(S[0]+S[1]+S[2])/3/255*100]}},4732:(f,d,h)=>{var m=h(6481),g=h(1157),v={};Object.keys(m).forEach(function(w){v[w]={},Object.defineProperty(v[w],"channels",{value:m[w].channels}),Object.defineProperty(v[w],"labels",{value:m[w].labels});var b=g(w);Object.keys(b).forEach(function(_){var x=b[_];v[w][_]=(function(R){var S=function(T){if(T==null)return T;arguments.length>1&&(T=Array.prototype.slice.call(arguments));var E=R(T);if(typeof E=="object")for(var O=E.length,C=0;C<O;C++)E[C]=Math.round(E[C]);return E};return"conversion"in R&&(S.conversion=R.conversion),S})(x),v[w][_].raw=(function(R){var S=function(T){return T==null?T:(arguments.length>1&&(T=Array.prototype.slice.call(arguments)),R(T))};return"conversion"in R&&(S.conversion=R.conversion),S})(x)})}),f.exports=v},1157:(f,d,h)=>{var m=h(6481);function g(b){var _=(function(){for(var M={},D=Object.keys(m),$=D.length,q=0;q<$;q++)M[D[q]]={distance:-1,parent:null};return M})(),x=[b];for(_[b].distance=0;x.length;)for(var R=x.pop(),S=Object.keys(m[R]),T=S.length,E=0;E<T;E++){var O=S[E],C=_[O];C.distance===-1&&(C.distance=_[R].distance+1,C.parent=R,x.unshift(O))}return _}function v(b,_){return function(x){return _(b(x))}}function w(b,_){for(var x=[_[b].parent,b],R=m[_[b].parent][b],S=_[b].parent;_[S].parent;)x.unshift(_[S].parent),R=v(m[_[S].parent][S],R),S=_[S].parent;return R.conversion=x,R}f.exports=function(b){for(var _=g(b),x={},R=Object.keys(_),S=R.length,T=0;T<S;T++){var E=R[T];_[E].parent!==null&&(x[E]=w(E,_))}return x}},4176:f=>{f.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},4877:f=>{f.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},6138:(f,d,h)=>{var m=h(4877),g=h(3403),v=Object.hasOwnProperty,w=Object.create(null);for(var b in m)v.call(m,b)&&(w[m[b]]=b);var _=f.exports={to:{},get:{}};function x(S,T,E){return Math.min(Math.max(T,S),E)}function R(S){var T=Math.round(S).toString(16).toUpperCase();return T.length<2?"0"+T:T}_.get=function(S){var T,E;switch(S.substring(0,3).toLowerCase()){case"hsl":T=_.get.hsl(S),E="hsl";break;case"hwb":T=_.get.hwb(S),E="hwb";break;default:T=_.get.rgb(S),E="rgb"}return T?{model:E,value:T}:null},_.get.rgb=function(S){if(!S)return null;var T,E,O,C=[0,0,0,1];if(T=S.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(O=T[2],T=T[1],E=0;E<3;E++){var M=2*E;C[E]=parseInt(T.slice(M,M+2),16)}O&&(C[3]=parseInt(O,16)/255)}else if(T=S.match(/^#([a-f0-9]{3,4})$/i)){for(O=(T=T[1])[3],E=0;E<3;E++)C[E]=parseInt(T[E]+T[E],16);O&&(C[3]=parseInt(O+O,16)/255)}else if(T=S.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(E=0;E<3;E++)C[E]=parseInt(T[E+1],0);T[4]&&(T[5]?C[3]=.01*parseFloat(T[4]):C[3]=parseFloat(T[4]))}else{if(!(T=S.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(T=S.match(/^(\w+)$/))?T[1]==="transparent"?[0,0,0,0]:v.call(m,T[1])?((C=m[T[1]])[3]=1,C):null:null;for(E=0;E<3;E++)C[E]=Math.round(2.55*parseFloat(T[E+1]));T[4]&&(T[5]?C[3]=.01*parseFloat(T[4]):C[3]=parseFloat(T[4]))}for(E=0;E<3;E++)C[E]=x(C[E],0,255);return C[3]=x(C[3],0,1),C},_.get.hsl=function(S){if(!S)return null;var T=S.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(T){var E=parseFloat(T[4]);return[(parseFloat(T[1])%360+360)%360,x(parseFloat(T[2]),0,100),x(parseFloat(T[3]),0,100),x(isNaN(E)?1:E,0,1)]}return null},_.get.hwb=function(S){if(!S)return null;var T=S.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(T){var E=parseFloat(T[4]);return[(parseFloat(T[1])%360+360)%360,x(parseFloat(T[2]),0,100),x(parseFloat(T[3]),0,100),x(isNaN(E)?1:E,0,1)]}return null},_.to.hex=function(){var S=g(arguments);return"#"+R(S[0])+R(S[1])+R(S[2])+(S[3]<1?R(Math.round(255*S[3])):"")},_.to.rgb=function(){var S=g(arguments);return S.length<4||S[3]===1?"rgb("+Math.round(S[0])+", "+Math.round(S[1])+", "+Math.round(S[2])+")":"rgba("+Math.round(S[0])+", "+Math.round(S[1])+", "+Math.round(S[2])+", "+S[3]+")"},_.to.rgb.percent=function(){var S=g(arguments),T=Math.round(S[0]/255*100),E=Math.round(S[1]/255*100),O=Math.round(S[2]/255*100);return S.length<4||S[3]===1?"rgb("+T+"%, "+E+"%, "+O+"%)":"rgba("+T+"%, "+E+"%, "+O+"%, "+S[3]+")"},_.to.hsl=function(){var S=g(arguments);return S.length<4||S[3]===1?"hsl("+S[0]+", "+S[1]+"%, "+S[2]+"%)":"hsla("+S[0]+", "+S[1]+"%, "+S[2]+"%, "+S[3]+")"},_.to.hwb=function(){var S=g(arguments),T="";return S.length>=4&&S[3]!==1&&(T=", "+S[3]),"hwb("+S[0]+", "+S[1]+"%, "+S[2]+"%"+T+")"},_.to.keyword=function(S){return w[S.slice(0,3)]}},3639:(f,d,h)=>{var m=h(6138),g=h(4732),v=[].slice,w=["keyword","gray","hex"],b={};Object.keys(g).forEach(function(E){b[v.call(g[E].labels).sort().join("")]=E});var _={};function x(E,O){if(!(this instanceof x))return new x(E,O);if(O&&O in w&&(O=null),O&&!(O in g))throw new Error("Unknown model: "+O);var C,M;if(E==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(E instanceof x)this.model=E.model,this.color=E.color.slice(),this.valpha=E.valpha;else if(typeof E=="string"){var D=m.get(E);if(D===null)throw new Error("Unable to parse color from string: "+E);this.model=D.model,M=g[this.model].channels,this.color=D.value.slice(0,M),this.valpha=typeof D.value[M]=="number"?D.value[M]:1}else if(E.length){this.model=O||"rgb",M=g[this.model].channels;var $=v.call(E,0,M);this.color=T($,M),this.valpha=typeof E[M]=="number"?E[M]:1}else if(typeof E=="number")E&=16777215,this.model="rgb",this.color=[E>>16&255,E>>8&255,255&E],this.valpha=1;else{this.valpha=1;var q=Object.keys(E);"alpha"in E&&(q.splice(q.indexOf("alpha"),1),this.valpha=typeof E.alpha=="number"?E.alpha:0);var L=q.sort().join("");if(!(L in b))throw new Error("Unable to parse color from object: "+JSON.stringify(E));this.model=b[L];var V=g[this.model].labels,F=[];for(C=0;C<V.length;C++)F.push(E[V[C]]);this.color=T(F)}if(_[this.model])for(M=g[this.model].channels,C=0;C<M;C++){var re=_[this.model][C];re&&(this.color[C]=re(this.color[C]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}function R(E,O,C){return(E=Array.isArray(E)?E:[E]).forEach(function(M){(_[M]||(_[M]=[]))[O]=C}),E=E[0],function(M){var D;return arguments.length?(C&&(M=C(M)),(D=this[E]()).color[O]=M,D):(D=this[E]().color[O],C&&(D=C(D)),D)}}function S(E){return function(O){return Math.max(0,Math.min(E,O))}}function T(E,O){for(var C=0;C<O;C++)typeof E[C]!="number"&&(E[C]=0);return E}x.prototype={toString:function(){return this.string()},toJSON:function(){return this[this.model]()},string:function(E){var O=this.model in m.to?this:this.rgb(),C=(O=O.round(typeof E=="number"?E:1)).valpha===1?O.color:O.color.concat(this.valpha);return m.to[O.model](C)},percentString:function(E){var O=this.rgb().round(typeof E=="number"?E:1),C=O.valpha===1?O.color:O.color.concat(this.valpha);return m.to.rgb.percent(C)},array:function(){return this.valpha===1?this.color.slice():this.color.concat(this.valpha)},object:function(){for(var E={},O=g[this.model].channels,C=g[this.model].labels,M=0;M<O;M++)E[C[M]]=this.color[M];return this.valpha!==1&&(E.alpha=this.valpha),E},unitArray:function(){var E=this.rgb().color;return E[0]/=255,E[1]/=255,E[2]/=255,this.valpha!==1&&E.push(this.valpha),E},unitObject:function(){var E=this.rgb().object();return E.r/=255,E.g/=255,E.b/=255,this.valpha!==1&&(E.alpha=this.valpha),E},round:function(E){return E=Math.max(E||0,0),new x(this.color.map((function(O){return function(C){return(function(M,D){return Number(M.toFixed(D))})(C,O)}})(E)).concat(this.valpha),this.model)},alpha:function(E){return arguments.length?new x(this.color.concat(Math.max(0,Math.min(1,E))),this.model):this.valpha},red:R("rgb",0,S(255)),green:R("rgb",1,S(255)),blue:R("rgb",2,S(255)),hue:R(["hsl","hsv","hsl","hwb","hcg"],0,function(E){return(E%360+360)%360}),saturationl:R("hsl",1,S(100)),lightness:R("hsl",2,S(100)),saturationv:R("hsv",1,S(100)),value:R("hsv",2,S(100)),chroma:R("hcg",1,S(100)),gray:R("hcg",2,S(100)),white:R("hwb",1,S(100)),wblack:R("hwb",2,S(100)),cyan:R("cmyk",0,S(100)),magenta:R("cmyk",1,S(100)),yellow:R("cmyk",2,S(100)),black:R("cmyk",3,S(100)),x:R("xyz",0,S(100)),y:R("xyz",1,S(100)),z:R("xyz",2,S(100)),l:R("lab",0,S(100)),a:R("lab",1),b:R("lab",2),keyword:function(E){return arguments.length?new x(E):g[this.model].keyword(this.color)},hex:function(E){return arguments.length?new x(E):m.to.hex(this.rgb().round().color)},rgbNumber:function(){var E=this.rgb().color;return(255&E[0])<<16|(255&E[1])<<8|255&E[2]},luminosity:function(){for(var E=this.rgb().color,O=[],C=0;C<E.length;C++){var M=E[C]/255;O[C]=M<=.03928?M/12.92:Math.pow((M+.055)/1.055,2.4)}return .2126*O[0]+.7152*O[1]+.0722*O[2]},contrast:function(E){var O=this.luminosity(),C=E.luminosity();return O>C?(O+.05)/(C+.05):(C+.05)/(O+.05)},level:function(E){var O=this.contrast(E);return O>=7.1?"AAA":O>=4.5?"AA":""},isDark:function(){var E=this.rgb().color;return(299*E[0]+587*E[1]+114*E[2])/1e3<128},isLight:function(){return!this.isDark()},negate:function(){for(var E=this.rgb(),O=0;O<3;O++)E.color[O]=255-E.color[O];return E},lighten:function(E){var O=this.hsl();return O.color[2]+=O.color[2]*E,O},darken:function(E){var O=this.hsl();return O.color[2]-=O.color[2]*E,O},saturate:function(E){var O=this.hsl();return O.color[1]+=O.color[1]*E,O},desaturate:function(E){var O=this.hsl();return O.color[1]-=O.color[1]*E,O},whiten:function(E){var O=this.hwb();return O.color[1]+=O.color[1]*E,O},blacken:function(E){var O=this.hwb();return O.color[2]+=O.color[2]*E,O},grayscale:function(){var E=this.rgb().color,O=.3*E[0]+.59*E[1]+.11*E[2];return x.rgb(O,O,O)},fade:function(E){return this.alpha(this.valpha-this.valpha*E)},opaquer:function(E){return this.alpha(this.valpha+this.valpha*E)},rotate:function(E){var O=this.hsl(),C=O.color[0];return C=(C=(C+E)%360)<0?360+C:C,O.color[0]=C,O},mix:function(E,O){if(!E||!E.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof E);var C=E.rgb(),M=this.rgb(),D=O===void 0?.5:O,$=2*D-1,q=C.alpha()-M.alpha(),L=(($*q===-1?$:($+q)/(1+$*q))+1)/2,V=1-L;return x.rgb(L*C.red()+V*M.red(),L*C.green()+V*M.green(),L*C.blue()+V*M.blue(),C.alpha()*D+M.alpha()*(1-D))}},Object.keys(g).forEach(function(E){if(w.indexOf(E)===-1){var O=g[E].channels;x.prototype[E]=function(){if(this.model===E)return new x(this);if(arguments.length)return new x(arguments,E);var C,M=typeof arguments[O]=="number"?O:this.valpha;return new x((C=g[this.model][E].raw(this.color),Array.isArray(C)?C:[C]).concat(M),E)},x[E]=function(C){return typeof C=="number"&&(C=T(v.call(arguments),O)),new x(C,E)}}}),f.exports=x},9784:f=>{var d,h=typeof Reflect=="object"?Reflect:null,m=h&&typeof h.apply=="function"?h.apply:function(M,D,$){return Function.prototype.apply.call(M,D,$)};d=h&&typeof h.ownKeys=="function"?h.ownKeys:Object.getOwnPropertySymbols?function(M){return Object.getOwnPropertyNames(M).concat(Object.getOwnPropertySymbols(M))}:function(M){return Object.getOwnPropertyNames(M)};var g=Number.isNaN||function(M){return M!=M};function v(){v.init.call(this)}f.exports=v,f.exports.once=function(M,D){return new Promise(function($,q){function L(F){M.removeListener(D,V),q(F)}function V(){typeof M.removeListener=="function"&&M.removeListener("error",L),$([].slice.call(arguments))}C(M,D,V,{once:!0}),D!=="error"&&(function(F,re,ae){typeof F.on=="function"&&C(F,"error",re,ae)})(M,L,{once:!0})})},v.EventEmitter=v,v.prototype._events=void 0,v.prototype._eventsCount=0,v.prototype._maxListeners=void 0;var w=10;function b(M){if(typeof M!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof M)}function _(M){return M._maxListeners===void 0?v.defaultMaxListeners:M._maxListeners}function x(M,D,$,q){var L,V,F,re;if(b($),(V=M._events)===void 0?(V=M._events=Object.create(null),M._eventsCount=0):(V.newListener!==void 0&&(M.emit("newListener",D,$.listener?$.listener:$),V=M._events),F=V[D]),F===void 0)F=V[D]=$,++M._eventsCount;else if(typeof F=="function"?F=V[D]=q?[$,F]:[F,$]:q?F.unshift($):F.push($),(L=_(M))>0&&F.length>L&&!F.warned){F.warned=!0;var ae=new Error("Possible EventEmitter memory leak detected. "+F.length+" "+String(D)+" listeners added. Use emitter.setMaxListeners() to increase limit");ae.name="MaxListenersExceededWarning",ae.emitter=M,ae.type=D,ae.count=F.length,re=ae,console&&console.warn&&console.warn(re)}return M}function R(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function S(M,D,$){var q={fired:!1,wrapFn:void 0,target:M,type:D,listener:$},L=R.bind(q);return L.listener=$,q.wrapFn=L,L}function T(M,D,$){var q=M._events;if(q===void 0)return[];var L=q[D];return L===void 0?[]:typeof L=="function"?$?[L.listener||L]:[L]:$?(function(V){for(var F=new Array(V.length),re=0;re<F.length;++re)F[re]=V[re].listener||V[re];return F})(L):O(L,L.length)}function E(M){var D=this._events;if(D!==void 0){var $=D[M];if(typeof $=="function")return 1;if($!==void 0)return $.length}return 0}function O(M,D){for(var $=new Array(D),q=0;q<D;++q)$[q]=M[q];return $}function C(M,D,$,q){if(typeof M.on=="function")q.once?M.once(D,$):M.on(D,$);else{if(typeof M.addEventListener!="function")throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof M);M.addEventListener(D,function L(V){q.once&&M.removeEventListener(D,L),$(V)})}}Object.defineProperty(v,"defaultMaxListeners",{enumerable:!0,get:function(){return w},set:function(M){if(typeof M!="number"||M<0||g(M))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+M+".");w=M}}),v.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},v.prototype.setMaxListeners=function(M){if(typeof M!="number"||M<0||g(M))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+M+".");return this._maxListeners=M,this},v.prototype.getMaxListeners=function(){return _(this)},v.prototype.emit=function(M){for(var D=[],$=1;$<arguments.length;$++)D.push(arguments[$]);var q=M==="error",L=this._events;if(L!==void 0)q=q&&L.error===void 0;else if(!q)return!1;if(q){var V;if(D.length>0&&(V=D[0]),V instanceof Error)throw V;var F=new Error("Unhandled error."+(V?" ("+V.message+")":""));throw F.context=V,F}var re=L[M];if(re===void 0)return!1;if(typeof re=="function")m(re,this,D);else{var ae=re.length,K=O(re,ae);for($=0;$<ae;++$)m(K[$],this,D)}return!0},v.prototype.addListener=function(M,D){return x(this,M,D,!1)},v.prototype.on=v.prototype.addListener,v.prototype.prependListener=function(M,D){return x(this,M,D,!0)},v.prototype.once=function(M,D){return b(D),this.on(M,S(this,M,D)),this},v.prototype.prependOnceListener=function(M,D){return b(D),this.prependListener(M,S(this,M,D)),this},v.prototype.removeListener=function(M,D){var $,q,L,V,F;if(b(D),(q=this._events)===void 0)return this;if(($=q[M])===void 0)return this;if($===D||$.listener===D)--this._eventsCount===0?this._events=Object.create(null):(delete q[M],q.removeListener&&this.emit("removeListener",M,$.listener||D));else if(typeof $!="function"){for(L=-1,V=$.length-1;V>=0;V--)if($[V]===D||$[V].listener===D){F=$[V].listener,L=V;break}if(L<0)return this;L===0?$.shift():(function(re,ae){for(;ae+1<re.length;ae++)re[ae]=re[ae+1];re.pop()})($,L),$.length===1&&(q[M]=$[0]),q.removeListener!==void 0&&this.emit("removeListener",M,F||D)}return this},v.prototype.off=v.prototype.removeListener,v.prototype.removeAllListeners=function(M){var D,$,q;if(($=this._events)===void 0)return this;if($.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):$[M]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete $[M]),this;if(arguments.length===0){var L,V=Object.keys($);for(q=0;q<V.length;++q)(L=V[q])!=="removeListener"&&this.removeAllListeners(L);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(D=$[M])=="function")this.removeListener(M,D);else if(D!==void 0)for(q=D.length-1;q>=0;q--)this.removeListener(M,D[q]);return this},v.prototype.listeners=function(M){return T(this,M,!0)},v.prototype.rawListeners=function(M){return T(this,M,!1)},v.listenerCount=function(M,D){return typeof M.listenerCount=="function"?M.listenerCount(D):E.call(M,D)},v.prototype.listenerCount=E,v.prototype.eventNames=function(){return this._eventsCount>0?d(this._events):[]}},2094:f=>{f.exports=function(d){return!(!d||typeof d=="string")&&(d instanceof Array||Array.isArray(d)||d.length>=0&&(d.splice instanceof Function||Object.getOwnPropertyDescriptor(d,d.length-1)&&d.constructor.name!=="String"))}},3989:f=>{var d="__lodash_placeholder__",h=32,m=1/0,g=NaN,v=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",h],["partialRight",64],["rearg",256]],w="[object Function]",b="[object GeneratorFunction]",_=/^\s+|\s+$/g,x=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,R=/\{\n\/\* \[wrapped with (.+)\] \*/,S=/,? & /,T=/^[-+]0x[0-9a-f]+$/i,E=/^0b[01]+$/i,O=/^\[object .+?Constructor\]$/,C=/^0o[0-7]+$/i,M=/^(?:0|[1-9]\d*)$/,D=parseInt,$=typeof p1=="object"&&p1&&p1.Object===Object&&p1,q=typeof self=="object"&&self&&self.Object===Object&&self,L=$||q||Function("return this")();function V(Ae,xe,Ne){switch(Ne.length){case 0:return Ae.call(xe);case 1:return Ae.call(xe,Ne[0]);case 2:return Ae.call(xe,Ne[0],Ne[1]);case 3:return Ae.call(xe,Ne[0],Ne[1],Ne[2])}return Ae.apply(xe,Ne)}function F(Ae,xe){return!!(Ae&&Ae.length)&&(function(Ne,Ke,vt){if(Ke!=Ke)return(function(wt,Ht,Rt,Qt){for(var _n=wt.length,Gt=Rt+-1;++Gt<_n;)if(Ht(wt[Gt],Gt,wt))return Gt;return-1})(Ne,re,vt);for(var Xt=vt-1,Vt=Ne.length;++Xt<Vt;)if(Ne[Xt]===Ke)return Xt;return-1})(Ae,xe,0)>-1}function re(Ae){return Ae!=Ae}function ae(Ae,xe){for(var Ne=-1,Ke=Ae.length,vt=0,Xt=[];++Ne<Ke;){var Vt=Ae[Ne];Vt!==xe&&Vt!==d||(Ae[Ne]=d,Xt[vt++]=Ne)}return Xt}var K,B,Y,fe=Function.prototype,se=Object.prototype,N=L["__core-js_shared__"],I=(K=/[^.]+$/.exec(N&&N.keys&&N.keys.IE_PROTO||""))?"Symbol(src)_1."+K:"",U=fe.toString,P=se.hasOwnProperty,G=se.toString,ee=RegExp("^"+U.call(P).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ue=Object.create,ve=Math.max,Ee=Math.min,Oe=(B=Pe(Object,"defineProperty"),(Y=Pe.name)&&Y.length>2?B:void 0);function de(Ae){if(!Ue(Ae)||(function(Ne){return!!I&&I in Ne})(Ae))return!1;var xe=(function(Ne){var Ke=Ue(Ne)?G.call(Ne):"";return Ke==w||Ke==b})(Ae)||(function(Ne){var Ke=!1;if(Ne!=null&&typeof Ne.toString!="function")try{Ke=!!(Ne+"")}catch{}return Ke})(Ae)?ee:O;return xe.test((function(Ne){if(Ne!=null){try{return U.call(Ne)}catch{}try{return Ne+""}catch{}}return""})(Ae))}function te(Ae){return function(){var xe=arguments;switch(xe.length){case 0:return new Ae;case 1:return new Ae(xe[0]);case 2:return new Ae(xe[0],xe[1]);case 3:return new Ae(xe[0],xe[1],xe[2]);case 4:return new Ae(xe[0],xe[1],xe[2],xe[3]);case 5:return new Ae(xe[0],xe[1],xe[2],xe[3],xe[4]);case 6:return new Ae(xe[0],xe[1],xe[2],xe[3],xe[4],xe[5]);case 7:return new Ae(xe[0],xe[1],xe[2],xe[3],xe[4],xe[5],xe[6])}var Ne,Ke=Ue(Ne=Ae.prototype)?ue(Ne):{},vt=Ae.apply(Ke,xe);return Ue(vt)?vt:Ke}}function Se(Ae,xe,Ne,Ke,vt,Xt,Vt,wt,Ht,Rt){var Qt=128&xe,_n=1&xe,Gt=2&xe,Tn=24&xe,En=512&xe,Pn=Gt?void 0:te(Ae);return function Dt(){for(var xn=arguments.length,Kt=Array(xn),sr=xn;sr--;)Kt[sr]=arguments[sr];if(Tn)var wr=Te(Dt),qr=(function(on,Cn){for(var Ft=on.length,Vr=0;Ft--;)on[Ft]===Cn&&Vr++;return Vr})(Kt,wr);if(Ke&&(Kt=(function(on,Cn,Ft,Vr){for(var Pr=-1,$a=on.length,nr=Ft.length,$t=-1,sn=Cn.length,Ir=ve($a-nr,0),Ua=Array(sn+Ir),ts=!Vr;++$t<sn;)Ua[$t]=Cn[$t];for(;++Pr<nr;)(ts||Pr<$a)&&(Ua[Ft[Pr]]=on[Pr]);for(;Ir--;)Ua[$t++]=on[Pr++];return Ua})(Kt,Ke,vt,Tn)),Xt&&(Kt=(function(on,Cn,Ft,Vr){for(var Pr=-1,$a=on.length,nr=-1,$t=Ft.length,sn=-1,Ir=Cn.length,Ua=ve($a-$t,0),ts=Array(Ua+Ir),yf=!Vr;++Pr<Ua;)ts[Pr]=on[Pr];for(var ml=Pr;++sn<Ir;)ts[ml+sn]=Cn[sn];for(;++nr<$t;)(yf||Pr<$a)&&(ts[ml+Ft[nr]]=on[Pr++]);return ts})(Kt,Xt,Vt,Tn)),xn-=qr,Tn&&xn<Rt){var ft=ae(Kt,wr);return we(Ae,xe,Se,Dt.placeholder,Ne,Kt,ft,wt,Ht,Rt-xn)}var tn=_n?Ne:this,Fn=Gt?tn[Ae]:Ae;return xn=Kt.length,wt?Kt=(function(on,Cn){for(var Ft=on.length,Vr=Ee(Cn.length,Ft),Pr=(function(nr,$t){var sn=-1,Ir=nr.length;for($t||($t=Array(Ir));++sn<Ir;)$t[sn]=nr[sn];return $t})(on);Vr--;){var $a=Cn[Vr];on[Vr]=Be($a,Ft)?Pr[$a]:void 0}return on})(Kt,wt):En&&xn>1&&Kt.reverse(),Qt&&Ht<xn&&(Kt.length=Ht),this&&this!==L&&this instanceof Dt&&(Fn=Pn||te(Fn)),Fn.apply(tn,Kt)}}function we(Ae,xe,Ne,Ke,vt,Xt,Vt,wt,Ht,Rt){var Qt=8&xe;xe|=Qt?h:64,4&(xe&=~(Qt?64:h))||(xe&=-4);var _n=Ne(Ae,xe,vt,Qt?Xt:void 0,Qt?Vt:void 0,Qt?void 0:Xt,Qt?void 0:Vt,wt,Ht,Rt);return _n.placeholder=Ke,Fe(_n,Ae,xe)}function $e(Ae,xe,Ne,Ke,vt,Xt,Vt,wt){var Ht=2&xe;if(!Ht&&typeof Ae!="function")throw new TypeError("Expected a function");var Rt=Ke?Ke.length:0;if(Rt||(xe&=-97,Ke=vt=void 0),Vt=Vt===void 0?Vt:ve(Mt(Vt),0),wt=wt===void 0?wt:Mt(wt),Rt-=vt?vt.length:0,64&xe){var Qt=Ke,_n=vt;Ke=vt=void 0}var Gt=[Ae,xe,Ne,Ke,vt,Qt,_n,Xt,Vt,wt];if(Ae=Gt[0],xe=Gt[1],Ne=Gt[2],Ke=Gt[3],vt=Gt[4],!(wt=Gt[9]=Gt[9]==null?Ht?0:Ae.length:ve(Gt[9]-Rt,0))&&24&xe&&(xe&=-25),xe&&xe!=1)Tn=xe==8||xe==16?(function(En,Pn,Dt){var xn=te(En);return function Kt(){for(var sr=arguments.length,wr=Array(sr),qr=sr,ft=Te(Kt);qr--;)wr[qr]=arguments[qr];var tn=sr<3&&wr[0]!==ft&&wr[sr-1]!==ft?[]:ae(wr,ft);return(sr-=tn.length)<Dt?we(En,Pn,Se,Kt.placeholder,void 0,wr,tn,void 0,void 0,Dt-sr):V(this&&this!==L&&this instanceof Kt?xn:En,this,wr)}})(Ae,xe,wt):xe!=h&&xe!=33||vt.length?Se.apply(void 0,Gt):(function(En,Pn,Dt,xn){var Kt=1&Pn,sr=te(En);return function wr(){for(var qr=-1,ft=arguments.length,tn=-1,Fn=xn.length,on=Array(Fn+ft),Cn=this&&this!==L&&this instanceof wr?sr:En;++tn<Fn;)on[tn]=xn[tn];for(;ft--;)on[tn++]=arguments[++qr];return V(Cn,Kt?Dt:this,on)}})(Ae,xe,Ne,Ke);else var Tn=(function(En,Pn,Dt){var xn=1&Pn,Kt=te(En);return function sr(){return(this&&this!==L&&this instanceof sr?Kt:En).apply(xn?Dt:this,arguments)}})(Ae,xe,Ne);return Fe(Tn,Ae,xe)}function Te(Ae){return Ae.placeholder}function Pe(Ae,xe){var Ne=(function(Ke,vt){return Ke?.[vt]})(Ae,xe);return de(Ne)?Ne:void 0}function Ge(Ae){var xe=Ae.match(R);return xe?xe[1].split(S):[]}function Ce(Ae,xe){var Ne=xe.length,Ke=Ne-1;return xe[Ke]=(Ne>1?"& ":"")+xe[Ke],xe=xe.join(Ne>2?", ":" "),Ae.replace(x,`{
128
+ /* [wrapped with `+xe+`] */
129
+ `)}function Be(Ae,xe){return!!(xe=xe??9007199254740991)&&(typeof Ae=="number"||M.test(Ae))&&Ae>-1&&Ae%1==0&&Ae<xe}var Fe=Oe?function(Ae,xe,Ne){var Ke,vt=xe+"";return Oe(Ae,"toString",{configurable:!0,enumerable:!1,value:(Ke=Ce(vt,Je(Ge(vt),Ne)),function(){return Ke})})}:function(Ae){return Ae};function Je(Ae,xe){return(function(Ne,Ke){for(var vt=-1,Xt=Ne?Ne.length:0;++vt<Xt&&Ke(Ne[vt],vt,Ne)!==!1;);})(v,function(Ne){var Ke="_."+Ne[0];xe&Ne[1]&&!F(Ae,Ke)&&Ae.push(Ke)}),Ae.sort()}function ke(Ae,xe,Ne){var Ke=$e(Ae,8,void 0,void 0,void 0,void 0,void 0,xe=Ne?void 0:xe);return Ke.placeholder=ke.placeholder,Ke}function Ue(Ae){var xe=typeof Ae;return!!Ae&&(xe=="object"||xe=="function")}function Xe(Ae){return Ae?(Ae=(function(xe){if(typeof xe=="number")return xe;if((function(vt){return typeof vt=="symbol"||(function(Xt){return!!Xt&&typeof Xt=="object"})(vt)&&G.call(vt)=="[object Symbol]"})(xe))return g;if(Ue(xe)){var Ne=typeof xe.valueOf=="function"?xe.valueOf():xe;xe=Ue(Ne)?Ne+"":Ne}if(typeof xe!="string")return xe===0?xe:+xe;xe=xe.replace(_,"");var Ke=E.test(xe);return Ke||C.test(xe)?D(xe.slice(2),Ke?2:8):T.test(xe)?g:+xe})(Ae))===m||Ae===-1/0?17976931348623157e292*(Ae<0?-1:1):Ae==Ae?Ae:0:Ae===0?Ae:0}function Mt(Ae){var xe=Xe(Ae),Ne=xe%1;return xe==xe?Ne?xe-Ne:xe:0}ke.placeholder={},f.exports=ke},3403:(f,d,h)=>{var m=h(2094),g=Array.prototype.concat,v=Array.prototype.slice,w=f.exports=function(b){for(var _=[],x=0,R=b.length;x<R;x++){var S=b[x];m(S)?_=g.call(_,v.call(S)):_.push(S)}return _};w.wrap=function(b){return function(){return b(w(arguments))}}},4119:f=>{f.exports=r}},s={};function l(f){var d=s[f];if(d!==void 0)return d.exports;var h=s[f]={exports:{}};return i[f](h,h.exports,l),h.exports}l.n=f=>{var d=f&&f.__esModule?()=>f.default:()=>f;return l.d(d,{a:d}),d},l.d=(f,d)=>{for(var h in d)l.o(d,h)&&!l.o(f,h)&&Object.defineProperty(f,h,{enumerable:!0,get:d[h]})},l.o=(f,d)=>Object.prototype.hasOwnProperty.call(f,d),l.r=f=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(f,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(f,"__esModule",{value:!0})};var c={};return(()=>{function f(ne){return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Z){return typeof Z}:function(Z){return Z&&typeof Symbol=="function"&&Z.constructor===Symbol&&Z!==Symbol.prototype?"symbol":typeof Z},f(ne)}function d(ne){var Z=(function(X,W){if(f(X)!="object"||!X)return X;var ge=X[Symbol.toPrimitive];if(ge!==void 0){var Re=ge.call(X,W);if(f(Re)!="object")return Re;throw new TypeError("@@toPrimitive must return a primitive value.")}return(W==="string"?String:Number)(X)})(ne,"string");return f(Z)=="symbol"?Z:Z+""}function h(ne,Z,X){return(Z=d(Z))in ne?Object.defineProperty(ne,Z,{value:X,enumerable:!0,configurable:!0,writable:!0}):ne[Z]=X,ne}function m(ne,Z){var X=Object.keys(ne);if(Object.getOwnPropertySymbols){var W=Object.getOwnPropertySymbols(ne);Z&&(W=W.filter(function(ge){return Object.getOwnPropertyDescriptor(ne,ge).enumerable})),X.push.apply(X,W)}return X}function g(ne){for(var Z=1;Z<arguments.length;Z++){var X=arguments[Z]!=null?arguments[Z]:{};Z%2?m(Object(X),!0).forEach(function(W){h(ne,W,X[W])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ne,Object.getOwnPropertyDescriptors(X)):m(Object(X)).forEach(function(W){Object.defineProperty(ne,W,Object.getOwnPropertyDescriptor(X,W))})}return ne}function v(ne,Z){if(!(ne instanceof Z))throw new TypeError("Cannot call a class as a function")}function w(ne,Z){for(var X=0;X<Z.length;X++){var W=Z[X];W.enumerable=W.enumerable||!1,W.configurable=!0,"value"in W&&(W.writable=!0),Object.defineProperty(ne,d(W.key),W)}}function b(ne,Z,X){return Z&&w(ne.prototype,Z),X&&w(ne,X),Object.defineProperty(ne,"prototype",{writable:!1}),ne}function _(ne){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Z){return Z.__proto__||Object.getPrototypeOf(Z)},_(ne)}function x(){try{var ne=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(x=function(){return!!ne})()}function R(ne,Z){if(Z&&(f(Z)=="object"||typeof Z=="function"))return Z;if(Z!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(X){if(X===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return X})(ne)}function S(ne,Z,X){return Z=_(Z),R(ne,x()?Reflect.construct(Z,X||[],_(ne).constructor):Z.apply(ne,X))}function T(ne,Z){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(X,W){return X.__proto__=W,X},T(ne,Z)}function E(ne,Z){if(typeof Z!="function"&&Z!==null)throw new TypeError("Super expression must either be null or a function");ne.prototype=Object.create(Z&&Z.prototype,{constructor:{value:ne,writable:!0,configurable:!0}}),Object.defineProperty(ne,"prototype",{writable:!1}),Z&&T(ne,Z)}l.r(c),l.d(c,{default:()=>Sf});var O=l(4119),C=l.n(O);function M(){var ne=this.constructor.getDerivedStateFromProps(this.props,this.state);ne!=null&&this.setState(ne)}function D(ne){this.setState((function(Z){var X=this.constructor.getDerivedStateFromProps(ne,Z);return X??null}).bind(this))}function $(ne,Z){try{var X=this.props,W=this.state;this.props=ne,this.state=Z,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(X,W)}finally{this.props=X,this.state=W}}function q(ne){var Z=ne.prototype;if(!Z||!Z.isReactComponent)throw new Error("Can only polyfill class components");if(typeof ne.getDerivedStateFromProps!="function"&&typeof Z.getSnapshotBeforeUpdate!="function")return ne;var X=null,W=null,ge=null;if(typeof Z.componentWillMount=="function"?X="componentWillMount":typeof Z.UNSAFE_componentWillMount=="function"&&(X="UNSAFE_componentWillMount"),typeof Z.componentWillReceiveProps=="function"?W="componentWillReceiveProps":typeof Z.UNSAFE_componentWillReceiveProps=="function"&&(W="UNSAFE_componentWillReceiveProps"),typeof Z.componentWillUpdate=="function"?ge="componentWillUpdate":typeof Z.UNSAFE_componentWillUpdate=="function"&&(ge="UNSAFE_componentWillUpdate"),X!==null||W!==null||ge!==null){var Re=ne.displayName||ne.name,_e=typeof ne.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
130
+
131
+ `+Re+" uses "+_e+" but also contains the following legacy lifecycles:"+(X!==null?`
132
+ `+X:"")+(W!==null?`
133
+ `+W:"")+(ge!==null?`
134
+ `+ge:"")+`
135
+
136
+ The above lifecycles should be removed. Learn more about this warning here:
137
+ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof ne.getDerivedStateFromProps=="function"&&(Z.componentWillMount=M,Z.componentWillReceiveProps=D),typeof Z.getSnapshotBeforeUpdate=="function"){if(typeof Z.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");Z.componentWillUpdate=$;var ye=Z.componentDidUpdate;Z.componentDidUpdate=function(Me,Ie,Ye){var He=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:Ye;ye.call(this,Me,Ie,He)}}return ne}function L(ne,Z){if(ne==null)return{};var X={};for(var W in ne)if({}.hasOwnProperty.call(ne,W)){if(Z.indexOf(W)!==-1)continue;X[W]=ne[W]}return X}function V(ne,Z){if(ne==null)return{};var X,W,ge=L(ne,Z);if(Object.getOwnPropertySymbols){var Re=Object.getOwnPropertySymbols(ne);for(W=0;W<Re.length;W++)X=Re[W],Z.indexOf(X)===-1&&{}.propertyIsEnumerable.call(ne,X)&&(ge[X]=ne[X])}return ge}function F(ne,Z){if(Z&&ne?.constructor===Z)return"bigNumber";var X=(function(W){return{}.toString.call(W).match(/\s([a-zA-Z]+)/)[1].toLowerCase()})(ne);return X==="number"&&(X=isNaN(ne)?"nan":(0|ne)!=ne?"float":"integer"),X}function re(ne){return ne.replace(/\\/g,"\\\\").replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r").replace(/\f/g,"\\f")}M.__suppressDeprecationWarning=!0,D.__suppressDeprecationWarning=!0,$.__suppressDeprecationWarning=!0;var ae={scheme:"rjv-default",author:"mac gainor",base00:"rgba(0, 0, 0, 0)",base01:"rgb(245, 245, 245)",base02:"rgb(235, 235, 235)",base03:"#93a1a1",base04:"rgba(0, 0, 0, 0.3)",base05:"#586e75",base06:"#073642",base07:"#002b36",base08:"#d33682",base09:"#cb4b16",base0A:"#dc322f",base0B:"#859900",base0C:"#6c71c4",base0D:"#586e75",base0E:"#2aa198",base0F:"#268bd2"},K={scheme:"rjv-grey",author:"mac gainor",base00:"rgba(1, 1, 1, 0)",base01:"rgba(1, 1, 1, 0.1)",base02:"rgba(0, 0, 0, 0.2)",base03:"rgba(1, 1, 1, 0.3)",base04:"rgba(0, 0, 0, 0.4)",base05:"rgba(1, 1, 1, 0.5)",base06:"rgba(1, 1, 1, 0.6)",base07:"rgba(1, 1, 1, 0.7)",base08:"rgba(1, 1, 1, 0.8)",base09:"rgba(1, 1, 1, 0.8)",base0A:"rgba(1, 1, 1, 0.8)",base0B:"rgba(1, 1, 1, 0.8)",base0C:"rgba(1, 1, 1, 0.8)",base0D:"rgba(1, 1, 1, 0.8)",base0E:"rgba(1, 1, 1, 0.8)",base0F:"rgba(1, 1, 1, 0.8)"};const B={globalFontFamily:"monospace",globalCursor:"default",braceFontWeight:"bold",braceCursor:"pointer",ellipsisFontSize:"18px",ellipsisLineHeight:"10px",ellipsisCursor:"pointer",keyMargin:"0px 5px",keyLetterSpacing:"0.5px",keyFontStyle:"none",keyVerticalAlign:"top",keyOpacity:"0.85",keyOpacityHover:"1",keyValPaddingTop:"3px",keyValPaddingBottom:"3px",keyValPaddingRight:"5px",keyValBorderLeft:"1px solid",keyValBorderHover:"2px solid",pushedContentMarginLeft:"6px",variableValuePaddingRight:"6px",nullFontSize:"11px",nullFontWeight:"bold",nullPadding:"1px 2px",nullBorderRadius:"3px",nanFontSize:"11px",nanFontWeight:"bold",nanPadding:"1px 2px",nanBorderRadius:"3px",undefinedFontSize:"11px",undefinedPadding:"1px 2px",undefinedBorderRadius:"3px",dataTypeFontSize:"11px",dataTypeMarginRight:"4px",datatypeOpacity:"0.8",objectSizeBorderRadius:"3px",objectSizeFontStyle:"italic",objectSizeMargin:"0px 6px 0px 0px",clipboardCursor:"pointer",clipboardCheckMarginLeft:"-12px",metaDataPadding:"0px 0px 0px 10px",arrayGroupMetaPadding:"0px 0px 0px 4px",iconContainerWidth:"17px",tooltipPadding:"4px",editInputMinWidth:"130px",editInputBorderRadius:"2px",editInputPadding:"5px",editInputMarginRight:"4px",editInputFontFamily:"monospace",iconCursor:"pointer",iconFontSize:"15px",iconPaddingRight:"1px",dateValueMarginLeft:"2px",iconMarginRight:"3px",detectedRowPaddingTop:"3px",addKeyCoverBackground:"rgba(255, 255, 255, 0.3)",addKeyCoverPosition:"absolute",addKeyCoverPositionPx:"0px",addKeyModalWidth:"200px",addKeyModalMargin:"auto",addKeyModalPadding:"10px",addKeyModalRadius:"3px",commaColor:"#666",commaFontSize:"12px",commaMarginRight:"4px"};function Y(ne,Z){(Z==null||Z>ne.length)&&(Z=ne.length);for(var X=0,W=Array(Z);X<Z;X++)W[X]=ne[X];return W}function fe(ne,Z){if(ne){if(typeof ne=="string")return Y(ne,Z);var X={}.toString.call(ne).slice(8,-1);return X==="Object"&&ne.constructor&&(X=ne.constructor.name),X==="Map"||X==="Set"?Array.from(ne):X==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(X)?Y(ne,Z):void 0}}function se(ne,Z){return(function(X){if(Array.isArray(X))return X})(ne)||(function(X,W){var ge=X==null?null:typeof Symbol<"u"&&X[Symbol.iterator]||X["@@iterator"];if(ge!=null){var Re,_e,ye,Me,Ie=[],Ye=!0,He=!1;try{if(ye=(ge=ge.call(X)).next,W===0){if(Object(ge)!==ge)return;Ye=!1}else for(;!(Ye=(Re=ye.call(ge)).done)&&(Ie.push(Re.value),Ie.length!==W);Ye=!0);}catch(lt){He=!0,_e=lt}finally{try{if(!Ye&&ge.return!=null&&(Me=ge.return(),Object(Me)!==Me))return}finally{if(He)throw _e}}return Ie}})(ne,Z)||fe(ne,Z)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
138
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}var N=l(9446),I=l(3639),U=l.n(I),P=l(3989),G=l.n(P);function ee(ne,Z){var X=Object.keys(ne);if(Object.getOwnPropertySymbols){var W=Object.getOwnPropertySymbols(ne);Z&&(W=W.filter(function(ge){return Object.getOwnPropertyDescriptor(ne,ge).enumerable})),X.push.apply(X,W)}return X}function ue(ne){for(var Z=1;Z<arguments.length;Z++){var X=arguments[Z]!=null?arguments[Z]:{};Z%2?ee(Object(X),!0).forEach(function(W){h(ne,W,X[W])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ne,Object.getOwnPropertyDescriptors(X)):ee(Object(X)).forEach(function(W){Object.defineProperty(ne,W,Object.getOwnPropertyDescriptor(X,W))})}return ne}var ve=N.default,Ee=Object.keys(ve),Oe=function(ne){var Z,X=(function(Me){var Ie=Me[0]/255,Ye=Me[1]/255,He=Me[2]/255;return[.299*Ie+.587*Ye+.114*He,-.14713*Ie+-.28886*Ye+.436*He,.615*Ie+-.51499*Ye+-.10001*He]})(U()(ne).array()),W=se(X,3),ge=W[0],Re=W[1],_e=W[2],ye=(function(Me){var Ie,Ye,He,lt=Me[0],We=Me[1],Bt=Me[2];return Ie=1*lt+0*We+1.13983*Bt,Ye=1*lt+-.39465*We+-.5806*Bt,He=1*lt+2.02311*We+0*Bt,[255*(Ie=Math.min(Math.max(0,Ie),1)),255*(Ye=Math.min(Math.max(0,Ye),1)),255*(He=Math.min(Math.max(0,He),1))]})([(Z=ge,Z<.25?1:Z<.5?.9-Z:1.1-Z),Re,_e]);return U().rgb(ye).hex()},de=function(ne){return function(Z){return{className:[Z.className,ne.className].filter(Boolean).join(" "),style:ue(ue({},Z.style||{}),ne.style||{})}}},te=function(ne,Z){var X=Object.keys(Z);for(var W in ne)X.indexOf(W)===-1&&X.push(W);return X.reduce(function(ge,Re){return ge[Re]=(function(_e,ye){if(_e===void 0)return ye;if(ye===void 0)return _e;var Me=f(_e),Ie=f(ye);switch(Me){case"string":switch(Ie){case"string":return[ye,_e].filter(Boolean).join(" ");case"object":return de({className:_e,style:ye});case"function":return function(Ye){for(var He=arguments.length,lt=new Array(He>1?He-1:0),We=1;We<He;We++)lt[We-1]=arguments[We];return de({className:_e})(ye.apply(void 0,[Ye].concat(lt)))}}break;case"object":switch(Ie){case"string":return de({className:ye,style:_e});case"object":return ue(ue({},ye),_e);case"function":return function(Ye){for(var He=arguments.length,lt=new Array(He>1?He-1:0),We=1;We<He;We++)lt[We-1]=arguments[We];return de({style:_e})(ye.apply(void 0,[Ye].concat(lt)))}}break;case"function":switch(Ie){case"string":return function(Ye){for(var He=arguments.length,lt=new Array(He>1?He-1:0),We=1;We<He;We++)lt[We-1]=arguments[We];return _e.apply(void 0,[de(Ye)({className:ye})].concat(lt))};case"object":return function(Ye){for(var He=arguments.length,lt=new Array(He>1?He-1:0),We=1;We<He;We++)lt[We-1]=arguments[We];return _e.apply(void 0,[de(Ye)({style:ye})].concat(lt))};case"function":return function(Ye){for(var He=arguments.length,lt=new Array(He>1?He-1:0),We=1;We<He;We++)lt[We-1]=arguments[We];return _e.apply(void 0,[ye.apply(void 0,[Ye].concat(lt))].concat(lt))}}}})(ne[Re],Z[Re]),ge},{})},Se=function(ne,Z){for(var X=arguments.length,W=new Array(X>2?X-2:0),ge=2;ge<X;ge++)W[ge-2]=arguments[ge];if(Z===null)return ne;Array.isArray(Z)||(Z=[Z]);var Re=Z.map(function(_e){return ne[_e]}).filter(Boolean).reduce(function(_e,ye){return typeof ye=="string"?_e.className=[_e.className,ye].filter(Boolean).join(" "):f(ye)==="object"?_e.style=ue(ue({},_e.style),ye):typeof ye=="function"&&(_e=ue(ue({},_e),ye.apply(void 0,[_e].concat(W)))),_e},{className:"",style:{}});return Re.className||delete Re.className,Object.keys(Re.style).length===0&&delete Re.style,Re},we=function(ne){return Object.keys(ne).reduce(function(Z,X){return Z[X]=/^base/.test(X)?Oe(ne[X]):X==="scheme"?ne[X]+":inverted":ne[X],Z},{})},$e=G()(function(ne){var Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},W=Z.defaultBase16,ge=W===void 0?ve:W,Re=Z.base16Themes,_e=Pe(X,Re===void 0?null:Re);_e&&(X=ue(ue({},_e),X));for(var ye=Ee.reduce(function(Bt,hn){return Bt[hn]=X[hn]||ge[hn],Bt},{}),Me=Object.keys(X).reduce(function(Bt,hn){return Ee.indexOf(hn)===-1&&(Bt[hn]=X[hn]),Bt},{}),Ie=ne(ye),Ye=te(Me,Ie),He=arguments.length,lt=new Array(He>3?He-3:0),We=3;We<He;We++)lt[We-3]=arguments[We];return G()(Se,2).apply(void 0,[Ye].concat(lt))},3),Te=function(ne){return!!ne.extend},Pe=function(ne,Z){if(ne&&Te(ne)&&ne.extend&&(ne=ne.extend),typeof ne=="string"){var X=se(ne.split(":"),2),W=X[0],ge=X[1];ne=Z?Z[W]:N[W],ge==="inverted"&&(ne=we(ne))}return ne&&Object.prototype.hasOwnProperty.call(ne,"base00")?ne:void 0},Ge=function(ne){var Z=(function(X){return{backgroundColor:X.base00,ellipsisColor:X.base09,braceColor:X.base07,expandedIcon:X.base0D,collapsedIcon:X.base0E,keyColor:X.base07,arrayKeyColor:X.base0C,objectSize:X.base04,copyToClipboard:X.base0F,copyToClipboardCheck:X.base0D,objectBorder:X.base02,dataTypes:{boolean:X.base0E,date:X.base0D,float:X.base0B,function:X.base0D,integer:X.base0F,string:X.base09,nan:X.base08,null:X.base0A,undefined:X.base05,regexp:X.base0A,background:X.base02,bigNumber:X.base09},editVariable:{editIcon:X.base0E,cancelIcon:X.base09,removeIcon:X.base09,addIcon:X.base0E,checkIcon:X.base0E,background:X.base01,color:X.base0A,border:X.base07},addKeyModal:{background:X.base05,border:X.base04,color:X.base0A,labelColor:X.base01},validationFailure:{background:X.base09,iconColor:X.base01,fontColor:X.base01}}})(ne);return{"app-container":{fontFamily:B.globalFontFamily,cursor:B.globalCursor,backgroundColor:Z.backgroundColor,position:"relative"},ellipsis:{display:"inline-block",color:Z.ellipsisColor,fontSize:B.ellipsisFontSize,lineHeight:B.ellipsisLineHeight,cursor:B.ellipsisCursor},"brace-row":{display:"inline-block",cursor:"pointer"},brace:{display:"inline-block",cursor:B.braceCursor,fontWeight:B.braceFontWeight,color:Z.braceColor},"expanded-icon":{color:Z.expandedIcon},"collapsed-icon":{color:Z.collapsedIcon},colon:{display:"inline-block",margin:B.keyMargin,color:Z.keyColor,verticalAlign:"top"},objectKeyVal:function(X,W){return{style:g({paddingTop:B.keyValPaddingTop,paddingRight:B.keyValPaddingRight,paddingBottom:B.keyValPaddingBottom,borderLeft:B.keyValBorderLeft+" "+Z.objectBorder,":hover":{paddingLeft:W.paddingLeft-1+"px",borderLeft:B.keyValBorderHover+" "+Z.objectBorder}},W)}},"object-key-val-no-border":{padding:B.keyValPadding},"pushed-content":{marginLeft:B.pushedContentMarginLeft},variableValue:function(X,W){return{style:g({display:"inline-block",paddingRight:B.variableValuePaddingRight,position:"relative"},W)}},"object-name":{display:"inline-block",color:Z.keyColor,letterSpacing:B.keyLetterSpacing,fontStyle:B.keyFontStyle,verticalAlign:B.keyVerticalAlign,opacity:B.keyOpacity,":hover":{opacity:B.keyOpacityHover}},"array-key":{display:"inline-block",color:Z.arrayKeyColor,letterSpacing:B.keyLetterSpacing,fontStyle:B.keyFontStyle,verticalAlign:B.keyVerticalAlign,opacity:B.keyOpacity,":hover":{opacity:B.keyOpacityHover}},"object-size":{color:Z.objectSize,borderRadius:B.objectSizeBorderRadius,fontStyle:B.objectSizeFontStyle,margin:B.objectSizeMargin,cursor:"default"},"data-type-label":{fontSize:B.dataTypeFontSize,marginRight:B.dataTypeMarginRight,opacity:B.datatypeOpacity},boolean:{display:"inline-block",color:Z.dataTypes.boolean},date:{display:"inline-block",color:Z.dataTypes.date},"date-value":{marginLeft:B.dateValueMarginLeft},float:{display:"inline-block",color:Z.dataTypes.float},function:{display:"inline-block",color:Z.dataTypes.function,cursor:"pointer",whiteSpace:"pre-line"},"function-value":{fontStyle:"italic"},integer:{display:"inline-block",color:Z.dataTypes.integer},bigNumber:{display:"inline-block",color:Z.dataTypes.bigNumber},string:{display:"inline-block",color:Z.dataTypes.string},nan:{display:"inline-block",color:Z.dataTypes.nan,fontSize:B.nanFontSize,fontWeight:B.nanFontWeight,backgroundColor:Z.dataTypes.background,padding:B.nanPadding,borderRadius:B.nanBorderRadius},null:{display:"inline-block",color:Z.dataTypes.null,fontSize:B.nullFontSize,fontWeight:B.nullFontWeight,backgroundColor:Z.dataTypes.background,padding:B.nullPadding,borderRadius:B.nullBorderRadius},undefined:{display:"inline-block",color:Z.dataTypes.undefined,fontSize:B.undefinedFontSize,padding:B.undefinedPadding,borderRadius:B.undefinedBorderRadius,backgroundColor:Z.dataTypes.background},regexp:{display:"inline-block",color:Z.dataTypes.regexp},"copy-to-clipboard":{cursor:B.clipboardCursor},"copy-icon":{color:Z.copyToClipboard,fontSize:B.iconFontSize,marginRight:B.iconMarginRight,verticalAlign:"top"},"copy-icon-copied":{color:Z.copyToClipboardCheck,marginLeft:B.clipboardCheckMarginLeft},"array-group-meta-data":{display:"inline-block",padding:B.arrayGroupMetaPadding},"object-meta-data":{display:"inline-block",padding:B.metaDataPadding},"icon-container":{display:"inline-block",width:B.iconContainerWidth},tooltip:{padding:B.tooltipPadding},removeVarIcon:{verticalAlign:"top",display:"inline-block",color:Z.editVariable.removeIcon,cursor:B.iconCursor,fontSize:B.iconFontSize,marginRight:B.iconMarginRight},addVarIcon:{verticalAlign:"top",display:"inline-block",color:Z.editVariable.addIcon,cursor:B.iconCursor,fontSize:B.iconFontSize,marginRight:B.iconMarginRight},editVarIcon:{verticalAlign:"top",display:"inline-block",color:Z.editVariable.editIcon,cursor:B.iconCursor,fontSize:B.iconFontSize,marginRight:B.iconMarginRight},"edit-icon-container":{display:"inline-block",verticalAlign:"top"},"check-icon":{display:"inline-block",cursor:B.iconCursor,color:Z.editVariable.checkIcon,fontSize:B.iconFontSize,paddingRight:B.iconPaddingRight},"cancel-icon":{display:"inline-block",cursor:B.iconCursor,color:Z.editVariable.cancelIcon,fontSize:B.iconFontSize,paddingRight:B.iconPaddingRight},"edit-input":{display:"inline-block",minWidth:B.editInputMinWidth,borderRadius:B.editInputBorderRadius,backgroundColor:Z.editVariable.background,color:Z.editVariable.color,padding:B.editInputPadding,marginRight:B.editInputMarginRight,fontFamily:B.editInputFontFamily},"detected-row":{paddingTop:B.detectedRowPaddingTop},"key-modal-request":{position:B.addKeyCoverPosition,top:B.addKeyCoverPositionPx,left:B.addKeyCoverPositionPx,right:B.addKeyCoverPositionPx,bottom:B.addKeyCoverPositionPx,backgroundColor:B.addKeyCoverBackground},"key-modal":{width:B.addKeyModalWidth,backgroundColor:Z.addKeyModal.background,marginLeft:B.addKeyModalMargin,marginRight:B.addKeyModalMargin,padding:B.addKeyModalPadding,borderRadius:B.addKeyModalRadius,marginTop:"15px",position:"relative"},"key-modal-label":{color:Z.addKeyModal.labelColor,marginLeft:"2px",marginBottom:"5px",fontSize:"11px"},"key-modal-input-container":{overflow:"hidden"},"key-modal-input":{width:"100%",padding:"3px 6px",fontFamily:"monospace",color:Z.addKeyModal.color,border:"none",boxSizing:"border-box",borderRadius:"2px"},"key-modal-cancel":{backgroundColor:Z.editVariable.removeIcon,position:"absolute",top:"0px",right:"0px",borderRadius:"0px 3px 0px 3px",cursor:"pointer"},"key-modal-cancel-icon":{color:Z.addKeyModal.labelColor,fontSize:B.iconFontSize,transform:"rotate(45deg)"},"key-modal-submit":{color:Z.editVariable.addIcon,fontSize:B.iconFontSize,position:"absolute",right:"2px",top:"3px",cursor:"pointer"},"function-ellipsis":{display:"inline-block",color:Z.ellipsisColor,fontSize:B.ellipsisFontSize,lineHeight:B.ellipsisLineHeight,cursor:B.ellipsisCursor},"validation-failure":{float:"right",padding:"3px 6px",borderRadius:"2px",cursor:"pointer",color:Z.validationFailure.fontColor,backgroundColor:Z.validationFailure.background},"validation-failure-label":{marginRight:"6px"},"validation-failure-clear":{position:"relative",verticalAlign:"top",cursor:"pointer",color:Z.validationFailure.iconColor,fontSize:B.iconFontSize,transform:"rotate(45deg)"},comma:{display:"inline-block",color:B.commaColor,fontSize:B.commaFontSize,marginRight:B.commaMarginRight,cursor:"default"}}};function Ce(ne,Z,X){return ne||console.error("theme has not been set"),(function(W){var ge=ae;return W!==!1&&W!=="none"||(ge=K),$e(Ge,{defaultBase16:ge})(W)})(ne)(Z,X)}var Be=(function(ne){function Z(){return v(this,Z),S(this,Z,arguments)}return E(Z,ne),b(Z,[{key:"render",value:function(){var X=this.props,W=(X.rjvId,X.type_name),ge=X.displayDataTypes,Re=X.theme;return ge?C().createElement("span",Object.assign({className:"data-type-label"},Ce(Re,"data-type-label")),W):null}}])})(C().PureComponent),Fe=(function(ne){function Z(){return v(this,Z),S(this,Z,arguments)}return E(Z,ne),b(Z,[{key:"render",value:function(){var X=this.props;return C().createElement("div",Ce(X.theme,"boolean"),C().createElement(Be,Object.assign({type_name:"bool"},X)),X.value?"true":"false")}}])})(C().PureComponent),Je=(function(ne){function Z(){return v(this,Z),S(this,Z,arguments)}return E(Z,ne),b(Z,[{key:"render",value:function(){var X=this.props;return C().createElement("div",Ce(X.theme,"date"),C().createElement(Be,Object.assign({type_name:"date"},X)),C().createElement("span",Object.assign({className:"date-value"},Ce(X.theme,"date-value")),X.value.toLocaleTimeString("en-us",{weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})))}}])})(C().PureComponent),ke=(function(ne){function Z(){return v(this,Z),S(this,Z,arguments)}return E(Z,ne),b(Z,[{key:"render",value:function(){var X=this.props;return C().createElement("div",Ce(X.theme,"float"),C().createElement(Be,Object.assign({type_name:"float"},X)),this.props.value)}}])})(C().PureComponent);function Ue(ne){return(function(Z){if(Array.isArray(Z))return Y(Z)})(ne)||(function(Z){if(typeof Symbol<"u"&&Z[Symbol.iterator]!=null||Z["@@iterator"]!=null)return Array.from(Z)})(ne)||fe(ne)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
139
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}var Xe=l(9784),Mt=(function(){return b(function ne(){v(this,ne),this.handler=function(){}},[{key:"register",value:function(ne){this.handler=ne}},{key:"dispatch",value:function(ne){var Z;(Z=this.handler)===null||Z===void 0||Z.call(this,ne)}}])})();globalThis.__globalDispatcherInstance||(globalThis.__globalDispatcherInstance=new Mt);const Ae=globalThis.__globalDispatcherInstance;var xe=new((function(ne){function Z(){var X;v(this,Z);for(var W=arguments.length,ge=new Array(W),Re=0;Re<W;Re++)ge[Re]=arguments[Re];return(X=S(this,Z,[].concat(ge))).objects={},X.set=function(_e,ye,Me,Ie){X.objects[_e]===void 0&&(X.objects[_e]={}),X.objects[_e][ye]===void 0&&(X.objects[_e][ye]={}),X.objects[_e][ye][Me]=Ie},X.get=function(_e,ye,Me,Ie){return X.objects[_e]===void 0||X.objects[_e][ye]===void 0||X.objects[_e][ye][Me]==null?Ie:X.objects[_e][ye][Me]},X.handleAction=function(_e){var ye=_e.rjvId,Me=_e.data;switch(_e.name){case"RESET":X.emit("reset-"+ye);break;case"VARIABLE_UPDATED":_e.data.updated_src=X.updateSrc(ye,Me),X.set(ye,"action","variable-update",g(g({},Me),{},{type:"variable-edited"})),X.emit("variable-update-"+ye);break;case"VARIABLE_REMOVED":_e.data.updated_src=X.updateSrc(ye,Me),X.set(ye,"action","variable-update",g(g({},Me),{},{type:"variable-removed"})),X.emit("variable-update-"+ye);break;case"VARIABLE_ADDED":_e.data.updated_src=X.updateSrc(ye,Me),X.set(ye,"action","variable-update",g(g({},Me),{},{type:"variable-added"})),X.emit("variable-update-"+ye);break;case"ADD_VARIABLE_KEY_REQUEST":X.set(ye,"action","new-key-request",Me),X.emit("add-key-request-"+ye)}},X.updateSrc=function(_e,ye){var Me=ye.name,Ie=ye.namespace,Ye=ye.new_value,He=(ye.existing_value,ye.variable_removed);Ie.shift();var lt,We=X.get(_e,"global","src"),Bt=X.deepCopy(We,Ue(Ie)),hn=Bt,bt=(function(jt,Er){var An=typeof Symbol<"u"&&jt[Symbol.iterator]||jt["@@iterator"];if(!An){if(Array.isArray(jt)||(An=fe(jt))||Er){An&&(jt=An);var ar=0,Jr=function(){};return{s:Jr,n:function(){return ar>=jt.length?{done:!0}:{done:!1,value:jt[ar++]}},e:function(la){throw la},f:Jr}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
140
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ji,rs=!0,Ei=!1;return{s:function(){An=An.call(jt)},n:function(){var la=An.next();return rs=la.done,la},e:function(la){Ei=!0,ji=la},f:function(){try{rs||An.return==null||An.return()}finally{if(Ei)throw ji}}}})(Ie);try{for(bt.s();!(lt=bt.n()).done;)hn=hn[lt.value]}catch(jt){bt.e(jt)}finally{bt.f()}return He?F(hn)=="array"?hn.splice(Me,1):delete hn[Me]:Me!==null?hn[Me]=Ye:Bt=Ye,X.set(_e,"global","src",Bt),Bt},X.deepCopy=function(_e,ye){var Me,Ie=F(_e),Ye=ye.shift();return Ie=="array"?Me=Ue(_e):Ie=="object"&&(Me=g({},_e)),Ye!==void 0&&(Me[Ye]=X.deepCopy(_e[Ye],ye)),Me},X}return E(Z,ne),b(Z)})(Xe.EventEmitter));Ae.register(xe.handleAction.bind(xe));const Ne=xe;var Ke=(function(ne){function Z(X){var W;return v(this,Z),(W=S(this,Z,[X])).toggleCollapsed=function(){W.setState({collapsed:!W.state.collapsed},function(){Ne.set(W.props.rjvId,W.props.namespace,"collapsed",W.state.collapsed)})},W.getFunctionDisplay=function(ge){var Re=W.props;return ge?C().createElement("span",null,W.props.value.toString().slice(9,-1).replace(/\{[\s\S]+/,""),C().createElement("span",{className:"function-collapsed",style:{fontWeight:"bold"}},C().createElement("span",null,"{"),C().createElement("span",Ce(Re.theme,"ellipsis"),"..."),C().createElement("span",null,"}"))):W.props.value.toString().slice(9,-1)},W.state={collapsed:Ne.get(X.rjvId,X.namespace,"collapsed",!0)},W}return E(Z,ne),b(Z,[{key:"render",value:function(){var X=this.props,W=this.state.collapsed;return C().createElement("div",Ce(X.theme,"function"),C().createElement(Be,Object.assign({type_name:"function"},X)),C().createElement("span",Object.assign({},Ce(X.theme,"function-value"),{className:"rjv-function-container",onClick:this.toggleCollapsed}),this.getFunctionDisplay(W)))}}])})(C().PureComponent),vt=(function(ne){function Z(){return v(this,Z),S(this,Z,arguments)}return E(Z,ne),b(Z,[{key:"render",value:function(){return C().createElement("div",Ce(this.props.theme,"nan"),"NaN")}}])})(C().PureComponent),Xt=(function(ne){function Z(){return v(this,Z),S(this,Z,arguments)}return E(Z,ne),b(Z,[{key:"render",value:function(){return C().createElement("div",Ce(this.props.theme,"null"),"NULL")}}])})(C().PureComponent),Vt=(function(ne){function Z(){return v(this,Z),S(this,Z,arguments)}return E(Z,ne),b(Z,[{key:"render",value:function(){var X=this.props;return C().createElement("div",Ce(X.theme,"integer"),C().createElement(Be,Object.assign({type_name:"int"},X)),this.props.value)}}])})(C().PureComponent),wt=(function(ne){function Z(){return v(this,Z),S(this,Z,arguments)}return E(Z,ne),b(Z,[{key:"render",value:function(){var X=this.props;return C().createElement("div",Ce(X.theme,"regexp"),C().createElement(Be,Object.assign({type_name:"regexp"},X)),this.props.value.toString())}}])})(C().PureComponent),Ht=(function(ne){function Z(X){var W;return v(this,Z),(W=S(this,Z,[X])).toggleCollapsed=function(){W.setState({collapsed:!W.state.collapsed},function(){Ne.set(W.props.rjvId,W.props.namespace,"collapsed",W.state.collapsed)})},W.state={collapsed:Ne.get(X.rjvId,X.namespace,"collapsed",!0)},W}return E(Z,ne),b(Z,[{key:"render",value:function(){var X=this.state.collapsed,W=this.props,ge=W.collapseStringsAfterLength,Re=W.theme,_e=W.escapeStrings,ye=W.value,Me=F(ge)==="integer",Ie={style:{cursor:"default",wordBreak:"break-all"}};return _e&&(ye=re(ye)),Me&&ye.length>ge&&(Ie.style.cursor="pointer",X&&(ye=C().createElement("span",null,ye.substring(0,ge),C().createElement("span",Ce(Re,"ellipsis")," ...")))),C().createElement("div",Ce(Re,"string"),C().createElement(Be,Object.assign({type_name:"string"},W)),C().createElement("span",Object.assign({className:"string-value"},Ie,{onClick:this.toggleCollapsed}),'"',ye,'"'))}}])})(C().PureComponent),Rt=(function(ne){function Z(){return v(this,Z),S(this,Z,arguments)}return E(Z,ne),b(Z,[{key:"render",value:function(){return C().createElement("div",Ce(this.props.theme,"undefined"),"undefined")}}])})(C().PureComponent),Qt=(function(ne){function Z(){return v(this,Z),S(this,Z,arguments)}return E(Z,ne),b(Z,[{key:"render",value:function(){var X=this.props;return C().createElement("div",Ce(X.theme,"bigNumber"),C().createElement(Be,Object.assign({type_name:"bigNumber"},X)),this.props.value.toString())}}])})(C().PureComponent);function _n(){return _n=Object.assign?Object.assign.bind():function(ne){for(var Z=1;Z<arguments.length;Z++){var X=arguments[Z];for(var W in X)({}).hasOwnProperty.call(X,W)&&(ne[W]=X[W])}return ne},_n.apply(null,arguments)}var Gt=O.useLayoutEffect,Tn=function(ne,Z){typeof ne!="function"?ne.current=Z:ne(Z)},En={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},Pn=function(ne){Object.keys(En).forEach(function(Z){ne.style.setProperty(Z,En[Z],"important")})},Dt=null,xn=function(ne,Z){var X=ne.scrollHeight;return Z.sizingStyle.boxSizing==="border-box"?X+Z.borderSize:X-Z.paddingSize},Kt=function(){},sr=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],wr=!!document.documentElement.currentStyle,qr=function(ne){var Z=window.getComputedStyle(ne);if(Z===null)return null;var X,W=(X=Z,sr.reduce(function(Re,_e){return Re[_e]=X[_e],Re},{})),ge=W.boxSizing;return ge===""?null:(wr&&ge==="border-box"&&(W.width=parseFloat(W.width)+parseFloat(W.borderRightWidth)+parseFloat(W.borderLeftWidth)+parseFloat(W.paddingRight)+parseFloat(W.paddingLeft)+"px"),{sizingStyle:W,paddingSize:parseFloat(W.paddingBottom)+parseFloat(W.paddingTop),borderSize:parseFloat(W.borderBottomWidth)+parseFloat(W.borderTopWidth)})};function ft(ne,Z,X){var W,ge,Re=(W=X,ge=C().useRef(W),Gt(function(){ge.current=W}),ge);O.useLayoutEffect(function(){var _e=function(ye){return Re.current(ye)};if(ne)return ne.addEventListener(Z,_e),function(){return ne.removeEventListener(Z,_e)}},[])}var tn=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],Fn=function(ne,Z){var X=ne.cacheMeasurements,W=ne.maxRows,ge=ne.minRows,Re=ne.onChange,_e=Re===void 0?Kt:Re,ye=ne.onHeightChange,Me=ye===void 0?Kt:ye,Ie=L(ne,tn),Ye=Ie.value!==void 0,He=O.useRef(null),lt=(function(bt,jt){var Er=C().useRef();return C().useCallback(function(An){bt.current=An,Er.current&&Tn(Er.current,null),Er.current=jt,jt&&Tn(jt,An)},[jt])})(He,Z),We=O.useRef(0),Bt=O.useRef(),hn=function(){var bt=He.current,jt=X&&Bt.current?Bt.current:qr(bt);if(jt){Bt.current=jt;var Er=(function(Jr,ji,rs,Ei){rs===void 0&&(rs=1),Ei===void 0&&(Ei=1/0),Dt||((Dt=document.createElement("textarea")).setAttribute("tabindex","-1"),Dt.setAttribute("aria-hidden","true"),Pn(Dt)),Dt.parentNode===null&&document.body.appendChild(Dt);var la=Jr.paddingSize,Ec=Jr.borderSize,Ln=Jr.sizingStyle,Ia=Ln.boxSizing;Object.keys(Ln).forEach(function(Zl){var ro=Zl;Dt.style[ro]=Ln[ro]}),Pn(Dt),Dt.value=ji;var ki=xn(Dt,Jr);Dt.value=ji,ki=xn(Dt,Jr),Dt.value="x";var Di=Dt.scrollHeight-la,wf=Di*rs;Ia==="border-box"&&(wf=wf+la+Ec),ki=Math.max(wf,ki);var ws=Di*Ei;return Ia==="border-box"&&(ws=ws+la+Ec),[ki=Math.min(ws,ki),Di]})(jt,bt.value||bt.placeholder||"x",ge,W),An=Er[0],ar=Er[1];We.current!==An&&(We.current=An,bt.style.setProperty("height",An+"px","important"),Me(An,{rowHeight:ar}))}};return O.useLayoutEffect(hn),(function(bt,jt){ft(document.body,"reset",function(Er){bt.current.form===Er.target&&jt(Er)})})(He,function(){if(!Ye){var bt=He.current.value;requestAnimationFrame(function(){var jt=He.current;jt&&bt!==jt.value&&hn()})}}),ft(window,"resize",hn),(function(bt){ft(document.fonts,"loadingdone",bt)})(hn),O.createElement("textarea",_n({},Ie,{onChange:function(bt){Ye||hn(),_e(bt)},ref:lt}))},on=O.forwardRef(Fn);function Cn(ne,Z){ne=ne.trim();try{if((ne=structuredClone(ne))[0]==="[")return Ft("array",JSON.parse(ne));if(ne[0]==="{")return Ft("object",JSON.parse(ne));if(ne.match(/\-?\d+\.\d+/)&&ne.match(/\-?\d+\.\d+/)[0]===ne)return Z&&parseFloat(ne).toString()!==ne?Ft("bigNumber",ne):Ft("float",parseFloat(ne));if(ne.match(/\-?\d+e-\d+/)&&ne.match(/\-?\d+e-\d+/)[0]===ne)return Ft("float",Number(ne));if(ne.match(/\-?\d+/)&&ne.match(/\-?\d+/)[0]===ne)return Z&&parseInt(ne).toString()!==ne?Ft("bigNumber",ne):Ft("integer",parseInt(ne));if(ne.match(/\-?\d+e\+\d+/)&&ne.match(/\-?\d+e\+\d+/)[0]===ne)return Ft("integer",Number(ne))}catch{}switch(ne=ne.toLowerCase()){case"undefined":return Ft("undefined",void 0);case"nan":return Ft("nan",NaN);case"null":return Ft("null",null);case"true":return Ft("boolean",!0);case"false":return Ft("boolean",!1);default:if(ne=Date.parse(ne))return Ft("date",new Date(ne))}return Ft(!1,null)}function Ft(ne,Z){return{type:ne,value:Z}}var Vr=["style"],Pr=["style"],$a=["style"],nr=["style"],$t=["style"],sn=["style"],Ir=["style"],Ua=["style"],ts=["style"],yf=["style"],ml=["style"],fo=["style"],Bl=(function(ne){function Z(){return v(this,Z),S(this,Z,arguments)}return E(Z,ne),b(Z,[{key:"render",value:function(){var X=this.props,W=X.style,ge=V(X,Vr);return C().createElement("span",ge,C().createElement("svg",Object.assign({},Pa(W),{viewBox:"0 0 24 24",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),C().createElement("path",{d:"M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M7,13H17V11H7"})))}}])})(C().PureComponent),Oi=(function(ne){function Z(){return v(this,Z),S(this,Z,arguments)}return E(Z,ne),b(Z,[{key:"render",value:function(){var X=this.props,W=X.style,ge=V(X,Pr);return C().createElement("span",ge,C().createElement("svg",Object.assign({},Pa(W),{viewBox:"0 0 24 24",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),C().createElement("path",{d:"M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M13,7H11V11H7V13H11V17H13V13H17V11H13V7Z"})))}}])})(C().PureComponent),Ri=(function(ne){function Z(){return v(this,Z),S(this,Z,arguments)}return E(Z,ne),b(Z,[{key:"render",value:function(){var X=this.props,W=X.style,ge=V(X,$a),Re=Pa(W).style;return C().createElement("span",ge,C().createElement("svg",{fill:Re.color,width:Re.height,height:Re.width,style:Re,viewBox:"0 0 1792 1792"},C().createElement("path",{d:"M1344 800v64q0 14-9 23t-23 9h-832q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h832q14 0 23 9t9 23zm128 448v-832q0-66-47-113t-113-47h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113zm128-832v832q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q119 0 203.5 84.5t84.5 203.5z"})))}}])})(C().PureComponent),ho=(function(ne){function Z(){return v(this,Z),S(this,Z,arguments)}return E(Z,ne),b(Z,[{key:"render",value:function(){var X=this.props,W=X.style,ge=V(X,nr),Re=Pa(W).style;return C().createElement("span",ge,C().createElement("svg",{fill:Re.color,width:Re.height,height:Re.width,style:Re,viewBox:"0 0 1792 1792"},C().createElement("path",{d:"M1344 800v64q0 14-9 23t-23 9h-352v352q0 14-9 23t-23 9h-64q-14 0-23-9t-9-23v-352h-352q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h352v-352q0-14 9-23t23-9h64q14 0 23 9t9 23v352h352q14 0 23 9t9 23zm128 448v-832q0-66-47-113t-113-47h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113zm128-832v832q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q119 0 203.5 84.5t84.5 203.5z"})))}}])})(C().PureComponent),Ai=(function(ne){function Z(){return v(this,Z),S(this,Z,arguments)}return E(Z,ne),b(Z,[{key:"render",value:function(){var X=this.props,W=X.style,ge=V(X,$t);return C().createElement("span",ge,C().createElement("svg",{style:g(g({},Pa(W).style),{},{paddingLeft:"2px",verticalAlign:"top"}),viewBox:"0 0 15 15",fill:"currentColor"},C().createElement("path",{d:"M0 14l6-6-6-6z"})))}}])})(C().PureComponent),yn=(function(ne){function Z(){return v(this,Z),S(this,Z,arguments)}return E(Z,ne),b(Z,[{key:"render",value:function(){var X=this.props,W=X.style,ge=V(X,sn);return C().createElement("span",ge,C().createElement("svg",{style:g(g({},Pa(W).style),{},{paddingLeft:"2px",verticalAlign:"top"}),viewBox:"0 0 15 15",fill:"currentColor"},C().createElement("path",{d:"M0 5l6 6 6-6z"})))}}])})(C().PureComponent),Sc=(function(ne){function Z(){return v(this,Z),S(this,Z,arguments)}return E(Z,ne),b(Z,[{key:"render",value:function(){var X=this.props,W=X.style,ge=V(X,Ir);return C().createElement("span",ge,C().createElement("svg",Object.assign({},Pa(W),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),C().createElement("g",null,C().createElement("path",{d:"m30 35h-25v-22.5h25v7.5h2.5v-12.5c0-1.4-1.1-2.5-2.5-2.5h-7.5c0-2.8-2.2-5-5-5s-5 2.2-5 5h-7.5c-1.4 0-2.5 1.1-2.5 2.5v27.5c0 1.4 1.1 2.5 2.5 2.5h25c1.4 0 2.5-1.1 2.5-2.5v-5h-2.5v5z m-20-27.5h2.5s2.5-1.1 2.5-2.5 1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5 1.3 2.5 2.5 2.5h2.5s2.5 1.1 2.5 2.5h-20c0-1.5 1.1-2.5 2.5-2.5z m-2.5 20h5v-2.5h-5v2.5z m17.5-5v-5l-10 7.5 10 7.5v-5h12.5v-5h-12.5z m-17.5 10h7.5v-2.5h-7.5v2.5z m12.5-17.5h-12.5v2.5h12.5v-2.5z m-7.5 5h-5v2.5h5v-2.5z"}))))}}])})(C().PureComponent),Hl=(function(ne){function Z(){return v(this,Z),S(this,Z,arguments)}return E(Z,ne),b(Z,[{key:"render",value:function(){var X=this.props,W=X.style,ge=V(X,Ua);return C().createElement("span",ge,C().createElement("svg",Object.assign({},Pa(W),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),C().createElement("g",null,C().createElement("path",{d:"m28.6 25q0-0.5-0.4-1l-4-4 4-4q0.4-0.5 0.4-1 0-0.6-0.4-1.1l-2-2q-0.4-0.4-1-0.4-0.6 0-1 0.4l-4.1 4.1-4-4.1q-0.4-0.4-1-0.4-0.6 0-1 0.4l-2 2q-0.5 0.5-0.5 1.1 0 0.5 0.5 1l4 4-4 4q-0.5 0.5-0.5 1 0 0.7 0.5 1.1l2 2q0.4 0.4 1 0.4 0.6 0 1-0.4l4-4.1 4.1 4.1q0.4 0.4 1 0.4 0.6 0 1-0.4l2-2q0.4-0.4 0.4-1z m8.7-5q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z"}))))}}])})(C().PureComponent),qa=(function(ne){function Z(){return v(this,Z),S(this,Z,arguments)}return E(Z,ne),b(Z,[{key:"render",value:function(){var X=this.props,W=X.style,ge=V(X,ts);return C().createElement("span",ge,C().createElement("svg",Object.assign({},Pa(W),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),C().createElement("g",null,C().createElement("path",{d:"m30.1 21.4v-2.8q0-0.6-0.4-1t-1-0.5h-5.7v-5.7q0-0.6-0.4-1t-1-0.4h-2.9q-0.6 0-1 0.4t-0.4 1v5.7h-5.7q-0.6 0-1 0.5t-0.5 1v2.8q0 0.6 0.5 1t1 0.5h5.7v5.7q0 0.5 0.4 1t1 0.4h2.9q0.6 0 1-0.4t0.4-1v-5.7h5.7q0.6 0 1-0.5t0.4-1z m7.2-1.4q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z"}))))}}])})(C().PureComponent),wi=(function(ne){function Z(){return v(this,Z),S(this,Z,arguments)}return E(Z,ne),b(Z,[{key:"render",value:function(){var X=this.props,W=X.style,ge=V(X,yf);return C().createElement("span",ge,C().createElement("svg",Object.assign({},Pa(W),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),C().createElement("g",null,C().createElement("path",{d:"m31.6 21.6h-10v10h-3.2v-10h-10v-3.2h10v-10h3.2v10h10v3.2z"}))))}}])})(C().PureComponent),Hm=(function(ne){function Z(){return v(this,Z),S(this,Z,arguments)}return E(Z,ne),b(Z,[{key:"render",value:function(){var X=this.props,W=X.style,ge=V(X,ml);return C().createElement("span",ge,C().createElement("svg",Object.assign({},Pa(W),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),C().createElement("g",null,C().createElement("path",{d:"m19.8 26.4l2.6-2.6-3.4-3.4-2.6 2.6v1.3h2.2v2.1h1.2z m9.8-16q-0.3-0.4-0.7 0l-7.8 7.8q-0.4 0.4 0 0.7t0.7 0l7.8-7.8q0.4-0.4 0-0.7z m1.8 13.2v4.3q0 2.6-1.9 4.5t-4.5 1.9h-18.6q-2.6 0-4.5-1.9t-1.9-4.5v-18.6q0-2.7 1.9-4.6t4.5-1.8h18.6q1.4 0 2.6 0.5 0.3 0.2 0.4 0.5 0.1 0.4-0.2 0.7l-1.1 1.1q-0.3 0.3-0.7 0.1-0.5-0.1-1-0.1h-18.6q-1.4 0-2.5 1.1t-1 2.5v18.6q0 1.4 1 2.5t2.5 1h18.6q1.5 0 2.5-1t1.1-2.5v-2.9q0-0.2 0.2-0.4l1.4-1.5q0.3-0.3 0.8-0.1t0.4 0.6z m-2.1-16.5l6.4 6.5-15 15h-6.4v-6.5z m9.9 3l-2.1 2-6.4-6.4 2.1-2q0.6-0.7 1.5-0.7t1.5 0.7l3.4 3.4q0.6 0.6 0.6 1.5t-0.6 1.5z"}))))}}])})(C().PureComponent),Gl=(function(ne){function Z(){return v(this,Z),S(this,Z,arguments)}return E(Z,ne),b(Z,[{key:"render",value:function(){var X=this.props,W=X.style,ge=V(X,fo);return C().createElement("span",ge,C().createElement("svg",Object.assign({},Pa(W),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),C().createElement("g",null,C().createElement("path",{d:"m31.7 16.4q0-0.6-0.4-1l-2.1-2.1q-0.4-0.4-1-0.4t-1 0.4l-9.1 9.1-5-5q-0.5-0.4-1-0.4t-1 0.4l-2.1 2q-0.4 0.4-0.4 1 0 0.6 0.4 1l8.1 8.1q0.4 0.4 1 0.4 0.6 0 1-0.4l12.2-12.1q0.4-0.4 0.4-1z m5.6 3.6q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z"}))))}}])})(C().PureComponent);function Pa(ne){return ne||(ne={}),{style:g(g({verticalAlign:"middle"},ne),{},{color:ne.color?ne.color:"#000000",height:"1em",width:"1em"})}}var fp=(function(ne){function Z(X){var W;return v(this,Z),(W=S(this,Z,[X])).copiedTimer=null,W.copyToClipboardFallback=function(ge){var Re=document.createElement("textarea");Re.value=ge,document.body.appendChild(Re),Re.select(),document.execCommand("copy"),document.body.removeChild(Re)},W.handleCopy=function(){var ge=W.props,Re=ge.clickCallback,_e=ge.src,ye=ge.namespace,Me=JSON.stringify(W.clipboardValue(_e),null," ");navigator.clipboard?navigator.clipboard.writeText(Me).catch(function(){W.copyToClipboardFallback(Me)}):W.copyToClipboardFallback(Me),W.copiedTimer=setTimeout(function(){W.setState({copied:!1})},5500),W.setState({copied:!0},function(){typeof Re=="function"&&Re({src:_e,namespace:ye,name:ye[ye.length-1]})})},W.getClippyIcon=function(){var ge=W.props.theme;return W.state.copied?C().createElement("span",null,C().createElement(Sc,Object.assign({className:"copy-icon"},Ce(ge,"copy-icon"))),C().createElement("span",Ce(ge,"copy-icon-copied"),"✔")):C().createElement(Sc,Object.assign({className:"copy-icon"},Ce(ge,"copy-icon")))},W.clipboardValue=function(ge){switch(F(ge)){case"function":case"regexp":return ge.toString();default:return ge}},W.state={copied:!1},W}return E(Z,ne),b(Z,[{key:"componentWillUnmount",value:function(){this.copiedTimer&&(clearTimeout(this.copiedTimer),this.copiedTimer=null)}},{key:"render",value:function(){var X=this.props,W=(X.src,X.theme),ge=X.hidden,Re=X.rowHovered,_e=Ce(W,"copy-to-clipboard").style,ye="inline";return ge&&(ye="none"),C().createElement("span",{className:"copy-to-clipboard-container",title:"Copy to clipboard",style:{verticalAlign:"top",display:Re?"inline-block":"none"}},C().createElement("span",{style:g(g({},_e),{},{display:ye}),onClick:this.handleCopy},this.getClippyIcon()))}}])})(C().PureComponent);const Ss=(function(ne){function Z(X){var W;return v(this,Z),(W=S(this,Z,[X])).getEditIcon=function(){var ge=W.props,Re=ge.variable,_e=ge.theme;return C().createElement("div",{className:"click-to-edit",style:{verticalAlign:"top",display:W.state.hovered?"inline-block":"none"}},C().createElement(Hm,Object.assign({className:"click-to-edit-icon"},Ce(_e,"editVarIcon"),{onClick:function(){W.prepopInput(Re)}})))},W.prepopInput=function(ge){if(W.props.onEdit!==!1){var Re=(function(ye,Me){var Ie;switch(F(ye,Me)){case"undefined":Ie="undefined";break;case"nan":Ie="NaN";break;case"string":Ie=ye;break;case"bigNumber":case"date":case"function":case"regexp":Ie=ye.toString();break;default:try{Ie=JSON.stringify(ye,null," ")}catch{Ie=""}}return Ie})(ge.value,W.props.bigNumber),_e=Cn(Re,W.props.bigNumber);W.setState({editMode:!0,editValue:Re,parsedInput:{type:_e.type,value:_e.value}})}},W.getRemoveIcon=function(){var ge=W.props,Re=ge.variable,_e=ge.namespace,ye=ge.theme,Me=ge.rjvId;return C().createElement("div",{className:"click-to-remove",style:{verticalAlign:"top",display:W.state.hovered?"inline-block":"none"}},C().createElement(Hl,Object.assign({className:"click-to-remove-icon"},Ce(ye,"removeVarIcon"),{onClick:function(){Ae.dispatch({name:"VARIABLE_REMOVED",rjvId:Me,data:{name:Re.name,namespace:_e,existing_value:Re.value,variable_removed:!0}})}})))},W.getValue=function(ge,Re){var _e=!Re&&ge.type,ye=W.props;switch(_e){case!1:return W.getEditInput();case"string":return C().createElement(Ht,Object.assign({value:ge.value},ye));case"integer":return C().createElement(Vt,Object.assign({value:ge.value},ye));case"float":return C().createElement(ke,Object.assign({value:ge.value},ye));case"boolean":return C().createElement(Fe,Object.assign({value:ge.value},ye));case"function":return C().createElement(Ke,Object.assign({value:ge.value},ye));case"null":return C().createElement(Xt,ye);case"nan":return C().createElement(vt,ye);case"undefined":return C().createElement(Rt,ye);case"date":return C().createElement(Je,Object.assign({value:ge.value},ye));case"regexp":return C().createElement(wt,Object.assign({value:ge.value},ye));case"bigNumber":return C().createElement(Qt,Object.assign({value:ge.value},ye));default:return C().createElement("div",{className:"object-value"},JSON.stringify(ge.value))}},W.getEditInput=function(){var ge=W.props,Re=ge.keyModifier,_e=ge.selectOnFocus,ye=ge.theme,Me=W.state.editValue;return C().createElement("div",null,C().createElement(on,Object.assign({type:"text",ref:function(Ie){Ie&&Ie[_e?"select":"focus"]()},value:Me,className:"variable-editor",onChange:function(Ie){var Ye=Ie.target.value,He=Cn(Ye,W.props.bigNumber);W.setState({editValue:Ye,parsedInput:{type:He.type,value:He.value}})},onKeyDown:function(Ie){switch(Ie.key){case"Escape":W.setState({editMode:!1,editValue:""});break;case"Enter":Re(Ie,"submit")&&W.submitEdit(!0)}Ie.stopPropagation()},placeholder:"update this value",minRows:2},Ce(ye,"edit-input"))),C().createElement("div",Ce(ye,"edit-icon-container"),C().createElement(Hl,Object.assign({className:"edit-cancel"},Ce(ye,"cancel-icon"),{onClick:function(Ie){Ie&&Ie.stopPropagation(),W.setState({editMode:!1,editValue:""})}})),C().createElement(Gl,Object.assign({className:"edit-check string-value"},Ce(ye,"check-icon"),{onClick:function(Ie){Ie&&Ie.stopPropagation(),W.submitEdit()}})),C().createElement("div",null,W.showDetected())))},W.submitEdit=function(ge){var Re=W.props,_e=Re.variable,ye=Re.namespace,Me=Re.rjvId,Ie=Re.bigNumber,Ye=W.state,He=Ye.editValue,lt=Ye.parsedInput,We=He;ge&&lt.type&&(We=lt.value,Ie&&lt.type==="bigNumber"&&(We=new Ie(We))),W.setState({editMode:!1}),Ae.dispatch({name:"VARIABLE_UPDATED",rjvId:Me,data:{name:_e.name,namespace:ye,existing_value:_e.value,new_value:We,variable_removed:!1}})},W.showDetected=function(){var ge=W.props,Re=ge.theme,_e=(ge.variable,ge.namespace,ge.rjvId,W.state.parsedInput),ye=(_e.type,_e.value,W.getDetectedInput());if(ye)return C().createElement("div",null,C().createElement("div",Ce(Re,"detected-row"),ye,C().createElement(Gl,{className:"edit-check detected",style:g({verticalAlign:"top",paddingLeft:"3px"},Ce(Re,"check-icon").style),onClick:function(Me){Me&&Me.stopPropagation(),W.submitEdit(!0)}})))},W.getDetectedInput=function(){var ge=W.state.parsedInput,Re=ge.type,_e=ge.value,ye=W.props,Me=ye.theme;if(Re!==!1)switch(Re.toLowerCase()){case"object":return C().createElement("span",null,C().createElement("span",{style:g(g({},Ce(Me,"brace").style),{},{cursor:"default"})},"{"),C().createElement("span",{style:g(g({},Ce(Me,"ellipsis").style),{},{cursor:"default"})},"..."),C().createElement("span",{style:g(g({},Ce(Me,"brace").style),{},{cursor:"default"})},"}"));case"array":return C().createElement("span",null,C().createElement("span",{style:g(g({},Ce(Me,"brace").style),{},{cursor:"default"})},"["),C().createElement("span",{style:g(g({},Ce(Me,"ellipsis").style),{},{cursor:"default"})},"..."),C().createElement("span",{style:g(g({},Ce(Me,"brace").style),{},{cursor:"default"})},"]"));case"string":return C().createElement(Ht,Object.assign({value:_e},ye));case"integer":return C().createElement(Vt,Object.assign({value:_e},ye));case"float":return C().createElement(ke,Object.assign({value:_e},ye));case"boolean":return C().createElement(Fe,Object.assign({value:_e},ye));case"function":return C().createElement(Ke,Object.assign({value:_e},ye));case"null":return C().createElement(Xt,ye);case"nan":return C().createElement(vt,ye);case"undefined":return C().createElement(Rt,ye);case"date":return C().createElement(Je,Object.assign({value:new Date(_e)},ye));case"bignumber":return C().createElement(Qt,Object.assign({value:_e},ye))}},W.state={editMode:!1,editValue:"",hovered:!1,renameKey:!1,parsedInput:{type:!1,value:null}},W}return E(Z,ne),b(Z,[{key:"render",value:function(){var X=this,W=this.props,ge=W.variable,Re=W.singleIndent,_e=W.type,ye=W.theme,Me=W.namespace,Ie=W.indentWidth,Ye=W.enableClipboard,He=W.onEdit,lt=W.onDelete,We=W.onSelect,Bt=W.displayArrayKey,hn=W.quotesOnKeys,bt=W.keyModifier,jt=W.showComma,Er=W.isLast,An=this.state.editMode;return C().createElement("div",Object.assign({},Ce(ye,"objectKeyVal",{paddingLeft:Ie*Re}),{onMouseEnter:function(){return X.setState(g(g({},X.state),{},{hovered:!0}))},onMouseLeave:function(){return X.setState(g(g({},X.state),{},{hovered:!1}))},className:"variable-row",key:ge.name}),_e=="array"?Bt?C().createElement("span",Object.assign({},Ce(ye,"array-key"),{key:ge.name+"_"+Me}),ge.name,C().createElement("div",Ce(ye,"colon"),":")):null:C().createElement("span",null,C().createElement("span",Object.assign({},Ce(ye,"object-name"),{className:"object-key",key:ge.name+"_"+Me}),!!hn&&C().createElement("span",{style:{verticalAlign:"top"}},'"'),C().createElement("span",{style:{display:"inline-block"}},re(ge.name)),!!hn&&C().createElement("span",{style:{verticalAlign:"top"}},'"')),C().createElement("span",Ce(ye,"colon"),":")),C().createElement("div",Object.assign({className:"variable-value",onClick:We===!1&&He===!1?null:function(ar){var Jr=Ue(Me);bt(ar,"edit")&&He!==!1?X.prepopInput(ge):We!==!1&&(Jr.shift(),We(g(g({},ge),{},{namespace:Jr})))}},Ce(ye,"variableValue",{cursor:We===!1?"default":"pointer"})),this.getValue(ge,An)),jt&&!Er&&C().createElement("span",Ce(ye,"comma"),","),Ye?C().createElement(fp,{rowHovered:this.state.hovered,hidden:An,src:ge.value,clickCallback:Ye,theme:ye,namespace:[].concat(Ue(Me),[ge.name])}):null,He!==!1&&An==0?this.getEditIcon():null,lt!==!1&&An==0?this.getRemoveIcon():null)}}])})(C().PureComponent);var ns=(function(ne){function Z(){var X;v(this,Z);for(var W=arguments.length,ge=new Array(W),Re=0;Re<W;Re++)ge[Re]=arguments[Re];return(X=S(this,Z,[].concat(ge))).getObjectSize=function(){var _e=X.props,ye=_e.size,Me=_e.theme;if(_e.displayObjectSize)return C().createElement("span",Object.assign({className:"object-size"},Ce(Me,"object-size")),ye," item",ye===1?"":"s")},X.getAddAttribute=function(_e){var ye=X.props,Me=ye.theme,Ie=ye.namespace,Ye=ye.name,He=ye.src,lt=ye.rjvId,We=ye.depth;return C().createElement("span",{className:"click-to-add",style:{verticalAlign:"top",display:_e?"inline-block":"none"}},C().createElement(qa,Object.assign({className:"click-to-add-icon"},Ce(Me,"addVarIcon"),{onClick:function(){var Bt={name:We>0?Ye:null,namespace:Ie.splice(0,Ie.length-1),existing_value:He,variable_removed:!1,key_name:null};F(He)==="object"?Ae.dispatch({name:"ADD_VARIABLE_KEY_REQUEST",rjvId:lt,data:Bt}):Ae.dispatch({name:"VARIABLE_ADDED",rjvId:lt,data:g(g({},Bt),{},{new_value:[].concat(Ue(He),[null])})})}})))},X.getRemoveObject=function(_e){var ye=X.props,Me=ye.theme,Ie=(ye.hover,ye.namespace),Ye=ye.name,He=ye.src,lt=ye.rjvId;if(Ie.length!==1)return C().createElement("span",{className:"click-to-remove",style:{display:_e?"inline-block":"none"}},C().createElement(Hl,Object.assign({className:"click-to-remove-icon"},Ce(Me,"removeVarIcon"),{onClick:function(){Ae.dispatch({name:"VARIABLE_REMOVED",rjvId:lt,data:{name:Ye,namespace:Ie.splice(0,Ie.length-1),existing_value:He,variable_removed:!0}})}})))},X.render=function(){var _e=X.props,ye=_e.theme,Me=_e.onDelete,Ie=_e.onAdd,Ye=_e.enableClipboard,He=_e.src,lt=_e.namespace,We=_e.rowHovered;return C().createElement("div",Object.assign({},Ce(ye,"object-meta-data"),{className:"object-meta-data",onClick:function(Bt){Bt.stopPropagation()}}),X.getObjectSize(),Ye?C().createElement(fp,{rowHovered:We,clickCallback:Ye,src:He,theme:ye,namespace:lt}):null,Ie!==!1?X.getAddAttribute(We):null,Me!==!1?X.getRemoveObject(We):null)},X}return E(Z,ne),b(Z)})(C().PureComponent);function Wr(ne){var Z=ne.parent_type,X=ne.namespace,W=ne.quotesOnKeys,ge=ne.theme,Re=ne.jsvRoot,_e=ne.name,ye=ne.displayArrayKey,Me=ne.name?ne.name:"";return!Re||_e!==!1&&_e!==null?Z=="array"?ye?C().createElement("span",Object.assign({},Ce(ge,"array-key"),{key:X}),C().createElement("span",{className:"array-key"},Me),C().createElement("span",Ce(ge,"colon"),":")):C().createElement("span",null):C().createElement("span",Object.assign({},Ce(ge,"object-name"),{key:X}),C().createElement("span",{className:"object-key"},W&&C().createElement("span",{style:{verticalAlign:"top"}},'"'),C().createElement("span",null,Me),W&&C().createElement("span",{style:{verticalAlign:"top"}},'"')),C().createElement("span",Ce(ge,"colon"),":")):C().createElement("span",null)}function rr(ne){var Z=ne.theme;switch(ne.iconStyle){case"triangle":return C().createElement(yn,Object.assign({},Ce(Z,"expanded-icon"),{className:"expanded-icon"}));case"square":return C().createElement(Ri,Object.assign({},Ce(Z,"expanded-icon"),{className:"expanded-icon"}));default:return C().createElement(Bl,Object.assign({},Ce(Z,"expanded-icon"),{className:"expanded-icon"}))}}function wc(ne){var Z=ne.theme;switch(ne.iconStyle){case"triangle":return C().createElement(Ai,Object.assign({},Ce(Z,"collapsed-icon"),{className:"collapsed-icon"}));case"square":return C().createElement(ho,Object.assign({},Ce(Z,"collapsed-icon"),{className:"collapsed-icon"}));default:return C().createElement(Oi,Object.assign({},Ce(Z,"collapsed-icon"),{className:"collapsed-icon"}))}}var Gm=["src","groupArraysAfterLength","depth","name","theme","jsvRoot","namespace","parent_type"],gl=(function(ne){function Z(X){var W;return v(this,Z),(W=S(this,Z,[X])).toggleCollapsed=function(ge){for(var Re=W.state.expanded,_e=[],ye=Math.max(Re.length||0,ge+1),Me=0;Me<ye;Me++)_e[Me]=Re[Me]===!0;_e[ge]=!_e[ge],W.setState({expanded:_e})},W.state={expanded:[]},W}return E(Z,ne),b(Z,[{key:"getExpandedIcon",value:function(X){var W=this.props,ge=W.theme,Re=W.iconStyle;return this.state.expanded[X]?C().createElement(rr,{theme:ge,iconStyle:Re}):C().createElement(wc,{theme:ge,iconStyle:Re})}},{key:"render",value:function(){var X=this,W=this.props,ge=W.src,Re=W.groupArraysAfterLength,_e=(W.depth,W.name),ye=W.theme,Me=W.jsvRoot,Ie=W.namespace,Ye=(W.parent_type,V(W,Gm)),He=0,lt=5*this.props.indentWidth;Me||(He=5*this.props.indentWidth);var We=Re,Bt=Math.ceil(ge.length/We);return C().createElement("div",Object.assign({className:"object-key-val"},Ce(ye,Me?"jsv-root":"objectKeyVal",{paddingLeft:He})),C().createElement(Wr,this.props),C().createElement("span",null,C().createElement(ns,Object.assign({size:ge.length},this.props))),Ue(Array(Bt)).map(function(hn,bt){return C().createElement("div",Object.assign({key:bt,className:"object-key-val array-group"},Ce(ye,"objectKeyVal",{marginLeft:6,paddingLeft:lt})),C().createElement("span",Ce(ye,"brace-row"),C().createElement("div",Object.assign({className:"icon-container"},Ce(ye,"icon-container"),{onClick:function(jt){X.toggleCollapsed(bt)}}),X.getExpandedIcon(bt)),X.state.expanded[bt]?C().createElement(Bn,Object.assign({key:_e+bt,depth:0,name:!1,collapsed:!1,groupArraysAfterLength:We,index_offset:bt*We,src:ge.slice(bt*We,bt*We+We),namespace:Ie,type:"array",parent_type:"array_group",theme:ye,showComma:X.props.showComma,isLast:bt===Bt-1},Ye)):C().createElement("span",Object.assign({},Ce(ye,"brace"),{onClick:function(jt){X.toggleCollapsed(bt)},className:"array-group-brace"}),"[",C().createElement("div",Object.assign({},Ce(ye,"array-group-meta-data"),{className:"array-group-meta-data"}),C().createElement("span",Object.assign({className:"object-size"},Ce(ye,"object-size")),bt*We," - ",bt*We+We>ge.length?ge.length:bt*We+We)),"]")))}))}}])})(C().PureComponent),vf=["depth","src","namespace","name","type","parent_type","theme","jsvRoot","iconStyle","showComma","isLast"],po=(function(ne){function Z(X){var W;v(this,Z),(W=S(this,Z,[X])).toggleCollapsed=function(){W.setState({expanded:!W.state.expanded},function(){Ne.set(W.props.rjvId,W.props.namespace,"expanded",W.state.expanded)})},W.getObjectContent=function(Re,_e,ye){return C().createElement("div",{className:"pushed-content object-container"},C().createElement("div",Object.assign({className:"object-content"},Ce(W.props.theme,"pushed-content")),W.renderObjectContents(_e,ye)))},W.getEllipsis=function(){return W.state.size===0?null:C().createElement("div",Object.assign({},Ce(W.props.theme,"ellipsis"),{className:"node-ellipsis",onClick:W.toggleCollapsed}),"...")},W.getObjectMetaData=function(Re){var _e=W.props,ye=(_e.rjvId,_e.theme,W.state),Me=ye.size,Ie=ye.hovered;return C().createElement(ns,Object.assign({rowHovered:Ie,size:Me},W.props))},W.renderObjectContents=function(Re,_e){var ye,Me=W.props,Ie=Me.depth,Ye=Me.parent_type,He=Me.index_offset,lt=Me.groupArraysAfterLength,We=Me.namespace,Bt=Me.showComma,hn=W.state.object_type,bt=[],jt=Object.keys(Re||{});return W.props.sortKeys&&hn!=="array"&&(jt=jt.sort()),jt.forEach(function(Er,An){ye=new Km(Er,Re[Er],_e.bigNumber);var ar=An===jt.length-1;if(Ye==="array_group"&&He&&(ye.name=parseInt(ye.name)+He),Object.prototype.hasOwnProperty.call(Re,Er))if(ye.type==="object")bt.push(C().createElement(Bn,Object.assign({key:ye.name,depth:Ie+1,name:ye.name,src:ye.value,namespace:We.concat(ye.name),parent_type:hn,isLast:ar,showComma:Bt},_e)));else if(ye.type==="array"){var Jr=Bn;lt&&ye.value.length>lt&&(Jr=gl),bt.push(C().createElement(Jr,Object.assign({key:ye.name,depth:Ie+1,name:ye.name,src:ye.value,namespace:We.concat(ye.name),type:"array",parent_type:hn,isLast:ar,showComma:Bt},_e)))}else bt.push(C().createElement(Ss,Object.assign({key:ye.name+"_"+We,variable:ye,singleIndent:5,namespace:We,type:W.props.type,isLast:ar,showComma:Bt},_e)))}),bt};var ge=Z.getState(X);return W.state=g(g({},ge),{},{prevProps:{}}),W}return E(Z,ne),b(Z,[{key:"getBraceStart",value:function(X,W){var ge=this,Re=this.props,_e=(Re.src,Re.theme),ye=Re.iconStyle;if(Re.parent_type==="array_group")return C().createElement("span",null,C().createElement("span",Ce(_e,"brace"),X==="array"?"[":"{"));var Me=W?rr:wc;return C().createElement("span",null,C().createElement("span",Object.assign({onClick:function(Ie){ge.toggleCollapsed()}},Ce(_e,"brace-row")),C().createElement("div",Object.assign({className:"icon-container"},Ce(_e,"icon-container")),C().createElement(Me,{theme:_e,iconStyle:ye})),C().createElement(Wr,this.props),C().createElement("span",Ce(_e,"brace"),X==="array"?"[":"{")))}},{key:"render",value:function(){var X=this,W=this.props,ge=W.depth,Re=W.src,_e=(W.namespace,W.name,W.type,W.parent_type),ye=W.theme,Me=W.jsvRoot,Ie=W.iconStyle,Ye=W.showComma,He=W.isLast,lt=V(W,vf),We=this.state,Bt=We.object_type,hn=We.expanded,bt={};return Me||_e==="array_group"?_e==="array_group"&&(bt.borderLeft=0,bt.display="inline"):bt.paddingLeft=5*this.props.indentWidth,C().createElement("div",Object.assign({className:"object-key-val",onMouseEnter:function(){return X.setState(g(g({},X.state),{},{hovered:!0}))},onMouseLeave:function(){return X.setState(g(g({},X.state),{},{hovered:!1}))}},Ce(ye,Me?"jsv-root":"objectKeyVal",bt)),this.getBraceStart(Bt,hn),hn?this.getObjectContent(ge,Re,g({theme:ye,iconStyle:Ie},lt)):this.getEllipsis(),C().createElement("span",{className:"brace-row"},C().createElement("span",{style:g(g({},Ce(ye,"brace").style),{},{paddingLeft:hn?"3px":"0px"})},Bt==="array"?"]":"}")),Ye&&!He&&!Me&&C().createElement("span",Ce(ye,"comma"),","),this.getObjectMetaData(Re))}}],[{key:"getDerivedStateFromProps",value:function(X,W){var ge=W.prevProps;return X.src!==ge.src||X.collapsed!==ge.collapsed||X.name!==ge.name||X.namespace!==ge.namespace||X.rjvId!==ge.rjvId?g(g({},Z.getState(X)),{},{prevProps:X}):null}}])})(C().PureComponent);po.getState=function(ne){var Z=Object.keys(ne.src).length,X=(ne.collapsed===!1||ne.collapsed!==!0&&ne.collapsed>ne.depth)&&(!ne.shouldCollapse||ne.shouldCollapse({name:ne.name,src:ne.src,type:F(ne.src),namespace:ne.namespace})===!1)&&Z!==0;return{expanded:Ne.get(ne.rjvId,ne.namespace,"expanded",X),object_type:ne.type==="array"?"array":"object",parent_type:ne.type==="array"?"array":"object",size:Z,hovered:!1}};var Km=b(function ne(Z,X,W){v(this,ne),this.name=Z,this.value=X,this.type=F(X,W)});q(po);const Bn=po;var Kl=(function(ne){function Z(){var X;v(this,Z);for(var W=arguments.length,ge=new Array(W),Re=0;Re<W;Re++)ge[Re]=arguments[Re];return(X=S(this,Z,[].concat(ge))).render=function(){var _e,ye,Me,Ie,Ye=X.props,He=[Ye.name],lt=Bn;return typeof Ye.name!="object"||Array.isArray(Ye.name)||(He=[((_e=Ye.name)===null||_e===void 0?void 0:_e.displayName)||((ye=Ye.name)===null||ye===void 0?void 0:ye.name)||((Me=Ye.name)===null||Me===void 0||(Ie=Me.type)===null||Ie===void 0?void 0:Ie.name)||"Anonymous"]),Array.isArray(Ye.src)&&Ye.groupArraysAfterLength&&Ye.src.length>Ye.groupArraysAfterLength&&(lt=gl),C().createElement("div",{className:"pretty-json-container object-container"},C().createElement("div",{className:"object-content"},C().createElement(lt,Object.assign({namespace:He,depth:0,jsvRoot:!0},Ye))))},X}return E(Z,ne),b(Z)})(C().PureComponent),bf=(function(ne){function Z(X){var W;return v(this,Z),(W=S(this,Z,[X])).closeModal=function(){Ae.dispatch({rjvId:W.props.rjvId,name:"RESET"})},W.submit=function(){W.props.submit(W.state.input)},W.state={input:X.input?X.input:""},W}return E(Z,ne),b(Z,[{key:"render",value:function(){var X=this,W=this.props,ge=W.theme,Re=W.rjvId,_e=W.isValid,ye=this.state.input,Me=_e(ye);return C().createElement("div",Object.assign({className:"key-modal-request"},Ce(ge,"key-modal-request"),{onClick:this.closeModal}),C().createElement("div",Object.assign({},Ce(ge,"key-modal"),{onClick:function(Ie){Ie.stopPropagation()}}),C().createElement("div",Ce(ge,"key-modal-label"),"Key Name:"),C().createElement("div",{style:{position:"relative"}},C().createElement("input",Object.assign({},Ce(ge,"key-modal-input"),{className:"key-modal-input",ref:function(Ie){return Ie&&Ie.focus()},spellCheck:!1,value:ye,placeholder:"...",onChange:function(Ie){X.setState({input:Ie.target.value})},onKeyPress:function(Ie){Me&&Ie.key==="Enter"?X.submit():Ie.key==="Escape"&&X.closeModal()}})),Me?C().createElement(Gl,Object.assign({},Ce(ge,"key-modal-submit"),{className:"key-modal-submit",onClick:function(Ie){return X.submit()}})):null),C().createElement("span",Ce(ge,"key-modal-cancel"),C().createElement(wi,Object.assign({},Ce(ge,"key-modal-cancel-icon"),{className:"key-modal-cancel",onClick:function(){Ae.dispatch({rjvId:Re,name:"RESET"})}})))))}}])})(C().PureComponent),Yl=(function(ne){function Z(){var X;v(this,Z);for(var W=arguments.length,ge=new Array(W),Re=0;Re<W;Re++)ge[Re]=arguments[Re];return(X=S(this,Z,[].concat(ge))).isValid=function(_e){var ye=X.props.rjvId,Me=Ne.get(ye,"action","new-key-request");return _e!=""&&Object.keys(Me.existing_value).indexOf(_e)===-1},X.submit=function(_e){var ye=X.props.rjvId,Me=Ne.get(ye,"action","new-key-request");Me.new_value=g({},Me.existing_value),Me.new_value[_e]=X.props.defaultValue,Ae.dispatch({name:"VARIABLE_ADDED",rjvId:ye,data:Me})},X}return E(Z,ne),b(Z,[{key:"render",value:function(){var X=this.props,W=X.active,ge=X.theme,Re=X.rjvId;return W?C().createElement(bf,{rjvId:Re,theme:ge,isValid:this.isValid,submit:this.submit}):null}}])})(C().PureComponent),Mi=(function(ne){function Z(){return v(this,Z),S(this,Z,arguments)}return E(Z,ne),b(Z,[{key:"render",value:function(){var X=this.props,W=X.message,ge=X.active,Re=X.theme,_e=X.rjvId;return ge?C().createElement("div",Object.assign({className:"validation-failure"},Ce(Re,"validation-failure"),{onClick:function(){Ae.dispatch({rjvId:_e,name:"RESET"})}}),C().createElement("span",Ce(Re,"validation-failure-label"),W),C().createElement(wi,Ce(Re,"validation-failure-clear"))):null}}])})(C().PureComponent),yl=(function(ne){function Z(X){var W;return v(this,Z),(W=S(this,Z,[X])).rjvId=Date.now().toString()+Math.random().toString(36).slice(2),W.getListeners=function(){return{reset:W.resetState,"variable-update":W.updateSrc,"add-key-request":W.addKeyRequest}},W.updateSrc=function(){var ge,Re=Ne.get(W.rjvId,"action","variable-update"),_e=Re.name,ye=Re.namespace,Me=Re.new_value,Ie=Re.existing_value,Ye=Re.updated_src,He=Re.type,lt=W.props,We=lt.onEdit,Bt=lt.onDelete,hn=lt.onAdd,bt={existing_src:W.state.src,new_value:Me,updated_src:Ye,name:_e,namespace:ye,existing_value:Ie};switch(He){case"variable-added":ge=hn(bt);break;case"variable-edited":ge=We(bt);break;case"variable-removed":ge=Bt(bt)}ge!==!1?(Ne.set(W.rjvId,"global","src",Ye),W.setState({src:Ye})):W.setState({validationFailure:!0})},W.addKeyRequest=function(){W.setState({addKeyRequest:!0})},W.resetState=function(){W.setState({validationFailure:!1,addKeyRequest:!1})},W.state={addKeyRequest:!1,editKeyRequest:!1,validationFailure:!1,src:Z.defaultProps.src,name:Z.defaultProps.name,theme:Z.defaultProps.theme,validationMessage:Z.defaultProps.validationMessage,prevSrc:Z.defaultProps.src,prevName:Z.defaultProps.name,prevTheme:Z.defaultProps.theme},W}return E(Z,ne),b(Z,[{key:"componentDidMount",value:function(){Ne.set(this.rjvId,"global","src",this.state.src);var X=this.getListeners();for(var W in X)Ne.on(W+"-"+this.rjvId,X[W]);this.setState({addKeyRequest:!1,editKeyRequest:!1})}},{key:"componentDidUpdate",value:function(X,W){W.addKeyRequest!==!1&&this.setState({addKeyRequest:!1}),W.editKeyRequest!==!1&&this.setState({editKeyRequest:!1}),X.src!==this.state.src&&Ne.set(this.rjvId,"global","src",this.state.src)}},{key:"componentWillUnmount",value:function(){var X=this.getListeners();for(var W in X)Ne.removeListener(W+"-"+this.rjvId,X[W])}},{key:"render",value:function(){var X=this.state,W=X.validationFailure,ge=X.validationMessage,Re=X.addKeyRequest,_e=X.theme,ye=X.src,Me=X.name,Ie=this.props,Ye=Ie.style,He=Ie.defaultValue;return C().createElement("div",{className:"react-json-view",style:g(g({},Ce(_e,"app-container").style),Ye)},C().createElement(Mi,{message:ge,active:W,theme:_e,rjvId:this.rjvId}),C().createElement(Kl,Object.assign({},this.props,{src:ye,name:Me,theme:_e,type:F(ye),rjvId:this.rjvId})),C().createElement(Yl,{active:Re,theme:_e,rjvId:this.rjvId,defaultValue:He}))}}],[{key:"getDerivedStateFromProps",value:function(X,W){if(X.src!==W.prevSrc||X.name!==W.prevName||X.theme!==W.prevTheme){var ge={src:X.src,name:X.name,theme:X.theme,validationMessage:X.validationMessage,prevSrc:X.src,prevName:X.name,prevTheme:X.theme};return Z.validateState(ge)}return null}}])})(C().PureComponent);yl.defaultProps={src:{},name:"root",theme:"rjv-default",collapsed:!1,collapseStringsAfterLength:!1,shouldCollapse:!1,sortKeys:!1,quotesOnKeys:!0,groupArraysAfterLength:100,indentWidth:4,enableClipboard:!0,escapeStrings:!0,displayObjectSize:!0,displayDataTypes:!0,onEdit:!1,onDelete:!1,onAdd:!1,onSelect:!1,iconStyle:"triangle",style:{},validationMessage:"Validation Error",defaultValue:null,displayArrayKey:!0,selectOnFocus:!1,keyModifier:function(ne){return ne.metaKey||ne.ctrlKey},bigNumber:null,showComma:!0},yl.validateState=function(ne){var Z={};return F(ne.theme)!=="object"||(function(X){var W=["base00","base01","base02","base03","base04","base05","base06","base07","base08","base09","base0A","base0B","base0C","base0D","base0E","base0F"];if(F(X)==="object"){for(var ge=0;ge<W.length;ge++)if(!(W[ge]in X))return!1;return!0}return!1})(ne.theme)||(console.error("react-json-view error:","theme prop must be a theme name or valid base-16 theme object.",'defaulting to "rjv-default" theme'),Z.theme="rjv-default"),F(ne.src)!=="object"&&F(ne.src)!=="array"&&(console.error("react-json-view error:","src property must be a valid json object"),Z.name="ERROR",Z.src={message:"src property must be a valid json object"}),g(g({},ne),Z)},q(yl);const Sf=yl})(),c})())})(ew)),ew.exports}var c1e=u1e();const M2=Il(c1e),jL=j.createContext(void 0);function Fm(e){const t=j.useContext(jL);if(e===!1&&t===void 0)throw new Error(Si(27));return t}let Rb=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const f1e={[Rb.startingStyle]:""},d1e={[Rb.endingStyle]:""},d1={transitionStatus(e){return e==="starting"?f1e:e==="ending"?d1e:null}};let Nh=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Rb.startingStyle]="startingStyle",e[e.endingStyle=Rb.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e})({}),RO=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const h1e={[RO.popupOpen]:""},p1e={[RO.popupOpen]:"",[RO.pressed]:""},m1e={[Nh.open]:""},g1e={[Nh.closed]:""},y1e={[Nh.anchorHidden]:""},kL={open(e){return e?h1e:null}},DL={open(e){return e?p1e:null}},Bm={open(e){return e?m1e:g1e},anchorHidden(e){return e?y1e:null}},v1e={...Bm,...d1},b1e=j.forwardRef(function(t,r){const{render:i,className:s,forceRender:l=!1,...c}=t,{store:f}=Fm(),d=f.useState("open"),h=f.useState("nested"),m=f.useState("mounted"),g=f.useState("transitionStatus"),v=j.useMemo(()=>({open:d,transitionStatus:g}),[d,g]);return mr("div",t,{state:v,ref:[f.context.backdropRef,r],stateAttributesMapping:v1e,props:[{role:"presentation",hidden:!m,style:{userSelect:"none",WebkitUserSelect:"none"}},c],enabled:l||!h})}),S1e=j.forwardRef(function(t,r){const{render:i,className:s,disabled:l=!1,nativeButton:c=!0,...f}=t,{store:d}=Fm(),h=d.useState("open");function m(b){h&&d.setOpen(!1,mn(zve,b.nativeEvent))}const{getButtonProps:g,buttonRef:v}=ap({disabled:l,native:c}),w=j.useMemo(()=>({disabled:l}),[l]);return mr("button",t,{state:w,ref:[r,v],props:[{onClick:m},f,g]})}),Dv=0;class of{static create(){return new of}currentId=Dv;start(t,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Dv,r()},t)}isStarted(){return this.currentId!==Dv}clear=()=>{this.currentId!==Dv&&(clearTimeout(this.currentId),this.currentId=Dv)};disposeEffect=()=>this.clear}function no(){const e=so(of.create).current;return E5(e.disposeEffect),e}function ka(e){const t=so(w1e,e).current;return t.next=e,ct(t.effect),t}function w1e(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function NL(){const e=new Map;return{emit(t,r){e.get(t)?.forEach(i=>i(r))},on(t,r){e.has(t)||e.set(t,new Set),e.get(t).add(r)},off(t,r){e.get(t)?.delete(r)}}}class E1e{nodesRef={current:[]};events=NL();addNode(t){this.nodesRef.current.push(t)}removeNode(t){const r=this.nodesRef.current.findIndex(i=>i===t);r!==-1&&this.nodesRef.current.splice(r,1)}}const zL=j.createContext(null),$L=j.createContext(null),gf=()=>j.useContext(zL)?.id||null,up=e=>{const t=j.useContext($L);return e??t};function x1e(e){const t=Lm(),r=up(e),i=gf();return ct(()=>{if(!t)return;const s={id:t,parentId:i};return r?.addNode(s),()=>{r?.removeNode(s)}},[r,t,i]),t}function _1e(e){const{children:t,id:r}=e,i=gf();return k.jsx(zL.Provider,{value:j.useMemo(()=>({id:r,parentId:i}),[r,i]),children:t})}function T1e(e){const{children:t,externalTree:r}=e,i=so(()=>r??new E1e).current;return k.jsx($L.Provider,{value:i,children:t})}function Ab(e){return`data-base-ui-${e}`}function CT(e,t,r){if(r&&!mm(r))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const i=e();return typeof i=="number"?i:i?.[t]}return e?.[t]}const PL={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},j2={...PL,position:"fixed",top:0,left:0},IL={...PL,position:"absolute"},TS=null;class C1e{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const r=this.callbacks,i=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,i>0)for(let s=0;s<r.length;s+=1)r[s]?.(t)};request(t){const r=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),r}cancel(t){const r=t-this.startId;r<0||r>=this.callbacks.length||(this.callbacks[r]=null,this.callbacksCount-=1)}}const CS=new C1e;class Tl{static create(){return new Tl}static request(t){return CS.request(t)}static cancel(t){return CS.cancel(t)}currentId=TS;request(t){this.cancel(),this.currentId=CS.request(()=>{this.currentId=TS,t()})}cancel=()=>{this.currentId!==TS&&(CS.cancel(this.currentId),this.currentId=TS)};disposeEffect=()=>this.cancel}function k2(){const e=so(Tl.create).current;return E5(e.disposeEffect),e}const vm=j.forwardRef(function(t,r){const[i,s]=j.useState();ct(()=>{Ive&&s("button")},[]);const l={tabIndex:0,role:i};return k.jsx("span",{...t,ref:r,style:j2,"aria-hidden":i?void 0:!0,...l,"data-base-ui-focus-guard":""})});let ZD=0;function tw(e,t={}){const{preventScroll:r=!1,cancelPrevious:i=!0,sync:s=!1}=t;i&&cancelAnimationFrame(ZD);const l=()=>e?.focus({preventScroll:r});s?l():ZD=requestAnimationFrame(l)}const Wp={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function XD(e){return e==="inert"?Wp.inert:e==="aria-hidden"?Wp["aria-hidden"]:Wp.none}let OS=new WeakSet,RS={},OT=0;const LL=e=>e&&(e.host||LL(e.parentNode)),O1e=(e,t)=>t.map(r=>{if(e.contains(r))return r;const i=LL(r);return e.contains(i)?i:null}).filter(r=>r!=null);function R1e(e,t,r,i){const s="data-base-ui-inert",l=i?"inert":r?"aria-hidden":null,c=O1e(t,e),f=new Set,d=new Set(c),h=[];RS[s]||(RS[s]=new WeakMap);const m=RS[s];c.forEach(g),v(t),f.clear();function g(w){!w||f.has(w)||(f.add(w),w.parentNode&&g(w.parentNode))}function v(w){!w||d.has(w)||[].forEach.call(w.children,b=>{if(hf(b)!=="script")if(f.has(b))v(b);else{const _=l?b.getAttribute(l):null,x=_!==null&&_!=="false",R=XD(l),S=(R.get(b)||0)+1,T=(m.get(b)||0)+1;R.set(b,S),m.set(b,T),h.push(b),S===1&&x&&OS.add(b),T===1&&b.setAttribute(s,""),!x&&l&&b.setAttribute(l,l==="inert"?"":"true")}})}return OT+=1,()=>{h.forEach(w=>{const b=XD(l),x=(b.get(w)||0)-1,R=(m.get(w)||0)-1;b.set(w,x),m.set(w,R),x||(!OS.has(w)&&l&&w.removeAttribute(l),OS.delete(w)),R||w.removeAttribute(s)}),OT-=1,OT||(Wp.inert=new WeakMap,Wp["aria-hidden"]=new WeakMap,Wp.none=new WeakMap,OS=new WeakSet,RS={})}}function A1e(e,t=!1,r=!1){const i=fa(e[0]).body;return R1e(e.concat(Array.from(i.querySelectorAll("[aria-live]"))),i,t,r)}const UL=j.createContext(null),qL=()=>j.useContext(UL),M1e=Ab("portal");function j1e(e={}){const{ref:t,container:r,componentProps:i=Da,elementProps:s,elementState:l}=e,c=Lm(),d=qL()?.portalNode,[h,m]=j.useState(null),[g,v]=j.useState(null),w=ot(R=>{R!==null&&v(R)}),b=j.useRef(null);ct(()=>{if(r===null){b.current&&(b.current=null,v(null),m(null));return}if(c==null)return;const R=(r&&(ZR(r)?r:r.current))??d??document.body;if(R==null){b.current&&(b.current=null,v(null),m(null));return}b.current!==R&&(b.current=R,v(null),m(R))},[r,d,c]);const _=mr("div",i,{ref:[t,w],state:l,props:[{id:c,[M1e]:""},s]});return{portalNode:g,portalSubtree:h&&_?ms.createPortal(_,h):null}}const _5=j.forwardRef(function(t,r){const{children:i,container:s,className:l,render:c,renderGuards:f,...d}=t,{portalNode:h,portalSubtree:m}=j1e({container:s,ref:r,componentProps:t,elementProps:d}),g=j.useRef(null),v=j.useRef(null),w=j.useRef(null),b=j.useRef(null),[_,x]=j.useState(null),R=_?.modal,S=_?.open,T=typeof f=="boolean"?f:!!_&&!_.modal&&_.open&&!!h;j.useEffect(()=>{if(!h||R)return;function O(C){h&&C.relatedTarget&&Zp(C)&&(C.type==="focusin"?UD:bbe)(h)}return h.addEventListener("focusin",O,!0),h.addEventListener("focusout",O,!0),()=>{h.removeEventListener("focusin",O,!0),h.removeEventListener("focusout",O,!0)}},[h,R]),j.useEffect(()=>{!h||S||UD(h)},[S,h]);const E=j.useMemo(()=>({beforeOutsideRef:g,afterOutsideRef:v,beforeInsideRef:w,afterInsideRef:b,portalNode:h,setFocusManagerState:x}),[h]);return k.jsxs(j.Fragment,{children:[m,k.jsxs(UL.Provider,{value:E,children:[T&&h&&k.jsx(vm,{"data-type":"outside",ref:g,onFocus:O=>{if(Zp(O,h))w.current?.focus();else{const C=_?_.domReference:null;bL(C)?.focus()}}}),T&&h&&k.jsx("span",{"aria-owns":h.id,style:wae}),h&&ms.createPortal(i,h),T&&h&&k.jsx(vm,{"data-type":"outside",ref:v,onFocus:O=>{if(Zp(O,h))b.current?.focus();else{const C=_?_.domReference:null;w5(C)?.focus(),_?.closeOnFocusOut&&_?.onOpenChange(!1,mn(Yh,O.nativeEvent))}}})]})]})});function ic(e){return e==null?e:"current"in e?e.current:e}function k1e(e,t){const r=ha(e.target);return e instanceof r.KeyboardEvent?"keyboard":e instanceof r.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof r.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const QD=20;let zc=[];function T5(){zc=zc.filter(e=>e.isConnected)}function D1e(e){T5(),e&&hf(e)!=="body"&&(zc.push(e),zc.length>QD&&(zc=zc.slice(-QD)))}function RT(){return T5(),zc[zc.length-1]}function N1e(e){if(!e)return null;const t=Vm();return yL(e,t)?e:u1(e,t)[0]||e}function z1e(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():Qo(e).display!=="none"}function WD(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const r=Vm(),s=gbe(e,r).filter(c=>{const f=c.getAttribute("data-tabindex")||"";return yL(c,r)||c.hasAttribute("data-tabindex")&&!f.startsWith("-")}),l=e.getAttribute("tabindex");t.current.includes("floating")||s.length===0?l!=="0"&&e.setAttribute("tabindex","0"):(l!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function C5(e){const{context:t,children:r,disabled:i=!1,order:s=["content"],initialFocus:l=!0,returnFocus:c=!0,restoreFocus:f=!1,modal:d=!0,closeOnFocusOut:h=!0,openInteractionType:m="",getInsideElements:g=()=>[],nextFocusableElement:v,previousFocusableElement:w,beforeContentFocusGuardRef:b,externalTree:_}=e,x="rootStore"in t?t.rootStore:t,R=x.useState("open"),S=x.useState("domReferenceElement"),T=x.useState("floatingElement"),{events:E,dataRef:O}=x.context,C=ot(()=>O.current.floatingContext?.nodeId),M=ot(g),D=l===!1,$=SO(S)&&D,q=ka(s),L=ka(l),V=ka(c),F=ka(m),re=up(_),ae=qL(),K=j.useRef(null),B=j.useRef(null),Y=j.useRef(!1),fe=j.useRef(!1),se=j.useRef(!1),N=j.useRef(-1),I=j.useRef(""),U=j.useRef(""),P=j.useRef(null),G=j.useRef(null),ee=fc(P,b,ae?.beforeInsideRef),ue=fc(G,ae?.afterInsideRef),ve=no(),Ee=no(),Oe=k2(),de=ae!=null,te=Cb(T),Se=ot((Te=te)=>Te?u1(Te,Vm()):[]),we=ot(Te=>{const Pe=Se(Te);return q.current.map(()=>Pe).filter(Boolean).flat()});j.useEffect(()=>{if(i||!d)return;function Te(Ge){Ge.key==="Tab"&&zn(te,oc(fa(te)))&&Se().length===0&&!$&&Ti(Ge)}const Pe=fa(te);return Pe.addEventListener("keydown",Te),()=>{Pe.removeEventListener("keydown",Te)}},[i,S,te,d,q,$,Se,we]),j.useEffect(()=>{if(i||!T)return;function Te(Pe){const Ge=ao(Pe),Be=Se().indexOf(Ge);Be!==-1&&(N.current=Be)}return T.addEventListener("focusin",Te),()=>{T.removeEventListener("focusin",Te)}},[i,T,Se]),j.useEffect(()=>{if(i||!R)return;const Te=fa(te);function Pe(){se.current=!1}function Ge(Be){const Fe=ao(Be),Je=zn(T,Fe)||zn(S,Fe)||zn(ae?.portalNode,Fe);se.current=!Je,U.current=Be.pointerType||"keyboard"}function Ce(){U.current="keyboard"}return Te.addEventListener("pointerdown",Ge,!0),Te.addEventListener("pointerup",Pe,!0),Te.addEventListener("pointercancel",Pe,!0),Te.addEventListener("keydown",Ce,!0),()=>{Te.removeEventListener("pointerdown",Ge,!0),Te.removeEventListener("pointerup",Pe,!0),Te.removeEventListener("pointercancel",Pe,!0),Te.removeEventListener("keydown",Ce,!0)}},[i,T,S,te,R,ae]),j.useEffect(()=>{if(i||!h)return;function Te(){fe.current=!0,Ee.start(0,()=>{fe.current=!1})}function Pe(Fe){const Je=Fe.relatedTarget,ke=Fe.currentTarget,Ue=ao(Fe);queueMicrotask(()=>{const Xe=C(),Mt=x.context.triggerElements,Ae=Je?.hasAttribute(Ab("focus-guard"))&&[P.current,G.current,ae?.beforeInsideRef.current,ae?.afterInsideRef.current,ae?.beforeOutsideRef.current,ae?.afterOutsideRef.current,ic(w),ic(v)].includes(Je),xe=!(zn(S,Je)||zn(T,Je)||zn(Je,T)||zn(ae?.portalNode,Je)||Je!=null&&Mt.hasElement(Je)||Mt.hasMatchingElement(Ne=>zn(Ne,Je))||Ae||re&&(Ph(re.nodesRef.current,Xe).find(Ne=>zn(Ne.context?.elements.floating,Je)||zn(Ne.context?.elements.domReference,Je))||$D(re.nodesRef.current,Xe).find(Ne=>[Ne.context?.elements.floating,Cb(Ne.context?.elements.floating)].includes(Je)||Ne.context?.elements.domReference===Je)));if(ke===S&&te&&WD(te,q),f&&ke!==S&&!z1e(Ue)&&oc(fa(te))===fa(te).body){if(Gr(te)&&(te.focus(),f==="popup")){Oe.request(()=>{te.focus()});return}const Ne=N.current,Ke=Se(),vt=Ke[Ne]||Ke[Ke.length-1]||te;Gr(vt)&&vt.focus()}if(O.current.insideReactTree){O.current.insideReactTree=!1;return}($||!d)&&Je&&xe&&!fe.current&&($||Je!==RT())&&(Y.current=!0,x.setOpen(!1,mn(Yh,Fe)))})}function Ge(){se.current||(O.current.insideReactTree=!0,ve.start(0,()=>{O.current.insideReactTree=!1}))}const Ce=Gr(S)?S:null,Be=[];if(!(!T&&!Ce))return Ce&&(Ce.addEventListener("focusout",Pe),Ce.addEventListener("pointerdown",Te),Be.push(()=>{Ce.removeEventListener("focusout",Pe),Ce.removeEventListener("pointerdown",Te)})),T&&(T.addEventListener("focusout",Pe),ae&&(T.addEventListener("focusout",Ge,!0),Be.push(()=>{T.removeEventListener("focusout",Ge,!0)})),Be.push(()=>{T.removeEventListener("focusout",Pe)})),()=>{Be.forEach(Fe=>{Fe()})}},[i,S,T,te,d,re,ae,x,h,f,Se,$,C,q,O,ve,Ee,Oe,v,w]),j.useEffect(()=>{if(i||!T||!R)return;const Te=Array.from(ae?.portalNode?.querySelectorAll(`[${Ab("portal")}]`)||[]),Ge=(re?$D(re.nodesRef.current,C()):[]).find(Fe=>SO(Fe.context?.elements.domReference||null))?.context?.elements.domReference,Ce=[T,Ge,...Te,...M(),K.current,B.current,P.current,G.current,ae?.beforeOutsideRef.current,ae?.afterOutsideRef.current,ic(w),ic(v),$?S:null].filter(Fe=>Fe!=null),Be=A1e(Ce,d||$);return()=>{Be()}},[R,i,S,T,d,q,ae,$,re,C,M,v,w]),ct(()=>{if(!R||i||!Gr(te))return;const Te=fa(te),Pe=oc(Te);queueMicrotask(()=>{const Ge=we(te),Ce=L.current,Be=typeof Ce=="function"?Ce(F.current||""):Ce;if(Be===void 0||Be===!1)return;let Fe;Be===!0||Be===null?Fe=Ge[0]||te:Fe=ic(Be),Fe=Fe||Ge[0]||te,!zn(te,Pe)&&tw(Fe,{preventScroll:Fe===te})})},[i,R,te,D,we,L,F]),ct(()=>{if(i||!te)return;const Te=fa(te),Pe=oc(Te);D1e(Pe);function Ge(Fe){if(Fe.open||(I.current=k1e(Fe.nativeEvent,U.current)),Fe.reason===Go&&Fe.nativeEvent.type==="mouseleave"&&(Y.current=!0),Fe.reason===g5)if(Fe.nested)Y.current=!1;else if(rL(Fe.nativeEvent)||aL(Fe.nativeEvent))Y.current=!1;else{let Je=!1;document.createElement("div").focus({get preventScroll(){return Je=!0,!1}}),Je?Y.current=!1:Y.current=!0}}E.on("openchange",Ge);const Ce=Te.createElement("span");Ce.setAttribute("tabindex","-1"),Ce.setAttribute("aria-hidden","true"),Object.assign(Ce.style,j2),de&&S&&S.insertAdjacentElement("afterend",Ce);function Be(){const Fe=V.current;let Je=typeof Fe=="function"?Fe(I.current):Fe;if(Je===void 0||Je===!1)return null;if(Je===null&&(Je=!0),typeof Je=="boolean"){const Ue=S||RT();return Ue&&Ue.isConnected?Ue:Ce}const ke=S||RT()||Ce;return ic(Je)||ke}return()=>{E.off("openchange",Ge);const Fe=oc(Te),Je=zn(T,Fe)||re&&Ph(re.nodesRef.current,C(),!1).some(Ue=>zn(Ue.context?.elements.floating,Fe)),ke=Be();queueMicrotask(()=>{const Ue=N1e(ke),Xe=typeof V.current!="boolean";V.current&&!Y.current&&Gr(Ue)&&(!(!Xe&&Ue!==Fe&&Fe!==Te.body)||Je)&&Ue.focus({preventScroll:!0}),Ce.remove()})}},[i,T,te,V,O,E,re,de,S,C]),j.useEffect(()=>{queueMicrotask(()=>{Y.current=!1})},[i]),j.useEffect(()=>{if(i||!R)return;function Te(Ge){ao(Ge)?.closest(`[${a$}]`)&&(fe.current=!0)}const Pe=fa(te);return Pe.addEventListener("pointerdown",Te,!0),()=>{Pe.removeEventListener("pointerdown",Te,!0)}},[i,R,te]),ct(()=>{if(!i&&ae)return ae.setFocusManagerState({modal:d,closeOnFocusOut:h,open:R,onOpenChange:x.setOpen,domReference:S}),()=>{ae.setFocusManagerState(null)}},[i,ae,d,R,x,h,S]),ct(()=>{if(!(i||!te))return WD(te,q),()=>{queueMicrotask(T5)}},[i,te,q]);const $e=!i&&(d?!$:!0)&&(de||d);return k.jsxs(j.Fragment,{children:[$e&&k.jsx(vm,{"data-type":"inside",ref:ee,onFocus:Te=>{if(d){const Pe=we();tw(Pe[Pe.length-1])}else ae?.portalNode&&(Y.current=!1,Zp(Te,ae.portalNode)?w5(S)?.focus():ic(w??ae.beforeOutsideRef)?.focus())}}),r,$e&&k.jsx(vm,{"data-type":"inside",ref:ue,onFocus:Te=>{d?tw(we()[0]):ae?.portalNode&&(h&&(Y.current=!0),Zp(Te,ae.portalNode)?bL(S)?.focus():ic(v??ae.afterOutsideRef)?.focus())}})]})}function VL(e,t={}){const r="rootStore"in e?e.rootStore:e,i=r.context.dataRef,{enabled:s=!0,event:l="click",toggle:c=!0,ignoreMouse:f=!1,stickIfOpen:d=!0,touchOpenDelay:h=0}=t,m=j.useRef(void 0),g=k2(),v=no(),w=j.useMemo(()=>({onPointerDown(b){m.current=b.pointerType},onMouseDown(b){const _=m.current,x=b.nativeEvent,R=r.select("open");if(b.button!==0||l==="click"||mm(_,!0)&&f)return;const S=i.current.openEvent,T=S?.type,E=r.select("domReferenceElement")!==b.currentTarget,O=R&&E||!(R&&c&&(!(S&&d)||T==="click"||T==="mousedown"));if(nL(x.target)){const M=mn(Fc,x,x.target);O&&_==="touch"&&h>0?v.start(h,()=>{r.setOpen(!0,M)}):r.setOpen(O,M);return}const C=b.currentTarget;g.request(()=>{const M=mn(Fc,x,C);O&&_==="touch"&&h>0?v.start(h,()=>{r.setOpen(!0,M)}):r.setOpen(O,M)})},onClick(b){if(l==="mousedown-only")return;const _=m.current;if(l==="mousedown"&&_){m.current=void 0;return}if(mm(_,!0)&&f)return;const x=r.select("open"),R=i.current.openEvent,S=r.select("domReferenceElement")!==b.currentTarget,T=x&&S||!(x&&c&&(!(R&&d)||iL(R))),E=mn(Fc,b.nativeEvent,b.currentTarget);T&&_==="touch"&&h>0?v.start(h,()=>{r.setOpen(!0,E)}):r.setOpen(T,E)},onKeyDown(){m.current=void 0}}),[i,l,f,r,d,c,g,v,h]);return j.useMemo(()=>s?{reference:w}:Da,[s,w])}function JD(e,t,r){let{reference:i,floating:s}=e;const l=us(t),c=S5(t),f=b5(c),d=oo(t),h=l==="y",m=i.x+i.width/2-s.width/2,g=i.y+i.height/2-s.height/2,v=i[f]/2-s[f]/2;let w;switch(d){case"top":w={x:m,y:i.y-s.height};break;case"bottom":w={x:m,y:i.y+i.height};break;case"right":w={x:i.x+i.width,y:g};break;case"left":w={x:i.x-s.width,y:g};break;default:w={x:i.x,y:i.y}}switch(mf(t)){case"start":w[c]-=v*(r&&h?-1:1);break;case"end":w[c]+=v*(r&&h?-1:1);break}return w}const $1e=async(e,t,r)=>{const{placement:i="bottom",strategy:s="absolute",middleware:l=[],platform:c}=r,f=l.filter(Boolean),d=await(c.isRTL==null?void 0:c.isRTL(t));let h=await c.getElementRects({reference:e,floating:t,strategy:s}),{x:m,y:g}=JD(h,i,d),v=i,w={},b=0;for(let _=0;_<f.length;_++){const{name:x,fn:R}=f[_],{x:S,y:T,data:E,reset:O}=await R({x:m,y:g,initialPlacement:i,placement:v,strategy:s,middlewareData:w,rects:h,platform:c,elements:{reference:e,floating:t}});m=S??m,g=T??g,w={...w,[x]:{...w[x],...E}},O&&b<=50&&(b++,typeof O=="object"&&(O.placement&&(v=O.placement),O.rects&&(h=O.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:s}):O.rects),{x:m,y:g}=JD(h,v,d)),_=-1)}return{x:m,y:g,placement:v,strategy:s,middlewareData:w}};async function Mb(e,t){var r;t===void 0&&(t={});const{x:i,y:s,platform:l,rects:c,elements:f,strategy:d}=e,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:g="floating",altBoundary:v=!1,padding:w=0}=pc(t,e),b=oL(w),x=f[v?g==="floating"?"reference":"floating":g],R=Pw(await l.getClippingRect({element:(r=await(l.isElement==null?void 0:l.isElement(x)))==null||r?x:x.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(f.floating)),boundary:h,rootBoundary:m,strategy:d})),S=g==="floating"?{x:i,y:s,width:c.floating.width,height:c.floating.height}:c.reference,T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(f.floating)),E=await(l.isElement==null?void 0:l.isElement(T))?await(l.getScale==null?void 0:l.getScale(T))||{x:1,y:1}:{x:1,y:1},O=Pw(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:S,offsetParent:T,strategy:d}):S);return{top:(R.top-O.top+b.top)/E.y,bottom:(O.bottom-R.bottom+b.bottom)/E.y,left:(R.left-O.left+b.left)/E.x,right:(O.right-R.right+b.right)/E.x}}const P1e=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,i;const{placement:s,middlewareData:l,rects:c,initialPlacement:f,platform:d,elements:h}=t,{mainAxis:m=!0,crossAxis:g=!0,fallbackPlacements:v,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:_=!0,...x}=pc(e,t);if((r=l.arrow)!=null&&r.alignmentOffset)return{};const R=oo(s),S=us(f),T=oo(f)===f,E=await(d.isRTL==null?void 0:d.isRTL(h.floating)),O=v||(T||!_?[$w(f)]:Xve(f)),C=b!=="none";!v&&C&&O.push(...ebe(f,_,b,E));const M=[f,...O],D=await Mb(t,x),$=[];let q=((i=l.flip)==null?void 0:i.overflows)||[];if(m&&$.push(D[R]),g){const re=Zve(s,c,E);$.push(D[re[0]],D[re[1]])}if(q=[...q,{placement:s,overflows:$}],!$.every(re=>re<=0)){var L,V;const re=(((L=l.flip)==null?void 0:L.index)||0)+1,ae=M[re];if(ae&&(!(g==="alignment"?S!==us(ae):!1)||q.every(Y=>us(Y.placement)===S?Y.overflows[0]>0:!0)))return{data:{index:re,overflows:q},reset:{placement:ae}};let K=(V=q.filter(B=>B.overflows[0]<=0).sort((B,Y)=>B.overflows[1]-Y.overflows[1])[0])==null?void 0:V.placement;if(!K)switch(w){case"bestFit":{var F;const B=(F=q.filter(Y=>{if(C){const fe=us(Y.placement);return fe===S||fe==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter(fe=>fe>0).reduce((fe,se)=>fe+se,0)]).sort((Y,fe)=>Y[1]-fe[1])[0])==null?void 0:F[0];B&&(K=B);break}case"initialPlacement":K=f;break}if(s!==K)return{reset:{placement:K}}}return{}}}};function eN(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function tN(e){return Hve.some(t=>e[t]>=0)}const I1e=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:i="referenceHidden",...s}=pc(e,t);switch(i){case"referenceHidden":{const l=await Mb(t,{...s,elementContext:"reference"}),c=eN(l,r.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:tN(c)}}}case"escaped":{const l=await Mb(t,{...s,altBoundary:!0}),c=eN(l,r.floating);return{data:{escapedOffsets:c,escaped:tN(c)}}}default:return{}}}}},FL=new Set(["left","top"]);async function L1e(e,t){const{placement:r,platform:i,elements:s}=e,l=await(i.isRTL==null?void 0:i.isRTL(s.floating)),c=oo(r),f=mf(r),d=us(r)==="y",h=FL.has(c)?-1:1,m=l&&d?-1:1,g=pc(t,e);let{mainAxis:v,crossAxis:w,alignmentAxis:b}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return f&&typeof b=="number"&&(w=f==="end"?b*-1:b),d?{x:w*m,y:v*h}:{x:v*h,y:w*m}}const U1e=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,i;const{x:s,y:l,placement:c,middlewareData:f}=t,d=await L1e(t,e);return c===((r=f.offset)==null?void 0:r.placement)&&(i=f.arrow)!=null&&i.alignmentOffset?{}:{x:s+d.x,y:l+d.y,data:{...d,placement:c}}}}},q1e=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:i,placement:s}=t,{mainAxis:l=!0,crossAxis:c=!1,limiter:f={fn:x=>{let{x:R,y:S}=x;return{x:R,y:S}}},...d}=pc(e,t),h={x:r,y:i},m=await Mb(t,d),g=us(oo(s)),v=v5(g);let w=h[v],b=h[g];if(l){const x=v==="y"?"top":"left",R=v==="y"?"bottom":"right",S=w+m[x],T=w-m[R];w=wO(S,w,T)}if(c){const x=g==="y"?"top":"left",R=g==="y"?"bottom":"right",S=b+m[x],T=b-m[R];b=wO(S,b,T)}const _=f.fn({...t,[v]:w,[g]:b});return{..._,data:{x:_.x-r,y:_.y-i,enabled:{[v]:l,[g]:c}}}}}},V1e=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:i,placement:s,rects:l,middlewareData:c}=t,{offset:f=0,mainAxis:d=!0,crossAxis:h=!0}=pc(e,t),m={x:r,y:i},g=us(s),v=v5(g);let w=m[v],b=m[g];const _=pc(f,t),x=typeof _=="number"?{mainAxis:_,crossAxis:0}:{mainAxis:0,crossAxis:0,..._};if(d){const T=v==="y"?"height":"width",E=l.reference[v]-l.floating[T]+x.mainAxis,O=l.reference[v]+l.reference[T]-x.mainAxis;w<E?w=E:w>O&&(w=O)}if(h){var R,S;const T=v==="y"?"width":"height",E=FL.has(oo(s)),O=l.reference[g]-l.floating[T]+(E&&((R=c.offset)==null?void 0:R[g])||0)+(E?0:x.crossAxis),C=l.reference[g]+l.reference[T]+(E?0:((S=c.offset)==null?void 0:S[g])||0)-(E?x.crossAxis:0);b<O?b=O:b>C&&(b=C)}return{[v]:w,[g]:b}}}},F1e=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,i;const{placement:s,rects:l,platform:c,elements:f}=t,{apply:d=()=>{},...h}=pc(e,t),m=await Mb(t,h),g=oo(s),v=mf(s),w=us(s)==="y",{width:b,height:_}=l.floating;let x,R;g==="top"||g==="bottom"?(x=g,R=v===(await(c.isRTL==null?void 0:c.isRTL(f.floating))?"start":"end")?"left":"right"):(R=g,x=v==="end"?"top":"bottom");const S=_-m.top-m.bottom,T=b-m.left-m.right,E=gm(_-m[x],S),O=gm(b-m[R],T),C=!t.middlewareData.shift;let M=E,D=O;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(D=T),(i=t.middlewareData.shift)!=null&&i.enabled.y&&(M=S),C&&!v){const q=Ko(m.left,0),L=Ko(m.right,0),V=Ko(m.top,0),F=Ko(m.bottom,0);w?D=b-2*(q!==0||L!==0?q+L:Ko(m.left,m.right)):M=_-2*(V!==0||F!==0?V+F:Ko(m.top,m.bottom))}await d({...t,availableWidth:D,availableHeight:M});const $=await c.getDimensions(f.floating);return b!==$.width||_!==$.height?{reset:{rects:!0}}:{}}}};function BL(e){const t=Qo(e);let r=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const s=Gr(e),l=s?e.offsetWidth:r,c=s?e.offsetHeight:i,f=zw(r)!==l||zw(i)!==c;return f&&(r=l,i=c),{width:r,height:i,$:f}}function O5(e){return ir(e)?e:e.contextElement}function Jp(e){const t=O5(e);if(!Gr(t))return Nl(1);const r=t.getBoundingClientRect(),{width:i,height:s,$:l}=BL(t);let c=(l?zw(r.width):r.width)/i,f=(l?zw(r.height):r.height)/s;return(!c||!Number.isFinite(c))&&(c=1),(!f||!Number.isFinite(f))&&(f=1),{x:c,y:f}}const B1e=Nl(0);function HL(e){const t=ha(e);return!p2()||!t.visualViewport?B1e:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function H1e(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ha(e)?!1:t}function Zh(e,t,r,i){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),l=O5(e);let c=Nl(1);t&&(i?ir(i)&&(c=Jp(i)):c=Jp(e));const f=H1e(l,r,i)?HL(l):Nl(0);let d=(s.left+f.x)/c.x,h=(s.top+f.y)/c.y,m=s.width/c.x,g=s.height/c.y;if(l){const v=ha(l),w=i&&ir(i)?ha(i):i;let b=v,_=OC(b);for(;_&&i&&w!==b;){const x=Jp(_),R=_.getBoundingClientRect(),S=Qo(_),T=R.left+(_.clientLeft+parseFloat(S.paddingLeft))*x.x,E=R.top+(_.clientTop+parseFloat(S.paddingTop))*x.y;d*=x.x,h*=x.y,m*=x.x,g*=x.y,d+=T,h+=E,b=ha(_),_=OC(b)}}return Pw({width:m,height:g,x:d,y:h})}function D2(e,t){const r=m2(e).scrollLeft;return t?t.left+r:Zh(Ul(e)).left+r}function GL(e,t){const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-D2(e,r),s=r.top+t.scrollTop;return{x:i,y:s}}function G1e(e){let{elements:t,rect:r,offsetParent:i,strategy:s}=e;const l=s==="fixed",c=Ul(i),f=t?h2(t.floating):!1;if(i===c||f&&l)return r;let d={scrollLeft:0,scrollTop:0},h=Nl(1);const m=Nl(0),g=Gr(i);if((g||!g&&!l)&&((hf(i)!=="body"||rp(c))&&(d=m2(i)),Gr(i))){const w=Zh(i);h=Jp(i),m.x=w.x+i.clientLeft,m.y=w.y+i.clientTop}const v=c&&!g&&!l?GL(c,d):Nl(0);return{width:r.width*h.x,height:r.height*h.y,x:r.x*h.x-d.scrollLeft*h.x+m.x+v.x,y:r.y*h.y-d.scrollTop*h.y+m.y+v.y}}function K1e(e){return Array.from(e.getClientRects())}function Y1e(e){const t=Ul(e),r=m2(e),i=e.ownerDocument.body,s=Ko(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),l=Ko(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let c=-r.scrollLeft+D2(e);const f=-r.scrollTop;return Qo(i).direction==="rtl"&&(c+=Ko(t.clientWidth,i.clientWidth)-s),{width:s,height:l,x:c,y:f}}const nN=25;function Z1e(e,t){const r=ha(e),i=Ul(e),s=r.visualViewport;let l=i.clientWidth,c=i.clientHeight,f=0,d=0;if(s){l=s.width,c=s.height;const m=p2();(!m||m&&t==="fixed")&&(f=s.offsetLeft,d=s.offsetTop)}const h=D2(i);if(h<=0){const m=i.ownerDocument,g=m.body,v=getComputedStyle(g),w=m.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,b=Math.abs(i.clientWidth-g.clientWidth-w);b<=nN&&(l-=b)}else h<=nN&&(l+=h);return{width:l,height:c,x:f,y:d}}const X1e=new Set(["absolute","fixed"]);function Q1e(e,t){const r=Zh(e,!0,t==="fixed"),i=r.top+e.clientTop,s=r.left+e.clientLeft,l=Gr(e)?Jp(e):Nl(1),c=e.clientWidth*l.x,f=e.clientHeight*l.y,d=s*l.x,h=i*l.y;return{width:c,height:f,x:d,y:h}}function rN(e,t,r){let i;if(t==="viewport")i=Z1e(e,r);else if(t==="document")i=Y1e(Ul(e));else if(ir(t))i=Q1e(t,r);else{const s=HL(e);i={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Pw(i)}function KL(e,t){const r=cc(e);return r===t||!ir(r)||lc(r)?!1:Qo(r).position==="fixed"||KL(r,t)}function W1e(e,t){const r=t.get(e);if(r)return r;let i=Ic(e,[],!1).filter(f=>ir(f)&&hf(f)!=="body"),s=null;const l=Qo(e).position==="fixed";let c=l?cc(e):e;for(;ir(c)&&!lc(c);){const f=Qo(c),d=XR(c);!d&&f.position==="fixed"&&(s=null),(l?!d&&!s:!d&&f.position==="static"&&!!s&&X1e.has(s.position)||rp(c)&&!d&&KL(e,c))?i=i.filter(m=>m!==c):s=f,c=cc(c)}return t.set(e,i),i}function J1e(e){let{element:t,boundary:r,rootBoundary:i,strategy:s}=e;const c=[...r==="clippingAncestors"?h2(t)?[]:W1e(t,this._c):[].concat(r),i],f=c[0],d=c.reduce((h,m)=>{const g=rN(t,m,s);return h.top=Ko(g.top,h.top),h.right=gm(g.right,h.right),h.bottom=gm(g.bottom,h.bottom),h.left=Ko(g.left,h.left),h},rN(t,f,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function eSe(e){const{width:t,height:r}=BL(e);return{width:t,height:r}}function tSe(e,t,r){const i=Gr(t),s=Ul(t),l=r==="fixed",c=Zh(e,!0,l,t);let f={scrollLeft:0,scrollTop:0};const d=Nl(0);function h(){d.x=D2(s)}if(i||!i&&!l)if((hf(t)!=="body"||rp(s))&&(f=m2(t)),i){const w=Zh(t,!0,l,t);d.x=w.x+t.clientLeft,d.y=w.y+t.clientTop}else s&&h();l&&!i&&s&&h();const m=s&&!i&&!l?GL(s,f):Nl(0),g=c.left+f.scrollLeft-d.x-m.x,v=c.top+f.scrollTop-d.y-m.y;return{x:g,y:v,width:c.width,height:c.height}}function AT(e){return Qo(e).position==="static"}function aN(e,t){if(!Gr(e)||Qo(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Ul(e)===r&&(r=r.ownerDocument.body),r}function YL(e,t){const r=ha(e);if(h2(e))return r;if(!Gr(e)){let s=cc(e);for(;s&&!lc(s);){if(ir(s)&&!AT(s))return s;s=cc(s)}return r}let i=aN(e,t);for(;i&&Gre(i)&&AT(i);)i=aN(i,t);return i&&lc(i)&&AT(i)&&!XR(i)?r:i||Qre(e)||r}const nSe=async function(e){const t=this.getOffsetParent||YL,r=this.getDimensions,i=await r(e.floating);return{reference:tSe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function rSe(e){return Qo(e).direction==="rtl"}const aSe={convertOffsetParentRelativeRectToViewportRelativeRect:G1e,getDocumentElement:Ul,getClippingRect:J1e,getOffsetParent:YL,getElementRects:nSe,getClientRects:K1e,getDimensions:eSe,getScale:Jp,isElement:ir,isRTL:rSe};function ZL(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function iSe(e,t){let r=null,i;const s=Ul(e);function l(){var f;clearTimeout(i),(f=r)==null||f.disconnect(),r=null}function c(f,d){f===void 0&&(f=!1),d===void 0&&(d=1),l();const h=e.getBoundingClientRect(),{left:m,top:g,width:v,height:w}=h;if(f||t(),!v||!w)return;const b=qp(g),_=qp(s.clientWidth-(m+v)),x=qp(s.clientHeight-(g+w)),R=qp(m),T={rootMargin:-b+"px "+-_+"px "+-x+"px "+-R+"px",threshold:Ko(0,gm(1,d))||1};let E=!0;function O(C){const M=C[0].intersectionRatio;if(M!==d){if(!E)return c();M?c(!1,M):i=setTimeout(()=>{c(!1,1e-7)},1e3)}M===1&&!ZL(h,e.getBoundingClientRect())&&c(),E=!1}try{r=new IntersectionObserver(O,{...T,root:s.ownerDocument})}catch{r=new IntersectionObserver(O,T)}r.observe(e)}return c(!0),l}function iN(e,t,r,i){i===void 0&&(i={});const{ancestorScroll:s=!0,ancestorResize:l=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:d=!1}=i,h=O5(e),m=s||l?[...h?Ic(h):[],...Ic(t)]:[];m.forEach(R=>{s&&R.addEventListener("scroll",r,{passive:!0}),l&&R.addEventListener("resize",r)});const g=h&&f?iSe(h,r):null;let v=-1,w=null;c&&(w=new ResizeObserver(R=>{let[S]=R;S&&S.target===h&&w&&(w.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var T;(T=w)==null||T.observe(t)})),r()}),h&&!d&&w.observe(h),w.observe(t));let b,_=d?Zh(e):null;d&&x();function x(){const R=Zh(e);_&&!ZL(_,R)&&r(),_=R,b=requestAnimationFrame(x)}return r(),()=>{var R;m.forEach(S=>{s&&S.removeEventListener("scroll",r),l&&S.removeEventListener("resize",r)}),g?.(),(R=w)==null||R.disconnect(),w=null,d&&cancelAnimationFrame(b)}}const oSe=U1e,sSe=q1e,lSe=P1e,uSe=F1e,cSe=I1e,fSe=V1e,dSe=(e,t,r)=>{const i=new Map,s={platform:aSe,...r},l={...s.platform,_c:i};return $1e(e,t,{...s,platform:l})};var hSe=typeof document<"u",pSe=function(){},nw=hSe?j.useLayoutEffect:pSe;function Vw(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,i,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(i=r;i--!==0;)if(!Vw(e[i],t[i]))return!1;return!0}if(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(i=r;i--!==0;)if(!{}.hasOwnProperty.call(t,s[i]))return!1;for(i=r;i--!==0;){const l=s[i];if(!(l==="_owner"&&e.$$typeof)&&!Vw(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function XL(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function oN(e,t){const r=XL(e);return Math.round(t*r)/r}function MT(e){const t=j.useRef(e);return nw(()=>{t.current=e}),t}function mSe(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:i=[],platform:s,elements:{reference:l,floating:c}={},transform:f=!0,whileElementsMounted:d,open:h}=e,[m,g]=j.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[v,w]=j.useState(i);Vw(v,i)||w(i);const[b,_]=j.useState(null),[x,R]=j.useState(null),S=j.useCallback(Y=>{Y!==C.current&&(C.current=Y,_(Y))},[]),T=j.useCallback(Y=>{Y!==M.current&&(M.current=Y,R(Y))},[]),E=l||b,O=c||x,C=j.useRef(null),M=j.useRef(null),D=j.useRef(m),$=d!=null,q=MT(d),L=MT(s),V=MT(h),F=j.useCallback(()=>{if(!C.current||!M.current)return;const Y={placement:t,strategy:r,middleware:v};L.current&&(Y.platform=L.current),dSe(C.current,M.current,Y).then(fe=>{const se={...fe,isPositioned:V.current!==!1};re.current&&!Vw(D.current,se)&&(D.current=se,ms.flushSync(()=>{g(se)}))})},[v,t,r,L,V]);nw(()=>{h===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,g(Y=>({...Y,isPositioned:!1})))},[h]);const re=j.useRef(!1);nw(()=>(re.current=!0,()=>{re.current=!1}),[]),nw(()=>{if(E&&(C.current=E),O&&(M.current=O),E&&O){if(q.current)return q.current(E,O,F);F()}},[E,O,F,q,$]);const ae=j.useMemo(()=>({reference:C,floating:M,setReference:S,setFloating:T}),[S,T]),K=j.useMemo(()=>({reference:E,floating:O}),[E,O]),B=j.useMemo(()=>{const Y={position:r,left:0,top:0};if(!K.floating)return Y;const fe=oN(K.floating,m.x),se=oN(K.floating,m.y);return f?{...Y,transform:"translate("+fe+"px, "+se+"px)",...XL(K.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:fe,top:se}},[r,f,K.floating,m.x,m.y]);return j.useMemo(()=>({...m,update:F,refs:ae,elements:K,floatingStyles:B}),[m,F,ae,K,B])}const gSe=(e,t)=>({...oSe(e),options:[e,t]}),ySe=(e,t)=>({...sSe(e),options:[e,t]}),vSe=(e,t)=>({...fSe(e),options:[e,t]}),bSe=(e,t)=>({...lSe(e),options:[e,t]}),SSe=(e,t)=>({...uSe(e),options:[e,t]}),wSe=(e,t)=>({...cSe(e),options:[e,t]}),ESe={intentional:"onClick",sloppy:"onPointerDown"};function xSe(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function R5(e,t={}){const r="rootStore"in e?e.rootStore:e,i=r.useState("open"),s=r.useState("floatingElement"),l=r.useState("referenceElement"),c=r.useState("domReferenceElement"),{onOpenChange:f,dataRef:d}=r.context,{enabled:h=!0,escapeKey:m=!0,outsidePress:g=!0,outsidePressEvent:v="sloppy",referencePress:w=!1,referencePressEvent:b="sloppy",ancestorScroll:_=!1,bubbles:x,externalTree:R}=t,S=up(R),T=ot(typeof g=="function"?g:()=>!1),E=typeof g=="function"?T:g,O=j.useRef(!1),{escapeKey:C,outsidePress:M}=xSe(x),D=j.useRef(null),$=no(),q=no(),L=ot(()=>{q.clear(),d.current.insideReactTree=!1}),V=j.useRef(!1),F=j.useRef(""),re=ot(te=>{F.current=te.pointerType}),ae=ot(()=>{const te=F.current,Se=te==="pen"||!te?"mouse":te,we=typeof v=="function"?v():v;return typeof we=="string"?we:we[Se]}),K=ot(te=>{if(!i||!h||!m||te.key!=="Escape"||V.current)return;const Se=d.current.floatingContext?.nodeId,we=S?Ph(S.nodesRef.current,Se):[];if(!C&&we.length>0){let Pe=!0;if(we.forEach(Ge=>{Ge.context?.open&&!Ge.context.dataRef.current.__escapeKeyBubbles&&(Pe=!1)}),!Pe)return}const $e=Bve(te)?te.nativeEvent:te,Te=mn(K7,$e);r.setOpen(!1,Te),!C&&!Te.isPropagationAllowed&&te.stopPropagation()}),B=ot(te=>{const Se=ae();return Se==="intentional"&&te.type!=="click"||Se==="sloppy"&&te.type==="click"}),Y=ot(()=>{d.current.insideReactTree=!0,q.start(0,L)}),fe=ot((te,Se=!1)=>{if(B(te)){L();return}if(d.current.insideReactTree){L();return}if(ae()==="intentional"&&Se||typeof E=="function"&&!E(te))return;const we=ao(te),$e=`[${Ab("inert")}]`,Te=fa(r.select("floatingElement")).querySelectorAll($e),Pe=r.context.triggerElements;if(we&&(Pe.hasElement(we)||Pe.hasMatchingElement(Je=>zn(Je,we))))return;let Ge=ir(we)?we:null;for(;Ge&&!lc(Ge);){const Je=cc(Ge);if(lc(Je)||!ir(Je))break;Ge=Je}if(Te.length&&ir(we)&&!Fve(we)&&!zn(we,r.select("floatingElement"))&&Array.from(Te).every(Je=>!zn(Ge,Je)))return;if(Gr(we)&&!("touches"in te)){const Je=lc(we),ke=Qo(we),Ue=/auto|scroll/,Xe=Je||Ue.test(ke.overflowX),Mt=Je||Ue.test(ke.overflowY),Ae=Xe&&we.clientWidth>0&&we.scrollWidth>we.clientWidth,xe=Mt&&we.clientHeight>0&&we.scrollHeight>we.clientHeight,Ne=ke.direction==="rtl",Ke=xe&&(Ne?te.offsetX<=we.offsetWidth-we.clientWidth:te.offsetX>we.clientWidth),vt=Ae&&te.offsetY>we.clientHeight;if(Ke||vt)return}const Ce=d.current.floatingContext?.nodeId,Be=S&&Ph(S.nodesRef.current,Ce).some(Je=>sl(te,Je.context?.elements.floating));if(sl(te,r.select("floatingElement"))||sl(te,r.select("domReferenceElement"))||Be)return;const Fe=S?Ph(S.nodesRef.current,Ce):[];if(Fe.length>0){let Je=!0;if(Fe.forEach(ke=>{ke.context?.open&&!ke.context.dataRef.current.__outsidePressBubbles&&(Je=!1)}),!Je)return}r.setOpen(!1,mn(g5,te)),L()}),se=ot(te=>{ae()!=="sloppy"||te.pointerType==="touch"||!r.select("open")||!h||sl(te,r.select("floatingElement"))||sl(te,r.select("domReferenceElement"))||fe(te)}),N=ot(te=>{if(ae()!=="sloppy"||!r.select("open")||!h||sl(te,r.select("floatingElement"))||sl(te,r.select("domReferenceElement")))return;const Se=te.touches[0];Se&&(D.current={startTime:Date.now(),startX:Se.clientX,startY:Se.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},$.start(1e3,()=>{D.current&&(D.current.dismissOnTouchEnd=!1,D.current.dismissOnMouseDown=!1)}))}),I=ot(te=>{const Se=ao(te);function we(){N(te),Se?.removeEventListener(te.type,we)}Se?.addEventListener(te.type,we)}),U=ot(te=>{const Se=O.current;if(O.current=!1,$.clear(),te.type==="mousedown"&&D.current&&!D.current.dismissOnMouseDown)return;const we=ao(te);function $e(){te.type==="pointerdown"?se(te):fe(te,Se),we?.removeEventListener(te.type,$e)}we?.addEventListener(te.type,$e)}),P=ot(te=>{if(ae()!=="sloppy"||!D.current||sl(te,r.select("floatingElement"))||sl(te,r.select("domReferenceElement")))return;const Se=te.touches[0];if(!Se)return;const we=Math.abs(Se.clientX-D.current.startX),$e=Math.abs(Se.clientY-D.current.startY),Te=Math.sqrt(we*we+$e*$e);Te>5&&(D.current.dismissOnTouchEnd=!0),Te>10&&(fe(te),$.clear(),D.current=null)}),G=ot(te=>{const Se=ao(te);function we(){P(te),Se?.removeEventListener(te.type,we)}Se?.addEventListener(te.type,we)}),ee=ot(te=>{ae()!=="sloppy"||!D.current||sl(te,r.select("floatingElement"))||sl(te,r.select("domReferenceElement"))||(D.current.dismissOnTouchEnd&&fe(te),$.clear(),D.current=null)}),ue=ot(te=>{const Se=ao(te);function we(){ee(te),Se?.removeEventListener(te.type,we)}Se?.addEventListener(te.type,we)});j.useEffect(()=>{if(!i||!h)return;d.current.__escapeKeyBubbles=C,d.current.__outsidePressBubbles=M;const te=new of;function Se(Ge){r.setOpen(!1,mn(af,Ge))}function we(){te.clear(),V.current=!0}function $e(){te.start(p2()?5:0,()=>{V.current=!1})}const Te=fa(s);Te.addEventListener("pointerdown",re,!0),m&&(Te.addEventListener("keydown",K),Te.addEventListener("compositionstart",we),Te.addEventListener("compositionend",$e)),E&&(Te.addEventListener("click",U,!0),Te.addEventListener("pointerdown",U,!0),Te.addEventListener("touchstart",I,!0),Te.addEventListener("touchmove",G,!0),Te.addEventListener("touchend",ue,!0),Te.addEventListener("mousedown",U,!0));let Pe=[];return _&&(ir(c)&&(Pe=Ic(c)),ir(s)&&(Pe=Pe.concat(Ic(s))),!ir(l)&&l&&l.contextElement&&(Pe=Pe.concat(Ic(l.contextElement)))),Pe=Pe.filter(Ge=>Ge!==Te.defaultView?.visualViewport),Pe.forEach(Ge=>{Ge.addEventListener("scroll",Se,{passive:!0})}),()=>{Te.removeEventListener("pointerdown",re,!0),m&&(Te.removeEventListener("keydown",K),Te.removeEventListener("compositionstart",we),Te.removeEventListener("compositionend",$e)),E&&(Te.removeEventListener("click",U,!0),Te.removeEventListener("pointerdown",U,!0),Te.removeEventListener("touchstart",I,!0),Te.removeEventListener("touchmove",G,!0),Te.removeEventListener("touchend",ue,!0),Te.removeEventListener("mousedown",U,!0)),Pe.forEach(Ge=>{Ge.removeEventListener("scroll",Se)}),te.clear(),O.current=!1}},[d,s,l,c,m,E,i,f,_,h,C,M,K,fe,U,se,I,G,ue,re,r]),j.useEffect(L,[E,L]);const ve=j.useMemo(()=>({onKeyDown:K,...w&&{[ESe[b]]:te=>{r.setOpen(!1,mn(Fc,te.nativeEvent))},...b!=="intentional"&&{onClick(te){r.setOpen(!1,mn(Fc,te.nativeEvent))}}}}),[K,r,w,b]),Ee=ot(te=>{const Se=ao(te.nativeEvent);!zn(r.select("floatingElement"),Se)||te.button!==0||(O.current=!0)}),Oe=ot(te=>{!i||!h||te.button!==0||(O.current=!0)}),de=j.useMemo(()=>({onKeyDown:K,onPointerDown:Ee,onMouseDown:Ee,onMouseUp:Ee,onClickCapture:Y,onMouseDownCapture(te){Y(),Oe(te)},onPointerDownCapture(te){Y(),Oe(te)},onMouseUpCapture:Y,onTouchEndCapture:Y,onTouchMoveCapture:Y}),[K,Ee,Y,Oe]);return j.useMemo(()=>h?{reference:ve,floating:de,trigger:ve}:{},[h,ve,de])}var Fw=Symbol("NOT_FOUND");function _Se(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function TSe(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function CSe(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(i=>typeof i=="function"?`function ${i.name||"unnamed"}()`:typeof i).join(", ");throw new TypeError(`${t}[${r}]`)}}var sN=e=>Array.isArray(e)?e:[e];function OSe(e){const t=Array.isArray(e[0])?e[0]:e;return CSe(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function RSe(e,t){const r=[],{length:i}=e;for(let s=0;s<i;s++)r.push(e[s].apply(null,t));return r}function ASe(e){let t;return{get(r){return t&&e(t.key,r)?t.value:Fw},put(r,i){t={key:r,value:i}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function MSe(e,t){let r=[];function i(f){const d=r.findIndex(h=>t(f,h.key));if(d>-1){const h=r[d];return d>0&&(r.splice(d,1),r.unshift(h)),h.value}return Fw}function s(f,d){i(f)===Fw&&(r.unshift({key:f,value:d}),r.length>e&&r.pop())}function l(){return r}function c(){r=[]}return{get:i,put:s,getEntries:l,clear:c}}var jSe=(e,t)=>e===t;function kSe(e){return function(r,i){if(r===null||i===null||r.length!==i.length)return!1;const{length:s}=r;for(let l=0;l<s;l++)if(!e(r[l],i[l]))return!1;return!0}}function DSe(e,t){const r=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:i=jSe,maxSize:s=1,resultEqualityCheck:l}=r,c=kSe(i);let f=0;const d=s<=1?ASe(c):MSe(s,c);function h(){let m=d.get(arguments);if(m===Fw){if(m=e.apply(null,arguments),f++,l){const v=d.getEntries().find(w=>l(w.value,m));v&&(m=v.value,f!==0&&f--)}d.put(arguments,m)}return m}return h.clearCache=()=>{d.clear(),h.resetResultsCount()},h.resultsCount=()=>f,h.resetResultsCount=()=>{f=0},h}var NSe=class{constructor(e){this.value=e}deref(){return this.value}},zSe=typeof WeakRef<"u"?WeakRef:NSe,$Se=0,lN=1;function AS(){return{s:$Se,v:void 0,o:null,p:null}}function QL(e,t={}){let r=AS();const{resultEqualityCheck:i}=t;let s,l=0;function c(){let f=r;const{length:d}=arguments;for(let g=0,v=d;g<v;g++){const w=arguments[g];if(typeof w=="function"||typeof w=="object"&&w!==null){let b=f.o;b===null&&(f.o=b=new WeakMap);const _=b.get(w);_===void 0?(f=AS(),b.set(w,f)):f=_}else{let b=f.p;b===null&&(f.p=b=new Map);const _=b.get(w);_===void 0?(f=AS(),b.set(w,f)):f=_}}const h=f;let m;if(f.s===lN)m=f.v;else if(m=e.apply(null,arguments),l++,i){const g=s?.deref?.()??s;g!=null&&i(g,m)&&(m=g,l!==0&&l--),s=typeof m=="object"&&m!==null||typeof m=="function"?new zSe(m):m}return h.s=lN,h.v=m,m}return c.clearCache=()=>{r=AS(),c.resetResultsCount()},c.resultsCount=()=>l,c.resetResultsCount=()=>{l=0},c}function WL(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,i=(...s)=>{let l=0,c=0,f,d={},h=s.pop();typeof h=="object"&&(d=h,h=s.pop()),_Se(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const m={...r,...d},{memoize:g,memoizeOptions:v=[],argsMemoize:w=QL,argsMemoizeOptions:b=[]}=m,_=sN(v),x=sN(b),R=OSe(s),S=g(function(){return l++,h.apply(null,arguments)},..._),T=w(function(){c++;const O=RSe(R,arguments);return f=S.apply(null,O),f},...x);return Object.assign(T,{resultFunc:h,memoizedResultFunc:S,dependencies:R,dependencyRecomputations:()=>c,resetDependencyRecomputations:()=>{c=0},lastResult:()=>f,recomputations:()=>l,resetRecomputations:()=>{l=0},memoize:g,argsMemoize:w})};return Object.assign(i,{withTypes:()=>i}),i}var PSe=WL(QL),ISe=Object.assign((e,t=PSe)=>{TSe(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const r=Object.keys(e),i=r.map(l=>e[l]);return t(i,(...l)=>l.reduce((c,f,d)=>(c[r[d]]=f,c),{}))},{withTypes:()=>ISe});WL({memoize:DSe,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const ut=(e,t,r,i,s,l,...c)=>{if(c.length>0)throw new Error(Si(1));let f;if(e)f=e;else throw new Error("Missing arguments");return f};var jT={exports:{}},kT={};var uN;function LSe(){if(uN)return kT;uN=1;var e=wm();function t(g,v){return g===v&&(g!==0||1/g===1/v)||g!==g&&v!==v}var r=typeof Object.is=="function"?Object.is:t,i=e.useState,s=e.useEffect,l=e.useLayoutEffect,c=e.useDebugValue;function f(g,v){var w=v(),b=i({inst:{value:w,getSnapshot:v}}),_=b[0].inst,x=b[1];return l(function(){_.value=w,_.getSnapshot=v,d(_)&&x({inst:_})},[g,w,v]),s(function(){return d(_)&&x({inst:_}),g(function(){d(_)&&x({inst:_})})},[g]),c(w),w}function d(g){var v=g.getSnapshot;g=g.value;try{var w=v();return!r(g,w)}catch{return!0}}function h(g,v){return v()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:f;return kT.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,kT}var cN;function JL(){return cN||(cN=1,jT.exports=LSe()),jT.exports}var USe=JL(),DT={exports:{}},NT={};var fN;function qSe(){if(fN)return NT;fN=1;var e=wm(),t=JL();function r(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}var i=typeof Object.is=="function"?Object.is:r,s=t.useSyncExternalStore,l=e.useRef,c=e.useEffect,f=e.useMemo,d=e.useDebugValue;return NT.useSyncExternalStoreWithSelector=function(h,m,g,v,w){var b=l(null);if(b.current===null){var _={hasValue:!1,value:null};b.current=_}else _=b.current;b=f(function(){function R(C){if(!S){if(S=!0,T=C,C=v(C),w!==void 0&&_.hasValue){var M=_.value;if(w(M,C))return E=M}return E=C}if(M=E,i(T,C))return M;var D=v(C);return w!==void 0&&w(M,D)?(T=C,M):(T=C,E=D)}var S=!1,T,E,O=g===void 0?null:g;return[function(){return R(m())},O===null?void 0:function(){return R(O())}]},[m,g,v,w]);var x=s(h,b[0],b[1]);return c(function(){_.hasValue=!0,_.value=x},[x]),d(x),x},NT}var dN;function VSe(){return dN||(dN=1,DT.exports=qSe()),DT.exports}var FSe=VSe();const BSe=QR(19),HSe=BSe?GSe:KSe;function qt(e,t,r,i,s){return HSe(e,t,r,i,s)}function GSe(e,t,r,i,s){const l=j.useCallback(()=>t(e.getSnapshot(),r,i,s),[e,t,r,i,s]);return USe.useSyncExternalStore(e.subscribe,l,l)}function KSe(e,t,r,i,s){return FSe.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,l=>t(l,r,i,s))}class em{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const r=this.updateTick;for(const i of this.listeners){if(r!==this.updateTick)return;i(t)}}update(t){for(const r in t)if(!Object.is(this.state[r],t[r])){em.prototype.setState.call(this,{...this.state,...t});return}}set(t,r){Object.is(this.state[t],r)||em.prototype.setState.call(this,{...this.state,[t]:r})}notifyAll(){const t={...this.state};em.prototype.setState.call(this,t)}}class A5 extends em{constructor(t,r={},i){super(t),this.context=r,this.selectors=i}controlledValues=new Map;useSyncedValue(t,r){j.useDebugValue(t),ct(()=>{this.state[t]!==r&&this.set(t,r)},[t,r])}useSyncedValueWithCleanup(t,r){const i=this;ct(()=>(i.state[t]!==r&&i.set(t,r),()=>{i.set(t,void 0)}),[i,t,r])}useSyncedValues(t){const r=this,i=Object.values(t);ct(()=>{r.update(t)},[r,...i])}useControlledProp(t,r,i){j.useDebugValue(t);const s=this,l=r!==void 0;this.controlledValues.has(t)||(this.controlledValues.set(t,l),!l&&!Object.is(this.state[t],i)&&super.setState({...this.state,[t]:i})),ct(()=>{l&&!Object.is(s.state[t],r)&&super.setState({...s.state,[t]:r})},[s,t,r,i,l])}set(t,r){this.controlledValues.get(t)!==!0&&super.set(t,r)}update(t){const r={...t};for(const i in r)if(Object.hasOwn(r,i)&&this.controlledValues.get(i)===!0){delete r[i];continue}super.update(r)}setState(t){const r={...t};for(const i in r)if(Object.hasOwn(r,i)&&this.controlledValues.get(i)===!0){delete r[i];continue}super.setState({...this.state,...r})}select=(t,r,i,s)=>{const l=this.selectors[t];return l(this.state,r,i,s)};useState=(t,r,i,s)=>{j.useDebugValue(t);const l=this.selectors[t];return qt(this,l,r,i,s)};useContextCallback(t,r){j.useDebugValue(t);const i=ot(r??Yo);this.context[t]=i}useStateSetter(t){const r=j.useRef(void 0);return r.current===void 0&&(r.current=i=>{this.set(t,i)}),r.current}observe(t,r){let i;typeof t=="function"?i=t:i=this.selectors[t];let s=i(this.state);return r(s,s,this),this.subscribe(l=>{const c=i(l);if(!Object.is(s,c)){const f=s;s=c,r(c,f,this)}})}}const YSe={open:ut(e=>e.open),domReferenceElement:ut(e=>e.domReferenceElement),referenceElement:ut(e=>e.positionReference??e.referenceElement),floatingElement:ut(e=>e.floatingElement),floatingId:ut(e=>e.floatingId)};class M5 extends A5{constructor(t){const{nested:r,noEmit:i,onOpenChange:s,triggerElements:l,...c}=t;super({...c,positionReference:c.referenceElement,domReferenceElement:c.referenceElement},{onOpenChange:s,dataRef:{current:{}},events:NL(),nested:r,noEmit:i,triggerElements:l},YSe)}setOpen=(t,r)=>{if((!t||!this.state.open||iL(r.event))&&(this.context.dataRef.current.openEvent=t?r.event:void 0),!this.context.noEmit){const i={open:t,reason:r.reason,nativeEvent:r.event,nested:this.context.nested,triggerElement:r.trigger};this.context.events.emit("openchange",i)}this.context.onOpenChange?.(t,r)}}function N2(e,t=!1,r=!1){const[i,s]=j.useState(e&&t?"idle":void 0),[l,c]=j.useState(e);return e&&!l&&(c(!0),s("starting")),!e&&l&&i!=="ending"&&!r&&s("ending"),!e&&!l&&i==="ending"&&s(void 0),ct(()=>{if(!e&&l&&i!=="ending"&&r){const f=Tl.request(()=>{s("ending")});return()=>{Tl.cancel(f)}}},[e,l,i,r]),ct(()=>{if(!e||t)return;const f=Tl.request(()=>{s(void 0)});return()=>{Tl.cancel(f)}},[t,e]),ct(()=>{if(!e||!t)return;e&&l&&i!=="idle"&&s("starting");const f=Tl.request(()=>{s("idle")});return()=>{Tl.cancel(f)}},[t,e,l,s,i]),j.useMemo(()=>({mounted:l,setMounted:c,transitionStatus:i}),[l,i])}function eU(e,t=!1,r=!0){const i=k2();return ot((s,l=null)=>{i.cancel();function c(){ms.flushSync(s)}const f=ic(e);if(f==null)return;const d=f;if(typeof d.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)s();else{let g=function(){const w=Rb.startingStyle;if(!d.hasAttribute(w)){i.request(v);return}const b=new MutationObserver(()=>{d.hasAttribute(w)||(b.disconnect(),v())});b.observe(d,{attributes:!0,attributeFilter:[w]}),l?.addEventListener("abort",()=>b.disconnect(),{once:!0})},v=function(){Promise.all(d.getAnimations().map(w=>w.finished)).then(()=>{l?.aborted||c()}).catch(()=>{const w=d.getAnimations();if(r){if(l?.aborted)return;c()}else w.length>0&&w.some(b=>b.pending||b.playState!=="finished")&&v()})};var h=g,m=v;if(t){g();return}i.request(v)}})}function cp(e){const{enabled:t=!0,open:r,ref:i,onComplete:s}=e,l=ot(s),c=eU(i,r,!1);j.useEffect(()=>{if(!t)return;const f=new AbortController;return c(l,f.signal),()=>{f.abort()}},[t,r,l,c])}function ZSe(e,t){const r=j.useRef(null),i=j.useRef(null);return j.useCallback(s=>{if(e!==void 0){if(r.current!==null){const l=r.current,c=i.current,f=t.context.triggerElements.getById(l);c&&f===c&&t.context.triggerElements.delete(l),r.current=null,i.current=null}s!==null&&(r.current=e,i.current=s,t.context.triggerElements.add(e,s))}},[t,e])}function XSe(e,t,r,i){const s=r.useState("isMountedByTrigger",e),l=ZSe(e,r),c=ot(f=>{if(l(f),!f||!r.select("open"))return;const d=r.select("activeTriggerId");if(d===e){r.update({activeTriggerElement:f,...i});return}d==null&&r.update({activeTriggerId:e,activeTriggerElement:f,...i})});return ct(()=>{s&&r.update({activeTriggerElement:t.current,...i})},[s,r,t,...Object.values(i)]),{registerTrigger:c,isMountedByThisTrigger:s}}function tU(e){const t=e.useState("open");ct(()=>{if(t&&!e.select("activeTriggerId")&&e.context.triggerElements.size===1){const r=e.context.triggerElements.entries().next();if(!r.done){const[i,s]=r.value;e.update({activeTriggerId:i,activeTriggerElement:s})}}},[t,e])}function nU(e,t,r){const{mounted:i,setMounted:s,transitionStatus:l}=N2(e);t.useSyncedValues({mounted:i,transitionStatus:l});const c=ot(()=>{s(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),r?.(),t.context.onOpenChangeComplete?.(!1)}),f=t.useState("preventUnmountingOnClose");return cp({enabled:!f,open:e,ref:t.context.popupRef,onComplete(){e||c()}}),{forceUnmount:c,transitionStatus:l}}class z2{constructor(){this.elements=new Set,this.idMap=new Map}add(t,r){const i=this.idMap.get(t);i!==r&&(i!==void 0&&this.elements.delete(i),this.elements.add(r),this.idMap.set(t,r))}delete(t){const r=this.idMap.get(t);r&&(this.elements.delete(r),this.idMap.delete(t))}hasElement(t){return this.elements.has(t)}hasMatchingElement(t){for(const r of this.elements)if(t(r))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}get size(){return this.idMap.size}}function QSe(){return new M5({open:!1,floatingElement:null,referenceElement:null,triggerElements:new z2,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0})}function rU(){return{open:!1,mounted:!1,transitionStatus:"idle",floatingRootContext:QSe(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,popupElement:null,positionerElement:null,activeTriggerProps:Da,inactiveTriggerProps:Da,popupProps:Da}}const aU={open:ut(e=>e.open),mounted:ut(e=>e.mounted),transitionStatus:ut(e=>e.transitionStatus),floatingRootContext:ut(e=>e.floatingRootContext),preventUnmountingOnClose:ut(e=>e.preventUnmountingOnClose),payload:ut(e=>e.payload),activeTriggerId:ut(e=>e.activeTriggerId),activeTriggerElement:ut(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:ut((e,t)=>t!==void 0&&e.activeTriggerId===t),isOpenedByTrigger:ut((e,t)=>t!==void 0&&e.activeTriggerId===t&&e.open),isMountedByTrigger:ut((e,t)=>t!==void 0&&e.activeTriggerId===t&&e.mounted),triggerProps:ut((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:ut(e=>e.popupProps),popupElement:ut(e=>e.popupElement),positionerElement:ut(e=>e.positionerElement)};function iU(e){const{open:t=!1,onOpenChange:r,elements:i={}}=e,s=Lm(),l=gf()!=null,c=so(()=>new M5({open:t,onOpenChange:r,referenceElement:i.reference??null,floatingElement:i.floating??null,triggerElements:i.triggers??new z2,floatingId:s,nested:l,noEmit:e.noEmit||!1})).current;return ct(()=>{const f={open:t,floatingId:s};i.reference!==void 0&&(f.referenceElement=i.reference,f.domReferenceElement=ir(i.reference)?i.reference:null),i.floating!==void 0&&(f.floatingElement=i.floating),c.update(f)},[t,s,i.reference,i.floating,c]),c.context.onOpenChange=r,c.context.nested=l,c.context.noEmit=e.noEmit||!1,c}function WSe(e={}){const{nodeId:t,externalTree:r}=e,i=iU(e),s=e.rootContext||i,l={reference:s.useState("referenceElement"),floating:s.useState("floatingElement"),domReference:s.useState("domReferenceElement")},[c,f]=j.useState(null),d=j.useRef(null),h=up(r);ct(()=>{l.domReference&&(d.current=l.domReference)},[l.domReference]);const m=mSe({...e,elements:{...l,...c&&{reference:c}}}),g=j.useCallback(M=>{const D=ir(M)?{getBoundingClientRect:()=>M.getBoundingClientRect(),getClientRects:()=>M.getClientRects(),contextElement:M}:M;f(D),m.refs.setReference(D)},[m.refs]),[v,w]=j.useState(null),[b,_]=j.useState(null);s.useSyncedValue("referenceElement",v),s.useSyncedValue("domReferenceElement",ir(v)?v:null),s.useSyncedValue("floatingElement",b);const x=j.useCallback(M=>{(ir(M)||M===null)&&(d.current=M,w(M)),(ir(m.refs.reference.current)||m.refs.reference.current===null||M!==null&&!ir(M))&&m.refs.setReference(M)},[m.refs,w]),R=j.useCallback(M=>{_(M),m.refs.setFloating(M)},[m.refs]),S=j.useMemo(()=>({...m.refs,setReference:x,setFloating:R,setPositionReference:g,domReference:d}),[m.refs,x,R,g]),T=j.useMemo(()=>({...m.elements,domReference:l.domReference}),[m.elements,l.domReference]),E=s.useState("open"),O=s.useState("floatingId"),C=j.useMemo(()=>({...m,dataRef:s.context.dataRef,open:E,onOpenChange:s.setOpen,events:s.context.events,floatingId:O,refs:S,elements:T,nodeId:t,rootStore:s}),[m,S,T,t,s,E,O]);return ct(()=>{s.context.dataRef.current.floatingContext=C;const M=h?.nodesRef.current.find(D=>D.id===t);M&&(M.context=C)}),j.useMemo(()=>({...m,context:C,refs:S,elements:T,rootStore:s}),[m,S,T,C,s])}function oU(e){const{popupStore:t,noEmit:r=!1,treatPopupAsFloatingElement:i=!1,onOpenChange:s}=e,l=Lm(),c=gf()!=null,f=t.useState("open"),d=t.useState("activeTriggerElement"),h=t.useState(i?"popupElement":"positionerElement"),m=t.context.triggerElements,g=so(()=>new M5({open:f,referenceElement:d,floatingElement:h,triggerElements:m,onOpenChange:s,floatingId:l,nested:c,noEmit:r})).current;return ct(()=>{const v={open:f,floatingId:l,referenceElement:d,floatingElement:h};ir(d)&&(v.domReferenceElement=d),g.state.positionReference===g.state.referenceElement&&(v.positionReference=d),g.update(v)},[f,l,d,h,g]),g.context.onOpenChange=s,g.context.nested=c,g.context.noEmit=r,g}const AO=Ab("safe-polygon"),JSe=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${tL}`;function ewe(e){return e?!!e.closest(JSe):!1}function sU(e){const t=j.useRef(void 0),r=j.useRef(!1),i=j.useRef(void 0),s=j.useRef(!0),l=j.useRef(!1),c=j.useRef(()=>{}),f=j.useRef(!1),d=no(),h=no(),m=j.useRef(void 0);return j.useMemo(()=>{const g=e.context.dataRef.current;return g.hoverInteractionState||(g.hoverInteractionState={pointerTypeRef:t,interactedInsideRef:r,handlerRef:i,blockMouseMoveRef:s,performedPointerEventsMutationRef:l,unbindMouseMoveRef:c,restTimeoutPendingRef:f,openChangeTimeout:d,restTimeout:h,handleCloseOptionsRef:m}),g.hoverInteractionState},[e,t,r,i,s,l,c,f,d,h,m])}const twe=new Set(["click","mousedown"]);function nwe(e,t={}){const r="rootStore"in e?e.rootStore:e,i=r.useState("open"),s=r.useState("floatingElement"),l=r.useState("domReferenceElement"),{dataRef:c}=r.context,{enabled:f=!0,closeDelay:d=0,externalTree:h}=t,{pointerTypeRef:m,interactedInsideRef:g,handlerRef:v,performedPointerEventsMutationRef:w,unbindMouseMoveRef:b,restTimeoutPendingRef:_,openChangeTimeout:x,handleCloseOptionsRef:R}=sU(r),S=up(h),T=gf(),E=ot(()=>g.current?!0:c.current.openEvent?twe.has(c.current.openEvent.type):!1),O=ot(()=>{const q=c.current.openEvent?.type;return q?.includes("mouse")&&q!=="mousedown"}),C=j.useCallback((q,L=!0)=>{const V=rwe(d,m.current);V&&!v.current?x.start(V,()=>r.setOpen(!1,mn(Go,q))):L&&(x.clear(),r.setOpen(!1,mn(Go,q)))},[d,v,r,m,x]),M=ot(()=>{b.current(),v.current=void 0}),D=ot(()=>{if(w.current){const q=fa(s).body;q.style.pointerEvents="",q.removeAttribute(AO),w.current=!1}}),$=ot(q=>{const L=ao(q);if(!ewe(L)){g.current=!1;return}g.current=!0});ct(()=>{i||(m.current=void 0,_.current=!1,g.current=!1,M(),D())},[i,m,_,g,M,D]),j.useEffect(()=>()=>{M()},[M]),j.useEffect(()=>D,[D]),ct(()=>{if(f&&i&&R.current?.blockPointerEvents&&O()&&ir(l)&&s){w.current=!0;const q=fa(s).body;q.setAttribute(AO,"");const L=l,V=s,F=S?.nodesRef.current.find(re=>re.id===T)?.context?.elements.floating;return F&&(F.style.pointerEvents=""),q.style.pointerEvents="none",L.style.pointerEvents="auto",V.style.pointerEvents="auto",()=>{q.style.pointerEvents="",L.style.pointerEvents="",V.style.pointerEvents=""}}},[f,i,l,s,R,O,S,T,w]),j.useEffect(()=>{if(!f)return;function q(re){if(E()||!c.current.floatingContext||!r.select("open"))return;const ae=r.context.triggerElements;re.relatedTarget&&ae.hasElement(re.relatedTarget)||(D(),M(),E()||C(re))}function L(re){x.clear(),D(),v.current?.(re),M()}function V(re){E()||C(re,!1)}const F=s;return F&&(F.addEventListener("mouseleave",q),F.addEventListener("mouseenter",L),F.addEventListener("mouseleave",V),F.addEventListener("pointerdown",$,!0)),()=>{F&&(F.removeEventListener("mouseleave",q),F.removeEventListener("mouseenter",L),F.removeEventListener("mouseleave",V),F.removeEventListener("pointerdown",$,!0))}})}function rwe(e,t){return t&&!mm(t)?0:typeof e=="function"?e():e}function zT(e){return typeof e=="function"?e():e}const awe={current:null};function iwe(e,t={}){const r="rootStore"in e?e.rootStore:e,{dataRef:i,events:s}=r.context,{enabled:l=!0,delay:c=0,handleClose:f=null,mouseOnly:d=!1,restMs:h=0,move:m=!0,triggerElementRef:g=awe,externalTree:v,isActiveTrigger:w=!0}=t,b=up(v),{pointerTypeRef:_,interactedInsideRef:x,handlerRef:R,blockMouseMoveRef:S,performedPointerEventsMutationRef:T,unbindMouseMoveRef:E,restTimeoutPendingRef:O,openChangeTimeout:C,restTimeout:M,handleCloseOptionsRef:D}=sU(r),$=ka(f),q=ka(c),L=ka(h);w&&(D.current=$.current?.__options);const V=ot(()=>x.current?!0:i.current.openEvent?["click","mousedown"].includes(i.current.openEvent.type):!1),F=j.useCallback((B,Y=!0)=>{const fe=CT(q.current,"close",_.current);fe&&!R.current?C.start(fe,()=>r.setOpen(!1,mn(Go,B))):Y&&(C.clear(),r.setOpen(!1,mn(Go,B)))},[q,R,r,_,C]),re=ot(()=>{E.current(),R.current=void 0}),ae=ot(()=>{if(T.current){const B=fa(r.select("domReferenceElement")).body;B.style.pointerEvents="",B.removeAttribute(AO),T.current=!1}});j.useEffect(()=>{if(!l)return;function B(Y){Y.open||(C.clear(),M.clear(),S.current=!0,O.current=!1)}return s.on("openchange",B),()=>{s.off("openchange",B)}},[l,s,C,M,S,O]);const K=ot(B=>{if(V()||!i.current.floatingContext)return;const Y=r.context.triggerElements;if(B.relatedTarget&&Y.hasElement(B.relatedTarget))return;const fe=g.current;$.current?.({...i.current.floatingContext,tree:b,x:B.clientX,y:B.clientY,onClose(){ae(),re(),!V()&&fe===r.select("domReferenceElement")&&F(B)}})(B)});return j.useEffect(()=>{if(!l)return;const B=g.current??(w?r.select("domReferenceElement"):null);if(!ir(B))return;function Y(N){if(C.clear(),S.current=!1,d&&!mm(_.current)||zT(L.current)>0&&!CT(q.current,"open"))return;const I=CT(q.current,"open",_.current),U=r.select("domReferenceElement"),P=r.context.triggerElements,G=(P.hasElement(N.target)||P.hasMatchingElement(Ee=>zn(Ee,N.target)))&&(!U||!zn(U,N.target)),ee=N.currentTarget??null,ue=r.select("open"),ve=!ue||G;G&&ue?r.setOpen(!0,mn(Go,N,ee)):I?C.start(I,()=>{ve&&r.setOpen(!0,mn(Go,N,ee))}):ve&&r.setOpen(!0,mn(Go,N,ee))}function fe(N){if(V()){ae();return}E.current();const I=r.select("domReferenceElement"),U=fa(I);M.clear(),O.current=!1;const P=r.context.triggerElements;if(N.relatedTarget&&P.hasElement(N.relatedTarget))return;if($.current&&i.current.floatingContext){r.select("open")||C.clear();const ee=g.current;R.current=$.current({...i.current.floatingContext,tree:b,x:N.clientX,y:N.clientY,onClose(){ae(),re(),!V()&&ee===r.select("domReferenceElement")&&F(N,!0)}});const ue=R.current;ue(N),U.addEventListener("mousemove",ue),E.current=()=>{U.removeEventListener("mousemove",ue)};return}(_.current!=="touch"||!zn(r.select("floatingElement"),N.relatedTarget))&&F(N)}function se(N){K(N)}return r.select("open")&&B.addEventListener("mouseleave",se),m&&B.addEventListener("mousemove",Y,{once:!0}),B.addEventListener("mouseenter",Y),B.addEventListener("mouseleave",fe),()=>{B.removeEventListener("mouseleave",se),m&&B.removeEventListener("mousemove",Y),B.removeEventListener("mouseenter",Y),B.removeEventListener("mouseleave",fe)}},[re,ae,S,i,q,F,r,l,$,K,w,V,d,m,_,L,M,O,C,g,b,E,R]),j.useMemo(()=>{function B(Y){_.current=Y.pointerType}return{onPointerDown:B,onPointerEnter:B,onMouseMove(Y){const{nativeEvent:fe}=Y,se=Y.currentTarget,N=r.select("domReferenceElement"),I=r.context.triggerElements,U=r.select("open"),P=(I.hasElement(Y.target)||I.hasMatchingElement(ee=>zn(ee,Y.target)))&&(!N||!zn(N,Y.target));if(d&&!mm(_.current)||U&&!P||zT(L.current)===0||!P&&O.current&&Y.movementX**2+Y.movementY**2<2)return;M.clear();function G(){if(O.current=!1,V())return;const ee=r.select("open");!S.current&&(!ee||P)&&r.setOpen(!0,mn(Go,fe,se))}_.current==="touch"?ms.flushSync(()=>{G()}):P&&U?G():(O.current=!0,M.start(zT(L.current),G))}}},[S,V,d,r,_,L,M,O])}function $2(e=[]){const t=e.map(h=>h?.reference),r=e.map(h=>h?.floating),i=e.map(h=>h?.item),s=e.map(h=>h?.trigger),l=j.useCallback(h=>MS(h,e,"reference"),t),c=j.useCallback(h=>MS(h,e,"floating"),r),f=j.useCallback(h=>MS(h,e,"item"),i),d=j.useCallback(h=>MS(h,e,"trigger"),s);return j.useMemo(()=>({getReferenceProps:l,getFloatingProps:c,getItemProps:f,getTriggerProps:d}),[l,c,f,d])}function MS(e,t,r){const i=new Map,s=r==="item",l={};r==="floating"&&(l.tabIndex=-1,l[bO]="");for(const c in e)s&&e&&(c===J7||c===eL)||(l[c]=e[c]);for(let c=0;c<t.length;c+=1){let f;const d=t[c]?.[r];typeof d=="function"?f=e?d(e):null:f=d,f&&hN(l,f,s,i)}return hN(l,e,s,i),l}function hN(e,t,r,i){for(const s in t){const l=t[s];r&&(s===J7||s===eL)||(s.startsWith("on")?(i.has(s)||i.set(s,[]),typeof l=="function"&&(i.get(s)?.push(l),e[s]=(...c)=>i.get(s)?.map(f=>f(...c)).find(f=>f!==void 0))):e[s]=l)}}const owe="Escape";function P2(e,t,r){switch(e){case"vertical":return t;case"horizontal":return r;default:return t||r}}function jS(e,t){return P2(t,e===y5||e===l1,e===Bc||e===Hc)}function $T(e,t,r){return P2(t,e===l1,r?e===Bc:e===Hc)||e==="Enter"||e===" "||e===""}function swe(e,t,r){return P2(t,r?e===Bc:e===Hc,e===l1)}function lwe(e,t,r,i){const s=r?e===Hc:e===Bc,l=e===y5;return t==="both"||t==="horizontal"&&i&&i>1?e===owe:P2(t,s,l)}function uwe(e,t){const r="rootStore"in e?e.rootStore:e,i=r.useState("open"),s=r.useState("floatingElement"),l=r.useState("domReferenceElement"),c=r.context.dataRef,{listRef:f,activeIndex:d,onNavigate:h=()=>{},enabled:m=!0,selectedIndex:g=null,allowEscape:v=!1,loopFocus:w=!1,nested:b=!1,rtl:_=!1,virtual:x=!1,focusItemOnOpen:R="auto",focusItemOnHover:S=!0,openOnArrowKeyDown:T=!0,disabledIndices:E=void 0,orientation:O="vertical",parentOrientation:C,cols:M=1,scrollItemIntoView:D=!0,itemSizes:$,dense:q=!1,id:L,resetOnPointerLeave:V=!0,externalTree:F}=t,re=Cb(s),ae=ka(re),K=gf(),B=up(F);ct(()=>{c.current.orientation=O},[c,O]);const Y=SO(l),fe=j.useRef(R),se=j.useRef(g??-1),N=j.useRef(null),I=j.useRef(!0),U=ot(ke=>{h(se.current===-1?null:se.current,ke)}),P=j.useRef(U),G=j.useRef(!!s),ee=j.useRef(i),ue=j.useRef(!1),ve=j.useRef(!1),Ee=ka(E),Oe=ka(i),de=ka(D),te=ka(g),Se=ka(V),we=ot(()=>{function ke(Ae){x?B?.events.emit("virtualfocus",Ae):tw(Ae,{sync:ue.current,preventScroll:!0})}const Ue=f.current[se.current],Xe=ve.current;Ue&&ke(Ue),(ue.current?Ae=>Ae():requestAnimationFrame)(()=>{const Ae=f.current[se.current]||Ue;if(!Ae)return;Ue||ke(Ae);const xe=de.current;xe&&Te&&(Xe||!I.current)&&Ae.scrollIntoView?.(typeof xe=="boolean"?{block:"nearest",inline:"nearest"}:xe)})});ct(()=>{m&&(i&&s?(se.current=g??-1,fe.current&&g!=null&&(ve.current=!0,U())):G.current&&(se.current=-1,P.current()))},[m,i,s,g,U]),ct(()=>{if(m){if(!i){ue.current=!1;return}if(s)if(d==null){if(ue.current=!1,te.current!=null)return;if(G.current&&(se.current=-1,we()),(!ee.current||!G.current)&&fe.current&&(N.current!=null||fe.current===!0&&N.current==null)){let ke=0;const Ue=()=>{f.current[0]==null?(ke<2&&(ke?requestAnimationFrame:queueMicrotask)(Ue),ke+=1):(se.current=N.current==null||$T(N.current,O,_)||b?JS(f):xO(f),N.current=null,U())};Ue()}}else Yp(f,d)||(se.current=d,we(),ve.current=!1)}},[m,i,s,d,te,b,f,O,_,U,we,Ee]),ct(()=>{if(!m||s||!B||x||!G.current)return;const ke=B.nodesRef.current,Ue=ke.find(Ae=>Ae.id===K)?.context?.elements.floating,Xe=oc(fa(s)),Mt=ke.some(Ae=>Ae.context&&zn(Ae.context.elements.floating,Xe));Ue&&!Mt&&I.current&&Ue.focus({preventScroll:!0})},[m,s,B,K,x]),ct(()=>{P.current=U,ee.current=i,G.current=!!s}),ct(()=>{i||(N.current=null,fe.current=R)},[i,R]);const $e=d!=null,Te=j.useMemo(()=>{function ke(Xe){if(!Oe.current)return;const Mt=f.current.indexOf(Xe.currentTarget);Mt!==-1&&se.current!==Mt&&(se.current=Mt,U(Xe))}return{onFocus(Xe){ue.current=!0,ke(Xe)},onClick:({currentTarget:Xe})=>Xe.focus({preventScroll:!0}),onMouseMove(Xe){ue.current=!0,ve.current=!1,S&&ke(Xe)},onPointerLeave(Xe){if(!Oe.current||!I.current||Xe.pointerType==="touch")return;ue.current=!0;const Mt=Xe.relatedTarget;!S||f.current.includes(Mt)||Se.current&&(se.current=-1,U(Xe),x||ae.current?.focus({preventScroll:!0}))}}},[Oe,ae,S,f,U,Se,x]),Pe=j.useCallback(()=>C??B?.nodesRef.current.find(ke=>ke.id===K)?.context?.dataRef?.current.orientation,[K,B,C]),Ge=ot(ke=>{if(I.current=!1,ue.current=!0,ke.which===229||!Oe.current&&ke.currentTarget===ae.current)return;if(b&&lwe(ke.key,O,_,M)){jS(ke.key,Pe())||Ti(ke),r.setOpen(!1,mn(xT,ke.nativeEvent)),Gr(l)&&(x?B?.events.emit("virtualfocus",l):l.focus());return}const Ue=se.current,Xe=JS(f,E),Mt=xO(f,E);if(Y||(ke.key==="Home"&&(Ti(ke),se.current=Xe,U(ke)),ke.key==="End"&&(Ti(ke),se.current=Mt,U(ke))),M>1){const Ae=$||Array.from({length:f.current.length},()=>({width:1,height:1})),xe=lL(Ae,M,q),Ne=xe.findIndex(Xt=>Xt!=null&&!Gc(f,Xt,E)),Ke=xe.reduce((Xt,Vt,wt)=>Vt!=null&&!Gc(f,Vt,E)?wt:Xt,-1),vt=xe[sL({current:xe.map(Xt=>Xt!=null?f.current[Xt]:null)},{event:ke,orientation:O,loopFocus:w,rtl:_,cols:M,disabledIndices:cL([...(typeof E!="function"?E:null)||f.current.map((Xt,Vt)=>Gc(f,Vt,E)?Vt:void 0),void 0],xe),minIndex:Ne,maxIndex:Ke,prevIndex:uL(se.current>Mt?Xe:se.current,Ae,xe,M,ke.key===l1?"bl":ke.key===(_?Bc:Hc)?"tr":"tl"),stopEvent:!0})];if(vt!=null&&(se.current=vt,U(ke)),O==="both")return}if(jS(ke.key,O)){if(Ti(ke),i&&!x&&oc(ke.currentTarget.ownerDocument)===ke.currentTarget){se.current=$T(ke.key,O,_)?Xe:Mt,U(ke);return}$T(ke.key,O,_)?w?Ue>=Mt?v&&Ue!==f.current.length?se.current=-1:(ue.current=!1,se.current=Xe):se.current=di(f,{startingIndex:Ue,disabledIndices:E}):se.current=Math.min(Mt,di(f,{startingIndex:Ue,disabledIndices:E})):w?Ue<=Xe?v&&Ue!==-1?se.current=f.current.length:(ue.current=!1,se.current=Mt):se.current=di(f,{startingIndex:Ue,decrement:!0,disabledIndices:E}):se.current=Math.max(Xe,di(f,{startingIndex:Ue,decrement:!0,disabledIndices:E})),Yp(f,se.current)&&(se.current=-1),U(ke)}}),Ce=j.useMemo(()=>x&&i&&$e&&{"aria-activedescendant":`${L}-${d}`},[x,i,$e,L,d]),Be=j.useMemo(()=>({"aria-orientation":O==="both"?void 0:O,...Y?{}:Ce,onKeyDown(ke){if(ke.key==="Tab"&&ke.shiftKey&&i&&!x){const Ue=ao(ke.nativeEvent);if(Ue&&!zn(ae.current,Ue))return;Ti(ke),r.setOpen(!1,mn(Yh,ke.nativeEvent)),Gr(l)&&l.focus();return}Ge(ke)},onPointerMove(){I.current=!0}}),[Ce,Ge,ae,O,Y,r,i,x,l]),Fe=j.useMemo(()=>{function ke(Xe){R==="auto"&&rL(Xe.nativeEvent)&&(fe.current=!x)}function Ue(Xe){fe.current=R,R==="auto"&&aL(Xe.nativeEvent)&&(fe.current=!0)}return{onKeyDown(Xe){const Mt=r.select("open");I.current=!1;const Ae=Xe.key.startsWith("Arrow"),xe=swe(Xe.key,Pe(),_),Ne=jS(Xe.key,O),Ke=(b?xe:Ne)||Xe.key==="Enter"||Xe.key.trim()==="";if(x&&Mt)return Ge(Xe);if(!(!Mt&&!T&&Ae)){if(Ke){const vt=jS(Xe.key,Pe());N.current=b&&vt?null:Xe.key}if(b){xe&&(Ti(Xe),Mt?(se.current=JS(f,Ee.current),U(Xe)):r.setOpen(!0,mn(xT,Xe.nativeEvent,Xe.currentTarget)));return}Ne&&(te.current!=null&&(se.current=te.current),Ti(Xe),!Mt&&T?r.setOpen(!0,mn(xT,Xe.nativeEvent,Xe.currentTarget)):Ge(Xe),Mt&&U(Xe))}},onFocus(Xe){r.select("open")&&!x&&(se.current=-1,U(Xe))},onPointerDown:Ue,onPointerEnter:Ue,onMouseDown:ke,onClick:ke}},[Ge,Ee,R,f,b,U,r,T,O,Pe,_,te,x]),Je=j.useMemo(()=>({...Ce,...Fe}),[Ce,Fe]);return j.useMemo(()=>m?{reference:Je,floating:Be,item:Te,trigger:Fe}:{},[m,Je,Be,Fe,Te])}const cwe=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function lU(e,t={}){const r="rootStore"in e?e.rootStore:e,i=r.useState("open"),s=r.useState("floatingId"),l=r.useState("domReferenceElement"),c=r.useState("floatingElement"),{enabled:f=!0,role:d="dialog"}=t,h=Lm(),m=l?.id||h,g=j.useMemo(()=>Cb(c)?.id||s,[c,s]),v=cwe.get(d)??d,b=gf()!=null,_=j.useMemo(()=>v==="tooltip"||d==="label"?Da:{"aria-haspopup":v==="alertdialog"?"dialog":v,"aria-expanded":"false",...v==="listbox"&&{role:"combobox"},...v==="menu"&&b&&{role:"menuitem"},...d==="select"&&{"aria-autocomplete":"none"},...d==="combobox"&&{"aria-autocomplete":"list"}},[v,b,d]),x=j.useMemo(()=>v==="tooltip"||d==="label"?{[`aria-${d==="label"?"labelledby":"describedby"}`]:i?g:void 0}:{..._,"aria-expanded":i?"true":"false","aria-controls":i?g:void 0,...v==="menu"&&{id:m}},[v,g,i,m,d,_]),R=j.useMemo(()=>{const T={id:g,...v&&{role:v}};return v==="tooltip"||d==="label"?T:{...T,...v==="menu"&&{"aria-labelledby":m}}},[v,g,m,d]),S=j.useCallback(({active:T,selected:E})=>{const O={role:"option",...T&&{id:`${g}-fui-option`}};switch(d){case"select":case"combobox":return{...O,"aria-selected":E}}return{}},[g,d]);return j.useMemo(()=>f?{reference:x,floating:R,item:S,trigger:_}:{},[f,x,R,_,S])}function fwe(e,t){const r="rootStore"in e?e.rootStore:e,i=r.useState("open"),s=r.context.dataRef,{listRef:l,activeIndex:c,onMatch:f,onTypingChange:d,enabled:h=!0,findMatch:m=null,resetMs:g=750,ignoreKeys:v=lm,selectedIndex:w=null}=t,b=no(),_=j.useRef(""),x=j.useRef(w??c??-1),R=j.useRef(null);ct(()=>{i&&(b.clear(),R.current=null,_.current="")},[i,b]),ct(()=>{i&&_.current===""&&(x.current=w??c??-1)},[i,w,c]);const S=ot(C=>{C?s.current.typing||(s.current.typing=C,d?.(C)):s.current.typing&&(s.current.typing=C,d?.(C))}),T=ot(C=>{function M(V,F,re){const ae=m?m(F,re):F.find(K=>K?.toLocaleLowerCase().indexOf(re.toLocaleLowerCase())===0);return ae?V.indexOf(ae):-1}const D=l.current;if(_.current.length>0&&_.current[0]!==" "&&(M(D,D,_.current)===-1?S(!1):C.key===" "&&Ti(C)),D==null||v.includes(C.key)||C.key.length!==1||C.ctrlKey||C.metaKey||C.altKey)return;i&&C.key!==" "&&(Ti(C),S(!0)),D.every(V=>V?V[0]?.toLocaleLowerCase()!==V[1]?.toLocaleLowerCase():!0)&&_.current===C.key&&(_.current="",x.current=R.current),_.current+=C.key,b.start(g,()=>{_.current="",x.current=R.current,S(!1)});const q=x.current,L=M(D,[...D.slice((q||0)+1),...D.slice(0,(q||0)+1)],_.current);L!==-1?(f?.(L),R.current=L):C.key!==" "&&(_.current="",S(!1))}),E=j.useMemo(()=>({onKeyDown:T}),[T]),O=j.useMemo(()=>({onKeyDown:T,onKeyUp(C){C.key===" "&&S(!1)}}),[T,S]);return j.useMemo(()=>h?{reference:E,floating:O}:{},[h,E,O])}function pN(e,t){const[r,i]=e;let s=!1;const l=t.length;for(let c=0,f=l-1;c<l;f=c++){const[d,h]=t[c]||[0,0],[m,g]=t[f]||[0,0];h>=i!=g>=i&&r<=(m-d)*(i-h)/(g-h)+d&&(s=!s)}return s}function dwe(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function hwe(e={}){const{buffer:t=.5,blockPointerEvents:r=!1,requireIntent:i=!0}=e,s=new of;let l=!1,c=null,f=null,d=typeof performance<"u"?performance.now():0;function h(g,v){const w=performance.now(),b=w-d;if(c===null||f===null||b===0)return c=g,f=v,d=w,null;const _=g-c,x=v-f,S=Math.sqrt(_*_+x*x)/b;return c=g,f=v,d=w,S}const m=({x:g,y:v,placement:w,elements:b,onClose:_,nodeId:x,tree:R})=>function(T){function E(){s.clear(),_()}if(s.clear(),!b.domReference||!b.floating||w==null||g==null||v==null)return;const{clientX:O,clientY:C}=T,M=[O,C],D=ao(T),$=T.type==="mouseleave",q=zn(b.floating,D),L=zn(b.domReference,D),V=b.domReference.getBoundingClientRect(),F=b.floating.getBoundingClientRect(),re=w.split("-")[0],ae=g>F.right-F.width/2,K=v>F.bottom-F.height/2,B=dwe(M,V),Y=F.width>V.width,fe=F.height>V.height,se=(Y?V:F).left,N=(Y?V:F).right,I=(fe?V:F).top,U=(fe?V:F).bottom;if(q&&(l=!0,!$))return;if(L&&(l=!1),L&&!$){l=!0;return}if($&&ir(T.relatedTarget)&&zn(b.floating,T.relatedTarget)||R&&Ph(R.nodesRef.current,x).some(({context:ee})=>ee?.open))return;if(re==="top"&&v>=V.bottom-1||re==="bottom"&&v<=V.top+1||re==="left"&&g>=V.right-1||re==="right"&&g<=V.left+1)return E();let P=[];switch(re){case"top":P=[[se,V.top+1],[se,F.bottom-1],[N,F.bottom-1],[N,V.top+1]];break;case"bottom":P=[[se,F.top+1],[se,V.bottom-1],[N,V.bottom-1],[N,F.top+1]];break;case"left":P=[[F.right-1,U],[F.right-1,I],[V.left+1,I],[V.left+1,U]];break;case"right":P=[[V.right-1,U],[V.right-1,I],[F.left+1,I],[F.left+1,U]];break}function G([ee,ue]){switch(re){case"top":{const ve=[Y?ee+t/2:ae?ee+t*4:ee-t*4,ue+t+1],Ee=[Y?ee-t/2:ae?ee+t*4:ee-t*4,ue+t+1],Oe=[[F.left,ae||Y?F.bottom-t:F.top],[F.right,ae?Y?F.bottom-t:F.top:F.bottom-t]];return[ve,Ee,...Oe]}case"bottom":{const ve=[Y?ee+t/2:ae?ee+t*4:ee-t*4,ue-t],Ee=[Y?ee-t/2:ae?ee+t*4:ee-t*4,ue-t],Oe=[[F.left,ae||Y?F.top+t:F.bottom],[F.right,ae?Y?F.top+t:F.bottom:F.top+t]];return[ve,Ee,...Oe]}case"left":{const ve=[ee+t+1,fe?ue+t/2:K?ue+t*4:ue-t*4],Ee=[ee+t+1,fe?ue-t/2:K?ue+t*4:ue-t*4];return[...[[K||fe?F.right-t:F.left,F.top],[K?fe?F.right-t:F.left:F.right-t,F.bottom]],ve,Ee]}case"right":{const ve=[ee-t,fe?ue+t/2:K?ue+t*4:ue-t*4],Ee=[ee-t,fe?ue-t/2:K?ue+t*4:ue-t*4],Oe=[[K||fe?F.left+t:F.right,F.top],[K?fe?F.left+t:F.right:F.left+t,F.bottom]];return[ve,Ee,...Oe]}default:return[]}}if(!pN([O,C],P)){if(l&&!B)return E();if(!$&&i){const ee=h(T.clientX,T.clientY);if(ee!==null&&ee<.1)return E()}pN([O,C],G([g,v]))?!l&&i&&s.start(40,E):E()}};return m.__options={blockPointerEvents:r},m}let pwe=(function(e){return e.nestedDialogs="--nested-dialogs",e})({}),mwe=(function(e){return e[e.open=Nh.open]="open",e[e.closed=Nh.closed]="closed",e[e.startingStyle=Nh.startingStyle]="startingStyle",e[e.endingStyle=Nh.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e})({});const uU=j.createContext(void 0);function gwe(){const e=j.useContext(uU);if(e===void 0)throw new Error(Si(26));return e}const ywe={...Bm,...d1,nestedDialogOpen(e){return e?{[mwe.nestedDialogOpen]:""}:null}},vwe=j.forwardRef(function(t,r){const{className:i,finalFocus:s,initialFocus:l,render:c,...f}=t,{store:d}=Fm(),h=d.useState("descriptionElementId"),m=d.useState("disablePointerDismissal"),g=d.useState("floatingRootContext"),v=d.useState("popupProps"),w=d.useState("modal"),b=d.useState("mounted"),_=d.useState("nested"),x=d.useState("nestedOpenDialogCount"),R=d.useState("open"),S=d.useState("openMethod"),T=d.useState("titleElementId"),E=d.useState("transitionStatus"),O=d.useState("role");gwe(),cp({open:R,ref:d.context.popupRef,onComplete(){R&&d.context.onOpenChangeComplete?.(!0)}});function C(L){return L==="touch"?d.context.popupRef.current:!0}const M=l===void 0?C:l,D=x>0,$=j.useMemo(()=>({open:R,nested:_,transitionStatus:E,nestedDialogOpen:D}),[R,_,E,D]),q=mr("div",t,{state:$,props:[v,{"aria-labelledby":T??void 0,"aria-describedby":h??void 0,role:O,tabIndex:-1,hidden:!b,onKeyDown(L){x5.has(L.key)&&L.stopPropagation()},style:{[pwe.nestedDialogs]:x}},f],ref:[r,d.context.popupRef,d.useStateSetter("popupElement")],stateAttributesMapping:ywe});return k.jsx(C5,{context:g,openInteractionType:S,disabled:!b,closeOnFocusOut:!m,initialFocus:M,returnFocus:s,modal:w!==!1,restoreFocus:"popup",children:q})});function j5(e){return QR(19)?e:e?"true":void 0}const k5=j.forwardRef(function(t,r){const{cutout:i,...s}=t;let l;if(i){const c=i?.getBoundingClientRect();l=`polygon(
141
+ 0% 0%,
142
+ 100% 0%,
143
+ 100% 100%,
144
+ 0% 100%,
145
+ 0% 0%,
146
+ ${c.left}px ${c.top}px,
147
+ ${c.left}px ${c.bottom}px,
148
+ ${c.right}px ${c.bottom}px,
149
+ ${c.right}px ${c.top}px,
150
+ ${c.left}px ${c.top}px
151
+ )`}return k.jsx("div",{ref:r,role:"presentation","data-base-ui-inert":"",...s,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:l}})}),bwe=j.forwardRef(function(t,r){const{keepMounted:i=!1,...s}=t,{store:l}=Fm(),c=l.useState("mounted"),f=l.useState("modal"),d=l.useState("open");return c||i?k.jsx(uU.Provider,{value:i,children:k.jsxs(_5,{ref:r,...s,children:[c&&f===!0&&k.jsx(k5,{ref:l.context.internalBackdropRef,inert:j5(!d)}),t.children]})}):null});let mN={},gN={},yN="";function Swe(e){if(typeof document>"u")return!1;const t=gs(e);return ha(t).innerWidth-t.documentElement.clientWidth>0}function wwe(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const i=gs(e).documentElement,s={scrollbarGutter:i.style.scrollbarGutter,overflowY:i.style.overflowY};i.style.scrollbarGutter="stable",i.style.overflowY="scroll";const l=i.offsetWidth;i.style.overflowY="hidden";const c=i.offsetWidth;return Object.assign(i.style,s),l===c}function Ewe(e){const t=gs(e),r=t.documentElement,i=t.body,s=rp(r)?r:i,l=s.style.overflow;return s.style.overflow="hidden",()=>{s.style.overflow=l}}function xwe(e){const t=gs(e),r=t.documentElement,i=t.body,s=ha(r);let l=0,c=0,f=!1;const d=Tl.create();if(Q7&&(s.visualViewport?.scale??1)!==1)return()=>{};function h(){const v=s.getComputedStyle(r),w=s.getComputedStyle(i),x=(v.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";l=r.scrollTop,c=r.scrollLeft,mN={scrollbarGutter:r.style.scrollbarGutter,overflowY:r.style.overflowY,overflowX:r.style.overflowX},yN=r.style.scrollBehavior,gN={position:i.style.position,height:i.style.height,width:i.style.width,boxSizing:i.style.boxSizing,overflowY:i.style.overflowY,overflowX:i.style.overflowX,scrollBehavior:i.style.scrollBehavior};const R=r.scrollHeight>r.clientHeight,S=r.scrollWidth>r.clientWidth,T=v.overflowY==="scroll"||w.overflowY==="scroll",E=v.overflowX==="scroll"||w.overflowX==="scroll",O=Math.max(0,s.innerWidth-i.clientWidth),C=Math.max(0,s.innerHeight-i.clientHeight),M=parseFloat(w.marginTop)+parseFloat(w.marginBottom),D=parseFloat(w.marginLeft)+parseFloat(w.marginRight),$=rp(r)?r:i;if(f=wwe(e),f){r.style.scrollbarGutter=x,$.style.overflowY="hidden",$.style.overflowX="hidden";return}Object.assign(r.style,{scrollbarGutter:x,overflowY:"hidden",overflowX:"hidden"}),(R||T)&&(r.style.overflowY="scroll"),(S||E)&&(r.style.overflowX="scroll"),Object.assign(i.style,{position:"relative",height:M||C?`calc(100dvh - ${M+C}px)`:"100dvh",width:D||O?`calc(100vw - ${D+O}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),i.scrollTop=l,i.scrollLeft=c,r.setAttribute("data-base-ui-scroll-locked",""),r.style.scrollBehavior="unset"}function m(){Object.assign(r.style,mN),Object.assign(i.style,gN),f||(r.scrollTop=l,r.scrollLeft=c,r.removeAttribute("data-base-ui-scroll-locked"),r.style.scrollBehavior=yN)}function g(){m(),d.request(h)}return h(),s.addEventListener("resize",g),()=>{d.cancel(),m(),typeof s.removeEventListener=="function"&&s.removeEventListener("resize",g)}}class _we{lockCount=0;restore=null;timeoutLock=of.create();timeoutUnlock=of.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(t){if(this.lockCount===0||this.restore!==null)return;const i=gs(t).documentElement,s=ha(i).getComputedStyle(i).overflowY;if(s==="hidden"||s==="clip"){this.restore=Yo;return}const l=W7||!Swe(t);this.restore=l?Ewe(t):xwe(t)}}const Twe=new _we;function D5(e=!0,t=null){ct(()=>{if(e)return Twe.acquire(t)},[e,t])}function Cwe(e){const t=j.useRef(""),r=j.useCallback(s=>{s.defaultPrevented||(t.current=s.pointerType,e(s,s.pointerType))},[e]);return{onClick:j.useCallback(s=>{if(s.detail===0){e(s,"keyboard");return}"pointerType"in s&&e(s,s.pointerType),e(s,t.current),t.current=""},[e]),onPointerDown:r}}function N5(e){const[t,r]=j.useState(null),i=ot((f,d)=>{e||r(d||(W7?"touch":""))}),s=j.useCallback(()=>{r(null)},[]),{onClick:l,onPointerDown:c}=Cwe(i);return j.useMemo(()=>({openMethod:t,reset:s,triggerProps:{onClick:l,onPointerDown:c}}),[t,s,l,c])}function Owe(e){const{store:t,parentContext:r,actionsRef:i}=e,s=t.useState("open"),l=t.useState("disablePointerDismissal"),c=t.useState("modal"),f=t.useState("popupElement"),{openMethod:d,triggerProps:h,reset:m}=N5(s);tU(t);const{forceUnmount:g}=nU(s,t,()=>{m()}),v=ot(q=>{const L=mn(q);return L.preventUnmountOnClose=()=>{t.set("preventUnmountingOnClose",!0)},L}),w=j.useCallback(()=>{t.setOpen(!1,v(Y7))},[t,v]);j.useImperativeHandle(i,()=>({unmount:g,close:w}),[g,w]);const b=oU({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[_,x]=j.useState(0),R=_===0,S=lU(b),T=R5(b,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:c==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(q){if("button"in q&&q.button!==0||"touches"in q&&q.touches.length!==1)return!1;const L=ao(q);if(R&&!l){const V=L;return c&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===V||t.context.backdropRef.current===V||zn(V,f)&&!V?.hasAttribute("data-base-ui-portal"):!0}return!1},escapeKey:R});D5(s&&c===!0,f);const{getReferenceProps:E,getFloatingProps:O,getTriggerProps:C}=$2([S,T]);t.useContextCallback("onNestedDialogOpen",q=>{x(q+1)}),t.useContextCallback("onNestedDialogClose",()=>{x(0)}),j.useEffect(()=>(r?.onNestedDialogOpen&&s&&r.onNestedDialogOpen(_),r?.onNestedDialogClose&&!s&&r.onNestedDialogClose(),()=>{r?.onNestedDialogClose&&s&&r.onNestedDialogClose()}),[s,r,_]);const M=j.useMemo(()=>E(h),[E,h]),D=j.useMemo(()=>C(h),[C,h]),$=j.useMemo(()=>O(),[O]);t.useSyncedValues({openMethod:d,activeTriggerProps:M,inactiveTriggerProps:D,popupProps:$,floatingRootContext:b,nestedOpenDialogCount:_})}const Rwe={...aU,modal:ut(e=>e.modal),nested:ut(e=>e.nested),nestedOpenDialogCount:ut(e=>e.nestedOpenDialogCount),disablePointerDismissal:ut(e=>e.disablePointerDismissal),openMethod:ut(e=>e.openMethod),descriptionElementId:ut(e=>e.descriptionElementId),titleElementId:ut(e=>e.titleElementId),viewportElement:ut(e=>e.viewportElement),role:ut(e=>e.role)};class Awe extends A5{constructor(t){super(Mwe(t),{popupRef:j.createRef(),backdropRef:j.createRef(),internalBackdropRef:j.createRef(),triggerElements:new z2,onOpenChange:void 0,onOpenChangeComplete:void 0},Rwe)}setOpen=(t,r)=>{if(r.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!t&&r.trigger==null&&this.state.activeTriggerId!=null&&(r.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(t,r),r.isCanceled)return;const i={open:t,nativeEvent:r.event,reason:r.reason,nested:this.state.nested};this.state.floatingRootContext.context.events?.emit("openchange",i);const s={open:t},l=r.trigger?.id??null;(l||t)&&(s.activeTriggerId=l,s.activeTriggerElement=r.trigger??null),this.update(s)}}function Mwe(e={}){return{...rU(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...e}}function jwe(e){const{children:t,open:r,defaultOpen:i=!1,onOpenChange:s,onOpenChangeComplete:l,disablePointerDismissal:c=!1,modal:f=!0,actionsRef:d,handle:h,triggerId:m,defaultTriggerId:g=null}=e,v=Fm(!0),w=!!v,b=so(()=>h?.store??new Awe({open:r??i,activeTriggerId:m!==void 0?m:g,modal:f,disablePointerDismissal:c,nested:w})).current;b.useControlledProp("open",r,i),b.useControlledProp("activeTriggerId",m,g),b.useSyncedValues({disablePointerDismissal:c,nested:w,modal:f}),b.useContextCallback("onOpenChange",s),b.useContextCallback("onOpenChangeComplete",l);const _=b.useState("payload");Owe({store:b,actionsRef:d,parentContext:v?.store.context});const x=j.useMemo(()=>({store:b}),[b]);return k.jsx(jL.Provider,{value:x,children:typeof t=="function"?t({payload:_}):t})}const kwe=j.forwardRef(function(t,r){const{render:i,className:s,id:l,...c}=t,{store:f}=Fm(),d=Um(l);return f.useSyncedValueWithCleanup("titleElementId",d),mr("h2",t,{ref:r,props:[{id:d},c]})});function Dwe({...e}){return k.jsx(jwe,{"data-slot":"dialog",...e})}function Nwe({...e}){return k.jsx(bwe,{"data-slot":"dialog-portal",...e})}function zwe({className:e,...t}){return k.jsx(b1e,{"data-slot":"dialog-overlay",className:en("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 isolate z-50",e),...t})}function $we({className:e,children:t,showCloseButton:r=!0,...i}){return k.jsxs(Nwe,{children:[k.jsx(zwe,{}),k.jsxs(vwe,{"data-slot":"dialog-content",className:en("bg-background data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 ring-foreground/10 grid max-w-[calc(100%-2rem)] gap-4 rounded-none p-4 text-xs/relaxed ring-1 duration-100 sm:max-w-sm fixed top-1/2 left-1/2 z-50 w-full -translate-x-1/2 -translate-y-1/2 outline-none",e),...i,children:[t,r&&k.jsxs(S1e,{"data-slot":"dialog-close",render:k.jsx(Qc,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm"}),children:[k.jsx(Fre,{}),k.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Pwe({className:e,...t}){return k.jsx(kwe,{"data-slot":"dialog-title",className:en("text-sm font-medium",e),...t})}const Iwe=()=>{const e=df(),[t,r]=j.useState(!1);return e._meta&&Object.keys(e._meta).length>0?k.jsxs(k.Fragment,{children:[k.jsxs(Qc,{variant:"ghost",size:"default",onClick:()=>r(!0),"aria-label":"View tool metadata",title:"View tool metadata",children:[k.jsx(Are,{className:"h-4 w-4"}),"Metadata"]}),k.jsx(Dwe,{open:t,onOpenChange:r,children:k.jsxs($we,{className:"sm:max-w-2xl",children:[k.jsx(Pwe,{children:"Tool Metadata"}),k.jsx("div",{className:"text-xs",children:k.jsx(M2,{src:e._meta,name:null,quotesOnKeys:!1,displayDataTypes:!1,displayObjectSize:!1,enableClipboard:!1,theme:"rjv-default",style:{fontSize:"0.75rem"},collapsed:2,collapseStringsAfterLength:80})})]})})]}):null},Lwe={"ui:submitButtonOptions":{norender:!0}},Uwe=({schema:e,formData:t,setFormData:r,ref:i})=>!e||!e.properties||Object.keys(e.properties).length===0?k.jsx("div",{className:"flex items-center justify-center h-full",children:k.jsx("p",{className:"text-sm text-muted-foreground",children:"This tool requires no input"})}):k.jsx(Bbe,{children:k.jsx(Hbe,{children:k.jsx(xve,{ref:i,schema:e??{},validator:Bpe,uiSchema:Lwe,formData:t,onChange:l=>r(l.formData),showErrorList:!1,templates:{FieldTemplate:l=>{const{id:c,classNames:f,style:d,label:h,required:m,errors:g,children:v}=l;return k.jsxs("div",{className:en("flex flex-col gap-2",f),style:d,children:[k.jsxs("label",{htmlFor:c,className:"text-sm text-foreground",children:[h,m&&k.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),k.jsxs("div",{className:"flex flex-col gap-2",children:[v,g]})]})},FieldErrorTemplate:l=>l.errors&&l.errors.length>0?k.jsx("div",{className:"text-sm text-destructive mt-1 flex items-center gap-1",children:k.jsx("span",{children:l.errors.join(", ")})}):null}})})}),qwe=({formData:e,setFormData:t})=>{const[r,i]=j.useState(JSON.stringify(e,null,2));j.useEffect(()=>{i(JSON.stringify(e,null,2))},[e]);const s=l=>{i(l);try{const c=JSON.parse(l);t(c)}catch{}};return k.jsx("div",{className:"flex flex-col gap-2",children:k.jsx("textarea",{className:"w-full h-full p-2 rounded-md border border-border",rows:12,value:r,onChange:l=>s(l.target.value)})})},Vwe=()=>{const e=j.useRef(null),t=df(),{setToolData:r}=Tm(),s=Cm(t.name)?.input??{},l=c=>{r(t.name,{input:c??{}})};return k.jsxs("div",{className:en("flex flex-col h-full overflow-hidden border-r border-border"),children:[k.jsxs("div",{className:"shrink-0 border-b border-border px-6 py-4 flex items-center justify-between h-[72px]",children:[k.jsx("h2",{className:"font-semibold text-foreground",children:t.name}),k.jsxs("div",{className:"flex items-center gap-2",children:[k.jsx(Iwe,{}),k.jsx(s1e,{validateForm:async()=>e.current===null?!0:await e.current.validateForm(),formData:s})]})]}),k.jsx("div",{className:"flex-1 overflow-auto px-6 py-6 bg-muted/50",children:k.jsxs(_L,{defaultValue:"form",children:[k.jsxs(TL,{children:[k.jsx(nb,{value:"form",children:"Form"}),k.jsx(nb,{value:"json",children:"JSON"})]}),k.jsx(rb,{value:"form",children:k.jsx(Uwe,{schema:t.inputSchema,formData:s,setFormData:l,ref:e},t.name)}),k.jsx(rb,{value:"json",children:k.jsx(qwe,{formData:s,setFormData:l},t.name)})]})})]})},Fwe=bc("rounded-none has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-none flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",{variants:{orientation:{horizontal:"[&>[data-slot]~[data-slot]]:rounded-l-none [&>[data-slot]~[data-slot]]:border-l-0 [&>[data-slot]]:rounded-r-none",vertical:"flex-col [&>[data-slot]~[data-slot]]:rounded-t-none [&>[data-slot]~[data-slot]]:border-t-0 [&>[data-slot]]:rounded-b-none"}},defaultVariants:{orientation:"horizontal"}});function Bwe({className:e,orientation:t,...r}){return k.jsx("div",{role:"group","data-slot":"button-group","data-orientation":t,className:en(Fwe({orientation:t}),e),...r})}function Hwe({className:e,...t}){return k.jsx("label",{"data-slot":"label",className:en("gap-2 text-xs leading-none group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed",e),...t})}function Gwe({className:e,...t}){return k.jsx("fieldset",{"data-slot":"field-set",className:en("gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3 flex flex-col",e),...t})}const Kwe=bc("data-[invalid=true]:text-destructive gap-2 group/field flex w-full",{variants:{orientation:{vertical:"flex-col [&>*]:w-full [&>.sr-only]:w-auto",horizontal:"flex-row items-center [&>[data-slot=field-label]]:flex-auto has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",responsive:"flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto @md/field-group:[&>[data-slot=field-label]]:flex-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"}},defaultVariants:{orientation:"vertical"}});function Cc({className:e,orientation:t="vertical",...r}){return k.jsx("div",{role:"group","data-slot":"field","data-orientation":t,className:en(Kwe({orientation:t}),e),...r})}function Oc({className:e,...t}){return k.jsx(Hwe,{"data-slot":"field-label",className:en("has-data-checked:bg-primary/5 has-data-checked:border-primary dark:has-data-checked:bg-primary/10 gap-2 group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-none has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-2 group/field-label peer/field-label flex w-fit leading-snug","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",e),...t})}let vN=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const Ywe={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},z5={valid(e){return e===null?null:e?{[vN.valid]:""}:{[vN.invalid]:""}}},Zwe=j.createContext({invalid:void 0,name:void 0,validityData:{state:Ywe,errors:[],error:"",value:"",initialValue:null},setValidityData:Yo,disabled:void 0,touched:!1,setTouched:Yo,dirty:!1,setDirty:Yo,filled:!1,setFilled:Yo,focused:!1,setFocused:Yo,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=Da)=>e,getInputValidationProps:(e=Da)=>e,inputRef:{current:null},commit:async()=>{}}});function Xh(e=!0){const t=j.useContext(Zwe);if(t.setValidityData===Yo&&!e)throw new Error(Si(28));return t}const Xwe=j.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Yo,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function $5(){return j.useContext(Xwe)}const Qwe=j.createContext({controlId:void 0,setControlId:Yo,labelId:void 0,setLabelId:Yo,messageIds:[],setMessageIds:Yo,getDescriptionProps:e=>e});function I2(){return j.useContext(Qwe)}function Wwe(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}function L2(e={}){const{id:t,implicit:r=!1,controlRef:i}=e,{controlId:s,setControlId:l}=I2(),c=Um(t);return ct(()=>{if(!(!r&&!t||l===Yo)){if(r){const f=i?.current;ir(f)&&f.closest("label")!=null?l(t??null):l(s??c)}else t&&l(t);return()=>{t&&l(void 0)}}},[t,i,s,l,r,c]),s??c}function P5(e){const{enabled:t=!0,value:r,id:i,name:s,controlRef:l,commit:c}=e,{formRef:f}=$5(),{invalid:d,markedDirtyRef:h,validityData:m,setValidityData:g}=Xh(),v=ot(e.getValue);ct(()=>{if(!t)return;let w=r;w===void 0&&(w=v()),m.initialValue===null&&w!==null&&g(b=>({...b,initialValue:w}))},[t,g,r,m.initialValue,v]),ct(()=>{!t||!i||f.current.fields.set(i,{getValue:v,name:s,controlRef:l,validityData:Wwe(m,d),validate(w=!0){let b=r;b===void 0&&(b=v()),h.current=!0,w?ms.flushSync(()=>c(b)):c(b)}})},[c,l,t,f,v,i,d,h,s,m,r]),ct(()=>{const w=f.current.fields;return()=>{i&&w.delete(i)}},[f,i])}const Jwe=j.forwardRef(function(t,r){const{render:i,className:s,id:l,name:c,value:f,disabled:d=!1,onValueChange:h,defaultValue:m,...g}=t,{state:v,name:w,disabled:b}=Xh(),_=b||d,x=w??c,R=j.useMemo(()=>({...v,disabled:_}),[v,_]),{setTouched:S,setDirty:T,validityData:E,setFocused:O,setFilled:C,validationMode:M,validation:D}=Xh(),{labelId:$}=I2(),q=L2({id:l});ct(()=>{const K=f!=null;D.inputRef.current?.value||K&&f!==""?C(!0):K&&f===""&&C(!1)},[D.inputRef,C,f]);const[L,V]=Tb({controlled:f,default:m,name:"FieldControl",state:"value"}),F=f!==void 0,re=ot((K,B)=>{h?.(K,B),!B.isCanceled&&V(K)});return P5({id:q,name:x,commit:D.commit,value:L,getValue:()=>D.inputRef.current?.value,controlRef:D.inputRef}),mr("input",t,{ref:r,state:R,props:[{id:q,disabled:_,name:x,ref:D.inputRef,"aria-labelledby":$,...F?{value:L}:{defaultValue:m},onChange(K){const B=K.currentTarget.value;re(B,mn(af,K.nativeEvent)),T(B!==E.initialValue),C(B!=="")},onFocus(){O(!0)},onBlur(K){S(!0),O(!1),M==="onBlur"&&D.commit(K.currentTarget.value)},onKeyDown(K){K.currentTarget.tagName==="INPUT"&&K.key==="Enter"&&(S(!0),D.commit(K.currentTarget.value))}},D.getInputValidationProps(),g],stateAttributesMapping:z5})}),e2e=j.forwardRef(function(t,r){return k.jsx(Jwe,{ref:r,...t})});function PT({className:e,type:t,...r}){return k.jsx(e2e,{type:t,"data-slot":"input",className:en("dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 disabled:bg-input/50 dark:disabled:bg-input/80 h-8 rounded-none border bg-transparent px-2.5 py-1 text-xs transition-colors file:h-6 file:text-xs file:font-medium focus-visible:ring-1 aria-invalid:ring-1 md:text-xs file:text-foreground placeholder:text-muted-foreground w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",e),...r})}function t2e(e){const t=j.useRef(!0);t.current&&(t.current=!1,e())}const cU=j.createContext(null),fU=j.createContext(null);function Fl(){const e=j.useContext(cU);if(e===null)throw new Error(Si(60));return e}function dU(){const e=j.useContext(fU);if(e===null)throw new Error(Si(61));return e}const n2e=(e,t)=>Object.is(e,t);function bm(e,t,r){return e==null||t==null?Object.is(e,t):r(e,t)}function IT(e,t,r){return!e||e.length===0?!1:e.some(i=>i===void 0?!1:bm(i,t,r))}function MO(e,t,r){return!e||e.length===0?-1:e.findIndex(i=>i===void 0?!1:bm(i,t,r))}function r2e(e,t,r){return e.filter(i=>!bm(i,t,r))}function jO(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function hU(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function a2e(e){if(!Array.isArray(e))return e!=null&&!("null"in e);if(hU(e)){for(const t of e)for(const r of t.items)if(r&&r.value==null&&r.label!=null)return!0;return!1}for(const t of e)if(t&&t.value==null&&t.label!=null)return!0;return!1}function i2e(e,t){if(t&&e!=null)return t(e)??"";if(e&&typeof e=="object"){if("label"in e&&e.label!=null)return String(e.label);if("value"in e)return String(e.value)}return jO(e)}function Rp(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?jO(e.value):jO(e)}function pU(e,t,r){function i(){return i2e(e,r)}if(r&&e!=null)return r(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??i();if(Array.isArray(t)){const s=hU(t)?t.flatMap(l=>l.items):t;if(e==null||typeof e!="object"){const l=s.find(c=>c.value===e);return l&&l.label!=null?l.label:i()}if("value"in e){const l=s.find(c=>c&&c.value===e.value);if(l&&l.label!=null)return l.label}}return i()}function o2e(e,t,r){return e.reduce((i,s,l)=>(l>0&&i.push(", "),i.push(k.jsx(j.Fragment,{children:pU(s,t,r)},l)),i),[])}const Lt={id:ut(e=>e.id),modal:ut(e=>e.modal),multiple:ut(e=>e.multiple),items:ut(e=>e.items),itemToStringLabel:ut(e=>e.itemToStringLabel),itemToStringValue:ut(e=>e.itemToStringValue),isItemEqualToValue:ut(e=>e.isItemEqualToValue),value:ut(e=>e.value),hasSelectedValue:ut(e=>{const{value:t,multiple:r,itemToStringValue:i}=e;return t==null?!1:r&&Array.isArray(t)?t.length>0:Rp(t,i)!==""}),hasNullItemLabel:ut((e,t)=>t?a2e(e.items):!1),open:ut(e=>e.open),mounted:ut(e=>e.mounted),forceMount:ut(e=>e.forceMount),transitionStatus:ut(e=>e.transitionStatus),openMethod:ut(e=>e.openMethod),activeIndex:ut(e=>e.activeIndex),selectedIndex:ut(e=>e.selectedIndex),isActive:ut((e,t)=>e.activeIndex===t),isSelected:ut((e,t,r)=>{const i=e.isItemEqualToValue,s=e.value;return e.multiple?Array.isArray(s)&&s.some(l=>bm(l,r,i)):e.selectedIndex===t&&e.selectedIndex!==null?!0:bm(s,r,i)}),isSelectedByFocus:ut((e,t)=>e.selectedIndex===t),popupProps:ut(e=>e.popupProps),triggerProps:ut(e=>e.triggerProps),triggerElement:ut(e=>e.triggerElement),positionerElement:ut(e=>e.positionerElement),listElement:ut(e=>e.listElement),scrollUpArrowVisible:ut(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:ut(e=>e.scrollDownArrowVisible),hasScrollArrows:ut(e=>e.hasScrollArrows)};function mU(e,t){const r=j.useRef(e),i=ot(t);ct(()=>{r.current!==e&&i(r.current)},[e,i]),ct(()=>{r.current=e},[e])}function s2e(e){const{id:t,value:r,defaultValue:i=null,onValueChange:s,open:l,defaultOpen:c=!1,onOpenChange:f,name:d,disabled:h=!1,readOnly:m=!1,required:g=!1,modal:v=!0,actionsRef:w,inputRef:b,onOpenChangeComplete:_,items:x,multiple:R=!1,itemToStringLabel:S,itemToStringValue:T,isItemEqualToValue:E=n2e,highlightItemOnHover:O=!0,children:C}=e,{clearErrors:M}=$5(),{setDirty:D,setTouched:$,setFocused:q,shouldValidateOnChange:L,validityData:V,setFilled:F,name:re,disabled:ae,validation:K,validationMode:B}=Xh(),Y=L2({id:t}),fe=ae||h,se=re??d,[N,I]=Tb({controlled:r,default:R?i??lm:i,name:"Select",state:"value"}),[U,P]=Tb({controlled:l,default:c,name:"Select",state:"open"}),G=j.useRef([]),ee=j.useRef([]),ue=j.useRef(null),ve=j.useRef(null),Ee=j.useRef(0),Oe=j.useRef(null),de=j.useRef([]),te=j.useRef(!1),Se=j.useRef(!1),we=j.useRef(null),$e=j.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),Te=j.useRef(!1),{mounted:Pe,setMounted:Ge,transitionStatus:Ce}=N2(U),{openMethod:Be,triggerProps:Fe,reset:Je}=N5(U),ke=so(()=>new em({id:Y,modal:v,multiple:R,itemToStringLabel:S,itemToStringValue:T,isItemEqualToValue:E,value:N,open:U,mounted:Pe,transitionStatus:Ce,items:x,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,Ue=qt(ke,Lt.activeIndex),Xe=qt(ke,Lt.selectedIndex),Mt=qt(ke,Lt.triggerElement),Ae=qt(ke,Lt.positionerElement),xe=j.useMemo(()=>R&&Array.isArray(N)&&N.length===0?"":Rp(N,T),[R,N,T]),Ne=j.useMemo(()=>R&&Array.isArray(N)?N.map(ft=>Rp(ft,T)):Rp(N,T),[R,N,T]),Ke=ka(ke.state.triggerElement);P5({id:Y,commit:K.commit,value:N,controlRef:Ke,name:se,getValue:()=>Ne});const vt=j.useRef(N);ct(()=>{N!==vt.current&&ke.set("forceMount",!0)},[ke,N]),ct(()=>{F(R?Array.isArray(N)&&N.length>0:N!=null)},[R,N,F]),ct(function(){if(U)return;const tn=de.current;if(R){const on=Array.isArray(N)?N:[];if(on.length===0){ke.set("selectedIndex",null);return}const Cn=on[on.length-1],Ft=MO(tn,Cn,E);ke.set("selectedIndex",Ft===-1?null:Ft);return}const Fn=MO(tn,N,E);ke.set("selectedIndex",Fn===-1?null:Fn)},[R,U,N,de,E,ke]),mU(N,()=>{M(se),D(N!==V.initialValue),L()?K.commit(N):K.commit(N,!0)});const Xt=ot((ft,tn)=>{if(f?.(ft,tn),!tn.isCanceled&&(P(ft),!ft&&(tn.reason===Yh||tn.reason===g5)&&($(!0),q(!1),B==="onBlur"&&K.commit(N)),!ft&&ke.state.activeIndex!==null)){const Fn=G.current[ke.state.activeIndex];queueMicrotask(()=>{Fn?.setAttribute("tabindex","-1")})}}),Vt=ot(()=>{Ge(!1),ke.set("activeIndex",null),Je(),_?.(!1)});cp({enabled:!w,open:U,ref:ue,onComplete(){U||Vt()}}),j.useImperativeHandle(w,()=>({unmount:Vt}),[Vt]);const wt=ot((ft,tn)=>{s?.(ft,tn),!tn.isCanceled&&I(ft)}),Ht=ot(()=>{const ft=ke.state.listElement||ue.current;if(!ft)return;const tn=ft.scrollTop,Fn=ft.scrollTop+ft.clientHeight,on=tn>1,Cn=Fn<ft.scrollHeight-1;ke.state.scrollUpArrowVisible!==on&&ke.set("scrollUpArrowVisible",on),ke.state.scrollDownArrowVisible!==Cn&&ke.set("scrollDownArrowVisible",Cn)}),Rt=iU({open:U,onOpenChange:Xt,elements:{reference:Mt,floating:Ae}}),Qt=VL(Rt,{enabled:!m&&!fe,event:"mousedown"}),_n=R5(Rt,{bubbles:!1}),Gt=uwe(Rt,{enabled:!m&&!fe,listRef:G,activeIndex:Ue,selectedIndex:Xe,disabledIndices:lm,onNavigate(ft){ft===null&&!U||ke.set("activeIndex",ft)},focusItemOnHover:!1}),Tn=fwe(Rt,{enabled:!m&&!fe&&(U||!R),listRef:ee,activeIndex:Ue,selectedIndex:Xe,onMatch(ft){U?ke.set("activeIndex",ft):wt(de.current[ft],mn("none"))},onTypingChange(ft){te.current=ft}}),{getReferenceProps:En,getFloatingProps:Pn,getItemProps:Dt}=$2([Qt,_n,Gt,Tn]),xn=j.useMemo(()=>Qb(En(),Fe,Y?{id:Y}:Da),[En,Fe,Y]);t2e(()=>{ke.update({popupProps:Pn(),triggerProps:xn})}),ct(()=>{ke.update({id:Y,modal:v,multiple:R,value:N,open:U,mounted:Pe,transitionStatus:Ce,popupProps:Pn(),triggerProps:xn,items:x,itemToStringLabel:S,itemToStringValue:T,isItemEqualToValue:E,openMethod:Be})},[ke,Y,v,R,N,U,Pe,Ce,Pn,xn,x,S,T,E,Be]);const Kt=j.useMemo(()=>({store:ke,name:se,required:g,disabled:fe,readOnly:m,multiple:R,itemToStringLabel:S,itemToStringValue:T,highlightItemOnHover:O,setValue:wt,setOpen:Xt,listRef:G,popupRef:ue,scrollHandlerRef:ve,handleScrollArrowVisibility:Ht,scrollArrowsMountedCountRef:Ee,getItemProps:Dt,events:Rt.context.events,valueRef:Oe,valuesRef:de,labelsRef:ee,typingRef:te,selectionRef:$e,selectedItemTextRef:we,validation:K,onOpenChangeComplete:_,keyboardActiveRef:Se,alignItemWithTriggerActiveRef:Te,initialValueRef:vt}),[ke,se,g,fe,m,R,S,T,O,wt,Xt,Dt,Rt.context.events,K,_,Ht]),sr=fc(b,K.inputRef),wr=R&&Array.isArray(N)&&N.length>0,qr=j.useMemo(()=>!R||!Array.isArray(N)||!se?null:N.map(ft=>{const tn=Rp(ft,T);return k.jsx("input",{type:"hidden",name:se,value:tn},tn)}),[R,N,se,T]);return k.jsx(cU.Provider,{value:Kt,children:k.jsxs(fU.Provider,{value:Rt,children:[C,k.jsx("input",{...K.getInputValidationProps({onFocus(){ke.state.triggerElement?.focus({focusVisible:!0})},onChange(ft){if(ft.nativeEvent.defaultPrevented)return;const tn=ft.target.value,Fn=mn(af,ft.nativeEvent);function on(){if(R)return;const Cn=de.current.find(Ft=>Rp(Ft,T).toLowerCase()===tn.toLowerCase());Cn!=null&&(D(Cn!==V.initialValue),wt(Cn,Fn),L()&&K.commit(Cn))}ke.set("forceMount",!0),queueMicrotask(on)}}),name:R?void 0:se,value:xe,disabled:fe,required:g&&!wr,readOnly:m,ref:sr,style:se?IL:j2,tabIndex:-1,"aria-hidden":!0}),qr]})})}function l2e(e){const t=e.getBoundingClientRect(),r=window.getComputedStyle(e,"::before"),i=window.getComputedStyle(e,"::after");if(!(r.content!=="none"||i.content!=="none"))return t;const l=parseFloat(r.width)||0,c=parseFloat(r.height)||0,f=parseFloat(i.width)||0,d=parseFloat(i.height)||0,h=Math.max(t.width,l,f),m=Math.max(t.height,c,d),g=h-t.width,v=m-t.height;return{left:t.left-g/2,right:t.right+g/2,top:t.top-v/2,bottom:t.bottom+v/2}}const kS=2,u2e=400,bN=200,c2e={...DL,...z5,value:()=>null},f2e=j.forwardRef(function(t,r){const{render:i,className:s,id:l,disabled:c=!1,nativeButton:f=!0,...d}=t,{setTouched:h,setFocused:m,validationMode:g,state:v,disabled:w}=Xh(),{labelId:b}=I2(),{store:_,setOpen:x,selectionRef:R,validation:S,readOnly:T,required:E,alignItemWithTriggerActiveRef:O,disabled:C,keyboardActiveRef:M}=Fl(),D=w||C||c,$=qt(_,Lt.open),q=qt(_,Lt.value),L=qt(_,Lt.triggerProps),V=qt(_,Lt.positionerElement),F=qt(_,Lt.listElement),re=qt(_,Lt.id),ae=qt(_,Lt.hasSelectedValue),K=!ae&&$,B=qt(_,Lt.hasNullItemLabel,K),Y=l??re;L2({id:Y});const fe=ka(V),se=j.useRef(null),{getButtonProps:N,buttonRef:I}=ap({disabled:D,native:f}),U=ot(te=>{_.set("triggerElement",te)}),P=fc(r,se,I,U),G=no(),ee=no(),ue=no(),ve=no();j.useEffect(()=>{if($)return!(ae||B)?ue.start(u2e,()=>{R.current.allowUnselectedMouseUp=!0,R.current.allowSelectedMouseUp=!0}):ve.start(bN,()=>{R.current.allowUnselectedMouseUp=!0,ue.start(bN,()=>{R.current.allowSelectedMouseUp=!0})}),()=>{ue.clear(),ve.clear()};R.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},ee.clear()},[$,ae,B,R,ee,ue,ve]);const Ee=j.useMemo(()=>F?.id??Cb(V)?.id,[F,V]),Oe=Qb(L,{id:Y,role:"combobox","aria-expanded":$?"true":"false","aria-haspopup":"listbox","aria-controls":$?Ee:void 0,"aria-labelledby":b,"aria-readonly":T||void 0,"aria-required":E||void 0,tabIndex:D?-1:0,ref:P,onFocus(te){m(!0),$&&O.current&&x(!1,mn(af,te.nativeEvent)),G.start(0,()=>{_.set("forceMount",!0)})},onBlur(te){zn(V,te.relatedTarget)||(h(!0),m(!1),g==="onBlur"&&S.commit(q))},onPointerMove(){M.current=!1},onKeyDown(){M.current=!0},onMouseDown(te){if($)return;const Se=gs(te.currentTarget);function we($e){if(!se.current)return;const Te=$e.target;if(zn(se.current,Te)||zn(fe.current,Te)||Te===se.current)return;const Pe=l2e(se.current);$e.clientX>=Pe.left-kS&&$e.clientX<=Pe.right+kS&&$e.clientY>=Pe.top-kS&&$e.clientY<=Pe.bottom+kS||x(!1,mn($ve,$e))}ee.start(0,()=>{Se.addEventListener("mouseup",we,{once:!0})})}},S.getValidationProps,d,N);Oe.role="combobox";const de=j.useMemo(()=>({...v,open:$,disabled:D,value:q,readOnly:T,placeholder:!ae}),[v,$,D,q,T,ae]);return mr("button",t,{ref:[r,se],state:de,stateAttributesMapping:c2e,props:Oe})}),d2e={value:()=>null},h2e=j.forwardRef(function(t,r){const{className:i,render:s,children:l,placeholder:c,...f}=t,{store:d,valueRef:h}=Fl(),m=qt(d,Lt.value),g=qt(d,Lt.items),v=qt(d,Lt.itemToStringLabel),w=qt(d,Lt.hasSelectedValue),b=!w&&c!=null&&l==null,_=qt(d,Lt.hasNullItemLabel,b),x=j.useMemo(()=>({value:m,placeholder:!w}),[m,w]);let R=null;return typeof l=="function"?R=l(m):l!=null?R=l:!w&&c!=null&&!_?R=c:Array.isArray(m)?R=o2e(m,g,v):R=pU(m,g,v),mr("span",t,{state:x,ref:[r,h],props:[{children:R},f],stateAttributesMapping:d2e})}),p2e=j.forwardRef(function(t,r){const{className:i,render:s,...l}=t,{store:c}=Fl(),f=qt(c,Lt.open),d=j.useMemo(()=>({open:f}),[f]);return mr("span",t,{state:d,ref:r,props:[{"aria-hidden":!0,children:"▼"},l],stateAttributesMapping:kL})}),m2e=j.createContext(void 0),g2e=j.forwardRef(function(t,r){const{store:i}=Fl(),s=qt(i,Lt.mounted),l=qt(i,Lt.forceMount);return s||l?k.jsx(m2e.Provider,{value:!0,children:k.jsx(_5,{ref:r,...t})}):null}),y2e=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:i,placement:s,rects:l,platform:c,elements:f,middlewareData:d}=t,{element:h,padding:m=0,offsetParent:g="real"}=pc(e,t)||{};if(h==null)return{};const v=oL(m),w={x:r,y:i},b=S5(s),_=b5(b),x=await c.getDimensions(h),R=b==="y",S=R?"top":"left",T=R?"bottom":"right",E=R?"clientHeight":"clientWidth",O=l.reference[_]+l.reference[b]-w[b]-l.floating[_],C=w[b]-l.reference[b],M=g==="real"?await c.getOffsetParent?.(h):f.floating;let D=f.floating[E]||l.floating[_];(!D||!await c.isElement?.(M))&&(D=f.floating[E]||l.floating[_]);const $=O/2-C/2,q=D/2-x[_]/2-1,L=Math.min(v[S],q),V=Math.min(v[T],q),F=L,re=D-x[_]-V,ae=D/2-x[_]/2+$,K=wO(F,ae,re),B=!d.arrow&&mf(s)!=null&&ae!==K&&l.reference[_]/2-(ae<F?L:V)-x[_]/2<0,Y=B?ae<F?ae-F:ae-re:0;return{[b]:w[b]+Y,data:{[b]:K,centerOffset:ae-K-Y,...B&&{alignmentOffset:Y}},reset:B}}}),v2e=(e,t)=>({...y2e(e),options:[e,t]}),b2e={name:"hide",async fn(e){const{width:t,height:r,x:i,y:s}=e.rects.reference,l=t===0&&r===0&&i===0&&s===0;return{data:{referenceHidden:(await wSe().fn(e)).data?.referenceHidden||l}}}},rw={sideX:"left",sideY:"top"},S2e={name:"adaptiveOrigin",async fn(e){const{x:t,y:r,rects:{floating:i},elements:{floating:s},platform:l,strategy:c,placement:f}=e,d=ha(s),h=d.getComputedStyle(s);if(!(h.transitionDuration!=="0s"&&h.transitionDuration!==""))return{x:t,y:r,data:rw};const g=await l.getOffsetParent?.(s);let v={width:0,height:0};if(c==="fixed"&&d?.visualViewport)v={width:d.visualViewport.width,height:d.visualViewport.height};else if(g===d){const S=gs(s);v={width:S.documentElement.clientWidth,height:S.documentElement.clientHeight}}else await l.isElement?.(g)&&(v=await l.getDimensions(g));const w=oo(f);let b=t,_=r;w==="left"&&(b=v.width-(t+i.width)),w==="top"&&(_=v.height-(r+i.height));const x=w==="left"?"right":rw.sideX,R=w==="top"?"bottom":rw.sideY;return{x:b,y:_,data:{sideX:x,sideY:R}}}};function gU(e,t,r){const i=e==="inline-start"||e==="inline-end";return{top:"top",right:i?r?"inline-start":"inline-end":"right",bottom:"bottom",left:i?r?"inline-end":"inline-start":"left"}[t]}function SN(e,t,r){const{rects:i,placement:s}=e;return{side:gU(t,oo(s),r),align:mf(s)||"center",anchor:{width:i.reference.width,height:i.reference.height},positioner:{width:i.floating.width,height:i.floating.height}}}function yU(e){const{anchor:t,positionMethod:r="absolute",side:i="bottom",sideOffset:s=0,align:l="center",alignOffset:c=0,collisionBoundary:f,collisionPadding:d=5,sticky:h=!1,arrowPadding:m=5,disableAnchorTracking:g=!1,keepMounted:v=!1,floatingRootContext:w,mounted:b,collisionAvoidance:_,shiftCrossAxis:x=!1,nodeId:R,adaptiveOrigin:S,lazyFlip:T=!1,externalTree:E}=e,[O,C]=j.useState(null);!b&&O!==null&&C(null);const M=_.side||"flip",D=_.align||"flip",$=_.fallbackAxisSide||"end",q=typeof t=="function"?t:void 0,L=ot(q),V=q?L:t,F=ka(t),ae=d5()==="rtl",K=O||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":ae?"left":"right","inline-start":ae?"right":"left"}[i],B=l==="center"?K:`${K}-${l}`;let Y=d;const fe=1,se=i==="bottom"?fe:0,N=i==="top"?fe:0,I=i==="right"?fe:0,U=i==="left"?fe:0;typeof Y=="number"?Y={top:Y+se,right:Y+U,bottom:Y+N,left:Y+I}:Y&&(Y={top:(Y.top||0)+se,right:(Y.right||0)+U,bottom:(Y.bottom||0)+N,left:(Y.left||0)+I});const P={boundary:f==="clipping-ancestors"?"clippingAncestors":f,padding:Y},G=j.useRef(null),ee=ka(s),ue=ka(c),Oe=[gSe(Qt=>{const _n=SN(Qt,i,ae),Gt=typeof ee.current=="function"?ee.current(_n):ee.current,Tn=typeof ue.current=="function"?ue.current(_n):ue.current;return{mainAxis:Gt,crossAxis:Tn,alignmentAxis:Tn}},[typeof s!="function"?s:0,typeof c!="function"?c:0,ae,i])],de=D==="none"&&M!=="shift",te=!de&&(h||x||M==="shift"),Se=M==="none"?null:bSe({...P,padding:{top:Y.top+fe,right:Y.right+fe,bottom:Y.bottom+fe,left:Y.left+fe},mainAxis:!x&&M==="flip",crossAxis:D==="flip"?"alignment":!1,fallbackAxisSideDirection:$}),we=de?null:ySe(Qt=>{const _n=gs(Qt.elements.floating).documentElement;return{...P,rootBoundary:x?{x:0,y:0,width:_n.clientWidth,height:_n.clientHeight}:void 0,mainAxis:D!=="none",crossAxis:te,limiter:h||x?void 0:vSe(Gt=>{if(!G.current)return{};const{width:Tn,height:En}=G.current.getBoundingClientRect(),Pn=us(oo(Gt.placement)),Dt=Pn==="y"?Tn:En,xn=Pn==="y"?Y.left+Y.right:Y.top+Y.bottom;return{offset:Dt/2+xn/2}})}},[P,h,x,Y,D]);M==="shift"||D==="shift"||l==="center"?Oe.push(we,Se):Oe.push(Se,we),Oe.push(SSe({...P,apply({elements:{floating:Qt},rects:{reference:_n},availableWidth:Gt,availableHeight:Tn}){Object.entries({"--available-width":`${Gt}px`,"--available-height":`${Tn}px`,"--anchor-width":`${_n.width}px`,"--anchor-height":`${_n.height}px`}).forEach(([En,Pn])=>{Qt.style.setProperty(En,Pn)})}}),v2e(()=>({element:G.current||document.createElement("div"),padding:m,offsetParent:"floating"}),[m]),{name:"transformOrigin",fn(Qt){const{elements:_n,middlewareData:Gt,placement:Tn,rects:En,y:Pn}=Qt,Dt=oo(Tn),xn=us(Dt),Kt=G.current,sr=Gt.arrow?.x||0,wr=Gt.arrow?.y||0,qr=Kt?.clientWidth||0,ft=Kt?.clientHeight||0,tn=sr+qr/2,Fn=wr+ft/2,on=Math.abs(Gt.shift?.y||0),Cn=En.reference.height/2,Ft=typeof s=="function"?s(SN(Qt,i,ae)):s,Vr=on>Ft,Pr={top:`${tn}px calc(100% + ${Ft}px)`,bottom:`${tn}px ${-Ft}px`,left:`calc(100% + ${Ft}px) ${Fn}px`,right:`${-Ft}px ${Fn}px`}[Dt],$a=`${tn}px ${En.reference.y+Cn-Pn}px`;return _n.floating.style.setProperty("--transform-origin",te&&xn==="y"&&Vr?$a:Pr),{}}},b2e,S),ct(()=>{!b&&w&&w.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[b,w]);const $e=j.useMemo(()=>({elementResize:!g&&typeof ResizeObserver<"u",layoutShift:!g&&typeof IntersectionObserver<"u"}),[g]),{refs:Te,elements:Pe,x:Ge,y:Ce,middlewareData:Be,update:Fe,placement:Je,context:ke,isPositioned:Ue,floatingStyles:Xe}=WSe({rootContext:w,placement:B,middleware:Oe,strategy:r,whileElementsMounted:v?void 0:(...Qt)=>iN(...Qt,$e),nodeId:R,externalTree:E}),{sideX:Mt,sideY:Ae}=Be.adaptiveOrigin||rw,xe=Ue?r:"fixed",Ne=j.useMemo(()=>S?{position:xe,[Mt]:Ge,[Ae]:Ce}:{position:xe,...Xe},[S,xe,Mt,Ge,Ae,Ce,Xe]),Ke=j.useRef(null);ct(()=>{if(!b)return;const Qt=F.current,_n=typeof Qt=="function"?Qt():Qt,Tn=(wN(_n)?_n.current:_n)||null||null;Tn!==Ke.current&&(Te.setPositionReference(Tn),Ke.current=Tn)},[b,Te,V,F]),j.useEffect(()=>{if(!b)return;const Qt=F.current;typeof Qt!="function"&&wN(Qt)&&Qt.current!==Ke.current&&(Te.setPositionReference(Qt.current),Ke.current=Qt.current)},[b,Te,V,F]),j.useEffect(()=>{if(v&&b&&Pe.domReference&&Pe.floating)return iN(Pe.domReference,Pe.floating,Fe,$e)},[v,b,Pe,Fe,$e]);const vt=oo(Je),Xt=gU(i,vt,ae),Vt=mf(Je)||"center",wt=!!Be.hide?.referenceHidden;ct(()=>{T&&b&&Ue&&C(vt)},[T,b,Ue,vt]);const Ht=j.useMemo(()=>({position:"absolute",top:Be.arrow?.y,left:Be.arrow?.x}),[Be.arrow]),Rt=Be.arrow?.centerOffset!==0;return j.useMemo(()=>({positionerStyles:Ne,arrowStyles:Ht,arrowRef:G,arrowUncentered:Rt,side:Xt,align:Vt,physicalSide:vt,anchorHidden:wt,refs:Te,context:ke,isPositioned:Ue,update:Fe}),[Ne,Ht,G,Rt,Xt,Vt,vt,wt,Te,ke,Ue,Fe])}function wN(e){return e!=null&&"current"in e}const vU=j.createContext(void 0);function I5(){const e=j.useContext(vU);if(!e)throw new Error(Si(59));return e}function Bw(e,t){e&&Object.assign(e.style,t)}const bU={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},w2e={position:"fixed"},E2e=j.forwardRef(function(t,r){const{anchor:i,positionMethod:s="absolute",className:l,render:c,side:f="bottom",align:d="center",sideOffset:h=0,alignOffset:m=0,collisionBoundary:g="clipping-ancestors",collisionPadding:v,arrowPadding:w=5,sticky:b=!1,disableAnchorTracking:_,alignItemWithTrigger:x=!0,collisionAvoidance:R=bae,...S}=t,{store:T,listRef:E,labelsRef:O,alignItemWithTriggerActiveRef:C,selectedItemTextRef:M,valuesRef:D,initialValueRef:$,popupRef:q,setValue:L}=Fl(),V=dU(),F=qt(T,Lt.open),re=qt(T,Lt.mounted),ae=qt(T,Lt.modal),K=qt(T,Lt.value),B=qt(T,Lt.openMethod),Y=qt(T,Lt.positionerElement),fe=qt(T,Lt.triggerElement),se=qt(T,Lt.isItemEqualToValue),N=j.useRef(null),I=j.useRef(null),[U,P]=j.useState(x),G=re&&U&&B!=="touch";!re&&U!==x&&P(x),ct(()=>{re||(Lt.scrollUpArrowVisible(T.state)&&T.set("scrollUpArrowVisible",!1),Lt.scrollDownArrowVisible(T.state)&&T.set("scrollDownArrowVisible",!1))},[T,re]),j.useImperativeHandle(C,()=>G),D5((G||ae)&&F&&B!=="touch",fe);const ee=yU({anchor:i,floatingRootContext:V,positionMethod:s,mounted:re,side:f,sideOffset:h,align:d,alignOffset:m,arrowPadding:w,collisionBoundary:g,collisionPadding:v,sticky:b,disableAnchorTracking:_??G,collisionAvoidance:R,keepMounted:!0}),ue=G?"none":ee.side,ve=G?w2e:ee.positionerStyles,Ee=j.useMemo(()=>{const Te={};return F||(Te.pointerEvents="none"),{role:"presentation",hidden:!re,style:{...ve,...Te}}},[F,re,ve]),Oe=j.useMemo(()=>({open:F,side:ue,align:ee.align,anchorHidden:ee.anchorHidden}),[F,ue,ee.align,ee.anchorHidden]),de=ot(Te=>{T.set("positionerElement",Te)}),te=mr("div",t,{ref:[r,de],state:Oe,stateAttributesMapping:Bm,props:[Ee,S]}),Se=j.useRef(0),we=ot(Te=>{if(Te.size===0&&Se.current===0||D.current.length===0)return;const Pe=Se.current;if(Se.current=Te.size,Te.size===Pe)return;const Ge=mn(af);if(Pe!==0&&!T.state.multiple&&K!==null&&MO(D.current,K,se)===-1){const Be=$.current,Je=Be!=null&&IT(D.current,Be,se)?Be:null;L(Je,Ge),Je===null&&(T.set("selectedIndex",null),M.current=null)}if(Pe!==0&&T.state.multiple&&Array.isArray(K)){const Ce=K.filter(Be=>IT(D.current,Be,se));(Ce.length!==K.length||Ce.some(Be=>!IT(K,Be,se)))&&(L(Ce,Ge),Ce.length===0&&(T.set("selectedIndex",null),M.current=null))}if(F&&G){T.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const Ce={height:""};Bw(Y,Ce),Bw(q.current,Ce)}}),$e=j.useMemo(()=>({...ee,side:ue,alignItemWithTriggerActive:G,setControlledAlignItemWithTrigger:P,scrollUpArrowRef:N,scrollDownArrowRef:I}),[ee,ue,G,P]);return k.jsx(f5,{elementsRef:E,labelsRef:O,onMapChange:we,children:k.jsxs(vU.Provider,{value:$e,children:[re&&ae&&k.jsx(k5,{inert:j5(!F),cutout:fe}),te]})})});function SU(e){const t=e.currentTarget.getBoundingClientRect();return t.top+1<=e.clientY&&e.clientY<=t.bottom-1&&t.left+1<=e.clientX&&e.clientX<=t.right-1}const DS="base-ui-disable-scrollbar",kO={className:DS,getElement(e){return k.jsx("style",{nonce:e,href:DS,precedence:"base-ui:low",children:`.${DS}{scrollbar-width:none}.${DS}::-webkit-scrollbar{display:none}`})}},x2e=j.createContext(void 0);function wU(e){return j.useContext(x2e)}function L5(e){return e==="starting"?vae:Da}function _2e(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}const T2e={...Bm,...d1},C2e=j.forwardRef(function(t,r){const{render:i,className:s,...l}=t,{store:c,popupRef:f,onOpenChangeComplete:d,setOpen:h,valueRef:m,selectedItemTextRef:g,keyboardActiveRef:v,multiple:w,handleScrollArrowVisibility:b,scrollHandlerRef:_,highlightItemOnHover:x}=Fl(),{side:R,align:S,alignItemWithTriggerActive:T,setControlledAlignItemWithTrigger:E,scrollDownArrowRef:O,scrollUpArrowRef:C}=I5(),M=wU()!=null,D=dU(),{nonce:$,disableStyleElements:q}=_be(),L=no(),V=qt(c,Lt.id),F=qt(c,Lt.open),re=qt(c,Lt.mounted),ae=qt(c,Lt.popupProps),K=qt(c,Lt.transitionStatus),B=qt(c,Lt.triggerElement),Y=qt(c,Lt.positionerElement),fe=qt(c,Lt.listElement),se=j.useRef(0),N=j.useRef(!1),I=j.useRef(0),U=j.useRef(!1),P=j.useRef({}),G=k2(),ee=ot(Oe=>{if(!Y||!f.current||!U.current)return;if(N.current||!T){b();return}const de=Y.style.top==="0px",te=Y.style.bottom==="0px",Se=Y.getBoundingClientRect().height,we=gs(Y),$e=getComputedStyle(Y),Te=parseFloat($e.marginTop),Pe=parseFloat($e.marginBottom),Ge=EN(getComputedStyle(f.current)),Ce=we.documentElement.clientHeight-Te-Pe,Be=Oe.scrollTop,Fe=Oe.scrollHeight,Je=Oe.clientHeight,ke=Fe-Je;let Ue=0,Xe=null,Mt=!1;if(de){const Ae=ke-Be,xe=Se+Ae,Ne=Math.min(xe,Ce);Ue=Ne,Ne!==Ce?Xe=ke:Mt=!0}else if(te){const Ae=Be-0,xe=Se+Ae,Ne=Math.min(xe,Ce),Ke=xe-Ce;Ue=Ne,Ne!==Ce?Xe=0:(Mt=!0,Be<ke&&(Xe=Be-(Ae-Ke)))}Ue!==0&&(Y.style.height=`${Ue}px`),Xe!=null&&(Oe.scrollTop=Xe),(Mt||Ue>=Ge)&&(N.current=!0),b()});j.useImperativeHandle(_,()=>ee,[ee]),cp({open:F,ref:f,onComplete(){F&&d?.(!0)}});const ue=j.useMemo(()=>({open:F,transitionStatus:K,side:R,align:S}),[F,K,R,S]);ct(()=>{!Y||!f.current||Object.keys(P.current).length||(P.current={top:Y.style.top||"0",left:Y.style.left||"0",right:Y.style.right,height:Y.style.height,bottom:Y.style.bottom,minHeight:Y.style.minHeight,maxHeight:Y.style.maxHeight,marginTop:Y.style.marginTop,marginBottom:Y.style.marginBottom})},[f,Y]),ct(()=>{F||T||(U.current=!1,N.current=!1,se.current=0,I.current=0,Bw(Y,P.current))},[F,T,Y,f]),ct(()=>{const Oe=f.current;if(!(!F||!B||!Y||!Oe||c.state.transitionStatus==="ending")){if(!T){U.current=!0,G.request(b),Oe.style.removeProperty("--transform-origin");return}queueMicrotask(()=>{const de=R2e(Oe);Oe.style.removeProperty("--transform-origin");try{const te=getComputedStyle(Y),Se=getComputedStyle(Oe),we=gs(B),$e=ha(Y),Te=B.getBoundingClientRect(),Pe=Y.getBoundingClientRect(),Ge=Te.left,Ce=Te.height,Be=fe||Oe,Fe=Be.scrollHeight,Je=parseFloat(Se.borderBottomWidth),ke=parseFloat(te.marginTop)||10,Ue=parseFloat(te.marginBottom)||10,Xe=parseFloat(te.minHeight)||100,Mt=EN(Se),Ae=5,xe=5,Ne=20,Ke=we.documentElement.clientHeight-ke-Ue,vt=we.documentElement.clientWidth,Xt=Ke-Te.bottom+Ce,Vt=g.current,wt=m.current;let Ht,Rt=0,Qt=0;if(Vt&&wt){const ft=wt.getBoundingClientRect();Ht=Vt.getBoundingClientRect();const tn=ft.left-Ge,Fn=Ht.left-Pe.left,on=ft.top-Te.top+ft.height/2,Cn=Ht.top-Pe.top+Ht.height/2;Rt=tn-Fn,Qt=Cn-on}const _n=Xt+Qt+Ue+Je;let Gt=Math.min(Ke,_n);const Tn=Ke-ke-Ue,En=_n-Gt,Pn=Math.max(Ae,Ge+Rt),Dt=vt-xe,xn=Math.max(0,Pn+Pe.width-Dt);Y.style.left=`${Pn-xn}px`,Y.style.height=`${Gt}px`,Y.style.maxHeight="auto",Y.style.marginTop=`${ke}px`,Y.style.marginBottom=`${Ue}px`,Oe.style.height="100%";const Kt=Be.scrollHeight-Be.clientHeight,sr=En>=Kt;sr&&(Gt=Math.min(Ke,Pe.height)-(En-Kt));const wr=Te.top<Ne||Te.bottom>Ke-Ne||Gt<Math.min(Fe,Xe),qr=($e.visualViewport?.scale??1)!==1&&Q7;if(wr||qr){U.current=!0,Bw(Y,P.current),ms.flushSync(()=>E(!1));return}if(sr){const ft=Math.max(0,Ke-_n);Y.style.top=Pe.height>=Tn?"0":`${ft}px`,Y.style.height=`${Gt}px`,Be.scrollTop=Be.scrollHeight-Be.clientHeight,se.current=Math.max(Xe,Gt)}else Y.style.bottom="0",se.current=Math.max(Xe,Gt),Be.scrollTop=En;if(Ht){const ft=Pe.top,tn=Pe.height,Fn=Ht.top+Ht.height/2,on=tn>0?(Fn-ft)/tn*100:50,Cn=_2e(on,0,100);Oe.style.setProperty("--transform-origin",`50% ${Cn}%`)}(se.current===Ke||Gt>=Mt)&&(N.current=!0),b(),setTimeout(()=>{U.current=!0})}finally{de()}})}},[c,F,Y,B,m,g,f,b,T,E,G,O,C,fe]),j.useEffect(()=>{if(!T||!Y||!F)return;const Oe=ha(Y);function de(te){h(!1,mn(Pve,te))}return Oe.addEventListener("resize",de),()=>{Oe.removeEventListener("resize",de)}},[h,T,Y,F]);const ve={...fe?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":w||void 0,id:`${V}-list`},onKeyDown(Oe){v.current=!0,M&&x5.has(Oe.key)&&Oe.stopPropagation()},onMouseMove(){v.current=!1},onPointerLeave(Oe){if(!x||SU(Oe)||Oe.pointerType==="touch")return;const de=Oe.currentTarget;L.start(0,()=>{c.set("activeIndex",null),de.focus({preventScroll:!0})})},onScroll(Oe){fe||_.current?.(Oe.currentTarget)},...T&&{style:fe?{height:"100%"}:bU}},Ee=mr("div",t,{ref:[r,f],state:ue,stateAttributesMapping:T2e,props:[ae,ve,L5(K),{className:!fe&&T?kO.className:void 0},l]});return k.jsxs(j.Fragment,{children:[!q&&kO.getElement($),k.jsx(C5,{context:D,modal:!1,disabled:!re,restoreFocus:!0,children:Ee})]})});function EN(e){const t=e.maxHeight||"";return t.endsWith("px")&&parseFloat(t)||1/0}const xN={transform:"none",scale:"1",translate:"0 0"};function O2e(e,t,r){r?e.setProperty(t,r):e.removeProperty(t)}function R2e(e){const{style:t}=e,r={},i=Object.keys(xN);for(const s of i)r[s]=t.getPropertyValue(s),t.setProperty(s,xN[s]);return()=>{for(const s of i)O2e(t,s,r[s])}}const A2e=j.forwardRef(function(t,r){const{className:i,render:s,...l}=t,{store:c,scrollHandlerRef:f}=Fl(),{alignItemWithTriggerActive:d}=I5(),h=qt(c,Lt.hasScrollArrows),m=qt(c,Lt.openMethod),g=qt(c,Lt.multiple),w={id:`${qt(c,Lt.id)}-list`,role:"listbox","aria-multiselectable":g||void 0,onScroll(_){f.current?.(_.currentTarget)},...d&&{style:bU},className:h&&m!=="touch"?kO.className:void 0},b=ot(_=>{c.set("listElement",_)});return mr("div",t,{ref:[r,b],props:[w,l]})}),EU=j.createContext(void 0);function U5(){const e=j.useContext(EU);if(!e)throw new Error(Si(57));return e}const M2e=j.memo(j.forwardRef(function(t,r){const{render:i,className:s,value:l=null,label:c,disabled:f=!1,nativeButton:d=!1,...h}=t,m=j.useRef(null),g=m5({label:c,textRef:m,indexGuessBehavior:H7.GuessFromOrder}),{store:v,getItemProps:w,setOpen:b,setValue:_,selectionRef:x,typingRef:R,valuesRef:S,keyboardActiveRef:T,multiple:E,highlightItemOnHover:O}=Fl(),C=no(),M=qt(v,Lt.isActive,g.index),D=qt(v,Lt.isSelected,g.index,l),$=qt(v,Lt.isSelectedByFocus,g.index),q=qt(v,Lt.isItemEqualToValue),L=g.index,V=L!==-1,F=j.useRef(null),re=ka(L);ct(()=>{if(!V)return;const ee=S.current;return ee[L]=l,()=>{delete ee[L]}},[V,L,l,S]),ct(()=>{if(!V)return;const ee=v.state.value;let ue=ee;E&&Array.isArray(ee)&&ee.length>0&&(ue=ee[ee.length-1]),ue!==void 0&&bm(ue,l,q)&&v.set("selectedIndex",L)},[V,L,E,q,v,l]);const ae=j.useMemo(()=>({disabled:f,selected:D,highlighted:M}),[f,D,M]),K=w({active:M,selected:D});K.onFocus=void 0,K.id=void 0;const B=j.useRef(null),Y=j.useRef("mouse"),fe=j.useRef(!1),{getButtonProps:se,buttonRef:N}=ap({disabled:f,focusableWhenDisabled:!0,native:d});function I(ee){const ue=v.state.value;if(E){const ve=Array.isArray(ue)?ue:[],Ee=D?r2e(ve,l,q):[...ve,l];_(Ee,mn(ET,ee))}else _(l,mn(ET,ee)),b(!1,mn(ET,ee))}const U={role:"option","aria-selected":D,tabIndex:M?0:-1,onFocus(){v.set("activeIndex",L)},onMouseEnter(){!T.current&&v.state.selectedIndex===null&&v.set("activeIndex",L)},onMouseMove(){O&&v.set("activeIndex",L)},onMouseLeave(ee){!O||T.current||SU(ee)||C.start(0,()=>{v.state.activeIndex===L&&v.set("activeIndex",null)})},onTouchStart(){x.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(ee){B.current=ee.key,v.set("activeIndex",L)},onClick(ee){fe.current=!1,!(ee.type==="keydown"&&B.current===null)&&(f||B.current===" "&&R.current||Y.current!=="touch"&&!M||(B.current=null,I(ee.nativeEvent)))},onPointerEnter(ee){Y.current=ee.pointerType},onPointerDown(ee){Y.current=ee.pointerType,fe.current=!0},onMouseUp(ee){if(f)return;if(fe.current){fe.current=!1;return}const ue=!x.current.allowSelectedMouseUp&&D,ve=!x.current.allowUnselectedMouseUp&&!D;ue||ve||Y.current!=="touch"&&!M||I(ee.nativeEvent)}},P=mr("div",t,{ref:[N,r,g.ref,F],state:ae,props:[K,U,h,se]}),G=j.useMemo(()=>({selected:D,indexRef:re,textRef:m,selectedByFocus:$,hasRegistered:V}),[D,re,m,$,V]);return k.jsx(EU.Provider,{value:G,children:P})})),j2e=j.forwardRef(function(t,r){const i=t.keepMounted??!1,{selected:s}=U5();return i||s?k.jsx(k2e,{...t,ref:r}):null}),k2e=j.memo(j.forwardRef((e,t)=>{const{render:r,className:i,keepMounted:s,...l}=e,{selected:c}=U5(),f=j.useRef(null),{transitionStatus:d,setMounted:h}=N2(c),m=j.useMemo(()=>({selected:c,transitionStatus:d}),[c,d]),g=mr("span",e,{ref:[t,f],state:m,props:[{"aria-hidden":!0,children:"✔️"},l],stateAttributesMapping:d1});return cp({open:c,ref:f,onComplete(){c||h(!1)}}),g})),D2e=j.memo(j.forwardRef(function(t,r){const{indexRef:i,textRef:s,selectedByFocus:l,hasRegistered:c}=U5(),{selectedItemTextRef:f}=Fl(),{className:d,render:h,...m}=t,g=j.useCallback(w=>{if(!w||!c)return;const b=f.current===null||!f.current.isConnected;(l||b&&i.current===0)&&(f.current=w)},[f,i,l,c]);return mr("div",t,{ref:[g,r,s],props:m})})),xU=j.forwardRef(function(t,r){const{render:i,className:s,direction:l,keepMounted:c=!1,...f}=t,{store:d,popupRef:h,listRef:m,handleScrollArrowVisibility:g,scrollArrowsMountedCountRef:v}=Fl(),{side:w,scrollDownArrowRef:b,scrollUpArrowRef:_}=I5(),x=l==="up"?Lt.scrollUpArrowVisible:Lt.scrollDownArrowVisible,R=qt(d,x),S=qt(d,Lt.openMethod),T=R&&S!=="touch",E=no(),O=l==="up"?_:b,{transitionStatus:C,setMounted:M}=N2(T);ct(()=>(v.current+=1,d.state.hasScrollArrows||d.set("hasScrollArrows",!0),()=>{v.current=Math.max(0,v.current-1),v.current===0&&d.state.hasScrollArrows&&d.set("hasScrollArrows",!1)}),[d,v]),cp({open:T,ref:O,onComplete(){T||M(!1)}});const D=j.useMemo(()=>({direction:l,visible:T,side:w,transitionStatus:C}),[l,T,w,C]),q=mr("div",t,{ref:[r,O],state:D,props:[{"aria-hidden":!0,children:l==="up"?"▲":"▼",style:{position:"absolute"},onMouseMove(V){if(V.movementX===0&&V.movementY===0||E.isStarted())return;d.set("activeIndex",null);function F(){const re=d.state.listElement??h.current;if(!re)return;d.set("activeIndex",null),g();const ae=re.scrollTop===0,K=Math.round(re.scrollTop+re.clientHeight)>=re.scrollHeight;if(m.current.length===0&&(l==="up"?d.set("scrollUpArrowVisible",!ae):d.set("scrollDownArrowVisible",!K)),l==="up"&&ae||l==="down"&&K){E.clear();return}if((d.state.listElement||h.current)&&m.current&&m.current.length>0){const Y=m.current,fe=O.current?.offsetHeight||0;if(l==="up"){let se=0;const N=re.scrollTop+fe;for(let U=0;U<Y.length;U+=1){const P=Y[U];if(P&&P.offsetTop>=N){se=U;break}}const I=Math.max(0,se-1);if(I<se){const U=Y[I];U&&(re.scrollTop=Math.max(0,U.offsetTop-fe))}else re.scrollTop=0}else{let se=Y.length-1;const N=re.scrollTop+re.clientHeight-fe;for(let U=0;U<Y.length;U+=1){const P=Y[U];if(P&&P.offsetTop+P.offsetHeight>N){se=Math.max(0,U-1);break}}const I=Math.min(Y.length-1,se+1);if(I>se){const U=Y[I];U&&(re.scrollTop=U.offsetTop+U.offsetHeight-re.clientHeight+fe)}else re.scrollTop=re.scrollHeight-re.clientHeight}}E.start(40,F)}E.start(40,F)},onMouseLeave(){E.clear()}},f]});return T||c?q:null}),N2e=j.forwardRef(function(t,r){return k.jsx(xU,{...t,ref:r,direction:"down"})}),z2e=j.forwardRef(function(t,r){return k.jsx(xU,{...t,ref:r,direction:"up"})}),$2e=j.createContext(void 0),P2e=j.forwardRef(function(t,r){const{className:i,render:s,...l}=t,[c,f]=j.useState(),d=j.useMemo(()=>({labelId:c,setLabelId:f}),[c,f]),h=mr("div",t,{ref:r,props:[{role:"group","aria-labelledby":c},l]});return k.jsx($2e.Provider,{value:d,children:h})}),_N=s2e;function TN({className:e,...t}){return k.jsx(P2e,{"data-slot":"select-group",className:en("scroll-my-1",e),...t})}function CN({className:e,...t}){return k.jsx(h2e,{"data-slot":"select-value",className:en("flex flex-1 text-left",e),...t})}function ON({className:e,size:t="default",children:r,...i}){return k.jsxs(f2e,{"data-slot":"select-trigger","data-size":t,className:en("border-input data-[placeholder]:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 gap-1.5 rounded-none border bg-transparent py-2 pr-2 pl-2.5 text-xs transition-colors select-none focus-visible:ring-1 aria-invalid:ring-1 data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-none *:data-[slot=select-value]:flex *:data-[slot=select-value]:gap-1.5 [&_svg:not([class*='size-'])]:size-4 flex w-fit items-center justify-between whitespace-nowrap outline-none disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...i,children:[r,k.jsx(p2e,{render:k.jsx(X9,{className:"text-muted-foreground size-4 pointer-events-none"})})]})}function RN({className:e,children:t,side:r="bottom",sideOffset:i=4,align:s="center",alignOffset:l=0,alignItemWithTrigger:c=!0,...f}){return k.jsx(g2e,{children:k.jsx(E2e,{side:r,sideOffset:i,align:s,alignOffset:l,alignItemWithTrigger:c,className:"isolate z-50",children:k.jsxs(C2e,{"data-slot":"select-content",className:en("bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 min-w-36 rounded-none shadow-md ring-1 duration-100 relative isolate z-50 max-h-(--available-height) w-(--anchor-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto",e),...f,children:[k.jsx(I2e,{}),k.jsx(A2e,{children:t}),k.jsx(L2e,{})]})})})}function xp({className:e,children:t,...r}){return k.jsxs(M2e,{"data-slot":"select-item",className:en("focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground gap-2 rounded-none py-2 pr-8 pl-2 text-xs [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 relative flex w-full cursor-default items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...r,children:[k.jsx(D2e,{className:"flex flex-1 gap-2 shrink-0 whitespace-nowrap",children:t}),k.jsx(j2e,{render:k.jsx("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center"}),children:k.jsx(YR,{className:"pointer-events-none"})})]})}function I2e({className:e,...t}){return k.jsx(z2e,{"data-slot":"select-scroll-up-button",className:en("bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4 top-0 w-full",e),...t,children:k.jsx(wre,{})})}function L2e({className:e,...t}){return k.jsx(N2e,{"data-slot":"select-scroll-down-button",className:en("bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4 bottom-0 w-full",e),...t,children:k.jsx(X9,{})})}const _U=j.createContext(void 0);function U2e(){const e=j.useContext(_U);if(e===void 0)throw new Error(Si(63));return e}let AN=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const TU={...z5,checked(e){return e?{[AN.checked]:""}:{[AN.unchecked]:""}}},q2e=j.forwardRef(function(t,r){const{checked:i,className:s,defaultChecked:l,id:c,inputRef:f,name:d,nativeButton:h=!1,onCheckedChange:m,readOnly:g=!1,required:v=!1,disabled:w=!1,render:b,uncheckedValue:_,value:x,...R}=t,{clearErrors:S}=$5(),{state:T,setTouched:E,setDirty:O,validityData:C,setFilled:M,setFocused:D,shouldValidateOnChange:$,validationMode:q,disabled:L,name:V,validation:F}=Xh(),{labelId:re}=I2(),ae=L||w,K=V??d,B=ot(m),Y=j.useRef(null),fe=fc(Y,f,F.inputRef),se=j.useRef(null),N=Um(),I=L2({id:c,implicit:!1,controlRef:se}),U=h?void 0:I,[P,G]=Tb({controlled:i,default:!!l,name:"Switch",state:"checked"});P5({id:N,commit:F.commit,value:P,controlRef:se,name:K,getValue:()=>P}),ct(()=>{Y.current&&M(Y.current.checked)},[Y,M]),mU(P,()=>{S(K),O(P!==C.initialValue),M(P),$()?F.commit(P):F.commit(P,!0)});const{getButtonProps:ee,buttonRef:ue}=ap({disabled:ae,native:h}),ve={id:h?I:N,role:"switch","aria-checked":P,"aria-readonly":g||void 0,"aria-required":v||void 0,"aria-labelledby":re,onFocus(){ae||D(!0)},onBlur(){const te=Y.current;!te||ae||(E(!0),D(!1),q==="onBlur"&&F.commit(te.checked))},onClick(te){g||ae||(te.preventDefault(),Y?.current?.click())}},Ee=j.useMemo(()=>Qb({checked:P,disabled:ae,id:U,name:K,required:v,style:K?IL:j2,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:fe,onChange(te){if(te.nativeEvent.defaultPrevented)return;const Se=te.target.checked,we=mn(af,te.nativeEvent);B?.(Se,we),!we.isCanceled&&G(Se)},onFocus(){se.current?.focus()}},F.getInputValidationProps,x!==void 0?{value:x}:Da),[P,ae,fe,U,K,B,v,G,F,x]),Oe=j.useMemo(()=>({...T,checked:P,disabled:ae,readOnly:g,required:v}),[T,P,ae,g,v]),de=mr("span",t,{state:Oe,ref:[r,se,ue],props:[ve,F.getValidationProps,R,ee],stateAttributesMapping:TU});return k.jsxs(_U.Provider,{value:Oe,children:[de,!P&&K&&_!==void 0&&k.jsx("input",{type:"hidden",name:K,value:_}),k.jsx("input",{...Ee})]})}),V2e=j.forwardRef(function(t,r){const{render:i,className:s,...l}=t,{state:c}=Xh(),f=U2e(),d={...c,...f};return mr("span",t,{state:d,ref:r,stateAttributesMapping:TU,props:l})});function MN({className:e,size:t="default",...r}){return k.jsx(q2e,{"data-slot":"switch","data-size":t,className:en("cursor-pointer data-checked:bg-primary data-unchecked:bg-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 dark:data-unchecked:bg-input/80 shrink-0 rounded-full border border-transparent focus-visible:ring-1 aria-invalid:ring-1 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] peer group/switch relative inline-flex items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50",e),...r,children:k.jsx(V2e,{"data-slot":"switch-thumb",className:"bg-background dark:data-unchecked:bg-foreground dark:data-checked:bg-primary-foreground rounded-full group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 pointer-events-none block ring-0 transition-transform"})})}function F2e({className:e,...t}){return k.jsx("div",{"data-slot":"input-group",role:"group",className:en("border-input dark:bg-input/30 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-disabled:bg-input/50 dark:has-disabled:bg-input/80 h-8 rounded-none border transition-colors has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:ring-1 has-[[data-slot][aria-invalid=true]]:ring-1 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5 [[data-slot=combobox-content]_&]:focus-within:border-inherit [[data-slot=combobox-content]_&]:focus-within:ring-0 group/input-group relative flex w-full min-w-0 items-center outline-none has-[>textarea]:h-auto",e),...t})}const B2e=bc("text-muted-foreground h-auto gap-2 py-1.5 text-xs font-medium group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-none [&>svg:not([class*='size-'])]:size-4 flex cursor-text items-center justify-center select-none",{variants:{align:{"inline-start":"pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem] order-first","inline-end":"pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem] order-last","block-start":"px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2 order-first w-full justify-start","block-end":"px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2 order-last w-full justify-start"}},defaultVariants:{align:"inline-start"}});function H2e({className:e,align:t="inline-start",...r}){return k.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:en(B2e({align:t}),e),onClick:i=>{i.target.closest("button")||i.currentTarget.parentElement?.querySelector("input")?.focus()},...r})}function G2e({className:e,...t}){return k.jsx(es,{"data-slot":"command",className:en("bg-popover text-popover-foreground rounded-none flex size-full flex-col overflow-hidden",e),...t})}function K2e({className:e,...t}){return k.jsx("div",{"data-slot":"command-input-wrapper",className:"border-b pb-0",children:k.jsxs(F2e,{className:"bg-input/30 border-input/30 h-8 border-none shadow-none! *:data-[slot=input-group-addon]:pl-2!",children:[k.jsx(es.Input,{"data-slot":"command-input",className:en("w-full text-xs outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...t}),k.jsx(H2e,{children:k.jsx(Pre,{className:"size-4 shrink-0 opacity-50"})})]})})}function Y2e({className:e,...t}){return k.jsx(es.List,{"data-slot":"command-list",className:en("no-scrollbar max-h-72 scroll-py-0 outline-none overflow-x-hidden overflow-y-auto",e),...t})}function Z2e({className:e,...t}){return k.jsx(es.Empty,{"data-slot":"command-empty",className:en("py-6 text-center text-xs",e),...t})}function X2e({className:e,...t}){return k.jsx(es.Group,{"data-slot":"command-group",className:en("text-foreground **:[[cmdk-group-heading]]:text-muted-foreground overflow-hidden **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs",e),...t})}function Q2e({className:e,children:t,...r}){return k.jsxs(es.Item,{"data-slot":"command-item",className:en("data-selected:bg-muted data-selected:text-foreground data-selected:*:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-none px-2 py-2 text-xs outline-hidden select-none [&_svg:not([class*='size-'])]:size-4 in-data-[slot=dialog-content]:rounded-none! group/command-item data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...r,children:[t,k.jsx(YR,{className:"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100"})]})}const CU=j.createContext(void 0);function h1(e){const t=j.useContext(CU);if(t===void 0&&!e)throw new Error(Si(47));return t}function W2e(){return{...rU(),disabled:!1,modal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1}}const J2e={...aU,disabled:ut(e=>e.disabled),instantType:ut(e=>e.instantType),openMethod:ut(e=>e.openMethod),openChangeReason:ut(e=>e.openChangeReason),modal:ut(e=>e.modal),stickIfOpen:ut(e=>e.stickIfOpen),titleElementId:ut(e=>e.titleElementId),descriptionElementId:ut(e=>e.descriptionElementId),openOnHover:ut(e=>e.openOnHover),closeDelay:ut(e=>e.closeDelay),hasViewport:ut(e=>e.hasViewport)};class q5 extends A5{constructor(t){const r={...W2e(),...t};r.open&&t?.mounted===void 0&&(r.mounted=!0),super(r,{popupRef:j.createRef(),backdropRef:j.createRef(),internalBackdropRef:j.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:j.createRef(),beforeContentFocusGuardRef:j.createRef(),stickIfOpenTimeout:new of,triggerElements:new z2},J2e)}setOpen=(t,r)=>{const i=r.reason===Go,s=r.reason===Fc&&r.event.detail===0,l=!t&&(r.reason===K7||r.reason==null);if(r.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(t,r),r.isCanceled)return;const c={open:t,nativeEvent:r.event,reason:r.reason,nested:this.state.nested,triggerElement:r.trigger};this.state.floatingRootContext.context.events?.emit("openchange",c);const d=()=>{const h={open:t,openChangeReason:r.reason},m=r.trigger?.id??null;(m||t)&&(h.activeTriggerId=m,h.activeTriggerElement=r.trigger??null),this.update(h)};i?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(yae,()=>{this.set("stickIfOpen",!1)}),ms.flushSync(d)):d(),s||l?this.set("instantType",s?"click":"dismiss"):r.reason===Yh?this.set("instantType","focus"):this.set("instantType",void 0)};static useStore(t,r){const i=so(()=>new q5(r)).current,s=t??i;return E5(i.disposeEffect),s}disposeEffect=()=>this.context.stickIfOpenTimeout.disposeEffect()}function jN({props:e}){const{children:t,open:r,defaultOpen:i=!1,onOpenChange:s,onOpenChangeComplete:l,modal:c=!1,handle:f,triggerId:d,defaultTriggerId:h=null}=e,m=q5.useStore(f?.store,{open:r??i,modal:c,activeTriggerId:d!==void 0?d:h});m.useControlledProp("open",r,i),m.useControlledProp("activeTriggerId",d,h);const g=m.useState("open"),v=m.useState("positionerElement"),w=m.useState("payload"),b=m.useState("openChangeReason");m.useContextCallback("onOpenChange",s),m.useContextCallback("onOpenChangeComplete",l);const{openMethod:_,triggerProps:x,reset:R}=N5(g);tU(m);const{forceUnmount:S}=nU(g,m,()=>{m.update({stickIfOpen:!0,openChangeReason:null}),R()});D5(g&&c===!0&&b!==Go&&_!=="touch",v),j.useEffect(()=>{g||m.context.stickIfOpenTimeout.clear()},[m,g]);const T=j.useCallback(ae=>{const K=mn(ae);return K.preventUnmountOnClose=()=>{m.set("preventUnmountingOnClose",!0)},K},[m]),E=j.useCallback(()=>{m.setOpen(!1,T(Y7))},[m,T]);j.useImperativeHandle(e.actionsRef,()=>({unmount:S,close:E}),[S,E]);const O=oU({popupStore:m,onOpenChange:m.setOpen}),C=R5(O,{outsidePressEvent:{mouse:c==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),M=lU(O),{getReferenceProps:D,getFloatingProps:$,getTriggerProps:q}=$2([C,M]),L=j.useMemo(()=>D(x),[D,x]),V=j.useMemo(()=>q(x),[q,x]),F=j.useMemo(()=>$(),[$]);m.useSyncedValues({modal:c,openMethod:_,activeTriggerProps:L,inactiveTriggerProps:V,popupProps:F,floatingRootContext:O,nested:gf()!=null});const re=j.useMemo(()=>({store:m}),[m]);return k.jsx(CU.Provider,{value:re,children:typeof t=="function"?t({payload:w}):t})}function eEe(e){return h1(!0)?k.jsx(jN,{props:e}):k.jsx(T1e,{children:k.jsx(jN,{props:e})})}const tEe=300,nEe=j.forwardRef(function(t,r){const{render:i,className:s,disabled:l=!1,nativeButton:c=!0,handle:f,payload:d,openOnHover:h=!1,delay:m=tEe,closeDelay:g=0,id:v,...w}=t,b=h1(!0),_=f?.store??b?.store;if(!_)throw new Error(Si(74));const x=Um(v),R=_.useState("isTriggerActive",x),S=_.useState("floatingRootContext"),T=_.useState("isOpenedByTrigger",x),E=j.useRef(null),{registerTrigger:O,isMountedByThisTrigger:C}=XSe(x,E,_,{payload:d,disabled:l,openOnHover:h,closeDelay:g}),M=_.useState("openChangeReason"),D=_.useState("stickIfOpen"),$=_.useState("openMethod"),q=iwe(S,{enabled:S!=null&&h&&($!=="touch"||M!==Fc),mouseOnly:!0,move:!1,handleClose:hwe(),restMs:m,delay:{close:g},triggerElementRef:E,isActiveTrigger:R}),L=VL(S,{enabled:S!=null,stickIfOpen:D}),V=$2([L]),F=_.useState("triggerProps",C),re=j.useMemo(()=>({disabled:l,open:T}),[l,T]),{getButtonProps:ae,buttonRef:K}=ap({disabled:l,native:c}),B=j.useMemo(()=>({open(I){return I&&M===Fc?DL.open(I):kL.open(I)}}),[M]),Y=mr("button",t,{state:re,ref:[K,r,O,E],props:[V.getReferenceProps(),q,F,{[a$]:"",id:x},w,ae],stateAttributesMapping:B}),fe=j.useRef(null),se=ot(I=>{ms.flushSync(()=>{_.setOpen(!1,mn(Yh,I.nativeEvent,I.currentTarget))}),vbe(fe.current)?.focus()}),N=ot(I=>{const U=_.select("positionerElement");if(U&&Zp(I,U))_.context.beforeContentFocusGuardRef.current?.focus();else{ms.flushSync(()=>{_.setOpen(!1,mn(Yh,I.nativeEvent,I.currentTarget))});let P=ybe(_.context.triggerFocusTargetRef.current||E.current);for(;P!==null&&zn(U,P);){const G=P;if(P=w5(P),P===G)break}P?.focus()}});return R?k.jsxs(j.Fragment,{children:[k.jsx(vm,{ref:fe,onFocus:se}),k.jsx(j.Fragment,{children:Y},x),k.jsx(vm,{ref:_.context.triggerFocusTargetRef,onFocus:N})]}):k.jsx(j.Fragment,{children:Y},x)}),OU=j.createContext(void 0);function rEe(){const e=j.useContext(OU);if(e===void 0)throw new Error(Si(45));return e}const aEe=j.forwardRef(function(t,r){const{keepMounted:i=!1,...s}=t,{store:l}=h1();return l.useState("mounted")||i?k.jsx(OU.Provider,{value:i,children:k.jsx(_5,{ref:r,...s,renderGuards:!1})}):null}),RU=j.createContext(void 0);function iEe(){const e=j.useContext(RU);if(!e)throw new Error(Si(46));return e}const oEe=j.forwardRef(function(t,r){const{render:i,className:s,anchor:l,positionMethod:c="absolute",side:f="bottom",align:d="center",sideOffset:h=0,alignOffset:m=0,collisionBoundary:g="clipping-ancestors",collisionPadding:v=5,arrowPadding:w=5,sticky:b=!1,disableAnchorTracking:_=!1,collisionAvoidance:x=Sae,...R}=t,{store:S}=h1(),T=rEe(),E=x1e(),O=S.useState("floatingRootContext"),C=S.useState("mounted"),M=S.useState("open"),D=S.useState("openChangeReason"),$=S.useState("activeTriggerElement"),q=S.useState("modal"),L=S.useState("positionerElement"),V=S.useState("instantType"),F=S.useState("transitionStatus"),re=S.useState("hasViewport"),ae=j.useRef(null),K=eU(L,!1,!1),B=yU({anchor:l,floatingRootContext:O,positionMethod:c,mounted:C,side:f,sideOffset:h,align:d,alignOffset:m,arrowPadding:w,collisionBoundary:g,collisionPadding:v,sticky:b,disableAnchorTracking:_,keepMounted:T,nodeId:E,collisionAvoidance:x,adaptiveOrigin:re?S2e:void 0}),Y=j.useMemo(()=>{const P={};return M||(P.pointerEvents="none"),{role:"presentation",hidden:!C,style:{...B.positionerStyles,...P}}},[M,C,B.positionerStyles]),fe=j.useMemo(()=>({props:Y,...B}),[Y,B]),se=O?.select("domReferenceElement");ct(()=>{const P=se,G=ae.current;if(P&&(ae.current=P),G&&P&&P!==G){S.set("instantType",void 0);const ee=new AbortController;return K(()=>{S.set("instantType","trigger-change")},ee.signal),()=>{ee.abort()}}},[se,K,S]);const N=j.useMemo(()=>({open:M,side:fe.side,align:fe.align,anchorHidden:fe.anchorHidden,instant:V}),[M,fe.side,fe.align,fe.anchorHidden,V]),I=j.useCallback(P=>{S.set("positionerElement",P)},[S]),U=mr("div",t,{state:N,props:[fe.props,L5(F),R],ref:[r,I],stateAttributesMapping:Bm});return k.jsxs(RU.Provider,{value:fe,children:[C&&q===!0&&D!==Go&&k.jsx(k5,{ref:S.context.internalBackdropRef,inert:j5(!M),cutout:$}),k.jsx(_1e,{id:E,children:U})]})}),sEe={...Bm,...d1},lEe=j.forwardRef(function(t,r){const{className:i,render:s,initialFocus:l,finalFocus:c,...f}=t,{store:d}=h1(),h=iEe(),m=wU()!=null,g=d.useState("open"),v=d.useState("openMethod"),w=d.useState("instantType"),b=d.useState("transitionStatus"),_=d.useState("popupProps"),x=d.useState("titleElementId"),R=d.useState("descriptionElementId"),S=d.useState("modal"),T=d.useState("mounted"),E=d.useState("openChangeReason"),O=d.useState("activeTriggerElement"),C=d.useState("floatingRootContext");cp({open:g,ref:d.context.popupRef,onComplete(){g&&d.context.onOpenChangeComplete?.(!0)}});const M=d.useState("disabled"),D=d.useState("openOnHover"),$=d.useState("closeDelay");nwe(C,{enabled:D&&!M,closeDelay:$});function q(ae){return ae==="touch"?d.context.popupRef.current:!0}const L=l===void 0?q:l,V=j.useMemo(()=>({open:g,side:h.side,align:h.align,instant:w,transitionStatus:b}),[g,h.side,h.align,w,b]),F=j.useCallback(ae=>{d.set("popupElement",ae)},[d]),re=mr("div",t,{state:V,ref:[r,d.context.popupRef,F],props:[_,{"aria-labelledby":x,"aria-describedby":R,onKeyDown(ae){m&&x5.has(ae.key)&&ae.stopPropagation()}},L5(b),f],stateAttributesMapping:sEe});return k.jsx(C5,{context:C,openInteractionType:v,modal:S==="trap-focus",disabled:!T||E===Go,initialFocus:L,returnFocus:c,restoreFocus:"popup",previousFocusableElement:Gr(O)?O:void 0,nextFocusableElement:d.context.triggerFocusTargetRef,beforeContentFocusGuardRef:d.context.beforeContentFocusGuardRef,children:re})});function uEe({...e}){return k.jsx(eEe,{"data-slot":"popover",...e})}function cEe({...e}){return k.jsx(nEe,{"data-slot":"popover-trigger",...e})}function fEe({className:e,align:t="center",alignOffset:r=0,side:i="bottom",sideOffset:s=4,...l}){return k.jsx(aEe,{children:k.jsx(oEe,{align:t,alignOffset:r,side:i,sideOffset:s,className:"isolate z-50",children:k.jsx(lEe,{"data-slot":"popover-content",className:en("bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 flex flex-col gap-2.5 rounded-none p-2.5 text-xs shadow-md ring-1 duration-100 z-50 w-72 origin-(--transform-origin) outline-hidden",e),...l})})})}const kN=[{value:"en-US",label:"English (US)"},{value:"es-ES",label:"español (España)"},{value:"fr-FR",label:"français (France)"},{value:"de-DE",label:"Deutsch"},{value:"it-IT",label:"italiano"},{value:"am-ET",label:"አማርኛ"},{value:"ar",label:"العربية"},{value:"bg-BG",label:"български"},{value:"bn-BD",label:"বাংলা"},{value:"bs-BA",label:"bosanski"},{value:"ca-ES",label:"català"},{value:"cs-CZ",label:"čeština"},{value:"da-DK",label:"dansk"},{value:"el-GR",label:"Ελληνικά"},{value:"es-419",label:"español (Latinoamérica)"},{value:"et-EE",label:"eesti"},{value:"fi-FI",label:"suomi"},{value:"fr-CA",label:"français (Canada)"},{value:"gu-IN",label:"ગુજરાતી"},{value:"hi-IN",label:"हिन्दी"},{value:"hr-HR",label:"hrvatski"},{value:"hu-HU",label:"magyar"},{value:"hy-AM",label:"հայերեն"},{value:"id-ID",label:"Indonesia"},{value:"is-IS",label:"íslenska"},{value:"ja-JP",label:"日本語"},{value:"ka-GE",label:"ქართული"},{value:"kk-KZ",label:"қазақ тілі"},{value:"kn-IN",label:"ಕನ್ನಡ"},{value:"ko-KR",label:"한국어"},{value:"lt-LT",label:"lietuvių"},{value:"lv-LV",label:"latviešu"},{value:"mk-MK",label:"македонски"},{value:"ml-IN",label:"മലയാളം"},{value:"mn-MN",label:"монгол"},{value:"mr-IN",label:"मराठी"},{value:"ms-MY",label:"Bahasa Melayu"},{value:"my-MM",label:"မြန်မာ"},{value:"nb-NO",label:"norsk bokmål"},{value:"nl-NL",label:"Nederlands"},{value:"pa-IN",label:"ਪੰਜਾਬੀ"},{value:"pl-PL",label:"polski"},{value:"pt-BR",label:"português (Brasil)"},{value:"pt-PT",label:"português (Portugal)"},{value:"ro-RO",label:"română"},{value:"ru-RU",label:"русский"},{value:"sk-SK",label:"slovenčina"},{value:"sl-SI",label:"slovenščina"},{value:"so-SO",label:"Soomaali"},{value:"sq-AL",label:"shqip"},{value:"sr-RS",label:"српски"},{value:"sv-SE",label:"svenska"},{value:"sw-KE",label:"Kiswahili"},{value:"ta-IN",label:"தமிழ்"},{value:"te-IN",label:"తెలుగు"},{value:"th-TH",label:"ไทย"},{value:"tl-PH",label:"Tagalog"},{value:"tr-TR",label:"Türkçe"},{value:"uk-UA",label:"українська"},{value:"ur-PK",label:"اردو"},{value:"vi-VN",label:"Tiếng Việt"},{value:"zh-Hans",label:"简体中文"},{value:"zh-Hant-HK",label:"繁體中文(香港)"},{value:"zh-Hant-TW",label:"繁體中文(台灣)"}],dEe=({value:e,onValueChange:t})=>{const[r,i]=j.useState(!1),s=kN.find(l=>l.value===e);return k.jsxs(uEe,{open:r,onOpenChange:i,children:[k.jsx(cEe,{children:k.jsxs(Qc,{variant:"outline",role:"combobox","aria-expanded":r,className:"w-full justify-between",children:[s?k.jsxs("span",{children:[s.value,k.jsxs("span",{className:"text-muted-foreground",children:[" ","- ",s.label]})]}):"Select locale...",k.jsx(xre,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),k.jsx(fEe,{className:"w-full p-0",children:k.jsxs(G2e,{children:[k.jsx(K2e,{placeholder:"Search locale..."}),k.jsxs(Y2e,{children:[k.jsx(Z2e,{children:"No locale found."}),k.jsx(X2e,{children:kN.map(l=>k.jsxs(Q2e,{value:l.value,onSelect:c=>{t(c===e?"":c),i(!1)},children:[k.jsxs("span",{children:[l.label," ",k.jsxs("span",{className:"text-muted-foreground",children:["(",l.value,")"]})]}),k.jsx(YR,{className:en("ml-auto h-4 w-4",e===l.value?"opacity-100":"opacity-0")})]},l.value))})]})]})})]})};function hEe({resourceUri:e}){const{data:t}=Y9(e);return t?k.jsx("div",{className:"text-xs",children:k.jsx(M2,{src:t.contents[0],name:null,quotesOnKeys:!1,displayDataTypes:!1,displayObjectSize:!1,enableClipboard:!1,theme:"rjv-default",style:{fontSize:"0.75rem"},collapsed:4,collapseStringsAfterLength:80})}):null}const pEe=()=>{const e=df(),{openaiRef:t,openaiObject:r,openInAppUrl:i}=Cm(e.name),{setToolData:s}=Tm(),l=e._meta?.["openai/outputTemplate"],c=(f,d)=>{const h=t?.current?.contentWindow?.openai;h&&r&&(h[f]=d,s(e.name,{openaiObject:{...r,[f]:d}}))};return r?k.jsx("div",{className:"overflow-auto max-h-full min-h-0",children:k.jsxs(_L,{defaultValue:"widget-state",className:"gap-0",children:[k.jsxs(TL,{className:"border-b border-border w-full",children:[k.jsx(nb,{value:"properties",children:"Properties"}),k.jsx(nb,{value:"widget-state",children:"Widget State"}),l&&k.jsx(nb,{value:"resource",children:"Resource"})]}),k.jsx(rb,{value:"properties",className:"p-4",children:k.jsxs(Gwe,{children:[k.jsxs(Cc,{children:[k.jsx(Oc,{children:"Display Mode"}),k.jsxs(_N,{value:r.displayMode,onValueChange:f=>c("displayMode",f),"aria-label":"Select framework",items:[{label:"Inline",value:"inline"},{label:"Fullscreen",value:"fullscreen"},{label:"Pip",value:"pip"},{label:"Modal",value:"modal"}],name:"displayMode",required:!0,children:[k.jsx(ON,{children:k.jsx(CN,{})}),k.jsx(RN,{children:k.jsxs(TN,{children:[k.jsx(xp,{value:"inline",children:"Inline"}),k.jsx(xp,{value:"fullscreen",children:"Fullscreen"}),k.jsx(xp,{value:"pip",children:"Pip"}),k.jsx(xp,{value:"modal",children:"Modal"})]})})]})]}),k.jsxs(Cc,{children:[k.jsx(Oc,{children:"Theme"}),k.jsxs(Bwe,{children:[k.jsx(Qc,{variant:r.theme==="light"?"default":"outline",onClick:()=>c("theme","light"),children:k.jsx(Lre,{})}),k.jsx(Qc,{variant:r.theme==="dark"?"default":"outline",onClick:()=>c("theme","dark"),children:k.jsx(Dre,{})})]})]}),k.jsxs(Cc,{children:[k.jsx(Oc,{children:"Locale"}),k.jsx(dEe,{value:r.locale,onValueChange:f=>c("locale",f)})]}),k.jsxs(Cc,{children:[k.jsx(Oc,{children:"Max Height"}),k.jsx(PT,{type:"number",value:r.maxHeight!==void 0?String(r.maxHeight):"",onChange:f=>{const d=f.target.value.trim();c("maxHeight",d===""?void 0:Number(d))}})]}),k.jsxs(Cc,{children:[k.jsx(Oc,{children:"Safe Area Insets"}),k.jsx("div",{className:"grid grid-cols-2 gap-4",children:["top","bottom","left","right"].map(f=>{const d=f.charAt(0).toUpperCase()+f.slice(1);return k.jsxs("div",{children:[k.jsx("label",{htmlFor:`safeArea-${f}`,className:"text-xs text-muted-foreground block mb-1",children:d}),k.jsx(PT,{id:`safeArea-${f}`,type:"number",value:r.safeArea?.insets?.[f]!==void 0?String(r.safeArea.insets[f]):"0",onChange:h=>{const m=h.target.value.trim();c("safeArea",{...r.safeArea,insets:{...r.safeArea?.insets,[f]:m===""?0:Number(m)}})}})]},f)})})]}),k.jsxs(Cc,{children:[k.jsx(Oc,{children:"Device Type"}),k.jsxs(_N,{value:r.userAgent?.device?.type??"desktop",onValueChange:f=>c("userAgent",{...r.userAgent,device:{...r.userAgent?.device,type:f}}),"aria-label":"Select device type",items:[{label:"Mobile",value:"mobile"},{label:"Desktop",value:"desktop"}],name:"deviceType",required:!0,children:[k.jsx(ON,{children:k.jsx(CN,{})}),k.jsx(RN,{children:k.jsxs(TN,{children:[k.jsx(xp,{value:"mobile",children:"Mobile"}),k.jsx(xp,{value:"desktop",children:"Desktop"})]})})]})]}),k.jsxs(Cc,{children:[k.jsx(Oc,{children:"Capabilities"}),k.jsxs("div",{className:"flex gap-8",children:[k.jsxs("div",{className:"flex items-center gap-2",children:[k.jsx("label",{htmlFor:"hover",className:"text-xs text-muted-foreground cursor-pointer",children:"Hover"}),k.jsx(MN,{id:"hover",checked:r.userAgent?.capabilities?.hover??!1,onCheckedChange:f=>c("userAgent",{...r.userAgent,capabilities:{...r.userAgent?.capabilities,hover:f}})})]}),k.jsxs("div",{className:"flex items-center gap-2",children:[k.jsx("label",{htmlFor:"touch",className:"text-xs text-muted-foreground cursor-pointer",children:"Touch"}),k.jsx(MN,{id:"touch",checked:r.userAgent?.capabilities?.touch??!1,onCheckedChange:f=>c("userAgent",{...r.userAgent,capabilities:{...r.userAgent?.capabilities,touch:f}})})]})]})]}),k.jsxs(Cc,{children:[k.jsx(Oc,{children:"Open in App URL"}),k.jsx(PT,{type:"text",value:i??"",readOnly:!0,placeholder:"Not set",className:"font-mono text-xs"})]})]})}),k.jsx(rb,{value:"widget-state",className:"p-4",children:k.jsx(M2,{src:r.widgetState??{},name:null,quotesOnKeys:!1,displayDataTypes:!1,displayObjectSize:!1,enableClipboard:!1,theme:"rjv-default",collapsed:3,collapseStringsAfterLength:80})}),l&&k.jsx(rb,{value:"resource",className:"p-4",children:k.jsx(j.Suspense,{fallback:k.jsx("div",{className:"text-xs text-muted-foreground",children:"Loading resource..."}),children:k.jsx(hEe,{resourceUri:l})})})]})}):null};function DN(e){return new Date(e).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3})}function mEe(e,t=60){const r=JSON.stringify(e);return r.length>t?`${r.slice(0,t)}…`:r}function gEe({log:e}){const[t,r]=j.useState(!1),i=Object.keys(e.args).length>0,s=i?mEe(e.args):null;return k.jsxs(k.Fragment,{children:[i?k.jsxs("button",{type:"button",onClick:()=>r(!t),className:"flex items-center gap-2 py-1.5 px-2 text-xs font-mono border-b border-gray-200 dark:border-gray-800/50 cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-800/30 w-full text-left",children:[k.jsx("span",{className:"text-gray-600 dark:text-gray-500 shrink-0 min-w-[80px]",children:DN(e.timestamp)}),k.jsx("span",{className:en("font-semibold shrink-0 min-w-[120px]",e.type==="response"?"text-green-600 dark:text-green-400":"text-blue-600 dark:text-blue-400"),children:e.command}),k.jsx("span",{className:"text-gray-500 dark:text-gray-600 mr-1",children:t?"▼":"▶"}),k.jsx("span",{className:"text-gray-600 dark:text-gray-400 truncate flex-1 min-w-0",children:s})]}):k.jsxs("div",{className:"flex items-center gap-2 py-1.5 px-2 text-xs font-mono border-b border-gray-200 dark:border-gray-800/50",children:[k.jsx("span",{className:"text-gray-600 dark:text-gray-500 shrink-0 min-w-[80px]",children:DN(e.timestamp)}),k.jsx("span",{className:"text-blue-600 dark:text-blue-400 font-semibold shrink-0 min-w-[120px]",children:e.command})]}),t&&i&&k.jsx("div",{className:"px-2 py-2 bg-gray-50 dark:bg-gray-900/30 border-b border-gray-200 dark:border-gray-800/50",children:k.jsx("pre",{className:"text-xs font-mono text-gray-800 dark:text-gray-200 whitespace-pre-wrap overflow-x-auto",children:JSON.stringify(e.args,null,2)})})]})}function yEe(){const e=df(),{setToolData:t}=Tm(),{openaiLogs:r}=Cm(e.name),i=j.useRef(null),s=()=>{t(e.name,{openaiLogs:[]})};return j.useEffect(()=>{const l=i.current;l&&(l.scrollTop=l.scrollHeight)},[]),k.jsxs("div",{className:"flex flex-col h-full overflow-hidden min-h-0",children:[k.jsxs("div",{className:"flex items-center justify-between mb-3 h-8 flex-none",children:[k.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-gray-200",children:"MCP client logs"}),k.jsx("div",{className:"flex items-center gap-2",children:r.length>0&&k.jsxs(Qc,{variant:"ghost",size:"sm",onClick:s,children:[k.jsx(qre,{className:"w-3 h-3"}),"Clear"]})})]}),k.jsx("div",{ref:i,className:"overflow-auto flex-1 bg-gray-50 rounded-lg border border-gray-200 min-h-0",children:r.map(l=>k.jsx(gEe,{log:l},l.id))})]})}const vEe=bc("relative grid w-full items-start gap-x-2 gap-y-0.5 rounded-xl border px-3.5 py-3 text-card-foreground text-sm has-[>svg]:has-data-[slot=alert-action]:grid-cols-[calc(var(--spacing)*4)_1fr_auto] has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-data-[slot=alert-action]:grid-cols-[1fr_auto] has-[>svg]:gap-x-2 [&>svg]:h-[1lh] [&>svg]:w-4",{defaultVariants:{variant:"default"},variants:{variant:{default:"bg-transparent dark:bg-input/32 [&>svg]:text-muted-foreground",error:"border-destructive/32 bg-destructive/4 [&>svg]:text-destructive",info:"border-info/32 bg-info/4 [&>svg]:text-info",success:"border-success/32 bg-success/4 [&>svg]:text-success",warning:"border-warning/32 bg-warning/4 [&>svg]:text-warning"}}});function bEe({className:e,variant:t,...r}){return k.jsx("div",{className:en(vEe({variant:t}),e),"data-slot":"alert",role:"alert",...r})}function SEe({className:e,...t}){return k.jsx("div",{className:en("font-medium [svg~&]:col-start-2",e),"data-slot":"alert-title",...t})}function wEe({className:e,...t}){return k.jsx("div",{className:en("flex flex-col gap-2.5 text-muted-foreground [svg~&]:col-start-2",e),"data-slot":"alert-description",...t})}const EEe=()=>{const e=df(),t=Cm(e.name);if(!t)return null;const r=()=>{const i=[];return t.response.content.forEach(s=>{s.type==="text"&&i.push(s.text)}),i.join(`
152
+ `)};return k.jsx("div",{className:"flex flex-col h-full overflow-hidden bg-card",children:k.jsx("div",{className:"p-4 overflow-auto",children:t.response?t.response.isError?k.jsxs(bEe,{variant:"error",children:[k.jsx(Tre,{}),k.jsx(SEe,{children:"Error"}),k.jsx(wEe,{children:r()})]}):k.jsx("div",{className:"text-xs",children:k.jsx(M2,{src:t.response??{},name:null,quotesOnKeys:!1,displayDataTypes:!1,displayObjectSize:!1,enableClipboard:!1,theme:"rjv-default",style:{fontSize:"0.75rem"},collapsed:3,collapseStringsAfterLength:80})}):null})})},AU="openai:set_globals";class xEe extends CustomEvent{type=AU}var LT={exports:{}},Jt={};var NN;function _Ee(){if(NN)return Jt;NN=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),v=Symbol.iterator;function w(N){return N===null||typeof N!="object"?null:(N=v&&N[v]||N["@@iterator"],typeof N=="function"?N:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,x={};function R(N,I,U){this.props=N,this.context=I,this.refs=x,this.updater=U||b}R.prototype.isReactComponent={},R.prototype.setState=function(N,I){if(typeof N!="object"&&typeof N!="function"&&N!=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,N,I,"setState")},R.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function S(){}S.prototype=R.prototype;function T(N,I,U){this.props=N,this.context=I,this.refs=x,this.updater=U||b}var E=T.prototype=new S;E.constructor=T,_(E,R.prototype),E.isPureReactComponent=!0;var O=Array.isArray;function C(){}var M={H:null,A:null,T:null,S:null},D=Object.prototype.hasOwnProperty;function $(N,I,U){var P=U.ref;return{$$typeof:e,type:N,key:I,ref:P!==void 0?P:null,props:U}}function q(N,I){return $(N.type,I,N.props)}function L(N){return typeof N=="object"&&N!==null&&N.$$typeof===e}function V(N){var I={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(U){return I[U]})}var F=/\/+/g;function re(N,I){return typeof N=="object"&&N!==null&&N.key!=null?V(""+N.key):I.toString(36)}function ae(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(C,C):(N.status="pending",N.then(function(I){N.status==="pending"&&(N.status="fulfilled",N.value=I)},function(I){N.status==="pending"&&(N.status="rejected",N.reason=I)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function K(N,I,U,P,G){var ee=typeof N;(ee==="undefined"||ee==="boolean")&&(N=null);var ue=!1;if(N===null)ue=!0;else switch(ee){case"bigint":case"string":case"number":ue=!0;break;case"object":switch(N.$$typeof){case e:case t:ue=!0;break;case m:return ue=N._init,K(ue(N._payload),I,U,P,G)}}if(ue)return G=G(N),ue=P===""?"."+re(N,0):P,O(G)?(U="",ue!=null&&(U=ue.replace(F,"$&/")+"/"),K(G,I,U,"",function(Oe){return Oe})):G!=null&&(L(G)&&(G=q(G,U+(G.key==null||N&&N.key===G.key?"":(""+G.key).replace(F,"$&/")+"/")+ue)),I.push(G)),1;ue=0;var ve=P===""?".":P+":";if(O(N))for(var Ee=0;Ee<N.length;Ee++)P=N[Ee],ee=ve+re(P,Ee),ue+=K(P,I,U,ee,G);else if(Ee=w(N),typeof Ee=="function")for(N=Ee.call(N),Ee=0;!(P=N.next()).done;)P=P.value,ee=ve+re(P,Ee++),ue+=K(P,I,U,ee,G);else if(ee==="object"){if(typeof N.then=="function")return K(ae(N),I,U,P,G);throw I=String(N),Error("Objects are not valid as a React child (found: "+(I==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":I)+"). If you meant to render a collection of children, use an array instead.")}return ue}function B(N,I,U){if(N==null)return N;var P=[],G=0;return K(N,P,"","",function(ee){return I.call(U,ee,G++)}),P}function Y(N){if(N._status===-1){var I=N._result;I=I(),I.then(function(U){(N._status===0||N._status===-1)&&(N._status=1,N._result=U)},function(U){(N._status===0||N._status===-1)&&(N._status=2,N._result=U)}),N._status===-1&&(N._status=0,N._result=I)}if(N._status===1)return N._result.default;throw N._result}var fe=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var I=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(I))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},se={map:B,forEach:function(N,I,U){B(N,function(){I.apply(this,arguments)},U)},count:function(N){var I=0;return B(N,function(){I++}),I},toArray:function(N){return B(N,function(I){return I})||[]},only:function(N){if(!L(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return Jt.Activity=g,Jt.Children=se,Jt.Component=R,Jt.Fragment=r,Jt.Profiler=s,Jt.PureComponent=T,Jt.StrictMode=i,Jt.Suspense=d,Jt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,Jt.__COMPILER_RUNTIME={__proto__:null,c:function(N){return M.H.useMemoCache(N)}},Jt.cache=function(N){return function(){return N.apply(null,arguments)}},Jt.cacheSignal=function(){return null},Jt.cloneElement=function(N,I,U){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var P=_({},N.props),G=N.key;if(I!=null)for(ee in I.key!==void 0&&(G=""+I.key),I)!D.call(I,ee)||ee==="key"||ee==="__self"||ee==="__source"||ee==="ref"&&I.ref===void 0||(P[ee]=I[ee]);var ee=arguments.length-2;if(ee===1)P.children=U;else if(1<ee){for(var ue=Array(ee),ve=0;ve<ee;ve++)ue[ve]=arguments[ve+2];P.children=ue}return $(N.type,G,P)},Jt.createContext=function(N){return N={$$typeof:c,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:l,_context:N},N},Jt.createElement=function(N,I,U){var P,G={},ee=null;if(I!=null)for(P in I.key!==void 0&&(ee=""+I.key),I)D.call(I,P)&&P!=="key"&&P!=="__self"&&P!=="__source"&&(G[P]=I[P]);var ue=arguments.length-2;if(ue===1)G.children=U;else if(1<ue){for(var ve=Array(ue),Ee=0;Ee<ue;Ee++)ve[Ee]=arguments[Ee+2];G.children=ve}if(N&&N.defaultProps)for(P in ue=N.defaultProps,ue)G[P]===void 0&&(G[P]=ue[P]);return $(N,ee,G)},Jt.createRef=function(){return{current:null}},Jt.forwardRef=function(N){return{$$typeof:f,render:N}},Jt.isValidElement=L,Jt.lazy=function(N){return{$$typeof:m,_payload:{_status:-1,_result:N},_init:Y}},Jt.memo=function(N,I){return{$$typeof:h,type:N,compare:I===void 0?null:I}},Jt.startTransition=function(N){var I=M.T,U={};M.T=U;try{var P=N(),G=M.S;G!==null&&G(U,P),typeof P=="object"&&P!==null&&typeof P.then=="function"&&P.then(C,fe)}catch(ee){fe(ee)}finally{I!==null&&U.types!==null&&(I.types=U.types),M.T=I}},Jt.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},Jt.use=function(N){return M.H.use(N)},Jt.useActionState=function(N,I,U){return M.H.useActionState(N,I,U)},Jt.useCallback=function(N,I){return M.H.useCallback(N,I)},Jt.useContext=function(N){return M.H.useContext(N)},Jt.useDebugValue=function(){},Jt.useDeferredValue=function(N,I){return M.H.useDeferredValue(N,I)},Jt.useEffect=function(N,I){return M.H.useEffect(N,I)},Jt.useEffectEvent=function(N){return M.H.useEffectEvent(N)},Jt.useId=function(){return M.H.useId()},Jt.useImperativeHandle=function(N,I,U){return M.H.useImperativeHandle(N,I,U)},Jt.useInsertionEffect=function(N,I){return M.H.useInsertionEffect(N,I)},Jt.useLayoutEffect=function(N,I){return M.H.useLayoutEffect(N,I)},Jt.useMemo=function(N,I){return M.H.useMemo(N,I)},Jt.useOptimistic=function(N,I){return M.H.useOptimistic(N,I)},Jt.useReducer=function(N,I,U){return M.H.useReducer(N,I,U)},Jt.useRef=function(N){return M.H.useRef(N)},Jt.useState=function(N){return M.H.useState(N)},Jt.useSyncExternalStore=function(N,I,U){return M.H.useSyncExternalStore(N,I,U)},Jt.useTransition=function(){return M.H.useTransition()},Jt.version="19.2.3",Jt}var zN;function V5(){return zN||(zN=1,LT.exports=_Ee()),LT.exports}var TEe=V5(),$N;(function(e){e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError"})($N||($N={}));class CEe{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(t,r){this.keyToValue.set(t,r),this.valueToKey.set(r,t)}getByKey(t){return this.keyToValue.get(t)}getByValue(t){return this.valueToKey.get(t)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}}class MU{constructor(t){this.generateIdentifier=t,this.kv=new CEe}register(t,r){this.kv.getByValue(t)||(r||(r=this.generateIdentifier(t)),this.kv.set(r,t))}clear(){this.kv.clear()}getIdentifier(t){return this.kv.getByValue(t)}getValue(t){return this.kv.getByKey(t)}}class OEe extends MU{constructor(){super(t=>t.name),this.classToAllowedProps=new Map}register(t,r){typeof r=="object"?(r.allowProps&&this.classToAllowedProps.set(t,r.allowProps),super.register(t,r.identifier)):super.register(t,r)}getAllowedProps(t){return this.classToAllowedProps.get(t)}}function REe(e){if("values"in Object)return Object.values(e);const t=[];for(const r in e)e.hasOwnProperty(r)&&t.push(e[r]);return t}function AEe(e,t){const r=REe(e);if("find"in r)return r.find(t);const i=r;for(let s=0;s<i.length;s++){const l=i[s];if(t(l))return l}}function Sm(e,t){Object.entries(e).forEach(([r,i])=>t(i,r))}function aw(e,t){return e.indexOf(t)!==-1}function PN(e,t){for(let r=0;r<e.length;r++){const i=e[r];if(t(i))return i}}class MEe{constructor(){this.transfomers={}}register(t){this.transfomers[t.name]=t}findApplicable(t){return AEe(this.transfomers,r=>r.isApplicable(t))}findByName(t){return this.transfomers[t]}}const jEe=e=>Object.prototype.toString.call(e).slice(8,-1),jU=e=>typeof e>"u",kEe=e=>e===null,jb=e=>typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,DO=e=>jb(e)&&Object.keys(e).length===0,sf=e=>Array.isArray(e),DEe=e=>typeof e=="string",NEe=e=>typeof e=="number"&&!isNaN(e),zEe=e=>typeof e=="boolean",$Ee=e=>e instanceof RegExp,kb=e=>e instanceof Map,Db=e=>e instanceof Set,kU=e=>jEe(e)==="Symbol",PEe=e=>e instanceof Date&&!isNaN(e.valueOf()),DU=e=>e instanceof Error,IN=e=>typeof e=="number"&&isNaN(e),IEe=e=>zEe(e)||kEe(e)||jU(e)||NEe(e)||DEe(e)||kU(e),LEe=e=>typeof e=="bigint",UEe=e=>e===1/0||e===-1/0,qEe=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),VEe=e=>e instanceof URL,NO=e=>e.replace(/\\/g,"\\\\").replace(/\./g,"\\."),UT=e=>e.map(String).map(NO).join("."),ab=(e,t)=>{const r=[];let i="";for(let l=0;l<e.length;l++){let c=e.charAt(l);if(!t&&c==="\\"){const h=e.charAt(l+1);if(h==="\\"){i+="\\",l++;continue}else if(h!==".")throw Error("invalid path")}if(c==="\\"&&e.charAt(l+1)==="."){i+=".",l++;continue}if(c==="."){r.push(i),i="";continue}i+=c}const s=i;return r.push(s),r};function vl(e,t,r,i){return{isApplicable:e,annotation:t,transform:r,untransform:i}}const NU=[vl(jU,"undefined",()=>null,()=>{}),vl(LEe,"bigint",e=>e.toString(),e=>typeof BigInt<"u"?BigInt(e):(console.error("Please add a BigInt polyfill."),e)),vl(PEe,"Date",e=>e.toISOString(),e=>new Date(e)),vl(DU,"Error",(e,t)=>{const r={name:e.name,message:e.message};return"cause"in e&&(r.cause=e.cause),t.allowedErrorProps.forEach(i=>{r[i]=e[i]}),r},(e,t)=>{const r=new Error(e.message,{cause:e.cause});return r.name=e.name,r.stack=e.stack,t.allowedErrorProps.forEach(i=>{r[i]=e[i]}),r}),vl($Ee,"regexp",e=>""+e,e=>{const t=e.slice(1,e.lastIndexOf("/")),r=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,r)}),vl(Db,"set",e=>[...e.values()],e=>new Set(e)),vl(kb,"map",e=>[...e.entries()],e=>new Map(e)),vl(e=>IN(e)||UEe(e),"number",e=>IN(e)?"NaN":e>0?"Infinity":"-Infinity",Number),vl(e=>e===0&&1/e===-1/0,"number",()=>"-0",Number),vl(VEe,"URL",e=>e.toString(),e=>new URL(e))];function U2(e,t,r,i){return{isApplicable:e,annotation:t,transform:r,untransform:i}}const zU=U2((e,t)=>kU(e)?!!t.symbolRegistry.getIdentifier(e):!1,(e,t)=>["symbol",t.symbolRegistry.getIdentifier(e)],e=>e.description,(e,t,r)=>{const i=r.symbolRegistry.getValue(t[1]);if(!i)throw new Error("Trying to deserialize unknown symbol");return i}),FEe=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),$U=U2(qEe,e=>["typed-array",e.constructor.name],e=>[...e],(e,t)=>{const r=FEe[t[1]];if(!r)throw new Error("Trying to deserialize unknown typed array");return new r(e)});function PU(e,t){return e?.constructor?!!t.classRegistry.getIdentifier(e.constructor):!1}const IU=U2(PU,(e,t)=>["class",t.classRegistry.getIdentifier(e.constructor)],(e,t)=>{const r=t.classRegistry.getAllowedProps(e.constructor);if(!r)return{...e};const i={};return r.forEach(s=>{i[s]=e[s]}),i},(e,t,r)=>{const i=r.classRegistry.getValue(t[1]);if(!i)throw new Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);return Object.assign(Object.create(i.prototype),e)}),LU=U2((e,t)=>!!t.customTransformerRegistry.findApplicable(e),(e,t)=>["custom",t.customTransformerRegistry.findApplicable(e).name],(e,t)=>t.customTransformerRegistry.findApplicable(e).serialize(e),(e,t,r)=>{const i=r.customTransformerRegistry.findByName(t[1]);if(!i)throw new Error("Trying to deserialize unknown custom value");return i.deserialize(e)}),BEe=[IU,zU,LU,$U],LN=(e,t)=>{const r=PN(BEe,s=>s.isApplicable(e,t));if(r)return{value:r.transform(e,t),type:r.annotation(e,t)};const i=PN(NU,s=>s.isApplicable(e,t));if(i)return{value:i.transform(e,t),type:i.annotation}},UU={};NU.forEach(e=>{UU[e.annotation]=e});const HEe=(e,t,r)=>{if(sf(t))switch(t[0]){case"symbol":return zU.untransform(e,t,r);case"class":return IU.untransform(e,t,r);case"custom":return LU.untransform(e,t,r);case"typed-array":return $U.untransform(e,t,r);default:throw new Error("Unknown transformation: "+t)}else{const i=UU[t];if(!i)throw new Error("Unknown transformation: "+t);return i.untransform(e,r)}},Vp=(e,t)=>{if(t>e.size)throw new Error("index out of bounds");const r=e.keys();for(;t>0;)r.next(),t--;return r.next().value};function qU(e){if(aw(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(aw(e,"prototype"))throw new Error("prototype is not allowed as a property");if(aw(e,"constructor"))throw new Error("constructor is not allowed as a property")}const GEe=(e,t)=>{qU(t);for(let r=0;r<t.length;r++){const i=t[r];if(Db(e))e=Vp(e,+i);else if(kb(e)){const s=+i,l=+t[++r]==0?"key":"value",c=Vp(e,s);switch(l){case"key":e=c;break;case"value":e=e.get(c);break}}else e=e[i]}return e},zO=(e,t,r)=>{if(qU(t),t.length===0)return r(e);let i=e;for(let l=0;l<t.length-1;l++){const c=t[l];if(sf(i)){const f=+c;i=i[f]}else if(jb(i))i=i[c];else if(Db(i)){const f=+c;i=Vp(i,f)}else if(kb(i)){if(l===t.length-2)break;const d=+c,h=+t[++l]==0?"key":"value",m=Vp(i,d);switch(h){case"key":i=m;break;case"value":i=i.get(m);break}}}const s=t[t.length-1];if(sf(i)?i[+s]=r(i[+s]):jb(i)&&(i[s]=r(i[s])),Db(i)){const l=Vp(i,+s),c=r(l);l!==c&&(i.delete(l),i.add(c))}if(kb(i)){const l=+t[t.length-2],c=Vp(i,l);switch(+s==0?"key":"value"){case"key":{const d=r(c);i.set(d,i.get(c)),d!==c&&i.delete(c);break}case"value":{i.set(c,r(i.get(c)));break}}}return e},VU=e=>e<1;function $O(e,t,r,i=[]){if(!e)return;const s=VU(r);if(!sf(e)){Sm(e,(f,d)=>$O(f,t,r,[...i,...ab(d,s)]));return}const[l,c]=e;c&&Sm(c,(f,d)=>{$O(f,t,r,[...i,...ab(d,s)])}),t(l,i)}function KEe(e,t,r,i){return $O(t,(s,l)=>{e=zO(e,l,c=>HEe(c,s,i))},r),e}function YEe(e,t,r){const i=VU(r);function s(l,c){const f=GEe(e,ab(c,i));l.map(d=>ab(d,i)).forEach(d=>{e=zO(e,d,()=>f)})}if(sf(t)){const[l,c]=t;l.forEach(f=>{e=zO(e,ab(f,i),()=>e)}),c&&Sm(c,s)}else Sm(t,s);return e}const ZEe=(e,t)=>jb(e)||sf(e)||kb(e)||Db(e)||DU(e)||PU(e,t);function XEe(e,t,r){const i=r.get(e);i?i.push(t):r.set(e,[t])}function QEe(e,t){const r={};let i;return e.forEach(s=>{if(s.length<=1)return;t||(s=s.map(f=>f.map(String)).sort((f,d)=>f.length-d.length));const[l,...c]=s;l.length===0?i=c.map(UT):r[UT(l)]=c.map(UT)}),i?DO(r)?[i]:[i,r]:DO(r)?void 0:r}const FU=(e,t,r,i,s=[],l=[],c=new Map)=>{const f=IEe(e);if(!f){XEe(e,s,t);const w=c.get(e);if(w)return i?{transformedValue:null}:w}if(!ZEe(e,r)){const w=LN(e,r),b=w?{transformedValue:w.value,annotations:[w.type]}:{transformedValue:e};return f||c.set(e,b),b}if(aw(l,e))return{transformedValue:null};const d=LN(e,r),h=d?.value??e,m=sf(h)?[]:{},g={};Sm(h,(w,b)=>{if(b==="__proto__"||b==="constructor"||b==="prototype")throw new Error(`Detected property ${b}. This is a prototype pollution risk, please remove it from your object.`);const _=FU(w,t,r,i,[...s,b],[...l,e],c);m[b]=_.transformedValue,sf(_.annotations)?g[NO(b)]=_.annotations:jb(_.annotations)&&Sm(_.annotations,(x,R)=>{g[NO(b)+"."+R]=x})});const v=DO(g)?{transformedValue:m,annotations:d?[d.type]:void 0}:{transformedValue:m,annotations:d?[d.type,g]:g};return f||c.set(e,v),v};function BU(e){return Object.prototype.toString.call(e).slice(8,-1)}function UN(e){return BU(e)==="Array"}function WEe(e){if(BU(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function JEe(e,t,r,i,s){const l={}.propertyIsEnumerable.call(i,t)?"enumerable":"nonenumerable";l==="enumerable"&&(e[t]=r),s&&l==="nonenumerable"&&Object.defineProperty(e,t,{value:r,enumerable:!1,writable:!0,configurable:!0})}function PO(e,t={}){if(UN(e))return e.map(s=>PO(s,t));if(!WEe(e))return e;const r=Object.getOwnPropertyNames(e),i=Object.getOwnPropertySymbols(e);return[...r,...i].reduce((s,l)=>{if(l==="__proto__"||UN(t.props)&&!t.props.includes(l))return s;const c=e[l],f=PO(c,t);return JEe(s,l,f,e,t.nonenumerable),s},{})}class Sr{constructor({dedupe:t=!1}={}){this.classRegistry=new OEe,this.symbolRegistry=new MU(r=>r.description??""),this.customTransformerRegistry=new MEe,this.allowedErrorProps=[],this.dedupe=t}serialize(t){const r=new Map,i=FU(t,r,this,this.dedupe),s={json:i.transformedValue};i.annotations&&(s.meta={...s.meta,values:i.annotations});const l=QEe(r,this.dedupe);return l&&(s.meta={...s.meta,referentialEqualities:l}),s.meta&&(s.meta.v=1),s}deserialize(t,r){const{json:i,meta:s}=t;let l=r?.inPlace?i:PO(i);return s?.values&&(l=KEe(l,s.values,s.v??0,this)),s?.referentialEqualities&&(l=YEe(l,s.referentialEqualities,s.v??0)),l}stringify(t){return JSON.stringify(this.serialize(t))}parse(t){return this.deserialize(JSON.parse(t),{inPlace:!0})}registerClass(t,r){this.classRegistry.register(t,r)}registerSymbol(t,r){this.symbolRegistry.register(t,r)}registerCustom(t,r){this.customTransformerRegistry.register({name:r,...t})}allowErrorProps(...t){this.allowedErrorProps.push(...t)}}Sr.defaultInstance=new Sr;Sr.serialize=Sr.defaultInstance.serialize.bind(Sr.defaultInstance);Sr.deserialize=Sr.defaultInstance.deserialize.bind(Sr.defaultInstance);Sr.stringify=Sr.defaultInstance.stringify.bind(Sr.defaultInstance);Sr.parse=Sr.defaultInstance.parse.bind(Sr.defaultInstance);Sr.registerClass=Sr.defaultInstance.registerClass.bind(Sr.defaultInstance);Sr.registerSymbol=Sr.defaultInstance.registerSymbol.bind(Sr.defaultInstance);Sr.registerCustom=Sr.defaultInstance.registerCustom.bind(Sr.defaultInstance);Sr.allowErrorProps=Sr.defaultInstance.allowErrorProps.bind(Sr.defaultInstance);var qT={exports:{}},Nv={};var qN;function exe(){if(qN)return Nv;qN=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(i,s,l){var c=null;if(l!==void 0&&(c=""+l),s.key!==void 0&&(c=""+s.key),"key"in s){l={};for(var f in s)f!=="key"&&(l[f]=s[f])}else l=s;return s=l.ref,{$$typeof:e,type:i,key:c,ref:s!==void 0?s:null,props:l}}return Nv.Fragment=t,Nv.jsx=r,Nv.jsxs=r,Nv}var VN;function txe(){return VN||(VN=1,qT.exports=exe()),qT.exports}txe();TEe.createContext(null);var VT={exports:{}},zv={},FT={exports:{}},_i={};var FN;function nxe(){if(FN)return _i;FN=1;var e=V5();function t(d){var h="https://react.dev/errors/"+d;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)h+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+d+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var i={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},s=Symbol.for("react.portal");function l(d,h,m){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:g==null?null:""+g,children:d,containerInfo:h,implementation:m}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(d,h){if(d==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return _i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,_i.createPortal=function(d,h){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return l(d,h,null,m)},_i.flushSync=function(d){var h=c.T,m=i.p;try{if(c.T=null,i.p=2,d)return d()}finally{c.T=h,i.p=m,i.d.f()}},_i.preconnect=function(d,h){typeof d=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,i.d.C(d,h))},_i.prefetchDNS=function(d){typeof d=="string"&&i.d.D(d)},_i.preinit=function(d,h){if(typeof d=="string"&&h&&typeof h.as=="string"){var m=h.as,g=f(m,h.crossOrigin),v=typeof h.integrity=="string"?h.integrity:void 0,w=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;m==="style"?i.d.S(d,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:g,integrity:v,fetchPriority:w}):m==="script"&&i.d.X(d,{crossOrigin:g,integrity:v,fetchPriority:w,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},_i.preinitModule=function(d,h){if(typeof d=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var m=f(h.as,h.crossOrigin);i.d.M(d,{crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&i.d.M(d)},_i.preload=function(d,h){if(typeof d=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var m=h.as,g=f(m,h.crossOrigin);i.d.L(d,m,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},_i.preloadModule=function(d,h){if(typeof d=="string")if(h){var m=f(h.as,h.crossOrigin);i.d.m(d,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else i.d.m(d)},_i.requestFormReset=function(d){i.d.r(d)},_i.unstable_batchedUpdates=function(d,h){return d(h)},_i.useFormState=function(d,h,m){return c.H.useFormState(d,h,m)},_i.useFormStatus=function(){return c.H.useHostTransitionStatus()},_i.version="19.2.3",_i}var BN;function rxe(){if(BN)return FT.exports;BN=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),FT.exports=nxe(),FT.exports}var HN;function axe(){if(HN)return zv;HN=1;var e=KN(),t=V5(),r=rxe();function i(n){var a="https://react.dev/errors/"+n;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)a+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+n+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function l(n){var a=n,o=n;if(n.alternate)for(;a.return;)a=a.return;else{n=a;do a=n,(a.flags&4098)!==0&&(o=a.return),n=a.return;while(n)}return a.tag===3?o:null}function c(n){if(n.tag===13){var a=n.memoizedState;if(a===null&&(n=n.alternate,n!==null&&(a=n.memoizedState)),a!==null)return a.dehydrated}return null}function f(n){if(n.tag===31){var a=n.memoizedState;if(a===null&&(n=n.alternate,n!==null&&(a=n.memoizedState)),a!==null)return a.dehydrated}return null}function d(n){if(l(n)!==n)throw Error(i(188))}function h(n){var a=n.alternate;if(!a){if(a=l(n),a===null)throw Error(i(188));return a!==n?null:n}for(var o=n,u=a;;){var p=o.return;if(p===null)break;var y=p.alternate;if(y===null){if(u=p.return,u!==null){o=u;continue}break}if(p.child===y.child){for(y=p.child;y;){if(y===o)return d(p),n;if(y===u)return d(p),a;y=y.sibling}throw Error(i(188))}if(o.return!==u.return)o=p,u=y;else{for(var A=!1,z=p.child;z;){if(z===o){A=!0,o=p,u=y;break}if(z===u){A=!0,u=p,o=y;break}z=z.sibling}if(!A){for(z=y.child;z;){if(z===o){A=!0,o=y,u=p;break}if(z===u){A=!0,u=y,o=p;break}z=z.sibling}if(!A)throw Error(i(189))}}if(o.alternate!==u)throw Error(i(190))}if(o.tag!==3)throw Error(i(188));return o.stateNode.current===o?n:a}function m(n){var a=n.tag;if(a===5||a===26||a===27||a===6)return n;for(n=n.child;n!==null;){if(a=m(n),a!==null)return a;n=n.sibling}return null}var g=Object.assign,v=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),S=Symbol.for("react.consumer"),T=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),$=Symbol.for("react.activity"),q=Symbol.for("react.memo_cache_sentinel"),L=Symbol.iterator;function V(n){return n===null||typeof n!="object"?null:(n=L&&n[L]||n["@@iterator"],typeof n=="function"?n:null)}var F=Symbol.for("react.client.reference");function re(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===F?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case _:return"Fragment";case R:return"Profiler";case x:return"StrictMode";case O:return"Suspense";case C:return"SuspenseList";case $:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case b:return"Portal";case T:return n.displayName||"Context";case S:return(n._context.displayName||"Context")+".Consumer";case E:var a=n.render;return n=n.displayName,n||(n=a.displayName||a.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case M:return a=n.displayName||null,a!==null?a:re(n.type)||"Memo";case D:a=n._payload,n=n._init;try{return re(n(a))}catch{}}return null}var ae=Array.isArray,K=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y={pending:!1,data:null,method:null,action:null},fe=[],se=-1;function N(n){return{current:n}}function I(n){0>se||(n.current=fe[se],fe[se]=null,se--)}function U(n,a){se++,fe[se]=n.current,n.current=a}var P=N(null),G=N(null),ee=N(null),ue=N(null);function ve(n,a){switch(U(ee,a),U(G,n),U(P,null),a.nodeType){case 9:case 11:n=(n=a.documentElement)&&(n=n.namespaceURI)?H0(n):0;break;default:if(n=a.tagName,a=a.namespaceURI)a=H0(a),n=G0(a,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}I(P),U(P,n)}function Ee(){I(P),I(G),I(ee)}function Oe(n){n.memoizedState!==null&&U(ue,n);var a=P.current,o=G0(a,n.type);a!==o&&(U(G,n),U(P,o))}function de(n){G.current===n&&(I(P),I(G)),ue.current===n&&(I(ue),tl._currentValue=Y)}var te,Se;function we(n){if(te===void 0)try{throw Error()}catch(o){var a=o.stack.trim().match(/\n( *(at )?)/);te=a&&a[1]||"",Se=-1<o.stack.indexOf(`
153
+ at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
154
+ `+te+n+Se}var $e=!1;function Te(n,a){if(!n||$e)return"";$e=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(a){var me=function(){throw Error()};if(Object.defineProperty(me.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(me,[])}catch(ce){var le=ce}Reflect.construct(n,[],me)}else{try{me.call()}catch(ce){le=ce}n.call(me.prototype)}}else{try{throw Error()}catch(ce){le=ce}(me=n())&&typeof me.catch=="function"&&me.catch(function(){})}}catch(ce){if(ce&&le&&typeof ce.stack=="string")return[ce.stack,le.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var y=u.DetermineComponentFrameRoot(),A=y[0],z=y[1];if(A&&z){var H=A.split(`
155
+ `),oe=z.split(`
156
+ `);for(p=u=0;u<H.length&&!H[u].includes("DetermineComponentFrameRoot");)u++;for(;p<oe.length&&!oe[p].includes("DetermineComponentFrameRoot");)p++;if(u===H.length||p===oe.length)for(u=H.length-1,p=oe.length-1;1<=u&&0<=p&&H[u]!==oe[p];)p--;for(;1<=u&&0<=p;u--,p--)if(H[u]!==oe[p]){if(u!==1||p!==1)do if(u--,p--,0>p||H[u]!==oe[p]){var he=`
157
+ `+H[u].replace(" at new "," at ");return n.displayName&&he.includes("<anonymous>")&&(he=he.replace("<anonymous>",n.displayName)),he}while(1<=u&&0<=p);break}}}finally{$e=!1,Error.prepareStackTrace=o}return(o=n?n.displayName||n.name:"")?we(o):""}function Pe(n,a){switch(n.tag){case 26:case 27:case 5:return we(n.type);case 16:return we("Lazy");case 13:return n.child!==a&&a!==null?we("Suspense Fallback"):we("Suspense");case 19:return we("SuspenseList");case 0:case 15:return Te(n.type,!1);case 11:return Te(n.type.render,!1);case 1:return Te(n.type,!0);case 31:return we("Activity");default:return""}}function Ge(n){try{var a="",o=null;do a+=Pe(n,o),o=n,n=n.return;while(n);return a}catch(u){return`
158
+ Error generating stack: `+u.message+`
159
+ `+u.stack}}var Ce=Object.prototype.hasOwnProperty,Be=e.unstable_scheduleCallback,Fe=e.unstable_cancelCallback,Je=e.unstable_shouldYield,ke=e.unstable_requestPaint,Ue=e.unstable_now,Xe=e.unstable_getCurrentPriorityLevel,Mt=e.unstable_ImmediatePriority,Ae=e.unstable_UserBlockingPriority,xe=e.unstable_NormalPriority,Ne=e.unstable_LowPriority,Ke=e.unstable_IdlePriority,vt=e.log,Xt=e.unstable_setDisableYieldValue,Vt=null,wt=null;function Ht(n){if(typeof vt=="function"&&Xt(n),wt&&typeof wt.setStrictMode=="function")try{wt.setStrictMode(Vt,n)}catch{}}var Rt=Math.clz32?Math.clz32:Gt,Qt=Math.log,_n=Math.LN2;function Gt(n){return n>>>=0,n===0?32:31-(Qt(n)/_n|0)|0}var Tn=256,En=262144,Pn=4194304;function Dt(n){var a=n&42;if(a!==0)return a;switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function xn(n,a,o){var u=n.pendingLanes;if(u===0)return 0;var p=0,y=n.suspendedLanes,A=n.pingedLanes;n=n.warmLanes;var z=u&134217727;return z!==0?(u=z&~y,u!==0?p=Dt(u):(A&=z,A!==0?p=Dt(A):o||(o=z&~n,o!==0&&(p=Dt(o))))):(z=u&~y,z!==0?p=Dt(z):A!==0?p=Dt(A):o||(o=u&~n,o!==0&&(p=Dt(o)))),p===0?0:a!==0&&a!==p&&(a&y)===0&&(y=p&-p,o=a&-a,y>=o||y===32&&(o&4194048)!==0)?a:p}function Kt(n,a){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&a)===0}function sr(n,a){switch(n){case 1:case 2:case 4:case 8:case 64:return a+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function wr(){var n=Pn;return Pn<<=1,(Pn&62914560)===0&&(Pn=4194304),n}function qr(n){for(var a=[],o=0;31>o;o++)a.push(n);return a}function ft(n,a){n.pendingLanes|=a,a!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function tn(n,a,o,u,p,y){var A=n.pendingLanes;n.pendingLanes=o,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=o,n.entangledLanes&=o,n.errorRecoveryDisabledLanes&=o,n.shellSuspendCounter=0;var z=n.entanglements,H=n.expirationTimes,oe=n.hiddenUpdates;for(o=A&~o;0<o;){var he=31-Rt(o),me=1<<he;z[he]=0,H[he]=-1;var le=oe[he];if(le!==null)for(oe[he]=null,he=0;he<le.length;he++){var ce=le[he];ce!==null&&(ce.lane&=-536870913)}o&=~me}u!==0&&Fn(n,u,0),y!==0&&p===0&&n.tag!==0&&(n.suspendedLanes|=y&~(A&~a))}function Fn(n,a,o){n.pendingLanes|=a,n.suspendedLanes&=~a;var u=31-Rt(a);n.entangledLanes|=a,n.entanglements[u]=n.entanglements[u]|1073741824|o&261930}function on(n,a){var o=n.entangledLanes|=a;for(n=n.entanglements;o;){var u=31-Rt(o),p=1<<u;p&a|n[u]&a&&(n[u]|=a),o&=~p}}function Cn(n,a){var o=a&-a;return o=(o&42)!==0?1:Ft(o),(o&(n.suspendedLanes|a))!==0?0:o}function Ft(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function Vr(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function Pr(){var n=B.p;return n!==0?n:(n=window.event,n===void 0?32:mv(n.type))}function $a(n,a){var o=B.p;try{return B.p=n,a()}finally{B.p=o}}var nr=Math.random().toString(36).slice(2),$t="__reactFiber$"+nr,sn="__reactProps$"+nr,Ir="__reactContainer$"+nr,Ua="__reactEvents$"+nr,ts="__reactListeners$"+nr,yf="__reactHandles$"+nr,ml="__reactResources$"+nr,fo="__reactMarker$"+nr;function Bl(n){delete n[$t],delete n[sn],delete n[Ua],delete n[ts],delete n[yf]}function Oi(n){var a=n[$t];if(a)return a;for(var o=n.parentNode;o;){if(a=o[Ir]||o[$t]){if(o=a.alternate,a.child!==null||o!==null&&o.child!==null)for(n=J0(n);n!==null;){if(o=n[$t])return o;n=J0(n)}return a}n=o,o=n.parentNode}return null}function Ri(n){if(n=n[$t]||n[Ir]){var a=n.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return n}return null}function ho(n){var a=n.tag;if(a===5||a===26||a===27||a===6)return n.stateNode;throw Error(i(33))}function Ai(n){var a=n[ml];return a||(a=n[ml]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function yn(n){n[fo]=!0}var Sc=new Set,Hl={};function qa(n,a){wi(n,a),wi(n+"Capture",a)}function wi(n,a){for(Hl[n]=a,n=0;n<a.length;n++)Sc.add(a[n])}var Hm=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]*$"),Gl={},Pa={};function fp(n){return Ce.call(Pa,n)?!0:Ce.call(Gl,n)?!1:Hm.test(n)?Pa[n]=!0:(Gl[n]=!0,!1)}function Ss(n,a,o){if(fp(a))if(o===null)n.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":n.removeAttribute(a);return;case"boolean":var u=a.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){n.removeAttribute(a);return}}n.setAttribute(a,""+o)}}function ns(n,a,o){if(o===null)n.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(a);return}n.setAttribute(a,""+o)}}function Wr(n,a,o,u){if(u===null)n.removeAttribute(o);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(o);return}n.setAttributeNS(a,o,""+u)}}function rr(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function wc(n){var a=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function Gm(n,a,o){var u=Object.getOwnPropertyDescriptor(n.constructor.prototype,a);if(!n.hasOwnProperty(a)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var p=u.get,y=u.set;return Object.defineProperty(n,a,{configurable:!0,get:function(){return p.call(this)},set:function(A){o=""+A,y.call(this,A)}}),Object.defineProperty(n,a,{enumerable:u.enumerable}),{getValue:function(){return o},setValue:function(A){o=""+A},stopTracking:function(){n._valueTracker=null,delete n[a]}}}}function gl(n){if(!n._valueTracker){var a=wc(n)?"checked":"value";n._valueTracker=Gm(n,a,""+n[a])}}function vf(n){if(!n)return!1;var a=n._valueTracker;if(!a)return!0;var o=a.getValue(),u="";return n&&(u=wc(n)?n.checked?"true":"false":n.value),n=u,n!==o?(a.setValue(n),!0):!1}function po(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var Km=/[\n"\\]/g;function Bn(n){return n.replace(Km,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function Kl(n,a,o,u,p,y,A,z){n.name="",A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?n.type=A:n.removeAttribute("type"),a!=null?A==="number"?(a===0&&n.value===""||n.value!=a)&&(n.value=""+rr(a)):n.value!==""+rr(a)&&(n.value=""+rr(a)):A!=="submit"&&A!=="reset"||n.removeAttribute("value"),a!=null?Yl(n,A,rr(a)):o!=null?Yl(n,A,rr(o)):u!=null&&n.removeAttribute("value"),p==null&&y!=null&&(n.defaultChecked=!!y),p!=null&&(n.checked=p&&typeof p!="function"&&typeof p!="symbol"),z!=null&&typeof z!="function"&&typeof z!="symbol"&&typeof z!="boolean"?n.name=""+rr(z):n.removeAttribute("name")}function bf(n,a,o,u,p,y,A,z){if(y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(n.type=y),a!=null||o!=null){if(!(y!=="submit"&&y!=="reset"||a!=null)){gl(n);return}o=o!=null?""+rr(o):"",a=a!=null?""+rr(a):o,z||a===n.value||(n.value=a),n.defaultValue=a}u=u??p,u=typeof u!="function"&&typeof u!="symbol"&&!!u,n.checked=z?n.checked:!!u,n.defaultChecked=!!u,A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"&&(n.name=A),gl(n)}function Yl(n,a,o){a==="number"&&po(n.ownerDocument)===n||n.defaultValue===""+o||(n.defaultValue=""+o)}function Mi(n,a,o,u){if(n=n.options,a){a={};for(var p=0;p<o.length;p++)a["$"+o[p]]=!0;for(o=0;o<n.length;o++)p=a.hasOwnProperty("$"+n[o].value),n[o].selected!==p&&(n[o].selected=p),p&&u&&(n[o].defaultSelected=!0)}else{for(o=""+rr(o),a=null,p=0;p<n.length;p++){if(n[p].value===o){n[p].selected=!0,u&&(n[p].defaultSelected=!0);return}a!==null||n[p].disabled||(a=n[p])}a!==null&&(a.selected=!0)}}function yl(n,a,o){if(a!=null&&(a=""+rr(a),a!==n.value&&(n.value=a),o==null)){n.defaultValue!==a&&(n.defaultValue=a);return}n.defaultValue=o!=null?""+rr(o):""}function Sf(n,a,o,u){if(a==null){if(u!=null){if(o!=null)throw Error(i(92));if(ae(u)){if(1<u.length)throw Error(i(93));u=u[0]}o=u}o==null&&(o=""),a=o}o=rr(a),n.defaultValue=o,u=n.textContent,u===o&&u!==""&&u!==null&&(n.value=u),gl(n)}function ne(n,a){if(a){var o=n.firstChild;if(o&&o===n.lastChild&&o.nodeType===3){o.nodeValue=a;return}}n.textContent=a}var Z=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 X(n,a,o){var u=a.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?u?n.setProperty(a,""):a==="float"?n.cssFloat="":n[a]="":u?n.setProperty(a,o):typeof o!="number"||o===0||Z.has(a)?a==="float"?n.cssFloat=o:n[a]=(""+o).trim():n[a]=o+"px"}function W(n,a,o){if(a!=null&&typeof a!="object")throw Error(i(62));if(n=n.style,o!=null){for(var u in o)!o.hasOwnProperty(u)||a!=null&&a.hasOwnProperty(u)||(u.indexOf("--")===0?n.setProperty(u,""):u==="float"?n.cssFloat="":n[u]="");for(var p in a)u=a[p],a.hasOwnProperty(p)&&o[p]!==u&&X(n,p,u)}else for(var y in a)a.hasOwnProperty(y)&&X(n,y,a[y])}function ge(n){if(n.indexOf("-")===-1)return!1;switch(n){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Re=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"]]),_e=/^[\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 ye(n){return _e.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function Me(){}var Ie=null;function Ye(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var He=null,lt=null;function We(n){var a=Ri(n);if(a&&(n=a.stateNode)){var o=n[sn]||null;e:switch(n=a.stateNode,a.type){case"input":if(Kl(n,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),a=o.name,o.type==="radio"&&a!=null){for(o=n;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+Bn(""+a)+'"][type="radio"]'),a=0;a<o.length;a++){var u=o[a];if(u!==n&&u.form===n.form){var p=u[sn]||null;if(!p)throw Error(i(90));Kl(u,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(a=0;a<o.length;a++)u=o[a],u.form===n.form&&vf(u)}break e;case"textarea":yl(n,o.value,o.defaultValue);break e;case"select":a=o.value,a!=null&&Mi(n,!!o.multiple,a,!1)}}}var Bt=!1;function hn(n,a,o){if(Bt)return n(a,o);Bt=!0;try{var u=n(a);return u}finally{if(Bt=!1,(He!==null||lt!==null)&&(ku(),He&&(a=He,n=lt,lt=He=null,We(a),n)))for(a=0;a<n.length;a++)We(n[a])}}function bt(n,a){var o=n.stateNode;if(o===null)return null;var u=o[sn]||null;if(u===null)return null;o=u[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(n=n.type,u=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!u;break e;default:n=!1}if(n)return null;if(o&&typeof o!="function")throw Error(i(231,a,typeof o));return o}var jt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Er=!1;if(jt)try{var An={};Object.defineProperty(An,"passive",{get:function(){Er=!0}}),window.addEventListener("test",An,An),window.removeEventListener("test",An,An)}catch{Er=!1}var ar=null,Jr=null,ji=null;function rs(){if(ji)return ji;var n,a=Jr,o=a.length,u,p="value"in ar?ar.value:ar.textContent,y=p.length;for(n=0;n<o&&a[n]===p[n];n++);var A=o-n;for(u=1;u<=A&&a[o-u]===p[y-u];u++);return ji=p.slice(n,1<u?1-u:void 0)}function Ei(n){var a=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&a===13&&(n=13)):n=a,n===10&&(n=13),32<=n||n===13?n:0}function la(){return!0}function Ec(){return!1}function Ln(n){function a(o,u,p,y,A){this._reactName=o,this._targetInst=p,this.type=u,this.nativeEvent=y,this.target=A,this.currentTarget=null;for(var z in n)n.hasOwnProperty(z)&&(o=n[z],this[z]=o?o(y):y[z]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?la:Ec,this.isPropagationStopped=Ec,this}return g(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=la)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=la)},persist:function(){},isPersistent:la}),a}var Ia={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ki=Ln(Ia),Di=g({},Ia,{view:0,detail:0}),wf=Ln(Di),ws,Zl,ro,Xl=g({},Di,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xf,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==ro&&(ro&&n.type==="mousemove"?(ws=n.screenX-ro.screenX,Zl=n.screenY-ro.screenY):Zl=ws=0,ro=n),ws)},movementY:function(n){return"movementY"in n?n.movementY:Zl}}),Ym=Ln(Xl),q2=g({},Xl,{dataTransfer:0}),V2=Ln(q2),F2=g({},Di,{relatedTarget:0}),Ef=Ln(F2),B2=g({},Ia,{animationName:0,elapsedTime:0,pseudoElement:0}),H2=Ln(B2),G2=g({},Ia,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),K2=Ln(G2),Y2=g({},Ia,{data:0}),Zm=Ln(Y2),Z2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},X2={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"},Q2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function W2(n){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(n):(n=Q2[n])?!!a[n]:!1}function xf(){return W2}var J2=g({},Di,{key:function(n){if(n.key){var a=Z2[n.key]||n.key;if(a!=="Unidentified")return a}return n.type==="keypress"?(n=Ei(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?X2[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xf,charCode:function(n){return n.type==="keypress"?Ei(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Ei(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),eE=Ln(J2),tE=g({},Xl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Xm=Ln(tE),nE=g({},Di,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xf}),rE=Ln(nE),aE=g({},Ia,{propertyName:0,elapsedTime:0,pseudoElement:0}),iE=Ln(aE),oE=g({},Xl,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),sE=Ln(oE),lE=g({},Ia,{newState:0,oldState:0}),uE=Ln(lE),cE=[9,13,27,32],_f=jt&&"CompositionEvent"in window,Es=null;jt&&"documentMode"in document&&(Es=document.documentMode);var fE=jt&&"TextEvent"in window&&!Es,Qm=jt&&(!_f||Es&&8<Es&&11>=Es),Wm=" ",Jm=!1;function eg(n,a){switch(n){case"keyup":return cE.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function tg(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var mo=!1;function dE(n,a){switch(n){case"compositionend":return tg(a);case"keypress":return a.which!==32?null:(Jm=!0,Wm);case"textInput":return n=a.data,n===Wm&&Jm?null:n;default:return null}}function hE(n,a){if(mo)return n==="compositionend"||!_f&&eg(n,a)?(n=rs(),ji=Jr=ar=null,mo=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return Qm&&a.locale!=="ko"?null:a.data;default:return null}}var pE={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 ng(n){var a=n&&n.nodeName&&n.nodeName.toLowerCase();return a==="input"?!!pE[n.type]:a==="textarea"}function rg(n,a,o,u){He?lt?lt.push(u):lt=[u]:He=u,a=Lu(a,"onChange"),0<a.length&&(o=new ki("onChange","change",null,o,u),n.push({event:o,listeners:a}))}var xs=null,_s=null;function mE(n){L0(n,0)}function Ql(n){var a=ho(n);if(vf(a))return n}function ag(n,a){if(n==="change")return a}var ig=!1;if(jt){var Tf;if(jt){var Cf="oninput"in document;if(!Cf){var og=document.createElement("div");og.setAttribute("oninput","return;"),Cf=typeof og.oninput=="function"}Tf=Cf}else Tf=!1;ig=Tf&&(!document.documentMode||9<document.documentMode)}function sg(){xs&&(xs.detachEvent("onpropertychange",lg),_s=xs=null)}function lg(n){if(n.propertyName==="value"&&Ql(_s)){var a=[];rg(a,_s,n,Ye(n)),hn(mE,a)}}function gE(n,a,o){n==="focusin"?(sg(),xs=a,_s=o,xs.attachEvent("onpropertychange",lg)):n==="focusout"&&sg()}function yE(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Ql(_s)}function vE(n,a){if(n==="click")return Ql(a)}function bE(n,a){if(n==="input"||n==="change")return Ql(a)}function SE(n,a){return n===a&&(n!==0||1/n===1/a)||n!==n&&a!==a}var lr=typeof Object.is=="function"?Object.is:SE;function Ts(n,a){if(lr(n,a))return!0;if(typeof n!="object"||n===null||typeof a!="object"||a===null)return!1;var o=Object.keys(n),u=Object.keys(a);if(o.length!==u.length)return!1;for(u=0;u<o.length;u++){var p=o[u];if(!Ce.call(a,p)||!lr(n[p],a[p]))return!1}return!0}function ug(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function cg(n,a){var o=ug(n);n=0;for(var u;o;){if(o.nodeType===3){if(u=n+o.textContent.length,n<=a&&u>=a)return{node:o,offset:a-n};n=u}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=ug(o)}}function fg(n,a){return n&&a?n===a?!0:n&&n.nodeType===3?!1:a&&a.nodeType===3?fg(n,a.parentNode):"contains"in n?n.contains(a):n.compareDocumentPosition?!!(n.compareDocumentPosition(a)&16):!1:!1}function dg(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var a=po(n.document);a instanceof n.HTMLIFrameElement;){try{var o=typeof a.contentWindow.location.href=="string"}catch{o=!1}if(o)n=a.contentWindow;else break;a=po(n.document)}return a}function Of(n){var a=n&&n.nodeName&&n.nodeName.toLowerCase();return a&&(a==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||a==="textarea"||n.contentEditable==="true")}var wE=jt&&"documentMode"in document&&11>=document.documentMode,go=null,Rf=null,Cs=null,Af=!1;function hg(n,a,o){var u=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Af||go==null||go!==po(u)||(u=go,"selectionStart"in u&&Of(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Cs&&Ts(Cs,u)||(Cs=u,u=Lu(Rf,"onSelect"),0<u.length&&(a=new ki("onSelect","select",null,a,o),n.push({event:a,listeners:u}),a.target=go)))}function Ni(n,a){var o={};return o[n.toLowerCase()]=a.toLowerCase(),o["Webkit"+n]="webkit"+a,o["Moz"+n]="moz"+a,o}var yo={animationend:Ni("Animation","AnimationEnd"),animationiteration:Ni("Animation","AnimationIteration"),animationstart:Ni("Animation","AnimationStart"),transitionrun:Ni("Transition","TransitionRun"),transitionstart:Ni("Transition","TransitionStart"),transitioncancel:Ni("Transition","TransitionCancel"),transitionend:Ni("Transition","TransitionEnd")},Mf={},pg={};jt&&(pg=document.createElement("div").style,"AnimationEvent"in window||(delete yo.animationend.animation,delete yo.animationiteration.animation,delete yo.animationstart.animation),"TransitionEvent"in window||delete yo.transitionend.transition);function zi(n){if(Mf[n])return Mf[n];if(!yo[n])return n;var a=yo[n],o;for(o in a)if(a.hasOwnProperty(o)&&o in pg)return Mf[n]=a[o];return n}var mg=zi("animationend"),gg=zi("animationiteration"),yg=zi("animationstart"),EE=zi("transitionrun"),xE=zi("transitionstart"),_E=zi("transitioncancel"),vg=zi("transitionend"),bg=new Map,jf="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(" ");jf.push("scrollEnd");function Fr(n,a){bg.set(n,a),qa(a,[n])}var Wl=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},xr=[],vo=0,kf=0;function Jl(){for(var n=vo,a=kf=vo=0;a<n;){var o=xr[a];xr[a++]=null;var u=xr[a];xr[a++]=null;var p=xr[a];xr[a++]=null;var y=xr[a];if(xr[a++]=null,u!==null&&p!==null){var A=u.pending;A===null?p.next=p:(p.next=A.next,A.next=p),u.pending=p}y!==0&&Sg(o,p,y)}}function eu(n,a,o,u){xr[vo++]=n,xr[vo++]=a,xr[vo++]=o,xr[vo++]=u,kf|=u,n.lanes|=u,n=n.alternate,n!==null&&(n.lanes|=u)}function Df(n,a,o,u){return eu(n,a,o,u),tu(n)}function $i(n,a){return eu(n,null,null,a),tu(n)}function Sg(n,a,o){n.lanes|=o;var u=n.alternate;u!==null&&(u.lanes|=o);for(var p=!1,y=n.return;y!==null;)y.childLanes|=o,u=y.alternate,u!==null&&(u.childLanes|=o),y.tag===22&&(n=y.stateNode,n===null||n._visibility&1||(p=!0)),n=y,y=y.return;return n.tag===3?(y=n.stateNode,p&&a!==null&&(p=31-Rt(o),n=y.hiddenUpdates,u=n[p],u===null?n[p]=[a]:u.push(a),a.lane=o|536870912),y):null}function tu(n){if(50<Ys)throw Ys=0,Vd=null,Error(i(185));for(var a=n.return;a!==null;)n=a,a=n.return;return n.tag===3?n.stateNode:null}var bo={};function TE(n,a,o,u){this.tag=n,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ur(n,a,o,u){return new TE(n,a,o,u)}function Nf(n){return n=n.prototype,!(!n||!n.isReactComponent)}function pa(n,a){var o=n.alternate;return o===null?(o=ur(n.tag,a,n.key,n.mode),o.elementType=n.elementType,o.type=n.type,o.stateNode=n.stateNode,o.alternate=n,n.alternate=o):(o.pendingProps=a,o.type=n.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=n.flags&65011712,o.childLanes=n.childLanes,o.lanes=n.lanes,o.child=n.child,o.memoizedProps=n.memoizedProps,o.memoizedState=n.memoizedState,o.updateQueue=n.updateQueue,a=n.dependencies,o.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},o.sibling=n.sibling,o.index=n.index,o.ref=n.ref,o.refCleanup=n.refCleanup,o}function wg(n,a){n.flags&=65011714;var o=n.alternate;return o===null?(n.childLanes=0,n.lanes=a,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=o.childLanes,n.lanes=o.lanes,n.child=o.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=o.memoizedProps,n.memoizedState=o.memoizedState,n.updateQueue=o.updateQueue,n.type=o.type,a=o.dependencies,n.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),n}function nu(n,a,o,u,p,y){var A=0;if(u=n,typeof n=="function")Nf(n)&&(A=1);else if(typeof n=="string")A=Mx(n,o,P.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case $:return n=ur(31,o,a,p),n.elementType=$,n.lanes=y,n;case _:return Pi(o.children,p,y,a);case x:A=8,p|=24;break;case R:return n=ur(12,o,a,p|2),n.elementType=R,n.lanes=y,n;case O:return n=ur(13,o,a,p),n.elementType=O,n.lanes=y,n;case C:return n=ur(19,o,a,p),n.elementType=C,n.lanes=y,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case T:A=10;break e;case S:A=9;break e;case E:A=11;break e;case M:A=14;break e;case D:A=16,u=null;break e}A=29,o=Error(i(130,n===null?"null":typeof n,"")),u=null}return a=ur(A,o,a,p),a.elementType=n,a.type=u,a.lanes=y,a}function Pi(n,a,o,u){return n=ur(7,n,u,a),n.lanes=o,n}function zf(n,a,o){return n=ur(6,n,null,a),n.lanes=o,n}function Eg(n){var a=ur(18,null,null,0);return a.stateNode=n,a}function $f(n,a,o){return a=ur(4,n.children!==null?n.children:[],n.key,a),a.lanes=o,a.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},a}var xg=new WeakMap;function _r(n,a){if(typeof n=="object"&&n!==null){var o=xg.get(n);return o!==void 0?o:(a={value:n,source:a,stack:Ge(a)},xg.set(n,a),a)}return{value:n,source:a,stack:Ge(a)}}var So=[],wo=0,ru=null,Os=0,Tr=[],Cr=0,Va=null,na=1,ra="";function ma(n,a){So[wo++]=Os,So[wo++]=ru,ru=n,Os=a}function _g(n,a,o){Tr[Cr++]=na,Tr[Cr++]=ra,Tr[Cr++]=Va,Va=n;var u=na;n=ra;var p=32-Rt(u)-1;u&=~(1<<p),o+=1;var y=32-Rt(a)+p;if(30<y){var A=p-p%5;y=(u&(1<<A)-1).toString(32),u>>=A,p-=A,na=1<<32-Rt(a)+p|o<<p|u,ra=y+n}else na=1<<y|o<<p|u,ra=n}function Pf(n){n.return!==null&&(ma(n,1),_g(n,1,0))}function If(n){for(;n===ru;)ru=So[--wo],So[wo]=null,Os=So[--wo],So[wo]=null;for(;n===Va;)Va=Tr[--Cr],Tr[Cr]=null,ra=Tr[--Cr],Tr[Cr]=null,na=Tr[--Cr],Tr[Cr]=null}function Tg(n,a){Tr[Cr++]=na,Tr[Cr++]=ra,Tr[Cr++]=Va,na=a.id,ra=a.overflow,Va=n}var jn=null,Nt=null,st=!1,Fa=null,Or=!1,Lf=Error(i(519));function Ba(n){var a=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Rs(_r(a,n)),Lf}function Cg(n){var a=n.stateNode,o=n.type,u=n.memoizedProps;switch(a[$t]=n,a[sn]=u,o){case"dialog":nt("cancel",a),nt("close",a);break;case"iframe":case"object":case"embed":nt("load",a);break;case"video":case"audio":for(o=0;o<Xs.length;o++)nt(Xs[o],a);break;case"source":nt("error",a);break;case"img":case"image":case"link":nt("error",a),nt("load",a);break;case"details":nt("toggle",a);break;case"input":nt("invalid",a),bf(a,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":nt("invalid",a);break;case"textarea":nt("invalid",a),Sf(a,u.value,u.defaultValue,u.children)}o=u.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||a.textContent===""+o||u.suppressHydrationWarning===!0||F0(a.textContent,o)?(u.popover!=null&&(nt("beforetoggle",a),nt("toggle",a)),u.onScroll!=null&&nt("scroll",a),u.onScrollEnd!=null&&nt("scrollend",a),u.onClick!=null&&(a.onclick=Me),a=!0):a=!1,a||Ba(n,!0)}function Og(n){for(jn=n.return;jn;)switch(jn.tag){case 5:case 31:case 13:Or=!1;return;case 27:case 3:Or=!0;return;default:jn=jn.return}}function Eo(n){if(n!==jn)return!1;if(!st)return Og(n),st=!0,!1;var a=n.tag,o;if((o=a!==3&&a!==27)&&((o=a===5)&&(o=n.type,o=!(o!=="form"&&o!=="button")||rh(n.type,n.memoizedProps)),o=!o),o&&Nt&&Ba(n),Og(n),a===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(317));Nt=W0(n)}else if(a===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(317));Nt=W0(n)}else a===27?(a=Nt,ai(n.type)?(n=lh,lh=null,Nt=n):Nt=a):Nt=jn?Ar(n.stateNode.nextSibling):null;return!0}function Ii(){Nt=jn=null,st=!1}function Uf(){var n=Fa;return n!==null&&(Wn===null?Wn=n:Wn.push.apply(Wn,n),Fa=null),n}function Rs(n){Fa===null?Fa=[n]:Fa.push(n)}var qf=N(null),Li=null,ga=null;function Ha(n,a,o){U(qf,a._currentValue),a._currentValue=o}function ya(n){n._currentValue=qf.current,I(qf)}function Vf(n,a,o){for(;n!==null;){var u=n.alternate;if((n.childLanes&a)!==a?(n.childLanes|=a,u!==null&&(u.childLanes|=a)):u!==null&&(u.childLanes&a)!==a&&(u.childLanes|=a),n===o)break;n=n.return}}function Ff(n,a,o,u){var p=n.child;for(p!==null&&(p.return=n);p!==null;){var y=p.dependencies;if(y!==null){var A=p.child;y=y.firstContext;e:for(;y!==null;){var z=y;y=p;for(var H=0;H<a.length;H++)if(z.context===a[H]){y.lanes|=o,z=y.alternate,z!==null&&(z.lanes|=o),Vf(y.return,o,n),u||(A=null);break e}y=z.next}}else if(p.tag===18){if(A=p.return,A===null)throw Error(i(341));A.lanes|=o,y=A.alternate,y!==null&&(y.lanes|=o),Vf(A,o,n),A=null}else A=p.child;if(A!==null)A.return=p;else for(A=p;A!==null;){if(A===n){A=null;break}if(p=A.sibling,p!==null){p.return=A.return,A=p;break}A=A.return}p=A}}function xo(n,a,o,u){n=null;for(var p=a,y=!1;p!==null;){if(!y){if((p.flags&524288)!==0)y=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var A=p.alternate;if(A===null)throw Error(i(387));if(A=A.memoizedProps,A!==null){var z=p.type;lr(p.pendingProps.value,A.value)||(n!==null?n.push(z):n=[z])}}else if(p===ue.current){if(A=p.alternate,A===null)throw Error(i(387));A.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(n!==null?n.push(tl):n=[tl])}p=p.return}n!==null&&Ff(a,n,o,u),a.flags|=262144}function au(n){for(n=n.firstContext;n!==null;){if(!lr(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function Ui(n){Li=n,ga=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function kn(n){return Rg(Li,n)}function iu(n,a){return Li===null&&Ui(n),Rg(n,a)}function Rg(n,a){var o=a._currentValue;if(a={context:a,memoizedValue:o,next:null},ga===null){if(n===null)throw Error(i(308));ga=a,n.dependencies={lanes:0,firstContext:a},n.flags|=524288}else ga=ga.next=a;return o}var CE=typeof AbortController<"u"?AbortController:function(){var n=[],a=this.signal={aborted:!1,addEventListener:function(o,u){n.push(u)}};this.abort=function(){a.aborted=!0,n.forEach(function(o){return o()})}},OE=e.unstable_scheduleCallback,RE=e.unstable_NormalPriority,ln={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Bf(){return{controller:new CE,data:new Map,refCount:0}}function As(n){n.refCount--,n.refCount===0&&OE(RE,function(){n.controller.abort()})}var Ms=null,Hf=0,_o=0,To=null;function AE(n,a){if(Ms===null){var o=Ms=[];Hf=0,_o=Yd(),To={status:"pending",value:void 0,then:function(u){o.push(u)}}}return Hf++,a.then(Ag,Ag),a}function Ag(){if(--Hf===0&&Ms!==null){To!==null&&(To.status="fulfilled");var n=Ms;Ms=null,_o=0,To=null;for(var a=0;a<n.length;a++)(0,n[a])()}}function ME(n,a){var o=[],u={status:"pending",value:null,reason:null,then:function(p){o.push(p)}};return n.then(function(){u.status="fulfilled",u.value=a;for(var p=0;p<o.length;p++)(0,o[p])(a)},function(p){for(u.status="rejected",u.reason=p,p=0;p<o.length;p++)(0,o[p])(void 0)}),u}var Mg=K.S;K.S=function(n,a){h0=Ue(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&AE(n,a),Mg!==null&&Mg(n,a)};var qi=N(null);function Gf(){var n=qi.current;return n!==null?n:At.pooledCache}function ou(n,a){a===null?U(qi,qi.current):U(qi,a.pool)}function jg(){var n=Gf();return n===null?null:{parent:ln._currentValue,pool:n}}var Co=Error(i(460)),Kf=Error(i(474)),su=Error(i(542)),lu={then:function(){}};function kg(n){return n=n.status,n==="fulfilled"||n==="rejected"}function Dg(n,a,o){switch(o=n[o],o===void 0?n.push(a):o!==a&&(a.then(Me,Me),a=o),a.status){case"fulfilled":return a.value;case"rejected":throw n=a.reason,zg(n),n;default:if(typeof a.status=="string")a.then(Me,Me);else{if(n=At,n!==null&&100<n.shellSuspendCounter)throw Error(i(482));n=a,n.status="pending",n.then(function(u){if(a.status==="pending"){var p=a;p.status="fulfilled",p.value=u}},function(u){if(a.status==="pending"){var p=a;p.status="rejected",p.reason=u}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw n=a.reason,zg(n),n}throw Fi=a,Co}}function Vi(n){try{var a=n._init;return a(n._payload)}catch(o){throw o!==null&&typeof o=="object"&&typeof o.then=="function"?(Fi=o,Co):o}}var Fi=null;function Ng(){if(Fi===null)throw Error(i(459));var n=Fi;return Fi=null,n}function zg(n){if(n===Co||n===su)throw Error(i(483))}var Oo=null,js=0;function uu(n){var a=js;return js+=1,Oo===null&&(Oo=[]),Dg(Oo,n,a)}function ks(n,a){a=a.props.ref,n.ref=a!==void 0?a:null}function cu(n,a){throw a.$$typeof===v?Error(i(525)):(n=Object.prototype.toString.call(a),Error(i(31,n==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":n)))}function $g(n){function a(J,Q){if(n){var ie=J.deletions;ie===null?(J.deletions=[Q],J.flags|=16):ie.push(Q)}}function o(J,Q){if(!n)return null;for(;Q!==null;)a(J,Q),Q=Q.sibling;return null}function u(J){for(var Q=new Map;J!==null;)J.key!==null?Q.set(J.key,J):Q.set(J.index,J),J=J.sibling;return Q}function p(J,Q){return J=pa(J,Q),J.index=0,J.sibling=null,J}function y(J,Q,ie){return J.index=ie,n?(ie=J.alternate,ie!==null?(ie=ie.index,ie<Q?(J.flags|=67108866,Q):ie):(J.flags|=67108866,Q)):(J.flags|=1048576,Q)}function A(J){return n&&J.alternate===null&&(J.flags|=67108866),J}function z(J,Q,ie,pe){return Q===null||Q.tag!==6?(Q=zf(ie,J.mode,pe),Q.return=J,Q):(Q=p(Q,ie),Q.return=J,Q)}function H(J,Q,ie,pe){var Le=ie.type;return Le===_?he(J,Q,ie.props.children,pe,ie.key):Q!==null&&(Q.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===D&&Vi(Le)===Q.type)?(Q=p(Q,ie.props),ks(Q,ie),Q.return=J,Q):(Q=nu(ie.type,ie.key,ie.props,null,J.mode,pe),ks(Q,ie),Q.return=J,Q)}function oe(J,Q,ie,pe){return Q===null||Q.tag!==4||Q.stateNode.containerInfo!==ie.containerInfo||Q.stateNode.implementation!==ie.implementation?(Q=$f(ie,J.mode,pe),Q.return=J,Q):(Q=p(Q,ie.children||[]),Q.return=J,Q)}function he(J,Q,ie,pe,Le){return Q===null||Q.tag!==7?(Q=Pi(ie,J.mode,pe,Le),Q.return=J,Q):(Q=p(Q,ie),Q.return=J,Q)}function me(J,Q,ie){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return Q=zf(""+Q,J.mode,ie),Q.return=J,Q;if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case w:return ie=nu(Q.type,Q.key,Q.props,null,J.mode,ie),ks(ie,Q),ie.return=J,ie;case b:return Q=$f(Q,J.mode,ie),Q.return=J,Q;case D:return Q=Vi(Q),me(J,Q,ie)}if(ae(Q)||V(Q))return Q=Pi(Q,J.mode,ie,null),Q.return=J,Q;if(typeof Q.then=="function")return me(J,uu(Q),ie);if(Q.$$typeof===T)return me(J,iu(J,Q),ie);cu(J,Q)}return null}function le(J,Q,ie,pe){var Le=Q!==null?Q.key:null;if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return Le!==null?null:z(J,Q,""+ie,pe);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case w:return ie.key===Le?H(J,Q,ie,pe):null;case b:return ie.key===Le?oe(J,Q,ie,pe):null;case D:return ie=Vi(ie),le(J,Q,ie,pe)}if(ae(ie)||V(ie))return Le!==null?null:he(J,Q,ie,pe,null);if(typeof ie.then=="function")return le(J,Q,uu(ie),pe);if(ie.$$typeof===T)return le(J,Q,iu(J,ie),pe);cu(J,ie)}return null}function ce(J,Q,ie,pe,Le){if(typeof pe=="string"&&pe!==""||typeof pe=="number"||typeof pe=="bigint")return J=J.get(ie)||null,z(Q,J,""+pe,Le);if(typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case w:return J=J.get(pe.key===null?ie:pe.key)||null,H(Q,J,pe,Le);case b:return J=J.get(pe.key===null?ie:pe.key)||null,oe(Q,J,pe,Le);case D:return pe=Vi(pe),ce(J,Q,ie,pe,Le)}if(ae(pe)||V(pe))return J=J.get(ie)||null,he(Q,J,pe,Le,null);if(typeof pe.then=="function")return ce(J,Q,ie,uu(pe),Le);if(pe.$$typeof===T)return ce(J,Q,ie,iu(Q,pe),Le);cu(Q,pe)}return null}function je(J,Q,ie,pe){for(var Le=null,dt=null,ze=Q,Qe=Q=0,it=null;ze!==null&&Qe<ie.length;Qe++){ze.index>Qe?(it=ze,ze=null):it=ze.sibling;var ht=le(J,ze,ie[Qe],pe);if(ht===null){ze===null&&(ze=it);break}n&&ze&&ht.alternate===null&&a(J,ze),Q=y(ht,Q,Qe),dt===null?Le=ht:dt.sibling=ht,dt=ht,ze=it}if(Qe===ie.length)return o(J,ze),st&&ma(J,Qe),Le;if(ze===null){for(;Qe<ie.length;Qe++)ze=me(J,ie[Qe],pe),ze!==null&&(Q=y(ze,Q,Qe),dt===null?Le=ze:dt.sibling=ze,dt=ze);return st&&ma(J,Qe),Le}for(ze=u(ze);Qe<ie.length;Qe++)it=ce(ze,J,Qe,ie[Qe],pe),it!==null&&(n&&it.alternate!==null&&ze.delete(it.key===null?Qe:it.key),Q=y(it,Q,Qe),dt===null?Le=it:dt.sibling=it,dt=it);return n&&ze.forEach(function(ui){return a(J,ui)}),st&&ma(J,Qe),Le}function qe(J,Q,ie,pe){if(ie==null)throw Error(i(151));for(var Le=null,dt=null,ze=Q,Qe=Q=0,it=null,ht=ie.next();ze!==null&&!ht.done;Qe++,ht=ie.next()){ze.index>Qe?(it=ze,ze=null):it=ze.sibling;var ui=le(J,ze,ht.value,pe);if(ui===null){ze===null&&(ze=it);break}n&&ze&&ui.alternate===null&&a(J,ze),Q=y(ui,Q,Qe),dt===null?Le=ui:dt.sibling=ui,dt=ui,ze=it}if(ht.done)return o(J,ze),st&&ma(J,Qe),Le;if(ze===null){for(;!ht.done;Qe++,ht=ie.next())ht=me(J,ht.value,pe),ht!==null&&(Q=y(ht,Q,Qe),dt===null?Le=ht:dt.sibling=ht,dt=ht);return st&&ma(J,Qe),Le}for(ze=u(ze);!ht.done;Qe++,ht=ie.next())ht=ce(ze,J,Qe,ht.value,pe),ht!==null&&(n&&ht.alternate!==null&&ze.delete(ht.key===null?Qe:ht.key),Q=y(ht,Q,Qe),dt===null?Le=ht:dt.sibling=ht,dt=ht);return n&&ze.forEach(function(qx){return a(J,qx)}),st&&ma(J,Qe),Le}function Ot(J,Q,ie,pe){if(typeof ie=="object"&&ie!==null&&ie.type===_&&ie.key===null&&(ie=ie.props.children),typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case w:e:{for(var Le=ie.key;Q!==null;){if(Q.key===Le){if(Le=ie.type,Le===_){if(Q.tag===7){o(J,Q.sibling),pe=p(Q,ie.props.children),pe.return=J,J=pe;break e}}else if(Q.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===D&&Vi(Le)===Q.type){o(J,Q.sibling),pe=p(Q,ie.props),ks(pe,ie),pe.return=J,J=pe;break e}o(J,Q);break}else a(J,Q);Q=Q.sibling}ie.type===_?(pe=Pi(ie.props.children,J.mode,pe,ie.key),pe.return=J,J=pe):(pe=nu(ie.type,ie.key,ie.props,null,J.mode,pe),ks(pe,ie),pe.return=J,J=pe)}return A(J);case b:e:{for(Le=ie.key;Q!==null;){if(Q.key===Le)if(Q.tag===4&&Q.stateNode.containerInfo===ie.containerInfo&&Q.stateNode.implementation===ie.implementation){o(J,Q.sibling),pe=p(Q,ie.children||[]),pe.return=J,J=pe;break e}else{o(J,Q);break}else a(J,Q);Q=Q.sibling}pe=$f(ie,J.mode,pe),pe.return=J,J=pe}return A(J);case D:return ie=Vi(ie),Ot(J,Q,ie,pe)}if(ae(ie))return je(J,Q,ie,pe);if(V(ie)){if(Le=V(ie),typeof Le!="function")throw Error(i(150));return ie=Le.call(ie),qe(J,Q,ie,pe)}if(typeof ie.then=="function")return Ot(J,Q,uu(ie),pe);if(ie.$$typeof===T)return Ot(J,Q,iu(J,ie),pe);cu(J,ie)}return typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint"?(ie=""+ie,Q!==null&&Q.tag===6?(o(J,Q.sibling),pe=p(Q,ie),pe.return=J,J=pe):(o(J,Q),pe=zf(ie,J.mode,pe),pe.return=J,J=pe),A(J)):o(J,Q)}return function(J,Q,ie,pe){try{js=0;var Le=Ot(J,Q,ie,pe);return Oo=null,Le}catch(ze){if(ze===Co||ze===su)throw ze;var dt=ur(29,ze,null,J.mode);return dt.lanes=pe,dt.return=J,dt}}}var Bi=$g(!0),Pg=$g(!1),Ga=!1;function Yf(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Zf(n,a){n=n.updateQueue,a.updateQueue===n&&(a.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function Ka(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function Ya(n,a,o){var u=n.updateQueue;if(u===null)return null;if(u=u.shared,(yt&2)!==0){var p=u.pending;return p===null?a.next=a:(a.next=p.next,p.next=a),u.pending=a,a=tu(n),Sg(n,null,o),a}return eu(n,u,a,o),tu(n)}function Ds(n,a,o){if(a=a.updateQueue,a!==null&&(a=a.shared,(o&4194048)!==0)){var u=a.lanes;u&=n.pendingLanes,o|=u,a.lanes=o,on(n,o)}}function Xf(n,a){var o=n.updateQueue,u=n.alternate;if(u!==null&&(u=u.updateQueue,o===u)){var p=null,y=null;if(o=o.firstBaseUpdate,o!==null){do{var A={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};y===null?p=y=A:y=y.next=A,o=o.next}while(o!==null);y===null?p=y=a:y=y.next=a}else p=y=a;o={baseState:u.baseState,firstBaseUpdate:p,lastBaseUpdate:y,shared:u.shared,callbacks:u.callbacks},n.updateQueue=o;return}n=o.lastBaseUpdate,n===null?o.firstBaseUpdate=a:n.next=a,o.lastBaseUpdate=a}var Qf=!1;function Ns(){if(Qf){var n=To;if(n!==null)throw n}}function zs(n,a,o,u){Qf=!1;var p=n.updateQueue;Ga=!1;var y=p.firstBaseUpdate,A=p.lastBaseUpdate,z=p.shared.pending;if(z!==null){p.shared.pending=null;var H=z,oe=H.next;H.next=null,A===null?y=oe:A.next=oe,A=H;var he=n.alternate;he!==null&&(he=he.updateQueue,z=he.lastBaseUpdate,z!==A&&(z===null?he.firstBaseUpdate=oe:z.next=oe,he.lastBaseUpdate=H))}if(y!==null){var me=p.baseState;A=0,he=oe=H=null,z=y;do{var le=z.lane&-536870913,ce=le!==z.lane;if(ce?(at&le)===le:(u&le)===le){le!==0&&le===_o&&(Qf=!0),he!==null&&(he=he.next={lane:0,tag:z.tag,payload:z.payload,callback:null,next:null});e:{var je=n,qe=z;le=a;var Ot=o;switch(qe.tag){case 1:if(je=qe.payload,typeof je=="function"){me=je.call(Ot,me,le);break e}me=je;break e;case 3:je.flags=je.flags&-65537|128;case 0:if(je=qe.payload,le=typeof je=="function"?je.call(Ot,me,le):je,le==null)break e;me=g({},me,le);break e;case 2:Ga=!0}}le=z.callback,le!==null&&(n.flags|=64,ce&&(n.flags|=8192),ce=p.callbacks,ce===null?p.callbacks=[le]:ce.push(le))}else ce={lane:le,tag:z.tag,payload:z.payload,callback:z.callback,next:null},he===null?(oe=he=ce,H=me):he=he.next=ce,A|=le;if(z=z.next,z===null){if(z=p.shared.pending,z===null)break;ce=z,z=ce.next,ce.next=null,p.lastBaseUpdate=ce,p.shared.pending=null}}while(!0);he===null&&(H=me),p.baseState=H,p.firstBaseUpdate=oe,p.lastBaseUpdate=he,y===null&&(p.shared.lanes=0),Ja|=A,n.lanes=A,n.memoizedState=me}}function Ig(n,a){if(typeof n!="function")throw Error(i(191,n));n.call(a)}function Lg(n,a){var o=n.callbacks;if(o!==null)for(n.callbacks=null,n=0;n<o.length;n++)Ig(o[n],a)}var Ro=N(null),fu=N(0);function Ug(n,a){n=Ca,U(fu,n),U(Ro,a),Ca=n|a.baseLanes}function Wf(){U(fu,Ca),U(Ro,Ro.current)}function Jf(){Ca=fu.current,I(Ro),I(fu)}var cr=N(null),Rr=null;function Za(n){var a=n.alternate;U(nn,nn.current&1),U(cr,n),Rr===null&&(a===null||Ro.current!==null||a.memoizedState!==null)&&(Rr=n)}function ed(n){U(nn,nn.current),U(cr,n),Rr===null&&(Rr=n)}function qg(n){n.tag===22?(U(nn,nn.current),U(cr,n),Rr===null&&(Rr=n)):Xa()}function Xa(){U(nn,nn.current),U(cr,cr.current)}function fr(n){I(cr),Rr===n&&(Rr=null),I(nn)}var nn=N(0);function du(n){for(var a=n;a!==null;){if(a.tag===13){var o=a.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||oh(o)||sh(o)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===n)break;for(;a.sibling===null;){if(a.return===null||a.return===n)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var va=0,Ze=null,Tt=null,un=null,hu=!1,Ao=!1,Hi=!1,pu=0,$s=0,Mo=null,jE=0;function Yt(){throw Error(i(321))}function td(n,a){if(a===null)return!1;for(var o=0;o<a.length&&o<n.length;o++)if(!lr(n[o],a[o]))return!1;return!0}function nd(n,a,o,u,p,y){return va=y,Ze=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,K.H=n===null||n.memoizedState===null?_y:yd,Hi=!1,y=o(u,p),Hi=!1,Ao&&(y=Fg(a,o,u,p)),Vg(n),y}function Vg(n){K.H=Ls;var a=Tt!==null&&Tt.next!==null;if(va=0,un=Tt=Ze=null,hu=!1,$s=0,Mo=null,a)throw Error(i(300));n===null||cn||(n=n.dependencies,n!==null&&au(n)&&(cn=!0))}function Fg(n,a,o,u){Ze=n;var p=0;do{if(Ao&&(Mo=null),$s=0,Ao=!1,25<=p)throw Error(i(301));if(p+=1,un=Tt=null,n.updateQueue!=null){var y=n.updateQueue;y.lastEffect=null,y.events=null,y.stores=null,y.memoCache!=null&&(y.memoCache.index=0)}K.H=Ty,y=a(o,u)}while(Ao);return y}function kE(){var n=K.H,a=n.useState()[0];return a=typeof a.then=="function"?Ps(a):a,n=n.useState()[0],(Tt!==null?Tt.memoizedState:null)!==n&&(Ze.flags|=1024),a}function rd(){var n=pu!==0;return pu=0,n}function ad(n,a,o){a.updateQueue=n.updateQueue,a.flags&=-2053,n.lanes&=~o}function id(n){if(hu){for(n=n.memoizedState;n!==null;){var a=n.queue;a!==null&&(a.pending=null),n=n.next}hu=!1}va=0,un=Tt=Ze=null,Ao=!1,$s=pu=0,Mo=null}function Vn(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return un===null?Ze.memoizedState=un=n:un=un.next=n,un}function rn(){if(Tt===null){var n=Ze.alternate;n=n!==null?n.memoizedState:null}else n=Tt.next;var a=un===null?Ze.memoizedState:un.next;if(a!==null)un=a,Tt=n;else{if(n===null)throw Ze.alternate===null?Error(i(467)):Error(i(310));Tt=n,n={memoizedState:Tt.memoizedState,baseState:Tt.baseState,baseQueue:Tt.baseQueue,queue:Tt.queue,next:null},un===null?Ze.memoizedState=un=n:un=un.next=n}return un}function mu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ps(n){var a=$s;return $s+=1,Mo===null&&(Mo=[]),n=Dg(Mo,n,a),a=Ze,(un===null?a.memoizedState:un.next)===null&&(a=a.alternate,K.H=a===null||a.memoizedState===null?_y:yd),n}function gu(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Ps(n);if(n.$$typeof===T)return kn(n)}throw Error(i(438,String(n)))}function od(n){var a=null,o=Ze.updateQueue;if(o!==null&&(a=o.memoCache),a==null){var u=Ze.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(a={data:u.data.map(function(p){return p.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),o===null&&(o=mu(),Ze.updateQueue=o),o.memoCache=a,o=a.data[a.index],o===void 0)for(o=a.data[a.index]=Array(n),u=0;u<n;u++)o[u]=q;return a.index++,o}function ba(n,a){return typeof a=="function"?a(n):a}function yu(n){var a=rn();return sd(a,Tt,n)}function sd(n,a,o){var u=n.queue;if(u===null)throw Error(i(311));u.lastRenderedReducer=o;var p=n.baseQueue,y=u.pending;if(y!==null){if(p!==null){var A=p.next;p.next=y.next,y.next=A}a.baseQueue=p=y,u.pending=null}if(y=n.baseState,p===null)n.memoizedState=y;else{a=p.next;var z=A=null,H=null,oe=a,he=!1;do{var me=oe.lane&-536870913;if(me!==oe.lane?(at&me)===me:(va&me)===me){var le=oe.revertLane;if(le===0)H!==null&&(H=H.next={lane:0,revertLane:0,gesture:null,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null}),me===_o&&(he=!0);else if((va&le)===le){oe=oe.next,le===_o&&(he=!0);continue}else me={lane:0,revertLane:oe.revertLane,gesture:null,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null},H===null?(z=H=me,A=y):H=H.next=me,Ze.lanes|=le,Ja|=le;me=oe.action,Hi&&o(y,me),y=oe.hasEagerState?oe.eagerState:o(y,me)}else le={lane:me,revertLane:oe.revertLane,gesture:oe.gesture,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null},H===null?(z=H=le,A=y):H=H.next=le,Ze.lanes|=me,Ja|=me;oe=oe.next}while(oe!==null&&oe!==a);if(H===null?A=y:H.next=z,!lr(y,n.memoizedState)&&(cn=!0,he&&(o=To,o!==null)))throw o;n.memoizedState=y,n.baseState=A,n.baseQueue=H,u.lastRenderedState=y}return p===null&&(u.lanes=0),[n.memoizedState,u.dispatch]}function ld(n){var a=rn(),o=a.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=n;var u=o.dispatch,p=o.pending,y=a.memoizedState;if(p!==null){o.pending=null;var A=p=p.next;do y=n(y,A.action),A=A.next;while(A!==p);lr(y,a.memoizedState)||(cn=!0),a.memoizedState=y,a.baseQueue===null&&(a.baseState=y),o.lastRenderedState=y}return[y,u]}function Bg(n,a,o){var u=Ze,p=rn(),y=st;if(y){if(o===void 0)throw Error(i(407));o=o()}else o=a();var A=!lr((Tt||p).memoizedState,o);if(A&&(p.memoizedState=o,cn=!0),p=p.queue,fd(Kg.bind(null,u,p,n),[n]),p.getSnapshot!==a||A||un!==null&&un.memoizedState.tag&1){if(u.flags|=2048,jo(9,{destroy:void 0},Gg.bind(null,u,p,o,a),null),At===null)throw Error(i(349));y||(va&127)!==0||Hg(u,a,o)}return o}function Hg(n,a,o){n.flags|=16384,n={getSnapshot:a,value:o},a=Ze.updateQueue,a===null?(a=mu(),Ze.updateQueue=a,a.stores=[n]):(o=a.stores,o===null?a.stores=[n]:o.push(n))}function Gg(n,a,o,u){a.value=o,a.getSnapshot=u,Yg(a)&&Zg(n)}function Kg(n,a,o){return o(function(){Yg(a)&&Zg(n)})}function Yg(n){var a=n.getSnapshot;n=n.value;try{var o=a();return!lr(n,o)}catch{return!0}}function Zg(n){var a=$i(n,2);a!==null&&Jn(a,n,2)}function ud(n){var a=Vn();if(typeof n=="function"){var o=n;if(n=o(),Hi){Ht(!0);try{o()}finally{Ht(!1)}}}return a.memoizedState=a.baseState=n,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ba,lastRenderedState:n},a}function Xg(n,a,o,u){return n.baseState=o,sd(n,Tt,typeof u=="function"?u:ba)}function DE(n,a,o,u,p){if(Su(n))throw Error(i(485));if(n=a.action,n!==null){var y={payload:p,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(A){y.listeners.push(A)}};K.T!==null?o(!0):y.isTransition=!1,u(y),o=a.pending,o===null?(y.next=a.pending=y,Qg(a,y)):(y.next=o.next,a.pending=o.next=y)}}function Qg(n,a){var o=a.action,u=a.payload,p=n.state;if(a.isTransition){var y=K.T,A={};K.T=A;try{var z=o(p,u),H=K.S;H!==null&&H(A,z),Wg(n,a,z)}catch(oe){cd(n,a,oe)}finally{y!==null&&A.types!==null&&(y.types=A.types),K.T=y}}else try{y=o(p,u),Wg(n,a,y)}catch(oe){cd(n,a,oe)}}function Wg(n,a,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(u){Jg(n,a,u)},function(u){return cd(n,a,u)}):Jg(n,a,o)}function Jg(n,a,o){a.status="fulfilled",a.value=o,ey(a),n.state=o,a=n.pending,a!==null&&(o=a.next,o===a?n.pending=null:(o=o.next,a.next=o,Qg(n,o)))}function cd(n,a,o){var u=n.pending;if(n.pending=null,u!==null){u=u.next;do a.status="rejected",a.reason=o,ey(a),a=a.next;while(a!==u)}n.action=null}function ey(n){n=n.listeners;for(var a=0;a<n.length;a++)(0,n[a])()}function ty(n,a){return a}function ny(n,a){if(st){var o=At.formState;if(o!==null){e:{var u=Ze;if(st){if(Nt){t:{for(var p=Nt,y=Or;p.nodeType!==8;){if(!y){p=null;break t}if(p=Ar(p.nextSibling),p===null){p=null;break t}}y=p.data,p=y==="F!"||y==="F"?p:null}if(p){Nt=Ar(p.nextSibling),u=p.data==="F!";break e}}Ba(u)}u=!1}u&&(a=o[0])}}return o=Vn(),o.memoizedState=o.baseState=a,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ty,lastRenderedState:a},o.queue=u,o=wy.bind(null,Ze,u),u.dispatch=o,u=ud(!1),y=gd.bind(null,Ze,!1,u.queue),u=Vn(),p={state:a,dispatch:null,action:n,pending:null},u.queue=p,o=DE.bind(null,Ze,p,y,o),p.dispatch=o,u.memoizedState=n,[a,o,!1]}function ry(n){var a=rn();return ay(a,Tt,n)}function ay(n,a,o){if(a=sd(n,a,ty)[0],n=yu(ba)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var u=Ps(a)}catch(A){throw A===Co?su:A}else u=a;a=rn();var p=a.queue,y=p.dispatch;return o!==a.memoizedState&&(Ze.flags|=2048,jo(9,{destroy:void 0},NE.bind(null,p,o),null)),[u,y,n]}function NE(n,a){n.action=a}function iy(n){var a=rn(),o=Tt;if(o!==null)return ay(a,o,n);rn(),a=a.memoizedState,o=rn();var u=o.queue.dispatch;return o.memoizedState=n,[a,u,!1]}function jo(n,a,o,u){return n={tag:n,create:o,deps:u,inst:a,next:null},a=Ze.updateQueue,a===null&&(a=mu(),Ze.updateQueue=a),o=a.lastEffect,o===null?a.lastEffect=n.next=n:(u=o.next,o.next=n,n.next=u,a.lastEffect=n),n}function oy(){return rn().memoizedState}function vu(n,a,o,u){var p=Vn();Ze.flags|=n,p.memoizedState=jo(1|a,{destroy:void 0},o,u===void 0?null:u)}function bu(n,a,o,u){var p=rn();u=u===void 0?null:u;var y=p.memoizedState.inst;Tt!==null&&u!==null&&td(u,Tt.memoizedState.deps)?p.memoizedState=jo(a,y,o,u):(Ze.flags|=n,p.memoizedState=jo(1|a,y,o,u))}function sy(n,a){vu(8390656,8,n,a)}function fd(n,a){bu(2048,8,n,a)}function zE(n){Ze.flags|=4;var a=Ze.updateQueue;if(a===null)a=mu(),Ze.updateQueue=a,a.events=[n];else{var o=a.events;o===null?a.events=[n]:o.push(n)}}function ly(n){var a=rn().memoizedState;return zE({ref:a,nextImpl:n}),function(){if((yt&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}function uy(n,a){return bu(4,2,n,a)}function cy(n,a){return bu(4,4,n,a)}function fy(n,a){if(typeof a=="function"){n=n();var o=a(n);return function(){typeof o=="function"?o():a(null)}}if(a!=null)return n=n(),a.current=n,function(){a.current=null}}function dy(n,a,o){o=o!=null?o.concat([n]):null,bu(4,4,fy.bind(null,a,n),o)}function dd(){}function hy(n,a){var o=rn();a=a===void 0?null:a;var u=o.memoizedState;return a!==null&&td(a,u[1])?u[0]:(o.memoizedState=[n,a],n)}function py(n,a){var o=rn();a=a===void 0?null:a;var u=o.memoizedState;if(a!==null&&td(a,u[1]))return u[0];if(u=n(),Hi){Ht(!0);try{n()}finally{Ht(!1)}}return o.memoizedState=[u,a],u}function hd(n,a,o){return o===void 0||(va&1073741824)!==0&&(at&261930)===0?n.memoizedState=a:(n.memoizedState=o,n=m0(),Ze.lanes|=n,Ja|=n,o)}function my(n,a,o,u){return lr(o,a)?o:Ro.current!==null?(n=hd(n,o,u),lr(n,a)||(cn=!0),n):(va&42)===0||(va&1073741824)!==0&&(at&261930)===0?(cn=!0,n.memoizedState=o):(n=m0(),Ze.lanes|=n,Ja|=n,a)}function gy(n,a,o,u,p){var y=B.p;B.p=y!==0&&8>y?y:8;var A=K.T,z={};K.T=z,gd(n,!1,a,o);try{var H=p(),oe=K.S;if(oe!==null&&oe(z,H),H!==null&&typeof H=="object"&&typeof H.then=="function"){var he=ME(H,u);Is(n,a,he,pr(n))}else Is(n,a,u,pr(n))}catch(me){Is(n,a,{then:function(){},status:"rejected",reason:me},pr())}finally{B.p=y,A!==null&&z.types!==null&&(A.types=z.types),K.T=A}}function $E(){}function pd(n,a,o,u){if(n.tag!==5)throw Error(i(476));var p=yy(n).queue;gy(n,p,a,Y,o===null?$E:function(){return vy(n),o(u)})}function yy(n){var a=n.memoizedState;if(a!==null)return a;a={memoizedState:Y,baseState:Y,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ba,lastRenderedState:Y},next:null};var o={};return a.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ba,lastRenderedState:o},next:null},n.memoizedState=a,n=n.alternate,n!==null&&(n.memoizedState=a),a}function vy(n){var a=yy(n);a.next===null&&(a=n.alternate.memoizedState),Is(n,a.next.queue,{},pr())}function md(){return kn(tl)}function by(){return rn().memoizedState}function Sy(){return rn().memoizedState}function PE(n){for(var a=n.return;a!==null;){switch(a.tag){case 24:case 3:var o=pr();n=Ka(o);var u=Ya(a,n,o);u!==null&&(Jn(u,a,o),Ds(u,a,o)),a={cache:Bf()},n.payload=a;return}a=a.return}}function IE(n,a,o){var u=pr();o={lane:u,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Su(n)?Ey(a,o):(o=Df(n,a,o,u),o!==null&&(Jn(o,n,u),xy(o,a,u)))}function wy(n,a,o){var u=pr();Is(n,a,o,u)}function Is(n,a,o,u){var p={lane:u,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(Su(n))Ey(a,p);else{var y=n.alternate;if(n.lanes===0&&(y===null||y.lanes===0)&&(y=a.lastRenderedReducer,y!==null))try{var A=a.lastRenderedState,z=y(A,o);if(p.hasEagerState=!0,p.eagerState=z,lr(z,A))return eu(n,a,p,0),At===null&&Jl(),!1}catch{}if(o=Df(n,a,p,u),o!==null)return Jn(o,n,u),xy(o,a,u),!0}return!1}function gd(n,a,o,u){if(u={lane:2,revertLane:Yd(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Su(n)){if(a)throw Error(i(479))}else a=Df(n,o,u,2),a!==null&&Jn(a,n,2)}function Su(n){var a=n.alternate;return n===Ze||a!==null&&a===Ze}function Ey(n,a){Ao=hu=!0;var o=n.pending;o===null?a.next=a:(a.next=o.next,o.next=a),n.pending=a}function xy(n,a,o){if((o&4194048)!==0){var u=a.lanes;u&=n.pendingLanes,o|=u,a.lanes=o,on(n,o)}}var Ls={readContext:kn,use:gu,useCallback:Yt,useContext:Yt,useEffect:Yt,useImperativeHandle:Yt,useLayoutEffect:Yt,useInsertionEffect:Yt,useMemo:Yt,useReducer:Yt,useRef:Yt,useState:Yt,useDebugValue:Yt,useDeferredValue:Yt,useTransition:Yt,useSyncExternalStore:Yt,useId:Yt,useHostTransitionStatus:Yt,useFormState:Yt,useActionState:Yt,useOptimistic:Yt,useMemoCache:Yt,useCacheRefresh:Yt};Ls.useEffectEvent=Yt;var _y={readContext:kn,use:gu,useCallback:function(n,a){return Vn().memoizedState=[n,a===void 0?null:a],n},useContext:kn,useEffect:sy,useImperativeHandle:function(n,a,o){o=o!=null?o.concat([n]):null,vu(4194308,4,fy.bind(null,a,n),o)},useLayoutEffect:function(n,a){return vu(4194308,4,n,a)},useInsertionEffect:function(n,a){vu(4,2,n,a)},useMemo:function(n,a){var o=Vn();a=a===void 0?null:a;var u=n();if(Hi){Ht(!0);try{n()}finally{Ht(!1)}}return o.memoizedState=[u,a],u},useReducer:function(n,a,o){var u=Vn();if(o!==void 0){var p=o(a);if(Hi){Ht(!0);try{o(a)}finally{Ht(!1)}}}else p=a;return u.memoizedState=u.baseState=p,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:p},u.queue=n,n=n.dispatch=IE.bind(null,Ze,n),[u.memoizedState,n]},useRef:function(n){var a=Vn();return n={current:n},a.memoizedState=n},useState:function(n){n=ud(n);var a=n.queue,o=wy.bind(null,Ze,a);return a.dispatch=o,[n.memoizedState,o]},useDebugValue:dd,useDeferredValue:function(n,a){var o=Vn();return hd(o,n,a)},useTransition:function(){var n=ud(!1);return n=gy.bind(null,Ze,n.queue,!0,!1),Vn().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,a,o){var u=Ze,p=Vn();if(st){if(o===void 0)throw Error(i(407));o=o()}else{if(o=a(),At===null)throw Error(i(349));(at&127)!==0||Hg(u,a,o)}p.memoizedState=o;var y={value:o,getSnapshot:a};return p.queue=y,sy(Kg.bind(null,u,y,n),[n]),u.flags|=2048,jo(9,{destroy:void 0},Gg.bind(null,u,y,o,a),null),o},useId:function(){var n=Vn(),a=At.identifierPrefix;if(st){var o=ra,u=na;o=(u&~(1<<32-Rt(u)-1)).toString(32)+o,a="_"+a+"R_"+o,o=pu++,0<o&&(a+="H"+o.toString(32)),a+="_"}else o=jE++,a="_"+a+"r_"+o.toString(32)+"_";return n.memoizedState=a},useHostTransitionStatus:md,useFormState:ny,useActionState:ny,useOptimistic:function(n){var a=Vn();a.memoizedState=a.baseState=n;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=o,a=gd.bind(null,Ze,!0,o),o.dispatch=a,[n,a]},useMemoCache:od,useCacheRefresh:function(){return Vn().memoizedState=PE.bind(null,Ze)},useEffectEvent:function(n){var a=Vn(),o={impl:n};return a.memoizedState=o,function(){if((yt&2)!==0)throw Error(i(440));return o.impl.apply(void 0,arguments)}}},yd={readContext:kn,use:gu,useCallback:hy,useContext:kn,useEffect:fd,useImperativeHandle:dy,useInsertionEffect:uy,useLayoutEffect:cy,useMemo:py,useReducer:yu,useRef:oy,useState:function(){return yu(ba)},useDebugValue:dd,useDeferredValue:function(n,a){var o=rn();return my(o,Tt.memoizedState,n,a)},useTransition:function(){var n=yu(ba)[0],a=rn().memoizedState;return[typeof n=="boolean"?n:Ps(n),a]},useSyncExternalStore:Bg,useId:by,useHostTransitionStatus:md,useFormState:ry,useActionState:ry,useOptimistic:function(n,a){var o=rn();return Xg(o,Tt,n,a)},useMemoCache:od,useCacheRefresh:Sy};yd.useEffectEvent=ly;var Ty={readContext:kn,use:gu,useCallback:hy,useContext:kn,useEffect:fd,useImperativeHandle:dy,useInsertionEffect:uy,useLayoutEffect:cy,useMemo:py,useReducer:ld,useRef:oy,useState:function(){return ld(ba)},useDebugValue:dd,useDeferredValue:function(n,a){var o=rn();return Tt===null?hd(o,n,a):my(o,Tt.memoizedState,n,a)},useTransition:function(){var n=ld(ba)[0],a=rn().memoizedState;return[typeof n=="boolean"?n:Ps(n),a]},useSyncExternalStore:Bg,useId:by,useHostTransitionStatus:md,useFormState:iy,useActionState:iy,useOptimistic:function(n,a){var o=rn();return Tt!==null?Xg(o,Tt,n,a):(o.baseState=n,[n,o.queue.dispatch])},useMemoCache:od,useCacheRefresh:Sy};Ty.useEffectEvent=ly;function vd(n,a,o,u){a=n.memoizedState,o=o(u,a),o=o==null?a:g({},a,o),n.memoizedState=o,n.lanes===0&&(n.updateQueue.baseState=o)}var bd={enqueueSetState:function(n,a,o){n=n._reactInternals;var u=pr(),p=Ka(u);p.payload=a,o!=null&&(p.callback=o),a=Ya(n,p,u),a!==null&&(Jn(a,n,u),Ds(a,n,u))},enqueueReplaceState:function(n,a,o){n=n._reactInternals;var u=pr(),p=Ka(u);p.tag=1,p.payload=a,o!=null&&(p.callback=o),a=Ya(n,p,u),a!==null&&(Jn(a,n,u),Ds(a,n,u))},enqueueForceUpdate:function(n,a){n=n._reactInternals;var o=pr(),u=Ka(o);u.tag=2,a!=null&&(u.callback=a),a=Ya(n,u,o),a!==null&&(Jn(a,n,o),Ds(a,n,o))}};function Cy(n,a,o,u,p,y,A){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(u,y,A):a.prototype&&a.prototype.isPureReactComponent?!Ts(o,u)||!Ts(p,y):!0}function Oy(n,a,o,u){n=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(o,u),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(o,u),a.state!==n&&bd.enqueueReplaceState(a,a.state,null)}function Gi(n,a){var o=a;if("ref"in a){o={};for(var u in a)u!=="ref"&&(o[u]=a[u])}if(n=n.defaultProps){o===a&&(o=g({},o));for(var p in n)o[p]===void 0&&(o[p]=n[p])}return o}function Ry(n){Wl(n)}function Ay(n){console.error(n)}function My(n){Wl(n)}function wu(n,a){try{var o=n.onUncaughtError;o(a.value,{componentStack:a.stack})}catch(u){setTimeout(function(){throw u})}}function jy(n,a,o){try{var u=n.onCaughtError;u(o.value,{componentStack:o.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function Sd(n,a,o){return o=Ka(o),o.tag=3,o.payload={element:null},o.callback=function(){wu(n,a)},o}function ky(n){return n=Ka(n),n.tag=3,n}function Dy(n,a,o,u){var p=o.type.getDerivedStateFromError;if(typeof p=="function"){var y=u.value;n.payload=function(){return p(y)},n.callback=function(){jy(a,o,u)}}var A=o.stateNode;A!==null&&typeof A.componentDidCatch=="function"&&(n.callback=function(){jy(a,o,u),typeof p!="function"&&(ei===null?ei=new Set([this]):ei.add(this));var z=u.stack;this.componentDidCatch(u.value,{componentStack:z!==null?z:""})})}function LE(n,a,o,u,p){if(o.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(a=o.alternate,a!==null&&xo(a,o,p,!0),o=cr.current,o!==null){switch(o.tag){case 31:case 13:return Rr===null?Du():o.alternate===null&&Zt===0&&(Zt=3),o.flags&=-257,o.flags|=65536,o.lanes=p,u===lu?o.flags|=16384:(a=o.updateQueue,a===null?o.updateQueue=new Set([u]):a.add(u),Hd(n,u,p)),!1;case 22:return o.flags|=65536,u===lu?o.flags|=16384:(a=o.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([u])},o.updateQueue=a):(o=a.retryQueue,o===null?a.retryQueue=new Set([u]):o.add(u)),Hd(n,u,p)),!1}throw Error(i(435,o.tag))}return Hd(n,u,p),Du(),!1}if(st)return a=cr.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=p,u!==Lf&&(n=Error(i(422),{cause:u}),Rs(_r(n,o)))):(u!==Lf&&(a=Error(i(423),{cause:u}),Rs(_r(a,o))),n=n.current.alternate,n.flags|=65536,p&=-p,n.lanes|=p,u=_r(u,o),p=Sd(n.stateNode,u,p),Xf(n,p),Zt!==4&&(Zt=2)),!1;var y=Error(i(520),{cause:u});if(y=_r(y,o),Ks===null?Ks=[y]:Ks.push(y),Zt!==4&&(Zt=2),a===null)return!0;u=_r(u,o),o=a;do{switch(o.tag){case 3:return o.flags|=65536,n=p&-p,o.lanes|=n,n=Sd(o.stateNode,u,n),Xf(o,n),!1;case 1:if(a=o.type,y=o.stateNode,(o.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(ei===null||!ei.has(y))))return o.flags|=65536,p&=-p,o.lanes|=p,p=ky(p),Dy(p,n,o,u),Xf(o,p),!1}o=o.return}while(o!==null);return!1}var wd=Error(i(461)),cn=!1;function Dn(n,a,o,u){a.child=n===null?Pg(a,null,o,u):Bi(a,n.child,o,u)}function Ny(n,a,o,u,p){o=o.render;var y=a.ref;if("ref"in u){var A={};for(var z in u)z!=="ref"&&(A[z]=u[z])}else A=u;return Ui(a),u=nd(n,a,o,A,y,p),z=rd(),n!==null&&!cn?(ad(n,a,p),Sa(n,a,p)):(st&&z&&Pf(a),a.flags|=1,Dn(n,a,u,p),a.child)}function zy(n,a,o,u,p){if(n===null){var y=o.type;return typeof y=="function"&&!Nf(y)&&y.defaultProps===void 0&&o.compare===null?(a.tag=15,a.type=y,$y(n,a,y,u,p)):(n=nu(o.type,null,u,a,a.mode,p),n.ref=a.ref,n.return=a,a.child=n)}if(y=n.child,!Ad(n,p)){var A=y.memoizedProps;if(o=o.compare,o=o!==null?o:Ts,o(A,u)&&n.ref===a.ref)return Sa(n,a,p)}return a.flags|=1,n=pa(y,u),n.ref=a.ref,n.return=a,a.child=n}function $y(n,a,o,u,p){if(n!==null){var y=n.memoizedProps;if(Ts(y,u)&&n.ref===a.ref)if(cn=!1,a.pendingProps=u=y,Ad(n,p))(n.flags&131072)!==0&&(cn=!0);else return a.lanes=n.lanes,Sa(n,a,p)}return Ed(n,a,o,u,p)}function Py(n,a,o,u){var p=u.children,y=n!==null?n.memoizedState:null;if(n===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((a.flags&128)!==0){if(y=y!==null?y.baseLanes|o:o,n!==null){for(u=a.child=n.child,p=0;u!==null;)p=p|u.lanes|u.childLanes,u=u.sibling;u=p&~y}else u=0,a.child=null;return Iy(n,a,y,o,u)}if((o&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},n!==null&&ou(a,y!==null?y.cachePool:null),y!==null?Ug(a,y):Wf(),qg(a);else return u=a.lanes=536870912,Iy(n,a,y!==null?y.baseLanes|o:o,o,u)}else y!==null?(ou(a,y.cachePool),Ug(a,y),Xa(),a.memoizedState=null):(n!==null&&ou(a,null),Wf(),Xa());return Dn(n,a,p,o),a.child}function Us(n,a){return n!==null&&n.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function Iy(n,a,o,u,p){var y=Gf();return y=y===null?null:{parent:ln._currentValue,pool:y},a.memoizedState={baseLanes:o,cachePool:y},n!==null&&ou(a,null),Wf(),qg(a),n!==null&&xo(n,a,u,!0),a.childLanes=p,null}function Eu(n,a){return a=_u({mode:a.mode,children:a.children},n.mode),a.ref=n.ref,n.child=a,a.return=n,a}function Ly(n,a,o){return Bi(a,n.child,null,o),n=Eu(a,a.pendingProps),n.flags|=2,fr(a),a.memoizedState=null,n}function UE(n,a,o){var u=a.pendingProps,p=(a.flags&128)!==0;if(a.flags&=-129,n===null){if(st){if(u.mode==="hidden")return n=Eu(a,u),a.lanes=536870912,Us(null,n);if(ed(a),(n=Nt)?(n=Q0(n,Or),n=n!==null&&n.data==="&"?n:null,n!==null&&(a.memoizedState={dehydrated:n,treeContext:Va!==null?{id:na,overflow:ra}:null,retryLane:536870912,hydrationErrors:null},o=Eg(n),o.return=a,a.child=o,jn=a,Nt=null)):n=null,n===null)throw Ba(a);return a.lanes=536870912,null}return Eu(a,u)}var y=n.memoizedState;if(y!==null){var A=y.dehydrated;if(ed(a),p)if(a.flags&256)a.flags&=-257,a=Ly(n,a,o);else if(a.memoizedState!==null)a.child=n.child,a.flags|=128,a=null;else throw Error(i(558));else if(cn||xo(n,a,o,!1),p=(o&n.childLanes)!==0,cn||p){if(u=At,u!==null&&(A=Cn(u,o),A!==0&&A!==y.retryLane))throw y.retryLane=A,$i(n,A),Jn(u,n,A),wd;Du(),a=Ly(n,a,o)}else n=y.treeContext,Nt=Ar(A.nextSibling),jn=a,st=!0,Fa=null,Or=!1,n!==null&&Tg(a,n),a=Eu(a,u),a.flags|=4096;return a}return n=pa(n.child,{mode:u.mode,children:u.children}),n.ref=a.ref,a.child=n,n.return=a,n}function xu(n,a){var o=a.ref;if(o===null)n!==null&&n.ref!==null&&(a.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(i(284));(n===null||n.ref!==o)&&(a.flags|=4194816)}}function Ed(n,a,o,u,p){return Ui(a),o=nd(n,a,o,u,void 0,p),u=rd(),n!==null&&!cn?(ad(n,a,p),Sa(n,a,p)):(st&&u&&Pf(a),a.flags|=1,Dn(n,a,o,p),a.child)}function Uy(n,a,o,u,p,y){return Ui(a),a.updateQueue=null,o=Fg(a,u,o,p),Vg(n),u=rd(),n!==null&&!cn?(ad(n,a,y),Sa(n,a,y)):(st&&u&&Pf(a),a.flags|=1,Dn(n,a,o,y),a.child)}function qy(n,a,o,u,p){if(Ui(a),a.stateNode===null){var y=bo,A=o.contextType;typeof A=="object"&&A!==null&&(y=kn(A)),y=new o(u,y),a.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,y.updater=bd,a.stateNode=y,y._reactInternals=a,y=a.stateNode,y.props=u,y.state=a.memoizedState,y.refs={},Yf(a),A=o.contextType,y.context=typeof A=="object"&&A!==null?kn(A):bo,y.state=a.memoizedState,A=o.getDerivedStateFromProps,typeof A=="function"&&(vd(a,o,A,u),y.state=a.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(A=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),A!==y.state&&bd.enqueueReplaceState(y,y.state,null),zs(a,u,y,p),Ns(),y.state=a.memoizedState),typeof y.componentDidMount=="function"&&(a.flags|=4194308),u=!0}else if(n===null){y=a.stateNode;var z=a.memoizedProps,H=Gi(o,z);y.props=H;var oe=y.context,he=o.contextType;A=bo,typeof he=="object"&&he!==null&&(A=kn(he));var me=o.getDerivedStateFromProps;he=typeof me=="function"||typeof y.getSnapshotBeforeUpdate=="function",z=a.pendingProps!==z,he||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(z||oe!==A)&&Oy(a,y,u,A),Ga=!1;var le=a.memoizedState;y.state=le,zs(a,u,y,p),Ns(),oe=a.memoizedState,z||le!==oe||Ga?(typeof me=="function"&&(vd(a,o,me,u),oe=a.memoizedState),(H=Ga||Cy(a,o,H,u,le,oe,A))?(he||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(a.flags|=4194308)):(typeof y.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=u,a.memoizedState=oe),y.props=u,y.state=oe,y.context=A,u=H):(typeof y.componentDidMount=="function"&&(a.flags|=4194308),u=!1)}else{y=a.stateNode,Zf(n,a),A=a.memoizedProps,he=Gi(o,A),y.props=he,me=a.pendingProps,le=y.context,oe=o.contextType,H=bo,typeof oe=="object"&&oe!==null&&(H=kn(oe)),z=o.getDerivedStateFromProps,(oe=typeof z=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(A!==me||le!==H)&&Oy(a,y,u,H),Ga=!1,le=a.memoizedState,y.state=le,zs(a,u,y,p),Ns();var ce=a.memoizedState;A!==me||le!==ce||Ga||n!==null&&n.dependencies!==null&&au(n.dependencies)?(typeof z=="function"&&(vd(a,o,z,u),ce=a.memoizedState),(he=Ga||Cy(a,o,he,u,le,ce,H)||n!==null&&n.dependencies!==null&&au(n.dependencies))?(oe||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(u,ce,H),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(u,ce,H)),typeof y.componentDidUpdate=="function"&&(a.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof y.componentDidUpdate!="function"||A===n.memoizedProps&&le===n.memoizedState||(a.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||A===n.memoizedProps&&le===n.memoizedState||(a.flags|=1024),a.memoizedProps=u,a.memoizedState=ce),y.props=u,y.state=ce,y.context=H,u=he):(typeof y.componentDidUpdate!="function"||A===n.memoizedProps&&le===n.memoizedState||(a.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||A===n.memoizedProps&&le===n.memoizedState||(a.flags|=1024),u=!1)}return y=u,xu(n,a),u=(a.flags&128)!==0,y||u?(y=a.stateNode,o=u&&typeof o.getDerivedStateFromError!="function"?null:y.render(),a.flags|=1,n!==null&&u?(a.child=Bi(a,n.child,null,p),a.child=Bi(a,null,o,p)):Dn(n,a,o,p),a.memoizedState=y.state,n=a.child):n=Sa(n,a,p),n}function Vy(n,a,o,u){return Ii(),a.flags|=256,Dn(n,a,o,u),a.child}var xd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function _d(n){return{baseLanes:n,cachePool:jg()}}function Td(n,a,o){return n=n!==null?n.childLanes&~o:0,a&&(n|=hr),n}function Fy(n,a,o){var u=a.pendingProps,p=!1,y=(a.flags&128)!==0,A;if((A=y)||(A=n!==null&&n.memoizedState===null?!1:(nn.current&2)!==0),A&&(p=!0,a.flags&=-129),A=(a.flags&32)!==0,a.flags&=-33,n===null){if(st){if(p?Za(a):Xa(),(n=Nt)?(n=Q0(n,Or),n=n!==null&&n.data!=="&"?n:null,n!==null&&(a.memoizedState={dehydrated:n,treeContext:Va!==null?{id:na,overflow:ra}:null,retryLane:536870912,hydrationErrors:null},o=Eg(n),o.return=a,a.child=o,jn=a,Nt=null)):n=null,n===null)throw Ba(a);return sh(n)?a.lanes=32:a.lanes=536870912,null}var z=u.children;return u=u.fallback,p?(Xa(),p=a.mode,z=_u({mode:"hidden",children:z},p),u=Pi(u,p,o,null),z.return=a,u.return=a,z.sibling=u,a.child=z,u=a.child,u.memoizedState=_d(o),u.childLanes=Td(n,A,o),a.memoizedState=xd,Us(null,u)):(Za(a),Cd(a,z))}var H=n.memoizedState;if(H!==null&&(z=H.dehydrated,z!==null)){if(y)a.flags&256?(Za(a),a.flags&=-257,a=Od(n,a,o)):a.memoizedState!==null?(Xa(),a.child=n.child,a.flags|=128,a=null):(Xa(),z=u.fallback,p=a.mode,u=_u({mode:"visible",children:u.children},p),z=Pi(z,p,o,null),z.flags|=2,u.return=a,z.return=a,u.sibling=z,a.child=u,Bi(a,n.child,null,o),u=a.child,u.memoizedState=_d(o),u.childLanes=Td(n,A,o),a.memoizedState=xd,a=Us(null,u));else if(Za(a),sh(z)){if(A=z.nextSibling&&z.nextSibling.dataset,A)var oe=A.dgst;A=oe,u=Error(i(419)),u.stack="",u.digest=A,Rs({value:u,source:null,stack:null}),a=Od(n,a,o)}else if(cn||xo(n,a,o,!1),A=(o&n.childLanes)!==0,cn||A){if(A=At,A!==null&&(u=Cn(A,o),u!==0&&u!==H.retryLane))throw H.retryLane=u,$i(n,u),Jn(A,n,u),wd;oh(z)||Du(),a=Od(n,a,o)}else oh(z)?(a.flags|=192,a.child=n.child,a=null):(n=H.treeContext,Nt=Ar(z.nextSibling),jn=a,st=!0,Fa=null,Or=!1,n!==null&&Tg(a,n),a=Cd(a,u.children),a.flags|=4096);return a}return p?(Xa(),z=u.fallback,p=a.mode,H=n.child,oe=H.sibling,u=pa(H,{mode:"hidden",children:u.children}),u.subtreeFlags=H.subtreeFlags&65011712,oe!==null?z=pa(oe,z):(z=Pi(z,p,o,null),z.flags|=2),z.return=a,u.return=a,u.sibling=z,a.child=u,Us(null,u),u=a.child,z=n.child.memoizedState,z===null?z=_d(o):(p=z.cachePool,p!==null?(H=ln._currentValue,p=p.parent!==H?{parent:H,pool:H}:p):p=jg(),z={baseLanes:z.baseLanes|o,cachePool:p}),u.memoizedState=z,u.childLanes=Td(n,A,o),a.memoizedState=xd,Us(n.child,u)):(Za(a),o=n.child,n=o.sibling,o=pa(o,{mode:"visible",children:u.children}),o.return=a,o.sibling=null,n!==null&&(A=a.deletions,A===null?(a.deletions=[n],a.flags|=16):A.push(n)),a.child=o,a.memoizedState=null,o)}function Cd(n,a){return a=_u({mode:"visible",children:a},n.mode),a.return=n,n.child=a}function _u(n,a){return n=ur(22,n,null,a),n.lanes=0,n}function Od(n,a,o){return Bi(a,n.child,null,o),n=Cd(a,a.pendingProps.children),n.flags|=2,a.memoizedState=null,n}function By(n,a,o){n.lanes|=a;var u=n.alternate;u!==null&&(u.lanes|=a),Vf(n.return,a,o)}function Rd(n,a,o,u,p,y){var A=n.memoizedState;A===null?n.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:u,tail:o,tailMode:p,treeForkCount:y}:(A.isBackwards=a,A.rendering=null,A.renderingStartTime=0,A.last=u,A.tail=o,A.tailMode=p,A.treeForkCount=y)}function Hy(n,a,o){var u=a.pendingProps,p=u.revealOrder,y=u.tail;u=u.children;var A=nn.current,z=(A&2)!==0;if(z?(A=A&1|2,a.flags|=128):A&=1,U(nn,A),Dn(n,a,u,o),u=st?Os:0,!z&&n!==null&&(n.flags&128)!==0)e:for(n=a.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&By(n,o,a);else if(n.tag===19)By(n,o,a);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===a)break e;for(;n.sibling===null;){if(n.return===null||n.return===a)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(p){case"forwards":for(o=a.child,p=null;o!==null;)n=o.alternate,n!==null&&du(n)===null&&(p=o),o=o.sibling;o=p,o===null?(p=a.child,a.child=null):(p=o.sibling,o.sibling=null),Rd(a,!1,p,o,y,u);break;case"backwards":case"unstable_legacy-backwards":for(o=null,p=a.child,a.child=null;p!==null;){if(n=p.alternate,n!==null&&du(n)===null){a.child=p;break}n=p.sibling,p.sibling=o,o=p,p=n}Rd(a,!0,o,null,y,u);break;case"together":Rd(a,!1,null,null,void 0,u);break;default:a.memoizedState=null}return a.child}function Sa(n,a,o){if(n!==null&&(a.dependencies=n.dependencies),Ja|=a.lanes,(o&a.childLanes)===0)if(n!==null){if(xo(n,a,o,!1),(o&a.childLanes)===0)return null}else return null;if(n!==null&&a.child!==n.child)throw Error(i(153));if(a.child!==null){for(n=a.child,o=pa(n,n.pendingProps),a.child=o,o.return=a;n.sibling!==null;)n=n.sibling,o=o.sibling=pa(n,n.pendingProps),o.return=a;o.sibling=null}return a.child}function Ad(n,a){return(n.lanes&a)!==0?!0:(n=n.dependencies,!!(n!==null&&au(n)))}function qE(n,a,o){switch(a.tag){case 3:ve(a,a.stateNode.containerInfo),Ha(a,ln,n.memoizedState.cache),Ii();break;case 27:case 5:Oe(a);break;case 4:ve(a,a.stateNode.containerInfo);break;case 10:Ha(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,ed(a),null;break;case 13:var u=a.memoizedState;if(u!==null)return u.dehydrated!==null?(Za(a),a.flags|=128,null):(o&a.child.childLanes)!==0?Fy(n,a,o):(Za(a),n=Sa(n,a,o),n!==null?n.sibling:null);Za(a);break;case 19:var p=(n.flags&128)!==0;if(u=(o&a.childLanes)!==0,u||(xo(n,a,o,!1),u=(o&a.childLanes)!==0),p){if(u)return Hy(n,a,o);a.flags|=128}if(p=a.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),U(nn,nn.current),u)break;return null;case 22:return a.lanes=0,Py(n,a,o,a.pendingProps);case 24:Ha(a,ln,n.memoizedState.cache)}return Sa(n,a,o)}function Gy(n,a,o){if(n!==null)if(n.memoizedProps!==a.pendingProps)cn=!0;else{if(!Ad(n,o)&&(a.flags&128)===0)return cn=!1,qE(n,a,o);cn=(n.flags&131072)!==0}else cn=!1,st&&(a.flags&1048576)!==0&&_g(a,Os,a.index);switch(a.lanes=0,a.tag){case 16:e:{var u=a.pendingProps;if(n=Vi(a.elementType),a.type=n,typeof n=="function")Nf(n)?(u=Gi(n,u),a.tag=1,a=qy(null,a,n,u,o)):(a.tag=0,a=Ed(null,a,n,u,o));else{if(n!=null){var p=n.$$typeof;if(p===E){a.tag=11,a=Ny(null,a,n,u,o);break e}else if(p===M){a.tag=14,a=zy(null,a,n,u,o);break e}}throw a=re(n)||n,Error(i(306,a,""))}}return a;case 0:return Ed(n,a,a.type,a.pendingProps,o);case 1:return u=a.type,p=Gi(u,a.pendingProps),qy(n,a,u,p,o);case 3:e:{if(ve(a,a.stateNode.containerInfo),n===null)throw Error(i(387));u=a.pendingProps;var y=a.memoizedState;p=y.element,Zf(n,a),zs(a,u,null,o);var A=a.memoizedState;if(u=A.cache,Ha(a,ln,u),u!==y.cache&&Ff(a,[ln],o,!0),Ns(),u=A.element,y.isDehydrated)if(y={element:u,isDehydrated:!1,cache:A.cache},a.updateQueue.baseState=y,a.memoizedState=y,a.flags&256){a=Vy(n,a,u,o);break e}else if(u!==p){p=_r(Error(i(424)),a),Rs(p),a=Vy(n,a,u,o);break e}else for(n=a.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,Nt=Ar(n.firstChild),jn=a,st=!0,Fa=null,Or=!0,o=Pg(a,null,u,o),a.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(Ii(),u===p){a=Sa(n,a,o);break e}Dn(n,a,u,o)}a=a.child}return a;case 26:return xu(n,a),n===null?(o=rv(a.type,null,a.pendingProps,null))?a.memoizedState=o:st||(o=a.type,n=a.pendingProps,u=Uu(ee.current).createElement(o),u[$t]=a,u[sn]=n,Nn(u,o,n),yn(u),a.stateNode=u):a.memoizedState=rv(a.type,n.memoizedProps,a.pendingProps,n.memoizedState),null;case 27:return Oe(a),n===null&&st&&(u=a.stateNode=ev(a.type,a.pendingProps,ee.current),jn=a,Or=!0,p=Nt,ai(a.type)?(lh=p,Nt=Ar(u.firstChild)):Nt=p),Dn(n,a,a.pendingProps.children,o),xu(n,a),n===null&&(a.flags|=4194304),a.child;case 5:return n===null&&st&&((p=u=Nt)&&(u=yx(u,a.type,a.pendingProps,Or),u!==null?(a.stateNode=u,jn=a,Nt=Ar(u.firstChild),Or=!1,p=!0):p=!1),p||Ba(a)),Oe(a),p=a.type,y=a.pendingProps,A=n!==null?n.memoizedProps:null,u=y.children,rh(p,y)?u=null:A!==null&&rh(p,A)&&(a.flags|=32),a.memoizedState!==null&&(p=nd(n,a,kE,null,null,o),tl._currentValue=p),xu(n,a),Dn(n,a,u,o),a.child;case 6:return n===null&&st&&((n=o=Nt)&&(o=vx(o,a.pendingProps,Or),o!==null?(a.stateNode=o,jn=a,Nt=null,n=!0):n=!1),n||Ba(a)),null;case 13:return Fy(n,a,o);case 4:return ve(a,a.stateNode.containerInfo),u=a.pendingProps,n===null?a.child=Bi(a,null,u,o):Dn(n,a,u,o),a.child;case 11:return Ny(n,a,a.type,a.pendingProps,o);case 7:return Dn(n,a,a.pendingProps,o),a.child;case 8:return Dn(n,a,a.pendingProps.children,o),a.child;case 12:return Dn(n,a,a.pendingProps.children,o),a.child;case 10:return u=a.pendingProps,Ha(a,a.type,u.value),Dn(n,a,u.children,o),a.child;case 9:return p=a.type._context,u=a.pendingProps.children,Ui(a),p=kn(p),u=u(p),a.flags|=1,Dn(n,a,u,o),a.child;case 14:return zy(n,a,a.type,a.pendingProps,o);case 15:return $y(n,a,a.type,a.pendingProps,o);case 19:return Hy(n,a,o);case 31:return UE(n,a,o);case 22:return Py(n,a,o,a.pendingProps);case 24:return Ui(a),u=kn(ln),n===null?(p=Gf(),p===null&&(p=At,y=Bf(),p.pooledCache=y,y.refCount++,y!==null&&(p.pooledCacheLanes|=o),p=y),a.memoizedState={parent:u,cache:p},Yf(a),Ha(a,ln,p)):((n.lanes&o)!==0&&(Zf(n,a),zs(a,null,null,o),Ns()),p=n.memoizedState,y=a.memoizedState,p.parent!==u?(p={parent:u,cache:u},a.memoizedState=p,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=p),Ha(a,ln,u)):(u=y.cache,Ha(a,ln,u),u!==p.cache&&Ff(a,[ln],o,!0))),Dn(n,a,a.pendingProps.children,o),a.child;case 29:throw a.pendingProps}throw Error(i(156,a.tag))}function wa(n){n.flags|=4}function Md(n,a,o,u,p){if((a=(n.mode&32)!==0)&&(a=!1),a){if(n.flags|=16777216,(p&335544128)===p)if(n.stateNode.complete)n.flags|=8192;else if(b0())n.flags|=8192;else throw Fi=lu,Kf}else n.flags&=-16777217}function Ky(n,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!lv(a))if(b0())n.flags|=8192;else throw Fi=lu,Kf}function Tu(n,a){a!==null&&(n.flags|=4),n.flags&16384&&(a=n.tag!==22?wr():536870912,n.lanes|=a,zo|=a)}function qs(n,a){if(!st)switch(n.tailMode){case"hidden":a=n.tail;for(var o=null;a!==null;)a.alternate!==null&&(o=a),a=a.sibling;o===null?n.tail=null:o.sibling=null;break;case"collapsed":o=n.tail;for(var u=null;o!==null;)o.alternate!==null&&(u=o),o=o.sibling;u===null?a||n.tail===null?n.tail=null:n.tail.sibling=null:u.sibling=null}}function zt(n){var a=n.alternate!==null&&n.alternate.child===n.child,o=0,u=0;if(a)for(var p=n.child;p!==null;)o|=p.lanes|p.childLanes,u|=p.subtreeFlags&65011712,u|=p.flags&65011712,p.return=n,p=p.sibling;else for(p=n.child;p!==null;)o|=p.lanes|p.childLanes,u|=p.subtreeFlags,u|=p.flags,p.return=n,p=p.sibling;return n.subtreeFlags|=u,n.childLanes=o,a}function VE(n,a,o){var u=a.pendingProps;switch(If(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return zt(a),null;case 1:return zt(a),null;case 3:return o=a.stateNode,u=null,n!==null&&(u=n.memoizedState.cache),a.memoizedState.cache!==u&&(a.flags|=2048),ya(ln),Ee(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(n===null||n.child===null)&&(Eo(a)?wa(a):n===null||n.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Uf())),zt(a),null;case 26:var p=a.type,y=a.memoizedState;return n===null?(wa(a),y!==null?(zt(a),Ky(a,y)):(zt(a),Md(a,p,null,u,o))):y?y!==n.memoizedState?(wa(a),zt(a),Ky(a,y)):(zt(a),a.flags&=-16777217):(n=n.memoizedProps,n!==u&&wa(a),zt(a),Md(a,p,n,u,o)),null;case 27:if(de(a),o=ee.current,p=a.type,n!==null&&a.stateNode!=null)n.memoizedProps!==u&&wa(a);else{if(!u){if(a.stateNode===null)throw Error(i(166));return zt(a),null}n=P.current,Eo(a)?Cg(a):(n=ev(p,u,o),a.stateNode=n,wa(a))}return zt(a),null;case 5:if(de(a),p=a.type,n!==null&&a.stateNode!=null)n.memoizedProps!==u&&wa(a);else{if(!u){if(a.stateNode===null)throw Error(i(166));return zt(a),null}if(y=P.current,Eo(a))Cg(a);else{var A=Uu(ee.current);switch(y){case 1:y=A.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:y=A.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":y=A.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":y=A.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":y=A.createElement("div"),y.innerHTML="<script><\/script>",y=y.removeChild(y.firstChild);break;case"select":y=typeof u.is=="string"?A.createElement("select",{is:u.is}):A.createElement("select"),u.multiple?y.multiple=!0:u.size&&(y.size=u.size);break;default:y=typeof u.is=="string"?A.createElement(p,{is:u.is}):A.createElement(p)}}y[$t]=a,y[sn]=u;e:for(A=a.child;A!==null;){if(A.tag===5||A.tag===6)y.appendChild(A.stateNode);else if(A.tag!==4&&A.tag!==27&&A.child!==null){A.child.return=A,A=A.child;continue}if(A===a)break e;for(;A.sibling===null;){if(A.return===null||A.return===a)break e;A=A.return}A.sibling.return=A.return,A=A.sibling}a.stateNode=y;e:switch(Nn(y,p,u),p){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&wa(a)}}return zt(a),Md(a,a.type,n===null?null:n.memoizedProps,a.pendingProps,o),null;case 6:if(n&&a.stateNode!=null)n.memoizedProps!==u&&wa(a);else{if(typeof u!="string"&&a.stateNode===null)throw Error(i(166));if(n=ee.current,Eo(a)){if(n=a.stateNode,o=a.memoizedProps,u=null,p=jn,p!==null)switch(p.tag){case 27:case 5:u=p.memoizedProps}n[$t]=a,n=!!(n.nodeValue===o||u!==null&&u.suppressHydrationWarning===!0||F0(n.nodeValue,o)),n||Ba(a,!0)}else n=Uu(n).createTextNode(u),n[$t]=a,a.stateNode=n}return zt(a),null;case 31:if(o=a.memoizedState,n===null||n.memoizedState!==null){if(u=Eo(a),o!==null){if(n===null){if(!u)throw Error(i(318));if(n=a.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(557));n[$t]=a}else Ii(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;zt(a),n=!1}else o=Uf(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=o),n=!0;if(!n)return a.flags&256?(fr(a),a):(fr(a),null);if((a.flags&128)!==0)throw Error(i(558))}return zt(a),null;case 13:if(u=a.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(p=Eo(a),u!==null&&u.dehydrated!==null){if(n===null){if(!p)throw Error(i(318));if(p=a.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(i(317));p[$t]=a}else Ii(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;zt(a),p=!1}else p=Uf(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=p),p=!0;if(!p)return a.flags&256?(fr(a),a):(fr(a),null)}return fr(a),(a.flags&128)!==0?(a.lanes=o,a):(o=u!==null,n=n!==null&&n.memoizedState!==null,o&&(u=a.child,p=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(p=u.alternate.memoizedState.cachePool.pool),y=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(y=u.memoizedState.cachePool.pool),y!==p&&(u.flags|=2048)),o!==n&&o&&(a.child.flags|=8192),Tu(a,a.updateQueue),zt(a),null);case 4:return Ee(),n===null&&Wd(a.stateNode.containerInfo),zt(a),null;case 10:return ya(a.type),zt(a),null;case 19:if(I(nn),u=a.memoizedState,u===null)return zt(a),null;if(p=(a.flags&128)!==0,y=u.rendering,y===null)if(p)qs(u,!1);else{if(Zt!==0||n!==null&&(n.flags&128)!==0)for(n=a.child;n!==null;){if(y=du(n),y!==null){for(a.flags|=128,qs(u,!1),n=y.updateQueue,a.updateQueue=n,Tu(a,n),a.subtreeFlags=0,n=o,o=a.child;o!==null;)wg(o,n),o=o.sibling;return U(nn,nn.current&1|2),st&&ma(a,u.treeForkCount),a.child}n=n.sibling}u.tail!==null&&Ue()>Mu&&(a.flags|=128,p=!0,qs(u,!1),a.lanes=4194304)}else{if(!p)if(n=du(y),n!==null){if(a.flags|=128,p=!0,n=n.updateQueue,a.updateQueue=n,Tu(a,n),qs(u,!0),u.tail===null&&u.tailMode==="hidden"&&!y.alternate&&!st)return zt(a),null}else 2*Ue()-u.renderingStartTime>Mu&&o!==536870912&&(a.flags|=128,p=!0,qs(u,!1),a.lanes=4194304);u.isBackwards?(y.sibling=a.child,a.child=y):(n=u.last,n!==null?n.sibling=y:a.child=y,u.last=y)}return u.tail!==null?(n=u.tail,u.rendering=n,u.tail=n.sibling,u.renderingStartTime=Ue(),n.sibling=null,o=nn.current,U(nn,p?o&1|2:o&1),st&&ma(a,u.treeForkCount),n):(zt(a),null);case 22:case 23:return fr(a),Jf(),u=a.memoizedState!==null,n!==null?n.memoizedState!==null!==u&&(a.flags|=8192):u&&(a.flags|=8192),u?(o&536870912)!==0&&(a.flags&128)===0&&(zt(a),a.subtreeFlags&6&&(a.flags|=8192)):zt(a),o=a.updateQueue,o!==null&&Tu(a,o.retryQueue),o=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==o&&(a.flags|=2048),n!==null&&I(qi),null;case 24:return o=null,n!==null&&(o=n.memoizedState.cache),a.memoizedState.cache!==o&&(a.flags|=2048),ya(ln),zt(a),null;case 25:return null;case 30:return null}throw Error(i(156,a.tag))}function FE(n,a){switch(If(a),a.tag){case 1:return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 3:return ya(ln),Ee(),n=a.flags,(n&65536)!==0&&(n&128)===0?(a.flags=n&-65537|128,a):null;case 26:case 27:case 5:return de(a),null;case 31:if(a.memoizedState!==null){if(fr(a),a.alternate===null)throw Error(i(340));Ii()}return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 13:if(fr(a),n=a.memoizedState,n!==null&&n.dehydrated!==null){if(a.alternate===null)throw Error(i(340));Ii()}return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 19:return I(nn),null;case 4:return Ee(),null;case 10:return ya(a.type),null;case 22:case 23:return fr(a),Jf(),n!==null&&I(qi),n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 24:return ya(ln),null;case 25:return null;default:return null}}function Yy(n,a){switch(If(a),a.tag){case 3:ya(ln),Ee();break;case 26:case 27:case 5:de(a);break;case 4:Ee();break;case 31:a.memoizedState!==null&&fr(a);break;case 13:fr(a);break;case 19:I(nn);break;case 10:ya(a.type);break;case 22:case 23:fr(a),Jf(),n!==null&&I(qi);break;case 24:ya(ln)}}function Vs(n,a){try{var o=a.updateQueue,u=o!==null?o.lastEffect:null;if(u!==null){var p=u.next;o=p;do{if((o.tag&n)===n){u=void 0;var y=o.create,A=o.inst;u=y(),A.destroy=u}o=o.next}while(o!==p)}}catch(z){xt(a,a.return,z)}}function Qa(n,a,o){try{var u=a.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var y=p.next;u=y;do{if((u.tag&n)===n){var A=u.inst,z=A.destroy;if(z!==void 0){A.destroy=void 0,p=a;var H=o,oe=z;try{oe()}catch(he){xt(p,H,he)}}}u=u.next}while(u!==y)}}catch(he){xt(a,a.return,he)}}function Zy(n){var a=n.updateQueue;if(a!==null){var o=n.stateNode;try{Lg(a,o)}catch(u){xt(n,n.return,u)}}}function Xy(n,a,o){o.props=Gi(n.type,n.memoizedProps),o.state=n.memoizedState;try{o.componentWillUnmount()}catch(u){xt(n,a,u)}}function Fs(n,a){try{var o=n.ref;if(o!==null){switch(n.tag){case 26:case 27:case 5:var u=n.stateNode;break;case 30:u=n.stateNode;break;default:u=n.stateNode}typeof o=="function"?n.refCleanup=o(u):o.current=u}}catch(p){xt(n,a,p)}}function aa(n,a){var o=n.ref,u=n.refCleanup;if(o!==null)if(typeof u=="function")try{u()}catch(p){xt(n,a,p)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(p){xt(n,a,p)}else o.current=null}function Qy(n){var a=n.type,o=n.memoizedProps,u=n.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":o.autoFocus&&u.focus();break e;case"img":o.src?u.src=o.src:o.srcSet&&(u.srcset=o.srcSet)}}catch(p){xt(n,n.return,p)}}function jd(n,a,o){try{var u=n.stateNode;fx(u,n.type,o,a),u[sn]=a}catch(p){xt(n,n.return,p)}}function Wy(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&ai(n.type)||n.tag===4}function kd(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Wy(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&ai(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function Dd(n,a,o){var u=n.tag;if(u===5||u===6)n=n.stateNode,a?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(n,a):(a=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,a.appendChild(n),o=o._reactRootContainer,o!=null||a.onclick!==null||(a.onclick=Me));else if(u!==4&&(u===27&&ai(n.type)&&(o=n.stateNode,a=null),n=n.child,n!==null))for(Dd(n,a,o),n=n.sibling;n!==null;)Dd(n,a,o),n=n.sibling}function Cu(n,a,o){var u=n.tag;if(u===5||u===6)n=n.stateNode,a?o.insertBefore(n,a):o.appendChild(n);else if(u!==4&&(u===27&&ai(n.type)&&(o=n.stateNode),n=n.child,n!==null))for(Cu(n,a,o),n=n.sibling;n!==null;)Cu(n,a,o),n=n.sibling}function Jy(n){var a=n.stateNode,o=n.memoizedProps;try{for(var u=n.type,p=a.attributes;p.length;)a.removeAttributeNode(p[0]);Nn(a,u,o),a[$t]=n,a[sn]=o}catch(y){xt(n,n.return,y)}}var Ea=!1,fn=!1,Nd=!1,e0=typeof WeakSet=="function"?WeakSet:Set,On=null;function BE(n,a){if(n=n.containerInfo,th=Ku,n=dg(n),Of(n)){if("selectionStart"in n)var o={start:n.selectionStart,end:n.selectionEnd};else e:{o=(o=n.ownerDocument)&&o.defaultView||window;var u=o.getSelection&&o.getSelection();if(u&&u.rangeCount!==0){o=u.anchorNode;var p=u.anchorOffset,y=u.focusNode;u=u.focusOffset;try{o.nodeType,y.nodeType}catch{o=null;break e}var A=0,z=-1,H=-1,oe=0,he=0,me=n,le=null;t:for(;;){for(var ce;me!==o||p!==0&&me.nodeType!==3||(z=A+p),me!==y||u!==0&&me.nodeType!==3||(H=A+u),me.nodeType===3&&(A+=me.nodeValue.length),(ce=me.firstChild)!==null;)le=me,me=ce;for(;;){if(me===n)break t;if(le===o&&++oe===p&&(z=A),le===y&&++he===u&&(H=A),(ce=me.nextSibling)!==null)break;me=le,le=me.parentNode}me=ce}o=z===-1||H===-1?null:{start:z,end:H}}else o=null}o=o||{start:0,end:0}}else o=null;for(nh={focusedElem:n,selectionRange:o},Ku=!1,On=a;On!==null;)if(a=On,n=a.child,(a.subtreeFlags&1028)!==0&&n!==null)n.return=a,On=n;else for(;On!==null;){switch(a=On,y=a.alternate,n=a.flags,a.tag){case 0:if((n&4)!==0&&(n=a.updateQueue,n=n!==null?n.events:null,n!==null))for(o=0;o<n.length;o++)p=n[o],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&y!==null){n=void 0,o=a,p=y.memoizedProps,y=y.memoizedState,u=o.stateNode;try{var je=Gi(o.type,p);n=u.getSnapshotBeforeUpdate(je,y),u.__reactInternalSnapshotBeforeUpdate=n}catch(qe){xt(o,o.return,qe)}}break;case 3:if((n&1024)!==0){if(n=a.stateNode.containerInfo,o=n.nodeType,o===9)ih(n);else if(o===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":ih(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(i(163))}if(n=a.sibling,n!==null){n.return=a.return,On=n;break}On=a.return}}function t0(n,a,o){var u=o.flags;switch(o.tag){case 0:case 11:case 15:_a(n,o),u&4&&Vs(5,o);break;case 1:if(_a(n,o),u&4)if(n=o.stateNode,a===null)try{n.componentDidMount()}catch(A){xt(o,o.return,A)}else{var p=Gi(o.type,a.memoizedProps);a=a.memoizedState;try{n.componentDidUpdate(p,a,n.__reactInternalSnapshotBeforeUpdate)}catch(A){xt(o,o.return,A)}}u&64&&Zy(o),u&512&&Fs(o,o.return);break;case 3:if(_a(n,o),u&64&&(n=o.updateQueue,n!==null)){if(a=null,o.child!==null)switch(o.child.tag){case 27:case 5:a=o.child.stateNode;break;case 1:a=o.child.stateNode}try{Lg(n,a)}catch(A){xt(o,o.return,A)}}break;case 27:a===null&&u&4&&Jy(o);case 26:case 5:_a(n,o),a===null&&u&4&&Qy(o),u&512&&Fs(o,o.return);break;case 12:_a(n,o);break;case 31:_a(n,o),u&4&&a0(n,o);break;case 13:_a(n,o),u&4&&i0(n,o),u&64&&(n=o.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(o=JE.bind(null,o),bx(n,o))));break;case 22:if(u=o.memoizedState!==null||Ea,!u){a=a!==null&&a.memoizedState!==null||fn,p=Ea;var y=fn;Ea=u,(fn=a)&&!y?Ta(n,o,(o.subtreeFlags&8772)!==0):_a(n,o),Ea=p,fn=y}break;case 30:break;default:_a(n,o)}}function n0(n){var a=n.alternate;a!==null&&(n.alternate=null,n0(a)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(a=n.stateNode,a!==null&&Bl(a)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var Pt=null,Zn=!1;function xa(n,a,o){for(o=o.child;o!==null;)r0(n,a,o),o=o.sibling}function r0(n,a,o){if(wt&&typeof wt.onCommitFiberUnmount=="function")try{wt.onCommitFiberUnmount(Vt,o)}catch{}switch(o.tag){case 26:fn||aa(o,a),xa(n,a,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:fn||aa(o,a);var u=Pt,p=Zn;ai(o.type)&&(Pt=o.stateNode,Zn=!1),xa(n,a,o),Ws(o.stateNode),Pt=u,Zn=p;break;case 5:fn||aa(o,a);case 6:if(u=Pt,p=Zn,Pt=null,xa(n,a,o),Pt=u,Zn=p,Pt!==null)if(Zn)try{(Pt.nodeType===9?Pt.body:Pt.nodeName==="HTML"?Pt.ownerDocument.body:Pt).removeChild(o.stateNode)}catch(y){xt(o,a,y)}else try{Pt.removeChild(o.stateNode)}catch(y){xt(o,a,y)}break;case 18:Pt!==null&&(Zn?(n=Pt,Z0(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,o.stateNode),Fo(n)):Z0(Pt,o.stateNode));break;case 4:u=Pt,p=Zn,Pt=o.stateNode.containerInfo,Zn=!0,xa(n,a,o),Pt=u,Zn=p;break;case 0:case 11:case 14:case 15:Qa(2,o,a),fn||Qa(4,o,a),xa(n,a,o);break;case 1:fn||(aa(o,a),u=o.stateNode,typeof u.componentWillUnmount=="function"&&Xy(o,a,u)),xa(n,a,o);break;case 21:xa(n,a,o);break;case 22:fn=(u=fn)||o.memoizedState!==null,xa(n,a,o),fn=u;break;default:xa(n,a,o)}}function a0(n,a){if(a.memoizedState===null&&(n=a.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{Fo(n)}catch(o){xt(a,a.return,o)}}}function i0(n,a){if(a.memoizedState===null&&(n=a.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{Fo(n)}catch(o){xt(a,a.return,o)}}function HE(n){switch(n.tag){case 31:case 13:case 19:var a=n.stateNode;return a===null&&(a=n.stateNode=new e0),a;case 22:return n=n.stateNode,a=n._retryCache,a===null&&(a=n._retryCache=new e0),a;default:throw Error(i(435,n.tag))}}function Ou(n,a){var o=HE(n);a.forEach(function(u){if(!o.has(u)){o.add(u);var p=ex.bind(null,n,u);u.then(p,p)}})}function Xn(n,a){var o=a.deletions;if(o!==null)for(var u=0;u<o.length;u++){var p=o[u],y=n,A=a,z=A;e:for(;z!==null;){switch(z.tag){case 27:if(ai(z.type)){Pt=z.stateNode,Zn=!1;break e}break;case 5:Pt=z.stateNode,Zn=!1;break e;case 3:case 4:Pt=z.stateNode.containerInfo,Zn=!0;break e}z=z.return}if(Pt===null)throw Error(i(160));r0(y,A,p),Pt=null,Zn=!1,y=p.alternate,y!==null&&(y.return=null),p.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)o0(a,n),a=a.sibling}var Br=null;function o0(n,a){var o=n.alternate,u=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Xn(a,n),Qn(n),u&4&&(Qa(3,n,n.return),Vs(3,n),Qa(5,n,n.return));break;case 1:Xn(a,n),Qn(n),u&512&&(fn||o===null||aa(o,o.return)),u&64&&Ea&&(n=n.updateQueue,n!==null&&(u=n.callbacks,u!==null&&(o=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=o===null?u:o.concat(u))));break;case 26:var p=Br;if(Xn(a,n),Qn(n),u&512&&(fn||o===null||aa(o,o.return)),u&4){var y=o!==null?o.memoizedState:null;if(u=n.memoizedState,o===null)if(u===null)if(n.stateNode===null){e:{u=n.type,o=n.memoizedProps,p=p.ownerDocument||p;t:switch(u){case"title":y=p.getElementsByTagName("title")[0],(!y||y[fo]||y[$t]||y.namespaceURI==="http://www.w3.org/2000/svg"||y.hasAttribute("itemprop"))&&(y=p.createElement(u),p.head.insertBefore(y,p.querySelector("head > title"))),Nn(y,u,o),y[$t]=n,yn(y),u=y;break e;case"link":var A=ov("link","href",p).get(u+(o.href||""));if(A){for(var z=0;z<A.length;z++)if(y=A[z],y.getAttribute("href")===(o.href==null||o.href===""?null:o.href)&&y.getAttribute("rel")===(o.rel==null?null:o.rel)&&y.getAttribute("title")===(o.title==null?null:o.title)&&y.getAttribute("crossorigin")===(o.crossOrigin==null?null:o.crossOrigin)){A.splice(z,1);break t}}y=p.createElement(u),Nn(y,u,o),p.head.appendChild(y);break;case"meta":if(A=ov("meta","content",p).get(u+(o.content||""))){for(z=0;z<A.length;z++)if(y=A[z],y.getAttribute("content")===(o.content==null?null:""+o.content)&&y.getAttribute("name")===(o.name==null?null:o.name)&&y.getAttribute("property")===(o.property==null?null:o.property)&&y.getAttribute("http-equiv")===(o.httpEquiv==null?null:o.httpEquiv)&&y.getAttribute("charset")===(o.charSet==null?null:o.charSet)){A.splice(z,1);break t}}y=p.createElement(u),Nn(y,u,o),p.head.appendChild(y);break;default:throw Error(i(468,u))}y[$t]=n,yn(y),u=y}n.stateNode=u}else sv(p,n.type,n.stateNode);else n.stateNode=iv(p,u,n.memoizedProps);else y!==u?(y===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):y.count--,u===null?sv(p,n.type,n.stateNode):iv(p,u,n.memoizedProps)):u===null&&n.stateNode!==null&&jd(n,n.memoizedProps,o.memoizedProps)}break;case 27:Xn(a,n),Qn(n),u&512&&(fn||o===null||aa(o,o.return)),o!==null&&u&4&&jd(n,n.memoizedProps,o.memoizedProps);break;case 5:if(Xn(a,n),Qn(n),u&512&&(fn||o===null||aa(o,o.return)),n.flags&32){p=n.stateNode;try{ne(p,"")}catch(je){xt(n,n.return,je)}}u&4&&n.stateNode!=null&&(p=n.memoizedProps,jd(n,p,o!==null?o.memoizedProps:p)),u&1024&&(Nd=!0);break;case 6:if(Xn(a,n),Qn(n),u&4){if(n.stateNode===null)throw Error(i(162));u=n.memoizedProps,o=n.stateNode;try{o.nodeValue=u}catch(je){xt(n,n.return,je)}}break;case 3:if(Fu=null,p=Br,Br=qu(a.containerInfo),Xn(a,n),Br=p,Qn(n),u&4&&o!==null&&o.memoizedState.isDehydrated)try{Fo(a.containerInfo)}catch(je){xt(n,n.return,je)}Nd&&(Nd=!1,s0(n));break;case 4:u=Br,Br=qu(n.stateNode.containerInfo),Xn(a,n),Qn(n),Br=u;break;case 12:Xn(a,n),Qn(n);break;case 31:Xn(a,n),Qn(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,Ou(n,u)));break;case 13:Xn(a,n),Qn(n),n.child.flags&8192&&n.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(Au=Ue()),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,Ou(n,u)));break;case 22:p=n.memoizedState!==null;var H=o!==null&&o.memoizedState!==null,oe=Ea,he=fn;if(Ea=oe||p,fn=he||H,Xn(a,n),fn=he,Ea=oe,Qn(n),u&8192)e:for(a=n.stateNode,a._visibility=p?a._visibility&-2:a._visibility|1,p&&(o===null||H||Ea||fn||Ki(n)),o=null,a=n;;){if(a.tag===5||a.tag===26){if(o===null){H=o=a;try{if(y=H.stateNode,p)A=y.style,typeof A.setProperty=="function"?A.setProperty("display","none","important"):A.display="none";else{z=H.stateNode;var me=H.memoizedProps.style,le=me!=null&&me.hasOwnProperty("display")?me.display:null;z.style.display=le==null||typeof le=="boolean"?"":(""+le).trim()}}catch(je){xt(H,H.return,je)}}}else if(a.tag===6){if(o===null){H=a;try{H.stateNode.nodeValue=p?"":H.memoizedProps}catch(je){xt(H,H.return,je)}}}else if(a.tag===18){if(o===null){H=a;try{var ce=H.stateNode;p?X0(ce,!0):X0(H.stateNode,!1)}catch(je){xt(H,H.return,je)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===n)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===n)break e;for(;a.sibling===null;){if(a.return===null||a.return===n)break e;o===a&&(o=null),a=a.return}o===a&&(o=null),a.sibling.return=a.return,a=a.sibling}u&4&&(u=n.updateQueue,u!==null&&(o=u.retryQueue,o!==null&&(u.retryQueue=null,Ou(n,o))));break;case 19:Xn(a,n),Qn(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,Ou(n,u)));break;case 30:break;case 21:break;default:Xn(a,n),Qn(n)}}function Qn(n){var a=n.flags;if(a&2){try{for(var o,u=n.return;u!==null;){if(Wy(u)){o=u;break}u=u.return}if(o==null)throw Error(i(160));switch(o.tag){case 27:var p=o.stateNode,y=kd(n);Cu(n,y,p);break;case 5:var A=o.stateNode;o.flags&32&&(ne(A,""),o.flags&=-33);var z=kd(n);Cu(n,z,A);break;case 3:case 4:var H=o.stateNode.containerInfo,oe=kd(n);Dd(n,oe,H);break;default:throw Error(i(161))}}catch(he){xt(n,n.return,he)}n.flags&=-3}a&4096&&(n.flags&=-4097)}function s0(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var a=n;s0(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),n=n.sibling}}function _a(n,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)t0(n,a.alternate,a),a=a.sibling}function Ki(n){for(n=n.child;n!==null;){var a=n;switch(a.tag){case 0:case 11:case 14:case 15:Qa(4,a,a.return),Ki(a);break;case 1:aa(a,a.return);var o=a.stateNode;typeof o.componentWillUnmount=="function"&&Xy(a,a.return,o),Ki(a);break;case 27:Ws(a.stateNode);case 26:case 5:aa(a,a.return),Ki(a);break;case 22:a.memoizedState===null&&Ki(a);break;case 30:Ki(a);break;default:Ki(a)}n=n.sibling}}function Ta(n,a,o){for(o=o&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var u=a.alternate,p=n,y=a,A=y.flags;switch(y.tag){case 0:case 11:case 15:Ta(p,y,o),Vs(4,y);break;case 1:if(Ta(p,y,o),u=y,p=u.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(oe){xt(u,u.return,oe)}if(u=y,p=u.updateQueue,p!==null){var z=u.stateNode;try{var H=p.shared.hiddenCallbacks;if(H!==null)for(p.shared.hiddenCallbacks=null,p=0;p<H.length;p++)Ig(H[p],z)}catch(oe){xt(u,u.return,oe)}}o&&A&64&&Zy(y),Fs(y,y.return);break;case 27:Jy(y);case 26:case 5:Ta(p,y,o),o&&u===null&&A&4&&Qy(y),Fs(y,y.return);break;case 12:Ta(p,y,o);break;case 31:Ta(p,y,o),o&&A&4&&a0(p,y);break;case 13:Ta(p,y,o),o&&A&4&&i0(p,y);break;case 22:y.memoizedState===null&&Ta(p,y,o),Fs(y,y.return);break;case 30:break;default:Ta(p,y,o)}a=a.sibling}}function zd(n,a){var o=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),n=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(n=a.memoizedState.cachePool.pool),n!==o&&(n!=null&&n.refCount++,o!=null&&As(o))}function $d(n,a){n=null,a.alternate!==null&&(n=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==n&&(a.refCount++,n!=null&&As(n))}function Hr(n,a,o,u){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)l0(n,a,o,u),a=a.sibling}function l0(n,a,o,u){var p=a.flags;switch(a.tag){case 0:case 11:case 15:Hr(n,a,o,u),p&2048&&Vs(9,a);break;case 1:Hr(n,a,o,u);break;case 3:Hr(n,a,o,u),p&2048&&(n=null,a.alternate!==null&&(n=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==n&&(a.refCount++,n!=null&&As(n)));break;case 12:if(p&2048){Hr(n,a,o,u),n=a.stateNode;try{var y=a.memoizedProps,A=y.id,z=y.onPostCommit;typeof z=="function"&&z(A,a.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(H){xt(a,a.return,H)}}else Hr(n,a,o,u);break;case 31:Hr(n,a,o,u);break;case 13:Hr(n,a,o,u);break;case 23:break;case 22:y=a.stateNode,A=a.alternate,a.memoizedState!==null?y._visibility&2?Hr(n,a,o,u):Bs(n,a):y._visibility&2?Hr(n,a,o,u):(y._visibility|=2,ko(n,a,o,u,(a.subtreeFlags&10256)!==0||!1)),p&2048&&zd(A,a);break;case 24:Hr(n,a,o,u),p&2048&&$d(a.alternate,a);break;default:Hr(n,a,o,u)}}function ko(n,a,o,u,p){for(p=p&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var y=n,A=a,z=o,H=u,oe=A.flags;switch(A.tag){case 0:case 11:case 15:ko(y,A,z,H,p),Vs(8,A);break;case 23:break;case 22:var he=A.stateNode;A.memoizedState!==null?he._visibility&2?ko(y,A,z,H,p):Bs(y,A):(he._visibility|=2,ko(y,A,z,H,p)),p&&oe&2048&&zd(A.alternate,A);break;case 24:ko(y,A,z,H,p),p&&oe&2048&&$d(A.alternate,A);break;default:ko(y,A,z,H,p)}a=a.sibling}}function Bs(n,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var o=n,u=a,p=u.flags;switch(u.tag){case 22:Bs(o,u),p&2048&&zd(u.alternate,u);break;case 24:Bs(o,u),p&2048&&$d(u.alternate,u);break;default:Bs(o,u)}a=a.sibling}}var Hs=8192;function Do(n,a,o){if(n.subtreeFlags&Hs)for(n=n.child;n!==null;)u0(n,a,o),n=n.sibling}function u0(n,a,o){switch(n.tag){case 26:Do(n,a,o),n.flags&Hs&&n.memoizedState!==null&&jx(o,Br,n.memoizedState,n.memoizedProps);break;case 5:Do(n,a,o);break;case 3:case 4:var u=Br;Br=qu(n.stateNode.containerInfo),Do(n,a,o),Br=u;break;case 22:n.memoizedState===null&&(u=n.alternate,u!==null&&u.memoizedState!==null?(u=Hs,Hs=16777216,Do(n,a,o),Hs=u):Do(n,a,o));break;default:Do(n,a,o)}}function c0(n){var a=n.alternate;if(a!==null&&(n=a.child,n!==null)){a.child=null;do a=n.sibling,n.sibling=null,n=a;while(n!==null)}}function Gs(n){var a=n.deletions;if((n.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var u=a[o];On=u,d0(u,n)}c0(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)f0(n),n=n.sibling}function f0(n){switch(n.tag){case 0:case 11:case 15:Gs(n),n.flags&2048&&Qa(9,n,n.return);break;case 3:Gs(n);break;case 12:Gs(n);break;case 22:var a=n.stateNode;n.memoizedState!==null&&a._visibility&2&&(n.return===null||n.return.tag!==13)?(a._visibility&=-3,Ru(n)):Gs(n);break;default:Gs(n)}}function Ru(n){var a=n.deletions;if((n.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var u=a[o];On=u,d0(u,n)}c0(n)}for(n=n.child;n!==null;){switch(a=n,a.tag){case 0:case 11:case 15:Qa(8,a,a.return),Ru(a);break;case 22:o=a.stateNode,o._visibility&2&&(o._visibility&=-3,Ru(a));break;default:Ru(a)}n=n.sibling}}function d0(n,a){for(;On!==null;){var o=On;switch(o.tag){case 0:case 11:case 15:Qa(8,o,a);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var u=o.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:As(o.memoizedState.cache)}if(u=o.child,u!==null)u.return=o,On=u;else e:for(o=n;On!==null;){u=On;var p=u.sibling,y=u.return;if(n0(u),u===o){On=null;break e}if(p!==null){p.return=y,On=p;break e}On=y}}}var GE={getCacheForType:function(n){var a=kn(ln),o=a.data.get(n);return o===void 0&&(o=n(),a.data.set(n,o)),o},cacheSignal:function(){return kn(ln).controller.signal}},KE=typeof WeakMap=="function"?WeakMap:Map,yt=0,At=null,tt=null,at=0,Et=0,dr=null,Wa=!1,No=!1,Pd=!1,Ca=0,Zt=0,Ja=0,Yi=0,Id=0,hr=0,zo=0,Ks=null,Wn=null,Ld=!1,Au=0,h0=0,Mu=1/0,ju=null,ei=null,vn=0,ti=null,$o=null,Oa=0,Ud=0,qd=null,p0=null,Ys=0,Vd=null;function pr(){return(yt&2)!==0&&at!==0?at&-at:K.T!==null?Yd():Pr()}function m0(){if(hr===0)if((at&536870912)===0||st){var n=En;En<<=1,(En&3932160)===0&&(En=262144),hr=n}else hr=536870912;return n=cr.current,n!==null&&(n.flags|=32),hr}function Jn(n,a,o){(n===At&&(Et===2||Et===9)||n.cancelPendingCommit!==null)&&(Po(n,0),ni(n,at,hr,!1)),ft(n,o),((yt&2)===0||n!==At)&&(n===At&&((yt&2)===0&&(Yi|=o),Zt===4&&ni(n,at,hr,!1)),ia(n))}function g0(n,a,o){if((yt&6)!==0)throw Error(i(327));var u=!o&&(a&127)===0&&(a&n.expiredLanes)===0||Kt(n,a),p=u?XE(n,a):Bd(n,a,!0),y=u;do{if(p===0){No&&!u&&ni(n,a,0,!1);break}else{if(o=n.current.alternate,y&&!YE(o)){p=Bd(n,a,!1),y=!1;continue}if(p===2){if(y=a,n.errorRecoveryDisabledLanes&y)var A=0;else A=n.pendingLanes&-536870913,A=A!==0?A:A&536870912?536870912:0;if(A!==0){a=A;e:{var z=n;p=Ks;var H=z.current.memoizedState.isDehydrated;if(H&&(Po(z,A).flags|=256),A=Bd(z,A,!1),A!==2){if(Pd&&!H){z.errorRecoveryDisabledLanes|=y,Yi|=y,p=4;break e}y=Wn,Wn=p,y!==null&&(Wn===null?Wn=y:Wn.push.apply(Wn,y))}p=A}if(y=!1,p!==2)continue}}if(p===1){Po(n,0),ni(n,a,0,!0);break}e:{switch(u=n,y=p,y){case 0:case 1:throw Error(i(345));case 4:if((a&4194048)!==a)break;case 6:ni(u,a,hr,!Wa);break e;case 2:Wn=null;break;case 3:case 5:break;default:throw Error(i(329))}if((a&62914560)===a&&(p=Au+300-Ue(),10<p)){if(ni(u,a,hr,!Wa),xn(u,0,!0)!==0)break e;Oa=a,u.timeoutHandle=K0(y0.bind(null,u,o,Wn,ju,Ld,a,hr,Yi,zo,Wa,y,"Throttled",-0,0),p);break e}y0(u,o,Wn,ju,Ld,a,hr,Yi,zo,Wa,y,null,-0,0)}}break}while(!0);ia(n)}function y0(n,a,o,u,p,y,A,z,H,oe,he,me,le,ce){if(n.timeoutHandle=-1,me=a.subtreeFlags,me&8192||(me&16785408)===16785408){me={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Me},u0(a,y,me);var je=(y&62914560)===y?Au-Ue():(y&4194048)===y?h0-Ue():0;if(je=kx(me,je),je!==null){Oa=y,n.cancelPendingCommit=je(T0.bind(null,n,a,y,o,u,p,A,z,H,he,me,null,le,ce)),ni(n,y,A,!oe);return}}T0(n,a,y,o,u,p,A,z,H)}function YE(n){for(var a=n;;){var o=a.tag;if((o===0||o===11||o===15)&&a.flags&16384&&(o=a.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var u=0;u<o.length;u++){var p=o[u],y=p.getSnapshot;p=p.value;try{if(!lr(y(),p))return!1}catch{return!1}}if(o=a.child,a.subtreeFlags&16384&&o!==null)o.return=a,a=o;else{if(a===n)break;for(;a.sibling===null;){if(a.return===null||a.return===n)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function ni(n,a,o,u){a&=~Id,a&=~Yi,n.suspendedLanes|=a,n.pingedLanes&=~a,u&&(n.warmLanes|=a),u=n.expirationTimes;for(var p=a;0<p;){var y=31-Rt(p),A=1<<y;u[y]=-1,p&=~A}o!==0&&Fn(n,o,a)}function ku(){return(yt&6)===0?(Zs(0),!1):!0}function Fd(){if(tt!==null){if(Et===0)var n=tt.return;else n=tt,ga=Li=null,id(n),Oo=null,js=0,n=tt;for(;n!==null;)Yy(n.alternate,n),n=n.return;tt=null}}function Po(n,a){var o=n.timeoutHandle;o!==-1&&(n.timeoutHandle=-1,px(o)),o=n.cancelPendingCommit,o!==null&&(n.cancelPendingCommit=null,o()),Oa=0,Fd(),At=n,tt=o=pa(n.current,null),at=a,Et=0,dr=null,Wa=!1,No=Kt(n,a),Pd=!1,zo=hr=Id=Yi=Ja=Zt=0,Wn=Ks=null,Ld=!1,(a&8)!==0&&(a|=a&32);var u=n.entangledLanes;if(u!==0)for(n=n.entanglements,u&=a;0<u;){var p=31-Rt(u),y=1<<p;a|=n[p],u&=~y}return Ca=a,Jl(),o}function v0(n,a){Ze=null,K.H=Ls,a===Co||a===su?(a=Ng(),Et=3):a===Kf?(a=Ng(),Et=4):Et=a===wd?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,dr=a,tt===null&&(Zt=1,wu(n,_r(a,n.current)))}function b0(){var n=cr.current;return n===null?!0:(at&4194048)===at?Rr===null:(at&62914560)===at||(at&536870912)!==0?n===Rr:!1}function S0(){var n=K.H;return K.H=Ls,n===null?Ls:n}function w0(){var n=K.A;return K.A=GE,n}function Du(){Zt=4,Wa||(at&4194048)!==at&&cr.current!==null||(No=!0),(Ja&134217727)===0&&(Yi&134217727)===0||At===null||ni(At,at,hr,!1)}function Bd(n,a,o){var u=yt;yt|=2;var p=S0(),y=w0();(At!==n||at!==a)&&(ju=null,Po(n,a)),a=!1;var A=Zt;e:do try{if(Et!==0&&tt!==null){var z=tt,H=dr;switch(Et){case 8:Fd(),A=6;break e;case 3:case 2:case 9:case 6:cr.current===null&&(a=!0);var oe=Et;if(Et=0,dr=null,Io(n,z,H,oe),o&&No){A=0;break e}break;default:oe=Et,Et=0,dr=null,Io(n,z,H,oe)}}ZE(),A=Zt;break}catch(he){v0(n,he)}while(!0);return a&&n.shellSuspendCounter++,ga=Li=null,yt=u,K.H=p,K.A=y,tt===null&&(At=null,at=0,Jl()),A}function ZE(){for(;tt!==null;)E0(tt)}function XE(n,a){var o=yt;yt|=2;var u=S0(),p=w0();At!==n||at!==a?(ju=null,Mu=Ue()+500,Po(n,a)):No=Kt(n,a);e:do try{if(Et!==0&&tt!==null){a=tt;var y=dr;t:switch(Et){case 1:Et=0,dr=null,Io(n,a,y,1);break;case 2:case 9:if(kg(y)){Et=0,dr=null,x0(a);break}a=function(){Et!==2&&Et!==9||At!==n||(Et=7),ia(n)},y.then(a,a);break e;case 3:Et=7;break e;case 4:Et=5;break e;case 7:kg(y)?(Et=0,dr=null,x0(a)):(Et=0,dr=null,Io(n,a,y,7));break;case 5:var A=null;switch(tt.tag){case 26:A=tt.memoizedState;case 5:case 27:var z=tt;if(A?lv(A):z.stateNode.complete){Et=0,dr=null;var H=z.sibling;if(H!==null)tt=H;else{var oe=z.return;oe!==null?(tt=oe,Nu(oe)):tt=null}break t}}Et=0,dr=null,Io(n,a,y,5);break;case 6:Et=0,dr=null,Io(n,a,y,6);break;case 8:Fd(),Zt=6;break e;default:throw Error(i(462))}}QE();break}catch(he){v0(n,he)}while(!0);return ga=Li=null,K.H=u,K.A=p,yt=o,tt!==null?0:(At=null,at=0,Jl(),Zt)}function QE(){for(;tt!==null&&!Je();)E0(tt)}function E0(n){var a=Gy(n.alternate,n,Ca);n.memoizedProps=n.pendingProps,a===null?Nu(n):tt=a}function x0(n){var a=n,o=a.alternate;switch(a.tag){case 15:case 0:a=Uy(o,a,a.pendingProps,a.type,void 0,at);break;case 11:a=Uy(o,a,a.pendingProps,a.type.render,a.ref,at);break;case 5:id(a);default:Yy(o,a),a=tt=wg(a,Ca),a=Gy(o,a,Ca)}n.memoizedProps=n.pendingProps,a===null?Nu(n):tt=a}function Io(n,a,o,u){ga=Li=null,id(a),Oo=null,js=0;var p=a.return;try{if(LE(n,p,a,o,at)){Zt=1,wu(n,_r(o,n.current)),tt=null;return}}catch(y){if(p!==null)throw tt=p,y;Zt=1,wu(n,_r(o,n.current)),tt=null;return}a.flags&32768?(st||u===1?n=!0:No||(at&536870912)!==0?n=!1:(Wa=n=!0,(u===2||u===9||u===3||u===6)&&(u=cr.current,u!==null&&u.tag===13&&(u.flags|=16384))),_0(a,n)):Nu(a)}function Nu(n){var a=n;do{if((a.flags&32768)!==0){_0(a,Wa);return}n=a.return;var o=VE(a.alternate,a,Ca);if(o!==null){tt=o;return}if(a=a.sibling,a!==null){tt=a;return}tt=a=n}while(a!==null);Zt===0&&(Zt=5)}function _0(n,a){do{var o=FE(n.alternate,n);if(o!==null){o.flags&=32767,tt=o;return}if(o=n.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!a&&(n=n.sibling,n!==null)){tt=n;return}tt=n=o}while(n!==null);Zt=6,tt=null}function T0(n,a,o,u,p,y,A,z,H){n.cancelPendingCommit=null;do zu();while(vn!==0);if((yt&6)!==0)throw Error(i(327));if(a!==null){if(a===n.current)throw Error(i(177));if(y=a.lanes|a.childLanes,y|=kf,tn(n,o,y,A,z,H),n===At&&(tt=At=null,at=0),$o=a,ti=n,Oa=o,Ud=y,qd=p,p0=u,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,tx(xe,function(){return M0(),null})):(n.callbackNode=null,n.callbackPriority=0),u=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||u){u=K.T,K.T=null,p=B.p,B.p=2,A=yt,yt|=4;try{BE(n,a,o)}finally{yt=A,B.p=p,K.T=u}}vn=1,C0(),O0(),R0()}}function C0(){if(vn===1){vn=0;var n=ti,a=$o,o=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||o){o=K.T,K.T=null;var u=B.p;B.p=2;var p=yt;yt|=4;try{o0(a,n);var y=nh,A=dg(n.containerInfo),z=y.focusedElem,H=y.selectionRange;if(A!==z&&z&&z.ownerDocument&&fg(z.ownerDocument.documentElement,z)){if(H!==null&&Of(z)){var oe=H.start,he=H.end;if(he===void 0&&(he=oe),"selectionStart"in z)z.selectionStart=oe,z.selectionEnd=Math.min(he,z.value.length);else{var me=z.ownerDocument||document,le=me&&me.defaultView||window;if(le.getSelection){var ce=le.getSelection(),je=z.textContent.length,qe=Math.min(H.start,je),Ot=H.end===void 0?qe:Math.min(H.end,je);!ce.extend&&qe>Ot&&(A=Ot,Ot=qe,qe=A);var J=cg(z,qe),Q=cg(z,Ot);if(J&&Q&&(ce.rangeCount!==1||ce.anchorNode!==J.node||ce.anchorOffset!==J.offset||ce.focusNode!==Q.node||ce.focusOffset!==Q.offset)){var ie=me.createRange();ie.setStart(J.node,J.offset),ce.removeAllRanges(),qe>Ot?(ce.addRange(ie),ce.extend(Q.node,Q.offset)):(ie.setEnd(Q.node,Q.offset),ce.addRange(ie))}}}}for(me=[],ce=z;ce=ce.parentNode;)ce.nodeType===1&&me.push({element:ce,left:ce.scrollLeft,top:ce.scrollTop});for(typeof z.focus=="function"&&z.focus(),z=0;z<me.length;z++){var pe=me[z];pe.element.scrollLeft=pe.left,pe.element.scrollTop=pe.top}}Ku=!!th,nh=th=null}finally{yt=p,B.p=u,K.T=o}}n.current=a,vn=2}}function O0(){if(vn===2){vn=0;var n=ti,a=$o,o=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||o){o=K.T,K.T=null;var u=B.p;B.p=2;var p=yt;yt|=4;try{t0(n,a.alternate,a)}finally{yt=p,B.p=u,K.T=o}}vn=3}}function R0(){if(vn===4||vn===3){vn=0,ke();var n=ti,a=$o,o=Oa,u=p0;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?vn=5:(vn=0,$o=ti=null,A0(n,n.pendingLanes));var p=n.pendingLanes;if(p===0&&(ei=null),Vr(o),a=a.stateNode,wt&&typeof wt.onCommitFiberRoot=="function")try{wt.onCommitFiberRoot(Vt,a,void 0,(a.current.flags&128)===128)}catch{}if(u!==null){a=K.T,p=B.p,B.p=2,K.T=null;try{for(var y=n.onRecoverableError,A=0;A<u.length;A++){var z=u[A];y(z.value,{componentStack:z.stack})}}finally{K.T=a,B.p=p}}(Oa&3)!==0&&zu(),ia(n),p=n.pendingLanes,(o&261930)!==0&&(p&42)!==0?n===Vd?Ys++:(Ys=0,Vd=n):Ys=0,Zs(0)}}function A0(n,a){(n.pooledCacheLanes&=a)===0&&(a=n.pooledCache,a!=null&&(n.pooledCache=null,As(a)))}function zu(){return C0(),O0(),R0(),M0()}function M0(){if(vn!==5)return!1;var n=ti,a=Ud;Ud=0;var o=Vr(Oa),u=K.T,p=B.p;try{B.p=32>o?32:o,K.T=null,o=qd,qd=null;var y=ti,A=Oa;if(vn=0,$o=ti=null,Oa=0,(yt&6)!==0)throw Error(i(331));var z=yt;if(yt|=4,f0(y.current),l0(y,y.current,A,o),yt=z,Zs(0,!1),wt&&typeof wt.onPostCommitFiberRoot=="function")try{wt.onPostCommitFiberRoot(Vt,y)}catch{}return!0}finally{B.p=p,K.T=u,A0(n,a)}}function j0(n,a,o){a=_r(o,a),a=Sd(n.stateNode,a,2),n=Ya(n,a,2),n!==null&&(ft(n,2),ia(n))}function xt(n,a,o){if(n.tag===3)j0(n,n,o);else for(;a!==null;){if(a.tag===3){j0(a,n,o);break}else if(a.tag===1){var u=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(ei===null||!ei.has(u))){n=_r(o,n),o=ky(2),u=Ya(a,o,2),u!==null&&(Dy(o,u,a,n),ft(u,2),ia(u));break}}a=a.return}}function Hd(n,a,o){var u=n.pingCache;if(u===null){u=n.pingCache=new KE;var p=new Set;u.set(a,p)}else p=u.get(a),p===void 0&&(p=new Set,u.set(a,p));p.has(o)||(Pd=!0,p.add(o),n=WE.bind(null,n,a,o),a.then(n,n))}function WE(n,a,o){var u=n.pingCache;u!==null&&u.delete(a),n.pingedLanes|=n.suspendedLanes&o,n.warmLanes&=~o,At===n&&(at&o)===o&&(Zt===4||Zt===3&&(at&62914560)===at&&300>Ue()-Au?(yt&2)===0&&Po(n,0):Id|=o,zo===at&&(zo=0)),ia(n)}function k0(n,a){a===0&&(a=wr()),n=$i(n,a),n!==null&&(ft(n,a),ia(n))}function JE(n){var a=n.memoizedState,o=0;a!==null&&(o=a.retryLane),k0(n,o)}function ex(n,a){var o=0;switch(n.tag){case 31:case 13:var u=n.stateNode,p=n.memoizedState;p!==null&&(o=p.retryLane);break;case 19:u=n.stateNode;break;case 22:u=n.stateNode._retryCache;break;default:throw Error(i(314))}u!==null&&u.delete(a),k0(n,o)}function tx(n,a){return Be(n,a)}var $u=null,Lo=null,Gd=!1,Pu=!1,Kd=!1,ri=0;function ia(n){n!==Lo&&n.next===null&&(Lo===null?$u=Lo=n:Lo=Lo.next=n),Pu=!0,Gd||(Gd=!0,rx())}function Zs(n,a){if(!Kd&&Pu){Kd=!0;do for(var o=!1,u=$u;u!==null;){if(n!==0){var p=u.pendingLanes;if(p===0)var y=0;else{var A=u.suspendedLanes,z=u.pingedLanes;y=(1<<31-Rt(42|n)+1)-1,y&=p&~(A&~z),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(o=!0,$0(u,y))}else y=at,y=xn(u,u===At?y:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(y&3)===0||Kt(u,y)||(o=!0,$0(u,y));u=u.next}while(o);Kd=!1}}function nx(){D0()}function D0(){Pu=Gd=!1;var n=0;ri!==0&&hx()&&(n=ri);for(var a=Ue(),o=null,u=$u;u!==null;){var p=u.next,y=N0(u,a);y===0?(u.next=null,o===null?$u=p:o.next=p,p===null&&(Lo=o)):(o=u,(n!==0||(y&3)!==0)&&(Pu=!0)),u=p}vn!==0&&vn!==5||Zs(n),ri!==0&&(ri=0)}function N0(n,a){for(var o=n.suspendedLanes,u=n.pingedLanes,p=n.expirationTimes,y=n.pendingLanes&-62914561;0<y;){var A=31-Rt(y),z=1<<A,H=p[A];H===-1?((z&o)===0||(z&u)!==0)&&(p[A]=sr(z,a)):H<=a&&(n.expiredLanes|=z),y&=~z}if(a=At,o=at,o=xn(n,n===a?o:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u=n.callbackNode,o===0||n===a&&(Et===2||Et===9)||n.cancelPendingCommit!==null)return u!==null&&u!==null&&Fe(u),n.callbackNode=null,n.callbackPriority=0;if((o&3)===0||Kt(n,o)){if(a=o&-o,a===n.callbackPriority)return a;switch(u!==null&&Fe(u),Vr(o)){case 2:case 8:o=Ae;break;case 32:o=xe;break;case 268435456:o=Ke;break;default:o=xe}return u=z0.bind(null,n),o=Be(o,u),n.callbackPriority=a,n.callbackNode=o,a}return u!==null&&u!==null&&Fe(u),n.callbackPriority=2,n.callbackNode=null,2}function z0(n,a){if(vn!==0&&vn!==5)return n.callbackNode=null,n.callbackPriority=0,null;var o=n.callbackNode;if(zu()&&n.callbackNode!==o)return null;var u=at;return u=xn(n,n===At?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u===0?null:(g0(n,u,a),N0(n,Ue()),n.callbackNode!=null&&n.callbackNode===o?z0.bind(null,n):null)}function $0(n,a){if(zu())return null;g0(n,a,!0)}function rx(){mx(function(){(yt&6)!==0?Be(Mt,nx):D0()})}function Yd(){if(ri===0){var n=_o;n===0&&(n=Tn,Tn<<=1,(Tn&261888)===0&&(Tn=256)),ri=n}return ri}function P0(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:ye(""+n)}function I0(n,a){var o=a.ownerDocument.createElement("input");return o.name=a.name,o.value=a.value,n.id&&o.setAttribute("form",n.id),a.parentNode.insertBefore(o,a),n=new FormData(n),o.parentNode.removeChild(o),n}function ax(n,a,o,u,p){if(a==="submit"&&o&&o.stateNode===p){var y=P0((p[sn]||null).action),A=u.submitter;A&&(a=(a=A[sn]||null)?P0(a.formAction):A.getAttribute("formAction"),a!==null&&(y=a,A=null));var z=new ki("action","action",null,u,p);n.push({event:z,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(ri!==0){var H=A?I0(p,A):new FormData(p);pd(o,{pending:!0,data:H,method:p.method,action:y},null,H)}}else typeof y=="function"&&(z.preventDefault(),H=A?I0(p,A):new FormData(p),pd(o,{pending:!0,data:H,method:p.method,action:y},y,H))},currentTarget:p}]})}}for(var Zd=0;Zd<jf.length;Zd++){var Xd=jf[Zd],ix=Xd.toLowerCase(),ox=Xd[0].toUpperCase()+Xd.slice(1);Fr(ix,"on"+ox)}Fr(mg,"onAnimationEnd"),Fr(gg,"onAnimationIteration"),Fr(yg,"onAnimationStart"),Fr("dblclick","onDoubleClick"),Fr("focusin","onFocus"),Fr("focusout","onBlur"),Fr(EE,"onTransitionRun"),Fr(xE,"onTransitionStart"),Fr(_E,"onTransitionCancel"),Fr(vg,"onTransitionEnd"),wi("onMouseEnter",["mouseout","mouseover"]),wi("onMouseLeave",["mouseout","mouseover"]),wi("onPointerEnter",["pointerout","pointerover"]),wi("onPointerLeave",["pointerout","pointerover"]),qa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),qa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),qa("onBeforeInput",["compositionend","keypress","textInput","paste"]),qa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),qa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),qa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Xs="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(" "),sx=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Xs));function L0(n,a){a=(a&4)!==0;for(var o=0;o<n.length;o++){var u=n[o],p=u.event;u=u.listeners;e:{var y=void 0;if(a)for(var A=u.length-1;0<=A;A--){var z=u[A],H=z.instance,oe=z.currentTarget;if(z=z.listener,H!==y&&p.isPropagationStopped())break e;y=z,p.currentTarget=oe;try{y(p)}catch(he){Wl(he)}p.currentTarget=null,y=H}else for(A=0;A<u.length;A++){if(z=u[A],H=z.instance,oe=z.currentTarget,z=z.listener,H!==y&&p.isPropagationStopped())break e;y=z,p.currentTarget=oe;try{y(p)}catch(he){Wl(he)}p.currentTarget=null,y=H}}}}function nt(n,a){var o=a[Ua];o===void 0&&(o=a[Ua]=new Set);var u=n+"__bubble";o.has(u)||(U0(a,n,2,!1),o.add(u))}function Qd(n,a,o){var u=0;a&&(u|=4),U0(o,n,u,a)}var Iu="_reactListening"+Math.random().toString(36).slice(2);function Wd(n){if(!n[Iu]){n[Iu]=!0,Sc.forEach(function(o){o!=="selectionchange"&&(sx.has(o)||Qd(o,!1,n),Qd(o,!0,n))});var a=n.nodeType===9?n:n.ownerDocument;a===null||a[Iu]||(a[Iu]=!0,Qd("selectionchange",!1,a))}}function U0(n,a,o,u){switch(mv(a)){case 2:var p=zx;break;case 8:p=$x;break;default:p=hh}o=p.bind(null,a,o,n),p=void 0,!Er||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(p=!0),u?p!==void 0?n.addEventListener(a,o,{capture:!0,passive:p}):n.addEventListener(a,o,!0):p!==void 0?n.addEventListener(a,o,{passive:p}):n.addEventListener(a,o,!1)}function Jd(n,a,o,u,p){var y=u;if((a&1)===0&&(a&2)===0&&u!==null)e:for(;;){if(u===null)return;var A=u.tag;if(A===3||A===4){var z=u.stateNode.containerInfo;if(z===p)break;if(A===4)for(A=u.return;A!==null;){var H=A.tag;if((H===3||H===4)&&A.stateNode.containerInfo===p)return;A=A.return}for(;z!==null;){if(A=Oi(z),A===null)return;if(H=A.tag,H===5||H===6||H===26||H===27){u=y=A;continue e}z=z.parentNode}}u=u.return}hn(function(){var oe=y,he=Ye(o),me=[];e:{var le=bg.get(n);if(le!==void 0){var ce=ki,je=n;switch(n){case"keypress":if(Ei(o)===0)break e;case"keydown":case"keyup":ce=eE;break;case"focusin":je="focus",ce=Ef;break;case"focusout":je="blur",ce=Ef;break;case"beforeblur":case"afterblur":ce=Ef;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ce=Ym;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ce=V2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ce=rE;break;case mg:case gg:case yg:ce=H2;break;case vg:ce=iE;break;case"scroll":case"scrollend":ce=wf;break;case"wheel":ce=sE;break;case"copy":case"cut":case"paste":ce=K2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ce=Xm;break;case"toggle":case"beforetoggle":ce=uE}var qe=(a&4)!==0,Ot=!qe&&(n==="scroll"||n==="scrollend"),J=qe?le!==null?le+"Capture":null:le;qe=[];for(var Q=oe,ie;Q!==null;){var pe=Q;if(ie=pe.stateNode,pe=pe.tag,pe!==5&&pe!==26&&pe!==27||ie===null||J===null||(pe=bt(Q,J),pe!=null&&qe.push(Qs(Q,pe,ie))),Ot)break;Q=Q.return}0<qe.length&&(le=new ce(le,je,null,o,he),me.push({event:le,listeners:qe}))}}if((a&7)===0){e:{if(le=n==="mouseover"||n==="pointerover",ce=n==="mouseout"||n==="pointerout",le&&o!==Ie&&(je=o.relatedTarget||o.fromElement)&&(Oi(je)||je[Ir]))break e;if((ce||le)&&(le=he.window===he?he:(le=he.ownerDocument)?le.defaultView||le.parentWindow:window,ce?(je=o.relatedTarget||o.toElement,ce=oe,je=je?Oi(je):null,je!==null&&(Ot=l(je),qe=je.tag,je!==Ot||qe!==5&&qe!==27&&qe!==6)&&(je=null)):(ce=null,je=oe),ce!==je)){if(qe=Ym,pe="onMouseLeave",J="onMouseEnter",Q="mouse",(n==="pointerout"||n==="pointerover")&&(qe=Xm,pe="onPointerLeave",J="onPointerEnter",Q="pointer"),Ot=ce==null?le:ho(ce),ie=je==null?le:ho(je),le=new qe(pe,Q+"leave",ce,o,he),le.target=Ot,le.relatedTarget=ie,pe=null,Oi(he)===oe&&(qe=new qe(J,Q+"enter",je,o,he),qe.target=ie,qe.relatedTarget=Ot,pe=qe),Ot=pe,ce&&je)t:{for(qe=lx,J=ce,Q=je,ie=0,pe=J;pe;pe=qe(pe))ie++;pe=0;for(var Le=Q;Le;Le=qe(Le))pe++;for(;0<ie-pe;)J=qe(J),ie--;for(;0<pe-ie;)Q=qe(Q),pe--;for(;ie--;){if(J===Q||Q!==null&&J===Q.alternate){qe=J;break t}J=qe(J),Q=qe(Q)}qe=null}else qe=null;ce!==null&&q0(me,le,ce,qe,!1),je!==null&&Ot!==null&&q0(me,Ot,je,qe,!0)}}e:{if(le=oe?ho(oe):window,ce=le.nodeName&&le.nodeName.toLowerCase(),ce==="select"||ce==="input"&&le.type==="file")var dt=ag;else if(ng(le))if(ig)dt=bE;else{dt=yE;var ze=gE}else ce=le.nodeName,!ce||ce.toLowerCase()!=="input"||le.type!=="checkbox"&&le.type!=="radio"?oe&&ge(oe.elementType)&&(dt=ag):dt=vE;if(dt&&(dt=dt(n,oe))){rg(me,dt,o,he);break e}ze&&ze(n,le,oe),n==="focusout"&&oe&&le.type==="number"&&oe.memoizedProps.value!=null&&Yl(le,"number",le.value)}switch(ze=oe?ho(oe):window,n){case"focusin":(ng(ze)||ze.contentEditable==="true")&&(go=ze,Rf=oe,Cs=null);break;case"focusout":Cs=Rf=go=null;break;case"mousedown":Af=!0;break;case"contextmenu":case"mouseup":case"dragend":Af=!1,hg(me,o,he);break;case"selectionchange":if(wE)break;case"keydown":case"keyup":hg(me,o,he)}var Qe;if(_f)e:{switch(n){case"compositionstart":var it="onCompositionStart";break e;case"compositionend":it="onCompositionEnd";break e;case"compositionupdate":it="onCompositionUpdate";break e}it=void 0}else mo?eg(n,o)&&(it="onCompositionEnd"):n==="keydown"&&o.keyCode===229&&(it="onCompositionStart");it&&(Qm&&o.locale!=="ko"&&(mo||it!=="onCompositionStart"?it==="onCompositionEnd"&&mo&&(Qe=rs()):(ar=he,Jr="value"in ar?ar.value:ar.textContent,mo=!0)),ze=Lu(oe,it),0<ze.length&&(it=new Zm(it,n,null,o,he),me.push({event:it,listeners:ze}),Qe?it.data=Qe:(Qe=tg(o),Qe!==null&&(it.data=Qe)))),(Qe=fE?dE(n,o):hE(n,o))&&(it=Lu(oe,"onBeforeInput"),0<it.length&&(ze=new Zm("onBeforeInput","beforeinput",null,o,he),me.push({event:ze,listeners:it}),ze.data=Qe)),ax(me,n,oe,o,he)}L0(me,a)})}function Qs(n,a,o){return{instance:n,listener:a,currentTarget:o}}function Lu(n,a){for(var o=a+"Capture",u=[];n!==null;){var p=n,y=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||y===null||(p=bt(n,o),p!=null&&u.unshift(Qs(n,p,y)),p=bt(n,a),p!=null&&u.push(Qs(n,p,y))),n.tag===3)return u;n=n.return}return[]}function lx(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function q0(n,a,o,u,p){for(var y=a._reactName,A=[];o!==null&&o!==u;){var z=o,H=z.alternate,oe=z.stateNode;if(z=z.tag,H!==null&&H===u)break;z!==5&&z!==26&&z!==27||oe===null||(H=oe,p?(oe=bt(o,y),oe!=null&&A.unshift(Qs(o,oe,H))):p||(oe=bt(o,y),oe!=null&&A.push(Qs(o,oe,H)))),o=o.return}A.length!==0&&n.push({event:a,listeners:A})}var ux=/\r\n?/g,cx=/\u0000|\uFFFD/g;function V0(n){return(typeof n=="string"?n:""+n).replace(ux,`
160
+ `).replace(cx,"")}function F0(n,a){return a=V0(a),V0(n)===a}function Ct(n,a,o,u,p,y){switch(o){case"children":typeof u=="string"?a==="body"||a==="textarea"&&u===""||ne(n,u):(typeof u=="number"||typeof u=="bigint")&&a!=="body"&&ne(n,""+u);break;case"className":ns(n,"class",u);break;case"tabIndex":ns(n,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":ns(n,o,u);break;case"style":W(n,u,y);break;case"data":if(a!=="object"){ns(n,"data",u);break}case"src":case"href":if(u===""&&(a!=="a"||o!=="href")){n.removeAttribute(o);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(o);break}u=ye(""+u),n.setAttribute(o,u);break;case"action":case"formAction":if(typeof u=="function"){n.setAttribute(o,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof y=="function"&&(o==="formAction"?(a!=="input"&&Ct(n,a,"name",p.name,p,null),Ct(n,a,"formEncType",p.formEncType,p,null),Ct(n,a,"formMethod",p.formMethod,p,null),Ct(n,a,"formTarget",p.formTarget,p,null)):(Ct(n,a,"encType",p.encType,p,null),Ct(n,a,"method",p.method,p,null),Ct(n,a,"target",p.target,p,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(o);break}u=ye(""+u),n.setAttribute(o,u);break;case"onClick":u!=null&&(n.onclick=Me);break;case"onScroll":u!=null&&nt("scroll",n);break;case"onScrollEnd":u!=null&&nt("scrollend",n);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(i(61));if(o=u.__html,o!=null){if(p.children!=null)throw Error(i(60));n.innerHTML=o}}break;case"multiple":n.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":n.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){n.removeAttribute("xlink:href");break}o=ye(""+u),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(o,""+u):n.removeAttribute(o);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":u&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(o,""):n.removeAttribute(o);break;case"capture":case"download":u===!0?n.setAttribute(o,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(o,u):n.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?n.setAttribute(o,u):n.removeAttribute(o);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?n.removeAttribute(o):n.setAttribute(o,u);break;case"popover":nt("beforetoggle",n),nt("toggle",n),Ss(n,"popover",u);break;case"xlinkActuate":Wr(n,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Wr(n,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Wr(n,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Wr(n,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Wr(n,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Wr(n,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Wr(n,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Wr(n,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Wr(n,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":Ss(n,"is",u);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=Re.get(o)||o,Ss(n,o,u))}}function eh(n,a,o,u,p,y){switch(o){case"style":W(n,u,y);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(i(61));if(o=u.__html,o!=null){if(p.children!=null)throw Error(i(60));n.innerHTML=o}}break;case"children":typeof u=="string"?ne(n,u):(typeof u=="number"||typeof u=="bigint")&&ne(n,""+u);break;case"onScroll":u!=null&&nt("scroll",n);break;case"onScrollEnd":u!=null&&nt("scrollend",n);break;case"onClick":u!=null&&(n.onclick=Me);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Hl.hasOwnProperty(o))e:{if(o[0]==="o"&&o[1]==="n"&&(p=o.endsWith("Capture"),a=o.slice(2,p?o.length-7:void 0),y=n[sn]||null,y=y!=null?y[o]:null,typeof y=="function"&&n.removeEventListener(a,y,p),typeof u=="function")){typeof y!="function"&&y!==null&&(o in n?n[o]=null:n.hasAttribute(o)&&n.removeAttribute(o)),n.addEventListener(a,u,p);break e}o in n?n[o]=u:u===!0?n.setAttribute(o,""):Ss(n,o,u)}}}function Nn(n,a,o){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":nt("error",n),nt("load",n);var u=!1,p=!1,y;for(y in o)if(o.hasOwnProperty(y)){var A=o[y];if(A!=null)switch(y){case"src":u=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:Ct(n,a,y,A,o,null)}}p&&Ct(n,a,"srcSet",o.srcSet,o,null),u&&Ct(n,a,"src",o.src,o,null);return;case"input":nt("invalid",n);var z=y=A=p=null,H=null,oe=null;for(u in o)if(o.hasOwnProperty(u)){var he=o[u];if(he!=null)switch(u){case"name":p=he;break;case"type":A=he;break;case"checked":H=he;break;case"defaultChecked":oe=he;break;case"value":y=he;break;case"defaultValue":z=he;break;case"children":case"dangerouslySetInnerHTML":if(he!=null)throw Error(i(137,a));break;default:Ct(n,a,u,he,o,null)}}bf(n,y,z,H,oe,A,p,!1);return;case"select":nt("invalid",n),u=A=y=null;for(p in o)if(o.hasOwnProperty(p)&&(z=o[p],z!=null))switch(p){case"value":y=z;break;case"defaultValue":A=z;break;case"multiple":u=z;default:Ct(n,a,p,z,o,null)}a=y,o=A,n.multiple=!!u,a!=null?Mi(n,!!u,a,!1):o!=null&&Mi(n,!!u,o,!0);return;case"textarea":nt("invalid",n),y=p=u=null;for(A in o)if(o.hasOwnProperty(A)&&(z=o[A],z!=null))switch(A){case"value":u=z;break;case"defaultValue":p=z;break;case"children":y=z;break;case"dangerouslySetInnerHTML":if(z!=null)throw Error(i(91));break;default:Ct(n,a,A,z,o,null)}Sf(n,u,p,y);return;case"option":for(H in o)o.hasOwnProperty(H)&&(u=o[H],u!=null)&&(H==="selected"?n.selected=u&&typeof u!="function"&&typeof u!="symbol":Ct(n,a,H,u,o,null));return;case"dialog":nt("beforetoggle",n),nt("toggle",n),nt("cancel",n),nt("close",n);break;case"iframe":case"object":nt("load",n);break;case"video":case"audio":for(u=0;u<Xs.length;u++)nt(Xs[u],n);break;case"image":nt("error",n),nt("load",n);break;case"details":nt("toggle",n);break;case"embed":case"source":case"link":nt("error",n),nt("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(oe in o)if(o.hasOwnProperty(oe)&&(u=o[oe],u!=null))switch(oe){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:Ct(n,a,oe,u,o,null)}return;default:if(ge(a)){for(he in o)o.hasOwnProperty(he)&&(u=o[he],u!==void 0&&eh(n,a,he,u,o,void 0));return}}for(z in o)o.hasOwnProperty(z)&&(u=o[z],u!=null&&Ct(n,a,z,u,o,null))}function fx(n,a,o,u){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,y=null,A=null,z=null,H=null,oe=null,he=null;for(ce in o){var me=o[ce];if(o.hasOwnProperty(ce)&&me!=null)switch(ce){case"checked":break;case"value":break;case"defaultValue":H=me;default:u.hasOwnProperty(ce)||Ct(n,a,ce,null,u,me)}}for(var le in u){var ce=u[le];if(me=o[le],u.hasOwnProperty(le)&&(ce!=null||me!=null))switch(le){case"type":y=ce;break;case"name":p=ce;break;case"checked":oe=ce;break;case"defaultChecked":he=ce;break;case"value":A=ce;break;case"defaultValue":z=ce;break;case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(i(137,a));break;default:ce!==me&&Ct(n,a,le,ce,u,me)}}Kl(n,A,z,H,oe,he,y,p);return;case"select":ce=A=z=le=null;for(y in o)if(H=o[y],o.hasOwnProperty(y)&&H!=null)switch(y){case"value":break;case"multiple":ce=H;default:u.hasOwnProperty(y)||Ct(n,a,y,null,u,H)}for(p in u)if(y=u[p],H=o[p],u.hasOwnProperty(p)&&(y!=null||H!=null))switch(p){case"value":le=y;break;case"defaultValue":z=y;break;case"multiple":A=y;default:y!==H&&Ct(n,a,p,y,u,H)}a=z,o=A,u=ce,le!=null?Mi(n,!!o,le,!1):!!u!=!!o&&(a!=null?Mi(n,!!o,a,!0):Mi(n,!!o,o?[]:"",!1));return;case"textarea":ce=le=null;for(z in o)if(p=o[z],o.hasOwnProperty(z)&&p!=null&&!u.hasOwnProperty(z))switch(z){case"value":break;case"children":break;default:Ct(n,a,z,null,u,p)}for(A in u)if(p=u[A],y=o[A],u.hasOwnProperty(A)&&(p!=null||y!=null))switch(A){case"value":le=p;break;case"defaultValue":ce=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(i(91));break;default:p!==y&&Ct(n,a,A,p,u,y)}yl(n,le,ce);return;case"option":for(var je in o)le=o[je],o.hasOwnProperty(je)&&le!=null&&!u.hasOwnProperty(je)&&(je==="selected"?n.selected=!1:Ct(n,a,je,null,u,le));for(H in u)le=u[H],ce=o[H],u.hasOwnProperty(H)&&le!==ce&&(le!=null||ce!=null)&&(H==="selected"?n.selected=le&&typeof le!="function"&&typeof le!="symbol":Ct(n,a,H,le,u,ce));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 qe in o)le=o[qe],o.hasOwnProperty(qe)&&le!=null&&!u.hasOwnProperty(qe)&&Ct(n,a,qe,null,u,le);for(oe in u)if(le=u[oe],ce=o[oe],u.hasOwnProperty(oe)&&le!==ce&&(le!=null||ce!=null))switch(oe){case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(i(137,a));break;default:Ct(n,a,oe,le,u,ce)}return;default:if(ge(a)){for(var Ot in o)le=o[Ot],o.hasOwnProperty(Ot)&&le!==void 0&&!u.hasOwnProperty(Ot)&&eh(n,a,Ot,void 0,u,le);for(he in u)le=u[he],ce=o[he],!u.hasOwnProperty(he)||le===ce||le===void 0&&ce===void 0||eh(n,a,he,le,u,ce);return}}for(var J in o)le=o[J],o.hasOwnProperty(J)&&le!=null&&!u.hasOwnProperty(J)&&Ct(n,a,J,null,u,le);for(me in u)le=u[me],ce=o[me],!u.hasOwnProperty(me)||le===ce||le==null&&ce==null||Ct(n,a,me,le,u,ce)}function B0(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function dx(){if(typeof performance.getEntriesByType=="function"){for(var n=0,a=0,o=performance.getEntriesByType("resource"),u=0;u<o.length;u++){var p=o[u],y=p.transferSize,A=p.initiatorType,z=p.duration;if(y&&z&&B0(A)){for(A=0,z=p.responseEnd,u+=1;u<o.length;u++){var H=o[u],oe=H.startTime;if(oe>z)break;var he=H.transferSize,me=H.initiatorType;he&&B0(me)&&(H=H.responseEnd,A+=he*(H<z?1:(z-oe)/(H-oe)))}if(--u,a+=8*(y+A)/(p.duration/1e3),n++,10<n)break}}if(0<n)return a/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var th=null,nh=null;function Uu(n){return n.nodeType===9?n:n.ownerDocument}function H0(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function G0(n,a){if(n===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&a==="foreignObject"?0:n}function rh(n,a){return n==="textarea"||n==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var ah=null;function hx(){var n=window.event;return n&&n.type==="popstate"?n===ah?!1:(ah=n,!0):(ah=null,!1)}var K0=typeof setTimeout=="function"?setTimeout:void 0,px=typeof clearTimeout=="function"?clearTimeout:void 0,Y0=typeof Promise=="function"?Promise:void 0,mx=typeof queueMicrotask=="function"?queueMicrotask:typeof Y0<"u"?function(n){return Y0.resolve(null).then(n).catch(gx)}:K0;function gx(n){setTimeout(function(){throw n})}function ai(n){return n==="head"}function Z0(n,a){var o=a,u=0;do{var p=o.nextSibling;if(n.removeChild(o),p&&p.nodeType===8)if(o=p.data,o==="/$"||o==="/&"){if(u===0){n.removeChild(p),Fo(a);return}u--}else if(o==="$"||o==="$?"||o==="$~"||o==="$!"||o==="&")u++;else if(o==="html")Ws(n.ownerDocument.documentElement);else if(o==="head"){o=n.ownerDocument.head,Ws(o);for(var y=o.firstChild;y;){var A=y.nextSibling,z=y.nodeName;y[fo]||z==="SCRIPT"||z==="STYLE"||z==="LINK"&&y.rel.toLowerCase()==="stylesheet"||o.removeChild(y),y=A}}else o==="body"&&Ws(n.ownerDocument.body);o=p}while(o);Fo(a)}function X0(n,a){var o=n;n=0;do{var u=o.nextSibling;if(o.nodeType===1?a?(o._stashedDisplay=o.style.display,o.style.display="none"):(o.style.display=o._stashedDisplay||"",o.getAttribute("style")===""&&o.removeAttribute("style")):o.nodeType===3&&(a?(o._stashedText=o.nodeValue,o.nodeValue=""):o.nodeValue=o._stashedText||""),u&&u.nodeType===8)if(o=u.data,o==="/$"){if(n===0)break;n--}else o!=="$"&&o!=="$?"&&o!=="$~"&&o!=="$!"||n++;o=u}while(o)}function ih(n){var a=n.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var o=a;switch(a=a.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":ih(o),Bl(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}n.removeChild(o)}}function yx(n,a,o,u){for(;n.nodeType===1;){var p=o;if(n.nodeName.toLowerCase()!==a.toLowerCase()){if(!u&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(u){if(!n[fo])switch(a){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(y=n.getAttribute("rel"),y==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(y!==p.rel||n.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||n.getAttribute("title")!==(p.title==null?null:p.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(y=n.getAttribute("src"),(y!==(p.src==null?null:p.src)||n.getAttribute("type")!==(p.type==null?null:p.type)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&y&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(a==="input"&&n.type==="hidden"){var y=p.name==null?null:""+p.name;if(p.type==="hidden"&&n.getAttribute("name")===y)return n}else return n;if(n=Ar(n.nextSibling),n===null)break}return null}function vx(n,a,o){if(a==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!o||(n=Ar(n.nextSibling),n===null))return null;return n}function Q0(n,a){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!a||(n=Ar(n.nextSibling),n===null))return null;return n}function oh(n){return n.data==="$?"||n.data==="$~"}function sh(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function bx(n,a){var o=n.ownerDocument;if(n.data==="$~")n._reactRetry=a;else if(n.data!=="$?"||o.readyState!=="loading")a();else{var u=function(){a(),o.removeEventListener("DOMContentLoaded",u)};o.addEventListener("DOMContentLoaded",u),n._reactRetry=u}}function Ar(n){for(;n!=null;n=n.nextSibling){var a=n.nodeType;if(a===1||a===3)break;if(a===8){if(a=n.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return n}var lh=null;function W0(n){n=n.nextSibling;for(var a=0;n;){if(n.nodeType===8){var o=n.data;if(o==="/$"||o==="/&"){if(a===0)return Ar(n.nextSibling);a--}else o!=="$"&&o!=="$!"&&o!=="$?"&&o!=="$~"&&o!=="&"||a++}n=n.nextSibling}return null}function J0(n){n=n.previousSibling;for(var a=0;n;){if(n.nodeType===8){var o=n.data;if(o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"){if(a===0)return n;a--}else o!=="/$"&&o!=="/&"||a++}n=n.previousSibling}return null}function ev(n,a,o){switch(a=Uu(o),n){case"html":if(n=a.documentElement,!n)throw Error(i(452));return n;case"head":if(n=a.head,!n)throw Error(i(453));return n;case"body":if(n=a.body,!n)throw Error(i(454));return n;default:throw Error(i(451))}}function Ws(n){for(var a=n.attributes;a.length;)n.removeAttributeNode(a[0]);Bl(n)}var Mr=new Map,tv=new Set;function qu(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var Ra=B.d;B.d={f:Sx,r:wx,D:Ex,C:xx,L:_x,m:Tx,X:Ox,S:Cx,M:Rx};function Sx(){var n=Ra.f(),a=ku();return n||a}function wx(n){var a=Ri(n);a!==null&&a.tag===5&&a.type==="form"?vy(a):Ra.r(n)}var Uo=typeof document>"u"?null:document;function nv(n,a,o){var u=Uo;if(u&&typeof a=="string"&&a){var p=Bn(a);p='link[rel="'+n+'"][href="'+p+'"]',typeof o=="string"&&(p+='[crossorigin="'+o+'"]'),tv.has(p)||(tv.add(p),n={rel:n,crossOrigin:o,href:a},u.querySelector(p)===null&&(a=u.createElement("link"),Nn(a,"link",n),yn(a),u.head.appendChild(a)))}}function Ex(n){Ra.D(n),nv("dns-prefetch",n,null)}function xx(n,a){Ra.C(n,a),nv("preconnect",n,a)}function _x(n,a,o){Ra.L(n,a,o);var u=Uo;if(u&&n&&a){var p='link[rel="preload"][as="'+Bn(a)+'"]';a==="image"&&o&&o.imageSrcSet?(p+='[imagesrcset="'+Bn(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(p+='[imagesizes="'+Bn(o.imageSizes)+'"]')):p+='[href="'+Bn(n)+'"]';var y=p;switch(a){case"style":y=qo(n);break;case"script":y=Vo(n)}Mr.has(y)||(n=g({rel:"preload",href:a==="image"&&o&&o.imageSrcSet?void 0:n,as:a},o),Mr.set(y,n),u.querySelector(p)!==null||a==="style"&&u.querySelector(Js(y))||a==="script"&&u.querySelector(el(y))||(a=u.createElement("link"),Nn(a,"link",n),yn(a),u.head.appendChild(a)))}}function Tx(n,a){Ra.m(n,a);var o=Uo;if(o&&n){var u=a&&typeof a.as=="string"?a.as:"script",p='link[rel="modulepreload"][as="'+Bn(u)+'"][href="'+Bn(n)+'"]',y=p;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":y=Vo(n)}if(!Mr.has(y)&&(n=g({rel:"modulepreload",href:n},a),Mr.set(y,n),o.querySelector(p)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(el(y)))return}u=o.createElement("link"),Nn(u,"link",n),yn(u),o.head.appendChild(u)}}}function Cx(n,a,o){Ra.S(n,a,o);var u=Uo;if(u&&n){var p=Ai(u).hoistableStyles,y=qo(n);a=a||"default";var A=p.get(y);if(!A){var z={loading:0,preload:null};if(A=u.querySelector(Js(y)))z.loading=5;else{n=g({rel:"stylesheet",href:n,"data-precedence":a},o),(o=Mr.get(y))&&uh(n,o);var H=A=u.createElement("link");yn(H),Nn(H,"link",n),H._p=new Promise(function(oe,he){H.onload=oe,H.onerror=he}),H.addEventListener("load",function(){z.loading|=1}),H.addEventListener("error",function(){z.loading|=2}),z.loading|=4,Vu(A,a,u)}A={type:"stylesheet",instance:A,count:1,state:z},p.set(y,A)}}}function Ox(n,a){Ra.X(n,a);var o=Uo;if(o&&n){var u=Ai(o).hoistableScripts,p=Vo(n),y=u.get(p);y||(y=o.querySelector(el(p)),y||(n=g({src:n,async:!0},a),(a=Mr.get(p))&&ch(n,a),y=o.createElement("script"),yn(y),Nn(y,"link",n),o.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},u.set(p,y))}}function Rx(n,a){Ra.M(n,a);var o=Uo;if(o&&n){var u=Ai(o).hoistableScripts,p=Vo(n),y=u.get(p);y||(y=o.querySelector(el(p)),y||(n=g({src:n,async:!0,type:"module"},a),(a=Mr.get(p))&&ch(n,a),y=o.createElement("script"),yn(y),Nn(y,"link",n),o.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},u.set(p,y))}}function rv(n,a,o,u){var p=(p=ee.current)?qu(p):null;if(!p)throw Error(i(446));switch(n){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(a=qo(o.href),o=Ai(p).hoistableStyles,u=o.get(a),u||(u={type:"style",instance:null,count:0,state:null},o.set(a,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){n=qo(o.href);var y=Ai(p).hoistableStyles,A=y.get(n);if(A||(p=p.ownerDocument||p,A={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},y.set(n,A),(y=p.querySelector(Js(n)))&&!y._p&&(A.instance=y,A.state.loading=5),Mr.has(n)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},Mr.set(n,o),y||Ax(p,n,o,A.state))),a&&u===null)throw Error(i(528,""));return A}if(a&&u!==null)throw Error(i(529,""));return null;case"script":return a=o.async,o=o.src,typeof o=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=Vo(o),o=Ai(p).hoistableScripts,u=o.get(a),u||(u={type:"script",instance:null,count:0,state:null},o.set(a,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,n))}}function qo(n){return'href="'+Bn(n)+'"'}function Js(n){return'link[rel="stylesheet"]['+n+"]"}function av(n){return g({},n,{"data-precedence":n.precedence,precedence:null})}function Ax(n,a,o,u){n.querySelector('link[rel="preload"][as="style"]['+a+"]")?u.loading=1:(a=n.createElement("link"),u.preload=a,a.addEventListener("load",function(){return u.loading|=1}),a.addEventListener("error",function(){return u.loading|=2}),Nn(a,"link",o),yn(a),n.head.appendChild(a))}function Vo(n){return'[src="'+Bn(n)+'"]'}function el(n){return"script[async]"+n}function iv(n,a,o){if(a.count++,a.instance===null)switch(a.type){case"style":var u=n.querySelector('style[data-href~="'+Bn(o.href)+'"]');if(u)return a.instance=u,yn(u),u;var p=g({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return u=(n.ownerDocument||n).createElement("style"),yn(u),Nn(u,"style",p),Vu(u,o.precedence,n),a.instance=u;case"stylesheet":p=qo(o.href);var y=n.querySelector(Js(p));if(y)return a.state.loading|=4,a.instance=y,yn(y),y;u=av(o),(p=Mr.get(p))&&uh(u,p),y=(n.ownerDocument||n).createElement("link"),yn(y);var A=y;return A._p=new Promise(function(z,H){A.onload=z,A.onerror=H}),Nn(y,"link",u),a.state.loading|=4,Vu(y,o.precedence,n),a.instance=y;case"script":return y=Vo(o.src),(p=n.querySelector(el(y)))?(a.instance=p,yn(p),p):(u=o,(p=Mr.get(y))&&(u=g({},o),ch(u,p)),n=n.ownerDocument||n,p=n.createElement("script"),yn(p),Nn(p,"link",u),n.head.appendChild(p),a.instance=p);case"void":return null;default:throw Error(i(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(u=a.instance,a.state.loading|=4,Vu(u,o.precedence,n));return a.instance}function Vu(n,a,o){for(var u=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=u.length?u[u.length-1]:null,y=p,A=0;A<u.length;A++){var z=u[A];if(z.dataset.precedence===a)y=z;else if(y!==p)break}y?y.parentNode.insertBefore(n,y.nextSibling):(a=o.nodeType===9?o.head:o,a.insertBefore(n,a.firstChild))}function uh(n,a){n.crossOrigin==null&&(n.crossOrigin=a.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=a.referrerPolicy),n.title==null&&(n.title=a.title)}function ch(n,a){n.crossOrigin==null&&(n.crossOrigin=a.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=a.referrerPolicy),n.integrity==null&&(n.integrity=a.integrity)}var Fu=null;function ov(n,a,o){if(Fu===null){var u=new Map,p=Fu=new Map;p.set(o,u)}else p=Fu,u=p.get(o),u||(u=new Map,p.set(o,u));if(u.has(n))return u;for(u.set(n,null),o=o.getElementsByTagName(n),p=0;p<o.length;p++){var y=o[p];if(!(y[fo]||y[$t]||n==="link"&&y.getAttribute("rel")==="stylesheet")&&y.namespaceURI!=="http://www.w3.org/2000/svg"){var A=y.getAttribute(a)||"";A=n+A;var z=u.get(A);z?z.push(y):u.set(A,[y])}}return u}function sv(n,a,o){n=n.ownerDocument||n,n.head.insertBefore(o,a==="title"?n.querySelector("head > title"):null)}function Mx(n,a,o){if(o===1||a.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;return a.rel==="stylesheet"?(n=a.disabled,typeof a.precedence=="string"&&n==null):!0;case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function lv(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function jx(n,a,o,u){if(o.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var p=qo(u.href),y=a.querySelector(Js(p));if(y){a=y._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(n.count++,n=Bu.bind(n),a.then(n,n)),o.state.loading|=4,o.instance=y,yn(y);return}y=a.ownerDocument||a,u=av(u),(p=Mr.get(p))&&uh(u,p),y=y.createElement("link"),yn(y);var A=y;A._p=new Promise(function(z,H){A.onload=z,A.onerror=H}),Nn(y,"link",u),o.instance=y}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(o,a),(a=o.state.preload)&&(o.state.loading&3)===0&&(n.count++,o=Bu.bind(n),a.addEventListener("load",o),a.addEventListener("error",o))}}var fh=0;function kx(n,a){return n.stylesheets&&n.count===0&&Gu(n,n.stylesheets),0<n.count||0<n.imgCount?function(o){var u=setTimeout(function(){if(n.stylesheets&&Gu(n,n.stylesheets),n.unsuspend){var y=n.unsuspend;n.unsuspend=null,y()}},6e4+a);0<n.imgBytes&&fh===0&&(fh=62500*dx());var p=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&Gu(n,n.stylesheets),n.unsuspend)){var y=n.unsuspend;n.unsuspend=null,y()}},(n.imgBytes>fh?50:800)+a);return n.unsuspend=o,function(){n.unsuspend=null,clearTimeout(u),clearTimeout(p)}}:null}function Bu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Gu(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var Hu=null;function Gu(n,a){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Hu=new Map,a.forEach(Dx,n),Hu=null,Bu.call(n))}function Dx(n,a){if(!(a.state.loading&4)){var o=Hu.get(n);if(o)var u=o.get(null);else{o=new Map,Hu.set(n,o);for(var p=n.querySelectorAll("link[data-precedence],style[data-precedence]"),y=0;y<p.length;y++){var A=p[y];(A.nodeName==="LINK"||A.getAttribute("media")!=="not all")&&(o.set(A.dataset.precedence,A),u=A)}u&&o.set(null,u)}p=a.instance,A=p.getAttribute("data-precedence"),y=o.get(A)||u,y===u&&o.set(null,p),o.set(A,p),this.count++,u=Bu.bind(this),p.addEventListener("load",u),p.addEventListener("error",u),y?y.parentNode.insertBefore(p,y.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(p,n.firstChild)),a.state.loading|=4}}var tl={$$typeof:T,Provider:null,Consumer:null,_currentValue:Y,_currentValue2:Y,_threadCount:0};function Nx(n,a,o,u,p,y,A,z,H){this.tag=1,this.containerInfo=n,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=qr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qr(0),this.hiddenUpdates=qr(null),this.identifierPrefix=u,this.onUncaughtError=p,this.onCaughtError=y,this.onRecoverableError=A,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=H,this.incompleteTransitions=new Map}function uv(n,a,o,u,p,y,A,z,H,oe,he,me){return n=new Nx(n,a,o,A,H,oe,he,me,z),a=1,y===!0&&(a|=24),y=ur(3,null,null,a),n.current=y,y.stateNode=n,a=Bf(),a.refCount++,n.pooledCache=a,a.refCount++,y.memoizedState={element:u,isDehydrated:o,cache:a},Yf(y),n}function cv(n){return n?(n=bo,n):bo}function fv(n,a,o,u,p,y){p=cv(p),u.context===null?u.context=p:u.pendingContext=p,u=Ka(a),u.payload={element:o},y=y===void 0?null:y,y!==null&&(u.callback=y),o=Ya(n,u,a),o!==null&&(Jn(o,n,a),Ds(o,n,a))}function dv(n,a){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var o=n.retryLane;n.retryLane=o!==0&&o<a?o:a}}function dh(n,a){dv(n,a),(n=n.alternate)&&dv(n,a)}function hv(n){if(n.tag===13||n.tag===31){var a=$i(n,67108864);a!==null&&Jn(a,n,67108864),dh(n,67108864)}}function pv(n){if(n.tag===13||n.tag===31){var a=pr();a=Ft(a);var o=$i(n,a);o!==null&&Jn(o,n,a),dh(n,a)}}var Ku=!0;function zx(n,a,o,u){var p=K.T;K.T=null;var y=B.p;try{B.p=2,hh(n,a,o,u)}finally{B.p=y,K.T=p}}function $x(n,a,o,u){var p=K.T;K.T=null;var y=B.p;try{B.p=8,hh(n,a,o,u)}finally{B.p=y,K.T=p}}function hh(n,a,o,u){if(Ku){var p=ph(u);if(p===null)Jd(n,a,u,Yu,o),gv(n,u);else if(Ix(p,n,a,o,u))u.stopPropagation();else if(gv(n,u),a&4&&-1<Px.indexOf(n)){for(;p!==null;){var y=Ri(p);if(y!==null)switch(y.tag){case 3:if(y=y.stateNode,y.current.memoizedState.isDehydrated){var A=Dt(y.pendingLanes);if(A!==0){var z=y;for(z.pendingLanes|=2,z.entangledLanes|=2;A;){var H=1<<31-Rt(A);z.entanglements[1]|=H,A&=~H}ia(y),(yt&6)===0&&(Mu=Ue()+500,Zs(0))}}break;case 31:case 13:z=$i(y,2),z!==null&&Jn(z,y,2),ku(),dh(y,2)}if(y=ph(u),y===null&&Jd(n,a,u,Yu,o),y===p)break;p=y}p!==null&&u.stopPropagation()}else Jd(n,a,u,null,o)}}function ph(n){return n=Ye(n),mh(n)}var Yu=null;function mh(n){if(Yu=null,n=Oi(n),n!==null){var a=l(n);if(a===null)n=null;else{var o=a.tag;if(o===13){if(n=c(a),n!==null)return n;n=null}else if(o===31){if(n=f(a),n!==null)return n;n=null}else if(o===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;n=null}else a!==n&&(n=null)}}return Yu=n,null}function mv(n){switch(n){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"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(Xe()){case Mt:return 2;case Ae:return 8;case xe:case Ne:return 32;case Ke:return 268435456;default:return 32}default:return 32}}var gh=!1,ii=null,oi=null,si=null,nl=new Map,rl=new Map,li=[],Px="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 gv(n,a){switch(n){case"focusin":case"focusout":ii=null;break;case"dragenter":case"dragleave":oi=null;break;case"mouseover":case"mouseout":si=null;break;case"pointerover":case"pointerout":nl.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":rl.delete(a.pointerId)}}function al(n,a,o,u,p,y){return n===null||n.nativeEvent!==y?(n={blockedOn:a,domEventName:o,eventSystemFlags:u,nativeEvent:y,targetContainers:[p]},a!==null&&(a=Ri(a),a!==null&&hv(a)),n):(n.eventSystemFlags|=u,a=n.targetContainers,p!==null&&a.indexOf(p)===-1&&a.push(p),n)}function Ix(n,a,o,u,p){switch(a){case"focusin":return ii=al(ii,n,a,o,u,p),!0;case"dragenter":return oi=al(oi,n,a,o,u,p),!0;case"mouseover":return si=al(si,n,a,o,u,p),!0;case"pointerover":var y=p.pointerId;return nl.set(y,al(nl.get(y)||null,n,a,o,u,p)),!0;case"gotpointercapture":return y=p.pointerId,rl.set(y,al(rl.get(y)||null,n,a,o,u,p)),!0}return!1}function yv(n){var a=Oi(n.target);if(a!==null){var o=l(a);if(o!==null){if(a=o.tag,a===13){if(a=c(o),a!==null){n.blockedOn=a,$a(n.priority,function(){pv(o)});return}}else if(a===31){if(a=f(o),a!==null){n.blockedOn=a,$a(n.priority,function(){pv(o)});return}}else if(a===3&&o.stateNode.current.memoizedState.isDehydrated){n.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}n.blockedOn=null}function Zu(n){if(n.blockedOn!==null)return!1;for(var a=n.targetContainers;0<a.length;){var o=ph(n.nativeEvent);if(o===null){o=n.nativeEvent;var u=new o.constructor(o.type,o);Ie=u,o.target.dispatchEvent(u),Ie=null}else return a=Ri(o),a!==null&&hv(a),n.blockedOn=o,!1;a.shift()}return!0}function vv(n,a,o){Zu(n)&&o.delete(a)}function Lx(){gh=!1,ii!==null&&Zu(ii)&&(ii=null),oi!==null&&Zu(oi)&&(oi=null),si!==null&&Zu(si)&&(si=null),nl.forEach(vv),rl.forEach(vv)}function Xu(n,a){n.blockedOn===a&&(n.blockedOn=null,gh||(gh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Lx)))}var Qu=null;function bv(n){Qu!==n&&(Qu=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Qu===n&&(Qu=null);for(var a=0;a<n.length;a+=3){var o=n[a],u=n[a+1],p=n[a+2];if(typeof u!="function"){if(mh(u||o)===null)continue;break}var y=Ri(o);y!==null&&(n.splice(a,3),a-=3,pd(y,{pending:!0,data:p,method:o.method,action:u},u,p))}}))}function Fo(n){function a(H){return Xu(H,n)}ii!==null&&Xu(ii,n),oi!==null&&Xu(oi,n),si!==null&&Xu(si,n),nl.forEach(a),rl.forEach(a);for(var o=0;o<li.length;o++){var u=li[o];u.blockedOn===n&&(u.blockedOn=null)}for(;0<li.length&&(o=li[0],o.blockedOn===null);)yv(o),o.blockedOn===null&&li.shift();if(o=(n.ownerDocument||n).$$reactFormReplay,o!=null)for(u=0;u<o.length;u+=3){var p=o[u],y=o[u+1],A=p[sn]||null;if(typeof y=="function")A||bv(o);else if(A){var z=null;if(y&&y.hasAttribute("formAction")){if(p=y,A=y[sn]||null)z=A.formAction;else if(mh(p)!==null)continue}else z=A.action;typeof z=="function"?o[u+1]=z:(o.splice(u,3),u-=3),bv(o)}}}function Sv(){function n(y){y.canIntercept&&y.info==="react-transition"&&y.intercept({handler:function(){return new Promise(function(A){return p=A})},focusReset:"manual",scroll:"manual"})}function a(){p!==null&&(p(),p=null),u||setTimeout(o,20)}function o(){if(!u&&!navigation.transition){var y=navigation.currentEntry;y&&y.url!=null&&navigation.navigate(y.url,{state:y.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,p=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(o,100),function(){u=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),p!==null&&(p(),p=null)}}}function yh(n){this._internalRoot=n}Wu.prototype.render=yh.prototype.render=function(n){var a=this._internalRoot;if(a===null)throw Error(i(409));var o=a.current,u=pr();fv(o,u,n,a,null,null)},Wu.prototype.unmount=yh.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var a=n.containerInfo;fv(n.current,2,null,n,null,null),ku(),a[Ir]=null}};function Wu(n){this._internalRoot=n}Wu.prototype.unstable_scheduleHydration=function(n){if(n){var a=Pr();n={blockedOn:null,target:n,priority:a};for(var o=0;o<li.length&&a!==0&&a<li[o].priority;o++);li.splice(o,0,n),o===0&&yv(n)}};var wv=t.version;if(wv!=="19.2.3")throw Error(i(527,wv,"19.2.3"));B.findDOMNode=function(n){var a=n._reactInternals;if(a===void 0)throw typeof n.render=="function"?Error(i(188)):(n=Object.keys(n).join(","),Error(i(268,n)));return n=h(a),n=n!==null?m(n):null,n=n===null?null:n.stateNode,n};var Ux={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:K,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ju=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ju.isDisabled&&Ju.supportsFiber)try{Vt=Ju.inject(Ux),wt=Ju}catch{}}return zv.createRoot=function(n,a){if(!s(n))throw Error(i(299));var o=!1,u="",p=Ry,y=Ay,A=My;return a!=null&&(a.unstable_strictMode===!0&&(o=!0),a.identifierPrefix!==void 0&&(u=a.identifierPrefix),a.onUncaughtError!==void 0&&(p=a.onUncaughtError),a.onCaughtError!==void 0&&(y=a.onCaughtError),a.onRecoverableError!==void 0&&(A=a.onRecoverableError)),a=uv(n,1,!1,null,null,o,u,null,p,y,A,Sv),n[Ir]=a.current,Wd(n),new yh(a)},zv.hydrateRoot=function(n,a,o){if(!s(n))throw Error(i(299));var u=!1,p="",y=Ry,A=Ay,z=My,H=null;return o!=null&&(o.unstable_strictMode===!0&&(u=!0),o.identifierPrefix!==void 0&&(p=o.identifierPrefix),o.onUncaughtError!==void 0&&(y=o.onUncaughtError),o.onCaughtError!==void 0&&(A=o.onCaughtError),o.onRecoverableError!==void 0&&(z=o.onRecoverableError),o.formState!==void 0&&(H=o.formState)),a=uv(n,1,!0,a,o??null,u,p,H,y,A,z,Sv),a.context=cv(null),o=a.current,u=pr(),u=Ft(u),p=Ka(u),p.callback=null,Ya(o,p,u),o=u,a.current.lanes=o,ft(a,o),ia(a),n[Ir]=a.current,Wd(n),new Wu(a)},zv.version="19.2.3",zv}var GN;function ixe(){if(GN)return VT.exports;GN=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),VT.exports=axe(),VT.exports}ixe();function oxe(e,t,r,i,s){return{callTool:async(c,f)=>{t("callTool",{name:c,args:f});const d=await i(c,f??{});return t("← callTool response",d,"response"),d},sendFollowUpMessage:async c=>{t("sendFollowUpMessage",c)},openExternal:c=>{t("openExternal",c)},requestDisplayMode:async c=>(t("requestDisplayMode",c),e.displayMode=c.mode,r("displayMode",c.mode),{mode:c.mode}),setWidgetState:async c=>{t("setWidgetState",c),e.widgetState=c,r("widgetState",c)},requestModal:async c=>{t("requestModal",c),e.displayMode="modal",e.view={mode:"modal"},r("displayMode","modal")},uploadFile:async c=>(t("uploadFile",{name:c.name,size:c.size}),{fileId:"123"}),getFileDownloadUrl:async c=>(t("getFileDownloadUrl",c),{downloadUrl:"https://example.com/file.pdf"}),setOpenInAppUrl:async c=>{t("setOpenInAppUrl",c),s(c.href)}}}function sxe(e,t){const r=["theme","userAgent","locale","maxHeight","displayMode","safeArea","toolInput","toolOutput","toolResponseMetadata","view","widgetState"];return new Proxy(e||{},{set(i,s,l,c){const f=Reflect.set(i,s,l,c);if(r.includes(s)){const d=new xEe(AU,{detail:{globals:{[s]:l}}});t.dispatchEvent(d)}return f}})}function lxe(e,t,r,i,s,l){const c=Fb(t),f=sxe(c,e),d=oxe(f,r,i,s,l);TB(f,d),e.openai=f}function uxe(e){const t=new DOMParser().parseFromString(e,"text/html"),r=t.querySelector('script[type="module"]#dev-widget-entry');if(!r)throw new Error("dev-widget-entry script not found");const i=`
161
+ const waitForOpenAI = () => new Promise((resolve, reject) => {
162
+ if (typeof window === "undefined") { reject(new Error("window is not available")); return; }
163
+ if ("openai" in window && window.openai != null) { resolve(); return; }
164
+ Object.defineProperty(window, "openai", {
165
+ configurable: true,
166
+ enumerable: true,
167
+ get() { return undefined; },
168
+ set(value) {
169
+ Object.defineProperty(window, "openai", {
170
+ configurable: true,
171
+ enumerable: true,
172
+ writable: true,
173
+ value,
174
+ });
175
+ resolve();
176
+ },
177
+ });
178
+ });
179
+ `;return r.textContent=`
180
+ ${i}
181
+ await waitForOpenAI();
182
+ ${r.textContent}
183
+ `,t.head.innerHTML+t.body.innerHTML}const cxe=()=>{const e=df(),t=Cm(e.name),{openaiObject:r}=t??{},{data:i}=Y9(e._meta?.["openai/outputTemplate"]),{setToolData:s,pushOpenAiLog:l,updateOpenaiObject:c,setOpenInAppUrl:f}=Tm(),d=j.useRef(null),h=j.useRef(null),m=j.useRef(!1),g=i.contents[0].text,v=j.useCallback(()=>{if(m.current)return;const w=d.current;if(!w||!w.contentWindow||!w.contentDocument)return;m.current=!0;const b=i.contents[0]._meta?.["openai/widgetDomain"];b&&typeof b=="string"&&f(e.name,b),lxe(w.contentWindow,r,(_,x,R="default")=>{l(e.name,{timestamp:Date.now(),command:_,args:x,type:R})},(_,x)=>{c(e.name,_,x)},(_,x)=>Am.callTool(_,x),_=>{f(e.name,_)}),w.contentDocument.open(),w.contentDocument.write(uxe(g)),w.contentDocument.close(),s(e.name,{openaiRef:d})},[r,l,s,c,f,e.name,g,i]);return j.useEffect(()=>{v()},[v]),k.jsx("div",{ref:h,className:"relative overflow-auto",style:{width:"100%",height:"100%"},children:k.jsx("iframe",{ref:d,src:"about:blank",onLoad:v,style:{width:"100%",height:"100%",border:"none",display:"block"},sandbox:"allow-scripts allow-same-origin allow-forms",title:"html-preview"})})},fxe=()=>{const e=df(),t=Cm(e.name),{defaultLayout:r,onLayoutChange:i}=$v({id:"skybridge-devtools-input-column",storage:localStorage}),{defaultLayout:s,onLayoutChange:l}=$v({id:"skybridge-devtools-widget-section",storage:localStorage}),{defaultLayout:c,onLayoutChange:f}=$v({id:"skybridge-devtools-inspector-section",storage:localStorage}),{defaultLayout:d,onLayoutChange:h}=$v({id:"skybridge-devtools-main-section",storage:localStorage}),m=!!(e._meta?.["openai/outputTemplate"]&&t?.response&&!t.response.isError);return k.jsx("div",{className:"flex-1 flex flex-col overflow-hidden relative z-10",children:k.jsxs(Mp,{orientation:"vertical",className:"flex-1 overflow-hidden",defaultLayout:d,onLayoutChange:h,children:[k.jsx(ul,{id:"top-section",minSize:"30",children:k.jsxs(Mp,{orientation:"horizontal",className:"flex-1 overflow-hidden",defaultLayout:r,onLayoutChange:i,children:[k.jsx(ul,{id:"input-column",minSize:"20",maxSize:"60",children:k.jsx("div",{className:"flex flex-col overflow-hidden h-full",children:k.jsx(Vwe,{})})}),k.jsx(jp,{className:"w-px bg-border"}),k.jsx(ul,{id:"output-column",minSize:"30",children:k.jsx("div",{className:"flex flex-col overflow-hidden h-full",children:k.jsx(EEe,{})})})]})}),m&&k.jsxs(k.Fragment,{children:[k.jsx(jp,{className:"h-px bg-border"}),k.jsx(ul,{id:"widget-section",minSize:"20",children:k.jsxs(Mp,{orientation:"horizontal",className:"flex-1 overflow-hidden bg-card",defaultLayout:c,onLayoutChange:f,children:[k.jsx(ul,{id:"widget-logs-panel",minSize:"30",children:k.jsx("div",{className:"flex flex-col h-full overflow-hidden",children:k.jsxs(Mp,{orientation:"vertical",className:"flex-1 overflow-hidden",defaultLayout:s,onLayoutChange:l,children:[k.jsx(ul,{id:"widget-panel",minSize:"20",maxSize:"80",children:k.jsx("div",{className:"h-full overflow-hidden",children:k.jsx(j.Suspense,{children:k.jsx(cxe,{})})})}),k.jsx(jp,{className:"h-px bg-border"}),k.jsx(ul,{id:"logs-panel",minSize:"20",children:k.jsx("div",{className:"p-4 flex flex-col h-full min-h-0",children:k.jsx(yEe,{})})})]})})}),k.jsx(jp,{className:"w-px bg-border"}),k.jsx(ul,{id:"inspector-panel",minSize:"20",maxSize:"50",defaultSize:30,children:k.jsx("div",{className:"flex flex-col overflow-hidden h-full min-h-0",children:k.jsx("div",{className:"overflow-auto",children:k.jsx(pEe,{})})})})]})})]})]})})};function dxe(){const e=K9(),[,t]=pR(),r=KR();return k.jsx("div",{className:"h-full border-r border-border bg-card flex flex-col",children:k.jsxs("aside",{className:"h-full flex flex-col",children:[k.jsxs("div",{className:"p-4 border-b border-border h-[72px] flex flex-col justify-center",children:[k.jsx("h2",{className:"text-sm font-semibold text-foreground mb-1",children:"Tools"}),k.jsxs("p",{className:"text-xs text-muted-foreground",children:[e?.length," ",e?.length===1?"tool":"tools"]})]}),k.jsx("div",{className:"flex-1 overflow-y-auto",children:k.jsx("div",{className:"p-2",children:e?.length===0?k.jsx("div",{className:"p-4 text-center text-sm text-muted-foreground",children:"No tools registered yet."}):k.jsx("div",{className:"space-y-1",children:e?.map(i=>{const s=i.name===r?.name;return k.jsxs("button",{type:"button",onClick:()=>t(i.name),className:en("w-full text-left px-3 py-3 rounded-md transition-colors cursor-pointer relative","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1",s&&"bg-accent text-accent-foreground"),children:[k.jsxs("div",{className:"pr-6 flex flex-col gap-1",children:[k.jsx("div",{className:en("font-semibold text-sm leading-tight truncate",s&&"text-accent-foreground"),children:i.name}),i.description&&k.jsx("div",{className:en("text-xs leading-snug text-muted-foreground","line-clamp-2",s&&"text-accent-foreground/80"),children:i.description})]}),s&&k.jsx("div",{className:"absolute top-3 right-3 w-1.5 h-1.5 rounded-full bg-primary"})]},i.name)})})})})]})})}function hxe(){const e=KR(),{defaultLayout:t,onLayoutChange:r}=$v({id:"skybridge-devtools-tools-list",storage:localStorage});return k.jsxs("div",{className:"flex h-screen w-full flex-col overflow-hidden bg-background",children:[k.jsx(pie,{}),k.jsxs(Mp,{orientation:"horizontal",className:"flex-1 overflow-hidden",defaultLayout:t,onLayoutChange:r,children:[k.jsx(ul,{id:"tools-list",minSize:"15",maxSize:"40",children:k.jsx(dxe,{})}),k.jsx(jp,{className:"w-px bg-border"}),k.jsx(ul,{id:"main-content",minSize:"30",children:k.jsx("div",{className:"flex flex-1 flex-col overflow-hidden relative h-full",children:e?k.jsx(fxe,{}):k.jsx(oce,{})})})]})]})}const pxe=new _q;function mxe(){return k.jsx(Tq,{client:pxe,children:k.jsx(sV,{children:k.jsx(hxe,{})})})}eq.createRoot(document.getElementById("root")).render(k.jsx(j.StrictMode,{children:k.jsx(mxe,{})}))});export default gxe();