@skybridge/devtools 0.16.8 → 0.16.10
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.
- package/dist/assets/index-M_L6SSuw.js +175 -0
- package/dist/index.html +1 -1
- package/package.json +8 -8
- package/dist/assets/index-BBVfvbt6.js +0 -183
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
var VL=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var YSe=VL((Do,$o)=>{function qL(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 es(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pb={exports:{}},hd={};var UR;function BL(){if(UR)return hd;UR=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 hd.Fragment=t,hd.jsx=n,hd.jsxs=n,hd}var VR;function HL(){return VR||(VR=1,Pb.exports=BL()),Pb.exports}var j=HL(),Nb={exports:{}},St={};var qR;function KL(){if(qR)return St;qR=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,x={};function w($,q,V){this.props=$,this.context=q,this.refs=x,this.updater=V||y}w.prototype.isReactComponent={},w.prototype.setState=function($,q){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,$,q,"setState")},w.prototype.forceUpdate=function($){this.updater.enqueueForceUpdate(this,$,"forceUpdate")};function v(){}v.prototype=w.prototype;function C($,q,V){this.props=$,this.context=q,this.refs=x,this.updater=V||y}var S=C.prototype=new v;S.constructor=C,_(S,w.prototype),S.isPureReactComponent=!0;var T=Array.isArray;function E(){}var O={H:null,A:null,T:null,S:null},M=Object.prototype.hasOwnProperty;function P($,q,V){var D=V.ref;return{$$typeof:e,type:$,key:q,ref:D!==void 0?D:null,props:V}}function I($,q){return P($.type,q,$.props)}function z($){return typeof $=="object"&&$!==null&&$.$$typeof===e}function U($){var q={"=":"=0",":":"=2"};return"$"+$.replace(/[=:]/g,function(V){return q[V]})}var G=/\/+/g;function J($,q){return typeof $=="object"&&$!==null&&$.key!=null?U(""+$.key):q.toString(36)}function ee($){switch($.status){case"fulfilled":return $.value;case"rejected":throw $.reason;default:switch(typeof $.status=="string"?$.then(E,E):($.status="pending",$.then(function(q){$.status==="pending"&&($.status="fulfilled",$.value=q)},function(q){$.status==="pending"&&($.status="rejected",$.reason=q)})),$.status){case"fulfilled":return $.value;case"rejected":throw $.reason}}throw $}function Z($,q,V,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),q,V,D,B)}}if(re)return B=B($),re=D===""?"."+J($,0):D,T(B)?(V="",re!=null&&(V=re.replace(G,"$&/")+"/"),Z(B,q,V,"",function(ke){return ke})):B!=null&&(z(B)&&(B=I(B,V+(B.key==null||$&&$.key===B.key?"":(""+B.key).replace(G,"$&/")+"/")+re)),q.push(B)),1;re=0;var ae=D===""?".":D+":";if(T($))for(var ge=0;ge<$.length;ge++)D=$[ge],te=ae+J(D,ge),re+=Z(D,q,V,te,B);else if(ge=b($),typeof ge=="function")for($=ge.call($),ge=0;!(D=$.next()).done;)D=D.value,te=ae+J(D,ge++),re+=Z(D,q,V,te,B);else if(te==="object"){if(typeof $.then=="function")return Z(ee($),q,V,D,B);throw q=String($),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys($).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return re}function H($,q,V){if($==null)return $;var D=[],B=0;return Z($,D,"","",function(te){return q.call(V,te,B++)}),D}function Y($){if($._status===-1){var q=$._result;q=q(),q.then(function(V){($._status===0||$._status===-1)&&($._status=1,$._result=V)},function(V){($._status===0||$._status===-1)&&($._status=2,$._result=V)}),$._status===-1&&($._status=0,$._result=q)}if($._status===1)return $._result.default;throw $._result}var oe=typeof reportError=="function"?reportError:function($){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof $=="object"&&$!==null&&typeof $.message=="string"?String($.message):String($),error:$});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",$);return}console.error($)},ne={map:H,forEach:function($,q,V){H($,function(){q.apply(this,arguments)},V)},count:function($){var q=0;return H($,function(){q++}),q},toArray:function($){return H($,function(q){return q})||[]},only:function($){if(!z($))throw Error("React.Children.only expected to receive a single React element child.");return $}};return St.Activity=p,St.Children=ne,St.Component=w,St.Fragment=n,St.Profiler=o,St.PureComponent=C,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($,q,V){if($==null)throw Error("The argument must be a React element, but you passed "+$+".");var D=_({},$.props),B=$.key;if(q!=null)for(te in q.key!==void 0&&(B=""+q.key),q)!M.call(q,te)||te==="key"||te==="__self"||te==="__source"||te==="ref"&&q.ref===void 0||(D[te]=q[te]);var te=arguments.length-2;if(te===1)D.children=V;else if(1<te){for(var re=Array(te),ae=0;ae<te;ae++)re[ae]=arguments[ae+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($,q,V){var D,B={},te=null;if(q!=null)for(D in q.key!==void 0&&(te=""+q.key),q)M.call(q,D)&&D!=="key"&&D!=="__self"&&D!=="__source"&&(B[D]=q[D]);var re=arguments.length-2;if(re===1)B.children=V;else if(1<re){for(var ae=Array(re),ge=0;ge<re;ge++)ae[ge]=arguments[ge+2];B.children=ae}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=z,St.lazy=function($){return{$$typeof:h,_payload:{_status:-1,_result:$},_init:Y}},St.memo=function($,q){return{$$typeof:d,type:$,compare:q===void 0?null:q}},St.startTransition=function($){var q=O.T,V={};O.T=V;try{var D=$(),B=O.S;B!==null&&B(V,D),typeof D=="object"&&D!==null&&typeof D.then=="function"&&D.then(E,oe)}catch(te){oe(te)}finally{q!==null&&V.types!==null&&(q.types=V.types),O.T=q}},St.unstable_useCacheRefresh=function(){return O.H.useCacheRefresh()},St.use=function($){return O.H.use($)},St.useActionState=function($,q,V){return O.H.useActionState($,q,V)},St.useCallback=function($,q){return O.H.useCallback($,q)},St.useContext=function($){return O.H.useContext($)},St.useDebugValue=function(){},St.useDeferredValue=function($,q){return O.H.useDeferredValue($,q)},St.useEffect=function($,q){return O.H.useEffect($,q)},St.useEffectEvent=function($){return O.H.useEffectEvent($)},St.useId=function(){return O.H.useId()},St.useImperativeHandle=function($,q,V){return O.H.useImperativeHandle($,q,V)},St.useInsertionEffect=function($,q){return O.H.useInsertionEffect($,q)},St.useLayoutEffect=function($,q){return O.H.useLayoutEffect($,q)},St.useMemo=function($,q){return O.H.useMemo($,q)},St.useOptimistic=function($,q){return O.H.useOptimistic($,q)},St.useReducer=function($,q,V){return O.H.useReducer($,q,V)},St.useRef=function($){return O.H.useRef($)},St.useState=function($){return O.H.useState($)},St.useSyncExternalStore=function($,q,V){return O.H.useSyncExternalStore($,q,V)},St.useTransition=function(){return O.H.useTransition()},St.version="19.2.3",St}var BR;function nf(){return BR||(BR=1,Nb.exports=KL()),Nb.exports}var k=nf();const ko=es(k),Eh=qL({__proto__:null,default:ko},[k]);var Db={exports:{}},pd={},$b={exports:{}},Ib={};var HR;function GL(){return HR||(HR=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 q=2*(oe+1)-1,V=Z[q],D=q+1,B=Z[D];if(0>o(V,Y))D<ne&&0>o(B,V)?(Z[oe]=B,Z[D]=Y,oe=D):(Z[oe]=V,Z[q]=Y,oe=q);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,x=!1,w=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,C=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 T(Z){if(_=!1,S(Z),!y)if(n(u)!==null)y=!0,E||(E=!0,U());else{var H=n(d);H!==null&&ee(T,H.startTime-Z)}}var E=!1,O=-1,M=5,P=-1;function I(){return x?!0:!(e.unstable_now()-P<M)}function z(){if(x=!1,E){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&&I());){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&&ee(T,$.startTime-Z),H=!1}}break e}finally{p=null,g=Y,b=!1}H=void 0}}finally{H?U():E=!1}}}var U;if(typeof C=="function")U=function(){C(z)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,J=G.port2;G.port1.onmessage=z,U=function(){J.postMessage(null)}}else U=function(){w(z,0)};function ee(Z,H){O=w(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(){x=!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,ee(T,Y-oe))):(Z.sortIndex=ne,t(u,Z),y||b||(y=!0,E||(E=!0,U()))),Z},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(Z){var H=g;return function(){var Y=g;g=H;try{return Z.apply(this,arguments)}finally{g=Y}}}})(Ib)),Ib}var KR;function ZL(){return KR||(KR=1,$b.exports=GL()),$b.exports}var zb={exports:{}},Wr={};var GR;function WL(){if(GR)return Wr;GR=1;var e=nf();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 Wr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Wr.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)},Wr.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()}},Wr.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))},Wr.prefetchDNS=function(u){typeof u=="string"&&r.d.D(u)},Wr.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})}},Wr.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)},Wr.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})}},Wr.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)},Wr.requestFormReset=function(u){r.d.r(u)},Wr.unstable_batchedUpdates=function(u,d){return u(d)},Wr.useFormState=function(u,d,h){return l.H.useFormState(u,d,h)},Wr.useFormStatus=function(){return l.H.useHostTransitionStatus()},Wr.version="19.2.3",Wr}var ZR;function Sj(){if(ZR)return zb.exports;ZR=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(),zb.exports=WL(),zb.exports}var WR;function YL(){if(WR)return pd;WR=1;var e=ZL(),t=nf(),n=Sj();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"),x=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),v=Symbol.for("react.consumer"),C=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),P=Symbol.for("react.activity"),I=Symbol.for("react.memo_cache_sentinel"),z=Symbol.iterator;function U(i){return i===null||typeof i!="object"?null:(i=z&&i[z]||i["@@iterator"],typeof i=="function"?i:null)}var G=Symbol.for("react.client.reference");function J(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 w:return"Profiler";case x:return"StrictMode";case T:return"Suspense";case E:return"SuspenseList";case P:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case y:return"Portal";case C: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:J(i.type)||"Memo";case M:a=i._payload,i=i._init;try{return J(i(a))}catch{}}return null}var ee=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 q(i){0>ne||(i.current=oe[ne],oe[ne]=null,ne--)}function V(i,a){ne++,oe[ne]=i.current,i.current=a}var D=$(null),B=$(null),te=$(null),re=$(null);function ae(i,a){switch(V(te,a),V(B,i),V(D,null),a.nodeType){case 9:case 11:i=(i=a.documentElement)&&(i=i.namespaceURI)?uR(i):0;break;default:if(i=a.tagName,a=a.namespaceURI)a=uR(a),i=fR(a,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}q(D),V(D,i)}function ge(){q(D),q(B),q(te)}function ke(i){i.memoizedState!==null&&V(re,i);var a=D.current,f=fR(a,i.type);a!==f&&(V(B,i),V(D,f))}function Q(i){B.current===i&&(q(D),q(B)),re.current===i&&(q(re),cd._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 xe(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 Oe=`
|
|
6
|
+
`+se[m].replace(" at new "," at ");return i.displayName&&Oe.includes("<anonymous>")&&(Oe=Oe.replace("<anonymous>",i.displayName)),Oe}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 xe(i.type,!1);case 11:return xe(i.type.render,!1);case 1:return xe(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,He=e.unstable_IdlePriority,it=e.log,yt=e.unstable_setDisableYieldValue,bt=null,pt=null;function on(i){if(typeof it=="function"&&yt(i),pt&&typeof pt.setStrictMode=="function")try{pt.setStrictMode(bt,i)}catch{}}var Ut=Math.clz32?Math.clz32:Pt,Et=Math.log,Zt=Math.LN2;function Pt(i){return i>>>=0,i===0?32:31-(Et(i)/Zt|0)|0}var Vt=256,ln=262144,bn=4194304;function Ht(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 vt(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=Ht(m):(N&=W,N!==0?R=Ht(N):f||(f=W&~i,f!==0&&(R=Ht(f))))):(W=m&~A,W!==0?R=Ht(W):N!==0?R=Ht(N):f||(f=m&~i,f!==0&&(R=Ht(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 jn(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 Wt(i){for(var a=[],f=0;31>f;f++)a.push(i);return a}function En(i,a){i.pendingLanes|=a,a!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function pn(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 Oe=31-Ut(f),Pe=1<<Oe;W[Oe]=0,se[Oe]=-1;var Se=be[Oe];if(Se!==null)for(be[Oe]=null,Oe=0;Oe<Se.length;Oe++){var Ee=Se[Oe];Ee!==null&&(Ee.lane&=-536870913)}f&=~Pe}m!==0&&Vn(i,m,0),A!==0&&R===0&&i.tag!==0&&(i.suspendedLanes|=A&~(N&~a))}function Vn(i,a,f){i.pendingLanes|=a,i.suspendedLanes&=~a;var m=31-Ut(a);i.entangledLanes|=a,i.entanglements[m]=i.entanglements[m]|1073741824|f&261930}function sn(i,a){var f=i.entangledLanes|=a;for(i=i.entanglements;f;){var m=31-Ut(f),R=1<<m;R&a|i[m]&a&&(i[m]|=a),f&=~R}}function ur(i,a){var f=a&-a;return f=(f&42)!==0?1:qn(f),(f&(i.suspendedLanes|a))!==0?0:f}function qn(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 Yt(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:NR(i.type))}function Jr(i,a){var f=H.p;try{return H.p=i,a()}finally{H.p=f}}var Sr=Math.random().toString(36).slice(2),Xt="__reactFiber$"+Sr,Cn="__reactProps$"+Sr,Pr="__reactContainer$"+Sr,So="__reactEvents$"+Sr,ki="__reactListeners$"+Sr,wf="__reactHandles$"+Sr,ol="__reactResources$"+Sr,il="__reactMarker$"+Sr;function xf(i){delete i[Xt],delete i[Cn],delete i[So],delete i[ki],delete i[wf]}function Vs(i){var a=i[Xt];if(a)return a;for(var f=i.parentNode;f;){if(a=f[Pr]||f[Xt]){if(f=a.alternate,a.child!==null||f!==null&&f.child!==null)for(i=vR(i);i!==null;){if(f=i[Xt])return f;i=vR(i)}return a}i=f,f=i.parentNode}return null}function qs(i){if(i=i[Xt]||i[Pr]){var a=i.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return i}return null}function sl(i){var a=i.tag;if(a===5||a===26||a===27||a===6)return i.stateNode;throw Error(r(33))}function Bs(i){var a=i[ol];return a||(a=i[ol]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function fr(i){i[il]=!0}var rp=new Set,_f={};function di(i,a){Hs(i,a),Hs(i+"Capture",a)}function Hs(i,a){for(_f[i]=a,i=0;i<a.length;i++)rp.add(a[i])}var op=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]*$"),ip={},bc={};function lo(i){return ye.call(bc,i)?!0:ye.call(ip,i)?!1:op.test(i)?bc[i]=!0:(ip[i]=!0,!1)}function al(i,a,f){if(lo(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 Sc(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 Uo(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 eo(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Ef(i){var a=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function sp(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 Cf(i){if(!i._valueTracker){var a=Ef(i)?"checked":"value";i._valueTracker=sp(i,a,""+i[a])}}function Tf(i){if(!i)return!1;var a=i._valueTracker;if(!a)return!0;var f=a.getValue(),m="";return i&&(m=Ef(i)?i.checked?"true":"false":i.value),i=m,i!==f?(a.setValue(i),!0):!1}function wc(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 Rf=/[\n"\\]/g;function co(i){return i.replace(Rf,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function Ks(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=""+eo(a)):i.value!==""+eo(a)&&(i.value=""+eo(a)):N!=="submit"&&N!=="reset"||i.removeAttribute("value"),a!=null?Of(i,N,eo(a)):f!=null?Of(i,N,eo(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=""+eo(W):i.removeAttribute("name")}function ap(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)){Cf(i);return}f=f!=null?""+eo(f):"",a=a!=null?""+eo(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),Cf(i)}function Of(i,a,f){a==="number"&&wc(i.ownerDocument)===i||i.defaultValue===""+f||(i.defaultValue=""+f)}function Gs(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=""+eo(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 lp(i,a,f){if(a!=null&&(a=""+eo(a),a!==i.value&&(i.value=a),f==null)){i.defaultValue!==a&&(i.defaultValue=a);return}i.defaultValue=f!=null?""+eo(f):""}function ll(i,a,f,m){if(a==null){if(m!=null){if(f!=null)throw Error(r(92));if(ee(m)){if(1<m.length)throw Error(r(93));m=m[0]}f=m}f==null&&(f=""),a=f}f=eo(a),i.defaultValue=f,m=i.textContent,m===f&&m!==""&&m!==null&&(i.value=m),Cf(i)}function Zs(i,a){if(a){var f=i.firstChild;if(f&&f===i.lastChild&&f.nodeType===3){f.nodeValue=a;return}}i.textContent=a}var X=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 L(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||X.has(a)?a==="float"?i.cssFloat=f:i[a]=(""+f).trim():i[a]=f+"px"}function F(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&&L(i,R,m)}else for(var A in a)a.hasOwnProperty(A)&&L(i,A,a[A])}function K(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 ce=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"]]),we=/^[\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 me(i){return we.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function le(){}var Me=null;function De(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Ve=null,qe=null;function nt(i){var a=qs(i);if(a&&(i=a.stateNode)){var f=i[Cn]||null;e:switch(i=a.stateNode,a.type){case"input":if(Ks(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="'+co(""+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));Ks(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&&Tf(m)}break e;case"textarea":lp(i,f.value,f.defaultValue);break e;case"select":a=f.value,a!=null&&Gs(i,!!f.multiple,a,!1)}}}var Be=!1;function Ct(i,a,f){if(Be)return i(a,f);Be=!0;try{var m=i(a);return m}finally{if(Be=!1,(Ve!==null||qe!==null)&&(Bp(),Ve&&(a=Ve,i=qe,qe=Ve=null,nt(a),i)))for(a=0;a<i.length;a++)nt(i[a])}}function Ot(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 st=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Qt=!1;if(st)try{var wr={};Object.defineProperty(wr,"passive",{get:function(){Qt=!0}}),window.addEventListener("test",wr,wr),window.removeEventListener("test",wr,wr)}catch{Qt=!1}var cn=null,uo=null,xr=null;function Ws(){if(xr)return xr;var i,a=uo,f=a.length,m,R="value"in cn?cn.value:cn.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 xr=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 pi(){return!0}function wo(){return!1}function Nr(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)?pi:wo,this.isPropagationStopped=wo,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=pi)},stopPropagation:function(){var f=this.nativeEvent;f&&(f.stopPropagation?f.stopPropagation():typeof f.cancelBubble!="unknown"&&(f.cancelBubble=!0),this.isPropagationStopped=pi)},persist:function(){},isPersistent:pi}),a}var mi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cl=Nr(mi),gi=p({},mi,{view:0,detail:0}),Af=Nr(gi),ul,fl,dl,hl=p({},gi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:z0,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!==dl&&(dl&&i.type==="mousemove"?(ul=i.screenX-dl.screenX,fl=i.screenY-dl.screenY):fl=ul=0,dl=i),ul)},movementY:function(i){return"movementY"in i?i.movementY:fl}}),h2=Nr(hl),Uz=p({},hl,{dataTransfer:0}),Vz=Nr(Uz),qz=p({},gi,{relatedTarget:0}),I0=Nr(qz),Bz=p({},mi,{animationName:0,elapsedTime:0,pseudoElement:0}),Hz=Nr(Bz),Kz=p({},mi,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),Gz=Nr(Kz),Zz=p({},mi,{data:0}),p2=Nr(Zz),Wz={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Yz={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"},Xz={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Qz(i){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(i):(i=Xz[i])?!!a[i]:!1}function z0(){return Qz}var Jz=p({},gi,{key:function(i){if(i.key){var a=Wz[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"?Yz[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:z0,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}}),e8=Nr(Jz),t8=p({},hl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),m2=Nr(t8),n8=p({},gi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:z0}),r8=Nr(n8),o8=p({},mi,{propertyName:0,elapsedTime:0,pseudoElement:0}),i8=Nr(o8),s8=p({},hl,{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}),a8=Nr(s8),l8=p({},mi,{newState:0,oldState:0}),c8=Nr(l8),u8=[9,13,27,32],L0=st&&"CompositionEvent"in window,kf=null;st&&"documentMode"in document&&(kf=document.documentMode);var f8=st&&"TextEvent"in window&&!kf,g2=st&&(!L0||kf&&8<kf&&11>=kf),y2=" ",v2=!1;function b2(i,a){switch(i){case"keyup":return u8.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function S2(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var xc=!1;function d8(i,a){switch(i){case"compositionend":return S2(a);case"keypress":return a.which!==32?null:(v2=!0,y2);case"textInput":return i=a.data,i===y2&&v2?null:i;default:return null}}function h8(i,a){if(xc)return i==="compositionend"||!L0&&b2(i,a)?(i=Ws(),xr=uo=cn=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 g2&&a.locale!=="ko"?null:a.data;default:return null}}var p8={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 w2(i){var a=i&&i.nodeName&&i.nodeName.toLowerCase();return a==="input"?!!p8[i.type]:a==="textarea"}function x2(i,a,f,m){Ve?qe?qe.push(m):qe=[m]:Ve=m,a=Xp(a,"onChange"),0<a.length&&(f=new cl("onChange","change",null,f,m),i.push({event:f,listeners:a}))}var Mf=null,jf=null;function m8(i){oR(i,0)}function cp(i){var a=sl(i);if(Tf(a))return i}function _2(i,a){if(i==="change")return a}var E2=!1;if(st){var F0;if(st){var U0="oninput"in document;if(!U0){var C2=document.createElement("div");C2.setAttribute("oninput","return;"),U0=typeof C2.oninput=="function"}F0=U0}else F0=!1;E2=F0&&(!document.documentMode||9<document.documentMode)}function T2(){Mf&&(Mf.detachEvent("onpropertychange",R2),jf=Mf=null)}function R2(i){if(i.propertyName==="value"&&cp(jf)){var a=[];x2(a,jf,i,De(i)),Ct(m8,a)}}function g8(i,a,f){i==="focusin"?(T2(),Mf=a,jf=f,Mf.attachEvent("onpropertychange",R2)):i==="focusout"&&T2()}function y8(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return cp(jf)}function v8(i,a){if(i==="click")return cp(a)}function b8(i,a){if(i==="input"||i==="change")return cp(a)}function S8(i,a){return i===a&&(i!==0||1/i===1/a)||i!==i&&a!==a}var xo=typeof Object.is=="function"?Object.is:S8;function Pf(i,a){if(xo(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)||!xo(i[R],a[R]))return!1}return!0}function O2(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function A2(i,a){var f=O2(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=O2(f)}}function k2(i,a){return i&&a?i===a?!0:i&&i.nodeType===3?!1:a&&a.nodeType===3?k2(i,a.parentNode):"contains"in i?i.contains(a):i.compareDocumentPosition?!!(i.compareDocumentPosition(a)&16):!1:!1}function M2(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var a=wc(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=wc(i.document)}return a}function V0(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 w8=st&&"documentMode"in document&&11>=document.documentMode,_c=null,q0=null,Nf=null,B0=!1;function j2(i,a,f){var m=f.window===f?f.document:f.nodeType===9?f:f.ownerDocument;B0||_c==null||_c!==wc(m)||(m=_c,"selectionStart"in m&&V0(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}),Nf&&Pf(Nf,m)||(Nf=m,m=Xp(q0,"onSelect"),0<m.length&&(a=new cl("onSelect","select",null,a,f),i.push({event:a,listeners:m}),a.target=_c)))}function pl(i,a){var f={};return f[i.toLowerCase()]=a.toLowerCase(),f["Webkit"+i]="webkit"+a,f["Moz"+i]="moz"+a,f}var Ec={animationend:pl("Animation","AnimationEnd"),animationiteration:pl("Animation","AnimationIteration"),animationstart:pl("Animation","AnimationStart"),transitionrun:pl("Transition","TransitionRun"),transitionstart:pl("Transition","TransitionStart"),transitioncancel:pl("Transition","TransitionCancel"),transitionend:pl("Transition","TransitionEnd")},H0={},P2={};st&&(P2=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 ml(i){if(H0[i])return H0[i];if(!Ec[i])return i;var a=Ec[i],f;for(f in a)if(a.hasOwnProperty(f)&&f in P2)return H0[i]=a[f];return i}var N2=ml("animationend"),D2=ml("animationiteration"),$2=ml("animationstart"),x8=ml("transitionrun"),_8=ml("transitionstart"),E8=ml("transitioncancel"),I2=ml("transitionend"),z2=new Map,K0="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(" ");K0.push("scrollEnd");function yi(i,a){z2.set(i,a),di(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)},Vo=[],Cc=0,G0=0;function fp(){for(var i=Cc,a=G0=Cc=0;a<i;){var f=Vo[a];Vo[a++]=null;var m=Vo[a];Vo[a++]=null;var R=Vo[a];Vo[a++]=null;var A=Vo[a];if(Vo[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&&L2(f,R,A)}}function dp(i,a,f,m){Vo[Cc++]=i,Vo[Cc++]=a,Vo[Cc++]=f,Vo[Cc++]=m,G0|=m,i.lanes|=m,i=i.alternate,i!==null&&(i.lanes|=m)}function Z0(i,a,f,m){return dp(i,a,f,m),hp(i)}function gl(i,a){return dp(i,null,null,a),hp(i)}function L2(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-Ut(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<nd)throw nd=0,rb=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 C8(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 _o(i,a,f,m){return new C8(i,a,f,m)}function W0(i){return i=i.prototype,!(!i||!i.isReactComponent)}function cs(i,a){var f=i.alternate;return f===null?(f=_o(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 F2(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")W0(i)&&(N=1);else if(typeof i=="string")N=kL(i,f,D.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case P:return i=_o(31,f,a,R),i.elementType=P,i.lanes=A,i;case _:return yl(f.children,R,A,a);case x:N=8,R|=24;break;case w:return i=_o(12,f,a,R|2),i.elementType=w,i.lanes=A,i;case T:return i=_o(13,f,a,R),i.elementType=T,i.lanes=A,i;case E:return i=_o(19,f,a,R),i.elementType=E,i.lanes=A,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case C: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=_o(N,f,a,R),a.elementType=i,a.type=m,a.lanes=A,a}function yl(i,a,f,m){return i=_o(7,i,m,a),i.lanes=f,i}function Y0(i,a,f){return i=_o(6,i,null,a),i.lanes=f,i}function U2(i){var a=_o(18,null,null,0);return a.stateNode=i,a}function X0(i,a,f){return a=_o(4,i.children!==null?i.children:[],i.key,a),a.lanes=f,a.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},a}var V2=new WeakMap;function qo(i,a){if(typeof i=="object"&&i!==null){var f=V2.get(i);return f!==void 0?f:(a={value:i,source:a,stack:Ze(a)},V2.set(i,a),a)}return{value:i,source:a,stack:Ze(a)}}var Rc=[],Oc=0,mp=null,Df=0,Bo=[],Ho=0,Ys=null,Mi=1,ji="";function us(i,a){Rc[Oc++]=Df,Rc[Oc++]=mp,mp=i,Df=a}function q2(i,a,f){Bo[Ho++]=Mi,Bo[Ho++]=ji,Bo[Ho++]=Ys,Ys=i;var m=Mi;i=ji;var R=32-Ut(m)-1;m&=~(1<<R),f+=1;var A=32-Ut(a)+R;if(30<A){var N=R-R%5;A=(m&(1<<N)-1).toString(32),m>>=N,R-=N,Mi=1<<32-Ut(a)+R|f<<R|m,ji=A+i}else Mi=1<<A|f<<R|m,ji=i}function Q0(i){i.return!==null&&(us(i,1),q2(i,1,0))}function J0(i){for(;i===mp;)mp=Rc[--Oc],Rc[Oc]=null,Df=Rc[--Oc],Rc[Oc]=null;for(;i===Ys;)Ys=Bo[--Ho],Bo[Ho]=null,ji=Bo[--Ho],Bo[Ho]=null,Mi=Bo[--Ho],Bo[Ho]=null}function B2(i,a){Bo[Ho++]=Mi,Bo[Ho++]=ji,Bo[Ho++]=Ys,Mi=a.id,ji=a.overflow,Ys=i}var Dr=null,Pn=null,qt=!1,Xs=null,Ko=!1,ev=Error(r(519));function Qs(i){var a=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw $f(qo(a,i)),ev}function H2(i){var a=i.stateNode,f=i.type,m=i.memoizedProps;switch(a[Xt]=i,a[Cn]=m,f){case"dialog":It("cancel",a),It("close",a);break;case"iframe":case"object":case"embed":It("load",a);break;case"video":case"audio":for(f=0;f<od.length;f++)It(od[f],a);break;case"source":It("error",a);break;case"img":case"image":case"link":It("error",a),It("load",a);break;case"details":It("toggle",a);break;case"input":It("invalid",a),ap(a,m.value,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name,!0);break;case"select":It("invalid",a);break;case"textarea":It("invalid",a),ll(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||lR(a.textContent,f)?(m.popover!=null&&(It("beforetoggle",a),It("toggle",a)),m.onScroll!=null&&It("scroll",a),m.onScrollEnd!=null&&It("scrollend",a),m.onClick!=null&&(a.onclick=le),a=!0):a=!1,a||Qs(i,!0)}function K2(i){for(Dr=i.return;Dr;)switch(Dr.tag){case 5:case 31:case 13:Ko=!1;return;case 27:case 3:Ko=!0;return;default:Dr=Dr.return}}function Ac(i){if(i!==Dr)return!1;if(!qt)return K2(i),qt=!0,!1;var a=i.tag,f;if((f=a!==3&&a!==27)&&((f=a===5)&&(f=i.type,f=!(f!=="form"&&f!=="button")||vb(i.type,i.memoizedProps)),f=!f),f&&Pn&&Qs(i),K2(i),a===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Pn=yR(i)}else if(a===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Pn=yR(i)}else a===27?(a=Pn,da(i.type)?(i=_b,_b=null,Pn=i):Pn=a):Pn=Dr?Zo(i.stateNode.nextSibling):null;return!0}function vl(){Pn=Dr=null,qt=!1}function tv(){var i=Xs;return i!==null&&(mo===null?mo=i:mo.push.apply(mo,i),Xs=null),i}function $f(i){Xs===null?Xs=[i]:Xs.push(i)}var nv=$(null),bl=null,fs=null;function Js(i,a,f){V(nv,a._currentValue),a._currentValue=f}function ds(i){i._currentValue=nv.current,q(nv)}function rv(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 ov(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),rv(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),rv(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;xo(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(cd):i=[cd])}R=R.return}i!==null&&ov(a,i,f,m),a.flags|=262144}function gp(i){for(i=i.firstContext;i!==null;){if(!xo(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function Sl(i){bl=i,fs=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function $r(i){return G2(bl,i)}function yp(i,a){return bl===null&&Sl(i),G2(i,a)}function G2(i,a){var f=a._currentValue;if(a={context:a,memoizedValue:f,next:null},fs===null){if(i===null)throw Error(r(308));fs=a,i.dependencies={lanes:0,firstContext:a},i.flags|=524288}else fs=fs.next=a;return f}var T8=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()})}},R8=e.unstable_scheduleCallback,O8=e.unstable_NormalPriority,dr={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function iv(){return{controller:new T8,data:new Map,refCount:0}}function If(i){i.refCount--,i.refCount===0&&R8(O8,function(){i.controller.abort()})}var zf=null,sv=0,Mc=0,jc=null;function A8(i,a){if(zf===null){var f=zf=[];sv=0,Mc=cb(),jc={status:"pending",value:void 0,then:function(m){f.push(m)}}}return sv++,a.then(Z2,Z2),a}function Z2(){if(--sv===0&&zf!==null){jc!==null&&(jc.status="fulfilled");var i=zf;zf=null,Mc=0,jc=null;for(var a=0;a<i.length;a++)(0,i[a])()}}function k8(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 W2=Z.S;Z.S=function(i,a){jT=Le(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&A8(i,a),W2!==null&&W2(i,a)};var wl=$(null);function av(){var i=wl.current;return i!==null?i:Tn.pooledCache}function vp(i,a){a===null?V(wl,wl.current):V(wl,a.pool)}function Y2(){var i=av();return i===null?null:{parent:dr._currentValue,pool:i}}var Pc=Error(r(460)),lv=Error(r(474)),bp=Error(r(542)),Sp={then:function(){}};function X2(i){return i=i.status,i==="fulfilled"||i==="rejected"}function Q2(i,a,f){switch(f=i[f],f===void 0?i.push(a):f!==a&&(a.then(le,le),a=f),a.status){case"fulfilled":return a.value;case"rejected":throw i=a.reason,eC(i),i;default:if(typeof a.status=="string")a.then(le,le);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,eC(i),i}throw _l=a,Pc}}function xl(i){try{var a=i._init;return a(i._payload)}catch(f){throw f!==null&&typeof f=="object"&&typeof f.then=="function"?(_l=f,Pc):f}}var _l=null;function J2(){if(_l===null)throw Error(r(459));var i=_l;return _l=null,i}function eC(i){if(i===Pc||i===bp)throw Error(r(483))}var Nc=null,Lf=0;function wp(i){var a=Lf;return Lf+=1,Nc===null&&(Nc=[]),Q2(Nc,i,a)}function Ff(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 tC(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=cs(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=Y0(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===_?Oe(he,fe,ve.props.children,je,ve.key):fe!==null&&(fe.elementType===at||typeof at=="object"&&at!==null&&at.$$typeof===M&&xl(at)===fe.type)?(fe=R(fe,ve.props),Ff(fe,ve),fe.return=he,fe):(fe=pp(ve.type,ve.key,ve.props,null,he.mode,je),Ff(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=X0(ve,he.mode,je),fe.return=he,fe):(fe=R(fe,ve.children||[]),fe.return=he,fe)}function Oe(he,fe,ve,je,at){return fe===null||fe.tag!==7?(fe=yl(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=Y0(""+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),Ff(ve,fe),ve.return=he,ve;case y:return fe=X0(fe,he.mode,ve),fe.return=he,fe;case M:return fe=xl(fe),Pe(he,fe,ve)}if(ee(fe)||U(fe))return fe=yl(fe,he.mode,ve,null),fe.return=he,fe;if(typeof fe.then=="function")return Pe(he,wp(fe),ve);if(fe.$$typeof===C)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=xl(ve),Se(he,fe,ve,je)}if(ee(ve)||U(ve))return at!==null?null:Oe(he,fe,ve,je,null);if(typeof ve.then=="function")return Se(he,fe,wp(ve),je);if(ve.$$typeof===C)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=xl(je),Ee(he,fe,ve,je,at)}if(ee(je)||U(je))return he=he.get(ve)||null,Oe(fe,he,je,at,null);if(typeof je.then=="function")return Ee(he,fe,ve,wp(je),at);if(je.$$typeof===C)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,et=fe,Tt=fe=0,Lt=null;et!==null&&Tt<ve.length;Tt++){et.index>Tt?(Lt=et,et=null):Lt=et.sibling;var en=Se(he,et,ve[Tt],je);if(en===null){et===null&&(et=Lt);break}i&&et&&en.alternate===null&&a(he,et),fe=A(en,fe,Tt),Jt===null?at=en:Jt.sibling=en,Jt=en,et=Lt}if(Tt===ve.length)return f(he,et),qt&&us(he,Tt),at;if(et===null){for(;Tt<ve.length;Tt++)et=Pe(he,ve[Tt],je),et!==null&&(fe=A(et,fe,Tt),Jt===null?at=et:Jt.sibling=et,Jt=et);return qt&&us(he,Tt),at}for(et=m(et);Tt<ve.length;Tt++)Lt=Ee(et,he,Tt,ve[Tt],je),Lt!==null&&(i&&Lt.alternate!==null&&et.delete(Lt.key===null?Tt:Lt.key),fe=A(Lt,fe,Tt),Jt===null?at=Lt:Jt.sibling=Lt,Jt=Lt);return i&&et.forEach(function(ya){return a(he,ya)}),qt&&us(he,Tt),at}function ut(he,fe,ve,je){if(ve==null)throw Error(r(151));for(var at=null,Jt=null,et=fe,Tt=fe=0,Lt=null,en=ve.next();et!==null&&!en.done;Tt++,en=ve.next()){et.index>Tt?(Lt=et,et=null):Lt=et.sibling;var ya=Se(he,et,en.value,je);if(ya===null){et===null&&(et=Lt);break}i&&et&&ya.alternate===null&&a(he,et),fe=A(ya,fe,Tt),Jt===null?at=ya:Jt.sibling=ya,Jt=ya,et=Lt}if(en.done)return f(he,et),qt&&us(he,Tt),at;if(et===null){for(;!en.done;Tt++,en=ve.next())en=Pe(he,en.value,je),en!==null&&(fe=A(en,fe,Tt),Jt===null?at=en:Jt.sibling=en,Jt=en);return qt&&us(he,Tt),at}for(et=m(et);!en.done;Tt++,en=ve.next())en=Ee(et,he,Tt,en.value,je),en!==null&&(i&&en.alternate!==null&&et.delete(en.key===null?Tt:en.key),fe=A(en,fe,Tt),Jt===null?at=en:Jt.sibling=en,Jt=en);return i&&et.forEach(function(UL){return a(he,UL)}),qt&&us(he,Tt),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&&xl(at)===fe.type){f(he,fe.sibling),je=R(fe,ve.props),Ff(je,ve),je.return=he,he=je;break e}f(he,fe);break}else a(he,fe);fe=fe.sibling}ve.type===_?(je=yl(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),Ff(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=X0(ve,he.mode,je),je.return=he,he=je}return N(he);case M:return ve=xl(ve),xn(he,fe,ve,je)}if(ee(ve))return Xe(he,fe,ve,je);if(U(ve)){if(at=U(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===C)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=Y0(ve,he.mode,je),je.return=he,he=je),N(he)):f(he,fe)}return function(he,fe,ve,je){try{Lf=0;var at=xn(he,fe,ve,je);return Nc=null,at}catch(et){if(et===Pc||et===bp)throw et;var Jt=_o(29,et,null,he.mode);return Jt.lanes=je,Jt.return=he,Jt}}}var El=tC(!0),nC=tC(!1),ea=!1;function cv(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function uv(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 ta(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function na(i,a,f){var m=i.updateQueue;if(m===null)return null;if(m=m.shared,(an&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),L2(i,null,f),a}return dp(i,m,a,f),hp(i)}function Uf(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,sn(i,f)}}function fv(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 dv=!1;function Vf(){if(dv){var i=jc;if(i!==null)throw i}}function qf(i,a,f,m){dv=!1;var R=i.updateQueue;ea=!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 Oe=i.alternate;Oe!==null&&(Oe=Oe.updateQueue,W=Oe.lastBaseUpdate,W!==N&&(W===null?Oe.firstBaseUpdate=be:W.next=be,Oe.lastBaseUpdate=se))}if(A!==null){var Pe=R.baseState;N=0,Oe=be=se=null,W=A;do{var Se=W.lane&-536870913,Ee=Se!==W.lane;if(Ee?(zt&Se)===Se:(m&Se)===Se){Se!==0&&Se===Mc&&(dv=!0),Oe!==null&&(Oe=Oe.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:ea=!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},Oe===null?(be=Oe=Ee,se=Pe):Oe=Oe.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);Oe===null&&(se=Pe),R.baseState=se,R.firstBaseUpdate=be,R.lastBaseUpdate=Oe,A===null&&(R.shared.lanes=0),aa|=N,i.lanes=N,i.memoizedState=Pe}}function rC(i,a){if(typeof i!="function")throw Error(r(191,i));i.call(a)}function oC(i,a){var f=i.callbacks;if(f!==null)for(i.callbacks=null,i=0;i<f.length;i++)rC(f[i],a)}var Dc=$(null),_p=$(0);function iC(i,a){i=ws,V(_p,i),V(Dc,a),ws=i|a.baseLanes}function hv(){V(_p,ws),V(Dc,Dc.current)}function pv(){ws=_p.current,q(Dc),q(_p)}var Eo=$(null),Go=null;function ra(i){var a=i.alternate;V(ar,ar.current&1),V(Eo,i),Go===null&&(a===null||Dc.current!==null||a.memoizedState!==null)&&(Go=i)}function mv(i){V(ar,ar.current),V(Eo,i),Go===null&&(Go=i)}function sC(i){i.tag===22?(V(ar,ar.current),V(Eo,i),Go===null&&(Go=i)):oa()}function oa(){V(ar,ar.current),V(Eo,Eo.current)}function Co(i){q(Eo),Go===i&&(Go=null),q(ar)}var ar=$(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||wb(f)||xb(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 hs=0,_t=null,Sn=null,hr=null,Cp=!1,$c=!1,Cl=!1,Tp=0,Bf=0,Ic=null,M8=0;function tr(){throw Error(r(321))}function gv(i,a){if(a===null)return!1;for(var f=0;f<a.length&&f<i.length;f++)if(!xo(i[f],a[f]))return!1;return!0}function yv(i,a,f,m,R,A){return hs=A,_t=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,Z.H=i===null||i.memoizedState===null?qC:jv,Cl=!1,A=f(m,R),Cl=!1,$c&&(A=lC(a,f,m,R)),aC(i),A}function aC(i){Z.H=Gf;var a=Sn!==null&&Sn.next!==null;if(hs=0,hr=Sn=_t=null,Cp=!1,Bf=0,Ic=null,a)throw Error(r(300));i===null||pr||(i=i.dependencies,i!==null&&gp(i)&&(pr=!0))}function lC(i,a,f,m){_t=i;var R=0;do{if($c&&(Ic=null),Bf=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=BC,A=a(f,m)}while($c);return A}function j8(){var i=Z.H,a=i.useState()[0];return a=typeof a.then=="function"?Hf(a):a,i=i.useState()[0],(Sn!==null?Sn.memoizedState:null)!==i&&(_t.flags|=1024),a}function vv(){var i=Tp!==0;return Tp=0,i}function bv(i,a,f){a.updateQueue=i.updateQueue,a.flags&=-2053,i.lanes&=~f}function Sv(i){if(Cp){for(i=i.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}Cp=!1}hs=0,hr=Sn=_t=null,$c=!1,Bf=Tp=0,Ic=null}function to(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return hr===null?_t.memoizedState=hr=i:hr=hr.next=i,hr}function lr(){if(Sn===null){var i=_t.alternate;i=i!==null?i.memoizedState:null}else i=Sn.next;var a=hr===null?_t.memoizedState:hr.next;if(a!==null)hr=a,Sn=i;else{if(i===null)throw _t.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?_t.memoizedState=hr=i:hr=hr.next=i}return hr}function Rp(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Hf(i){var a=Bf;return Bf+=1,Ic===null&&(Ic=[]),i=Q2(Ic,i,a),a=_t,(hr===null?a.memoizedState:hr.next)===null&&(a=a.alternate,Z.H=a===null||a.memoizedState===null?qC:jv),i}function Op(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return Hf(i);if(i.$$typeof===C)return $r(i)}throw Error(r(438,String(i)))}function wv(i){var a=null,f=_t.updateQueue;if(f!==null&&(a=f.memoCache),a==null){var m=_t.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(),_t.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]=I;return a.index++,f}function ps(i,a){return typeof a=="function"?a(i):a}function Ap(i){var a=lr();return xv(a,Sn,i)}function xv(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,Oe=!1;do{var Pe=be.lane&-536870913;if(Pe!==be.lane?(zt&Pe)===Pe:(hs&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&&(Oe=!0);else if((hs&Se)===Se){be=be.next,Se===Mc&&(Oe=!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,_t.lanes|=Se,aa|=Se;Pe=be.action,Cl&&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,_t.lanes|=Pe,aa|=Pe;be=be.next}while(be!==null&&be!==a);if(se===null?N=A:se.next=W,!xo(A,i.memoizedState)&&(pr=!0,Oe&&(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 _v(i){var a=lr(),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);xo(A,a.memoizedState)||(pr=!0),a.memoizedState=A,a.baseQueue===null&&(a.baseState=A),f.lastRenderedState=A}return[A,m]}function cC(i,a,f){var m=_t,R=lr(),A=qt;if(A){if(f===void 0)throw Error(r(407));f=f()}else f=a();var N=!xo((Sn||R).memoizedState,f);if(N&&(R.memoizedState=f,pr=!0),R=R.queue,Tv(dC.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},fC.bind(null,m,R,f,a),null),Tn===null)throw Error(r(349));A||(hs&127)!==0||uC(m,a,f)}return f}function uC(i,a,f){i.flags|=16384,i={getSnapshot:a,value:f},a=_t.updateQueue,a===null?(a=Rp(),_t.updateQueue=a,a.stores=[i]):(f=a.stores,f===null?a.stores=[i]:f.push(i))}function fC(i,a,f,m){a.value=f,a.getSnapshot=m,hC(a)&&pC(i)}function dC(i,a,f){return f(function(){hC(a)&&pC(i)})}function hC(i){var a=i.getSnapshot;i=i.value;try{var f=a();return!xo(i,f)}catch{return!0}}function pC(i){var a=gl(i,2);a!==null&&go(a,i,2)}function Ev(i){var a=to();if(typeof i=="function"){var f=i;if(i=f(),Cl){on(!0);try{f()}finally{on(!1)}}}return a.memoizedState=a.baseState=i,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ps,lastRenderedState:i},a}function mC(i,a,f,m){return i.baseState=f,xv(i,Sn,typeof m=="function"?m:ps)}function P8(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,gC(a,A)):(A.next=f.next,a.pending=f.next=A)}}function gC(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),yC(i,a,W)}catch(be){Cv(i,a,be)}finally{A!==null&&N.types!==null&&(A.types=N.types),Z.T=A}}else try{A=f(R,m),yC(i,a,A)}catch(be){Cv(i,a,be)}}function yC(i,a,f){f!==null&&typeof f=="object"&&typeof f.then=="function"?f.then(function(m){vC(i,a,m)},function(m){return Cv(i,a,m)}):vC(i,a,f)}function vC(i,a,f){a.status="fulfilled",a.value=f,bC(a),i.state=f,a=i.pending,a!==null&&(f=a.next,f===a?i.pending=null:(f=f.next,a.next=f,gC(i,f)))}function Cv(i,a,f){var m=i.pending;if(i.pending=null,m!==null){m=m.next;do a.status="rejected",a.reason=f,bC(a),a=a.next;while(a!==m)}i.action=null}function bC(i){i=i.listeners;for(var a=0;a<i.length;a++)(0,i[a])()}function SC(i,a){return a}function wC(i,a){if(qt){var f=Tn.formState;if(f!==null){e:{var m=_t;if(qt){if(Pn){t:{for(var R=Pn,A=Ko;R.nodeType!==8;){if(!A){R=null;break t}if(R=Zo(R.nextSibling),R===null){R=null;break t}}A=R.data,R=A==="F!"||A==="F"?R:null}if(R){Pn=Zo(R.nextSibling),m=R.data==="F!";break e}}Qs(m)}m=!1}m&&(a=f[0])}}return f=to(),f.memoizedState=f.baseState=a,m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:SC,lastRenderedState:a},f.queue=m,f=FC.bind(null,_t,m),m.dispatch=f,m=Ev(!1),A=Mv.bind(null,_t,!1,m.queue),m=to(),R={state:a,dispatch:null,action:i,pending:null},m.queue=R,f=P8.bind(null,_t,R,A,f),R.dispatch=f,m.memoizedState=i,[a,f,!1]}function xC(i){var a=lr();return _C(a,Sn,i)}function _C(i,a,f){if(a=xv(i,a,SC)[0],i=Ap(ps)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var m=Hf(a)}catch(N){throw N===Pc?bp:N}else m=a;a=lr();var R=a.queue,A=R.dispatch;return f!==a.memoizedState&&(_t.flags|=2048,zc(9,{destroy:void 0},N8.bind(null,R,f),null)),[m,A,i]}function N8(i,a){i.action=a}function EC(i){var a=lr(),f=Sn;if(f!==null)return _C(a,f,i);lr(),a=a.memoizedState,f=lr();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=_t.updateQueue,a===null&&(a=Rp(),_t.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 CC(){return lr().memoizedState}function kp(i,a,f,m){var R=to();_t.flags|=i,R.memoizedState=zc(1|a,{destroy:void 0},f,m===void 0?null:m)}function Mp(i,a,f,m){var R=lr();m=m===void 0?null:m;var A=R.memoizedState.inst;Sn!==null&&m!==null&&gv(m,Sn.memoizedState.deps)?R.memoizedState=zc(a,A,f,m):(_t.flags|=i,R.memoizedState=zc(1|a,A,f,m))}function TC(i,a){kp(8390656,8,i,a)}function Tv(i,a){Mp(2048,8,i,a)}function D8(i){_t.flags|=4;var a=_t.updateQueue;if(a===null)a=Rp(),_t.updateQueue=a,a.events=[i];else{var f=a.events;f===null?a.events=[i]:f.push(i)}}function RC(i){var a=lr().memoizedState;return D8({ref:a,nextImpl:i}),function(){if((an&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}function OC(i,a){return Mp(4,2,i,a)}function AC(i,a){return Mp(4,4,i,a)}function kC(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 MC(i,a,f){f=f!=null?f.concat([i]):null,Mp(4,4,kC.bind(null,a,i),f)}function Rv(){}function jC(i,a){var f=lr();a=a===void 0?null:a;var m=f.memoizedState;return a!==null&&gv(a,m[1])?m[0]:(f.memoizedState=[i,a],i)}function PC(i,a){var f=lr();a=a===void 0?null:a;var m=f.memoizedState;if(a!==null&&gv(a,m[1]))return m[0];if(m=i(),Cl){on(!0);try{i()}finally{on(!1)}}return f.memoizedState=[m,a],m}function Ov(i,a,f){return f===void 0||(hs&1073741824)!==0&&(zt&261930)===0?i.memoizedState=a:(i.memoizedState=f,i=NT(),_t.lanes|=i,aa|=i,f)}function NC(i,a,f,m){return xo(f,a)?f:Dc.current!==null?(i=Ov(i,f,m),xo(i,a)||(pr=!0),i):(hs&42)===0||(hs&1073741824)!==0&&(zt&261930)===0?(pr=!0,i.memoizedState=f):(i=NT(),_t.lanes|=i,aa|=i,a)}function DC(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,Mv(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 Oe=k8(se,m);Kf(i,a,Oe,Oo(i))}else Kf(i,a,m,Oo(i))}catch(Pe){Kf(i,a,{then:function(){},status:"rejected",reason:Pe},Oo())}finally{H.p=A,N!==null&&W.types!==null&&(N.types=W.types),Z.T=N}}function $8(){}function Av(i,a,f,m){if(i.tag!==5)throw Error(r(476));var R=$C(i).queue;DC(i,R,a,Y,f===null?$8:function(){return IC(i),f(m)})}function $C(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:ps,lastRenderedState:Y},next:null};var f={};return a.next={memoizedState:f,baseState:f,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ps,lastRenderedState:f},next:null},i.memoizedState=a,i=i.alternate,i!==null&&(i.memoizedState=a),a}function IC(i){var a=$C(i);a.next===null&&(a=i.alternate.memoizedState),Kf(i,a.next.queue,{},Oo())}function kv(){return $r(cd)}function zC(){return lr().memoizedState}function LC(){return lr().memoizedState}function I8(i){for(var a=i.return;a!==null;){switch(a.tag){case 24:case 3:var f=Oo();i=ta(f);var m=na(a,i,f);m!==null&&(go(m,a,f),Uf(m,a,f)),a={cache:iv()},i.payload=a;return}a=a.return}}function z8(i,a,f){var m=Oo();f={lane:m,revertLane:0,gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null},jp(i)?UC(a,f):(f=Z0(i,a,f,m),f!==null&&(go(f,i,m),VC(f,a,m)))}function FC(i,a,f){var m=Oo();Kf(i,a,f,m)}function Kf(i,a,f,m){var R={lane:m,revertLane:0,gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null};if(jp(i))UC(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,xo(W,N))return dp(i,a,R,0),Tn===null&&fp(),!1}catch{}if(f=Z0(i,a,R,m),f!==null)return go(f,i,m),VC(f,a,m),!0}return!1}function Mv(i,a,f,m){if(m={lane:2,revertLane:cb(),gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},jp(i)){if(a)throw Error(r(479))}else a=Z0(i,f,m,2),a!==null&&go(a,i,2)}function jp(i){var a=i.alternate;return i===_t||a!==null&&a===_t}function UC(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 VC(i,a,f){if((f&4194048)!==0){var m=a.lanes;m&=i.pendingLanes,f|=m,a.lanes=f,sn(i,f)}}var Gf={readContext:$r,use:Op,useCallback:tr,useContext:tr,useEffect:tr,useImperativeHandle:tr,useLayoutEffect:tr,useInsertionEffect:tr,useMemo:tr,useReducer:tr,useRef:tr,useState:tr,useDebugValue:tr,useDeferredValue:tr,useTransition:tr,useSyncExternalStore:tr,useId:tr,useHostTransitionStatus:tr,useFormState:tr,useActionState:tr,useOptimistic:tr,useMemoCache:tr,useCacheRefresh:tr};Gf.useEffectEvent=tr;var qC={readContext:$r,use:Op,useCallback:function(i,a){return to().memoizedState=[i,a===void 0?null:a],i},useContext:$r,useEffect:TC,useImperativeHandle:function(i,a,f){f=f!=null?f.concat([i]):null,kp(4194308,4,kC.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=to();a=a===void 0?null:a;var m=i();if(Cl){on(!0);try{i()}finally{on(!1)}}return f.memoizedState=[m,a],m},useReducer:function(i,a,f){var m=to();if(f!==void 0){var R=f(a);if(Cl){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=z8.bind(null,_t,i),[m.memoizedState,i]},useRef:function(i){var a=to();return i={current:i},a.memoizedState=i},useState:function(i){i=Ev(i);var a=i.queue,f=FC.bind(null,_t,a);return a.dispatch=f,[i.memoizedState,f]},useDebugValue:Rv,useDeferredValue:function(i,a){var f=to();return Ov(f,i,a)},useTransition:function(){var i=Ev(!1);return i=DC.bind(null,_t,i.queue,!0,!1),to().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,a,f){var m=_t,R=to();if(qt){if(f===void 0)throw Error(r(407));f=f()}else{if(f=a(),Tn===null)throw Error(r(349));(zt&127)!==0||uC(m,a,f)}R.memoizedState=f;var A={value:f,getSnapshot:a};return R.queue=A,TC(dC.bind(null,m,A,i),[i]),m.flags|=2048,zc(9,{destroy:void 0},fC.bind(null,m,A,f,a),null),f},useId:function(){var i=to(),a=Tn.identifierPrefix;if(qt){var f=ji,m=Mi;f=(m&~(1<<32-Ut(m)-1)).toString(32)+f,a="_"+a+"R_"+f,f=Tp++,0<f&&(a+="H"+f.toString(32)),a+="_"}else f=M8++,a="_"+a+"r_"+f.toString(32)+"_";return i.memoizedState=a},useHostTransitionStatus:kv,useFormState:wC,useActionState:wC,useOptimistic:function(i){var a=to();a.memoizedState=a.baseState=i;var f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=f,a=Mv.bind(null,_t,!0,f),f.dispatch=a,[i,a]},useMemoCache:wv,useCacheRefresh:function(){return to().memoizedState=I8.bind(null,_t)},useEffectEvent:function(i){var a=to(),f={impl:i};return a.memoizedState=f,function(){if((an&2)!==0)throw Error(r(440));return f.impl.apply(void 0,arguments)}}},jv={readContext:$r,use:Op,useCallback:jC,useContext:$r,useEffect:Tv,useImperativeHandle:MC,useInsertionEffect:OC,useLayoutEffect:AC,useMemo:PC,useReducer:Ap,useRef:CC,useState:function(){return Ap(ps)},useDebugValue:Rv,useDeferredValue:function(i,a){var f=lr();return NC(f,Sn.memoizedState,i,a)},useTransition:function(){var i=Ap(ps)[0],a=lr().memoizedState;return[typeof i=="boolean"?i:Hf(i),a]},useSyncExternalStore:cC,useId:zC,useHostTransitionStatus:kv,useFormState:xC,useActionState:xC,useOptimistic:function(i,a){var f=lr();return mC(f,Sn,i,a)},useMemoCache:wv,useCacheRefresh:LC};jv.useEffectEvent=RC;var BC={readContext:$r,use:Op,useCallback:jC,useContext:$r,useEffect:Tv,useImperativeHandle:MC,useInsertionEffect:OC,useLayoutEffect:AC,useMemo:PC,useReducer:_v,useRef:CC,useState:function(){return _v(ps)},useDebugValue:Rv,useDeferredValue:function(i,a){var f=lr();return Sn===null?Ov(f,i,a):NC(f,Sn.memoizedState,i,a)},useTransition:function(){var i=_v(ps)[0],a=lr().memoizedState;return[typeof i=="boolean"?i:Hf(i),a]},useSyncExternalStore:cC,useId:zC,useHostTransitionStatus:kv,useFormState:EC,useActionState:EC,useOptimistic:function(i,a){var f=lr();return Sn!==null?mC(f,Sn,i,a):(f.baseState=i,[i,f.queue.dispatch])},useMemoCache:wv,useCacheRefresh:LC};BC.useEffectEvent=RC;function Pv(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 Nv={enqueueSetState:function(i,a,f){i=i._reactInternals;var m=Oo(),R=ta(m);R.payload=a,f!=null&&(R.callback=f),a=na(i,R,m),a!==null&&(go(a,i,m),Uf(a,i,m))},enqueueReplaceState:function(i,a,f){i=i._reactInternals;var m=Oo(),R=ta(m);R.tag=1,R.payload=a,f!=null&&(R.callback=f),a=na(i,R,m),a!==null&&(go(a,i,m),Uf(a,i,m))},enqueueForceUpdate:function(i,a){i=i._reactInternals;var f=Oo(),m=ta(f);m.tag=2,a!=null&&(m.callback=a),a=na(i,m,f),a!==null&&(go(a,i,f),Uf(a,i,f))}};function HC(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?!Pf(f,m)||!Pf(R,A):!0}function KC(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&&Nv.enqueueReplaceState(a,a.state,null)}function Tl(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 GC(i){up(i)}function ZC(i){console.error(i)}function WC(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 YC(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 Dv(i,a,f){return f=ta(f),f.tag=3,f.payload={element:null},f.callback=function(){Pp(i,a)},f}function XC(i){return i=ta(i),i.tag=3,i}function QC(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(){YC(a,f,m)}}var N=f.stateNode;N!==null&&typeof N.componentDidCatch=="function"&&(i.callback=function(){YC(a,f,m),typeof R!="function"&&(la===null?la=new Set([this]):la.add(this));var W=m.stack;this.componentDidCatch(m.value,{componentStack:W!==null?W:""})})}function L8(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=Eo.current,f!==null){switch(f.tag){case 31:case 13:return Go===null?Hp():f.alternate===null&&nr===0&&(nr=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),sb(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)),sb(i,m,R)),!1}throw Error(r(435,f.tag))}return sb(i,m,R),Hp(),!1}if(qt)return a=Eo.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=R,m!==ev&&(i=Error(r(422),{cause:m}),$f(qo(i,f)))):(m!==ev&&(a=Error(r(423),{cause:m}),$f(qo(a,f))),i=i.current.alternate,i.flags|=65536,R&=-R,i.lanes|=R,m=qo(m,f),R=Dv(i.stateNode,m,R),fv(i,R),nr!==4&&(nr=2)),!1;var A=Error(r(520),{cause:m});if(A=qo(A,f),td===null?td=[A]:td.push(A),nr!==4&&(nr=2),a===null)return!0;m=qo(m,f),f=a;do{switch(f.tag){case 3:return f.flags|=65536,i=R&-R,f.lanes|=i,i=Dv(f.stateNode,m,i),fv(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"&&(la===null||!la.has(A))))return f.flags|=65536,R&=-R,f.lanes|=R,R=XC(R),QC(R,i,f,m),fv(f,R),!1}f=f.return}while(f!==null);return!1}var $v=Error(r(461)),pr=!1;function Ir(i,a,f,m){a.child=i===null?nC(a,null,f,m):El(a,i.child,f,m)}function JC(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 Sl(a),m=yv(i,a,f,N,A,R),W=vv(),i!==null&&!pr?(bv(i,a,R),ms(i,a,R)):(qt&&W&&Q0(a),a.flags|=1,Ir(i,a,m,R),a.child)}function eT(i,a,f,m,R){if(i===null){var A=f.type;return typeof A=="function"&&!W0(A)&&A.defaultProps===void 0&&f.compare===null?(a.tag=15,a.type=A,tT(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,!Bv(i,R)){var N=A.memoizedProps;if(f=f.compare,f=f!==null?f:Pf,f(N,m)&&i.ref===a.ref)return ms(i,a,R)}return a.flags|=1,i=cs(A,m),i.ref=a.ref,i.return=a,a.child=i}function tT(i,a,f,m,R){if(i!==null){var A=i.memoizedProps;if(Pf(A,m)&&i.ref===a.ref)if(pr=!1,a.pendingProps=m=A,Bv(i,R))(i.flags&131072)!==0&&(pr=!0);else return a.lanes=i.lanes,ms(i,a,R)}return Iv(i,a,f,m,R)}function nT(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 rT(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?iC(a,A):hv(),sC(a);else return m=a.lanes=536870912,rT(i,a,A!==null?A.baseLanes|f:f,f,m)}else A!==null?(vp(a,A.cachePool),iC(a,A),oa(),a.memoizedState=null):(i!==null&&vp(a,null),hv(),oa());return Ir(i,a,R,f),a.child}function Zf(i,a){return i!==null&&i.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function rT(i,a,f,m,R){var A=av();return A=A===null?null:{parent:dr._currentValue,pool:A},a.memoizedState={baseLanes:f,cachePool:A},i!==null&&vp(a,null),hv(),sC(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 oT(i,a,f){return El(a,i.child,null,f),i=Np(a,a.pendingProps),i.flags|=2,Co(a),a.memoizedState=null,i}function F8(i,a,f){var m=a.pendingProps,R=(a.flags&128)!==0;if(a.flags&=-129,i===null){if(qt){if(m.mode==="hidden")return i=Np(a,m),a.lanes=536870912,Zf(null,i);if(mv(a),(i=Pn)?(i=gR(i,Ko),i=i!==null&&i.data==="&"?i:null,i!==null&&(a.memoizedState={dehydrated:i,treeContext:Ys!==null?{id:Mi,overflow:ji}:null,retryLane:536870912,hydrationErrors:null},f=U2(i),f.return=a,a.child=f,Dr=a,Pn=null)):i=null,i===null)throw Qs(a);return a.lanes=536870912,null}return Np(a,m)}var A=i.memoizedState;if(A!==null){var N=A.dehydrated;if(mv(a),R)if(a.flags&256)a.flags&=-257,a=oT(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=ur(m,f),N!==0&&N!==A.retryLane))throw A.retryLane=N,gl(i,N),go(m,i,N),$v;Hp(),a=oT(i,a,f)}else i=A.treeContext,Pn=Zo(N.nextSibling),Dr=a,qt=!0,Xs=null,Ko=!1,i!==null&&B2(a,i),a=Np(a,m),a.flags|=4096;return a}return i=cs(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 Iv(i,a,f,m,R){return Sl(a),f=yv(i,a,f,m,void 0,R),m=vv(),i!==null&&!pr?(bv(i,a,R),ms(i,a,R)):(qt&&m&&Q0(a),a.flags|=1,Ir(i,a,f,R),a.child)}function iT(i,a,f,m,R,A){return Sl(a),a.updateQueue=null,f=lC(a,m,f,R),aC(i),m=vv(),i!==null&&!pr?(bv(i,a,A),ms(i,a,A)):(qt&&m&&Q0(a),a.flags|=1,Ir(i,a,f,A),a.child)}function sT(i,a,f,m,R){if(Sl(a),a.stateNode===null){var A=Tc,N=f.contextType;typeof N=="object"&&N!==null&&(A=$r(N)),A=new f(m,A),a.memoizedState=A.state!==null&&A.state!==void 0?A.state:null,A.updater=Nv,a.stateNode=A,A._reactInternals=a,A=a.stateNode,A.props=m,A.state=a.memoizedState,A.refs={},cv(a),N=f.contextType,A.context=typeof N=="object"&&N!==null?$r(N):Tc,A.state=a.memoizedState,N=f.getDerivedStateFromProps,typeof N=="function"&&(Pv(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&&Nv.enqueueReplaceState(A,A.state,null),qf(a,m,A,R),Vf(),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=Tl(f,W);A.props=se;var be=A.context,Oe=f.contextType;N=Tc,typeof Oe=="object"&&Oe!==null&&(N=$r(Oe));var Pe=f.getDerivedStateFromProps;Oe=typeof Pe=="function"||typeof A.getSnapshotBeforeUpdate=="function",W=a.pendingProps!==W,Oe||typeof A.UNSAFE_componentWillReceiveProps!="function"&&typeof A.componentWillReceiveProps!="function"||(W||be!==N)&&KC(a,A,m,N),ea=!1;var Se=a.memoizedState;A.state=Se,qf(a,m,A,R),Vf(),be=a.memoizedState,W||Se!==be||ea?(typeof Pe=="function"&&(Pv(a,f,Pe,m),be=a.memoizedState),(se=ea||HC(a,f,se,m,Se,be,N))?(Oe||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,uv(i,a),N=a.memoizedProps,Oe=Tl(f,N),A.props=Oe,Pe=a.pendingProps,Se=A.context,be=f.contextType,se=Tc,typeof be=="object"&&be!==null&&(se=$r(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)&&KC(a,A,m,se),ea=!1,Se=a.memoizedState,A.state=Se,qf(a,m,A,R),Vf();var Ee=a.memoizedState;N!==Pe||Se!==Ee||ea||i!==null&&i.dependencies!==null&&gp(i.dependencies)?(typeof W=="function"&&(Pv(a,f,W,m),Ee=a.memoizedState),(Oe=ea||HC(a,f,Oe,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=Oe):(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=El(a,i.child,null,R),a.child=El(a,null,f,R)):Ir(i,a,f,R),a.memoizedState=A.state,i=a.child):i=ms(i,a,R),i}function aT(i,a,f,m){return vl(),a.flags|=256,Ir(i,a,f,m),a.child}var zv={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Lv(i){return{baseLanes:i,cachePool:Y2()}}function Fv(i,a,f){return i=i!==null?i.childLanes&~f:0,a&&(i|=Ro),i}function lT(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:(ar.current&2)!==0),N&&(R=!0,a.flags&=-129),N=(a.flags&32)!==0,a.flags&=-33,i===null){if(qt){if(R?ra(a):oa(),(i=Pn)?(i=gR(i,Ko),i=i!==null&&i.data!=="&"?i:null,i!==null&&(a.memoizedState={dehydrated:i,treeContext:Ys!==null?{id:Mi,overflow:ji}:null,retryLane:536870912,hydrationErrors:null},f=U2(i),f.return=a,a.child=f,Dr=a,Pn=null)):i=null,i===null)throw Qs(a);return xb(i)?a.lanes=32:a.lanes=536870912,null}var W=m.children;return m=m.fallback,R?(oa(),R=a.mode,W=$p({mode:"hidden",children:W},R),m=yl(m,R,f,null),W.return=a,m.return=a,W.sibling=m,a.child=W,m=a.child,m.memoizedState=Lv(f),m.childLanes=Fv(i,N,f),a.memoizedState=zv,Zf(null,m)):(ra(a),Uv(a,W))}var se=i.memoizedState;if(se!==null&&(W=se.dehydrated,W!==null)){if(A)a.flags&256?(ra(a),a.flags&=-257,a=Vv(i,a,f)):a.memoizedState!==null?(oa(),a.child=i.child,a.flags|=128,a=null):(oa(),W=m.fallback,R=a.mode,m=$p({mode:"visible",children:m.children},R),W=yl(W,R,f,null),W.flags|=2,m.return=a,W.return=a,m.sibling=W,a.child=m,El(a,i.child,null,f),m=a.child,m.memoizedState=Lv(f),m.childLanes=Fv(i,N,f),a.memoizedState=zv,a=Zf(null,m));else if(ra(a),xb(W)){if(N=W.nextSibling&&W.nextSibling.dataset,N)var be=N.dgst;N=be,m=Error(r(419)),m.stack="",m.digest=N,$f({value:m,source:null,stack:null}),a=Vv(i,a,f)}else if(pr||kc(i,a,f,!1),N=(f&i.childLanes)!==0,pr||N){if(N=Tn,N!==null&&(m=ur(N,f),m!==0&&m!==se.retryLane))throw se.retryLane=m,gl(i,m),go(N,i,m),$v;wb(W)||Hp(),a=Vv(i,a,f)}else wb(W)?(a.flags|=192,a.child=i.child,a=null):(i=se.treeContext,Pn=Zo(W.nextSibling),Dr=a,qt=!0,Xs=null,Ko=!1,i!==null&&B2(a,i),a=Uv(a,m.children),a.flags|=4096);return a}return R?(oa(),W=m.fallback,R=a.mode,se=i.child,be=se.sibling,m=cs(se,{mode:"hidden",children:m.children}),m.subtreeFlags=se.subtreeFlags&65011712,be!==null?W=cs(be,W):(W=yl(W,R,f,null),W.flags|=2),W.return=a,m.return=a,m.sibling=W,a.child=m,Zf(null,m),m=a.child,W=i.child.memoizedState,W===null?W=Lv(f):(R=W.cachePool,R!==null?(se=dr._currentValue,R=R.parent!==se?{parent:se,pool:se}:R):R=Y2(),W={baseLanes:W.baseLanes|f,cachePool:R}),m.memoizedState=W,m.childLanes=Fv(i,N,f),a.memoizedState=zv,Zf(i.child,m)):(ra(a),f=i.child,i=f.sibling,f=cs(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 Uv(i,a){return a=$p({mode:"visible",children:a},i.mode),a.return=i,i.child=a}function $p(i,a){return i=_o(22,i,null,a),i.lanes=0,i}function Vv(i,a,f){return El(a,i.child,null,f),i=Uv(a,a.pendingProps.children),i.flags|=2,a.memoizedState=null,i}function cT(i,a,f){i.lanes|=a;var m=i.alternate;m!==null&&(m.lanes|=a),rv(i.return,a,f)}function qv(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 uT(i,a,f){var m=a.pendingProps,R=m.revealOrder,A=m.tail;m=m.children;var N=ar.current,W=(N&2)!==0;if(W?(N=N&1|2,a.flags|=128):N&=1,V(ar,N),Ir(i,a,m,f),m=qt?Df:0,!W&&i!==null&&(i.flags&128)!==0)e:for(i=a.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&cT(i,f,a);else if(i.tag===19)cT(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),qv(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}qv(a,!0,f,null,A,m);break;case"together":qv(a,!1,null,null,void 0,m);break;default:a.memoizedState=null}return a.child}function ms(i,a,f){if(i!==null&&(a.dependencies=i.dependencies),aa|=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=cs(i,i.pendingProps),a.child=f,f.return=a;i.sibling!==null;)i=i.sibling,f=f.sibling=cs(i,i.pendingProps),f.return=a;f.sibling=null}return a.child}function Bv(i,a){return(i.lanes&a)!==0?!0:(i=i.dependencies,!!(i!==null&&gp(i)))}function U8(i,a,f){switch(a.tag){case 3:ae(a,a.stateNode.containerInfo),Js(a,dr,i.memoizedState.cache),vl();break;case 27:case 5:ke(a);break;case 4:ae(a,a.stateNode.containerInfo);break;case 10:Js(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,mv(a),null;break;case 13:var m=a.memoizedState;if(m!==null)return m.dehydrated!==null?(ra(a),a.flags|=128,null):(f&a.child.childLanes)!==0?lT(i,a,f):(ra(a),i=ms(i,a,f),i!==null?i.sibling:null);ra(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 uT(i,a,f);a.flags|=128}if(R=a.memoizedState,R!==null&&(R.rendering=null,R.tail=null,R.lastEffect=null),V(ar,ar.current),m)break;return null;case 22:return a.lanes=0,nT(i,a,f,a.pendingProps);case 24:Js(a,dr,i.memoizedState.cache)}return ms(i,a,f)}function fT(i,a,f){if(i!==null)if(i.memoizedProps!==a.pendingProps)pr=!0;else{if(!Bv(i,f)&&(a.flags&128)===0)return pr=!1,U8(i,a,f);pr=(i.flags&131072)!==0}else pr=!1,qt&&(a.flags&1048576)!==0&&q2(a,Df,a.index);switch(a.lanes=0,a.tag){case 16:e:{var m=a.pendingProps;if(i=xl(a.elementType),a.type=i,typeof i=="function")W0(i)?(m=Tl(i,m),a.tag=1,a=sT(null,a,i,m,f)):(a.tag=0,a=Iv(null,a,i,m,f));else{if(i!=null){var R=i.$$typeof;if(R===S){a.tag=11,a=JC(null,a,i,m,f);break e}else if(R===O){a.tag=14,a=eT(null,a,i,m,f);break e}}throw a=J(i)||i,Error(r(306,a,""))}}return a;case 0:return Iv(i,a,a.type,a.pendingProps,f);case 1:return m=a.type,R=Tl(m,a.pendingProps),sT(i,a,m,R,f);case 3:e:{if(ae(a,a.stateNode.containerInfo),i===null)throw Error(r(387));m=a.pendingProps;var A=a.memoizedState;R=A.element,uv(i,a),qf(a,m,null,f);var N=a.memoizedState;if(m=N.cache,Js(a,dr,m),m!==A.cache&&ov(a,[dr],f,!0),Vf(),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=aT(i,a,m,f);break e}else if(m!==R){R=qo(Error(r(424)),a),$f(R),a=aT(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,Pn=Zo(i.firstChild),Dr=a,qt=!0,Xs=null,Ko=!0,f=nC(a,null,m,f),a.child=f;f;)f.flags=f.flags&-3|4096,f=f.sibling;else{if(vl(),m===R){a=ms(i,a,f);break e}Ir(i,a,m,f)}a=a.child}return a;case 26:return Dp(i,a),i===null?(f=xR(a.type,null,a.pendingProps,null))?a.memoizedState=f:qt||(f=a.type,i=a.pendingProps,m=Qp(te.current).createElement(f),m[Xt]=a,m[Cn]=i,zr(m,f,i),fr(m),a.stateNode=m):a.memoizedState=xR(a.type,i.memoizedProps,a.pendingProps,i.memoizedState),null;case 27:return ke(a),i===null&&qt&&(m=a.stateNode=bR(a.type,a.pendingProps,te.current),Dr=a,Ko=!0,R=Pn,da(a.type)?(_b=R,Pn=Zo(m.firstChild)):Pn=R),Ir(i,a,a.pendingProps.children,f),Dp(i,a),i===null&&(a.flags|=4194304),a.child;case 5:return i===null&&qt&&((R=m=Pn)&&(m=yL(m,a.type,a.pendingProps,Ko),m!==null?(a.stateNode=m,Dr=a,Pn=Zo(m.firstChild),Ko=!1,R=!0):R=!1),R||Qs(a)),ke(a),R=a.type,A=a.pendingProps,N=i!==null?i.memoizedProps:null,m=A.children,vb(R,A)?m=null:N!==null&&vb(R,N)&&(a.flags|=32),a.memoizedState!==null&&(R=yv(i,a,j8,null,null,f),cd._currentValue=R),Dp(i,a),Ir(i,a,m,f),a.child;case 6:return i===null&&qt&&((i=f=Pn)&&(f=vL(f,a.pendingProps,Ko),f!==null?(a.stateNode=f,Dr=a,Pn=null,i=!0):i=!1),i||Qs(a)),null;case 13:return lT(i,a,f);case 4:return ae(a,a.stateNode.containerInfo),m=a.pendingProps,i===null?a.child=El(a,null,m,f):Ir(i,a,m,f),a.child;case 11:return JC(i,a,a.type,a.pendingProps,f);case 7:return Ir(i,a,a.pendingProps,f),a.child;case 8:return Ir(i,a,a.pendingProps.children,f),a.child;case 12:return Ir(i,a,a.pendingProps.children,f),a.child;case 10:return m=a.pendingProps,Js(a,a.type,m.value),Ir(i,a,m.children,f),a.child;case 9:return R=a.type._context,m=a.pendingProps.children,Sl(a),R=$r(R),m=m(R),a.flags|=1,Ir(i,a,m,f),a.child;case 14:return eT(i,a,a.type,a.pendingProps,f);case 15:return tT(i,a,a.type,a.pendingProps,f);case 19:return uT(i,a,f);case 31:return F8(i,a,f);case 22:return nT(i,a,f,a.pendingProps);case 24:return Sl(a),m=$r(dr),i===null?(R=av(),R===null&&(R=Tn,A=iv(),R.pooledCache=A,A.refCount++,A!==null&&(R.pooledCacheLanes|=f),R=A),a.memoizedState={parent:m,cache:R},cv(a),Js(a,dr,R)):((i.lanes&f)!==0&&(uv(i,a),qf(a,null,null,f),Vf()),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),Js(a,dr,m)):(m=A.cache,Js(a,dr,m),m!==R.cache&&ov(a,[dr],f,!0))),Ir(i,a,a.pendingProps.children,f),a.child;case 29:throw a.pendingProps}throw Error(r(156,a.tag))}function gs(i){i.flags|=4}function Hv(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(zT())i.flags|=8192;else throw _l=Sp,lv}else i.flags&=-16777217}function dT(i,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!RR(a))if(zT())i.flags|=8192;else throw _l=Sp,lv}function Ip(i,a){a!==null&&(i.flags|=4),i.flags&16384&&(a=i.tag!==22?ft():536870912,i.lanes|=a,Vc|=a)}function Wf(i,a){if(!qt)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 Nn(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 V8(i,a,f){var m=a.pendingProps;switch(J0(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Nn(a),null;case 1:return Nn(a),null;case 3:return f=a.stateNode,m=null,i!==null&&(m=i.memoizedState.cache),a.memoizedState.cache!==m&&(a.flags|=2048),ds(dr),ge(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(i===null||i.child===null)&&(Ac(a)?gs(a):i===null||i.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,tv())),Nn(a),null;case 26:var R=a.type,A=a.memoizedState;return i===null?(gs(a),A!==null?(Nn(a),dT(a,A)):(Nn(a),Hv(a,R,null,m,f))):A?A!==i.memoizedState?(gs(a),Nn(a),dT(a,A)):(Nn(a),a.flags&=-16777217):(i=i.memoizedProps,i!==m&&gs(a),Nn(a),Hv(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&&gs(a);else{if(!m){if(a.stateNode===null)throw Error(r(166));return Nn(a),null}i=D.current,Ac(a)?H2(a):(i=bR(R,m,f),a.stateNode=i,gs(a))}return Nn(a),null;case 5:if(Q(a),R=a.type,i!==null&&a.stateNode!=null)i.memoizedProps!==m&&gs(a);else{if(!m){if(a.stateNode===null)throw Error(r(166));return Nn(a),null}if(A=D.current,Ac(a))H2(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[Xt]=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(zr(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&&gs(a)}}return Nn(a),Hv(a,a.type,i===null?null:i.memoizedProps,a.pendingProps,f),null;case 6:if(i&&a.stateNode!=null)i.memoizedProps!==m&&gs(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=Dr,R!==null)switch(R.tag){case 27:case 5:m=R.memoizedProps}i[Xt]=a,i=!!(i.nodeValue===f||m!==null&&m.suppressHydrationWarning===!0||lR(i.nodeValue,f)),i||Qs(a,!0)}else i=Qp(i).createTextNode(m),i[Xt]=a,a.stateNode=i}return Nn(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[Xt]=a}else vl(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Nn(a),i=!1}else f=tv(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=f),i=!0;if(!i)return a.flags&256?(Co(a),a):(Co(a),null);if((a.flags&128)!==0)throw Error(r(558))}return Nn(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[Xt]=a}else vl(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Nn(a),R=!1}else R=tv(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=R),R=!0;if(!R)return a.flags&256?(Co(a),a):(Co(a),null)}return Co(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),Nn(a),null);case 4:return ge(),i===null&&hb(a.stateNode.containerInfo),Nn(a),null;case 10:return ds(a.type),Nn(a),null;case 19:if(q(ar),m=a.memoizedState,m===null)return Nn(a),null;if(R=(a.flags&128)!==0,A=m.rendering,A===null)if(R)Wf(m,!1);else{if(nr!==0||i!==null&&(i.flags&128)!==0)for(i=a.child;i!==null;){if(A=Ep(i),A!==null){for(a.flags|=128,Wf(m,!1),i=A.updateQueue,a.updateQueue=i,Ip(a,i),a.subtreeFlags=0,i=f,f=a.child;f!==null;)F2(f,i),f=f.sibling;return V(ar,ar.current&1|2),qt&&us(a,m.treeForkCount),a.child}i=i.sibling}m.tail!==null&&Le()>Vp&&(a.flags|=128,R=!0,Wf(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),Wf(m,!0),m.tail===null&&m.tailMode==="hidden"&&!A.alternate&&!qt)return Nn(a),null}else 2*Le()-m.renderingStartTime>Vp&&f!==536870912&&(a.flags|=128,R=!0,Wf(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=ar.current,V(ar,R?f&1|2:f&1),qt&&us(a,m.treeForkCount),i):(Nn(a),null);case 22:case 23:return Co(a),pv(),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&&(Nn(a),a.subtreeFlags&6&&(a.flags|=8192)):Nn(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&&q(wl),null;case 24:return f=null,i!==null&&(f=i.memoizedState.cache),a.memoizedState.cache!==f&&(a.flags|=2048),ds(dr),Nn(a),null;case 25:return null;case 30:return null}throw Error(r(156,a.tag))}function q8(i,a){switch(J0(a),a.tag){case 1:return i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 3:return ds(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(Co(a),a.alternate===null)throw Error(r(340));vl()}return i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 13:if(Co(a),i=a.memoizedState,i!==null&&i.dehydrated!==null){if(a.alternate===null)throw Error(r(340));vl()}return i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 19:return q(ar),null;case 4:return ge(),null;case 10:return ds(a.type),null;case 22:case 23:return Co(a),pv(),i!==null&&q(wl),i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 24:return ds(dr),null;case 25:return null;default:return null}}function hT(i,a){switch(J0(a),a.tag){case 3:ds(dr),ge();break;case 26:case 27:case 5:Q(a);break;case 4:ge();break;case 31:a.memoizedState!==null&&Co(a);break;case 13:Co(a);break;case 19:q(ar);break;case 10:ds(a.type);break;case 22:case 23:Co(a),pv(),i!==null&&q(wl);break;case 24:ds(dr)}}function Yf(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){gn(a,a.return,W)}}function ia(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(Oe){gn(R,se,Oe)}}}m=m.next}while(m!==A)}}catch(Oe){gn(a,a.return,Oe)}}function pT(i){var a=i.updateQueue;if(a!==null){var f=i.stateNode;try{oC(a,f)}catch(m){gn(i,i.return,m)}}}function mT(i,a,f){f.props=Tl(i.type,i.memoizedProps),f.state=i.memoizedState;try{f.componentWillUnmount()}catch(m){gn(i,a,m)}}function Xf(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){gn(i,a,R)}}function Pi(i,a){var f=i.ref,m=i.refCleanup;if(f!==null)if(typeof m=="function")try{m()}catch(R){gn(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){gn(i,a,R)}else f.current=null}function gT(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){gn(i,i.return,R)}}function Kv(i,a,f){try{var m=i.stateNode;fL(m,i.type,f,a),m[Cn]=a}catch(R){gn(i,i.return,R)}}function yT(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&da(i.type)||i.tag===4}function Gv(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||yT(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&&da(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 Zv(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=le));else if(m!==4&&(m===27&&da(i.type)&&(f=i.stateNode,a=null),i=i.child,i!==null))for(Zv(i,a,f),i=i.sibling;i!==null;)Zv(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&&da(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 vT(i){var a=i.stateNode,f=i.memoizedProps;try{for(var m=i.type,R=a.attributes;R.length;)a.removeAttributeNode(R[0]);zr(a,m,f),a[Xt]=i,a[Cn]=f}catch(A){gn(i,i.return,A)}}var ys=!1,mr=!1,Wv=!1,bT=typeof WeakSet=="function"?WeakSet:Set,kr=null;function B8(i,a){if(i=i.containerInfo,gb=im,i=M2(i),V0(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,Oe=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&&++Oe===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(yb={focusedElem:i,selectionRange:f},im=!1,kr=a;kr!==null;)if(a=kr,i=a.child,(a.subtreeFlags&1028)!==0&&i!==null)i.return=a,kr=i;else for(;kr!==null;){switch(a=kr,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=Tl(f.type,R);i=m.getSnapshotBeforeUpdate(Xe,A),m.__reactInternalSnapshotBeforeUpdate=i}catch(ut){gn(f,f.return,ut)}}break;case 3:if((i&1024)!==0){if(i=a.stateNode.containerInfo,f=i.nodeType,f===9)Sb(i);else if(f===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":Sb(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,kr=i;break}kr=a.return}}function ST(i,a,f){var m=f.flags;switch(f.tag){case 0:case 11:case 15:bs(i,f),m&4&&Yf(5,f);break;case 1:if(bs(i,f),m&4)if(i=f.stateNode,a===null)try{i.componentDidMount()}catch(N){gn(f,f.return,N)}else{var R=Tl(f.type,a.memoizedProps);a=a.memoizedState;try{i.componentDidUpdate(R,a,i.__reactInternalSnapshotBeforeUpdate)}catch(N){gn(f,f.return,N)}}m&64&&pT(f),m&512&&Xf(f,f.return);break;case 3:if(bs(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{oC(i,a)}catch(N){gn(f,f.return,N)}}break;case 27:a===null&&m&4&&vT(f);case 26:case 5:bs(i,f),a===null&&m&4&&gT(f),m&512&&Xf(f,f.return);break;case 12:bs(i,f);break;case 31:bs(i,f),m&4&&_T(i,f);break;case 13:bs(i,f),m&4&&ET(i,f),m&64&&(i=f.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(f=J8.bind(null,f),bL(i,f))));break;case 22:if(m=f.memoizedState!==null||ys,!m){a=a!==null&&a.memoizedState!==null||mr,R=ys;var A=mr;ys=m,(mr=a)&&!A?Ss(i,f,(f.subtreeFlags&8772)!==0):bs(i,f),ys=R,mr=A}break;case 30:break;default:bs(i,f)}}function wT(i){var a=i.alternate;a!==null&&(i.alternate=null,wT(a)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(a=i.stateNode,a!==null&&xf(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,fo=!1;function vs(i,a,f){for(f=f.child;f!==null;)xT(i,a,f),f=f.sibling}function xT(i,a,f){if(pt&&typeof pt.onCommitFiberUnmount=="function")try{pt.onCommitFiberUnmount(bt,f)}catch{}switch(f.tag){case 26:mr||Pi(f,a),vs(i,a,f),f.memoizedState?f.memoizedState.count--:f.stateNode&&(f=f.stateNode,f.parentNode.removeChild(f));break;case 27:mr||Pi(f,a);var m=Bn,R=fo;da(f.type)&&(Bn=f.stateNode,fo=!1),vs(i,a,f),sd(f.stateNode),Bn=m,fo=R;break;case 5:mr||Pi(f,a);case 6:if(m=Bn,R=fo,Bn=null,vs(i,a,f),Bn=m,fo=R,Bn!==null)if(fo)try{(Bn.nodeType===9?Bn.body:Bn.nodeName==="HTML"?Bn.ownerDocument.body:Bn).removeChild(f.stateNode)}catch(A){gn(f,a,A)}else try{Bn.removeChild(f.stateNode)}catch(A){gn(f,a,A)}break;case 18:Bn!==null&&(fo?(i=Bn,pR(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,f.stateNode),Yc(i)):pR(Bn,f.stateNode));break;case 4:m=Bn,R=fo,Bn=f.stateNode.containerInfo,fo=!0,vs(i,a,f),Bn=m,fo=R;break;case 0:case 11:case 14:case 15:ia(2,f,a),mr||ia(4,f,a),vs(i,a,f);break;case 1:mr||(Pi(f,a),m=f.stateNode,typeof m.componentWillUnmount=="function"&&mT(f,a,m)),vs(i,a,f);break;case 21:vs(i,a,f);break;case 22:mr=(m=mr)||f.memoizedState!==null,vs(i,a,f),mr=m;break;default:vs(i,a,f)}}function _T(i,a){if(a.memoizedState===null&&(i=a.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{Yc(i)}catch(f){gn(a,a.return,f)}}}function ET(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){gn(a,a.return,f)}}function H8(i){switch(i.tag){case 31:case 13:case 19:var a=i.stateNode;return a===null&&(a=i.stateNode=new bT),a;case 22:return i=i.stateNode,a=i._retryCache,a===null&&(a=i._retryCache=new bT),a;default:throw Error(r(435,i.tag))}}function Lp(i,a){var f=H8(i);a.forEach(function(m){if(!f.has(m)){f.add(m);var R=eL.bind(null,i,m);m.then(R,R)}})}function ho(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(da(W.type)){Bn=W.stateNode,fo=!1;break e}break;case 5:Bn=W.stateNode,fo=!1;break e;case 3:case 4:Bn=W.stateNode.containerInfo,fo=!0;break e}W=W.return}if(Bn===null)throw Error(r(160));xT(A,N,R),Bn=null,fo=!1,A=R.alternate,A!==null&&(A.return=null),R.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)CT(a,i),a=a.sibling}var vi=null;function CT(i,a){var f=i.alternate,m=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:ho(a,i),po(i),m&4&&(ia(3,i,i.return),Yf(3,i),ia(5,i,i.return));break;case 1:ho(a,i),po(i),m&512&&(mr||f===null||Pi(f,f.return)),m&64&&ys&&(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=vi;if(ho(a,i),po(i),m&512&&(mr||f===null||Pi(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[il]||A[Xt]||A.namespaceURI==="http://www.w3.org/2000/svg"||A.hasAttribute("itemprop"))&&(A=R.createElement(m),R.head.insertBefore(A,R.querySelector("head > title"))),zr(A,m,f),A[Xt]=i,fr(A),m=A;break e;case"link":var N=CR("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),zr(A,m,f),R.head.appendChild(A);break;case"meta":if(N=CR("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),zr(A,m,f),R.head.appendChild(A);break;default:throw Error(r(468,m))}A[Xt]=i,fr(A),m=A}i.stateNode=m}else TR(R,i.type,i.stateNode);else i.stateNode=ER(R,m,i.memoizedProps);else A!==m?(A===null?f.stateNode!==null&&(f=f.stateNode,f.parentNode.removeChild(f)):A.count--,m===null?TR(R,i.type,i.stateNode):ER(R,m,i.memoizedProps)):m===null&&i.stateNode!==null&&Kv(i,i.memoizedProps,f.memoizedProps)}break;case 27:ho(a,i),po(i),m&512&&(mr||f===null||Pi(f,f.return)),f!==null&&m&4&&Kv(i,i.memoizedProps,f.memoizedProps);break;case 5:if(ho(a,i),po(i),m&512&&(mr||f===null||Pi(f,f.return)),i.flags&32){R=i.stateNode;try{Zs(R,"")}catch(Xe){gn(i,i.return,Xe)}}m&4&&i.stateNode!=null&&(R=i.memoizedProps,Kv(i,R,f!==null?f.memoizedProps:R)),m&1024&&(Wv=!0);break;case 6:if(ho(a,i),po(i),m&4){if(i.stateNode===null)throw Error(r(162));m=i.memoizedProps,f=i.stateNode;try{f.nodeValue=m}catch(Xe){gn(i,i.return,Xe)}}break;case 3:if(tm=null,R=vi,vi=Jp(a.containerInfo),ho(a,i),vi=R,po(i),m&4&&f!==null&&f.memoizedState.isDehydrated)try{Yc(a.containerInfo)}catch(Xe){gn(i,i.return,Xe)}Wv&&(Wv=!1,TT(i));break;case 4:m=vi,vi=Jp(i.stateNode.containerInfo),ho(a,i),po(i),vi=m;break;case 12:ho(a,i),po(i);break;case 31:ho(a,i),po(i),m&4&&(m=i.updateQueue,m!==null&&(i.updateQueue=null,Lp(i,m)));break;case 13:ho(a,i),po(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=ys,Oe=mr;if(ys=be||R,mr=Oe||se,ho(a,i),mr=Oe,ys=be,po(i),m&8192)e:for(a=i.stateNode,a._visibility=R?a._visibility&-2:a._visibility|1,R&&(f===null||se||ys||mr||Rl(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){gn(se,se.return,Xe)}}}else if(a.tag===6){if(f===null){se=a;try{se.stateNode.nodeValue=R?"":se.memoizedProps}catch(Xe){gn(se,se.return,Xe)}}}else if(a.tag===18){if(f===null){se=a;try{var Ee=se.stateNode;R?mR(Ee,!0):mR(se.stateNode,!1)}catch(Xe){gn(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:ho(a,i),po(i),m&4&&(m=i.updateQueue,m!==null&&(i.updateQueue=null,Lp(i,m)));break;case 30:break;case 21:break;default:ho(a,i),po(i)}}function po(i){var a=i.flags;if(a&2){try{for(var f,m=i.return;m!==null;){if(yT(m)){f=m;break}m=m.return}if(f==null)throw Error(r(160));switch(f.tag){case 27:var R=f.stateNode,A=Gv(i);zp(i,A,R);break;case 5:var N=f.stateNode;f.flags&32&&(Zs(N,""),f.flags&=-33);var W=Gv(i);zp(i,W,N);break;case 3:case 4:var se=f.stateNode.containerInfo,be=Gv(i);Zv(i,be,se);break;default:throw Error(r(161))}}catch(Oe){gn(i,i.return,Oe)}i.flags&=-3}a&4096&&(i.flags&=-4097)}function TT(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var a=i;TT(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),i=i.sibling}}function bs(i,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)ST(i,a.alternate,a),a=a.sibling}function Rl(i){for(i=i.child;i!==null;){var a=i;switch(a.tag){case 0:case 11:case 14:case 15:ia(4,a,a.return),Rl(a);break;case 1:Pi(a,a.return);var f=a.stateNode;typeof f.componentWillUnmount=="function"&&mT(a,a.return,f),Rl(a);break;case 27:sd(a.stateNode);case 26:case 5:Pi(a,a.return),Rl(a);break;case 22:a.memoizedState===null&&Rl(a);break;case 30:Rl(a);break;default:Rl(a)}i=i.sibling}}function Ss(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:Ss(R,A,f),Yf(4,A);break;case 1:if(Ss(R,A,f),m=A,R=m.stateNode,typeof R.componentDidMount=="function")try{R.componentDidMount()}catch(be){gn(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++)rC(se[R],W)}catch(be){gn(m,m.return,be)}}f&&N&64&&pT(A),Xf(A,A.return);break;case 27:vT(A);case 26:case 5:Ss(R,A,f),f&&m===null&&N&4&&gT(A),Xf(A,A.return);break;case 12:Ss(R,A,f);break;case 31:Ss(R,A,f),f&&N&4&&_T(R,A);break;case 13:Ss(R,A,f),f&&N&4&&ET(R,A);break;case 22:A.memoizedState===null&&Ss(R,A,f),Xf(A,A.return);break;case 30:break;default:Ss(R,A,f)}a=a.sibling}}function Yv(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&&If(f))}function Xv(i,a){i=null,a.alternate!==null&&(i=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==i&&(a.refCount++,i!=null&&If(i))}function bi(i,a,f,m){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)RT(i,a,f,m),a=a.sibling}function RT(i,a,f,m){var R=a.flags;switch(a.tag){case 0:case 11:case 15:bi(i,a,f,m),R&2048&&Yf(9,a);break;case 1:bi(i,a,f,m);break;case 3:bi(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&&If(i)));break;case 12:if(R&2048){bi(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){gn(a,a.return,se)}}else bi(i,a,f,m);break;case 31:bi(i,a,f,m);break;case 13:bi(i,a,f,m);break;case 23:break;case 22:A=a.stateNode,N=a.alternate,a.memoizedState!==null?A._visibility&2?bi(i,a,f,m):Qf(i,a):A._visibility&2?bi(i,a,f,m):(A._visibility|=2,Lc(i,a,f,m,(a.subtreeFlags&10256)!==0||!1)),R&2048&&Yv(N,a);break;case 24:bi(i,a,f,m),R&2048&&Xv(a.alternate,a);break;default:bi(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),Yf(8,N);break;case 23:break;case 22:var Oe=N.stateNode;N.memoizedState!==null?Oe._visibility&2?Lc(A,N,W,se,R):Qf(A,N):(Oe._visibility|=2,Lc(A,N,W,se,R)),R&&be&2048&&Yv(N.alternate,N);break;case 24:Lc(A,N,W,se,R),R&&be&2048&&Xv(N.alternate,N);break;default:Lc(A,N,W,se,R)}a=a.sibling}}function Qf(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:Qf(f,m),R&2048&&Yv(m.alternate,m);break;case 24:Qf(f,m),R&2048&&Xv(m.alternate,m);break;default:Qf(f,m)}a=a.sibling}}var Jf=8192;function Fc(i,a,f){if(i.subtreeFlags&Jf)for(i=i.child;i!==null;)OT(i,a,f),i=i.sibling}function OT(i,a,f){switch(i.tag){case 26:Fc(i,a,f),i.flags&Jf&&i.memoizedState!==null&&ML(f,vi,i.memoizedState,i.memoizedProps);break;case 5:Fc(i,a,f);break;case 3:case 4:var m=vi;vi=Jp(i.stateNode.containerInfo),Fc(i,a,f),vi=m;break;case 22:i.memoizedState===null&&(m=i.alternate,m!==null&&m.memoizedState!==null?(m=Jf,Jf=16777216,Fc(i,a,f),Jf=m):Fc(i,a,f));break;default:Fc(i,a,f)}}function AT(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 ed(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];kr=m,MT(m,i)}AT(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)kT(i),i=i.sibling}function kT(i){switch(i.tag){case 0:case 11:case 15:ed(i),i.flags&2048&&ia(9,i,i.return);break;case 3:ed(i);break;case 12:ed(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)):ed(i);break;default:ed(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];kr=m,MT(m,i)}AT(i)}for(i=i.child;i!==null;){switch(a=i,a.tag){case 0:case 11:case 15:ia(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 MT(i,a){for(;kr!==null;){var f=kr;switch(f.tag){case 0:case 11:case 15:ia(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:If(f.memoizedState.cache)}if(m=f.child,m!==null)m.return=f,kr=m;else e:for(f=i;kr!==null;){m=kr;var R=m.sibling,A=m.return;if(wT(m),m===f){kr=null;break e}if(R!==null){R.return=A,kr=R;break e}kr=A}}}var K8={getCacheForType:function(i){var a=$r(dr),f=a.data.get(i);return f===void 0&&(f=i(),a.data.set(i,f)),f},cacheSignal:function(){return $r(dr).controller.signal}},G8=typeof WeakMap=="function"?WeakMap:Map,an=0,Tn=null,$t=null,zt=0,mn=0,To=null,sa=!1,Uc=!1,Qv=!1,ws=0,nr=0,aa=0,Ol=0,Jv=0,Ro=0,Vc=0,td=null,mo=null,eb=!1,Up=0,jT=0,Vp=1/0,qp=null,la=null,_r=0,ca=null,qc=null,xs=0,tb=0,nb=null,PT=null,nd=0,rb=null;function Oo(){return(an&2)!==0&&zt!==0?zt&-zt:Z.T!==null?cb():sr()}function NT(){if(Ro===0)if((zt&536870912)===0||qt){var i=ln;ln<<=1,(ln&3932160)===0&&(ln=262144),Ro=i}else Ro=536870912;return i=Eo.current,i!==null&&(i.flags|=32),Ro}function go(i,a,f){(i===Tn&&(mn===2||mn===9)||i.cancelPendingCommit!==null)&&(Bc(i,0),ua(i,zt,Ro,!1)),En(i,f),((an&2)===0||i!==Tn)&&(i===Tn&&((an&2)===0&&(Ol|=f),nr===4&&ua(i,zt,Ro,!1)),Ni(i))}function DT(i,a,f){if((an&6)!==0)throw Error(r(327));var m=!f&&(a&127)===0&&(a&i.expiredLanes)===0||Nt(i,a),R=m?Y8(i,a):ib(i,a,!0),A=m;do{if(R===0){Uc&&!m&&ua(i,a,0,!1);break}else{if(f=i.current.alternate,A&&!Z8(f)){R=ib(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=td;var se=W.current.memoizedState.isDehydrated;if(se&&(Bc(W,N).flags|=256),N=ib(W,N,!1),N!==2){if(Qv&&!se){W.errorRecoveryDisabledLanes|=A,Ol|=A,R=4;break e}A=mo,mo=R,A!==null&&(mo===null?mo=A:mo.push.apply(mo,A))}R=N}if(A=!1,R!==2)continue}}if(R===1){Bc(i,0),ua(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:ua(m,a,Ro,!sa);break e;case 2:mo=null;break;case 3:case 5:break;default:throw Error(r(329))}if((a&62914560)===a&&(R=Up+300-Le(),10<R)){if(ua(m,a,Ro,!sa),vt(m,0,!0)!==0)break e;xs=a,m.timeoutHandle=dR($T.bind(null,m,f,mo,qp,eb,a,Ro,Ol,Vc,sa,A,"Throttled",-0,0),R);break e}$T(m,f,mo,qp,eb,a,Ro,Ol,Vc,sa,A,null,-0,0)}}break}while(!0);Ni(i)}function $T(i,a,f,m,R,A,N,W,se,be,Oe,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:le},OT(a,A,Pe);var Xe=(A&62914560)===A?Up-Le():(A&4194048)===A?jT-Le():0;if(Xe=jL(Pe,Xe),Xe!==null){xs=A,i.cancelPendingCommit=Xe(BT.bind(null,i,a,A,f,m,R,N,W,se,Oe,Pe,null,Se,Ee)),ua(i,A,N,!be);return}}BT(i,a,A,f,m,R,N,W,se)}function Z8(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(!xo(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 ua(i,a,f,m){a&=~Jv,a&=~Ol,i.suspendedLanes|=a,i.pingedLanes&=~a,m&&(i.warmLanes|=a),m=i.expirationTimes;for(var R=a;0<R;){var A=31-Ut(R),N=1<<A;m[A]=-1,R&=~N}f!==0&&Vn(i,f,a)}function Bp(){return(an&6)===0?(rd(0),!1):!0}function ob(){if($t!==null){if(mn===0)var i=$t.return;else i=$t,fs=bl=null,Sv(i),Nc=null,Lf=0,i=$t;for(;i!==null;)hT(i.alternate,i),i=i.return;$t=null}}function Bc(i,a){var f=i.timeoutHandle;f!==-1&&(i.timeoutHandle=-1,pL(f)),f=i.cancelPendingCommit,f!==null&&(i.cancelPendingCommit=null,f()),xs=0,ob(),Tn=i,$t=f=cs(i.current,null),zt=a,mn=0,To=null,sa=!1,Uc=Nt(i,a),Qv=!1,Vc=Ro=Jv=Ol=aa=nr=0,mo=td=null,eb=!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-Ut(m),A=1<<R;a|=i[R],m&=~A}return ws=a,fp(),f}function IT(i,a){_t=null,Z.H=Gf,a===Pc||a===bp?(a=J2(),mn=3):a===lv?(a=J2(),mn=4):mn=a===$v?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,To=a,$t===null&&(nr=1,Pp(i,qo(a,i.current)))}function zT(){var i=Eo.current;return i===null?!0:(zt&4194048)===zt?Go===null:(zt&62914560)===zt||(zt&536870912)!==0?i===Go:!1}function LT(){var i=Z.H;return Z.H=Gf,i===null?Gf:i}function FT(){var i=Z.A;return Z.A=K8,i}function Hp(){nr=4,sa||(zt&4194048)!==zt&&Eo.current!==null||(Uc=!0),(aa&134217727)===0&&(Ol&134217727)===0||Tn===null||ua(Tn,zt,Ro,!1)}function ib(i,a,f){var m=an;an|=2;var R=LT(),A=FT();(Tn!==i||zt!==a)&&(qp=null,Bc(i,a)),a=!1;var N=nr;e:do try{if(mn!==0&&$t!==null){var W=$t,se=To;switch(mn){case 8:ob(),N=6;break e;case 3:case 2:case 9:case 6:Eo.current===null&&(a=!0);var be=mn;if(mn=0,To=null,Hc(i,W,se,be),f&&Uc){N=0;break e}break;default:be=mn,mn=0,To=null,Hc(i,W,se,be)}}W8(),N=nr;break}catch(Oe){IT(i,Oe)}while(!0);return a&&i.shellSuspendCounter++,fs=bl=null,an=m,Z.H=R,Z.A=A,$t===null&&(Tn=null,zt=0,fp()),N}function W8(){for(;$t!==null;)UT($t)}function Y8(i,a){var f=an;an|=2;var m=LT(),R=FT();Tn!==i||zt!==a?(qp=null,Vp=Le()+500,Bc(i,a)):Uc=Nt(i,a);e:do try{if(mn!==0&&$t!==null){a=$t;var A=To;t:switch(mn){case 1:mn=0,To=null,Hc(i,a,A,1);break;case 2:case 9:if(X2(A)){mn=0,To=null,VT(a);break}a=function(){mn!==2&&mn!==9||Tn!==i||(mn=7),Ni(i)},A.then(a,a);break e;case 3:mn=7;break e;case 4:mn=5;break e;case 7:X2(A)?(mn=0,To=null,VT(a)):(mn=0,To=null,Hc(i,a,A,7));break;case 5:var N=null;switch($t.tag){case 26:N=$t.memoizedState;case 5:case 27:var W=$t;if(N?RR(N):W.stateNode.complete){mn=0,To=null;var se=W.sibling;if(se!==null)$t=se;else{var be=W.return;be!==null?($t=be,Kp(be)):$t=null}break t}}mn=0,To=null,Hc(i,a,A,5);break;case 6:mn=0,To=null,Hc(i,a,A,6);break;case 8:ob(),nr=6;break e;default:throw Error(r(462))}}X8();break}catch(Oe){IT(i,Oe)}while(!0);return fs=bl=null,Z.H=m,Z.A=R,an=f,$t!==null?0:(Tn=null,zt=0,fp(),nr)}function X8(){for(;$t!==null&&!We();)UT($t)}function UT(i){var a=fT(i.alternate,i,ws);i.memoizedProps=i.pendingProps,a===null?Kp(i):$t=a}function VT(i){var a=i,f=a.alternate;switch(a.tag){case 15:case 0:a=iT(f,a,a.pendingProps,a.type,void 0,zt);break;case 11:a=iT(f,a,a.pendingProps,a.type.render,a.ref,zt);break;case 5:Sv(a);default:hT(f,a),a=$t=F2(a,ws),a=fT(f,a,ws)}i.memoizedProps=i.pendingProps,a===null?Kp(i):$t=a}function Hc(i,a,f,m){fs=bl=null,Sv(a),Nc=null,Lf=0;var R=a.return;try{if(L8(i,R,a,f,zt)){nr=1,Pp(i,qo(f,i.current)),$t=null;return}}catch(A){if(R!==null)throw $t=R,A;nr=1,Pp(i,qo(f,i.current)),$t=null;return}a.flags&32768?(qt||m===1?i=!0:Uc||(zt&536870912)!==0?i=!1:(sa=i=!0,(m===2||m===9||m===3||m===6)&&(m=Eo.current,m!==null&&m.tag===13&&(m.flags|=16384))),qT(a,i)):Kp(a)}function Kp(i){var a=i;do{if((a.flags&32768)!==0){qT(a,sa);return}i=a.return;var f=V8(a.alternate,a,ws);if(f!==null){$t=f;return}if(a=a.sibling,a!==null){$t=a;return}$t=a=i}while(a!==null);nr===0&&(nr=5)}function qT(i,a){do{var f=q8(i.alternate,i);if(f!==null){f.flags&=32767,$t=f;return}if(f=i.return,f!==null&&(f.flags|=32768,f.subtreeFlags=0,f.deletions=null),!a&&(i=i.sibling,i!==null)){$t=i;return}$t=i=f}while(i!==null);nr=6,$t=null}function BT(i,a,f,m,R,A,N,W,se){i.cancelPendingCommit=null;do Gp();while(_r!==0);if((an&6)!==0)throw Error(r(327));if(a!==null){if(a===i.current)throw Error(r(177));if(A=a.lanes|a.childLanes,A|=G0,pn(i,f,A,N,W,se),i===Tn&&($t=Tn=null,zt=0),qc=a,ca=i,xs=f,tb=A,nb=R,PT=m,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,tL(pe,function(){return WT(),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=an,an|=4;try{B8(i,a,f)}finally{an=N,H.p=R,Z.T=m}}_r=1,HT(),KT(),GT()}}function HT(){if(_r===1){_r=0;var i=ca,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=an;an|=4;try{CT(a,i);var A=yb,N=M2(i.containerInfo),W=A.focusedElem,se=A.selectionRange;if(N!==W&&W&&W.ownerDocument&&k2(W.ownerDocument.documentElement,W)){if(se!==null&&V0(W)){var be=se.start,Oe=se.end;if(Oe===void 0&&(Oe=be),"selectionStart"in W)W.selectionStart=be,W.selectionEnd=Math.min(Oe,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=A2(W,ut),fe=A2(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=!!gb,yb=gb=null}finally{an=R,H.p=m,Z.T=f}}i.current=a,_r=2}}function KT(){if(_r===2){_r=0;var i=ca,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=an;an|=4;try{ST(i,a.alternate,a)}finally{an=R,H.p=m,Z.T=f}}_r=3}}function GT(){if(_r===4||_r===3){_r=0,ze();var i=ca,a=qc,f=xs,m=PT;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?_r=5:(_r=0,qc=ca=null,ZT(i,i.pendingLanes));var R=i.pendingLanes;if(R===0&&(la=null),Yt(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}}(xs&3)!==0&&Gp(),Ni(i),R=i.pendingLanes,(f&261930)!==0&&(R&42)!==0?i===rb?nd++:(nd=0,rb=i):nd=0,rd(0)}}function ZT(i,a){(i.pooledCacheLanes&=a)===0&&(a=i.pooledCache,a!=null&&(i.pooledCache=null,If(a)))}function Gp(){return HT(),KT(),GT(),WT()}function WT(){if(_r!==5)return!1;var i=ca,a=tb;tb=0;var f=Yt(xs),m=Z.T,R=H.p;try{H.p=32>f?32:f,Z.T=null,f=nb,nb=null;var A=ca,N=xs;if(_r=0,qc=ca=null,xs=0,(an&6)!==0)throw Error(r(331));var W=an;if(an|=4,kT(A.current),RT(A,A.current,N,f),an=W,rd(0,!1),pt&&typeof pt.onPostCommitFiberRoot=="function")try{pt.onPostCommitFiberRoot(bt,A)}catch{}return!0}finally{H.p=R,Z.T=m,ZT(i,a)}}function YT(i,a,f){a=qo(f,a),a=Dv(i.stateNode,a,2),i=na(i,a,2),i!==null&&(En(i,2),Ni(i))}function gn(i,a,f){if(i.tag===3)YT(i,i,f);else for(;a!==null;){if(a.tag===3){YT(a,i,f);break}else if(a.tag===1){var m=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(la===null||!la.has(m))){i=qo(f,i),f=XC(2),m=na(a,f,2),m!==null&&(QC(f,m,a,i),En(m,2),Ni(m));break}}a=a.return}}function sb(i,a,f){var m=i.pingCache;if(m===null){m=i.pingCache=new G8;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)||(Qv=!0,R.add(f),i=Q8.bind(null,i,a,f),a.then(i,i))}function Q8(i,a,f){var m=i.pingCache;m!==null&&m.delete(a),i.pingedLanes|=i.suspendedLanes&f,i.warmLanes&=~f,Tn===i&&(zt&f)===f&&(nr===4||nr===3&&(zt&62914560)===zt&&300>Le()-Up?(an&2)===0&&Bc(i,0):Jv|=f,Vc===zt&&(Vc=0)),Ni(i)}function XT(i,a){a===0&&(a=ft()),i=gl(i,a),i!==null&&(En(i,a),Ni(i))}function J8(i){var a=i.memoizedState,f=0;a!==null&&(f=a.retryLane),XT(i,f)}function eL(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),XT(i,f)}function tL(i,a){return Fe(i,a)}var Zp=null,Kc=null,ab=!1,Wp=!1,lb=!1,fa=0;function Ni(i){i!==Kc&&i.next===null&&(Kc===null?Zp=Kc=i:Kc=Kc.next=i),Wp=!0,ab||(ab=!0,rL())}function rd(i,a){if(!lb&&Wp){lb=!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-Ut(42|i)+1)-1,A&=R&~(N&~W),A=A&201326741?A&201326741|1:A?A|2:0}A!==0&&(f=!0,tR(m,A))}else A=zt,A=vt(m,m===Tn?A:0,m.cancelPendingCommit!==null||m.timeoutHandle!==-1),(A&3)===0||Nt(m,A)||(f=!0,tR(m,A));m=m.next}while(f);lb=!1}}function nL(){QT()}function QT(){Wp=ab=!1;var i=0;fa!==0&&hL()&&(i=fa);for(var a=Le(),f=null,m=Zp;m!==null;){var R=m.next,A=JT(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}_r!==0&&_r!==5||rd(i),fa!==0&&(fa=0)}function JT(i,a){for(var f=i.suspendedLanes,m=i.pingedLanes,R=i.expirationTimes,A=i.pendingLanes&-62914561;0<A;){var N=31-Ut(A),W=1<<N,se=R[N];se===-1?((W&f)===0||(W&m)!==0)&&(R[N]=jn(W,a)):se<=a&&(i.expiredLanes|=W),A&=~W}if(a=Tn,f=zt,f=vt(i,i===a?f:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),m=i.callbackNode,f===0||i===a&&(mn===2||mn===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),Yt(f)){case 2:case 8:f=Ce;break;case 32:f=pe;break;case 268435456:f=He;break;default:f=pe}return m=eR.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 eR(i,a){if(_r!==0&&_r!==5)return i.callbackNode=null,i.callbackPriority=0,null;var f=i.callbackNode;if(Gp()&&i.callbackNode!==f)return null;var m=zt;return m=vt(i,i===Tn?m:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),m===0?null:(DT(i,m,a),JT(i,Le()),i.callbackNode!=null&&i.callbackNode===f?eR.bind(null,i):null)}function tR(i,a){if(Gp())return null;DT(i,a,!0)}function rL(){mL(function(){(an&6)!==0?Fe(dt,nL):QT()})}function cb(){if(fa===0){var i=Mc;i===0&&(i=Vt,Vt<<=1,(Vt&261888)===0&&(Vt=256)),fa=i}return fa}function nR(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:me(""+i)}function rR(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 oL(i,a,f,m,R){if(a==="submit"&&f&&f.stateNode===R){var A=nR((R[Cn]||null).action),N=m.submitter;N&&(a=(a=N[Cn]||null)?nR(a.formAction):N.getAttribute("formAction"),a!==null&&(A=a,N=null));var W=new cl("action","action",null,m,R);i.push({event:W,listeners:[{instance:null,listener:function(){if(m.defaultPrevented){if(fa!==0){var se=N?rR(R,N):new FormData(R);Av(f,{pending:!0,data:se,method:R.method,action:A},null,se)}}else typeof A=="function"&&(W.preventDefault(),se=N?rR(R,N):new FormData(R),Av(f,{pending:!0,data:se,method:R.method,action:A},A,se))},currentTarget:R}]})}}for(var ub=0;ub<K0.length;ub++){var fb=K0[ub],iL=fb.toLowerCase(),sL=fb[0].toUpperCase()+fb.slice(1);yi(iL,"on"+sL)}yi(N2,"onAnimationEnd"),yi(D2,"onAnimationIteration"),yi($2,"onAnimationStart"),yi("dblclick","onDoubleClick"),yi("focusin","onFocus"),yi("focusout","onBlur"),yi(x8,"onTransitionRun"),yi(_8,"onTransitionStart"),yi(E8,"onTransitionCancel"),yi(I2,"onTransitionEnd"),Hs("onMouseEnter",["mouseout","mouseover"]),Hs("onMouseLeave",["mouseout","mouseover"]),Hs("onPointerEnter",["pointerout","pointerover"]),Hs("onPointerLeave",["pointerout","pointerover"]),di("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),di("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),di("onBeforeInput",["compositionend","keypress","textInput","paste"]),di("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),di("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),di("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var od="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(" "),aL=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(od));function oR(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(Oe){up(Oe)}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(Oe){up(Oe)}R.currentTarget=null,A=se}}}}function It(i,a){var f=a[So];f===void 0&&(f=a[So]=new Set);var m=i+"__bubble";f.has(m)||(iR(a,i,2,!1),f.add(m))}function db(i,a,f){var m=0;a&&(m|=4),iR(f,i,m,a)}var Yp="_reactListening"+Math.random().toString(36).slice(2);function hb(i){if(!i[Yp]){i[Yp]=!0,rp.forEach(function(f){f!=="selectionchange"&&(aL.has(f)||db(f,!1,i),db(f,!0,i))});var a=i.nodeType===9?i:i.ownerDocument;a===null||a[Yp]||(a[Yp]=!0,db("selectionchange",!1,a))}}function iR(i,a,f,m){switch(NR(a)){case 2:var R=DL;break;case 8:R=$L;break;default:R=Ob}f=R.bind(null,a,f,i),R=void 0,!Qt||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 pb(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=Vs(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}Ct(function(){var be=A,Oe=De(f),Pe=[];e:{var Se=z2.get(i);if(Se!==void 0){var Ee=cl,Xe=i;switch(i){case"keypress":if(hi(f)===0)break e;case"keydown":case"keyup":Ee=e8;break;case"focusin":Xe="focus",Ee=I0;break;case"focusout":Xe="blur",Ee=I0;break;case"beforeblur":case"afterblur":Ee=I0;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=h2;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Ee=Vz;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Ee=r8;break;case N2:case D2:case $2:Ee=Hz;break;case I2:Ee=i8;break;case"scroll":case"scrollend":Ee=Af;break;case"wheel":Ee=a8;break;case"copy":case"cut":case"paste":Ee=Gz;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Ee=m2;break;case"toggle":case"beforetoggle":Ee=c8}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=Ot(fe,he),je!=null&&ut.push(id(fe,je,ve))),xn)break;fe=fe.return}0<ut.length&&(Se=new Ee(Se,Xe,null,f,Oe),Pe.push({event:Se,listeners:ut}))}}if((a&7)===0){e:{if(Se=i==="mouseover"||i==="pointerover",Ee=i==="mouseout"||i==="pointerout",Se&&f!==Me&&(Xe=f.relatedTarget||f.fromElement)&&(Vs(Xe)||Xe[Pr]))break e;if((Ee||Se)&&(Se=Oe.window===Oe?Oe:(Se=Oe.ownerDocument)?Se.defaultView||Se.parentWindow:window,Ee?(Xe=f.relatedTarget||f.toElement,Ee=be,Xe=Xe?Vs(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=h2,je="onMouseLeave",he="onMouseEnter",fe="mouse",(i==="pointerout"||i==="pointerover")&&(ut=m2,je="onPointerLeave",he="onPointerEnter",fe="pointer"),xn=Ee==null?Se:sl(Ee),ve=Xe==null?Se:sl(Xe),Se=new ut(je,fe+"leave",Ee,f,Oe),Se.target=xn,Se.relatedTarget=ve,je=null,Vs(Oe)===be&&(ut=new ut(he,fe+"enter",Xe,f,Oe),ut.target=ve,ut.relatedTarget=xn,je=ut),xn=je,Ee&&Xe)t:{for(ut=lL,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&&sR(Pe,Se,Ee,ut,!1),Xe!==null&&xn!==null&&sR(Pe,xn,Xe,ut,!0)}}e:{if(Se=be?sl(be):window,Ee=Se.nodeName&&Se.nodeName.toLowerCase(),Ee==="select"||Ee==="input"&&Se.type==="file")var Jt=_2;else if(w2(Se))if(E2)Jt=b8;else{Jt=y8;var et=g8}else Ee=Se.nodeName,!Ee||Ee.toLowerCase()!=="input"||Se.type!=="checkbox"&&Se.type!=="radio"?be&&K(be.elementType)&&(Jt=_2):Jt=v8;if(Jt&&(Jt=Jt(i,be))){x2(Pe,Jt,f,Oe);break e}et&&et(i,Se,be),i==="focusout"&&be&&Se.type==="number"&&be.memoizedProps.value!=null&&Of(Se,"number",Se.value)}switch(et=be?sl(be):window,i){case"focusin":(w2(et)||et.contentEditable==="true")&&(_c=et,q0=be,Nf=null);break;case"focusout":Nf=q0=_c=null;break;case"mousedown":B0=!0;break;case"contextmenu":case"mouseup":case"dragend":B0=!1,j2(Pe,f,Oe);break;case"selectionchange":if(w8)break;case"keydown":case"keyup":j2(Pe,f,Oe)}var Tt;if(L0)e:{switch(i){case"compositionstart":var Lt="onCompositionStart";break e;case"compositionend":Lt="onCompositionEnd";break e;case"compositionupdate":Lt="onCompositionUpdate";break e}Lt=void 0}else xc?b2(i,f)&&(Lt="onCompositionEnd"):i==="keydown"&&f.keyCode===229&&(Lt="onCompositionStart");Lt&&(g2&&f.locale!=="ko"&&(xc||Lt!=="onCompositionStart"?Lt==="onCompositionEnd"&&xc&&(Tt=Ws()):(cn=Oe,uo="value"in cn?cn.value:cn.textContent,xc=!0)),et=Xp(be,Lt),0<et.length&&(Lt=new p2(Lt,i,null,f,Oe),Pe.push({event:Lt,listeners:et}),Tt?Lt.data=Tt:(Tt=S2(f),Tt!==null&&(Lt.data=Tt)))),(Tt=f8?d8(i,f):h8(i,f))&&(Lt=Xp(be,"onBeforeInput"),0<Lt.length&&(et=new p2("onBeforeInput","beforeinput",null,f,Oe),Pe.push({event:et,listeners:Lt}),et.data=Tt)),oL(Pe,i,be,f,Oe)}oR(Pe,a)})}function id(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=Ot(i,f),R!=null&&m.unshift(id(i,R,A)),R=Ot(i,a),R!=null&&m.push(id(i,R,A))),i.tag===3)return m;i=i.return}return[]}function lL(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function sR(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=Ot(f,A),be!=null&&N.unshift(id(f,be,se))):R||(be=Ot(f,A),be!=null&&N.push(id(f,be,se)))),f=f.return}N.length!==0&&i.push({event:a,listeners:N})}var cL=/\r\n?/g,uL=/\u0000|\uFFFD/g;function aR(i){return(typeof i=="string"?i:""+i).replace(cL,`
|
|
9
|
+
`).replace(uL,"")}function lR(i,a){return a=aR(a),aR(i)===a}function wn(i,a,f,m,R,A){switch(f){case"children":typeof m=="string"?a==="body"||a==="textarea"&&m===""||Zs(i,m):(typeof m=="number"||typeof m=="bigint")&&a!=="body"&&Zs(i,""+m);break;case"className":Sc(i,"class",m);break;case"tabIndex":Sc(i,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":Sc(i,f,m);break;case"style":F(i,m,A);break;case"data":if(a!=="object"){Sc(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=me(""+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=me(""+m),i.setAttribute(f,m);break;case"onClick":m!=null&&(i.onclick=le);break;case"onScroll":m!=null&&It("scroll",i);break;case"onScrollEnd":m!=null&&It("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=me(""+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":It("beforetoggle",i),It("toggle",i),al(i,"popover",m);break;case"xlinkActuate":Uo(i,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":Uo(i,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":Uo(i,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":Uo(i,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":Uo(i,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":Uo(i,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":Uo(i,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":Uo(i,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":Uo(i,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":al(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=ce.get(f)||f,al(i,f,m))}}function mb(i,a,f,m,R,A){switch(f){case"style":F(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"?Zs(i,m):(typeof m=="number"||typeof m=="bigint")&&Zs(i,""+m);break;case"onScroll":m!=null&&It("scroll",i);break;case"onScrollEnd":m!=null&&It("scrollend",i);break;case"onClick":m!=null&&(i.onclick=le);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!_f.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,""):al(i,f,m)}}}function zr(i,a,f){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":It("error",i),It("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":It("invalid",i);var W=A=N=R=null,se=null,be=null;for(m in f)if(f.hasOwnProperty(m)){var Oe=f[m];if(Oe!=null)switch(m){case"name":R=Oe;break;case"type":N=Oe;break;case"checked":se=Oe;break;case"defaultChecked":be=Oe;break;case"value":A=Oe;break;case"defaultValue":W=Oe;break;case"children":case"dangerouslySetInnerHTML":if(Oe!=null)throw Error(r(137,a));break;default:wn(i,a,m,Oe,f,null)}}ap(i,A,W,se,be,N,R,!1);return;case"select":It("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?Gs(i,!!m,a,!1):f!=null&&Gs(i,!!m,f,!0);return;case"textarea":It("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)}ll(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":It("beforetoggle",i),It("toggle",i),It("cancel",i),It("close",i);break;case"iframe":case"object":It("load",i);break;case"video":case"audio":for(m=0;m<od.length;m++)It(od[m],i);break;case"image":It("error",i),It("load",i);break;case"details":It("toggle",i);break;case"embed":case"source":case"link":It("error",i),It("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(K(a)){for(Oe in f)f.hasOwnProperty(Oe)&&(m=f[Oe],m!==void 0&&mb(i,a,Oe,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 fL(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,Oe=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":Oe=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)}}Ks(i,N,W,se,be,Oe,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?Gs(i,!!f,Se,!1):!!m!=!!f&&(a!=null?Gs(i,!!f,a,!0):Gs(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)}lp(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(K(a)){for(var xn in f)Se=f[xn],f.hasOwnProperty(xn)&&Se!==void 0&&!m.hasOwnProperty(xn)&&mb(i,a,xn,void 0,m,Se);for(Oe in m)Se=m[Oe],Ee=f[Oe],!m.hasOwnProperty(Oe)||Se===Ee||Se===void 0&&Ee===void 0||mb(i,a,Oe,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 cR(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function dL(){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&&cR(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 Oe=se.transferSize,Pe=se.initiatorType;Oe&&cR(Pe)&&(se=se.responseEnd,N+=Oe*(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 gb=null,yb=null;function Qp(i){return i.nodeType===9?i:i.ownerDocument}function uR(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 fR(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 vb(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 bb=null;function hL(){var i=window.event;return i&&i.type==="popstate"?i===bb?!1:(bb=i,!0):(bb=null,!1)}var dR=typeof setTimeout=="function"?setTimeout:void 0,pL=typeof clearTimeout=="function"?clearTimeout:void 0,hR=typeof Promise=="function"?Promise:void 0,mL=typeof queueMicrotask=="function"?queueMicrotask:typeof hR<"u"?function(i){return hR.resolve(null).then(i).catch(gL)}:dR;function gL(i){setTimeout(function(){throw i})}function da(i){return i==="head"}function pR(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")sd(i.ownerDocument.documentElement);else if(f==="head"){f=i.ownerDocument.head,sd(f);for(var A=f.firstChild;A;){var N=A.nextSibling,W=A.nodeName;A[il]||W==="SCRIPT"||W==="STYLE"||W==="LINK"&&A.rel.toLowerCase()==="stylesheet"||f.removeChild(A),A=N}}else f==="body"&&sd(i.ownerDocument.body);f=R}while(f);Yc(a)}function mR(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 Sb(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":Sb(f),xf(f);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(f.rel.toLowerCase()==="stylesheet")continue}i.removeChild(f)}}function yL(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[il])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=Zo(i.nextSibling),i===null)break}return null}function vL(i,a,f){if(a==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!f||(i=Zo(i.nextSibling),i===null))return null;return i}function gR(i,a){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!a||(i=Zo(i.nextSibling),i===null))return null;return i}function wb(i){return i.data==="$?"||i.data==="$~"}function xb(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function bL(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 Zo(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 _b=null;function yR(i){i=i.nextSibling;for(var a=0;i;){if(i.nodeType===8){var f=i.data;if(f==="/$"||f==="/&"){if(a===0)return Zo(i.nextSibling);a--}else f!=="$"&&f!=="$!"&&f!=="$?"&&f!=="$~"&&f!=="&"||a++}i=i.nextSibling}return null}function vR(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 bR(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 sd(i){for(var a=i.attributes;a.length;)i.removeAttributeNode(a[0]);xf(i)}var Wo=new Map,SR=new Set;function Jp(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var _s=H.d;H.d={f:SL,r:wL,D:xL,C:_L,L:EL,m:CL,X:RL,S:TL,M:OL};function SL(){var i=_s.f(),a=Bp();return i||a}function wL(i){var a=qs(i);a!==null&&a.tag===5&&a.type==="form"?IC(a):_s.r(i)}var Gc=typeof document>"u"?null:document;function wR(i,a,f){var m=Gc;if(m&&typeof a=="string"&&a){var R=co(a);R='link[rel="'+i+'"][href="'+R+'"]',typeof f=="string"&&(R+='[crossorigin="'+f+'"]'),SR.has(R)||(SR.add(R),i={rel:i,crossOrigin:f,href:a},m.querySelector(R)===null&&(a=m.createElement("link"),zr(a,"link",i),fr(a),m.head.appendChild(a)))}}function xL(i){_s.D(i),wR("dns-prefetch",i,null)}function _L(i,a){_s.C(i,a),wR("preconnect",i,a)}function EL(i,a,f){_s.L(i,a,f);var m=Gc;if(m&&i&&a){var R='link[rel="preload"][as="'+co(a)+'"]';a==="image"&&f&&f.imageSrcSet?(R+='[imagesrcset="'+co(f.imageSrcSet)+'"]',typeof f.imageSizes=="string"&&(R+='[imagesizes="'+co(f.imageSizes)+'"]')):R+='[href="'+co(i)+'"]';var A=R;switch(a){case"style":A=Zc(i);break;case"script":A=Wc(i)}Wo.has(A)||(i=p({rel:"preload",href:a==="image"&&f&&f.imageSrcSet?void 0:i,as:a},f),Wo.set(A,i),m.querySelector(R)!==null||a==="style"&&m.querySelector(ad(A))||a==="script"&&m.querySelector(ld(A))||(a=m.createElement("link"),zr(a,"link",i),fr(a),m.head.appendChild(a)))}}function CL(i,a){_s.m(i,a);var f=Gc;if(f&&i){var m=a&&typeof a.as=="string"?a.as:"script",R='link[rel="modulepreload"][as="'+co(m)+'"][href="'+co(i)+'"]',A=R;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":A=Wc(i)}if(!Wo.has(A)&&(i=p({rel:"modulepreload",href:i},a),Wo.set(A,i),f.querySelector(R)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(f.querySelector(ld(A)))return}m=f.createElement("link"),zr(m,"link",i),fr(m),f.head.appendChild(m)}}}function TL(i,a,f){_s.S(i,a,f);var m=Gc;if(m&&i){var R=Bs(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(ad(A)))W.loading=5;else{i=p({rel:"stylesheet",href:i,"data-precedence":a},f),(f=Wo.get(A))&&Eb(i,f);var se=N=m.createElement("link");fr(se),zr(se,"link",i),se._p=new Promise(function(be,Oe){se.onload=be,se.onerror=Oe}),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 RL(i,a){_s.X(i,a);var f=Gc;if(f&&i){var m=Bs(f).hoistableScripts,R=Wc(i),A=m.get(R);A||(A=f.querySelector(ld(R)),A||(i=p({src:i,async:!0},a),(a=Wo.get(R))&&Cb(i,a),A=f.createElement("script"),fr(A),zr(A,"link",i),f.head.appendChild(A)),A={type:"script",instance:A,count:1,state:null},m.set(R,A))}}function OL(i,a){_s.M(i,a);var f=Gc;if(f&&i){var m=Bs(f).hoistableScripts,R=Wc(i),A=m.get(R);A||(A=f.querySelector(ld(R)),A||(i=p({src:i,async:!0,type:"module"},a),(a=Wo.get(R))&&Cb(i,a),A=f.createElement("script"),fr(A),zr(A,"link",i),f.head.appendChild(A)),A={type:"script",instance:A,count:1,state:null},m.set(R,A))}}function xR(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=Bs(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=Bs(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(ad(i)))&&!A._p&&(N.instance=A,N.state.loading=5),Wo.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},Wo.set(i,f),A||AL(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=Bs(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="'+co(i)+'"'}function ad(i){return'link[rel="stylesheet"]['+i+"]"}function _R(i){return p({},i,{"data-precedence":i.precedence,precedence:null})}function AL(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}),zr(a,"link",f),fr(a),i.head.appendChild(a))}function Wc(i){return'[src="'+co(i)+'"]'}function ld(i){return"script[async]"+i}function ER(i,a,f){if(a.count++,a.instance===null)switch(a.type){case"style":var m=i.querySelector('style[data-href~="'+co(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),zr(m,"style",R),em(m,f.precedence,i),a.instance=m;case"stylesheet":R=Zc(f.href);var A=i.querySelector(ad(R));if(A)return a.state.loading|=4,a.instance=A,fr(A),A;m=_R(f),(R=Wo.get(R))&&Eb(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}),zr(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(ld(A)))?(a.instance=R,fr(R),R):(m=f,(R=Wo.get(A))&&(m=p({},f),Cb(m,R)),i=i.ownerDocument||i,R=i.createElement("script"),fr(R),zr(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 Eb(i,a){i.crossOrigin==null&&(i.crossOrigin=a.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=a.referrerPolicy),i.title==null&&(i.title=a.title)}function Cb(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 CR(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[il]||A[Xt]||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 TR(i,a,f){i=i.ownerDocument||i,i.head.insertBefore(f,a==="title"?i.querySelector("head > title"):null)}function kL(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 RR(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function ML(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(ad(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=_R(m),(R=Wo.get(R))&&Eb(m,R),A=A.createElement("link"),fr(A);var N=A;N._p=new Promise(function(W,se){N.onload=W,N.onerror=se}),zr(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 Tb=0;function jL(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&&Tb===0&&(Tb=62500*dL());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>Tb?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(PL,i),rm=null,nm.call(i))}function PL(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 cd={$$typeof:C,Provider:null,Consumer:null,_currentValue:Y,_currentValue2:Y,_threadCount:0};function NL(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=Wt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wt(0),this.hiddenUpdates=Wt(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 OR(i,a,f,m,R,A,N,W,se,be,Oe,Pe){return i=new NL(i,a,f,N,se,be,Oe,Pe,W),a=1,A===!0&&(a|=24),A=_o(3,null,null,a),i.current=A,A.stateNode=i,a=iv(),a.refCount++,i.pooledCache=a,a.refCount++,A.memoizedState={element:m,isDehydrated:f,cache:a},cv(A),i}function AR(i){return i?(i=Tc,i):Tc}function kR(i,a,f,m,R,A){R=AR(R),m.context===null?m.context=R:m.pendingContext=R,m=ta(a),m.payload={element:f},A=A===void 0?null:A,A!==null&&(m.callback=A),f=na(i,m,a),f!==null&&(go(f,i,a),Uf(f,i,a))}function MR(i,a){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var f=i.retryLane;i.retryLane=f!==0&&f<a?f:a}}function Rb(i,a){MR(i,a),(i=i.alternate)&&MR(i,a)}function jR(i){if(i.tag===13||i.tag===31){var a=gl(i,67108864);a!==null&&go(a,i,67108864),Rb(i,67108864)}}function PR(i){if(i.tag===13||i.tag===31){var a=Oo();a=qn(a);var f=gl(i,a);f!==null&&go(f,i,a),Rb(i,a)}}var im=!0;function DL(i,a,f,m){var R=Z.T;Z.T=null;var A=H.p;try{H.p=2,Ob(i,a,f,m)}finally{H.p=A,Z.T=R}}function $L(i,a,f,m){var R=Z.T;Z.T=null;var A=H.p;try{H.p=8,Ob(i,a,f,m)}finally{H.p=A,Z.T=R}}function Ob(i,a,f,m){if(im){var R=Ab(m);if(R===null)pb(i,a,m,sm,f),DR(i,m);else if(zL(R,i,a,f,m))m.stopPropagation();else if(DR(i,m),a&4&&-1<IL.indexOf(i)){for(;R!==null;){var A=qs(R);if(A!==null)switch(A.tag){case 3:if(A=A.stateNode,A.current.memoizedState.isDehydrated){var N=Ht(A.pendingLanes);if(N!==0){var W=A;for(W.pendingLanes|=2,W.entangledLanes|=2;N;){var se=1<<31-Ut(N);W.entanglements[1]|=se,N&=~se}Ni(A),(an&6)===0&&(Vp=Le()+500,rd(0))}}break;case 31:case 13:W=gl(A,2),W!==null&&go(W,A,2),Bp(),Rb(A,2)}if(A=Ab(m),A===null&&pb(i,a,m,sm,f),A===R)break;R=A}R!==null&&m.stopPropagation()}else pb(i,a,m,null,f)}}function Ab(i){return i=De(i),kb(i)}var sm=null;function kb(i){if(sm=null,i=Vs(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 NR(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 He:return 268435456;default:return 32}default:return 32}}var Mb=!1,ha=null,pa=null,ma=null,ud=new Map,fd=new Map,ga=[],IL="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 DR(i,a){switch(i){case"focusin":case"focusout":ha=null;break;case"dragenter":case"dragleave":pa=null;break;case"mouseover":case"mouseout":ma=null;break;case"pointerover":case"pointerout":ud.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":fd.delete(a.pointerId)}}function dd(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=qs(a),a!==null&&jR(a)),i):(i.eventSystemFlags|=m,a=i.targetContainers,R!==null&&a.indexOf(R)===-1&&a.push(R),i)}function zL(i,a,f,m,R){switch(a){case"focusin":return ha=dd(ha,i,a,f,m,R),!0;case"dragenter":return pa=dd(pa,i,a,f,m,R),!0;case"mouseover":return ma=dd(ma,i,a,f,m,R),!0;case"pointerover":var A=R.pointerId;return ud.set(A,dd(ud.get(A)||null,i,a,f,m,R)),!0;case"gotpointercapture":return A=R.pointerId,fd.set(A,dd(fd.get(A)||null,i,a,f,m,R)),!0}return!1}function $R(i){var a=Vs(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,Jr(i.priority,function(){PR(f)});return}}else if(a===31){if(a=c(f),a!==null){i.blockedOn=a,Jr(i.priority,function(){PR(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=Ab(i.nativeEvent);if(f===null){f=i.nativeEvent;var m=new f.constructor(f.type,f);Me=m,f.target.dispatchEvent(m),Me=null}else return a=qs(f),a!==null&&jR(a),i.blockedOn=f,!1;a.shift()}return!0}function IR(i,a,f){am(i)&&f.delete(a)}function LL(){Mb=!1,ha!==null&&am(ha)&&(ha=null),pa!==null&&am(pa)&&(pa=null),ma!==null&&am(ma)&&(ma=null),ud.forEach(IR),fd.forEach(IR)}function lm(i,a){i.blockedOn===a&&(i.blockedOn=null,Mb||(Mb=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,LL)))}var cm=null;function zR(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(kb(m||f)===null)continue;break}var A=qs(f);A!==null&&(i.splice(a,3),a-=3,Av(A,{pending:!0,data:R,method:f.method,action:m},m,R))}}))}function Yc(i){function a(se){return lm(se,i)}ha!==null&&lm(ha,i),pa!==null&&lm(pa,i),ma!==null&&lm(ma,i),ud.forEach(a),fd.forEach(a);for(var f=0;f<ga.length;f++){var m=ga[f];m.blockedOn===i&&(m.blockedOn=null)}for(;0<ga.length&&(f=ga[0],f.blockedOn===null);)$R(f),f.blockedOn===null&&ga.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||zR(f);else if(N){var W=null;if(A&&A.hasAttribute("formAction")){if(R=A,N=A[Cn]||null)W=N.formAction;else if(kb(R)!==null)continue}else W=N.action;typeof W=="function"?f[m+1]=W:(f.splice(m,3),m-=3),zR(f)}}}function LR(){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 jb(i){this._internalRoot=i}um.prototype.render=jb.prototype.render=function(i){var a=this._internalRoot;if(a===null)throw Error(r(409));var f=a.current,m=Oo();kR(f,m,i,a,null,null)},um.prototype.unmount=jb.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var a=i.containerInfo;kR(i.current,2,null,i,null,null),Bp(),a[Pr]=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<ga.length&&a!==0&&a<ga[f].priority;f++);ga.splice(f,0,i),f===0&&$R(i)}};var FR=t.version;if(FR!=="19.2.3")throw Error(r(527,FR,"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 FL={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(FL),pt=fm}catch{}}return pd.createRoot=function(i,a){if(!o(i))throw Error(r(299));var f=!1,m="",R=GC,A=ZC,N=WC;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=OR(i,1,!1,null,null,f,m,null,R,A,N,LR),i[Pr]=a.current,hb(i),new jb(a)},pd.hydrateRoot=function(i,a,f){if(!o(i))throw Error(r(299));var m=!1,R="",A=GC,N=ZC,W=WC,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=OR(i,1,!0,a,f??null,m,R,se,A,N,W,LR),a.context=AR(null),f=a.current,m=Oo(),m=qn(m),R=ta(m),R.callback=null,na(f,R,m),f=m,a.current.lanes=f,En(a,f),Ni(a),i[Pr]=a.current,hb(i),new um(a)},pd.version="19.2.3",pd}var YR;function XL(){if(YR)return Db.exports;YR=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(),Db.exports=YL(),Db.exports}var QL=XL(),rf=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(){}},JL={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},eF=class{#e=JL;#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)}},Vl=new eF;function tF(e){setTimeout(e,0)}var Wl=typeof window>"u"||"Deno"in globalThis;function oo(){}function nF(e,t){return typeof e=="function"?e(t):e}function AS(e){return typeof e=="number"&&e>=0&&e!==1/0}function wj(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Aa(e,t){return typeof e=="function"?e(t):e}function Qo(e,t){return typeof e=="function"?e(t):e}function XR(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:l,stale:c}=e;if(l){if(r){if(t.queryHash!==xx(l,t.options))return!1}else if(!Zd(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 QR(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Yl(t.options.mutationKey)!==Yl(s))return!1}else if(!Zd(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function xx(e,t){return(t?.queryKeyHashFn||Yl)(e)}function Yl(e){return JSON.stringify(e,(t,n)=>kS(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Zd(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Zd(e[n],t[n])):!1}var rF=Object.prototype.hasOwnProperty;function xj(e,t){if(e===t)return e;const n=JR(e)&&JR(t);if(!n&&!(kS(e)&&kS(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:rF.call(e,h))&&u++;continue}if(p===null||g===null||typeof p!="object"||typeof g!="object"){c[h]=g;continue}const b=xj(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 JR(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function kS(e){if(!eO(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!eO(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function eO(e){return Object.prototype.toString.call(e)==="[object Object]"}function oF(e){return new Promise(t=>{Vl.setTimeout(t,e)})}function MS(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?xj(e,t):t}function iF(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function sF(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var _x=Symbol();function _j(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===_x?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Ex(e,t){return typeof e=="function"?e(...t):!!e}function aF(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 lF=class extends rf{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Wl&&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"}},Cx=new lF;function jS(){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 cF=tF;function uF(){let e=[],t=0,n=c=>{c()},r=c=>{c()},o=cF;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 Tr=uF(),fF=class extends rf{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Wl&&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 fF;function dF(e){return Math.min(1e3*2**e,3e4)}function Ej(e){return(e??"online")==="online"?Jg.isOnline():!0}var PS=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Cj(e){let t=!1,n=0,r;const o=jS(),s=()=>o.status!=="pending",l=_=>{if(!s()){const x=new PS(_);g(x),e.onCancel?.(x)}},c=()=>{t=!0},u=()=>{t=!1},d=()=>Cx.isFocused()&&(e.networkMode==="always"||Jg.isOnline())&&e.canRun(),h=()=>Ej(e.networkMode)&&e.canRun(),p=_=>{s()||(r?.(),o.resolve(_))},g=_=>{s()||(r?.(),o.reject(_))},b=()=>new Promise(_=>{r=x=>{(s()||d())&&_(x)},e.onPause?.()}).then(()=>{r=void 0,s()||e.onContinue?.()}),y=()=>{if(s())return;let _;const x=n===0?e.initialPromise:void 0;try{_=x??e.fn()}catch(w){_=Promise.reject(w)}Promise.resolve(_).then(p).catch(w=>{if(s())return;const v=e.retry??(Wl?0:3),C=e.retryDelay??dF,S=typeof C=="function"?C(n,w):C,T=v===!0||typeof v=="number"&&n<v||typeof v=="function"&&v(n,w);if(t||!T){g(w);return}n++,e.onFail?.(n,w),oF(S).then(()=>d()?void 0:b()).then(()=>{t?g(w):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 Tj=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),AS(this.gcTime)&&(this.#e=Vl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Wl?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Vl.clearTimeout(this.#e),this.#e=void 0)}},hF=class extends Tj{#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=nO(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=nO(this.options);t.data!==void 0&&(this.setState(tO(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=MS(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(oo).catch(oo):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Qo(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===_x||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Aa(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:!wj(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=_j(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=Cj({initialPromise:t?.initialPromise,fn:l.fetchFn,onCancel:c=>{c instanceof PS&&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 PS){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,...Rj(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...tO(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),Tr.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function Rj(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ej(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function tO(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function nO(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 pF=class extends rf{constructor(e,t){super(),this.options=t,this.#e=e,this.#i=null,this.#a=jS(),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),rO(this.#t,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return NS(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return NS(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 Qo(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&&oO(this.#t,n,this.options,t)&&this.#f(),this.updateResult(),r&&(this.#t!==n||Qo(this.options.enabled,this.#t)!==Qo(t.enabled,this.#t)||Aa(this.options.staleTime,this.#t)!==Aa(t.staleTime,this.#t))&&this.#g();const o=this.#y();r&&(this.#t!==n||Qo(this.options.enabled,this.#t)!==Qo(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 gF(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(oo)),t}#g(){this.#S();const e=Aa(this.options.staleTime,this.#t);if(Wl||this.#o.isStale||!AS(e))return;const n=wj(this.#o.dataUpdatedAt,e)+1;this.#c=Vl.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,!(Wl||Qo(this.options.enabled,this.#t)===!1||!AS(this.#l)||this.#l===0)&&(this.#u=Vl.setInterval(()=>{(this.options.refetchIntervalInBackground||Cx.isFocused())&&this.#f()},this.#l))}#b(){this.#g(),this.#v(this.#y())}#S(){this.#c&&(Vl.clearTimeout(this.#c),this.#c=void 0)}#w(){this.#u&&(Vl.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&&rO(e,t),I=M&&oO(e,n,t,r);(P||I)&&(h={...h,...Rj(d.data,e.options)}),t._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:b,errorUpdatedAt:y,status:_}=h;g=h.data;let x=!1;if(t.placeholderData!==void 0&&g===void 0&&_==="pending"){let M;o?.isPlaceholderData&&t.placeholderData===l?.placeholderData?(M=o.data,x=!0):M=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,M!==void 0&&(_="success",g=MS(o?.data,M,t),p=!0)}if(t.select&&g!==void 0&&!x)if(o&&g===s?.data&&t.select===this.#m)g=this.#d;else try{this.#m=t.select,g=t.select(g),g=MS(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 w=h.fetchStatus==="fetching",v=_==="pending",C=_==="error",S=v&&w,T=g!==void 0,O={status:_,fetchStatus:h.fetchStatus,isPending:v,isSuccess:_==="success",isError:C,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:w,isRefetching:w&&!v,isLoadingError:C&&!T,isPaused:h.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:C&&T,isStale:Tx(e,t),refetch:this.refetch,promise:this.#a,isEnabled:Qo(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const M=z=>{O.status==="error"?z.reject(O.error):O.data!==void 0&&z.resolve(O.data)},P=()=>{const z=this.#a=O.promise=jS();M(z)},I=this.#a;switch(I.status){case"pending":e.queryHash===n.queryHash&&M(I);break;case"fulfilled":(O.status==="error"||O.data!==I.value)&&P();break;case"rejected":(O.status!=="error"||O.error!==I.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){Tr.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#o)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function mF(e,t){return Qo(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function rO(e,t){return mF(e,t)||e.state.data!==void 0&&NS(e,t,t.refetchOnMount)}function NS(e,t,n){if(Qo(t.enabled,e)!==!1&&Aa(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Tx(e,t)}return!1}function oO(e,t,n,r){return(e!==t||Qo(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Tx(e,n)}function Tx(e,t){return Qo(t.enabled,e)!==!1&&e.isStaleByTime(Aa(t.staleTime,e))}function gF(e,t){return!Qg(e.getCurrentResult(),t)}function iO(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=>{aF(y,()=>t.signal,()=>h=!0)},g=_j(t.options,t.fetchOptions),b=async(y,_,x)=>{if(h)return Promise.reject();if(_==null&&y.pages.length)return Promise.resolve(y);const v=(()=>{const E={client:t.client,queryKey:t.queryKey,pageParam:_,direction:x?"backward":"forward",meta:t.options.meta};return p(E),E})(),C=await g(v),{maxPages:S}=t.options,T=x?sF:iF;return{pages:T(y.pages,C,S),pageParams:T(y.pageParams,_,S)}};if(o&&s.length){const y=o==="backward",_=y?yF:sO,x={pages:s,pageParams:l},w=_(r,x);c=await b(x,w,y)}else{const y=e??s.length;do{const _=u===0?l[0]??r.initialPageParam:sO(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 sO(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 yF(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var vF=class extends Tj{#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||Oj(),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=Cj({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),Tr.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function Oj(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var bF=class extends rf{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 vF({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(){Tr.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=>QR(t,n))}findAll(e={}){return this.getAll().filter(t=>QR(e,t))}notify(e){Tr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Tr.batch(()=>Promise.all(e.map(t=>t.continue().catch(oo))))}};function hm(e){return e.options.scope?.id}var SF=class extends rf{#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&&Yl(n.mutationKey)!==Yl(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??Oj();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#s(t){Tr.batch(()=>{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)})})}},wF=class extends rf{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,o=t.queryHash??xx(r,t);let s=this.get(o);return s||(s=new hF({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(){Tr.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>XR(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>XR(e,n)):t}notify(e){Tr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Tr.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Tr.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},xF=class{#e;#t;#n;#o;#r;#s;#a;#i;constructor(e={}){this.#e=e.queryCache||new wF,this.#t=e.mutationCache||new bF,this.#n=e.defaultOptions||{},this.#o=new Map,this.#r=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#a=Cx.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(Aa(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=nF(t,s);if(l!==void 0)return this.#e.build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return Tr.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;Tr.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return Tr.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Tr.batch(()=>this.#e.findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(oo).catch(oo)}invalidateQueries(e,t={}){return Tr.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=Tr.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(oo)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(oo)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Aa(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(oo).catch(oo)}fetchInfiniteQuery(e){return e.behavior=iO(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(oo).catch(oo)}ensureInfiniteQueryData(e){return e.behavior=iO(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(Yl(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#o.values()],n={};return t.forEach(r=>{Zd(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(Yl(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{Zd(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=xx(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===_x&&(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()}},Aj=k.createContext(void 0),kj=e=>{const t=k.useContext(Aj);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},_F=({client:e,children:t})=>(k.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),j.jsx(Aj.Provider,{value:e,children:t})),Mj=k.createContext(!1),EF=()=>k.useContext(Mj);Mj.Provider;function CF(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var TF=k.createContext(CF()),RF=()=>k.useContext(TF),OF=(e,t,n)=>{const r=n?.state.error&&typeof e.throwOnError=="function"?Ex(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},AF=e=>{k.useEffect(()=>{e.clearReset()},[e])},kF=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||Ex(n,[e.error,r])),MF=(e,t)=>t.state.data===void 0,jF=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))}},PF=(e,t)=>e.isLoading&&e.isFetching&&!t,NF=(e,t)=>e?.suspense&&t.isPending,aO=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function DF(e,t,n){const r=EF(),o=RF(),s=kj(),l=s.defaultQueryOptions(e);s.getDefaultOptions().queries?._experimental_beforeQuery?.(l);const c=s.getQueryCache().get(l.queryHash);l._optimisticResults=r?"isRestoring":"optimistic",jF(l),OF(l,o,c),AF(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(Tr.batchCalls(g)):oo;return d.updateResult(),b},[d,p]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),k.useEffect(()=>{d.setOptions(l)},[l,d]),NF(l,h))throw aO(l,d,o);if(kF({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&&!Wl&&PF(h,r)&&(u?aO(l,d,o):c?.promise)?.catch(oo).finally(()=>{d.updateResult()}),l.notifyOnChangeProps?h:d.trackResult(h)}function jj(e,t){return DF({...e,enabled:!0,suspense:!0,throwOnError:MF,placeholderData:void 0},pF)}function $F(e,t){const n=kj(),[r]=k.useState(()=>new SF(n,e));k.useEffect(()=>{r.setOptions(e)},[r,e]);const o=k.useSyncExternalStore(k.useCallback(l=>r.subscribe(Tr.batchCalls(l)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=k.useCallback((l,c)=>{r.mutate(l,c).catch(oo)},[r]);if(o.error&&Ex(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}const Rx=LF();function Kn(e,...t){if(!Rx)return;const n=zF(e,...t);performance.mark(n);try{console.log(e,...t)}catch{console.log(n)}}function IF(e,...t){Rx&&console.warn(e,...t)}function zF(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 LF(){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 FF={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 Ch(e){return`[nuqs] ${FF[e]}
|
|
10
|
+
See https://nuqs.dev/NUQS-${e}`}function UF(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}=${VF(o)}`)}return"?"+t.join("&")}function VF(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 Xl=k.createContext({useAdapter(){throw new Error(Ch(404))}});Xl.displayName="NuqsAdapterContext";Rx&&typeof window<"u"&&(window.__NuqsAdapterContext&&window.__NuqsAdapterContext!==Xl&&console.error(Ch(303)),window.__NuqsAdapterContext=Xl);function qF(e){return({children:t,defaultOptions:n,processUrlSearchParams:r,...o})=>k.createElement(Xl.Provider,{...o,value:{useAdapter:e,defaultOptions:n,processUrlSearchParams:r}},t)}function BF(e){const t=k.useContext(Xl);if(!("useAdapter"in t))throw new Error(Ch(404));return t.useAdapter(e)}const HF=()=>k.useContext(Xl).defaultOptions,KF=()=>k.useContext(Xl).processUrlSearchParams;function GF(){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 ZF(e){return{method:"throttle",timeMs:e}}const Nd=ZF(GF());function WF(e){return e===null||Array.isArray(e)&&e.length===0}function YF(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 Ox(){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 DS(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 $S(){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 XF(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 IS(){return new URLSearchParams(location.search)}var Pj=class{updateMap=new Map;options={history:"replace",scroll:!1,shallow:!0};timeMs=Nd.timeMs;transitions=new Set;resolvers=null;controller=null;lastFlushedAt=0;resetQueueOnNextPush=!1;push({key:e,query:t,options:n},r=Nd.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=IS}){return this.resolvers?.promise??Promise.resolve(e())}flush({getSearchParamsSnapshot:e=IS,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=$S();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 DS(()=>{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():DS(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=Nd.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=YF(d,u,o);t&&(o=t(o));try{return XF(c,()=>{n(o,l)}),[o,null]}catch(u){return console.error(Ch(429),s.map(([d])=>d).join(),u),[o,u]}}};const Mg=new Pj;function QF(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 JF=class{callback;resolvers=$S();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,DS(()=>{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=$S(),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}},e7=class{throttleQueue;queues=new Map;queuedQuerySync=Ox();constructor(e=new Pj){this.throttleQueue=e}useQueuedQueries(e){return QF(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??IS;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 JF(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 Lb=new e7(Mg);function Nj(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 lO(e,t,n){return r=>{if(!(t.length===0||t.some(s=>!Nj(r.getAll(s),e.getAll(s)))))return Kn("[nuqs `%s`] no change, returning previous",t.join(","),r),r;const o=Dj(e,t,n);return Kn("[nuqs `%s`] subbed search params change\n from %O\n to %O",t.join(","),r,o),o}}function Dj(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 t7="__nuqs__",zS=Ox();function n7(e){return function(n,r){const o=new URL(location.href);o.search=UF(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,t7,o),zS.emit("update",n),r.scroll===!0&&window.scrollTo({top:0})}}const $j=k.createContext({fullPageNavigationOnShallowFalseUpdates:!1});function r7(e){const{fullPageNavigationOnShallowFalseUpdates:t}=k.useContext($j),[n,r]=k.useState(()=>typeof location>"u"?new URLSearchParams:Dj(new URLSearchParams(location.search),e,!1));return k.useEffect(()=>{const o=()=>{r(lO(new URLSearchParams(location.search),e,!1))},s=l=>{r(lO(l,e,!0))};return zS.on("update",s),window.addEventListener("popstate",o),()=>{zS.off("update",s),window.removeEventListener("popstate",o)}},[e.join("&")]),{searchParams:n,updateUrl:k.useMemo(()=>n7(t),[t])}}const o7=qF(r7);function i7({children:e,fullPageNavigationOnShallowFalseUpdates:t=!1,...n}){return k.createElement($j.Provider,{value:{fullPageNavigationOnShallowFalseUpdates:t}},k.createElement(o7,{...n,children:e}))}function Rn(e,t="Assertion error"){if(!e)throw Error(t)}function Du({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 LS(e,t){return t.sort(e==="horizontal"?s7:a7)}function s7(e,t){const n=e.element.offsetLeft-t.element.offsetLeft;return n!==0?n:e.element.offsetWidth-t.element.offsetWidth}function a7(e,t){const n=e.element.offsetTop-t.element.offsetTop;return n!==0?n:e.element.offsetHeight-t.element.offsetHeight}function Ij(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function zj(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 l7({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}=zj(r,l),d=e==="horizontal"?c:u;d<s&&(s=d,o=l)}return Rn(o,"No rect found"),o}function Lj(e){const{element:t,orientation:n,panels:r,separators:o}=e,s=LS(n,Array.from(t.children).filter(Ij).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),x=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=[_,x];break}case 1:{const w=d[0],v=l7({orientation:n,rects:[g,b],targetRect:w.element.getBoundingClientRect()});y=[w,v===g?x:_];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:Du({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 c7(e,t){const n=getComputedStyle(e),r=parseFloat(n.fontSize);return t*r}function u7(e,t){const n=getComputedStyle(e.ownerDocument.body),r=parseFloat(n.fontSize);return t*r}function f7(e){return e/100*window.innerHeight}function d7(e){return e/100*window.innerWidth}function h7(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]=h7(n);switch(s){case"%":{r=o/100*e;break}case"px":{r=o;break}case"rem":{r=u7(t,o);break}case"em":{r=c7(t,o);break}case"vh":{r=f7(o);break}case"vw":{r=d7(o);break}}return r}function Ci(e){return parseFloat(e.toFixed(3))}function cO(e){const{panels:t}=e,n=Du({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){const h=pm({groupSize:n,panelElement:o,styleProp:s.collapsedSize});l=Ci(h/n*100)}let c;if(s.defaultSize){const h=pm({groupSize:n,panelElement:o,styleProp:s.defaultSize});c=Ci(h/n*100)}let u=0;if(s.minSize){const h=pm({groupSize:n,panelElement:o,styleProp:s.minSize});u=Ci(h/n*100)}let d=100;if(s.maxSize){const h=pm({groupSize:n,panelElement:o,styleProp:s.maxSize});d=Ci(h/n*100)}return{collapsedSize:l,collapsible:s.collapsible===!0,defaultSize:c,minSize:u,maxSize:d,panelId:r.id}})}class p7{#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 io(e,t,n=0){return Math.abs(Ci(e)-Ci(t))<=n}let Yo={cursorFlags:0,interactionState:{state:"inactive"},mountedGroups:new Map};const Kl=new p7;function ts(){return Yo}function ri(e){const t=typeof e=="function"?e(Yo):e;if(Yo===t)return Yo;const n=Yo;return Yo={...Yo,...t},t.cursorFlags!==void 0&&Kl.emit("cursorFlagsChange",Yo.cursorFlags),t.interactionState!==void 0&&Kl.emit("interactionStateChange",Yo.interactionState),t.mountedGroups!==void 0&&(Yo.mountedGroups.forEach((r,o)=>{r.derivedPanelConstraints.forEach(s=>{if(s.collapsible){const{layout:l}=n.mountedGroups.get(o)??{};if(l){const c=io(s.collapsedSize,r.layout[s.panelId]),u=io(s.collapsedSize,l[s.panelId]);c&&!u&&(o.inMemoryLastExpandedPanelSizes[s.panelId]=l[s.panelId])}}})}),Kl.emit("mountedGroupsChange",Yo.mountedGroups)),Yo}function m7(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 Wd(e,t){return io(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(Wd(t,s)<0)if(r){const l=(n+s)/2;Wd(t,l)<0?t=n:t=s}else t=s;return t=Math.min(o,t),t=Ci(t),t}function Yd({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:o,trigger:s}){if(io(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:x=0,collapsible:w,minSize:v=0}=_;if(w){const C=l[y];if(Rn(C!=null,`Previous layout not found for panel index ${y}`),io(C,x)){const S=v-C;Wd(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:x=0,collapsible:w,minSize:v=0}=_;if(w){const C=l[y];if(Rn(C!=null,`Previous layout not found for panel index ${y}`),io(C,v)){const S=C-x;Wd(S,Math.abs(e))>0&&(e=e<0?0-S:S)}}}}{const y=e<0?1:-1;let _=e<0?h:d,x=0;for(;;){const v=l[_];Rn(v!=null,`Previous layout not found for panel index ${_}`);const C=du({panelConstraints:n[_],size:100})-v;if(x+=C,_+=y,_<0||_>=n.length)break}const w=Math.min(Math.abs(e),Math.abs(x));e=e<0?0-w:w}{let y=e<0?d:h;for(;y>=0&&y<n.length;){const _=Math.abs(e)-Math.abs(p),x=l[y];Rn(x!=null,`Previous layout not found for panel index ${y}`);const w=x-_,v=du({panelConstraints:n[y],size:w});if(!io(x,v)&&(p+=x-v,u[y]=v,p.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?y--:y++}}if(m7(c,u))return o;{const y=e<0?h:d,_=l[y];Rn(_!=null,`Previous layout not found for panel index ${y}`);const x=_+p,w=du({panelConstraints:n[y],size:x});if(u[y]=w,!io(w,x)){let v=x-w,C=e<0?h:d;for(;C>=0&&C<n.length;){const S=u[C];Rn(S!=null,`Previous layout not found for panel index ${C}`);const T=S+v,E=du({panelConstraints:n[C],size:T});if(io(S,E)||(v-=E-S,u[C]=E),io(v,0))break;e>0?C--:C++}}}const g=Object.values(u).reduce((y,_)=>_+y,0);if(!io(g,100,.1))return o;const b=Object.keys(o);return u.reduce((y,_,x)=>(y[b[x]]=_,y),{})}function jg(e){const{mountedGroups:t}=ts();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 of(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(t[n]===void 0||Wd(e[n],t[n])!==0)return!1;return!0}function Ql({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(!io(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(!io(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,io(o,0)))break}const s=Object.keys(e);return n.reduce((l,c,u)=>(l[s[u]]=c,l),{})}function Fj({groupId:e}){const t=()=>{const{mountedGroups:n}=ts();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=Ql({layout:n,panelConstraints:o});return r?l:(of(l,u)||ri(d=>({mountedGroups:new Map(d.mountedGroups).set(s,{defaultLayoutDeferred:r,derivedPanelConstraints:o,layout:u,separatorToPanels:c})})),u)}}}function Uj(e){const{mountedGroups:t}=ts(),n=t.get(e);return Rn(n,`Mounted Group ${e.id} not found`),n}function Al(e,t){const n=jg(e),r=Uj(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=Fj({groupId:n.id}).getLayout(),u=Yd({delta:t,initialLayout:c,panelConstraints:r.derivedPanelConstraints,pivotIndices:l,prevLayout:c,trigger:"keyboard"}),d=Ql({layout:u,panelConstraints:r.derivedPanelConstraints});of(c,d)||ri(h=>({mountedGroups:new Map(h.mountedGroups).set(n,{defaultLayoutDeferred:r.defaultLayoutDeferred,derivedPanelConstraints:r.derivedPanelConstraints,layout:d,separatorToPanels:r.separatorToPanels})}))}function uO(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"&&Al(t,5);break}case"ArrowLeft":{e.preventDefault(),n.orientation==="horizontal"&&Al(t,-5);break}case"ArrowRight":{e.preventDefault(),n.orientation==="horizontal"&&Al(t,5);break}case"ArrowUp":{e.preventDefault(),n.orientation==="vertical"&&Al(t,-5);break}case"End":{e.preventDefault(),Al(t,100);break}case"Enter":{e.preventDefault();const r=jg(t),{derivedPanelConstraints:o,layout:s,separatorToPanels:l}=Uj(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;Al(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(),Al(t,-100);break}}}const g7=e=>e,Fb=()=>{},Vj=1,qj=2,Bj=4,Hj=8,fO={coarse:10,precise:5};function y7(e,t,n){let r,o={x:1/0,y:1/0};for(const s of t){const l=zj(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 v7(){return mm===void 0&&(typeof matchMedia=="function"?mm=!!matchMedia("(pointer:coarse)").matches:mm=!1),mm}function b7(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}function S7(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:pO(e),b:pO(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:hO(dO(n.a)),b:hO(dO(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 w7=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function x7(e){const t=getComputedStyle(Kj(e)??e).display;return t==="flex"||t==="inline-flex"}function _7(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||x7(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"||w7.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function dO(e){let t=e.length;for(;t--;){const n=e[t];if(Rn(n,"Missing node"),_7(n))return n}return null}function hO(e){return e&&Number(getComputedStyle(e).zIndex)||0}function pO(e){const t=[];for(;e;)t.push(e),e=Kj(e);return t}function Kj(e){const{parentNode:t}=e;return b7(t)?t.host:t}function E7(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 C7({groupElement:e,hitRegion:t,pointerEventTarget:n}){if(!Ij(n)||n.contains(e)||e.contains(n))return!0;if(S7(n,e)>0){let r=n;for(;r;){if(r.contains(e))return!0;if(E7(r.getBoundingClientRect(),t))return!1;r=r.parentElement}}return!0}function Gj(e,t){const n=[];return t.forEach((r,o)=>{if(o.disabled)return;const s=v7()?fO.coarse:fO.precise,l=Lj(o),c=y7(o.orientation,l,{x:e.clientX,y:e.clientY});c&&c.distance.x<=s&&c.distance.y<=s&&C7({groupElement:o.element,hitRegion:c.hitRegion.rect,pointerEventTarget:e.target})&&n.push(c.hitRegion)}),n}function mO(e){if(e.defaultPrevented||e.pointerType==="mouse"&&e.button>0)return;const{mountedGroups:t}=ts(),n=Gj(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)}),ri({interactionState:{hitRegions:n,initialLayoutMap:l,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:"active"}}),n.length&&e.preventDefault()}function T7({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&Vj)!==0,l=(e&qj)!==0,c=(e&Bj)!==0,u=(e&Hj)!==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 gO=new WeakMap;function Ax(e){if(e.defaultView===null||e.defaultView===void 0)return;let{prevStyle:t,styleSheet:n}=gO.get(e)??{};n===void 0&&(n=new e.defaultView.CSSStyleSheet,e.adoptedStyleSheets=[n]);const{cursorFlags:r,interactionState:o}=ts();switch(o.state){case"active":case"hover":{const s=T7({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}}gO.set(e,{prevStyle:t,styleSheet:n})}function Zj({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:x,derivedPanelConstraints:w,layout:v,separatorToPanels:C}=o.get(d)??{defaultLayoutDeferred:!1};if(w&&_&&v&&C){const S=Yd({delta:y,initialLayout:_,panelConstraints:w,pivotIndices:u.panels.map(T=>b.indexOf(T)),prevLayout:v,trigger:"mouse-or-touch"});if(of(S,v)){if(y!==0&&!p)switch(g){case"horizontal":{l|=y<0?Vj:qj;break}case"vertical":{l|=y<0?Bj:Hj;break}}}else{c.set(u.group,{defaultLayoutDeferred:x,derivedPanelConstraints:w,layout:S,separatorToPanels:C});const T=u.group.panels.map(({id:E})=>E).join(",");u.group.inMemoryLayouts[T]=S}}}),ri({cursorFlags:l,mountedGroups:c}),Ax(e)}function yO(e){const{interactionState:t,mountedGroups:n}=ts();t.state==="active"&&Zj({document:e.currentTarget,event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:n})}function vO(e){if(e.defaultPrevented)return;const{interactionState:t,mountedGroups:n}=ts();switch(t.state){case"active":{if(e.buttons===0){ri(r=>r.interactionState.state==="inactive"?r:{cursorFlags:0,interactionState:{state:"inactive"}});return}Zj({document:e.currentTarget,event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:n,pointerDownAtPoint:t.pointerDownAtPoint});break}default:{const r=Gj(e,n);r.length===0?t.state!=="inactive"&&ri({interactionState:{state:"inactive"}}):ri({interactionState:{hitRegions:r,state:"hover"}}),Ax(e.currentTarget);break}}}function bO(e){if(e.defaultPrevented||e.pointerType==="mouse"&&e.button>0)return;e.preventDefault();const{interactionState:t}=ts();t.state==="active"&&(ri({cursorFlags:0,interactionState:{state:"inactive"}}),Ax(e.currentTarget))}function SO(e){let t=0,n=0;const r={};for(const s of e)if(s.defaultSize!==void 0){t++;const l=Ci(s.defaultSize);n+=l,r[s.panelId]=l}else r[s.panelId]=void 0;const o=e.length-t;if(o!==0){const s=Ci((100-n)/o);for(const l of e)l.defaultSize===void 0&&(r[l.panelId]=s)}return r}function R7(e,t,n){const r=n[0];if(!r)return;const o=e.panels.find(u=>u.element===t);if(!o||!o.onResize)return;const s=Du({group:e}),l=o.mutableValues.prevSize,c={asPercentage:Ci(r.inlineSize/s*100),inPixels:r.inlineSize};o.mutableValues.prevSize=c,o.onResize(c,o.id,l)}function O7(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 A7(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 k7(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:x,target:w}=_;if(w===e.element){if(t){if(Du({group:e})===0)return;ri(v=>{const C=v.mountedGroups.get(e);if(C){const S=cO(e),T=C.defaultLayoutDeferred?SO(S):C.layout,E=Ql({layout:T,panelConstraints:S});return!C.defaultLayoutDeferred&&of(T,E)&&O7(C.derivedPanelConstraints,S)?v:{mountedGroups:new Map(v.mountedGroups).set(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:S,layout:E,separatorToPanels:C.separatorToPanels})}}return v})}}else R7(e,w,x)}});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=Du({group:e}),c=cO(e),u=e.panels.map(({id:y})=>y).join(",");let d=e.defaultLayout;d&&(A7(e.panels,d)||(d=void 0));const h=e.inMemoryLayouts[u]??d??SO(c),p=Ql({layout:h,panelConstraints:c}),g=Lj(e),b=e.element.ownerDocument;return ri(y=>{const _=new Map;return Xc.set(b,(Xc.get(b)??0)+1),g.forEach(x=>{x.separator&&_.set(x.separator,x.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",uO)}),Xc.get(b)===1&&(b.addEventListener("pointerdown",mO),b.addEventListener("pointerleave",yO),b.addEventListener("pointermove",vO),b.addEventListener("pointerup",bO)),function(){t=!1,Xc.set(b,Math.max(0,(Xc.get(b)??0)-1)),ri(y=>{const _=new Map(y.mountedGroups);return _.delete(e),{mountedGroups:_}}),e.separators.forEach(y=>{y.element.removeEventListener("keydown",uO)}),Xc.get(b)||(b.removeEventListener("pointerdown",mO),b.removeEventListener("pointerleave",yO),b.removeEventListener("pointermove",vO),b.removeEventListener("pointerup",bO)),s.disconnect()}}function M7(){const[e,t]=k.useState({}),n=k.useCallback(()=>t({}),[]);return[e,n]}function kx(e){const t=k.useId();return`${e??t}`}const sc=typeof window<"u"?k.useLayoutEffect:k.useEffect;function Mx(e){const t=k.useRef(e);return sc(()=>{t.current=e},[e]),k.useCallback((...n)=>t.current?.(...n),[t])}function jx(...e){return Mx(t=>{e.forEach(n=>{if(n)switch(typeof n){case"function":{n(t);break}case"object":{n.current=t;break}}})})}function j7(e){const t=k.useRef({...e});return sc(()=>{for(const n in e)t.current[n]=e[n]},[e]),t.current}const Wj="--react-resizable-panels--panel--pointer-events";function Yj(e,t){const n=e.replace(/[^a-zA-Z0-9\-_]/g,""),r=t.replace(/[^a-zA-Z0-9\-_]/g,"");return`--react-resizable-panels--${n}--${r}`}const Xj=k.createContext(null);function P7(e,t){const n=k.useRef({getLayout:()=>({}),setLayout:g7});k.useImperativeHandle(t,()=>n.current,[]),sc(()=>{Object.assign(n.current,Fj({groupId:e}))})}function Px({children:e,className:t,defaultLayout:n,disableCursor:r,disabled:o,elementRef:s,groupRef:l,id:c,onLayoutChange:u,orientation:d="horizontal",style:h,...p}){const g=k.useRef({}),b=Mx(U=>{of(g.current,U)||(g.current=U,u?.(U))}),y=kx(c),_=k.useRef(null),[x,w]=k.useState(!1),[v,C]=k.useState(n??{}),[S,T]=M7(),E=k.useRef({lastExpandedPanelSizes:{},layouts:{},panels:[],separators:[]}),O=jx(_,s);P7(y,l);const M=k.useMemo(()=>({id:y,orientation:d,registerPanel:U=>{const G=E.current;return G.panels=LS(d,[...G.panels,U]),T(),()=>{G.panels=G.panels.filter(J=>J!==U),T()}},registerSeparator:U=>{const G=E.current;return G.separators=LS(d,[...G.separators,U]),T(),()=>{G.separators=G.separators.filter(J=>J!==U),T()}}}),[y,T,d]),P=j7({defaultLayout:n,disableCursor:r}),I=k.useRef(null);sc(()=>{const U=_.current;if(U===null)return;const G=E.current,J={defaultLayout:P.defaultLayout,disableCursor:!!P.disableCursor,disabled:!!o,element:U,id:y,inMemoryLastExpandedPanelSizes:E.current.lastExpandedPanelSizes,inMemoryLayouts:E.current.layouts,orientation:d,panels:G.panels,separators:G.separators};I.current=J;const ee=k7(J),Z=ts().mountedGroups.get(J);if(Z){const{defaultLayoutDeferred:oe,derivedPanelConstraints:ne,layout:$}=Z;!oe&&ne.length>0&&(C($),b?.($))}const H=Kl.addListener("interactionStateChange",oe=>{oe.state==="active"?w(oe.hitRegions.some(ne=>ne.group===J)):w(!1)}),Y=Kl.addListener("mountedGroupsChange",oe=>{const ne=oe.get(J);if(ne){const{defaultLayoutDeferred:$,derivedPanelConstraints:q,layout:V}=ne;if($||q.length===0)return;C(V),b?.(V)}});return()=>{I.current=null,ee(),H(),Y()}},[o,y,b,d,S,P]),k.useEffect(()=>{const U=I.current;U&&(U.defaultLayout=n,U.disableCursor=!!r)});const z={[Wj]:x?"none":void 0};for(const U in v){const G=Yj(y,U),J=v[U];z[G]=J}return j.jsx(Xj.Provider,{value:M,children:j.jsx("div",{...p,"aria-orientation":d,className:t,"data-group":!0,"data-testid":y,id:y,ref:O,style:{height:"100%",width:"100%",overflow:"hidden",...h,...z,display:"flex",flexDirection:d==="horizontal"?"row":"column",flexWrap:"nowrap"},children:e})})}Px.displayName="Group";function N7(e,t=10){let n=null;return r=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(r)},t)}}function Ub(e,t){return`react-resizable-panels:${[e,...t].join(":")}`}function Qj({debounceSaveMs:e=100,panelIds:t,storage:n=localStorage,...r}){const o=t!==void 0,s="id"in r?r.id:r.groupId,l=Ub(s,t??[]),c=k.useSyncExternalStore(D7,()=>n.getItem(l),()=>n.getItem(l)),u=k.useMemo(()=>c?JSON.parse(c):void 0,[c]),d=k.useMemo(()=>{const h=p=>{let g;o?g=Ub(s,Object.keys(p)):g=Ub(s,[]);try{n.setItem(g,JSON.stringify(p))}catch(b){console.error(b)}};return e>0?N7(h,e):h},[e,o,s,n]);return{defaultLayout:u,onLayoutChange:d}}function D7(){return function(){}}function Nx(){const e=k.useContext(Xj);return Rn(e,"Group Context not found; did you render a Panel or Separator outside of a Group?"),e}function $7({groupId:e,panelId:t}){const n=()=>{const{mountedGroups:c}=ts();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,x=Yd({delta:_?u-c:c-u,initialLayout:g,panelConstraints:h,pivotIndices:_?[y-1,y]:[y,y+1],prevLayout:g,trigger:"imperative-api"}),w=Ql({layout:x,panelConstraints:h});of(g,w)||ri(v=>({mountedGroups:new Map(v.mountedGroups).set(p,{defaultLayoutDeferred:d,derivedPanelConstraints:h,layout:w,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&&io(u,d)},resize:c=>{if(s()!==c){let u;switch(typeof c){case"number":{const{group:d}=n(),h=Du({group:d});u=Ci(c/h*100);break}case"string":{u=parseFloat(c);break}}l(u)}}}}function I7(e,t){const{id:n}=Nx(),r=k.useRef({collapse:Fb,expand:Fb,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:Fb});k.useImperativeHandle(t,()=>r.current,[]),sc(()=>{Object.assign(r.current,$7({groupId:n,panelId:e}))})}function Xd({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=kx(l),_=k.useRef(null),x=jx(_,s),{id:w,registerPanel:v}=Nx(),C=d!==null,S=Mx((E,O,M)=>{d?.(E,l,M)});sc(()=>{const E=_.current;if(E!==null)return v({element:E,id:y,idIsStable:b,mutableValues:{expandToSize:void 0,prevSize:void 0},onResize:C?S:void 0,panelConstraints:{collapsedSize:n,collapsible:r,defaultSize:o,maxSize:c,minSize:u}})},[n,r,o,C,y,b,c,u,S,v]),I7(y,h);const T=Yj(w,y);return j.jsx("div",{...g,"data-panel":!0,"data-testid":y,id:y,ref:x,style:{...z7,flexBasis:0,flexGrow:`var(${T}, 1)`,flexShrink:1,overflow:"hidden",pointerEvents:`var(${Wj})`},children:j.jsx("div",{className:t,style:{width:"100%",height:"100%",...p},children:e})})}Xd.displayName="Panel";const z7={minHeight:"unset",maxHeight:"unset",height:"unset",minWidth:"unset",maxWidth:"unset",width:"unset",flex:"unset",flexBasis:"unset",flexShrink:"unset",flexGrow:"unset",border:"unset",borderWidth:"unset",padding:"unset",margin:"unset"};function L7({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=Ql({layout:Yd({delta:d-l,initialLayout:e,panelConstraints:t,pivotIndices:h,prevLayout:e,trigger:"keyboard"}),panelConstraints:t})[n],o=Ql({layout:Yd({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 Dx({children:e,className:t,elementRef:n,id:r,style:o,...s}){const l=kx(r),[c,u]=k.useState({}),[d,h]=k.useState("inactive"),p=k.useRef(null),g=jx(p,n),{id:b,orientation:y,registerSeparator:_}=Nx(),x=y==="horizontal"?"vertical":"horizontal";return sc(()=>{const w=p.current;if(w!==null){const v={element:w,id:l},C=_(v),S=Kl.addListener("interactionStateChange",E=>{h(E.state!=="inactive"&&E.hitRegions.some(O=>O.separator===v)?E.state:"inactive")}),T=Kl.addListener("mountedGroupsChange",E=>{E.forEach(({derivedPanelConstraints:O,layout:M,separatorToPanels:P},I)=>{if(I.id===b){const z=P.get(v);if(z){const U=z[0],G=I.panels.indexOf(U);u(L7({layout:M,panelConstraints:O,panelId:U.id,panelIndex:G}))}}})});return()=>{S(),T(),C()}}},[b,l,_]),j.jsx("div",{...s,"aria-controls":c.valueControls,"aria-orientation":x,"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})}Dx.displayName="Separator";var Jj=typeof global=="object"&&global&&global.Object===Object&&global,F7=typeof self=="object"&&self&&self.Object===Object&&self,ns=Jj||F7||Function("return this")(),ii=ns.Symbol,eP=Object.prototype,U7=eP.hasOwnProperty,V7=eP.toString,md=ii?ii.toStringTag:void 0;function q7(e){var t=U7.call(e,md),n=e[md];try{e[md]=void 0;var r=!0}catch{}var o=V7.call(e);return r&&(t?e[md]=n:delete e[md]),o}var B7=Object.prototype,H7=B7.toString;function K7(e){return H7.call(e)}var G7="[object Null]",Z7="[object Undefined]",wO=ii?ii.toStringTag:void 0;function zs(e){return e==null?e===void 0?Z7:G7:wO&&wO in Object(e)?q7(e):K7(e)}function si(e){return e!=null&&typeof e=="object"}var W7="[object Symbol]";function Th(e){return typeof e=="symbol"||si(e)&&zs(e)==W7}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 Ar=Array.isArray,xO=ii?ii.prototype:void 0,_O=xO?xO.toString:void 0;function tP(e){if(typeof e=="string")return e;if(Ar(e))return sf(e,tP)+"";if(Th(e))return _O?_O.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Y7=/\s/;function X7(e){for(var t=e.length;t--&&Y7.test(e.charAt(t)););return t}var Q7=/^\s+/;function J7(e){return e&&e.slice(0,X7(e)+1).replace(Q7,"")}function Gt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var EO=NaN,eU=/^[-+]0x[0-9a-f]+$/i,tU=/^0b[01]+$/i,nU=/^0o[0-7]+$/i,rU=parseInt;function oU(e){if(typeof e=="number")return e;if(Th(e))return EO;if(Gt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Gt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=J7(e);var n=tU.test(e);return n||nU.test(e)?rU(e.slice(2),n?2:8):eU.test(e)?EO:+e}var CO=1/0,iU=17976931348623157e292;function sU(e){if(!e)return e===0?e:0;if(e=oU(e),e===CO||e===-CO){var t=e<0?-1:1;return t*iU}return e===e?e:0}function nP(e){var t=sU(e),n=t%1;return t===t?n?t-n:t:0}function Uy(e){return e}var aU="[object AsyncFunction]",lU="[object Function]",cU="[object GeneratorFunction]",uU="[object Proxy]";function Rh(e){if(!Gt(e))return!1;var t=zs(e);return t==lU||t==cU||t==aU||t==uU}var Vb=ns["__core-js_shared__"],TO=(function(){var e=/[^.]+$/.exec(Vb&&Vb.keys&&Vb.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function fU(e){return!!TO&&TO in e}var dU=Function.prototype,hU=dU.toString;function ac(e){if(e!=null){try{return hU.call(e)}catch{}try{return e+""}catch{}}return""}var pU=/[\\^$.*+?()[\]{}|]/g,mU=/^\[object .+?Constructor\]$/,gU=Function.prototype,yU=Object.prototype,vU=gU.toString,bU=yU.hasOwnProperty,SU=RegExp("^"+vU.call(bU).replace(pU,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function wU(e){if(!Gt(e)||fU(e))return!1;var t=Rh(e)?SU:mU;return t.test(ac(e))}function xU(e,t){return e?.[t]}function lc(e,t){var n=xU(e,t);return wU(n)?n:void 0}var FS=lc(ns,"WeakMap"),RO=Object.create,rP=(function(){function e(){}return function(t){if(!Gt(t))return{};if(RO)return RO(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}})();function _U(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 $x(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var EU=800,CU=16,TU=Date.now;function RU(e){var t=0,n=0;return function(){var r=TU(),o=CU-(r-n);if(n=r,o>0){if(++t>=EU)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function OU(e){return function(){return e}}var ey=(function(){try{var e=lc(Object,"defineProperty");return e({},"",{}),e}catch{}})(),AU=ey?function(e,t){return ey(e,"toString",{configurable:!0,enumerable:!1,value:OU(t),writable:!0})}:Uy,oP=RU(AU);function Ix(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function kU(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 MU(e){return e!==e}function jU(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}function iP(e,t,n){return t===t?jU(e,t,n):kU(e,MU,n)}function zx(e,t){var n=e==null?0:e.length;return!!n&&iP(e,t,0)>-1}var PU=9007199254740991,NU=/^(?:0|[1-9]\d*)$/;function Vy(e,t){var n=typeof e;return t=t??PU,!!t&&(n=="number"||n!="symbol"&&NU.test(e))&&e>-1&&e%1==0&&e<t}function Lx(e,t,n){t=="__proto__"&&ey?ey(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Oh(e,t){return e===t||e!==e&&t!==t}var DU=Object.prototype,$U=DU.hasOwnProperty;function qy(e,t,n){var r=e[t];(!($U.call(e,t)&&Oh(r,n))||n===void 0&&!(t in e))&&Lx(e,t,n)}function cc(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?Lx(n,c,u):qy(n,c,u)}return n}var OO=Math.max;function sP(e,t,n){return t=OO(t===void 0?e.length-1:t,0),function(){for(var r=arguments,o=-1,s=OO(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),_U(e,this,c)}}function By(e,t){return oP(sP(e,t,Uy),e+"")}var IU=9007199254740991;function Fx(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=IU}function Ya(e){return e!=null&&Fx(e.length)&&!Rh(e)}function zU(e,t,n){if(!Gt(n))return!1;var r=typeof t;return(r=="number"?Ya(n)&&Vy(t,n.length):r=="string"&&t in n)?Oh(n[t],e):!1}function aP(e){return By(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&&zU(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 LU=Object.prototype;function Ah(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||LU;return e===n}function lP(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var FU="[object Arguments]";function AO(e){return si(e)&&zs(e)==FU}var cP=Object.prototype,UU=cP.hasOwnProperty,VU=cP.propertyIsEnumerable,$u=AO((function(){return arguments})())?AO:function(e){return si(e)&&UU.call(e,"callee")&&!VU.call(e,"callee")};function qU(){return!1}var uP=typeof Do=="object"&&Do&&!Do.nodeType&&Do,kO=uP&&typeof $o=="object"&&$o&&!$o.nodeType&&$o,BU=kO&&kO.exports===uP,MO=BU?ns.Buffer:void 0,HU=MO?MO.isBuffer:void 0,Jl=HU||qU,KU="[object Arguments]",GU="[object Array]",ZU="[object Boolean]",WU="[object Date]",YU="[object Error]",XU="[object Function]",QU="[object Map]",JU="[object Number]",eV="[object Object]",tV="[object RegExp]",nV="[object Set]",rV="[object String]",oV="[object WeakMap]",iV="[object ArrayBuffer]",sV="[object DataView]",aV="[object Float32Array]",lV="[object Float64Array]",cV="[object Int8Array]",uV="[object Int16Array]",fV="[object Int32Array]",dV="[object Uint8Array]",hV="[object Uint8ClampedArray]",pV="[object Uint16Array]",mV="[object Uint32Array]",Dn={};Dn[aV]=Dn[lV]=Dn[cV]=Dn[uV]=Dn[fV]=Dn[dV]=Dn[hV]=Dn[pV]=Dn[mV]=!0;Dn[KU]=Dn[GU]=Dn[iV]=Dn[ZU]=Dn[sV]=Dn[WU]=Dn[YU]=Dn[XU]=Dn[QU]=Dn[JU]=Dn[eV]=Dn[tV]=Dn[nV]=Dn[rV]=Dn[oV]=!1;function gV(e){return si(e)&&Fx(e.length)&&!!Dn[zs(e)]}function Ux(e){return function(t){return e(t)}}var fP=typeof Do=="object"&&Do&&!Do.nodeType&&Do,Dd=fP&&typeof $o=="object"&&$o&&!$o.nodeType&&$o,yV=Dd&&Dd.exports===fP,qb=yV&&Jj.process,Iu=(function(){try{var e=Dd&&Dd.require&&Dd.require("util").types;return e||qb&&qb.binding&&qb.binding("util")}catch{}})(),jO=Iu&&Iu.isTypedArray,kh=jO?Ux(jO):gV,vV=Object.prototype,bV=vV.hasOwnProperty;function dP(e,t){var n=Ar(e),r=!n&&$u(e),o=!n&&!r&&Jl(e),s=!n&&!r&&!o&&kh(e),l=n||r||o||s,c=l?lP(e.length,String):[],u=c.length;for(var d in e)(t||bV.call(e,d))&&!(l&&(d=="length"||o&&(d=="offset"||d=="parent")||s&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||Vy(d,u)))&&c.push(d);return c}function hP(e,t){return function(n){return e(t(n))}}var SV=hP(Object.keys,Object),wV=Object.prototype,xV=wV.hasOwnProperty;function pP(e){if(!Ah(e))return SV(e);var t=[];for(var n in Object(e))xV.call(e,n)&&n!="constructor"&&t.push(n);return t}function ei(e){return Ya(e)?dP(e):pP(e)}var _V=Object.prototype,EV=_V.hasOwnProperty,CV=aP(function(e,t){if(Ah(t)||Ya(t)){cc(t,ei(t),e);return}for(var n in t)EV.call(t,n)&&qy(e,n,t[n])});function TV(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var RV=Object.prototype,OV=RV.hasOwnProperty;function AV(e){if(!Gt(e))return TV(e);var t=Ah(e),n=[];for(var r in e)r=="constructor"&&(t||!OV.call(e,r))||n.push(r);return n}function Mh(e){return Ya(e)?dP(e,!0):AV(e)}var kV=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,MV=/^\w*$/;function Vx(e,t){if(Ar(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Th(e)?!0:MV.test(e)||!kV.test(e)||t!=null&&e in Object(t)}var Qd=lc(Object,"create");function jV(){this.__data__=Qd?Qd(null):{},this.size=0}function PV(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var NV="__lodash_hash_undefined__",DV=Object.prototype,$V=DV.hasOwnProperty;function IV(e){var t=this.__data__;if(Qd){var n=t[e];return n===NV?void 0:n}return $V.call(t,e)?t[e]:void 0}var zV=Object.prototype,LV=zV.hasOwnProperty;function FV(e){var t=this.__data__;return Qd?t[e]!==void 0:LV.call(t,e)}var UV="__lodash_hash_undefined__";function VV(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Qd&&t===void 0?UV:t,this}function ec(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])}}ec.prototype.clear=jV;ec.prototype.delete=PV;ec.prototype.get=IV;ec.prototype.has=FV;ec.prototype.set=VV;function qV(){this.__data__=[],this.size=0}function Hy(e,t){for(var n=e.length;n--;)if(Oh(e[n][0],t))return n;return-1}var BV=Array.prototype,HV=BV.splice;function KV(e){var t=this.__data__,n=Hy(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():HV.call(t,n,1),--this.size,!0}function GV(e){var t=this.__data__,n=Hy(t,e);return n<0?void 0:t[n][1]}function ZV(e){return Hy(this.__data__,e)>-1}function WV(e,t){var n=this.__data__,r=Hy(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Ls(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])}}Ls.prototype.clear=qV;Ls.prototype.delete=KV;Ls.prototype.get=GV;Ls.prototype.has=ZV;Ls.prototype.set=WV;var Jd=lc(ns,"Map");function YV(){this.size=0,this.__data__={hash:new ec,map:new(Jd||Ls),string:new ec}}function XV(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ky(e,t){var n=e.__data__;return XV(t)?n[typeof t=="string"?"string":"hash"]:n.map}function QV(e){var t=Ky(this,e).delete(e);return this.size-=t?1:0,t}function JV(e){return Ky(this,e).get(e)}function eq(e){return Ky(this,e).has(e)}function tq(e,t){var n=Ky(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Fs(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])}}Fs.prototype.clear=YV;Fs.prototype.delete=QV;Fs.prototype.get=JV;Fs.prototype.has=eq;Fs.prototype.set=tq;var nq="Expected a function";function qx(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(nq);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(qx.Cache||Fs),n}qx.Cache=Fs;var rq=500;function oq(e){var t=qx(e,function(r){return n.size===rq&&n.clear(),r}),n=t.cache;return t}var iq=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,sq=/\\(\\)?/g,mP=oq(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(iq,function(n,r,o,s){t.push(o?s.replace(sq,"$1"):r||n)}),t});function Bx(e){return e==null?"":tP(e)}function af(e,t){return Ar(e)?e:Vx(e,t)?[e]:mP(Bx(e))}function uc(e){if(typeof e=="string"||Th(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Gy(e,t){t=af(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[uc(t[n++])];return n&&n==r?e:void 0}function Ie(e,t,n){var r=e==null?void 0:Gy(e,t);return r===void 0?n:r}function Hx(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var PO=ii?ii.isConcatSpreadable:void 0;function aq(e){return Ar(e)||$u(e)||!!(PO&&e&&e[PO])}function jh(e,t,n,r,o){var s=-1,l=e.length;for(n||(n=aq),o||(o=[]);++s<l;){var c=e[s];t>0&&n(c)?t>1?jh(c,t-1,n,r,o):Hx(o,c):r||(o[o.length]=c)}return o}function US(e){var t=e==null?0:e.length;return t?jh(e,1):[]}function gP(e){return oP(sP(e,void 0,US),e+"")}var Zy=hP(Object.getPrototypeOf,Object),lq="[object Object]",cq=Function.prototype,uq=Object.prototype,yP=cq.toString,fq=uq.hasOwnProperty,dq=yP.call(Object);function La(e){if(!si(e)||zs(e)!=lq)return!1;var t=Zy(e);if(t===null)return!0;var n=fq.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&yP.call(n)==dq}function hq(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 pq(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 mq(){this.__data__=new Ls,this.size=0}function gq(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function yq(e){return this.__data__.get(e)}function vq(e){return this.__data__.has(e)}var bq=200;function Sq(e,t){var n=this.__data__;if(n instanceof Ls){var r=n.__data__;if(!Jd||r.length<bq-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Fs(r)}return n.set(e,t),this.size=n.size,this}function Ti(e){var t=this.__data__=new Ls(e);this.size=t.size}Ti.prototype.clear=mq;Ti.prototype.delete=gq;Ti.prototype.get=yq;Ti.prototype.has=vq;Ti.prototype.set=Sq;function wq(e,t){return e&&cc(t,ei(t),e)}function xq(e,t){return e&&cc(t,Mh(t),e)}var vP=typeof Do=="object"&&Do&&!Do.nodeType&&Do,NO=vP&&typeof $o=="object"&&$o&&!$o.nodeType&&$o,_q=NO&&NO.exports===vP,DO=_q?ns.Buffer:void 0,$O=DO?DO.allocUnsafe:void 0;function bP(e,t){if(t)return e.slice();var n=e.length,r=$O?$O(n):new e.constructor(n);return e.copy(r),r}function Eq(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 SP(){return[]}var Cq=Object.prototype,Tq=Cq.propertyIsEnumerable,IO=Object.getOwnPropertySymbols,Kx=IO?function(e){return e==null?[]:(e=Object(e),Eq(IO(e),function(t){return Tq.call(e,t)}))}:SP;function Rq(e,t){return cc(e,Kx(e),t)}var Oq=Object.getOwnPropertySymbols,wP=Oq?function(e){for(var t=[];e;)Hx(t,Kx(e)),e=Zy(e);return t}:SP;function Aq(e,t){return cc(e,wP(e),t)}function xP(e,t,n){var r=t(e);return Ar(e)?r:Hx(r,n(e))}function VS(e){return xP(e,ei,Kx)}function Gx(e){return xP(e,Mh,wP)}var qS=lc(ns,"DataView"),BS=lc(ns,"Promise"),_u=lc(ns,"Set"),zO="[object Map]",kq="[object Object]",LO="[object Promise]",FO="[object Set]",UO="[object WeakMap]",VO="[object DataView]",Mq=ac(qS),jq=ac(Jd),Pq=ac(BS),Nq=ac(_u),Dq=ac(FS),Jo=zs;(qS&&Jo(new qS(new ArrayBuffer(1)))!=VO||Jd&&Jo(new Jd)!=zO||BS&&Jo(BS.resolve())!=LO||_u&&Jo(new _u)!=FO||FS&&Jo(new FS)!=UO)&&(Jo=function(e){var t=zs(e),n=t==kq?e.constructor:void 0,r=n?ac(n):"";if(r)switch(r){case Mq:return VO;case jq:return zO;case Pq:return LO;case Nq:return FO;case Dq:return UO}return t});var $q=Object.prototype,Iq=$q.hasOwnProperty;function zq(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&Iq.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var ty=ns.Uint8Array;function Zx(e){var t=new e.constructor(e.byteLength);return new ty(t).set(new ty(e)),t}function Lq(e,t){var n=t?Zx(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var Fq=/\w*$/;function Uq(e){var t=new e.constructor(e.source,Fq.exec(e));return t.lastIndex=e.lastIndex,t}var qO=ii?ii.prototype:void 0,BO=qO?qO.valueOf:void 0;function Vq(e){return BO?Object(BO.call(e)):{}}function _P(e,t){var n=t?Zx(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var qq="[object Boolean]",Bq="[object Date]",Hq="[object Map]",Kq="[object Number]",Gq="[object RegExp]",Zq="[object Set]",Wq="[object String]",Yq="[object Symbol]",Xq="[object ArrayBuffer]",Qq="[object DataView]",Jq="[object Float32Array]",eB="[object Float64Array]",tB="[object Int8Array]",nB="[object Int16Array]",rB="[object Int32Array]",oB="[object Uint8Array]",iB="[object Uint8ClampedArray]",sB="[object Uint16Array]",aB="[object Uint32Array]";function lB(e,t,n){var r=e.constructor;switch(t){case Xq:return Zx(e);case qq:case Bq:return new r(+e);case Qq:return Lq(e,n);case Jq:case eB:case tB:case nB:case rB:case oB:case iB:case sB:case aB:return _P(e,n);case Hq:return new r;case Kq:case Wq:return new r(e);case Gq:return Uq(e);case Zq:return new r;case Yq:return Vq(e)}}function EP(e){return typeof e.constructor=="function"&&!Ah(e)?rP(Zy(e)):{}}var cB="[object Map]";function uB(e){return si(e)&&Jo(e)==cB}var HO=Iu&&Iu.isMap,fB=HO?Ux(HO):uB,dB="[object Set]";function hB(e){return si(e)&&Jo(e)==dB}var KO=Iu&&Iu.isSet,pB=KO?Ux(KO):hB,mB=1,gB=2,yB=4,CP="[object Arguments]",vB="[object Array]",bB="[object Boolean]",SB="[object Date]",wB="[object Error]",TP="[object Function]",xB="[object GeneratorFunction]",_B="[object Map]",EB="[object Number]",RP="[object Object]",CB="[object RegExp]",TB="[object Set]",RB="[object String]",OB="[object Symbol]",AB="[object WeakMap]",kB="[object ArrayBuffer]",MB="[object DataView]",jB="[object Float32Array]",PB="[object Float64Array]",NB="[object Int8Array]",DB="[object Int16Array]",$B="[object Int32Array]",IB="[object Uint8Array]",zB="[object Uint8ClampedArray]",LB="[object Uint16Array]",FB="[object Uint32Array]",On={};On[CP]=On[vB]=On[kB]=On[MB]=On[bB]=On[SB]=On[jB]=On[PB]=On[NB]=On[DB]=On[$B]=On[_B]=On[EB]=On[RP]=On[CB]=On[TB]=On[RB]=On[OB]=On[IB]=On[zB]=On[LB]=On[FB]=!0;On[wB]=On[TP]=On[AB]=!1;function $d(e,t,n,r,o,s){var l,c=t&mB,u=t&gB,d=t&yB;if(n&&(l=o?n(e,r,o,s):n(e)),l!==void 0)return l;if(!Gt(e))return e;var h=Ar(e);if(h){if(l=zq(e),!c)return $x(e,l)}else{var p=Jo(e),g=p==TP||p==xB;if(Jl(e))return bP(e,c);if(p==RP||p==CP||g&&!o){if(l=u||g?{}:EP(e),!c)return u?Aq(e,xq(l,e)):Rq(e,wq(l,e))}else{if(!On[p])return o?e:{};l=lB(e,p,c)}}s||(s=new Ti);var b=s.get(e);if(b)return b;s.set(e,l),pB(e)?e.forEach(function(x){l.add($d(x,t,n,x,e,s))}):fB(e)&&e.forEach(function(x,w){l.set(w,$d(x,t,n,w,e,s))});var y=d?u?Gx:VS:u?Mh:ei,_=h?void 0:y(e);return Ix(_||e,function(x,w){_&&(w=x,x=e[w]),qy(l,w,$d(x,t,n,w,e,s))}),l}var UB=1,VB=4;function Ph(e){return $d(e,UB|VB)}var qB="__lodash_hash_undefined__";function BB(e){return this.__data__.set(e,qB),this}function HB(e){return this.__data__.has(e)}function tc(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Fs;++t<n;)this.add(e[t])}tc.prototype.add=tc.prototype.push=BB;tc.prototype.has=HB;function KB(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 eh(e,t){return e.has(t)}var GB=1,ZB=2;function OP(e,t,n,r,o,s){var l=n&GB,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&ZB?new tc:void 0;for(s.set(e,t),s.set(t,e);++p<c;){var y=e[p],_=t[p];if(r)var x=l?r(_,y,p,t,e,s):r(y,_,p,e,t,s);if(x!==void 0){if(x)continue;g=!1;break}if(b){if(!KB(t,function(w,v){if(!eh(b,v)&&(y===w||o(y,w,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 WB(e){var t=-1,n=Array(e.size);return e.forEach(function(r,o){n[++t]=[o,r]}),n}function Wx(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var YB=1,XB=2,QB="[object Boolean]",JB="[object Date]",eH="[object Error]",tH="[object Map]",nH="[object Number]",rH="[object RegExp]",oH="[object Set]",iH="[object String]",sH="[object Symbol]",aH="[object ArrayBuffer]",lH="[object DataView]",GO=ii?ii.prototype:void 0,Bb=GO?GO.valueOf:void 0;function cH(e,t,n,r,o,s,l){switch(n){case lH:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case aH:return!(e.byteLength!=t.byteLength||!s(new ty(e),new ty(t)));case QB:case JB:case nH:return Oh(+e,+t);case eH:return e.name==t.name&&e.message==t.message;case rH:case iH:return e==t+"";case tH:var c=WB;case oH:var u=r&YB;if(c||(c=Wx),e.size!=t.size&&!u)return!1;var d=l.get(e);if(d)return d==t;r|=XB,l.set(e,t);var h=OP(c(e),c(t),r,o,s,l);return l.delete(e),h;case sH:if(Bb)return Bb.call(e)==Bb.call(t)}return!1}var uH=1,fH=Object.prototype,dH=fH.hasOwnProperty;function hH(e,t,n,r,o,s){var l=n&uH,c=VS(e),u=c.length,d=VS(t),h=d.length;if(u!=h&&!l)return!1;for(var p=u;p--;){var g=c[p];if(!(l?g in t:dH.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 x=l;++p<u;){g=c[p];var w=e[g],v=t[g];if(r)var C=l?r(v,w,g,t,e,s):r(w,v,g,e,t,s);if(!(C===void 0?w===v||o(w,v,n,r,s):C)){_=!1;break}x||(x=g=="constructor")}if(_&&!x){var S=e.constructor,T=t.constructor;S!=T&&"constructor"in e&&"constructor"in t&&!(typeof S=="function"&&S instanceof S&&typeof T=="function"&&T instanceof T)&&(_=!1)}return s.delete(e),s.delete(t),_}var pH=1,ZO="[object Arguments]",WO="[object Array]",gm="[object Object]",mH=Object.prototype,YO=mH.hasOwnProperty;function gH(e,t,n,r,o,s){var l=Ar(e),c=Ar(t),u=l?WO:Jo(e),d=c?WO:Jo(t);u=u==ZO?gm:u,d=d==ZO?gm:d;var h=u==gm,p=d==gm,g=u==d;if(g&&Jl(e)){if(!Jl(t))return!1;l=!0,h=!1}if(g&&!h)return s||(s=new Ti),l||kh(e)?OP(e,t,n,r,o,s):cH(e,t,u,n,r,o,s);if(!(n&pH)){var b=h&&YO.call(e,"__wrapped__"),y=p&&YO.call(t,"__wrapped__");if(b||y){var _=b?e.value():e,x=y?t.value():t;return s||(s=new Ti),o(_,x,n,r,s)}}return g?(s||(s=new Ti),hH(e,t,n,r,o,s)):!1}function Nh(e,t,n,r,o){return e===t?!0:e==null||t==null||!si(e)&&!si(t)?e!==e&&t!==t:gH(e,t,n,r,Nh,o)}var yH=1,vH=2;function bH(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 Ti,p;if(!(p===void 0?Nh(d,u,yH|vH,r,h):p))return!1}}return!0}function AP(e){return e===e&&!Gt(e)}function SH(e){for(var t=ei(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,AP(o)]}return t}function kP(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function wH(e){var t=SH(e);return t.length==1&&t[0][2]?kP(t[0][0],t[0][1]):function(n){return n===e||bH(n,e,t)}}function xH(e,t){return e!=null&&t in Object(e)}function MP(e,t,n){t=af(t,e);for(var r=-1,o=t.length,s=!1;++r<o;){var l=uc(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&&Fx(o)&&Vy(l,o)&&(Ar(e)||$u(e)))}function jP(e,t){return e!=null&&MP(e,t,xH)}var _H=1,EH=2;function CH(e,t){return Vx(e)&&AP(t)?kP(uc(e),t):function(n){var r=Ie(n,e);return r===void 0&&r===t?jP(n,e):Nh(t,r,_H|EH)}}function TH(e){return function(t){return t?.[e]}}function RH(e){return function(t){return Gy(t,e)}}function OH(e){return Vx(e)?TH(uc(e)):RH(e)}function Yx(e){return typeof e=="function"?e:e==null?Uy:typeof e=="object"?Ar(e)?CH(e[0],e[1]):wH(e):OH(e)}function AH(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 PP=AH();function NP(e,t){return e&&PP(e,t,ei)}function kH(e,t){return function(n,r){if(n==null)return n;if(!Ya(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 DP=kH(NP);function HS(e,t,n){(n!==void 0&&!Oh(e[t],n)||n===void 0&&!(t in e))&&Lx(e,t,n)}function th(e){return si(e)&&Ya(e)}function KS(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function MH(e){return cc(e,Mh(e))}function jH(e,t,n,r,o,s,l){var c=KS(e,n),u=KS(t,n),d=l.get(u);if(d){HS(e,n,d);return}var h=s?s(c,u,n+"",e,t,l):void 0,p=h===void 0;if(p){var g=Ar(u),b=!g&&Jl(u),y=!g&&!b&&kh(u);h=u,g||b||y?Ar(c)?h=c:th(c)?h=$x(c):b?(p=!1,h=bP(u,!0)):y?(p=!1,h=_P(u,!0)):h=[]:La(u)||$u(u)?(h=c,$u(c)?h=MH(c):(!Gt(c)||Rh(c))&&(h=EP(u))):p=!1}p&&(l.set(u,h),o(h,u,r,s,l),l.delete(u)),HS(e,n,h)}function $P(e,t,n,r,o){e!==t&&PP(t,function(s,l){if(o||(o=new Ti),Gt(s))jH(e,t,l,n,$P,r,o);else{var c=r?r(KS(e,l),s,l+"",e,t,o):void 0;c===void 0&&(c=s),HS(e,l,c)}},Mh)}var PH=200;function NH(e,t,n,r){var o=-1,s=zx,l=!0,c=e.length,u=[],d=t.length;if(!c)return u;t.length>=PH&&(s=eh,l=!1,t=new tc(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 DH=By(function(e,t){return th(e)?NH(e,jh(t,1,th,!0)):[]});function IP(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function zP(e){return typeof e=="function"?e:Uy}function $H(e,t){var n=Ar(e)?Ix:DP;return n(e,zP(t))}var IH=1/0;function zH(e){var t=e==null?0:e.length;return t?jh(e,IH):[]}var LH=Object.prototype,FH=LH.hasOwnProperty;function UH(e,t){return e!=null&&FH.call(e,t)}function Ft(e,t){return e!=null&&MP(e,t,UH)}var VH="[object String]";function Fa(e){return typeof e=="string"||!Ar(e)&&si(e)&&zs(e)==VH}function qH(e,t){return sf(t,function(n){return e[n]})}function BH(e){return e==null?[]:qH(e,ei(e))}var HH=Math.max;function KH(e,t,n,r){e=Ya(e)?e:BH(e),n=n?nP(n):0;var o=e.length;return n<0&&(n=HH(o+n,0)),Fa(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&iP(e,t,n)>-1}var GH=Math.min;function ZH(e,t,n){for(var r=zx,o=e[0].length,s=e.length,l=s,c=Array(s),u=1/0,d=[];l--;){var h=e[l];u=GH(h.length,u),c[l]=o>=120&&h.length>=120?new tc(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?eh(g,y):r(d,y))){for(l=s;--l;){var _=c[l];if(!(_?eh(_,y):r(e[l],y)))continue e}g&&g.push(y),d.push(b)}}return d}function WH(e){return th(e)?e:[]}var XO=By(function(e){var t=sf(e,WH);return t.length&&t[0]===e[0]?ZH(t):[]});function YH(e,t){return t.length<2?e:Gy(e,hq(t,0,-1))}var XH="[object Map]",QH="[object Set]",JH=Object.prototype,eK=JH.hasOwnProperty;function vr(e){if(e==null)return!0;if(Ya(e)&&(Ar(e)||typeof e=="string"||typeof e.splice=="function"||Jl(e)||kh(e)||$u(e)))return!e.length;var t=Jo(e);if(t==XH||t==QH)return!e.size;if(Ah(e))return!pP(e).length;for(var n in e)if(eK.call(e,n))return!1;return!0}function ka(e,t){return Nh(e,t)}function tK(e,t,n){n=typeof n=="function"?n:void 0;var r=n?n(e,t):void 0;return r===void 0?Nh(e,t,void 0,n):!!r}var nK="[object Number]";function LP(e){return typeof e=="number"||si(e)&&zs(e)==nK}function ny(e){return e==null}function FP(e){return e===void 0}var rK=aP(function(e,t,n){$P(e,t,n)}),oK=Object.prototype,iK=oK.hasOwnProperty;function UP(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__"&&!iK.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=YH(e,t);return l==null||delete l[uc(IP(t))]}function sK(e){return La(e)?void 0:e}var aK=1,lK=2,cK=4,nh=gP(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}),cc(e,Gx(e),n),r&&(n=$d(n,aK|lK|cK,sK));for(var o=t.length;o--;)UP(n,t[o]);return n});function Xx(e,t,n,r){if(!Gt(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=uc(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=Gt(h)?h:Vy(t[o+1])?[]:{})}qy(c,u,d),c=c[u]}return e}function VP(e,t,n){for(var r=-1,o=t.length,s={};++r<o;){var l=t[r],c=Gy(e,l);n(c,l)&&Xx(s,af(l,e),c)}return s}function uK(e,t){if(e==null)return{};var n=sf(Gx(e),function(r){return[r]});return t=Yx(t),VP(e,n,function(r,o){return t(r,o[0])})}function fK(e,t){return VP(e,t,function(n,r){return jP(e,r)})}var Qx=gP(function(e,t){return e==null?{}:fK(e,t)});function dK(e,t,n,r,o){return o(e,function(s,l,c){n=r?(r=!1,s):t(n,s,l,c)}),n}function hK(e,t,n){var r=Ar(e)?pq:dK,o=arguments.length<3;return r(e,Yx(t),n,o,DP)}function fn(e,t,n){return e==null?e:Xx(e,t,n)}function pK(e,t,n,r){return r=typeof r=="function"?r:void 0,e==null?e:Xx(e,t,n,r)}var mK=9007199254740991,Hb=4294967295,gK=Math.min;function qP(e,t){if(e=nP(e),e<1||e>mK)return[];var n=Hb,r=gK(e,Hb);t=zP(t),e-=Hb;for(var o=lP(r,t);++n<e;)t(n);return o}function BP(e){return Ar(e)?sf(e,uc):Th(e)?[e]:$x(mP(Bx(e)))}function yK(e,t,n){var r=Ar(e),o=r||Jl(e)||kh(e);if(t=Yx(t),n==null){var s=e&&e.constructor;o?n=r?new s:[]:Gt(e)?n=Rh(s)?rP(Zy(e)):{}:n={}}return(o?Ix:NP)(e,function(l,c,u){return t(n,l,c,u)}),n}var vK=1/0,bK=_u&&1/Wx(new _u([,-0]))[1]==vK?function(e){return new _u(e)}:Pg,SK=200;function HP(e,t,n){var r=-1,o=zx,s=e.length,l=!0,c=[],u=c;if(s>=SK){var d=bK(e);if(d)return Wx(d);l=!1,o=eh,u=new tc}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 wK=By(function(e){return HP(jh(e,1,th,!0))});function KP(e){return e&&e.length?HP(e):[]}var xK=0;function GP(e){var t=++xK;return Bx(e)+t}function _K(e,t){return e==null?!0:UP(e,t)}const QO=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},EK=(e=>e?QO(e):QO),CK=e=>e;function TK(e,t=CK){const n=ko.useSyncExternalStore(e.subscribe,ko.useCallback(()=>t(e.getState()),[e,t]),ko.useCallback(()=>t(e.getInitialState()),[e,t]));return ko.useDebugValue(n),n}const RK=e=>{const t=EK(e),n=r=>TK(t,r);return Object.assign(n,t),n},OK=(e=>RK),lf=OK()(e=>({tools:{},setToolData:(t,n)=>e(r=>Kb(r,`tools.${t}`,{...r.tools[t],...n})),updateOpenaiObject:(t,n,r)=>e(o=>o.tools[t]?.openaiObject?Kb(o,`tools.${t}.openaiObject.${n}`,r):o),pushOpenAiLog:(t,n)=>e(r=>{const o=r.tools[t]?.openaiLogs||[];return Kb(r,`tools.${t}.openaiLogs`,[...o,{...n,id:crypto.randomUUID()}])})})),cf=e=>{const{tools:t}=lf();return t[e]},Kb=(e,t,n)=>{const r=Ph(e);return fn(r,t,n),r};function ZP(e,t,n){try{return e(t)}catch(r){return IF("[nuqs] Error while parsing value `%s`: %O"+(n?" (for key `%s`)":""),t,r,n),null}}function Us(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),ZP(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 AK=Us({parse:e=>e,serialize:String});Us({parse:e=>{const t=parseInt(e);return t==t?t:null},serialize:e=>""+Math.round(e)});Us({parse:e=>{const t=parseInt(e);return t==t?t-1:null},serialize:e=>""+Math.round(e+1)});Us({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}});Us({parse:e=>{const t=parseFloat(e);return t==t?t:null},serialize:String});Us({parse:e=>e.toLowerCase()==="true",serialize:String});function Jx(e,t){return e.valueOf()===t.valueOf()}Us({parse:e=>{const t=parseInt(e);return t==t?new Date(t):null},serialize:e=>""+e.valueOf(),eq:Jx});Us({parse:e=>{const t=new Date(e);return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString(),eq:Jx});Us({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:Jx});const Gb=Ox(),kK={};function MK(e,t={}){const n=k.useId(),r=HF(),o=KF(),{history:s="replace",scroll:l=r?.scroll??!1,shallow:c=r?.shallow??!0,throttleMs:u=Nd.timeMs,limitUrlUpdates:d=r?.limitUrlUpdates,clearOnDefault:h=r?.clearOnDefault??!0,startTransition:p,urlKeys:g=kK}=t,b=Object.keys(e).join(","),y=k.useMemo(()=>Object.fromEntries(Object.keys(e).map(M=>[M,g[M]??M])),[b,JSON.stringify(g)]),_=BF(Object.values(y)),x=_.searchParams,w=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(",")]),C=Lb.useQueuedQueries(Object.values(y)),[S,T]=k.useState(()=>Zb(e,g,x??new URLSearchParams,C).state),E=k.useRef(S);if(Kn("[nuq+ %s `%s`] render - state: %O, iSP: %s",n,b,S,x),Object.keys(w.current).join("&")!==Object.values(y).join("&")){const{state:M,hasChanged:P}=Zb(e,g,x,C,w.current,E.current);P&&(Kn("[nuq+ %s `%s`] State changed: %O",n,b,{state:M,initialSearchParams:x,queuedQueries:C,queryRef:w.current,stateRef:E.current}),E.current=M,T(M)),w.current=Object.fromEntries(Object.entries(y).map(([I,z])=>[z,e[I]?.type==="multi"?x?.getAll(z):x?.get(z)??null]))}k.useEffect(()=>{const{state:M,hasChanged:P}=Zb(e,g,x,C,w.current,E.current);P&&(Kn("[nuq+ %s `%s`] State changed: %O",n,b,{state:M,initialSearchParams:x,queuedQueries:C,queryRef:w.current,stateRef:E.current}),E.current=M,T(M))},[Object.values(y).map(M=>`${M}=${x?.getAll(M)}`).join("&"),JSON.stringify(C)]),k.useEffect(()=>{const M=Object.keys(e).reduce((P,I)=>(P[I]=({state:z,query:U})=>{T(G=>{const{defaultValue:J}=e[I],ee=y[I],Z=z??J??null,H=G[I]??J??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,ee,z,J,E.current),G):(E.current={...E.current,[I]:Z},w.current[ee]=U,Kn("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). updateInternalState, resolved: %O",n,b,ee,z,J,E.current),E.current)})},P),{});for(const P of Object.keys(e)){const I=y[P];Kn("[nuq+ %s `%s`] Subscribing to sync for `%s`",n,I,b),Gb.on(I,M[P])}return()=>{for(const P of Object.keys(e)){const I=y[P];Kn("[nuq+ %s `%s`] Unsubscribing to sync for `%s`",n,I,b),Gb.off(I,M[P])}}},[b,y]);const O=k.useCallback((M,P={})=>{const I=Object.fromEntries(Object.keys(e).map(H=>[H,null])),z=typeof M=="function"?M(JO(E.current,v))??I:M??I;Kn("[nuq+ %s `%s`] setState: %O",n,b,z);let U,G=0,J=!1;const ee=[];for(let[H,Y]of Object.entries(z)){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??((V,D)=>V===D))(Y,oe.defaultValue)&&(Y=null);const $=Y===null?null:(oe.serialize??String)(Y);Gb.emit(ne,{state:Y,query:$});const q={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"){q.options.shallow===!0&&console.warn(Ch(422));const V=P?.limitUrlUpdates?.timeMs??d?.timeMs??oe.limitUrlUpdates?.timeMs??Nd.timeMs,D=Lb.push(q,V,_,o);G<V&&(U=D,G=V)}else{const V=P?.limitUrlUpdates?.timeMs??oe?.limitUrlUpdates?.timeMs??d?.timeMs??P.throttleMs??oe.throttleMs??u;ee.push(Lb.abort(ne)),Mg.push(q,V),J=!0}}const Z=ee.reduce((H,Y)=>Y(H),J?Mg.flush(_,o):Mg.getPendingPromise(_));return U??Z},[b,s,c,l,u,d?.method,d?.timeMs,p,y,_.updateUrl,_.getSearchParamsSnapshot,_.rateLimitFactor,o,v]);return[k.useMemo(()=>JO(S,v),[S,v]),O]}function Zb(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&&Nj(o[p]??b,y)?(u[d]=s[d]??null,u):(l=!0,u[d]=(WF(y)?null:ZP(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 JO(e,t){return Object.fromEntries(Object.keys(e).map(n=>[n,e[n]??t[n]??null]))}function jK(e,t={}){const{parse:n,type:r,serialize:o,eq:s,defaultValue:l,...c}=t,[{[e]:u},d]=MK({[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 e_(){return jK("tool",AK)}const PK=Object.freeze({status:"aborted"});function Ae(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 Eu extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class WP extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const YP={};function Ua(e){return YP}function XP(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 GS(e,t){return typeof t=="bigint"?t.toString():t}function Wy(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function t_(e){return e==null}function n_(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function NK(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 eA=Symbol("evaluating");function dn(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==eA)return r===void 0&&(r=eA,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function fc(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Xa(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function tA(e){return JSON.stringify(e)}function DK(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const QP="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function rh(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const $K=Wy(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function zu(e){if(rh(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(rh(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function JP(e){return zu(e)?{...e}:Array.isArray(e)?[...e]:e}const IK=new Set(["string","number","symbol"]);function Lu(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Qa(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function tt(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 zK(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const LK={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 FK(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=Xa(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 fc(this,"shape",l),l},checks:[]});return Qa(e,s)}function UK(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=Xa(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 fc(this,"shape",l),l},checks:[]});return Qa(e,s)}function VK(e,t){if(!zu(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=Xa(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t};return fc(this,"shape",s),s}});return Qa(e,o)}function qK(e,t){if(!zu(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Xa(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return fc(this,"shape",r),r}});return Qa(e,n)}function BK(e,t){const n=Xa(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return fc(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return Qa(e,n)}function HK(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=Xa(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 fc(this,"shape",u),u},checks:[]});return Qa(t,l)}function KK(e,t,n){const r=Xa(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 fc(this,"shape",s),s}});return Qa(t,r)}function hu(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 pu(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 Va(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 r_(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function oh(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const e4=(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,GS,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},t4=Ae("$ZodError",e4),n4=Ae("$ZodError",e4,{Parent:Error});function GK(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 ZK(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 o_=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 Eu;if(l.issues.length){const c=new(o?.Err??e)(l.issues.map(u=>Va(u,s,Ua())));throw QP(c,o?.callee),c}return l.value},i_=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=>Va(u,s,Ua())));throw QP(c,o?.callee),c}return l.value},Yy=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 Eu;return s.issues.length?{success:!1,error:new(e??t4)(s.issues.map(l=>Va(l,o,Ua())))}:{success:!0,data:s.value}},r4=Yy(n4),Xy=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=>Va(l,o,Ua())))}:{success:!0,data:s.value}},WK=Xy(n4),YK=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return o_(e)(t,n,o)},XK=e=>(t,n,r)=>o_(e)(t,n,r),QK=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return i_(e)(t,n,o)},JK=e=>async(t,n,r)=>i_(e)(t,n,r),eG=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Yy(e)(t,n,o)},tG=e=>(t,n,r)=>Yy(e)(t,n,r),nG=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Xy(e)(t,n,o)},rG=e=>async(t,n,r)=>Xy(e)(t,n,r),oG=/^[cC][^\s-]{8,}$/,iG=/^[0-9a-z]+$/,sG=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,aG=/^[0-9a-vA-V]{20}$/,lG=/^[A-Za-z0-9]{27}$/,cG=/^[a-zA-Z0-9_-]{21}$/,uG=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,fG=/^([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})$/,nA=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)$/,dG=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,hG="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function pG(){return new RegExp(hG,"u")}const mG=/^(?:(?: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])$/,gG=/^(([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}|:))$/,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])\/([0-9]|[1-2][0-9]|3[0-2])$/,vG=/^(([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])$/,bG=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,o4=/^[A-Za-z0-9_-]*$/,SG=/^\+[1-9]\d{6,14}$/,i4="(?:(?:\\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])))",wG=new RegExp(`^${i4}$`);function s4(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 xG(e){return new RegExp(`^${s4(e)}$`)}function _G(e){const t=s4({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(`^${i4}T(?:${r})$`)}const EG=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},CG=/^-?\d+$/,a4=/^-?\d+(?:\.\d+)?$/,TG=/^(?:true|false)$/i,RG=/^null$/i,OG=/^[^A-Z]*$/,AG=/^[^a-z]*$/,vo=Ae("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),l4={number:"number",bigint:"bigint",object:"date"},c4=Ae("$ZodCheckLessThan",(e,t)=>{vo.init(e,t);const n=l4[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})}}),u4=Ae("$ZodCheckGreaterThan",(e,t)=>{vo.init(e,t);const n=l4[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})}}),kG=Ae("$ZodCheckMultipleOf",(e,t)=>{vo.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):NK(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})}}),MG=Ae("$ZodCheckNumberFormat",(e,t)=>{vo.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[o,s]=LK[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=CG)}),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})}}),jG=Ae("$ZodCheckMaxLength",(e,t)=>{var n;vo.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!t_(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=r_(o);r.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),PG=Ae("$ZodCheckMinLength",(e,t)=>{var n;vo.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!t_(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=r_(o);r.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),NG=Ae("$ZodCheckLengthEquals",(e,t)=>{var n;vo.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!t_(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=r_(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})}}),Qy=Ae("$ZodCheckStringFormat",(e,t)=>{var n,r;vo.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=()=>{})}),DG=Ae("$ZodCheckRegex",(e,t)=>{Qy.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})}}),$G=Ae("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=OG),Qy.init(e,t)}),IG=Ae("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=AG),Qy.init(e,t)}),zG=Ae("$ZodCheckIncludes",(e,t)=>{vo.init(e,t);const n=Lu(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})}}),LG=Ae("$ZodCheckStartsWith",(e,t)=>{vo.init(e,t);const n=new RegExp(`^${Lu(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})}}),FG=Ae("$ZodCheckEndsWith",(e,t)=>{vo.init(e,t);const n=new RegExp(`.*${Lu(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})}}),UG=Ae("$ZodCheckOverwrite",(e,t)=>{vo.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class VG{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 qG={major:4,minor:3,patch:5},Ln=Ae("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=qG;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=hu(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 Eu;if(h||b instanceof Promise)h=(h??Promise.resolve()).then(async()=>{await b,l.issues.length!==g&&(d||(d=hu(l,g)))});else{if(l.issues.length===g)continue;d||(d=hu(l,g))}}return h?h.then(()=>l):l},s=(l,c,u)=>{if(hu(l))return l.aborted=!0,l;const d=o(c,r,u);if(d instanceof Promise){if(u.async===!1)throw new Eu;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 Eu;return u.then(d=>o(d,r,c))}return o(u,r,c)}}dn(e,"~standard",()=>({validate:o=>{try{const s=r4(e,o);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return WK(e,o).then(l=>l.success?{value:l.data}:{issues:l.error?.issues})}},vendor:"zod",version:1}))}),s_=Ae("$ZodString",(e,t)=>{Ln.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??EG(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}}),Wn=Ae("$ZodStringFormat",(e,t)=>{Qy.init(e,t),s_.init(e,t)}),BG=Ae("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=fG),Wn.init(e,t)}),HG=Ae("$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=nA(r))}else t.pattern??(t.pattern=nA());Wn.init(e,t)}),KG=Ae("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=dG),Wn.init(e,t)}),GG=Ae("$ZodURL",(e,t)=>{Wn.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})}}}),ZG=Ae("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=pG()),Wn.init(e,t)}),WG=Ae("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=cG),Wn.init(e,t)}),YG=Ae("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=oG),Wn.init(e,t)}),XG=Ae("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=iG),Wn.init(e,t)}),QG=Ae("$ZodULID",(e,t)=>{t.pattern??(t.pattern=sG),Wn.init(e,t)}),JG=Ae("$ZodXID",(e,t)=>{t.pattern??(t.pattern=aG),Wn.init(e,t)}),eZ=Ae("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=lG),Wn.init(e,t)}),tZ=Ae("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=_G(t)),Wn.init(e,t)}),nZ=Ae("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=wG),Wn.init(e,t)}),rZ=Ae("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=xG(t)),Wn.init(e,t)}),oZ=Ae("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=uG),Wn.init(e,t)}),iZ=Ae("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=mG),Wn.init(e,t),e._zod.bag.format="ipv4"}),sZ=Ae("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=gG),Wn.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})}}}),aZ=Ae("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=yG),Wn.init(e,t)}),lZ=Ae("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=vG),Wn.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 f4(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const cZ=Ae("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=bG),Wn.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{f4(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function uZ(e){if(!o4.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return f4(n)}const fZ=Ae("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=o4),Wn.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{uZ(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),dZ=Ae("$ZodE164",(e,t)=>{t.pattern??(t.pattern=SG),Wn.init(e,t)});function hZ(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 pZ=Ae("$ZodJWT",(e,t)=>{Wn.init(e,t),e._zod.check=n=>{hZ(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),d4=Ae("$ZodNumber",(e,t)=>{Ln.init(e,t),e._zod.pattern=e._zod.bag.pattern??a4,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}}),mZ=Ae("$ZodNumberFormat",(e,t)=>{MG.init(e,t),d4.init(e,t)}),gZ=Ae("$ZodBoolean",(e,t)=>{Ln.init(e,t),e._zod.pattern=TG,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}}),yZ=Ae("$ZodNull",(e,t)=>{Ln.init(e,t),e._zod.pattern=RG,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}}),vZ=Ae("$ZodAny",(e,t)=>{Ln.init(e,t),e._zod.parse=n=>n}),bZ=Ae("$ZodUnknown",(e,t)=>{Ln.init(e,t),e._zod.parse=n=>n}),SZ=Ae("$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 rA(e,t,n){e.issues.length&&t.issues.push(...pu(n,e.issues)),t.value[n]=e.value}const wZ=Ae("$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=>rA(d,n,l))):rA(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(...pu(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function h4(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=zK(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function p4(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 xZ=Ae("$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=Wy(()=>h4(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=rh,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(x=>ry(x,c,g,d,y))):ry(_,c,g,d,y)}return s?p4(h,d,c,u,r.value,e):h.length?Promise.all(h).then(()=>c):c}}),_Z=Ae("$ZodObjectJIT",(e,t)=>{xZ.init(e,t);const n=e._zod.parse,r=Wy(()=>h4(t)),o=g=>{const b=new VG(["shape","payload","ctx"]),y=r.value,_=C=>{const S=tA(C);return`shape[${S}]._zod.run({ value: input[${S}], issues: [] }, ctx)`};b.write("const input = payload.value;");const x=Object.create(null);let w=0;for(const C of y.keys)x[C]=`key_${w++}`;b.write("const newResult = {};");for(const C of y.keys){const S=x[C],T=tA(C),O=g[C]?._zod?.optout==="optional";b.write(`const ${S} = ${_(C)};`),O?b.write(`
|
|
13
|
+
if (${S}.issues.length) {
|
|
14
|
+
if (${T} in input) {
|
|
15
|
+
payload.issues = payload.issues.concat(${S}.issues.map(iss => ({
|
|
16
|
+
...iss,
|
|
17
|
+
path: iss.path ? [${T}, ...iss.path] : [${T}]
|
|
18
|
+
})));
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
if (${S}.value === undefined) {
|
|
23
|
+
if (${T} in input) {
|
|
24
|
+
newResult[${T}] = undefined;
|
|
25
|
+
}
|
|
26
|
+
} else {
|
|
27
|
+
newResult[${T}] = ${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 ? [${T}, ...iss.path] : [${T}]
|
|
35
|
+
})));
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (${S}.value === undefined) {
|
|
39
|
+
if (${T} in input) {
|
|
40
|
+
newResult[${T}] = undefined;
|
|
41
|
+
}
|
|
42
|
+
} else {
|
|
43
|
+
newResult[${T}] = ${S}.value;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
`)}b.write("payload.value = newResult;"),b.write("return payload;");const v=b.compile();return(C,S)=>v(g,C,S)};let s;const l=rh,c=!YP.jitless,d=c&&$K.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?p4([],y,g,b,p,e):g):n(g,b):(g.issues.push({expected:"object",code:"invalid_type",input:y,inst:e}),g)}});function oA(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=>!hu(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=>Va(l,r,Ua())))}),t)}const m4=Ae("$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=>n_(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=>oA(u,o,e,s)):oA(c,o,e,s)}}),EZ=Ae("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,m4.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=Wy(()=>{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(!rh(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)}}),CZ=Ae("$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])=>iA(n,u,d)):iA(n,s,l)}});function ZS(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(zu(e)&&zu(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=ZS(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=ZS(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 iA(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}),hu(e))return e;const l=ZS(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 TZ=Ae("$ZodRecord",(e,t)=>{Ln.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!zu(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(...pu(d,p.issues)),n.value[d]=p.value})):(h.issues.length&&n.issues.push(...pu(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"&&a4.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=>Va(p,r,Ua())),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(...pu(c,p.issues)),n.value[u.value]=p.value})):(h.issues.length&&n.issues.push(...pu(c,h.issues)),n.value[u.value]=h.value)}}return s.length?Promise.all(s).then(()=>n):n}}),RZ=Ae("$ZodEnum",(e,t)=>{Ln.init(e,t);const n=XP(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(o=>IK.has(typeof o)).map(o=>typeof o=="string"?Lu(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}}),OZ=Ae("$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"?Lu(r):r?Lu(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}}),AZ=Ae("$ZodTransform",(e,t)=>{Ln.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new WP(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 Eu;return n.value=o,n}});function sA(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const g4=Ae("$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(`^(${n_(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=>sA(s,n.value)):sA(o,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),kZ=Ae("$ZodExactOptional",(e,t)=>{g4.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)}),MZ=Ae("$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(`^(${n_(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)}),jZ=Ae("$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=>aA(s,t)):aA(o,t)}});function aA(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const PZ=Ae("$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))}),NZ=Ae("$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=>lA(s,e)):lA(o,e)}});function lA(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 DZ=Ae("$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=>Va(l,r,Ua()))},input:n.value}),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(s=>Va(s,r,Ua()))},input:n.value}),n.issues=[]),n)}}),$Z=Ae("$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 IZ=Ae("$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(cA):cA(o)}});function cA(e){return e.value=Object.freeze(e.value),e}const zZ=Ae("$ZodCustom",(e,t)=>{vo.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=>uA(s,n,r,e));uA(o,n,r,e)}});function uA(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(oh(o))}}var fA;class LZ{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 FZ(){return new LZ}(fA=globalThis).__zod_globalRegistry??(fA.__zod_globalRegistry=FZ());const Cd=globalThis.__zod_globalRegistry;function UZ(e,t){return new e({type:"string",...tt(t)})}function VZ(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...tt(t)})}function dA(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...tt(t)})}function qZ(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...tt(t)})}function BZ(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...tt(t)})}function HZ(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...tt(t)})}function KZ(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...tt(t)})}function y4(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...tt(t)})}function GZ(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...tt(t)})}function ZZ(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...tt(t)})}function WZ(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...tt(t)})}function YZ(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...tt(t)})}function XZ(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...tt(t)})}function QZ(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...tt(t)})}function JZ(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...tt(t)})}function eW(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...tt(t)})}function tW(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...tt(t)})}function nW(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...tt(t)})}function rW(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...tt(t)})}function oW(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...tt(t)})}function iW(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...tt(t)})}function sW(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...tt(t)})}function aW(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...tt(t)})}function lW(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...tt(t)})}function cW(e,t){return new e({type:"string",format:"date",check:"string_format",...tt(t)})}function uW(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...tt(t)})}function fW(e,t){return new e({type:"string",format:"duration",check:"string_format",...tt(t)})}function dW(e,t){return new e({type:"number",checks:[],...tt(t)})}function hW(e,t){return new e({type:"number",coerce:!0,checks:[],...tt(t)})}function pW(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...tt(t)})}function mW(e,t){return new e({type:"boolean",...tt(t)})}function gW(e,t){return new e({type:"null",...tt(t)})}function yW(e){return new e({type:"any"})}function vW(e){return new e({type:"unknown"})}function bW(e,t){return new e({type:"never",...tt(t)})}function hA(e,t){return new c4({check:"less_than",...tt(t),value:e,inclusive:!1})}function Wb(e,t){return new c4({check:"less_than",...tt(t),value:e,inclusive:!0})}function pA(e,t){return new u4({check:"greater_than",...tt(t),value:e,inclusive:!1})}function Yb(e,t){return new u4({check:"greater_than",...tt(t),value:e,inclusive:!0})}function mA(e,t){return new kG({check:"multiple_of",...tt(t),value:e})}function v4(e,t){return new jG({check:"max_length",...tt(t),maximum:e})}function oy(e,t){return new PG({check:"min_length",...tt(t),minimum:e})}function b4(e,t){return new NG({check:"length_equals",...tt(t),length:e})}function SW(e,t){return new DG({check:"string_format",format:"regex",...tt(t),pattern:e})}function wW(e){return new $G({check:"string_format",format:"lowercase",...tt(e)})}function xW(e){return new IG({check:"string_format",format:"uppercase",...tt(e)})}function _W(e,t){return new zG({check:"string_format",format:"includes",...tt(t),includes:e})}function EW(e,t){return new LG({check:"string_format",format:"starts_with",...tt(t),prefix:e})}function CW(e,t){return new FG({check:"string_format",format:"ends_with",...tt(t),suffix:e})}function uf(e){return new UG({check:"overwrite",tx:e})}function TW(e){return uf(t=>t.normalize(e))}function RW(){return uf(e=>e.trim())}function OW(){return uf(e=>e.toLowerCase())}function AW(){return uf(e=>e.toUpperCase())}function kW(){return uf(e=>DK(e))}function MW(e,t,n){return new e({type:"array",element:t,...tt(n)})}function jW(e,t,n){const r=tt(n);return r.abort??(r.abort=!0),new e({type:"custom",check:"custom",fn:t,...r})}function PW(e,t,n){return new e({type:"custom",check:"custom",fn:t,...tt(n)})}function NW(e){const t=DW(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(oh(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(oh(o))}},e(n.value,n)));return t}function DW(e,t){const n=new vo({check:"custom",...tt(t)});return n._zod.check=e,n}function S4(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??Cd,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"&&ro(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 w4(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 x4(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 ro(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 ro(r.element,n);if(r.type==="set")return ro(r.valueType,n);if(r.type==="lazy")return ro(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 ro(r.innerType,n);if(r.type==="intersection")return ro(r.left,n)||ro(r.right,n);if(r.type==="record"||r.type==="map")return ro(r.keyType,n)||ro(r.valueType,n);if(r.type==="pipe")return ro(r.in,n)||ro(r.out,n);if(r.type==="object"){for(const o in r.shape)if(ro(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(ro(o,n))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(ro(o,n))return!0;return!!(r.rest&&ro(r.rest,n))}return!1}const $W=(e,t={})=>n=>{const r=S4({...n,processors:t});return br(e,r),w4(r,e),x4(r,e)},iy=(e,t,n={})=>r=>{const{libraryOptions:o,target:s}=r??{},l=S4({...o??{},target:s,io:t,processors:n});return br(e,l),w4(l,e),x4(l,e)},IW={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},zW=(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=IW[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}))])}},LW=(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)},FW=(e,t,n,r)=>{n.type="boolean"},UW=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},VW=(e,t,n,r)=>{n.not={}},qW=(e,t,n,r)=>{},BW=(e,t,n,r)=>{},HW=(e,t,n,r)=>{const o=e._zod.def,s=XP(o.entries);s.every(l=>typeof l=="number")&&(n.type="number"),s.every(l=>typeof l=="string")&&(n.type="string"),n.enum=s},KW=(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},GW=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},ZW=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},WW=(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"]})},YW=(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)},XW=(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},QW=(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},JW=(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)}},eY=(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"}]},tY=(e,t,n,r)=>{const o=e._zod.def;br(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType},nY=(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))},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,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},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;let l;try{l=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=l},iY=(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},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,n.readOnly=!0},_4=(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 Jy(e){return!!e._zod}function Ca(e,t){return Jy(e)?r4(e,t):e.safeParse(t)}function E4(e){if(!e)return;let t;if(Jy(e)?t=e._zod?.def?.shape:t=e.shape,!!t){if(typeof t=="function")try{return t()}catch{return}return t}}function aY(e){if(Jy(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 lY=Ae("ZodISODateTime",(e,t)=>{tZ.init(e,t),Jn.init(e,t)});function C4(e){return lW(lY,e)}const cY=Ae("ZodISODate",(e,t)=>{nZ.init(e,t),Jn.init(e,t)});function uY(e){return cW(cY,e)}const fY=Ae("ZodISOTime",(e,t)=>{rZ.init(e,t),Jn.init(e,t)});function dY(e){return uW(fY,e)}const hY=Ae("ZodISODuration",(e,t)=>{oZ.init(e,t),Jn.init(e,t)});function pY(e){return fW(hY,e)}const mY=(e,t)=>{t4.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>ZK(e,n)},flatten:{value:n=>GK(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,GS,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,GS,2)}},isEmpty:{get(){return e.issues.length===0}}})},ci=Ae("ZodError",mY,{Parent:Error}),gY=o_(ci),yY=i_(ci),vY=Yy(ci),bY=Xy(ci),SY=YK(ci),wY=XK(ci),xY=QK(ci),_Y=JK(ci),EY=eG(ci),CY=tG(ci),TY=nG(ci),RY=rG(ci),Fn=Ae("ZodType",(e,t)=>(Ln.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:iy(e,"input"),output:iy(e,"output")}}),e.toJSONSchema=$W(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Xa(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)=>Qa(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>gY(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>vY(e,n,r),e.parseAsync=async(n,r)=>yY(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>bY(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>SY(e,n,r),e.decode=(n,r)=>wY(e,n,r),e.encodeAsync=async(n,r)=>xY(e,n,r),e.decodeAsync=async(n,r)=>_Y(e,n,r),e.safeEncode=(n,r)=>EY(e,n,r),e.safeDecode=(n,r)=>CY(e,n,r),e.safeEncodeAsync=async(n,r)=>TY(e,n,r),e.safeDecodeAsync=async(n,r)=>RY(e,n,r),e.refine=(n,r)=>e.check(SX(n,r)),e.superRefine=n=>e.check(wX(n)),e.overwrite=n=>e.check(uf(n)),e.optional=()=>ir(e),e.exactOptional=()=>aX(e),e.nullable=()=>vA(e),e.nullish=()=>ir(vA(e)),e.nonoptional=n=>hX(e,n),e.array=()=>Ke(e),e.or=n=>Un([e,n]),e.and=n=>l_(e,n),e.transform=n=>YS(e,j4(n)),e.default=n=>uX(e,n),e.prefault=n=>dX(e,n),e.catch=n=>mX(e,n),e.pipe=n=>YS(e,n),e.readonly=()=>vX(e),e.describe=n=>{const r=e.clone();return Cd.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return Cd.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return Cd.get(e);const r=e.clone();return Cd.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),T4=Ae("_ZodString",(e,t)=>{s_.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(r,o,s)=>zW(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(SW(...r)),e.includes=(...r)=>e.check(_W(...r)),e.startsWith=(...r)=>e.check(EW(...r)),e.endsWith=(...r)=>e.check(CW(...r)),e.min=(...r)=>e.check(oy(...r)),e.max=(...r)=>e.check(v4(...r)),e.length=(...r)=>e.check(b4(...r)),e.nonempty=(...r)=>e.check(oy(1,...r)),e.lowercase=r=>e.check(wW(r)),e.uppercase=r=>e.check(xW(r)),e.trim=()=>e.check(RW()),e.normalize=(...r)=>e.check(TW(...r)),e.toLowerCase=()=>e.check(OW()),e.toUpperCase=()=>e.check(AW()),e.slugify=()=>e.check(kW())}),OY=Ae("ZodString",(e,t)=>{s_.init(e,t),T4.init(e,t),e.email=n=>e.check(VZ(AY,n)),e.url=n=>e.check(y4(R4,n)),e.jwt=n=>e.check(aW(HY,n)),e.emoji=n=>e.check(GZ(MY,n)),e.guid=n=>e.check(dA(gA,n)),e.uuid=n=>e.check(qZ(bm,n)),e.uuidv4=n=>e.check(BZ(bm,n)),e.uuidv6=n=>e.check(HZ(bm,n)),e.uuidv7=n=>e.check(KZ(bm,n)),e.nanoid=n=>e.check(ZZ(jY,n)),e.guid=n=>e.check(dA(gA,n)),e.cuid=n=>e.check(WZ(PY,n)),e.cuid2=n=>e.check(YZ(NY,n)),e.ulid=n=>e.check(XZ(DY,n)),e.base64=n=>e.check(oW(VY,n)),e.base64url=n=>e.check(iW(qY,n)),e.xid=n=>e.check(QZ($Y,n)),e.ksuid=n=>e.check(JZ(IY,n)),e.ipv4=n=>e.check(eW(zY,n)),e.ipv6=n=>e.check(tW(LY,n)),e.cidrv4=n=>e.check(nW(FY,n)),e.cidrv6=n=>e.check(rW(UY,n)),e.e164=n=>e.check(sW(BY,n)),e.datetime=n=>e.check(C4(n)),e.date=n=>e.check(uY(n)),e.time=n=>e.check(dY(n)),e.duration=n=>e.check(pY(n))});function ue(e){return UZ(OY,e)}const Jn=Ae("ZodStringFormat",(e,t)=>{Wn.init(e,t),T4.init(e,t)}),AY=Ae("ZodEmail",(e,t)=>{KG.init(e,t),Jn.init(e,t)}),gA=Ae("ZodGUID",(e,t)=>{BG.init(e,t),Jn.init(e,t)}),bm=Ae("ZodUUID",(e,t)=>{HG.init(e,t),Jn.init(e,t)}),R4=Ae("ZodURL",(e,t)=>{GG.init(e,t),Jn.init(e,t)});function kY(e){return y4(R4,e)}const MY=Ae("ZodEmoji",(e,t)=>{ZG.init(e,t),Jn.init(e,t)}),jY=Ae("ZodNanoID",(e,t)=>{WG.init(e,t),Jn.init(e,t)}),PY=Ae("ZodCUID",(e,t)=>{YG.init(e,t),Jn.init(e,t)}),NY=Ae("ZodCUID2",(e,t)=>{XG.init(e,t),Jn.init(e,t)}),DY=Ae("ZodULID",(e,t)=>{QG.init(e,t),Jn.init(e,t)}),$Y=Ae("ZodXID",(e,t)=>{JG.init(e,t),Jn.init(e,t)}),IY=Ae("ZodKSUID",(e,t)=>{eZ.init(e,t),Jn.init(e,t)}),zY=Ae("ZodIPv4",(e,t)=>{iZ.init(e,t),Jn.init(e,t)}),LY=Ae("ZodIPv6",(e,t)=>{sZ.init(e,t),Jn.init(e,t)}),FY=Ae("ZodCIDRv4",(e,t)=>{aZ.init(e,t),Jn.init(e,t)}),UY=Ae("ZodCIDRv6",(e,t)=>{lZ.init(e,t),Jn.init(e,t)}),VY=Ae("ZodBase64",(e,t)=>{cZ.init(e,t),Jn.init(e,t)}),qY=Ae("ZodBase64URL",(e,t)=>{fZ.init(e,t),Jn.init(e,t)}),BY=Ae("ZodE164",(e,t)=>{dZ.init(e,t),Jn.init(e,t)}),HY=Ae("ZodJWT",(e,t)=>{pZ.init(e,t),Jn.init(e,t)}),a_=Ae("ZodNumber",(e,t)=>{d4.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(r,o,s)=>LW(e,r,o),e.gt=(r,o)=>e.check(pA(r,o)),e.gte=(r,o)=>e.check(Yb(r,o)),e.min=(r,o)=>e.check(Yb(r,o)),e.lt=(r,o)=>e.check(hA(r,o)),e.lte=(r,o)=>e.check(Wb(r,o)),e.max=(r,o)=>e.check(Wb(r,o)),e.int=r=>e.check(yA(r)),e.safe=r=>e.check(yA(r)),e.positive=r=>e.check(pA(0,r)),e.nonnegative=r=>e.check(Yb(0,r)),e.negative=r=>e.check(hA(0,r)),e.nonpositive=r=>e.check(Wb(0,r)),e.multipleOf=(r,o)=>e.check(mA(r,o)),e.step=(r,o)=>e.check(mA(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 dW(a_,e)}const KY=Ae("ZodNumberFormat",(e,t)=>{mZ.init(e,t),a_.init(e,t)});function yA(e){return pW(KY,e)}const GY=Ae("ZodBoolean",(e,t)=>{gZ.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>FW(e,n,r)});function $n(e){return mW(GY,e)}const ZY=Ae("ZodNull",(e,t)=>{yZ.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>UW(e,n,r)});function O4(e){return gW(ZY,e)}const WY=Ae("ZodAny",(e,t)=>{vZ.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>qW()});function YY(){return yW(WY)}const XY=Ae("ZodUnknown",(e,t)=>{bZ.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>BW()});function Xn(){return vW(XY)}const QY=Ae("ZodNever",(e,t)=>{SZ.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>VW(e,n,r)});function JY(e){return bW(QY,e)}const eX=Ae("ZodArray",(e,t)=>{wZ.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>WW(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(v4(n,r)),e.length=(n,r)=>e.check(b4(n,r)),e.unwrap=()=>e.element});function Ke(e,t){return MW(eX,e,t)}const A4=Ae("ZodObject",(e,t)=>{_Z.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>YW(e,n,r,o),dn(e,"shape",()=>t.shape),e.keyof=()=>Lo(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Xn()}),e.loose=()=>e.clone({...e._zod.def,catchall:Xn()}),e.strict=()=>e.clone({...e._zod.def,catchall:JY()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>VK(e,n),e.safeExtend=n=>qK(e,n),e.merge=n=>BK(e,n),e.pick=n=>FK(e,n),e.omit=n=>UK(e,n),e.partial=(...n)=>HK(P4,e,n[0]),e.required=(...n)=>KK(N4,e,n[0])});function Ge(e,t){const n={type:"object",shape:e??{},...tt(t)};return new A4(n)}function Hr(e,t){return new A4({type:"object",shape:e,catchall:Xn(),...tt(t)})}const k4=Ae("ZodUnion",(e,t)=>{m4.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>XW(e,n,r,o),e.options=t.options});function Un(e,t){return new k4({type:"union",options:e,...tt(t)})}const tX=Ae("ZodDiscriminatedUnion",(e,t)=>{k4.init(e,t),EZ.init(e,t)});function M4(e,t,n){return new tX({type:"union",options:t,discriminator:e,...tt(n)})}const nX=Ae("ZodIntersection",(e,t)=>{CZ.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>QW(e,n,r,o)});function l_(e,t){return new nX({type:"intersection",left:e,right:t})}const rX=Ae("ZodRecord",(e,t)=>{TZ.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>JW(e,n,r,o),e.keyType=t.keyType,e.valueType=t.valueType});function Qn(e,t,n){return new rX({type:"record",keyType:e,valueType:t,...tt(n)})}const WS=Ae("ZodEnum",(e,t)=>{RZ.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(r,o,s)=>HW(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 WS({...t,checks:[],...tt(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 WS({...t,checks:[],...tt(o),entries:s})}});function Lo(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new WS({type:"enum",entries:n,...tt(t)})}const oX=Ae("ZodLiteral",(e,t)=>{OZ.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>KW(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 oX({type:"literal",values:Array.isArray(e)?e:[e],...tt(t)})}const iX=Ae("ZodTransform",(e,t)=>{AZ.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ZW(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new WP(e.constructor.name);n.addIssue=s=>{if(typeof s=="string")n.issues.push(oh(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(oh(l))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(s=>(n.value=s,n)):(n.value=o,n)}});function j4(e){return new iX({type:"transform",transform:e})}const P4=Ae("ZodOptional",(e,t)=>{g4.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>_4(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function ir(e){return new P4({type:"optional",innerType:e})}const sX=Ae("ZodExactOptional",(e,t)=>{kZ.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>_4(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function aX(e){return new sX({type:"optional",innerType:e})}const lX=Ae("ZodNullable",(e,t)=>{MZ.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>eY(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function vA(e){return new lX({type:"nullable",innerType:e})}const cX=Ae("ZodDefault",(e,t)=>{jZ.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>nY(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function uX(e,t){return new cX({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():JP(t)}})}const fX=Ae("ZodPrefault",(e,t)=>{PZ.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 dX(e,t){return new fX({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():JP(t)}})}const N4=Ae("ZodNonOptional",(e,t)=>{NZ.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>tY(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function hX(e,t){return new N4({type:"nonoptional",innerType:e,...tt(t)})}const pX=Ae("ZodCatch",(e,t)=>{DZ.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.removeCatch=e.unwrap});function mX(e,t){return new pX({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const gX=Ae("ZodPipe",(e,t)=>{$Z.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>iY(e,n,r,o),e.in=t.in,e.out=t.out});function YS(e,t){return new gX({type:"pipe",in:e,out:t})}const yX=Ae("ZodReadonly",(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});function vX(e){return new yX({type:"readonly",innerType:e})}const D4=Ae("ZodCustom",(e,t)=>{zZ.init(e,t),Fn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>GW(e,n)});function bX(e,t){return jW(D4,e??(()=>!0),t)}function SX(e,t={}){return PW(D4,e,t)}function wX(e){return NW(e)}function $4(e,t){return YS(j4(e),t)}const xX={custom:"custom"};function _X(e){return hW(a_,e)}const e0="2025-11-25",EX=[e0,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],zl="io.modelcontextprotocol/related-task",t0="2.0",Kr=bX(e=>e!==null&&(typeof e=="object"||typeof e=="function")),I4=Un([ue(),hn().int()]),z4=ue();Hr({ttl:Un([hn(),O4()]).optional(),pollInterval:hn().optional()});const CX=Ge({ttl:hn().optional()}),TX=Ge({taskId:ue()}),c_=Hr({progressToken:I4.optional(),[zl]:TX.optional()}),Fo=Ge({_meta:c_.optional()}),Dh=Fo.extend({task:CX.optional()}),RX=e=>Dh.safeParse(e).success,Gr=Ge({method:ue(),params:Fo.loose().optional()}),ui=Ge({_meta:c_.optional()}),fi=Ge({method:ue(),params:ui.loose().optional()}),Zr=Hr({_meta:c_.optional()}),n0=Un([ue(),hn().int()]),L4=Ge({jsonrpc:ot(t0),id:n0,...Gr.shape}).strict(),XS=e=>L4.safeParse(e).success,F4=Ge({jsonrpc:ot(t0),...fi.shape}).strict(),OX=e=>F4.safeParse(e).success,u_=Ge({jsonrpc:ot(t0),id:n0,result:Zr}).strict(),Td=e=>u_.safeParse(e).success;var xt;(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"})(xt||(xt={}));const f_=Ge({jsonrpc:ot(t0),id:n0.optional(),error:Ge({code:hn().int(),message:ue(),data:Xn().optional()})}).strict(),AX=e=>f_.safeParse(e).success,Xb=Un([L4,F4,u_,f_]);Un([u_,f_]);const mu=Zr.strict(),kX=ui.extend({requestId:n0.optional(),reason:ue().optional()}),d_=fi.extend({method:ot("notifications/cancelled"),params:kX}),MX=Ge({src:ue(),mimeType:ue().optional(),sizes:Ke(ue()).optional(),theme:Lo(["light","dark"]).optional()}),$h=Ge({icons:Ke(MX).optional()}),Fu=Ge({name:ue(),title:ue().optional()}),U4=Fu.extend({...Fu.shape,...$h.shape,version:ue(),websiteUrl:ue().optional(),description:ue().optional()}),jX=l_(Ge({applyDefaults:$n().optional()}),Qn(ue(),Xn())),PX=$4(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,l_(Ge({form:jX.optional(),url:Kr.optional()}),Qn(ue(),Xn()).optional())),NX=Hr({list:Kr.optional(),cancel:Kr.optional(),requests:Hr({sampling:Hr({createMessage:Kr.optional()}).optional(),elicitation:Hr({create:Kr.optional()}).optional()}).optional()}),DX=Hr({list:Kr.optional(),cancel:Kr.optional(),requests:Hr({tools:Hr({call:Kr.optional()}).optional()}).optional()}),$X=Ge({experimental:Qn(ue(),Kr).optional(),sampling:Ge({context:Kr.optional(),tools:Kr.optional()}).optional(),elicitation:PX.optional(),roots:Ge({listChanged:$n().optional()}).optional(),tasks:NX.optional()}),IX=Fo.extend({protocolVersion:ue(),capabilities:$X,clientInfo:U4}),zX=Gr.extend({method:ot("initialize"),params:IX}),LX=Ge({experimental:Qn(ue(),Kr).optional(),logging:Kr.optional(),completions:Kr.optional(),prompts:Ge({listChanged:$n().optional()}).optional(),resources:Ge({subscribe:$n().optional(),listChanged:$n().optional()}).optional(),tools:Ge({listChanged:$n().optional()}).optional(),tasks:DX.optional()}),V4=Zr.extend({protocolVersion:ue(),capabilities:LX,serverInfo:U4,instructions:ue().optional()}),q4=fi.extend({method:ot("notifications/initialized"),params:ui.optional()}),FX=e=>q4.safeParse(e).success,h_=Gr.extend({method:ot("ping"),params:Fo.optional()}),UX=Ge({progress:hn(),total:ir(hn()),message:ir(ue())}),VX=Ge({...ui.shape,...UX.shape,progressToken:I4}),p_=fi.extend({method:ot("notifications/progress"),params:VX}),qX=Fo.extend({cursor:z4.optional()}),Ih=Gr.extend({params:qX.optional()}),zh=Zr.extend({nextCursor:z4.optional()}),BX=Lo(["working","input_required","completed","failed","cancelled"]),Lh=Ge({taskId:ue(),status:BX,ttl:Un([hn(),O4()]),createdAt:ue(),lastUpdatedAt:ue(),pollInterval:ir(hn()),statusMessage:ir(ue())}),ih=Zr.extend({task:Lh}),HX=ui.merge(Lh),sy=fi.extend({method:ot("notifications/tasks/status"),params:HX}),m_=Gr.extend({method:ot("tasks/get"),params:Fo.extend({taskId:ue()})}),g_=Zr.merge(Lh),y_=Gr.extend({method:ot("tasks/result"),params:Fo.extend({taskId:ue()})});Zr.loose();const v_=Ih.extend({method:ot("tasks/list")}),b_=zh.extend({tasks:Ke(Lh)}),S_=Gr.extend({method:ot("tasks/cancel"),params:Fo.extend({taskId:ue()})}),KX=Zr.merge(Lh),B4=Ge({uri:ue(),mimeType:ir(ue()),_meta:Qn(ue(),Xn()).optional()}),H4=B4.extend({text:ue()}),w_=ue().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),K4=B4.extend({blob:w_}),Fh=Lo(["user","assistant"]),ff=Ge({audience:Ke(Fh).optional(),priority:hn().min(0).max(1).optional(),lastModified:C4({offset:!0}).optional()}),G4=Ge({...Fu.shape,...$h.shape,uri:ue(),description:ir(ue()),mimeType:ir(ue()),annotations:ff.optional(),_meta:ir(Hr({}))}),GX=Ge({...Fu.shape,...$h.shape,uriTemplate:ue(),description:ir(ue()),mimeType:ir(ue()),annotations:ff.optional(),_meta:ir(Hr({}))}),ZX=Ih.extend({method:ot("resources/list")}),Z4=zh.extend({resources:Ke(G4)}),WX=Ih.extend({method:ot("resources/templates/list")}),W4=zh.extend({resourceTemplates:Ke(GX)}),x_=Fo.extend({uri:ue()}),YX=x_,XX=Gr.extend({method:ot("resources/read"),params:YX}),Y4=Zr.extend({contents:Ke(Un([H4,K4]))}),X4=fi.extend({method:ot("notifications/resources/list_changed"),params:ui.optional()}),QX=x_,JX=Gr.extend({method:ot("resources/subscribe"),params:QX}),eQ=x_,tQ=Gr.extend({method:ot("resources/unsubscribe"),params:eQ}),nQ=ui.extend({uri:ue()}),rQ=fi.extend({method:ot("notifications/resources/updated"),params:nQ}),oQ=Ge({name:ue(),description:ir(ue()),required:ir($n())}),iQ=Ge({...Fu.shape,...$h.shape,description:ir(ue()),arguments:ir(Ke(oQ)),_meta:ir(Hr({}))}),sQ=Ih.extend({method:ot("prompts/list")}),Q4=zh.extend({prompts:Ke(iQ)}),aQ=Fo.extend({name:ue(),arguments:Qn(ue(),ue()).optional()}),lQ=Gr.extend({method:ot("prompts/get"),params:aQ}),__=Ge({type:ot("text"),text:ue(),annotations:ff.optional(),_meta:Qn(ue(),Xn()).optional()}),E_=Ge({type:ot("image"),data:w_,mimeType:ue(),annotations:ff.optional(),_meta:Qn(ue(),Xn()).optional()}),C_=Ge({type:ot("audio"),data:w_,mimeType:ue(),annotations:ff.optional(),_meta:Qn(ue(),Xn()).optional()}),cQ=Ge({type:ot("tool_use"),name:ue(),id:ue(),input:Qn(ue(),Xn()),_meta:Qn(ue(),Xn()).optional()}),uQ=Ge({type:ot("resource"),resource:Un([H4,K4]),annotations:ff.optional(),_meta:Qn(ue(),Xn()).optional()}),fQ=G4.extend({type:ot("resource_link")}),T_=Un([__,E_,C_,fQ,uQ]),dQ=Ge({role:Fh,content:T_}),J4=Zr.extend({description:ue().optional(),messages:Ke(dQ)}),eN=fi.extend({method:ot("notifications/prompts/list_changed"),params:ui.optional()}),hQ=Ge({title:ue().optional(),readOnlyHint:$n().optional(),destructiveHint:$n().optional(),idempotentHint:$n().optional(),openWorldHint:$n().optional()}),pQ=Ge({taskSupport:Lo(["required","optional","forbidden"]).optional()}),tN=Ge({...Fu.shape,...$h.shape,description:ue().optional(),inputSchema:Ge({type:ot("object"),properties:Qn(ue(),Kr).optional(),required:Ke(ue()).optional()}).catchall(Xn()),outputSchema:Ge({type:ot("object"),properties:Qn(ue(),Kr).optional(),required:Ke(ue()).optional()}).catchall(Xn()).optional(),annotations:hQ.optional(),execution:pQ.optional(),_meta:Qn(ue(),Xn()).optional()}),mQ=Ih.extend({method:ot("tools/list")}),nN=zh.extend({tools:Ke(tN)}),r0=Zr.extend({content:Ke(T_).default([]),structuredContent:Qn(ue(),Xn()).optional(),isError:$n().optional()});r0.or(Zr.extend({toolResult:Xn()}));const gQ=Dh.extend({name:ue(),arguments:Qn(ue(),Xn()).optional()}),yQ=Gr.extend({method:ot("tools/call"),params:gQ}),rN=fi.extend({method:ot("notifications/tools/list_changed"),params:ui.optional()}),vQ=Ge({autoRefresh:$n().default(!0),debounceMs:hn().int().nonnegative().default(300)}),oN=Lo(["debug","info","notice","warning","error","critical","alert","emergency"]),bQ=Fo.extend({level:oN}),SQ=Gr.extend({method:ot("logging/setLevel"),params:bQ}),wQ=ui.extend({level:oN,logger:ue().optional(),data:Xn()}),xQ=fi.extend({method:ot("notifications/message"),params:wQ}),_Q=Ge({name:ue().optional()}),EQ=Ge({hints:Ke(_Q).optional(),costPriority:hn().min(0).max(1).optional(),speedPriority:hn().min(0).max(1).optional(),intelligencePriority:hn().min(0).max(1).optional()}),CQ=Ge({mode:Lo(["auto","required","none"]).optional()}),TQ=Ge({type:ot("tool_result"),toolUseId:ue().describe("The unique identifier for the corresponding tool call."),content:Ke(T_).default([]),structuredContent:Ge({}).loose().optional(),isError:$n().optional(),_meta:Qn(ue(),Xn()).optional()}),RQ=M4("type",[__,E_,C_]),ay=M4("type",[__,E_,C_,cQ,TQ]),OQ=Ge({role:Fh,content:Un([ay,Ke(ay)]),_meta:Qn(ue(),Xn()).optional()}),AQ=Dh.extend({messages:Ke(OQ),modelPreferences:EQ.optional(),systemPrompt:ue().optional(),includeContext:Lo(["none","thisServer","allServers"]).optional(),temperature:hn().optional(),maxTokens:hn().int(),stopSequences:Ke(ue()).optional(),metadata:Kr.optional(),tools:Ke(tN).optional(),toolChoice:CQ.optional()}),iN=Gr.extend({method:ot("sampling/createMessage"),params:AQ}),sN=Zr.extend({model:ue(),stopReason:ir(Lo(["endTurn","stopSequence","maxTokens"]).or(ue())),role:Fh,content:RQ}),kQ=Zr.extend({model:ue(),stopReason:ir(Lo(["endTurn","stopSequence","maxTokens","toolUse"]).or(ue())),role:Fh,content:Un([ay,Ke(ay)])}),MQ=Ge({type:ot("boolean"),title:ue().optional(),description:ue().optional(),default:$n().optional()}),jQ=Ge({type:ot("string"),title:ue().optional(),description:ue().optional(),minLength:hn().optional(),maxLength:hn().optional(),format:Lo(["email","uri","date","date-time"]).optional(),default:ue().optional()}),PQ=Ge({type:Lo(["number","integer"]),title:ue().optional(),description:ue().optional(),minimum:hn().optional(),maximum:hn().optional(),default:hn().optional()}),NQ=Ge({type:ot("string"),title:ue().optional(),description:ue().optional(),enum:Ke(ue()),default:ue().optional()}),DQ=Ge({type:ot("string"),title:ue().optional(),description:ue().optional(),oneOf:Ke(Ge({const:ue(),title:ue()})),default:ue().optional()}),$Q=Ge({type:ot("string"),title:ue().optional(),description:ue().optional(),enum:Ke(ue()),enumNames:Ke(ue()).optional(),default:ue().optional()}),IQ=Un([NQ,DQ]),zQ=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()}),LQ=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()}),FQ=Un([zQ,LQ]),UQ=Un([$Q,IQ,FQ]),VQ=Un([UQ,MQ,jQ,PQ]),qQ=Dh.extend({mode:ot("form").optional(),message:ue(),requestedSchema:Ge({type:ot("object"),properties:Qn(ue(),VQ),required:Ke(ue()).optional()})}),BQ=Dh.extend({mode:ot("url"),message:ue(),elicitationId:ue(),url:ue().url()}),HQ=Un([qQ,BQ]),aN=Gr.extend({method:ot("elicitation/create"),params:HQ}),KQ=ui.extend({elicitationId:ue()}),GQ=fi.extend({method:ot("notifications/elicitation/complete"),params:KQ}),lN=Zr.extend({action:Lo(["accept","decline","cancel"]),content:$4(e=>e===null?void 0:e,Qn(ue(),Un([ue(),hn(),$n(),Ke(ue())])).optional())}),ZQ=Ge({type:ot("ref/resource"),uri:ue()}),WQ=Ge({type:ot("ref/prompt"),name:ue()}),YQ=Fo.extend({ref:Un([WQ,ZQ]),argument:Ge({name:ue(),value:ue()}),context:Ge({arguments:Qn(ue(),ue()).optional()}).optional()}),XQ=Gr.extend({method:ot("completion/complete"),params:YQ}),cN=Zr.extend({completion:Hr({values:Ke(ue()).max(100),total:ir(hn().int()),hasMore:ir($n())})}),QQ=Ge({uri:ue().startsWith("file://"),name:ue().optional(),_meta:Qn(ue(),Xn()).optional()}),JQ=Gr.extend({method:ot("roots/list"),params:Fo.optional()}),eJ=Zr.extend({roots:Ke(QQ)}),tJ=fi.extend({method:ot("notifications/roots/list_changed"),params:ui.optional()});Un([h_,zX,XQ,SQ,lQ,sQ,ZX,WX,XX,JX,tQ,yQ,mQ,m_,y_,v_,S_]);Un([d_,p_,q4,tJ,sy]);Un([mu,sN,kQ,lN,eJ,g_,b_,ih]);Un([h_,iN,aN,JQ,m_,y_,v_,S_]);Un([d_,p_,xQ,rQ,X4,rN,eN,sy,GQ]);Un([mu,V4,cN,J4,Q4,Z4,W4,Y4,r0,nN,g_,b_,ih]);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===xt.UrlElicitationRequired&&r){const o=r;if(o.elicitations)return new nJ(o.elicitations,n)}return new ht(t,n,r)}}class nJ extends ht{constructor(t,n=`URL elicitation${t.length>1?"s":""} required`){super(xt.UrlElicitationRequired,n,{elicitations:t})}get elicitations(){return this.data?.elicitations??[]}}function kl(e){return e==="completed"||e==="failed"||e==="cancelled"}new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function bA(e){const n=E4(e)?.method;if(!n)throw new Error("Schema is missing a method literal");const r=aY(n);if(typeof r!="string")throw new Error("Schema method literal must be a string");return r}function SA(e,t){const n=Ca(e,t);if(!n.success)throw n.error;return n.data}const rJ=6e4;class oJ{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(d_,n=>{this._oncancel(n)}),this.setNotificationHandler(p_,n=>{this._onprogress(n)}),this.setRequestHandler(h_,n=>({})),this._taskStore=t?.taskStore,this._taskMessageQueue=t?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(m_,async(n,r)=>{const o=await this._taskStore.getTask(n.params.taskId,r.sessionId);if(!o)throw new ht(xt.InvalidParams,"Failed to retrieve task: Task not found");return{...o}}),this.setRequestHandler(y_,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(xt.InvalidParams,`Task not found: ${s}`);if(!kl(l.status))return await this._waitForTaskUpdate(s,r.signal),await o();if(kl(l.status)){const c=await this._taskStore.getTaskResult(s,r.sessionId);return this._clearTaskQueue(s),{...c,_meta:{...c._meta,[zl]:{taskId:s}}}}return await o()};return await o()}),this.setRequestHandler(v_,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(xt.InvalidParams,`Failed to list tasks: ${o instanceof Error?o.message:String(o)}`)}}),this.setRequestHandler(S_,async(n,r)=>{try{const o=await this._taskStore.getTask(n.params.taskId,r.sessionId);if(!o)throw new ht(xt.InvalidParams,`Task not found: ${n.params.taskId}`);if(kl(o.status))throw new ht(xt.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(xt.InvalidParams,`Task not found after cancellation: ${n.params.taskId}`);return{_meta:{},...s}}catch(o){throw o instanceof ht?o:new ht(xt.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(xt.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),Td(s)||AX(s)?this._onresponse(s):XS(s)?this._onrequest(s,l):OX(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(xt.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?.[zl]?.taskId;if(r===void 0){const h={jsonrpc:"2.0",id:t.id,error:{code:xt.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=RX(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:xt.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),Td(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(Td(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),Td(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(xt.InternalError,String(l))}}return}let s;try{const l=await this.request(t,ih,r);if(l.task)s=l.task.taskId,yield{type:"taskCreated",task:l.task};else throw new ht(xt.InternalError,"Task creation did not return a task");for(;;){const c=await this.getTask({taskId:s},r);if(yield{type:"taskStatus",task:c},kl(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(xt.InternalError,`Task ${s} failed`)}:c.status==="cancelled"&&(yield{type:"error",error:new ht(xt.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(xt.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||{},[zl]: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 C=v instanceof ht?v:new ht(xt.RequestTimeout,String(v));h(C)};this._responseHandlers.set(g,v=>{if(!r?.signal?.aborted){if(v instanceof Error)return h(v);try{const C=Ca(n,v.result);C.success?d(C.data):h(C.error)}catch(C){h(C)}}}),r?.signal?.addEventListener("abort",()=>{y(r?.signal?.reason)});const _=r?.timeout??rJ,x=()=>y(ht.fromError(xt.RequestTimeout,"Request timed out",{timeout:_}));this._setupTimeout(g,_,r?.maxTotalTimeout,x,r?.resetTimeoutOnProgress??!1);const w=u?.taskId;if(w){const v=C=>{const S=this._responseHandlers.get(g);S?S(C):this._onerror(new Error(`Response handler missing for side-channeled request ${g}`))};this._requestResolvers.set(g,v),this._enqueueTaskMessage(w,{type:"request",message:b,timestamp:Date.now()}).catch(C=>{this._cleanupTimeout(g),h(C)})}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},g_,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},b_,n)}async cancelTask(t,n){return this.request({method:"tasks/cancel",params:t},KX,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||{},[zl]: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||{},[zl]: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||{},[zl]:n.relatedTask}}}),await this._transport.send(l,n)}setRequestHandler(t,n){const r=bA(t);this.assertRequestHandlerCapability(r),this._requestHandlers.set(r,(o,s)=>{const l=SA(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=bA(t);this._notificationHandlers.set(r,o=>{const s=SA(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"&&XS(o.message)){const s=o.message.id,l=this._requestResolvers.get(s);l?(l(new ht(xt.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(xt.InvalidRequest,"Request cancelled"));return}const l=setTimeout(o,r);n.addEventListener("abort",()=>{clearTimeout(l),s(new ht(xt.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(xt.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),kl(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(xt.InvalidParams,`Task "${o}" not found - it may have been cleaned up`);if(kl(c.status))throw new ht(xt.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),kl(u.status)&&this._cleanupTaskProgressHandler(o)}},listTasks:o=>r.listTasks(o,n)}}}function wA(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function iJ(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];wA(l)&&wA(s)?n[o]={...l,...s}:n[o]=s}return n}var Sm={exports:{}},Qb={},Es={},Ml={},Jb={},e1={},t1={},xA;function ly(){return xA||(xA=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((C,S)=>`${C}${S}`,"")}get names(){var v;return(v=this._names)!==null&&v!==void 0?v:this._names=this._items.reduce((C,S)=>(S instanceof n&&(C[S.str]=(C[S.str]||0)+1),C),{})}}e._Code=r,e.nil=new r("");function o(w,...v){const C=[w[0]];let S=0;for(;S<v.length;)c(C,v[S]),C.push(w[++S]);return new r(C)}e._=o;const s=new r("+");function l(w,...v){const C=[b(w[0])];let S=0;for(;S<v.length;)C.push(s),c(C,v[S]),C.push(s,b(w[++S]));return u(C),new r(C)}e.str=l;function c(w,v){v instanceof r?w.push(...v._items):v instanceof n?w.push(v):w.push(p(v))}e.addCodeArg=c;function u(w){let v=1;for(;v<w.length-1;){if(w[v]===s){const C=d(w[v-1],w[v+1]);if(C!==void 0){w.splice(v-1,3,C);continue}w[v++]="+"}v++}}function d(w,v){if(v==='""')return w;if(w==='""')return v;if(typeof w=="string")return v instanceof n||w[w.length-1]!=='"'?void 0:typeof v!="string"?`${w.slice(0,-1)}${v}"`:v[0]==='"'?w.slice(0,-1)+v.slice(1):void 0;if(typeof v=="string"&&v[0]==='"'&&!(w instanceof n))return`"${w}${v.slice(1)}`}function h(w,v){return v.emptyStr()?w:w.emptyStr()?v:l`${w}${v}`}e.strConcat=h;function p(w){return typeof w=="number"||typeof w=="boolean"||w===null?w:b(Array.isArray(w)?w.join(","):w)}function g(w){return new r(b(w))}e.stringify=g;function b(w){return JSON.stringify(w).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=b;function y(w){return typeof w=="string"&&e.IDENTIFIER.test(w)?new r(`.${w}`):o`[${w}]`}e.getProperty=y;function _(w){if(typeof w=="string"&&e.IDENTIFIER.test(w))return new r(`${w}`);throw new Error(`CodeGen: invalid export name: ${w}, use explicit $id name mapping`)}e.getEsmExportName=_;function x(w){return new r(w.toString())}e.regexpCode=x})(t1)),t1}var n1={},_A;function EA(){return _A||(_A=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 x=this._scope[b]||(this._scope[b]=[]),w=x.length;return x[w]=h.ref,g.setValue(h,{property:b,itemIndex:w}),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 x=p[y]=p[y]||new Map;_.forEach(w=>{if(x.has(w))return;x.set(w,r.Started);let v=h(w);if(v){const C=this.opts.es5?e.varKinds.var:e.varKinds.const;b=(0,t._)`${b}${C} ${w} = ${v};${this.opts._n}`}else if(v=g?.(w))b=(0,t._)`${b}${v}${this.opts._n}`;else throw new n(w);x.set(w,r.Completed)})}return b}}e.ValueScope=c})(n1)),n1}var CA;function Rt(){return CA||(CA=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=EA();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=EA();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=J(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=J(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=J(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 ae=te[re];ae.optimizeNames(D,B)||(ee(D,ae.names),te.splice(re,1))}return te.length>0?this:void 0}get names(){return this.nodes.reduce((D,B)=>U(D,B.names),{})}}class y extends b{render(D){return"{"+D._n+super.render(D)+"}"+D._n}}class _ extends b{}class x extends y{}x.kind="else";class w 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 x(te):te}if(B)return D===!1?B instanceof w?B:B.nodes:this.nodes.length?this:new w(Z(D),B instanceof w?[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=J(this.condition,D,B),this}get names(){const D=super.names;return G(D,this.condition),this.else&&U(D,this.else.names),D}}w.kind="if";class v extends y{}v.kind="for";class C 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=J(this.iteration,D,B),this}get names(){return U(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:ae}=this;return`for(${B} ${te}=${re}; ${te}<${ae}; ${te}++)`+super.render(D)}get names(){const D=G(super.names,this.from);return G(D,this.to)}}class T 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=J(this.iterable,D,B),this}get names(){return U(super.names,this.iterable.names)}}class E 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)}}E.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&&U(D,this.catch.names),this.finally&&U(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 I extends y{render(D){return"finally"+super.render(D)}}I.kind="finally";class z{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 ae=this._scope.toName(B);return te!==void 0&&re&&(this._constants[ae.str]=te),this._leafNode(new l(D,ae,te)),ae}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 w(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 w(D))}else(){return this._elseNode(new x)}endIf(){return this._endBlockNode(w,x)}_for(D,B){return this._blockNode(D),B&&this.code(B).endFor(),this}for(D,B){return this._for(new C(D),B)}forRange(D,B,te,re,ae=this.opts.es5?n.varKinds.var:n.varKinds.let){const ge=this._scope.toName(D);return this._for(new S(ae,ge,B,te),()=>re(ge))}forOf(D,B,te,re=n.varKinds.const){const ae=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`,ke=>{this.var(ae,(0,t._)`${ge}[${ke}]`),te(ae)})}return this._for(new T("of",re,ae,B),()=>te(ae))}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 ae=this._scope.toName(D);return this._for(new T("in",re,ae,B),()=>te(ae))}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 ae=this.name("e");this._currNode=re.catch=new P(ae),B(ae)}return te&&(this._currNode=re.finally=new I,this.code(te)),this._endBlockNode(P,I)}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 E(D,B,te)),re&&this.code(re).endFunc(),this}endFunc(){return this._endBlockNode(E)}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 w))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=z;function U(V,D){for(const B in D)V[B]=(V[B]||0)+(D[B]||0);return V}function G(V,D){return D instanceof t._CodeOrName?U(V,D.names):V}function J(V,D,B){if(V instanceof t.Name)return te(V);if(!re(V))return V;return new t._Code(V._items.reduce((ae,ge)=>(ge instanceof t.Name&&(ge=te(ge)),ge instanceof t._Code?ae.push(...ge._items):ae.push(ge),ae),[]));function te(ae){const ge=B[ae.str];return ge===void 0||D[ae.str]!==1?ae:(delete D[ae.str],ge)}function re(ae){return ae instanceof t._Code&&ae._items.some(ge=>ge instanceof t.Name&&D[ge.str]===1&&B[ge.str]!==void 0)}}function ee(V,D){for(const B in D)V[B]=(V[B]||0)-(D[B]||0)}function Z(V){return typeof V=="boolean"||typeof V=="number"||V===null?!V:(0,t._)`!${q(V)}`}e.not=Z;const H=$(e.operators.AND);function Y(...V){return V.reduce(H)}e.and=Y;const oe=$(e.operators.OR);function ne(...V){return V.reduce(oe)}e.or=ne;function $(V){return(D,B)=>D===t.nil?B:B===t.nil?D:(0,t._)`${q(D)} ${V} ${q(B)}`}function q(V){return V instanceof t.Name?V:(0,t._)`(${V})`}})(e1)),e1}var At={},TA;function rn(){if(TA)return At;TA=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=Rt(),t=ly();function n(T){const E={};for(const O of T)E[O]=!0;return E}At.toHash=n;function r(T,E){return typeof E=="boolean"?E:Object.keys(E).length===0?!0:(o(T,E),!s(E,T.self.RULES.all))}At.alwaysValidSchema=r;function o(T,E=T.schema){const{opts:O,self:M}=T;if(!O.strictSchema||typeof E=="boolean")return;const P=M.RULES.keywords;for(const I in E)P[I]||S(T,`unknown keyword: "${I}"`)}At.checkUnknownRules=o;function s(T,E){if(typeof T=="boolean")return!T;for(const O in T)if(E[O])return!0;return!1}At.schemaHasRules=s;function l(T,E){if(typeof T=="boolean")return!T;for(const O in T)if(O!=="$ref"&&E.all[O])return!0;return!1}At.schemaHasRulesButRef=l;function c({topSchemaRef:T,schemaPath:E},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._)`${T}${E}${(0,e.getProperty)(M)}`}At.schemaRefOrVal=c;function u(T){return p(decodeURIComponent(T))}At.unescapeFragment=u;function d(T){return encodeURIComponent(h(T))}At.escapeFragment=d;function h(T){return typeof T=="number"?`${T}`:T.replace(/~/g,"~0").replace(/\//g,"~1")}At.escapeJsonPointer=h;function p(T){return T.replace(/~1/g,"/").replace(/~0/g,"~")}At.unescapeJsonPointer=p;function g(T,E){if(Array.isArray(T))for(const O of T)E(O);else E(T)}At.eachItem=g;function b({mergeNames:T,mergeToName:E,mergeValues:O,resultToName:M}){return(P,I,z,U)=>{const G=z===void 0?I:z instanceof e.Name?(I instanceof e.Name?T(P,I,z):E(P,I,z),z):I instanceof e.Name?(E(P,z,I),I):O(I,z);return U===e.Name&&!(G instanceof e.Name)?M(P,G):G}}At.mergeEvaluated={props:b({mergeNames:(T,E,O)=>T.if((0,e._)`${O} !== true && ${E} !== undefined`,()=>{T.if((0,e._)`${E} === true`,()=>T.assign(O,!0),()=>T.assign(O,(0,e._)`${O} || {}`).code((0,e._)`Object.assign(${O}, ${E})`))}),mergeToName:(T,E,O)=>T.if((0,e._)`${O} !== true`,()=>{E===!0?T.assign(O,!0):(T.assign(O,(0,e._)`${O} || {}`),_(T,O,E))}),mergeValues:(T,E)=>T===!0?!0:{...T,...E},resultToName:y}),items:b({mergeNames:(T,E,O)=>T.if((0,e._)`${O} !== true && ${E} !== undefined`,()=>T.assign(O,(0,e._)`${E} === true ? true : ${O} > ${E} ? ${O} : ${E}`)),mergeToName:(T,E,O)=>T.if((0,e._)`${O} !== true`,()=>T.assign(O,E===!0?!0:(0,e._)`${O} > ${E} ? ${O} : ${E}`)),mergeValues:(T,E)=>T===!0?!0:Math.max(T,E),resultToName:(T,E)=>T.var("items",E)})};function y(T,E){if(E===!0)return T.var("props",!0);const O=T.var("props",(0,e._)`{}`);return E!==void 0&&_(T,O,E),O}At.evaluatedPropsToName=y;function _(T,E,O){Object.keys(O).forEach(M=>T.assign((0,e._)`${E}${(0,e.getProperty)(M)}`,!0))}At.setEvaluated=_;const x={};function w(T,E){return T.scopeValue("func",{ref:E,code:x[E.code]||(x[E.code]=new t._Code(E.code))})}At.useFunc=w;var v;(function(T){T[T.Num=0]="Num",T[T.Str=1]="Str"})(v||(At.Type=v={}));function C(T,E,O){if(T instanceof e.Name){const M=E===v.Num;return O?M?(0,e._)`"[" + ${T} + "]"`:(0,e._)`"['" + ${T} + "']"`:M?(0,e._)`"/" + ${T}`:(0,e._)`"/" + ${T}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return O?(0,e.getProperty)(T).toString():"/"+h(T)}At.getErrorPath=C;function S(T,E,O=T.opts.strictSchema){if(O){if(E=`strict mode: ${E}`,O===!0)throw new Error(E);T.self.logger.warn(E)}}return At.checkStrictMode=S,At}var wm={},RA;function Ja(){if(RA)return wm;RA=1,Object.defineProperty(wm,"__esModule",{value:!0});const e=Rt(),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 OA;function o0(){return OA||(OA=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=Rt(),n=rn(),r=Ja();e.keywordError={message:({keyword:x})=>(0,t.str)`must pass "${x}" keyword validation`},e.keyword$DataError={message:({keyword:x,schemaType:w})=>w?(0,t.str)`"${x}" keyword must be ${w} ($data)`:(0,t.str)`"${x}" keyword is invalid ($data)`};function o(x,w=e.keywordError,v,C){const{it:S}=x,{gen:T,compositeRule:E,allErrors:O}=S,M=p(x,w,v);C??(E||O)?u(T,M):d(S,(0,t._)`[${M}]`)}e.reportError=o;function s(x,w=e.keywordError,v){const{it:C}=x,{gen:S,compositeRule:T,allErrors:E}=C,O=p(x,w,v);u(S,O),T||E||d(C,r.default.vErrors)}e.reportExtraError=s;function l(x,w){x.assign(r.default.errors,w),x.if((0,t._)`${r.default.vErrors} !== null`,()=>x.if(w,()=>x.assign((0,t._)`${r.default.vErrors}.length`,w),()=>x.assign(r.default.vErrors,null)))}e.resetErrorsCount=l;function c({gen:x,keyword:w,schemaValue:v,data:C,errsCount:S,it:T}){if(S===void 0)throw new Error("ajv implementation error");const E=x.name("err");x.forRange("i",S,r.default.errors,O=>{x.const(E,(0,t._)`${r.default.vErrors}[${O}]`),x.if((0,t._)`${E}.instancePath === undefined`,()=>x.assign((0,t._)`${E}.instancePath`,(0,t.strConcat)(r.default.instancePath,T.errorPath))),x.assign((0,t._)`${E}.schemaPath`,(0,t.str)`${T.errSchemaPath}/${w}`),T.opts.verbose&&(x.assign((0,t._)`${E}.schema`,v),x.assign((0,t._)`${E}.data`,C))})}e.extendErrors=c;function u(x,w){const v=x.const("err",w);x.if((0,t._)`${r.default.vErrors} === null`,()=>x.assign(r.default.vErrors,(0,t._)`[${v}]`),(0,t._)`${r.default.vErrors}.push(${v})`),x.code((0,t._)`${r.default.errors}++`)}function d(x,w){const{gen:v,validateName:C,schemaEnv:S}=x;S.$async?v.throw((0,t._)`new ${x.ValidationError}(${w})`):(v.assign((0,t._)`${C}.errors`,w),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(x,w,v){const{createErrors:C}=x.it;return C===!1?(0,t._)`{}`:g(x,w,v)}function g(x,w,v={}){const{gen:C,it:S}=x,T=[b(S,v),y(x,v)];return _(x,w,T),C.object(...T)}function b({errorPath:x},{instancePath:w}){const v=w?(0,t.str)`${x}${(0,n.getErrorPath)(w,n.Type.Str)}`:x;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,v)]}function y({keyword:x,it:{errSchemaPath:w}},{schemaPath:v,parentSchema:C}){let S=C?w:(0,t.str)`${w}/${x}`;return v&&(S=(0,t.str)`${S}${(0,n.getErrorPath)(v,n.Type.Str)}`),[h.schemaPath,S]}function _(x,{params:w,message:v},C){const{keyword:S,data:T,schemaValue:E,it:O}=x,{opts:M,propertyName:P,topSchemaRef:I,schemaPath:z}=O;C.push([h.keyword,S],[h.params,typeof w=="function"?w(x):w||(0,t._)`{}`]),M.messages&&C.push([h.message,typeof v=="function"?v(x):v]),M.verbose&&C.push([h.schema,E],[h.parentSchema,(0,t._)`${I}${z}`],[r.default.data,T]),P&&C.push([h.propertyName,P])}})(Jb)),Jb}var AA;function sJ(){if(AA)return Ml;AA=1,Object.defineProperty(Ml,"__esModule",{value:!0}),Ml.boolOrEmptySchema=Ml.topBoolOrEmptySchema=void 0;const e=o0(),t=Rt(),n=Ja(),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))}Ml.topBoolOrEmptySchema=o;function s(c,u){const{gen:d,schema:h}=c;h===!1?(d.var(u,!1),l(c)):d.var(u,!0)}Ml.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 Ml}var Lr={},jl={},kA;function uN(){if(kA)return jl;kA=1,Object.defineProperty(jl,"__esModule",{value:!0}),jl.getRules=jl.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)}jl.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 jl.getRules=r,jl}var Cs={},MA;function fN(){if(MA)return Cs;MA=1,Object.defineProperty(Cs,"__esModule",{value:!0}),Cs.shouldUseRule=Cs.shouldUseGroup=Cs.schemaHasRulesForType=void 0;function e({schema:r,self:o},s){const l=o.RULES.types[s];return l&&l!==!0&&t(r,l)}Cs.schemaHasRulesForType=e;function t(r,o){return o.rules.some(s=>n(r,s))}Cs.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 Cs.shouldUseRule=n,Cs}var jA;function cy(){if(jA)return Lr;jA=1,Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.reportTypeError=Lr.checkDataTypes=Lr.checkDataType=Lr.coerceAndCheckDataType=Lr.getJSONTypes=Lr.getSchemaTypes=Lr.DataType=void 0;const e=uN(),t=fN(),n=o0(),r=Rt(),o=rn();var s;(function(v){v[v.Correct=0]="Correct",v[v.Wrong=1]="Wrong"})(s||(Lr.DataType=s={}));function l(v){const C=c(v.type);if(C.includes("null")){if(v.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!C.length&&v.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');v.nullable===!0&&C.push("null")}return C}Lr.getSchemaTypes=l;function c(v){const C=Array.isArray(v)?v:v?[v]:[];if(C.every(e.isJSONType))return C;throw new Error("type must be JSONType or JSONType[]: "+C.join(","))}Lr.getJSONTypes=c;function u(v,C){const{gen:S,data:T,opts:E}=v,O=h(C,E.coerceTypes),M=C.length>0&&!(O.length===0&&C.length===1&&(0,t.schemaHasRulesForType)(v,C[0]));if(M){const P=y(C,T,E.strictNumbers,s.Wrong);S.if(P,()=>{O.length?p(v,C,O):x(v)})}return M}Lr.coerceAndCheckDataType=u;const d=new Set(["string","number","integer","boolean","null"]);function h(v,C){return C?v.filter(S=>d.has(S)||C==="array"&&S==="array"):[]}function p(v,C,S){const{gen:T,data:E,opts:O}=v,M=T.let("dataType",(0,r._)`typeof ${E}`),P=T.let("coerced",(0,r._)`undefined`);O.coerceTypes==="array"&&T.if((0,r._)`${M} == 'object' && Array.isArray(${E}) && ${E}.length == 1`,()=>T.assign(E,(0,r._)`${E}[0]`).assign(M,(0,r._)`typeof ${E}`).if(y(C,E,O.strictNumbers),()=>T.assign(P,E))),T.if((0,r._)`${P} !== undefined`);for(const z of S)(d.has(z)||z==="array"&&O.coerceTypes==="array")&&I(z);T.else(),x(v),T.endIf(),T.if((0,r._)`${P} !== undefined`,()=>{T.assign(E,P),g(v,P)});function I(z){switch(z){case"string":T.elseIf((0,r._)`${M} == "number" || ${M} == "boolean"`).assign(P,(0,r._)`"" + ${E}`).elseIf((0,r._)`${E} === null`).assign(P,(0,r._)`""`);return;case"number":T.elseIf((0,r._)`${M} == "boolean" || ${E} === null
|
|
50
|
+
|| (${M} == "string" && ${E} && ${E} == +${E})`).assign(P,(0,r._)`+${E}`);return;case"integer":T.elseIf((0,r._)`${M} === "boolean" || ${E} === null
|
|
51
|
+
|| (${M} === "string" && ${E} && ${E} == +${E} && !(${E} % 1))`).assign(P,(0,r._)`+${E}`);return;case"boolean":T.elseIf((0,r._)`${E} === "false" || ${E} === 0 || ${E} === null`).assign(P,!1).elseIf((0,r._)`${E} === "true" || ${E} === 1`).assign(P,!0);return;case"null":T.elseIf((0,r._)`${E} === "" || ${E} === 0 || ${E} === false`),T.assign(P,null);return;case"array":T.elseIf((0,r._)`${M} === "string" || ${M} === "number"
|
|
52
|
+
|| ${M} === "boolean" || ${E} === null`).assign(P,(0,r._)`[${E}]`)}}}function g({gen:v,parentData:C,parentDataProperty:S},T){v.if((0,r._)`${C} !== undefined`,()=>v.assign((0,r._)`${C}[${S}]`,T))}function b(v,C,S,T=s.Correct){const E=T===s.Correct?r.operators.EQ:r.operators.NEQ;let O;switch(v){case"null":return(0,r._)`${C} ${E} null`;case"array":O=(0,r._)`Array.isArray(${C})`;break;case"object":O=(0,r._)`${C} && typeof ${C} == "object" && !Array.isArray(${C})`;break;case"integer":O=M((0,r._)`!(${C} % 1) && !isNaN(${C})`);break;case"number":O=M();break;default:return(0,r._)`typeof ${C} ${E} ${v}`}return T===s.Correct?O:(0,r.not)(O);function M(P=r.nil){return(0,r.and)((0,r._)`typeof ${C} == "number"`,P,S?(0,r._)`isFinite(${C})`:r.nil)}}Lr.checkDataType=b;function y(v,C,S,T){if(v.length===1)return b(v[0],C,S,T);let E;const O=(0,o.toHash)(v);if(O.array&&O.object){const M=(0,r._)`typeof ${C} != "object"`;E=O.null?M:(0,r._)`!${C} || ${M}`,delete O.null,delete O.array,delete O.object}else E=r.nil;O.number&&delete O.integer;for(const M in O)E=(0,r.and)(E,b(M,C,S,T));return E}Lr.checkDataTypes=y;const _={message:({schema:v})=>`must be ${v}`,params:({schema:v,schemaValue:C})=>typeof v=="string"?(0,r._)`{type: ${v}}`:(0,r._)`{type: ${C}}`};function x(v){const C=w(v);(0,n.reportError)(C,_)}Lr.reportTypeError=x;function w(v){const{gen:C,data:S,schema:T}=v,E=(0,o.schemaRefOrVal)(v,T,"type");return{gen:C,keyword:"type",data:S,schema:T.type,schemaCode:E,schemaValue:E,parentSchema:T,params:{},it:v}}return Lr}var gd={},PA;function aJ(){if(PA)return gd;PA=1,Object.defineProperty(gd,"__esModule",{value:!0}),gd.assignDefaults=void 0;const e=Rt(),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))}gd.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 gd}var Si={},yn={},NA;function Oi(){if(NA)return yn;NA=1,Object.defineProperty(yn,"__esModule",{value:!0}),yn.validateUnion=yn.validateArray=yn.usePattern=yn.callValidateCode=yn.schemaProperties=yn.allSchemaProperties=yn.noPropertyInData=yn.propertyInData=yn.isOwnProperty=yn.hasPropFunc=yn.reportMissingProp=yn.checkMissingProp=yn.checkReportMissingProp=void 0;const e=Rt(),t=rn(),n=Ja(),r=rn();function o(v,C){const{gen:S,data:T,it:E}=v;S.if(h(S,T,C,E.opts.ownProperties),()=>{v.setParams({missingProperty:(0,e._)`${C}`},!0),v.error()})}yn.checkReportMissingProp=o;function s({gen:v,data:C,it:{opts:S}},T,E){return(0,e.or)(...T.map(O=>(0,e.and)(h(v,C,O,S.ownProperties),(0,e._)`${E} = ${O}`)))}yn.checkMissingProp=s;function l(v,C){v.setParams({missingProperty:C},!0),v.error()}yn.reportMissingProp=l;function c(v){return v.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}yn.hasPropFunc=c;function u(v,C,S){return(0,e._)`${c(v)}.call(${C}, ${S})`}yn.isOwnProperty=u;function d(v,C,S,T){const E=(0,e._)`${C}${(0,e.getProperty)(S)} !== undefined`;return T?(0,e._)`${E} && ${u(v,C,S)}`:E}yn.propertyInData=d;function h(v,C,S,T){const E=(0,e._)`${C}${(0,e.getProperty)(S)} === undefined`;return T?(0,e.or)(E,(0,e.not)(u(v,C,S))):E}yn.noPropertyInData=h;function p(v){return v?Object.keys(v).filter(C=>C!=="__proto__"):[]}yn.allSchemaProperties=p;function g(v,C){return p(C).filter(S=>!(0,t.alwaysValidSchema)(v,C[S]))}yn.schemaProperties=g;function b({schemaCode:v,data:C,it:{gen:S,topSchemaRef:T,schemaPath:E,errorPath:O},it:M},P,I,z){const U=z?(0,e._)`${v}, ${C}, ${T}${E}`:C,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 J=(0,e._)`${U}, ${S.object(...G)}`;return I!==e.nil?(0,e._)`${P}.call(${I}, ${J})`:(0,e._)`${P}(${J})`}yn.callValidateCode=b;const y=(0,e._)`new RegExp`;function _({gen:v,it:{opts:C}},S){const T=C.unicodeRegExp?"u":"",{regExp:E}=C.code,O=E(S,T);return v.scopeValue("pattern",{key:O.toString(),ref:O,code:(0,e._)`${E.code==="new RegExp"?y:(0,r.useFunc)(v,E)}(${S}, ${T})`})}yn.usePattern=_;function x(v){const{gen:C,data:S,keyword:T,it:E}=v,O=C.name("valid");if(E.allErrors){const P=C.let("valid",!0);return M(()=>C.assign(P,!1)),P}return C.var(O,!0),M(()=>C.break()),O;function M(P){const I=C.const("len",(0,e._)`${S}.length`);C.forRange("i",0,I,z=>{v.subschema({keyword:T,dataProp:z,dataPropType:t.Type.Num},O),C.if((0,e.not)(O),P)})}}yn.validateArray=x;function w(v){const{gen:C,schema:S,keyword:T,it:E}=v;if(!Array.isArray(S))throw new Error("ajv implementation error");if(S.some(I=>(0,t.alwaysValidSchema)(E,I))&&!E.opts.unevaluated)return;const M=C.let("valid",!1),P=C.name("_valid");C.block(()=>S.forEach((I,z)=>{const U=v.subschema({keyword:T,schemaProp:z,compositeRule:!0},P);C.assign(M,(0,e._)`${M} || ${P}`),v.mergeValidEvaluated(U,P)||C.if((0,e.not)(M))})),v.result(M,()=>v.reset(),()=>v.error(!0))}return yn.validateUnion=w,yn}var DA;function lJ(){if(DA)return Si;DA=1,Object.defineProperty(Si,"__esModule",{value:!0}),Si.validateKeywordUsage=Si.validSchemaType=Si.funcKeywordCode=Si.macroKeywordCode=void 0;const e=Rt(),t=Ja(),n=Oi(),r=o0();function o(g,b){const{gen:y,keyword:_,schema:x,parentSchema:w,it:v}=g,C=b.macro.call(v.self,x,w,v),S=d(y,_,C);v.opts.validateSchema!==!1&&v.self.validateSchema(C,!0);const T=y.name("valid");g.subschema({schema:C,schemaPath:e.nil,errSchemaPath:`${v.errSchemaPath}/${_}`,topSchemaRef:S,compositeRule:!0},T),g.pass(T,()=>g.error(!0))}Si.macroKeywordCode=o;function s(g,b){var y;const{gen:_,keyword:x,schema:w,parentSchema:v,$data:C,it:S}=g;u(S,b);const T=!C&&b.compile?b.compile.call(S.self,w,v,S):b.validate,E=d(_,x,T),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)z(),b.modifying&&l(g),U(()=>g.error());else{const G=b.async?P():I();b.modifying&&l(g),U(()=>c(g,G))}}function P(){const G=_.let("ruleErrs",null);return _.try(()=>z((0,e._)`await `),J=>_.assign(O,!1).if((0,e._)`${J} instanceof ${S.ValidationError}`,()=>_.assign(G,(0,e._)`${J}.errors`),()=>_.throw(J))),G}function I(){const G=(0,e._)`${E}.errors`;return _.assign(G,null),z(e.nil),G}function z(G=b.async?(0,e._)`await `:e.nil){const J=S.opts.passContext?t.default.this:t.default.self,ee=!("compile"in b&&!C||b.schema===!1);_.assign(O,(0,e._)`${G}${(0,n.callValidateCode)(g,E,J,ee)}`,b.modifying)}function U(G){var J;_.if((0,e.not)((J=b.valid)!==null&&J!==void 0?J:O),G)}}Si.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")}Si.validSchemaType=h;function p({schema:g,opts:b,self:y,errSchemaPath:_},x,w){if(Array.isArray(x.keyword)?!x.keyword.includes(w):x.keyword!==w)throw new Error("ajv implementation error");const v=x.dependencies;if(v?.some(C=>!Object.prototype.hasOwnProperty.call(g,C)))throw new Error(`parent schema must have dependencies of ${w}: ${v.join(",")}`);if(x.validateSchema&&!x.validateSchema(g[w])){const S=`keyword "${w}" value is invalid at path "${_}": `+y.errorsText(x.validateSchema.errors);if(b.validateSchema==="log")y.logger.error(S);else throw new Error(S)}}return Si.validateKeywordUsage=p,Si}var Ts={},$A;function cJ(){if($A)return Ts;$A=1,Object.defineProperty(Ts,"__esModule",{value:!0}),Ts.extendSubschemaMode=Ts.extendSubschemaData=Ts.getSubschema=void 0;const e=Rt(),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')}Ts.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:x}=l,w=g.let("data",(0,e._)`${l.data}${(0,e.getProperty)(c)}`,!0);b(w),s.errorPath=(0,e.str)`${y}${(0,t.getErrorPath)(c,u,x.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]}}Ts.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 Ts.extendSubschemaMode=o,Ts}var no={},r1,IA;function dN(){return IA||(IA=1,r1=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}),r1}var o1={exports:{}},zA;function uJ(){if(zA)return o1.exports;zA=1;var e=o1.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 x in y)t(r,o,s,y[x],c+"/"+b+"/"+n(x),u,c,b,l,x)}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 o1.exports}var LA;function i0(){if(LA)return no;LA=1,Object.defineProperty(no,"__esModule",{value:!0}),no.getSchemaRefs=no.resolveUrl=no.normalizeId=no._getFullPath=no.getFullPath=no.inlineRef=void 0;const e=rn(),t=dN(),n=uJ(),r=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function o(_,x=!0){return typeof _=="boolean"?!0:x===!0?!l(_):x?c(_)<=x:!1}no.inlineRef=o;const s=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function l(_){for(const x in _){if(s.has(x))return!0;const w=_[x];if(Array.isArray(w)&&w.some(l)||typeof w=="object"&&l(w))return!0}return!1}function c(_){let x=0;for(const w in _){if(w==="$ref")return 1/0;if(x++,!r.has(w)&&(typeof _[w]=="object"&&(0,e.eachItem)(_[w],v=>x+=c(v)),x===1/0))return 1/0}return x}function u(_,x="",w){w!==!1&&(x=p(x));const v=_.parse(x);return d(_,v)}no.getFullPath=u;function d(_,x){return _.serialize(x).split("#")[0]+"#"}no._getFullPath=d;const h=/#\/?$/;function p(_){return _?_.replace(h,""):""}no.normalizeId=p;function g(_,x,w){return w=p(w),_.resolve(x,w)}no.resolveUrl=g;const b=/^[a-z_][-a-z0-9._]*$/i;function y(_,x){if(typeof _=="boolean")return{};const{schemaId:w,uriResolver:v}=this.opts,C=p(_[w]||x),S={"":C},T=u(v,C,!1),E={},O=new Set;return n(_,{allKeys:!0},(I,z,U,G)=>{if(G===void 0)return;const J=T+z;let ee=S[G];typeof I[w]=="string"&&(ee=Z.call(this,I[w])),H.call(this,I.$anchor),H.call(this,I.$dynamicAnchor),S[z]=ee;function Z(Y){const oe=this.opts.uriResolver.resolve;if(Y=p(ee?oe(ee,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(I,ne.schema,Y):Y!==p(J)&&(Y[0]==="#"?(M(I,E[Y],Y),E[Y]=I):this.refs[Y]=J),Y}function H(Y){if(typeof Y=="string"){if(!b.test(Y))throw new Error(`invalid anchor "${Y}"`);Z.call(this,`#${Y}`)}}}),E;function M(I,z,U){if(z!==void 0&&!t(I,z))throw P(U)}function P(I){return new Error(`reference "${I}" resolves to more than one schema`)}}return no.getSchemaRefs=y,no}var FA;function s0(){if(FA)return Es;FA=1,Object.defineProperty(Es,"__esModule",{value:!0}),Es.getData=Es.KeywordCxt=Es.validateFunctionCode=void 0;const e=sJ(),t=cy(),n=fN(),r=cy(),o=aJ(),s=lJ(),l=cJ(),c=Rt(),u=Ja(),d=i0(),h=rn(),p=o0();function g(Q){if(T(Q)&&(O(Q),S(Q))){x(Q);return}b(Q,()=>(0,e.topBoolOrEmptySchema)(Q))}Es.validateFunctionCode=g;function b({gen:Q,validateName:ie,schema:de,schemaEnv:_e,opts:Te},xe){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(xe)}):Q.func(ie,(0,c._)`${u.default.data}, ${y(Te)}`,_e.$async,()=>Q.code(v(de,Te)).code(xe))}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 x(Q){const{schema:ie,opts:de,gen:_e}=Q;b(Q,()=>{de.$comment&&ie.$comment&&G(Q),I(Q),_e.let(u.default.vErrors,null),_e.let(u.default.errors,0),de.unevaluated&&w(Q),M(Q),J(Q)})}function w(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 C(Q,ie){if(T(Q)&&(O(Q),S(Q))){E(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 T(Q){return typeof Q.schema!="boolean"}function E(Q,ie){const{schema:de,gen:_e,opts:Te}=Q;Te.$comment&&de.$comment&&G(Q),z(Q),U(Q);const xe=_e.const("_errs",u.default.errors);M(Q,xe),_e.var(ie,(0,c._)`${xe} === ${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 I(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 z(Q){const ie=Q.schema[Q.opts.schemaId];ie&&(Q.baseId=(0,d.resolveUrl)(Q.opts.uriResolver,Q.baseId,ie))}function U(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 xe=de.$comment;if(Te.$comment===!0)Q.code((0,c._)`${u.default.self}.logger.log(${xe})`);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(${xe}, ${$e}, ${Ze}.schema)`)}}function J(Q){const{gen:ie,schemaEnv:de,validateName:_e,ValidationError:Te,opts:xe}=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),xe.unevaluated&&ee(Q),ie.return((0,c._)`${u.default.errors} === 0`))}function ee({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:xe,data:$e,allErrors:Ze,opts:ye,self:Fe}=Q,{RULES:Re}=Fe;if(xe.$ref&&(ye.ignoreKeywordsWithRef||!(0,h.schemaHasRulesButRef)(xe,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)(xe,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 xe of ie.rules)(0,n.shouldUseRule)(_e,xe)&&re(Q,xe.keyword,xe.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=>{V(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:xe}=Te.definition;xe.length&&!xe.some($e=>q(ie,$e))&&B(Q,`missing type "${xe.join(",")}" for keyword "${_e}"`)}}}function q(Q,ie){return Q.includes(ie)||ie==="number"&&Q.includes("integer")}function V(Q,ie){return Q.includes(ie)||ie==="integer"&&Q.includes("number")}function D(Q,ie){const de=[];for(const _e of Q.dataTypes)V(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",ke(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:xe,def:$e}=this;_e.if((0,c.or)((0,c._)`${Te} === undefined`,de)),ie!==c.nil&&_e.assign(ie,!0),(xe.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:xe}=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,xe.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 C(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}}Es.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 ae=/^\/(?:[^~]|~0|~1)*$/,ge=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ke(Q,{dataLevel:ie,dataNames:de,dataPathArr:_e}){let Te,xe;if(Q==="")return u.default.rootData;if(Q[0]==="/"){if(!ae.test(Q))throw new Error(`Invalid JSON-pointer: ${Q}`);Te=Q,xe=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(xe=de[ie-Re],!Te)return xe}let $e=xe;const Ze=Te.split("/");for(const Fe of Ze)Fe&&(xe=(0,c._)`${xe}${(0,c.getProperty)((0,h.unescapeJsonPointer)(Fe))}`,$e=(0,c._)`${$e} && ${xe}`);return $e;function ye(Fe,Re){return`Cannot access ${Fe} ${Re} levels up, current level is ${ie}`}}return Es.getData=ke,Es}var xm={},UA;function R_(){if(UA)return xm;UA=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={},VA;function a0(){if(VA)return _m;VA=1,Object.defineProperty(_m,"__esModule",{value:!0});const e=i0();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 Ao={},qA;function O_(){if(qA)return Ao;qA=1,Object.defineProperty(Ao,"__esModule",{value:!0}),Ao.resolveSchema=Ao.getCompilingSchema=Ao.resolveRef=Ao.compileSchema=Ao.SchemaEnv=void 0;const e=Rt(),t=R_(),n=Ja(),r=i0(),o=rn(),s=s0();class l{constructor(w){var v;this.refs={},this.dynamicAnchors={};let C;typeof w.schema=="object"&&(C=w.schema),this.schema=w.schema,this.schemaId=w.schemaId,this.root=w.root||this,this.baseId=(v=w.baseId)!==null&&v!==void 0?v:(0,r.normalizeId)(C?.[w.schemaId||"$id"]),this.schemaPath=w.schemaPath,this.localRefs=w.localRefs,this.meta=w.meta,this.$async=C?.$async,this.refs={}}}Ao.SchemaEnv=l;function c(x){const w=h.call(this,x);if(w)return w;const v=(0,r.getFullPath)(this.opts.uriResolver,x.root.baseId),{es5:C,lines:S}=this.opts.code,{ownProperties:T}=this.opts,E=new e.CodeGen(this.scope,{es5:C,lines:S,ownProperties:T});let O;x.$async&&(O=E.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const M=E.scopeName("validate");x.validateName=M;const P={gen:E,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:E.scopeValue("schema",this.opts.code.source===!0?{ref:x.schema,code:(0,e.stringify)(x.schema)}:{ref:x.schema}),validateName:M,ValidationError:O,schema:x.schema,schemaEnv:x,rootId:v,baseId:x.baseId||v,schemaPath:e.nil,errSchemaPath:x.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let I;try{this._compilations.add(x),(0,s.validateFunctionCode)(P),E.optimize(this.opts.code.optimize);const z=E.toString();I=`${E.scopeRefs(n.default.scope)}return ${z}`,this.opts.code.process&&(I=this.opts.code.process(I,x));const G=new Function(`${n.default.self}`,`${n.default.scope}`,I)(this,this.scope.get());if(this.scope.value(M,{ref:G}),G.errors=null,G.schema=x.schema,G.schemaEnv=x,x.$async&&(G.$async=!0),this.opts.code.source===!0&&(G.source={validateName:M,validateCode:z,scopeValues:E._values}),this.opts.unevaluated){const{props:J,items:ee}=P;G.evaluated={props:J instanceof e.Name?void 0:J,items:ee instanceof e.Name?void 0:ee,dynamicProps:J instanceof e.Name,dynamicItems:ee instanceof e.Name},G.source&&(G.source.evaluated=(0,e.stringify)(G.evaluated))}return x.validate=G,x}catch(z){throw delete x.validate,delete x.validateName,I&&this.logger.error("Error compiling schema, function code:",I),z}finally{this._compilations.delete(x)}}Ao.compileSchema=c;function u(x,w,v){var C;v=(0,r.resolveUrl)(this.opts.uriResolver,w,v);const S=x.refs[v];if(S)return S;let T=g.call(this,x,v);if(T===void 0){const E=(C=x.localRefs)===null||C===void 0?void 0:C[v],{schemaId:O}=this.opts;E&&(T=new l({schema:E,schemaId:O,root:x,baseId:w}))}if(T!==void 0)return x.refs[v]=d.call(this,T)}Ao.resolveRef=u;function d(x){return(0,r.inlineRef)(x.schema,this.opts.inlineRefs)?x.schema:x.validate?x:c.call(this,x)}function h(x){for(const w of this._compilations)if(p(w,x))return w}Ao.getCompilingSchema=h;function p(x,w){return x.schema===w.schema&&x.root===w.root&&x.baseId===w.baseId}function g(x,w){let v;for(;typeof(v=this.refs[w])=="string";)w=v;return v||this.schemas[w]||b.call(this,x,w)}function b(x,w){const v=this.opts.uriResolver.parse(w),C=(0,r._getFullPath)(this.opts.uriResolver,v);let S=(0,r.getFullPath)(this.opts.uriResolver,x.baseId,void 0);if(Object.keys(x.schema).length>0&&C===S)return _.call(this,v,x);const T=(0,r.normalizeId)(C),E=this.refs[T]||this.schemas[T];if(typeof E=="string"){const O=b.call(this,x,E);return typeof O?.schema!="object"?void 0:_.call(this,v,O)}if(typeof E?.schema=="object"){if(E.validate||c.call(this,E),T===(0,r.normalizeId)(w)){const{schema:O}=E,{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:x,baseId:S})}return _.call(this,v,E)}}Ao.resolveSchema=b;const y=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function _(x,{baseId:w,schema:v,root:C}){var S;if(((S=x.fragment)===null||S===void 0?void 0:S[0])!=="/")return;for(const O of x.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&&(w=(0,r.resolveUrl)(this.opts.uriResolver,w,P))}let T;if(typeof v!="boolean"&&v.$ref&&!(0,o.schemaHasRulesButRef)(v,this.RULES)){const O=(0,r.resolveUrl)(this.opts.uriResolver,w,v.$ref);T=b.call(this,C,O)}const{schemaId:E}=this.opts;if(T=T||new l({schema:v,schemaId:E,root:C,baseId:w}),T.schema!==T.root.schema)return T}return Ao}const fJ="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",dJ="Meta-schema for $data reference (JSON AnySchema extension proposal)",hJ="object",pJ=["$data"],mJ={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},gJ=!1,yJ={$id:fJ,description:dJ,type:hJ,required:pJ,properties:mJ,additionalProperties:gJ};var Em={},yd={exports:{}},i1,BA;function hN(){if(BA)return i1;BA=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:""},_=[],x=[];let w=!1,v=!1,C=s;for(let S=0;S<g.length;S++){const T=g[S];if(!(T==="["||T==="]"))if(T===":"){if(w===!0&&(v=!0),!C(x,_,y))break;if(++b>7){y.error=!0;break}S>0&&g[S-1]===":"&&(w=!0),_.push(":");continue}else if(T==="%"){if(!C(x,_,y))break;C=o}else{x.push(T);continue}}return x.length&&(C===o?y.zone=x.join(""):v?_.push(x.join("")):_.push(n(x))),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,x=0;for(;x=b.length;){if(x===1){if(b===".")break;if(b==="/"){y.push("/");break}else{y.push(b);break}}else if(x===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(x===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 i1={nonSimpleDomain:r,recomposeAuthority:p,normalizeComponentEncoding:h,removeDotSegments:d,isIPv4:t,isUUID:e,normalizeIPv6:c,stringArrayToHexStripped:n},i1}var s1,HA;function vJ(){if(HA)return s1;HA=1;const{isUUID:e}=hN(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,n=["http","https","ws","wss","urn","urn:uuid"];function r(T){return n.indexOf(T)!==-1}function o(T){return T.secure===!0?!0:T.secure===!1?!1:T.scheme?T.scheme.length===3&&(T.scheme[0]==="w"||T.scheme[0]==="W")&&(T.scheme[1]==="s"||T.scheme[1]==="S")&&(T.scheme[2]==="s"||T.scheme[2]==="S"):!1}function s(T){return T.host||(T.error=T.error||"HTTP URIs must have a host."),T}function l(T){const E=String(T.scheme).toLowerCase()==="https";return(T.port===(E?443:80)||T.port==="")&&(T.port=void 0),T.path||(T.path="/"),T}function c(T){return T.secure=o(T),T.resourceName=(T.path||"/")+(T.query?"?"+T.query:""),T.path=void 0,T.query=void 0,T}function u(T){if((T.port===(o(T)?443:80)||T.port==="")&&(T.port=void 0),typeof T.secure=="boolean"&&(T.scheme=T.secure?"wss":"ws",T.secure=void 0),T.resourceName){const[E,O]=T.resourceName.split("?");T.path=E&&E!=="/"?E:void 0,T.query=O,T.resourceName=void 0}return T.fragment=void 0,T}function d(T,E){if(!T.path)return T.error="URN can not be parsed",T;const O=T.path.match(t);if(O){const M=E.scheme||T.scheme||"urn";T.nid=O[1].toLowerCase(),T.nss=O[2];const P=`${M}:${E.nid||T.nid}`,I=S(P);T.path=void 0,I&&(T=I.parse(T,E))}else T.error=T.error||"URN can not be parsed.";return T}function h(T,E){if(T.nid===void 0)throw new Error("URN without nid cannot be serialized");const O=E.scheme||T.scheme||"urn",M=T.nid.toLowerCase(),P=`${O}:${E.nid||M}`,I=S(P);I&&(T=I.serialize(T,E));const z=T,U=T.nss;return z.path=`${M||E.nid}:${U}`,E.skipEscape=!0,z}function p(T,E){const O=T;return O.uuid=O.nss,O.nss=void 0,!E.tolerant&&(!O.uuid||!e(O.uuid))&&(O.error=O.error||"UUID is not valid."),O}function g(T){const E=T;return E.nss=(T.uuid||"").toLowerCase(),E}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},x={scheme:"wss",domainHost:_.domainHost,parse:_.parse,serialize:_.serialize},C={http:b,https:y,ws:_,wss:x,urn:{scheme:"urn",parse:d,serialize:h,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:p,serialize:g,skipNormalize:!0}};Object.setPrototypeOf(C,null);function S(T){return T&&(C[T]||C[T.toLowerCase()])||void 0}return s1={wsIsSecure:o,SCHEMES:C,isValidSchemeName:r,getSchemeHandler:S},s1}var KA;function pN(){if(KA)return yd.exports;KA=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:n,normalizeComponentEncoding:r,isIPv4:o,nonSimpleDomain:s}=hN(),{SCHEMES:l,getSchemeHandler:c}=vJ();function u(x,w){return typeof x=="string"?x=g(y(x,w),w):typeof x=="object"&&(x=y(g(x,w),w)),x}function d(x,w,v){const C=v?Object.assign({scheme:"null"},v):{scheme:"null"},S=h(y(x,C),y(w,C),C,!0);return C.skipEscape=!0,g(S,C)}function h(x,w,v,C){const S={};return C||(x=y(g(x,v),v),w=y(g(w,v),v)),v=v||{},!v.tolerant&&w.scheme?(S.scheme=w.scheme,S.userinfo=w.userinfo,S.host=w.host,S.port=w.port,S.path=t(w.path||""),S.query=w.query):(w.userinfo!==void 0||w.host!==void 0||w.port!==void 0?(S.userinfo=w.userinfo,S.host=w.host,S.port=w.port,S.path=t(w.path||""),S.query=w.query):(w.path?(w.path[0]==="/"?S.path=t(w.path):((x.userinfo!==void 0||x.host!==void 0||x.port!==void 0)&&!x.path?S.path="/"+w.path:x.path?S.path=x.path.slice(0,x.path.lastIndexOf("/")+1)+w.path:S.path=w.path,S.path=t(S.path)),S.query=w.query):(S.path=x.path,w.query!==void 0?S.query=w.query:S.query=x.query),S.userinfo=x.userinfo,S.host=x.host,S.port=x.port),S.scheme=x.scheme),S.fragment=w.fragment,S}function p(x,w,v){return typeof x=="string"?(x=unescape(x),x=g(r(y(x,v),!0),{...v,skipEscape:!0})):typeof x=="object"&&(x=g(r(x,!0),{...v,skipEscape:!0})),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})),x.toLowerCase()===w.toLowerCase()}function g(x,w){const v={host:x.host,scheme:x.scheme,userinfo:x.userinfo,port:x.port,path:x.path,query:x.query,nid:x.nid,nss:x.nss,uuid:x.uuid,fragment:x.fragment,reference:x.reference,resourceName:x.resourceName,secure:x.secure,error:""},C=Object.assign({},w),S=[],T=c(C.scheme||v.scheme);T&&T.serialize&&T.serialize(v,C),v.path!==void 0&&(C.skipEscape?v.path=unescape(v.path):(v.path=escape(v.path),v.scheme!==void 0&&(v.path=v.path.split("%3A").join(":")))),C.reference!=="suffix"&&v.scheme&&S.push(v.scheme,":");const E=n(v);if(E!==void 0&&(C.reference!=="suffix"&&S.push("//"),S.push(E),v.path&&v.path[0]!=="/"&&S.push("/")),v.path!==void 0){let O=v.path;!C.absolutePath&&(!T||!T.absolutePath)&&(O=t(O)),E===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(x,w){const v=Object.assign({},w),C={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?x=v.scheme+":"+x:x="//"+x);const T=x.match(b);if(T){if(C.scheme=T[1],C.userinfo=T[3],C.host=T[4],C.port=parseInt(T[5],10),C.path=T[6]||"",C.query=T[7],C.fragment=T[8],isNaN(C.port)&&(C.port=T[5]),C.host)if(o(C.host)===!1){const M=e(C.host);C.host=M.host.toLowerCase(),S=M.isIPV6}else S=!0;C.scheme===void 0&&C.userinfo===void 0&&C.host===void 0&&C.port===void 0&&C.query===void 0&&!C.path?C.reference="same-document":C.scheme===void 0?C.reference="relative":C.fragment===void 0?C.reference="absolute":C.reference="uri",v.reference&&v.reference!=="suffix"&&v.reference!==C.reference&&(C.error=C.error||"URI is not a "+v.reference+" reference.");const E=c(v.scheme||C.scheme);if(!v.unicodeSupport&&(!E||!E.unicodeSupport)&&C.host&&(v.domainHost||E&&E.domainHost)&&S===!1&&s(C.host))try{C.host=URL.domainToASCII(C.host.toLowerCase())}catch(O){C.error=C.error||"Host's domain name can not be converted to ASCII: "+O}(!E||E&&!E.skipNormalize)&&(x.indexOf("%")!==-1&&(C.scheme!==void 0&&(C.scheme=unescape(C.scheme)),C.host!==void 0&&(C.host=unescape(C.host))),C.path&&(C.path=escape(unescape(C.path))),C.fragment&&(C.fragment=encodeURI(decodeURIComponent(C.fragment)))),E&&E.parse&&E.parse(C,v)}else C.error=C.error||"URI can not be parsed.";return C}const _={SCHEMES:l,normalize:u,resolve:d,resolveComponent:h,equal:p,serialize:g,parse:y};return yd.exports=_,yd.exports.default=_,yd.exports.fastUri=_,yd.exports}var GA;function bJ(){if(GA)return Em;GA=1,Object.defineProperty(Em,"__esModule",{value:!0});const e=pN();return e.code='require("ajv/dist/runtime/uri").default',Em.default=e,Em}var ZA;function SJ(){return ZA||(ZA=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=s0();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var n=Rt();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=R_(),o=a0(),s=uN(),l=O_(),c=Rt(),u=i0(),d=cy(),h=rn(),p=yJ,g=bJ(),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"]),x={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},w={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},v=200;function C(ne){var $,q,V,D,B,te,re,ae,ge,ke,Q,ie,de,_e,Te,xe,$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=(V=(q=ne.code)===null||q===void 0?void 0:q.regExp)!==null&&V!==void 0?V:b,He=(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:(ae=(re=ne.strictNumbers)!==null&&re!==void 0?re:dt)!==null&&ae!==void 0?ae:!0,strictTypes:(ke=(ge=ne.strictTypes)!==null&&ge!==void 0?ge:dt)!==null&&ke!==void 0?ke:"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:(xe=ne.loopEnum)!==null&&xe!==void 0?xe: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:He}}class S{constructor($={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,$=this.opts={...$,...C($)};const{es5:q,lines:V}=this.opts.code;this.scope=new c.ValueScope({scope:{},prefixes:_,es5:q,lines:V}),this.logger=U($.logger);const D=$.validateFormats;$.validateFormats=!1,this.RULES=(0,s.getRules)(),T.call(this,x,$,"NOT SUPPORTED"),T.call(this,w,$,"DEPRECATED","warn"),this._metaOpts=I.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:q,schemaId:V}=this.opts;let D=p;V==="id"&&(D={...p},D.id=D.$id,delete D.$id),q&&$&&this.addMetaSchema(D,D[V],!1)}defaultMeta(){const{meta:$,schemaId:q}=this.opts;return this.opts.defaultMeta=typeof $=="object"?$[q]||$:void 0}validate($,q){let V;if(typeof $=="string"){if(V=this.getSchema($),!V)throw new Error(`no schema with key or ref "${$}"`)}else V=this.compile($);const D=V(q);return"$async"in V||(this.errors=V.errors),D}compile($,q){const V=this._addSchema($,q);return V.validate||this._compileSchemaEnv(V)}compileAsync($,q){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:V}=this.opts;return D.call(this,$,q);async function D(ke,Q){await B.call(this,ke.$schema);const ie=this._addSchema(ke,Q);return ie.validate||te.call(this,ie)}async function B(ke){ke&&!this.getSchema(ke)&&await D.call(this,{$ref:ke},!0)}async function te(ke){try{return this._compileSchemaEnv(ke)}catch(Q){if(!(Q instanceof o.default))throw Q;return re.call(this,Q),await ae.call(this,Q.missingSchema),te.call(this,ke)}}function re({missingSchema:ke,missingRef:Q}){if(this.refs[ke])throw new Error(`AnySchema ${ke} is loaded but ${Q} cannot be resolved`)}async function ae(ke){const Q=await ge.call(this,ke);this.refs[ke]||await B.call(this,Q.$schema),this.refs[ke]||this.addSchema(Q,ke,q)}async function ge(ke){const Q=this._loading[ke];if(Q)return Q;try{return await(this._loading[ke]=V(ke))}finally{delete this._loading[ke]}}}addSchema($,q,V,D=this.opts.validateSchema){if(Array.isArray($)){for(const te of $)this.addSchema(te,void 0,V,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 q=(0,u.normalizeId)(q||B),this._checkUnique(q),this.schemas[q]=this._addSchema($,V,q,D,!0),this}addMetaSchema($,q,V=this.opts.validateSchema){return this.addSchema($,q,!0,V),this}validateSchema($,q){if(typeof $=="boolean")return!0;let V;if(V=$.$schema,V!==void 0&&typeof V!="string")throw new Error("$schema must be a string");if(V=V||this.opts.defaultMeta||this.defaultMeta(),!V)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const D=this.validate(V,$);if(!D&&q){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 q;for(;typeof(q=E.call(this,$))=="string";)$=q;if(q===void 0){const{schemaId:V}=this.opts,D=new l.SchemaEnv({schema:{},schemaId:V});if(q=l.resolveSchema.call(this,D,$),!q)return;this.refs[$]=q}return q.validate||this._compileSchemaEnv(q)}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 q=E.call(this,$);return typeof q=="object"&&this._cache.delete(q.schema),delete this.schemas[$],delete this.refs[$],this}case"object":{const q=$;this._cache.delete(q);let V=$[this.opts.schemaId];return V&&(V=(0,u.normalizeId)(V),delete this.schemas[V],delete this.refs[V]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary($){for(const q of $)this.addKeyword(q);return this}addKeyword($,q){let V;if(typeof $=="string")V=$,typeof q=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),q.keyword=V);else if(typeof $=="object"&&q===void 0){if(q=$,V=q.keyword,Array.isArray(V)&&!V.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(J.call(this,V,q),!q)return(0,h.eachItem)(V,B=>ee.call(this,B)),this;H.call(this,q);const D={...q,type:(0,d.getJSONTypes)(q.type),schemaType:(0,d.getJSONTypes)(q.schemaType)};return(0,h.eachItem)(V,D.type.length===0?B=>ee.call(this,B,D):B=>D.type.forEach(te=>ee.call(this,B,D,te))),this}getKeyword($){const q=this.RULES.all[$];return typeof q=="object"?q.definition:!!q}removeKeyword($){const{RULES:q}=this;delete q.keywords[$],delete q.all[$];for(const V of q.rules){const D=V.rules.findIndex(B=>B.keyword===$);D>=0&&V.rules.splice(D,1)}return this}addFormat($,q){return typeof q=="string"&&(q=new RegExp(q)),this.formats[$]=q,this}errorsText($=this.errors,{separator:q=", ",dataVar:V="data"}={}){return!$||$.length===0?"No errors":$.map(D=>`${V}${D.instancePath} ${D.message}`).reduce((D,B)=>D+q+B)}$dataMetaSchema($,q){const V=this.RULES.all;$=JSON.parse(JSON.stringify($));for(const D of q){const B=D.split("/").slice(1);let te=$;for(const re of B)te=te[re];for(const re in V){const ae=V[re];if(typeof ae!="object")continue;const{$data:ge}=ae.definition,ke=te[re];ge&&ke&&(te[re]=oe(ke))}}return $}_removeAllSchemas($,q){for(const V in $){const D=$[V];(!q||q.test(V))&&(typeof D=="string"?delete $[V]:D&&!D.meta&&(this._cache.delete(D.schema),delete $[V]))}}_addSchema($,q,V,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 ae=this._cache.get($);if(ae!==void 0)return ae;V=(0,u.normalizeId)(te||V);const ge=u.getSchemaRefs.call(this,$,V);return ae=new l.SchemaEnv({schema:$,schemaId:re,meta:q,baseId:V,localRefs:ge}),this._cache.set(ae.schema,ae),B&&!V.startsWith("#")&&(V&&this._checkUnique(V),this.refs[V]=ae),D&&this.validateSchema($,!0),ae}_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 q=this.opts;this.opts=this._metaOpts;try{l.compileSchema.call(this,$)}finally{this.opts=q}}}S.ValidationError=r.default,S.MissingRefError=o.default,e.default=S;function T(ne,$,q,V="error"){for(const D in ne){const B=D;B in $&&this.logger[V](`${q}: option ${D}. ${ne[B]}`)}}function E(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 q=ne[$];q.keyword||(q.keyword=$),this.addKeyword(q)}}function I(){const ne={...this.opts};for(const $ of y)delete ne[$];return ne}const z={log(){},warn(){},error(){}};function U(ne){if(ne===!1)return z;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 J(ne,$){const{RULES:q}=this;if((0,h.eachItem)(ne,V=>{if(q.keywords[V])throw new Error(`Keyword ${V} is already defined`);if(!G.test(V))throw new Error(`Keyword ${V} has invalid name`)}),!!$&&$.$data&&!("code"in $||"validate"in $))throw new Error('$data keyword must have "code" or "validate" function')}function ee(ne,$,q){var V;const D=$?.post;if(q&&D)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:B}=this;let te=D?B.post:B.rules.find(({type:ae})=>ae===q);if(te||(te={type:q,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,(V=$.implements)===null||V===void 0||V.forEach(ae=>this.addKeyword(ae))}function Z(ne,$,q){const V=ne.rules.findIndex(D=>D.keyword===q);V>=0?ne.rules.splice(V,0,$):(ne.rules.push($),this.logger.warn(`rule ${q} 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]}}})(Qb)),Qb}var Cm={},Tm={},Rm={},WA;function wJ(){if(WA)return Rm;WA=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 va={},YA;function xJ(){if(YA)return va;YA=1,Object.defineProperty(va,"__esModule",{value:!0}),va.callRef=va.getValidate=void 0;const e=a0(),t=Oi(),n=Rt(),r=Ja(),o=O_(),s=rn(),l={keyword:"$ref",schemaType:"string",code(d){const{gen:h,schema:p,it:g}=d,{baseId:b,schemaEnv:y,validateName:_,opts:x,self:w}=g,{root:v}=y;if((p==="#"||p==="#/")&&b===v.baseId)return S();const C=o.resolveRef.call(w,v,b,p);if(C===void 0)throw new e.default(g.opts.uriResolver,b,p);if(C instanceof o.SchemaEnv)return T(C);return E(C);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 T(O){const M=c(d,O);u(d,M,O,O.$async)}function E(O){const M=h.scopeValue("schema",x.code.source===!0?{ref:O,code:(0,n.stringify)(O)}:{ref:O}),P=h.name("valid"),I=d.subschema({schema:O,dataTypes:[],schemaPath:n.nil,topSchemaRef:M,errSchemaPath:p},P);d.mergeEvaluated(I),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`}va.getValidate=c;function u(d,h,p,g){const{gen:b,it:y}=d,{allErrors:_,schemaEnv:x,opts:w}=y,v=w.passContext?r.default.this:n.nil;g?C():S();function C(){if(!x.$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)}`),E(h),_||b.assign(O,!0)},M=>{b.if((0,n._)`!(${M} instanceof ${y.ValidationError})`,()=>b.throw(M)),T(M),_||b.assign(O,!1)}),d.ok(O)}function S(){d.result((0,t.callValidateCode)(d,h,v),()=>E(h),()=>T(h))}function T(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 E(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 I=b.var("props",(0,n._)`${O}.evaluated.props`);y.props=s.mergeEvaluated.props(b,I,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 I=b.var("items",(0,n._)`${O}.evaluated.items`);y.items=s.mergeEvaluated.items(b,I,y.items,n.Name)}}}return va.callRef=u,va.default=l,va}var XA;function _J(){if(XA)return Tm;XA=1,Object.defineProperty(Tm,"__esModule",{value:!0});const e=wJ(),t=xJ(),n=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return Tm.default=n,Tm}var Om={},Am={},QA;function EJ(){if(QA)return Am;QA=1,Object.defineProperty(Am,"__esModule",{value:!0});const e=Rt(),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={},JA;function CJ(){if(JA)return km;JA=1,Object.defineProperty(km,"__esModule",{value:!0});const e=Rt(),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={},ek;function TJ(){if(ek)return jm;ek=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 tk;function RJ(){if(tk)return Mm;tk=1,Object.defineProperty(Mm,"__esModule",{value:!0});const e=Rt(),t=rn(),n=TJ(),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={},nk;function OJ(){if(nk)return Pm;nk=1,Object.defineProperty(Pm,"__esModule",{value:!0});const e=Oi(),t=Rt(),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={},rk;function AJ(){if(rk)return Nm;rk=1,Object.defineProperty(Nm,"__esModule",{value:!0});const e=Rt(),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={},ok;function kJ(){if(ok)return Dm;ok=1,Object.defineProperty(Dm,"__esModule",{value:!0});const e=Oi(),t=Rt(),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:C}=s.it;for(const S of c)if(v?.[S]===void 0&&!C.has(S)){const T=p.schemaEnv.baseId+p.errSchemaPath,E=`required property "${S}" is not defined at "${T}" (strictRequired)`;(0,n.checkStrictMode)(p,E,p.opts.strictRequired)}}function y(){if(b||h)s.block$data(t.nil,x);else for(const v of c)(0,e.checkReportMissingProp)(s,v)}function _(){const v=l.let("missing");if(b||h){const C=l.let("valid",!0);s.block$data(C,()=>w(v,C)),s.ok(C)}else l.if((0,e.checkMissingProp)(s,c,v)),(0,e.reportMissingProp)(s,v),l.else()}function x(){l.forOf("prop",u,v=>{s.setParams({missingProperty:v}),l.if((0,e.noPropertyInData)(l,d,v,g.ownProperties),()=>s.error())})}function w(v,C){s.setParams({missingProperty:v}),l.forOf(v,u,()=>{l.assign(C,(0,e.propertyInData)(l,d,v,g.ownProperties)),l.if((0,t.not)(C),()=>{s.error(),l.break()})},t.nil)}}};return Dm.default=o,Dm}var $m={},ik;function MJ(){if(ik)return $m;ik=1,Object.defineProperty($m,"__esModule",{value:!0});const e=Rt(),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={},sk;function A_(){if(sk)return zm;sk=1,Object.defineProperty(zm,"__esModule",{value:!0});const e=dN();return e.code='require("ajv/dist/runtime/equal").default',zm.default=e,zm}var ak;function jJ(){if(ak)return Im;ak=1,Object.defineProperty(Im,"__esModule",{value:!0});const e=cy(),t=Rt(),n=rn(),r=A_(),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,x,(0,t._)`${g} === false`),l.ok(y);function x(){const S=c.let("i",(0,t._)`${u}.length`),T=c.let("j");l.setParams({i:S,j:T}),c.assign(y,!0),c.if((0,t._)`${S} > 1`,()=>(w()?v:C)(S,T))}function w(){return _.length>0&&!_.some(S=>S==="object"||S==="array")}function v(S,T){const E=c.name("item"),O=(0,e.checkDataTypes)(_,E,b.opts.strictNumbers,e.DataType.Wrong),M=c.const("indices",(0,t._)`{}`);c.for((0,t._)`;${S}--;`,()=>{c.let(E,(0,t._)`${u}[${S}]`),c.if(O,(0,t._)`continue`),_.length>1&&c.if((0,t._)`typeof ${E} == "string"`,(0,t._)`${E} += "_"`),c.if((0,t._)`typeof ${M}[${E}] == "number"`,()=>{c.assign(T,(0,t._)`${M}[${E}]`),l.error(),c.assign(y,!1).break()}).code((0,t._)`${M}[${E}] = ${S}`)})}function C(S,T){const E=(0,n.useFunc)(c,r.default),O=c.name("outer");c.label(O).for((0,t._)`;${S}--;`,()=>c.for((0,t._)`${T} = ${S}; ${T}--;`,()=>c.if((0,t._)`${E}(${u}[${S}], ${u}[${T}])`,()=>{l.error(),c.assign(y,!1).break(O)})))}}};return Im.default=s,Im}var Lm={},lk;function PJ(){if(lk)return Lm;lk=1,Object.defineProperty(Lm,"__esModule",{value:!0});const e=Rt(),t=rn(),n=A_(),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={},ck;function NJ(){if(ck)return Fm;ck=1,Object.defineProperty(Fm,"__esModule",{value:!0});const e=Rt(),t=rn(),n=A_(),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(_,x);else{if(!Array.isArray(d))throw new Error("ajv implementation error");const v=l.const("vSchema",h);_=(0,e.or)(...d.map((C,S)=>w(v,S)))}s.pass(_);function x(){l.assign(_,!1),l.forOf("v",h,v=>l.if((0,e._)`${y()}(${c}, ${v})`,()=>l.assign(_,!0).break()))}function w(v,C){const S=d[C];return typeof S=="object"&&S!==null?(0,e._)`${y()}(${c}, ${v}[${C}])`:(0,e._)`${c} === ${S}`}}};return Fm.default=o,Fm}var uk;function DJ(){if(uk)return Om;uk=1,Object.defineProperty(Om,"__esModule",{value:!0});const e=EJ(),t=CJ(),n=RJ(),r=OJ(),o=AJ(),s=kJ(),l=MJ(),c=jJ(),u=PJ(),d=NJ(),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={},fk;function mN(){if(fk)return Qc;fk=1,Object.defineProperty(Qc,"__esModule",{value:!0}),Qc.validateAdditionalItems=void 0;const e=Rt(),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={},dk;function gN(){if(dk)return Jc;dk=1,Object.defineProperty(Jc,"__esModule",{value:!0}),Jc.validateTuple=void 0;const e=Rt(),t=rn(),n=Oi(),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((x,w)=>{(0,t.alwaysValidSchema)(g,x)||(u.if((0,e._)`${y} > ${w}`,()=>s.subschema({keyword:p,schemaProp:w,dataProp:w},b)),s.ok(b))});function _(x){const{opts:w,errSchemaPath:v}=g,C=c.length,S=C===x.minItems&&(C===x.maxItems||x[l]===!1);if(w.strictTuples&&!S){const T=`"${p}" is ${C}-tuple, but minItems or maxItems/${l} are not specified or different at path "${v}"`;(0,t.checkStrictMode)(g,T,w.strictTuples)}}}return Jc.validateTuple=o,Jc.default=r,Jc}var hk;function $J(){if(hk)return Vm;hk=1,Object.defineProperty(Vm,"__esModule",{value:!0});const e=gN(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:n=>(0,e.validateTuple)(n,"items")};return Vm.default=t,Vm}var qm={},pk;function IJ(){if(pk)return qm;pk=1,Object.defineProperty(qm,"__esModule",{value:!0});const e=Rt(),t=rn(),n=Oi(),r=mN(),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={},mk;function zJ(){if(mk)return Bm;mk=1,Object.defineProperty(Bm,"__esModule",{value:!0});const e=Rt(),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 C=(0,e._)`${y} >= ${h}`;p!==void 0&&(C=(0,e._)`${C} && ${y} <= ${p}`),o.pass(C);return}d.items=!0;const _=s.name("valid");p===void 0&&h===1?w(_,()=>s.if(_,()=>s.break())):h===0?(s.let(_,!0),p!==void 0&&s.if((0,e._)`${u}.length > 0`,x)):(s.let(_,!1),x()),o.result(_,()=>o.reset());function x(){const C=s.name("_valid"),S=s.let("count",0);w(C,()=>s.if(C,()=>v(S)))}function w(C,S){s.forRange("i",0,y,T=>{o.subschema({keyword:"contains",dataProp:T,dataPropType:t.Type.Num,compositeRule:!0},C),S()})}function v(C){s.code((0,e._)`${C}++`),p===void 0?s.if((0,e._)`${C} >= ${h}`,()=>s.assign(_,!0).break()):(s.if((0,e._)`${C} > ${p}`,()=>s.assign(_,!1).break()),h===1?s.assign(_,!0):s.if((0,e._)`${C} >= ${h}`,()=>s.assign(_,!0)))}}};return Bm.default=r,Bm}var a1={},gk;function LJ(){return gk||(gk=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=Rt(),n=rn(),r=Oi();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 x=(0,r.propertyInData)(h,p,y,g.opts.ownProperties);u.setParams({property:y,depsCount:_.length,deps:_.join(", ")}),g.allErrors?h.if(x,()=>{for(const w of _)(0,r.checkReportMissingProp)(u,w)}):(h.if((0,t._)`${x} && (${(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 x=u.subschema({keyword:g,schemaProp:_},y);u.mergeValidEvaluated(x,y)},()=>h.var(y,!0)),u.ok(y))}e.validateSchemaDeps=c,e.default=o})(a1)),a1}var Hm={},yk;function FJ(){if(yk)return Hm;yk=1,Object.defineProperty(Hm,"__esModule",{value:!0});const e=Rt(),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={},vk;function yN(){if(vk)return Km;vk=1,Object.defineProperty(Km,"__esModule",{value:!0});const e=Oi(),t=Rt(),n=Ja(),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),x=(0,e.allSchemaProperties)(d.patternProperties);w(),l.ok((0,t._)`${p} === ${n.default.errors}`);function w(){c.forIn("key",h,E=>{!_.length&&!x.length?S(E):c.if(v(E),()=>S(E))})}function v(E){let O;if(_.length>8){const M=(0,r.schemaRefOrVal)(g,d.properties,"properties");O=(0,e.isOwnProperty)(c,M,E)}else _.length?O=(0,t.or)(..._.map(M=>(0,t._)`${E} === ${M}`)):O=t.nil;return x.length&&(O=(0,t.or)(O,...x.map(M=>(0,t._)`${(0,e.usePattern)(l,M)}.test(${E})`))),(0,t.not)(O)}function C(E){c.code((0,t._)`delete ${h}[${E}]`)}function S(E){if(y.removeAdditional==="all"||y.removeAdditional&&u===!1){C(E);return}if(u===!1){l.setParams({additionalProperty:E}),l.error(),b||c.break();return}if(typeof u=="object"&&!(0,r.alwaysValidSchema)(g,u)){const O=c.name("valid");y.removeAdditional==="failing"?(T(E,O,!1),c.if((0,t.not)(O),()=>{l.reset(),C(E)})):(T(E,O),b||c.if((0,t.not)(O),()=>c.break()))}}function T(E,O,M){const P={keyword:"additionalProperties",dataProp:E,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={},bk;function UJ(){if(bk)return Gm;bk=1,Object.defineProperty(Gm,"__esModule",{value:!0});const e=s0(),t=Oi(),n=rn(),r=yN(),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 x of p)h.definedProperties.add(x);h.opts.unevaluated&&p.length&&h.props!==!0&&(h.props=n.mergeEvaluated.props(l,(0,n.toHash)(p),h.props));const g=p.filter(x=>!(0,n.alwaysValidSchema)(h,c[x]));if(g.length===0)return;const b=l.name("valid");for(const x of g)y(x)?_(x):(l.if((0,t.propertyInData)(l,d,x,h.opts.ownProperties)),_(x),h.allErrors||l.else().var(b,!0),l.endIf()),s.it.definedProperties.add(x),s.ok(b);function y(x){return h.opts.useDefaults&&!h.compositeRule&&c[x].default!==void 0}function _(x){s.subschema({keyword:"properties",schemaProp:x,dataProp:x},b)}}};return Gm.default=o,Gm}var Zm={},Sk;function VJ(){if(Sk)return Zm;Sk=1,Object.defineProperty(Zm,"__esModule",{value:!0});const e=Oi(),t=Rt(),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:x}=h;w();function w(){for(const S of g)y&&v(S),h.allErrors?C(S):(l.var(_,!0),C(S),l.if(_))}function v(S){for(const T in y)new RegExp(S).test(T)&&(0,n.checkStrictMode)(h,`property ${T} matches pattern ${S} (use allowMatchingProperties)`)}function C(S){l.forIn("key",u,T=>{l.if((0,t._)`${(0,e.usePattern)(s,S)}.test(${T})`,()=>{const E=b.includes(S);E||s.subschema({keyword:"patternProperties",schemaProp:S,dataProp:T,dataPropType:r.Type.Str},_),h.opts.unevaluated&&x!==!0?l.assign((0,t._)`${x}[${T}]`,!0):!E&&!h.allErrors&&l.if((0,t.not)(_),()=>l.break())})})}}};return Zm.default=o,Zm}var Wm={},wk;function qJ(){if(wk)return Wm;wk=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={},xk;function BJ(){if(xk)return Ym;xk=1,Object.defineProperty(Ym,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Oi().validateUnion,error:{message:"must match a schema in anyOf"}};return Ym.default=t,Ym}var Xm={},_k;function HJ(){if(_k)return Xm;_k=1,Object.defineProperty(Xm,"__esModule",{value:!0});const e=Rt(),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 x;(0,t.alwaysValidSchema)(u,y)?s.var(g,!0):x=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,_),x&&o.mergeEvaluated(x,e.Name)})})}}};return Xm.default=r,Xm}var Qm={},Ek;function KJ(){if(Ek)return Qm;Ek=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={},Ck;function GJ(){if(Ck)return Jm;Ck=1,Object.defineProperty(Jm,"__esModule",{value:!0});const e=Rt(),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(_,x){return()=>{const w=s.subschema({keyword:_},g);l.assign(p,g),s.mergeValidEvaluated(w,p),x?l.assign(x,(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={},Tk;function ZJ(){if(Tk)return eg;Tk=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 Rk;function WJ(){if(Rk)return Um;Rk=1,Object.defineProperty(Um,"__esModule",{value:!0});const e=mN(),t=$J(),n=gN(),r=IJ(),o=zJ(),s=LJ(),l=FJ(),c=yN(),u=UJ(),d=VJ(),h=qJ(),p=BJ(),g=HJ(),b=KJ(),y=GJ(),_=ZJ();function x(w=!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 w?v.push(t.default,r.default):v.push(e.default,n.default),v.push(o.default),v}return Um.default=x,Um}var tg={},ng={},Ok;function YJ(){if(Ok)return ng;Ok=1,Object.defineProperty(ng,"__esModule",{value:!0});const e=Rt(),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?_():x();function _(){const w=s.scopeValue("formats",{ref:y.formats,code:p.code.formats}),v=s.const("fDef",(0,e._)`${w}[${d}]`),C=s.let("fType"),S=s.let("format");s.if((0,e._)`typeof ${v} == "object" && !(${v} instanceof RegExp)`,()=>s.assign(C,(0,e._)`${v}.type || "string"`).assign(S,(0,e._)`${v}.validate`),()=>s.assign(C,(0,e._)`"string"`).assign(S,v)),r.fail$data((0,e.or)(T(),E()));function T(){return p.strictSchema===!1?e.nil:(0,e._)`${d} && !${S}`}function E(){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 && ${C} === ${o} && !${M}`}}function x(){const w=y.formats[u];if(!w){T();return}if(w===!0)return;const[v,C,S]=E(w);v===o&&r.pass(O());function T(){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 E(M){const P=M instanceof RegExp?(0,e.regexpCode)(M):p.code.formats?(0,e._)`${p.code.formats}${(0,e.getProperty)(u)}`:void 0,I=s.scopeValue("formats",{key:u,ref:M,code:P});return typeof M=="object"&&!(M instanceof RegExp)?[M.type||"string",M.validate,(0,e._)`${I}.validate`]:["string",M,I]}function O(){if(typeof w=="object"&&!(w instanceof RegExp)&&w.async){if(!b.$async)throw new Error("async format in sync schema");return(0,e._)`await ${S}(${l})`}return typeof C=="function"?(0,e._)`${S}(${l})`:(0,e._)`${S}.test(${l})`}}}};return ng.default=n,ng}var Ak;function XJ(){if(Ak)return tg;Ak=1,Object.defineProperty(tg,"__esModule",{value:!0});const t=[YJ().default];return tg.default=t,tg}var Pl={},kk;function QJ(){return kk||(kk=1,Object.defineProperty(Pl,"__esModule",{value:!0}),Pl.contentVocabulary=Pl.metadataVocabulary=void 0,Pl.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Pl.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Pl}var Mk;function JJ(){if(Mk)return Cm;Mk=1,Object.defineProperty(Cm,"__esModule",{value:!0});const e=_J(),t=DJ(),n=WJ(),r=XJ(),o=QJ(),s=[e.default,t.default,(0,n.default)(),r.default,o.metadataVocabulary,o.contentVocabulary];return Cm.default=s,Cm}var rg={},vd={},jk;function eee(){if(jk)return vd;jk=1,Object.defineProperty(vd,"__esModule",{value:!0}),vd.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(vd.DiscrError=e={})),vd}var Pk;function tee(){if(Pk)return rg;Pk=1,Object.defineProperty(rg,"__esModule",{value:!0});const e=Rt(),t=eee(),n=O_(),r=a0(),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),x=u.const("tag",(0,e._)`${d}${(0,e.getProperty)(y)}`);u.if((0,e._)`typeof ${x} == "string"`,()=>w(),()=>c.error(!1,{discrError:t.DiscrError.Tag,tag:x,tagName:y})),c.ok(_);function w(){const S=C();u.if(!1);for(const T in S)u.elseIf((0,e._)`${x} === ${T}`),u.assign(_,v(S[T]));u.else(),c.error(!1,{discrError:t.DiscrError.Mapping,tag:x,tagName:y}),u.endIf()}function v(S){const T=u.name("valid"),E=c.subschema({keyword:"oneOf",schemaProp:S},T);return c.mergeEvaluated(E,e.Name),T}function C(){var S;const T={},E=M(p);let O=!0;for(let z=0;z<b.length;z++){let U=b[z];if(U?.$ref&&!(0,o.schemaHasRulesButRef)(U,g.self.RULES)){const J=U.$ref;if(U=n.resolveRef.call(g.self,g.schemaEnv.root,g.baseId,J),U instanceof n.SchemaEnv&&(U=U.schema),U===void 0)throw new r.default(g.opts.uriResolver,g.baseId,J)}const G=(S=U?.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&&(E||M(U)),P(G,z)}if(!O)throw new Error(`discriminator: "${y}" must be required`);return T;function M({required:z}){return Array.isArray(z)&&z.includes(y)}function P(z,U){if(z.const)I(z.const,U);else if(z.enum)for(const G of z.enum)I(G,U);else throw new Error(`discriminator: "properties/${y}" must have "const" or "enum"`)}function I(z,U){if(typeof z!="string"||z in T)throw new Error(`discriminator: "${y}" values must be unique strings`);T[z]=U}}}};return rg.default=l,rg}const nee="http://json-schema.org/draft-07/schema#",ree="http://json-schema.org/draft-07/schema#",oee="Core schema meta-schema",iee={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:[]}},see=["object","boolean"],aee={$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:"#"}},lee={$schema:nee,$id:ree,title:oee,definitions:iee,type:see,properties:aee,default:!0};var Nk;function k_(){return Nk||(Nk=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=SJ(),r=JJ(),o=tee(),s=lee,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=s0();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var h=Rt();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=R_();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return p.default}});var g=a0();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return g.default}})})(Sm,Sm.exports)),Sm.exports}var cee=k_();const vN=es(cee);var og={exports:{}},l1={},Dk;function uee(){return Dk||(Dk=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(z,U){return{validate:z,compare:U}}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:w,"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:I,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:C,int32:{type:"number",validate:E},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(z){return z%4===0&&(z%100!==0||z%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(z){const U=r.exec(z);if(!U)return!1;const G=+U[1],J=+U[2],ee=+U[3];return J>=1&&J<=12&&ee>=1&&ee<=(J===2&&n(G)?29:o[J])}function l(z,U){if(z&&U)return z>U?1:z<U?-1:0}const c=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function u(z){return function(G){const J=c.exec(G);if(!J)return!1;const ee=+J[1],Z=+J[2],H=+J[3],Y=J[4],oe=J[5]==="-"?-1:1,ne=+(J[6]||0),$=+(J[7]||0);if(ne>23||$>59||z&&!Y)return!1;if(ee<=23&&Z<=59&&H<60)return!0;const q=Z-$*oe,V=ee-ne*oe-(q<0?1:0);return(V===23||V===-1)&&(q===59||q===-1)&&H<61}}function d(z,U){if(!(z&&U))return;const G=new Date("2020-01-01T"+z).valueOf(),J=new Date("2020-01-01T"+U).valueOf();if(G&&J)return G-J}function h(z,U){if(!(z&&U))return;const G=c.exec(z),J=c.exec(U);if(G&&J)return z=G[1]+G[2]+G[3],U=J[1]+J[2]+J[3],z>U?1:z<U?-1:0}const p=/t|\s/i;function g(z){const U=u(z);return function(J){const ee=J.split(p);return ee.length===2&&s(ee[0])&&U(ee[1])}}function b(z,U){if(!(z&&U))return;const G=new Date(z).valueOf(),J=new Date(U).valueOf();if(G&&J)return G-J}function y(z,U){if(!(z&&U))return;const[G,J]=z.split(p),[ee,Z]=U.split(p),H=l(G,ee);if(H!==void 0)return H||d(J,Z)}const _=/\/|:/,x=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function w(z){return _.test(z)&&x.test(z)}const v=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function C(z){return v.lastIndex=0,v.test(z)}const S=-2147483648,T=2**31-1;function E(z){return Number.isInteger(z)&&z<=T&&z>=S}function O(z){return Number.isInteger(z)}function M(){return!0}const P=/[^\\]\\Z/;function I(z){if(P.test(z))return!1;try{return new RegExp(z),!0}catch{return!1}}})(l1)),l1}var c1={},$k;function fee(){return $k||($k=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=k_(),n=Rt(),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?x():w();function x(){const C=u.scopeValue("formats",{ref:y.formats,code:b.code.formats}),S=u.const("fmt",(0,n._)`${C}[${_.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 w(){const C=_.schema,S=y.formats[C];if(!S||S===!0)return;if(typeof S!="object"||S instanceof RegExp||typeof S.compare!="function")throw new Error(`"${p}": format "${C}" does not define "compare" function`);const T=u.scopeValue("formats",{key:C,ref:S,code:b.code.formats?(0,n._)`${b.code.formats}${(0,n.getProperty)(C)}`:void 0});c.fail$data(v(T))}function v(C){return(0,n._)`${C}.compare(${d}, ${h}) ${o[p].fail} 0`}},dependencies:["format"]};const l=c=>(c.addKeyword(e.formatLimitDefinition),c);e.default=l})(c1)),c1}var Ik;function dee(){return Ik||(Ik=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const n=uee(),r=fee(),o=Rt(),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 hee=dee();const pee=es(hee);function mee(){const e=new vN({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return pee(e),e}class gee{constructor(t){this._ajv=t??mee()}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 yee{constructor(t){this._client=t}async*callToolStream(t,n=r0,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(xt.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(xt.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(xt.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 vee(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 bee(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 See(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 wee extends oJ{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 gee,n?.listChanged&&(this._pendingListChangedConfig=n.listChanged)}_setupListChangedHandlers(t){t.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler("tools",rN,t.tools,async()=>(await this.listTools()).tools),t.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler("prompts",eN,t.prompts,async()=>(await this.listPrompts()).prompts),t.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler("resources",X4,t.resources,async()=>(await this.listResources()).resources)}get experimental(){return this._experimental||(this._experimental={tasks:new yee(this)}),this._experimental}registerCapabilities(t){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=iJ(this._capabilities,t)}setRequestHandler(t,n){const o=E4(t)?.method;if(!o)throw new Error("Schema is missing a method literal");let s;if(Jy(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=Ca(aN,u);if(!h.success){const v=h.error instanceof Error?h.error.message:String(h.error);throw new ht(xt.InvalidParams,`Invalid elicitation request: ${v}`)}const{params:p}=h.data;p.mode=p.mode??"form";const{supportsFormMode:g,supportsUrlMode:b}=See(this._capabilities.elicitation);if(p.mode==="form"&&!g)throw new ht(xt.InvalidParams,"Client does not support form-mode elicitation requests");if(p.mode==="url"&&!b)throw new ht(xt.InvalidParams,"Client does not support URL-mode elicitation requests");const y=await Promise.resolve(n(u,d));if(p.task){const v=Ca(ih,y);if(!v.success){const C=v.error instanceof Error?v.error.message:String(v.error);throw new ht(xt.InvalidParams,`Invalid task creation result: ${C}`)}return v.data}const _=Ca(lN,y);if(!_.success){const v=_.error instanceof Error?_.error.message:String(_.error);throw new ht(xt.InvalidParams,`Invalid elicitation result: ${v}`)}const x=_.data,w=p.mode==="form"?p.requestedSchema:void 0;if(p.mode==="form"&&x.action==="accept"&&x.content&&w&&this._capabilities.elicitation?.form?.applyDefaults)try{Ng(w,x.content)}catch{}return x};return super.setRequestHandler(t,c)}if(l==="sampling/createMessage"){const c=async(u,d)=>{const h=Ca(iN,u);if(!h.success){const y=h.error instanceof Error?h.error.message:String(h.error);throw new ht(xt.InvalidParams,`Invalid sampling request: ${y}`)}const{params:p}=h.data,g=await Promise.resolve(n(u,d));if(p.task){const y=Ca(ih,g);if(!y.success){const _=y.error instanceof Error?y.error.message:String(y.error);throw new ht(xt.InvalidParams,`Invalid task creation result: ${_}`)}return y.data}const b=Ca(sN,g);if(!b.success){const y=b.error instanceof Error?b.error.message:String(b.error);throw new ht(xt.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:e0,capabilities:this._capabilities,clientInfo:this._clientInfo}},V4,n);if(r===void 0)throw new Error(`Server sent invalid initialize result: ${r}`);if(!EX.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){vee(this._serverCapabilities?.tasks?.requests,t,"Server")}assertTaskHandlerCapability(t){this._capabilities&&bee(this._capabilities.tasks?.requests,t,"Client")}async ping(t){return this.request({method:"ping"},mu,t)}async complete(t,n){return this.request({method:"completion/complete",params:t},cN,n)}async setLoggingLevel(t,n){return this.request({method:"logging/setLevel",params:{level:t}},mu,n)}async getPrompt(t,n){return this.request({method:"prompts/get",params:t},J4,n)}async listPrompts(t,n){return this.request({method:"prompts/list",params:t},Q4,n)}async listResources(t,n){return this.request({method:"resources/list",params:t},Z4,n)}async listResourceTemplates(t,n){return this.request({method:"resources/templates/list",params:t},W4,n)}async readResource(t,n){return this.request({method:"resources/read",params:t},Y4,n)}async subscribeResource(t,n){return this.request({method:"resources/subscribe",params:t},mu,n)}async unsubscribeResource(t,n){return this.request({method:"resources/unsubscribe",params:t},mu,n)}async callTool(t,n=r0,r){if(this.isToolTaskRequired(t.name))throw new ht(xt.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(xt.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(xt.InvalidParams,`Structured content does not match the tool's output schema: ${l.errorMessage}`)}catch(l){throw l instanceof ht?l:new ht(xt.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},nN,n);return this.cacheToolMetadata(r.tools),r}_setupListChangedHandler(t,n,r,o){const s=vQ.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 QS(e){return e?e instanceof Headers?Object.fromEntries(e.entries()):Array.isArray(e)?Object.fromEntries(e):{...e}:{}}function xee(e=fetch,t){return t?async(n,r)=>{const o={...t,...r,headers:r?.headers?{...QS(t.headers),...QS(r.headers)}:t.headers};return e(n,o)}:e}let M_;M_=globalThis.crypto;async function _ee(e){return(await M_).getRandomValues(new Uint8Array(e))}async function Eee(e){const t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~",n=Math.pow(2,8)-Math.pow(2,8)%t.length;let r="";for(;r.length<e;){const o=await _ee(e-r.length);for(const s of o)s<n&&(r+=t[s%t.length])}return r}async function Cee(e){return await Eee(e)}async function Tee(e){const t=await(await M_).subtle.digest("SHA-256",new TextEncoder().encode(e));return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}async function Ree(e){if(e||(e=43),e<43||e>128)throw`Expected a length between 43 and 128. Received ${e}.`;const t=await Cee(e),n=await Tee(t);return{code_verifier:t,code_challenge:n}}const Vr=kY().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:xX.custom,message:"URL must be parseable",fatal:!0}),PK}).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"}),Oee=Hr({resource:ue().url(),authorization_servers:Ke(Vr).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:$n().optional(),authorization_details_types_supported:Ke(ue()).optional(),dpop_signing_alg_values_supported:Ke(ue()).optional(),dpop_bound_access_tokens_required:$n().optional()}),bN=Hr({issuer:ue(),authorization_endpoint:Vr,token_endpoint:Vr,registration_endpoint:Vr.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:Vr.optional(),revocation_endpoint:Vr.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:$n().optional()}),Aee=Hr({issuer:ue(),authorization_endpoint:Vr,token_endpoint:Vr,userinfo_endpoint:Vr.optional(),jwks_uri:Vr,registration_endpoint:Vr.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:$n().optional(),request_parameter_supported:$n().optional(),request_uri_parameter_supported:$n().optional(),require_request_uri_registration:$n().optional(),op_policy_uri:Vr.optional(),op_tos_uri:Vr.optional(),client_id_metadata_document_supported:$n().optional()}),kee=Ge({...Aee.shape,...bN.pick({code_challenge_methods_supported:!0}).shape}),Mee=Ge({access_token:ue(),id_token:ue().optional(),token_type:ue(),expires_in:_X().optional(),scope:ue().optional(),refresh_token:ue().optional()}).strip(),jee=Ge({error:ue(),error_description:ue().optional(),error_uri:ue().optional()}),zk=Vr.optional().or(ot("").transform(()=>{})),Pee=Ge({redirect_uris:Ke(Vr),token_endpoint_auth_method:ue().optional(),grant_types:Ke(ue()).optional(),response_types:Ke(ue()).optional(),client_name:ue().optional(),client_uri:Vr.optional(),logo_uri:zk,scope:ue().optional(),contacts:Ke(ue()).optional(),tos_uri:zk,policy_uri:ue().optional(),jwks_uri:Vr.optional(),jwks:YY().optional(),software_id:ue().optional(),software_version:ue().optional(),software_statement:ue().optional()}).strip(),Nee=Ge({client_id:ue(),client_secret:ue().optional(),client_id_issued_at:hn().optional(),client_secret_expires_at:hn().optional()}).strip(),Dee=Pee.merge(Nee);Ge({error:ue(),error_description:ue().optional()}).strip();Ge({token:ue(),token_type_hint:ue().optional()}).strip();function $ee(e){const t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function Iee({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 Mr 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 JS extends Mr{}JS.errorCode="invalid_request";class uy extends Mr{}uy.errorCode="invalid_client";class fy extends Mr{}fy.errorCode="invalid_grant";class dy extends Mr{}dy.errorCode="unauthorized_client";class ew extends Mr{}ew.errorCode="unsupported_grant_type";class tw extends Mr{}tw.errorCode="invalid_scope";class nw extends Mr{}nw.errorCode="access_denied";class Uu extends Mr{}Uu.errorCode="server_error";class rw extends Mr{}rw.errorCode="temporarily_unavailable";class ow extends Mr{}ow.errorCode="unsupported_response_type";class iw extends Mr{}iw.errorCode="unsupported_token_type";class sw extends Mr{}sw.errorCode="invalid_token";class aw extends Mr{}aw.errorCode="method_not_allowed";class lw extends Mr{}lw.errorCode="too_many_requests";class hy extends Mr{}hy.errorCode="invalid_client_metadata";class cw extends Mr{}cw.errorCode="insufficient_scope";class uw extends Mr{}uw.errorCode="invalid_target";const zee={[JS.errorCode]:JS,[uy.errorCode]:uy,[fy.errorCode]:fy,[dy.errorCode]:dy,[ew.errorCode]:ew,[tw.errorCode]:tw,[nw.errorCode]:nw,[Uu.errorCode]:Uu,[rw.errorCode]:rw,[ow.errorCode]:ow,[iw.errorCode]:iw,[sw.errorCode]:sw,[aw.errorCode]:aw,[lw.errorCode]:lw,[hy.errorCode]:hy,[cw.errorCode]:cw,[uw.errorCode]:uw};class eu extends Error{constructor(t){super(t??"Unauthorized")}}function Lee(e){return["client_secret_basic","client_secret_post","none"].includes(e)}const u1="code",f1="S256";function Fee(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&&Lee(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 Uee(e,t,n,r){const{client_id:o,client_secret:s}=t;switch(e){case"client_secret_basic":Vee(o,s,n);return;case"client_secret_post":qee(o,s,r);return;case"none":Bee(o,r);return;default:throw new Error(`Unsupported client authentication method: ${e}`)}}function Vee(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 qee(e,t,n){n.set("client_id",e),t&&n.set("client_secret",t)}function Bee(e,t){t.set("client_id",e)}async function SN(e){const t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{const r=jee.parse(JSON.parse(n)),{error:o,error_description:s,error_uri:l}=r,c=zee[o]||Uu;return new c(s||"",l)}catch(r){const o=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${r}. Raw body: ${n}`;return new Uu(o)}}async function ig(e,t){try{return await d1(e,t)}catch(n){if(n instanceof uy||n instanceof dy)return await e.invalidateCredentials?.("all"),await d1(e,t);if(n instanceof fy)return await e.invalidateCredentials?.("tokens"),await d1(e,t);throw n}}async function d1(e,{serverUrl:t,authorizationCode:n,scope:r,resourceMetadataUrl:o,fetchFn:s}){let l,c;try{l=await Gee(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 Kee(t,e,l),d=await Qee(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 x=d?.client_id_metadata_document_supported===!0,w=e.clientMetadataUrl;if(w&&!Hee(w))throw new hy(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${w}`);if(x&&w)h={client_id:w},await e.saveClientInformation?.(h);else{if(!e.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const C=await rte(c,{metadata:d,clientMetadata:e.clientMetadata,fetchFn:s});await e.saveClientInformation(C),h=C}}const p=!e.redirectUrl;if(n!==void 0||p){const x=await nte(e,c,{metadata:d,resource:u,authorizationCode:n,fetchFn:s});return await e.saveTokens(x),"AUTHORIZED"}const g=await e.tokens();if(g?.refresh_token)try{const x=await tte(c,{metadata:d,clientInformation:h,refreshToken:g.refresh_token,resource:u,addClientAuthentication:e.addClientAuthentication,fetchFn:s});return await e.saveTokens(x),"AUTHORIZED"}catch(x){if(!(!(x instanceof Mr)||x instanceof Uu))throw x}const b=e.state?await e.state():void 0,{authorizationUrl:y,codeVerifier:_}=await Jee(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 Hee(e){if(!e)return!1;try{const t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function Kee(e,t,n){const r=$ee(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!Iee({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 Lk(e){const t=e.headers.get("WWW-Authenticate");if(!t)return{};const[n,r]=t.split(" ");if(n.toLowerCase()!=="bearer"||!r)return{};const o=h1(e,"resource_metadata")||void 0;let s;if(o)try{s=new URL(o)}catch{}const l=h1(e,"scope")||void 0,c=h1(e,"error")||void 0;return{resourceMetadataUrl:s,scope:l,error:c}}function h1(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 Gee(e,t,n=fetch){const r=await Yee(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 Oee.parse(await r.json())}async function j_(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(r instanceof TypeError)return t?j_(e,void 0,n):void 0;throw r}}function Zee(e,t="",n={}){return t.endsWith("/")&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function Fk(e,t,n=fetch){return await j_(e,{"MCP-Protocol-Version":t},n)}function Wee(e,t){return!e||e.status>=400&&e.status<500&&t!=="/"}async function Yee(e,t,n,r){const o=new URL(e),s=r?.protocolVersion??e0;let l;if(r?.metadataUrl)l=new URL(r.metadataUrl);else{const u=Zee(t,o.pathname);l=new URL(u,r?.metadataServerUrl??o),l.search=o.search}let c=await Fk(l,s,n);if(!r?.metadataUrl&&Wee(c,o.pathname)){const u=new URL(`/.well-known/${t}`,o);c=await Fk(u,s,n)}return c}function Xee(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 Qee(e,{fetchFn:t=fetch,protocolVersion:n=e0}={}){const r={"MCP-Protocol-Version":n,Accept:"application/json"},o=Xee(e);for(const{url:s,type:l}of o){const c=await j_(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"?bN.parse(await c.json()):kee.parse(await c.json())}}}async function Jee(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(u1))throw new Error(`Incompatible auth server: does not support response type ${u1}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(f1))throw new Error(`Incompatible auth server: does not support code challenge method ${f1}`)}else c=new URL("/authorize",e);const u=await Ree(),d=u.code_verifier,h=u.code_challenge;return c.searchParams.set("response_type",u1),c.searchParams.set("client_id",n.client_id),c.searchParams.set("code_challenge",h),c.searchParams.set("code_challenge_method",f1),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 ete(e,t,n){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(n)})}async function wN(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=Fee(r,h);Uee(p,r,u,n)}const d=await(l??fetch)(c,{method:"POST",headers:u,body:n});if(!d.ok)throw await SN(d);return Mee.parse(await d.json())}async function tte(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 wN(e,{metadata:t,tokenRequestParams:c,clientInformation:n,addClientAuthentication:s,resource:o,fetchFn:l});return{refresh_token:r,...u}}async function nte(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=ete(o,d,e.redirectUrl)}const u=await e.clientInformation();return wN(t,{metadata:n,tokenRequestParams:c,clientInformation:u??void 0,addClientAuthentication:e.addClientAuthentication,resource:r,fetchFn:s})}async function rte(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 SN(s);return Dee.parse(await s.json())}class Uk 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 p1(e){}function ote(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=p1,onError:n=p1,onRetry:r=p1,onComment:o}=e;let s="",l=!0,c,u="",d="";function h(_){const x=l?_.replace(/^\xEF\xBB\xBF/,""):_,[w,v]=ite(`${s}${x}`);for(const C of w)p(C);s=v,l=!1}function p(_){if(_===""){b();return}if(_.startsWith(":")){o&&o(_.slice(_.startsWith(": ")?2:1));return}const x=_.indexOf(":");if(x!==-1){const w=_.slice(0,x),v=_[x+1]===" "?2:1,C=_.slice(x+v);g(w,C,_);return}g(_,"",_)}function g(_,x,w){switch(_){case"event":d=x;break;case"data":u=`${u}${x}
|
|
56
|
+
`;break;case"id":c=x.includes("\0")?void 0:x;break;case"retry":/^\d+$/.test(x)?r(parseInt(x,10)):n(new Uk(`Invalid \`retry\` value: "${x}"`,{type:"invalid-retry",value:x,line:w}));break;default:n(new Uk(`Unknown field "${_.length>20?`${_.slice(0,20)}…`:_}"`,{type:"unknown-field",field:_,value:x,line:w}));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 ite(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 ste extends TransformStream{constructor({onError:t,onRetry:n,onComment:r}={}){let o;super({start(s){o=ote({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 ate={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 lte{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=xee(n?.fetch,n?.requestInit),this._sessionId=n?.sessionId,this._reconnectionOptions=n?.reconnectionOptions??ate}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=QS(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 ste({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 _=Xb.parse(JSON.parse(b.data));Td(_)&&(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:XS(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}=Lk(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:_}=Lk(c);if(_==="insufficient_scope"){const x=c.headers.get("WWW-Authenticate");if(this._lastUpscopingHeader===x)throw new tu(403,"Server returned 403 after trying upscoping");if(y&&(this._scope=y),b&&(this._resourceMetadataUrl=b),this._lastUpscopingHeader=x??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(),FX(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=>Xb.parse(y)):[Xb.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 cte{client=null;transport=null;async connect(t){const n=typeof t=="string"?new URL(t):t;this.transport=new lte(n),this.client=new wee({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.");return await this.client.callTool({name:t,arguments:n??{}})}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 Uh=new cte;Uh.connect("http://localhost:3000/mcp").then(()=>{console.info("Connected to MCP server")});const ute={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},xN=()=>{const{data:e}=jj({queryKey:["list-tools"],queryFn:()=>Uh.listTools()});return e},fte=()=>Uh.getServerInfo(),dte=()=>{const{setToolData:e}=lf();return $F({mutationFn:async({toolName:t,args:n})=>{e(t,{input:n??{},response:void 0,openaiRef:null,openaiLogs:[],openaiObject:null});const r=await Uh.callTool(t,n);return e(t,{input:n??{},response:r,openaiRef:null,openaiLogs:[],openaiObject:{...ute,toolInput:n??{},toolOutput:r.structuredContent,toolResponseMetadata:r._meta??null,widgetState:null}}),r}})},P_=()=>{const[e]=e_();return xN().find(n=>n.name===e)??null},dc=()=>{const e=P_();if(!e)throw new Error("No tool is currently selected");return e},hte=e=>jj({queryKey:["resource",e],queryFn:async()=>{if(!e)throw new Error("Resource URI is required");return await Uh.readResource(e)}});const pte=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),mte=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Vk=e=>{const t=mte(e);return t.charAt(0).toUpperCase()+t.slice(1)},_N=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),gte=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var yte={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 vte=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,...yte,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:_N("lucide",o),...!s&&!gte(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(vte,{ref:s,iconNode:t,className:_N(`lucide-${pte(Vk(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Vk(e),n};const bte=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ste=rs("check",bte);const wte=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],EN=rs("chevron-down",wte);const xte=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],_te=rs("chevron-up",xte);const Ete=[["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"}]],Cte=rs("circle-alert",Ete);const Tte=[["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"}]],Rte=rs("external-link",Tte);const Ote=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ate=rs("loader-circle",Ote);const kte=[["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"}]],Mte=rs("moon",kte);const jte=[["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"}]],Pte=rs("play",jte);const Nte=[["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"}]],Dte=rs("sun",Nte);const $te=[["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"}]],Ite=rs("trash",$te);function l0(){return typeof window<"u"}function el(e){return N_(e)?(e.nodeName||"").toLowerCase():"#document"}function Or(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function os(e){var t;return(t=(N_(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function N_(e){return l0()?e instanceof Node||e instanceof Or(e).Node:!1}function Gn(e){return l0()?e instanceof Element||e instanceof Or(e).Element:!1}function or(e){return l0()?e instanceof HTMLElement||e instanceof Or(e).HTMLElement:!1}function fw(e){return!l0()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Or(e).ShadowRoot}const zte=new Set(["inline","contents"]);function hc(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=zo(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!zte.has(o)}const Lte=new Set(["table","td","th"]);function Fte(e){return Lte.has(el(e))}const Ute=[":popover-open",":modal"];function c0(e){return Ute.some(t=>{try{return e.matches(t)}catch{return!1}})}const Vte=["transform","translate","scale","rotate","perspective"],qte=["transform","translate","scale","rotate","perspective","filter"],Bte=["paint","layout","strict","content"];function D_(e){const t=u0(),n=Gn(e)?zo(e):e;return Vte.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)||qte.some(r=>(n.willChange||"").includes(r))||Bte.some(r=>(n.contain||"").includes(r))}function Hte(e){let t=js(e);for(;or(t)&&!ks(t);){if(D_(t))return t;if(c0(t))return null;t=js(t)}return null}function u0(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Kte=new Set(["html","body","#document"]);function ks(e){return Kte.has(el(e))}function zo(e){return Or(e).getComputedStyle(e)}function f0(e){return Gn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function js(e){if(el(e)==="html")return e;const t=e.assignedSlot||e.parentNode||fw(e)&&e.host||os(e);return fw(t)?t.host:t}function CN(e){const t=js(e);return ks(t)?e.ownerDocument?e.ownerDocument.body:e.body:or(t)&&hc(t)?t:CN(t)}function Ma(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=CN(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),l=Or(o);if(s){const c=dw(l);return t.concat(l,l.visualViewport||[],hc(o)?o:[],c&&n?Ma(c):[])}return t.concat(o,Ma(o,[],n))}function dw(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const qk={};function Yi(e,t){const n=k.useRef(qk);return n.current===qk&&(n.current=e(t)),n}const m1=Eh[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Gte=m1&&m1!==k.useLayoutEffect?m1:e=>e();function lt(e){const t=Yi(Zte).current;return t.next=e,Gte(t.effect),t.trampoline}function Zte(){const e={next:void 0,callback:Wte,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Wte(){}const Yte=()=>{},rt=typeof document<"u"?k.useLayoutEffect:Yte;function hw(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const Id={};function d0(e,t,n,r,o){let s={...pw(e,Id)};return t&&(s=Rd(s,t)),n&&(s=Rd(s,n)),r&&(s=Rd(s,r)),o&&(s=Rd(s,o)),s}function Xte(e){if(e.length===0)return Id;if(e.length===1)return pw(e[0],Id);let t={...pw(e[0],Id)};for(let n=1;n<e.length;n+=1)t=Rd(t,e[n]);return t}function Rd(e,t){return TN(t)?t(e):Qte(e,t)}function Qte(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=hw(e.style,r);break}case"className":{e[n]=RN(e.className,r);break}default:Jte(n,r)?e[n]=ene(e[n],r):e[n]=r}}return e}function Jte(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 TN(e){return typeof e=="function"}function pw(e,t){return TN(e)?e(t):e??Id}function ene(e,t){return t?e?n=>{if(tne(n)){const o=n;mw(o);const s=t(o);return o.baseUIHandlerPrevented||e?.(o),s}const r=t(n);return e?.(n),r}:t:e}function mw(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function RN(e,t){return t?e?t+" "+e:t:e}function tne(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 ON=k.createContext(void 0);function AN(e=!1){const t=k.useContext(ON);if(t===void 0&&!e)throw new Error(is(16));return t}function nne(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 h0(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0}=e,s=k.useRef(null),l=AN(!0)!==void 0,c=lt(()=>{const g=s.current;return!!(g?.tagName==="A"&&g?.href)}),{props:u}=nne({focusableWhenDisabled:n,disabled:t,composite:l,tabIndex:r,isNativeButton:o}),d=k.useCallback(()=>{const g=s.current;rne(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:x,onPointerDown:w,...v}=g;return d0({type:o?"button":void 0,onClick(S){if(t){S.preventDefault();return}b?.(S)},onMouseDown(S){t||y?.(S)},onKeyDown(S){if(t||(mw(S),x?.(S)),S.baseUIHandlerPrevented)return;const T=S.target===S.currentTarget&&!o&&!c()&&!t,E=S.key==="Enter",O=S.key===" ";T&&((O||E)&&S.preventDefault(),E&&b?.(S))},onKeyUp(S){t||(mw(S),_?.(S)),!S.baseUIHandlerPrevented&&S.target===S.currentTarget&&!o&&!t&&S.key===" "&&b?.(S)},onPointerDown(S){if(t){S.preventDefault();return}w?.(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 rne(e){return or(e)&&e.tagName==="BUTTON"}function qa(e,t,n,r){const o=Yi(kN).current;return ine(o,e,t,n,r)&&MN(o,[e,t,n,r]),o.callback}function one(e){const t=Yi(kN).current;return sne(t,e)&&MN(t,e),t.callback}function kN(){return{callback:null,cleanup:null,refs:[]}}function ine(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function sne(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function MN(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 ane=parseInt(k.version,10);function $_(e){return ane>=e}function Bk(e){if(!k.isValidElement(e))return null;const t=e,n=t.props;return($_(19)?n?.ref:t.ref)??null}function lne(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 cne(e,t){return typeof e=="function"?e(t):e}function une(e,t){return typeof e=="function"?e(t):e}function jo(){}const Vu=Object.freeze([]),Po=Object.freeze({}),fne={style:{transition:"none"}},dne="data-base-ui-click-trigger",hne={fallbackAxisSide:"none"},pne={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function jr(e,t,n={}){const r=t.render,o=mne(t,n);if(n.enabled===!1)return null;const s=n.state??Po;return gne(e,r,o,s)}function mne(e,t={}){const{className:n,style:r,render:o}=e,{state:s=Po,ref:l,props:c,stateAttributesMapping:u,enabled:d=!0}=t,h=d?cne(n,s):void 0,p=d?une(r,s):void 0,g=d?lne(s,u):Po,b=d?hw(g,Array.isArray(c)?Xte(c):c)??Po:Po;return typeof document<"u"&&(d?Array.isArray(l)?b.ref=one([b.ref,Bk(o),...l]):b.ref=qa(b.ref,Bk(o),l):qa(null,null)),d?(h!==void 0&&(b.className=RN(b.className,h)),p!==void 0&&(b.style=hw(b.style,p)),b):Po}function gne(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const o=d0(n,t.props);return o.ref=n.ref,k.cloneElement(t,o)}if(e&&typeof e=="string")return yne(e,n);throw new Error(is(8))}function yne(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 vne=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}=h0({disabled:d,focusableWhenDisabled:l,native:c}),g=k.useMemo(()=>({disabled:d}),[d]);return jr("button",t,{state:g,ref:[n,p],props:[u,h]})});function jN(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=jN(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function I_(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=jN(e))&&(r&&(r+=" "),r+=t);return r}const Hk=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Kk=I_,tl=(e,t)=>n=>{var r;if(t?.variants==null)return Kk(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=Hk(h)||Hk(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[_,x]=y;return Array.isArray(x)?x.includes({...s,...c}[_]):{...s,...c}[_]===x})?[...d,p,g]:d},[]);return Kk(e,l,u,n?.class,n?.className)},bne=(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},Sne=(e,t)=>({classGroupId:e,validator:t}),PN=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),py="-",Gk=[],wne="arbitrary..",xne=e=>{const t=Ene(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return _ne(l);const c=l.split(py),u=c[0]===""&&c.length>1?1:0;return NN(c,u,t)},getConflictingClassGroupIds:(l,c)=>{if(c){const u=r[l],d=n[l];return u?d?bne(d,u):u:d||Gk}return n[l]||Gk}}},NN=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],s=n.nextPart.get(o);if(s){const d=NN(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}},_ne=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?wne+r:void 0})(),Ene=e=>{const{theme:t,classGroups:n}=e;return Cne(n,t)},Cne=(e,t)=>{const n=PN();for(const r in e){const o=e[r];z_(o,n,r,t)}return n},z_=(e,t,n,r)=>{const o=e.length;for(let s=0;s<o;s++){const l=e[s];Tne(l,t,n,r)}},Tne=(e,t,n,r)=>{if(typeof e=="string"){Rne(e,t,n);return}if(typeof e=="function"){One(e,t,n,r);return}Ane(e,t,n,r)},Rne=(e,t,n)=>{const r=e===""?t:DN(t,e);r.classGroupId=n},One=(e,t,n,r)=>{if(kne(e)){z_(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Sne(n,e))},Ane=(e,t,n,r)=>{const o=Object.entries(e),s=o.length;for(let l=0;l<s;l++){const[c,u]=o[l];z_(u,DN(t,c),n,r)}},DN=(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=PN(),n.nextPart.set(l,c)),n=c}return n},kne=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Mne=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)}}},gw="!",Zk=":",jne=[],Wk=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),Pne=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 x=o[_];if(l===0&&c===0){if(x===Zk){s.push(o.slice(u,_)),u=_+1;continue}if(x==="/"){d=_;continue}}x==="["?l++:x==="]"?l--:x==="("?c++:x===")"&&c--}const p=s.length===0?o:o.slice(u);let g=p,b=!1;p.endsWith(gw)?(g=p.slice(0,-1),b=!0):p.startsWith(gw)&&(g=p.slice(1),b=!0);const y=d&&d>u?d-u:void 0;return Wk(s,b,g,y)};if(t){const o=t+Zk,s=r;r=l=>l.startsWith(o)?s(l.slice(o.length)):Wk(jne,!1,l,void 0,!0)}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},Nne=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}},Dne=e=>({cache:Mne(e.cacheSize),parseClassName:Pne(e),sortModifiers:Nne(e),...xne(e)}),$ne=/\s+/,Ine=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,l=[],c=e.trim().split($ne);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 x=!!_,w=r(x?y.substring(0,_):y);if(!w){if(!x){u=h+(u.length>0?" "+u:u);continue}if(w=r(y),!w){u=h+(u.length>0?" "+u:u);continue}x=!1}const v=g.length===0?"":g.length===1?g[0]:s(g).join(":"),C=b?v+gw:v,S=C+w;if(l.indexOf(S)>-1)continue;l.push(S);const T=o(w,x);for(let E=0;E<T.length;++E){const O=T[E];l.push(C+O)}u=h+(u.length>0?" "+u:u)}return u},zne=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=$N(n))&&(o&&(o+=" "),o+=r);return o},$N=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=$N(e[r]))&&(n&&(n+=" "),n+=t);return n},Lne=(e,...t)=>{let n,r,o,s;const l=u=>{const d=t.reduce((h,p)=>p(h),e());return n=Dne(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=Ine(u,n);return o(u,h),h};return s=l,(...u)=>s(zne(...u))},Fne=[],Er=e=>{const t=n=>n[e]||Fne;return t.isThemeGetter=!0,t},IN=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,zN=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Une=/^\d+\/\d+$/,Vne=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,qne=/\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$/,Bne=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Hne=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Kne=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,nu=e=>Une.test(e),kt=e=>!!e&&!Number.isNaN(Number(e)),ba=e=>!!e&&Number.isInteger(Number(e)),g1=e=>e.endsWith("%")&&kt(e.slice(0,-1)),Rs=e=>Vne.test(e),Gne=()=>!0,Zne=e=>qne.test(e)&&!Bne.test(e),LN=()=>!1,Wne=e=>Hne.test(e),Yne=e=>Kne.test(e),Xne=e=>!Qe(e)&&!Je(e),Qne=e=>df(e,VN,LN),Qe=e=>IN.test(e),Nl=e=>df(e,qN,Zne),y1=e=>df(e,rre,kt),Yk=e=>df(e,FN,LN),Jne=e=>df(e,UN,Yne),sg=e=>df(e,BN,Wne),Je=e=>zN.test(e),bd=e=>hf(e,qN),ere=e=>hf(e,ore),Xk=e=>hf(e,FN),tre=e=>hf(e,VN),nre=e=>hf(e,UN),ag=e=>hf(e,BN,!0),df=(e,t,n)=>{const r=IN.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},hf=(e,t,n=!1)=>{const r=zN.exec(e);return r?r[1]?t(r[1]):n:!1},FN=e=>e==="position"||e==="percentage",UN=e=>e==="image"||e==="url",VN=e=>e==="length"||e==="size"||e==="bg-size",qN=e=>e==="length",rre=e=>e==="number",ore=e=>e==="family-name",BN=e=>e==="shadow",ire=()=>{const e=Er("color"),t=Er("font"),n=Er("text"),r=Er("font-weight"),o=Er("tracking"),s=Er("leading"),l=Er("breakpoint"),c=Er("container"),u=Er("spacing"),d=Er("radius"),h=Er("shadow"),p=Er("inset-shadow"),g=Er("text-shadow"),b=Er("drop-shadow"),y=Er("blur"),_=Er("perspective"),x=Er("aspect"),w=Er("ease"),v=Er("animate"),C=()=>["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"],T=()=>[...S(),Je,Qe],E=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],M=()=>[Je,Qe,u],P=()=>[nu,"full","auto",...M()],I=()=>[ba,"none","subgrid",Je,Qe],z=()=>["auto",{span:["full",ba,Je,Qe]},ba,Je,Qe],U=()=>[ba,"auto",Je,Qe],G=()=>["auto","min","max","fr",Je,Qe],J=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ee=()=>["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(),Xk,Yk,{position:[Je,Qe]}],ne=()=>["no-repeat",{repeat:["","x","y","space","round"]}],$=()=>["auto","cover","contain",tre,Qne,{size:[Je,Qe]}],q=()=>[g1,bd,Nl],V=()=>["","none","full",d,Je,Qe],D=()=>["",kt,bd,Nl],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,g1,Xk,Yk],ae=()=>["","none",y,Je,Qe],ge=()=>["none",kt,Je,Qe],ke=()=>["none",kt,Je,Qe],Q=()=>[kt,Je,Qe],ie=()=>[nu,"full",...M()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Rs],breakpoint:[Rs],color:[Gne],container:[Rs],"drop-shadow":[Rs],ease:["in","out","in-out"],font:[Xne],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Rs],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Rs],shadow:[Rs],spacing:["px",kt],text:[Rs],"text-shadow":[Rs],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",nu,Qe,Je,x]}],container:["container"],columns:[{columns:[kt,Qe,Je,c]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"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:T()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],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:[ba,"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:[ba,"first","last","none",Je,Qe]}],"grid-cols":[{"grid-cols":I()}],"col-start-end":[{col:z()}],"col-start":[{"col-start":U()}],"col-end":[{"col-end":U()}],"grid-rows":[{"grid-rows":I()}],"row-start-end":[{row:z()}],"row-start":[{"row-start":U()}],"row-end":[{"row-end":U()}],"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:[...J(),"normal"]}],"justify-items":[{"justify-items":[...ee(),"normal"]}],"justify-self":[{"justify-self":["auto",...ee()]}],"align-content":[{content:["normal",...J()]}],"align-items":[{items:[...ee(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ee(),{baseline:["","last"]}]}],"place-content":[{"place-content":J()}],"place-items":[{"place-items":[...ee(),"baseline"]}],"place-self":[{"place-self":["auto",...ee()]}],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,bd,Nl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Je,y1]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",g1,Qe]}],"font-family":[{font:[ere,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,y1]}],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,Nl]}],"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"]},ba,Je,Qe],radial:["",Je,Qe],conic:[ba,Je,Qe]},nre,Jne]}],"bg-color":[{bg:Y()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:Y()}],"gradient-via":[{via:Y()}],"gradient-to":[{to:Y()}],rounded:[{rounded:V()}],"rounded-s":[{"rounded-s":V()}],"rounded-e":[{"rounded-e":V()}],"rounded-t":[{"rounded-t":V()}],"rounded-r":[{"rounded-r":V()}],"rounded-b":[{"rounded-b":V()}],"rounded-l":[{"rounded-l":V()}],"rounded-ss":[{"rounded-ss":V()}],"rounded-se":[{"rounded-se":V()}],"rounded-ee":[{"rounded-ee":V()}],"rounded-es":[{"rounded-es":V()}],"rounded-tl":[{"rounded-tl":V()}],"rounded-tr":[{"rounded-tr":V()}],"rounded-br":[{"rounded-br":V()}],"rounded-bl":[{"rounded-bl":V()}],"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,bd,Nl]}],"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,Nl]}],"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:ae()}],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":ae()}],"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",w,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":T()}],rotate:[{rotate:ge()}],"rotate-x":[{"rotate-x":ge()}],"rotate-y":[{"rotate-y":ge()}],"rotate-z":[{"rotate-z":ge()}],scale:[{scale:ke()}],"scale-x":[{"scale-x":ke()}],"scale-y":[{"scale-y":ke()}],"scale-z":[{"scale-z":ke()}],"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:T()}],"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,bd,Nl,y1]}],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"]}},HN=Lne(ire);function vn(...e){return HN(I_(e))}const sre=tl("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 sh({className:e,variant:t="default",size:n="default",...r}){return j.jsx(vne,{"data-slot":"button",className:vn(sre({variant:t,size:n,className:e})),...r})}const are=()=>{const e=fte(),t=e?.name,n=e?.version,[,r]=e_();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(sh,{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(Rte,{className:"h-3.5 w-3.5"})]})})})]})})},KN=k.createContext({});function lre(e){const t=k.useRef(null);return t.current===null&&(t.current=e()),t.current}const L_=typeof window<"u",cre=L_?k.useLayoutEffect:k.useEffect,F_=k.createContext(null);function U_(e,t){e.indexOf(t)===-1&&e.push(t)}function V_(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Ps=(e,t,n)=>n>t?t:n<e?e:n;let q_=()=>{};const Ns={},GN=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function ZN(e){return typeof e=="object"&&e!==null}const WN=e=>/^0[^.\s]+$/u.test(e);function B_(e){let t;return()=>(t===void 0&&(t=e()),t)}const oi=e=>e,ure=(e,t)=>n=>t(e(n)),Vh=(...e)=>e.reduce(ure),ah=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class H_{constructor(){this.subscriptions=[]}add(t){return U_(this.subscriptions,t),()=>V_(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 Ki=e=>e*1e3,ti=e=>e/1e3;function YN(e,t){return t?e*(1e3/t):0}const XN=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,fre=1e-7,dre=12;function hre(e,t,n,r,o){let s,l,c=0;do l=t+(n-t)/2,s=XN(l,r,o)-e,s>0?n=l:t=l;while(Math.abs(s)>fre&&++c<dre);return l}function qh(e,t,n,r){if(e===t&&n===r)return oi;const o=s=>hre(s,0,1,e,n);return s=>s===0||s===1?s:XN(o(s),t,r)}const QN=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,JN=e=>t=>1-e(1-t),eD=qh(.33,1.53,.69,.99),K_=JN(eD),tD=QN(K_),nD=e=>(e*=2)<1?.5*K_(e):.5*(2-Math.pow(2,-10*(e-1))),G_=e=>1-Math.sin(Math.acos(e)),rD=JN(G_),oD=QN(G_),pre=qh(.42,0,1,1),mre=qh(0,0,.58,1),iD=qh(.42,0,.58,1),gre=e=>Array.isArray(e)&&typeof e[0]!="number",sD=e=>Array.isArray(e)&&typeof e[0]=="number",yre={linear:oi,easeIn:pre,easeInOut:iD,easeOut:mre,circIn:G_,circInOut:oD,circOut:rD,backIn:K_,backInOut:tD,backOut:eD,anticipate:nD},vre=e=>typeof e=="string",Qk=e=>{if(sD(e)){q_(e.length===4);const[t,n,r,o]=e;return qh(t,n,r,o)}else if(vre(e))return yre[e];return e},lg=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function bre(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 Sre=40;function aD(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,l=lg.reduce((C,S)=>(C[S]=bre(s),C),{}),{setup:c,read:u,resolveKeyframes:d,preUpdate:h,update:p,preRender:g,render:b,postRender:y}=l,_=()=>{const C=Ns.useManualTiming?o.timestamp:performance.now();n=!1,Ns.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(C-o.timestamp,Sre),1)),o.timestamp=C,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(_))},x=()=>{n=!0,r=!0,o.isProcessing||e(_)};return{schedule:lg.reduce((C,S)=>{const T=l[S];return C[S]=(E,O=!1,M=!1)=>(n||x(),T.schedule(E,O,M)),C},{}),cancel:C=>{for(let S=0;S<lg.length;S++)l[lg[S]].cancel(C)},state:o,steps:l}}const{schedule:Zn,cancel:Ba,state:Fr,steps:v1}=aD(typeof requestAnimationFrame<"u"?requestAnimationFrame:oi,!0);let Dg;function wre(){Dg=void 0}const yo={now:()=>(Dg===void 0&&yo.set(Fr.isProcessing||Ns.useManualTiming?Fr.timestamp:performance.now()),Dg),set:e=>{Dg=e,queueMicrotask(wre)}},lD=e=>t=>typeof t=="string"&&t.startsWith(e),cD=lD("--"),xre=lD("var(--"),Z_=e=>xre(e)?_re.test(e.split("/*")[0].trim()):!1,_re=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Jk(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const pf={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},lh={...pf,transform:e=>Ps(0,1,e)},cg={...pf,default:1},zd=e=>Math.round(e*1e5)/1e5,W_=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ere(e){return e==null}const Cre=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Y_=(e,t)=>n=>!!(typeof n=="string"&&Cre.test(n)&&n.startsWith(e)||t&&!Ere(n)&&Object.prototype.hasOwnProperty.call(n,t)),uD=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,s,l,c]=r.match(W_);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(l),alpha:c!==void 0?parseFloat(c):1}},Tre=e=>Ps(0,255,e),b1={...pf,transform:e=>Math.round(Tre(e))},ql={test:Y_("rgb","red"),parse:uD("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+b1.transform(e)+", "+b1.transform(t)+", "+b1.transform(n)+", "+zd(lh.transform(r))+")"};function Rre(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 yw={test:Y_("#"),parse:Rre,transform:ql.transform},Bh=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),wa=Bh("deg"),Gi=Bh("%"),Ye=Bh("px"),Ore=Bh("vh"),Are=Bh("vw"),e5={...Gi,parse:e=>Gi.parse(e)/100,transform:e=>Gi.transform(e*100)},gu={test:Y_("hsl","hue"),parse:uD("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Gi.transform(zd(t))+", "+Gi.transform(zd(n))+", "+zd(lh.transform(r))+")"},yr={test:e=>ql.test(e)||yw.test(e)||gu.test(e),parse:e=>ql.test(e)?ql.parse(e):gu.test(e)?gu.parse(e):yw.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ql.transform(e):gu.transform(e),getAnimatableNone:e=>{const t=yr.parse(e);return t.alpha=0,yr.transform(t)}},kre=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Mre(e){return isNaN(e)&&typeof e=="string"&&(e.match(W_)?.length||0)+(e.match(kre)?.length||0)>0}const fD="number",dD="color",jre="var",Pre="var(",t5="${}",Nre=/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 ch(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const c=t.replace(Nre,u=>(yr.test(u)?(r.color.push(s),o.push(dD),n.push(yr.parse(u))):u.startsWith(Pre)?(r.var.push(s),o.push(jre),n.push(u)):(r.number.push(s),o.push(fD),n.push(parseFloat(u))),++s,t5)).split(t5);return{values:n,split:c,indexes:r,types:o}}function hD(e){return ch(e).values}function pD(e){const{split:t,types:n}=ch(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===fD?s+=zd(o[l]):c===dD?s+=yr.transform(o[l]):s+=o[l]}return s}}const Dre=e=>typeof e=="number"?0:yr.test(e)?yr.getAnimatableNone(e):e;function $re(e){const t=hD(e);return pD(e)(t.map(Dre))}const Ha={test:Mre,parse:hD,createTransformer:pD,getAnimatableNone:$re};function S1(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 Ire({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=S1(u,c,e+1/3),s=S1(u,c,e),l=S1(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 Yn=(e,t,n)=>e+(t-e)*n,w1=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},zre=[yw,ql,gu],Lre=e=>zre.find(t=>t.test(e));function n5(e){const t=Lre(e);if(!t)return!1;let n=t.parse(e);return t===gu&&(n=Ire(n)),n}const r5=(e,t)=>{const n=n5(e),r=n5(t);if(!n||!r)return my(e,t);const o={...n};return s=>(o.red=w1(n.red,r.red,s),o.green=w1(n.green,r.green,s),o.blue=w1(n.blue,r.blue,s),o.alpha=Yn(n.alpha,r.alpha,s),ql.transform(o))},vw=new Set(["none","hidden"]);function Fre(e,t){return vw.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Ure(e,t){return n=>Yn(e,t,n)}function X_(e){return typeof e=="number"?Ure:typeof e=="string"?Z_(e)?my:yr.test(e)?r5:Bre:Array.isArray(e)?mD:typeof e=="object"?yr.test(e)?r5:Vre:my}function mD(e,t){const n=[...e],r=n.length,o=e.map((s,l)=>X_(s)(s,t[l]));return s=>{for(let l=0;l<r;l++)n[l]=o[l](s);return n}}function Vre(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=X_(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function qre(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 Bre=(e,t)=>{const n=Ha.createTransformer(t),r=ch(e),o=ch(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?vw.has(e)&&!o.values.length||vw.has(t)&&!r.values.length?Fre(e,t):Vh(mD(qre(r,o),o.values),n):my(e,t)};function gD(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Yn(e,t,n):X_(e)(e,t)}const Hre=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Zn.update(t,n),stop:()=>Ba(t),now:()=>Fr.isProcessing?Fr.timestamp:yo.now()}},yD=(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 Q_(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 Kre(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(Q_(r),gy);return{type:"keyframes",ease:s=>r.next(o*s).value/t,duration:ti(o)}}const Gre=5;function vD(e,t,n){const r=Math.max(t-Gre,0);return YN(n-e(r),t-r)}const rr={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},x1=.001;function Zre({duration:e=rr.duration,bounce:t=rr.bounce,velocity:n=rr.velocity,mass:r=rr.mass}){let o,s,l=1-t;l=Ps(rr.minDamping,rr.maxDamping,l),e=Ps(rr.minDuration,rr.maxDuration,ti(e)),l<1?(o=d=>{const h=d*l,p=h*e,g=h-n,b=bw(d,l),y=Math.exp(-p);return x1-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),_=bw(Math.pow(d,2),l);return(-o(d)+x1>0?-1:1)*((g-b)*y)/_}):(o=d=>{const h=Math.exp(-d*e),p=(d-n)*e+1;return-x1+h*p},s=d=>{const h=Math.exp(-d*e),p=(n-d)*(e*e);return h*p});const c=5/e,u=Yre(o,s,c);if(e=Ki(e),isNaN(u))return{stiffness:rr.stiffness,damping:rr.damping,duration:e};{const d=Math.pow(u,2)*r;return{stiffness:d,damping:l*2*Math.sqrt(r*d),duration:e}}}const Wre=12;function Yre(e,t,n){let r=n;for(let o=1;o<Wre;o++)r=r-e(r)/t(r);return r}function bw(e,t){return e*Math.sqrt(1-t*t)}const Xre=["duration","bounce"],Qre=["stiffness","damping","mass"];function o5(e,t){return t.some(n=>e[n]!==void 0)}function Jre(e){let t={velocity:rr.velocity,stiffness:rr.stiffness,damping:rr.damping,mass:rr.mass,isResolvedFromDuration:!1,...e};if(!o5(e,Qre)&&o5(e,Xre))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,s=2*Ps(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:rr.mass,stiffness:o,damping:s}}else{const n=Zre(e);t={...t,...n,mass:rr.mass},t.isResolvedFromDuration=!0}return t}function yy(e=rr.visualDuration,t=rr.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}=Jre({...n,velocity:-ti(n.velocity||0)}),y=g||0,_=d/(2*Math.sqrt(u*h)),x=l-s,w=ti(Math.sqrt(u/h)),v=Math.abs(x)<5;r||(r=v?rr.restSpeed.granular:rr.restSpeed.default),o||(o=v?rr.restDelta.granular:rr.restDelta.default);let C;if(_<1){const T=bw(w,_);C=E=>{const O=Math.exp(-_*w*E);return l-O*((y+_*w*x)/T*Math.sin(T*E)+x*Math.cos(T*E))}}else if(_===1)C=T=>l-Math.exp(-w*T)*(x+(y+w*x)*T);else{const T=w*Math.sqrt(_*_-1);C=E=>{const O=Math.exp(-_*w*E),M=Math.min(T*E,300);return l-O*((y+_*w*x)*Math.sinh(M)+T*x*Math.cosh(M))/T}}const S={calculatedDuration:b&&p||null,next:T=>{const E=C(T);if(b)c.done=T>=p;else{let O=T===0?y:0;_<1&&(O=T===0?Ki(y):vD(C,T,E));const M=Math.abs(O)<=r,P=Math.abs(l-E)<=o;c.done=M&&P}return c.value=c.done?l:E,c},toString:()=>{const T=Math.min(Q_(S),gy),E=yD(O=>S.next(T*O).value,T,30);return T+"ms "+E},toTransition:()=>{}};return S}yy.applyToOptions=e=>{const t=Kre(e,100,yy);return e.ease=t.ease,e.duration=Ki(t.duration),e.type="keyframes",e};function Sw({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 x=p+_,w=l===void 0?x:l(x);w!==x&&(_=w-p);const v=M=>-_*Math.exp(-M/r),C=M=>w+v(M),S=M=>{const P=v(M),I=C(M);g.done=Math.abs(P)<=d,g.value=g.done?w:I};let T,E;const O=M=>{b(g.value)&&(T=M,E=yy({keyframes:[g.value,y(g.value)],velocity:vD(C,M,g.value),damping:o,stiffness:s,restDelta:d,restSpeed:h}))};return O(0),{calculatedDuration:null,next:M=>{let P=!1;return!E&&T===void 0&&(P=!0,S(M),O(M)),T!==void 0&&M>=T?E.next(M-T):(!P&&S(M),g)}}}function eoe(e,t,n){const r=[],o=n||Ns.mix||gD,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]||oi:t;c=Vh(u,c)}r.push(c)}return r}function toe(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(q_(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=eoe(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=ah(e[p],e[p+1],h);return c[p](g)};return n?h=>d(Ps(e[0],e[s-1],h)):d}function noe(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=ah(0,t,r);e.push(Yn(n,1,o))}}function roe(e){const t=[0];return noe(t,e.length-1),t}function ooe(e,t){return e.map(n=>n*t)}function ioe(e,t){return e.map(()=>t||iD).splice(0,e.length-1)}function Ld({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=gre(r)?r.map(Qk):Qk(r),s={done:!1,value:t[0]},l=ooe(n&&n.length===t.length?n:roe(t),e),c=toe(l,t,{ease:Array.isArray(o)?o:ioe(t,o)});return{calculatedDuration:e,next:u=>(s.value=c(u),s.done=u>=e,s)}}const soe=e=>e!==null;function J_(e,{repeat:t,repeatType:n="loop"},r,o=1){const s=e.filter(soe),c=o<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!c||r===void 0?s[c]:r}const aoe={decay:Sw,inertia:Sw,tween:Ld,keyframes:Ld,spring:yy};function bD(e){typeof e.type=="string"&&(e.type=aoe[e.type])}class eE{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 loe=e=>e/100;class tE extends eE{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!==yo.now()&&this.tick(yo.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;bD(t);const{type:n=Ld,repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:l=0}=t;let{keyframes:c}=t;const u=n||Ld;u!==Ld&&typeof c[0]!="number"&&(this.mixKeyframes=Vh(loe,gD(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=Q_(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:x}=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 w=this.currentTime-d*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?w<0:w>o;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let C=this.currentTime,S=r;if(p){const M=Math.min(this.currentTime,o)/c;let P=Math.floor(M),I=M%1;!I&&M>=1&&(I=1),I===1&&P--,P=Math.min(P,p+1),P%2&&(g==="reverse"?(I=1-I,b&&(I-=b/c)):g==="mirror"&&(S=l)),C=Ps(0,1,I)*c}const T=v?{done:!1,value:h[0]}:S.next(C);s&&(T.value=s(T.value));let{done:E}=T;!v&&u!==null&&(E=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const O=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return O&&y!==Sw&&(T.value=J_(h,this.options,x,this.speed)),_&&_(T.value),O&&this.finish(),T}then(t,n){return this.finished.then(t,n)}get duration(){return ti(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ti(t)}get time(){return ti(this.currentTime)}set time(t){t=Ki(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(yo.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=ti(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Hre,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(yo.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 coe(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Bl=e=>e*180/Math.PI,ww=e=>{const t=Bl(Math.atan2(e[1],e[0]));return xw(t)},uoe={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ww,rotateZ:ww,skewX:e=>Bl(Math.atan(e[1])),skewY:e=>Bl(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},xw=e=>(e=e%360,e<0&&(e+=360),e),i5=ww,s5=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),a5=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),foe={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:s5,scaleY:a5,scale:e=>(s5(e)+a5(e))/2,rotateX:e=>xw(Bl(Math.atan2(e[6],e[5]))),rotateY:e=>xw(Bl(Math.atan2(-e[2],e[0]))),rotateZ:i5,rotate:i5,skewX:e=>Bl(Math.atan(e[4])),skewY:e=>Bl(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function _w(e){return e.includes("scale")?1:0}function Ew(e,t){if(!e||e==="none")return _w(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=foe,o=n;else{const c=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=uoe,o=c}if(!o)return _w(t);const s=r[t],l=o[1].split(",").map(hoe);return typeof s=="function"?s(l):l[s]}const doe=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Ew(n,t)};function hoe(e){return parseFloat(e.trim())}const mf=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],gf=new Set(mf),l5=e=>e===pf||e===Ye,poe=new Set(["x","y","z"]),moe=mf.filter(e=>!poe.has(e));function goe(e){const t=[];return moe.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Ta={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})=>Ew(t,"x"),y:(e,{transform:t})=>Ew(t,"y")};Ta.translateX=Ta.x;Ta.translateY=Ta.y;const Gl=new Set;let Cw=!1,Tw=!1,Rw=!1;function SD(){if(Tw){const e=Array.from(Gl).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=goe(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)})}Tw=!1,Cw=!1,Gl.forEach(e=>e.complete(Rw)),Gl.clear()}function wD(){Gl.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Tw=!0)})}function yoe(){Rw=!0,wD(),SD(),Rw=!1}class nE{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?(Gl.add(this),Cw||(Cw=!0,Zn.read(wD),Zn.resolveKeyframes(SD))):(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])}coe(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Gl.delete(this)}cancel(){this.state==="scheduled"&&(Gl.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const voe=e=>e.startsWith("--");function boe(e,t,n){voe(t)?e.style.setProperty(t,n):e.style[t]=n}const Soe=B_(()=>window.ScrollTimeline!==void 0),woe={};function xoe(e,t){const n=B_(e);return()=>woe[t]??n()}const xD=xoe(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Od=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,c5={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Od([0,.65,.55,1]),circOut:Od([.55,0,1,.45]),backIn:Od([.31,.01,.66,-.59]),backOut:Od([.33,1.53,.69,.99])};function _D(e,t){if(e)return typeof e=="function"?xD()?yD(e,t):"ease-out":sD(e)?Od(e):Array.isArray(e)?e.map(n=>_D(n,t)||c5.easeOut):c5[e]}function _oe(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=_D(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 ED(e){return typeof e=="function"&&"applyToOptions"in e}function Eoe({type:e,...t}){return ED(e)&&xD()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Coe extends eE{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!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,q_(typeof t.type!="string");const d=Eoe(t);this.animation=_oe(n,r,o,d,s),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const h=J_(o,this.options,c,this.speed);this.updateMotionValue?this.updateMotionValue(h):boe(n,r,h),this.animation.cancel()}u?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state: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 ti(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ti(t)}get time(){return ti(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Ki(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 Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&Soe()?(this.animation.timeline=t,oi):n(this)}}const CD={anticipate:nD,backInOut:tD,circInOut:oD};function Toe(e){return e in CD}function Roe(e){typeof e.ease=="string"&&Toe(e.ease)&&(e.ease=CD[e.ease])}const u5=10;class Ooe extends Coe{constructor(t){Roe(t),bD(t),super(t),t.startTime&&(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 tE({...l,autoplay:!1}),u=Ki(this.finishedTime??this.time);n.setWithVelocity(c.sample(u-u5).value,c.sample(u).value,u5),c.stop()}}const f5=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ha.test(e)||e==="0")&&!e.startsWith("url("));function Aoe(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 koe(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:Aoe(e)||(n==="spring"||ED(n))&&r}function Ow(e){e.duration=0,e.type="keyframes"}const Moe=new Set(["opacity","clipPath","filter","transform"]),joe=B_(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Poe(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 joe()&&n&&Moe.has(n)&&(n!=="transform"||!d)&&!u&&!r&&o!=="mirror"&&s!==0&&l!=="inertia"}const Noe=40;class Doe extends eE{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=yo.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||nE;this.keyframeResolver=new b(c,(y,_,x)=>this.onKeyframesResolved(y,_,g,!x),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=yo.now(),koe(t,s,l,c)||((Ns.instantAnimations||!u)&&h?.(J_(t,r,n)),t[0]=t[t.length-1],Ow(r),r.repeat=0);const g={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>Noe?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},b=!d&&Poe(g)?new Ooe({...g,element:g.motionValue.owner.current}):new tE(g);b.finished.then(()=>this.notifyFinished()).catch(oi),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(),yoe()),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 $oe=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ioe(e){const t=$oe.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}function TD(e,t,n=1){const[r,o]=Ioe(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const l=s.trim();return GN(l)?parseFloat(l):l}return Z_(o)?TD(o,t,n+1):o}function rE(e,t){return e?.[t]??e?.default??e}const RD=new Set(["width","height","top","left","right","bottom",...mf]),zoe={test:e=>e==="auto",parse:e=>e},OD=e=>t=>t.test(e),AD=[pf,Ye,Gi,wa,Are,Ore,zoe],d5=e=>AD.find(OD(e));function Loe(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||WN(e):!0}const Foe=new Set(["brightness","contrast","saturate","opacity"]);function Uoe(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(W_)||[];if(!r)return e;const o=n.replace(r,"");let s=Foe.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const Voe=/\b([a-z-]*)\(.*?\)/gu,Aw={...Ha,getAnimatableNone:e=>{const t=e.match(Voe);return t?t.map(Uoe).join(" "):e}},h5={...pf,transform:Math.round},qoe={rotate:wa,rotateX:wa,rotateY:wa,rotateZ:wa,scale:cg,scaleX:cg,scaleY:cg,scaleZ:cg,skew:wa,skewX:wa,skewY:wa,distance:Ye,translateX:Ye,translateY:Ye,translateZ:Ye,x:Ye,y:Ye,z:Ye,perspective:Ye,transformPerspective:Ye,opacity:lh,originX:e5,originY:e5,originZ:Ye},oE={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,...qoe,zIndex:h5,fillOpacity:lh,strokeOpacity:lh,numOctaves:h5},Boe={...oE,color:yr,backgroundColor:yr,outlineColor:yr,fill:yr,stroke:yr,borderColor:yr,borderTopColor:yr,borderRightColor:yr,borderBottomColor:yr,borderLeftColor:yr,filter:Aw,WebkitFilter:Aw},kD=e=>Boe[e];function MD(e,t){let n=kD(e);return n!==Aw&&(n=Ha),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Hoe=new Set(["auto","none","0"]);function Koe(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!Hoe.has(s)&&ch(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=MD(n,o)}class Goe extends nE{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(),Z_(p))){const g=TD(p,n.current);g!==void 0&&(t[h]=g),h===t.length-1&&(this.finalKeyframe=p)}}if(this.resolveNoneKeyframes(),!RD.has(r)||t.length!==2)return;const[o,s]=t,l=d5(o),c=d5(s),u=Jk(o),d=Jk(s);if(u!==d&&Ta[r]){this.needsMeasurement=!0;return}if(l!==c)if(l5(l)&&l5(c))for(let h=0;h<t.length;h++){const p=t[h];typeof p=="string"&&(t[h]=parseFloat(p))}else Ta[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||Loe(t[o]))&&r.push(o);r.length&&Koe(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=Ta[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]=Ta[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 Zoe(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 jD=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Woe(e){return ZN(e)&&"offsetHeight"in e}const p5=30,Yoe=e=>!isNaN(parseFloat(e));class Xoe{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const o=yo.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=yo.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Yoe(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 H_);const r=this.events[t].add(n);return t==="change"?()=>{r(),Zn.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=yo.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>p5)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,p5);return YN(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 qu(e,t){return new Xoe(e,t)}const{schedule:iE}=aD(queueMicrotask,!1),_i={x:!1,y:!1};function PD(){return _i.x||_i.y}function Qoe(e){return e==="x"||e==="y"?_i[e]?null:(_i[e]=!0,()=>{_i[e]=!1}):_i.x||_i.y?null:(_i.x=_i.y=!0,()=>{_i.x=_i.y=!1})}function ND(e,t){const n=Zoe(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function m5(e){return!(e.pointerType==="touch"||PD())}function Joe(e,t,n={}){const[r,o,s]=ND(e,n),l=c=>{if(!m5(c))return;const{target:u}=c,d=t(u,c);if(typeof d!="function"||!u)return;const h=p=>{m5(p)&&(d(p),u.removeEventListener("pointerleave",h))};u.addEventListener("pointerleave",h,o)};return r.forEach(c=>{c.addEventListener("pointerenter",l,o)}),s}const DD=(e,t)=>t?e===t?!0:DD(e,t.parentElement):!1,sE=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,eie=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function $D(e){return eie.has(e.tagName)||e.isContentEditable===!0}const $g=new WeakSet;function g5(e){return t=>{t.key==="Enter"&&e(t)}}function _1(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const tie=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=g5(()=>{if($g.has(n))return;_1(n,"down");const o=g5(()=>{_1(n,"up")}),s=()=>_1(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 y5(e){return sE(e)&&!PD()}function nie(e,t,n={}){const[r,o,s]=ND(e,n),l=c=>{const u=c.currentTarget;if(!y5(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),y5(b)&&typeof d=="function"&&d(b,{success:y})},p=b=>{h(b,u===window||u===document||n.useGlobalTarget||DD(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),Woe(c)&&(c.addEventListener("focus",d=>tie(d,o)),!$D(c)&&!c.hasAttribute("tabindex")&&(c.tabIndex=0))}),s}function ID(e){return ZN(e)&&"ownerSVGElement"in e}function rie(e){return ID(e)&&e.tagName==="svg"}const Xr=e=>!!(e&&e.getVelocity),oie=[...AD,yr,Ha],iie=e=>oie.find(OD(e)),zD=k.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function sie(e=!0){const t=k.useContext(F_);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 LD=k.createContext({strict:!1}),v5={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"]},Bu={};for(const e in v5)Bu[e]={isEnabled:t=>v5[e].some(n=>!!t[n])};function aie(e){for(const t in e)Bu[t]={...Bu[t],...e[t]}}const lie=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 vy(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||lie.has(e)}let FD=e=>!vy(e);function cie(e){typeof e=="function"&&(FD=t=>t.startsWith("on")?!vy(t):e(t))}try{cie(require("@emotion/is-prop-valid").default)}catch{}function uie(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(FD(o)||n===!0&&vy(o)||!t&&!vy(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}const p0=k.createContext({});function m0(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function uh(e){return typeof e=="string"||Array.isArray(e)}const aE=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],lE=["initial",...aE];function g0(e){return m0(e.animate)||lE.some(t=>uh(e[t]))}function UD(e){return!!(g0(e)||e.variants)}function fie(e,t){if(g0(e)){const{initial:n,animate:r}=e;return{initial:n===!1||uh(n)?n:void 0,animate:uh(r)?r:void 0}}return e.inherit!==!1?t:{}}function die(e){const{initial:t,animate:n}=fie(e,k.useContext(p0));return k.useMemo(()=>({initial:t,animate:n}),[b5(t),b5(n)])}function b5(e){return Array.isArray(e)?e.join(" "):e}function S5(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Sd={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ye.test(e))e=parseFloat(e);else return e;const n=S5(e,t.target.x),r=S5(e,t.target.y);return`${n}% ${r}%`}},hie={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Ha.parse(e);if(o.length>5)return r;const s=Ha.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=Yn(c,u,.5);return typeof o[2+l]=="number"&&(o[2+l]/=d),typeof o[3+l]=="number"&&(o[3+l]/=d),s(o)}},kw={borderRadius:{...Sd,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Sd,borderTopRightRadius:Sd,borderBottomLeftRadius:Sd,borderBottomRightRadius:Sd,boxShadow:hie};function VD(e,{layout:t,layoutId:n}){return gf.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!kw[e]||e==="opacity")}const pie={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},mie=mf.length;function gie(e,t,n){let r="",o=!0;for(let s=0;s<mie;s++){const l=mf[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=jD(c,oE[l]);if(!u){o=!1;const h=pie[l]||l;r+=`${h}(${d}) `}n&&(t[l]=d)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function cE(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(gf.has(u)){l=!0;continue}else if(cD(u)){o[u]=d;continue}else{const h=jD(d,oE[u]);u.startsWith("origin")?(c=!0,s[u]=h):r[u]=h}}if(t.transform||(l||n?r.transform=gie(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}`}}const uE=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function qD(e,t,n){for(const r in t)!Xr(t[r])&&!VD(r,n)&&(e[r]=t[r])}function yie({transformTemplate:e},t){return k.useMemo(()=>{const n=uE();return cE(n,t,e),Object.assign({},n.vars,n.style)},[t])}function vie(e,t){const n=e.style||{},r={};return qD(r,n,e),Object.assign(r,yie(e,t)),r}function bie(e,t){const n={},r=vie(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 Sie={offset:"stroke-dashoffset",array:"stroke-dasharray"},wie={offset:"strokeDashoffset",array:"strokeDasharray"};function xie(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?Sie:wie;e[s.offset]=Ye.transform(-r);const l=Ye.transform(t),c=Ye.transform(n);e[s.array]=`${l} ${c}`}const _ie=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function BD(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:s=1,pathOffset:l=0,...c},u,d,h){if(cE(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 _ie)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&&xie(p,o,s,l,!1)}const HD=()=>({...uE(),attrs:{}}),KD=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Eie(e,t,n,r){const o=k.useMemo(()=>{const s=HD();return BD(s,t,KD(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};qD(s,e.style,e),o.style={...s,...o.style}}return o}const Cie=["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 fE(e){return typeof e!="string"||e.includes("-")?!1:!!(Cie.indexOf(e)>-1||/[A-Z]/u.test(e))}function Tie(e,t,n,{latestValues:r},o,s=!1,l){const u=(l??fE(e)?Eie:bie)(t,r,o,e),d=uie(t,typeof e=="string",s),h=e!==k.Fragment?{...d,...u,ref:n}:{},{children:p}=t,g=k.useMemo(()=>Xr(p)?p.get():p,[p]);return k.createElement(e,{...h,children:g})}function w5(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function dE(e,t,n,r){if(typeof t=="function"){const[o,s]=w5(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]=w5(r);t=t(n!==void 0?n:e.custom,o,s)}return t}function Ig(e){return Xr(e)?e.get():e}function Rie({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:Oie(n,r,o,e),renderState:t()}}function Oie(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=UD(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=dE(e,g[b]);if(y){const{transitionEnd:_,transition:x,...w}=y;for(const v in w){let C=w[v];if(Array.isArray(C)){const S=h?C.length-1:0;C=C[S]}C!==null&&(o[v]=C)}for(const v in _)o[v]=_[v]}}}return o}const GD=e=>(t,n)=>{const r=k.useContext(p0),o=k.useContext(F_),s=()=>Rie(e,t,r,o);return n?s():lre(s)};function hE(e,t,n){const{style:r}=e,o={};for(const s in r)(Xr(r[s])||t.style&&Xr(t.style[s])||VD(s,e)||n?.getValue(s)?.liveStyle!==void 0)&&(o[s]=r[s]);return o}const Aie=GD({scrapeMotionValuesFromProps:hE,createRenderState:uE});function ZD(e,t,n){const r=hE(e,t,n);for(const o in e)if(Xr(e[o])||Xr(t[o])){const s=mf.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}const kie=GD({scrapeMotionValuesFromProps:ZD,createRenderState:HD}),Mie=Symbol.for("motionComponentSymbol");function jie(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 pE=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Pie="framerAppearId",WD="data-"+pE(Pie),YD=k.createContext({});function Ad(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Nie(e,t,n,r,o,s){const{visualElement:l}=k.useContext(p0),c=k.useContext(LD),u=k.useContext(F_),d=k.useContext(zD).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(YD);p&&!p.projection&&o&&(p.type==="html"||p.type==="svg")&&Die(h.current,n,o,g);const b=k.useRef(!1);k.useInsertionEffect(()=>{p&&b.current&&p.update(n,u)});const y=n[WD],_=k.useRef(!!y&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return cre(()=>{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 Die(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:XD(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!l||c&&Ad(c),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:h,layoutScroll:u,layoutRoot:d})}function XD(e){if(e)return e.options.allowProjection!==!1?e.projection:XD(e.parent)}function E1(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&aie(r);const s=n?n==="svg":fE(e),l=s?kie:Aie;function c(d,h){let p;const g={...k.useContext(zD),...d,layoutId:$ie(d)},{isStatic:b}=g,y=die(d),_=l(d,b);if(!b&&L_){Iie();const x=zie(g);p=x.MeasureLayout,y.visualElement=Nie(e,_,g,o,x.ProjectionNode,s)}return j.jsxs(p0.Provider,{value:y,children:[p&&y.visualElement?j.jsx(p,{visualElement:y.visualElement,...g}):null,Tie(e,d,jie(_,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[Mie]=e,u}function $ie({layoutId:e}){const t=k.useContext(KN).id;return t&&e!==void 0?t+"-"+e:e}function Iie(e,t){k.useContext(LD).strict}function zie(e){const{drag:t,layout:n}=Bu;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function Lie(e,t){if(typeof Proxy>"u")return E1;const n=new Map,r=(s,l)=>E1(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,E1(l,void 0,e,t)),n.get(l))})}function QD({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Fie({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Uie(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 C1(e){return e===void 0||e===1}function Mw({scale:e,scaleX:t,scaleY:n}){return!C1(e)||!C1(t)||!C1(n)}function Ll(e){return Mw(e)||JD(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function JD(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 jw(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 e$(e,{x:t,y:n}){jw(e.x,t.translate,t.scale,t.originPoint),jw(e.y,n.translate,n.scale,n.originPoint)}const E5=.999999999999,C5=1.0000000000001;function Vie(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&&vu(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,e$(e,l)),r&&Ll(s.latestValues)&&vu(e,s.latestValues))}t.x<C5&&t.x>E5&&(t.x=1),t.y<C5&&t.y>E5&&(t.y=1)}function yu(e,t){e.min=e.min+t,e.max=e.max+t}function T5(e,t,n,r,o=.5){const s=Yn(e.min,e.max,o);jw(e,t,n,s,r)}function vu(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 t$(e,t){return QD(Uie(e.getBoundingClientRect(),t))}function qie(e,t,n){const r=t$(e,n),{scroll:o}=t;return o&&(yu(r.x,o.offset.x),yu(r.y,o.offset.y)),r}const R5=()=>({translate:0,scale:1,origin:0,originPoint:0}),bu=()=>({x:R5(),y:R5()}),O5=()=>({min:0,max:0}),Cr=()=>({x:O5(),y:O5()}),Pw={current:null},n$={current:!1};function Bie(){if(n$.current=!0,!!L_)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Pw.current=e.matches;e.addEventListener("change",t),t()}else Pw.current=!1}const Hie=new WeakMap;function Kie(e,t,n){for(const r in t){const o=t[r],s=n[r];if(Xr(o))e.addValue(r,o);else if(Xr(s))e.addValue(r,qu(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,qu(l!==void 0?l:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const A5=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Gie{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=nE,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=yo.now();this.renderScheduledAt<g&&(this.renderScheduledAt=g,Zn.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=UD(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&&Xr(b)&&b.set(u[g])}}mount(t){this.current=t,Hie.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:(n$.current||Bie(),this.shouldReduceMotion=Pw.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Ba(this.notifyUpdate),Ba(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=gf.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&Zn.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;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 Bu){const n=Bu[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):Cr()}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<A5.length;r++){const o=A5[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=Kie(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=qu(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"&&(GN(r)||WN(r))?r=parseFloat(r):!iie(r)&&Ha.test(n)&&(r=MD(t,n)),this.setBaseTarget(t,Xr(r)?r.get():r)),Xr(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=dE(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&&!Xr(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 H_),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){iE.render(this.render)}}class r$ extends Gie{constructor(){super(...arguments),this.KeyframeResolver=Goe}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[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;Xr(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function o$(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 Zie(e){return window.getComputedStyle(e)}class Wie extends r${constructor(){super(...arguments),this.type="html",this.renderInstance=o$}readValueFromInstance(t,n){if(gf.has(n))return this.projection?.isProjecting?_w(n):doe(t,n);{const r=Zie(t),o=(cD(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return t$(t,n)}build(t,n,r){cE(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return hE(t,n,r)}}const i$=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Yie(e,t,n,r){o$(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(i$.has(o)?o:pE(o),t.attrs[o])}class Xie extends r${constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Cr}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(gf.has(n)){const r=kD(n);return r&&r.default||0}return n=i$.has(n)?n:pE(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return ZD(t,n,r)}build(t,n,r){BD(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){Yie(t,n,r,o)}mount(t){this.isSVGTag=KD(t.tagName),super.mount(t)}}const Qie=(e,t)=>t.isSVG??fE(e)?new Xie(t):new Wie(t,{allowProjection:e!==k.Fragment});function Cu(e,t,n){const r=e.getProps();return dE(r,t,n!==void 0?n:r.custom,e)}const Nw=e=>Array.isArray(e);function Jie(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,qu(n))}function ese(e){return Nw(e)?e[e.length-1]||0:e}function tse(e,t){const n=Cu(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const l in s){const c=ese(s[l]);Jie(e,l,c)}}function nse(e){return!!(Xr(e)&&e.add)}function Dw(e,t){const n=e.getValue("willChange");if(nse(n))return n.add(t);if(!n&&Ns.WillChange){const r=new Ns.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function s$(e){return e.props[WD]}const rse=e=>e!==null;function ose(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(rse),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[s]}const ise={type:"spring",stiffness:500,damping:25,restSpeed:10},sse=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),ase={type:"keyframes",duration:.8},lse={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},cse=(e,{keyframes:t})=>t.length>2?ase:gf.has(e)?e.startsWith("scale")?sse(t[1]):ise:lse;function use({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 mE=(e,t,n,r={},o,s)=>l=>{const c=rE(r,e)||{},u=c.delay||r.delay||0;let{elapsed:d=0}=r;d=d-Ki(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};use(c)||Object.assign(h,cse(e,h)),h.duration&&(h.duration=Ki(h.duration)),h.repeatDelay&&(h.repeatDelay=Ki(h.repeatDelay)),h.from!==void 0&&(h.keyframes[0]=h.from);let p=!1;if((h.type===!1||h.duration===0&&!h.repeatDelay)&&(Ow(h),h.delay===0&&(p=!0)),(Ns.instantAnimations||Ns.skipAnimations)&&(p=!0,Ow(h),h.delay=0),h.allowFlatten=!c.type&&!c.ease,p&&!s&&t.get()!==void 0){const g=ose(h.keyframes,c);if(g!==void 0){Zn.update(()=>{h.onUpdate(g),h.onComplete()});return}}return c.isSync?new tE(h):new Doe(h)};function fse({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function a$(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&&fse(d,h))continue;const b={delay:n,...rE(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 w=s$(e);if(w){const v=window.MotionHandoffAnimation(w,h,Zn);v!==null&&(b.startTime=v,_=!0)}}Dw(e,h),p.start(mE(h,p,g,e.shouldReduceMotion&&RD.has(h)?{type:!1}:b,e,_));const x=p.animation;x&&u.push(x)}return l&&Promise.all(u).then(()=>{Zn.update(()=>{l&&tse(e,l)})}),u}function l$(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}function $w(e,t,n={}){const r=Cu(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(a$(e,r,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:h,staggerDirection:p}=o;return dse(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 dse(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)+l$(e.variantChildren,u,r,o,s)}).then(()=>u.notify("AnimationComplete",t)));return Promise.all(c)}function hse(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"?Cu(e,t,n.custom):t;r=Promise.all(a$(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function c$(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 pse=lE.length;function u$(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?u$(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<pse;n++){const r=lE[n],o=e.props[r];(uh(o)||o===!1)&&(t[r]=o)}return t}const mse=[...aE].reverse(),gse=aE.length;function yse(e){return t=>Promise.all(t.map(({animation:n,options:r})=>hse(e,n,r)))}function vse(e){let t=yse(e),n=k5(),r=!0;const o=u=>(d,h)=>{const p=Cu(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=u$(e.parent)||{},p=[],g=new Set;let b={},y=1/0;for(let x=0;x<gse;x++){const w=mse[x],v=n[w],C=d[w]!==void 0?d[w]:h[w],S=uh(C),T=w===u?v.isActive:null;T===!1&&(y=x);let E=C===h[w]&&C!==d[w]&&S;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),v.protectedKeys={...b},!v.isActive&&T===null||!C&&!v.prevProp||m0(C)||typeof C=="boolean")continue;const O=bse(v.prevProp,C);let M=O||w===u&&v.isActive&&!E&&S||x>y&&S,P=!1;const I=Array.isArray(C)?C:[C];let z=I.reduce(o(w),{});T===!1&&(z={});const{prevResolvedValues:U={}}=v,G={...U,...z},J=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=z[H],oe=U[H];if(b.hasOwnProperty(H))continue;let ne=!1;Nw(Y)&&Nw(oe)?ne=!c$(Y,oe):ne=Y!==oe,ne?Y!=null?J(H):g.add(H):Y!==void 0&&g.has(H)?J(H):v.protectedKeys[H]=!0}v.prevProp=C,v.prevResolvedValues=z,v.isActive&&(b={...b,...z}),r&&e.blockInitialAnimation&&(M=!1);const ee=E&&O;M&&(!ee||P)&&p.push(...I.map(H=>{const Y={type:w};if(typeof H=="string"&&r&&!ee&&e.manuallyAnimateOnMount&&e.parent){const{parent:oe}=e,ne=Cu(oe,H);if(oe.enteringChildren&&ne){const{delayChildren:$}=ne.transition||{};Y.delay=l$(oe.enteringChildren,e,$)}}return{animation:H,options:Y}}))}if(g.size){const x={};if(typeof d.initial!="boolean"){const w=Cu(e,Array.isArray(d.initial)?d.initial[0]:d.initial);w&&w.transition&&(x.transition=w.transition)}g.forEach(w=>{const v=e.getBaseTarget(w),C=e.getValue(w);C&&(C.liveStyle=!0),x[w]=v??null}),p.push({animation:x})}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=k5()}}}function bse(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!c$(t,e):!1}function Dl(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function k5(){return{animate:Dl(!0),whileInView:Dl(),whileHover:Dl(),whileTap:Dl(),whileDrag:Dl(),whileFocus:Dl(),exit:Dl()}}class nl{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Sse extends nl{constructor(t){super(t),t.animationState||(t.animationState=vse(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 wse=0;class xse extends nl{constructor(){super(...arguments),this.id=wse++}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 _se={animation:{Feature:Sse},exit:{Feature:xse}};function fh(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Hh(e){return{point:{x:e.pageX,y:e.pageY}}}const Ese=e=>t=>sE(t)&&e(t,Hh(t));function Fd(e,t,n,r){return fh(e,t,Ese(n),r)}const f$=1e-4,Cse=1-f$,Tse=1+f$,d$=.01,Rse=0-d$,Ose=0+d$;function ao(e){return e.max-e.min}function Ase(e,t,n){return Math.abs(e-t)<=n}function M5(e,t,n,r=.5){e.origin=r,e.originPoint=Yn(t.min,t.max,e.origin),e.scale=ao(n)/ao(t),e.translate=Yn(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Cse&&e.scale<=Tse||isNaN(e.scale))&&(e.scale=1),(e.translate>=Rse&&e.translate<=Ose||isNaN(e.translate))&&(e.translate=0)}function Ud(e,t,n,r){M5(e.x,t.x,n.x,r?r.originX:void 0),M5(e.y,t.y,n.y,r?r.originY:void 0)}function j5(e,t,n){e.min=n.min+t.min,e.max=e.min+ao(t)}function kse(e,t,n){j5(e.x,t.x,n.x),j5(e.y,t.y,n.y)}function P5(e,t,n){e.min=t.min-n.min,e.max=e.min+ao(t)}function Sy(e,t,n){P5(e.x,t.x,n.x),P5(e.y,t.y,n.y)}function Xo(e){return[e("x"),e("y")]}const h$=({current:e})=>e?e.ownerDocument.defaultView:null,N5=(e,t)=>Math.abs(e-t);function Mse(e,t){const n=N5(e.x,t.x),r=N5(e.y,t.y);return Math.sqrt(n**2+r**2)}class p${constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:s=!1,distanceThreshold:l=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=R1(this.lastMoveEventInfo,this.history),b=this.startEvent!==null,y=Mse(g.offset,{x:0,y:0})>=this.distanceThreshold;if(!b&&!y)return;const{point:_}=g,{timestamp:x}=Fr;this.history.push({..._,timestamp:x});const{onStart:w,onMove:v}=this.handlers;b||(w&&w(this.lastMoveEvent,g),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,g)},this.handlePointerMove=(g,b)=>{this.lastMoveEvent=g,this.lastMoveEventInfo=T1(b,this.transformPagePoint),Zn.update(this.updatePoint,!0)},this.handlePointerUp=(g,b)=>{this.end();const{onEnd:y,onSessionEnd:_,resumeAnimation:x}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=R1(g.type==="pointercancel"?this.lastMoveEventInfo:T1(b,this.transformPagePoint),this.history);this.startEvent&&y&&y(g,w),_&&_(g,w)},!sE(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=l,this.contextWindow=o||window;const c=Hh(t),u=T1(c,this.transformPagePoint),{point:d}=u,{timestamp:h}=Fr;this.history=[{...d,timestamp:h}];const{onSessionStart:p}=n;p&&p(t,R1(u,this.history)),this.removeListeners=Vh(Fd(this.contextWindow,"pointermove",this.handlePointerMove),Fd(this.contextWindow,"pointerup",this.handlePointerUp),Fd(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ba(this.updatePoint)}}function T1(e,t){return t?{point:t(e.point)}:e}function D5(e,t){return{x:e.x-t.x,y:e.y-t.y}}function R1({point:e},t){return{point:e,delta:D5(e,m$(t)),offset:D5(e,jse(t)),velocity:Pse(t,.1)}}function jse(e){return e[0]}function m$(e){return e[e.length-1]}function Pse(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=m$(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Ki(t)));)n--;if(!r)return{x:0,y:0};const s=ti(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 Nse(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Yn(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Yn(n,e,r.max):Math.min(e,n)),e}function $5(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 Dse(e,{top:t,left:n,bottom:r,right:o}){return{x:$5(e.x,n,o),y:$5(e.y,t,r)}}function I5(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 $se(e,t){return{x:I5(e.x,t.x),y:I5(e.y,t.y)}}function Ise(e,t){let n=.5;const r=ao(e),o=ao(t);return o>r?n=ah(t.min,t.max-r,e.min):r>o&&(n=ah(e.min,e.max-o,t.min)),Ps(0,1,n)}function zse(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 Iw=.35;function Lse(e=Iw){return e===!1?e=0:e===!0&&(e=Iw),{x:z5(e,"left","right"),y:z5(e,"top","bottom")}}function z5(e,t,n){return{min:L5(e,t),max:L5(e,n)}}function L5(e,t){return typeof e=="number"?e:e[t]||0}const Fse=new WeakMap;class Use{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=Cr(),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(Hh(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=Qoe(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),Xo(w=>{let v=this.getAxisMotionValue(w).get()||0;if(Gi.test(v)){const{projection:C}=this.visualElement;if(C&&C.layout){const S=C.layout.layoutBox[w];S&&(v=ao(S)*(parseFloat(v)/100))}}this.originPoint[w]=v}),_&&Zn.postRender(()=>_(p,g)),Dw(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},c=(p,g)=>{this.latestPointerEvent=p,this.latestPanInfo=g;const{dragPropagation:b,dragDirectionLock:y,onDirectionLock:_,onDrag:x}=this.getProps();if(!b&&!this.openDragLock)return;const{offset:w}=g;if(y&&this.currentDirection===null){this.currentDirection=Vse(w),this.currentDirection!==null&&_&&_(this.currentDirection);return}this.updateAxis("x",g.point,w),this.updateAxis("y",g.point,w),this.visualElement.render(),x&&x(p,g)},u=(p,g)=>{this.latestPointerEvent=p,this.latestPanInfo=g,this.stop(p,g),this.latestPointerEvent=null,this.latestPanInfo=null},d=()=>Xo(p=>this.getAnimationState(p)==="paused"&&this.getAxisMotionValue(p).animation?.play()),{dragSnapToOrigin:h}=this.getProps();this.panSession=new p$(t,{onSessionStart:s,onStart:l,onMove:c,onSessionEnd:u,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:h,distanceThreshold:r,contextWindow:h$(this.visualElement)})}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&&Zn.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=Nse(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&&Ad(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=Dse(r.layoutBox,t):this.constraints=!1,this.elastic=Lse(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Xo(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=zse(r.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Ad(t))return!1;const r=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=qie(r,o.root,this.visualElement.getTransformPagePoint());let l=$se(o.layout.layoutBox,s);if(n){const c=n(Fie(l));this.hasMutatedConstraints=!!c,c&&(l=QD(c))}return l}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:l,onDragTransitionEnd:c}=this.getProps(),u=this.constraints||{},d=Xo(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(mE(t,r,0,n,this.visualElement,!1))}stopAnimation(){Xo(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Xo(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){Xo(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]-Yn(l,c,.5)+u)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Ad(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Xo(l=>{const c=this.getAxisMotionValue(l);if(c&&this.constraints!==!1){const u=c.get();o[l]=Ise({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(),Xo(l=>{if(!ug(l,t,null))return;const c=this.getAxisMotionValue(l),{min:u,max:d}=this.constraints[l];c.set(Yn(u,d,o[l]))})}addListeners(){if(!this.visualElement.current)return;Fse.set(this.visualElement,this);const t=this.visualElement.current,n=Fd(t,"pointerdown",u=>{const{drag:d,dragListener:h=!0}=this.getProps();d&&h&&!$D(u.target)&&this.start(u)}),r=()=>{const{dragConstraints:u}=this.getProps();Ad(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()),Zn.read(r);const l=fh(window,"resize",()=>this.scalePositionWithinConstraints()),c=o.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:d})=>{this.isDragging&&d&&(Xo(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=Iw,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 Vse(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class qse extends nl{constructor(t){super(t),this.removeGroupControls=oi,this.removeListeners=oi,this.controls=new Use(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||oi}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 F5=e=>(t,n)=>{e&&Zn.postRender(()=>e(t,n))};class Bse extends nl{constructor(){super(...arguments),this.removePointerDownListener=oi}onPointerDown(t){this.session=new p$(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:h$(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:F5(t),onStart:F5(n),onMove:r,onEnd:(s,l)=>{delete this.session,o&&Zn.postRender(()=>o(s,l))}}}mount(){this.removePointerDownListener=Fd(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const zg={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let O1=!1;class Hse 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),O1&&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,O1=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==s?l.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?l.promote():l.relegate()||Zn.postRender(()=>{const c=l.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),iE.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;O1=!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 g$(e){const[t,n]=sie(),r=k.useContext(KN);return j.jsx(Hse,{...e,layoutGroup:r,switchLayoutGroup:k.useContext(YD),isPresent:t,safeToRemove:n})}function Kse(e,t,n){const r=Xr(e)?e:qu(e);return r.start(mE("",r,t,n)),r.animation}const Gse=(e,t)=>e.depth-t.depth;class Zse{constructor(){this.children=[],this.isDirty=!1}add(t){U_(this.children,t),this.isDirty=!0}remove(t){V_(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Gse),this.isDirty=!1,this.children.forEach(t)}}function Wse(e,t){const n=yo.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(Ba(r),e(s-t))};return Zn.setup(r,!0),()=>Ba(r)}const y$=["TopLeft","TopRight","BottomLeft","BottomRight"],Yse=y$.length,U5=e=>typeof e=="string"?parseFloat(e):e,V5=e=>typeof e=="number"||Ye.test(e);function Xse(e,t,n,r,o,s){o?(e.opacity=Yn(0,n.opacity??1,Qse(r)),e.opacityExit=Yn(t.opacity??1,0,Jse(r))):s&&(e.opacity=Yn(t.opacity??1,n.opacity??1,r));for(let l=0;l<Yse;l++){const c=`border${y$[l]}Radius`;let u=q5(t,c),d=q5(n,c);if(u===void 0&&d===void 0)continue;u||(u=0),d||(d=0),u===0||d===0||V5(u)===V5(d)?(e[c]=Math.max(Yn(U5(u),U5(d),r),0),(Gi.test(d)||Gi.test(u))&&(e[c]+="%")):e[c]=d}(t.rotate||n.rotate)&&(e.rotate=Yn(t.rotate||0,n.rotate||0,r))}function q5(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Qse=v$(0,.5,rD),Jse=v$(.5,.95,oi);function v$(e,t,n){return r=>r<e?0:r>t?1:n(ah(e,t,r))}function B5(e,t){e.min=t.min,e.max=t.max}function wi(e,t){B5(e.x,t.x),B5(e.y,t.y)}function H5(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function K5(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 eae(e,t=0,n=1,r=.5,o,s=e,l=e){if(Gi.test(t)&&(t=parseFloat(t),t=Yn(l.min,l.max,t/100)-l.min),typeof t!="number")return;let c=Yn(s.min,s.max,r);e===s&&(c-=t),e.min=K5(e.min,t,n,c,o),e.max=K5(e.max,t,n,c,o)}function G5(e,t,[n,r,o],s,l){eae(e,t[n],t[r],t[o],t.scale,s,l)}const tae=["x","scaleX","originX"],nae=["y","scaleY","originY"];function Z5(e,t,n,r){G5(e.x,t,tae,n?n.x:void 0,r?r.x:void 0),G5(e.y,t,nae,n?n.y:void 0,r?r.y:void 0)}function W5(e){return e.translate===0&&e.scale===1}function b$(e){return W5(e.x)&&W5(e.y)}function Y5(e,t){return e.min===t.min&&e.max===t.max}function rae(e,t){return Y5(e.x,t.x)&&Y5(e.y,t.y)}function X5(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function S$(e,t){return X5(e.x,t.x)&&X5(e.y,t.y)}function Q5(e){return ao(e.x)/ao(e.y)}function J5(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class oae{constructor(){this.members=[]}add(t){U_(this.members,t),t.scheduleRender()}remove(t){if(V_(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)}}function iae(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 A1=["","X","Y","Z"],sae=1e3;let aae=0;function k1(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function w$(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=s$(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Zn,!(o||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&w$(r)}function x$({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(l={},c=t?.()){this.id=aae++,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(uae),this.nodes.forEach(pae),this.nodes.forEach(mae),this.nodes.forEach(fae)},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 Zse)}addEventListener(l,c){return this.eventHandlers.has(l)||this.eventHandlers.set(l,new H_),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=ID(l)&&!rie(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;Zn.read(()=>{p=window.innerWidth}),e(l,()=>{const b=window.innerWidth;b!==p&&(p=b,this.root.updateBlockedByResize=!0,h&&h(),h=Wse(g,250),zg.hasAnimatedSinceResize&&(zg.hasAnimatedSinceResize=!1,this.nodes.forEach(nM)))})}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()||Sae,{onLayoutAnimationStart:_,onLayoutAnimationComplete:x}=d.getProps(),w=!this.targetLayout||!S$(this.targetLayout,b),v=!p&&g;if(this.options.layoutRoot||this.resumeFrom||v||p&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const C={...rE(y,"layout"),onPlay:_,onComplete:x};(d.shouldReduceMotion||this.options.layoutRoot)&&(C.delay=0,C.type=!1),this.startAnimation(C),this.setAnimationOrigin(h,v)}else p||nM(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(),Ba(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(gae),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&&w$(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(eM);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(tM);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(hae),this.nodes.forEach(lae),this.nodes.forEach(cae)):this.nodes.forEach(tM),this.clearAllSnapshots();const c=yo.now();Fr.delta=Ps(0,1e3/60,c-Fr.timestamp),Fr.timestamp=c,Fr.isProcessing=!0,v1.update.process(Fr),v1.preRender.process(Fr),v1.render.process(Fr),Fr.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,iE.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(dae),this.sharedNodes.forEach(yae)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Zn.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Zn.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ao(this.snapshot.measuredBox.x)&&!ao(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=Cr(),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&&!b$(this.projectionDelta),u=this.getTransformTemplate(),d=u?u(this.latestValues,""):void 0,h=d!==this.prevTransformTemplateValue;l&&this.instance&&(c||Ll(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)),wae(u),{animationId:this.root.animationId,measuredBox:c,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:l}=this.options;if(!l)return Cr();const c=l.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(xae))){const{scroll:d}=this.root;d&&(yu(c.x,d.offset.x),yu(c.y,d.offset.y))}return c}removeElementScroll(l){const c=Cr();if(wi(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&&wi(c,l),yu(c.x,h.offset.x),yu(c.y,h.offset.y))}return c}applyTransform(l,c=!1){const u=Cr();wi(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&&vu(u,{x:-h.scroll.offset.x,y:-h.scroll.offset.y}),Ll(h.latestValues)&&vu(u,h.latestValues)}return Ll(this.latestValues)&&vu(u,this.latestValues),u}removeTransform(l){const c=Cr();wi(c,l);for(let u=0;u<this.path.length;u++){const d=this.path[u];if(!d.instance||!Ll(d.latestValues))continue;Mw(d.latestValues)&&d.updateSnapshot();const h=Cr(),p=d.measurePageBox();wi(h,p),Z5(c,d.latestValues,d.snapshot?d.snapshot.layoutBox:void 0,h)}return Ll(this.latestValues)&&Z5(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!==Fr.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=Fr.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=Cr(),this.targetWithTransforms=Cr()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),kse(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):wi(this.target,this.layout.layoutBox),e$(this.target,this.targetDelta)):wi(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||Mw(this.parent.latestValues)||JD(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=Cr(),this.relativeTargetOrigin=Cr(),Sy(this.relativeTargetOrigin,c,u),wi(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===Fr.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;wi(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,g=this.treeScale.y;Vie(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=Cr());const{target:b}=l;if(!b){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(H5(this.prevProjectionDelta.x,this.projectionDelta.x),H5(this.prevProjectionDelta.y,this.projectionDelta.y)),Ud(this.projectionDelta,this.layoutCorrected,b,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==g||!J5(this.projectionDelta.x,this.prevProjectionDelta.x)||!J5(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=Cr(),b=u?u.source:void 0,y=this.layout?this.layout.source:void 0,_=b!==y,x=this.getStack(),w=!x||x.members.length<=1,v=!!(_&&!w&&this.options.crossfade===!0&&!this.path.some(bae));this.animationProgress=0;let C;this.mixTargetDelta=S=>{const T=S/1e3;rM(p.x,l.x,T),rM(p.y,l.y,T),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Sy(g,this.layout.layoutBox,this.relativeParent.layout.layoutBox),vae(this.relativeTarget,this.relativeTargetOrigin,g,T),C&&rae(this.relativeTarget,C)&&(this.isProjectionDirty=!1),C||(C=Cr()),wi(C,this.relativeTarget)),_&&(this.animationValues=h,Xse(h,d,this.latestValues,T,v,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(l){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Ba(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Zn.update(()=>{zg.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=qu(0)),this.currentAnimation=Kse(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(sae),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&&_$(this.options.animationType,this.layout.layoutBox,d.layoutBox)){u=this.target||Cr();const p=ao(this.layout.layoutBox.x);u.x.min=l.target.x.min,u.x.max=u.x.min+p;const g=ao(this.layout.layoutBox.y);u.y.min=l.target.y.min,u.y.max=u.y.min+g}wi(c,u),vu(c,h),Ud(this.projectionDeltaWithTransform,this.layoutCorrected,c,h)}}registerSharedNode(l,c){this.sharedNodes.has(l)||this.sharedNodes.set(l,new oae),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&&k1("z",l,d,this.animationValues);for(let h=0;h<A1.length;h++)k1(`rotate${A1[h]}`,l,d,this.animationValues),k1(`skew${A1[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&&!Ll(this.latestValues)&&(l.transform=u?u({},""):"none",this.hasProjected=!1);return}l.visibility="";const h=d.animationValues||d.latestValues;this.applyTransformsToTarget();let p=iae(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 kw){if(h[y]===void 0)continue;const{correct:_,applyTo:x,isCSSVariable:w}=kw[y],v=p==="none"?h[y]:_(h[y],d);if(x){const C=x.length;for(let S=0;S<C;S++)l[x[S]]=v}else w?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(eM),this.root.sharedNodes.clear()}}}function lae(e){e.updateLayout()}function cae(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"?Xo(h=>{const p=s?t.measuredBox[h]:t.layoutBox[h],g=ao(p);p.min=n[h].min,p.max=p.min+g}):_$(o,t.layoutBox,n)&&Xo(h=>{const p=s?t.measuredBox[h]:t.layoutBox[h],g=ao(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();Ud(l,n,t.layoutBox);const c=bu();s?Ud(c,e.applyTransform(r,!0),t.measuredBox):Ud(c,n,t.layoutBox);const u=!b$(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=Cr();Sy(b,t.layoutBox,p.layoutBox);const y=Cr();Sy(y,n,g.layoutBox),S$(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 uae(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 fae(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function dae(e){e.clearSnapshot()}function eM(e){e.clearMeasurements()}function tM(e){e.isLayoutDirty=!1}function hae(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function nM(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function pae(e){e.resolveTargetDelta()}function mae(e){e.calcProjection()}function gae(e){e.resetSkewAndRotation()}function yae(e){e.removeLeadSnapshot()}function rM(e,t,n){e.translate=Yn(t.translate,0,n),e.scale=Yn(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function oM(e,t,n,r){e.min=Yn(t.min,n.min,r),e.max=Yn(t.max,n.max,r)}function vae(e,t,n,r){oM(e.x,t.x,n.x,r),oM(e.y,t.y,n.y,r)}function bae(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Sae={duration:.45,ease:[.4,0,.1,1]},iM=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),sM=iM("applewebkit/")&&!iM("chrome/")?Math.round:oi;function aM(e){e.min=sM(e.min),e.max=sM(e.max)}function wae(e){aM(e.x),aM(e.y)}function _$(e,t,n){return e==="position"||e==="preserve-aspect"&&!Ase(Q5(t),Q5(n),.2)}function xae(e){return e!==e.root&&e.scroll?.wasRoot}const _ae=x$({attachResizeListener:(e,t)=>fh(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),M1={current:void 0},E$=x$({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!M1.current){const e=new _ae({});e.mount(window),e.setOptions({layoutScroll:!0}),M1.current=e}return M1.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Eae={pan:{Feature:Bse},drag:{Feature:qse,ProjectionNode:E$,MeasureLayout:g$}};function lM(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&&Zn.postRender(()=>s(t,Hh(t)))}class Cae extends nl{mount(){const{current:t}=this.node;t&&(this.unmount=Joe(t,(n,r)=>(lM(this.node,r,"Start"),o=>lM(this.node,o,"End"))))}unmount(){}}class Tae extends nl{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=Vh(fh(this.node.current,"focus",()=>this.onFocus()),fh(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function cM(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&&Zn.postRender(()=>s(t,Hh(t)))}class Rae extends nl{mount(){const{current:t}=this.node;t&&(this.unmount=nie(t,(n,r)=>(cM(this.node,r,"Start"),(o,{success:s})=>cM(this.node,o,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const zw=new WeakMap,j1=new WeakMap,Oae=e=>{const t=zw.get(e.target);t&&t(e)},Aae=e=>{e.forEach(Oae)};function kae({root:e,...t}){const n=e||document;j1.has(n)||j1.set(n,{});const r=j1.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(Aae,{root:e,...t})),r[o]}function Mae(e,t,n){const r=kae(t);return zw.set(e,n),r.observe(e),()=>{zw.delete(e),r.unobserve(e)}}const jae={some:0,all:1};class Pae extends nl{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:jae[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 Mae(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(Nae(t,n))&&this.startObserver()}unmount(){}}function Nae({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Dae={inView:{Feature:Pae},tap:{Feature:Rae},focus:{Feature:Tae},hover:{Feature:Cae}},$ae={layout:{ProjectionNode:E$,MeasureLayout:g$}},Iae={..._se,...Dae,...Eae,...$ae},uM=Lie(Iae,Qie),C$=ko.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:vn("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(uM.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(uM.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"})]})]})]})})});C$.displayName="BackgroundBeams";const zae=()=>j.jsxs(j.Fragment,{children:[j.jsx(C$,{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 Bt(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 Lae(e){return e.additionalItems===!0&&console.warn("additionalItems=true is currently not supported"),Bt(e.additionalItems)}function fM(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 Ms="__additional_property",wy="additionalProperties",Ka="allOf",Kt="anyOf",ai="const",y0="default",gE="dependencies",Fae="enum",qr="__errors",_n="$id",Uae="if",Hu="items",Vae="_$junk_option_schema_id$_",Lg="$name",Mt="oneOf",Lw="patternProperties",nn="properties",P1="readonly",T$="required",xy="submitButtonOptions",In="$ref",kd="$schema",R$="root",O$="_",qae=["discriminator","propertyName"],dM="formContext",Bae="layoutGridLookupMap",yE="__rjsf_additionalProperties",A$="__rjsf_rootSchema",Hae="ui:field",vE="ui:widget",ja="ui:options",Fw="ui:globalOptions",Kae="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===vE&&Bt(o)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),n):r===ja&&Bt(o)?{...n,...o}:{...n,[r.substring(3)]:o}},{...t}):{...t}}function k$(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 Uw(e){const t={[qr]:[],addError(n){this[qr].push(n)}};if(Array.isArray(e))return e.reduce((n,r,o)=>({...n,[o]:Uw(r)}),t);if(La(e)){const n=e;return Object.keys(n).reduce((r,o)=>({...r,[o]:Uw(n[o])}),t)}return t}function An(e,t){return tK(e,t,(n,r)=>{if(typeof n=="function"&&typeof r=="function")return!0})}const Gae=Object.prototype;function Md(e){for(const t in e)if(Gae.hasOwnProperty.call(e,t))return!1;return!0}const Zae=["array","boolean","integer","null","number","object","string"];new Set(Zae);const Wae=["$defs","definitions","properties","patternProperties","dependencies"];new Set(Wae);const Yae=["items","allOf","oneOf","anyOf"];new Set(Yae);const Xae=["items","additionalItems","additionalProperties","propertyNames","contains","if","then","else","not"];new Set(Xae);function Ug(e){return typeof e=="object"}function zi(e){return Ug(e)?Md(e):e===!0}function Su(e,t){return e<t?-1:e>t?1:0}function N1(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 Qae(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 hM(e){return e.length===0}function D1(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 M$(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 Jae(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 ele(e,t){return n=>{if(e.has(n))return e.get(n);const r=t(n);return e.set(n,r),r}}const pM=ele,j$=()=>0,tle=e=>e===void 0,nle=e=>typeof e!="object",mM={boolean:0,number:1,string:2};function rle(e,t){const n=typeof e,r=typeof t;return n===r?Su(e,t):mM[n]-mM[r]}function ole(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 v0(e,t,n=j$){return(r,o)=>e(r)?e(o)?n(r,o):-1:e(o)?1:t(r,o)}function lu(e){return v0(tle,e)}function xa(e,t){return v0(n=>n===void 0||e(n),t)}function $1(e,t){return v0(Array.isArray,e,t)}const gr=lu(Su),I1=xa(e=>e===0,(e,t)=>e-t);function ile({deduplicationCache:e=new WeakMap,sortedKeysCache:t=new WeakMap}={}){const n=pM(t,_=>Object.keys(_).sort());function r(_){return(x,w)=>{const v=n(x),C=n(w),S=Math.min(v.length,C.length);for(let T=0;T<S;T++){const E=Su(v[T],C[T]);if(E!==0)return E}if(v.length!==C.length)return v.length-C.length;for(let T=0;T<S;T++){const E=v[T],O=_(x[E],w[E]);if(O!==0)return O}return 0}}function o(_){const x=D1(_),w=pM(e,M$(_,{threshold:0}));return(v,C)=>x(w(v),w(C))}const s=o(Su);function l(_,x){if(Ug(_)){if(Ug(x)){const w=Object.keys(_),v=Object.keys(x),C=ole(w,v),S=C.length;for(let T=0;T<S;T++){const E=C[T];if(_[E]===x[E])continue;const M=(y[E]??c)(_[E],x[E]);if(M!==0)return M}return 0}return x===!0&&Md(_)?0:1}return Ug(x)?_===!0&&Md(x)?0:-1:Su(_,x)}const c=lu(d),u=v0(nle,$1(r(c),D1(d)),rle);function d(_,x){return _===null?-1:x===null?1:u(_,x)}const h=lu(l),p=xa(Md,r(h)),g=lu(o(l)),b=xa(zi,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:xa(_=>_===!1,j$),minLength:I1,minItems:I1,minProperties:I1,required:xa(hM,s),enum:xa(hM,o(d)),type:lu((_,x)=>{const w=Array.isArray(_),v=Array.isArray(x);return!w&&!v?Su(_,x):s(w?_:[_],v?x:[x])}),items:xa(_=>!Array.isArray(_)&&zi(_),$1(l,D1(l))),anyOf:g,allOf:g,oneOf:g,properties:p,patternProperties:p,additionalProperties:b,additionalItems:b,dependencies:xa(Md,r(lu($1(l,s))))};return{compareSchemaValues:d,compareSchemaDefinitions:l}}function gM(e){return e}const P$=(e,t)=>e?P$(t%e,e):t,sle=(e,t)=>Math.abs(e*t)/P$(e,t);function ale(e,t){return e===t?e:`^(?=.*(?:${e}))(?=.*(?:${t})).*$`}function*z1(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 L1(e,t){return e||t}function yM(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 lle(e){const t=new Map;for(const n of e)for(const r of n[0])t.set(r,n[1]);return t}function $l(e,t,n){n===void 0||zi(n)?delete e[t]:e[t]=n}const cle=["properties","patternProperties","additionalProperties"];function vM(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 bM=[[],[]];function SM(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 ule=["items","additionalItems"],fle=["if","then","else"];function wM(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 F1(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 Il(e,t,n){return[e,t,n]}function dle(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 hle=[Il("minimum","maximum",e=>e.maximum>=e.minimum),Il("exclusiveMinimum","maximum",e=>e.maximum>e.exclusiveMinimum),Il("minimum","exclusiveMaximum",e=>e.exclusiveMaximum>e.minimum),Il("exclusiveMinimum","exclusiveMaximum",e=>e.exclusiveMaximum>e.exclusiveMinimum),Il("minLength","maxLength",e=>e.maxLength>=e.minLength),Il("minItems","maxItems",e=>e.maxItems>=e.minItems),Il("minProperties","maxProperties",e=>e.maxProperties>=e.minProperties)];function ple({mergePatterns:e=ale,isSubRegExp:t=Object.is,intersectJson:n=Qae,deduplicateJsonSchemaDef:r=gM,defaultMerger:o=gM,assigners:s=[],checks:l=hle,mergers:c}={}){function u(S){const T=S.length;let E=S[0];for(let O=1;O<T;O++){const M=w(E,S[O]);if(M===!1)return!1;zi(M)||(E=M)}return E}function d(S,T,E,O,M,P,I){if(S.length=0,E===!1)return!1;if(S.push(E),M!==void 0){if(M===!1)return!1;S.push(M)}if(SM(S,T,P))return!1;const U=S.length<2;if(I===!1){if(U)return;if(SM(S,T,O))return!1}else U&&I!==void 0&&S.push(I);return S.length===1?S[0]:u(S)}function h(S,T,E,O,M,P){const I=E.length;if(I>0&&M!==!1)if(P)Object.assign(S,T);else for(let z=0;z<I;z++){const U=E[z];O.has(U)||(S[U]=w(T[U],M))}return S}const p=(S,{properties:T={},patternProperties:E,additionalProperties:O=!0},{properties:M={},patternProperties:P,additionalProperties:I=!0})=>{const z=zi(O),U=zi(I);if(z&&U)return $l(S,"properties",v(T,M)),$l(S,"patternProperties",E&&P?v(E,P):E??P),delete S.additionalProperties,S;const G=w(O,I);$l(S,"additionalProperties",G);const J={},ee=Object.keys(T),Z=ee.length,[H,Y]=E?vM(E):bM,[oe,ne]=P?vM(P):bM,$=[],q=new Set,V=U?void 0:I;for(let ge=0;ge<Z;ge++){const ke=ee[ge];q.add(ke);const Q=d($,ke,T[ke],H,M[ke],oe,V);Q!==void 0&&(J[ke]=Q)}const D=Object.keys(M),B=D.length,te=z?void 0:O;for(let ge=0;ge<B;ge++){const ke=D[ge];if(q.has(ke))continue;const Q=d($,ke,M[ke],oe,void 0,H,te);Q!==void 0&&(J[ke]=Q)}$l(S,"properties",J);let re={};const ae=new Set;if(Y.length>0&&ne.length>0){const ge=z1(Y,ne,(ke,Q)=>{t(ke,Q)&&ae.add(ke),t(Q,ke)&&ae.add(Q),re[e(ke,Q)]=w(E[ke],P[Q])});for(;!ge.next().done;);}return re=h(re,E,Y,ae,I,U),re=h(re,P,ne,ae,O,z),$l(S,"patternProperties",re),S},g=(S,{items:T=[],additionalItems:E},{items:O=[],additionalItems:M})=>{const P=Array.isArray(T),I=Array.isArray(O),z=[];if(S.items=z,P&&I){const[U,G,J]=T.length<O.length?[T.length,E,O]:[O.length,M,T];let ee=0;for(;ee<U;ee++)z.push(w(T[ee],O[ee]));if(G===!1)S.additionalItems=!1;else{const Z=G===void 0||zi(G);for(;ee<J.length;ee++)z.push(Z?J[ee]:w(J[ee],G));$l(S,"additionalItems",E!==void 0&&M!==void 0?w(E,M):E??M)}}else if(P||I){const[U,G,J]=P?[T,O,E]:[O,T,M];$l(S,"additionalItems",J&&w(J,G));for(let ee=0;ee<U.length;ee++)z.push(w(U[ee],G))}else delete S.additionalItems,S.items=w(T,O);return S},b=(S,T,E)=>{wM(S,T);const O=wM({},E);return S.allOf===void 0?S.allOf=[O]:S.allOf=S.allOf.concat(O),S};function y(S,T){return r(Array.from(z1(S,T,w)))}const _=lle([[cle,p],[ule,g],[fle,b],...s]),x=dle(l);function w(S,T){if(S===!1||T===!1)return!1;if(zi(S))return zi(T)?!0:T;if(zi(T))return S;let E={...S};const O=new Set,M=new Set,P=Object.keys(T),I=P.length;for(let z=0;z<I;z++){const U=P[z],G=T[U];if(G===void 0)continue;const J=x.get(U);if(J!==void 0){const Y=J.length;for(let oe=0;oe<Y;oe++){const ne=J[oe];S[ne.oppositeKey]!==void 0&&M.add(ne.check)}}const ee=S[U];if(ee===void 0){E[U]=G;continue}const Z=_.get(U);if(Z){O.add(Z);continue}const H=C[U]??o;E[U]=H(ee,G)}for(const z of O)E=z(E,S,T);for(const z of M)z(E);return E}const v=yM(w),C={$id:o,$ref:o,$schema:o,$comment:o,$defs:v,definitions:v,type:(S,T)=>{if(S===T)return S;const E=Array.isArray(S),O=Array.isArray(T);if(!E&&!O){const M=F1(S,T);if(M!==void 0)return M}else if(E||O){const M=new Set;if(E&&O)for(const I of z1(S,T,F1))I!==void 0&&M.add(I);else{const I=E?S:T,z=E?T:S,U=I.length;for(let G=0;G<U;G++){const J=F1(z,I[G]);J!==void 0&&M.add(J)}}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()}, ${T.toString()}`)},default:o,description:o,title:o,const:o,format:o,contentEncoding:o,contentMediaType:o,not:(S,T)=>{const E=r([S,T]);return E.length===1?E[0]:{anyOf:E}},pattern:e,readOnly:L1,writeOnly:L1,enum:(S,T)=>{const E=n(S,T);if(E.length===0)throw new Error(`Intersection of the following enums is empty: "${JSON.stringify(S)}", "${JSON.stringify(T)}"`);return E},anyOf:y,oneOf:y,allOf:(S,T)=>r(S.concat(T)),propertyNames:w,contains:w,dependencies:yM((S,T)=>Array.isArray(S)?Array.isArray(T)?N1(S,T):w(T,{required:S}):Array.isArray(T)?w(S,{required:T}):w(S,T)),examples:(S,T)=>{if(!Array.isArray(S)||!Array.isArray(T))throw new Error(`Value of the 'examples' field should be an array, but got "${JSON.stringify(S)}" and "${JSON.stringify(T)}"`);return N1(S,T)},multipleOf:(S,T)=>{let E=1;for(;!Number.isInteger(S)||!Number.isInteger(T);)E*=10,S*=10,T*=10;return sle(S,T)/E},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:L1,required:N1,...c};return{mergeSchemaDefinitions:w,mergeArrayOfSchemaDefinitions:u}}function mle(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 gle(e){return t=>e(mle(t))}var wd={},xM;function yle(){if(xM)return wd;xM=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 x=d[g];return p===void 0?delete d[g]:d[g]=p,x}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 wd.get=l,wd.set=c,wd.compile=u,wd}var vle=yle();const U1=es(vle);var ble=pN();const bE=es(ble);function _y(e,t){if(_n in e&&bE.equal(e[_n],t))return e;for(const n of Object.values(e))if(Array.isArray(n)){for(const r of n)if(Gt(r)){const o=_y(r,t);if(o!==void 0)return o}}else if(Gt(n)){const r=_y(n,t);if(r!==void 0)return r}}function Vw(e,t){const n=Ie(e,_n,t);In in e&&(e={...e,[In]:bE.resolve(n,e[In])});for(const[r,o]of Object.entries(e))Array.isArray(o)?e={...e,[r]:o.map(s=>Gt(s)?Vw(s,n):s)}:Gt(o)&&(e={...e,[r]:Vw(o,n)});return e}function SE(e,t){const n=t[e];return[nh(t,[e]),n]}function N$(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=U1.get(t,c):t[kd]===Fg&&(s=_y(t,r.replace(/\/$/,"")),s!==void 0&&(s=U1.get(s,c)))}else if(t[kd]===Fg){const c=r?bE.resolve(r,o):o,[u,...d]=c.replace(/#\/?$/,"").split("#");s=_y(t,u.replace(/\/$/,"")),s!==void 0&&(r=s[_n],vr(d)||(s=U1.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]=SE(In,s),d=N$(u,t,[...n,o],r);return Object.keys(c).length>0?t[kd]===Kae||t[kd]===Fg?{[Ka]:[c,d]}:{...c,...d}:d}return s}function D$(e,t={},n=Ie(t,[_n])){return N$(e,t,[],n)}function Xi(e){let t;const n=Ie(e,qae);return Fa(n)?t=n:n!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof n}" instead`),t}function dh(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 Ri(e){let{type:t}=e;return!t&&e.const?dh(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 Ds(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&&Bt(l)?r[o]=Ds(s,l):e&&t&&(Ri(e)==="object"||Ri(t)==="object")&&o===T$&&Array.isArray(s)&&Array.isArray(l)?r[o]=wK(s,l):r[o]=l,r},n)}function $$(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 wE(e,t,n,r,o){if(t===void 0)return 0;const s=$$(t,n,o);if(LP(s))return s;for(let l=0;l<n.length;l++){const c=n[l];if(o&&Ft(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 Qr(e,t,n={},r,o,s=!1){return Vi(e,t,n,r,void 0,void 0,o,s)[0]}function Sle(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(Vi(e,u,n,s,r,o,l))),d&&typeof d!="boolean"&&(b=b.concat(Vi(e,d,n,s,r,o,l)));else{const y=p?u:d;y&&typeof y!="boolean"&&(b=b.concat(Vi(e,y,n,s,r,o,l)))}return b.length&&(g=b.map(y=>Ds(h,y))),g.flatMap(y=>Vi(e,y,n,s,r,o,l))}function I$(e){return e.reduce((n,r)=>r.length>1?r.flatMap(o=>qP(n.length,s=>[...n[s]].concat(o))):(n.forEach(o=>o.push(r[0])),n),[[]])}function z$(e,t){return Object.keys(e.patternProperties).filter(n=>RegExp(n).test(t)).reduce((n,r)=>(fn(n,[r],e.patternProperties[r]),n),{})}function wle(e,t,n,r,o,s,l,c){const u=L$(e,t,n,r,o,s,l,c);if(u.length>1||u[0]!==t)return u;if(gE in t)return F$(e,t,n,r,o,s,l).flatMap(h=>Vi(e,h,n,s,r,o,l));if(Ka in t&&Array.isArray(t[Ka])){const d=t.allOf.map(p=>Vi(e,p,n,s,r,o,l));return I$(d).map(p=>({...t,allOf:p}))}return[t]}function L$(e,t,n,r,o,s,l,c){const u=Tu(t,n,o,void 0,c);return u!==t?Vi(e,u,n,s,r,o,l,c):[t]}function Tu(e,t,n,r,o){if(!Bt(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={...D$(l,t,r),...c},_n in s&&(r=s[_n])}if(nn in s){const l=[],c=yK(s[nn],(u,d,h)=>{const p=[...n];u[h]=Tu(d,t,p,r,o),l.push(p)},{});rK(n,KP(zH(l))),s={...s,[nn]:c}}if(Hu in s&&!Array.isArray(s.items)&&typeof s.items!="boolean"&&(s={...s,items:Tu(s.items,t,n,r,o)}),o){let l,c;Kt in e&&Array.isArray(e[Kt])?(l=Kt,c=s[Kt]):Mt in e&&Array.isArray(e[Mt])&&(l=Mt,c=s[Mt]),l&&c&&(s={...s,[l]:c.map(u=>Tu(u,t,n,r,o))})}return An(e,s)?e:s}function xle(e,t,n,r,o){const s={...t,properties:{...t.properties}},l=r&&Bt(r)?r:{};return Object.keys(l).forEach(c=>{if(!(c in s.properties)){if(Lw in s){const u=z$(s,c);if(!vr(u)){s.properties[c]=Qr(e,{[Ka]:Object.values(u)},n,Ie(l,[c]),o),fn(s.properties,[c,Ms],!0);return}}if(wy in s&&s.additionalProperties!==!1){let u;typeof s.additionalProperties!="boolean"?In in s.additionalProperties?u=Qr(e,{[In]:Ie(s.additionalProperties,[In])},n,l,o):"type"in s.additionalProperties?u={...s.additionalProperties}:Kt in s.additionalProperties||Mt in s.additionalProperties?u={type:"object",...s.additionalProperties}:u={type:dh(Ie(l,[c]))}:u={type:dh(Ie(l,[c]))},s.properties[c]=u,fn(s.properties,[c,Ms],!0)}else s.properties[c]={type:"null"},fn(s.properties,[c,Ms],!0)}}),s}const{compareSchemaDefinitions:_le,compareSchemaValues:Ele}=ile(),{mergeArrayOfSchemaDefinitions:Cle}=ple({intersectJson:Jae(Ele),deduplicateJsonSchemaDef:M$(_le)}),Tle=gle(Cle);function Rle(e){return Tle(e)}function Vi(e,t,n,r,o=!1,s=[],l,c){return Bt(t)?wle(e,t,n,o,s,r,l,c).flatMap(d=>{var h;let p=d;if(Uae in p)return Sle(e,p,n,o,s,r,l);if(Ka 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):Rle(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&&Lw in p&&(p=Object.keys(p.properties).reduce((b,y)=>{const _=z$(b,y);return vr(_)||(b.properties[y]=Qr(e,{allOf:[b.properties[y],...Object.values(_)]},n,Ie(r,[y]),l)),b},{...p,properties:{...p.properties}})),Lw in p||wy in p&&p.additionalProperties!==!1?xle(e,p,n,r,l):p}):[{}]}function Ole(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=Xi(t);s=s.map(g=>Tu(g,n,[]));const p=wE(e,d,s,n,h);if(r)return s.map(g=>Ds(u,g));t=Ds(u,s[p])}return[t]}function F$(e,t,n,r,o,s,l){const{dependencies:c,...u}=t;return Ole(e,u,n,r,s).flatMap(h=>U$(e,c,h,n,r,o,s,l))}function U$(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]=SE(d,t);return Array.isArray(p)?u[0]=Ale(n,p):Bt(p)&&(u=kle(e,n,r,d,p,o,s,l,c)),u.flatMap(g=>U$(e,h,g,r,o,s,l,c))}return u}function Ale(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 kle(e,t,n,r,o,s,l,c,u){return Vi(e,o,n,c,s,l,u).flatMap(h=>{const{oneOf:p,...g}=h;if(t=Ds(t,g),p===void 0)return t;const b=p.map(_=>typeof _=="boolean"||!(In in _)?[_]:L$(e,_,n,s,l,c));return I$(b).flatMap(_=>Mle(e,t,n,r,_,s,l,c,u))})}function Mle(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]=SE(r,p.properties),b={...p,properties:g};return Vi(e,b,n,c,s,l,u).map(_=>Ds(t,_))})}function jd(e,t,n,r,o,s={},l){if(Array.isArray(n[o])){const u=Xi(n)||r,d=n[o].map(p=>Qr(e,p,t,s,l)),h=Ie(s,u);if(h!==void 0)return d.find(p=>ka(Ie(p,[nn,u,y0],Ie(p,[nn,u,ai])),h))}}function V$(e,t,n,r,o){let s=n;if(Ft(n,In)&&(s=Qr(e,n,t,void 0,o)),vr(r))return s;const l=Array.isArray(r)?r:r.split("."),[c,...u]=l;if(c&&Ft(s,c))return s=Ie(s,c),V$(e,t,s,u,o)}function Vg(e,t,n,r,o,s){const l=V$(e,t,n,r,s);return l===void 0?o:l}const _M={title:"!@#$_UNKNOWN_$#@!"};function jle(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),Ft(c,Mt)?c=jd(e,t,c,u,Mt,Ie(o,g),s):Ft(c,Kt)&&(c=jd(e,t,c,u,Kt,Ie(o,g),s))}),Ft(c,Mt)?c=jd(e,t,c,u,Mt,o,s):Ft(c,Kt)&&(c=jd(e,t,c,u,Kt,o,s));let d=Vg(e,t,c,[nn,u],_M,s);d===_M&&(d=void 0);const h=Vg(e,t,c,T$,[],s);let p;return d&&Array.isArray(h)&&(p=h.includes(u)),{field:d,isRequired:p}}const Ple={type:"object",$id:Vae,properties:{__not_really_there__:{type:"number"}}};function qw(e,t,n,r,o){let s=0;return n&&(Gt(n.properties)?s+=hK(n.properties,(l,c,u)=>{const d=Ie(r,u);if(typeof c=="boolean")return l;if(Ft(c,In)){const h=Qr(e,c,t,d,o);return l+qw(e,t,h,d||{},o)}if((Ft(c,Mt)||Ft(c,Kt))&&d){const h=Ft(c,Mt)?Mt:Kt,p=Xi(c);return l+hh(e,t,d,Ie(c,h),-1,p,o)}if(c.type==="object")return Gt(d)&&(l+=1),l+qw(e,t,c,d,o);if(c.type===dh(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):Fa(n.type)&&n.type===dh(r)&&(s+=1)),s}function hh(e,t,n,r,o=-1,s,l){const c=r.map(g=>Tu(g,t,[])),u=$$(n,r,s);if(LP(u))return u;const d=c.reduce((g,b,y)=>(wE(e,n,[Ple,b],t,s)===1&&g.push(y),g),[]);if(d.length===1)return d[0];d.length||qP(c.length,g=>d.push(g));const h=new Set,{bestIndex:p}=d.reduce((g,b)=>{const{bestScore:y}=g,_=c[b],x=qw(e,t,_,n,l);return h.add(x),x>y?{bestIndex:b,bestScore:x}:g},{bestIndex:o,bestScore:0});return h.size===1&&o>=0?o:p}function xE(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every(t=>Bt(t))}function ph(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?ph(s[h],t[h],n,r,o):d);return(n||o)&&u.length<c.length&&u.push(...c.slice(u.length)),u}if(Bt(t)){const s=Object.assign({},e);return Object.keys(t).reduce((l,c)=>{var u;const d=Ie(t,c),h=Bt(e)&&c in e,p=c in t,g=(u=Ie(e,c))!==null&&u!==void 0?u:{},b=h&&Object.entries(g).some(([,x])=>Bt(x)),y=h&&Bt(Ie(e,c)),_=p&&Bt(d);return y&&_&&!b?(l[c]={...Ie(e,c),...d},l):(l[c]=ph(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 mh(e,t,n=!1){return Object.keys(t).reduce((r,o)=>{const s=e?e[o]:{},l=t[o];if(e&&o in e&&Bt(l))r[o]=mh(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 q$(e){return Array.isArray(e.enum)&&e.enum.length===1||ai in e}function _E(e,t,n={},r){const o=Qr(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"&&q$(l)):!1}function EE(e,t,n,r){return!t.uniqueItems||!t.items||typeof t.items=="boolean"?!1:_E(e,t.items,n,r)}function B$(e){const t=e[ai],n=Ri(e);return Bt(t)&&Fa(t?.$data)&&n!=="object"&&n!=="array"}function Nle(e){if(Fae in e&&Array.isArray(e.enum)&&e.enum.length===1)return e.enum[0];if(ai in e)return e.const;throw new Error("schema cannot be inferred as a constant")}function Ku(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=Xi(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,y0,Ie(p,ai)),h=h||p?.title||u.title||String(d)}else d=Nle(u),h=h||u.title||String(d);return{schema:u,label:h,value:d}})}const Dle=["string","number","integer","boolean","null"];var Gu;(function(e){e[e.Ignore=0]="Ignore",e[e.Invert=1]="Invert",e[e.Fallback=2]="Fallback"})(Gu||(Gu={}));function V1(e,t=Gu.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!==Gu.Ignore&&Bt(e.additionalItems)?e.additionalItems:{}}function H$(e,t){const{default:n,type:r}=e;return Array.isArray(r)&&r.includes("null")&&vr(t)&&n===null?null:t}function EM(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||!Bt(n)||!vr(n))&&(e[t]=n);else if(d!=="skipDefaults"){const h=o===void 0?s.includes(t):o;Bt(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 Pa(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=Bt(o)?o:{};const y=Bt(t)?t:{};let _=r,x=null,w=u,v=c;if(y[ai]!==void 0&&u?.constAsDefaults!=="never"&&!B$(y))_=y[ai];else if(Bt(_)&&Bt(y.default))_=mh(_,y.default);else if(y0 in y&&!y[Kt]&&!y[Mt]&&!y[In])_=y.default;else if(In in y){const T=y[In];c.includes(T)||(v=c.concat(T),x=D$(T,s)),x&&!_&&(_=y.default),p&&x&&!Bt(o)&&(b=o)}else if(gE in y){const T={...CM(e,y,n,_),...b};x=F$(e,y,s,!1,[],T,d)[0]}else if(xE(y))_=y.items.map((T,E)=>Pa(e,T,{rootSchema:s,includeUndefinedValues:l,_recurseList:c,experimental_defaultFormStateBehavior:u,experimental_customMergeAllOf:d,parentDefaults:Array.isArray(r)?r[E]:void 0,rawFormData:b,required:h,shouldMergeDefaultsIntoFormData:p}));else if(Mt in y){const{oneOf:T,...E}=y;if(T.length===0)return;const O=Xi(y),{type:M="null"}=E;!Array.isArray(M)&&Dle.includes(M)&&w?.constAsDefaults==="skipOneOf"&&(w={...w,constAsDefaults:"never"}),x=T[hh(e,s,o??y.default,T,0,O,d)],x=Ds(E,x)}else if(Kt in y){const{anyOf:T,...E}=y;if(T.length===0)return;const O=Xi(y);x=T[hh(e,s,o??y.default,T,0,O,d)],x=Ds(E,x)}if(x)return Pa(e,x,{rootSchema:s,includeUndefinedValues:l,_recurseList:v,experimental_defaultFormStateBehavior:w,experimental_customMergeAllOf:d,parentDefaults:_,rawFormData:o??b,required:h,shouldMergeDefaultsIntoFormData:p,initialDefaultsGenerated:g});_===void 0&&(_=y.default);const C=CM(e,y,n,_);let S=C??_;if(p){const{arrayMinItems:T={}}=u||{},{mergeExtraDefaults:E}=T,O=$le(e,y,s,o,u,d);(!Bt(o)||Ka in y)&&(S=ph(S,O,E,!0))}return S}function $le(e,t,n,r,o,s){const l=!q$(t)&&_E(e,t,n,s);let c=r;if(l){const d=Ku(t);c=d?.some(p=>An(p.value,r))?r:void 0}return t[ai]&&o?.constAsDefaults==="always"&&(c=t.const),c}function Ile(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=Bt(n)?n:{},b=t,y=l?.allOf==="populateDefaults"&&Ka in b?Qr(e,b,r,g,c):b,_=y[ai],x=Object.keys(y.properties||{}).reduce((w,v)=>{var C;const S=Ie(y,[nn,v],{}),T=Bt(_)&&_[v]!==void 0,E=(Bt(S)&&ai in S||T)&&l?.constAsDefaults!=="never"&&!B$(S),O=Pa(e,S,{rootSchema:r,_recurseList:s,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:c,includeUndefinedValues:o===!0,parentDefaults:Ie(p,[v]),rawFormData:Ie(g,[v]),required:(C=y.required)===null||C===void 0?void 0:C.includes(v),shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:h});return EM(w,v,O,o,u,y.required,l,E,S?.type==="null"),w},{});if(y.additionalProperties&&!h){const w=Bt(y.additionalProperties)?y.additionalProperties:{},v=new Set;Bt(p)&&Object.keys(p).filter(S=>!y.properties||!y.properties[S]).forEach(S=>v.add(S));const C=[];Object.keys(g).filter(S=>!y.properties||!y.properties[S]).forEach(S=>{v.add(S),C.push(S)}),v.forEach(S=>{var T;const E=Pa(e,w,{rootSchema:r,_recurseList:s,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:c,includeUndefinedValues:o===!0,parentDefaults:Ie(p,[S]),rawFormData:Ie(g,[S]),required:(T=y.required)===null||T===void 0?void 0:T.includes(S),shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:h});EM(x,S,E,o,u,C)})}return H$(t,x)}}function zle(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:x,mergeExtraDefaults:w}=_,v=x==="never",C=x==="requiredOnly",S=x==="all"||!v&&!C,T=(b=_?.computeSkipPopulate)!==null&&b!==void 0?b:(()=>!1),O=s?.emptyObjectFields==="skipEmptyDefaults"?void 0:[];if(Array.isArray(p)&&(p=p.map((z,U)=>{const G=V1(y,Gu.Fallback,U);return Pa(e,G,{rootSchema:r,_recurseList:o,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:l,parentDefaults:z,required:c,shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:h})})),Array.isArray(n)){const z=V1(y);if(v)p=n;else{const U=n.map((J,ee)=>Pa(e,z,{rootSchema:r,_recurseList:o,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:l,rawFormData:J,parentDefaults:Ie(p,[ee]),required:c,shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:h}));p=ph(p,U,(C&&c||S)&&w)}}if((Bt(y)&&ai in y&&s?.constAsDefaults!=="never")===!1){if(v)return p??O;if(C&&!c)return p||void 0}let P;const I=Array.isArray(p)?p.length:0;if(!y.minItems||EE(e,y,r,l)||T(e,y,r)||y.minItems<=I)P=p||!c&&!u?p:O;else{const z=p||[],U=V1(y,Gu.Invert),G=U.default,J=Array.from({length:y.minItems-I},()=>Pa(e,U,{parentDefaults:G,rootSchema:r,_recurseList:o,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:l,required:c,shouldMergeDefaultsIntoFormData:d}));P=z.concat(J)}return H$(t,P)}function CM(e,t,n={},r){switch(Ri(t)){case"object":return Ile(e,t,n,r);case"array":return zle(e,t,n,r)}}function K$(e,t,n,r,o=!1,s,l,c){if(!Bt(t))throw new Error("Invalid schema: "+t);const u=Qr(e,t,r,n,l),d=Pa(e,u,{rootSchema:r,includeUndefinedValues:o,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:l,rawFormData:n,shouldMergeDefaultsIntoFormData:!0,initialDefaultsGenerated:c,requiredAsRoot:!0});if(u.type!=="object"&&Bt(u.default))return{...d,...n};if(Bt(n)||Array.isArray(n)){const{mergeDefaultsIntoFormData:h}=s||{};return ph(d,n,!0,h==="useDefaultIfFormDataUndefined",!0)}return d}function G$(e={}){return"widget"in ct(e)&&ct(e).widget!=="hidden"}function Z$(e,t,n={},r,o){if(n[vE]==="files")return!0;if(t.items){const s=Qr(e,t.items,r,void 0,o);return s.type==="string"&&s.format==="data-url"}return!1}function Lle(e,t,n={},r,o,s){const l=ct(n,o),{label:c=!0}=l;let u=!!c;if(u){const d=Ri(t),h=Ie(t,Ms,!1);d==="array"&&(u=h||EE(e,t,r,s)||Z$(e,t,n,r,s)||G$(n)),d==="object"&&(u=h),d==="boolean"&&n&&!n[vE]&&(u=!1),n&&n[Hae]&&(u=!1)}return u}const ru=Symbol("no Value");function Bw(e,t,n,r,o={},s){let l;if(Ft(n,nn)){const c={};if(Ft(r,nn)){const h=Ie(r,nn,{});Object.keys(h).forEach(p=>{Ft(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],{});Ft(g,In)&&(g=Qr(e,g,t,p,s)),Ft(b,In)&&(b=Qr(e,b,t,p,s));const y=Ie(g,"type"),_=Ie(b,"type");if(!y||y===_)if(Ft(c,h)&&delete c[h],_==="object"||_==="array"&&Array.isArray(p)){const x=Bw(e,t,b,g,p,s);(x!==void 0||_==="array")&&(d[h]=x)}else{const x=Ie(b,"default",ru),w=Ie(g,"default",ru);x!==ru&&x!==p&&(w===p?c[h]=x:Ie(b,"readOnly")===!0&&(c[h]=void 0));const v=Ie(b,"const",ru),C=Ie(g,"const",ru);v!==ru&&v!==p&&(c[h]=C===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)){Ft(c,In)&&(c=Qr(e,c,t,o,s)),Ft(u,In)&&(u=Qr(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=Bw(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 Fl(e,t,n,r,o,s=[],l){if(In in t||gE in t||Ka in t){const u=Qr(e,t,r,o,l);if(s.findIndex(h=>An(h,u))===-1)return Fl(e,u,n,r,o,s.concat(u),l)}let c={[Lg]:n.replace(/^\./,"")};if(Mt in t||Kt in t){const u=Mt in t?t.oneOf:t.anyOf,d=Xi(t),h=hh(e,r,o,u,0,d,l),p=u[h];c={...c,...Fl(e,p,n,r,o,s,l)}}if(wy in t&&t[wy]!==!1&&fn(c,yE,!0),Hu in t&&Array.isArray(o)){const{items:u,additionalItems:d}=t;Array.isArray(u)?o.forEach((h,p)=>{u[p]?c[p]=Fl(e,u[p],`${n}.${p}`,r,h,s,l):d?c[p]=Fl(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]=Fl(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]=Fl(e,d,`${n}.${u}`,r,Ie(o,[u]),s,l)}return c}function Fle(e,t,n="",r,o,s){return Fl(e,t,n,r,o,void 0,s)}class Ule{constructor(t,n,r,o){n&&n[kd]===Fg?this.rootSchema=Vw(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 jle(this.validator,this.rootSchema,t,n,r,this.experimental_customMergeAllOf)}findSelectedOptionInXxxOf(t,n,r,o){return jd(this.validator,this.rootSchema,t,n,r,o,this.experimental_customMergeAllOf)}getDefaultFormState(t,n,r=!1,o){return K$(this.validator,t,n,this.rootSchema,r,this.experimental_defaultFormStateBehavior,this.experimental_customMergeAllOf,o)}getDisplayLabel(t,n,r){return Lle(this.validator,t,n,this.rootSchema,r,this.experimental_customMergeAllOf)}getClosestMatchingOption(t,n,r,o){return hh(this.validator,this.rootSchema,t,n,r,o,this.experimental_customMergeAllOf)}getFirstMatchingOption(t,n,r){return wE(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 Z$(this.validator,t,n,this.rootSchema,this.experimental_customMergeAllOf)}isMultiSelect(t){return EE(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}isSelect(t){return _E(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}retrieveSchema(t,n,r){return Qr(this.validator,t,this.rootSchema,n,this.experimental_customMergeAllOf,r)}sanitizeDataForNewSchema(t,n,r){return Bw(this.validator,this.rootSchema,t,n,r,this.experimental_customMergeAllOf)}toPathSchema(t,n,r){return Fle(this.validator,t,n,this.rootSchema,r,this.experimental_customMergeAllOf)}}function Vle(e,t,n={},r){return new Ule(e,t,n,r)}function qle(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 _a(e,t){let n=String(e);for(;n.length<t;)n="0"+n;return n}function W$(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 W$(t,e).reverse();const n=[];for(let r=e;r<=t;r++)n.push({value:r,label:_a(r,2)});return n}function TM(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 Ble(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 Hle(e,t){return Ble(e,t)}function Rr(e,t=[],n){if(Array.isArray(e))return e.map(s=>Rr(s,t)).filter(s=>s!==n);const r=e===""||e===null?-1:Number(e),o=t[r];return o?o.value:n}function Y$(e,t,n=[]){const r=Rr(e,n);return Array.isArray(t)?t.filter(o=>!An(o,r)):An(r,t)?void 0:t}function Kh(e,t){return Array.isArray(t)?t.some(n=>An(n,e)):An(t,e)}function X$(e,t=[],n=!1){const r=t.map((o,s)=>Kh(o.value,e)?String(s):void 0).filter(o=>typeof o<"u");return n?r:r[0]}function Q$(e,t,n=[]){const r=Rr(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 J${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={},pK(this.errorSchema,t,r,Object)),r}resetAllErrors(t){return this.errorSchema=t?Ph(t):{},this}addErrors(t,n){const r=this.getOrCreateErrorBlock(n);let o=Ie(r,qr);return Array.isArray(o)||(o=[],r[qr]=o),Array.isArray(t)?fn(r,qr,[...new Set([...o,...t])]):fn(r,qr,[...new Set([...o,t])]),this}setErrors(t,n){const r=this.getOrCreateErrorBlock(n),o=Array.isArray(t)?[...new Set([...t])]:[t];return fn(r,qr,o),this}clearErrors(t){const n=this.getOrCreateErrorBlock(t);return fn(n,qr,[]),this}}function RM(e,t){const n=La(e),r=La(t);if(e===t||!n&&!r)return[];if(n&&!r)return ei(e);if(!n&&r)return ei(t);{const o=ei(uK(e,(l,c)=>!An(l,Ie(t,c)))),s=DH(ei(t),ei(e));return[...o,...s]}}function Kle(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 eI(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 tI(e,t,n={},r=!0){const o={type:t||"text",...eI(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 OM={props:{disabled:!1},submitText:"Submit",norender:!1};function nI(e={}){const t=ct(e);if(t&&t[xy]){const n=t[xy];return{...OM,...n}}return OM}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 CE(){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,GP("test-id-")),e.get(n)}})}var q1={exports:{}},un={};var AM;function Gle(){if(AM)return un;AM=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 _(x){if(typeof x=="object"&&x!==null){var w=x.$$typeof;switch(w){case e:switch(x=x.type,x){case n:case o:case r:case d:case h:return x;default:switch(x=x&&x.$$typeof,x){case c:case l:case u:case g:case p:case s:return x;default:return w}}case t:return w}}}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(x){return _(x)===l},un.isContextProvider=function(x){return _(x)===s},un.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===e},un.isForwardRef=function(x){return _(x)===u},un.isFragment=function(x){return _(x)===n},un.isLazy=function(x){return _(x)===g},un.isMemo=function(x){return _(x)===p},un.isPortal=function(x){return _(x)===t},un.isProfiler=function(x){return _(x)===o},un.isStrictMode=function(x){return _(x)===r},un.isSuspense=function(x){return _(x)===d},un.isSuspenseList=function(x){return _(x)===h},un.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===n||x===o||x===r||x===d||x===h||x===b||typeof x=="object"&&x!==null&&(x.$$typeof===g||x.$$typeof===p||x.$$typeof===s||x.$$typeof===l||x.$$typeof===u||x.$$typeof===y||x.getModuleId!==void 0)},un.typeOf=_,un}var kM;function Zle(){return kM||(kM=1,q1.exports=Gle()),q1.exports}var Wle=Zle();const MM=es(Wle),B1={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 Yle(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 Qi(e,t,n={}){const r=Ri(e);if(typeof t=="function"||t&&MM.isForwardRef(k.createElement(t))||MM.isMemo(t))return Yle(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 Qi(e,o,n)}if(typeof r=="string"){if(!(r in B1))throw new Error(`No widget for type '${r}' in schema: ${JSON.stringify(e)}`);if(t in B1[r]){const o=n[B1[r][t]];return Qi(e,o,n)}}throw new Error(`No widget '${t}' for type '${r}' in schema: ${JSON.stringify(e)}`)}function Xle(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 Qle(e){const t=new Set;return JSON.stringify(e,(n,r)=>(t.add(n),r)),JSON.stringify(e,Array.from(t).sort())}function qi(e){return Xle(Qle(e))}function Jle(e){return qi(e)}function ece(e,t,n={}){try{return Qi(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 pc(e,t){return`${Fa(e)?e:e[_n]}__${t}`}function mc(e){return pc(e,"description")}function TE(e){return pc(e,"error")}function gh(e){return pc(e,"examples")}function RE(e){return pc(e,"help")}function b0(e){return pc(e,"title")}function bo(e,t=!1){const n=t?` ${gh(e)}`:"";return`${TE(e)} ${mc(e)} ${RE(e)}${n}`}function Zl(e,t){return`${e}-${t}`}function Bi(e,t){return pc(e,t)}function H1(e,t){return pc(e,`optional${t}`)}function yf(e){return!ny(e)&&(!Gt(e)||Array.isArray(e)||!vr(e))}function tce(e,t){const{rootSchema:n,schemaUtils:r}=e;if(ka(t,n))return!0;if(In in n){const o=r.retrieveSchema(n);return ka(t,o)}return!1}function rI(e,t,n){return t?n:e}function nce(e){return e?new Date(e).toJSON():void 0}function OE(e,t,n){const r=[Bae];return Ft(e,dM)&&r.unshift(dM),Ie(e,[...r,t],n)}function rce(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 K1(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 Vd(e){if(e.const||e.enum&&e.enum.length===1&&e.enum[0]===!0)return!0;if(e.anyOf&&e.anyOf.length===1)return Vd(e.anyOf[0]);if(e.oneOf&&e.oneOf.length===1)return Vd(e.oneOf[0]);if(e.allOf){const t=n=>Vd(n);return e.allOf.some(t)}return!1}function oI(e,t,n,r="customDeep"){if(r==="always")return!0;if(r==="shallow"){const{props:l,state:c}=e;return!TM(l,t)||!TM(c,n)}const{props:o,state:s}=e;return!An(o,t)||!An(s,n)}function jM(e){const t=KP(e.map(n=>Gt(n)?Ri(n):void 0).flat().filter(n=>n!==void 0));return t.length===1?t[0]:t}function Gh(e,t,n,r){const{enableOptionalDataFieldForType:o=[]}=ct(r,e.globalUiOptions);let s;return Kt in t&&Array.isArray(t[Kt])?s=jM(t[Kt]):Mt in t&&Array.isArray(t[Mt])?s=jM(t[Mt]):s=Ri(t),!tce(e,t)&&!n&&!!s&&!Array.isArray(s)&&!!o.find(l=>l===s)}function PM(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 AE(e,t=[]){if(!e)return[];let n=[];return qr in e&&(n=n.concat(e[qr].map(r=>{const o=`.${t.join(".")}`;return{property:o,message:r,stack:`${o} ${r}`}}))),Object.keys(e).reduce((r,o)=>{if(o!==qr){const s=e[o];La(s)&&(r=r.concat(AE(s,[...t,o])))}return r},n)}function oce(e){const t=new J$;return e.length&&e.forEach(n=>{const{property:r,message:o}=n,s=r==="."?[]:BP(r);s.length>0&&s[0]===""&&s.splice(0,1),o&&t.addErrors(o,s)}),t.ErrorSchema}function li(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 iI(e){return Object.keys(e).reduce((t,n)=>{if(n==="addError")return t;{const r=e[n];return La(r)?{...t,[n]:iI(r)}:{...t,[n]:r}}},{})}function ice(e){return Object.values(e).every(t=>t!==-1)}function sce(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,x=k.useCallback(w=>s(n,w),[s,n]);return j.jsx(_,{schema:{type:"integer"},id:y,name:c,className:t,options:{enumOptions:W$(r[0],r[1])},placeholder:n,value:o,disabled:u,readonly:d,autofocus:h,onChange:x,onBlur:g,onFocus:b,registry:p,label:"","aria-describedby":bo(l)})}function ace(e){const{time:t=!1,disabled:n=!1,readonly:r=!1,options:o,onChange:s,value:l}=e,[c,u]=k.useState(K1(l,t));k.useEffect(()=>{u(K1(l,t))},[t,l]);const d=k.useCallback((b,y)=>{const _={...c,[b]:typeof y>"u"?-1:y};ice(_)?s(PM(_,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=K1(new Date().toJSON(),t);s(PM(y,t))},[n,r,t,s]);return{elements:k.useMemo(()=>Kle(c,t,o.yearsRange,o.format),[c,t,o.yearsRange,o.format]),handleChange:d,handleClear:h,handleSetNow:p}}function gc(e){const t=k.useRef(e);return ka(e,t.current)||(t.current=e),t.current}function lce(e,t){return e.replace(";base64",`;name=${encodeURIComponent(t)};base64`)}function cce(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:lce(c.target.result,t),name:t,size:n,type:r}):o({dataURL:null,name:t,size:n,type:r})},l.readAsDataURL(e)})}function uce(e){return Promise.all(Array.from(e).map(cce))}function NM(e){return e.reduce((t,n)=>{if(!n)return t;try{const{blob:r,name:o}=qle(n);return[...t,{dataURL:n,name:o,size:r.size,type:r.type}]}catch{return t}},[])}function fce(e,t,n=!1){const r=k.useMemo(()=>n&&e?Array.isArray(e)?e:[e]:[],[e,n]),o=k.useMemo(()=>Array.isArray(e)?NM(e):NM([e||""]),[e]),s=k.useCallback(c=>{uce(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 dce(e){if(!e)return"";const t=new Date(e),n=_a(t.getFullYear(),4),r=_a(t.getMonth()+1,2),o=_a(t.getDate(),2),s=_a(t.getHours(),2),l=_a(t.getMinutes(),2),c=_a(t.getSeconds(),2),u=_a(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=AE(t),l=t;return vr(o)||(l=mh(o,t,n?"preventDuplicates":!0),s=[...r].concat(s)),{errorSchema:l,errors:s}}function hce(e){for(const t in e){const n=e,r=n[t];t===In&&typeof r=="string"&&r.startsWith("#")?n[t]=A$+r:n[t]=kE(r)}return e}function pce(e){for(let t=0;t<e.length;t++)e[t]=kE(e[t]);return e}function kE(e){return Array.isArray(e)?pce([...e]):Gt(e)?hce({...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 Hw(){return GP("rjsf-array-item-")}function DM(e){return Array.isArray(e)?e.map(t=>({key:Hw(),item:t})):[]}function sI(e){return Array.isArray(e)?e.map(t=>t.item):[]}function mce(e){return Array.isArray(e.type)?!e.type.includes("null"):e.type!=="null"}function aI(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 lI(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 gce(e,t){const{schemaUtils:n,globalFormOptions:r}=e;let o=t.items;return r.useFallbackUiForUnsupportedType&&!o?o={}:xE(t)&&Lae(t)&&(o=t.additionalItems),n.getDefaultFormState(o)}function yce(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:x,schemaUtils:w,globalFormOptions:v,globalUiOptions:C}=g,S=w.retrieveSchema(t.items,o),T=Ku(S,r),{widget:E="select",title:O,...M}=ct(r,C),P=Qi(t,E,x),I=O??t.title??y,z=w.getDisplayLabel(t,r,C),U=gc(li("",v,n,!0));return j.jsx(P,{id:U[_n],name:y,multiple:!0,onChange:_,onBlur:h,onFocus:p,options:{...M,enumOptions:T},schema:t,uiSchema:r,registry:g,value:o,disabled:s,readonly:l,required:u,label:I,hideLabel:!z,placeholder:d,autofocus:c,rawErrors:b,htmlName:U.name})}function vce(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:x}=e,{widgets:w,schemaUtils:v,globalFormOptions:C,globalUiOptions:S}=b,{widget:T,title:E,...O}=ct(r,S),M=Qi(t,T,w),P=E??t.title??_,I=v.getDisplayLabel(t,r,S),z=gc(li("",C,n,!0));return j.jsx(M,{id:z[_n],name:_,multiple:!0,onChange:x,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:!I,placeholder:d,autofocus:l,rawErrors:y,htmlName:z.name})}function bce(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:x,globalFormOptions:w,globalUiOptions:v}=p,{widget:C="files",title:S,...T}=ct(n,v),E=Qi(t,C,_),O=S??t.title??o,M=x.getDisplayLabel(t,n,v),P=gc(li("",w,r,!0));return j.jsx(E,{options:T,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 cI(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:x,itemFieldPathId:w,itemErrorSchema:v,autofocus:C,onBlur:S,onFocus:T,onChange:E,rawErrors:O,totalItems:M,title:P,handleAddItem:I,handleCopyItem:z,handleRemoveItem:U,handleReorderItems:G}=e,{schemaUtils:J,fields:{ArraySchemaField:ee,SchemaField:Z},globalUiOptions:H}=c,Y=gc(w),oe=ee||Z,ne=mt("ArrayFieldItemTemplate",c,u),$=J.getDisplayLabel(y,x,H),{description:q}=ct(x),V=!!q||!!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 ae=k.useCallback(_e=>{I(_e,n+1)},[I,n]),ge=k.useCallback(_e=>{z(_e,n)},[z,n]),ke=k.useCallback(_e=>{U(_e,n)},[U,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:x,formData:_,errorSchema:v,fieldPathId:Y,required:mce(y),onChange:E,onBlur:S,onFocus:T,registry:c,disabled:o,readonly:l,hideError:s,autofocus:C,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:ae,onCopyItem:ge,onRemoveItem:ke,onMoveUpItem:Q,onMoveDownItem:ie,registry:c,schema:y,uiSchema:x},itemKey:t,className:"rjsf-array-item",disabled:o,hasToolbar:re.toolbar,index:n,totalItems:M,readonly:l,registry:c,schema:y,uiSchema:x,parentUiSchema:d,displayLabel:$,hasDescription:V};return j.jsx(ne,{...de})}function Sce(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:x,onChange:w,keyedFormData:v,handleAddItem:C,handleCopyItem:S,handleRemoveItem:T,handleReorderItems:E}=e,O=t.title||c||l,{schemaUtils:M,fields:P,formContext:I,globalFormOptions:z,globalUiOptions:U}=b,{OptionalDataControlsField:G}=P,J=ct(n,U),ee=Gt(t.items)?t.items:{},Z=M.retrieveSchema(ee),H=sI(v),Y=Gh(b,t,p,n),oe=yf(s),ne=aI(b,t,H,n)&&(!Y||oe),$=oe?v:[],q=Y?" rjsf-optional-array-field":"",V=e.childFieldPathId??o,D=Y?j.jsx(G,{...e,fieldPathId:V}):void 0,B={canAdd:ne,items:$.map((re,ae)=>{const{key:ge,item:ke}=re,Q=ke,ie=M.retrieveSchema(ee,Q),de=r?r[ae]:void 0,_e=li(ae,z,V),Te=lI(n,ke,ae,I),xe={itemKey:ge,index:ae,name:l&&`${l}-${ae}`,registry:b,uiOptions:J,hideError:g,readonly:d,disabled:u,required:p,title:O?`${O}-${ae+1}`:void 0,canAdd:ne,canMoveUp:ae>0,canMoveDown:ae<H.length-1,itemSchema:ie,itemFieldPathId:_e,itemErrorSchema:de,itemData:Q,itemUiSchema:Te,autofocus:h&&ae===0,onBlur:y,onFocus:_,rawErrors:x,totalItems:v.length,handleAddItem:C,handleCopyItem:S,handleRemoveItem:T,handleReorderItems:E,onChange:w};return j.jsx(cI,{...xe},ge)}),className:`rjsf-field rjsf-field-array rjsf-field-array-of-${Z.type}${q}`,disabled:u,fieldPathId:o,uiSchema:n,onAddClick:C,readonly:d,required:p,schema:t,title:O,formData:H,rawErrors:x,registry:b,optionalDataControl:D},te=mt("ArrayFieldTemplate",b,J);return j.jsx(te,{...B})}function wce(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:x,keyedFormData:w,onChange:v,handleAddItem:C,handleCopyItem:S,handleRemoveItem:T,handleReorderItems:E}=e;let{formData:O=[]}=e;const M=t.title||c||l,{schemaUtils:P,fields:I,formContext:z,globalFormOptions:U,globalUiOptions:G}=b,J=ct(n,G),{OptionalDataControlsField:ee}=I,Z=Gh(b,t,p,n),H=yf(r),oe=(Gt(t.items)?t.items:[]).map((ae,ge)=>P.retrieveSchema(ae,O[ge])),ne=Gt(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 q=H?w:[],V=Z?" rjsf-optional-array-field":"",D=Z?j.jsx(ee,{...e,fieldPathId:$}):void 0,B=aI(b,t,O,n)&&!!ne&&(!Z||H),te={canAdd:B,className:`rjsf-field rjsf-field-array rjsf-field-array-fixed-items${V}`,disabled:u,fieldPathId:s,formData:r,items:q.map((ae,ge)=>{const{key:ke,item:Q}=ae,ie=Q,de=ge>=oe.length,_e=(de&&Gt(t.additionalItems)?P.retrieveSchema(t.additionalItems,ie):oe[ge])||{},Te=li(ge,U,$);let xe;de?xe=n.additionalItems:Array.isArray(n.items)?xe=n.items[ge]:xe=lI(n,Q,ge,z);const $e=o?o[ge]:void 0,Ze={index:ge,itemKey:ke,name:l&&`${l}-${ge}`,registry:b,uiOptions:J,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:xe,itemFieldPathId:Te,itemErrorSchema:$e,autofocus:h&&ge===0,onBlur:y,onFocus:_,rawErrors:x,totalItems:w.length,onChange:v,handleAddItem:C,handleCopyItem:S,handleRemoveItem:T,handleReorderItems:E};return j.jsx(cI,{...Ze},ke)}),onAddClick:C,readonly:d,required:p,registry:b,schema:t,uiSchema:n,title:M,errorSchema:o,rawErrors:x,optionalDataControl:D},re=mt("ArrayFieldTemplate",b,J);return j.jsx(re,{...te})}function xce(e=[]){const t=k.useMemo(()=>qi(e),[e]),[n,r]=k.useState(()=>({formDataHash:t,keyedFormData:DM(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]})):DM(c),s=t,r({formDataHash:s,keyedFormData:o})}const l=k.useCallback(c=>{const u=sI(c),d=qi(u);return r({formDataHash:d,keyedFormData:c}),u},[]);return{keyedFormData:o,updateKeyedFormData:l}}function _ce(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}=xce(l),b=e.childFieldPathId??o,y=k.useCallback((E,O)=>{E&&E.preventDefault();let M;if(r){M={};for(const z in r){const U=parseInt(z);O===void 0||U<O?fn(M,[U],r[z]):U>=O&&fn(M,[U+1],r[z])}}const P={key:Hw(),item:gce(s,t)},I=[...p];O!==void 0?I.splice(O,0,P):I.push(P),c(g(I),b.path,M)},[p,s,t,c,g,r,b]),_=k.useCallback((E,O)=>{E&&E.preventDefault();let M;if(r){M={};for(const z in r){const U=parseInt(z);U<=O?fn(M,[U],r[z]):U>O&&fn(M,[U+1],r[z])}}const P={key:Hw(),item:Ph(p[O].item)},I=[...p];O!==void 0?I.splice(O+1,0,P):I.push(P),c(g(I),b.path,M)},[p,c,g,r,b]),x=k.useCallback((E,O)=>{E&&E.preventDefault();let M;if(r){M={};for(const I in r){const z=parseInt(I);z<O?fn(M,[z],r[I]):z>O&&fn(M,[z-1],r[I])}}const P=p.filter((I,z)=>z!==O);c(g(P),b.path,M)},[p,c,g,r,b]),w=k.useCallback((E,O,M)=>{E&&(E.preventDefault(),E.currentTarget.blur());let P;if(r){P={};for(const U in r){const G=parseInt(U);G==O?fn(P,[M],r[O]):G==M?fn(P,[O],r[M]):fn(P,[U],r[G])}}function I(){const U=p.slice();return U.splice(O,1),U.splice(M,0,p[O]),U}const z=I();c(g(z),b.path,P)},[p,c,g,r,b]),v=k.useCallback((E,O,M,P)=>{c(E===void 0?null:E,O,M,P)},[c]),C=k.useCallback(E=>{c(E,b.path,void 0,b?.[_n])},[c,b]),S={...e,formData:l,fieldPathId:b,onSelectChange:C},T={...e,handleAddItem:y,handleCopyItem:_,handleRemoveItem:x,handleReorderItems:w,keyedFormData:p,onChange:v};if(!(Hu 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 E={...t,[Hu]:{type:void 0}};S.schema=E,T.schema=E}return d.isMultiSelect(S.schema)?j.jsx(yce,{...S}):G$(n)?j.jsx(vce,{...S}):xE(S.schema)?j.jsx(wce,{...T}):d.isFilesArray(S.schema,n)?j.jsx(bce,{...S}):j.jsx(Sce,{...T})}function Ece(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:x}=e,{title:w}=t,{widgets:v,translateString:C,globalUiOptions:S}=l,{widget:T="checkbox",title:E,label:O=!0,enumNames:M,...P}=ct(r,S),I=Qi(t,T,v),z=C(Dt.YesLabel),U=C(Dt.NoLabel);let G;const J=E??w??g??n;if(Array.isArray(t.oneOf))G=Ku({oneOf:t.oneOf.map(Z=>{if(Gt(Z))return{...Z,title:Z.title||(Z.const===!0?z:U)}}).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]?z:U},{value:Z[1],label:Z[1]?z:U}]:G=Ku({enum:Z},r)}const ee=k.useCallback((Z,H,Y)=>b(Z,o.path,H,Y),[b,o]);return j.jsx(I,{options:{...P,enumOptions:G},schema:t,uiSchema:r,id:o.$id,name:n,onChange:ee,onFocus:y,onBlur:_,label:J,hideLabel:!O,value:s,required:c,disabled:u,readonly:d,hideError:h,registry:l,autofocus:p,rawErrors:x,htmlName:o.name})}function Cce(e){return{type:"string",enum:["string","number","boolean","object","array"],default:"string",title:e}}function Tce(e){const t=typeof e;return t==="string"||t==="number"||t==="boolean"?t:t==="object"?Array.isArray(e)?"array":"object":"string"}function Rce(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 Oce(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:x,fields:w,globalFormOptions:v}=g,[C,S]=k.useState(Tce(n)),T=ct(l),E=gc(li("__internal_type_selector",v,b)),O=x(Dt.Type),M=k.useMemo(()=>Cce(O),[O]),P=U=>{U!=null&&(S(U),y(Rce(n,U),b.path,_,t))};if(!v.useFallbackUiForUnsupportedType){const{reason:U=x(Dt.UnknownFieldType,[String(o.type)])}=e,G=mt("UnsupportedFieldTemplate",g,T);return j.jsx(G,{schema:o,fieldPathId:b,reason:U,registry:g})}const I=mt("FallbackFieldTemplate",g,T),{SchemaField:z}=w;return j.jsx(I,{schema:o,registry:g,typeSelector:j.jsx(z,{fieldPathId:E,name:`${s}__fallback_type`,schema:M,formData:C,onChange:P,onBlur:h,onFocus:p,registry:g,hideLabel:!r,disabled:u,readonly:d,required:c},n?qi(n):"__empty__"),schemaField:j.jsx(z,{...e,schema:{type:C,title:x(Dt.Value),...C==="object"&&{additionalProperties:!0}}})})}var Hi;(function(e){e.ROW="ui:row",e.COLUMN="ui:col",e.COLUMNS="ui:columns",e.CONDITION="ui:condition"})(Hi||(Hi={}));var qd;(function(e){e.ALL="all",e.SOME="some",e.NONE="none"})(qd||(qd={}));const Ace=/^\$lookup=(.+)/,G1="layoutGrid";function $M(e,t){return e??t}function kce(e){return/^\d+?$/.test(e)}const Na=CE();function Mce(e,t,n,r,o){const s=Ie(n,[Fw],{}),l=Ie(n,e),c={...Ie(l,[ja],{}),...t,...s},u={...l};vr(c)||fn(u,[ja],c),vr(s)||fn(u,[Fw],s);let{readonly:d}=ct(u);return(o===!0||FP(d)&&r===!0)&&(d=!0,Ft(c,P1)?fn(u,[ja,P1],!0):fn(u,`ui:${P1}`,!0)),{fieldUiSchema:u,uiReadonly:d}}function jce(e,t,n="$0m3tH1nG Un3xP3cT3d"){const r=US([t]).sort(),o=US([n]).sort();switch(e){case qd.ALL:return ka(r,o);case qd.SOME:return XO(r,o).length>0;case qd.NONE:return XO(r,o).length===0;default:return!1}}function S0(e,t,n){let r={},o=e[t];if(La(o)){const{children:s,className:l,...c}=o;if(o=s,l){const d=l.split(" ").map(h=>OE(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 IM(e,t,n){let r;if(kce(n)&&e&&e?.type==="array"&&Ft(e,Hu)){const o=Number(n),s=e[Hu];Array.isArray(s)?o>s.length?r=IP(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 Pce(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(x=>{if(u=li(x,l,u),Ft(p,nn))c=Ie(p,[nn,x],{});else if(p&&(Ft(p,Mt)||Ft(p,Kt))){const w=Ft(p,Mt)?Mt:Kt,v=s.findSelectedOptionInXxxOf(p,x,w,g);c=Ie(v,[nn,x],{})}else{const w=IM(p,u,x);c=w.rawSchema??{},u=w.fieldPathId}g=Ie(g,x,{}),p=s.retrieveSchema(c,g),b=$M(p.readOnly,b)});let y,_=!1;if(vr(p)&&(p=void 0),p&&h){if(p&&(Ft(p,Mt)||Ft(p,Kt))){const w=Ft(p,Mt)?Mt:Kt;p=s.findSelectedOptionInXxxOf(p,h,w,g)}u=li(h,l,u),_=p!==void 0&&Array.isArray(p.required)&&KH(p.required,h);const x=IM(p,u,h);if(x.rawSchema?(p=x.rawSchema,u=x.fieldPathId):(p=Ie(p,[nn,h]),p=p&&s.retrieveSchema(p)),b=$M(p?.readOnly,b),p&&(Ft(p,Mt)||Ft(p,Kt))){const w=Ft(p,Mt)?Mt:Kt,v=Xi(p);y={options:p[w],hasDiscriminator:!!v}}}return{schema:p,isRequired:_,isReadonly:b,optionsInfo:y,fieldPathId:u}}function Nce(e,t){let n=e;return Fa(n)&&(n=OE(t,n)),Rh(n)?n:null}function Dce(e,t){let n,r=null,o={},s;if(Fa(t)||FP(t))n=t??"";else{const{name:l="",render:c,...u}=t;n=l,o=u,vr(o)||$H(o,(d,h)=>{if(Fa(d)){const p=Ace.exec(d);if(Array.isArray(p)&&p.length>1){const g=p[1];o[h]=OE(e,g,g)}}}),r=Nce(c,e),!l&&r&&(s=j.jsx(r,{...u,"data-testid":Na.uiComponent}))}return{name:n,UIComponent:r,uiProps:o,rendered:s}}function w0(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(ME,{...n,key:`layoutGrid-${qi(u)}`,schema:c,layoutGridSchema:u}))}function $ce(e){const{layoutGridSchema:t,...n}=e,{formData:r,registry:o}=n,{children:s,gridProps:l}=S0(t,Hi.CONDITION,o),{operator:c,field:u="",value:d}=l,h=Ie(r,u,null);return jce(c,h,d)?j.jsx(w0,{...n,childrenLayoutGridSchemaId:s}):null}function Ice(e){const{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:o}=n,{children:s,gridProps:l}=S0(t,Hi.COLUMN,r),c=ct(o),u=mt("GridTemplate",r,c);return j.jsx(u,{column:!0,"data-testid":Na.col,...l,children:j.jsx(w0,{...n,childrenLayoutGridSchemaId:s})})}function zce(e){const{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:o}=n,{children:s,gridProps:l}=S0(t,Hi.COLUMNS,r),c=ct(o),u=mt("GridTemplate",r,c);return s.map(d=>j.jsx(u,{column:!0,"data-testid":Na.col,...l,children:j.jsx(w0,{...n,childrenLayoutGridSchemaId:[d]})},`column-${qi(d)}`))}function Lce(e){const{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:o}=n,{children:s,gridProps:l}=S0(t,Hi.ROW,r),c=ct(o),u=mt("GridTemplate",r,c);return j.jsx(u,{...l,"data-testid":Na.row,children:j.jsx(w0,{...n,childrenLayoutGridSchemaId:s})})}function Fce(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:x}=y,w=Dce(h,t),{name:v,UIComponent:C,uiProps:S}=w,{schema:T,isRequired:E,isReadonly:O,optionsInfo:M,fieldPathId:P}=Pce(h,v,n,u,s),I=gc(P);if(w.rendered)return w.rendered;if(T){const z=M?.hasDiscriminator?x:_,{fieldUiSchema:U,uiReadonly:G}=Mce(v,S,r,O,d);return j.jsx(z,{"data-testid":M?.hasDiscriminator?Na.layoutMultiSchemaField:Na.field,...g,name:v,required:E,readonly:G,schema:T,uiSchema:U,errorSchema:Ie(o,v),fieldPathId:I,formData:Ie(u,v),onChange:b,onBlur:l,onFocus:c,options:M?.options,registry:h})}return C?j.jsx(C,{"data-testid":Na.uiComponent,...g,name:v,required:E,formData:u,readOnly:!!O||d,errorSchema:o,uiSchema:r,schema:n,fieldPathId:s,onBlur:l,onFocus:c,registry:h,...S}):null}function ME(e){const{uiSchema:t}=e;let{layoutGridSchema:n}=e;const r=ct(t);if(!n&&G1 in r&&Gt(r[G1])&&(n=r[G1]),Gt(n)){if(Hi.ROW in n)return j.jsx(Lce,{...e,layoutGridSchema:n});if(Hi.COLUMN in n)return j.jsx(Ice,{...e,layoutGridSchema:n});if(Hi.COLUMNS in n)return j.jsx(zce,{...e,layoutGridSchema:n});if(Hi.CONDITION in n)return j.jsx($ce,{...e,layoutGridSchema:n})}return j.jsx(Fce,{...e,gridSchema:n})}ME.TEST_IDS=Na;function Uce(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:b0(t),title:p,required:s,schema:r,uiSchema:o,registry:l})}function Z1(e,t,n){const r="!@#!@$@#$!@$#";return e.map(({schema:s})=>s).find(s=>{const l=Ie(s,[nn,t]);return Ie(l,y0,Ie(l,ai,r))===n})}function zM(e,t,n,r,o){const s=t.map(u=>n.retrieveSchema(u,o));let l=e;Ft(e,Mt)?l={...e,[Mt]:s}:Ft(e,Kt)&&(l={...e,[Kt]:s});const c=Ku(l,r);if(!c)throw new Error(`No enumOptions were computed from the schema ${JSON.stringify(l)}`);return c}function Vce(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:x,hideError:w=!1}=e,{widgets:v,schemaUtils:C,globalUiOptions:S}=h,[T,E]=k.useState(zM(g,u,C,p,o)),O=Ie(s,_n),M=Xi(g),P=mt("FieldErrorTemplate",h,u),I=mt("FieldTemplate",h,u),z=qi(g),U=qi(u),G=p?qi(p):"",J=o?qi(o):"";k.useEffect(()=>{E(zM(g,u,C,p,o))},[z,U,C,G,J]);const{widget:ee=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 q=Ie(T[0]?.schema,[nn,Y],{});const V=Z1(T,Y,$);q=q?.type?q:{...q,type:V?.type||n};const D=Qi(q,ee,v),B=oe===void 0?w:!!oe,te=Ie(x,[qr],[]),re=nh(x,[qr]),ae=C.getDisplayLabel(g,p,S),ge=ie=>{const de=Z1(T,Y,ie),_e=Z1(T,Y,$);let Te=C.sanitizeDataForNewSchema(de,_e,o);Te&&de&&(Te=C.getDefaultFormState(de,Te,"excludeObjectChildren")),Te&&fn(Te,Y,ie),c(Te,s.path,void 0,O)},ke={enumOptions:T,...ne},Q=!B&&te.length>0?j.jsx(P,{fieldPathId:s,schema:g,errors:te,registry:h}):void 0;return j.jsx(I,{id:O,schema:g,label:(Z||g.title)??"",disabled:r||Array.isArray(T)&&vr(T),uiSchema:p,required:_,readonly:!!y,registry:h,displayLabel:ae,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(T)&&vr(T),uiSchema:p,autofocus:b,readonly:y,required:_,registry:h,multiple:!1,rawErrors:te,hideError:B,hideLabel:!ae,errorSchema:re,placeholder:H,onChange:ge,onBlur:l,onFocus:d,value:$,options:ke,htmlName:s.name})})}class LM 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=Xi(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:x}=d,{SchemaField:w}=b,v=mt("MultiSchemaFieldTemplate",d,_),C=Gh(d,h,u,p),S=yf(o),{selectedOption:T,retrievedOptions:E}=this.state,{widget:O="select",placeholder:M,autofocus:P,autocomplete:I,title:z=h.title,...U}=ct(p,_),G=Qi({type:"number"},O,g),J=Ie(r,qr,[]),ee=nh(r,[qr]),Z=x.getDisplayLabel(h,p,_),H=T>=0&&E[T]||null;let Y;if(H){const{required:te}=h;Y=te?Ds({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 "${z||t}"`):Kt in h&&p&&Kt in p&&(Array.isArray(p[Kt])?oe=p[Kt]:console.warn(`uiSchema.anyOf is not an array for "${z||t}"`));let ne=p;T>=0&&oe.length>T&&(ne=oe[T]);const $=z?Dt.TitleOptionPrefix:Dt.OptionPrefix,q=z?[z]:[],V=E.map((te,re)=>{const{title:ae=te.title}=ct(oe[re]);return{label:ae||y($,q.concat(String(re+1))),value:re}}),D=!C||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(V),multiple:!1,rawErrors:J,errorSchema:ee,value:T>=0?T:void 0,options:{enumOptions:V,...U},registry:d,placeholder:M,autocomplete:I,autofocus:P,label:z??t,hideLabel:!Z,readonly:c}):void 0,B=Y&&Y.type!=="null"&&j.jsx(w,{...this.props,schema:Y,uiSchema:ne})||null;return j.jsx(v,{schema:h,registry:d,uiSchema:p,selector:D,optionSchemaField:B})}}const qce=/\.([0-9]*0)*$/,Bce=/[0.]0*$/;function Hce(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(qce)?fM(h.replace(Bce,"")):fM(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 Li(){return Li=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},Li.apply(null,arguments)}const fg=["strong","em","del","mark"],FM=[["**",fg[0]],["__",fg[0]],["~~",fg[2]],["==",fg[3]],["*","em"],["_","em"]];function Kce(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 Gce(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=FM[l][0];if(e.startsWith(c)&&e.length>=2*c.length){r=c,o=c.length,s=FM[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 x=e[u];if(y)b+=x,y=!1,_=x,u++;else if(x!=="\\")if(x!=="`"||g!==0){if(x==="["&&!d&&g===0){var w=Kce(e,u);if(w!==-1){b+=e.slice(u,w),u=w,_=e[w-1];continue}}if(h)b+=x,p?x===p&&(p=""):x==='"'||x==="'"?p=x:x===">"&&(h=!1),_=x,u++;else if(x!=="<"||d){if(x===`
|
|
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 C=[e.slice(0,u+v),s,b+e.slice(u+o,u+v)];return C.index=0,C.input=e,C}}b+=x,_=x,u++}else{var S=e[u+1],T=e.indexOf(">",u);if(T!==-1){var E=e.slice(u,T+1).endsWith("/>");S==="/"?g=Math.max(0,g-1):E||g++}h=!0,b+=x,_=x,u++}}else d=!d,b+=x,_=x,u++;else b+=x,y=!0,_=x,u++}return null}const Zce=["children","options"],UM=["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"}),VM={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},Wce=["style","script","pre"],Yce=["src","href","data","formAction","srcDoc","action"],Xce=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,Qce=/\n{2,}$/,qM=/^(\s*>[\s\S]*?)(?=\n\n|$)/,Jce=/^ *> ?/gm,eue=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,tue=/^ {2,}\n/,nue=/^(?:([-*_])( *\1){2,}) *(?:\n *)+\n/,BM=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,HM=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,rue=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,oue=/^(?:\n *)*\n/,iue=/\r\n?/g,sue=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,aue=/^\[\^([^\]]+)]/,lue=/\f/g,cue=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,uue=/^\[(x|\s)\]/,KM=/^(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,GM=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,ZM=/^([^\n]+)\n *(=|-)\2{2,} *\n/,jE=/^<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>/i;function fue(e){const t=jE.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 x=e[p+1+_];if(x!==r[_]&&x!==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 x=e[y];if(x!==" "&&x!==" "&&x!==`
|
|
64
|
+
`&&x!=="\r")break;y++}if(y+r.length>d)return null;let _=!0;for(let x=0;x<r.length;x++){const w=e[y+x];if(w!==r[x]&&w!==n[x]){_=!1;break}}if(!_){s=y;continue}for(y+=r.length;y<d;){const x=e[y];if(x!==" "&&x!==" "&&x!==`
|
|
65
|
+
`&&x!=="\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 due=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,WM=/^<!--[\s\S]*?(?:-->)/,hue=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,Kw=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,pue=/^\{.*\}$/,mue=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,gue=/^<([^ >]+[:@\/][^ >]+)>/,yue=/-([a-z])?/gi,YM=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,vue=/^[^\n]+(?: \n|\n{2,})/,bue=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,Sue=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,wue=/^\[([^\]]*)\] ?\[([^\]]*)\]/,xue=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,_ue=/\t/g,Eue=/(^ *\||\| *$)/g,Cue=/^ *:-+: *$/,Tue=/^ *:-+ *$/,Rue=/^ *-+: *$/,Oue=/^(:[a-zA-Z0-9-_]+:)/,Aue=/^\\([^0-9A-Za-z\s])/,kue=/\\([^0-9A-Za-z\s])/g,Mue=/^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/,jue=/^\n+/,Pue=/^([ \t]*)/,Nue=/(?:^|\n)( *)$/,PE="(?:\\d+\\.)",NE="(?:[*+-])";function uI(e){return"( *)("+(e===1?PE:NE)+") +"}const fI=uI(1),dI=uI(2);function hI(e){return RegExp("^"+(e===1?fI:dI))}const Due=hI(1),$ue=hI(2);function pI(e){return RegExp("^"+(e===1?fI:dI)+"[^\\n]*(?:\\n(?!\\1"+(e===1?PE:NE)+" )[^\\n]*)*(\\n|$)","gm")}const Iue=pI(1),zue=pI(2);function mI(e){const t=e===1?PE:NE;return RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const gI=mI(1),yI=mI(2);function XM(e,t){const n=t===1,r=n?gI:yI,o=n?Iue:zue,s=n?Due:$ue;return{t:l=>s.test(l),o:Ra(function(l,c){const u=Nue.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(Qce,`
|
|
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 x=y.replace(g,"").replace(s,""),w=_===h.length-1,v=$i(x,`
|
|
68
|
+
|
|
69
|
+
`)||w&&b;b=v;const C=u.inline,S=u.list;let T;u.list=!0,v?(u.inline=!1,T=Bd(x)+`
|
|
70
|
+
|
|
71
|
+
`):(u.inline=!0,T=Bd(x));const E=c(T,u);return u.inline=C,u.list=S,E}),ordered:n,start:d}}}}const Lue=RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),Fue=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;function QM(e){return typeof e=="string"}function Bd(e){let t=e.length;for(;t>0&&e[t-1]<=" ";)t--;return e.slice(0,t)}function Gw(e,t){return e.startsWith(t)}function $i(e,t){return e.indexOf(t)!==-1}function Uue(e,t,n){if(Array.isArray(n)){for(let r=0;r<n.length;r++)if(Gw(e,n[r]))return!0;return!1}return n(e,t)}function xd(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 Vue(e){return Rue.test(e)?"right":Cue.test(e)?"center":Tue.test(e)?"left":null}function JM(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 que(e,t,n){n.inline=!0;const r=e[2]?e[2].replace(Eue,"").split("|").map(Vue):[],o=e[3]?(function(l,c,u){return l.trim().split(`
|
|
72
|
+
`).map(function(d){return JM(d,c,u,!0)})})(e[3],t,n):[],s=JM(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 e3(e,t){return e.align[t]==null?{}:{textAlign:e.align[t]}}function Ra(e){return e.inline=1,e}function Sa(e){return Ra(function(t,n){return n.inline?e.exec(t):null})}function dg(e){return Ra(function(t,n){return n.inline||n.simple?e.exec(t):null})}function Os(e){return function(t,n){return n.inline||n.simple?null:e.exec(t)}}function t3(e){return Ra(function(t){return e.exec(t)})}const Bue=/(javascript|vbscript|data(?!:image)):/i;function Hue(e){try{const t=decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"");if(Bue.test(t))return null}catch{return null}return e}function Ii(e){return e&&e.replace(kue,"$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 Kue(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 Gue(e,t,n){const r=n.inline||!1;n.inline=!1;const o=e(t,n);return n.inline=r,o}const Zue=(e,t,n)=>({children:Bg(t,e[2],n)});function W1(){return{}}function Wue(...e){return e.filter(Boolean).join(" ")}function Y1(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 X1(e,t,n,r){if(!t||!t.trim())return null;const o=t.match(Xce);return o?o.reduce(function(s,l){const c=l.indexOf("=");if(c!==-1){const u=(function(p){return p.indexOf("-")!==-1&&p.match(hue)===null&&(p=p.replace(yue,function(g,b){return b.toUpperCase()})),p})(l.slice(0,c)).trim(),d=UM[u]||u;if(d==="ref")return s;const h=s[d]=(function(p,g,b,y){return g==="style"?(function(_){const x=[];if(!_)return x;let w="",v=0,C="";for(let T=0;T<_.length;T++){const E=_[T];if(E==='"'||E==="'")C?E===C&&(C="",v--):(C=E,v++);else if(E==="("&&w.endsWith("url"))v++;else if(E===")"&&v>0)v--;else if(E===";"&&v===0){const O=w.indexOf(":");O>0&&x.push([w.slice(0,O).trim(),w.slice(O+1).trim()]),w="";continue}w+=E}const S=w.indexOf(":");return S>0&&x.push([w.slice(0,S).trim(),w.slice(S+1).trim()]),x})(b).reduce(function(_,[x,w]){return _[x.replace(/(-[a-z])/g,v=>v[1].toUpperCase())]=y(w,p,x),_},{}):Yce.indexOf(g)!==-1?y(Ii(b),p,g):(b.match(pue)&&(b=Ii(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"&&(jE.test(h)||Kw.test(h))&&(s[d]=r(h.trim()))}else l!=="style"&&(s[UM[l]||l]=!0);return s},{}):null}function n3(e,t){for(let n=0;n<e.length;n++)if(e[n].test(t))return!0;return!1}function Yue(e="",t={}){t.overrides=t.overrides||{},t.namedCodesToUnicode=t.namedCodesToUnicode?Li({},VM,t.namedCodesToUnicode):VM;const n=t.slugify||xd,r=t.sanitizer||Hue,o=t.createElement||k.createElement,s=[qM,BM,HM,t.enforceAtxHeadings?GM:KM,ZM,YM,gI,yI],l=[...s,vue,jE,WM,Kw];function c(y,_,...x){const w=Y1(t.overrides,y+".props",{});return o((function(v,C){const S=Y1(C,v);return S?typeof S=="function"||typeof S=="object"&&"render"in S?S:Y1(C,v+".component",v):v})(y,t.overrides),Li({},_,w,{className:Wue(_?.className,w.className)||void 0}),...x)}function u(y){y=y.replace(cue,"");let _=!1;t.forceInline?_=!0:t.forceBlock||(_=xue.test(y)===!1);const x=g(_?y:Bd(y).replace(jue,"")+`
|
|
73
|
+
|
|
74
|
+
`,{inline:_});if(t.ast)return x;const w=b(x);for(;QM(w[w.length-1])&&!w[w.length-1].trim();)w.pop();if(d.length&&w.push(c("footer",{key:"footer"},d.map(function(S){return c("div",{id:n(S.identifier,xd),key:S.identifier},S.identifier,b(g(S.footnote,{inline:!0})))}))),t.wrapper===null)return w;const v=t.wrapper||(_?"span":"div");let C;if(w.length>1||t.forceWrapper)C=w;else{if(w.length===1)return C=w[0],typeof C=="string"?c("span",{key:"outer"},C):C;C=null}return o(v,Li({key:"outer"},t.wrapperProps),C)}const d=[],h={},p={0:{t:[">"],o:Os(qM),u:1,i(y,_,x){const[,w,v]=y[0].replace(Jce,"").match(eue);return{alert:w,children:_(v,x)}}},1:{t:[" "],o:Sa(tue),u:1,i:W1},2:{t:function(y,_){if(_.inline||_.simple)return!1;var x=y[0];return x==="-"||x==="*"||x==="_"},o:Os(nue),u:1,i:W1},3:{t:[" "],o:Os(HM),u:0,i:y=>({lang:void 0,text:Ii(Bd(y[0].replace(/^ {4}/gm,"")))})},4:{t:["```","~~~"],o:Os(BM),u:0,i:y=>({attrs:X1("code",y[3]||"",r,u),lang:y[2]||void 0,text:y[4],type:"3"})},5:{t:["`"],o:dg(rue),u:3,i:y=>({text:Ii(y[2])})},6:{t:["[^"],o:Os(sue),u:0,i:y=>(d.push({footnote:y[2],identifier:y[1]}),{})},7:{t:["[^"],o:Sa(aue),u:1,i:y=>({target:"#"+n(y[1],xd),text:y[1]})},8:{t:["[ ]","[x]"],o:Sa(uue),u:1,i:y=>({completed:y[1].toLowerCase()==="x"})},9:{t:["#"],o:Os(t.enforceAtxHeadings?GM:KM),u:1,i:(y,_,x)=>({children:Bg(_,y[2],x),id:n(y[2],xd),level:y[1].length})},10:{t:y=>{const _=y.indexOf(`
|
|
75
|
+
`);return _>0&&_<y.length-1&&(y[_+1]==="="||y[_+1]==="-")},o:Os(ZM),u:1,i:(y,_,x)=>({children:Bg(_,y[1],x),level:y[2]==="="?1:2,type:"9"})},11:{t:["<"],o:Ra(fue),u:1,i(y,_,x){const[,w]=y[3].match(Pue),v=RegExp("^"+w,"gm"),C=y[3].replace(v,""),S=n3(l,C)?Gue:Bg,T=y[1].toLowerCase(),E=Wce.indexOf(T)!==-1,O=(E?T:y[1]).trim(),M={attrs:X1(O,y[2],r,u),noInnerParse:E,tag:O};if(x.inAnchor=x.inAnchor||T==="a",E)M.text=y[3];else{const P=x.inHTML;x.inHTML=!0,M.children=S(_,C,x),x.inHTML=P}return x.inAnchor=!1,M}},13:{t:["<"],o:t3(Kw),u:1,i(y){const _=y[1].trim();return{attrs:X1(_,y[2]||"",r,u),tag:_}}},12:{t:["<!--"],o:t3(WM),u:1,i:()=>({})},14:{t:["!["],o:dg(Fue),u:1,i:y=>({alt:Ii(y[1]),target:Ii(y[2]),title:Ii(y[3])})},15:{t:["["],o:Sa(Lue),u:3,i:(y,_,x)=>({children:Kue(_,y[1],x),target:Ii(y[2]),title:Ii(y[3])})},16:{t:function(y,_){return!(!_.inline||_.inAnchor)&&y[0]==="<"&&($i(y,":")||$i(y,"@")||$i(y,"/"))},o:Sa(gue),u:0,i(y){let _=y[1],x=!1;return $i(_,"@")&&!$i(_,"//")&&(x=!0,_=_.replace("mailto:","")),{children:[{text:_,type:"27"}],target:x?"mailto:"+_:_,type:"15"}}},17:{t:(y,_)=>!_.inAnchor&&!t.disableAutoLink&&Gw(y,"http"),o:Sa(mue),u:0,i:y=>({children:[{text:y[1],type:"27"}],target:y[1],title:void 0,type:"15"})},20:XM(0,1),30:XM(0,2),19:{t:[`
|
|
76
|
+
`],o:Os(oue),u:3,i:W1},21:{t:function(y,_){return!_.inline&&!_.simple},o:Ra(function(y,_){if(_.inline||_.simple||_.inHTML&&!$i(y,`
|
|
77
|
+
|
|
78
|
+
`)&&!$i(_.prevCapture,`
|
|
79
|
+
|
|
80
|
+
`))return null;let x="",w=0;for(;;){const C=y.indexOf(`
|
|
81
|
+
`,w),S=y.slice(w,C===-1?void 0:C+1),T=y[w];if((T===">"||T==="#"||T==="|"||T==="`"||T==="~"||T==="*"||T==="-"||T==="_"||T===" ")&&n3(s,S)||(x+=S,C===-1||!S.trim()))break;w=C+1}const v=Bd(x);return v===""?null:[x,,v]}),u:3,i:Zue},22:{t:["["],o:Sa(bue),u:0,i:y=>(h[y[1]]={target:y[2],title:y[4]},{})},23:{t:["!["],o:dg(Sue),u:0,i:y=>({alt:y[1]?Ii(y[1]):void 0,ref:y[2]})},24:{t:y=>y[0]==="["&&!$i(y,"]("),o:Sa(wue),u:0,i:(y,_,x)=>({children:_(y[1],x),fallbackChildren:y[0],ref:y[2]})},25:{t:["|"],o:Os(YM),u:1,i:que},27:{o:Ra(function(y,_){let x;return Gw(y,":")&&(x=Oue.exec(y)),x||Mue.exec(y)}),u:4,i(y){const _=y[0];return{text:$i(_,"&")?_.replace(due,(x,w)=>t.namedCodesToUnicode[w]||x):_}}},34:{t:["*","_","~","="],o:Ra(Gce),u:2,i:(y,_,x)=>({children:_(y[2],x),tag:y[1]})},28:{t:["\\"],o:dg(Aue),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 x(w,v){var C=[];if(v.prevCapture=v.prevCapture||"",w.trim())for(;w;)for(var S=0;S<_.length;){var T=_[S],E=y[T];if(!E.t||Uue(w,v,E.t)){var O=E.o(w,v);if(O&&O[0]){w=w.substring(O[0].length);var M=E.i(O,x,v);v.prevCapture+=O[0],M.type||(M.type=T),C.push(M);break}S++}else S++}return v.prevCapture="",C}return _.sort(function(w,v){return y[w].u-y[v].u||(w<v?-1:1)}),function(w,v){return x((function(C){return C.replace(iue,`
|
|
82
|
+
`).replace(lue,"").replace(_ue," ")})(w),v)}})(p),b=(function(y,_,x,w,v){function C(S){return Array.isArray(S)?S.map(T=>"text"in T?T.text:""):"text"in S?S.text:""}return function S(T,E={}){const O=(E.renderDepth||0)+1;if(O>2500)return C(T);E.renderDepth=O;try{if(Array.isArray(T)){const P=E.key,I=[];let z=!1;for(let U=0;U<T.length;U++){E.key=U;const G=S(T[U],E),J=QM(G);J&&z?I[I.length-1]+=G:G!==null&&I.push(G),z=J}return E.key=P,E.renderDepth=O-1,I}const M=(function(P,I,z){const U=()=>(function(G,J,ee,Z,H,Y,oe){switch(G.type){case"0":{const ne={key:ee.key};return G.alert&&(ne.className="markdown-alert-"+Y(G.alert.toLowerCase(),xd),G.children.unshift({attrs:{},children:[{type:"27",text:G.alert}],noInnerParse:!0,type:"11",tag:"header"})),Z("blockquote",ne,J(G.children,ee))}case"1":return Z("br",{key:ee.key});case"2":return Z("hr",{key:ee.key});case"3":return Z("pre",{key:ee.key},Z("code",Li({},G.attrs,{className:G.lang?"lang-"+G.lang:""}),G.text));case"5":return Z("code",{key:ee.key},G.text);case"7":return Z("a",{key:ee.key,href:H(G.target,"a","href")},Z("sup",{key:ee.key},G.text));case"8":return Z("input",{checked:G.completed,key:ee.key,readOnly:!0,type:"checkbox"});case"9":return Z("h"+G.level,{id:G.id,key:ee.key},J(G.children,ee));case"11":return Z(G.tag,Li({key:ee.key},G.attrs),G.text||(G.children?J(G.children,ee):""));case"13":return Z(G.tag,Li({},G.attrs,{key:ee.key}));case"14":return Z("img",{key:ee.key,alt:G.alt||void 0,title:G.title||void 0,src:H(G.target,"img","src")});case"15":return Z("a",{key:ee.key,href:H(G.target,"a","href"),title:G.title},J(G.children,ee));case"23":return oe[G.ref]?Z("img",{key:ee.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:ee.key,href:H(oe[G.ref].target,"a","href"),title:oe[G.ref].title},J(G.children,ee)):Z("span",{key:ee.key},G.fallbackChildren);case"25":{const ne=G;return Z("table",{key:ee.key},Z("thead",null,Z("tr",null,ne.header.map(function($,q){return Z("th",{key:q,style:e3(ne,q)},J($,ee))}))),Z("tbody",null,ne.cells.map(function($,q){return Z("tr",{key:q},$.map(function(V,D){return Z("td",{key:D,style:e3(ne,D)},J(V,ee))}))})))}case"27":return G.text;case"34":return Z(G.tag,{key:ee.key},J(G.children,ee));case"20":case"30":return Z(G.ordered?"ol":"ul",{key:ee.key,start:G.type==="20"?G.start:void 0},G.items.map(function(ne,$){return Z("li",{key:$},J(ne,ee))}));case"19":return`
|
|
83
|
+
`;case"21":return Z("p",{key:ee.key},J(G.children,ee));default:return null}})(P,I,z,_,x,w,v);return y?y(U,P,I,z):U()})(T,S,E);return E.renderDepth=O-1,M}catch(M){if(M instanceof RangeError&&M.message.includes("Maximum call stack"))return C(T);throw M}}})(t.renderRule,c,r,n,h);return u(e)}const Zh=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,Zce);return Yue(t??"",Li({},n,{wrapperProps:Li({},n?.wrapperProps,r)}))},vI=Symbol("remove-this-key"),r3=Symbol("reset");function Xue(e,t){return Array.isArray(e.required)&&e.required.indexOf(t)!==-1}function Que(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 Jue(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:x,addedByAdditionalProperties:w}=e,[v,C]=k.useState(!1),{globalFormOptions:S,fields:T}=r,{SchemaField:E}=T,O=gc(li(y,S,t.path)),M=k.useCallback((U,G,J,ee)=>{U===void 0&&w&&(U=""),c(U,G,J,ee)},[c,w]),P=k.useCallback(U=>{y!==U&&C(!0),_(y,U)},[y,_]),I=k.useCallback(U=>{const{target:{value:G}}=U;P(G)},[P]),z=k.useCallback(()=>{x(y)},[y,x]);return j.jsx(E,{name:y,required:g,schema:n,uiSchema:o,errorSchema:s,fieldPathId:O,formData:l,wasPropertyKeyModified:v,onKeyRename:P,onKeyRenameBlur:I,onRemoveProperty:z,onChange:M,onBlur:u,onFocus:d,registry:r,disabled:h,readonly:p,hideError:b})}function efe(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:x,schemaUtils:w,translateString:v,globalUiOptions:C}=y,{OptionalDataControlsField:S}=x,T=w.retrieveSchema(t,r,!0),E=ct(n,C),{properties:O={}}=T,M=e.childFieldPathId??s,P=E.title??T.title??_??l,I=E.description??T.description,z=Gh(y,T,c,n),U=yf(r);let G=[];const J=k.useCallback(($,q)=>{const{duplicateKeySuffixSeparator:V="-"}=ct(n,C);let D=0,B=$;for(;Ft(q,B);)B=`${$}${V}${++D}`;return B},[n,C]),ee=k.useCallback(()=>{if(!(T.additionalProperties||T.patternProperties))return;const{translateString:$}=y,q={...r},V=J("newKey",q);if(T.patternProperties)fn(q,V,null);else{let D,B,te;if(Gt(T.additionalProperties)){D=T.additionalProperties.type,B=T.additionalProperties.const,te=T.additionalProperties.default;let ae=T.additionalProperties;if(In in ae){const{schemaUtils:ge}=y;ae=ge.retrieveSchema({[In]:ae[In]},r),D=ae.type,B=ae.const,te=ae.default}!D&&(Kt in ae||Mt in ae)&&(D="object")}const re=B??te??Que($,D);fn(q,V,re)}b(q,M.path)},[r,b,y,M,J,T]),Z=k.useCallback(($,q)=>{if($!==q){const V=J(q,r),D={...r},B={[$]:V},te=Object.keys(D).map(ae=>({[B[ae]||ae]:D[ae]})),re=Object.assign({},...te);b(re,M.path)}},[r,b,M,J]),H=k.useCallback($=>{b(vI,[...M.path,$])},[b,M]);if(!z||U)try{const $=Object.keys(O);G=rce($,E.order)}catch($){return j.jsxs("div",{children:[j.jsx("p",{className:"rjsf-config-error",style:{color:"red"},children:j.jsx(Zh,{options:{disableParsingRawHTML:!0},children:v(Dt.InvalidObjectField,[l||"root",$.message])})}),j.jsx("pre",{children:JSON.stringify(T)})]})}const Y=mt("ObjectFieldTemplate",y,E),oe=z?j.jsx(S,{...e,fieldPathId:M,schema:T}):void 0,ne={title:E.label===!1?"":P,description:E.label===!1?void 0:I,properties:G.map($=>{const q=Ft(T,[nn,$,Ms]),V=q?n.additionalProperties:n[$],D=ct(V).widget==="hidden";return{content:j.jsx(Jue,{propertyName:$,required:Xue(T,$),schema:Ie(T,[nn,$],{}),uiSchema:V,errorSchema:Ie(o,[$]),fieldPathId:M,formData:Ie(r,[$]),handleKeyRename:Z,handleRemoveProperty:H,addedByAdditionalProperties:q,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:T,formData:r,registry:y,optionalDataControl:oe,className:z?"rjsf-optional-object-field":void 0};return j.jsx(Y,{...ne,onAddProperty:ee})}function tfe(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),_=yf(r);let x,w,v,C;if(o||s)x=H1(u,"Msg"),w=_?void 0:g(Dt.OptionalObjectEmptyMsg);else{const S=_?Dt.OptionalObjectRemove:Dt.OptionalObjectAdd;w=g(S),_?(x=H1(u,"Remove"),C=()=>l(void 0,u.path,c)):(x=H1(u,"Add"),v=()=>{let T=p.getDefaultFormState(t,r,"excludeObjectChildren");T===void 0&&(T=Ri(t)==="array"?[]:{}),l(T,u.path,c)})}return w&&j.jsx(y,{id:x,registry:d,schema:t,uiSchema:n,label:w,onAddClick:v,onRemoveClick:C})}const nfe={array:"ArrayField",boolean:"BooleanField",integer:"NumberField",number:"NumberField",object:"ObjectField",string:"StringField",null:"NullField"};function rfe(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=Ri(e),l=Array.isArray(s)?s[0]:s||"",c=e.$id;let u=nfe[l];return c&&c in o&&(u=c),!u&&(e.anyOf||e.oneOf)?()=>null:u in o?o[u]:o.FallbackField}function ofe(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:x,fields:w}=g,{AnyOfField:v,OneOfField:C}=w,S=ct(r,x),T=mt("FieldTemplate",g,S),E=mt("DescriptionFieldTemplate",g,S),O=mt("FieldHelpTemplate",g,S),M=mt("FieldErrorTemplate",g,S),P=y.retrieveSchema(t,o),I=n[_n],z=k.useCallback((xe,$e,Ze,ye)=>c(xe,$e,Ze,ye||I),[I,c]),U=rfe(P,S,g),G=!!(S.disabled??e.disabled),J=!!(S.readonly??(e.readonly||e.schema.readOnly||P.readOnly)),ee=S.hideError,Z=ee===void 0?e.hideError:!!ee,H=!!(S.autofocus??e.autofocus);if(Object.keys(P).length===0)return null;let Y=y.getDisplayLabel(P,r,x);const oe=S.field&&S.fieldReplacesAnyOrOneOf===!0;let ne,$,q={fieldPathId:n};if((Kt in P||Mt in P)&&!oe&&!y.isSelect(P)){P[Kt]?(ne=v,$=P[Kt].map(Ze=>y.retrieveSchema(Gt(Ze)?Ze:{},o))):P[Mt]&&(ne=C,$=P[Mt].map(Ze=>y.retrieveSchema(Gt(Ze)?Ze:{},o)));const xe=Gh(g,P,p,r),$e=yf(o);Y=Y&&(!xe||$e),q={childFieldPathId:n,fieldPathId:li("XxxOf",_,n)}}const{__errors:V,...D}=s||{},B=nh(r,["ui:classNames","classNames","ui:style"]);ja in B&&(B[ja]=nh(B[ja],["classNames","style"]));const te=j.jsx(U,{...e,onChange:z,...q,schema:P,uiSchema:B,disabled:G,readonly:J,hideError:Z,autofocus:H,errorSchema:D,rawErrors:V}),re=n[_n];let ae;b?ae=l:ae=Ms in P?l:S.title||e.schema.title||P.title||e.title||l;const ge=S.description||e.schema.description||P.description||"",ke=S.help,Q=S.widget==="hidden",ie=["rjsf-field",`rjsf-field-${Ri(P)}`];!Z&&V&&V.length>0&&ie.push("rjsf-field-error"),S.classNames&&ie.push(S.classNames);const de=j.jsx(O,{help:ke,fieldPathId:n,schema:P,uiSchema:r,hasErrors:!Z&&V&&V.length>0,registry:g}),_e=Z||ne&&!y.isSelect(P)?void 0:j.jsx(M,{errors:V,errorSchema:s,fieldPathId:n,schema:P,uiSchema:r,registry:g}),Te={description:j.jsx(E,{id:mc(re),description:ge,schema:P,uiSchema:r,registry:g}),rawDescription:ge,help:de,rawHelp:typeof ke=="string"?ke:void 0,errors:_e,rawErrors:Z?void 0:V,id:re,label:ae,hidden:Q,onChange:c,onKeyRename:u,onKeyRenameBlur:d,onRemoveProperty:h,required:p,disabled:G,readonly:J,hideError:Z,displayLabel:Y,classNames:ie.join(" ").trim(),style:S.style,formData:o,schema:P,uiSchema:r,registry:g};return j.jsx(T,{...Te,children:j.jsxs(j.Fragment,{children:[te,ne&&j.jsx(ne,{name:l,disabled:G,readonly:J,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 ife extends k.Component{shouldComponentUpdate(t){const{registry:{globalFormOptions:n}}=this.props,{experimental_componentUpdateStrategy:r="customDeep"}=n;return oI(this,t,this.state,r)}render(){return j.jsx(ofe,{...this.props})}}function sfe(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:x}=e,{title:w,format:v}=t,{widgets:C,schemaUtils:S,globalUiOptions:T}=b,E=S.isSelect(t)?Ku(t,r):void 0;let O=E?"select":"text";v&&ece(t,v,C)&&(O=v);const{widget:M=O,placeholder:P="",title:I,...z}=ct(r),U=S.getDisplayLabel(t,r,T),G=I??x??w??n,J=Qi(t,M,C),ee=k.useCallback((Z,H,Y)=>h(Z,o.path,H,Y),[h,o]);return j.jsx(J,{options:{...z,enumOptions:E},schema:t,uiSchema:r,id:o.$id,name:n,label:G,hideLabel:!U,hideError:_,value:s,onChange:ee,onBlur:p,onFocus:g,required:l,disabled:c,readonly:u,autofocus:d,registry:b,placeholder:P,rawErrors:y,htmlName:o.name})}function afe(e){const{formData:t,onChange:n,fieldPathId:r}=e;return k.useEffect(()=>{t===void 0&&n(null,r.path)},[r,t,n]),null}function lfe(){return{AnyOfField:LM,ArrayField:_ce,BooleanField:Ece,FallbackField:Oce,LayoutGridField:ME,LayoutHeaderField:Uce,LayoutMultiSchemaField:Vce,NumberField:Hce,ObjectField:efe,OneOfField:LM,OptionalDataControlsField:tfe,SchemaField:ife,StringField:sfe,NullField:afe}}function cfe(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:mc(t),description:n,schema:o,uiSchema:s,registry:r})}function ufe(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 ffe(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:x,RemoveButton:w}=g.templates.ButtonTemplates;return j.jsxs(j.Fragment,{children:[(o||r)&&j.jsx(x,{id:Bi(l,"moveUp"),className:"rjsf-array-item-move-up",disabled:t||p||!o,onClick:h,uiSchema:b,registry:g}),(o||r)&&j.jsx(_,{id:Bi(l,"moveDown"),className:"rjsf-array-item-move-down",disabled:t||p||!r,onClick:d,uiSchema:b,registry:g}),n&&j.jsx(y,{id:Bi(l,"copy"),className:"rjsf-array-item-copy",disabled:t||p,onClick:c,uiSchema:b,registry:g}),s&&j.jsx(w,{id:Bi(l,"remove"),className:"rjsf-array-item-remove",disabled:t||p,onClick:u,uiSchema:b,registry:g})]})}function dfe(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),x=mt("ArrayFieldTitleTemplate",h,y),w=!d&&!r,{ButtonTemplates:{AddButton:v}}=h.templates;return j.jsxs("fieldset",{className:n,id:o.$id,children:[j.jsx(x,{fieldPathId:o,title:y.title||b,required:p,schema:g,uiSchema:s,registry:h,optionalDataControl:w?c:void 0}),j.jsx(_,{fieldPathId:o,description:y.description||g.description,schema:g,uiSchema:s,registry:h}),w?void 0:c,j.jsx("div",{className:"row array-item-list",children:l}),t&&j.jsx(v,{id:Bi(o,"add"),className:"rjsf-array-item-add",onClick:u,disabled:r||d,uiSchema:s,registry:h})]})}function hfe(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:b0(t),title:n,required:s,schema:r,uiSchema:o,registry:l,optionalDataControl:c})}function pfe(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:x,type:w,hideLabel:v,hideError:C,...S}=e;if(!t)throw console.log("No id for",e),new Error(`no id for props ${JSON.stringify(e)}`);const T={...S,...tI(b,w,g)};let E;T.type==="number"||T.type==="integer"?E=o||o===0?o:"":E=o??"";const O=k.useCallback(({target:{value:I}})=>h(I===""?g.emptyValue:I),[h,g]),M=k.useCallback(({target:I})=>u(t,I&&I.value),[u,t]),P=k.useCallback(({target:I})=>d(t,I&&I.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:E,...T,list:b.examples?gh(t):void 0,onChange:p||O,onBlur:M,onFocus:P,"aria-describedby":bo(t,!!b.examples)}),Array.isArray(b.examples)&&j.jsx("datalist",{id:gh(t),children:b.examples.concat(b.default&&!b.examples.includes(b.default)?[b.default]:[]).map(I=>j.jsx("option",{value:I},I))},`datalist_${t}`)]})}function mfe({uiSchema:e}){const{submitText:t,norender:n,props:r={}}=nI(e);return n?null:j.jsx("div",{children:j.jsx("button",{type:"submit",...r,className:`btn btn-info ${r.className||""}`,children:t})})}function nc(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 gfe(e){const{registry:{translateString:t}}=e;return j.jsx(nc,{title:t(Dt.CopyButton),...e,icon:"copy"})}function yfe(e){const{registry:{translateString:t}}=e;return j.jsx(nc,{title:t(Dt.MoveDownButton),...e,icon:"arrow-down"})}function vfe(e){const{registry:{translateString:t}}=e;return j.jsx(nc,{title:t(Dt.MoveUpButton),...e,icon:"arrow-up"})}function bfe(e){const{registry:{translateString:t}}=e;return j.jsx(nc,{title:t(Dt.RemoveButton),...e,iconType:"danger",icon:"remove"})}function Sfe({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(nc,{id:e,iconType:"info",icon:"plus",className:"btn-add col-xs-12",title:s(Dt.AddButton),onClick:n,disabled:r,registry:o})})})}function wfe(){return{SubmitButton:mfe,AddButton:Sfe,CopyButton:gfe,MoveDownButton:yfe,MoveUpButton:vfe,RemoveButton:bfe}}const bI=CE();function DE({description:e,registry:t,uiSchema:n={}}){const{globalUiOptions:r}=t;return ct(n,r).enableMarkdownInDescription&&typeof e=="string"?j.jsx(Zh,{options:{disableParsingRawHTML:!0},"data-testid":bI.markdown,children:e}):e}DE.TEST_IDS=bI;function xfe(e){const{id:t,description:n,registry:r,uiSchema:o}=e;return n?j.jsx("div",{id:t,className:"field-description",children:j.jsx(DE,{description:n,registry:r,uiSchema:o})}):null}function _fe({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 Efe(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 Cfe="*";function SI(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:Cfe})]}):null}function Tfe(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(SI,{label:n,required:u,id:t}),d&&l?l:null,r,o,s]})}function Rfe(e){const{errors:t=[],fieldPathId:n}=e;if(t.length===0)return null;const r=TE(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 wI=CE();function $E({help:e,registry:t,uiSchema:n={}}){const{globalUiOptions:r}=t;return ct(n,r).enableMarkdownInHelp&&typeof e=="string"?j.jsx(Zh,{options:{disableParsingRawHTML:!0},"data-testid":wI.markdown,children:e}):e}$E.TEST_IDS=wI;function Ofe(e){const{fieldPathId:t,help:n,uiSchema:r,registry:o}=e;return n?j.jsx("div",{id:RE(t),className:"help-block",children:j.jsx($E,{help:n,registry:o,uiSchema:r})}):null}function Afe(e){const{children:t,column:n,className:r,...o}=e;return j.jsx("div",{className:r,...o,children:t})}function kfe(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 Mfe(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),x=mt("TitleFieldTemplate",h,_),w=mt("DescriptionFieldTemplate",h,_),v=!d&&!r,{ButtonTemplates:{AddButton:C}}=h.templates;return j.jsxs("fieldset",{className:t,id:s.$id,children:[b&&j.jsx(x,{id:b0(s),title:b,required:p,schema:g,uiSchema:y,registry:h,optionalDataControl:v?c:void 0}),n&&j.jsx(w,{id:mc(s),description:n,schema:g,uiSchema:y,registry:h}),v?void 0:c,u.map(S=>S.content),k$(g,y,o)&&j.jsx(C,{id:Bi(s,"add"),className:"rjsf-object-property-expand",onClick:l,disabled:r||d,uiSchema:y,registry:h})]})}function jfe(e){const{id:t,registry:n,label:r,onAddClick:o,onRemoveClick:s}=e;return o?j.jsx(nc,{id:t,registry:n,icon:"plus",className:"rjsf-add-optional-data btn-sm",onClick:o,title:r}):s?j.jsx(nc,{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 Pfe="*";function Nfe(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:Pfe}),o&&j.jsx("span",{className:"pull-right",style:{marginBottom:"2px"},children:o})]})}function Dfe(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(Zh,{options:{disableParsingRawHTML:!0},children:s(l,c)})}),t&&j.jsx("pre",{children:JSON.stringify(t,null,2)})]})}function $fe(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:x,registry:w}=e,{templates:v,translateString:C}=w,{RemoveButton:S}=v.ButtonTemplates,T=C(Dt.KeyLabel,[l]),E=Ms 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(!E)return j.jsx("div",{className:P,style:r,children:_});const I=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(SI,{label:T,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?`${I}px`:void 0},children:j.jsx(S,{id:Bi(t,"remove"),className:"rjsf-object-property-remove btn-block",style:{border:"0"},disabled:o||h,onClick:u,uiSchema:x,registry:w})})]})})}function Ife(){return{ArrayFieldDescriptionTemplate:cfe,ArrayFieldItemTemplate:ufe,ArrayFieldItemButtonsTemplate:ffe,ArrayFieldTemplate:dfe,ArrayFieldTitleTemplate:hfe,ButtonTemplates:wfe(),BaseInputTemplate:pfe,DescriptionFieldTemplate:xfe,ErrorListTemplate:_fe,FallbackFieldTemplate:Efe,FieldTemplate:Tfe,FieldErrorTemplate:Rfe,FieldHelpTemplate:Ofe,GridTemplate:Afe,MultiSchemaFieldTemplate:kfe,ObjectFieldTemplate:Mfe,OptionalDataControlsTemplate:jfe,TitleFieldTemplate:Nfe,UnsupportedFieldTemplate:Dfe,WrapIfAdditionalTemplate:$fe}}function zfe(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}=ace(e);return j.jsxs("ul",{className:"list-inline",children:[p.map((_,x)=>j.jsx("li",{className:"list-inline-item",children:j.jsx(sce,{rootId:s,name:l,select:g,..._,disabled:t,readonly:n,registry:c,onBlur:u,onFocus:d,autofocus:r&&x===0})},x)),(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 Lfe({time:e=!0,...t}){const{AltDateWidget:n}=t.registry.widgets;return j.jsx(n,{time:e,...t})}function Ffe({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),x=Vd(e),w=k.useCallback(O=>g(O.target.checked),[g]),v=k.useCallback(O=>h(r,O.target.checked),[h,r]),C=k.useCallback(O=>p(r,O.target.checked),[p,r]),E=ct(t).widget==="checkbox"?void 0:n.description??e.description;return j.jsxs("div",{className:`checkbox ${s||l?"disabled":""}`,children:[!u&&E&&j.jsx(_,{id:mc(r),description:E,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:x,disabled:s||l,autoFocus:d,onChange:w,onBlur:v,onFocus:C,"aria-describedby":bo(r)}),rI(j.jsx("span",{children:c}),u)]})]})}function Ufe({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:x})=>h(e,Rr(x&&x.value,r,s)),[h,e,r,s]),_=k.useCallback(({target:x})=>p(e,Rr(x&&x.value,r,s)),[p,e,r,s]);return j.jsx("div",{className:"checkboxes",id:e,children:Array.isArray(r)&&r.map((x,w)=>{const v=Kh(x.value,b),C=Array.isArray(o)&&o.indexOf(x.value)!==-1,S=t||C||u?"disabled":"",T=O=>{O.target.checked?d(Q$(w,b,r)):d(Y$(w,b,r))},E=j.jsxs("span",{children:[j.jsx("input",{type:"checkbox",id:Zl(e,w),name:g||e,checked:v,value:String(w),disabled:t||C||u,autoFocus:c&&w===0,onChange:T,onBlur:y,onFocus:_,"aria-describedby":bo(e)}),j.jsx("span",{children:x.label})]});return n?j.jsx("label",{className:`checkbox-inline ${S}`,children:E},w):j.jsx("div",{className:`checkbox ${S}`,children:j.jsx("label",{children:E})},w)})})}function Vfe(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 qfe(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 Bfe(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:dce(n),onChange:l=>t(nce(l))})}function Hfe(e){const{options:t,registry:n}=e,r=mt("BaseInputTemplate",n,t);return j.jsx(r,{type:"email",...e})}function Kfe({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 Gfe({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(Zh,{children:s(Dt.FilesInfo,[d,p,String(h)])}),n&&j.jsx(Kfe,{fileInfo:c,registry:t}),j.jsx(l,{onClick:g,registry:t})]},u)})})}function Zfe(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}=fce(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(Gfe,{filesInfo:d,onRemove:p,registry:u,preview:c.filePreview,options:c})]})}function Wfe({id:e,value:t,htmlName:n}){return j.jsx("input",{type:"hidden",id:e,name:n||e,value:typeof t>"u"?"":t})}function Yfe(e){const{options:t,registry:n}=e,r=mt("BaseInputTemplate",n,t);return j.jsx(r,{type:"password",...e})}function Xfe({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:w})=>l(d,Rr(w&&w.value,p,y)),[l,p,y,d]),x=k.useCallback(({target:w})=>c(d,Rr(w&&w.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((w,v)=>{const C=Kh(w.value,t),S=Array.isArray(g)&&g.indexOf(w.value)!==-1,T=r||S||o?"disabled":"",E=()=>u(w.value),O=j.jsxs("span",{children:[j.jsx("input",{type:"radio",id:Zl(d,v),checked:C,name:h||d,required:n,value:String(v),disabled:r||S||o,autoFocus:s&&v===0,onChange:E,onBlur:_,onFocus:x,"aria-describedby":bo(d)}),j.jsx("span",{children:w.label})]});return b?j.jsx("label",{className:`radio-inline ${T}`,children:O},v):j.jsx("div",{className:`radio ${T}`,children:j.jsx("label",{children:O})},v)})})}function Qfe(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 Jfe({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,x=k.useCallback(S=>{!r&&!o&&l(S)},[l,r,o]),w=k.useCallback(S=>{if(c){const T=Number(S.target.dataset.value);c(e,T)}},[c,e]),v=k.useCallback(S=>{if(u){const T=Number(S.target.dataset.value);u(e,T)}},[u,e]),C=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,T)=>{const E=_+T,O=E<=t;return j.jsx("span",{onClick:()=>x(E),onFocus:w,onBlur:v,"data-value":E,tabIndex:r||o?-1:0,role:"radio","aria-checked":E===t,"aria-label":`${E} ${b==="heart"?"heart":"star"}${E===1?"":"s"}`,style:{color:O?"#FFD700":"#ccc",padding:"0 0.2rem",transition:"color 0.2s",userSelect:"none"},children:C(O)},T)}),j.jsx("input",{type:"hidden",id:e,name:p||e,value:t||"",required:n,disabled:r||o,"aria-hidden":"true"})]})})}function Q1(e,t){return t?Array.from(e.target.options).slice().filter(n=>n.selected).map(n=>n.value):e.target.value}function ede({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:x}=n,w=c?[]:"",v=k.useCallback(O=>{const M=Q1(O,c);return p(t,Rr(M,y,x))},[p,t,c,y,x]),C=k.useCallback(O=>{const M=Q1(O,c);return h(t,Rr(M,y,x))},[h,t,c,y,x]),S=k.useCallback(O=>{const M=Q1(O,c);return d(Rr(M,y,x))},[d,c,y,x]),T=X$(r,y,c),E=!c&&e.default===void 0;return j.jsxs("select",{id:t,name:b||t,multiple:c,role:"combobox",className:"form-control",value:typeof T>"u"?w:T,required:o,disabled:s||l,autoFocus:u,onBlur:C,onFocus:v,onChange:S,"aria-describedby":bo(t),children:[E&&j.jsx("option",{value:"",children:g}),Array.isArray(y)&&y.map(({value:O,label:M},P)=>{const I=_&&_.indexOf(O)!==-1;return j.jsx("option",{value:String(P),disabled:I,children:M},P)})]})}function xI({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":bo(e)})}xI.defaultProps={autofocus:!1,options:{}};function tde(e){const{options:t,registry:n}=e,r=mt("BaseInputTemplate",n,t);return j.jsx(r,{...e})}function nde(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 rde(e){const{options:t,registry:n}=e,r=mt("BaseInputTemplate",n,t);return j.jsx(r,{type:"url",...e})}function ode(e){const{options:t,registry:n}=e,r=mt("BaseInputTemplate",n,t);return j.jsx(r,{type:"number",...e})}function ide(){return{AltDateWidget:zfe,AltDateTimeWidget:Lfe,CheckboxWidget:Ffe,CheckboxesWidget:Ufe,ColorWidget:Vfe,DateWidget:qfe,DateTimeWidget:Bfe,EmailWidget:Hfe,FileWidget:Zfe,HiddenWidget:Wfe,PasswordWidget:Yfe,RadioWidget:Xfe,RangeWidget:Qfe,RatingWidget:Jfe,SelectWidget:ede,TextWidget:tde,TextareaWidget:xI,TimeWidget:nde,UpDownWidget:ode,URLWidget:rde}}function sde(){return{fields:lfe(),templates:Ife(),widgets:ide(),rootSchema:{},formContext:{},translateString:Hle,globalFormOptions:{idPrefix:R$,idSeparator:O$,useFallbackUiForUnsupportedType:!1}}}function ou(e,t){return{...Qx(e,["schema","uiSchema","fieldPathId","schemaUtils","formData","edit","errors","errorSchema"]),...t!==void 0&&{status:t}}}class ade 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=RM(this.props.formData,t.formData),o=RM(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,x="experimental_customMergeAllOf"in t?t.experimental_customMergeAllOf:this.props.experimental_customMergeAllOf;let w=c.schemaUtils;(!w||w.doesSchemaUtilsDiffer(d,u,_,x))&&(w=Vle(d,u,_,x));const v=w.getRootSchema();let C=n;n===r3?C=void 0:n===void 0&&p&&(C=c.formData);const S=w.getDefaultFormState(v,C,!1,c.initialDefaultsGenerated),T=this.updateRetrievedSchema(r??w.retrieveSchema(v,S)),E=()=>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,I=c.schemaValidationErrorSchema;if(y&&!l){const ee=this.liveValidate(v,w,c.errorSchema,S,void 0,c.customErrors,r,r!==void 0);O=ee.errors,M=ee.errorSchema,P=ee.schemaValidationErrors,I=ee.schemaValidationErrorSchema}else{const ee=E();if(O=ee.errors,M=ee.errorSchema,s.length>0&&!y){const H=s.reduce((Y,oe)=>(Y[oe]=void 0,Y),{});M=I=mh(ee.errorSchema,H,"preventDuplicates")}const Z=this.mergeErrors({errorSchema:M,errors:O},t.extraErrors,c.customErrors);O=Z.errors,M=Z.errorSchema}const z=this.getRegistry(t,v,w),U=An(c.registry,z)?c.registry:z,G=c.fieldPathId&&c.fieldPathId?.[_n]===U.globalFormOptions.idPrefix?c.fieldPathId:li("",U.globalFormOptions);return{schemaUtils:w,schema:v,uiSchema:h,fieldPathId:G,formData:S,edit:g,errors:O,errorSchema:M,schemaValidationErrors:P,schemaValidationErrorSchema:I,retrievedSchema:T,initialDefaultsGenerated:!0,registry:U}}shouldComponentUpdate(t,n){const{experimental_componentUpdateStrategy:r="customDeep"}=this.props;return oI(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=mh(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=Qx(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[yE]&&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=li("",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:x}=this.state;let{customErrors:w,errorSchema:v}=this.state;const C=y.path[0]||"",S=!n||n.length===0||n.length===1&&n[0]===C;let T=this.state.retrievedSchema,E=S?t:Ph(p);if(Bt(E)||Array.isArray(E)){t===vI?_K(E,n):S||fn(E,n,t);const I=this.getStateFromProps(this.props,E,void 0,void 0,void 0,!0);E=I.formData,T=I.retrievedSchema}const O=!u&&(d===!0||d==="onChange");let M={formData:E,schema:b},P=E;if(l===!0&&(c===!0||c==="onChange")&&(P=this.omitExtraData(E),M={formData:P}),o){const I=S?_:Ie(_,n);if(!vr(I))S?v=o:fn(v,n,o);else if(w||(w=new J$),S){const z=Ie(o,qr);z&&w.setErrors(z)}else fn(w.ErrorSchema,n,o)}else w&&Ie(w.ErrorSchema,[...n,qr])&&w.clearErrors(n);if(O&&this.pendingChanges.length===1){const I=this.liveValidate(b,g,v,P,s,w,T);M={formData:P,...I,customErrors:w}}else if(!u&&o){const I=this.mergeErrors({errorSchema:v,errors:x},s,w);M={formData:P,...I,customErrors:w}}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=r3,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:x,retrievedSchema:w}=this.state,v=this.liveValidate(b,y,_,h,u,x,w);p={formData:h,...v,customErrors:x}}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?AE(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=O$,idPrefix:s=R$,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}=sde();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[Fw],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=BP(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:x}=this.props,{schema:w,uiSchema:v,formData:C,errorSchema:S,fieldPathId:T,registry:E}=this.state,{SchemaField:O}=E.fields,{SubmitButton:M}=E.templates.ButtonTemplates,P=x?o:void 0,I=x||o||"form";let{[xy]:z={}}=ct(v);b&&(z={...z,props:{...z.props,disabled:!0}});const U={[ja]:{[xy]:z}};return j.jsxs(I,{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(E),j.jsx(O,{name:"",schema:w,uiSchema:v,errorSchema:S,fieldPathId:T,formData:C,onChange:this.onChange,onBlur:this.onBlur,onFocus:this.onFocus,registry:E,disabled:b,readonly:y}),t||j.jsx(M,{uiSchema:U,registry:E}),_==="bottom"&&this.renderErrors(E)]})}}function lde(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(ade,{...e,...o,fields:t,widgets:n,templates:r,ref:s})))}var hg={exports:{}},J1={},o3;function cde(){return o3||(o3=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(P,I){return{validate:P,compare:I}}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:w,int32:{type:"number",validate:S},int64:{type:"number",validate:T},float:{type:"number",validate:E},double:{type:"number",validate:E},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 I=r.exec(P);if(!I)return!1;const z=+I[1],U=+I[2],G=+I[3];return U>=1&&U<=12&&G>=1&&G<=(U===2&&n(z)?29:o[U])}function l(P,I){if(P&&I)return P>I?1:P<I?-1:0}const c=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function u(P,I){const z=c.exec(P);if(!z)return!1;const U=+z[1],G=+z[2],J=+z[3],ee=z[5];return(U<=23&&G<=59&&J<=59||U===23&&G===59&&J===60)&&(!I||ee!=="")}function d(P,I){if(!(P&&I))return;const z=c.exec(P),U=c.exec(I);if(z&&U)return P=z[1]+z[2]+z[3]+(z[4]||""),I=U[1]+U[2]+U[3]+(U[4]||""),P>I?1:P<I?-1:0}const h=/t|\s/i;function p(P){const I=P.split(h);return I.length===2&&s(I[0])&&u(I[1],!0)}function g(P,I){if(!(P&&I))return;const[z,U]=P.split(h),[G,J]=I.split(h),ee=l(z,G);if(ee!==void 0)return ee||d(U,J)}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 x=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function w(P){return x.lastIndex=0,x.test(P)}const v=-2147483648,C=2**31-1;function S(P){return Number.isInteger(P)&&P<=C&&P>=v}function T(P){return Number.isInteger(P)}function E(){return!0}const O=/[^\\]\\Z/;function M(P){if(O.test(P))return!1;try{return new RegExp(P),!0}catch{return!1}}})(J1)),J1}var eS={},i3;function ude(){return i3||(i3=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=k_(),n=Rt(),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?x():w();function x(){const C=u.scopeValue("formats",{ref:y.formats,code:b.code.formats}),S=u.const("fmt",n._`${C}[${_.schemaCode}]`);c.fail$data(n.or(n._`typeof ${S} != "object"`,n._`${S} instanceof RegExp`,n._`typeof ${S}.compare != "function"`,v(S)))}function w(){const C=_.schema,S=y.formats[C];if(!S||S===!0)return;if(typeof S!="object"||S instanceof RegExp||typeof S.compare!="function")throw new Error(`"${p}": format "${C}" does not define "compare" function`);const T=u.scopeValue("formats",{key:C,ref:S,code:b.code.formats?n._`${b.code.formats}${n.getProperty(C)}`:void 0});c.fail$data(v(T))}function v(C){return n._`${C}.compare(${d}, ${h}) ${o[p].fail} 0`}},dependencies:["format"]};const l=c=>(c.addKeyword(e.formatLimitDefinition),c);e.default=l})(eS)),eS}var s3;function fde(){return s3||(s3=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const n=cde(),r=ude(),o=Rt(),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 dde=fde();const a3=es(dde),hde={allErrors:!0,multipleOfPrecision:8,strict:!1,verbose:!0,discriminator:!1},pde=/^(#?([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*\)))$/,mde=/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/;function gde(e,t,n={},r,o=vN,s){let l=new o({...hde,...n});return r?a3(l,r):r!==!1&&a3(l),l.addFormat("data-url",mde),l.addFormat("color",pde),l.addKeyword(Ms),l.addKeyword(yE),Array.isArray(e)&&l.addMetaSchema(e),Gt(t)&&Object.keys(t).forEach(c=>{l.addFormat(c,t[c])}),s&&(l=s(l)),l}function yde(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(x=>x);if(_.length>0)_.forEach(x=>{const w=g?`${g}.${x}`:x;let v=ct(Ie(t,`${w.replace(/^\./,"")}`)).title;if(v===void 0){const C=u.replace(/\/properties\//g,"/").split("/").slice(1,-1).concat([x]);v=ct(Ie(t,C)).title}if(v)p=p.replace(`'${x}'`,`'${v}'`),y=v;else{const C=Ie(d,[nn,x,"title"]);C&&(p=p.replace(`'${x}'`,`'${C}'`),y=C)}}),b=p;else{const x=ct(Ie(t,`${g.replace(/^\./,"")}`)).title;if(x)b=`'${x}' ${p}`.trim(),y=x;else{const w=d?.title;w&&(b=`'${w}' ${p}`.trim(),y=w)}}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(`/${Kt}/`),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 vde(e,t,n,r,o,s,l){const{validationError:c}=t;let u=yde(t.errors,l);c&&(u=[...u,{stack:c.message}]),typeof s=="function"&&(u=s(u,l));let d=oce(u);if(c&&(d={...d,$schema:{__errors:[c.message]}}),typeof o!="function")return{errors:u,errorSchema:d};const h=K$(e,r,n,r,!0),p=o(h,Uw(h),l),g=iI(p);return qg({errors:u,errorSchema:d},g)}class bde{constructor(t,n){const{additionalMetaSchemas:r,customFormats:o,ajvOptionsOverrides:s,ajvFormatOptions:l,AjvClass:c,extenderFn:u}=t;this.ajv=gde(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 vde(this,l,t,n,r,o,s)}handleSchemaUpdate(t){var n,r;const o=(n=t[_n])!==null&&n!==void 0?n:A$;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=kE(t),l=(o=s[_n])!==null&&o!==void 0?o:Jle(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 Sde(e={},t){return new bde(e,t)}const wde=Sde();const xde=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),_de=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),l3=e=>{const t=_de(e);return t.charAt(0).toUpperCase()+t.slice(1)},_I=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),Ede=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var Cde={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 Tde=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,...Cde,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:_I("lucide",o),...!s&&!Ede(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(Tde,{ref:s,iconNode:t,className:_I(`lucide-${xde(l3(e))}`,`lucide-${e}`,r),...o}));return n.displayName=l3(e),n};const Rde=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ode=ss("check",Rde);const Ade=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],EI=ss("chevron-down",Ade);const kde=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Mde=ss("chevron-up",kde);const jde=[["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"}]],Pde=ss("circle-alert",jde);const Nde=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],CI=ss("circle-plus",Nde);const Dde=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],$de=ss("circle",Dde);const Ide=[["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"}]],zde=ss("copy",Ide);const Lde=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Fde=ss("search",Lde);const Ude=[["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"}]],Vde=ss("trash-2",Ude);const qde=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Bde=ss("x",qde);function c3(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ga(...e){return t=>{let n=!1;const r=e.map(o=>{const s=c3(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():c3(e[o],null)}}}}function cr(...e){return k.useCallback(Ga(...e),e)}var Hde=Symbol.for("react.lazy"),Ey=Eh[" use ".trim().toString()];function Kde(e){return typeof e=="object"&&e!==null&&"then"in e}function TI(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Hde&&"_payload"in e&&Kde(e._payload)}function RI(e){const t=Gde(e),n=k.forwardRef((r,o)=>{let{children:s,...l}=r;TI(s)&&typeof Ey=="function"&&(s=Ey(s._payload));const c=k.Children.toArray(s),u=c.find(Wde);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 OI=RI("Slot");function Gde(e){const t=k.forwardRef((n,r)=>{let{children:o,...s}=n;if(TI(o)&&typeof Ey=="function"&&(o=Ey(o._payload)),k.isValidElement(o)){const l=Xde(o),c=Yde(s,o.props);return o.type!==k.Fragment&&(c.ref=r?Ga(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 Zde=Symbol("radix.slottable");function Wde(e){return k.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Zde}function Yde(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 Xde(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 HN(I_(e))}const Qde=tl("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 IE({className:e,variant:t,size:n,asChild:r=!1,...o}){const s=r?OI:"button";return j.jsx(s,{"data-slot":"button",className:jt(Qde({variant:t,size:n,className:e})),...o})}function Jde({uiSchema:e,registry:t,className:n,...r}){const{translateString:o}=t;return j.jsx("div",{className:"p-0 m-0",children:j.jsxs(IE,{...r,className:jt("w-fit gap-2",n),variant:"outline",type:"button",children:[j.jsx(CI,{size:16})," ",o(Dt.AddItemButton)]})})}function ehe(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 the(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),x=!u&&!n,{ButtonTemplates:{AddButton:w}}=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:x?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:[x?void 0:l,s,t&&j.jsx("div",{className:"mt-2 flex justify-end",children:j.jsx(w,{id:Bi(r,"add"),className:"rjsf-array-item-add",onClick:c,disabled:n||u,uiSchema:o,registry:d})})]},`array-item-list-${r.$id}`)]})})})}function AI({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 nhe({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:x,extraProps:w,className:v}){const C={...w,...tI(y,l,b)},S=({target:{value:O}})=>u(O===""?b.emptyValue:O),T=({target:O})=>h(e,O&&O.value),E=({target:O})=>p(e,O&&O.value);return j.jsxs("div",{className:"p-0.5",children:[j.jsx(AI,{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?gh(e):void 0,...C,value:c||c===0?c:"",onChange:d||S,onBlur:T,onFocus:E,"aria-describedby":bo(e,!!y.examples)}),x,Array.isArray(y.examples)?j.jsx("datalist",{id:gh(e),children:y.examples.concat(y.default&&!y.examples.includes(y.default)?[y.default]:[]).map(O=>j.jsx("option",{value:O},O))}):null]})}function rhe({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(DE,{description:t,registry:n,uiSchema:r})})}):null}const ohe=tl("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 ihe({className:e,variant:t,...n}){return j.jsx("div",{"data-slot":"alert",role:"alert",className:jt(ohe({variant:t}),e),...n})}function she({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 ahe({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 lhe({errors:e,registry:t}){const{translateString:n}=t;return j.jsxs(ihe,{variant:"destructive",className:"mb-2",children:[j.jsx(Pde,{className:"h-4 w-4"}),j.jsx(she,{children:n(Dt.ErrorsLabel)}),j.jsx(ahe,{className:"flex flex-col gap-1",children:e.map((r,o)=>j.jsxs("span",{children:["• ",r.stack]},o))})]})}function che(e){const{errors:t=[],fieldPathId:n}=e;if(t.length===0)return null;const r=TE(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 uhe(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:RE(t),children:j.jsx($E,{help:n,registry:o,uiSchema:r})}):null}function fhe({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:x,required:w,schema:v,uiSchema:C,registry:S}){const T=ct(C),E=mt("WrapIfAdditionalTemplate",S,T);if(g)return j.jsx("div",{className:"hidden",children:t});const O=T.widget==="checkbox";return j.jsx(E,{classNames:u,style:d,disabled:h,id:e,label:p,displayLabel:n,onKeyRename:b,onKeyRenameBlur:y,onRemoveProperty:_,rawDescription:c,readonly:x,required:w,schema:v,uiSchema:C,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,w?"*":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 dhe(e){const{children:t,column:n,className:r,...o}=e;return j.jsx("div",{className:jt("grid gap-2",r),...o,children:t})}function Wh(e){const{icon:t,iconType:n,className:r,uiSchema:o,registry:s,...l}=e;return j.jsx(IE,{size:"icon",variant:"outline",className:r,...l,type:"button",children:t})}function hhe(e){const{registry:{translateString:t}}=e;return j.jsx(Wh,{title:t(Dt.CopyButton),...e,icon:j.jsx(zde,{className:"h-4 w-4"})})}function phe(e){const{registry:{translateString:t}}=e;return j.jsx(Wh,{title:t(Dt.MoveDownButton),...e,icon:j.jsx(EI,{className:"h-4 w-4"})})}function mhe(e){const{registry:{translateString:t}}=e;return j.jsx(Wh,{title:t(Dt.MoveUpButton),...e,icon:j.jsx(Mde,{className:"h-4 w-4"})})}function kI(e){const{registry:{translateString:t}}=e;return j.jsx(Wh,{title:t(Dt.RemoveButton),...e,className:"border-destructive",icon:j.jsx(Vde,{className:"h-4 w-4 stroke-destructive"})})}function ghe({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 yhe({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),x=!p&&!h,{ButtonTemplates:{AddButton:w}}=g.templates;return j.jsxs(j.Fragment,{children:[t&&j.jsx(y,{id:b0(s),title:t,required:r,schema:l,uiSchema:o,registry:g,optionalDataControl:x?u:void 0}),e&&j.jsx(_,{id:mc(s),description:e,schema:l,uiSchema:o,registry:g}),j.jsxs("div",{className:"flex flex-col gap-2",children:[x?void 0:u,n.map((v,C)=>j.jsx("div",{className:`${v.hidden?"hidden":""} flex`,children:j.jsx("div",{className:"w-full",children:v.content})},C)),k$(l,o,c)?j.jsx("div",{className:"mt-2 flex justify-end",children:j.jsx(w,{id:Bi(s,"add"),onClick:d,disabled:h||p,className:"rjsf-object-property-expand",uiSchema:o,registry:g})}):null]})]})}function vhe(e){const{id:t,registry:n,label:r,onAddClick:o,onRemoveClick:s}=e;return o?j.jsx(Wh,{id:t,registry:n,className:"rjsf-add-optional-data",onClick:o,title:r,icon:j.jsx(CI,{}),size:"xs"}):s?j.jsx(kI,{id:t,registry:n,className:"rjsf-remove-optional-data",onClick:s,title:r,size:"xs"}):j.jsx("em",{id:t,children:r})}function bhe(e){const{submitText:t,norender:n,props:r}=nI(e.uiSchema);return n?null:j.jsx("div",{children:j.jsx(IE,{type:"submit",...r,className:jt("my-2",r?.className),children:t})})}var $s=Sj();const She=es($s);var whe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],as=whe.reduce((e,t)=>{const n=RI(`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}},{}),xhe="Separator",u3="horizontal",_he=["horizontal","vertical"],MI=k.forwardRef((e,t)=>{const{decorative:n,orientation:r=u3,...o}=e,s=Ehe(r)?r:u3,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})});MI.displayName=xhe;function Ehe(e){return _he.includes(e)}var Che=MI;function jI({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return j.jsx(Che,{"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 The({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(jI,{dir:"horizontal",style:{height:"1px"},className:"my-1"})]})}function Rhe({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:x}=y,{RemoveButton:w}=_.ButtonTemplates,v=x(Dt.KeyLabel,[s]);if(!(Ms in g))return j.jsx("div",{className:e,style:t,children:n});const T=l?22+(d?-28:0):0,E=`${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:E,className:"text-sm font-medium text-muted-foreground leading-none",children:v}),j.jsx("div",{className:"pl-0.5",children:j.jsx(AI,{required:p,defaultValue:s,disabled:r||h,id:E,name:E,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:`${T}px`},children:j.jsx(w,{id:Bi(o,"remove"),iconType:"block",className:"rjsf-object-property-remove w-full",disabled:r||h,onClick:c,uiSchema:b,registry:y})})]}),j.jsx(jI,{dir:"horizontal",className:"mt-2"})]})}function Ohe(){return{ArrayFieldItemTemplate:ehe,ArrayFieldTemplate:the,BaseInputTemplate:nhe,ButtonTemplates:{AddButton:Jde,CopyButton:hhe,MoveDownButton:phe,MoveUpButton:mhe,RemoveButton:kI,SubmitButton:bhe},DescriptionFieldTemplate:rhe,ErrorListTemplate:lhe,FieldErrorTemplate:che,FieldHelpTemplate:uhe,FieldTemplate:fhe,GridTemplate:dhe,MultiSchemaFieldTemplate:ghe,ObjectFieldTemplate:yhe,OptionalDataControlsTemplate:vhe,TitleFieldTemplate:The,WrapIfAdditionalTemplate:Rhe}}function Ahe(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 yc(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,x=k.useMemo(()=>y,Object.values(y));return j.jsx(_.Provider,{value:x,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,khe(o,...t)]}function khe(...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 Zu=globalThis?.document?k.useLayoutEffect:()=>{},Mhe=Eh[" useInsertionEffect ".trim().toString()]||Zu;function Yh({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,l]=jhe({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=Phe(h)?h(e):h;p!==e&&l.current?.(p)}else s(h)},[c,e,s,l]);return[u,d]}function jhe({defaultProp:e,onChange:t}){const[n,r]=k.useState(e),o=k.useRef(n),s=k.useRef(t);return Mhe(()=>{s.current=t},[t]),k.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}function Phe(e){return typeof e=="function"}function zE(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 LE(e){const[t,n]=k.useState(void 0);return Zu(()=>{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 Nhe(e,t){return k.useReducer((n,r)=>t[n][r]??n,e)}var vf=e=>{const{present:t,children:n}=e,r=Dhe(t),o=typeof n=="function"?n({present:r.isPresent}):k.Children.only(n),s=cr(r.ref,$he(o));return typeof n=="function"||r.isPresent?k.cloneElement(o,{ref:s}):null};vf.displayName="Presence";function Dhe(e){const[t,n]=k.useState(),r=k.useRef(null),o=k.useRef(e),s=k.useRef("none"),l=e?"mounted":"unmounted",[c,u]=Nhe(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]),Zu(()=>{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]),Zu(()=>{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 x=t.style.animationFillMode;t.style.animationFillMode="forwards",d=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},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 $he(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 Cy(e){const t=Ihe(e),n=k.forwardRef((r,o)=>{const{children:s,...l}=r,c=k.Children.toArray(s),u=c.find(Lhe);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 Ihe(e){const t=k.forwardRef((n,r)=>{const{children:o,...s}=n;if(k.isValidElement(o)){const l=Uhe(o),c=Fhe(s,o.props);return o.type!==k.Fragment&&(c.ref=r?Ga(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 zhe=Symbol("radix.slottable");function Lhe(e){return k.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===zhe}function Fhe(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 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)}var Vhe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],er=Vhe.reduce((e,t)=>{const n=Cy(`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 qhe(e,t){e&&$s.flushSync(()=>e.dispatchEvent(t))}var x0="Checkbox",[Bhe]=yc(x0),[Hhe,FE]=Bhe(x0);function Khe(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]=Yh({prop:n,defaultProp:o??!1,onChange:u,caller:x0}),[y,_]=k.useState(null),[x,w]=k.useState(null),v=k.useRef(!1),C=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:Da(o)?!1:o,isFormControl:C,bubbleInput:x,setBubbleInput:w};return j.jsx(Hhe,{scope:t,...S,children:Ghe(p)?p(S):r})}var PI="CheckboxTrigger",NI=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}=FE(PI,e),_=cr(o,h),x=k.useRef(u);return k.useEffect(()=>{const w=s?.form;if(w){const v=()=>p(x.current);return w.addEventListener("reset",v),()=>w.removeEventListener("reset",v)}},[s,p]),j.jsx(er.button,{type:"button",role:"checkbox","aria-checked":Da(u)?"mixed":u,"aria-required":d,"data-state":FI(u),"data-disabled":c?"":void 0,disabled:c,value:l,...r,ref:_,onKeyDown:zn(t,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:zn(n,w=>{p(v=>Da(v)?!0:!v),y&&b&&(g.current=w.isPropagationStopped(),g.current||w.stopPropagation())})})});NI.displayName=PI;var DI=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(Khe,{__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(NI,{...p,ref:t,__scopeCheckbox:n}),g&&j.jsx(LI,{__scopeCheckbox:n})]})})});DI.displayName=x0;var $I="CheckboxIndicator",II=k.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,s=FE($I,n);return j.jsx(vf,{present:r||Da(s.checked)||s.checked===!0,children:j.jsx(er.span,{"data-state":FI(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});II.displayName=$I;var zI="CheckboxBubbleInput",LI=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}=FE(zI,e),y=cr(n,b),_=zE(s),x=LE(r);k.useEffect(()=>{const v=g;if(!v)return;const C=window.HTMLInputElement.prototype,T=Object.getOwnPropertyDescriptor(C,"checked").set,E=!o.current;if(_!==s&&T){const O=new Event("click",{bubbles:E});v.indeterminate=Da(s),T.call(v,Da(s)?!1:s),v.dispatchEvent(O)}},[g,_,s,o]);const w=k.useRef(Da(s)?!1:s);return j.jsx(er.input,{type:"checkbox","aria-hidden":!0,defaultChecked:l??w.current,required:c,disabled:u,name:d,value:h,form:p,...t,tabIndex:-1,ref:y,style:{...t.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});LI.displayName=zI;function Ghe(e){return typeof e=="function"}function Da(e){return e==="indeterminate"}function FI(e){return Da(e)?"indeterminate":e?"checked":"unchecked"}function Zhe(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 Whe=["color"],Yhe=k.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Zhe(e,Whe);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 UI({className:e,...t}){return j.jsx(DI,{"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(II,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:j.jsx(Yhe,{className:"size-3.5"})})})}var Xhe="Label",VI=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())}}));VI.displayName=Xhe;var Qhe=VI;function UE({className:e,...t}){return j.jsx(Qhe,{"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 Jhe(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:x}=e,w=Vd(u),v=mt("DescriptionFieldTemplate",y,h),C=O=>p(O),S=()=>g(t,r),T=()=>b(t,r),E=h.description||u.description;return j.jsxs("div",{className:`relative ${o||s?"cursor-not-allowed opacity-50":""}`,"aria-describedby":bo(t),children:[!c&&E&&j.jsx(v,{id:mc(t),description:E,schema:u,uiSchema:_,registry:y}),j.jsxs("div",{className:"flex items-center gap-2 my-2",children:[j.jsx(UI,{id:t,name:n||t,checked:typeof r>"u"?!1:!!r,required:w,disabled:o||s,autoFocus:d,onCheckedChange:C,onBlur:S,onFocus:T,className:x}),j.jsx(UE,{className:"leading-tight",htmlFor:t,children:rI(l,c||!l)})]})]})}function epe({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,x=Array.isArray(o)?o:[o],w=({target:C})=>d(e,Rr(C&&C.value,g,_)),v=({target:C})=>h(e,Rr(C&&C.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((C,S)=>{const T=Kh(C.value,x),E=Array.isArray(b)&&b.indexOf(C.value)!==-1,O=Zl(e,S);return j.jsxs("div",{className:"flex items-center gap-2",children:[j.jsx(UI,{id:O,name:t||e,required:c,disabled:n||E||l,onCheckedChange:M=>{u(M?Q$(S,x,g):Y$(S,x,g))},className:p,checked:T,autoFocus:s&&S===0,onBlur:w,onFocus:v,"aria-describedby":bo(e)}),j.jsx(UE,{className:"leading-tight",htmlFor:Zl(e,S),children:C.label})]},O)})})}function qI(e){const t=e+"CollectionProvider",[n,r]=yc(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=_=>{const{scope:x,children:w}=_,v=ko.useRef(null),C=ko.useRef(new Map).current;return j.jsx(o,{scope:x,itemMap:C,collectionRef:v,children:w})};l.displayName=t;const c=e+"CollectionSlot",u=Cy(c),d=ko.forwardRef((_,x)=>{const{scope:w,children:v}=_,C=s(c,w),S=cr(x,C.collectionRef);return j.jsx(u,{ref:S,children:v})});d.displayName=c;const h=e+"CollectionItemSlot",p="data-radix-collection-item",g=Cy(h),b=ko.forwardRef((_,x)=>{const{scope:w,children:v,...C}=_,S=ko.useRef(null),T=cr(x,S),E=s(h,w);return ko.useEffect(()=>(E.itemMap.set(S,{ref:S,...C}),()=>{E.itemMap.delete(S)})),j.jsx(g,{[p]:"",ref:T,children:v})});b.displayName=h;function y(_){const x=s(e+"CollectionConsumer",_);return ko.useCallback(()=>{const v=x.collectionRef.current;if(!v)return[];const C=Array.from(v.querySelectorAll(`[${p}]`));return Array.from(x.itemMap.values()).sort((E,O)=>C.indexOf(E.ref.current)-C.indexOf(O.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:l,Slot:d,ItemSlot:b},y,r]}var tpe=Eh[" useId ".trim().toString()]||(()=>{}),npe=0;function Zi(e){const[t,n]=k.useState(tpe());return Zu(()=>{n(r=>r??String(npe++))},[e]),t?`radix-${t}`:""}function Wu(e){const t=k.useRef(e);return k.useEffect(()=>{t.current=e}),k.useMemo(()=>(...n)=>t.current?.(...n),[])}var rpe=k.createContext(void 0);function VE(e){const t=k.useContext(rpe);return e||t||"ltr"}var tS="rovingFocusGroup.onEntryFocus",ope={bubbles:!1,cancelable:!0},Xh="RovingFocusGroup",[Zw,BI,ipe]=qI(Xh),[spe,HI]=yc(Xh,[ipe]),[ape,lpe]=spe(Xh),KI=k.forwardRef((e,t)=>j.jsx(Zw.Provider,{scope:e.__scopeRovingFocusGroup,children:j.jsx(Zw.Slot,{scope:e.__scopeRovingFocusGroup,children:j.jsx(cpe,{...e,ref:t})})}));KI.displayName=Xh;var cpe=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=cr(t,g),y=VE(s),[_,x]=Yh({prop:l,defaultProp:c??null,onChange:u,caller:Xh}),[w,v]=k.useState(!1),C=Wu(d),S=BI(n),T=k.useRef(!1),[E,O]=k.useState(0);return k.useEffect(()=>{const M=g.current;if(M)return M.addEventListener(tS,C),()=>M.removeEventListener(tS,C)},[C]),j.jsx(ape,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:_,onItemFocus:k.useCallback(M=>x(M),[x]),onItemShiftTab:k.useCallback(()=>v(!0),[]),onFocusableItemAdd:k.useCallback(()=>O(M=>M+1),[]),onFocusableItemRemove:k.useCallback(()=>O(M=>M-1),[]),children:j.jsx(er.div,{tabIndex:w||E===0?-1:0,"data-orientation":r,...p,ref:b,style:{outline:"none",...e.style},onMouseDown:zn(e.onMouseDown,()=>{T.current=!0}),onFocus:zn(e.onFocus,M=>{const P=!T.current;if(M.target===M.currentTarget&&P&&!w){const I=new CustomEvent(tS,ope);if(M.currentTarget.dispatchEvent(I),!I.defaultPrevented){const z=S().filter(Z=>Z.focusable),U=z.find(Z=>Z.active),G=z.find(Z=>Z.id===_),ee=[U,G,...z].filter(Boolean).map(Z=>Z.ref.current);WI(ee,h)}}T.current=!1}),onBlur:zn(e.onBlur,()=>v(!1))})})}),GI="RovingFocusGroupItem",ZI=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=lpe(GI,n),p=h.currentTabStopId===d,g=BI(n),{onFocusableItemAdd:b,onFocusableItemRemove:y,currentTabStopId:_}=h;return k.useEffect(()=>{if(r)return b(),()=>y()},[r,b,y]),j.jsx(Zw.ItemSlot,{scope:n,id:d,focusable:r,active:o,children:j.jsx(er.span,{tabIndex:p?0:-1,"data-orientation":h.orientation,...c,ref:t,onMouseDown:zn(e.onMouseDown,x=>{r?h.onItemFocus(d):x.preventDefault()}),onFocus:zn(e.onFocus,()=>h.onItemFocus(d)),onKeyDown:zn(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){h.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const w=dpe(x,h.orientation,h.dir);if(w!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let C=g().filter(S=>S.focusable).map(S=>S.ref.current);if(w==="last")C.reverse();else if(w==="prev"||w==="next"){w==="prev"&&C.reverse();const S=C.indexOf(x.currentTarget);C=h.loop?hpe(C,S+1):C.slice(S+1)}setTimeout(()=>WI(C))}}),children:typeof l=="function"?l({isCurrentTabStop:p,hasTabStop:_!=null}):l})})});ZI.displayName=GI;var upe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function fpe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function dpe(e,t,n){const r=fpe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return upe[r]}function WI(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function hpe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var ppe=KI,mpe=ZI,qE="Radio",[gpe,YI]=yc(qE),[ype,vpe]=gpe(qE),XI=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=cr(t,x=>g(x)),y=k.useRef(!1),_=p?d||!!p.closest("form"):!0;return j.jsxs(ype,{scope:n,checked:o,disabled:l,children:[j.jsx(er.button,{type:"button",role:"radio","aria-checked":o,"data-state":t9(o),"data-disabled":l?"":void 0,disabled:l,value:c,...h,ref:b,onClick:zn(e.onClick,x=>{o||u?.(),_&&(y.current=x.isPropagationStopped(),y.current||x.stopPropagation())})}),_&&j.jsx(e9,{control:p,bubbles:!y.current,name:r,value:c,checked:o,required:s,disabled:l,form:d,style:{transform:"translateX(-100%)"}})]})});XI.displayName=qE;var QI="RadioIndicator",JI=k.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,s=vpe(QI,n);return j.jsx(vf,{present:r||s.checked,children:j.jsx(er.span,{"data-state":t9(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t})})});JI.displayName=QI;var bpe="RadioBubbleInput",e9=k.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},s)=>{const l=k.useRef(null),c=cr(l,s),u=zE(n),d=LE(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(er.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}})});e9.displayName=bpe;function t9(e){return e?"checked":"unchecked"}var Spe=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],_0="RadioGroup",[wpe]=yc(_0,[HI,YI]),n9=HI(),r9=YI(),[xpe,_pe]=wpe(_0),o9=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=n9(n),y=VE(d),[_,x]=Yh({prop:s,defaultProp:o??null,onChange:p,caller:_0});return j.jsx(xpe,{scope:n,name:r,required:l,disabled:c,value:_,onValueChange:x,children:j.jsx(ppe,{asChild:!0,...b,orientation:u,dir:y,loop:h,children:j.jsx(er.div,{role:"radiogroup","aria-required":l,"aria-orientation":u,"data-disabled":c?"":void 0,dir:y,...g,ref:t})})})});o9.displayName=_0;var i9="RadioGroupItem",s9=k.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,s=_pe(i9,n),l=s.disabled||r,c=n9(n),u=r9(n),d=k.useRef(null),h=cr(t,d),p=s.value===o.value,g=k.useRef(!1);return k.useEffect(()=>{const b=_=>{Spe.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(mpe,{asChild:!0,...c,focusable:!l,active:p,children:j.jsx(XI,{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()})})})});s9.displayName=i9;var Epe="RadioGroupIndicator",a9=k.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=r9(n);return j.jsx(JI,{...o,...r,ref:t})});a9.displayName=Epe;var Cpe=o9,Tpe=s9,Rpe=a9;function Ope({className:e,...t}){return j.jsx(Cpe,{"data-slot":"radio-group",className:jt("grid gap-3",e),...t})}function Ape({className:e,...t}){return j.jsx(Tpe,{"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(Rpe,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:j.jsx($de,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}function kpe({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=w=>l(Rr(w,h,g)),y=({target:w})=>c(e,Rr(w&&w.value,h,g)),_=({target:w})=>u(e,Rr(w&&w.value,h,g)),x=!!(t&&t.inline);return j.jsx("div",{className:"mb-0",children:j.jsx(Ope,{defaultValue:n?.toString(),required:r,disabled:o||s,onValueChange:w=>{b(w)},onBlur:y,onFocus:_,"aria-describedby":bo(e),orientation:x?"horizontal":"vertical",className:jt("flex flex-wrap",{"flex-col":!x},d),children:Array.isArray(h)&&h.map((w,v)=>{const C=Array.isArray(p)&&p.indexOf(w.value)!==-1,S=Kh(w.value,n);return j.jsxs("div",{className:"flex items-center gap-2",children:[j.jsx(Ape,{checked:S,value:v.toString(),id:Zl(e,v),disabled:C}),j.jsx(UE,{className:"leading-tight",htmlFor:Zl(e,v),children:w.label})]},Zl(e,v))})})})}function l9(e,[t,n]){return Math.min(n,Math.max(t,e))}var c9=["PageUp","PageDown"],u9=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],f9={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},bf="Slider",[Ww,Mpe,jpe]=qI(bf),[d9]=yc(bf,[jpe]),[Ppe,E0]=d9(bf),h9=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,x=k.useRef(new Set),w=k.useRef(0),C=l==="horizontal"?Npe:Dpe,[S=[],T]=Yh({prop:h,defaultProp:d,onChange:z=>{[...x.current][w.current]?.focus(),p(z)}}),E=k.useRef(S);function O(z){const U=Fpe(S,z);I(z,U)}function M(z){I(z,w.current)}function P(){const z=E.current[w.current];S[w.current]!==z&&g(S)}function I(z,U,{commit:G}={commit:!1}){const J=Bpe(s),ee=Hpe(Math.round((z-r)/s)*s+r,J),Z=l9(ee,[r,o]);T((H=[])=>{const Y=zpe(H,Z,U);if(qpe(Y,u*s)){w.current=Y.indexOf(Z);const oe=String(Y)!==String(H);return oe&&G&&g(Y),oe?Y:H}else return H})}return j.jsx(Ppe,{scope:e.__scopeSlider,name:n,disabled:c,min:r,max:o,valueIndexToChangeRef:w,thumbs:x.current,values:S,orientation:l,form:y,children:j.jsx(Ww.Provider,{scope:e.__scopeSlider,children:j.jsx(Ww.Slot,{scope:e.__scopeSlider,children:j.jsx(C,{"aria-disabled":c,"data-disabled":c?"":void 0,..._,ref:t,onPointerDown:zn(_.onPointerDown,()=>{c||(E.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&&I(r,0,{commit:!0}),onEndKeyDown:()=>!c&&I(o,S.length-1,{commit:!0}),onStepKeyDown:({event:z,direction:U})=>{if(!c){const ee=c9.includes(z.key)||z.shiftKey&&u9.includes(z.key)?10:1,Z=w.current,H=S[Z],Y=s*ee*U;I(H+Y,Z,{commit:!0})}}})})})})});h9.displayName=bf;var[p9,m9]=d9(bf,{startEdge:"left",endEdge:"right",size:"width",direction:1}),Npe=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=cr(t,C=>g(C)),y=k.useRef(void 0),_=VE(o),x=_==="ltr",w=x&&!s||!x&&s;function v(C){const S=y.current||p.getBoundingClientRect(),T=[0,S.width],O=BE(T,w?[n,r]:[r,n]);return y.current=S,O(C-S.left)}return j.jsx(p9,{scope:e.__scopeSlider,startEdge:w?"left":"right",endEdge:w?"right":"left",direction:w?1:-1,size:"width",children:j.jsx(g9,{dir:_,"data-orientation":"horizontal",...h,ref:b,style:{...h.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:C=>{const S=v(C.clientX);l?.(S)},onSlideMove:C=>{const S=v(C.clientX);c?.(S)},onSlideEnd:()=>{y.current=void 0,u?.()},onStepKeyDown:C=>{const T=f9[w?"from-left":"from-right"].includes(C.key);d?.({event:C,direction:T?-1:1})}})})}),Dpe=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=cr(t,h),g=k.useRef(void 0),b=!o;function y(_){const x=g.current||h.current.getBoundingClientRect(),w=[0,x.height],C=BE(w,b?[r,n]:[n,r]);return g.current=x,C(_-x.top)}return j.jsx(p9,{scope:e.__scopeSlider,startEdge:b?"bottom":"top",endEdge:b?"top":"bottom",size:"height",direction:b?1:-1,children:j.jsx(g9,{"data-orientation":"vertical",...d,ref:p,style:{...d.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:_=>{const x=y(_.clientY);s?.(x)},onSlideMove:_=>{const x=y(_.clientY);l?.(x)},onSlideEnd:()=>{g.current=void 0,c?.()},onStepKeyDown:_=>{const w=f9[b?"from-bottom":"from-top"].includes(_.key);u?.({event:_,direction:w?-1:1})}})})}),g9=k.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:s,onHomeKeyDown:l,onEndKeyDown:c,onStepKeyDown:u,...d}=e,h=E0(bf,n);return j.jsx(er.span,{...d,ref:t,onKeyDown:zn(e.onKeyDown,p=>{p.key==="Home"?(l(p),p.preventDefault()):p.key==="End"?(c(p),p.preventDefault()):c9.concat(u9).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))})})}),y9="SliderTrack",v9=k.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=E0(y9,n);return j.jsx(er.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});v9.displayName=y9;var Yw="SliderRange",b9=k.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=E0(Yw,n),s=m9(Yw,n),l=k.useRef(null),c=cr(t,l),u=o.values.length,d=o.values.map(g=>x9(g,o.min,o.max)),h=u>1?Math.min(...d):0,p=100-Math.max(...d);return j.jsx(er.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:c,style:{...e.style,[s.startEdge]:h+"%",[s.endEdge]:p+"%"}})});b9.displayName=Yw;var Xw="SliderThumb",S9=k.forwardRef((e,t)=>{const n=Mpe(e.__scopeSlider),[r,o]=k.useState(null),s=cr(t,c=>o(c)),l=k.useMemo(()=>r?n().findIndex(c=>c.ref.current===r):-1,[n,r]);return j.jsx($pe,{...e,ref:s,index:l})}),$pe=k.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...s}=e,l=E0(Xw,n),c=m9(Xw,n),[u,d]=k.useState(null),h=cr(t,v=>d(v)),p=u?l.form||!!u.closest("form"):!0,g=LE(u),b=l.values[r],y=b===void 0?0:x9(b,l.min,l.max),_=Lpe(r,l.values.length),x=g?.[c.size],w=x?Upe(x,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}% + ${w}px)`},children:[j.jsx(Ww.ItemSlot,{scope:e.__scopeSlider,children:j.jsx(er.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(w9,{name:o??(l.name?l.name+(l.values.length>1?"[]":""):void 0),form:l.form,value:b},r)]})});S9.displayName=Xw;var Ipe="RadioBubbleInput",w9=k.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const o=k.useRef(null),s=cr(o,r),l=zE(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(er.input,{style:{display:"none"},...n,ref:s,defaultValue:t})});w9.displayName=Ipe;function zpe(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,s)=>o-s)}function x9(e,t,n){const s=100/(n-t)*(e-t);return l9(s,[0,100])}function Lpe(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function Fpe(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 Upe(e,t,n){const r=e/2,s=BE([0,50],[0,r]);return(r-s(t)*n)*n}function Vpe(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function qpe(e,t){if(t>0){const n=Vpe(e);return Math.min(...n)>=t}return!0}function BE(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 Bpe(e){return(String(e).split(".")[1]||"").length}function Hpe(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var Kpe=h9,Gpe=v9,Zpe=b9,Wpe=S9;function Ype({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(Kpe,{"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(Gpe,{"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(Zpe,{"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(Wpe,{"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 Xpe=["name","min","max","step","orientation","disabled","defaultValue","value","onValueChange","className","dir","inverted","minStepsBetweenThumbs"];function Qpe({value:e,readonly:t,disabled:n,options:r,schema:o,onChange:s,label:l,id:c}){const u=p=>s(p[0]),d={...eI(o)},h={id:c,...Qx(r.props||{},Xpe)};return j.jsxs(j.Fragment,{children:[j.jsx(Ype,{disabled:n||t,min:d.min,max:d.max,step:d.step,value:[e],onValueChange:u,...h,"aria-describedby":bo(c)}),e]})}var f3=1,Jpe=.9,eme=.8,tme=.17,nS=.1,rS=.999,nme=.9999,rme=.99,ome=/[\\\/_+.#"@\[\(\{&]/,ime=/[\\\/_+.#"@\[\(\{&]/g,sme=/[\s-]/,_9=/[\s-]/g;function Qw(e,t,n,r,o,s,l){if(s===t.length)return o===e.length?f3:rme;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=Qw(e,t,n,r,d+1,s+1,l),p>h&&(d===o?p*=f3:ome.test(e.charAt(d-1))?(p*=eme,b=e.slice(o,d-1).match(ime),b&&o>0&&(p*=Math.pow(rS,b.length))):sme.test(e.charAt(d-1))?(p*=Jpe,y=e.slice(o,d-1).match(_9),y&&o>0&&(p*=Math.pow(rS,y.length))):(p*=tme,o>0&&(p*=Math.pow(rS,d-o))),e.charAt(d)!==t.charAt(s)&&(p*=nme)),(p<nS&&n.charAt(d-1)===r.charAt(s+1)||r.charAt(s+1)===r.charAt(s)&&n.charAt(d-1)!==r.charAt(s))&&(g=Qw(e,t,n,r,d+1,s+2,l),g*nS>p&&(p=g*nS)),p>h&&(h=p),d=n.indexOf(u,d+1);return l[c]=h,h}function d3(e){return e.toLowerCase().replace(_9," ")}function ame(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,Qw(e,t,d3(e),d3(t),0,0,{})}function lme(e,t=globalThis?.document){const n=Wu(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 cme="DismissableLayer",Jw="dismissableLayer.update",ume="dismissableLayer.pointerDownOutside",fme="dismissableLayer.focusOutside",h3,E9=k.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),C9=k.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:l,onDismiss:c,...u}=e,d=k.useContext(E9),[h,p]=k.useState(null),g=h?.ownerDocument??globalThis?.document,[,b]=k.useState({}),y=cr(t,O=>p(O)),_=Array.from(d.layers),[x]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),w=_.indexOf(x),v=h?_.indexOf(h):-1,C=d.layersWithOutsidePointerEventsDisabled.size>0,S=v>=w,T=pme(O=>{const M=O.target,P=[...d.branches].some(I=>I.contains(M));!S||P||(o?.(O),l?.(O),O.defaultPrevented||c?.())},g),E=mme(O=>{const M=O.target;[...d.branches].some(I=>I.contains(M))||(s?.(O),l?.(O),O.defaultPrevented||c?.())},g);return lme(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&&(h3=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(h)),d.layers.add(h),p3(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=h3)}},[h,g,n,d]),k.useEffect(()=>()=>{h&&(d.layers.delete(h),d.layersWithOutsidePointerEventsDisabled.delete(h),p3())},[h,d]),k.useEffect(()=>{const O=()=>b({});return document.addEventListener(Jw,O),()=>document.removeEventListener(Jw,O)},[]),j.jsx(er.div,{...u,ref:y,style:{pointerEvents:C?S?"auto":"none":void 0,...e.style},onFocusCapture:zn(e.onFocusCapture,E.onFocusCapture),onBlurCapture:zn(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:zn(e.onPointerDownCapture,T.onPointerDownCapture)})});C9.displayName=cme;var dme="DismissableLayerBranch",hme=k.forwardRef((e,t)=>{const n=k.useContext(E9),r=k.useRef(null),o=cr(t,r);return k.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),j.jsx(er.div,{...e,ref:o})});hme.displayName=dme;function pme(e,t=globalThis?.document){const n=Wu(e),r=k.useRef(!1),o=k.useRef(()=>{});return k.useEffect(()=>{const s=c=>{if(c.target&&!r.current){let u=function(){T9(ume,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 mme(e,t=globalThis?.document){const n=Wu(e),r=k.useRef(!1);return k.useEffect(()=>{const o=s=>{s.target&&!r.current&&T9(fme,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 p3(){const e=new CustomEvent(Jw);document.dispatchEvent(e)}function T9(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?qhe(o,s):o.dispatchEvent(s)}var oS="focusScope.autoFocusOnMount",iS="focusScope.autoFocusOnUnmount",m3={bubbles:!1,cancelable:!0},gme="FocusScope",R9=k.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...l}=e,[c,u]=k.useState(null),d=Wu(o),h=Wu(s),p=k.useRef(null),g=cr(t,_=>u(_)),b=k.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;k.useEffect(()=>{if(r){let _=function(C){if(b.paused||!c)return;const S=C.target;c.contains(S)?p.current=S:Ea(p.current,{select:!0})},x=function(C){if(b.paused||!c)return;const S=C.relatedTarget;S!==null&&(c.contains(S)||Ea(p.current,{select:!0}))},w=function(C){if(document.activeElement===document.body)for(const T of C)T.removedNodes.length>0&&Ea(c)};document.addEventListener("focusin",_),document.addEventListener("focusout",x);const v=new MutationObserver(w);return c&&v.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",_),document.removeEventListener("focusout",x),v.disconnect()}}},[r,c,b.paused]),k.useEffect(()=>{if(c){y3.add(b);const _=document.activeElement;if(!c.contains(_)){const w=new CustomEvent(oS,m3);c.addEventListener(oS,d),c.dispatchEvent(w),w.defaultPrevented||(yme(xme(O9(c)),{select:!0}),document.activeElement===_&&Ea(c))}return()=>{c.removeEventListener(oS,d),setTimeout(()=>{const w=new CustomEvent(iS,m3);c.addEventListener(iS,h),c.dispatchEvent(w),w.defaultPrevented||Ea(_??document.body,{select:!0}),c.removeEventListener(iS,h),y3.remove(b)},0)}}},[c,d,h,b]);const y=k.useCallback(_=>{if(!n&&!r||b.paused)return;const x=_.key==="Tab"&&!_.altKey&&!_.ctrlKey&&!_.metaKey,w=document.activeElement;if(x&&w){const v=_.currentTarget,[C,S]=vme(v);C&&S?!_.shiftKey&&w===S?(_.preventDefault(),n&&Ea(C,{select:!0})):_.shiftKey&&w===C&&(_.preventDefault(),n&&Ea(S,{select:!0})):w===v&&_.preventDefault()}},[n,r,b.paused]);return j.jsx(er.div,{tabIndex:-1,...l,ref:g,onKeyDown:y})});R9.displayName=gme;function yme(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ea(r,{select:t}),document.activeElement!==n)return}function vme(e){const t=O9(e),n=g3(t,e),r=g3(t.reverse(),e);return[n,r]}function O9(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 g3(e,t){for(const n of e)if(!bme(n,{upTo:t}))return n}function bme(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 Sme(e){return e instanceof HTMLInputElement&&"select"in e}function Ea(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Sme(e)&&t&&e.select()}}var y3=wme();function wme(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=v3(e,t),e.unshift(t)},remove(t){e=v3(e,t),e[0]?.resume()}}}function v3(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function xme(e){return e.filter(t=>t.tagName!=="A")}var _me="Portal",A9=k.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=k.useState(!1);Zu(()=>s(!0),[]);const l=n||o&&globalThis?.document?.body;return l?She.createPortal(j.jsx(er.div,{...r,ref:t}),l):null});A9.displayName=_me;var sS=0;function Eme(){k.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??b3()),document.body.insertAdjacentElement("beforeend",e[1]??b3()),sS++,()=>{sS===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),sS--}},[])}function b3(){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 Ui=function(){return Ui=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},Ui.apply(this,arguments)};function k9(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 ex(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 Cme(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",Tme="with-scroll-bars-hidden",Rme="--removed-body-scroll-bar-size";function aS(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Ome(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 Ame=typeof window<"u"?k.useLayoutEffect:k.useEffect,S3=new WeakMap;function kme(e,t){var n=Ome(null,function(r){return e.forEach(function(o){return aS(o,r)})});return Ame(function(){var r=S3.get(n);if(r){var o=new Set(r),s=new Set(e),l=n.current;o.forEach(function(c){s.has(c)||aS(c,null)}),s.forEach(function(c){o.has(c)||aS(c,l)})}S3.set(n,e)},[e]),n}function Mme(e){return e}function jme(e,t){t===void 0&&(t=Mme);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 Pme(e){e===void 0&&(e={});var t=jme(null);return t.options=Ui({async:!0,ssr:!1},e),t}var M9=function(e){var t=e.sideCar,n=k9(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,Ui({},n))};M9.isSideCarExport=!0;function Nme(e,t){return e.useMedium(t),M9}var j9=Pme(),lS=function(){},C0=k.forwardRef(function(e,t){var n=k.useRef(null),r=k.useState({onScrollCapture:lS,onWheelCapture:lS,onTouchMoveCapture:lS}),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,x=e.allowPinchZoom,w=e.as,v=w===void 0?"div":w,C=e.gapMode,S=k9(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),T=g,E=kme([n,t]),O=Ui(Ui({},S),o);return k.createElement(k.Fragment,null,h&&k.createElement(T,{sideCar:j9,removeScrollBar:d,shards:p,noRelative:b,noIsolation:y,inert:_,setCallbacks:s,allowPinchZoom:!!x,lockRef:n,gapMode:C}),l?k.cloneElement(k.Children.only(c),Ui(Ui({},O),{ref:E})):k.createElement(v,Ui({},O,{className:u,ref:E}),c))});C0.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};C0.classNames={fullWidth:Kg,zeroRight:Hg};var Dme=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function $me(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Dme();return t&&e.setAttribute("nonce",t),e}function Ime(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function zme(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Lme=function(){var e=0,t=null;return{add:function(n){e==0&&(t=$me())&&(Ime(t,n),zme(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Fme=function(){var e=Lme();return function(t,n){k.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},P9=function(){var e=Fme(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Ume={left:0,top:0,right:0,gap:0},cS=function(e){return parseInt(e||"",10)||0},Vme=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[cS(n),cS(r),cS(o)]},qme=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Ume;var t=Vme(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])}},Bme=P9(),Ru="data-scroll-locked",Hme=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(Tme,` {
|
|
85
|
+
overflow: hidden `).concat(r,`;
|
|
86
|
+
padding-right: `).concat(c,"px ").concat(r,`;
|
|
87
|
+
}
|
|
88
|
+
body[`).concat(Ru,`] {
|
|
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(Ru,`] {
|
|
118
|
+
`).concat(Rme,": ").concat(c,`px;
|
|
119
|
+
}
|
|
120
|
+
`)},w3=function(){var e=parseInt(document.body.getAttribute(Ru)||"0",10);return isFinite(e)?e:0},Kme=function(){k.useEffect(function(){return document.body.setAttribute(Ru,(w3()+1).toString()),function(){var e=w3()-1;e<=0?document.body.removeAttribute(Ru):document.body.setAttribute(Ru,e.toString())}},[])},Gme=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Kme();var s=k.useMemo(function(){return qme(o)},[o]);return k.createElement(Bme,{styles:Hme(s,!t,o,n?"":"!important")})},tx=!1;if(typeof window<"u")try{var mg=Object.defineProperty({},"passive",{get:function(){return tx=!0,!0}});window.addEventListener("test",mg,mg),window.removeEventListener("test",mg,mg)}catch{tx=!1}var iu=tx?{passive:!1}:!1,Zme=function(e){return e.tagName==="TEXTAREA"},N9=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Zme(e)&&n[t]==="visible")},Wme=function(e){return N9(e,"overflowY")},Yme=function(e){return N9(e,"overflowX")},x3=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=D9(e,r);if(o){var s=$9(e,r),l=s[1],c=s[2];if(l>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Xme=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Qme=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},D9=function(e,t){return e==="v"?Wme(t):Yme(t)},$9=function(e,t){return e==="v"?Xme(t):Qme(t)},Jme=function(e,t){return e==="h"&&t==="rtl"?-1:1},ege=function(e,t,n,r,o){var s=Jme(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=$9(e,c),y=b[0],_=b[1],x=b[2],w=_-x-s*y;(y||w)&&D9(e,c)&&(p+=w,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]},_3=function(e){return[e.deltaX,e.deltaY]},E3=function(e){return e&&"current"in e?e.current:e},tge=function(e,t){return e[0]===t[0]&&e[1]===t[1]},nge=function(e){return`
|
|
121
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
122
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
123
|
+
`)},rge=0,su=[];function oge(e){var t=k.useRef([]),n=k.useRef([0,0]),r=k.useRef(),o=k.useState(rge++)[0],s=k.useState(P9)[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 _=Cme([e.lockRef.current],(e.shards||[]).map(E3),!0).filter(Boolean);return _.forEach(function(x){return x.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),_.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var c=k.useCallback(function(_,x){if("touches"in _&&_.touches.length===2||_.type==="wheel"&&_.ctrlKey)return!l.current.allowPinchZoom;var w=gg(_),v=n.current,C="deltaX"in _?_.deltaX:v[0]-w[0],S="deltaY"in _?_.deltaY:v[1]-w[1],T,E=_.target,O=Math.abs(C)>Math.abs(S)?"h":"v";if("touches"in _&&O==="h"&&E.type==="range")return!1;var M=window.getSelection(),P=M&&M.anchorNode,I=P?P===E||P.contains(E):!1;if(I)return!1;var z=x3(O,E);if(!z)return!0;if(z?T=O:(T=O==="v"?"h":"v",z=x3(O,E)),!z)return!1;if(!r.current&&"changedTouches"in _&&(C||S)&&(r.current=T),!T)return!0;var U=r.current||T;return ege(U,x,_,U==="h"?C:S)},[]),u=k.useCallback(function(_){var x=_;if(!(!su.length||su[su.length-1]!==s)){var w="deltaY"in x?_3(x):gg(x),v=t.current.filter(function(T){return T.name===x.type&&(T.target===x.target||x.target===T.shadowParent)&&tge(T.delta,w)})[0];if(v&&v.should){x.cancelable&&x.preventDefault();return}if(!v){var C=(l.current.shards||[]).map(E3).filter(Boolean).filter(function(T){return T.contains(x.target)}),S=C.length>0?c(x,C[0]):!l.current.noIsolation;S&&x.cancelable&&x.preventDefault()}}},[]),d=k.useCallback(function(_,x,w,v){var C={name:_,delta:x,target:w,should:v,shadowParent:ige(w)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(S){return S!==C})},1)},[]),h=k.useCallback(function(_){n.current=gg(_),r.current=void 0},[]),p=k.useCallback(function(_){d(_.type,_3(_),_.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:nge(o)}):null,b?k.createElement(Gme,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function ige(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const sge=Nme(j9,oge);var I9=k.forwardRef(function(e,t){return k.createElement(C0,Ui({},e,{ref:t,sideCar:sge}))});I9.classNames=C0.classNames;var age=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={},uS=0,z9=function(e){return e&&(e.host||z9(e.parentNode))},lge=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=z9(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})},cge=function(e,t,n,r){var o=lge(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,x=(s.get(g)||0)+1;au.set(g,_),s.set(g,x),l.push(g),_===1&&y&&yg.set(g,!0),x===1&&g.setAttribute(n,"true"),y||g.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",g,w)}})};return h(t),c.clear(),uS++,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)}),uS--,uS||(au=new WeakMap,au=new WeakMap,yg=new WeakMap,vg={})}},uge=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=age(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),cge(r,o,n,"aria-hidden")):function(){return null}},T0="Dialog",[L9]=yc(T0),[fge,Ai]=L9(T0),F9=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]=Yh({prop:r,defaultProp:o??!1,onChange:s,caller:T0});return j.jsx(fge,{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})};F9.displayName=T0;var U9="DialogTrigger",dge=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ai(U9,n),s=cr(t,o.triggerRef);return j.jsx(er.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":GE(o.open),...r,ref:s,onClick:zn(e.onClick,o.onOpenToggle)})});dge.displayName=U9;var HE="DialogPortal",[hge,V9]=L9(HE,{forceMount:void 0}),q9=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=Ai(HE,t);return j.jsx(hge,{scope:t,forceMount:n,children:k.Children.map(r,l=>j.jsx(vf,{present:n||s.open,children:j.jsx(A9,{asChild:!0,container:o,children:l})}))})};q9.displayName=HE;var Ty="DialogOverlay",B9=k.forwardRef((e,t)=>{const n=V9(Ty,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=Ai(Ty,e.__scopeDialog);return s.modal?j.jsx(vf,{present:r||s.open,children:j.jsx(mge,{...o,ref:t})}):null});B9.displayName=Ty;var pge=Cy("DialogOverlay.RemoveScroll"),mge=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ai(Ty,n);return j.jsx(I9,{as:pge,allowPinchZoom:!0,shards:[o.contentRef],children:j.jsx(er.div,{"data-state":GE(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),rc="DialogContent",H9=k.forwardRef((e,t)=>{const n=V9(rc,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=Ai(rc,e.__scopeDialog);return j.jsx(vf,{present:r||s.open,children:s.modal?j.jsx(gge,{...o,ref:t}):j.jsx(yge,{...o,ref:t})})});H9.displayName=rc;var gge=k.forwardRef((e,t)=>{const n=Ai(rc,e.__scopeDialog),r=k.useRef(null),o=cr(t,n.contentRef,r);return k.useEffect(()=>{const s=r.current;if(s)return uge(s)},[]),j.jsx(K9,{...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())})}),yge=k.forwardRef((e,t)=>{const n=Ai(rc,e.__scopeDialog),r=k.useRef(!1),o=k.useRef(!1);return j.jsx(K9,{...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()}})}),K9=k.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...l}=e,c=Ai(rc,n),u=k.useRef(null),d=cr(t,u);return Eme(),j.jsxs(j.Fragment,{children:[j.jsx(R9,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:j.jsx(C9,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":GE(c.open),...l,ref:d,onDismiss:()=>c.onOpenChange(!1)})}),j.jsxs(j.Fragment,{children:[j.jsx(wge,{titleId:c.titleId}),j.jsx(_ge,{contentRef:u,descriptionId:c.descriptionId})]})]})}),KE="DialogTitle",vge=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ai(KE,n);return j.jsx(er.h2,{id:o.titleId,...r,ref:t})});vge.displayName=KE;var G9="DialogDescription",bge=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ai(G9,n);return j.jsx(er.p,{id:o.descriptionId,...r,ref:t})});bge.displayName=G9;var Z9="DialogClose",Sge=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ai(Z9,n);return j.jsx(er.button,{type:"button",...r,ref:t,onClick:zn(e.onClick,()=>o.onOpenChange(!1))})});Sge.displayName=Z9;function GE(e){return e?"open":"closed"}var W9="DialogTitleWarning",[ewe,Y9]=Ahe(W9,{contentName:rc,titleName:KE,docsSlug:"dialog"}),wge=({titleId:e})=>{const t=Y9(W9),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},xge="DialogDescriptionWarning",_ge=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Y9(xge).contentName}}.`;return k.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Ege=F9,Cge=q9,Tge=B9,Rge=H9,_d='[cmdk-group=""]',fS='[cmdk-group-items=""]',Oge='[cmdk-group-heading=""]',X9='[cmdk-item=""]',C3=`${X9}:not([aria-disabled="true"])`,nx="cmdk-item-select",cu="data-value",Age=(e,t,n)=>ame(e,t,n),Q9=k.createContext(void 0),Qh=()=>k.useContext(Q9),J9=k.createContext(void 0),ZE=()=>k.useContext(J9),e6=k.createContext(void 0),t6=k.forwardRef((e,t)=>{let n=uu(()=>{var q,V;return{search:"",value:(V=(q=e.value)!=null?q:e.defaultValue)!=null?V:"",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=n6(e),{label:u,children:d,value:h,onValueChange:p,filter:g,shouldFilter:b,loop:y,disablePointerSelection:_=!1,vimBindings:x=!0,...w}=e,v=Zi(),C=Zi(),S=Zi(),T=k.useRef(null),E=Fge();oc(()=>{if(h!==void 0){let q=h.trim();n.current.value=q,O.emit()}},[h]),oc(()=>{E(6,G)},[]);let O=k.useMemo(()=>({subscribe:q=>(l.current.add(q),()=>l.current.delete(q)),snapshot:()=>n.current,setState:(q,V,D)=>{var B,te,re,ae;if(!Object.is(n.current[q],V)){if(n.current[q]=V,q==="search")U(),I(),E(1,z);else if(q==="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(E(7,()=>{var ge;n.current.selectedItemId=(ge=J())==null?void 0:ge.id,O.emit()}),D||E(5,G),((te=c.current)==null?void 0:te.value)!==void 0){let ge=V??"";(ae=(re=c.current).onValueChange)==null||ae.call(re,ge);return}}O.emit()}},emit:()=>{l.current.forEach(q=>q())}}),[]),M=k.useMemo(()=>({value:(q,V,D)=>{var B;V!==((B=s.current.get(q))==null?void 0:B.value)&&(s.current.set(q,{value:V,keywords:D}),n.current.filtered.items.set(q,P(V,D)),E(2,()=>{I(),O.emit()}))},item:(q,V)=>(r.current.add(q),V&&(o.current.has(V)?o.current.get(V).add(q):o.current.set(V,new Set([q]))),E(3,()=>{U(),I(),n.current.value||z(),O.emit()}),()=>{s.current.delete(q),r.current.delete(q),n.current.filtered.items.delete(q);let D=J();E(4,()=>{U(),D?.getAttribute("id")===q&&z(),O.emit()})}),group:q=>(o.current.has(q)||o.current.set(q,new Set),()=>{s.current.delete(q),o.current.delete(q)}),filter:()=>c.current.shouldFilter,label:u||e["aria-label"],getDisablePointerSelection:()=>c.current.disablePointerSelection,listId:v,inputId:S,labelId:C,listInnerRef:T}),[]);function P(q,V){var D,B;let te=(B=(D=c.current)==null?void 0:D.filter)!=null?B:Age;return q?te(q,n.current.search,V):0}function I(){if(!n.current.search||c.current.shouldFilter===!1)return;let q=n.current.filtered.items,V=[];n.current.filtered.groups.forEach(B=>{let te=o.current.get(B),re=0;te.forEach(ae=>{let ge=q.get(ae);re=Math.max(ge,re)}),V.push([B,re])});let D=T.current;ee().sort((B,te)=>{var re,ae;let ge=B.getAttribute("id"),ke=te.getAttribute("id");return((re=q.get(ke))!=null?re:0)-((ae=q.get(ge))!=null?ae:0)}).forEach(B=>{let te=B.closest(fS);te?te.appendChild(B.parentElement===te?B:B.closest(`${fS} > *`)):D.appendChild(B.parentElement===D?B:B.closest(`${fS} > *`))}),V.sort((B,te)=>te[1]-B[1]).forEach(B=>{var te;let re=(te=T.current)==null?void 0:te.querySelector(`${_d}[${cu}="${encodeURIComponent(B[0])}"]`);re?.parentElement.appendChild(re)})}function z(){let q=ee().find(D=>D.getAttribute("aria-disabled")!=="true"),V=q?.getAttribute(cu);O.setState("value",V||void 0)}function U(){var q,V,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 ae=(V=(q=s.current.get(re))==null?void 0:q.value)!=null?V:"",ge=(B=(D=s.current.get(re))==null?void 0:D.keywords)!=null?B:[],ke=P(ae,ge);n.current.filtered.items.set(re,ke),ke>0&&te++}for(let[re,ae]of o.current)for(let ge of ae)if(n.current.filtered.items.get(ge)>0){n.current.filtered.groups.add(re);break}n.current.filtered.count=te}function G(){var q,V,D;let B=J();B&&(((q=B.parentElement)==null?void 0:q.firstChild)===B&&((D=(V=B.closest(_d))==null?void 0:V.querySelector(Oge))==null||D.scrollIntoView({block:"nearest"})),B.scrollIntoView({block:"nearest"}))}function J(){var q;return(q=T.current)==null?void 0:q.querySelector(`${X9}[aria-selected="true"]`)}function ee(){var q;return Array.from(((q=T.current)==null?void 0:q.querySelectorAll(C3))||[])}function Z(q){let V=ee()[q];V&&O.setState("value",V.getAttribute(cu))}function H(q){var V;let D=J(),B=ee(),te=B.findIndex(ae=>ae===D),re=B[te+q];(V=c.current)!=null&&V.loop&&(re=te+q<0?B[B.length-1]:te+q===B.length?B[0]:B[te+q]),re&&O.setState("value",re.getAttribute(cu))}function Y(q){let V=J(),D=V?.closest(_d),B;for(;D&&!B;)D=q>0?zge(D,_d):Lge(D,_d),B=D?.querySelector(C3);B?O.setState("value",B.getAttribute(cu)):H(q)}let oe=()=>Z(ee().length-1),ne=q=>{q.preventDefault(),q.metaKey?oe():q.altKey?Y(1):H(1)},$=q=>{q.preventDefault(),q.metaKey?Z(0):q.altKey?Y(-1):H(-1)};return k.createElement(as.div,{ref:t,tabIndex:-1,...w,"cmdk-root":"",onKeyDown:q=>{var V;(V=w.onKeyDown)==null||V.call(w,q);let D=q.nativeEvent.isComposing||q.keyCode===229;if(!(q.defaultPrevented||D))switch(q.key){case"n":case"j":{x&&q.ctrlKey&&ne(q);break}case"ArrowDown":{ne(q);break}case"p":case"k":{x&&q.ctrlKey&&$(q);break}case"ArrowUp":{$(q);break}case"Home":{q.preventDefault(),Z(0);break}case"End":{q.preventDefault(),oe();break}case"Enter":{q.preventDefault();let B=J();if(B){let te=new Event(nx);B.dispatchEvent(te)}}}}},k.createElement("label",{"cmdk-label":"",htmlFor:M.inputId,id:M.labelId,style:Vge},u),R0(e,q=>k.createElement(J9.Provider,{value:O},k.createElement(Q9.Provider,{value:M},q))))}),kge=k.forwardRef((e,t)=>{var n,r;let o=Zi(),s=k.useRef(null),l=k.useContext(e6),c=Qh(),u=n6(e),d=(r=(n=u.current)==null?void 0:n.forceMount)!=null?r:l?.forceMount;oc(()=>{if(!d)return c.item(o,l?.id)},[d]);let h=r6(o,s,[e.value,e.children,s],e.keywords),p=ZE(),g=Za(E=>E.value&&E.value===h.current),b=Za(E=>d||c.filter()===!1?!0:E.search?E.filtered.items.get(o)>0:!0);k.useEffect(()=>{let E=s.current;if(!(!E||e.disabled))return E.addEventListener(nx,y),()=>E.removeEventListener(nx,y)},[b,e.onSelect,e.disabled]);function y(){var E,O;_(),(O=(E=u.current).onSelect)==null||O.call(E,h.current)}function _(){p.setState("value",h.current,!0)}if(!b)return null;let{disabled:x,value:w,onSelect:v,forceMount:C,keywords:S,...T}=e;return k.createElement(as.div,{ref:Ga(s,t),...T,id:o,"cmdk-item":"",role:"option","aria-disabled":!!x,"aria-selected":!!g,"data-disabled":!!x,"data-selected":!!g,onPointerMove:x||c.getDisablePointerSelection()?void 0:_,onClick:x?void 0:y},e.children)}),Mge=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=Qh(),p=Za(b=>o||h.filter()===!1?!0:b.search?b.filtered.groups.has(l):!0);oc(()=>h.group(l),[]),r6(l,c,[e.value,e.heading,u]);let g=k.useMemo(()=>({id:l,forceMount:o}),[o]);return k.createElement(as.div,{ref:Ga(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),R0(e,b=>k.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?d:void 0},k.createElement(e6.Provider,{value:g},b))))}),jge=k.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=k.useRef(null),s=Za(l=>!l.search);return!n&&!s?null:k.createElement(as.div,{ref:Ga(o,t),...r,"cmdk-separator":"",role:"separator"})}),Pge=k.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,s=ZE(),l=Za(d=>d.search),c=Za(d=>d.selectedItemId),u=Qh();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)}})}),Nge=k.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,s=k.useRef(null),l=k.useRef(null),c=Za(d=>d.selectedItemId),u=Qh();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:Ga(s,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":c,"aria-label":r,id:u.listId},R0(e,d=>k.createElement("div",{ref:Ga(l,u.listInnerRef),"cmdk-list-sizer":""},d)))}),Dge=k.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:s,container:l,...c}=e;return k.createElement(Ege,{open:n,onOpenChange:r},k.createElement(Cge,{container:l},k.createElement(Tge,{"cmdk-overlay":"",className:o}),k.createElement(Rge,{"aria-label":e.label,"cmdk-dialog":"",className:s},k.createElement(t6,{ref:t,...c}))))}),$ge=k.forwardRef((e,t)=>Za(n=>n.filtered.count===0)?k.createElement(as.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Ige=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},R0(e,l=>k.createElement("div",{"aria-hidden":!0},l)))}),vc=Object.assign(t6,{List:Nge,Item:kge,Input:Pge,Group:Mge,Separator:jge,Dialog:Dge,Empty:$ge,Loading:Ige});function zge(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Lge(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function n6(e){let t=k.useRef(e);return oc(()=>{t.current=e}),t}var oc=typeof window>"u"?k.useEffect:k.useLayoutEffect;function uu(e){let t=k.useRef();return t.current===void 0&&(t.current=e()),t}function Za(e){let t=ZE(),n=()=>e(t.snapshot());return k.useSyncExternalStore(t.subscribe,n,n)}function r6(e,t,n,r=[]){let o=k.useRef(),s=Qh();return oc(()=>{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 Fge=()=>{let[e,t]=k.useState(),n=uu(()=>new Map);return oc(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function Uge(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function R0({asChild:e,children:t},n){return e&&k.isValidElement(t)?k.cloneElement(Uge(t),{ref:t.ref},n(t.props.children)):n(t)}var Vge={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const qge=tl("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 Bge({className:e,variant:t,asChild:n=!1,...r}){const o=n?OI:"span";return j.jsx(o,{"data-slot":"badge",className:jt(qge({variant:t}),e),...r})}const o6=k.forwardRef(({className:e,...t},n)=>j.jsx(vc,{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})),Hge=k.forwardRef(({className:e,...t},n)=>j.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[j.jsx(Fde,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),j.jsx(vc.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})]}));Hge.displayName=vc.Input.displayName;function i6({className:e,...t}){return j.jsx(vc.List,{"data-slot":"command-list",className:jt("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}function s6({className:e,...t}){return j.jsx(vc.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 a6({className:e,...t}){return j.jsx(vc.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 Kge({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),[_,x]=k.useState(""),w=k.useMemo(()=>t.filter(O=>n.some(M=>ka(O.value,M))),[t,n]),v=k.useMemo(()=>t.filter(O=>!w.some(M=>ka(M.value,O.value))),[t,w]),C=k.useCallback(O=>{if(s)return;const M=w.filter(P=>!ka(P.value,O.value));r?.(M.map(P=>P.index))},[w,r,s]),S=k.useCallback(O=>{if(!(s||!g.current||g.current.value!==""))if(O.key==="Delete"||O.key==="Backspace"){const M=w.slice(0,-1);r?.(M.map(P=>P.index))}else O.key==="Escape"&&g.current.blur()},[w,r,s]),T=k.useCallback(O=>{if(s)return;x("");const M=e?[...w,O]:[O];r?.(M.map(P=>P.index))},[e,w,r,s]),E=k.useCallback(O=>{s||y(!0),u?.(O)},[s,u]);return j.jsxs(o6,{onKeyDown:S,className:jt("overflow-visible bg-transparent",h),autoFocus:o,"aria-disabled":s,onBlur:d,onFocus:E,"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:[w.map(O=>j.jsxs(Bge,{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&&C(O),onMouseDown:M=>{M.preventDefault(),M.stopPropagation()},onClick:()=>C(O),disabled:s,children:j.jsx(Bde,{className:jt("h-3 w-3 text-muted-foreground hover:text-foreground",s&&"pointer-events-none")})})]},O.value)),j.jsx(vc.Input,{ref:g,value:_,onValueChange:x,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(s6,{className:"h-full overflow-auto",children:j.jsx(i6,{children:v.map(O=>j.jsx(a6,{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:()=>T(O),className:"cursor-pointer",children:O.label},`${O.value}-command-item`))})})})})]})}function Gge({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),x=k.useRef(null);k.useEffect(()=>{g&&_.current&&requestAnimationFrame(()=>{var v;(v=_.current)===null||v===void 0||v.scrollIntoView({block:"nearest"})})},[g]);const w=v=>{x.current&&!x.current.contains(v.relatedTarget)&&b(!1),h?.(v)};return j.jsxs(o6,{ref:x,className:jt("overflow-visible bg-transparent",p),autoFocus:r,"aria-disabled":o,onBlur:w,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(EI,{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(s6,{className:"h-full overflow-auto",children:j.jsx(i6,{children:e.map(v=>j.jsxs(a6,{ref:v.value===t?_:void 0,onMouseDown:C=>{C.preventDefault(),C.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(Ode,{className:"h-4 w-4"})})]},v.value))})})}):null})]})}function Zge({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:x,emptyValue:w}=t,v=()=>{h(e,Rr(s,_,w))},C=()=>{d(e,Rr(s,_,w))},S=_?.map(({value:E,label:O},M)=>({value:l?E:M.toString(),label:O,index:M,disabled:Array.isArray(x)&&x.includes(E)})),T=jt({"border-destructive":b.length>0},y);return j.jsx("div",{className:"p-0.5",children:l?j.jsx(Kge,{id:e,autoFocus:c,disabled:r||o,multiple:!0,className:T,items:S,selected:s,onValueChange:E=>{u(Rr(E,_,w))},onFocus:v,onBlur:C}):j.jsx(Gge,{items:S,selected:X$(s??p,_,!1),onValueChange:E=>{u(Rr(E,_,w))},autoFocus:c,disabled:r||o,required:n,placeholder:g,className:T,onFocus:v,onBlur:C,ariaDescribedby:bo(e)})})}function Wge({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 Yge({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:x}})=>h(x===""?p.emptyValue:x),y=({target:x})=>u(e,x&&x.value),_=({target:x})=>d(e,x&&x.value);return j.jsx("div",{className:"flex p-0.5",children:j.jsx(Wge,{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":bo(e),className:g})})}function Xge(){return{CheckboxWidget:Jhe,CheckboxesWidget:epe,RadioWidget:kpe,RangeWidget:Qpe,SelectWidget:Zge,TextareaWidget:Yge}}function Qge(){return{templates:Ohe(),widgets:Xge()}}function Jge(){return lde(Qge())}const eye=Jge();function tye({className:e,size:t="default",...n}){return j.jsx("div",{"data-slot":"card","data-size":t,className:vn("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 nye({className:e,...t}){return j.jsx("div",{"data-slot":"card-content",className:vn("px-4 group-data-[size=sm]/card:px-3",e),...t})}var l6=function(e){return typeof e=="function"},rye=function(e){return typeof e=="string"},c6=function(e){return typeof e=="number"};function T3(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 rx(e){var t=k.useRef(e);return t.current=e,t}var oye=function(e){var t=rx(e);k.useEffect(function(){return function(){t.current()}},[])},iye=!!(typeof window<"u"&&window.document&&window.document.createElement);function u6(e,t){if(iye){if(!e)return t;var n;return l6(e)?n=e():"current"in e?n=e.current:n=e,n}}var sye=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 u6(g)});if(!s.current){s.current=!0,l.current=p,c.current=r,u.current=n();return}(p.length!==l.current.length||!T3(l.current,p)||!T3(c.current,r))&&((d=u.current)===null||d===void 0||d.call(u),l.current=p,c.current=r,u.current=n())}),oye(function(){var d;(d=u.current)===null||d===void 0||d.call(u),s.current=!1})};return t},aye=sye(k.useEffect),dS,R3;function lye(){if(R3)return dS;R3=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 dS=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}},dS}var cye=lye();const uye=es(cye);var fye=function(e,t){return e===void 0&&(e=[]),t===void 0&&(t=[]),uye(e,t)},dye=function(e,t,n){var r=k.useRef(void 0),o=k.useRef(0);fye(t,r.current)||(o.current+=1),r.current=t,aye(e,[o.current],n)},hye=/(mac|iphone|ipod|ipad)/i.test(typeof navigator<"u"?navigator?.platform:""),f6={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:hye?[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},ox={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"?f6.meta.includes(e.keyCode):e.metaKey}};function d6(e){return rye(e)||c6(e)}function pye(e){var t=Object.keys(ox).reduce(function(n,r){return ox[r](e)?n+1:n},0);return[16,17,18,91,92].includes(e.keyCode)?t:t+1}function O3(e,t,n){var r,o;if(!e.key)return!1;if(c6(t))return e.keyCode===t?t:!1;var s=t.split("."),l=0;try{for(var c=ex(s),u=c.next();!u.done;u=c.next()){var d=u.value,h=ox[d],p=f6[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&&pye(e)===s.length?t:!1:l===s.length?t:!1}function mye(e,t){return l6(e)?e:d6(e)?function(n){return O3(n,e,t)}:Array.isArray(e)?function(n){return e.find(function(r){return O3(n,r,t)})}:function(){return!!e}}var gye=["keydown"];function yye(e,t,n){var r={},o=r.events,s=o===void 0?gye:o,l=r.target,c=r.exactMatch,u=c===void 0?!1:c,d=r.useCapture,h=d===void 0?!1:d,p=rx(t),g=rx(e);dye(function(){var b,y,_,x=u6(l,window);if(x){var w=function(T){var E,O=T,M=mye(g.current,u),P=M(O),I=d6(P)?P:O.key;if(P)return(E=p.current)===null||E===void 0?void 0:E.call(p,O,I)};try{for(var v=ex(s),C=v.next();!C.done;C=v.next()){var S=C.value;(_=x?.addEventListener)===null||_===void 0||_.call(x,S,w,h)}}catch(T){b={error:T}}finally{try{C&&!C.done&&(y=v.return)&&y.call(v)}finally{if(b)throw b.error}}return function(){var T,E,O;try{for(var M=ex(s),P=M.next();!P.done;P=M.next()){var I=P.value;(O=x?.removeEventListener)===null||O===void 0||O.call(x,I,w,h)}}catch(z){T={error:z}}finally{try{P&&!P.done&&(E=M.return)&&E.call(M)}finally{if(T)throw T.error}}}}},[s],l)}const vye=({validateForm:e,formData:t})=>{const n=dc(),{mutateAsync:r,isPending:o}=dte(),s=async()=>{e&&!await e()||t&&await r({toolName:n.name,args:t})};return yye("Enter",s),j.jsx("div",{className:"flex flex-col items-end gap-1",children:j.jsxs(sh,{onClick:s,variant:"default",disabled:o,children:[o?j.jsx(Ate,{className:"h-4 w-4 animate-spin"}):j.jsx(Pte,{className:"h-4 w-4"}),"Call Tool"]})})},bye={"ui:submitButtonOptions":{norender:!0}},Sye=({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(tye,{children:j.jsx(nye,{children:j.jsx(eye,{ref:r,schema:e??{},validator:wde,uiSchema:bye,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:vn("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}})})}),wye=()=>{const e=k.useRef(null),t=dc(),{setToolData:n}=lf(),o=cf(t.name)?.input??{},s=l=>{n(t.name,{input:l??{}})};return j.jsxs("div",{className:vn("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(vye,{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(Sye,{schema:t.inputSchema,formData:o,setFormData:s,ref:e},t.name)})]})};var Gg={exports:{}},xye=Gg.exports,A3;function _ye(){return A3||(A3=1,(function(e,t){(function(n,r){e.exports=r(nf())})(xye,(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 x=d(6933);u.atelierHeath=h(x);var w=d(523);u.atelierLakeside=h(w);var v=d(1223);u.atelierSeaside=h(v);var C=d(1233);u.bespin=h(C);var S=d(2847);u.brewer=h(S);var T=d(8120);u.bright=h(T);var E=d(6305);u.chalk=h(E);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 I=d(4582);u.eighties=h(I);var z=d(7096);u.embers=h(z);var U=d(9887);u.flat=h(U);var G=d(7199);u.google=h(G);var J=d(1985);u.grayscale=h(J);var ee=d(8093);u.greenscreen=h(ee);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 q=d(9768);u.ocean=h(q);var V=d(8293);u.paraiso=h(V);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 ae=d(1091);u.summerfruit=h(ae);var ge=d(6943);u.tomorrow=h(ge);var ke=d(5670);u.tube=h(ke);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,x=b[y].labels;delete b[y].channels,delete b[y].labels,Object.defineProperty(b[y],"channels",{value:_}),Object.defineProperty(b[y],"labels",{value:x})}b.rgb.hsl=function(w){var v,C,S=w[0]/255,T=w[1]/255,E=w[2]/255,O=Math.min(S,T,E),M=Math.max(S,T,E),P=M-O;return M===O?v=0:S===M?v=(T-E)/P:T===M?v=2+(E-S)/P:E===M&&(v=4+(S-T)/P),(v=Math.min(60*v,360))<0&&(v+=360),C=(O+M)/2,[v,100*(M===O?0:C<=.5?P/(M+O):P/(2-M-O)),100*C]},b.rgb.hsv=function(w){var v,C,S,T,E,O=w[0]/255,M=w[1]/255,P=w[2]/255,I=Math.max(O,M,P),z=I-Math.min(O,M,P),U=function(G){return(I-G)/6/z+.5};return z===0?T=E=0:(E=z/I,v=U(O),C=U(M),S=U(P),O===I?T=S-C:M===I?T=.3333333333333333+v-S:P===I&&(T=.6666666666666666+C-v),T<0?T+=1:T>1&&(T-=1)),[360*T,100*E,100*I]},b.rgb.hwb=function(w){var v=w[0],C=w[1],S=w[2];return[b.rgb.hsl(w)[0],100*(.00392156862745098*Math.min(v,Math.min(C,S))),100*(S=1-.00392156862745098*Math.max(v,Math.max(C,S)))]},b.rgb.cmyk=function(w){var v,C=w[0]/255,S=w[1]/255,T=w[2]/255;return[100*((1-C-(v=Math.min(1-C,1-S,1-T)))/(1-v)||0),100*((1-S-v)/(1-v)||0),100*((1-T-v)/(1-v)||0),100*v]},b.rgb.keyword=function(w){var v=p[w];if(v)return v;var C,S,T,E=1/0;for(var O in h)if(h.hasOwnProperty(O)){var M=h[O],P=(S=w,T=M,Math.pow(S[0]-T[0],2)+Math.pow(S[1]-T[1],2)+Math.pow(S[2]-T[2],2));P<E&&(E=P,C=O)}return C},b.keyword.rgb=function(w){return h[w]},b.rgb.xyz=function(w){var v=w[0]/255,C=w[1]/255,S=w[2]/255;return[100*(.4124*(v=v>.04045?Math.pow((v+.055)/1.055,2.4):v/12.92)+.3576*(C=C>.04045?Math.pow((C+.055)/1.055,2.4):C/12.92)+.1805*(S=S>.04045?Math.pow((S+.055)/1.055,2.4):S/12.92)),100*(.2126*v+.7152*C+.0722*S),100*(.0193*v+.1192*C+.9505*S)]},b.rgb.lab=function(w){var v=b.rgb.xyz(w),C=v[0],S=v[1],T=v[2];return S/=100,T/=108.883,C=(C/=95.047)>.008856?Math.pow(C,.3333333333333333):7.787*C+.13793103448275862,[116*(S=S>.008856?Math.pow(S,.3333333333333333):7.787*S+.13793103448275862)-16,500*(C-S),200*(S-(T=T>.008856?Math.pow(T,.3333333333333333):7.787*T+.13793103448275862))]},b.hsl.rgb=function(w){var v,C,S,T,E,O=w[0]/360,M=w[1]/100,P=w[2]/100;if(M===0)return[E=255*P,E,E];v=2*P-(C=P<.5?P*(1+M):P+M-P*M),T=[0,0,0];for(var I=0;I<3;I++)(S=O+.3333333333333333*-(I-1))<0&&S++,S>1&&S--,E=6*S<1?v+6*(C-v)*S:2*S<1?C:3*S<2?v+(C-v)*(.6666666666666666-S)*6:v,T[I]=255*E;return T},b.hsl.hsv=function(w){var v=w[0],C=w[1]/100,S=w[2]/100,T=C,E=Math.max(S,.01);return C*=(S*=2)<=1?S:2-S,T*=E<=1?E:2-E,[v,100*(S===0?2*T/(E+T):2*C/(S+C)),100*((S+C)/2)]},b.hsv.rgb=function(w){var v=w[0]/60,C=w[1]/100,S=w[2]/100,T=Math.floor(v)%6,E=v-Math.floor(v),O=255*S*(1-C),M=255*S*(1-C*E),P=255*S*(1-C*(1-E));switch(S*=255,T){case 0:return[S,P,O];case 1:return[M,S,O];case 2:return[O,S,P];case 3:return[O,M,S];case 4:return[P,O,S];case 5:return[S,O,M]}},b.hsv.hsl=function(w){var v,C,S,T=w[0],E=w[1]/100,O=w[2]/100,M=Math.max(O,.01);return S=(2-E)*O,C=E*M,[T,100*(C=(C/=(v=(2-E)*M)<=1?v:2-v)||0),100*(S/=2)]},b.hwb.rgb=function(w){var v,C,S,T,E,O,M,P=w[0]/360,I=w[1]/100,z=w[2]/100,U=I+z;switch(U>1&&(I/=U,z/=U),S=6*P-(v=Math.floor(6*P)),1&v&&(S=1-S),T=I+S*((C=1-z)-I),v){default:case 6:case 0:E=C,O=T,M=I;break;case 1:E=T,O=C,M=I;break;case 2:E=I,O=C,M=T;break;case 3:E=I,O=T,M=C;break;case 4:E=T,O=I,M=C;break;case 5:E=C,O=I,M=T}return[255*E,255*O,255*M]},b.cmyk.rgb=function(w){var v=w[0]/100,C=w[1]/100,S=w[2]/100,T=w[3]/100;return[255*(1-Math.min(1,v*(1-T)+T)),255*(1-Math.min(1,C*(1-T)+T)),255*(1-Math.min(1,S*(1-T)+T))]},b.xyz.rgb=function(w){var v,C,S,T=w[0]/100,E=w[1]/100,O=w[2]/100;return C=-.9689*T+1.8758*E+.0415*O,S=.0557*T+-.204*E+1.057*O,v=(v=3.2406*T+-1.5372*E+-.4986*O)>.0031308?1.055*Math.pow(v,.4166666666666667)-.055:12.92*v,C=C>.0031308?1.055*Math.pow(C,.4166666666666667)-.055:12.92*C,S=S>.0031308?1.055*Math.pow(S,.4166666666666667)-.055:12.92*S,[255*(v=Math.min(Math.max(0,v),1)),255*(C=Math.min(Math.max(0,C),1)),255*(S=Math.min(Math.max(0,S),1))]},b.xyz.lab=function(w){var v=w[0],C=w[1],S=w[2];return C/=100,S/=108.883,v=(v/=95.047)>.008856?Math.pow(v,.3333333333333333):7.787*v+.13793103448275862,[116*(C=C>.008856?Math.pow(C,.3333333333333333):7.787*C+.13793103448275862)-16,500*(v-C),200*(C-(S=S>.008856?Math.pow(S,.3333333333333333):7.787*S+.13793103448275862))]},b.lab.xyz=function(w){var v,C,S,T=w[0];v=w[1]/500+(C=(T+16)/116),S=C-w[2]/200;var E=Math.pow(C,3),O=Math.pow(v,3),M=Math.pow(S,3);return C=E>.008856?E:(C-.13793103448275862)/7.787,v=O>.008856?O:(v-.13793103448275862)/7.787,S=M>.008856?M:(S-.13793103448275862)/7.787,[v*=95.047,C*=100,S*=108.883]},b.lab.lch=function(w){var v,C=w[0],S=w[1],T=w[2];return(v=360*Math.atan2(T,S)/2/Math.PI)<0&&(v+=360),[C,Math.sqrt(S*S+T*T),v]},b.lch.lab=function(w){var v,C=w[0],S=w[1];return v=w[2]/360*2*Math.PI,[C,S*Math.cos(v),S*Math.sin(v)]},b.rgb.ansi16=function(w){var v=w[0],C=w[1],S=w[2],T=1 in arguments?arguments[1]:b.rgb.hsv(w)[2];if((T=Math.round(T/50))===0)return 30;var E=30+(Math.round(S/255)<<2|Math.round(C/255)<<1|Math.round(v/255));return T===2&&(E+=60),E},b.hsv.ansi16=function(w){return b.rgb.ansi16(b.hsv.rgb(w),w[2])},b.rgb.ansi256=function(w){var v=w[0],C=w[1],S=w[2];return v===C&&C===S?v<8?16:v>248?231:Math.round((v-8)/247*24)+232:16+36*Math.round(v/255*5)+6*Math.round(C/255*5)+Math.round(S/255*5)},b.ansi16.rgb=function(w){var v=w%10;if(v===0||v===7)return w>50&&(v+=3.5),[v=v/10.5*255,v,v];var C=.5*(1+~~(w>50));return[(1&v)*C*255,(v>>1&1)*C*255,(v>>2&1)*C*255]},b.ansi256.rgb=function(w){if(w>=232){var v=10*(w-232)+8;return[v,v,v]}var C;return w-=16,[Math.floor(w/36)/5*255,Math.floor((C=w%36)/6)/5*255,C%6/5*255]},b.rgb.hex=function(w){var v=(((255&Math.round(w[0]))<<16)+((255&Math.round(w[1]))<<8)+(255&Math.round(w[2]))).toString(16).toUpperCase();return"000000".substring(v.length)+v},b.hex.rgb=function(w){var v=w.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!v)return[0,0,0];var C=v[0];v[0].length===3&&(C=C.split("").map((function(T){return T+T})).join(""));var S=parseInt(C,16);return[S>>16&255,S>>8&255,255&S]},b.rgb.hcg=function(w){var v,C=w[0]/255,S=w[1]/255,T=w[2]/255,E=Math.max(Math.max(C,S),T),O=Math.min(Math.min(C,S),T),M=E-O;return v=M<=0?0:E===C?(S-T)/M%6:E===S?2+(T-C)/M:4+(C-S)/M+4,v/=6,[360*(v%=1),100*M,100*(M<1?O/(1-M):0)]},b.hsl.hcg=function(w){var v=w[1]/100,C=w[2]/100,S=1,T=0;return(S=C<.5?2*v*C:2*v*(1-C))<1&&(T=(C-.5*S)/(1-S)),[w[0],100*S,100*T]},b.hsv.hcg=function(w){var v=w[1]/100,C=w[2]/100,S=v*C,T=0;return S<1&&(T=(C-S)/(1-S)),[w[0],100*S,100*T]},b.hcg.rgb=function(w){var v=w[0]/360,C=w[1]/100,S=w[2]/100;if(C===0)return[255*S,255*S,255*S];var T,E=[0,0,0],O=v%1*6,M=O%1,P=1-M;switch(Math.floor(O)){case 0:E[0]=1,E[1]=M,E[2]=0;break;case 1:E[0]=P,E[1]=1,E[2]=0;break;case 2:E[0]=0,E[1]=1,E[2]=M;break;case 3:E[0]=0,E[1]=P,E[2]=1;break;case 4:E[0]=M,E[1]=0,E[2]=1;break;default:E[0]=1,E[1]=0,E[2]=P}return T=(1-C)*S,[255*(C*E[0]+T),255*(C*E[1]+T),255*(C*E[2]+T)]},b.hcg.hsv=function(w){var v=w[1]/100,C=v+w[2]/100*(1-v),S=0;return C>0&&(S=v/C),[w[0],100*S,100*C]},b.hcg.hsl=function(w){var v=w[1]/100,C=w[2]/100*(1-v)+.5*v,S=0;return C>0&&C<.5?S=v/(2*C):C>=.5&&C<1&&(S=v/(2*(1-C))),[w[0],100*S,100*C]},b.hcg.hwb=function(w){var v=w[1]/100,C=v+w[2]/100*(1-v);return[w[0],100*(C-v),100*(1-C)]},b.hwb.hcg=function(w){var v=w[1]/100,C=1-w[2]/100,S=C-v,T=0;return S<1&&(T=(C-S)/(1-S)),[w[0],100*S,100*T]},b.apple.rgb=function(w){return[w[0]/65535*255,w[1]/65535*255,w[2]/65535*255]},b.rgb.apple=function(w){return[w[0]/255*65535,w[1]/255*65535,w[2]/255*65535]},b.gray.rgb=function(w){return[w[0]/100*255,w[0]/100*255,w[0]/100*255]},b.gray.hsl=b.gray.hsv=function(w){return[0,0,w[0]]},b.gray.hwb=function(w){return[0,100,w[0]]},b.gray.cmyk=function(w){return[0,0,0,w[0]]},b.gray.lab=function(w){return[w[0],0,0]},b.gray.hex=function(w){var v=255&Math.round(w[0]/100*255),C=((v<<16)+(v<<8)+v).toString(16).toUpperCase();return"000000".substring(C.length)+C},b.rgb.gray=function(w){return[(w[0]+w[1]+w[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 x=y[_];g[b][_]=(function(w){var v=function(C){if(C==null)return C;arguments.length>1&&(C=Array.prototype.slice.call(arguments));var S=w(C);if(typeof S=="object")for(var T=S.length,E=0;E<T;E++)S[E]=Math.round(S[E]);return S};return"conversion"in w&&(v.conversion=w.conversion),v})(x),g[b][_].raw=(function(w){var v=function(C){return C==null?C:(arguments.length>1&&(C=Array.prototype.slice.call(arguments)),w(C))};return"conversion"in w&&(v.conversion=w.conversion),v})(x)}))})),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,I=0;I<P;I++)O[M[I]]={distance:-1,parent:null};return O})(),x=[y];for(_[y].distance=0;x.length;)for(var w=x.pop(),v=Object.keys(h[w]),C=v.length,S=0;S<C;S++){var T=v[S],E=_[T];E.distance===-1&&(E.distance=_[w].distance+1,E.parent=w,x.unshift(T))}return _}function g(y,_){return function(x){return _(y(x))}}function b(y,_){for(var x=[_[y].parent,y],w=h[_[y].parent][y],v=_[y].parent;_[v].parent;)x.unshift(_[v].parent),w=g(h[_[v].parent][v],w),v=_[v].parent;return w.conversion=x,w}c.exports=function(y){for(var _=p(y),x={},w=Object.keys(_),v=w.length,C=0;C<v;C++){var S=w[C];_[S].parent!==null&&(x[S]=b(S,_))}return x}},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(301),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 x(v,C,S){return Math.min(Math.max(C,v),S)}function w(v){var C=Math.round(v).toString(16).toUpperCase();return C.length<2?"0"+C:C}_.get=function(v){var C,S;switch(v.substring(0,3).toLowerCase()){case"hsl":C=_.get.hsl(v),S="hsl";break;case"hwb":C=_.get.hwb(v),S="hwb";break;default:C=_.get.rgb(v),S="rgb"}return C?{model:S,value:C}:null},_.get.rgb=function(v){if(!v)return null;var C,S,T,E=[0,0,0,1];if(C=v.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(T=C[2],C=C[1],S=0;S<3;S++){var O=2*S;E[S]=parseInt(C.slice(O,O+2),16)}T&&(E[3]=parseInt(T,16)/255)}else if(C=v.match(/^#([a-f0-9]{3,4})$/i)){for(T=(C=C[1])[3],S=0;S<3;S++)E[S]=parseInt(C[S]+C[S],16);T&&(E[3]=parseInt(T+T,16)/255)}else if(C=v.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(S=0;S<3;S++)E[S]=parseInt(C[S+1],0);C[4]&&(C[5]?E[3]=.01*parseFloat(C[4]):E[3]=parseFloat(C[4]))}else{if(!(C=v.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(C=v.match(/^(\w+)$/))?C[1]==="transparent"?[0,0,0,0]:g.call(h,C[1])?((E=h[C[1]])[3]=1,E):null:null;for(S=0;S<3;S++)E[S]=Math.round(2.55*parseFloat(C[S+1]));C[4]&&(C[5]?E[3]=.01*parseFloat(C[4]):E[3]=parseFloat(C[4]))}for(S=0;S<3;S++)E[S]=x(E[S],0,255);return E[3]=x(E[3],0,1),E},_.get.hsl=function(v){if(!v)return null;var C=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(C){var S=parseFloat(C[4]);return[(parseFloat(C[1])%360+360)%360,x(parseFloat(C[2]),0,100),x(parseFloat(C[3]),0,100),x(isNaN(S)?1:S,0,1)]}return null},_.get.hwb=function(v){if(!v)return null;var C=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(C){var S=parseFloat(C[4]);return[(parseFloat(C[1])%360+360)%360,x(parseFloat(C[2]),0,100),x(parseFloat(C[3]),0,100),x(isNaN(S)?1:S,0,1)]}return null},_.to.hex=function(){var v=p(arguments);return"#"+w(v[0])+w(v[1])+w(v[2])+(v[3]<1?w(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),C=Math.round(v[0]/255*100),S=Math.round(v[1]/255*100),T=Math.round(v[2]/255*100);return v.length<4||v[3]===1?"rgb("+C+"%, "+S+"%, "+T+"%)":"rgba("+C+"%, "+S+"%, "+T+"%, "+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),C="";return v.length>=4&&v[3]!==1&&(C=", "+v[3]),"hwb("+v[0]+", "+v[1]+"%, "+v[2]+"%"+C+")"},_.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 x(S,T){if(!(this instanceof x))return new x(S,T);if(T&&T in b&&(T=null),T&&!(T in p))throw new Error("Unknown model: "+T);var E,O;if(S==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(S instanceof x)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=T||"rgb",O=p[this.model].channels;var P=g.call(S,0,O);this.color=C(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 I=Object.keys(S);"alpha"in S&&(I.splice(I.indexOf("alpha"),1),this.valpha=typeof S.alpha=="number"?S.alpha:0);var z=I.sort().join("");if(!(z in y))throw new Error("Unable to parse color from object: "+JSON.stringify(S));this.model=y[z];var U=p[this.model].labels,G=[];for(E=0;E<U.length;E++)G.push(S[U[E]]);this.color=C(G)}if(_[this.model])for(O=p[this.model].channels,E=0;E<O;E++){var J=_[this.model][E];J&&(this.color[E]=J(this.color[E]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}function w(S,T,E){return(S=Array.isArray(S)?S:[S]).forEach((function(O){(_[O]||(_[O]=[]))[T]=E})),S=S[0],function(O){var M;return arguments.length?(E&&(O=E(O)),(M=this[S]()).color[T]=O,M):(M=this[S]().color[T],E&&(M=E(M)),M)}}function v(S){return function(T){return Math.max(0,Math.min(S,T))}}function C(S,T){for(var E=0;E<T;E++)typeof S[E]!="number"&&(S[E]=0);return S}x.prototype={toString:function(){return this.string()},toJSON:function(){return this[this.model]()},string:function(S){var T=this.model in h.to?this:this.rgb(),E=(T=T.round(typeof S=="number"?S:1)).valpha===1?T.color:T.color.concat(this.valpha);return h.to[T.model](E)},percentString:function(S){var T=this.rgb().round(typeof S=="number"?S:1),E=T.valpha===1?T.color:T.color.concat(this.valpha);return h.to.rgb.percent(E)},array:function(){return this.valpha===1?this.color.slice():this.color.concat(this.valpha)},object:function(){for(var S={},T=p[this.model].channels,E=p[this.model].labels,O=0;O<T;O++)S[E[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 x(this.color.map((function(T){return function(E){return(function(O,M){return Number(O.toFixed(M))})(E,T)}})(S)).concat(this.valpha),this.model)},alpha:function(S){return arguments.length?new x(this.color.concat(Math.max(0,Math.min(1,S))),this.model):this.valpha},red:w("rgb",0,v(255)),green:w("rgb",1,v(255)),blue:w("rgb",2,v(255)),hue:w(["hsl","hsv","hsl","hwb","hcg"],0,(function(S){return(S%360+360)%360})),saturationl:w("hsl",1,v(100)),lightness:w("hsl",2,v(100)),saturationv:w("hsv",1,v(100)),value:w("hsv",2,v(100)),chroma:w("hcg",1,v(100)),gray:w("hcg",2,v(100)),white:w("hwb",1,v(100)),wblack:w("hwb",2,v(100)),cyan:w("cmyk",0,v(100)),magenta:w("cmyk",1,v(100)),yellow:w("cmyk",2,v(100)),black:w("cmyk",3,v(100)),x:w("xyz",0,v(100)),y:w("xyz",1,v(100)),z:w("xyz",2,v(100)),l:w("lab",0,v(100)),a:w("lab",1),b:w("lab",2),keyword:function(S){return arguments.length?new x(S):p[this.model].keyword(this.color)},hex:function(S){return arguments.length?new x(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,T=[],E=0;E<S.length;E++){var O=S[E]/255;T[E]=O<=.03928?O/12.92:Math.pow((O+.055)/1.055,2.4)}return .2126*T[0]+.7152*T[1]+.0722*T[2]},contrast:function(S){var T=this.luminosity(),E=S.luminosity();return T>E?(T+.05)/(E+.05):(E+.05)/(T+.05)},level:function(S){var T=this.contrast(S);return T>=7.1?"AAA":T>=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(),T=0;T<3;T++)S.color[T]=255-S.color[T];return S},lighten:function(S){var T=this.hsl();return T.color[2]+=T.color[2]*S,T},darken:function(S){var T=this.hsl();return T.color[2]-=T.color[2]*S,T},saturate:function(S){var T=this.hsl();return T.color[1]+=T.color[1]*S,T},desaturate:function(S){var T=this.hsl();return T.color[1]-=T.color[1]*S,T},whiten:function(S){var T=this.hwb();return T.color[1]+=T.color[1]*S,T},blacken:function(S){var T=this.hwb();return T.color[2]+=T.color[2]*S,T},grayscale:function(){var S=this.rgb().color,T=.3*S[0]+.59*S[1]+.11*S[2];return x.rgb(T,T,T)},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 T=this.hsl(),E=T.color[0];return E=(E=(E+S)%360)<0?360+E:E,T.color[0]=E,T},mix:function(S,T){if(!S||!S.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof S);var E=S.rgb(),O=this.rgb(),M=T===void 0?.5:T,P=2*M-1,I=E.alpha()-O.alpha(),z=((P*I==-1?P:(P+I)/(1+P*I))+1)/2,U=1-z;return x.rgb(z*E.red()+U*O.red(),z*E.green()+U*O.green(),z*E.blue()+U*O.blue(),E.alpha()*M+O.alpha()*(1-M))}},Object.keys(p).forEach((function(S){if(b.indexOf(S)===-1){var T=p[S].channels;x.prototype[S]=function(){if(this.model===S)return new x(this);if(arguments.length)return new x(arguments,S);var E,O=typeof arguments[T]=="number"?T:this.valpha;return new x((E=p[this.model][S].raw(this.color),Array.isArray(E)?E:[E]).concat(O),S)},x[S]=function(E){return typeof E=="number"&&(E=C(g.call(arguments),T)),new x(E,S)}}})),c.exports=x},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,I){function z(G){O.removeListener(M,U),I(G)}function U(){typeof O.removeListener=="function"&&O.removeListener("error",z),P([].slice.call(arguments))}E(O,M,U,{once:!0}),M!=="error"&&(function(G,J,ee){typeof G.on=="function"&&E(G,"error",J,ee)})(O,z,{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 x(O,M,P,I){var z,U,G,J;if(y(P),(U=O._events)===void 0?(U=O._events=Object.create(null),O._eventsCount=0):(U.newListener!==void 0&&(O.emit("newListener",M,P.listener?P.listener:P),U=O._events),G=U[M]),G===void 0)G=U[M]=P,++O._eventsCount;else if(typeof G=="function"?G=U[M]=I?[P,G]:[G,P]:I?G.unshift(P):G.push(P),(z=_(O))>0&&G.length>z&&!G.warned){G.warned=!0;var ee=new Error("Possible EventEmitter memory leak detected. "+G.length+" "+String(M)+" listeners added. Use emitter.setMaxListeners() to increase limit");ee.name="MaxListenersExceededWarning",ee.emitter=O,ee.type=M,ee.count=G.length,J=ee,console&&console.warn&&console.warn(J)}return O}function w(){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 I={fired:!1,wrapFn:void 0,target:O,type:M,listener:P},z=w.bind(I);return z.listener=P,I.wrapFn=z,z}function C(O,M,P){var I=O._events;if(I===void 0)return[];var z=I[M];return z===void 0?[]:typeof z=="function"?P?[z.listener||z]:[z]:P?(function(U){for(var G=new Array(U.length),J=0;J<G.length;++J)G[J]=U[J].listener||U[J];return G})(z):T(z,z.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 T(O,M){for(var P=new Array(M),I=0;I<M;++I)P[I]=O[I];return P}function E(O,M,P,I){if(typeof O.on=="function")I.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 z(U){I.once&&O.removeEventListener(M,z),P(U)}))}}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 I=O==="error",z=this._events;if(z!==void 0)I=I&&z.error===void 0;else if(!I)return!1;if(I){var U;if(M.length>0&&(U=M[0]),U instanceof Error)throw U;var G=new Error("Unhandled error."+(U?" ("+U.message+")":""));throw G.context=U,G}var J=z[O];if(J===void 0)return!1;if(typeof J=="function")h(J,this,M);else{var ee=J.length,Z=T(J,ee);for(P=0;P<ee;++P)h(Z[P],this,M)}return!0},g.prototype.addListener=function(O,M){return x(this,O,M,!1)},g.prototype.on=g.prototype.addListener,g.prototype.prependListener=function(O,M){return x(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,I,z,U,G;if(y(M),(I=this._events)===void 0)return this;if((P=I[O])===void 0)return this;if(P===M||P.listener===M)--this._eventsCount==0?this._events=Object.create(null):(delete I[O],I.removeListener&&this.emit("removeListener",O,P.listener||M));else if(typeof P!="function"){for(z=-1,U=P.length-1;U>=0;U--)if(P[U]===M||P[U].listener===M){G=P[U].listener,z=U;break}if(z<0)return this;z===0?P.shift():(function(J,ee){for(;ee+1<J.length;ee++)J[ee]=J[ee+1];J.pop()})(P,z),P.length===1&&(I[O]=P[0]),I.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,I;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 z,U=Object.keys(P);for(I=0;I<U.length;++I)(z=U[I])!=="removeListener"&&this.removeAllListeners(z);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(I=M.length-1;I>=0;I--)this.removeListener(O,M[I]);return this},g.prototype.listeners=function(O){return C(this,O,!0)},g.prototype.rawListeners=function(O){return C(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):[]}},8336: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,x=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,w=/\{\n\/\* \[wrapped with (.+)\] \*/,v=/,? & /,C=/^[-+]0x[0-9a-f]+$/i,S=/^0b[01]+$/i,T=/^\[object .+?Constructor\]$/,E=/^0o[0-7]+$/i,O=/^(?:0|[1-9]\d*)$/,M=parseInt,P=typeof dm=="object"&&dm&&dm.Object===Object&&dm,I=typeof self=="object"&&self&&self.Object===Object&&self,z=P||I||Function("return this")();function U(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,He,it){if(He!=He)return(function(pt,on,Ut,Et){for(var Zt=pt.length,Pt=Ut+-1;++Pt<Zt;)if(on(pt[Pt],Pt,pt))return Pt;return-1})(Ne,J,it);for(var yt=it-1,bt=Ne.length;++yt<bt;)if(Ne[yt]===He)return yt;return-1})(Ce,pe,0)>-1}function J(Ce){return Ce!=Ce}function ee(Ce,pe){for(var Ne=-1,He=Ce.length,it=0,yt=[];++Ne<He;){var bt=Ce[Ne];bt!==pe&&bt!==u||(Ce[Ne]=u,yt[it++]=Ne)}return yt}var Z,H,Y,oe=Function.prototype,ne=Object.prototype,$=z["__core-js_shared__"],q=(Z=/[^.]+$/.exec($&&$.keys&&$.keys.IE_PROTO||""))?"Symbol(src)_1."+Z:"",V=oe.toString,D=ne.hasOwnProperty,B=ne.toString,te=RegExp("^"+V.call(D).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),re=Object.create,ae=Math.max,ge=Math.min,ke=(H=$e(Object,"defineProperty"),(Y=$e.name)&&Y.length>2?H:void 0);function Q(Ce){if(!Le(Ce)||(function(Ne){return!!q&&q in Ne})(Ce))return!1;var pe=(function(Ne){var He=Le(Ne)?B.call(Ne):"";return He==b||He==y})(Ce)||(function(Ne){var He=!1;if(Ne!=null&&typeof Ne.toString!="function")try{He=!!(Ne+"")}catch{}return He})(Ce)?te:T;return pe.test((function(Ne){if(Ne!=null){try{return V.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,He=Le(Ne=Ce.prototype)?re(Ne):{},it=Ce.apply(He,pe);return Le(it)?it:He}}function de(Ce,pe,Ne,He,it,yt,bt,pt,on,Ut){var Et=128&pe,Zt=1&pe,Pt=2&pe,Vt=24&pe,ln=512&pe,bn=Pt?void 0:ie(Ce);return function Ht(){for(var vt=arguments.length,Nt=Array(vt),jn=vt;jn--;)Nt[jn]=arguments[jn];if(Vt)var ft=xe(Ht),Wt=(function(sn,ur){for(var qn=sn.length,Yt=0;qn--;)sn[qn]===ur&&Yt++;return Yt})(Nt,ft);if(He&&(Nt=(function(sn,ur,qn,Yt){for(var sr=-1,Jr=sn.length,Sr=qn.length,Xt=-1,Cn=ur.length,Pr=ae(Jr-Sr,0),So=Array(Cn+Pr),ki=!Yt;++Xt<Cn;)So[Xt]=ur[Xt];for(;++sr<Sr;)(ki||sr<Jr)&&(So[qn[sr]]=sn[sr]);for(;Pr--;)So[Xt++]=sn[sr++];return So})(Nt,He,it,Vt)),yt&&(Nt=(function(sn,ur,qn,Yt){for(var sr=-1,Jr=sn.length,Sr=-1,Xt=qn.length,Cn=-1,Pr=ur.length,So=ae(Jr-Xt,0),ki=Array(So+Pr),wf=!Yt;++sr<So;)ki[sr]=sn[sr];for(var ol=sr;++Cn<Pr;)ki[ol+Cn]=ur[Cn];for(;++Sr<Xt;)(wf||sr<Jr)&&(ki[ol+qn[Sr]]=sn[sr++]);return ki})(Nt,yt,bt,Vt)),vt-=Wt,Vt&&vt<Ut){var En=ee(Nt,ft);return _e(Ce,pe,de,Ht.placeholder,Ne,Nt,En,pt,on,Ut-vt)}var pn=Zt?Ne:this,Vn=Pt?pn[Ce]:Ce;return vt=Nt.length,pt?Nt=(function(sn,ur){for(var qn=sn.length,Yt=ge(ur.length,qn),sr=(function(Sr,Xt){var Cn=-1,Pr=Sr.length;for(Xt||(Xt=Array(Pr));++Cn<Pr;)Xt[Cn]=Sr[Cn];return Xt})(sn);Yt--;){var Jr=ur[Yt];sn[Yt]=Fe(Jr,qn)?sr[Jr]:void 0}return sn})(Nt,pt):ln&&vt>1&&Nt.reverse(),Et&&on<vt&&(Nt.length=on),this&&this!==z&&this instanceof Ht&&(Vn=bn||ie(Vn)),Vn.apply(pn,Nt)}}function _e(Ce,pe,Ne,He,it,yt,bt,pt,on,Ut){var Et=8&pe;pe|=Et?d:64,4&(pe&=~(Et?64:d))||(pe&=-4);var Zt=Ne(Ce,pe,it,Et?yt:void 0,Et?bt:void 0,Et?void 0:yt,Et?void 0:bt,pt,on,Ut);return Zt.placeholder=He,Re(Zt,Ce,pe)}function Te(Ce,pe,Ne,He,it,yt,bt,pt){var on=2&pe;if(!on&&typeof Ce!="function")throw new TypeError("Expected a function");var Ut=He?He.length:0;if(Ut||(pe&=-97,He=it=void 0),bt=bt===void 0?bt:ae(dt(bt),0),pt=pt===void 0?pt:dt(pt),Ut-=it?it.length:0,64&pe){var Et=He,Zt=it;He=it=void 0}var Pt=[Ce,pe,Ne,He,it,Et,Zt,yt,bt,pt];if(Ce=Pt[0],pe=Pt[1],Ne=Pt[2],He=Pt[3],it=Pt[4],!(pt=Pt[9]=Pt[9]==null?on?0:Ce.length:ae(Pt[9]-Ut,0))&&24&pe&&(pe&=-25),pe&&pe!=1)Vt=pe==8||pe==16?(function(ln,bn,Ht){var vt=ie(ln);return function Nt(){for(var jn=arguments.length,ft=Array(jn),Wt=jn,En=xe(Nt);Wt--;)ft[Wt]=arguments[Wt];var pn=jn<3&&ft[0]!==En&&ft[jn-1]!==En?[]:ee(ft,En);return(jn-=pn.length)<Ht?_e(ln,bn,de,Nt.placeholder,void 0,ft,pn,void 0,void 0,Ht-jn):U(this&&this!==z&&this instanceof Nt?vt:ln,this,ft)}})(Ce,pe,pt):pe!=d&&pe!=33||it.length?de.apply(void 0,Pt):(function(ln,bn,Ht,vt){var Nt=1&bn,jn=ie(ln);return function ft(){for(var Wt=-1,En=arguments.length,pn=-1,Vn=vt.length,sn=Array(Vn+En),ur=this&&this!==z&&this instanceof ft?jn:ln;++pn<Vn;)sn[pn]=vt[pn];for(;En--;)sn[pn++]=arguments[++Wt];return U(ur,Nt?Ht:this,sn)}})(Ce,pe,Ne,He);else var Vt=(function(ln,bn,Ht){var vt=1&bn,Nt=ie(ln);return function jn(){return(this&&this!==z&&this instanceof jn?Nt:ln).apply(vt?Ht:this,arguments)}})(Ce,pe,Ne);return Re(Vt,Ce,pe)}function xe(Ce){return Ce.placeholder}function $e(Ce,pe){var Ne=(function(He,it){return He?.[it]})(Ce,pe);return Q(Ne)?Ne:void 0}function Ze(Ce){var pe=Ce.match(w);return pe?pe[1].split(v):[]}function ye(Ce,pe){var Ne=pe.length,He=Ne-1;return pe[He]=(Ne>1?"& ":"")+pe[He],pe=pe.join(Ne>2?", ":" "),Ce.replace(x,`{
|
|
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=ke?function(Ce,pe,Ne){var He,it=pe+"";return ke(Ce,"toString",{configurable:!0,enumerable:!1,value:(He=ye(it,We(Ze(it),Ne)),function(){return He})})}:function(Ce){return Ce};function We(Ce,pe){return(function(Ne,He){for(var it=-1,yt=Ne?Ne.length:0;++it<yt&&He(Ne[it],it,Ne)!==!1;);})(g,(function(Ne){var He="_."+Ne[0];pe&Ne[1]&&!G(Ce,He)&&Ce.push(He)})),Ce.sort()}function ze(Ce,pe,Ne){var He=Te(Ce,8,void 0,void 0,void 0,void 0,void 0,pe=Ne?void 0:pe);return He.placeholder=ze.placeholder,He}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(yt){return!!yt&&typeof yt=="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 He=S.test(pe);return He||E.test(pe)?M(pe.slice(2),He?2:8):C.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},301:(c,u,d)=>{var h=d(8336),p=Array.prototype.concat,g=Array.prototype.slice,b=c.exports=function(y){for(var _=[],x=0,w=y.length;x<w;x++){var v=y[x];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 ce=F[Symbol.toPrimitive];if(ce!==void 0){var we=ce.call(F,K);if(c(we)!="object")return we;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(ce){return Object.getOwnPropertyDescriptor(X,ce).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 x(){try{var X=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(x=function(){return!!X})()}function w(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),w(X,x()?Reflect.construct(L,F||[],_(X).constructor):L.apply(X,F))}function C(X,L){return C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(F,K){return F.__proto__=K,F},C(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&&C(X,L)}s.r(l),s.d(l,{default:()=>Zs});var T=s(4119),E=s.n(T);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 I(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,ce=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"?ce="componentWillUpdate":typeof L.UNSAFE_componentWillUpdate=="function"&&(ce="UNSAFE_componentWillUpdate"),F!==null||K!==null||ce!==null){var we=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
|
+
`+we+" uses "+me+" but also contains the following legacy lifecycles:"+(F!==null?`
|
|
132
|
+
`+F:"")+(K!==null?`
|
|
133
|
+
`+K:"")+(ce!==null?`
|
|
134
|
+
`+ce:"")+`
|
|
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 le=L.componentDidUpdate;L.componentDidUpdate=function(Me,De,Ve){var qe=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:Ve;le.call(this,Me,De,qe)}}return X}function z(X,L){if(X==null)return{};var F={};for(var K in X)if({}.hasOwnProperty.call(X,K)){if(L.includes(K))continue;F[K]=X[K]}return F}function U(X,L){if(X==null)return{};var F,K,ce=z(X,L);if(Object.getOwnPropertySymbols){var we=Object.getOwnPropertySymbols(X);for(K=0;K<we.length;K++)F=we[K],L.includes(F)||{}.propertyIsEnumerable.call(X,F)&&(ce[F]=X[F])}return ce}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 J(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 ee={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 ce=F==null?null:typeof Symbol<"u"&&F[Symbol.iterator]||F["@@iterator"];if(ce!=null){var we,me,le,Me,De=[],Ve=!0,qe=!1;try{if(le=(ce=ce.call(F)).next,K===0){if(Object(ce)!==ce)return;Ve=!1}else for(;!(Ve=(we=le.call(ce)).done)&&(De.push(we.value),De.length!==K);Ve=!0);}catch(nt){qe=!0,me=nt}finally{try{if(!Ve&&ce.return!=null&&(Me=ce.return(),Object(Me)!==Me))return}finally{if(qe)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),q=s(3639),V=s.n(q),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(ce){return Object.getOwnPropertyDescriptor(X,ce).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 ae=$.default,ge=Object.keys(ae),ke=function(X){var L,F=(function(Me){var De=Me[0]/255,Ve=Me[1]/255,qe=Me[2]/255;return[.299*De+.587*Ve+.114*qe,-.14713*De+-.28886*Ve+.436*qe,.615*De+-.51499*Ve+-.10001*qe]})(V()(X).array()),K=ne(F,3),ce=K[0],we=K[1],me=K[2],le=(function(Me){var De,Ve,qe,nt=Me[0],Be=Me[1],Ct=Me[2];return De=1*nt+0*Be+1.13983*Ct,Ve=1*nt+-.39465*Be+-.5806*Ct,qe=1*nt+2.02311*Be+0*Ct,[255*(De=Math.min(Math.max(0,De),1)),255*(Ve=Math.min(Math.max(0,Ve),1)),255*(qe=Math.min(Math.max(0,qe),1))]})([(L=ce,L<.25?1:L<.5?.9-L:1.1-L),we,me]);return V().rgb(le).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(ce,we){return ce[we]=(function(me,le){if(me===void 0)return le;if(le===void 0)return me;var Me=c(me),De=c(le);switch(Me){case"string":switch(De){case"string":return[le,me].filter(Boolean).join(" ");case"object":return Q({className:me,style:le});case"function":return function(Ve){for(var qe=arguments.length,nt=new Array(qe>1?qe-1:0),Be=1;Be<qe;Be++)nt[Be-1]=arguments[Be];return Q({className:me})(le.apply(void 0,[Ve].concat(nt)))}}break;case"object":switch(De){case"string":return Q({className:le,style:me});case"object":return re(re({},le),me);case"function":return function(Ve){for(var qe=arguments.length,nt=new Array(qe>1?qe-1:0),Be=1;Be<qe;Be++)nt[Be-1]=arguments[Be];return Q({style:me})(le.apply(void 0,[Ve].concat(nt)))}}break;case"function":switch(De){case"string":return function(Ve){for(var qe=arguments.length,nt=new Array(qe>1?qe-1:0),Be=1;Be<qe;Be++)nt[Be-1]=arguments[Be];return me.apply(void 0,[Q(Ve)({className:le})].concat(nt))};case"object":return function(Ve){for(var qe=arguments.length,nt=new Array(qe>1?qe-1:0),Be=1;Be<qe;Be++)nt[Be-1]=arguments[Be];return me.apply(void 0,[Q(Ve)({style:le})].concat(nt))};case"function":return function(Ve){for(var qe=arguments.length,nt=new Array(qe>1?qe-1:0),Be=1;Be<qe;Be++)nt[Be-1]=arguments[Be];return me.apply(void 0,[le.apply(void 0,[Ve].concat(nt))].concat(nt))}}}})(X[we],L[we]),ce}),{})},de=function(X,L){for(var F=arguments.length,K=new Array(F>2?F-2:0),ce=2;ce<F;ce++)K[ce-2]=arguments[ce];if(L===null)return X;Array.isArray(L)||(L=[L]);var we=L.map((function(me){return X[me]})).filter(Boolean).reduce((function(me,le){return typeof le=="string"?me.className=[me.className,le].filter(Boolean).join(" "):c(le)==="object"?me.style=re(re({},me.style),le):typeof le=="function"&&(me=re(re({},me),le.apply(void 0,[me].concat(K)))),me}),{className:"",style:{}});return we.className||delete we.className,Object.keys(we.style).length===0&&delete we.style,we},_e=function(X){return Object.keys(X).reduce((function(L,F){return L[F]=/^base/.test(F)?ke(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,ce=K===void 0?ae:K,we=L.base16Themes,me=$e(F,we===void 0?null:we);me&&(F=re(re({},me),F));for(var le=ge.reduce((function(Ct,Ot){return Ct[Ot]=F[Ot]||ce[Ot],Ct}),{}),Me=Object.keys(F).reduce((function(Ct,Ot){return ge.indexOf(Ot)===-1&&(Ct[Ot]=F[Ot]),Ct}),{}),De=X(le),Ve=ie(Me,De),qe=arguments.length,nt=new Array(qe>3?qe-3:0),Be=3;Be<qe;Be++)nt[Be-3]=arguments[Be];return B()(de,2).apply(void 0,[Ve].concat(nt))}),3),xe=function(X){return!!X.extend},$e=function(X,L){if(X&&xe(X)&&X.extend&&(X=X.extend),typeof X=="string"){var F=ne(X.split(":"),2),K=F[0],ce=F[1];X=L?L[K]:$[K],ce==="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 ce=ee;return K!==!1&&K!=="none"||(ce=Z),Te(Ze,{defaultBase16:ce})(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),ce=F.displayDataTypes,we=F.theme;return ce?E().createElement("span",Object.assign({className:"data-type-label"},ye(we,"data-type-label")),K):null}}])})(E().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 E().createElement("div",ye(F.theme,"boolean"),E().createElement(Fe,Object.assign({type_name:"bool"},F)),F.value?"true":"false")}}])})(E().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 E().createElement("div",ye(F.theme,"date"),E().createElement(Fe,Object.assign({type_name:"date"},F)),E().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"})))}}])})(E().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 E().createElement("div",ye(F.theme,"float"),E().createElement(Fe,Object.assign({type_name:"float"},F)),this.props.value)}}])})(E().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,ce=new Array(K),we=0;we<K;we++)ce[we]=arguments[we];return(F=v(this,L,[].concat(ce))).objects={},F.set=function(me,le,Me,De){F.objects[me]===void 0&&(F.objects[me]={}),F.objects[me][le]===void 0&&(F.objects[me][le]={}),F.objects[me][le][Me]=De},F.get=function(me,le,Me,De){return F.objects[me]===void 0||F.objects[me][le]===void 0||F.objects[me][le][Me]==null?De:F.objects[me][le][Me]},F.handleAction=function(me){var le=me.rjvId,Me=me.data;switch(me.name){case"RESET":F.emit("reset-"+le);break;case"VARIABLE_UPDATED":me.data.updated_src=F.updateSrc(le,Me),F.set(le,"action","variable-update",p(p({},Me),{},{type:"variable-edited"})),F.emit("variable-update-"+le);break;case"VARIABLE_REMOVED":me.data.updated_src=F.updateSrc(le,Me),F.set(le,"action","variable-update",p(p({},Me),{},{type:"variable-removed"})),F.emit("variable-update-"+le);break;case"VARIABLE_ADDED":me.data.updated_src=F.updateSrc(le,Me),F.set(le,"action","variable-update",p(p({},Me),{},{type:"variable-added"})),F.emit("variable-update-"+le);break;case"ADD_VARIABLE_KEY_REQUEST":F.set(le,"action","new-key-request",Me),F.emit("add-key-request-"+le)}},F.updateSrc=function(me,le){var Me=le.name,De=le.namespace,Ve=le.new_value,qe=(le.existing_value,le.variable_removed);De.shift();var nt,Be=F.get(me,"global","src"),Ct=F.deepCopy(Be,Le(De)),Ot=Ct,st=(function(Qt,wr){var cn=typeof Symbol<"u"&&Qt[Symbol.iterator]||Qt["@@iterator"];if(!cn){if(Array.isArray(Qt)||(cn=oe(Qt))||wr){cn&&(Qt=cn);var uo=0,xr=function(){};return{s:xr,n:function(){return uo>=Qt.length?{done:!0}:{done:!1,value:Qt[uo++]}},e:function(wo){throw wo},f:xr}}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 Ws,hi=!0,pi=!1;return{s:function(){cn=cn.call(Qt)},n:function(){var wo=cn.next();return hi=wo.done,wo},e:function(wo){pi=!0,Ws=wo},f:function(){try{hi||cn.return==null||cn.return()}finally{if(pi)throw Ws}}}})(De);try{for(st.s();!(nt=st.n()).done;)Ot=Ot[nt.value]}catch(Qt){st.e(Qt)}finally{st.f()}return qe?G(Ot)=="array"?Ot.splice(Me,1):delete Ot[Me]:Me!==null?Ot[Me]=Ve:Ct=Ve,F.set(me,"global","src",Ct),Ct},F.deepCopy=function(me,le){var Me,De=G(me),Ve=le.shift();return De=="array"?Me=Le(me):De=="object"&&(Me=p({},me)),Ve!==void 0&&(Me[Ve]=F.deepCopy(me[Ve],le)),Me},F}return S(L,X),y(L)})(Ue.EventEmitter));Ce.register(pe.handleAction.bind(pe));const Ne=pe;var He=(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(ce){var we=K.props;return ce?E().createElement("span",null,K.props.value.toString().slice(9,-1).replace(/\{[\s\S]+/,""),E().createElement("span",{className:"function-collapsed",style:{fontWeight:"bold"}},E().createElement("span",null,"{"),E().createElement("span",ye(we.theme,"ellipsis"),"..."),E().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 E().createElement("div",ye(F.theme,"function"),E().createElement(Fe,Object.assign({type_name:"function"},F)),E().createElement("span",Object.assign({},ye(F.theme,"function-value"),{className:"rjv-function-container",onClick:this.toggleCollapsed}),this.getFunctionDisplay(K)))}}])})(E().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 E().createElement("div",ye(this.props.theme,"nan"),"NaN")}}])})(E().PureComponent),yt=(function(X){function L(){return g(this,L),v(this,L,arguments)}return S(L,X),y(L,[{key:"render",value:function(){return E().createElement("div",ye(this.props.theme,"null"),"NULL")}}])})(E().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 E().createElement("div",ye(F.theme,"integer"),E().createElement(Fe,Object.assign({type_name:"int"},F)),this.props.value)}}])})(E().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 E().createElement("div",ye(F.theme,"regexp"),E().createElement(Fe,Object.assign({type_name:"regexp"},F)),this.props.value.toString())}}])})(E().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,ce=K.collapseStringsAfterLength,we=K.theme,me=K.escapeStrings,le=K.value,Me=G(ce)==="integer",De={style:{cursor:"default",wordBreak:"break-all"}};return me&&(le=J(le)),Me&&le.length>ce&&(De.style.cursor="pointer",F&&(le=E().createElement("span",null,le.substring(0,ce),E().createElement("span",ye(we,"ellipsis")," ...")))),E().createElement("div",ye(we,"string"),E().createElement(Fe,Object.assign({type_name:"string"},K)),E().createElement("span",Object.assign({className:"string-value"},De,{onClick:this.toggleCollapsed}),'"',le,'"'))}}])})(E().PureComponent),Ut=(function(X){function L(){return g(this,L),v(this,L,arguments)}return S(L,X),y(L,[{key:"render",value:function(){return E().createElement("div",ye(this.props.theme,"undefined"),"undefined")}}])})(E().PureComponent),Et=(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 E().createElement("div",ye(F.theme,"bigNumber"),E().createElement(Fe,Object.assign({type_name:"bigNumber"},F)),this.props.value.toString())}}])})(E().PureComponent);function Zt(){return Zt=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},Zt.apply(null,arguments)}const Pt=T.useLayoutEffect;var Vt=function(X,L){typeof X!="function"?X.current=L:X(L)};const ln=function(X,L){var F=(0,T.useRef)();return(0,T.useCallback)((function(K){X.current=K,F.current&&Vt(F.current,null),F.current=L,L&&Vt(L,K)}),[L])};var bn={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},Ht=function(X){Object.keys(bn).forEach((function(L){X.style.setProperty(L,bn[L],"important")}))},vt=null,Nt=function(X,L){var F=X.scrollHeight;return L.sizingStyle.boxSizing==="border-box"?F+L.borderSize:F-L.paddingSize},jn=function(){},ft=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],Wt=!!document.documentElement.currentStyle,En=function(X){var L=window.getComputedStyle(X);if(L===null)return null;var F,K=(F=L,ft.reduce((function(we,me){return we[me]=F[me],we}),{})),ce=K.boxSizing;return ce===""?null:(Wt&&ce==="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 pn(X,L,F){var K,ce,we=(K=F,ce=T.useRef(K),Pt((function(){ce.current=K})),ce);T.useLayoutEffect((function(){var me=function(le){return we.current(le)};if(X)return X.addEventListener(L,me),function(){return X.removeEventListener(L,me)}}),[])}var Vn=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],sn=function(X,L){var F=X.cacheMeasurements,K=X.maxRows,ce=X.minRows,we=X.onChange,me=we===void 0?jn:we,le=X.onHeightChange,Me=le===void 0?jn:le,De=z(X,Vn),Ve=De.value!==void 0,qe=T.useRef(null),nt=ln(qe,L),Be=T.useRef(0),Ct=T.useRef(),Ot=function(){var st=qe.current,Qt=F&&Ct.current?Ct.current:En(st);if(Qt){Ct.current=Qt;var wr=(function(xr,Ws,hi,pi){hi===void 0&&(hi=1),pi===void 0&&(pi=1/0),vt||((vt=document.createElement("textarea")).setAttribute("tabindex","-1"),vt.setAttribute("aria-hidden","true"),Ht(vt)),vt.parentNode===null&&document.body.appendChild(vt);var wo=xr.paddingSize,Nr=xr.borderSize,mi=xr.sizingStyle,cl=mi.boxSizing;Object.keys(mi).forEach((function(dl){var hl=dl;vt.style[hl]=mi[hl]})),Ht(vt),vt.value=Ws;var gi=Nt(vt,xr);vt.value=Ws,gi=Nt(vt,xr),vt.value="x";var Af=vt.scrollHeight-wo,ul=Af*hi;cl==="border-box"&&(ul=ul+wo+Nr),gi=Math.max(ul,gi);var fl=Af*pi;return cl==="border-box"&&(fl=fl+wo+Nr),[gi=Math.min(fl,gi),Af]})(Qt,st.value||st.placeholder||"x",ce,K),cn=wr[0],uo=wr[1];Be.current!==cn&&(Be.current=cn,st.style.setProperty("height",cn+"px","important"),Me(cn,{rowHeight:uo}))}};return T.useLayoutEffect(Ot),(function(st,Qt){pn(document.body,"reset",(function(wr){st.current.form===wr.target&&Qt(wr)}))})(qe,(function(){if(!Ve){var st=qe.current.value;requestAnimationFrame((function(){var Qt=qe.current;Qt&&st!==Qt.value&&Ot()}))}})),pn(window,"resize",Ot),(function(st){pn(document.fonts,"loadingdone",st)})(Ot),T.createElement("textarea",Zt({},De,{onChange:function(st){Ve||Ot(),me(st)},ref:nt}))},ur=T.forwardRef(sn);function qn(X,L){X=X.trim();try{if((X=structuredClone(X))[0]==="[")return Yt("array",JSON.parse(X));if(X[0]==="{")return Yt("object",JSON.parse(X));if(X.match(/\-?\d+\.\d+/)&&X.match(/\-?\d+\.\d+/)[0]===X)return L&&parseFloat(X).toString()!==X?Yt("bigNumber",X):Yt("float",parseFloat(X));if(X.match(/\-?\d+e-\d+/)&&X.match(/\-?\d+e-\d+/)[0]===X)return Yt("float",Number(X));if(X.match(/\-?\d+/)&&X.match(/\-?\d+/)[0]===X)return L&&parseInt(X).toString()!==X?Yt("bigNumber",X):Yt("integer",parseInt(X));if(X.match(/\-?\d+e\+\d+/)&&X.match(/\-?\d+e\+\d+/)[0]===X)return Yt("integer",Number(X))}catch{}switch(X=X.toLowerCase()){case"undefined":return Yt("undefined",void 0);case"nan":return Yt("nan",NaN);case"null":return Yt("null",null);case"true":return Yt("boolean",!0);case"false":return Yt("boolean",!1);default:if(X=Date.parse(X))return Yt("date",new Date(X))}return Yt(!1,null)}function Yt(X,L){return{type:X,value:L}}var sr=["style"],Jr=["style"],Sr=["style"],Xt=["style"],Cn=["style"],Pr=["style"],So=["style"],ki=["style"],wf=["style"],ol=["style"],il=["style"],xf=["style"],Vs=(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,ce=U(F,sr);return E().createElement("span",ce,E().createElement("svg",Object.assign({},lo(K),{viewBox:"0 0 24 24",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),E().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"})))}}])})(E().PureComponent),qs=(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,ce=U(F,Jr);return E().createElement("span",ce,E().createElement("svg",Object.assign({},lo(K),{viewBox:"0 0 24 24",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),E().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"})))}}])})(E().PureComponent),sl=(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,ce=U(F,Sr),we=lo(K).style;return E().createElement("span",ce,E().createElement("svg",{fill:we.color,width:we.height,height:we.width,style:we,viewBox:"0 0 1792 1792"},E().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"})))}}])})(E().PureComponent),Bs=(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,ce=U(F,Xt),we=lo(K).style;return E().createElement("span",ce,E().createElement("svg",{fill:we.color,width:we.height,height:we.width,style:we,viewBox:"0 0 1792 1792"},E().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"})))}}])})(E().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,ce=U(F,Cn);return E().createElement("span",ce,E().createElement("svg",{style:p(p({},lo(K).style),{},{paddingLeft:"2px",verticalAlign:"top"}),viewBox:"0 0 15 15",fill:"currentColor"},E().createElement("path",{d:"M0 14l6-6-6-6z"})))}}])})(E().PureComponent),rp=(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,ce=U(F,Pr);return E().createElement("span",ce,E().createElement("svg",{style:p(p({},lo(K).style),{},{paddingLeft:"2px",verticalAlign:"top"}),viewBox:"0 0 15 15",fill:"currentColor"},E().createElement("path",{d:"M0 5l6 6 6-6z"})))}}])})(E().PureComponent),_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,ce=U(F,So);return E().createElement("span",ce,E().createElement("svg",Object.assign({},lo(K),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),E().createElement("g",null,E().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"}))))}}])})(E().PureComponent),di=(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,ce=U(F,ki);return E().createElement("span",ce,E().createElement("svg",Object.assign({},lo(K),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),E().createElement("g",null,E().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"}))))}}])})(E().PureComponent),Hs=(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,ce=U(F,wf);return E().createElement("span",ce,E().createElement("svg",Object.assign({},lo(K),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),E().createElement("g",null,E().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"}))))}}])})(E().PureComponent),op=(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,ce=U(F,ol);return E().createElement("span",ce,E().createElement("svg",Object.assign({},lo(K),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),E().createElement("g",null,E().createElement("path",{d:"m31.6 21.6h-10v10h-3.2v-10h-10v-3.2h10v-10h3.2v10h10v3.2z"}))))}}])})(E().PureComponent),ip=(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,ce=U(F,il);return E().createElement("span",ce,E().createElement("svg",Object.assign({},lo(K),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),E().createElement("g",null,E().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"}))))}}])})(E().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,ce=U(F,xf);return E().createElement("span",ce,E().createElement("svg",Object.assign({},lo(K),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),E().createElement("g",null,E().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"}))))}}])})(E().PureComponent);function lo(X){return X||(X={}),{style:p(p({verticalAlign:"middle"},X),{},{color:X.color?X.color:"#000000",height:"1em",width:"1em"})}}var al=(function(X){function L(F){var K;return g(this,L),(K=v(this,L,[F])).copiedTimer=null,K.copyToClipboardFallback=function(ce){var we=document.createElement("textarea");we.value=ce,document.body.appendChild(we),we.select(),document.execCommand("copy"),document.body.removeChild(we)},K.handleCopy=function(){var ce=K.props,we=ce.clickCallback,me=ce.src,le=ce.namespace,Me=JSON.stringify(K.clipboardValue(me),null," ");navigator.clipboard?navigator.clipboard.writeText(Me).catch((function(){K.copyToClipboardFallback(Me)})):K.copyToClipboardFallback(Me),K.copiedTimer=setTimeout((function(){K.setState({copied:!1})}),5500),K.setState({copied:!0},(function(){typeof we=="function"&&we({src:me,namespace:le,name:le[le.length-1]})}))},K.getClippyIcon=function(){var ce=K.props.theme;return K.state.copied?E().createElement("span",null,E().createElement(_f,Object.assign({className:"copy-icon"},ye(ce,"copy-icon"))),E().createElement("span",ye(ce,"copy-icon-copied"),"✔")):E().createElement(_f,Object.assign({className:"copy-icon"},ye(ce,"copy-icon")))},K.clipboardValue=function(ce){switch(G(ce)){case"function":case"regexp":return ce.toString();default:return ce}},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),ce=F.hidden,we=F.rowHovered,me=ye(K,"copy-to-clipboard").style,le="inline";return ce&&(le="none"),E().createElement("span",{className:"copy-to-clipboard-container",title:"Copy to clipboard",style:{verticalAlign:"top",display:we?"inline-block":"none"}},E().createElement("span",{style:p(p({},me),{},{display:le}),onClick:this.handleCopy},this.getClippyIcon()))}}])})(E().PureComponent);const Sc=(function(X){function L(F){var K;return g(this,L),(K=v(this,L,[F])).getEditIcon=function(){var ce=K.props,we=ce.variable,me=ce.theme;return E().createElement("div",{className:"click-to-edit",style:{verticalAlign:"top",display:K.state.hovered?"inline-block":"none"}},E().createElement(ip,Object.assign({className:"click-to-edit-icon"},ye(me,"editVarIcon"),{onClick:function(){K.prepopInput(we)}})))},K.prepopInput=function(ce){if(K.props.onEdit!==!1){var we=(function(le,Me){var De;switch(G(le,Me)){case"undefined":De="undefined";break;case"nan":De="NaN";break;case"string":De=le;break;case"bigNumber":case"date":case"function":case"regexp":De=le.toString();break;default:try{De=JSON.stringify(le,null," ")}catch{De=""}}return De})(ce.value,K.props.bigNumber),me=qn(we,K.props.bigNumber);K.setState({editMode:!0,editValue:we,parsedInput:{type:me.type,value:me.value}})}},K.getRemoveIcon=function(){var ce=K.props,we=ce.variable,me=ce.namespace,le=ce.theme,Me=ce.rjvId;return E().createElement("div",{className:"click-to-remove",style:{verticalAlign:"top",display:K.state.hovered?"inline-block":"none"}},E().createElement(di,Object.assign({className:"click-to-remove-icon"},ye(le,"removeVarIcon"),{onClick:function(){Ce.dispatch({name:"VARIABLE_REMOVED",rjvId:Me,data:{name:we.name,namespace:me,existing_value:we.value,variable_removed:!0}})}})))},K.getValue=function(ce,we){var me=!we&&ce.type,le=K.props;switch(me){case!1:return K.getEditInput();case"string":return E().createElement(on,Object.assign({value:ce.value},le));case"integer":return E().createElement(bt,Object.assign({value:ce.value},le));case"float":return E().createElement(ze,Object.assign({value:ce.value},le));case"boolean":return E().createElement(Re,Object.assign({value:ce.value},le));case"function":return E().createElement(He,Object.assign({value:ce.value},le));case"null":return E().createElement(yt,le);case"nan":return E().createElement(it,le);case"undefined":return E().createElement(Ut,le);case"date":return E().createElement(We,Object.assign({value:ce.value},le));case"regexp":return E().createElement(pt,Object.assign({value:ce.value},le));case"bigNumber":return E().createElement(Et,Object.assign({value:ce.value},le));default:return E().createElement("div",{className:"object-value"},JSON.stringify(ce.value))}},K.getEditInput=function(){var ce=K.props,we=ce.keyModifier,me=ce.selectOnFocus,le=ce.theme,Me=K.state.editValue;return E().createElement("div",null,E().createElement(ur,Object.assign({type:"text",ref:function(De){De&&De[me?"select":"focus"]()},value:Me,className:"variable-editor",onChange:function(De){var Ve=De.target.value,qe=qn(Ve,K.props.bigNumber);K.setState({editValue:Ve,parsedInput:{type:qe.type,value:qe.value}})},onKeyDown:function(De){switch(De.key){case"Escape":K.setState({editMode:!1,editValue:""});break;case"Enter":we(De,"submit")&&K.submitEdit(!0)}De.stopPropagation()},placeholder:"update this value",minRows:2},ye(le,"edit-input"))),E().createElement("div",ye(le,"edit-icon-container"),E().createElement(di,Object.assign({className:"edit-cancel"},ye(le,"cancel-icon"),{onClick:function(De){De&&De.stopPropagation(),K.setState({editMode:!1,editValue:""})}})),E().createElement(bc,Object.assign({className:"edit-check string-value"},ye(le,"check-icon"),{onClick:function(De){De&&De.stopPropagation(),K.submitEdit()}})),E().createElement("div",null,K.showDetected())))},K.submitEdit=function(ce){var we=K.props,me=we.variable,le=we.namespace,Me=we.rjvId,De=we.bigNumber,Ve=K.state,qe=Ve.editValue,nt=Ve.parsedInput,Be=qe;ce&&nt.type&&(Be=nt.value,De&&nt.type==="bigNumber"&&(Be=new De(Be))),K.setState({editMode:!1}),Ce.dispatch({name:"VARIABLE_UPDATED",rjvId:Me,data:{name:me.name,namespace:le,existing_value:me.value,new_value:Be,variable_removed:!1}})},K.showDetected=function(){var ce=K.props,we=ce.theme,me=(ce.variable,ce.namespace,ce.rjvId,K.state.parsedInput),le=(me.type,me.value,K.getDetectedInput());if(le)return E().createElement("div",null,E().createElement("div",ye(we,"detected-row"),le,E().createElement(bc,{className:"edit-check detected",style:p({verticalAlign:"top",paddingLeft:"3px"},ye(we,"check-icon").style),onClick:function(Me){Me&&Me.stopPropagation(),K.submitEdit(!0)}})))},K.getDetectedInput=function(){var ce=K.state.parsedInput,we=ce.type,me=ce.value,le=K.props,Me=le.theme;if(we!==!1)switch(we.toLowerCase()){case"object":return E().createElement("span",null,E().createElement("span",{style:p(p({},ye(Me,"brace").style),{},{cursor:"default"})},"{"),E().createElement("span",{style:p(p({},ye(Me,"ellipsis").style),{},{cursor:"default"})},"..."),E().createElement("span",{style:p(p({},ye(Me,"brace").style),{},{cursor:"default"})},"}"));case"array":return E().createElement("span",null,E().createElement("span",{style:p(p({},ye(Me,"brace").style),{},{cursor:"default"})},"["),E().createElement("span",{style:p(p({},ye(Me,"ellipsis").style),{},{cursor:"default"})},"..."),E().createElement("span",{style:p(p({},ye(Me,"brace").style),{},{cursor:"default"})},"]"));case"string":return E().createElement(on,Object.assign({value:me},le));case"integer":return E().createElement(bt,Object.assign({value:me},le));case"float":return E().createElement(ze,Object.assign({value:me},le));case"boolean":return E().createElement(Re,Object.assign({value:me},le));case"function":return E().createElement(He,Object.assign({value:me},le));case"null":return E().createElement(yt,le);case"nan":return E().createElement(it,le);case"undefined":return E().createElement(Ut,le);case"date":return E().createElement(We,Object.assign({value:new Date(me)},le));case"bignumber":return E().createElement(Et,Object.assign({value:me},le))}},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,ce=K.variable,we=K.singleIndent,me=K.type,le=K.theme,Me=K.namespace,De=K.indentWidth,Ve=K.enableClipboard,qe=K.onEdit,nt=K.onDelete,Be=K.onSelect,Ct=K.displayArrayKey,Ot=K.quotesOnKeys,st=K.keyModifier,Qt=K.showComma,wr=K.isLast,cn=this.state.editMode;return E().createElement("div",Object.assign({},ye(le,"objectKeyVal",{paddingLeft:De*we}),{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:ce.name}),me=="array"?Ct?E().createElement("span",Object.assign({},ye(le,"array-key"),{key:ce.name+"_"+Me}),ce.name,E().createElement("div",ye(le,"colon"),":")):null:E().createElement("span",null,E().createElement("span",Object.assign({},ye(le,"object-name"),{className:"object-key",key:ce.name+"_"+Me}),!!Ot&&E().createElement("span",{style:{verticalAlign:"top"}},'"'),E().createElement("span",{style:{display:"inline-block"}},J(ce.name)),!!Ot&&E().createElement("span",{style:{verticalAlign:"top"}},'"')),E().createElement("span",ye(le,"colon"),":")),E().createElement("div",Object.assign({className:"variable-value",onClick:Be===!1&&qe===!1?null:function(uo){var xr=Le(Me);st(uo,"edit")&&qe!==!1?F.prepopInput(ce):Be!==!1&&(xr.shift(),Be(p(p({},ce),{},{namespace:xr})))}},ye(le,"variableValue",{cursor:Be===!1?"default":"pointer"})),this.getValue(ce,cn)),Qt&&!wr&&E().createElement("span",ye(le,"comma"),","),Ve?E().createElement(al,{rowHovered:this.state.hovered,hidden:cn,src:ce.value,clickCallback:Ve,theme:le,namespace:[].concat(Le(Me),[ce.name])}):null,qe!==!1&&cn==0?this.getEditIcon():null,nt!==!1&&cn==0?this.getRemoveIcon():null)}}])})(E().PureComponent);var Uo=(function(X){function L(){var F;g(this,L);for(var K=arguments.length,ce=new Array(K),we=0;we<K;we++)ce[we]=arguments[we];return(F=v(this,L,[].concat(ce))).getObjectSize=function(){var me=F.props,le=me.size,Me=me.theme;if(me.displayObjectSize)return E().createElement("span",Object.assign({className:"object-size"},ye(Me,"object-size")),le," item",le===1?"":"s")},F.getAddAttribute=function(me){var le=F.props,Me=le.theme,De=le.namespace,Ve=le.name,qe=le.src,nt=le.rjvId,Be=le.depth;return E().createElement("span",{className:"click-to-add",style:{verticalAlign:"top",display:me?"inline-block":"none"}},E().createElement(Hs,Object.assign({className:"click-to-add-icon"},ye(Me,"addVarIcon"),{onClick:function(){var Ct={name:Be>0?Ve:null,namespace:De.splice(0,De.length-1),existing_value:qe,variable_removed:!1,key_name:null};G(qe)==="object"?Ce.dispatch({name:"ADD_VARIABLE_KEY_REQUEST",rjvId:nt,data:Ct}):Ce.dispatch({name:"VARIABLE_ADDED",rjvId:nt,data:p(p({},Ct),{},{new_value:[].concat(Le(qe),[null])})})}})))},F.getRemoveObject=function(me){var le=F.props,Me=le.theme,De=(le.hover,le.namespace),Ve=le.name,qe=le.src,nt=le.rjvId;if(De.length!==1)return E().createElement("span",{className:"click-to-remove",style:{display:me?"inline-block":"none"}},E().createElement(di,Object.assign({className:"click-to-remove-icon"},ye(Me,"removeVarIcon"),{onClick:function(){Ce.dispatch({name:"VARIABLE_REMOVED",rjvId:nt,data:{name:Ve,namespace:De.splice(0,De.length-1),existing_value:qe,variable_removed:!0}})}})))},F.render=function(){var me=F.props,le=me.theme,Me=me.onDelete,De=me.onAdd,Ve=me.enableClipboard,qe=me.src,nt=me.namespace,Be=me.rowHovered;return E().createElement("div",Object.assign({},ye(le,"object-meta-data"),{className:"object-meta-data",onClick:function(Ct){Ct.stopPropagation()}}),F.getObjectSize(),Ve?E().createElement(al,{rowHovered:Be,clickCallback:Ve,src:qe,theme:le,namespace:nt}):null,De!==!1?F.getAddAttribute(Be):null,Me!==!1?F.getRemoveObject(Be):null)},F}return S(L,X),y(L)})(E().PureComponent);function eo(X){var L=X.parent_type,F=X.namespace,K=X.quotesOnKeys,ce=X.theme,we=X.jsvRoot,me=X.name,le=X.displayArrayKey,Me=X.name?X.name:"";return!we||me!==!1&&me!==null?L=="array"?le?E().createElement("span",Object.assign({},ye(ce,"array-key"),{key:F}),E().createElement("span",{className:"array-key"},Me),E().createElement("span",ye(ce,"colon"),":")):E().createElement("span",null):E().createElement("span",Object.assign({},ye(ce,"object-name"),{key:F}),E().createElement("span",{className:"object-key"},K&&E().createElement("span",{style:{verticalAlign:"top"}},'"'),E().createElement("span",null,Me),K&&E().createElement("span",{style:{verticalAlign:"top"}},'"')),E().createElement("span",ye(ce,"colon"),":")):E().createElement("span",null)}function Ef(X){var L=X.theme;switch(X.iconStyle){case"triangle":return E().createElement(rp,Object.assign({},ye(L,"expanded-icon"),{className:"expanded-icon"}));case"square":return E().createElement(sl,Object.assign({},ye(L,"expanded-icon"),{className:"expanded-icon"}));default:return E().createElement(Vs,Object.assign({},ye(L,"expanded-icon"),{className:"expanded-icon"}))}}function sp(X){var L=X.theme;switch(X.iconStyle){case"triangle":return E().createElement(fr,Object.assign({},ye(L,"collapsed-icon"),{className:"collapsed-icon"}));case"square":return E().createElement(Bs,Object.assign({},ye(L,"collapsed-icon"),{className:"collapsed-icon"}));default:return E().createElement(qs,Object.assign({},ye(L,"collapsed-icon"),{className:"collapsed-icon"}))}}var Cf=["src","groupArraysAfterLength","depth","name","theme","jsvRoot","namespace","parent_type"],Tf=(function(X){function L(F){var K;return g(this,L),(K=v(this,L,[F])).toggleCollapsed=function(ce){var we=[];for(var me in K.state.expanded)we.push(K.state.expanded[me]);we[ce]=!we[ce],K.setState({expanded:we})},K.state={expanded:[]},K}return S(L,X),y(L,[{key:"getExpandedIcon",value:function(F){var K=this.props,ce=K.theme,we=K.iconStyle;return this.state.expanded[F]?E().createElement(Ef,{theme:ce,iconStyle:we}):E().createElement(sp,{theme:ce,iconStyle:we})}},{key:"render",value:function(){var F=this,K=this.props,ce=K.src,we=K.groupArraysAfterLength,me=(K.depth,K.name),le=K.theme,Me=K.jsvRoot,De=K.namespace,Ve=(K.parent_type,U(K,Cf)),qe=0,nt=5*this.props.indentWidth;Me||(qe=5*this.props.indentWidth);var Be=we,Ct=Math.ceil(ce.length/Be);return E().createElement("div",Object.assign({className:"object-key-val"},ye(le,Me?"jsv-root":"objectKeyVal",{paddingLeft:qe})),E().createElement(eo,this.props),E().createElement("span",null,E().createElement(Uo,Object.assign({size:ce.length},this.props))),Le(Array(Ct)).map((function(Ot,st){return E().createElement("div",Object.assign({key:st,className:"object-key-val array-group"},ye(le,"objectKeyVal",{marginLeft:6,paddingLeft:nt})),E().createElement("span",ye(le,"brace-row"),E().createElement("div",Object.assign({className:"icon-container"},ye(le,"icon-container"),{onClick:function(Qt){F.toggleCollapsed(st)}}),F.getExpandedIcon(st)),F.state.expanded[st]?E().createElement(Ks,Object.assign({key:me+st,depth:0,name:!1,collapsed:!1,groupArraysAfterLength:Be,index_offset:st*Be,src:ce.slice(st*Be,st*Be+Be),namespace:De,type:"array",parent_type:"array_group",theme:le,showComma:F.props.showComma,isLast:st===Ct-1},Ve)):E().createElement("span",Object.assign({},ye(le,"brace"),{onClick:function(Qt){F.toggleCollapsed(st)},className:"array-group-brace"}),"[",E().createElement("div",Object.assign({},ye(le,"array-group-meta-data"),{className:"array-group-meta-data"}),E().createElement("span",Object.assign({className:"object-size"},ye(le,"object-size")),st*Be," - ",st*Be+Be>ce.length?ce.length:st*Be+Be)),"]")))})))}}])})(E().PureComponent),wc=["depth","src","namespace","name","type","parent_type","theme","jsvRoot","iconStyle","showComma","isLast"],Rf=(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(we,me,le){return E().createElement("div",{className:"pushed-content object-container"},E().createElement("div",Object.assign({className:"object-content"},ye(K.props.theme,"pushed-content")),K.renderObjectContents(me,le)))},K.getEllipsis=function(){return K.state.size===0?null:E().createElement("div",Object.assign({},ye(K.props.theme,"ellipsis"),{className:"node-ellipsis",onClick:K.toggleCollapsed}),"...")},K.getObjectMetaData=function(we){var me=K.props,le=(me.rjvId,me.theme,K.state),Me=le.size,De=le.hovered;return E().createElement(Uo,Object.assign({rowHovered:De,size:Me},K.props))},K.renderObjectContents=function(we,me){var le,Me=K.props,De=Me.depth,Ve=Me.parent_type,qe=Me.index_offset,nt=Me.groupArraysAfterLength,Be=Me.namespace,Ct=Me.showComma,Ot=K.state.object_type,st=[],Qt=Object.keys(we||{});return K.props.sortKeys&&Ot!=="array"&&(Qt=Qt.sort()),Qt.forEach((function(wr,cn){le=new co(wr,we[wr],me.bigNumber);var uo=cn===Qt.length-1;if(Ve==="array_group"&&qe&&(le.name=parseInt(le.name)+qe),Object.prototype.hasOwnProperty.call(we,wr))if(le.type==="object")st.push(E().createElement(Ks,Object.assign({key:le.name,depth:De+1,name:le.name,src:le.value,namespace:Be.concat(le.name),parent_type:Ot,isLast:uo,showComma:Ct},me)));else if(le.type==="array"){var xr=Ks;nt&&le.value.length>nt&&(xr=Tf),st.push(E().createElement(xr,Object.assign({key:le.name,depth:De+1,name:le.name,src:le.value,namespace:Be.concat(le.name),type:"array",parent_type:Ot,isLast:uo,showComma:Ct},me)))}else st.push(E().createElement(Sc,Object.assign({key:le.name+"_"+Be,variable:le,singleIndent:5,namespace:Be,type:K.props.type,isLast:uo,showComma:Ct},me)))})),st};var ce=L.getState(F);return K.state=p(p({},ce),{},{prevProps:{}}),K}return S(L,X),y(L,[{key:"getBraceStart",value:function(F,K){var ce=this,we=this.props,me=(we.src,we.theme),le=we.iconStyle;if(we.parent_type==="array_group")return E().createElement("span",null,E().createElement("span",ye(me,"brace"),F==="array"?"[":"{"));var Me=K?Ef:sp;return E().createElement("span",null,E().createElement("span",Object.assign({onClick:function(De){ce.toggleCollapsed()}},ye(me,"brace-row")),E().createElement("div",Object.assign({className:"icon-container"},ye(me,"icon-container")),E().createElement(Me,{theme:me,iconStyle:le})),E().createElement(eo,this.props),E().createElement("span",ye(me,"brace"),F==="array"?"[":"{")))}},{key:"render",value:function(){var F=this,K=this.props,ce=K.depth,we=K.src,me=(K.namespace,K.name,K.type,K.parent_type),le=K.theme,Me=K.jsvRoot,De=K.iconStyle,Ve=K.showComma,qe=K.isLast,nt=U(K,wc),Be=this.state,Ct=Be.object_type,Ot=Be.expanded,st={};return Me||me==="array_group"?me==="array_group"&&(st.borderLeft=0,st.display="inline"):st.paddingLeft=5*this.props.indentWidth,E().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(le,Me?"jsv-root":"objectKeyVal",st)),this.getBraceStart(Ct,Ot),Ot?this.getObjectContent(ce,we,p({theme:le,iconStyle:De},nt)):this.getEllipsis(),E().createElement("span",{className:"brace-row"},E().createElement("span",{style:p(p({},ye(le,"brace").style),{},{paddingLeft:Ot?"3px":"0px"})},Ct==="array"?"]":"}")),Ve&&!qe&&!Me&&E().createElement("span",ye(le,"comma"),","),this.getObjectMetaData(we))}}],[{key:"getDerivedStateFromProps",value:function(F,K){var ce=K.prevProps;return F.src!==ce.src||F.collapsed!==ce.collapsed||F.name!==ce.name||F.namespace!==ce.namespace||F.rjvId!==ce.rjvId?p(p({},L.getState(F)),{},{prevProps:F}):null}}])})(E().PureComponent);Rf.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 co=y((function X(L,F,K){g(this,X),this.name=L,this.value=F,this.type=G(F,K)}));I(Rf);const Ks=Rf;var ap=(function(X){function L(){var F;g(this,L);for(var K=arguments.length,ce=new Array(K),we=0;we<K;we++)ce[we]=arguments[we];return(F=v(this,L,[].concat(ce))).render=function(){var me,le,Me,De,Ve=F.props,qe=[Ve.name],nt=Ks;return typeof Ve.name!="object"||Array.isArray(Ve.name)||(qe=[((me=Ve.name)===null||me===void 0?void 0:me.displayName)||((le=Ve.name)===null||le===void 0?void 0:le.name)||((Me=Ve.name)===null||Me===void 0||(De=Me.type)===null||De===void 0?void 0:De.name)||"Anonymous"]),Array.isArray(Ve.src)&&Ve.groupArraysAfterLength&&Ve.src.length>Ve.groupArraysAfterLength&&(nt=Tf),E().createElement("div",{className:"pretty-json-container object-container"},E().createElement("div",{className:"object-content"},E().createElement(nt,Object.assign({namespace:qe,depth:0,jsvRoot:!0},Ve))))},F}return S(L,X),y(L)})(E().PureComponent),Of=(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,ce=K.theme,we=K.rjvId,me=K.isValid,le=this.state.input,Me=me(le);return E().createElement("div",Object.assign({className:"key-modal-request"},ye(ce,"key-modal-request"),{onClick:this.closeModal}),E().createElement("div",Object.assign({},ye(ce,"key-modal"),{onClick:function(De){De.stopPropagation()}}),E().createElement("div",ye(ce,"key-modal-label"),"Key Name:"),E().createElement("div",{style:{position:"relative"}},E().createElement("input",Object.assign({},ye(ce,"key-modal-input"),{className:"key-modal-input",ref:function(De){return De&&De.focus()},spellCheck:!1,value:le,placeholder:"...",onChange:function(De){F.setState({input:De.target.value})},onKeyPress:function(De){Me&&De.key==="Enter"?F.submit():De.key==="Escape"&&F.closeModal()}})),Me?E().createElement(bc,Object.assign({},ye(ce,"key-modal-submit"),{className:"key-modal-submit",onClick:function(De){return F.submit()}})):null),E().createElement("span",ye(ce,"key-modal-cancel"),E().createElement(op,Object.assign({},ye(ce,"key-modal-cancel-icon"),{className:"key-modal-cancel",onClick:function(){Ce.dispatch({rjvId:we,name:"RESET"})}})))))}}])})(E().PureComponent),Gs=(function(X){function L(){var F;g(this,L);for(var K=arguments.length,ce=new Array(K),we=0;we<K;we++)ce[we]=arguments[we];return(F=v(this,L,[].concat(ce))).isValid=function(me){var le=F.props.rjvId,Me=Ne.get(le,"action","new-key-request");return me!=""&&Object.keys(Me.existing_value).indexOf(me)===-1},F.submit=function(me){var le=F.props.rjvId,Me=Ne.get(le,"action","new-key-request");Me.new_value=p({},Me.existing_value),Me.new_value[me]=F.props.defaultValue,Ce.dispatch({name:"VARIABLE_ADDED",rjvId:le,data:Me})},F}return S(L,X),y(L,[{key:"render",value:function(){var F=this.props,K=F.active,ce=F.theme,we=F.rjvId;return K?E().createElement(Of,{rjvId:we,theme:ce,isValid:this.isValid,submit:this.submit}):null}}])})(E().PureComponent),lp=(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,ce=F.active,we=F.theme,me=F.rjvId;return ce?E().createElement("div",Object.assign({className:"validation-failure"},ye(we,"validation-failure"),{onClick:function(){Ce.dispatch({rjvId:me,name:"RESET"})}}),E().createElement("span",ye(we,"validation-failure-label"),K),E().createElement(op,ye(we,"validation-failure-clear"))):null}}])})(E().PureComponent),ll=(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 ce,we=Ne.get(K.rjvId,"action","variable-update"),me=we.name,le=we.namespace,Me=we.new_value,De=we.existing_value,Ve=we.updated_src,qe=we.type,nt=K.props,Be=nt.onEdit,Ct=nt.onDelete,Ot=nt.onAdd,st={existing_src:K.state.src,new_value:Me,updated_src:Ve,name:me,namespace:le,existing_value:De};switch(qe){case"variable-added":ce=Ot(st);break;case"variable-edited":ce=Be(st);break;case"variable-removed":ce=Ct(st)}ce!==!1?(Ne.set(K.rjvId,"global","src",Ve),K.setState({src:Ve})):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,ce=F.validationMessage,we=F.addKeyRequest,me=F.theme,le=F.src,Me=F.name,De=this.props,Ve=De.style,qe=De.defaultValue;return E().createElement("div",{className:"react-json-view",style:p(p({},ye(me,"app-container").style),Ve)},E().createElement(lp,{message:ce,active:K,theme:me,rjvId:this.rjvId}),E().createElement(ap,Object.assign({},this.props,{src:le,name:Me,theme:me,type:G(le),rjvId:this.rjvId})),E().createElement(Gs,{active:we,theme:me,rjvId:this.rjvId,defaultValue:qe}))}}],[{key:"getDerivedStateFromProps",value:function(F,K){if(F.src!==K.prevSrc||F.name!==K.prevName||F.theme!==K.prevTheme){var ce={src:F.src,name:F.name,theme:F.theme,validationMessage:F.validationMessage,prevSrc:F.src,prevName:F.name,prevTheme:F.theme};return L.validateState(ce)}return null}}])})(E().PureComponent);ll.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},ll.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 ce=0;ce<K.length;ce++)if(!(K[ce]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)},I(ll);const Zs=ll})(),l})()))})(Gg)),Gg.exports}var Eye=_ye();const h6=es(Eye),Cye=tl("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 Tye({className:e,orientation:t,...n}){return j.jsx("div",{role:"group","data-slot":"button-group","data-orientation":t,className:vn(Cye({orientation:t}),e),...n})}function Rye({className:e,...t}){return j.jsx("label",{"data-slot":"label",className:vn("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 Oye({className:e,...t}){return j.jsx("fieldset",{"data-slot":"field-set",className:vn("gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3 flex flex-col",e),...t})}const Aye=tl("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 hS({className:e,orientation:t="vertical",...n}){return j.jsx("div",{role:"group","data-slot":"field","data-orientation":t,className:vn(Aye({orientation:t}),e),...n})}function pS({className:e,...t}){return j.jsx(Rye,{"data-slot":"field-label",className:vn("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 k3=(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 kye={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},p6={valid(e){return e===null?null:e?{[k3.valid]:""}:{[k3.invalid]:""}}},Mye=k.createContext({invalid:void 0,name:void 0,validityData:{state:kye,errors:[],error:"",value:"",initialValue:null},setValidityData:jo,disabled:void 0,touched:!1,setTouched:jo,dirty:!1,setDirty:jo,filled:!1,setFilled:jo,focused:!1,setFocused:jo,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=Po)=>e,getInputValidationProps:(e=Po)=>e,inputRef:{current:null},commit:async()=>{}}});function yh(e=!0){const t=k.useContext(Mye);if(t.setValidityData===jo&&!e)throw new Error(is(28));return t}const jye=k.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:jo,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function m6(){return k.useContext(jye)}const Pye={...Eh};let M3=0;function Nye(e,t="mui"){const[n,r]=k.useState(e),o=e||n;return k.useEffect(()=>{n==null&&(M3+=1,r(`${t}-${M3}`))},[n,t]),o}const j3=Pye.useId;function WE(e,t){if(j3!==void 0){const n=j3();return e??(t?`${t}-${n}`:n)}return Nye(e,t)}function YE(e){return WE(e,"base-ui")}const Dye=k.createContext({controlId:void 0,setControlId:jo,labelId:void 0,setLabelId:jo,messageIds:[],setMessageIds:jo,getDescriptionProps:e=>e});function O0(){return k.useContext(Dye)}const $ye=[];function g6(e){k.useEffect(e,$ye)}const Ed=0;class Yu{static create(){return new Yu}currentId=Ed;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Ed,n()},t)}isStarted(){return this.currentId!==Ed}clear=()=>{this.currentId!==Ed&&(clearTimeout(this.currentId),this.currentId=Ed)};disposeEffect=()=>this.clear}function No(){const e=Yi(Yu.create).current;return g6(e.disposeEffect),e}function Iye(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const Sf=typeof navigator<"u",mS=Uye(),y6=qye(),v6=Vye(),b6=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),zye=mS.platform==="MacIntel"&&mS.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(mS.platform),Lye=Sf&&/apple/i.test(navigator.vendor),ix=Sf&&/android/i.test(y6)||/android/i.test(v6);Sf&&y6.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const Fye=v6.includes("jsdom/");function Uye(){if(!Sf)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 Vye(){if(!Sf)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function qye(){if(!Sf)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const sx="data-base-ui-focusable",S6="active",w6="selected",Bye="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",$a="ArrowLeft",Ia="ArrowRight",XE="ArrowUp",Jh="ArrowDown";function As(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&&fw(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Ei(e){return"composedPath"in e?e.composedPath()[0]:e.target}function xi(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 Hye(e){return e.matches("html,body")}function so(e){return e?.ownerDocument||document}function x6(e){return or(e)&&e.matches(Bye)}function ax(e){return e?e.getAttribute("role")==="combobox"&&x6(e):!1}function Ry(e){return e?e.hasAttribute(sx)?e:e.querySelector(`[${sx}]`)||e:null}function Ou(e,t,n=!0){return e.filter(o=>o.parentId===t&&(!n||o.context?.open)).flatMap(o=>[o,...Ou(e,o.id,n)])}function P3(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 Yr(e){e.preventDefault(),e.stopPropagation()}function Kye(e){return"nativeEvent"in e}function _6(e){return e.mozInputSource===0&&e.isTrusted?!0:ix&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function E6(e){return Fye?!1:!ix&&e.width===0&&e.height===0||ix&&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 N3(e,t){return["mouse","pen"].includes(e)}function C6(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const Gye=["top","right","bottom","left"],Xu=Math.min,Mo=Math.max,Oy=Math.round,wu=Math.floor,Wi=e=>({x:e,y:e}),Zye={left:"right",right:"left",bottom:"top",top:"bottom"},Wye={start:"end",end:"start"};function lx(e,t,n){return Mo(e,Xu(t,n))}function Is(e,t){return typeof e=="function"?e(t):e}function Io(e){return e.split("-")[0]}function rl(e){return e.split("-")[1]}function QE(e){return e==="x"?"y":"x"}function JE(e){return e==="y"?"height":"width"}const Yye=new Set(["top","bottom"]);function ni(e){return Yye.has(Io(e))?"y":"x"}function e2(e){return QE(ni(e))}function Xye(e,t,n){n===void 0&&(n=!1);const r=rl(e),o=e2(e),s=JE(o);let l=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(l=Ay(l)),[l,Ay(l)]}function Qye(e){const t=Ay(e);return[cx(e),t,cx(t)]}function cx(e){return e.replace(/start|end/g,t=>Wye[t])}const D3=["left","right"],$3=["right","left"],Jye=["top","bottom"],e0e=["bottom","top"];function t0e(e,t,n){switch(e){case"top":case"bottom":return n?t?$3:D3:t?D3:$3;case"left":case"right":return t?Jye:e0e;default:return[]}}function n0e(e,t,n,r){const o=rl(e);let s=t0e(Io(e),n==="start",r);return o&&(s=s.map(l=>l+"-"+o),t&&(s=s.concat(s.map(cx)))),s}function Ay(e){return e.replace(/left|right|bottom|top/g,t=>Zye[t])}function r0e(e){return{top:0,right:0,bottom:0,left:0,...e}}function T6(e){return typeof e!="number"?r0e(e):{top:e,right:e,bottom:e,left:e}}function ky(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 Au(e,t){return t<0||t>=e.current.length}function Zg(e,t){return Ur(e,{disabledIndices:t})}function ux(e,t){return Ur(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Ur(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&&za(e,s,r));return s}function R6(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 w=null,v=-1;e.current.forEach((C,S)=>{if(C==null)return;const T=C.closest('[role="row"]');T&&(y=!0),(T!==w||v===-1)&&(w=T,v+=1,g[v]=[]),g[v].push(S),b[S]=v})}const _=y&&g.length>0&&g.some(w=>w.length!==s);function x(w){if(!_||d===-1)return;const v=b[d];if(v==null)return;const C=g[v].indexOf(d);let S=w==="up"?v-1:v+1;r&&(S<0?S=g.length-1:S>=g.length&&(S=0));const T=new Set;for(;S>=0&&S<g.length&&!T.has(S);){T.add(S);const E=g[S];if(E.length===0){S=w==="up"?S-1:S+1;continue}const O=Math.min(C,E.length-1);for(let M=O;M>=0;M-=1){const P=E[M];if(!za(e,P,l))return P}S=w==="up"?S-1:S+1,r&&(S<0?S=g.length-1:S>=g.length&&(S=0))}}if(t.key===XE){const w=x("up");if(w!==void 0)h&&Yr(t),p=w;else{if(h&&Yr(t),d===-1)p=u;else if(p=Ur(e,{startingIndex:p,amount:s,decrement:!0,disabledIndices:l}),r&&(d-s<c||p<0)){const v=d%s,C=u%s,S=u-(C-v);C===v?p=u:p=C>v?S:S-s}Au(e,p)&&(p=d)}}if(t.key===Jh){const w=x("down");w!==void 0?(h&&Yr(t),p=w):(h&&Yr(t),d===-1?p=c:(p=Ur(e,{startingIndex:d,amount:s,disabledIndices:l}),r&&d+s>u&&(p=Ur(e,{startingIndex:d%s-s,amount:s,disabledIndices:l}))),Au(e,p)&&(p=d))}if(n==="both"){const w=wu(d/s);t.key===(o?$a:Ia)&&(h&&Yr(t),d%s!==s-1?(p=Ur(e,{startingIndex:d,disabledIndices:l}),r&&bg(p,s,w)&&(p=Ur(e,{startingIndex:d-d%s-1,disabledIndices:l}))):r&&(p=Ur(e,{startingIndex:d-d%s-1,disabledIndices:l})),bg(p,s,w)&&(p=d)),t.key===(o?Ia:$a)&&(h&&Yr(t),d%s!==0?(p=Ur(e,{startingIndex:d,decrement:!0,disabledIndices:l}),r&&bg(p,s,w)&&(p=Ur(e,{startingIndex:d+(s-d%s),decrement:!0,disabledIndices:l}))):r&&(p=Ur(e,{startingIndex:d+(s-d%s),decrement:!0,disabledIndices:l})),bg(p,s,w)&&(p=d));const v=wu(u/s)===w;Au(e,p)&&(r&&v?p=t.key===(o?Ia:$a)?u:Ur(e,{startingIndex:d-d%s-1,disabledIndices:l}):p=d)}return p}function O6(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 A6(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 k6(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function za(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 o0e=["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])"],My=o0e.join(","),M6=typeof Element>"u",Qu=M6?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,jy=!M6&&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},vh=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&&vh(t.parentNode);return l},i0e=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},j6=function(t,n,r){if(vh(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(My));return n&&Qu.call(t,My)&&o.unshift(t),o=o.filter(r),o},Py=function(t,n,r){for(var o=[],s=Array.from(t);s.length;){var l=s.shift();if(!vh(l,!1))if(l.tagName==="SLOT"){var c=l.assignedElements(),u=c.length?c:l.children,d=Py(u,!0,r);r.flatten?o.push.apply(o,d):o.push({scopeParent:l,candidates:d})}else{var h=Qu.call(l,My);h&&r.filter(l)&&(n||!t.includes(l))&&o.push(l);var p=l.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(l),g=!vh(p,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(l));if(p&&g){var b=Py(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},P6=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},N6=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||i0e(t))&&!P6(t)?0:t.tabIndex},s0e=function(t,n){var r=N6(t);return r<0&&n&&!P6(t)?0:r},a0e=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},D6=function(t){return t.tagName==="INPUT"},l0e=function(t){return D6(t)&&t.type==="hidden"},c0e=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},u0e=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},f0e=function(t){if(!t.name)return!0;var n=t.form||jy(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=u0e(o,t.form);return!s||s===t},d0e=function(t){return D6(t)&&t.type==="radio"},h0e=function(t){return d0e(t)&&!f0e(t)},p0e=function(t){var n,r=t&&jy(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=jy(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},I3=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},m0e=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=Qu.call(t,"details>summary:first-of-type"),c=l?t.parentElement:t;if(Qu.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=jy(t);if(d&&!d.shadowRoot&&o(d)===!0)return I3(t);t.assignedSlot?t=t.assignedSlot:!d&&h!==t.ownerDocument?t=h.host:t=d}t=u}if(p0e(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return I3(t);return!1},g0e=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 Qu.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},fx=function(t,n){return!(n.disabled||vh(n)||l0e(n)||m0e(n,t)||c0e(n)||g0e(n))},dx=function(t,n){return!(h0e(n)||N6(n)<0||!fx(t,n))},y0e=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},$6=function(t){var n=[],r=[];return t.forEach(function(o,s){var l=!!o.scopeParent,c=l?o.scopeParent:o,u=s0e(c,l),d=l?$6(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(a0e).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},A0=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Py([t],n.includeContainer,{filter:dx.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:y0e}):r=j6(t,n.includeContainer,dx.bind(null,n)),$6(r)},v0e=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Py([t],n.includeContainer,{filter:fx.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=j6(t,n.includeContainer,fx.bind(null,n)),r},I6=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Qu.call(t,My)===!1?!1:dx(n,t)};const ep=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function z6(e,t){const n=A0(e,ep()),r=n.length;if(r===0)return;const o=As(so(e)),s=n.indexOf(o),l=s===-1?t===1?0:r-1:s+t;return n[l]}function L6(e){return z6(so(e).body,1)||e}function F6(e){return z6(so(e).body,-1)||e}function Hd(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Hn(n,r)}function b0e(e){A0(e,ep()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function z3(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 Ny({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 U6(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:o,setControlId:s}=O0(),l=YE(t);return rt(()=>{if(!(!n&&!t||s===jo)){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 V6(e){const{enabled:t=!0,value:n,id:r,name:o,controlRef:s,commit:l}=e,{formRef:c}=m6(),{invalid:u,markedDirtyRef:d,validityData:h,setValidityData:p}=yh(),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:Iye(h,u),validate(){let b=n;b===void 0&&(b=g()),d.current=!0,$s.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 Ju="none",Kd="trigger-press",S0e="trigger-hover",q6="outside-press",gS="item-press",k0="focus-out",w0e="escape-key",yS="list-navigation",x0e="cancel-open",_0e="window-resize";function kn(e,t,n,r){let o=!1,s=!1;const l=r??Po;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 E0e=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}=yh(),_=y||u,x=b??l,w=k.useMemo(()=>({...g,disabled:_}),[g,_]),{setTouched:v,setDirty:C,validityData:S,setFocused:T,setFilled:E,validationMode:O,validation:M}=yh(),{labelId:P}=O0(),I=U6({id:s});rt(()=>{const Z=c!=null;M.inputRef.current?.value||Z&&c!==""?E(!0):Z&&c===""&&E(!1)},[M.inputRef,E,c]);const[z,U]=Ny({controlled:c,default:h,name:"FieldControl",state:"value"}),G=c!==void 0,J=lt((Z,H)=>{d?.(Z,H),!H.isCanceled&&U(Z)});return V6({id:I,name:x,commit:M.commit,value:z,getValue:()=>M.inputRef.current?.value,controlRef:M.inputRef}),jr("input",t,{ref:n,state:w,props:[{id:I,disabled:_,name:x,ref:M.inputRef,"aria-labelledby":P,...G?{value:z}:{defaultValue:h},onChange(Z){const H=Z.currentTarget.value;J(H,kn(Ju,Z.nativeEvent)),C(H!==S.initialValue),E(H!=="")},onFocus(){T(!0)},onBlur(Z){v(!0),T(!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:p6})}),C0e=k.forwardRef(function(t,n){return j.jsx(E0e,{ref:n,...t})});function T0e({className:e,type:t,...n}){return j.jsx(C0e,{type:t,"data-slot":"input",className:vn("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 t2={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 R0e(e){const t=k.useRef(!0);t.current&&(t.current=!1,e())}function Br(e){const t=Yi(O0e,e).current;return t.next=e,rt(t.effect),t}function O0e(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var Dy=Symbol("NOT_FOUND");function A0e(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function k0e(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function M0e(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 L3=e=>Array.isArray(e)?e:[e];function j0e(e){const t=Array.isArray(e[0])?e[0]:e;return M0e(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function P0e(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}function N0e(e){let t;return{get(n){return t&&e(t.key,n)?t.value:Dy},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function D0e(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 Dy}function o(c,u){r(c)===Dy&&(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 $0e=(e,t)=>e===t;function I0e(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 z0e(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=$0e,maxSize:o=1,resultEqualityCheck:s}=n,l=I0e(r);let c=0;const u=o<=1?N0e(l):D0e(o,l);function d(){let h=u.get(arguments);if(h===Dy){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 L0e=class{constructor(e){this.value=e}deref(){return this.value}},F0e=typeof WeakRef<"u"?WeakRef:L0e,U0e=0,F3=1;function Sg(){return{s:U0e,v:void 0,o:null,p:null}}function B6(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===F3)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 F0e(h):h}return d.s=F3,d.v=h,h}return l.clearCache=()=>{n=Sg(),l.resetResultsCount()},l.resultsCount=()=>s,l.resetResultsCount=()=>{s=0},l}function H6(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()),A0e(d,`createSelector expects an output function after the inputs, but received: [${typeof d}]`);const h={...n,...u},{memoize:p,memoizeOptions:g=[],argsMemoize:b=B6,argsMemoizeOptions:y=[]}=h,_=L3(g),x=L3(y),w=j0e(o),v=p(function(){return s++,d.apply(null,arguments)},..._),C=b(function(){l++;const T=P0e(w,arguments);return c=v.apply(null,T),c},...x);return Object.assign(C,{resultFunc:d,memoizedResultFunc:v,dependencies:w,dependencyRecomputations:()=>l,resetDependencyRecomputations:()=>{l=0},lastResult:()=>c,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:p,argsMemoize:b})};return Object.assign(r,{withTypes:()=>r}),r}var V0e=H6(B6),q0e=Object.assign((e,t=V0e)=>{k0e(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:()=>q0e});H6({memoize:z0e,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 vS={exports:{}},bS={};var U3;function B0e(){if(U3)return bS;U3=1;var e=nf();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,x=y[1];return s(function(){_.value=b,_.getSnapshot=g,u(_)&&x({inst:_})},[p,b,g]),o(function(){return u(_)&&x({inst:_}),p(function(){u(_)&&x({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 bS.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,bS}var V3;function K6(){return V3||(V3=1,vS.exports=B0e()),vS.exports}var H0e=K6(),SS={exports:{}},wS={};var q3;function K0e(){if(q3)return wS;q3=1;var e=nf(),t=K6();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 wS.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 w(E){if(!v){if(v=!0,C=E,E=g(E),b!==void 0&&_.hasValue){var O=_.value;if(b(O,E))return S=O}return S=E}if(O=S,r(C,E))return O;var M=g(E);return b!==void 0&&b(O,M)?(C=E,O):(C=E,S=M)}var v=!1,C,S,T=p===void 0?null:p;return[function(){return w(h())},T===null?void 0:function(){return w(T())}]},[h,p,g,b]);var x=o(d,y[0],y[1]);return l(function(){_.hasValue=!0,_.value=x},[x]),u(x),x},wS}var B3;function G0e(){return B3||(B3=1,SS.exports=K0e()),SS.exports}var Z0e=G0e();const W0e=$_(19),Y0e=W0e?X0e:Q0e;function wt(e,t,n,r,o){return Y0e(e,t,n,r,o)}function X0e(e,t,n,r,o){const s=k.useCallback(()=>t(e.getSnapshot(),n,r,o),[e,t,n,r,o]);return H0e.useSyncExternalStore(e.subscribe,s,s)}function Q0e(e,t,n,r,o){return Z0e.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,s=>t(s,n,r,o))}class ku{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])){ku.prototype.setState.call(this,{...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||ku.prototype.setState.call(this,{...this.state,[t]:n})}notifyAll(){const t={...this.state};ku.prototype.setState.call(this,t)}}class J0e extends ku{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??jo);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 eve{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 eve;class Fi{static create(){return new Fi}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 M0(){const e=Yi(Fi.create).current;return g6(e.disposeEffect),e}function tve(){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 nve=k.createContext(null),rve=k.createContext(null),G6=()=>k.useContext(nve)?.id||null,j0=e=>{const t=k.useContext(rve);return e??t};function $y(e){return`data-base-ui-${e}`}function Ji(e){return e?.ownerDocument||document}const Iy=k.forwardRef(function(t,n){const[r,o]=k.useState();rt(()=>{Lye&&o("button")},[]);const s={tabIndex:0,role:r};return j.jsx("span",{...t,ref:n,style:t2,"aria-hidden":r?void 0:!0,...s,"data-base-ui-focus-guard":""})});let H3=0;function Wg(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(H3);const s=()=>e?.focus({preventScroll:n});o?s():H3=requestAnimationFrame(s)}const Mu={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function K3(e){return e==="inert"?Mu.inert:e==="aria-hidden"?Mu["aria-hidden"]:Mu.none}let _g=new WeakSet,Eg={},xS=0;const Z6=e=>e&&(e.host||Z6(e.parentNode)),ove=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Z6(n);return e.contains(r)?r:null}).filter(n=>n!=null);function ive(e,t,n,r){const o="data-base-ui-inert",s=r?"inert":n?"aria-hidden":null,l=ove(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(el(y)!=="script")if(c.has(y))g(y);else{const _=s?y.getAttribute(s):null,x=_!==null&&_!=="false",w=K3(s),v=(w.get(y)||0)+1,C=(h.get(y)||0)+1;w.set(y,v),h.set(y,C),d.push(y),v===1&&x&&_g.add(y),C===1&&y.setAttribute(o,""),!x&&s&&y.setAttribute(s,s==="inert"?"":"true")}})}return xS+=1,()=>{d.forEach(b=>{const y=K3(s),x=(y.get(b)||0)-1,w=(h.get(b)||0)-1;y.set(b,x),h.set(b,w),x||(!_g.has(b)&&s&&b.removeAttribute(s),_g.delete(b)),w||b.removeAttribute(o)}),xS-=1,xS||(Mu.inert=new WeakMap,Mu["aria-hidden"]=new WeakMap,Mu.none=new WeakMap,_g=new WeakSet,Eg={})}}function sve(e,t=!1,n=!1){const r=so(e[0]).body;return ive(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const W6=k.createContext(null),Y6=()=>k.useContext(W6),ave=$y("portal");function lve(e={}){const{ref:t,container:n,componentProps:r=Po,elementProps:o,elementState:s}=e,l=WE(),u=Y6()?.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 x=(n&&(N_(n)?n:n.current))??u??document.body;if(x==null){b.current&&(b.current=null,g(null),h(null));return}b.current!==x&&(b.current=x,g(null),h(x))},[n,u,l]);const y=jr("div",r,{ref:[t,g],state:s,props:[{id:l,[ave]:""},o]});return{portalNode:p,portalSubtree:d&&y?$s.createPortal(y,d):null}}const cve=k.forwardRef(function(t,n){const{children:r,container:o,className:s,render:l,renderGuards:c,...u}=t,{portalNode:d,portalSubtree:h}=lve({container:o,ref:n,componentProps:t,elementProps:u}),p=k.useRef(null),g=k.useRef(null),b=k.useRef(null),y=k.useRef(null),[_,x]=k.useState(null),w=_?.modal,v=_?.open,C=typeof c=="boolean"?c:!!_&&!_.modal&&_.open&&!!d;k.useEffect(()=>{if(!d||w)return;function T(E){d&&Hd(E)&&(E.type==="focusin"?z3:b0e)(d)}return d.addEventListener("focusin",T,!0),d.addEventListener("focusout",T,!0),()=>{d.removeEventListener("focusin",T,!0),d.removeEventListener("focusout",T,!0)}},[d,w]),k.useEffect(()=>{!d||v||z3(d)},[v,d]);const S=k.useMemo(()=>({beforeOutsideRef:p,afterOutsideRef:g,beforeInsideRef:b,afterInsideRef:y,portalNode:d,setFocusManagerState:x}),[d]);return j.jsxs(k.Fragment,{children:[h,j.jsxs(W6.Provider,{value:S,children:[C&&d&&j.jsx(Iy,{"data-type":"outside",ref:p,onFocus:T=>{if(Hd(T,d))b.current?.focus();else{const E=_?_.domReference:null;F6(E)?.focus()}}}),C&&d&&j.jsx("span",{"aria-owns":d.id,style:pne}),d&&$s.createPortal(r,d),C&&d&&j.jsx(Iy,{"data-type":"outside",ref:g,onFocus:T=>{if(Hd(T,d))y.current?.focus();else{const E=_?_.domReference:null;L6(E)?.focus(),_?.closeOnFocusOut&&_?.onOpenChange(!1,kn(k0,T.nativeEvent))}}})]})]})});function Ul(e){return e==null?e:"current"in e?e.current:e}function uve(e,t){const n=Or(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 G3=20;let Oa=[];function n2(){Oa=Oa.filter(e=>e.isConnected)}function fve(e){n2(),e&&el(e)!=="body"&&(Oa.push(e),Oa.length>G3&&(Oa=Oa.slice(-G3)))}function _S(){return n2(),Oa[Oa.length-1]}function dve(e){if(!e)return null;const t=ep();return I6(e,t)?e:A0(e,t)[0]||e}function hve(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():zo(e).display!=="none"}function Z3(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const n=ep(),o=v0e(e,n).filter(l=>{const c=l.getAttribute("data-tabindex")||"";return I6(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 pve(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,x="rootStore"in t?t.rootStore:t,w=x.useState("open"),v=x.useState("domReferenceElement"),C=x.useState("floatingElement"),{events:S,dataRef:T}=x.context,E=lt(()=>T.current.floatingContext?.nodeId),O=lt(p),M=s===!1,P=ax(v)&&M,I=Br(o),z=Br(s),U=Br(l),G=Br(h),J=j0(_),ee=Y6(),Z=k.useRef(null),H=k.useRef(null),Y=k.useRef(!1),oe=k.useRef(!1),ne=k.useRef(!1),$=k.useRef(-1),q=k.useRef(""),V=k.useRef(""),D=No(),B=No(),te=M0(),re=ee!=null,ae=Ry(C),ge=lt((xe=ae)=>xe?A0(xe,ep()):[]),ke=lt(xe=>{const $e=ge(xe);return I.current.map(()=>$e).filter(Boolean).flat()});k.useEffect(()=>{if(r||!u)return;function xe(Ze){Ze.key==="Tab"&&Hn(ae,As(so(ae)))&&ge().length===0&&!P&&Yr(Ze)}const $e=so(ae);return $e.addEventListener("keydown",xe),()=>{$e.removeEventListener("keydown",xe)}},[r,v,ae,u,I,P,ge,ke]),k.useEffect(()=>{if(r||!C)return;function xe($e){const Ze=Ei($e),Fe=ge().indexOf(Ze);Fe!==-1&&($.current=Fe)}return C.addEventListener("focusin",xe),()=>{C.removeEventListener("focusin",xe)}},[r,C,ge]),k.useEffect(()=>{if(r||!w)return;const xe=so(ae);function $e(){ne.current=!1}function Ze(Fe){const Re=Ei(Fe),We=Hn(C,Re)||Hn(v,Re)||Hn(ee?.portalNode,Re);ne.current=!We,V.current=Fe.pointerType||"keyboard"}function ye(){V.current="keyboard"}return xe.addEventListener("pointerdown",Ze,!0),xe.addEventListener("pointerup",$e,!0),xe.addEventListener("pointercancel",$e,!0),xe.addEventListener("keydown",ye,!0),()=>{xe.removeEventListener("pointerdown",Ze,!0),xe.removeEventListener("pointerup",$e,!0),xe.removeEventListener("pointercancel",$e,!0),xe.removeEventListener("keydown",ye,!0)}},[r,C,v,ae,w,ee]),k.useEffect(()=>{if(r||!d)return;function xe(){oe.current=!0,B.start(0,()=>{oe.current=!1})}function $e(Re){const We=Re.relatedTarget,ze=Re.currentTarget,Le=Ei(Re);queueMicrotask(()=>{const Ue=E(),dt=x.context.triggerElements,Ce=!(Hn(v,We)||Hn(C,We)||Hn(We,C)||Hn(ee?.portalNode,We)||We!=null&&dt.hasElement(We)||dt.hasMatchingElement(pe=>Hn(pe,We))||We?.hasAttribute($y("focus-guard"))||J&&(Ou(J.nodesRef.current,Ue).find(pe=>Hn(pe.context?.elements.floating,We)||Hn(pe.context?.elements.domReference,We))||P3(J.nodesRef.current,Ue).find(pe=>[pe.context?.elements.floating,Ry(pe.context?.elements.floating)].includes(We)||pe.context?.elements.domReference===We)));if(ze===v&&ae&&Z3(ae,I),c&&ze!==v&&!hve(Le)&&As(so(ae))===so(ae).body){if(or(ae)&&(ae.focus(),c==="popup")){te.request(()=>{ae.focus()});return}const pe=$.current,Ne=ge(),He=Ne[pe]||Ne[Ne.length-1]||ae;or(He)&&He.focus()}if(T.current.insideReactTree){T.current.insideReactTree=!1;return}(P||!u)&&We&&Ce&&!oe.current&&(P||We!==_S())&&(Y.current=!0,x.setOpen(!1,kn(k0,Re)))})}function Ze(){ne.current||(T.current.insideReactTree=!0,D.start(0,()=>{T.current.insideReactTree=!1}))}const ye=or(v)?v:null,Fe=[];if(!(!C&&!ye))return ye&&(ye.addEventListener("focusout",$e),ye.addEventListener("pointerdown",xe),Fe.push(()=>{ye.removeEventListener("focusout",$e),ye.removeEventListener("pointerdown",xe)})),C&&(C.addEventListener("focusout",$e),ee&&(C.addEventListener("focusout",Ze,!0),Fe.push(()=>{C.removeEventListener("focusout",Ze,!0)})),Fe.push(()=>{C.removeEventListener("focusout",$e)})),()=>{Fe.forEach(Re=>{Re()})}},[r,v,C,ae,u,J,ee,x,d,c,ge,P,E,I,T,D,B,te]);const Q=k.useRef(null),ie=k.useRef(null),de=qa(Q,y,ee?.beforeInsideRef),_e=qa(ie,ee?.afterInsideRef);k.useEffect(()=>{if(r||!C||!w)return;const xe=Array.from(ee?.portalNode?.querySelectorAll(`[${$y("portal")}]`)||[]),Ze=(J?P3(J.nodesRef.current,E()):[]).find(Re=>ax(Re.context?.elements.domReference||null))?.context?.elements.domReference,ye=[C,Ze,...xe,...O(),Z.current,H.current,Q.current,ie.current,ee?.beforeOutsideRef.current,ee?.afterOutsideRef.current,Ul(b),Ul(g),P?v:null].filter(Re=>Re!=null),Fe=sve(ye,u||P);return()=>{Fe()}},[w,r,v,C,u,I,ee,P,J,E,O,g,b]),rt(()=>{if(!w||r||!or(ae))return;const xe=so(ae),$e=As(xe);queueMicrotask(()=>{const Ze=ke(ae),ye=z.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]||ae:Re=Ul(Fe),Re=Re||Ze[0]||ae,!Hn(ae,$e)&&Wg(Re,{preventScroll:Re===ae})})},[r,w,ae,M,ke,z,G]),rt(()=>{if(r||!ae)return;const xe=so(ae),$e=As(xe);fve($e);function Ze(Re){if(Re.open||(q.current=uve(Re.nativeEvent,V.current)),Re.reason===S0e&&Re.nativeEvent.type==="mouseleave"&&(Y.current=!0),Re.reason===q6)if(Re.nested)Y.current=!1;else if(_6(Re.nativeEvent)||E6(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=xe.createElement("span");ye.setAttribute("tabindex","-1"),ye.setAttribute("aria-hidden","true"),Object.assign(ye.style,t2),re&&v&&v.insertAdjacentElement("afterend",ye);function Fe(){const Re=U.current;let We=typeof Re=="function"?Re(q.current):Re;if(We===void 0||We===!1)return null;if(We===null&&(We=!0),typeof We=="boolean"){const Le=v||_S();return Le&&Le.isConnected?Le:ye}const ze=v||_S()||ye;return Ul(We)||ze}return()=>{S.off("openchange",Ze);const Re=As(xe),We=Hn(C,Re)||J&&Ou(J.nodesRef.current,E(),!1).some(Le=>Hn(Le.context?.elements.floating,Re)),ze=Fe();queueMicrotask(()=>{const Le=dve(ze),Ue=typeof U.current!="boolean";U.current&&!Y.current&&or(Le)&&(!(!Ue&&Le!==Re&&Re!==xe.body)||We)&&Le.focus({preventScroll:!0}),ye.remove()})}},[r,C,ae,U,T,S,J,re,v,E]),k.useEffect(()=>{queueMicrotask(()=>{Y.current=!1})},[r]),k.useEffect(()=>{if(r||!w)return;function xe(Ze){Ei(Ze)?.closest(`[${dne}]`)&&(oe.current=!0)}const $e=so(ae);return $e.addEventListener("pointerdown",xe,!0),()=>{$e.removeEventListener("pointerdown",xe,!0)}},[r,w,ae]),rt(()=>{if(!r&&ee)return ee.setFocusManagerState({modal:u,closeOnFocusOut:d,open:w,onOpenChange:x.setOpen,domReference:v}),()=>{ee.setFocusManagerState(null)}},[r,ee,u,w,x,d,v]),rt(()=>{if(!(r||!ae))return Z3(ae,I),()=>{queueMicrotask(n2)}},[r,ae,I]);const Te=!r&&(u?!P:!0)&&(re||u);return j.jsxs(k.Fragment,{children:[Te&&j.jsx(Iy,{"data-type":"inside",ref:de,onFocus:xe=>{if(u){const $e=ke();Wg($e[$e.length-1])}else ee?.portalNode&&(Y.current=!1,Hd(xe,ee.portalNode)?L6(v)?.focus():Ul(b??ee.beforeOutsideRef)?.focus())}}),n,Te&&j.jsx(Iy,{"data-type":"inside",ref:_e,onFocus:xe=>{u?Wg(ke()[0]):ee?.portalNode&&(d&&(Y.current=!0),Hd(xe,ee.portalNode)?F6(v)?.focus():Ul(g??ee.afterOutsideRef)?.focus())}})]})}function mve(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=M0(),g=No(),b=k.useMemo(()=>({onPointerDown(y){h.current=y.pointerType},onMouseDown(y){const _=h.current,x=y.nativeEvent,w=n.select("open");if(y.button!==0||s==="click"||N3(_)&&c)return;const v=r.current.openEvent,C=v?.type,S=n.select("domReferenceElement")!==y.currentTarget,T=w&&S||!(w&&l&&(!(v&&u)||C==="click"||C==="mousedown"));if(x6(x.target)){const O=kn(Kd,x,x.target);T&&_==="touch"&&d>0?g.start(d,()=>{n.setOpen(!0,O)}):n.setOpen(T,O);return}const E=y.currentTarget;p.request(()=>{const O=kn(Kd,x,E);T&&_==="touch"&&d>0?g.start(d,()=>{n.setOpen(!0,O)}):n.setOpen(T,O)})},onClick(y){if(s==="mousedown-only")return;const _=h.current;if(s==="mousedown"&&_){h.current=void 0;return}if(N3(_)&&c)return;const x=n.select("open"),w=r.current.openEvent,v=n.select("domReferenceElement")!==y.currentTarget,C=x&&v||!(x&&l&&(!(w&&u)||C6(w))),S=kn(Kd,y.nativeEvent,y.currentTarget);C&&_==="touch"&&d>0?g.start(d,()=>{n.setOpen(!0,S)}):n.setOpen(C,S)},onKeyDown(){h.current=void 0}}),[r,s,c,n,u,l,p,g,d]);return k.useMemo(()=>o?{reference:b}:Po,[o,b])}function W3(e,t,n){let{reference:r,floating:o}=e;const s=ni(t),l=e2(t),c=JE(l),u=Io(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(rl(t)){case"start":b[l]-=g*(n&&d?-1:1);break;case"end":b[l]+=g*(n&&d?-1:1);break}return b}const gve=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}=W3(d,r,u),g=r,b={},y=0;for(let _=0;_<c.length;_++){const{name:x,fn:w}=c[_],{x:v,y:C,data:S,reset:T}=await w({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=C??p,b={...b,[x]:{...b[x],...S}},T&&y<=50&&(y++,typeof T=="object"&&(T.placement&&(g=T.placement),T.rects&&(d=T.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:o}):T.rects),{x:h,y:p}=W3(d,g,u)),_=-1)}return{x:h,y:p,placement:g,strategy:o,middlewareData:b}};async function bh(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}=Is(t,e),y=T6(b),x=c[g?p==="floating"?"reference":"floating":p],w=ky(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(x)))==null||n?x:x.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,C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),S=await(s.isElement==null?void 0:s.isElement(C))?await(s.getScale==null?void 0:s.getScale(C))||{x:1,y:1}:{x:1,y:1},T=ky(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:v,offsetParent:C,strategy:u}):v);return{top:(w.top-T.top+y.top)/S.y,bottom:(T.bottom-w.bottom+y.bottom)/S.y,left:(w.left-T.left+y.left)/S.x,right:(T.right-w.right+y.right)/S.x}}const yve=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,...x}=Is(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const w=Io(o),v=ni(c),C=Io(c)===c,S=await(u.isRTL==null?void 0:u.isRTL(d.floating)),T=g||(C||!_?[Ay(c)]:Qye(c)),E=y!=="none";!g&&E&&T.push(...n0e(c,_,y,S));const O=[c,...T],M=await bh(t,x),P=[];let I=((r=s.flip)==null?void 0:r.overflows)||[];if(h&&P.push(M[w]),p){const J=Xye(o,l,S);P.push(M[J[0]],M[J[1]])}if(I=[...I,{placement:o,overflows:P}],!P.every(J=>J<=0)){var z,U;const J=(((z=s.flip)==null?void 0:z.index)||0)+1,ee=O[J];if(ee&&(!(p==="alignment"?v!==ni(ee):!1)||I.every(Y=>ni(Y.placement)===v?Y.overflows[0]>0:!0)))return{data:{index:J,overflows:I},reset:{placement:ee}};let Z=(U=I.filter(H=>H.overflows[0]<=0).sort((H,Y)=>H.overflows[1]-Y.overflows[1])[0])==null?void 0:U.placement;if(!Z)switch(b){case"bestFit":{var G;const H=(G=I.filter(Y=>{if(E){const oe=ni(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 Y3(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function X3(e){return Gye.some(t=>e[t]>=0)}const vve=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Is(e,t);switch(r){case"referenceHidden":{const s=await bh(t,{...o,elementContext:"reference"}),l=Y3(s,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:X3(l)}}}case"escaped":{const s=await bh(t,{...o,altBoundary:!0}),l=Y3(s,n.floating);return{data:{escapedOffsets:l,escaped:X3(l)}}}default:return{}}}}},X6=new Set(["left","top"]);async function bve(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),l=Io(n),c=rl(n),u=ni(n)==="y",d=X6.has(l)?-1:1,h=s&&u?-1:1,p=Is(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 Sve=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 bve(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}}}}},wve=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:x=>{let{x:w,y:v}=x;return{x:w,y:v}}},...u}=Is(e,t),d={x:n,y:r},h=await bh(t,u),p=ni(Io(o)),g=QE(p);let b=d[g],y=d[p];if(s){const x=g==="y"?"top":"left",w=g==="y"?"bottom":"right",v=b+h[x],C=b-h[w];b=lx(v,b,C)}if(l){const x=p==="y"?"top":"left",w=p==="y"?"bottom":"right",v=y+h[x],C=y-h[w];y=lx(v,y,C)}const _=c.fn({...t,[g]:b,[p]:y});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[g]:s,[p]:l}}}}}},xve=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}=Is(e,t),h={x:n,y:r},p=ni(o),g=QE(p);let b=h[g],y=h[p];const _=Is(c,t),x=typeof _=="number"?{mainAxis:_,crossAxis:0}:{mainAxis:0,crossAxis:0,..._};if(u){const C=g==="y"?"height":"width",S=s.reference[g]-s.floating[C]+x.mainAxis,T=s.reference[g]+s.reference[C]-x.mainAxis;b<S?b=S:b>T&&(b=T)}if(d){var w,v;const C=g==="y"?"width":"height",S=X6.has(Io(o)),T=s.reference[p]-s.floating[C]+(S&&((w=l.offset)==null?void 0:w[p])||0)+(S?0:x.crossAxis),E=s.reference[p]+s.reference[C]+(S?0:((v=l.offset)==null?void 0:v[p])||0)-(S?x.crossAxis:0);y<T?y=T:y>E&&(y=E)}return{[g]:b,[p]:y}}}},_ve=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}=Is(e,t),h=await bh(t,d),p=Io(o),g=rl(o),b=ni(o)==="y",{width:y,height:_}=s.floating;let x,w;p==="top"||p==="bottom"?(x=p,w=g===(await(l.isRTL==null?void 0:l.isRTL(c.floating))?"start":"end")?"left":"right"):(w=p,x=g==="end"?"top":"bottom");const v=_-h.top-h.bottom,C=y-h.left-h.right,S=Xu(_-h[x],v),T=Xu(y-h[w],C),E=!t.middlewareData.shift;let O=S,M=T;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(O=v),E&&!g){const I=Mo(h.left,0),z=Mo(h.right,0),U=Mo(h.top,0),G=Mo(h.bottom,0);b?M=y-2*(I!==0||z!==0?I+z:Mo(h.left,h.right)):O=_-2*(U!==0||G!==0?U+G:Mo(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 Q6(e){const t=zo(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=or(e),s=o?e.offsetWidth:n,l=o?e.offsetHeight:r,c=Oy(n)!==s||Oy(r)!==l;return c&&(n=s,r=l),{width:n,height:r,$:c}}function r2(e){return Gn(e)?e:e.contextElement}function ju(e){const t=r2(e);if(!or(t))return Wi(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Q6(t);let l=(s?Oy(n.width):n.width)/r,c=(s?Oy(n.height):n.height)/o;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const Eve=Wi(0);function J6(e){const t=Or(e);return!u0()||!t.visualViewport?Eve:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Cve(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Or(e)?!1:t}function ic(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=r2(e);let l=Wi(1);t&&(r?Gn(r)&&(l=ju(r)):l=ju(e));const c=Cve(s,n,r)?J6(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=Or(s),b=r&&Gn(r)?Or(r):r;let y=g,_=dw(y);for(;_&&r&&b!==y;){const x=ju(_),w=_.getBoundingClientRect(),v=zo(_),C=w.left+(_.clientLeft+parseFloat(v.paddingLeft))*x.x,S=w.top+(_.clientTop+parseFloat(v.paddingTop))*x.y;u*=x.x,d*=x.y,h*=x.x,p*=x.y,u+=C,d+=S,y=Or(_),_=dw(y)}}return ky({width:h,height:p,x:u,y:d})}function P0(e,t){const n=f0(e).scrollLeft;return t?t.left+n:ic(os(e)).left+n}function ez(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-P0(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Tve(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",l=os(r),c=t?c0(t.floating):!1;if(r===l||c&&s)return n;let u={scrollLeft:0,scrollTop:0},d=Wi(1);const h=Wi(0),p=or(r);if((p||!p&&!s)&&((el(r)!=="body"||hc(l))&&(u=f0(r)),or(r))){const b=ic(r);d=ju(r),h.x=b.x+r.clientLeft,h.y=b.y+r.clientTop}const g=l&&!p&&!s?ez(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 Rve(e){return Array.from(e.getClientRects())}function Ove(e){const t=os(e),n=f0(e),r=e.ownerDocument.body,o=Mo(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Mo(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+P0(e);const c=-n.scrollTop;return zo(r).direction==="rtl"&&(l+=Mo(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:l,y:c}}const Q3=25;function Ave(e,t){const n=Or(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=u0();(!h||h&&t==="fixed")&&(c=o.offsetLeft,u=o.offsetTop)}const d=P0(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<=Q3&&(s-=y)}else d<=Q3&&(s+=d);return{width:s,height:l,x:c,y:u}}const kve=new Set(["absolute","fixed"]);function Mve(e,t){const n=ic(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=or(e)?ju(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 J3(e,t,n){let r;if(t==="viewport")r=Ave(e,n);else if(t==="document")r=Ove(os(e));else if(Gn(t))r=Mve(t,n);else{const o=J6(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ky(r)}function tz(e,t){const n=js(e);return n===t||!Gn(n)||ks(n)?!1:zo(n).position==="fixed"||tz(n,t)}function jve(e,t){const n=t.get(e);if(n)return n;let r=Ma(e,[],!1).filter(c=>Gn(c)&&el(c)!=="body"),o=null;const s=zo(e).position==="fixed";let l=s?js(e):e;for(;Gn(l)&&!ks(l);){const c=zo(l),u=D_(l);!u&&c.position==="fixed"&&(o=null),(s?!u&&!o:!u&&c.position==="static"&&!!o&&kve.has(o.position)||hc(l)&&!u&&tz(e,l))?r=r.filter(h=>h!==l):o=c,l=js(l)}return t.set(e,r),r}function Pve(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const l=[...n==="clippingAncestors"?c0(t)?[]:jve(t,this._c):[].concat(n),r],c=l[0],u=l.reduce((d,h)=>{const p=J3(t,h,o);return d.top=Mo(p.top,d.top),d.right=Xu(p.right,d.right),d.bottom=Xu(p.bottom,d.bottom),d.left=Mo(p.left,d.left),d},J3(t,c,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function Nve(e){const{width:t,height:n}=Q6(e);return{width:t,height:n}}function Dve(e,t,n){const r=or(t),o=os(t),s=n==="fixed",l=ic(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const u=Wi(0);function d(){u.x=P0(o)}if(r||!r&&!s)if((el(t)!=="body"||hc(o))&&(c=f0(t)),r){const b=ic(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?ez(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 ES(e){return zo(e).position==="static"}function ej(e,t){if(!or(e)||zo(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return os(e)===n&&(n=n.ownerDocument.body),n}function nz(e,t){const n=Or(e);if(c0(e))return n;if(!or(e)){let o=js(e);for(;o&&!ks(o);){if(Gn(o)&&!ES(o))return o;o=js(o)}return n}let r=ej(e,t);for(;r&&Fte(r)&&ES(r);)r=ej(r,t);return r&&ks(r)&&ES(r)&&!D_(r)?n:r||Hte(e)||n}const $ve=async function(e){const t=this.getOffsetParent||nz,n=this.getDimensions,r=await n(e.floating);return{reference:Dve(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ive(e){return zo(e).direction==="rtl"}const zve={convertOffsetParentRelativeRectToViewportRelativeRect:Tve,getDocumentElement:os,getClippingRect:Pve,getOffsetParent:nz,getElementRects:$ve,getClientRects:Rve,getDimensions:Nve,getScale:ju,isElement:Gn,isRTL:Ive};function rz(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Lve(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=wu(p),_=wu(o.clientWidth-(h+g)),x=wu(o.clientHeight-(p+b)),w=wu(h),C={rootMargin:-y+"px "+-_+"px "+-x+"px "+-w+"px",threshold:Mo(0,Xu(1,u))||1};let S=!0;function T(E){const O=E[0].intersectionRatio;if(O!==u){if(!S)return l();O?l(!1,O):r=setTimeout(()=>{l(!1,1e-7)},1e3)}O===1&&!rz(d,e.getBoundingClientRect())&&l(),S=!1}try{n=new IntersectionObserver(T,{...C,root:o.ownerDocument})}catch{n=new IntersectionObserver(T,C)}n.observe(e)}return l(!0),s}function tj(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=r2(e),h=o||s?[...d?Ma(d):[],...Ma(t)]:[];h.forEach(w=>{o&&w.addEventListener("scroll",n,{passive:!0}),s&&w.addEventListener("resize",n)});const p=d&&c?Lve(d,n):null;let g=-1,b=null;l&&(b=new ResizeObserver(w=>{let[v]=w;v&&v.target===d&&b&&(b.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var C;(C=b)==null||C.observe(t)})),n()}),d&&!u&&b.observe(d),b.observe(t));let y,_=u?ic(e):null;u&&x();function x(){const w=ic(e);_&&!rz(_,w)&&n(),_=w,y=requestAnimationFrame(x)}return n(),()=>{var w;h.forEach(v=>{o&&v.removeEventListener("scroll",n),s&&v.removeEventListener("resize",n)}),p?.(),(w=b)==null||w.disconnect(),b=null,u&&cancelAnimationFrame(y)}}const Fve=Sve,Uve=wve,Vve=yve,qve=_ve,Bve=vve,Hve=xve,Kve=(e,t,n)=>{const r=new Map,o={platform:zve,...n},s={...o.platform,_c:r};return gve(e,t,{...o,platform:s})};var Gve=typeof document<"u",Zve=function(){},Yg=Gve?k.useLayoutEffect:Zve;function zy(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(!zy(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)&&!zy(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function oz(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function nj(e,t){const n=oz(e);return Math.round(t*n)/n}function CS(e){const t=k.useRef(e);return Yg(()=>{t.current=e}),t}function Wve(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);zy(g,r)||b(r);const[y,_]=k.useState(null),[x,w]=k.useState(null),v=k.useCallback(Y=>{Y!==E.current&&(E.current=Y,_(Y))},[]),C=k.useCallback(Y=>{Y!==O.current&&(O.current=Y,w(Y))},[]),S=s||y,T=l||x,E=k.useRef(null),O=k.useRef(null),M=k.useRef(h),P=u!=null,I=CS(u),z=CS(o),U=CS(d),G=k.useCallback(()=>{if(!E.current||!O.current)return;const Y={placement:t,strategy:n,middleware:g};z.current&&(Y.platform=z.current),Kve(E.current,O.current,Y).then(oe=>{const ne={...oe,isPositioned:U.current!==!1};J.current&&!zy(M.current,ne)&&(M.current=ne,$s.flushSync(()=>{p(ne)}))})},[g,t,n,z,U]);Yg(()=>{d===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,p(Y=>({...Y,isPositioned:!1})))},[d]);const J=k.useRef(!1);Yg(()=>(J.current=!0,()=>{J.current=!1}),[]),Yg(()=>{if(S&&(E.current=S),T&&(O.current=T),S&&T){if(I.current)return I.current(S,T,G);G()}},[S,T,G,I,P]);const ee=k.useMemo(()=>({reference:E,floating:O,setReference:v,setFloating:C}),[v,C]),Z=k.useMemo(()=>({reference:S,floating:T}),[S,T]),H=k.useMemo(()=>{const Y={position:n,left:0,top:0};if(!Z.floating)return Y;const oe=nj(Z.floating,h.x),ne=nj(Z.floating,h.y);return c?{...Y,transform:"translate("+oe+"px, "+ne+"px)",...oz(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:ee,elements:Z,floatingStyles:H}),[h,G,ee,Z,H])}const Yve=(e,t)=>({...Fve(e),options:[e,t]}),Xve=(e,t)=>({...Uve(e),options:[e,t]}),Qve=(e,t)=>({...Hve(e),options:[e,t]}),Jve=(e,t)=>({...Vve(e),options:[e,t]}),ebe=(e,t)=>({...qve(e),options:[e,t]}),tbe=(e,t)=>({...Bve(e),options:[e,t]}),nbe={intentional:"onClick",sloppy:"onPointerDown"};function rbe(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function obe(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:x,externalTree:w}=t,v=j0(w),C=lt(typeof p=="function"?p:()=>!1),S=typeof p=="function"?C:p,T=k.useRef(!1),{escapeKey:E,outsidePress:O}=rbe(x),M=k.useRef(null),P=No(),I=No(),z=lt(()=>{I.clear(),u.current.insideReactTree=!1}),U=k.useRef(!1),G=k.useRef(""),J=lt(Q=>{G.current=Q.pointerType}),ee=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"||U.current)return;const ie=u.current.floatingContext?.nodeId,de=v?Ou(v.nodesRef.current,ie):[];if(!E&&de.length>0){let xe=!0;if(de.forEach($e=>{$e.context?.open&&!$e.context.dataRef.current.__escapeKeyBubbles&&(xe=!1)}),!xe)return}const _e=Kye(Q)?Q.nativeEvent:Q,Te=kn(w0e,_e);n.setOpen(!1,Te),!E&&!Te.isPropagationAllowed&&Q.stopPropagation()}),H=lt(Q=>{const ie=ee();return ie==="intentional"&&Q.type!=="click"||ie==="sloppy"&&Q.type==="click"}),Y=lt(()=>{u.current.insideReactTree=!0,I.start(0,z)}),oe=lt((Q,ie=!1)=>{if(H(Q)){z();return}if(u.current.insideReactTree){z();return}if(ee()==="intentional"&&ie||typeof S=="function"&&!S(Q))return;const de=Ei(Q),_e=`[${$y("inert")}]`,Te=so(n.select("floatingElement")).querySelectorAll(_e),xe=n.context.triggerElements;if(de&&(xe.hasElement(de)||xe.hasMatchingElement(Re=>Hn(Re,de))))return;let $e=Gn(de)?de:null;for(;$e&&!ks($e);){const Re=js($e);if(ks(Re)||!Gn(Re))break;$e=Re}if(Te.length&&Gn(de)&&!Hye(de)&&!Hn(de,n.select("floatingElement"))&&Array.from(Te).every(Re=>!Hn($e,Re)))return;if(or(de)&&!("touches"in Q)){const Re=ks(de),We=zo(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),He=dt&&Q.offsetY>de.clientHeight;if(Ne||He)return}const Ze=u.current.floatingContext?.nodeId,ye=v&&Ou(v.nodesRef.current,Ze).some(Re=>xi(Q,Re.context?.elements.floating));if(xi(Q,n.select("floatingElement"))||xi(Q,n.select("domReferenceElement"))||ye)return;const Fe=v?Ou(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(q6,Q)),z()}),ne=lt(Q=>{ee()!=="sloppy"||Q.pointerType==="touch"||!n.select("open")||!d||xi(Q,n.select("floatingElement"))||xi(Q,n.select("domReferenceElement"))||oe(Q)}),$=lt(Q=>{if(ee()!=="sloppy"||!n.select("open")||!d||xi(Q,n.select("floatingElement"))||xi(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)}))}),q=lt(Q=>{const ie=Ei(Q);function de(){$(Q),ie?.removeEventListener(Q.type,de)}ie?.addEventListener(Q.type,de)}),V=lt(Q=>{const ie=T.current;if(T.current=!1,P.clear(),Q.type==="mousedown"&&M.current&&!M.current.dismissOnMouseDown)return;const de=Ei(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(ee()!=="sloppy"||!M.current||xi(Q,n.select("floatingElement"))||xi(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=Ei(Q);function de(){D(Q),ie?.removeEventListener(Q.type,de)}ie?.addEventListener(Q.type,de)}),te=lt(Q=>{ee()!=="sloppy"||!M.current||xi(Q,n.select("floatingElement"))||xi(Q,n.select("domReferenceElement"))||(M.current.dismissOnTouchEnd&&oe(Q),P.clear(),M.current=null)}),re=lt(Q=>{const ie=Ei(Q);function de(){te(Q),ie?.removeEventListener(Q.type,de)}ie?.addEventListener(Q.type,de)});k.useEffect(()=>{if(!r||!d)return;u.current.__escapeKeyBubbles=E,u.current.__outsidePressBubbles=O;const Q=new Yu;function ie($e){n.setOpen(!1,kn(Ju,$e))}function de(){Q.clear(),U.current=!0}function _e(){Q.start(u0()?5:0,()=>{U.current=!1})}const Te=so(o);Te.addEventListener("pointerdown",J,!0),h&&(Te.addEventListener("keydown",Z),Te.addEventListener("compositionstart",de),Te.addEventListener("compositionend",_e)),S&&(Te.addEventListener("click",V,!0),Te.addEventListener("pointerdown",V,!0),Te.addEventListener("touchstart",q,!0),Te.addEventListener("touchmove",B,!0),Te.addEventListener("touchend",re,!0),Te.addEventListener("mousedown",V,!0));let xe=[];return _&&(Gn(l)&&(xe=Ma(l)),Gn(o)&&(xe=xe.concat(Ma(o))),!Gn(s)&&s&&s.contextElement&&(xe=xe.concat(Ma(s.contextElement)))),xe=xe.filter($e=>$e!==Te.defaultView?.visualViewport),xe.forEach($e=>{$e.addEventListener("scroll",ie,{passive:!0})}),()=>{Te.removeEventListener("pointerdown",J,!0),h&&(Te.removeEventListener("keydown",Z),Te.removeEventListener("compositionstart",de),Te.removeEventListener("compositionend",_e)),S&&(Te.removeEventListener("click",V,!0),Te.removeEventListener("pointerdown",V,!0),Te.removeEventListener("touchstart",q,!0),Te.removeEventListener("touchmove",B,!0),Te.removeEventListener("touchend",re,!0),Te.removeEventListener("mousedown",V,!0)),xe.forEach($e=>{$e.removeEventListener("scroll",ie)}),Q.clear()}},[u,o,s,l,h,S,r,c,_,d,E,O,Z,oe,V,ne,q,B,re,J,n]),k.useEffect(z,[S,z]);const ae=k.useMemo(()=>({onKeyDown:Z,...b&&{[nbe[y]]:Q=>{n.setOpen(!1,kn(Kd,Q.nativeEvent))},...y!=="intentional"&&{onClick(Q){n.setOpen(!1,kn(Kd,Q.nativeEvent))}}}}),[Z,n,b,y]),ge=lt(Q=>{const ie=Ei(Q.nativeEvent);!Hn(n.select("floatingElement"),ie)||Q.button!==0||(T.current=!0)}),ke=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:ae,floating:ke,trigger:ae}:{},[d,ae,ke])}const ibe={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 sbe extends J0e{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:tve(),nested:n,noEmit:r,triggerElements:s},ibe)}setOpen=(t,n)=>{if((!t||!this.state.open||C6(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 o2(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=Fi.request(()=>{o("ending")});return()=>{Fi.cancel(c)}}},[e,s,r,n]),rt(()=>{if(!e||t)return;const c=Fi.request(()=>{o(void 0)});return()=>{Fi.cancel(c)}},[t,e]),rt(()=>{if(!e||!t)return;e&&s&&r!=="idle"&&o("starting");const c=Fi.request(()=>{o("idle")});return()=>{Fi.cancel(c)}},[t,e,s,o,r]),k.useMemo(()=>({mounted:s,setMounted:l,transitionStatus:r}),[s,r])}function abe(e,t=!1,n=!0){const r=M0();return lt((o,s=null)=>{r.cancel();const l=Ul(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||$s.flushSync(o)}).catch(()=>{if(n){if(s!=null&&s.aborted)return;$s.flushSync(o)}else l.getAnimations().length>0&&l.getAnimations().some(u=>u.pending||u.playState!=="finished")&&c()})}t?r.request(c):c()}))})}function N0(e){const{enabled:t=!0,open:n,ref:r,onComplete:o}=e,s=Br(n),l=lt(o),c=abe(r,n);k.useEffect(()=>{t&&c(()=>{n===s.current&&l()})},[t,n,l,c,s])}class lbe{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 iz(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,o=WE(),s=G6()!=null,l=Yi(()=>new sbe({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:r.triggers??new lbe,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 cbe(e={}){const{nodeId:t,externalTree:n}=e,r=iz(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=j0(n);rt(()=>{s.domReference&&(u.current=s.domReference)},[s.domReference]);const h=Wve({...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 x=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]),w=k.useCallback(O=>{_(O),h.refs.setFloating(O)},[h.refs]),v=k.useMemo(()=>({...h.refs,setReference:x,setFloating:w,setPositionReference:p,domReference:u}),[h.refs,x,w,p]),C=k.useMemo(()=>({...h.elements,domReference:s.domReference}),[h.elements,s.domReference]),S=o.useState("open"),T=o.useState("floatingId"),E=k.useMemo(()=>({...h,dataRef:o.context.dataRef,open:S,onOpenChange:o.setOpen,events:o.context.events,floatingId:T,refs:v,elements:C,nodeId:t,rootStore:o}),[h,v,C,t,o,S,T]);return rt(()=>{o.context.dataRef.current.floatingContext=E;const O=d?.nodesRef.current.find(M=>M.id===t);O&&(O.context=E)}),k.useMemo(()=>({...h,context:E,refs:v,elements:C,rootStore:o}),[h,v,C,E,o])}function ube(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[sx]="");for(const l in e)o&&e&&(l===S6||l===w6)||(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&&rj(s,c,o,r)}return rj(s,e,o,r),s}function rj(e,t,n,r){for(const o in t){const s=t[o];n&&(o===S6||o===w6)||(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 fbe="Escape";function D0(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Tg(e,t){return D0(t,e===XE||e===Jh,e===$a||e===Ia)}function TS(e,t,n){return D0(t,e===Jh,n?e===$a:e===Ia)||e==="Enter"||e===" "||e===""}function dbe(e,t,n){return D0(t,n?e===$a:e===Ia,e===Jh)}function hbe(e,t,n,r){const o=n?e===Ia:e===$a,s=e===XE;return t==="both"||t==="horizontal"&&r&&r>1?e===fbe:D0(t,o,s)}function pbe(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:x=!1,focusItemOnOpen:w="auto",focusItemOnHover:v=!0,openOnArrowKeyDown:C=!0,disabledIndices:S=void 0,orientation:T="vertical",parentOrientation:E,cols:O=1,scrollItemIntoView:M=!0,itemSizes:P,dense:I=!1,id:z,resetOnPointerLeave:U=!0,externalTree:G}=t,J=Ry(o),ee=Br(J),Z=G6(),H=j0(G);rt(()=>{l.current.orientation=T},[l,T]);const Y=ax(s),oe=k.useRef(w),ne=k.useRef(p??-1),$=k.useRef(null),q=k.useRef(!0),V=lt(ze=>{d(ne.current===-1?null:ne.current,ze)}),D=k.useRef(V),B=k.useRef(!!o),te=k.useRef(r),re=k.useRef(!1),ae=k.useRef(!1),ge=Br(S),ke=Br(r),Q=Br(M),ie=Br(p),de=Br(U),_e=lt(()=>{function ze(Ce){x?H?.events.emit("virtualfocus",Ce):Wg(Ce,{sync:re.current,preventScroll:!0})}const Le=c.current[ne.current],Ue=ae.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&&xe&&(Ue||!q.current)&&Ce.scrollIntoView?.(typeof pe=="boolean"?{block:"nearest",inline:"nearest"}:pe)})});rt(()=>{h&&(r&&o?(ne.current=p??-1,oe.current&&p!=null&&(ae.current=!0,V())):B.current&&(ne.current=-1,D.current()))},[h,r,o,p,V]),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||TS($.current,T,_)||y?Zg(c):ux(c),$.current=null,V())};Le()}}else Au(c,u)||(ne.current=u,_e(),ae.current=!1)}},[h,r,o,u,ie,y,c,T,_,V,_e,ge]),rt(()=>{if(!h||o||!H||x||!B.current)return;const ze=H.nodesRef.current,Le=ze.find(Ce=>Ce.id===Z)?.context?.elements.floating,Ue=As(so(o)),dt=ze.some(Ce=>Ce.context&&Hn(Ce.context.elements.floating,Ue));Le&&!dt&&q.current&&Le.focus({preventScroll:!0})},[h,o,H,Z,x]),rt(()=>{D.current=V,te.current=r,B.current=!!o}),rt(()=>{r||($.current=null,oe.current=w)},[r,w]);const Te=u!=null,xe=k.useMemo(()=>{function ze(Ue){if(!ke.current)return;const dt=c.current.indexOf(Ue.currentTarget);dt!==-1&&ne.current!==dt&&(ne.current=dt,V(Ue))}return{onFocus(Ue){re.current=!0,ze(Ue)},onClick:({currentTarget:Ue})=>Ue.focus({preventScroll:!0}),onMouseMove(Ue){re.current=!0,ae.current=!1,v&&ze(Ue)},onPointerLeave(Ue){if(!ke.current||!q.current||Ue.pointerType==="touch")return;re.current=!0;const dt=Ue.relatedTarget;!v||c.current.includes(dt)||de.current&&(ne.current=-1,V(Ue),x||ee.current?.focus({preventScroll:!0}))}}},[ke,ee,v,c,V,de,x]),$e=k.useCallback(()=>E??H?.nodesRef.current.find(ze=>ze.id===Z)?.context?.dataRef?.current.orientation,[Z,H,E]),Ze=lt(ze=>{if(q.current=!1,re.current=!0,ze.which===229||!ke.current&&ze.currentTarget===ee.current)return;if(y&&hbe(ze.key,T,_,O)){Tg(ze.key,$e())||Yr(ze),n.setOpen(!1,kn(yS,ze.nativeEvent)),or(s)&&(x?H?.events.emit("virtualfocus",s):s.focus());return}const Le=ne.current,Ue=Zg(c,S),dt=ux(c,S);if(Y||(ze.key==="Home"&&(Yr(ze),ne.current=Ue,V(ze)),ze.key==="End"&&(Yr(ze),ne.current=dt,V(ze))),O>1){const Ce=P||Array.from({length:c.current.length},()=>({width:1,height:1})),pe=O6(Ce,O,I),Ne=pe.findIndex(yt=>yt!=null&&!za(c,yt,S)),He=pe.reduce((yt,bt,pt)=>bt!=null&&!za(c,bt,S)?pt:yt,-1),it=pe[R6({current:pe.map(yt=>yt!=null?c.current[yt]:null)},{event:ze,orientation:T,loopFocus:b,rtl:_,cols:O,disabledIndices:k6([...(typeof S!="function"?S:null)||c.current.map((yt,bt)=>za(c,bt,S)?bt:void 0),void 0],pe),minIndex:Ne,maxIndex:He,prevIndex:A6(ne.current>dt?Ue:ne.current,Ce,pe,O,ze.key===Jh?"bl":ze.key===(_?$a:Ia)?"tr":"tl"),stopEvent:!0})];if(it!=null&&(ne.current=it,V(ze)),T==="both")return}if(Tg(ze.key,T)){if(Yr(ze),r&&!x&&As(ze.currentTarget.ownerDocument)===ze.currentTarget){ne.current=TS(ze.key,T,_)?Ue:dt,V(ze);return}TS(ze.key,T,_)?b?Le>=dt?g&&Le!==c.current.length?ne.current=-1:(re.current=!1,ne.current=Ue):ne.current=Ur(c,{startingIndex:Le,disabledIndices:S}):ne.current=Math.min(dt,Ur(c,{startingIndex:Le,disabledIndices:S})):b?Le<=Ue?g&&Le!==-1?ne.current=c.current.length:(re.current=!1,ne.current=dt):ne.current=Ur(c,{startingIndex:Le,decrement:!0,disabledIndices:S}):ne.current=Math.max(Ue,Ur(c,{startingIndex:Le,decrement:!0,disabledIndices:S})),Au(c,ne.current)&&(ne.current=-1),V(ze)}}),ye=k.useMemo(()=>x&&r&&Te&&{"aria-activedescendant":`${z}-${u}`},[x,r,Te,z,u]),Fe=k.useMemo(()=>({"aria-orientation":T==="both"?void 0:T,...Y?{}:ye,onKeyDown(ze){if(ze.key==="Tab"&&ze.shiftKey&&r&&!x){const Le=Ei(ze.nativeEvent);if(Le&&!Hn(ee.current,Le))return;Yr(ze),n.setOpen(!1,kn(k0,ze.nativeEvent)),or(s)&&s.focus();return}Ze(ze)},onPointerMove(){q.current=!0}}),[ye,Ze,ee,T,Y,n,r,x,s]),Re=k.useMemo(()=>{function ze(Ue){w==="auto"&&_6(Ue.nativeEvent)&&(oe.current=!x)}function Le(Ue){oe.current=w,w==="auto"&&E6(Ue.nativeEvent)&&(oe.current=!0)}return{onKeyDown(Ue){const dt=n.select("open");q.current=!1;const Ce=Ue.key.startsWith("Arrow"),pe=dbe(Ue.key,$e(),_),Ne=Tg(Ue.key,T),He=(y?pe:Ne)||Ue.key==="Enter"||Ue.key.trim()==="";if(x&&dt)return Ze(Ue);if(!(!dt&&!C&&Ce)){if(He){const it=Tg(Ue.key,$e());$.current=y&&it?null:Ue.key}if(y){pe&&(Yr(Ue),dt?(ne.current=Zg(c,ge.current),V(Ue)):n.setOpen(!0,kn(yS,Ue.nativeEvent,Ue.currentTarget)));return}Ne&&(ie.current!=null&&(ne.current=ie.current),Yr(Ue),!dt&&C?n.setOpen(!0,kn(yS,Ue.nativeEvent,Ue.currentTarget)):Ze(Ue),dt&&V(Ue))}},onFocus(Ue){n.select("open")&&!x&&(ne.current=-1,V(Ue))},onPointerDown:Le,onPointerEnter:Le,onMouseDown:ze,onClick:ze}},[Ze,ge,w,c,y,V,n,C,T,$e,_,ie,x]),We=k.useMemo(()=>({...ye,...Re}),[ye,Re]);return k.useMemo(()=>h?{reference:We,floating:Fe,item:xe,trigger:Re}:{},[h,We,Fe,Re,xe])}function mbe(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=Vu,selectedIndex:b=null}=t,y=No(),_=k.useRef(""),x=k.useRef(b??l??-1),w=k.useRef(null);rt(()=>{r&&(y.clear(),w.current=null,_.current="")},[r,y]),rt(()=>{r&&_.current===""&&(x.current=b??l??-1)},[r,b,l]);const v=lt(E=>{E?o.current.typing||(o.current.typing=E,u?.(E)):o.current.typing&&(o.current.typing=E,u?.(E))}),C=lt(E=>{function O(U,G,J){const ee=h?h(G,J):G.find(Z=>Z?.toLocaleLowerCase().indexOf(J.toLocaleLowerCase())===0);return ee?U.indexOf(ee):-1}const M=s.current;if(_.current.length>0&&_.current[0]!==" "&&(O(M,M,_.current)===-1?v(!1):E.key===" "&&Yr(E)),M==null||g.includes(E.key)||E.key.length!==1||E.ctrlKey||E.metaKey||E.altKey)return;r&&E.key!==" "&&(Yr(E),v(!0)),M.every(U=>U?U[0]?.toLocaleLowerCase()!==U[1]?.toLocaleLowerCase():!0)&&_.current===E.key&&(_.current="",x.current=w.current),_.current+=E.key,y.start(p,()=>{_.current="",x.current=w.current,v(!1)});const I=x.current,z=O(M,[...M.slice((I||0)+1),...M.slice(0,(I||0)+1)],_.current);z!==-1?(c?.(z),w.current=z):E.key!==" "&&(_.current="",v(!1))}),S=k.useMemo(()=>({onKeyDown:C}),[C]),T=k.useMemo(()=>({onKeyDown:C,onKeyUp(E){E.key===" "&&v(!1)}}),[C,v]);return k.useMemo(()=>d?{reference:S,floating:T}:{},[d,S,T])}const sz=k.createContext(null),az=k.createContext(null);function ls(){const e=k.useContext(sz);if(e===null)throw new Error(is(60));return e}function lz(){const e=k.useContext(az);if(e===null)throw new Error(is(61));return e}const gbe=(e,t)=>Object.is(e,t);function ef(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function RS(e,t,n){return!e||e.length===0?!1:e.some(r=>r===void 0?!1:ef(r,t,n))}function hx(e,t,n){return!e||e.length===0?-1:e.findIndex(r=>r===void 0?!1:ef(r,t,n))}function ybe(e,t,n){return e.filter(r=>!ef(r,t,n))}function px(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function vbe(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function Pd(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 px(e)}function fu(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?px(e.value):px(e)}function bbe(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]??Pd(e,n);if(Array.isArray(t)){const r=vbe(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:Pd(e,n)}if(typeof e!="object"){const o=r.find(s=>s&&s.value===e);return o&&o.label!=null?o.label:Pd(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 Pd(e,n)}function Sbe(e,t){return!Array.isArray(e)||e.length===0?"":e.map(n=>Pd(n,t)).join(", ")}const gt={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=>ef(s,n,r)):e.selectedIndex===t&&e.selectedIndex!==null?!0:ef(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 wbe(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 xbe(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 _be(e){const[t,n]=k.useState(null),r=lt((c,u)=>{e||n(u)}),o=k.useCallback(()=>{n(null)},[]),{onClick:s,onPointerDown:l}=xbe(r);return k.useMemo(()=>({openMethod:t,reset:o,triggerProps:{onClick:s,onPointerDown:l}}),[t,o,s,l])}function Ebe(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:x,multiple:w=!1,itemToStringLabel:v,itemToStringValue:C,isItemEqualToValue:S=gbe,highlightItemOnHover:T=!0,children:E}=e,{clearErrors:O}=m6(),{setDirty:M,shouldValidateOnChange:P,validityData:I,setFilled:z,name:U,disabled:G,validation:J}=yh(),{controlId:ee}=O0(),Z=U6({id:t}),H=G||d,Y=U??u,[oe,ne]=Ny({controlled:n,default:w?r??Vu:r,name:"Select",state:"value"}),[$,q]=Ny({controlled:s,default:l,name:"Select",state:"open"}),V=k.useRef([]),D=k.useRef([]),B=k.useRef(null),te=k.useRef(null),re=k.useRef(0),ae=k.useRef(null),ge=k.useRef([]),ke=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:xe,transitionStatus:$e}=o2($),{openMethod:Ze,triggerProps:ye,reset:Fe}=_be($),Re=Yi(()=>new ku({id:Z,modal:g,multiple:w,itemToStringLabel:v,itemToStringValue:C,isItemEqualToValue:S,value:oe,open:$,mounted:Te,transitionStatus:$e,items:x,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,We=wt(Re,gt.activeIndex),ze=wt(Re,gt.selectedIndex),Le=wt(Re,gt.triggerElement),Ue=wt(Re,gt.positionerElement),dt=k.useMemo(()=>w&&Array.isArray(oe)&&oe.length===0?"":fu(oe,C),[w,oe,C]),Ce=k.useMemo(()=>w&&Array.isArray(oe)?oe.map(ft=>fu(ft,C)):fu(oe,C),[w,oe,C]),pe=Br(Re.state.triggerElement);V6({id:Z,commit:J.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(()=>{z(oe!==null)},[oe,z]),rt(function(){if($)return;const Wt=ge.current;if(w){const pn=Array.isArray(oe)?oe:[];if(pn.length===0){Re.set("selectedIndex",null);return}const Vn=pn[pn.length-1],sn=hx(Wt,Vn,S);Re.set("selectedIndex",sn===-1?null:sn);return}const En=hx(Wt,oe,S);Re.set("selectedIndex",En===-1?null:En)},[w,$,oe,ge,S,Re]),wbe(oe,()=>{O(Y),M(oe!==I.initialValue),P()?J.commit(oe):J.commit(oe,!0)});const He=lt((ft,Wt)=>{if(c?.(ft,Wt),!Wt.isCanceled&&(q(ft),!ft&&Re.state.activeIndex!==null)){const En=V.current[Re.state.activeIndex];queueMicrotask(()=>{En?.setAttribute("tabindex","-1")})}}),it=lt(()=>{xe(!1),Re.set("activeIndex",null),Fe(),_?.(!1)});N0({enabled:!b,open:$,ref:B,onComplete(){$||it()}}),k.useImperativeHandle(b,()=>({unmount:it}),[it]);const yt=lt((ft,Wt)=>{o?.(ft,Wt),!Wt.isCanceled&&ne(ft)}),bt=lt(()=>{const ft=Re.state.listElement||B.current;if(!ft)return;const Wt=ft.scrollTop,En=ft.scrollTop+ft.clientHeight,pn=Wt>1,Vn=En<ft.scrollHeight-1;Re.state.scrollUpArrowVisible!==pn&&Re.set("scrollUpArrowVisible",pn),Re.state.scrollDownArrowVisible!==Vn&&Re.set("scrollDownArrowVisible",Vn)}),pt=iz({open:$,onOpenChange:He,elements:{reference:Le,floating:Ue}}),on=mve(pt,{enabled:!h&&!H,event:"mousedown"}),Ut=obe(pt,{bubbles:!1}),Et=pbe(pt,{enabled:!h&&!H,listRef:V,activeIndex:We,selectedIndex:ze,disabledIndices:Vu,onNavigate(ft){ft===null&&!$||Re.set("activeIndex",ft)},focusItemOnHover:!1}),Zt=mbe(pt,{enabled:!h&&!H&&($||!w),listRef:D,activeIndex:We,selectedIndex:ze,onMatch(ft){$?Re.set("activeIndex",ft):yt(ge.current[ft],kn("none"))},onTypingChange(ft){ke.current=ft}}),{getReferenceProps:Pt,getFloatingProps:Vt,getItemProps:ln}=ube([on,Ut,Et,Zt]),bn=k.useMemo(()=>d0(Pt(),ye),[Pt,ye]);R0e(()=>{Re.update({popupProps:Vt(),triggerProps:bn})}),rt(()=>{Re.update({id:Z,modal:g,multiple:w,value:oe,open:$,mounted:Te,transitionStatus:$e,popupProps:Vt(),triggerProps:bn,items:x,itemToStringLabel:v,itemToStringValue:C,isItemEqualToValue:S,openMethod:Ze})},[Re,Z,g,w,oe,$,Te,$e,Vt,bn,x,v,C,S,Ze]);const Ht=k.useMemo(()=>({store:Re,name:Y,required:p,disabled:H,readOnly:h,multiple:w,itemToStringLabel:v,itemToStringValue:C,highlightItemOnHover:T,setValue:yt,setOpen:He,listRef:V,popupRef:B,scrollHandlerRef:te,handleScrollArrowVisibility:bt,scrollArrowsMountedCountRef:re,getItemProps:ln,events:pt.context.events,valueRef:ae,valuesRef:ge,labelsRef:D,typingRef:ke,selectionRef:de,selectedItemTextRef:ie,validation:J,onOpenChangeComplete:_,keyboardActiveRef:Q,alignItemWithTriggerActiveRef:_e,initialValueRef:Ne}),[Re,Y,p,H,h,w,v,C,T,yt,He,ln,pt.context.events,J,_,bt]),vt=qa(y,J.inputRef),Nt=w&&Array.isArray(oe)&&oe.length>0,jn=k.useMemo(()=>!w||!Array.isArray(oe)||!Y?null:oe.map(ft=>{const Wt=fu(ft,C);return j.jsx("input",{type:"hidden",name:Y,value:Wt},Wt)}),[w,oe,Y,C]);return j.jsx(sz.Provider,{value:Ht,children:j.jsxs(az.Provider,{value:pt,children:[E,j.jsx("input",{...J.getInputValidationProps({onFocus(){Re.state.triggerElement?.focus()},onChange(ft){if(ft.nativeEvent.defaultPrevented)return;const Wt=ft.target.value,En=kn(Ju,ft.nativeEvent);function pn(){if(w)return;const Vn=ge.current.find(sn=>fu(sn,C).toLowerCase()===Wt.toLowerCase());Vn!=null&&(M(Vn!==I.initialValue),yt(Vn,En),P()&&J.commit(Vn))}Re.set("forceMount",!0),queueMicrotask(pn)}}),id:t||ee||void 0,name:w?void 0:Y,value:dt,disabled:H,required:p&&!Nt,readOnly:h,ref:vt,style:t2,tabIndex:-1,"aria-hidden":!0}),jn]})})}let Ly=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const Cbe={[Ly.startingStyle]:""},Tbe={[Ly.endingStyle]:""},cz={transitionStatus(e){return e==="starting"?Cbe:e==="ending"?Tbe:null}};let i2=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Ly.startingStyle]="startingStyle",e[e.endingStyle=Ly.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e})({}),mx=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const Rbe={[mx.popupOpen]:""},Obe={[mx.popupOpen]:"",[mx.pressed]:""},Abe={[i2.open]:""},kbe={[i2.closed]:""},Mbe={[i2.anchorHidden]:""},jbe={open(e){return e?Rbe:null}},Pbe={open(e){return e?Obe:null}},uz={open(e){return e?Abe:kbe},anchorHidden(e){return e?Mbe:null}};function Nbe(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,Dbe={...Pbe,...p6,value:()=>null},$be=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}=yh(),{labelId:b}=O0(),{store:y,setOpen:_,selectionRef:x,validation:w,readOnly:v,alignItemWithTriggerActiveRef:C,disabled:S,keyboardActiveRef:T}=ls(),E=g||S||s,O=wt(y,gt.open),M=wt(y,gt.value),P=wt(y,gt.triggerProps),I=wt(y,gt.positionerElement),z=wt(y,gt.listElement),U=wt(y,gt.serializedValue),G=Br(I),J=k.useRef(null),ee=No(),Z=No(),{getButtonProps:H,buttonRef:Y}=h0({disabled:E,native:l}),oe=lt(te=>{y.set("triggerElement",te)}),ne=qa(n,J,Y,oe),$=No(),q=No();k.useEffect(()=>{if(O)return q.start(200,()=>{x.current.allowUnselectedMouseUp=!0,$.start(200,()=>{x.current.allowSelectedMouseUp=!0})}),()=>{$.clear(),q.clear()};x.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},Z.clear()},[O,x,Z,$,q]);const V=k.useMemo(()=>z?.id??Ry(I)?.id,[z,I]),D=d0(P,{role:"combobox","aria-expanded":O?"true":"false","aria-haspopup":"listbox","aria-controls":O?V:void 0,"aria-labelledby":b,"aria-readonly":v||void 0,tabIndex:E?-1:0,ref:ne,onFocus(te){d(!0),O&&C.current&&_(!1,kn(k0,te.nativeEvent)),ee.start(0,()=>{y.set("forceMount",!0)})},onBlur(){u(!0),d(!1),h==="onBlur"&&w.commit(M)},onPointerMove(){T.current=!1},onKeyDown(){T.current=!0},onMouseDown(te){if(O)return;const re=Ji(te.currentTarget);function ae(ge){if(!J.current)return;const ke=ge.target;if(Hn(J.current,ke)||Hn(G.current,ke)||ke===J.current)return;const Q=Nbe(J.current);ge.clientX>=Q.left-Rg&&ge.clientX<=Q.right+Rg&&ge.clientY>=Q.top-Rg&&ge.clientY<=Q.bottom+Rg||_(!1,kn(x0e,ge))}Z.start(0,()=>{re.addEventListener("mouseup",ae,{once:!0})})}},w.getValidationProps,c,H);D.role="combobox";const B=k.useMemo(()=>({...p,open:O,disabled:E,value:M,readOnly:v,placeholder:!U}),[p,O,E,M,v,U]);return jr("button",t,{ref:[n,J],state:B,stateAttributesMapping:Dbe,props:D})}),Ibe={value:()=>null},zbe=k.forwardRef(function(t,n){const{className:r,render:o,children:s,...l}=t,{store:c,valueRef:u}=ls(),d=wt(c,gt.value),h=wt(c,gt.items),p=wt(c,gt.itemToStringLabel),g=wt(c,gt.serializedValue),b=k.useMemo(()=>({value:d,placeholder:!g}),[d,g]),y=typeof s=="function"?s(d):s??(Array.isArray(d)?Sbe(d,p):bbe(d,h,p));return jr("span",t,{state:b,ref:[n,u],props:[{children:y},l],stateAttributesMapping:Ibe})}),Lbe=k.forwardRef(function(t,n){const{className:r,render:o,...s}=t,{store:l}=ls(),c=wt(l,gt.open),u=k.useMemo(()=>({open:c}),[c]);return jr("span",t,{state:u,ref:n,props:[{"aria-hidden":!0,children:"▼"},s],stateAttributesMapping:jbe})}),Fbe=k.createContext(void 0),Ube=k.forwardRef(function(t,n){const{store:r}=ls(),o=wt(r,gt.mounted),s=wt(r,gt.forceMount);return o||s?j.jsx(Fbe.Provider,{value:!0,children:j.jsx(cve,{ref:n,...t})}):null});function Vbe(e){return $_(19)?e:e?"true":void 0}let oj={},ij={},sj="";function qbe(e){if(typeof document>"u")return!1;const t=Ji(e);return Or(t).innerWidth-t.documentElement.clientWidth>0}function Bbe(e){const t=Ji(e),n=t.documentElement,r=t.body,o=hc(n)?n:r,s=o.style.overflow;return o.style.overflow="hidden",()=>{o.style.overflow=s}}function Hbe(e){const t=Ji(e),n=t.documentElement,r=t.body,o=Or(n);let s=0,l=0;const c=Fi.create(),u=typeof CSS<"u"&&CSS.supports?.("scrollbar-gutter","stable");if(b6&&(o.visualViewport?.scale??1)!==1)return()=>{};function d(){const g=o.getComputedStyle(n),b=o.getComputedStyle(r),x=(g.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";s=n.scrollTop,l=n.scrollLeft,oj={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},sj=n.style.scrollBehavior,ij={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 w=n.scrollHeight>n.clientHeight,v=n.scrollWidth>n.clientWidth,C=g.overflowY==="scroll"||b.overflowY==="scroll",S=g.overflowX==="scroll"||b.overflowX==="scroll",T=Math.max(0,o.innerWidth-n.clientWidth),E=Math.max(0,o.innerHeight-n.clientHeight),O=parseFloat(b.marginTop)+parseFloat(b.marginBottom),M=parseFloat(b.marginLeft)+parseFloat(b.marginRight),P=hc(n)?n:r;if(u){n.style.scrollbarGutter=x,P.style.overflowY="hidden",P.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:x,overflowY:"hidden",overflowX:"hidden"}),(w||C)&&(n.style.overflowY="scroll"),(v||S)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:O||E?`calc(100dvh - ${O+E}px)`:"100dvh",width:M||T?`calc(100vw - ${M+T}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,oj),Object.assign(r.style,ij),u||(n.scrollTop=s,n.scrollLeft=l,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=sj)}function p(){h(),c.request(d)}return d(),o.addEventListener("resize",p),()=>{c.cancel(),h(),typeof o.removeEventListener=="function"&&o.removeEventListener("resize",p)}}class Kbe{lockCount=0;restore=null;timeoutLock=Yu.create();timeoutUnlock=Yu.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=Ji(t).documentElement,o=Or(r).getComputedStyle(r).overflowY;if(o==="hidden"||o==="clip"){this.restore=jo;return}const s=zye||!qbe(t);this.restore=s?Bbe(t):Hbe(t)}}const Gbe=new Kbe;function Zbe(e=!0,t=null){rt(()=>{if(e)return Gbe.acquire(t)},[e,t])}const fz=k.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function Wbe(){return k.useContext(fz)}function s2(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:o}=e,s=lt(o),l=k.useRef(0),c=Yi(Xbe).current,u=Yi(Ybe).current,[d,h]=k.useState(0),p=k.useRef(d),g=lt((w,v)=>{u.set(w,v??null),p.current+=1,h(p.current)}),b=lt(w=>{u.delete(w),p.current+=1,h(p.current)}),y=k.useMemo(()=>{const w=new Map;return Array.from(u.keys()).filter(C=>C.isConnected).sort(Qbe).forEach((C,S)=>{const T=u.get(C)??{};w.set(C,{...T,index:S})}),w},[u,d]);rt(()=>{if(typeof MutationObserver!="function"||y.size===0)return;const w=new MutationObserver(v=>{const C=new Set,S=T=>C.has(T)?C.delete(T):C.add(T);v.forEach(T=>{T.removedNodes.forEach(S),T.addedNodes.forEach(S)}),C.size===0&&(p.current+=1,h(p.current))});return y.forEach((v,C)=>{C.parentElement&&w.observe(C.parentElement,{childList:!0})}),()=>{w.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(w=>(c.add(w),()=>{c.delete(w)}));rt(()=>{c.forEach(w=>w(y))},[c,y]);const x=k.useMemo(()=>({register:g,unregister:b,subscribeMapChange:_,elementsRef:n,labelsRef:r,nextIndexRef:l}),[g,b,_,n,r,l]);return j.jsx(fz.Provider,{value:x,children:t})}function Ybe(){return new Map}function Xbe(){return new Set}function Qbe(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 Jbe=k.createContext(void 0);function a2(){return k.useContext(Jbe)?.direction??"ltr"}const e1e=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"}=Is(e,t)||{};if(d==null)return{};const g=T6(h),b={x:n,y:r},y=e2(o),_=JE(y),x=await l.getDimensions(d),w=y==="y",v=w?"top":"left",C=w?"bottom":"right",S=w?"clientHeight":"clientWidth",T=s.reference[_]+s.reference[y]-b[y]-s.floating[_],E=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=T/2-E/2,I=M/2-x[_]/2-1,z=Math.min(g[v],I),U=Math.min(g[C],I),G=z,J=M-x[_]-U,ee=M/2-x[_]/2+P,Z=lx(G,ee,J),H=!u.arrow&&rl(o)!=null&&ee!==Z&&s.reference[_]/2-(ee<G?z:U)-x[_]/2<0,Y=H?ee<G?ee-G:ee-J:0;return{[y]:b[y]+Y,data:{[y]:Z,centerOffset:ee-Z-Y,...H&&{alignmentOffset:Y}},reset:H}}}),t1e=(e,t)=>({...e1e(e),options:[e,t]}),n1e={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 tbe().fn(e)).data?.referenceHidden||s}}}},r1e={sideX:"left",sideY:"top"};function dz(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 aj(e,t,n){const{rects:r,placement:o}=e;return{side:dz(t,Io(o),n),align:rl(o)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function o1e(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:x=!1,nodeId:w,adaptiveOrigin:v,lazyFlip:C=!1,externalTree:S}=e,[T,E]=k.useState(null);!y&&T!==null&&E(null);const O=_.side||"flip",M=_.align||"flip",P=_.fallbackAxisSide||"end",I=typeof t=="function"?t:void 0,z=lt(I),U=I?z:t,G=Br(t),ee=a2()==="rtl",Z=T||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":ee?"left":"right","inline-start":ee?"right":"left"}[r],H=s==="center"?Z:`${Z}-${s}`;let Y=u;const oe=1,ne=r==="bottom"?oe:0,$=r==="top"?oe:0,q=r==="right"?oe:0,V=r==="left"?oe:0;typeof Y=="number"?Y={top:Y+ne,right:Y+V,bottom:Y+$,left:Y+q}:Y&&(Y={top:(Y.top||0)+ne,right:(Y.right||0)+V,bottom:(Y.bottom||0)+$,left:(Y.left||0)+q});const D={boundary:c==="clipping-ancestors"?"clippingAncestors":c,padding:Y},B=k.useRef(null),te=Br(o),re=Br(l),ke=[Yve(Et=>{const Zt=aj(Et,r,ee),Pt=typeof te.current=="function"?te.current(Zt):te.current,Vt=typeof re.current=="function"?re.current(Zt):re.current;return{mainAxis:Pt,crossAxis:Vt,alignmentAxis:Vt}},[typeof o!="function"?o:0,typeof l!="function"?l:0,ee,r])],Q=M==="none"&&O!=="shift",ie=!Q&&(d||x||O==="shift"),de=O==="none"?null:Jve({...D,padding:{top:Y.top+oe,right:Y.right+oe,bottom:Y.bottom+oe,left:Y.left+oe},mainAxis:!x&&O==="flip",crossAxis:M==="flip"?"alignment":!1,fallbackAxisSideDirection:P}),_e=Q?null:Xve(Et=>{const Zt=Ji(Et.elements.floating).documentElement;return{...D,rootBoundary:x?{x:0,y:0,width:Zt.clientWidth,height:Zt.clientHeight}:void 0,mainAxis:M!=="none",crossAxis:ie,limiter:d||x?void 0:Qve(Pt=>{if(!B.current)return{};const{width:Vt,height:ln}=B.current.getBoundingClientRect(),bn=ni(Io(Pt.placement)),Ht=bn==="y"?Vt:ln,vt=bn==="y"?Y.left+Y.right:Y.top+Y.bottom;return{offset:Ht/2+vt/2}})}},[D,d,x,Y,M]);O==="shift"||M==="shift"||s==="center"?ke.push(_e,de):ke.push(de,_e),ke.push(ebe({...D,apply({elements:{floating:Et},rects:{reference:Zt},availableWidth:Pt,availableHeight:Vt}){Object.entries({"--available-width":`${Pt}px`,"--available-height":`${Vt}px`,"--anchor-width":`${Zt.width}px`,"--anchor-height":`${Zt.height}px`}).forEach(([ln,bn])=>{Et.style.setProperty(ln,bn)})}}),t1e(()=>({element:B.current||document.createElement("div"),padding:h,offsetParent:"floating"}),[h]),{name:"transformOrigin",fn(Et){const{elements:Zt,middlewareData:Pt,placement:Vt,rects:ln,y:bn}=Et,Ht=Io(Vt),vt=ni(Ht),Nt=B.current,jn=Pt.arrow?.x||0,ft=Pt.arrow?.y||0,Wt=Nt?.clientWidth||0,En=Nt?.clientHeight||0,pn=jn+Wt/2,Vn=ft+En/2,sn=Math.abs(Pt.shift?.y||0),ur=ln.reference.height/2,qn=typeof o=="function"?o(aj(Et,r,ee)):o,Yt=sn>qn,sr={top:`${pn}px calc(100% + ${qn}px)`,bottom:`${pn}px ${-qn}px`,left:`calc(100% + ${qn}px) ${Vn}px`,right:`${-qn}px ${Vn}px`}[Ht],Jr=`${pn}px ${ln.reference.y+ur-bn}px`;return Zt.floating.style.setProperty("--transform-origin",ie&&vt==="y"&&Yt?Jr:sr),{}}},n1e,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:xe,elements:$e,x:Ze,y:ye,middlewareData:Fe,update:Re,placement:We,context:ze,isPositioned:Le,floatingStyles:Ue}=cbe({rootContext:b,placement:H,middleware:ke,strategy:n,whileElementsMounted:g?void 0:(...Et)=>tj(...Et,Te),nodeId:w,externalTree:S}),{sideX:dt,sideY:Ce}=Fe.adaptiveOrigin||r1e,pe=Le?n:"fixed",Ne=k.useMemo(()=>v?{position:pe,[dt]:Ze,[Ce]:ye}:{position:pe,...Ue},[v,pe,dt,Ze,Ce,ye,Ue]),He=k.useRef(null);rt(()=>{if(!y)return;const Et=G.current,Zt=typeof Et=="function"?Et():Et,Vt=(lj(Zt)?Zt.current:Zt)||null||null;Vt!==He.current&&(xe.setPositionReference(Vt),He.current=Vt)},[y,xe,U,G]),k.useEffect(()=>{if(!y)return;const Et=G.current;typeof Et!="function"&&lj(Et)&&Et.current!==He.current&&(xe.setPositionReference(Et.current),He.current=Et.current)},[y,xe,U,G]),k.useEffect(()=>{if(g&&y&&$e.domReference&&$e.floating)return tj($e.domReference,$e.floating,Re,Te)},[g,y,$e,Re,Te]);const it=Io(We),yt=dz(r,it,ee),bt=rl(We)||"center",pt=!!Fe.hide?.referenceHidden;rt(()=>{C&&y&&Le&&E(it)},[C,y,Le,it]);const on=k.useMemo(()=>({position:"absolute",top:Fe.arrow?.y,left:Fe.arrow?.x}),[Fe.arrow]),Ut=Fe.arrow?.centerOffset!==0;return k.useMemo(()=>({positionerStyles:Ne,arrowStyles:on,arrowRef:B,arrowUncentered:Ut,side:yt,align:bt,physicalSide:it,anchorHidden:pt,refs:xe,context:ze,isPositioned:Le,update:Re}),[Ne,on,B,Ut,yt,bt,it,pt,xe,ze,Le,Re])}function lj(e){return e!=null&&"current"in e}const hz=k.createContext(void 0);function l2(){const e=k.useContext(hz);if(!e)throw new Error(is(59));return e}const i1e=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 Fy(e,t){e&&Object.assign(e.style,t)}const pz={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},s1e={position:"fixed"},a1e=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:x=!0,collisionAvoidance:w=hne,...v}=t,{store:C,listRef:S,labelsRef:T,alignItemWithTriggerActiveRef:E,selectedItemTextRef:O,valuesRef:M,initialValueRef:P,popupRef:I,setValue:z}=ls(),U=lz(),G=wt(C,gt.open),J=wt(C,gt.mounted),ee=wt(C,gt.modal),Z=wt(C,gt.value),H=wt(C,gt.openMethod),Y=wt(C,gt.positionerElement),oe=wt(C,gt.triggerElement),ne=wt(C,gt.isItemEqualToValue),$=k.useRef(null),q=k.useRef(null),[V,D]=k.useState(x),B=J&&V&&H!=="touch";!J&&V!==x&&D(x),rt(()=>{J||(gt.scrollUpArrowVisible(C.state)&&C.set("scrollUpArrowVisible",!1),gt.scrollDownArrowVisible(C.state)&&C.set("scrollDownArrowVisible",!1))},[C,J]),k.useImperativeHandle(E,()=>B),Zbe((B||ee)&&G&&H!=="touch",oe);const te=o1e({anchor:r,floatingRootContext:U,positionMethod:o,mounted:J,side:c,sideOffset:d,align:u,alignOffset:h,arrowPadding:b,collisionBoundary:p,collisionPadding:g,sticky:y,disableAnchorTracking:_??B,collisionAvoidance:w,keepMounted:!0}),re=B?"none":te.side,ae=B?s1e:te.positionerStyles,ge=k.useMemo(()=>{const xe={};return G||(xe.pointerEvents="none"),{role:"presentation",hidden:!J,style:{...ae,...xe}}},[G,J,ae]),ke=k.useMemo(()=>({open:G,side:re,align:te.align,anchorHidden:te.anchorHidden}),[G,re,te.align,te.anchorHidden]),Q=lt(xe=>{C.set("positionerElement",xe)}),ie=jr("div",t,{ref:[n,Q],state:ke,stateAttributesMapping:uz,props:[ge,v]}),de=k.useRef(0),_e=lt(xe=>{if(xe.size===0&&de.current===0||M.current.length===0)return;const $e=de.current;if(de.current=xe.size,xe.size===$e)return;const Ze=kn(Ju);if($e!==0&&!C.state.multiple&&Z!==null&&hx(M.current,Z,ne)===-1){const Fe=P.current,We=Fe!=null&&RS(M.current,Fe,ne)?Fe:null;z(We,Ze),We===null&&(C.set("selectedIndex",null),O.current=null)}if($e!==0&&C.state.multiple&&Array.isArray(Z)){const ye=Z.filter(Fe=>RS(M.current,Fe,ne));(ye.length!==Z.length||ye.some(Fe=>!RS(Z,Fe,ne)))&&(z(ye,Ze),ye.length===0&&(C.set("selectedIndex",null),O.current=null))}if(G&&B){C.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const ye={height:""};Fy(Y,ye),Fy(I.current,ye)}}),Te=k.useMemo(()=>({...te,side:re,alignItemWithTriggerActive:B,setControlledAlignItemWithTrigger:D,scrollUpArrowRef:$,scrollDownArrowRef:q}),[te,re,B,D]);return j.jsx(s2,{elementsRef:S,labelsRef:T,onMapChange:_e,children:j.jsxs(hz.Provider,{value:Te,children:[J&&ee&&j.jsx(i1e,{inert:Vbe(!G),cutout:oe}),ie]})})});function mz(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",gx={className:Og,element:j.jsx("style",{href:Og,precedence:"base-ui:low",children:`.${Og}{scrollbar-width:none}.${Og}::-webkit-scrollbar{display:none}`})},l1e=k.createContext(void 0);function c1e(e){return k.useContext(l1e)}const Pu="ArrowUp",Hl="ArrowDown",Sh="ArrowLeft",Nu="ArrowRight",tp="Home",np="End",gz=new Set([Sh,Nu]),u1e=new Set([Sh,Nu,tp,np]),yz=new Set([Pu,Hl]),f1e=new Set([Pu,Hl,tp,np]),vz=new Set([...gz,...yz]),d1e=new Set([...vz,tp,np]),h1e=new Set([Pu,Hl,Sh,Nu,tp,np]),p1e="Shift",m1e="Control",g1e="Alt",y1e="Meta",v1e=new Set([p1e,m1e,g1e,y1e]);function b1e(e){return or(e)&&e.tagName==="INPUT"}function cj(e){return!!(b1e(e)&&e.selectionStart!=null||or(e)&&e.tagName==="TEXTAREA")}function uj(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=fj(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=fj(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 fj(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 S1e(e){return e==="starting"?fne:Po}const w1e={...uz,...cz},x1e=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:x,align:w,alignItemWithTriggerActive:v,setControlledAlignItemWithTrigger:C,scrollDownArrowRef:S,scrollUpArrowRef:T}=l2(),E=c1e()!=null,O=lz(),M=No(),P=wt(l,gt.id),I=wt(l,gt.open),z=wt(l,gt.mounted),U=wt(l,gt.popupProps),G=wt(l,gt.transitionStatus),J=wt(l,gt.triggerElement),ee=wt(l,gt.positionerElement),Z=wt(l,gt.listElement),H=k.useRef(0),Y=k.useRef(!1),oe=k.useRef(0),ne=k.useRef(!1),$=k.useRef({}),q=M0(),V=lt(re=>{if(!ee||!c.current||!ne.current)return;if(Y.current||!v){y();return}const ae=ee.style.top==="0px",ge=ee.style.bottom==="0px",ke=ee.getBoundingClientRect().height,Q=Ji(ee),ie=getComputedStyle(ee),de=parseFloat(ie.marginTop),_e=parseFloat(ie.marginBottom),Te=Q.documentElement.clientHeight-de-_e,xe=re.scrollTop,$e=re.scrollHeight,Ze=re.clientHeight,ye=$e-Ze;let Fe=null,Re=null,We=!1;if(ae){const ze=ye-xe,Le=ke+ze,Ue=Math.min(Le,Te);Fe=Ue,Ue!==Te?Re=ye:We=!0}else if(ge){const ze=xe-0,Le=ke+ze,Ue=Math.min(Le,Te),dt=Le-Te;Fe=Ue,Ue!==Te?Re=0:(We=!0,xe<ye&&(Re=xe-(ze-dt)))}Fe!=null&&(ee.style.height=`${Fe}px`),Re!=null&&(re.scrollTop=Re),We&&(Y.current=!0),y()});k.useImperativeHandle(_,()=>V,[V]),N0({open:I,ref:c,onComplete(){I&&u?.(!0)}});const D=k.useMemo(()=>({open:I,transitionStatus:G,side:x,align:w}),[I,G,x,w]);rt(()=>{!ee||!c.current||Object.keys($.current).length||($.current={top:ee.style.top||"0",left:ee.style.left||"0",right:ee.style.right,height:ee.style.height,bottom:ee.style.bottom,minHeight:ee.style.minHeight,maxHeight:ee.style.maxHeight,marginTop:ee.style.marginTop,marginBottom:ee.style.marginBottom})},[c,ee]),rt(()=>{z||v||(ne.current=!1,Y.current=!1,H.current=0,oe.current=0,Fy(ee,$.current))},[z,v,ee,c]),rt(()=>{const re=c.current;if(!(!z||!J||!ee||!re)){if(!v){ne.current=!0,q.request(y);return}queueMicrotask(()=>{const ae=getComputedStyle(ee),ge=getComputedStyle(re),ke=Ji(J),Q=Or(ee),ie=J.getBoundingClientRect(),de=ee.getBoundingClientRect(),_e=ie.left,Te=ie.height,xe=Z||re,$e=xe.scrollHeight,Ze=parseFloat(ge.borderBottomWidth),ye=parseFloat(ae.marginTop)||10,Fe=parseFloat(ae.marginBottom)||10,Re=parseFloat(ae.minHeight)||100,We=5,ze=5,Le=20,Ue=ke.documentElement.clientHeight-ye-Fe,dt=ke.documentElement.clientWidth,Ce=Ue-ie.bottom+Te,pe=p.current,Ne=h.current;let He=0,it=0;if(pe&&Ne){const Ht=Ne.getBoundingClientRect(),vt=pe.getBoundingClientRect(),Nt=Ht.left-_e,jn=vt.left-de.left,ft=Ht.top-ie.top+Ht.height/2,Wt=vt.top-de.top+vt.height/2;He=Nt-jn,it=Wt-ft}const yt=Ce+it+Fe+Ze;let bt=Math.min(Ue,yt);const pt=Ue-ye-Fe,on=yt-bt,Ut=Math.max(We,_e+He),Et=dt-ze,Zt=Math.max(0,Ut+de.width-Et);ee.style.left=`${Ut-Zt}px`,ee.style.height=`${bt}px`,ee.style.maxHeight="auto",ee.style.marginTop=`${ye}px`,ee.style.marginBottom=`${Fe}px`,re.style.height="100%";const Pt=xe.scrollHeight-xe.clientHeight,Vt=on>=Pt;Vt&&(bt=Math.min(Ue,de.height)-(on-Pt));const ln=ie.top<Le||ie.bottom>Ue-Le||bt<Math.min($e,Re),bn=(Q.visualViewport?.scale??1)!==1&&b6;if(ln||bn){ne.current=!0,Fy(ee,$.current),$s.flushSync(()=>C(!1));return}if(Vt){const Ht=Math.max(0,Ue-yt);ee.style.top=de.height>=pt?"0":`${Ht}px`,ee.style.height=`${bt}px`,xe.scrollTop=xe.scrollHeight-xe.clientHeight,H.current=Math.max(Re,bt)}else ee.style.bottom="0",H.current=Math.max(Re,bt),xe.scrollTop=on;H.current===Ue&&(Y.current=!0),y(),setTimeout(()=>{ne.current=!0})})}},[l,z,ee,J,h,p,c,y,v,C,q,S,T,Z]),k.useEffect(()=>{if(!v||!ee||!z)return;const re=Or(ee);function ae(ge){d(!1,kn(_0e,ge))}return re.addEventListener("resize",ae),()=>{re.removeEventListener("resize",ae)}},[d,v,ee,z]);const B={...Z?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":b||void 0,id:`${P}-list`},onKeyDown(re){g.current=!0,E&&h1e.has(re.key)&&re.stopPropagation()},onMouseMove(){g.current=!1},onPointerLeave(re){if(mz(re)||re.pointerType==="touch")return;const ae=re.currentTarget;M.start(0,()=>{l.set("activeIndex",null),ae.focus({preventScroll:!0})})},onScroll(re){Z||_.current?.(re.currentTarget)},...v&&{style:Z?{height:"100%"}:pz}},te=jr("div",t,{ref:[n,c],state:D,stateAttributesMapping:w1e,props:[U,B,S1e(G),{className:!Z&&v?gx.className:void 0},s]});return j.jsxs(k.Fragment,{children:[gx.element,j.jsx(pve,{context:O,modal:!1,disabled:!z,restoreFocus:!0,children:te})]})}),_1e=k.forwardRef(function(t,n){const{className:r,render:o,...s}=t,{store:l,scrollHandlerRef:c}=ls(),{alignItemWithTriggerActive:u}=l2(),d=wt(l,gt.hasScrollArrows),h=wt(l,gt.openMethod),p=wt(l,gt.multiple),b={id:`${wt(l,gt.id)}-list`,role:"listbox","aria-multiselectable":p||void 0,onScroll(_){c.current?.(_.currentTarget)},...u&&{style:pz},className:d&&h!=="touch"?gx.className:void 0},y=lt(_=>{l.set("listElement",_)});return jr("div",t,{ref:[n,y],props:[b,s]})});let bz=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function c2(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}=Wbe(),g=k.useRef(-1),[b,y]=k.useState(s??(o===bz.GuessFromOrder?()=>{if(g.current===-1){const w=p.current;p.current+=1,g.current=w}return g.current}:-1)),_=k.useRef(null),x=k.useCallback(w=>{if(_.current=w,b!==-1&&w!==null&&(d.current[b]=w,h)){const v=t!==void 0;h.current[b]=v?t:r?.current?.textContent??w.textContent}},[b,d,h,t,r]);return rt(()=>{if(s!=null)return;const w=_.current;if(w)return l(w,n),()=>{c(w)}},[s,l,c,n]),rt(()=>{if(s==null)return u(w=>{const v=_.current?w.get(_.current)?.index:null;v!=null&&y(v)})},[s,u,y]),k.useMemo(()=>({ref:x,index:b}),[b,x])}const Sz=k.createContext(void 0);function u2(){const e=k.useContext(Sz);if(!e)throw new Error(is(57));return e}const E1e=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=c2({label:l,textRef:h,indexGuessBehavior:bz.GuessFromOrder}),{store:g,getItemProps:b,setOpen:y,setValue:_,selectionRef:x,typingRef:w,valuesRef:v,keyboardActiveRef:C,multiple:S,highlightItemOnHover:T}=ls(),E=No(),O=wt(g,gt.isActive,p.index),M=wt(g,gt.isSelected,p.index,s),P=wt(g,gt.isSelectedByFocus,p.index),I=wt(g,gt.isItemEqualToValue),z=p.index,U=z!==-1,G=k.useRef(null),J=Br(z);rt(()=>{if(!U)return;const te=v.current;return te[z]=s,()=>{delete te[z]}},[U,z,s,v]),rt(()=>{if(!U)return;const te=g.state.value;let re=te;S&&Array.isArray(te)&&te.length>0&&(re=te[te.length-1]),re!==void 0&&ef(re,s,I)&&g.set("selectedIndex",z)},[U,z,S,I,g,s]);const ee=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:$}=h0({disabled:c,focusableWhenDisabled:!0,native:u});function q(te){const re=g.state.value;if(S){const ae=Array.isArray(re)?re:[],ge=M?ybe(ae,s,I):[...ae,s];_(ge,kn(gS,te))}else _(s,kn(gS,te)),y(!1,kn(gS,te))}const V={role:"option","aria-selected":M,"aria-disabled":c||void 0,tabIndex:O?0:-1,onFocus(){g.set("activeIndex",z)},onMouseEnter(){!C.current&&g.state.selectedIndex===null&&g.set("activeIndex",z)},onMouseMove(){T&&g.set("activeIndex",z)},onMouseLeave(te){!T||C.current||mz(te)||E.start(0,()=>{g.state.activeIndex===z&&g.set("activeIndex",null)})},onTouchStart(){x.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(te){H.current=te.key,g.set("activeIndex",z)},onClick(te){oe.current=!1,!(te.type==="keydown"&&H.current===null)&&(c||H.current===" "&&w.current||Y.current!=="touch"&&!O||(H.current=null,q(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=!x.current.allowSelectedMouseUp&&M,ae=!x.current.allowUnselectedMouseUp&&!M;re||ae||Y.current!=="touch"&&!O||q(te.nativeEvent)}},D=jr("div",t,{ref:[$,n,p.ref,G],state:ee,props:[Z,V,d,ne]}),B=k.useMemo(()=>({selected:M,indexRef:J,textRef:h,selectedByFocus:P,hasRegistered:U}),[M,J,h,P,U]);return j.jsx(Sz.Provider,{value:B,children:D})})),C1e=k.forwardRef(function(t,n){const r=t.keepMounted??!1,{selected:o}=u2();return r||o?j.jsx(T1e,{...t,ref:n}):null}),T1e=k.memo(k.forwardRef((e,t)=>{const{render:n,className:r,keepMounted:o,...s}=e,{selected:l}=u2(),c=k.useRef(null),{transitionStatus:u,setMounted:d}=o2(l),h=k.useMemo(()=>({selected:l,transitionStatus:u}),[l,u]),p=jr("span",e,{ref:[t,c],state:h,props:[{"aria-hidden":!0,children:"✔️"},s],stateAttributesMapping:cz});return N0({open:l,ref:c,onComplete(){l||d(!1)}}),p})),R1e=k.memo(k.forwardRef(function(t,n){const{indexRef:r,textRef:o,selectedByFocus:s,hasRegistered:l}=u2(),{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 jr("div",t,{ref:[p,n,o],props:h})})),wz=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:_}=l2(),x=s==="up"?gt.scrollUpArrowVisible:gt.scrollDownArrowVisible,w=wt(u,x),v=wt(u,gt.openMethod),C=w&&v!=="touch",S=No(),T=s==="up"?_:y,{transitionStatus:E,setMounted:O}=o2(C);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]),N0({open:C,ref:T,onComplete(){C||O(!1)}});const M=k.useMemo(()=>({direction:s,visible:C,side:b,transitionStatus:E}),[s,C,b,E]),I=jr("div",t,{ref:[n,T],state:M,props:[{"aria-hidden":!0,children:s==="up"?"▲":"▼",style:{position:"absolute"},onMouseMove(U){if(U.movementX===0&&U.movementY===0||S.isStarted())return;u.set("activeIndex",null);function G(){const J=u.state.listElement??d.current;if(!J)return;u.set("activeIndex",null),p();const ee=J.scrollTop===0,Z=Math.round(J.scrollTop+J.clientHeight)>=J.scrollHeight;if(h.current.length===0&&(s==="up"?u.set("scrollUpArrowVisible",!ee):u.set("scrollDownArrowVisible",!Z)),s==="up"&&ee||s==="down"&&Z){S.clear();return}if((u.state.listElement||d.current)&&h.current&&h.current.length>0){const Y=h.current,oe=T.current?.offsetHeight||0;if(s==="up"){let ne=0;const $=J.scrollTop+oe;for(let V=0;V<Y.length;V+=1){const D=Y[V];if(D&&D.offsetTop>=$){ne=V;break}}const q=Math.max(0,ne-1);if(q<ne){const V=Y[q];V&&(J.scrollTop=Math.max(0,V.offsetTop-oe))}else J.scrollTop=0}else{let ne=Y.length-1;const $=J.scrollTop+J.clientHeight-oe;for(let V=0;V<Y.length;V+=1){const D=Y[V];if(D&&D.offsetTop+D.offsetHeight>$){ne=Math.max(0,V-1);break}}const q=Math.min(Y.length-1,ne+1);if(q>ne){const V=Y[q];V&&(J.scrollTop=V.offsetTop+V.offsetHeight-J.clientHeight+oe)}else J.scrollTop=J.scrollHeight-J.clientHeight}}S.start(40,G)}S.start(40,G)},onMouseLeave(){S.clear()}},c]});return C||l?I:null}),O1e=k.forwardRef(function(t,n){return j.jsx(wz,{...t,ref:n,direction:"down"})}),A1e=k.forwardRef(function(t,n){return j.jsx(wz,{...t,ref:n,direction:"up"})}),k1e=k.createContext(void 0),M1e=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=jr("div",t,{ref:n,props:[{role:"group","aria-labelledby":l},s]});return j.jsx(k1e.Provider,{value:u,children:d})}),j1e=Ebe;function P1e({className:e,...t}){return j.jsx(M1e,{"data-slot":"select-group",className:vn("scroll-my-1",e),...t})}function N1e({className:e,...t}){return j.jsx(zbe,{"data-slot":"select-value",className:vn("flex flex-1 text-left",e),...t})}function D1e({className:e,size:t="default",children:n,...r}){return j.jsxs($be,{"data-slot":"select-trigger","data-size":t,className:vn("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(Lbe,{render:j.jsx(EN,{className:"text-muted-foreground size-4 pointer-events-none"})})]})}function $1e({className:e,children:t,side:n="bottom",sideOffset:r=4,align:o="center",alignOffset:s=0,alignItemWithTrigger:l=!0,...c}){return j.jsx(Ube,{children:j.jsx(a1e,{side:n,sideOffset:r,align:o,alignOffset:s,alignItemWithTrigger:l,className:"isolate z-50",children:j.jsxs(x1e,{"data-slot":"select-content",className:vn("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(I1e,{}),j.jsx(_1e,{children:t}),j.jsx(z1e,{})]})})})}function kg({className:e,children:t,...n}){return j.jsxs(E1e,{"data-slot":"select-item",className:vn("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(R1e,{className:"flex flex-1 gap-2 shrink-0 whitespace-nowrap",children:t}),j.jsx(C1e,{render:j.jsx("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center"}),children:j.jsx(Ste,{className:"pointer-events-none"})})]})}function I1e({className:e,...t}){return j.jsx(A1e,{"data-slot":"select-scroll-up-button",className:vn("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(_te,{})})}function z1e({className:e,...t}){return j.jsx(O1e,{"data-slot":"select-scroll-down-button",className:vn("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(EN,{})})}const xz=k.createContext(void 0);function f2(){const e=k.useContext(xz);if(e===void 0)throw new Error(is(64));return e}let L1e=(function(e){return e.activationDirection="data-activation-direction",e.orientation="data-orientation",e})({});const d2={tabActivationDirection:e=>({[L1e.activationDirection]:e})},F1e=k.forwardRef(function(t,n){const{className:r,defaultValue:o=0,onValueChange:s,orientation:l="horizontal",render:c,value:u,...d}=t,h=a2(),p=Object.hasOwn(t,"defaultValue"),g=k.useRef([]),[b,y]=k.useState(()=>new Map),[_,x]=Ny({controlled:u,default:o,name:"Tabs",state:"value"}),w=u!==void 0,[v,C]=k.useState(()=>new Map),[S,T]=k.useState("none"),E=lt((H,Y)=>{s?.(H,Y),!Y.isCanceled&&(x(H),T(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]),I=k.useCallback(H=>{for(const Y of v.values())if(H===Y?.value)return Y?.id},[v]),z=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]),U=k.useMemo(()=>({direction:h,getTabElementBySelectedValue:z,getTabIdByPanelValue:I,getTabPanelIdByValue:P,onValueChange:E,orientation:l,registerMountedTabPanel:O,setTabMap:C,unregisterMountedTabPanel:M,tabActivationDirection:S,value:_}),[h,z,I,P,E,l,O,C,M,S,_]),G=k.useMemo(()=>{for(const H of v.values())if(H!=null&&H.value===_)return H},[v,_]),J=k.useMemo(()=>{for(const H of v.values())if(H!=null&&!H.disabled)return H.value},[v]);rt(()=>{if(w||v.size===0)return;const H=G?.disabled,Y=G==null&&_!==null;if(p&&H&&_===o||!H&&!Y)return;const ne=J??null;_!==ne&&(x(ne),T("none"))},[o,J,p,w,G,T,x,v,_]);const Z=jr("div",t,{state:{orientation:l,tabActivationDirection:S},ref:n,props:d,stateAttributesMapping:d2});return j.jsx(xz.Provider,{value:U,children:j.jsx(s2,{elementsRef:g,children:Z})})}),_z="data-composite-item-active";function U1e(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=AN(),{ref:o,index:s}=c2(e),l=n===s,c=k.useRef(null),u=qa(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 Ez=k.createContext(void 0);function V1e(){const e=k.useContext(Ez);if(e===void 0)throw new Error(is(65));return e}const q1e=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}=f2(),{activateOnFocus:b,highlightedTabIndex:y,onTabActivation:_,setHighlightedTabIndex:x,tabsListElement:w}=V1e(),v=YE(c),C=k.useMemo(()=>({disabled:o,id:v,value:l}),[o,v,l]),{compositeProps:S,compositeRef:T,index:E}=U1e({metadata:C}),O=l===h,M=k.useRef(!1);rt(()=>{if(M.current){M.current=!1;return}if(!(O&&E>-1&&y!==E))return;const oe=w;if(oe!=null){const ne=As(Ji(oe));if(ne&&Hn(oe,ne))return}o||x(E)},[O,E,y,x,o,w]);const{getButtonProps:P,buttonRef:I}=h0({disabled:o,native:u,focusableWhenDisabled:!0}),z=p(l),U=k.useRef(!1),G=k.useRef(!1);function J(oe){O||o||_(l,kn(Ju,oe.nativeEvent,void 0,{activationDirection:"none"}))}function ee(oe){O||(E>-1&&!o&&x(E),!o&&b&&(!U.current||U.current&&G.current)&&_(l,kn(Ju,oe.nativeEvent,void 0,{activationDirection:"none"})))}function Z(oe){if(O||o)return;U.current=!0;function ne(){U.current=!1,G.current=!1}(!oe.button||oe.button===0)&&(G.current=!0,Ji(oe.currentTarget).addEventListener("pointerup",ne,{once:!0}))}const H=k.useMemo(()=>({disabled:o,active:O,orientation:g}),[o,O,g]);return jr("button",t,{state:H,ref:[n,I,T],props:[S,{role:"tab","aria-controls":z,"aria-selected":O,id:v,onClick:J,onFocus:ee,onPointerDown:Z,[_z]:O?"":void 0,onKeyDownCapture(){M.current=!0}},d,P]})});let B1e=(function(e){return e.index="data-index",e.activationDirection="data-activation-direction",e.orientation="data-orientation",e.hidden="data-hidden",e})({});const H1e=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}=f2(),y=YE(),_=k.useMemo(()=>({id:y,value:o}),[y,o]),{ref:x,index:w}=c2({metadata:_}),v=o!==u,C=d(o),S=k.useMemo(()=>({hidden:v,orientation:h,tabActivationDirection:p}),[v,h,p]),T=jr("div",t,{state:S,ref:[n,x],props:[{"aria-labelledby":C,hidden:v,id:y??void 0,role:"tabpanel",tabIndex:v?-1:0,[B1e.index]:w},c],stateAttributesMapping:d2});return rt(()=>{if(!(v&&!l)&&y!=null)return g(o,y),()=>{b(o,y)}},[v,l,o,y,g,b]),!v||l?T:null});function K1e(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}const G1e=[];function Z1e(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=G1e}=e,[y,_]=k.useState(0),x=n>1,w=k.useRef(null),v=qa(w,d),C=k.useRef([]),S=k.useRef(!1),T=c??y,E=lt((P,I=!1)=>{if((u??_)(P),I){const z=C.current[P];uj(w.current,z,l,s)}}),O=lt(P=>{if(P.size===0||S.current)return;S.current=!0;const I=Array.from(P.keys()),z=I.find(G=>G?.hasAttribute(_z))??null,U=z?I.indexOf(z):-1;U!==-1&&E(U),uj(w.current,z,l,s)}),M=k.useMemo(()=>({"aria-orientation":s==="both"?void 0:s,ref:v,onFocus(P){!w.current||!cj(P.target)||P.target.setSelectionRange(0,P.target.value.length??0)},onKeyDown(P){const I=h?d1e:vz;if(!I.has(P.key)||W1e(P,b)||!w.current)return;const U=l==="rtl",G=U?Sh:Nu,J={horizontal:G,vertical:Hl,both:G}[s],ee=U?Nu:Sh,Z={horizontal:ee,vertical:Pu,both:ee}[s];if(cj(P.target)&&!K1e(P.target)){const V=P.target.selectionStart,D=P.target.selectionEnd,B=P.target.value??"";if(V==null||P.shiftKey||V!==D||P.key!==Z&&V<B.length||P.key!==J&&V>0)return}let H=T;const Y=Zg(C,g),oe=ux(C,g);if(x){const V=t||Array.from({length:C.current.length},()=>({width:1,height:1})),D=O6(V,n,o),B=D.findIndex(re=>re!=null&&!za(C,re,g)),te=D.reduce((re,ae,ge)=>ae!=null&&!za(C,ae,g)?ge:re,-1);H=D[R6({current:D.map(re=>re?C.current[re]:null)},{event:P,orientation:s,loopFocus:r,cols:n,disabledIndices:k6([...g||C.current.map((re,ae)=>za(C,ae)?ae:void 0),void 0],D),minIndex:B,maxIndex:te,prevIndex:A6(T>oe?Y:T,V,D,n,P.key===Hl?"bl":P.key===Nu?"tr":"tl"),rtl:U})]}const ne={horizontal:[G],vertical:[Hl],both:[G,Hl]}[s],$={horizontal:[ee],vertical:[Pu],both:[ee,Pu]}[s],q=x?I:{horizontal:h?u1e:gz,vertical:h?f1e:yz,both:I}[s];h&&(P.key===tp?H=Y:P.key===np&&(H=oe)),H===T&&(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=Ur(C,{startingIndex:H,decrement:$.includes(P.key),disabledIndices:g})),H!==T&&!Au(C,H)&&(p&&P.stopPropagation(),q.has(P.key)&&P.preventDefault(),E(H,!0),queueMicrotask(()=>{C.current[H]?.focus()}))}}),[n,o,l,g,C,h,T,x,t,r,v,b,E,s,p]);return k.useMemo(()=>({props:M,highlightedIndex:T,onHighlightedIndexChange:E,elementsRef:C,disabledIndices:g,onMapChange:O,relayKeyboardEvent:M.onKeyDown}),[M,T,E,C,g,O])}function W1e(e,t){for(const n of v1e.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function Y1e(e){const{render:t,className:n,refs:r=Vu,props:o=Vu,state:s=Po,stateAttributesMapping:l,highlightedIndex:c,onHighlightedIndexChange:u,orientation:d,dense:h,itemSizes:p,loopFocus:g,cols:b,enableHomeAndEndKeys:y,onMapChange:_,stopEventPropagation:x=!0,rootRef:w,disabledIndices:v,modifierKeys:C,highlightItemOnHover:S=!1,tag:T="div",...E}=e,O=a2(),{props:M,highlightedIndex:P,onHighlightedIndexChange:I,elementsRef:z,onMapChange:U,relayKeyboardEvent:G}=Z1e({itemSizes:p,cols:b,loopFocus:g,dense:h,orientation:d,highlightedIndex:c,onHighlightedIndexChange:u,rootRef:w,stopEventPropagation:x,enableHomeAndEndKeys:y,direction:O,disabledIndices:v,modifierKeys:C}),J=jr(T,e,{state:s,ref:r,props:[M,...o,E],stateAttributesMapping:l}),ee=k.useMemo(()=>({highlightedIndex:P,onHighlightedIndexChange:I,highlightItemOnHover:S,relayKeyboardEvent:G}),[P,I,S,G]);return j.jsx(ON.Provider,{value:ee,children:j.jsx(s2,{elementsRef:z,onMapChange:Z=>{_?.(Z),U(Z)},children:J})})}const X1e=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}=f2(),[y,_]=k.useState(0),[x,w]=k.useState(null),v=Q1e(p,h,x,u),C=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]),T={"aria-orientation":h==="vertical"?"vertical":void 0,role:"tablist"},E=k.useMemo(()=>({activateOnFocus:r,highlightedTabIndex:y,onTabActivation:C,setHighlightedTabIndex:_,tabsListElement:x,value:p}),[r,y,C,_,x,p]);return j.jsx(Ez.Provider,{value:E,children:j.jsx(Y1e,{render:l,className:o,state:S,refs:[n,w],props:[T,c],stateAttributesMapping:d2,highlightedIndex:y,enableHomeAndEndKeys:!0,loopFocus:s,orientation:h,onHighlightedIndexChange:_,onMapChange:g,disabledIndices:Vu})})});function dj(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 Q1e(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}=dj(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}=dj(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 J1e({className:e,orientation:t="horizontal",...n}){return j.jsx(F1e,{"data-slot":"tabs","data-orientation":t,className:vn("gap-2 group/tabs flex data-[orientation=horizontal]:flex-col",e),...n})}const eSe=tl("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 tSe({className:e,variant:t="default",...n}){return j.jsx(X1e,{"data-slot":"tabs-list","data-variant":t,className:vn(eSe({variant:t}),e),...n})}function hj({className:e,...t}){return j.jsx(q1e,{"data-slot":"tabs-trigger",className:vn("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 pj({className:e,...t}){return j.jsx(H1e,{"data-slot":"tabs-content",className:vn("text-xs/relaxed flex-1 outline-none",e),...t})}const nSe=()=>{const e=dc(),{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(J1e,{defaultValue:"widget-state",className:"gap-0",children:[j.jsxs(tSe,{className:"border-b border-border w-full",children:[j.jsx(hj,{value:"properties",children:"Properties"}),j.jsx(hj,{value:"widget-state",children:"Widget State"})]}),j.jsx(pj,{value:"properties",className:"p-4",children:j.jsxs(Oye,{children:[j.jsxs(hS,{children:[j.jsx(pS,{children:"Display Mode"}),j.jsxs(j1e,{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(D1e,{children:j.jsx(N1e,{})}),j.jsx($1e,{children:j.jsxs(P1e,{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(hS,{children:[j.jsx(pS,{children:"Theme"}),j.jsxs(Tye,{children:[j.jsx(sh,{variant:n.theme==="light"?"default":"outline",onClick:()=>o("theme","light"),children:j.jsx(Dte,{})}),j.jsx(sh,{variant:n.theme==="dark"?"default":"outline",onClick:()=>o("theme","dark"),children:j.jsx(Mte,{})})]})]}),j.jsxs(hS,{children:[j.jsx(pS,{children:"Locale"}),j.jsx(T0e,{value:n.locale,onChange:s=>o("locale",s.target.value)})]})]})}),j.jsx(pj,{value:"widget-state",className:"p-4",children:j.jsx(h6,{src:n.widgetState??{},name:null,quotesOnKeys:!1,displayDataTypes:!1,displayObjectSize:!1,enableClipboard:!1,theme:"rjv-default",collapsed:3,collapseStringsAfterLength:80})})]})}):null};function mj(e){return new Date(e).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3})}function rSe(e,t=60){const n=JSON.stringify(e);return n.length>t?`${n.slice(0,t)}…`:n}function oSe({log:e}){const[t,n]=k.useState(!1),r=Object.keys(e.args).length>0,o=r?rSe(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:mj(e.timestamp)}),j.jsx("span",{className:"text-blue-600 dark:text-blue-400 font-semibold shrink-0 min-w-[120px]",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:mj(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 iSe(){const e=dc(),{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(sh,{variant:"ghost",size:"sm",onClick:o,children:[j.jsx(Ite,{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(oSe,{log:s},s.id))})]})}const sSe=tl("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 aSe({className:e,variant:t,...n}){return j.jsx("div",{className:vn(sSe({variant:t}),e),"data-slot":"alert",role:"alert",...n})}function lSe({className:e,...t}){return j.jsx("div",{className:vn("font-medium [svg~&]:col-start-2",e),"data-slot":"alert-title",...t})}function cSe({className:e,...t}){return j.jsx("div",{className:vn("flex flex-col gap-2.5 text-muted-foreground [svg~&]:col-start-2",e),"data-slot":"alert-description",...t})}const uSe=()=>{const e=dc(),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(aSe,{variant:"error",children:[j.jsx(Cte,{}),j.jsx(lSe,{children:"Error"}),j.jsx(cSe,{children:n()})]}):j.jsx("div",{className:"text-xs",children:j.jsx(h6,{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})})},Cz="openai:set_globals";class fSe extends CustomEvent{type=Cz}class dSe{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 Tz{constructor(t){this.generateIdentifier=t,this.kv=new dSe}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 hSe extends Tz{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 pSe(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 mSe(e,t){const n=pSe(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 tf(e,t){Object.entries(e).forEach(([n,r])=>t(r,n))}function Xg(e,t){return e.indexOf(t)!==-1}function gj(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(t(r))return r}}class gSe{constructor(){this.transfomers={}}register(t){this.transfomers[t.name]=t}findApplicable(t){return mSe(this.transfomers,n=>n.isApplicable(t))}findByName(t){return this.transfomers[t]}}const ySe=e=>Object.prototype.toString.call(e).slice(8,-1),Rz=e=>typeof e>"u",vSe=e=>e===null,wh=e=>typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,yx=e=>wh(e)&&Object.keys(e).length===0,Wa=e=>Array.isArray(e),bSe=e=>typeof e=="string",SSe=e=>typeof e=="number"&&!isNaN(e),wSe=e=>typeof e=="boolean",xSe=e=>e instanceof RegExp,xh=e=>e instanceof Map,_h=e=>e instanceof Set,Oz=e=>ySe(e)==="Symbol",_Se=e=>e instanceof Date&&!isNaN(e.valueOf()),Az=e=>e instanceof Error,yj=e=>typeof e=="number"&&isNaN(e),ESe=e=>wSe(e)||vSe(e)||Rz(e)||SSe(e)||bSe(e)||Oz(e),CSe=e=>typeof e=="bigint",TSe=e=>e===1/0||e===-1/0,RSe=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),OSe=e=>e instanceof URL,vx=e=>e.replace(/\\/g,"\\\\").replace(/\./g,"\\."),OS=e=>e.map(String).map(vx).join("."),Gd=(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 Di(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}const kz=[Di(Rz,"undefined",()=>null,()=>{}),Di(CSe,"bigint",e=>e.toString(),e=>typeof BigInt<"u"?BigInt(e):(console.error("Please add a BigInt polyfill."),e)),Di(_Se,"Date",e=>e.toISOString(),e=>new Date(e)),Di(Az,"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}),Di(xSe,"regexp",e=>""+e,e=>{const t=e.slice(1,e.lastIndexOf("/")),n=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,n)}),Di(_h,"set",e=>[...e.values()],e=>new Set(e)),Di(xh,"map",e=>[...e.entries()],e=>new Map(e)),Di(e=>yj(e)||TSe(e),"number",e=>yj(e)?"NaN":e>0?"Infinity":"-Infinity",Number),Di(e=>e===0&&1/e===-1/0,"number",()=>"-0",Number),Di(OSe,"URL",e=>e.toString(),e=>new URL(e))];function $0(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}const Mz=$0((e,t)=>Oz(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}),ASe=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),jz=$0(RSe,e=>["typed-array",e.constructor.name],e=>[...e],(e,t)=>{const n=ASe[t[1]];if(!n)throw new Error("Trying to deserialize unknown typed array");return new n(e)});function Pz(e,t){return e?.constructor?!!t.classRegistry.getIdentifier(e.constructor):!1}const Nz=$0(Pz,(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)}),Dz=$0((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)}),kSe=[Nz,Mz,Dz,jz],vj=(e,t)=>{const n=gj(kSe,o=>o.isApplicable(e,t));if(n)return{value:n.transform(e,t),type:n.annotation(e,t)};const r=gj(kz,o=>o.isApplicable(e,t));if(r)return{value:r.transform(e,t),type:r.annotation}},$z={};kz.forEach(e=>{$z[e.annotation]=e});const MSe=(e,t,n)=>{if(Wa(t))switch(t[0]){case"symbol":return Mz.untransform(e,t,n);case"class":return Nz.untransform(e,t,n);case"custom":return Dz.untransform(e,t,n);case"typed-array":return jz.untransform(e,t,n);default:throw new Error("Unknown transformation: "+t)}else{const r=$z[t];if(!r)throw new Error("Unknown transformation: "+t);return r.untransform(e,n)}},xu=(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 Iz(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 jSe=(e,t)=>{Iz(t);for(let n=0;n<t.length;n++){const r=t[n];if(_h(e))e=xu(e,+r);else if(xh(e)){const o=+r,s=+t[++n]==0?"key":"value",l=xu(e,o);switch(s){case"key":e=l;break;case"value":e=e.get(l);break}}else e=e[r]}return e},bx=(e,t,n)=>{if(Iz(t),t.length===0)return n(e);let r=e;for(let s=0;s<t.length-1;s++){const l=t[s];if(Wa(r)){const c=+l;r=r[c]}else if(wh(r))r=r[l];else if(_h(r)){const c=+l;r=xu(r,c)}else if(xh(r)){if(s===t.length-2)break;const u=+l,d=+t[++s]==0?"key":"value",h=xu(r,u);switch(d){case"key":r=h;break;case"value":r=r.get(h);break}}}const o=t[t.length-1];if(Wa(r)?r[+o]=n(r[+o]):wh(r)&&(r[o]=n(r[o])),_h(r)){const s=xu(r,+o),l=n(s);s!==l&&(r.delete(s),r.add(l))}if(xh(r)){const s=+t[t.length-2],l=xu(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},zz=e=>e<1;function Sx(e,t,n,r=[]){if(!e)return;const o=zz(n);if(!Wa(e)){tf(e,(c,u)=>Sx(c,t,n,[...r,...Gd(u,o)]));return}const[s,l]=e;l&&tf(l,(c,u)=>{Sx(c,t,n,[...r,...Gd(u,o)])}),t(s,r)}function PSe(e,t,n,r){return Sx(t,(o,s)=>{e=bx(e,s,l=>MSe(l,o,r))},n),e}function NSe(e,t,n){const r=zz(n);function o(s,l){const c=jSe(e,Gd(l,r));s.map(u=>Gd(u,r)).forEach(u=>{e=bx(e,u,()=>c)})}if(Wa(t)){const[s,l]=t;s.forEach(c=>{e=bx(e,Gd(c,r),()=>e)}),l&&tf(l,o)}else tf(t,o);return e}const DSe=(e,t)=>wh(e)||Wa(e)||xh(e)||_h(e)||Az(e)||Pz(e,t);function $Se(e,t,n){const r=n.get(e);r?r.push(t):n.set(e,[t])}function ISe(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(OS):n[OS(s)]=l.map(OS)}),r?yx(n)?[r]:[r,n]:yx(n)?void 0:n}const Lz=(e,t,n,r,o=[],s=[],l=new Map)=>{const c=ESe(e);if(!c){$Se(e,o,t);const b=l.get(e);if(b)return r?{transformedValue:null}:b}if(!DSe(e,n)){const b=vj(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=vj(e,n),d=u?.value??e,h=Wa(d)?[]:{},p={};tf(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 _=Lz(b,t,n,r,[...o,y],[...s,e],l);h[y]=_.transformedValue,Wa(_.annotations)?p[vx(y)]=_.annotations:wh(_.annotations)&&tf(_.annotations,(x,w)=>{p[vx(y)+"."+w]=x})});const g=yx(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 Fz(e){return Object.prototype.toString.call(e).slice(8,-1)}function bj(e){return Fz(e)==="Array"}function zSe(e){if(Fz(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function LSe(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 wx(e,t={}){if(bj(e))return e.map(o=>wx(o,t));if(!zSe(e))return e;const n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertySymbols(e);return[...n,...r].reduce((o,s)=>{if(s==="__proto__"||bj(t.props)&&!t.props.includes(s))return o;const l=e[s],c=wx(l,t);return LSe(o,s,c,e,t.nonenumerable),o},{})}class Mn{constructor({dedupe:t=!1}={}){this.classRegistry=new hSe,this.symbolRegistry=new Tz(n=>n.description??""),this.customTransformerRegistry=new gSe,this.allowedErrorProps=[],this.dedupe=t}serialize(t){const n=new Map,r=Lz(t,n,this,this.dedupe),o={json:r.transformedValue};r.annotations&&(o.meta={...o.meta,values:r.annotations});const s=ISe(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:wx(r);return o?.values&&(s=PSe(s,o.values,o.v??0,this)),o?.referentialEqualities&&(s=NSe(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 FSe(e,t,n){return{callTool:async(o,s)=>(t("callTool",{name:o,args:s}),{}),sendFollowUpMessage:async o=>{t("sendFollowUpMessage",o)},openExternal:o=>{t("openExternal",o)},requestDisplayMode:async o=>(t("requestDisplayMode",o),e.displayMode=o.mode,n("displayMode",o.mode),{mode:o.mode}),setWidgetState:async o=>{t("setWidgetState",o),e.widgetState=o,n("widgetState",o)},requestModal:async o=>{t("requestModal",o),e.displayMode="modal",e.view={mode:"modal"},n("displayMode","modal")},uploadFile:async o=>(t("uploadFile",{name:o.name,size:o.size}),{fileId:"123"}),downloadFile:async o=>(t("downloadFile",o),{downloadUrl:"https://example.com/file.pdf"})}}function USe(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 fSe(Cz,{detail:{globals:{[o]:s}}});t.dispatchEvent(u)}return c}})}function VSe(e,t,n,r){const o=Ph(t),s=USe(o,e),l=FSe(s,n,r);CV(s,l),e.openai=s}function qSe(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 BSe=()=>{const e=dc(),{openaiObject:t}=cf(e.name),{data:n}=hte(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;if(!p||!p.contentWindow||!p.contentDocument)return;u.current=!0,VSe(p.contentWindow,t,(y,_)=>{o(e.name,{timestamp:Date.now(),command:y,args:_})},(y,_)=>{s(e.name,y,_)}),p.contentDocument.open(),p.contentDocument.write(qSe(d)),p.contentDocument.close();const g=p.contentDocument;new ResizeObserver(()=>{p.style.height=`${g.documentElement.scrollHeight}px`}).observe(g.body),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%"},children:j.jsx("iframe",{ref:l,src:"about:blank",onLoad:h,style:{width:"100%",border:"none",display:"block",maxHeight:"300px"},sandbox:"allow-scripts allow-same-origin",title:"html-preview"})})},HSe=()=>{const e=dc(),t=cf(e.name),{defaultLayout:n,onLayoutChange:r}=Qj({id:"skybridge-devtools-input-column",storage:localStorage}),o=!!(e._meta?.["openai/outputTemplate"]&&t?.response&&!t.response.isError);return j.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden relative z-10",children:[j.jsxs(Px,{orientation:"horizontal",className:"flex-1 overflow-hidden border-b border-border",defaultLayout:n,onLayoutChange:r,children:[j.jsx(Xd,{id:"input-column",minSize:"20",maxSize:"60",children:j.jsx("div",{className:"flex flex-col overflow-hidden h-full",children:j.jsx(wye,{})})}),j.jsx(Dx,{className:"w-px bg-border"}),j.jsx(Xd,{id:"output-column",minSize:"30",children:j.jsx("div",{className:"flex flex-col overflow-hidden h-full",children:j.jsx(uSe,{})})})]}),o&&j.jsxs("div",{className:"flex overflow-hidden bg-card relative h-[60%]",children:[j.jsxs("div",{className:"flex flex-col flex-1 h-full overflow-hidden bg-card border-r border-border",children:[j.jsx("div",{className:"border-b border-border",children:j.jsx(k.Suspense,{children:j.jsx(BSe,{})})}),j.jsx("div",{className:"p-4 flex flex-col h-full min-h-0",children:j.jsx(iSe,{})})]}),j.jsx("div",{className:"flex flex-col overflow-hidden w-[400px] flex-none min-h-0",children:j.jsx("div",{className:"overflow-auto",children:j.jsx(nSe,{})})})]})]})};function KSe(){const e=xN(),[,t]=e_(),n=P_();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:vn("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:vn("font-semibold text-sm leading-tight truncate",o&&"text-accent-foreground"),children:r.name}),r.description&&j.jsx("div",{className:vn("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 GSe(){const e=P_(),{defaultLayout:t,onLayoutChange:n}=Qj({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(are,{}),j.jsxs(Px,{orientation:"horizontal",className:"flex-1 overflow-hidden",defaultLayout:t,onLayoutChange:n,children:[j.jsx(Xd,{id:"tools-list",minSize:"15",maxSize:"40",children:j.jsx(KSe,{})}),j.jsx(Dx,{className:"w-px bg-border"}),j.jsx(Xd,{id:"main-content",minSize:"30",children:j.jsx("div",{className:"flex flex-1 flex-col overflow-hidden relative h-full",children:e?j.jsx(HSe,{}):j.jsx(zae,{})})})]})]})}const ZSe=new xF;function WSe(){return j.jsx(_F,{client:ZSe,children:j.jsx(i7,{children:j.jsx(GSe,{})})})}QL.createRoot(document.getElementById("root")).render(j.jsx(k.StrictMode,{children:j.jsx(WSe,{})}))});export default YSe();
|