@skybridge/devtools 0.23.0 → 0.23.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,175 +0,0 @@
1
- var KL=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var twe=KL(($o,Io)=>{function GL(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const s=Object.getOwnPropertyDescriptor(r,o);s&&Object.defineProperty(e,o,s.get?s:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(o){if(o.ep)return;o.ep=!0;const s=n(o);fetch(o.href,s)}})();var dm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ts(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ib={exports:{}},pd={};var VR;function ZL(){if(VR)return pd;VR=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,s){var l=null;if(s!==void 0&&(l=""+s),o.key!==void 0&&(l=""+o.key),"key"in o){s={};for(var c in o)c!=="key"&&(s[c]=o[c])}else s=o;return o=s.ref,{$$typeof:e,type:r,key:l,ref:o!==void 0?o:null,props:s}}return pd.Fragment=t,pd.jsx=n,pd.jsxs=n,pd}var qR;function WL(){return qR||(qR=1,Ib.exports=ZL()),Ib.exports}var j=WL(),zb={exports:{}},St={};var BR;function YL(){if(BR)return St;BR=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),g=Symbol.iterator;function b($){return $===null||typeof $!="object"?null:($=g&&$[g]||$["@@iterator"],typeof $=="function"?$:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,w={};function T($,V,U){this.props=$,this.context=V,this.refs=w,this.updater=U||y}T.prototype.isReactComponent={},T.prototype.setState=function($,V){if(typeof $!="object"&&typeof $!="function"&&$!=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,$,V,"setState")},T.prototype.forceUpdate=function($){this.updater.enqueueForceUpdate(this,$,"forceUpdate")};function v(){}v.prototype=T.prototype;function E($,V,U){this.props=$,this.context=V,this.refs=w,this.updater=U||y}var S=E.prototype=new v;S.constructor=E,_(S,T.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function x(){}var O={H:null,A:null,T:null,S:null},M=Object.prototype.hasOwnProperty;function P($,V,U){var D=U.ref;return{$$typeof:e,type:$,key:V,ref:D!==void 0?D:null,props:U}}function z($,V){return P($.type,V,$.props)}function I($){return typeof $=="object"&&$!==null&&$.$$typeof===e}function q($){var V={"=":"=0",":":"=2"};return"$"+$.replace(/[=:]/g,function(U){return V[U]})}var G=/\/+/g;function ee($,V){return typeof $=="object"&&$!==null&&$.key!=null?q(""+$.key):V.toString(36)}function J($){switch($.status){case"fulfilled":return $.value;case"rejected":throw $.reason;default:switch(typeof $.status=="string"?$.then(x,x):($.status="pending",$.then(function(V){$.status==="pending"&&($.status="fulfilled",$.value=V)},function(V){$.status==="pending"&&($.status="rejected",$.reason=V)})),$.status){case"fulfilled":return $.value;case"rejected":throw $.reason}}throw $}function Z($,V,U,D,B){var te=typeof $;(te==="undefined"||te==="boolean")&&($=null);var re=!1;if($===null)re=!0;else switch(te){case"bigint":case"string":case"number":re=!0;break;case"object":switch($.$$typeof){case e:case t:re=!0;break;case h:return re=$._init,Z(re($._payload),V,U,D,B)}}if(re)return B=B($),re=D===""?"."+ee($,0):D,C(B)?(U="",re!=null&&(U=re.replace(G,"$&/")+"/"),Z(B,V,U,"",function(Me){return Me})):B!=null&&(I(B)&&(B=z(B,U+(B.key==null||$&&$.key===B.key?"":(""+B.key).replace(G,"$&/")+"/")+re)),V.push(B)),1;re=0;var le=D===""?".":D+":";if(C($))for(var ge=0;ge<$.length;ge++)D=$[ge],te=le+ee(D,ge),re+=Z(D,V,U,te,B);else if(ge=b($),typeof ge=="function")for($=ge.call($),ge=0;!(D=$.next()).done;)D=D.value,te=le+ee(D,ge++),re+=Z(D,V,U,te,B);else if(te==="object"){if(typeof $.then=="function")return Z(J($),V,U,D,B);throw V=String($),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys($).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return re}function H($,V,U){if($==null)return $;var D=[],B=0;return Z($,D,"","",function(te){return V.call(U,te,B++)}),D}function Y($){if($._status===-1){var V=$._result;V=V(),V.then(function(U){($._status===0||$._status===-1)&&($._status=1,$._result=U)},function(U){($._status===0||$._status===-1)&&($._status=2,$._result=U)}),$._status===-1&&($._status=0,$._result=V)}if($._status===1)return $._result.default;throw $._result}var oe=typeof reportError=="function"?reportError:function($){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof $=="object"&&$!==null&&typeof $.message=="string"?String($.message):String($),error:$});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",$);return}console.error($)},ne={map:H,forEach:function($,V,U){H($,function(){V.apply(this,arguments)},U)},count:function($){var V=0;return H($,function(){V++}),V},toArray:function($){return H($,function(V){return V})||[]},only:function($){if(!I($))throw Error("React.Children.only expected to receive a single React element child.");return $}};return St.Activity=p,St.Children=ne,St.Component=T,St.Fragment=n,St.Profiler=o,St.PureComponent=E,St.StrictMode=r,St.Suspense=u,St.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=O,St.__COMPILER_RUNTIME={__proto__:null,c:function($){return O.H.useMemoCache($)}},St.cache=function($){return function(){return $.apply(null,arguments)}},St.cacheSignal=function(){return null},St.cloneElement=function($,V,U){if($==null)throw Error("The argument must be a React element, but you passed "+$+".");var D=_({},$.props),B=$.key;if(V!=null)for(te in V.key!==void 0&&(B=""+V.key),V)!M.call(V,te)||te==="key"||te==="__self"||te==="__source"||te==="ref"&&V.ref===void 0||(D[te]=V[te]);var te=arguments.length-2;if(te===1)D.children=U;else if(1<te){for(var re=Array(te),le=0;le<te;le++)re[le]=arguments[le+2];D.children=re}return P($.type,B,D)},St.createContext=function($){return $={$$typeof:l,_currentValue:$,_currentValue2:$,_threadCount:0,Provider:null,Consumer:null},$.Provider=$,$.Consumer={$$typeof:s,_context:$},$},St.createElement=function($,V,U){var D,B={},te=null;if(V!=null)for(D in V.key!==void 0&&(te=""+V.key),V)M.call(V,D)&&D!=="key"&&D!=="__self"&&D!=="__source"&&(B[D]=V[D]);var re=arguments.length-2;if(re===1)B.children=U;else if(1<re){for(var le=Array(re),ge=0;ge<re;ge++)le[ge]=arguments[ge+2];B.children=le}if($&&$.defaultProps)for(D in re=$.defaultProps,re)B[D]===void 0&&(B[D]=re[D]);return P($,te,B)},St.createRef=function(){return{current:null}},St.forwardRef=function($){return{$$typeof:c,render:$}},St.isValidElement=I,St.lazy=function($){return{$$typeof:h,_payload:{_status:-1,_result:$},_init:Y}},St.memo=function($,V){return{$$typeof:d,type:$,compare:V===void 0?null:V}},St.startTransition=function($){var V=O.T,U={};O.T=U;try{var D=$(),B=O.S;B!==null&&B(U,D),typeof D=="object"&&D!==null&&typeof D.then=="function"&&D.then(x,oe)}catch(te){oe(te)}finally{V!==null&&U.types!==null&&(V.types=U.types),O.T=V}},St.unstable_useCacheRefresh=function(){return O.H.useCacheRefresh()},St.use=function($){return O.H.use($)},St.useActionState=function($,V,U){return O.H.useActionState($,V,U)},St.useCallback=function($,V){return O.H.useCallback($,V)},St.useContext=function($){return O.H.useContext($)},St.useDebugValue=function(){},St.useDeferredValue=function($,V){return O.H.useDeferredValue($,V)},St.useEffect=function($,V){return O.H.useEffect($,V)},St.useEffectEvent=function($){return O.H.useEffectEvent($)},St.useId=function(){return O.H.useId()},St.useImperativeHandle=function($,V,U){return O.H.useImperativeHandle($,V,U)},St.useInsertionEffect=function($,V){return O.H.useInsertionEffect($,V)},St.useLayoutEffect=function($,V){return O.H.useLayoutEffect($,V)},St.useMemo=function($,V){return O.H.useMemo($,V)},St.useOptimistic=function($,V){return O.H.useOptimistic($,V)},St.useReducer=function($,V,U){return O.H.useReducer($,V,U)},St.useRef=function($){return O.H.useRef($)},St.useState=function($){return O.H.useState($)},St.useSyncExternalStore=function($,V,U){return O.H.useSyncExternalStore($,V,U)},St.useTransition=function(){return O.H.useTransition()},St.version="19.2.3",St}var HR;function rf(){return HR||(HR=1,zb.exports=YL()),zb.exports}var k=rf();const Mo=ts(k),Th=GL({__proto__:null,default:Mo},[k]);var Lb={exports:{}},md={},Fb={exports:{}},Ub={};var KR;function XL(){return KR||(KR=1,(function(e){function t(Z,H){var Y=Z.length;Z.push(H);e:for(;0<Y;){var oe=Y-1>>>1,ne=Z[oe];if(0<o(ne,H))Z[oe]=H,Z[Y]=ne,Y=oe;else break e}}function n(Z){return Z.length===0?null:Z[0]}function r(Z){if(Z.length===0)return null;var H=Z[0],Y=Z.pop();if(Y!==H){Z[0]=Y;e:for(var oe=0,ne=Z.length,$=ne>>>1;oe<$;){var V=2*(oe+1)-1,U=Z[V],D=V+1,B=Z[D];if(0>o(U,Y))D<ne&&0>o(B,U)?(Z[oe]=B,Z[D]=Y,oe=D):(Z[oe]=U,Z[V]=Y,oe=V);else if(D<ne&&0>o(B,Y))Z[oe]=B,Z[D]=Y,oe=D;else break e}}return H}function o(Z,H){var Y=Z.sortIndex-H.sortIndex;return Y!==0?Y:Z.id-H.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var u=[],d=[],h=1,p=null,g=3,b=!1,y=!1,_=!1,w=!1,T=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;function S(Z){for(var H=n(d);H!==null;){if(H.callback===null)r(d);else if(H.startTime<=Z)r(d),H.sortIndex=H.expirationTime,t(u,H);else break;H=n(d)}}function C(Z){if(_=!1,S(Z),!y)if(n(u)!==null)y=!0,x||(x=!0,q());else{var H=n(d);H!==null&&J(C,H.startTime-Z)}}var x=!1,O=-1,M=5,P=-1;function z(){return w?!0:!(e.unstable_now()-P<M)}function I(){if(w=!1,x){var Z=e.unstable_now();P=Z;var H=!0;try{e:{y=!1,_&&(_=!1,v(O),O=-1),b=!0;var Y=g;try{t:{for(S(Z),p=n(u);p!==null&&!(p.expirationTime>Z&&z());){var oe=p.callback;if(typeof oe=="function"){p.callback=null,g=p.priorityLevel;var ne=oe(p.expirationTime<=Z);if(Z=e.unstable_now(),typeof ne=="function"){p.callback=ne,S(Z),H=!0;break t}p===n(u)&&r(u),S(Z)}else r(u);p=n(u)}if(p!==null)H=!0;else{var $=n(d);$!==null&&J(C,$.startTime-Z),H=!1}}break e}finally{p=null,g=Y,b=!1}H=void 0}}finally{H?q():x=!1}}}var q;if(typeof E=="function")q=function(){E(I)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,ee=G.port2;G.port1.onmessage=I,q=function(){ee.postMessage(null)}}else q=function(){T(I,0)};function J(Z,H){O=T(function(){Z(e.unstable_now())},H)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(Z){Z.callback=null},e.unstable_forceFrameRate=function(Z){0>Z||125<Z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<Z?Math.floor(1e3/Z):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(Z){switch(g){case 1:case 2:case 3:var H=3;break;default:H=g}var Y=g;g=H;try{return Z()}finally{g=Y}},e.unstable_requestPaint=function(){w=!0},e.unstable_runWithPriority=function(Z,H){switch(Z){case 1:case 2:case 3:case 4:case 5:break;default:Z=3}var Y=g;g=Z;try{return H()}finally{g=Y}},e.unstable_scheduleCallback=function(Z,H,Y){var oe=e.unstable_now();switch(typeof Y=="object"&&Y!==null?(Y=Y.delay,Y=typeof Y=="number"&&0<Y?oe+Y:oe):Y=oe,Z){case 1:var ne=-1;break;case 2:ne=250;break;case 5:ne=1073741823;break;case 4:ne=1e4;break;default:ne=5e3}return ne=Y+ne,Z={id:h++,callback:H,priorityLevel:Z,startTime:Y,expirationTime:ne,sortIndex:-1},Y>oe?(Z.sortIndex=Y,t(d,Z),n(u)===null&&Z===n(d)&&(_?(v(O),O=-1):_=!0,J(C,Y-oe))):(Z.sortIndex=ne,t(u,Z),y||b||(y=!0,x||(x=!0,q()))),Z},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(Z){var H=g;return function(){var Y=g;g=H;try{return Z.apply(this,arguments)}finally{g=Y}}}})(Ub)),Ub}var GR;function QL(){return GR||(GR=1,Fb.exports=XL()),Fb.exports}var Vb={exports:{}},Xr={};var ZR;function JL(){if(ZR)return Xr;ZR=1;var e=rf();function t(u){var d="https://react.dev/errors/"+u;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)d+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+u+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},o=Symbol.for("react.portal");function s(u,d,h){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:p==null?null:""+p,children:u,containerInfo:d,implementation:h}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(u,d){if(u==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return Xr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Xr.createPortal=function(u,d){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(t(299));return s(u,d,null,h)},Xr.flushSync=function(u){var d=l.T,h=r.p;try{if(l.T=null,r.p=2,u)return u()}finally{l.T=d,r.p=h,r.d.f()}},Xr.preconnect=function(u,d){typeof u=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,r.d.C(u,d))},Xr.prefetchDNS=function(u){typeof u=="string"&&r.d.D(u)},Xr.preinit=function(u,d){if(typeof u=="string"&&d&&typeof d.as=="string"){var h=d.as,p=c(h,d.crossOrigin),g=typeof d.integrity=="string"?d.integrity:void 0,b=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;h==="style"?r.d.S(u,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:p,integrity:g,fetchPriority:b}):h==="script"&&r.d.X(u,{crossOrigin:p,integrity:g,fetchPriority:b,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},Xr.preinitModule=function(u,d){if(typeof u=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var h=c(d.as,d.crossOrigin);r.d.M(u,{crossOrigin:h,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&r.d.M(u)},Xr.preload=function(u,d){if(typeof u=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var h=d.as,p=c(h,d.crossOrigin);r.d.L(u,h,{crossOrigin:p,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},Xr.preloadModule=function(u,d){if(typeof u=="string")if(d){var h=c(d.as,d.crossOrigin);r.d.m(u,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:h,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else r.d.m(u)},Xr.requestFormReset=function(u){r.d.r(u)},Xr.unstable_batchedUpdates=function(u,d){return u(d)},Xr.useFormState=function(u,d,h){return l.H.useFormState(u,d,h)},Xr.useFormStatus=function(){return l.H.useHostTransitionStatus()},Xr.version="19.2.3",Xr}var WR;function _j(){if(WR)return Vb.exports;WR=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(),Vb.exports=JL(),Vb.exports}var YR;function eF(){if(YR)return md;YR=1;var e=QL(),t=rf(),n=_j();function r(i){var a="https://react.dev/errors/"+i;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var f=2;f<arguments.length;f++)a+="&args[]="+encodeURIComponent(arguments[f])}return"Minified React error #"+i+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function s(i){var a=i,f=i;if(i.alternate)for(;a.return;)a=a.return;else{i=a;do a=i,(a.flags&4098)!==0&&(f=a.return),i=a.return;while(i)}return a.tag===3?f:null}function l(i){if(i.tag===13){var a=i.memoizedState;if(a===null&&(i=i.alternate,i!==null&&(a=i.memoizedState)),a!==null)return a.dehydrated}return null}function c(i){if(i.tag===31){var a=i.memoizedState;if(a===null&&(i=i.alternate,i!==null&&(a=i.memoizedState)),a!==null)return a.dehydrated}return null}function u(i){if(s(i)!==i)throw Error(r(188))}function d(i){var a=i.alternate;if(!a){if(a=s(i),a===null)throw Error(r(188));return a!==i?null:i}for(var f=i,m=a;;){var R=f.return;if(R===null)break;var A=R.alternate;if(A===null){if(m=R.return,m!==null){f=m;continue}break}if(R.child===A.child){for(A=R.child;A;){if(A===f)return u(R),i;if(A===m)return u(R),a;A=A.sibling}throw Error(r(188))}if(f.return!==m.return)f=R,m=A;else{for(var N=!1,W=R.child;W;){if(W===f){N=!0,f=R,m=A;break}if(W===m){N=!0,m=R,f=A;break}W=W.sibling}if(!N){for(W=A.child;W;){if(W===f){N=!0,f=A,m=R;break}if(W===m){N=!0,m=A,f=R;break}W=W.sibling}if(!N)throw Error(r(189))}}if(f.alternate!==m)throw Error(r(190))}if(f.tag!==3)throw Error(r(188));return f.stateNode.current===f?i:a}function h(i){var a=i.tag;if(a===5||a===26||a===27||a===6)return i;for(i=i.child;i!==null;){if(a=h(i),a!==null)return a;i=i.sibling}return null}var p=Object.assign,g=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),v=Symbol.for("react.consumer"),E=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),x=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),P=Symbol.for("react.activity"),z=Symbol.for("react.memo_cache_sentinel"),I=Symbol.iterator;function q(i){return i===null||typeof i!="object"?null:(i=I&&i[I]||i["@@iterator"],typeof i=="function"?i:null)}var G=Symbol.for("react.client.reference");function ee(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===G?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case _:return"Fragment";case T:return"Profiler";case w:return"StrictMode";case C:return"Suspense";case x:return"SuspenseList";case P:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case y:return"Portal";case E:return i.displayName||"Context";case v:return(i._context.displayName||"Context")+".Consumer";case S:var a=i.render;return i=i.displayName,i||(i=a.displayName||a.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case O:return a=i.displayName||null,a!==null?a:ee(i.type)||"Memo";case M:a=i._payload,i=i._init;try{return ee(i(a))}catch{}}return null}var J=Array.isArray,Z=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y={pending:!1,data:null,method:null,action:null},oe=[],ne=-1;function $(i){return{current:i}}function V(i){0>ne||(i.current=oe[ne],oe[ne]=null,ne--)}function U(i,a){ne++,oe[ne]=i.current,i.current=a}var D=$(null),B=$(null),te=$(null),re=$(null);function le(i,a){switch(U(te,a),U(B,i),U(D,null),a.nodeType){case 9:case 11:i=(i=a.documentElement)&&(i=i.namespaceURI)?fR(i):0;break;default:if(i=a.tagName,a=a.namespaceURI)a=fR(a),i=dR(a,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}V(D),U(D,i)}function ge(){V(D),V(B),V(te)}function Me(i){i.memoizedState!==null&&U(re,i);var a=D.current,f=dR(a,i.type);a!==f&&(U(B,i),U(D,f))}function Q(i){B.current===i&&(V(D),V(B)),re.current===i&&(V(re),ud._currentValue=Y)}var ie,de;function _e(i){if(ie===void 0)try{throw Error()}catch(f){var a=f.stack.trim().match(/\n( *(at )?)/);ie=a&&a[1]||"",de=-1<f.stack.indexOf(`
2
- at`)?" (<anonymous>)":-1<f.stack.indexOf("@")?"@unknown:0:0":""}return`
3
- `+ie+i+de}var Te=!1;function we(i,a){if(!i||Te)return"";Te=!0;var f=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var m={DetermineComponentFrameRoot:function(){try{if(a){var Pe=function(){throw Error()};if(Object.defineProperty(Pe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Pe,[])}catch(Ee){var Se=Ee}Reflect.construct(i,[],Pe)}else{try{Pe.call()}catch(Ee){Se=Ee}i.call(Pe.prototype)}}else{try{throw Error()}catch(Ee){Se=Ee}(Pe=i())&&typeof Pe.catch=="function"&&Pe.catch(function(){})}}catch(Ee){if(Ee&&Se&&typeof Ee.stack=="string")return[Ee.stack,Se.stack]}return[null,null]}};m.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var R=Object.getOwnPropertyDescriptor(m.DetermineComponentFrameRoot,"name");R&&R.configurable&&Object.defineProperty(m.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var A=m.DetermineComponentFrameRoot(),N=A[0],W=A[1];if(N&&W){var se=N.split(`
4
- `),be=W.split(`
5
- `);for(R=m=0;m<se.length&&!se[m].includes("DetermineComponentFrameRoot");)m++;for(;R<be.length&&!be[R].includes("DetermineComponentFrameRoot");)R++;if(m===se.length||R===be.length)for(m=se.length-1,R=be.length-1;1<=m&&0<=R&&se[m]!==be[R];)R--;for(;1<=m&&0<=R;m--,R--)if(se[m]!==be[R]){if(m!==1||R!==1)do if(m--,R--,0>R||se[m]!==be[R]){var Ae=`
6
- `+se[m].replace(" at new "," at ");return i.displayName&&Ae.includes("<anonymous>")&&(Ae=Ae.replace("<anonymous>",i.displayName)),Ae}while(1<=m&&0<=R);break}}}finally{Te=!1,Error.prepareStackTrace=f}return(f=i?i.displayName||i.name:"")?_e(f):""}function $e(i,a){switch(i.tag){case 26:case 27:case 5:return _e(i.type);case 16:return _e("Lazy");case 13:return i.child!==a&&a!==null?_e("Suspense Fallback"):_e("Suspense");case 19:return _e("SuspenseList");case 0:case 15:return we(i.type,!1);case 11:return we(i.type.render,!1);case 1:return we(i.type,!0);case 31:return _e("Activity");default:return""}}function Ze(i){try{var a="",f=null;do a+=$e(i,f),f=i,i=i.return;while(i);return a}catch(m){return`
7
- Error generating stack: `+m.message+`
8
- `+m.stack}}var ye=Object.prototype.hasOwnProperty,Fe=e.unstable_scheduleCallback,Re=e.unstable_cancelCallback,We=e.unstable_shouldYield,ze=e.unstable_requestPaint,Le=e.unstable_now,Ue=e.unstable_getCurrentPriorityLevel,dt=e.unstable_ImmediatePriority,Ce=e.unstable_UserBlockingPriority,pe=e.unstable_NormalPriority,Ne=e.unstable_LowPriority,Be=e.unstable_IdlePriority,it=e.log,vt=e.unstable_setDisableYieldValue,bt=null,pt=null;function on(i){if(typeof it=="function"&&vt(i),pt&&typeof pt.setStrictMode=="function")try{pt.setStrictMode(bt,i)}catch{}}var qt=Math.clz32?Math.clz32:Pt,Tt=Math.log,Wt=Math.LN2;function Pt(i){return i>>>=0,i===0?32:31-(Tt(i)/Wt|0)|0}var Bt=256,sn=262144,bn=4194304;function gt(i){var a=i&42;if(a!==0)return a;switch(i&-i){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 i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function Yt(i,a,f){var m=i.pendingLanes;if(m===0)return 0;var R=0,A=i.suspendedLanes,N=i.pingedLanes;i=i.warmLanes;var W=m&134217727;return W!==0?(m=W&~A,m!==0?R=gt(m):(N&=W,N!==0?R=gt(N):f||(f=W&~i,f!==0&&(R=gt(f))))):(W=m&~A,W!==0?R=gt(W):N!==0?R=gt(N):f||(f=m&~i,f!==0&&(R=gt(f)))),R===0?0:a!==0&&a!==R&&(a&A)===0&&(A=R&-R,f=a&-a,A>=f||A===32&&(f&4194048)!==0)?a:R}function Nt(i,a){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&a)===0}function Vn(i,a){switch(i){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 ft(){var i=bn;return bn<<=1,(bn&62914560)===0&&(bn=4194304),i}function Xt(i){for(var a=[],f=0;31>f;f++)a.push(i);return a}function mn(i,a){i.pendingLanes|=a,a!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function En(i,a,f,m,R,A){var N=i.pendingLanes;i.pendingLanes=f,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=f,i.entangledLanes&=f,i.errorRecoveryDisabledLanes&=f,i.shellSuspendCounter=0;var W=i.entanglements,se=i.expirationTimes,be=i.hiddenUpdates;for(f=N&~f;0<f;){var Ae=31-qt(f),Pe=1<<Ae;W[Ae]=0,se[Ae]=-1;var Se=be[Ae];if(Se!==null)for(be[Ae]=null,Ae=0;Ae<Se.length;Ae++){var Ee=Se[Ae];Ee!==null&&(Ee.lane&=-536870913)}f&=~Pe}m!==0&&qn(i,m,0),A!==0&&R===0&&i.tag!==0&&(i.suspendedLanes|=A&~(N&~a))}function qn(i,a,f){i.pendingLanes|=a,i.suspendedLanes&=~a;var m=31-qt(a);i.entangledLanes|=a,i.entanglements[m]=i.entanglements[m]|1073741824|f&261930}function an(i,a){var f=i.entangledLanes|=a;for(i=i.entanglements;f;){var m=31-qt(f),R=1<<m;R&a|i[m]&a&&(i[m]|=a),f&=~R}}function ir(i,a){var f=a&-a;return f=(f&42)!==0?1:$t(f),(f&(i.suspendedLanes|a))!==0?0:f}function $t(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=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:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function Ar(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function sr(){var i=H.p;return i!==0?i:(i=window.event,i===void 0?32:DR(i.type))}function to(i,a){var f=H.p;try{return H.p=i,a()}finally{H.p=f}}var Sr=Math.random().toString(36).slice(2),Qt="__reactFiber$"+Sr,Cn="__reactProps$"+Sr,Dr="__reactContainer$"+Sr,xo="__reactEvents$"+Sr,Oi="__reactListeners$"+Sr,xf="__reactHandles$"+Sr,sl="__reactResources$"+Sr,al="__reactMarker$"+Sr;function _f(i){delete i[Qt],delete i[Cn],delete i[xo],delete i[Oi],delete i[xf]}function Ks(i){var a=i[Qt];if(a)return a;for(var f=i.parentNode;f;){if(a=f[Dr]||f[Qt]){if(f=a.alternate,a.child!==null||f!==null&&f.child!==null)for(i=bR(i);i!==null;){if(f=i[Qt])return f;i=bR(i)}return a}i=f,f=i.parentNode}return null}function Gs(i){if(i=i[Qt]||i[Dr]){var a=i.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return i}return null}function ll(i){var a=i.tag;if(a===5||a===26||a===27||a===6)return i.stateNode;throw Error(r(33))}function Zs(i){var a=i[sl];return a||(a=i[sl]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function fr(i){i[al]=!0}var Ef=new Set,vc={};function cs(i,a){us(i,a),us(i+"Capture",a)}function us(i,a){for(vc[i]=a,i=0;i<a.length;i++)Ef.add(a[i])}var z0=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]*$"),bc={},no={};function op(i){return ye.call(no,i)?!0:ye.call(bc,i)?!1:z0.test(i)?no[i]=!0:(bc[i]=!0,!1)}function Sc(i,a,f){if(op(a))if(f===null)i.removeAttribute(a);else{switch(typeof f){case"undefined":case"function":case"symbol":i.removeAttribute(a);return;case"boolean":var m=a.toLowerCase().slice(0,5);if(m!=="data-"&&m!=="aria-"){i.removeAttribute(a);return}}i.setAttribute(a,""+f)}}function cl(i,a,f){if(f===null)i.removeAttribute(a);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(a);return}i.setAttribute(a,""+f)}}function Vo(i,a,f,m){if(m===null)i.removeAttribute(f);else{switch(typeof m){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(f);return}i.setAttributeNS(a,f,""+m)}}function ro(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Cf(i){var a=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function L0(i,a,f){var m=Object.getOwnPropertyDescriptor(i.constructor.prototype,a);if(!i.hasOwnProperty(a)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var R=m.get,A=m.set;return Object.defineProperty(i,a,{configurable:!0,get:function(){return R.call(this)},set:function(N){f=""+N,A.call(this,N)}}),Object.defineProperty(i,a,{enumerable:m.enumerable}),{getValue:function(){return f},setValue:function(N){f=""+N},stopTracking:function(){i._valueTracker=null,delete i[a]}}}}function wc(i){if(!i._valueTracker){var a=Cf(i)?"checked":"value";i._valueTracker=L0(i,a,""+i[a])}}function ip(i){if(!i)return!1;var a=i._valueTracker;if(!a)return!0;var f=a.getValue(),m="";return i&&(m=Cf(i)?i.checked?"true":"false":i.value),i=m,i!==f?(a.setValue(i),!0):!1}function Ws(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var F0=/[\n"\\]/g;function $r(i){return i.replace(F0,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function Tf(i,a,f,m,R,A,N,W){i.name="",N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?i.type=N:i.removeAttribute("type"),a!=null?N==="number"?(a===0&&i.value===""||i.value!=a)&&(i.value=""+ro(a)):i.value!==""+ro(a)&&(i.value=""+ro(a)):N!=="submit"&&N!=="reset"||i.removeAttribute("value"),a!=null?Rf(i,N,ro(a)):f!=null?Rf(i,N,ro(f)):m!=null&&i.removeAttribute("value"),R==null&&A!=null&&(i.defaultChecked=!!A),R!=null&&(i.checked=R&&typeof R!="function"&&typeof R!="symbol"),W!=null&&typeof W!="function"&&typeof W!="symbol"&&typeof W!="boolean"?i.name=""+ro(W):i.removeAttribute("name")}function sp(i,a,f,m,R,A,N,W){if(A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"&&(i.type=A),a!=null||f!=null){if(!(A!=="submit"&&A!=="reset"||a!=null)){wc(i);return}f=f!=null?""+ro(f):"",a=a!=null?""+ro(a):f,W||a===i.value||(i.value=a),i.defaultValue=a}m=m??R,m=typeof m!="function"&&typeof m!="symbol"&&!!m,i.checked=W?i.checked:!!m,i.defaultChecked=!!m,N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"&&(i.name=N),wc(i)}function Rf(i,a,f){a==="number"&&Ws(i.ownerDocument)===i||i.defaultValue===""+f||(i.defaultValue=""+f)}function Ys(i,a,f,m){if(i=i.options,a){a={};for(var R=0;R<f.length;R++)a["$"+f[R]]=!0;for(f=0;f<i.length;f++)R=a.hasOwnProperty("$"+i[f].value),i[f].selected!==R&&(i[f].selected=R),R&&m&&(i[f].defaultSelected=!0)}else{for(f=""+ro(f),a=null,R=0;R<i.length;R++){if(i[R].value===f){i[R].selected=!0,m&&(i[R].defaultSelected=!0);return}a!==null||i[R].disabled||(a=i[R])}a!==null&&(a.selected=!0)}}function ul(i,a,f){if(a!=null&&(a=""+ro(a),a!==i.value&&(i.value=a),f==null)){i.defaultValue!==a&&(i.defaultValue=a);return}i.defaultValue=f!=null?""+ro(f):""}function ap(i,a,f,m){if(a==null){if(m!=null){if(f!=null)throw Error(r(92));if(J(m)){if(1<m.length)throw Error(r(93));m=m[0]}f=m}f==null&&(f=""),a=f}f=ro(a),i.defaultValue=f,m=i.textContent,m===f&&m!==""&&m!==null&&(i.value=m),wc(i)}function X(i,a){if(a){var f=i.firstChild;if(f&&f===i.lastChild&&f.nodeType===3){f.nodeValue=a;return}}i.textContent=a}var L=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 F(i,a,f){var m=a.indexOf("--")===0;f==null||typeof f=="boolean"||f===""?m?i.setProperty(a,""):a==="float"?i.cssFloat="":i[a]="":m?i.setProperty(a,f):typeof f!="number"||f===0||L.has(a)?a==="float"?i.cssFloat=f:i[a]=(""+f).trim():i[a]=f+"px"}function K(i,a,f){if(a!=null&&typeof a!="object")throw Error(r(62));if(i=i.style,f!=null){for(var m in f)!f.hasOwnProperty(m)||a!=null&&a.hasOwnProperty(m)||(m.indexOf("--")===0?i.setProperty(m,""):m==="float"?i.cssFloat="":i[m]="");for(var R in a)m=a[R],a.hasOwnProperty(R)&&f[R]!==m&&F(i,R,m)}else for(var A in a)a.hasOwnProperty(A)&&F(i,A,a[A])}function ae(i){if(i.indexOf("-")===-1)return!1;switch(i){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 xe=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"]]),me=/^[\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 ce(i){return me.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function Oe(){}var De=null;function qe(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Ve=null,et=null;function He(i){var a=Gs(i);if(a&&(i=a.stateNode)){var f=i[Cn]||null;e:switch(i=a.stateNode,a.type){case"input":if(Tf(i,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name),a=f.name,f.type==="radio"&&a!=null){for(f=i;f.parentNode;)f=f.parentNode;for(f=f.querySelectorAll('input[name="'+$r(""+a)+'"][type="radio"]'),a=0;a<f.length;a++){var m=f[a];if(m!==i&&m.form===i.form){var R=m[Cn]||null;if(!R)throw Error(r(90));Tf(m,R.value,R.defaultValue,R.defaultValue,R.checked,R.defaultChecked,R.type,R.name)}}for(a=0;a<f.length;a++)m=f[a],m.form===i.form&&ip(m)}break e;case"textarea":ul(i,f.value,f.defaultValue);break e;case"select":a=f.value,a!=null&&Ys(i,!!f.multiple,a,!1)}}}var Et=!1;function It(i,a,f){if(Et)return i(a,f);Et=!0;try{var m=i(a);return m}finally{if(Et=!1,(Ve!==null||et!==null)&&(Bp(),Ve&&(a=Ve,i=et,et=Ve=null,He(a),i)))for(a=0;a<i.length;a++)He(i[a])}}function st(i,a){var f=i.stateNode;if(f===null)return null;var m=f[Cn]||null;if(m===null)return null;f=m[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":(m=!m.disabled)||(i=i.type,m=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!m;break e;default:i=!1}if(i)return null;if(f&&typeof f!="function")throw Error(r(231,a,typeof f));return f}var xt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ar=!1;if(xt)try{var cn={};Object.defineProperty(cn,"passive",{get:function(){ar=!0}}),window.addEventListener("test",cn,cn),window.removeEventListener("test",cn,cn)}catch{ar=!1}var wr=null,kr=null,Ai=null;function fs(){if(Ai)return Ai;var i,a=kr,f=a.length,m,R="value"in wr?wr.value:wr.textContent,A=R.length;for(i=0;i<f&&a[i]===R[i];i++);var N=f-i;for(m=1;m<=N&&a[f-m]===R[A-m];m++);return Ai=R.slice(i,1<m?1-m:void 0)}function hi(i){var a=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&a===13&&(i=13)):i=a,i===10&&(i=13),32<=i||i===13?i:0}function oo(){return!0}function Of(){return!1}function Mr(i){function a(f,m,R,A,N){this._reactName=f,this._targetInst=R,this.type=m,this.nativeEvent=A,this.target=N,this.currentTarget=null;for(var W in i)i.hasOwnProperty(W)&&(f=i[W],this[W]=f?f(A):A[W]);return this.isDefaultPrevented=(A.defaultPrevented!=null?A.defaultPrevented:A.returnValue===!1)?oo:Of,this.isPropagationStopped=Of,this}return p(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var f=this.nativeEvent;f&&(f.preventDefault?f.preventDefault():typeof f.returnValue!="unknown"&&(f.returnValue=!1),this.isDefaultPrevented=oo)},stopPropagation:function(){var f=this.nativeEvent;f&&(f.stopPropagation?f.stopPropagation():typeof f.cancelBubble!="unknown"&&(f.cancelBubble=!0),this.isPropagationStopped=oo)},persist:function(){},isPersistent:oo}),a}var ki={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Mi=Mr(ki),ds=p({},ki,{view:0,detail:0}),Af=Mr(ds),fl,kf,Xs,lp=p({},ds,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:V0,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==Xs&&(Xs&&i.type==="mousemove"?(fl=i.screenX-Xs.screenX,kf=i.screenY-Xs.screenY):kf=fl=0,Xs=i),fl)},movementY:function(i){return"movementY"in i?i.movementY:kf}}),p2=Mr(lp),Hz=p({},lp,{dataTransfer:0}),Kz=Mr(Hz),Gz=p({},ds,{relatedTarget:0}),U0=Mr(Gz),Zz=p({},ki,{animationName:0,elapsedTime:0,pseudoElement:0}),Wz=Mr(Zz),Yz=p({},ki,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),Xz=Mr(Yz),Qz=p({},ki,{data:0}),m2=Mr(Qz),Jz={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},e8={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"},t8={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function n8(i){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(i):(i=t8[i])?!!a[i]:!1}function V0(){return n8}var r8=p({},ds,{key:function(i){if(i.key){var a=Jz[i.key]||i.key;if(a!=="Unidentified")return a}return i.type==="keypress"?(i=hi(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?e8[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:V0,charCode:function(i){return i.type==="keypress"?hi(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?hi(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),o8=Mr(r8),i8=p({},lp,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),g2=Mr(i8),s8=p({},ds,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:V0}),a8=Mr(s8),l8=p({},ki,{propertyName:0,elapsedTime:0,pseudoElement:0}),c8=Mr(l8),u8=p({},lp,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),f8=Mr(u8),d8=p({},ki,{newState:0,oldState:0}),h8=Mr(d8),p8=[9,13,27,32],q0=xt&&"CompositionEvent"in window,Mf=null;xt&&"documentMode"in document&&(Mf=document.documentMode);var m8=xt&&"TextEvent"in window&&!Mf,y2=xt&&(!q0||Mf&&8<Mf&&11>=Mf),v2=" ",b2=!1;function S2(i,a){switch(i){case"keyup":return p8.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function w2(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var xc=!1;function g8(i,a){switch(i){case"compositionend":return w2(a);case"keypress":return a.which!==32?null:(b2=!0,v2);case"textInput":return i=a.data,i===v2&&b2?null:i;default:return null}}function y8(i,a){if(xc)return i==="compositionend"||!q0&&S2(i,a)?(i=fs(),Ai=kr=wr=null,xc=!1,i):null;switch(i){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 y2&&a.locale!=="ko"?null:a.data;default:return null}}var v8={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 x2(i){var a=i&&i.nodeName&&i.nodeName.toLowerCase();return a==="input"?!!v8[i.type]:a==="textarea"}function _2(i,a,f,m){Ve?et?et.push(m):et=[m]:Ve=m,a=Xp(a,"onChange"),0<a.length&&(f=new Mi("onChange","change",null,f,m),i.push({event:f,listeners:a}))}var jf=null,Pf=null;function b8(i){iR(i,0)}function cp(i){var a=ll(i);if(ip(a))return i}function E2(i,a){if(i==="change")return a}var C2=!1;if(xt){var B0;if(xt){var H0="oninput"in document;if(!H0){var T2=document.createElement("div");T2.setAttribute("oninput","return;"),H0=typeof T2.oninput=="function"}B0=H0}else B0=!1;C2=B0&&(!document.documentMode||9<document.documentMode)}function R2(){jf&&(jf.detachEvent("onpropertychange",O2),Pf=jf=null)}function O2(i){if(i.propertyName==="value"&&cp(Pf)){var a=[];_2(a,Pf,i,qe(i)),It(b8,a)}}function S8(i,a,f){i==="focusin"?(R2(),jf=a,Pf=f,jf.attachEvent("onpropertychange",O2)):i==="focusout"&&R2()}function w8(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return cp(Pf)}function x8(i,a){if(i==="click")return cp(a)}function _8(i,a){if(i==="input"||i==="change")return cp(a)}function E8(i,a){return i===a&&(i!==0||1/i===1/a)||i!==i&&a!==a}var _o=typeof Object.is=="function"?Object.is:E8;function Nf(i,a){if(_o(i,a))return!0;if(typeof i!="object"||i===null||typeof a!="object"||a===null)return!1;var f=Object.keys(i),m=Object.keys(a);if(f.length!==m.length)return!1;for(m=0;m<f.length;m++){var R=f[m];if(!ye.call(a,R)||!_o(i[R],a[R]))return!1}return!0}function A2(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function k2(i,a){var f=A2(i);i=0;for(var m;f;){if(f.nodeType===3){if(m=i+f.textContent.length,i<=a&&m>=a)return{node:f,offset:a-i};i=m}e:{for(;f;){if(f.nextSibling){f=f.nextSibling;break e}f=f.parentNode}f=void 0}f=A2(f)}}function M2(i,a){return i&&a?i===a?!0:i&&i.nodeType===3?!1:a&&a.nodeType===3?M2(i,a.parentNode):"contains"in i?i.contains(a):i.compareDocumentPosition?!!(i.compareDocumentPosition(a)&16):!1:!1}function j2(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var a=Ws(i.document);a instanceof i.HTMLIFrameElement;){try{var f=typeof a.contentWindow.location.href=="string"}catch{f=!1}if(f)i=a.contentWindow;else break;a=Ws(i.document)}return a}function K0(i){var a=i&&i.nodeName&&i.nodeName.toLowerCase();return a&&(a==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||a==="textarea"||i.contentEditable==="true")}var C8=xt&&"documentMode"in document&&11>=document.documentMode,_c=null,G0=null,Df=null,Z0=!1;function P2(i,a,f){var m=f.window===f?f.document:f.nodeType===9?f:f.ownerDocument;Z0||_c==null||_c!==Ws(m)||(m=_c,"selectionStart"in m&&K0(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),Df&&Nf(Df,m)||(Df=m,m=Xp(G0,"onSelect"),0<m.length&&(a=new Mi("onSelect","select",null,a,f),i.push({event:a,listeners:m}),a.target=_c)))}function dl(i,a){var f={};return f[i.toLowerCase()]=a.toLowerCase(),f["Webkit"+i]="webkit"+a,f["Moz"+i]="moz"+a,f}var Ec={animationend:dl("Animation","AnimationEnd"),animationiteration:dl("Animation","AnimationIteration"),animationstart:dl("Animation","AnimationStart"),transitionrun:dl("Transition","TransitionRun"),transitionstart:dl("Transition","TransitionStart"),transitioncancel:dl("Transition","TransitionCancel"),transitionend:dl("Transition","TransitionEnd")},W0={},N2={};xt&&(N2=document.createElement("div").style,"AnimationEvent"in window||(delete Ec.animationend.animation,delete Ec.animationiteration.animation,delete Ec.animationstart.animation),"TransitionEvent"in window||delete Ec.transitionend.transition);function hl(i){if(W0[i])return W0[i];if(!Ec[i])return i;var a=Ec[i],f;for(f in a)if(a.hasOwnProperty(f)&&f in N2)return W0[i]=a[f];return i}var D2=hl("animationend"),$2=hl("animationiteration"),I2=hl("animationstart"),T8=hl("transitionrun"),R8=hl("transitionstart"),O8=hl("transitioncancel"),z2=hl("transitionend"),L2=new Map,Y0="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(" ");Y0.push("scrollEnd");function pi(i,a){L2.set(i,a),cs(a,[i])}var up=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},qo=[],Cc=0,X0=0;function fp(){for(var i=Cc,a=X0=Cc=0;a<i;){var f=qo[a];qo[a++]=null;var m=qo[a];qo[a++]=null;var R=qo[a];qo[a++]=null;var A=qo[a];if(qo[a++]=null,m!==null&&R!==null){var N=m.pending;N===null?R.next=R:(R.next=N.next,N.next=R),m.pending=R}A!==0&&F2(f,R,A)}}function dp(i,a,f,m){qo[Cc++]=i,qo[Cc++]=a,qo[Cc++]=f,qo[Cc++]=m,X0|=m,i.lanes|=m,i=i.alternate,i!==null&&(i.lanes|=m)}function Q0(i,a,f,m){return dp(i,a,f,m),hp(i)}function pl(i,a){return dp(i,null,null,a),hp(i)}function F2(i,a,f){i.lanes|=f;var m=i.alternate;m!==null&&(m.lanes|=f);for(var R=!1,A=i.return;A!==null;)A.childLanes|=f,m=A.alternate,m!==null&&(m.childLanes|=f),A.tag===22&&(i=A.stateNode,i===null||i._visibility&1||(R=!0)),i=A,A=A.return;return i.tag===3?(A=i.stateNode,R&&a!==null&&(R=31-qt(f),i=A.hiddenUpdates,m=i[R],m===null?i[R]=[a]:m.push(a),a.lane=f|536870912),A):null}function hp(i){if(50<rd)throw rd=0,ab=null,Error(r(185));for(var a=i.return;a!==null;)i=a,a=i.return;return i.tag===3?i.stateNode:null}var Tc={};function A8(i,a,f,m){this.tag=i,this.key=f,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=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Eo(i,a,f,m){return new A8(i,a,f,m)}function J0(i){return i=i.prototype,!(!i||!i.isReactComponent)}function hs(i,a){var f=i.alternate;return f===null?(f=Eo(i.tag,a,i.key,i.mode),f.elementType=i.elementType,f.type=i.type,f.stateNode=i.stateNode,f.alternate=i,i.alternate=f):(f.pendingProps=a,f.type=i.type,f.flags=0,f.subtreeFlags=0,f.deletions=null),f.flags=i.flags&65011712,f.childLanes=i.childLanes,f.lanes=i.lanes,f.child=i.child,f.memoizedProps=i.memoizedProps,f.memoizedState=i.memoizedState,f.updateQueue=i.updateQueue,a=i.dependencies,f.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},f.sibling=i.sibling,f.index=i.index,f.ref=i.ref,f.refCleanup=i.refCleanup,f}function U2(i,a){i.flags&=65011714;var f=i.alternate;return f===null?(i.childLanes=0,i.lanes=a,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=f.childLanes,i.lanes=f.lanes,i.child=f.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=f.memoizedProps,i.memoizedState=f.memoizedState,i.updateQueue=f.updateQueue,i.type=f.type,a=f.dependencies,i.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),i}function pp(i,a,f,m,R,A){var N=0;if(m=i,typeof i=="function")J0(i)&&(N=1);else if(typeof i=="string")N=NL(i,f,D.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case P:return i=Eo(31,f,a,R),i.elementType=P,i.lanes=A,i;case _:return ml(f.children,R,A,a);case w:N=8,R|=24;break;case T:return i=Eo(12,f,a,R|2),i.elementType=T,i.lanes=A,i;case C:return i=Eo(13,f,a,R),i.elementType=C,i.lanes=A,i;case x:return i=Eo(19,f,a,R),i.elementType=x,i.lanes=A,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case E:N=10;break e;case v:N=9;break e;case S:N=11;break e;case O:N=14;break e;case M:N=16,m=null;break e}N=29,f=Error(r(130,i===null?"null":typeof i,"")),m=null}return a=Eo(N,f,a,R),a.elementType=i,a.type=m,a.lanes=A,a}function ml(i,a,f,m){return i=Eo(7,i,m,a),i.lanes=f,i}function ev(i,a,f){return i=Eo(6,i,null,a),i.lanes=f,i}function V2(i){var a=Eo(18,null,null,0);return a.stateNode=i,a}function tv(i,a,f){return a=Eo(4,i.children!==null?i.children:[],i.key,a),a.lanes=f,a.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},a}var q2=new WeakMap;function Bo(i,a){if(typeof i=="object"&&i!==null){var f=q2.get(i);return f!==void 0?f:(a={value:i,source:a,stack:Ze(a)},q2.set(i,a),a)}return{value:i,source:a,stack:Ze(a)}}var Rc=[],Oc=0,mp=null,$f=0,Ho=[],Ko=0,Qs=null,ji=1,Pi="";function ps(i,a){Rc[Oc++]=$f,Rc[Oc++]=mp,mp=i,$f=a}function B2(i,a,f){Ho[Ko++]=ji,Ho[Ko++]=Pi,Ho[Ko++]=Qs,Qs=i;var m=ji;i=Pi;var R=32-qt(m)-1;m&=~(1<<R),f+=1;var A=32-qt(a)+R;if(30<A){var N=R-R%5;A=(m&(1<<N)-1).toString(32),m>>=N,R-=N,ji=1<<32-qt(a)+R|f<<R|m,Pi=A+i}else ji=1<<A|f<<R|m,Pi=i}function nv(i){i.return!==null&&(ps(i,1),B2(i,1,0))}function rv(i){for(;i===mp;)mp=Rc[--Oc],Rc[Oc]=null,$f=Rc[--Oc],Rc[Oc]=null;for(;i===Qs;)Qs=Ho[--Ko],Ho[Ko]=null,Pi=Ho[--Ko],Ho[Ko]=null,ji=Ho[--Ko],Ho[Ko]=null}function H2(i,a){Ho[Ko++]=ji,Ho[Ko++]=Pi,Ho[Ko++]=Qs,ji=a.id,Pi=a.overflow,Qs=i}var Ir=null,jn=null,Ht=!1,Js=null,Go=!1,ov=Error(r(519));function ea(i){var a=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw If(Bo(a,i)),ov}function K2(i){var a=i.stateNode,f=i.type,m=i.memoizedProps;switch(a[Qt]=i,a[Cn]=m,f){case"dialog":Lt("cancel",a),Lt("close",a);break;case"iframe":case"object":case"embed":Lt("load",a);break;case"video":case"audio":for(f=0;f<id.length;f++)Lt(id[f],a);break;case"source":Lt("error",a);break;case"img":case"image":case"link":Lt("error",a),Lt("load",a);break;case"details":Lt("toggle",a);break;case"input":Lt("invalid",a),sp(a,m.value,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name,!0);break;case"select":Lt("invalid",a);break;case"textarea":Lt("invalid",a),ap(a,m.value,m.defaultValue,m.children)}f=m.children,typeof f!="string"&&typeof f!="number"&&typeof f!="bigint"||a.textContent===""+f||m.suppressHydrationWarning===!0||cR(a.textContent,f)?(m.popover!=null&&(Lt("beforetoggle",a),Lt("toggle",a)),m.onScroll!=null&&Lt("scroll",a),m.onScrollEnd!=null&&Lt("scrollend",a),m.onClick!=null&&(a.onclick=Oe),a=!0):a=!1,a||ea(i,!0)}function G2(i){for(Ir=i.return;Ir;)switch(Ir.tag){case 5:case 31:case 13:Go=!1;return;case 27:case 3:Go=!0;return;default:Ir=Ir.return}}function Ac(i){if(i!==Ir)return!1;if(!Ht)return G2(i),Ht=!0,!1;var a=i.tag,f;if((f=a!==3&&a!==27)&&((f=a===5)&&(f=i.type,f=!(f!=="form"&&f!=="button")||xb(i.type,i.memoizedProps)),f=!f),f&&jn&&ea(i),G2(i),a===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));jn=vR(i)}else if(a===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));jn=vR(i)}else a===27?(a=jn,pa(i.type)?(i=Rb,Rb=null,jn=i):jn=a):jn=Ir?Wo(i.stateNode.nextSibling):null;return!0}function gl(){jn=Ir=null,Ht=!1}function iv(){var i=Js;return i!==null&&(yo===null?yo=i:yo.push.apply(yo,i),Js=null),i}function If(i){Js===null?Js=[i]:Js.push(i)}var sv=$(null),yl=null,ms=null;function ta(i,a,f){U(sv,a._currentValue),a._currentValue=f}function gs(i){i._currentValue=sv.current,V(sv)}function av(i,a,f){for(;i!==null;){var m=i.alternate;if((i.childLanes&a)!==a?(i.childLanes|=a,m!==null&&(m.childLanes|=a)):m!==null&&(m.childLanes&a)!==a&&(m.childLanes|=a),i===f)break;i=i.return}}function lv(i,a,f,m){var R=i.child;for(R!==null&&(R.return=i);R!==null;){var A=R.dependencies;if(A!==null){var N=R.child;A=A.firstContext;e:for(;A!==null;){var W=A;A=R;for(var se=0;se<a.length;se++)if(W.context===a[se]){A.lanes|=f,W=A.alternate,W!==null&&(W.lanes|=f),av(A.return,f,i),m||(N=null);break e}A=W.next}}else if(R.tag===18){if(N=R.return,N===null)throw Error(r(341));N.lanes|=f,A=N.alternate,A!==null&&(A.lanes|=f),av(N,f,i),N=null}else N=R.child;if(N!==null)N.return=R;else for(N=R;N!==null;){if(N===i){N=null;break}if(R=N.sibling,R!==null){R.return=N.return,N=R;break}N=N.return}R=N}}function kc(i,a,f,m){i=null;for(var R=a,A=!1;R!==null;){if(!A){if((R.flags&524288)!==0)A=!0;else if((R.flags&262144)!==0)break}if(R.tag===10){var N=R.alternate;if(N===null)throw Error(r(387));if(N=N.memoizedProps,N!==null){var W=R.type;_o(R.pendingProps.value,N.value)||(i!==null?i.push(W):i=[W])}}else if(R===re.current){if(N=R.alternate,N===null)throw Error(r(387));N.memoizedState.memoizedState!==R.memoizedState.memoizedState&&(i!==null?i.push(ud):i=[ud])}R=R.return}i!==null&&lv(a,i,f,m),a.flags|=262144}function gp(i){for(i=i.firstContext;i!==null;){if(!_o(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function vl(i){yl=i,ms=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function zr(i){return Z2(yl,i)}function yp(i,a){return yl===null&&vl(i),Z2(i,a)}function Z2(i,a){var f=a._currentValue;if(a={context:a,memoizedValue:f,next:null},ms===null){if(i===null)throw Error(r(308));ms=a,i.dependencies={lanes:0,firstContext:a},i.flags|=524288}else ms=ms.next=a;return f}var k8=typeof AbortController<"u"?AbortController:function(){var i=[],a=this.signal={aborted:!1,addEventListener:function(f,m){i.push(m)}};this.abort=function(){a.aborted=!0,i.forEach(function(f){return f()})}},M8=e.unstable_scheduleCallback,j8=e.unstable_NormalPriority,dr={$$typeof:E,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function cv(){return{controller:new k8,data:new Map,refCount:0}}function zf(i){i.refCount--,i.refCount===0&&M8(j8,function(){i.controller.abort()})}var Lf=null,uv=0,Mc=0,jc=null;function P8(i,a){if(Lf===null){var f=Lf=[];uv=0,Mc=hb(),jc={status:"pending",value:void 0,then:function(m){f.push(m)}}}return uv++,a.then(W2,W2),a}function W2(){if(--uv===0&&Lf!==null){jc!==null&&(jc.status="fulfilled");var i=Lf;Lf=null,Mc=0,jc=null;for(var a=0;a<i.length;a++)(0,i[a])()}}function N8(i,a){var f=[],m={status:"pending",value:null,reason:null,then:function(R){f.push(R)}};return i.then(function(){m.status="fulfilled",m.value=a;for(var R=0;R<f.length;R++)(0,f[R])(a)},function(R){for(m.status="rejected",m.reason=R,R=0;R<f.length;R++)(0,f[R])(void 0)}),m}var Y2=Z.S;Z.S=function(i,a){PT=Le(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&P8(i,a),Y2!==null&&Y2(i,a)};var bl=$(null);function fv(){var i=bl.current;return i!==null?i:Tn.pooledCache}function vp(i,a){a===null?U(bl,bl.current):U(bl,a.pool)}function X2(){var i=fv();return i===null?null:{parent:dr._currentValue,pool:i}}var Pc=Error(r(460)),dv=Error(r(474)),bp=Error(r(542)),Sp={then:function(){}};function Q2(i){return i=i.status,i==="fulfilled"||i==="rejected"}function J2(i,a,f){switch(f=i[f],f===void 0?i.push(a):f!==a&&(a.then(Oe,Oe),a=f),a.status){case"fulfilled":return a.value;case"rejected":throw i=a.reason,tC(i),i;default:if(typeof a.status=="string")a.then(Oe,Oe);else{if(i=Tn,i!==null&&100<i.shellSuspendCounter)throw Error(r(482));i=a,i.status="pending",i.then(function(m){if(a.status==="pending"){var R=a;R.status="fulfilled",R.value=m}},function(m){if(a.status==="pending"){var R=a;R.status="rejected",R.reason=m}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw i=a.reason,tC(i),i}throw wl=a,Pc}}function Sl(i){try{var a=i._init;return a(i._payload)}catch(f){throw f!==null&&typeof f=="object"&&typeof f.then=="function"?(wl=f,Pc):f}}var wl=null;function eC(){if(wl===null)throw Error(r(459));var i=wl;return wl=null,i}function tC(i){if(i===Pc||i===bp)throw Error(r(483))}var Nc=null,Ff=0;function wp(i){var a=Ff;return Ff+=1,Nc===null&&(Nc=[]),J2(Nc,i,a)}function Uf(i,a){a=a.props.ref,i.ref=a!==void 0?a:null}function xp(i,a){throw a.$$typeof===g?Error(r(525)):(i=Object.prototype.toString.call(a),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":i)))}function nC(i){function a(he,fe){if(i){var ve=he.deletions;ve===null?(he.deletions=[fe],he.flags|=16):ve.push(fe)}}function f(he,fe){if(!i)return null;for(;fe!==null;)a(he,fe),fe=fe.sibling;return null}function m(he){for(var fe=new Map;he!==null;)he.key!==null?fe.set(he.key,he):fe.set(he.index,he),he=he.sibling;return fe}function R(he,fe){return he=hs(he,fe),he.index=0,he.sibling=null,he}function A(he,fe,ve){return he.index=ve,i?(ve=he.alternate,ve!==null?(ve=ve.index,ve<fe?(he.flags|=67108866,fe):ve):(he.flags|=67108866,fe)):(he.flags|=1048576,fe)}function N(he){return i&&he.alternate===null&&(he.flags|=67108866),he}function W(he,fe,ve,je){return fe===null||fe.tag!==6?(fe=ev(ve,he.mode,je),fe.return=he,fe):(fe=R(fe,ve),fe.return=he,fe)}function se(he,fe,ve,je){var at=ve.type;return at===_?Ae(he,fe,ve.props.children,je,ve.key):fe!==null&&(fe.elementType===at||typeof at=="object"&&at!==null&&at.$$typeof===M&&Sl(at)===fe.type)?(fe=R(fe,ve.props),Uf(fe,ve),fe.return=he,fe):(fe=pp(ve.type,ve.key,ve.props,null,he.mode,je),Uf(fe,ve),fe.return=he,fe)}function be(he,fe,ve,je){return fe===null||fe.tag!==4||fe.stateNode.containerInfo!==ve.containerInfo||fe.stateNode.implementation!==ve.implementation?(fe=tv(ve,he.mode,je),fe.return=he,fe):(fe=R(fe,ve.children||[]),fe.return=he,fe)}function Ae(he,fe,ve,je,at){return fe===null||fe.tag!==7?(fe=ml(ve,he.mode,je,at),fe.return=he,fe):(fe=R(fe,ve),fe.return=he,fe)}function Pe(he,fe,ve){if(typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint")return fe=ev(""+fe,he.mode,ve),fe.return=he,fe;if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case b:return ve=pp(fe.type,fe.key,fe.props,null,he.mode,ve),Uf(ve,fe),ve.return=he,ve;case y:return fe=tv(fe,he.mode,ve),fe.return=he,fe;case M:return fe=Sl(fe),Pe(he,fe,ve)}if(J(fe)||q(fe))return fe=ml(fe,he.mode,ve,null),fe.return=he,fe;if(typeof fe.then=="function")return Pe(he,wp(fe),ve);if(fe.$$typeof===E)return Pe(he,yp(he,fe),ve);xp(he,fe)}return null}function Se(he,fe,ve,je){var at=fe!==null?fe.key:null;if(typeof ve=="string"&&ve!==""||typeof ve=="number"||typeof ve=="bigint")return at!==null?null:W(he,fe,""+ve,je);if(typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case b:return ve.key===at?se(he,fe,ve,je):null;case y:return ve.key===at?be(he,fe,ve,je):null;case M:return ve=Sl(ve),Se(he,fe,ve,je)}if(J(ve)||q(ve))return at!==null?null:Ae(he,fe,ve,je,null);if(typeof ve.then=="function")return Se(he,fe,wp(ve),je);if(ve.$$typeof===E)return Se(he,fe,yp(he,ve),je);xp(he,ve)}return null}function Ee(he,fe,ve,je,at){if(typeof je=="string"&&je!==""||typeof je=="number"||typeof je=="bigint")return he=he.get(ve)||null,W(fe,he,""+je,at);if(typeof je=="object"&&je!==null){switch(je.$$typeof){case b:return he=he.get(je.key===null?ve:je.key)||null,se(fe,he,je,at);case y:return he=he.get(je.key===null?ve:je.key)||null,be(fe,he,je,at);case M:return je=Sl(je),Ee(he,fe,ve,je,at)}if(J(je)||q(je))return he=he.get(ve)||null,Ae(fe,he,je,at,null);if(typeof je.then=="function")return Ee(he,fe,ve,wp(je),at);if(je.$$typeof===E)return Ee(he,fe,ve,yp(fe,je),at);xp(fe,je)}return null}function Xe(he,fe,ve,je){for(var at=null,Jt=null,tt=fe,Rt=fe=0,Ut=null;tt!==null&&Rt<ve.length;Rt++){tt.index>Rt?(Ut=tt,tt=null):Ut=tt.sibling;var en=Se(he,tt,ve[Rt],je);if(en===null){tt===null&&(tt=Ut);break}i&&tt&&en.alternate===null&&a(he,tt),fe=A(en,fe,Rt),Jt===null?at=en:Jt.sibling=en,Jt=en,tt=Ut}if(Rt===ve.length)return f(he,tt),Ht&&ps(he,Rt),at;if(tt===null){for(;Rt<ve.length;Rt++)tt=Pe(he,ve[Rt],je),tt!==null&&(fe=A(tt,fe,Rt),Jt===null?at=tt:Jt.sibling=tt,Jt=tt);return Ht&&ps(he,Rt),at}for(tt=m(tt);Rt<ve.length;Rt++)Ut=Ee(tt,he,Rt,ve[Rt],je),Ut!==null&&(i&&Ut.alternate!==null&&tt.delete(Ut.key===null?Rt:Ut.key),fe=A(Ut,fe,Rt),Jt===null?at=Ut:Jt.sibling=Ut,Jt=Ut);return i&&tt.forEach(function(ba){return a(he,ba)}),Ht&&ps(he,Rt),at}function ut(he,fe,ve,je){if(ve==null)throw Error(r(151));for(var at=null,Jt=null,tt=fe,Rt=fe=0,Ut=null,en=ve.next();tt!==null&&!en.done;Rt++,en=ve.next()){tt.index>Rt?(Ut=tt,tt=null):Ut=tt.sibling;var ba=Se(he,tt,en.value,je);if(ba===null){tt===null&&(tt=Ut);break}i&&tt&&ba.alternate===null&&a(he,tt),fe=A(ba,fe,Rt),Jt===null?at=ba:Jt.sibling=ba,Jt=ba,tt=Ut}if(en.done)return f(he,tt),Ht&&ps(he,Rt),at;if(tt===null){for(;!en.done;Rt++,en=ve.next())en=Pe(he,en.value,je),en!==null&&(fe=A(en,fe,Rt),Jt===null?at=en:Jt.sibling=en,Jt=en);return Ht&&ps(he,Rt),at}for(tt=m(tt);!en.done;Rt++,en=ve.next())en=Ee(tt,he,Rt,en.value,je),en!==null&&(i&&en.alternate!==null&&tt.delete(en.key===null?Rt:en.key),fe=A(en,fe,Rt),Jt===null?at=en:Jt.sibling=en,Jt=en);return i&&tt.forEach(function(HL){return a(he,HL)}),Ht&&ps(he,Rt),at}function xn(he,fe,ve,je){if(typeof ve=="object"&&ve!==null&&ve.type===_&&ve.key===null&&(ve=ve.props.children),typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case b:e:{for(var at=ve.key;fe!==null;){if(fe.key===at){if(at=ve.type,at===_){if(fe.tag===7){f(he,fe.sibling),je=R(fe,ve.props.children),je.return=he,he=je;break e}}else if(fe.elementType===at||typeof at=="object"&&at!==null&&at.$$typeof===M&&Sl(at)===fe.type){f(he,fe.sibling),je=R(fe,ve.props),Uf(je,ve),je.return=he,he=je;break e}f(he,fe);break}else a(he,fe);fe=fe.sibling}ve.type===_?(je=ml(ve.props.children,he.mode,je,ve.key),je.return=he,he=je):(je=pp(ve.type,ve.key,ve.props,null,he.mode,je),Uf(je,ve),je.return=he,he=je)}return N(he);case y:e:{for(at=ve.key;fe!==null;){if(fe.key===at)if(fe.tag===4&&fe.stateNode.containerInfo===ve.containerInfo&&fe.stateNode.implementation===ve.implementation){f(he,fe.sibling),je=R(fe,ve.children||[]),je.return=he,he=je;break e}else{f(he,fe);break}else a(he,fe);fe=fe.sibling}je=tv(ve,he.mode,je),je.return=he,he=je}return N(he);case M:return ve=Sl(ve),xn(he,fe,ve,je)}if(J(ve))return Xe(he,fe,ve,je);if(q(ve)){if(at=q(ve),typeof at!="function")throw Error(r(150));return ve=at.call(ve),ut(he,fe,ve,je)}if(typeof ve.then=="function")return xn(he,fe,wp(ve),je);if(ve.$$typeof===E)return xn(he,fe,yp(he,ve),je);xp(he,ve)}return typeof ve=="string"&&ve!==""||typeof ve=="number"||typeof ve=="bigint"?(ve=""+ve,fe!==null&&fe.tag===6?(f(he,fe.sibling),je=R(fe,ve),je.return=he,he=je):(f(he,fe),je=ev(ve,he.mode,je),je.return=he,he=je),N(he)):f(he,fe)}return function(he,fe,ve,je){try{Ff=0;var at=xn(he,fe,ve,je);return Nc=null,at}catch(tt){if(tt===Pc||tt===bp)throw tt;var Jt=Eo(29,tt,null,he.mode);return Jt.lanes=je,Jt.return=he,Jt}}}var xl=nC(!0),rC=nC(!1),na=!1;function hv(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function pv(i,a){i=i.updateQueue,a.updateQueue===i&&(a.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function ra(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function oa(i,a,f){var m=i.updateQueue;if(m===null)return null;if(m=m.shared,(ln&2)!==0){var R=m.pending;return R===null?a.next=a:(a.next=R.next,R.next=a),m.pending=a,a=hp(i),F2(i,null,f),a}return dp(i,m,a,f),hp(i)}function Vf(i,a,f){if(a=a.updateQueue,a!==null&&(a=a.shared,(f&4194048)!==0)){var m=a.lanes;m&=i.pendingLanes,f|=m,a.lanes=f,an(i,f)}}function mv(i,a){var f=i.updateQueue,m=i.alternate;if(m!==null&&(m=m.updateQueue,f===m)){var R=null,A=null;if(f=f.firstBaseUpdate,f!==null){do{var N={lane:f.lane,tag:f.tag,payload:f.payload,callback:null,next:null};A===null?R=A=N:A=A.next=N,f=f.next}while(f!==null);A===null?R=A=a:A=A.next=a}else R=A=a;f={baseState:m.baseState,firstBaseUpdate:R,lastBaseUpdate:A,shared:m.shared,callbacks:m.callbacks},i.updateQueue=f;return}i=f.lastBaseUpdate,i===null?f.firstBaseUpdate=a:i.next=a,f.lastBaseUpdate=a}var gv=!1;function qf(){if(gv){var i=jc;if(i!==null)throw i}}function Bf(i,a,f,m){gv=!1;var R=i.updateQueue;na=!1;var A=R.firstBaseUpdate,N=R.lastBaseUpdate,W=R.shared.pending;if(W!==null){R.shared.pending=null;var se=W,be=se.next;se.next=null,N===null?A=be:N.next=be,N=se;var Ae=i.alternate;Ae!==null&&(Ae=Ae.updateQueue,W=Ae.lastBaseUpdate,W!==N&&(W===null?Ae.firstBaseUpdate=be:W.next=be,Ae.lastBaseUpdate=se))}if(A!==null){var Pe=R.baseState;N=0,Ae=be=se=null,W=A;do{var Se=W.lane&-536870913,Ee=Se!==W.lane;if(Ee?(Ft&Se)===Se:(m&Se)===Se){Se!==0&&Se===Mc&&(gv=!0),Ae!==null&&(Ae=Ae.next={lane:0,tag:W.tag,payload:W.payload,callback:null,next:null});e:{var Xe=i,ut=W;Se=a;var xn=f;switch(ut.tag){case 1:if(Xe=ut.payload,typeof Xe=="function"){Pe=Xe.call(xn,Pe,Se);break e}Pe=Xe;break e;case 3:Xe.flags=Xe.flags&-65537|128;case 0:if(Xe=ut.payload,Se=typeof Xe=="function"?Xe.call(xn,Pe,Se):Xe,Se==null)break e;Pe=p({},Pe,Se);break e;case 2:na=!0}}Se=W.callback,Se!==null&&(i.flags|=64,Ee&&(i.flags|=8192),Ee=R.callbacks,Ee===null?R.callbacks=[Se]:Ee.push(Se))}else Ee={lane:Se,tag:W.tag,payload:W.payload,callback:W.callback,next:null},Ae===null?(be=Ae=Ee,se=Pe):Ae=Ae.next=Ee,N|=Se;if(W=W.next,W===null){if(W=R.shared.pending,W===null)break;Ee=W,W=Ee.next,Ee.next=null,R.lastBaseUpdate=Ee,R.shared.pending=null}}while(!0);Ae===null&&(se=Pe),R.baseState=se,R.firstBaseUpdate=be,R.lastBaseUpdate=Ae,A===null&&(R.shared.lanes=0),ca|=N,i.lanes=N,i.memoizedState=Pe}}function oC(i,a){if(typeof i!="function")throw Error(r(191,i));i.call(a)}function iC(i,a){var f=i.callbacks;if(f!==null)for(i.callbacks=null,i=0;i<f.length;i++)oC(f[i],a)}var Dc=$(null),_p=$(0);function sC(i,a){i=Cs,U(_p,i),U(Dc,a),Cs=i|a.baseLanes}function yv(){U(_p,Cs),U(Dc,Dc.current)}function vv(){Cs=_p.current,V(Dc),V(_p)}var Co=$(null),Zo=null;function ia(i){var a=i.alternate;U(lr,lr.current&1),U(Co,i),Zo===null&&(a===null||Dc.current!==null||a.memoizedState!==null)&&(Zo=i)}function bv(i){U(lr,lr.current),U(Co,i),Zo===null&&(Zo=i)}function aC(i){i.tag===22?(U(lr,lr.current),U(Co,i),Zo===null&&(Zo=i)):sa()}function sa(){U(lr,lr.current),U(Co,Co.current)}function To(i){V(Co),Zo===i&&(Zo=null),V(lr)}var lr=$(0);function Ep(i){for(var a=i;a!==null;){if(a.tag===13){var f=a.memoizedState;if(f!==null&&(f=f.dehydrated,f===null||Cb(f)||Tb(f)))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===i)break;for(;a.sibling===null;){if(a.return===null||a.return===i)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var ys=0,Ct=null,Sn=null,hr=null,Cp=!1,$c=!1,_l=!1,Tp=0,Hf=0,Ic=null,D8=0;function er(){throw Error(r(321))}function Sv(i,a){if(a===null)return!1;for(var f=0;f<a.length&&f<i.length;f++)if(!_o(i[f],a[f]))return!1;return!0}function wv(i,a,f,m,R,A){return ys=A,Ct=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,Z.H=i===null||i.memoizedState===null?BC:$v,_l=!1,A=f(m,R),_l=!1,$c&&(A=cC(a,f,m,R)),lC(i),A}function lC(i){Z.H=Zf;var a=Sn!==null&&Sn.next!==null;if(ys=0,hr=Sn=Ct=null,Cp=!1,Hf=0,Ic=null,a)throw Error(r(300));i===null||pr||(i=i.dependencies,i!==null&&gp(i)&&(pr=!0))}function cC(i,a,f,m){Ct=i;var R=0;do{if($c&&(Ic=null),Hf=0,$c=!1,25<=R)throw Error(r(301));if(R+=1,hr=Sn=null,i.updateQueue!=null){var A=i.updateQueue;A.lastEffect=null,A.events=null,A.stores=null,A.memoCache!=null&&(A.memoCache.index=0)}Z.H=HC,A=a(f,m)}while($c);return A}function $8(){var i=Z.H,a=i.useState()[0];return a=typeof a.then=="function"?Kf(a):a,i=i.useState()[0],(Sn!==null?Sn.memoizedState:null)!==i&&(Ct.flags|=1024),a}function xv(){var i=Tp!==0;return Tp=0,i}function _v(i,a,f){a.updateQueue=i.updateQueue,a.flags&=-2053,i.lanes&=~f}function Ev(i){if(Cp){for(i=i.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}Cp=!1}ys=0,hr=Sn=Ct=null,$c=!1,Hf=Tp=0,Ic=null}function io(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return hr===null?Ct.memoizedState=hr=i:hr=hr.next=i,hr}function cr(){if(Sn===null){var i=Ct.alternate;i=i!==null?i.memoizedState:null}else i=Sn.next;var a=hr===null?Ct.memoizedState:hr.next;if(a!==null)hr=a,Sn=i;else{if(i===null)throw Ct.alternate===null?Error(r(467)):Error(r(310));Sn=i,i={memoizedState:Sn.memoizedState,baseState:Sn.baseState,baseQueue:Sn.baseQueue,queue:Sn.queue,next:null},hr===null?Ct.memoizedState=hr=i:hr=hr.next=i}return hr}function Rp(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Kf(i){var a=Hf;return Hf+=1,Ic===null&&(Ic=[]),i=J2(Ic,i,a),a=Ct,(hr===null?a.memoizedState:hr.next)===null&&(a=a.alternate,Z.H=a===null||a.memoizedState===null?BC:$v),i}function Op(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return Kf(i);if(i.$$typeof===E)return zr(i)}throw Error(r(438,String(i)))}function Cv(i){var a=null,f=Ct.updateQueue;if(f!==null&&(a=f.memoCache),a==null){var m=Ct.alternate;m!==null&&(m=m.updateQueue,m!==null&&(m=m.memoCache,m!=null&&(a={data:m.data.map(function(R){return R.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),f===null&&(f=Rp(),Ct.updateQueue=f),f.memoCache=a,f=a.data[a.index],f===void 0)for(f=a.data[a.index]=Array(i),m=0;m<i;m++)f[m]=z;return a.index++,f}function vs(i,a){return typeof a=="function"?a(i):a}function Ap(i){var a=cr();return Tv(a,Sn,i)}function Tv(i,a,f){var m=i.queue;if(m===null)throw Error(r(311));m.lastRenderedReducer=f;var R=i.baseQueue,A=m.pending;if(A!==null){if(R!==null){var N=R.next;R.next=A.next,A.next=N}a.baseQueue=R=A,m.pending=null}if(A=i.baseState,R===null)i.memoizedState=A;else{a=R.next;var W=N=null,se=null,be=a,Ae=!1;do{var Pe=be.lane&-536870913;if(Pe!==be.lane?(Ft&Pe)===Pe:(ys&Pe)===Pe){var Se=be.revertLane;if(Se===0)se!==null&&(se=se.next={lane:0,revertLane:0,gesture:null,action:be.action,hasEagerState:be.hasEagerState,eagerState:be.eagerState,next:null}),Pe===Mc&&(Ae=!0);else if((ys&Se)===Se){be=be.next,Se===Mc&&(Ae=!0);continue}else Pe={lane:0,revertLane:be.revertLane,gesture:null,action:be.action,hasEagerState:be.hasEagerState,eagerState:be.eagerState,next:null},se===null?(W=se=Pe,N=A):se=se.next=Pe,Ct.lanes|=Se,ca|=Se;Pe=be.action,_l&&f(A,Pe),A=be.hasEagerState?be.eagerState:f(A,Pe)}else Se={lane:Pe,revertLane:be.revertLane,gesture:be.gesture,action:be.action,hasEagerState:be.hasEagerState,eagerState:be.eagerState,next:null},se===null?(W=se=Se,N=A):se=se.next=Se,Ct.lanes|=Pe,ca|=Pe;be=be.next}while(be!==null&&be!==a);if(se===null?N=A:se.next=W,!_o(A,i.memoizedState)&&(pr=!0,Ae&&(f=jc,f!==null)))throw f;i.memoizedState=A,i.baseState=N,i.baseQueue=se,m.lastRenderedState=A}return R===null&&(m.lanes=0),[i.memoizedState,m.dispatch]}function Rv(i){var a=cr(),f=a.queue;if(f===null)throw Error(r(311));f.lastRenderedReducer=i;var m=f.dispatch,R=f.pending,A=a.memoizedState;if(R!==null){f.pending=null;var N=R=R.next;do A=i(A,N.action),N=N.next;while(N!==R);_o(A,a.memoizedState)||(pr=!0),a.memoizedState=A,a.baseQueue===null&&(a.baseState=A),f.lastRenderedState=A}return[A,m]}function uC(i,a,f){var m=Ct,R=cr(),A=Ht;if(A){if(f===void 0)throw Error(r(407));f=f()}else f=a();var N=!_o((Sn||R).memoizedState,f);if(N&&(R.memoizedState=f,pr=!0),R=R.queue,kv(hC.bind(null,m,R,i),[i]),R.getSnapshot!==a||N||hr!==null&&hr.memoizedState.tag&1){if(m.flags|=2048,zc(9,{destroy:void 0},dC.bind(null,m,R,f,a),null),Tn===null)throw Error(r(349));A||(ys&127)!==0||fC(m,a,f)}return f}function fC(i,a,f){i.flags|=16384,i={getSnapshot:a,value:f},a=Ct.updateQueue,a===null?(a=Rp(),Ct.updateQueue=a,a.stores=[i]):(f=a.stores,f===null?a.stores=[i]:f.push(i))}function dC(i,a,f,m){a.value=f,a.getSnapshot=m,pC(a)&&mC(i)}function hC(i,a,f){return f(function(){pC(a)&&mC(i)})}function pC(i){var a=i.getSnapshot;i=i.value;try{var f=a();return!_o(i,f)}catch{return!0}}function mC(i){var a=pl(i,2);a!==null&&vo(a,i,2)}function Ov(i){var a=io();if(typeof i=="function"){var f=i;if(i=f(),_l){on(!0);try{f()}finally{on(!1)}}}return a.memoizedState=a.baseState=i,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:vs,lastRenderedState:i},a}function gC(i,a,f,m){return i.baseState=f,Tv(i,Sn,typeof m=="function"?m:vs)}function I8(i,a,f,m,R){if(jp(i))throw Error(r(485));if(i=a.action,i!==null){var A={payload:R,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(N){A.listeners.push(N)}};Z.T!==null?f(!0):A.isTransition=!1,m(A),f=a.pending,f===null?(A.next=a.pending=A,yC(a,A)):(A.next=f.next,a.pending=f.next=A)}}function yC(i,a){var f=a.action,m=a.payload,R=i.state;if(a.isTransition){var A=Z.T,N={};Z.T=N;try{var W=f(R,m),se=Z.S;se!==null&&se(N,W),vC(i,a,W)}catch(be){Av(i,a,be)}finally{A!==null&&N.types!==null&&(A.types=N.types),Z.T=A}}else try{A=f(R,m),vC(i,a,A)}catch(be){Av(i,a,be)}}function vC(i,a,f){f!==null&&typeof f=="object"&&typeof f.then=="function"?f.then(function(m){bC(i,a,m)},function(m){return Av(i,a,m)}):bC(i,a,f)}function bC(i,a,f){a.status="fulfilled",a.value=f,SC(a),i.state=f,a=i.pending,a!==null&&(f=a.next,f===a?i.pending=null:(f=f.next,a.next=f,yC(i,f)))}function Av(i,a,f){var m=i.pending;if(i.pending=null,m!==null){m=m.next;do a.status="rejected",a.reason=f,SC(a),a=a.next;while(a!==m)}i.action=null}function SC(i){i=i.listeners;for(var a=0;a<i.length;a++)(0,i[a])()}function wC(i,a){return a}function xC(i,a){if(Ht){var f=Tn.formState;if(f!==null){e:{var m=Ct;if(Ht){if(jn){t:{for(var R=jn,A=Go;R.nodeType!==8;){if(!A){R=null;break t}if(R=Wo(R.nextSibling),R===null){R=null;break t}}A=R.data,R=A==="F!"||A==="F"?R:null}if(R){jn=Wo(R.nextSibling),m=R.data==="F!";break e}}ea(m)}m=!1}m&&(a=f[0])}}return f=io(),f.memoizedState=f.baseState=a,m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:wC,lastRenderedState:a},f.queue=m,f=UC.bind(null,Ct,m),m.dispatch=f,m=Ov(!1),A=Dv.bind(null,Ct,!1,m.queue),m=io(),R={state:a,dispatch:null,action:i,pending:null},m.queue=R,f=I8.bind(null,Ct,R,A,f),R.dispatch=f,m.memoizedState=i,[a,f,!1]}function _C(i){var a=cr();return EC(a,Sn,i)}function EC(i,a,f){if(a=Tv(i,a,wC)[0],i=Ap(vs)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var m=Kf(a)}catch(N){throw N===Pc?bp:N}else m=a;a=cr();var R=a.queue,A=R.dispatch;return f!==a.memoizedState&&(Ct.flags|=2048,zc(9,{destroy:void 0},z8.bind(null,R,f),null)),[m,A,i]}function z8(i,a){i.action=a}function CC(i){var a=cr(),f=Sn;if(f!==null)return EC(a,f,i);cr(),a=a.memoizedState,f=cr();var m=f.queue.dispatch;return f.memoizedState=i,[a,m,!1]}function zc(i,a,f,m){return i={tag:i,create:f,deps:m,inst:a,next:null},a=Ct.updateQueue,a===null&&(a=Rp(),Ct.updateQueue=a),f=a.lastEffect,f===null?a.lastEffect=i.next=i:(m=f.next,f.next=i,i.next=m,a.lastEffect=i),i}function TC(){return cr().memoizedState}function kp(i,a,f,m){var R=io();Ct.flags|=i,R.memoizedState=zc(1|a,{destroy:void 0},f,m===void 0?null:m)}function Mp(i,a,f,m){var R=cr();m=m===void 0?null:m;var A=R.memoizedState.inst;Sn!==null&&m!==null&&Sv(m,Sn.memoizedState.deps)?R.memoizedState=zc(a,A,f,m):(Ct.flags|=i,R.memoizedState=zc(1|a,A,f,m))}function RC(i,a){kp(8390656,8,i,a)}function kv(i,a){Mp(2048,8,i,a)}function L8(i){Ct.flags|=4;var a=Ct.updateQueue;if(a===null)a=Rp(),Ct.updateQueue=a,a.events=[i];else{var f=a.events;f===null?a.events=[i]:f.push(i)}}function OC(i){var a=cr().memoizedState;return L8({ref:a,nextImpl:i}),function(){if((ln&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}function AC(i,a){return Mp(4,2,i,a)}function kC(i,a){return Mp(4,4,i,a)}function MC(i,a){if(typeof a=="function"){i=i();var f=a(i);return function(){typeof f=="function"?f():a(null)}}if(a!=null)return i=i(),a.current=i,function(){a.current=null}}function jC(i,a,f){f=f!=null?f.concat([i]):null,Mp(4,4,MC.bind(null,a,i),f)}function Mv(){}function PC(i,a){var f=cr();a=a===void 0?null:a;var m=f.memoizedState;return a!==null&&Sv(a,m[1])?m[0]:(f.memoizedState=[i,a],i)}function NC(i,a){var f=cr();a=a===void 0?null:a;var m=f.memoizedState;if(a!==null&&Sv(a,m[1]))return m[0];if(m=i(),_l){on(!0);try{i()}finally{on(!1)}}return f.memoizedState=[m,a],m}function jv(i,a,f){return f===void 0||(ys&1073741824)!==0&&(Ft&261930)===0?i.memoizedState=a:(i.memoizedState=f,i=DT(),Ct.lanes|=i,ca|=i,f)}function DC(i,a,f,m){return _o(f,a)?f:Dc.current!==null?(i=jv(i,f,m),_o(i,a)||(pr=!0),i):(ys&42)===0||(ys&1073741824)!==0&&(Ft&261930)===0?(pr=!0,i.memoizedState=f):(i=DT(),Ct.lanes|=i,ca|=i,a)}function $C(i,a,f,m,R){var A=H.p;H.p=A!==0&&8>A?A:8;var N=Z.T,W={};Z.T=W,Dv(i,!1,a,f);try{var se=R(),be=Z.S;if(be!==null&&be(W,se),se!==null&&typeof se=="object"&&typeof se.then=="function"){var Ae=N8(se,m);Gf(i,a,Ae,Ao(i))}else Gf(i,a,m,Ao(i))}catch(Pe){Gf(i,a,{then:function(){},status:"rejected",reason:Pe},Ao())}finally{H.p=A,N!==null&&W.types!==null&&(N.types=W.types),Z.T=N}}function F8(){}function Pv(i,a,f,m){if(i.tag!==5)throw Error(r(476));var R=IC(i).queue;$C(i,R,a,Y,f===null?F8:function(){return zC(i),f(m)})}function IC(i){var a=i.memoizedState;if(a!==null)return a;a={memoizedState:Y,baseState:Y,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:vs,lastRenderedState:Y},next:null};var f={};return a.next={memoizedState:f,baseState:f,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:vs,lastRenderedState:f},next:null},i.memoizedState=a,i=i.alternate,i!==null&&(i.memoizedState=a),a}function zC(i){var a=IC(i);a.next===null&&(a=i.alternate.memoizedState),Gf(i,a.next.queue,{},Ao())}function Nv(){return zr(ud)}function LC(){return cr().memoizedState}function FC(){return cr().memoizedState}function U8(i){for(var a=i.return;a!==null;){switch(a.tag){case 24:case 3:var f=Ao();i=ra(f);var m=oa(a,i,f);m!==null&&(vo(m,a,f),Vf(m,a,f)),a={cache:cv()},i.payload=a;return}a=a.return}}function V8(i,a,f){var m=Ao();f={lane:m,revertLane:0,gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null},jp(i)?VC(a,f):(f=Q0(i,a,f,m),f!==null&&(vo(f,i,m),qC(f,a,m)))}function UC(i,a,f){var m=Ao();Gf(i,a,f,m)}function Gf(i,a,f,m){var R={lane:m,revertLane:0,gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null};if(jp(i))VC(a,R);else{var A=i.alternate;if(i.lanes===0&&(A===null||A.lanes===0)&&(A=a.lastRenderedReducer,A!==null))try{var N=a.lastRenderedState,W=A(N,f);if(R.hasEagerState=!0,R.eagerState=W,_o(W,N))return dp(i,a,R,0),Tn===null&&fp(),!1}catch{}if(f=Q0(i,a,R,m),f!==null)return vo(f,i,m),qC(f,a,m),!0}return!1}function Dv(i,a,f,m){if(m={lane:2,revertLane:hb(),gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},jp(i)){if(a)throw Error(r(479))}else a=Q0(i,f,m,2),a!==null&&vo(a,i,2)}function jp(i){var a=i.alternate;return i===Ct||a!==null&&a===Ct}function VC(i,a){$c=Cp=!0;var f=i.pending;f===null?a.next=a:(a.next=f.next,f.next=a),i.pending=a}function qC(i,a,f){if((f&4194048)!==0){var m=a.lanes;m&=i.pendingLanes,f|=m,a.lanes=f,an(i,f)}}var Zf={readContext:zr,use:Op,useCallback:er,useContext:er,useEffect:er,useImperativeHandle:er,useLayoutEffect:er,useInsertionEffect:er,useMemo:er,useReducer:er,useRef:er,useState:er,useDebugValue:er,useDeferredValue:er,useTransition:er,useSyncExternalStore:er,useId:er,useHostTransitionStatus:er,useFormState:er,useActionState:er,useOptimistic:er,useMemoCache:er,useCacheRefresh:er};Zf.useEffectEvent=er;var BC={readContext:zr,use:Op,useCallback:function(i,a){return io().memoizedState=[i,a===void 0?null:a],i},useContext:zr,useEffect:RC,useImperativeHandle:function(i,a,f){f=f!=null?f.concat([i]):null,kp(4194308,4,MC.bind(null,a,i),f)},useLayoutEffect:function(i,a){return kp(4194308,4,i,a)},useInsertionEffect:function(i,a){kp(4,2,i,a)},useMemo:function(i,a){var f=io();a=a===void 0?null:a;var m=i();if(_l){on(!0);try{i()}finally{on(!1)}}return f.memoizedState=[m,a],m},useReducer:function(i,a,f){var m=io();if(f!==void 0){var R=f(a);if(_l){on(!0);try{f(a)}finally{on(!1)}}}else R=a;return m.memoizedState=m.baseState=R,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:R},m.queue=i,i=i.dispatch=V8.bind(null,Ct,i),[m.memoizedState,i]},useRef:function(i){var a=io();return i={current:i},a.memoizedState=i},useState:function(i){i=Ov(i);var a=i.queue,f=UC.bind(null,Ct,a);return a.dispatch=f,[i.memoizedState,f]},useDebugValue:Mv,useDeferredValue:function(i,a){var f=io();return jv(f,i,a)},useTransition:function(){var i=Ov(!1);return i=$C.bind(null,Ct,i.queue,!0,!1),io().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,a,f){var m=Ct,R=io();if(Ht){if(f===void 0)throw Error(r(407));f=f()}else{if(f=a(),Tn===null)throw Error(r(349));(Ft&127)!==0||fC(m,a,f)}R.memoizedState=f;var A={value:f,getSnapshot:a};return R.queue=A,RC(hC.bind(null,m,A,i),[i]),m.flags|=2048,zc(9,{destroy:void 0},dC.bind(null,m,A,f,a),null),f},useId:function(){var i=io(),a=Tn.identifierPrefix;if(Ht){var f=Pi,m=ji;f=(m&~(1<<32-qt(m)-1)).toString(32)+f,a="_"+a+"R_"+f,f=Tp++,0<f&&(a+="H"+f.toString(32)),a+="_"}else f=D8++,a="_"+a+"r_"+f.toString(32)+"_";return i.memoizedState=a},useHostTransitionStatus:Nv,useFormState:xC,useActionState:xC,useOptimistic:function(i){var a=io();a.memoizedState=a.baseState=i;var f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=f,a=Dv.bind(null,Ct,!0,f),f.dispatch=a,[i,a]},useMemoCache:Cv,useCacheRefresh:function(){return io().memoizedState=U8.bind(null,Ct)},useEffectEvent:function(i){var a=io(),f={impl:i};return a.memoizedState=f,function(){if((ln&2)!==0)throw Error(r(440));return f.impl.apply(void 0,arguments)}}},$v={readContext:zr,use:Op,useCallback:PC,useContext:zr,useEffect:kv,useImperativeHandle:jC,useInsertionEffect:AC,useLayoutEffect:kC,useMemo:NC,useReducer:Ap,useRef:TC,useState:function(){return Ap(vs)},useDebugValue:Mv,useDeferredValue:function(i,a){var f=cr();return DC(f,Sn.memoizedState,i,a)},useTransition:function(){var i=Ap(vs)[0],a=cr().memoizedState;return[typeof i=="boolean"?i:Kf(i),a]},useSyncExternalStore:uC,useId:LC,useHostTransitionStatus:Nv,useFormState:_C,useActionState:_C,useOptimistic:function(i,a){var f=cr();return gC(f,Sn,i,a)},useMemoCache:Cv,useCacheRefresh:FC};$v.useEffectEvent=OC;var HC={readContext:zr,use:Op,useCallback:PC,useContext:zr,useEffect:kv,useImperativeHandle:jC,useInsertionEffect:AC,useLayoutEffect:kC,useMemo:NC,useReducer:Rv,useRef:TC,useState:function(){return Rv(vs)},useDebugValue:Mv,useDeferredValue:function(i,a){var f=cr();return Sn===null?jv(f,i,a):DC(f,Sn.memoizedState,i,a)},useTransition:function(){var i=Rv(vs)[0],a=cr().memoizedState;return[typeof i=="boolean"?i:Kf(i),a]},useSyncExternalStore:uC,useId:LC,useHostTransitionStatus:Nv,useFormState:CC,useActionState:CC,useOptimistic:function(i,a){var f=cr();return Sn!==null?gC(f,Sn,i,a):(f.baseState=i,[i,f.queue.dispatch])},useMemoCache:Cv,useCacheRefresh:FC};HC.useEffectEvent=OC;function Iv(i,a,f,m){a=i.memoizedState,f=f(m,a),f=f==null?a:p({},a,f),i.memoizedState=f,i.lanes===0&&(i.updateQueue.baseState=f)}var zv={enqueueSetState:function(i,a,f){i=i._reactInternals;var m=Ao(),R=ra(m);R.payload=a,f!=null&&(R.callback=f),a=oa(i,R,m),a!==null&&(vo(a,i,m),Vf(a,i,m))},enqueueReplaceState:function(i,a,f){i=i._reactInternals;var m=Ao(),R=ra(m);R.tag=1,R.payload=a,f!=null&&(R.callback=f),a=oa(i,R,m),a!==null&&(vo(a,i,m),Vf(a,i,m))},enqueueForceUpdate:function(i,a){i=i._reactInternals;var f=Ao(),m=ra(f);m.tag=2,a!=null&&(m.callback=a),a=oa(i,m,f),a!==null&&(vo(a,i,f),Vf(a,i,f))}};function KC(i,a,f,m,R,A,N){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(m,A,N):a.prototype&&a.prototype.isPureReactComponent?!Nf(f,m)||!Nf(R,A):!0}function GC(i,a,f,m){i=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(f,m),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(f,m),a.state!==i&&zv.enqueueReplaceState(a,a.state,null)}function El(i,a){var f=a;if("ref"in a){f={};for(var m in a)m!=="ref"&&(f[m]=a[m])}if(i=i.defaultProps){f===a&&(f=p({},f));for(var R in i)f[R]===void 0&&(f[R]=i[R])}return f}function ZC(i){up(i)}function WC(i){console.error(i)}function YC(i){up(i)}function Pp(i,a){try{var f=i.onUncaughtError;f(a.value,{componentStack:a.stack})}catch(m){setTimeout(function(){throw m})}}function XC(i,a,f){try{var m=i.onCaughtError;m(f.value,{componentStack:f.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(R){setTimeout(function(){throw R})}}function Lv(i,a,f){return f=ra(f),f.tag=3,f.payload={element:null},f.callback=function(){Pp(i,a)},f}function QC(i){return i=ra(i),i.tag=3,i}function JC(i,a,f,m){var R=f.type.getDerivedStateFromError;if(typeof R=="function"){var A=m.value;i.payload=function(){return R(A)},i.callback=function(){XC(a,f,m)}}var N=f.stateNode;N!==null&&typeof N.componentDidCatch=="function"&&(i.callback=function(){XC(a,f,m),typeof R!="function"&&(ua===null?ua=new Set([this]):ua.add(this));var W=m.stack;this.componentDidCatch(m.value,{componentStack:W!==null?W:""})})}function q8(i,a,f,m,R){if(f.flags|=32768,m!==null&&typeof m=="object"&&typeof m.then=="function"){if(a=f.alternate,a!==null&&kc(a,f,R,!0),f=Co.current,f!==null){switch(f.tag){case 31:case 13:return Zo===null?Hp():f.alternate===null&&tr===0&&(tr=3),f.flags&=-257,f.flags|=65536,f.lanes=R,m===Sp?f.flags|=16384:(a=f.updateQueue,a===null?f.updateQueue=new Set([m]):a.add(m),ub(i,m,R)),!1;case 22:return f.flags|=65536,m===Sp?f.flags|=16384:(a=f.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([m])},f.updateQueue=a):(f=a.retryQueue,f===null?a.retryQueue=new Set([m]):f.add(m)),ub(i,m,R)),!1}throw Error(r(435,f.tag))}return ub(i,m,R),Hp(),!1}if(Ht)return a=Co.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=R,m!==ov&&(i=Error(r(422),{cause:m}),If(Bo(i,f)))):(m!==ov&&(a=Error(r(423),{cause:m}),If(Bo(a,f))),i=i.current.alternate,i.flags|=65536,R&=-R,i.lanes|=R,m=Bo(m,f),R=Lv(i.stateNode,m,R),mv(i,R),tr!==4&&(tr=2)),!1;var A=Error(r(520),{cause:m});if(A=Bo(A,f),nd===null?nd=[A]:nd.push(A),tr!==4&&(tr=2),a===null)return!0;m=Bo(m,f),f=a;do{switch(f.tag){case 3:return f.flags|=65536,i=R&-R,f.lanes|=i,i=Lv(f.stateNode,m,i),mv(f,i),!1;case 1:if(a=f.type,A=f.stateNode,(f.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||A!==null&&typeof A.componentDidCatch=="function"&&(ua===null||!ua.has(A))))return f.flags|=65536,R&=-R,f.lanes|=R,R=QC(R),JC(R,i,f,m),mv(f,R),!1}f=f.return}while(f!==null);return!1}var Fv=Error(r(461)),pr=!1;function Lr(i,a,f,m){a.child=i===null?rC(a,null,f,m):xl(a,i.child,f,m)}function eT(i,a,f,m,R){f=f.render;var A=a.ref;if("ref"in m){var N={};for(var W in m)W!=="ref"&&(N[W]=m[W])}else N=m;return vl(a),m=wv(i,a,f,N,A,R),W=xv(),i!==null&&!pr?(_v(i,a,R),bs(i,a,R)):(Ht&&W&&nv(a),a.flags|=1,Lr(i,a,m,R),a.child)}function tT(i,a,f,m,R){if(i===null){var A=f.type;return typeof A=="function"&&!J0(A)&&A.defaultProps===void 0&&f.compare===null?(a.tag=15,a.type=A,nT(i,a,A,m,R)):(i=pp(f.type,null,m,a,a.mode,R),i.ref=a.ref,i.return=a,a.child=i)}if(A=i.child,!Zv(i,R)){var N=A.memoizedProps;if(f=f.compare,f=f!==null?f:Nf,f(N,m)&&i.ref===a.ref)return bs(i,a,R)}return a.flags|=1,i=hs(A,m),i.ref=a.ref,i.return=a,a.child=i}function nT(i,a,f,m,R){if(i!==null){var A=i.memoizedProps;if(Nf(A,m)&&i.ref===a.ref)if(pr=!1,a.pendingProps=m=A,Zv(i,R))(i.flags&131072)!==0&&(pr=!0);else return a.lanes=i.lanes,bs(i,a,R)}return Uv(i,a,f,m,R)}function rT(i,a,f,m){var R=m.children,A=i!==null?i.memoizedState:null;if(i===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),m.mode==="hidden"){if((a.flags&128)!==0){if(A=A!==null?A.baseLanes|f:f,i!==null){for(m=a.child=i.child,R=0;m!==null;)R=R|m.lanes|m.childLanes,m=m.sibling;m=R&~A}else m=0,a.child=null;return oT(i,a,A,f,m)}if((f&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},i!==null&&vp(a,A!==null?A.cachePool:null),A!==null?sC(a,A):yv(),aC(a);else return m=a.lanes=536870912,oT(i,a,A!==null?A.baseLanes|f:f,f,m)}else A!==null?(vp(a,A.cachePool),sC(a,A),sa(),a.memoizedState=null):(i!==null&&vp(a,null),yv(),sa());return Lr(i,a,R,f),a.child}function Wf(i,a){return i!==null&&i.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function oT(i,a,f,m,R){var A=fv();return A=A===null?null:{parent:dr._currentValue,pool:A},a.memoizedState={baseLanes:f,cachePool:A},i!==null&&vp(a,null),yv(),aC(a),i!==null&&kc(i,a,m,!0),a.childLanes=R,null}function Np(i,a){return a=$p({mode:a.mode,children:a.children},i.mode),a.ref=i.ref,i.child=a,a.return=i,a}function iT(i,a,f){return xl(a,i.child,null,f),i=Np(a,a.pendingProps),i.flags|=2,To(a),a.memoizedState=null,i}function B8(i,a,f){var m=a.pendingProps,R=(a.flags&128)!==0;if(a.flags&=-129,i===null){if(Ht){if(m.mode==="hidden")return i=Np(a,m),a.lanes=536870912,Wf(null,i);if(bv(a),(i=jn)?(i=yR(i,Go),i=i!==null&&i.data==="&"?i:null,i!==null&&(a.memoizedState={dehydrated:i,treeContext:Qs!==null?{id:ji,overflow:Pi}:null,retryLane:536870912,hydrationErrors:null},f=V2(i),f.return=a,a.child=f,Ir=a,jn=null)):i=null,i===null)throw ea(a);return a.lanes=536870912,null}return Np(a,m)}var A=i.memoizedState;if(A!==null){var N=A.dehydrated;if(bv(a),R)if(a.flags&256)a.flags&=-257,a=iT(i,a,f);else if(a.memoizedState!==null)a.child=i.child,a.flags|=128,a=null;else throw Error(r(558));else if(pr||kc(i,a,f,!1),R=(f&i.childLanes)!==0,pr||R){if(m=Tn,m!==null&&(N=ir(m,f),N!==0&&N!==A.retryLane))throw A.retryLane=N,pl(i,N),vo(m,i,N),Fv;Hp(),a=iT(i,a,f)}else i=A.treeContext,jn=Wo(N.nextSibling),Ir=a,Ht=!0,Js=null,Go=!1,i!==null&&H2(a,i),a=Np(a,m),a.flags|=4096;return a}return i=hs(i.child,{mode:m.mode,children:m.children}),i.ref=a.ref,a.child=i,i.return=a,i}function Dp(i,a){var f=a.ref;if(f===null)i!==null&&i.ref!==null&&(a.flags|=4194816);else{if(typeof f!="function"&&typeof f!="object")throw Error(r(284));(i===null||i.ref!==f)&&(a.flags|=4194816)}}function Uv(i,a,f,m,R){return vl(a),f=wv(i,a,f,m,void 0,R),m=xv(),i!==null&&!pr?(_v(i,a,R),bs(i,a,R)):(Ht&&m&&nv(a),a.flags|=1,Lr(i,a,f,R),a.child)}function sT(i,a,f,m,R,A){return vl(a),a.updateQueue=null,f=cC(a,m,f,R),lC(i),m=xv(),i!==null&&!pr?(_v(i,a,A),bs(i,a,A)):(Ht&&m&&nv(a),a.flags|=1,Lr(i,a,f,A),a.child)}function aT(i,a,f,m,R){if(vl(a),a.stateNode===null){var A=Tc,N=f.contextType;typeof N=="object"&&N!==null&&(A=zr(N)),A=new f(m,A),a.memoizedState=A.state!==null&&A.state!==void 0?A.state:null,A.updater=zv,a.stateNode=A,A._reactInternals=a,A=a.stateNode,A.props=m,A.state=a.memoizedState,A.refs={},hv(a),N=f.contextType,A.context=typeof N=="object"&&N!==null?zr(N):Tc,A.state=a.memoizedState,N=f.getDerivedStateFromProps,typeof N=="function"&&(Iv(a,f,N,m),A.state=a.memoizedState),typeof f.getDerivedStateFromProps=="function"||typeof A.getSnapshotBeforeUpdate=="function"||typeof A.UNSAFE_componentWillMount!="function"&&typeof A.componentWillMount!="function"||(N=A.state,typeof A.componentWillMount=="function"&&A.componentWillMount(),typeof A.UNSAFE_componentWillMount=="function"&&A.UNSAFE_componentWillMount(),N!==A.state&&zv.enqueueReplaceState(A,A.state,null),Bf(a,m,A,R),qf(),A.state=a.memoizedState),typeof A.componentDidMount=="function"&&(a.flags|=4194308),m=!0}else if(i===null){A=a.stateNode;var W=a.memoizedProps,se=El(f,W);A.props=se;var be=A.context,Ae=f.contextType;N=Tc,typeof Ae=="object"&&Ae!==null&&(N=zr(Ae));var Pe=f.getDerivedStateFromProps;Ae=typeof Pe=="function"||typeof A.getSnapshotBeforeUpdate=="function",W=a.pendingProps!==W,Ae||typeof A.UNSAFE_componentWillReceiveProps!="function"&&typeof A.componentWillReceiveProps!="function"||(W||be!==N)&&GC(a,A,m,N),na=!1;var Se=a.memoizedState;A.state=Se,Bf(a,m,A,R),qf(),be=a.memoizedState,W||Se!==be||na?(typeof Pe=="function"&&(Iv(a,f,Pe,m),be=a.memoizedState),(se=na||KC(a,f,se,m,Se,be,N))?(Ae||typeof A.UNSAFE_componentWillMount!="function"&&typeof A.componentWillMount!="function"||(typeof A.componentWillMount=="function"&&A.componentWillMount(),typeof A.UNSAFE_componentWillMount=="function"&&A.UNSAFE_componentWillMount()),typeof A.componentDidMount=="function"&&(a.flags|=4194308)):(typeof A.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=m,a.memoizedState=be),A.props=m,A.state=be,A.context=N,m=se):(typeof A.componentDidMount=="function"&&(a.flags|=4194308),m=!1)}else{A=a.stateNode,pv(i,a),N=a.memoizedProps,Ae=El(f,N),A.props=Ae,Pe=a.pendingProps,Se=A.context,be=f.contextType,se=Tc,typeof be=="object"&&be!==null&&(se=zr(be)),W=f.getDerivedStateFromProps,(be=typeof W=="function"||typeof A.getSnapshotBeforeUpdate=="function")||typeof A.UNSAFE_componentWillReceiveProps!="function"&&typeof A.componentWillReceiveProps!="function"||(N!==Pe||Se!==se)&&GC(a,A,m,se),na=!1,Se=a.memoizedState,A.state=Se,Bf(a,m,A,R),qf();var Ee=a.memoizedState;N!==Pe||Se!==Ee||na||i!==null&&i.dependencies!==null&&gp(i.dependencies)?(typeof W=="function"&&(Iv(a,f,W,m),Ee=a.memoizedState),(Ae=na||KC(a,f,Ae,m,Se,Ee,se)||i!==null&&i.dependencies!==null&&gp(i.dependencies))?(be||typeof A.UNSAFE_componentWillUpdate!="function"&&typeof A.componentWillUpdate!="function"||(typeof A.componentWillUpdate=="function"&&A.componentWillUpdate(m,Ee,se),typeof A.UNSAFE_componentWillUpdate=="function"&&A.UNSAFE_componentWillUpdate(m,Ee,se)),typeof A.componentDidUpdate=="function"&&(a.flags|=4),typeof A.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof A.componentDidUpdate!="function"||N===i.memoizedProps&&Se===i.memoizedState||(a.flags|=4),typeof A.getSnapshotBeforeUpdate!="function"||N===i.memoizedProps&&Se===i.memoizedState||(a.flags|=1024),a.memoizedProps=m,a.memoizedState=Ee),A.props=m,A.state=Ee,A.context=se,m=Ae):(typeof A.componentDidUpdate!="function"||N===i.memoizedProps&&Se===i.memoizedState||(a.flags|=4),typeof A.getSnapshotBeforeUpdate!="function"||N===i.memoizedProps&&Se===i.memoizedState||(a.flags|=1024),m=!1)}return A=m,Dp(i,a),m=(a.flags&128)!==0,A||m?(A=a.stateNode,f=m&&typeof f.getDerivedStateFromError!="function"?null:A.render(),a.flags|=1,i!==null&&m?(a.child=xl(a,i.child,null,R),a.child=xl(a,null,f,R)):Lr(i,a,f,R),a.memoizedState=A.state,i=a.child):i=bs(i,a,R),i}function lT(i,a,f,m){return gl(),a.flags|=256,Lr(i,a,f,m),a.child}var Vv={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function qv(i){return{baseLanes:i,cachePool:X2()}}function Bv(i,a,f){return i=i!==null?i.childLanes&~f:0,a&&(i|=Oo),i}function cT(i,a,f){var m=a.pendingProps,R=!1,A=(a.flags&128)!==0,N;if((N=A)||(N=i!==null&&i.memoizedState===null?!1:(lr.current&2)!==0),N&&(R=!0,a.flags&=-129),N=(a.flags&32)!==0,a.flags&=-33,i===null){if(Ht){if(R?ia(a):sa(),(i=jn)?(i=yR(i,Go),i=i!==null&&i.data!=="&"?i:null,i!==null&&(a.memoizedState={dehydrated:i,treeContext:Qs!==null?{id:ji,overflow:Pi}:null,retryLane:536870912,hydrationErrors:null},f=V2(i),f.return=a,a.child=f,Ir=a,jn=null)):i=null,i===null)throw ea(a);return Tb(i)?a.lanes=32:a.lanes=536870912,null}var W=m.children;return m=m.fallback,R?(sa(),R=a.mode,W=$p({mode:"hidden",children:W},R),m=ml(m,R,f,null),W.return=a,m.return=a,W.sibling=m,a.child=W,m=a.child,m.memoizedState=qv(f),m.childLanes=Bv(i,N,f),a.memoizedState=Vv,Wf(null,m)):(ia(a),Hv(a,W))}var se=i.memoizedState;if(se!==null&&(W=se.dehydrated,W!==null)){if(A)a.flags&256?(ia(a),a.flags&=-257,a=Kv(i,a,f)):a.memoizedState!==null?(sa(),a.child=i.child,a.flags|=128,a=null):(sa(),W=m.fallback,R=a.mode,m=$p({mode:"visible",children:m.children},R),W=ml(W,R,f,null),W.flags|=2,m.return=a,W.return=a,m.sibling=W,a.child=m,xl(a,i.child,null,f),m=a.child,m.memoizedState=qv(f),m.childLanes=Bv(i,N,f),a.memoizedState=Vv,a=Wf(null,m));else if(ia(a),Tb(W)){if(N=W.nextSibling&&W.nextSibling.dataset,N)var be=N.dgst;N=be,m=Error(r(419)),m.stack="",m.digest=N,If({value:m,source:null,stack:null}),a=Kv(i,a,f)}else if(pr||kc(i,a,f,!1),N=(f&i.childLanes)!==0,pr||N){if(N=Tn,N!==null&&(m=ir(N,f),m!==0&&m!==se.retryLane))throw se.retryLane=m,pl(i,m),vo(N,i,m),Fv;Cb(W)||Hp(),a=Kv(i,a,f)}else Cb(W)?(a.flags|=192,a.child=i.child,a=null):(i=se.treeContext,jn=Wo(W.nextSibling),Ir=a,Ht=!0,Js=null,Go=!1,i!==null&&H2(a,i),a=Hv(a,m.children),a.flags|=4096);return a}return R?(sa(),W=m.fallback,R=a.mode,se=i.child,be=se.sibling,m=hs(se,{mode:"hidden",children:m.children}),m.subtreeFlags=se.subtreeFlags&65011712,be!==null?W=hs(be,W):(W=ml(W,R,f,null),W.flags|=2),W.return=a,m.return=a,m.sibling=W,a.child=m,Wf(null,m),m=a.child,W=i.child.memoizedState,W===null?W=qv(f):(R=W.cachePool,R!==null?(se=dr._currentValue,R=R.parent!==se?{parent:se,pool:se}:R):R=X2(),W={baseLanes:W.baseLanes|f,cachePool:R}),m.memoizedState=W,m.childLanes=Bv(i,N,f),a.memoizedState=Vv,Wf(i.child,m)):(ia(a),f=i.child,i=f.sibling,f=hs(f,{mode:"visible",children:m.children}),f.return=a,f.sibling=null,i!==null&&(N=a.deletions,N===null?(a.deletions=[i],a.flags|=16):N.push(i)),a.child=f,a.memoizedState=null,f)}function Hv(i,a){return a=$p({mode:"visible",children:a},i.mode),a.return=i,i.child=a}function $p(i,a){return i=Eo(22,i,null,a),i.lanes=0,i}function Kv(i,a,f){return xl(a,i.child,null,f),i=Hv(a,a.pendingProps.children),i.flags|=2,a.memoizedState=null,i}function uT(i,a,f){i.lanes|=a;var m=i.alternate;m!==null&&(m.lanes|=a),av(i.return,a,f)}function Gv(i,a,f,m,R,A){var N=i.memoizedState;N===null?i.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:m,tail:f,tailMode:R,treeForkCount:A}:(N.isBackwards=a,N.rendering=null,N.renderingStartTime=0,N.last=m,N.tail=f,N.tailMode=R,N.treeForkCount=A)}function fT(i,a,f){var m=a.pendingProps,R=m.revealOrder,A=m.tail;m=m.children;var N=lr.current,W=(N&2)!==0;if(W?(N=N&1|2,a.flags|=128):N&=1,U(lr,N),Lr(i,a,m,f),m=Ht?$f:0,!W&&i!==null&&(i.flags&128)!==0)e:for(i=a.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&uT(i,f,a);else if(i.tag===19)uT(i,f,a);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===a)break e;for(;i.sibling===null;){if(i.return===null||i.return===a)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(R){case"forwards":for(f=a.child,R=null;f!==null;)i=f.alternate,i!==null&&Ep(i)===null&&(R=f),f=f.sibling;f=R,f===null?(R=a.child,a.child=null):(R=f.sibling,f.sibling=null),Gv(a,!1,R,f,A,m);break;case"backwards":case"unstable_legacy-backwards":for(f=null,R=a.child,a.child=null;R!==null;){if(i=R.alternate,i!==null&&Ep(i)===null){a.child=R;break}i=R.sibling,R.sibling=f,f=R,R=i}Gv(a,!0,f,null,A,m);break;case"together":Gv(a,!1,null,null,void 0,m);break;default:a.memoizedState=null}return a.child}function bs(i,a,f){if(i!==null&&(a.dependencies=i.dependencies),ca|=a.lanes,(f&a.childLanes)===0)if(i!==null){if(kc(i,a,f,!1),(f&a.childLanes)===0)return null}else return null;if(i!==null&&a.child!==i.child)throw Error(r(153));if(a.child!==null){for(i=a.child,f=hs(i,i.pendingProps),a.child=f,f.return=a;i.sibling!==null;)i=i.sibling,f=f.sibling=hs(i,i.pendingProps),f.return=a;f.sibling=null}return a.child}function Zv(i,a){return(i.lanes&a)!==0?!0:(i=i.dependencies,!!(i!==null&&gp(i)))}function H8(i,a,f){switch(a.tag){case 3:le(a,a.stateNode.containerInfo),ta(a,dr,i.memoizedState.cache),gl();break;case 27:case 5:Me(a);break;case 4:le(a,a.stateNode.containerInfo);break;case 10:ta(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,bv(a),null;break;case 13:var m=a.memoizedState;if(m!==null)return m.dehydrated!==null?(ia(a),a.flags|=128,null):(f&a.child.childLanes)!==0?cT(i,a,f):(ia(a),i=bs(i,a,f),i!==null?i.sibling:null);ia(a);break;case 19:var R=(i.flags&128)!==0;if(m=(f&a.childLanes)!==0,m||(kc(i,a,f,!1),m=(f&a.childLanes)!==0),R){if(m)return fT(i,a,f);a.flags|=128}if(R=a.memoizedState,R!==null&&(R.rendering=null,R.tail=null,R.lastEffect=null),U(lr,lr.current),m)break;return null;case 22:return a.lanes=0,rT(i,a,f,a.pendingProps);case 24:ta(a,dr,i.memoizedState.cache)}return bs(i,a,f)}function dT(i,a,f){if(i!==null)if(i.memoizedProps!==a.pendingProps)pr=!0;else{if(!Zv(i,f)&&(a.flags&128)===0)return pr=!1,H8(i,a,f);pr=(i.flags&131072)!==0}else pr=!1,Ht&&(a.flags&1048576)!==0&&B2(a,$f,a.index);switch(a.lanes=0,a.tag){case 16:e:{var m=a.pendingProps;if(i=Sl(a.elementType),a.type=i,typeof i=="function")J0(i)?(m=El(i,m),a.tag=1,a=aT(null,a,i,m,f)):(a.tag=0,a=Uv(null,a,i,m,f));else{if(i!=null){var R=i.$$typeof;if(R===S){a.tag=11,a=eT(null,a,i,m,f);break e}else if(R===O){a.tag=14,a=tT(null,a,i,m,f);break e}}throw a=ee(i)||i,Error(r(306,a,""))}}return a;case 0:return Uv(i,a,a.type,a.pendingProps,f);case 1:return m=a.type,R=El(m,a.pendingProps),aT(i,a,m,R,f);case 3:e:{if(le(a,a.stateNode.containerInfo),i===null)throw Error(r(387));m=a.pendingProps;var A=a.memoizedState;R=A.element,pv(i,a),Bf(a,m,null,f);var N=a.memoizedState;if(m=N.cache,ta(a,dr,m),m!==A.cache&&lv(a,[dr],f,!0),qf(),m=N.element,A.isDehydrated)if(A={element:m,isDehydrated:!1,cache:N.cache},a.updateQueue.baseState=A,a.memoizedState=A,a.flags&256){a=lT(i,a,m,f);break e}else if(m!==R){R=Bo(Error(r(424)),a),If(R),a=lT(i,a,m,f);break e}else for(i=a.stateNode.containerInfo,i.nodeType===9?i=i.body:i=i.nodeName==="HTML"?i.ownerDocument.body:i,jn=Wo(i.firstChild),Ir=a,Ht=!0,Js=null,Go=!0,f=rC(a,null,m,f),a.child=f;f;)f.flags=f.flags&-3|4096,f=f.sibling;else{if(gl(),m===R){a=bs(i,a,f);break e}Lr(i,a,m,f)}a=a.child}return a;case 26:return Dp(i,a),i===null?(f=_R(a.type,null,a.pendingProps,null))?a.memoizedState=f:Ht||(f=a.type,i=a.pendingProps,m=Qp(te.current).createElement(f),m[Qt]=a,m[Cn]=i,Fr(m,f,i),fr(m),a.stateNode=m):a.memoizedState=_R(a.type,i.memoizedProps,a.pendingProps,i.memoizedState),null;case 27:return Me(a),i===null&&Ht&&(m=a.stateNode=SR(a.type,a.pendingProps,te.current),Ir=a,Go=!0,R=jn,pa(a.type)?(Rb=R,jn=Wo(m.firstChild)):jn=R),Lr(i,a,a.pendingProps.children,f),Dp(i,a),i===null&&(a.flags|=4194304),a.child;case 5:return i===null&&Ht&&((R=m=jn)&&(m=wL(m,a.type,a.pendingProps,Go),m!==null?(a.stateNode=m,Ir=a,jn=Wo(m.firstChild),Go=!1,R=!0):R=!1),R||ea(a)),Me(a),R=a.type,A=a.pendingProps,N=i!==null?i.memoizedProps:null,m=A.children,xb(R,A)?m=null:N!==null&&xb(R,N)&&(a.flags|=32),a.memoizedState!==null&&(R=wv(i,a,$8,null,null,f),ud._currentValue=R),Dp(i,a),Lr(i,a,m,f),a.child;case 6:return i===null&&Ht&&((i=f=jn)&&(f=xL(f,a.pendingProps,Go),f!==null?(a.stateNode=f,Ir=a,jn=null,i=!0):i=!1),i||ea(a)),null;case 13:return cT(i,a,f);case 4:return le(a,a.stateNode.containerInfo),m=a.pendingProps,i===null?a.child=xl(a,null,m,f):Lr(i,a,m,f),a.child;case 11:return eT(i,a,a.type,a.pendingProps,f);case 7:return Lr(i,a,a.pendingProps,f),a.child;case 8:return Lr(i,a,a.pendingProps.children,f),a.child;case 12:return Lr(i,a,a.pendingProps.children,f),a.child;case 10:return m=a.pendingProps,ta(a,a.type,m.value),Lr(i,a,m.children,f),a.child;case 9:return R=a.type._context,m=a.pendingProps.children,vl(a),R=zr(R),m=m(R),a.flags|=1,Lr(i,a,m,f),a.child;case 14:return tT(i,a,a.type,a.pendingProps,f);case 15:return nT(i,a,a.type,a.pendingProps,f);case 19:return fT(i,a,f);case 31:return B8(i,a,f);case 22:return rT(i,a,f,a.pendingProps);case 24:return vl(a),m=zr(dr),i===null?(R=fv(),R===null&&(R=Tn,A=cv(),R.pooledCache=A,A.refCount++,A!==null&&(R.pooledCacheLanes|=f),R=A),a.memoizedState={parent:m,cache:R},hv(a),ta(a,dr,R)):((i.lanes&f)!==0&&(pv(i,a),Bf(a,null,null,f),qf()),R=i.memoizedState,A=a.memoizedState,R.parent!==m?(R={parent:m,cache:m},a.memoizedState=R,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=R),ta(a,dr,m)):(m=A.cache,ta(a,dr,m),m!==R.cache&&lv(a,[dr],f,!0))),Lr(i,a,a.pendingProps.children,f),a.child;case 29:throw a.pendingProps}throw Error(r(156,a.tag))}function Ss(i){i.flags|=4}function Wv(i,a,f,m,R){if((a=(i.mode&32)!==0)&&(a=!1),a){if(i.flags|=16777216,(R&335544128)===R)if(i.stateNode.complete)i.flags|=8192;else if(LT())i.flags|=8192;else throw wl=Sp,dv}else i.flags&=-16777217}function hT(i,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!OR(a))if(LT())i.flags|=8192;else throw wl=Sp,dv}function Ip(i,a){a!==null&&(i.flags|=4),i.flags&16384&&(a=i.tag!==22?ft():536870912,i.lanes|=a,Vc|=a)}function Yf(i,a){if(!Ht)switch(i.tailMode){case"hidden":a=i.tail;for(var f=null;a!==null;)a.alternate!==null&&(f=a),a=a.sibling;f===null?i.tail=null:f.sibling=null;break;case"collapsed":f=i.tail;for(var m=null;f!==null;)f.alternate!==null&&(m=f),f=f.sibling;m===null?a||i.tail===null?i.tail=null:i.tail.sibling=null:m.sibling=null}}function Pn(i){var a=i.alternate!==null&&i.alternate.child===i.child,f=0,m=0;if(a)for(var R=i.child;R!==null;)f|=R.lanes|R.childLanes,m|=R.subtreeFlags&65011712,m|=R.flags&65011712,R.return=i,R=R.sibling;else for(R=i.child;R!==null;)f|=R.lanes|R.childLanes,m|=R.subtreeFlags,m|=R.flags,R.return=i,R=R.sibling;return i.subtreeFlags|=m,i.childLanes=f,a}function K8(i,a,f){var m=a.pendingProps;switch(rv(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Pn(a),null;case 1:return Pn(a),null;case 3:return f=a.stateNode,m=null,i!==null&&(m=i.memoizedState.cache),a.memoizedState.cache!==m&&(a.flags|=2048),gs(dr),ge(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(i===null||i.child===null)&&(Ac(a)?Ss(a):i===null||i.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,iv())),Pn(a),null;case 26:var R=a.type,A=a.memoizedState;return i===null?(Ss(a),A!==null?(Pn(a),hT(a,A)):(Pn(a),Wv(a,R,null,m,f))):A?A!==i.memoizedState?(Ss(a),Pn(a),hT(a,A)):(Pn(a),a.flags&=-16777217):(i=i.memoizedProps,i!==m&&Ss(a),Pn(a),Wv(a,R,i,m,f)),null;case 27:if(Q(a),f=te.current,R=a.type,i!==null&&a.stateNode!=null)i.memoizedProps!==m&&Ss(a);else{if(!m){if(a.stateNode===null)throw Error(r(166));return Pn(a),null}i=D.current,Ac(a)?K2(a):(i=SR(R,m,f),a.stateNode=i,Ss(a))}return Pn(a),null;case 5:if(Q(a),R=a.type,i!==null&&a.stateNode!=null)i.memoizedProps!==m&&Ss(a);else{if(!m){if(a.stateNode===null)throw Error(r(166));return Pn(a),null}if(A=D.current,Ac(a))K2(a);else{var N=Qp(te.current);switch(A){case 1:A=N.createElementNS("http://www.w3.org/2000/svg",R);break;case 2:A=N.createElementNS("http://www.w3.org/1998/Math/MathML",R);break;default:switch(R){case"svg":A=N.createElementNS("http://www.w3.org/2000/svg",R);break;case"math":A=N.createElementNS("http://www.w3.org/1998/Math/MathML",R);break;case"script":A=N.createElement("div"),A.innerHTML="<script><\/script>",A=A.removeChild(A.firstChild);break;case"select":A=typeof m.is=="string"?N.createElement("select",{is:m.is}):N.createElement("select"),m.multiple?A.multiple=!0:m.size&&(A.size=m.size);break;default:A=typeof m.is=="string"?N.createElement(R,{is:m.is}):N.createElement(R)}}A[Qt]=a,A[Cn]=m;e:for(N=a.child;N!==null;){if(N.tag===5||N.tag===6)A.appendChild(N.stateNode);else if(N.tag!==4&&N.tag!==27&&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}a.stateNode=A;e:switch(Fr(A,R,m),R){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}m&&Ss(a)}}return Pn(a),Wv(a,a.type,i===null?null:i.memoizedProps,a.pendingProps,f),null;case 6:if(i&&a.stateNode!=null)i.memoizedProps!==m&&Ss(a);else{if(typeof m!="string"&&a.stateNode===null)throw Error(r(166));if(i=te.current,Ac(a)){if(i=a.stateNode,f=a.memoizedProps,m=null,R=Ir,R!==null)switch(R.tag){case 27:case 5:m=R.memoizedProps}i[Qt]=a,i=!!(i.nodeValue===f||m!==null&&m.suppressHydrationWarning===!0||cR(i.nodeValue,f)),i||ea(a,!0)}else i=Qp(i).createTextNode(m),i[Qt]=a,a.stateNode=i}return Pn(a),null;case 31:if(f=a.memoizedState,i===null||i.memoizedState!==null){if(m=Ac(a),f!==null){if(i===null){if(!m)throw Error(r(318));if(i=a.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(557));i[Qt]=a}else gl(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Pn(a),i=!1}else f=iv(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=f),i=!0;if(!i)return a.flags&256?(To(a),a):(To(a),null);if((a.flags&128)!==0)throw Error(r(558))}return Pn(a),null;case 13:if(m=a.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(R=Ac(a),m!==null&&m.dehydrated!==null){if(i===null){if(!R)throw Error(r(318));if(R=a.memoizedState,R=R!==null?R.dehydrated:null,!R)throw Error(r(317));R[Qt]=a}else gl(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Pn(a),R=!1}else R=iv(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=R),R=!0;if(!R)return a.flags&256?(To(a),a):(To(a),null)}return To(a),(a.flags&128)!==0?(a.lanes=f,a):(f=m!==null,i=i!==null&&i.memoizedState!==null,f&&(m=a.child,R=null,m.alternate!==null&&m.alternate.memoizedState!==null&&m.alternate.memoizedState.cachePool!==null&&(R=m.alternate.memoizedState.cachePool.pool),A=null,m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(A=m.memoizedState.cachePool.pool),A!==R&&(m.flags|=2048)),f!==i&&f&&(a.child.flags|=8192),Ip(a,a.updateQueue),Pn(a),null);case 4:return ge(),i===null&&yb(a.stateNode.containerInfo),Pn(a),null;case 10:return gs(a.type),Pn(a),null;case 19:if(V(lr),m=a.memoizedState,m===null)return Pn(a),null;if(R=(a.flags&128)!==0,A=m.rendering,A===null)if(R)Yf(m,!1);else{if(tr!==0||i!==null&&(i.flags&128)!==0)for(i=a.child;i!==null;){if(A=Ep(i),A!==null){for(a.flags|=128,Yf(m,!1),i=A.updateQueue,a.updateQueue=i,Ip(a,i),a.subtreeFlags=0,i=f,f=a.child;f!==null;)U2(f,i),f=f.sibling;return U(lr,lr.current&1|2),Ht&&ps(a,m.treeForkCount),a.child}i=i.sibling}m.tail!==null&&Le()>Vp&&(a.flags|=128,R=!0,Yf(m,!1),a.lanes=4194304)}else{if(!R)if(i=Ep(A),i!==null){if(a.flags|=128,R=!0,i=i.updateQueue,a.updateQueue=i,Ip(a,i),Yf(m,!0),m.tail===null&&m.tailMode==="hidden"&&!A.alternate&&!Ht)return Pn(a),null}else 2*Le()-m.renderingStartTime>Vp&&f!==536870912&&(a.flags|=128,R=!0,Yf(m,!1),a.lanes=4194304);m.isBackwards?(A.sibling=a.child,a.child=A):(i=m.last,i!==null?i.sibling=A:a.child=A,m.last=A)}return m.tail!==null?(i=m.tail,m.rendering=i,m.tail=i.sibling,m.renderingStartTime=Le(),i.sibling=null,f=lr.current,U(lr,R?f&1|2:f&1),Ht&&ps(a,m.treeForkCount),i):(Pn(a),null);case 22:case 23:return To(a),vv(),m=a.memoizedState!==null,i!==null?i.memoizedState!==null!==m&&(a.flags|=8192):m&&(a.flags|=8192),m?(f&536870912)!==0&&(a.flags&128)===0&&(Pn(a),a.subtreeFlags&6&&(a.flags|=8192)):Pn(a),f=a.updateQueue,f!==null&&Ip(a,f.retryQueue),f=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(f=i.memoizedState.cachePool.pool),m=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(m=a.memoizedState.cachePool.pool),m!==f&&(a.flags|=2048),i!==null&&V(bl),null;case 24:return f=null,i!==null&&(f=i.memoizedState.cache),a.memoizedState.cache!==f&&(a.flags|=2048),gs(dr),Pn(a),null;case 25:return null;case 30:return null}throw Error(r(156,a.tag))}function G8(i,a){switch(rv(a),a.tag){case 1:return i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 3:return gs(dr),ge(),i=a.flags,(i&65536)!==0&&(i&128)===0?(a.flags=i&-65537|128,a):null;case 26:case 27:case 5:return Q(a),null;case 31:if(a.memoizedState!==null){if(To(a),a.alternate===null)throw Error(r(340));gl()}return i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 13:if(To(a),i=a.memoizedState,i!==null&&i.dehydrated!==null){if(a.alternate===null)throw Error(r(340));gl()}return i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 19:return V(lr),null;case 4:return ge(),null;case 10:return gs(a.type),null;case 22:case 23:return To(a),vv(),i!==null&&V(bl),i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 24:return gs(dr),null;case 25:return null;default:return null}}function pT(i,a){switch(rv(a),a.tag){case 3:gs(dr),ge();break;case 26:case 27:case 5:Q(a);break;case 4:ge();break;case 31:a.memoizedState!==null&&To(a);break;case 13:To(a);break;case 19:V(lr);break;case 10:gs(a.type);break;case 22:case 23:To(a),vv(),i!==null&&V(bl);break;case 24:gs(dr)}}function Xf(i,a){try{var f=a.updateQueue,m=f!==null?f.lastEffect:null;if(m!==null){var R=m.next;f=R;do{if((f.tag&i)===i){m=void 0;var A=f.create,N=f.inst;m=A(),N.destroy=m}f=f.next}while(f!==R)}}catch(W){yn(a,a.return,W)}}function aa(i,a,f){try{var m=a.updateQueue,R=m!==null?m.lastEffect:null;if(R!==null){var A=R.next;m=A;do{if((m.tag&i)===i){var N=m.inst,W=N.destroy;if(W!==void 0){N.destroy=void 0,R=a;var se=f,be=W;try{be()}catch(Ae){yn(R,se,Ae)}}}m=m.next}while(m!==A)}}catch(Ae){yn(a,a.return,Ae)}}function mT(i){var a=i.updateQueue;if(a!==null){var f=i.stateNode;try{iC(a,f)}catch(m){yn(i,i.return,m)}}}function gT(i,a,f){f.props=El(i.type,i.memoizedProps),f.state=i.memoizedState;try{f.componentWillUnmount()}catch(m){yn(i,a,m)}}function Qf(i,a){try{var f=i.ref;if(f!==null){switch(i.tag){case 26:case 27:case 5:var m=i.stateNode;break;case 30:m=i.stateNode;break;default:m=i.stateNode}typeof f=="function"?i.refCleanup=f(m):f.current=m}}catch(R){yn(i,a,R)}}function Ni(i,a){var f=i.ref,m=i.refCleanup;if(f!==null)if(typeof m=="function")try{m()}catch(R){yn(i,a,R)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof f=="function")try{f(null)}catch(R){yn(i,a,R)}else f.current=null}function yT(i){var a=i.type,f=i.memoizedProps,m=i.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":f.autoFocus&&m.focus();break e;case"img":f.src?m.src=f.src:f.srcSet&&(m.srcset=f.srcSet)}}catch(R){yn(i,i.return,R)}}function Yv(i,a,f){try{var m=i.stateNode;mL(m,i.type,f,a),m[Cn]=a}catch(R){yn(i,i.return,R)}}function vT(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&pa(i.type)||i.tag===4}function Xv(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||vT(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&pa(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Qv(i,a,f){var m=i.tag;if(m===5||m===6)i=i.stateNode,a?(f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f).insertBefore(i,a):(a=f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f,a.appendChild(i),f=f._reactRootContainer,f!=null||a.onclick!==null||(a.onclick=Oe));else if(m!==4&&(m===27&&pa(i.type)&&(f=i.stateNode,a=null),i=i.child,i!==null))for(Qv(i,a,f),i=i.sibling;i!==null;)Qv(i,a,f),i=i.sibling}function zp(i,a,f){var m=i.tag;if(m===5||m===6)i=i.stateNode,a?f.insertBefore(i,a):f.appendChild(i);else if(m!==4&&(m===27&&pa(i.type)&&(f=i.stateNode),i=i.child,i!==null))for(zp(i,a,f),i=i.sibling;i!==null;)zp(i,a,f),i=i.sibling}function bT(i){var a=i.stateNode,f=i.memoizedProps;try{for(var m=i.type,R=a.attributes;R.length;)a.removeAttributeNode(R[0]);Fr(a,m,f),a[Qt]=i,a[Cn]=f}catch(A){yn(i,i.return,A)}}var ws=!1,mr=!1,Jv=!1,ST=typeof WeakSet=="function"?WeakSet:Set,jr=null;function Z8(i,a){if(i=i.containerInfo,Sb=im,i=j2(i),K0(i)){if("selectionStart"in i)var f={start:i.selectionStart,end:i.selectionEnd};else e:{f=(f=i.ownerDocument)&&f.defaultView||window;var m=f.getSelection&&f.getSelection();if(m&&m.rangeCount!==0){f=m.anchorNode;var R=m.anchorOffset,A=m.focusNode;m=m.focusOffset;try{f.nodeType,A.nodeType}catch{f=null;break e}var N=0,W=-1,se=-1,be=0,Ae=0,Pe=i,Se=null;t:for(;;){for(var Ee;Pe!==f||R!==0&&Pe.nodeType!==3||(W=N+R),Pe!==A||m!==0&&Pe.nodeType!==3||(se=N+m),Pe.nodeType===3&&(N+=Pe.nodeValue.length),(Ee=Pe.firstChild)!==null;)Se=Pe,Pe=Ee;for(;;){if(Pe===i)break t;if(Se===f&&++be===R&&(W=N),Se===A&&++Ae===m&&(se=N),(Ee=Pe.nextSibling)!==null)break;Pe=Se,Se=Pe.parentNode}Pe=Ee}f=W===-1||se===-1?null:{start:W,end:se}}else f=null}f=f||{start:0,end:0}}else f=null;for(wb={focusedElem:i,selectionRange:f},im=!1,jr=a;jr!==null;)if(a=jr,i=a.child,(a.subtreeFlags&1028)!==0&&i!==null)i.return=a,jr=i;else for(;jr!==null;){switch(a=jr,A=a.alternate,i=a.flags,a.tag){case 0:if((i&4)!==0&&(i=a.updateQueue,i=i!==null?i.events:null,i!==null))for(f=0;f<i.length;f++)R=i[f],R.ref.impl=R.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&A!==null){i=void 0,f=a,R=A.memoizedProps,A=A.memoizedState,m=f.stateNode;try{var Xe=El(f.type,R);i=m.getSnapshotBeforeUpdate(Xe,A),m.__reactInternalSnapshotBeforeUpdate=i}catch(ut){yn(f,f.return,ut)}}break;case 3:if((i&1024)!==0){if(i=a.stateNode.containerInfo,f=i.nodeType,f===9)Eb(i);else if(f===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":Eb(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(r(163))}if(i=a.sibling,i!==null){i.return=a.return,jr=i;break}jr=a.return}}function wT(i,a,f){var m=f.flags;switch(f.tag){case 0:case 11:case 15:_s(i,f),m&4&&Xf(5,f);break;case 1:if(_s(i,f),m&4)if(i=f.stateNode,a===null)try{i.componentDidMount()}catch(N){yn(f,f.return,N)}else{var R=El(f.type,a.memoizedProps);a=a.memoizedState;try{i.componentDidUpdate(R,a,i.__reactInternalSnapshotBeforeUpdate)}catch(N){yn(f,f.return,N)}}m&64&&mT(f),m&512&&Qf(f,f.return);break;case 3:if(_s(i,f),m&64&&(i=f.updateQueue,i!==null)){if(a=null,f.child!==null)switch(f.child.tag){case 27:case 5:a=f.child.stateNode;break;case 1:a=f.child.stateNode}try{iC(i,a)}catch(N){yn(f,f.return,N)}}break;case 27:a===null&&m&4&&bT(f);case 26:case 5:_s(i,f),a===null&&m&4&&yT(f),m&512&&Qf(f,f.return);break;case 12:_s(i,f);break;case 31:_s(i,f),m&4&&ET(i,f);break;case 13:_s(i,f),m&4&&CT(i,f),m&64&&(i=f.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(f=rL.bind(null,f),_L(i,f))));break;case 22:if(m=f.memoizedState!==null||ws,!m){a=a!==null&&a.memoizedState!==null||mr,R=ws;var A=mr;ws=m,(mr=a)&&!A?Es(i,f,(f.subtreeFlags&8772)!==0):_s(i,f),ws=R,mr=A}break;case 30:break;default:_s(i,f)}}function xT(i){var a=i.alternate;a!==null&&(i.alternate=null,xT(a)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(a=i.stateNode,a!==null&&_f(a)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var Bn=null,po=!1;function xs(i,a,f){for(f=f.child;f!==null;)_T(i,a,f),f=f.sibling}function _T(i,a,f){if(pt&&typeof pt.onCommitFiberUnmount=="function")try{pt.onCommitFiberUnmount(bt,f)}catch{}switch(f.tag){case 26:mr||Ni(f,a),xs(i,a,f),f.memoizedState?f.memoizedState.count--:f.stateNode&&(f=f.stateNode,f.parentNode.removeChild(f));break;case 27:mr||Ni(f,a);var m=Bn,R=po;pa(f.type)&&(Bn=f.stateNode,po=!1),xs(i,a,f),ad(f.stateNode),Bn=m,po=R;break;case 5:mr||Ni(f,a);case 6:if(m=Bn,R=po,Bn=null,xs(i,a,f),Bn=m,po=R,Bn!==null)if(po)try{(Bn.nodeType===9?Bn.body:Bn.nodeName==="HTML"?Bn.ownerDocument.body:Bn).removeChild(f.stateNode)}catch(A){yn(f,a,A)}else try{Bn.removeChild(f.stateNode)}catch(A){yn(f,a,A)}break;case 18:Bn!==null&&(po?(i=Bn,mR(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,f.stateNode),Yc(i)):mR(Bn,f.stateNode));break;case 4:m=Bn,R=po,Bn=f.stateNode.containerInfo,po=!0,xs(i,a,f),Bn=m,po=R;break;case 0:case 11:case 14:case 15:aa(2,f,a),mr||aa(4,f,a),xs(i,a,f);break;case 1:mr||(Ni(f,a),m=f.stateNode,typeof m.componentWillUnmount=="function"&&gT(f,a,m)),xs(i,a,f);break;case 21:xs(i,a,f);break;case 22:mr=(m=mr)||f.memoizedState!==null,xs(i,a,f),mr=m;break;default:xs(i,a,f)}}function ET(i,a){if(a.memoizedState===null&&(i=a.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{Yc(i)}catch(f){yn(a,a.return,f)}}}function CT(i,a){if(a.memoizedState===null&&(i=a.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{Yc(i)}catch(f){yn(a,a.return,f)}}function W8(i){switch(i.tag){case 31:case 13:case 19:var a=i.stateNode;return a===null&&(a=i.stateNode=new ST),a;case 22:return i=i.stateNode,a=i._retryCache,a===null&&(a=i._retryCache=new ST),a;default:throw Error(r(435,i.tag))}}function Lp(i,a){var f=W8(i);a.forEach(function(m){if(!f.has(m)){f.add(m);var R=oL.bind(null,i,m);m.then(R,R)}})}function mo(i,a){var f=a.deletions;if(f!==null)for(var m=0;m<f.length;m++){var R=f[m],A=i,N=a,W=N;e:for(;W!==null;){switch(W.tag){case 27:if(pa(W.type)){Bn=W.stateNode,po=!1;break e}break;case 5:Bn=W.stateNode,po=!1;break e;case 3:case 4:Bn=W.stateNode.containerInfo,po=!0;break e}W=W.return}if(Bn===null)throw Error(r(160));_T(A,N,R),Bn=null,po=!1,A=R.alternate,A!==null&&(A.return=null),R.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)TT(a,i),a=a.sibling}var mi=null;function TT(i,a){var f=i.alternate,m=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:mo(a,i),go(i),m&4&&(aa(3,i,i.return),Xf(3,i),aa(5,i,i.return));break;case 1:mo(a,i),go(i),m&512&&(mr||f===null||Ni(f,f.return)),m&64&&ws&&(i=i.updateQueue,i!==null&&(m=i.callbacks,m!==null&&(f=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=f===null?m:f.concat(m))));break;case 26:var R=mi;if(mo(a,i),go(i),m&512&&(mr||f===null||Ni(f,f.return)),m&4){var A=f!==null?f.memoizedState:null;if(m=i.memoizedState,f===null)if(m===null)if(i.stateNode===null){e:{m=i.type,f=i.memoizedProps,R=R.ownerDocument||R;t:switch(m){case"title":A=R.getElementsByTagName("title")[0],(!A||A[al]||A[Qt]||A.namespaceURI==="http://www.w3.org/2000/svg"||A.hasAttribute("itemprop"))&&(A=R.createElement(m),R.head.insertBefore(A,R.querySelector("head > title"))),Fr(A,m,f),A[Qt]=i,fr(A),m=A;break e;case"link":var N=TR("link","href",R).get(m+(f.href||""));if(N){for(var W=0;W<N.length;W++)if(A=N[W],A.getAttribute("href")===(f.href==null||f.href===""?null:f.href)&&A.getAttribute("rel")===(f.rel==null?null:f.rel)&&A.getAttribute("title")===(f.title==null?null:f.title)&&A.getAttribute("crossorigin")===(f.crossOrigin==null?null:f.crossOrigin)){N.splice(W,1);break t}}A=R.createElement(m),Fr(A,m,f),R.head.appendChild(A);break;case"meta":if(N=TR("meta","content",R).get(m+(f.content||""))){for(W=0;W<N.length;W++)if(A=N[W],A.getAttribute("content")===(f.content==null?null:""+f.content)&&A.getAttribute("name")===(f.name==null?null:f.name)&&A.getAttribute("property")===(f.property==null?null:f.property)&&A.getAttribute("http-equiv")===(f.httpEquiv==null?null:f.httpEquiv)&&A.getAttribute("charset")===(f.charSet==null?null:f.charSet)){N.splice(W,1);break t}}A=R.createElement(m),Fr(A,m,f),R.head.appendChild(A);break;default:throw Error(r(468,m))}A[Qt]=i,fr(A),m=A}i.stateNode=m}else RR(R,i.type,i.stateNode);else i.stateNode=CR(R,m,i.memoizedProps);else A!==m?(A===null?f.stateNode!==null&&(f=f.stateNode,f.parentNode.removeChild(f)):A.count--,m===null?RR(R,i.type,i.stateNode):CR(R,m,i.memoizedProps)):m===null&&i.stateNode!==null&&Yv(i,i.memoizedProps,f.memoizedProps)}break;case 27:mo(a,i),go(i),m&512&&(mr||f===null||Ni(f,f.return)),f!==null&&m&4&&Yv(i,i.memoizedProps,f.memoizedProps);break;case 5:if(mo(a,i),go(i),m&512&&(mr||f===null||Ni(f,f.return)),i.flags&32){R=i.stateNode;try{X(R,"")}catch(Xe){yn(i,i.return,Xe)}}m&4&&i.stateNode!=null&&(R=i.memoizedProps,Yv(i,R,f!==null?f.memoizedProps:R)),m&1024&&(Jv=!0);break;case 6:if(mo(a,i),go(i),m&4){if(i.stateNode===null)throw Error(r(162));m=i.memoizedProps,f=i.stateNode;try{f.nodeValue=m}catch(Xe){yn(i,i.return,Xe)}}break;case 3:if(tm=null,R=mi,mi=Jp(a.containerInfo),mo(a,i),mi=R,go(i),m&4&&f!==null&&f.memoizedState.isDehydrated)try{Yc(a.containerInfo)}catch(Xe){yn(i,i.return,Xe)}Jv&&(Jv=!1,RT(i));break;case 4:m=mi,mi=Jp(i.stateNode.containerInfo),mo(a,i),go(i),mi=m;break;case 12:mo(a,i),go(i);break;case 31:mo(a,i),go(i),m&4&&(m=i.updateQueue,m!==null&&(i.updateQueue=null,Lp(i,m)));break;case 13:mo(a,i),go(i),i.child.flags&8192&&i.memoizedState!==null!=(f!==null&&f.memoizedState!==null)&&(Up=Le()),m&4&&(m=i.updateQueue,m!==null&&(i.updateQueue=null,Lp(i,m)));break;case 22:R=i.memoizedState!==null;var se=f!==null&&f.memoizedState!==null,be=ws,Ae=mr;if(ws=be||R,mr=Ae||se,mo(a,i),mr=Ae,ws=be,go(i),m&8192)e:for(a=i.stateNode,a._visibility=R?a._visibility&-2:a._visibility|1,R&&(f===null||se||ws||mr||Cl(i)),f=null,a=i;;){if(a.tag===5||a.tag===26){if(f===null){se=f=a;try{if(A=se.stateNode,R)N=A.style,typeof N.setProperty=="function"?N.setProperty("display","none","important"):N.display="none";else{W=se.stateNode;var Pe=se.memoizedProps.style,Se=Pe!=null&&Pe.hasOwnProperty("display")?Pe.display:null;W.style.display=Se==null||typeof Se=="boolean"?"":(""+Se).trim()}}catch(Xe){yn(se,se.return,Xe)}}}else if(a.tag===6){if(f===null){se=a;try{se.stateNode.nodeValue=R?"":se.memoizedProps}catch(Xe){yn(se,se.return,Xe)}}}else if(a.tag===18){if(f===null){se=a;try{var Ee=se.stateNode;R?gR(Ee,!0):gR(se.stateNode,!1)}catch(Xe){yn(se,se.return,Xe)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===i)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===i)break e;for(;a.sibling===null;){if(a.return===null||a.return===i)break e;f===a&&(f=null),a=a.return}f===a&&(f=null),a.sibling.return=a.return,a=a.sibling}m&4&&(m=i.updateQueue,m!==null&&(f=m.retryQueue,f!==null&&(m.retryQueue=null,Lp(i,f))));break;case 19:mo(a,i),go(i),m&4&&(m=i.updateQueue,m!==null&&(i.updateQueue=null,Lp(i,m)));break;case 30:break;case 21:break;default:mo(a,i),go(i)}}function go(i){var a=i.flags;if(a&2){try{for(var f,m=i.return;m!==null;){if(vT(m)){f=m;break}m=m.return}if(f==null)throw Error(r(160));switch(f.tag){case 27:var R=f.stateNode,A=Xv(i);zp(i,A,R);break;case 5:var N=f.stateNode;f.flags&32&&(X(N,""),f.flags&=-33);var W=Xv(i);zp(i,W,N);break;case 3:case 4:var se=f.stateNode.containerInfo,be=Xv(i);Qv(i,be,se);break;default:throw Error(r(161))}}catch(Ae){yn(i,i.return,Ae)}i.flags&=-3}a&4096&&(i.flags&=-4097)}function RT(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var a=i;RT(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),i=i.sibling}}function _s(i,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)wT(i,a.alternate,a),a=a.sibling}function Cl(i){for(i=i.child;i!==null;){var a=i;switch(a.tag){case 0:case 11:case 14:case 15:aa(4,a,a.return),Cl(a);break;case 1:Ni(a,a.return);var f=a.stateNode;typeof f.componentWillUnmount=="function"&&gT(a,a.return,f),Cl(a);break;case 27:ad(a.stateNode);case 26:case 5:Ni(a,a.return),Cl(a);break;case 22:a.memoizedState===null&&Cl(a);break;case 30:Cl(a);break;default:Cl(a)}i=i.sibling}}function Es(i,a,f){for(f=f&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var m=a.alternate,R=i,A=a,N=A.flags;switch(A.tag){case 0:case 11:case 15:Es(R,A,f),Xf(4,A);break;case 1:if(Es(R,A,f),m=A,R=m.stateNode,typeof R.componentDidMount=="function")try{R.componentDidMount()}catch(be){yn(m,m.return,be)}if(m=A,R=m.updateQueue,R!==null){var W=m.stateNode;try{var se=R.shared.hiddenCallbacks;if(se!==null)for(R.shared.hiddenCallbacks=null,R=0;R<se.length;R++)oC(se[R],W)}catch(be){yn(m,m.return,be)}}f&&N&64&&mT(A),Qf(A,A.return);break;case 27:bT(A);case 26:case 5:Es(R,A,f),f&&m===null&&N&4&&yT(A),Qf(A,A.return);break;case 12:Es(R,A,f);break;case 31:Es(R,A,f),f&&N&4&&ET(R,A);break;case 13:Es(R,A,f),f&&N&4&&CT(R,A);break;case 22:A.memoizedState===null&&Es(R,A,f),Qf(A,A.return);break;case 30:break;default:Es(R,A,f)}a=a.sibling}}function eb(i,a){var f=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(f=i.memoizedState.cachePool.pool),i=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(i=a.memoizedState.cachePool.pool),i!==f&&(i!=null&&i.refCount++,f!=null&&zf(f))}function tb(i,a){i=null,a.alternate!==null&&(i=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==i&&(a.refCount++,i!=null&&zf(i))}function gi(i,a,f,m){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)OT(i,a,f,m),a=a.sibling}function OT(i,a,f,m){var R=a.flags;switch(a.tag){case 0:case 11:case 15:gi(i,a,f,m),R&2048&&Xf(9,a);break;case 1:gi(i,a,f,m);break;case 3:gi(i,a,f,m),R&2048&&(i=null,a.alternate!==null&&(i=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==i&&(a.refCount++,i!=null&&zf(i)));break;case 12:if(R&2048){gi(i,a,f,m),i=a.stateNode;try{var A=a.memoizedProps,N=A.id,W=A.onPostCommit;typeof W=="function"&&W(N,a.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(se){yn(a,a.return,se)}}else gi(i,a,f,m);break;case 31:gi(i,a,f,m);break;case 13:gi(i,a,f,m);break;case 23:break;case 22:A=a.stateNode,N=a.alternate,a.memoizedState!==null?A._visibility&2?gi(i,a,f,m):Jf(i,a):A._visibility&2?gi(i,a,f,m):(A._visibility|=2,Lc(i,a,f,m,(a.subtreeFlags&10256)!==0||!1)),R&2048&&eb(N,a);break;case 24:gi(i,a,f,m),R&2048&&tb(a.alternate,a);break;default:gi(i,a,f,m)}}function Lc(i,a,f,m,R){for(R=R&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var A=i,N=a,W=f,se=m,be=N.flags;switch(N.tag){case 0:case 11:case 15:Lc(A,N,W,se,R),Xf(8,N);break;case 23:break;case 22:var Ae=N.stateNode;N.memoizedState!==null?Ae._visibility&2?Lc(A,N,W,se,R):Jf(A,N):(Ae._visibility|=2,Lc(A,N,W,se,R)),R&&be&2048&&eb(N.alternate,N);break;case 24:Lc(A,N,W,se,R),R&&be&2048&&tb(N.alternate,N);break;default:Lc(A,N,W,se,R)}a=a.sibling}}function Jf(i,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var f=i,m=a,R=m.flags;switch(m.tag){case 22:Jf(f,m),R&2048&&eb(m.alternate,m);break;case 24:Jf(f,m),R&2048&&tb(m.alternate,m);break;default:Jf(f,m)}a=a.sibling}}var ed=8192;function Fc(i,a,f){if(i.subtreeFlags&ed)for(i=i.child;i!==null;)AT(i,a,f),i=i.sibling}function AT(i,a,f){switch(i.tag){case 26:Fc(i,a,f),i.flags&ed&&i.memoizedState!==null&&DL(f,mi,i.memoizedState,i.memoizedProps);break;case 5:Fc(i,a,f);break;case 3:case 4:var m=mi;mi=Jp(i.stateNode.containerInfo),Fc(i,a,f),mi=m;break;case 22:i.memoizedState===null&&(m=i.alternate,m!==null&&m.memoizedState!==null?(m=ed,ed=16777216,Fc(i,a,f),ed=m):Fc(i,a,f));break;default:Fc(i,a,f)}}function kT(i){var a=i.alternate;if(a!==null&&(i=a.child,i!==null)){a.child=null;do a=i.sibling,i.sibling=null,i=a;while(i!==null)}}function td(i){var a=i.deletions;if((i.flags&16)!==0){if(a!==null)for(var f=0;f<a.length;f++){var m=a[f];jr=m,jT(m,i)}kT(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)MT(i),i=i.sibling}function MT(i){switch(i.tag){case 0:case 11:case 15:td(i),i.flags&2048&&aa(9,i,i.return);break;case 3:td(i);break;case 12:td(i);break;case 22:var a=i.stateNode;i.memoizedState!==null&&a._visibility&2&&(i.return===null||i.return.tag!==13)?(a._visibility&=-3,Fp(i)):td(i);break;default:td(i)}}function Fp(i){var a=i.deletions;if((i.flags&16)!==0){if(a!==null)for(var f=0;f<a.length;f++){var m=a[f];jr=m,jT(m,i)}kT(i)}for(i=i.child;i!==null;){switch(a=i,a.tag){case 0:case 11:case 15:aa(8,a,a.return),Fp(a);break;case 22:f=a.stateNode,f._visibility&2&&(f._visibility&=-3,Fp(a));break;default:Fp(a)}i=i.sibling}}function jT(i,a){for(;jr!==null;){var f=jr;switch(f.tag){case 0:case 11:case 15:aa(8,f,a);break;case 23:case 22:if(f.memoizedState!==null&&f.memoizedState.cachePool!==null){var m=f.memoizedState.cachePool.pool;m!=null&&m.refCount++}break;case 24:zf(f.memoizedState.cache)}if(m=f.child,m!==null)m.return=f,jr=m;else e:for(f=i;jr!==null;){m=jr;var R=m.sibling,A=m.return;if(xT(m),m===f){jr=null;break e}if(R!==null){R.return=A,jr=R;break e}jr=A}}}var Y8={getCacheForType:function(i){var a=zr(dr),f=a.data.get(i);return f===void 0&&(f=i(),a.data.set(i,f)),f},cacheSignal:function(){return zr(dr).controller.signal}},X8=typeof WeakMap=="function"?WeakMap:Map,ln=0,Tn=null,zt=null,Ft=0,gn=0,Ro=null,la=!1,Uc=!1,nb=!1,Cs=0,tr=0,ca=0,Tl=0,rb=0,Oo=0,Vc=0,nd=null,yo=null,ob=!1,Up=0,PT=0,Vp=1/0,qp=null,ua=null,xr=0,fa=null,qc=null,Ts=0,ib=0,sb=null,NT=null,rd=0,ab=null;function Ao(){return(ln&2)!==0&&Ft!==0?Ft&-Ft:Z.T!==null?hb():sr()}function DT(){if(Oo===0)if((Ft&536870912)===0||Ht){var i=sn;sn<<=1,(sn&3932160)===0&&(sn=262144),Oo=i}else Oo=536870912;return i=Co.current,i!==null&&(i.flags|=32),Oo}function vo(i,a,f){(i===Tn&&(gn===2||gn===9)||i.cancelPendingCommit!==null)&&(Bc(i,0),da(i,Ft,Oo,!1)),mn(i,f),((ln&2)===0||i!==Tn)&&(i===Tn&&((ln&2)===0&&(Tl|=f),tr===4&&da(i,Ft,Oo,!1)),Di(i))}function $T(i,a,f){if((ln&6)!==0)throw Error(r(327));var m=!f&&(a&127)===0&&(a&i.expiredLanes)===0||Nt(i,a),R=m?eL(i,a):cb(i,a,!0),A=m;do{if(R===0){Uc&&!m&&da(i,a,0,!1);break}else{if(f=i.current.alternate,A&&!Q8(f)){R=cb(i,a,!1),A=!1;continue}if(R===2){if(A=a,i.errorRecoveryDisabledLanes&A)var N=0;else N=i.pendingLanes&-536870913,N=N!==0?N:N&536870912?536870912:0;if(N!==0){a=N;e:{var W=i;R=nd;var se=W.current.memoizedState.isDehydrated;if(se&&(Bc(W,N).flags|=256),N=cb(W,N,!1),N!==2){if(nb&&!se){W.errorRecoveryDisabledLanes|=A,Tl|=A,R=4;break e}A=yo,yo=R,A!==null&&(yo===null?yo=A:yo.push.apply(yo,A))}R=N}if(A=!1,R!==2)continue}}if(R===1){Bc(i,0),da(i,a,0,!0);break}e:{switch(m=i,A=R,A){case 0:case 1:throw Error(r(345));case 4:if((a&4194048)!==a)break;case 6:da(m,a,Oo,!la);break e;case 2:yo=null;break;case 3:case 5:break;default:throw Error(r(329))}if((a&62914560)===a&&(R=Up+300-Le(),10<R)){if(da(m,a,Oo,!la),Yt(m,0,!0)!==0)break e;Ts=a,m.timeoutHandle=hR(IT.bind(null,m,f,yo,qp,ob,a,Oo,Tl,Vc,la,A,"Throttled",-0,0),R);break e}IT(m,f,yo,qp,ob,a,Oo,Tl,Vc,la,A,null,-0,0)}}break}while(!0);Di(i)}function IT(i,a,f,m,R,A,N,W,se,be,Ae,Pe,Se,Ee){if(i.timeoutHandle=-1,Pe=a.subtreeFlags,Pe&8192||(Pe&16785408)===16785408){Pe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Oe},AT(a,A,Pe);var Xe=(A&62914560)===A?Up-Le():(A&4194048)===A?PT-Le():0;if(Xe=$L(Pe,Xe),Xe!==null){Ts=A,i.cancelPendingCommit=Xe(HT.bind(null,i,a,A,f,m,R,N,W,se,Ae,Pe,null,Se,Ee)),da(i,A,N,!be);return}}HT(i,a,A,f,m,R,N,W,se)}function Q8(i){for(var a=i;;){var f=a.tag;if((f===0||f===11||f===15)&&a.flags&16384&&(f=a.updateQueue,f!==null&&(f=f.stores,f!==null)))for(var m=0;m<f.length;m++){var R=f[m],A=R.getSnapshot;R=R.value;try{if(!_o(A(),R))return!1}catch{return!1}}if(f=a.child,a.subtreeFlags&16384&&f!==null)f.return=a,a=f;else{if(a===i)break;for(;a.sibling===null;){if(a.return===null||a.return===i)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function da(i,a,f,m){a&=~rb,a&=~Tl,i.suspendedLanes|=a,i.pingedLanes&=~a,m&&(i.warmLanes|=a),m=i.expirationTimes;for(var R=a;0<R;){var A=31-qt(R),N=1<<A;m[A]=-1,R&=~N}f!==0&&qn(i,f,a)}function Bp(){return(ln&6)===0?(od(0),!1):!0}function lb(){if(zt!==null){if(gn===0)var i=zt.return;else i=zt,ms=yl=null,Ev(i),Nc=null,Ff=0,i=zt;for(;i!==null;)pT(i.alternate,i),i=i.return;zt=null}}function Bc(i,a){var f=i.timeoutHandle;f!==-1&&(i.timeoutHandle=-1,vL(f)),f=i.cancelPendingCommit,f!==null&&(i.cancelPendingCommit=null,f()),Ts=0,lb(),Tn=i,zt=f=hs(i.current,null),Ft=a,gn=0,Ro=null,la=!1,Uc=Nt(i,a),nb=!1,Vc=Oo=rb=Tl=ca=tr=0,yo=nd=null,ob=!1,(a&8)!==0&&(a|=a&32);var m=i.entangledLanes;if(m!==0)for(i=i.entanglements,m&=a;0<m;){var R=31-qt(m),A=1<<R;a|=i[R],m&=~A}return Cs=a,fp(),f}function zT(i,a){Ct=null,Z.H=Zf,a===Pc||a===bp?(a=eC(),gn=3):a===dv?(a=eC(),gn=4):gn=a===Fv?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,Ro=a,zt===null&&(tr=1,Pp(i,Bo(a,i.current)))}function LT(){var i=Co.current;return i===null?!0:(Ft&4194048)===Ft?Zo===null:(Ft&62914560)===Ft||(Ft&536870912)!==0?i===Zo:!1}function FT(){var i=Z.H;return Z.H=Zf,i===null?Zf:i}function UT(){var i=Z.A;return Z.A=Y8,i}function Hp(){tr=4,la||(Ft&4194048)!==Ft&&Co.current!==null||(Uc=!0),(ca&134217727)===0&&(Tl&134217727)===0||Tn===null||da(Tn,Ft,Oo,!1)}function cb(i,a,f){var m=ln;ln|=2;var R=FT(),A=UT();(Tn!==i||Ft!==a)&&(qp=null,Bc(i,a)),a=!1;var N=tr;e:do try{if(gn!==0&&zt!==null){var W=zt,se=Ro;switch(gn){case 8:lb(),N=6;break e;case 3:case 2:case 9:case 6:Co.current===null&&(a=!0);var be=gn;if(gn=0,Ro=null,Hc(i,W,se,be),f&&Uc){N=0;break e}break;default:be=gn,gn=0,Ro=null,Hc(i,W,se,be)}}J8(),N=tr;break}catch(Ae){zT(i,Ae)}while(!0);return a&&i.shellSuspendCounter++,ms=yl=null,ln=m,Z.H=R,Z.A=A,zt===null&&(Tn=null,Ft=0,fp()),N}function J8(){for(;zt!==null;)VT(zt)}function eL(i,a){var f=ln;ln|=2;var m=FT(),R=UT();Tn!==i||Ft!==a?(qp=null,Vp=Le()+500,Bc(i,a)):Uc=Nt(i,a);e:do try{if(gn!==0&&zt!==null){a=zt;var A=Ro;t:switch(gn){case 1:gn=0,Ro=null,Hc(i,a,A,1);break;case 2:case 9:if(Q2(A)){gn=0,Ro=null,qT(a);break}a=function(){gn!==2&&gn!==9||Tn!==i||(gn=7),Di(i)},A.then(a,a);break e;case 3:gn=7;break e;case 4:gn=5;break e;case 7:Q2(A)?(gn=0,Ro=null,qT(a)):(gn=0,Ro=null,Hc(i,a,A,7));break;case 5:var N=null;switch(zt.tag){case 26:N=zt.memoizedState;case 5:case 27:var W=zt;if(N?OR(N):W.stateNode.complete){gn=0,Ro=null;var se=W.sibling;if(se!==null)zt=se;else{var be=W.return;be!==null?(zt=be,Kp(be)):zt=null}break t}}gn=0,Ro=null,Hc(i,a,A,5);break;case 6:gn=0,Ro=null,Hc(i,a,A,6);break;case 8:lb(),tr=6;break e;default:throw Error(r(462))}}tL();break}catch(Ae){zT(i,Ae)}while(!0);return ms=yl=null,Z.H=m,Z.A=R,ln=f,zt!==null?0:(Tn=null,Ft=0,fp(),tr)}function tL(){for(;zt!==null&&!We();)VT(zt)}function VT(i){var a=dT(i.alternate,i,Cs);i.memoizedProps=i.pendingProps,a===null?Kp(i):zt=a}function qT(i){var a=i,f=a.alternate;switch(a.tag){case 15:case 0:a=sT(f,a,a.pendingProps,a.type,void 0,Ft);break;case 11:a=sT(f,a,a.pendingProps,a.type.render,a.ref,Ft);break;case 5:Ev(a);default:pT(f,a),a=zt=U2(a,Cs),a=dT(f,a,Cs)}i.memoizedProps=i.pendingProps,a===null?Kp(i):zt=a}function Hc(i,a,f,m){ms=yl=null,Ev(a),Nc=null,Ff=0;var R=a.return;try{if(q8(i,R,a,f,Ft)){tr=1,Pp(i,Bo(f,i.current)),zt=null;return}}catch(A){if(R!==null)throw zt=R,A;tr=1,Pp(i,Bo(f,i.current)),zt=null;return}a.flags&32768?(Ht||m===1?i=!0:Uc||(Ft&536870912)!==0?i=!1:(la=i=!0,(m===2||m===9||m===3||m===6)&&(m=Co.current,m!==null&&m.tag===13&&(m.flags|=16384))),BT(a,i)):Kp(a)}function Kp(i){var a=i;do{if((a.flags&32768)!==0){BT(a,la);return}i=a.return;var f=K8(a.alternate,a,Cs);if(f!==null){zt=f;return}if(a=a.sibling,a!==null){zt=a;return}zt=a=i}while(a!==null);tr===0&&(tr=5)}function BT(i,a){do{var f=G8(i.alternate,i);if(f!==null){f.flags&=32767,zt=f;return}if(f=i.return,f!==null&&(f.flags|=32768,f.subtreeFlags=0,f.deletions=null),!a&&(i=i.sibling,i!==null)){zt=i;return}zt=i=f}while(i!==null);tr=6,zt=null}function HT(i,a,f,m,R,A,N,W,se){i.cancelPendingCommit=null;do Gp();while(xr!==0);if((ln&6)!==0)throw Error(r(327));if(a!==null){if(a===i.current)throw Error(r(177));if(A=a.lanes|a.childLanes,A|=X0,En(i,f,A,N,W,se),i===Tn&&(zt=Tn=null,Ft=0),qc=a,fa=i,Ts=f,ib=A,sb=R,NT=m,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,iL(pe,function(){return YT(),null})):(i.callbackNode=null,i.callbackPriority=0),m=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||m){m=Z.T,Z.T=null,R=H.p,H.p=2,N=ln,ln|=4;try{Z8(i,a,f)}finally{ln=N,H.p=R,Z.T=m}}xr=1,KT(),GT(),ZT()}}function KT(){if(xr===1){xr=0;var i=fa,a=qc,f=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||f){f=Z.T,Z.T=null;var m=H.p;H.p=2;var R=ln;ln|=4;try{TT(a,i);var A=wb,N=j2(i.containerInfo),W=A.focusedElem,se=A.selectionRange;if(N!==W&&W&&W.ownerDocument&&M2(W.ownerDocument.documentElement,W)){if(se!==null&&K0(W)){var be=se.start,Ae=se.end;if(Ae===void 0&&(Ae=be),"selectionStart"in W)W.selectionStart=be,W.selectionEnd=Math.min(Ae,W.value.length);else{var Pe=W.ownerDocument||document,Se=Pe&&Pe.defaultView||window;if(Se.getSelection){var Ee=Se.getSelection(),Xe=W.textContent.length,ut=Math.min(se.start,Xe),xn=se.end===void 0?ut:Math.min(se.end,Xe);!Ee.extend&&ut>xn&&(N=xn,xn=ut,ut=N);var he=k2(W,ut),fe=k2(W,xn);if(he&&fe&&(Ee.rangeCount!==1||Ee.anchorNode!==he.node||Ee.anchorOffset!==he.offset||Ee.focusNode!==fe.node||Ee.focusOffset!==fe.offset)){var ve=Pe.createRange();ve.setStart(he.node,he.offset),Ee.removeAllRanges(),ut>xn?(Ee.addRange(ve),Ee.extend(fe.node,fe.offset)):(ve.setEnd(fe.node,fe.offset),Ee.addRange(ve))}}}}for(Pe=[],Ee=W;Ee=Ee.parentNode;)Ee.nodeType===1&&Pe.push({element:Ee,left:Ee.scrollLeft,top:Ee.scrollTop});for(typeof W.focus=="function"&&W.focus(),W=0;W<Pe.length;W++){var je=Pe[W];je.element.scrollLeft=je.left,je.element.scrollTop=je.top}}im=!!Sb,wb=Sb=null}finally{ln=R,H.p=m,Z.T=f}}i.current=a,xr=2}}function GT(){if(xr===2){xr=0;var i=fa,a=qc,f=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||f){f=Z.T,Z.T=null;var m=H.p;H.p=2;var R=ln;ln|=4;try{wT(i,a.alternate,a)}finally{ln=R,H.p=m,Z.T=f}}xr=3}}function ZT(){if(xr===4||xr===3){xr=0,ze();var i=fa,a=qc,f=Ts,m=NT;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?xr=5:(xr=0,qc=fa=null,WT(i,i.pendingLanes));var R=i.pendingLanes;if(R===0&&(ua=null),Ar(f),a=a.stateNode,pt&&typeof pt.onCommitFiberRoot=="function")try{pt.onCommitFiberRoot(bt,a,void 0,(a.current.flags&128)===128)}catch{}if(m!==null){a=Z.T,R=H.p,H.p=2,Z.T=null;try{for(var A=i.onRecoverableError,N=0;N<m.length;N++){var W=m[N];A(W.value,{componentStack:W.stack})}}finally{Z.T=a,H.p=R}}(Ts&3)!==0&&Gp(),Di(i),R=i.pendingLanes,(f&261930)!==0&&(R&42)!==0?i===ab?rd++:(rd=0,ab=i):rd=0,od(0)}}function WT(i,a){(i.pooledCacheLanes&=a)===0&&(a=i.pooledCache,a!=null&&(i.pooledCache=null,zf(a)))}function Gp(){return KT(),GT(),ZT(),YT()}function YT(){if(xr!==5)return!1;var i=fa,a=ib;ib=0;var f=Ar(Ts),m=Z.T,R=H.p;try{H.p=32>f?32:f,Z.T=null,f=sb,sb=null;var A=fa,N=Ts;if(xr=0,qc=fa=null,Ts=0,(ln&6)!==0)throw Error(r(331));var W=ln;if(ln|=4,MT(A.current),OT(A,A.current,N,f),ln=W,od(0,!1),pt&&typeof pt.onPostCommitFiberRoot=="function")try{pt.onPostCommitFiberRoot(bt,A)}catch{}return!0}finally{H.p=R,Z.T=m,WT(i,a)}}function XT(i,a,f){a=Bo(f,a),a=Lv(i.stateNode,a,2),i=oa(i,a,2),i!==null&&(mn(i,2),Di(i))}function yn(i,a,f){if(i.tag===3)XT(i,i,f);else for(;a!==null;){if(a.tag===3){XT(a,i,f);break}else if(a.tag===1){var m=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(ua===null||!ua.has(m))){i=Bo(f,i),f=QC(2),m=oa(a,f,2),m!==null&&(JC(f,m,a,i),mn(m,2),Di(m));break}}a=a.return}}function ub(i,a,f){var m=i.pingCache;if(m===null){m=i.pingCache=new X8;var R=new Set;m.set(a,R)}else R=m.get(a),R===void 0&&(R=new Set,m.set(a,R));R.has(f)||(nb=!0,R.add(f),i=nL.bind(null,i,a,f),a.then(i,i))}function nL(i,a,f){var m=i.pingCache;m!==null&&m.delete(a),i.pingedLanes|=i.suspendedLanes&f,i.warmLanes&=~f,Tn===i&&(Ft&f)===f&&(tr===4||tr===3&&(Ft&62914560)===Ft&&300>Le()-Up?(ln&2)===0&&Bc(i,0):rb|=f,Vc===Ft&&(Vc=0)),Di(i)}function QT(i,a){a===0&&(a=ft()),i=pl(i,a),i!==null&&(mn(i,a),Di(i))}function rL(i){var a=i.memoizedState,f=0;a!==null&&(f=a.retryLane),QT(i,f)}function oL(i,a){var f=0;switch(i.tag){case 31:case 13:var m=i.stateNode,R=i.memoizedState;R!==null&&(f=R.retryLane);break;case 19:m=i.stateNode;break;case 22:m=i.stateNode._retryCache;break;default:throw Error(r(314))}m!==null&&m.delete(a),QT(i,f)}function iL(i,a){return Fe(i,a)}var Zp=null,Kc=null,fb=!1,Wp=!1,db=!1,ha=0;function Di(i){i!==Kc&&i.next===null&&(Kc===null?Zp=Kc=i:Kc=Kc.next=i),Wp=!0,fb||(fb=!0,aL())}function od(i,a){if(!db&&Wp){db=!0;do for(var f=!1,m=Zp;m!==null;){if(i!==0){var R=m.pendingLanes;if(R===0)var A=0;else{var N=m.suspendedLanes,W=m.pingedLanes;A=(1<<31-qt(42|i)+1)-1,A&=R&~(N&~W),A=A&201326741?A&201326741|1:A?A|2:0}A!==0&&(f=!0,nR(m,A))}else A=Ft,A=Yt(m,m===Tn?A:0,m.cancelPendingCommit!==null||m.timeoutHandle!==-1),(A&3)===0||Nt(m,A)||(f=!0,nR(m,A));m=m.next}while(f);db=!1}}function sL(){JT()}function JT(){Wp=fb=!1;var i=0;ha!==0&&yL()&&(i=ha);for(var a=Le(),f=null,m=Zp;m!==null;){var R=m.next,A=eR(m,a);A===0?(m.next=null,f===null?Zp=R:f.next=R,R===null&&(Kc=f)):(f=m,(i!==0||(A&3)!==0)&&(Wp=!0)),m=R}xr!==0&&xr!==5||od(i),ha!==0&&(ha=0)}function eR(i,a){for(var f=i.suspendedLanes,m=i.pingedLanes,R=i.expirationTimes,A=i.pendingLanes&-62914561;0<A;){var N=31-qt(A),W=1<<N,se=R[N];se===-1?((W&f)===0||(W&m)!==0)&&(R[N]=Vn(W,a)):se<=a&&(i.expiredLanes|=W),A&=~W}if(a=Tn,f=Ft,f=Yt(i,i===a?f:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),m=i.callbackNode,f===0||i===a&&(gn===2||gn===9)||i.cancelPendingCommit!==null)return m!==null&&m!==null&&Re(m),i.callbackNode=null,i.callbackPriority=0;if((f&3)===0||Nt(i,f)){if(a=f&-f,a===i.callbackPriority)return a;switch(m!==null&&Re(m),Ar(f)){case 2:case 8:f=Ce;break;case 32:f=pe;break;case 268435456:f=Be;break;default:f=pe}return m=tR.bind(null,i),f=Fe(f,m),i.callbackPriority=a,i.callbackNode=f,a}return m!==null&&m!==null&&Re(m),i.callbackPriority=2,i.callbackNode=null,2}function tR(i,a){if(xr!==0&&xr!==5)return i.callbackNode=null,i.callbackPriority=0,null;var f=i.callbackNode;if(Gp()&&i.callbackNode!==f)return null;var m=Ft;return m=Yt(i,i===Tn?m:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),m===0?null:($T(i,m,a),eR(i,Le()),i.callbackNode!=null&&i.callbackNode===f?tR.bind(null,i):null)}function nR(i,a){if(Gp())return null;$T(i,a,!0)}function aL(){bL(function(){(ln&6)!==0?Fe(dt,sL):JT()})}function hb(){if(ha===0){var i=Mc;i===0&&(i=Bt,Bt<<=1,(Bt&261888)===0&&(Bt=256)),ha=i}return ha}function rR(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:ce(""+i)}function oR(i,a){var f=a.ownerDocument.createElement("input");return f.name=a.name,f.value=a.value,i.id&&f.setAttribute("form",i.id),a.parentNode.insertBefore(f,a),i=new FormData(i),f.parentNode.removeChild(f),i}function lL(i,a,f,m,R){if(a==="submit"&&f&&f.stateNode===R){var A=rR((R[Cn]||null).action),N=m.submitter;N&&(a=(a=N[Cn]||null)?rR(a.formAction):N.getAttribute("formAction"),a!==null&&(A=a,N=null));var W=new Mi("action","action",null,m,R);i.push({event:W,listeners:[{instance:null,listener:function(){if(m.defaultPrevented){if(ha!==0){var se=N?oR(R,N):new FormData(R);Pv(f,{pending:!0,data:se,method:R.method,action:A},null,se)}}else typeof A=="function"&&(W.preventDefault(),se=N?oR(R,N):new FormData(R),Pv(f,{pending:!0,data:se,method:R.method,action:A},A,se))},currentTarget:R}]})}}for(var pb=0;pb<Y0.length;pb++){var mb=Y0[pb],cL=mb.toLowerCase(),uL=mb[0].toUpperCase()+mb.slice(1);pi(cL,"on"+uL)}pi(D2,"onAnimationEnd"),pi($2,"onAnimationIteration"),pi(I2,"onAnimationStart"),pi("dblclick","onDoubleClick"),pi("focusin","onFocus"),pi("focusout","onBlur"),pi(T8,"onTransitionRun"),pi(R8,"onTransitionStart"),pi(O8,"onTransitionCancel"),pi(z2,"onTransitionEnd"),us("onMouseEnter",["mouseout","mouseover"]),us("onMouseLeave",["mouseout","mouseover"]),us("onPointerEnter",["pointerout","pointerover"]),us("onPointerLeave",["pointerout","pointerover"]),cs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),cs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),cs("onBeforeInput",["compositionend","keypress","textInput","paste"]),cs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),cs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),cs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var id="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(" "),fL=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(id));function iR(i,a){a=(a&4)!==0;for(var f=0;f<i.length;f++){var m=i[f],R=m.event;m=m.listeners;e:{var A=void 0;if(a)for(var N=m.length-1;0<=N;N--){var W=m[N],se=W.instance,be=W.currentTarget;if(W=W.listener,se!==A&&R.isPropagationStopped())break e;A=W,R.currentTarget=be;try{A(R)}catch(Ae){up(Ae)}R.currentTarget=null,A=se}else for(N=0;N<m.length;N++){if(W=m[N],se=W.instance,be=W.currentTarget,W=W.listener,se!==A&&R.isPropagationStopped())break e;A=W,R.currentTarget=be;try{A(R)}catch(Ae){up(Ae)}R.currentTarget=null,A=se}}}}function Lt(i,a){var f=a[xo];f===void 0&&(f=a[xo]=new Set);var m=i+"__bubble";f.has(m)||(sR(a,i,2,!1),f.add(m))}function gb(i,a,f){var m=0;a&&(m|=4),sR(f,i,m,a)}var Yp="_reactListening"+Math.random().toString(36).slice(2);function yb(i){if(!i[Yp]){i[Yp]=!0,Ef.forEach(function(f){f!=="selectionchange"&&(fL.has(f)||gb(f,!1,i),gb(f,!0,i))});var a=i.nodeType===9?i:i.ownerDocument;a===null||a[Yp]||(a[Yp]=!0,gb("selectionchange",!1,a))}}function sR(i,a,f,m){switch(DR(a)){case 2:var R=LL;break;case 8:R=FL;break;default:R=jb}f=R.bind(null,a,f,i),R=void 0,!ar||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(R=!0),m?R!==void 0?i.addEventListener(a,f,{capture:!0,passive:R}):i.addEventListener(a,f,!0):R!==void 0?i.addEventListener(a,f,{passive:R}):i.addEventListener(a,f,!1)}function vb(i,a,f,m,R){var A=m;if((a&1)===0&&(a&2)===0&&m!==null)e:for(;;){if(m===null)return;var N=m.tag;if(N===3||N===4){var W=m.stateNode.containerInfo;if(W===R)break;if(N===4)for(N=m.return;N!==null;){var se=N.tag;if((se===3||se===4)&&N.stateNode.containerInfo===R)return;N=N.return}for(;W!==null;){if(N=Ks(W),N===null)return;if(se=N.tag,se===5||se===6||se===26||se===27){m=A=N;continue e}W=W.parentNode}}m=m.return}It(function(){var be=A,Ae=qe(f),Pe=[];e:{var Se=L2.get(i);if(Se!==void 0){var Ee=Mi,Xe=i;switch(i){case"keypress":if(hi(f)===0)break e;case"keydown":case"keyup":Ee=o8;break;case"focusin":Xe="focus",Ee=U0;break;case"focusout":Xe="blur",Ee=U0;break;case"beforeblur":case"afterblur":Ee=U0;break;case"click":if(f.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Ee=p2;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Ee=Kz;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Ee=a8;break;case D2:case $2:case I2:Ee=Wz;break;case z2:Ee=c8;break;case"scroll":case"scrollend":Ee=Af;break;case"wheel":Ee=f8;break;case"copy":case"cut":case"paste":Ee=Xz;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Ee=g2;break;case"toggle":case"beforetoggle":Ee=h8}var ut=(a&4)!==0,xn=!ut&&(i==="scroll"||i==="scrollend"),he=ut?Se!==null?Se+"Capture":null:Se;ut=[];for(var fe=be,ve;fe!==null;){var je=fe;if(ve=je.stateNode,je=je.tag,je!==5&&je!==26&&je!==27||ve===null||he===null||(je=st(fe,he),je!=null&&ut.push(sd(fe,je,ve))),xn)break;fe=fe.return}0<ut.length&&(Se=new Ee(Se,Xe,null,f,Ae),Pe.push({event:Se,listeners:ut}))}}if((a&7)===0){e:{if(Se=i==="mouseover"||i==="pointerover",Ee=i==="mouseout"||i==="pointerout",Se&&f!==De&&(Xe=f.relatedTarget||f.fromElement)&&(Ks(Xe)||Xe[Dr]))break e;if((Ee||Se)&&(Se=Ae.window===Ae?Ae:(Se=Ae.ownerDocument)?Se.defaultView||Se.parentWindow:window,Ee?(Xe=f.relatedTarget||f.toElement,Ee=be,Xe=Xe?Ks(Xe):null,Xe!==null&&(xn=s(Xe),ut=Xe.tag,Xe!==xn||ut!==5&&ut!==27&&ut!==6)&&(Xe=null)):(Ee=null,Xe=be),Ee!==Xe)){if(ut=p2,je="onMouseLeave",he="onMouseEnter",fe="mouse",(i==="pointerout"||i==="pointerover")&&(ut=g2,je="onPointerLeave",he="onPointerEnter",fe="pointer"),xn=Ee==null?Se:ll(Ee),ve=Xe==null?Se:ll(Xe),Se=new ut(je,fe+"leave",Ee,f,Ae),Se.target=xn,Se.relatedTarget=ve,je=null,Ks(Ae)===be&&(ut=new ut(he,fe+"enter",Xe,f,Ae),ut.target=ve,ut.relatedTarget=xn,je=ut),xn=je,Ee&&Xe)t:{for(ut=dL,he=Ee,fe=Xe,ve=0,je=he;je;je=ut(je))ve++;je=0;for(var at=fe;at;at=ut(at))je++;for(;0<ve-je;)he=ut(he),ve--;for(;0<je-ve;)fe=ut(fe),je--;for(;ve--;){if(he===fe||fe!==null&&he===fe.alternate){ut=he;break t}he=ut(he),fe=ut(fe)}ut=null}else ut=null;Ee!==null&&aR(Pe,Se,Ee,ut,!1),Xe!==null&&xn!==null&&aR(Pe,xn,Xe,ut,!0)}}e:{if(Se=be?ll(be):window,Ee=Se.nodeName&&Se.nodeName.toLowerCase(),Ee==="select"||Ee==="input"&&Se.type==="file")var Jt=E2;else if(x2(Se))if(C2)Jt=_8;else{Jt=w8;var tt=S8}else Ee=Se.nodeName,!Ee||Ee.toLowerCase()!=="input"||Se.type!=="checkbox"&&Se.type!=="radio"?be&&ae(be.elementType)&&(Jt=E2):Jt=x8;if(Jt&&(Jt=Jt(i,be))){_2(Pe,Jt,f,Ae);break e}tt&&tt(i,Se,be),i==="focusout"&&be&&Se.type==="number"&&be.memoizedProps.value!=null&&Rf(Se,"number",Se.value)}switch(tt=be?ll(be):window,i){case"focusin":(x2(tt)||tt.contentEditable==="true")&&(_c=tt,G0=be,Df=null);break;case"focusout":Df=G0=_c=null;break;case"mousedown":Z0=!0;break;case"contextmenu":case"mouseup":case"dragend":Z0=!1,P2(Pe,f,Ae);break;case"selectionchange":if(C8)break;case"keydown":case"keyup":P2(Pe,f,Ae)}var Rt;if(q0)e:{switch(i){case"compositionstart":var Ut="onCompositionStart";break e;case"compositionend":Ut="onCompositionEnd";break e;case"compositionupdate":Ut="onCompositionUpdate";break e}Ut=void 0}else xc?S2(i,f)&&(Ut="onCompositionEnd"):i==="keydown"&&f.keyCode===229&&(Ut="onCompositionStart");Ut&&(y2&&f.locale!=="ko"&&(xc||Ut!=="onCompositionStart"?Ut==="onCompositionEnd"&&xc&&(Rt=fs()):(wr=Ae,kr="value"in wr?wr.value:wr.textContent,xc=!0)),tt=Xp(be,Ut),0<tt.length&&(Ut=new m2(Ut,i,null,f,Ae),Pe.push({event:Ut,listeners:tt}),Rt?Ut.data=Rt:(Rt=w2(f),Rt!==null&&(Ut.data=Rt)))),(Rt=m8?g8(i,f):y8(i,f))&&(Ut=Xp(be,"onBeforeInput"),0<Ut.length&&(tt=new m2("onBeforeInput","beforeinput",null,f,Ae),Pe.push({event:tt,listeners:Ut}),tt.data=Rt)),lL(Pe,i,be,f,Ae)}iR(Pe,a)})}function sd(i,a,f){return{instance:i,listener:a,currentTarget:f}}function Xp(i,a){for(var f=a+"Capture",m=[];i!==null;){var R=i,A=R.stateNode;if(R=R.tag,R!==5&&R!==26&&R!==27||A===null||(R=st(i,f),R!=null&&m.unshift(sd(i,R,A)),R=st(i,a),R!=null&&m.push(sd(i,R,A))),i.tag===3)return m;i=i.return}return[]}function dL(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function aR(i,a,f,m,R){for(var A=a._reactName,N=[];f!==null&&f!==m;){var W=f,se=W.alternate,be=W.stateNode;if(W=W.tag,se!==null&&se===m)break;W!==5&&W!==26&&W!==27||be===null||(se=be,R?(be=st(f,A),be!=null&&N.unshift(sd(f,be,se))):R||(be=st(f,A),be!=null&&N.push(sd(f,be,se)))),f=f.return}N.length!==0&&i.push({event:a,listeners:N})}var hL=/\r\n?/g,pL=/\u0000|\uFFFD/g;function lR(i){return(typeof i=="string"?i:""+i).replace(hL,`
9
- `).replace(pL,"")}function cR(i,a){return a=lR(a),lR(i)===a}function wn(i,a,f,m,R,A){switch(f){case"children":typeof m=="string"?a==="body"||a==="textarea"&&m===""||X(i,m):(typeof m=="number"||typeof m=="bigint")&&a!=="body"&&X(i,""+m);break;case"className":cl(i,"class",m);break;case"tabIndex":cl(i,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":cl(i,f,m);break;case"style":K(i,m,A);break;case"data":if(a!=="object"){cl(i,"data",m);break}case"src":case"href":if(m===""&&(a!=="a"||f!=="href")){i.removeAttribute(f);break}if(m==null||typeof m=="function"||typeof m=="symbol"||typeof m=="boolean"){i.removeAttribute(f);break}m=ce(""+m),i.setAttribute(f,m);break;case"action":case"formAction":if(typeof m=="function"){i.setAttribute(f,"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 A=="function"&&(f==="formAction"?(a!=="input"&&wn(i,a,"name",R.name,R,null),wn(i,a,"formEncType",R.formEncType,R,null),wn(i,a,"formMethod",R.formMethod,R,null),wn(i,a,"formTarget",R.formTarget,R,null)):(wn(i,a,"encType",R.encType,R,null),wn(i,a,"method",R.method,R,null),wn(i,a,"target",R.target,R,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){i.removeAttribute(f);break}m=ce(""+m),i.setAttribute(f,m);break;case"onClick":m!=null&&(i.onclick=Oe);break;case"onScroll":m!=null&&Lt("scroll",i);break;case"onScrollEnd":m!=null&&Lt("scrollend",i);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(r(61));if(f=m.__html,f!=null){if(R.children!=null)throw Error(r(60));i.innerHTML=f}}break;case"multiple":i.multiple=m&&typeof m!="function"&&typeof m!="symbol";break;case"muted":i.muted=m&&typeof m!="function"&&typeof m!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(m==null||typeof m=="function"||typeof m=="boolean"||typeof m=="symbol"){i.removeAttribute("xlink:href");break}f=ce(""+m),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",f);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":m!=null&&typeof m!="function"&&typeof m!="symbol"?i.setAttribute(f,""+m):i.removeAttribute(f);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":m&&typeof m!="function"&&typeof m!="symbol"?i.setAttribute(f,""):i.removeAttribute(f);break;case"capture":case"download":m===!0?i.setAttribute(f,""):m!==!1&&m!=null&&typeof m!="function"&&typeof m!="symbol"?i.setAttribute(f,m):i.removeAttribute(f);break;case"cols":case"rows":case"size":case"span":m!=null&&typeof m!="function"&&typeof m!="symbol"&&!isNaN(m)&&1<=m?i.setAttribute(f,m):i.removeAttribute(f);break;case"rowSpan":case"start":m==null||typeof m=="function"||typeof m=="symbol"||isNaN(m)?i.removeAttribute(f):i.setAttribute(f,m);break;case"popover":Lt("beforetoggle",i),Lt("toggle",i),Sc(i,"popover",m);break;case"xlinkActuate":Vo(i,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":Vo(i,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":Vo(i,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":Vo(i,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":Vo(i,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":Vo(i,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":Vo(i,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":Vo(i,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":Vo(i,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":Sc(i,"is",m);break;case"innerText":case"textContent":break;default:(!(2<f.length)||f[0]!=="o"&&f[0]!=="O"||f[1]!=="n"&&f[1]!=="N")&&(f=xe.get(f)||f,Sc(i,f,m))}}function bb(i,a,f,m,R,A){switch(f){case"style":K(i,m,A);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(r(61));if(f=m.__html,f!=null){if(R.children!=null)throw Error(r(60));i.innerHTML=f}}break;case"children":typeof m=="string"?X(i,m):(typeof m=="number"||typeof m=="bigint")&&X(i,""+m);break;case"onScroll":m!=null&&Lt("scroll",i);break;case"onScrollEnd":m!=null&&Lt("scrollend",i);break;case"onClick":m!=null&&(i.onclick=Oe);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!vc.hasOwnProperty(f))e:{if(f[0]==="o"&&f[1]==="n"&&(R=f.endsWith("Capture"),a=f.slice(2,R?f.length-7:void 0),A=i[Cn]||null,A=A!=null?A[f]:null,typeof A=="function"&&i.removeEventListener(a,A,R),typeof m=="function")){typeof A!="function"&&A!==null&&(f in i?i[f]=null:i.hasAttribute(f)&&i.removeAttribute(f)),i.addEventListener(a,m,R);break e}f in i?i[f]=m:m===!0?i.setAttribute(f,""):Sc(i,f,m)}}}function Fr(i,a,f){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Lt("error",i),Lt("load",i);var m=!1,R=!1,A;for(A in f)if(f.hasOwnProperty(A)){var N=f[A];if(N!=null)switch(A){case"src":m=!0;break;case"srcSet":R=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:wn(i,a,A,N,f,null)}}R&&wn(i,a,"srcSet",f.srcSet,f,null),m&&wn(i,a,"src",f.src,f,null);return;case"input":Lt("invalid",i);var W=A=N=R=null,se=null,be=null;for(m in f)if(f.hasOwnProperty(m)){var Ae=f[m];if(Ae!=null)switch(m){case"name":R=Ae;break;case"type":N=Ae;break;case"checked":se=Ae;break;case"defaultChecked":be=Ae;break;case"value":A=Ae;break;case"defaultValue":W=Ae;break;case"children":case"dangerouslySetInnerHTML":if(Ae!=null)throw Error(r(137,a));break;default:wn(i,a,m,Ae,f,null)}}sp(i,A,W,se,be,N,R,!1);return;case"select":Lt("invalid",i),m=N=A=null;for(R in f)if(f.hasOwnProperty(R)&&(W=f[R],W!=null))switch(R){case"value":A=W;break;case"defaultValue":N=W;break;case"multiple":m=W;default:wn(i,a,R,W,f,null)}a=A,f=N,i.multiple=!!m,a!=null?Ys(i,!!m,a,!1):f!=null&&Ys(i,!!m,f,!0);return;case"textarea":Lt("invalid",i),A=R=m=null;for(N in f)if(f.hasOwnProperty(N)&&(W=f[N],W!=null))switch(N){case"value":m=W;break;case"defaultValue":R=W;break;case"children":A=W;break;case"dangerouslySetInnerHTML":if(W!=null)throw Error(r(91));break;default:wn(i,a,N,W,f,null)}ap(i,m,R,A);return;case"option":for(se in f)f.hasOwnProperty(se)&&(m=f[se],m!=null)&&(se==="selected"?i.selected=m&&typeof m!="function"&&typeof m!="symbol":wn(i,a,se,m,f,null));return;case"dialog":Lt("beforetoggle",i),Lt("toggle",i),Lt("cancel",i),Lt("close",i);break;case"iframe":case"object":Lt("load",i);break;case"video":case"audio":for(m=0;m<id.length;m++)Lt(id[m],i);break;case"image":Lt("error",i),Lt("load",i);break;case"details":Lt("toggle",i);break;case"embed":case"source":case"link":Lt("error",i),Lt("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(be in f)if(f.hasOwnProperty(be)&&(m=f[be],m!=null))switch(be){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:wn(i,a,be,m,f,null)}return;default:if(ae(a)){for(Ae in f)f.hasOwnProperty(Ae)&&(m=f[Ae],m!==void 0&&bb(i,a,Ae,m,f,void 0));return}}for(W in f)f.hasOwnProperty(W)&&(m=f[W],m!=null&&wn(i,a,W,m,f,null))}function mL(i,a,f,m){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var R=null,A=null,N=null,W=null,se=null,be=null,Ae=null;for(Ee in f){var Pe=f[Ee];if(f.hasOwnProperty(Ee)&&Pe!=null)switch(Ee){case"checked":break;case"value":break;case"defaultValue":se=Pe;default:m.hasOwnProperty(Ee)||wn(i,a,Ee,null,m,Pe)}}for(var Se in m){var Ee=m[Se];if(Pe=f[Se],m.hasOwnProperty(Se)&&(Ee!=null||Pe!=null))switch(Se){case"type":A=Ee;break;case"name":R=Ee;break;case"checked":be=Ee;break;case"defaultChecked":Ae=Ee;break;case"value":N=Ee;break;case"defaultValue":W=Ee;break;case"children":case"dangerouslySetInnerHTML":if(Ee!=null)throw Error(r(137,a));break;default:Ee!==Pe&&wn(i,a,Se,Ee,m,Pe)}}Tf(i,N,W,se,be,Ae,A,R);return;case"select":Ee=N=W=Se=null;for(A in f)if(se=f[A],f.hasOwnProperty(A)&&se!=null)switch(A){case"value":break;case"multiple":Ee=se;default:m.hasOwnProperty(A)||wn(i,a,A,null,m,se)}for(R in m)if(A=m[R],se=f[R],m.hasOwnProperty(R)&&(A!=null||se!=null))switch(R){case"value":Se=A;break;case"defaultValue":W=A;break;case"multiple":N=A;default:A!==se&&wn(i,a,R,A,m,se)}a=W,f=N,m=Ee,Se!=null?Ys(i,!!f,Se,!1):!!m!=!!f&&(a!=null?Ys(i,!!f,a,!0):Ys(i,!!f,f?[]:"",!1));return;case"textarea":Ee=Se=null;for(W in f)if(R=f[W],f.hasOwnProperty(W)&&R!=null&&!m.hasOwnProperty(W))switch(W){case"value":break;case"children":break;default:wn(i,a,W,null,m,R)}for(N in m)if(R=m[N],A=f[N],m.hasOwnProperty(N)&&(R!=null||A!=null))switch(N){case"value":Se=R;break;case"defaultValue":Ee=R;break;case"children":break;case"dangerouslySetInnerHTML":if(R!=null)throw Error(r(91));break;default:R!==A&&wn(i,a,N,R,m,A)}ul(i,Se,Ee);return;case"option":for(var Xe in f)Se=f[Xe],f.hasOwnProperty(Xe)&&Se!=null&&!m.hasOwnProperty(Xe)&&(Xe==="selected"?i.selected=!1:wn(i,a,Xe,null,m,Se));for(se in m)Se=m[se],Ee=f[se],m.hasOwnProperty(se)&&Se!==Ee&&(Se!=null||Ee!=null)&&(se==="selected"?i.selected=Se&&typeof Se!="function"&&typeof Se!="symbol":wn(i,a,se,Se,m,Ee));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 ut in f)Se=f[ut],f.hasOwnProperty(ut)&&Se!=null&&!m.hasOwnProperty(ut)&&wn(i,a,ut,null,m,Se);for(be in m)if(Se=m[be],Ee=f[be],m.hasOwnProperty(be)&&Se!==Ee&&(Se!=null||Ee!=null))switch(be){case"children":case"dangerouslySetInnerHTML":if(Se!=null)throw Error(r(137,a));break;default:wn(i,a,be,Se,m,Ee)}return;default:if(ae(a)){for(var xn in f)Se=f[xn],f.hasOwnProperty(xn)&&Se!==void 0&&!m.hasOwnProperty(xn)&&bb(i,a,xn,void 0,m,Se);for(Ae in m)Se=m[Ae],Ee=f[Ae],!m.hasOwnProperty(Ae)||Se===Ee||Se===void 0&&Ee===void 0||bb(i,a,Ae,Se,m,Ee);return}}for(var he in f)Se=f[he],f.hasOwnProperty(he)&&Se!=null&&!m.hasOwnProperty(he)&&wn(i,a,he,null,m,Se);for(Pe in m)Se=m[Pe],Ee=f[Pe],!m.hasOwnProperty(Pe)||Se===Ee||Se==null&&Ee==null||wn(i,a,Pe,Se,m,Ee)}function uR(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function gL(){if(typeof performance.getEntriesByType=="function"){for(var i=0,a=0,f=performance.getEntriesByType("resource"),m=0;m<f.length;m++){var R=f[m],A=R.transferSize,N=R.initiatorType,W=R.duration;if(A&&W&&uR(N)){for(N=0,W=R.responseEnd,m+=1;m<f.length;m++){var se=f[m],be=se.startTime;if(be>W)break;var Ae=se.transferSize,Pe=se.initiatorType;Ae&&uR(Pe)&&(se=se.responseEnd,N+=Ae*(se<W?1:(W-be)/(se-be)))}if(--m,a+=8*(A+N)/(R.duration/1e3),i++,10<i)break}}if(0<i)return a/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var Sb=null,wb=null;function Qp(i){return i.nodeType===9?i:i.ownerDocument}function fR(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function dR(i,a){if(i===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&a==="foreignObject"?0:i}function xb(i,a){return i==="textarea"||i==="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 _b=null;function yL(){var i=window.event;return i&&i.type==="popstate"?i===_b?!1:(_b=i,!0):(_b=null,!1)}var hR=typeof setTimeout=="function"?setTimeout:void 0,vL=typeof clearTimeout=="function"?clearTimeout:void 0,pR=typeof Promise=="function"?Promise:void 0,bL=typeof queueMicrotask=="function"?queueMicrotask:typeof pR<"u"?function(i){return pR.resolve(null).then(i).catch(SL)}:hR;function SL(i){setTimeout(function(){throw i})}function pa(i){return i==="head"}function mR(i,a){var f=a,m=0;do{var R=f.nextSibling;if(i.removeChild(f),R&&R.nodeType===8)if(f=R.data,f==="/$"||f==="/&"){if(m===0){i.removeChild(R),Yc(a);return}m--}else if(f==="$"||f==="$?"||f==="$~"||f==="$!"||f==="&")m++;else if(f==="html")ad(i.ownerDocument.documentElement);else if(f==="head"){f=i.ownerDocument.head,ad(f);for(var A=f.firstChild;A;){var N=A.nextSibling,W=A.nodeName;A[al]||W==="SCRIPT"||W==="STYLE"||W==="LINK"&&A.rel.toLowerCase()==="stylesheet"||f.removeChild(A),A=N}}else f==="body"&&ad(i.ownerDocument.body);f=R}while(f);Yc(a)}function gR(i,a){var f=i;i=0;do{var m=f.nextSibling;if(f.nodeType===1?a?(f._stashedDisplay=f.style.display,f.style.display="none"):(f.style.display=f._stashedDisplay||"",f.getAttribute("style")===""&&f.removeAttribute("style")):f.nodeType===3&&(a?(f._stashedText=f.nodeValue,f.nodeValue=""):f.nodeValue=f._stashedText||""),m&&m.nodeType===8)if(f=m.data,f==="/$"){if(i===0)break;i--}else f!=="$"&&f!=="$?"&&f!=="$~"&&f!=="$!"||i++;f=m}while(f)}function Eb(i){var a=i.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var f=a;switch(a=a.nextSibling,f.nodeName){case"HTML":case"HEAD":case"BODY":Eb(f),_f(f);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(f.rel.toLowerCase()==="stylesheet")continue}i.removeChild(f)}}function wL(i,a,f,m){for(;i.nodeType===1;){var R=f;if(i.nodeName.toLowerCase()!==a.toLowerCase()){if(!m&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(m){if(!i[al])switch(a){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(A=i.getAttribute("rel"),A==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(A!==R.rel||i.getAttribute("href")!==(R.href==null||R.href===""?null:R.href)||i.getAttribute("crossorigin")!==(R.crossOrigin==null?null:R.crossOrigin)||i.getAttribute("title")!==(R.title==null?null:R.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(A=i.getAttribute("src"),(A!==(R.src==null?null:R.src)||i.getAttribute("type")!==(R.type==null?null:R.type)||i.getAttribute("crossorigin")!==(R.crossOrigin==null?null:R.crossOrigin))&&A&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(a==="input"&&i.type==="hidden"){var A=R.name==null?null:""+R.name;if(R.type==="hidden"&&i.getAttribute("name")===A)return i}else return i;if(i=Wo(i.nextSibling),i===null)break}return null}function xL(i,a,f){if(a==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!f||(i=Wo(i.nextSibling),i===null))return null;return i}function yR(i,a){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!a||(i=Wo(i.nextSibling),i===null))return null;return i}function Cb(i){return i.data==="$?"||i.data==="$~"}function Tb(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function _L(i,a){var f=i.ownerDocument;if(i.data==="$~")i._reactRetry=a;else if(i.data!=="$?"||f.readyState!=="loading")a();else{var m=function(){a(),f.removeEventListener("DOMContentLoaded",m)};f.addEventListener("DOMContentLoaded",m),i._reactRetry=m}}function Wo(i){for(;i!=null;i=i.nextSibling){var a=i.nodeType;if(a===1||a===3)break;if(a===8){if(a=i.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return i}var Rb=null;function vR(i){i=i.nextSibling;for(var a=0;i;){if(i.nodeType===8){var f=i.data;if(f==="/$"||f==="/&"){if(a===0)return Wo(i.nextSibling);a--}else f!=="$"&&f!=="$!"&&f!=="$?"&&f!=="$~"&&f!=="&"||a++}i=i.nextSibling}return null}function bR(i){i=i.previousSibling;for(var a=0;i;){if(i.nodeType===8){var f=i.data;if(f==="$"||f==="$!"||f==="$?"||f==="$~"||f==="&"){if(a===0)return i;a--}else f!=="/$"&&f!=="/&"||a++}i=i.previousSibling}return null}function SR(i,a,f){switch(a=Qp(f),i){case"html":if(i=a.documentElement,!i)throw Error(r(452));return i;case"head":if(i=a.head,!i)throw Error(r(453));return i;case"body":if(i=a.body,!i)throw Error(r(454));return i;default:throw Error(r(451))}}function ad(i){for(var a=i.attributes;a.length;)i.removeAttributeNode(a[0]);_f(i)}var Yo=new Map,wR=new Set;function Jp(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var Rs=H.d;H.d={f:EL,r:CL,D:TL,C:RL,L:OL,m:AL,X:ML,S:kL,M:jL};function EL(){var i=Rs.f(),a=Bp();return i||a}function CL(i){var a=Gs(i);a!==null&&a.tag===5&&a.type==="form"?zC(a):Rs.r(i)}var Gc=typeof document>"u"?null:document;function xR(i,a,f){var m=Gc;if(m&&typeof a=="string"&&a){var R=$r(a);R='link[rel="'+i+'"][href="'+R+'"]',typeof f=="string"&&(R+='[crossorigin="'+f+'"]'),wR.has(R)||(wR.add(R),i={rel:i,crossOrigin:f,href:a},m.querySelector(R)===null&&(a=m.createElement("link"),Fr(a,"link",i),fr(a),m.head.appendChild(a)))}}function TL(i){Rs.D(i),xR("dns-prefetch",i,null)}function RL(i,a){Rs.C(i,a),xR("preconnect",i,a)}function OL(i,a,f){Rs.L(i,a,f);var m=Gc;if(m&&i&&a){var R='link[rel="preload"][as="'+$r(a)+'"]';a==="image"&&f&&f.imageSrcSet?(R+='[imagesrcset="'+$r(f.imageSrcSet)+'"]',typeof f.imageSizes=="string"&&(R+='[imagesizes="'+$r(f.imageSizes)+'"]')):R+='[href="'+$r(i)+'"]';var A=R;switch(a){case"style":A=Zc(i);break;case"script":A=Wc(i)}Yo.has(A)||(i=p({rel:"preload",href:a==="image"&&f&&f.imageSrcSet?void 0:i,as:a},f),Yo.set(A,i),m.querySelector(R)!==null||a==="style"&&m.querySelector(ld(A))||a==="script"&&m.querySelector(cd(A))||(a=m.createElement("link"),Fr(a,"link",i),fr(a),m.head.appendChild(a)))}}function AL(i,a){Rs.m(i,a);var f=Gc;if(f&&i){var m=a&&typeof a.as=="string"?a.as:"script",R='link[rel="modulepreload"][as="'+$r(m)+'"][href="'+$r(i)+'"]',A=R;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":A=Wc(i)}if(!Yo.has(A)&&(i=p({rel:"modulepreload",href:i},a),Yo.set(A,i),f.querySelector(R)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(f.querySelector(cd(A)))return}m=f.createElement("link"),Fr(m,"link",i),fr(m),f.head.appendChild(m)}}}function kL(i,a,f){Rs.S(i,a,f);var m=Gc;if(m&&i){var R=Zs(m).hoistableStyles,A=Zc(i);a=a||"default";var N=R.get(A);if(!N){var W={loading:0,preload:null};if(N=m.querySelector(ld(A)))W.loading=5;else{i=p({rel:"stylesheet",href:i,"data-precedence":a},f),(f=Yo.get(A))&&Ob(i,f);var se=N=m.createElement("link");fr(se),Fr(se,"link",i),se._p=new Promise(function(be,Ae){se.onload=be,se.onerror=Ae}),se.addEventListener("load",function(){W.loading|=1}),se.addEventListener("error",function(){W.loading|=2}),W.loading|=4,em(N,a,m)}N={type:"stylesheet",instance:N,count:1,state:W},R.set(A,N)}}}function ML(i,a){Rs.X(i,a);var f=Gc;if(f&&i){var m=Zs(f).hoistableScripts,R=Wc(i),A=m.get(R);A||(A=f.querySelector(cd(R)),A||(i=p({src:i,async:!0},a),(a=Yo.get(R))&&Ab(i,a),A=f.createElement("script"),fr(A),Fr(A,"link",i),f.head.appendChild(A)),A={type:"script",instance:A,count:1,state:null},m.set(R,A))}}function jL(i,a){Rs.M(i,a);var f=Gc;if(f&&i){var m=Zs(f).hoistableScripts,R=Wc(i),A=m.get(R);A||(A=f.querySelector(cd(R)),A||(i=p({src:i,async:!0,type:"module"},a),(a=Yo.get(R))&&Ab(i,a),A=f.createElement("script"),fr(A),Fr(A,"link",i),f.head.appendChild(A)),A={type:"script",instance:A,count:1,state:null},m.set(R,A))}}function _R(i,a,f,m){var R=(R=te.current)?Jp(R):null;if(!R)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof f.precedence=="string"&&typeof f.href=="string"?(a=Zc(f.href),f=Zs(R).hoistableStyles,m=f.get(a),m||(m={type:"style",instance:null,count:0,state:null},f.set(a,m)),m):{type:"void",instance:null,count:0,state:null};case"link":if(f.rel==="stylesheet"&&typeof f.href=="string"&&typeof f.precedence=="string"){i=Zc(f.href);var A=Zs(R).hoistableStyles,N=A.get(i);if(N||(R=R.ownerDocument||R,N={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},A.set(i,N),(A=R.querySelector(ld(i)))&&!A._p&&(N.instance=A,N.state.loading=5),Yo.has(i)||(f={rel:"preload",as:"style",href:f.href,crossOrigin:f.crossOrigin,integrity:f.integrity,media:f.media,hrefLang:f.hrefLang,referrerPolicy:f.referrerPolicy},Yo.set(i,f),A||PL(R,i,f,N.state))),a&&m===null)throw Error(r(528,""));return N}if(a&&m!==null)throw Error(r(529,""));return null;case"script":return a=f.async,f=f.src,typeof f=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=Wc(f),f=Zs(R).hoistableScripts,m=f.get(a),m||(m={type:"script",instance:null,count:0,state:null},f.set(a,m)),m):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function Zc(i){return'href="'+$r(i)+'"'}function ld(i){return'link[rel="stylesheet"]['+i+"]"}function ER(i){return p({},i,{"data-precedence":i.precedence,precedence:null})}function PL(i,a,f,m){i.querySelector('link[rel="preload"][as="style"]['+a+"]")?m.loading=1:(a=i.createElement("link"),m.preload=a,a.addEventListener("load",function(){return m.loading|=1}),a.addEventListener("error",function(){return m.loading|=2}),Fr(a,"link",f),fr(a),i.head.appendChild(a))}function Wc(i){return'[src="'+$r(i)+'"]'}function cd(i){return"script[async]"+i}function CR(i,a,f){if(a.count++,a.instance===null)switch(a.type){case"style":var m=i.querySelector('style[data-href~="'+$r(f.href)+'"]');if(m)return a.instance=m,fr(m),m;var R=p({},f,{"data-href":f.href,"data-precedence":f.precedence,href:null,precedence:null});return m=(i.ownerDocument||i).createElement("style"),fr(m),Fr(m,"style",R),em(m,f.precedence,i),a.instance=m;case"stylesheet":R=Zc(f.href);var A=i.querySelector(ld(R));if(A)return a.state.loading|=4,a.instance=A,fr(A),A;m=ER(f),(R=Yo.get(R))&&Ob(m,R),A=(i.ownerDocument||i).createElement("link"),fr(A);var N=A;return N._p=new Promise(function(W,se){N.onload=W,N.onerror=se}),Fr(A,"link",m),a.state.loading|=4,em(A,f.precedence,i),a.instance=A;case"script":return A=Wc(f.src),(R=i.querySelector(cd(A)))?(a.instance=R,fr(R),R):(m=f,(R=Yo.get(A))&&(m=p({},f),Ab(m,R)),i=i.ownerDocument||i,R=i.createElement("script"),fr(R),Fr(R,"link",m),i.head.appendChild(R),a.instance=R);case"void":return null;default:throw Error(r(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(m=a.instance,a.state.loading|=4,em(m,f.precedence,i));return a.instance}function em(i,a,f){for(var m=f.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),R=m.length?m[m.length-1]:null,A=R,N=0;N<m.length;N++){var W=m[N];if(W.dataset.precedence===a)A=W;else if(A!==R)break}A?A.parentNode.insertBefore(i,A.nextSibling):(a=f.nodeType===9?f.head:f,a.insertBefore(i,a.firstChild))}function Ob(i,a){i.crossOrigin==null&&(i.crossOrigin=a.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=a.referrerPolicy),i.title==null&&(i.title=a.title)}function Ab(i,a){i.crossOrigin==null&&(i.crossOrigin=a.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=a.referrerPolicy),i.integrity==null&&(i.integrity=a.integrity)}var tm=null;function TR(i,a,f){if(tm===null){var m=new Map,R=tm=new Map;R.set(f,m)}else R=tm,m=R.get(f),m||(m=new Map,R.set(f,m));if(m.has(i))return m;for(m.set(i,null),f=f.getElementsByTagName(i),R=0;R<f.length;R++){var A=f[R];if(!(A[al]||A[Qt]||i==="link"&&A.getAttribute("rel")==="stylesheet")&&A.namespaceURI!=="http://www.w3.org/2000/svg"){var N=A.getAttribute(a)||"";N=i+N;var W=m.get(N);W?W.push(A):m.set(N,[A])}}return m}function RR(i,a,f){i=i.ownerDocument||i,i.head.insertBefore(f,a==="title"?i.querySelector("head > title"):null)}function NL(i,a,f){if(f===1||a.itemProp!=null)return!1;switch(i){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"?(i=a.disabled,typeof a.precedence=="string"&&i==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 OR(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function DL(i,a,f,m){if(f.type==="stylesheet"&&(typeof m.media!="string"||matchMedia(m.media).matches!==!1)&&(f.state.loading&4)===0){if(f.instance===null){var R=Zc(m.href),A=a.querySelector(ld(R));if(A){a=A._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(i.count++,i=nm.bind(i),a.then(i,i)),f.state.loading|=4,f.instance=A,fr(A);return}A=a.ownerDocument||a,m=ER(m),(R=Yo.get(R))&&Ob(m,R),A=A.createElement("link"),fr(A);var N=A;N._p=new Promise(function(W,se){N.onload=W,N.onerror=se}),Fr(A,"link",m),f.instance=A}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(f,a),(a=f.state.preload)&&(f.state.loading&3)===0&&(i.count++,f=nm.bind(i),a.addEventListener("load",f),a.addEventListener("error",f))}}var kb=0;function $L(i,a){return i.stylesheets&&i.count===0&&om(i,i.stylesheets),0<i.count||0<i.imgCount?function(f){var m=setTimeout(function(){if(i.stylesheets&&om(i,i.stylesheets),i.unsuspend){var A=i.unsuspend;i.unsuspend=null,A()}},6e4+a);0<i.imgBytes&&kb===0&&(kb=62500*gL());var R=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&om(i,i.stylesheets),i.unsuspend)){var A=i.unsuspend;i.unsuspend=null,A()}},(i.imgBytes>kb?50:800)+a);return i.unsuspend=f,function(){i.unsuspend=null,clearTimeout(m),clearTimeout(R)}}:null}function nm(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)om(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var rm=null;function om(i,a){i.stylesheets=null,i.unsuspend!==null&&(i.count++,rm=new Map,a.forEach(IL,i),rm=null,nm.call(i))}function IL(i,a){if(!(a.state.loading&4)){var f=rm.get(i);if(f)var m=f.get(null);else{f=new Map,rm.set(i,f);for(var R=i.querySelectorAll("link[data-precedence],style[data-precedence]"),A=0;A<R.length;A++){var N=R[A];(N.nodeName==="LINK"||N.getAttribute("media")!=="not all")&&(f.set(N.dataset.precedence,N),m=N)}m&&f.set(null,m)}R=a.instance,N=R.getAttribute("data-precedence"),A=f.get(N)||m,A===m&&f.set(null,R),f.set(N,R),this.count++,m=nm.bind(this),R.addEventListener("load",m),R.addEventListener("error",m),A?A.parentNode.insertBefore(R,A.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(R,i.firstChild)),a.state.loading|=4}}var ud={$$typeof:E,Provider:null,Consumer:null,_currentValue:Y,_currentValue2:Y,_threadCount:0};function zL(i,a,f,m,R,A,N,W,se){this.tag=1,this.containerInfo=i,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=Xt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xt(0),this.hiddenUpdates=Xt(null),this.identifierPrefix=m,this.onUncaughtError=R,this.onCaughtError=A,this.onRecoverableError=N,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=se,this.incompleteTransitions=new Map}function AR(i,a,f,m,R,A,N,W,se,be,Ae,Pe){return i=new zL(i,a,f,N,se,be,Ae,Pe,W),a=1,A===!0&&(a|=24),A=Eo(3,null,null,a),i.current=A,A.stateNode=i,a=cv(),a.refCount++,i.pooledCache=a,a.refCount++,A.memoizedState={element:m,isDehydrated:f,cache:a},hv(A),i}function kR(i){return i?(i=Tc,i):Tc}function MR(i,a,f,m,R,A){R=kR(R),m.context===null?m.context=R:m.pendingContext=R,m=ra(a),m.payload={element:f},A=A===void 0?null:A,A!==null&&(m.callback=A),f=oa(i,m,a),f!==null&&(vo(f,i,a),Vf(f,i,a))}function jR(i,a){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var f=i.retryLane;i.retryLane=f!==0&&f<a?f:a}}function Mb(i,a){jR(i,a),(i=i.alternate)&&jR(i,a)}function PR(i){if(i.tag===13||i.tag===31){var a=pl(i,67108864);a!==null&&vo(a,i,67108864),Mb(i,67108864)}}function NR(i){if(i.tag===13||i.tag===31){var a=Ao();a=$t(a);var f=pl(i,a);f!==null&&vo(f,i,a),Mb(i,a)}}var im=!0;function LL(i,a,f,m){var R=Z.T;Z.T=null;var A=H.p;try{H.p=2,jb(i,a,f,m)}finally{H.p=A,Z.T=R}}function FL(i,a,f,m){var R=Z.T;Z.T=null;var A=H.p;try{H.p=8,jb(i,a,f,m)}finally{H.p=A,Z.T=R}}function jb(i,a,f,m){if(im){var R=Pb(m);if(R===null)vb(i,a,m,sm,f),$R(i,m);else if(VL(R,i,a,f,m))m.stopPropagation();else if($R(i,m),a&4&&-1<UL.indexOf(i)){for(;R!==null;){var A=Gs(R);if(A!==null)switch(A.tag){case 3:if(A=A.stateNode,A.current.memoizedState.isDehydrated){var N=gt(A.pendingLanes);if(N!==0){var W=A;for(W.pendingLanes|=2,W.entangledLanes|=2;N;){var se=1<<31-qt(N);W.entanglements[1]|=se,N&=~se}Di(A),(ln&6)===0&&(Vp=Le()+500,od(0))}}break;case 31:case 13:W=pl(A,2),W!==null&&vo(W,A,2),Bp(),Mb(A,2)}if(A=Pb(m),A===null&&vb(i,a,m,sm,f),A===R)break;R=A}R!==null&&m.stopPropagation()}else vb(i,a,m,null,f)}}function Pb(i){return i=qe(i),Nb(i)}var sm=null;function Nb(i){if(sm=null,i=Ks(i),i!==null){var a=s(i);if(a===null)i=null;else{var f=a.tag;if(f===13){if(i=l(a),i!==null)return i;i=null}else if(f===31){if(i=c(a),i!==null)return i;i=null}else if(f===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;i=null}else a!==i&&(i=null)}}return sm=i,null}function DR(i){switch(i){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(Ue()){case dt:return 2;case Ce:return 8;case pe:case Ne:return 32;case Be:return 268435456;default:return 32}default:return 32}}var Db=!1,ma=null,ga=null,ya=null,fd=new Map,dd=new Map,va=[],UL="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 $R(i,a){switch(i){case"focusin":case"focusout":ma=null;break;case"dragenter":case"dragleave":ga=null;break;case"mouseover":case"mouseout":ya=null;break;case"pointerover":case"pointerout":fd.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":dd.delete(a.pointerId)}}function hd(i,a,f,m,R,A){return i===null||i.nativeEvent!==A?(i={blockedOn:a,domEventName:f,eventSystemFlags:m,nativeEvent:A,targetContainers:[R]},a!==null&&(a=Gs(a),a!==null&&PR(a)),i):(i.eventSystemFlags|=m,a=i.targetContainers,R!==null&&a.indexOf(R)===-1&&a.push(R),i)}function VL(i,a,f,m,R){switch(a){case"focusin":return ma=hd(ma,i,a,f,m,R),!0;case"dragenter":return ga=hd(ga,i,a,f,m,R),!0;case"mouseover":return ya=hd(ya,i,a,f,m,R),!0;case"pointerover":var A=R.pointerId;return fd.set(A,hd(fd.get(A)||null,i,a,f,m,R)),!0;case"gotpointercapture":return A=R.pointerId,dd.set(A,hd(dd.get(A)||null,i,a,f,m,R)),!0}return!1}function IR(i){var a=Ks(i.target);if(a!==null){var f=s(a);if(f!==null){if(a=f.tag,a===13){if(a=l(f),a!==null){i.blockedOn=a,to(i.priority,function(){NR(f)});return}}else if(a===31){if(a=c(f),a!==null){i.blockedOn=a,to(i.priority,function(){NR(f)});return}}else if(a===3&&f.stateNode.current.memoizedState.isDehydrated){i.blockedOn=f.tag===3?f.stateNode.containerInfo:null;return}}}i.blockedOn=null}function am(i){if(i.blockedOn!==null)return!1;for(var a=i.targetContainers;0<a.length;){var f=Pb(i.nativeEvent);if(f===null){f=i.nativeEvent;var m=new f.constructor(f.type,f);De=m,f.target.dispatchEvent(m),De=null}else return a=Gs(f),a!==null&&PR(a),i.blockedOn=f,!1;a.shift()}return!0}function zR(i,a,f){am(i)&&f.delete(a)}function qL(){Db=!1,ma!==null&&am(ma)&&(ma=null),ga!==null&&am(ga)&&(ga=null),ya!==null&&am(ya)&&(ya=null),fd.forEach(zR),dd.forEach(zR)}function lm(i,a){i.blockedOn===a&&(i.blockedOn=null,Db||(Db=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,qL)))}var cm=null;function LR(i){cm!==i&&(cm=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){cm===i&&(cm=null);for(var a=0;a<i.length;a+=3){var f=i[a],m=i[a+1],R=i[a+2];if(typeof m!="function"){if(Nb(m||f)===null)continue;break}var A=Gs(f);A!==null&&(i.splice(a,3),a-=3,Pv(A,{pending:!0,data:R,method:f.method,action:m},m,R))}}))}function Yc(i){function a(se){return lm(se,i)}ma!==null&&lm(ma,i),ga!==null&&lm(ga,i),ya!==null&&lm(ya,i),fd.forEach(a),dd.forEach(a);for(var f=0;f<va.length;f++){var m=va[f];m.blockedOn===i&&(m.blockedOn=null)}for(;0<va.length&&(f=va[0],f.blockedOn===null);)IR(f),f.blockedOn===null&&va.shift();if(f=(i.ownerDocument||i).$$reactFormReplay,f!=null)for(m=0;m<f.length;m+=3){var R=f[m],A=f[m+1],N=R[Cn]||null;if(typeof A=="function")N||LR(f);else if(N){var W=null;if(A&&A.hasAttribute("formAction")){if(R=A,N=A[Cn]||null)W=N.formAction;else if(Nb(R)!==null)continue}else W=N.action;typeof W=="function"?f[m+1]=W:(f.splice(m,3),m-=3),LR(f)}}}function FR(){function i(A){A.canIntercept&&A.info==="react-transition"&&A.intercept({handler:function(){return new Promise(function(N){return R=N})},focusReset:"manual",scroll:"manual"})}function a(){R!==null&&(R(),R=null),m||setTimeout(f,20)}function f(){if(!m&&!navigation.transition){var A=navigation.currentEntry;A&&A.url!=null&&navigation.navigate(A.url,{state:A.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var m=!1,R=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(f,100),function(){m=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),R!==null&&(R(),R=null)}}}function $b(i){this._internalRoot=i}um.prototype.render=$b.prototype.render=function(i){var a=this._internalRoot;if(a===null)throw Error(r(409));var f=a.current,m=Ao();MR(f,m,i,a,null,null)},um.prototype.unmount=$b.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var a=i.containerInfo;MR(i.current,2,null,i,null,null),Bp(),a[Dr]=null}};function um(i){this._internalRoot=i}um.prototype.unstable_scheduleHydration=function(i){if(i){var a=sr();i={blockedOn:null,target:i,priority:a};for(var f=0;f<va.length&&a!==0&&a<va[f].priority;f++);va.splice(f,0,i),f===0&&IR(i)}};var UR=t.version;if(UR!=="19.2.3")throw Error(r(527,UR,"19.2.3"));H.findDOMNode=function(i){var a=i._reactInternals;if(a===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=d(a),i=i!==null?h(i):null,i=i===null?null:i.stateNode,i};var BL={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:Z,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var fm=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fm.isDisabled&&fm.supportsFiber)try{bt=fm.inject(BL),pt=fm}catch{}}return md.createRoot=function(i,a){if(!o(i))throw Error(r(299));var f=!1,m="",R=ZC,A=WC,N=YC;return a!=null&&(a.unstable_strictMode===!0&&(f=!0),a.identifierPrefix!==void 0&&(m=a.identifierPrefix),a.onUncaughtError!==void 0&&(R=a.onUncaughtError),a.onCaughtError!==void 0&&(A=a.onCaughtError),a.onRecoverableError!==void 0&&(N=a.onRecoverableError)),a=AR(i,1,!1,null,null,f,m,null,R,A,N,FR),i[Dr]=a.current,yb(i),new $b(a)},md.hydrateRoot=function(i,a,f){if(!o(i))throw Error(r(299));var m=!1,R="",A=ZC,N=WC,W=YC,se=null;return f!=null&&(f.unstable_strictMode===!0&&(m=!0),f.identifierPrefix!==void 0&&(R=f.identifierPrefix),f.onUncaughtError!==void 0&&(A=f.onUncaughtError),f.onCaughtError!==void 0&&(N=f.onCaughtError),f.onRecoverableError!==void 0&&(W=f.onRecoverableError),f.formState!==void 0&&(se=f.formState)),a=AR(i,1,!0,a,f??null,m,R,se,A,N,W,FR),a.context=kR(null),f=a.current,m=Ao(),m=$t(m),R=ra(m),R.callback=null,oa(f,R,m),f=m,a.current.lanes=f,mn(a,f),Di(a),i[Dr]=a.current,yb(i),new um(a)},md.version="19.2.3",md}var XR;function tF(){if(XR)return Lb.exports;XR=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(),Lb.exports=eF(),Lb.exports}var nF=tF(),of=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(){}},rF={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},oF=class{#e=rF;#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)}},Fl=new oF;function iF(e){setTimeout(e,0)}var Gl=typeof window>"u"||"Deno"in globalThis;function lo(){}function sF(e,t){return typeof e=="function"?e(t):e}function NS(e){return typeof e=="number"&&e>=0&&e!==1/0}function Ej(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ma(e,t){return typeof e=="function"?e(t):e}function Jo(e,t){return typeof e=="function"?e(t):e}function QR(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:l,stale:c}=e;if(l){if(r){if(t.queryHash!==Rx(l,t.options))return!1}else if(!Xd(t.queryKey,l))return!1}if(n!=="all"){const u=t.isActive();if(n==="active"&&!u||n==="inactive"&&u)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||o&&o!==t.state.fetchStatus||s&&!s(t))}function JR(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Zl(t.options.mutationKey)!==Zl(s))return!1}else if(!Xd(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function Rx(e,t){return(t?.queryKeyHashFn||Zl)(e)}function Zl(e){return JSON.stringify(e,(t,n)=>DS(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Xd(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Xd(e[n],t[n])):!1}var aF=Object.prototype.hasOwnProperty;function Cj(e,t){if(e===t)return e;const n=eO(e)&&eO(t);if(!n&&!(DS(e)&&DS(t)))return t;const o=(n?e:Object.keys(e)).length,s=n?t:Object.keys(t),l=s.length,c=n?new Array(l):{};let u=0;for(let d=0;d<l;d++){const h=n?d:s[d],p=e[h],g=t[h];if(p===g){c[h]=p,(n?d<o:aF.call(e,h))&&u++;continue}if(p===null||g===null||typeof p!="object"||typeof g!="object"){c[h]=g;continue}const b=Cj(p,g);c[h]=b,b===p&&u++}return o===l&&u===o?e:c}function Qg(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function eO(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function DS(e){if(!tO(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!tO(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function tO(e){return Object.prototype.toString.call(e)==="[object Object]"}function lF(e){return new Promise(t=>{Fl.setTimeout(t,e)})}function $S(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Cj(e,t):t}function cF(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function uF(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Ox=Symbol();function Tj(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Ox?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Ax(e,t){return typeof e=="function"?e(...t):!!e}function fF(e,t,n){let r=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??=t(),r||(r=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),e}var dF=class extends of{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Gl&&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"}},kx=new dF;function IS(){let e,t;const n=new Promise((o,s)=>{e=o,t=s});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}var hF=iF;function pF(){let e=[],t=0,n=c=>{c()},r=c=>{c()},o=hF;const s=c=>{t?e.push(c):o(()=>{n(c)})},l=()=>{const c=e;e=[],c.length&&o(()=>{r(()=>{c.forEach(u=>{n(u)})})})};return{batch:c=>{let u;t++;try{u=c()}finally{t--,t||l()}return u},batchCalls:c=>(...u)=>{s(()=>{c(...u)})},schedule:s,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c},setScheduler:c=>{o=c}}}var Cr=pF(),mF=class extends of{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Gl&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}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(n=>{n(e)}))}isOnline(){return this.#e}},Jg=new mF;function gF(e){return Math.min(1e3*2**e,3e4)}function Rj(e){return(e??"online")==="online"?Jg.isOnline():!0}var zS=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Oj(e){let t=!1,n=0,r;const o=IS(),s=()=>o.status!=="pending",l=_=>{if(!s()){const w=new zS(_);g(w),e.onCancel?.(w)}},c=()=>{t=!0},u=()=>{t=!1},d=()=>kx.isFocused()&&(e.networkMode==="always"||Jg.isOnline())&&e.canRun(),h=()=>Rj(e.networkMode)&&e.canRun(),p=_=>{s()||(r?.(),o.resolve(_))},g=_=>{s()||(r?.(),o.reject(_))},b=()=>new Promise(_=>{r=w=>{(s()||d())&&_(w)},e.onPause?.()}).then(()=>{r=void 0,s()||e.onContinue?.()}),y=()=>{if(s())return;let _;const w=n===0?e.initialPromise:void 0;try{_=w??e.fn()}catch(T){_=Promise.reject(T)}Promise.resolve(_).then(p).catch(T=>{if(s())return;const v=e.retry??(Gl?0:3),E=e.retryDelay??gF,S=typeof E=="function"?E(n,T):E,C=v===!0||typeof v=="number"&&n<v||typeof v=="function"&&v(n,T);if(t||!C){g(T);return}n++,e.onFail?.(n,T),lF(S).then(()=>d()?void 0:b()).then(()=>{t?g(T):y()})})};return{promise:o,status:()=>o.status,cancel:l,continue:()=>(r?.(),o),cancelRetry:c,continueRetry:u,canStart:h,start:()=>(h()?y():b().then(y),o)}}var Aj=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),NS(this.gcTime)&&(this.#e=Fl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Gl?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Fl.clearTimeout(this.#e),this.#e=void 0)}},yF=class extends Aj{#e;#t;#n;#o;#r;#s;#a;constructor(e){super(),this.#a=!1,this.#s=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#o=e.client,this.#n=this.#o.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=rO(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.#s,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=rO(this.options);t.data!==void 0&&(this.setState(nO(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=$S(this.state.data,e,this.options);return this.#i({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}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(lo).catch(lo):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Jo(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ox||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Ma(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:!Ej(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.#a?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 c=this.observers.find(u=>u.options.queryFn);c&&this.setOptions(c.options)}const n=new AbortController,r=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(this.#a=!0,n.signal)})},o=()=>{const c=Tj(this.options,t),d=(()=>{const h={client:this.#o,queryKey:this.queryKey,meta:this.meta};return r(h),h})();return this.#a=!1,this.options.persister?this.options.persister(c,d,this):c(d)},l=(()=>{const c={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#o,state:this.state,fetchFn:o};return r(c),c})();this.options.behavior?.onFetch(l,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==l.fetchOptions?.meta)&&this.#i({type:"fetch",meta:l.fetchOptions?.meta}),this.#r=Oj({initialPromise:t?.initialPromise,fn:l.fetchFn,onCancel:c=>{c instanceof zS&&c.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(c,u)=>{this.#i({type:"failed",failureCount:c,error:u})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0});try{const c=await this.#r.start();if(c===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(c),this.#n.config.onSuccess?.(c,this),this.#n.config.onSettled?.(c,this.state.error,this),c}catch(c){if(c instanceof zS){if(c.silent)return this.#r.promise;if(c.revert){if(this.state.data===void 0)throw c;return this.state.data}}throw this.#i({type:"error",error:c}),this.#n.config.onError?.(c,this),this.#n.config.onSettled?.(this.state.data,c,this),c}finally{this.scheduleGc()}}#i(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...kj(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...nO(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?r:void 0,r;case"error":const o=e.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Cr.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function kj(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Rj(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function nO(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function rO(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var vF=class extends of{constructor(e,t){super(),this.options=t,this.#e=e,this.#i=null,this.#a=IS(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#o=void 0;#r;#s;#a;#i;#m;#d;#h;#c;#u;#l;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),oO(this.#t,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return LS(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return LS(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,n=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 Jo(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#x(),this.#t.setOptions(this.options),t._defaulted&&!Qg(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&iO(this.#t,n,this.options,t)&&this.#f(),this.updateResult(),r&&(this.#t!==n||Jo(this.options.enabled,this.#t)!==Jo(t.enabled,this.#t)||Ma(this.options.staleTime,this.#t)!==Ma(t.staleTime,this.#t))&&this.#g();const o=this.#y();r&&(this.#t!==n||Jo(this.options.enabled,this.#t)!==Jo(t.enabled,this.#t)||o!==this.#l)&&this.#v(o)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return SF(this,n)&&(this.#o=n,this.#s=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#o}trackResult(e,t){return new Proxy(e,{get:(n,r)=>(this.trackProp(r),t?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,r))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#f({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#o))}#f(e){this.#x();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(lo)),t}#g(){this.#S();const e=Ma(this.options.staleTime,this.#t);if(Gl||this.#o.isStale||!NS(e))return;const n=Ej(this.#o.dataUpdatedAt,e)+1;this.#c=Fl.setTimeout(()=>{this.#o.isStale||this.updateResult()},n)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#w(),this.#l=e,!(Gl||Jo(this.options.enabled,this.#t)===!1||!NS(this.#l)||this.#l===0)&&(this.#u=Fl.setInterval(()=>{(this.options.refetchIntervalInBackground||kx.isFocused())&&this.#f()},this.#l))}#b(){this.#g(),this.#v(this.#y())}#S(){this.#c&&(Fl.clearTimeout(this.#c),this.#c=void 0)}#w(){this.#u&&(Fl.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#t,r=this.options,o=this.#o,s=this.#r,l=this.#s,u=e!==n?e.state:this.#n,{state:d}=e;let h={...d},p=!1,g;if(t._optimisticResults){const M=this.hasListeners(),P=!M&&oO(e,t),z=M&&iO(e,n,t,r);(P||z)&&(h={...h,...kj(d.data,e.options)}),t._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:b,errorUpdatedAt:y,status:_}=h;g=h.data;let w=!1;if(t.placeholderData!==void 0&&g===void 0&&_==="pending"){let M;o?.isPlaceholderData&&t.placeholderData===l?.placeholderData?(M=o.data,w=!0):M=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,M!==void 0&&(_="success",g=$S(o?.data,M,t),p=!0)}if(t.select&&g!==void 0&&!w)if(o&&g===s?.data&&t.select===this.#m)g=this.#d;else try{this.#m=t.select,g=t.select(g),g=$S(o?.data,g,t),this.#d=g,this.#i=null}catch(M){this.#i=M}this.#i&&(b=this.#i,g=this.#d,y=Date.now(),_="error");const T=h.fetchStatus==="fetching",v=_==="pending",E=_==="error",S=v&&T,C=g!==void 0,O={status:_,fetchStatus:h.fetchStatus,isPending:v,isSuccess:_==="success",isError:E,isInitialLoading:S,isLoading:S,data:g,dataUpdatedAt:h.dataUpdatedAt,error:b,errorUpdatedAt:y,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>u.dataUpdateCount||h.errorUpdateCount>u.errorUpdateCount,isFetching:T,isRefetching:T&&!v,isLoadingError:E&&!C,isPaused:h.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:E&&C,isStale:Mx(e,t),refetch:this.refetch,promise:this.#a,isEnabled:Jo(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const M=I=>{O.status==="error"?I.reject(O.error):O.data!==void 0&&I.resolve(O.data)},P=()=>{const I=this.#a=O.promise=IS();M(I)},z=this.#a;switch(z.status){case"pending":e.queryHash===n.queryHash&&M(z);break;case"fulfilled":(O.status==="error"||O.data!==z.value)&&P();break;case"rejected":(O.status!=="error"||O.error!==z.reason)&&P();break}}return O}updateResult(){const e=this.#o,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#s=this.options,this.#r.data!==void 0&&(this.#h=this.#t),Qg(t,e))return;this.#o=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,o=typeof r=="function"?r():r;if(o==="all"||!o&&!this.#p.size)return!0;const s=new Set(o??this.#p);return this.options.throwOnError&&s.add("error"),Object.keys(this.#o).some(l=>{const c=l;return this.#o[c]!==e[c]&&s.has(c)})};this.#_({listeners:n()})}#x(){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()}#_(e){Cr.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#o)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function bF(e,t){return Jo(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function oO(e,t){return bF(e,t)||e.state.data!==void 0&&LS(e,t,t.refetchOnMount)}function LS(e,t,n){if(Jo(t.enabled,e)!==!1&&Ma(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Mx(e,t)}return!1}function iO(e,t,n,r){return(e!==t||Jo(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Mx(e,n)}function Mx(e,t){return Jo(t.enabled,e)!==!1&&e.isStaleByTime(Ma(t.staleTime,e))}function SF(e,t){return!Qg(e.getCurrentResult(),t)}function sO(e){return{onFetch:(t,n)=>{const r=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,s=t.state.data?.pages||[],l=t.state.data?.pageParams||[];let c={pages:[],pageParams:[]},u=0;const d=async()=>{let h=!1;const p=y=>{fF(y,()=>t.signal,()=>h=!0)},g=Tj(t.options,t.fetchOptions),b=async(y,_,w)=>{if(h)return Promise.reject();if(_==null&&y.pages.length)return Promise.resolve(y);const v=(()=>{const x={client:t.client,queryKey:t.queryKey,pageParam:_,direction:w?"backward":"forward",meta:t.options.meta};return p(x),x})(),E=await g(v),{maxPages:S}=t.options,C=w?uF:cF;return{pages:C(y.pages,E,S),pageParams:C(y.pageParams,_,S)}};if(o&&s.length){const y=o==="backward",_=y?wF:aO,w={pages:s,pageParams:l},T=_(r,w);c=await b(w,T,y)}else{const y=e??s.length;do{const _=u===0?l[0]??r.initialPageParam:aO(r,c);if(u>0&&_==null)break;c=await b(c,_),u++}while(u<y)}return c};t.options.persister?t.fetchFn=()=>t.options.persister?.(d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=d}}}function aO(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function wF(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var xF=class extends Aj{#e;#t;#n;#o;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Mj(),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.#o?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#o=Oj({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(s,l)=>{this.#r({type:"failed",failureCount:s,error:l})},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 r=this.state.status==="pending",o=!this.#o.canStart();try{if(r)t();else{this.#r({type:"pending",variables:e,isPaused:o}),await this.#n.config.onMutate?.(e,this,n);const l=await this.options.onMutate?.(e,n);l!==this.state.context&&this.#r({type:"pending",context:l,variables:e,isPaused:o})}const s=await this.#o.start();return await this.#n.config.onSuccess?.(s,e,this.state.context,this,n),await this.options.onSuccess?.(s,e,this.state.context,n),await this.#n.config.onSettled?.(s,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(s,null,e,this.state.context,n),this.#r({type:"success",data:s}),s}catch(s){try{await this.#n.config.onError?.(s,e,this.state.context,this,n)}catch(l){Promise.reject(l)}try{await this.options.onError?.(s,e,this.state.context,n)}catch(l){Promise.reject(l)}try{await this.#n.config.onSettled?.(void 0,s,this.state.variables,this.state.context,this,n)}catch(l){Promise.reject(l)}try{await this.options.onSettled?.(void 0,s,e,this.state.context,n)}catch(l){Promise.reject(l)}throw this.#r({type:"error",error:s}),s}finally{this.#n.runNext(this)}}#r(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,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{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Cr.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function Mj(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var _F=class extends of{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const r=new xF({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);const t=hm(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=hm(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=hm(e);if(typeof t=="string"){const r=this.#t.get(t)?.find(o=>o.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=hm(e);return typeof t=="string"?this.#t.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Cr.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(n=>JR(t,n))}findAll(e={}){return this.getAll().filter(t=>JR(e,t))}notify(e){Cr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Cr.batch(()=>Promise.all(e.map(t=>t.continue().catch(lo))))}};function hm(e){return e.options.scope?.id}var EF=class extends of{#e;#t=void 0;#n;#o;constructor(t,n){super(),this.#e=t,this.setOptions(n),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#e.defaultMutationOptions(t),Qg(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&Zl(n.mutationKey)!==Zl(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.#s(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#s()}mutate(t,n){return this.#o=n,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??Mj();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#s(t){Cr.batch(()=>{if(this.#o&&this.hasListeners()){const n=this.#t.variables,r=this.#t.context,o={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#o.onSuccess?.(t.data,n,r,o)}catch(s){Promise.reject(s)}try{this.#o.onSettled?.(t.data,null,n,r,o)}catch(s){Promise.reject(s)}}else if(t?.type==="error"){try{this.#o.onError?.(t.error,n,r,o)}catch(s){Promise.reject(s)}try{this.#o.onSettled?.(void 0,t.error,n,r,o)}catch(s){Promise.reject(s)}}}this.listeners.forEach(n=>{n(this.#t)})})}},CF=class extends of{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,o=t.queryHash??Rx(r,t);let s=this.get(o);return s||(s=new yF({client:e,queryKey:r,queryHash:o,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(s)),s}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(){Cr.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(n=>QR(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>QR(e,n)):t}notify(e){Cr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Cr.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Cr.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},TF=class{#e;#t;#n;#o;#r;#s;#a;#i;constructor(e={}){this.#e=e.queryCache||new CF,this.#t=e.mutationCache||new _F,this.#n=e.defaultOptions||{},this.#o=new Map,this.#r=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#a=kx.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=Jg.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#a?.(),this.#a=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),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Ma(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=this.#e.get(r.queryHash)?.state.data,l=sF(t,s);if(l!==void 0)return this.#e.build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return Cr.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Cr.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return Cr.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Cr.batch(()=>this.#e.findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(lo).catch(lo)}invalidateQueries(e,t={}){return Cr.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Cr.batch(()=>this.#e.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let s=o.fetch(void 0,n);return n.throwOnError||(s=s.catch(lo)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(lo)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Ma(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(lo).catch(lo)}fetchInfiniteQuery(e){return e.behavior=sO(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(lo).catch(lo)}ensureInfiniteQueryData(e){return e.behavior=sO(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Jg.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.#o.set(Zl(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#o.values()],n={};return t.forEach(r=>{Xd(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(Zl(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{Xd(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Rx(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===Ox&&(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()}},jj=k.createContext(void 0),Pj=e=>{const t=k.useContext(jj);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},RF=({client:e,children:t})=>(k.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),j.jsx(jj.Provider,{value:e,children:t})),Nj=k.createContext(!1),OF=()=>k.useContext(Nj);Nj.Provider;function AF(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var kF=k.createContext(AF()),MF=()=>k.useContext(kF),jF=(e,t,n)=>{const r=n?.state.error&&typeof e.throwOnError=="function"?Ax(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},PF=e=>{k.useEffect(()=>{e.clearReset()},[e])},NF=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||Ax(n,[e.error,r])),DF=(e,t)=>t.state.data===void 0,$F=e=>{if(e.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...o)=>n(r(...o)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},IF=(e,t)=>e.isLoading&&e.isFetching&&!t,zF=(e,t)=>e?.suspense&&t.isPending,lO=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function LF(e,t,n){const r=OF(),o=MF(),s=Pj(),l=s.defaultQueryOptions(e);s.getDefaultOptions().queries?._experimental_beforeQuery?.(l);const c=s.getQueryCache().get(l.queryHash);l._optimisticResults=r?"isRestoring":"optimistic",$F(l),jF(l,o,c),PF(o);const u=!s.getQueryCache().get(l.queryHash),[d]=k.useState(()=>new t(s,l)),h=d.getOptimisticResult(l),p=!r&&e.subscribed!==!1;if(k.useSyncExternalStore(k.useCallback(g=>{const b=p?d.subscribe(Cr.batchCalls(g)):lo;return d.updateResult(),b},[d,p]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),k.useEffect(()=>{d.setOptions(l)},[l,d]),zF(l,h))throw lO(l,d,o);if(NF({result:h,errorResetBoundary:o,throwOnError:l.throwOnError,query:c,suspense:l.suspense}))throw h.error;return s.getDefaultOptions().queries?._experimental_afterQuery?.(l,h),l.experimental_prefetchInRender&&!Gl&&IF(h,r)&&(u?lO(l,d,o):c?.promise)?.catch(lo).finally(()=>{d.updateResult()}),l.notifyOnChangeProps?h:d.trackResult(h)}function Dj(e,t){return LF({...e,enabled:!0,suspense:!0,throwOnError:DF,placeholderData:void 0},vF)}function FF(e,t){const n=Pj(),[r]=k.useState(()=>new EF(n,e));k.useEffect(()=>{r.setOptions(e)},[r,e]);const o=k.useSyncExternalStore(k.useCallback(l=>r.subscribe(Cr.batchCalls(l)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=k.useCallback((l,c)=>{r.mutate(l,c).catch(lo)},[r]);if(o.error&&Ax(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}const jx=qF();function Kn(e,...t){if(!jx)return;const n=VF(e,...t);performance.mark(n);try{console.log(e,...t)}catch{console.log(n)}}function UF(e,...t){jx&&console.warn(e,...t)}function VF(e,...t){return e.replace(/%[sfdO]/g,n=>{const r=t.shift();return n==="%O"&&r?JSON.stringify(r).replace(/"([^"]+)":/g,"$1:"):String(r)})}function qF(){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 BF={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 Rh(e){return`[nuqs] ${BF[e]}
10
- See https://nuqs.dev/NUQS-${e}`}function HF(e){if(e.size===0)return"";const t=[];for(const[r,o]of e.entries()){const s=r.replace(/#/g,"%23").replace(/&/g,"%26").replace(/\+/g,"%2B").replace(/=/g,"%3D").replace(/\?/g,"%3F");t.push(`${s}=${KF(o)}`)}return"?"+t.join("&")}function KF(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 Wl=k.createContext({useAdapter(){throw new Error(Rh(404))}});Wl.displayName="NuqsAdapterContext";jx&&typeof window<"u"&&(window.__NuqsAdapterContext&&window.__NuqsAdapterContext!==Wl&&console.error(Rh(303)),window.__NuqsAdapterContext=Wl);function GF(e){return({children:t,defaultOptions:n,processUrlSearchParams:r,...o})=>k.createElement(Wl.Provider,{...o,value:{useAdapter:e,defaultOptions:n,processUrlSearchParams:r}},t)}function ZF(e){const t=k.useContext(Wl);if(!("useAdapter"in t))throw new Error(Rh(404));return t.useAdapter(e)}const WF=()=>k.useContext(Wl).defaultOptions,YF=()=>k.useContext(Wl).processUrlSearchParams;function XF(){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 QF(e){return{method:"throttle",timeMs:e}}const $d=QF(XF());function JF(e){return e===null||Array.isArray(e)&&e.length===0}function e7(e,t,n){if(typeof e=="string")n.set(t,e);else{n.delete(t);for(const r of e)n.append(t,r);n.has(t)||n.set(t,"")}return n}function Px(){const e=new Map;return{on(t,n){const r=e.get(t)||[];return r.push(n),e.set(t,r),()=>this.off(t,n)},off(t,n){const r=e.get(t);r&&e.set(t,r.filter(o=>o!==n))},emit(t,n){e.get(t)?.forEach(r=>r(n))}}}function FS(e,t,n){function r(){e(),n.removeEventListener("abort",s)}const o=setTimeout(r,t);function s(){clearTimeout(o),n.removeEventListener("abort",s)}n.addEventListener("abort",s)}function US(){const e=Promise;if(Promise.hasOwnProperty("withResolvers"))return Promise.withResolvers();let t=()=>{},n=()=>{};return{promise:new e((r,o)=>{t=r,n=o}),resolve:t,reject:n}}function t7(e,t){let n=t;for(let r=e.length-1;r>=0;r--){const o=e[r];if(!o)continue;const s=n;n=()=>o(s)}n()}function VS(){return new URLSearchParams(location.search)}var $j=class{updateMap=new Map;options={history:"replace",scroll:!1,shallow:!0};timeMs=$d.timeMs;transitions=new Set;resolvers=null;controller=null;lastFlushedAt=0;resetQueueOnNextPush=!1;push({key:e,query:t,options:n},r=$d.timeMs){this.resetQueueOnNextPush&&(this.reset(),this.resetQueueOnNextPush=!1),Kn("[nuqs gtq] Enqueueing %s=%s %O",e,t,n),this.updateMap.set(e,t),n.history==="push"&&(this.options.history="push"),n.scroll&&(this.options.scroll=!0),n.shallow===!1&&(this.options.shallow=!1),n.startTransition&&this.transitions.add(n.startTransition),(!Number.isFinite(this.timeMs)||r>this.timeMs)&&(this.timeMs=r)}getQueuedQuery(e){return this.updateMap.get(e)}getPendingPromise({getSearchParamsSnapshot:e=VS}){return this.resolvers?.promise??Promise.resolve(e())}flush({getSearchParamsSnapshot:e=VS,rateLimitFactor:t=1,...n},r){if(this.controller??=new AbortController,!Number.isFinite(this.timeMs))return Kn("[nuqs gtq] Skipping flush due to throttleMs=Infinity"),Promise.resolve(e());if(this.resolvers)return this.resolvers.promise;this.resolvers=US();const o=()=>{this.lastFlushedAt=performance.now();const[l,c]=this.applyPendingUpdates({...n,autoResetQueueOnUpdate:n.autoResetQueueOnUpdate??!0,getSearchParamsSnapshot:e},r);c===null?(this.resolvers.resolve(l),this.resetQueueOnNextPush=!0):this.resolvers.reject(l),this.resolvers=null};return FS(()=>{const l=performance.now()-this.lastFlushedAt,c=this.timeMs,u=t*Math.max(0,c-l);Kn("[nuqs gtq] Scheduling flush in %f ms. Throttled at %f ms (x%f)",u,c,t),u===0?o():FS(o,u,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 Kn("[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=$d.timeMs,e}applyPendingUpdates(e,t){const{updateUrl:n,getSearchParamsSnapshot:r}=e;let o=r();if(Kn("[nuqs gtq] Applying %d pending update(s) on top of %s",this.updateMap.size,o.toString()),this.updateMap.size===0)return[o,null];const s=Array.from(this.updateMap.entries()),l={...this.options},c=Array.from(this.transitions);e.autoResetQueueOnUpdate&&this.reset(),Kn("[nuqs gtq] Flushing queue %O with options %O",s,l);for(const[u,d]of s)d===null?o.delete(u):o=e7(d,u,o);t&&(o=t(o));try{return t7(c,()=>{n(o,l)}),[o,null]}catch(u){return console.error(Rh(429),s.map(([d])=>d).join(),u),[o,u]}}};const Mg=new $j;function n7(e,t,n){const r=k.useCallback(()=>{const s=Object.fromEntries(e.map(l=>[l,n(l)]));return[JSON.stringify(s),s]},[e.join(","),n]),o=k.useRef(null);return o.current===null&&(o.current=r()),k.useSyncExternalStore(k.useCallback(s=>{const l=e.map(c=>t(c,s));return()=>l.forEach(c=>c())},[e.join(","),t]),()=>{const[s,l]=r();return o.current[0]===s?o.current[1]:(o.current=[s,l],l)},()=>o.current[1])}var r7=class{callback;resolvers=US();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,FS(()=>{const n=this.resolvers;try{Kn("[nuqs dq] Flushing debounce queue",e);const r=this.callback(e);Kn("[nuqs dq] Reset debounce queue %O",this.queuedValue),this.queuedValue=void 0,this.resolvers=US(),r.then(o=>n.resolve(o)).catch(o=>n.reject(o))}catch(r){this.queuedValue=void 0,n.reject(r)}},t,this.controller.signal),this.resolvers.promise}},o7=class{throttleQueue;queues=new Map;queuedQuerySync=Px();constructor(e=new $j){this.throttleQueue=e}useQueuedQueries(e){return n7(e,(t,n)=>this.queuedQuerySync.on(t,n),t=>this.getQueuedQuery(t))}push(e,t,n,r){if(!Number.isFinite(t)){const l=n.getSearchParamsSnapshot??VS;return Promise.resolve(l())}const o=e.key;if(!this.queues.has(o)){Kn("[nuqs dqc] Creating debounce queue for `%s`",o);const l=new r7(c=>(this.throttleQueue.push(c),this.throttleQueue.flush(n,r).finally(()=>{this.queues.get(c.key)?.queuedValue===void 0&&(Kn("[nuqs dqc] Cleaning up empty queue for `%s`",c.key),this.queues.delete(c.key)),this.queuedQuerySync.emit(c.key)})));this.queues.set(o,l)}Kn("[nuqs dqc] Enqueueing debounce update %O",e);const s=this.queues.get(o).push(e,t);return this.queuedQuerySync.emit(o),s}abort(e){const t=this.queues.get(e);return t?(Kn("[nuqs dqc] Aborting debounce queue %s=%s",e,t.queuedValue?.query),this.queues.delete(e),t.abort(),this.queuedQuerySync.emit(e),n=>(n.then(t.resolvers.resolve,t.resolvers.reject),n)):n=>n}abortAll(){for(const[e,t]of this.queues.entries())Kn("[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 qb=new o7(Mg);function Ij(e,t){return e===t?!0:e===null||t===null||typeof e=="string"||typeof t=="string"||e.length!==t.length?!1:e.every((n,r)=>n===t[r])}function cO(e,t,n){return r=>{if(!(t.length===0||t.some(s=>!Ij(r.getAll(s),e.getAll(s)))))return Kn("[nuqs `%s`] no change, returning previous",t.join(","),r),r;const o=zj(e,t,n);return Kn("[nuqs `%s`] subbed search params change\n from %O\n to %O",t.join(","),r,o),o}}function zj(e,t,n){if(t.length===0)return e;const r=n?new URLSearchParams(e):e;for(const o of e.keys())t.includes(o)||r.delete(o);return r}const i7="__nuqs__",qS=Px();function s7(e){return function(n,r){const o=new URL(location.href);o.search=HF(n),Kn("[nuqs react] Updating url: %s",o),e&&r.shallow===!1?(r.history==="push"?location.assign:location.replace).call(location,o):(r.history==="push"?history.pushState:history.replaceState).call(history,history.state,i7,o),qS.emit("update",n),r.scroll===!0&&window.scrollTo({top:0})}}const Lj=k.createContext({fullPageNavigationOnShallowFalseUpdates:!1});function a7(e){const{fullPageNavigationOnShallowFalseUpdates:t}=k.useContext(Lj),[n,r]=k.useState(()=>typeof location>"u"?new URLSearchParams:zj(new URLSearchParams(location.search),e,!1));return k.useEffect(()=>{const o=()=>{r(cO(new URLSearchParams(location.search),e,!1))},s=l=>{r(cO(l,e,!0))};return qS.on("update",s),window.addEventListener("popstate",o),()=>{qS.off("update",s),window.removeEventListener("popstate",o)}},[e.join("&")]),{searchParams:n,updateUrl:k.useMemo(()=>s7(t),[t])}}const l7=GF(a7);function c7({children:e,fullPageNavigationOnShallowFalseUpdates:t=!1,...n}){return k.createElement(Lj.Provider,{value:{fullPageNavigationOnShallowFalseUpdates:t}},k.createElement(l7,{...n,children:e}))}function Rn(e,t="Assertion error"){if(!e)throw Error(t)}function Iu({group:e}){const{orientation:t,panels:n}=e;return n.reduce((r,o)=>(r+=t==="horizontal"?o.element.offsetWidth:o.element.offsetHeight,r),0)}function BS(e,t){return t.sort(e==="horizontal"?u7:f7)}function u7(e,t){const n=e.element.offsetLeft-t.element.offsetLeft;return n!==0?n:e.element.offsetWidth-t.element.offsetWidth}function f7(e,t){const n=e.element.offsetTop-t.element.offsetTop;return n!==0?n:e.element.offsetHeight-t.element.offsetHeight}function Fj(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Uj(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 d7({orientation:e,rects:t,targetRect:n}){const r={x:n.x+n.width/2,y:n.y+n.height/2};let o,s=Number.MAX_VALUE;for(const l of t){const{x:c,y:u}=Uj(r,l),d=e==="horizontal"?c:u;d<s&&(s=d,o=l)}return Rn(o,"No rect found"),o}function Vj(e){const{element:t,orientation:n,panels:r,separators:o}=e,s=BS(n,Array.from(t.children).filter(Fj).map(h=>({element:h}))).map(({element:h})=>h),l=[];let c=!1,u,d=[];for(const h of s)if(h.hasAttribute("data-panel")){const p=r.find(g=>g.element===h);if(p){if(u){const g=u.element.getBoundingClientRect(),b=h.getBoundingClientRect();let y;if(c){const _=n==="horizontal"?new DOMRect(g.right,g.top,0,g.height):new DOMRect(g.left,g.bottom,g.width,0),w=n==="horizontal"?new DOMRect(b.left,b.top,0,b.height):new DOMRect(b.left,b.top,b.width,0);switch(d.length){case 0:{y=[_,w];break}case 1:{const T=d[0],v=d7({orientation:n,rects:[g,b],targetRect:T.element.getBoundingClientRect()});y=[T,v===g?w:_];break}default:{y=d;break}}}else d.length?y=d:y=[n==="horizontal"?new DOMRect(g.right,b.top,b.left-g.right,b.height):new DOMRect(b.left,g.bottom,b.width,b.top-g.bottom)];for(const _ of y)l.push({group:e,groupSize:Iu({group:e}),panels:[u,p],separator:"width"in _?void 0:_,rect:"width"in _?_:_.element.getBoundingClientRect()})}c=!1,u=p,d=[]}}else if(h.hasAttribute("data-separator")){const p=o.find(g=>g.element===h);p?d.push(p):(u=void 0,d=[])}else c=!0;return l}function h7(e,t){const n=getComputedStyle(e),r=parseFloat(n.fontSize);return t*r}function p7(e,t){const n=getComputedStyle(e.ownerDocument.body),r=parseFloat(n.fontSize);return t*r}function m7(e){return e/100*window.innerHeight}function g7(e){return e/100*window.innerWidth}function y7(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 pm({groupSize:e,panelElement:t,styleProp:n}){let r;const[o,s]=y7(n);switch(s){case"%":{r=o/100*e;break}case"px":{r=o;break}case"rem":{r=p7(t,o);break}case"em":{r=h7(t,o);break}case"vh":{r=m7(o);break}case"vw":{r=g7(o);break}}return r}function _i(e){return parseFloat(e.toFixed(3))}function uO(e){const{panels:t}=e,n=Iu({group:e});return n===0?t.map(r=>({collapsedSize:0,collapsible:r.panelConstraints.collapsible===!0,defaultSize:void 0,minSize:0,maxSize:100,panelId:r.id})):t.map(r=>{const{element:o,panelConstraints:s}=r;let l=0;if(s.collapsedSize!==void 0){const h=pm({groupSize:n,panelElement:o,styleProp:s.collapsedSize});l=_i(h/n*100)}let c;if(s.defaultSize!==void 0){const h=pm({groupSize:n,panelElement:o,styleProp:s.defaultSize});c=_i(h/n*100)}let u=0;if(s.minSize!==void 0){const h=pm({groupSize:n,panelElement:o,styleProp:s.minSize});u=_i(h/n*100)}let d=100;if(s.maxSize!==void 0){const h=pm({groupSize:n,panelElement:o,styleProp:s.maxSize});d=_i(h/n*100)}return{collapsedSize:l,collapsible:s.collapsible===!0,defaultSize:c,minSize:u,maxSize:d,panelId:r.id}})}class v7{#e={};addListener(t,n){const r=this.#e[t];return r===void 0?this.#e[t]=[n]:r.includes(n)||r.push(n),()=>{this.removeListener(t,n)}}emit(t,n){const r=this.#e[t];if(r!==void 0)if(r.length===1)r[0].call(null,n);else{let o=!1,s=null;const l=Array.from(r);for(let c=0;c<l.length;c++){const u=l[c];try{u.call(null,n)}catch(d){s===null&&(o=!0,s=d)}}if(o)throw s}}removeAllListeners(){this.#e={}}removeListener(t,n){const r=this.#e[t];if(r!==void 0){const o=r.indexOf(n);o>=0&&r.splice(o,1)}}}function co(e,t,n=0){return Math.abs(_i(e)-_i(t))<=n}let Xo={cursorFlags:0,interactionState:{state:"inactive"},mountedGroups:new Map};const Bl=new v7;function oi(){return Xo}function bo(e){const t=typeof e=="function"?e(Xo):e;if(Xo===t)return Xo;const n=Xo;return Xo={...Xo,...t},t.cursorFlags!==void 0&&Bl.emit("cursorFlagsChange",Xo.cursorFlags),t.interactionState!==void 0&&Bl.emit("interactionStateChange",Xo.interactionState),t.mountedGroups!==void 0&&(Xo.mountedGroups.forEach((r,o)=>{r.derivedPanelConstraints.forEach(s=>{if(s.collapsible){const{layout:l}=n.mountedGroups.get(o)??{};if(l){const c=co(s.collapsedSize,r.layout[s.panelId]),u=co(s.collapsedSize,l[s.panelId]);c&&!u&&(o.inMemoryLastExpandedPanelSizes[s.panelId]=l[s.panelId])}}})}),Bl.emit("mountedGroupsChange",Xo.mountedGroups)),Xo}function b7(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function Qd(e,t){return co(e,t)?0:e>t?1:-1}function du({panelConstraints:e,size:t}){const{collapsedSize:n=0,collapsible:r,maxSize:o=100,minSize:s=0}=e;if(Qd(t,s)<0)if(r){const l=(n+s)/2;Qd(t,l)<0?t=n:t=s}else t=s;return t=Math.min(o,t),t=_i(t),t}function Jd({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:o,trigger:s}){if(co(e,0))return t;const l=Object.values(t),c=Object.values(o),u=[...l],[d,h]=r;Rn(d!=null,"Invalid first pivot index"),Rn(h!=null,"Invalid second pivot index");let p=0;if(s==="keyboard"){{const y=e<0?h:d,_=n[y];Rn(_,`Panel constraints not found for index ${y}`);const{collapsedSize:w=0,collapsible:T,minSize:v=0}=_;if(T){const E=l[y];if(Rn(E!=null,`Previous layout not found for panel index ${y}`),co(E,w)){const S=v-E;Qd(S,Math.abs(e))>0&&(e=e<0?0-S:S)}}}{const y=e<0?d:h,_=n[y];Rn(_,`No panel constraints found for index ${y}`);const{collapsedSize:w=0,collapsible:T,minSize:v=0}=_;if(T){const E=l[y];if(Rn(E!=null,`Previous layout not found for panel index ${y}`),co(E,v)){const S=E-w;Qd(S,Math.abs(e))>0&&(e=e<0?0-S:S)}}}}{const y=e<0?1:-1;let _=e<0?h:d,w=0;for(;;){const v=l[_];Rn(v!=null,`Previous layout not found for panel index ${_}`);const E=du({panelConstraints:n[_],size:100})-v;if(w+=E,_+=y,_<0||_>=n.length)break}const T=Math.min(Math.abs(e),Math.abs(w));e=e<0?0-T:T}{let y=e<0?d:h;for(;y>=0&&y<n.length;){const _=Math.abs(e)-Math.abs(p),w=l[y];Rn(w!=null,`Previous layout not found for panel index ${y}`);const T=w-_,v=du({panelConstraints:n[y],size:T});if(!co(w,v)&&(p+=w-v,u[y]=v,p.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?y--:y++}}if(b7(c,u))return o;{const y=e<0?h:d,_=l[y];Rn(_!=null,`Previous layout not found for panel index ${y}`);const w=_+p,T=du({panelConstraints:n[y],size:w});if(u[y]=T,!co(T,w)){let v=w-T,E=e<0?h:d;for(;E>=0&&E<n.length;){const S=u[E];Rn(S!=null,`Previous layout not found for panel index ${E}`);const C=S+v,x=du({panelConstraints:n[E],size:C});if(co(S,x)||(v-=x-S,u[E]=x),co(v,0))break;e>0?E--:E++}}}const g=Object.values(u).reduce((y,_)=>_+y,0);if(!co(g,100,.1))return o;const b=Object.keys(o);return u.reduce((y,_,w)=>(y[b[w]]=_,y),{})}function jg(e){const{mountedGroups:t}=oi();for(const[n]of t)if(n.separators.some(r=>r.element===e))return n;throw Error("Could not find parent Group for separator element")}function Yl(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(t[n]===void 0||Qd(e[n],t[n])!==0)return!1;return!0}function Xl({layout:e,panelConstraints:t}){const n=[...Object.values(e)],r=n.reduce((l,c)=>l+c,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(l=>`${l}%`).join(", ")}`);if(!co(r,100)&&n.length>0)for(let l=0;l<t.length;l++){const c=n[l];Rn(c!=null,`No layout data found for index ${l}`);const u=100/r*c;n[l]=u}let o=0;for(let l=0;l<t.length;l++){const c=n[l];Rn(c!=null,`No layout data found for index ${l}`);const u=du({panelConstraints:t[l],size:c});c!=u&&(o+=c-u,n[l]=u)}if(!co(o,0))for(let l=0;l<t.length;l++){const c=n[l];Rn(c!=null,`No layout data found for index ${l}`);const u=c+o,d=du({panelConstraints:t[l],size:u});if(c!==d&&(o-=d-c,n[l]=d,co(o,0)))break}const s=Object.keys(e);return n.reduce((l,c,u)=>(l[s[u]]=c,l),{})}function qj({groupId:e}){const t=()=>{const{mountedGroups:n}=oi();for(const[r,o]of n)if(r.id===e)return{group:r,...o};throw Error(`Could not find Group with id "${e}"`)};return{getLayout(){const{defaultLayoutDeferred:n,layout:r}=t();return n?{}:r},setLayout(n){const{defaultLayoutDeferred:r,derivedPanelConstraints:o,group:s,layout:l,separatorToPanels:c}=t(),u=Xl({layout:n,panelConstraints:o});return r?l:(Yl(l,u)||bo(d=>({mountedGroups:new Map(d.mountedGroups).set(s,{defaultLayoutDeferred:r,derivedPanelConstraints:o,layout:u,separatorToPanels:c})})),u)}}}function Bj(e){const{mountedGroups:t}=oi(),n=t.get(e);return Rn(n,`Mounted Group ${e.id} not found`),n}function Rl(e,t){const n=jg(e),r=Bj(n),o=n.separators.find(h=>h.element===e);Rn(o,"Matching separator not found");const s=r.separatorToPanels.get(o);Rn(s,"Matching panels not found");const l=s.map(h=>n.panels.indexOf(h)),c=qj({groupId:n.id}).getLayout(),u=Jd({delta:t,initialLayout:c,panelConstraints:r.derivedPanelConstraints,pivotIndices:l,prevLayout:c,trigger:"keyboard"}),d=Xl({layout:u,panelConstraints:r.derivedPanelConstraints});Yl(c,d)||bo(h=>({mountedGroups:new Map(h.mountedGroups).set(n,{defaultLayoutDeferred:r.defaultLayoutDeferred,derivedPanelConstraints:r.derivedPanelConstraints,layout:d,separatorToPanels:r.separatorToPanels})}))}function fO(e){if(e.defaultPrevented)return;const t=e.currentTarget,n=jg(t);if(!n.disabled)switch(e.key){case"ArrowDown":{e.preventDefault(),n.orientation==="vertical"&&Rl(t,5);break}case"ArrowLeft":{e.preventDefault(),n.orientation==="horizontal"&&Rl(t,-5);break}case"ArrowRight":{e.preventDefault(),n.orientation==="horizontal"&&Rl(t,5);break}case"ArrowUp":{e.preventDefault(),n.orientation==="vertical"&&Rl(t,-5);break}case"End":{e.preventDefault(),Rl(t,100);break}case"Enter":{e.preventDefault();const r=jg(t),{derivedPanelConstraints:o,layout:s,separatorToPanels:l}=Bj(r),c=r.separators.find(p=>p.element===t);Rn(c,"Matching separator not found");const u=l.get(c);Rn(u,"Matching panels not found");const d=u[0],h=o.find(p=>p.panelId===d.id);if(Rn(h,"Panel metadata not found"),h.collapsible){const p=s[d.id],g=h.collapsedSize===p?r.inMemoryLastExpandedPanelSizes[d.id]??h.minSize:h.collapsedSize;Rl(t,g-p)}break}case"F6":{e.preventDefault();const r=jg(t).separators.map(l=>l.element),o=Array.from(r).findIndex(l=>l===e.currentTarget);Rn(o!==null,"Index not found");const s=e.shiftKey?o>0?o-1:r.length-1:o+1<r.length?o+1:0;r[s].focus();break}case"Home":{e.preventDefault(),Rl(t,-100);break}}}const S7=e=>e,Bb=()=>{},Hj=1,Kj=2,Gj=4,Zj=8,dO={coarse:10,precise:5};function w7(e,t,n){let r,o={x:1/0,y:1/0};for(const s of t){const l=Uj(n,s.rect);switch(e){case"horizontal":{l.x<=o.x&&(r=s,o=l);break}case"vertical":{l.y<=o.y&&(r=s,o=l);break}}}return r?{distance:o,hitRegion:r}:void 0}let mm;function x7(){return mm===void 0&&(typeof matchMedia=="function"?mm=!!matchMedia("(pointer:coarse)").matches:mm=!1),mm}function _7(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}function E7(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:mO(e),b:mO(t)};let r;for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),r=e;Rn(r,"Stacking order can only be calculated for elements with a common ancestor");const o={a:pO(hO(n.a)),b:pO(hO(n.b))};if(o.a===o.b){const s=r.childNodes,l={a:n.a.at(-1),b:n.b.at(-1)};let c=s.length;for(;c--;){const u=s[c];if(u===l.a)return 1;if(u===l.b)return-1}}return Math.sign(o.a-o.b)}const C7=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function T7(e){const t=getComputedStyle(Wj(e)??e).display;return t==="flex"||t==="inline-flex"}function R7(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||T7(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"||C7.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function hO(e){let t=e.length;for(;t--;){const n=e[t];if(Rn(n,"Missing node"),R7(n))return n}return null}function pO(e){return e&&Number(getComputedStyle(e).zIndex)||0}function mO(e){const t=[];for(;e;)t.push(e),e=Wj(e);return t}function Wj(e){const{parentNode:t}=e;return _7(t)?t.host:t}function O7(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 A7({groupElement:e,hitRegion:t,pointerEventTarget:n}){if(!Fj(n)||n.contains(e)||e.contains(n))return!0;if(E7(n,e)>0){let r=n;for(;r;){if(r.contains(e))return!0;if(O7(r.getBoundingClientRect(),t))return!1;r=r.parentElement}}return!0}function Yj(e,t){const n=[];return t.forEach((r,o)=>{if(o.disabled)return;const s=x7()?dO.coarse:dO.precise,l=Vj(o),c=w7(o.orientation,l,{x:e.clientX,y:e.clientY});c&&c.distance.x<=s&&c.distance.y<=s&&A7({groupElement:o.element,hitRegion:c.hitRegion.rect,pointerEventTarget:e.target})&&n.push(c.hitRegion)}),n}function gO(e){if(e.defaultPrevented||e.pointerType==="mouse"&&e.button>0)return;const{mountedGroups:t}=oi(),n=Yj(e,t),r=new Set,o=new Set,s=new Set,l=new Map;let c=!1;n.forEach(u=>{r.add(u.group),u.panels.forEach(h=>{o.add(h)}),u.separator&&(s.add(u.separator),c||(c=!0,u.separator.element.focus()));const d=t.get(u.group);d&&l.set(u.group,d.layout)}),bo({interactionState:{hitRegions:n,initialLayoutMap:l,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:"active"}}),n.length&&e.preventDefault()}function k7({cursorFlags:e,groups:t,state:n}){let r=0,o=0;switch(n){case"active":case"hover":t.forEach(s=>{if(!s.disableCursor)switch(s.orientation){case"horizontal":{r++;break}case"vertical":{o++;break}}})}if(r===0&&o===0)return null;switch(n){case"active":{const s=(e&Hj)!==0,l=(e&Kj)!==0,c=(e&Gj)!==0,u=(e&Zj)!==0;if(e){if(s)return c?"se-resize":u?"ne-resize":"e-resize";if(l)return c?"sw-resize":u?"nw-resize":"w-resize";if(c)return"s-resize";if(u)return"n-resize"}break}}return r>0&&o>0?"move":r>0?"ew-resize":"ns-resize"}const yO=new WeakMap;function Nx(e){if(e.defaultView===null||e.defaultView===void 0)return;let{prevStyle:t,styleSheet:n}=yO.get(e)??{};n===void 0&&(n=new e.defaultView.CSSStyleSheet,e.adoptedStyleSheets=[n]);const{cursorFlags:r,interactionState:o}=oi();switch(o.state){case"active":case"hover":{const s=k7({cursorFlags:r,groups:o.hitRegions.map(c=>c.group),state:o.state}),l=`*{cursor: ${s} !important; ${o.state==="active"?"touch-action: none;":""} }`;if(t===l)return;t=l,s?n.cssRules.length===0?n.insertRule(l):n.replaceSync(l):n.cssRules.length===1&&n.deleteRule(0);break}case"inactive":{t=void 0,n.cssRules.length===1&&n.deleteRule(0);break}}yO.set(e,{prevStyle:t,styleSheet:n})}function Xj({document:e,event:t,hitRegions:n,initialLayoutMap:r,mountedGroups:o,pointerDownAtPoint:s}){let l=0;const c=new Map(o);n.forEach(u=>{const{group:d,groupSize:h}=u,{disableCursor:p,orientation:g,panels:b}=d;let y=0;s?g==="horizontal"?y=(t.clientX-s.x)/h*100:y=(t.clientY-s.y)/h*100:g==="horizontal"?y=t.clientX<0?-100:100:y=t.clientY<0?-100:100;const _=r.get(d),{defaultLayoutDeferred:w,derivedPanelConstraints:T,layout:v,separatorToPanels:E}=o.get(d)??{defaultLayoutDeferred:!1};if(T&&_&&v&&E){const S=Jd({delta:y,initialLayout:_,panelConstraints:T,pivotIndices:u.panels.map(C=>b.indexOf(C)),prevLayout:v,trigger:"mouse-or-touch"});if(Yl(S,v)){if(y!==0&&!p)switch(g){case"horizontal":{l|=y<0?Hj:Kj;break}case"vertical":{l|=y<0?Gj:Zj;break}}}else{c.set(u.group,{defaultLayoutDeferred:w,derivedPanelConstraints:T,layout:S,separatorToPanels:E});const C=u.group.panels.map(({id:x})=>x).join(",");u.group.inMemoryLayouts[C]=S}}}),bo({cursorFlags:l,mountedGroups:c}),Nx(e)}function vO(e){const{interactionState:t,mountedGroups:n}=oi();t.state==="active"&&Xj({document:e.currentTarget,event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:n})}function bO(e){if(e.defaultPrevented)return;const{interactionState:t,mountedGroups:n}=oi();switch(t.state){case"active":{if(e.buttons===0){bo(r=>r.interactionState.state==="inactive"?r:{cursorFlags:0,interactionState:{state:"inactive"}}),bo(r=>({mountedGroups:new Map(r.mountedGroups)}));return}Xj({document:e.currentTarget,event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:n,pointerDownAtPoint:t.pointerDownAtPoint});break}default:{const r=Yj(e,n);r.length===0?t.state!=="inactive"&&bo({interactionState:{state:"inactive"}}):bo({interactionState:{hitRegions:r,state:"hover"}}),Nx(e.currentTarget);break}}}function SO(e){if(e.defaultPrevented||e.pointerType==="mouse"&&e.button>0)return;const{interactionState:t}=oi();t.state==="active"&&(bo({cursorFlags:0,interactionState:{state:"inactive"}}),t.hitRegions.length>0&&(Nx(e.currentTarget),bo(n=>({mountedGroups:new Map(n.mountedGroups)})),e.preventDefault()))}function wO(e){let t=0,n=0;const r={};for(const s of e)if(s.defaultSize!==void 0){t++;const l=_i(s.defaultSize);n+=l,r[s.panelId]=l}else r[s.panelId]=void 0;const o=e.length-t;if(o!==0){const s=_i((100-n)/o);for(const l of e)l.defaultSize===void 0&&(r[l.panelId]=s)}return r}function M7(e,t,n){if(!n[0])return;const r=e.panels.find(u=>u.element===t);if(!r||!r.onResize)return;const o=Iu({group:e}),s=e.orientation==="horizontal"?r.element.offsetWidth:r.element.offsetHeight,l=r.mutableValues.prevSize,c={asPercentage:_i(s/o*100),inPixels:s};r.mutableValues.prevSize=c,r.onResize(c,r.id,l)}function j7(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function P7(e,t){const n=e.map(o=>o.id),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n)if(!r.includes(o))return!1;return!0}const Xc=new Map;function N7(e){let t=!0;Rn(e.element.ownerDocument.defaultView,"Cannot register an unmounted Group");const n=e.element.ownerDocument.defaultView.ResizeObserver,r=new Set,o=new Set,s=new n(y=>{for(const _ of y){const{borderBoxSize:w,target:T}=_;if(T===e.element){if(t){if(Iu({group:e})===0)return;bo(v=>{const E=v.mountedGroups.get(e);if(E){const S=uO(e),C=E.defaultLayoutDeferred?wO(S):E.layout,x=Xl({layout:C,panelConstraints:S});return!E.defaultLayoutDeferred&&Yl(C,x)&&j7(E.derivedPanelConstraints,S)?v:{mountedGroups:new Map(v.mountedGroups).set(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:S,layout:x,separatorToPanels:E.separatorToPanels})}}return v})}}else M7(e,T,w)}});s.observe(e.element),e.panels.forEach(y=>{Rn(!r.has(y.id),`Panel ids must be unique; id "${y.id}" was used more than once`),r.add(y.id),y.onResize&&s.observe(y.element)});const l=Iu({group:e}),c=uO(e),u=e.panels.map(({id:y})=>y).join(",");let d=e.defaultLayout;d&&(P7(e.panels,d)||(d=void 0));const h=e.inMemoryLayouts[u]??d??wO(c),p=Xl({layout:h,panelConstraints:c}),g=Vj(e),b=e.element.ownerDocument;return bo(y=>{const _=new Map;return Xc.set(b,(Xc.get(b)??0)+1),g.forEach(w=>{w.separator&&_.set(w.separator,w.panels)}),{mountedGroups:new Map(y.mountedGroups).set(e,{defaultLayoutDeferred:l===0,derivedPanelConstraints:c,layout:p,separatorToPanels:_})}}),e.separators.forEach(y=>{Rn(!o.has(y.id),`Separator ids must be unique; id "${y.id}" was used more than once`),o.add(y.id),y.element.addEventListener("keydown",fO)}),Xc.get(b)===1&&(b.addEventListener("pointerdown",gO,!0),b.addEventListener("pointerleave",vO),b.addEventListener("pointermove",bO),b.addEventListener("pointerup",SO,!0)),function(){t=!1,Xc.set(b,Math.max(0,(Xc.get(b)??0)-1)),bo(y=>{const _=new Map(y.mountedGroups);return _.delete(e),{mountedGroups:_}}),e.separators.forEach(y=>{y.element.removeEventListener("keydown",fO)}),Xc.get(b)||(b.removeEventListener("pointerdown",gO,!0),b.removeEventListener("pointerleave",vO),b.removeEventListener("pointermove",bO),b.removeEventListener("pointerup",SO,!0)),s.disconnect()}}function Qj(){const[e,t]=k.useState({}),n=k.useCallback(()=>t({}),[]);return[e,n]}function Dx(e){const t=k.useId();return`${e??t}`}const ic=typeof window<"u"?k.useLayoutEffect:k.useEffect;function Id(e){const t=k.useRef(e);return ic(()=>{t.current=e},[e]),k.useCallback((...n)=>t.current?.(...n),[t])}function $x(...e){return Id(t=>{e.forEach(n=>{if(n)switch(typeof n){case"function":{n(t);break}case"object":{n.current=t;break}}})})}function D7(e){const t=k.useRef({...e});return ic(()=>{for(const n in e)t.current[n]=e[n]},[e]),t.current}const Jj=k.createContext(null);function $7(e,t){const n=k.useRef({getLayout:()=>({}),setLayout:S7});k.useImperativeHandle(t,()=>n.current,[]),ic(()=>{Object.assign(n.current,qj({groupId:e}))})}function hu({children:e,className:t,defaultLayout:n,disableCursor:r,disabled:o,elementRef:s,groupRef:l,id:c,onLayoutChange:u,onLayoutChanged:d,orientation:h="horizontal",style:p,...g}){const b=k.useRef({onLayoutChange:{},onLayoutChanged:{}}),y=Id(z=>{Yl(b.current.onLayoutChange,z)||(b.current.onLayoutChange=z,u?.(z))}),_=Id(z=>{Yl(b.current.onLayoutChanged,z)||(b.current.onLayoutChanged=z,d?.(z))}),w=Dx(c),T=k.useRef(null),[v,E]=Qj(),S=k.useRef({lastExpandedPanelSizes:{},layouts:{},panels:[],separators:[]}),C=$x(T,s);$7(w,l);const x=Id((z,I)=>{const{interactionState:q,mountedGroups:G}=oi();for(const ee of G.keys())if(ee.id===z){const J=G.get(ee);if(J){let Z=!1;return q.state==="active"&&(Z=q.hitRegions.some(H=>H.group===ee)),{flexGrow:J.layout[I]??1,pointerEvents:Z?"none":void 0}}}return{flexGrow:n?.[I]??1}}),O=k.useMemo(()=>({getPanelStyles:x,id:w,orientation:h,registerPanel:z=>{const I=S.current;return I.panels=BS(h,[...I.panels,z]),E(),()=>{I.panels=I.panels.filter(q=>q!==z),E()}},registerSeparator:z=>{const I=S.current;return I.separators=BS(h,[...I.separators,z]),E(),()=>{I.separators=I.separators.filter(q=>q!==z),E()}}}),[x,w,E,h]),M=D7({defaultLayout:n,disableCursor:r}),P=k.useRef(null);return ic(()=>{const z=T.current;if(z===null)return;const I=S.current,q={defaultLayout:M.defaultLayout,disableCursor:!!M.disableCursor,disabled:!!o,element:z,id:w,inMemoryLastExpandedPanelSizes:S.current.lastExpandedPanelSizes,inMemoryLayouts:S.current.layouts,orientation:h,panels:I.panels,separators:I.separators};P.current=q;const G=N7(q),ee=oi().mountedGroups.get(q);if(ee){const{defaultLayoutDeferred:H,derivedPanelConstraints:Y,layout:oe}=ee;!H&&Y.length>0&&(y(oe),_(oe),I.panels.forEach(ne=>{ne.scheduleUpdate()}))}const J=Bl.addListener("interactionStateChange",()=>{I.panels.forEach(H=>{H.scheduleUpdate()})}),Z=Bl.addListener("mountedGroupsChange",H=>{const Y=H.get(q);if(Y){const{defaultLayoutDeferred:oe,derivedPanelConstraints:ne,layout:$}=Y;if(oe||ne.length===0)return;const{interactionState:V}=oi(),U=V.state!=="active";y($),U&&_($),I.panels.forEach(D=>{D.scheduleUpdate()})}});return()=>{P.current=null,G(),J(),Z()}},[o,w,_,y,h,v,M]),k.useEffect(()=>{const z=P.current;z&&(z.defaultLayout=n,z.disableCursor=!!r)}),j.jsx(Jj.Provider,{value:O,children:j.jsx("div",{...g,"aria-orientation":h,className:t,"data-group":!0,"data-testid":w,id:w,ref:C,style:{height:"100%",width:"100%",overflow:"hidden",...p,display:"flex",flexDirection:h==="horizontal"?"row":"column",flexWrap:"nowrap"},children:e})})}hu.displayName="Group";function Hb(e,t){return`react-resizable-panels:${[e,...t].join(":")}`}function Td({debounceSaveMs:e=100,panelIds:t,storage:n=localStorage,...r}){const o=t!==void 0,s="id"in r?r.id:r.groupId,l=Hb(s,t??[]),c=k.useSyncExternalStore(I7,()=>n.getItem(l),()=>n.getItem(l)),u=k.useMemo(()=>c?JSON.parse(c):void 0,[c]),d=k.useRef(null),h=k.useCallback(()=>{const b=d.current;b&&(d.current=null,clearTimeout(b))},[]);k.useLayoutEffect(()=>()=>{h()},[h]);const p=k.useCallback(b=>{h();let y;o?y=Hb(s,Object.keys(b)):y=Hb(s,[]);try{n.setItem(y,JSON.stringify(b))}catch(_){console.error(_)}},[h,o,s,n]),g=k.useCallback(b=>{h(),e===0?p(b):d.current=setTimeout(()=>{p(b)},e)},[h,e,p]);return{defaultLayout:u,onLayoutChange:g,onLayoutChanged:p}}function I7(){return function(){}}function Ix(){const e=k.useContext(Jj);return Rn(e,"Group Context not found; did you render a Panel or Separator outside of a Group?"),e}function z7({groupId:e,panelId:t}){const n=()=>{const{mountedGroups:c}=oi();for(const[u,{defaultLayoutDeferred:d,derivedPanelConstraints:h,layout:p,separatorToPanels:g}]of c)if(u.id===e)return{defaultLayoutDeferred:d,derivedPanelConstraints:h,group:u,layout:p,separatorToPanels:g};throw Error(`Group ${e} not found`)},r=()=>{const c=n().derivedPanelConstraints.find(u=>u.panelId===t);if(c!==void 0)return c;throw Error(`Panel constraints not found for Panel ${t}`)},o=()=>{const c=n().group.panels.find(u=>u.id===t);if(c!==void 0)return c;throw Error(`Layout not found for Panel ${t}`)},s=()=>{const c=n().layout[t];if(c!==void 0)return c;throw Error(`Layout not found for Panel ${t}`)},l=c=>{const u=s();if(c===u)return;const{defaultLayoutDeferred:d,derivedPanelConstraints:h,group:p,layout:g,separatorToPanels:b}=n(),y=p.panels.findIndex(v=>v.id===t),_=y===p.panels.length-1,w=Jd({delta:_?u-c:c-u,initialLayout:g,panelConstraints:h,pivotIndices:_?[y-1,y]:[y,y+1],prevLayout:g,trigger:"imperative-api"}),T=Xl({layout:w,panelConstraints:h});Yl(g,T)||bo(v=>({mountedGroups:new Map(v.mountedGroups).set(p,{defaultLayoutDeferred:d,derivedPanelConstraints:h,layout:T,separatorToPanels:b})}))};return{collapse:()=>{const{collapsible:c,collapsedSize:u}=r(),{mutableValues:d}=o(),h=s();c&&h!==u&&(d.expandToSize=h,l(u))},expand:()=>{const{collapsible:c,collapsedSize:u,minSize:d}=r(),{mutableValues:h}=o(),p=s();if(c&&p===u){let g=h.expandToSize??d;g===0&&(g=1),l(g)}},getSize:()=>{const{group:c}=n(),u=s(),{element:d}=o(),h=c.orientation==="horizontal"?d.offsetWidth:d.offsetHeight;return{asPercentage:u,inPixels:h}},isCollapsed:()=>{const{collapsible:c,collapsedSize:u}=r(),d=s();return c&&co(u,d)},resize:c=>{if(s()!==c){let u;switch(typeof c){case"number":{const{group:d}=n(),h=Iu({group:d});u=_i(c/h*100);break}case"string":{u=parseFloat(c);break}}l(u)}}}}function L7(e,t){const{id:n}=Ix(),r=k.useRef({collapse:Bb,expand:Bb,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:Bb});k.useImperativeHandle(t,()=>r.current,[]),ic(()=>{Object.assign(r.current,z7({groupId:n,panelId:e}))})}function wi({children:e,className:t,collapsedSize:n="0%",collapsible:r=!1,defaultSize:o,elementRef:s,id:l,maxSize:c="100%",minSize:u="0%",onResize:d,panelRef:h,style:p,...g}){const b=!!l,y=Dx(l),_=k.useRef(null),w=$x(_,s),[,T]=Qj(),{getPanelStyles:v,id:E,registerPanel:S}=Ix(),C=d!==null,x=Id((M,P,z)=>{d?.(M,l,z)});ic(()=>{const M=_.current;if(M!==null)return S({element:M,id:y,idIsStable:b,mutableValues:{expandToSize:void 0,prevSize:void 0},onResize:C?x:void 0,panelConstraints:{collapsedSize:n,collapsible:r,defaultSize:o,maxSize:c,minSize:u},scheduleUpdate:T})},[n,r,o,T,C,y,b,c,u,x,S]),L7(y,h);const O=v(E,y);return j.jsx("div",{...g,"data-panel":!0,"data-testid":y,id:y,ref:w,style:{...F7,flexBasis:0,flexShrink:1,overflow:"hidden",...O},children:j.jsx("div",{className:t,style:{width:"100%",height:"100%",...p},children:e})})}wi.displayName="Panel";const F7={minHeight:0,maxHeight:"100%",height:"auto",minWidth:0,maxWidth:"100%",width:"auto",border:"none",borderWidth:0,padding:0,margin:0};function U7({layout:e,panelConstraints:t,panelId:n,panelIndex:r}){let o,s;const l=e[n],c=t.find(u=>u.panelId===n);if(c){const u=c.maxSize,d=s=c.collapsible?c.collapsedSize:c.minSize,h=[r,r+1];s=Xl({layout:Jd({delta:d-l,initialLayout:e,panelConstraints:t,pivotIndices:h,prevLayout:e,trigger:"keyboard"}),panelConstraints:t})[n],o=Xl({layout:Jd({delta:u-l,initialLayout:e,panelConstraints:t,pivotIndices:h,prevLayout:e,trigger:"keyboard"}),panelConstraints:t})[n]}return{valueControls:n,valueMax:o,valueMin:s,valueNow:l}}function pu({children:e,className:t,elementRef:n,id:r,style:o,...s}){const l=Dx(r),[c,u]=k.useState({}),[d,h]=k.useState("inactive"),p=k.useRef(null),g=$x(p,n),{id:b,orientation:y,registerSeparator:_}=Ix(),w=y==="horizontal"?"vertical":"horizontal";return ic(()=>{const T=p.current;if(T!==null){const v={element:T,id:l},E=_(v),S=Bl.addListener("interactionStateChange",x=>{h(x.state!=="inactive"&&x.hitRegions.some(O=>O.separator===v)?x.state:"inactive")}),C=Bl.addListener("mountedGroupsChange",x=>{x.forEach(({derivedPanelConstraints:O,layout:M,separatorToPanels:P},z)=>{if(z.id===b){const I=P.get(v);if(I){const q=I[0],G=z.panels.indexOf(q);u(U7({layout:M,panelConstraints:O,panelId:q.id,panelIndex:G}))}}})});return()=>{S(),C(),E()}}},[b,l,_]),j.jsx("div",{...s,"aria-controls":c.valueControls,"aria-orientation":w,"aria-valuemax":c.valueMax,"aria-valuemin":c.valueMin,"aria-valuenow":c.valueNow,children:e,className:t,"data-separator":d,"data-testid":l,id:l,ref:g,role:"separator",style:{flexBasis:"auto",...o,flexGrow:0,flexShrink:0},tabIndex:0})}pu.displayName="Separator";var eP=typeof global=="object"&&global&&global.Object===Object&&global,V7=typeof self=="object"&&self&&self.Object===Object&&self,ns=eP||V7||Function("return this")(),si=ns.Symbol,tP=Object.prototype,q7=tP.hasOwnProperty,B7=tP.toString,gd=si?si.toStringTag:void 0;function H7(e){var t=q7.call(e,gd),n=e[gd];try{e[gd]=void 0;var r=!0}catch{}var o=B7.call(e);return r&&(t?e[gd]=n:delete e[gd]),o}var K7=Object.prototype,G7=K7.toString;function Z7(e){return G7.call(e)}var W7="[object Null]",Y7="[object Undefined]",xO=si?si.toStringTag:void 0;function Vs(e){return e==null?e===void 0?Y7:W7:xO&&xO in Object(e)?H7(e):Z7(e)}function ai(e){return e!=null&&typeof e=="object"}var X7="[object Symbol]";function Oh(e){return typeof e=="symbol"||ai(e)&&Vs(e)==X7}function sf(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var Or=Array.isArray,_O=si?si.prototype:void 0,EO=_O?_O.toString:void 0;function nP(e){if(typeof e=="string")return e;if(Or(e))return sf(e,nP)+"";if(Oh(e))return EO?EO.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Q7=/\s/;function J7(e){for(var t=e.length;t--&&Q7.test(e.charAt(t)););return t}var eU=/^\s+/;function tU(e){return e&&e.slice(0,J7(e)+1).replace(eU,"")}function Zt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var CO=NaN,nU=/^[-+]0x[0-9a-f]+$/i,rU=/^0b[01]+$/i,oU=/^0o[0-7]+$/i,iU=parseInt;function sU(e){if(typeof e=="number")return e;if(Oh(e))return CO;if(Zt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Zt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=tU(e);var n=rU.test(e);return n||oU.test(e)?iU(e.slice(2),n?2:8):nU.test(e)?CO:+e}var TO=1/0,aU=17976931348623157e292;function lU(e){if(!e)return e===0?e:0;if(e=sU(e),e===TO||e===-TO){var t=e<0?-1:1;return t*aU}return e===e?e:0}function rP(e){var t=lU(e),n=t%1;return t===t?n?t-n:t:0}function Vy(e){return e}var cU="[object AsyncFunction]",uU="[object Function]",fU="[object GeneratorFunction]",dU="[object Proxy]";function Ah(e){if(!Zt(e))return!1;var t=Vs(e);return t==uU||t==fU||t==cU||t==dU}var Kb=ns["__core-js_shared__"],RO=(function(){var e=/[^.]+$/.exec(Kb&&Kb.keys&&Kb.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function hU(e){return!!RO&&RO in e}var pU=Function.prototype,mU=pU.toString;function sc(e){if(e!=null){try{return mU.call(e)}catch{}try{return e+""}catch{}}return""}var gU=/[\\^$.*+?()[\]{}|]/g,yU=/^\[object .+?Constructor\]$/,vU=Function.prototype,bU=Object.prototype,SU=vU.toString,wU=bU.hasOwnProperty,xU=RegExp("^"+SU.call(wU).replace(gU,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function _U(e){if(!Zt(e)||hU(e))return!1;var t=Ah(e)?xU:yU;return t.test(sc(e))}function EU(e,t){return e?.[t]}function ac(e,t){var n=EU(e,t);return _U(n)?n:void 0}var HS=ac(ns,"WeakMap"),OO=Object.create,oP=(function(){function e(){}return function(t){if(!Zt(t))return{};if(OO)return OO(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}})();function CU(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Pg(){}function zx(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var TU=800,RU=16,OU=Date.now;function AU(e){var t=0,n=0;return function(){var r=OU(),o=RU-(r-n);if(n=r,o>0){if(++t>=TU)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function kU(e){return function(){return e}}var ey=(function(){try{var e=ac(Object,"defineProperty");return e({},"",{}),e}catch{}})(),MU=ey?function(e,t){return ey(e,"toString",{configurable:!0,enumerable:!1,value:kU(t),writable:!0})}:Vy,iP=AU(MU);function Lx(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function jU(e,t,n,r){for(var o=e.length,s=n+-1;++s<o;)if(t(e[s],s,e))return s;return-1}function PU(e){return e!==e}function NU(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}function sP(e,t,n){return t===t?NU(e,t,n):jU(e,PU,n)}function Fx(e,t){var n=e==null?0:e.length;return!!n&&sP(e,t,0)>-1}var DU=9007199254740991,$U=/^(?:0|[1-9]\d*)$/;function qy(e,t){var n=typeof e;return t=t??DU,!!t&&(n=="number"||n!="symbol"&&$U.test(e))&&e>-1&&e%1==0&&e<t}function Ux(e,t,n){t=="__proto__"&&ey?ey(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function kh(e,t){return e===t||e!==e&&t!==t}var IU=Object.prototype,zU=IU.hasOwnProperty;function By(e,t,n){var r=e[t];(!(zU.call(e,t)&&kh(r,n))||n===void 0&&!(t in e))&&Ux(e,t,n)}function lc(e,t,n,r){var o=!n;n||(n={});for(var s=-1,l=t.length;++s<l;){var c=t[s],u=void 0;u===void 0&&(u=e[c]),o?Ux(n,c,u):By(n,c,u)}return n}var AO=Math.max;function aP(e,t,n){return t=AO(t===void 0?e.length-1:t,0),function(){for(var r=arguments,o=-1,s=AO(r.length-t,0),l=Array(s);++o<s;)l[o]=r[t+o];o=-1;for(var c=Array(t+1);++o<t;)c[o]=r[o];return c[t]=n(l),CU(e,this,c)}}function Hy(e,t){return iP(aP(e,t,Vy),e+"")}var LU=9007199254740991;function Vx(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=LU}function Qa(e){return e!=null&&Vx(e.length)&&!Ah(e)}function FU(e,t,n){if(!Zt(n))return!1;var r=typeof t;return(r=="number"?Qa(n)&&qy(t,n.length):r=="string"&&t in n)?kh(n[t],e):!1}function lP(e){return Hy(function(t,n){var r=-1,o=n.length,s=o>1?n[o-1]:void 0,l=o>2?n[2]:void 0;for(s=e.length>3&&typeof s=="function"?(o--,s):void 0,l&&FU(n[0],n[1],l)&&(s=o<3?void 0:s,o=1),t=Object(t);++r<o;){var c=n[r];c&&e(t,c,r,s)}return t})}var UU=Object.prototype;function Mh(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||UU;return e===n}function cP(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var VU="[object Arguments]";function kO(e){return ai(e)&&Vs(e)==VU}var uP=Object.prototype,qU=uP.hasOwnProperty,BU=uP.propertyIsEnumerable,zu=kO((function(){return arguments})())?kO:function(e){return ai(e)&&qU.call(e,"callee")&&!BU.call(e,"callee")};function HU(){return!1}var fP=typeof $o=="object"&&$o&&!$o.nodeType&&$o,MO=fP&&typeof Io=="object"&&Io&&!Io.nodeType&&Io,KU=MO&&MO.exports===fP,jO=KU?ns.Buffer:void 0,GU=jO?jO.isBuffer:void 0,Ql=GU||HU,ZU="[object Arguments]",WU="[object Array]",YU="[object Boolean]",XU="[object Date]",QU="[object Error]",JU="[object Function]",eV="[object Map]",tV="[object Number]",nV="[object Object]",rV="[object RegExp]",oV="[object Set]",iV="[object String]",sV="[object WeakMap]",aV="[object ArrayBuffer]",lV="[object DataView]",cV="[object Float32Array]",uV="[object Float64Array]",fV="[object Int8Array]",dV="[object Int16Array]",hV="[object Int32Array]",pV="[object Uint8Array]",mV="[object Uint8ClampedArray]",gV="[object Uint16Array]",yV="[object Uint32Array]",Nn={};Nn[cV]=Nn[uV]=Nn[fV]=Nn[dV]=Nn[hV]=Nn[pV]=Nn[mV]=Nn[gV]=Nn[yV]=!0;Nn[ZU]=Nn[WU]=Nn[aV]=Nn[YU]=Nn[lV]=Nn[XU]=Nn[QU]=Nn[JU]=Nn[eV]=Nn[tV]=Nn[nV]=Nn[rV]=Nn[oV]=Nn[iV]=Nn[sV]=!1;function vV(e){return ai(e)&&Vx(e.length)&&!!Nn[Vs(e)]}function qx(e){return function(t){return e(t)}}var dP=typeof $o=="object"&&$o&&!$o.nodeType&&$o,zd=dP&&typeof Io=="object"&&Io&&!Io.nodeType&&Io,bV=zd&&zd.exports===dP,Gb=bV&&eP.process,Lu=(function(){try{var e=zd&&zd.require&&zd.require("util").types;return e||Gb&&Gb.binding&&Gb.binding("util")}catch{}})(),PO=Lu&&Lu.isTypedArray,jh=PO?qx(PO):vV,SV=Object.prototype,wV=SV.hasOwnProperty;function hP(e,t){var n=Or(e),r=!n&&zu(e),o=!n&&!r&&Ql(e),s=!n&&!r&&!o&&jh(e),l=n||r||o||s,c=l?cP(e.length,String):[],u=c.length;for(var d in e)(t||wV.call(e,d))&&!(l&&(d=="length"||o&&(d=="offset"||d=="parent")||s&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||qy(d,u)))&&c.push(d);return c}function pP(e,t){return function(n){return e(t(n))}}var xV=pP(Object.keys,Object),_V=Object.prototype,EV=_V.hasOwnProperty;function mP(e){if(!Mh(e))return xV(e);var t=[];for(var n in Object(e))EV.call(e,n)&&n!="constructor"&&t.push(n);return t}function ti(e){return Qa(e)?hP(e):mP(e)}var CV=Object.prototype,TV=CV.hasOwnProperty,RV=lP(function(e,t){if(Mh(t)||Qa(t)){lc(t,ti(t),e);return}for(var n in t)TV.call(t,n)&&By(e,n,t[n])});function OV(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var AV=Object.prototype,kV=AV.hasOwnProperty;function MV(e){if(!Zt(e))return OV(e);var t=Mh(e),n=[];for(var r in e)r=="constructor"&&(t||!kV.call(e,r))||n.push(r);return n}function Ph(e){return Qa(e)?hP(e,!0):MV(e)}var jV=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,PV=/^\w*$/;function Bx(e,t){if(Or(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Oh(e)?!0:PV.test(e)||!jV.test(e)||t!=null&&e in Object(t)}var eh=ac(Object,"create");function NV(){this.__data__=eh?eh(null):{},this.size=0}function DV(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var $V="__lodash_hash_undefined__",IV=Object.prototype,zV=IV.hasOwnProperty;function LV(e){var t=this.__data__;if(eh){var n=t[e];return n===$V?void 0:n}return zV.call(t,e)?t[e]:void 0}var FV=Object.prototype,UV=FV.hasOwnProperty;function VV(e){var t=this.__data__;return eh?t[e]!==void 0:UV.call(t,e)}var qV="__lodash_hash_undefined__";function BV(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=eh&&t===void 0?qV:t,this}function Jl(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Jl.prototype.clear=NV;Jl.prototype.delete=DV;Jl.prototype.get=LV;Jl.prototype.has=VV;Jl.prototype.set=BV;function HV(){this.__data__=[],this.size=0}function Ky(e,t){for(var n=e.length;n--;)if(kh(e[n][0],t))return n;return-1}var KV=Array.prototype,GV=KV.splice;function ZV(e){var t=this.__data__,n=Ky(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():GV.call(t,n,1),--this.size,!0}function WV(e){var t=this.__data__,n=Ky(t,e);return n<0?void 0:t[n][1]}function YV(e){return Ky(this.__data__,e)>-1}function XV(e,t){var n=this.__data__,r=Ky(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function qs(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}qs.prototype.clear=HV;qs.prototype.delete=ZV;qs.prototype.get=WV;qs.prototype.has=YV;qs.prototype.set=XV;var th=ac(ns,"Map");function QV(){this.size=0,this.__data__={hash:new Jl,map:new(th||qs),string:new Jl}}function JV(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Gy(e,t){var n=e.__data__;return JV(t)?n[typeof t=="string"?"string":"hash"]:n.map}function eq(e){var t=Gy(this,e).delete(e);return this.size-=t?1:0,t}function tq(e){return Gy(this,e).get(e)}function nq(e){return Gy(this,e).has(e)}function rq(e,t){var n=Gy(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Bs(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Bs.prototype.clear=QV;Bs.prototype.delete=eq;Bs.prototype.get=tq;Bs.prototype.has=nq;Bs.prototype.set=rq;var oq="Expected a function";function Hx(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(oq);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],s=n.cache;if(s.has(o))return s.get(o);var l=e.apply(this,r);return n.cache=s.set(o,l)||s,l};return n.cache=new(Hx.Cache||Bs),n}Hx.Cache=Bs;var iq=500;function sq(e){var t=Hx(e,function(r){return n.size===iq&&n.clear(),r}),n=t.cache;return t}var aq=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,lq=/\\(\\)?/g,gP=sq(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(aq,function(n,r,o,s){t.push(o?s.replace(lq,"$1"):r||n)}),t});function Kx(e){return e==null?"":nP(e)}function af(e,t){return Or(e)?e:Bx(e,t)?[e]:gP(Kx(e))}function cc(e){if(typeof e=="string"||Oh(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Zy(e,t){t=af(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[cc(t[n++])];return n&&n==r?e:void 0}function Ie(e,t,n){var r=e==null?void 0:Zy(e,t);return r===void 0?n:r}function Gx(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var NO=si?si.isConcatSpreadable:void 0;function cq(e){return Or(e)||zu(e)||!!(NO&&e&&e[NO])}function Nh(e,t,n,r,o){var s=-1,l=e.length;for(n||(n=cq),o||(o=[]);++s<l;){var c=e[s];t>0&&n(c)?t>1?Nh(c,t-1,n,r,o):Gx(o,c):r||(o[o.length]=c)}return o}function KS(e){var t=e==null?0:e.length;return t?Nh(e,1):[]}function yP(e){return iP(aP(e,void 0,KS),e+"")}var Wy=pP(Object.getPrototypeOf,Object),uq="[object Object]",fq=Function.prototype,dq=Object.prototype,vP=fq.toString,hq=dq.hasOwnProperty,pq=vP.call(Object);function Ua(e){if(!ai(e)||Vs(e)!=uq)return!1;var t=Wy(e);if(t===null)return!0;var n=hq.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&vP.call(n)==pq}function mq(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(o);++r<o;)s[r]=e[r+t];return s}function gq(e,t,n,r){var o=-1,s=e==null?0:e.length;for(r&&s&&(n=e[++o]);++o<s;)n=t(n,e[o],o,e);return n}function yq(){this.__data__=new qs,this.size=0}function vq(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function bq(e){return this.__data__.get(e)}function Sq(e){return this.__data__.has(e)}var wq=200;function xq(e,t){var n=this.__data__;if(n instanceof qs){var r=n.__data__;if(!th||r.length<wq-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Bs(r)}return n.set(e,t),this.size=n.size,this}function Ei(e){var t=this.__data__=new qs(e);this.size=t.size}Ei.prototype.clear=yq;Ei.prototype.delete=vq;Ei.prototype.get=bq;Ei.prototype.has=Sq;Ei.prototype.set=xq;function _q(e,t){return e&&lc(t,ti(t),e)}function Eq(e,t){return e&&lc(t,Ph(t),e)}var bP=typeof $o=="object"&&$o&&!$o.nodeType&&$o,DO=bP&&typeof Io=="object"&&Io&&!Io.nodeType&&Io,Cq=DO&&DO.exports===bP,$O=Cq?ns.Buffer:void 0,IO=$O?$O.allocUnsafe:void 0;function SP(e,t){if(t)return e.slice();var n=e.length,r=IO?IO(n):new e.constructor(n);return e.copy(r),r}function Tq(e,t){for(var n=-1,r=e==null?0:e.length,o=0,s=[];++n<r;){var l=e[n];t(l,n,e)&&(s[o++]=l)}return s}function wP(){return[]}var Rq=Object.prototype,Oq=Rq.propertyIsEnumerable,zO=Object.getOwnPropertySymbols,Zx=zO?function(e){return e==null?[]:(e=Object(e),Tq(zO(e),function(t){return Oq.call(e,t)}))}:wP;function Aq(e,t){return lc(e,Zx(e),t)}var kq=Object.getOwnPropertySymbols,xP=kq?function(e){for(var t=[];e;)Gx(t,Zx(e)),e=Wy(e);return t}:wP;function Mq(e,t){return lc(e,xP(e),t)}function _P(e,t,n){var r=t(e);return Or(e)?r:Gx(r,n(e))}function GS(e){return _P(e,ti,Zx)}function Wx(e){return _P(e,Ph,xP)}var ZS=ac(ns,"DataView"),WS=ac(ns,"Promise"),Cu=ac(ns,"Set"),LO="[object Map]",jq="[object Object]",FO="[object Promise]",UO="[object Set]",VO="[object WeakMap]",qO="[object DataView]",Pq=sc(ZS),Nq=sc(th),Dq=sc(WS),$q=sc(Cu),Iq=sc(HS),ei=Vs;(ZS&&ei(new ZS(new ArrayBuffer(1)))!=qO||th&&ei(new th)!=LO||WS&&ei(WS.resolve())!=FO||Cu&&ei(new Cu)!=UO||HS&&ei(new HS)!=VO)&&(ei=function(e){var t=Vs(e),n=t==jq?e.constructor:void 0,r=n?sc(n):"";if(r)switch(r){case Pq:return qO;case Nq:return LO;case Dq:return FO;case $q:return UO;case Iq:return VO}return t});var zq=Object.prototype,Lq=zq.hasOwnProperty;function Fq(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&Lq.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var ty=ns.Uint8Array;function Yx(e){var t=new e.constructor(e.byteLength);return new ty(t).set(new ty(e)),t}function Uq(e,t){var n=t?Yx(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var Vq=/\w*$/;function qq(e){var t=new e.constructor(e.source,Vq.exec(e));return t.lastIndex=e.lastIndex,t}var BO=si?si.prototype:void 0,HO=BO?BO.valueOf:void 0;function Bq(e){return HO?Object(HO.call(e)):{}}function EP(e,t){var n=t?Yx(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var Hq="[object Boolean]",Kq="[object Date]",Gq="[object Map]",Zq="[object Number]",Wq="[object RegExp]",Yq="[object Set]",Xq="[object String]",Qq="[object Symbol]",Jq="[object ArrayBuffer]",eB="[object DataView]",tB="[object Float32Array]",nB="[object Float64Array]",rB="[object Int8Array]",oB="[object Int16Array]",iB="[object Int32Array]",sB="[object Uint8Array]",aB="[object Uint8ClampedArray]",lB="[object Uint16Array]",cB="[object Uint32Array]";function uB(e,t,n){var r=e.constructor;switch(t){case Jq:return Yx(e);case Hq:case Kq:return new r(+e);case eB:return Uq(e,n);case tB:case nB:case rB:case oB:case iB:case sB:case aB:case lB:case cB:return EP(e,n);case Gq:return new r;case Zq:case Xq:return new r(e);case Wq:return qq(e);case Yq:return new r;case Qq:return Bq(e)}}function CP(e){return typeof e.constructor=="function"&&!Mh(e)?oP(Wy(e)):{}}var fB="[object Map]";function dB(e){return ai(e)&&ei(e)==fB}var KO=Lu&&Lu.isMap,hB=KO?qx(KO):dB,pB="[object Set]";function mB(e){return ai(e)&&ei(e)==pB}var GO=Lu&&Lu.isSet,gB=GO?qx(GO):mB,yB=1,vB=2,bB=4,TP="[object Arguments]",SB="[object Array]",wB="[object Boolean]",xB="[object Date]",_B="[object Error]",RP="[object Function]",EB="[object GeneratorFunction]",CB="[object Map]",TB="[object Number]",OP="[object Object]",RB="[object RegExp]",OB="[object Set]",AB="[object String]",kB="[object Symbol]",MB="[object WeakMap]",jB="[object ArrayBuffer]",PB="[object DataView]",NB="[object Float32Array]",DB="[object Float64Array]",$B="[object Int8Array]",IB="[object Int16Array]",zB="[object Int32Array]",LB="[object Uint8Array]",FB="[object Uint8ClampedArray]",UB="[object Uint16Array]",VB="[object Uint32Array]",On={};On[TP]=On[SB]=On[jB]=On[PB]=On[wB]=On[xB]=On[NB]=On[DB]=On[$B]=On[IB]=On[zB]=On[CB]=On[TB]=On[OP]=On[RB]=On[OB]=On[AB]=On[kB]=On[LB]=On[FB]=On[UB]=On[VB]=!0;On[_B]=On[RP]=On[MB]=!1;function Ld(e,t,n,r,o,s){var l,c=t&yB,u=t&vB,d=t&bB;if(n&&(l=o?n(e,r,o,s):n(e)),l!==void 0)return l;if(!Zt(e))return e;var h=Or(e);if(h){if(l=Fq(e),!c)return zx(e,l)}else{var p=ei(e),g=p==RP||p==EB;if(Ql(e))return SP(e,c);if(p==OP||p==TP||g&&!o){if(l=u||g?{}:CP(e),!c)return u?Mq(e,Eq(l,e)):Aq(e,_q(l,e))}else{if(!On[p])return o?e:{};l=uB(e,p,c)}}s||(s=new Ei);var b=s.get(e);if(b)return b;s.set(e,l),gB(e)?e.forEach(function(w){l.add(Ld(w,t,n,w,e,s))}):hB(e)&&e.forEach(function(w,T){l.set(T,Ld(w,t,n,T,e,s))});var y=d?u?Wx:GS:u?Ph:ti,_=h?void 0:y(e);return Lx(_||e,function(w,T){_&&(T=w,w=e[T]),By(l,T,Ld(w,t,n,T,e,s))}),l}var qB=1,BB=4;function Dh(e){return Ld(e,qB|BB)}var HB="__lodash_hash_undefined__";function KB(e){return this.__data__.set(e,HB),this}function GB(e){return this.__data__.has(e)}function ec(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Bs;++t<n;)this.add(e[t])}ec.prototype.add=ec.prototype.push=KB;ec.prototype.has=GB;function ZB(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function nh(e,t){return e.has(t)}var WB=1,YB=2;function AP(e,t,n,r,o,s){var l=n&WB,c=e.length,u=t.length;if(c!=u&&!(l&&u>c))return!1;var d=s.get(e),h=s.get(t);if(d&&h)return d==t&&h==e;var p=-1,g=!0,b=n&YB?new ec:void 0;for(s.set(e,t),s.set(t,e);++p<c;){var y=e[p],_=t[p];if(r)var w=l?r(_,y,p,t,e,s):r(y,_,p,e,t,s);if(w!==void 0){if(w)continue;g=!1;break}if(b){if(!ZB(t,function(T,v){if(!nh(b,v)&&(y===T||o(y,T,n,r,s)))return b.push(v)})){g=!1;break}}else if(!(y===_||o(y,_,n,r,s))){g=!1;break}}return s.delete(e),s.delete(t),g}function XB(e){var t=-1,n=Array(e.size);return e.forEach(function(r,o){n[++t]=[o,r]}),n}function Xx(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var QB=1,JB=2,eH="[object Boolean]",tH="[object Date]",nH="[object Error]",rH="[object Map]",oH="[object Number]",iH="[object RegExp]",sH="[object Set]",aH="[object String]",lH="[object Symbol]",cH="[object ArrayBuffer]",uH="[object DataView]",ZO=si?si.prototype:void 0,Zb=ZO?ZO.valueOf:void 0;function fH(e,t,n,r,o,s,l){switch(n){case uH:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case cH:return!(e.byteLength!=t.byteLength||!s(new ty(e),new ty(t)));case eH:case tH:case oH:return kh(+e,+t);case nH:return e.name==t.name&&e.message==t.message;case iH:case aH:return e==t+"";case rH:var c=XB;case sH:var u=r&QB;if(c||(c=Xx),e.size!=t.size&&!u)return!1;var d=l.get(e);if(d)return d==t;r|=JB,l.set(e,t);var h=AP(c(e),c(t),r,o,s,l);return l.delete(e),h;case lH:if(Zb)return Zb.call(e)==Zb.call(t)}return!1}var dH=1,hH=Object.prototype,pH=hH.hasOwnProperty;function mH(e,t,n,r,o,s){var l=n&dH,c=GS(e),u=c.length,d=GS(t),h=d.length;if(u!=h&&!l)return!1;for(var p=u;p--;){var g=c[p];if(!(l?g in t:pH.call(t,g)))return!1}var b=s.get(e),y=s.get(t);if(b&&y)return b==t&&y==e;var _=!0;s.set(e,t),s.set(t,e);for(var w=l;++p<u;){g=c[p];var T=e[g],v=t[g];if(r)var E=l?r(v,T,g,t,e,s):r(T,v,g,e,t,s);if(!(E===void 0?T===v||o(T,v,n,r,s):E)){_=!1;break}w||(w=g=="constructor")}if(_&&!w){var S=e.constructor,C=t.constructor;S!=C&&"constructor"in e&&"constructor"in t&&!(typeof S=="function"&&S instanceof S&&typeof C=="function"&&C instanceof C)&&(_=!1)}return s.delete(e),s.delete(t),_}var gH=1,WO="[object Arguments]",YO="[object Array]",gm="[object Object]",yH=Object.prototype,XO=yH.hasOwnProperty;function vH(e,t,n,r,o,s){var l=Or(e),c=Or(t),u=l?YO:ei(e),d=c?YO:ei(t);u=u==WO?gm:u,d=d==WO?gm:d;var h=u==gm,p=d==gm,g=u==d;if(g&&Ql(e)){if(!Ql(t))return!1;l=!0,h=!1}if(g&&!h)return s||(s=new Ei),l||jh(e)?AP(e,t,n,r,o,s):fH(e,t,u,n,r,o,s);if(!(n&gH)){var b=h&&XO.call(e,"__wrapped__"),y=p&&XO.call(t,"__wrapped__");if(b||y){var _=b?e.value():e,w=y?t.value():t;return s||(s=new Ei),o(_,w,n,r,s)}}return g?(s||(s=new Ei),mH(e,t,n,r,o,s)):!1}function $h(e,t,n,r,o){return e===t?!0:e==null||t==null||!ai(e)&&!ai(t)?e!==e&&t!==t:vH(e,t,n,r,$h,o)}var bH=1,SH=2;function wH(e,t,n,r){var o=n.length,s=o;if(e==null)return!s;for(e=Object(e);o--;){var l=n[o];if(l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++o<s;){l=n[o];var c=l[0],u=e[c],d=l[1];if(l[2]){if(u===void 0&&!(c in e))return!1}else{var h=new Ei,p;if(!(p===void 0?$h(d,u,bH|SH,r,h):p))return!1}}return!0}function kP(e){return e===e&&!Zt(e)}function xH(e){for(var t=ti(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,kP(o)]}return t}function MP(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function _H(e){var t=xH(e);return t.length==1&&t[0][2]?MP(t[0][0],t[0][1]):function(n){return n===e||wH(n,e,t)}}function EH(e,t){return e!=null&&t in Object(e)}function jP(e,t,n){t=af(t,e);for(var r=-1,o=t.length,s=!1;++r<o;){var l=cc(t[r]);if(!(s=e!=null&&n(e,l)))break;e=e[l]}return s||++r!=o?s:(o=e==null?0:e.length,!!o&&Vx(o)&&qy(l,o)&&(Or(e)||zu(e)))}function PP(e,t){return e!=null&&jP(e,t,EH)}var CH=1,TH=2;function RH(e,t){return Bx(e)&&kP(t)?MP(cc(e),t):function(n){var r=Ie(n,e);return r===void 0&&r===t?PP(n,e):$h(t,r,CH|TH)}}function OH(e){return function(t){return t?.[e]}}function AH(e){return function(t){return Zy(t,e)}}function kH(e){return Bx(e)?OH(cc(e)):AH(e)}function Qx(e){return typeof e=="function"?e:e==null?Vy:typeof e=="object"?Or(e)?RH(e[0],e[1]):_H(e):kH(e)}function MH(e){return function(t,n,r){for(var o=-1,s=Object(t),l=r(t),c=l.length;c--;){var u=l[++o];if(n(s[u],u,s)===!1)break}return t}}var NP=MH();function DP(e,t){return e&&NP(e,t,ti)}function jH(e,t){return function(n,r){if(n==null)return n;if(!Qa(n))return e(n,r);for(var o=n.length,s=-1,l=Object(n);++s<o&&r(l[s],s,l)!==!1;);return n}}var $P=jH(DP);function YS(e,t,n){(n!==void 0&&!kh(e[t],n)||n===void 0&&!(t in e))&&Ux(e,t,n)}function rh(e){return ai(e)&&Qa(e)}function XS(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function PH(e){return lc(e,Ph(e))}function NH(e,t,n,r,o,s,l){var c=XS(e,n),u=XS(t,n),d=l.get(u);if(d){YS(e,n,d);return}var h=s?s(c,u,n+"",e,t,l):void 0,p=h===void 0;if(p){var g=Or(u),b=!g&&Ql(u),y=!g&&!b&&jh(u);h=u,g||b||y?Or(c)?h=c:rh(c)?h=zx(c):b?(p=!1,h=SP(u,!0)):y?(p=!1,h=EP(u,!0)):h=[]:Ua(u)||zu(u)?(h=c,zu(c)?h=PH(c):(!Zt(c)||Ah(c))&&(h=CP(u))):p=!1}p&&(l.set(u,h),o(h,u,r,s,l),l.delete(u)),YS(e,n,h)}function IP(e,t,n,r,o){e!==t&&NP(t,function(s,l){if(o||(o=new Ei),Zt(s))NH(e,t,l,n,IP,r,o);else{var c=r?r(XS(e,l),s,l+"",e,t,o):void 0;c===void 0&&(c=s),YS(e,l,c)}},Ph)}var DH=200;function $H(e,t,n,r){var o=-1,s=Fx,l=!0,c=e.length,u=[],d=t.length;if(!c)return u;t.length>=DH&&(s=nh,l=!1,t=new ec(t));e:for(;++o<c;){var h=e[o],p=h;if(h=h!==0?h:0,l&&p===p){for(var g=d;g--;)if(t[g]===p)continue e;u.push(h)}else s(t,p,r)||u.push(h)}return u}var IH=Hy(function(e,t){return rh(e)?$H(e,Nh(t,1,rh,!0)):[]});function zP(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function LP(e){return typeof e=="function"?e:Vy}function zH(e,t){var n=Or(e)?Lx:$P;return n(e,LP(t))}var LH=1/0;function FH(e){var t=e==null?0:e.length;return t?Nh(e,LH):[]}var UH=Object.prototype,VH=UH.hasOwnProperty;function qH(e,t){return e!=null&&VH.call(e,t)}function Vt(e,t){return e!=null&&jP(e,t,qH)}var BH="[object String]";function Va(e){return typeof e=="string"||!Or(e)&&ai(e)&&Vs(e)==BH}function HH(e,t){return sf(t,function(n){return e[n]})}function KH(e){return e==null?[]:HH(e,ti(e))}var GH=Math.max;function ZH(e,t,n,r){e=Qa(e)?e:KH(e),n=n?rP(n):0;var o=e.length;return n<0&&(n=GH(o+n,0)),Va(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&sP(e,t,n)>-1}var WH=Math.min;function YH(e,t,n){for(var r=Fx,o=e[0].length,s=e.length,l=s,c=Array(s),u=1/0,d=[];l--;){var h=e[l];u=WH(h.length,u),c[l]=o>=120&&h.length>=120?new ec(l&&h):void 0}h=e[0];var p=-1,g=c[0];e:for(;++p<o&&d.length<u;){var b=h[p],y=b;if(b=b!==0?b:0,!(g?nh(g,y):r(d,y))){for(l=s;--l;){var _=c[l];if(!(_?nh(_,y):r(e[l],y)))continue e}g&&g.push(y),d.push(b)}}return d}function XH(e){return rh(e)?e:[]}var QO=Hy(function(e){var t=sf(e,XH);return t.length&&t[0]===e[0]?YH(t):[]});function QH(e,t){return t.length<2?e:Zy(e,mq(t,0,-1))}var JH="[object Map]",eK="[object Set]",tK=Object.prototype,nK=tK.hasOwnProperty;function vr(e){if(e==null)return!0;if(Qa(e)&&(Or(e)||typeof e=="string"||typeof e.splice=="function"||Ql(e)||jh(e)||zu(e)))return!e.length;var t=ei(e);if(t==JH||t==eK)return!e.size;if(Mh(e))return!mP(e).length;for(var n in e)if(nK.call(e,n))return!1;return!0}function ja(e,t){return $h(e,t)}function rK(e,t,n){n=typeof n=="function"?n:void 0;var r=n?n(e,t):void 0;return r===void 0?$h(e,t,void 0,n):!!r}var oK="[object Number]";function FP(e){return typeof e=="number"||ai(e)&&Vs(e)==oK}function ny(e){return e==null}function UP(e){return e===void 0}var iK=lP(function(e,t,n){IP(e,t,n)}),sK=Object.prototype,aK=sK.hasOwnProperty;function VP(e,t){t=af(t,e);var n=-1,r=t.length;if(!r)return!0;for(var o=e==null||typeof e!="object"&&typeof e!="function";++n<r;){var s=t[n];if(typeof s=="string"){if(s==="__proto__"&&!aK.call(e,"__proto__"))return!1;if(s==="constructor"&&n+1<r&&typeof t[n+1]=="string"&&t[n+1]==="prototype"){if(o&&n===0)continue;return!1}}}var l=QH(e,t);return l==null||delete l[cc(zP(t))]}function lK(e){return Ua(e)?void 0:e}var cK=1,uK=2,fK=4,oh=yP(function(e,t){var n={};if(e==null)return n;var r=!1;t=sf(t,function(s){return s=af(s,e),r||(r=s.length>1),s}),lc(e,Wx(e),n),r&&(n=Ld(n,cK|uK|fK,lK));for(var o=t.length;o--;)VP(n,t[o]);return n});function Jx(e,t,n,r){if(!Zt(e))return e;t=af(t,e);for(var o=-1,s=t.length,l=s-1,c=e;c!=null&&++o<s;){var u=cc(t[o]),d=n;if(u==="__proto__"||u==="constructor"||u==="prototype")return e;if(o!=l){var h=c[u];d=r?r(h,u,c):void 0,d===void 0&&(d=Zt(h)?h:qy(t[o+1])?[]:{})}By(c,u,d),c=c[u]}return e}function qP(e,t,n){for(var r=-1,o=t.length,s={};++r<o;){var l=t[r],c=Zy(e,l);n(c,l)&&Jx(s,af(l,e),c)}return s}function dK(e,t){if(e==null)return{};var n=sf(Wx(e),function(r){return[r]});return t=Qx(t),qP(e,n,function(r,o){return t(r,o[0])})}function hK(e,t){return qP(e,t,function(n,r){return PP(e,r)})}var e_=yP(function(e,t){return e==null?{}:hK(e,t)});function pK(e,t,n,r,o){return o(e,function(s,l,c){n=r?(r=!1,s):t(n,s,l,c)}),n}function mK(e,t,n){var r=Or(e)?gq:pK,o=arguments.length<3;return r(e,Qx(t),n,o,$P)}function fn(e,t,n){return e==null?e:Jx(e,t,n)}function gK(e,t,n,r){return r=typeof r=="function"?r:void 0,e==null?e:Jx(e,t,n,r)}var yK=9007199254740991,Wb=4294967295,vK=Math.min;function BP(e,t){if(e=rP(e),e<1||e>yK)return[];var n=Wb,r=vK(e,Wb);t=LP(t),e-=Wb;for(var o=cP(r,t);++n<e;)t(n);return o}function HP(e){return Or(e)?sf(e,cc):Oh(e)?[e]:zx(gP(Kx(e)))}function bK(e,t,n){var r=Or(e),o=r||Ql(e)||jh(e);if(t=Qx(t),n==null){var s=e&&e.constructor;o?n=r?new s:[]:Zt(e)?n=Ah(s)?oP(Wy(e)):{}:n={}}return(o?Lx:DP)(e,function(l,c,u){return t(n,l,c,u)}),n}var SK=1/0,wK=Cu&&1/Xx(new Cu([,-0]))[1]==SK?function(e){return new Cu(e)}:Pg,xK=200;function KP(e,t,n){var r=-1,o=Fx,s=e.length,l=!0,c=[],u=c;if(s>=xK){var d=wK(e);if(d)return Xx(d);l=!1,o=nh,u=new ec}else u=c;e:for(;++r<s;){var h=e[r],p=h;if(h=h!==0?h:0,l&&p===p){for(var g=u.length;g--;)if(u[g]===p)continue e;c.push(h)}else o(u,p,n)||(u!==c&&u.push(p),c.push(h))}return c}var _K=Hy(function(e){return KP(Nh(e,1,rh,!0))});function GP(e){return e&&e.length?KP(e):[]}var EK=0;function ZP(e){var t=++EK;return Kx(e)+t}function CK(e,t){return e==null?!0:VP(e,t)}const JO=e=>{let t;const n=new Set,r=(d,h)=>{const p=typeof d=="function"?d(t):d;if(!Object.is(p,t)){const g=t;t=h??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(b=>b(t,g))}},o=()=>t,c={setState:r,getState:o,getInitialState:()=>u,subscribe:d=>(n.add(d),()=>n.delete(d))},u=t=e(r,o,c);return c},TK=(e=>e?JO(e):JO),RK=e=>e;function OK(e,t=RK){const n=Mo.useSyncExternalStore(e.subscribe,Mo.useCallback(()=>t(e.getState()),[e,t]),Mo.useCallback(()=>t(e.getInitialState()),[e,t]));return Mo.useDebugValue(n),n}const AK=e=>{const t=TK(e),n=r=>OK(t,r);return Object.assign(n,t),n},kK=(e=>AK),lf=kK()(e=>({tools:{},setToolData:(t,n)=>e(r=>Yb(r,`tools.${t}`,{...r.tools[t],...n})),updateOpenaiObject:(t,n,r)=>e(o=>o.tools[t]?.openaiObject?Yb(o,`tools.${t}.openaiObject.${n}`,r):o),pushOpenAiLog:(t,n)=>e(r=>{const o=r.tools[t]?.openaiLogs||[];return Yb(r,`tools.${t}.openaiLogs`,[...o,{...n,id:crypto.randomUUID()}])})})),cf=e=>{const{tools:t}=lf();return t[e]},Yb=(e,t,n)=>{const r=Dh(e);return fn(r,t,n),r};function WP(e,t,n){try{return e(t)}catch(r){return UF("[nuqs] Error while parsing value `%s`: %O"+(n?" (for key `%s`)":""),t,r,n),null}}function Hs(e){function t(n){if(typeof n>"u")return null;let r="";if(Array.isArray(n)){if(n[0]===void 0)return null;r=n[0]}return typeof n=="string"&&(r=n),WP(e.parse,r)}return{type:"single",eq:(n,r)=>n===r,...e,parseServerSide:t,withDefault(n){return{...this,defaultValue:n,parseServerSide(r){return t(r)??n}}},withOptions(n){return{...this,...n}}}}const MK=Hs({parse:e=>e,serialize:String});Hs({parse:e=>{const t=parseInt(e);return t==t?t:null},serialize:e=>""+Math.round(e)});Hs({parse:e=>{const t=parseInt(e);return t==t?t-1:null},serialize:e=>""+Math.round(e+1)});Hs({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}});Hs({parse:e=>{const t=parseFloat(e);return t==t?t:null},serialize:String});Hs({parse:e=>e.toLowerCase()==="true",serialize:String});function t_(e,t){return e.valueOf()===t.valueOf()}Hs({parse:e=>{const t=parseInt(e);return t==t?new Date(t):null},serialize:e=>""+e.valueOf(),eq:t_});Hs({parse:e=>{const t=new Date(e);return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString(),eq:t_});Hs({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:t_});const Xb=Px(),jK={};function PK(e,t={}){const n=k.useId(),r=WF(),o=YF(),{history:s="replace",scroll:l=r?.scroll??!1,shallow:c=r?.shallow??!0,throttleMs:u=$d.timeMs,limitUrlUpdates:d=r?.limitUrlUpdates,clearOnDefault:h=r?.clearOnDefault??!0,startTransition:p,urlKeys:g=jK}=t,b=Object.keys(e).join(","),y=k.useMemo(()=>Object.fromEntries(Object.keys(e).map(M=>[M,g[M]??M])),[b,JSON.stringify(g)]),_=ZF(Object.values(y)),w=_.searchParams,T=k.useRef({}),v=k.useMemo(()=>Object.fromEntries(Object.keys(e).map(M=>[M,e[M].defaultValue??null])),[Object.values(e).map(({defaultValue:M})=>M).join(",")]),E=qb.useQueuedQueries(Object.values(y)),[S,C]=k.useState(()=>Qb(e,g,w??new URLSearchParams,E).state),x=k.useRef(S);if(Kn("[nuq+ %s `%s`] render - state: %O, iSP: %s",n,b,S,w),Object.keys(T.current).join("&")!==Object.values(y).join("&")){const{state:M,hasChanged:P}=Qb(e,g,w,E,T.current,x.current);P&&(Kn("[nuq+ %s `%s`] State changed: %O",n,b,{state:M,initialSearchParams:w,queuedQueries:E,queryRef:T.current,stateRef:x.current}),x.current=M,C(M)),T.current=Object.fromEntries(Object.entries(y).map(([z,I])=>[I,e[z]?.type==="multi"?w?.getAll(I):w?.get(I)??null]))}k.useEffect(()=>{const{state:M,hasChanged:P}=Qb(e,g,w,E,T.current,x.current);P&&(Kn("[nuq+ %s `%s`] State changed: %O",n,b,{state:M,initialSearchParams:w,queuedQueries:E,queryRef:T.current,stateRef:x.current}),x.current=M,C(M))},[Object.values(y).map(M=>`${M}=${w?.getAll(M)}`).join("&"),JSON.stringify(E)]),k.useEffect(()=>{const M=Object.keys(e).reduce((P,z)=>(P[z]=({state:I,query:q})=>{C(G=>{const{defaultValue:ee}=e[z],J=y[z],Z=I??ee??null,H=G[z]??ee??null;return Object.is(H,Z)?(Kn("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). no change, skipping, resolved: %O",n,b,J,I,ee,x.current),G):(x.current={...x.current,[z]:Z},T.current[J]=q,Kn("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). updateInternalState, resolved: %O",n,b,J,I,ee,x.current),x.current)})},P),{});for(const P of Object.keys(e)){const z=y[P];Kn("[nuq+ %s `%s`] Subscribing to sync for `%s`",n,z,b),Xb.on(z,M[P])}return()=>{for(const P of Object.keys(e)){const z=y[P];Kn("[nuq+ %s `%s`] Unsubscribing to sync for `%s`",n,z,b),Xb.off(z,M[P])}}},[b,y]);const O=k.useCallback((M,P={})=>{const z=Object.fromEntries(Object.keys(e).map(H=>[H,null])),I=typeof M=="function"?M(eA(x.current,v))??z:M??z;Kn("[nuq+ %s `%s`] setState: %O",n,b,I);let q,G=0,ee=!1;const J=[];for(let[H,Y]of Object.entries(I)){const oe=e[H],ne=y[H];if(!oe||Y===void 0)continue;(P.clearOnDefault??oe.clearOnDefault??h)&&Y!==null&&oe.defaultValue!==void 0&&(oe.eq??((U,D)=>U===D))(Y,oe.defaultValue)&&(Y=null);const $=Y===null?null:(oe.serialize??String)(Y);Xb.emit(ne,{state:Y,query:$});const V={key:ne,query:$,options:{history:P.history??oe.history??s,shallow:P.shallow??oe.shallow??c,scroll:P.scroll??oe.scroll??l,startTransition:P.startTransition??oe.startTransition??p}};if(P?.limitUrlUpdates?.method==="debounce"||d?.method==="debounce"||oe.limitUrlUpdates?.method==="debounce"){V.options.shallow===!0&&console.warn(Rh(422));const U=P?.limitUrlUpdates?.timeMs??d?.timeMs??oe.limitUrlUpdates?.timeMs??$d.timeMs,D=qb.push(V,U,_,o);G<U&&(q=D,G=U)}else{const U=P?.limitUrlUpdates?.timeMs??oe?.limitUrlUpdates?.timeMs??d?.timeMs??P.throttleMs??oe.throttleMs??u;J.push(qb.abort(ne)),Mg.push(V,U),ee=!0}}const Z=J.reduce((H,Y)=>Y(H),ee?Mg.flush(_,o):Mg.getPendingPromise(_));return q??Z},[b,s,c,l,u,d?.method,d?.timeMs,p,y,_.updateUrl,_.getSearchParamsSnapshot,_.rateLimitFactor,o,v]);return[k.useMemo(()=>eA(S,v),[S,v]),O]}function Qb(e,t,n,r,o,s){let l=!1;const c=Object.entries(e).reduce((u,[d,h])=>{const p=t?.[d]??d,g=r[p],b=h.type==="multi"?[]:null,y=g===void 0?(h.type==="multi"?n?.getAll(p):n?.get(p))??b:g;return o&&s&&Ij(o[p]??b,y)?(u[d]=s[d]??null,u):(l=!0,u[d]=(JF(y)?null:WP(h.parse,y,p))??null,o&&(o[p]=y),u)},{});if(!l){const u=Object.keys(e),d=Object.keys(s??{});l=u.length!==d.length||u.some(h=>!d.includes(h))}return{state:c,hasChanged:l}}function eA(e,t){return Object.fromEntries(Object.keys(e).map(n=>[n,e[n]??t[n]??null]))}function NK(e,t={}){const{parse:n,type:r,serialize:o,eq:s,defaultValue:l,...c}=t,[{[e]:u},d]=PK({[e]:{parse:n??(h=>h),type:r,serialize:o,eq:s,defaultValue:l}},c);return[u,k.useCallback((h,p={})=>d(g=>({[e]:typeof h=="function"?h(g[e]):h}),p),[e,d])]}function n_(){return NK("tool",MK)}const DK=Object.freeze({status:"aborted"});function ke(e,t,n){function r(c,u){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:u,constr:l,traits:new Set},enumerable:!1}),c._zod.traits.has(e))return;c._zod.traits.add(e),t(c,u);const d=l.prototype,h=Object.keys(d);for(let p=0;p<h.length;p++){const g=h[p];g in c||(c[g]=d[g].bind(c))}}const o=n?.Parent??Object;class s extends o{}Object.defineProperty(s,"name",{value:e});function l(c){var u;const d=n?.Parent?new s:this;r(d,c),(u=d._zod).deferred??(u.deferred=[]);for(const h of d._zod.deferred)h();return d}return Object.defineProperty(l,"init",{value:r}),Object.defineProperty(l,Symbol.hasInstance,{value:c=>n?.Parent&&c instanceof n.Parent?!0:c?._zod?.traits?.has(e)}),Object.defineProperty(l,"name",{value:e}),l}class Tu extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class YP extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const XP={};function qa(e){return XP}function QP(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function QS(e,t){return typeof t=="bigint"?t.toString():t}function Yy(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function r_(e){return e==null}function o_(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function $K(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let o=(r.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(r)){const u=r.match(/\d?e-(\d?)/);u?.[1]&&(o=Number.parseInt(u[1]))}const s=n>o?n:o,l=Number.parseInt(e.toFixed(s).replace(".","")),c=Number.parseInt(t.toFixed(s).replace(".",""));return l%c/10**s}const tA=Symbol("evaluating");function dn(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==tA)return r===void 0&&(r=tA,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function uc(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Ja(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function nA(e){return JSON.stringify(e)}function IK(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const JP="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function ih(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const zK=Yy(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Fu(e){if(ih(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(ih(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function e4(e){return Fu(e)?{...e}:Array.isArray(e)?[...e]:e}const LK=new Set(["string","number","symbol"]);function Uu(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function el(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function nt(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 FK(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const UK={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 VK(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const s=Ja(e._zod.def,{get shape(){const l={};for(const c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&(l[c]=n.shape[c])}return uc(this,"shape",l),l},checks:[]});return el(e,s)}function qK(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const s=Ja(e._zod.def,{get shape(){const l={...e._zod.def.shape};for(const c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&delete l[c]}return uc(this,"shape",l),l},checks:[]});return el(e,s)}function BK(e,t){if(!Fu(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const s=e._zod.def.shape;for(const l in t)if(Object.getOwnPropertyDescriptor(s,l)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=Ja(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t};return uc(this,"shape",s),s}});return el(e,o)}function HK(e,t){if(!Fu(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Ja(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return uc(this,"shape",r),r}});return el(e,n)}function KK(e,t){const n=Ja(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return uc(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return el(e,n)}function GK(e,t,n){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const l=Ja(t._zod.def,{get shape(){const c=t._zod.def.shape,u={...c};if(n)for(const d in n){if(!(d in c))throw new Error(`Unrecognized key: "${d}"`);n[d]&&(u[d]=e?new e({type:"optional",innerType:c[d]}):c[d])}else for(const d in c)u[d]=e?new e({type:"optional",innerType:c[d]}):c[d];return uc(this,"shape",u),u},checks:[]});return el(t,l)}function ZK(e,t,n){const r=Ja(t._zod.def,{get shape(){const o=t._zod.def.shape,s={...o};if(n)for(const l in n){if(!(l in s))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(s[l]=new e({type:"nonoptional",innerType:o[l]}))}else for(const l in o)s[l]=new e({type:"nonoptional",innerType:o[l]});return uc(this,"shape",s),s}});return el(t,r)}function mu(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function gu(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function ym(e){return typeof e=="string"?e:e?.message}function Ba(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const o=ym(e.inst?._zod.def?.error?.(e))??ym(t?.error?.(e))??ym(n.customError?.(e))??ym(n.localeError?.(e))??"Invalid input";r.message=o}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function i_(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function sh(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const t4=(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,QS,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},n4=ke("$ZodError",t4),r4=ke("$ZodError",t4,{Parent:Error});function WK(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}function YK(e,t=n=>n.message){const n={_errors:[]},r=o=>{for(const s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(l=>r({issues:l}));else if(s.code==="invalid_key")r({issues:s.issues});else if(s.code==="invalid_element")r({issues:s.issues});else if(s.path.length===0)n._errors.push(t(s));else{let l=n,c=0;for(;c<s.path.length;){const u=s.path[c];c===s.path.length-1?(l[u]=l[u]||{_errors:[]},l[u]._errors.push(t(s))):l[u]=l[u]||{_errors:[]},l=l[u],c++}}};return r(e),n}const s_=e=>(t,n,r,o)=>{const s=r?Object.assign(r,{async:!1}):{async:!1},l=t._zod.run({value:n,issues:[]},s);if(l instanceof Promise)throw new Tu;if(l.issues.length){const c=new(o?.Err??e)(l.issues.map(u=>Ba(u,s,qa())));throw JP(c,o?.callee),c}return l.value},a_=e=>async(t,n,r,o)=>{const s=r?Object.assign(r,{async:!0}):{async:!0};let l=t._zod.run({value:n,issues:[]},s);if(l instanceof Promise&&(l=await l),l.issues.length){const c=new(o?.Err??e)(l.issues.map(u=>Ba(u,s,qa())));throw JP(c,o?.callee),c}return l.value},Xy=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise)throw new Tu;return s.issues.length?{success:!1,error:new(e??n4)(s.issues.map(l=>Ba(l,o,qa())))}:{success:!0,data:s.value}},o4=Xy(r4),Qy=e=>async(t,n,r)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let s=t._zod.run({value:n,issues:[]},o);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(l=>Ba(l,o,qa())))}:{success:!0,data:s.value}},XK=Qy(r4),QK=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return s_(e)(t,n,o)},JK=e=>(t,n,r)=>s_(e)(t,n,r),eG=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return a_(e)(t,n,o)},tG=e=>async(t,n,r)=>a_(e)(t,n,r),nG=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Xy(e)(t,n,o)},rG=e=>(t,n,r)=>Xy(e)(t,n,r),oG=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Qy(e)(t,n,o)},iG=e=>async(t,n,r)=>Qy(e)(t,n,r),sG=/^[cC][^\s-]{8,}$/,aG=/^[0-9a-z]+$/,lG=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,cG=/^[0-9a-vA-V]{20}$/,uG=/^[A-Za-z0-9]{27}$/,fG=/^[a-zA-Z0-9_-]{21}$/,dG=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,hG=/^([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})$/,rA=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)$/,pG=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,mG="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function gG(){return new RegExp(mG,"u")}const yG=/^(?:(?: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])$/,vG=/^(([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}|:))$/,bG=/^((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])$/,SG=/^(([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])$/,wG=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,i4=/^[A-Za-z0-9_-]*$/,xG=/^\+[1-9]\d{6,14}$/,s4="(?:(?:\\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])))",_G=new RegExp(`^${s4}$`);function a4(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 EG(e){return new RegExp(`^${a4(e)}$`)}function CG(e){const t=a4({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${s4}T(?:${r})$`)}const TG=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},RG=/^-?\d+$/,l4=/^-?\d+(?:\.\d+)?$/,OG=/^(?:true|false)$/i,AG=/^null$/i,kG=/^[^A-Z]*$/,MG=/^[^a-z]*$/,So=ke("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),c4={number:"number",bigint:"bigint",object:"date"},u4=ke("$ZodCheckLessThan",(e,t)=>{So.init(e,t);const n=c4[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,s=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),f4=ke("$ZodCheckGreaterThan",(e,t)=>{So.init(e,t);const n=c4[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,s=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),jG=ke("$ZodCheckMultipleOf",(e,t)=>{So.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):$K(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),PG=ke("$ZodCheckNumberFormat",(e,t)=>{So.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[o,s]=UK[t.format];e._zod.onattach.push(l=>{const c=l._zod.bag;c.format=t.format,c.minimum=o,c.maximum=s,n&&(c.pattern=RG)}),e._zod.check=l=>{const c=l.value;if(n){if(!Number.isInteger(c)){l.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?l.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):l.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}c<o&&l.issues.push({origin:"number",input:c,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),c>s&&l.issues.push({origin:"number",input:c,code:"too_big",maximum:s,inclusive:!0,inst:e,continue:!t.abort})}}),NG=ke("$ZodCheckMaxLength",(e,t)=>{var n;So.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!r_(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const o=r.value;if(o.length<=t.maximum)return;const l=i_(o);r.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),DG=ke("$ZodCheckMinLength",(e,t)=>{var n;So.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!r_(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const o=r.value;if(o.length>=t.minimum)return;const l=i_(o);r.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),$G=ke("$ZodCheckLengthEquals",(e,t)=>{var n;So.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!r_(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=r=>{const o=r.value,s=o.length;if(s===t.length)return;const l=i_(o),c=s>t.length;r.issues.push({origin:l,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),Jy=ke("$ZodCheckStringFormat",(e,t)=>{var n,r;So.init(e,t),e._zod.onattach.push(o=>{const s=o._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),IG=ke("$ZodCheckRegex",(e,t)=>{Jy.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),zG=ke("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=kG),Jy.init(e,t)}),LG=ke("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=MG),Jy.init(e,t)}),FG=ke("$ZodCheckIncludes",(e,t)=>{So.init(e,t);const n=Uu(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(r)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),UG=ke("$ZodCheckStartsWith",(e,t)=>{So.init(e,t);const n=new RegExp(`^${Uu(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),VG=ke("$ZodCheckEndsWith",(e,t)=>{So.init(e,t);const n=new RegExp(`.*${Uu(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),qG=ke("$ZodCheckOverwrite",(e,t)=>{So.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class BG{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 r=t.split(`
11
- `).filter(l=>l),o=Math.min(...r.map(l=>l.length-l.trimStart().length)),s=r.map(l=>l.slice(o)).map(l=>" ".repeat(this.indent*2)+l);for(const l of s)this.content.push(l)}compile(){const t=Function,n=this?.args,o=[...(this?.content??[""]).map(s=>` ${s}`)];return new t(...n,o.join(`
12
- `))}}const HG={major:4,minor:3,patch:5},Ln=ke("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=HG;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const o of r)for(const s of o._zod.onattach)s(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(l,c,u)=>{let d=mu(l),h;for(const p of c){if(p._zod.def.when){if(!p._zod.def.when(l))continue}else if(d)continue;const g=l.issues.length,b=p._zod.check(l);if(b instanceof Promise&&u?.async===!1)throw new Tu;if(h||b instanceof Promise)h=(h??Promise.resolve()).then(async()=>{await b,l.issues.length!==g&&(d||(d=mu(l,g)))});else{if(l.issues.length===g)continue;d||(d=mu(l,g))}}return h?h.then(()=>l):l},s=(l,c,u)=>{if(mu(l))return l.aborted=!0,l;const d=o(c,r,u);if(d instanceof Promise){if(u.async===!1)throw new Tu;return d.then(h=>e._zod.parse(h,u))}return e._zod.parse(d,u)};e._zod.run=(l,c)=>{if(c.skipChecks)return e._zod.parse(l,c);if(c.direction==="backward"){const d=e._zod.parse({value:l.value,issues:[]},{...c,skipChecks:!0});return d instanceof Promise?d.then(h=>s(h,l,c)):s(d,l,c)}const u=e._zod.parse(l,c);if(u instanceof Promise){if(c.async===!1)throw new Tu;return u.then(d=>o(d,r,c))}return o(u,r,c)}}dn(e,"~standard",()=>({validate:o=>{try{const s=o4(e,o);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return XK(e,o).then(l=>l.success?{value:l.data}:{issues:l.error?.issues})}},vendor:"zod",version:1}))}),l_=ke("$ZodString",(e,t)=>{Ln.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??TG(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),Zn=ke("$ZodStringFormat",(e,t)=>{Jy.init(e,t),l_.init(e,t)}),KG=ke("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=hG),Zn.init(e,t)}),GG=ke("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=rA(r))}else t.pattern??(t.pattern=rA());Zn.init(e,t)}),ZG=ke("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=pG),Zn.init(e,t)}),WG=ke("$ZodURL",(e,t)=>{Zn.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),o=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=o.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),YG=ke("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=gG()),Zn.init(e,t)}),XG=ke("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=fG),Zn.init(e,t)}),QG=ke("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=sG),Zn.init(e,t)}),JG=ke("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=aG),Zn.init(e,t)}),eZ=ke("$ZodULID",(e,t)=>{t.pattern??(t.pattern=lG),Zn.init(e,t)}),tZ=ke("$ZodXID",(e,t)=>{t.pattern??(t.pattern=cG),Zn.init(e,t)}),nZ=ke("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=uG),Zn.init(e,t)}),rZ=ke("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=CG(t)),Zn.init(e,t)}),oZ=ke("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=_G),Zn.init(e,t)}),iZ=ke("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=EG(t)),Zn.init(e,t)}),sZ=ke("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=dG),Zn.init(e,t)}),aZ=ke("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=yG),Zn.init(e,t),e._zod.bag.format="ipv4"}),lZ=ke("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=vG),Zn.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),cZ=ke("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=bG),Zn.init(e,t)}),uZ=ke("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=SG),Zn.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[o,s]=r;if(!s)throw new Error;const l=Number(s);if(`${l}`!==s)throw new Error;if(l<0||l>128)throw new Error;new URL(`http://[${o}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function d4(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const fZ=ke("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=wG),Zn.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{d4(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function dZ(e){if(!i4.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return d4(n)}const hZ=ke("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=i4),Zn.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{dZ(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),pZ=ke("$ZodE164",(e,t)=>{t.pattern??(t.pattern=xG),Zn.init(e,t)});function mZ(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const gZ=ke("$ZodJWT",(e,t)=>{Zn.init(e,t),e._zod.check=n=>{mZ(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),h4=ke("$ZodNumber",(e,t)=>{Ln.init(e,t),e._zod.pattern=e._zod.bag.pattern??l4,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const o=n.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return n;const s=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...s?{received:s}:{}}),n}}),yZ=ke("$ZodNumberFormat",(e,t)=>{PG.init(e,t),h4.init(e,t)}),vZ=ke("$ZodBoolean",(e,t)=>{Ln.init(e,t),e._zod.pattern=OG,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}const o=n.value;return typeof o=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),n}}),bZ=ke("$ZodNull",(e,t)=>{Ln.init(e,t),e._zod.pattern=AG,e._zod.values=new Set([null]),e._zod.parse=(n,r)=>{const o=n.value;return o===null||n.issues.push({expected:"null",code:"invalid_type",input:o,inst:e}),n}}),SZ=ke("$ZodAny",(e,t)=>{Ln.init(e,t),e._zod.parse=n=>n}),wZ=ke("$ZodUnknown",(e,t)=>{Ln.init(e,t),e._zod.parse=n=>n}),xZ=ke("$ZodNever",(e,t)=>{Ln.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function oA(e,t,n){e.issues.length&&t.issues.push(...gu(n,e.issues)),t.value[n]=e.value}const _Z=ke("$ZodArray",(e,t)=>{Ln.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);const s=[];for(let l=0;l<o.length;l++){const c=o[l],u=t.element._zod.run({value:c,issues:[]},r);u instanceof Promise?s.push(u.then(d=>oA(d,n,l))):oA(u,n,l)}return s.length?Promise.all(s).then(()=>n):n}});function ry(e,t,n,r,o){if(e.issues.length){if(o&&!(n in r))return;t.issues.push(...gu(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function p4(e){const t=Object.keys(e.shape);for(const r of t)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const n=FK(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function m4(e,t,n,r,o,s){const l=[],c=o.keySet,u=o.catchall._zod,d=u.def.type,h=u.optout==="optional";for(const p in t){if(c.has(p))continue;if(d==="never"){l.push(p);continue}const g=u.run({value:t[p],issues:[]},r);g instanceof Promise?e.push(g.then(b=>ry(b,n,p,t,h))):ry(g,n,p,t,h)}return l.length&&n.issues.push({code:"unrecognized_keys",keys:l,input:t,inst:s}),e.length?Promise.all(e).then(()=>n):n}const EZ=ke("$ZodObject",(e,t)=>{if(Ln.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const c=t.shape;Object.defineProperty(t,"shape",{get:()=>{const u={...c};return Object.defineProperty(t,"shape",{value:u}),u}})}const r=Yy(()=>p4(t));dn(e._zod,"propValues",()=>{const c=t.shape,u={};for(const d in c){const h=c[d]._zod;if(h.values){u[d]??(u[d]=new Set);for(const p of h.values)u[d].add(p)}}return u});const o=ih,s=t.catchall;let l;e._zod.parse=(c,u)=>{l??(l=r.value);const d=c.value;if(!o(d))return c.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),c;c.value={};const h=[],p=l.shape;for(const g of l.keys){const b=p[g],y=b._zod.optout==="optional",_=b._zod.run({value:d[g],issues:[]},u);_ instanceof Promise?h.push(_.then(w=>ry(w,c,g,d,y))):ry(_,c,g,d,y)}return s?m4(h,d,c,u,r.value,e):h.length?Promise.all(h).then(()=>c):c}}),CZ=ke("$ZodObjectJIT",(e,t)=>{EZ.init(e,t);const n=e._zod.parse,r=Yy(()=>p4(t)),o=g=>{const b=new BG(["shape","payload","ctx"]),y=r.value,_=E=>{const S=nA(E);return`shape[${S}]._zod.run({ value: input[${S}], issues: [] }, ctx)`};b.write("const input = payload.value;");const w=Object.create(null);let T=0;for(const E of y.keys)w[E]=`key_${T++}`;b.write("const newResult = {};");for(const E of y.keys){const S=w[E],C=nA(E),O=g[E]?._zod?.optout==="optional";b.write(`const ${S} = ${_(E)};`),O?b.write(`
13
- if (${S}.issues.length) {
14
- if (${C} in input) {
15
- payload.issues = payload.issues.concat(${S}.issues.map(iss => ({
16
- ...iss,
17
- path: iss.path ? [${C}, ...iss.path] : [${C}]
18
- })));
19
- }
20
- }
21
-
22
- if (${S}.value === undefined) {
23
- if (${C} in input) {
24
- newResult[${C}] = undefined;
25
- }
26
- } else {
27
- newResult[${C}] = ${S}.value;
28
- }
29
-
30
- `):b.write(`
31
- if (${S}.issues.length) {
32
- payload.issues = payload.issues.concat(${S}.issues.map(iss => ({
33
- ...iss,
34
- path: iss.path ? [${C}, ...iss.path] : [${C}]
35
- })));
36
- }
37
-
38
- if (${S}.value === undefined) {
39
- if (${C} in input) {
40
- newResult[${C}] = undefined;
41
- }
42
- } else {
43
- newResult[${C}] = ${S}.value;
44
- }
45
-
46
- `)}b.write("payload.value = newResult;"),b.write("return payload;");const v=b.compile();return(E,S)=>v(g,E,S)};let s;const l=ih,c=!XP.jitless,d=c&&zK.value,h=t.catchall;let p;e._zod.parse=(g,b)=>{p??(p=r.value);const y=g.value;return l(y)?c&&d&&b?.async===!1&&b.jitless!==!0?(s||(s=o(t.shape)),g=s(g,b),h?m4([],y,g,b,p,e):g):n(g,b):(g.issues.push({expected:"object",code:"invalid_type",input:y,inst:e}),g)}});function iA(e,t,n,r){for(const s of e)if(s.issues.length===0)return t.value=s.value,t;const o=e.filter(s=>!mu(s));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(s=>s.issues.map(l=>Ba(l,r,qa())))}),t)}const g4=ke("$ZodUnion",(e,t)=>{Ln.init(e,t),dn(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),dn(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),dn(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),dn(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(s=>s._zod.pattern);return new RegExp(`^(${o.map(s=>o_(s.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(o,s)=>{if(n)return r(o,s);let l=!1;const c=[];for(const u of t.options){const d=u._zod.run({value:o.value,issues:[]},s);if(d instanceof Promise)c.push(d),l=!0;else{if(d.issues.length===0)return d;c.push(d)}}return l?Promise.all(c).then(u=>iA(u,o,e,s)):iA(c,o,e,s)}}),TZ=ke("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,g4.init(e,t);const n=e._zod.parse;dn(e._zod,"propValues",()=>{const o={};for(const s of t.options){const l=s._zod.propValues;if(!l||Object.keys(l).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(const[c,u]of Object.entries(l)){o[c]||(o[c]=new Set);for(const d of u)o[c].add(d)}}return o});const r=Yy(()=>{const o=t.options,s=new Map;for(const l of o){const c=l._zod.propValues?.[t.discriminator];if(!c||c.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(l)}"`);for(const u of c){if(s.has(u))throw new Error(`Duplicate discriminator value "${String(u)}"`);s.set(u,l)}}return s});e._zod.parse=(o,s)=>{const l=o.value;if(!ih(l))return o.issues.push({code:"invalid_type",expected:"object",input:l,inst:e}),o;const c=r.value.get(l?.[t.discriminator]);return c?c._zod.run(o,s):t.unionFallback?n(o,s):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:l,path:[t.discriminator],inst:e}),o)}}),RZ=ke("$ZodIntersection",(e,t)=>{Ln.init(e,t),e._zod.parse=(n,r)=>{const o=n.value,s=t.left._zod.run({value:o,issues:[]},r),l=t.right._zod.run({value:o,issues:[]},r);return s instanceof Promise||l instanceof Promise?Promise.all([s,l]).then(([u,d])=>sA(n,u,d)):sA(n,s,l)}});function JS(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(Fu(e)&&Fu(t)){const n=Object.keys(t),r=Object.keys(e).filter(s=>n.indexOf(s)!==-1),o={...e,...t};for(const s of r){const l=JS(e[s],t[s]);if(!l.valid)return{valid:!1,mergeErrorPath:[s,...l.mergeErrorPath]};o[s]=l.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const o=e[r],s=t[r],l=JS(o,s);if(!l.valid)return{valid:!1,mergeErrorPath:[r,...l.mergeErrorPath]};n.push(l.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function sA(e,t,n){const r=new Map;let o;for(const c of t.issues)if(c.code==="unrecognized_keys"){o??(o=c);for(const u of c.keys)r.has(u)||r.set(u,{}),r.get(u).l=!0}else e.issues.push(c);for(const c of n.issues)if(c.code==="unrecognized_keys")for(const u of c.keys)r.has(u)||r.set(u,{}),r.get(u).r=!0;else e.issues.push(c);const s=[...r].filter(([,c])=>c.l&&c.r).map(([c])=>c);if(s.length&&o&&e.issues.push({...o,keys:s}),mu(e))return e;const l=JS(t.value,n.value);if(!l.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`);return e.value=l.data,e}const OZ=ke("$ZodRecord",(e,t)=>{Ln.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!Fu(o))return n.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),n;const s=[],l=t.keyType._zod.values;if(l){n.value={};const c=new Set;for(const d of l)if(typeof d=="string"||typeof d=="number"||typeof d=="symbol"){c.add(typeof d=="number"?d.toString():d);const h=t.valueType._zod.run({value:o[d],issues:[]},r);h instanceof Promise?s.push(h.then(p=>{p.issues.length&&n.issues.push(...gu(d,p.issues)),n.value[d]=p.value})):(h.issues.length&&n.issues.push(...gu(d,h.issues)),n.value[d]=h.value)}let u;for(const d in o)c.has(d)||(u=u??[],u.push(d));u&&u.length>0&&n.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:u})}else{n.value={};for(const c of Reflect.ownKeys(o)){if(c==="__proto__")continue;let u=t.keyType._zod.run({value:c,issues:[]},r);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof c=="string"&&l4.test(c)&&u.issues.length&&u.issues.some(p=>p.code==="invalid_type"&&p.expected==="number")){const p=t.keyType._zod.run({value:Number(c),issues:[]},r);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");p.issues.length===0&&(u=p)}if(u.issues.length){t.mode==="loose"?n.value[c]=o[c]:n.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(p=>Ba(p,r,qa())),input:c,path:[c],inst:e});continue}const h=t.valueType._zod.run({value:o[c],issues:[]},r);h instanceof Promise?s.push(h.then(p=>{p.issues.length&&n.issues.push(...gu(c,p.issues)),n.value[u.value]=p.value})):(h.issues.length&&n.issues.push(...gu(c,h.issues)),n.value[u.value]=h.value)}}return s.length?Promise.all(s).then(()=>n):n}}),AZ=ke("$ZodEnum",(e,t)=>{Ln.init(e,t);const n=QP(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(o=>LK.has(typeof o)).map(o=>typeof o=="string"?Uu(o):o.toString()).join("|")})$`),e._zod.parse=(o,s)=>{const l=o.value;return r.has(l)||o.issues.push({code:"invalid_value",values:n,input:l,inst:e}),o}}),kZ=ke("$ZodLiteral",(e,t)=>{if(Ln.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?Uu(r):r?Uu(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,o)=>{const s=r.value;return n.has(s)||r.issues.push({code:"invalid_value",values:t.values,input:s,inst:e}),r}}),MZ=ke("$ZodTransform",(e,t)=>{Ln.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new YP(e.constructor.name);const o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(l=>(n.value=l,n));if(o instanceof Promise)throw new Tu;return n.value=o,n}});function aA(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const y4=ke("$ZodOptional",(e,t)=>{Ln.init(e,t),e._zod.optin="optional",e._zod.optout="optional",dn(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),dn(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${o_(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(s=>aA(s,n.value)):aA(o,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),jZ=ke("$ZodExactOptional",(e,t)=>{y4.init(e,t),dn(e._zod,"values",()=>t.innerType._zod.values),dn(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),PZ=ke("$ZodNullable",(e,t)=>{Ln.init(e,t),dn(e._zod,"optin",()=>t.innerType._zod.optin),dn(e._zod,"optout",()=>t.innerType._zod.optout),dn(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${o_(n.source)}|null)$`):void 0}),dn(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),NZ=ke("$ZodDefault",(e,t)=>{Ln.init(e,t),e._zod.optin="optional",dn(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(s=>lA(s,t)):lA(o,t)}});function lA(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const DZ=ke("$ZodPrefault",(e,t)=>{Ln.init(e,t),e._zod.optin="optional",dn(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),$Z=ke("$ZodNonOptional",(e,t)=>{Ln.init(e,t),dn(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(s=>cA(s,e)):cA(o,e)}});function cA(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 IZ=ke("$ZodCatch",(e,t)=>{Ln.init(e,t),dn(e._zod,"optin",()=>t.innerType._zod.optin),dn(e._zod,"optout",()=>t.innerType._zod.optout),dn(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(s=>(n.value=s.value,s.issues.length&&(n.value=t.catchValue({...n,error:{issues:s.issues.map(l=>Ba(l,r,qa()))},input:n.value}),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(s=>Ba(s,r,qa()))},input:n.value}),n.issues=[]),n)}}),zZ=ke("$ZodPipe",(e,t)=>{Ln.init(e,t),dn(e._zod,"values",()=>t.in._zod.values),dn(e._zod,"optin",()=>t.in._zod.optin),dn(e._zod,"optout",()=>t.out._zod.optout),dn(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const s=t.out._zod.run(n,r);return s instanceof Promise?s.then(l=>vm(l,t.in,r)):vm(s,t.in,r)}const o=t.in._zod.run(n,r);return o instanceof Promise?o.then(s=>vm(s,t.out,r)):vm(o,t.out,r)}});function vm(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const LZ=ke("$ZodReadonly",(e,t)=>{Ln.init(e,t),dn(e._zod,"propValues",()=>t.innerType._zod.propValues),dn(e._zod,"values",()=>t.innerType._zod.values),dn(e._zod,"optin",()=>t.innerType?._zod?.optin),dn(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(uA):uA(o)}});function uA(e){return e.value=Object.freeze(e.value),e}const FZ=ke("$ZodCustom",(e,t)=>{So.init(e,t),Ln.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then(s=>fA(s,n,r,e));fA(o,n,r,e)}});function fA(e,t,n,r){if(!e){const o={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),t.issues.push(sh(o))}}var dA;class UZ{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const o={...r,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function VZ(){return new UZ}(dA=globalThis).__zod_globalRegistry??(dA.__zod_globalRegistry=VZ());const Rd=globalThis.__zod_globalRegistry;function qZ(e,t){return new e({type:"string",...nt(t)})}function BZ(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...nt(t)})}function hA(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...nt(t)})}function HZ(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...nt(t)})}function KZ(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...nt(t)})}function GZ(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...nt(t)})}function ZZ(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...nt(t)})}function v4(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...nt(t)})}function WZ(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...nt(t)})}function YZ(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...nt(t)})}function XZ(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...nt(t)})}function QZ(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...nt(t)})}function JZ(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...nt(t)})}function eW(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...nt(t)})}function tW(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...nt(t)})}function nW(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...nt(t)})}function rW(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...nt(t)})}function oW(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...nt(t)})}function iW(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...nt(t)})}function sW(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...nt(t)})}function aW(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...nt(t)})}function lW(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...nt(t)})}function cW(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...nt(t)})}function uW(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...nt(t)})}function fW(e,t){return new e({type:"string",format:"date",check:"string_format",...nt(t)})}function dW(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...nt(t)})}function hW(e,t){return new e({type:"string",format:"duration",check:"string_format",...nt(t)})}function pW(e,t){return new e({type:"number",checks:[],...nt(t)})}function mW(e,t){return new e({type:"number",coerce:!0,checks:[],...nt(t)})}function gW(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...nt(t)})}function yW(e,t){return new e({type:"boolean",...nt(t)})}function vW(e,t){return new e({type:"null",...nt(t)})}function bW(e){return new e({type:"any"})}function SW(e){return new e({type:"unknown"})}function wW(e,t){return new e({type:"never",...nt(t)})}function pA(e,t){return new u4({check:"less_than",...nt(t),value:e,inclusive:!1})}function Jb(e,t){return new u4({check:"less_than",...nt(t),value:e,inclusive:!0})}function mA(e,t){return new f4({check:"greater_than",...nt(t),value:e,inclusive:!1})}function e1(e,t){return new f4({check:"greater_than",...nt(t),value:e,inclusive:!0})}function gA(e,t){return new jG({check:"multiple_of",...nt(t),value:e})}function b4(e,t){return new NG({check:"max_length",...nt(t),maximum:e})}function oy(e,t){return new DG({check:"min_length",...nt(t),minimum:e})}function S4(e,t){return new $G({check:"length_equals",...nt(t),length:e})}function xW(e,t){return new IG({check:"string_format",format:"regex",...nt(t),pattern:e})}function _W(e){return new zG({check:"string_format",format:"lowercase",...nt(e)})}function EW(e){return new LG({check:"string_format",format:"uppercase",...nt(e)})}function CW(e,t){return new FG({check:"string_format",format:"includes",...nt(t),includes:e})}function TW(e,t){return new UG({check:"string_format",format:"starts_with",...nt(t),prefix:e})}function RW(e,t){return new VG({check:"string_format",format:"ends_with",...nt(t),suffix:e})}function uf(e){return new qG({check:"overwrite",tx:e})}function OW(e){return uf(t=>t.normalize(e))}function AW(){return uf(e=>e.trim())}function kW(){return uf(e=>e.toLowerCase())}function MW(){return uf(e=>e.toUpperCase())}function jW(){return uf(e=>IK(e))}function PW(e,t,n){return new e({type:"array",element:t,...nt(n)})}function NW(e,t,n){const r=nt(n);return r.abort??(r.abort=!0),new e({type:"custom",check:"custom",fn:t,...r})}function DW(e,t,n){return new e({type:"custom",check:"custom",fn:t,...nt(n)})}function $W(e){const t=IW(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(sh(r,n.value,t._zod.def));else{const o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),n.issues.push(sh(o))}},e(n.value,n)));return t}function IW(e,t){const n=new So({check:"custom",...nt(t)});return n._zod.check=e,n}function w4(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??Rd,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 br(e,t,n={path:[],schemaPath:[]}){var r;const o=e._zod.def,s=t.seen.get(e);if(s)return s.count++,n.schemaPath.includes(e)&&(s.cycle=n.path),s.schema;const l={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,l);const c=e._zod.toJSONSchema?.();if(c)l.schema=c;else{const h={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,l.schema,h);else{const g=l.schema,b=t.processors[o.type];if(!b)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);b(e,t,g,h)}const p=e._zod.parent;p&&(l.ref||(l.ref=p),br(p,t,h),t.seen.get(p).isParent=!0)}const u=t.metadataRegistry.get(e);return u&&Object.assign(l.schema,u),t.io==="input"&&ao(e)&&(delete l.schema.examples,delete l.schema.default),t.io==="input"&&l.schema._prefault&&((r=l.schema).default??(r.default=l.schema._prefault)),delete l.schema._prefault,t.seen.get(e).schema}function x4(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const l of e.seen.entries()){const c=e.metadataRegistry.get(l[0])?.id;if(c){const u=r.get(c);if(u&&u!==l[0])throw new Error(`Duplicate schema id "${c}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(c,l[0])}}const o=l=>{const c=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const p=e.external.registry.get(l[0])?.id,g=e.external.uri??(y=>y);if(p)return{ref:g(p)};const b=l[1].defId??l[1].schema.id??`schema${e.counter++}`;return l[1].defId=b,{defId:b,ref:`${g("__shared")}#/${c}/${b}`}}if(l[1]===n)return{ref:"#"};const d=`#/${c}/`,h=l[1].schema.id??`__schema${e.counter++}`;return{defId:h,ref:d+h}},s=l=>{if(l[1].schema.$ref)return;const c=l[1],{ref:u,defId:d}=o(l);c.def={...c.schema},d&&(c.defId=d);const h=c.schema;for(const p in h)delete h[p];h.$ref=u};if(e.cycles==="throw")for(const l of e.seen.entries()){const c=l[1];if(c.cycle)throw new Error(`Cycle detected: #/${c.cycle?.join("/")}/<root>
47
-
48
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const l of e.seen.entries()){const c=l[1];if(t===l[0]){s(l);continue}if(e.external){const d=e.external.registry.get(l[0])?.id;if(t!==l[0]&&d){s(l);continue}}if(e.metadataRegistry.get(l[0])?.id){s(l);continue}if(c.cycle){s(l);continue}if(c.count>1&&e.reused==="ref"){s(l);continue}}}function _4(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=l=>{const c=e.seen.get(l);if(c.ref===null)return;const u=c.def??c.schema,d={...u},h=c.ref;if(c.ref=null,h){r(h);const g=e.seen.get(h),b=g.schema;if(b.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(b)):Object.assign(u,b),Object.assign(u,d),l._zod.parent===h)for(const _ in u)_==="$ref"||_==="allOf"||_ in d||delete u[_];if(b.$ref)for(const _ in u)_==="$ref"||_==="allOf"||_ in g.def&&JSON.stringify(u[_])===JSON.stringify(g.def[_])&&delete u[_]}const p=l._zod.parent;if(p&&p!==h){r(p);const g=e.seen.get(p);if(g?.schema.$ref&&(u.$ref=g.schema.$ref,g.def))for(const b in u)b==="$ref"||b==="allOf"||b in g.def&&JSON.stringify(u[b])===JSON.stringify(g.def[b])&&delete u[b]}e.override({zodSchema:l,jsonSchema:u,path:c.path??[]})};for(const l of[...e.seen.entries()].reverse())r(l[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const l=e.external.registry.get(t)?.id;if(!l)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(l)}Object.assign(o,n.def??n.schema);const s=e.external?.defs??{};for(const l of e.seen.entries()){const c=l[1];c.def&&c.defId&&(s[c.defId]=c.def)}e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?o.$defs=s:o.definitions=s);try{const l=JSON.parse(JSON.stringify(o));return Object.defineProperty(l,"~standard",{value:{...t["~standard"],jsonSchema:{input:iy(t,"input",e.processors),output:iy(t,"output",e.processors)}},enumerable:!1,writable:!1}),l}catch{throw new Error("Error converting schema to JSON.")}}function ao(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return ao(r.element,n);if(r.type==="set")return ao(r.valueType,n);if(r.type==="lazy")return ao(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return ao(r.innerType,n);if(r.type==="intersection")return ao(r.left,n)||ao(r.right,n);if(r.type==="record"||r.type==="map")return ao(r.keyType,n)||ao(r.valueType,n);if(r.type==="pipe")return ao(r.in,n)||ao(r.out,n);if(r.type==="object"){for(const o in r.shape)if(ao(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(ao(o,n))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(ao(o,n))return!0;return!!(r.rest&&ao(r.rest,n))}return!1}const zW=(e,t={})=>n=>{const r=w4({...n,processors:t});return br(e,r),x4(r,e),_4(r,e)},iy=(e,t,n={})=>r=>{const{libraryOptions:o,target:s}=r??{},l=w4({...o??{},target:s,io:t,processors:n});return br(e,l),x4(l,e),_4(l,e)},LW={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},FW=(e,t,n,r)=>{const o=n;o.type="string";const{minimum:s,maximum:l,format:c,patterns:u,contentEncoding:d}=e._zod.bag;if(typeof s=="number"&&(o.minLength=s),typeof l=="number"&&(o.maxLength=l),c&&(o.format=LW[c]??c,o.format===""&&delete o.format,c==="time"&&delete o.format),d&&(o.contentEncoding=d),u&&u.size>0){const h=[...u];h.length===1?o.pattern=h[0].source:h.length>1&&(o.allOf=[...h.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},UW=(e,t,n,r)=>{const o=n,{minimum:s,maximum:l,format:c,multipleOf:u,exclusiveMaximum:d,exclusiveMinimum:h}=e._zod.bag;typeof c=="string"&&c.includes("int")?o.type="integer":o.type="number",typeof h=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.minimum=h,o.exclusiveMinimum=!0):o.exclusiveMinimum=h),typeof s=="number"&&(o.minimum=s,typeof h=="number"&&t.target!=="draft-04"&&(h>=s?delete o.minimum:delete o.exclusiveMinimum)),typeof d=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.maximum=d,o.exclusiveMaximum=!0):o.exclusiveMaximum=d),typeof l=="number"&&(o.maximum=l,typeof d=="number"&&t.target!=="draft-04"&&(d<=l?delete o.maximum:delete o.exclusiveMaximum)),typeof u=="number"&&(o.multipleOf=u)},VW=(e,t,n,r)=>{n.type="boolean"},qW=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},BW=(e,t,n,r)=>{n.not={}},HW=(e,t,n,r)=>{},KW=(e,t,n,r)=>{},GW=(e,t,n,r)=>{const o=e._zod.def,s=QP(o.entries);s.every(l=>typeof l=="number")&&(n.type="number"),s.every(l=>typeof l=="string")&&(n.type="string"),n.enum=s},ZW=(e,t,n,r)=>{const o=e._zod.def,s=[];for(const l of o.values)if(l===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof l=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");s.push(Number(l))}else s.push(l);if(s.length!==0)if(s.length===1){const l=s[0];n.type=l===null?"null":typeof l,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[l]:n.const=l}else s.every(l=>typeof l=="number")&&(n.type="number"),s.every(l=>typeof l=="string")&&(n.type="string"),s.every(l=>typeof l=="boolean")&&(n.type="boolean"),s.every(l=>l===null)&&(n.type="null"),n.enum=s},WW=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},YW=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},XW=(e,t,n,r)=>{const o=n,s=e._zod.def,{minimum:l,maximum:c}=e._zod.bag;typeof l=="number"&&(o.minItems=l),typeof c=="number"&&(o.maxItems=c),o.type="array",o.items=br(s.element,t,{...r,path:[...r.path,"items"]})},QW=(e,t,n,r)=>{const o=n,s=e._zod.def;o.type="object",o.properties={};const l=s.shape;for(const d in l)o.properties[d]=br(l[d],t,{...r,path:[...r.path,"properties",d]});const c=new Set(Object.keys(l)),u=new Set([...c].filter(d=>{const h=s.shape[d]._zod;return t.io==="input"?h.optin===void 0:h.optout===void 0}));u.size>0&&(o.required=Array.from(u)),s.catchall?._zod.def.type==="never"?o.additionalProperties=!1:s.catchall?s.catchall&&(o.additionalProperties=br(s.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},JW=(e,t,n,r)=>{const o=e._zod.def,s=o.inclusive===!1,l=o.options.map((c,u)=>br(c,t,{...r,path:[...r.path,s?"oneOf":"anyOf",u]}));s?n.oneOf=l:n.anyOf=l},eY=(e,t,n,r)=>{const o=e._zod.def,s=br(o.left,t,{...r,path:[...r.path,"allOf",0]}),l=br(o.right,t,{...r,path:[...r.path,"allOf",1]}),c=d=>"allOf"in d&&Object.keys(d).length===1,u=[...c(s)?s.allOf:[s],...c(l)?l.allOf:[l]];n.allOf=u},tY=(e,t,n,r)=>{const o=n,s=e._zod.def;o.type="object";const l=s.keyType,u=l._zod.bag?.patterns;if(s.mode==="loose"&&u&&u.size>0){const h=br(s.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});o.patternProperties={};for(const p of u)o.patternProperties[p.source]=h}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(o.propertyNames=br(s.keyType,t,{...r,path:[...r.path,"propertyNames"]})),o.additionalProperties=br(s.valueType,t,{...r,path:[...r.path,"additionalProperties"]});const d=l._zod.values;if(d){const h=[...d].filter(p=>typeof p=="string"||typeof p=="number");h.length>0&&(o.required=h)}},nY=(e,t,n,r)=>{const o=e._zod.def,s=br(o.innerType,t,r),l=t.seen.get(e);t.target==="openapi-3.0"?(l.ref=o.innerType,n.nullable=!0):n.anyOf=[s,{type:"null"}]},rY=(e,t,n,r)=>{const o=e._zod.def;br(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType},oY=(e,t,n,r)=>{const o=e._zod.def;br(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},iY=(e,t,n,r)=>{const o=e._zod.def;br(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},sY=(e,t,n,r)=>{const o=e._zod.def;br(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType;let l;try{l=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=l},aY=(e,t,n,r)=>{const o=e._zod.def,s=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;br(s,t,r);const l=t.seen.get(e);l.ref=s},lY=(e,t,n,r)=>{const o=e._zod.def;br(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType,n.readOnly=!0},E4=(e,t,n,r)=>{const o=e._zod.def;br(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType};function e0(e){return!!e._zod}function Ra(e,t){return e0(e)?o4(e,t):e.safeParse(t)}function C4(e){if(!e)return;let t;if(e0(e)?t=e._zod?.def?.shape:t=e.shape,!!t){if(typeof t=="function")try{return t()}catch{return}return t}}function cY(e){if(e0(e)){const s=e._zod?.def;if(s){if(s.value!==void 0)return s.value;if(Array.isArray(s.values)&&s.values.length>0)return s.values[0]}}const n=e._def;if(n){if(n.value!==void 0)return n.value;if(Array.isArray(n.values)&&n.values.length>0)return n.values[0]}const r=e.value;if(r!==void 0)return r}const uY=ke("ZodISODateTime",(e,t)=>{rZ.init(e,t),Qn.init(e,t)});function T4(e){return uW(uY,e)}const fY=ke("ZodISODate",(e,t)=>{oZ.init(e,t),Qn.init(e,t)});function dY(e){return fW(fY,e)}const hY=ke("ZodISOTime",(e,t)=>{iZ.init(e,t),Qn.init(e,t)});function pY(e){return dW(hY,e)}const mY=ke("ZodISODuration",(e,t)=>{sZ.init(e,t),Qn.init(e,t)});function gY(e){return hW(mY,e)}const yY=(e,t)=>{n4.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>YK(e,n)},flatten:{value:n=>WK(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,QS,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,QS,2)}},isEmpty:{get(){return e.issues.length===0}}})},ui=ke("ZodError",yY,{Parent:Error}),vY=s_(ui),bY=a_(ui),SY=Xy(ui),wY=Qy(ui),xY=QK(ui),_Y=JK(ui),EY=eG(ui),CY=tG(ui),TY=nG(ui),RY=rG(ui),OY=oG(ui),AY=iG(ui),Fn=ke("ZodType",(e,t)=>(Ln.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:iy(e,"input"),output:iy(e,"output")}}),e.toJSONSchema=zW(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Ja(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(n,r)=>el(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>vY(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>SY(e,n,r),e.parseAsync=async(n,r)=>bY(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>wY(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>xY(e,n,r),e.decode=(n,r)=>_Y(e,n,r),e.encodeAsync=async(n,r)=>EY(e,n,r),e.decodeAsync=async(n,r)=>CY(e,n,r),e.safeEncode=(n,r)=>TY(e,n,r),e.safeDecode=(n,r)=>RY(e,n,r),e.safeEncodeAsync=async(n,r)=>OY(e,n,r),e.safeDecodeAsync=async(n,r)=>AY(e,n,r),e.refine=(n,r)=>e.check(xX(n,r)),e.superRefine=n=>e.check(_X(n)),e.overwrite=n=>e.check(uf(n)),e.optional=()=>or(e),e.exactOptional=()=>cX(e),e.nullable=()=>bA(e),e.nullish=()=>or(bA(e)),e.nonoptional=n=>mX(e,n),e.array=()=>Ke(e),e.or=n=>Un([e,n]),e.and=n=>u_(e,n),e.transform=n=>tw(e,P4(n)),e.default=n=>dX(e,n),e.prefault=n=>pX(e,n),e.catch=n=>yX(e,n),e.pipe=n=>tw(e,n),e.readonly=()=>SX(e),e.describe=n=>{const r=e.clone();return Rd.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return Rd.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return Rd.get(e);const r=e.clone();return Rd.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),R4=ke("_ZodString",(e,t)=>{l_.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(r,o,s)=>FW(e,r,o);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(xW(...r)),e.includes=(...r)=>e.check(CW(...r)),e.startsWith=(...r)=>e.check(TW(...r)),e.endsWith=(...r)=>e.check(RW(...r)),e.min=(...r)=>e.check(oy(...r)),e.max=(...r)=>e.check(b4(...r)),e.length=(...r)=>e.check(S4(...r)),e.nonempty=(...r)=>e.check(oy(1,...r)),e.lowercase=r=>e.check(_W(r)),e.uppercase=r=>e.check(EW(r)),e.trim=()=>e.check(AW()),e.normalize=(...r)=>e.check(OW(...r)),e.toLowerCase=()=>e.check(kW()),e.toUpperCase=()=>e.check(MW()),e.slugify=()=>e.check(jW())}),kY=ke("ZodString",(e,t)=>{l_.init(e,t),R4.init(e,t),e.email=n=>e.check(BZ(MY,n)),e.url=n=>e.check(v4(O4,n)),e.jwt=n=>e.check(cW(GY,n)),e.emoji=n=>e.check(WZ(PY,n)),e.guid=n=>e.check(hA(yA,n)),e.uuid=n=>e.check(HZ(bm,n)),e.uuidv4=n=>e.check(KZ(bm,n)),e.uuidv6=n=>e.check(GZ(bm,n)),e.uuidv7=n=>e.check(ZZ(bm,n)),e.nanoid=n=>e.check(YZ(NY,n)),e.guid=n=>e.check(hA(yA,n)),e.cuid=n=>e.check(XZ(DY,n)),e.cuid2=n=>e.check(QZ($Y,n)),e.ulid=n=>e.check(JZ(IY,n)),e.base64=n=>e.check(sW(BY,n)),e.base64url=n=>e.check(aW(HY,n)),e.xid=n=>e.check(eW(zY,n)),e.ksuid=n=>e.check(tW(LY,n)),e.ipv4=n=>e.check(nW(FY,n)),e.ipv6=n=>e.check(rW(UY,n)),e.cidrv4=n=>e.check(oW(VY,n)),e.cidrv6=n=>e.check(iW(qY,n)),e.e164=n=>e.check(lW(KY,n)),e.datetime=n=>e.check(T4(n)),e.date=n=>e.check(dY(n)),e.time=n=>e.check(pY(n)),e.duration=n=>e.check(gY(n))});function ue(e){return qZ(kY,e)}const Qn=ke("ZodStringFormat",(e,t)=>{Zn.init(e,t),R4.init(e,t)}),MY=ke("ZodEmail",(e,t)=>{ZG.init(e,t),Qn.init(e,t)}),yA=ke("ZodGUID",(e,t)=>{KG.init(e,t),Qn.init(e,t)}),bm=ke("ZodUUID",(e,t)=>{GG.init(e,t),Qn.init(e,t)}),O4=ke("ZodURL",(e,t)=>{WG.init(e,t),Qn.init(e,t)});function jY(e){return v4(O4,e)}const PY=ke("ZodEmoji",(e,t)=>{YG.init(e,t),Qn.init(e,t)}),NY=ke("ZodNanoID",(e,t)=>{XG.init(e,t),Qn.init(e,t)}),DY=ke("ZodCUID",(e,t)=>{QG.init(e,t),Qn.init(e,t)}),$Y=ke("ZodCUID2",(e,t)=>{JG.init(e,t),Qn.init(e,t)}),IY=ke("ZodULID",(e,t)=>{eZ.init(e,t),Qn.init(e,t)}),zY=ke("ZodXID",(e,t)=>{tZ.init(e,t),Qn.init(e,t)}),LY=ke("ZodKSUID",(e,t)=>{nZ.init(e,t),Qn.init(e,t)}),FY=ke("ZodIPv4",(e,t)=>{aZ.init(e,t),Qn.init(e,t)}),UY=ke("ZodIPv6",(e,t)=>{lZ.init(e,t),Qn.init(e,t)}),VY=ke("ZodCIDRv4",(e,t)=>{cZ.init(e,t),Qn.init(e,t)}),qY=ke("ZodCIDRv6",(e,t)=>{uZ.init(e,t),Qn.init(e,t)}),BY=ke("ZodBase64",(e,t)=>{fZ.init(e,t),Qn.init(e,t)}),HY=ke("ZodBase64URL",(e,t)=>{hZ.init(e,t),Qn.init(e,t)}),KY=ke("ZodE164",(e,t)=>{pZ.init(e,t),Qn.init(e,t)}),GY=ke("ZodJWT",(e,t)=>{gZ.init(e,t),Qn.init(e,t)}),c_=ke("ZodNumber",(e,t)=>{h4.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(r,o,s)=>UW(e,r,o),e.gt=(r,o)=>e.check(mA(r,o)),e.gte=(r,o)=>e.check(e1(r,o)),e.min=(r,o)=>e.check(e1(r,o)),e.lt=(r,o)=>e.check(pA(r,o)),e.lte=(r,o)=>e.check(Jb(r,o)),e.max=(r,o)=>e.check(Jb(r,o)),e.int=r=>e.check(vA(r)),e.safe=r=>e.check(vA(r)),e.positive=r=>e.check(mA(0,r)),e.nonnegative=r=>e.check(e1(0,r)),e.negative=r=>e.check(pA(0,r)),e.nonpositive=r=>e.check(Jb(0,r)),e.multipleOf=(r,o)=>e.check(gA(r,o)),e.step=(r,o)=>e.check(gA(r,o)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function hn(e){return pW(c_,e)}const ZY=ke("ZodNumberFormat",(e,t)=>{yZ.init(e,t),c_.init(e,t)});function vA(e){return gW(ZY,e)}const WY=ke("ZodBoolean",(e,t)=>{vZ.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>VW(e,n,r)});function Dn(e){return yW(WY,e)}const YY=ke("ZodNull",(e,t)=>{bZ.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>qW(e,n,r)});function A4(e){return vW(YY,e)}const XY=ke("ZodAny",(e,t)=>{SZ.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>HW()});function QY(){return bW(XY)}const JY=ke("ZodUnknown",(e,t)=>{wZ.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>KW()});function Yn(){return SW(JY)}const eX=ke("ZodNever",(e,t)=>{xZ.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>BW(e,n,r)});function tX(e){return wW(eX,e)}const nX=ke("ZodArray",(e,t)=>{_Z.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>XW(e,n,r,o),e.element=t.element,e.min=(n,r)=>e.check(oy(n,r)),e.nonempty=n=>e.check(oy(1,n)),e.max=(n,r)=>e.check(b4(n,r)),e.length=(n,r)=>e.check(S4(n,r)),e.unwrap=()=>e.element});function Ke(e,t){return PW(nX,e,t)}const k4=ke("ZodObject",(e,t)=>{CZ.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>QW(e,n,r,o),dn(e,"shape",()=>t.shape),e.keyof=()=>Fo(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Yn()}),e.loose=()=>e.clone({...e._zod.def,catchall:Yn()}),e.strict=()=>e.clone({...e._zod.def,catchall:tX()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>BK(e,n),e.safeExtend=n=>HK(e,n),e.merge=n=>KK(e,n),e.pick=n=>VK(e,n),e.omit=n=>qK(e,n),e.partial=(...n)=>GK(N4,e,n[0]),e.required=(...n)=>ZK(D4,e,n[0])});function Ge(e,t){const n={type:"object",shape:e??{},...nt(t)};return new k4(n)}function Gr(e,t){return new k4({type:"object",shape:e,catchall:Yn(),...nt(t)})}const M4=ke("ZodUnion",(e,t)=>{g4.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>JW(e,n,r,o),e.options=t.options});function Un(e,t){return new M4({type:"union",options:e,...nt(t)})}const rX=ke("ZodDiscriminatedUnion",(e,t)=>{M4.init(e,t),TZ.init(e,t)});function j4(e,t,n){return new rX({type:"union",options:t,discriminator:e,...nt(n)})}const oX=ke("ZodIntersection",(e,t)=>{RZ.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>eY(e,n,r,o)});function u_(e,t){return new oX({type:"intersection",left:e,right:t})}const iX=ke("ZodRecord",(e,t)=>{OZ.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>tY(e,n,r,o),e.keyType=t.keyType,e.valueType=t.valueType});function Xn(e,t,n){return new iX({type:"record",keyType:e,valueType:t,...nt(n)})}const ew=ke("ZodEnum",(e,t)=>{AZ.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(r,o,s)=>GW(e,r,o),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{const s={};for(const l of r)if(n.has(l))s[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new ew({...t,checks:[],...nt(o),entries:s})},e.exclude=(r,o)=>{const s={...t.entries};for(const l of r)if(n.has(l))delete s[l];else throw new Error(`Key ${l} not found in enum`);return new ew({...t,checks:[],...nt(o),entries:s})}});function Fo(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new ew({type:"enum",entries:n,...nt(t)})}const sX=ke("ZodLiteral",(e,t)=>{kZ.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ZW(e,n,r),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 ot(e,t){return new sX({type:"literal",values:Array.isArray(e)?e:[e],...nt(t)})}const aX=ke("ZodTransform",(e,t)=>{MZ.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>YW(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new YP(e.constructor.name);n.addIssue=s=>{if(typeof s=="string")n.issues.push(sh(s,n.value,t));else{const l=s;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=n.value),l.inst??(l.inst=e),n.issues.push(sh(l))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(s=>(n.value=s,n)):(n.value=o,n)}});function P4(e){return new aX({type:"transform",transform:e})}const N4=ke("ZodOptional",(e,t)=>{y4.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>E4(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function or(e){return new N4({type:"optional",innerType:e})}const lX=ke("ZodExactOptional",(e,t)=>{jZ.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>E4(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function cX(e){return new lX({type:"optional",innerType:e})}const uX=ke("ZodNullable",(e,t)=>{PZ.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>nY(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function bA(e){return new uX({type:"nullable",innerType:e})}const fX=ke("ZodDefault",(e,t)=>{NZ.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>oY(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function dX(e,t){return new fX({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():e4(t)}})}const hX=ke("ZodPrefault",(e,t)=>{DZ.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>iY(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function pX(e,t){return new hX({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():e4(t)}})}const D4=ke("ZodNonOptional",(e,t)=>{$Z.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>rY(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function mX(e,t){return new D4({type:"nonoptional",innerType:e,...nt(t)})}const gX=ke("ZodCatch",(e,t)=>{IZ.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>sY(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function yX(e,t){return new gX({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const vX=ke("ZodPipe",(e,t)=>{zZ.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>aY(e,n,r,o),e.in=t.in,e.out=t.out});function tw(e,t){return new vX({type:"pipe",in:e,out:t})}const bX=ke("ZodReadonly",(e,t)=>{LZ.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>lY(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function SX(e){return new bX({type:"readonly",innerType:e})}const $4=ke("ZodCustom",(e,t)=>{FZ.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>WW(e,n)});function wX(e,t){return NW($4,e??(()=>!0),t)}function xX(e,t={}){return DW($4,e,t)}function _X(e){return $W(e)}function I4(e,t){return tw(P4(e),t)}const EX={custom:"custom"};function CX(e){return mW(c_,e)}const t0="2025-11-25",TX=[t0,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],$l="io.modelcontextprotocol/related-task",n0="2.0",Zr=wX(e=>e!==null&&(typeof e=="object"||typeof e=="function")),z4=Un([ue(),hn().int()]),L4=ue();Gr({ttl:Un([hn(),A4()]).optional(),pollInterval:hn().optional()});const RX=Ge({ttl:hn().optional()}),OX=Ge({taskId:ue()}),f_=Gr({progressToken:z4.optional(),[$l]:OX.optional()}),Uo=Ge({_meta:f_.optional()}),Ih=Uo.extend({task:RX.optional()}),AX=e=>Ih.safeParse(e).success,Wr=Ge({method:ue(),params:Uo.loose().optional()}),fi=Ge({_meta:f_.optional()}),di=Ge({method:ue(),params:fi.loose().optional()}),Yr=Gr({_meta:f_.optional()}),r0=Un([ue(),hn().int()]),F4=Ge({jsonrpc:ot(n0),id:r0,...Wr.shape}).strict(),nw=e=>F4.safeParse(e).success,U4=Ge({jsonrpc:ot(n0),...di.shape}).strict(),kX=e=>U4.safeParse(e).success,d_=Ge({jsonrpc:ot(n0),id:r0,result:Yr}).strict(),Od=e=>d_.safeParse(e).success;var _t;(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"})(_t||(_t={}));const h_=Ge({jsonrpc:ot(n0),id:r0.optional(),error:Ge({code:hn().int(),message:ue(),data:Yn().optional()})}).strict(),MX=e=>h_.safeParse(e).success,t1=Un([F4,U4,d_,h_]);Un([d_,h_]);const yu=Yr.strict(),jX=fi.extend({requestId:r0.optional(),reason:ue().optional()}),p_=di.extend({method:ot("notifications/cancelled"),params:jX}),PX=Ge({src:ue(),mimeType:ue().optional(),sizes:Ke(ue()).optional(),theme:Fo(["light","dark"]).optional()}),zh=Ge({icons:Ke(PX).optional()}),Vu=Ge({name:ue(),title:ue().optional()}),V4=Vu.extend({...Vu.shape,...zh.shape,version:ue(),websiteUrl:ue().optional(),description:ue().optional()}),NX=u_(Ge({applyDefaults:Dn().optional()}),Xn(ue(),Yn())),DX=I4(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,u_(Ge({form:NX.optional(),url:Zr.optional()}),Xn(ue(),Yn()).optional())),$X=Gr({list:Zr.optional(),cancel:Zr.optional(),requests:Gr({sampling:Gr({createMessage:Zr.optional()}).optional(),elicitation:Gr({create:Zr.optional()}).optional()}).optional()}),IX=Gr({list:Zr.optional(),cancel:Zr.optional(),requests:Gr({tools:Gr({call:Zr.optional()}).optional()}).optional()}),zX=Ge({experimental:Xn(ue(),Zr).optional(),sampling:Ge({context:Zr.optional(),tools:Zr.optional()}).optional(),elicitation:DX.optional(),roots:Ge({listChanged:Dn().optional()}).optional(),tasks:$X.optional()}),LX=Uo.extend({protocolVersion:ue(),capabilities:zX,clientInfo:V4}),FX=Wr.extend({method:ot("initialize"),params:LX}),UX=Ge({experimental:Xn(ue(),Zr).optional(),logging:Zr.optional(),completions:Zr.optional(),prompts:Ge({listChanged:Dn().optional()}).optional(),resources:Ge({subscribe:Dn().optional(),listChanged:Dn().optional()}).optional(),tools:Ge({listChanged:Dn().optional()}).optional(),tasks:IX.optional()}),q4=Yr.extend({protocolVersion:ue(),capabilities:UX,serverInfo:V4,instructions:ue().optional()}),B4=di.extend({method:ot("notifications/initialized"),params:fi.optional()}),VX=e=>B4.safeParse(e).success,m_=Wr.extend({method:ot("ping"),params:Uo.optional()}),qX=Ge({progress:hn(),total:or(hn()),message:or(ue())}),BX=Ge({...fi.shape,...qX.shape,progressToken:z4}),g_=di.extend({method:ot("notifications/progress"),params:BX}),HX=Uo.extend({cursor:L4.optional()}),Lh=Wr.extend({params:HX.optional()}),Fh=Yr.extend({nextCursor:L4.optional()}),KX=Fo(["working","input_required","completed","failed","cancelled"]),Uh=Ge({taskId:ue(),status:KX,ttl:Un([hn(),A4()]),createdAt:ue(),lastUpdatedAt:ue(),pollInterval:or(hn()),statusMessage:or(ue())}),ah=Yr.extend({task:Uh}),GX=fi.merge(Uh),sy=di.extend({method:ot("notifications/tasks/status"),params:GX}),y_=Wr.extend({method:ot("tasks/get"),params:Uo.extend({taskId:ue()})}),v_=Yr.merge(Uh),b_=Wr.extend({method:ot("tasks/result"),params:Uo.extend({taskId:ue()})});Yr.loose();const S_=Lh.extend({method:ot("tasks/list")}),w_=Fh.extend({tasks:Ke(Uh)}),x_=Wr.extend({method:ot("tasks/cancel"),params:Uo.extend({taskId:ue()})}),ZX=Yr.merge(Uh),H4=Ge({uri:ue(),mimeType:or(ue()),_meta:Xn(ue(),Yn()).optional()}),K4=H4.extend({text:ue()}),__=ue().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),G4=H4.extend({blob:__}),Vh=Fo(["user","assistant"]),ff=Ge({audience:Ke(Vh).optional(),priority:hn().min(0).max(1).optional(),lastModified:T4({offset:!0}).optional()}),Z4=Ge({...Vu.shape,...zh.shape,uri:ue(),description:or(ue()),mimeType:or(ue()),annotations:ff.optional(),_meta:or(Gr({}))}),WX=Ge({...Vu.shape,...zh.shape,uriTemplate:ue(),description:or(ue()),mimeType:or(ue()),annotations:ff.optional(),_meta:or(Gr({}))}),YX=Lh.extend({method:ot("resources/list")}),W4=Fh.extend({resources:Ke(Z4)}),XX=Lh.extend({method:ot("resources/templates/list")}),Y4=Fh.extend({resourceTemplates:Ke(WX)}),E_=Uo.extend({uri:ue()}),QX=E_,JX=Wr.extend({method:ot("resources/read"),params:QX}),X4=Yr.extend({contents:Ke(Un([K4,G4]))}),Q4=di.extend({method:ot("notifications/resources/list_changed"),params:fi.optional()}),eQ=E_,tQ=Wr.extend({method:ot("resources/subscribe"),params:eQ}),nQ=E_,rQ=Wr.extend({method:ot("resources/unsubscribe"),params:nQ}),oQ=fi.extend({uri:ue()}),iQ=di.extend({method:ot("notifications/resources/updated"),params:oQ}),sQ=Ge({name:ue(),description:or(ue()),required:or(Dn())}),aQ=Ge({...Vu.shape,...zh.shape,description:or(ue()),arguments:or(Ke(sQ)),_meta:or(Gr({}))}),lQ=Lh.extend({method:ot("prompts/list")}),J4=Fh.extend({prompts:Ke(aQ)}),cQ=Uo.extend({name:ue(),arguments:Xn(ue(),ue()).optional()}),uQ=Wr.extend({method:ot("prompts/get"),params:cQ}),C_=Ge({type:ot("text"),text:ue(),annotations:ff.optional(),_meta:Xn(ue(),Yn()).optional()}),T_=Ge({type:ot("image"),data:__,mimeType:ue(),annotations:ff.optional(),_meta:Xn(ue(),Yn()).optional()}),R_=Ge({type:ot("audio"),data:__,mimeType:ue(),annotations:ff.optional(),_meta:Xn(ue(),Yn()).optional()}),fQ=Ge({type:ot("tool_use"),name:ue(),id:ue(),input:Xn(ue(),Yn()),_meta:Xn(ue(),Yn()).optional()}),dQ=Ge({type:ot("resource"),resource:Un([K4,G4]),annotations:ff.optional(),_meta:Xn(ue(),Yn()).optional()}),hQ=Z4.extend({type:ot("resource_link")}),O_=Un([C_,T_,R_,hQ,dQ]),pQ=Ge({role:Vh,content:O_}),eN=Yr.extend({description:ue().optional(),messages:Ke(pQ)}),tN=di.extend({method:ot("notifications/prompts/list_changed"),params:fi.optional()}),mQ=Ge({title:ue().optional(),readOnlyHint:Dn().optional(),destructiveHint:Dn().optional(),idempotentHint:Dn().optional(),openWorldHint:Dn().optional()}),gQ=Ge({taskSupport:Fo(["required","optional","forbidden"]).optional()}),nN=Ge({...Vu.shape,...zh.shape,description:ue().optional(),inputSchema:Ge({type:ot("object"),properties:Xn(ue(),Zr).optional(),required:Ke(ue()).optional()}).catchall(Yn()),outputSchema:Ge({type:ot("object"),properties:Xn(ue(),Zr).optional(),required:Ke(ue()).optional()}).catchall(Yn()).optional(),annotations:mQ.optional(),execution:gQ.optional(),_meta:Xn(ue(),Yn()).optional()}),yQ=Lh.extend({method:ot("tools/list")}),rN=Fh.extend({tools:Ke(nN)}),o0=Yr.extend({content:Ke(O_).default([]),structuredContent:Xn(ue(),Yn()).optional(),isError:Dn().optional()});o0.or(Yr.extend({toolResult:Yn()}));const vQ=Ih.extend({name:ue(),arguments:Xn(ue(),Yn()).optional()}),bQ=Wr.extend({method:ot("tools/call"),params:vQ}),oN=di.extend({method:ot("notifications/tools/list_changed"),params:fi.optional()}),SQ=Ge({autoRefresh:Dn().default(!0),debounceMs:hn().int().nonnegative().default(300)}),iN=Fo(["debug","info","notice","warning","error","critical","alert","emergency"]),wQ=Uo.extend({level:iN}),xQ=Wr.extend({method:ot("logging/setLevel"),params:wQ}),_Q=fi.extend({level:iN,logger:ue().optional(),data:Yn()}),EQ=di.extend({method:ot("notifications/message"),params:_Q}),CQ=Ge({name:ue().optional()}),TQ=Ge({hints:Ke(CQ).optional(),costPriority:hn().min(0).max(1).optional(),speedPriority:hn().min(0).max(1).optional(),intelligencePriority:hn().min(0).max(1).optional()}),RQ=Ge({mode:Fo(["auto","required","none"]).optional()}),OQ=Ge({type:ot("tool_result"),toolUseId:ue().describe("The unique identifier for the corresponding tool call."),content:Ke(O_).default([]),structuredContent:Ge({}).loose().optional(),isError:Dn().optional(),_meta:Xn(ue(),Yn()).optional()}),AQ=j4("type",[C_,T_,R_]),ay=j4("type",[C_,T_,R_,fQ,OQ]),kQ=Ge({role:Vh,content:Un([ay,Ke(ay)]),_meta:Xn(ue(),Yn()).optional()}),MQ=Ih.extend({messages:Ke(kQ),modelPreferences:TQ.optional(),systemPrompt:ue().optional(),includeContext:Fo(["none","thisServer","allServers"]).optional(),temperature:hn().optional(),maxTokens:hn().int(),stopSequences:Ke(ue()).optional(),metadata:Zr.optional(),tools:Ke(nN).optional(),toolChoice:RQ.optional()}),sN=Wr.extend({method:ot("sampling/createMessage"),params:MQ}),aN=Yr.extend({model:ue(),stopReason:or(Fo(["endTurn","stopSequence","maxTokens"]).or(ue())),role:Vh,content:AQ}),jQ=Yr.extend({model:ue(),stopReason:or(Fo(["endTurn","stopSequence","maxTokens","toolUse"]).or(ue())),role:Vh,content:Un([ay,Ke(ay)])}),PQ=Ge({type:ot("boolean"),title:ue().optional(),description:ue().optional(),default:Dn().optional()}),NQ=Ge({type:ot("string"),title:ue().optional(),description:ue().optional(),minLength:hn().optional(),maxLength:hn().optional(),format:Fo(["email","uri","date","date-time"]).optional(),default:ue().optional()}),DQ=Ge({type:Fo(["number","integer"]),title:ue().optional(),description:ue().optional(),minimum:hn().optional(),maximum:hn().optional(),default:hn().optional()}),$Q=Ge({type:ot("string"),title:ue().optional(),description:ue().optional(),enum:Ke(ue()),default:ue().optional()}),IQ=Ge({type:ot("string"),title:ue().optional(),description:ue().optional(),oneOf:Ke(Ge({const:ue(),title:ue()})),default:ue().optional()}),zQ=Ge({type:ot("string"),title:ue().optional(),description:ue().optional(),enum:Ke(ue()),enumNames:Ke(ue()).optional(),default:ue().optional()}),LQ=Un([$Q,IQ]),FQ=Ge({type:ot("array"),title:ue().optional(),description:ue().optional(),minItems:hn().optional(),maxItems:hn().optional(),items:Ge({type:ot("string"),enum:Ke(ue())}),default:Ke(ue()).optional()}),UQ=Ge({type:ot("array"),title:ue().optional(),description:ue().optional(),minItems:hn().optional(),maxItems:hn().optional(),items:Ge({anyOf:Ke(Ge({const:ue(),title:ue()}))}),default:Ke(ue()).optional()}),VQ=Un([FQ,UQ]),qQ=Un([zQ,LQ,VQ]),BQ=Un([qQ,PQ,NQ,DQ]),HQ=Ih.extend({mode:ot("form").optional(),message:ue(),requestedSchema:Ge({type:ot("object"),properties:Xn(ue(),BQ),required:Ke(ue()).optional()})}),KQ=Ih.extend({mode:ot("url"),message:ue(),elicitationId:ue(),url:ue().url()}),GQ=Un([HQ,KQ]),lN=Wr.extend({method:ot("elicitation/create"),params:GQ}),ZQ=fi.extend({elicitationId:ue()}),WQ=di.extend({method:ot("notifications/elicitation/complete"),params:ZQ}),cN=Yr.extend({action:Fo(["accept","decline","cancel"]),content:I4(e=>e===null?void 0:e,Xn(ue(),Un([ue(),hn(),Dn(),Ke(ue())])).optional())}),YQ=Ge({type:ot("ref/resource"),uri:ue()}),XQ=Ge({type:ot("ref/prompt"),name:ue()}),QQ=Uo.extend({ref:Un([XQ,YQ]),argument:Ge({name:ue(),value:ue()}),context:Ge({arguments:Xn(ue(),ue()).optional()}).optional()}),JQ=Wr.extend({method:ot("completion/complete"),params:QQ}),uN=Yr.extend({completion:Gr({values:Ke(ue()).max(100),total:or(hn().int()),hasMore:or(Dn())})}),eJ=Ge({uri:ue().startsWith("file://"),name:ue().optional(),_meta:Xn(ue(),Yn()).optional()}),tJ=Wr.extend({method:ot("roots/list"),params:Uo.optional()}),nJ=Yr.extend({roots:Ke(eJ)}),rJ=di.extend({method:ot("notifications/roots/list_changed"),params:fi.optional()});Un([m_,FX,JQ,xQ,uQ,lQ,YX,XX,JX,tQ,rQ,bQ,yQ,y_,b_,S_,x_]);Un([p_,g_,B4,rJ,sy]);Un([yu,aN,jQ,cN,nJ,v_,w_,ah]);Un([m_,sN,lN,tJ,y_,b_,S_,x_]);Un([p_,g_,EQ,iQ,Q4,oN,tN,sy,WQ]);Un([yu,q4,uN,eN,J4,W4,Y4,X4,o0,rN,v_,w_,ah]);class ht extends Error{constructor(t,n,r){super(`MCP error ${t}: ${n}`),this.code=t,this.data=r,this.name="McpError"}static fromError(t,n,r){if(t===_t.UrlElicitationRequired&&r){const o=r;if(o.elicitations)return new oJ(o.elicitations,n)}return new ht(t,n,r)}}class oJ extends ht{constructor(t,n=`URL elicitation${t.length>1?"s":""} required`){super(_t.UrlElicitationRequired,n,{elicitations:t})}get elicitations(){return this.data?.elicitations??[]}}function Ol(e){return e==="completed"||e==="failed"||e==="cancelled"}new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function SA(e){const n=C4(e)?.method;if(!n)throw new Error("Schema is missing a method literal");const r=cY(n);if(typeof r!="string")throw new Error("Schema method literal must be a string");return r}function wA(e,t){const n=Ra(e,t);if(!n.success)throw n.error;return n.data}const iJ=6e4;class sJ{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(p_,n=>{this._oncancel(n)}),this.setNotificationHandler(g_,n=>{this._onprogress(n)}),this.setRequestHandler(m_,n=>({})),this._taskStore=t?.taskStore,this._taskMessageQueue=t?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(y_,async(n,r)=>{const o=await this._taskStore.getTask(n.params.taskId,r.sessionId);if(!o)throw new ht(_t.InvalidParams,"Failed to retrieve task: Task not found");return{...o}}),this.setRequestHandler(b_,async(n,r)=>{const o=async()=>{const s=n.params.taskId;if(this._taskMessageQueue){let c;for(;c=await this._taskMessageQueue.dequeue(s,r.sessionId);){if(c.type==="response"||c.type==="error"){const u=c.message,d=u.id,h=this._requestResolvers.get(d);if(h)if(this._requestResolvers.delete(d),c.type==="response")h(u);else{const p=u,g=new ht(p.error.code,p.error.message,p.error.data);h(g)}else{const p=c.type==="response"?"Response":"Error";this._onerror(new Error(`${p} handler missing for request ${d}`))}continue}await this._transport?.send(c.message,{relatedRequestId:r.requestId})}}const l=await this._taskStore.getTask(s,r.sessionId);if(!l)throw new ht(_t.InvalidParams,`Task not found: ${s}`);if(!Ol(l.status))return await this._waitForTaskUpdate(s,r.signal),await o();if(Ol(l.status)){const c=await this._taskStore.getTaskResult(s,r.sessionId);return this._clearTaskQueue(s),{...c,_meta:{...c._meta,[$l]:{taskId:s}}}}return await o()};return await o()}),this.setRequestHandler(S_,async(n,r)=>{try{const{tasks:o,nextCursor:s}=await this._taskStore.listTasks(n.params?.cursor,r.sessionId);return{tasks:o,nextCursor:s,_meta:{}}}catch(o){throw new ht(_t.InvalidParams,`Failed to list tasks: ${o instanceof Error?o.message:String(o)}`)}}),this.setRequestHandler(x_,async(n,r)=>{try{const o=await this._taskStore.getTask(n.params.taskId,r.sessionId);if(!o)throw new ht(_t.InvalidParams,`Task not found: ${n.params.taskId}`);if(Ol(o.status))throw new ht(_t.InvalidParams,`Cannot cancel task in terminal status: ${o.status}`);await this._taskStore.updateTaskStatus(n.params.taskId,"cancelled","Client cancelled task execution.",r.sessionId),this._clearTaskQueue(n.params.taskId);const s=await this._taskStore.getTask(n.params.taskId,r.sessionId);if(!s)throw new ht(_t.InvalidParams,`Task not found after cancellation: ${n.params.taskId}`);return{_meta:{},...s}}catch(o){throw o instanceof ht?o:new ht(_t.InvalidRequest,`Failed to cancel task: ${o instanceof Error?o.message:String(o)}`)}}))}async _oncancel(t){if(!t.params.requestId)return;this._requestHandlerAbortControllers.get(t.params.requestId)?.abort(t.params.reason)}_setupTimeout(t,n,r,o,s=!1){this._timeoutInfo.set(t,{timeoutId:setTimeout(o,n),startTime:Date.now(),timeout:n,maxTotalTimeout:r,resetTimeoutOnProgress:s,onTimeout:o})}_resetTimeout(t){const n=this._timeoutInfo.get(t);if(!n)return!1;const r=Date.now()-n.startTime;if(n.maxTotalTimeout&&r>=n.maxTotalTimeout)throw this._timeoutInfo.delete(t),ht.fromError(_t.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:n.maxTotalTimeout,totalElapsed:r});return clearTimeout(n.timeoutId),n.timeoutId=setTimeout(n.onTimeout,n.timeout),!0}_cleanupTimeout(t){const n=this._timeoutInfo.get(t);n&&(clearTimeout(n.timeoutId),this._timeoutInfo.delete(t))}async connect(t){this._transport=t;const n=this.transport?.onclose;this._transport.onclose=()=>{n?.(),this._onclose()};const r=this.transport?.onerror;this._transport.onerror=s=>{r?.(s),this._onerror(s)};const o=this._transport?.onmessage;this._transport.onmessage=(s,l)=>{o?.(s,l),Od(s)||MX(s)?this._onresponse(s):nw(s)?this._onrequest(s,l):kX(s)?this._onnotification(s):this._onerror(new Error(`Unknown message type: ${JSON.stringify(s)}`))},await this._transport.start()}_onclose(){const t=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();const n=ht.fromError(_t.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(const r of t.values())r(n)}_onerror(t){this.onerror?.(t)}_onnotification(t){const n=this._notificationHandlers.get(t.method)??this.fallbackNotificationHandler;n!==void 0&&Promise.resolve().then(()=>n(t)).catch(r=>this._onerror(new Error(`Uncaught error in notification handler: ${r}`)))}_onrequest(t,n){const r=this._requestHandlers.get(t.method)??this.fallbackRequestHandler,o=this._transport,s=t.params?._meta?.[$l]?.taskId;if(r===void 0){const h={jsonrpc:"2.0",id:t.id,error:{code:_t.MethodNotFound,message:"Method not found"}};s&&this._taskMessageQueue?this._enqueueTaskMessage(s,{type:"error",message:h,timestamp:Date.now()},o?.sessionId).catch(p=>this._onerror(new Error(`Failed to enqueue error response: ${p}`))):o?.send(h).catch(p=>this._onerror(new Error(`Failed to send an error response: ${p}`)));return}const l=new AbortController;this._requestHandlerAbortControllers.set(t.id,l);const c=AX(t.params)?t.params.task:void 0,u=this._taskStore?this.requestTaskStore(t,o?.sessionId):void 0,d={signal:l.signal,sessionId:o?.sessionId,_meta:t.params?._meta,sendNotification:async h=>{const p={relatedRequestId:t.id};s&&(p.relatedTask={taskId:s}),await this.notification(h,p)},sendRequest:async(h,p,g)=>{const b={...g,relatedRequestId:t.id};s&&!b.relatedTask&&(b.relatedTask={taskId:s});const y=b.relatedTask?.taskId??s;return y&&u&&await u.updateTaskStatus(y,"input_required"),await this.request(h,p,b)},authInfo:n?.authInfo,requestId:t.id,requestInfo:n?.requestInfo,taskId:s,taskStore:u,taskRequestedTtl:c?.ttl,closeSSEStream:n?.closeSSEStream,closeStandaloneSSEStream:n?.closeStandaloneSSEStream};Promise.resolve().then(()=>{c&&this.assertTaskHandlerCapability(t.method)}).then(()=>r(t,d)).then(async h=>{if(l.signal.aborted)return;const p={result:h,jsonrpc:"2.0",id:t.id};s&&this._taskMessageQueue?await this._enqueueTaskMessage(s,{type:"response",message:p,timestamp:Date.now()},o?.sessionId):await o?.send(p)},async h=>{if(l.signal.aborted)return;const p={jsonrpc:"2.0",id:t.id,error:{code:Number.isSafeInteger(h.code)?h.code:_t.InternalError,message:h.message??"Internal error",...h.data!==void 0&&{data:h.data}}};s&&this._taskMessageQueue?await this._enqueueTaskMessage(s,{type:"error",message:p,timestamp:Date.now()},o?.sessionId):await o?.send(p)}).catch(h=>this._onerror(new Error(`Failed to send response: ${h}`))).finally(()=>{this._requestHandlerAbortControllers.delete(t.id)})}_onprogress(t){const{progressToken:n,...r}=t.params,o=Number(n),s=this._progressHandlers.get(o);if(!s){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(t)}`));return}const l=this._responseHandlers.get(o),c=this._timeoutInfo.get(o);if(c&&l&&c.resetTimeoutOnProgress)try{this._resetTimeout(o)}catch(u){this._responseHandlers.delete(o),this._progressHandlers.delete(o),this._cleanupTimeout(o),l(u);return}s(r)}_onresponse(t){const n=Number(t.id),r=this._requestResolvers.get(n);if(r){if(this._requestResolvers.delete(n),Od(t))r(t);else{const l=new ht(t.error.code,t.error.message,t.error.data);r(l)}return}const o=this._responseHandlers.get(n);if(o===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(t)}`));return}this._responseHandlers.delete(n),this._cleanupTimeout(n);let s=!1;if(Od(t)&&t.result&&typeof t.result=="object"){const l=t.result;if(l.task&&typeof l.task=="object"){const c=l.task;typeof c.taskId=="string"&&(s=!0,this._taskProgressTokens.set(c.taskId,n))}}if(s||this._progressHandlers.delete(n),Od(t))o(t);else{const l=ht.fromError(t.error.code,t.error.message,t.error.data);o(l)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(t,n,r){const{task:o}=r??{};if(!o){try{yield{type:"result",result:await this.request(t,n,r)}}catch(l){yield{type:"error",error:l instanceof ht?l:new ht(_t.InternalError,String(l))}}return}let s;try{const l=await this.request(t,ah,r);if(l.task)s=l.task.taskId,yield{type:"taskCreated",task:l.task};else throw new ht(_t.InternalError,"Task creation did not return a task");for(;;){const c=await this.getTask({taskId:s},r);if(yield{type:"taskStatus",task:c},Ol(c.status)){c.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:s},n,r)}:c.status==="failed"?yield{type:"error",error:new ht(_t.InternalError,`Task ${s} failed`)}:c.status==="cancelled"&&(yield{type:"error",error:new ht(_t.InternalError,`Task ${s} was cancelled`)});return}if(c.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:s},n,r)};return}const u=c.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(d=>setTimeout(d,u)),r?.signal?.throwIfAborted()}}catch(l){yield{type:"error",error:l instanceof ht?l:new ht(_t.InternalError,String(l))}}}request(t,n,r){const{relatedRequestId:o,resumptionToken:s,onresumptiontoken:l,task:c,relatedTask:u}=r??{};return new Promise((d,h)=>{const p=v=>{h(v)};if(!this._transport){p(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method),c&&this.assertTaskCapability(t.method)}catch(v){p(v);return}r?.signal?.throwIfAborted();const g=this._requestMessageId++,b={...t,jsonrpc:"2.0",id:g};r?.onprogress&&(this._progressHandlers.set(g,r.onprogress),b.params={...t.params,_meta:{...t.params?._meta||{},progressToken:g}}),c&&(b.params={...b.params,task:c}),u&&(b.params={...b.params,_meta:{...b.params?._meta||{},[$l]:u}});const y=v=>{this._responseHandlers.delete(g),this._progressHandlers.delete(g),this._cleanupTimeout(g),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:g,reason:String(v)}},{relatedRequestId:o,resumptionToken:s,onresumptiontoken:l}).catch(S=>this._onerror(new Error(`Failed to send cancellation: ${S}`)));const E=v instanceof ht?v:new ht(_t.RequestTimeout,String(v));h(E)};this._responseHandlers.set(g,v=>{if(!r?.signal?.aborted){if(v instanceof Error)return h(v);try{const E=Ra(n,v.result);E.success?d(E.data):h(E.error)}catch(E){h(E)}}}),r?.signal?.addEventListener("abort",()=>{y(r?.signal?.reason)});const _=r?.timeout??iJ,w=()=>y(ht.fromError(_t.RequestTimeout,"Request timed out",{timeout:_}));this._setupTimeout(g,_,r?.maxTotalTimeout,w,r?.resetTimeoutOnProgress??!1);const T=u?.taskId;if(T){const v=E=>{const S=this._responseHandlers.get(g);S?S(E):this._onerror(new Error(`Response handler missing for side-channeled request ${g}`))};this._requestResolvers.set(g,v),this._enqueueTaskMessage(T,{type:"request",message:b,timestamp:Date.now()}).catch(E=>{this._cleanupTimeout(g),h(E)})}else this._transport.send(b,{relatedRequestId:o,resumptionToken:s,onresumptiontoken:l}).catch(v=>{this._cleanupTimeout(g),h(v)})})}async getTask(t,n){return this.request({method:"tasks/get",params:t},v_,n)}async getTaskResult(t,n,r){return this.request({method:"tasks/result",params:t},n,r)}async listTasks(t,n){return this.request({method:"tasks/list",params:t},w_,n)}async cancelTask(t,n){return this.request({method:"tasks/cancel",params:t},ZX,n)}async notification(t,n){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(t.method);const r=n?.relatedTask?.taskId;if(r){const c={...t,jsonrpc:"2.0",params:{...t.params,_meta:{...t.params?._meta||{},[$l]:n.relatedTask}}};await this._enqueueTaskMessage(r,{type:"notification",message:c,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&!n?.relatedRequestId&&!n?.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 c={...t,jsonrpc:"2.0"};n?.relatedTask&&(c={...c,params:{...c.params,_meta:{...c.params?._meta||{},[$l]:n.relatedTask}}}),this._transport?.send(c,n).catch(u=>this._onerror(u))});return}let l={...t,jsonrpc:"2.0"};n?.relatedTask&&(l={...l,params:{...l.params,_meta:{...l.params?._meta||{},[$l]:n.relatedTask}}}),await this._transport.send(l,n)}setRequestHandler(t,n){const r=SA(t);this.assertRequestHandlerCapability(r),this._requestHandlers.set(r,(o,s)=>{const l=wA(t,o);return Promise.resolve(n(l,s))})}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,n){const r=SA(t);this._notificationHandlers.set(r,o=>{const s=wA(t,o);return Promise.resolve(n(s))})}removeNotificationHandler(t){this._notificationHandlers.delete(t)}_cleanupTaskProgressHandler(t){const n=this._taskProgressTokens.get(t);n!==void 0&&(this._progressHandlers.delete(n),this._taskProgressTokens.delete(t))}async _enqueueTaskMessage(t,n,r){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");const o=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(t,n,r,o)}async _clearTaskQueue(t,n){if(this._taskMessageQueue){const r=await this._taskMessageQueue.dequeueAll(t,n);for(const o of r)if(o.type==="request"&&nw(o.message)){const s=o.message.id,l=this._requestResolvers.get(s);l?(l(new ht(_t.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(s)):this._onerror(new Error(`Resolver missing for request ${s} during task ${t} cleanup`))}}}async _waitForTaskUpdate(t,n){let r=this._options?.defaultTaskPollInterval??1e3;try{const o=await this._taskStore?.getTask(t);o?.pollInterval&&(r=o.pollInterval)}catch{}return new Promise((o,s)=>{if(n.aborted){s(new ht(_t.InvalidRequest,"Request cancelled"));return}const l=setTimeout(o,r);n.addEventListener("abort",()=>{clearTimeout(l),s(new ht(_t.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(t,n){const r=this._taskStore;if(!r)throw new Error("No task store configured");return{createTask:async o=>{if(!t)throw new Error("No request provided");return await r.createTask(o,t.id,{method:t.method,params:t.params},n)},getTask:async o=>{const s=await r.getTask(o,n);if(!s)throw new ht(_t.InvalidParams,"Failed to retrieve task: Task not found");return s},storeTaskResult:async(o,s,l)=>{await r.storeTaskResult(o,s,l,n);const c=await r.getTask(o,n);if(c){const u=sy.parse({method:"notifications/tasks/status",params:c});await this.notification(u),Ol(c.status)&&this._cleanupTaskProgressHandler(o)}},getTaskResult:o=>r.getTaskResult(o,n),updateTaskStatus:async(o,s,l)=>{const c=await r.getTask(o,n);if(!c)throw new ht(_t.InvalidParams,`Task "${o}" not found - it may have been cleaned up`);if(Ol(c.status))throw new ht(_t.InvalidParams,`Cannot update task "${o}" from terminal status "${c.status}" to "${s}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await r.updateTaskStatus(o,s,l,n);const u=await r.getTask(o,n);if(u){const d=sy.parse({method:"notifications/tasks/status",params:u});await this.notification(d),Ol(u.status)&&this._cleanupTaskProgressHandler(o)}},listTasks:o=>r.listTasks(o,n)}}}function xA(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function aJ(e,t){const n={...e};for(const r in t){const o=r,s=t[o];if(s===void 0)continue;const l=n[o];xA(l)&&xA(s)?n[o]={...l,...s}:n[o]=s}return n}var Sm={exports:{}},n1={},Os={},Al={},r1={},o1={},i1={},_A;function ly(){return _A||(_A=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 n extends t{constructor(v){if(super(),!e.IDENTIFIER.test(v))throw new Error("CodeGen: name must be a valid identifier");this.str=v}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=n;class r extends t{constructor(v){super(),this._items=typeof v=="string"?[v]:v}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const v=this._items[0];return v===""||v==='""'}get str(){var v;return(v=this._str)!==null&&v!==void 0?v:this._str=this._items.reduce((E,S)=>`${E}${S}`,"")}get names(){var v;return(v=this._names)!==null&&v!==void 0?v:this._names=this._items.reduce((E,S)=>(S instanceof n&&(E[S.str]=(E[S.str]||0)+1),E),{})}}e._Code=r,e.nil=new r("");function o(T,...v){const E=[T[0]];let S=0;for(;S<v.length;)c(E,v[S]),E.push(T[++S]);return new r(E)}e._=o;const s=new r("+");function l(T,...v){const E=[b(T[0])];let S=0;for(;S<v.length;)E.push(s),c(E,v[S]),E.push(s,b(T[++S]));return u(E),new r(E)}e.str=l;function c(T,v){v instanceof r?T.push(...v._items):v instanceof n?T.push(v):T.push(p(v))}e.addCodeArg=c;function u(T){let v=1;for(;v<T.length-1;){if(T[v]===s){const E=d(T[v-1],T[v+1]);if(E!==void 0){T.splice(v-1,3,E);continue}T[v++]="+"}v++}}function d(T,v){if(v==='""')return T;if(T==='""')return v;if(typeof T=="string")return v instanceof n||T[T.length-1]!=='"'?void 0:typeof v!="string"?`${T.slice(0,-1)}${v}"`:v[0]==='"'?T.slice(0,-1)+v.slice(1):void 0;if(typeof v=="string"&&v[0]==='"'&&!(T instanceof n))return`"${T}${v.slice(1)}`}function h(T,v){return v.emptyStr()?T:T.emptyStr()?v:l`${T}${v}`}e.strConcat=h;function p(T){return typeof T=="number"||typeof T=="boolean"||T===null?T:b(Array.isArray(T)?T.join(","):T)}function g(T){return new r(b(T))}e.stringify=g;function b(T){return JSON.stringify(T).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=b;function y(T){return typeof T=="string"&&e.IDENTIFIER.test(T)?new r(`.${T}`):o`[${T}]`}e.getProperty=y;function _(T){if(typeof T=="string"&&e.IDENTIFIER.test(T))return new r(`${T}`);throw new Error(`CodeGen: invalid export name: ${T}, use explicit $id name mapping`)}e.getEsmExportName=_;function w(T){return new r(T.toString())}e.regexpCode=w})(i1)),i1}var s1={},EA;function CA(){return EA||(EA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=ly();class n extends Error{constructor(d){super(`CodeGen: "code" for ${d} not defined`),this.value=d.value}}var r;(function(u){u[u.Started=0]="Started",u[u.Completed=1]="Completed"})(r||(e.UsedValueState=r={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class o{constructor({prefixes:d,parent:h}={}){this._names={},this._prefixes=d,this._parent=h}toName(d){return d instanceof t.Name?d:this.name(d)}name(d){return new t.Name(this._newName(d))}_newName(d){const h=this._names[d]||this._nameGroup(d);return`${d}${h.index++}`}_nameGroup(d){var h,p;if(!((p=(h=this._parent)===null||h===void 0?void 0:h._prefixes)===null||p===void 0)&&p.has(d)||this._prefixes&&!this._prefixes.has(d))throw new Error(`CodeGen: prefix "${d}" is not allowed in this scope`);return this._names[d]={prefix:d,index:0}}}e.Scope=o;class s extends t.Name{constructor(d,h){super(h),this.prefix=d}setValue(d,{property:h,itemIndex:p}){this.value=d,this.scopePath=(0,t._)`.${new t.Name(h)}[${p}]`}}e.ValueScopeName=s;const l=(0,t._)`\n`;class c extends o{constructor(d){super(d),this._values={},this._scope=d.scope,this.opts={...d,_n:d.lines?l:t.nil}}get(){return this._scope}name(d){return new s(d,this._newName(d))}value(d,h){var p;if(h.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const g=this.toName(d),{prefix:b}=g,y=(p=h.key)!==null&&p!==void 0?p:h.ref;let _=this._values[b];if(_){const v=_.get(y);if(v)return v}else _=this._values[b]=new Map;_.set(y,g);const w=this._scope[b]||(this._scope[b]=[]),T=w.length;return w[T]=h.ref,g.setValue(h,{property:b,itemIndex:T}),g}getValue(d,h){const p=this._values[d];if(p)return p.get(h)}scopeRefs(d,h=this._values){return this._reduceValues(h,p=>{if(p.scopePath===void 0)throw new Error(`CodeGen: name "${p}" has no value`);return(0,t._)`${d}${p.scopePath}`})}scopeCode(d=this._values,h,p){return this._reduceValues(d,g=>{if(g.value===void 0)throw new Error(`CodeGen: name "${g}" has no value`);return g.value.code},h,p)}_reduceValues(d,h,p={},g){let b=t.nil;for(const y in d){const _=d[y];if(!_)continue;const w=p[y]=p[y]||new Map;_.forEach(T=>{if(w.has(T))return;w.set(T,r.Started);let v=h(T);if(v){const E=this.opts.es5?e.varKinds.var:e.varKinds.const;b=(0,t._)`${b}${E} ${T} = ${v};${this.opts._n}`}else if(v=g?.(T))b=(0,t._)`${b}${v}${this.opts._n}`;else throw new n(T);w.set(T,r.Completed)})}return b}}e.ValueScope=c})(s1)),s1}var TA;function Ot(){return TA||(TA=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=ly(),n=CA();var r=ly();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}});var o=CA();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return o.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 s{optimizeNodes(){return this}optimizeNames(D,B){return this}}class l extends s{constructor(D,B,te){super(),this.varKind=D,this.name=B,this.rhs=te}render({es5:D,_n:B}){const te=D?n.varKinds.var:this.varKind,re=this.rhs===void 0?"":` = ${this.rhs}`;return`${te} ${this.name}${re};`+B}optimizeNames(D,B){if(D[this.name.str])return this.rhs&&(this.rhs=ee(this.rhs,D,B)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class c extends s{constructor(D,B,te){super(),this.lhs=D,this.rhs=B,this.sideEffects=te}render({_n:D}){return`${this.lhs} = ${this.rhs};`+D}optimizeNames(D,B){if(!(this.lhs instanceof t.Name&&!D[this.lhs.str]&&!this.sideEffects))return this.rhs=ee(this.rhs,D,B),this}get names(){const D=this.lhs instanceof t.Name?{}:{...this.lhs.names};return G(D,this.rhs)}}class u extends c{constructor(D,B,te,re){super(D,te,re),this.op=B}render({_n:D}){return`${this.lhs} ${this.op}= ${this.rhs};`+D}}class d extends s{constructor(D){super(),this.label=D,this.names={}}render({_n:D}){return`${this.label}:`+D}}class h extends s{constructor(D){super(),this.label=D,this.names={}}render({_n:D}){return`break${this.label?` ${this.label}`:""};`+D}}class p extends s{constructor(D){super(),this.error=D}render({_n:D}){return`throw ${this.error};`+D}get names(){return this.error.names}}class g extends s{constructor(D){super(),this.code=D}render({_n:D}){return`${this.code};`+D}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(D,B){return this.code=ee(this.code,D,B),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class b extends s{constructor(D=[]){super(),this.nodes=D}render(D){return this.nodes.reduce((B,te)=>B+te.render(D),"")}optimizeNodes(){const{nodes:D}=this;let B=D.length;for(;B--;){const te=D[B].optimizeNodes();Array.isArray(te)?D.splice(B,1,...te):te?D[B]=te:D.splice(B,1)}return D.length>0?this:void 0}optimizeNames(D,B){const{nodes:te}=this;let re=te.length;for(;re--;){const le=te[re];le.optimizeNames(D,B)||(J(D,le.names),te.splice(re,1))}return te.length>0?this:void 0}get names(){return this.nodes.reduce((D,B)=>q(D,B.names),{})}}class y extends b{render(D){return"{"+D._n+super.render(D)+"}"+D._n}}class _ extends b{}class w extends y{}w.kind="else";class T extends y{constructor(D,B){super(B),this.condition=D}render(D){let B=`if(${this.condition})`+super.render(D);return this.else&&(B+="else "+this.else.render(D)),B}optimizeNodes(){super.optimizeNodes();const D=this.condition;if(D===!0)return this.nodes;let B=this.else;if(B){const te=B.optimizeNodes();B=this.else=Array.isArray(te)?new w(te):te}if(B)return D===!1?B instanceof T?B:B.nodes:this.nodes.length?this:new T(Z(D),B instanceof T?[B]:B.nodes);if(!(D===!1||!this.nodes.length))return this}optimizeNames(D,B){var te;if(this.else=(te=this.else)===null||te===void 0?void 0:te.optimizeNames(D,B),!!(super.optimizeNames(D,B)||this.else))return this.condition=ee(this.condition,D,B),this}get names(){const D=super.names;return G(D,this.condition),this.else&&q(D,this.else.names),D}}T.kind="if";class v extends y{}v.kind="for";class E extends v{constructor(D){super(),this.iteration=D}render(D){return`for(${this.iteration})`+super.render(D)}optimizeNames(D,B){if(super.optimizeNames(D,B))return this.iteration=ee(this.iteration,D,B),this}get names(){return q(super.names,this.iteration.names)}}class S extends v{constructor(D,B,te,re){super(),this.varKind=D,this.name=B,this.from=te,this.to=re}render(D){const B=D.es5?n.varKinds.var:this.varKind,{name:te,from:re,to:le}=this;return`for(${B} ${te}=${re}; ${te}<${le}; ${te}++)`+super.render(D)}get names(){const D=G(super.names,this.from);return G(D,this.to)}}class C extends v{constructor(D,B,te,re){super(),this.loop=D,this.varKind=B,this.name=te,this.iterable=re}render(D){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(D)}optimizeNames(D,B){if(super.optimizeNames(D,B))return this.iterable=ee(this.iterable,D,B),this}get names(){return q(super.names,this.iterable.names)}}class x extends y{constructor(D,B,te){super(),this.name=D,this.args=B,this.async=te}render(D){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(D)}}x.kind="func";class O extends b{render(D){return"return "+super.render(D)}}O.kind="return";class M extends y{render(D){let B="try"+super.render(D);return this.catch&&(B+=this.catch.render(D)),this.finally&&(B+=this.finally.render(D)),B}optimizeNodes(){var D,B;return super.optimizeNodes(),(D=this.catch)===null||D===void 0||D.optimizeNodes(),(B=this.finally)===null||B===void 0||B.optimizeNodes(),this}optimizeNames(D,B){var te,re;return super.optimizeNames(D,B),(te=this.catch)===null||te===void 0||te.optimizeNames(D,B),(re=this.finally)===null||re===void 0||re.optimizeNames(D,B),this}get names(){const D=super.names;return this.catch&&q(D,this.catch.names),this.finally&&q(D,this.finally.names),D}}class P extends y{constructor(D){super(),this.error=D}render(D){return`catch(${this.error})`+super.render(D)}}P.kind="catch";class z extends y{render(D){return"finally"+super.render(D)}}z.kind="finally";class I{constructor(D,B={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...B,_n:B.lines?`
49
- `:""},this._extScope=D,this._scope=new n.Scope({parent:D}),this._nodes=[new _]}toString(){return this._root.render(this.opts)}name(D){return this._scope.name(D)}scopeName(D){return this._extScope.name(D)}scopeValue(D,B){const te=this._extScope.value(D,B);return(this._values[te.prefix]||(this._values[te.prefix]=new Set)).add(te),te}getScopeValue(D,B){return this._extScope.getValue(D,B)}scopeRefs(D){return this._extScope.scopeRefs(D,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(D,B,te,re){const le=this._scope.toName(B);return te!==void 0&&re&&(this._constants[le.str]=te),this._leafNode(new l(D,le,te)),le}const(D,B,te){return this._def(n.varKinds.const,D,B,te)}let(D,B,te){return this._def(n.varKinds.let,D,B,te)}var(D,B,te){return this._def(n.varKinds.var,D,B,te)}assign(D,B,te){return this._leafNode(new c(D,B,te))}add(D,B){return this._leafNode(new u(D,e.operators.ADD,B))}code(D){return typeof D=="function"?D():D!==t.nil&&this._leafNode(new g(D)),this}object(...D){const B=["{"];for(const[te,re]of D)B.length>1&&B.push(","),B.push(te),(te!==re||this.opts.es5)&&(B.push(":"),(0,t.addCodeArg)(B,re));return B.push("}"),new t._Code(B)}if(D,B,te){if(this._blockNode(new T(D)),B&&te)this.code(B).else().code(te).endIf();else if(B)this.code(B).endIf();else if(te)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(D){return this._elseNode(new T(D))}else(){return this._elseNode(new w)}endIf(){return this._endBlockNode(T,w)}_for(D,B){return this._blockNode(D),B&&this.code(B).endFor(),this}for(D,B){return this._for(new E(D),B)}forRange(D,B,te,re,le=this.opts.es5?n.varKinds.var:n.varKinds.let){const ge=this._scope.toName(D);return this._for(new S(le,ge,B,te),()=>re(ge))}forOf(D,B,te,re=n.varKinds.const){const le=this._scope.toName(D);if(this.opts.es5){const ge=B instanceof t.Name?B:this.var("_arr",B);return this.forRange("_i",0,(0,t._)`${ge}.length`,Me=>{this.var(le,(0,t._)`${ge}[${Me}]`),te(le)})}return this._for(new C("of",re,le,B),()=>te(le))}forIn(D,B,te,re=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(D,(0,t._)`Object.keys(${B})`,te);const le=this._scope.toName(D);return this._for(new C("in",re,le,B),()=>te(le))}endFor(){return this._endBlockNode(v)}label(D){return this._leafNode(new d(D))}break(D){return this._leafNode(new h(D))}return(D){const B=new O;if(this._blockNode(B),this.code(D),B.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(O)}try(D,B,te){if(!B&&!te)throw new Error('CodeGen: "try" without "catch" and "finally"');const re=new M;if(this._blockNode(re),this.code(D),B){const le=this.name("e");this._currNode=re.catch=new P(le),B(le)}return te&&(this._currNode=re.finally=new z,this.code(te)),this._endBlockNode(P,z)}throw(D){return this._leafNode(new p(D))}block(D,B){return this._blockStarts.push(this._nodes.length),D&&this.code(D).endBlock(B),this}endBlock(D){const B=this._blockStarts.pop();if(B===void 0)throw new Error("CodeGen: not in self-balancing block");const te=this._nodes.length-B;if(te<0||D!==void 0&&te!==D)throw new Error(`CodeGen: wrong number of nodes: ${te} vs ${D} expected`);return this._nodes.length=B,this}func(D,B=t.nil,te,re){return this._blockNode(new x(D,B,te)),re&&this.code(re).endFunc(),this}endFunc(){return this._endBlockNode(x)}optimize(D=1){for(;D-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(D){return this._currNode.nodes.push(D),this}_blockNode(D){this._currNode.nodes.push(D),this._nodes.push(D)}_endBlockNode(D,B){const te=this._currNode;if(te instanceof D||B&&te instanceof B)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${B?`${D.kind}/${B.kind}`:D.kind}"`)}_elseNode(D){const B=this._currNode;if(!(B instanceof T))throw new Error('CodeGen: "else" without "if"');return this._currNode=B.else=D,this}get _root(){return this._nodes[0]}get _currNode(){const D=this._nodes;return D[D.length-1]}set _currNode(D){const B=this._nodes;B[B.length-1]=D}}e.CodeGen=I;function q(U,D){for(const B in D)U[B]=(U[B]||0)+(D[B]||0);return U}function G(U,D){return D instanceof t._CodeOrName?q(U,D.names):U}function ee(U,D,B){if(U instanceof t.Name)return te(U);if(!re(U))return U;return new t._Code(U._items.reduce((le,ge)=>(ge instanceof t.Name&&(ge=te(ge)),ge instanceof t._Code?le.push(...ge._items):le.push(ge),le),[]));function te(le){const ge=B[le.str];return ge===void 0||D[le.str]!==1?le:(delete D[le.str],ge)}function re(le){return le instanceof t._Code&&le._items.some(ge=>ge instanceof t.Name&&D[ge.str]===1&&B[ge.str]!==void 0)}}function J(U,D){for(const B in D)U[B]=(U[B]||0)-(D[B]||0)}function Z(U){return typeof U=="boolean"||typeof U=="number"||U===null?!U:(0,t._)`!${V(U)}`}e.not=Z;const H=$(e.operators.AND);function Y(...U){return U.reduce(H)}e.and=Y;const oe=$(e.operators.OR);function ne(...U){return U.reduce(oe)}e.or=ne;function $(U){return(D,B)=>D===t.nil?B:B===t.nil?D:(0,t._)`${V(D)} ${U} ${V(B)}`}function V(U){return U instanceof t.Name?U:(0,t._)`(${U})`}})(o1)),o1}var At={},RA;function rn(){if(RA)return At;RA=1,Object.defineProperty(At,"__esModule",{value:!0}),At.checkStrictMode=At.getErrorPath=At.Type=At.useFunc=At.setEvaluated=At.evaluatedPropsToName=At.mergeEvaluated=At.eachItem=At.unescapeJsonPointer=At.escapeJsonPointer=At.escapeFragment=At.unescapeFragment=At.schemaRefOrVal=At.schemaHasRulesButRef=At.schemaHasRules=At.checkUnknownRules=At.alwaysValidSchema=At.toHash=void 0;const e=Ot(),t=ly();function n(C){const x={};for(const O of C)x[O]=!0;return x}At.toHash=n;function r(C,x){return typeof x=="boolean"?x:Object.keys(x).length===0?!0:(o(C,x),!s(x,C.self.RULES.all))}At.alwaysValidSchema=r;function o(C,x=C.schema){const{opts:O,self:M}=C;if(!O.strictSchema||typeof x=="boolean")return;const P=M.RULES.keywords;for(const z in x)P[z]||S(C,`unknown keyword: "${z}"`)}At.checkUnknownRules=o;function s(C,x){if(typeof C=="boolean")return!C;for(const O in C)if(x[O])return!0;return!1}At.schemaHasRules=s;function l(C,x){if(typeof C=="boolean")return!C;for(const O in C)if(O!=="$ref"&&x.all[O])return!0;return!1}At.schemaHasRulesButRef=l;function c({topSchemaRef:C,schemaPath:x},O,M,P){if(!P){if(typeof O=="number"||typeof O=="boolean")return O;if(typeof O=="string")return(0,e._)`${O}`}return(0,e._)`${C}${x}${(0,e.getProperty)(M)}`}At.schemaRefOrVal=c;function u(C){return p(decodeURIComponent(C))}At.unescapeFragment=u;function d(C){return encodeURIComponent(h(C))}At.escapeFragment=d;function h(C){return typeof C=="number"?`${C}`:C.replace(/~/g,"~0").replace(/\//g,"~1")}At.escapeJsonPointer=h;function p(C){return C.replace(/~1/g,"/").replace(/~0/g,"~")}At.unescapeJsonPointer=p;function g(C,x){if(Array.isArray(C))for(const O of C)x(O);else x(C)}At.eachItem=g;function b({mergeNames:C,mergeToName:x,mergeValues:O,resultToName:M}){return(P,z,I,q)=>{const G=I===void 0?z:I instanceof e.Name?(z instanceof e.Name?C(P,z,I):x(P,z,I),I):z instanceof e.Name?(x(P,I,z),z):O(z,I);return q===e.Name&&!(G instanceof e.Name)?M(P,G):G}}At.mergeEvaluated={props:b({mergeNames:(C,x,O)=>C.if((0,e._)`${O} !== true && ${x} !== undefined`,()=>{C.if((0,e._)`${x} === true`,()=>C.assign(O,!0),()=>C.assign(O,(0,e._)`${O} || {}`).code((0,e._)`Object.assign(${O}, ${x})`))}),mergeToName:(C,x,O)=>C.if((0,e._)`${O} !== true`,()=>{x===!0?C.assign(O,!0):(C.assign(O,(0,e._)`${O} || {}`),_(C,O,x))}),mergeValues:(C,x)=>C===!0?!0:{...C,...x},resultToName:y}),items:b({mergeNames:(C,x,O)=>C.if((0,e._)`${O} !== true && ${x} !== undefined`,()=>C.assign(O,(0,e._)`${x} === true ? true : ${O} > ${x} ? ${O} : ${x}`)),mergeToName:(C,x,O)=>C.if((0,e._)`${O} !== true`,()=>C.assign(O,x===!0?!0:(0,e._)`${O} > ${x} ? ${O} : ${x}`)),mergeValues:(C,x)=>C===!0?!0:Math.max(C,x),resultToName:(C,x)=>C.var("items",x)})};function y(C,x){if(x===!0)return C.var("props",!0);const O=C.var("props",(0,e._)`{}`);return x!==void 0&&_(C,O,x),O}At.evaluatedPropsToName=y;function _(C,x,O){Object.keys(O).forEach(M=>C.assign((0,e._)`${x}${(0,e.getProperty)(M)}`,!0))}At.setEvaluated=_;const w={};function T(C,x){return C.scopeValue("func",{ref:x,code:w[x.code]||(w[x.code]=new t._Code(x.code))})}At.useFunc=T;var v;(function(C){C[C.Num=0]="Num",C[C.Str=1]="Str"})(v||(At.Type=v={}));function E(C,x,O){if(C instanceof e.Name){const M=x===v.Num;return O?M?(0,e._)`"[" + ${C} + "]"`:(0,e._)`"['" + ${C} + "']"`:M?(0,e._)`"/" + ${C}`:(0,e._)`"/" + ${C}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return O?(0,e.getProperty)(C).toString():"/"+h(C)}At.getErrorPath=E;function S(C,x,O=C.opts.strictSchema){if(O){if(x=`strict mode: ${x}`,O===!0)throw new Error(x);C.self.logger.warn(x)}}return At.checkStrictMode=S,At}var wm={},OA;function tl(){if(OA)return wm;OA=1,Object.defineProperty(wm,"__esModule",{value:!0});const e=Ot(),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 wm.default=t,wm}var AA;function i0(){return AA||(AA=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=Ot(),n=rn(),r=tl();e.keywordError={message:({keyword:w})=>(0,t.str)`must pass "${w}" keyword validation`},e.keyword$DataError={message:({keyword:w,schemaType:T})=>T?(0,t.str)`"${w}" keyword must be ${T} ($data)`:(0,t.str)`"${w}" keyword is invalid ($data)`};function o(w,T=e.keywordError,v,E){const{it:S}=w,{gen:C,compositeRule:x,allErrors:O}=S,M=p(w,T,v);E??(x||O)?u(C,M):d(S,(0,t._)`[${M}]`)}e.reportError=o;function s(w,T=e.keywordError,v){const{it:E}=w,{gen:S,compositeRule:C,allErrors:x}=E,O=p(w,T,v);u(S,O),C||x||d(E,r.default.vErrors)}e.reportExtraError=s;function l(w,T){w.assign(r.default.errors,T),w.if((0,t._)`${r.default.vErrors} !== null`,()=>w.if(T,()=>w.assign((0,t._)`${r.default.vErrors}.length`,T),()=>w.assign(r.default.vErrors,null)))}e.resetErrorsCount=l;function c({gen:w,keyword:T,schemaValue:v,data:E,errsCount:S,it:C}){if(S===void 0)throw new Error("ajv implementation error");const x=w.name("err");w.forRange("i",S,r.default.errors,O=>{w.const(x,(0,t._)`${r.default.vErrors}[${O}]`),w.if((0,t._)`${x}.instancePath === undefined`,()=>w.assign((0,t._)`${x}.instancePath`,(0,t.strConcat)(r.default.instancePath,C.errorPath))),w.assign((0,t._)`${x}.schemaPath`,(0,t.str)`${C.errSchemaPath}/${T}`),C.opts.verbose&&(w.assign((0,t._)`${x}.schema`,v),w.assign((0,t._)`${x}.data`,E))})}e.extendErrors=c;function u(w,T){const v=w.const("err",T);w.if((0,t._)`${r.default.vErrors} === null`,()=>w.assign(r.default.vErrors,(0,t._)`[${v}]`),(0,t._)`${r.default.vErrors}.push(${v})`),w.code((0,t._)`${r.default.errors}++`)}function d(w,T){const{gen:v,validateName:E,schemaEnv:S}=w;S.$async?v.throw((0,t._)`new ${w.ValidationError}(${T})`):(v.assign((0,t._)`${E}.errors`,T),v.return(!1))}const h={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 p(w,T,v){const{createErrors:E}=w.it;return E===!1?(0,t._)`{}`:g(w,T,v)}function g(w,T,v={}){const{gen:E,it:S}=w,C=[b(S,v),y(w,v)];return _(w,T,C),E.object(...C)}function b({errorPath:w},{instancePath:T}){const v=T?(0,t.str)`${w}${(0,n.getErrorPath)(T,n.Type.Str)}`:w;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,v)]}function y({keyword:w,it:{errSchemaPath:T}},{schemaPath:v,parentSchema:E}){let S=E?T:(0,t.str)`${T}/${w}`;return v&&(S=(0,t.str)`${S}${(0,n.getErrorPath)(v,n.Type.Str)}`),[h.schemaPath,S]}function _(w,{params:T,message:v},E){const{keyword:S,data:C,schemaValue:x,it:O}=w,{opts:M,propertyName:P,topSchemaRef:z,schemaPath:I}=O;E.push([h.keyword,S],[h.params,typeof T=="function"?T(w):T||(0,t._)`{}`]),M.messages&&E.push([h.message,typeof v=="function"?v(w):v]),M.verbose&&E.push([h.schema,x],[h.parentSchema,(0,t._)`${z}${I}`],[r.default.data,C]),P&&E.push([h.propertyName,P])}})(r1)),r1}var kA;function lJ(){if(kA)return Al;kA=1,Object.defineProperty(Al,"__esModule",{value:!0}),Al.boolOrEmptySchema=Al.topBoolOrEmptySchema=void 0;const e=i0(),t=Ot(),n=tl(),r={message:"boolean schema is false"};function o(c){const{gen:u,schema:d,validateName:h}=c;d===!1?l(c,!1):typeof d=="object"&&d.$async===!0?u.return(n.default.data):(u.assign((0,t._)`${h}.errors`,null),u.return(!0))}Al.topBoolOrEmptySchema=o;function s(c,u){const{gen:d,schema:h}=c;h===!1?(d.var(u,!1),l(c)):d.var(u,!0)}Al.boolOrEmptySchema=s;function l(c,u){const{gen:d,data:h}=c,p={gen:d,keyword:"false schema",data:h,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:c};(0,e.reportError)(p,r,void 0,u)}return Al}var Ur={},kl={},MA;function fN(){if(MA)return kl;MA=1,Object.defineProperty(kl,"__esModule",{value:!0}),kl.getRules=kl.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function n(o){return typeof o=="string"&&t.has(o)}kl.isJSONType=n;function r(){const o={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...o,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},o.number,o.string,o.array,o.object],post:{rules:[]},all:{},keywords:{}}}return kl.getRules=r,kl}var As={},jA;function dN(){if(jA)return As;jA=1,Object.defineProperty(As,"__esModule",{value:!0}),As.shouldUseRule=As.shouldUseGroup=As.schemaHasRulesForType=void 0;function e({schema:r,self:o},s){const l=o.RULES.types[s];return l&&l!==!0&&t(r,l)}As.schemaHasRulesForType=e;function t(r,o){return o.rules.some(s=>n(r,s))}As.shouldUseGroup=t;function n(r,o){var s;return r[o.keyword]!==void 0||((s=o.definition.implements)===null||s===void 0?void 0:s.some(l=>r[l]!==void 0))}return As.shouldUseRule=n,As}var PA;function cy(){if(PA)return Ur;PA=1,Object.defineProperty(Ur,"__esModule",{value:!0}),Ur.reportTypeError=Ur.checkDataTypes=Ur.checkDataType=Ur.coerceAndCheckDataType=Ur.getJSONTypes=Ur.getSchemaTypes=Ur.DataType=void 0;const e=fN(),t=dN(),n=i0(),r=Ot(),o=rn();var s;(function(v){v[v.Correct=0]="Correct",v[v.Wrong=1]="Wrong"})(s||(Ur.DataType=s={}));function l(v){const E=c(v.type);if(E.includes("null")){if(v.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!E.length&&v.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');v.nullable===!0&&E.push("null")}return E}Ur.getSchemaTypes=l;function c(v){const E=Array.isArray(v)?v:v?[v]:[];if(E.every(e.isJSONType))return E;throw new Error("type must be JSONType or JSONType[]: "+E.join(","))}Ur.getJSONTypes=c;function u(v,E){const{gen:S,data:C,opts:x}=v,O=h(E,x.coerceTypes),M=E.length>0&&!(O.length===0&&E.length===1&&(0,t.schemaHasRulesForType)(v,E[0]));if(M){const P=y(E,C,x.strictNumbers,s.Wrong);S.if(P,()=>{O.length?p(v,E,O):w(v)})}return M}Ur.coerceAndCheckDataType=u;const d=new Set(["string","number","integer","boolean","null"]);function h(v,E){return E?v.filter(S=>d.has(S)||E==="array"&&S==="array"):[]}function p(v,E,S){const{gen:C,data:x,opts:O}=v,M=C.let("dataType",(0,r._)`typeof ${x}`),P=C.let("coerced",(0,r._)`undefined`);O.coerceTypes==="array"&&C.if((0,r._)`${M} == 'object' && Array.isArray(${x}) && ${x}.length == 1`,()=>C.assign(x,(0,r._)`${x}[0]`).assign(M,(0,r._)`typeof ${x}`).if(y(E,x,O.strictNumbers),()=>C.assign(P,x))),C.if((0,r._)`${P} !== undefined`);for(const I of S)(d.has(I)||I==="array"&&O.coerceTypes==="array")&&z(I);C.else(),w(v),C.endIf(),C.if((0,r._)`${P} !== undefined`,()=>{C.assign(x,P),g(v,P)});function z(I){switch(I){case"string":C.elseIf((0,r._)`${M} == "number" || ${M} == "boolean"`).assign(P,(0,r._)`"" + ${x}`).elseIf((0,r._)`${x} === null`).assign(P,(0,r._)`""`);return;case"number":C.elseIf((0,r._)`${M} == "boolean" || ${x} === null
50
- || (${M} == "string" && ${x} && ${x} == +${x})`).assign(P,(0,r._)`+${x}`);return;case"integer":C.elseIf((0,r._)`${M} === "boolean" || ${x} === null
51
- || (${M} === "string" && ${x} && ${x} == +${x} && !(${x} % 1))`).assign(P,(0,r._)`+${x}`);return;case"boolean":C.elseIf((0,r._)`${x} === "false" || ${x} === 0 || ${x} === null`).assign(P,!1).elseIf((0,r._)`${x} === "true" || ${x} === 1`).assign(P,!0);return;case"null":C.elseIf((0,r._)`${x} === "" || ${x} === 0 || ${x} === false`),C.assign(P,null);return;case"array":C.elseIf((0,r._)`${M} === "string" || ${M} === "number"
52
- || ${M} === "boolean" || ${x} === null`).assign(P,(0,r._)`[${x}]`)}}}function g({gen:v,parentData:E,parentDataProperty:S},C){v.if((0,r._)`${E} !== undefined`,()=>v.assign((0,r._)`${E}[${S}]`,C))}function b(v,E,S,C=s.Correct){const x=C===s.Correct?r.operators.EQ:r.operators.NEQ;let O;switch(v){case"null":return(0,r._)`${E} ${x} null`;case"array":O=(0,r._)`Array.isArray(${E})`;break;case"object":O=(0,r._)`${E} && typeof ${E} == "object" && !Array.isArray(${E})`;break;case"integer":O=M((0,r._)`!(${E} % 1) && !isNaN(${E})`);break;case"number":O=M();break;default:return(0,r._)`typeof ${E} ${x} ${v}`}return C===s.Correct?O:(0,r.not)(O);function M(P=r.nil){return(0,r.and)((0,r._)`typeof ${E} == "number"`,P,S?(0,r._)`isFinite(${E})`:r.nil)}}Ur.checkDataType=b;function y(v,E,S,C){if(v.length===1)return b(v[0],E,S,C);let x;const O=(0,o.toHash)(v);if(O.array&&O.object){const M=(0,r._)`typeof ${E} != "object"`;x=O.null?M:(0,r._)`!${E} || ${M}`,delete O.null,delete O.array,delete O.object}else x=r.nil;O.number&&delete O.integer;for(const M in O)x=(0,r.and)(x,b(M,E,S,C));return x}Ur.checkDataTypes=y;const _={message:({schema:v})=>`must be ${v}`,params:({schema:v,schemaValue:E})=>typeof v=="string"?(0,r._)`{type: ${v}}`:(0,r._)`{type: ${E}}`};function w(v){const E=T(v);(0,n.reportError)(E,_)}Ur.reportTypeError=w;function T(v){const{gen:E,data:S,schema:C}=v,x=(0,o.schemaRefOrVal)(v,C,"type");return{gen:E,keyword:"type",data:S,schema:C.type,schemaCode:x,schemaValue:x,parentSchema:C,params:{},it:v}}return Ur}var yd={},NA;function cJ(){if(NA)return yd;NA=1,Object.defineProperty(yd,"__esModule",{value:!0}),yd.assignDefaults=void 0;const e=Ot(),t=rn();function n(o,s){const{properties:l,items:c}=o.schema;if(s==="object"&&l)for(const u in l)r(o,u,l[u].default);else s==="array"&&Array.isArray(c)&&c.forEach((u,d)=>r(o,d,u.default))}yd.assignDefaults=n;function r(o,s,l){const{gen:c,compositeRule:u,data:d,opts:h}=o;if(l===void 0)return;const p=(0,e._)`${d}${(0,e.getProperty)(s)}`;if(u){(0,t.checkStrictMode)(o,`default is ignored for: ${p}`);return}let g=(0,e._)`${p} === undefined`;h.useDefaults==="empty"&&(g=(0,e._)`${g} || ${p} === null || ${p} === ""`),c.if(g,(0,e._)`${p} = ${(0,e.stringify)(l)}`)}return yd}var yi={},vn={},DA;function Ti(){if(DA)return vn;DA=1,Object.defineProperty(vn,"__esModule",{value:!0}),vn.validateUnion=vn.validateArray=vn.usePattern=vn.callValidateCode=vn.schemaProperties=vn.allSchemaProperties=vn.noPropertyInData=vn.propertyInData=vn.isOwnProperty=vn.hasPropFunc=vn.reportMissingProp=vn.checkMissingProp=vn.checkReportMissingProp=void 0;const e=Ot(),t=rn(),n=tl(),r=rn();function o(v,E){const{gen:S,data:C,it:x}=v;S.if(h(S,C,E,x.opts.ownProperties),()=>{v.setParams({missingProperty:(0,e._)`${E}`},!0),v.error()})}vn.checkReportMissingProp=o;function s({gen:v,data:E,it:{opts:S}},C,x){return(0,e.or)(...C.map(O=>(0,e.and)(h(v,E,O,S.ownProperties),(0,e._)`${x} = ${O}`)))}vn.checkMissingProp=s;function l(v,E){v.setParams({missingProperty:E},!0),v.error()}vn.reportMissingProp=l;function c(v){return v.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}vn.hasPropFunc=c;function u(v,E,S){return(0,e._)`${c(v)}.call(${E}, ${S})`}vn.isOwnProperty=u;function d(v,E,S,C){const x=(0,e._)`${E}${(0,e.getProperty)(S)} !== undefined`;return C?(0,e._)`${x} && ${u(v,E,S)}`:x}vn.propertyInData=d;function h(v,E,S,C){const x=(0,e._)`${E}${(0,e.getProperty)(S)} === undefined`;return C?(0,e.or)(x,(0,e.not)(u(v,E,S))):x}vn.noPropertyInData=h;function p(v){return v?Object.keys(v).filter(E=>E!=="__proto__"):[]}vn.allSchemaProperties=p;function g(v,E){return p(E).filter(S=>!(0,t.alwaysValidSchema)(v,E[S]))}vn.schemaProperties=g;function b({schemaCode:v,data:E,it:{gen:S,topSchemaRef:C,schemaPath:x,errorPath:O},it:M},P,z,I){const q=I?(0,e._)`${v}, ${E}, ${C}${x}`:E,G=[[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,O)],[n.default.parentData,M.parentData],[n.default.parentDataProperty,M.parentDataProperty],[n.default.rootData,n.default.rootData]];M.opts.dynamicRef&&G.push([n.default.dynamicAnchors,n.default.dynamicAnchors]);const ee=(0,e._)`${q}, ${S.object(...G)}`;return z!==e.nil?(0,e._)`${P}.call(${z}, ${ee})`:(0,e._)`${P}(${ee})`}vn.callValidateCode=b;const y=(0,e._)`new RegExp`;function _({gen:v,it:{opts:E}},S){const C=E.unicodeRegExp?"u":"",{regExp:x}=E.code,O=x(S,C);return v.scopeValue("pattern",{key:O.toString(),ref:O,code:(0,e._)`${x.code==="new RegExp"?y:(0,r.useFunc)(v,x)}(${S}, ${C})`})}vn.usePattern=_;function w(v){const{gen:E,data:S,keyword:C,it:x}=v,O=E.name("valid");if(x.allErrors){const P=E.let("valid",!0);return M(()=>E.assign(P,!1)),P}return E.var(O,!0),M(()=>E.break()),O;function M(P){const z=E.const("len",(0,e._)`${S}.length`);E.forRange("i",0,z,I=>{v.subschema({keyword:C,dataProp:I,dataPropType:t.Type.Num},O),E.if((0,e.not)(O),P)})}}vn.validateArray=w;function T(v){const{gen:E,schema:S,keyword:C,it:x}=v;if(!Array.isArray(S))throw new Error("ajv implementation error");if(S.some(z=>(0,t.alwaysValidSchema)(x,z))&&!x.opts.unevaluated)return;const M=E.let("valid",!1),P=E.name("_valid");E.block(()=>S.forEach((z,I)=>{const q=v.subschema({keyword:C,schemaProp:I,compositeRule:!0},P);E.assign(M,(0,e._)`${M} || ${P}`),v.mergeValidEvaluated(q,P)||E.if((0,e.not)(M))})),v.result(M,()=>v.reset(),()=>v.error(!0))}return vn.validateUnion=T,vn}var $A;function uJ(){if($A)return yi;$A=1,Object.defineProperty(yi,"__esModule",{value:!0}),yi.validateKeywordUsage=yi.validSchemaType=yi.funcKeywordCode=yi.macroKeywordCode=void 0;const e=Ot(),t=tl(),n=Ti(),r=i0();function o(g,b){const{gen:y,keyword:_,schema:w,parentSchema:T,it:v}=g,E=b.macro.call(v.self,w,T,v),S=d(y,_,E);v.opts.validateSchema!==!1&&v.self.validateSchema(E,!0);const C=y.name("valid");g.subschema({schema:E,schemaPath:e.nil,errSchemaPath:`${v.errSchemaPath}/${_}`,topSchemaRef:S,compositeRule:!0},C),g.pass(C,()=>g.error(!0))}yi.macroKeywordCode=o;function s(g,b){var y;const{gen:_,keyword:w,schema:T,parentSchema:v,$data:E,it:S}=g;u(S,b);const C=!E&&b.compile?b.compile.call(S.self,T,v,S):b.validate,x=d(_,w,C),O=_.let("valid");g.block$data(O,M),g.ok((y=b.valid)!==null&&y!==void 0?y:O);function M(){if(b.errors===!1)I(),b.modifying&&l(g),q(()=>g.error());else{const G=b.async?P():z();b.modifying&&l(g),q(()=>c(g,G))}}function P(){const G=_.let("ruleErrs",null);return _.try(()=>I((0,e._)`await `),ee=>_.assign(O,!1).if((0,e._)`${ee} instanceof ${S.ValidationError}`,()=>_.assign(G,(0,e._)`${ee}.errors`),()=>_.throw(ee))),G}function z(){const G=(0,e._)`${x}.errors`;return _.assign(G,null),I(e.nil),G}function I(G=b.async?(0,e._)`await `:e.nil){const ee=S.opts.passContext?t.default.this:t.default.self,J=!("compile"in b&&!E||b.schema===!1);_.assign(O,(0,e._)`${G}${(0,n.callValidateCode)(g,x,ee,J)}`,b.modifying)}function q(G){var ee;_.if((0,e.not)((ee=b.valid)!==null&&ee!==void 0?ee:O),G)}}yi.funcKeywordCode=s;function l(g){const{gen:b,data:y,it:_}=g;b.if(_.parentData,()=>b.assign(y,(0,e._)`${_.parentData}[${_.parentDataProperty}]`))}function c(g,b){const{gen:y}=g;y.if((0,e._)`Array.isArray(${b})`,()=>{y.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${b} : ${t.default.vErrors}.concat(${b})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,r.extendErrors)(g)},()=>g.error())}function u({schemaEnv:g},b){if(b.async&&!g.$async)throw new Error("async keyword in sync schema")}function d(g,b,y){if(y===void 0)throw new Error(`keyword "${b}" failed to compile`);return g.scopeValue("keyword",typeof y=="function"?{ref:y}:{ref:y,code:(0,e.stringify)(y)})}function h(g,b,y=!1){return!b.length||b.some(_=>_==="array"?Array.isArray(g):_==="object"?g&&typeof g=="object"&&!Array.isArray(g):typeof g==_||y&&typeof g>"u")}yi.validSchemaType=h;function p({schema:g,opts:b,self:y,errSchemaPath:_},w,T){if(Array.isArray(w.keyword)?!w.keyword.includes(T):w.keyword!==T)throw new Error("ajv implementation error");const v=w.dependencies;if(v?.some(E=>!Object.prototype.hasOwnProperty.call(g,E)))throw new Error(`parent schema must have dependencies of ${T}: ${v.join(",")}`);if(w.validateSchema&&!w.validateSchema(g[T])){const S=`keyword "${T}" value is invalid at path "${_}": `+y.errorsText(w.validateSchema.errors);if(b.validateSchema==="log")y.logger.error(S);else throw new Error(S)}}return yi.validateKeywordUsage=p,yi}var ks={},IA;function fJ(){if(IA)return ks;IA=1,Object.defineProperty(ks,"__esModule",{value:!0}),ks.extendSubschemaMode=ks.extendSubschemaData=ks.getSubschema=void 0;const e=Ot(),t=rn();function n(s,{keyword:l,schemaProp:c,schema:u,schemaPath:d,errSchemaPath:h,topSchemaRef:p}){if(l!==void 0&&u!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(l!==void 0){const g=s.schema[l];return c===void 0?{schema:g,schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(l)}`,errSchemaPath:`${s.errSchemaPath}/${l}`}:{schema:g[c],schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(l)}${(0,e.getProperty)(c)}`,errSchemaPath:`${s.errSchemaPath}/${l}/${(0,t.escapeFragment)(c)}`}}if(u!==void 0){if(d===void 0||h===void 0||p===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:u,schemaPath:d,topSchemaRef:p,errSchemaPath:h}}throw new Error('either "keyword" or "schema" must be passed')}ks.getSubschema=n;function r(s,l,{dataProp:c,dataPropType:u,data:d,dataTypes:h,propertyName:p}){if(d!==void 0&&c!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:g}=l;if(c!==void 0){const{errorPath:y,dataPathArr:_,opts:w}=l,T=g.let("data",(0,e._)`${l.data}${(0,e.getProperty)(c)}`,!0);b(T),s.errorPath=(0,e.str)`${y}${(0,t.getErrorPath)(c,u,w.jsPropertySyntax)}`,s.parentDataProperty=(0,e._)`${c}`,s.dataPathArr=[..._,s.parentDataProperty]}if(d!==void 0){const y=d instanceof e.Name?d:g.let("data",d,!0);b(y),p!==void 0&&(s.propertyName=p)}h&&(s.dataTypes=h);function b(y){s.data=y,s.dataLevel=l.dataLevel+1,s.dataTypes=[],l.definedProperties=new Set,s.parentData=l.data,s.dataNames=[...l.dataNames,y]}}ks.extendSubschemaData=r;function o(s,{jtdDiscriminator:l,jtdMetadata:c,compositeRule:u,createErrors:d,allErrors:h}){u!==void 0&&(s.compositeRule=u),d!==void 0&&(s.createErrors=d),h!==void 0&&(s.allErrors=h),s.jtdDiscriminator=l,s.jtdMetadata=c}return ks.extendSubschemaMode=o,ks}var so={},a1,zA;function hN(){return zA||(zA=1,a1=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,o,s;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(s=Object.keys(t),r=s.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[o]))return!1;for(o=r;o--!==0;){var l=s[o];if(!e(t[l],n[l]))return!1}return!0}return t!==t&&n!==n}),a1}var l1={exports:{}},LA;function dJ(){if(LA)return l1.exports;LA=1;var e=l1.exports=function(r,o,s){typeof o=="function"&&(s=o,o={}),s=o.cb||s;var l=typeof s=="function"?s:s.pre||function(){},c=s.post||function(){};t(o,l,c,r,"",r)};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(r,o,s,l,c,u,d,h,p,g){if(l&&typeof l=="object"&&!Array.isArray(l)){o(l,c,u,d,h,p,g);for(var b in l){var y=l[b];if(Array.isArray(y)){if(b in e.arrayKeywords)for(var _=0;_<y.length;_++)t(r,o,s,y[_],c+"/"+b+"/"+_,u,c,b,l,_)}else if(b in e.propsKeywords){if(y&&typeof y=="object")for(var w in y)t(r,o,s,y[w],c+"/"+b+"/"+n(w),u,c,b,l,w)}else(b in e.keywords||r.allKeys&&!(b in e.skipKeywords))&&t(r,o,s,y,c+"/"+b,u,c,b,l)}s(l,c,u,d,h,p,g)}}function n(r){return r.replace(/~/g,"~0").replace(/\//g,"~1")}return l1.exports}var FA;function s0(){if(FA)return so;FA=1,Object.defineProperty(so,"__esModule",{value:!0}),so.getSchemaRefs=so.resolveUrl=so.normalizeId=so._getFullPath=so.getFullPath=so.inlineRef=void 0;const e=rn(),t=hN(),n=dJ(),r=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function o(_,w=!0){return typeof _=="boolean"?!0:w===!0?!l(_):w?c(_)<=w:!1}so.inlineRef=o;const s=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function l(_){for(const w in _){if(s.has(w))return!0;const T=_[w];if(Array.isArray(T)&&T.some(l)||typeof T=="object"&&l(T))return!0}return!1}function c(_){let w=0;for(const T in _){if(T==="$ref")return 1/0;if(w++,!r.has(T)&&(typeof _[T]=="object"&&(0,e.eachItem)(_[T],v=>w+=c(v)),w===1/0))return 1/0}return w}function u(_,w="",T){T!==!1&&(w=p(w));const v=_.parse(w);return d(_,v)}so.getFullPath=u;function d(_,w){return _.serialize(w).split("#")[0]+"#"}so._getFullPath=d;const h=/#\/?$/;function p(_){return _?_.replace(h,""):""}so.normalizeId=p;function g(_,w,T){return T=p(T),_.resolve(w,T)}so.resolveUrl=g;const b=/^[a-z_][-a-z0-9._]*$/i;function y(_,w){if(typeof _=="boolean")return{};const{schemaId:T,uriResolver:v}=this.opts,E=p(_[T]||w),S={"":E},C=u(v,E,!1),x={},O=new Set;return n(_,{allKeys:!0},(z,I,q,G)=>{if(G===void 0)return;const ee=C+I;let J=S[G];typeof z[T]=="string"&&(J=Z.call(this,z[T])),H.call(this,z.$anchor),H.call(this,z.$dynamicAnchor),S[I]=J;function Z(Y){const oe=this.opts.uriResolver.resolve;if(Y=p(J?oe(J,Y):Y),O.has(Y))throw P(Y);O.add(Y);let ne=this.refs[Y];return typeof ne=="string"&&(ne=this.refs[ne]),typeof ne=="object"?M(z,ne.schema,Y):Y!==p(ee)&&(Y[0]==="#"?(M(z,x[Y],Y),x[Y]=z):this.refs[Y]=ee),Y}function H(Y){if(typeof Y=="string"){if(!b.test(Y))throw new Error(`invalid anchor "${Y}"`);Z.call(this,`#${Y}`)}}}),x;function M(z,I,q){if(I!==void 0&&!t(z,I))throw P(q)}function P(z){return new Error(`reference "${z}" resolves to more than one schema`)}}return so.getSchemaRefs=y,so}var UA;function a0(){if(UA)return Os;UA=1,Object.defineProperty(Os,"__esModule",{value:!0}),Os.getData=Os.KeywordCxt=Os.validateFunctionCode=void 0;const e=lJ(),t=cy(),n=dN(),r=cy(),o=cJ(),s=uJ(),l=fJ(),c=Ot(),u=tl(),d=s0(),h=rn(),p=i0();function g(Q){if(C(Q)&&(O(Q),S(Q))){w(Q);return}b(Q,()=>(0,e.topBoolOrEmptySchema)(Q))}Os.validateFunctionCode=g;function b({gen:Q,validateName:ie,schema:de,schemaEnv:_e,opts:Te},we){Te.code.es5?Q.func(ie,(0,c._)`${u.default.data}, ${u.default.valCxt}`,_e.$async,()=>{Q.code((0,c._)`"use strict"; ${v(de,Te)}`),_(Q,Te),Q.code(we)}):Q.func(ie,(0,c._)`${u.default.data}, ${y(Te)}`,_e.$async,()=>Q.code(v(de,Te)).code(we))}function y(Q){return(0,c._)`{${u.default.instancePath}="", ${u.default.parentData}, ${u.default.parentDataProperty}, ${u.default.rootData}=${u.default.data}${Q.dynamicRef?(0,c._)`, ${u.default.dynamicAnchors}={}`:c.nil}}={}`}function _(Q,ie){Q.if(u.default.valCxt,()=>{Q.var(u.default.instancePath,(0,c._)`${u.default.valCxt}.${u.default.instancePath}`),Q.var(u.default.parentData,(0,c._)`${u.default.valCxt}.${u.default.parentData}`),Q.var(u.default.parentDataProperty,(0,c._)`${u.default.valCxt}.${u.default.parentDataProperty}`),Q.var(u.default.rootData,(0,c._)`${u.default.valCxt}.${u.default.rootData}`),ie.dynamicRef&&Q.var(u.default.dynamicAnchors,(0,c._)`${u.default.valCxt}.${u.default.dynamicAnchors}`)},()=>{Q.var(u.default.instancePath,(0,c._)`""`),Q.var(u.default.parentData,(0,c._)`undefined`),Q.var(u.default.parentDataProperty,(0,c._)`undefined`),Q.var(u.default.rootData,u.default.data),ie.dynamicRef&&Q.var(u.default.dynamicAnchors,(0,c._)`{}`)})}function w(Q){const{schema:ie,opts:de,gen:_e}=Q;b(Q,()=>{de.$comment&&ie.$comment&&G(Q),z(Q),_e.let(u.default.vErrors,null),_e.let(u.default.errors,0),de.unevaluated&&T(Q),M(Q),ee(Q)})}function T(Q){const{gen:ie,validateName:de}=Q;Q.evaluated=ie.const("evaluated",(0,c._)`${de}.evaluated`),ie.if((0,c._)`${Q.evaluated}.dynamicProps`,()=>ie.assign((0,c._)`${Q.evaluated}.props`,(0,c._)`undefined`)),ie.if((0,c._)`${Q.evaluated}.dynamicItems`,()=>ie.assign((0,c._)`${Q.evaluated}.items`,(0,c._)`undefined`))}function v(Q,ie){const de=typeof Q=="object"&&Q[ie.schemaId];return de&&(ie.code.source||ie.code.process)?(0,c._)`/*# sourceURL=${de} */`:c.nil}function E(Q,ie){if(C(Q)&&(O(Q),S(Q))){x(Q,ie);return}(0,e.boolOrEmptySchema)(Q,ie)}function S({schema:Q,self:ie}){if(typeof Q=="boolean")return!Q;for(const de in Q)if(ie.RULES.all[de])return!0;return!1}function C(Q){return typeof Q.schema!="boolean"}function x(Q,ie){const{schema:de,gen:_e,opts:Te}=Q;Te.$comment&&de.$comment&&G(Q),I(Q),q(Q);const we=_e.const("_errs",u.default.errors);M(Q,we),_e.var(ie,(0,c._)`${we} === ${u.default.errors}`)}function O(Q){(0,h.checkUnknownRules)(Q),P(Q)}function M(Q,ie){if(Q.opts.jtd)return Z(Q,[],!1,ie);const de=(0,t.getSchemaTypes)(Q.schema),_e=(0,t.coerceAndCheckDataType)(Q,de);Z(Q,de,!_e,ie)}function P(Q){const{schema:ie,errSchemaPath:de,opts:_e,self:Te}=Q;ie.$ref&&_e.ignoreKeywordsWithRef&&(0,h.schemaHasRulesButRef)(ie,Te.RULES)&&Te.logger.warn(`$ref: keywords ignored in schema at path "${de}"`)}function z(Q){const{schema:ie,opts:de}=Q;ie.default!==void 0&&de.useDefaults&&de.strictSchema&&(0,h.checkStrictMode)(Q,"default is ignored in the schema root")}function I(Q){const ie=Q.schema[Q.opts.schemaId];ie&&(Q.baseId=(0,d.resolveUrl)(Q.opts.uriResolver,Q.baseId,ie))}function q(Q){if(Q.schema.$async&&!Q.schemaEnv.$async)throw new Error("async schema in sync schema")}function G({gen:Q,schemaEnv:ie,schema:de,errSchemaPath:_e,opts:Te}){const we=de.$comment;if(Te.$comment===!0)Q.code((0,c._)`${u.default.self}.logger.log(${we})`);else if(typeof Te.$comment=="function"){const $e=(0,c.str)`${_e}/$comment`,Ze=Q.scopeValue("root",{ref:ie.root});Q.code((0,c._)`${u.default.self}.opts.$comment(${we}, ${$e}, ${Ze}.schema)`)}}function ee(Q){const{gen:ie,schemaEnv:de,validateName:_e,ValidationError:Te,opts:we}=Q;de.$async?ie.if((0,c._)`${u.default.errors} === 0`,()=>ie.return(u.default.data),()=>ie.throw((0,c._)`new ${Te}(${u.default.vErrors})`)):(ie.assign((0,c._)`${_e}.errors`,u.default.vErrors),we.unevaluated&&J(Q),ie.return((0,c._)`${u.default.errors} === 0`))}function J({gen:Q,evaluated:ie,props:de,items:_e}){de instanceof c.Name&&Q.assign((0,c._)`${ie}.props`,de),_e instanceof c.Name&&Q.assign((0,c._)`${ie}.items`,_e)}function Z(Q,ie,de,_e){const{gen:Te,schema:we,data:$e,allErrors:Ze,opts:ye,self:Fe}=Q,{RULES:Re}=Fe;if(we.$ref&&(ye.ignoreKeywordsWithRef||!(0,h.schemaHasRulesButRef)(we,Re))){Te.block(()=>re(Q,"$ref",Re.all.$ref.definition));return}ye.jtd||Y(Q,ie),Te.block(()=>{for(const ze of Re.rules)We(ze);We(Re.post)});function We(ze){(0,n.shouldUseGroup)(we,ze)&&(ze.type?(Te.if((0,r.checkDataType)(ze.type,$e,ye.strictNumbers)),H(Q,ze),ie.length===1&&ie[0]===ze.type&&de&&(Te.else(),(0,r.reportTypeError)(Q)),Te.endIf()):H(Q,ze),Ze||Te.if((0,c._)`${u.default.errors} === ${_e||0}`))}}function H(Q,ie){const{gen:de,schema:_e,opts:{useDefaults:Te}}=Q;Te&&(0,o.assignDefaults)(Q,ie.type),de.block(()=>{for(const we of ie.rules)(0,n.shouldUseRule)(_e,we)&&re(Q,we.keyword,we.definition,ie.type)})}function Y(Q,ie){Q.schemaEnv.meta||!Q.opts.strictTypes||(oe(Q,ie),Q.opts.allowUnionTypes||ne(Q,ie),$(Q,Q.dataTypes))}function oe(Q,ie){if(ie.length){if(!Q.dataTypes.length){Q.dataTypes=ie;return}ie.forEach(de=>{U(Q.dataTypes,de)||B(Q,`type "${de}" not allowed by context "${Q.dataTypes.join(",")}"`)}),D(Q,ie)}}function ne(Q,ie){ie.length>1&&!(ie.length===2&&ie.includes("null"))&&B(Q,"use allowUnionTypes to allow union type keyword")}function $(Q,ie){const de=Q.self.RULES.all;for(const _e in de){const Te=de[_e];if(typeof Te=="object"&&(0,n.shouldUseRule)(Q.schema,Te)){const{type:we}=Te.definition;we.length&&!we.some($e=>V(ie,$e))&&B(Q,`missing type "${we.join(",")}" for keyword "${_e}"`)}}}function V(Q,ie){return Q.includes(ie)||ie==="number"&&Q.includes("integer")}function U(Q,ie){return Q.includes(ie)||ie==="integer"&&Q.includes("number")}function D(Q,ie){const de=[];for(const _e of Q.dataTypes)U(ie,_e)?de.push(_e):ie.includes("integer")&&_e==="number"&&de.push("integer");Q.dataTypes=de}function B(Q,ie){const de=Q.schemaEnv.baseId+Q.errSchemaPath;ie+=` at "${de}" (strictTypes)`,(0,h.checkStrictMode)(Q,ie,Q.opts.strictTypes)}class te{constructor(ie,de,_e){if((0,s.validateKeywordUsage)(ie,de,_e),this.gen=ie.gen,this.allErrors=ie.allErrors,this.keyword=_e,this.data=ie.data,this.schema=ie.schema[_e],this.$data=de.$data&&ie.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,h.schemaRefOrVal)(ie,this.schema,_e,this.$data),this.schemaType=de.schemaType,this.parentSchema=ie.schema,this.params={},this.it=ie,this.def=de,this.$data)this.schemaCode=ie.gen.const("vSchema",Me(this.$data,ie));else if(this.schemaCode=this.schemaValue,!(0,s.validSchemaType)(this.schema,de.schemaType,de.allowUndefined))throw new Error(`${_e} value must be ${JSON.stringify(de.schemaType)}`);("code"in de?de.trackErrors:de.errors!==!1)&&(this.errsCount=ie.gen.const("_errs",u.default.errors))}result(ie,de,_e){this.failResult((0,c.not)(ie),de,_e)}failResult(ie,de,_e){this.gen.if(ie),_e?_e():this.error(),de?(this.gen.else(),de(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(ie,de){this.failResult((0,c.not)(ie),void 0,de)}fail(ie){if(ie===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(ie),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(ie){if(!this.$data)return this.fail(ie);const{schemaCode:de}=this;this.fail((0,c._)`${de} !== undefined && (${(0,c.or)(this.invalid$data(),ie)})`)}error(ie,de,_e){if(de){this.setParams(de),this._error(ie,_e),this.setParams({});return}this._error(ie,_e)}_error(ie,de){(ie?p.reportExtraError:p.reportError)(this,this.def.error,de)}$dataError(){(0,p.reportError)(this,this.def.$dataError||p.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,p.resetErrorsCount)(this.gen,this.errsCount)}ok(ie){this.allErrors||this.gen.if(ie)}setParams(ie,de){de?Object.assign(this.params,ie):this.params=ie}block$data(ie,de,_e=c.nil){this.gen.block(()=>{this.check$data(ie,_e),de()})}check$data(ie=c.nil,de=c.nil){if(!this.$data)return;const{gen:_e,schemaCode:Te,schemaType:we,def:$e}=this;_e.if((0,c.or)((0,c._)`${Te} === undefined`,de)),ie!==c.nil&&_e.assign(ie,!0),(we.length||$e.validateSchema)&&(_e.elseIf(this.invalid$data()),this.$dataError(),ie!==c.nil&&_e.assign(ie,!1)),_e.else()}invalid$data(){const{gen:ie,schemaCode:de,schemaType:_e,def:Te,it:we}=this;return(0,c.or)($e(),Ze());function $e(){if(_e.length){if(!(de instanceof c.Name))throw new Error("ajv implementation error");const ye=Array.isArray(_e)?_e:[_e];return(0,c._)`${(0,r.checkDataTypes)(ye,de,we.opts.strictNumbers,r.DataType.Wrong)}`}return c.nil}function Ze(){if(Te.validateSchema){const ye=ie.scopeValue("validate$data",{ref:Te.validateSchema});return(0,c._)`!${ye}(${de})`}return c.nil}}subschema(ie,de){const _e=(0,l.getSubschema)(this.it,ie);(0,l.extendSubschemaData)(_e,this.it,ie),(0,l.extendSubschemaMode)(_e,ie);const Te={...this.it,..._e,items:void 0,props:void 0};return E(Te,de),Te}mergeEvaluated(ie,de){const{it:_e,gen:Te}=this;_e.opts.unevaluated&&(_e.props!==!0&&ie.props!==void 0&&(_e.props=h.mergeEvaluated.props(Te,ie.props,_e.props,de)),_e.items!==!0&&ie.items!==void 0&&(_e.items=h.mergeEvaluated.items(Te,ie.items,_e.items,de)))}mergeValidEvaluated(ie,de){const{it:_e,gen:Te}=this;if(_e.opts.unevaluated&&(_e.props!==!0||_e.items!==!0))return Te.if(de,()=>this.mergeEvaluated(ie,c.Name)),!0}}Os.KeywordCxt=te;function re(Q,ie,de,_e){const Te=new te(Q,de,ie);"code"in de?de.code(Te,_e):Te.$data&&de.validate?(0,s.funcKeywordCode)(Te,de):"macro"in de?(0,s.macroKeywordCode)(Te,de):(de.compile||de.validate)&&(0,s.funcKeywordCode)(Te,de)}const le=/^\/(?:[^~]|~0|~1)*$/,ge=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Me(Q,{dataLevel:ie,dataNames:de,dataPathArr:_e}){let Te,we;if(Q==="")return u.default.rootData;if(Q[0]==="/"){if(!le.test(Q))throw new Error(`Invalid JSON-pointer: ${Q}`);Te=Q,we=u.default.rootData}else{const Fe=ge.exec(Q);if(!Fe)throw new Error(`Invalid JSON-pointer: ${Q}`);const Re=+Fe[1];if(Te=Fe[2],Te==="#"){if(Re>=ie)throw new Error(ye("property/index",Re));return _e[ie-Re]}if(Re>ie)throw new Error(ye("data",Re));if(we=de[ie-Re],!Te)return we}let $e=we;const Ze=Te.split("/");for(const Fe of Ze)Fe&&(we=(0,c._)`${we}${(0,c.getProperty)((0,h.unescapeJsonPointer)(Fe))}`,$e=(0,c._)`${$e} && ${we}`);return $e;function ye(Fe,Re){return`Cannot access ${Fe} ${Re} levels up, current level is ${ie}`}}return Os.getData=Me,Os}var xm={},VA;function A_(){if(VA)return xm;VA=1,Object.defineProperty(xm,"__esModule",{value:!0});class e extends Error{constructor(n){super("validation failed"),this.errors=n,this.ajv=this.validation=!0}}return xm.default=e,xm}var _m={},qA;function l0(){if(qA)return _m;qA=1,Object.defineProperty(_m,"__esModule",{value:!0});const e=s0();class t extends Error{constructor(r,o,s,l){super(l||`can't resolve reference ${s} from id ${o}`),this.missingRef=(0,e.resolveUrl)(r,o,s),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(r,this.missingRef))}}return _m.default=t,_m}var ko={},BA;function k_(){if(BA)return ko;BA=1,Object.defineProperty(ko,"__esModule",{value:!0}),ko.resolveSchema=ko.getCompilingSchema=ko.resolveRef=ko.compileSchema=ko.SchemaEnv=void 0;const e=Ot(),t=A_(),n=tl(),r=s0(),o=rn(),s=a0();class l{constructor(T){var v;this.refs={},this.dynamicAnchors={};let E;typeof T.schema=="object"&&(E=T.schema),this.schema=T.schema,this.schemaId=T.schemaId,this.root=T.root||this,this.baseId=(v=T.baseId)!==null&&v!==void 0?v:(0,r.normalizeId)(E?.[T.schemaId||"$id"]),this.schemaPath=T.schemaPath,this.localRefs=T.localRefs,this.meta=T.meta,this.$async=E?.$async,this.refs={}}}ko.SchemaEnv=l;function c(w){const T=h.call(this,w);if(T)return T;const v=(0,r.getFullPath)(this.opts.uriResolver,w.root.baseId),{es5:E,lines:S}=this.opts.code,{ownProperties:C}=this.opts,x=new e.CodeGen(this.scope,{es5:E,lines:S,ownProperties:C});let O;w.$async&&(O=x.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const M=x.scopeName("validate");w.validateName=M;const P={gen:x,allErrors:this.opts.allErrors,data:n.default.data,parentData:n.default.parentData,parentDataProperty:n.default.parentDataProperty,dataNames:[n.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:x.scopeValue("schema",this.opts.code.source===!0?{ref:w.schema,code:(0,e.stringify)(w.schema)}:{ref:w.schema}),validateName:M,ValidationError:O,schema:w.schema,schemaEnv:w,rootId:v,baseId:w.baseId||v,schemaPath:e.nil,errSchemaPath:w.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let z;try{this._compilations.add(w),(0,s.validateFunctionCode)(P),x.optimize(this.opts.code.optimize);const I=x.toString();z=`${x.scopeRefs(n.default.scope)}return ${I}`,this.opts.code.process&&(z=this.opts.code.process(z,w));const G=new Function(`${n.default.self}`,`${n.default.scope}`,z)(this,this.scope.get());if(this.scope.value(M,{ref:G}),G.errors=null,G.schema=w.schema,G.schemaEnv=w,w.$async&&(G.$async=!0),this.opts.code.source===!0&&(G.source={validateName:M,validateCode:I,scopeValues:x._values}),this.opts.unevaluated){const{props:ee,items:J}=P;G.evaluated={props:ee instanceof e.Name?void 0:ee,items:J instanceof e.Name?void 0:J,dynamicProps:ee instanceof e.Name,dynamicItems:J instanceof e.Name},G.source&&(G.source.evaluated=(0,e.stringify)(G.evaluated))}return w.validate=G,w}catch(I){throw delete w.validate,delete w.validateName,z&&this.logger.error("Error compiling schema, function code:",z),I}finally{this._compilations.delete(w)}}ko.compileSchema=c;function u(w,T,v){var E;v=(0,r.resolveUrl)(this.opts.uriResolver,T,v);const S=w.refs[v];if(S)return S;let C=g.call(this,w,v);if(C===void 0){const x=(E=w.localRefs)===null||E===void 0?void 0:E[v],{schemaId:O}=this.opts;x&&(C=new l({schema:x,schemaId:O,root:w,baseId:T}))}if(C!==void 0)return w.refs[v]=d.call(this,C)}ko.resolveRef=u;function d(w){return(0,r.inlineRef)(w.schema,this.opts.inlineRefs)?w.schema:w.validate?w:c.call(this,w)}function h(w){for(const T of this._compilations)if(p(T,w))return T}ko.getCompilingSchema=h;function p(w,T){return w.schema===T.schema&&w.root===T.root&&w.baseId===T.baseId}function g(w,T){let v;for(;typeof(v=this.refs[T])=="string";)T=v;return v||this.schemas[T]||b.call(this,w,T)}function b(w,T){const v=this.opts.uriResolver.parse(T),E=(0,r._getFullPath)(this.opts.uriResolver,v);let S=(0,r.getFullPath)(this.opts.uriResolver,w.baseId,void 0);if(Object.keys(w.schema).length>0&&E===S)return _.call(this,v,w);const C=(0,r.normalizeId)(E),x=this.refs[C]||this.schemas[C];if(typeof x=="string"){const O=b.call(this,w,x);return typeof O?.schema!="object"?void 0:_.call(this,v,O)}if(typeof x?.schema=="object"){if(x.validate||c.call(this,x),C===(0,r.normalizeId)(T)){const{schema:O}=x,{schemaId:M}=this.opts,P=O[M];return P&&(S=(0,r.resolveUrl)(this.opts.uriResolver,S,P)),new l({schema:O,schemaId:M,root:w,baseId:S})}return _.call(this,v,x)}}ko.resolveSchema=b;const y=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function _(w,{baseId:T,schema:v,root:E}){var S;if(((S=w.fragment)===null||S===void 0?void 0:S[0])!=="/")return;for(const O of w.fragment.slice(1).split("/")){if(typeof v=="boolean")return;const M=v[(0,o.unescapeFragment)(O)];if(M===void 0)return;v=M;const P=typeof v=="object"&&v[this.opts.schemaId];!y.has(O)&&P&&(T=(0,r.resolveUrl)(this.opts.uriResolver,T,P))}let C;if(typeof v!="boolean"&&v.$ref&&!(0,o.schemaHasRulesButRef)(v,this.RULES)){const O=(0,r.resolveUrl)(this.opts.uriResolver,T,v.$ref);C=b.call(this,E,O)}const{schemaId:x}=this.opts;if(C=C||new l({schema:v,schemaId:x,root:E,baseId:T}),C.schema!==C.root.schema)return C}return ko}const hJ="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",pJ="Meta-schema for $data reference (JSON AnySchema extension proposal)",mJ="object",gJ=["$data"],yJ={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},vJ=!1,bJ={$id:hJ,description:pJ,type:mJ,required:gJ,properties:yJ,additionalProperties:vJ};var Em={},vd={exports:{}},c1,HA;function pN(){if(HA)return c1;HA=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 n(g){let b="",y=0,_=0;for(_=0;_<g.length;_++)if(y=g[_].charCodeAt(0),y!==48){if(!(y>=48&&y<=57||y>=65&&y<=70||y>=97&&y<=102))return"";b+=g[_];break}for(_+=1;_<g.length;_++){if(y=g[_].charCodeAt(0),!(y>=48&&y<=57||y>=65&&y<=70||y>=97&&y<=102))return"";b+=g[_]}return b}const r=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function o(g){return g.length=0,!0}function s(g,b,y){if(g.length){const _=n(g);if(_!=="")b.push(_);else return y.error=!0,!1;g.length=0}return!0}function l(g){let b=0;const y={error:!1,address:"",zone:""},_=[],w=[];let T=!1,v=!1,E=s;for(let S=0;S<g.length;S++){const C=g[S];if(!(C==="["||C==="]"))if(C===":"){if(T===!0&&(v=!0),!E(w,_,y))break;if(++b>7){y.error=!0;break}S>0&&g[S-1]===":"&&(T=!0),_.push(":");continue}else if(C==="%"){if(!E(w,_,y))break;E=o}else{w.push(C);continue}}return w.length&&(E===o?y.zone=w.join(""):v?_.push(w.join("")):_.push(n(w))),y.address=_.join(""),y}function c(g){if(u(g,":")<2)return{host:g,isIPV6:!1};const b=l(g);if(b.error)return{host:g,isIPV6:!1};{let y=b.address,_=b.address;return b.zone&&(y+="%"+b.zone,_+="%25"+b.zone),{host:y,isIPV6:!0,escapedHost:_}}}function u(g,b){let y=0;for(let _=0;_<g.length;_++)g[_]===b&&y++;return y}function d(g){let b=g;const y=[];let _=-1,w=0;for(;w=b.length;){if(w===1){if(b===".")break;if(b==="/"){y.push("/");break}else{y.push(b);break}}else if(w===2){if(b[0]==="."){if(b[1]===".")break;if(b[1]==="/"){b=b.slice(2);continue}}else if(b[0]==="/"&&(b[1]==="."||b[1]==="/")){y.push("/");break}}else if(w===3&&b==="/.."){y.length!==0&&y.pop(),y.push("/");break}if(b[0]==="."){if(b[1]==="."){if(b[2]==="/"){b=b.slice(3);continue}}else if(b[1]==="/"){b=b.slice(2);continue}}else if(b[0]==="/"&&b[1]==="."){if(b[2]==="/"){b=b.slice(2);continue}else if(b[2]==="."&&b[3]==="/"){b=b.slice(3),y.length!==0&&y.pop();continue}}if((_=b.indexOf("/",1))===-1){y.push(b);break}else y.push(b.slice(0,_)),b=b.slice(_)}return y.join("")}function h(g,b){const y=b!==!0?escape:unescape;return g.scheme!==void 0&&(g.scheme=y(g.scheme)),g.userinfo!==void 0&&(g.userinfo=y(g.userinfo)),g.host!==void 0&&(g.host=y(g.host)),g.path!==void 0&&(g.path=y(g.path)),g.query!==void 0&&(g.query=y(g.query)),g.fragment!==void 0&&(g.fragment=y(g.fragment)),g}function p(g){const b=[];if(g.userinfo!==void 0&&(b.push(g.userinfo),b.push("@")),g.host!==void 0){let y=unescape(g.host);if(!t(y)){const _=c(y);_.isIPV6===!0?y=`[${_.escapedHost}]`:y=g.host}b.push(y)}return(typeof g.port=="number"||typeof g.port=="string")&&(b.push(":"),b.push(String(g.port))),b.length?b.join(""):void 0}return c1={nonSimpleDomain:r,recomposeAuthority:p,normalizeComponentEncoding:h,removeDotSegments:d,isIPv4:t,isUUID:e,normalizeIPv6:c,stringArrayToHexStripped:n},c1}var u1,KA;function SJ(){if(KA)return u1;KA=1;const{isUUID:e}=pN(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,n=["http","https","ws","wss","urn","urn:uuid"];function r(C){return n.indexOf(C)!==-1}function o(C){return C.secure===!0?!0:C.secure===!1?!1:C.scheme?C.scheme.length===3&&(C.scheme[0]==="w"||C.scheme[0]==="W")&&(C.scheme[1]==="s"||C.scheme[1]==="S")&&(C.scheme[2]==="s"||C.scheme[2]==="S"):!1}function s(C){return C.host||(C.error=C.error||"HTTP URIs must have a host."),C}function l(C){const x=String(C.scheme).toLowerCase()==="https";return(C.port===(x?443:80)||C.port==="")&&(C.port=void 0),C.path||(C.path="/"),C}function c(C){return C.secure=o(C),C.resourceName=(C.path||"/")+(C.query?"?"+C.query:""),C.path=void 0,C.query=void 0,C}function u(C){if((C.port===(o(C)?443:80)||C.port==="")&&(C.port=void 0),typeof C.secure=="boolean"&&(C.scheme=C.secure?"wss":"ws",C.secure=void 0),C.resourceName){const[x,O]=C.resourceName.split("?");C.path=x&&x!=="/"?x:void 0,C.query=O,C.resourceName=void 0}return C.fragment=void 0,C}function d(C,x){if(!C.path)return C.error="URN can not be parsed",C;const O=C.path.match(t);if(O){const M=x.scheme||C.scheme||"urn";C.nid=O[1].toLowerCase(),C.nss=O[2];const P=`${M}:${x.nid||C.nid}`,z=S(P);C.path=void 0,z&&(C=z.parse(C,x))}else C.error=C.error||"URN can not be parsed.";return C}function h(C,x){if(C.nid===void 0)throw new Error("URN without nid cannot be serialized");const O=x.scheme||C.scheme||"urn",M=C.nid.toLowerCase(),P=`${O}:${x.nid||M}`,z=S(P);z&&(C=z.serialize(C,x));const I=C,q=C.nss;return I.path=`${M||x.nid}:${q}`,x.skipEscape=!0,I}function p(C,x){const O=C;return O.uuid=O.nss,O.nss=void 0,!x.tolerant&&(!O.uuid||!e(O.uuid))&&(O.error=O.error||"UUID is not valid."),O}function g(C){const x=C;return x.nss=(C.uuid||"").toLowerCase(),x}const b={scheme:"http",domainHost:!0,parse:s,serialize:l},y={scheme:"https",domainHost:b.domainHost,parse:s,serialize:l},_={scheme:"ws",domainHost:!0,parse:c,serialize:u},w={scheme:"wss",domainHost:_.domainHost,parse:_.parse,serialize:_.serialize},E={http:b,https:y,ws:_,wss:w,urn:{scheme:"urn",parse:d,serialize:h,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:p,serialize:g,skipNormalize:!0}};Object.setPrototypeOf(E,null);function S(C){return C&&(E[C]||E[C.toLowerCase()])||void 0}return u1={wsIsSecure:o,SCHEMES:E,isValidSchemeName:r,getSchemeHandler:S},u1}var GA;function mN(){if(GA)return vd.exports;GA=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:n,normalizeComponentEncoding:r,isIPv4:o,nonSimpleDomain:s}=pN(),{SCHEMES:l,getSchemeHandler:c}=SJ();function u(w,T){return typeof w=="string"?w=g(y(w,T),T):typeof w=="object"&&(w=y(g(w,T),T)),w}function d(w,T,v){const E=v?Object.assign({scheme:"null"},v):{scheme:"null"},S=h(y(w,E),y(T,E),E,!0);return E.skipEscape=!0,g(S,E)}function h(w,T,v,E){const S={};return E||(w=y(g(w,v),v),T=y(g(T,v),v)),v=v||{},!v.tolerant&&T.scheme?(S.scheme=T.scheme,S.userinfo=T.userinfo,S.host=T.host,S.port=T.port,S.path=t(T.path||""),S.query=T.query):(T.userinfo!==void 0||T.host!==void 0||T.port!==void 0?(S.userinfo=T.userinfo,S.host=T.host,S.port=T.port,S.path=t(T.path||""),S.query=T.query):(T.path?(T.path[0]==="/"?S.path=t(T.path):((w.userinfo!==void 0||w.host!==void 0||w.port!==void 0)&&!w.path?S.path="/"+T.path:w.path?S.path=w.path.slice(0,w.path.lastIndexOf("/")+1)+T.path:S.path=T.path,S.path=t(S.path)),S.query=T.query):(S.path=w.path,T.query!==void 0?S.query=T.query:S.query=w.query),S.userinfo=w.userinfo,S.host=w.host,S.port=w.port),S.scheme=w.scheme),S.fragment=T.fragment,S}function p(w,T,v){return typeof w=="string"?(w=unescape(w),w=g(r(y(w,v),!0),{...v,skipEscape:!0})):typeof w=="object"&&(w=g(r(w,!0),{...v,skipEscape:!0})),typeof T=="string"?(T=unescape(T),T=g(r(y(T,v),!0),{...v,skipEscape:!0})):typeof T=="object"&&(T=g(r(T,!0),{...v,skipEscape:!0})),w.toLowerCase()===T.toLowerCase()}function g(w,T){const v={host:w.host,scheme:w.scheme,userinfo:w.userinfo,port:w.port,path:w.path,query:w.query,nid:w.nid,nss:w.nss,uuid:w.uuid,fragment:w.fragment,reference:w.reference,resourceName:w.resourceName,secure:w.secure,error:""},E=Object.assign({},T),S=[],C=c(E.scheme||v.scheme);C&&C.serialize&&C.serialize(v,E),v.path!==void 0&&(E.skipEscape?v.path=unescape(v.path):(v.path=escape(v.path),v.scheme!==void 0&&(v.path=v.path.split("%3A").join(":")))),E.reference!=="suffix"&&v.scheme&&S.push(v.scheme,":");const x=n(v);if(x!==void 0&&(E.reference!=="suffix"&&S.push("//"),S.push(x),v.path&&v.path[0]!=="/"&&S.push("/")),v.path!==void 0){let O=v.path;!E.absolutePath&&(!C||!C.absolutePath)&&(O=t(O)),x===void 0&&O[0]==="/"&&O[1]==="/"&&(O="/%2F"+O.slice(2)),S.push(O)}return v.query!==void 0&&S.push("?",v.query),v.fragment!==void 0&&S.push("#",v.fragment),S.join("")}const b=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function y(w,T){const v=Object.assign({},T),E={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let S=!1;v.reference==="suffix"&&(v.scheme?w=v.scheme+":"+w:w="//"+w);const C=w.match(b);if(C){if(E.scheme=C[1],E.userinfo=C[3],E.host=C[4],E.port=parseInt(C[5],10),E.path=C[6]||"",E.query=C[7],E.fragment=C[8],isNaN(E.port)&&(E.port=C[5]),E.host)if(o(E.host)===!1){const M=e(E.host);E.host=M.host.toLowerCase(),S=M.isIPV6}else S=!0;E.scheme===void 0&&E.userinfo===void 0&&E.host===void 0&&E.port===void 0&&E.query===void 0&&!E.path?E.reference="same-document":E.scheme===void 0?E.reference="relative":E.fragment===void 0?E.reference="absolute":E.reference="uri",v.reference&&v.reference!=="suffix"&&v.reference!==E.reference&&(E.error=E.error||"URI is not a "+v.reference+" reference.");const x=c(v.scheme||E.scheme);if(!v.unicodeSupport&&(!x||!x.unicodeSupport)&&E.host&&(v.domainHost||x&&x.domainHost)&&S===!1&&s(E.host))try{E.host=URL.domainToASCII(E.host.toLowerCase())}catch(O){E.error=E.error||"Host's domain name can not be converted to ASCII: "+O}(!x||x&&!x.skipNormalize)&&(w.indexOf("%")!==-1&&(E.scheme!==void 0&&(E.scheme=unescape(E.scheme)),E.host!==void 0&&(E.host=unescape(E.host))),E.path&&(E.path=escape(unescape(E.path))),E.fragment&&(E.fragment=encodeURI(decodeURIComponent(E.fragment)))),x&&x.parse&&x.parse(E,v)}else E.error=E.error||"URI can not be parsed.";return E}const _={SCHEMES:l,normalize:u,resolve:d,resolveComponent:h,equal:p,serialize:g,parse:y};return vd.exports=_,vd.exports.default=_,vd.exports.fastUri=_,vd.exports}var ZA;function wJ(){if(ZA)return Em;ZA=1,Object.defineProperty(Em,"__esModule",{value:!0});const e=mN();return e.code='require("ajv/dist/runtime/uri").default',Em.default=e,Em}var WA;function xJ(){return WA||(WA=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=a0();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var n=Ot();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});const r=A_(),o=l0(),s=fN(),l=k_(),c=Ot(),u=s0(),d=cy(),h=rn(),p=bJ,g=wJ(),b=(ne,$)=>new RegExp(ne,$);b.code="new RegExp";const y=["removeAdditional","useDefaults","coerceTypes"],_=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),w={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."},T={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},v=200;function E(ne){var $,V,U,D,B,te,re,le,ge,Me,Q,ie,de,_e,Te,we,$e,Ze,ye,Fe,Re,We,ze,Le,Ue;const dt=ne.strict,Ce=($=ne.code)===null||$===void 0?void 0:$.optimize,pe=Ce===!0||Ce===void 0?1:Ce||0,Ne=(U=(V=ne.code)===null||V===void 0?void 0:V.regExp)!==null&&U!==void 0?U:b,Be=(D=ne.uriResolver)!==null&&D!==void 0?D:g.default;return{strictSchema:(te=(B=ne.strictSchema)!==null&&B!==void 0?B:dt)!==null&&te!==void 0?te:!0,strictNumbers:(le=(re=ne.strictNumbers)!==null&&re!==void 0?re:dt)!==null&&le!==void 0?le:!0,strictTypes:(Me=(ge=ne.strictTypes)!==null&&ge!==void 0?ge:dt)!==null&&Me!==void 0?Me:"log",strictTuples:(ie=(Q=ne.strictTuples)!==null&&Q!==void 0?Q:dt)!==null&&ie!==void 0?ie:"log",strictRequired:(_e=(de=ne.strictRequired)!==null&&de!==void 0?de:dt)!==null&&_e!==void 0?_e:!1,code:ne.code?{...ne.code,optimize:pe,regExp:Ne}:{optimize:pe,regExp:Ne},loopRequired:(Te=ne.loopRequired)!==null&&Te!==void 0?Te:v,loopEnum:(we=ne.loopEnum)!==null&&we!==void 0?we:v,meta:($e=ne.meta)!==null&&$e!==void 0?$e:!0,messages:(Ze=ne.messages)!==null&&Ze!==void 0?Ze:!0,inlineRefs:(ye=ne.inlineRefs)!==null&&ye!==void 0?ye:!0,schemaId:(Fe=ne.schemaId)!==null&&Fe!==void 0?Fe:"$id",addUsedSchema:(Re=ne.addUsedSchema)!==null&&Re!==void 0?Re:!0,validateSchema:(We=ne.validateSchema)!==null&&We!==void 0?We:!0,validateFormats:(ze=ne.validateFormats)!==null&&ze!==void 0?ze:!0,unicodeRegExp:(Le=ne.unicodeRegExp)!==null&&Le!==void 0?Le:!0,int32range:(Ue=ne.int32range)!==null&&Ue!==void 0?Ue:!0,uriResolver:Be}}class S{constructor($={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,$=this.opts={...$,...E($)};const{es5:V,lines:U}=this.opts.code;this.scope=new c.ValueScope({scope:{},prefixes:_,es5:V,lines:U}),this.logger=q($.logger);const D=$.validateFormats;$.validateFormats=!1,this.RULES=(0,s.getRules)(),C.call(this,w,$,"NOT SUPPORTED"),C.call(this,T,$,"DEPRECATED","warn"),this._metaOpts=z.call(this),$.formats&&M.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),$.keywords&&P.call(this,$.keywords),typeof $.meta=="object"&&this.addMetaSchema($.meta),O.call(this),$.validateFormats=D}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:$,meta:V,schemaId:U}=this.opts;let D=p;U==="id"&&(D={...p},D.id=D.$id,delete D.$id),V&&$&&this.addMetaSchema(D,D[U],!1)}defaultMeta(){const{meta:$,schemaId:V}=this.opts;return this.opts.defaultMeta=typeof $=="object"?$[V]||$:void 0}validate($,V){let U;if(typeof $=="string"){if(U=this.getSchema($),!U)throw new Error(`no schema with key or ref "${$}"`)}else U=this.compile($);const D=U(V);return"$async"in U||(this.errors=U.errors),D}compile($,V){const U=this._addSchema($,V);return U.validate||this._compileSchemaEnv(U)}compileAsync($,V){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:U}=this.opts;return D.call(this,$,V);async function D(Me,Q){await B.call(this,Me.$schema);const ie=this._addSchema(Me,Q);return ie.validate||te.call(this,ie)}async function B(Me){Me&&!this.getSchema(Me)&&await D.call(this,{$ref:Me},!0)}async function te(Me){try{return this._compileSchemaEnv(Me)}catch(Q){if(!(Q instanceof o.default))throw Q;return re.call(this,Q),await le.call(this,Q.missingSchema),te.call(this,Me)}}function re({missingSchema:Me,missingRef:Q}){if(this.refs[Me])throw new Error(`AnySchema ${Me} is loaded but ${Q} cannot be resolved`)}async function le(Me){const Q=await ge.call(this,Me);this.refs[Me]||await B.call(this,Q.$schema),this.refs[Me]||this.addSchema(Q,Me,V)}async function ge(Me){const Q=this._loading[Me];if(Q)return Q;try{return await(this._loading[Me]=U(Me))}finally{delete this._loading[Me]}}}addSchema($,V,U,D=this.opts.validateSchema){if(Array.isArray($)){for(const te of $)this.addSchema(te,void 0,U,D);return this}let B;if(typeof $=="object"){const{schemaId:te}=this.opts;if(B=$[te],B!==void 0&&typeof B!="string")throw new Error(`schema ${te} must be string`)}return V=(0,u.normalizeId)(V||B),this._checkUnique(V),this.schemas[V]=this._addSchema($,U,V,D,!0),this}addMetaSchema($,V,U=this.opts.validateSchema){return this.addSchema($,V,!0,U),this}validateSchema($,V){if(typeof $=="boolean")return!0;let U;if(U=$.$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 D=this.validate(U,$);if(!D&&V){const B="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(B);else throw new Error(B)}return D}getSchema($){let V;for(;typeof(V=x.call(this,$))=="string";)$=V;if(V===void 0){const{schemaId:U}=this.opts,D=new l.SchemaEnv({schema:{},schemaId:U});if(V=l.resolveSchema.call(this,D,$),!V)return;this.refs[$]=V}return V.validate||this._compileSchemaEnv(V)}removeSchema($){if($ instanceof RegExp)return this._removeAllSchemas(this.schemas,$),this._removeAllSchemas(this.refs,$),this;switch(typeof $){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const V=x.call(this,$);return typeof V=="object"&&this._cache.delete(V.schema),delete this.schemas[$],delete this.refs[$],this}case"object":{const V=$;this._cache.delete(V);let U=$[this.opts.schemaId];return U&&(U=(0,u.normalizeId)(U),delete this.schemas[U],delete this.refs[U]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary($){for(const V of $)this.addKeyword(V);return this}addKeyword($,V){let U;if(typeof $=="string")U=$,typeof V=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),V.keyword=U);else if(typeof $=="object"&&V===void 0){if(V=$,U=V.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(ee.call(this,U,V),!V)return(0,h.eachItem)(U,B=>J.call(this,B)),this;H.call(this,V);const D={...V,type:(0,d.getJSONTypes)(V.type),schemaType:(0,d.getJSONTypes)(V.schemaType)};return(0,h.eachItem)(U,D.type.length===0?B=>J.call(this,B,D):B=>D.type.forEach(te=>J.call(this,B,D,te))),this}getKeyword($){const V=this.RULES.all[$];return typeof V=="object"?V.definition:!!V}removeKeyword($){const{RULES:V}=this;delete V.keywords[$],delete V.all[$];for(const U of V.rules){const D=U.rules.findIndex(B=>B.keyword===$);D>=0&&U.rules.splice(D,1)}return this}addFormat($,V){return typeof V=="string"&&(V=new RegExp(V)),this.formats[$]=V,this}errorsText($=this.errors,{separator:V=", ",dataVar:U="data"}={}){return!$||$.length===0?"No errors":$.map(D=>`${U}${D.instancePath} ${D.message}`).reduce((D,B)=>D+V+B)}$dataMetaSchema($,V){const U=this.RULES.all;$=JSON.parse(JSON.stringify($));for(const D of V){const B=D.split("/").slice(1);let te=$;for(const re of B)te=te[re];for(const re in U){const le=U[re];if(typeof le!="object")continue;const{$data:ge}=le.definition,Me=te[re];ge&&Me&&(te[re]=oe(Me))}}return $}_removeAllSchemas($,V){for(const U in $){const D=$[U];(!V||V.test(U))&&(typeof D=="string"?delete $[U]:D&&!D.meta&&(this._cache.delete(D.schema),delete $[U]))}}_addSchema($,V,U,D=this.opts.validateSchema,B=this.opts.addUsedSchema){let te;const{schemaId:re}=this.opts;if(typeof $=="object")te=$[re];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof $!="boolean")throw new Error("schema must be object or boolean")}let le=this._cache.get($);if(le!==void 0)return le;U=(0,u.normalizeId)(te||U);const ge=u.getSchemaRefs.call(this,$,U);return le=new l.SchemaEnv({schema:$,schemaId:re,meta:V,baseId:U,localRefs:ge}),this._cache.set(le.schema,le),B&&!U.startsWith("#")&&(U&&this._checkUnique(U),this.refs[U]=le),D&&this.validateSchema($,!0),le}_checkUnique($){if(this.schemas[$]||this.refs[$])throw new Error(`schema with key or id "${$}" already exists`)}_compileSchemaEnv($){if($.meta?this._compileMetaSchema($):l.compileSchema.call(this,$),!$.validate)throw new Error("ajv implementation error");return $.validate}_compileMetaSchema($){const V=this.opts;this.opts=this._metaOpts;try{l.compileSchema.call(this,$)}finally{this.opts=V}}}S.ValidationError=r.default,S.MissingRefError=o.default,e.default=S;function C(ne,$,V,U="error"){for(const D in ne){const B=D;B in $&&this.logger[U](`${V}: option ${D}. ${ne[B]}`)}}function x(ne){return ne=(0,u.normalizeId)(ne),this.schemas[ne]||this.refs[ne]}function O(){const ne=this.opts.schemas;if(ne)if(Array.isArray(ne))this.addSchema(ne);else for(const $ in ne)this.addSchema(ne[$],$)}function M(){for(const ne in this.opts.formats){const $=this.opts.formats[ne];$&&this.addFormat(ne,$)}}function P(ne){if(Array.isArray(ne)){this.addVocabulary(ne);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const $ in ne){const V=ne[$];V.keyword||(V.keyword=$),this.addKeyword(V)}}function z(){const ne={...this.opts};for(const $ of y)delete ne[$];return ne}const I={log(){},warn(){},error(){}};function q(ne){if(ne===!1)return I;if(ne===void 0)return console;if(ne.log&&ne.warn&&ne.error)return ne;throw new Error("logger must implement log, warn and error methods")}const G=/^[a-z_$][a-z0-9_$:-]*$/i;function ee(ne,$){const{RULES:V}=this;if((0,h.eachItem)(ne,U=>{if(V.keywords[U])throw new Error(`Keyword ${U} is already defined`);if(!G.test(U))throw new Error(`Keyword ${U} has invalid name`)}),!!$&&$.$data&&!("code"in $||"validate"in $))throw new Error('$data keyword must have "code" or "validate" function')}function J(ne,$,V){var U;const D=$?.post;if(V&&D)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:B}=this;let te=D?B.post:B.rules.find(({type:le})=>le===V);if(te||(te={type:V,rules:[]},B.rules.push(te)),B.keywords[ne]=!0,!$)return;const re={keyword:ne,definition:{...$,type:(0,d.getJSONTypes)($.type),schemaType:(0,d.getJSONTypes)($.schemaType)}};$.before?Z.call(this,te,re,$.before):te.rules.push(re),B.all[ne]=re,(U=$.implements)===null||U===void 0||U.forEach(le=>this.addKeyword(le))}function Z(ne,$,V){const U=ne.rules.findIndex(D=>D.keyword===V);U>=0?ne.rules.splice(U,0,$):(ne.rules.push($),this.logger.warn(`rule ${V} is not defined`))}function H(ne){let{metaSchema:$}=ne;$!==void 0&&(ne.$data&&this.opts.$data&&($=oe($)),ne.validateSchema=this.compile($,!0))}const Y={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function oe(ne){return{anyOf:[ne,Y]}}})(n1)),n1}var Cm={},Tm={},Rm={},YA;function _J(){if(YA)return Rm;YA=1,Object.defineProperty(Rm,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Rm.default=e,Rm}var Sa={},XA;function EJ(){if(XA)return Sa;XA=1,Object.defineProperty(Sa,"__esModule",{value:!0}),Sa.callRef=Sa.getValidate=void 0;const e=l0(),t=Ti(),n=Ot(),r=tl(),o=k_(),s=rn(),l={keyword:"$ref",schemaType:"string",code(d){const{gen:h,schema:p,it:g}=d,{baseId:b,schemaEnv:y,validateName:_,opts:w,self:T}=g,{root:v}=y;if((p==="#"||p==="#/")&&b===v.baseId)return S();const E=o.resolveRef.call(T,v,b,p);if(E===void 0)throw new e.default(g.opts.uriResolver,b,p);if(E instanceof o.SchemaEnv)return C(E);return x(E);function S(){if(y===v)return u(d,_,y,y.$async);const O=h.scopeValue("root",{ref:v});return u(d,(0,n._)`${O}.validate`,v,v.$async)}function C(O){const M=c(d,O);u(d,M,O,O.$async)}function x(O){const M=h.scopeValue("schema",w.code.source===!0?{ref:O,code:(0,n.stringify)(O)}:{ref:O}),P=h.name("valid"),z=d.subschema({schema:O,dataTypes:[],schemaPath:n.nil,topSchemaRef:M,errSchemaPath:p},P);d.mergeEvaluated(z),d.ok(P)}}};function c(d,h){const{gen:p}=d;return h.validate?p.scopeValue("validate",{ref:h.validate}):(0,n._)`${p.scopeValue("wrapper",{ref:h})}.validate`}Sa.getValidate=c;function u(d,h,p,g){const{gen:b,it:y}=d,{allErrors:_,schemaEnv:w,opts:T}=y,v=T.passContext?r.default.this:n.nil;g?E():S();function E(){if(!w.$async)throw new Error("async schema referenced by sync schema");const O=b.let("valid");b.try(()=>{b.code((0,n._)`await ${(0,t.callValidateCode)(d,h,v)}`),x(h),_||b.assign(O,!0)},M=>{b.if((0,n._)`!(${M} instanceof ${y.ValidationError})`,()=>b.throw(M)),C(M),_||b.assign(O,!1)}),d.ok(O)}function S(){d.result((0,t.callValidateCode)(d,h,v),()=>x(h),()=>C(h))}function C(O){const M=(0,n._)`${O}.errors`;b.assign(r.default.vErrors,(0,n._)`${r.default.vErrors} === null ? ${M} : ${r.default.vErrors}.concat(${M})`),b.assign(r.default.errors,(0,n._)`${r.default.vErrors}.length`)}function x(O){var M;if(!y.opts.unevaluated)return;const P=(M=p?.validate)===null||M===void 0?void 0:M.evaluated;if(y.props!==!0)if(P&&!P.dynamicProps)P.props!==void 0&&(y.props=s.mergeEvaluated.props(b,P.props,y.props));else{const z=b.var("props",(0,n._)`${O}.evaluated.props`);y.props=s.mergeEvaluated.props(b,z,y.props,n.Name)}if(y.items!==!0)if(P&&!P.dynamicItems)P.items!==void 0&&(y.items=s.mergeEvaluated.items(b,P.items,y.items));else{const z=b.var("items",(0,n._)`${O}.evaluated.items`);y.items=s.mergeEvaluated.items(b,z,y.items,n.Name)}}}return Sa.callRef=u,Sa.default=l,Sa}var QA;function CJ(){if(QA)return Tm;QA=1,Object.defineProperty(Tm,"__esModule",{value:!0});const e=_J(),t=EJ(),n=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return Tm.default=n,Tm}var Om={},Am={},JA;function TJ(){if(JA)return Am;JA=1,Object.defineProperty(Am,"__esModule",{value:!0});const e=Ot(),t=e.operators,n={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}},r={message:({keyword:s,schemaCode:l})=>(0,e.str)`must be ${n[s].okStr} ${l}`,params:({keyword:s,schemaCode:l})=>(0,e._)`{comparison: ${n[s].okStr}, limit: ${l}}`},o={keyword:Object.keys(n),type:"number",schemaType:"number",$data:!0,error:r,code(s){const{keyword:l,data:c,schemaCode:u}=s;s.fail$data((0,e._)`${c} ${n[l].fail} ${u} || isNaN(${c})`)}};return Am.default=o,Am}var km={},ek;function RJ(){if(ek)return km;ek=1,Object.defineProperty(km,"__esModule",{value:!0});const e=Ot(),n={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:r})=>(0,e.str)`must be multiple of ${r}`,params:({schemaCode:r})=>(0,e._)`{multipleOf: ${r}}`},code(r){const{gen:o,data:s,schemaCode:l,it:c}=r,u=c.opts.multipleOfPrecision,d=o.let("res"),h=u?(0,e._)`Math.abs(Math.round(${d}) - ${d}) > 1e-${u}`:(0,e._)`${d} !== parseInt(${d})`;r.fail$data((0,e._)`(${l} === 0 || (${d} = ${s}/${l}, ${h}))`)}};return km.default=n,km}var Mm={},jm={},tk;function OJ(){if(tk)return jm;tk=1,Object.defineProperty(jm,"__esModule",{value:!0});function e(t){const n=t.length;let r=0,o=0,s;for(;o<n;)r++,s=t.charCodeAt(o++),s>=55296&&s<=56319&&o<n&&(s=t.charCodeAt(o),(s&64512)===56320&&o++);return r}return jm.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',jm}var nk;function AJ(){if(nk)return Mm;nk=1,Object.defineProperty(Mm,"__esModule",{value:!0});const e=Ot(),t=rn(),n=OJ(),o={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:s,schemaCode:l}){const c=s==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${c} than ${l} characters`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},code(s){const{keyword:l,data:c,schemaCode:u,it:d}=s,h=l==="maxLength"?e.operators.GT:e.operators.LT,p=d.opts.unicode===!1?(0,e._)`${c}.length`:(0,e._)`${(0,t.useFunc)(s.gen,n.default)}(${c})`;s.fail$data((0,e._)`${p} ${h} ${u}`)}};return Mm.default=o,Mm}var Pm={},rk;function kJ(){if(rk)return Pm;rk=1,Object.defineProperty(Pm,"__esModule",{value:!0});const e=Ti(),t=Ot(),r={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:o})=>(0,t.str)`must match pattern "${o}"`,params:({schemaCode:o})=>(0,t._)`{pattern: ${o}}`},code(o){const{data:s,$data:l,schema:c,schemaCode:u,it:d}=o,h=d.opts.unicodeRegExp?"u":"",p=l?(0,t._)`(new RegExp(${u}, ${h}))`:(0,e.usePattern)(o,c);o.fail$data((0,t._)`!${p}.test(${s})`)}};return Pm.default=r,Pm}var Nm={},ok;function MJ(){if(ok)return Nm;ok=1,Object.defineProperty(Nm,"__esModule",{value:!0});const e=Ot(),n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:r,schemaCode:o}){const s=r==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${o} properties`},params:({schemaCode:r})=>(0,e._)`{limit: ${r}}`},code(r){const{keyword:o,data:s,schemaCode:l}=r,c=o==="maxProperties"?e.operators.GT:e.operators.LT;r.fail$data((0,e._)`Object.keys(${s}).length ${c} ${l}`)}};return Nm.default=n,Nm}var Dm={},ik;function jJ(){if(ik)return Dm;ik=1,Object.defineProperty(Dm,"__esModule",{value:!0});const e=Ti(),t=Ot(),n=rn(),o={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:s}})=>(0,t.str)`must have required property '${s}'`,params:({params:{missingProperty:s}})=>(0,t._)`{missingProperty: ${s}}`},code(s){const{gen:l,schema:c,schemaCode:u,data:d,$data:h,it:p}=s,{opts:g}=p;if(!h&&c.length===0)return;const b=c.length>=g.loopRequired;if(p.allErrors?y():_(),g.strictRequired){const v=s.parentSchema.properties,{definedProperties:E}=s.it;for(const S of c)if(v?.[S]===void 0&&!E.has(S)){const C=p.schemaEnv.baseId+p.errSchemaPath,x=`required property "${S}" is not defined at "${C}" (strictRequired)`;(0,n.checkStrictMode)(p,x,p.opts.strictRequired)}}function y(){if(b||h)s.block$data(t.nil,w);else for(const v of c)(0,e.checkReportMissingProp)(s,v)}function _(){const v=l.let("missing");if(b||h){const E=l.let("valid",!0);s.block$data(E,()=>T(v,E)),s.ok(E)}else l.if((0,e.checkMissingProp)(s,c,v)),(0,e.reportMissingProp)(s,v),l.else()}function w(){l.forOf("prop",u,v=>{s.setParams({missingProperty:v}),l.if((0,e.noPropertyInData)(l,d,v,g.ownProperties),()=>s.error())})}function T(v,E){s.setParams({missingProperty:v}),l.forOf(v,u,()=>{l.assign(E,(0,e.propertyInData)(l,d,v,g.ownProperties)),l.if((0,t.not)(E),()=>{s.error(),l.break()})},t.nil)}}};return Dm.default=o,Dm}var $m={},sk;function PJ(){if(sk)return $m;sk=1,Object.defineProperty($m,"__esModule",{value:!0});const e=Ot(),n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:r,schemaCode:o}){const s=r==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${o} items`},params:({schemaCode:r})=>(0,e._)`{limit: ${r}}`},code(r){const{keyword:o,data:s,schemaCode:l}=r,c=o==="maxItems"?e.operators.GT:e.operators.LT;r.fail$data((0,e._)`${s}.length ${c} ${l}`)}};return $m.default=n,$m}var Im={},zm={},ak;function M_(){if(ak)return zm;ak=1,Object.defineProperty(zm,"__esModule",{value:!0});const e=hN();return e.code='require("ajv/dist/runtime/equal").default',zm.default=e,zm}var lk;function NJ(){if(lk)return Im;lk=1,Object.defineProperty(Im,"__esModule",{value:!0});const e=cy(),t=Ot(),n=rn(),r=M_(),s={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:l,j:c}})=>(0,t.str)`must NOT have duplicate items (items ## ${c} and ${l} are identical)`,params:({params:{i:l,j:c}})=>(0,t._)`{i: ${l}, j: ${c}}`},code(l){const{gen:c,data:u,$data:d,schema:h,parentSchema:p,schemaCode:g,it:b}=l;if(!d&&!h)return;const y=c.let("valid"),_=p.items?(0,e.getSchemaTypes)(p.items):[];l.block$data(y,w,(0,t._)`${g} === false`),l.ok(y);function w(){const S=c.let("i",(0,t._)`${u}.length`),C=c.let("j");l.setParams({i:S,j:C}),c.assign(y,!0),c.if((0,t._)`${S} > 1`,()=>(T()?v:E)(S,C))}function T(){return _.length>0&&!_.some(S=>S==="object"||S==="array")}function v(S,C){const x=c.name("item"),O=(0,e.checkDataTypes)(_,x,b.opts.strictNumbers,e.DataType.Wrong),M=c.const("indices",(0,t._)`{}`);c.for((0,t._)`;${S}--;`,()=>{c.let(x,(0,t._)`${u}[${S}]`),c.if(O,(0,t._)`continue`),_.length>1&&c.if((0,t._)`typeof ${x} == "string"`,(0,t._)`${x} += "_"`),c.if((0,t._)`typeof ${M}[${x}] == "number"`,()=>{c.assign(C,(0,t._)`${M}[${x}]`),l.error(),c.assign(y,!1).break()}).code((0,t._)`${M}[${x}] = ${S}`)})}function E(S,C){const x=(0,n.useFunc)(c,r.default),O=c.name("outer");c.label(O).for((0,t._)`;${S}--;`,()=>c.for((0,t._)`${C} = ${S}; ${C}--;`,()=>c.if((0,t._)`${x}(${u}[${S}], ${u}[${C}])`,()=>{l.error(),c.assign(y,!1).break(O)})))}}};return Im.default=s,Im}var Lm={},ck;function DJ(){if(ck)return Lm;ck=1,Object.defineProperty(Lm,"__esModule",{value:!0});const e=Ot(),t=rn(),n=M_(),o={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:s})=>(0,e._)`{allowedValue: ${s}}`},code(s){const{gen:l,data:c,$data:u,schemaCode:d,schema:h}=s;u||h&&typeof h=="object"?s.fail$data((0,e._)`!${(0,t.useFunc)(l,n.default)}(${c}, ${d})`):s.fail((0,e._)`${h} !== ${c}`)}};return Lm.default=o,Lm}var Fm={},uk;function $J(){if(uk)return Fm;uk=1,Object.defineProperty(Fm,"__esModule",{value:!0});const e=Ot(),t=rn(),n=M_(),o={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:s})=>(0,e._)`{allowedValues: ${s}}`},code(s){const{gen:l,data:c,$data:u,schema:d,schemaCode:h,it:p}=s;if(!u&&d.length===0)throw new Error("enum must have non-empty array");const g=d.length>=p.opts.loopEnum;let b;const y=()=>b??(b=(0,t.useFunc)(l,n.default));let _;if(g||u)_=l.let("valid"),s.block$data(_,w);else{if(!Array.isArray(d))throw new Error("ajv implementation error");const v=l.const("vSchema",h);_=(0,e.or)(...d.map((E,S)=>T(v,S)))}s.pass(_);function w(){l.assign(_,!1),l.forOf("v",h,v=>l.if((0,e._)`${y()}(${c}, ${v})`,()=>l.assign(_,!0).break()))}function T(v,E){const S=d[E];return typeof S=="object"&&S!==null?(0,e._)`${y()}(${c}, ${v}[${E}])`:(0,e._)`${c} === ${S}`}}};return Fm.default=o,Fm}var fk;function IJ(){if(fk)return Om;fk=1,Object.defineProperty(Om,"__esModule",{value:!0});const e=TJ(),t=RJ(),n=AJ(),r=kJ(),o=MJ(),s=jJ(),l=PJ(),c=NJ(),u=DJ(),d=$J(),h=[e.default,t.default,n.default,r.default,o.default,s.default,l.default,c.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},u.default,d.default];return Om.default=h,Om}var Um={},Qc={},dk;function gN(){if(dk)return Qc;dk=1,Object.defineProperty(Qc,"__esModule",{value:!0}),Qc.validateAdditionalItems=void 0;const e=Ot(),t=rn(),r={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:s}})=>(0,e.str)`must NOT have more than ${s} items`,params:({params:{len:s}})=>(0,e._)`{limit: ${s}}`},code(s){const{parentSchema:l,it:c}=s,{items:u}=l;if(!Array.isArray(u)){(0,t.checkStrictMode)(c,'"additionalItems" is ignored when "items" is not an array of schemas');return}o(s,u)}};function o(s,l){const{gen:c,schema:u,data:d,keyword:h,it:p}=s;p.items=!0;const g=c.const("len",(0,e._)`${d}.length`);if(u===!1)s.setParams({len:l.length}),s.pass((0,e._)`${g} <= ${l.length}`);else if(typeof u=="object"&&!(0,t.alwaysValidSchema)(p,u)){const y=c.var("valid",(0,e._)`${g} <= ${l.length}`);c.if((0,e.not)(y),()=>b(y)),s.ok(y)}function b(y){c.forRange("i",l.length,g,_=>{s.subschema({keyword:h,dataProp:_,dataPropType:t.Type.Num},y),p.allErrors||c.if((0,e.not)(y),()=>c.break())})}}return Qc.validateAdditionalItems=o,Qc.default=r,Qc}var Vm={},Jc={},hk;function yN(){if(hk)return Jc;hk=1,Object.defineProperty(Jc,"__esModule",{value:!0}),Jc.validateTuple=void 0;const e=Ot(),t=rn(),n=Ti(),r={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(s){const{schema:l,it:c}=s;if(Array.isArray(l))return o(s,"additionalItems",l);c.items=!0,!(0,t.alwaysValidSchema)(c,l)&&s.ok((0,n.validateArray)(s))}};function o(s,l,c=s.schema){const{gen:u,parentSchema:d,data:h,keyword:p,it:g}=s;_(d),g.opts.unevaluated&&c.length&&g.items!==!0&&(g.items=t.mergeEvaluated.items(u,c.length,g.items));const b=u.name("valid"),y=u.const("len",(0,e._)`${h}.length`);c.forEach((w,T)=>{(0,t.alwaysValidSchema)(g,w)||(u.if((0,e._)`${y} > ${T}`,()=>s.subschema({keyword:p,schemaProp:T,dataProp:T},b)),s.ok(b))});function _(w){const{opts:T,errSchemaPath:v}=g,E=c.length,S=E===w.minItems&&(E===w.maxItems||w[l]===!1);if(T.strictTuples&&!S){const C=`"${p}" is ${E}-tuple, but minItems or maxItems/${l} are not specified or different at path "${v}"`;(0,t.checkStrictMode)(g,C,T.strictTuples)}}}return Jc.validateTuple=o,Jc.default=r,Jc}var pk;function zJ(){if(pk)return Vm;pk=1,Object.defineProperty(Vm,"__esModule",{value:!0});const e=yN(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:n=>(0,e.validateTuple)(n,"items")};return Vm.default=t,Vm}var qm={},mk;function LJ(){if(mk)return qm;mk=1,Object.defineProperty(qm,"__esModule",{value:!0});const e=Ot(),t=rn(),n=Ti(),r=gN(),s={keyword:"items",type:"array",schemaType:["object","boolean"],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{schema:c,parentSchema:u,it:d}=l,{prefixItems:h}=u;d.items=!0,!(0,t.alwaysValidSchema)(d,c)&&(h?(0,r.validateAdditionalItems)(l,h):l.ok((0,n.validateArray)(l)))}};return qm.default=s,qm}var Bm={},gk;function FJ(){if(gk)return Bm;gk=1,Object.defineProperty(Bm,"__esModule",{value:!0});const e=Ot(),t=rn(),r={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:o,max:s}})=>s===void 0?(0,e.str)`must contain at least ${o} valid item(s)`:(0,e.str)`must contain at least ${o} and no more than ${s} valid item(s)`,params:({params:{min:o,max:s}})=>s===void 0?(0,e._)`{minContains: ${o}}`:(0,e._)`{minContains: ${o}, maxContains: ${s}}`},code(o){const{gen:s,schema:l,parentSchema:c,data:u,it:d}=o;let h,p;const{minContains:g,maxContains:b}=c;d.opts.next?(h=g===void 0?1:g,p=b):h=1;const y=s.const("len",(0,e._)`${u}.length`);if(o.setParams({min:h,max:p}),p===void 0&&h===0){(0,t.checkStrictMode)(d,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(p!==void 0&&h>p){(0,t.checkStrictMode)(d,'"minContains" > "maxContains" is always invalid'),o.fail();return}if((0,t.alwaysValidSchema)(d,l)){let E=(0,e._)`${y} >= ${h}`;p!==void 0&&(E=(0,e._)`${E} && ${y} <= ${p}`),o.pass(E);return}d.items=!0;const _=s.name("valid");p===void 0&&h===1?T(_,()=>s.if(_,()=>s.break())):h===0?(s.let(_,!0),p!==void 0&&s.if((0,e._)`${u}.length > 0`,w)):(s.let(_,!1),w()),o.result(_,()=>o.reset());function w(){const E=s.name("_valid"),S=s.let("count",0);T(E,()=>s.if(E,()=>v(S)))}function T(E,S){s.forRange("i",0,y,C=>{o.subschema({keyword:"contains",dataProp:C,dataPropType:t.Type.Num,compositeRule:!0},E),S()})}function v(E){s.code((0,e._)`${E}++`),p===void 0?s.if((0,e._)`${E} >= ${h}`,()=>s.assign(_,!0).break()):(s.if((0,e._)`${E} > ${p}`,()=>s.assign(_,!1).break()),h===1?s.assign(_,!0):s.if((0,e._)`${E} >= ${h}`,()=>s.assign(_,!0)))}}};return Bm.default=r,Bm}var f1={},yk;function UJ(){return yk||(yk=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=Ot(),n=rn(),r=Ti();e.error={message:({params:{property:u,depsCount:d,deps:h}})=>{const p=d===1?"property":"properties";return(0,t.str)`must have ${p} ${h} when property ${u} is present`},params:({params:{property:u,depsCount:d,deps:h,missingProperty:p}})=>(0,t._)`{property: ${u},
53
- missingProperty: ${p},
54
- depsCount: ${d},
55
- deps: ${h}}`};const o={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(u){const[d,h]=s(u);l(u,d),c(u,h)}};function s({schema:u}){const d={},h={};for(const p in u){if(p==="__proto__")continue;const g=Array.isArray(u[p])?d:h;g[p]=u[p]}return[d,h]}function l(u,d=u.schema){const{gen:h,data:p,it:g}=u;if(Object.keys(d).length===0)return;const b=h.let("missing");for(const y in d){const _=d[y];if(_.length===0)continue;const w=(0,r.propertyInData)(h,p,y,g.opts.ownProperties);u.setParams({property:y,depsCount:_.length,deps:_.join(", ")}),g.allErrors?h.if(w,()=>{for(const T of _)(0,r.checkReportMissingProp)(u,T)}):(h.if((0,t._)`${w} && (${(0,r.checkMissingProp)(u,_,b)})`),(0,r.reportMissingProp)(u,b),h.else())}}e.validatePropertyDeps=l;function c(u,d=u.schema){const{gen:h,data:p,keyword:g,it:b}=u,y=h.name("valid");for(const _ in d)(0,n.alwaysValidSchema)(b,d[_])||(h.if((0,r.propertyInData)(h,p,_,b.opts.ownProperties),()=>{const w=u.subschema({keyword:g,schemaProp:_},y);u.mergeValidEvaluated(w,y)},()=>h.var(y,!0)),u.ok(y))}e.validateSchemaDeps=c,e.default=o})(f1)),f1}var Hm={},vk;function VJ(){if(vk)return Hm;vk=1,Object.defineProperty(Hm,"__esModule",{value:!0});const e=Ot(),t=rn(),r={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:o})=>(0,e._)`{propertyName: ${o.propertyName}}`},code(o){const{gen:s,schema:l,data:c,it:u}=o;if((0,t.alwaysValidSchema)(u,l))return;const d=s.name("valid");s.forIn("key",c,h=>{o.setParams({propertyName:h}),o.subschema({keyword:"propertyNames",data:h,dataTypes:["string"],propertyName:h,compositeRule:!0},d),s.if((0,e.not)(d),()=>{o.error(!0),u.allErrors||s.break()})}),o.ok(d)}};return Hm.default=r,Hm}var Km={},bk;function vN(){if(bk)return Km;bk=1,Object.defineProperty(Km,"__esModule",{value:!0});const e=Ti(),t=Ot(),n=tl(),r=rn(),s={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:l})=>(0,t._)`{additionalProperty: ${l.additionalProperty}}`},code(l){const{gen:c,schema:u,parentSchema:d,data:h,errsCount:p,it:g}=l;if(!p)throw new Error("ajv implementation error");const{allErrors:b,opts:y}=g;if(g.props=!0,y.removeAdditional!=="all"&&(0,r.alwaysValidSchema)(g,u))return;const _=(0,e.allSchemaProperties)(d.properties),w=(0,e.allSchemaProperties)(d.patternProperties);T(),l.ok((0,t._)`${p} === ${n.default.errors}`);function T(){c.forIn("key",h,x=>{!_.length&&!w.length?S(x):c.if(v(x),()=>S(x))})}function v(x){let O;if(_.length>8){const M=(0,r.schemaRefOrVal)(g,d.properties,"properties");O=(0,e.isOwnProperty)(c,M,x)}else _.length?O=(0,t.or)(..._.map(M=>(0,t._)`${x} === ${M}`)):O=t.nil;return w.length&&(O=(0,t.or)(O,...w.map(M=>(0,t._)`${(0,e.usePattern)(l,M)}.test(${x})`))),(0,t.not)(O)}function E(x){c.code((0,t._)`delete ${h}[${x}]`)}function S(x){if(y.removeAdditional==="all"||y.removeAdditional&&u===!1){E(x);return}if(u===!1){l.setParams({additionalProperty:x}),l.error(),b||c.break();return}if(typeof u=="object"&&!(0,r.alwaysValidSchema)(g,u)){const O=c.name("valid");y.removeAdditional==="failing"?(C(x,O,!1),c.if((0,t.not)(O),()=>{l.reset(),E(x)})):(C(x,O),b||c.if((0,t.not)(O),()=>c.break()))}}function C(x,O,M){const P={keyword:"additionalProperties",dataProp:x,dataPropType:r.Type.Str};M===!1&&Object.assign(P,{compositeRule:!0,createErrors:!1,allErrors:!1}),l.subschema(P,O)}}};return Km.default=s,Km}var Gm={},Sk;function qJ(){if(Sk)return Gm;Sk=1,Object.defineProperty(Gm,"__esModule",{value:!0});const e=a0(),t=Ti(),n=rn(),r=vN(),o={keyword:"properties",type:"object",schemaType:"object",code(s){const{gen:l,schema:c,parentSchema:u,data:d,it:h}=s;h.opts.removeAdditional==="all"&&u.additionalProperties===void 0&&r.default.code(new e.KeywordCxt(h,r.default,"additionalProperties"));const p=(0,t.allSchemaProperties)(c);for(const w of p)h.definedProperties.add(w);h.opts.unevaluated&&p.length&&h.props!==!0&&(h.props=n.mergeEvaluated.props(l,(0,n.toHash)(p),h.props));const g=p.filter(w=>!(0,n.alwaysValidSchema)(h,c[w]));if(g.length===0)return;const b=l.name("valid");for(const w of g)y(w)?_(w):(l.if((0,t.propertyInData)(l,d,w,h.opts.ownProperties)),_(w),h.allErrors||l.else().var(b,!0),l.endIf()),s.it.definedProperties.add(w),s.ok(b);function y(w){return h.opts.useDefaults&&!h.compositeRule&&c[w].default!==void 0}function _(w){s.subschema({keyword:"properties",schemaProp:w,dataProp:w},b)}}};return Gm.default=o,Gm}var Zm={},wk;function BJ(){if(wk)return Zm;wk=1,Object.defineProperty(Zm,"__esModule",{value:!0});const e=Ti(),t=Ot(),n=rn(),r=rn(),o={keyword:"patternProperties",type:"object",schemaType:"object",code(s){const{gen:l,schema:c,data:u,parentSchema:d,it:h}=s,{opts:p}=h,g=(0,e.allSchemaProperties)(c),b=g.filter(S=>(0,n.alwaysValidSchema)(h,c[S]));if(g.length===0||b.length===g.length&&(!h.opts.unevaluated||h.props===!0))return;const y=p.strictSchema&&!p.allowMatchingProperties&&d.properties,_=l.name("valid");h.props!==!0&&!(h.props instanceof t.Name)&&(h.props=(0,r.evaluatedPropsToName)(l,h.props));const{props:w}=h;T();function T(){for(const S of g)y&&v(S),h.allErrors?E(S):(l.var(_,!0),E(S),l.if(_))}function v(S){for(const C in y)new RegExp(S).test(C)&&(0,n.checkStrictMode)(h,`property ${C} matches pattern ${S} (use allowMatchingProperties)`)}function E(S){l.forIn("key",u,C=>{l.if((0,t._)`${(0,e.usePattern)(s,S)}.test(${C})`,()=>{const x=b.includes(S);x||s.subschema({keyword:"patternProperties",schemaProp:S,dataProp:C,dataPropType:r.Type.Str},_),h.opts.unevaluated&&w!==!0?l.assign((0,t._)`${w}[${C}]`,!0):!x&&!h.allErrors&&l.if((0,t.not)(_),()=>l.break())})})}}};return Zm.default=o,Zm}var Wm={},xk;function HJ(){if(xk)return Wm;xk=1,Object.defineProperty(Wm,"__esModule",{value:!0});const e=rn(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(n){const{gen:r,schema:o,it:s}=n;if((0,e.alwaysValidSchema)(s,o)){n.fail();return}const l=r.name("valid");n.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},l),n.failResult(l,()=>n.reset(),()=>n.error())},error:{message:"must NOT be valid"}};return Wm.default=t,Wm}var Ym={},_k;function KJ(){if(_k)return Ym;_k=1,Object.defineProperty(Ym,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Ti().validateUnion,error:{message:"must match a schema in anyOf"}};return Ym.default=t,Ym}var Xm={},Ek;function GJ(){if(Ek)return Xm;Ek=1,Object.defineProperty(Xm,"__esModule",{value:!0});const e=Ot(),t=rn(),r={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:o})=>(0,e._)`{passingSchemas: ${o.passing}}`},code(o){const{gen:s,schema:l,parentSchema:c,it:u}=o;if(!Array.isArray(l))throw new Error("ajv implementation error");if(u.opts.discriminator&&c.discriminator)return;const d=l,h=s.let("valid",!1),p=s.let("passing",null),g=s.name("_valid");o.setParams({passing:p}),s.block(b),o.result(h,()=>o.reset(),()=>o.error(!0));function b(){d.forEach((y,_)=>{let w;(0,t.alwaysValidSchema)(u,y)?s.var(g,!0):w=o.subschema({keyword:"oneOf",schemaProp:_,compositeRule:!0},g),_>0&&s.if((0,e._)`${g} && ${h}`).assign(h,!1).assign(p,(0,e._)`[${p}, ${_}]`).else(),s.if(g,()=>{s.assign(h,!0),s.assign(p,_),w&&o.mergeEvaluated(w,e.Name)})})}}};return Xm.default=r,Xm}var Qm={},Ck;function ZJ(){if(Ck)return Qm;Ck=1,Object.defineProperty(Qm,"__esModule",{value:!0});const e=rn(),t={keyword:"allOf",schemaType:"array",code(n){const{gen:r,schema:o,it:s}=n;if(!Array.isArray(o))throw new Error("ajv implementation error");const l=r.name("valid");o.forEach((c,u)=>{if((0,e.alwaysValidSchema)(s,c))return;const d=n.subschema({keyword:"allOf",schemaProp:u},l);n.ok(l),n.mergeEvaluated(d)})}};return Qm.default=t,Qm}var Jm={},Tk;function WJ(){if(Tk)return Jm;Tk=1,Object.defineProperty(Jm,"__esModule",{value:!0});const e=Ot(),t=rn(),r={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:s})=>(0,e.str)`must match "${s.ifClause}" schema`,params:({params:s})=>(0,e._)`{failingKeyword: ${s.ifClause}}`},code(s){const{gen:l,parentSchema:c,it:u}=s;c.then===void 0&&c.else===void 0&&(0,t.checkStrictMode)(u,'"if" without "then" and "else" is ignored');const d=o(u,"then"),h=o(u,"else");if(!d&&!h)return;const p=l.let("valid",!0),g=l.name("_valid");if(b(),s.reset(),d&&h){const _=l.let("ifClause");s.setParams({ifClause:_}),l.if(g,y("then",_),y("else",_))}else d?l.if(g,y("then")):l.if((0,e.not)(g),y("else"));s.pass(p,()=>s.error(!0));function b(){const _=s.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},g);s.mergeEvaluated(_)}function y(_,w){return()=>{const T=s.subschema({keyword:_},g);l.assign(p,g),s.mergeValidEvaluated(T,p),w?l.assign(w,(0,e._)`${_}`):s.setParams({ifClause:_})}}}};function o(s,l){const c=s.schema[l];return c!==void 0&&!(0,t.alwaysValidSchema)(s,c)}return Jm.default=r,Jm}var eg={},Rk;function YJ(){if(Rk)return eg;Rk=1,Object.defineProperty(eg,"__esModule",{value:!0});const e=rn(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:n,parentSchema:r,it:o}){r.if===void 0&&(0,e.checkStrictMode)(o,`"${n}" without "if" is ignored`)}};return eg.default=t,eg}var Ok;function XJ(){if(Ok)return Um;Ok=1,Object.defineProperty(Um,"__esModule",{value:!0});const e=gN(),t=zJ(),n=yN(),r=LJ(),o=FJ(),s=UJ(),l=VJ(),c=vN(),u=qJ(),d=BJ(),h=HJ(),p=KJ(),g=GJ(),b=ZJ(),y=WJ(),_=YJ();function w(T=!1){const v=[h.default,p.default,g.default,b.default,y.default,_.default,l.default,c.default,s.default,u.default,d.default];return T?v.push(t.default,r.default):v.push(e.default,n.default),v.push(o.default),v}return Um.default=w,Um}var tg={},ng={},Ak;function QJ(){if(Ak)return ng;Ak=1,Object.defineProperty(ng,"__esModule",{value:!0});const e=Ot(),n={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:r})=>(0,e.str)`must match format "${r}"`,params:({schemaCode:r})=>(0,e._)`{format: ${r}}`},code(r,o){const{gen:s,data:l,$data:c,schema:u,schemaCode:d,it:h}=r,{opts:p,errSchemaPath:g,schemaEnv:b,self:y}=h;if(!p.validateFormats)return;c?_():w();function _(){const T=s.scopeValue("formats",{ref:y.formats,code:p.code.formats}),v=s.const("fDef",(0,e._)`${T}[${d}]`),E=s.let("fType"),S=s.let("format");s.if((0,e._)`typeof ${v} == "object" && !(${v} instanceof RegExp)`,()=>s.assign(E,(0,e._)`${v}.type || "string"`).assign(S,(0,e._)`${v}.validate`),()=>s.assign(E,(0,e._)`"string"`).assign(S,v)),r.fail$data((0,e.or)(C(),x()));function C(){return p.strictSchema===!1?e.nil:(0,e._)`${d} && !${S}`}function x(){const O=b.$async?(0,e._)`(${v}.async ? await ${S}(${l}) : ${S}(${l}))`:(0,e._)`${S}(${l})`,M=(0,e._)`(typeof ${S} == "function" ? ${O} : ${S}.test(${l}))`;return(0,e._)`${S} && ${S} !== true && ${E} === ${o} && !${M}`}}function w(){const T=y.formats[u];if(!T){C();return}if(T===!0)return;const[v,E,S]=x(T);v===o&&r.pass(O());function C(){if(p.strictSchema===!1){y.logger.warn(M());return}throw new Error(M());function M(){return`unknown format "${u}" ignored in schema at path "${g}"`}}function x(M){const P=M instanceof RegExp?(0,e.regexpCode)(M):p.code.formats?(0,e._)`${p.code.formats}${(0,e.getProperty)(u)}`:void 0,z=s.scopeValue("formats",{key:u,ref:M,code:P});return typeof M=="object"&&!(M instanceof RegExp)?[M.type||"string",M.validate,(0,e._)`${z}.validate`]:["string",M,z]}function O(){if(typeof T=="object"&&!(T instanceof RegExp)&&T.async){if(!b.$async)throw new Error("async format in sync schema");return(0,e._)`await ${S}(${l})`}return typeof E=="function"?(0,e._)`${S}(${l})`:(0,e._)`${S}.test(${l})`}}}};return ng.default=n,ng}var kk;function JJ(){if(kk)return tg;kk=1,Object.defineProperty(tg,"__esModule",{value:!0});const t=[QJ().default];return tg.default=t,tg}var Ml={},Mk;function eee(){return Mk||(Mk=1,Object.defineProperty(Ml,"__esModule",{value:!0}),Ml.contentVocabulary=Ml.metadataVocabulary=void 0,Ml.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Ml.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Ml}var jk;function tee(){if(jk)return Cm;jk=1,Object.defineProperty(Cm,"__esModule",{value:!0});const e=CJ(),t=IJ(),n=XJ(),r=JJ(),o=eee(),s=[e.default,t.default,(0,n.default)(),r.default,o.metadataVocabulary,o.contentVocabulary];return Cm.default=s,Cm}var rg={},bd={},Pk;function nee(){if(Pk)return bd;Pk=1,Object.defineProperty(bd,"__esModule",{value:!0}),bd.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(bd.DiscrError=e={})),bd}var Nk;function ree(){if(Nk)return rg;Nk=1,Object.defineProperty(rg,"__esModule",{value:!0});const e=Ot(),t=nee(),n=k_(),r=l0(),o=rn(),l={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:c,tagName:u}})=>c===t.DiscrError.Tag?`tag "${u}" must be string`:`value of tag "${u}" must be in oneOf`,params:({params:{discrError:c,tag:u,tagName:d}})=>(0,e._)`{error: ${c}, tag: ${d}, tagValue: ${u}}`},code(c){const{gen:u,data:d,schema:h,parentSchema:p,it:g}=c,{oneOf:b}=p;if(!g.opts.discriminator)throw new Error("discriminator: requires discriminator option");const y=h.propertyName;if(typeof y!="string")throw new Error("discriminator: requires propertyName");if(h.mapping)throw new Error("discriminator: mapping is not supported");if(!b)throw new Error("discriminator: requires oneOf keyword");const _=u.let("valid",!1),w=u.const("tag",(0,e._)`${d}${(0,e.getProperty)(y)}`);u.if((0,e._)`typeof ${w} == "string"`,()=>T(),()=>c.error(!1,{discrError:t.DiscrError.Tag,tag:w,tagName:y})),c.ok(_);function T(){const S=E();u.if(!1);for(const C in S)u.elseIf((0,e._)`${w} === ${C}`),u.assign(_,v(S[C]));u.else(),c.error(!1,{discrError:t.DiscrError.Mapping,tag:w,tagName:y}),u.endIf()}function v(S){const C=u.name("valid"),x=c.subschema({keyword:"oneOf",schemaProp:S},C);return c.mergeEvaluated(x,e.Name),C}function E(){var S;const C={},x=M(p);let O=!0;for(let I=0;I<b.length;I++){let q=b[I];if(q?.$ref&&!(0,o.schemaHasRulesButRef)(q,g.self.RULES)){const ee=q.$ref;if(q=n.resolveRef.call(g.self,g.schemaEnv.root,g.baseId,ee),q instanceof n.SchemaEnv&&(q=q.schema),q===void 0)throw new r.default(g.opts.uriResolver,g.baseId,ee)}const G=(S=q?.properties)===null||S===void 0?void 0:S[y];if(typeof G!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${y}"`);O=O&&(x||M(q)),P(G,I)}if(!O)throw new Error(`discriminator: "${y}" must be required`);return C;function M({required:I}){return Array.isArray(I)&&I.includes(y)}function P(I,q){if(I.const)z(I.const,q);else if(I.enum)for(const G of I.enum)z(G,q);else throw new Error(`discriminator: "properties/${y}" must have "const" or "enum"`)}function z(I,q){if(typeof I!="string"||I in C)throw new Error(`discriminator: "${y}" values must be unique strings`);C[I]=q}}}};return rg.default=l,rg}const oee="http://json-schema.org/draft-07/schema#",iee="http://json-schema.org/draft-07/schema#",see="Core schema meta-schema",aee={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:[]}},lee=["object","boolean"],cee={$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:"#"}},uee={$schema:oee,$id:iee,title:see,definitions:aee,type:lee,properties:cee,default:!0};var Dk;function j_(){return Dk||(Dk=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 n=xJ(),r=tee(),o=ree(),s=uee,l=["/properties"],c="http://json-schema.org/draft-07/schema";class u extends n.default{_addVocabularies(){super._addVocabularies(),r.default.forEach(y=>this.addVocabulary(y)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const y=this.opts.$data?this.$dataMetaSchema(s,l):s;this.addMetaSchema(y,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}t.Ajv=u,e.exports=t=u,e.exports.Ajv=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var d=a0();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var h=Ot();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return h._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return h.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return h.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return h.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return h.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return h.CodeGen}});var p=A_();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return p.default}});var g=l0();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return g.default}})})(Sm,Sm.exports)),Sm.exports}var fee=j_();const bN=ts(fee);var og={exports:{}},d1={},$k;function dee(){return $k||($k=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(I,q){return{validate:I,compare:q}}e.fullFormats={date:t(s,l),time:t(u(!0),d),"date-time":t(g(!0),b),"iso-time":t(u(),h),"iso-date-time":t(g(),y),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:T,"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:z,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:E,int32:{type:"number",validate:x},int64:{type:"number",validate:O},float:{type:"number",validate:M},double:{type:"number",validate:M},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,l),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,d),"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,b),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,h),"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,y),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 n(I){return I%4===0&&(I%100!==0||I%400===0)}const r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,o=[0,31,28,31,30,31,30,31,31,30,31,30,31];function s(I){const q=r.exec(I);if(!q)return!1;const G=+q[1],ee=+q[2],J=+q[3];return ee>=1&&ee<=12&&J>=1&&J<=(ee===2&&n(G)?29:o[ee])}function l(I,q){if(I&&q)return I>q?1:I<q?-1:0}const c=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function u(I){return function(G){const ee=c.exec(G);if(!ee)return!1;const J=+ee[1],Z=+ee[2],H=+ee[3],Y=ee[4],oe=ee[5]==="-"?-1:1,ne=+(ee[6]||0),$=+(ee[7]||0);if(ne>23||$>59||I&&!Y)return!1;if(J<=23&&Z<=59&&H<60)return!0;const V=Z-$*oe,U=J-ne*oe-(V<0?1:0);return(U===23||U===-1)&&(V===59||V===-1)&&H<61}}function d(I,q){if(!(I&&q))return;const G=new Date("2020-01-01T"+I).valueOf(),ee=new Date("2020-01-01T"+q).valueOf();if(G&&ee)return G-ee}function h(I,q){if(!(I&&q))return;const G=c.exec(I),ee=c.exec(q);if(G&&ee)return I=G[1]+G[2]+G[3],q=ee[1]+ee[2]+ee[3],I>q?1:I<q?-1:0}const p=/t|\s/i;function g(I){const q=u(I);return function(ee){const J=ee.split(p);return J.length===2&&s(J[0])&&q(J[1])}}function b(I,q){if(!(I&&q))return;const G=new Date(I).valueOf(),ee=new Date(q).valueOf();if(G&&ee)return G-ee}function y(I,q){if(!(I&&q))return;const[G,ee]=I.split(p),[J,Z]=q.split(p),H=l(G,J);if(H!==void 0)return H||d(ee,Z)}const _=/\/|:/,w=/^(?:[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 T(I){return _.test(I)&&w.test(I)}const v=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function E(I){return v.lastIndex=0,v.test(I)}const S=-2147483648,C=2**31-1;function x(I){return Number.isInteger(I)&&I<=C&&I>=S}function O(I){return Number.isInteger(I)}function M(){return!0}const P=/[^\\]\\Z/;function z(I){if(P.test(I))return!1;try{return new RegExp(I),!0}catch{return!1}}})(d1)),d1}var h1={},Ik;function hee(){return Ik||(Ik=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=j_(),n=Ot(),r=n.operators,o={formatMaximum:{okStr:"<=",ok:r.LTE,fail:r.GT},formatMinimum:{okStr:">=",ok:r.GTE,fail:r.LT},formatExclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},formatExclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}},s={message:({keyword:c,schemaCode:u})=>(0,n.str)`should be ${o[c].okStr} ${u}`,params:({keyword:c,schemaCode:u})=>(0,n._)`{comparison: ${o[c].okStr}, limit: ${u}}`};e.formatLimitDefinition={keyword:Object.keys(o),type:"string",schemaType:"string",$data:!0,error:s,code(c){const{gen:u,data:d,schemaCode:h,keyword:p,it:g}=c,{opts:b,self:y}=g;if(!b.validateFormats)return;const _=new t.KeywordCxt(g,y.RULES.all.format.definition,"format");_.$data?w():T();function w(){const E=u.scopeValue("formats",{ref:y.formats,code:b.code.formats}),S=u.const("fmt",(0,n._)`${E}[${_.schemaCode}]`);c.fail$data((0,n.or)((0,n._)`typeof ${S} != "object"`,(0,n._)`${S} instanceof RegExp`,(0,n._)`typeof ${S}.compare != "function"`,v(S)))}function T(){const E=_.schema,S=y.formats[E];if(!S||S===!0)return;if(typeof S!="object"||S instanceof RegExp||typeof S.compare!="function")throw new Error(`"${p}": format "${E}" does not define "compare" function`);const C=u.scopeValue("formats",{key:E,ref:S,code:b.code.formats?(0,n._)`${b.code.formats}${(0,n.getProperty)(E)}`:void 0});c.fail$data(v(C))}function v(E){return(0,n._)`${E}.compare(${d}, ${h}) ${o[p].fail} 0`}},dependencies:["format"]};const l=c=>(c.addKeyword(e.formatLimitDefinition),c);e.default=l})(h1)),h1}var zk;function pee(){return zk||(zk=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const n=dee(),r=hee(),o=Ot(),s=new o.Name("fullFormats"),l=new o.Name("fastFormats"),c=(d,h={keywords:!0})=>{if(Array.isArray(h))return u(d,h,n.fullFormats,s),d;const[p,g]=h.mode==="fast"?[n.fastFormats,l]:[n.fullFormats,s],b=h.formats||n.formatNames;return u(d,b,p,g),h.keywords&&(0,r.default)(d),d};c.get=(d,h="full")=>{const g=(h==="fast"?n.fastFormats:n.fullFormats)[d];if(!g)throw new Error(`Unknown format "${d}"`);return g};function u(d,h,p,g){var b,y;(b=(y=d.opts.code).formats)!==null&&b!==void 0||(y.formats=(0,o._)`require("ajv-formats/dist/formats").${g}`);for(const _ of h)d.addFormat(_,p[_])}e.exports=t=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c})(og,og.exports)),og.exports}var mee=pee();const gee=ts(mee);function yee(){const e=new bN({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return gee(e),e}class vee{constructor(t){this._ajv=t??yee()}getValidator(t){const n="$id"in t&&typeof t.$id=="string"?this._ajv.getSchema(t.$id)??this._ajv.compile(t):this._ajv.compile(t);return r=>n(r)?{valid:!0,data:r,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(n.errors)}}}class bee{constructor(t){this._client=t}async*callToolStream(t,n=o0,r){const o=this._client,s={...r,task:r?.task??(o.isToolTask(t.name)?{}:void 0)},l=o.requestStream({method:"tools/call",params:t},n,s),c=o.getToolOutputValidator(t.name);for await(const u of l){if(u.type==="result"&&c){const d=u.result;if(!d.structuredContent&&!d.isError){yield{type:"error",error:new ht(_t.InvalidRequest,`Tool ${t.name} has an output schema but did not return structured content`)};return}if(d.structuredContent)try{const h=c(d.structuredContent);if(!h.valid){yield{type:"error",error:new ht(_t.InvalidParams,`Structured content does not match the tool's output schema: ${h.errorMessage}`)};return}}catch(h){if(h instanceof ht){yield{type:"error",error:h};return}yield{type:"error",error:new ht(_t.InvalidParams,`Failed to validate structured content: ${h instanceof Error?h.message:String(h)}`)};return}}yield u}}async getTask(t,n){return this._client.getTask({taskId:t},n)}async getTaskResult(t,n,r){return this._client.getTaskResult({taskId:t},n,r)}async listTasks(t,n){return this._client.listTasks(t?{cursor:t}:void 0,n)}async cancelTask(t,n){return this._client.cancelTask({taskId:t},n)}requestStream(t,n,r){return this._client.requestStream(t,n,r)}}function See(e,t,n){if(!e)throw new Error(`${n} does not support task creation (required for ${t})`);switch(t){case"tools/call":if(!e.tools?.call)throw new Error(`${n} does not support task creation for tools/call (required for ${t})`);break}}function wee(e,t,n){if(!e)throw new Error(`${n} does not support task creation (required for ${t})`);switch(t){case"sampling/createMessage":if(!e.sampling?.createMessage)throw new Error(`${n} does not support task creation for sampling/createMessage (required for ${t})`);break;case"elicitation/create":if(!e.elicitation?.create)throw new Error(`${n} does not support task creation for elicitation/create (required for ${t})`);break}}function Ng(e,t){if(!(!e||t===null||typeof t!="object")){if(e.type==="object"&&e.properties&&typeof e.properties=="object"){const n=t,r=e.properties;for(const o of Object.keys(r)){const s=r[o];n[o]===void 0&&Object.prototype.hasOwnProperty.call(s,"default")&&(n[o]=s.default),n[o]!==void 0&&Ng(s,n[o])}}if(Array.isArray(e.anyOf))for(const n of e.anyOf)typeof n!="boolean"&&Ng(n,t);if(Array.isArray(e.oneOf))for(const n of e.oneOf)typeof n!="boolean"&&Ng(n,t)}}function xee(e){if(!e)return{supportsFormMode:!1,supportsUrlMode:!1};const t=e.form!==void 0,n=e.url!==void 0;return{supportsFormMode:t||!t&&!n,supportsUrlMode:n}}class _ee extends sJ{constructor(t,n){super(n),this._clientInfo=t,this._cachedToolOutputValidators=new Map,this._cachedKnownTaskTools=new Set,this._cachedRequiredTaskTools=new Set,this._listChangedDebounceTimers=new Map,this._capabilities=n?.capabilities??{},this._jsonSchemaValidator=n?.jsonSchemaValidator??new vee,n?.listChanged&&(this._pendingListChangedConfig=n.listChanged)}_setupListChangedHandlers(t){t.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler("tools",oN,t.tools,async()=>(await this.listTools()).tools),t.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler("prompts",tN,t.prompts,async()=>(await this.listPrompts()).prompts),t.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler("resources",Q4,t.resources,async()=>(await this.listResources()).resources)}get experimental(){return this._experimental||(this._experimental={tasks:new bee(this)}),this._experimental}registerCapabilities(t){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=aJ(this._capabilities,t)}setRequestHandler(t,n){const o=C4(t)?.method;if(!o)throw new Error("Schema is missing a method literal");let s;if(e0(o)){const c=o;s=c._zod?.def?.value??c.value}else{const c=o;s=c._def?.value??c.value}if(typeof s!="string")throw new Error("Schema method literal must be a string");const l=s;if(l==="elicitation/create"){const c=async(u,d)=>{const h=Ra(lN,u);if(!h.success){const v=h.error instanceof Error?h.error.message:String(h.error);throw new ht(_t.InvalidParams,`Invalid elicitation request: ${v}`)}const{params:p}=h.data;p.mode=p.mode??"form";const{supportsFormMode:g,supportsUrlMode:b}=xee(this._capabilities.elicitation);if(p.mode==="form"&&!g)throw new ht(_t.InvalidParams,"Client does not support form-mode elicitation requests");if(p.mode==="url"&&!b)throw new ht(_t.InvalidParams,"Client does not support URL-mode elicitation requests");const y=await Promise.resolve(n(u,d));if(p.task){const v=Ra(ah,y);if(!v.success){const E=v.error instanceof Error?v.error.message:String(v.error);throw new ht(_t.InvalidParams,`Invalid task creation result: ${E}`)}return v.data}const _=Ra(cN,y);if(!_.success){const v=_.error instanceof Error?_.error.message:String(_.error);throw new ht(_t.InvalidParams,`Invalid elicitation result: ${v}`)}const w=_.data,T=p.mode==="form"?p.requestedSchema:void 0;if(p.mode==="form"&&w.action==="accept"&&w.content&&T&&this._capabilities.elicitation?.form?.applyDefaults)try{Ng(T,w.content)}catch{}return w};return super.setRequestHandler(t,c)}if(l==="sampling/createMessage"){const c=async(u,d)=>{const h=Ra(sN,u);if(!h.success){const y=h.error instanceof Error?h.error.message:String(h.error);throw new ht(_t.InvalidParams,`Invalid sampling request: ${y}`)}const{params:p}=h.data,g=await Promise.resolve(n(u,d));if(p.task){const y=Ra(ah,g);if(!y.success){const _=y.error instanceof Error?y.error.message:String(y.error);throw new ht(_t.InvalidParams,`Invalid task creation result: ${_}`)}return y.data}const b=Ra(aN,g);if(!b.success){const y=b.error instanceof Error?b.error.message:String(b.error);throw new ht(_t.InvalidParams,`Invalid sampling result: ${y}`)}return b.data};return super.setRequestHandler(t,c)}return super.setRequestHandler(t,n)}assertCapability(t,n){if(!this._serverCapabilities?.[t])throw new Error(`Server does not support ${t} (required for ${n})`)}async connect(t,n){if(await super.connect(t),t.sessionId===void 0)try{const r=await this.request({method:"initialize",params:{protocolVersion:t0,capabilities:this._capabilities,clientInfo:this._clientInfo}},q4,n);if(r===void 0)throw new Error(`Server sent invalid initialize result: ${r}`);if(!TX.includes(r.protocolVersion))throw new Error(`Server's protocol version is not supported: ${r.protocolVersion}`);this._serverCapabilities=r.capabilities,this._serverVersion=r.serverInfo,t.setProtocolVersion&&t.setProtocolVersion(r.protocolVersion),this._instructions=r.instructions,await this.notification({method:"notifications/initialized"}),this._pendingListChangedConfig&&(this._setupListChangedHandlers(this._pendingListChangedConfig),this._pendingListChangedConfig=void 0)}catch(r){throw this.close(),r}}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){See(this._serverCapabilities?.tasks?.requests,t,"Server")}assertTaskHandlerCapability(t){this._capabilities&&wee(this._capabilities.tasks?.requests,t,"Client")}async ping(t){return this.request({method:"ping"},yu,t)}async complete(t,n){return this.request({method:"completion/complete",params:t},uN,n)}async setLoggingLevel(t,n){return this.request({method:"logging/setLevel",params:{level:t}},yu,n)}async getPrompt(t,n){return this.request({method:"prompts/get",params:t},eN,n)}async listPrompts(t,n){return this.request({method:"prompts/list",params:t},J4,n)}async listResources(t,n){return this.request({method:"resources/list",params:t},W4,n)}async listResourceTemplates(t,n){return this.request({method:"resources/templates/list",params:t},Y4,n)}async readResource(t,n){return this.request({method:"resources/read",params:t},X4,n)}async subscribeResource(t,n){return this.request({method:"resources/subscribe",params:t},yu,n)}async unsubscribeResource(t,n){return this.request({method:"resources/unsubscribe",params:t},yu,n)}async callTool(t,n=o0,r){if(this.isToolTaskRequired(t.name))throw new ht(_t.InvalidRequest,`Tool "${t.name}" requires task-based execution. Use client.experimental.tasks.callToolStream() instead.`);const o=await this.request({method:"tools/call",params:t},n,r),s=this.getToolOutputValidator(t.name);if(s){if(!o.structuredContent&&!o.isError)throw new ht(_t.InvalidRequest,`Tool ${t.name} has an output schema but did not return structured content`);if(o.structuredContent)try{const l=s(o.structuredContent);if(!l.valid)throw new ht(_t.InvalidParams,`Structured content does not match the tool's output schema: ${l.errorMessage}`)}catch(l){throw l instanceof ht?l:new ht(_t.InvalidParams,`Failed to validate structured content: ${l instanceof Error?l.message:String(l)}`)}}return o}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 n of t){if(n.outputSchema){const o=this._jsonSchemaValidator.getValidator(n.outputSchema);this._cachedToolOutputValidators.set(n.name,o)}const r=n.execution?.taskSupport;(r==="required"||r==="optional")&&this._cachedKnownTaskTools.add(n.name),r==="required"&&this._cachedRequiredTaskTools.add(n.name)}}getToolOutputValidator(t){return this._cachedToolOutputValidators.get(t)}async listTools(t,n){const r=await this.request({method:"tools/list",params:t},rN,n);return this.cacheToolMetadata(r.tools),r}_setupListChangedHandler(t,n,r,o){const s=SQ.safeParse(r);if(!s.success)throw new Error(`Invalid ${t} listChanged options: ${s.error.message}`);if(typeof r.onChanged!="function")throw new Error(`Invalid ${t} listChanged options: onChanged must be a function`);const{autoRefresh:l,debounceMs:c}=s.data,{onChanged:u}=r,d=async()=>{if(!l){u(null,null);return}try{const p=await o();u(null,p)}catch(p){const g=p instanceof Error?p:new Error(String(p));u(g,null)}},h=()=>{if(c){const p=this._listChangedDebounceTimers.get(t);p&&clearTimeout(p);const g=setTimeout(d,c);this._listChangedDebounceTimers.set(t,g)}else d()};this.setNotificationHandler(n,h)}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}}function rw(e){return e?e instanceof Headers?Object.fromEntries(e.entries()):Array.isArray(e)?Object.fromEntries(e):{...e}:{}}function Eee(e=fetch,t){return t?async(n,r)=>{const o={...t,...r,headers:r?.headers?{...rw(t.headers),...rw(r.headers)}:t.headers};return e(n,o)}:e}let P_;P_=globalThis.crypto;async function Cee(e){return(await P_).getRandomValues(new Uint8Array(e))}async function Tee(e){const t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~",n=Math.pow(2,8)-Math.pow(2,8)%t.length;let r="";for(;r.length<e;){const o=await Cee(e-r.length);for(const s of o)s<n&&(r+=t[s%t.length])}return r}async function Ree(e){return await Tee(e)}async function Oee(e){const t=await(await P_).subtle.digest("SHA-256",new TextEncoder().encode(e));return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}async function Aee(e){if(e||(e=43),e<43||e>128)throw`Expected a length between 43 and 128. Received ${e}.`;const t=await Ree(e),n=await Oee(t);return{code_verifier:t,code_challenge:n}}const Br=jY().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:EX.custom,message:"URL must be parseable",fatal:!0}),DK}).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"}),kee=Gr({resource:ue().url(),authorization_servers:Ke(Br).optional(),jwks_uri:ue().url().optional(),scopes_supported:Ke(ue()).optional(),bearer_methods_supported:Ke(ue()).optional(),resource_signing_alg_values_supported:Ke(ue()).optional(),resource_name:ue().optional(),resource_documentation:ue().optional(),resource_policy_uri:ue().url().optional(),resource_tos_uri:ue().url().optional(),tls_client_certificate_bound_access_tokens:Dn().optional(),authorization_details_types_supported:Ke(ue()).optional(),dpop_signing_alg_values_supported:Ke(ue()).optional(),dpop_bound_access_tokens_required:Dn().optional()}),SN=Gr({issuer:ue(),authorization_endpoint:Br,token_endpoint:Br,registration_endpoint:Br.optional(),scopes_supported:Ke(ue()).optional(),response_types_supported:Ke(ue()),response_modes_supported:Ke(ue()).optional(),grant_types_supported:Ke(ue()).optional(),token_endpoint_auth_methods_supported:Ke(ue()).optional(),token_endpoint_auth_signing_alg_values_supported:Ke(ue()).optional(),service_documentation:Br.optional(),revocation_endpoint:Br.optional(),revocation_endpoint_auth_methods_supported:Ke(ue()).optional(),revocation_endpoint_auth_signing_alg_values_supported:Ke(ue()).optional(),introspection_endpoint:ue().optional(),introspection_endpoint_auth_methods_supported:Ke(ue()).optional(),introspection_endpoint_auth_signing_alg_values_supported:Ke(ue()).optional(),code_challenge_methods_supported:Ke(ue()).optional(),client_id_metadata_document_supported:Dn().optional()}),Mee=Gr({issuer:ue(),authorization_endpoint:Br,token_endpoint:Br,userinfo_endpoint:Br.optional(),jwks_uri:Br,registration_endpoint:Br.optional(),scopes_supported:Ke(ue()).optional(),response_types_supported:Ke(ue()),response_modes_supported:Ke(ue()).optional(),grant_types_supported:Ke(ue()).optional(),acr_values_supported:Ke(ue()).optional(),subject_types_supported:Ke(ue()),id_token_signing_alg_values_supported:Ke(ue()),id_token_encryption_alg_values_supported:Ke(ue()).optional(),id_token_encryption_enc_values_supported:Ke(ue()).optional(),userinfo_signing_alg_values_supported:Ke(ue()).optional(),userinfo_encryption_alg_values_supported:Ke(ue()).optional(),userinfo_encryption_enc_values_supported:Ke(ue()).optional(),request_object_signing_alg_values_supported:Ke(ue()).optional(),request_object_encryption_alg_values_supported:Ke(ue()).optional(),request_object_encryption_enc_values_supported:Ke(ue()).optional(),token_endpoint_auth_methods_supported:Ke(ue()).optional(),token_endpoint_auth_signing_alg_values_supported:Ke(ue()).optional(),display_values_supported:Ke(ue()).optional(),claim_types_supported:Ke(ue()).optional(),claims_supported:Ke(ue()).optional(),service_documentation:ue().optional(),claims_locales_supported:Ke(ue()).optional(),ui_locales_supported:Ke(ue()).optional(),claims_parameter_supported:Dn().optional(),request_parameter_supported:Dn().optional(),request_uri_parameter_supported:Dn().optional(),require_request_uri_registration:Dn().optional(),op_policy_uri:Br.optional(),op_tos_uri:Br.optional(),client_id_metadata_document_supported:Dn().optional()}),jee=Ge({...Mee.shape,...SN.pick({code_challenge_methods_supported:!0}).shape}),Pee=Ge({access_token:ue(),id_token:ue().optional(),token_type:ue(),expires_in:CX().optional(),scope:ue().optional(),refresh_token:ue().optional()}).strip(),Nee=Ge({error:ue(),error_description:ue().optional(),error_uri:ue().optional()}),Lk=Br.optional().or(ot("").transform(()=>{})),Dee=Ge({redirect_uris:Ke(Br),token_endpoint_auth_method:ue().optional(),grant_types:Ke(ue()).optional(),response_types:Ke(ue()).optional(),client_name:ue().optional(),client_uri:Br.optional(),logo_uri:Lk,scope:ue().optional(),contacts:Ke(ue()).optional(),tos_uri:Lk,policy_uri:ue().optional(),jwks_uri:Br.optional(),jwks:QY().optional(),software_id:ue().optional(),software_version:ue().optional(),software_statement:ue().optional()}).strip(),$ee=Ge({client_id:ue(),client_secret:ue().optional(),client_id_issued_at:hn().optional(),client_secret_expires_at:hn().optional()}).strip(),Iee=Dee.merge($ee);Ge({error:ue(),error_description:ue().optional()}).strip();Ge({token:ue(),token_type_hint:ue().optional()}).strip();function zee(e){const t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function Lee({requestedResource:e,configuredResource:t}){const n=typeof e=="string"?new URL(e):new URL(e.href),r=typeof t=="string"?new URL(t):new URL(t.href);if(n.origin!==r.origin||n.pathname.length<r.pathname.length)return!1;const o=n.pathname.endsWith("/")?n.pathname:n.pathname+"/",s=r.pathname.endsWith("/")?r.pathname:r.pathname+"/";return o.startsWith(s)}class Pr extends Error{constructor(t,n){super(t),this.errorUri=n,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 ow extends Pr{}ow.errorCode="invalid_request";class uy extends Pr{}uy.errorCode="invalid_client";class fy extends Pr{}fy.errorCode="invalid_grant";class dy extends Pr{}dy.errorCode="unauthorized_client";class iw extends Pr{}iw.errorCode="unsupported_grant_type";class sw extends Pr{}sw.errorCode="invalid_scope";class aw extends Pr{}aw.errorCode="access_denied";class qu extends Pr{}qu.errorCode="server_error";class lw extends Pr{}lw.errorCode="temporarily_unavailable";class cw extends Pr{}cw.errorCode="unsupported_response_type";class uw extends Pr{}uw.errorCode="unsupported_token_type";class fw extends Pr{}fw.errorCode="invalid_token";class dw extends Pr{}dw.errorCode="method_not_allowed";class hw extends Pr{}hw.errorCode="too_many_requests";class hy extends Pr{}hy.errorCode="invalid_client_metadata";class pw extends Pr{}pw.errorCode="insufficient_scope";class mw extends Pr{}mw.errorCode="invalid_target";const Fee={[ow.errorCode]:ow,[uy.errorCode]:uy,[fy.errorCode]:fy,[dy.errorCode]:dy,[iw.errorCode]:iw,[sw.errorCode]:sw,[aw.errorCode]:aw,[qu.errorCode]:qu,[lw.errorCode]:lw,[cw.errorCode]:cw,[uw.errorCode]:uw,[fw.errorCode]:fw,[dw.errorCode]:dw,[hw.errorCode]:hw,[hy.errorCode]:hy,[pw.errorCode]:pw,[mw.errorCode]:mw};class eu extends Error{constructor(t){super(t??"Unauthorized")}}function Uee(e){return["client_secret_basic","client_secret_post","none"].includes(e)}const p1="code",m1="S256";function Vee(e,t){const n=e.client_secret!==void 0;return t.length===0?n?"client_secret_post":"none":"token_endpoint_auth_method"in e&&e.token_endpoint_auth_method&&Uee(e.token_endpoint_auth_method)&&t.includes(e.token_endpoint_auth_method)?e.token_endpoint_auth_method:n&&t.includes("client_secret_basic")?"client_secret_basic":n&&t.includes("client_secret_post")?"client_secret_post":t.includes("none")?"none":n?"client_secret_post":"none"}function qee(e,t,n,r){const{client_id:o,client_secret:s}=t;switch(e){case"client_secret_basic":Bee(o,s,n);return;case"client_secret_post":Hee(o,s,r);return;case"none":Kee(o,r);return;default:throw new Error(`Unsupported client authentication method: ${e}`)}}function Bee(e,t,n){if(!t)throw new Error("client_secret_basic authentication requires a client_secret");const r=btoa(`${e}:${t}`);n.set("Authorization",`Basic ${r}`)}function Hee(e,t,n){n.set("client_id",e),t&&n.set("client_secret",t)}function Kee(e,t){t.set("client_id",e)}async function wN(e){const t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{const r=Nee.parse(JSON.parse(n)),{error:o,error_description:s,error_uri:l}=r,c=Fee[o]||qu;return new c(s||"",l)}catch(r){const o=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${r}. Raw body: ${n}`;return new qu(o)}}async function ig(e,t){try{return await g1(e,t)}catch(n){if(n instanceof uy||n instanceof dy)return await e.invalidateCredentials?.("all"),await g1(e,t);if(n instanceof fy)return await e.invalidateCredentials?.("tokens"),await g1(e,t);throw n}}async function g1(e,{serverUrl:t,authorizationCode:n,scope:r,resourceMetadataUrl:o,fetchFn:s}){let l,c;try{l=await Wee(t,{resourceMetadataUrl:o},s),l.authorization_servers&&l.authorization_servers.length>0&&(c=l.authorization_servers[0])}catch{}c||(c=new URL("/",t));const u=await Zee(t,e,l),d=await ete(c,{fetchFn:s});let h=await Promise.resolve(e.clientInformation());if(!h){if(n!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");const w=d?.client_id_metadata_document_supported===!0,T=e.clientMetadataUrl;if(T&&!Gee(T))throw new hy(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${T}`);if(w&&T)h={client_id:T},await e.saveClientInformation?.(h);else{if(!e.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const E=await ite(c,{metadata:d,clientMetadata:e.clientMetadata,fetchFn:s});await e.saveClientInformation(E),h=E}}const p=!e.redirectUrl;if(n!==void 0||p){const w=await ote(e,c,{metadata:d,resource:u,authorizationCode:n,fetchFn:s});return await e.saveTokens(w),"AUTHORIZED"}const g=await e.tokens();if(g?.refresh_token)try{const w=await rte(c,{metadata:d,clientInformation:h,refreshToken:g.refresh_token,resource:u,addClientAuthentication:e.addClientAuthentication,fetchFn:s});return await e.saveTokens(w),"AUTHORIZED"}catch(w){if(!(!(w instanceof Pr)||w instanceof qu))throw w}const b=e.state?await e.state():void 0,{authorizationUrl:y,codeVerifier:_}=await tte(c,{metadata:d,clientInformation:h,state:b,redirectUrl:e.redirectUrl,scope:r||l?.scopes_supported?.join(" ")||e.clientMetadata.scope,resource:u});return await e.saveCodeVerifier(_),await e.redirectToAuthorization(y),"REDIRECT"}function Gee(e){if(!e)return!1;try{const t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function Zee(e,t,n){const r=zee(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!Lee({requestedResource:r,configuredResource:n.resource}))throw new Error(`Protected resource ${n.resource} does not match expected ${r} (or origin)`);return new URL(n.resource)}}function Fk(e){const t=e.headers.get("WWW-Authenticate");if(!t)return{};const[n,r]=t.split(" ");if(n.toLowerCase()!=="bearer"||!r)return{};const o=y1(e,"resource_metadata")||void 0;let s;if(o)try{s=new URL(o)}catch{}const l=y1(e,"scope")||void 0,c=y1(e,"error")||void 0;return{resourceMetadataUrl:s,scope:l,error:c}}function y1(e,t){const n=e.headers.get("WWW-Authenticate");if(!n)return null;const r=new RegExp(`${t}=(?:"([^"]+)"|([^\\s,]+))`),o=n.match(r);return o?o[1]||o[2]:null}async function Wee(e,t,n=fetch){const r=await Qee(e,"oauth-protected-resource",n,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!r||r.status===404)throw await r?.body?.cancel(),new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!r.ok)throw await r.body?.cancel(),new Error(`HTTP ${r.status} trying to load well-known OAuth protected resource metadata.`);return kee.parse(await r.json())}async function N_(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(r instanceof TypeError)return t?N_(e,void 0,n):void 0;throw r}}function Yee(e,t="",n={}){return t.endsWith("/")&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function Uk(e,t,n=fetch){return await N_(e,{"MCP-Protocol-Version":t},n)}function Xee(e,t){return!e||e.status>=400&&e.status<500&&t!=="/"}async function Qee(e,t,n,r){const o=new URL(e),s=r?.protocolVersion??t0;let l;if(r?.metadataUrl)l=new URL(r.metadataUrl);else{const u=Yee(t,o.pathname);l=new URL(u,r?.metadataServerUrl??o),l.search=o.search}let c=await Uk(l,s,n);if(!r?.metadataUrl&&Xee(c,o.pathname)){const u=new URL(`/.well-known/${t}`,o);c=await Uk(u,s,n)}return c}function Jee(e){const t=typeof e=="string"?new URL(e):e,n=t.pathname!=="/",r=[];if(!n)return r.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"}),r.push({url:new URL("/.well-known/openid-configuration",t.origin),type:"oidc"}),r;let o=t.pathname;return o.endsWith("/")&&(o=o.slice(0,-1)),r.push({url:new URL(`/.well-known/oauth-authorization-server${o}`,t.origin),type:"oauth"}),r.push({url:new URL(`/.well-known/openid-configuration${o}`,t.origin),type:"oidc"}),r.push({url:new URL(`${o}/.well-known/openid-configuration`,t.origin),type:"oidc"}),r}async function ete(e,{fetchFn:t=fetch,protocolVersion:n=t0}={}){const r={"MCP-Protocol-Version":n,Accept:"application/json"},o=Jee(e);for(const{url:s,type:l}of o){const c=await N_(s,r,t);if(c){if(!c.ok){if(await c.body?.cancel(),c.status>=400&&c.status<500)continue;throw new Error(`HTTP ${c.status} trying to load ${l==="oauth"?"OAuth":"OpenID provider"} metadata from ${s}`)}return l==="oauth"?SN.parse(await c.json()):jee.parse(await c.json())}}}async function tte(e,{metadata:t,clientInformation:n,redirectUrl:r,scope:o,state:s,resource:l}){let c;if(t){if(c=new URL(t.authorization_endpoint),!t.response_types_supported.includes(p1))throw new Error(`Incompatible auth server: does not support response type ${p1}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(m1))throw new Error(`Incompatible auth server: does not support code challenge method ${m1}`)}else c=new URL("/authorize",e);const u=await Aee(),d=u.code_verifier,h=u.code_challenge;return c.searchParams.set("response_type",p1),c.searchParams.set("client_id",n.client_id),c.searchParams.set("code_challenge",h),c.searchParams.set("code_challenge_method",m1),c.searchParams.set("redirect_uri",String(r)),s&&c.searchParams.set("state",s),o&&c.searchParams.set("scope",o),o?.includes("offline_access")&&c.searchParams.append("prompt","consent"),l&&c.searchParams.set("resource",l.href),{authorizationUrl:c,codeVerifier:d}}function nte(e,t,n){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(n)})}async function xN(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:o,resource:s,fetchFn:l}){const c=t?.token_endpoint?new URL(t.token_endpoint):new URL("/token",e),u=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(s&&n.set("resource",s.href),o)await o(u,n,c,t);else if(r){const h=t?.token_endpoint_auth_methods_supported??[],p=Vee(r,h);qee(p,r,u,n)}const d=await(l??fetch)(c,{method:"POST",headers:u,body:n});if(!d.ok)throw await wN(d);return Pee.parse(await d.json())}async function rte(e,{metadata:t,clientInformation:n,refreshToken:r,resource:o,addClientAuthentication:s,fetchFn:l}){const c=new URLSearchParams({grant_type:"refresh_token",refresh_token:r}),u=await xN(e,{metadata:t,tokenRequestParams:c,clientInformation:n,addClientAuthentication:s,resource:o,fetchFn:l});return{refresh_token:r,...u}}async function ote(e,t,{metadata:n,resource:r,authorizationCode:o,fetchFn:s}={}){const l=e.clientMetadata.scope;let c;if(e.prepareTokenRequest&&(c=await e.prepareTokenRequest(l)),!c){if(!o)throw new Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!e.redirectUrl)throw new Error("redirectUrl is required for authorization_code flow");const d=await e.codeVerifier();c=nte(o,d,e.redirectUrl)}const u=await e.clientInformation();return xN(t,{metadata:n,tokenRequestParams:c,clientInformation:u??void 0,addClientAuthentication:e.addClientAuthentication,resource:r,fetchFn:s})}async function ite(e,{metadata:t,clientMetadata:n,fetchFn:r}){let o;if(t){if(!t.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");o=new URL(t.registration_endpoint)}else o=new URL("/register",e);const s=await(r??fetch)(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!s.ok)throw await wN(s);return Iee.parse(await s.json())}class Vk extends Error{constructor(t,n){super(t),this.name="ParseError",this.type=n.type,this.field=n.field,this.value=n.value,this.line=n.line}}function v1(e){}function ste(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=v1,onError:n=v1,onRetry:r=v1,onComment:o}=e;let s="",l=!0,c,u="",d="";function h(_){const w=l?_.replace(/^\xEF\xBB\xBF/,""):_,[T,v]=ate(`${s}${w}`);for(const E of T)p(E);s=v,l=!1}function p(_){if(_===""){b();return}if(_.startsWith(":")){o&&o(_.slice(_.startsWith(": ")?2:1));return}const w=_.indexOf(":");if(w!==-1){const T=_.slice(0,w),v=_[w+1]===" "?2:1,E=_.slice(w+v);g(T,E,_);return}g(_,"",_)}function g(_,w,T){switch(_){case"event":d=w;break;case"data":u=`${u}${w}
56
- `;break;case"id":c=w.includes("\0")?void 0:w;break;case"retry":/^\d+$/.test(w)?r(parseInt(w,10)):n(new Vk(`Invalid \`retry\` value: "${w}"`,{type:"invalid-retry",value:w,line:T}));break;default:n(new Vk(`Unknown field "${_.length>20?`${_.slice(0,20)}…`:_}"`,{type:"unknown-field",field:_,value:w,line:T}));break}}function b(){u.length>0&&t({id:c,event:d||void 0,data:u.endsWith(`
57
- `)?u.slice(0,-1):u}),c=void 0,u="",d=""}function y(_={}){s&&_.consume&&p(s),l=!0,c=void 0,u="",d="",s=""}return{feed:h,reset:y}}function ate(e){const t=[];let n="",r=0;for(;r<e.length;){const o=e.indexOf("\r",r),s=e.indexOf(`
58
- `,r);let l=-1;if(o!==-1&&s!==-1?l=Math.min(o,s):o!==-1?o===e.length-1?l=-1:l=o:s!==-1&&(l=s),l===-1){n=e.slice(r);break}else{const c=e.slice(r,l);t.push(c),r=l+1,e[r-1]==="\r"&&e[r]===`
59
- `&&r++}}return[t,n]}class lte extends TransformStream{constructor({onError:t,onRetry:n,onComment:r}={}){let o;super({start(s){o=ste({onEvent:l=>{s.enqueue(l)},onError(l){t==="terminate"?s.error(l):typeof t=="function"&&t(l)},onRetry:n,onComment:r})},transform(s){o.feed(s)}})}}const cte={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2};class tu extends Error{constructor(t,n){super(`Streamable HTTP error: ${n}`),this.code=t}}class ute{constructor(t,n){this._hasCompletedAuthFlow=!1,this._url=t,this._resourceMetadataUrl=void 0,this._scope=void 0,this._requestInit=n?.requestInit,this._authProvider=n?.authProvider,this._fetch=n?.fetch,this._fetchWithInit=Eee(n?.fetch,n?.requestInit),this._sessionId=n?.sessionId,this._reconnectionOptions=n?.reconnectionOptions??cte}async _authThenStart(){if(!this._authProvider)throw new eu("No auth provider");let t;try{t=await ig(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(n){throw this.onerror?.(n),n}if(t!=="AUTHORIZED")throw new eu;return await this._startOrAuthSse({resumptionToken:void 0})}async _commonHeaders(){const t={};if(this._authProvider){const r=await this._authProvider.tokens();r&&(t.Authorization=`Bearer ${r.access_token}`)}this._sessionId&&(t["mcp-session-id"]=this._sessionId),this._protocolVersion&&(t["mcp-protocol-version"]=this._protocolVersion);const n=rw(this._requestInit?.headers);return new Headers({...t,...n})}async _startOrAuthSse(t){const{resumptionToken:n}=t;try{const r=await this._commonHeaders();r.set("Accept","text/event-stream"),n&&r.set("last-event-id",n);const o=await(this._fetch??fetch)(this._url,{method:"GET",headers:r,signal:this._abortController?.signal});if(!o.ok){if(await o.body?.cancel(),o.status===401&&this._authProvider)return await this._authThenStart();if(o.status===405)return;throw new tu(o.status,`Failed to open SSE stream: ${o.statusText}`)}this._handleSseStream(o.body,t,!0)}catch(r){throw this.onerror?.(r),r}}_getNextReconnectionDelay(t){if(this._serverRetryMs!==void 0)return this._serverRetryMs;const n=this._reconnectionOptions.initialReconnectionDelay,r=this._reconnectionOptions.reconnectionDelayGrowFactor,o=this._reconnectionOptions.maxReconnectionDelay;return Math.min(n*Math.pow(r,t),o)}_scheduleReconnection(t,n=0){const r=this._reconnectionOptions.maxRetries;if(n>=r){this.onerror?.(new Error(`Maximum reconnection attempts (${r}) exceeded.`));return}const o=this._getNextReconnectionDelay(n);this._reconnectionTimeout=setTimeout(()=>{this._startOrAuthSse(t).catch(s=>{this.onerror?.(new Error(`Failed to reconnect SSE stream: ${s instanceof Error?s.message:String(s)}`)),this._scheduleReconnection(t,n+1)})},o)}_handleSseStream(t,n,r){if(!t)return;const{onresumptiontoken:o,replayMessageId:s}=n;let l,c=!1,u=!1;(async()=>{try{const h=t.pipeThrough(new TextDecoderStream).pipeThrough(new lte({onRetry:b=>{this._serverRetryMs=b}})).getReader();for(;;){const{value:b,done:y}=await h.read();if(y)break;if(b.id&&(l=b.id,c=!0,o?.(b.id)),!!b.data&&(!b.event||b.event==="message"))try{const _=t1.parse(JSON.parse(b.data));Od(_)&&(u=!0,s!==void 0&&(_.id=s)),this.onmessage?.(_)}catch(_){this.onerror?.(_)}}(r||c)&&!u&&this._abortController&&!this._abortController.signal.aborted&&this._scheduleReconnection({resumptionToken:l,onresumptiontoken:o,replayMessageId:s},0)}catch(h){if(this.onerror?.(new Error(`SSE stream disconnected: ${h}`)),(r||c)&&!u&&this._abortController&&!this._abortController.signal.aborted)try{this._scheduleReconnection({resumptionToken:l,onresumptiontoken:o,replayMessageId:s},0)}catch(b){this.onerror?.(new Error(`Failed to reconnect: ${b instanceof Error?b.message:String(b)}`))}}})()}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 eu("No auth provider");if(await ig(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new eu("Failed to authorize")}async close(){this._reconnectionTimeout&&(clearTimeout(this._reconnectionTimeout),this._reconnectionTimeout=void 0),this._abortController?.abort(),this.onclose?.()}async send(t,n){try{const{resumptionToken:r,onresumptiontoken:o}=n||{};if(r){this._startOrAuthSse({resumptionToken:r,replayMessageId:nw(t)?t.id:void 0}).catch(g=>this.onerror?.(g));return}const s=await this._commonHeaders();s.set("content-type","application/json"),s.set("accept","application/json, text/event-stream");const l={...this._requestInit,method:"POST",headers:s,body:JSON.stringify(t),signal:this._abortController?.signal},c=await(this._fetch??fetch)(this._url,l),u=c.headers.get("mcp-session-id");if(u&&(this._sessionId=u),!c.ok){const g=await c.text().catch(()=>null);if(c.status===401&&this._authProvider){if(this._hasCompletedAuthFlow)throw new tu(401,"Server returned 401 after successful authentication");const{resourceMetadataUrl:b,scope:y}=Fk(c);if(this._resourceMetadataUrl=b,this._scope=y,await ig(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new eu;return this._hasCompletedAuthFlow=!0,this.send(t)}if(c.status===403&&this._authProvider){const{resourceMetadataUrl:b,scope:y,error:_}=Fk(c);if(_==="insufficient_scope"){const w=c.headers.get("WWW-Authenticate");if(this._lastUpscopingHeader===w)throw new tu(403,"Server returned 403 after trying upscoping");if(y&&(this._scope=y),b&&(this._resourceMetadataUrl=b),this._lastUpscopingHeader=w??void 0,await ig(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetch})!=="AUTHORIZED")throw new eu;return this.send(t)}}throw new tu(c.status,`Error POSTing to endpoint: ${g}`)}if(this._hasCompletedAuthFlow=!1,this._lastUpscopingHeader=void 0,c.status===202){await c.body?.cancel(),VX(t)&&this._startOrAuthSse({resumptionToken:void 0}).catch(g=>this.onerror?.(g));return}const h=(Array.isArray(t)?t:[t]).filter(g=>"method"in g&&"id"in g&&g.id!==void 0).length>0,p=c.headers.get("content-type");if(h)if(p?.includes("text/event-stream"))this._handleSseStream(c.body,{onresumptiontoken:o},!1);else if(p?.includes("application/json")){const g=await c.json(),b=Array.isArray(g)?g.map(y=>t1.parse(y)):[t1.parse(g)];for(const y of b)this.onmessage?.(y)}else throw await c.body?.cancel(),new tu(-1,`Unexpected content type: ${p}`);else await c.body?.cancel()}catch(r){throw this.onerror?.(r),r}}get sessionId(){return this._sessionId}async terminateSession(){if(this._sessionId)try{const t=await this._commonHeaders(),n={...this._requestInit,method:"DELETE",headers:t,signal:this._abortController?.signal},r=await(this._fetch??fetch)(this._url,n);if(await r.body?.cancel(),!r.ok&&r.status!==405)throw new tu(r.status,`Failed to terminate session: ${r.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,n){await this._startOrAuthSse({resumptionToken:t,onresumptiontoken:n?.onresumptiontoken})}}class fte{client=null;transport=null;async connect(t){const n=typeof t=="string"?new URL(t):t;this.transport=new ute(n),this.client=new _ee({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.");return(await this.client.listTools()).tools}async callTool(t,n){if(!this.client)throw new Error("Client not connected. Call connect() first.");const r=await this.client.callTool({name:t,arguments:n??{}}),{_meta:o,...s}=r;return{...s,meta:o}}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,n){if(!this.client)throw new Error("Client not connected. Call connect() first.");return await this.client.getPrompt({name:t,...n&&{arguments:n}})}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 df=new fte;df.connect("http://localhost:3000/mcp").then(()=>{console.info("Connected to MCP server")});const dte={theme:"light",userAgent:{device:{type:"desktop"},capabilities:{hover:!0,touch:!1}},locale:"en-US",maxHeight:600,displayMode:"inline",safeArea:{insets:{top:0,bottom:0,left:0,right:0}},toolInput:{},toolOutput:null,toolResponseMetadata:null,view:{mode:"inline"},widgetState:null},_N=()=>{const{data:e}=Dj({queryKey:["list-tools"],queryFn:()=>df.listTools()});return e},hte=()=>df.getServerInfo(),pte=()=>{const{setToolData:e}=lf();return FF({mutationFn:async({toolName:t,args:n})=>{e(t,{input:n??{},response:void 0,openaiRef:null,openaiLogs:[],openaiObject:null});const r=await df.callTool(t,n);return e(t,{input:n??{},response:r,openaiRef:null,openaiLogs:[],openaiObject:{...dte,toolInput:n??{},toolOutput:r.structuredContent,toolResponseMetadata:r.meta??null,widgetState:null}}),r}})},D_=()=>{const[e]=n_();return _N().find(n=>n.name===e)??null},fc=()=>{const e=D_();if(!e)throw new Error("No tool is currently selected");return e},mte=e=>Dj({queryKey:["resource",e],queryFn:async()=>{if(!e)throw new Error("Resource URI is required");return await df.readResource(e)}});const gte=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),yte=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),qk=e=>{const t=yte(e);return t.charAt(0).toUpperCase()+t.slice(1)},EN=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),vte=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var bte={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 Ste=k.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:l,...c},u)=>k.createElement("svg",{ref:u,...bte,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:EN("lucide",o),...!s&&!vte(c)&&{"aria-hidden":"true"},...c},[...l.map(([d,h])=>k.createElement(d,h)),...Array.isArray(s)?s:[s]]));const rs=(e,t)=>{const n=k.forwardRef(({className:r,...o},s)=>k.createElement(Ste,{ref:s,iconNode:t,className:EN(`lucide-${gte(qk(e))}`,`lucide-${e}`,r),...o}));return n.displayName=qk(e),n};const wte=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],xte=rs("check",wte);const _te=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],CN=rs("chevron-down",_te);const Ete=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Cte=rs("chevron-up",Ete);const Tte=[["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"}]],Rte=rs("circle-alert",Tte);const Ote=[["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"}]],Ate=rs("external-link",Ote);const kte=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Mte=rs("loader-circle",kte);const jte=[["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"}]],Pte=rs("moon",jte);const Nte=[["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"}]],Dte=rs("play",Nte);const $te=[["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"}]],Ite=rs("sun",$te);const zte=[["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"}]],Lte=rs("trash",zte);function c0(){return typeof window<"u"}function nl(e){return $_(e)?(e.nodeName||"").toLowerCase():"#document"}function Rr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function os(e){var t;return(t=($_(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function $_(e){return c0()?e instanceof Node||e instanceof Rr(e).Node:!1}function Gn(e){return c0()?e instanceof Element||e instanceof Rr(e).Element:!1}function rr(e){return c0()?e instanceof HTMLElement||e instanceof Rr(e).HTMLElement:!1}function gw(e){return!c0()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Rr(e).ShadowRoot}const Fte=new Set(["inline","contents"]);function dc(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Lo(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Fte.has(o)}const Ute=new Set(["table","td","th"]);function Vte(e){return Ute.has(nl(e))}const qte=[":popover-open",":modal"];function u0(e){return qte.some(t=>{try{return e.matches(t)}catch{return!1}})}const Bte=["transform","translate","scale","rotate","perspective"],Hte=["transform","translate","scale","rotate","perspective","filter"],Kte=["paint","layout","strict","content"];function I_(e){const t=f0(),n=Gn(e)?Lo(e):e;return Bte.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Hte.some(r=>(n.willChange||"").includes(r))||Kte.some(r=>(n.contain||"").includes(r))}function Gte(e){let t=Is(e);for(;rr(t)&&!Ns(t);){if(I_(t))return t;if(u0(t))return null;t=Is(t)}return null}function f0(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Zte=new Set(["html","body","#document"]);function Ns(e){return Zte.has(nl(e))}function Lo(e){return Rr(e).getComputedStyle(e)}function d0(e){return Gn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Is(e){if(nl(e)==="html")return e;const t=e.assignedSlot||e.parentNode||gw(e)&&e.host||os(e);return gw(t)?t.host:t}function TN(e){const t=Is(e);return Ns(t)?e.ownerDocument?e.ownerDocument.body:e.body:rr(t)&&dc(t)?t:TN(t)}function Pa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=TN(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),l=Rr(o);if(s){const c=yw(l);return t.concat(l,l.visualViewport||[],dc(o)?o:[],c&&n?Pa(c):[])}return t.concat(o,Pa(o,[],n))}function yw(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Bk={};function Yi(e,t){const n=k.useRef(Bk);return n.current===Bk&&(n.current=e(t)),n}const b1=Th[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Wte=b1&&b1!==k.useLayoutEffect?b1:e=>e();function lt(e){const t=Yi(Yte).current;return t.next=e,Wte(t.effect),t.trampoline}function Yte(){const e={next:void 0,callback:Xte,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Xte(){}const Qte=()=>{},rt=typeof document<"u"?k.useLayoutEffect:Qte;function vw(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const Fd={};function h0(e,t,n,r,o){let s={...bw(e,Fd)};return t&&(s=Ad(s,t)),n&&(s=Ad(s,n)),r&&(s=Ad(s,r)),o&&(s=Ad(s,o)),s}function Jte(e){if(e.length===0)return Fd;if(e.length===1)return bw(e[0],Fd);let t={...bw(e[0],Fd)};for(let n=1;n<e.length;n+=1)t=Ad(t,e[n]);return t}function Ad(e,t){return RN(t)?t(e):ene(e,t)}function ene(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=vw(e.style,r);break}case"className":{e[n]=ON(e.className,r);break}default:tne(n,r)?e[n]=nne(e[n],r):e[n]=r}}return e}function tne(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return n===111&&r===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function RN(e){return typeof e=="function"}function bw(e,t){return RN(e)?e(t):e??Fd}function nne(e,t){return t?e?n=>{if(rne(n)){const o=n;Sw(o);const s=t(o);return o.baseUIHandlerPrevented||e?.(o),s}const r=t(n);return e?.(n),r}:t:e}function Sw(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function ON(e,t){return t?e?t+" "+e:t:e}function rne(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function is(e,...t){const n=new URL(`https://base-ui.com/production-error/${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}const AN=k.createContext(void 0);function kN(e=!1){const t=k.useContext(AN);if(t===void 0&&!e)throw new Error(is(16));return t}function one(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:s}=e,l=r&&t!==!1,c=r&&t===!1;return{props:k.useMemo(()=>{const d={onKeyDown(h){n&&t&&h.key!=="Tab"&&h.preventDefault()}};return r||(d.tabIndex=o,!s&&n&&(d.tabIndex=t?o:-1)),(s&&(t||l)||!s&&n)&&(d["aria-disabled"]=n),s&&(!t||c)&&(d.disabled=n),d},[r,n,t,l,c,s,o])}}function p0(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0}=e,s=k.useRef(null),l=kN(!0)!==void 0,c=lt(()=>{const g=s.current;return!!(g?.tagName==="A"&&g?.href)}),{props:u}=one({focusableWhenDisabled:n,disabled:t,composite:l,tabIndex:r,isNativeButton:o}),d=k.useCallback(()=>{const g=s.current;ine(g)&&l&&t&&u.disabled===void 0&&g.disabled&&(g.disabled=!1)},[t,u.disabled,l]);rt(d,[d]);const h=k.useCallback((g={})=>{const{onClick:b,onMouseDown:y,onKeyUp:_,onKeyDown:w,onPointerDown:T,...v}=g;return h0({type:o?"button":void 0,onClick(S){if(t){S.preventDefault();return}b?.(S)},onMouseDown(S){t||y?.(S)},onKeyDown(S){if(t||(Sw(S),w?.(S)),S.baseUIHandlerPrevented)return;const C=S.target===S.currentTarget&&!o&&!c()&&!t,x=S.key==="Enter",O=S.key===" ";C&&((O||x)&&S.preventDefault(),x&&b?.(S))},onKeyUp(S){t||(Sw(S),_?.(S)),!S.baseUIHandlerPrevented&&S.target===S.currentTarget&&!o&&!t&&S.key===" "&&b?.(S)},onPointerDown(S){if(t){S.preventDefault();return}T?.(S)}},o?void 0:{role:"button"},u,v)},[t,u,o,c]),p=lt(g=>{s.current=g,d()});return{getButtonProps:h,buttonRef:p}}function ine(e){return rr(e)&&e.tagName==="BUTTON"}function Ha(e,t,n,r){const o=Yi(MN).current;return ane(o,e,t,n,r)&&jN(o,[e,t,n,r]),o.callback}function sne(e){const t=Yi(MN).current;return lne(t,e)&&jN(t,e),t.callback}function MN(){return{callback:null,cleanup:null,refs:[]}}function ane(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function lne(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function jN(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const s=t[o];if(s!=null)switch(typeof s){case"function":{const l=s(n);typeof l=="function"&&(r[o]=l);break}case"object":{s.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const s=t[o];if(s!=null)switch(typeof s){case"function":{const l=r[o];typeof l=="function"?l():s(null);break}case"object":{s.current=null;break}}}}}}}const cne=parseInt(k.version,10);function z_(e){return cne>=e}function Hk(e){if(!k.isValidElement(e))return null;const t=e,n=t.props;return(z_(19)?n?.ref:t.ref)??null}function une(e,t){const n={};for(const r in e){const o=e[r];if(t?.hasOwnProperty(r)){const s=t[r](o);s!=null&&Object.assign(n,s);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function fne(e,t){return typeof e=="function"?e(t):e}function dne(e,t){return typeof e=="function"?e(t):e}function Po(){}const Bu=Object.freeze([]),No=Object.freeze({}),hne={style:{transition:"none"}},pne="data-base-ui-click-trigger",mne={fallbackAxisSide:"none"},gne={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function Nr(e,t,n={}){const r=t.render,o=yne(t,n);if(n.enabled===!1)return null;const s=n.state??No;return vne(e,r,o,s)}function yne(e,t={}){const{className:n,style:r,render:o}=e,{state:s=No,ref:l,props:c,stateAttributesMapping:u,enabled:d=!0}=t,h=d?fne(n,s):void 0,p=d?dne(r,s):void 0,g=d?une(s,u):No,b=d?vw(g,Array.isArray(c)?Jte(c):c)??No:No;return typeof document<"u"&&(d?Array.isArray(l)?b.ref=sne([b.ref,Hk(o),...l]):b.ref=Ha(b.ref,Hk(o),l):Ha(null,null)),d?(h!==void 0&&(b.className=ON(b.className,h)),p!==void 0&&(b.style=vw(b.style,p)),b):No}function vne(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const o=h0(n,t.props);return o.ref=n.ref,k.cloneElement(t,o)}if(e&&typeof e=="string")return bne(e,n);throw new Error(is(8))}function bne(e,t){return e==="button"?k.createElement("button",{type:"button",...t,key:t.key}):e==="img"?k.createElement("img",{alt:"",...t,key:t.key}):k.createElement(e,t)}const Sne=k.forwardRef(function(t,n){const{render:r,className:o,disabled:s=!1,focusableWhenDisabled:l=!1,nativeButton:c=!0,...u}=t,d=!!s,{getButtonProps:h,buttonRef:p}=p0({disabled:d,focusableWhenDisabled:l,native:c}),g=k.useMemo(()=>({disabled:d}),[d]);return Nr("button",t,{state:g,ref:[n,p],props:[u,h]})});function PN(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=PN(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function L_(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=PN(e))&&(r&&(r+=" "),r+=t);return r}const Kk=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Gk=L_,rl=(e,t)=>n=>{var r;if(t?.variants==null)return Gk(e,n?.class,n?.className);const{variants:o,defaultVariants:s}=t,l=Object.keys(o).map(d=>{const h=n?.[d],p=s?.[d];if(h===null)return null;const g=Kk(h)||Kk(p);return o[d][g]}),c=n&&Object.entries(n).reduce((d,h)=>{let[p,g]=h;return g===void 0||(d[p]=g),d},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,h)=>{let{class:p,className:g,...b}=h;return Object.entries(b).every(y=>{let[_,w]=y;return Array.isArray(w)?w.includes({...s,...c}[_]):{...s,...c}[_]===w})?[...d,p,g]:d},[]);return Gk(e,l,u,n?.class,n?.className)},wne=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},xne=(e,t)=>({classGroupId:e,validator:t}),NN=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),py="-",Zk=[],_ne="arbitrary..",Ene=e=>{const t=Tne(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return Cne(l);const c=l.split(py),u=c[0]===""&&c.length>1?1:0;return DN(c,u,t)},getConflictingClassGroupIds:(l,c)=>{if(c){const u=r[l],d=n[l];return u?d?wne(d,u):u:d||Zk}return n[l]||Zk}}},DN=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],s=n.nextPart.get(o);if(s){const d=DN(e,t+1,s);if(d)return d}const l=n.validators;if(l===null)return;const c=t===0?e.join(py):e.slice(t).join(py),u=l.length;for(let d=0;d<u;d++){const h=l[d];if(h.validator(c))return h.classGroupId}},Cne=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?_ne+r:void 0})(),Tne=e=>{const{theme:t,classGroups:n}=e;return Rne(n,t)},Rne=(e,t)=>{const n=NN();for(const r in e){const o=e[r];F_(o,n,r,t)}return n},F_=(e,t,n,r)=>{const o=e.length;for(let s=0;s<o;s++){const l=e[s];One(l,t,n,r)}},One=(e,t,n,r)=>{if(typeof e=="string"){Ane(e,t,n);return}if(typeof e=="function"){kne(e,t,n,r);return}Mne(e,t,n,r)},Ane=(e,t,n)=>{const r=e===""?t:$N(t,e);r.classGroupId=n},kne=(e,t,n,r)=>{if(jne(e)){F_(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(xne(n,e))},Mne=(e,t,n,r)=>{const o=Object.entries(e),s=o.length;for(let l=0;l<s;l++){const[c,u]=o[l];F_(u,$N(t,c),n,r)}},$N=(e,t)=>{let n=e;const r=t.split(py),o=r.length;for(let s=0;s<o;s++){const l=r[s];let c=n.nextPart.get(l);c||(c=NN(),n.nextPart.set(l,c)),n=c}return n},jne=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Pne=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(s,l)=>{n[s]=l,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(s){let l=n[s];if(l!==void 0)return l;if((l=r[s])!==void 0)return o(s,l),l},set(s,l){s in n?n[s]=l:o(s,l)}}},ww="!",Wk=":",Nne=[],Yk=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),Dne=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let l=0,c=0,u=0,d;const h=o.length;for(let _=0;_<h;_++){const w=o[_];if(l===0&&c===0){if(w===Wk){s.push(o.slice(u,_)),u=_+1;continue}if(w==="/"){d=_;continue}}w==="["?l++:w==="]"?l--:w==="("?c++:w===")"&&c--}const p=s.length===0?o:o.slice(u);let g=p,b=!1;p.endsWith(ww)?(g=p.slice(0,-1),b=!0):p.startsWith(ww)&&(g=p.slice(1),b=!0);const y=d&&d>u?d-u:void 0;return Yk(s,b,g,y)};if(t){const o=t+Wk,s=r;r=l=>l.startsWith(o)?s(l.slice(o.length)):Yk(Nne,!1,l,void 0,!0)}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},$ne=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let s=0;s<n.length;s++){const l=n[s],c=l[0]==="[",u=t.has(l);c||u?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(l)):o.push(l)}return o.length>0&&(o.sort(),r.push(...o)),r}},Ine=e=>({cache:Pne(e.cacheSize),parseClassName:Dne(e),sortModifiers:$ne(e),...Ene(e)}),zne=/\s+/,Lne=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,l=[],c=e.trim().split(zne);let u="";for(let d=c.length-1;d>=0;d-=1){const h=c[d],{isExternal:p,modifiers:g,hasImportantModifier:b,baseClassName:y,maybePostfixModifierPosition:_}=n(h);if(p){u=h+(u.length>0?" "+u:u);continue}let w=!!_,T=r(w?y.substring(0,_):y);if(!T){if(!w){u=h+(u.length>0?" "+u:u);continue}if(T=r(y),!T){u=h+(u.length>0?" "+u:u);continue}w=!1}const v=g.length===0?"":g.length===1?g[0]:s(g).join(":"),E=b?v+ww:v,S=E+T;if(l.indexOf(S)>-1)continue;l.push(S);const C=o(T,w);for(let x=0;x<C.length;++x){const O=C[x];l.push(E+O)}u=h+(u.length>0?" "+u:u)}return u},Fne=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=IN(n))&&(o&&(o+=" "),o+=r);return o},IN=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=IN(e[r]))&&(n&&(n+=" "),n+=t);return n},Une=(e,...t)=>{let n,r,o,s;const l=u=>{const d=t.reduce((h,p)=>p(h),e());return n=Ine(d),r=n.cache.get,o=n.cache.set,s=c,c(u)},c=u=>{const d=r(u);if(d)return d;const h=Lne(u,n);return o(u,h),h};return s=l,(...u)=>s(Fne(...u))},Vne=[],_r=e=>{const t=n=>n[e]||Vne;return t.isThemeGetter=!0,t},zN=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,LN=/^\((?:(\w[\w-]*):)?(.+)\)$/i,qne=/^\d+\/\d+$/,Bne=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Hne=/\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$/,Kne=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Gne=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Zne=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,nu=e=>qne.test(e),kt=e=>!!e&&!Number.isNaN(Number(e)),wa=e=>!!e&&Number.isInteger(Number(e)),S1=e=>e.endsWith("%")&&kt(e.slice(0,-1)),Ms=e=>Bne.test(e),Wne=()=>!0,Yne=e=>Hne.test(e)&&!Kne.test(e),FN=()=>!1,Xne=e=>Gne.test(e),Qne=e=>Zne.test(e),Jne=e=>!Qe(e)&&!Je(e),ere=e=>hf(e,qN,FN),Qe=e=>zN.test(e),jl=e=>hf(e,BN,Yne),w1=e=>hf(e,ire,kt),Xk=e=>hf(e,UN,FN),tre=e=>hf(e,VN,Qne),sg=e=>hf(e,HN,Xne),Je=e=>LN.test(e),Sd=e=>pf(e,BN),nre=e=>pf(e,sre),Qk=e=>pf(e,UN),rre=e=>pf(e,qN),ore=e=>pf(e,VN),ag=e=>pf(e,HN,!0),hf=(e,t,n)=>{const r=zN.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},pf=(e,t,n=!1)=>{const r=LN.exec(e);return r?r[1]?t(r[1]):n:!1},UN=e=>e==="position"||e==="percentage",VN=e=>e==="image"||e==="url",qN=e=>e==="length"||e==="size"||e==="bg-size",BN=e=>e==="length",ire=e=>e==="number",sre=e=>e==="family-name",HN=e=>e==="shadow",are=()=>{const e=_r("color"),t=_r("font"),n=_r("text"),r=_r("font-weight"),o=_r("tracking"),s=_r("leading"),l=_r("breakpoint"),c=_r("container"),u=_r("spacing"),d=_r("radius"),h=_r("shadow"),p=_r("inset-shadow"),g=_r("text-shadow"),b=_r("drop-shadow"),y=_r("blur"),_=_r("perspective"),w=_r("aspect"),T=_r("ease"),v=_r("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...S(),Je,Qe],x=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],M=()=>[Je,Qe,u],P=()=>[nu,"full","auto",...M()],z=()=>[wa,"none","subgrid",Je,Qe],I=()=>["auto",{span:["full",wa,Je,Qe]},wa,Je,Qe],q=()=>[wa,"auto",Je,Qe],G=()=>["auto","min","max","fr",Je,Qe],ee=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],J=()=>["start","end","center","stretch","center-safe","end-safe"],Z=()=>["auto",...M()],H=()=>[nu,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...M()],Y=()=>[e,Je,Qe],oe=()=>[...S(),Qk,Xk,{position:[Je,Qe]}],ne=()=>["no-repeat",{repeat:["","x","y","space","round"]}],$=()=>["auto","cover","contain",rre,ere,{size:[Je,Qe]}],V=()=>[S1,Sd,jl],U=()=>["","none","full",d,Je,Qe],D=()=>["",kt,Sd,jl],B=()=>["solid","dashed","dotted","double"],te=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],re=()=>[kt,S1,Qk,Xk],le=()=>["","none",y,Je,Qe],ge=()=>["none",kt,Je,Qe],Me=()=>["none",kt,Je,Qe],Q=()=>[kt,Je,Qe],ie=()=>[nu,"full",...M()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ms],breakpoint:[Ms],color:[Wne],container:[Ms],"drop-shadow":[Ms],ease:["in","out","in-out"],font:[Jne],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ms],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ms],shadow:[Ms],spacing:["px",kt],text:[Ms],"text-shadow":[Ms],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",nu,Qe,Je,w]}],container:["container"],columns:[{columns:[kt,Qe,Je,c]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"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:C()}],overflow:[{overflow:x()}],"overflow-x":[{"overflow-x":x()}],"overflow-y":[{"overflow-y":x()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{start:P()}],end:[{end:P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[wa,"auto",Je,Qe]}],basis:[{basis:[nu,"full","auto",c,...M()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[kt,nu,"auto","initial","none",Qe]}],grow:[{grow:["",kt,Je,Qe]}],shrink:[{shrink:["",kt,Je,Qe]}],order:[{order:[wa,"first","last","none",Je,Qe]}],"grid-cols":[{"grid-cols":z()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":z()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":G()}],"auto-rows":[{"auto-rows":G()}],gap:[{gap:M()}],"gap-x":[{"gap-x":M()}],"gap-y":[{"gap-y":M()}],"justify-content":[{justify:[...ee(),"normal"]}],"justify-items":[{"justify-items":[...J(),"normal"]}],"justify-self":[{"justify-self":["auto",...J()]}],"align-content":[{content:["normal",...ee()]}],"align-items":[{items:[...J(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...J(),{baseline:["","last"]}]}],"place-content":[{"place-content":ee()}],"place-items":[{"place-items":[...J(),"baseline"]}],"place-self":[{"place-self":["auto",...J()]}],p:[{p:M()}],px:[{px:M()}],py:[{py:M()}],ps:[{ps:M()}],pe:[{pe:M()}],pt:[{pt:M()}],pr:[{pr:M()}],pb:[{pb:M()}],pl:[{pl:M()}],m:[{m:Z()}],mx:[{mx:Z()}],my:[{my:Z()}],ms:[{ms:Z()}],me:[{me:Z()}],mt:[{mt:Z()}],mr:[{mr:Z()}],mb:[{mb:Z()}],ml:[{ml:Z()}],"space-x":[{"space-x":M()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":M()}],"space-y-reverse":["space-y-reverse"],size:[{size:H()}],w:[{w:[c,"screen",...H()]}],"min-w":[{"min-w":[c,"screen","none",...H()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[l]},...H()]}],h:[{h:["screen","lh",...H()]}],"min-h":[{"min-h":["screen","lh","none",...H()]}],"max-h":[{"max-h":["screen","lh",...H()]}],"font-size":[{text:["base",n,Sd,jl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Je,w1]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",S1,Qe]}],"font-family":[{font:[nre,Qe,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:[o,Je,Qe]}],"line-clamp":[{"line-clamp":[kt,"none",Je,w1]}],leading:[{leading:[s,...M()]}],"list-image":[{"list-image":["none",Je,Qe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Je,Qe]}],"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:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:[kt,"from-font","auto",Je,jl]}],"text-decoration-color":[{decoration:Y()}],"underline-offset":[{"underline-offset":[kt,"auto",Je,Qe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Je,Qe]}],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",Je,Qe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:oe()}],"bg-repeat":[{bg:ne()}],"bg-size":[{bg:$()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},wa,Je,Qe],radial:["",Je,Qe],conic:[wa,Je,Qe]},ore,tre]}],"bg-color":[{bg:Y()}],"gradient-from-pos":[{from:V()}],"gradient-via-pos":[{via:V()}],"gradient-to-pos":[{to:V()}],"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:D()}],"border-w-x":[{"border-x":D()}],"border-w-y":[{"border-y":D()}],"border-w-s":[{"border-s":D()}],"border-w-e":[{"border-e":D()}],"border-w-t":[{"border-t":D()}],"border-w-r":[{"border-r":D()}],"border-w-b":[{"border-b":D()}],"border-w-l":[{"border-l":D()}],"divide-x":[{"divide-x":D()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":D()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...B(),"hidden","none"]}],"divide-style":[{divide:[...B(),"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:[...B(),"none","hidden"]}],"outline-offset":[{"outline-offset":[kt,Je,Qe]}],"outline-w":[{outline:["",kt,Sd,jl]}],"outline-color":[{outline:Y()}],shadow:[{shadow:["","none",h,ag,sg]}],"shadow-color":[{shadow:Y()}],"inset-shadow":[{"inset-shadow":["none",p,ag,sg]}],"inset-shadow-color":[{"inset-shadow":Y()}],"ring-w":[{ring:D()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Y()}],"ring-offset-w":[{"ring-offset":[kt,jl]}],"ring-offset-color":[{"ring-offset":Y()}],"inset-ring-w":[{"inset-ring":D()}],"inset-ring-color":[{"inset-ring":Y()}],"text-shadow":[{"text-shadow":["none",g,ag,sg]}],"text-shadow-color":[{"text-shadow":Y()}],opacity:[{opacity:[kt,Je,Qe]}],"mix-blend":[{"mix-blend":[...te(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":te()}],"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":[kt]}],"mask-image-linear-from-pos":[{"mask-linear-from":re()}],"mask-image-linear-to-pos":[{"mask-linear-to":re()}],"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":re()}],"mask-image-t-to-pos":[{"mask-t-to":re()}],"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":re()}],"mask-image-r-to-pos":[{"mask-r-to":re()}],"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":re()}],"mask-image-b-to-pos":[{"mask-b-to":re()}],"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":re()}],"mask-image-l-to-pos":[{"mask-l-to":re()}],"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":re()}],"mask-image-x-to-pos":[{"mask-x-to":re()}],"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":re()}],"mask-image-y-to-pos":[{"mask-y-to":re()}],"mask-image-y-from-color":[{"mask-y-from":Y()}],"mask-image-y-to-color":[{"mask-y-to":Y()}],"mask-image-radial":[{"mask-radial":[Je,Qe]}],"mask-image-radial-from-pos":[{"mask-radial-from":re()}],"mask-image-radial-to-pos":[{"mask-radial-to":re()}],"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":S()}],"mask-image-conic-pos":[{"mask-conic":[kt]}],"mask-image-conic-from-pos":[{"mask-conic-from":re()}],"mask-image-conic-to-pos":[{"mask-conic-to":re()}],"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:oe()}],"mask-repeat":[{mask:ne()}],"mask-size":[{mask:$()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Je,Qe]}],filter:[{filter:["","none",Je,Qe]}],blur:[{blur:le()}],brightness:[{brightness:[kt,Je,Qe]}],contrast:[{contrast:[kt,Je,Qe]}],"drop-shadow":[{"drop-shadow":["","none",b,ag,sg]}],"drop-shadow-color":[{"drop-shadow":Y()}],grayscale:[{grayscale:["",kt,Je,Qe]}],"hue-rotate":[{"hue-rotate":[kt,Je,Qe]}],invert:[{invert:["",kt,Je,Qe]}],saturate:[{saturate:[kt,Je,Qe]}],sepia:[{sepia:["",kt,Je,Qe]}],"backdrop-filter":[{"backdrop-filter":["","none",Je,Qe]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[kt,Je,Qe]}],"backdrop-contrast":[{"backdrop-contrast":[kt,Je,Qe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",kt,Je,Qe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[kt,Je,Qe]}],"backdrop-invert":[{"backdrop-invert":["",kt,Je,Qe]}],"backdrop-opacity":[{"backdrop-opacity":[kt,Je,Qe]}],"backdrop-saturate":[{"backdrop-saturate":[kt,Je,Qe]}],"backdrop-sepia":[{"backdrop-sepia":["",kt,Je,Qe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":M()}],"border-spacing-x":[{"border-spacing-x":M()}],"border-spacing-y":[{"border-spacing-y":M()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Je,Qe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[kt,"initial",Je,Qe]}],ease:[{ease:["linear","initial",T,Je,Qe]}],delay:[{delay:[kt,Je,Qe]}],animate:[{animate:["none",v,Je,Qe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[_,Je,Qe]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:ge()}],"rotate-x":[{"rotate-x":ge()}],"rotate-y":[{"rotate-y":ge()}],"rotate-z":[{"rotate-z":ge()}],scale:[{scale:Me()}],"scale-x":[{"scale-x":Me()}],"scale-y":[{"scale-y":Me()}],"scale-z":[{"scale-z":Me()}],"scale-3d":["scale-3d"],skew:[{skew:Q()}],"skew-x":[{"skew-x":Q()}],"skew-y":[{"skew-y":Q()}],transform:[{transform:[Je,Qe,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ie()}],"translate-x":[{"translate-x":ie()}],"translate-y":[{"translate-y":ie()}],"translate-z":[{"translate-z":ie()}],"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",Je,Qe]}],"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":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"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",Je,Qe]}],fill:[{fill:["none",...Y()]}],"stroke-w":[{stroke:[kt,Sd,jl,w1]}],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"]}},KN=Une(are);function pn(...e){return KN(L_(e))}const lre=rl("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 lh({className:e,variant:t="default",size:n="default",...r}){return j.jsx(Sne,{"data-slot":"button",className:pn(lre({variant:t,size:n,className:e})),...r})}const cre=()=>{const e=hte(),t=e?.name,n=e?.version,[,r]=n_();return j.jsx("div",{className:"flex flex-col border-b border-border bg-background",children:j.jsxs("div",{className:"flex h-14 items-center justify-between px-4",children:[j.jsxs("div",{className:"flex items-center gap-4",children:[j.jsx("button",{type:"button",className:"font-semibold cursor-pointer",onClick:()=>{r(null)},children:"Skybridge"}),j.jsx("span",{className:"h-4 w-px bg-border","aria-hidden":"true"}),j.jsxs("div",{className:"flex items-center gap-4 rounded-md border border-border bg-muted px-2 py-1",children:[j.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:t}),j.jsxs("span",{className:"text-xs text-muted-foreground",children:["v",n]})]}),j.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:[j.jsx("span",{className:"h-2 w-2 rounded-full bg-green-500 mr-1 inline-block"}),"Connected"]})]}),j.jsx("div",{className:"flex items-center gap-2",children:j.jsx(lh,{variant:"ghost",size:"sm",className:"h-8 gap-2",children:j.jsxs("a",{href:"https://www.skybridge.tech/",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2",children:["Learn more about Skybridge",j.jsx(Ate,{className:"h-3.5 w-3.5"})]})})})]})})},GN=k.createContext({});function ure(e){const t=k.useRef(null);return t.current===null&&(t.current=e()),t.current}const ZN=typeof window<"u",fre=ZN?k.useLayoutEffect:k.useEffect,U_=k.createContext(null);function V_(e,t){e.indexOf(t)===-1&&e.push(t)}function q_(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Xi=(e,t,n)=>n>t?t:n<e?e:n;let B_=()=>{};const zs={},WN=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function YN(e){return typeof e=="object"&&e!==null}const XN=e=>/^0[^.\s]+$/u.test(e);function H_(e){let t;return()=>(t===void 0&&(t=e()),t)}const ii=e=>e,dre=(e,t)=>n=>t(e(n)),qh=(...e)=>e.reduce(dre),ch=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class K_{constructor(){this.subscriptions=[]}add(t){return V_(this.subscriptions,t),()=>q_(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let s=0;s<o;s++){const l=this.subscriptions[s];l&&l(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ds=e=>e*1e3,ni=e=>e/1e3;function QN(e,t){return t?e*(1e3/t):0}const JN=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,hre=1e-7,pre=12;function mre(e,t,n,r,o){let s,l,c=0;do l=t+(n-t)/2,s=JN(l,r,o)-e,s>0?n=l:t=l;while(Math.abs(s)>hre&&++c<pre);return l}function Bh(e,t,n,r){if(e===t&&n===r)return ii;const o=s=>mre(s,0,1,e,n);return s=>s===0||s===1?s:JN(o(s),t,r)}const eD=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,tD=e=>t=>1-e(1-t),nD=Bh(.33,1.53,.69,.99),G_=tD(nD),rD=eD(G_),oD=e=>(e*=2)<1?.5*G_(e):.5*(2-Math.pow(2,-10*(e-1))),Z_=e=>1-Math.sin(Math.acos(e)),iD=tD(Z_),sD=eD(Z_),gre=Bh(.42,0,1,1),yre=Bh(0,0,.58,1),aD=Bh(.42,0,.58,1),vre=e=>Array.isArray(e)&&typeof e[0]!="number",lD=e=>Array.isArray(e)&&typeof e[0]=="number",bre={linear:ii,easeIn:gre,easeInOut:aD,easeOut:yre,circIn:Z_,circInOut:sD,circOut:iD,backIn:G_,backInOut:rD,backOut:nD,anticipate:oD},Sre=e=>typeof e=="string",Jk=e=>{if(lD(e)){B_(e.length===4);const[t,n,r,o]=e;return Bh(t,n,r,o)}else if(Sre(e))return bre[e];return e},lg=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function wre(e,t){let n=new Set,r=new Set,o=!1,s=!1;const l=new WeakSet;let c={delta:0,timestamp:0,isProcessing:!1};function u(h){l.has(h)&&(d.schedule(h),e()),h(c)}const d={schedule:(h,p=!1,g=!1)=>{const y=g&&o?n:r;return p&&l.add(h),y.has(h)||y.add(h),h},cancel:h=>{r.delete(h),l.delete(h)},process:h=>{if(c=h,o){s=!0;return}o=!0,[n,r]=[r,n],n.forEach(u),n.clear(),o=!1,s&&(s=!1,d.process(h))}};return d}const xre=40;function cD(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,l=lg.reduce((E,S)=>(E[S]=wre(s),E),{}),{setup:c,read:u,resolveKeyframes:d,preUpdate:h,update:p,preRender:g,render:b,postRender:y}=l,_=()=>{const E=zs.useManualTiming?o.timestamp:performance.now();n=!1,zs.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(E-o.timestamp,xre),1)),o.timestamp=E,o.isProcessing=!0,c.process(o),u.process(o),d.process(o),h.process(o),p.process(o),g.process(o),b.process(o),y.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(_))},w=()=>{n=!0,r=!0,o.isProcessing||e(_)};return{schedule:lg.reduce((E,S)=>{const C=l[S];return E[S]=(x,O=!1,M=!1)=>(n||w(),C.schedule(x,O,M)),E},{}),cancel:E=>{for(let S=0;S<lg.length;S++)l[lg[S]].cancel(E)},state:o,steps:l}}const{schedule:$n,cancel:Ka,state:Vr,steps:x1}=cD(typeof requestAnimationFrame<"u"?requestAnimationFrame:ii,!0);let Dg;function _re(){Dg=void 0}const fo={now:()=>(Dg===void 0&&fo.set(Vr.isProcessing||zs.useManualTiming?Vr.timestamp:performance.now()),Dg),set:e=>{Dg=e,queueMicrotask(_re)}},uD=e=>t=>typeof t=="string"&&t.startsWith(e),fD=uD("--"),Ere=uD("var(--"),W_=e=>Ere(e)?Cre.test(e.split("/*")[0].trim()):!1,Cre=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function e5(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const mf={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},uh={...mf,transform:e=>Xi(0,1,e)},cg={...mf,default:1},Ud=e=>Math.round(e*1e5)/1e5,Y_=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Tre(e){return e==null}const Rre=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,X_=(e,t)=>n=>!!(typeof n=="string"&&Rre.test(n)&&n.startsWith(e)||t&&!Tre(n)&&Object.prototype.hasOwnProperty.call(n,t)),dD=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,s,l,c]=r.match(Y_);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(l),alpha:c!==void 0?parseFloat(c):1}},Ore=e=>Xi(0,255,e),_1={...mf,transform:e=>Math.round(Ore(e))},Ul={test:X_("rgb","red"),parse:dD("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+_1.transform(e)+", "+_1.transform(t)+", "+_1.transform(n)+", "+Ud(uh.transform(r))+")"};function Are(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const xw={test:X_("#"),parse:Are,transform:Ul.transform},Hh=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),_a=Hh("deg"),Gi=Hh("%"),Ye=Hh("px"),kre=Hh("vh"),Mre=Hh("vw"),t5={...Gi,parse:e=>Gi.parse(e)/100,transform:e=>Gi.transform(e*100)},vu={test:X_("hsl","hue"),parse:dD("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Gi.transform(Ud(t))+", "+Gi.transform(Ud(n))+", "+Ud(uh.transform(r))+")"},yr={test:e=>Ul.test(e)||xw.test(e)||vu.test(e),parse:e=>Ul.test(e)?Ul.parse(e):vu.test(e)?vu.parse(e):xw.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ul.transform(e):vu.transform(e),getAnimatableNone:e=>{const t=yr.parse(e);return t.alpha=0,yr.transform(t)}},jre=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Pre(e){return isNaN(e)&&typeof e=="string"&&(e.match(Y_)?.length||0)+(e.match(jre)?.length||0)>0}const hD="number",pD="color",Nre="var",Dre="var(",n5="${}",$re=/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 fh(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const c=t.replace($re,u=>(yr.test(u)?(r.color.push(s),o.push(pD),n.push(yr.parse(u))):u.startsWith(Dre)?(r.var.push(s),o.push(Nre),n.push(u)):(r.number.push(s),o.push(hD),n.push(parseFloat(u))),++s,n5)).split(n5);return{values:n,split:c,indexes:r,types:o}}function mD(e){return fh(e).values}function gD(e){const{split:t,types:n}=fh(e),r=t.length;return o=>{let s="";for(let l=0;l<r;l++)if(s+=t[l],o[l]!==void 0){const c=n[l];c===hD?s+=Ud(o[l]):c===pD?s+=yr.transform(o[l]):s+=o[l]}return s}}const Ire=e=>typeof e=="number"?0:yr.test(e)?yr.getAnimatableNone(e):e;function zre(e){const t=mD(e);return gD(e)(t.map(Ire))}const Ga={test:Pre,parse:mD,createTransformer:gD,getAnimatableNone:zre};function E1(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Lre({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,l=0;if(!t)o=s=l=n;else{const c=n<.5?n*(1+t):n+t-n*t,u=2*n-c;o=E1(u,c,e+1/3),s=E1(u,c,e),l=E1(u,c,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(l*255),alpha:r}}function my(e,t){return n=>n>0?t:e}const Wn=(e,t,n)=>e+(t-e)*n,C1=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},Fre=[xw,Ul,vu],Ure=e=>Fre.find(t=>t.test(e));function r5(e){const t=Ure(e);if(!t)return!1;let n=t.parse(e);return t===vu&&(n=Lre(n)),n}const o5=(e,t)=>{const n=r5(e),r=r5(t);if(!n||!r)return my(e,t);const o={...n};return s=>(o.red=C1(n.red,r.red,s),o.green=C1(n.green,r.green,s),o.blue=C1(n.blue,r.blue,s),o.alpha=Wn(n.alpha,r.alpha,s),Ul.transform(o))},_w=new Set(["none","hidden"]);function Vre(e,t){return _w.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function qre(e,t){return n=>Wn(e,t,n)}function Q_(e){return typeof e=="number"?qre:typeof e=="string"?W_(e)?my:yr.test(e)?o5:Kre:Array.isArray(e)?yD:typeof e=="object"?yr.test(e)?o5:Bre:my}function yD(e,t){const n=[...e],r=n.length,o=e.map((s,l)=>Q_(s)(s,t[l]));return s=>{for(let l=0;l<r;l++)n[l]=o[l](s);return n}}function Bre(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Q_(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function Hre(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const s=t.types[o],l=e.indexes[s][r[s]],c=e.values[l]??0;n[o]=c,r[s]++}return n}const Kre=(e,t)=>{const n=Ga.createTransformer(t),r=fh(e),o=fh(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?_w.has(e)&&!o.values.length||_w.has(t)&&!r.values.length?Vre(e,t):qh(yD(Hre(r,o),o.values),n):my(e,t)};function vD(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Wn(e,t,n):Q_(e)(e,t)}const Gre=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>$n.update(t,n),stop:()=>Ka(t),now:()=>Vr.isProcessing?Vr.timestamp:fo.now()}},bD=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let s=0;s<o;s++)r+=Math.round(e(s/(o-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},gy=2e4;function J_(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<gy;)t+=n,r=e.next(t);return t>=gy?1/0:t}function Zre(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(J_(r),gy);return{type:"keyframes",ease:s=>r.next(o*s).value/t,duration:ni(o)}}const Wre=5;function SD(e,t,n){const r=Math.max(t-Wre,0);return QN(n-e(r),t-r)}const nr={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},T1=.001;function Yre({duration:e=nr.duration,bounce:t=nr.bounce,velocity:n=nr.velocity,mass:r=nr.mass}){let o,s,l=1-t;l=Xi(nr.minDamping,nr.maxDamping,l),e=Xi(nr.minDuration,nr.maxDuration,ni(e)),l<1?(o=d=>{const h=d*l,p=h*e,g=h-n,b=Ew(d,l),y=Math.exp(-p);return T1-g/b*y},s=d=>{const p=d*l*e,g=p*n+n,b=Math.pow(l,2)*Math.pow(d,2)*e,y=Math.exp(-p),_=Ew(Math.pow(d,2),l);return(-o(d)+T1>0?-1:1)*((g-b)*y)/_}):(o=d=>{const h=Math.exp(-d*e),p=(d-n)*e+1;return-T1+h*p},s=d=>{const h=Math.exp(-d*e),p=(n-d)*(e*e);return h*p});const c=5/e,u=Qre(o,s,c);if(e=Ds(e),isNaN(u))return{stiffness:nr.stiffness,damping:nr.damping,duration:e};{const d=Math.pow(u,2)*r;return{stiffness:d,damping:l*2*Math.sqrt(r*d),duration:e}}}const Xre=12;function Qre(e,t,n){let r=n;for(let o=1;o<Xre;o++)r=r-e(r)/t(r);return r}function Ew(e,t){return e*Math.sqrt(1-t*t)}const Jre=["duration","bounce"],eoe=["stiffness","damping","mass"];function i5(e,t){return t.some(n=>e[n]!==void 0)}function toe(e){let t={velocity:nr.velocity,stiffness:nr.stiffness,damping:nr.damping,mass:nr.mass,isResolvedFromDuration:!1,...e};if(!i5(e,eoe)&&i5(e,Jre))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,s=2*Xi(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:nr.mass,stiffness:o,damping:s}}else{const n=Yre(e);t={...t,...n,mass:nr.mass},t.isResolvedFromDuration=!0}return t}function yy(e=nr.visualDuration,t=nr.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const s=n.keyframes[0],l=n.keyframes[n.keyframes.length-1],c={done:!1,value:s},{stiffness:u,damping:d,mass:h,duration:p,velocity:g,isResolvedFromDuration:b}=toe({...n,velocity:-ni(n.velocity||0)}),y=g||0,_=d/(2*Math.sqrt(u*h)),w=l-s,T=ni(Math.sqrt(u/h)),v=Math.abs(w)<5;r||(r=v?nr.restSpeed.granular:nr.restSpeed.default),o||(o=v?nr.restDelta.granular:nr.restDelta.default);let E;if(_<1){const C=Ew(T,_);E=x=>{const O=Math.exp(-_*T*x);return l-O*((y+_*T*w)/C*Math.sin(C*x)+w*Math.cos(C*x))}}else if(_===1)E=C=>l-Math.exp(-T*C)*(w+(y+T*w)*C);else{const C=T*Math.sqrt(_*_-1);E=x=>{const O=Math.exp(-_*T*x),M=Math.min(C*x,300);return l-O*((y+_*T*w)*Math.sinh(M)+C*w*Math.cosh(M))/C}}const S={calculatedDuration:b&&p||null,next:C=>{const x=E(C);if(b)c.done=C>=p;else{let O=C===0?y:0;_<1&&(O=C===0?Ds(y):SD(E,C,x));const M=Math.abs(O)<=r,P=Math.abs(l-x)<=o;c.done=M&&P}return c.value=c.done?l:x,c},toString:()=>{const C=Math.min(J_(S),gy),x=bD(O=>S.next(C*O).value,C,30);return C+"ms "+x},toTransition:()=>{}};return S}yy.applyToOptions=e=>{const t=Zre(e,100,yy);return e.ease=t.ease,e.duration=Ds(t.duration),e.type="keyframes",e};function Cw({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:l,min:c,max:u,restDelta:d=.5,restSpeed:h}){const p=e[0],g={done:!1,value:p},b=M=>c!==void 0&&M<c||u!==void 0&&M>u,y=M=>c===void 0?u:u===void 0||Math.abs(c-M)<Math.abs(u-M)?c:u;let _=n*t;const w=p+_,T=l===void 0?w:l(w);T!==w&&(_=T-p);const v=M=>-_*Math.exp(-M/r),E=M=>T+v(M),S=M=>{const P=v(M),z=E(M);g.done=Math.abs(P)<=d,g.value=g.done?T:z};let C,x;const O=M=>{b(g.value)&&(C=M,x=yy({keyframes:[g.value,y(g.value)],velocity:SD(E,M,g.value),damping:o,stiffness:s,restDelta:d,restSpeed:h}))};return O(0),{calculatedDuration:null,next:M=>{let P=!1;return!x&&C===void 0&&(P=!0,S(M),O(M)),C!==void 0&&M>=C?x.next(M-C):(!P&&S(M),g)}}}function noe(e,t,n){const r=[],o=n||zs.mix||vD,s=e.length-1;for(let l=0;l<s;l++){let c=o(e[l],e[l+1]);if(t){const u=Array.isArray(t)?t[l]||ii:t;c=qh(u,c)}r.push(c)}return r}function roe(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(B_(s===t.length),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const l=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const c=noe(t,r,o),u=c.length,d=h=>{if(l&&h<e[0])return t[0];let p=0;if(u>1)for(;p<e.length-2&&!(h<e[p+1]);p++);const g=ch(e[p],e[p+1],h);return c[p](g)};return n?h=>d(Xi(e[0],e[s-1],h)):d}function ooe(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=ch(0,t,r);e.push(Wn(n,1,o))}}function ioe(e){const t=[0];return ooe(t,e.length-1),t}function soe(e,t){return e.map(n=>n*t)}function aoe(e,t){return e.map(()=>t||aD).splice(0,e.length-1)}function Vd({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=vre(r)?r.map(Jk):Jk(r),s={done:!1,value:t[0]},l=soe(n&&n.length===t.length?n:ioe(t),e),c=roe(l,t,{ease:Array.isArray(o)?o:aoe(t,o)});return{calculatedDuration:e,next:u=>(s.value=c(u),s.done=u>=e,s)}}const loe=e=>e!==null;function eE(e,{repeat:t,repeatType:n="loop"},r,o=1){const s=e.filter(loe),c=o<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!c||r===void 0?s[c]:r}const coe={decay:Cw,inertia:Cw,tween:Vd,keyframes:Vd,spring:yy};function wD(e){typeof e.type=="string"&&(e.type=coe[e.type])}class tE{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const uoe=e=>e/100;class nE extends tE{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:n}=this.options;n&&n.updatedAt!==fo.now()&&this.tick(fo.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;wD(t);const{type:n=Vd,repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:l=0}=t;let{keyframes:c}=t;const u=n||Vd;u!==Vd&&typeof c[0]!="number"&&(this.mixKeyframes=qh(uoe,vD(c[0],c[1])),c=[0,100]);const d=u({...t,keyframes:c});s==="mirror"&&(this.mirroredGenerator=u({...t,keyframes:[...c].reverse(),velocity:-l})),d.calculatedDuration===null&&(d.calculatedDuration=J_(d));const{calculatedDuration:h}=d;this.calculatedDuration=h,this.resolvedDuration=h+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=d}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:o,mixKeyframes:s,mirroredGenerator:l,resolvedDuration:c,calculatedDuration:u}=this;if(this.startTime===null)return r.next(0);const{delay:d=0,keyframes:h,repeat:p,repeatType:g,repeatDelay:b,type:y,onUpdate:_,finalKeyframe:w}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const T=this.currentTime-d*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?T<0:T>o;this.currentTime=Math.max(T,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let E=this.currentTime,S=r;if(p){const M=Math.min(this.currentTime,o)/c;let P=Math.floor(M),z=M%1;!z&&M>=1&&(z=1),z===1&&P--,P=Math.min(P,p+1),P%2&&(g==="reverse"?(z=1-z,b&&(z-=b/c)):g==="mirror"&&(S=l)),E=Xi(0,1,z)*c}const C=v?{done:!1,value:h[0]}:S.next(E);s&&(C.value=s(C.value));let{done:x}=C;!v&&u!==null&&(x=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const O=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&x);return O&&y!==Cw&&(C.value=eE(h,this.options,w,this.speed)),_&&_(C.value),O&&this.finish(),C}then(t,n){return this.finished.then(t,n)}get duration(){return ni(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ni(t)}get time(){return ni(this.currentTime)}set time(t){t=Ds(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(fo.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=ni(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Gre,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),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(fo.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 foe(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Vl=e=>e*180/Math.PI,Tw=e=>{const t=Vl(Math.atan2(e[1],e[0]));return Rw(t)},doe={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Tw,rotateZ:Tw,skewX:e=>Vl(Math.atan(e[1])),skewY:e=>Vl(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Rw=e=>(e=e%360,e<0&&(e+=360),e),s5=Tw,a5=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),l5=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),hoe={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:a5,scaleY:l5,scale:e=>(a5(e)+l5(e))/2,rotateX:e=>Rw(Vl(Math.atan2(e[6],e[5]))),rotateY:e=>Rw(Vl(Math.atan2(-e[2],e[0]))),rotateZ:s5,rotate:s5,skewX:e=>Vl(Math.atan(e[4])),skewY:e=>Vl(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Ow(e){return e.includes("scale")?1:0}function Aw(e,t){if(!e||e==="none")return Ow(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=hoe,o=n;else{const c=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=doe,o=c}if(!o)return Ow(t);const s=r[t],l=o[1].split(",").map(moe);return typeof s=="function"?s(l):l[s]}const poe=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Aw(n,t)};function moe(e){return parseFloat(e.trim())}const gf=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],yf=new Set(gf),c5=e=>e===mf||e===Ye,goe=new Set(["x","y","z"]),yoe=gf.filter(e=>!goe.has(e));function voe(e){const t=[];return yoe.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Oa={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),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})=>Aw(t,"x"),y:(e,{transform:t})=>Aw(t,"y")};Oa.translateX=Oa.x;Oa.translateY=Oa.y;const Hl=new Set;let kw=!1,Mw=!1,jw=!1;function xD(){if(Mw){const e=Array.from(Hl).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=voe(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([s,l])=>{r.getValue(s)?.set(l)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Mw=!1,kw=!1,Hl.forEach(e=>e.complete(jw)),Hl.clear()}function _D(){Hl.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Mw=!0)})}function boe(){jw=!0,_D(),xD(),jw=!1}class rE{constructor(t,n,r,o,s,l=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=s,this.isAsync=l}scheduleResolve(){this.state="scheduled",this.isAsync?(Hl.add(this),kw||(kw=!0,$n.read(_D),$n.resolveKeyframes(xD))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const s=o?.get(),l=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const c=r.readValue(n,l);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=l),o&&s===void 0&&o.set(t[0])}foe(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Hl.delete(this)}cancel(){this.state==="scheduled"&&(Hl.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Soe=e=>e.startsWith("--");function woe(e,t,n){Soe(t)?e.style.setProperty(t,n):e.style[t]=n}const xoe=H_(()=>window.ScrollTimeline!==void 0),_oe={};function Eoe(e,t){const n=H_(e);return()=>_oe[t]??n()}const ED=Eoe(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),kd=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,u5={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:kd([0,.65,.55,1]),circOut:kd([.55,0,1,.45]),backIn:kd([.31,.01,.66,-.59]),backOut:kd([.33,1.53,.69,.99])};function CD(e,t){if(e)return typeof e=="function"?ED()?bD(e,t):"ease-out":lD(e)?kd(e):Array.isArray(e)?e.map(n=>CD(n,t)||u5.easeOut):u5[e]}function Coe(e,t,n,{delay:r=0,duration:o=300,repeat:s=0,repeatType:l="loop",ease:c="easeOut",times:u}={},d=void 0){const h={[t]:n};u&&(h.offset=u);const p=CD(c,o);Array.isArray(p)&&(h.easing=p);const g={delay:r,duration:o,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:s+1,direction:l==="reverse"?"alternate":"normal"};return d&&(g.pseudoElement=d),e.animate(h,g)}function TD(e){return typeof e=="function"&&"applyToOptions"in e}function Toe({type:e,...t}){return TD(e)&&ED()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Roe extends tE{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:s,allowFlatten:l=!1,finalKeyframe:c,onComplete:u}=t;this.isPseudoElement=!!s,this.allowFlatten=l,this.options=t,B_(typeof t.type!="string");const d=Toe(t);this.animation=Coe(n,r,o,d,s),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const h=eE(o,this.options,c,this.speed);this.updateMotionValue?this.updateMotionValue(h):woe(n,r,h),this.animation.cancel()}u?.(),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(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return ni(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ni(t)}get time(){return ni(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Ds(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:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&xoe()?(this.animation.timeline=t,ii):n(this)}}const RD={anticipate:oD,backInOut:rD,circInOut:sD};function Ooe(e){return e in RD}function Aoe(e){typeof e.ease=="string"&&Ooe(e.ease)&&(e.ease=RD[e.ease])}const R1=10;class koe extends Roe{constructor(t){Aoe(t),wD(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:s,...l}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const c=new nE({...l,autoplay:!1}),u=Math.max(R1,fo.now()-this.startTime),d=Xi(0,R1,u-R1);n.setWithVelocity(c.sample(Math.max(0,u-d)).value,c.sample(u).value,d),c.stop()}}const f5=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ga.test(e)||e==="0")&&!e.startsWith("url("));function Moe(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function joe(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],l=f5(o,t),c=f5(s,t);return!l||!c?!1:Moe(e)||(n==="spring"||TD(n))&&r}function Pw(e){e.duration=0,e.type="keyframes"}const Poe=new Set(["opacity","clipPath","filter","transform"]),Noe=H_(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Doe(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:s,type:l}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:d}=t.owner.getProps();return Noe()&&n&&Poe.has(n)&&(n!=="transform"||!d)&&!u&&!r&&o!=="mirror"&&s!==0&&l!=="inertia"}const $oe=40;class Ioe extends tE{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:l="loop",keyframes:c,name:u,motionValue:d,element:h,...p}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=fo.now();const g={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:s,repeatType:l,name:u,motionValue:d,element:h,...p},b=h?.KeyframeResolver||rE;this.keyframeResolver=new b(c,(y,_,w)=>this.onKeyframesResolved(y,_,g,!w),u,d,h),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,o){this.keyframeResolver=void 0;const{name:s,type:l,velocity:c,delay:u,isHandoff:d,onUpdate:h}=r;this.resolvedAt=fo.now(),joe(t,s,l,c)||((zs.instantAnimations||!u)&&h?.(eE(t,r,n)),t[0]=t[t.length-1],Pw(r),r.repeat=0);const g={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>$oe?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},b=!d&&Doe(g)?new koe({...g,element:g.motionValue.owner.current}):new nE(g);b.finished.then(()=>this.notifyFinished()).catch(ii),this.pendingTimeline&&(this.stopTimeline=b.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=b}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),boe()),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()}}const zoe=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Loe(e){const t=zoe.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}function OD(e,t,n=1){const[r,o]=Loe(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const l=s.trim();return WN(l)?parseFloat(l):l}return W_(o)?OD(o,t,n+1):o}function oE(e,t){return e?.[t]??e?.default??e}const Foe={type:"spring",stiffness:500,damping:25,restSpeed:10},Uoe=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Voe={type:"keyframes",duration:.8},qoe={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Boe=(e,{keyframes:t})=>t.length>2?Voe:yf.has(e)?e.startsWith("scale")?Uoe(t[1]):Foe:qoe;function Hoe({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:l,repeatDelay:c,from:u,elapsed:d,...h}){return!!Object.keys(h).length}const Koe=e=>e!==null;function Goe(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(Koe),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[s]}function AD(e,t,n,r=0,o=1){const s=Array.from(e).sort((d,h)=>d.sortNodePosition(h)).indexOf(t),l=e.size,c=(l-1)*r;return typeof n=="function"?n(s,l):o===1?s*r:c-s*r}const iE=(e,t,n,r={},o,s)=>l=>{const c=oE(r,e)||{},u=c.delay||r.delay||0;let{elapsed:d=0}=r;d=d-Ds(u);const h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...c,delay:-d,onUpdate:g=>{t.set(g),c.onUpdate&&c.onUpdate(g)},onComplete:()=>{l(),c.onComplete&&c.onComplete()},name:e,motionValue:t,element:s?void 0:o};Hoe(c)||Object.assign(h,Boe(e,h)),h.duration&&(h.duration=Ds(h.duration)),h.repeatDelay&&(h.repeatDelay=Ds(h.repeatDelay)),h.from!==void 0&&(h.keyframes[0]=h.from);let p=!1;if((h.type===!1||h.duration===0&&!h.repeatDelay)&&(Pw(h),h.delay===0&&(p=!0)),(zs.instantAnimations||zs.skipAnimations)&&(p=!0,Pw(h),h.delay=0),h.allowFlatten=!c.type&&!c.ease,p&&!s&&t.get()!==void 0){const g=Goe(h.keyframes,c);if(g!==void 0){$n.update(()=>{h.onUpdate(g),h.onComplete()});return}}return c.isSync?new nE(h):new Ioe(h)},kD=new Set(["width","height","top","left","right","bottom",...gf]),d5=30,Zoe=e=>!isNaN(parseFloat(e));class Woe{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const o=fo.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const s of this.dependents)s.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=fo.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Zoe(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new K_);const r=this.events[t].add(n);return t==="change"?()=>{r(),$n.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&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=fo.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>d5)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,d5);return QN(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),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 Hu(e,t){return new Woe(e,t)}function h5(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function sE(e,t,n,r){if(typeof t=="function"){const[o,s]=h5(r);t=t(n!==void 0?n:e.custom,o,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,s]=h5(r);t=t(n!==void 0?n:e.custom,o,s)}return t}function Ru(e,t,n){const r=e.getProps();return sE(r,t,n!==void 0?n:r.custom,e)}const Nw=e=>Array.isArray(e);function Yoe(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Hu(n))}function Xoe(e){return Nw(e)?e[e.length-1]||0:e}function Qoe(e,t){const n=Ru(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const l in s){const c=Xoe(s[l]);Yoe(e,l,c)}}const Jr=e=>!!(e&&e.getVelocity);function Joe(e){return!!(Jr(e)&&e.add)}function Dw(e,t){const n=e.getValue("willChange");if(Joe(n))return n.add(t);if(!n&&zs.WillChange){const r=new zs.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function aE(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const eie="framerAppearId",MD="data-"+aE(eie);function jD(e){return e.props[MD]}function tie({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function PD(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:l,...c}=t;r&&(s=r);const u=[],d=o&&e.animationState&&e.animationState.getState()[o];for(const h in c){const p=e.getValue(h,e.latestValues[h]??null),g=c[h];if(g===void 0||d&&tie(d,h))continue;const b={delay:n,...oE(s||{},h)},y=p.get();if(y!==void 0&&!p.isAnimating&&!Array.isArray(g)&&g===y&&!b.velocity)continue;let _=!1;if(window.MotionHandoffAnimation){const T=jD(e);if(T){const v=window.MotionHandoffAnimation(T,h,$n);v!==null&&(b.startTime=v,_=!0)}}Dw(e,h),p.start(iE(h,p,g,e.shouldReduceMotion&&kD.has(h)?{type:!1}:b,e,_));const w=p.animation;w&&u.push(w)}return l&&Promise.all(u).then(()=>{$n.update(()=>{l&&Qoe(e,l)})}),u}function $w(e,t,n={}){const r=Ru(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const s=r?()=>Promise.all(PD(e,r,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:h,staggerDirection:p}=o;return nie(e,t,u,d,h,p,n)}:()=>Promise.resolve(),{when:c}=o;if(c){const[u,d]=c==="beforeChildren"?[s,l]:[l,s];return u().then(()=>d())}else return Promise.all([s(),l(n.delay)])}function nie(e,t,n=0,r=0,o=0,s=1,l){const c=[];for(const u of e.variantChildren)u.notify("AnimationStart",t),c.push($w(u,t,{...l,delay:n+(typeof r=="function"?0:r)+AD(e.variantChildren,u,r,o,s)}).then(()=>u.notify("AnimationComplete",t)));return Promise.all(c)}function rie(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>$w(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=$w(e,t,n);else{const o=typeof t=="function"?Ru(e,t,n.custom):t;r=Promise.all(PD(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const oie={test:e=>e==="auto",parse:e=>e},ND=e=>t=>t.test(e),DD=[mf,Ye,Gi,_a,Mre,kre,oie],p5=e=>DD.find(ND(e));function iie(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||XN(e):!0}const sie=new Set(["brightness","contrast","saturate","opacity"]);function aie(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Y_)||[];if(!r)return e;const o=n.replace(r,"");let s=sie.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const lie=/\b([a-z-]*)\(.*?\)/gu,Iw={...Ga,getAnimatableNone:e=>{const t=e.match(lie);return t?t.map(aie).join(" "):e}},m5={...mf,transform:Math.round},cie={rotate:_a,rotateX:_a,rotateY:_a,rotateZ:_a,scale:cg,scaleX:cg,scaleY:cg,scaleZ:cg,skew:_a,skewX:_a,skewY:_a,distance:Ye,translateX:Ye,translateY:Ye,translateZ:Ye,x:Ye,y:Ye,z:Ye,perspective:Ye,transformPerspective:Ye,opacity:uh,originX:t5,originY:t5,originZ:Ye},lE={borderWidth:Ye,borderTopWidth:Ye,borderRightWidth:Ye,borderBottomWidth:Ye,borderLeftWidth:Ye,borderRadius:Ye,radius:Ye,borderTopLeftRadius:Ye,borderTopRightRadius:Ye,borderBottomRightRadius:Ye,borderBottomLeftRadius:Ye,width:Ye,maxWidth:Ye,height:Ye,maxHeight:Ye,top:Ye,right:Ye,bottom:Ye,left:Ye,inset:Ye,insetBlock:Ye,insetBlockStart:Ye,insetBlockEnd:Ye,insetInline:Ye,insetInlineStart:Ye,insetInlineEnd:Ye,padding:Ye,paddingTop:Ye,paddingRight:Ye,paddingBottom:Ye,paddingLeft:Ye,paddingBlock:Ye,paddingBlockStart:Ye,paddingBlockEnd:Ye,paddingInline:Ye,paddingInlineStart:Ye,paddingInlineEnd:Ye,margin:Ye,marginTop:Ye,marginRight:Ye,marginBottom:Ye,marginLeft:Ye,marginBlock:Ye,marginBlockStart:Ye,marginBlockEnd:Ye,marginInline:Ye,marginInlineStart:Ye,marginInlineEnd:Ye,backgroundPositionX:Ye,backgroundPositionY:Ye,...cie,zIndex:m5,fillOpacity:uh,strokeOpacity:uh,numOctaves:m5},uie={...lE,color:yr,backgroundColor:yr,outlineColor:yr,fill:yr,stroke:yr,borderColor:yr,borderTopColor:yr,borderRightColor:yr,borderBottomColor:yr,borderLeftColor:yr,filter:Iw,WebkitFilter:Iw},$D=e=>uie[e];function ID(e,t){let n=$D(e);return n!==Iw&&(n=Ga),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const fie=new Set(["auto","none","0"]);function die(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!fie.has(s)&&fh(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=ID(n,o)}class hie extends rE{constructor(t,n,r,o,s){super(t,n,r,o,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let h=0;h<t.length;h++){let p=t[h];if(typeof p=="string"&&(p=p.trim(),W_(p))){const g=OD(p,n.current);g!==void 0&&(t[h]=g),h===t.length-1&&(this.finalKeyframe=p)}}if(this.resolveNoneKeyframes(),!kD.has(r)||t.length!==2)return;const[o,s]=t,l=p5(o),c=p5(s),u=e5(o),d=e5(s);if(u!==d&&Oa[r]){this.needsMeasurement=!0;return}if(l!==c)if(c5(l)&&c5(c))for(let h=0;h<t.length;h++){const p=t[h];typeof p=="string"&&(t[h]=parseFloat(p))}else Oa[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||iie(t[o]))&&r.push(o);r.length&&die(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Oa[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const s=r.length-1,l=r[s];r[s]=Oa[n](t.measureViewportBox(),window.getComputedStyle(t.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),this.removedTransforms?.length&&this.removedTransforms.forEach(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}function pie(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const o=n?.[e]??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}const zD=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function mie(e){return YN(e)&&"offsetHeight"in e}const{schedule:cE}=cD(queueMicrotask,!1),Si={x:!1,y:!1};function LD(){return Si.x||Si.y}function gie(e){return e==="x"||e==="y"?Si[e]?null:(Si[e]=!0,()=>{Si[e]=!1}):Si.x||Si.y?null:(Si.x=Si.y=!0,()=>{Si.x=Si.y=!1})}function FD(e,t){const n=pie(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function g5(e){return!(e.pointerType==="touch"||LD())}function yie(e,t,n={}){const[r,o,s]=FD(e,n),l=c=>{if(!g5(c))return;const{target:u}=c,d=t(u,c);if(typeof d!="function"||!u)return;const h=p=>{g5(p)&&(d(p),u.removeEventListener("pointerleave",h))};u.addEventListener("pointerleave",h,o)};return r.forEach(c=>{c.addEventListener("pointerenter",l,o)}),s}const UD=(e,t)=>t?e===t?!0:UD(e,t.parentElement):!1,uE=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,vie=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function VD(e){return vie.has(e.tagName)||e.isContentEditable===!0}const $g=new WeakSet;function y5(e){return t=>{t.key==="Enter"&&e(t)}}function O1(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const bie=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=y5(()=>{if($g.has(n))return;O1(n,"down");const o=y5(()=>{O1(n,"up")}),s=()=>O1(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function v5(e){return uE(e)&&!LD()}function Sie(e,t,n={}){const[r,o,s]=FD(e,n),l=c=>{const u=c.currentTarget;if(!v5(c))return;$g.add(u);const d=t(u,c),h=(b,y)=>{window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",g),$g.has(u)&&$g.delete(u),v5(b)&&typeof d=="function"&&d(b,{success:y})},p=b=>{h(b,u===window||u===document||n.useGlobalTarget||UD(u,b.target))},g=b=>{h(b,!1)};window.addEventListener("pointerup",p,o),window.addEventListener("pointercancel",g,o)};return r.forEach(c=>{(n.useGlobalTarget?window:c).addEventListener("pointerdown",l,o),mie(c)&&(c.addEventListener("focus",d=>bie(d,o)),!VD(c)&&!c.hasAttribute("tabindex")&&(c.tabIndex=0))}),s}function qD(e){return YN(e)&&"ownerSVGElement"in e}function wie(e){return qD(e)&&e.tagName==="svg"}const xie=[...DD,yr,Ga],_ie=e=>xie.find(ND(e)),b5=()=>({translate:0,scale:1,origin:0,originPoint:0}),bu=()=>({x:b5(),y:b5()}),S5=()=>({min:0,max:0}),Er=()=>({x:S5(),y:S5()}),zw={current:null},BD={current:!1},Eie=typeof window<"u";function Cie(){if(BD.current=!0,!!Eie)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>zw.current=e.matches;e.addEventListener("change",t),t()}else zw.current=!1}const Tie=new WeakMap;function m0(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function dh(e){return typeof e=="string"||Array.isArray(e)}const fE=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],dE=["initial",...fE];function g0(e){return m0(e.animate)||dE.some(t=>dh(e[t]))}function HD(e){return!!(g0(e)||e.variants)}function Rie(e,t,n){for(const r in t){const o=t[r],s=n[r];if(Jr(o))e.addValue(r,o);else if(Jr(s))e.addValue(r,Hu(o,{owner:e}));else if(s!==o)if(e.hasValue(r)){const l=e.getValue(r);l.liveStyle===!0?l.jump(o):l.hasAnimated||l.set(o)}else{const l=e.getStaticValue(r);e.addValue(r,Hu(l!==void 0?l:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const w5=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let vy={};function KD(e){vy=e}function Oie(){return vy}class Aie{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,visualState:l},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=rE,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const g=fo.now();this.renderScheduledAt<g&&(this.renderScheduledAt=g,$n.render(this.render,!1,!0))};const{latestValues:u,renderState:d}=l;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=d,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=c,this.blockInitialAnimation=!!s,this.isControllingVariants=g0(n),this.isVariantNode=HD(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const g in p){const b=p[g];u[g]!==void 0&&Jr(b)&&b.set(u[g])}}mount(t){this.current=t,Tie.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((n,r)=>this.bindToMotionValue(r,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(BD.current||Cie(),this.shouldReduceMotion=zw.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Ka(this.notifyUpdate),Ka(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 n=this.features[t];n&&(n.unmount(),n.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,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=yf.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&$n.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;typeof window<"u"&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),s&&s(),n.owner&&n.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 vy){const n=vy[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Er()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<w5.length;r++){const o=w5[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s="on"+o,l=t[s];l&&(this.propEventSubscriptions[o]=this.on(o,l))}this.prevMotionValues=Rie(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 n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Hu(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(WN(r)||XN(r))?r=parseFloat(r):!_ie(r)&&Ga.test(n)&&(r=ID(t,n)),this.setBaseTarget(t,Jr(r)?r.get():r)),Jr(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const s=sE(this.props,n,this.presenceContext?.custom);s&&(r=s[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Jr(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new K_),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){cE.render(this.render)}}class ol{constructor(t){this.isMounted=!1,this.node=t}update(){}}class GD extends Aie{constructor(){super(...arguments),this.KeyframeResolver=hie}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Jr(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function ZD({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function kie({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Mie(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function A1(e){return e===void 0||e===1}function Lw({scale:e,scaleX:t,scaleY:n}){return!A1(e)||!A1(t)||!A1(n)}function Il(e){return Lw(e)||WD(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function WD(e){return x5(e.x)||x5(e.y)}function x5(e){return e&&e!=="0%"}function by(e,t,n){const r=e-n,o=t*r;return n+o}function _5(e,t,n,r,o){return o!==void 0&&(e=by(e,o,r)),by(e,n,r)+t}function Fw(e,t=0,n=1,r,o){e.min=_5(e.min,t,n,r,o),e.max=_5(e.max,t,n,r,o)}function YD(e,{x:t,y:n}){Fw(e.x,t.translate,t.scale,t.originPoint),Fw(e.y,n.translate,n.scale,n.originPoint)}const E5=.999999999999,C5=1.0000000000001;function jie(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,l;for(let c=0;c<o;c++){s=n[c],l=s.projectionDelta;const{visualElement:u}=s.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&wu(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,YD(e,l)),r&&Il(s.latestValues)&&wu(e,s.latestValues))}t.x<C5&&t.x>E5&&(t.x=1),t.y<C5&&t.y>E5&&(t.y=1)}function Su(e,t){e.min=e.min+t,e.max=e.max+t}function T5(e,t,n,r,o=.5){const s=Wn(e.min,e.max,o);Fw(e,t,n,s,r)}function wu(e,t){T5(e.x,t.x,t.scaleX,t.scale,t.originX),T5(e.y,t.y,t.scaleY,t.scale,t.originY)}function XD(e,t){return ZD(Mie(e.getBoundingClientRect(),t))}function Pie(e,t,n){const r=XD(e,n),{scroll:o}=t;return o&&(Su(r.x,o.offset.x),Su(r.y,o.offset.y)),r}const Nie={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Die=gf.length;function $ie(e,t,n){let r="",o=!0;for(let s=0;s<Die;s++){const l=gf[s],c=e[l];if(c===void 0)continue;let u=!0;if(typeof c=="number"?u=c===(l.startsWith("scale")?1:0):u=parseFloat(c)===0,!u||n){const d=zD(c,lE[l]);if(!u){o=!1;const h=Nie[l]||l;r+=`${h}(${d}) `}n&&(t[l]=d)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function hE(e,t,n){const{style:r,vars:o,transformOrigin:s}=e;let l=!1,c=!1;for(const u in t){const d=t[u];if(yf.has(u)){l=!0;continue}else if(fD(u)){o[u]=d;continue}else{const h=zD(d,lE[u]);u.startsWith("origin")?(c=!0,s[u]=h):r[u]=h}}if(t.transform||(l||n?r.transform=$ie(t,e.transform,n):r.transform&&(r.transform="none")),c){const{originX:u="50%",originY:d="50%",originZ:h=0}=s;r.transformOrigin=`${u} ${d} ${h}`}}function QD(e,{style:t,vars:n},r,o){const s=e.style;let l;for(l in t)s[l]=t[l];o?.applyProjectionStyles(s,r);for(l in n)s.setProperty(l,n[l])}function R5(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const wd={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ye.test(e))e=parseFloat(e);else return e;const n=R5(e,t.target.x),r=R5(e,t.target.y);return`${n}% ${r}%`}},Iie={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Ga.parse(e);if(o.length>5)return r;const s=Ga.createTransformer(e),l=typeof o[0]!="number"?1:0,c=n.x.scale*t.x,u=n.y.scale*t.y;o[0+l]/=c,o[1+l]/=u;const d=Wn(c,u,.5);return typeof o[2+l]=="number"&&(o[2+l]/=d),typeof o[3+l]=="number"&&(o[3+l]/=d),s(o)}},Uw={borderRadius:{...wd,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:wd,borderTopRightRadius:wd,borderBottomLeftRadius:wd,borderBottomRightRadius:wd,boxShadow:Iie};function JD(e,{layout:t,layoutId:n}){return yf.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Uw[e]||e==="opacity")}function pE(e,t,n){const r=e.style,o=t?.style,s={};if(!r)return s;for(const l in r)(Jr(r[l])||o&&Jr(o[l])||JD(l,e)||n?.getValue(l)?.liveStyle!==void 0)&&(s[l]=r[l]);return s}function zie(e){return window.getComputedStyle(e)}class Lie extends GD{constructor(){super(...arguments),this.type="html",this.renderInstance=QD}readValueFromInstance(t,n){if(yf.has(n))return this.projection?.isProjecting?Ow(n):poe(t,n);{const r=zie(t),o=(fD(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return XD(t,n)}build(t,n,r){hE(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return pE(t,n,r)}}const Fie={offset:"stroke-dashoffset",array:"stroke-dasharray"},Uie={offset:"strokeDashoffset",array:"strokeDasharray"};function Vie(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?Fie:Uie;e[s.offset]=Ye.transform(-r);const l=Ye.transform(t),c=Ye.transform(n);e[s.array]=`${l} ${c}`}const qie=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function e$(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:s=1,pathOffset:l=0,...c},u,d,h){if(hE(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:g}=e;p.transform&&(g.transform=p.transform,delete p.transform),(g.transform||p.transformOrigin)&&(g.transformOrigin=p.transformOrigin??"50% 50%",delete p.transformOrigin),g.transform&&(g.transformBox=h?.transformBox??"fill-box",delete p.transformBox);for(const b of qie)p[b]!==void 0&&(g[b]=p[b],delete p[b]);t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),o!==void 0&&Vie(p,o,s,l,!1)}const t$=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"]),n$=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Bie(e,t,n,r){QD(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(t$.has(o)?o:aE(o),t.attrs[o])}function r$(e,t,n){const r=pE(e,t,n);for(const o in e)if(Jr(e[o])||Jr(t[o])){const s=gf.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}class Hie extends GD{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Er}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(yf.has(n)){const r=$D(n);return r&&r.default||0}return n=t$.has(n)?n:aE(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return r$(t,n,r)}build(t,n,r){e$(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){Bie(t,n,r,o)}mount(t){this.isSVGTag=n$(t.tagName),super.mount(t)}}const Kie=dE.length;function o$(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?o$(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Kie;n++){const r=dE[n],o=e.props[r];(dh(o)||o===!1)&&(t[r]=o)}return t}function i$(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const Gie=[...fE].reverse(),Zie=fE.length;function Wie(e){return t=>Promise.all(t.map(({animation:n,options:r})=>rie(e,n,r)))}function Yie(e){let t=Wie(e),n=O5(),r=!0;const o=u=>(d,h)=>{const p=Ru(e,h,u==="exit"?e.presenceContext?.custom:void 0);if(p){const{transition:g,transitionEnd:b,...y}=p;d={...d,...y,...b}}return d};function s(u){t=u(e)}function l(u){const{props:d}=e,h=o$(e.parent)||{},p=[],g=new Set;let b={},y=1/0;for(let w=0;w<Zie;w++){const T=Gie[w],v=n[T],E=d[T]!==void 0?d[T]:h[T],S=dh(E),C=T===u?v.isActive:null;C===!1&&(y=w);let x=E===h[T]&&E!==d[T]&&S;if(x&&r&&e.manuallyAnimateOnMount&&(x=!1),v.protectedKeys={...b},!v.isActive&&C===null||!E&&!v.prevProp||m0(E)||typeof E=="boolean")continue;const O=Xie(v.prevProp,E);let M=O||T===u&&v.isActive&&!x&&S||w>y&&S,P=!1;const z=Array.isArray(E)?E:[E];let I=z.reduce(o(T),{});C===!1&&(I={});const{prevResolvedValues:q={}}=v,G={...q,...I},ee=H=>{M=!0,g.has(H)&&(P=!0,g.delete(H)),v.needsAnimating[H]=!0;const Y=e.getValue(H);Y&&(Y.liveStyle=!1)};for(const H in G){const Y=I[H],oe=q[H];if(b.hasOwnProperty(H))continue;let ne=!1;Nw(Y)&&Nw(oe)?ne=!i$(Y,oe):ne=Y!==oe,ne?Y!=null?ee(H):g.add(H):Y!==void 0&&g.has(H)?ee(H):v.protectedKeys[H]=!0}v.prevProp=E,v.prevResolvedValues=I,v.isActive&&(b={...b,...I}),r&&e.blockInitialAnimation&&(M=!1);const J=x&&O;M&&(!J||P)&&p.push(...z.map(H=>{const Y={type:T};if(typeof H=="string"&&r&&!J&&e.manuallyAnimateOnMount&&e.parent){const{parent:oe}=e,ne=Ru(oe,H);if(oe.enteringChildren&&ne){const{delayChildren:$}=ne.transition||{};Y.delay=AD(oe.enteringChildren,e,$)}}return{animation:H,options:Y}}))}if(g.size){const w={};if(typeof d.initial!="boolean"){const T=Ru(e,Array.isArray(d.initial)?d.initial[0]:d.initial);T&&T.transition&&(w.transition=T.transition)}g.forEach(T=>{const v=e.getBaseTarget(T),E=e.getValue(T);E&&(E.liveStyle=!0),w[T]=v??null}),p.push({animation:w})}let _=!!p.length;return r&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(_=!1),r=!1,_?t(p):Promise.resolve()}function c(u,d){if(n[u].isActive===d)return Promise.resolve();e.variantChildren?.forEach(p=>p.animationState?.setActive(u,d)),n[u].isActive=d;const h=l(u);for(const p in n)n[p].protectedKeys={};return h}return{animateChanges:l,setActive:c,setAnimateFunction:s,getState:()=>n,reset:()=>{n=O5()}}}function Xie(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!i$(t,e):!1}function Pl(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function O5(){return{animate:Pl(!0),whileInView:Pl(),whileHover:Pl(),whileTap:Pl(),whileDrag:Pl(),whileFocus:Pl(),exit:Pl()}}const s$=1e-4,Qie=1-s$,Jie=1+s$,a$=.01,ese=0-a$,tse=0+a$;function ho(e){return e.max-e.min}function nse(e,t,n){return Math.abs(e-t)<=n}function A5(e,t,n,r=.5){e.origin=r,e.originPoint=Wn(t.min,t.max,e.origin),e.scale=ho(n)/ho(t),e.translate=Wn(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Qie&&e.scale<=Jie||isNaN(e.scale))&&(e.scale=1),(e.translate>=ese&&e.translate<=tse||isNaN(e.translate))&&(e.translate=0)}function qd(e,t,n,r){A5(e.x,t.x,n.x,r?r.originX:void 0),A5(e.y,t.y,n.y,r?r.originY:void 0)}function k5(e,t,n){e.min=n.min+t.min,e.max=e.min+ho(t)}function rse(e,t,n){k5(e.x,t.x,n.x),k5(e.y,t.y,n.y)}function M5(e,t,n){e.min=t.min-n.min,e.max=e.min+ho(t)}function Sy(e,t,n){M5(e.x,t.x,n.x),M5(e.y,t.y,n.y)}function j5(e,t,n,r,o){return e-=t,e=by(e,1/n,r),o!==void 0&&(e=by(e,1/o,r)),e}function ose(e,t=0,n=1,r=.5,o,s=e,l=e){if(Gi.test(t)&&(t=parseFloat(t),t=Wn(l.min,l.max,t/100)-l.min),typeof t!="number")return;let c=Wn(s.min,s.max,r);e===s&&(c-=t),e.min=j5(e.min,t,n,c,o),e.max=j5(e.max,t,n,c,o)}function P5(e,t,[n,r,o],s,l){ose(e,t[n],t[r],t[o],t.scale,s,l)}const ise=["x","scaleX","originX"],sse=["y","scaleY","originY"];function N5(e,t,n,r){P5(e.x,t,ise,n?n.x:void 0,r?r.x:void 0),P5(e.y,t,sse,n?n.y:void 0,r?r.y:void 0)}function D5(e,t){e.min=t.min,e.max=t.max}function vi(e,t){D5(e.x,t.x),D5(e.y,t.y)}function $5(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function I5(e){return e.translate===0&&e.scale===1}function l$(e){return I5(e.x)&&I5(e.y)}function z5(e,t){return e.min===t.min&&e.max===t.max}function ase(e,t){return z5(e.x,t.x)&&z5(e.y,t.y)}function L5(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function c$(e,t){return L5(e.x,t.x)&&L5(e.y,t.y)}function F5(e){return ho(e.x)/ho(e.y)}function U5(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Qo(e){return[e("x"),e("y")]}function lse(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y,l=n?.z||0;if((o||s||l)&&(r=`translate3d(${o}px, ${s}px, ${l}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:d,rotate:h,rotateX:p,rotateY:g,skewX:b,skewY:y}=n;d&&(r=`perspective(${d}px) ${r}`),h&&(r+=`rotate(${h}deg) `),p&&(r+=`rotateX(${p}deg) `),g&&(r+=`rotateY(${g}deg) `),b&&(r+=`skewX(${b}deg) `),y&&(r+=`skewY(${y}deg) `)}const c=e.x.scale*t.x,u=e.y.scale*t.y;return(c!==1||u!==1)&&(r+=`scale(${c}, ${u})`),r||"none"}const u$=["TopLeft","TopRight","BottomLeft","BottomRight"],cse=u$.length,V5=e=>typeof e=="string"?parseFloat(e):e,q5=e=>typeof e=="number"||Ye.test(e);function use(e,t,n,r,o,s){o?(e.opacity=Wn(0,n.opacity??1,fse(r)),e.opacityExit=Wn(t.opacity??1,0,dse(r))):s&&(e.opacity=Wn(t.opacity??1,n.opacity??1,r));for(let l=0;l<cse;l++){const c=`border${u$[l]}Radius`;let u=B5(t,c),d=B5(n,c);if(u===void 0&&d===void 0)continue;u||(u=0),d||(d=0),u===0||d===0||q5(u)===q5(d)?(e[c]=Math.max(Wn(V5(u),V5(d),r),0),(Gi.test(d)||Gi.test(u))&&(e[c]+="%")):e[c]=d}(t.rotate||n.rotate)&&(e.rotate=Wn(t.rotate||0,n.rotate||0,r))}function B5(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const fse=f$(0,.5,iD),dse=f$(.5,.95,ii);function f$(e,t,n){return r=>r<e?0:r>t?1:n(ch(e,t,r))}function hse(e,t){const n=fo.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(Ka(r),e(s-t))};return $n.setup(r,!0),()=>Ka(r)}function hh(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Ig(e){return Jr(e)?e.get():e}function pse(e,t,n){const r=Jr(e)?e:Hu(e);return r.start(iE("",r,t,n)),r.animation}const mse=(e,t)=>e.depth-t.depth;class gse{constructor(){this.children=[],this.isDirty=!1}add(t){V_(this.children,t),this.isDirty=!0}remove(t){q_(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(mse),this.isDirty=!1,this.children.forEach(t)}}class yse{constructor(){this.members=[]}add(t){V_(this.members,t),t.scheduleRender()}remove(t){if(q_(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const s=this.members[o];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const zg={hasAnimatedSinceResize:!0,hasEverUpdated:!1},k1=["","X","Y","Z"],vse=1e3;let bse=0;function M1(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function d$(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=jD(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",$n,!(o||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&d$(r)}function h$({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(l={},c=t?.()){this.id=bse++,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(xse),this.nodes.forEach(Tse),this.nodes.forEach(Rse),this.nodes.forEach(_se)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=l,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new gse)}addEventListener(l,c){return this.eventHandlers.has(l)||this.eventHandlers.set(l,new K_),this.eventHandlers.get(l).add(c)}notifyListeners(l,...c){const u=this.eventHandlers.get(l);u&&u.notify(...c)}hasListeners(l){return this.eventHandlers.has(l)}mount(l){if(this.instance)return;this.isSVG=qD(l)&&!wie(l),this.instance=l;const{layoutId:c,layout:u,visualElement:d}=this.options;if(d&&!d.current&&d.mount(l),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(u||c)&&(this.isLayoutDirty=!0),e){let h,p=0;const g=()=>this.root.updateBlockedByResize=!1;$n.read(()=>{p=window.innerWidth}),e(l,()=>{const b=window.innerWidth;b!==p&&(p=b,this.root.updateBlockedByResize=!0,h&&h(),h=hse(g,250),zg.hasAnimatedSinceResize&&(zg.hasAnimatedSinceResize=!1,this.nodes.forEach(G5)))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&d&&(c||u)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:p,hasRelativeLayoutChanged:g,layout:b})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||d.getDefaultTransition()||jse,{onLayoutAnimationStart:_,onLayoutAnimationComplete:w}=d.getProps(),T=!this.targetLayout||!c$(this.targetLayout,b),v=!p&&g;if(this.options.layoutRoot||this.resumeFrom||v||p&&(T||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const E={...oE(y,"layout"),onPlay:_,onComplete:w};(d.shouldReduceMotion||this.options.layoutRoot)&&(E.delay=0,E.type=!1),this.startAnimation(E),this.setAnimationOrigin(h,v)}else p||G5(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=b})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const l=this.getStack();l&&l.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ka(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(Ose),this.animationId++)}getTransformTemplate(){const{visualElement:l}=this.options;return l&&l.getProps().transformTemplate}willUpdate(l=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&d$(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;h<this.path.length;h++){const p=this.path[h];p.shouldResetTransform=!0,p.updateScroll("snapshot"),p.options.layoutRoot&&p.willUpdate(!1)}const{layoutId:c,layout:u}=this.options;if(c===void 0&&!u)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),l&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(H5);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(K5);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Cse),this.nodes.forEach(Sse),this.nodes.forEach(wse)):this.nodes.forEach(K5),this.clearAllSnapshots();const c=fo.now();Vr.delta=Xi(0,1e3/60,c-Vr.timestamp),Vr.timestamp=c,Vr.isProcessing=!0,x1.update.process(Vr),x1.preRender.process(Vr),x1.render.process(Vr),Vr.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,cE.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ese),this.sharedNodes.forEach(Ase)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,$n.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){$n.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ho(this.snapshot.measuredBox.x)&&!ho(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 u=0;u<this.path.length;u++)this.path[u].updateScroll();const l=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Er(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:c}=this.options;c&&c.notify("LayoutMeasure",this.layout.layoutBox,l?l.layoutBox:void 0)}updateScroll(l="measure"){let c=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===l&&(c=!1),c&&this.instance){const u=r(this.instance);this.scroll={animationId:this.root.animationId,phase:l,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!o)return;const l=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,c=this.projectionDelta&&!l$(this.projectionDelta),u=this.getTransformTemplate(),d=u?u(this.latestValues,""):void 0,h=d!==this.prevTransformTemplateValue;l&&this.instance&&(c||Il(this.latestValues)||h)&&(o(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(l=!0){const c=this.measurePageBox();let u=this.removeElementScroll(c);return l&&(u=this.removeTransform(u)),Pse(u),{animationId:this.root.animationId,measuredBox:c,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:l}=this.options;if(!l)return Er();const c=l.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Nse))){const{scroll:d}=this.root;d&&(Su(c.x,d.offset.x),Su(c.y,d.offset.y))}return c}removeElementScroll(l){const c=Er();if(vi(c,l),this.scroll?.wasRoot)return c;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:h,options:p}=d;d!==this.root&&h&&p.layoutScroll&&(h.wasRoot&&vi(c,l),Su(c.x,h.offset.x),Su(c.y,h.offset.y))}return c}applyTransform(l,c=!1){const u=Er();vi(u,l);for(let d=0;d<this.path.length;d++){const h=this.path[d];!c&&h.options.layoutScroll&&h.scroll&&h!==h.root&&wu(u,{x:-h.scroll.offset.x,y:-h.scroll.offset.y}),Il(h.latestValues)&&wu(u,h.latestValues)}return Il(this.latestValues)&&wu(u,this.latestValues),u}removeTransform(l){const c=Er();vi(c,l);for(let u=0;u<this.path.length;u++){const d=this.path[u];if(!d.instance||!Il(d.latestValues))continue;Lw(d.latestValues)&&d.updateSnapshot();const h=Er(),p=d.measurePageBox();vi(h,p),N5(c,d.latestValues,d.snapshot?d.snapshot.layoutBox:void 0,h)}return Il(this.latestValues)&&N5(c,this.latestValues),c}setTargetDelta(l){this.targetDelta=l,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(l){this.options={...this.options,...l,crossfade:l.crossfade!==void 0?l.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!==Vr.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(l=!1){const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==c;if(!(l||u&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:h,layoutId:p}=this.options;if(!this.layout||!(h||p))return;this.resolvedRelativeTargetAt=Vr.timestamp;const g=this.getClosestProjectingParent();g&&this.linkedParentVersion!==g.layoutVersion&&!g.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(g&&g.layout?this.createRelativeTarget(g,this.layout.layoutBox,g.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Er(),this.targetWithTransforms=Er()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),rse(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):vi(this.target,this.layout.layoutBox),YD(this.target,this.targetDelta)):vi(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,g&&!!g.resumingFrom==!!this.resumingFrom&&!g.options.layoutScroll&&g.target&&this.animationProgress!==1?this.createRelativeTarget(g,this.target,g.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Lw(this.parent.latestValues)||WD(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(l,c,u){this.relativeParent=l,this.linkedParentVersion=l.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Er(),this.relativeTargetOrigin=Er(),Sy(this.relativeTargetOrigin,c,u),vi(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const l=this.getLead(),c=!!this.resumingFrom||this!==l;let u=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(u=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===Vr.timestamp&&(u=!1),u)return;const{layout:d,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||h))return;vi(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,g=this.treeScale.y;jie(this.layoutCorrected,this.treeScale,this.path,c),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=Er());const{target:b}=l;if(!b){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():($5(this.prevProjectionDelta.x,this.projectionDelta.x),$5(this.prevProjectionDelta.y,this.projectionDelta.y)),qd(this.projectionDelta,this.layoutCorrected,b,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==g||!U5(this.projectionDelta.x,this.prevProjectionDelta.x)||!U5(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",b))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(l=!0){if(this.options.visualElement?.scheduleRender(),l){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=bu(),this.projectionDelta=bu(),this.projectionDeltaWithTransform=bu()}setAnimationOrigin(l,c=!1){const u=this.snapshot,d=u?u.latestValues:{},h={...this.latestValues},p=bu();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!c;const g=Er(),b=u?u.source:void 0,y=this.layout?this.layout.source:void 0,_=b!==y,w=this.getStack(),T=!w||w.members.length<=1,v=!!(_&&!T&&this.options.crossfade===!0&&!this.path.some(Mse));this.animationProgress=0;let E;this.mixTargetDelta=S=>{const C=S/1e3;Z5(p.x,l.x,C),Z5(p.y,l.y,C),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Sy(g,this.layout.layoutBox,this.relativeParent.layout.layoutBox),kse(this.relativeTarget,this.relativeTargetOrigin,g,C),E&&ase(this.relativeTarget,E)&&(this.isProjectionDirty=!1),E||(E=Er()),vi(E,this.relativeTarget)),_&&(this.animationValues=h,use(h,d,this.latestValues,C,v,T)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(l){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Ka(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=$n.update(()=>{zg.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Hu(0)),this.currentAnimation=pse(this.motionValue,[0,1e3],{...l,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),l.onUpdate&&l.onUpdate(c)},onStop:()=>{},onComplete:()=>{l.onComplete&&l.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 l=this.getStack();l&&l.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(vse),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const l=this.getLead();let{targetWithTransforms:c,target:u,layout:d,latestValues:h}=l;if(!(!c||!u||!d)){if(this!==l&&this.layout&&d&&p$(this.options.animationType,this.layout.layoutBox,d.layoutBox)){u=this.target||Er();const p=ho(this.layout.layoutBox.x);u.x.min=l.target.x.min,u.x.max=u.x.min+p;const g=ho(this.layout.layoutBox.y);u.y.min=l.target.y.min,u.y.max=u.y.min+g}vi(c,u),wu(c,h),qd(this.projectionDeltaWithTransform,this.layoutCorrected,c,h)}}registerSharedNode(l,c){this.sharedNodes.has(l)||this.sharedNodes.set(l,new yse),this.sharedNodes.get(l).add(c);const d=c.options.initialPromotionConfig;c.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(c):void 0})}isLead(){const l=this.getStack();return l?l.lead===this:!0}getLead(){const{layoutId:l}=this.options;return l?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:l}=this.options;return l?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:l}=this.options;if(l)return this.root.sharedNodes.get(l)}promote({needsReset:l,transition:c,preserveFollowOpacity:u}={}){const d=this.getStack();d&&d.promote(this,u),l&&(this.projectionDelta=void 0,this.needsReset=!0),c&&this.setOptions({transition:c})}relegate(){const l=this.getStack();return l?l.relegate(this):!1}resetSkewAndRotation(){const{visualElement:l}=this.options;if(!l)return;let c=!1;const{latestValues:u}=l;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(c=!0),!c)return;const d={};u.z&&M1("z",l,d,this.animationValues);for(let h=0;h<k1.length;h++)M1(`rotate${k1[h]}`,l,d,this.animationValues),M1(`skew${k1[h]}`,l,d,this.animationValues);l.render();for(const h in d)l.setStaticValue(h,d[h]),this.animationValues&&(this.animationValues[h]=d[h]);l.scheduleRender()}applyProjectionStyles(l,c){if(!this.instance||this.isSVG)return;if(!this.isVisible){l.visibility="hidden";return}const u=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,l.visibility="",l.opacity="",l.pointerEvents=Ig(c?.pointerEvents)||"",l.transform=u?u(this.latestValues,""):"none";return}const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){this.options.layoutId&&(l.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,l.pointerEvents=Ig(c?.pointerEvents)||""),this.hasProjected&&!Il(this.latestValues)&&(l.transform=u?u({},""):"none",this.hasProjected=!1);return}l.visibility="";const h=d.animationValues||d.latestValues;this.applyTransformsToTarget();let p=lse(this.projectionDeltaWithTransform,this.treeScale,h);u&&(p=u(h,p)),l.transform=p;const{x:g,y:b}=this.projectionDelta;l.transformOrigin=`${g.origin*100}% ${b.origin*100}% 0`,d.animationValues?l.opacity=d===this?h.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:l.opacity=d===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const y in Uw){if(h[y]===void 0)continue;const{correct:_,applyTo:w,isCSSVariable:T}=Uw[y],v=p==="none"?h[y]:_(h[y],d);if(w){const E=w.length;for(let S=0;S<E;S++)l[w[S]]=v}else T?this.options.visualElement.renderState.vars[y]=v:l[y]=v}this.options.layoutId&&(l.pointerEvents=d===this?Ig(c?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(l=>l.currentAnimation?.stop()),this.root.nodes.forEach(H5),this.root.sharedNodes.clear()}}}function Sse(e){e.updateLayout()}function wse(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:o}=e.options,s=t.source!==e.layout.source;o==="size"?Qo(h=>{const p=s?t.measuredBox[h]:t.layoutBox[h],g=ho(p);p.min=n[h].min,p.max=p.min+g}):p$(o,t.layoutBox,n)&&Qo(h=>{const p=s?t.measuredBox[h]:t.layoutBox[h],g=ho(n[h]);p.max=p.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+g)});const l=bu();qd(l,n,t.layoutBox);const c=bu();s?qd(c,e.applyTransform(r,!0),t.measuredBox):qd(c,n,t.layoutBox);const u=!l$(l);let d=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:p,layout:g}=h;if(p&&g){const b=Er();Sy(b,t.layoutBox,p.layoutBox);const y=Er();Sy(y,n,g.layoutBox),c$(b,y)||(d=!0),h.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=b,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function xse(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 _se(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Ese(e){e.clearSnapshot()}function H5(e){e.clearMeasurements()}function K5(e){e.isLayoutDirty=!1}function Cse(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function G5(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Tse(e){e.resolveTargetDelta()}function Rse(e){e.calcProjection()}function Ose(e){e.resetSkewAndRotation()}function Ase(e){e.removeLeadSnapshot()}function Z5(e,t,n){e.translate=Wn(t.translate,0,n),e.scale=Wn(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function W5(e,t,n,r){e.min=Wn(t.min,n.min,r),e.max=Wn(t.max,n.max,r)}function kse(e,t,n,r){W5(e.x,t.x,n.x,r),W5(e.y,t.y,n.y,r)}function Mse(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const jse={duration:.45,ease:[.4,0,.1,1]},Y5=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),X5=Y5("applewebkit/")&&!Y5("chrome/")?Math.round:ii;function Q5(e){e.min=X5(e.min),e.max=X5(e.max)}function Pse(e){Q5(e.x),Q5(e.y)}function p$(e,t,n){return e==="position"||e==="preserve-aspect"&&!nse(F5(t),F5(n),.2)}function Nse(e){return e!==e.root&&e.scroll?.wasRoot}const Dse=h$({attachResizeListener:(e,t)=>hh(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),j1={current:void 0},m$=h$({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!j1.current){const e=new Dse({});e.mount(window),e.setOptions({layoutScroll:!0}),j1.current=e}return j1.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),g$=k.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function $se(e=!0){const t=k.useContext(U_);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,s=k.useId();k.useEffect(()=>{if(e)return o(s)},[e]);const l=k.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,l]:[!0]}const y$=k.createContext({strict:!1}),J5={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 eM=!1;function Ise(){if(eM)return;const e={};for(const t in J5)e[t]={isEnabled:n=>J5[t].some(r=>!!n[r])};KD(e),eM=!0}function v$(){return Ise(),Oie()}function zse(e){const t=v$();for(const n in e)t[n]={...t[n],...e[n]};KD(t)}const Lse=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function wy(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Lse.has(e)}let b$=e=>!wy(e);function Fse(e){typeof e=="function"&&(b$=t=>t.startsWith("on")?!wy(t):e(t))}try{Fse(require("@emotion/is-prop-valid").default)}catch{}function Use(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(b$(o)||n===!0&&wy(o)||!t&&!wy(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}const y0=k.createContext({});function Vse(e,t){if(g0(e)){const{initial:n,animate:r}=e;return{initial:n===!1||dh(n)?n:void 0,animate:dh(r)?r:void 0}}return e.inherit!==!1?t:{}}function qse(e){const{initial:t,animate:n}=Vse(e,k.useContext(y0));return k.useMemo(()=>({initial:t,animate:n}),[tM(t),tM(n)])}function tM(e){return Array.isArray(e)?e.join(" "):e}const mE=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function S$(e,t,n){for(const r in t)!Jr(t[r])&&!JD(r,n)&&(e[r]=t[r])}function Bse({transformTemplate:e},t){return k.useMemo(()=>{const n=mE();return hE(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Hse(e,t){const n=e.style||{},r={};return S$(r,n,e),Object.assign(r,Bse(e,t)),r}function Kse(e,t){const n={},r=Hse(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const w$=()=>({...mE(),attrs:{}});function Gse(e,t,n,r){const o=k.useMemo(()=>{const s=w$();return e$(s,t,n$(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};S$(s,e.style,e),o.style={...s,...o.style}}return o}const Zse=["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 gE(e){return typeof e!="string"||e.includes("-")?!1:!!(Zse.indexOf(e)>-1||/[A-Z]/u.test(e))}function Wse(e,t,n,{latestValues:r},o,s=!1,l){const u=(l??gE(e)?Gse:Kse)(t,r,o,e),d=Use(t,typeof e=="string",s),h=e!==k.Fragment?{...d,...u,ref:n}:{},{children:p}=t,g=k.useMemo(()=>Jr(p)?p.get():p,[p]);return k.createElement(e,{...h,children:g})}function Yse({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:Xse(n,r,o,e),renderState:t()}}function Xse(e,t,n,r){const o={},s=r(e,{});for(const g in s)o[g]=Ig(s[g]);let{initial:l,animate:c}=e;const u=g0(e),d=HD(e);t&&d&&!u&&e.inherit!==!1&&(l===void 0&&(l=t.initial),c===void 0&&(c=t.animate));let h=n?n.initial===!1:!1;h=h||l===!1;const p=h?c:l;if(p&&typeof p!="boolean"&&!m0(p)){const g=Array.isArray(p)?p:[p];for(let b=0;b<g.length;b++){const y=sE(e,g[b]);if(y){const{transitionEnd:_,transition:w,...T}=y;for(const v in T){let E=T[v];if(Array.isArray(E)){const S=h?E.length-1:0;E=E[S]}E!==null&&(o[v]=E)}for(const v in _)o[v]=_[v]}}}return o}const x$=e=>(t,n)=>{const r=k.useContext(y0),o=k.useContext(U_),s=()=>Yse(e,t,r,o);return n?s():ure(s)},Qse=x$({scrapeMotionValuesFromProps:pE,createRenderState:mE}),Jse=x$({scrapeMotionValuesFromProps:r$,createRenderState:w$}),eae=Symbol.for("motionComponentSymbol");function tae(e,t,n){const r=k.useRef(n);k.useInsertionEffect(()=>{r.current=n});const o=k.useRef(null);return k.useCallback(s=>{s&&e.onMount?.(s),t&&(s?t.mount(s):t.unmount());const l=r.current;if(typeof l=="function")if(s){const c=l(s);typeof c=="function"&&(o.current=c)}else o.current?(o.current(),o.current=null):l(s);else l&&(l.current=s)},[t])}const _$=k.createContext({});function Md(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function nae(e,t,n,r,o,s){const{visualElement:l}=k.useContext(y0),c=k.useContext(y$),u=k.useContext(U_),d=k.useContext(g$).reducedMotion,h=k.useRef(null);r=r||c.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:l,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:d,isSVG:s}));const p=h.current,g=k.useContext(_$);p&&!p.projection&&o&&(p.type==="html"||p.type==="svg")&&rae(h.current,n,o,g);const b=k.useRef(!1);k.useInsertionEffect(()=>{p&&b.current&&p.update(n,u)});const y=n[MD],_=k.useRef(!!y&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return fre(()=>{p&&(b.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),p.scheduleRenderMicrotask(),_.current&&p.animationState&&p.animationState.animateChanges())}),k.useEffect(()=>{p&&(!_.current&&p.animationState&&p.animationState.animateChanges(),_.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),_.current=!1),p.enteringChildren=void 0)}),p}function rae(e,t,n,r){const{layoutId:o,layout:s,drag:l,dragConstraints:c,layoutScroll:u,layoutRoot:d,layoutCrossfade:h}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:E$(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!l||c&&Md(c),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:h,layoutScroll:u,layoutRoot:d})}function E$(e){if(e)return e.options.allowProjection!==!1?e.projection:E$(e.parent)}function P1(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&zse(r);const s=n?n==="svg":gE(e),l=s?Jse:Qse;function c(d,h){let p;const g={...k.useContext(g$),...d,layoutId:oae(d)},{isStatic:b}=g,y=qse(d),_=l(d,b);if(!b&&ZN){iae();const w=sae(g);p=w.MeasureLayout,y.visualElement=nae(e,_,g,o,w.ProjectionNode,s)}return j.jsxs(y0.Provider,{value:y,children:[p&&y.visualElement?j.jsx(p,{visualElement:y.visualElement,...g}):null,Wse(e,d,tae(_,y.visualElement,h),_,b,t,s)]})}c.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const u=k.forwardRef(c);return u[eae]=e,u}function oae({layoutId:e}){const t=k.useContext(GN).id;return t&&e!==void 0?t+"-"+e:e}function iae(e,t){k.useContext(y$).strict}function sae(e){const t=v$(),{drag:n,layout:r}=t;if(!n&&!r)return{};const o={...n,...r};return{MeasureLayout:n?.isEnabled(e)||r?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function aae(e,t){if(typeof Proxy>"u")return P1;const n=new Map,r=(s,l)=>P1(s,l,e,t),o=(s,l)=>r(s,l);return new Proxy(o,{get:(s,l)=>l==="create"?r:(n.has(l)||n.set(l,P1(l,void 0,e,t)),n.get(l))})}const lae=(e,t)=>t.isSVG??gE(e)?new Hie(t):new Lie(t,{allowProjection:e!==k.Fragment});class cae extends ol{constructor(t){super(t),t.animationState||(t.animationState=Yie(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();m0(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let uae=0;class fae extends ol{constructor(){super(...arguments),this.id=uae++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const dae={animation:{Feature:cae},exit:{Feature:fae}};function Kh(e){return{point:{x:e.pageX,y:e.pageY}}}const hae=e=>t=>uE(t)&&e(t,Kh(t));function Bd(e,t,n,r){return hh(e,t,hae(n),r)}const C$=({current:e})=>e?e.ownerDocument.defaultView:null,nM=(e,t)=>Math.abs(e-t);function pae(e,t){const n=nM(e.x,t.x),r=nM(e.y,t.y);return Math.sqrt(n**2+r**2)}const rM=new Set(["auto","scroll"]);class T${constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:s=!1,distanceThreshold:l=3,element:c}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=b=>{this.handleScroll(b.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=D1(this.lastMoveEventInfo,this.history),y=this.startEvent!==null,_=pae(b.offset,{x:0,y:0})>=this.distanceThreshold;if(!y&&!_)return;const{point:w}=b,{timestamp:T}=Vr;this.history.push({...w,timestamp:T});const{onStart:v,onMove:E}=this.handlers;y||(v&&v(this.lastMoveEvent,b),this.startEvent=this.lastMoveEvent),E&&E(this.lastMoveEvent,b)},this.handlePointerMove=(b,y)=>{this.lastMoveEvent=b,this.lastMoveEventInfo=N1(y,this.transformPagePoint),$n.update(this.updatePoint,!0)},this.handlePointerUp=(b,y)=>{this.end();const{onEnd:_,onSessionEnd:w,resumeAnimation:T}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&T&&T(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=D1(b.type==="pointercancel"?this.lastMoveEventInfo:N1(y,this.transformPagePoint),this.history);this.startEvent&&_&&_(b,v),w&&w(b,v)},!uE(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=l,this.contextWindow=o||window;const u=Kh(t),d=N1(u,this.transformPagePoint),{point:h}=d,{timestamp:p}=Vr;this.history=[{...h,timestamp:p}];const{onSessionStart:g}=n;g&&g(t,D1(d,this.history)),this.removeListeners=qh(Bd(this.contextWindow,"pointermove",this.handlePointerMove),Bd(this.contextWindow,"pointerup",this.handlePointerUp),Bd(this.contextWindow,"pointercancel",this.handlePointerUp)),c&&this.startScrollTracking(c)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(rM.has(r.overflowX)||rM.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.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 n=this.scrollPositions.get(t);if(!n)return;const r=t===window,o=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},s={x:o.x-n.x,y:o.y-n.y};s.x===0&&s.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(t,o),$n.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Ka(this.updatePoint)}}function N1(e,t){return t?{point:t(e.point)}:e}function oM(e,t){return{x:e.x-t.x,y:e.y-t.y}}function D1({point:e},t){return{point:e,delta:oM(e,R$(t)),offset:oM(e,mae(t)),velocity:gae(t,.1)}}function mae(e){return e[0]}function R$(e){return e[e.length-1]}function gae(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=R$(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Ds(t)));)n--;if(!r)return{x:0,y:0};const s=ni(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const l={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function yae(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Wn(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Wn(n,e,r.max):Math.min(e,n)),e}function iM(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function vae(e,{top:t,left:n,bottom:r,right:o}){return{x:iM(e.x,n,o),y:iM(e.y,t,r)}}function sM(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function bae(e,t){return{x:sM(e.x,t.x),y:sM(e.y,t.y)}}function Sae(e,t){let n=.5;const r=ho(e),o=ho(t);return o>r?n=ch(t.min,t.max-r,e.min):r>o&&(n=ch(e.min,e.max-o,t.min)),Xi(0,1,n)}function wae(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Vw=.35;function xae(e=Vw){return e===!1?e=0:e===!0&&(e=Vw),{x:aM(e,"left","right"),y:aM(e,"top","bottom")}}function aM(e,t,n){return{min:lM(e,t),max:lM(e,n)}}function lM(e,t){return typeof e=="number"?e:e[t]||0}const _ae=new WeakMap;class Eae{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=Er(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const s=p=>{n?(this.stopAnimation(),this.snapToCursor(Kh(p).point)):this.pauseAnimation()},l=(p,g)=>{this.stopAnimation();const{drag:b,dragPropagation:y,onDragStart:_}=this.getProps();if(b&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=gie(b),!this.openDragLock))return;this.latestPointerEvent=p,this.latestPanInfo=g,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Qo(T=>{let v=this.getAxisMotionValue(T).get()||0;if(Gi.test(v)){const{projection:E}=this.visualElement;if(E&&E.layout){const S=E.layout.layoutBox[T];S&&(v=ho(S)*(parseFloat(v)/100))}}this.originPoint[T]=v}),_&&$n.postRender(()=>_(p,g)),Dw(this.visualElement,"transform");const{animationState:w}=this.visualElement;w&&w.setActive("whileDrag",!0)},c=(p,g)=>{this.latestPointerEvent=p,this.latestPanInfo=g;const{dragPropagation:b,dragDirectionLock:y,onDirectionLock:_,onDrag:w}=this.getProps();if(!b&&!this.openDragLock)return;const{offset:T}=g;if(y&&this.currentDirection===null){this.currentDirection=Cae(T),this.currentDirection!==null&&_&&_(this.currentDirection);return}this.updateAxis("x",g.point,T),this.updateAxis("y",g.point,T),this.visualElement.render(),w&&w(p,g)},u=(p,g)=>{this.latestPointerEvent=p,this.latestPanInfo=g,this.stop(p,g),this.latestPointerEvent=null,this.latestPanInfo=null},d=()=>Qo(p=>this.getAnimationState(p)==="paused"&&this.getAxisMotionValue(p).animation?.play()),{dragSnapToOrigin:h}=this.getProps();this.panSession=new T$(t,{onSessionStart:s,onStart:l,onMove:c,onSessionEnd:u,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:h,distanceThreshold:r,contextWindow:C$(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!o||!r)return;const{velocity:l}=o;this.startAnimation(l);const{onDragEnd:c}=this.getProps();c&&$n.postRender(()=>c(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!ug(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let l=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(l=yae(l,this.constraints[t],this.elastic[t])),s.set(l)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&Md(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=vae(r.layoutBox,t):this.constraints=!1,this.elastic=xae(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Qo(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=wae(r.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Md(t))return!1;const r=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=Pie(r,o.root,this.visualElement.getTransformPagePoint());let l=bae(o.layout.layoutBox,s);if(n){const c=n(kie(l));this.hasMutatedConstraints=!!c,c&&(l=ZD(c))}return l}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:l,onDragTransitionEnd:c}=this.getProps(),u=this.constraints||{},d=Qo(h=>{if(!ug(h,n,this.currentDirection))return;let p=u&&u[h]||{};l&&(p={min:0,max:0});const g=o?200:1e6,b=o?40:1e7,y={type:"inertia",velocity:r?t[h]:0,bounceStiffness:g,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...s,...p};return this.startAxisValueAnimation(h,y)});return Promise.all(d).then(c)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Dw(this.visualElement,t),r.start(iE(t,r,0,n,this.visualElement,!1))}stopAnimation(){Qo(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Qo(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Qo(n=>{const{drag:r}=this.getProps();if(!ug(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:l,max:c}=o.layout.layoutBox[n],u=s.get()||0;s.set(t[n]-Wn(l,c,.5)+u)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Md(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Qo(l=>{const c=this.getAxisMotionValue(l);if(c&&this.constraints!==!1){const u=c.get();o[l]=Sae({min:u,max:u},this.constraints[l])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Qo(l=>{if(!ug(l,t,null))return;const c=this.getAxisMotionValue(l),{min:u,max:d}=this.constraints[l];c.set(Wn(u,d,o[l]))})}addListeners(){if(!this.visualElement.current)return;_ae.set(this.visualElement,this);const t=this.visualElement.current,n=Bd(t,"pointerdown",u=>{const{drag:d,dragListener:h=!0}=this.getProps();d&&h&&!VD(u.target)&&this.start(u)}),r=()=>{const{dragConstraints:u}=this.getProps();Md(u)&&u.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),$n.read(r);const l=hh(window,"resize",()=>this.scalePositionWithinConstraints()),c=o.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:d})=>{this.isDragging&&d&&(Qo(h=>{const p=this.getAxisMotionValue(h);p&&(this.originPoint[h]+=u[h].translate,p.set(p.get()+u[h].translate))}),this.visualElement.render())}));return()=>{l(),n(),s(),c&&c()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:l=Vw,dragMomentum:c=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:l,dragMomentum:c}}}function ug(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Cae(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Tae extends ol{constructor(t){super(t),this.removeGroupControls=ii,this.removeListeners=ii,this.controls=new Eae(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ii}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners()}}const cM=e=>(t,n)=>{e&&$n.postRender(()=>e(t,n))};class Rae extends ol{constructor(){super(...arguments),this.removePointerDownListener=ii}onPointerDown(t){this.session=new T$(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:C$(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:cM(t),onStart:cM(n),onMove:r,onEnd:(s,l)=>{delete this.session,o&&$n.postRender(()=>o(s,l))}}}mount(){this.removePointerDownListener=Bd(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 $1=!1;class Oae extends k.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),$1&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),zg.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,{projection:l}=r;return l&&(l.isPresent=s,$1=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==s?l.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?l.promote():l.relegate()||$n.postRender(()=>{const c=l.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),cE.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;$1=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function O$(e){const[t,n]=$se(),r=k.useContext(GN);return j.jsx(Oae,{...e,layoutGroup:r,switchLayoutGroup:k.useContext(_$),isPresent:t,safeToRemove:n})}const Aae={pan:{Feature:Rae},drag:{Feature:Tae,ProjectionNode:m$,MeasureLayout:O$}};function uM(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,s=r[o];s&&$n.postRender(()=>s(t,Kh(t)))}class kae extends ol{mount(){const{current:t}=this.node;t&&(this.unmount=yie(t,(n,r)=>(uM(this.node,r,"Start"),o=>uM(this.node,o,"End"))))}unmount(){}}class Mae extends ol{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=qh(hh(this.node.current,"focus",()=>this.onFocus()),hh(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function fM(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),s=r[o];s&&$n.postRender(()=>s(t,Kh(t)))}class jae extends ol{mount(){const{current:t}=this.node;t&&(this.unmount=Sie(t,(n,r)=>(fM(this.node,r,"Start"),(o,{success:s})=>fM(this.node,o,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const qw=new WeakMap,I1=new WeakMap,Pae=e=>{const t=qw.get(e.target);t&&t(e)},Nae=e=>{e.forEach(Pae)};function Dae({root:e,...t}){const n=e||document;I1.has(n)||I1.set(n,{});const r=I1.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(Nae,{root:e,...t})),r[o]}function $ae(e,t,n){const r=Dae(t);return qw.set(e,n),r.observe(e),()=>{qw.delete(e),r.unobserve(e)}}const Iae={some:0,all:1};class zae extends ol{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,l={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:Iae[o]},c=u=>{const{isIntersecting:d}=u;if(this.isInView===d||(this.isInView=d,s&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:h,onViewportLeave:p}=this.node.getProps(),g=d?h:p;g&&g(u)};return $ae(this.node.current,l,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Lae(t,n))&&this.startObserver()}unmount(){}}function Lae({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Fae={inView:{Feature:zae},tap:{Feature:jae},focus:{Feature:Mae},hover:{Feature:kae}},Uae={layout:{ProjectionNode:m$,MeasureLayout:O$}},Vae={...dae,...Fae,...Aae,...Uae},dM=aae(Vae,lae),A$=Mo.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 j.jsx("div",{className:pn("absolute h-full w-full inset-0 mask-size-[40px] mask-repeat-[no-repeat] flex items-center justify-center",e),children:j.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:[j.jsx("title",{children:"Background Beams"}),j.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((n,r)=>j.jsx(dM.path,{d:n,stroke:`url(#linearGradient-${r})`,strokeOpacity:"0.4",strokeWidth:"0.5"},`path-${r}`)),j.jsxs("defs",{children:[t.map((n,r)=>j.jsxs(dM.linearGradient,{id:`linearGradient-${r}`,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:[j.jsx("stop",{stopColor:"#000000",stopOpacity:"0"}),j.jsx("stop",{stopColor:"#111111"}),j.jsx("stop",{offset:"32.5%",stopColor:"#666666"}),j.jsx("stop",{offset:"100%",stopColor:"#FFFFFF",stopOpacity:"0"})]},`gradient-${r}`)),j.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:[j.jsx("stop",{offset:"0.0666667",stopColor:"var(--neutral-300)"}),j.jsx("stop",{offset:"0.243243",stopColor:"var(--neutral-300)"}),j.jsx("stop",{offset:"0.43594",stopColor:"white",stopOpacity:"0"})]})]})]})})});A$.displayName="BackgroundBeams";const qae=()=>j.jsxs(j.Fragment,{children:[j.jsx(A$,{className:"absolute inset-0"}),j.jsx("div",{className:"relative z-10 flex-1 flex items-center justify-center",children:j.jsxs("div",{className:"text-center",children:[j.jsx("h1",{className:"text-2xl font-semibold text-foreground mb-2",children:"Welcome to Skybridge"}),j.jsx("p",{className:"text-sm text-muted-foreground",children:"Choose a tool from the sidebar to begin"})]})})]});function Kt(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 Bae(e){return e.additionalItems===!0&&console.warn("additionalItems=true is currently not supported"),Kt(e.additionalItems)}function hM(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 $s="__additional_property",xy="additionalProperties",Za="allOf",Gt="anyOf",li="const",v0="default",yE="dependencies",Hae="enum",Hr="__errors",_n="$id",Kae="if",Ku="items",Gae="_$junk_option_schema_id$_",Lg="$name",Mt="oneOf",Bw="patternProperties",nn="properties",z1="readonly",k$="required",_y="submitButtonOptions",In="$ref",jd="$schema",M$="root",j$="_",Zae=["discriminator","propertyName"],pM="formContext",Wae="layoutGridLookupMap",vE="__rjsf_additionalProperties",P$="__rjsf_rootSchema",Yae="ui:field",bE="ui:widget",Na="ui:options",Hw="ui:globalOptions",Xae="https://json-schema.org/draft/2019-09/schema",Fg="https://json-schema.org/draft/2020-12/schema";function ct(e={},t={}){return e?Object.keys(e).filter(n=>n.indexOf("ui:")===0).reduce((n,r)=>{const o=e[r];return r===bE&&Kt(o)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),n):r===Na&&Kt(o)?{...n,...o}:{...n,[r.substring(3)]:o}},{...t}):{...t}}function N$(e,t={},n){if(!(e.additionalProperties||e.patternProperties))return!1;const{expandable:r=!0}=ct(t);return r===!1?r:e.maxProperties!==void 0&&n?Object.keys(n).length<e.maxProperties:!0}function Kw(e){const t={[Hr]:[],addError(n){this[Hr].push(n)}};if(Array.isArray(e))return e.reduce((n,r,o)=>({...n,[o]:Kw(r)}),t);if(Ua(e)){const n=e;return Object.keys(n).reduce((r,o)=>({...r,[o]:Kw(n[o])}),t)}return t}function An(e,t){return rK(e,t,(n,r)=>{if(typeof n=="function"&&typeof r=="function")return!0})}const Qae=Object.prototype;function Pd(e){for(const t in e)if(Qae.hasOwnProperty.call(e,t))return!1;return!0}const Jae=["array","boolean","integer","null","number","object","string"];new Set(Jae);const ele=["$defs","definitions","properties","patternProperties","dependencies"];new Set(ele);const tle=["items","allOf","oneOf","anyOf"];new Set(tle);const nle=["items","additionalItems","additionalProperties","propertyNames","contains","if","then","else","not"];new Set(nle);function Ug(e){return typeof e=="object"}function Li(e){return Ug(e)?Pd(e):e===!0}function xu(e,t){return e<t?-1:e>t?1:0}function L1(e,t){const n=e.length;if(n===0)return t;let r=t.length;if(r===0)return e;if(n<r){const s=e;e=t,t=s,r=n}const o=new Set(e);for(let s=0;s<r;s++)o.add(t[s]);return Array.from(o)}function rle(e,t){const n=[];if(e.length===0||t.length===0)return n;if(e.length>t.length){const o=e;e=t,t=o}const r=new Set(t);for(let o=0;o<e.length&&r.size>0;o++){const s=e[o];r.delete(s)&&n.push(s)}return n}function mM(e){return e.length===0}function F1(e){return(t,n)=>{const r=t.length-n.length;if(r!==0)return r;for(let o=0;o<t.length;o++)if(t[o]!==n[o]){const s=e(t[o],n[o]);if(s!==0)return s}return 0}}function D$(e,{threshold:t=12}={}){return n=>{const r=n.length;if(r===0)return n;if(r<=t){const l=[];let c=0;e:for(let u=0;u<r;u++){const d=n[u];for(let h=0;h<c;h++)if(e(d,l[h])===0)continue e;c=l.push(d)}return l}const o=n.slice().sort(e);let s=0;for(let l=1;l<r;l++)e(o[s],o[l])!==0&&++s!==l&&(o[s]=o[l]);return o.length=s+1,o}}function ole(e){return(t,n)=>{const r=[];let o=t.length,s=n.length;if(o===0||s===0)return r;if(o>s){const h=t;t=n,n=h;const p=o;o=s,s=p}const l=[...t].sort(e),c=[...n].sort(e);let u=0,d=0;for(;u<o&&d<s;){const h=e(l[u],c[d]);h===0?((r.length===0||e(r[r.length-1],l[u])!==0)&&r.push(l[u]),u++,d++):h<0?u++:d++}return r}}function ile(e,t){return n=>{if(e.has(n))return e.get(n);const r=t(n);return e.set(n,r),r}}const gM=ile,$$=()=>0,sle=e=>e===void 0,ale=e=>typeof e!="object",yM={boolean:0,number:1,string:2};function lle(e,t){const n=typeof e,r=typeof t;return n===r?xu(e,t):yM[n]-yM[r]}function cle(e,t){const n=e.length;if(n===0)return t;const r=t.length;if(r===0)return e;if(r>n){const l=e;e=t,t=l}const o=new Set(e),s=t.length;for(let l=0;l<s;l++){const c=t[l];o.has(c)||e.push(c)}return e}function b0(e,t,n=$$){return(r,o)=>e(r)?e(o)?n(r,o):-1:e(o)?1:t(r,o)}function lu(e){return b0(sle,e)}function Ea(e,t){return b0(n=>n===void 0||e(n),t)}function U1(e,t){return b0(Array.isArray,e,t)}const gr=lu(xu),V1=Ea(e=>e===0,(e,t)=>e-t);function ule({deduplicationCache:e=new WeakMap,sortedKeysCache:t=new WeakMap}={}){const n=gM(t,_=>Object.keys(_).sort());function r(_){return(w,T)=>{const v=n(w),E=n(T),S=Math.min(v.length,E.length);for(let C=0;C<S;C++){const x=xu(v[C],E[C]);if(x!==0)return x}if(v.length!==E.length)return v.length-E.length;for(let C=0;C<S;C++){const x=v[C],O=_(w[x],T[x]);if(O!==0)return O}return 0}}function o(_){const w=F1(_),T=gM(e,D$(_,{threshold:0}));return(v,E)=>w(T(v),T(E))}const s=o(xu);function l(_,w){if(Ug(_)){if(Ug(w)){const T=Object.keys(_),v=Object.keys(w),E=cle(T,v),S=E.length;for(let C=0;C<S;C++){const x=E[C];if(_[x]===w[x])continue;const M=(y[x]??c)(_[x],w[x]);if(M!==0)return M}return 0}return w===!0&&Pd(_)?0:1}return Ug(w)?_===!0&&Pd(w)?0:-1:xu(_,w)}const c=lu(d),u=b0(ale,U1(r(c),F1(d)),lle);function d(_,w){return _===null?-1:w===null?1:u(_,w)}const h=lu(l),p=Ea(Pd,r(h)),g=lu(o(l)),b=Ea(Li,l),y={$id:gr,$comment:gr,$defs:p,$ref:gr,$schema:gr,const:c,contains:h,contentEncoding:gr,contentMediaType:gr,default:c,definitions:p,description:gr,else:h,examples:c,exclusiveMaximum:gr,exclusiveMinimum:gr,format:gr,if:h,maximum:gr,maxItems:gr,maxLength:gr,maxProperties:gr,minimum:gr,multipleOf:gr,not:h,pattern:gr,propertyNames:h,readOnly:gr,then:h,title:gr,writeOnly:gr,uniqueItems:Ea(_=>_===!1,$$),minLength:V1,minItems:V1,minProperties:V1,required:Ea(mM,s),enum:Ea(mM,o(d)),type:lu((_,w)=>{const T=Array.isArray(_),v=Array.isArray(w);return!T&&!v?xu(_,w):s(T?_:[_],v?w:[w])}),items:Ea(_=>!Array.isArray(_)&&Li(_),U1(l,F1(l))),anyOf:g,allOf:g,oneOf:g,properties:p,patternProperties:p,additionalProperties:b,additionalItems:b,dependencies:Ea(Pd,r(lu(U1(l,s))))};return{compareSchemaValues:d,compareSchemaDefinitions:l}}function vM(e){return e}const I$=(e,t)=>e?I$(t%e,e):t,fle=(e,t)=>Math.abs(e*t)/I$(e,t);function dle(e,t){return e===t?e:`^(?=.*(?:${e}))(?=.*(?:${t})).*$`}function*q1(e,t,n){const r=e.length,o=t.length;if(r>0&&o>0)for(let s=0;s<r;s++){const l=e[s];for(let c=0;c<o;c++)yield n(l,t[c])}}function B1(e,t){return e||t}function bM(e){return(t,n)=>{const r={...t},o=Object.keys(n),s=o.length;for(let l=0;l<s;l++){const c=o[l];r[c]=t[c]===void 0?n[c]:e(t[c],n[c])}return r}}function hle(e){const t=new Map;for(const n of e)for(const r of n[0])t.set(r,n[1]);return t}function Nl(e,t,n){n===void 0||Li(n)?delete e[t]:e[t]=n}const ple=["properties","patternProperties","additionalProperties"];function SM(e){const t=Object.keys(e),n=t.length,r=[];for(let o=0;o<n;o++){const s=t[o];r.push({regExp:new RegExp(s),schema:e[s]})}return[r,t]}const wM=[[],[]];function xM(e,t,n){const r=n.length;for(let o=0;o<r;o++){const s=n[o];if(!s.regExp.test(t))continue;const l=s.schema;if(l===!1)return!0;e.push(l)}return!1}const mle=["items","additionalItems"],gle=["if","then","else"];function _M(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 H1(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 Dl(e,t,n){return[e,t,n]}function yle(e){const t=new Map;for(const[n,r,o]of e){const s=l=>{if(!o(l))throw new Error(`Schema keys '${n}' and '${r}' are conflicting (${n}: ${JSON.stringify(l[n])}, ${r}: ${JSON.stringify(l[r])})`)};for(const l of[[n,r],[r,n]]){let c=t.get(l[0]);c===void 0&&(c=[],t.set(l[0],c)),c.push({oppositeKey:l[1],check:s})}}return t}const vle=[Dl("minimum","maximum",e=>e.maximum>=e.minimum),Dl("exclusiveMinimum","maximum",e=>e.maximum>e.exclusiveMinimum),Dl("minimum","exclusiveMaximum",e=>e.exclusiveMaximum>e.minimum),Dl("exclusiveMinimum","exclusiveMaximum",e=>e.exclusiveMaximum>e.exclusiveMinimum),Dl("minLength","maxLength",e=>e.maxLength>=e.minLength),Dl("minItems","maxItems",e=>e.maxItems>=e.minItems),Dl("minProperties","maxProperties",e=>e.maxProperties>=e.minProperties)];function ble({mergePatterns:e=dle,isSubRegExp:t=Object.is,intersectJson:n=rle,deduplicateJsonSchemaDef:r=vM,defaultMerger:o=vM,assigners:s=[],checks:l=vle,mergers:c}={}){function u(S){const C=S.length;let x=S[0];for(let O=1;O<C;O++){const M=T(x,S[O]);if(M===!1)return!1;Li(M)||(x=M)}return x}function d(S,C,x,O,M,P,z){if(S.length=0,x===!1)return!1;if(S.push(x),M!==void 0){if(M===!1)return!1;S.push(M)}if(xM(S,C,P))return!1;const q=S.length<2;if(z===!1){if(q)return;if(xM(S,C,O))return!1}else q&&z!==void 0&&S.push(z);return S.length===1?S[0]:u(S)}function h(S,C,x,O,M,P){const z=x.length;if(z>0&&M!==!1)if(P)Object.assign(S,C);else for(let I=0;I<z;I++){const q=x[I];O.has(q)||(S[q]=T(C[q],M))}return S}const p=(S,{properties:C={},patternProperties:x,additionalProperties:O=!0},{properties:M={},patternProperties:P,additionalProperties:z=!0})=>{const I=Li(O),q=Li(z);if(I&&q)return Nl(S,"properties",v(C,M)),Nl(S,"patternProperties",x&&P?v(x,P):x??P),delete S.additionalProperties,S;const G=T(O,z);Nl(S,"additionalProperties",G);const ee={},J=Object.keys(C),Z=J.length,[H,Y]=x?SM(x):wM,[oe,ne]=P?SM(P):wM,$=[],V=new Set,U=q?void 0:z;for(let ge=0;ge<Z;ge++){const Me=J[ge];V.add(Me);const Q=d($,Me,C[Me],H,M[Me],oe,U);Q!==void 0&&(ee[Me]=Q)}const D=Object.keys(M),B=D.length,te=I?void 0:O;for(let ge=0;ge<B;ge++){const Me=D[ge];if(V.has(Me))continue;const Q=d($,Me,M[Me],oe,void 0,H,te);Q!==void 0&&(ee[Me]=Q)}Nl(S,"properties",ee);let re={};const le=new Set;if(Y.length>0&&ne.length>0){const ge=q1(Y,ne,(Me,Q)=>{t(Me,Q)&&le.add(Me),t(Q,Me)&&le.add(Q),re[e(Me,Q)]=T(x[Me],P[Q])});for(;!ge.next().done;);}return re=h(re,x,Y,le,z,q),re=h(re,P,ne,le,O,I),Nl(S,"patternProperties",re),S},g=(S,{items:C=[],additionalItems:x},{items:O=[],additionalItems:M})=>{const P=Array.isArray(C),z=Array.isArray(O),I=[];if(S.items=I,P&&z){const[q,G,ee]=C.length<O.length?[C.length,x,O]:[O.length,M,C];let J=0;for(;J<q;J++)I.push(T(C[J],O[J]));if(G===!1)S.additionalItems=!1;else{const Z=G===void 0||Li(G);for(;J<ee.length;J++)I.push(Z?ee[J]:T(ee[J],G));Nl(S,"additionalItems",x!==void 0&&M!==void 0?T(x,M):x??M)}}else if(P||z){const[q,G,ee]=P?[C,O,x]:[O,C,M];Nl(S,"additionalItems",ee&&T(ee,G));for(let J=0;J<q.length;J++)I.push(T(q[J],G))}else delete S.additionalItems,S.items=T(C,O);return S},b=(S,C,x)=>{_M(S,C);const O=_M({},x);return S.allOf===void 0?S.allOf=[O]:S.allOf=S.allOf.concat(O),S};function y(S,C){return r(Array.from(q1(S,C,T)))}const _=hle([[ple,p],[mle,g],[gle,b],...s]),w=yle(l);function T(S,C){if(S===!1||C===!1)return!1;if(Li(S))return Li(C)?!0:C;if(Li(C))return S;let x={...S};const O=new Set,M=new Set,P=Object.keys(C),z=P.length;for(let I=0;I<z;I++){const q=P[I],G=C[q];if(G===void 0)continue;const ee=w.get(q);if(ee!==void 0){const Y=ee.length;for(let oe=0;oe<Y;oe++){const ne=ee[oe];S[ne.oppositeKey]!==void 0&&M.add(ne.check)}}const J=S[q];if(J===void 0){x[q]=G;continue}const Z=_.get(q);if(Z){O.add(Z);continue}const H=E[q]??o;x[q]=H(J,G)}for(const I of O)x=I(x,S,C);for(const I of M)I(x);return x}const v=bM(T),E={$id:o,$ref:o,$schema:o,$comment:o,$defs:v,definitions:v,type:(S,C)=>{if(S===C)return S;const x=Array.isArray(S),O=Array.isArray(C);if(!x&&!O){const M=H1(S,C);if(M!==void 0)return M}else if(x||O){const M=new Set;if(x&&O)for(const z of q1(S,C,H1))z!==void 0&&M.add(z);else{const z=x?S:C,I=x?C:S,q=z.length;for(let G=0;G<q;G++){const ee=H1(I,z[G]);ee!==void 0&&M.add(ee)}}const P=M.size;if(P===1)return M.values().next().value;if(P>1)return Array.from(M)}throw new Error(`It is not possible to create an intersection of the following incompatible types: ${S.toString()}, ${C.toString()}`)},default:o,description:o,title:o,const:o,format:o,contentEncoding:o,contentMediaType:o,not:(S,C)=>{const x=r([S,C]);return x.length===1?x[0]:{anyOf:x}},pattern:e,readOnly:B1,writeOnly:B1,enum:(S,C)=>{const x=n(S,C);if(x.length===0)throw new Error(`Intersection of the following enums is empty: "${JSON.stringify(S)}", "${JSON.stringify(C)}"`);return x},anyOf:y,oneOf:y,allOf:(S,C)=>r(S.concat(C)),propertyNames:T,contains:T,dependencies:bM((S,C)=>Array.isArray(S)?Array.isArray(C)?L1(S,C):T(C,{required:S}):Array.isArray(C)?T(S,{required:C}):T(S,C)),examples:(S,C)=>{if(!Array.isArray(S)||!Array.isArray(C))throw new Error(`Value of the 'examples' field should be an array, but got "${JSON.stringify(S)}" and "${JSON.stringify(C)}"`);return L1(S,C)},multipleOf:(S,C)=>{let x=1;for(;!Number.isInteger(S)||!Number.isInteger(C);)x*=10,S*=10,C*=10;return fle(S,C)/x},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:B1,required:L1,...c};return{mergeSchemaDefinitions:T,mergeArrayOfSchemaDefinitions:u}}function Sle(e){const t=[],n=[e];for(;n.length>0;){const r=n.pop();if(typeof r=="boolean"||r.allOf===void 0){t.push(r);continue}const{allOf:o,...s}=r;t.push(s);for(let l=o.length-1;l>=0;l--)n.push(o[l])}return t}function wle(e){return t=>e(Sle(t))}var xd={},EM;function xle(){if(EM)return xd;EM=1;var e=/~/,t=/~[01]/g;function n(d){switch(d){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+d)}function r(d){return e.test(d)?d.replace(t,n):d}function o(d,h,p){for(var g,b,y=1,_=h.length;y<_;){if(h[y]==="constructor"||h[y]==="prototype"||h[y]==="__proto__")return d;if(g=r(h[y++]),b=_>y,typeof d[g]>"u"&&(Array.isArray(d)&&g==="-"&&(g=d.length),b&&(h[y]!==""&&h[y]<1/0||h[y]==="-"?d[g]=[]:d[g]={})),!b)break;d=d[g]}var w=d[g];return p===void 0?delete d[g]:d[g]=p,w}function s(d){if(typeof d=="string"){if(d=d.split("/"),d[0]==="")return d;throw new Error("Invalid JSON pointer.")}else if(Array.isArray(d)){for(const h of d)if(typeof h!="string"&&typeof h!="number")throw new Error("Invalid JSON pointer. Must be of type string or number.");return d}throw new Error("Invalid JSON pointer.")}function l(d,h){if(typeof d!="object")throw new Error("Invalid input object.");h=s(h);var p=h.length;if(p===1)return d;for(var g=1;g<p;){if(d=d[r(h[g++])],p===g)return d;if(typeof d!="object"||d===null)return}}function c(d,h,p){if(typeof d!="object")throw new Error("Invalid input object.");if(h=s(h),h.length===0)throw new Error("Invalid JSON pointer for set.");return o(d,h,p)}function u(d){var h=s(d);return{get:function(p){return l(p,h)},set:function(p,g){return c(p,h,g)}}}return xd.get=l,xd.set=c,xd.compile=u,xd}var _le=xle();const K1=ts(_le);var Ele=mN();const SE=ts(Ele);function Ey(e,t){if(_n in e&&SE.equal(e[_n],t))return e;for(const n of Object.values(e))if(Array.isArray(n)){for(const r of n)if(Zt(r)){const o=Ey(r,t);if(o!==void 0)return o}}else if(Zt(n)){const r=Ey(n,t);if(r!==void 0)return r}}function Gw(e,t){const n=Ie(e,_n,t);In in e&&(e={...e,[In]:SE.resolve(n,e[In])});for(const[r,o]of Object.entries(e))Array.isArray(o)?e={...e,[r]:o.map(s=>Zt(s)?Gw(s,n):s)}:Zt(o)&&(e={...e,[r]:Gw(o,n)});return e}function wE(e,t){const n=t[e];return[oh(t,[e]),n]}function z$(e,t={},n=[],r=Ie(t,[_n])){const o=e||"";let s;if(o.startsWith("#")){const c=decodeURIComponent(o.substring(1));r===void 0||_n in t&&t[_n]===r?s=K1.get(t,c):t[jd]===Fg&&(s=Ey(t,r.replace(/\/$/,"")),s!==void 0&&(s=K1.get(s,c)))}else if(t[jd]===Fg){const c=r?SE.resolve(r,o):o,[u,...d]=c.replace(/#\/?$/,"").split("#");s=Ey(t,u.replace(/\/$/,"")),s!==void 0&&(r=s[_n],vr(d)||(s=K1.get(s,decodeURIComponent(d.join("#")))))}if(s===void 0)throw new Error(`Could not find a definition for ${e}.`);const l=s[In];if(l){if(n.includes(l)){if(n.length===1)throw new Error(`Definition for ${e} is a circular reference`);const[h,...p]=n,g=[...p,o,h].join(" -> ");throw new Error(`Definition for ${h} contains a circular reference through ${g}`)}const[c,u]=wE(In,s),d=z$(u,t,[...n,o],r);return Object.keys(c).length>0?t[jd]===Xae||t[jd]===Fg?{[Za]:[c,d]}:{...c,...d}:d}return s}function L$(e,t={},n=Ie(t,[_n])){return z$(e,t,[],n)}function Qi(e){let t;const n=Ie(e,Zae);return Va(n)?t=n:n!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof n}" instead`),t}function ph(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 Ci(e){let{type:t}=e;return!t&&e.const?ph(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(n=>n!=="null"):t=t[0]),t)}function Ls(e,t){const n=Object.assign({},e);return Object.keys(t).reduce((r,o)=>{const s=e?e[o]:{},l=t[o];return e&&o in e&&Kt(l)?r[o]=Ls(s,l):e&&t&&(Ci(e)==="object"||Ci(t)==="object")&&o===k$&&Array.isArray(s)&&Array.isArray(l)?r[o]=_K(s,l):r[o]=l,r},n)}function F$(e,t,n){var r;if(e&&n){const o=Ie(e,n);if(o===void 0)return;for(let s=0;s<t.length;s++){const l=t[s],c=Ie(l,[nn,n],{});if(!(c.type==="object"||c.type==="array")&&(c.const===o||!((r=c.enum)===null||r===void 0)&&r.includes(o)))return s}}}function xE(e,t,n,r,o){if(t===void 0)return 0;const s=F$(t,n,o);if(FP(s))return s;for(let l=0;l<n.length;l++){const c=n[l];if(o&&Vt(c,[nn,o])){const u=Ie(t,o),d=Ie(c,[nn,o],{});if(e.isValid(d,u,r))return l}else if(c[nn]){const u={anyOf:Object.keys(c[nn]).map(h=>({required:[h]}))};let d;if(c.anyOf){const{...h}=c;h.allOf?h.allOf=h.allOf.slice():h.allOf=[],h.allOf.push(u),d=h}else d=Object.assign({},c,u);if(delete d.required,e.isValid(d,t,r))return l}else if(e.isValid(c,t,r))return l}return 0}function eo(e,t,n={},r,o,s=!1){return qi(e,t,n,r,void 0,void 0,o,s)[0]}function Cle(e,t,n,r,o,s,l){const{if:c,then:u,else:d,...h}=t,p=e.isValid(c,s||{},n);let g=[h],b=[];if(r)u&&typeof u!="boolean"&&(b=b.concat(qi(e,u,n,s,r,o,l))),d&&typeof d!="boolean"&&(b=b.concat(qi(e,d,n,s,r,o,l)));else{const y=p?u:d;y&&typeof y!="boolean"&&(b=b.concat(qi(e,y,n,s,r,o,l)))}return b.length&&(g=b.map(y=>Ls(h,y))),g.flatMap(y=>qi(e,y,n,s,r,o,l))}function U$(e){return e.reduce((n,r)=>r.length>1?r.flatMap(o=>BP(n.length,s=>[...n[s]].concat(o))):(n.forEach(o=>o.push(r[0])),n),[[]])}function V$(e,t){return Object.keys(e.patternProperties).filter(n=>RegExp(n).test(t)).reduce((n,r)=>(fn(n,[r],e.patternProperties[r]),n),{})}function Tle(e,t,n,r,o,s,l,c){const u=q$(e,t,n,r,o,s,l,c);if(u.length>1||u[0]!==t)return u;if(yE in t)return B$(e,t,n,r,o,s,l).flatMap(h=>qi(e,h,n,s,r,o,l));if(Za in t&&Array.isArray(t[Za])){const d=t.allOf.map(p=>qi(e,p,n,s,r,o,l));return U$(d).map(p=>({...t,allOf:p}))}return[t]}function q$(e,t,n,r,o,s,l,c){const u=Ou(t,n,o,void 0,c);return u!==t?qi(e,u,n,s,r,o,l,c):[t]}function Ou(e,t,n,r,o){if(!Kt(e))return e;let s=e;if(In in s){const{$ref:l,...c}=s;if(n.includes(l))return s;n.push(l),s={...L$(l,t,r),...c},_n in s&&(r=s[_n])}if(nn in s){const l=[],c=bK(s[nn],(u,d,h)=>{const p=[...n];u[h]=Ou(d,t,p,r,o),l.push(p)},{});iK(n,GP(FH(l))),s={...s,[nn]:c}}if(Ku in s&&!Array.isArray(s.items)&&typeof s.items!="boolean"&&(s={...s,items:Ou(s.items,t,n,r,o)}),o){let l,c;Gt in e&&Array.isArray(e[Gt])?(l=Gt,c=s[Gt]):Mt in e&&Array.isArray(e[Mt])&&(l=Mt,c=s[Mt]),l&&c&&(s={...s,[l]:c.map(u=>Ou(u,t,n,r,o))})}return An(e,s)?e:s}function Rle(e,t,n,r,o){const s={...t,properties:{...t.properties}},l=r&&Kt(r)?r:{};return Object.keys(l).forEach(c=>{if(!(c in s.properties)){if(Bw in s){const u=V$(s,c);if(!vr(u)){s.properties[c]=eo(e,{[Za]:Object.values(u)},n,Ie(l,[c]),o),fn(s.properties,[c,$s],!0);return}}if(xy in s&&s.additionalProperties!==!1){let u;typeof s.additionalProperties!="boolean"?In in s.additionalProperties?u=eo(e,{[In]:Ie(s.additionalProperties,[In])},n,l,o):"type"in s.additionalProperties?u={...s.additionalProperties}:Gt in s.additionalProperties||Mt in s.additionalProperties?u={type:"object",...s.additionalProperties}:u={type:ph(Ie(l,[c]))}:u={type:ph(Ie(l,[c]))},s.properties[c]=u,fn(s.properties,[c,$s],!0)}else s.properties[c]={type:"null"},fn(s.properties,[c,$s],!0)}}),s}const{compareSchemaDefinitions:Ole,compareSchemaValues:Ale}=ule(),{mergeArrayOfSchemaDefinitions:kle}=ble({intersectJson:ole(Ale),deduplicateJsonSchemaDef:D$(Ole)}),Mle=wle(kle);function jle(e){return Mle(e)}function qi(e,t,n,r,o=!1,s=[],l,c){return Kt(t)?Tle(e,t,n,o,s,r,l,c).flatMap(d=>{var h;let p=d;if(Kae in p)return Cle(e,p,n,o,s,r,l);if(Za in p){if(o){const{allOf:b,...y}=p;return[...b,y]}try{const b=[],y=[];(h=p.allOf)===null||h===void 0||h.forEach(_=>{typeof _=="object"&&_.contains?b.push(_):y.push(_)}),b.length&&(p={...p,allOf:y}),p=l?l(p):jle(p),b.length&&(p.allOf=b)}catch(b){console.warn(`could not merge subschemas in allOf:
60
- `,b);const{allOf:y,..._}=p;return _}}return nn in p&&Bw in p&&(p=Object.keys(p.properties).reduce((b,y)=>{const _=V$(b,y);return vr(_)||(b.properties[y]=eo(e,{allOf:[b.properties[y],...Object.values(_)]},n,Ie(r,[y]),l)),b},{...p,properties:{...p.properties}})),Bw in p||xy in p&&p.additionalProperties!==!1?Rle(e,p,n,r,l):p}):[{}]}function Ple(e,t,n,r,o){let s;const{oneOf:l,anyOf:c,...u}=t;if(Array.isArray(l)?s=l:Array.isArray(c)&&(s=c),s){const d=o===void 0&&r?{}:o,h=Qi(t);s=s.map(g=>Ou(g,n,[]));const p=xE(e,d,s,n,h);if(r)return s.map(g=>Ls(u,g));t=Ls(u,s[p])}return[t]}function B$(e,t,n,r,o,s,l){const{dependencies:c,...u}=t;return Ple(e,u,n,r,s).flatMap(h=>H$(e,c,h,n,r,o,s,l))}function H$(e,t,n,r,o,s,l,c){let u=[n];for(const d in t){if(!o&&Ie(l,[d])===void 0||n.properties&&!(d in n.properties))continue;const[h,p]=wE(d,t);return Array.isArray(p)?u[0]=Nle(n,p):Kt(p)&&(u=Dle(e,n,r,d,p,o,s,l,c)),u.flatMap(g=>H$(e,h,g,r,o,s,l,c))}return u}function Nle(e,t){if(!t)return e;const n=Array.isArray(e.required)?Array.from(new Set([...e.required,...t])):t;return{...e,required:n}}function Dle(e,t,n,r,o,s,l,c,u){return qi(e,o,n,c,s,l,u).flatMap(h=>{const{oneOf:p,...g}=h;if(t=Ls(t,g),p===void 0)return t;const b=p.map(_=>typeof _=="boolean"||!(In in _)?[_]:q$(e,_,n,s,l,c));return U$(b).flatMap(_=>$le(e,t,n,r,_,s,l,c,u))})}function $le(e,t,n,r,o,s,l,c,u){const d=o.filter(h=>{if(typeof h=="boolean"||!h||!h.properties)return!1;const{[r]:p}=h.properties;if(p){const g={type:"object",properties:{[r]:p}};return e.isValid(g,c,n)||s}return!1});return!s&&d.length!==1?(console.warn("ignoring oneOf in dependencies because there isn't exactly one subschema that is valid"),[t]):d.flatMap(h=>{const p=h,[g]=wE(r,p.properties),b={...p,properties:g};return qi(e,b,n,c,s,l,u).map(_=>Ls(t,_))})}function Nd(e,t,n,r,o,s={},l){if(Array.isArray(n[o])){const u=Qi(n)||r,d=n[o].map(p=>eo(e,p,t,s,l)),h=Ie(s,u);if(h!==void 0)return d.find(p=>ja(Ie(p,[nn,u,v0],Ie(p,[nn,u,li])),h))}}function K$(e,t,n,r,o){let s=n;if(Vt(n,In)&&(s=eo(e,n,t,void 0,o)),vr(r))return s;const l=Array.isArray(r)?r:r.split("."),[c,...u]=l;if(c&&Vt(s,c))return s=Ie(s,c),K$(e,t,s,u,o)}function Vg(e,t,n,r,o,s){const l=K$(e,t,n,r,s);return l===void 0?o:l}const CM={title:"!@#$_UNKNOWN_$#@!"};function Ile(e,t,n,r,o={},s){const l=Array.isArray(r)?[...r]:r.split(".");let c=n;const u=l.pop();l.length&&l.forEach(g=>{c=Vg(e,t,c,[nn,g],{},s),Vt(c,Mt)?c=Nd(e,t,c,u,Mt,Ie(o,g),s):Vt(c,Gt)&&(c=Nd(e,t,c,u,Gt,Ie(o,g),s))}),Vt(c,Mt)?c=Nd(e,t,c,u,Mt,o,s):Vt(c,Gt)&&(c=Nd(e,t,c,u,Gt,o,s));let d=Vg(e,t,c,[nn,u],CM,s);d===CM&&(d=void 0);const h=Vg(e,t,c,k$,[],s);let p;return d&&Array.isArray(h)&&(p=h.includes(u)),{field:d,isRequired:p}}const zle={type:"object",$id:Gae,properties:{__not_really_there__:{type:"number"}}};function Zw(e,t,n,r,o){let s=0;return n&&(Zt(n.properties)?s+=mK(n.properties,(l,c,u)=>{const d=Ie(r,u);if(typeof c=="boolean")return l;if(Vt(c,In)){const h=eo(e,c,t,d,o);return l+Zw(e,t,h,d||{},o)}if((Vt(c,Mt)||Vt(c,Gt))&&d){const h=Vt(c,Mt)?Mt:Gt,p=Qi(c);return l+mh(e,t,d,Ie(c,h),-1,p,o)}if(c.type==="object")return Zt(d)&&(l+=1),l+Zw(e,t,c,d,o);if(c.type===ph(d)){let h=l+1;return c.default?h+=d===c.default?1:-1:c.const&&(h+=d===c.const?1:-1),h}return l},0):Va(n.type)&&n.type===ph(r)&&(s+=1)),s}function mh(e,t,n,r,o=-1,s,l){const c=r.map(g=>Ou(g,t,[])),u=F$(n,r,s);if(FP(u))return u;const d=c.reduce((g,b,y)=>(xE(e,n,[zle,b],t,s)===1&&g.push(y),g),[]);if(d.length===1)return d[0];d.length||BP(c.length,g=>d.push(g));const h=new Set,{bestIndex:p}=d.reduce((g,b)=>{const{bestScore:y}=g,_=c[b],w=Zw(e,t,_,n,l);return h.add(w),w>y?{bestIndex:b,bestScore:w}:g},{bestIndex:o,bestScore:0});return h.size===1&&o>=0?o:p}function _E(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every(t=>Kt(t))}function gh(e,t,n=!1,r=!1,o=!1){if(Array.isArray(t)){const s=Array.isArray(e)?e:[],l=o?s:t,c=o?t:s,u=l.map((d,h)=>c[h]!==void 0?gh(s[h],t[h],n,r,o):d);return(n||o)&&u.length<c.length&&u.push(...c.slice(u.length)),u}if(Kt(t)){const s=Object.assign({},e);return Object.keys(t).reduce((l,c)=>{var u;const d=Ie(t,c),h=Kt(e)&&c in e,p=c in t,g=(u=Ie(e,c))!==null&&u!==void 0?u:{},b=h&&Object.entries(g).some(([,w])=>Kt(w)),y=h&&Kt(Ie(e,c)),_=p&&Kt(d);return y&&_&&!b?(l[c]={...Ie(e,c),...d},l):(l[c]=gh(Ie(e,c),d,n,r,o&&(h||!p)),l)},s)}return r&&(e!==void 0&&ny(t)||typeof t=="number"&&isNaN(t))||o&&!ny(t)?e:t}function yh(e,t,n=!1){return Object.keys(t).reduce((r,o)=>{const s=e?e[o]:{},l=t[o];if(e&&o in e&&Kt(l))r[o]=yh(s,l,n);else if(n&&Array.isArray(s)&&Array.isArray(l)){let c=l;n==="preventDuplicates"&&(c=l.reduce((u,d)=>(s.includes(d)||u.push(d),u),[])),r[o]=s.concat(c)}else r[o]=l;return r},Object.assign({},e))}function G$(e){return Array.isArray(e.enum)&&e.enum.length===1||li in e}function EE(e,t,n={},r){const o=eo(e,t,n,void 0,r),s=o.oneOf||o.anyOf;return Array.isArray(o.enum)?!0:Array.isArray(s)?s.every(l=>typeof l!="boolean"&&G$(l)):!1}function CE(e,t,n,r){return!t.uniqueItems||!t.items||typeof t.items=="boolean"?!1:EE(e,t.items,n,r)}function Z$(e){const t=e[li],n=Ci(e);return Kt(t)&&Va(t?.$data)&&n!=="object"&&n!=="array"}function Lle(e){if(Hae in e&&Array.isArray(e.enum)&&e.enum.length===1)return e.enum[0];if(li in e)return e.const;throw new Error("schema cannot be inferred as a constant")}function Gu(e,t){if(e.enum){let s;if(t){const{enumNames:l}=ct(t);s=l}return e.enum.map((l,c)=>({label:s?.[c]||String(l),value:l}))}let n,r;e.anyOf?(n=e.anyOf,r=t?.anyOf):e.oneOf&&(n=e.oneOf,r=t?.oneOf);let o=Qi(e);if(t){const{optionsSchemaSelector:s=o}=ct(t);o=s}return n&&n.map((s,l)=>{const{title:c}=ct(r?.[l]),u=s;let d,h=c;if(o){const p=Ie(u,[nn,o],{});d=Ie(p,v0,Ie(p,li)),h=h||p?.title||u.title||String(d)}else d=Lle(u),h=h||u.title||String(d);return{schema:u,label:h,value:d}})}const Fle=["string","number","integer","boolean","null"];var Zu;(function(e){e[e.Ignore=0]="Ignore",e[e.Invert=1]="Invert",e[e.Fallback=2]="Fallback"})(Zu||(Zu={}));function G1(e,t=Zu.Ignore,n=-1){if(n>=0){if(Array.isArray(e.items)&&n<e.items.length){const r=e.items[n];if(typeof r!="boolean")return r}}else if(e.items&&!Array.isArray(e.items)&&typeof e.items!="boolean")return e.items;return t!==Zu.Ignore&&Kt(e.additionalItems)?e.additionalItems:{}}function W$(e,t){const{default:n,type:r}=e;return Array.isArray(r)&&r.includes("null")&&vr(t)&&n===null?null:t}function TM(e,t,n,r,o,s=[],l={},c=!1,u=!1){const{emptyObjectFields:d="populateAllDefaults"}=l;if(r===!0||c)e[t]=n;else if(r==="excludeObjectChildren")(u&&n!==void 0||!Kt(n)||!vr(n))&&(e[t]=n);else if(d!=="skipDefaults"){const h=o===void 0?s.includes(t):o;Kt(n)?d==="skipEmptyDefaults"?vr(n)||(e[t]=n):(!vr(n)||s.includes(t))&&(h||d!=="populateRequiredDefaults")&&(e[t]=n):n!==void 0&&(d==="populateAllDefaults"||d==="skipEmptyDefaults"||h&&s.includes(t))&&(e[t]=n)}}function Da(e,t,n={}){const{parentDefaults:r,rawFormData:o,rootSchema:s={},includeUndefinedValues:l=!1,_recurseList:c=[],experimental_defaultFormStateBehavior:u=void 0,experimental_customMergeAllOf:d=void 0,required:h,shouldMergeDefaultsIntoFormData:p=!1,initialDefaultsGenerated:g}=n;let b=Kt(o)?o:{};const y=Kt(t)?t:{};let _=r,w=null,T=u,v=c;if(y[li]!==void 0&&u?.constAsDefaults!=="never"&&!Z$(y))_=y[li];else if(Kt(_)&&Kt(y.default))_=yh(_,y.default);else if(v0 in y&&!y[Gt]&&!y[Mt]&&!y[In])_=y.default;else if(In in y){const C=y[In];c.includes(C)||(v=c.concat(C),w=L$(C,s)),w&&!_&&(_=y.default),p&&w&&!Kt(o)&&(b=o)}else if(yE in y){const C={...RM(e,y,n,_),...b};w=B$(e,y,s,!1,[],C,d)[0]}else if(_E(y))_=y.items.map((C,x)=>Da(e,C,{rootSchema:s,includeUndefinedValues:l,_recurseList:c,experimental_defaultFormStateBehavior:u,experimental_customMergeAllOf:d,parentDefaults:Array.isArray(r)?r[x]:void 0,rawFormData:b,required:h,shouldMergeDefaultsIntoFormData:p}));else if(Mt in y){const{oneOf:C,...x}=y;if(C.length===0)return;const O=Qi(y),{type:M="null"}=x;!Array.isArray(M)&&Fle.includes(M)&&T?.constAsDefaults==="skipOneOf"&&(T={...T,constAsDefaults:"never"}),w=C[mh(e,s,o??y.default,C,0,O,d)],w=Ls(x,w)}else if(Gt in y){const{anyOf:C,...x}=y;if(C.length===0)return;const O=Qi(y);w=C[mh(e,s,o??y.default,C,0,O,d)],w=Ls(x,w)}if(w)return Da(e,w,{rootSchema:s,includeUndefinedValues:l,_recurseList:v,experimental_defaultFormStateBehavior:T,experimental_customMergeAllOf:d,parentDefaults:_,rawFormData:o??b,required:h,shouldMergeDefaultsIntoFormData:p,initialDefaultsGenerated:g});_===void 0&&(_=y.default);const E=RM(e,y,n,_);let S=E??_;if(p){const{arrayMinItems:C={}}=u||{},{mergeExtraDefaults:x}=C,O=Ule(e,y,s,o,u,d);(!Kt(o)||Za in y)&&(S=gh(S,O,x,!0))}return S}function Ule(e,t,n,r,o,s){const l=!G$(t)&&EE(e,t,n,s);let c=r;if(l){const d=Gu(t);c=d?.some(p=>An(p.value,r))?r:void 0}return t[li]&&o?.constAsDefaults==="always"&&(c=t.const),c}function Vle(e,t,{rawFormData:n,rootSchema:r={},includeUndefinedValues:o=!1,_recurseList:s=[],experimental_defaultFormStateBehavior:l=void 0,experimental_customMergeAllOf:c=void 0,required:u,shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:h}={},p){{const g=Kt(n)?n:{},b=t,y=l?.allOf==="populateDefaults"&&Za in b?eo(e,b,r,g,c):b,_=y[li],w=Object.keys(y.properties||{}).reduce((T,v)=>{var E;const S=Ie(y,[nn,v],{}),C=Kt(_)&&_[v]!==void 0,x=(Kt(S)&&li in S||C)&&l?.constAsDefaults!=="never"&&!Z$(S),O=Da(e,S,{rootSchema:r,_recurseList:s,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:c,includeUndefinedValues:o===!0,parentDefaults:Ie(p,[v]),rawFormData:Ie(g,[v]),required:(E=y.required)===null||E===void 0?void 0:E.includes(v),shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:h});return TM(T,v,O,o,u,y.required,l,x,S?.type==="null"),T},{});if(y.additionalProperties&&!h){const T=Kt(y.additionalProperties)?y.additionalProperties:{},v=new Set;Kt(p)&&Object.keys(p).filter(S=>!y.properties||!y.properties[S]).forEach(S=>v.add(S));const E=[];Object.keys(g).filter(S=>!y.properties||!y.properties[S]).forEach(S=>{v.add(S),E.push(S)}),v.forEach(S=>{var C;const x=Da(e,T,{rootSchema:r,_recurseList:s,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:c,includeUndefinedValues:o===!0,parentDefaults:Ie(p,[S]),rawFormData:Ie(g,[S]),required:(C=y.required)===null||C===void 0?void 0:C.includes(S),shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:h});TM(w,S,x,o,u,E)})}return W$(t,w)}}function qle(e,t,{rawFormData:n,rootSchema:r={},_recurseList:o=[],experimental_defaultFormStateBehavior:s=void 0,experimental_customMergeAllOf:l=void 0,required:c,requiredAsRoot:u=!1,shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:h}={},p){var g,b;const y=t,_=(g=s?.arrayMinItems)!==null&&g!==void 0?g:{},{populate:w,mergeExtraDefaults:T}=_,v=w==="never",E=w==="requiredOnly",S=w==="all"||!v&&!E,C=(b=_?.computeSkipPopulate)!==null&&b!==void 0?b:(()=>!1),O=s?.emptyObjectFields==="skipEmptyDefaults"?void 0:[];if(Array.isArray(p)&&(p=p.map((I,q)=>{const G=G1(y,Zu.Fallback,q);return Da(e,G,{rootSchema:r,_recurseList:o,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:l,parentDefaults:I,required:c,shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:h})})),Array.isArray(n)){const I=G1(y);if(v)p=n;else{const q=n.map((ee,J)=>Da(e,I,{rootSchema:r,_recurseList:o,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:l,rawFormData:ee,parentDefaults:Ie(p,[J]),required:c,shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:h}));p=gh(p,q,(E&&c||S)&&T)}}if((Kt(y)&&li in y&&s?.constAsDefaults!=="never")===!1){if(v)return p??O;if(E&&!c)return p||void 0}let P;const z=Array.isArray(p)?p.length:0;if(!y.minItems||CE(e,y,r,l)||C(e,y,r)||y.minItems<=z)P=p||!c&&!u?p:O;else{const I=p||[],q=G1(y,Zu.Invert),G=q.default,ee=Array.from({length:y.minItems-z},()=>Da(e,q,{parentDefaults:G,rootSchema:r,_recurseList:o,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:l,required:c,shouldMergeDefaultsIntoFormData:d}));P=I.concat(ee)}return W$(t,P)}function RM(e,t,n={},r){switch(Ci(t)){case"object":return Vle(e,t,n,r);case"array":return qle(e,t,n,r)}}function Y$(e,t,n,r,o=!1,s,l,c){if(!Kt(t))throw new Error("Invalid schema: "+t);const u=eo(e,t,r,n,l),d=Da(e,u,{rootSchema:r,includeUndefinedValues:o,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:l,rawFormData:n,shouldMergeDefaultsIntoFormData:!0,initialDefaultsGenerated:c,requiredAsRoot:!0});if(u.type!=="object"&&Kt(u.default))return{...d,...n};if(Kt(n)||Array.isArray(n)){const{mergeDefaultsIntoFormData:h}=s||{};return gh(d,n,!0,h==="useDefaultIfFormDataUndefined",!0)}return d}function X$(e={}){return"widget"in ct(e)&&ct(e).widget!=="hidden"}function Q$(e,t,n={},r,o){if(n[bE]==="files")return!0;if(t.items){const s=eo(e,t.items,r,void 0,o);return s.type==="string"&&s.format==="data-url"}return!1}function Ble(e,t,n={},r,o,s){const l=ct(n,o),{label:c=!0}=l;let u=!!c;if(u){const d=Ci(t),h=Ie(t,$s,!1);d==="array"&&(u=h||CE(e,t,r,s)||Q$(e,t,n,r,s)||X$(n)),d==="object"&&(u=h),d==="boolean"&&n&&!n[bE]&&(u=!1),n&&n[Yae]&&(u=!1)}return u}const ru=Symbol("no Value");function Ww(e,t,n,r,o={},s){let l;if(Vt(n,nn)){const c={};if(Vt(r,nn)){const h=Ie(r,nn,{});Object.keys(h).forEach(p=>{Vt(o,p)&&(c[p]=void 0)})}const u=Object.keys(Ie(n,nn,{})),d={};u.forEach(h=>{const p=Ie(o,h);let g=Ie(r,[nn,h],{}),b=Ie(n,[nn,h],{});Vt(g,In)&&(g=eo(e,g,t,p,s)),Vt(b,In)&&(b=eo(e,b,t,p,s));const y=Ie(g,"type"),_=Ie(b,"type");if(!y||y===_)if(Vt(c,h)&&delete c[h],_==="object"||_==="array"&&Array.isArray(p)){const w=Ww(e,t,b,g,p,s);(w!==void 0||_==="array")&&(d[h]=w)}else{const w=Ie(b,"default",ru),T=Ie(g,"default",ru);w!==ru&&w!==p&&(T===p?c[h]=w:Ie(b,"readOnly")===!0&&(c[h]=void 0));const v=Ie(b,"const",ru),E=Ie(g,"const",ru);v!==ru&&v!==p&&(c[h]=E===p?v:void 0)}}),l={...typeof o=="string"||Array.isArray(o)?void 0:o,...c,...d}}else if(Ie(r,"type")==="array"&&Ie(n,"type")==="array"&&Array.isArray(o)){let c=Ie(r,"items"),u=Ie(n,"items");if(typeof c=="object"&&typeof u=="object"&&!Array.isArray(c)&&!Array.isArray(u)){Vt(c,In)&&(c=eo(e,c,t,o,s)),Vt(u,In)&&(u=eo(e,u,t,o,s));const d=Ie(c,"type"),h=Ie(u,"type");if(!d||d===h){const p=Ie(n,"maxItems",-1);h==="object"?l=o.reduce((g,b)=>{const y=Ww(e,t,u,c,b,s);return y!==void 0&&(p<0||g.length<p)&&g.push(y),g},[]):l=p>0&&o.length>p?o.slice(0,p):o}}else typeof c=="boolean"&&typeof u=="boolean"&&c===u&&(l=o)}return l}function zl(e,t,n,r,o,s=[],l){if(In in t||yE in t||Za in t){const u=eo(e,t,r,o,l);if(s.findIndex(h=>An(h,u))===-1)return zl(e,u,n,r,o,s.concat(u),l)}let c={[Lg]:n.replace(/^\./,"")};if(Mt in t||Gt in t){const u=Mt in t?t.oneOf:t.anyOf,d=Qi(t),h=mh(e,r,o,u,0,d,l),p=u[h];c={...c,...zl(e,p,n,r,o,s,l)}}if(xy in t&&t[xy]!==!1&&fn(c,vE,!0),Ku in t&&Array.isArray(o)){const{items:u,additionalItems:d}=t;Array.isArray(u)?o.forEach((h,p)=>{u[p]?c[p]=zl(e,u[p],`${n}.${p}`,r,h,s,l):d?c[p]=zl(e,d,`${n}.${p}`,r,h,s,l):console.warn(`Unable to generate path schema for "${n}.${p}". No schema defined for it`)}):o.forEach((h,p)=>{c[p]=zl(e,u,`${n}.${p}`,r,h,s,l)})}else if(nn in t)for(const u in t.properties){const d=Ie(t,[nn,u],{});c[u]=zl(e,d,`${n}.${u}`,r,Ie(o,[u]),s,l)}return c}function Hle(e,t,n="",r,o,s){return zl(e,t,n,r,o,void 0,s)}class Kle{constructor(t,n,r,o){n&&n[jd]===Fg?this.rootSchema=Gw(n,Ie(n,_n,"#")):this.rootSchema=n,this.validator=t,this.experimental_defaultFormStateBehavior=r,this.experimental_customMergeAllOf=o}getRootSchema(){return this.rootSchema}getValidator(){return this.validator}doesSchemaUtilsDiffer(t,n,r={},o){return!t||!n?!1:this.validator!==t||!An(this.rootSchema,n)||!An(this.experimental_defaultFormStateBehavior,r)||this.experimental_customMergeAllOf!==o}findFieldInSchema(t,n,r){return Ile(this.validator,this.rootSchema,t,n,r,this.experimental_customMergeAllOf)}findSelectedOptionInXxxOf(t,n,r,o){return Nd(this.validator,this.rootSchema,t,n,r,o,this.experimental_customMergeAllOf)}getDefaultFormState(t,n,r=!1,o){return Y$(this.validator,t,n,this.rootSchema,r,this.experimental_defaultFormStateBehavior,this.experimental_customMergeAllOf,o)}getDisplayLabel(t,n,r){return Ble(this.validator,t,n,this.rootSchema,r,this.experimental_customMergeAllOf)}getClosestMatchingOption(t,n,r,o){return mh(this.validator,this.rootSchema,t,n,r,o,this.experimental_customMergeAllOf)}getFirstMatchingOption(t,n,r){return xE(this.validator,t,n,this.rootSchema,r)}getFromSchema(t,n,r){return Vg(this.validator,this.rootSchema,t,n,r,this.experimental_customMergeAllOf)}isFilesArray(t,n){return Q$(this.validator,t,n,this.rootSchema,this.experimental_customMergeAllOf)}isMultiSelect(t){return CE(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}isSelect(t){return EE(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}retrieveSchema(t,n,r){return eo(this.validator,t,this.rootSchema,n,this.experimental_customMergeAllOf,r)}sanitizeDataForNewSchema(t,n,r){return Ww(this.validator,this.rootSchema,t,n,r,this.experimental_customMergeAllOf)}toPathSchema(t,n,r){return Hle(this.validator,t,n,this.rootSchema,r,this.experimental_customMergeAllOf)}}function Gle(e,t,n={},r){return new Kle(e,t,n,r)}function Zle(e){var t;if(e.indexOf("data:")===-1)throw new Error("File is invalid: URI must be a dataURI");const r=e.slice(5).split(";base64,");if(r.length!==2)throw new Error("File is invalid: dataURI must be base64");const[o,s]=r,[l,...c]=o.split(";"),u=l||"",d=decodeURI(((t=c.map(h=>h.split("=")).find(([h])=>h==="name"))===null||t===void 0?void 0:t[1])||"unknown");try{const h=atob(s),p=new Array(h.length);for(let b=0;b<h.length;b++)p[b]=h.charCodeAt(b);return{blob:new window.Blob([new Uint8Array(p)],{type:u}),name:d}}catch(h){throw new Error("File is invalid: "+h.message)}}function Ca(e,t){let n=String(e);for(;n.length<t;)n="0"+n;return n}function J$(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 J$(t,e).reverse();const n=[];for(let r=e;r<=t;r++)n.push({value:r,label:Ca(r,2)});return n}function OM(e,t){if(Object.is(e,t))return!0;if(e==null||t==null||typeof e!="object"||typeof t!="object")return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let o=0;o<n.length;o++){const s=n[o];if(!Object.prototype.hasOwnProperty.call(t,s)||!Object.is(e[s],t[s]))return!1}return!0}function Wle(e,t){let n=e;if(Array.isArray(t)){const r=n.split(/(%\d)/);t.forEach((o,s)=>{const l=r.findIndex(c=>c===`%${s+1}`);l>=0&&(r[l]=o)}),n=r.join("")}return n}function Yle(e,t){return Wle(e,t)}function Tr(e,t=[],n){if(Array.isArray(e))return e.map(s=>Tr(s,t)).filter(s=>s!==n);const r=e===""||e===null?-1:Number(e),o=t[r];return o?o.value:n}function eI(e,t,n=[]){const r=Tr(e,n);return Array.isArray(t)?t.filter(o=>!An(o,r)):An(r,t)?void 0:t}function Gh(e,t){return Array.isArray(t)?t.some(n=>An(n,e)):An(t,e)}function tI(e,t=[],n=!1){const r=t.map((o,s)=>Gh(o.value,e)?String(s):void 0).filter(o=>typeof o<"u");return n?r:r[0]}function nI(e,t,n=[]){const r=Tr(e,n);if(!ny(r)){const o=n.findIndex(c=>r===c.value),s=n.map(({value:c})=>c);return t.slice(0,o).concat(r,t.slice(o)).sort((c,u)=>+(s.indexOf(c)>s.indexOf(u)))}return t}class rI{constructor(t){this.errorSchema={},this.resetAllErrors(t)}get ErrorSchema(){return this.errorSchema}getOrCreateErrorBlock(t){let r=Array.isArray(t)&&t.length>0||typeof t=="string"?Ie(this.errorSchema,t):this.errorSchema;return!r&&t&&(r={},gK(this.errorSchema,t,r,Object)),r}resetAllErrors(t){return this.errorSchema=t?Dh(t):{},this}addErrors(t,n){const r=this.getOrCreateErrorBlock(n);let o=Ie(r,Hr);return Array.isArray(o)||(o=[],r[Hr]=o),Array.isArray(t)?fn(r,Hr,[...new Set([...o,...t])]):fn(r,Hr,[...new Set([...o,t])]),this}setErrors(t,n){const r=this.getOrCreateErrorBlock(n),o=Array.isArray(t)?[...new Set([...t])]:[t];return fn(r,Hr,o),this}clearErrors(t){const n=this.getOrCreateErrorBlock(t);return fn(n,Hr,[]),this}}function AM(e,t){const n=Ua(e),r=Ua(t);if(e===t||!n&&!r)return[];if(n&&!r)return ti(e);if(!n&&r)return ti(t);{const o=ti(dK(e,(l,c)=>!An(l,Ie(t,c)))),s=IH(ti(t),ti(e));return[...o,...s]}}function Xle(e,t,n=[1900,new Date().getFullYear()+2],r="YMD"){const{day:o,month:s,year:l,hour:c,minute:u,second:d}=e,h={type:"day",range:[1,31],value:o},p={type:"month",range:[1,12],value:s},g={type:"year",range:n,value:l},b=[];switch(r){case"MDY":b.push(p,h,g);break;case"DMY":b.push(h,p,g);break;default:b.push(g,p,h)}return t&&b.push({type:"hour",range:[0,23],value:c},{type:"minute",range:[0,59],value:u},{type:"second",range:[0,59],value:d}),b}function oI(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 iI(e,t,n={},r=!0){const o={type:t||"text",...oI(e)};return n.inputType?o.type=n.inputType:t||(e.type==="number"?(o.type="number",r&&o.step===void 0&&(o.step="any")):e.type==="integer"&&(o.type="number",o.step===void 0&&(o.step=1))),n.autocomplete&&(o.autoComplete=n.autocomplete),n.accept&&(o.accept=n.accept),o}const kM={props:{disabled:!1},submitText:"Submit",norender:!1};function sI(e={}){const t=ct(e);if(t&&t[_y]){const n=t[_y];return{...kM,...n}}return kM}function mt(e,t,n={}){const{templates:r}=t;if(e==="ButtonTemplates")return r[e];if(Object.hasOwn(n,e)&&typeof n[e]=="string"&&Object.hasOwn(r,n[e])){const o=n[e];return r[o]}return n[e]||r[e]}function TE(){if(typeof process>"u"||Ie(process,"env.NODE_ENV")!=="test")return{};const e=new Map;return new Proxy({},{get(t,n){return e.has(n)||e.set(n,ZP("test-id-")),e.get(n)}})}var Z1={exports:{}},un={};var MM;function Qle(){if(MM)return un;MM=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),b=Symbol.for("react.offscreen"),y;y=Symbol.for("react.module.reference");function _(w){if(typeof w=="object"&&w!==null){var T=w.$$typeof;switch(T){case e:switch(w=w.type,w){case n:case o:case r:case d:case h:return w;default:switch(w=w&&w.$$typeof,w){case c:case l:case u:case g:case p:case s:return w;default:return T}}case t:return T}}}return un.ContextConsumer=l,un.ContextProvider=s,un.Element=e,un.ForwardRef=u,un.Fragment=n,un.Lazy=g,un.Memo=p,un.Portal=t,un.Profiler=o,un.StrictMode=r,un.Suspense=d,un.SuspenseList=h,un.isAsyncMode=function(){return!1},un.isConcurrentMode=function(){return!1},un.isContextConsumer=function(w){return _(w)===l},un.isContextProvider=function(w){return _(w)===s},un.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===e},un.isForwardRef=function(w){return _(w)===u},un.isFragment=function(w){return _(w)===n},un.isLazy=function(w){return _(w)===g},un.isMemo=function(w){return _(w)===p},un.isPortal=function(w){return _(w)===t},un.isProfiler=function(w){return _(w)===o},un.isStrictMode=function(w){return _(w)===r},un.isSuspense=function(w){return _(w)===d},un.isSuspenseList=function(w){return _(w)===h},un.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===n||w===o||w===r||w===d||w===h||w===b||typeof w=="object"&&w!==null&&(w.$$typeof===g||w.$$typeof===p||w.$$typeof===s||w.$$typeof===l||w.$$typeof===u||w.$$typeof===y||w.getModuleId!==void 0)},un.typeOf=_,un}var jM;function Jle(){return jM||(jM=1,Z1.exports=Qle()),Z1.exports}var ece=Jle();const PM=ts(ece),W1={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 tce(e){let t=Ie(e,"MergedWidget");if(!t){const n=e.defaultProps&&e.defaultProps.options||{};t=({options:r,...o})=>j.jsx(e,{options:{...n,...r},...o}),fn(e,"MergedWidget",t)}return t}function Ji(e,t,n={}){const r=Ci(e);if(typeof t=="function"||t&&PM.isForwardRef(k.createElement(t))||PM.isMemo(t))return tce(t);if(typeof t!="string")throw new Error(`Unsupported widget definition: ${typeof t} in schema: ${JSON.stringify(e)}`);if(t in n){const o=n[t];return Ji(e,o,n)}if(typeof r=="string"){if(!(r in W1))throw new Error(`No widget for type '${r}' in schema: ${JSON.stringify(e)}`);if(t in W1[r]){const o=n[W1[r][t]];return Ji(e,o,n)}}throw new Error(`No widget '${t}' for type '${r}' in schema: ${JSON.stringify(e)}`)}function nce(e){let t=0;for(let n=0;n<e.length;n+=1){const r=e.charCodeAt(n);t=(t<<5)-t+r,t=t&t}return t.toString(16)}function rce(e){const t=new Set;return JSON.stringify(e,(n,r)=>(t.add(n),r)),JSON.stringify(e,Array.from(t).sort())}function Bi(e){return nce(rce(e))}function oce(e){return Bi(e)}function ice(e,t,n={}){try{return Ji(e,t,n),!0}catch(r){const o=r;if(o.message&&(o.message.startsWith("No widget")||o.message.startsWith("Unsupported widget")))return!1;throw r}}function hc(e,t){return`${Va(e)?e:e[_n]}__${t}`}function pc(e){return hc(e,"description")}function RE(e){return hc(e,"error")}function vh(e){return hc(e,"examples")}function OE(e){return hc(e,"help")}function S0(e){return hc(e,"title")}function wo(e,t=!1){const n=t?` ${vh(e)}`:"";return`${RE(e)} ${pc(e)} ${OE(e)}${n}`}function Kl(e,t){return`${e}-${t}`}function Hi(e,t){return hc(e,t)}function Y1(e,t){return hc(e,`optional${t}`)}function vf(e){return!ny(e)&&(!Zt(e)||Array.isArray(e)||!vr(e))}function sce(e,t){const{rootSchema:n,schemaUtils:r}=e;if(ja(t,n))return!0;if(In in n){const o=r.retrieveSchema(n);return ja(t,o)}return!1}function aI(e,t,n){return t?n:e}function ace(e){return e?new Date(e).toJSON():void 0}function AE(e,t,n){const r=[Wae];return Vt(e,pM)&&r.unshift(pM),Ie(e,[...r,t],n)}function lce(e,t){if(!Array.isArray(t))return e;const n=h=>h.reduce((p,g)=>(p[g]=!0,p),{}),r=h=>h.length>1?`properties '${h.join("', '")}'`:`property '${h[0]}'`,o=n(e),s=t.filter(h=>h==="*"||o[h]),l=n(s),c=e.filter(h=>!l[h]),u=s.indexOf("*");if(u===-1){if(c.length)throw new Error(`uiSchema order list does not contain ${r(c)}`);return s}if(u!==s.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");const d=[...s];return d.splice(u,1,...c),d}function X1(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 n=new Date(e);if(Number.isNaN(n.getTime()))throw new Error("Unable to parse date "+e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:t?n.getUTCHours():0,minute:t?n.getUTCMinutes():0,second:t?n.getUTCSeconds():0}}function Hd(e){if(e.const||e.enum&&e.enum.length===1&&e.enum[0]===!0)return!0;if(e.anyOf&&e.anyOf.length===1)return Hd(e.anyOf[0]);if(e.oneOf&&e.oneOf.length===1)return Hd(e.oneOf[0]);if(e.allOf){const t=n=>Hd(n);return e.allOf.some(t)}return!1}function lI(e,t,n,r="customDeep"){if(r==="always")return!0;if(r==="shallow"){const{props:l,state:c}=e;return!OM(l,t)||!OM(c,n)}const{props:o,state:s}=e;return!An(o,t)||!An(s,n)}function NM(e){const t=GP(e.map(n=>Zt(n)?Ci(n):void 0).flat().filter(n=>n!==void 0));return t.length===1?t[0]:t}function Zh(e,t,n,r){const{enableOptionalDataFieldForType:o=[]}=ct(r,e.globalUiOptions);let s;return Gt in t&&Array.isArray(t[Gt])?s=NM(t[Gt]):Mt in t&&Array.isArray(t[Mt])?s=NM(t[Mt]):s=Ci(t),!sce(e,t)&&!n&&!!s&&!Array.isArray(s)&&!!o.find(l=>l===s)}function DM(e,t=!0){const{year:n,month:r,day:o,hour:s=0,minute:l=0,second:c=0}=e,u=Date.UTC(n,r-1,o,s,l,c),d=new Date(u).toJSON();return t?d:d.slice(0,10)}function kE(e,t=[]){if(!e)return[];let n=[];return Hr in e&&(n=n.concat(e[Hr].map(r=>{const o=`.${t.join(".")}`;return{property:o,message:r,stack:`${o} ${r}`}}))),Object.keys(e).reduce((r,o)=>{if(o!==Hr){const s=e[o];Ua(s)&&(r=r.concat(kE(s,[...t,o])))}return r},n)}function cce(e){const t=new rI;return e.length&&e.forEach(n=>{const{property:r,message:o}=n,s=r==="."?[]:HP(r);s.length>0&&s[0]===""&&s.splice(0,1),o&&t.addErrors(o,s)}),t.ErrorSchema}function ci(e,t,n,r){const o=Array.isArray(n)?n:n?.path,s=e===""?[]:[e],l=o?o.concat(...s):s,c=[t.idPrefix,...l].join(t.idSeparator);let u;return t.nameGenerator&&l.length>0&&(u=t.nameGenerator(l,t.idPrefix,r)),{path:l,[_n]:c,...u!==void 0&&{name:u}}}function cI(e){return Object.keys(e).reduce((t,n)=>{if(n==="addError")return t;{const r=e[n];return Ua(r)?{...t,[n]:cI(r)}:{...t,[n]:r}}},{})}function uce(e){return Object.values(e).every(t=>t!==-1)}function fce(e){const{className:t="form-control",type:n,range:r,value:o,select:s,rootId:l,name:c,disabled:u,readonly:d,autofocus:h,registry:p,onBlur:g,onFocus:b}=e,y=`${l}_${n}`,{SelectWidget:_}=p.widgets,w=k.useCallback(T=>s(n,T),[s,n]);return j.jsx(_,{schema:{type:"integer"},id:y,name:c,className:t,options:{enumOptions:J$(r[0],r[1])},placeholder:n,value:o,disabled:u,readonly:d,autofocus:h,onChange:w,onBlur:g,onFocus:b,registry:p,label:"","aria-describedby":wo(l)})}function dce(e){const{time:t=!1,disabled:n=!1,readonly:r=!1,options:o,onChange:s,value:l}=e,[c,u]=k.useState(X1(l,t));k.useEffect(()=>{u(X1(l,t))},[t,l]);const d=k.useCallback((b,y)=>{const _={...c,[b]:typeof y>"u"?-1:y};uce(_)?s(DM(_,t)):u(_)},[c,s,t]),h=k.useCallback(b=>{b.preventDefault(),!(n||r)&&s(void 0)},[n,r,s]),p=k.useCallback(b=>{if(b.preventDefault(),n||r)return;const y=X1(new Date().toJSON(),t);s(DM(y,t))},[n,r,t,s]);return{elements:k.useMemo(()=>Xle(c,t,o.yearsRange,o.format),[c,t,o.yearsRange,o.format]),handleChange:d,handleClear:h,handleSetNow:p}}function mc(e){const t=k.useRef(e);return ja(e,t.current)||(t.current=e),t.current}function hce(e,t){return e.replace(";base64",`;name=${encodeURIComponent(t)};base64`)}function pce(e){const{name:t,size:n,type:r}=e;return new Promise((o,s)=>{const l=new window.FileReader;l.onerror=s,l.onload=c=>{var u;typeof((u=c.target)===null||u===void 0?void 0:u.result)=="string"?o({dataURL:hce(c.target.result,t),name:t,size:n,type:r}):o({dataURL:null,name:t,size:n,type:r})},l.readAsDataURL(e)})}function mce(e){return Promise.all(Array.from(e).map(pce))}function $M(e){return e.reduce((t,n)=>{if(!n)return t;try{const{blob:r,name:o}=Zle(n);return[...t,{dataURL:n,name:o,size:r.size,type:r.type}]}catch{return t}},[])}function gce(e,t,n=!1){const r=k.useMemo(()=>n&&e?Array.isArray(e)?e:[e]:[],[e,n]),o=k.useMemo(()=>Array.isArray(e)?$M(e):$M([e||""]),[e]),s=k.useCallback(c=>{mce(c).then(u=>{const d=u.map(h=>h.dataURL||null);t(n?r.concat(...d):d[0])})},[r,n,t]),l=k.useCallback(c=>{if(n){const u=r.filter((d,h)=>h!==c);t(u)}else t(void 0)},[r,n,t]);return{filesInfo:o,handleChange:s,handleRemove:l}}function yce(e){if(!e)return"";const t=new Date(e),n=Ca(t.getFullYear(),4),r=Ca(t.getMonth()+1,2),o=Ca(t.getDate(),2),s=Ca(t.getHours(),2),l=Ca(t.getMinutes(),2),c=Ca(t.getSeconds(),2),u=Ca(t.getMilliseconds(),3);return`${n}-${r}-${o}T${s}:${l}:${c}.${u}`}function qg(e,t,n=!1){if(!t)return e;const{errors:r,errorSchema:o}=e;let s=kE(t),l=t;return vr(o)||(l=yh(o,t,n?"preventDuplicates":!0),s=[...r].concat(s)),{errorSchema:l,errors:s}}function vce(e){for(const t in e){const n=e,r=n[t];t===In&&typeof r=="string"&&r.startsWith("#")?n[t]=P$+r:n[t]=ME(r)}return e}function bce(e){for(let t=0;t<e.length;t++)e[t]=ME(e[t]);return e}function ME(e){return Array.isArray(e)?bce([...e]):Zt(e)?vce({...e}):e}var Dt;(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.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)"})(Dt||(Dt={}));function Yw(){return ZP("rjsf-array-item-")}function IM(e){return Array.isArray(e)?e.map(t=>({key:Yw(),item:t})):[]}function uI(e){return Array.isArray(e)?e.map(t=>t.item):[]}function Sce(e){return Array.isArray(e.type)?!e.type.includes("null"):e.type!=="null"}function fI(e,t,n,r){let{addable:o}=ct(r,e.globalUiOptions);return o!==!1&&(t.maxItems!==void 0?o=n.length<t.maxItems:o=!0),o}function dI(e,t,n,r){if(typeof e.items=="function")try{return e.items(t,n,r)}catch(o){console.error(`Error executing dynamic uiSchema.items function for item at index ${n}:`,o);return}else return e.items}function wce(e,t){const{schemaUtils:n,globalFormOptions:r}=e;let o=t.items;return r.useFallbackUiForUnsupportedType&&!o?o={}:_E(t)&&Bae(t)&&(o=t.additionalItems),n.getDefaultFormState(o)}function xce(e){const{schema:t,fieldPathId:n,uiSchema:r,formData:o=[],disabled:s=!1,readonly:l=!1,autofocus:c=!1,required:u=!1,placeholder:d,onBlur:h,onFocus:p,registry:g,rawErrors:b,name:y,onSelectChange:_}=e,{widgets:w,schemaUtils:T,globalFormOptions:v,globalUiOptions:E}=g,S=T.retrieveSchema(t.items,o),C=Gu(S,r),{widget:x="select",title:O,...M}=ct(r,E),P=Ji(t,x,w),z=O??t.title??y,I=T.getDisplayLabel(t,r,E),q=mc(ci("",v,n,!0));return j.jsx(P,{id:q[_n],name:y,multiple:!0,onChange:_,onBlur:h,onFocus:p,options:{...M,enumOptions:C},schema:t,uiSchema:r,registry:g,value:o,disabled:s,readonly:l,required:u,label:z,hideLabel:!I,placeholder:d,autofocus:c,rawErrors:b,htmlName:q.name})}function _ce(e){const{schema:t,fieldPathId:n,uiSchema:r,disabled:o=!1,readonly:s=!1,autofocus:l=!1,required:c=!1,hideError:u,placeholder:d,onBlur:h,onFocus:p,formData:g=[],registry:b,rawErrors:y,name:_,onSelectChange:w}=e,{widgets:T,schemaUtils:v,globalFormOptions:E,globalUiOptions:S}=b,{widget:C,title:x,...O}=ct(r,S),M=Ji(t,C,T),P=x??t.title??_,z=v.getDisplayLabel(t,r,S),I=mc(ci("",E,n,!0));return j.jsx(M,{id:I[_n],name:_,multiple:!0,onChange:w,onBlur:h,onFocus:p,options:O,schema:t,uiSchema:r,registry:b,value:g,disabled:o,readonly:s,hideError:u,required:c,label:P,hideLabel:!z,placeholder:d,autofocus:l,rawErrors:y,htmlName:I.name})}function Ece(e){const{schema:t,uiSchema:n,fieldPathId:r,name:o,disabled:s=!1,readonly:l=!1,autofocus:c=!1,required:u=!1,onBlur:d,onFocus:h,registry:p,formData:g=[],rawErrors:b,onSelectChange:y}=e,{widgets:_,schemaUtils:w,globalFormOptions:T,globalUiOptions:v}=p,{widget:E="files",title:S,...C}=ct(n,v),x=Ji(t,E,_),O=S??t.title??o,M=w.getDisplayLabel(t,n,v),P=mc(ci("",T,r,!0));return j.jsx(x,{options:C,id:P[_n],name:o,multiple:!0,onChange:y,onBlur:d,onFocus:h,schema:t,uiSchema:n,value:g,disabled:s,readonly:l,required:u,registry:p,autofocus:c,rawErrors:b,label:O,hideLabel:!M,htmlName:P.name})}function hI(e){const{itemKey:t,index:n,name:r,disabled:o,hideError:s,readonly:l,registry:c,uiOptions:u,parentUiSchema:d,canAdd:h,canRemove:p=!0,canMoveUp:g,canMoveDown:b,itemSchema:y,itemData:_,itemUiSchema:w,itemFieldPathId:T,itemErrorSchema:v,autofocus:E,onBlur:S,onFocus:C,onChange:x,rawErrors:O,totalItems:M,title:P,handleAddItem:z,handleCopyItem:I,handleRemoveItem:q,handleReorderItems:G}=e,{schemaUtils:ee,fields:{ArraySchemaField:J,SchemaField:Z},globalUiOptions:H}=c,Y=mc(T),oe=J||Z,ne=mt("ArrayFieldItemTemplate",c,u),$=ee.getDisplayLabel(y,w,H),{description:V}=ct(w),U=!!V||!!y.description,{orderable:D=!0,removable:B=!0,copyable:te=!1}=u,re={moveUp:D&&g,moveDown:D&&b,copy:te&&h,remove:B&&p,toolbar:!1};re.toolbar=Object.keys(re).some(_e=>re[_e]);const le=k.useCallback(_e=>{z(_e,n+1)},[z,n]),ge=k.useCallback(_e=>{I(_e,n)},[I,n]),Me=k.useCallback(_e=>{q(_e,n)},[q,n]),Q=k.useCallback(_e=>{G(_e,n,n-1)},[G,n]),ie=k.useCallback(_e=>{G(_e,n,n+1)},[G,n]),de={children:j.jsx(oe,{name:r,title:P,index:n,schema:y,uiSchema:w,formData:_,errorSchema:v,fieldPathId:Y,required:Sce(y),onChange:x,onBlur:S,onFocus:C,registry:c,disabled:o,readonly:l,hideError:s,autofocus:E,rawErrors:O}),buttonsProps:{fieldPathId:Y,disabled:o,readonly:l,canAdd:h,hasCopy:re.copy,hasMoveUp:re.moveUp,hasMoveDown:re.moveDown,hasRemove:re.remove,index:n,totalItems:M,onAddItem:le,onCopyItem:ge,onRemoveItem:Me,onMoveUpItem:Q,onMoveDownItem:ie,registry:c,schema:y,uiSchema:w},itemKey:t,className:"rjsf-array-item",disabled:o,hasToolbar:re.toolbar,index:n,totalItems:M,readonly:l,registry:c,schema:y,uiSchema:w,parentUiSchema:d,displayLabel:$,hasDescription:U};return j.jsx(ne,{...de})}function Cce(e){const{schema:t,uiSchema:n={},errorSchema:r,fieldPathId:o,formData:s,name:l,title:c,disabled:u=!1,readonly:d=!1,autofocus:h=!1,required:p=!1,hideError:g=!1,registry:b,onBlur:y,onFocus:_,rawErrors:w,onChange:T,keyedFormData:v,handleAddItem:E,handleCopyItem:S,handleRemoveItem:C,handleReorderItems:x}=e,O=t.title||c||l,{schemaUtils:M,fields:P,formContext:z,globalFormOptions:I,globalUiOptions:q}=b,{OptionalDataControlsField:G}=P,ee=ct(n,q),J=Zt(t.items)?t.items:{},Z=M.retrieveSchema(J),H=uI(v),Y=Zh(b,t,p,n),oe=vf(s),ne=fI(b,t,H,n)&&(!Y||oe),$=oe?v:[],V=Y?" rjsf-optional-array-field":"",U=e.childFieldPathId??o,D=Y?j.jsx(G,{...e,fieldPathId:U}):void 0,B={canAdd:ne,items:$.map((re,le)=>{const{key:ge,item:Me}=re,Q=Me,ie=M.retrieveSchema(J,Q),de=r?r[le]:void 0,_e=ci(le,I,U),Te=dI(n,Me,le,z),we={itemKey:ge,index:le,name:l&&`${l}-${le}`,registry:b,uiOptions:ee,hideError:g,readonly:d,disabled:u,required:p,title:O?`${O}-${le+1}`:void 0,canAdd:ne,canMoveUp:le>0,canMoveDown:le<H.length-1,itemSchema:ie,itemFieldPathId:_e,itemErrorSchema:de,itemData:Q,itemUiSchema:Te,autofocus:h&&le===0,onBlur:y,onFocus:_,rawErrors:w,totalItems:v.length,handleAddItem:E,handleCopyItem:S,handleRemoveItem:C,handleReorderItems:x,onChange:T};return j.jsx(hI,{...we},ge)}),className:`rjsf-field rjsf-field-array rjsf-field-array-of-${Z.type}${V}`,disabled:u,fieldPathId:o,uiSchema:n,onAddClick:E,readonly:d,required:p,schema:t,title:O,formData:H,rawErrors:w,registry:b,optionalDataControl:D},te=mt("ArrayFieldTemplate",b,ee);return j.jsx(te,{...B})}function Tce(e){const{schema:t,uiSchema:n={},formData:r,errorSchema:o,fieldPathId:s,name:l,title:c,disabled:u=!1,readonly:d=!1,autofocus:h=!1,required:p=!1,hideError:g=!1,registry:b,onBlur:y,onFocus:_,rawErrors:w,keyedFormData:T,onChange:v,handleAddItem:E,handleCopyItem:S,handleRemoveItem:C,handleReorderItems:x}=e;let{formData:O=[]}=e;const M=t.title||c||l,{schemaUtils:P,fields:z,formContext:I,globalFormOptions:q,globalUiOptions:G}=b,ee=ct(n,G),{OptionalDataControlsField:J}=z,Z=Zh(b,t,p,n),H=vf(r),oe=(Zt(t.items)?t.items:[]).map((le,ge)=>P.retrieveSchema(le,O[ge])),ne=Zt(t.additionalItems)?P.retrieveSchema(t.additionalItems,r):null,$=e.childFieldPathId??s;O.length<oe.length&&(O=O.concat(new Array(oe.length-O.length)));const V=H?T:[],U=Z?" rjsf-optional-array-field":"",D=Z?j.jsx(J,{...e,fieldPathId:$}):void 0,B=fI(b,t,O,n)&&!!ne&&(!Z||H),te={canAdd:B,className:`rjsf-field rjsf-field-array rjsf-field-array-fixed-items${U}`,disabled:u,fieldPathId:s,formData:r,items:V.map((le,ge)=>{const{key:Me,item:Q}=le,ie=Q,de=ge>=oe.length,_e=(de&&Zt(t.additionalItems)?P.retrieveSchema(t.additionalItems,ie):oe[ge])||{},Te=ci(ge,q,$);let we;de?we=n.additionalItems:Array.isArray(n.items)?we=n.items[ge]:we=dI(n,Q,ge,I);const $e=o?o[ge]:void 0,Ze={index:ge,itemKey:Me,name:l&&`${l}-${ge}`,registry:b,uiOptions:ee,hideError:g,readonly:d,disabled:u,required:p,title:M?`${M}-${ge+1}`:void 0,canAdd:B,canRemove:de,canMoveUp:ge>=oe.length+1,canMoveDown:de&&ge<O.length-1,itemSchema:_e,itemData:ie,itemUiSchema:we,itemFieldPathId:Te,itemErrorSchema:$e,autofocus:h&&ge===0,onBlur:y,onFocus:_,rawErrors:w,totalItems:T.length,onChange:v,handleAddItem:E,handleCopyItem:S,handleRemoveItem:C,handleReorderItems:x};return j.jsx(hI,{...Ze},Me)}),onAddClick:E,readonly:d,required:p,registry:b,schema:t,uiSchema:n,title:M,errorSchema:o,rawErrors:w,optionalDataControl:D},re=mt("ArrayFieldTemplate",b,ee);return j.jsx(re,{...te})}function Rce(e=[]){const t=k.useMemo(()=>Bi(e),[e]),[n,r]=k.useState(()=>({formDataHash:t,keyedFormData:IM(e)}));let{keyedFormData:o,formDataHash:s}=n;if(t!==s){const c=Array.isArray(e)?e:[],u=o||[];o=c.length===u.length?u.map((d,h)=>({key:d.key,item:c[h]})):IM(c),s=t,r({formDataHash:s,keyedFormData:o})}const l=k.useCallback(c=>{const u=uI(c),d=Bi(u);return r({formDataHash:d,keyedFormData:c}),u},[]);return{keyedFormData:o,updateKeyedFormData:l}}function Oce(e){const{schema:t,uiSchema:n,errorSchema:r,fieldPathId:o,registry:s,formData:l,onChange:c}=e,{globalFormOptions:u,schemaUtils:d,translateString:h}=s,{keyedFormData:p,updateKeyedFormData:g}=Rce(l),b=e.childFieldPathId??o,y=k.useCallback((x,O)=>{x&&x.preventDefault();let M;if(r){M={};for(const I in r){const q=parseInt(I);O===void 0||q<O?fn(M,[q],r[I]):q>=O&&fn(M,[q+1],r[I])}}const P={key:Yw(),item:wce(s,t)},z=[...p];O!==void 0?z.splice(O,0,P):z.push(P),c(g(z),b.path,M)},[p,s,t,c,g,r,b]),_=k.useCallback((x,O)=>{x&&x.preventDefault();let M;if(r){M={};for(const I in r){const q=parseInt(I);q<=O?fn(M,[q],r[I]):q>O&&fn(M,[q+1],r[I])}}const P={key:Yw(),item:Dh(p[O].item)},z=[...p];O!==void 0?z.splice(O+1,0,P):z.push(P),c(g(z),b.path,M)},[p,c,g,r,b]),w=k.useCallback((x,O)=>{x&&x.preventDefault();let M;if(r){M={};for(const z in r){const I=parseInt(z);I<O?fn(M,[I],r[z]):I>O&&fn(M,[I-1],r[z])}}const P=p.filter((z,I)=>I!==O);c(g(P),b.path,M)},[p,c,g,r,b]),T=k.useCallback((x,O,M)=>{x&&(x.preventDefault(),x.currentTarget.blur());let P;if(r){P={};for(const q in r){const G=parseInt(q);G==O?fn(P,[M],r[O]):G==M?fn(P,[O],r[M]):fn(P,[q],r[G])}}function z(){const q=p.slice();return q.splice(O,1),q.splice(M,0,p[O]),q}const I=z();c(g(I),b.path,P)},[p,c,g,r,b]),v=k.useCallback((x,O,M,P)=>{c(x===void 0?null:x,O,M,P)},[c]),E=k.useCallback(x=>{c(x,b.path,void 0,b?.[_n])},[c,b]),S={...e,formData:l,fieldPathId:b,onSelectChange:E},C={...e,handleAddItem:y,handleCopyItem:_,handleRemoveItem:w,handleReorderItems:T,keyedFormData:p,onChange:v};if(!(Ku in t)){if(!u.useFallbackUiForUnsupportedType){const O=ct(n),M=mt("UnsupportedFieldTemplate",s,O);return j.jsx(M,{schema:t,fieldPathId:o,reason:h(Dt.MissingItems),registry:s})}const x={...t,[Ku]:{type:void 0}};S.schema=x,C.schema=x}return d.isMultiSelect(S.schema)?j.jsx(xce,{...S}):X$(n)?j.jsx(_ce,{...S}):_E(S.schema)?j.jsx(Tce,{...C}):d.isFilesArray(S.schema,n)?j.jsx(Ece,{...S}):j.jsx(Cce,{...C})}function Ace(e){const{schema:t,name:n,uiSchema:r,fieldPathId:o,formData:s,registry:l,required:c,disabled:u,readonly:d,hideError:h,autofocus:p,title:g,onChange:b,onFocus:y,onBlur:_,rawErrors:w}=e,{title:T}=t,{widgets:v,translateString:E,globalUiOptions:S}=l,{widget:C="checkbox",title:x,label:O=!0,enumNames:M,...P}=ct(r,S),z=Ji(t,C,v),I=E(Dt.YesLabel),q=E(Dt.NoLabel);let G;const ee=x??T??g??n;if(Array.isArray(t.oneOf))G=Gu({oneOf:t.oneOf.map(Z=>{if(Zt(Z))return{...Z,title:Z.title||(Z.const===!0?I:q)}}).filter(Z=>Z)},r);else{const Z=t.enum??[!0,!1];!M&&Z.length===2&&Z.every(H=>typeof H=="boolean")?G=[{value:Z[0],label:Z[0]?I:q},{value:Z[1],label:Z[1]?I:q}]:G=Gu({enum:Z},r)}const J=k.useCallback((Z,H,Y)=>b(Z,o.path,H,Y),[b,o]);return j.jsx(z,{options:{...P,enumOptions:G},schema:t,uiSchema:r,id:o.$id,name:n,onChange:J,onFocus:y,onBlur:_,label:ee,hideLabel:!O,value:s,required:c,disabled:u,readonly:d,hideError:h,registry:l,autofocus:p,rawErrors:w,htmlName:o.name})}function kce(e){return{type:"string",enum:["string","number","boolean","object","array"],default:"string",title:e}}function Mce(e){const t=typeof e;return t==="string"||t==="number"||t==="boolean"?t:t==="object"?Array.isArray(e)?"array":"object":"string"}function jce(e,t){switch(t){case"string":return String(e);case"number":{const n=Number(e);return isNaN(n)?0:n}case"boolean":return!!e;default:return e}}function Pce(e){const{id:t,formData:n,displayLabel:r=!0,schema:o,name:s,uiSchema:l,required:c,disabled:u=!1,readonly:d=!1,onBlur:h,onFocus:p,registry:g,fieldPathId:b,onChange:y,errorSchema:_}=e,{translateString:w,fields:T,globalFormOptions:v}=g,[E,S]=k.useState(Mce(n)),C=ct(l),x=mc(ci("__internal_type_selector",v,b)),O=w(Dt.Type),M=k.useMemo(()=>kce(O),[O]),P=q=>{q!=null&&(S(q),y(jce(n,q),b.path,_,t))};if(!v.useFallbackUiForUnsupportedType){const{reason:q=w(Dt.UnknownFieldType,[String(o.type)])}=e,G=mt("UnsupportedFieldTemplate",g,C);return j.jsx(G,{schema:o,fieldPathId:b,reason:q,registry:g})}const z=mt("FallbackFieldTemplate",g,C),{SchemaField:I}=T;return j.jsx(z,{schema:o,registry:g,typeSelector:j.jsx(I,{fieldPathId:x,name:`${s}__fallback_type`,schema:M,formData:E,onChange:P,onBlur:h,onFocus:p,registry:g,hideLabel:!r,disabled:u,readonly:d,required:c},n?Bi(n):"__empty__"),schemaField:j.jsx(I,{...e,schema:{type:E,title:w(Dt.Value),...E==="object"&&{additionalProperties:!0}}})})}var Ki;(function(e){e.ROW="ui:row",e.COLUMN="ui:col",e.COLUMNS="ui:columns",e.CONDITION="ui:condition"})(Ki||(Ki={}));var Kd;(function(e){e.ALL="all",e.SOME="some",e.NONE="none"})(Kd||(Kd={}));const Nce=/^\$lookup=(.+)/,Q1="layoutGrid";function zM(e,t){return e??t}function Dce(e){return/^\d+?$/.test(e)}const $a=TE();function $ce(e,t,n,r,o){const s=Ie(n,[Hw],{}),l=Ie(n,e),c={...Ie(l,[Na],{}),...t,...s},u={...l};vr(c)||fn(u,[Na],c),vr(s)||fn(u,[Hw],s);let{readonly:d}=ct(u);return(o===!0||UP(d)&&r===!0)&&(d=!0,Vt(c,z1)?fn(u,[Na,z1],!0):fn(u,`ui:${z1}`,!0)),{fieldUiSchema:u,uiReadonly:d}}function Ice(e,t,n="$0m3tH1nG Un3xP3cT3d"){const r=KS([t]).sort(),o=KS([n]).sort();switch(e){case Kd.ALL:return ja(r,o);case Kd.SOME:return QO(r,o).length>0;case Kd.NONE:return QO(r,o).length===0;default:return!1}}function w0(e,t,n){let r={},o=e[t];if(Ua(o)){const{children:s,className:l,...c}=o;if(o=s,l){const d=l.split(" ").map(h=>AE(n,h,h)).join(" ");r={...c,className:d}}else r=c}if(!Array.isArray(o))throw new TypeError(`Expected array for "${t}" in ${JSON.stringify(e)}`);return{children:o,gridProps:r}}function LM(e,t,n){let r;if(Dce(n)&&e&&e?.type==="array"&&Vt(e,Ku)){const o=Number(n),s=e[Ku];Array.isArray(s)?o>s.length?r=zP(s):r=s[o]:r=s,t={[_n]:t[_n],path:[...t.path.slice(0,t.path.length-1),o]}}return{rawSchema:r,fieldPathId:t}}function zce(e,t,n,r,o){const{schemaUtils:s,globalFormOptions:l}=e;let c=n,u=o;const d=t.split("."),h=d.pop();let p=s.retrieveSchema(c,r),g=r,b=p.readOnly;d.forEach(w=>{if(u=ci(w,l,u),Vt(p,nn))c=Ie(p,[nn,w],{});else if(p&&(Vt(p,Mt)||Vt(p,Gt))){const T=Vt(p,Mt)?Mt:Gt,v=s.findSelectedOptionInXxxOf(p,w,T,g);c=Ie(v,[nn,w],{})}else{const T=LM(p,u,w);c=T.rawSchema??{},u=T.fieldPathId}g=Ie(g,w,{}),p=s.retrieveSchema(c,g),b=zM(p.readOnly,b)});let y,_=!1;if(vr(p)&&(p=void 0),p&&h){if(p&&(Vt(p,Mt)||Vt(p,Gt))){const T=Vt(p,Mt)?Mt:Gt;p=s.findSelectedOptionInXxxOf(p,h,T,g)}u=ci(h,l,u),_=p!==void 0&&Array.isArray(p.required)&&ZH(p.required,h);const w=LM(p,u,h);if(w.rawSchema?(p=w.rawSchema,u=w.fieldPathId):(p=Ie(p,[nn,h]),p=p&&s.retrieveSchema(p)),b=zM(p?.readOnly,b),p&&(Vt(p,Mt)||Vt(p,Gt))){const T=Vt(p,Mt)?Mt:Gt,v=Qi(p);y={options:p[T],hasDiscriminator:!!v}}}return{schema:p,isRequired:_,isReadonly:b,optionsInfo:y,fieldPathId:u}}function Lce(e,t){let n=e;return Va(n)&&(n=AE(t,n)),Ah(n)?n:null}function Fce(e,t){let n,r=null,o={},s;if(Va(t)||UP(t))n=t??"";else{const{name:l="",render:c,...u}=t;n=l,o=u,vr(o)||zH(o,(d,h)=>{if(Va(d)){const p=Nce.exec(d);if(Array.isArray(p)&&p.length>1){const g=p[1];o[h]=AE(e,g,g)}}}),r=Lce(c,e),!l&&r&&(s=j.jsx(r,{...u,"data-testid":$a.uiComponent}))}return{name:n,UIComponent:r,uiProps:o,rendered:s}}function x0(e){const{childrenLayoutGridSchemaId:t,...n}=e,{registry:r,schema:o,formData:s}=n,{schemaUtils:l}=r,c=l.retrieveSchema(o,s);return t.map(u=>k.createElement(jE,{...n,key:`layoutGrid-${Bi(u)}`,schema:c,layoutGridSchema:u}))}function Uce(e){const{layoutGridSchema:t,...n}=e,{formData:r,registry:o}=n,{children:s,gridProps:l}=w0(t,Ki.CONDITION,o),{operator:c,field:u="",value:d}=l,h=Ie(r,u,null);return Ice(c,h,d)?j.jsx(x0,{...n,childrenLayoutGridSchemaId:s}):null}function Vce(e){const{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:o}=n,{children:s,gridProps:l}=w0(t,Ki.COLUMN,r),c=ct(o),u=mt("GridTemplate",r,c);return j.jsx(u,{column:!0,"data-testid":$a.col,...l,children:j.jsx(x0,{...n,childrenLayoutGridSchemaId:s})})}function qce(e){const{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:o}=n,{children:s,gridProps:l}=w0(t,Ki.COLUMNS,r),c=ct(o),u=mt("GridTemplate",r,c);return s.map(d=>j.jsx(u,{column:!0,"data-testid":$a.col,...l,children:j.jsx(x0,{...n,childrenLayoutGridSchemaId:[d]})},`column-${Bi(d)}`))}function Bce(e){const{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:o}=n,{children:s,gridProps:l}=w0(t,Ki.ROW,r),c=ct(o),u=mt("GridTemplate",r,c);return j.jsx(u,{...l,"data-testid":$a.row,children:j.jsx(x0,{...n,childrenLayoutGridSchemaId:s})})}function Hce(e){const{gridSchema:t,schema:n,uiSchema:r,errorSchema:o,fieldPathId:s,onBlur:l,onFocus:c,formData:u,readonly:d,registry:h,layoutGridSchema:p,...g}=e,{onChange:b}=g,{fields:y}=h,{SchemaField:_,LayoutMultiSchemaField:w}=y,T=Fce(h,t),{name:v,UIComponent:E,uiProps:S}=T,{schema:C,isRequired:x,isReadonly:O,optionsInfo:M,fieldPathId:P}=zce(h,v,n,u,s),z=mc(P);if(T.rendered)return T.rendered;if(C){const I=M?.hasDiscriminator?w:_,{fieldUiSchema:q,uiReadonly:G}=$ce(v,S,r,O,d);return j.jsx(I,{"data-testid":M?.hasDiscriminator?$a.layoutMultiSchemaField:$a.field,...g,name:v,required:x,readonly:G,schema:C,uiSchema:q,errorSchema:Ie(o,v),fieldPathId:z,formData:Ie(u,v),onChange:b,onBlur:l,onFocus:c,options:M?.options,registry:h})}return E?j.jsx(E,{"data-testid":$a.uiComponent,...g,name:v,required:x,formData:u,readOnly:!!O||d,errorSchema:o,uiSchema:r,schema:n,fieldPathId:s,onBlur:l,onFocus:c,registry:h,...S}):null}function jE(e){const{uiSchema:t}=e;let{layoutGridSchema:n}=e;const r=ct(t);if(!n&&Q1 in r&&Zt(r[Q1])&&(n=r[Q1]),Zt(n)){if(Ki.ROW in n)return j.jsx(Bce,{...e,layoutGridSchema:n});if(Ki.COLUMN in n)return j.jsx(Vce,{...e,layoutGridSchema:n});if(Ki.COLUMNS in n)return j.jsx(qce,{...e,layoutGridSchema:n});if(Ki.CONDITION in n)return j.jsx(Uce,{...e,layoutGridSchema:n})}return j.jsx(Hce,{...e,gridSchema:n})}jE.TEST_IDS=$a;function Kce(e){const{fieldPathId:t,title:n,schema:r,uiSchema:o,required:s,registry:l,name:c}=e,u=ct(o,l.globalUiOptions),{title:d}=u,{title:h}=r,p=d||n||h||c;if(!p)return null;const g=mt("TitleFieldTemplate",l,u);return j.jsx(g,{id:S0(t),title:p,required:s,schema:r,uiSchema:o,registry:l})}function J1(e,t,n){const r="!@#!@$@#$!@$#";return e.map(({schema:s})=>s).find(s=>{const l=Ie(s,[nn,t]);return Ie(l,v0,Ie(l,li,r))===n})}function FM(e,t,n,r,o){const s=t.map(u=>n.retrieveSchema(u,o));let l=e;Vt(e,Mt)?l={...e,[Mt]:s}:Vt(e,Gt)&&(l={...e,[Gt]:s});const c=Gu(l,r);if(!c)throw new Error(`No enumOptions were computed from the schema ${JSON.stringify(l)}`);return c}function Gce(e){const{name:t,baseType:n,disabled:r=!1,formData:o,fieldPathId:s,onBlur:l,onChange:c,options:u,onFocus:d,registry:h,uiSchema:p,schema:g,autofocus:b,readonly:y,required:_,errorSchema:w,hideError:T=!1}=e,{widgets:v,schemaUtils:E,globalUiOptions:S}=h,[C,x]=k.useState(FM(g,u,E,p,o)),O=Ie(s,_n),M=Qi(g),P=mt("FieldErrorTemplate",h,u),z=mt("FieldTemplate",h,u),I=Bi(g),q=Bi(u),G=p?Bi(p):"",ee=o?Bi(o):"";k.useEffect(()=>{x(FM(g,u,E,p,o))},[I,q,E,G,ee]);const{widget:J=M?"radio":"select",title:Z="",placeholder:H="",optionsSchemaSelector:Y=M,hideError:oe,...ne}=ct(p);if(!Y)throw new Error("No selector field provided for the LayoutMultiSchemaField");const $=Ie(o,Y);let V=Ie(C[0]?.schema,[nn,Y],{});const U=J1(C,Y,$);V=V?.type?V:{...V,type:U?.type||n};const D=Ji(V,J,v),B=oe===void 0?T:!!oe,te=Ie(w,[Hr],[]),re=oh(w,[Hr]),le=E.getDisplayLabel(g,p,S),ge=ie=>{const de=J1(C,Y,ie),_e=J1(C,Y,$);let Te=E.sanitizeDataForNewSchema(de,_e,o);Te&&de&&(Te=E.getDefaultFormState(de,Te,"excludeObjectChildren")),Te&&fn(Te,Y,ie),c(Te,s.path,void 0,O)},Me={enumOptions:C,...ne},Q=!B&&te.length>0?j.jsx(P,{fieldPathId:s,schema:g,errors:te,registry:h}):void 0;return j.jsx(z,{id:O,schema:g,label:(Z||g.title)??"",disabled:r||Array.isArray(C)&&vr(C),uiSchema:p,required:_,readonly:!!y,registry:h,displayLabel:le,errors:Q,onChange:c,onKeyRename:Pg,onKeyRenameBlur:Pg,onRemoveProperty:Pg,children:j.jsx(D,{id:O,name:t,schema:g,label:(Z||g.title)??"",disabled:r||Array.isArray(C)&&vr(C),uiSchema:p,autofocus:b,readonly:y,required:_,registry:h,multiple:!1,rawErrors:te,hideError:B,hideLabel:!le,errorSchema:re,placeholder:H,onChange:ge,onBlur:l,onFocus:d,value:$,options:Me,htmlName:s.name})})}class UM extends k.Component{constructor(t){super(t);const{formData:n,options:r,registry:{schemaUtils:o}}=this.props,s=r.map(l=>o.retrieveSchema(l,n));this.state={retrievedOptions:s,selectedOption:this.getMatchingOption(0,n,s)}}componentDidUpdate(t,n){const{formData:r,options:o,fieldPathId:s}=this.props,{selectedOption:l}=this.state;let c=this.state;if(!An(t.options,o)){const{registry:{schemaUtils:u}}=this.props,d=o.map(h=>u.retrieveSchema(h,r));c={selectedOption:l,retrievedOptions:d}}if(!An(r,t.formData)&&s.$id===t.fieldPathId.$id){const{retrievedOptions:u}=c,d=this.getMatchingOption(l,r,u);n&&d!==l&&(c={selectedOption:d,retrievedOptions:u})}c!==this.state&&this.setState(c)}getMatchingOption(t,n,r){const{schema:o,registry:{schemaUtils:s}}=this.props,l=Qi(o);return s.getClosestMatchingOption(n,r,t,l)}onOptionChange=t=>{const{selectedOption:n,retrievedOptions:r}=this.state,{formData:o,onChange:s,registry:l,fieldPathId:c}=this.props,{schemaUtils:u}=l,d=t!==void 0?parseInt(t,10):-1;if(d===n)return;const h=d>=0?r[d]:void 0,p=n>=0?r[n]:void 0;let g=u.sanitizeDataForNewSchema(h,p,o);h&&(g=u.getDefaultFormState(h,g,"excludeObjectChildren")),this.setState({selectedOption:d},()=>{s(g,c.path,void 0,this.getFieldId())})};getFieldId(){const{fieldPathId:t,schema:n}=this.props;return`${t.$id}${n.oneOf?"__oneof_select":"__anyof_select"}`}render(){const{name:t,disabled:n=!1,errorSchema:r={},formData:o,onBlur:s,onFocus:l,readonly:c,required:u=!1,registry:d,schema:h,uiSchema:p}=this.props,{widgets:g,fields:b,translateString:y,globalUiOptions:_,schemaUtils:w}=d,{SchemaField:T}=b,v=mt("MultiSchemaFieldTemplate",d,_),E=Zh(d,h,u,p),S=vf(o),{selectedOption:C,retrievedOptions:x}=this.state,{widget:O="select",placeholder:M,autofocus:P,autocomplete:z,title:I=h.title,...q}=ct(p,_),G=Ji({type:"number"},O,g),ee=Ie(r,Hr,[]),J=oh(r,[Hr]),Z=w.getDisplayLabel(h,p,_),H=C>=0&&x[C]||null;let Y;if(H){const{required:te}=h;Y=te?Ls({required:te},H):H}let oe=[];Mt in h&&p&&Mt in p?Array.isArray(p[Mt])?oe=p[Mt]:console.warn(`uiSchema.oneOf is not an array for "${I||t}"`):Gt in h&&p&&Gt in p&&(Array.isArray(p[Gt])?oe=p[Gt]:console.warn(`uiSchema.anyOf is not an array for "${I||t}"`));let ne=p;C>=0&&oe.length>C&&(ne=oe[C]);const $=I?Dt.TitleOptionPrefix:Dt.OptionPrefix,V=I?[I]:[],U=x.map((te,re)=>{const{title:le=te.title}=ct(oe[re]);return{label:le||y($,V.concat(String(re+1))),value:re}}),D=!E||S?j.jsx(G,{id:this.getFieldId(),name:`${t}${h.oneOf?"__oneof_select":"__anyof_select"}`,schema:{type:"number",default:0},onChange:this.onOptionChange,onBlur:s,onFocus:l,disabled:n||vr(U),multiple:!1,rawErrors:ee,errorSchema:J,value:C>=0?C:void 0,options:{enumOptions:U,...q},registry:d,placeholder:M,autocomplete:z,autofocus:P,label:I??t,hideLabel:!Z,readonly:c}):void 0,B=Y&&Y.type!=="null"&&j.jsx(T,{...this.props,schema:Y,uiSchema:ne})||null;return j.jsx(v,{schema:h,registry:d,uiSchema:p,selector:D,optionSchemaField:B})}}const Zce=/\.([0-9]*0)*$/,Wce=/[0.]0*$/;function Yce(e){const{registry:t,onChange:n,formData:r,value:o}=e,[s,l]=k.useState(o),{StringField:c}=t.fields;let u=r;const d=k.useCallback((h,p,g,b)=>{l(h),`${h}`.charAt(0)==="."&&(h=`0${h}`);const y=typeof h=="string"&&h.match(Zce)?hM(h.replace(Wce,"")):hM(h);n(y,p,g,b)},[n]);if(typeof s=="string"&&typeof u=="number"){const h=new RegExp(`^(${String(u).replace(".","\\.")})?\\.?0*$`);s.match(h)&&(u=s)}return j.jsx(c,{...e,formData:u,onChange:d})}function Fi(){return Fi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fi.apply(null,arguments)}const fg=["strong","em","del","mark"],VM=[["**",fg[0]],["__",fg[0]],["~~",fg[2]],["==",fg[3]],["*","em"],["_","em"]];function Xce(e,t){for(var n=1,r=t+1;r<e.length&&n>0;)e[r]!=="\\"?(e[r]==="["&&n++,e[r]==="]"&&n--,r++):r+=2;if(n===0&&r<e.length&&(e[r]==="("||e[r]==="[")){var o=e[r]==="("?")":"]",s=1;for(r++;r<e.length&&s>0;)e[r]!=="\\"?(e[r]==="("&&o===")"&&s++,e[r]===o&&s--,r++):r+=2;if(s===0)return r}return-1}function Qce(e,t){if(!t||!t.inline&&!t.simple)return null;var n=e[0];if(n!=="*"&&n!=="_"&&n!=="~"&&n!=="=")return null;for(var r="",o=0,s="",l=0;l<6;l++){var c=VM[l][0];if(e.startsWith(c)&&e.length>=2*c.length){r=c,o=c.length,s=VM[l][1];break}}if(!r)return null;for(var u=o,d=!1,h=!1,p="",g=0,b="",y=!1,_="";u<e.length;){var w=e[u];if(y)b+=w,y=!1,_=w,u++;else if(w!=="\\")if(w!=="`"||g!==0){if(w==="["&&!d&&g===0){var T=Xce(e,u);if(T!==-1){b+=e.slice(u,T),u=T,_=e[T-1];continue}}if(h)b+=w,p?w===p&&(p=""):w==='"'||w==="'"?p=w:w===">"&&(h=!1),_=w,u++;else if(w!=="<"||d){if(w===`
61
- `&&_===`
62
- `&&!d&&g===0)return null;if(!d&&g===0){for(var v=0;u+v<e.length&&e[u+v]===r[0];)v++;if(v>=o&&(o!==1||r!=="*"&&r!=="_"||e[u-1]!==r&&e[u+1]!==r)){var E=[e.slice(0,u+v),s,b+e.slice(u+o,u+v)];return E.index=0,E.input=e,E}}b+=w,_=w,u++}else{var S=e[u+1],C=e.indexOf(">",u);if(C!==-1){var x=e.slice(u,C+1).endsWith("/>");S==="/"?g=Math.max(0,g-1):x||g++}h=!0,b+=w,_=w,u++}}else d=!d,b+=w,_=w,u++;else b+=w,y=!0,_=w,u++}return null}const Jce=["children","options"],qM=["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"}),BM={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},eue=["style","script","pre"],tue=["src","href","data","formAction","srcDoc","action"],nue=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,rue=/\n{2,}$/,HM=/^(\s*>[\s\S]*?)(?=\n\n|$)/,oue=/^ *> ?/gm,iue=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,sue=/^ {2,}\n/,aue=/^(?:([-*_])( *\1){2,}) *(?:\n *)+\n/,KM=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,GM=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,lue=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,cue=/^(?:\n *)*\n/,uue=/\r\n?/g,fue=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,due=/^\[\^([^\]]+)]/,hue=/\f/g,pue=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,mue=/^\[(x|\s)\]/,ZM=/^(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,WM=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,YM=/^([^\n]+)\n *(=|-)\2{2,} *\n/,PE=/^<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>/i;function gue(e){const t=PE.exec(e);if(!t)return null;const n=t[1],r=n.toLowerCase(),o=r.length+1;let s=t[0].length;e[s]===`
63
- `&&s++;const l=s;let c=s,u=1;const d=e.length;for(;u>0;){const p=e.indexOf("<",s);if(p===-1)return null;let g=-1,b=-1;if(e[p+1]==="/")b=p;else if(e[p+1]===r[0]||e[p+1]===n[0]){let y=!0;for(let _=0;_<r.length;_++){const w=e[p+1+_];if(w!==r[_]&&w!==n[_]){y=!1;break}}!y||e[p+o]!==" "&&e[p+o]!==">"||(g=p)}if(g!==-1||b!==-1)if(g!==-1&&(b===-1||g<b))s=g+o+1,u++;else{let y=b+2;for(;y<d;){const w=e[y];if(w!==" "&&w!==" "&&w!==`
64
- `&&w!=="\r")break;y++}if(y+r.length>d)return null;let _=!0;for(let w=0;w<r.length;w++){const T=e[y+w];if(T!==r[w]&&T!==n[w]){_=!1;break}}if(!_){s=y;continue}for(y+=r.length;y<d;){const w=e[y];if(w!==" "&&w!==" "&&w!==`
65
- `&&w!=="\r")break;y++}if(y>=d||e[y]!==">"){s=y;continue}c=b,s=y+1,u--}else s=p+1}let h=0;for(;s+h<d&&e[s+h]===`
66
- `;)h++;return[e.slice(0,s+h),n,t[2],e.slice(l,c)]}const yue=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,XM=/^<!--[\s\S]*?(?:-->)/,vue=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,Xw=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,bue=/^\{.*\}$/,Sue=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,wue=/^<([^ >]+[:@\/][^ >]+)>/,xue=/-([a-z])?/gi,QM=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,_ue=/^[^\n]+(?: \n|\n{2,})/,Eue=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,Cue=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,Tue=/^\[([^\]]*)\] ?\[([^\]]*)\]/,Rue=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,Oue=/\t/g,Aue=/(^ *\||\| *$)/g,kue=/^ *:-+: *$/,Mue=/^ *:-+ *$/,jue=/^ *-+: *$/,Pue=/^(:[a-zA-Z0-9-_]+:)/,Nue=/^\\([^0-9A-Za-z\s])/,Due=/\\([^0-9A-Za-z\s])/g,$ue=/^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/,Iue=/^\n+/,zue=/^([ \t]*)/,Lue=/(?:^|\n)( *)$/,NE="(?:\\d+\\.)",DE="(?:[*+-])";function pI(e){return"( *)("+(e===1?NE:DE)+") +"}const mI=pI(1),gI=pI(2);function yI(e){return RegExp("^"+(e===1?mI:gI))}const Fue=yI(1),Uue=yI(2);function vI(e){return RegExp("^"+(e===1?mI:gI)+"[^\\n]*(?:\\n(?!\\1"+(e===1?NE:DE)+" )[^\\n]*)*(\\n|$)","gm")}const Vue=vI(1),que=vI(2);function bI(e){const t=e===1?NE:DE;return RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const SI=bI(1),wI=bI(2);function JM(e,t){const n=t===1,r=n?SI:wI,o=n?Vue:que,s=n?Fue:Uue;return{t:l=>s.test(l),o:Aa(function(l,c){const u=Lue.exec(c.prevCapture);return u&&(c.list||!c.inline&&!c.simple)?r.exec(l=u[1]+l):null}),u:1,i(l,c,u){const d=n?+l[2]:void 0,h=l[0].replace(rue,`
67
- `).match(o),p=s.exec(h[0]),g=RegExp("^ {1,"+(p?p[0].length:0)+"}","gm");let b=!1;return{items:h.map(function(y,_){const w=y.replace(g,"").replace(s,""),T=_===h.length-1,v=Ii(w,`
68
-
69
- `)||T&&b;b=v;const E=u.inline,S=u.list;let C;u.list=!0,v?(u.inline=!1,C=Gd(w)+`
70
-
71
- `):(u.inline=!0,C=Gd(w));const x=c(C,u);return u.inline=E,u.list=S,x}),ordered:n,start:d}}}}const Bue=RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),Hue=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;function e3(e){return typeof e=="string"}function Gd(e){let t=e.length;for(;t>0&&e[t-1]<=" ";)t--;return e.slice(0,t)}function Qw(e,t){return e.startsWith(t)}function Ii(e,t){return e.indexOf(t)!==-1}function Kue(e,t,n){if(Array.isArray(n)){for(let r=0;r<n.length;r++)if(Qw(e,n[r]))return!0;return!1}return n(e,t)}function _d(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 Gue(e){return jue.test(e)?"right":kue.test(e)?"center":Mue.test(e)?"left":null}function t3(e,t,n,r){const o=n.inTable;n.inTable=!0;let s=[[]],l="";function c(){if(!l)return;const u=s[s.length-1];u.push.apply(u,t(l,n)),l=""}return e.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((u,d,h)=>{u.trim()==="|"&&(c(),r)?d!==0&&d!==h.length-1&&s.push([]):l+=u}),c(),n.inTable=o,s}function Zue(e,t,n){n.inline=!0;const r=e[2]?e[2].replace(Aue,"").split("|").map(Gue):[],o=e[3]?(function(l,c,u){return l.trim().split(`
72
- `).map(function(d){return t3(d,c,u,!0)})})(e[3],t,n):[],s=t3(e[1],t,n,!!o.length);return n.inline=!1,o.length?{align:r,cells:o,header:s,type:"25"}:{children:s,type:"21"}}function n3(e,t){return e.align[t]==null?{}:{textAlign:e.align[t]}}function Aa(e){return e.inline=1,e}function xa(e){return Aa(function(t,n){return n.inline?e.exec(t):null})}function dg(e){return Aa(function(t,n){return n.inline||n.simple?e.exec(t):null})}function js(e){return function(t,n){return n.inline||n.simple?null:e.exec(t)}}function r3(e){return Aa(function(t){return e.exec(t)})}const Wue=/(javascript|vbscript|data(?!:image)):/i;function Yue(e){try{const t=decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"");if(Wue.test(t))return null}catch{return null}return e}function zi(e){return e&&e.replace(Due,"$1")}function Bg(e,t,n){const r=n.inline||!1,o=n.simple||!1;n.inline=!0,n.simple=!0;const s=e(t,n);return n.inline=r,n.simple=o,s}function Xue(e,t,n){const r=n.inline||!1,o=n.simple||!1;n.inline=!1,n.simple=!0;const s=e(t,n);return n.inline=r,n.simple=o,s}function Que(e,t,n){const r=n.inline||!1;n.inline=!1;const o=e(t,n);return n.inline=r,o}const Jue=(e,t,n)=>({children:Bg(t,e[2],n)});function eS(){return{}}function efe(...e){return e.filter(Boolean).join(" ")}function tS(e,t,n){let r=e;const o=t.split(".");for(;o.length&&(r=r[o[0]],r!==void 0);)o.shift();return r||n}function nS(e,t,n,r){if(!t||!t.trim())return null;const o=t.match(nue);return o?o.reduce(function(s,l){const c=l.indexOf("=");if(c!==-1){const u=(function(p){return p.indexOf("-")!==-1&&p.match(vue)===null&&(p=p.replace(xue,function(g,b){return b.toUpperCase()})),p})(l.slice(0,c)).trim(),d=qM[u]||u;if(d==="ref")return s;const h=s[d]=(function(p,g,b,y){return g==="style"?(function(_){const w=[];if(!_)return w;let T="",v=0,E="";for(let C=0;C<_.length;C++){const x=_[C];if(x==='"'||x==="'")E?x===E&&(E="",v--):(E=x,v++);else if(x==="("&&T.endsWith("url"))v++;else if(x===")"&&v>0)v--;else if(x===";"&&v===0){const O=T.indexOf(":");O>0&&w.push([T.slice(0,O).trim(),T.slice(O+1).trim()]),T="";continue}T+=x}const S=T.indexOf(":");return S>0&&w.push([T.slice(0,S).trim(),T.slice(S+1).trim()]),w})(b).reduce(function(_,[w,T]){return _[w.replace(/(-[a-z])/g,v=>v[1].toUpperCase())]=y(T,p,w),_},{}):tue.indexOf(g)!==-1?y(zi(b),p,g):(b.match(bue)&&(b=zi(b.slice(1,b.length-1))),b==="true"||b!=="false"&&b)})(e,u,(function(p){const g=p[0];return(g==='"'||g==="'")&&p.length>=2&&p[p.length-1]===g?p.slice(1,-1):p})(l.slice(c+1).trim()),n);typeof h=="string"&&(PE.test(h)||Xw.test(h))&&(s[d]=r(h.trim()))}else l!=="style"&&(s[qM[l]||l]=!0);return s},{}):null}function o3(e,t){for(let n=0;n<e.length;n++)if(e[n].test(t))return!0;return!1}function tfe(e="",t={}){t.overrides=t.overrides||{},t.namedCodesToUnicode=t.namedCodesToUnicode?Fi({},BM,t.namedCodesToUnicode):BM;const n=t.slugify||_d,r=t.sanitizer||Yue,o=t.createElement||k.createElement,s=[HM,KM,GM,t.enforceAtxHeadings?WM:ZM,YM,QM,SI,wI],l=[...s,_ue,PE,XM,Xw];function c(y,_,...w){const T=tS(t.overrides,y+".props",{});return o((function(v,E){const S=tS(E,v);return S?typeof S=="function"||typeof S=="object"&&"render"in S?S:tS(E,v+".component",v):v})(y,t.overrides),Fi({},_,T,{className:efe(_?.className,T.className)||void 0}),...w)}function u(y){y=y.replace(pue,"");let _=!1;t.forceInline?_=!0:t.forceBlock||(_=Rue.test(y)===!1);const w=g(_?y:Gd(y).replace(Iue,"")+`
73
-
74
- `,{inline:_});if(t.ast)return w;const T=b(w);for(;e3(T[T.length-1])&&!T[T.length-1].trim();)T.pop();if(d.length&&T.push(c("footer",{key:"footer"},d.map(function(S){return c("div",{id:n(S.identifier,_d),key:S.identifier},S.identifier,b(g(S.footnote,{inline:!0})))}))),t.wrapper===null)return T;const v=t.wrapper||(_?"span":"div");let E;if(T.length>1||t.forceWrapper)E=T;else{if(T.length===1)return E=T[0],typeof E=="string"?c("span",{key:"outer"},E):E;E=null}return o(v,Fi({key:"outer"},t.wrapperProps),E)}const d=[],h={},p={0:{t:[">"],o:js(HM),u:1,i(y,_,w){const[,T,v]=y[0].replace(oue,"").match(iue);return{alert:T,children:_(v,w)}}},1:{t:[" "],o:xa(sue),u:1,i:eS},2:{t:function(y,_){if(_.inline||_.simple)return!1;var w=y[0];return w==="-"||w==="*"||w==="_"},o:js(aue),u:1,i:eS},3:{t:[" "],o:js(GM),u:0,i:y=>({lang:void 0,text:zi(Gd(y[0].replace(/^ {4}/gm,"")))})},4:{t:["```","~~~"],o:js(KM),u:0,i:y=>({attrs:nS("code",y[3]||"",r,u),lang:y[2]||void 0,text:y[4],type:"3"})},5:{t:["`"],o:dg(lue),u:3,i:y=>({text:zi(y[2])})},6:{t:["[^"],o:js(fue),u:0,i:y=>(d.push({footnote:y[2],identifier:y[1]}),{})},7:{t:["[^"],o:xa(due),u:1,i:y=>({target:"#"+n(y[1],_d),text:y[1]})},8:{t:["[ ]","[x]"],o:xa(mue),u:1,i:y=>({completed:y[1].toLowerCase()==="x"})},9:{t:["#"],o:js(t.enforceAtxHeadings?WM:ZM),u:1,i:(y,_,w)=>({children:Bg(_,y[2],w),id:n(y[2],_d),level:y[1].length})},10:{t:y=>{const _=y.indexOf(`
75
- `);return _>0&&_<y.length-1&&(y[_+1]==="="||y[_+1]==="-")},o:js(YM),u:1,i:(y,_,w)=>({children:Bg(_,y[1],w),level:y[2]==="="?1:2,type:"9"})},11:{t:["<"],o:Aa(gue),u:1,i(y,_,w){const[,T]=y[3].match(zue),v=RegExp("^"+T,"gm"),E=y[3].replace(v,""),S=o3(l,E)?Que:Bg,C=y[1].toLowerCase(),x=eue.indexOf(C)!==-1,O=(x?C:y[1]).trim(),M={attrs:nS(O,y[2],r,u),noInnerParse:x,tag:O};if(w.inAnchor=w.inAnchor||C==="a",x)M.text=y[3];else{const P=w.inHTML;w.inHTML=!0,M.children=S(_,E,w),w.inHTML=P}return w.inAnchor=!1,M}},13:{t:["<"],o:r3(Xw),u:1,i(y){const _=y[1].trim();return{attrs:nS(_,y[2]||"",r,u),tag:_}}},12:{t:["<!--"],o:r3(XM),u:1,i:()=>({})},14:{t:["!["],o:dg(Hue),u:1,i:y=>({alt:zi(y[1]),target:zi(y[2]),title:zi(y[3])})},15:{t:["["],o:xa(Bue),u:3,i:(y,_,w)=>({children:Xue(_,y[1],w),target:zi(y[2]),title:zi(y[3])})},16:{t:function(y,_){return!(!_.inline||_.inAnchor)&&y[0]==="<"&&(Ii(y,":")||Ii(y,"@")||Ii(y,"/"))},o:xa(wue),u:0,i(y){let _=y[1],w=!1;return Ii(_,"@")&&!Ii(_,"//")&&(w=!0,_=_.replace("mailto:","")),{children:[{text:_,type:"27"}],target:w?"mailto:"+_:_,type:"15"}}},17:{t:(y,_)=>!_.inAnchor&&!t.disableAutoLink&&Qw(y,"http"),o:xa(Sue),u:0,i:y=>({children:[{text:y[1],type:"27"}],target:y[1],title:void 0,type:"15"})},20:JM(0,1),30:JM(0,2),19:{t:[`
76
- `],o:js(cue),u:3,i:eS},21:{t:function(y,_){return!_.inline&&!_.simple},o:Aa(function(y,_){if(_.inline||_.simple||_.inHTML&&!Ii(y,`
77
-
78
- `)&&!Ii(_.prevCapture,`
79
-
80
- `))return null;let w="",T=0;for(;;){const E=y.indexOf(`
81
- `,T),S=y.slice(T,E===-1?void 0:E+1),C=y[T];if((C===">"||C==="#"||C==="|"||C==="`"||C==="~"||C==="*"||C==="-"||C==="_"||C===" ")&&o3(s,S)||(w+=S,E===-1||!S.trim()))break;T=E+1}const v=Gd(w);return v===""?null:[w,,v]}),u:3,i:Jue},22:{t:["["],o:xa(Eue),u:0,i:y=>(h[y[1]]={target:y[2],title:y[4]},{})},23:{t:["!["],o:dg(Cue),u:0,i:y=>({alt:y[1]?zi(y[1]):void 0,ref:y[2]})},24:{t:y=>y[0]==="["&&!Ii(y,"]("),o:xa(Tue),u:0,i:(y,_,w)=>({children:_(y[1],w),fallbackChildren:y[0],ref:y[2]})},25:{t:["|"],o:js(QM),u:1,i:Zue},27:{o:Aa(function(y,_){let w;return Qw(y,":")&&(w=Pue.exec(y)),w||$ue.exec(y)}),u:4,i(y){const _=y[0];return{text:Ii(_,"&")?_.replace(yue,(w,T)=>t.namedCodesToUnicode[T]||w):_}}},34:{t:["*","_","~","="],o:Aa(Qce),u:2,i:(y,_,w)=>({children:_(y[2],w),tag:y[1]})},28:{t:["\\"],o:dg(Nue),u:1,i:y=>({text:y[1],type:"27"})}};t.disableParsingRawHTML===!0&&(delete p[11],delete p[13]);const g=(function(y){var _=Object.keys(y);function w(T,v){var E=[];if(v.prevCapture=v.prevCapture||"",T.trim())for(;T;)for(var S=0;S<_.length;){var C=_[S],x=y[C];if(!x.t||Kue(T,v,x.t)){var O=x.o(T,v);if(O&&O[0]){T=T.substring(O[0].length);var M=x.i(O,w,v);v.prevCapture+=O[0],M.type||(M.type=C),E.push(M);break}S++}else S++}return v.prevCapture="",E}return _.sort(function(T,v){return y[T].u-y[v].u||(T<v?-1:1)}),function(T,v){return w((function(E){return E.replace(uue,`
82
- `).replace(hue,"").replace(Oue," ")})(T),v)}})(p),b=(function(y,_,w,T,v){function E(S){return Array.isArray(S)?S.map(C=>"text"in C?C.text:""):"text"in S?S.text:""}return function S(C,x={}){const O=(x.renderDepth||0)+1;if(O>2500)return E(C);x.renderDepth=O;try{if(Array.isArray(C)){const P=x.key,z=[];let I=!1;for(let q=0;q<C.length;q++){x.key=q;const G=S(C[q],x),ee=e3(G);ee&&I?z[z.length-1]+=G:G!==null&&z.push(G),I=ee}return x.key=P,x.renderDepth=O-1,z}const M=(function(P,z,I){const q=()=>(function(G,ee,J,Z,H,Y,oe){switch(G.type){case"0":{const ne={key:J.key};return G.alert&&(ne.className="markdown-alert-"+Y(G.alert.toLowerCase(),_d),G.children.unshift({attrs:{},children:[{type:"27",text:G.alert}],noInnerParse:!0,type:"11",tag:"header"})),Z("blockquote",ne,ee(G.children,J))}case"1":return Z("br",{key:J.key});case"2":return Z("hr",{key:J.key});case"3":return Z("pre",{key:J.key},Z("code",Fi({},G.attrs,{className:G.lang?"lang-"+G.lang:""}),G.text));case"5":return Z("code",{key:J.key},G.text);case"7":return Z("a",{key:J.key,href:H(G.target,"a","href")},Z("sup",{key:J.key},G.text));case"8":return Z("input",{checked:G.completed,key:J.key,readOnly:!0,type:"checkbox"});case"9":return Z("h"+G.level,{id:G.id,key:J.key},ee(G.children,J));case"11":return Z(G.tag,Fi({key:J.key},G.attrs),G.text||(G.children?ee(G.children,J):""));case"13":return Z(G.tag,Fi({},G.attrs,{key:J.key}));case"14":return Z("img",{key:J.key,alt:G.alt||void 0,title:G.title||void 0,src:H(G.target,"img","src")});case"15":return Z("a",{key:J.key,href:H(G.target,"a","href"),title:G.title},ee(G.children,J));case"23":return oe[G.ref]?Z("img",{key:J.key,alt:G.alt,src:H(oe[G.ref].target,"img","src"),title:oe[G.ref].title}):null;case"24":return oe[G.ref]?Z("a",{key:J.key,href:H(oe[G.ref].target,"a","href"),title:oe[G.ref].title},ee(G.children,J)):Z("span",{key:J.key},G.fallbackChildren);case"25":{const ne=G;return Z("table",{key:J.key},Z("thead",null,Z("tr",null,ne.header.map(function($,V){return Z("th",{key:V,style:n3(ne,V)},ee($,J))}))),Z("tbody",null,ne.cells.map(function($,V){return Z("tr",{key:V},$.map(function(U,D){return Z("td",{key:D,style:n3(ne,D)},ee(U,J))}))})))}case"27":return G.text;case"34":return Z(G.tag,{key:J.key},ee(G.children,J));case"20":case"30":return Z(G.ordered?"ol":"ul",{key:J.key,start:G.type==="20"?G.start:void 0},G.items.map(function(ne,$){return Z("li",{key:$},ee(ne,J))}));case"19":return`
83
- `;case"21":return Z("p",{key:J.key},ee(G.children,J));default:return null}})(P,z,I,_,w,T,v);return y?y(q,P,z,I):q()})(C,S,x);return x.renderDepth=O-1,M}catch(M){if(M instanceof RangeError&&M.message.includes("Maximum call stack"))return E(C);throw M}}})(t.renderRule,c,r,n,h);return u(e)}const Wh=e=>{let{children:t,options:n}=e,r=(function(o,s){if(o==null)return{};var l={};for(var c in o)if({}.hasOwnProperty.call(o,c)){if(s.indexOf(c)!==-1)continue;l[c]=o[c]}return l})(e,Jce);return tfe(t??"",Fi({},n,{wrapperProps:Fi({},n?.wrapperProps,r)}))},xI=Symbol("remove-this-key"),i3=Symbol("reset");function nfe(e,t){return Array.isArray(e.required)&&e.required.indexOf(t)!==-1}function rfe(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(Dt.NewStringDefault)}}function ofe(e){const{fieldPathId:t,schema:n,registry:r,uiSchema:o,errorSchema:s,formData:l,onChange:c,onBlur:u,onFocus:d,disabled:h,readonly:p,required:g,hideError:b,propertyName:y,handleKeyRename:_,handleRemoveProperty:w,addedByAdditionalProperties:T}=e,[v,E]=k.useState(!1),{globalFormOptions:S,fields:C}=r,{SchemaField:x}=C,O=mc(ci(y,S,t.path)),M=k.useCallback((q,G,ee,J)=>{q===void 0&&T&&(q=""),c(q,G,ee,J)},[c,T]),P=k.useCallback(q=>{y!==q&&E(!0),_(y,q)},[y,_]),z=k.useCallback(q=>{const{target:{value:G}}=q;P(G)},[P]),I=k.useCallback(()=>{w(y)},[y,w]);return j.jsx(x,{name:y,required:g,schema:n,uiSchema:o,errorSchema:s,fieldPathId:O,formData:l,wasPropertyKeyModified:v,onKeyRename:P,onKeyRenameBlur:z,onRemoveProperty:I,onChange:M,onBlur:u,onFocus:d,registry:r,disabled:h,readonly:p,hideError:b})}function ife(e){const{schema:t,uiSchema:n={},formData:r,errorSchema:o,fieldPathId:s,name:l,required:c=!1,disabled:u,readonly:d,hideError:h,onBlur:p,onFocus:g,onChange:b,registry:y,title:_}=e,{fields:w,schemaUtils:T,translateString:v,globalUiOptions:E}=y,{OptionalDataControlsField:S}=w,C=T.retrieveSchema(t,r,!0),x=ct(n,E),{properties:O={}}=C,M=e.childFieldPathId??s,P=x.title??C.title??_??l,z=x.description??C.description,I=Zh(y,C,c,n),q=vf(r);let G=[];const ee=k.useCallback(($,V)=>{const{duplicateKeySuffixSeparator:U="-"}=ct(n,E);let D=0,B=$;for(;Vt(V,B);)B=`${$}${U}${++D}`;return B},[n,E]),J=k.useCallback(()=>{if(!(C.additionalProperties||C.patternProperties))return;const{translateString:$}=y,V={...r},U=ee("newKey",V);if(C.patternProperties)fn(V,U,null);else{let D,B,te;if(Zt(C.additionalProperties)){D=C.additionalProperties.type,B=C.additionalProperties.const,te=C.additionalProperties.default;let le=C.additionalProperties;if(In in le){const{schemaUtils:ge}=y;le=ge.retrieveSchema({[In]:le[In]},r),D=le.type,B=le.const,te=le.default}!D&&(Gt in le||Mt in le)&&(D="object")}const re=B??te??rfe($,D);fn(V,U,re)}b(V,M.path)},[r,b,y,M,ee,C]),Z=k.useCallback(($,V)=>{if($!==V){const U=ee(V,r),D={...r},B={[$]:U},te=Object.keys(D).map(le=>({[B[le]||le]:D[le]})),re=Object.assign({},...te);b(re,M.path)}},[r,b,M,ee]),H=k.useCallback($=>{b(xI,[...M.path,$])},[b,M]);if(!I||q)try{const $=Object.keys(O);G=lce($,x.order)}catch($){return j.jsxs("div",{children:[j.jsx("p",{className:"rjsf-config-error",style:{color:"red"},children:j.jsx(Wh,{options:{disableParsingRawHTML:!0},children:v(Dt.InvalidObjectField,[l||"root",$.message])})}),j.jsx("pre",{children:JSON.stringify(C)})]})}const Y=mt("ObjectFieldTemplate",y,x),oe=I?j.jsx(S,{...e,fieldPathId:M,schema:C}):void 0,ne={title:x.label===!1?"":P,description:x.label===!1?void 0:z,properties:G.map($=>{const V=Vt(C,[nn,$,$s]),U=V?n.additionalProperties:n[$],D=ct(U).widget==="hidden";return{content:j.jsx(ofe,{propertyName:$,required:nfe(C,$),schema:Ie(C,[nn,$],{}),uiSchema:U,errorSchema:Ie(o,[$]),fieldPathId:M,formData:Ie(r,[$]),handleKeyRename:Z,handleRemoveProperty:H,addedByAdditionalProperties:V,onChange:b,onBlur:p,onFocus:g,registry:y,disabled:u,readonly:d,hideError:h},$),name:$,readonly:d,disabled:u,required:c,hidden:D}}),readonly:d,disabled:u,required:c,fieldPathId:s,uiSchema:n,errorSchema:o,schema:C,formData:r,registry:y,optionalDataControl:oe,className:I?"rjsf-optional-object-field":void 0};return j.jsx(Y,{...ne,onAddProperty:J})}function sfe(e){const{schema:t,uiSchema:n={},formData:r,disabled:o=!1,readonly:s=!1,onChange:l,errorSchema:c,fieldPathId:u,registry:d}=e,{globalUiOptions:h={},schemaUtils:p,translateString:g}=d,b=ct(n,h),y=mt("OptionalDataControlsTemplate",d,b),_=vf(r);let w,T,v,E;if(o||s)w=Y1(u,"Msg"),T=_?void 0:g(Dt.OptionalObjectEmptyMsg);else{const S=_?Dt.OptionalObjectRemove:Dt.OptionalObjectAdd;T=g(S),_?(w=Y1(u,"Remove"),E=()=>l(void 0,u.path,c)):(w=Y1(u,"Add"),v=()=>{let C=p.getDefaultFormState(t,r,"excludeObjectChildren");C===void 0&&(C=Ci(t)==="array"?[]:{}),l(C,u.path,c)})}return T&&j.jsx(y,{id:w,registry:d,schema:t,uiSchema:n,label:T,onAddClick:v,onRemoveClick:E})}const afe={array:"ArrayField",boolean:"BooleanField",integer:"NumberField",number:"NumberField",object:"ObjectField",string:"StringField",null:"NullField"};function lfe(e,t,n){const r=t.field,{fields:o}=n;if(typeof r=="function")return r;if(typeof r=="string"&&r in o)return o[r];const s=Ci(e),l=Array.isArray(s)?s[0]:s||"",c=e.$id;let u=afe[l];return c&&c in o&&(u=c),!u&&(e.anyOf||e.oneOf)?()=>null:u in o?o[u]:o.FallbackField}function cfe(e){const{schema:t,fieldPathId:n,uiSchema:r,formData:o,errorSchema:s,name:l,onChange:c,onKeyRename:u,onKeyRenameBlur:d,onRemoveProperty:h,required:p=!1,registry:g,wasPropertyKeyModified:b=!1}=e,{schemaUtils:y,globalFormOptions:_,globalUiOptions:w,fields:T}=g,{AnyOfField:v,OneOfField:E}=T,S=ct(r,w),C=mt("FieldTemplate",g,S),x=mt("DescriptionFieldTemplate",g,S),O=mt("FieldHelpTemplate",g,S),M=mt("FieldErrorTemplate",g,S),P=y.retrieveSchema(t,o),z=n[_n],I=k.useCallback((we,$e,Ze,ye)=>c(we,$e,Ze,ye||z),[z,c]),q=lfe(P,S,g),G=!!(S.disabled??e.disabled),ee=!!(S.readonly??(e.readonly||e.schema.readOnly||P.readOnly)),J=S.hideError,Z=J===void 0?e.hideError:!!J,H=!!(S.autofocus??e.autofocus);if(Object.keys(P).length===0)return null;let Y=y.getDisplayLabel(P,r,w);const oe=S.field&&S.fieldReplacesAnyOrOneOf===!0;let ne,$,V={fieldPathId:n};if((Gt in P||Mt in P)&&!oe&&!y.isSelect(P)){P[Gt]?(ne=v,$=P[Gt].map(Ze=>y.retrieveSchema(Zt(Ze)?Ze:{},o))):P[Mt]&&(ne=E,$=P[Mt].map(Ze=>y.retrieveSchema(Zt(Ze)?Ze:{},o)));const we=Zh(g,P,p,r),$e=vf(o);Y=Y&&(!we||$e),V={childFieldPathId:n,fieldPathId:ci("XxxOf",_,n)}}const{__errors:U,...D}=s||{},B=oh(r,["ui:classNames","classNames","ui:style"]);Na in B&&(B[Na]=oh(B[Na],["classNames","style"]));const te=j.jsx(q,{...e,onChange:I,...V,schema:P,uiSchema:B,disabled:G,readonly:ee,hideError:Z,autofocus:H,errorSchema:D,rawErrors:U}),re=n[_n];let le;b?le=l:le=$s in P?l:S.title||e.schema.title||P.title||e.title||l;const ge=S.description||e.schema.description||P.description||"",Me=S.help,Q=S.widget==="hidden",ie=["rjsf-field",`rjsf-field-${Ci(P)}`];!Z&&U&&U.length>0&&ie.push("rjsf-field-error"),S.classNames&&ie.push(S.classNames);const de=j.jsx(O,{help:Me,fieldPathId:n,schema:P,uiSchema:r,hasErrors:!Z&&U&&U.length>0,registry:g}),_e=Z||ne&&!y.isSelect(P)?void 0:j.jsx(M,{errors:U,errorSchema:s,fieldPathId:n,schema:P,uiSchema:r,registry:g}),Te={description:j.jsx(x,{id:pc(re),description:ge,schema:P,uiSchema:r,registry:g}),rawDescription:ge,help:de,rawHelp:typeof Me=="string"?Me:void 0,errors:_e,rawErrors:Z?void 0:U,id:re,label:le,hidden:Q,onChange:c,onKeyRename:u,onKeyRenameBlur:d,onRemoveProperty:h,required:p,disabled:G,readonly:ee,hideError:Z,displayLabel:Y,classNames:ie.join(" ").trim(),style:S.style,formData:o,schema:P,uiSchema:r,registry:g};return j.jsx(C,{...Te,children:j.jsxs(j.Fragment,{children:[te,ne&&j.jsx(ne,{name:l,disabled:G,readonly:ee,hideError:Z,errorSchema:s,formData:o,fieldPathId:n,onBlur:e.onBlur,onChange:e.onChange,onFocus:e.onFocus,options:$,registry:g,required:p,schema:P,uiSchema:r})]})})}class ufe extends k.Component{shouldComponentUpdate(t){const{registry:{globalFormOptions:n}}=this.props,{experimental_componentUpdateStrategy:r="customDeep"}=n;return lI(this,t,this.state,r)}render(){return j.jsx(cfe,{...this.props})}}function ffe(e){const{schema:t,name:n,uiSchema:r,fieldPathId:o,formData:s,required:l,disabled:c=!1,readonly:u=!1,autofocus:d=!1,onChange:h,onBlur:p,onFocus:g,registry:b,rawErrors:y,hideError:_,title:w}=e,{title:T,format:v}=t,{widgets:E,schemaUtils:S,globalUiOptions:C}=b,x=S.isSelect(t)?Gu(t,r):void 0;let O=x?"select":"text";v&&ice(t,v,E)&&(O=v);const{widget:M=O,placeholder:P="",title:z,...I}=ct(r),q=S.getDisplayLabel(t,r,C),G=z??w??T??n,ee=Ji(t,M,E),J=k.useCallback((Z,H,Y)=>h(Z,o.path,H,Y),[h,o]);return j.jsx(ee,{options:{...I,enumOptions:x},schema:t,uiSchema:r,id:o.$id,name:n,label:G,hideLabel:!q,hideError:_,value:s,onChange:J,onBlur:p,onFocus:g,required:l,disabled:c,readonly:u,autofocus:d,registry:b,placeholder:P,rawErrors:y,htmlName:o.name})}function dfe(e){const{formData:t,onChange:n,fieldPathId:r}=e;return k.useEffect(()=>{t===void 0&&n(null,r.path)},[r,t,n]),null}function hfe(){return{AnyOfField:UM,ArrayField:Oce,BooleanField:Ace,FallbackField:Pce,LayoutGridField:jE,LayoutHeaderField:Kce,LayoutMultiSchemaField:Gce,NumberField:Yce,ObjectField:ife,OneOfField:UM,OptionalDataControlsField:sfe,SchemaField:ufe,StringField:ffe,NullField:dfe}}function pfe(e){const{fieldPathId:t,description:n,registry:r,schema:o,uiSchema:s}=e,l=ct(s,r.globalUiOptions),{label:c=!0}=l;if(!n||!c)return null;const u=mt("DescriptionFieldTemplate",r,l);return j.jsx(u,{id:pc(t),description:n,schema:o,uiSchema:s,registry:r})}function mfe(e){const{children:t,className:n,buttonsProps:r,displayLabel:o,hasDescription:s,hasToolbar:l,registry:c,uiSchema:u}=e,d=ct(u),h=mt("ArrayFieldItemButtonsTemplate",c,d),p={flex:1,paddingLeft:6,paddingRight:6,fontWeight:"bold"},g=s?31:9,b={display:"flex",alignItems:o?"center":"baseline"},y={display:"flex",justifyContent:"flex-end",marginTop:o?`${g}px`:0};return j.jsxs("div",{className:n,style:b,children:[j.jsx("div",{className:l?"col-xs-9 col-md-10 col-xl-11":"col-xs-12",children:t}),l&&j.jsx("div",{className:"col-xs-3 col-md-2 col-xl-1 array-item-toolbox",children:j.jsx("div",{className:"btn-group",style:y,children:j.jsx(h,{...r,style:p})})})]})}function gfe(e){const{disabled:t,hasCopy:n,hasMoveDown:r,hasMoveUp:o,hasRemove:s,fieldPathId:l,onCopyItem:c,onRemoveItem:u,onMoveDownItem:d,onMoveUpItem:h,readonly:p,registry:g,uiSchema:b}=e,{CopyButton:y,MoveDownButton:_,MoveUpButton:w,RemoveButton:T}=g.templates.ButtonTemplates;return j.jsxs(j.Fragment,{children:[(o||r)&&j.jsx(w,{id:Hi(l,"moveUp"),className:"rjsf-array-item-move-up",disabled:t||p||!o,onClick:h,uiSchema:b,registry:g}),(o||r)&&j.jsx(_,{id:Hi(l,"moveDown"),className:"rjsf-array-item-move-down",disabled:t||p||!r,onClick:d,uiSchema:b,registry:g}),n&&j.jsx(y,{id:Hi(l,"copy"),className:"rjsf-array-item-copy",disabled:t||p,onClick:c,uiSchema:b,registry:g}),s&&j.jsx(T,{id:Hi(l,"remove"),className:"rjsf-array-item-remove",disabled:t||p,onClick:u,uiSchema:b,registry:g})]})}function yfe(e){const{canAdd:t,className:n,disabled:r,fieldPathId:o,uiSchema:s,items:l,optionalDataControl:c,onAddClick:u,readonly:d,registry:h,required:p,schema:g,title:b}=e,y=ct(s),_=mt("ArrayFieldDescriptionTemplate",h,y),w=mt("ArrayFieldTitleTemplate",h,y),T=!d&&!r,{ButtonTemplates:{AddButton:v}}=h.templates;return j.jsxs("fieldset",{className:n,id:o.$id,children:[j.jsx(w,{fieldPathId:o,title:y.title||b,required:p,schema:g,uiSchema:s,registry:h,optionalDataControl:T?c:void 0}),j.jsx(_,{fieldPathId:o,description:y.description||g.description,schema:g,uiSchema:s,registry:h}),T?void 0:c,j.jsx("div",{className:"row array-item-list",children:l}),t&&j.jsx(v,{id:Hi(o,"add"),className:"rjsf-array-item-add",onClick:u,disabled:r||d,uiSchema:s,registry:h})]})}function vfe(e){const{fieldPathId:t,title:n,schema:r,uiSchema:o,required:s,registry:l,optionalDataControl:c}=e,u=ct(o,l.globalUiOptions),{label:d=!0}=u;if(!n||!d)return null;const h=mt("TitleFieldTemplate",l,u);return j.jsx(h,{id:S0(t),title:n,required:s,schema:r,uiSchema:o,registry:l,optionalDataControl:c})}function bfe(e){const{id:t,name:n,htmlName:r,value:o,readonly:s,disabled:l,autofocus:c,onBlur:u,onFocus:d,onChange:h,onChangeOverride:p,options:g,schema:b,uiSchema:y,registry:_,rawErrors:w,type:T,hideLabel:v,hideError:E,...S}=e;if(!t)throw console.log("No id for",e),new Error(`no id for props ${JSON.stringify(e)}`);const C={...S,...iI(b,T,g)};let x;C.type==="number"||C.type==="integer"?x=o||o===0?o:"":x=o??"";const O=k.useCallback(({target:{value:z}})=>h(z===""?g.emptyValue:z),[h,g]),M=k.useCallback(({target:z})=>u(t,z&&z.value),[u,t]),P=k.useCallback(({target:z})=>d(t,z&&z.value),[d,t]);return j.jsxs(j.Fragment,{children:[j.jsx("input",{id:t,name:r||t,className:"form-control",readOnly:s,disabled:l,autoFocus:c,value:x,...C,list:b.examples?vh(t):void 0,onChange:p||O,onBlur:M,onFocus:P,"aria-describedby":wo(t,!!b.examples)}),Array.isArray(b.examples)&&j.jsx("datalist",{id:vh(t),children:b.examples.concat(b.default&&!b.examples.includes(b.default)?[b.default]:[]).map(z=>j.jsx("option",{value:z},z))},`datalist_${t}`)]})}function Sfe({uiSchema:e}){const{submitText:t,norender:n,props:r={}}=sI(e);return n?null:j.jsx("div",{children:j.jsx("button",{type:"submit",...r,className:`btn btn-info ${r.className||""}`,children:t})})}function tc(e){const{iconType:t="default",icon:n,className:r,uiSchema:o,registry:s,...l}=e;return j.jsx("button",{type:"button",className:`btn btn-${t} ${r}`,...l,children:j.jsx("i",{className:`glyphicon glyphicon-${n}`})})}function wfe(e){const{registry:{translateString:t}}=e;return j.jsx(tc,{title:t(Dt.CopyButton),...e,icon:"copy"})}function xfe(e){const{registry:{translateString:t}}=e;return j.jsx(tc,{title:t(Dt.MoveDownButton),...e,icon:"arrow-down"})}function _fe(e){const{registry:{translateString:t}}=e;return j.jsx(tc,{title:t(Dt.MoveUpButton),...e,icon:"arrow-up"})}function Efe(e){const{registry:{translateString:t}}=e;return j.jsx(tc,{title:t(Dt.RemoveButton),...e,iconType:"danger",icon:"remove"})}function Cfe({id:e,className:t,onClick:n,disabled:r,registry:o}){const{translateString:s}=o;return j.jsx("div",{className:"row",children:j.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:j.jsx(tc,{id:e,iconType:"info",icon:"plus",className:"btn-add col-xs-12",title:s(Dt.AddButton),onClick:n,disabled:r,registry:o})})})}function Tfe(){return{SubmitButton:Sfe,AddButton:Cfe,CopyButton:wfe,MoveDownButton:xfe,MoveUpButton:_fe,RemoveButton:Efe}}const _I=TE();function $E({description:e,registry:t,uiSchema:n={}}){const{globalUiOptions:r}=t;return ct(n,r).enableMarkdownInDescription&&typeof e=="string"?j.jsx(Wh,{options:{disableParsingRawHTML:!0},"data-testid":_I.markdown,children:e}):e}$E.TEST_IDS=_I;function Rfe(e){const{id:t,description:n,registry:r,uiSchema:o}=e;return n?j.jsx("div",{id:t,className:"field-description",children:j.jsx($E,{description:n,registry:r,uiSchema:o})}):null}function Ofe({errors:e,registry:t}){const{translateString:n}=t;return j.jsxs("div",{className:"panel panel-danger errors",children:[j.jsx("div",{className:"panel-heading",children:j.jsx("h3",{className:"panel-title",children:n(Dt.ErrorsLabel)})}),j.jsx("ul",{className:"list-group",children:e.map((r,o)=>j.jsx("li",{className:"list-group-item text-danger",children:r.stack},o))})]})}function Afe(e){const{schema:t,registry:n,typeSelector:r,schemaField:o}=e,s=mt("MultiSchemaFieldTemplate",n);return j.jsx(s,{selector:r,optionSchemaField:o,schema:t,registry:n})}const kfe="*";function EI(e){const{label:t,required:n,id:r}=e;return t?j.jsxs("label",{className:"control-label",htmlFor:r,children:[t,n&&j.jsx("span",{className:"required",children:kfe})]}):null}function Mfe(e){const{id:t,label:n,children:r,errors:o,help:s,description:l,hidden:c,required:u,displayLabel:d,registry:h,uiSchema:p}=e,g=ct(p),b=mt("WrapIfAdditionalTemplate",h,g);if(c)return j.jsx("div",{className:"hidden",children:r});const y=g.widget==="checkbox";return j.jsxs(b,{...e,children:[d&&!y&&j.jsx(EI,{label:n,required:u,id:t}),d&&l?l:null,r,o,s]})}function jfe(e){const{errors:t=[],fieldPathId:n}=e;if(t.length===0)return null;const r=RE(n);return j.jsx("div",{children:j.jsx("ul",{id:r,className:"error-detail bs-callout bs-callout-info",children:t.filter(o=>!!o).map((o,s)=>j.jsx("li",{className:"text-danger",children:o},s))})})}const CI=TE();function IE({help:e,registry:t,uiSchema:n={}}){const{globalUiOptions:r}=t;return ct(n,r).enableMarkdownInHelp&&typeof e=="string"?j.jsx(Wh,{options:{disableParsingRawHTML:!0},"data-testid":CI.markdown,children:e}):e}IE.TEST_IDS=CI;function Pfe(e){const{fieldPathId:t,help:n,uiSchema:r,registry:o}=e;return n?j.jsx("div",{id:OE(t),className:"help-block",children:j.jsx(IE,{help:n,registry:o,uiSchema:r})}):null}function Nfe(e){const{children:t,column:n,className:r,...o}=e;return j.jsx("div",{className:r,...o,children:t})}function Dfe(e){const{selector:t,optionSchemaField:n}=e;return j.jsxs("div",{className:"panel panel-default panel-body",children:[j.jsx("div",{className:"form-group",children:t}),n]})}function $fe(e){const{className:t,description:n,disabled:r,formData:o,fieldPathId:s,onAddProperty:l,optionalDataControl:c,properties:u,readonly:d,registry:h,required:p,schema:g,title:b,uiSchema:y}=e,_=ct(y),w=mt("TitleFieldTemplate",h,_),T=mt("DescriptionFieldTemplate",h,_),v=!d&&!r,{ButtonTemplates:{AddButton:E}}=h.templates;return j.jsxs("fieldset",{className:t,id:s.$id,children:[b&&j.jsx(w,{id:S0(s),title:b,required:p,schema:g,uiSchema:y,registry:h,optionalDataControl:v?c:void 0}),n&&j.jsx(T,{id:pc(s),description:n,schema:g,uiSchema:y,registry:h}),v?void 0:c,u.map(S=>S.content),N$(g,y,o)&&j.jsx(E,{id:Hi(s,"add"),className:"rjsf-object-property-expand",onClick:l,disabled:r||d,uiSchema:y,registry:h})]})}function Ife(e){const{id:t,registry:n,label:r,onAddClick:o,onRemoveClick:s}=e;return o?j.jsx(tc,{id:t,registry:n,icon:"plus",className:"rjsf-add-optional-data btn-sm",onClick:o,title:r}):s?j.jsx(tc,{id:t,registry:n,icon:"remove",className:"rjsf-remove-optional-data btn-sm",onClick:s,title:r}):j.jsx("em",{id:t,children:r})}const zfe="*";function Lfe(e){const{id:t,title:n,required:r,optionalDataControl:o}=e;return j.jsxs("legend",{id:t,children:[n,r&&j.jsx("span",{className:"required",children:zfe}),o&&j.jsx("span",{className:"pull-right",style:{marginBottom:"2px"},children:o})]})}function Ffe(e){const{schema:t,fieldPathId:n,reason:r,registry:o}=e,{translateString:s}=o;let l=Dt.UnsupportedField;const c=[];return n&&n.$id&&(l=Dt.UnsupportedFieldWithId,c.push(n.$id)),r&&(l=l===Dt.UnsupportedField?Dt.UnsupportedFieldWithReason:Dt.UnsupportedFieldWithIdAndReason,c.push(r)),j.jsxs("div",{className:"unsupported-field",children:[j.jsx("p",{children:j.jsx(Wh,{options:{disableParsingRawHTML:!0},children:s(l,c)})}),t&&j.jsx("pre",{children:JSON.stringify(t,null,2)})]})}function Ufe(e){const{id:t,classNames:n,style:r,disabled:o,displayLabel:s,label:l,onKeyRenameBlur:c,onRemoveProperty:u,rawDescription:d,readonly:h,required:p,schema:g,hideError:b,rawErrors:y,children:_,uiSchema:w,registry:T}=e,{templates:v,translateString:E}=T,{RemoveButton:S}=v.ButtonTemplates,C=E(Dt.KeyLabel,[l]),x=$s in g,O=!!d,M=["form-group",n];!b&&y&&y.length>0&&M.push("has-error has-danger");const P=M.join(" ").trim();if(!x)return j.jsx("div",{className:P,style:r,children:_});const z=O?46:26;return j.jsx("div",{className:P,style:r,children:j.jsxs("div",{className:"row",children:[j.jsx("div",{className:"col-xs-5 form-additional",children:j.jsxs("div",{className:"form-group",children:[s&&j.jsx(EI,{label:C,required:p,id:`${t}-key`}),s&&d&&j.jsx("div",{children:" "}),j.jsx("input",{className:"form-control",type:"text",id:`${t}-key`,onBlur:c,defaultValue:l})]})}),j.jsx("div",{className:"form-additional form-group col-xs-5",children:_}),j.jsx("div",{className:"col-xs-2",style:{marginTop:s?`${z}px`:void 0},children:j.jsx(S,{id:Hi(t,"remove"),className:"rjsf-object-property-remove btn-block",style:{border:"0"},disabled:o||h,onClick:u,uiSchema:w,registry:T})})]})})}function Vfe(){return{ArrayFieldDescriptionTemplate:pfe,ArrayFieldItemTemplate:mfe,ArrayFieldItemButtonsTemplate:gfe,ArrayFieldTemplate:yfe,ArrayFieldTitleTemplate:vfe,ButtonTemplates:Tfe(),BaseInputTemplate:bfe,DescriptionFieldTemplate:Rfe,ErrorListTemplate:Ofe,FallbackFieldTemplate:Afe,FieldTemplate:Mfe,FieldErrorTemplate:jfe,FieldHelpTemplate:Pfe,GridTemplate:Nfe,MultiSchemaFieldTemplate:Dfe,ObjectFieldTemplate:$fe,OptionalDataControlsTemplate:Ife,TitleFieldTemplate:Lfe,UnsupportedFieldTemplate:Ffe,WrapIfAdditionalTemplate:Ufe}}function qfe(e){const{disabled:t=!1,readonly:n=!1,autofocus:r=!1,options:o,id:s,name:l,registry:c,onBlur:u,onFocus:d}=e,{translateString:h}=c,{elements:p,handleChange:g,handleClear:b,handleSetNow:y}=dce(e);return j.jsxs("ul",{className:"list-inline",children:[p.map((_,w)=>j.jsx("li",{className:"list-inline-item",children:j.jsx(fce,{rootId:s,name:l,select:g,..._,disabled:t,readonly:n,registry:c,onBlur:u,onFocus:d,autofocus:r&&w===0})},w)),(o.hideNowButton!=="undefined"?!o.hideNowButton:!0)&&j.jsx("li",{className:"list-inline-item",children:j.jsx("a",{href:"#",className:"btn btn-info btn-now",onClick:y,children:h(Dt.NowLabel)})}),(o.hideClearButton!=="undefined"?!o.hideClearButton:!0)&&j.jsx("li",{className:"list-inline-item",children:j.jsx("a",{href:"#",className:"btn btn-warning btn-clear",onClick:b,children:h(Dt.ClearLabel)})})]})}function Bfe({time:e=!0,...t}){const{AltDateWidget:n}=t.registry.widgets;return j.jsx(n,{time:e,...t})}function Hfe({schema:e,uiSchema:t,options:n,id:r,value:o,disabled:s,readonly:l,label:c,hideLabel:u,autofocus:d=!1,onBlur:h,onFocus:p,onChange:g,registry:b,htmlName:y}){const _=mt("DescriptionFieldTemplate",b,n),w=Hd(e),T=k.useCallback(O=>g(O.target.checked),[g]),v=k.useCallback(O=>h(r,O.target.checked),[h,r]),E=k.useCallback(O=>p(r,O.target.checked),[p,r]),x=ct(t).widget==="checkbox"?void 0:n.description??e.description;return j.jsxs("div",{className:`checkbox ${s||l?"disabled":""}`,children:[!u&&x&&j.jsx(_,{id:pc(r),description:x,schema:e,uiSchema:t,registry:b}),j.jsxs("label",{children:[j.jsx("input",{type:"checkbox",id:r,name:y||r,checked:typeof o>"u"?!1:o,required:w,disabled:s||l,autoFocus:d,onChange:T,onBlur:v,onFocus:E,"aria-describedby":wo(r)}),aI(j.jsx("span",{children:c}),u)]})]})}function Kfe({id:e,disabled:t,options:{inline:n=!1,enumOptions:r,enumDisabled:o,emptyValue:s},value:l,autofocus:c=!1,readonly:u,onChange:d,onBlur:h,onFocus:p,htmlName:g}){const b=Array.isArray(l)?l:[l],y=k.useCallback(({target:w})=>h(e,Tr(w&&w.value,r,s)),[h,e,r,s]),_=k.useCallback(({target:w})=>p(e,Tr(w&&w.value,r,s)),[p,e,r,s]);return j.jsx("div",{className:"checkboxes",id:e,children:Array.isArray(r)&&r.map((w,T)=>{const v=Gh(w.value,b),E=Array.isArray(o)&&o.indexOf(w.value)!==-1,S=t||E||u?"disabled":"",C=O=>{O.target.checked?d(nI(T,b,r)):d(eI(T,b,r))},x=j.jsxs("span",{children:[j.jsx("input",{type:"checkbox",id:Kl(e,T),name:g||e,checked:v,value:String(T),disabled:t||E||u,autoFocus:c&&T===0,onChange:C,onBlur:y,onFocus:_,"aria-describedby":wo(e)}),j.jsx("span",{children:w.label})]});return n?j.jsx("label",{className:`checkbox-inline ${S}`,children:x},T):j.jsx("div",{className:`checkbox ${S}`,children:j.jsx("label",{children:x})},T)})})}function Gfe(e){const{disabled:t,readonly:n,options:r,registry:o}=e,s=mt("BaseInputTemplate",o,r);return j.jsx(s,{type:"color",...e,disabled:t||n})}function Zfe(e){const{onChange:t,options:n,registry:r}=e,o=mt("BaseInputTemplate",r,n),s=k.useCallback(l=>t(l||void 0),[t]);return j.jsx(o,{type:"date",...e,onChange:s})}function Wfe(e){const{onChange:t,value:n,options:r,registry:o}=e,s=mt("BaseInputTemplate",o,r);return j.jsx(s,{type:"datetime-local",...e,value:yce(n),onChange:l=>t(ace(l))})}function Yfe(e){const{options:t,registry:n}=e,r=mt("BaseInputTemplate",n,t);return j.jsx(r,{type:"email",...e})}function Xfe({fileInfo:e,registry:t}){const{translateString:n}=t,{dataURL:r,type:o,name:s}=e;return r?["image/jpeg","image/png"].includes(o)?j.jsx("img",{src:r,style:{maxWidth:"100%"},className:"file-preview"}):j.jsxs(j.Fragment,{children:[" ",j.jsx("a",{download:`preview-${s}`,href:r,className:"file-download",children:n(Dt.PreviewLabel)})]}):null}function Qfe({filesInfo:e,registry:t,preview:n,onRemove:r,options:o}){if(e.length===0)return null;const{translateString:s}=t,{RemoveButton:l}=mt("ButtonTemplates",t,o);return j.jsx("ul",{className:"file-info",children:e.map((c,u)=>{const{name:d,size:h,type:p}=c,g=()=>r(u);return j.jsxs("li",{children:[j.jsx(Wh,{children:s(Dt.FilesInfo,[d,p,String(h)])}),n&&j.jsx(Xfe,{fileInfo:c,registry:t}),j.jsx(l,{onClick:g,registry:t})]},u)})})}function Jfe(e){const{disabled:t,readonly:n,required:r,multiple:o,onChange:s,value:l,options:c,registry:u}=e,{filesInfo:d,handleChange:h,handleRemove:p}=gce(l,s,o),g=mt("BaseInputTemplate",u,c),b=y=>{y.target.files&&h(y.target.files)};return j.jsxs("div",{children:[j.jsx(g,{...e,disabled:t||n,type:"file",required:l?!1:r,onChangeOverride:b,value:"",accept:c.accept?String(c.accept):void 0}),j.jsx(Qfe,{filesInfo:d,onRemove:p,registry:u,preview:c.filePreview,options:c})]})}function ede({id:e,value:t,htmlName:n}){return j.jsx("input",{type:"hidden",id:e,name:n||e,value:typeof t>"u"?"":t})}function tde(e){const{options:t,registry:n}=e,r=mt("BaseInputTemplate",n,t);return j.jsx(r,{type:"password",...e})}function nde({options:e,value:t,required:n,disabled:r,readonly:o,autofocus:s=!1,onBlur:l,onFocus:c,onChange:u,id:d,htmlName:h}){const{enumOptions:p,enumDisabled:g,inline:b,emptyValue:y}=e,_=k.useCallback(({target:T})=>l(d,Tr(T&&T.value,p,y)),[l,p,y,d]),w=k.useCallback(({target:T})=>c(d,Tr(T&&T.value,p,y)),[c,p,y,d]);return j.jsx("div",{className:"field-radio-group",id:d,role:"radiogroup",children:Array.isArray(p)&&p.map((T,v)=>{const E=Gh(T.value,t),S=Array.isArray(g)&&g.indexOf(T.value)!==-1,C=r||S||o?"disabled":"",x=()=>u(T.value),O=j.jsxs("span",{children:[j.jsx("input",{type:"radio",id:Kl(d,v),checked:E,name:h||d,required:n,value:String(v),disabled:r||S||o,autoFocus:s&&v===0,onChange:x,onBlur:_,onFocus:w,"aria-describedby":wo(d)}),j.jsx("span",{children:T.label})]});return b?j.jsx("label",{className:`radio-inline ${C}`,children:O},v):j.jsx("div",{className:`radio ${C}`,children:j.jsx("label",{children:O})},v)})})}function rde(e){const{value:t,registry:{templates:{BaseInputTemplate:n}}}=e;return j.jsxs("div",{className:"field-range-wrapper",children:[j.jsx(n,{type:"range",...e}),j.jsx("span",{className:"range-view",children:t})]})}function ode({id:e,value:t,required:n,disabled:r,readonly:o,autofocus:s,onChange:l,onFocus:c,onBlur:u,schema:d,options:h,htmlName:p}){const{stars:g=5,shape:b="star"}=h,y=d.maximum?Math.min(d.maximum,5):Math.min(Math.max(g,1),5),_=d.minimum||0,w=k.useCallback(S=>{!r&&!o&&l(S)},[l,r,o]),T=k.useCallback(S=>{if(c){const C=Number(S.target.dataset.value);c(e,C)}},[c,e]),v=k.useCallback(S=>{if(u){const C=Number(S.target.dataset.value);u(e,C)}},[u,e]),E=S=>b==="heart"?S?"♥":"♡":S?"★":"☆";return j.jsx(j.Fragment,{children:j.jsxs("div",{className:"rating-widget",style:{display:"inline-flex",fontSize:"1.5rem",cursor:r||o?"default":"pointer"},children:[[...Array(y)].map((S,C)=>{const x=_+C,O=x<=t;return j.jsx("span",{onClick:()=>w(x),onFocus:T,onBlur:v,"data-value":x,tabIndex:r||o?-1:0,role:"radio","aria-checked":x===t,"aria-label":`${x} ${b==="heart"?"heart":"star"}${x===1?"":"s"}`,style:{color:O?"#FFD700":"#ccc",padding:"0 0.2rem",transition:"color 0.2s",userSelect:"none"},children:E(O)},C)}),j.jsx("input",{type:"hidden",id:e,name:p||e,value:t||"",required:n,disabled:r||o,"aria-hidden":"true"})]})})}function rS(e,t){return t?Array.from(e.target.options).slice().filter(n=>n.selected).map(n=>n.value):e.target.value}function ide({schema:e,id:t,options:n,value:r,required:o,disabled:s,readonly:l,multiple:c=!1,autofocus:u=!1,onChange:d,onBlur:h,onFocus:p,placeholder:g,htmlName:b}){const{enumOptions:y,enumDisabled:_,emptyValue:w}=n,T=c?[]:"",v=k.useCallback(O=>{const M=rS(O,c);return p(t,Tr(M,y,w))},[p,t,c,y,w]),E=k.useCallback(O=>{const M=rS(O,c);return h(t,Tr(M,y,w))},[h,t,c,y,w]),S=k.useCallback(O=>{const M=rS(O,c);return d(Tr(M,y,w))},[d,c,y,w]),C=tI(r,y,c),x=!c&&e.default===void 0;return j.jsxs("select",{id:t,name:b||t,multiple:c,role:"combobox",className:"form-control",value:typeof C>"u"?T:C,required:o,disabled:s||l,autoFocus:u,onBlur:E,onFocus:v,onChange:S,"aria-describedby":wo(t),children:[x&&j.jsx("option",{value:"",children:g}),Array.isArray(y)&&y.map(({value:O,label:M},P)=>{const z=_&&_.indexOf(O)!==-1;return j.jsx("option",{value:String(P),disabled:z,children:M},P)})]})}function TI({id:e,options:t={},placeholder:n,value:r,required:o,disabled:s,readonly:l,autofocus:c=!1,onChange:u,onBlur:d,onFocus:h,htmlName:p}){const g=k.useCallback(({target:{value:_}})=>u(_===""?t.emptyValue:_),[u,t.emptyValue]),b=k.useCallback(({target:_})=>d(e,_&&_.value),[d,e]),y=k.useCallback(({target:_})=>h(e,_&&_.value),[e,h]);return j.jsx("textarea",{id:e,name:p||e,className:"form-control",value:r||"",placeholder:n,required:o,disabled:s,readOnly:l,autoFocus:c,rows:t.rows,onBlur:b,onFocus:y,onChange:g,"aria-describedby":wo(e)})}TI.defaultProps={autofocus:!1,options:{}};function sde(e){const{options:t,registry:n}=e,r=mt("BaseInputTemplate",n,t);return j.jsx(r,{...e})}function ade(e){const{onChange:t,options:n,registry:r}=e,o=mt("BaseInputTemplate",r,n),s=k.useCallback(l=>t(l?`${l}:00`:void 0),[t]);return j.jsx(o,{type:"time",...e,onChange:s})}function lde(e){const{options:t,registry:n}=e,r=mt("BaseInputTemplate",n,t);return j.jsx(r,{type:"url",...e})}function cde(e){const{options:t,registry:n}=e,r=mt("BaseInputTemplate",n,t);return j.jsx(r,{type:"number",...e})}function ude(){return{AltDateWidget:qfe,AltDateTimeWidget:Bfe,CheckboxWidget:Hfe,CheckboxesWidget:Kfe,ColorWidget:Gfe,DateWidget:Zfe,DateTimeWidget:Wfe,EmailWidget:Yfe,FileWidget:Jfe,HiddenWidget:ede,PasswordWidget:tde,RadioWidget:nde,RangeWidget:rde,RatingWidget:ode,SelectWidget:ide,TextWidget:sde,TextareaWidget:TI,TimeWidget:ade,UpDownWidget:cde,URLWidget:lde}}function fde(){return{fields:hfe(),templates:Vfe(),widgets:ude(),rootSchema:{},formContext:{},translateString:Yle,globalFormOptions:{idPrefix:M$,idSeparator:j$,useFallbackUiForUnsupportedType:!1}}}function ou(e,t){return{...e_(e,["schema","uiSchema","fieldPathId","schemaUtils","formData","edit","errors","errorSchema"]),...t!==void 0&&{status:t}}}class dde extends k.Component{formElement;pendingChanges=[];constructor(t){if(super(t),!t.validator)throw new Error("A validator is required for Form functionality to work");const{formData:n,initialFormData:r,onChange:o}=t,s=n??r;this.state=this.getStateFromProps(t,s,void 0,void 0,void 0,!0),o&&!An(this.state.formData,s)&&o(ou(this.state)),this.formElement=k.createRef()}getSnapshotBeforeUpdate(t,n){if(!An(this.props,t)){const r=AM(this.props.formData,t.formData),o=AM(this.props.formData,this.state.formData),s=!An(t.schema,this.props.schema),l=r.length>0||!An(t.formData,this.props.formData),c=o.length>0||!An(this.state.formData,this.props.formData),u=this.getStateFromProps(this.props,this.props.formData,s||l?void 0:this.state.retrievedSchema,s,r,!c),d=!An(u,n);return{nextState:u,shouldUpdate:d}}return{shouldUpdate:!1}}componentDidUpdate(t,n,r){if(r.shouldUpdate){const{nextState:o}=r;!An(o.formData,this.props.formData)&&!An(o.formData,n.formData)&&this.props.onChange&&this.props.onChange(ou(o)),this.setState(o)}}getStateFromProps(t,n,r,o=!1,s=[],l=!1){const c=this.state||{},u="schema"in t?t.schema:this.props.schema,d="validator"in t?t.validator:this.props.validator,h=("uiSchema"in t?t.uiSchema:this.props.uiSchema)||{},p=t.formData===void 0&&this.props.formData===void 0,g=typeof n<"u",b="liveValidate"in t?t.liveValidate:this.props.liveValidate,y=g&&!t.noValidate&&b,_="experimental_defaultFormStateBehavior"in t?t.experimental_defaultFormStateBehavior:this.props.experimental_defaultFormStateBehavior,w="experimental_customMergeAllOf"in t?t.experimental_customMergeAllOf:this.props.experimental_customMergeAllOf;let T=c.schemaUtils;(!T||T.doesSchemaUtilsDiffer(d,u,_,w))&&(T=Gle(d,u,_,w));const v=T.getRootSchema();let E=n;n===i3?E=void 0:n===void 0&&p&&(E=c.formData);const S=T.getDefaultFormState(v,E,!1,c.initialDefaultsGenerated),C=this.updateRetrievedSchema(r??T.retrieveSchema(v,S)),x=()=>t.noValidate||o?{errors:[],errorSchema:{}}:t.liveValidate?{errors:c.errors||[],errorSchema:c.errorSchema||{}}:{errors:c.schemaValidationErrors||[],errorSchema:c.schemaValidationErrorSchema||{}};let O,M,P=c.schemaValidationErrors,z=c.schemaValidationErrorSchema;if(y&&!l){const J=this.liveValidate(v,T,c.errorSchema,S,void 0,c.customErrors,r,r!==void 0);O=J.errors,M=J.errorSchema,P=J.schemaValidationErrors,z=J.schemaValidationErrorSchema}else{const J=x();if(O=J.errors,M=J.errorSchema,s.length>0&&!y){const H=s.reduce((Y,oe)=>(Y[oe]=void 0,Y),{});M=z=yh(J.errorSchema,H,"preventDuplicates")}const Z=this.mergeErrors({errorSchema:M,errors:O},t.extraErrors,c.customErrors);O=Z.errors,M=Z.errorSchema}const I=this.getRegistry(t,v,T),q=An(c.registry,I)?c.registry:I,G=c.fieldPathId&&c.fieldPathId?.[_n]===q.globalFormOptions.idPrefix?c.fieldPathId:ci("",q.globalFormOptions);return{schemaUtils:T,schema:v,uiSchema:h,fieldPathId:G,formData:S,edit:g,errors:O,errorSchema:M,schemaValidationErrors:P,schemaValidationErrorSchema:z,retrievedSchema:C,initialDefaultsGenerated:!0,registry:q}}shouldComponentUpdate(t,n){const{experimental_componentUpdateStrategy:r="customDeep"}=this.props;return lI(this,t,n,r)}validate(t,n=this.state.schema,r,o){const s=r||this.state.schemaUtils,{customValidate:l,transformErrors:c,uiSchema:u}=this.props,d=o??s.retrieveSchema(n,t);return s.getValidator().validateFormData(t,d,l,c,u)}renderErrors(t){const{errors:n,errorSchema:r,schema:o,uiSchema:s}=this.state,l=ct(s),c=mt("ErrorListTemplate",t,l);return n&&n.length?j.jsx(c,{errors:n,errorSchema:r||{},schema:o,uiSchema:s,registry:t}):null}mergeErrors(t,n,r){let o=t.errorSchema,s=t.errors;if(n){const l=qg(t,n);o=l.errorSchema,s=l.errors}if(r){const l=qg(t,r.ErrorSchema,!0);o=l.errorSchema,s=l.errors}return{errors:s,errorSchema:o}}liveValidate(t,n,r,o,s,l,c,u=!1){const d=this.validate(o,t,n,c),h=d.errors;let p=d.errorSchema;u&&(p=yh(r,d.errorSchema,"preventDuplicates"));const g=h,b=p;return{...this.mergeErrors({errorSchema:p,errors:h},s,l),schemaValidationErrors:g,schemaValidationErrorSchema:b}}getUsedFormData=(t,n)=>{if(n.length===0&&typeof t!="object")return t;const r=e_(t,n);return Array.isArray(t)?Object.keys(r).map(o=>r[o]):r};getFieldNames=(t,n)=>{const r=(s,l)=>typeof s!="object"||vr(s)||l&&!vr(s),o=(s,l=[],c=[[]])=>{const u=Object.keys(s);return u.forEach(d=>{const h=s[d];if(typeof h=="object"){const p=c.map(g=>[...g,d]);h[vE]&&h[Lg]!==""?l.push(h[Lg]):o(h,l,p)}else d===Lg&&h!==""&&c.forEach(p=>{const g=Ie(n,p),b=u.length===1;(r(g,b)||Array.isArray(g)&&g.every(y=>r(y,b)))&&l.push(p)})}),l};return o(t)};omitExtraData=t=>{const{schema:n,schemaUtils:r}=this.state,o=r.retrieveSchema(n,t),s=r.toPathSchema(o,"",t),l=this.getFieldNames(s,t);return this.getUsedFormData(t,l)};setFieldValue=(t,n)=>{const{registry:r}=this.state,o=Array.isArray(t)?t:t.split("."),s=ci("",r.globalFormOptions,o);this.onChange(n,o,void 0,s[_n])};onChange=(t,n,r,o)=>{this.pendingChanges.push({newValue:t,path:n,newErrorSchema:r,id:o}),this.pendingChanges.length===1&&this.processPendingChange()};processPendingChange(){if(this.pendingChanges.length===0)return;const{newValue:t,path:n,id:r}=this.pendingChanges[0],{newErrorSchema:o}=this.pendingChanges[0],{extraErrors:s,omitExtraData:l,liveOmit:c,noValidate:u,liveValidate:d,onChange:h}=this.props,{formData:p,schemaUtils:g,schema:b,fieldPathId:y,schemaValidationErrorSchema:_,errors:w}=this.state;let{customErrors:T,errorSchema:v}=this.state;const E=y.path[0]||"",S=!n||n.length===0||n.length===1&&n[0]===E;let C=this.state.retrievedSchema,x=S?t:Dh(p);if(Kt(x)||Array.isArray(x)){t===xI?CK(x,n):S||fn(x,n,t);const z=this.getStateFromProps(this.props,x,void 0,void 0,void 0,!0);x=z.formData,C=z.retrievedSchema}const O=!u&&(d===!0||d==="onChange");let M={formData:x,schema:b},P=x;if(l===!0&&(c===!0||c==="onChange")&&(P=this.omitExtraData(x),M={formData:P}),o){const z=S?_:Ie(_,n);if(!vr(z))S?v=o:fn(v,n,o);else if(T||(T=new rI),S){const I=Ie(o,Hr);I&&T.setErrors(I)}else fn(T.ErrorSchema,n,o)}else T&&Ie(T.ErrorSchema,[...n,Hr])&&T.clearErrors(n);if(O&&this.pendingChanges.length===1){const z=this.liveValidate(b,g,v,P,s,T,C);M={formData:P,...z,customErrors:T}}else if(!u&&o){const z=this.mergeErrors({errorSchema:v,errors:w},s,T);M={formData:P,...z,customErrors:T}}this.setState(M,()=>{h&&h(ou({...this.state,...M}),r),this.pendingChanges.shift(),this.processPendingChange()})}updateRetrievedSchema(t){return An(t,this.state?.retrievedSchema)?this.state.retrievedSchema:t}reset=()=>{const{formData:t,initialFormData:n=i3,onChange:r}=this.props,l={formData:this.getStateFromProps(this.props,t??n,void 0,void 0,void 0,!0).formData,errorSchema:{},errors:[],schemaValidationErrors:[],schemaValidationErrorSchema:{},initialDefaultsGenerated:!1,customErrors:void 0};this.setState(l,()=>r&&r(ou({...this.state,...l})))};onBlur=(t,n)=>{const{onBlur:r,omitExtraData:o,liveOmit:s,liveValidate:l}=this.props;if(r&&r(t,n),o===!0&&s==="onBlur"||l==="onBlur"){const{onChange:c,extraErrors:u}=this.props,{formData:d}=this.state;let h=d,p={formData:h};if(o===!0&&s==="onBlur"&&(h=this.omitExtraData(d),p={formData:h}),l==="onBlur"){const{schema:b,schemaUtils:y,errorSchema:_,customErrors:w,retrievedSchema:T}=this.state,v=this.liveValidate(b,y,_,h,u,w,T);p={formData:h,...v,customErrors:w}}const g=Object.keys(p).filter(b=>!b.startsWith("schemaValidation")).some(b=>{const y=Ie(this.state,b),_=Ie(p,b);return!An(y,_)});this.setState(p,()=>{c&&g&&c(ou({...this.state,...p}),t)})}};onFocus=(t,n)=>{const{onFocus:r}=this.props;r&&r(t,n)};onSubmit=t=>{if(t.preventDefault(),t.target!==t.currentTarget)return;t.persist();const{omitExtraData:n,extraErrors:r,noValidate:o,onSubmit:s}=this.props;let{formData:l}=this.state;if(n===!0&&(l=this.omitExtraData(l)),o||this.validateFormWithFormData(l)){const c=r||{},u=r?kE(r):[];this.setState({formData:l,errors:u,errorSchema:c,schemaValidationErrors:[],schemaValidationErrorSchema:{}},()=>{s&&s(ou({...this.state,formData:l},"submitted"),t)})}};getGlobalFormOptions(t){const{uiSchema:n={},experimental_componentUpdateStrategy:r,idSeparator:o=j$,idPrefix:s=M$,nameGenerator:l,useFallbackUiForUnsupportedType:c=!1}=t;return{idPrefix:n["ui:rootFieldId"]||s,idSeparator:o,useFallbackUiForUnsupportedType:c,...r!==void 0&&{experimental_componentUpdateStrategy:r},...l!==void 0&&{nameGenerator:l}}}getRegistry(t,n,r){const{translateString:o,uiSchema:s={}}=t,{fields:l,templates:c,widgets:u,formContext:d,translateString:h}=fde();return{fields:{...l,...t.fields},templates:{...c,...t.templates,ButtonTemplates:{...c.ButtonTemplates,...t.templates?.ButtonTemplates}},widgets:{...u,...t.widgets},rootSchema:n,formContext:t.formContext||d,schemaUtils:r,translateString:o||h,globalUiOptions:s[Hw],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:n="root",idSeparator:r="_"}=this.props,{property:o}=t,s=HP(o);s[0]===""?s[0]=n:s.unshift(n);const l=s.join(r);let c=this.formElement.current.elements[l];c||(c=this.formElement.current.querySelector(`input[id^="${l}"`)),c&&c.length&&(c=c[0]),c&&c.focus()}validateFormWithFormData=t=>{const{extraErrors:n,extraErrorsBlockSubmit:r,focusOnFirstError:o,onError:s}=this.props,{errors:l}=this.state,c=this.validate(t);let u=c.errors,d=c.errorSchema;const h=u,p=d,g=u.length>0||n&&r;if(g){if(n){const b=qg(c,n);d=b.errorSchema,u=b.errors}o&&(typeof o=="function"?o(u[0]):this.focusOnError(u[0])),this.setState({errors:u,errorSchema:d,schemaValidationErrors:h,schemaValidationErrorSchema:p},()=>{s?s(u):console.error("Form validation failed",u)})}else l.length>0&&this.setState({errors:[],errorSchema:{},schemaValidationErrors:[],schemaValidationErrorSchema:{}});return!g};validateForm(){const{omitExtraData:t}=this.props;let{formData:n}=this.state;return t===!0&&(n=this.omitExtraData(n)),this.validateFormWithFormData(n)}render(){const{children:t,id:n,className:r="",tagName:o,name:s,method:l,target:c,action:u,autoComplete:d,enctype:h,acceptCharset:p,noHtml5Validate:g=!1,disabled:b,readonly:y,showErrorList:_="top",_internalFormWrapper:w}=this.props,{schema:T,uiSchema:v,formData:E,errorSchema:S,fieldPathId:C,registry:x}=this.state,{SchemaField:O}=x.fields,{SubmitButton:M}=x.templates.ButtonTemplates,P=w?o:void 0,z=w||o||"form";let{[_y]:I={}}=ct(v);b&&(I={...I,props:{...I.props,disabled:!0}});const q={[Na]:{[_y]:I}};return j.jsxs(z,{className:r||"rjsf",id:n,name:s,method:l,target:c,action:u,autoComplete:d,encType:h,acceptCharset:p,noValidate:g,onSubmit:this.onSubmit,as:P,ref:this.formElement,children:[_==="top"&&this.renderErrors(x),j.jsx(O,{name:"",schema:T,uiSchema:v,errorSchema:S,fieldPathId:C,formData:E,onChange:this.onChange,onBlur:this.onBlur,onFocus:this.onFocus,registry:x,disabled:b,readonly:y}),t||j.jsx(M,{uiSchema:q,registry:x}),_==="bottom"&&this.renderErrors(x)]})}}function hde(e){return k.forwardRef(({fields:t,widgets:n,templates:r,...o},s)=>(t={...e?.fields,...t},n={...e?.widgets,...n},r={...e?.templates,...r,ButtonTemplates:{...e?.templates?.ButtonTemplates,...r?.ButtonTemplates}},j.jsx(dde,{...e,...o,fields:t,widgets:n,templates:r,ref:s})))}var hg={exports:{}},oS={},s3;function pde(){return s3||(s3=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(P,z){return{validate:P,compare:z}}e.fullFormats={date:t(s,l),time:t(u,d),"date-time":t(p,g),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:M,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:S},int64:{type:"number",validate:C},float:{type:"number",validate:x},double:{type:"number",validate:x},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,l),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,d),"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,g),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 n(P){return P%4===0&&(P%100!==0||P%400===0)}const r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,o=[0,31,28,31,30,31,30,31,31,30,31,30,31];function s(P){const z=r.exec(P);if(!z)return!1;const I=+z[1],q=+z[2],G=+z[3];return q>=1&&q<=12&&G>=1&&G<=(q===2&&n(I)?29:o[q])}function l(P,z){if(P&&z)return P>z?1:P<z?-1:0}const c=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function u(P,z){const I=c.exec(P);if(!I)return!1;const q=+I[1],G=+I[2],ee=+I[3],J=I[5];return(q<=23&&G<=59&&ee<=59||q===23&&G===59&&ee===60)&&(!z||J!=="")}function d(P,z){if(!(P&&z))return;const I=c.exec(P),q=c.exec(z);if(I&&q)return P=I[1]+I[2]+I[3]+(I[4]||""),z=q[1]+q[2]+q[3]+(q[4]||""),P>z?1:P<z?-1:0}const h=/t|\s/i;function p(P){const z=P.split(h);return z.length===2&&s(z[0])&&u(z[1],!0)}function g(P,z){if(!(P&&z))return;const[I,q]=P.split(h),[G,ee]=z.split(h),J=l(I,G);if(J!==void 0)return J||d(q,ee)}const b=/\/|:/,y=/^(?:[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 _(P){return b.test(P)&&y.test(P)}const w=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function T(P){return w.lastIndex=0,w.test(P)}const v=-2147483648,E=2**31-1;function S(P){return Number.isInteger(P)&&P<=E&&P>=v}function C(P){return Number.isInteger(P)}function x(){return!0}const O=/[^\\]\\Z/;function M(P){if(O.test(P))return!1;try{return new RegExp(P),!0}catch{return!1}}})(oS)),oS}var iS={},a3;function mde(){return a3||(a3=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=j_(),n=Ot(),r=n.operators,o={formatMaximum:{okStr:"<=",ok:r.LTE,fail:r.GT},formatMinimum:{okStr:">=",ok:r.GTE,fail:r.LT},formatExclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},formatExclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}},s={message:({keyword:c,schemaCode:u})=>n.str`should be ${o[c].okStr} ${u}`,params:({keyword:c,schemaCode:u})=>n._`{comparison: ${o[c].okStr}, limit: ${u}}`};e.formatLimitDefinition={keyword:Object.keys(o),type:"string",schemaType:"string",$data:!0,error:s,code(c){const{gen:u,data:d,schemaCode:h,keyword:p,it:g}=c,{opts:b,self:y}=g;if(!b.validateFormats)return;const _=new t.KeywordCxt(g,y.RULES.all.format.definition,"format");_.$data?w():T();function w(){const E=u.scopeValue("formats",{ref:y.formats,code:b.code.formats}),S=u.const("fmt",n._`${E}[${_.schemaCode}]`);c.fail$data(n.or(n._`typeof ${S} != "object"`,n._`${S} instanceof RegExp`,n._`typeof ${S}.compare != "function"`,v(S)))}function T(){const E=_.schema,S=y.formats[E];if(!S||S===!0)return;if(typeof S!="object"||S instanceof RegExp||typeof S.compare!="function")throw new Error(`"${p}": format "${E}" does not define "compare" function`);const C=u.scopeValue("formats",{key:E,ref:S,code:b.code.formats?n._`${b.code.formats}${n.getProperty(E)}`:void 0});c.fail$data(v(C))}function v(E){return n._`${E}.compare(${d}, ${h}) ${o[p].fail} 0`}},dependencies:["format"]};const l=c=>(c.addKeyword(e.formatLimitDefinition),c);e.default=l})(iS)),iS}var l3;function gde(){return l3||(l3=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const n=pde(),r=mde(),o=Ot(),s=new o.Name("fullFormats"),l=new o.Name("fastFormats"),c=(d,h={keywords:!0})=>{if(Array.isArray(h))return u(d,h,n.fullFormats,s),d;const[p,g]=h.mode==="fast"?[n.fastFormats,l]:[n.fullFormats,s],b=h.formats||n.formatNames;return u(d,b,p,g),h.keywords&&r.default(d),d};c.get=(d,h="full")=>{const g=(h==="fast"?n.fastFormats:n.fullFormats)[d];if(!g)throw new Error(`Unknown format "${d}"`);return g};function u(d,h,p,g){var b,y;(b=(y=d.opts.code).formats)!==null&&b!==void 0||(y.formats=o._`require("ajv-formats/dist/formats").${g}`);for(const _ of h)d.addFormat(_,p[_])}e.exports=t=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c})(hg,hg.exports)),hg.exports}var yde=gde();const c3=ts(yde),vde={allErrors:!0,multipleOfPrecision:8,strict:!1,verbose:!0,discriminator:!1},bde=/^(#?([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*\)))$/,Sde=/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/;function wde(e,t,n={},r,o=bN,s){let l=new o({...vde,...n});return r?c3(l,r):r!==!1&&c3(l),l.addFormat("data-url",Sde),l.addFormat("color",bde),l.addKeyword($s),l.addKeyword(vE),Array.isArray(e)&&l.addMetaSchema(e),Zt(t)&&Object.keys(t).forEach(c=>{l.addFormat(c,t[c])}),s&&(l=s(l)),l}function xde(e=[],t){return e.map(r=>{var o;const{instancePath:s,keyword:l,params:c,schemaPath:u,parentSchema:d,...h}=r;let{message:p=""}=h,g=s.replace(/\//g,"."),b=`${g} ${p}`.trim(),y="";const _=[...((o=c.deps)===null||o===void 0?void 0:o.split(", "))||[],c.missingProperty,c.property].filter(w=>w);if(_.length>0)_.forEach(w=>{const T=g?`${g}.${w}`:w;let v=ct(Ie(t,`${T.replace(/^\./,"")}`)).title;if(v===void 0){const E=u.replace(/\/properties\//g,"/").split("/").slice(1,-1).concat([w]);v=ct(Ie(t,E)).title}if(v)p=p.replace(`'${w}'`,`'${v}'`),y=v;else{const E=Ie(d,[nn,w,"title"]);E&&(p=p.replace(`'${w}'`,`'${E}'`),y=E)}}),b=p;else{const w=ct(Ie(t,`${g.replace(/^\./,"")}`)).title;if(w)b=`'${w}' ${p}`.trim(),y=w;else{const T=d?.title;T&&(b=`'${T}' ${p}`.trim(),y=T)}}return"missingProperty"in c&&(g=g?`${g}.${c.missingProperty}`:c.missingProperty),{name:l,property:g,message:p,params:c,stack:b,schemaPath:u,title:y}}).reduce((r,o)=>{const{message:s,schemaPath:l}=o,c=l?.indexOf(`/${Gt}/`),u=l?.indexOf(`/${Mt}/`);let d;return c&&c>=0?d=l?.substring(0,c):u&&u>=0&&(d=l?.substring(0,u)),d&&r.find(p=>{var g;return p.message===s&&((g=p.schemaPath)===null||g===void 0?void 0:g.startsWith(d))})||r.push(o),r},[])}function _de(e,t,n,r,o,s,l){const{validationError:c}=t;let u=xde(t.errors,l);c&&(u=[...u,{stack:c.message}]),typeof s=="function"&&(u=s(u,l));let d=cce(u);if(c&&(d={...d,$schema:{__errors:[c.message]}}),typeof o!="function")return{errors:u,errorSchema:d};const h=Y$(e,r,n,r,!0),p=o(h,Kw(h),l),g=cI(p);return qg({errors:u,errorSchema:d},g)}class Ede{constructor(t,n){const{additionalMetaSchemas:r,customFormats:o,ajvOptionsOverrides:s,ajvFormatOptions:l,AjvClass:c,extenderFn:u}=t;this.ajv=wde(r,o,s,l,c,u),this.localizer=n}reset(){this.ajv.removeSchema()}rawValidation(t,n){var r,o;let s,l;try{t[_n]&&(l=this.ajv.getSchema(t[_n])),l===void 0&&(l=this.ajv.compile(t)),l(n)}catch(u){s=u}let c;return l&&(typeof this.localizer=="function"&&(((r=l.errors)!==null&&r!==void 0?r:[]).forEach(u=>{var d;["missingProperty","property"].forEach(h=>{var p;!((p=u.params)===null||p===void 0)&&p[h]&&(u.params[h]=`'${u.params[h]}'`)}),!((d=u.params)===null||d===void 0)&&d.deps&&(u.params.deps=u.params.deps.split(", ").map(h=>`'${h}'`).join(", "))}),this.localizer(l.errors),((o=l.errors)!==null&&o!==void 0?o:[]).forEach(u=>{var d;["missingProperty","property"].forEach(h=>{var p;!((p=u.params)===null||p===void 0)&&p[h]&&(u.params[h]=u.params[h].slice(1,-1))}),!((d=u.params)===null||d===void 0)&&d.deps&&(u.params.deps=u.params.deps.split(", ").map(h=>h.slice(1,-1)).join(", "))})),c=l.errors||void 0,l.errors=null),{errors:c,validationError:s}}validateFormData(t,n,r,o,s){const l=this.rawValidation(n,t);return _de(this,l,t,n,r,o,s)}handleSchemaUpdate(t){var n,r;const o=(n=t[_n])!==null&&n!==void 0?n:P$;this.ajv.getSchema(o)===void 0?this.ajv.addSchema(t,o):An(t,(r=this.ajv.getSchema(o))===null||r===void 0?void 0:r.schema)||(this.ajv.removeSchema(o),this.ajv.addSchema(t,o))}isValid(t,n,r){var o;try{this.handleSchemaUpdate(r);const s=ME(t),l=(o=s[_n])!==null&&o!==void 0?o:oce(s);let c;return c=this.ajv.getSchema(l),c===void 0&&(c=this.ajv.addSchema(s,l).getSchema(l)||this.ajv.compile(s)),c(n)}catch(s){return console.warn("Error encountered compiling schema:",s),!1}}}function Cde(e={},t){return new Ede(e,t)}const Tde=Cde();const Rde=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ode=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),u3=e=>{const t=Ode(e);return t.charAt(0).toUpperCase()+t.slice(1)},RI=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),Ade=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var kde={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 Mde=k.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:l,...c},u)=>k.createElement("svg",{ref:u,...kde,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:RI("lucide",o),...!s&&!Ade(c)&&{"aria-hidden":"true"},...c},[...l.map(([d,h])=>k.createElement(d,h)),...Array.isArray(s)?s:[s]]));const ss=(e,t)=>{const n=k.forwardRef(({className:r,...o},s)=>k.createElement(Mde,{ref:s,iconNode:t,className:RI(`lucide-${Rde(u3(e))}`,`lucide-${e}`,r),...o}));return n.displayName=u3(e),n};const jde=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Pde=ss("check",jde);const Nde=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],OI=ss("chevron-down",Nde);const Dde=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],$de=ss("chevron-up",Dde);const Ide=[["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"}]],zde=ss("circle-alert",Ide);const Lde=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],AI=ss("circle-plus",Lde);const Fde=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Ude=ss("circle",Fde);const Vde=[["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"}]],qde=ss("copy",Vde);const Bde=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Hde=ss("search",Bde);const Kde=[["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"}]],Gde=ss("trash-2",Kde);const Zde=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Wde=ss("x",Zde);function f3(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Wa(...e){return t=>{let n=!1;const r=e.map(o=>{const s=f3(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():f3(e[o],null)}}}}function ur(...e){return k.useCallback(Wa(...e),e)}var Yde=Symbol.for("react.lazy"),Cy=Th[" use ".trim().toString()];function Xde(e){return typeof e=="object"&&e!==null&&"then"in e}function kI(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Yde&&"_payload"in e&&Xde(e._payload)}function MI(e){const t=Qde(e),n=k.forwardRef((r,o)=>{let{children:s,...l}=r;kI(s)&&typeof Cy=="function"&&(s=Cy(s._payload));const c=k.Children.toArray(s),u=c.find(ehe);if(u){const d=u.props.children,h=c.map(p=>p===u?k.Children.count(d)>1?k.Children.only(null):k.isValidElement(d)?d.props.children:null:p);return j.jsx(t,{...l,ref:o,children:k.isValidElement(d)?k.cloneElement(d,void 0,h):null})}return j.jsx(t,{...l,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var jI=MI("Slot");function Qde(e){const t=k.forwardRef((n,r)=>{let{children:o,...s}=n;if(kI(o)&&typeof Cy=="function"&&(o=Cy(o._payload)),k.isValidElement(o)){const l=nhe(o),c=the(s,o.props);return o.type!==k.Fragment&&(c.ref=r?Wa(r,l):l),k.cloneElement(o,c)}return k.Children.count(o)>1?k.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Jde=Symbol("radix.slottable");function ehe(e){return k.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Jde}function the(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const u=s(...c);return o(...c),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function nhe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function jt(...e){return KN(L_(e))}const rhe=rl("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 zE({className:e,variant:t,size:n,asChild:r=!1,...o}){const s=r?jI:"button";return j.jsx(s,{"data-slot":"button",className:jt(rhe({variant:t,size:n,className:e})),...o})}function ohe({uiSchema:e,registry:t,className:n,...r}){const{translateString:o}=t;return j.jsx("div",{className:"p-0 m-0",children:j.jsxs(zE,{...r,className:jt("w-fit gap-2",n),variant:"outline",type:"button",children:[j.jsx(AI,{size:16})," ",o(Dt.AddItemButton)]})})}function ihe(e){const{children:t,buttonsProps:n,displayLabel:r,hasDescription:o,hasToolbar:s,uiSchema:l,registry:c}=e,u=ct(l),d=mt("ArrayFieldItemButtonsTemplate",c,u),h=o?-6:22;return j.jsx("div",{children:j.jsxs("div",{className:"mb-2 flex flex-row flex-wrap items-center",children:[j.jsx("div",{className:"grow shrink",children:t}),j.jsx("div",{className:"flex items-end justify-end p-0.5",children:s&&j.jsx("div",{className:"flex gap-2",style:{marginLeft:"5px",marginTop:r?`${h}px`:void 0},children:j.jsx(d,{...n})})})]})})}function she(e){const{canAdd:t,disabled:n,fieldPathId:r,uiSchema:o,items:s,optionalDataControl:l,onAddClick:c,readonly:u,registry:d,required:h,schema:p,title:g}=e,b=ct(o),y=mt("ArrayFieldDescriptionTemplate",d,b),_=mt("ArrayFieldTitleTemplate",d,b),w=!u&&!n,{ButtonTemplates:{AddButton:T}}=d.templates;return j.jsx("div",{children:j.jsx("div",{className:"m-0 flex p-0",children:j.jsxs("div",{className:"m-0 w-full p-0",children:[j.jsx(_,{fieldPathId:r,title:b.title||g,schema:p,uiSchema:o,required:h,registry:d,optionalDataControl:w?l:void 0}),j.jsx(y,{fieldPathId:r,description:b.description||p.description,schema:p,uiSchema:o,registry:d}),j.jsxs("div",{className:"p-0 m-0 w-full mb-2",children:[w?void 0:l,s,t&&j.jsx("div",{className:"mt-2 flex justify-end",children:j.jsx(T,{id:Hi(r,"add"),className:"rjsf-array-item-add",onClick:c,disabled:n||u,uiSchema:o,registry:d})})]},`array-item-list-${r.$id}`)]})})})}function PI({className:e,type:t,...n}){return j.jsx("input",{type:t,"data-slot":"input",className:jt("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),...n})}function ahe({id:e,htmlName:t,placeholder:n,required:r,readonly:o,disabled:s,type:l,value:c,onChange:u,onChangeOverride:d,onBlur:h,onFocus:p,autofocus:g,options:b,schema:y,rawErrors:_=[],children:w,extraProps:T,className:v}){const E={...T,...iI(y,l,b)},S=({target:{value:O}})=>u(O===""?b.emptyValue:O),C=({target:O})=>h(e,O&&O.value),x=({target:O})=>p(e,O&&O.value);return j.jsxs("div",{className:"p-0.5",children:[j.jsx(PI,{id:e,name:t||e,type:l,placeholder:n,autoFocus:g,required:r,disabled:s,readOnly:o,className:jt({"border-destructive focus-visible:ring-0":_.length>0},v),list:y.examples?vh(e):void 0,...E,value:c||c===0?c:"",onChange:d||S,onBlur:C,onFocus:x,"aria-describedby":wo(e,!!y.examples)}),w,Array.isArray(y.examples)?j.jsx("datalist",{id:vh(e),children:y.examples.concat(y.default&&!y.examples.includes(y.default)?[y.default]:[]).map(O=>j.jsx("option",{value:O},O))}):null]})}function lhe({id:e,description:t,registry:n,uiSchema:r}){return t?j.jsx("div",{children:j.jsx("div",{id:e,className:"text-sm text-muted-foreground",children:j.jsx($E,{description:t,registry:n,uiSchema:r})})}):null}const che=rl("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 uhe({className:e,variant:t,...n}){return j.jsx("div",{"data-slot":"alert",role:"alert",className:jt(che({variant:t}),e),...n})}function fhe({className:e,...t}){return j.jsx("div",{"data-slot":"alert-title",className:jt("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",e),...t})}function dhe({className:e,...t}){return j.jsx("div",{"data-slot":"alert-description",className:jt("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",e),...t})}function hhe({errors:e,registry:t}){const{translateString:n}=t;return j.jsxs(uhe,{variant:"destructive",className:"mb-2",children:[j.jsx(zde,{className:"h-4 w-4"}),j.jsx(fhe,{children:n(Dt.ErrorsLabel)}),j.jsx(dhe,{className:"flex flex-col gap-1",children:e.map((r,o)=>j.jsxs("span",{children:["• ",r.stack]},o))})]})}function phe(e){const{errors:t=[],fieldPathId:n}=e;if(t.length===0)return null;const r=RE(n);return j.jsx("div",{className:"flex flex-col gap-1",id:r,children:t.map((o,s)=>j.jsx("span",{className:"text-xs font-medium text-destructive mb-1",children:o},s))})}function mhe(e){const{fieldPathId:t,help:n,uiSchema:r,registry:o,hasErrors:s}=e;return n?j.jsx("span",{className:jt("text-xs font-medium text-muted-foreground",{"text-destructive":s}),id:OE(t),children:j.jsx(IE,{help:n,registry:o,uiSchema:r})}):null}function ghe({id:e,children:t,displayLabel:n,rawErrors:r=[],errors:o,help:s,description:l,rawDescription:c,classNames:u,style:d,disabled:h,label:p,hidden:g,onKeyRename:b,onKeyRenameBlur:y,onRemoveProperty:_,readonly:w,required:T,schema:v,uiSchema:E,registry:S}){const C=ct(E),x=mt("WrapIfAdditionalTemplate",S,C);if(g)return j.jsx("div",{className:"hidden",children:t});const O=C.widget==="checkbox";return j.jsx(x,{classNames:u,style:d,disabled:h,id:e,label:p,displayLabel:n,onKeyRename:b,onKeyRenameBlur:y,onRemoveProperty:_,rawDescription:c,readonly:w,required:T,schema:v,uiSchema:E,registry:S,children:j.jsxs("div",{className:"flex flex-col gap-2",children:[n&&!O&&j.jsxs("label",{className:jt("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{" text-destructive":r.length>0}),htmlFor:e,children:[p,T?"*":null]}),t,n&&c&&!O&&j.jsx("span",{className:jt("text-xs font-medium text-muted-foreground",{" text-destructive":r.length>0}),children:l}),o,s]})})}function yhe(e){const{children:t,column:n,className:r,...o}=e;return j.jsx("div",{className:jt("grid gap-2",r),...o,children:t})}function Yh(e){const{icon:t,iconType:n,className:r,uiSchema:o,registry:s,...l}=e;return j.jsx(zE,{size:"icon",variant:"outline",className:r,...l,type:"button",children:t})}function vhe(e){const{registry:{translateString:t}}=e;return j.jsx(Yh,{title:t(Dt.CopyButton),...e,icon:j.jsx(qde,{className:"h-4 w-4"})})}function bhe(e){const{registry:{translateString:t}}=e;return j.jsx(Yh,{title:t(Dt.MoveDownButton),...e,icon:j.jsx(OI,{className:"h-4 w-4"})})}function She(e){const{registry:{translateString:t}}=e;return j.jsx(Yh,{title:t(Dt.MoveUpButton),...e,icon:j.jsx($de,{className:"h-4 w-4"})})}function NI(e){const{registry:{translateString:t}}=e;return j.jsx(Yh,{title:t(Dt.RemoveButton),...e,className:"border-destructive",icon:j.jsx(Gde,{className:"h-4 w-4 stroke-destructive"})})}function whe({selector:e,optionSchemaField:t}){return j.jsxs("div",{className:jt("p-4 border rounded-md bg-background shadow-sm"),children:[j.jsx("div",{className:jt("mb-4"),children:e}),t]})}function xhe({description:e,title:t,properties:n,required:r,uiSchema:o,fieldPathId:s,schema:l,formData:c,optionalDataControl:u,onAddProperty:d,disabled:h,readonly:p,registry:g}){const b=ct(o),y=mt("TitleFieldTemplate",g,b),_=mt("DescriptionFieldTemplate",g,b),w=!p&&!h,{ButtonTemplates:{AddButton:T}}=g.templates;return j.jsxs(j.Fragment,{children:[t&&j.jsx(y,{id:S0(s),title:t,required:r,schema:l,uiSchema:o,registry:g,optionalDataControl:w?u:void 0}),e&&j.jsx(_,{id:pc(s),description:e,schema:l,uiSchema:o,registry:g}),j.jsxs("div",{className:"flex flex-col gap-2",children:[w?void 0:u,n.map((v,E)=>j.jsx("div",{className:`${v.hidden?"hidden":""} flex`,children:j.jsx("div",{className:"w-full",children:v.content})},E)),N$(l,o,c)?j.jsx("div",{className:"mt-2 flex justify-end",children:j.jsx(T,{id:Hi(s,"add"),onClick:d,disabled:h||p,className:"rjsf-object-property-expand",uiSchema:o,registry:g})}):null]})]})}function _he(e){const{id:t,registry:n,label:r,onAddClick:o,onRemoveClick:s}=e;return o?j.jsx(Yh,{id:t,registry:n,className:"rjsf-add-optional-data",onClick:o,title:r,icon:j.jsx(AI,{}),size:"xs"}):s?j.jsx(NI,{id:t,registry:n,className:"rjsf-remove-optional-data",onClick:s,title:r,size:"xs"}):j.jsx("em",{id:t,children:r})}function Ehe(e){const{submitText:t,norender:n,props:r}=sI(e.uiSchema);return n?null:j.jsx("div",{children:j.jsx(zE,{type:"submit",...r,className:jt("my-2",r?.className),children:t})})}var Fs=_j();const Che=ts(Fs);var The=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],as=The.reduce((e,t)=>{const n=MI(`Primitive.${t}`),r=k.forwardRef((o,s)=>{const{asChild:l,...c}=o,u=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),j.jsx(u,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Rhe="Separator",d3="horizontal",Ohe=["horizontal","vertical"],DI=k.forwardRef((e,t)=>{const{decorative:n,orientation:r=d3,...o}=e,s=Ahe(r)?r:d3,c=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return j.jsx(as.div,{"data-orientation":s,...c,...o,ref:t})});DI.displayName=Rhe;function Ahe(e){return Ohe.includes(e)}var khe=DI;function $I({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return j.jsx(khe,{"data-slot":"separator",decorative:n,orientation:t,className:jt("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),...r})}function Mhe({id:e,title:t,uiSchema:n,optionalDataControl:r}){const o=ct(n);let s=j.jsx("h5",{children:o.title||t});return r&&(s=j.jsxs("div",{className:"flex flex-row",children:[j.jsx("div",{className:"flex-grow",children:s}),j.jsx("div",{className:"flex",children:r})]})),j.jsxs("div",{id:e,className:"my-1 flex flex-col gap-0.5",children:[s,j.jsx($I,{dir:"horizontal",style:{height:"1px"},className:"my-1"})]})}function jhe({classNames:e,style:t,children:n,disabled:r,id:o,label:s,displayLabel:l,onRemoveProperty:c,onKeyRenameBlur:u,rawDescription:d,readonly:h,required:p,schema:g,uiSchema:b,registry:y}){const{templates:_,translateString:w}=y,{RemoveButton:T}=_.ButtonTemplates,v=w(Dt.KeyLabel,[s]);if(!($s in g))return j.jsx("div",{className:e,style:t,children:n});const C=l?22+(d?-28:0):0,x=`${o}-key`;return j.jsxs(j.Fragment,{children:[j.jsxs("div",{className:`grid grid-cols-12 col-span-12 items-center gap-2 ${e}`,style:t,children:[j.jsx("div",{className:"grid gap-2 col-span-5",children:j.jsxs("div",{className:"flex flex-col gap-2",children:[l&&j.jsx("label",{htmlFor:x,className:"text-sm font-medium text-muted-foreground leading-none",children:v}),j.jsx("div",{className:"pl-0.5",children:j.jsx(PI,{required:p,defaultValue:s,disabled:r||h,id:x,name:x,onBlur:h?void 0:u,type:"text",className:"w-full border shadow-sm"})}),!!d&&j.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:j.jsx("div",{className:"text-sm text-muted-foreground",children:" "})})]})}),j.jsx("div",{className:"grid gap-2 col-span-6 pr-0.5",children:n}),j.jsx("div",{className:"grid gap-2 col-span-1",style:{marginTop:`${C}px`},children:j.jsx(T,{id:Hi(o,"remove"),iconType:"block",className:"rjsf-object-property-remove w-full",disabled:r||h,onClick:c,uiSchema:b,registry:y})})]}),j.jsx($I,{dir:"horizontal",className:"mt-2"})]})}function Phe(){return{ArrayFieldItemTemplate:ihe,ArrayFieldTemplate:she,BaseInputTemplate:ahe,ButtonTemplates:{AddButton:ohe,CopyButton:vhe,MoveDownButton:bhe,MoveUpButton:She,RemoveButton:NI,SubmitButton:Ehe},DescriptionFieldTemplate:lhe,ErrorListTemplate:hhe,FieldErrorTemplate:phe,FieldHelpTemplate:mhe,FieldTemplate:ghe,GridTemplate:yhe,MultiSchemaFieldTemplate:whe,ObjectFieldTemplate:xhe,OptionalDataControlsTemplate:_he,TitleFieldTemplate:Mhe,WrapIfAdditionalTemplate:jhe}}function Nhe(e,t){const n=k.createContext(t),r=s=>{const{children:l,...c}=s,u=k.useMemo(()=>c,Object.values(c));return j.jsx(n.Provider,{value:u,children:l})};r.displayName=e+"Provider";function o(s){const l=k.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function gc(e,t=[]){let n=[];function r(s,l){const c=k.createContext(l),u=n.length;n=[...n,l];const d=p=>{const{scope:g,children:b,...y}=p,_=g?.[e]?.[u]||c,w=k.useMemo(()=>y,Object.values(y));return j.jsx(_.Provider,{value:w,children:b})};d.displayName=s+"Provider";function h(p,g){const b=g?.[e]?.[u]||c,y=k.useContext(b);if(y)return y;if(l!==void 0)return l;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[d,h]}const o=()=>{const s=n.map(l=>k.createContext(l));return function(c){const u=c?.[e]||s;return k.useMemo(()=>({[`__scope${e}`]:{...c,[e]:u}}),[c,u])}};return o.scopeName=e,[r,Dhe(o,...t)]}function Dhe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const l=r.reduce((c,{useScope:u,scopeName:d})=>{const p=u(s)[`__scope${d}`];return{...c,...p}},{});return k.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}function zn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}var Wu=globalThis?.document?k.useLayoutEffect:()=>{},$he=Th[" useInsertionEffect ".trim().toString()]||Wu;function Xh({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,l]=Ihe({defaultProp:t,onChange:n}),c=e!==void 0,u=c?e:o;{const h=k.useRef(e!==void 0);k.useEffect(()=>{const p=h.current;p!==c&&console.warn(`${r} is changing from ${p?"controlled":"uncontrolled"} to ${c?"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.`),h.current=c},[c,r])}const d=k.useCallback(h=>{if(c){const p=zhe(h)?h(e):h;p!==e&&l.current?.(p)}else s(h)},[c,e,s,l]);return[u,d]}function Ihe({defaultProp:e,onChange:t}){const[n,r]=k.useState(e),o=k.useRef(n),s=k.useRef(t);return $he(()=>{s.current=t},[t]),k.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}function zhe(e){return typeof e=="function"}function LE(e){const t=k.useRef({value:e,previous:e});return k.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function FE(e){const[t,n]=k.useState(void 0);return Wu(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let l,c;if("borderBoxSize"in s){const u=s.borderBoxSize,d=Array.isArray(u)?u[0]:u;l=d.inlineSize,c=d.blockSize}else l=e.offsetWidth,c=e.offsetHeight;n({width:l,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function Lhe(e,t){return k.useReducer((n,r)=>t[n][r]??n,e)}var bf=e=>{const{present:t,children:n}=e,r=Fhe(t),o=typeof n=="function"?n({present:r.isPresent}):k.Children.only(n),s=ur(r.ref,Uhe(o));return typeof n=="function"||r.isPresent?k.cloneElement(o,{ref:s}):null};bf.displayName="Presence";function Fhe(e){const[t,n]=k.useState(),r=k.useRef(null),o=k.useRef(e),s=k.useRef("none"),l=e?"mounted":"unmounted",[c,u]=Lhe(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return k.useEffect(()=>{const d=pg(r.current);s.current=c==="mounted"?d:"none"},[c]),Wu(()=>{const d=r.current,h=o.current;if(h!==e){const g=s.current,b=pg(d);e?u("MOUNT"):b==="none"||d?.display==="none"?u("UNMOUNT"):u(h&&g!==b?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),Wu(()=>{if(t){let d;const h=t.ownerDocument.defaultView??window,p=b=>{const _=pg(r.current).includes(CSS.escape(b.animationName));if(b.target===t&&_&&(u("ANIMATION_END"),!o.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",d=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},g=b=>{b.target===t&&(s.current=pg(r.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{h.clearTimeout(d),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:k.useCallback(d=>{r.current=d?getComputedStyle(d):null,n(d)},[])}}function pg(e){return e?.animationName||"none"}function Uhe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Ty(e){const t=Vhe(e),n=k.forwardRef((r,o)=>{const{children:s,...l}=r,c=k.Children.toArray(s),u=c.find(Bhe);if(u){const d=u.props.children,h=c.map(p=>p===u?k.Children.count(d)>1?k.Children.only(null):k.isValidElement(d)?d.props.children:null:p);return j.jsx(t,{...l,ref:o,children:k.isValidElement(d)?k.cloneElement(d,void 0,h):null})}return j.jsx(t,{...l,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function Vhe(e){const t=k.forwardRef((n,r)=>{const{children:o,...s}=n;if(k.isValidElement(o)){const l=Khe(o),c=Hhe(s,o.props);return o.type!==k.Fragment&&(c.ref=r?Wa(r,l):l),k.cloneElement(o,c)}return k.Children.count(o)>1?k.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var qhe=Symbol("radix.slottable");function Bhe(e){return k.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===qhe}function Hhe(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const u=s(...c);return o(...c),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Khe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ghe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Jn=Ghe.reduce((e,t)=>{const n=Ty(`Primitive.${t}`),r=k.forwardRef((o,s)=>{const{asChild:l,...c}=o,u=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),j.jsx(u,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Zhe(e,t){e&&Fs.flushSync(()=>e.dispatchEvent(t))}var _0="Checkbox",[Whe]=gc(_0),[Yhe,UE]=Whe(_0);function Xhe(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:s,form:l,name:c,onCheckedChange:u,required:d,value:h="on",internal_do_not_use_render:p}=e,[g,b]=Xh({prop:n,defaultProp:o??!1,onChange:u,caller:_0}),[y,_]=k.useState(null),[w,T]=k.useState(null),v=k.useRef(!1),E=y?!!l||!!y.closest("form"):!0,S={checked:g,disabled:s,setChecked:b,control:y,setControl:_,name:c,form:l,value:h,hasConsumerStoppedPropagationRef:v,required:d,defaultChecked:Ia(o)?!1:o,isFormControl:E,bubbleInput:w,setBubbleInput:T};return j.jsx(Yhe,{scope:t,...S,children:Qhe(p)?p(S):r})}var II="CheckboxTrigger",zI=k.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:s,value:l,disabled:c,checked:u,required:d,setControl:h,setChecked:p,hasConsumerStoppedPropagationRef:g,isFormControl:b,bubbleInput:y}=UE(II,e),_=ur(o,h),w=k.useRef(u);return k.useEffect(()=>{const T=s?.form;if(T){const v=()=>p(w.current);return T.addEventListener("reset",v),()=>T.removeEventListener("reset",v)}},[s,p]),j.jsx(Jn.button,{type:"button",role:"checkbox","aria-checked":Ia(u)?"mixed":u,"aria-required":d,"data-state":BI(u),"data-disabled":c?"":void 0,disabled:c,value:l,...r,ref:_,onKeyDown:zn(t,T=>{T.key==="Enter"&&T.preventDefault()}),onClick:zn(n,T=>{p(v=>Ia(v)?!0:!v),y&&b&&(g.current=T.isPropagationStopped(),g.current||T.stopPropagation())})})});zI.displayName=II;var LI=k.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:s,required:l,disabled:c,value:u,onCheckedChange:d,form:h,...p}=e;return j.jsx(Xhe,{__scopeCheckbox:n,checked:o,defaultChecked:s,disabled:c,required:l,onCheckedChange:d,name:r,form:h,value:u,internal_do_not_use_render:({isFormControl:g})=>j.jsxs(j.Fragment,{children:[j.jsx(zI,{...p,ref:t,__scopeCheckbox:n}),g&&j.jsx(qI,{__scopeCheckbox:n})]})})});LI.displayName=_0;var FI="CheckboxIndicator",UI=k.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,s=UE(FI,n);return j.jsx(bf,{present:r||Ia(s.checked)||s.checked===!0,children:j.jsx(Jn.span,{"data-state":BI(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});UI.displayName=FI;var VI="CheckboxBubbleInput",qI=k.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:s,defaultChecked:l,required:c,disabled:u,name:d,value:h,form:p,bubbleInput:g,setBubbleInput:b}=UE(VI,e),y=ur(n,b),_=LE(s),w=FE(r);k.useEffect(()=>{const v=g;if(!v)return;const E=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(E,"checked").set,x=!o.current;if(_!==s&&C){const O=new Event("click",{bubbles:x});v.indeterminate=Ia(s),C.call(v,Ia(s)?!1:s),v.dispatchEvent(O)}},[g,_,s,o]);const T=k.useRef(Ia(s)?!1:s);return j.jsx(Jn.input,{type:"checkbox","aria-hidden":!0,defaultChecked:l??T.current,required:c,disabled:u,name:d,value:h,form:p,...t,tabIndex:-1,ref:y,style:{...t.style,...w,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});qI.displayName=VI;function Qhe(e){return typeof e=="function"}function Ia(e){return e==="indeterminate"}function BI(e){return Ia(e)?"indeterminate":e?"checked":"unchecked"}function Jhe(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var epe=["color"],tpe=k.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Jhe(e,epe);return k.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),k.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:r,fillRule:"evenodd",clipRule:"evenodd"}))});function HI({className:e,...t}){return j.jsx(LI,{"data-slot":"checkbox",className:jt("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:j.jsx(UI,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:j.jsx(tpe,{className:"size-3.5"})})})}var npe="Label",KI=k.forwardRef((e,t)=>j.jsx(as.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));KI.displayName=npe;var rpe=KI;function VE({className:e,...t}){return j.jsx(rpe,{"data-slot":"label",className:jt("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 ope(e){const{id:t,htmlName:n,value:r,disabled:o,readonly:s,label:l,hideLabel:c,schema:u,autofocus:d,options:h,onChange:p,onBlur:g,onFocus:b,registry:y,uiSchema:_,className:w}=e,T=Hd(u),v=mt("DescriptionFieldTemplate",y,h),E=O=>p(O),S=()=>g(t,r),C=()=>b(t,r),x=h.description||u.description;return j.jsxs("div",{className:`relative ${o||s?"cursor-not-allowed opacity-50":""}`,"aria-describedby":wo(t),children:[!c&&x&&j.jsx(v,{id:pc(t),description:x,schema:u,uiSchema:_,registry:y}),j.jsxs("div",{className:"flex items-center gap-2 my-2",children:[j.jsx(HI,{id:t,name:n||t,checked:typeof r>"u"?!1:!!r,required:T,disabled:o||s,autoFocus:d,onCheckedChange:E,onBlur:S,onFocus:C,className:w}),j.jsx(VE,{className:"leading-tight",htmlFor:t,children:aI(l,c||!l)})]})]})}function ipe({id:e,htmlName:t,disabled:n,options:r,value:o,autofocus:s,readonly:l,required:c,onChange:u,onBlur:d,onFocus:h,className:p}){const{enumOptions:g,enumDisabled:b,inline:y,emptyValue:_}=r,w=Array.isArray(o)?o:[o],T=({target:E})=>d(e,Tr(E&&E.value,g,_)),v=({target:E})=>h(e,Tr(E&&E.value,g,_));return j.jsx("div",{className:jt({"flex flex-col gap-2":!y,"flex flex-row gap-4 flex-wrap":y}),children:Array.isArray(g)&&g.map((E,S)=>{const C=Gh(E.value,w),x=Array.isArray(b)&&b.indexOf(E.value)!==-1,O=Kl(e,S);return j.jsxs("div",{className:"flex items-center gap-2",children:[j.jsx(HI,{id:O,name:t||e,required:c,disabled:n||x||l,onCheckedChange:M=>{u(M?nI(S,w,g):eI(S,w,g))},className:p,checked:C,autoFocus:s&&S===0,onBlur:T,onFocus:v,"aria-describedby":wo(e)}),j.jsx(VE,{className:"leading-tight",htmlFor:Kl(e,S),children:E.label})]},O)})})}function GI(e){const t=e+"CollectionProvider",[n,r]=gc(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=_=>{const{scope:w,children:T}=_,v=Mo.useRef(null),E=Mo.useRef(new Map).current;return j.jsx(o,{scope:w,itemMap:E,collectionRef:v,children:T})};l.displayName=t;const c=e+"CollectionSlot",u=Ty(c),d=Mo.forwardRef((_,w)=>{const{scope:T,children:v}=_,E=s(c,T),S=ur(w,E.collectionRef);return j.jsx(u,{ref:S,children:v})});d.displayName=c;const h=e+"CollectionItemSlot",p="data-radix-collection-item",g=Ty(h),b=Mo.forwardRef((_,w)=>{const{scope:T,children:v,...E}=_,S=Mo.useRef(null),C=ur(w,S),x=s(h,T);return Mo.useEffect(()=>(x.itemMap.set(S,{ref:S,...E}),()=>{x.itemMap.delete(S)})),j.jsx(g,{[p]:"",ref:C,children:v})});b.displayName=h;function y(_){const w=s(e+"CollectionConsumer",_);return Mo.useCallback(()=>{const v=w.collectionRef.current;if(!v)return[];const E=Array.from(v.querySelectorAll(`[${p}]`));return Array.from(w.itemMap.values()).sort((x,O)=>E.indexOf(x.ref.current)-E.indexOf(O.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:l,Slot:d,ItemSlot:b},y,r]}var spe=Th[" useId ".trim().toString()]||(()=>{}),ape=0;function Zi(e){const[t,n]=k.useState(spe());return Wu(()=>{n(r=>r??String(ape++))},[e]),t?`radix-${t}`:""}function Yu(e){const t=k.useRef(e);return k.useEffect(()=>{t.current=e}),k.useMemo(()=>(...n)=>t.current?.(...n),[])}var lpe=k.createContext(void 0);function qE(e){const t=k.useContext(lpe);return e||t||"ltr"}var sS="rovingFocusGroup.onEntryFocus",cpe={bubbles:!1,cancelable:!0},Qh="RovingFocusGroup",[Jw,ZI,upe]=GI(Qh),[fpe,WI]=gc(Qh,[upe]),[dpe,hpe]=fpe(Qh),YI=k.forwardRef((e,t)=>j.jsx(Jw.Provider,{scope:e.__scopeRovingFocusGroup,children:j.jsx(Jw.Slot,{scope:e.__scopeRovingFocusGroup,children:j.jsx(ppe,{...e,ref:t})})}));YI.displayName=Qh;var ppe=k.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:l,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:h=!1,...p}=e,g=k.useRef(null),b=ur(t,g),y=qE(s),[_,w]=Xh({prop:l,defaultProp:c??null,onChange:u,caller:Qh}),[T,v]=k.useState(!1),E=Yu(d),S=ZI(n),C=k.useRef(!1),[x,O]=k.useState(0);return k.useEffect(()=>{const M=g.current;if(M)return M.addEventListener(sS,E),()=>M.removeEventListener(sS,E)},[E]),j.jsx(dpe,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:_,onItemFocus:k.useCallback(M=>w(M),[w]),onItemShiftTab:k.useCallback(()=>v(!0),[]),onFocusableItemAdd:k.useCallback(()=>O(M=>M+1),[]),onFocusableItemRemove:k.useCallback(()=>O(M=>M-1),[]),children:j.jsx(Jn.div,{tabIndex:T||x===0?-1:0,"data-orientation":r,...p,ref:b,style:{outline:"none",...e.style},onMouseDown:zn(e.onMouseDown,()=>{C.current=!0}),onFocus:zn(e.onFocus,M=>{const P=!C.current;if(M.target===M.currentTarget&&P&&!T){const z=new CustomEvent(sS,cpe);if(M.currentTarget.dispatchEvent(z),!z.defaultPrevented){const I=S().filter(Z=>Z.focusable),q=I.find(Z=>Z.active),G=I.find(Z=>Z.id===_),J=[q,G,...I].filter(Boolean).map(Z=>Z.ref.current);JI(J,h)}}C.current=!1}),onBlur:zn(e.onBlur,()=>v(!1))})})}),XI="RovingFocusGroupItem",QI=k.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:l,...c}=e,u=Zi(),d=s||u,h=hpe(XI,n),p=h.currentTabStopId===d,g=ZI(n),{onFocusableItemAdd:b,onFocusableItemRemove:y,currentTabStopId:_}=h;return k.useEffect(()=>{if(r)return b(),()=>y()},[r,b,y]),j.jsx(Jw.ItemSlot,{scope:n,id:d,focusable:r,active:o,children:j.jsx(Jn.span,{tabIndex:p?0:-1,"data-orientation":h.orientation,...c,ref:t,onMouseDown:zn(e.onMouseDown,w=>{r?h.onItemFocus(d):w.preventDefault()}),onFocus:zn(e.onFocus,()=>h.onItemFocus(d)),onKeyDown:zn(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){h.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const T=ype(w,h.orientation,h.dir);if(T!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let E=g().filter(S=>S.focusable).map(S=>S.ref.current);if(T==="last")E.reverse();else if(T==="prev"||T==="next"){T==="prev"&&E.reverse();const S=E.indexOf(w.currentTarget);E=h.loop?vpe(E,S+1):E.slice(S+1)}setTimeout(()=>JI(E))}}),children:typeof l=="function"?l({isCurrentTabStop:p,hasTabStop:_!=null}):l})})});QI.displayName=XI;var mpe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function gpe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function ype(e,t,n){const r=gpe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return mpe[r]}function JI(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function vpe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var bpe=YI,Spe=QI,BE="Radio",[wpe,e9]=gc(BE),[xpe,_pe]=wpe(BE),t9=k.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:s,disabled:l,value:c="on",onCheck:u,form:d,...h}=e,[p,g]=k.useState(null),b=ur(t,w=>g(w)),y=k.useRef(!1),_=p?d||!!p.closest("form"):!0;return j.jsxs(xpe,{scope:n,checked:o,disabled:l,children:[j.jsx(Jn.button,{type:"button",role:"radio","aria-checked":o,"data-state":i9(o),"data-disabled":l?"":void 0,disabled:l,value:c,...h,ref:b,onClick:zn(e.onClick,w=>{o||u?.(),_&&(y.current=w.isPropagationStopped(),y.current||w.stopPropagation())})}),_&&j.jsx(o9,{control:p,bubbles:!y.current,name:r,value:c,checked:o,required:s,disabled:l,form:d,style:{transform:"translateX(-100%)"}})]})});t9.displayName=BE;var n9="RadioIndicator",r9=k.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,s=_pe(n9,n);return j.jsx(bf,{present:r||s.checked,children:j.jsx(Jn.span,{"data-state":i9(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t})})});r9.displayName=n9;var Epe="RadioBubbleInput",o9=k.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},s)=>{const l=k.useRef(null),c=ur(l,s),u=LE(n),d=FE(t);return k.useEffect(()=>{const h=l.current;if(!h)return;const p=window.HTMLInputElement.prototype,b=Object.getOwnPropertyDescriptor(p,"checked").set;if(u!==n&&b){const y=new Event("click",{bubbles:r});b.call(h,n),h.dispatchEvent(y)}},[u,n,r]),j.jsx(Jn.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:c,style:{...o.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});o9.displayName=Epe;function i9(e){return e?"checked":"unchecked"}var Cpe=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],E0="RadioGroup",[Tpe]=gc(E0,[WI,e9]),s9=WI(),a9=e9(),[Rpe,Ope]=Tpe(E0),l9=k.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:s,required:l=!1,disabled:c=!1,orientation:u,dir:d,loop:h=!0,onValueChange:p,...g}=e,b=s9(n),y=qE(d),[_,w]=Xh({prop:s,defaultProp:o??null,onChange:p,caller:E0});return j.jsx(Rpe,{scope:n,name:r,required:l,disabled:c,value:_,onValueChange:w,children:j.jsx(bpe,{asChild:!0,...b,orientation:u,dir:y,loop:h,children:j.jsx(Jn.div,{role:"radiogroup","aria-required":l,"aria-orientation":u,"data-disabled":c?"":void 0,dir:y,...g,ref:t})})})});l9.displayName=E0;var c9="RadioGroupItem",u9=k.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,s=Ope(c9,n),l=s.disabled||r,c=s9(n),u=a9(n),d=k.useRef(null),h=ur(t,d),p=s.value===o.value,g=k.useRef(!1);return k.useEffect(()=>{const b=_=>{Cpe.includes(_.key)&&(g.current=!0)},y=()=>g.current=!1;return document.addEventListener("keydown",b),document.addEventListener("keyup",y),()=>{document.removeEventListener("keydown",b),document.removeEventListener("keyup",y)}},[]),j.jsx(Spe,{asChild:!0,...c,focusable:!l,active:p,children:j.jsx(t9,{disabled:l,required:s.required,checked:p,...u,...o,name:s.name,ref:h,onCheck:()=>s.onValueChange(o.value),onKeyDown:zn(b=>{b.key==="Enter"&&b.preventDefault()}),onFocus:zn(o.onFocus,()=>{g.current&&d.current?.click()})})})});u9.displayName=c9;var Ape="RadioGroupIndicator",f9=k.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=a9(n);return j.jsx(r9,{...o,...r,ref:t})});f9.displayName=Ape;var kpe=l9,Mpe=u9,jpe=f9;function Ppe({className:e,...t}){return j.jsx(kpe,{"data-slot":"radio-group",className:jt("grid gap-3",e),...t})}function Npe({className:e,...t}){return j.jsx(Mpe,{"data-slot":"radio-group-item",className:jt("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:j.jsx(jpe,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:j.jsx(Ude,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}function Dpe({id:e,options:t,value:n,required:r,disabled:o,readonly:s,onChange:l,onBlur:c,onFocus:u,className:d}){const{enumOptions:h,enumDisabled:p,emptyValue:g}=t,b=T=>l(Tr(T,h,g)),y=({target:T})=>c(e,Tr(T&&T.value,h,g)),_=({target:T})=>u(e,Tr(T&&T.value,h,g)),w=!!(t&&t.inline);return j.jsx("div",{className:"mb-0",children:j.jsx(Ppe,{defaultValue:n?.toString(),required:r,disabled:o||s,onValueChange:T=>{b(T)},onBlur:y,onFocus:_,"aria-describedby":wo(e),orientation:w?"horizontal":"vertical",className:jt("flex flex-wrap",{"flex-col":!w},d),children:Array.isArray(h)&&h.map((T,v)=>{const E=Array.isArray(p)&&p.indexOf(T.value)!==-1,S=Gh(T.value,n);return j.jsxs("div",{className:"flex items-center gap-2",children:[j.jsx(Npe,{checked:S,value:v.toString(),id:Kl(e,v),disabled:E}),j.jsx(VE,{className:"leading-tight",htmlFor:Kl(e,v),children:T.label})]},Kl(e,v))})})})}function d9(e,[t,n]){return Math.min(n,Math.max(t,e))}var h9=["PageUp","PageDown"],p9=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],m9={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Sf="Slider",[ex,$pe,Ipe]=GI(Sf),[g9]=gc(Sf,[Ipe]),[zpe,C0]=g9(Sf),y9=k.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:s=1,orientation:l="horizontal",disabled:c=!1,minStepsBetweenThumbs:u=0,defaultValue:d=[r],value:h,onValueChange:p=()=>{},onValueCommit:g=()=>{},inverted:b=!1,form:y,..._}=e,w=k.useRef(new Set),T=k.useRef(0),E=l==="horizontal"?Lpe:Fpe,[S=[],C]=Xh({prop:h,defaultProp:d,onChange:I=>{[...w.current][T.current]?.focus(),p(I)}}),x=k.useRef(S);function O(I){const q=Hpe(S,I);z(I,q)}function M(I){z(I,T.current)}function P(){const I=x.current[T.current];S[T.current]!==I&&g(S)}function z(I,q,{commit:G}={commit:!1}){const ee=Wpe(s),J=Ype(Math.round((I-r)/s)*s+r,ee),Z=d9(J,[r,o]);C((H=[])=>{const Y=qpe(H,Z,q);if(Zpe(Y,u*s)){T.current=Y.indexOf(Z);const oe=String(Y)!==String(H);return oe&&G&&g(Y),oe?Y:H}else return H})}return j.jsx(zpe,{scope:e.__scopeSlider,name:n,disabled:c,min:r,max:o,valueIndexToChangeRef:T,thumbs:w.current,values:S,orientation:l,form:y,children:j.jsx(ex.Provider,{scope:e.__scopeSlider,children:j.jsx(ex.Slot,{scope:e.__scopeSlider,children:j.jsx(E,{"aria-disabled":c,"data-disabled":c?"":void 0,..._,ref:t,onPointerDown:zn(_.onPointerDown,()=>{c||(x.current=S)}),min:r,max:o,inverted:b,onSlideStart:c?void 0:O,onSlideMove:c?void 0:M,onSlideEnd:c?void 0:P,onHomeKeyDown:()=>!c&&z(r,0,{commit:!0}),onEndKeyDown:()=>!c&&z(o,S.length-1,{commit:!0}),onStepKeyDown:({event:I,direction:q})=>{if(!c){const J=h9.includes(I.key)||I.shiftKey&&p9.includes(I.key)?10:1,Z=T.current,H=S[Z],Y=s*J*q;z(H+Y,Z,{commit:!0})}}})})})})});y9.displayName=Sf;var[v9,b9]=g9(Sf,{startEdge:"left",endEdge:"right",size:"width",direction:1}),Lpe=k.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:s,onSlideStart:l,onSlideMove:c,onSlideEnd:u,onStepKeyDown:d,...h}=e,[p,g]=k.useState(null),b=ur(t,E=>g(E)),y=k.useRef(void 0),_=qE(o),w=_==="ltr",T=w&&!s||!w&&s;function v(E){const S=y.current||p.getBoundingClientRect(),C=[0,S.width],O=HE(C,T?[n,r]:[r,n]);return y.current=S,O(E-S.left)}return j.jsx(v9,{scope:e.__scopeSlider,startEdge:T?"left":"right",endEdge:T?"right":"left",direction:T?1:-1,size:"width",children:j.jsx(S9,{dir:_,"data-orientation":"horizontal",...h,ref:b,style:{...h.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:E=>{const S=v(E.clientX);l?.(S)},onSlideMove:E=>{const S=v(E.clientX);c?.(S)},onSlideEnd:()=>{y.current=void 0,u?.()},onStepKeyDown:E=>{const C=m9[T?"from-left":"from-right"].includes(E.key);d?.({event:E,direction:C?-1:1})}})})}),Fpe=k.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:s,onSlideMove:l,onSlideEnd:c,onStepKeyDown:u,...d}=e,h=k.useRef(null),p=ur(t,h),g=k.useRef(void 0),b=!o;function y(_){const w=g.current||h.current.getBoundingClientRect(),T=[0,w.height],E=HE(T,b?[r,n]:[n,r]);return g.current=w,E(_-w.top)}return j.jsx(v9,{scope:e.__scopeSlider,startEdge:b?"bottom":"top",endEdge:b?"top":"bottom",size:"height",direction:b?1:-1,children:j.jsx(S9,{"data-orientation":"vertical",...d,ref:p,style:{...d.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:_=>{const w=y(_.clientY);s?.(w)},onSlideMove:_=>{const w=y(_.clientY);l?.(w)},onSlideEnd:()=>{g.current=void 0,c?.()},onStepKeyDown:_=>{const T=m9[b?"from-bottom":"from-top"].includes(_.key);u?.({event:_,direction:T?-1:1})}})})}),S9=k.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:s,onHomeKeyDown:l,onEndKeyDown:c,onStepKeyDown:u,...d}=e,h=C0(Sf,n);return j.jsx(Jn.span,{...d,ref:t,onKeyDown:zn(e.onKeyDown,p=>{p.key==="Home"?(l(p),p.preventDefault()):p.key==="End"?(c(p),p.preventDefault()):h9.concat(p9).includes(p.key)&&(u(p),p.preventDefault())}),onPointerDown:zn(e.onPointerDown,p=>{const g=p.target;g.setPointerCapture(p.pointerId),p.preventDefault(),h.thumbs.has(g)?g.focus():r(p)}),onPointerMove:zn(e.onPointerMove,p=>{p.target.hasPointerCapture(p.pointerId)&&o(p)}),onPointerUp:zn(e.onPointerUp,p=>{const g=p.target;g.hasPointerCapture(p.pointerId)&&(g.releasePointerCapture(p.pointerId),s(p))})})}),w9="SliderTrack",x9=k.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=C0(w9,n);return j.jsx(Jn.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});x9.displayName=w9;var tx="SliderRange",_9=k.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=C0(tx,n),s=b9(tx,n),l=k.useRef(null),c=ur(t,l),u=o.values.length,d=o.values.map(g=>T9(g,o.min,o.max)),h=u>1?Math.min(...d):0,p=100-Math.max(...d);return j.jsx(Jn.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:c,style:{...e.style,[s.startEdge]:h+"%",[s.endEdge]:p+"%"}})});_9.displayName=tx;var nx="SliderThumb",E9=k.forwardRef((e,t)=>{const n=$pe(e.__scopeSlider),[r,o]=k.useState(null),s=ur(t,c=>o(c)),l=k.useMemo(()=>r?n().findIndex(c=>c.ref.current===r):-1,[n,r]);return j.jsx(Upe,{...e,ref:s,index:l})}),Upe=k.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...s}=e,l=C0(nx,n),c=b9(nx,n),[u,d]=k.useState(null),h=ur(t,v=>d(v)),p=u?l.form||!!u.closest("form"):!0,g=FE(u),b=l.values[r],y=b===void 0?0:T9(b,l.min,l.max),_=Bpe(r,l.values.length),w=g?.[c.size],T=w?Kpe(w,y,c.direction):0;return k.useEffect(()=>{if(u)return l.thumbs.add(u),()=>{l.thumbs.delete(u)}},[u,l.thumbs]),j.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[c.startEdge]:`calc(${y}% + ${T}px)`},children:[j.jsx(ex.ItemSlot,{scope:e.__scopeSlider,children:j.jsx(Jn.span,{role:"slider","aria-label":e["aria-label"]||_,"aria-valuemin":l.min,"aria-valuenow":b,"aria-valuemax":l.max,"aria-orientation":l.orientation,"data-orientation":l.orientation,"data-disabled":l.disabled?"":void 0,tabIndex:l.disabled?void 0:0,...s,ref:h,style:b===void 0?{display:"none"}:e.style,onFocus:zn(e.onFocus,()=>{l.valueIndexToChangeRef.current=r})})}),p&&j.jsx(C9,{name:o??(l.name?l.name+(l.values.length>1?"[]":""):void 0),form:l.form,value:b},r)]})});E9.displayName=nx;var Vpe="RadioBubbleInput",C9=k.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const o=k.useRef(null),s=ur(o,r),l=LE(t);return k.useEffect(()=>{const c=o.current;if(!c)return;const u=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(u,"value").set;if(l!==t&&h){const p=new Event("input",{bubbles:!0});h.call(c,t),c.dispatchEvent(p)}},[l,t]),j.jsx(Jn.input,{style:{display:"none"},...n,ref:s,defaultValue:t})});C9.displayName=Vpe;function qpe(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,s)=>o-s)}function T9(e,t,n){const s=100/(n-t)*(e-t);return d9(s,[0,100])}function Bpe(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function Hpe(e,t){if(e.length===1)return 0;const n=e.map(o=>Math.abs(o-t)),r=Math.min(...n);return n.indexOf(r)}function Kpe(e,t,n){const r=e/2,s=HE([0,50],[0,r]);return(r-s(t)*n)*n}function Gpe(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function Zpe(e,t){if(t>0){const n=Gpe(e);return Math.min(...n)>=t}return!0}function HE(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Wpe(e){return(String(e).split(".")[1]||"").length}function Ype(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var Xpe=y9,Qpe=x9,Jpe=_9,eme=E9;function tme({className:e,defaultValue:t,value:n,min:r=0,max:o=100,...s}){const l=k.useMemo(()=>Array.isArray(n)?n:Array.isArray(t)?t:[r,o],[n,t,r,o]);return j.jsxs(Xpe,{"data-slot":"slider",defaultValue:t,value:n,min:r,max:o,className:jt("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),...s,children:[j.jsx(Qpe,{"data-slot":"slider-track",className:jt("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:j.jsx(Jpe,{"data-slot":"slider-range",className:jt("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:l.length},(c,u)=>j.jsx(eme,{"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"},u))]})}const nme=["name","min","max","step","orientation","disabled","defaultValue","value","onValueChange","className","dir","inverted","minStepsBetweenThumbs"];function rme({value:e,readonly:t,disabled:n,options:r,schema:o,onChange:s,label:l,id:c}){const u=p=>s(p[0]),d={...oI(o)},h={id:c,...e_(r.props||{},nme)};return j.jsxs(j.Fragment,{children:[j.jsx(tme,{disabled:n||t,min:d.min,max:d.max,step:d.step,value:[e],onValueChange:u,...h,"aria-describedby":wo(c)}),e]})}var h3=1,ome=.9,ime=.8,sme=.17,aS=.1,lS=.999,ame=.9999,lme=.99,cme=/[\\\/_+.#"@\[\(\{&]/,ume=/[\\\/_+.#"@\[\(\{&]/g,fme=/[\s-]/,R9=/[\s-]/g;function rx(e,t,n,r,o,s,l){if(s===t.length)return o===e.length?h3:lme;var c=`${o},${s}`;if(l[c]!==void 0)return l[c];for(var u=r.charAt(s),d=n.indexOf(u,o),h=0,p,g,b,y;d>=0;)p=rx(e,t,n,r,d+1,s+1,l),p>h&&(d===o?p*=h3:cme.test(e.charAt(d-1))?(p*=ime,b=e.slice(o,d-1).match(ume),b&&o>0&&(p*=Math.pow(lS,b.length))):fme.test(e.charAt(d-1))?(p*=ome,y=e.slice(o,d-1).match(R9),y&&o>0&&(p*=Math.pow(lS,y.length))):(p*=sme,o>0&&(p*=Math.pow(lS,d-o))),e.charAt(d)!==t.charAt(s)&&(p*=ame)),(p<aS&&n.charAt(d-1)===r.charAt(s+1)||r.charAt(s+1)===r.charAt(s)&&n.charAt(d-1)!==r.charAt(s))&&(g=rx(e,t,n,r,d+1,s+2,l),g*aS>p&&(p=g*aS)),p>h&&(h=p),d=n.indexOf(u,d+1);return l[c]=h,h}function p3(e){return e.toLowerCase().replace(R9," ")}function dme(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,rx(e,t,p3(e),p3(t),0,0,{})}function hme(e,t=globalThis?.document){const n=Yu(e);k.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var pme="DismissableLayer",ox="dismissableLayer.update",mme="dismissableLayer.pointerDownOutside",gme="dismissableLayer.focusOutside",m3,O9=k.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),A9=k.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:l,onDismiss:c,...u}=e,d=k.useContext(O9),[h,p]=k.useState(null),g=h?.ownerDocument??globalThis?.document,[,b]=k.useState({}),y=ur(t,O=>p(O)),_=Array.from(d.layers),[w]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),T=_.indexOf(w),v=h?_.indexOf(h):-1,E=d.layersWithOutsidePointerEventsDisabled.size>0,S=v>=T,C=bme(O=>{const M=O.target,P=[...d.branches].some(z=>z.contains(M));!S||P||(o?.(O),l?.(O),O.defaultPrevented||c?.())},g),x=Sme(O=>{const M=O.target;[...d.branches].some(z=>z.contains(M))||(s?.(O),l?.(O),O.defaultPrevented||c?.())},g);return hme(O=>{v===d.layers.size-1&&(r?.(O),!O.defaultPrevented&&c&&(O.preventDefault(),c()))},g),k.useEffect(()=>{if(h)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(m3=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(h)),d.layers.add(h),g3(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=m3)}},[h,g,n,d]),k.useEffect(()=>()=>{h&&(d.layers.delete(h),d.layersWithOutsidePointerEventsDisabled.delete(h),g3())},[h,d]),k.useEffect(()=>{const O=()=>b({});return document.addEventListener(ox,O),()=>document.removeEventListener(ox,O)},[]),j.jsx(Jn.div,{...u,ref:y,style:{pointerEvents:E?S?"auto":"none":void 0,...e.style},onFocusCapture:zn(e.onFocusCapture,x.onFocusCapture),onBlurCapture:zn(e.onBlurCapture,x.onBlurCapture),onPointerDownCapture:zn(e.onPointerDownCapture,C.onPointerDownCapture)})});A9.displayName=pme;var yme="DismissableLayerBranch",vme=k.forwardRef((e,t)=>{const n=k.useContext(O9),r=k.useRef(null),o=ur(t,r);return k.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),j.jsx(Jn.div,{...e,ref:o})});vme.displayName=yme;function bme(e,t=globalThis?.document){const n=Yu(e),r=k.useRef(!1),o=k.useRef(()=>{});return k.useEffect(()=>{const s=c=>{if(c.target&&!r.current){let u=function(){k9(mme,n,d,{discrete:!0})};const d={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Sme(e,t=globalThis?.document){const n=Yu(e),r=k.useRef(!1);return k.useEffect(()=>{const o=s=>{s.target&&!r.current&&k9(gme,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function g3(){const e=new CustomEvent(ox);document.dispatchEvent(e)}function k9(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Zhe(o,s):o.dispatchEvent(s)}var cS="focusScope.autoFocusOnMount",uS="focusScope.autoFocusOnUnmount",y3={bubbles:!1,cancelable:!0},wme="FocusScope",M9=k.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...l}=e,[c,u]=k.useState(null),d=Yu(o),h=Yu(s),p=k.useRef(null),g=ur(t,_=>u(_)),b=k.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;k.useEffect(()=>{if(r){let _=function(E){if(b.paused||!c)return;const S=E.target;c.contains(S)?p.current=S:Ta(p.current,{select:!0})},w=function(E){if(b.paused||!c)return;const S=E.relatedTarget;S!==null&&(c.contains(S)||Ta(p.current,{select:!0}))},T=function(E){if(document.activeElement===document.body)for(const C of E)C.removedNodes.length>0&&Ta(c)};document.addEventListener("focusin",_),document.addEventListener("focusout",w);const v=new MutationObserver(T);return c&&v.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",_),document.removeEventListener("focusout",w),v.disconnect()}}},[r,c,b.paused]),k.useEffect(()=>{if(c){b3.add(b);const _=document.activeElement;if(!c.contains(_)){const T=new CustomEvent(cS,y3);c.addEventListener(cS,d),c.dispatchEvent(T),T.defaultPrevented||(xme(Rme(j9(c)),{select:!0}),document.activeElement===_&&Ta(c))}return()=>{c.removeEventListener(cS,d),setTimeout(()=>{const T=new CustomEvent(uS,y3);c.addEventListener(uS,h),c.dispatchEvent(T),T.defaultPrevented||Ta(_??document.body,{select:!0}),c.removeEventListener(uS,h),b3.remove(b)},0)}}},[c,d,h,b]);const y=k.useCallback(_=>{if(!n&&!r||b.paused)return;const w=_.key==="Tab"&&!_.altKey&&!_.ctrlKey&&!_.metaKey,T=document.activeElement;if(w&&T){const v=_.currentTarget,[E,S]=_me(v);E&&S?!_.shiftKey&&T===S?(_.preventDefault(),n&&Ta(E,{select:!0})):_.shiftKey&&T===E&&(_.preventDefault(),n&&Ta(S,{select:!0})):T===v&&_.preventDefault()}},[n,r,b.paused]);return j.jsx(Jn.div,{tabIndex:-1,...l,ref:g,onKeyDown:y})});M9.displayName=wme;function xme(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ta(r,{select:t}),document.activeElement!==n)return}function _me(e){const t=j9(e),n=v3(t,e),r=v3(t.reverse(),e);return[n,r]}function j9(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function v3(e,t){for(const n of e)if(!Eme(n,{upTo:t}))return n}function Eme(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 Cme(e){return e instanceof HTMLInputElement&&"select"in e}function Ta(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Cme(e)&&t&&e.select()}}var b3=Tme();function Tme(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=S3(e,t),e.unshift(t)},remove(t){e=S3(e,t),e[0]?.resume()}}}function S3(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Rme(e){return e.filter(t=>t.tagName!=="A")}var Ome="Portal",P9=k.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=k.useState(!1);Wu(()=>s(!0),[]);const l=n||o&&globalThis?.document?.body;return l?Che.createPortal(j.jsx(Jn.div,{...r,ref:t}),l):null});P9.displayName=Ome;var fS=0;function Ame(){k.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??w3()),document.body.insertAdjacentElement("beforeend",e[1]??w3()),fS++,()=>{fS===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),fS--}},[])}function w3(){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 Vi=function(){return Vi=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Vi.apply(this,arguments)};function N9(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function ix(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function kme(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var Hg="right-scroll-bar-position",Kg="width-before-scroll-bar",Mme="with-scroll-bars-hidden",jme="--removed-body-scroll-bar-size";function dS(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Pme(e,t){var n=k.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Nme=typeof window<"u"?k.useLayoutEffect:k.useEffect,x3=new WeakMap;function Dme(e,t){var n=Pme(null,function(r){return e.forEach(function(o){return dS(o,r)})});return Nme(function(){var r=x3.get(n);if(r){var o=new Set(r),s=new Set(e),l=n.current;o.forEach(function(c){s.has(c)||dS(c,null)}),s.forEach(function(c){o.has(c)||dS(c,l)})}x3.set(n,e)},[e]),n}function $me(e){return e}function Ime(e,t){t===void 0&&(t=$me);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var l=t(s,r);return n.push(l),function(){n=n.filter(function(c){return c!==l})}},assignSyncMedium:function(s){for(r=!0;n.length;){var l=n;n=[],l.forEach(s)}n={push:function(c){return s(c)},filter:function(){return n}}},assignMedium:function(s){r=!0;var l=[];if(n.length){var c=n;n=[],c.forEach(s),l=n}var u=function(){var h=l;l=[],h.forEach(s)},d=function(){return Promise.resolve().then(u)};d(),n={push:function(h){l.push(h),d()},filter:function(h){return l=l.filter(h),n}}}};return o}function zme(e){e===void 0&&(e={});var t=Ime(null);return t.options=Vi({async:!0,ssr:!1},e),t}var D9=function(e){var t=e.sideCar,n=N9(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return k.createElement(r,Vi({},n))};D9.isSideCarExport=!0;function Lme(e,t){return e.useMedium(t),D9}var $9=zme(),hS=function(){},T0=k.forwardRef(function(e,t){var n=k.useRef(null),r=k.useState({onScrollCapture:hS,onWheelCapture:hS,onTouchMoveCapture:hS}),o=r[0],s=r[1],l=e.forwardProps,c=e.children,u=e.className,d=e.removeScrollBar,h=e.enabled,p=e.shards,g=e.sideCar,b=e.noRelative,y=e.noIsolation,_=e.inert,w=e.allowPinchZoom,T=e.as,v=T===void 0?"div":T,E=e.gapMode,S=N9(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=g,x=Dme([n,t]),O=Vi(Vi({},S),o);return k.createElement(k.Fragment,null,h&&k.createElement(C,{sideCar:$9,removeScrollBar:d,shards:p,noRelative:b,noIsolation:y,inert:_,setCallbacks:s,allowPinchZoom:!!w,lockRef:n,gapMode:E}),l?k.cloneElement(k.Children.only(c),Vi(Vi({},O),{ref:x})):k.createElement(v,Vi({},O,{className:u,ref:x}),c))});T0.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};T0.classNames={fullWidth:Kg,zeroRight:Hg};var Fme=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Ume(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Fme();return t&&e.setAttribute("nonce",t),e}function Vme(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function qme(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Bme=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Ume())&&(Vme(t,n),qme(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Hme=function(){var e=Bme();return function(t,n){k.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},I9=function(){var e=Hme(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Kme={left:0,top:0,right:0,gap:0},pS=function(e){return parseInt(e||"",10)||0},Gme=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[pS(n),pS(r),pS(o)]},Zme=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Kme;var t=Gme(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Wme=I9(),Au="data-scroll-locked",Yme=function(e,t,n,r){var o=e.left,s=e.top,l=e.right,c=e.gap;return n===void 0&&(n="margin"),`
84
- .`.concat(Mme,` {
85
- overflow: hidden `).concat(r,`;
86
- padding-right: `).concat(c,"px ").concat(r,`;
87
- }
88
- body[`).concat(Au,`] {
89
- overflow: hidden `).concat(r,`;
90
- overscroll-behavior: contain;
91
- `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
92
- padding-left: `.concat(o,`px;
93
- padding-top: `).concat(s,`px;
94
- padding-right: `).concat(l,`px;
95
- margin-left:0;
96
- margin-top:0;
97
- margin-right: `).concat(c,"px ").concat(r,`;
98
- `),n==="padding"&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),`
99
- }
100
-
101
- .`).concat(Hg,` {
102
- right: `).concat(c,"px ").concat(r,`;
103
- }
104
-
105
- .`).concat(Kg,` {
106
- margin-right: `).concat(c,"px ").concat(r,`;
107
- }
108
-
109
- .`).concat(Hg," .").concat(Hg,` {
110
- right: 0 `).concat(r,`;
111
- }
112
-
113
- .`).concat(Kg," .").concat(Kg,` {
114
- margin-right: 0 `).concat(r,`;
115
- }
116
-
117
- body[`).concat(Au,`] {
118
- `).concat(jme,": ").concat(c,`px;
119
- }
120
- `)},_3=function(){var e=parseInt(document.body.getAttribute(Au)||"0",10);return isFinite(e)?e:0},Xme=function(){k.useEffect(function(){return document.body.setAttribute(Au,(_3()+1).toString()),function(){var e=_3()-1;e<=0?document.body.removeAttribute(Au):document.body.setAttribute(Au,e.toString())}},[])},Qme=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Xme();var s=k.useMemo(function(){return Zme(o)},[o]);return k.createElement(Wme,{styles:Yme(s,!t,o,n?"":"!important")})},sx=!1;if(typeof window<"u")try{var mg=Object.defineProperty({},"passive",{get:function(){return sx=!0,!0}});window.addEventListener("test",mg,mg),window.removeEventListener("test",mg,mg)}catch{sx=!1}var iu=sx?{passive:!1}:!1,Jme=function(e){return e.tagName==="TEXTAREA"},z9=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Jme(e)&&n[t]==="visible")},ege=function(e){return z9(e,"overflowY")},tge=function(e){return z9(e,"overflowX")},E3=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=L9(e,r);if(o){var s=F9(e,r),l=s[1],c=s[2];if(l>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},nge=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},rge=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},L9=function(e,t){return e==="v"?ege(t):tge(t)},F9=function(e,t){return e==="v"?nge(t):rge(t)},oge=function(e,t){return e==="h"&&t==="rtl"?-1:1},ige=function(e,t,n,r,o){var s=oge(e,window.getComputedStyle(t).direction),l=s*r,c=n.target,u=t.contains(c),d=!1,h=l>0,p=0,g=0;do{if(!c)break;var b=F9(e,c),y=b[0],_=b[1],w=b[2],T=_-w-s*y;(y||T)&&L9(e,c)&&(p+=T,g+=y);var v=c.parentNode;c=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!u&&c!==document.body||u&&(t.contains(c)||t===c));return(h&&Math.abs(p)<1||!h&&Math.abs(g)<1)&&(d=!0),d},gg=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},C3=function(e){return[e.deltaX,e.deltaY]},T3=function(e){return e&&"current"in e?e.current:e},sge=function(e,t){return e[0]===t[0]&&e[1]===t[1]},age=function(e){return`
121
- .block-interactivity-`.concat(e,` {pointer-events: none;}
122
- .allow-interactivity-`).concat(e,` {pointer-events: all;}
123
- `)},lge=0,su=[];function cge(e){var t=k.useRef([]),n=k.useRef([0,0]),r=k.useRef(),o=k.useState(lge++)[0],s=k.useState(I9)[0],l=k.useRef(e);k.useEffect(function(){l.current=e},[e]),k.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var _=kme([e.lockRef.current],(e.shards||[]).map(T3),!0).filter(Boolean);return _.forEach(function(w){return w.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),_.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var c=k.useCallback(function(_,w){if("touches"in _&&_.touches.length===2||_.type==="wheel"&&_.ctrlKey)return!l.current.allowPinchZoom;var T=gg(_),v=n.current,E="deltaX"in _?_.deltaX:v[0]-T[0],S="deltaY"in _?_.deltaY:v[1]-T[1],C,x=_.target,O=Math.abs(E)>Math.abs(S)?"h":"v";if("touches"in _&&O==="h"&&x.type==="range")return!1;var M=window.getSelection(),P=M&&M.anchorNode,z=P?P===x||P.contains(x):!1;if(z)return!1;var I=E3(O,x);if(!I)return!0;if(I?C=O:(C=O==="v"?"h":"v",I=E3(O,x)),!I)return!1;if(!r.current&&"changedTouches"in _&&(E||S)&&(r.current=C),!C)return!0;var q=r.current||C;return ige(q,w,_,q==="h"?E:S)},[]),u=k.useCallback(function(_){var w=_;if(!(!su.length||su[su.length-1]!==s)){var T="deltaY"in w?C3(w):gg(w),v=t.current.filter(function(C){return C.name===w.type&&(C.target===w.target||w.target===C.shadowParent)&&sge(C.delta,T)})[0];if(v&&v.should){w.cancelable&&w.preventDefault();return}if(!v){var E=(l.current.shards||[]).map(T3).filter(Boolean).filter(function(C){return C.contains(w.target)}),S=E.length>0?c(w,E[0]):!l.current.noIsolation;S&&w.cancelable&&w.preventDefault()}}},[]),d=k.useCallback(function(_,w,T,v){var E={name:_,delta:w,target:T,should:v,shadowParent:uge(T)};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(S){return S!==E})},1)},[]),h=k.useCallback(function(_){n.current=gg(_),r.current=void 0},[]),p=k.useCallback(function(_){d(_.type,C3(_),_.target,c(_,e.lockRef.current))},[]),g=k.useCallback(function(_){d(_.type,gg(_),_.target,c(_,e.lockRef.current))},[]);k.useEffect(function(){return su.push(s),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:g}),document.addEventListener("wheel",u,iu),document.addEventListener("touchmove",u,iu),document.addEventListener("touchstart",h,iu),function(){su=su.filter(function(_){return _!==s}),document.removeEventListener("wheel",u,iu),document.removeEventListener("touchmove",u,iu),document.removeEventListener("touchstart",h,iu)}},[]);var b=e.removeScrollBar,y=e.inert;return k.createElement(k.Fragment,null,y?k.createElement(s,{styles:age(o)}):null,b?k.createElement(Qme,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function uge(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const fge=Lme($9,cge);var U9=k.forwardRef(function(e,t){return k.createElement(T0,Vi({},e,{ref:t,sideCar:fge}))});U9.classNames=T0.classNames;var dge=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},au=new WeakMap,yg=new WeakMap,vg={},mS=0,V9=function(e){return e&&(e.host||V9(e.parentNode))},hge=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=V9(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},pge=function(e,t,n,r){var o=hge(t,Array.isArray(e)?e:[e]);vg[n]||(vg[n]=new WeakMap);var s=vg[n],l=[],c=new Set,u=new Set(o),d=function(p){!p||c.has(p)||(c.add(p),d(p.parentNode))};o.forEach(d);var h=function(p){!p||u.has(p)||Array.prototype.forEach.call(p.children,function(g){if(c.has(g))h(g);else try{var b=g.getAttribute(r),y=b!==null&&b!=="false",_=(au.get(g)||0)+1,w=(s.get(g)||0)+1;au.set(g,_),s.set(g,w),l.push(g),_===1&&y&&yg.set(g,!0),w===1&&g.setAttribute(n,"true"),y||g.setAttribute(r,"true")}catch(T){console.error("aria-hidden: cannot operate on ",g,T)}})};return h(t),c.clear(),mS++,function(){l.forEach(function(p){var g=au.get(p)-1,b=s.get(p)-1;au.set(p,g),s.set(p,b),g||(yg.has(p)||p.removeAttribute(r),yg.delete(p)),b||p.removeAttribute(n)}),mS--,mS||(au=new WeakMap,au=new WeakMap,yg=new WeakMap,vg={})}},mge=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=dge(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),pge(r,o,n,"aria-hidden")):function(){return null}},R0="Dialog",[q9]=gc(R0),[gge,Ri]=q9(R0),B9=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:l=!0}=e,c=k.useRef(null),u=k.useRef(null),[d,h]=Xh({prop:r,defaultProp:o??!1,onChange:s,caller:R0});return j.jsx(gge,{scope:t,triggerRef:c,contentRef:u,contentId:Zi(),titleId:Zi(),descriptionId:Zi(),open:d,onOpenChange:h,onOpenToggle:k.useCallback(()=>h(p=>!p),[h]),modal:l,children:n})};B9.displayName=R0;var H9="DialogTrigger",yge=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ri(H9,n),s=ur(t,o.triggerRef);return j.jsx(Jn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ZE(o.open),...r,ref:s,onClick:zn(e.onClick,o.onOpenToggle)})});yge.displayName=H9;var KE="DialogPortal",[vge,K9]=q9(KE,{forceMount:void 0}),G9=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=Ri(KE,t);return j.jsx(vge,{scope:t,forceMount:n,children:k.Children.map(r,l=>j.jsx(bf,{present:n||s.open,children:j.jsx(P9,{asChild:!0,container:o,children:l})}))})};G9.displayName=KE;var Ry="DialogOverlay",Z9=k.forwardRef((e,t)=>{const n=K9(Ry,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=Ri(Ry,e.__scopeDialog);return s.modal?j.jsx(bf,{present:r||s.open,children:j.jsx(Sge,{...o,ref:t})}):null});Z9.displayName=Ry;var bge=Ty("DialogOverlay.RemoveScroll"),Sge=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ri(Ry,n);return j.jsx(U9,{as:bge,allowPinchZoom:!0,shards:[o.contentRef],children:j.jsx(Jn.div,{"data-state":ZE(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),nc="DialogContent",W9=k.forwardRef((e,t)=>{const n=K9(nc,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=Ri(nc,e.__scopeDialog);return j.jsx(bf,{present:r||s.open,children:s.modal?j.jsx(wge,{...o,ref:t}):j.jsx(xge,{...o,ref:t})})});W9.displayName=nc;var wge=k.forwardRef((e,t)=>{const n=Ri(nc,e.__scopeDialog),r=k.useRef(null),o=ur(t,n.contentRef,r);return k.useEffect(()=>{const s=r.current;if(s)return mge(s)},[]),j.jsx(Y9,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:zn(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:zn(e.onPointerDownOutside,s=>{const l=s.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0;(l.button===2||c)&&s.preventDefault()}),onFocusOutside:zn(e.onFocusOutside,s=>s.preventDefault())})}),xge=k.forwardRef((e,t)=>{const n=Ri(nc,e.__scopeDialog),r=k.useRef(!1),o=k.useRef(!1);return j.jsx(Y9,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const l=s.target;n.triggerRef.current?.contains(l)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),Y9=k.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...l}=e,c=Ri(nc,n),u=k.useRef(null),d=ur(t,u);return Ame(),j.jsxs(j.Fragment,{children:[j.jsx(M9,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:j.jsx(A9,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":ZE(c.open),...l,ref:d,onDismiss:()=>c.onOpenChange(!1)})}),j.jsxs(j.Fragment,{children:[j.jsx(Tge,{titleId:c.titleId}),j.jsx(Oge,{contentRef:u,descriptionId:c.descriptionId})]})]})}),GE="DialogTitle",_ge=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ri(GE,n);return j.jsx(Jn.h2,{id:o.titleId,...r,ref:t})});_ge.displayName=GE;var X9="DialogDescription",Ege=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ri(X9,n);return j.jsx(Jn.p,{id:o.descriptionId,...r,ref:t})});Ege.displayName=X9;var Q9="DialogClose",Cge=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ri(Q9,n);return j.jsx(Jn.button,{type:"button",...r,ref:t,onClick:zn(e.onClick,()=>o.onOpenChange(!1))})});Cge.displayName=Q9;function ZE(e){return e?"open":"closed"}var J9="DialogTitleWarning",[iwe,e6]=Nhe(J9,{contentName:nc,titleName:GE,docsSlug:"dialog"}),Tge=({titleId:e})=>{const t=e6(J9),n=`\`${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 k.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Rge="DialogDescriptionWarning",Oge=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${e6(Rge).contentName}}.`;return k.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Age=B9,kge=G9,Mge=Z9,jge=W9,Ed='[cmdk-group=""]',gS='[cmdk-group-items=""]',Pge='[cmdk-group-heading=""]',t6='[cmdk-item=""]',R3=`${t6}:not([aria-disabled="true"])`,ax="cmdk-item-select",cu="data-value",Nge=(e,t,n)=>dme(e,t,n),n6=k.createContext(void 0),Jh=()=>k.useContext(n6),r6=k.createContext(void 0),WE=()=>k.useContext(r6),o6=k.createContext(void 0),i6=k.forwardRef((e,t)=>{let n=uu(()=>{var V,U;return{search:"",value:(U=(V=e.value)!=null?V:e.defaultValue)!=null?U:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=uu(()=>new Set),o=uu(()=>new Map),s=uu(()=>new Map),l=uu(()=>new Set),c=s6(e),{label:u,children:d,value:h,onValueChange:p,filter:g,shouldFilter:b,loop:y,disablePointerSelection:_=!1,vimBindings:w=!0,...T}=e,v=Zi(),E=Zi(),S=Zi(),C=k.useRef(null),x=Hge();rc(()=>{if(h!==void 0){let V=h.trim();n.current.value=V,O.emit()}},[h]),rc(()=>{x(6,G)},[]);let O=k.useMemo(()=>({subscribe:V=>(l.current.add(V),()=>l.current.delete(V)),snapshot:()=>n.current,setState:(V,U,D)=>{var B,te,re,le;if(!Object.is(n.current[V],U)){if(n.current[V]=U,V==="search")q(),z(),x(1,I);else if(V==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ge=document.getElementById(S);ge?ge.focus():(B=document.getElementById(v))==null||B.focus()}if(x(7,()=>{var ge;n.current.selectedItemId=(ge=ee())==null?void 0:ge.id,O.emit()}),D||x(5,G),((te=c.current)==null?void 0:te.value)!==void 0){let ge=U??"";(le=(re=c.current).onValueChange)==null||le.call(re,ge);return}}O.emit()}},emit:()=>{l.current.forEach(V=>V())}}),[]),M=k.useMemo(()=>({value:(V,U,D)=>{var B;U!==((B=s.current.get(V))==null?void 0:B.value)&&(s.current.set(V,{value:U,keywords:D}),n.current.filtered.items.set(V,P(U,D)),x(2,()=>{z(),O.emit()}))},item:(V,U)=>(r.current.add(V),U&&(o.current.has(U)?o.current.get(U).add(V):o.current.set(U,new Set([V]))),x(3,()=>{q(),z(),n.current.value||I(),O.emit()}),()=>{s.current.delete(V),r.current.delete(V),n.current.filtered.items.delete(V);let D=ee();x(4,()=>{q(),D?.getAttribute("id")===V&&I(),O.emit()})}),group:V=>(o.current.has(V)||o.current.set(V,new Set),()=>{s.current.delete(V),o.current.delete(V)}),filter:()=>c.current.shouldFilter,label:u||e["aria-label"],getDisablePointerSelection:()=>c.current.disablePointerSelection,listId:v,inputId:S,labelId:E,listInnerRef:C}),[]);function P(V,U){var D,B;let te=(B=(D=c.current)==null?void 0:D.filter)!=null?B:Nge;return V?te(V,n.current.search,U):0}function z(){if(!n.current.search||c.current.shouldFilter===!1)return;let V=n.current.filtered.items,U=[];n.current.filtered.groups.forEach(B=>{let te=o.current.get(B),re=0;te.forEach(le=>{let ge=V.get(le);re=Math.max(ge,re)}),U.push([B,re])});let D=C.current;J().sort((B,te)=>{var re,le;let ge=B.getAttribute("id"),Me=te.getAttribute("id");return((re=V.get(Me))!=null?re:0)-((le=V.get(ge))!=null?le:0)}).forEach(B=>{let te=B.closest(gS);te?te.appendChild(B.parentElement===te?B:B.closest(`${gS} > *`)):D.appendChild(B.parentElement===D?B:B.closest(`${gS} > *`))}),U.sort((B,te)=>te[1]-B[1]).forEach(B=>{var te;let re=(te=C.current)==null?void 0:te.querySelector(`${Ed}[${cu}="${encodeURIComponent(B[0])}"]`);re?.parentElement.appendChild(re)})}function I(){let V=J().find(D=>D.getAttribute("aria-disabled")!=="true"),U=V?.getAttribute(cu);O.setState("value",U||void 0)}function q(){var V,U,D,B;if(!n.current.search||c.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let te=0;for(let re of r.current){let le=(U=(V=s.current.get(re))==null?void 0:V.value)!=null?U:"",ge=(B=(D=s.current.get(re))==null?void 0:D.keywords)!=null?B:[],Me=P(le,ge);n.current.filtered.items.set(re,Me),Me>0&&te++}for(let[re,le]of o.current)for(let ge of le)if(n.current.filtered.items.get(ge)>0){n.current.filtered.groups.add(re);break}n.current.filtered.count=te}function G(){var V,U,D;let B=ee();B&&(((V=B.parentElement)==null?void 0:V.firstChild)===B&&((D=(U=B.closest(Ed))==null?void 0:U.querySelector(Pge))==null||D.scrollIntoView({block:"nearest"})),B.scrollIntoView({block:"nearest"}))}function ee(){var V;return(V=C.current)==null?void 0:V.querySelector(`${t6}[aria-selected="true"]`)}function J(){var V;return Array.from(((V=C.current)==null?void 0:V.querySelectorAll(R3))||[])}function Z(V){let U=J()[V];U&&O.setState("value",U.getAttribute(cu))}function H(V){var U;let D=ee(),B=J(),te=B.findIndex(le=>le===D),re=B[te+V];(U=c.current)!=null&&U.loop&&(re=te+V<0?B[B.length-1]:te+V===B.length?B[0]:B[te+V]),re&&O.setState("value",re.getAttribute(cu))}function Y(V){let U=ee(),D=U?.closest(Ed),B;for(;D&&!B;)D=V>0?qge(D,Ed):Bge(D,Ed),B=D?.querySelector(R3);B?O.setState("value",B.getAttribute(cu)):H(V)}let oe=()=>Z(J().length-1),ne=V=>{V.preventDefault(),V.metaKey?oe():V.altKey?Y(1):H(1)},$=V=>{V.preventDefault(),V.metaKey?Z(0):V.altKey?Y(-1):H(-1)};return k.createElement(as.div,{ref:t,tabIndex:-1,...T,"cmdk-root":"",onKeyDown:V=>{var U;(U=T.onKeyDown)==null||U.call(T,V);let D=V.nativeEvent.isComposing||V.keyCode===229;if(!(V.defaultPrevented||D))switch(V.key){case"n":case"j":{w&&V.ctrlKey&&ne(V);break}case"ArrowDown":{ne(V);break}case"p":case"k":{w&&V.ctrlKey&&$(V);break}case"ArrowUp":{$(V);break}case"Home":{V.preventDefault(),Z(0);break}case"End":{V.preventDefault(),oe();break}case"Enter":{V.preventDefault();let B=ee();if(B){let te=new Event(ax);B.dispatchEvent(te)}}}}},k.createElement("label",{"cmdk-label":"",htmlFor:M.inputId,id:M.labelId,style:Gge},u),O0(e,V=>k.createElement(r6.Provider,{value:O},k.createElement(n6.Provider,{value:M},V))))}),Dge=k.forwardRef((e,t)=>{var n,r;let o=Zi(),s=k.useRef(null),l=k.useContext(o6),c=Jh(),u=s6(e),d=(r=(n=u.current)==null?void 0:n.forceMount)!=null?r:l?.forceMount;rc(()=>{if(!d)return c.item(o,l?.id)},[d]);let h=a6(o,s,[e.value,e.children,s],e.keywords),p=WE(),g=Ya(x=>x.value&&x.value===h.current),b=Ya(x=>d||c.filter()===!1?!0:x.search?x.filtered.items.get(o)>0:!0);k.useEffect(()=>{let x=s.current;if(!(!x||e.disabled))return x.addEventListener(ax,y),()=>x.removeEventListener(ax,y)},[b,e.onSelect,e.disabled]);function y(){var x,O;_(),(O=(x=u.current).onSelect)==null||O.call(x,h.current)}function _(){p.setState("value",h.current,!0)}if(!b)return null;let{disabled:w,value:T,onSelect:v,forceMount:E,keywords:S,...C}=e;return k.createElement(as.div,{ref:Wa(s,t),...C,id:o,"cmdk-item":"",role:"option","aria-disabled":!!w,"aria-selected":!!g,"data-disabled":!!w,"data-selected":!!g,onPointerMove:w||c.getDisablePointerSelection()?void 0:_,onClick:w?void 0:y},e.children)}),$ge=k.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...s}=e,l=Zi(),c=k.useRef(null),u=k.useRef(null),d=Zi(),h=Jh(),p=Ya(b=>o||h.filter()===!1?!0:b.search?b.filtered.groups.has(l):!0);rc(()=>h.group(l),[]),a6(l,c,[e.value,e.heading,u]);let g=k.useMemo(()=>({id:l,forceMount:o}),[o]);return k.createElement(as.div,{ref:Wa(c,t),...s,"cmdk-group":"",role:"presentation",hidden:p?void 0:!0},n&&k.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:d},n),O0(e,b=>k.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?d:void 0},k.createElement(o6.Provider,{value:g},b))))}),Ige=k.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=k.useRef(null),s=Ya(l=>!l.search);return!n&&!s?null:k.createElement(as.div,{ref:Wa(o,t),...r,"cmdk-separator":"",role:"separator"})}),zge=k.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,s=WE(),l=Ya(d=>d.search),c=Ya(d=>d.selectedItemId),u=Jh();return k.useEffect(()=>{e.value!=null&&s.setState("search",e.value)},[e.value]),k.createElement(as.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":u.listId,"aria-labelledby":u.labelId,"aria-activedescendant":c,id:u.inputId,type:"text",value:o?e.value:l,onChange:d=>{o||s.setState("search",d.target.value),n?.(d.target.value)}})}),Lge=k.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,s=k.useRef(null),l=k.useRef(null),c=Ya(d=>d.selectedItemId),u=Jh();return k.useEffect(()=>{if(l.current&&s.current){let d=l.current,h=s.current,p,g=new ResizeObserver(()=>{p=requestAnimationFrame(()=>{let b=d.offsetHeight;h.style.setProperty("--cmdk-list-height",b.toFixed(1)+"px")})});return g.observe(d),()=>{cancelAnimationFrame(p),g.unobserve(d)}}},[]),k.createElement(as.div,{ref:Wa(s,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":c,"aria-label":r,id:u.listId},O0(e,d=>k.createElement("div",{ref:Wa(l,u.listInnerRef),"cmdk-list-sizer":""},d)))}),Fge=k.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:s,container:l,...c}=e;return k.createElement(Age,{open:n,onOpenChange:r},k.createElement(kge,{container:l},k.createElement(Mge,{"cmdk-overlay":"",className:o}),k.createElement(jge,{"aria-label":e.label,"cmdk-dialog":"",className:s},k.createElement(i6,{ref:t,...c}))))}),Uge=k.forwardRef((e,t)=>Ya(n=>n.filtered.count===0)?k.createElement(as.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Vge=k.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...s}=e;return k.createElement(as.div,{ref:t,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},O0(e,l=>k.createElement("div",{"aria-hidden":!0},l)))}),yc=Object.assign(i6,{List:Lge,Item:Dge,Input:zge,Group:$ge,Separator:Ige,Dialog:Fge,Empty:Uge,Loading:Vge});function qge(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Bge(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function s6(e){let t=k.useRef(e);return rc(()=>{t.current=e}),t}var rc=typeof window>"u"?k.useEffect:k.useLayoutEffect;function uu(e){let t=k.useRef();return t.current===void 0&&(t.current=e()),t}function Ya(e){let t=WE(),n=()=>e(t.snapshot());return k.useSyncExternalStore(t.subscribe,n,n)}function a6(e,t,n,r=[]){let o=k.useRef(),s=Jh();return rc(()=>{var l;let c=(()=>{var d;for(let h of n){if(typeof h=="string")return h.trim();if(typeof h=="object"&&"current"in h)return h.current?(d=h.current.textContent)==null?void 0:d.trim():o.current}})(),u=r.map(d=>d.trim());s.value(e,c,u),(l=t.current)==null||l.setAttribute(cu,c),o.current=c}),o}var Hge=()=>{let[e,t]=k.useState(),n=uu(()=>new Map);return rc(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function Kge(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function O0({asChild:e,children:t},n){return e&&k.isValidElement(t)?k.cloneElement(Kge(t),{ref:t.ref},n(t.props.children)):n(t)}var Gge={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const Zge=rl("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 Wge({className:e,variant:t,asChild:n=!1,...r}){const o=n?jI:"span";return j.jsx(o,{"data-slot":"badge",className:jt(Zge({variant:t}),e),...r})}const l6=k.forwardRef(({className:e,...t},n)=>j.jsx(yc,{ref:n,"data-slot":"command",className:jt("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t})),Yge=k.forwardRef(({className:e,...t},n)=>j.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[j.jsx(Hde,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),j.jsx(yc.Input,{ref:n,className:jt("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})]}));Yge.displayName=yc.Input.displayName;function c6({className:e,...t}){return j.jsx(yc.List,{"data-slot":"command-list",className:jt("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}function u6({className:e,...t}){return j.jsx(yc.Group,{"data-slot":"command-group",className:jt("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 f6({className:e,...t}){return j.jsx(yc.Item,{"data-slot":"command-item",className:jt("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 Xge({multiple:e,items:t=[],selected:n,onValueChange:r,autoFocus:o=!1,disabled:s=!1,ariaDescribedby:l,ariaPlaceholder:c,onFocus:u,onBlur:d,className:h,id:p}){const g=k.useRef(null),[b,y]=k.useState(!1),[_,w]=k.useState(""),T=k.useMemo(()=>t.filter(O=>n.some(M=>ja(O.value,M))),[t,n]),v=k.useMemo(()=>t.filter(O=>!T.some(M=>ja(M.value,O.value))),[t,T]),E=k.useCallback(O=>{if(s)return;const M=T.filter(P=>!ja(P.value,O.value));r?.(M.map(P=>P.index))},[T,r,s]),S=k.useCallback(O=>{if(!(s||!g.current||g.current.value!==""))if(O.key==="Delete"||O.key==="Backspace"){const M=T.slice(0,-1);r?.(M.map(P=>P.index))}else O.key==="Escape"&&g.current.blur()},[T,r,s]),C=k.useCallback(O=>{if(s)return;w("");const M=e?[...T,O]:[O];r?.(M.map(P=>P.index))},[e,T,r,s]),x=k.useCallback(O=>{s||y(!0),u?.(O)},[s,u]);return j.jsxs(l6,{onKeyDown:S,className:jt("overflow-visible bg-transparent",h),autoFocus:o,"aria-disabled":s,onBlur:d,onFocus:x,"aria-describedby":l,"aria-placeholder":c,children:[j.jsx("div",{className:jt("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",s&&"opacity-50 cursor-not-allowed"),children:j.jsxs("div",{className:"flex gap-1 flex-wrap",children:[T.map(O=>j.jsxs(Wge,{variant:"secondary",children:[O.label,j.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:M=>M.key==="Enter"&&!s&&E(O),onMouseDown:M=>{M.preventDefault(),M.stopPropagation()},onClick:()=>E(O),disabled:s,children:j.jsx(Wde,{className:jt("h-3 w-3 text-muted-foreground hover:text-foreground",s&&"pointer-events-none")})})]},O.value)),j.jsx(yc.Input,{ref:g,value:_,onValueChange:w,onBlur:()=>y(!1),onFocus:()=>!s&&y(!0),placeholder:"Select ...",className:"rtl:mr-2 ltr:ml-2 bg-transparent outline-none placeholder:text-muted-foreground flex-1",disabled:s,"aria-controls":`command-item-input-${p}`,"aria-labelledby":`command-item-input-${p}`,id:`command-item-input-${p}`})]})}),b&&!s&&v.length>0&&j.jsx("div",{className:"relative mt-2",children:j.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:j.jsx(u6,{className:"h-full overflow-auto",children:j.jsx(c6,{children:v.map(O=>j.jsx(f6,{disabled:O.disabled,onMouseDown:M=>{M.preventDefault(),M.stopPropagation()},"aria-controls":`${O.value}-command-item`,"aria-labelledby":`${O.value}-command-item`,id:`${O.value}-command-item`,onSelect:()=>C(O),className:"cursor-pointer",children:O.label},`${O.value}-command-item`))})})})})]})}function Qge({items:e,selected:t,onValueChange:n,autoFocus:r=!1,disabled:o=!1,required:s=!1,placeholder:l="Select...",ariaDescribedby:c,ariaPlaceholder:u,onFocus:d,onBlur:h,className:p}){const[g,b]=k.useState(!1),y=e?.find(v=>v.value===t),_=k.useRef(null),w=k.useRef(null);k.useEffect(()=>{g&&_.current&&requestAnimationFrame(()=>{var v;(v=_.current)===null||v===void 0||v.scrollIntoView({block:"nearest"})})},[g]);const T=v=>{w.current&&!w.current.contains(v.relatedTarget)&&b(!1),h?.(v)};return j.jsxs(l6,{ref:w,className:jt("overflow-visible bg-transparent",p),autoFocus:r,"aria-disabled":o,onBlur:T,onFocus:d,"aria-describedby":c,"aria-placeholder":u,children:[j.jsxs("div",{onClick:()=>!o&&b(!g),className:jt("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",!y&&s&&"border-red-500",o&&"opacity-50 cursor-not-allowed",p),children:[j.jsx("span",{className:jt("flex-1 line-clamp-1",!y&&"text-muted-foreground"),children:y?.label||l}),j.jsx(OI,{className:"h-4 w-4 opacity-50"})]}),j.jsx("div",{className:"relative",children:g&&e&&e.length>0?j.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:j.jsx(u6,{className:"h-full overflow-auto",children:j.jsx(c6,{children:e.map(v=>j.jsxs(f6,{ref:v.value===t?_:void 0,onMouseDown:E=>{E.preventDefault(),E.stopPropagation()},onSelect:()=>{v.disabled||(n?.(v.value),b(!1))},className:jt("cursor-pointer relative flex items-center justify-between rounded-sm py-1.5 gap-2 rtl:flex-row-reverse",v.value===t&&"font-semibold",v.disabled&&"opacity-50 cursor-not-allowed"),children:[j.jsx("span",{children:v.label}),j.jsx("span",{className:"flex h-3.5 w-3.5 items-center justify-center",children:v.value===t&&j.jsx(Pde,{className:"h-4 w-4"})})]},v.value))})})}):null})]})}function Jge({id:e,options:t,required:n,disabled:r,readonly:o,value:s,multiple:l,autofocus:c,onChange:u,onBlur:d,onFocus:h,defaultValue:p,placeholder:g,rawErrors:b=[],className:y}){const{enumOptions:_,enumDisabled:w,emptyValue:T}=t,v=()=>{h(e,Tr(s,_,T))},E=()=>{d(e,Tr(s,_,T))},S=_?.map(({value:x,label:O},M)=>({value:l?x:M.toString(),label:O,index:M,disabled:Array.isArray(w)&&w.includes(x)})),C=jt({"border-destructive":b.length>0},y);return j.jsx("div",{className:"p-0.5",children:l?j.jsx(Xge,{id:e,autoFocus:c,disabled:r||o,multiple:!0,className:C,items:S,selected:s,onValueChange:x=>{u(Tr(x,_,T))},onFocus:v,onBlur:E}):j.jsx(Qge,{items:S,selected:tI(s??p,_,!1),onValueChange:x=>{u(Tr(x,_,T))},autoFocus:c,disabled:r||o,required:n,placeholder:g,className:C,onFocus:v,onBlur:E,ariaDescribedby:wo(e)})})}function eye({className:e,...t}){return j.jsx("textarea",{"data-slot":"textarea",className:jt("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 field-sizing-content 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 tye({id:e,htmlName:t,placeholder:n,value:r,required:o,disabled:s,autofocus:l,readonly:c,onBlur:u,onFocus:d,onChange:h,options:p,className:g}){const b=({target:{value:w}})=>h(w===""?p.emptyValue:w),y=({target:w})=>u(e,w&&w.value),_=({target:w})=>d(e,w&&w.value);return j.jsx("div",{className:"flex p-0.5",children:j.jsx(eye,{id:e,name:t||e,placeholder:n,disabled:s,readOnly:c,value:r??"",required:o,autoFocus:l,rows:p.rows||5,onChange:b,onBlur:y,onFocus:_,"aria-describedby":wo(e),className:g})})}function nye(){return{CheckboxWidget:ope,CheckboxesWidget:ipe,RadioWidget:Dpe,RangeWidget:rme,SelectWidget:Jge,TextareaWidget:tye}}function rye(){return{templates:Phe(),widgets:nye()}}function oye(){return hde(rye())}const iye=oye();function sye({className:e,size:t="default",...n}){return j.jsx("div",{"data-slot":"card","data-size":t,className:pn("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),...n})}function aye({className:e,...t}){return j.jsx("div",{"data-slot":"card-content",className:pn("px-4 group-data-[size=sm]/card:px-3",e),...t})}var d6=function(e){return typeof e=="function"},lye=function(e){return typeof e=="string"},h6=function(e){return typeof e=="number"};function O3(e,t){if(e===t)return!0;for(var n=0;n<e.length;n++)if(!Object.is(e[n],t[n]))return!1;return!0}function lx(e){var t=k.useRef(e);return t.current=e,t}var cye=function(e){var t=lx(e);k.useEffect(function(){return function(){t.current()}},[])},uye=!!(typeof window<"u"&&window.document&&window.document.createElement);function p6(e,t){if(uye){if(!e)return t;var n;return d6(e)?n=e():"current"in e?n=e.current:n=e,n}}var fye=function(e){var t=function(n,r,o){var s=k.useRef(!1),l=k.useRef([]),c=k.useRef([]),u=k.useRef(void 0);e(function(){var d,h=Array.isArray(o)?o:[o],p=h.map(function(g){return p6(g)});if(!s.current){s.current=!0,l.current=p,c.current=r,u.current=n();return}(p.length!==l.current.length||!O3(l.current,p)||!O3(c.current,r))&&((d=u.current)===null||d===void 0||d.call(u),l.current=p,c.current=r,u.current=n())}),cye(function(){var d;(d=u.current)===null||d===void 0||d.call(u),s.current=!1})};return t},dye=fye(k.useEffect),yS,A3;function hye(){if(A3)return yS;A3=1;var e=typeof Element<"u",t=typeof Map=="function",n=typeof Set=="function",r=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function o(s,l){if(s===l)return!0;if(s&&l&&typeof s=="object"&&typeof l=="object"){if(s.constructor!==l.constructor)return!1;var c,u,d;if(Array.isArray(s)){if(c=s.length,c!=l.length)return!1;for(u=c;u--!==0;)if(!o(s[u],l[u]))return!1;return!0}var h;if(t&&s instanceof Map&&l instanceof Map){if(s.size!==l.size)return!1;for(h=s.entries();!(u=h.next()).done;)if(!l.has(u.value[0]))return!1;for(h=s.entries();!(u=h.next()).done;)if(!o(u.value[1],l.get(u.value[0])))return!1;return!0}if(n&&s instanceof Set&&l instanceof Set){if(s.size!==l.size)return!1;for(h=s.entries();!(u=h.next()).done;)if(!l.has(u.value[0]))return!1;return!0}if(r&&ArrayBuffer.isView(s)&&ArrayBuffer.isView(l)){if(c=s.length,c!=l.length)return!1;for(u=c;u--!==0;)if(s[u]!==l[u])return!1;return!0}if(s.constructor===RegExp)return s.source===l.source&&s.flags===l.flags;if(s.valueOf!==Object.prototype.valueOf&&typeof s.valueOf=="function"&&typeof l.valueOf=="function")return s.valueOf()===l.valueOf();if(s.toString!==Object.prototype.toString&&typeof s.toString=="function"&&typeof l.toString=="function")return s.toString()===l.toString();if(d=Object.keys(s),c=d.length,c!==Object.keys(l).length)return!1;for(u=c;u--!==0;)if(!Object.prototype.hasOwnProperty.call(l,d[u]))return!1;if(e&&s instanceof Element)return!1;for(u=c;u--!==0;)if(!((d[u]==="_owner"||d[u]==="__v"||d[u]==="__o")&&s.$$typeof)&&!o(s[d[u]],l[d[u]]))return!1;return!0}return s!==s&&l!==l}return yS=function(l,c){try{return o(l,c)}catch(u){if((u.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw u}},yS}var pye=hye();const mye=ts(pye);var gye=function(e,t){return e===void 0&&(e=[]),t===void 0&&(t=[]),mye(e,t)},yye=function(e,t,n){var r=k.useRef(void 0),o=k.useRef(0);gye(t,r.current)||(o.current+=1),r.current=t,dye(e,[o.current],n)},vye=/(mac|iphone|ipod|ipad)/i.test(typeof navigator<"u"?navigator?.platform:""),m6={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:vye?[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},cx={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"?m6.meta.includes(e.keyCode):e.metaKey}};function g6(e){return lye(e)||h6(e)}function bye(e){var t=Object.keys(cx).reduce(function(n,r){return cx[r](e)?n+1:n},0);return[16,17,18,91,92].includes(e.keyCode)?t:t+1}function k3(e,t,n){var r,o;if(!e.key)return!1;if(h6(t))return e.keyCode===t?t:!1;var s=t.split("."),l=0;try{for(var c=ix(s),u=c.next();!u.done;u=c.next()){var d=u.value,h=cx[d],p=m6[d.toLowerCase()];(h&&h(e)||p&&p===e.keyCode)&&l++}}catch(g){r={error:g}}finally{try{u&&!u.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}return n?l===s.length&&bye(e)===s.length?t:!1:l===s.length?t:!1}function Sye(e,t){return d6(e)?e:g6(e)?function(n){return k3(n,e,t)}:Array.isArray(e)?function(n){return e.find(function(r){return k3(n,r,t)})}:function(){return!!e}}var wye=["keydown"];function xye(e,t,n){var r={},o=r.events,s=o===void 0?wye:o,l=r.target,c=r.exactMatch,u=c===void 0?!1:c,d=r.useCapture,h=d===void 0?!1:d,p=lx(t),g=lx(e);yye(function(){var b,y,_,w=p6(l,window);if(w){var T=function(C){var x,O=C,M=Sye(g.current,u),P=M(O),z=g6(P)?P:O.key;if(P)return(x=p.current)===null||x===void 0?void 0:x.call(p,O,z)};try{for(var v=ix(s),E=v.next();!E.done;E=v.next()){var S=E.value;(_=w?.addEventListener)===null||_===void 0||_.call(w,S,T,h)}}catch(C){b={error:C}}finally{try{E&&!E.done&&(y=v.return)&&y.call(v)}finally{if(b)throw b.error}}return function(){var C,x,O;try{for(var M=ix(s),P=M.next();!P.done;P=M.next()){var z=P.value;(O=w?.removeEventListener)===null||O===void 0||O.call(w,z,T,h)}}catch(I){C={error:I}}finally{try{P&&!P.done&&(x=M.return)&&x.call(M)}finally{if(C)throw C.error}}}}},[s],l)}const _ye=({validateForm:e,formData:t})=>{const n=fc(),{mutateAsync:r,isPending:o}=pte(),s=async()=>{e&&!await e()||t&&await r({toolName:n.name,args:t})};return xye("Enter",s),j.jsx("div",{className:"flex flex-col items-end gap-1",children:j.jsxs(lh,{onClick:s,variant:"default",disabled:o,children:[o?j.jsx(Mte,{className:"h-4 w-4 animate-spin"}):j.jsx(Dte,{className:"h-4 w-4"}),"Call Tool"]})})},Eye={"ui:submitButtonOptions":{norender:!0}},Cye=({schema:e,formData:t,setFormData:n,ref:r})=>!e||!e.properties||Object.keys(e.properties).length===0?j.jsx("div",{className:"flex items-center justify-center h-full",children:j.jsx("p",{className:"text-sm text-muted-foreground",children:"This tool requires no input"})}):j.jsx(sye,{children:j.jsx(aye,{children:j.jsx(iye,{ref:r,schema:e??{},validator:Tde,uiSchema:Eye,formData:t,onChange:s=>n(s.formData),showErrorList:!1,templates:{FieldTemplate:s=>{const{id:l,classNames:c,style:u,label:d,required:h,errors:p,children:g}=s;return j.jsxs("div",{className:pn("flex flex-col gap-2",c),style:u,children:[j.jsxs("label",{htmlFor:l,className:"text-sm text-foreground",children:[d,h&&j.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),j.jsxs("div",{className:"flex flex-col gap-2",children:[g,p]})]})},FieldErrorTemplate:s=>s.errors&&s.errors.length>0?j.jsx("div",{className:"text-sm text-destructive mt-1 flex items-center gap-1",children:j.jsx("span",{children:s.errors.join(", ")})}):null}})})}),Tye=()=>{const e=k.useRef(null),t=fc(),{setToolData:n}=lf(),o=cf(t.name)?.input??{},s=l=>{n(t.name,{input:l??{}})};return j.jsxs("div",{className:pn("flex flex-col h-full overflow-hidden border-r border-border"),children:[j.jsxs("div",{className:"shrink-0 border-b border-border px-6 py-4 flex items-center justify-between h-[72px]",children:[j.jsx("h2",{className:"font-semibold text-foreground",children:t.name}),j.jsx("div",{className:"flex items-center gap-2",children:j.jsx(_ye,{validateForm:async()=>e.current===null?!0:await e.current.validateForm(),formData:o})})]}),j.jsx("div",{className:"flex-1 overflow-auto px-6 py-6 bg-muted/50",children:j.jsx(Cye,{schema:t.inputSchema,formData:o,setFormData:s,ref:e},t.name)})]})};var Gg={exports:{}},Rye=Gg.exports,M3;function Oye(){return M3||(M3=1,(function(e,t){(function(n,r){e.exports=r(rf())})(Rye,n=>(()=>{var r={9735:(c,u)=>{u.__esModule=!0,u.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"},c.exports=u.default},294:(c,u)=>{u.__esModule=!0,u.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"},c.exports=u.default},1733:(c,u)=>{u.__esModule=!0,u.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"},c.exports=u.default},8974:(c,u)=>{u.__esModule=!0,u.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"},c.exports=u.default},6933:(c,u)=>{u.__esModule=!0,u.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"},c.exports=u.default},523:(c,u)=>{u.__esModule=!0,u.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"},c.exports=u.default},1223:(c,u)=>{u.__esModule=!0,u.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"},c.exports=u.default},1233:(c,u)=>{u.__esModule=!0,u.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"},c.exports=u.default},2847:(c,u)=>{u.__esModule=!0,u.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"},c.exports=u.default},8120:(c,u)=>{u.__esModule=!0,u.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"},c.exports=u.default},6305:(c,u)=>{u.__esModule=!0,u.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"},c.exports=u.default},525:(c,u)=>{u.__esModule=!0,u.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"},c.exports=u.default},4124:(c,u)=>{u.__esModule=!0,u.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"},c.exports=u.default},7167:(c,u)=>{u.__esModule=!0,u.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"},c.exports=u.default},4582:(c,u)=>{u.__esModule=!0,u.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"},c.exports=u.default},7096:(c,u)=>{u.__esModule=!0,u.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"},c.exports=u.default},9887:(c,u)=>{u.__esModule=!0,u.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"},c.exports=u.default},7199:(c,u)=>{u.__esModule=!0,u.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"},c.exports=u.default},1985:(c,u)=>{u.__esModule=!0,u.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"},c.exports=u.default},8093:(c,u)=>{u.__esModule=!0,u.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"},c.exports=u.default},1615:(c,u)=>{u.__esModule=!0,u.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"},c.exports=u.default},9063:(c,u)=>{u.__esModule=!0,u.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"},c.exports=u.default},9446:(c,u,d)=>{function h(ie){return ie&&ie.__esModule?ie.default:ie}u.__esModule=!0;var p=d(1308);u.threezerotwofour=h(p);var g=d(9735);u.apathy=h(g);var b=d(294);u.ashes=h(b);var y=d(1733);u.atelierDune=h(y);var _=d(8974);u.atelierForest=h(_);var w=d(6933);u.atelierHeath=h(w);var T=d(523);u.atelierLakeside=h(T);var v=d(1223);u.atelierSeaside=h(v);var E=d(1233);u.bespin=h(E);var S=d(2847);u.brewer=h(S);var C=d(8120);u.bright=h(C);var x=d(6305);u.chalk=h(x);var O=d(525);u.codeschool=h(O);var M=d(4124);u.colors=h(M);var P=d(7167);u.default=h(P);var z=d(4582);u.eighties=h(z);var I=d(7096);u.embers=h(I);var q=d(9887);u.flat=h(q);var G=d(7199);u.google=h(G);var ee=d(1985);u.grayscale=h(ee);var J=d(8093);u.greenscreen=h(J);var Z=d(1615);u.harmonic=h(Z);var H=d(9063);u.hopscotch=h(H);var Y=d(9033);u.isotope=h(Y);var oe=d(4112);u.marrakesh=h(oe);var ne=d(9600);u.mocha=h(ne);var $=d(1240);u.monokai=h($);var V=d(9768);u.ocean=h(V);var U=d(8293);u.paraiso=h(U);var D=d(3093);u.pop=h(D);var B=d(1951);u.railscasts=h(B);var te=d(6368);u.shapeshifter=h(te);var re=d(2317);u.solarized=h(re);var le=d(1091);u.summerfruit=h(le);var ge=d(6943);u.tomorrow=h(ge);var Me=d(5670);u.tube=h(Me);var Q=d(2536);u.twilight=h(Q)},9033:(c,u)=>{u.__esModule=!0,u.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"},c.exports=u.default},4112:(c,u)=>{u.__esModule=!0,u.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"},c.exports=u.default},9600:(c,u)=>{u.__esModule=!0,u.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"},c.exports=u.default},1240:(c,u)=>{u.__esModule=!0,u.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"},c.exports=u.default},9768:(c,u)=>{u.__esModule=!0,u.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"},c.exports=u.default},8293:(c,u)=>{u.__esModule=!0,u.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"},c.exports=u.default},3093:(c,u)=>{u.__esModule=!0,u.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"},c.exports=u.default},1951:(c,u)=>{u.__esModule=!0,u.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"},c.exports=u.default},6368:(c,u)=>{u.__esModule=!0,u.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"},c.exports=u.default},2317:(c,u)=>{u.__esModule=!0,u.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"},c.exports=u.default},1091:(c,u)=>{u.__esModule=!0,u.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"},c.exports=u.default},1308:(c,u)=>{u.__esModule=!0,u.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"},c.exports=u.default},6943:(c,u)=>{u.__esModule=!0,u.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"},c.exports=u.default},5670:(c,u)=>{u.__esModule=!0,u.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"},c.exports=u.default},2536:(c,u)=>{u.__esModule=!0,u.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"},c.exports=u.default},6481:(c,u,d)=>{var h=d(4176),p={};for(var g in h)h.hasOwnProperty(g)&&(p[h[g]]=g);var b=c.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 y in b)if(b.hasOwnProperty(y)){if(!("channels"in b[y]))throw new Error("missing channels property: "+y);if(!("labels"in b[y]))throw new Error("missing channel labels property: "+y);if(b[y].labels.length!==b[y].channels)throw new Error("channel and label counts mismatch: "+y);var _=b[y].channels,w=b[y].labels;delete b[y].channels,delete b[y].labels,Object.defineProperty(b[y],"channels",{value:_}),Object.defineProperty(b[y],"labels",{value:w})}function T(v,E){return Math.pow(v[0]-E[0],2)+Math.pow(v[1]-E[1],2)+Math.pow(v[2]-E[2],2)}b.rgb.hsl=function(v){var E,S,C=v[0]/255,x=v[1]/255,O=v[2]/255,M=Math.min(C,x,O),P=Math.max(C,x,O),z=P-M;return P===M?E=0:C===P?E=(x-O)/z:x===P?E=2+(O-C)/z:O===P&&(E=4+(C-x)/z),(E=Math.min(60*E,360))<0&&(E+=360),S=(M+P)/2,[E,100*(P===M?0:S<=.5?z/(P+M):z/(2-P-M)),100*S]},b.rgb.hsv=function(v){var E,S,C,x,O,M=v[0]/255,P=v[1]/255,z=v[2]/255,I=Math.max(M,P,z),q=I-Math.min(M,P,z),G=function(ee){return(I-ee)/6/q+.5};return q===0?x=O=0:(O=q/I,E=G(M),S=G(P),C=G(z),M===I?x=C-S:P===I?x=.3333333333333333+E-C:z===I&&(x=.6666666666666666+S-E),x<0?x+=1:x>1&&(x-=1)),[360*x,100*O,100*I]},b.rgb.hwb=function(v){var E=v[0],S=v[1],C=v[2];return[b.rgb.hsl(v)[0],100*(.00392156862745098*Math.min(E,Math.min(S,C))),100*(C=1-.00392156862745098*Math.max(E,Math.max(S,C)))]},b.rgb.cmyk=function(v){var E,S=v[0]/255,C=v[1]/255,x=v[2]/255;return[100*((1-S-(E=Math.min(1-S,1-C,1-x)))/(1-E)||0),100*((1-C-E)/(1-E)||0),100*((1-x-E)/(1-E)||0),100*E]},b.rgb.keyword=function(v){var E=p[v];if(E)return E;var S,C=1/0;for(var x in h)if(h.hasOwnProperty(x)){var O=T(v,h[x]);O<C&&(C=O,S=x)}return S},b.keyword.rgb=function(v){return h[v]},b.rgb.xyz=function(v){var E=v[0]/255,S=v[1]/255,C=v[2]/255;return[100*(.4124*(E=E>.04045?Math.pow((E+.055)/1.055,2.4):E/12.92)+.3576*(S=S>.04045?Math.pow((S+.055)/1.055,2.4):S/12.92)+.1805*(C=C>.04045?Math.pow((C+.055)/1.055,2.4):C/12.92)),100*(.2126*E+.7152*S+.0722*C),100*(.0193*E+.1192*S+.9505*C)]},b.rgb.lab=function(v){var E=b.rgb.xyz(v),S=E[0],C=E[1],x=E[2];return C/=100,x/=108.883,S=(S/=95.047)>.008856?Math.pow(S,.3333333333333333):7.787*S+.13793103448275862,[116*(C=C>.008856?Math.pow(C,.3333333333333333):7.787*C+.13793103448275862)-16,500*(S-C),200*(C-(x=x>.008856?Math.pow(x,.3333333333333333):7.787*x+.13793103448275862))]},b.hsl.rgb=function(v){var E,S,C,x,O,M=v[0]/360,P=v[1]/100,z=v[2]/100;if(P===0)return[O=255*z,O,O];E=2*z-(S=z<.5?z*(1+P):z+P-z*P),x=[0,0,0];for(var I=0;I<3;I++)(C=M+.3333333333333333*-(I-1))<0&&C++,C>1&&C--,O=6*C<1?E+6*(S-E)*C:2*C<1?S:3*C<2?E+(S-E)*(.6666666666666666-C)*6:E,x[I]=255*O;return x},b.hsl.hsv=function(v){var E=v[0],S=v[1]/100,C=v[2]/100,x=S,O=Math.max(C,.01);return S*=(C*=2)<=1?C:2-C,x*=O<=1?O:2-O,[E,100*(C===0?2*x/(O+x):2*S/(C+S)),100*((C+S)/2)]},b.hsv.rgb=function(v){var E=v[0]/60,S=v[1]/100,C=v[2]/100,x=Math.floor(E)%6,O=E-Math.floor(E),M=255*C*(1-S),P=255*C*(1-S*O),z=255*C*(1-S*(1-O));switch(C*=255,x){case 0:return[C,z,M];case 1:return[P,C,M];case 2:return[M,C,z];case 3:return[M,P,C];case 4:return[z,M,C];case 5:return[C,M,P]}},b.hsv.hsl=function(v){var E,S,C,x=v[0],O=v[1]/100,M=v[2]/100,P=Math.max(M,.01);return C=(2-O)*M,S=O*P,[x,100*(S=(S/=(E=(2-O)*P)<=1?E:2-E)||0),100*(C/=2)]},b.hwb.rgb=function(v){var E,S,C,x,O,M,P,z=v[0]/360,I=v[1]/100,q=v[2]/100,G=I+q;switch(G>1&&(I/=G,q/=G),C=6*z-(E=Math.floor(6*z)),1&E&&(C=1-C),x=I+C*((S=1-q)-I),E){default:case 6:case 0:O=S,M=x,P=I;break;case 1:O=x,M=S,P=I;break;case 2:O=I,M=S,P=x;break;case 3:O=I,M=x,P=S;break;case 4:O=x,M=I,P=S;break;case 5:O=S,M=I,P=x}return[255*O,255*M,255*P]},b.cmyk.rgb=function(v){var E=v[0]/100,S=v[1]/100,C=v[2]/100,x=v[3]/100;return[255*(1-Math.min(1,E*(1-x)+x)),255*(1-Math.min(1,S*(1-x)+x)),255*(1-Math.min(1,C*(1-x)+x))]},b.xyz.rgb=function(v){var E,S,C,x=v[0]/100,O=v[1]/100,M=v[2]/100;return S=-.9689*x+1.8758*O+.0415*M,C=.0557*x+-.204*O+1.057*M,E=(E=3.2406*x+-1.5372*O+-.4986*M)>.0031308?1.055*Math.pow(E,.4166666666666667)-.055:12.92*E,S=S>.0031308?1.055*Math.pow(S,.4166666666666667)-.055:12.92*S,C=C>.0031308?1.055*Math.pow(C,.4166666666666667)-.055:12.92*C,[255*(E=Math.min(Math.max(0,E),1)),255*(S=Math.min(Math.max(0,S),1)),255*(C=Math.min(Math.max(0,C),1))]},b.xyz.lab=function(v){var E=v[0],S=v[1],C=v[2];return S/=100,C/=108.883,E=(E/=95.047)>.008856?Math.pow(E,.3333333333333333):7.787*E+.13793103448275862,[116*(S=S>.008856?Math.pow(S,.3333333333333333):7.787*S+.13793103448275862)-16,500*(E-S),200*(S-(C=C>.008856?Math.pow(C,.3333333333333333):7.787*C+.13793103448275862))]},b.lab.xyz=function(v){var E,S,C,x=v[0];E=v[1]/500+(S=(x+16)/116),C=S-v[2]/200;var O=Math.pow(S,3),M=Math.pow(E,3),P=Math.pow(C,3);return S=O>.008856?O:(S-.13793103448275862)/7.787,E=M>.008856?M:(E-.13793103448275862)/7.787,C=P>.008856?P:(C-.13793103448275862)/7.787,[E*=95.047,S*=100,C*=108.883]},b.lab.lch=function(v){var E,S=v[0],C=v[1],x=v[2];return(E=360*Math.atan2(x,C)/2/Math.PI)<0&&(E+=360),[S,Math.sqrt(C*C+x*x),E]},b.lch.lab=function(v){var E,S=v[0],C=v[1];return E=v[2]/360*2*Math.PI,[S,C*Math.cos(E),C*Math.sin(E)]},b.rgb.ansi16=function(v){var E=v[0],S=v[1],C=v[2],x=1 in arguments?arguments[1]:b.rgb.hsv(v)[2];if((x=Math.round(x/50))===0)return 30;var O=30+(Math.round(C/255)<<2|Math.round(S/255)<<1|Math.round(E/255));return x===2&&(O+=60),O},b.hsv.ansi16=function(v){return b.rgb.ansi16(b.hsv.rgb(v),v[2])},b.rgb.ansi256=function(v){var E=v[0],S=v[1],C=v[2];return E===S&&S===C?E<8?16:E>248?231:Math.round((E-8)/247*24)+232:16+36*Math.round(E/255*5)+6*Math.round(S/255*5)+Math.round(C/255*5)},b.ansi16.rgb=function(v){var E=v%10;if(E===0||E===7)return v>50&&(E+=3.5),[E=E/10.5*255,E,E];var S=.5*(1+~~(v>50));return[(1&E)*S*255,(E>>1&1)*S*255,(E>>2&1)*S*255]},b.ansi256.rgb=function(v){if(v>=232){var E=10*(v-232)+8;return[E,E,E]}var S;return v-=16,[Math.floor(v/36)/5*255,Math.floor((S=v%36)/6)/5*255,S%6/5*255]},b.rgb.hex=function(v){var E=(((255&Math.round(v[0]))<<16)+((255&Math.round(v[1]))<<8)+(255&Math.round(v[2]))).toString(16).toUpperCase();return"000000".substring(E.length)+E},b.hex.rgb=function(v){var E=v.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!E)return[0,0,0];var S=E[0];E[0].length===3&&(S=S.split("").map(function(x){return x+x}).join(""));var C=parseInt(S,16);return[C>>16&255,C>>8&255,255&C]},b.rgb.hcg=function(v){var E,S=v[0]/255,C=v[1]/255,x=v[2]/255,O=Math.max(Math.max(S,C),x),M=Math.min(Math.min(S,C),x),P=O-M;return E=P<=0?0:O===S?(C-x)/P%6:O===C?2+(x-S)/P:4+(S-C)/P+4,E/=6,[360*(E%=1),100*P,100*(P<1?M/(1-P):0)]},b.hsl.hcg=function(v){var E=v[1]/100,S=v[2]/100,C=1,x=0;return(C=S<.5?2*E*S:2*E*(1-S))<1&&(x=(S-.5*C)/(1-C)),[v[0],100*C,100*x]},b.hsv.hcg=function(v){var E=v[1]/100,S=v[2]/100,C=E*S,x=0;return C<1&&(x=(S-C)/(1-C)),[v[0],100*C,100*x]},b.hcg.rgb=function(v){var E=v[0]/360,S=v[1]/100,C=v[2]/100;if(S===0)return[255*C,255*C,255*C];var x,O=[0,0,0],M=E%1*6,P=M%1,z=1-P;switch(Math.floor(M)){case 0:O[0]=1,O[1]=P,O[2]=0;break;case 1:O[0]=z,O[1]=1,O[2]=0;break;case 2:O[0]=0,O[1]=1,O[2]=P;break;case 3:O[0]=0,O[1]=z,O[2]=1;break;case 4:O[0]=P,O[1]=0,O[2]=1;break;default:O[0]=1,O[1]=0,O[2]=z}return x=(1-S)*C,[255*(S*O[0]+x),255*(S*O[1]+x),255*(S*O[2]+x)]},b.hcg.hsv=function(v){var E=v[1]/100,S=E+v[2]/100*(1-E),C=0;return S>0&&(C=E/S),[v[0],100*C,100*S]},b.hcg.hsl=function(v){var E=v[1]/100,S=v[2]/100*(1-E)+.5*E,C=0;return S>0&&S<.5?C=E/(2*S):S>=.5&&S<1&&(C=E/(2*(1-S))),[v[0],100*C,100*S]},b.hcg.hwb=function(v){var E=v[1]/100,S=E+v[2]/100*(1-E);return[v[0],100*(S-E),100*(1-S)]},b.hwb.hcg=function(v){var E=v[1]/100,S=1-v[2]/100,C=S-E,x=0;return C<1&&(x=(S-C)/(1-C)),[v[0],100*C,100*x]},b.apple.rgb=function(v){return[v[0]/65535*255,v[1]/65535*255,v[2]/65535*255]},b.rgb.apple=function(v){return[v[0]/255*65535,v[1]/255*65535,v[2]/255*65535]},b.gray.rgb=function(v){return[v[0]/100*255,v[0]/100*255,v[0]/100*255]},b.gray.hsl=b.gray.hsv=function(v){return[0,0,v[0]]},b.gray.hwb=function(v){return[0,100,v[0]]},b.gray.cmyk=function(v){return[0,0,0,v[0]]},b.gray.lab=function(v){return[v[0],0,0]},b.gray.hex=function(v){var E=255&Math.round(v[0]/100*255),S=((E<<16)+(E<<8)+E).toString(16).toUpperCase();return"000000".substring(S.length)+S},b.rgb.gray=function(v){return[(v[0]+v[1]+v[2])/3/255*100]}},4732:(c,u,d)=>{var h=d(6481),p=d(1157),g={};Object.keys(h).forEach(function(b){g[b]={},Object.defineProperty(g[b],"channels",{value:h[b].channels}),Object.defineProperty(g[b],"labels",{value:h[b].labels});var y=p(b);Object.keys(y).forEach(function(_){var w=y[_];g[b][_]=(function(T){var v=function(E){if(E==null)return E;arguments.length>1&&(E=Array.prototype.slice.call(arguments));var S=T(E);if(typeof S=="object")for(var C=S.length,x=0;x<C;x++)S[x]=Math.round(S[x]);return S};return"conversion"in T&&(v.conversion=T.conversion),v})(w),g[b][_].raw=(function(T){var v=function(E){return E==null?E:(arguments.length>1&&(E=Array.prototype.slice.call(arguments)),T(E))};return"conversion"in T&&(v.conversion=T.conversion),v})(w)})}),c.exports=g},1157:(c,u,d)=>{var h=d(6481);function p(y){var _=(function(){for(var O={},M=Object.keys(h),P=M.length,z=0;z<P;z++)O[M[z]]={distance:-1,parent:null};return O})(),w=[y];for(_[y].distance=0;w.length;)for(var T=w.pop(),v=Object.keys(h[T]),E=v.length,S=0;S<E;S++){var C=v[S],x=_[C];x.distance===-1&&(x.distance=_[T].distance+1,x.parent=T,w.unshift(C))}return _}function g(y,_){return function(w){return _(y(w))}}function b(y,_){for(var w=[_[y].parent,y],T=h[_[y].parent][y],v=_[y].parent;_[v].parent;)w.unshift(_[v].parent),T=g(h[_[v].parent][v],T),v=_[v].parent;return T.conversion=w,T}c.exports=function(y){for(var _=p(y),w={},T=Object.keys(_),v=T.length,E=0;E<v;E++){var S=T[E];_[S].parent!==null&&(w[S]=b(S,_))}return w}},4176:c=>{c.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:c=>{c.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:(c,u,d)=>{var h=d(4877),p=d(3403),g=Object.hasOwnProperty,b=Object.create(null);for(var y in h)g.call(h,y)&&(b[h[y]]=y);var _=c.exports={to:{},get:{}};function w(v,E,S){return Math.min(Math.max(E,v),S)}function T(v){var E=Math.round(v).toString(16).toUpperCase();return E.length<2?"0"+E:E}_.get=function(v){var E,S;switch(v.substring(0,3).toLowerCase()){case"hsl":E=_.get.hsl(v),S="hsl";break;case"hwb":E=_.get.hwb(v),S="hwb";break;default:E=_.get.rgb(v),S="rgb"}return E?{model:S,value:E}:null},_.get.rgb=function(v){if(!v)return null;var E,S,C,x=[0,0,0,1];if(E=v.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(C=E[2],E=E[1],S=0;S<3;S++){var O=2*S;x[S]=parseInt(E.slice(O,O+2),16)}C&&(x[3]=parseInt(C,16)/255)}else if(E=v.match(/^#([a-f0-9]{3,4})$/i)){for(C=(E=E[1])[3],S=0;S<3;S++)x[S]=parseInt(E[S]+E[S],16);C&&(x[3]=parseInt(C+C,16)/255)}else if(E=v.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(S=0;S<3;S++)x[S]=parseInt(E[S+1],0);E[4]&&(E[5]?x[3]=.01*parseFloat(E[4]):x[3]=parseFloat(E[4]))}else{if(!(E=v.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(E=v.match(/^(\w+)$/))?E[1]==="transparent"?[0,0,0,0]:g.call(h,E[1])?((x=h[E[1]])[3]=1,x):null:null;for(S=0;S<3;S++)x[S]=Math.round(2.55*parseFloat(E[S+1]));E[4]&&(E[5]?x[3]=.01*parseFloat(E[4]):x[3]=parseFloat(E[4]))}for(S=0;S<3;S++)x[S]=w(x[S],0,255);return x[3]=w(x[3],0,1),x},_.get.hsl=function(v){if(!v)return null;var E=v.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(E){var S=parseFloat(E[4]);return[(parseFloat(E[1])%360+360)%360,w(parseFloat(E[2]),0,100),w(parseFloat(E[3]),0,100),w(isNaN(S)?1:S,0,1)]}return null},_.get.hwb=function(v){if(!v)return null;var E=v.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(E){var S=parseFloat(E[4]);return[(parseFloat(E[1])%360+360)%360,w(parseFloat(E[2]),0,100),w(parseFloat(E[3]),0,100),w(isNaN(S)?1:S,0,1)]}return null},_.to.hex=function(){var v=p(arguments);return"#"+T(v[0])+T(v[1])+T(v[2])+(v[3]<1?T(Math.round(255*v[3])):"")},_.to.rgb=function(){var v=p(arguments);return v.length<4||v[3]===1?"rgb("+Math.round(v[0])+", "+Math.round(v[1])+", "+Math.round(v[2])+")":"rgba("+Math.round(v[0])+", "+Math.round(v[1])+", "+Math.round(v[2])+", "+v[3]+")"},_.to.rgb.percent=function(){var v=p(arguments),E=Math.round(v[0]/255*100),S=Math.round(v[1]/255*100),C=Math.round(v[2]/255*100);return v.length<4||v[3]===1?"rgb("+E+"%, "+S+"%, "+C+"%)":"rgba("+E+"%, "+S+"%, "+C+"%, "+v[3]+")"},_.to.hsl=function(){var v=p(arguments);return v.length<4||v[3]===1?"hsl("+v[0]+", "+v[1]+"%, "+v[2]+"%)":"hsla("+v[0]+", "+v[1]+"%, "+v[2]+"%, "+v[3]+")"},_.to.hwb=function(){var v=p(arguments),E="";return v.length>=4&&v[3]!==1&&(E=", "+v[3]),"hwb("+v[0]+", "+v[1]+"%, "+v[2]+"%"+E+")"},_.to.keyword=function(v){return b[v.slice(0,3)]}},3639:(c,u,d)=>{var h=d(6138),p=d(4732),g=[].slice,b=["keyword","gray","hex"],y={};Object.keys(p).forEach(function(S){y[g.call(p[S].labels).sort().join("")]=S});var _={};function w(S,C){if(!(this instanceof w))return new w(S,C);if(C&&C in b&&(C=null),C&&!(C in p))throw new Error("Unknown model: "+C);var x,O;if(S==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(S instanceof w)this.model=S.model,this.color=S.color.slice(),this.valpha=S.valpha;else if(typeof S=="string"){var M=h.get(S);if(M===null)throw new Error("Unable to parse color from string: "+S);this.model=M.model,O=p[this.model].channels,this.color=M.value.slice(0,O),this.valpha=typeof M.value[O]=="number"?M.value[O]:1}else if(S.length){this.model=C||"rgb",O=p[this.model].channels;var P=g.call(S,0,O);this.color=E(P,O),this.valpha=typeof S[O]=="number"?S[O]:1}else if(typeof S=="number")S&=16777215,this.model="rgb",this.color=[S>>16&255,S>>8&255,255&S],this.valpha=1;else{this.valpha=1;var z=Object.keys(S);"alpha"in S&&(z.splice(z.indexOf("alpha"),1),this.valpha=typeof S.alpha=="number"?S.alpha:0);var I=z.sort().join("");if(!(I in y))throw new Error("Unable to parse color from object: "+JSON.stringify(S));this.model=y[I];var q=p[this.model].labels,G=[];for(x=0;x<q.length;x++)G.push(S[q[x]]);this.color=E(G)}if(_[this.model])for(O=p[this.model].channels,x=0;x<O;x++){var ee=_[this.model][x];ee&&(this.color[x]=ee(this.color[x]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}function T(S,C,x){return(S=Array.isArray(S)?S:[S]).forEach(function(O){(_[O]||(_[O]=[]))[C]=x}),S=S[0],function(O){var M;return arguments.length?(x&&(O=x(O)),(M=this[S]()).color[C]=O,M):(M=this[S]().color[C],x&&(M=x(M)),M)}}function v(S){return function(C){return Math.max(0,Math.min(S,C))}}function E(S,C){for(var x=0;x<C;x++)typeof S[x]!="number"&&(S[x]=0);return S}w.prototype={toString:function(){return this.string()},toJSON:function(){return this[this.model]()},string:function(S){var C=this.model in h.to?this:this.rgb(),x=(C=C.round(typeof S=="number"?S:1)).valpha===1?C.color:C.color.concat(this.valpha);return h.to[C.model](x)},percentString:function(S){var C=this.rgb().round(typeof S=="number"?S:1),x=C.valpha===1?C.color:C.color.concat(this.valpha);return h.to.rgb.percent(x)},array:function(){return this.valpha===1?this.color.slice():this.color.concat(this.valpha)},object:function(){for(var S={},C=p[this.model].channels,x=p[this.model].labels,O=0;O<C;O++)S[x[O]]=this.color[O];return this.valpha!==1&&(S.alpha=this.valpha),S},unitArray:function(){var S=this.rgb().color;return S[0]/=255,S[1]/=255,S[2]/=255,this.valpha!==1&&S.push(this.valpha),S},unitObject:function(){var S=this.rgb().object();return S.r/=255,S.g/=255,S.b/=255,this.valpha!==1&&(S.alpha=this.valpha),S},round:function(S){return S=Math.max(S||0,0),new w(this.color.map((function(C){return function(x){return(function(O,M){return Number(O.toFixed(M))})(x,C)}})(S)).concat(this.valpha),this.model)},alpha:function(S){return arguments.length?new w(this.color.concat(Math.max(0,Math.min(1,S))),this.model):this.valpha},red:T("rgb",0,v(255)),green:T("rgb",1,v(255)),blue:T("rgb",2,v(255)),hue:T(["hsl","hsv","hsl","hwb","hcg"],0,function(S){return(S%360+360)%360}),saturationl:T("hsl",1,v(100)),lightness:T("hsl",2,v(100)),saturationv:T("hsv",1,v(100)),value:T("hsv",2,v(100)),chroma:T("hcg",1,v(100)),gray:T("hcg",2,v(100)),white:T("hwb",1,v(100)),wblack:T("hwb",2,v(100)),cyan:T("cmyk",0,v(100)),magenta:T("cmyk",1,v(100)),yellow:T("cmyk",2,v(100)),black:T("cmyk",3,v(100)),x:T("xyz",0,v(100)),y:T("xyz",1,v(100)),z:T("xyz",2,v(100)),l:T("lab",0,v(100)),a:T("lab",1),b:T("lab",2),keyword:function(S){return arguments.length?new w(S):p[this.model].keyword(this.color)},hex:function(S){return arguments.length?new w(S):h.to.hex(this.rgb().round().color)},rgbNumber:function(){var S=this.rgb().color;return(255&S[0])<<16|(255&S[1])<<8|255&S[2]},luminosity:function(){for(var S=this.rgb().color,C=[],x=0;x<S.length;x++){var O=S[x]/255;C[x]=O<=.03928?O/12.92:Math.pow((O+.055)/1.055,2.4)}return .2126*C[0]+.7152*C[1]+.0722*C[2]},contrast:function(S){var C=this.luminosity(),x=S.luminosity();return C>x?(C+.05)/(x+.05):(x+.05)/(C+.05)},level:function(S){var C=this.contrast(S);return C>=7.1?"AAA":C>=4.5?"AA":""},isDark:function(){var S=this.rgb().color;return(299*S[0]+587*S[1]+114*S[2])/1e3<128},isLight:function(){return!this.isDark()},negate:function(){for(var S=this.rgb(),C=0;C<3;C++)S.color[C]=255-S.color[C];return S},lighten:function(S){var C=this.hsl();return C.color[2]+=C.color[2]*S,C},darken:function(S){var C=this.hsl();return C.color[2]-=C.color[2]*S,C},saturate:function(S){var C=this.hsl();return C.color[1]+=C.color[1]*S,C},desaturate:function(S){var C=this.hsl();return C.color[1]-=C.color[1]*S,C},whiten:function(S){var C=this.hwb();return C.color[1]+=C.color[1]*S,C},blacken:function(S){var C=this.hwb();return C.color[2]+=C.color[2]*S,C},grayscale:function(){var S=this.rgb().color,C=.3*S[0]+.59*S[1]+.11*S[2];return w.rgb(C,C,C)},fade:function(S){return this.alpha(this.valpha-this.valpha*S)},opaquer:function(S){return this.alpha(this.valpha+this.valpha*S)},rotate:function(S){var C=this.hsl(),x=C.color[0];return x=(x=(x+S)%360)<0?360+x:x,C.color[0]=x,C},mix:function(S,C){if(!S||!S.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof S);var x=S.rgb(),O=this.rgb(),M=C===void 0?.5:C,P=2*M-1,z=x.alpha()-O.alpha(),I=((P*z===-1?P:(P+z)/(1+P*z))+1)/2,q=1-I;return w.rgb(I*x.red()+q*O.red(),I*x.green()+q*O.green(),I*x.blue()+q*O.blue(),x.alpha()*M+O.alpha()*(1-M))}},Object.keys(p).forEach(function(S){if(b.indexOf(S)===-1){var C=p[S].channels;w.prototype[S]=function(){if(this.model===S)return new w(this);if(arguments.length)return new w(arguments,S);var x,O=typeof arguments[C]=="number"?C:this.valpha;return new w((x=p[this.model][S].raw(this.color),Array.isArray(x)?x:[x]).concat(O),S)},w[S]=function(x){return typeof x=="number"&&(x=E(g.call(arguments),C)),new w(x,S)}}}),c.exports=w},9784:c=>{var u,d=typeof Reflect=="object"?Reflect:null,h=d&&typeof d.apply=="function"?d.apply:function(O,M,P){return Function.prototype.apply.call(O,M,P)};u=d&&typeof d.ownKeys=="function"?d.ownKeys:Object.getOwnPropertySymbols?function(O){return Object.getOwnPropertyNames(O).concat(Object.getOwnPropertySymbols(O))}:function(O){return Object.getOwnPropertyNames(O)};var p=Number.isNaN||function(O){return O!=O};function g(){g.init.call(this)}c.exports=g,c.exports.once=function(O,M){return new Promise(function(P,z){function I(G){O.removeListener(M,q),z(G)}function q(){typeof O.removeListener=="function"&&O.removeListener("error",I),P([].slice.call(arguments))}x(O,M,q,{once:!0}),M!=="error"&&(function(G,ee,J){typeof G.on=="function"&&x(G,"error",ee,J)})(O,I,{once:!0})})},g.EventEmitter=g,g.prototype._events=void 0,g.prototype._eventsCount=0,g.prototype._maxListeners=void 0;var b=10;function y(O){if(typeof O!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof O)}function _(O){return O._maxListeners===void 0?g.defaultMaxListeners:O._maxListeners}function w(O,M,P,z){var I,q,G,ee;if(y(P),(q=O._events)===void 0?(q=O._events=Object.create(null),O._eventsCount=0):(q.newListener!==void 0&&(O.emit("newListener",M,P.listener?P.listener:P),q=O._events),G=q[M]),G===void 0)G=q[M]=P,++O._eventsCount;else if(typeof G=="function"?G=q[M]=z?[P,G]:[G,P]:z?G.unshift(P):G.push(P),(I=_(O))>0&&G.length>I&&!G.warned){G.warned=!0;var J=new Error("Possible EventEmitter memory leak detected. "+G.length+" "+String(M)+" listeners added. Use emitter.setMaxListeners() to increase limit");J.name="MaxListenersExceededWarning",J.emitter=O,J.type=M,J.count=G.length,ee=J,console&&console.warn&&console.warn(ee)}return O}function T(){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 v(O,M,P){var z={fired:!1,wrapFn:void 0,target:O,type:M,listener:P},I=T.bind(z);return I.listener=P,z.wrapFn=I,I}function E(O,M,P){var z=O._events;if(z===void 0)return[];var I=z[M];return I===void 0?[]:typeof I=="function"?P?[I.listener||I]:[I]:P?(function(q){for(var G=new Array(q.length),ee=0;ee<G.length;++ee)G[ee]=q[ee].listener||q[ee];return G})(I):C(I,I.length)}function S(O){var M=this._events;if(M!==void 0){var P=M[O];if(typeof P=="function")return 1;if(P!==void 0)return P.length}return 0}function C(O,M){for(var P=new Array(M),z=0;z<M;++z)P[z]=O[z];return P}function x(O,M,P,z){if(typeof O.on=="function")z.once?O.once(M,P):O.on(M,P);else{if(typeof O.addEventListener!="function")throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof O);O.addEventListener(M,function I(q){z.once&&O.removeEventListener(M,I),P(q)})}}Object.defineProperty(g,"defaultMaxListeners",{enumerable:!0,get:function(){return b},set:function(O){if(typeof O!="number"||O<0||p(O))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+O+".");b=O}}),g.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},g.prototype.setMaxListeners=function(O){if(typeof O!="number"||O<0||p(O))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+O+".");return this._maxListeners=O,this},g.prototype.getMaxListeners=function(){return _(this)},g.prototype.emit=function(O){for(var M=[],P=1;P<arguments.length;P++)M.push(arguments[P]);var z=O==="error",I=this._events;if(I!==void 0)z=z&&I.error===void 0;else if(!z)return!1;if(z){var q;if(M.length>0&&(q=M[0]),q instanceof Error)throw q;var G=new Error("Unhandled error."+(q?" ("+q.message+")":""));throw G.context=q,G}var ee=I[O];if(ee===void 0)return!1;if(typeof ee=="function")h(ee,this,M);else{var J=ee.length,Z=C(ee,J);for(P=0;P<J;++P)h(Z[P],this,M)}return!0},g.prototype.addListener=function(O,M){return w(this,O,M,!1)},g.prototype.on=g.prototype.addListener,g.prototype.prependListener=function(O,M){return w(this,O,M,!0)},g.prototype.once=function(O,M){return y(M),this.on(O,v(this,O,M)),this},g.prototype.prependOnceListener=function(O,M){return y(M),this.prependListener(O,v(this,O,M)),this},g.prototype.removeListener=function(O,M){var P,z,I,q,G;if(y(M),(z=this._events)===void 0)return this;if((P=z[O])===void 0)return this;if(P===M||P.listener===M)--this._eventsCount===0?this._events=Object.create(null):(delete z[O],z.removeListener&&this.emit("removeListener",O,P.listener||M));else if(typeof P!="function"){for(I=-1,q=P.length-1;q>=0;q--)if(P[q]===M||P[q].listener===M){G=P[q].listener,I=q;break}if(I<0)return this;I===0?P.shift():(function(ee,J){for(;J+1<ee.length;J++)ee[J]=ee[J+1];ee.pop()})(P,I),P.length===1&&(z[O]=P[0]),z.removeListener!==void 0&&this.emit("removeListener",O,G||M)}return this},g.prototype.off=g.prototype.removeListener,g.prototype.removeAllListeners=function(O){var M,P,z;if((P=this._events)===void 0)return this;if(P.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):P[O]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete P[O]),this;if(arguments.length===0){var I,q=Object.keys(P);for(z=0;z<q.length;++z)(I=q[z])!=="removeListener"&&this.removeAllListeners(I);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(M=P[O])=="function")this.removeListener(O,M);else if(M!==void 0)for(z=M.length-1;z>=0;z--)this.removeListener(O,M[z]);return this},g.prototype.listeners=function(O){return E(this,O,!0)},g.prototype.rawListeners=function(O){return E(this,O,!1)},g.listenerCount=function(O,M){return typeof O.listenerCount=="function"?O.listenerCount(M):S.call(O,M)},g.prototype.listenerCount=S,g.prototype.eventNames=function(){return this._eventsCount>0?u(this._events):[]}},2094:c=>{c.exports=function(u){return!(!u||typeof u=="string")&&(u instanceof Array||Array.isArray(u)||u.length>=0&&(u.splice instanceof Function||Object.getOwnPropertyDescriptor(u,u.length-1)&&u.constructor.name!=="String"))}},3989:c=>{var u="__lodash_placeholder__",d=32,h=1/0,p=NaN,g=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",d],["partialRight",64],["rearg",256]],b="[object Function]",y="[object GeneratorFunction]",_=/^\s+|\s+$/g,w=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,T=/\{\n\/\* \[wrapped with (.+)\] \*/,v=/,? & /,E=/^[-+]0x[0-9a-f]+$/i,S=/^0b[01]+$/i,C=/^\[object .+?Constructor\]$/,x=/^0o[0-7]+$/i,O=/^(?:0|[1-9]\d*)$/,M=parseInt,P=typeof dm=="object"&&dm&&dm.Object===Object&&dm,z=typeof self=="object"&&self&&self.Object===Object&&self,I=P||z||Function("return this")();function q(Ce,pe,Ne){switch(Ne.length){case 0:return Ce.call(pe);case 1:return Ce.call(pe,Ne[0]);case 2:return Ce.call(pe,Ne[0],Ne[1]);case 3:return Ce.call(pe,Ne[0],Ne[1],Ne[2])}return Ce.apply(pe,Ne)}function G(Ce,pe){return!!(Ce&&Ce.length)&&(function(Ne,Be,it){if(Be!=Be)return(function(pt,on,qt,Tt){for(var Wt=pt.length,Pt=qt+-1;++Pt<Wt;)if(on(pt[Pt],Pt,pt))return Pt;return-1})(Ne,ee,it);for(var vt=it-1,bt=Ne.length;++vt<bt;)if(Ne[vt]===Be)return vt;return-1})(Ce,pe,0)>-1}function ee(Ce){return Ce!=Ce}function J(Ce,pe){for(var Ne=-1,Be=Ce.length,it=0,vt=[];++Ne<Be;){var bt=Ce[Ne];bt!==pe&&bt!==u||(Ce[Ne]=u,vt[it++]=Ne)}return vt}var Z,H,Y,oe=Function.prototype,ne=Object.prototype,$=I["__core-js_shared__"],V=(Z=/[^.]+$/.exec($&&$.keys&&$.keys.IE_PROTO||""))?"Symbol(src)_1."+Z:"",U=oe.toString,D=ne.hasOwnProperty,B=ne.toString,te=RegExp("^"+U.call(D).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),re=Object.create,le=Math.max,ge=Math.min,Me=(H=$e(Object,"defineProperty"),(Y=$e.name)&&Y.length>2?H:void 0);function Q(Ce){if(!Le(Ce)||(function(Ne){return!!V&&V in Ne})(Ce))return!1;var pe=(function(Ne){var Be=Le(Ne)?B.call(Ne):"";return Be==b||Be==y})(Ce)||(function(Ne){var Be=!1;if(Ne!=null&&typeof Ne.toString!="function")try{Be=!!(Ne+"")}catch{}return Be})(Ce)?te:C;return pe.test((function(Ne){if(Ne!=null){try{return U.call(Ne)}catch{}try{return Ne+""}catch{}}return""})(Ce))}function ie(Ce){return function(){var pe=arguments;switch(pe.length){case 0:return new Ce;case 1:return new Ce(pe[0]);case 2:return new Ce(pe[0],pe[1]);case 3:return new Ce(pe[0],pe[1],pe[2]);case 4:return new Ce(pe[0],pe[1],pe[2],pe[3]);case 5:return new Ce(pe[0],pe[1],pe[2],pe[3],pe[4]);case 6:return new Ce(pe[0],pe[1],pe[2],pe[3],pe[4],pe[5]);case 7:return new Ce(pe[0],pe[1],pe[2],pe[3],pe[4],pe[5],pe[6])}var Ne,Be=Le(Ne=Ce.prototype)?re(Ne):{},it=Ce.apply(Be,pe);return Le(it)?it:Be}}function de(Ce,pe,Ne,Be,it,vt,bt,pt,on,qt){var Tt=128&pe,Wt=1&pe,Pt=2&pe,Bt=24&pe,sn=512&pe,bn=Pt?void 0:ie(Ce);return function gt(){for(var Yt=arguments.length,Nt=Array(Yt),Vn=Yt;Vn--;)Nt[Vn]=arguments[Vn];if(Bt)var ft=we(gt),Xt=(function(an,ir){for(var $t=an.length,Ar=0;$t--;)an[$t]===ir&&Ar++;return Ar})(Nt,ft);if(Be&&(Nt=(function(an,ir,$t,Ar){for(var sr=-1,to=an.length,Sr=$t.length,Qt=-1,Cn=ir.length,Dr=le(to-Sr,0),xo=Array(Cn+Dr),Oi=!Ar;++Qt<Cn;)xo[Qt]=ir[Qt];for(;++sr<Sr;)(Oi||sr<to)&&(xo[$t[sr]]=an[sr]);for(;Dr--;)xo[Qt++]=an[sr++];return xo})(Nt,Be,it,Bt)),vt&&(Nt=(function(an,ir,$t,Ar){for(var sr=-1,to=an.length,Sr=-1,Qt=$t.length,Cn=-1,Dr=ir.length,xo=le(to-Qt,0),Oi=Array(xo+Dr),xf=!Ar;++sr<xo;)Oi[sr]=an[sr];for(var sl=sr;++Cn<Dr;)Oi[sl+Cn]=ir[Cn];for(;++Sr<Qt;)(xf||sr<to)&&(Oi[sl+$t[Sr]]=an[sr++]);return Oi})(Nt,vt,bt,Bt)),Yt-=Xt,Bt&&Yt<qt){var mn=J(Nt,ft);return _e(Ce,pe,de,gt.placeholder,Ne,Nt,mn,pt,on,qt-Yt)}var En=Wt?Ne:this,qn=Pt?En[Ce]:Ce;return Yt=Nt.length,pt?Nt=(function(an,ir){for(var $t=an.length,Ar=ge(ir.length,$t),sr=(function(Sr,Qt){var Cn=-1,Dr=Sr.length;for(Qt||(Qt=Array(Dr));++Cn<Dr;)Qt[Cn]=Sr[Cn];return Qt})(an);Ar--;){var to=ir[Ar];an[Ar]=Fe(to,$t)?sr[to]:void 0}return an})(Nt,pt):sn&&Yt>1&&Nt.reverse(),Tt&&on<Yt&&(Nt.length=on),this&&this!==I&&this instanceof gt&&(qn=bn||ie(qn)),qn.apply(En,Nt)}}function _e(Ce,pe,Ne,Be,it,vt,bt,pt,on,qt){var Tt=8&pe;pe|=Tt?d:64,4&(pe&=~(Tt?64:d))||(pe&=-4);var Wt=Ne(Ce,pe,it,Tt?vt:void 0,Tt?bt:void 0,Tt?void 0:vt,Tt?void 0:bt,pt,on,qt);return Wt.placeholder=Be,Re(Wt,Ce,pe)}function Te(Ce,pe,Ne,Be,it,vt,bt,pt){var on=2&pe;if(!on&&typeof Ce!="function")throw new TypeError("Expected a function");var qt=Be?Be.length:0;if(qt||(pe&=-97,Be=it=void 0),bt=bt===void 0?bt:le(dt(bt),0),pt=pt===void 0?pt:dt(pt),qt-=it?it.length:0,64&pe){var Tt=Be,Wt=it;Be=it=void 0}var Pt=[Ce,pe,Ne,Be,it,Tt,Wt,vt,bt,pt];if(Ce=Pt[0],pe=Pt[1],Ne=Pt[2],Be=Pt[3],it=Pt[4],!(pt=Pt[9]=Pt[9]==null?on?0:Ce.length:le(Pt[9]-qt,0))&&24&pe&&(pe&=-25),pe&&pe!=1)Bt=pe==8||pe==16?(function(sn,bn,gt){var Yt=ie(sn);return function Nt(){for(var Vn=arguments.length,ft=Array(Vn),Xt=Vn,mn=we(Nt);Xt--;)ft[Xt]=arguments[Xt];var En=Vn<3&&ft[0]!==mn&&ft[Vn-1]!==mn?[]:J(ft,mn);return(Vn-=En.length)<gt?_e(sn,bn,de,Nt.placeholder,void 0,ft,En,void 0,void 0,gt-Vn):q(this&&this!==I&&this instanceof Nt?Yt:sn,this,ft)}})(Ce,pe,pt):pe!=d&&pe!=33||it.length?de.apply(void 0,Pt):(function(sn,bn,gt,Yt){var Nt=1&bn,Vn=ie(sn);return function ft(){for(var Xt=-1,mn=arguments.length,En=-1,qn=Yt.length,an=Array(qn+mn),ir=this&&this!==I&&this instanceof ft?Vn:sn;++En<qn;)an[En]=Yt[En];for(;mn--;)an[En++]=arguments[++Xt];return q(ir,Nt?gt:this,an)}})(Ce,pe,Ne,Be);else var Bt=(function(sn,bn,gt){var Yt=1&bn,Nt=ie(sn);return function Vn(){return(this&&this!==I&&this instanceof Vn?Nt:sn).apply(Yt?gt:this,arguments)}})(Ce,pe,Ne);return Re(Bt,Ce,pe)}function we(Ce){return Ce.placeholder}function $e(Ce,pe){var Ne=(function(Be,it){return Be?.[it]})(Ce,pe);return Q(Ne)?Ne:void 0}function Ze(Ce){var pe=Ce.match(T);return pe?pe[1].split(v):[]}function ye(Ce,pe){var Ne=pe.length,Be=Ne-1;return pe[Be]=(Ne>1?"& ":"")+pe[Be],pe=pe.join(Ne>2?", ":" "),Ce.replace(w,`{
128
- /* [wrapped with `+pe+`] */
129
- `)}function Fe(Ce,pe){return!!(pe=pe??9007199254740991)&&(typeof Ce=="number"||O.test(Ce))&&Ce>-1&&Ce%1==0&&Ce<pe}var Re=Me?function(Ce,pe,Ne){var Be,it=pe+"";return Me(Ce,"toString",{configurable:!0,enumerable:!1,value:(Be=ye(it,We(Ze(it),Ne)),function(){return Be})})}:function(Ce){return Ce};function We(Ce,pe){return(function(Ne,Be){for(var it=-1,vt=Ne?Ne.length:0;++it<vt&&Be(Ne[it],it,Ne)!==!1;);})(g,function(Ne){var Be="_."+Ne[0];pe&Ne[1]&&!G(Ce,Be)&&Ce.push(Be)}),Ce.sort()}function ze(Ce,pe,Ne){var Be=Te(Ce,8,void 0,void 0,void 0,void 0,void 0,pe=Ne?void 0:pe);return Be.placeholder=ze.placeholder,Be}function Le(Ce){var pe=typeof Ce;return!!Ce&&(pe=="object"||pe=="function")}function Ue(Ce){return Ce?(Ce=(function(pe){if(typeof pe=="number")return pe;if((function(it){return typeof it=="symbol"||(function(vt){return!!vt&&typeof vt=="object"})(it)&&B.call(it)=="[object Symbol]"})(pe))return p;if(Le(pe)){var Ne=typeof pe.valueOf=="function"?pe.valueOf():pe;pe=Le(Ne)?Ne+"":Ne}if(typeof pe!="string")return pe===0?pe:+pe;pe=pe.replace(_,"");var Be=S.test(pe);return Be||x.test(pe)?M(pe.slice(2),Be?2:8):E.test(pe)?p:+pe})(Ce))===h||Ce===-1/0?17976931348623157e292*(Ce<0?-1:1):Ce==Ce?Ce:0:Ce===0?Ce:0}function dt(Ce){var pe=Ue(Ce),Ne=pe%1;return pe==pe?Ne?pe-Ne:pe:0}ze.placeholder={},c.exports=ze},3403:(c,u,d)=>{var h=d(2094),p=Array.prototype.concat,g=Array.prototype.slice,b=c.exports=function(y){for(var _=[],w=0,T=y.length;w<T;w++){var v=y[w];h(v)?_=p.call(_,g.call(v)):_.push(v)}return _};b.wrap=function(y){return function(){return y(b(arguments))}}},4119:c=>{c.exports=n}},o={};function s(c){var u=o[c];if(u!==void 0)return u.exports;var d=o[c]={exports:{}};return r[c](d,d.exports,s),d.exports}s.n=c=>{var u=c&&c.__esModule?()=>c.default:()=>c;return s.d(u,{a:u}),u},s.d=(c,u)=>{for(var d in u)s.o(u,d)&&!s.o(c,d)&&Object.defineProperty(c,d,{enumerable:!0,get:u[d]})},s.o=(c,u)=>Object.prototype.hasOwnProperty.call(c,u),s.r=c=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(c,"__esModule",{value:!0})};var l={};return(()=>{function c(X){return c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(L){return typeof L}:function(L){return L&&typeof Symbol=="function"&&L.constructor===Symbol&&L!==Symbol.prototype?"symbol":typeof L},c(X)}function u(X){var L=(function(F,K){if(c(F)!="object"||!F)return F;var ae=F[Symbol.toPrimitive];if(ae!==void 0){var xe=ae.call(F,K);if(c(xe)!="object")return xe;throw new TypeError("@@toPrimitive must return a primitive value.")}return(K==="string"?String:Number)(F)})(X,"string");return c(L)=="symbol"?L:L+""}function d(X,L,F){return(L=u(L))in X?Object.defineProperty(X,L,{value:F,enumerable:!0,configurable:!0,writable:!0}):X[L]=F,X}function h(X,L){var F=Object.keys(X);if(Object.getOwnPropertySymbols){var K=Object.getOwnPropertySymbols(X);L&&(K=K.filter(function(ae){return Object.getOwnPropertyDescriptor(X,ae).enumerable})),F.push.apply(F,K)}return F}function p(X){for(var L=1;L<arguments.length;L++){var F=arguments[L]!=null?arguments[L]:{};L%2?h(Object(F),!0).forEach(function(K){d(X,K,F[K])}):Object.getOwnPropertyDescriptors?Object.defineProperties(X,Object.getOwnPropertyDescriptors(F)):h(Object(F)).forEach(function(K){Object.defineProperty(X,K,Object.getOwnPropertyDescriptor(F,K))})}return X}function g(X,L){if(!(X instanceof L))throw new TypeError("Cannot call a class as a function")}function b(X,L){for(var F=0;F<L.length;F++){var K=L[F];K.enumerable=K.enumerable||!1,K.configurable=!0,"value"in K&&(K.writable=!0),Object.defineProperty(X,u(K.key),K)}}function y(X,L,F){return L&&b(X.prototype,L),F&&b(X,F),Object.defineProperty(X,"prototype",{writable:!1}),X}function _(X){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(L){return L.__proto__||Object.getPrototypeOf(L)},_(X)}function w(){try{var X=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(w=function(){return!!X})()}function T(X,L){if(L&&(c(L)=="object"||typeof L=="function"))return L;if(L!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(F){if(F===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return F})(X)}function v(X,L,F){return L=_(L),T(X,w()?Reflect.construct(L,F||[],_(X).constructor):L.apply(X,F))}function E(X,L){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(F,K){return F.__proto__=K,F},E(X,L)}function S(X,L){if(typeof L!="function"&&L!==null)throw new TypeError("Super expression must either be null or a function");X.prototype=Object.create(L&&L.prototype,{constructor:{value:X,writable:!0,configurable:!0}}),Object.defineProperty(X,"prototype",{writable:!1}),L&&E(X,L)}s.r(l),s.d(l,{default:()=>ap});var C=s(4119),x=s.n(C);function O(){var X=this.constructor.getDerivedStateFromProps(this.props,this.state);X!=null&&this.setState(X)}function M(X){this.setState((function(L){var F=this.constructor.getDerivedStateFromProps(X,L);return F??null}).bind(this))}function P(X,L){try{var F=this.props,K=this.state;this.props=X,this.state=L,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(F,K)}finally{this.props=F,this.state=K}}function z(X){var L=X.prototype;if(!L||!L.isReactComponent)throw new Error("Can only polyfill class components");if(typeof X.getDerivedStateFromProps!="function"&&typeof L.getSnapshotBeforeUpdate!="function")return X;var F=null,K=null,ae=null;if(typeof L.componentWillMount=="function"?F="componentWillMount":typeof L.UNSAFE_componentWillMount=="function"&&(F="UNSAFE_componentWillMount"),typeof L.componentWillReceiveProps=="function"?K="componentWillReceiveProps":typeof L.UNSAFE_componentWillReceiveProps=="function"&&(K="UNSAFE_componentWillReceiveProps"),typeof L.componentWillUpdate=="function"?ae="componentWillUpdate":typeof L.UNSAFE_componentWillUpdate=="function"&&(ae="UNSAFE_componentWillUpdate"),F!==null||K!==null||ae!==null){var xe=X.displayName||X.name,me=typeof X.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
130
-
131
- `+xe+" uses "+me+" but also contains the following legacy lifecycles:"+(F!==null?`
132
- `+F:"")+(K!==null?`
133
- `+K:"")+(ae!==null?`
134
- `+ae:"")+`
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 X.getDerivedStateFromProps=="function"&&(L.componentWillMount=O,L.componentWillReceiveProps=M),typeof L.getSnapshotBeforeUpdate=="function"){if(typeof L.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");L.componentWillUpdate=P;var ce=L.componentDidUpdate;L.componentDidUpdate=function(Oe,De,qe){var Ve=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:qe;ce.call(this,Oe,De,Ve)}}return X}function I(X,L){if(X==null)return{};var F={};for(var K in X)if({}.hasOwnProperty.call(X,K)){if(L.indexOf(K)!==-1)continue;F[K]=X[K]}return F}function q(X,L){if(X==null)return{};var F,K,ae=I(X,L);if(Object.getOwnPropertySymbols){var xe=Object.getOwnPropertySymbols(X);for(K=0;K<xe.length;K++)F=xe[K],L.indexOf(F)===-1&&{}.propertyIsEnumerable.call(X,F)&&(ae[F]=X[F])}return ae}function G(X,L){if(L&&X?.constructor===L)return"bigNumber";var F=(function(K){return{}.toString.call(K).match(/\s([a-zA-Z]+)/)[1].toLowerCase()})(X);return F==="number"&&(F=isNaN(X)?"nan":(0|X)!=X?"float":"integer"),F}function ee(X){return X.replace(/\\/g,"\\\\").replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r").replace(/\f/g,"\\f")}O.__suppressDeprecationWarning=!0,M.__suppressDeprecationWarning=!0,P.__suppressDeprecationWarning=!0;var J={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"},Z={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 H={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(X,L){(L==null||L>X.length)&&(L=X.length);for(var F=0,K=Array(L);F<L;F++)K[F]=X[F];return K}function oe(X,L){if(X){if(typeof X=="string")return Y(X,L);var F={}.toString.call(X).slice(8,-1);return F==="Object"&&X.constructor&&(F=X.constructor.name),F==="Map"||F==="Set"?Array.from(X):F==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(F)?Y(X,L):void 0}}function ne(X,L){return(function(F){if(Array.isArray(F))return F})(X)||(function(F,K){var ae=F==null?null:typeof Symbol<"u"&&F[Symbol.iterator]||F["@@iterator"];if(ae!=null){var xe,me,ce,Oe,De=[],qe=!0,Ve=!1;try{if(ce=(ae=ae.call(F)).next,K===0){if(Object(ae)!==ae)return;qe=!1}else for(;!(qe=(xe=ce.call(ae)).done)&&(De.push(xe.value),De.length!==K);qe=!0);}catch(et){Ve=!0,me=et}finally{try{if(!qe&&ae.return!=null&&(Oe=ae.return(),Object(Oe)!==Oe))return}finally{if(Ve)throw me}}return De}})(X,L)||oe(X,L)||(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 $=s(9446),V=s(3639),U=s.n(V),D=s(3989),B=s.n(D);function te(X,L){var F=Object.keys(X);if(Object.getOwnPropertySymbols){var K=Object.getOwnPropertySymbols(X);L&&(K=K.filter(function(ae){return Object.getOwnPropertyDescriptor(X,ae).enumerable})),F.push.apply(F,K)}return F}function re(X){for(var L=1;L<arguments.length;L++){var F=arguments[L]!=null?arguments[L]:{};L%2?te(Object(F),!0).forEach(function(K){d(X,K,F[K])}):Object.getOwnPropertyDescriptors?Object.defineProperties(X,Object.getOwnPropertyDescriptors(F)):te(Object(F)).forEach(function(K){Object.defineProperty(X,K,Object.getOwnPropertyDescriptor(F,K))})}return X}var le=$.default,ge=Object.keys(le),Me=function(X){var L,F=(function(Oe){var De=Oe[0]/255,qe=Oe[1]/255,Ve=Oe[2]/255;return[.299*De+.587*qe+.114*Ve,-.14713*De+-.28886*qe+.436*Ve,.615*De+-.51499*qe+-.10001*Ve]})(U()(X).array()),K=ne(F,3),ae=K[0],xe=K[1],me=K[2],ce=(function(Oe){var De,qe,Ve,et=Oe[0],He=Oe[1],Et=Oe[2];return De=1*et+0*He+1.13983*Et,qe=1*et+-.39465*He+-.5806*Et,Ve=1*et+2.02311*He+0*Et,[255*(De=Math.min(Math.max(0,De),1)),255*(qe=Math.min(Math.max(0,qe),1)),255*(Ve=Math.min(Math.max(0,Ve),1))]})([(L=ae,L<.25?1:L<.5?.9-L:1.1-L),xe,me]);return U().rgb(ce).hex()},Q=function(X){return function(L){return{className:[L.className,X.className].filter(Boolean).join(" "),style:re(re({},L.style||{}),X.style||{})}}},ie=function(X,L){var F=Object.keys(L);for(var K in X)F.indexOf(K)===-1&&F.push(K);return F.reduce(function(ae,xe){return ae[xe]=(function(me,ce){if(me===void 0)return ce;if(ce===void 0)return me;var Oe=c(me),De=c(ce);switch(Oe){case"string":switch(De){case"string":return[ce,me].filter(Boolean).join(" ");case"object":return Q({className:me,style:ce});case"function":return function(qe){for(var Ve=arguments.length,et=new Array(Ve>1?Ve-1:0),He=1;He<Ve;He++)et[He-1]=arguments[He];return Q({className:me})(ce.apply(void 0,[qe].concat(et)))}}break;case"object":switch(De){case"string":return Q({className:ce,style:me});case"object":return re(re({},ce),me);case"function":return function(qe){for(var Ve=arguments.length,et=new Array(Ve>1?Ve-1:0),He=1;He<Ve;He++)et[He-1]=arguments[He];return Q({style:me})(ce.apply(void 0,[qe].concat(et)))}}break;case"function":switch(De){case"string":return function(qe){for(var Ve=arguments.length,et=new Array(Ve>1?Ve-1:0),He=1;He<Ve;He++)et[He-1]=arguments[He];return me.apply(void 0,[Q(qe)({className:ce})].concat(et))};case"object":return function(qe){for(var Ve=arguments.length,et=new Array(Ve>1?Ve-1:0),He=1;He<Ve;He++)et[He-1]=arguments[He];return me.apply(void 0,[Q(qe)({style:ce})].concat(et))};case"function":return function(qe){for(var Ve=arguments.length,et=new Array(Ve>1?Ve-1:0),He=1;He<Ve;He++)et[He-1]=arguments[He];return me.apply(void 0,[ce.apply(void 0,[qe].concat(et))].concat(et))}}}})(X[xe],L[xe]),ae},{})},de=function(X,L){for(var F=arguments.length,K=new Array(F>2?F-2:0),ae=2;ae<F;ae++)K[ae-2]=arguments[ae];if(L===null)return X;Array.isArray(L)||(L=[L]);var xe=L.map(function(me){return X[me]}).filter(Boolean).reduce(function(me,ce){return typeof ce=="string"?me.className=[me.className,ce].filter(Boolean).join(" "):c(ce)==="object"?me.style=re(re({},me.style),ce):typeof ce=="function"&&(me=re(re({},me),ce.apply(void 0,[me].concat(K)))),me},{className:"",style:{}});return xe.className||delete xe.className,Object.keys(xe.style).length===0&&delete xe.style,xe},_e=function(X){return Object.keys(X).reduce(function(L,F){return L[F]=/^base/.test(F)?Me(X[F]):F==="scheme"?X[F]+":inverted":X[F],L},{})},Te=B()(function(X){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},K=L.defaultBase16,ae=K===void 0?le:K,xe=L.base16Themes,me=$e(F,xe===void 0?null:xe);me&&(F=re(re({},me),F));for(var ce=ge.reduce(function(Et,It){return Et[It]=F[It]||ae[It],Et},{}),Oe=Object.keys(F).reduce(function(Et,It){return ge.indexOf(It)===-1&&(Et[It]=F[It]),Et},{}),De=X(ce),qe=ie(Oe,De),Ve=arguments.length,et=new Array(Ve>3?Ve-3:0),He=3;He<Ve;He++)et[He-3]=arguments[He];return B()(de,2).apply(void 0,[qe].concat(et))},3),we=function(X){return!!X.extend},$e=function(X,L){if(X&&we(X)&&X.extend&&(X=X.extend),typeof X=="string"){var F=ne(X.split(":"),2),K=F[0],ae=F[1];X=L?L[K]:$[K],ae==="inverted"&&(X=_e(X))}return X&&Object.prototype.hasOwnProperty.call(X,"base00")?X:void 0},Ze=function(X){var L=(function(F){return{backgroundColor:F.base00,ellipsisColor:F.base09,braceColor:F.base07,expandedIcon:F.base0D,collapsedIcon:F.base0E,keyColor:F.base07,arrayKeyColor:F.base0C,objectSize:F.base04,copyToClipboard:F.base0F,copyToClipboardCheck:F.base0D,objectBorder:F.base02,dataTypes:{boolean:F.base0E,date:F.base0D,float:F.base0B,function:F.base0D,integer:F.base0F,string:F.base09,nan:F.base08,null:F.base0A,undefined:F.base05,regexp:F.base0A,background:F.base02,bigNumber:F.base09},editVariable:{editIcon:F.base0E,cancelIcon:F.base09,removeIcon:F.base09,addIcon:F.base0E,checkIcon:F.base0E,background:F.base01,color:F.base0A,border:F.base07},addKeyModal:{background:F.base05,border:F.base04,color:F.base0A,labelColor:F.base01},validationFailure:{background:F.base09,iconColor:F.base01,fontColor:F.base01}}})(X);return{"app-container":{fontFamily:H.globalFontFamily,cursor:H.globalCursor,backgroundColor:L.backgroundColor,position:"relative"},ellipsis:{display:"inline-block",color:L.ellipsisColor,fontSize:H.ellipsisFontSize,lineHeight:H.ellipsisLineHeight,cursor:H.ellipsisCursor},"brace-row":{display:"inline-block",cursor:"pointer"},brace:{display:"inline-block",cursor:H.braceCursor,fontWeight:H.braceFontWeight,color:L.braceColor},"expanded-icon":{color:L.expandedIcon},"collapsed-icon":{color:L.collapsedIcon},colon:{display:"inline-block",margin:H.keyMargin,color:L.keyColor,verticalAlign:"top"},objectKeyVal:function(F,K){return{style:p({paddingTop:H.keyValPaddingTop,paddingRight:H.keyValPaddingRight,paddingBottom:H.keyValPaddingBottom,borderLeft:H.keyValBorderLeft+" "+L.objectBorder,":hover":{paddingLeft:K.paddingLeft-1+"px",borderLeft:H.keyValBorderHover+" "+L.objectBorder}},K)}},"object-key-val-no-border":{padding:H.keyValPadding},"pushed-content":{marginLeft:H.pushedContentMarginLeft},variableValue:function(F,K){return{style:p({display:"inline-block",paddingRight:H.variableValuePaddingRight,position:"relative"},K)}},"object-name":{display:"inline-block",color:L.keyColor,letterSpacing:H.keyLetterSpacing,fontStyle:H.keyFontStyle,verticalAlign:H.keyVerticalAlign,opacity:H.keyOpacity,":hover":{opacity:H.keyOpacityHover}},"array-key":{display:"inline-block",color:L.arrayKeyColor,letterSpacing:H.keyLetterSpacing,fontStyle:H.keyFontStyle,verticalAlign:H.keyVerticalAlign,opacity:H.keyOpacity,":hover":{opacity:H.keyOpacityHover}},"object-size":{color:L.objectSize,borderRadius:H.objectSizeBorderRadius,fontStyle:H.objectSizeFontStyle,margin:H.objectSizeMargin,cursor:"default"},"data-type-label":{fontSize:H.dataTypeFontSize,marginRight:H.dataTypeMarginRight,opacity:H.datatypeOpacity},boolean:{display:"inline-block",color:L.dataTypes.boolean},date:{display:"inline-block",color:L.dataTypes.date},"date-value":{marginLeft:H.dateValueMarginLeft},float:{display:"inline-block",color:L.dataTypes.float},function:{display:"inline-block",color:L.dataTypes.function,cursor:"pointer",whiteSpace:"pre-line"},"function-value":{fontStyle:"italic"},integer:{display:"inline-block",color:L.dataTypes.integer},bigNumber:{display:"inline-block",color:L.dataTypes.bigNumber},string:{display:"inline-block",color:L.dataTypes.string},nan:{display:"inline-block",color:L.dataTypes.nan,fontSize:H.nanFontSize,fontWeight:H.nanFontWeight,backgroundColor:L.dataTypes.background,padding:H.nanPadding,borderRadius:H.nanBorderRadius},null:{display:"inline-block",color:L.dataTypes.null,fontSize:H.nullFontSize,fontWeight:H.nullFontWeight,backgroundColor:L.dataTypes.background,padding:H.nullPadding,borderRadius:H.nullBorderRadius},undefined:{display:"inline-block",color:L.dataTypes.undefined,fontSize:H.undefinedFontSize,padding:H.undefinedPadding,borderRadius:H.undefinedBorderRadius,backgroundColor:L.dataTypes.background},regexp:{display:"inline-block",color:L.dataTypes.regexp},"copy-to-clipboard":{cursor:H.clipboardCursor},"copy-icon":{color:L.copyToClipboard,fontSize:H.iconFontSize,marginRight:H.iconMarginRight,verticalAlign:"top"},"copy-icon-copied":{color:L.copyToClipboardCheck,marginLeft:H.clipboardCheckMarginLeft},"array-group-meta-data":{display:"inline-block",padding:H.arrayGroupMetaPadding},"object-meta-data":{display:"inline-block",padding:H.metaDataPadding},"icon-container":{display:"inline-block",width:H.iconContainerWidth},tooltip:{padding:H.tooltipPadding},removeVarIcon:{verticalAlign:"top",display:"inline-block",color:L.editVariable.removeIcon,cursor:H.iconCursor,fontSize:H.iconFontSize,marginRight:H.iconMarginRight},addVarIcon:{verticalAlign:"top",display:"inline-block",color:L.editVariable.addIcon,cursor:H.iconCursor,fontSize:H.iconFontSize,marginRight:H.iconMarginRight},editVarIcon:{verticalAlign:"top",display:"inline-block",color:L.editVariable.editIcon,cursor:H.iconCursor,fontSize:H.iconFontSize,marginRight:H.iconMarginRight},"edit-icon-container":{display:"inline-block",verticalAlign:"top"},"check-icon":{display:"inline-block",cursor:H.iconCursor,color:L.editVariable.checkIcon,fontSize:H.iconFontSize,paddingRight:H.iconPaddingRight},"cancel-icon":{display:"inline-block",cursor:H.iconCursor,color:L.editVariable.cancelIcon,fontSize:H.iconFontSize,paddingRight:H.iconPaddingRight},"edit-input":{display:"inline-block",minWidth:H.editInputMinWidth,borderRadius:H.editInputBorderRadius,backgroundColor:L.editVariable.background,color:L.editVariable.color,padding:H.editInputPadding,marginRight:H.editInputMarginRight,fontFamily:H.editInputFontFamily},"detected-row":{paddingTop:H.detectedRowPaddingTop},"key-modal-request":{position:H.addKeyCoverPosition,top:H.addKeyCoverPositionPx,left:H.addKeyCoverPositionPx,right:H.addKeyCoverPositionPx,bottom:H.addKeyCoverPositionPx,backgroundColor:H.addKeyCoverBackground},"key-modal":{width:H.addKeyModalWidth,backgroundColor:L.addKeyModal.background,marginLeft:H.addKeyModalMargin,marginRight:H.addKeyModalMargin,padding:H.addKeyModalPadding,borderRadius:H.addKeyModalRadius,marginTop:"15px",position:"relative"},"key-modal-label":{color:L.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:L.addKeyModal.color,border:"none",boxSizing:"border-box",borderRadius:"2px"},"key-modal-cancel":{backgroundColor:L.editVariable.removeIcon,position:"absolute",top:"0px",right:"0px",borderRadius:"0px 3px 0px 3px",cursor:"pointer"},"key-modal-cancel-icon":{color:L.addKeyModal.labelColor,fontSize:H.iconFontSize,transform:"rotate(45deg)"},"key-modal-submit":{color:L.editVariable.addIcon,fontSize:H.iconFontSize,position:"absolute",right:"2px",top:"3px",cursor:"pointer"},"function-ellipsis":{display:"inline-block",color:L.ellipsisColor,fontSize:H.ellipsisFontSize,lineHeight:H.ellipsisLineHeight,cursor:H.ellipsisCursor},"validation-failure":{float:"right",padding:"3px 6px",borderRadius:"2px",cursor:"pointer",color:L.validationFailure.fontColor,backgroundColor:L.validationFailure.background},"validation-failure-label":{marginRight:"6px"},"validation-failure-clear":{position:"relative",verticalAlign:"top",cursor:"pointer",color:L.validationFailure.iconColor,fontSize:H.iconFontSize,transform:"rotate(45deg)"},comma:{display:"inline-block",color:H.commaColor,fontSize:H.commaFontSize,marginRight:H.commaMarginRight,cursor:"default"}}};function ye(X,L,F){return X||console.error("theme has not been set"),(function(K){var ae=J;return K!==!1&&K!=="none"||(ae=Z),Te(Ze,{defaultBase16:ae})(K)})(X)(L,F)}var Fe=(function(X){function L(){return g(this,L),v(this,L,arguments)}return S(L,X),y(L,[{key:"render",value:function(){var F=this.props,K=(F.rjvId,F.type_name),ae=F.displayDataTypes,xe=F.theme;return ae?x().createElement("span",Object.assign({className:"data-type-label"},ye(xe,"data-type-label")),K):null}}])})(x().PureComponent),Re=(function(X){function L(){return g(this,L),v(this,L,arguments)}return S(L,X),y(L,[{key:"render",value:function(){var F=this.props;return x().createElement("div",ye(F.theme,"boolean"),x().createElement(Fe,Object.assign({type_name:"bool"},F)),F.value?"true":"false")}}])})(x().PureComponent),We=(function(X){function L(){return g(this,L),v(this,L,arguments)}return S(L,X),y(L,[{key:"render",value:function(){var F=this.props;return x().createElement("div",ye(F.theme,"date"),x().createElement(Fe,Object.assign({type_name:"date"},F)),x().createElement("span",Object.assign({className:"date-value"},ye(F.theme,"date-value")),F.value.toLocaleTimeString("en-us",{weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})))}}])})(x().PureComponent),ze=(function(X){function L(){return g(this,L),v(this,L,arguments)}return S(L,X),y(L,[{key:"render",value:function(){var F=this.props;return x().createElement("div",ye(F.theme,"float"),x().createElement(Fe,Object.assign({type_name:"float"},F)),this.props.value)}}])})(x().PureComponent);function Le(X){return(function(L){if(Array.isArray(L))return Y(L)})(X)||(function(L){if(typeof Symbol<"u"&&L[Symbol.iterator]!=null||L["@@iterator"]!=null)return Array.from(L)})(X)||oe(X)||(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 Ue=s(9784),dt=(function(){return y(function X(){g(this,X),this.handler=function(){}},[{key:"register",value:function(X){this.handler=X}},{key:"dispatch",value:function(X){var L;(L=this.handler)===null||L===void 0||L.call(this,X)}}])})();globalThis.__globalDispatcherInstance||(globalThis.__globalDispatcherInstance=new dt);const Ce=globalThis.__globalDispatcherInstance;var pe=new((function(X){function L(){var F;g(this,L);for(var K=arguments.length,ae=new Array(K),xe=0;xe<K;xe++)ae[xe]=arguments[xe];return(F=v(this,L,[].concat(ae))).objects={},F.set=function(me,ce,Oe,De){F.objects[me]===void 0&&(F.objects[me]={}),F.objects[me][ce]===void 0&&(F.objects[me][ce]={}),F.objects[me][ce][Oe]=De},F.get=function(me,ce,Oe,De){return F.objects[me]===void 0||F.objects[me][ce]===void 0||F.objects[me][ce][Oe]==null?De:F.objects[me][ce][Oe]},F.handleAction=function(me){var ce=me.rjvId,Oe=me.data;switch(me.name){case"RESET":F.emit("reset-"+ce);break;case"VARIABLE_UPDATED":me.data.updated_src=F.updateSrc(ce,Oe),F.set(ce,"action","variable-update",p(p({},Oe),{},{type:"variable-edited"})),F.emit("variable-update-"+ce);break;case"VARIABLE_REMOVED":me.data.updated_src=F.updateSrc(ce,Oe),F.set(ce,"action","variable-update",p(p({},Oe),{},{type:"variable-removed"})),F.emit("variable-update-"+ce);break;case"VARIABLE_ADDED":me.data.updated_src=F.updateSrc(ce,Oe),F.set(ce,"action","variable-update",p(p({},Oe),{},{type:"variable-added"})),F.emit("variable-update-"+ce);break;case"ADD_VARIABLE_KEY_REQUEST":F.set(ce,"action","new-key-request",Oe),F.emit("add-key-request-"+ce)}},F.updateSrc=function(me,ce){var Oe=ce.name,De=ce.namespace,qe=ce.new_value,Ve=(ce.existing_value,ce.variable_removed);De.shift();var et,He=F.get(me,"global","src"),Et=F.deepCopy(He,Le(De)),It=Et,st=(function(xt,ar){var cn=typeof Symbol<"u"&&xt[Symbol.iterator]||xt["@@iterator"];if(!cn){if(Array.isArray(xt)||(cn=oe(xt))||ar){cn&&(xt=cn);var wr=0,kr=function(){};return{s:kr,n:function(){return wr>=xt.length?{done:!0}:{done:!1,value:xt[wr++]}},e:function(oo){throw oo},f:kr}}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 Ai,fs=!0,hi=!1;return{s:function(){cn=cn.call(xt)},n:function(){var oo=cn.next();return fs=oo.done,oo},e:function(oo){hi=!0,Ai=oo},f:function(){try{fs||cn.return==null||cn.return()}finally{if(hi)throw Ai}}}})(De);try{for(st.s();!(et=st.n()).done;)It=It[et.value]}catch(xt){st.e(xt)}finally{st.f()}return Ve?G(It)=="array"?It.splice(Oe,1):delete It[Oe]:Oe!==null?It[Oe]=qe:Et=qe,F.set(me,"global","src",Et),Et},F.deepCopy=function(me,ce){var Oe,De=G(me),qe=ce.shift();return De=="array"?Oe=Le(me):De=="object"&&(Oe=p({},me)),qe!==void 0&&(Oe[qe]=F.deepCopy(me[qe],ce)),Oe},F}return S(L,X),y(L)})(Ue.EventEmitter));Ce.register(pe.handleAction.bind(pe));const Ne=pe;var Be=(function(X){function L(F){var K;return g(this,L),(K=v(this,L,[F])).toggleCollapsed=function(){K.setState({collapsed:!K.state.collapsed},function(){Ne.set(K.props.rjvId,K.props.namespace,"collapsed",K.state.collapsed)})},K.getFunctionDisplay=function(ae){var xe=K.props;return ae?x().createElement("span",null,K.props.value.toString().slice(9,-1).replace(/\{[\s\S]+/,""),x().createElement("span",{className:"function-collapsed",style:{fontWeight:"bold"}},x().createElement("span",null,"{"),x().createElement("span",ye(xe.theme,"ellipsis"),"..."),x().createElement("span",null,"}"))):K.props.value.toString().slice(9,-1)},K.state={collapsed:Ne.get(F.rjvId,F.namespace,"collapsed",!0)},K}return S(L,X),y(L,[{key:"render",value:function(){var F=this.props,K=this.state.collapsed;return x().createElement("div",ye(F.theme,"function"),x().createElement(Fe,Object.assign({type_name:"function"},F)),x().createElement("span",Object.assign({},ye(F.theme,"function-value"),{className:"rjv-function-container",onClick:this.toggleCollapsed}),this.getFunctionDisplay(K)))}}])})(x().PureComponent),it=(function(X){function L(){return g(this,L),v(this,L,arguments)}return S(L,X),y(L,[{key:"render",value:function(){return x().createElement("div",ye(this.props.theme,"nan"),"NaN")}}])})(x().PureComponent),vt=(function(X){function L(){return g(this,L),v(this,L,arguments)}return S(L,X),y(L,[{key:"render",value:function(){return x().createElement("div",ye(this.props.theme,"null"),"NULL")}}])})(x().PureComponent),bt=(function(X){function L(){return g(this,L),v(this,L,arguments)}return S(L,X),y(L,[{key:"render",value:function(){var F=this.props;return x().createElement("div",ye(F.theme,"integer"),x().createElement(Fe,Object.assign({type_name:"int"},F)),this.props.value)}}])})(x().PureComponent),pt=(function(X){function L(){return g(this,L),v(this,L,arguments)}return S(L,X),y(L,[{key:"render",value:function(){var F=this.props;return x().createElement("div",ye(F.theme,"regexp"),x().createElement(Fe,Object.assign({type_name:"regexp"},F)),this.props.value.toString())}}])})(x().PureComponent),on=(function(X){function L(F){var K;return g(this,L),(K=v(this,L,[F])).toggleCollapsed=function(){K.setState({collapsed:!K.state.collapsed},function(){Ne.set(K.props.rjvId,K.props.namespace,"collapsed",K.state.collapsed)})},K.state={collapsed:Ne.get(F.rjvId,F.namespace,"collapsed",!0)},K}return S(L,X),y(L,[{key:"render",value:function(){var F=this.state.collapsed,K=this.props,ae=K.collapseStringsAfterLength,xe=K.theme,me=K.escapeStrings,ce=K.value,Oe=G(ae)==="integer",De={style:{cursor:"default",wordBreak:"break-all"}};return me&&(ce=ee(ce)),Oe&&ce.length>ae&&(De.style.cursor="pointer",F&&(ce=x().createElement("span",null,ce.substring(0,ae),x().createElement("span",ye(xe,"ellipsis")," ...")))),x().createElement("div",ye(xe,"string"),x().createElement(Fe,Object.assign({type_name:"string"},K)),x().createElement("span",Object.assign({className:"string-value"},De,{onClick:this.toggleCollapsed}),'"',ce,'"'))}}])})(x().PureComponent),qt=(function(X){function L(){return g(this,L),v(this,L,arguments)}return S(L,X),y(L,[{key:"render",value:function(){return x().createElement("div",ye(this.props.theme,"undefined"),"undefined")}}])})(x().PureComponent),Tt=(function(X){function L(){return g(this,L),v(this,L,arguments)}return S(L,X),y(L,[{key:"render",value:function(){var F=this.props;return x().createElement("div",ye(F.theme,"bigNumber"),x().createElement(Fe,Object.assign({type_name:"bigNumber"},F)),this.props.value.toString())}}])})(x().PureComponent);function Wt(){return Wt=Object.assign?Object.assign.bind():function(X){for(var L=1;L<arguments.length;L++){var F=arguments[L];for(var K in F)({}).hasOwnProperty.call(F,K)&&(X[K]=F[K])}return X},Wt.apply(null,arguments)}var Pt=C.useLayoutEffect,Bt=function(X,L){typeof X!="function"?X.current=L:X(L)},sn={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},bn=function(X){Object.keys(sn).forEach(function(L){X.style.setProperty(L,sn[L],"important")})},gt=null,Yt=function(X,L){var F=X.scrollHeight;return L.sizingStyle.boxSizing==="border-box"?F+L.borderSize:F-L.paddingSize},Nt=function(){},Vn=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],ft=!!document.documentElement.currentStyle,Xt=function(X){var L=window.getComputedStyle(X);if(L===null)return null;var F,K=(F=L,Vn.reduce(function(xe,me){return xe[me]=F[me],xe},{})),ae=K.boxSizing;return ae===""?null:(ft&&ae==="border-box"&&(K.width=parseFloat(K.width)+parseFloat(K.borderRightWidth)+parseFloat(K.borderLeftWidth)+parseFloat(K.paddingRight)+parseFloat(K.paddingLeft)+"px"),{sizingStyle:K,paddingSize:parseFloat(K.paddingBottom)+parseFloat(K.paddingTop),borderSize:parseFloat(K.borderBottomWidth)+parseFloat(K.borderTopWidth)})};function mn(X,L,F){var K,ae,xe=(K=F,ae=x().useRef(K),Pt(function(){ae.current=K}),ae);C.useLayoutEffect(function(){var me=function(ce){return xe.current(ce)};if(X)return X.addEventListener(L,me),function(){return X.removeEventListener(L,me)}},[])}var En=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],qn=function(X,L){var F=X.cacheMeasurements,K=X.maxRows,ae=X.minRows,xe=X.onChange,me=xe===void 0?Nt:xe,ce=X.onHeightChange,Oe=ce===void 0?Nt:ce,De=I(X,En),qe=De.value!==void 0,Ve=C.useRef(null),et=(function(st,xt){var ar=x().useRef();return x().useCallback(function(cn){st.current=cn,ar.current&&Bt(ar.current,null),ar.current=xt,xt&&Bt(xt,cn)},[xt])})(Ve,L),He=C.useRef(0),Et=C.useRef(),It=function(){var st=Ve.current,xt=F&&Et.current?Et.current:Xt(st);if(xt){Et.current=xt;var ar=(function(kr,Ai,fs,hi){fs===void 0&&(fs=1),hi===void 0&&(hi=1/0),gt||((gt=document.createElement("textarea")).setAttribute("tabindex","-1"),gt.setAttribute("aria-hidden","true"),bn(gt)),gt.parentNode===null&&document.body.appendChild(gt);var oo=kr.paddingSize,Of=kr.borderSize,Mr=kr.sizingStyle,ki=Mr.boxSizing;Object.keys(Mr).forEach(function(kf){var Xs=kf;gt.style[Xs]=Mr[Xs]}),bn(gt),gt.value=Ai;var Mi=Yt(gt,kr);gt.value=Ai,Mi=Yt(gt,kr),gt.value="x";var ds=gt.scrollHeight-oo,Af=ds*fs;ki==="border-box"&&(Af=Af+oo+Of),Mi=Math.max(Af,Mi);var fl=ds*hi;return ki==="border-box"&&(fl=fl+oo+Of),[Mi=Math.min(fl,Mi),ds]})(xt,st.value||st.placeholder||"x",ae,K),cn=ar[0],wr=ar[1];He.current!==cn&&(He.current=cn,st.style.setProperty("height",cn+"px","important"),Oe(cn,{rowHeight:wr}))}};return C.useLayoutEffect(It),(function(st,xt){mn(document.body,"reset",function(ar){st.current.form===ar.target&&xt(ar)})})(Ve,function(){if(!qe){var st=Ve.current.value;requestAnimationFrame(function(){var xt=Ve.current;xt&&st!==xt.value&&It()})}}),mn(window,"resize",It),(function(st){mn(document.fonts,"loadingdone",st)})(It),C.createElement("textarea",Wt({},De,{onChange:function(st){qe||It(),me(st)},ref:et}))},an=C.forwardRef(qn);function ir(X,L){X=X.trim();try{if((X=structuredClone(X))[0]==="[")return $t("array",JSON.parse(X));if(X[0]==="{")return $t("object",JSON.parse(X));if(X.match(/\-?\d+\.\d+/)&&X.match(/\-?\d+\.\d+/)[0]===X)return L&&parseFloat(X).toString()!==X?$t("bigNumber",X):$t("float",parseFloat(X));if(X.match(/\-?\d+e-\d+/)&&X.match(/\-?\d+e-\d+/)[0]===X)return $t("float",Number(X));if(X.match(/\-?\d+/)&&X.match(/\-?\d+/)[0]===X)return L&&parseInt(X).toString()!==X?$t("bigNumber",X):$t("integer",parseInt(X));if(X.match(/\-?\d+e\+\d+/)&&X.match(/\-?\d+e\+\d+/)[0]===X)return $t("integer",Number(X))}catch{}switch(X=X.toLowerCase()){case"undefined":return $t("undefined",void 0);case"nan":return $t("nan",NaN);case"null":return $t("null",null);case"true":return $t("boolean",!0);case"false":return $t("boolean",!1);default:if(X=Date.parse(X))return $t("date",new Date(X))}return $t(!1,null)}function $t(X,L){return{type:X,value:L}}var Ar=["style"],sr=["style"],to=["style"],Sr=["style"],Qt=["style"],Cn=["style"],Dr=["style"],xo=["style"],Oi=["style"],xf=["style"],sl=["style"],al=["style"],_f=(function(X){function L(){return g(this,L),v(this,L,arguments)}return S(L,X),y(L,[{key:"render",value:function(){var F=this.props,K=F.style,ae=q(F,Ar);return x().createElement("span",ae,x().createElement("svg",Object.assign({},no(K),{viewBox:"0 0 24 24",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),x().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"})))}}])})(x().PureComponent),Ks=(function(X){function L(){return g(this,L),v(this,L,arguments)}return S(L,X),y(L,[{key:"render",value:function(){var F=this.props,K=F.style,ae=q(F,sr);return x().createElement("span",ae,x().createElement("svg",Object.assign({},no(K),{viewBox:"0 0 24 24",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),x().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"})))}}])})(x().PureComponent),Gs=(function(X){function L(){return g(this,L),v(this,L,arguments)}return S(L,X),y(L,[{key:"render",value:function(){var F=this.props,K=F.style,ae=q(F,to),xe=no(K).style;return x().createElement("span",ae,x().createElement("svg",{fill:xe.color,width:xe.height,height:xe.width,style:xe,viewBox:"0 0 1792 1792"},x().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"})))}}])})(x().PureComponent),ll=(function(X){function L(){return g(this,L),v(this,L,arguments)}return S(L,X),y(L,[{key:"render",value:function(){var F=this.props,K=F.style,ae=q(F,Sr),xe=no(K).style;return x().createElement("span",ae,x().createElement("svg",{fill:xe.color,width:xe.height,height:xe.width,style:xe,viewBox:"0 0 1792 1792"},x().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"})))}}])})(x().PureComponent),Zs=(function(X){function L(){return g(this,L),v(this,L,arguments)}return S(L,X),y(L,[{key:"render",value:function(){var F=this.props,K=F.style,ae=q(F,Qt);return x().createElement("span",ae,x().createElement("svg",{style:p(p({},no(K).style),{},{paddingLeft:"2px",verticalAlign:"top"}),viewBox:"0 0 15 15",fill:"currentColor"},x().createElement("path",{d:"M0 14l6-6-6-6z"})))}}])})(x().PureComponent),fr=(function(X){function L(){return g(this,L),v(this,L,arguments)}return S(L,X),y(L,[{key:"render",value:function(){var F=this.props,K=F.style,ae=q(F,Cn);return x().createElement("span",ae,x().createElement("svg",{style:p(p({},no(K).style),{},{paddingLeft:"2px",verticalAlign:"top"}),viewBox:"0 0 15 15",fill:"currentColor"},x().createElement("path",{d:"M0 5l6 6 6-6z"})))}}])})(x().PureComponent),Ef=(function(X){function L(){return g(this,L),v(this,L,arguments)}return S(L,X),y(L,[{key:"render",value:function(){var F=this.props,K=F.style,ae=q(F,Dr);return x().createElement("span",ae,x().createElement("svg",Object.assign({},no(K),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),x().createElement("g",null,x().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"}))))}}])})(x().PureComponent),vc=(function(X){function L(){return g(this,L),v(this,L,arguments)}return S(L,X),y(L,[{key:"render",value:function(){var F=this.props,K=F.style,ae=q(F,xo);return x().createElement("span",ae,x().createElement("svg",Object.assign({},no(K),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),x().createElement("g",null,x().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"}))))}}])})(x().PureComponent),cs=(function(X){function L(){return g(this,L),v(this,L,arguments)}return S(L,X),y(L,[{key:"render",value:function(){var F=this.props,K=F.style,ae=q(F,Oi);return x().createElement("span",ae,x().createElement("svg",Object.assign({},no(K),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),x().createElement("g",null,x().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"}))))}}])})(x().PureComponent),us=(function(X){function L(){return g(this,L),v(this,L,arguments)}return S(L,X),y(L,[{key:"render",value:function(){var F=this.props,K=F.style,ae=q(F,xf);return x().createElement("span",ae,x().createElement("svg",Object.assign({},no(K),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),x().createElement("g",null,x().createElement("path",{d:"m31.6 21.6h-10v10h-3.2v-10h-10v-3.2h10v-10h3.2v10h10v3.2z"}))))}}])})(x().PureComponent),z0=(function(X){function L(){return g(this,L),v(this,L,arguments)}return S(L,X),y(L,[{key:"render",value:function(){var F=this.props,K=F.style,ae=q(F,sl);return x().createElement("span",ae,x().createElement("svg",Object.assign({},no(K),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),x().createElement("g",null,x().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"}))))}}])})(x().PureComponent),bc=(function(X){function L(){return g(this,L),v(this,L,arguments)}return S(L,X),y(L,[{key:"render",value:function(){var F=this.props,K=F.style,ae=q(F,al);return x().createElement("span",ae,x().createElement("svg",Object.assign({},no(K),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),x().createElement("g",null,x().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"}))))}}])})(x().PureComponent);function no(X){return X||(X={}),{style:p(p({verticalAlign:"middle"},X),{},{color:X.color?X.color:"#000000",height:"1em",width:"1em"})}}var op=(function(X){function L(F){var K;return g(this,L),(K=v(this,L,[F])).copiedTimer=null,K.copyToClipboardFallback=function(ae){var xe=document.createElement("textarea");xe.value=ae,document.body.appendChild(xe),xe.select(),document.execCommand("copy"),document.body.removeChild(xe)},K.handleCopy=function(){var ae=K.props,xe=ae.clickCallback,me=ae.src,ce=ae.namespace,Oe=JSON.stringify(K.clipboardValue(me),null," ");navigator.clipboard?navigator.clipboard.writeText(Oe).catch(function(){K.copyToClipboardFallback(Oe)}):K.copyToClipboardFallback(Oe),K.copiedTimer=setTimeout(function(){K.setState({copied:!1})},5500),K.setState({copied:!0},function(){typeof xe=="function"&&xe({src:me,namespace:ce,name:ce[ce.length-1]})})},K.getClippyIcon=function(){var ae=K.props.theme;return K.state.copied?x().createElement("span",null,x().createElement(Ef,Object.assign({className:"copy-icon"},ye(ae,"copy-icon"))),x().createElement("span",ye(ae,"copy-icon-copied"),"✔")):x().createElement(Ef,Object.assign({className:"copy-icon"},ye(ae,"copy-icon")))},K.clipboardValue=function(ae){switch(G(ae)){case"function":case"regexp":return ae.toString();default:return ae}},K.state={copied:!1},K}return S(L,X),y(L,[{key:"componentWillUnmount",value:function(){this.copiedTimer&&(clearTimeout(this.copiedTimer),this.copiedTimer=null)}},{key:"render",value:function(){var F=this.props,K=(F.src,F.theme),ae=F.hidden,xe=F.rowHovered,me=ye(K,"copy-to-clipboard").style,ce="inline";return ae&&(ce="none"),x().createElement("span",{className:"copy-to-clipboard-container",title:"Copy to clipboard",style:{verticalAlign:"top",display:xe?"inline-block":"none"}},x().createElement("span",{style:p(p({},me),{},{display:ce}),onClick:this.handleCopy},this.getClippyIcon()))}}])})(x().PureComponent);const Sc=(function(X){function L(F){var K;return g(this,L),(K=v(this,L,[F])).getEditIcon=function(){var ae=K.props,xe=ae.variable,me=ae.theme;return x().createElement("div",{className:"click-to-edit",style:{verticalAlign:"top",display:K.state.hovered?"inline-block":"none"}},x().createElement(z0,Object.assign({className:"click-to-edit-icon"},ye(me,"editVarIcon"),{onClick:function(){K.prepopInput(xe)}})))},K.prepopInput=function(ae){if(K.props.onEdit!==!1){var xe=(function(ce,Oe){var De;switch(G(ce,Oe)){case"undefined":De="undefined";break;case"nan":De="NaN";break;case"string":De=ce;break;case"bigNumber":case"date":case"function":case"regexp":De=ce.toString();break;default:try{De=JSON.stringify(ce,null," ")}catch{De=""}}return De})(ae.value,K.props.bigNumber),me=ir(xe,K.props.bigNumber);K.setState({editMode:!0,editValue:xe,parsedInput:{type:me.type,value:me.value}})}},K.getRemoveIcon=function(){var ae=K.props,xe=ae.variable,me=ae.namespace,ce=ae.theme,Oe=ae.rjvId;return x().createElement("div",{className:"click-to-remove",style:{verticalAlign:"top",display:K.state.hovered?"inline-block":"none"}},x().createElement(vc,Object.assign({className:"click-to-remove-icon"},ye(ce,"removeVarIcon"),{onClick:function(){Ce.dispatch({name:"VARIABLE_REMOVED",rjvId:Oe,data:{name:xe.name,namespace:me,existing_value:xe.value,variable_removed:!0}})}})))},K.getValue=function(ae,xe){var me=!xe&&ae.type,ce=K.props;switch(me){case!1:return K.getEditInput();case"string":return x().createElement(on,Object.assign({value:ae.value},ce));case"integer":return x().createElement(bt,Object.assign({value:ae.value},ce));case"float":return x().createElement(ze,Object.assign({value:ae.value},ce));case"boolean":return x().createElement(Re,Object.assign({value:ae.value},ce));case"function":return x().createElement(Be,Object.assign({value:ae.value},ce));case"null":return x().createElement(vt,ce);case"nan":return x().createElement(it,ce);case"undefined":return x().createElement(qt,ce);case"date":return x().createElement(We,Object.assign({value:ae.value},ce));case"regexp":return x().createElement(pt,Object.assign({value:ae.value},ce));case"bigNumber":return x().createElement(Tt,Object.assign({value:ae.value},ce));default:return x().createElement("div",{className:"object-value"},JSON.stringify(ae.value))}},K.getEditInput=function(){var ae=K.props,xe=ae.keyModifier,me=ae.selectOnFocus,ce=ae.theme,Oe=K.state.editValue;return x().createElement("div",null,x().createElement(an,Object.assign({type:"text",ref:function(De){De&&De[me?"select":"focus"]()},value:Oe,className:"variable-editor",onChange:function(De){var qe=De.target.value,Ve=ir(qe,K.props.bigNumber);K.setState({editValue:qe,parsedInput:{type:Ve.type,value:Ve.value}})},onKeyDown:function(De){switch(De.key){case"Escape":K.setState({editMode:!1,editValue:""});break;case"Enter":xe(De,"submit")&&K.submitEdit(!0)}De.stopPropagation()},placeholder:"update this value",minRows:2},ye(ce,"edit-input"))),x().createElement("div",ye(ce,"edit-icon-container"),x().createElement(vc,Object.assign({className:"edit-cancel"},ye(ce,"cancel-icon"),{onClick:function(De){De&&De.stopPropagation(),K.setState({editMode:!1,editValue:""})}})),x().createElement(bc,Object.assign({className:"edit-check string-value"},ye(ce,"check-icon"),{onClick:function(De){De&&De.stopPropagation(),K.submitEdit()}})),x().createElement("div",null,K.showDetected())))},K.submitEdit=function(ae){var xe=K.props,me=xe.variable,ce=xe.namespace,Oe=xe.rjvId,De=xe.bigNumber,qe=K.state,Ve=qe.editValue,et=qe.parsedInput,He=Ve;ae&&et.type&&(He=et.value,De&&et.type==="bigNumber"&&(He=new De(He))),K.setState({editMode:!1}),Ce.dispatch({name:"VARIABLE_UPDATED",rjvId:Oe,data:{name:me.name,namespace:ce,existing_value:me.value,new_value:He,variable_removed:!1}})},K.showDetected=function(){var ae=K.props,xe=ae.theme,me=(ae.variable,ae.namespace,ae.rjvId,K.state.parsedInput),ce=(me.type,me.value,K.getDetectedInput());if(ce)return x().createElement("div",null,x().createElement("div",ye(xe,"detected-row"),ce,x().createElement(bc,{className:"edit-check detected",style:p({verticalAlign:"top",paddingLeft:"3px"},ye(xe,"check-icon").style),onClick:function(Oe){Oe&&Oe.stopPropagation(),K.submitEdit(!0)}})))},K.getDetectedInput=function(){var ae=K.state.parsedInput,xe=ae.type,me=ae.value,ce=K.props,Oe=ce.theme;if(xe!==!1)switch(xe.toLowerCase()){case"object":return x().createElement("span",null,x().createElement("span",{style:p(p({},ye(Oe,"brace").style),{},{cursor:"default"})},"{"),x().createElement("span",{style:p(p({},ye(Oe,"ellipsis").style),{},{cursor:"default"})},"..."),x().createElement("span",{style:p(p({},ye(Oe,"brace").style),{},{cursor:"default"})},"}"));case"array":return x().createElement("span",null,x().createElement("span",{style:p(p({},ye(Oe,"brace").style),{},{cursor:"default"})},"["),x().createElement("span",{style:p(p({},ye(Oe,"ellipsis").style),{},{cursor:"default"})},"..."),x().createElement("span",{style:p(p({},ye(Oe,"brace").style),{},{cursor:"default"})},"]"));case"string":return x().createElement(on,Object.assign({value:me},ce));case"integer":return x().createElement(bt,Object.assign({value:me},ce));case"float":return x().createElement(ze,Object.assign({value:me},ce));case"boolean":return x().createElement(Re,Object.assign({value:me},ce));case"function":return x().createElement(Be,Object.assign({value:me},ce));case"null":return x().createElement(vt,ce);case"nan":return x().createElement(it,ce);case"undefined":return x().createElement(qt,ce);case"date":return x().createElement(We,Object.assign({value:new Date(me)},ce));case"bignumber":return x().createElement(Tt,Object.assign({value:me},ce))}},K.state={editMode:!1,editValue:"",hovered:!1,renameKey:!1,parsedInput:{type:!1,value:null}},K}return S(L,X),y(L,[{key:"render",value:function(){var F=this,K=this.props,ae=K.variable,xe=K.singleIndent,me=K.type,ce=K.theme,Oe=K.namespace,De=K.indentWidth,qe=K.enableClipboard,Ve=K.onEdit,et=K.onDelete,He=K.onSelect,Et=K.displayArrayKey,It=K.quotesOnKeys,st=K.keyModifier,xt=K.showComma,ar=K.isLast,cn=this.state.editMode;return x().createElement("div",Object.assign({},ye(ce,"objectKeyVal",{paddingLeft:De*xe}),{onMouseEnter:function(){return F.setState(p(p({},F.state),{},{hovered:!0}))},onMouseLeave:function(){return F.setState(p(p({},F.state),{},{hovered:!1}))},className:"variable-row",key:ae.name}),me=="array"?Et?x().createElement("span",Object.assign({},ye(ce,"array-key"),{key:ae.name+"_"+Oe}),ae.name,x().createElement("div",ye(ce,"colon"),":")):null:x().createElement("span",null,x().createElement("span",Object.assign({},ye(ce,"object-name"),{className:"object-key",key:ae.name+"_"+Oe}),!!It&&x().createElement("span",{style:{verticalAlign:"top"}},'"'),x().createElement("span",{style:{display:"inline-block"}},ee(ae.name)),!!It&&x().createElement("span",{style:{verticalAlign:"top"}},'"')),x().createElement("span",ye(ce,"colon"),":")),x().createElement("div",Object.assign({className:"variable-value",onClick:He===!1&&Ve===!1?null:function(wr){var kr=Le(Oe);st(wr,"edit")&&Ve!==!1?F.prepopInput(ae):He!==!1&&(kr.shift(),He(p(p({},ae),{},{namespace:kr})))}},ye(ce,"variableValue",{cursor:He===!1?"default":"pointer"})),this.getValue(ae,cn)),xt&&!ar&&x().createElement("span",ye(ce,"comma"),","),qe?x().createElement(op,{rowHovered:this.state.hovered,hidden:cn,src:ae.value,clickCallback:qe,theme:ce,namespace:[].concat(Le(Oe),[ae.name])}):null,Ve!==!1&&cn==0?this.getEditIcon():null,et!==!1&&cn==0?this.getRemoveIcon():null)}}])})(x().PureComponent);var cl=(function(X){function L(){var F;g(this,L);for(var K=arguments.length,ae=new Array(K),xe=0;xe<K;xe++)ae[xe]=arguments[xe];return(F=v(this,L,[].concat(ae))).getObjectSize=function(){var me=F.props,ce=me.size,Oe=me.theme;if(me.displayObjectSize)return x().createElement("span",Object.assign({className:"object-size"},ye(Oe,"object-size")),ce," item",ce===1?"":"s")},F.getAddAttribute=function(me){var ce=F.props,Oe=ce.theme,De=ce.namespace,qe=ce.name,Ve=ce.src,et=ce.rjvId,He=ce.depth;return x().createElement("span",{className:"click-to-add",style:{verticalAlign:"top",display:me?"inline-block":"none"}},x().createElement(cs,Object.assign({className:"click-to-add-icon"},ye(Oe,"addVarIcon"),{onClick:function(){var Et={name:He>0?qe:null,namespace:De.splice(0,De.length-1),existing_value:Ve,variable_removed:!1,key_name:null};G(Ve)==="object"?Ce.dispatch({name:"ADD_VARIABLE_KEY_REQUEST",rjvId:et,data:Et}):Ce.dispatch({name:"VARIABLE_ADDED",rjvId:et,data:p(p({},Et),{},{new_value:[].concat(Le(Ve),[null])})})}})))},F.getRemoveObject=function(me){var ce=F.props,Oe=ce.theme,De=(ce.hover,ce.namespace),qe=ce.name,Ve=ce.src,et=ce.rjvId;if(De.length!==1)return x().createElement("span",{className:"click-to-remove",style:{display:me?"inline-block":"none"}},x().createElement(vc,Object.assign({className:"click-to-remove-icon"},ye(Oe,"removeVarIcon"),{onClick:function(){Ce.dispatch({name:"VARIABLE_REMOVED",rjvId:et,data:{name:qe,namespace:De.splice(0,De.length-1),existing_value:Ve,variable_removed:!0}})}})))},F.render=function(){var me=F.props,ce=me.theme,Oe=me.onDelete,De=me.onAdd,qe=me.enableClipboard,Ve=me.src,et=me.namespace,He=me.rowHovered;return x().createElement("div",Object.assign({},ye(ce,"object-meta-data"),{className:"object-meta-data",onClick:function(Et){Et.stopPropagation()}}),F.getObjectSize(),qe?x().createElement(op,{rowHovered:He,clickCallback:qe,src:Ve,theme:ce,namespace:et}):null,De!==!1?F.getAddAttribute(He):null,Oe!==!1?F.getRemoveObject(He):null)},F}return S(L,X),y(L)})(x().PureComponent);function Vo(X){var L=X.parent_type,F=X.namespace,K=X.quotesOnKeys,ae=X.theme,xe=X.jsvRoot,me=X.name,ce=X.displayArrayKey,Oe=X.name?X.name:"";return!xe||me!==!1&&me!==null?L=="array"?ce?x().createElement("span",Object.assign({},ye(ae,"array-key"),{key:F}),x().createElement("span",{className:"array-key"},Oe),x().createElement("span",ye(ae,"colon"),":")):x().createElement("span",null):x().createElement("span",Object.assign({},ye(ae,"object-name"),{key:F}),x().createElement("span",{className:"object-key"},K&&x().createElement("span",{style:{verticalAlign:"top"}},'"'),x().createElement("span",null,Oe),K&&x().createElement("span",{style:{verticalAlign:"top"}},'"')),x().createElement("span",ye(ae,"colon"),":")):x().createElement("span",null)}function ro(X){var L=X.theme;switch(X.iconStyle){case"triangle":return x().createElement(fr,Object.assign({},ye(L,"expanded-icon"),{className:"expanded-icon"}));case"square":return x().createElement(Gs,Object.assign({},ye(L,"expanded-icon"),{className:"expanded-icon"}));default:return x().createElement(_f,Object.assign({},ye(L,"expanded-icon"),{className:"expanded-icon"}))}}function Cf(X){var L=X.theme;switch(X.iconStyle){case"triangle":return x().createElement(Zs,Object.assign({},ye(L,"collapsed-icon"),{className:"collapsed-icon"}));case"square":return x().createElement(ll,Object.assign({},ye(L,"collapsed-icon"),{className:"collapsed-icon"}));default:return x().createElement(Ks,Object.assign({},ye(L,"collapsed-icon"),{className:"collapsed-icon"}))}}var L0=["src","groupArraysAfterLength","depth","name","theme","jsvRoot","namespace","parent_type"],wc=(function(X){function L(F){var K;return g(this,L),(K=v(this,L,[F])).toggleCollapsed=function(ae){for(var xe=K.state.expanded,me=[],ce=Math.max(xe.length||0,ae+1),Oe=0;Oe<ce;Oe++)me[Oe]=xe[Oe]===!0;me[ae]=!me[ae],K.setState({expanded:me})},K.state={expanded:[]},K}return S(L,X),y(L,[{key:"getExpandedIcon",value:function(F){var K=this.props,ae=K.theme,xe=K.iconStyle;return this.state.expanded[F]?x().createElement(ro,{theme:ae,iconStyle:xe}):x().createElement(Cf,{theme:ae,iconStyle:xe})}},{key:"render",value:function(){var F=this,K=this.props,ae=K.src,xe=K.groupArraysAfterLength,me=(K.depth,K.name),ce=K.theme,Oe=K.jsvRoot,De=K.namespace,qe=(K.parent_type,q(K,L0)),Ve=0,et=5*this.props.indentWidth;Oe||(Ve=5*this.props.indentWidth);var He=xe,Et=Math.ceil(ae.length/He);return x().createElement("div",Object.assign({className:"object-key-val"},ye(ce,Oe?"jsv-root":"objectKeyVal",{paddingLeft:Ve})),x().createElement(Vo,this.props),x().createElement("span",null,x().createElement(cl,Object.assign({size:ae.length},this.props))),Le(Array(Et)).map(function(It,st){return x().createElement("div",Object.assign({key:st,className:"object-key-val array-group"},ye(ce,"objectKeyVal",{marginLeft:6,paddingLeft:et})),x().createElement("span",ye(ce,"brace-row"),x().createElement("div",Object.assign({className:"icon-container"},ye(ce,"icon-container"),{onClick:function(xt){F.toggleCollapsed(st)}}),F.getExpandedIcon(st)),F.state.expanded[st]?x().createElement($r,Object.assign({key:me+st,depth:0,name:!1,collapsed:!1,groupArraysAfterLength:He,index_offset:st*He,src:ae.slice(st*He,st*He+He),namespace:De,type:"array",parent_type:"array_group",theme:ce,showComma:F.props.showComma,isLast:st===Et-1},qe)):x().createElement("span",Object.assign({},ye(ce,"brace"),{onClick:function(xt){F.toggleCollapsed(st)},className:"array-group-brace"}),"[",x().createElement("div",Object.assign({},ye(ce,"array-group-meta-data"),{className:"array-group-meta-data"}),x().createElement("span",Object.assign({className:"object-size"},ye(ce,"object-size")),st*He," - ",st*He+He>ae.length?ae.length:st*He+He)),"]")))}))}}])})(x().PureComponent),ip=["depth","src","namespace","name","type","parent_type","theme","jsvRoot","iconStyle","showComma","isLast"],Ws=(function(X){function L(F){var K;g(this,L),(K=v(this,L,[F])).toggleCollapsed=function(){K.setState({expanded:!K.state.expanded},function(){Ne.set(K.props.rjvId,K.props.namespace,"expanded",K.state.expanded)})},K.getObjectContent=function(xe,me,ce){return x().createElement("div",{className:"pushed-content object-container"},x().createElement("div",Object.assign({className:"object-content"},ye(K.props.theme,"pushed-content")),K.renderObjectContents(me,ce)))},K.getEllipsis=function(){return K.state.size===0?null:x().createElement("div",Object.assign({},ye(K.props.theme,"ellipsis"),{className:"node-ellipsis",onClick:K.toggleCollapsed}),"...")},K.getObjectMetaData=function(xe){var me=K.props,ce=(me.rjvId,me.theme,K.state),Oe=ce.size,De=ce.hovered;return x().createElement(cl,Object.assign({rowHovered:De,size:Oe},K.props))},K.renderObjectContents=function(xe,me){var ce,Oe=K.props,De=Oe.depth,qe=Oe.parent_type,Ve=Oe.index_offset,et=Oe.groupArraysAfterLength,He=Oe.namespace,Et=Oe.showComma,It=K.state.object_type,st=[],xt=Object.keys(xe||{});return K.props.sortKeys&&It!=="array"&&(xt=xt.sort()),xt.forEach(function(ar,cn){ce=new F0(ar,xe[ar],me.bigNumber);var wr=cn===xt.length-1;if(qe==="array_group"&&Ve&&(ce.name=parseInt(ce.name)+Ve),Object.prototype.hasOwnProperty.call(xe,ar))if(ce.type==="object")st.push(x().createElement($r,Object.assign({key:ce.name,depth:De+1,name:ce.name,src:ce.value,namespace:He.concat(ce.name),parent_type:It,isLast:wr,showComma:Et},me)));else if(ce.type==="array"){var kr=$r;et&&ce.value.length>et&&(kr=wc),st.push(x().createElement(kr,Object.assign({key:ce.name,depth:De+1,name:ce.name,src:ce.value,namespace:He.concat(ce.name),type:"array",parent_type:It,isLast:wr,showComma:Et},me)))}else st.push(x().createElement(Sc,Object.assign({key:ce.name+"_"+He,variable:ce,singleIndent:5,namespace:He,type:K.props.type,isLast:wr,showComma:Et},me)))}),st};var ae=L.getState(F);return K.state=p(p({},ae),{},{prevProps:{}}),K}return S(L,X),y(L,[{key:"getBraceStart",value:function(F,K){var ae=this,xe=this.props,me=(xe.src,xe.theme),ce=xe.iconStyle;if(xe.parent_type==="array_group")return x().createElement("span",null,x().createElement("span",ye(me,"brace"),F==="array"?"[":"{"));var Oe=K?ro:Cf;return x().createElement("span",null,x().createElement("span",Object.assign({onClick:function(De){ae.toggleCollapsed()}},ye(me,"brace-row")),x().createElement("div",Object.assign({className:"icon-container"},ye(me,"icon-container")),x().createElement(Oe,{theme:me,iconStyle:ce})),x().createElement(Vo,this.props),x().createElement("span",ye(me,"brace"),F==="array"?"[":"{")))}},{key:"render",value:function(){var F=this,K=this.props,ae=K.depth,xe=K.src,me=(K.namespace,K.name,K.type,K.parent_type),ce=K.theme,Oe=K.jsvRoot,De=K.iconStyle,qe=K.showComma,Ve=K.isLast,et=q(K,ip),He=this.state,Et=He.object_type,It=He.expanded,st={};return Oe||me==="array_group"?me==="array_group"&&(st.borderLeft=0,st.display="inline"):st.paddingLeft=5*this.props.indentWidth,x().createElement("div",Object.assign({className:"object-key-val",onMouseEnter:function(){return F.setState(p(p({},F.state),{},{hovered:!0}))},onMouseLeave:function(){return F.setState(p(p({},F.state),{},{hovered:!1}))}},ye(ce,Oe?"jsv-root":"objectKeyVal",st)),this.getBraceStart(Et,It),It?this.getObjectContent(ae,xe,p({theme:ce,iconStyle:De},et)):this.getEllipsis(),x().createElement("span",{className:"brace-row"},x().createElement("span",{style:p(p({},ye(ce,"brace").style),{},{paddingLeft:It?"3px":"0px"})},Et==="array"?"]":"}")),qe&&!Ve&&!Oe&&x().createElement("span",ye(ce,"comma"),","),this.getObjectMetaData(xe))}}],[{key:"getDerivedStateFromProps",value:function(F,K){var ae=K.prevProps;return F.src!==ae.src||F.collapsed!==ae.collapsed||F.name!==ae.name||F.namespace!==ae.namespace||F.rjvId!==ae.rjvId?p(p({},L.getState(F)),{},{prevProps:F}):null}}])})(x().PureComponent);Ws.getState=function(X){var L=Object.keys(X.src).length,F=(X.collapsed===!1||X.collapsed!==!0&&X.collapsed>X.depth)&&(!X.shouldCollapse||X.shouldCollapse({name:X.name,src:X.src,type:G(X.src),namespace:X.namespace})===!1)&&L!==0;return{expanded:Ne.get(X.rjvId,X.namespace,"expanded",F),object_type:X.type==="array"?"array":"object",parent_type:X.type==="array"?"array":"object",size:L,hovered:!1}};var F0=y(function X(L,F,K){g(this,X),this.name=L,this.value=F,this.type=G(F,K)});z(Ws);const $r=Ws;var Tf=(function(X){function L(){var F;g(this,L);for(var K=arguments.length,ae=new Array(K),xe=0;xe<K;xe++)ae[xe]=arguments[xe];return(F=v(this,L,[].concat(ae))).render=function(){var me,ce,Oe,De,qe=F.props,Ve=[qe.name],et=$r;return typeof qe.name!="object"||Array.isArray(qe.name)||(Ve=[((me=qe.name)===null||me===void 0?void 0:me.displayName)||((ce=qe.name)===null||ce===void 0?void 0:ce.name)||((Oe=qe.name)===null||Oe===void 0||(De=Oe.type)===null||De===void 0?void 0:De.name)||"Anonymous"]),Array.isArray(qe.src)&&qe.groupArraysAfterLength&&qe.src.length>qe.groupArraysAfterLength&&(et=wc),x().createElement("div",{className:"pretty-json-container object-container"},x().createElement("div",{className:"object-content"},x().createElement(et,Object.assign({namespace:Ve,depth:0,jsvRoot:!0},qe))))},F}return S(L,X),y(L)})(x().PureComponent),sp=(function(X){function L(F){var K;return g(this,L),(K=v(this,L,[F])).closeModal=function(){Ce.dispatch({rjvId:K.props.rjvId,name:"RESET"})},K.submit=function(){K.props.submit(K.state.input)},K.state={input:F.input?F.input:""},K}return S(L,X),y(L,[{key:"render",value:function(){var F=this,K=this.props,ae=K.theme,xe=K.rjvId,me=K.isValid,ce=this.state.input,Oe=me(ce);return x().createElement("div",Object.assign({className:"key-modal-request"},ye(ae,"key-modal-request"),{onClick:this.closeModal}),x().createElement("div",Object.assign({},ye(ae,"key-modal"),{onClick:function(De){De.stopPropagation()}}),x().createElement("div",ye(ae,"key-modal-label"),"Key Name:"),x().createElement("div",{style:{position:"relative"}},x().createElement("input",Object.assign({},ye(ae,"key-modal-input"),{className:"key-modal-input",ref:function(De){return De&&De.focus()},spellCheck:!1,value:ce,placeholder:"...",onChange:function(De){F.setState({input:De.target.value})},onKeyPress:function(De){Oe&&De.key==="Enter"?F.submit():De.key==="Escape"&&F.closeModal()}})),Oe?x().createElement(bc,Object.assign({},ye(ae,"key-modal-submit"),{className:"key-modal-submit",onClick:function(De){return F.submit()}})):null),x().createElement("span",ye(ae,"key-modal-cancel"),x().createElement(us,Object.assign({},ye(ae,"key-modal-cancel-icon"),{className:"key-modal-cancel",onClick:function(){Ce.dispatch({rjvId:xe,name:"RESET"})}})))))}}])})(x().PureComponent),Rf=(function(X){function L(){var F;g(this,L);for(var K=arguments.length,ae=new Array(K),xe=0;xe<K;xe++)ae[xe]=arguments[xe];return(F=v(this,L,[].concat(ae))).isValid=function(me){var ce=F.props.rjvId,Oe=Ne.get(ce,"action","new-key-request");return me!=""&&Object.keys(Oe.existing_value).indexOf(me)===-1},F.submit=function(me){var ce=F.props.rjvId,Oe=Ne.get(ce,"action","new-key-request");Oe.new_value=p({},Oe.existing_value),Oe.new_value[me]=F.props.defaultValue,Ce.dispatch({name:"VARIABLE_ADDED",rjvId:ce,data:Oe})},F}return S(L,X),y(L,[{key:"render",value:function(){var F=this.props,K=F.active,ae=F.theme,xe=F.rjvId;return K?x().createElement(sp,{rjvId:xe,theme:ae,isValid:this.isValid,submit:this.submit}):null}}])})(x().PureComponent),Ys=(function(X){function L(){return g(this,L),v(this,L,arguments)}return S(L,X),y(L,[{key:"render",value:function(){var F=this.props,K=F.message,ae=F.active,xe=F.theme,me=F.rjvId;return ae?x().createElement("div",Object.assign({className:"validation-failure"},ye(xe,"validation-failure"),{onClick:function(){Ce.dispatch({rjvId:me,name:"RESET"})}}),x().createElement("span",ye(xe,"validation-failure-label"),K),x().createElement(us,ye(xe,"validation-failure-clear"))):null}}])})(x().PureComponent),ul=(function(X){function L(F){var K;return g(this,L),(K=v(this,L,[F])).rjvId=Date.now().toString()+Math.random().toString(36).slice(2),K.getListeners=function(){return{reset:K.resetState,"variable-update":K.updateSrc,"add-key-request":K.addKeyRequest}},K.updateSrc=function(){var ae,xe=Ne.get(K.rjvId,"action","variable-update"),me=xe.name,ce=xe.namespace,Oe=xe.new_value,De=xe.existing_value,qe=xe.updated_src,Ve=xe.type,et=K.props,He=et.onEdit,Et=et.onDelete,It=et.onAdd,st={existing_src:K.state.src,new_value:Oe,updated_src:qe,name:me,namespace:ce,existing_value:De};switch(Ve){case"variable-added":ae=It(st);break;case"variable-edited":ae=He(st);break;case"variable-removed":ae=Et(st)}ae!==!1?(Ne.set(K.rjvId,"global","src",qe),K.setState({src:qe})):K.setState({validationFailure:!0})},K.addKeyRequest=function(){K.setState({addKeyRequest:!0})},K.resetState=function(){K.setState({validationFailure:!1,addKeyRequest:!1})},K.state={addKeyRequest:!1,editKeyRequest:!1,validationFailure:!1,src:L.defaultProps.src,name:L.defaultProps.name,theme:L.defaultProps.theme,validationMessage:L.defaultProps.validationMessage,prevSrc:L.defaultProps.src,prevName:L.defaultProps.name,prevTheme:L.defaultProps.theme},K}return S(L,X),y(L,[{key:"componentDidMount",value:function(){Ne.set(this.rjvId,"global","src",this.state.src);var F=this.getListeners();for(var K in F)Ne.on(K+"-"+this.rjvId,F[K]);this.setState({addKeyRequest:!1,editKeyRequest:!1})}},{key:"componentDidUpdate",value:function(F,K){K.addKeyRequest!==!1&&this.setState({addKeyRequest:!1}),K.editKeyRequest!==!1&&this.setState({editKeyRequest:!1}),F.src!==this.state.src&&Ne.set(this.rjvId,"global","src",this.state.src)}},{key:"componentWillUnmount",value:function(){var F=this.getListeners();for(var K in F)Ne.removeListener(K+"-"+this.rjvId,F[K])}},{key:"render",value:function(){var F=this.state,K=F.validationFailure,ae=F.validationMessage,xe=F.addKeyRequest,me=F.theme,ce=F.src,Oe=F.name,De=this.props,qe=De.style,Ve=De.defaultValue;return x().createElement("div",{className:"react-json-view",style:p(p({},ye(me,"app-container").style),qe)},x().createElement(Ys,{message:ae,active:K,theme:me,rjvId:this.rjvId}),x().createElement(Tf,Object.assign({},this.props,{src:ce,name:Oe,theme:me,type:G(ce),rjvId:this.rjvId})),x().createElement(Rf,{active:xe,theme:me,rjvId:this.rjvId,defaultValue:Ve}))}}],[{key:"getDerivedStateFromProps",value:function(F,K){if(F.src!==K.prevSrc||F.name!==K.prevName||F.theme!==K.prevTheme){var ae={src:F.src,name:F.name,theme:F.theme,validationMessage:F.validationMessage,prevSrc:F.src,prevName:F.name,prevTheme:F.theme};return L.validateState(ae)}return null}}])})(x().PureComponent);ul.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(X){return X.metaKey||X.ctrlKey},bigNumber:null,showComma:!0},ul.validateState=function(X){var L={};return G(X.theme)!=="object"||(function(F){var K=["base00","base01","base02","base03","base04","base05","base06","base07","base08","base09","base0A","base0B","base0C","base0D","base0E","base0F"];if(G(F)==="object"){for(var ae=0;ae<K.length;ae++)if(!(K[ae]in F))return!1;return!0}return!1})(X.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'),L.theme="rjv-default"),G(X.src)!=="object"&&G(X.src)!=="array"&&(console.error("react-json-view error:","src property must be a valid json object"),L.name="ERROR",L.src={message:"src property must be a valid json object"}),p(p({},X),L)},z(ul);const ap=ul})(),l})())})(Gg)),Gg.exports}var Aye=Oye();const y6=ts(Aye),kye=rl("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 Mye({className:e,orientation:t,...n}){return j.jsx("div",{role:"group","data-slot":"button-group","data-orientation":t,className:pn(kye({orientation:t}),e),...n})}function jye({className:e,...t}){return j.jsx("label",{"data-slot":"label",className:pn("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 Pye({className:e,...t}){return j.jsx("fieldset",{"data-slot":"field-set",className:pn("gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3 flex flex-col",e),...t})}const Nye=rl("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 vS({className:e,orientation:t="vertical",...n}){return j.jsx("div",{role:"group","data-slot":"field","data-orientation":t,className:pn(Nye({orientation:t}),e),...n})}function bS({className:e,...t}){return j.jsx(jye,{"data-slot":"field-label",className:pn("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 j3=(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 Dye={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},v6={valid(e){return e===null?null:e?{[j3.valid]:""}:{[j3.invalid]:""}}},$ye=k.createContext({invalid:void 0,name:void 0,validityData:{state:Dye,errors:[],error:"",value:"",initialValue:null},setValidityData:Po,disabled:void 0,touched:!1,setTouched:Po,dirty:!1,setDirty:Po,filled:!1,setFilled:Po,focused:!1,setFocused:Po,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=No)=>e,getInputValidationProps:(e=No)=>e,inputRef:{current:null},commit:async()=>{}}});function bh(e=!0){const t=k.useContext($ye);if(t.setValidityData===Po&&!e)throw new Error(is(28));return t}const Iye=k.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Po,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function b6(){return k.useContext(Iye)}const zye={...Th};let P3=0;function Lye(e,t="mui"){const[n,r]=k.useState(e),o=e||n;return k.useEffect(()=>{n==null&&(P3+=1,r(`${t}-${P3}`))},[n,t]),o}const N3=zye.useId;function YE(e,t){if(N3!==void 0){const n=N3();return e??(t?`${t}-${n}`:n)}return Lye(e,t)}function XE(e){return YE(e,"base-ui")}const Fye=k.createContext({controlId:void 0,setControlId:Po,labelId:void 0,setLabelId:Po,messageIds:[],setMessageIds:Po,getDescriptionProps:e=>e});function A0(){return k.useContext(Fye)}const Uye=[];function S6(e){k.useEffect(e,Uye)}const Cd=0;class Xu{static create(){return new Xu}currentId=Cd;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Cd,n()},t)}isStarted(){return this.currentId!==Cd}clear=()=>{this.currentId!==Cd&&(clearTimeout(this.currentId),this.currentId=Cd)};disposeEffect=()=>this.clear}function Do(){const e=Yi(Xu.create).current;return S6(e.disposeEffect),e}function Vye(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const wf=typeof navigator<"u",SS=Kye(),w6=Zye(),x6=Gye(),_6=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),qye=SS.platform==="MacIntel"&&SS.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(SS.platform),Bye=wf&&/apple/i.test(navigator.vendor),ux=wf&&/android/i.test(w6)||/android/i.test(x6);wf&&w6.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const Hye=x6.includes("jsdom/");function Kye(){if(!wf)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 Gye(){if(!wf)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function Zye(){if(!wf)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const fx="data-base-ui-focusable",E6="active",C6="selected",Wye="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",za="ArrowLeft",La="ArrowRight",QE="ArrowUp",ep="ArrowDown";function Ps(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Hn(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&gw(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function xi(e){return"composedPath"in e?e.composedPath()[0]:e.target}function bi(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function Yye(e){return e.matches("html,body")}function uo(e){return e?.ownerDocument||document}function T6(e){return rr(e)&&e.matches(Wye)}function dx(e){return e?e.getAttribute("role")==="combobox"&&T6(e):!1}function Oy(e){return e?e.hasAttribute(fx)?e:e.querySelector(`[${fx}]`)||e:null}function ku(e,t,n=!0){return e.filter(o=>o.parentId===t&&(!n||o.context?.open)).flatMap(o=>[o,...ku(e,o.id,n)])}function D3(e,t){let n=[],r=e.find(o=>o.id===t)?.parentId;for(;r;){const o=e.find(s=>s.id===r);r=o?.parentId,o&&(n=n.concat(o))}return n}function Qr(e){e.preventDefault(),e.stopPropagation()}function Xye(e){return"nativeEvent"in e}function R6(e){return e.mozInputSource===0&&e.isTrusted?!0:ux&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function O6(e){return Hye?!1:!ux&&e.width===0&&e.height===0||ux&&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 $3(e,t){return["mouse","pen"].includes(e)}function A6(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const Qye=["top","right","bottom","left"],Qu=Math.min,jo=Math.max,Ay=Math.round,_u=Math.floor,Wi=e=>({x:e,y:e}),Jye={left:"right",right:"left",bottom:"top",top:"bottom"},e0e={start:"end",end:"start"};function hx(e,t,n){return jo(e,Qu(t,n))}function Us(e,t){return typeof e=="function"?e(t):e}function zo(e){return e.split("-")[0]}function il(e){return e.split("-")[1]}function JE(e){return e==="x"?"y":"x"}function e2(e){return e==="y"?"height":"width"}const t0e=new Set(["top","bottom"]);function ri(e){return t0e.has(zo(e))?"y":"x"}function t2(e){return JE(ri(e))}function n0e(e,t,n){n===void 0&&(n=!1);const r=il(e),o=t2(e),s=e2(o);let l=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(l=ky(l)),[l,ky(l)]}function r0e(e){const t=ky(e);return[px(e),t,px(t)]}function px(e){return e.replace(/start|end/g,t=>e0e[t])}const I3=["left","right"],z3=["right","left"],o0e=["top","bottom"],i0e=["bottom","top"];function s0e(e,t,n){switch(e){case"top":case"bottom":return n?t?z3:I3:t?I3:z3;case"left":case"right":return t?o0e:i0e;default:return[]}}function a0e(e,t,n,r){const o=il(e);let s=s0e(zo(e),n==="start",r);return o&&(s=s.map(l=>l+"-"+o),t&&(s=s.concat(s.map(px)))),s}function ky(e){return e.replace(/left|right|bottom|top/g,t=>Jye[t])}function l0e(e){return{top:0,right:0,bottom:0,left:0,...e}}function k6(e){return typeof e!="number"?l0e(e):{top:e,right:e,bottom:e,left:e}}function My(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function bg(e,t,n){return Math.floor(e/t)!==n}function Mu(e,t){return t<0||t>=e.current.length}function Zg(e,t){return qr(e,{disabledIndices:t})}function mx(e,t){return qr(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function qr(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:o=1}={}){let s=t;do s+=n?-o:o;while(s>=0&&s<=e.current.length-1&&Fa(e,s,r));return s}function M6(e,{event:t,orientation:n,loopFocus:r,rtl:o,cols:s,disabledIndices:l,minIndex:c,maxIndex:u,prevIndex:d,stopEvent:h=!1}){let p=d;const g=[],b={};let y=!1;{let T=null,v=-1;e.current.forEach((E,S)=>{if(E==null)return;const C=E.closest('[role="row"]');C&&(y=!0),(C!==T||v===-1)&&(T=C,v+=1,g[v]=[]),g[v].push(S),b[S]=v})}const _=y&&g.length>0&&g.some(T=>T.length!==s);function w(T){if(!_||d===-1)return;const v=b[d];if(v==null)return;const E=g[v].indexOf(d);let S=T==="up"?v-1:v+1;r&&(S<0?S=g.length-1:S>=g.length&&(S=0));const C=new Set;for(;S>=0&&S<g.length&&!C.has(S);){C.add(S);const x=g[S];if(x.length===0){S=T==="up"?S-1:S+1;continue}const O=Math.min(E,x.length-1);for(let M=O;M>=0;M-=1){const P=x[M];if(!Fa(e,P,l))return P}S=T==="up"?S-1:S+1,r&&(S<0?S=g.length-1:S>=g.length&&(S=0))}}if(t.key===QE){const T=w("up");if(T!==void 0)h&&Qr(t),p=T;else{if(h&&Qr(t),d===-1)p=u;else if(p=qr(e,{startingIndex:p,amount:s,decrement:!0,disabledIndices:l}),r&&(d-s<c||p<0)){const v=d%s,E=u%s,S=u-(E-v);E===v?p=u:p=E>v?S:S-s}Mu(e,p)&&(p=d)}}if(t.key===ep){const T=w("down");T!==void 0?(h&&Qr(t),p=T):(h&&Qr(t),d===-1?p=c:(p=qr(e,{startingIndex:d,amount:s,disabledIndices:l}),r&&d+s>u&&(p=qr(e,{startingIndex:d%s-s,amount:s,disabledIndices:l}))),Mu(e,p)&&(p=d))}if(n==="both"){const T=_u(d/s);t.key===(o?za:La)&&(h&&Qr(t),d%s!==s-1?(p=qr(e,{startingIndex:d,disabledIndices:l}),r&&bg(p,s,T)&&(p=qr(e,{startingIndex:d-d%s-1,disabledIndices:l}))):r&&(p=qr(e,{startingIndex:d-d%s-1,disabledIndices:l})),bg(p,s,T)&&(p=d)),t.key===(o?La:za)&&(h&&Qr(t),d%s!==0?(p=qr(e,{startingIndex:d,decrement:!0,disabledIndices:l}),r&&bg(p,s,T)&&(p=qr(e,{startingIndex:d+(s-d%s),decrement:!0,disabledIndices:l}))):r&&(p=qr(e,{startingIndex:d+(s-d%s),decrement:!0,disabledIndices:l})),bg(p,s,T)&&(p=d));const v=_u(u/s)===T;Mu(e,p)&&(r&&v?p=t.key===(o?La:za)?u:qr(e,{startingIndex:d-d%s-1,disabledIndices:l}):p=d)}return p}function j6(e,t,n){const r=[];let o=0;return e.forEach(({width:s,height:l},c)=>{let u=!1;for(n&&(o=0);!u;){const d=[];for(let h=0;h<s;h+=1)for(let p=0;p<l;p+=1)d.push(o+h+p*t);o%t+s<=t&&d.every(h=>r[h]==null)?(d.forEach(h=>{r[h]=c}),u=!0):o+=1}}),[...r]}function P6(e,t,n,r,o){if(e===-1)return-1;const s=n.indexOf(e),l=t[e];switch(o){case"tl":return s;case"tr":return l?s+l.width-1:s;case"bl":return l?s+(l.height-1)*r:s;case"br":return n.lastIndexOf(e);default:return-1}}function N6(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Fa(e,t,n){if(typeof n=="function")return n(t);if(n)return n.includes(t);const r=e.current[t];return r?r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true":!1}var c0e=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],jy=c0e.join(","),D6=typeof Element>"u",Ju=D6?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Py=!D6&&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},Sh=function(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),s=o===""||o==="true",l=s||n&&t&&Sh(t.parentNode);return l},u0e=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},$6=function(t,n,r){if(Sh(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(jy));return n&&Ju.call(t,jy)&&o.unshift(t),o=o.filter(r),o},Ny=function(t,n,r){for(var o=[],s=Array.from(t);s.length;){var l=s.shift();if(!Sh(l,!1))if(l.tagName==="SLOT"){var c=l.assignedElements(),u=c.length?c:l.children,d=Ny(u,!0,r);r.flatten?o.push.apply(o,d):o.push({scopeParent:l,candidates:d})}else{var h=Ju.call(l,jy);h&&r.filter(l)&&(n||!t.includes(l))&&o.push(l);var p=l.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(l),g=!Sh(p,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(l));if(p&&g){var b=Ny(p===!0?l.children:p.children,!0,r);r.flatten?o.push.apply(o,b):o.push({scopeParent:l,candidates:b})}else s.unshift.apply(s,l.children)}}return o},I6=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},z6=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||u0e(t))&&!I6(t)?0:t.tabIndex},f0e=function(t,n){var r=z6(t);return r<0&&n&&!I6(t)?0:r},d0e=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},L6=function(t){return t.tagName==="INPUT"},h0e=function(t){return L6(t)&&t.type==="hidden"},p0e=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},m0e=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},g0e=function(t){if(!t.name)return!0;var n=t.form||Py(t),r=function(c){return n.querySelectorAll('input[type="radio"][name="'+c+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(l){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",l.message),!1}var s=m0e(o,t.form);return!s||s===t},y0e=function(t){return L6(t)&&t.type==="radio"},v0e=function(t){return y0e(t)&&!g0e(t)},b0e=function(t){var n,r=t&&Py(t),o=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==t){var l,c,u;for(s=!!((l=o)!==null&&l!==void 0&&(c=l.ownerDocument)!==null&&c!==void 0&&c.contains(o)||t!=null&&(u=t.ownerDocument)!==null&&u!==void 0&&u.contains(t));!s&&o;){var d,h,p;r=Py(o),o=(d=r)===null||d===void 0?void 0:d.host,s=!!((h=o)!==null&&h!==void 0&&(p=h.ownerDocument)!==null&&p!==void 0&&p.contains(o))}}return s},L3=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},S0e=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var s=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}if(getComputedStyle(t).visibility==="hidden")return!0;var l=Ju.call(t,"details>summary:first-of-type"),c=l?t.parentElement:t;if(Ju.call(c,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof o=="function"){for(var u=t;t;){var d=t.parentElement,h=Py(t);if(d&&!d.shadowRoot&&o(d)===!0)return L3(t);t.assignedSlot?t=t.assignedSlot:!d&&h!==t.ownerDocument?t=h.host:t=d}t=u}if(b0e(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return L3(t);return!1},w0e=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return Ju.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},gx=function(t,n){return!(n.disabled||Sh(n)||h0e(n)||S0e(n,t)||p0e(n)||w0e(n))},yx=function(t,n){return!(v0e(n)||z6(n)<0||!gx(t,n))},x0e=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},F6=function(t){var n=[],r=[];return t.forEach(function(o,s){var l=!!o.scopeParent,c=l?o.scopeParent:o,u=f0e(c,l),d=l?F6(o.candidates):c;u===0?l?n.push.apply(n,d):n.push(c):r.push({documentOrder:s,tabIndex:u,item:o,isScope:l,content:d})}),r.sort(d0e).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},k0=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Ny([t],n.includeContainer,{filter:yx.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:x0e}):r=$6(t,n.includeContainer,yx.bind(null,n)),F6(r)},_0e=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Ny([t],n.includeContainer,{filter:gx.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=$6(t,n.includeContainer,gx.bind(null,n)),r},U6=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Ju.call(t,jy)===!1?!1:yx(n,t)};const tp=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function V6(e,t){const n=k0(e,tp()),r=n.length;if(r===0)return;const o=Ps(uo(e)),s=n.indexOf(o),l=s===-1?t===1?0:r-1:s+t;return n[l]}function q6(e){return V6(uo(e).body,1)||e}function B6(e){return V6(uo(e).body,-1)||e}function Zd(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Hn(n,r)}function E0e(e){k0(e,tp()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function F3(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function Dy({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=k.useRef(e!==void 0),[s,l]=k.useState(t),c=o?e:s,u=k.useCallback(d=>{o||l(d)},[]);return[c,u]}function H6(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:o,setControlId:s}=A0(),l=XE(t);return rt(()=>{if(!(!n&&!t||s===Po)){if(n){const c=r?.current;Gn(c)&&c.closest("label")!=null?s(t??null):s(o??l)}else t&&s(t);return()=>{t&&s(void 0)}}},[t,r,o,s,n,l]),o??l}function K6(e){const{enabled:t=!0,value:n,id:r,name:o,controlRef:s,commit:l}=e,{formRef:c}=b6(),{invalid:u,markedDirtyRef:d,validityData:h,setValidityData:p}=bh(),g=lt(e.getValue);rt(()=>{if(!t)return;let b=n;b===void 0&&(b=g()),h.initialValue===null&&b!==null&&p(y=>({...y,initialValue:b}))},[t,p,n,h.initialValue,g]),rt(()=>{!t||!r||c.current.fields.set(r,{getValue:g,name:o,controlRef:s,validityData:Vye(h,u),validate(){let b=n;b===void 0&&(b=g()),d.current=!0,Fs.flushSync(()=>l(b))}})},[l,s,t,c,g,r,u,d,o,h,n]),rt(()=>{const b=c.current.fields;return()=>{r&&b.delete(r)}},[c,r])}const ef="none",Wd="trigger-press",C0e="trigger-hover",G6="outside-press",wS="item-press",M0="focus-out",T0e="escape-key",xS="list-navigation",R0e="cancel-open",O0e="window-resize";function kn(e,t,n,r){let o=!1,s=!1;const l=r??No;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){s=!0},get isCanceled(){return o},get isPropagationAllowed(){return s},trigger:n,...l}}const A0e=k.forwardRef(function(t,n){const{render:r,className:o,id:s,name:l,value:c,disabled:u=!1,onValueChange:d,defaultValue:h,...p}=t,{state:g,name:b,disabled:y}=bh(),_=y||u,w=b??l,T=k.useMemo(()=>({...g,disabled:_}),[g,_]),{setTouched:v,setDirty:E,validityData:S,setFocused:C,setFilled:x,validationMode:O,validation:M}=bh(),{labelId:P}=A0(),z=H6({id:s});rt(()=>{const Z=c!=null;M.inputRef.current?.value||Z&&c!==""?x(!0):Z&&c===""&&x(!1)},[M.inputRef,x,c]);const[I,q]=Dy({controlled:c,default:h,name:"FieldControl",state:"value"}),G=c!==void 0,ee=lt((Z,H)=>{d?.(Z,H),!H.isCanceled&&q(Z)});return K6({id:z,name:w,commit:M.commit,value:I,getValue:()=>M.inputRef.current?.value,controlRef:M.inputRef}),Nr("input",t,{ref:n,state:T,props:[{id:z,disabled:_,name:w,ref:M.inputRef,"aria-labelledby":P,...G?{value:I}:{defaultValue:h},onChange(Z){const H=Z.currentTarget.value;ee(H,kn(ef,Z.nativeEvent)),E(H!==S.initialValue),x(H!=="")},onFocus(){C(!0)},onBlur(Z){v(!0),C(!1),O==="onBlur"&&M.commit(Z.currentTarget.value)},onKeyDown(Z){Z.currentTarget.tagName==="INPUT"&&Z.key==="Enter"&&(v(!0),M.commit(Z.currentTarget.value))}},M.getInputValidationProps(),p],stateAttributesMapping:v6})}),k0e=k.forwardRef(function(t,n){return j.jsx(A0e,{ref:n,...t})});function M0e({className:e,type:t,...n}){return j.jsx(k0e,{type:t,"data-slot":"input",className:pn("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),...n})}const n2={clip:"rect(0 0 0 0)",overflow:"hidden",whiteSpace:"nowrap",position:"fixed",top:0,left:0,border:0,padding:0,width:1,height:1,margin:-1};function j0e(e){const t=k.useRef(!0);t.current&&(t.current=!1,e())}function Kr(e){const t=Yi(P0e,e).current;return t.next=e,rt(t.effect),t}function P0e(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var $y=Symbol("NOT_FOUND");function N0e(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function D0e(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function $0e(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var U3=e=>Array.isArray(e)?e:[e];function I0e(e){const t=Array.isArray(e[0])?e[0]:e;return $0e(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function z0e(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}function L0e(e){let t;return{get(n){return t&&e(t.key,n)?t.value:$y},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function F0e(e,t){let n=[];function r(c){const u=n.findIndex(d=>t(c,d.key));if(u>-1){const d=n[u];return u>0&&(n.splice(u,1),n.unshift(d)),d.value}return $y}function o(c,u){r(c)===$y&&(n.unshift({key:c,value:u}),n.length>e&&n.pop())}function s(){return n}function l(){n=[]}return{get:r,put:o,getEntries:s,clear:l}}var U0e=(e,t)=>e===t;function V0e(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:o}=n;for(let s=0;s<o;s++)if(!e(n[s],r[s]))return!1;return!0}}function q0e(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=U0e,maxSize:o=1,resultEqualityCheck:s}=n,l=V0e(r);let c=0;const u=o<=1?L0e(l):F0e(o,l);function d(){let h=u.get(arguments);if(h===$y){if(h=e.apply(null,arguments),c++,s){const g=u.getEntries().find(b=>s(b.value,h));g&&(h=g.value,c!==0&&c--)}u.put(arguments,h)}return h}return d.clearCache=()=>{u.clear(),d.resetResultsCount()},d.resultsCount=()=>c,d.resetResultsCount=()=>{c=0},d}var B0e=class{constructor(e){this.value=e}deref(){return this.value}},H0e=typeof WeakRef<"u"?WeakRef:B0e,K0e=0,V3=1;function Sg(){return{s:K0e,v:void 0,o:null,p:null}}function Z6(e,t={}){let n=Sg();const{resultEqualityCheck:r}=t;let o,s=0;function l(){let c=n;const{length:u}=arguments;for(let p=0,g=u;p<g;p++){const b=arguments[p];if(typeof b=="function"||typeof b=="object"&&b!==null){let y=c.o;y===null&&(c.o=y=new WeakMap);const _=y.get(b);_===void 0?(c=Sg(),y.set(b,c)):c=_}else{let y=c.p;y===null&&(c.p=y=new Map);const _=y.get(b);_===void 0?(c=Sg(),y.set(b,c)):c=_}}const d=c;let h;if(c.s===V3)h=c.v;else if(h=e.apply(null,arguments),s++,r){const p=o?.deref?.()??o;p!=null&&r(p,h)&&(h=p,s!==0&&s--),o=typeof h=="object"&&h!==null||typeof h=="function"?new H0e(h):h}return d.s=V3,d.v=h,h}return l.clearCache=()=>{n=Sg(),l.resetResultsCount()},l.resultsCount=()=>s,l.resetResultsCount=()=>{s=0},l}function W6(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let s=0,l=0,c,u={},d=o.pop();typeof d=="object"&&(u=d,d=o.pop()),N0e(d,`createSelector expects an output function after the inputs, but received: [${typeof d}]`);const h={...n,...u},{memoize:p,memoizeOptions:g=[],argsMemoize:b=Z6,argsMemoizeOptions:y=[]}=h,_=U3(g),w=U3(y),T=I0e(o),v=p(function(){return s++,d.apply(null,arguments)},..._),E=b(function(){l++;const C=z0e(T,arguments);return c=v.apply(null,C),c},...w);return Object.assign(E,{resultFunc:d,memoizedResultFunc:v,dependencies:T,dependencyRecomputations:()=>l,resetDependencyRecomputations:()=>{l=0},lastResult:()=>c,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:p,argsMemoize:b})};return Object.assign(r,{withTypes:()=>r}),r}var G0e=W6(Z6),Z0e=Object.assign((e,t=G0e)=>{D0e(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(s=>e[s]);return t(r,(...s)=>s.reduce((l,c,u)=>(l[n[u]]=c,l),{}))},{withTypes:()=>Z0e});W6({memoize:q0e,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const tn=(e,t,n,r,o,s,...l)=>{if(l.length>0)throw new Error(is(1));let c;if(e)c=e;else throw new Error("Missing arguments");return c};var _S={exports:{}},ES={};var q3;function W0e(){if(q3)return ES;q3=1;var e=rf();function t(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,l=e.useDebugValue;function c(p,g){var b=g(),y=r({inst:{value:b,getSnapshot:g}}),_=y[0].inst,w=y[1];return s(function(){_.value=b,_.getSnapshot=g,u(_)&&w({inst:_})},[p,b,g]),o(function(){return u(_)&&w({inst:_}),p(function(){u(_)&&w({inst:_})})},[p]),l(b),b}function u(p){var g=p.getSnapshot;p=p.value;try{var b=g();return!n(p,b)}catch{return!0}}function d(p,g){return g()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:c;return ES.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,ES}var B3;function Y6(){return B3||(B3=1,_S.exports=W0e()),_S.exports}var Y0e=Y6(),CS={exports:{}},TS={};var H3;function X0e(){if(H3)return TS;H3=1;var e=rf(),t=Y6();function n(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,l=e.useEffect,c=e.useMemo,u=e.useDebugValue;return TS.useSyncExternalStoreWithSelector=function(d,h,p,g,b){var y=s(null);if(y.current===null){var _={hasValue:!1,value:null};y.current=_}else _=y.current;y=c(function(){function T(x){if(!v){if(v=!0,E=x,x=g(x),b!==void 0&&_.hasValue){var O=_.value;if(b(O,x))return S=O}return S=x}if(O=S,r(E,x))return O;var M=g(x);return b!==void 0&&b(O,M)?(E=x,O):(E=x,S=M)}var v=!1,E,S,C=p===void 0?null:p;return[function(){return T(h())},C===null?void 0:function(){return T(C())}]},[h,p,g,b]);var w=o(d,y[0],y[1]);return l(function(){_.hasValue=!0,_.value=w},[w]),u(w),w},TS}var K3;function Q0e(){return K3||(K3=1,CS.exports=X0e()),CS.exports}var J0e=Q0e();const eve=z_(19),tve=eve?nve:rve;function wt(e,t,n,r,o){return tve(e,t,n,r,o)}function nve(e,t,n,r,o){const s=k.useCallback(()=>t(e.getSnapshot(),n,r,o),[e,t,n,r,o]);return Y0e.useSyncExternalStore(e.subscribe,s,s)}function rve(e,t,n,r,o){return J0e.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,s=>t(s,n,r,o))}class ju{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 n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){ju.prototype.setState.call(this,{...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||ju.prototype.setState.call(this,{...this.state,[t]:n})}notifyAll(){const t={...this.state};ju.prototype.setState.call(this,t)}}class ove extends ju{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}controlledValues=new Map;useSyncedValue(t,n){k.useDebugValue(t),rt(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){rt(()=>(this.state[t]!==n&&this.set(t,n),()=>{this.set(t,void 0)}),[t,n])}useSyncedValues(t){const n=Object.values(t);rt(()=>{this.update(t)},n)}useControlledProp(t,n,r){k.useDebugValue(t);const o=n!==void 0;this.controlledValues.has(t)||(this.controlledValues.set(t,o),!o&&!Object.is(this.state[t],r)&&super.setState({...this.state,[t]:r})),rt(()=>{o&&!Object.is(this.state[t],n)&&super.setState({...this.state,[t]:n})},[t,n,r,o])}set(t,n){this.controlledValues.get(t)!==!0&&super.set(t,n)}update(t){const n={...t};for(const r in n)if(Object.hasOwn(n,r)&&this.controlledValues.get(r)===!0){delete n[r];continue}super.update(n)}setState(t){const n={...t};for(const r in n)if(Object.hasOwn(n,r)&&this.controlledValues.get(r)===!0){delete n[r];continue}super.setState({...this.state,...n})}select=(t,n,r,o)=>{const s=this.selectors[t];return s(this.state,n,r,o)};useState=(t,n,r,o)=>{k.useDebugValue(t);const s=this.selectors[t];return wt(this,s,n,r,o)};useContextCallback(t,n){k.useDebugValue(t);const r=lt(n??Po);this.context[t]=r}useStateSetter(t){const n=k.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(t,r)}),n.current}observe(t,n){let r;typeof t=="function"?r=t:r=this.selectors[t];let o=r(this.state);return n(o,o,this),this.subscribe(s=>{const l=r(s);if(!Object.is(o,l)){const c=o;o=l,n(l,c,this)}})}}const wg=null;class ive{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let o=0;o<n.length;o+=1)n[o]?.(t)};request(t){const n=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const xg=new ive;class Ui{static create(){return new Ui}static request(t){return xg.request(t)}static cancel(t){return xg.cancel(t)}currentId=wg;request(t){this.cancel(),this.currentId=xg.request(()=>{this.currentId=wg,t()})}cancel=()=>{this.currentId!==wg&&(xg.cancel(this.currentId),this.currentId=wg)};disposeEffect=()=>this.cancel}function j0(){const e=Yi(Ui.create).current;return S6(e.disposeEffect),e}function sve(){const e=new Map;return{emit(t,n){e.get(t)?.forEach(r=>r(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}const ave=k.createContext(null),lve=k.createContext(null),X6=()=>k.useContext(ave)?.id||null,P0=e=>{const t=k.useContext(lve);return e??t};function Iy(e){return`data-base-ui-${e}`}function es(e){return e?.ownerDocument||document}const zy=k.forwardRef(function(t,n){const[r,o]=k.useState();rt(()=>{Bye&&o("button")},[]);const s={tabIndex:0,role:r};return j.jsx("span",{...t,ref:n,style:n2,"aria-hidden":r?void 0:!0,...s,"data-base-ui-focus-guard":""})});let G3=0;function Wg(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(G3);const s=()=>e?.focus({preventScroll:n});o?s():G3=requestAnimationFrame(s)}const Pu={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function Z3(e){return e==="inert"?Pu.inert:e==="aria-hidden"?Pu["aria-hidden"]:Pu.none}let _g=new WeakSet,Eg={},RS=0;const Q6=e=>e&&(e.host||Q6(e.parentNode)),cve=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Q6(n);return e.contains(r)?r:null}).filter(n=>n!=null);function uve(e,t,n,r){const o="data-base-ui-inert",s=r?"inert":n?"aria-hidden":null,l=cve(t,e),c=new Set,u=new Set(l),d=[];Eg[o]||(Eg[o]=new WeakMap);const h=Eg[o];l.forEach(p),g(t),c.clear();function p(b){!b||c.has(b)||(c.add(b),b.parentNode&&p(b.parentNode))}function g(b){!b||u.has(b)||[].forEach.call(b.children,y=>{if(nl(y)!=="script")if(c.has(y))g(y);else{const _=s?y.getAttribute(s):null,w=_!==null&&_!=="false",T=Z3(s),v=(T.get(y)||0)+1,E=(h.get(y)||0)+1;T.set(y,v),h.set(y,E),d.push(y),v===1&&w&&_g.add(y),E===1&&y.setAttribute(o,""),!w&&s&&y.setAttribute(s,s==="inert"?"":"true")}})}return RS+=1,()=>{d.forEach(b=>{const y=Z3(s),w=(y.get(b)||0)-1,T=(h.get(b)||0)-1;y.set(b,w),h.set(b,T),w||(!_g.has(b)&&s&&b.removeAttribute(s),_g.delete(b)),T||b.removeAttribute(o)}),RS-=1,RS||(Pu.inert=new WeakMap,Pu["aria-hidden"]=new WeakMap,Pu.none=new WeakMap,_g=new WeakSet,Eg={})}}function fve(e,t=!1,n=!1){const r=uo(e[0]).body;return uve(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const J6=k.createContext(null),ez=()=>k.useContext(J6),dve=Iy("portal");function hve(e={}){const{ref:t,container:n,componentProps:r=No,elementProps:o,elementState:s}=e,l=YE(),u=ez()?.portalNode,[d,h]=k.useState(null),[p,g]=k.useState(null),b=k.useRef(null);rt(()=>{if(n===null){b.current&&(b.current=null,g(null),h(null));return}if(l==null)return;const w=(n&&($_(n)?n:n.current))??u??document.body;if(w==null){b.current&&(b.current=null,g(null),h(null));return}b.current!==w&&(b.current=w,g(null),h(w))},[n,u,l]);const y=Nr("div",r,{ref:[t,g],state:s,props:[{id:l,[dve]:""},o]});return{portalNode:p,portalSubtree:d&&y?Fs.createPortal(y,d):null}}const pve=k.forwardRef(function(t,n){const{children:r,container:o,className:s,render:l,renderGuards:c,...u}=t,{portalNode:d,portalSubtree:h}=hve({container:o,ref:n,componentProps:t,elementProps:u}),p=k.useRef(null),g=k.useRef(null),b=k.useRef(null),y=k.useRef(null),[_,w]=k.useState(null),T=_?.modal,v=_?.open,E=typeof c=="boolean"?c:!!_&&!_.modal&&_.open&&!!d;k.useEffect(()=>{if(!d||T)return;function C(x){d&&Zd(x)&&(x.type==="focusin"?F3:E0e)(d)}return d.addEventListener("focusin",C,!0),d.addEventListener("focusout",C,!0),()=>{d.removeEventListener("focusin",C,!0),d.removeEventListener("focusout",C,!0)}},[d,T]),k.useEffect(()=>{!d||v||F3(d)},[v,d]);const S=k.useMemo(()=>({beforeOutsideRef:p,afterOutsideRef:g,beforeInsideRef:b,afterInsideRef:y,portalNode:d,setFocusManagerState:w}),[d]);return j.jsxs(k.Fragment,{children:[h,j.jsxs(J6.Provider,{value:S,children:[E&&d&&j.jsx(zy,{"data-type":"outside",ref:p,onFocus:C=>{if(Zd(C,d))b.current?.focus();else{const x=_?_.domReference:null;B6(x)?.focus()}}}),E&&d&&j.jsx("span",{"aria-owns":d.id,style:gne}),d&&Fs.createPortal(r,d),E&&d&&j.jsx(zy,{"data-type":"outside",ref:g,onFocus:C=>{if(Zd(C,d))y.current?.focus();else{const x=_?_.domReference:null;q6(x)?.focus(),_?.closeOnFocusOut&&_?.onOpenChange(!1,kn(M0,C.nativeEvent))}}})]})]})});function Ll(e){return e==null?e:"current"in e?e.current:e}function mve(e,t){const n=Rr(e.target);return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const W3=20;let ka=[];function r2(){ka=ka.filter(e=>e.isConnected)}function gve(e){r2(),e&&nl(e)!=="body"&&(ka.push(e),ka.length>W3&&(ka=ka.slice(-W3)))}function OS(){return r2(),ka[ka.length-1]}function yve(e){if(!e)return null;const t=tp();return U6(e,t)?e:k0(e,t)[0]||e}function vve(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():Lo(e).display!=="none"}function Y3(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const n=tp(),o=_0e(e,n).filter(l=>{const c=l.getAttribute("data-tabindex")||"";return U6(l,n)||l.hasAttribute("data-tabindex")&&!c.startsWith("-")}),s=e.getAttribute("tabindex");t.current.includes("floating")||o.length===0?s!=="0"&&e.setAttribute("tabindex","0"):(s!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function bve(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],initialFocus:s=!0,returnFocus:l=!0,restoreFocus:c=!1,modal:u=!0,closeOnFocusOut:d=!0,openInteractionType:h="",getInsideElements:p=()=>[],nextFocusableElement:g,previousFocusableElement:b,beforeContentFocusGuardRef:y,externalTree:_}=e,w="rootStore"in t?t.rootStore:t,T=w.useState("open"),v=w.useState("domReferenceElement"),E=w.useState("floatingElement"),{events:S,dataRef:C}=w.context,x=lt(()=>C.current.floatingContext?.nodeId),O=lt(p),M=s===!1,P=dx(v)&&M,z=Kr(o),I=Kr(s),q=Kr(l),G=Kr(h),ee=P0(_),J=ez(),Z=k.useRef(null),H=k.useRef(null),Y=k.useRef(!1),oe=k.useRef(!1),ne=k.useRef(!1),$=k.useRef(-1),V=k.useRef(""),U=k.useRef(""),D=Do(),B=Do(),te=j0(),re=J!=null,le=Oy(E),ge=lt((we=le)=>we?k0(we,tp()):[]),Me=lt(we=>{const $e=ge(we);return z.current.map(()=>$e).filter(Boolean).flat()});k.useEffect(()=>{if(r||!u)return;function we(Ze){Ze.key==="Tab"&&Hn(le,Ps(uo(le)))&&ge().length===0&&!P&&Qr(Ze)}const $e=uo(le);return $e.addEventListener("keydown",we),()=>{$e.removeEventListener("keydown",we)}},[r,v,le,u,z,P,ge,Me]),k.useEffect(()=>{if(r||!E)return;function we($e){const Ze=xi($e),Fe=ge().indexOf(Ze);Fe!==-1&&($.current=Fe)}return E.addEventListener("focusin",we),()=>{E.removeEventListener("focusin",we)}},[r,E,ge]),k.useEffect(()=>{if(r||!T)return;const we=uo(le);function $e(){ne.current=!1}function Ze(Fe){const Re=xi(Fe),We=Hn(E,Re)||Hn(v,Re)||Hn(J?.portalNode,Re);ne.current=!We,U.current=Fe.pointerType||"keyboard"}function ye(){U.current="keyboard"}return we.addEventListener("pointerdown",Ze,!0),we.addEventListener("pointerup",$e,!0),we.addEventListener("pointercancel",$e,!0),we.addEventListener("keydown",ye,!0),()=>{we.removeEventListener("pointerdown",Ze,!0),we.removeEventListener("pointerup",$e,!0),we.removeEventListener("pointercancel",$e,!0),we.removeEventListener("keydown",ye,!0)}},[r,E,v,le,T,J]),k.useEffect(()=>{if(r||!d)return;function we(){oe.current=!0,B.start(0,()=>{oe.current=!1})}function $e(Re){const We=Re.relatedTarget,ze=Re.currentTarget,Le=xi(Re);queueMicrotask(()=>{const Ue=x(),dt=w.context.triggerElements,Ce=!(Hn(v,We)||Hn(E,We)||Hn(We,E)||Hn(J?.portalNode,We)||We!=null&&dt.hasElement(We)||dt.hasMatchingElement(pe=>Hn(pe,We))||We?.hasAttribute(Iy("focus-guard"))||ee&&(ku(ee.nodesRef.current,Ue).find(pe=>Hn(pe.context?.elements.floating,We)||Hn(pe.context?.elements.domReference,We))||D3(ee.nodesRef.current,Ue).find(pe=>[pe.context?.elements.floating,Oy(pe.context?.elements.floating)].includes(We)||pe.context?.elements.domReference===We)));if(ze===v&&le&&Y3(le,z),c&&ze!==v&&!vve(Le)&&Ps(uo(le))===uo(le).body){if(rr(le)&&(le.focus(),c==="popup")){te.request(()=>{le.focus()});return}const pe=$.current,Ne=ge(),Be=Ne[pe]||Ne[Ne.length-1]||le;rr(Be)&&Be.focus()}if(C.current.insideReactTree){C.current.insideReactTree=!1;return}(P||!u)&&We&&Ce&&!oe.current&&(P||We!==OS())&&(Y.current=!0,w.setOpen(!1,kn(M0,Re)))})}function Ze(){ne.current||(C.current.insideReactTree=!0,D.start(0,()=>{C.current.insideReactTree=!1}))}const ye=rr(v)?v:null,Fe=[];if(!(!E&&!ye))return ye&&(ye.addEventListener("focusout",$e),ye.addEventListener("pointerdown",we),Fe.push(()=>{ye.removeEventListener("focusout",$e),ye.removeEventListener("pointerdown",we)})),E&&(E.addEventListener("focusout",$e),J&&(E.addEventListener("focusout",Ze,!0),Fe.push(()=>{E.removeEventListener("focusout",Ze,!0)})),Fe.push(()=>{E.removeEventListener("focusout",$e)})),()=>{Fe.forEach(Re=>{Re()})}},[r,v,E,le,u,ee,J,w,d,c,ge,P,x,z,C,D,B,te]);const Q=k.useRef(null),ie=k.useRef(null),de=Ha(Q,y,J?.beforeInsideRef),_e=Ha(ie,J?.afterInsideRef);k.useEffect(()=>{if(r||!E||!T)return;const we=Array.from(J?.portalNode?.querySelectorAll(`[${Iy("portal")}]`)||[]),Ze=(ee?D3(ee.nodesRef.current,x()):[]).find(Re=>dx(Re.context?.elements.domReference||null))?.context?.elements.domReference,ye=[E,Ze,...we,...O(),Z.current,H.current,Q.current,ie.current,J?.beforeOutsideRef.current,J?.afterOutsideRef.current,Ll(b),Ll(g),P?v:null].filter(Re=>Re!=null),Fe=fve(ye,u||P);return()=>{Fe()}},[T,r,v,E,u,z,J,P,ee,x,O,g,b]),rt(()=>{if(!T||r||!rr(le))return;const we=uo(le),$e=Ps(we);queueMicrotask(()=>{const Ze=Me(le),ye=I.current,Fe=typeof ye=="function"?ye(G.current||""):ye;if(Fe===void 0||Fe===!1)return;let Re;Fe===!0||Fe===null?Re=Ze[0]||le:Re=Ll(Fe),Re=Re||Ze[0]||le,!Hn(le,$e)&&Wg(Re,{preventScroll:Re===le})})},[r,T,le,M,Me,I,G]),rt(()=>{if(r||!le)return;const we=uo(le),$e=Ps(we);gve($e);function Ze(Re){if(Re.open||(V.current=mve(Re.nativeEvent,U.current)),Re.reason===C0e&&Re.nativeEvent.type==="mouseleave"&&(Y.current=!0),Re.reason===G6)if(Re.nested)Y.current=!1;else if(R6(Re.nativeEvent)||O6(Re.nativeEvent))Y.current=!1;else{let We=!1;document.createElement("div").focus({get preventScroll(){return We=!0,!1}}),We?Y.current=!1:Y.current=!0}}S.on("openchange",Ze);const ye=we.createElement("span");ye.setAttribute("tabindex","-1"),ye.setAttribute("aria-hidden","true"),Object.assign(ye.style,n2),re&&v&&v.insertAdjacentElement("afterend",ye);function Fe(){const Re=q.current;let We=typeof Re=="function"?Re(V.current):Re;if(We===void 0||We===!1)return null;if(We===null&&(We=!0),typeof We=="boolean"){const Le=v||OS();return Le&&Le.isConnected?Le:ye}const ze=v||OS()||ye;return Ll(We)||ze}return()=>{S.off("openchange",Ze);const Re=Ps(we),We=Hn(E,Re)||ee&&ku(ee.nodesRef.current,x(),!1).some(Le=>Hn(Le.context?.elements.floating,Re)),ze=Fe();queueMicrotask(()=>{const Le=yve(ze),Ue=typeof q.current!="boolean";q.current&&!Y.current&&rr(Le)&&(!(!Ue&&Le!==Re&&Re!==we.body)||We)&&Le.focus({preventScroll:!0}),ye.remove()})}},[r,E,le,q,C,S,ee,re,v,x]),k.useEffect(()=>{queueMicrotask(()=>{Y.current=!1})},[r]),k.useEffect(()=>{if(r||!T)return;function we(Ze){xi(Ze)?.closest(`[${pne}]`)&&(oe.current=!0)}const $e=uo(le);return $e.addEventListener("pointerdown",we,!0),()=>{$e.removeEventListener("pointerdown",we,!0)}},[r,T,le]),rt(()=>{if(!r&&J)return J.setFocusManagerState({modal:u,closeOnFocusOut:d,open:T,onOpenChange:w.setOpen,domReference:v}),()=>{J.setFocusManagerState(null)}},[r,J,u,T,w,d,v]),rt(()=>{if(!(r||!le))return Y3(le,z),()=>{queueMicrotask(r2)}},[r,le,z]);const Te=!r&&(u?!P:!0)&&(re||u);return j.jsxs(k.Fragment,{children:[Te&&j.jsx(zy,{"data-type":"inside",ref:de,onFocus:we=>{if(u){const $e=Me();Wg($e[$e.length-1])}else J?.portalNode&&(Y.current=!1,Zd(we,J.portalNode)?q6(v)?.focus():Ll(b??J.beforeOutsideRef)?.focus())}}),n,Te&&j.jsx(zy,{"data-type":"inside",ref:_e,onFocus:we=>{u?Wg(Me()[0]):J?.portalNode&&(d&&(Y.current=!0),Zd(we,J.portalNode)?B6(v)?.focus():Ll(g??J.afterOutsideRef)?.focus())}})]})}function Sve(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,{enabled:o=!0,event:s="click",toggle:l=!0,ignoreMouse:c=!1,stickIfOpen:u=!0,touchOpenDelay:d=0}=t,h=k.useRef(void 0),p=j0(),g=Do(),b=k.useMemo(()=>({onPointerDown(y){h.current=y.pointerType},onMouseDown(y){const _=h.current,w=y.nativeEvent,T=n.select("open");if(y.button!==0||s==="click"||$3(_)&&c)return;const v=r.current.openEvent,E=v?.type,S=n.select("domReferenceElement")!==y.currentTarget,C=T&&S||!(T&&l&&(!(v&&u)||E==="click"||E==="mousedown"));if(T6(w.target)){const O=kn(Wd,w,w.target);C&&_==="touch"&&d>0?g.start(d,()=>{n.setOpen(!0,O)}):n.setOpen(C,O);return}const x=y.currentTarget;p.request(()=>{const O=kn(Wd,w,x);C&&_==="touch"&&d>0?g.start(d,()=>{n.setOpen(!0,O)}):n.setOpen(C,O)})},onClick(y){if(s==="mousedown-only")return;const _=h.current;if(s==="mousedown"&&_){h.current=void 0;return}if($3(_)&&c)return;const w=n.select("open"),T=r.current.openEvent,v=n.select("domReferenceElement")!==y.currentTarget,E=w&&v||!(w&&l&&(!(T&&u)||A6(T))),S=kn(Wd,y.nativeEvent,y.currentTarget);E&&_==="touch"&&d>0?g.start(d,()=>{n.setOpen(!0,S)}):n.setOpen(E,S)},onKeyDown(){h.current=void 0}}),[r,s,c,n,u,l,p,g,d]);return k.useMemo(()=>o?{reference:b}:No,[o,b])}function X3(e,t,n){let{reference:r,floating:o}=e;const s=ri(t),l=t2(t),c=e2(l),u=zo(t),d=s==="y",h=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,g=r[c]/2-o[c]/2;let b;switch(u){case"top":b={x:h,y:r.y-o.height};break;case"bottom":b={x:h,y:r.y+r.height};break;case"right":b={x:r.x+r.width,y:p};break;case"left":b={x:r.x-o.width,y:p};break;default:b={x:r.x,y:r.y}}switch(il(t)){case"start":b[l]-=g*(n&&d?-1:1);break;case"end":b[l]+=g*(n&&d?-1:1);break}return b}const wve=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:l}=n,c=s.filter(Boolean),u=await(l.isRTL==null?void 0:l.isRTL(t));let d=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:h,y:p}=X3(d,r,u),g=r,b={},y=0;for(let _=0;_<c.length;_++){const{name:w,fn:T}=c[_],{x:v,y:E,data:S,reset:C}=await T({x:h,y:p,initialPlacement:r,placement:g,strategy:o,middlewareData:b,rects:d,platform:l,elements:{reference:e,floating:t}});h=v??h,p=E??p,b={...b,[w]:{...b[w],...S}},C&&y<=50&&(y++,typeof C=="object"&&(C.placement&&(g=C.placement),C.rects&&(d=C.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:h,y:p}=X3(d,g,u)),_=-1)}return{x:h,y:p,placement:g,strategy:o,middlewareData:b}};async function wh(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:l,elements:c,strategy:u}=e,{boundary:d="clippingAncestors",rootBoundary:h="viewport",elementContext:p="floating",altBoundary:g=!1,padding:b=0}=Us(t,e),y=k6(b),w=c[g?p==="floating"?"reference":"floating":p],T=My(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:d,rootBoundary:h,strategy:u})),v=p==="floating"?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),S=await(s.isElement==null?void 0:s.isElement(E))?await(s.getScale==null?void 0:s.getScale(E))||{x:1,y:1}:{x:1,y:1},C=My(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:v,offsetParent:E,strategy:u}):v);return{top:(T.top-C.top+y.top)/S.y,bottom:(C.bottom-T.bottom+y.bottom)/S.y,left:(T.left-C.left+y.left)/S.x,right:(C.right-T.right+y.right)/S.x}}const xve=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:l,initialPlacement:c,platform:u,elements:d}=t,{mainAxis:h=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:_=!0,...w}=Us(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const T=zo(o),v=ri(c),E=zo(c)===c,S=await(u.isRTL==null?void 0:u.isRTL(d.floating)),C=g||(E||!_?[ky(c)]:r0e(c)),x=y!=="none";!g&&x&&C.push(...a0e(c,_,y,S));const O=[c,...C],M=await wh(t,w),P=[];let z=((r=s.flip)==null?void 0:r.overflows)||[];if(h&&P.push(M[T]),p){const ee=n0e(o,l,S);P.push(M[ee[0]],M[ee[1]])}if(z=[...z,{placement:o,overflows:P}],!P.every(ee=>ee<=0)){var I,q;const ee=(((I=s.flip)==null?void 0:I.index)||0)+1,J=O[ee];if(J&&(!(p==="alignment"?v!==ri(J):!1)||z.every(Y=>ri(Y.placement)===v?Y.overflows[0]>0:!0)))return{data:{index:ee,overflows:z},reset:{placement:J}};let Z=(q=z.filter(H=>H.overflows[0]<=0).sort((H,Y)=>H.overflows[1]-Y.overflows[1])[0])==null?void 0:q.placement;if(!Z)switch(b){case"bestFit":{var G;const H=(G=z.filter(Y=>{if(x){const oe=ri(Y.placement);return oe===v||oe==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter(oe=>oe>0).reduce((oe,ne)=>oe+ne,0)]).sort((Y,oe)=>Y[1]-oe[1])[0])==null?void 0:G[0];H&&(Z=H);break}case"initialPlacement":Z=c;break}if(o!==Z)return{reset:{placement:Z}}}return{}}}};function Q3(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function J3(e){return Qye.some(t=>e[t]>=0)}const _ve=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Us(e,t);switch(r){case"referenceHidden":{const s=await wh(t,{...o,elementContext:"reference"}),l=Q3(s,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:J3(l)}}}case"escaped":{const s=await wh(t,{...o,altBoundary:!0}),l=Q3(s,n.floating);return{data:{escapedOffsets:l,escaped:J3(l)}}}default:return{}}}}},tz=new Set(["left","top"]);async function Eve(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),l=zo(n),c=il(n),u=ri(n)==="y",d=tz.has(l)?-1:1,h=s&&u?-1:1,p=Us(t,e);let{mainAxis:g,crossAxis:b,alignmentAxis:y}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return c&&typeof y=="number"&&(b=c==="end"?y*-1:y),u?{x:b*h,y:g*d}:{x:g*d,y:b*h}}const Cve=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:l,middlewareData:c}=t,u=await Eve(t,e);return l===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:s+u.y,data:{...u,placement:l}}}}},Tve=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:c={fn:w=>{let{x:T,y:v}=w;return{x:T,y:v}}},...u}=Us(e,t),d={x:n,y:r},h=await wh(t,u),p=ri(zo(o)),g=JE(p);let b=d[g],y=d[p];if(s){const w=g==="y"?"top":"left",T=g==="y"?"bottom":"right",v=b+h[w],E=b-h[T];b=hx(v,b,E)}if(l){const w=p==="y"?"top":"left",T=p==="y"?"bottom":"right",v=y+h[w],E=y-h[T];y=hx(v,y,E)}const _=c.fn({...t,[g]:b,[p]:y});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[g]:s,[p]:l}}}}}},Rve=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:l}=t,{offset:c=0,mainAxis:u=!0,crossAxis:d=!0}=Us(e,t),h={x:n,y:r},p=ri(o),g=JE(p);let b=h[g],y=h[p];const _=Us(c,t),w=typeof _=="number"?{mainAxis:_,crossAxis:0}:{mainAxis:0,crossAxis:0,..._};if(u){const E=g==="y"?"height":"width",S=s.reference[g]-s.floating[E]+w.mainAxis,C=s.reference[g]+s.reference[E]-w.mainAxis;b<S?b=S:b>C&&(b=C)}if(d){var T,v;const E=g==="y"?"width":"height",S=tz.has(zo(o)),C=s.reference[p]-s.floating[E]+(S&&((T=l.offset)==null?void 0:T[p])||0)+(S?0:w.crossAxis),x=s.reference[p]+s.reference[E]+(S?0:((v=l.offset)==null?void 0:v[p])||0)-(S?w.crossAxis:0);y<C?y=C:y>x&&(y=x)}return{[g]:b,[p]:y}}}},Ove=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:l,elements:c}=t,{apply:u=()=>{},...d}=Us(e,t),h=await wh(t,d),p=zo(o),g=il(o),b=ri(o)==="y",{width:y,height:_}=s.floating;let w,T;p==="top"||p==="bottom"?(w=p,T=g===(await(l.isRTL==null?void 0:l.isRTL(c.floating))?"start":"end")?"left":"right"):(T=p,w=g==="end"?"top":"bottom");const v=_-h.top-h.bottom,E=y-h.left-h.right,S=Qu(_-h[w],v),C=Qu(y-h[T],E),x=!t.middlewareData.shift;let O=S,M=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=E),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(O=v),x&&!g){const z=jo(h.left,0),I=jo(h.right,0),q=jo(h.top,0),G=jo(h.bottom,0);b?M=y-2*(z!==0||I!==0?z+I:jo(h.left,h.right)):O=_-2*(q!==0||G!==0?q+G:jo(h.top,h.bottom))}await u({...t,availableWidth:M,availableHeight:O});const P=await l.getDimensions(c.floating);return y!==P.width||_!==P.height?{reset:{rects:!0}}:{}}}};function nz(e){const t=Lo(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=rr(e),s=o?e.offsetWidth:n,l=o?e.offsetHeight:r,c=Ay(n)!==s||Ay(r)!==l;return c&&(n=s,r=l),{width:n,height:r,$:c}}function o2(e){return Gn(e)?e:e.contextElement}function Nu(e){const t=o2(e);if(!rr(t))return Wi(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=nz(t);let l=(s?Ay(n.width):n.width)/r,c=(s?Ay(n.height):n.height)/o;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const Ave=Wi(0);function rz(e){const t=Rr(e);return!f0()||!t.visualViewport?Ave:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function kve(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Rr(e)?!1:t}function oc(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=o2(e);let l=Wi(1);t&&(r?Gn(r)&&(l=Nu(r)):l=Nu(e));const c=kve(s,n,r)?rz(s):Wi(0);let u=(o.left+c.x)/l.x,d=(o.top+c.y)/l.y,h=o.width/l.x,p=o.height/l.y;if(s){const g=Rr(s),b=r&&Gn(r)?Rr(r):r;let y=g,_=yw(y);for(;_&&r&&b!==y;){const w=Nu(_),T=_.getBoundingClientRect(),v=Lo(_),E=T.left+(_.clientLeft+parseFloat(v.paddingLeft))*w.x,S=T.top+(_.clientTop+parseFloat(v.paddingTop))*w.y;u*=w.x,d*=w.y,h*=w.x,p*=w.y,u+=E,d+=S,y=Rr(_),_=yw(y)}}return My({width:h,height:p,x:u,y:d})}function N0(e,t){const n=d0(e).scrollLeft;return t?t.left+n:oc(os(e)).left+n}function oz(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-N0(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Mve(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",l=os(r),c=t?u0(t.floating):!1;if(r===l||c&&s)return n;let u={scrollLeft:0,scrollTop:0},d=Wi(1);const h=Wi(0),p=rr(r);if((p||!p&&!s)&&((nl(r)!=="body"||dc(l))&&(u=d0(r)),rr(r))){const b=oc(r);d=Nu(r),h.x=b.x+r.clientLeft,h.y=b.y+r.clientTop}const g=l&&!p&&!s?oz(l,u):Wi(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-u.scrollLeft*d.x+h.x+g.x,y:n.y*d.y-u.scrollTop*d.y+h.y+g.y}}function jve(e){return Array.from(e.getClientRects())}function Pve(e){const t=os(e),n=d0(e),r=e.ownerDocument.body,o=jo(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=jo(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+N0(e);const c=-n.scrollTop;return Lo(r).direction==="rtl"&&(l+=jo(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:l,y:c}}const ej=25;function Nve(e,t){const n=Rr(e),r=os(e),o=n.visualViewport;let s=r.clientWidth,l=r.clientHeight,c=0,u=0;if(o){s=o.width,l=o.height;const h=f0();(!h||h&&t==="fixed")&&(c=o.offsetLeft,u=o.offsetTop)}const d=N0(r);if(d<=0){const h=r.ownerDocument,p=h.body,g=getComputedStyle(p),b=h.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,y=Math.abs(r.clientWidth-p.clientWidth-b);y<=ej&&(s-=y)}else d<=ej&&(s+=d);return{width:s,height:l,x:c,y:u}}const Dve=new Set(["absolute","fixed"]);function $ve(e,t){const n=oc(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=rr(e)?Nu(e):Wi(1),l=e.clientWidth*s.x,c=e.clientHeight*s.y,u=o*s.x,d=r*s.y;return{width:l,height:c,x:u,y:d}}function tj(e,t,n){let r;if(t==="viewport")r=Nve(e,n);else if(t==="document")r=Pve(os(e));else if(Gn(t))r=$ve(t,n);else{const o=rz(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return My(r)}function iz(e,t){const n=Is(e);return n===t||!Gn(n)||Ns(n)?!1:Lo(n).position==="fixed"||iz(n,t)}function Ive(e,t){const n=t.get(e);if(n)return n;let r=Pa(e,[],!1).filter(c=>Gn(c)&&nl(c)!=="body"),o=null;const s=Lo(e).position==="fixed";let l=s?Is(e):e;for(;Gn(l)&&!Ns(l);){const c=Lo(l),u=I_(l);!u&&c.position==="fixed"&&(o=null),(s?!u&&!o:!u&&c.position==="static"&&!!o&&Dve.has(o.position)||dc(l)&&!u&&iz(e,l))?r=r.filter(h=>h!==l):o=c,l=Is(l)}return t.set(e,r),r}function zve(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const l=[...n==="clippingAncestors"?u0(t)?[]:Ive(t,this._c):[].concat(n),r],c=l[0],u=l.reduce((d,h)=>{const p=tj(t,h,o);return d.top=jo(p.top,d.top),d.right=Qu(p.right,d.right),d.bottom=Qu(p.bottom,d.bottom),d.left=jo(p.left,d.left),d},tj(t,c,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function Lve(e){const{width:t,height:n}=nz(e);return{width:t,height:n}}function Fve(e,t,n){const r=rr(t),o=os(t),s=n==="fixed",l=oc(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const u=Wi(0);function d(){u.x=N0(o)}if(r||!r&&!s)if((nl(t)!=="body"||dc(o))&&(c=d0(t)),r){const b=oc(t,!0,s,t);u.x=b.x+t.clientLeft,u.y=b.y+t.clientTop}else o&&d();s&&!r&&o&&d();const h=o&&!r&&!s?oz(o,c):Wi(0),p=l.left+c.scrollLeft-u.x-h.x,g=l.top+c.scrollTop-u.y-h.y;return{x:p,y:g,width:l.width,height:l.height}}function AS(e){return Lo(e).position==="static"}function nj(e,t){if(!rr(e)||Lo(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return os(e)===n&&(n=n.ownerDocument.body),n}function sz(e,t){const n=Rr(e);if(u0(e))return n;if(!rr(e)){let o=Is(e);for(;o&&!Ns(o);){if(Gn(o)&&!AS(o))return o;o=Is(o)}return n}let r=nj(e,t);for(;r&&Vte(r)&&AS(r);)r=nj(r,t);return r&&Ns(r)&&AS(r)&&!I_(r)?n:r||Gte(e)||n}const Uve=async function(e){const t=this.getOffsetParent||sz,n=this.getDimensions,r=await n(e.floating);return{reference:Fve(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Vve(e){return Lo(e).direction==="rtl"}const qve={convertOffsetParentRelativeRectToViewportRelativeRect:Mve,getDocumentElement:os,getClippingRect:zve,getOffsetParent:sz,getElementRects:Uve,getClientRects:jve,getDimensions:Lve,getScale:Nu,isElement:Gn,isRTL:Vve};function az(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Bve(e,t){let n=null,r;const o=os(e);function s(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function l(c,u){c===void 0&&(c=!1),u===void 0&&(u=1),s();const d=e.getBoundingClientRect(),{left:h,top:p,width:g,height:b}=d;if(c||t(),!g||!b)return;const y=_u(p),_=_u(o.clientWidth-(h+g)),w=_u(o.clientHeight-(p+b)),T=_u(h),E={rootMargin:-y+"px "+-_+"px "+-w+"px "+-T+"px",threshold:jo(0,Qu(1,u))||1};let S=!0;function C(x){const O=x[0].intersectionRatio;if(O!==u){if(!S)return l();O?l(!1,O):r=setTimeout(()=>{l(!1,1e-7)},1e3)}O===1&&!az(d,e.getBoundingClientRect())&&l(),S=!1}try{n=new IntersectionObserver(C,{...E,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,E)}n.observe(e)}return l(!0),s}function rj(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,d=o2(e),h=o||s?[...d?Pa(d):[],...Pa(t)]:[];h.forEach(T=>{o&&T.addEventListener("scroll",n,{passive:!0}),s&&T.addEventListener("resize",n)});const p=d&&c?Bve(d,n):null;let g=-1,b=null;l&&(b=new ResizeObserver(T=>{let[v]=T;v&&v.target===d&&b&&(b.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var E;(E=b)==null||E.observe(t)})),n()}),d&&!u&&b.observe(d),b.observe(t));let y,_=u?oc(e):null;u&&w();function w(){const T=oc(e);_&&!az(_,T)&&n(),_=T,y=requestAnimationFrame(w)}return n(),()=>{var T;h.forEach(v=>{o&&v.removeEventListener("scroll",n),s&&v.removeEventListener("resize",n)}),p?.(),(T=b)==null||T.disconnect(),b=null,u&&cancelAnimationFrame(y)}}const Hve=Cve,Kve=Tve,Gve=xve,Zve=Ove,Wve=_ve,Yve=Rve,Xve=(e,t,n)=>{const r=new Map,o={platform:qve,...n},s={...o.platform,_c:r};return wve(e,t,{...o,platform:s})};var Qve=typeof document<"u",Jve=function(){},Yg=Qve?k.useLayoutEffect:Jve;function Ly(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 n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ly(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!Ly(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function lz(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function oj(e,t){const n=lz(e);return Math.round(t*n)/n}function kS(e){const t=k.useRef(e);return Yg(()=>{t.current=e}),t}function ebe(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:l}={},transform:c=!0,whileElementsMounted:u,open:d}=e,[h,p]=k.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,b]=k.useState(r);Ly(g,r)||b(r);const[y,_]=k.useState(null),[w,T]=k.useState(null),v=k.useCallback(Y=>{Y!==x.current&&(x.current=Y,_(Y))},[]),E=k.useCallback(Y=>{Y!==O.current&&(O.current=Y,T(Y))},[]),S=s||y,C=l||w,x=k.useRef(null),O=k.useRef(null),M=k.useRef(h),P=u!=null,z=kS(u),I=kS(o),q=kS(d),G=k.useCallback(()=>{if(!x.current||!O.current)return;const Y={placement:t,strategy:n,middleware:g};I.current&&(Y.platform=I.current),Xve(x.current,O.current,Y).then(oe=>{const ne={...oe,isPositioned:q.current!==!1};ee.current&&!Ly(M.current,ne)&&(M.current=ne,Fs.flushSync(()=>{p(ne)}))})},[g,t,n,I,q]);Yg(()=>{d===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,p(Y=>({...Y,isPositioned:!1})))},[d]);const ee=k.useRef(!1);Yg(()=>(ee.current=!0,()=>{ee.current=!1}),[]),Yg(()=>{if(S&&(x.current=S),C&&(O.current=C),S&&C){if(z.current)return z.current(S,C,G);G()}},[S,C,G,z,P]);const J=k.useMemo(()=>({reference:x,floating:O,setReference:v,setFloating:E}),[v,E]),Z=k.useMemo(()=>({reference:S,floating:C}),[S,C]),H=k.useMemo(()=>{const Y={position:n,left:0,top:0};if(!Z.floating)return Y;const oe=oj(Z.floating,h.x),ne=oj(Z.floating,h.y);return c?{...Y,transform:"translate("+oe+"px, "+ne+"px)",...lz(Z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:oe,top:ne}},[n,c,Z.floating,h.x,h.y]);return k.useMemo(()=>({...h,update:G,refs:J,elements:Z,floatingStyles:H}),[h,G,J,Z,H])}const tbe=(e,t)=>({...Hve(e),options:[e,t]}),nbe=(e,t)=>({...Kve(e),options:[e,t]}),rbe=(e,t)=>({...Yve(e),options:[e,t]}),obe=(e,t)=>({...Gve(e),options:[e,t]}),ibe=(e,t)=>({...Zve(e),options:[e,t]}),sbe=(e,t)=>({...Wve(e),options:[e,t]}),abe={intentional:"onClick",sloppy:"onPointerDown"};function lbe(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function cbe(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),s=n.useState("referenceElement"),l=n.useState("domReferenceElement"),{onOpenChange:c,dataRef:u}=n.context,{enabled:d=!0,escapeKey:h=!0,outsidePress:p=!0,outsidePressEvent:g="sloppy",referencePress:b=!1,referencePressEvent:y="sloppy",ancestorScroll:_=!1,bubbles:w,externalTree:T}=t,v=P0(T),E=lt(typeof p=="function"?p:()=>!1),S=typeof p=="function"?E:p,C=k.useRef(!1),{escapeKey:x,outsidePress:O}=lbe(w),M=k.useRef(null),P=Do(),z=Do(),I=lt(()=>{z.clear(),u.current.insideReactTree=!1}),q=k.useRef(!1),G=k.useRef(""),ee=lt(Q=>{G.current=Q.pointerType}),J=lt(()=>{const Q=G.current,ie=Q==="pen"||!Q?"mouse":Q,de=typeof g=="function"?g():g;return typeof de=="string"?de:de[ie]}),Z=lt(Q=>{if(!r||!d||!h||Q.key!=="Escape"||q.current)return;const ie=u.current.floatingContext?.nodeId,de=v?ku(v.nodesRef.current,ie):[];if(!x&&de.length>0){let we=!0;if(de.forEach($e=>{$e.context?.open&&!$e.context.dataRef.current.__escapeKeyBubbles&&(we=!1)}),!we)return}const _e=Xye(Q)?Q.nativeEvent:Q,Te=kn(T0e,_e);n.setOpen(!1,Te),!x&&!Te.isPropagationAllowed&&Q.stopPropagation()}),H=lt(Q=>{const ie=J();return ie==="intentional"&&Q.type!=="click"||ie==="sloppy"&&Q.type==="click"}),Y=lt(()=>{u.current.insideReactTree=!0,z.start(0,I)}),oe=lt((Q,ie=!1)=>{if(H(Q)){I();return}if(u.current.insideReactTree){I();return}if(J()==="intentional"&&ie||typeof S=="function"&&!S(Q))return;const de=xi(Q),_e=`[${Iy("inert")}]`,Te=uo(n.select("floatingElement")).querySelectorAll(_e),we=n.context.triggerElements;if(de&&(we.hasElement(de)||we.hasMatchingElement(Re=>Hn(Re,de))))return;let $e=Gn(de)?de:null;for(;$e&&!Ns($e);){const Re=Is($e);if(Ns(Re)||!Gn(Re))break;$e=Re}if(Te.length&&Gn(de)&&!Yye(de)&&!Hn(de,n.select("floatingElement"))&&Array.from(Te).every(Re=>!Hn($e,Re)))return;if(rr(de)&&!("touches"in Q)){const Re=Ns(de),We=Lo(de),ze=/auto|scroll/,Le=Re||ze.test(We.overflowX),Ue=Re||ze.test(We.overflowY),dt=Le&&de.clientWidth>0&&de.scrollWidth>de.clientWidth,Ce=Ue&&de.clientHeight>0&&de.scrollHeight>de.clientHeight,pe=We.direction==="rtl",Ne=Ce&&(pe?Q.offsetX<=de.offsetWidth-de.clientWidth:Q.offsetX>de.clientWidth),Be=dt&&Q.offsetY>de.clientHeight;if(Ne||Be)return}const Ze=u.current.floatingContext?.nodeId,ye=v&&ku(v.nodesRef.current,Ze).some(Re=>bi(Q,Re.context?.elements.floating));if(bi(Q,n.select("floatingElement"))||bi(Q,n.select("domReferenceElement"))||ye)return;const Fe=v?ku(v.nodesRef.current,Ze):[];if(Fe.length>0){let Re=!0;if(Fe.forEach(We=>{We.context?.open&&!We.context.dataRef.current.__outsidePressBubbles&&(Re=!1)}),!Re)return}n.setOpen(!1,kn(G6,Q)),I()}),ne=lt(Q=>{J()!=="sloppy"||Q.pointerType==="touch"||!n.select("open")||!d||bi(Q,n.select("floatingElement"))||bi(Q,n.select("domReferenceElement"))||oe(Q)}),$=lt(Q=>{if(J()!=="sloppy"||!n.select("open")||!d||bi(Q,n.select("floatingElement"))||bi(Q,n.select("domReferenceElement")))return;const ie=Q.touches[0];ie&&(M.current={startTime:Date.now(),startX:ie.clientX,startY:ie.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},P.start(1e3,()=>{M.current&&(M.current.dismissOnTouchEnd=!1,M.current.dismissOnMouseDown=!1)}))}),V=lt(Q=>{const ie=xi(Q);function de(){$(Q),ie?.removeEventListener(Q.type,de)}ie?.addEventListener(Q.type,de)}),U=lt(Q=>{const ie=C.current;if(C.current=!1,P.clear(),Q.type==="mousedown"&&M.current&&!M.current.dismissOnMouseDown)return;const de=xi(Q);function _e(){Q.type==="pointerdown"?ne(Q):oe(Q,ie),de?.removeEventListener(Q.type,_e)}de?.addEventListener(Q.type,_e)}),D=lt(Q=>{if(J()!=="sloppy"||!M.current||bi(Q,n.select("floatingElement"))||bi(Q,n.select("domReferenceElement")))return;const ie=Q.touches[0];if(!ie)return;const de=Math.abs(ie.clientX-M.current.startX),_e=Math.abs(ie.clientY-M.current.startY),Te=Math.sqrt(de*de+_e*_e);Te>5&&(M.current.dismissOnTouchEnd=!0),Te>10&&(oe(Q),P.clear(),M.current=null)}),B=lt(Q=>{const ie=xi(Q);function de(){D(Q),ie?.removeEventListener(Q.type,de)}ie?.addEventListener(Q.type,de)}),te=lt(Q=>{J()!=="sloppy"||!M.current||bi(Q,n.select("floatingElement"))||bi(Q,n.select("domReferenceElement"))||(M.current.dismissOnTouchEnd&&oe(Q),P.clear(),M.current=null)}),re=lt(Q=>{const ie=xi(Q);function de(){te(Q),ie?.removeEventListener(Q.type,de)}ie?.addEventListener(Q.type,de)});k.useEffect(()=>{if(!r||!d)return;u.current.__escapeKeyBubbles=x,u.current.__outsidePressBubbles=O;const Q=new Xu;function ie($e){n.setOpen(!1,kn(ef,$e))}function de(){Q.clear(),q.current=!0}function _e(){Q.start(f0()?5:0,()=>{q.current=!1})}const Te=uo(o);Te.addEventListener("pointerdown",ee,!0),h&&(Te.addEventListener("keydown",Z),Te.addEventListener("compositionstart",de),Te.addEventListener("compositionend",_e)),S&&(Te.addEventListener("click",U,!0),Te.addEventListener("pointerdown",U,!0),Te.addEventListener("touchstart",V,!0),Te.addEventListener("touchmove",B,!0),Te.addEventListener("touchend",re,!0),Te.addEventListener("mousedown",U,!0));let we=[];return _&&(Gn(l)&&(we=Pa(l)),Gn(o)&&(we=we.concat(Pa(o))),!Gn(s)&&s&&s.contextElement&&(we=we.concat(Pa(s.contextElement)))),we=we.filter($e=>$e!==Te.defaultView?.visualViewport),we.forEach($e=>{$e.addEventListener("scroll",ie,{passive:!0})}),()=>{Te.removeEventListener("pointerdown",ee,!0),h&&(Te.removeEventListener("keydown",Z),Te.removeEventListener("compositionstart",de),Te.removeEventListener("compositionend",_e)),S&&(Te.removeEventListener("click",U,!0),Te.removeEventListener("pointerdown",U,!0),Te.removeEventListener("touchstart",V,!0),Te.removeEventListener("touchmove",B,!0),Te.removeEventListener("touchend",re,!0),Te.removeEventListener("mousedown",U,!0)),we.forEach($e=>{$e.removeEventListener("scroll",ie)}),Q.clear()}},[u,o,s,l,h,S,r,c,_,d,x,O,Z,oe,U,ne,V,B,re,ee,n]),k.useEffect(I,[S,I]);const le=k.useMemo(()=>({onKeyDown:Z,...b&&{[abe[y]]:Q=>{n.setOpen(!1,kn(Wd,Q.nativeEvent))},...y!=="intentional"&&{onClick(Q){n.setOpen(!1,kn(Wd,Q.nativeEvent))}}}}),[Z,n,b,y]),ge=lt(Q=>{const ie=xi(Q.nativeEvent);!Hn(n.select("floatingElement"),ie)||Q.button!==0||(C.current=!0)}),Me=k.useMemo(()=>({onKeyDown:Z,onPointerDown:ge,onMouseDown:ge,onMouseUp:ge,onClickCapture:Y,onMouseDownCapture:Y,onPointerDownCapture:Y,onMouseUpCapture:Y,onTouchEndCapture:Y,onTouchMoveCapture:Y}),[Z,ge,Y]);return k.useMemo(()=>d?{reference:le,floating:Me,trigger:le}:{},[d,le,Me])}const ube={open:tn(e=>e.open),domReferenceElement:tn(e=>e.domReferenceElement),referenceElement:tn(e=>e.positionReference??e.referenceElement),floatingElement:tn(e=>e.floatingElement),floatingId:tn(e=>e.floatingId)};class fbe extends ove{constructor(t){const{nested:n,noEmit:r,onOpenChange:o,triggerElements:s,...l}=t;super({...l,positionReference:l.referenceElement,domReferenceElement:l.referenceElement},{onOpenChange:o,dataRef:{current:{}},events:sve(),nested:n,noEmit:r,triggerElements:s},ube)}setOpen=(t,n)=>{if((!t||!this.state.open||A6(n.event))&&(this.context.dataRef.current.openEvent=t?n.event:void 0),!this.context.noEmit){const r={open:t,reason:n.reason,nativeEvent:n.event,nested:this.context.nested,triggerElement:n.trigger};this.context.events.emit("openchange",r)}this.context.onOpenChange?.(t,n)}}function i2(e,t=!1,n=!1){const[r,o]=k.useState(e&&t?"idle":void 0),[s,l]=k.useState(e);return e&&!s&&(l(!0),o("starting")),!e&&s&&r!=="ending"&&!n&&o("ending"),!e&&!s&&r==="ending"&&o(void 0),rt(()=>{if(!e&&s&&r!=="ending"&&n){const c=Ui.request(()=>{o("ending")});return()=>{Ui.cancel(c)}}},[e,s,r,n]),rt(()=>{if(!e||t)return;const c=Ui.request(()=>{o(void 0)});return()=>{Ui.cancel(c)}},[t,e]),rt(()=>{if(!e||!t)return;e&&s&&r!=="idle"&&o("starting");const c=Ui.request(()=>{o("idle")});return()=>{Ui.cancel(c)}},[t,e,s,o,r]),k.useMemo(()=>({mounted:s,setMounted:l,transitionStatus:r}),[s,r])}function dbe(e,t=!1,n=!0){const r=j0();return lt((o,s=null)=>{r.cancel();const l=Ll(e);l!=null&&(typeof l.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED?o():r.request(()=>{function c(){l&&Promise.all(l.getAnimations().map(u=>u.finished)).then(()=>{s!=null&&s.aborted||Fs.flushSync(o)}).catch(()=>{if(n){if(s!=null&&s.aborted)return;Fs.flushSync(o)}else l.getAnimations().length>0&&l.getAnimations().some(u=>u.pending||u.playState!=="finished")&&c()})}t?r.request(c):c()}))})}function D0(e){const{enabled:t=!0,open:n,ref:r,onComplete:o}=e,s=Kr(n),l=lt(o),c=dbe(r,n);k.useEffect(()=>{t&&c(()=>{n===s.current&&l()})},[t,n,l,c,s])}class hbe{constructor(){this.elements=new Set,this.idMap=new Map}add(t,n){const r=this.idMap.get(t);r!==n&&(r!==void 0&&this.elements.delete(r),this.elements.add(n),this.idMap.set(t,n))}delete(t){const n=this.idMap.get(t);n&&(this.elements.delete(n),this.idMap.delete(t))}hasElement(t){return this.elements.has(t)}hasMatchingElement(t){for(const n of this.elements)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}get size(){return this.idMap.size}}function cz(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,o=YE(),s=X6()!=null,l=Yi(()=>new fbe({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:r.triggers??new hbe,floatingId:o,nested:s,noEmit:e.noEmit||!1})).current;return rt(()=>{const c={open:t,floatingId:o};r.reference!==void 0&&(c.referenceElement=r.reference,c.domReferenceElement=Gn(r.reference)?r.reference:null),r.floating!==void 0&&(c.floatingElement=r.floating),l.update(c)},[t,o,r.reference,r.floating,l]),l.context.onOpenChange=n,l.context.nested=s,l.context.noEmit=e.noEmit||!1,l}function pbe(e={}){const{nodeId:t,externalTree:n}=e,r=cz(e),o=e.rootContext||r,s={reference:o.useState("referenceElement"),floating:o.useState("floatingElement"),domReference:o.useState("domReferenceElement")},[l,c]=k.useState(null),u=k.useRef(null),d=P0(n);rt(()=>{s.domReference&&(u.current=s.domReference)},[s.domReference]);const h=ebe({...e,elements:{...s,...l&&{reference:l}}}),p=k.useCallback(O=>{const M=Gn(O)?{getBoundingClientRect:()=>O.getBoundingClientRect(),getClientRects:()=>O.getClientRects(),contextElement:O}:O;c(M),h.refs.setReference(M)},[h.refs]),[g,b]=k.useState(null),[y,_]=k.useState(null);o.useSyncedValue("referenceElement",g),o.useSyncedValue("domReferenceElement",Gn(g)?g:null),o.useSyncedValue("floatingElement",y);const w=k.useCallback(O=>{(Gn(O)||O===null)&&(u.current=O,b(O)),(Gn(h.refs.reference.current)||h.refs.reference.current===null||O!==null&&!Gn(O))&&h.refs.setReference(O)},[h.refs,b]),T=k.useCallback(O=>{_(O),h.refs.setFloating(O)},[h.refs]),v=k.useMemo(()=>({...h.refs,setReference:w,setFloating:T,setPositionReference:p,domReference:u}),[h.refs,w,T,p]),E=k.useMemo(()=>({...h.elements,domReference:s.domReference}),[h.elements,s.domReference]),S=o.useState("open"),C=o.useState("floatingId"),x=k.useMemo(()=>({...h,dataRef:o.context.dataRef,open:S,onOpenChange:o.setOpen,events:o.context.events,floatingId:C,refs:v,elements:E,nodeId:t,rootStore:o}),[h,v,E,t,o,S,C]);return rt(()=>{o.context.dataRef.current.floatingContext=x;const O=d?.nodesRef.current.find(M=>M.id===t);O&&(O.context=x)}),k.useMemo(()=>({...h,context:x,refs:v,elements:E,rootStore:o}),[h,v,E,x,o])}function mbe(e=[]){const t=e.map(d=>d?.reference),n=e.map(d=>d?.floating),r=e.map(d=>d?.item),o=e.map(d=>d?.trigger),s=k.useCallback(d=>Cg(d,e,"reference"),t),l=k.useCallback(d=>Cg(d,e,"floating"),n),c=k.useCallback(d=>Cg(d,e,"item"),r),u=k.useCallback(d=>Cg(d,e,"trigger"),o);return k.useMemo(()=>({getReferenceProps:s,getFloatingProps:l,getItemProps:c,getTriggerProps:u}),[s,l,c,u])}function Cg(e,t,n){const r=new Map,o=n==="item",s={};n==="floating"&&(s.tabIndex=-1,s[fx]="");for(const l in e)o&&e&&(l===E6||l===C6)||(s[l]=e[l]);for(let l=0;l<t.length;l+=1){let c;const u=t[l]?.[n];typeof u=="function"?c=e?u(e):null:c=u,c&&ij(s,c,o,r)}return ij(s,e,o,r),s}function ij(e,t,n,r){for(const o in t){const s=t[o];n&&(o===E6||o===C6)||(o.startsWith("on")?(r.has(o)||r.set(o,[]),typeof s=="function"&&(r.get(o)?.push(s),e[o]=(...l)=>r.get(o)?.map(c=>c(...l)).find(c=>c!==void 0))):e[o]=s)}}const gbe="Escape";function $0(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Tg(e,t){return $0(t,e===QE||e===ep,e===za||e===La)}function MS(e,t,n){return $0(t,e===ep,n?e===za:e===La)||e==="Enter"||e===" "||e===""}function ybe(e,t,n){return $0(t,n?e===za:e===La,e===ep)}function vbe(e,t,n,r){const o=n?e===La:e===za,s=e===QE;return t==="both"||t==="horizontal"&&r&&r>1?e===gbe:$0(t,o,s)}function bbe(e,t){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),s=n.useState("domReferenceElement"),l=n.context.dataRef,{listRef:c,activeIndex:u,onNavigate:d=()=>{},enabled:h=!0,selectedIndex:p=null,allowEscape:g=!1,loopFocus:b=!1,nested:y=!1,rtl:_=!1,virtual:w=!1,focusItemOnOpen:T="auto",focusItemOnHover:v=!0,openOnArrowKeyDown:E=!0,disabledIndices:S=void 0,orientation:C="vertical",parentOrientation:x,cols:O=1,scrollItemIntoView:M=!0,itemSizes:P,dense:z=!1,id:I,resetOnPointerLeave:q=!0,externalTree:G}=t,ee=Oy(o),J=Kr(ee),Z=X6(),H=P0(G);rt(()=>{l.current.orientation=C},[l,C]);const Y=dx(s),oe=k.useRef(T),ne=k.useRef(p??-1),$=k.useRef(null),V=k.useRef(!0),U=lt(ze=>{d(ne.current===-1?null:ne.current,ze)}),D=k.useRef(U),B=k.useRef(!!o),te=k.useRef(r),re=k.useRef(!1),le=k.useRef(!1),ge=Kr(S),Me=Kr(r),Q=Kr(M),ie=Kr(p),de=Kr(q),_e=lt(()=>{function ze(Ce){w?H?.events.emit("virtualfocus",Ce):Wg(Ce,{sync:re.current,preventScroll:!0})}const Le=c.current[ne.current],Ue=le.current;Le&&ze(Le),(re.current?Ce=>Ce():requestAnimationFrame)(()=>{const Ce=c.current[ne.current]||Le;if(!Ce)return;Le||ze(Ce);const pe=Q.current;pe&&we&&(Ue||!V.current)&&Ce.scrollIntoView?.(typeof pe=="boolean"?{block:"nearest",inline:"nearest"}:pe)})});rt(()=>{h&&(r&&o?(ne.current=p??-1,oe.current&&p!=null&&(le.current=!0,U())):B.current&&(ne.current=-1,D.current()))},[h,r,o,p,U]),rt(()=>{if(h){if(!r){re.current=!1;return}if(o)if(u==null){if(re.current=!1,ie.current!=null)return;if(B.current&&(ne.current=-1,_e()),(!te.current||!B.current)&&oe.current&&($.current!=null||oe.current===!0&&$.current==null)){let ze=0;const Le=()=>{c.current[0]==null?(ze<2&&(ze?requestAnimationFrame:queueMicrotask)(Le),ze+=1):(ne.current=$.current==null||MS($.current,C,_)||y?Zg(c):mx(c),$.current=null,U())};Le()}}else Mu(c,u)||(ne.current=u,_e(),le.current=!1)}},[h,r,o,u,ie,y,c,C,_,U,_e,ge]),rt(()=>{if(!h||o||!H||w||!B.current)return;const ze=H.nodesRef.current,Le=ze.find(Ce=>Ce.id===Z)?.context?.elements.floating,Ue=Ps(uo(o)),dt=ze.some(Ce=>Ce.context&&Hn(Ce.context.elements.floating,Ue));Le&&!dt&&V.current&&Le.focus({preventScroll:!0})},[h,o,H,Z,w]),rt(()=>{D.current=U,te.current=r,B.current=!!o}),rt(()=>{r||($.current=null,oe.current=T)},[r,T]);const Te=u!=null,we=k.useMemo(()=>{function ze(Ue){if(!Me.current)return;const dt=c.current.indexOf(Ue.currentTarget);dt!==-1&&ne.current!==dt&&(ne.current=dt,U(Ue))}return{onFocus(Ue){re.current=!0,ze(Ue)},onClick:({currentTarget:Ue})=>Ue.focus({preventScroll:!0}),onMouseMove(Ue){re.current=!0,le.current=!1,v&&ze(Ue)},onPointerLeave(Ue){if(!Me.current||!V.current||Ue.pointerType==="touch")return;re.current=!0;const dt=Ue.relatedTarget;!v||c.current.includes(dt)||de.current&&(ne.current=-1,U(Ue),w||J.current?.focus({preventScroll:!0}))}}},[Me,J,v,c,U,de,w]),$e=k.useCallback(()=>x??H?.nodesRef.current.find(ze=>ze.id===Z)?.context?.dataRef?.current.orientation,[Z,H,x]),Ze=lt(ze=>{if(V.current=!1,re.current=!0,ze.which===229||!Me.current&&ze.currentTarget===J.current)return;if(y&&vbe(ze.key,C,_,O)){Tg(ze.key,$e())||Qr(ze),n.setOpen(!1,kn(xS,ze.nativeEvent)),rr(s)&&(w?H?.events.emit("virtualfocus",s):s.focus());return}const Le=ne.current,Ue=Zg(c,S),dt=mx(c,S);if(Y||(ze.key==="Home"&&(Qr(ze),ne.current=Ue,U(ze)),ze.key==="End"&&(Qr(ze),ne.current=dt,U(ze))),O>1){const Ce=P||Array.from({length:c.current.length},()=>({width:1,height:1})),pe=j6(Ce,O,z),Ne=pe.findIndex(vt=>vt!=null&&!Fa(c,vt,S)),Be=pe.reduce((vt,bt,pt)=>bt!=null&&!Fa(c,bt,S)?pt:vt,-1),it=pe[M6({current:pe.map(vt=>vt!=null?c.current[vt]:null)},{event:ze,orientation:C,loopFocus:b,rtl:_,cols:O,disabledIndices:N6([...(typeof S!="function"?S:null)||c.current.map((vt,bt)=>Fa(c,bt,S)?bt:void 0),void 0],pe),minIndex:Ne,maxIndex:Be,prevIndex:P6(ne.current>dt?Ue:ne.current,Ce,pe,O,ze.key===ep?"bl":ze.key===(_?za:La)?"tr":"tl"),stopEvent:!0})];if(it!=null&&(ne.current=it,U(ze)),C==="both")return}if(Tg(ze.key,C)){if(Qr(ze),r&&!w&&Ps(ze.currentTarget.ownerDocument)===ze.currentTarget){ne.current=MS(ze.key,C,_)?Ue:dt,U(ze);return}MS(ze.key,C,_)?b?Le>=dt?g&&Le!==c.current.length?ne.current=-1:(re.current=!1,ne.current=Ue):ne.current=qr(c,{startingIndex:Le,disabledIndices:S}):ne.current=Math.min(dt,qr(c,{startingIndex:Le,disabledIndices:S})):b?Le<=Ue?g&&Le!==-1?ne.current=c.current.length:(re.current=!1,ne.current=dt):ne.current=qr(c,{startingIndex:Le,decrement:!0,disabledIndices:S}):ne.current=Math.max(Ue,qr(c,{startingIndex:Le,decrement:!0,disabledIndices:S})),Mu(c,ne.current)&&(ne.current=-1),U(ze)}}),ye=k.useMemo(()=>w&&r&&Te&&{"aria-activedescendant":`${I}-${u}`},[w,r,Te,I,u]),Fe=k.useMemo(()=>({"aria-orientation":C==="both"?void 0:C,...Y?{}:ye,onKeyDown(ze){if(ze.key==="Tab"&&ze.shiftKey&&r&&!w){const Le=xi(ze.nativeEvent);if(Le&&!Hn(J.current,Le))return;Qr(ze),n.setOpen(!1,kn(M0,ze.nativeEvent)),rr(s)&&s.focus();return}Ze(ze)},onPointerMove(){V.current=!0}}),[ye,Ze,J,C,Y,n,r,w,s]),Re=k.useMemo(()=>{function ze(Ue){T==="auto"&&R6(Ue.nativeEvent)&&(oe.current=!w)}function Le(Ue){oe.current=T,T==="auto"&&O6(Ue.nativeEvent)&&(oe.current=!0)}return{onKeyDown(Ue){const dt=n.select("open");V.current=!1;const Ce=Ue.key.startsWith("Arrow"),pe=ybe(Ue.key,$e(),_),Ne=Tg(Ue.key,C),Be=(y?pe:Ne)||Ue.key==="Enter"||Ue.key.trim()==="";if(w&&dt)return Ze(Ue);if(!(!dt&&!E&&Ce)){if(Be){const it=Tg(Ue.key,$e());$.current=y&&it?null:Ue.key}if(y){pe&&(Qr(Ue),dt?(ne.current=Zg(c,ge.current),U(Ue)):n.setOpen(!0,kn(xS,Ue.nativeEvent,Ue.currentTarget)));return}Ne&&(ie.current!=null&&(ne.current=ie.current),Qr(Ue),!dt&&E?n.setOpen(!0,kn(xS,Ue.nativeEvent,Ue.currentTarget)):Ze(Ue),dt&&U(Ue))}},onFocus(Ue){n.select("open")&&!w&&(ne.current=-1,U(Ue))},onPointerDown:Le,onPointerEnter:Le,onMouseDown:ze,onClick:ze}},[Ze,ge,T,c,y,U,n,E,C,$e,_,ie,w]),We=k.useMemo(()=>({...ye,...Re}),[ye,Re]);return k.useMemo(()=>h?{reference:We,floating:Fe,item:we,trigger:Re}:{},[h,We,Fe,Re,we])}function Sbe(e,t){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.context.dataRef,{listRef:s,activeIndex:l,onMatch:c,onTypingChange:u,enabled:d=!0,findMatch:h=null,resetMs:p=750,ignoreKeys:g=Bu,selectedIndex:b=null}=t,y=Do(),_=k.useRef(""),w=k.useRef(b??l??-1),T=k.useRef(null);rt(()=>{r&&(y.clear(),T.current=null,_.current="")},[r,y]),rt(()=>{r&&_.current===""&&(w.current=b??l??-1)},[r,b,l]);const v=lt(x=>{x?o.current.typing||(o.current.typing=x,u?.(x)):o.current.typing&&(o.current.typing=x,u?.(x))}),E=lt(x=>{function O(q,G,ee){const J=h?h(G,ee):G.find(Z=>Z?.toLocaleLowerCase().indexOf(ee.toLocaleLowerCase())===0);return J?q.indexOf(J):-1}const M=s.current;if(_.current.length>0&&_.current[0]!==" "&&(O(M,M,_.current)===-1?v(!1):x.key===" "&&Qr(x)),M==null||g.includes(x.key)||x.key.length!==1||x.ctrlKey||x.metaKey||x.altKey)return;r&&x.key!==" "&&(Qr(x),v(!0)),M.every(q=>q?q[0]?.toLocaleLowerCase()!==q[1]?.toLocaleLowerCase():!0)&&_.current===x.key&&(_.current="",w.current=T.current),_.current+=x.key,y.start(p,()=>{_.current="",w.current=T.current,v(!1)});const z=w.current,I=O(M,[...M.slice((z||0)+1),...M.slice(0,(z||0)+1)],_.current);I!==-1?(c?.(I),T.current=I):x.key!==" "&&(_.current="",v(!1))}),S=k.useMemo(()=>({onKeyDown:E}),[E]),C=k.useMemo(()=>({onKeyDown:E,onKeyUp(x){x.key===" "&&v(!1)}}),[E,v]);return k.useMemo(()=>d?{reference:S,floating:C}:{},[d,S,C])}const uz=k.createContext(null),fz=k.createContext(null);function ls(){const e=k.useContext(uz);if(e===null)throw new Error(is(60));return e}function dz(){const e=k.useContext(fz);if(e===null)throw new Error(is(61));return e}const wbe=(e,t)=>Object.is(e,t);function tf(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function jS(e,t,n){return!e||e.length===0?!1:e.some(r=>r===void 0?!1:tf(r,t,n))}function vx(e,t,n){return!e||e.length===0?-1:e.findIndex(r=>r===void 0?!1:tf(r,t,n))}function xbe(e,t,n){return e.filter(r=>!tf(r,t,n))}function bx(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function _be(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function Dd(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 bx(e)}function fu(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?bx(e.value):bx(e)}function Ebe(e,t,n){if(n&&e!=null)return n(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??Dd(e,n);if(Array.isArray(t)){const r=_be(t)?t.flatMap(o=>o.items):t;if(e==null){const o=r.find(s=>s.value==null);return o&&o.label!=null?o.label:Dd(e,n)}if(typeof e!="object"){const o=r.find(s=>s&&s.value===e);return o&&o.label!=null?o.label:Dd(e,n)}if("value"in e){const o=r.find(s=>s&&s.value===e.value);if(o&&o.label!=null)return o.label}}return Dd(e,n)}function Cbe(e,t){return!Array.isArray(e)||e.length===0?"":e.map(n=>Dd(n,t)).join(", ")}const yt={id:tn(e=>e.id),modal:tn(e=>e.modal),multiple:tn(e=>e.multiple),items:tn(e=>e.items),itemToStringLabel:tn(e=>e.itemToStringLabel),itemToStringValue:tn(e=>e.itemToStringValue),isItemEqualToValue:tn(e=>e.isItemEqualToValue),value:tn(e=>e.value),open:tn(e=>e.open),mounted:tn(e=>e.mounted),forceMount:tn(e=>e.forceMount),transitionStatus:tn(e=>e.transitionStatus),openMethod:tn(e=>e.openMethod),activeIndex:tn(e=>e.activeIndex),selectedIndex:tn(e=>e.selectedIndex),isActive:tn((e,t)=>e.activeIndex===t),isSelected:tn((e,t,n)=>{const r=e.isItemEqualToValue,o=e.value;return e.multiple?Array.isArray(o)&&o.some(s=>tf(s,n,r)):e.selectedIndex===t&&e.selectedIndex!==null?!0:tf(o,n,r)}),isSelectedByFocus:tn((e,t)=>e.selectedIndex===t),popupProps:tn(e=>e.popupProps),triggerProps:tn(e=>e.triggerProps),triggerElement:tn(e=>e.triggerElement),positionerElement:tn(e=>e.positionerElement),listElement:tn(e=>e.listElement),scrollUpArrowVisible:tn(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:tn(e=>e.scrollDownArrowVisible),hasScrollArrows:tn(e=>e.hasScrollArrows),serializedValue:tn(e=>{const{multiple:t,value:n,itemToStringValue:r}=e;return t&&Array.isArray(n)&&n.length===0?"":fu(n,r)})};function Tbe(e,t){const n=k.useRef(e),r=lt(t);rt(()=>{n.current!==e&&r(n.current)},[e,r]),rt(()=>{n.current=e},[e])}function Rbe(e){const t=k.useRef(""),n=k.useCallback(o=>{o.defaultPrevented||(t.current=o.pointerType,e(o,o.pointerType))},[e]);return{onClick:k.useCallback(o=>{if(o.detail===0){e(o,"keyboard");return}"pointerType"in o&&e(o,o.pointerType),e(o,t.current),t.current=""},[e]),onPointerDown:n}}function Obe(e){const[t,n]=k.useState(null),r=lt((c,u)=>{e||n(u)}),o=k.useCallback(()=>{n(null)},[]),{onClick:s,onPointerDown:l}=Rbe(r);return k.useMemo(()=>({openMethod:t,reset:o,triggerProps:{onClick:s,onPointerDown:l}}),[t,o,s,l])}function Abe(e){const{id:t,value:n,defaultValue:r=null,onValueChange:o,open:s,defaultOpen:l=!1,onOpenChange:c,name:u,disabled:d=!1,readOnly:h=!1,required:p=!1,modal:g=!0,actionsRef:b,inputRef:y,onOpenChangeComplete:_,items:w,multiple:T=!1,itemToStringLabel:v,itemToStringValue:E,isItemEqualToValue:S=wbe,highlightItemOnHover:C=!0,children:x}=e,{clearErrors:O}=b6(),{setDirty:M,shouldValidateOnChange:P,validityData:z,setFilled:I,name:q,disabled:G,validation:ee}=bh(),{controlId:J}=A0(),Z=H6({id:t}),H=G||d,Y=q??u,[oe,ne]=Dy({controlled:n,default:T?r??Bu:r,name:"Select",state:"value"}),[$,V]=Dy({controlled:s,default:l,name:"Select",state:"open"}),U=k.useRef([]),D=k.useRef([]),B=k.useRef(null),te=k.useRef(null),re=k.useRef(0),le=k.useRef(null),ge=k.useRef([]),Me=k.useRef(!1),Q=k.useRef(!1),ie=k.useRef(null),de=k.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),_e=k.useRef(!1),{mounted:Te,setMounted:we,transitionStatus:$e}=i2($),{openMethod:Ze,triggerProps:ye,reset:Fe}=Obe($),Re=Yi(()=>new ju({id:Z,modal:g,multiple:T,itemToStringLabel:v,itemToStringValue:E,isItemEqualToValue:S,value:oe,open:$,mounted:Te,transitionStatus:$e,items:w,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,We=wt(Re,yt.activeIndex),ze=wt(Re,yt.selectedIndex),Le=wt(Re,yt.triggerElement),Ue=wt(Re,yt.positionerElement),dt=k.useMemo(()=>T&&Array.isArray(oe)&&oe.length===0?"":fu(oe,E),[T,oe,E]),Ce=k.useMemo(()=>T&&Array.isArray(oe)?oe.map(ft=>fu(ft,E)):fu(oe,E),[T,oe,E]),pe=Kr(Re.state.triggerElement);K6({id:Z,commit:ee.commit,value:oe,controlRef:pe,name:Y,getValue:()=>Ce});const Ne=k.useRef(oe);rt(()=>{oe!==Ne.current&&Re.set("forceMount",!0)},[Re,oe]),rt(()=>{I(oe!==null)},[oe,I]),rt(function(){if($)return;const Xt=ge.current;if(T){const En=Array.isArray(oe)?oe:[];if(En.length===0){Re.set("selectedIndex",null);return}const qn=En[En.length-1],an=vx(Xt,qn,S);Re.set("selectedIndex",an===-1?null:an);return}const mn=vx(Xt,oe,S);Re.set("selectedIndex",mn===-1?null:mn)},[T,$,oe,ge,S,Re]),Tbe(oe,()=>{O(Y),M(oe!==z.initialValue),P()?ee.commit(oe):ee.commit(oe,!0)});const Be=lt((ft,Xt)=>{if(c?.(ft,Xt),!Xt.isCanceled&&(V(ft),!ft&&Re.state.activeIndex!==null)){const mn=U.current[Re.state.activeIndex];queueMicrotask(()=>{mn?.setAttribute("tabindex","-1")})}}),it=lt(()=>{we(!1),Re.set("activeIndex",null),Fe(),_?.(!1)});D0({enabled:!b,open:$,ref:B,onComplete(){$||it()}}),k.useImperativeHandle(b,()=>({unmount:it}),[it]);const vt=lt((ft,Xt)=>{o?.(ft,Xt),!Xt.isCanceled&&ne(ft)}),bt=lt(()=>{const ft=Re.state.listElement||B.current;if(!ft)return;const Xt=ft.scrollTop,mn=ft.scrollTop+ft.clientHeight,En=Xt>1,qn=mn<ft.scrollHeight-1;Re.state.scrollUpArrowVisible!==En&&Re.set("scrollUpArrowVisible",En),Re.state.scrollDownArrowVisible!==qn&&Re.set("scrollDownArrowVisible",qn)}),pt=cz({open:$,onOpenChange:Be,elements:{reference:Le,floating:Ue}}),on=Sve(pt,{enabled:!h&&!H,event:"mousedown"}),qt=cbe(pt,{bubbles:!1}),Tt=bbe(pt,{enabled:!h&&!H,listRef:U,activeIndex:We,selectedIndex:ze,disabledIndices:Bu,onNavigate(ft){ft===null&&!$||Re.set("activeIndex",ft)},focusItemOnHover:!1}),Wt=Sbe(pt,{enabled:!h&&!H&&($||!T),listRef:D,activeIndex:We,selectedIndex:ze,onMatch(ft){$?Re.set("activeIndex",ft):vt(ge.current[ft],kn("none"))},onTypingChange(ft){Me.current=ft}}),{getReferenceProps:Pt,getFloatingProps:Bt,getItemProps:sn}=mbe([on,qt,Tt,Wt]),bn=k.useMemo(()=>h0(Pt(),ye),[Pt,ye]);j0e(()=>{Re.update({popupProps:Bt(),triggerProps:bn})}),rt(()=>{Re.update({id:Z,modal:g,multiple:T,value:oe,open:$,mounted:Te,transitionStatus:$e,popupProps:Bt(),triggerProps:bn,items:w,itemToStringLabel:v,itemToStringValue:E,isItemEqualToValue:S,openMethod:Ze})},[Re,Z,g,T,oe,$,Te,$e,Bt,bn,w,v,E,S,Ze]);const gt=k.useMemo(()=>({store:Re,name:Y,required:p,disabled:H,readOnly:h,multiple:T,itemToStringLabel:v,itemToStringValue:E,highlightItemOnHover:C,setValue:vt,setOpen:Be,listRef:U,popupRef:B,scrollHandlerRef:te,handleScrollArrowVisibility:bt,scrollArrowsMountedCountRef:re,getItemProps:sn,events:pt.context.events,valueRef:le,valuesRef:ge,labelsRef:D,typingRef:Me,selectionRef:de,selectedItemTextRef:ie,validation:ee,onOpenChangeComplete:_,keyboardActiveRef:Q,alignItemWithTriggerActiveRef:_e,initialValueRef:Ne}),[Re,Y,p,H,h,T,v,E,C,vt,Be,sn,pt.context.events,ee,_,bt]),Yt=Ha(y,ee.inputRef),Nt=T&&Array.isArray(oe)&&oe.length>0,Vn=k.useMemo(()=>!T||!Array.isArray(oe)||!Y?null:oe.map(ft=>{const Xt=fu(ft,E);return j.jsx("input",{type:"hidden",name:Y,value:Xt},Xt)}),[T,oe,Y,E]);return j.jsx(uz.Provider,{value:gt,children:j.jsxs(fz.Provider,{value:pt,children:[x,j.jsx("input",{...ee.getInputValidationProps({onFocus(){Re.state.triggerElement?.focus()},onChange(ft){if(ft.nativeEvent.defaultPrevented)return;const Xt=ft.target.value,mn=kn(ef,ft.nativeEvent);function En(){if(T)return;const qn=ge.current.find(an=>fu(an,E).toLowerCase()===Xt.toLowerCase());qn!=null&&(M(qn!==z.initialValue),vt(qn,mn),P()&&ee.commit(qn))}Re.set("forceMount",!0),queueMicrotask(En)}}),id:t||J||void 0,name:T?void 0:Y,value:dt,disabled:H,required:p&&!Nt,readOnly:h,ref:Yt,style:n2,tabIndex:-1,"aria-hidden":!0}),Vn]})})}let Fy=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const kbe={[Fy.startingStyle]:""},Mbe={[Fy.endingStyle]:""},hz={transitionStatus(e){return e==="starting"?kbe:e==="ending"?Mbe:null}};let s2=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Fy.startingStyle]="startingStyle",e[e.endingStyle=Fy.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e})({}),Sx=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const jbe={[Sx.popupOpen]:""},Pbe={[Sx.popupOpen]:"",[Sx.pressed]:""},Nbe={[s2.open]:""},Dbe={[s2.closed]:""},$be={[s2.anchorHidden]:""},Ibe={open(e){return e?jbe:null}},zbe={open(e){return e?Pbe:null}},pz={open(e){return e?Nbe:Dbe},anchorHidden(e){return e?$be:null}};function Lbe(e){const t=e.getBoundingClientRect(),n=window.getComputedStyle(e,"::before"),r=window.getComputedStyle(e,"::after");if(!(n.content!=="none"||r.content!=="none"))return t;const s=parseFloat(n.width)||0,l=parseFloat(n.height)||0,c=parseFloat(r.width)||0,u=parseFloat(r.height)||0,d=Math.max(t.width,s,c),h=Math.max(t.height,l,u),p=d-t.width,g=h-t.height;return{left:t.left-p/2,right:t.right+p/2,top:t.top-g/2,bottom:t.bottom+g/2}}const Rg=2,Fbe={...zbe,...v6,value:()=>null},Ube=k.forwardRef(function(t,n){const{render:r,className:o,disabled:s=!1,nativeButton:l=!0,...c}=t,{setTouched:u,setFocused:d,validationMode:h,state:p,disabled:g}=bh(),{labelId:b}=A0(),{store:y,setOpen:_,selectionRef:w,validation:T,readOnly:v,alignItemWithTriggerActiveRef:E,disabled:S,keyboardActiveRef:C}=ls(),x=g||S||s,O=wt(y,yt.open),M=wt(y,yt.value),P=wt(y,yt.triggerProps),z=wt(y,yt.positionerElement),I=wt(y,yt.listElement),q=wt(y,yt.serializedValue),G=Kr(z),ee=k.useRef(null),J=Do(),Z=Do(),{getButtonProps:H,buttonRef:Y}=p0({disabled:x,native:l}),oe=lt(te=>{y.set("triggerElement",te)}),ne=Ha(n,ee,Y,oe),$=Do(),V=Do();k.useEffect(()=>{if(O)return V.start(200,()=>{w.current.allowUnselectedMouseUp=!0,$.start(200,()=>{w.current.allowSelectedMouseUp=!0})}),()=>{$.clear(),V.clear()};w.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},Z.clear()},[O,w,Z,$,V]);const U=k.useMemo(()=>I?.id??Oy(z)?.id,[I,z]),D=h0(P,{role:"combobox","aria-expanded":O?"true":"false","aria-haspopup":"listbox","aria-controls":O?U:void 0,"aria-labelledby":b,"aria-readonly":v||void 0,tabIndex:x?-1:0,ref:ne,onFocus(te){d(!0),O&&E.current&&_(!1,kn(M0,te.nativeEvent)),J.start(0,()=>{y.set("forceMount",!0)})},onBlur(){u(!0),d(!1),h==="onBlur"&&T.commit(M)},onPointerMove(){C.current=!1},onKeyDown(){C.current=!0},onMouseDown(te){if(O)return;const re=es(te.currentTarget);function le(ge){if(!ee.current)return;const Me=ge.target;if(Hn(ee.current,Me)||Hn(G.current,Me)||Me===ee.current)return;const Q=Lbe(ee.current);ge.clientX>=Q.left-Rg&&ge.clientX<=Q.right+Rg&&ge.clientY>=Q.top-Rg&&ge.clientY<=Q.bottom+Rg||_(!1,kn(R0e,ge))}Z.start(0,()=>{re.addEventListener("mouseup",le,{once:!0})})}},T.getValidationProps,c,H);D.role="combobox";const B=k.useMemo(()=>({...p,open:O,disabled:x,value:M,readOnly:v,placeholder:!q}),[p,O,x,M,v,q]);return Nr("button",t,{ref:[n,ee],state:B,stateAttributesMapping:Fbe,props:D})}),Vbe={value:()=>null},qbe=k.forwardRef(function(t,n){const{className:r,render:o,children:s,...l}=t,{store:c,valueRef:u}=ls(),d=wt(c,yt.value),h=wt(c,yt.items),p=wt(c,yt.itemToStringLabel),g=wt(c,yt.serializedValue),b=k.useMemo(()=>({value:d,placeholder:!g}),[d,g]),y=typeof s=="function"?s(d):s??(Array.isArray(d)?Cbe(d,p):Ebe(d,h,p));return Nr("span",t,{state:b,ref:[n,u],props:[{children:y},l],stateAttributesMapping:Vbe})}),Bbe=k.forwardRef(function(t,n){const{className:r,render:o,...s}=t,{store:l}=ls(),c=wt(l,yt.open),u=k.useMemo(()=>({open:c}),[c]);return Nr("span",t,{state:u,ref:n,props:[{"aria-hidden":!0,children:"▼"},s],stateAttributesMapping:Ibe})}),Hbe=k.createContext(void 0),Kbe=k.forwardRef(function(t,n){const{store:r}=ls(),o=wt(r,yt.mounted),s=wt(r,yt.forceMount);return o||s?j.jsx(Hbe.Provider,{value:!0,children:j.jsx(pve,{ref:n,...t})}):null});function Gbe(e){return z_(19)?e:e?"true":void 0}let sj={},aj={},lj="";function Zbe(e){if(typeof document>"u")return!1;const t=es(e);return Rr(t).innerWidth-t.documentElement.clientWidth>0}function Wbe(e){const t=es(e),n=t.documentElement,r=t.body,o=dc(n)?n:r,s=o.style.overflow;return o.style.overflow="hidden",()=>{o.style.overflow=s}}function Ybe(e){const t=es(e),n=t.documentElement,r=t.body,o=Rr(n);let s=0,l=0;const c=Ui.create(),u=typeof CSS<"u"&&CSS.supports?.("scrollbar-gutter","stable");if(_6&&(o.visualViewport?.scale??1)!==1)return()=>{};function d(){const g=o.getComputedStyle(n),b=o.getComputedStyle(r),w=(g.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";s=n.scrollTop,l=n.scrollLeft,sj={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},lj=n.style.scrollBehavior,aj={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const T=n.scrollHeight>n.clientHeight,v=n.scrollWidth>n.clientWidth,E=g.overflowY==="scroll"||b.overflowY==="scroll",S=g.overflowX==="scroll"||b.overflowX==="scroll",C=Math.max(0,o.innerWidth-n.clientWidth),x=Math.max(0,o.innerHeight-n.clientHeight),O=parseFloat(b.marginTop)+parseFloat(b.marginBottom),M=parseFloat(b.marginLeft)+parseFloat(b.marginRight),P=dc(n)?n:r;if(u){n.style.scrollbarGutter=w,P.style.overflowY="hidden",P.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:w,overflowY:"hidden",overflowX:"hidden"}),(T||E)&&(n.style.overflowY="scroll"),(v||S)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:O||x?`calc(100dvh - ${O+x}px)`:"100dvh",width:M||C?`calc(100vw - ${M+C}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=s,r.scrollLeft=l,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function h(){Object.assign(n.style,sj),Object.assign(r.style,aj),u||(n.scrollTop=s,n.scrollLeft=l,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=lj)}function p(){h(),c.request(d)}return d(),o.addEventListener("resize",p),()=>{c.cancel(),h(),typeof o.removeEventListener=="function"&&o.removeEventListener("resize",p)}}class Xbe{lockCount=0;restore=null;timeoutLock=Xu.create();timeoutUnlock=Xu.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 r=es(t).documentElement,o=Rr(r).getComputedStyle(r).overflowY;if(o==="hidden"||o==="clip"){this.restore=Po;return}const s=qye||!Zbe(t);this.restore=s?Wbe(t):Ybe(t)}}const Qbe=new Xbe;function Jbe(e=!0,t=null){rt(()=>{if(e)return Qbe.acquire(t)},[e,t])}const mz=k.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function e1e(){return k.useContext(mz)}function a2(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:o}=e,s=lt(o),l=k.useRef(0),c=Yi(n1e).current,u=Yi(t1e).current,[d,h]=k.useState(0),p=k.useRef(d),g=lt((T,v)=>{u.set(T,v??null),p.current+=1,h(p.current)}),b=lt(T=>{u.delete(T),p.current+=1,h(p.current)}),y=k.useMemo(()=>{const T=new Map;return Array.from(u.keys()).filter(E=>E.isConnected).sort(r1e).forEach((E,S)=>{const C=u.get(E)??{};T.set(E,{...C,index:S})}),T},[u,d]);rt(()=>{if(typeof MutationObserver!="function"||y.size===0)return;const T=new MutationObserver(v=>{const E=new Set,S=C=>E.has(C)?E.delete(C):E.add(C);v.forEach(C=>{C.removedNodes.forEach(S),C.addedNodes.forEach(S)}),E.size===0&&(p.current+=1,h(p.current))});return y.forEach((v,E)=>{E.parentElement&&T.observe(E.parentElement,{childList:!0})}),()=>{T.disconnect()}},[y]),rt(()=>{p.current===d&&(n.current.length!==y.size&&(n.current.length=y.size),r&&r.current.length!==y.size&&(r.current.length=y.size),l.current=y.size),s(y)},[s,y,n,r,d]),rt(()=>()=>{n.current=[]},[n]),rt(()=>()=>{r&&(r.current=[])},[r]);const _=lt(T=>(c.add(T),()=>{c.delete(T)}));rt(()=>{c.forEach(T=>T(y))},[c,y]);const w=k.useMemo(()=>({register:g,unregister:b,subscribeMapChange:_,elementsRef:n,labelsRef:r,nextIndexRef:l}),[g,b,_,n,r,l]);return j.jsx(mz.Provider,{value:w,children:t})}function t1e(){return new Map}function n1e(){return new Set}function r1e(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const o1e=k.createContext(void 0);function l2(){return k.useContext(o1e)?.direction??"ltr"}const i1e=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:l,elements:c,middlewareData:u}=t,{element:d,padding:h=0,offsetParent:p="real"}=Us(e,t)||{};if(d==null)return{};const g=k6(h),b={x:n,y:r},y=t2(o),_=e2(y),w=await l.getDimensions(d),T=y==="y",v=T?"top":"left",E=T?"bottom":"right",S=T?"clientHeight":"clientWidth",C=s.reference[_]+s.reference[y]-b[y]-s.floating[_],x=b[y]-s.reference[y],O=p==="real"?await l.getOffsetParent?.(d):c.floating;let M=c.floating[S]||s.floating[_];(!M||!await l.isElement?.(O))&&(M=c.floating[S]||s.floating[_]);const P=C/2-x/2,z=M/2-w[_]/2-1,I=Math.min(g[v],z),q=Math.min(g[E],z),G=I,ee=M-w[_]-q,J=M/2-w[_]/2+P,Z=hx(G,J,ee),H=!u.arrow&&il(o)!=null&&J!==Z&&s.reference[_]/2-(J<G?I:q)-w[_]/2<0,Y=H?J<G?J-G:J-ee:0;return{[y]:b[y]+Y,data:{[y]:Z,centerOffset:J-Z-Y,...H&&{alignmentOffset:Y}},reset:H}}}),s1e=(e,t)=>({...i1e(e),options:[e,t]}),a1e={name:"hide",async fn(e){const{width:t,height:n,x:r,y:o}=e.rects.reference,s=t===0&&n===0&&r===0&&o===0;return{data:{referenceHidden:(await sbe().fn(e)).data?.referenceHidden||s}}}},l1e={sideX:"left",sideY:"top"};function gz(e,t,n){const r=e==="inline-start"||e==="inline-end";return{top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"}[t]}function cj(e,t,n){const{rects:r,placement:o}=e;return{side:gz(t,zo(o),n),align:il(o)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function c1e(e){const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:l=0,collisionBoundary:c,collisionPadding:u=5,sticky:d=!1,arrowPadding:h=5,disableAnchorTracking:p=!1,keepMounted:g=!1,floatingRootContext:b,mounted:y,collisionAvoidance:_,shiftCrossAxis:w=!1,nodeId:T,adaptiveOrigin:v,lazyFlip:E=!1,externalTree:S}=e,[C,x]=k.useState(null);!y&&C!==null&&x(null);const O=_.side||"flip",M=_.align||"flip",P=_.fallbackAxisSide||"end",z=typeof t=="function"?t:void 0,I=lt(z),q=z?I:t,G=Kr(t),J=l2()==="rtl",Z=C||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":J?"left":"right","inline-start":J?"right":"left"}[r],H=s==="center"?Z:`${Z}-${s}`;let Y=u;const oe=1,ne=r==="bottom"?oe:0,$=r==="top"?oe:0,V=r==="right"?oe:0,U=r==="left"?oe:0;typeof Y=="number"?Y={top:Y+ne,right:Y+U,bottom:Y+$,left:Y+V}:Y&&(Y={top:(Y.top||0)+ne,right:(Y.right||0)+U,bottom:(Y.bottom||0)+$,left:(Y.left||0)+V});const D={boundary:c==="clipping-ancestors"?"clippingAncestors":c,padding:Y},B=k.useRef(null),te=Kr(o),re=Kr(l),Me=[tbe(Tt=>{const Wt=cj(Tt,r,J),Pt=typeof te.current=="function"?te.current(Wt):te.current,Bt=typeof re.current=="function"?re.current(Wt):re.current;return{mainAxis:Pt,crossAxis:Bt,alignmentAxis:Bt}},[typeof o!="function"?o:0,typeof l!="function"?l:0,J,r])],Q=M==="none"&&O!=="shift",ie=!Q&&(d||w||O==="shift"),de=O==="none"?null:obe({...D,padding:{top:Y.top+oe,right:Y.right+oe,bottom:Y.bottom+oe,left:Y.left+oe},mainAxis:!w&&O==="flip",crossAxis:M==="flip"?"alignment":!1,fallbackAxisSideDirection:P}),_e=Q?null:nbe(Tt=>{const Wt=es(Tt.elements.floating).documentElement;return{...D,rootBoundary:w?{x:0,y:0,width:Wt.clientWidth,height:Wt.clientHeight}:void 0,mainAxis:M!=="none",crossAxis:ie,limiter:d||w?void 0:rbe(Pt=>{if(!B.current)return{};const{width:Bt,height:sn}=B.current.getBoundingClientRect(),bn=ri(zo(Pt.placement)),gt=bn==="y"?Bt:sn,Yt=bn==="y"?Y.left+Y.right:Y.top+Y.bottom;return{offset:gt/2+Yt/2}})}},[D,d,w,Y,M]);O==="shift"||M==="shift"||s==="center"?Me.push(_e,de):Me.push(de,_e),Me.push(ibe({...D,apply({elements:{floating:Tt},rects:{reference:Wt},availableWidth:Pt,availableHeight:Bt}){Object.entries({"--available-width":`${Pt}px`,"--available-height":`${Bt}px`,"--anchor-width":`${Wt.width}px`,"--anchor-height":`${Wt.height}px`}).forEach(([sn,bn])=>{Tt.style.setProperty(sn,bn)})}}),s1e(()=>({element:B.current||document.createElement("div"),padding:h,offsetParent:"floating"}),[h]),{name:"transformOrigin",fn(Tt){const{elements:Wt,middlewareData:Pt,placement:Bt,rects:sn,y:bn}=Tt,gt=zo(Bt),Yt=ri(gt),Nt=B.current,Vn=Pt.arrow?.x||0,ft=Pt.arrow?.y||0,Xt=Nt?.clientWidth||0,mn=Nt?.clientHeight||0,En=Vn+Xt/2,qn=ft+mn/2,an=Math.abs(Pt.shift?.y||0),ir=sn.reference.height/2,$t=typeof o=="function"?o(cj(Tt,r,J)):o,Ar=an>$t,sr={top:`${En}px calc(100% + ${$t}px)`,bottom:`${En}px ${-$t}px`,left:`calc(100% + ${$t}px) ${qn}px`,right:`${-$t}px ${qn}px`}[gt],to=`${En}px ${sn.reference.y+ir-bn}px`;return Wt.floating.style.setProperty("--transform-origin",ie&&Yt==="y"&&Ar?to:sr),{}}},a1e,v),rt(()=>{!y&&b&&b.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[y,b]);const Te=k.useMemo(()=>({elementResize:!p&&typeof ResizeObserver<"u",layoutShift:!p&&typeof IntersectionObserver<"u"}),[p]),{refs:we,elements:$e,x:Ze,y:ye,middlewareData:Fe,update:Re,placement:We,context:ze,isPositioned:Le,floatingStyles:Ue}=pbe({rootContext:b,placement:H,middleware:Me,strategy:n,whileElementsMounted:g?void 0:(...Tt)=>rj(...Tt,Te),nodeId:T,externalTree:S}),{sideX:dt,sideY:Ce}=Fe.adaptiveOrigin||l1e,pe=Le?n:"fixed",Ne=k.useMemo(()=>v?{position:pe,[dt]:Ze,[Ce]:ye}:{position:pe,...Ue},[v,pe,dt,Ze,Ce,ye,Ue]),Be=k.useRef(null);rt(()=>{if(!y)return;const Tt=G.current,Wt=typeof Tt=="function"?Tt():Tt,Bt=(uj(Wt)?Wt.current:Wt)||null||null;Bt!==Be.current&&(we.setPositionReference(Bt),Be.current=Bt)},[y,we,q,G]),k.useEffect(()=>{if(!y)return;const Tt=G.current;typeof Tt!="function"&&uj(Tt)&&Tt.current!==Be.current&&(we.setPositionReference(Tt.current),Be.current=Tt.current)},[y,we,q,G]),k.useEffect(()=>{if(g&&y&&$e.domReference&&$e.floating)return rj($e.domReference,$e.floating,Re,Te)},[g,y,$e,Re,Te]);const it=zo(We),vt=gz(r,it,J),bt=il(We)||"center",pt=!!Fe.hide?.referenceHidden;rt(()=>{E&&y&&Le&&x(it)},[E,y,Le,it]);const on=k.useMemo(()=>({position:"absolute",top:Fe.arrow?.y,left:Fe.arrow?.x}),[Fe.arrow]),qt=Fe.arrow?.centerOffset!==0;return k.useMemo(()=>({positionerStyles:Ne,arrowStyles:on,arrowRef:B,arrowUncentered:qt,side:vt,align:bt,physicalSide:it,anchorHidden:pt,refs:we,context:ze,isPositioned:Le,update:Re}),[Ne,on,B,qt,vt,bt,it,pt,we,ze,Le,Re])}function uj(e){return e!=null&&"current"in e}const yz=k.createContext(void 0);function c2(){const e=k.useContext(yz);if(!e)throw new Error(is(59));return e}const u1e=k.forwardRef(function(t,n){const{cutout:r,...o}=t;let s;if(r){const l=r?.getBoundingClientRect();s=`polygon(
141
- 0% 0%,
142
- 100% 0%,
143
- 100% 100%,
144
- 0% 100%,
145
- 0% 0%,
146
- ${l.left}px ${l.top}px,
147
- ${l.left}px ${l.bottom}px,
148
- ${l.right}px ${l.bottom}px,
149
- ${l.right}px ${l.top}px,
150
- ${l.left}px ${l.top}px
151
- )`}return j.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...o,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:s}})});function Uy(e,t){e&&Object.assign(e.style,t)}const vz={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},f1e={position:"fixed"},d1e=k.forwardRef(function(t,n){const{anchor:r,positionMethod:o="absolute",className:s,render:l,side:c="bottom",align:u="center",sideOffset:d=0,alignOffset:h=0,collisionBoundary:p="clipping-ancestors",collisionPadding:g,arrowPadding:b=5,sticky:y=!1,disableAnchorTracking:_,alignItemWithTrigger:w=!0,collisionAvoidance:T=mne,...v}=t,{store:E,listRef:S,labelsRef:C,alignItemWithTriggerActiveRef:x,selectedItemTextRef:O,valuesRef:M,initialValueRef:P,popupRef:z,setValue:I}=ls(),q=dz(),G=wt(E,yt.open),ee=wt(E,yt.mounted),J=wt(E,yt.modal),Z=wt(E,yt.value),H=wt(E,yt.openMethod),Y=wt(E,yt.positionerElement),oe=wt(E,yt.triggerElement),ne=wt(E,yt.isItemEqualToValue),$=k.useRef(null),V=k.useRef(null),[U,D]=k.useState(w),B=ee&&U&&H!=="touch";!ee&&U!==w&&D(w),rt(()=>{ee||(yt.scrollUpArrowVisible(E.state)&&E.set("scrollUpArrowVisible",!1),yt.scrollDownArrowVisible(E.state)&&E.set("scrollDownArrowVisible",!1))},[E,ee]),k.useImperativeHandle(x,()=>B),Jbe((B||J)&&G&&H!=="touch",oe);const te=c1e({anchor:r,floatingRootContext:q,positionMethod:o,mounted:ee,side:c,sideOffset:d,align:u,alignOffset:h,arrowPadding:b,collisionBoundary:p,collisionPadding:g,sticky:y,disableAnchorTracking:_??B,collisionAvoidance:T,keepMounted:!0}),re=B?"none":te.side,le=B?f1e:te.positionerStyles,ge=k.useMemo(()=>{const we={};return G||(we.pointerEvents="none"),{role:"presentation",hidden:!ee,style:{...le,...we}}},[G,ee,le]),Me=k.useMemo(()=>({open:G,side:re,align:te.align,anchorHidden:te.anchorHidden}),[G,re,te.align,te.anchorHidden]),Q=lt(we=>{E.set("positionerElement",we)}),ie=Nr("div",t,{ref:[n,Q],state:Me,stateAttributesMapping:pz,props:[ge,v]}),de=k.useRef(0),_e=lt(we=>{if(we.size===0&&de.current===0||M.current.length===0)return;const $e=de.current;if(de.current=we.size,we.size===$e)return;const Ze=kn(ef);if($e!==0&&!E.state.multiple&&Z!==null&&vx(M.current,Z,ne)===-1){const Fe=P.current,We=Fe!=null&&jS(M.current,Fe,ne)?Fe:null;I(We,Ze),We===null&&(E.set("selectedIndex",null),O.current=null)}if($e!==0&&E.state.multiple&&Array.isArray(Z)){const ye=Z.filter(Fe=>jS(M.current,Fe,ne));(ye.length!==Z.length||ye.some(Fe=>!jS(Z,Fe,ne)))&&(I(ye,Ze),ye.length===0&&(E.set("selectedIndex",null),O.current=null))}if(G&&B){E.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const ye={height:""};Uy(Y,ye),Uy(z.current,ye)}}),Te=k.useMemo(()=>({...te,side:re,alignItemWithTriggerActive:B,setControlledAlignItemWithTrigger:D,scrollUpArrowRef:$,scrollDownArrowRef:V}),[te,re,B,D]);return j.jsx(a2,{elementsRef:S,labelsRef:C,onMapChange:_e,children:j.jsxs(yz.Provider,{value:Te,children:[ee&&J&&j.jsx(u1e,{inert:Gbe(!G),cutout:oe}),ie]})})});function bz(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 Og="base-ui-disable-scrollbar",wx={className:Og,element:j.jsx("style",{href:Og,precedence:"base-ui:low",children:`.${Og}{scrollbar-width:none}.${Og}::-webkit-scrollbar{display:none}`})},h1e=k.createContext(void 0);function p1e(e){return k.useContext(h1e)}const Du="ArrowUp",ql="ArrowDown",xh="ArrowLeft",$u="ArrowRight",np="Home",rp="End",Sz=new Set([xh,$u]),m1e=new Set([xh,$u,np,rp]),wz=new Set([Du,ql]),g1e=new Set([Du,ql,np,rp]),xz=new Set([...Sz,...wz]),y1e=new Set([...xz,np,rp]),v1e=new Set([Du,ql,xh,$u,np,rp]),b1e="Shift",S1e="Control",w1e="Alt",x1e="Meta",_1e=new Set([b1e,S1e,w1e,x1e]);function E1e(e){return rr(e)&&e.tagName==="INPUT"}function fj(e){return!!(E1e(e)&&e.selectionStart!=null||rr(e)&&e.tagName==="TEXTAREA")}function dj(e,t,n,r){if(!e||!t||!t.scrollTo)return;let o=e.scrollLeft,s=e.scrollTop;const l=e.clientWidth<e.scrollWidth,c=e.clientHeight<e.scrollHeight;if(l&&r!=="vertical"){const u=hj(e,t,"left"),d=Ag(e),h=Ag(t);n==="ltr"&&(u+t.offsetWidth+h.scrollMarginRight>e.scrollLeft+e.clientWidth-d.scrollPaddingRight?o=u+t.offsetWidth+h.scrollMarginRight-e.clientWidth+d.scrollPaddingRight:u-h.scrollMarginLeft<e.scrollLeft+d.scrollPaddingLeft&&(o=u-h.scrollMarginLeft-d.scrollPaddingLeft)),n==="rtl"&&(u-h.scrollMarginRight<e.scrollLeft+d.scrollPaddingLeft?o=u-h.scrollMarginLeft-d.scrollPaddingLeft:u+t.offsetWidth+h.scrollMarginRight>e.scrollLeft+e.clientWidth-d.scrollPaddingRight&&(o=u+t.offsetWidth+h.scrollMarginRight-e.clientWidth+d.scrollPaddingRight))}if(c&&r!=="horizontal"){const u=hj(e,t,"top"),d=Ag(e),h=Ag(t);u-h.scrollMarginTop<e.scrollTop+d.scrollPaddingTop?s=u-h.scrollMarginTop-d.scrollPaddingTop:u+t.offsetHeight+h.scrollMarginBottom>e.scrollTop+e.clientHeight-d.scrollPaddingBottom&&(s=u+t.offsetHeight+h.scrollMarginBottom-e.clientHeight+d.scrollPaddingBottom)}e.scrollTo({left:o,top:s,behavior:"auto"})}function hj(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let o=0;for(;t.offsetParent&&(o+=t[r],t.offsetParent!==e);)t=t.offsetParent;return o}function Ag(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}}function C1e(e){return e==="starting"?hne:No}const T1e={...pz,...hz},R1e=k.forwardRef(function(t,n){const{render:r,className:o,...s}=t,{store:l,popupRef:c,onOpenChangeComplete:u,setOpen:d,valueRef:h,selectedItemTextRef:p,keyboardActiveRef:g,multiple:b,handleScrollArrowVisibility:y,scrollHandlerRef:_}=ls(),{side:w,align:T,alignItemWithTriggerActive:v,setControlledAlignItemWithTrigger:E,scrollDownArrowRef:S,scrollUpArrowRef:C}=c2(),x=p1e()!=null,O=dz(),M=Do(),P=wt(l,yt.id),z=wt(l,yt.open),I=wt(l,yt.mounted),q=wt(l,yt.popupProps),G=wt(l,yt.transitionStatus),ee=wt(l,yt.triggerElement),J=wt(l,yt.positionerElement),Z=wt(l,yt.listElement),H=k.useRef(0),Y=k.useRef(!1),oe=k.useRef(0),ne=k.useRef(!1),$=k.useRef({}),V=j0(),U=lt(re=>{if(!J||!c.current||!ne.current)return;if(Y.current||!v){y();return}const le=J.style.top==="0px",ge=J.style.bottom==="0px",Me=J.getBoundingClientRect().height,Q=es(J),ie=getComputedStyle(J),de=parseFloat(ie.marginTop),_e=parseFloat(ie.marginBottom),Te=Q.documentElement.clientHeight-de-_e,we=re.scrollTop,$e=re.scrollHeight,Ze=re.clientHeight,ye=$e-Ze;let Fe=null,Re=null,We=!1;if(le){const ze=ye-we,Le=Me+ze,Ue=Math.min(Le,Te);Fe=Ue,Ue!==Te?Re=ye:We=!0}else if(ge){const ze=we-0,Le=Me+ze,Ue=Math.min(Le,Te),dt=Le-Te;Fe=Ue,Ue!==Te?Re=0:(We=!0,we<ye&&(Re=we-(ze-dt)))}Fe!=null&&(J.style.height=`${Fe}px`),Re!=null&&(re.scrollTop=Re),We&&(Y.current=!0),y()});k.useImperativeHandle(_,()=>U,[U]),D0({open:z,ref:c,onComplete(){z&&u?.(!0)}});const D=k.useMemo(()=>({open:z,transitionStatus:G,side:w,align:T}),[z,G,w,T]);rt(()=>{!J||!c.current||Object.keys($.current).length||($.current={top:J.style.top||"0",left:J.style.left||"0",right:J.style.right,height:J.style.height,bottom:J.style.bottom,minHeight:J.style.minHeight,maxHeight:J.style.maxHeight,marginTop:J.style.marginTop,marginBottom:J.style.marginBottom})},[c,J]),rt(()=>{I||v||(ne.current=!1,Y.current=!1,H.current=0,oe.current=0,Uy(J,$.current))},[I,v,J,c]),rt(()=>{const re=c.current;if(!(!I||!ee||!J||!re)){if(!v){ne.current=!0,V.request(y);return}queueMicrotask(()=>{const le=getComputedStyle(J),ge=getComputedStyle(re),Me=es(ee),Q=Rr(J),ie=ee.getBoundingClientRect(),de=J.getBoundingClientRect(),_e=ie.left,Te=ie.height,we=Z||re,$e=we.scrollHeight,Ze=parseFloat(ge.borderBottomWidth),ye=parseFloat(le.marginTop)||10,Fe=parseFloat(le.marginBottom)||10,Re=parseFloat(le.minHeight)||100,We=5,ze=5,Le=20,Ue=Me.documentElement.clientHeight-ye-Fe,dt=Me.documentElement.clientWidth,Ce=Ue-ie.bottom+Te,pe=p.current,Ne=h.current;let Be=0,it=0;if(pe&&Ne){const gt=Ne.getBoundingClientRect(),Yt=pe.getBoundingClientRect(),Nt=gt.left-_e,Vn=Yt.left-de.left,ft=gt.top-ie.top+gt.height/2,Xt=Yt.top-de.top+Yt.height/2;Be=Nt-Vn,it=Xt-ft}const vt=Ce+it+Fe+Ze;let bt=Math.min(Ue,vt);const pt=Ue-ye-Fe,on=vt-bt,qt=Math.max(We,_e+Be),Tt=dt-ze,Wt=Math.max(0,qt+de.width-Tt);J.style.left=`${qt-Wt}px`,J.style.height=`${bt}px`,J.style.maxHeight="auto",J.style.marginTop=`${ye}px`,J.style.marginBottom=`${Fe}px`,re.style.height="100%";const Pt=we.scrollHeight-we.clientHeight,Bt=on>=Pt;Bt&&(bt=Math.min(Ue,de.height)-(on-Pt));const sn=ie.top<Le||ie.bottom>Ue-Le||bt<Math.min($e,Re),bn=(Q.visualViewport?.scale??1)!==1&&_6;if(sn||bn){ne.current=!0,Uy(J,$.current),Fs.flushSync(()=>E(!1));return}if(Bt){const gt=Math.max(0,Ue-vt);J.style.top=de.height>=pt?"0":`${gt}px`,J.style.height=`${bt}px`,we.scrollTop=we.scrollHeight-we.clientHeight,H.current=Math.max(Re,bt)}else J.style.bottom="0",H.current=Math.max(Re,bt),we.scrollTop=on;H.current===Ue&&(Y.current=!0),y(),setTimeout(()=>{ne.current=!0})})}},[l,I,J,ee,h,p,c,y,v,E,V,S,C,Z]),k.useEffect(()=>{if(!v||!J||!I)return;const re=Rr(J);function le(ge){d(!1,kn(O0e,ge))}return re.addEventListener("resize",le),()=>{re.removeEventListener("resize",le)}},[d,v,J,I]);const B={...Z?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":b||void 0,id:`${P}-list`},onKeyDown(re){g.current=!0,x&&v1e.has(re.key)&&re.stopPropagation()},onMouseMove(){g.current=!1},onPointerLeave(re){if(bz(re)||re.pointerType==="touch")return;const le=re.currentTarget;M.start(0,()=>{l.set("activeIndex",null),le.focus({preventScroll:!0})})},onScroll(re){Z||_.current?.(re.currentTarget)},...v&&{style:Z?{height:"100%"}:vz}},te=Nr("div",t,{ref:[n,c],state:D,stateAttributesMapping:T1e,props:[q,B,C1e(G),{className:!Z&&v?wx.className:void 0},s]});return j.jsxs(k.Fragment,{children:[wx.element,j.jsx(bve,{context:O,modal:!1,disabled:!I,restoreFocus:!0,children:te})]})}),O1e=k.forwardRef(function(t,n){const{className:r,render:o,...s}=t,{store:l,scrollHandlerRef:c}=ls(),{alignItemWithTriggerActive:u}=c2(),d=wt(l,yt.hasScrollArrows),h=wt(l,yt.openMethod),p=wt(l,yt.multiple),b={id:`${wt(l,yt.id)}-list`,role:"listbox","aria-multiselectable":p||void 0,onScroll(_){c.current?.(_.currentTarget)},...u&&{style:vz},className:d&&h!=="touch"?wx.className:void 0},y=lt(_=>{l.set("listElement",_)});return Nr("div",t,{ref:[n,y],props:[b,s]})});let _z=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function u2(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:o,index:s}=e,{register:l,unregister:c,subscribeMapChange:u,elementsRef:d,labelsRef:h,nextIndexRef:p}=e1e(),g=k.useRef(-1),[b,y]=k.useState(s??(o===_z.GuessFromOrder?()=>{if(g.current===-1){const T=p.current;p.current+=1,g.current=T}return g.current}:-1)),_=k.useRef(null),w=k.useCallback(T=>{if(_.current=T,b!==-1&&T!==null&&(d.current[b]=T,h)){const v=t!==void 0;h.current[b]=v?t:r?.current?.textContent??T.textContent}},[b,d,h,t,r]);return rt(()=>{if(s!=null)return;const T=_.current;if(T)return l(T,n),()=>{c(T)}},[s,l,c,n]),rt(()=>{if(s==null)return u(T=>{const v=_.current?T.get(_.current)?.index:null;v!=null&&y(v)})},[s,u,y]),k.useMemo(()=>({ref:w,index:b}),[b,w])}const Ez=k.createContext(void 0);function f2(){const e=k.useContext(Ez);if(!e)throw new Error(is(57));return e}const A1e=k.memo(k.forwardRef(function(t,n){const{render:r,className:o,value:s=null,label:l,disabled:c=!1,nativeButton:u=!1,...d}=t,h=k.useRef(null),p=u2({label:l,textRef:h,indexGuessBehavior:_z.GuessFromOrder}),{store:g,getItemProps:b,setOpen:y,setValue:_,selectionRef:w,typingRef:T,valuesRef:v,keyboardActiveRef:E,multiple:S,highlightItemOnHover:C}=ls(),x=Do(),O=wt(g,yt.isActive,p.index),M=wt(g,yt.isSelected,p.index,s),P=wt(g,yt.isSelectedByFocus,p.index),z=wt(g,yt.isItemEqualToValue),I=p.index,q=I!==-1,G=k.useRef(null),ee=Kr(I);rt(()=>{if(!q)return;const te=v.current;return te[I]=s,()=>{delete te[I]}},[q,I,s,v]),rt(()=>{if(!q)return;const te=g.state.value;let re=te;S&&Array.isArray(te)&&te.length>0&&(re=te[te.length-1]),re!==void 0&&tf(re,s,z)&&g.set("selectedIndex",I)},[q,I,S,z,g,s]);const J=k.useMemo(()=>({disabled:c,selected:M,highlighted:O}),[c,M,O]),Z=b({active:O,selected:M});Z.onFocus=void 0,Z.id=void 0;const H=k.useRef(null),Y=k.useRef("mouse"),oe=k.useRef(!1),{getButtonProps:ne,buttonRef:$}=p0({disabled:c,focusableWhenDisabled:!0,native:u});function V(te){const re=g.state.value;if(S){const le=Array.isArray(re)?re:[],ge=M?xbe(le,s,z):[...le,s];_(ge,kn(wS,te))}else _(s,kn(wS,te)),y(!1,kn(wS,te))}const U={role:"option","aria-selected":M,"aria-disabled":c||void 0,tabIndex:O?0:-1,onFocus(){g.set("activeIndex",I)},onMouseEnter(){!E.current&&g.state.selectedIndex===null&&g.set("activeIndex",I)},onMouseMove(){C&&g.set("activeIndex",I)},onMouseLeave(te){!C||E.current||bz(te)||x.start(0,()=>{g.state.activeIndex===I&&g.set("activeIndex",null)})},onTouchStart(){w.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(te){H.current=te.key,g.set("activeIndex",I)},onClick(te){oe.current=!1,!(te.type==="keydown"&&H.current===null)&&(c||H.current===" "&&T.current||Y.current!=="touch"&&!O||(H.current=null,V(te.nativeEvent)))},onPointerEnter(te){Y.current=te.pointerType},onPointerDown(te){Y.current=te.pointerType,oe.current=!0},onMouseUp(te){if(c)return;if(oe.current){oe.current=!1;return}const re=!w.current.allowSelectedMouseUp&&M,le=!w.current.allowUnselectedMouseUp&&!M;re||le||Y.current!=="touch"&&!O||V(te.nativeEvent)}},D=Nr("div",t,{ref:[$,n,p.ref,G],state:J,props:[Z,U,d,ne]}),B=k.useMemo(()=>({selected:M,indexRef:ee,textRef:h,selectedByFocus:P,hasRegistered:q}),[M,ee,h,P,q]);return j.jsx(Ez.Provider,{value:B,children:D})})),k1e=k.forwardRef(function(t,n){const r=t.keepMounted??!1,{selected:o}=f2();return r||o?j.jsx(M1e,{...t,ref:n}):null}),M1e=k.memo(k.forwardRef((e,t)=>{const{render:n,className:r,keepMounted:o,...s}=e,{selected:l}=f2(),c=k.useRef(null),{transitionStatus:u,setMounted:d}=i2(l),h=k.useMemo(()=>({selected:l,transitionStatus:u}),[l,u]),p=Nr("span",e,{ref:[t,c],state:h,props:[{"aria-hidden":!0,children:"✔️"},s],stateAttributesMapping:hz});return D0({open:l,ref:c,onComplete(){l||d(!1)}}),p})),j1e=k.memo(k.forwardRef(function(t,n){const{indexRef:r,textRef:o,selectedByFocus:s,hasRegistered:l}=f2(),{selectedItemTextRef:c}=ls(),{className:u,render:d,...h}=t,p=k.useCallback(b=>{if(!b||!l)return;const y=c.current===null||!c.current.isConnected;(s||y&&r.current===0)&&(c.current=b)},[c,r,s,l]);return Nr("div",t,{ref:[p,n,o],props:h})})),Cz=k.forwardRef(function(t,n){const{render:r,className:o,direction:s,keepMounted:l=!1,...c}=t,{store:u,popupRef:d,listRef:h,handleScrollArrowVisibility:p,scrollArrowsMountedCountRef:g}=ls(),{side:b,scrollDownArrowRef:y,scrollUpArrowRef:_}=c2(),w=s==="up"?yt.scrollUpArrowVisible:yt.scrollDownArrowVisible,T=wt(u,w),v=wt(u,yt.openMethod),E=T&&v!=="touch",S=Do(),C=s==="up"?_:y,{transitionStatus:x,setMounted:O}=i2(E);rt(()=>(g.current+=1,u.state.hasScrollArrows||u.set("hasScrollArrows",!0),()=>{g.current=Math.max(0,g.current-1),g.current===0&&u.state.hasScrollArrows&&u.set("hasScrollArrows",!1)}),[u,g]),D0({open:E,ref:C,onComplete(){E||O(!1)}});const M=k.useMemo(()=>({direction:s,visible:E,side:b,transitionStatus:x}),[s,E,b,x]),z=Nr("div",t,{ref:[n,C],state:M,props:[{"aria-hidden":!0,children:s==="up"?"▲":"▼",style:{position:"absolute"},onMouseMove(q){if(q.movementX===0&&q.movementY===0||S.isStarted())return;u.set("activeIndex",null);function G(){const ee=u.state.listElement??d.current;if(!ee)return;u.set("activeIndex",null),p();const J=ee.scrollTop===0,Z=Math.round(ee.scrollTop+ee.clientHeight)>=ee.scrollHeight;if(h.current.length===0&&(s==="up"?u.set("scrollUpArrowVisible",!J):u.set("scrollDownArrowVisible",!Z)),s==="up"&&J||s==="down"&&Z){S.clear();return}if((u.state.listElement||d.current)&&h.current&&h.current.length>0){const Y=h.current,oe=C.current?.offsetHeight||0;if(s==="up"){let ne=0;const $=ee.scrollTop+oe;for(let U=0;U<Y.length;U+=1){const D=Y[U];if(D&&D.offsetTop>=$){ne=U;break}}const V=Math.max(0,ne-1);if(V<ne){const U=Y[V];U&&(ee.scrollTop=Math.max(0,U.offsetTop-oe))}else ee.scrollTop=0}else{let ne=Y.length-1;const $=ee.scrollTop+ee.clientHeight-oe;for(let U=0;U<Y.length;U+=1){const D=Y[U];if(D&&D.offsetTop+D.offsetHeight>$){ne=Math.max(0,U-1);break}}const V=Math.min(Y.length-1,ne+1);if(V>ne){const U=Y[V];U&&(ee.scrollTop=U.offsetTop+U.offsetHeight-ee.clientHeight+oe)}else ee.scrollTop=ee.scrollHeight-ee.clientHeight}}S.start(40,G)}S.start(40,G)},onMouseLeave(){S.clear()}},c]});return E||l?z:null}),P1e=k.forwardRef(function(t,n){return j.jsx(Cz,{...t,ref:n,direction:"down"})}),N1e=k.forwardRef(function(t,n){return j.jsx(Cz,{...t,ref:n,direction:"up"})}),D1e=k.createContext(void 0),$1e=k.forwardRef(function(t,n){const{className:r,render:o,...s}=t,[l,c]=k.useState(),u=k.useMemo(()=>({labelId:l,setLabelId:c}),[l,c]),d=Nr("div",t,{ref:n,props:[{role:"group","aria-labelledby":l},s]});return j.jsx(D1e.Provider,{value:u,children:d})}),I1e=Abe;function z1e({className:e,...t}){return j.jsx($1e,{"data-slot":"select-group",className:pn("scroll-my-1",e),...t})}function L1e({className:e,...t}){return j.jsx(qbe,{"data-slot":"select-value",className:pn("flex flex-1 text-left",e),...t})}function F1e({className:e,size:t="default",children:n,...r}){return j.jsxs(Ube,{"data-slot":"select-trigger","data-size":t,className:pn("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),...r,children:[n,j.jsx(Bbe,{render:j.jsx(CN,{className:"text-muted-foreground size-4 pointer-events-none"})})]})}function U1e({className:e,children:t,side:n="bottom",sideOffset:r=4,align:o="center",alignOffset:s=0,alignItemWithTrigger:l=!0,...c}){return j.jsx(Kbe,{children:j.jsx(d1e,{side:n,sideOffset:r,align:o,alignOffset:s,alignItemWithTrigger:l,className:"isolate z-50",children:j.jsxs(R1e,{"data-slot":"select-content",className:pn("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),...c,children:[j.jsx(V1e,{}),j.jsx(O1e,{children:t}),j.jsx(q1e,{})]})})})}function kg({className:e,children:t,...n}){return j.jsxs(A1e,{"data-slot":"select-item",className:pn("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),...n,children:[j.jsx(j1e,{className:"flex flex-1 gap-2 shrink-0 whitespace-nowrap",children:t}),j.jsx(k1e,{render:j.jsx("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center"}),children:j.jsx(xte,{className:"pointer-events-none"})})]})}function V1e({className:e,...t}){return j.jsx(N1e,{"data-slot":"select-scroll-up-button",className:pn("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:j.jsx(Cte,{})})}function q1e({className:e,...t}){return j.jsx(P1e,{"data-slot":"select-scroll-down-button",className:pn("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:j.jsx(CN,{})})}const Tz=k.createContext(void 0);function d2(){const e=k.useContext(Tz);if(e===void 0)throw new Error(is(64));return e}let B1e=(function(e){return e.activationDirection="data-activation-direction",e.orientation="data-orientation",e})({});const h2={tabActivationDirection:e=>({[B1e.activationDirection]:e})},H1e=k.forwardRef(function(t,n){const{className:r,defaultValue:o=0,onValueChange:s,orientation:l="horizontal",render:c,value:u,...d}=t,h=l2(),p=Object.hasOwn(t,"defaultValue"),g=k.useRef([]),[b,y]=k.useState(()=>new Map),[_,w]=Dy({controlled:u,default:o,name:"Tabs",state:"value"}),T=u!==void 0,[v,E]=k.useState(()=>new Map),[S,C]=k.useState("none"),x=lt((H,Y)=>{s?.(H,Y),!Y.isCanceled&&(w(H),C(Y.activationDirection))}),O=lt((H,Y)=>{y(oe=>{if(oe.get(H)===Y)return oe;const ne=new Map(oe);return ne.set(H,Y),ne})}),M=lt((H,Y)=>{y(oe=>{if(!oe.has(H)||oe.get(H)!==Y)return oe;const ne=new Map(oe);return ne.delete(H),ne})}),P=k.useCallback(H=>b.get(H),[b]),z=k.useCallback(H=>{for(const Y of v.values())if(H===Y?.value)return Y?.id},[v]),I=k.useCallback(H=>{if(H===void 0)return null;for(const[Y,oe]of v.entries())if(oe!=null&&H===(oe.value??oe.index))return Y;return null},[v]),q=k.useMemo(()=>({direction:h,getTabElementBySelectedValue:I,getTabIdByPanelValue:z,getTabPanelIdByValue:P,onValueChange:x,orientation:l,registerMountedTabPanel:O,setTabMap:E,unregisterMountedTabPanel:M,tabActivationDirection:S,value:_}),[h,I,z,P,x,l,O,E,M,S,_]),G=k.useMemo(()=>{for(const H of v.values())if(H!=null&&H.value===_)return H},[v,_]),ee=k.useMemo(()=>{for(const H of v.values())if(H!=null&&!H.disabled)return H.value},[v]);rt(()=>{if(T||v.size===0)return;const H=G?.disabled,Y=G==null&&_!==null;if(p&&H&&_===o||!H&&!Y)return;const ne=ee??null;_!==ne&&(w(ne),C("none"))},[o,ee,p,T,G,C,w,v,_]);const Z=Nr("div",t,{state:{orientation:l,tabActivationDirection:S},ref:n,props:d,stateAttributesMapping:h2});return j.jsx(Tz.Provider,{value:q,children:j.jsx(a2,{elementsRef:g,children:Z})})}),Rz="data-composite-item-active";function K1e(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=kN(),{ref:o,index:s}=u2(e),l=n===s,c=k.useRef(null),u=Ha(o,c);return{compositeProps:k.useMemo(()=>({tabIndex:l?0:-1,onFocus(){r(s)},onMouseMove(){const h=c.current;if(!t||!h)return;const p=h.hasAttribute("disabled")||h.ariaDisabled==="true";!l&&!p&&h.focus()}}),[l,r,s,t]),compositeRef:u,index:s}}const Oz=k.createContext(void 0);function G1e(){const e=k.useContext(Oz);if(e===void 0)throw new Error(is(65));return e}const Z1e=k.forwardRef(function(t,n){const{className:r,disabled:o=!1,render:s,value:l,id:c,nativeButton:u=!0,...d}=t,{value:h,getTabPanelIdByValue:p,orientation:g}=d2(),{activateOnFocus:b,highlightedTabIndex:y,onTabActivation:_,setHighlightedTabIndex:w,tabsListElement:T}=G1e(),v=XE(c),E=k.useMemo(()=>({disabled:o,id:v,value:l}),[o,v,l]),{compositeProps:S,compositeRef:C,index:x}=K1e({metadata:E}),O=l===h,M=k.useRef(!1);rt(()=>{if(M.current){M.current=!1;return}if(!(O&&x>-1&&y!==x))return;const oe=T;if(oe!=null){const ne=Ps(es(oe));if(ne&&Hn(oe,ne))return}o||w(x)},[O,x,y,w,o,T]);const{getButtonProps:P,buttonRef:z}=p0({disabled:o,native:u,focusableWhenDisabled:!0}),I=p(l),q=k.useRef(!1),G=k.useRef(!1);function ee(oe){O||o||_(l,kn(ef,oe.nativeEvent,void 0,{activationDirection:"none"}))}function J(oe){O||(x>-1&&!o&&w(x),!o&&b&&(!q.current||q.current&&G.current)&&_(l,kn(ef,oe.nativeEvent,void 0,{activationDirection:"none"})))}function Z(oe){if(O||o)return;q.current=!0;function ne(){q.current=!1,G.current=!1}(!oe.button||oe.button===0)&&(G.current=!0,es(oe.currentTarget).addEventListener("pointerup",ne,{once:!0}))}const H=k.useMemo(()=>({disabled:o,active:O,orientation:g}),[o,O,g]);return Nr("button",t,{state:H,ref:[n,z,C],props:[S,{role:"tab","aria-controls":I,"aria-selected":O,id:v,onClick:ee,onFocus:J,onPointerDown:Z,[Rz]:O?"":void 0,onKeyDownCapture(){M.current=!0}},d,P]})});let W1e=(function(e){return e.index="data-index",e.activationDirection="data-activation-direction",e.orientation="data-orientation",e.hidden="data-hidden",e})({});const Y1e=k.forwardRef(function(t,n){const{className:r,value:o,render:s,keepMounted:l=!1,...c}=t,{value:u,getTabIdByPanelValue:d,orientation:h,tabActivationDirection:p,registerMountedTabPanel:g,unregisterMountedTabPanel:b}=d2(),y=XE(),_=k.useMemo(()=>({id:y,value:o}),[y,o]),{ref:w,index:T}=u2({metadata:_}),v=o!==u,E=d(o),S=k.useMemo(()=>({hidden:v,orientation:h,tabActivationDirection:p}),[v,h,p]),C=Nr("div",t,{state:S,ref:[n,w],props:[{"aria-labelledby":E,hidden:v,id:y??void 0,role:"tabpanel",tabIndex:v?-1:0,[W1e.index]:T},c],stateAttributesMapping:h2});return rt(()=>{if(!(v&&!l)&&y!=null)return g(o,y),()=>{b(o,y)}},[v,l,o,y,g,b]),!v||l?C:null});function X1e(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}const Q1e=[];function J1e(e){const{itemSizes:t,cols:n=1,loopFocus:r=!0,dense:o=!1,orientation:s="both",direction:l,highlightedIndex:c,onHighlightedIndexChange:u,rootRef:d,enableHomeAndEndKeys:h=!1,stopEventPropagation:p=!1,disabledIndices:g,modifierKeys:b=Q1e}=e,[y,_]=k.useState(0),w=n>1,T=k.useRef(null),v=Ha(T,d),E=k.useRef([]),S=k.useRef(!1),C=c??y,x=lt((P,z=!1)=>{if((u??_)(P),z){const I=E.current[P];dj(T.current,I,l,s)}}),O=lt(P=>{if(P.size===0||S.current)return;S.current=!0;const z=Array.from(P.keys()),I=z.find(G=>G?.hasAttribute(Rz))??null,q=I?z.indexOf(I):-1;q!==-1&&x(q),dj(T.current,I,l,s)}),M=k.useMemo(()=>({"aria-orientation":s==="both"?void 0:s,ref:v,onFocus(P){!T.current||!fj(P.target)||P.target.setSelectionRange(0,P.target.value.length??0)},onKeyDown(P){const z=h?y1e:xz;if(!z.has(P.key)||eSe(P,b)||!T.current)return;const q=l==="rtl",G=q?xh:$u,ee={horizontal:G,vertical:ql,both:G}[s],J=q?$u:xh,Z={horizontal:J,vertical:Du,both:J}[s];if(fj(P.target)&&!X1e(P.target)){const U=P.target.selectionStart,D=P.target.selectionEnd,B=P.target.value??"";if(U==null||P.shiftKey||U!==D||P.key!==Z&&U<B.length||P.key!==ee&&U>0)return}let H=C;const Y=Zg(E,g),oe=mx(E,g);if(w){const U=t||Array.from({length:E.current.length},()=>({width:1,height:1})),D=j6(U,n,o),B=D.findIndex(re=>re!=null&&!Fa(E,re,g)),te=D.reduce((re,le,ge)=>le!=null&&!Fa(E,le,g)?ge:re,-1);H=D[M6({current:D.map(re=>re?E.current[re]:null)},{event:P,orientation:s,loopFocus:r,cols:n,disabledIndices:N6([...g||E.current.map((re,le)=>Fa(E,le)?le:void 0),void 0],D),minIndex:B,maxIndex:te,prevIndex:P6(C>oe?Y:C,U,D,n,P.key===ql?"bl":P.key===$u?"tr":"tl"),rtl:q})]}const ne={horizontal:[G],vertical:[ql],both:[G,ql]}[s],$={horizontal:[J],vertical:[Du],both:[J,Du]}[s],V=w?z:{horizontal:h?m1e:Sz,vertical:h?g1e:wz,both:z}[s];h&&(P.key===np?H=Y:P.key===rp&&(H=oe)),H===C&&(ne.includes(P.key)||$.includes(P.key))&&(r&&H===oe&&ne.includes(P.key)?H=Y:r&&H===Y&&$.includes(P.key)?H=oe:H=qr(E,{startingIndex:H,decrement:$.includes(P.key),disabledIndices:g})),H!==C&&!Mu(E,H)&&(p&&P.stopPropagation(),V.has(P.key)&&P.preventDefault(),x(H,!0),queueMicrotask(()=>{E.current[H]?.focus()}))}}),[n,o,l,g,E,h,C,w,t,r,v,b,x,s,p]);return k.useMemo(()=>({props:M,highlightedIndex:C,onHighlightedIndexChange:x,elementsRef:E,disabledIndices:g,onMapChange:O,relayKeyboardEvent:M.onKeyDown}),[M,C,x,E,g,O])}function eSe(e,t){for(const n of _1e.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function tSe(e){const{render:t,className:n,refs:r=Bu,props:o=Bu,state:s=No,stateAttributesMapping:l,highlightedIndex:c,onHighlightedIndexChange:u,orientation:d,dense:h,itemSizes:p,loopFocus:g,cols:b,enableHomeAndEndKeys:y,onMapChange:_,stopEventPropagation:w=!0,rootRef:T,disabledIndices:v,modifierKeys:E,highlightItemOnHover:S=!1,tag:C="div",...x}=e,O=l2(),{props:M,highlightedIndex:P,onHighlightedIndexChange:z,elementsRef:I,onMapChange:q,relayKeyboardEvent:G}=J1e({itemSizes:p,cols:b,loopFocus:g,dense:h,orientation:d,highlightedIndex:c,onHighlightedIndexChange:u,rootRef:T,stopEventPropagation:w,enableHomeAndEndKeys:y,direction:O,disabledIndices:v,modifierKeys:E}),ee=Nr(C,e,{state:s,ref:r,props:[M,...o,x],stateAttributesMapping:l}),J=k.useMemo(()=>({highlightedIndex:P,onHighlightedIndexChange:z,highlightItemOnHover:S,relayKeyboardEvent:G}),[P,z,S,G]);return j.jsx(AN.Provider,{value:J,children:j.jsx(a2,{elementsRef:I,onMapChange:Z=>{_?.(Z),q(Z)},children:ee})})}const nSe=k.forwardRef(function(t,n){const{activateOnFocus:r=!1,className:o,loopFocus:s=!0,render:l,...c}=t,{getTabElementBySelectedValue:u,onValueChange:d,orientation:h,value:p,setTabMap:g,tabActivationDirection:b}=d2(),[y,_]=k.useState(0),[w,T]=k.useState(null),v=rSe(p,h,w,u),E=lt((O,M)=>{if(O!==p){const P=v(O);M.activationDirection=P,d(O,M)}}),S=k.useMemo(()=>({orientation:h,tabActivationDirection:b}),[h,b]),C={"aria-orientation":h==="vertical"?"vertical":void 0,role:"tablist"},x=k.useMemo(()=>({activateOnFocus:r,highlightedTabIndex:y,onTabActivation:E,setHighlightedTabIndex:_,tabsListElement:w,value:p}),[r,y,E,_,w,p]);return j.jsx(Oz.Provider,{value:x,children:j.jsx(tSe,{render:l,className:o,state:S,refs:[n,T],props:[C,c],stateAttributesMapping:h2,highlightedIndex:y,enableHomeAndEndKeys:!0,loopFocus:s,orientation:h,onHighlightedIndexChange:_,onMapChange:g,disabledIndices:Bu})})});function pj(e,t){const{left:n,top:r}=e.getBoundingClientRect(),{left:o,top:s}=t.getBoundingClientRect(),l=n-o,c=r-s;return{left:l,top:c}}function rSe(e,t,n,r){const[o,s]=k.useState(null);return rt(()=>{if(e==null||n==null){s(null);return}const l=r(e);if(l==null){s(null);return}const{left:c,top:u}=pj(l,n);s(t==="horizontal"?c:u)},[t,r,n,e]),k.useCallback(l=>{if(l===e)return"none";if(l==null)return s(null),"none";if(l!=null&&n!=null){const c=r(l);if(c!=null){const{left:u,top:d}=pj(c,n);if(o==null)return s(t==="horizontal"?u:d),"none";if(t==="horizontal"){if(u<o)return s(u),"left";if(u>o)return s(u),"right"}else{if(d<o)return s(d),"up";if(d>o)return s(d),"down"}}}return"none"},[r,t,o,n,e])}function oSe({className:e,orientation:t="horizontal",...n}){return j.jsx(H1e,{"data-slot":"tabs","data-orientation":t,className:pn("gap-2 group/tabs flex data-[orientation=horizontal]:flex-col",e),...n})}const iSe=rl("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 sSe({className:e,variant:t="default",...n}){return j.jsx(nSe,{"data-slot":"tabs-list","data-variant":t,className:pn(iSe({variant:t}),e),...n})}function mj({className:e,...t}){return j.jsx(Z1e,{"data-slot":"tabs-trigger",className:pn("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 gj({className:e,...t}){return j.jsx(Y1e,{"data-slot":"tabs-content",className:pn("text-xs/relaxed flex-1 outline-none",e),...t})}const aSe=()=>{const e=fc(),{openaiRef:t,openaiObject:n}=cf(e.name),{setToolData:r}=lf(),o=(s,l)=>{const c=t?.current?.contentWindow?.openai;c&&n&&(c[s]=l,r(e.name,{openaiObject:{...n,[s]:l}}))};return n?j.jsx("div",{className:"overflow-auto max-h-full min-h-0",children:j.jsxs(oSe,{defaultValue:"widget-state",className:"gap-0",children:[j.jsxs(sSe,{className:"border-b border-border w-full",children:[j.jsx(mj,{value:"properties",children:"Properties"}),j.jsx(mj,{value:"widget-state",children:"Widget State"})]}),j.jsx(gj,{value:"properties",className:"p-4",children:j.jsxs(Pye,{children:[j.jsxs(vS,{children:[j.jsx(bS,{children:"Display Mode"}),j.jsxs(I1e,{value:n.displayMode,onValueChange:s=>o("displayMode",s),"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:[j.jsx(F1e,{children:j.jsx(L1e,{})}),j.jsx(U1e,{children:j.jsxs(z1e,{children:[j.jsx(kg,{value:"inline",children:"Inline"}),j.jsx(kg,{value:"fullscreen",children:"Fullscreen"}),j.jsx(kg,{value:"pip",children:"Pip"}),j.jsx(kg,{value:"modal",children:"Modal"})]})})]})]}),j.jsxs(vS,{children:[j.jsx(bS,{children:"Theme"}),j.jsxs(Mye,{children:[j.jsx(lh,{variant:n.theme==="light"?"default":"outline",onClick:()=>o("theme","light"),children:j.jsx(Ite,{})}),j.jsx(lh,{variant:n.theme==="dark"?"default":"outline",onClick:()=>o("theme","dark"),children:j.jsx(Pte,{})})]})]}),j.jsxs(vS,{children:[j.jsx(bS,{children:"Locale"}),j.jsx(M0e,{value:n.locale,onChange:s=>o("locale",s.target.value)})]})]})}),j.jsx(gj,{value:"widget-state",className:"p-4",children:j.jsx(y6,{src:n.widgetState??{},name:null,quotesOnKeys:!1,displayDataTypes:!1,displayObjectSize:!1,enableClipboard:!1,theme:"rjv-default",collapsed:3,collapseStringsAfterLength:80})})]})}):null};function yj(e){return new Date(e).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3})}function lSe(e,t=60){const n=JSON.stringify(e);return n.length>t?`${n.slice(0,t)}…`:n}function cSe({log:e}){const[t,n]=k.useState(!1),r=Object.keys(e.args).length>0,o=r?lSe(e.args):null;return j.jsxs(j.Fragment,{children:[r?j.jsxs("button",{type:"button",onClick:()=>n(!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:[j.jsx("span",{className:"text-gray-600 dark:text-gray-500 shrink-0 min-w-[80px]",children:yj(e.timestamp)}),j.jsx("span",{className:pn("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}),j.jsx("span",{className:"text-gray-500 dark:text-gray-600 mr-1",children:t?"▼":"▶"}),j.jsx("span",{className:"text-gray-600 dark:text-gray-400 truncate flex-1 min-w-0",children:o})]}):j.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:[j.jsx("span",{className:"text-gray-600 dark:text-gray-500 shrink-0 min-w-[80px]",children:yj(e.timestamp)}),j.jsx("span",{className:"text-blue-600 dark:text-blue-400 font-semibold shrink-0 min-w-[120px]",children:e.command})]}),t&&r&&j.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:j.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 uSe(){const e=fc(),{setToolData:t}=lf(),{openaiLogs:n}=cf(e.name),r=k.useRef(null),o=()=>{t(e.name,{openaiLogs:[]})};return k.useEffect(()=>{const s=r.current;s&&(s.scrollTop=s.scrollHeight)},[]),j.jsxs("div",{className:"flex flex-col h-full overflow-hidden min-h-0",children:[j.jsxs("div",{className:"flex items-center justify-between mb-3 h-8 flex-none",children:[j.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-gray-200",children:"OpenAI API Logs"}),n.length>0&&j.jsxs(lh,{variant:"ghost",size:"sm",onClick:o,children:[j.jsx(Lte,{className:"w-3 h-3"}),"Clear"]})]}),j.jsx("div",{ref:r,className:"overflow-auto flex-1 bg-gray-50 rounded-lg border border-gray-200 min-h-0",children:n.map(s=>j.jsx(cSe,{log:s},s.id))})]})}const fSe=rl("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 dSe({className:e,variant:t,...n}){return j.jsx("div",{className:pn(fSe({variant:t}),e),"data-slot":"alert",role:"alert",...n})}function hSe({className:e,...t}){return j.jsx("div",{className:pn("font-medium [svg~&]:col-start-2",e),"data-slot":"alert-title",...t})}function pSe({className:e,...t}){return j.jsx("div",{className:pn("flex flex-col gap-2.5 text-muted-foreground [svg~&]:col-start-2",e),"data-slot":"alert-description",...t})}const mSe=()=>{const e=fc(),t=cf(e.name);if(!t)return null;const n=()=>{const r=[];return t.response.content.forEach(o=>{o.type==="text"&&r.push(o.text)}),r.join(`
152
- `)};return j.jsx("div",{className:"flex flex-col h-full overflow-hidden bg-card",children:j.jsx("div",{className:"p-4 overflow-auto",children:t.response?t.response.isError?j.jsxs(dSe,{variant:"error",children:[j.jsx(Rte,{}),j.jsx(hSe,{children:"Error"}),j.jsx(pSe,{children:n()})]}):j.jsx("div",{className:"text-xs",children:j.jsx(y6,{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})})},Az="openai:set_globals";class gSe extends CustomEvent{type=Az}var vj;(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"})(vj||(vj={}));class ySe{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(t,n){this.keyToValue.set(t,n),this.valueToKey.set(n,t)}getByKey(t){return this.keyToValue.get(t)}getByValue(t){return this.valueToKey.get(t)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}}class kz{constructor(t){this.generateIdentifier=t,this.kv=new ySe}register(t,n){this.kv.getByValue(t)||(n||(n=this.generateIdentifier(t)),this.kv.set(n,t))}clear(){this.kv.clear()}getIdentifier(t){return this.kv.getByValue(t)}getValue(t){return this.kv.getByKey(t)}}class vSe extends kz{constructor(){super(t=>t.name),this.classToAllowedProps=new Map}register(t,n){typeof n=="object"?(n.allowProps&&this.classToAllowedProps.set(t,n.allowProps),super.register(t,n.identifier)):super.register(t,n)}getAllowedProps(t){return this.classToAllowedProps.get(t)}}function bSe(e){if("values"in Object)return Object.values(e);const t=[];for(const n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t}function SSe(e,t){const n=bSe(e);if("find"in n)return n.find(t);const r=n;for(let o=0;o<r.length;o++){const s=r[o];if(t(s))return s}}function nf(e,t){Object.entries(e).forEach(([n,r])=>t(r,n))}function Xg(e,t){return e.indexOf(t)!==-1}function bj(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(t(r))return r}}class wSe{constructor(){this.transfomers={}}register(t){this.transfomers[t.name]=t}findApplicable(t){return SSe(this.transfomers,n=>n.isApplicable(t))}findByName(t){return this.transfomers[t]}}const xSe=e=>Object.prototype.toString.call(e).slice(8,-1),Mz=e=>typeof e>"u",_Se=e=>e===null,_h=e=>typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,xx=e=>_h(e)&&Object.keys(e).length===0,Xa=e=>Array.isArray(e),ESe=e=>typeof e=="string",CSe=e=>typeof e=="number"&&!isNaN(e),TSe=e=>typeof e=="boolean",RSe=e=>e instanceof RegExp,Eh=e=>e instanceof Map,Ch=e=>e instanceof Set,jz=e=>xSe(e)==="Symbol",OSe=e=>e instanceof Date&&!isNaN(e.valueOf()),Pz=e=>e instanceof Error,Sj=e=>typeof e=="number"&&isNaN(e),ASe=e=>TSe(e)||_Se(e)||Mz(e)||CSe(e)||ESe(e)||jz(e),kSe=e=>typeof e=="bigint",MSe=e=>e===1/0||e===-1/0,jSe=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),PSe=e=>e instanceof URL,_x=e=>e.replace(/\\/g,"\\\\").replace(/\./g,"\\."),PS=e=>e.map(String).map(_x).join("."),Yd=(e,t)=>{const n=[];let r="";for(let s=0;s<e.length;s++){let l=e.charAt(s);if(!t&&l==="\\"){const d=e.charAt(s+1);if(d==="\\"){r+="\\",s++;continue}else if(d!==".")throw Error("invalid path")}if(l==="\\"&&e.charAt(s+1)==="."){r+=".",s++;continue}if(l==="."){n.push(r),r="";continue}r+=l}const o=r;return n.push(o),n};function $i(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}const Nz=[$i(Mz,"undefined",()=>null,()=>{}),$i(kSe,"bigint",e=>e.toString(),e=>typeof BigInt<"u"?BigInt(e):(console.error("Please add a BigInt polyfill."),e)),$i(OSe,"Date",e=>e.toISOString(),e=>new Date(e)),$i(Pz,"Error",(e,t)=>{const n={name:e.name,message:e.message};return"cause"in e&&(n.cause=e.cause),t.allowedErrorProps.forEach(r=>{n[r]=e[r]}),n},(e,t)=>{const n=new Error(e.message,{cause:e.cause});return n.name=e.name,n.stack=e.stack,t.allowedErrorProps.forEach(r=>{n[r]=e[r]}),n}),$i(RSe,"regexp",e=>""+e,e=>{const t=e.slice(1,e.lastIndexOf("/")),n=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,n)}),$i(Ch,"set",e=>[...e.values()],e=>new Set(e)),$i(Eh,"map",e=>[...e.entries()],e=>new Map(e)),$i(e=>Sj(e)||MSe(e),"number",e=>Sj(e)?"NaN":e>0?"Infinity":"-Infinity",Number),$i(e=>e===0&&1/e===-1/0,"number",()=>"-0",Number),$i(PSe,"URL",e=>e.toString(),e=>new URL(e))];function I0(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}const Dz=I0((e,t)=>jz(e)?!!t.symbolRegistry.getIdentifier(e):!1,(e,t)=>["symbol",t.symbolRegistry.getIdentifier(e)],e=>e.description,(e,t,n)=>{const r=n.symbolRegistry.getValue(t[1]);if(!r)throw new Error("Trying to deserialize unknown symbol");return r}),NSe=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),$z=I0(jSe,e=>["typed-array",e.constructor.name],e=>[...e],(e,t)=>{const n=NSe[t[1]];if(!n)throw new Error("Trying to deserialize unknown typed array");return new n(e)});function Iz(e,t){return e?.constructor?!!t.classRegistry.getIdentifier(e.constructor):!1}const zz=I0(Iz,(e,t)=>["class",t.classRegistry.getIdentifier(e.constructor)],(e,t)=>{const n=t.classRegistry.getAllowedProps(e.constructor);if(!n)return{...e};const r={};return n.forEach(o=>{r[o]=e[o]}),r},(e,t,n)=>{const r=n.classRegistry.getValue(t[1]);if(!r)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(r.prototype),e)}),Lz=I0((e,t)=>!!t.customTransformerRegistry.findApplicable(e),(e,t)=>["custom",t.customTransformerRegistry.findApplicable(e).name],(e,t)=>t.customTransformerRegistry.findApplicable(e).serialize(e),(e,t,n)=>{const r=n.customTransformerRegistry.findByName(t[1]);if(!r)throw new Error("Trying to deserialize unknown custom value");return r.deserialize(e)}),DSe=[zz,Dz,Lz,$z],wj=(e,t)=>{const n=bj(DSe,o=>o.isApplicable(e,t));if(n)return{value:n.transform(e,t),type:n.annotation(e,t)};const r=bj(Nz,o=>o.isApplicable(e,t));if(r)return{value:r.transform(e,t),type:r.annotation}},Fz={};Nz.forEach(e=>{Fz[e.annotation]=e});const $Se=(e,t,n)=>{if(Xa(t))switch(t[0]){case"symbol":return Dz.untransform(e,t,n);case"class":return zz.untransform(e,t,n);case"custom":return Lz.untransform(e,t,n);case"typed-array":return $z.untransform(e,t,n);default:throw new Error("Unknown transformation: "+t)}else{const r=Fz[t];if(!r)throw new Error("Unknown transformation: "+t);return r.untransform(e,n)}},Eu=(e,t)=>{if(t>e.size)throw new Error("index out of bounds");const n=e.keys();for(;t>0;)n.next(),t--;return n.next().value};function Uz(e){if(Xg(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(Xg(e,"prototype"))throw new Error("prototype is not allowed as a property");if(Xg(e,"constructor"))throw new Error("constructor is not allowed as a property")}const ISe=(e,t)=>{Uz(t);for(let n=0;n<t.length;n++){const r=t[n];if(Ch(e))e=Eu(e,+r);else if(Eh(e)){const o=+r,s=+t[++n]==0?"key":"value",l=Eu(e,o);switch(s){case"key":e=l;break;case"value":e=e.get(l);break}}else e=e[r]}return e},Ex=(e,t,n)=>{if(Uz(t),t.length===0)return n(e);let r=e;for(let s=0;s<t.length-1;s++){const l=t[s];if(Xa(r)){const c=+l;r=r[c]}else if(_h(r))r=r[l];else if(Ch(r)){const c=+l;r=Eu(r,c)}else if(Eh(r)){if(s===t.length-2)break;const u=+l,d=+t[++s]==0?"key":"value",h=Eu(r,u);switch(d){case"key":r=h;break;case"value":r=r.get(h);break}}}const o=t[t.length-1];if(Xa(r)?r[+o]=n(r[+o]):_h(r)&&(r[o]=n(r[o])),Ch(r)){const s=Eu(r,+o),l=n(s);s!==l&&(r.delete(s),r.add(l))}if(Eh(r)){const s=+t[t.length-2],l=Eu(r,s);switch(+o==0?"key":"value"){case"key":{const u=n(l);r.set(u,r.get(l)),u!==l&&r.delete(l);break}case"value":{r.set(l,n(r.get(l)));break}}}return e},Vz=e=>e<1;function Cx(e,t,n,r=[]){if(!e)return;const o=Vz(n);if(!Xa(e)){nf(e,(c,u)=>Cx(c,t,n,[...r,...Yd(u,o)]));return}const[s,l]=e;l&&nf(l,(c,u)=>{Cx(c,t,n,[...r,...Yd(u,o)])}),t(s,r)}function zSe(e,t,n,r){return Cx(t,(o,s)=>{e=Ex(e,s,l=>$Se(l,o,r))},n),e}function LSe(e,t,n){const r=Vz(n);function o(s,l){const c=ISe(e,Yd(l,r));s.map(u=>Yd(u,r)).forEach(u=>{e=Ex(e,u,()=>c)})}if(Xa(t)){const[s,l]=t;s.forEach(c=>{e=Ex(e,Yd(c,r),()=>e)}),l&&nf(l,o)}else nf(t,o);return e}const FSe=(e,t)=>_h(e)||Xa(e)||Eh(e)||Ch(e)||Pz(e)||Iz(e,t);function USe(e,t,n){const r=n.get(e);r?r.push(t):n.set(e,[t])}function VSe(e,t){const n={};let r;return e.forEach(o=>{if(o.length<=1)return;t||(o=o.map(c=>c.map(String)).sort((c,u)=>c.length-u.length));const[s,...l]=o;s.length===0?r=l.map(PS):n[PS(s)]=l.map(PS)}),r?xx(n)?[r]:[r,n]:xx(n)?void 0:n}const qz=(e,t,n,r,o=[],s=[],l=new Map)=>{const c=ASe(e);if(!c){USe(e,o,t);const b=l.get(e);if(b)return r?{transformedValue:null}:b}if(!FSe(e,n)){const b=wj(e,n),y=b?{transformedValue:b.value,annotations:[b.type]}:{transformedValue:e};return c||l.set(e,y),y}if(Xg(s,e))return{transformedValue:null};const u=wj(e,n),d=u?.value??e,h=Xa(d)?[]:{},p={};nf(d,(b,y)=>{if(y==="__proto__"||y==="constructor"||y==="prototype")throw new Error(`Detected property ${y}. This is a prototype pollution risk, please remove it from your object.`);const _=qz(b,t,n,r,[...o,y],[...s,e],l);h[y]=_.transformedValue,Xa(_.annotations)?p[_x(y)]=_.annotations:_h(_.annotations)&&nf(_.annotations,(w,T)=>{p[_x(y)+"."+T]=w})});const g=xx(p)?{transformedValue:h,annotations:u?[u.type]:void 0}:{transformedValue:h,annotations:u?[u.type,p]:p};return c||l.set(e,g),g};function Bz(e){return Object.prototype.toString.call(e).slice(8,-1)}function xj(e){return Bz(e)==="Array"}function qSe(e){if(Bz(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function BSe(e,t,n,r,o){const s={}.propertyIsEnumerable.call(r,t)?"enumerable":"nonenumerable";s==="enumerable"&&(e[t]=n),o&&s==="nonenumerable"&&Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}function Tx(e,t={}){if(xj(e))return e.map(o=>Tx(o,t));if(!qSe(e))return e;const n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertySymbols(e);return[...n,...r].reduce((o,s)=>{if(s==="__proto__"||xj(t.props)&&!t.props.includes(s))return o;const l=e[s],c=Tx(l,t);return BSe(o,s,c,e,t.nonenumerable),o},{})}class Mn{constructor({dedupe:t=!1}={}){this.classRegistry=new vSe,this.symbolRegistry=new kz(n=>n.description??""),this.customTransformerRegistry=new wSe,this.allowedErrorProps=[],this.dedupe=t}serialize(t){const n=new Map,r=qz(t,n,this,this.dedupe),o={json:r.transformedValue};r.annotations&&(o.meta={...o.meta,values:r.annotations});const s=VSe(n,this.dedupe);return s&&(o.meta={...o.meta,referentialEqualities:s}),o.meta&&(o.meta.v=1),o}deserialize(t,n){const{json:r,meta:o}=t;let s=n?.inPlace?r:Tx(r);return o?.values&&(s=zSe(s,o.values,o.v??0,this)),o?.referentialEqualities&&(s=LSe(s,o.referentialEqualities,o.v??0)),s}stringify(t){return JSON.stringify(this.serialize(t))}parse(t){return this.deserialize(JSON.parse(t),{inPlace:!0})}registerClass(t,n){this.classRegistry.register(t,n)}registerSymbol(t,n){this.symbolRegistry.register(t,n)}registerCustom(t,n){this.customTransformerRegistry.register({name:n,...t})}allowErrorProps(...t){this.allowedErrorProps.push(...t)}}Mn.defaultInstance=new Mn;Mn.serialize=Mn.defaultInstance.serialize.bind(Mn.defaultInstance);Mn.deserialize=Mn.defaultInstance.deserialize.bind(Mn.defaultInstance);Mn.stringify=Mn.defaultInstance.stringify.bind(Mn.defaultInstance);Mn.parse=Mn.defaultInstance.parse.bind(Mn.defaultInstance);Mn.registerClass=Mn.defaultInstance.registerClass.bind(Mn.defaultInstance);Mn.registerSymbol=Mn.defaultInstance.registerSymbol.bind(Mn.defaultInstance);Mn.registerCustom=Mn.defaultInstance.registerCustom.bind(Mn.defaultInstance);Mn.allowErrorProps=Mn.defaultInstance.allowErrorProps.bind(Mn.defaultInstance);k.createContext(null);function HSe(e,t,n,r){return{callTool:async(s,l)=>{t("callTool",{name:s,args:l});const c=await r(s,l??{});return t("← callTool response",c,"response"),c},sendFollowUpMessage:async s=>{t("sendFollowUpMessage",s)},openExternal:s=>{t("openExternal",s)},requestDisplayMode:async s=>(t("requestDisplayMode",s),e.displayMode=s.mode,n("displayMode",s.mode),{mode:s.mode}),setWidgetState:async s=>{t("setWidgetState",s),e.widgetState=s,n("widgetState",s)},requestModal:async s=>{t("requestModal",s),e.displayMode="modal",e.view={mode:"modal"},n("displayMode","modal")},uploadFile:async s=>(t("uploadFile",{name:s.name,size:s.size}),{fileId:"123"}),getFileDownloadUrl:async s=>(t("getFileDownloadUrl",s),{downloadUrl:"https://example.com/file.pdf"})}}function KSe(e,t){const n=["theme","userAgent","locale","maxHeight","displayMode","safeArea","toolInput","toolOutput","toolResponseMetadata","view","widgetState"];return new Proxy(e||{},{set(r,o,s,l){const c=Reflect.set(r,o,s,l);if(n.includes(o)){const u=new gSe(Az,{detail:{globals:{[o]:s}}});t.dispatchEvent(u)}return c}})}function GSe(e,t,n,r,o){const s=Dh(t),l=KSe(s,e),c=HSe(l,n,r,o);RV(l,c),e.openai=l}function ZSe(e){const t=new DOMParser().parseFromString(e,"text/html"),n=t.querySelector('script[type="module"]#dev-widget-entry');if(!n)throw new Error("dev-widget-entry script not found");const r=`
153
- const waitForOpenAI = () => new Promise((resolve, reject) => {
154
- if (typeof window === "undefined") { reject(new Error("window is not available")); return; }
155
- if ("openai" in window && window.openai != null) { resolve(); return; }
156
- Object.defineProperty(window, "openai", {
157
- configurable: true,
158
- enumerable: true,
159
- get() { return undefined; },
160
- set(value) {
161
- Object.defineProperty(window, "openai", {
162
- configurable: true,
163
- enumerable: true,
164
- writable: true,
165
- value,
166
- });
167
- resolve();
168
- },
169
- });
170
- });
171
- `;return n.textContent=`
172
- ${r}
173
- await waitForOpenAI();
174
- ${n.textContent}
175
- `,t.head.innerHTML+t.body.innerHTML}const WSe=()=>{const e=fc(),{openaiObject:t}=cf(e.name),{data:n}=mte(e._meta?.["openai/outputTemplate"]),{setToolData:r,pushOpenAiLog:o,updateOpenaiObject:s}=lf(),l=k.useRef(null),c=k.useRef(null),u=k.useRef(!1),d=n.contents[0].text,h=k.useCallback(()=>{if(u.current)return;const p=l.current;!p||!p.contentWindow||!p.contentDocument||(u.current=!0,GSe(p.contentWindow,t,(g,b,y="default")=>{o(e.name,{timestamp:Date.now(),command:g,args:b,type:y})},(g,b)=>{s(e.name,g,b)},(g,b)=>df.callTool(g,b)),p.contentDocument.open(),p.contentDocument.write(ZSe(d)),p.contentDocument.close(),r(e.name,{openaiRef:l}))},[t,o,r,s,e.name,d]);return k.useEffect(()=>{h()},[h]),j.jsx("div",{ref:c,className:"relative overflow-auto",style:{width:"100%",height:"100%"},children:j.jsx("iframe",{ref:l,src:"about:blank",onLoad:h,style:{width:"100%",height:"100%",border:"none",display:"block"},sandbox:"allow-scripts allow-same-origin",title:"html-preview"})})},YSe=()=>{const e=fc(),t=cf(e.name),{defaultLayout:n,onLayoutChange:r}=Td({id:"skybridge-devtools-input-column",storage:localStorage}),{defaultLayout:o,onLayoutChange:s}=Td({id:"skybridge-devtools-widget-section",storage:localStorage}),{defaultLayout:l,onLayoutChange:c}=Td({id:"skybridge-devtools-inspector-section",storage:localStorage}),{defaultLayout:u,onLayoutChange:d}=Td({id:"skybridge-devtools-main-section",storage:localStorage}),h=!!(e._meta?.["openai/outputTemplate"]&&t?.response&&!t.response.isError);return j.jsx("div",{className:"flex-1 flex flex-col overflow-hidden relative z-10",children:j.jsxs(hu,{orientation:"vertical",className:"flex-1 overflow-hidden",defaultLayout:u,onLayoutChange:d,children:[j.jsx(wi,{id:"top-section",minSize:"30",children:j.jsxs(hu,{orientation:"horizontal",className:"flex-1 overflow-hidden",defaultLayout:n,onLayoutChange:r,children:[j.jsx(wi,{id:"input-column",minSize:"20",maxSize:"60",children:j.jsx("div",{className:"flex flex-col overflow-hidden h-full",children:j.jsx(Tye,{})})}),j.jsx(pu,{className:"w-px bg-border"}),j.jsx(wi,{id:"output-column",minSize:"30",children:j.jsx("div",{className:"flex flex-col overflow-hidden h-full",children:j.jsx(mSe,{})})})]})}),h&&j.jsxs(j.Fragment,{children:[j.jsx(pu,{className:"h-px bg-border"}),j.jsx(wi,{id:"widget-section",minSize:"20",children:j.jsxs(hu,{orientation:"horizontal",className:"flex-1 overflow-hidden bg-card",defaultLayout:l,onLayoutChange:c,children:[j.jsx(wi,{id:"widget-logs-panel",minSize:"30",children:j.jsx("div",{className:"flex flex-col h-full overflow-hidden",children:j.jsxs(hu,{orientation:"vertical",className:"flex-1 overflow-hidden",defaultLayout:o,onLayoutChange:s,children:[j.jsx(wi,{id:"widget-panel",minSize:"20",maxSize:"80",children:j.jsx("div",{className:"h-full overflow-hidden",children:j.jsx(k.Suspense,{children:j.jsx(WSe,{})})})}),j.jsx(pu,{className:"h-px bg-border"}),j.jsx(wi,{id:"logs-panel",minSize:"20",children:j.jsx("div",{className:"p-4 flex flex-col h-full min-h-0",children:j.jsx(uSe,{})})})]})})}),j.jsx(pu,{className:"w-px bg-border"}),j.jsx(wi,{id:"inspector-panel",minSize:"20",maxSize:"50",defaultSize:30,children:j.jsx("div",{className:"flex flex-col overflow-hidden h-full min-h-0",children:j.jsx("div",{className:"overflow-auto",children:j.jsx(aSe,{})})})})]})})]})]})})};function XSe(){const e=_N(),[,t]=n_(),n=D_();return j.jsx("div",{className:"h-full border-r border-border bg-card flex flex-col",children:j.jsxs("aside",{className:"h-full flex flex-col",children:[j.jsxs("div",{className:"p-4 border-b border-border h-[72px] flex flex-col justify-center",children:[j.jsx("h2",{className:"text-sm font-semibold text-foreground mb-1",children:"Tools"}),j.jsxs("p",{className:"text-xs text-muted-foreground",children:[e?.length," ",e?.length===1?"tool":"tools"]})]}),j.jsx("div",{className:"flex-1 overflow-y-auto",children:j.jsx("div",{className:"p-2",children:e?.length===0?j.jsx("div",{className:"p-4 text-center text-sm text-muted-foreground",children:"No tools available"}):j.jsx("div",{className:"space-y-1",children:e?.map(r=>{const o=r.name===n?.name;return j.jsxs("button",{type:"button",onClick:()=>t(r.name),className:pn("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",o&&"bg-accent text-accent-foreground"),children:[j.jsxs("div",{className:"pr-6 flex flex-col gap-1",children:[j.jsx("div",{className:pn("font-semibold text-sm leading-tight truncate",o&&"text-accent-foreground"),children:r.name}),r.description&&j.jsx("div",{className:pn("text-xs leading-snug text-muted-foreground","line-clamp-2",o&&"text-accent-foreground/80"),children:r.description})]}),o&&j.jsx("div",{className:"absolute top-3 right-3 w-1.5 h-1.5 rounded-full bg-primary"})]},r.name)})})})})]})})}function QSe(){const e=D_(),{defaultLayout:t,onLayoutChange:n}=Td({id:"skybridge-devtools-tools-list",storage:localStorage});return j.jsxs("div",{className:"flex h-screen w-full flex-col overflow-hidden bg-background",children:[j.jsx(cre,{}),j.jsxs(hu,{orientation:"horizontal",className:"flex-1 overflow-hidden",defaultLayout:t,onLayoutChange:n,children:[j.jsx(wi,{id:"tools-list",minSize:"15",maxSize:"40",children:j.jsx(XSe,{})}),j.jsx(pu,{className:"w-px bg-border"}),j.jsx(wi,{id:"main-content",minSize:"30",children:j.jsx("div",{className:"flex flex-1 flex-col overflow-hidden relative h-full",children:e?j.jsx(YSe,{}):j.jsx(qae,{})})})]})]})}const JSe=new TF;function ewe(){return j.jsx(RF,{client:JSe,children:j.jsx(c7,{children:j.jsx(QSe,{})})})}nF.createRoot(document.getElementById("root")).render(j.jsx(k.StrictMode,{children:j.jsx(ewe,{})}))});export default twe();