@skybridge/devtools 0.0.0-dev.fa642c4 → 0.0.0-dev.fbd2c17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,158 +0,0 @@
1
- var QL=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var iwe=QL((Di,Ii)=>{function JL(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}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 i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var hm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var qb={exports:{}},md={};var YR;function eF(){if(YR)return md;YR=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,o){var l=null;if(o!==void 0&&(l=""+o),i.key!==void 0&&(l=""+i.key),"key"in i){o={};for(var c in i)c!=="key"&&(o[c]=i[c])}else o=i;return i=o.ref,{$$typeof:e,type:r,key:l,ref:i!==void 0?i:null,props:o}}return md.Fragment=t,md.jsx=n,md.jsxs=n,md}var WR;function tF(){return WR||(WR=1,qb.exports=eF()),qb.exports}var j=tF(),Bb={exports:{}},St={};var XR;function nF(){if(XR)return St;XR=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=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 S(I){return I===null||typeof I!="object"?null:(I=g&&I[g]||I["@@iterator"],typeof I=="function"?I:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,x={};function w(I,B,$){this.props=I,this.context=B,this.refs=x,this.updater=$||y}w.prototype.isReactComponent={},w.prototype.setState=function(I,B){if(typeof I!="object"&&typeof I!="function"&&I!=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,I,B,"setState")},w.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function v(){}v.prototype=w.prototype;function E(I,B,$){this.props=I,this.context=B,this.refs=x,this.updater=$||y}var b=E.prototype=new v;b.constructor=E,C(b,w.prototype),b.isPureReactComponent=!0;var T=Array.isArray;function _(){}var O={H:null,A:null,T:null,S:null},M=Object.prototype.hasOwnProperty;function P(I,B,$){var N=$.ref;return{$$typeof:e,type:I,key:B,ref:N!==void 0?N:null,props:$}}function z(I,B){return P(I.type,B,I.props)}function L(I){return typeof I=="object"&&I!==null&&I.$$typeof===e}function q(I){var B={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function($){return B[$]})}var Z=/\/+/g;function te(I,B){return typeof I=="object"&&I!==null&&I.key!=null?q(""+I.key):B.toString(36)}function ee(I){switch(I.status){case"fulfilled":return I.value;case"rejected":throw I.reason;default:switch(typeof I.status=="string"?I.then(_,_):(I.status="pending",I.then(function(B){I.status==="pending"&&(I.status="fulfilled",I.value=B)},function(B){I.status==="pending"&&(I.status="rejected",I.reason=B)})),I.status){case"fulfilled":return I.value;case"rejected":throw I.reason}}throw I}function G(I,B,$,N,U){var J=typeof I;(J==="undefined"||J==="boolean")&&(I=null);var ne=!1;if(I===null)ne=!0;else switch(J){case"bigint":case"string":case"number":ne=!0;break;case"object":switch(I.$$typeof){case e:case t:ne=!0;break;case h:return ne=I._init,G(ne(I._payload),B,$,N,U)}}if(ne)return U=U(I),ne=N===""?"."+te(I,0):N,T(U)?($="",ne!=null&&($=ne.replace(Z,"$&/")+"/"),G(U,B,$,"",function(Ee){return Ee})):U!=null&&(L(U)&&(U=z(U,$+(U.key==null||I&&I.key===U.key?"":(""+U.key).replace(Z,"$&/")+"/")+ne)),B.push(U)),1;ne=0;var se=N===""?".":N+":";if(T(I))for(var he=0;he<I.length;he++)N=I[he],J=se+te(N,he),ne+=G(N,B,$,J,U);else if(he=S(I),typeof he=="function")for(I=he.call(I),he=0;!(N=I.next()).done;)N=N.value,J=se+te(N,he++),ne+=G(N,B,$,J,U);else if(J==="object"){if(typeof I.then=="function")return G(ee(I),B,$,N,U);throw B=String(I),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(I).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return ne}function H(I,B,$){if(I==null)return I;var N=[],U=0;return G(I,N,"","",function(J){return B.call($,J,U++)}),N}function Y(I){if(I._status===-1){var B=I._result;B=B(),B.then(function($){(I._status===0||I._status===-1)&&(I._status=1,I._result=$)},function($){(I._status===0||I._status===-1)&&(I._status=2,I._result=$)}),I._status===-1&&(I._status=0,I._result=B)}if(I._status===1)return I._result.default;throw I._result}var oe=typeof reportError=="function"?reportError:function(I){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=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(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",I);return}console.error(I)},re={map:H,forEach:function(I,B,$){H(I,function(){B.apply(this,arguments)},$)},count:function(I){var B=0;return H(I,function(){B++}),B},toArray:function(I){return H(I,function(B){return B})||[]},only:function(I){if(!L(I))throw Error("React.Children.only expected to receive a single React element child.");return I}};return St.Activity=p,St.Children=re,St.Component=w,St.Fragment=n,St.Profiler=i,St.PureComponent=E,St.StrictMode=r,St.Suspense=u,St.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=O,St.__COMPILER_RUNTIME={__proto__:null,c:function(I){return O.H.useMemoCache(I)}},St.cache=function(I){return function(){return I.apply(null,arguments)}},St.cacheSignal=function(){return null},St.cloneElement=function(I,B,$){if(I==null)throw Error("The argument must be a React element, but you passed "+I+".");var N=C({},I.props),U=I.key;if(B!=null)for(J in B.key!==void 0&&(U=""+B.key),B)!M.call(B,J)||J==="key"||J==="__self"||J==="__source"||J==="ref"&&B.ref===void 0||(N[J]=B[J]);var J=arguments.length-2;if(J===1)N.children=$;else if(1<J){for(var ne=Array(J),se=0;se<J;se++)ne[se]=arguments[se+2];N.children=ne}return P(I.type,U,N)},St.createContext=function(I){return I={$$typeof:l,_currentValue:I,_currentValue2:I,_threadCount:0,Provider:null,Consumer:null},I.Provider=I,I.Consumer={$$typeof:o,_context:I},I},St.createElement=function(I,B,$){var N,U={},J=null;if(B!=null)for(N in B.key!==void 0&&(J=""+B.key),B)M.call(B,N)&&N!=="key"&&N!=="__self"&&N!=="__source"&&(U[N]=B[N]);var ne=arguments.length-2;if(ne===1)U.children=$;else if(1<ne){for(var se=Array(ne),he=0;he<ne;he++)se[he]=arguments[he+2];U.children=se}if(I&&I.defaultProps)for(N in ne=I.defaultProps,ne)U[N]===void 0&&(U[N]=ne[N]);return P(I,J,U)},St.createRef=function(){return{current:null}},St.forwardRef=function(I){return{$$typeof:c,render:I}},St.isValidElement=L,St.lazy=function(I){return{$$typeof:h,_payload:{_status:-1,_result:I},_init:Y}},St.memo=function(I,B){return{$$typeof:d,type:I,compare:B===void 0?null:B}},St.startTransition=function(I){var B=O.T,$={};O.T=$;try{var N=I(),U=O.S;U!==null&&U($,N),typeof N=="object"&&N!==null&&typeof N.then=="function"&&N.then(_,oe)}catch(J){oe(J)}finally{B!==null&&$.types!==null&&(B.types=$.types),O.T=B}},St.unstable_useCacheRefresh=function(){return O.H.useCacheRefresh()},St.use=function(I){return O.H.use(I)},St.useActionState=function(I,B,$){return O.H.useActionState(I,B,$)},St.useCallback=function(I,B){return O.H.useCallback(I,B)},St.useContext=function(I){return O.H.useContext(I)},St.useDebugValue=function(){},St.useDeferredValue=function(I,B){return O.H.useDeferredValue(I,B)},St.useEffect=function(I,B){return O.H.useEffect(I,B)},St.useEffectEvent=function(I){return O.H.useEffectEvent(I)},St.useId=function(){return O.H.useId()},St.useImperativeHandle=function(I,B,$){return O.H.useImperativeHandle(I,B,$)},St.useInsertionEffect=function(I,B){return O.H.useInsertionEffect(I,B)},St.useLayoutEffect=function(I,B){return O.H.useLayoutEffect(I,B)},St.useMemo=function(I,B){return O.H.useMemo(I,B)},St.useOptimistic=function(I,B){return O.H.useOptimistic(I,B)},St.useReducer=function(I,B,$){return O.H.useReducer(I,B,$)},St.useRef=function(I){return O.H.useRef(I)},St.useState=function(I){return O.H.useState(I)},St.useSyncExternalStore=function(I,B,$){return O.H.useSyncExternalStore(I,B,$)},St.useTransition=function(){return O.H.useTransition()},St.version="19.2.3",St}var QR;function sf(){return QR||(QR=1,Bb.exports=nF()),Bb.exports}var k=sf();const ki=Qs(k),of=JL({__proto__:null,default:ki},[k]);var Hb={exports:{}},gd={},Kb={exports:{}},Gb={};var JR;function rF(){return JR||(JR=1,(function(e){function t(G,H){var Y=G.length;G.push(H);e:for(;0<Y;){var oe=Y-1>>>1,re=G[oe];if(0<i(re,H))G[oe]=H,G[Y]=re,Y=oe;else break e}}function n(G){return G.length===0?null:G[0]}function r(G){if(G.length===0)return null;var H=G[0],Y=G.pop();if(Y!==H){G[0]=Y;e:for(var oe=0,re=G.length,I=re>>>1;oe<I;){var B=2*(oe+1)-1,$=G[B],N=B+1,U=G[N];if(0>i($,Y))N<re&&0>i(U,$)?(G[oe]=U,G[N]=Y,oe=N):(G[oe]=$,G[B]=Y,oe=B);else if(N<re&&0>i(U,Y))G[oe]=U,G[N]=Y,oe=N;else break e}}return H}function i(G,H){var Y=G.sortIndex-H.sortIndex;return Y!==0?Y:G.id-H.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.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,S=!1,y=!1,C=!1,x=!1,w=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;function b(G){for(var H=n(d);H!==null;){if(H.callback===null)r(d);else if(H.startTime<=G)r(d),H.sortIndex=H.expirationTime,t(u,H);else break;H=n(d)}}function T(G){if(C=!1,b(G),!y)if(n(u)!==null)y=!0,_||(_=!0,q());else{var H=n(d);H!==null&&ee(T,H.startTime-G)}}var _=!1,O=-1,M=5,P=-1;function z(){return x?!0:!(e.unstable_now()-P<M)}function L(){if(x=!1,_){var G=e.unstable_now();P=G;var H=!0;try{e:{y=!1,C&&(C=!1,v(O),O=-1),S=!0;var Y=g;try{t:{for(b(G),p=n(u);p!==null&&!(p.expirationTime>G&&z());){var oe=p.callback;if(typeof oe=="function"){p.callback=null,g=p.priorityLevel;var re=oe(p.expirationTime<=G);if(G=e.unstable_now(),typeof re=="function"){p.callback=re,b(G),H=!0;break t}p===n(u)&&r(u),b(G)}else r(u);p=n(u)}if(p!==null)H=!0;else{var I=n(d);I!==null&&ee(T,I.startTime-G),H=!1}}break e}finally{p=null,g=Y,S=!1}H=void 0}}finally{H?q():_=!1}}}var q;if(typeof E=="function")q=function(){E(L)};else if(typeof MessageChannel<"u"){var Z=new MessageChannel,te=Z.port2;Z.port1.onmessage=L,q=function(){te.postMessage(null)}}else q=function(){w(L,0)};function ee(G,H){O=w(function(){G(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(G){G.callback=null},e.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<G?Math.floor(1e3/G):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(G){switch(g){case 1:case 2:case 3:var H=3;break;default:H=g}var Y=g;g=H;try{return G()}finally{g=Y}},e.unstable_requestPaint=function(){x=!0},e.unstable_runWithPriority=function(G,H){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var Y=g;g=G;try{return H()}finally{g=Y}},e.unstable_scheduleCallback=function(G,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,G){case 1:var re=-1;break;case 2:re=250;break;case 5:re=1073741823;break;case 4:re=1e4;break;default:re=5e3}return re=Y+re,G={id:h++,callback:H,priorityLevel:G,startTime:Y,expirationTime:re,sortIndex:-1},Y>oe?(G.sortIndex=Y,t(d,G),n(u)===null&&G===n(d)&&(C?(v(O),O=-1):C=!0,ee(T,Y-oe))):(G.sortIndex=re,t(u,G),y||S||(y=!0,_||(_=!0,q()))),G},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(G){var H=g;return function(){var Y=g;g=H;try{return G.apply(this,arguments)}finally{g=Y}}}})(Gb)),Gb}var eO;function iF(){return eO||(eO=1,Kb.exports=rF()),Kb.exports}var Zb={exports:{}},Wr={};var tO;function sF(){if(tO)return Wr;tO=1;var e=sf();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},i=Symbol.for("react.portal");function o(u,d,h){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,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 o(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,S=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:S}):h==="script"&&r.d.X(u,{crossOrigin:p,integrity:g,fetchPriority:S,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 nO;function Cj(){if(nO)return Zb.exports;nO=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=sF(),Zb.exports}var rO;function oF(){if(rO)return gd;rO=1;var e=iF(),t=sf(),n=Cj();function r(s){var a="https://react.dev/errors/"+s;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 #"+s+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function o(s){var a=s,f=s;if(s.alternate)for(;a.return;)a=a.return;else{s=a;do a=s,(a.flags&4098)!==0&&(f=a.return),s=a.return;while(s)}return a.tag===3?f:null}function l(s){if(s.tag===13){var a=s.memoizedState;if(a===null&&(s=s.alternate,s!==null&&(a=s.memoizedState)),a!==null)return a.dehydrated}return null}function c(s){if(s.tag===31){var a=s.memoizedState;if(a===null&&(s=s.alternate,s!==null&&(a=s.memoizedState)),a!==null)return a.dehydrated}return null}function u(s){if(o(s)!==s)throw Error(r(188))}function d(s){var a=s.alternate;if(!a){if(a=o(s),a===null)throw Error(r(188));return a!==s?null:s}for(var f=s,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),s;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 D=!1,W=R.child;W;){if(W===f){D=!0,f=R,m=A;break}if(W===m){D=!0,m=R,f=A;break}W=W.sibling}if(!D){for(W=A.child;W;){if(W===f){D=!0,f=A,m=R;break}if(W===m){D=!0,m=A,f=R;break}W=W.sibling}if(!D)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?s:a}function h(s){var a=s.tag;if(a===5||a===26||a===27||a===6)return s;for(s=s.child;s!==null;){if(a=h(s),a!==null)return a;s=s.sibling}return null}var p=Object.assign,g=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),v=Symbol.for("react.consumer"),E=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),P=Symbol.for("react.activity"),z=Symbol.for("react.memo_cache_sentinel"),L=Symbol.iterator;function q(s){return s===null||typeof s!="object"?null:(s=L&&s[L]||s["@@iterator"],typeof s=="function"?s:null)}var Z=Symbol.for("react.client.reference");function te(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===Z?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case C:return"Fragment";case w:return"Profiler";case x:return"StrictMode";case T:return"Suspense";case _:return"SuspenseList";case P:return"Activity"}if(typeof s=="object")switch(s.$$typeof){case y:return"Portal";case E:return s.displayName||"Context";case v:return(s._context.displayName||"Context")+".Consumer";case b:var a=s.render;return s=s.displayName,s||(s=a.displayName||a.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case O:return a=s.displayName||null,a!==null?a:te(s.type)||"Memo";case M:a=s._payload,s=s._init;try{return te(s(a))}catch{}}return null}var ee=Array.isArray,G=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=[],re=-1;function I(s){return{current:s}}function B(s){0>re||(s.current=oe[re],oe[re]=null,re--)}function $(s,a){re++,oe[re]=s.current,s.current=a}var N=I(null),U=I(null),J=I(null),ne=I(null);function se(s,a){switch($(J,a),$(U,s),$(N,null),a.nodeType){case 9:case 11:s=(s=a.documentElement)&&(s=s.namespaceURI)?vR(s):0;break;default:if(s=a.tagName,a=a.namespaceURI)a=vR(a),s=bR(a,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}B(N),$(N,s)}function he(){B(N),B(U),B(J)}function Ee(s){s.memoizedState!==null&&$(ne,s);var a=N.current,f=bR(a,s.type);a!==f&&($(U,s),$(N,f))}function Q(s){U.current===s&&(B(N),B(U)),ne.current===s&&(B(ne),fd._currentValue=Y)}var ie,le;function Se(s){if(ie===void 0)try{throw Error()}catch(f){var a=f.stack.trim().match(/\n( *(at )?)/);ie=a&&a[1]||"",le=-1<f.stack.indexOf(`
2
- at`)?" (<anonymous>)":-1<f.stack.indexOf("@")?"@unknown:0:0":""}return`
3
- `+ie+s+le}var Te=!1;function we(s,a){if(!s||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(Ce){var xe=Ce}Reflect.construct(s,[],Pe)}else{try{Pe.call()}catch(Ce){xe=Ce}s.call(Pe.prototype)}}else{try{throw Error()}catch(Ce){xe=Ce}(Pe=s())&&typeof Pe.catch=="function"&&Pe.catch(function(){})}}catch(Ce){if(Ce&&xe&&typeof Ce.stack=="string")return[Ce.stack,xe.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(),D=A[0],W=A[1];if(D&&W){var ae=D.split(`
4
- `),be=W.split(`
5
- `);for(R=m=0;m<ae.length&&!ae[m].includes("DetermineComponentFrameRoot");)m++;for(;R<be.length&&!be[R].includes("DetermineComponentFrameRoot");)R++;if(m===ae.length||R===be.length)for(m=ae.length-1,R=be.length-1;1<=m&&0<=R&&ae[m]!==be[R];)R--;for(;1<=m&&0<=R;m--,R--)if(ae[m]!==be[R]){if(m!==1||R!==1)do if(m--,R--,0>R||ae[m]!==be[R]){var Ae=`
6
- `+ae[m].replace(" at new "," at ");return s.displayName&&Ae.includes("<anonymous>")&&(Ae=Ae.replace("<anonymous>",s.displayName)),Ae}while(1<=m&&0<=R);break}}}finally{Te=!1,Error.prepareStackTrace=f}return(f=s?s.displayName||s.name:"")?Se(f):""}function Ie(s,a){switch(s.tag){case 26:case 27:case 5:return Se(s.type);case 16:return Se("Lazy");case 13:return s.child!==a&&a!==null?Se("Suspense Fallback"):Se("Suspense");case 19:return Se("SuspenseList");case 0:case 15:return we(s.type,!1);case 11:return we(s.type.render,!1);case 1:return we(s.type,!0);case 31:return Se("Activity");default:return""}}function Fe(s){try{var a="",f=null;do a+=Ie(s,f),f=s,s=s.return;while(s);return a}catch(m){return`
7
- Error generating stack: `+m.message+`
8
- `+m.stack}}var ye=Object.prototype.hasOwnProperty,Ue=e.unstable_scheduleCallback,Re=e.unstable_cancelCallback,Ye=e.unstable_shouldYield,$e=e.unstable_requestPaint,Le=e.unstable_now,Ve=e.unstable_getCurrentPriorityLevel,ft=e.unstable_ImmediatePriority,Oe=e.unstable_UserBlockingPriority,me=e.unstable_NormalPriority,Ne=e.unstable_LowPriority,Ke=e.unstable_IdlePriority,it=e.log,yt=e.unstable_setDisableYieldValue,bt=null,ht=null;function on(s){if(typeof it=="function"&&yt(s),ht&&typeof ht.setStrictMode=="function")try{ht.setStrictMode(bt,s)}catch{}}var Vt=Math.clz32?Math.clz32:Nt,Et=Math.log,Yt=Math.LN2;function Nt(s){return s>>>=0,s===0?32:31-(Et(s)/Yt|0)|0}var qt=256,un=262144,bn=4194304;function Kt(s){var a=s&42;if(a!==0)return a;switch(s&-s){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 s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function vt(s,a,f){var m=s.pendingLanes;if(m===0)return 0;var R=0,A=s.suspendedLanes,D=s.pingedLanes;s=s.warmLanes;var W=m&134217727;return W!==0?(m=W&~A,m!==0?R=Kt(m):(D&=W,D!==0?R=Kt(D):f||(f=W&~s,f!==0&&(R=Kt(f))))):(W=m&~A,W!==0?R=Kt(W):D!==0?R=Kt(D):f||(f=m&~s,f!==0&&(R=Kt(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 Dt(s,a){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&a)===0}function jn(s,a){switch(s){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 ut(){var s=bn;return bn<<=1,(bn&62914560)===0&&(bn=4194304),s}function Wt(s){for(var a=[],f=0;31>f;f++)a.push(s);return a}function En(s,a){s.pendingLanes|=a,a!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function mn(s,a,f,m,R,A){var D=s.pendingLanes;s.pendingLanes=f,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=f,s.entangledLanes&=f,s.errorRecoveryDisabledLanes&=f,s.shellSuspendCounter=0;var W=s.entanglements,ae=s.expirationTimes,be=s.hiddenUpdates;for(f=D&~f;0<f;){var Ae=31-Vt(f),Pe=1<<Ae;W[Ae]=0,ae[Ae]=-1;var xe=be[Ae];if(xe!==null)for(be[Ae]=null,Ae=0;Ae<xe.length;Ae++){var Ce=xe[Ae];Ce!==null&&(Ce.lane&=-536870913)}f&=~Pe}m!==0&&Un(s,m,0),A!==0&&R===0&&s.tag!==0&&(s.suspendedLanes|=A&~(D&~a))}function Un(s,a,f){s.pendingLanes|=a,s.suspendedLanes&=~a;var m=31-Vt(a);s.entangledLanes|=a,s.entanglements[m]=s.entanglements[m]|1073741824|f&261930}function an(s,a){var f=s.entangledLanes|=a;for(s=s.entanglements;f;){var m=31-Vt(f),R=1<<m;R&a|s[m]&a&&(s[m]|=a),f&=~R}}function fr(s,a){var f=a&-a;return f=(f&42)!==0?1:Vn(f),(f&(s.suspendedLanes|a))!==0?0:f}function Vn(s){switch(s){case 2:s=1;break;case 8:s=4;break;case 32:s=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:s=128;break;case 268435456:s=134217728;break;default:s=0}return s}function Xt(s){return s&=-s,2<s?8<s?(s&134217727)!==0?32:268435456:8:2}function ar(){var s=H.p;return s!==0?s:(s=window.event,s===void 0?32:VR(s.type))}function ei(s,a){var f=H.p;try{return H.p=s,a()}finally{H.p=f}}var Sr=Math.random().toString(36).slice(2),Qt="__reactFiber$"+Sr,Cn="__reactProps$"+Sr,Nr="__reactContainer$"+Sr,bi="__reactEvents$"+Sr,Os="__reactListeners$"+Sr,_f="__reactHandles$"+Sr,rl="__reactResources$"+Sr,il="__reactMarker$"+Sr;function Ef(s){delete s[Qt],delete s[Cn],delete s[bi],delete s[Os],delete s[_f]}function Uo(s){var a=s[Qt];if(a)return a;for(var f=s.parentNode;f;){if(a=f[Nr]||f[Qt]){if(f=a.alternate,a.child!==null||f!==null&&f.child!==null)for(s=TR(s);s!==null;){if(f=s[Qt])return f;s=TR(s)}return a}s=f,f=s.parentNode}return null}function Vo(s){if(s=s[Qt]||s[Nr]){var a=s.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return s}return null}function sl(s){var a=s.tag;if(a===5||a===26||a===27||a===6)return s.stateNode;throw Error(r(33))}function qo(s){var a=s[rl];return a||(a=s[rl]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function dr(s){s[il]=!0}var ip=new Set,Cf={};function us(s,a){Bo(s,a),Bo(s+"Capture",a)}function Bo(s,a){for(Cf[s]=a,s=0;s<a.length;s++)ip.add(a[s])}var sp=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]*$"),op={},bc={};function li(s){return ye.call(bc,s)?!0:ye.call(op,s)?!1:sp.test(s)?bc[s]=!0:(op[s]=!0,!1)}function ol(s,a,f){if(li(a))if(f===null)s.removeAttribute(a);else{switch(typeof f){case"undefined":case"function":case"symbol":s.removeAttribute(a);return;case"boolean":var m=a.toLowerCase().slice(0,5);if(m!=="data-"&&m!=="aria-"){s.removeAttribute(a);return}}s.setAttribute(a,""+f)}}function Sc(s,a,f){if(f===null)s.removeAttribute(a);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(a);return}s.setAttribute(a,""+f)}}function Ui(s,a,f,m){if(m===null)s.removeAttribute(f);else{switch(typeof m){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(f);return}s.setAttributeNS(a,f,""+m)}}function ti(s){switch(typeof s){case"bigint":case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function Tf(s){var a=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function ap(s,a,f){var m=Object.getOwnPropertyDescriptor(s.constructor.prototype,a);if(!s.hasOwnProperty(a)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var R=m.get,A=m.set;return Object.defineProperty(s,a,{configurable:!0,get:function(){return R.call(this)},set:function(D){f=""+D,A.call(this,D)}}),Object.defineProperty(s,a,{enumerable:m.enumerable}),{getValue:function(){return f},setValue:function(D){f=""+D},stopTracking:function(){s._valueTracker=null,delete s[a]}}}}function Rf(s){if(!s._valueTracker){var a=Tf(s)?"checked":"value";s._valueTracker=ap(s,a,""+s[a])}}function Of(s){if(!s)return!1;var a=s._valueTracker;if(!a)return!0;var f=a.getValue(),m="";return s&&(m=Tf(s)?s.checked?"true":"false":s.value),s=m,s!==f?(a.setValue(s),!0):!1}function wc(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var Af=/[\n"\\]/g;function ci(s){return s.replace(Af,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function Ho(s,a,f,m,R,A,D,W){s.name="",D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"?s.type=D:s.removeAttribute("type"),a!=null?D==="number"?(a===0&&s.value===""||s.value!=a)&&(s.value=""+ti(a)):s.value!==""+ti(a)&&(s.value=""+ti(a)):D!=="submit"&&D!=="reset"||s.removeAttribute("value"),a!=null?kf(s,D,ti(a)):f!=null?kf(s,D,ti(f)):m!=null&&s.removeAttribute("value"),R==null&&A!=null&&(s.defaultChecked=!!A),R!=null&&(s.checked=R&&typeof R!="function"&&typeof R!="symbol"),W!=null&&typeof W!="function"&&typeof W!="symbol"&&typeof W!="boolean"?s.name=""+ti(W):s.removeAttribute("name")}function lp(s,a,f,m,R,A,D,W){if(A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"&&(s.type=A),a!=null||f!=null){if(!(A!=="submit"&&A!=="reset"||a!=null)){Rf(s);return}f=f!=null?""+ti(f):"",a=a!=null?""+ti(a):f,W||a===s.value||(s.value=a),s.defaultValue=a}m=m??R,m=typeof m!="function"&&typeof m!="symbol"&&!!m,s.checked=W?s.checked:!!m,s.defaultChecked=!!m,D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"&&(s.name=D),Rf(s)}function kf(s,a,f){a==="number"&&wc(s.ownerDocument)===s||s.defaultValue===""+f||(s.defaultValue=""+f)}function Ko(s,a,f,m){if(s=s.options,a){a={};for(var R=0;R<f.length;R++)a["$"+f[R]]=!0;for(f=0;f<s.length;f++)R=a.hasOwnProperty("$"+s[f].value),s[f].selected!==R&&(s[f].selected=R),R&&m&&(s[f].defaultSelected=!0)}else{for(f=""+ti(f),a=null,R=0;R<s.length;R++){if(s[R].value===f){s[R].selected=!0,m&&(s[R].defaultSelected=!0);return}a!==null||s[R].disabled||(a=s[R])}a!==null&&(a.selected=!0)}}function cp(s,a,f){if(a!=null&&(a=""+ti(a),a!==s.value&&(s.value=a),f==null)){s.defaultValue!==a&&(s.defaultValue=a);return}s.defaultValue=f!=null?""+ti(f):""}function al(s,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=ti(a),s.defaultValue=f,m=s.textContent,m===f&&m!==""&&m!==null&&(s.value=m),Rf(s)}function Go(s,a){if(a){var f=s.firstChild;if(f&&f===s.lastChild&&f.nodeType===3){f.nodeValue=a;return}}s.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 F(s,a,f){var m=a.indexOf("--")===0;f==null||typeof f=="boolean"||f===""?m?s.setProperty(a,""):a==="float"?s.cssFloat="":s[a]="":m?s.setProperty(a,f):typeof f!="number"||f===0||X.has(a)?a==="float"?s.cssFloat=f:s[a]=(""+f).trim():s[a]=f+"px"}function V(s,a,f){if(a!=null&&typeof a!="object")throw Error(r(62));if(s=s.style,f!=null){for(var m in f)!f.hasOwnProperty(m)||a!=null&&a.hasOwnProperty(m)||(m.indexOf("--")===0?s.setProperty(m,""):m==="float"?s.cssFloat="":s[m]="");for(var R in a)m=a[R],a.hasOwnProperty(R)&&f[R]!==m&&F(s,R,m)}else for(var A in a)a.hasOwnProperty(A)&&F(s,A,a[A])}function K(s){if(s.indexOf("-")===-1)return!1;switch(s){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 ue=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),_e=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ge(s){return _e.test(""+s)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":s}function ce(){}var Me=null;function De(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var qe=null,Be=null;function tt(s){var a=Vo(s);if(a&&(s=a.stateNode)){var f=s[Cn]||null;e:switch(s=a.stateNode,a.type){case"input":if(Ho(s,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name),a=f.name,f.type==="radio"&&a!=null){for(f=s;f.parentNode;)f=f.parentNode;for(f=f.querySelectorAll('input[name="'+ci(""+a)+'"][type="radio"]'),a=0;a<f.length;a++){var m=f[a];if(m!==s&&m.form===s.form){var R=m[Cn]||null;if(!R)throw Error(r(90));Ho(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===s.form&&Of(m)}break e;case"textarea":cp(s,f.value,f.defaultValue);break e;case"select":a=f.value,a!=null&&Ko(s,!!f.multiple,a,!1)}}}var He=!1;function Ct(s,a,f){if(He)return s(a,f);He=!0;try{var m=s(a);return m}finally{if(He=!1,(qe!==null||Be!==null)&&(Hp(),qe&&(a=qe,s=Be,Be=qe=null,tt(a),s)))for(a=0;a<s.length;a++)tt(s[a])}}function Ot(s,a){var f=s.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)||(s=s.type,m=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!m;break e;default:s=!1}if(s)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"),Jt=!1;if(st)try{var wr={};Object.defineProperty(wr,"passive",{get:function(){Jt=!0}}),window.addEventListener("test",wr,wr),window.removeEventListener("test",wr,wr)}catch{Jt=!1}var fn=null,ui=null,xr=null;function Zo(){if(xr)return xr;var s,a=ui,f=a.length,m,R="value"in fn?fn.value:fn.textContent,A=R.length;for(s=0;s<f&&a[s]===R[s];s++);var D=f-s;for(m=1;m<=D&&a[f-m]===R[A-m];m++);return xr=R.slice(s,1<m?1-m:void 0)}function fs(s){var a=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&a===13&&(s=13)):s=a,s===10&&(s=13),32<=s||s===13?s:0}function ds(){return!0}function Si(){return!1}function Dr(s){function a(f,m,R,A,D){this._reactName=f,this._targetInst=R,this.type=m,this.nativeEvent=A,this.target=D,this.currentTarget=null;for(var W in s)s.hasOwnProperty(W)&&(f=s[W],this[W]=f?f(A):A[W]);return this.isDefaultPrevented=(A.defaultPrevented!=null?A.defaultPrevented:A.returnValue===!1)?ds:Si,this.isPropagationStopped=Si,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=ds)},stopPropagation:function(){var f=this.nativeEvent;f&&(f.stopPropagation?f.stopPropagation():typeof f.cancelBubble!="unknown"&&(f.cancelBubble=!0),this.isPropagationStopped=ds)},persist:function(){},isPersistent:ds}),a}var hs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ll=Dr(hs),ps=p({},hs,{view:0,detail:0}),Mf=Dr(ps),cl,ul,fl,dl=p({},ps,{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(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==fl&&(fl&&s.type==="mousemove"?(cl=s.screenX-fl.screenX,ul=s.screenY-fl.screenY):ul=cl=0,fl=s),cl)},movementY:function(s){return"movementY"in s?s.movementY:ul}}),w2=Dr(dl),X6=p({},dl,{dataTransfer:0}),Q6=Dr(X6),J6=p({},ps,{relatedTarget:0}),G0=Dr(J6),e8=p({},hs,{animationName:0,elapsedTime:0,pseudoElement:0}),t8=Dr(e8),n8=p({},hs,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),r8=Dr(n8),i8=p({},hs,{data:0}),x2=Dr(i8),s8={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},o8={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"},a8={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function l8(s){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(s):(s=a8[s])?!!a[s]:!1}function Z0(){return l8}var c8=p({},ps,{key:function(s){if(s.key){var a=s8[s.key]||s.key;if(a!=="Unidentified")return a}return s.type==="keypress"?(s=fs(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?o8[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Z0,charCode:function(s){return s.type==="keypress"?fs(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?fs(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),u8=Dr(c8),f8=p({},dl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),_2=Dr(f8),d8=p({},ps,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Z0}),h8=Dr(d8),p8=p({},hs,{propertyName:0,elapsedTime:0,pseudoElement:0}),m8=Dr(p8),g8=p({},dl,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),y8=Dr(g8),v8=p({},hs,{newState:0,oldState:0}),b8=Dr(v8),S8=[9,13,27,32],Y0=st&&"CompositionEvent"in window,jf=null;st&&"documentMode"in document&&(jf=document.documentMode);var w8=st&&"TextEvent"in window&&!jf,E2=st&&(!Y0||jf&&8<jf&&11>=jf),C2=" ",T2=!1;function R2(s,a){switch(s){case"keyup":return S8.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function O2(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var xc=!1;function x8(s,a){switch(s){case"compositionend":return O2(a);case"keypress":return a.which!==32?null:(T2=!0,C2);case"textInput":return s=a.data,s===C2&&T2?null:s;default:return null}}function _8(s,a){if(xc)return s==="compositionend"||!Y0&&R2(s,a)?(s=Zo(),xr=ui=fn=null,xc=!1,s):null;switch(s){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 E2&&a.locale!=="ko"?null:a.data;default:return null}}var E8={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 A2(s){var a=s&&s.nodeName&&s.nodeName.toLowerCase();return a==="input"?!!E8[s.type]:a==="textarea"}function k2(s,a,f,m){qe?Be?Be.push(m):Be=[m]:qe=m,a=Qp(a,"onChange"),0<a.length&&(f=new ll("onChange","change",null,f,m),s.push({event:f,listeners:a}))}var Pf=null,Nf=null;function C8(s){dR(s,0)}function up(s){var a=sl(s);if(Of(a))return s}function M2(s,a){if(s==="change")return a}var j2=!1;if(st){var W0;if(st){var X0="oninput"in document;if(!X0){var P2=document.createElement("div");P2.setAttribute("oninput","return;"),X0=typeof P2.oninput=="function"}W0=X0}else W0=!1;j2=W0&&(!document.documentMode||9<document.documentMode)}function N2(){Pf&&(Pf.detachEvent("onpropertychange",D2),Nf=Pf=null)}function D2(s){if(s.propertyName==="value"&&up(Nf)){var a=[];k2(a,Nf,s,De(s)),Ct(C8,a)}}function T8(s,a,f){s==="focusin"?(N2(),Pf=a,Nf=f,Pf.attachEvent("onpropertychange",D2)):s==="focusout"&&N2()}function R8(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return up(Nf)}function O8(s,a){if(s==="click")return up(a)}function A8(s,a){if(s==="input"||s==="change")return up(a)}function k8(s,a){return s===a&&(s!==0||1/s===1/a)||s!==s&&a!==a}var wi=typeof Object.is=="function"?Object.is:k8;function Df(s,a){if(wi(s,a))return!0;if(typeof s!="object"||s===null||typeof a!="object"||a===null)return!1;var f=Object.keys(s),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)||!wi(s[R],a[R]))return!1}return!0}function I2(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function $2(s,a){var f=I2(s);s=0;for(var m;f;){if(f.nodeType===3){if(m=s+f.textContent.length,s<=a&&m>=a)return{node:f,offset:a-s};s=m}e:{for(;f;){if(f.nextSibling){f=f.nextSibling;break e}f=f.parentNode}f=void 0}f=I2(f)}}function z2(s,a){return s&&a?s===a?!0:s&&s.nodeType===3?!1:a&&a.nodeType===3?z2(s,a.parentNode):"contains"in s?s.contains(a):s.compareDocumentPosition?!!(s.compareDocumentPosition(a)&16):!1:!1}function L2(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var a=wc(s.document);a instanceof s.HTMLIFrameElement;){try{var f=typeof a.contentWindow.location.href=="string"}catch{f=!1}if(f)s=a.contentWindow;else break;a=wc(s.document)}return a}function Q0(s){var a=s&&s.nodeName&&s.nodeName.toLowerCase();return a&&(a==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||a==="textarea"||s.contentEditable==="true")}var M8=st&&"documentMode"in document&&11>=document.documentMode,_c=null,J0=null,If=null,ev=!1;function F2(s,a,f){var m=f.window===f?f.document:f.nodeType===9?f:f.ownerDocument;ev||_c==null||_c!==wc(m)||(m=_c,"selectionStart"in m&&Q0(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}),If&&Df(If,m)||(If=m,m=Qp(J0,"onSelect"),0<m.length&&(a=new ll("onSelect","select",null,a,f),s.push({event:a,listeners:m}),a.target=_c)))}function hl(s,a){var f={};return f[s.toLowerCase()]=a.toLowerCase(),f["Webkit"+s]="webkit"+a,f["Moz"+s]="moz"+a,f}var Ec={animationend:hl("Animation","AnimationEnd"),animationiteration:hl("Animation","AnimationIteration"),animationstart:hl("Animation","AnimationStart"),transitionrun:hl("Transition","TransitionRun"),transitionstart:hl("Transition","TransitionStart"),transitioncancel:hl("Transition","TransitionCancel"),transitionend:hl("Transition","TransitionEnd")},tv={},U2={};st&&(U2=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 pl(s){if(tv[s])return tv[s];if(!Ec[s])return s;var a=Ec[s],f;for(f in a)if(a.hasOwnProperty(f)&&f in U2)return tv[s]=a[f];return s}var V2=pl("animationend"),q2=pl("animationiteration"),B2=pl("animationstart"),j8=pl("transitionrun"),P8=pl("transitionstart"),N8=pl("transitioncancel"),H2=pl("transitionend"),K2=new Map,nv="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(" ");nv.push("scrollEnd");function ms(s,a){K2.set(s,a),us(a,[s])}var fp=typeof reportError=="function"?reportError:function(s){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof s=="object"&&s!==null&&typeof s.message=="string"?String(s.message):String(s),error:s});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",s);return}console.error(s)},Vi=[],Cc=0,rv=0;function dp(){for(var s=Cc,a=rv=Cc=0;a<s;){var f=Vi[a];Vi[a++]=null;var m=Vi[a];Vi[a++]=null;var R=Vi[a];Vi[a++]=null;var A=Vi[a];if(Vi[a++]=null,m!==null&&R!==null){var D=m.pending;D===null?R.next=R:(R.next=D.next,D.next=R),m.pending=R}A!==0&&G2(f,R,A)}}function hp(s,a,f,m){Vi[Cc++]=s,Vi[Cc++]=a,Vi[Cc++]=f,Vi[Cc++]=m,rv|=m,s.lanes|=m,s=s.alternate,s!==null&&(s.lanes|=m)}function iv(s,a,f,m){return hp(s,a,f,m),pp(s)}function ml(s,a){return hp(s,null,null,a),pp(s)}function G2(s,a,f){s.lanes|=f;var m=s.alternate;m!==null&&(m.lanes|=f);for(var R=!1,A=s.return;A!==null;)A.childLanes|=f,m=A.alternate,m!==null&&(m.childLanes|=f),A.tag===22&&(s=A.stateNode,s===null||s._visibility&1||(R=!0)),s=A,A=A.return;return s.tag===3?(A=s.stateNode,R&&a!==null&&(R=31-Vt(f),s=A.hiddenUpdates,m=s[R],m===null?s[R]=[a]:m.push(a),a.lane=f|536870912),A):null}function pp(s){if(50<id)throw id=0,hb=null,Error(r(185));for(var a=s.return;a!==null;)s=a,a=s.return;return s.tag===3?s.stateNode:null}var Tc={};function D8(s,a,f,m){this.tag=s,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 xi(s,a,f,m){return new D8(s,a,f,m)}function sv(s){return s=s.prototype,!(!s||!s.isReactComponent)}function oo(s,a){var f=s.alternate;return f===null?(f=xi(s.tag,a,s.key,s.mode),f.elementType=s.elementType,f.type=s.type,f.stateNode=s.stateNode,f.alternate=s,s.alternate=f):(f.pendingProps=a,f.type=s.type,f.flags=0,f.subtreeFlags=0,f.deletions=null),f.flags=s.flags&65011712,f.childLanes=s.childLanes,f.lanes=s.lanes,f.child=s.child,f.memoizedProps=s.memoizedProps,f.memoizedState=s.memoizedState,f.updateQueue=s.updateQueue,a=s.dependencies,f.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},f.sibling=s.sibling,f.index=s.index,f.ref=s.ref,f.refCleanup=s.refCleanup,f}function Z2(s,a){s.flags&=65011714;var f=s.alternate;return f===null?(s.childLanes=0,s.lanes=a,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=f.childLanes,s.lanes=f.lanes,s.child=f.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=f.memoizedProps,s.memoizedState=f.memoizedState,s.updateQueue=f.updateQueue,s.type=f.type,a=f.dependencies,s.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),s}function mp(s,a,f,m,R,A){var D=0;if(m=s,typeof s=="function")sv(s)&&(D=1);else if(typeof s=="string")D=FL(s,f,N.current)?26:s==="html"||s==="head"||s==="body"?27:5;else e:switch(s){case P:return s=xi(31,f,a,R),s.elementType=P,s.lanes=A,s;case C:return gl(f.children,R,A,a);case x:D=8,R|=24;break;case w:return s=xi(12,f,a,R|2),s.elementType=w,s.lanes=A,s;case T:return s=xi(13,f,a,R),s.elementType=T,s.lanes=A,s;case _:return s=xi(19,f,a,R),s.elementType=_,s.lanes=A,s;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case E:D=10;break e;case v:D=9;break e;case b:D=11;break e;case O:D=14;break e;case M:D=16,m=null;break e}D=29,f=Error(r(130,s===null?"null":typeof s,"")),m=null}return a=xi(D,f,a,R),a.elementType=s,a.type=m,a.lanes=A,a}function gl(s,a,f,m){return s=xi(7,s,m,a),s.lanes=f,s}function ov(s,a,f){return s=xi(6,s,null,a),s.lanes=f,s}function Y2(s){var a=xi(18,null,null,0);return a.stateNode=s,a}function av(s,a,f){return a=xi(4,s.children!==null?s.children:[],s.key,a),a.lanes=f,a.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},a}var W2=new WeakMap;function qi(s,a){if(typeof s=="object"&&s!==null){var f=W2.get(s);return f!==void 0?f:(a={value:s,source:a,stack:Fe(a)},W2.set(s,a),a)}return{value:s,source:a,stack:Fe(a)}}var Rc=[],Oc=0,gp=null,$f=0,Bi=[],Hi=0,Yo=null,As=1,ks="";function ao(s,a){Rc[Oc++]=$f,Rc[Oc++]=gp,gp=s,$f=a}function X2(s,a,f){Bi[Hi++]=As,Bi[Hi++]=ks,Bi[Hi++]=Yo,Yo=s;var m=As;s=ks;var R=32-Vt(m)-1;m&=~(1<<R),f+=1;var A=32-Vt(a)+R;if(30<A){var D=R-R%5;A=(m&(1<<D)-1).toString(32),m>>=D,R-=D,As=1<<32-Vt(a)+R|f<<R|m,ks=A+s}else As=1<<A|f<<R|m,ks=s}function lv(s){s.return!==null&&(ao(s,1),X2(s,1,0))}function cv(s){for(;s===gp;)gp=Rc[--Oc],Rc[Oc]=null,$f=Rc[--Oc],Rc[Oc]=null;for(;s===Yo;)Yo=Bi[--Hi],Bi[Hi]=null,ks=Bi[--Hi],Bi[Hi]=null,As=Bi[--Hi],Bi[Hi]=null}function Q2(s,a){Bi[Hi++]=As,Bi[Hi++]=ks,Bi[Hi++]=Yo,As=a.id,ks=a.overflow,Yo=s}var Ir=null,Pn=null,Bt=!1,Wo=null,Ki=!1,uv=Error(r(519));function Xo(s){var a=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw zf(qi(a,s)),uv}function J2(s){var a=s.stateNode,f=s.type,m=s.memoizedProps;switch(a[Qt]=s,a[Cn]=m,f){case"dialog":zt("cancel",a),zt("close",a);break;case"iframe":case"object":case"embed":zt("load",a);break;case"video":case"audio":for(f=0;f<od.length;f++)zt(od[f],a);break;case"source":zt("error",a);break;case"img":case"image":case"link":zt("error",a),zt("load",a);break;case"details":zt("toggle",a);break;case"input":zt("invalid",a),lp(a,m.value,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name,!0);break;case"select":zt("invalid",a);break;case"textarea":zt("invalid",a),al(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||gR(a.textContent,f)?(m.popover!=null&&(zt("beforetoggle",a),zt("toggle",a)),m.onScroll!=null&&zt("scroll",a),m.onScrollEnd!=null&&zt("scrollend",a),m.onClick!=null&&(a.onclick=ce),a=!0):a=!1,a||Xo(s,!0)}function eC(s){for(Ir=s.return;Ir;)switch(Ir.tag){case 5:case 31:case 13:Ki=!1;return;case 27:case 3:Ki=!0;return;default:Ir=Ir.return}}function Ac(s){if(s!==Ir)return!1;if(!Bt)return eC(s),Bt=!0,!1;var a=s.tag,f;if((f=a!==3&&a!==27)&&((f=a===5)&&(f=s.type,f=!(f!=="form"&&f!=="button")||Ob(s.type,s.memoizedProps)),f=!f),f&&Pn&&Xo(s),eC(s),a===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));Pn=CR(s)}else if(a===31){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));Pn=CR(s)}else a===27?(a=Pn,fa(s.type)?(s=Pb,Pb=null,Pn=s):Pn=a):Pn=Ir?Zi(s.stateNode.nextSibling):null;return!0}function yl(){Pn=Ir=null,Bt=!1}function fv(){var s=Wo;return s!==null&&(pi===null?pi=s:pi.push.apply(pi,s),Wo=null),s}function zf(s){Wo===null?Wo=[s]:Wo.push(s)}var dv=I(null),vl=null,lo=null;function Qo(s,a,f){$(dv,a._currentValue),a._currentValue=f}function co(s){s._currentValue=dv.current,B(dv)}function hv(s,a,f){for(;s!==null;){var m=s.alternate;if((s.childLanes&a)!==a?(s.childLanes|=a,m!==null&&(m.childLanes|=a)):m!==null&&(m.childLanes&a)!==a&&(m.childLanes|=a),s===f)break;s=s.return}}function pv(s,a,f,m){var R=s.child;for(R!==null&&(R.return=s);R!==null;){var A=R.dependencies;if(A!==null){var D=R.child;A=A.firstContext;e:for(;A!==null;){var W=A;A=R;for(var ae=0;ae<a.length;ae++)if(W.context===a[ae]){A.lanes|=f,W=A.alternate,W!==null&&(W.lanes|=f),hv(A.return,f,s),m||(D=null);break e}A=W.next}}else if(R.tag===18){if(D=R.return,D===null)throw Error(r(341));D.lanes|=f,A=D.alternate,A!==null&&(A.lanes|=f),hv(D,f,s),D=null}else D=R.child;if(D!==null)D.return=R;else for(D=R;D!==null;){if(D===s){D=null;break}if(R=D.sibling,R!==null){R.return=D.return,D=R;break}D=D.return}R=D}}function kc(s,a,f,m){s=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 D=R.alternate;if(D===null)throw Error(r(387));if(D=D.memoizedProps,D!==null){var W=R.type;wi(R.pendingProps.value,D.value)||(s!==null?s.push(W):s=[W])}}else if(R===ne.current){if(D=R.alternate,D===null)throw Error(r(387));D.memoizedState.memoizedState!==R.memoizedState.memoizedState&&(s!==null?s.push(fd):s=[fd])}R=R.return}s!==null&&pv(a,s,f,m),a.flags|=262144}function yp(s){for(s=s.firstContext;s!==null;){if(!wi(s.context._currentValue,s.memoizedValue))return!0;s=s.next}return!1}function bl(s){vl=s,lo=null,s=s.dependencies,s!==null&&(s.firstContext=null)}function $r(s){return tC(vl,s)}function vp(s,a){return vl===null&&bl(s),tC(s,a)}function tC(s,a){var f=a._currentValue;if(a={context:a,memoizedValue:f,next:null},lo===null){if(s===null)throw Error(r(308));lo=a,s.dependencies={lanes:0,firstContext:a},s.flags|=524288}else lo=lo.next=a;return f}var I8=typeof AbortController<"u"?AbortController:function(){var s=[],a=this.signal={aborted:!1,addEventListener:function(f,m){s.push(m)}};this.abort=function(){a.aborted=!0,s.forEach(function(f){return f()})}},$8=e.unstable_scheduleCallback,z8=e.unstable_NormalPriority,hr={$$typeof:E,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function mv(){return{controller:new I8,data:new Map,refCount:0}}function Lf(s){s.refCount--,s.refCount===0&&$8(z8,function(){s.controller.abort()})}var Ff=null,gv=0,Mc=0,jc=null;function L8(s,a){if(Ff===null){var f=Ff=[];gv=0,Mc=bb(),jc={status:"pending",value:void 0,then:function(m){f.push(m)}}}return gv++,a.then(nC,nC),a}function nC(){if(--gv===0&&Ff!==null){jc!==null&&(jc.status="fulfilled");var s=Ff;Ff=null,Mc=0,jc=null;for(var a=0;a<s.length;a++)(0,s[a])()}}function F8(s,a){var f=[],m={status:"pending",value:null,reason:null,then:function(R){f.push(R)}};return s.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 rC=G.S;G.S=function(s,a){FT=Le(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&L8(s,a),rC!==null&&rC(s,a)};var Sl=I(null);function yv(){var s=Sl.current;return s!==null?s:Tn.pooledCache}function bp(s,a){a===null?$(Sl,Sl.current):$(Sl,a.pool)}function iC(){var s=yv();return s===null?null:{parent:hr._currentValue,pool:s}}var Pc=Error(r(460)),vv=Error(r(474)),Sp=Error(r(542)),wp={then:function(){}};function sC(s){return s=s.status,s==="fulfilled"||s==="rejected"}function oC(s,a,f){switch(f=s[f],f===void 0?s.push(a):f!==a&&(a.then(ce,ce),a=f),a.status){case"fulfilled":return a.value;case"rejected":throw s=a.reason,lC(s),s;default:if(typeof a.status=="string")a.then(ce,ce);else{if(s=Tn,s!==null&&100<s.shellSuspendCounter)throw Error(r(482));s=a,s.status="pending",s.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 s=a.reason,lC(s),s}throw xl=a,Pc}}function wl(s){try{var a=s._init;return a(s._payload)}catch(f){throw f!==null&&typeof f=="object"&&typeof f.then=="function"?(xl=f,Pc):f}}var xl=null;function aC(){if(xl===null)throw Error(r(459));var s=xl;return xl=null,s}function lC(s){if(s===Pc||s===Sp)throw Error(r(483))}var Nc=null,Uf=0;function xp(s){var a=Uf;return Uf+=1,Nc===null&&(Nc=[]),oC(Nc,s,a)}function Vf(s,a){a=a.props.ref,s.ref=a!==void 0?a:null}function _p(s,a){throw a.$$typeof===g?Error(r(525)):(s=Object.prototype.toString.call(a),Error(r(31,s==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":s)))}function cC(s){function a(pe,de){if(s){var ve=pe.deletions;ve===null?(pe.deletions=[de],pe.flags|=16):ve.push(de)}}function f(pe,de){if(!s)return null;for(;de!==null;)a(pe,de),de=de.sibling;return null}function m(pe){for(var de=new Map;pe!==null;)pe.key!==null?de.set(pe.key,pe):de.set(pe.index,pe),pe=pe.sibling;return de}function R(pe,de){return pe=oo(pe,de),pe.index=0,pe.sibling=null,pe}function A(pe,de,ve){return pe.index=ve,s?(ve=pe.alternate,ve!==null?(ve=ve.index,ve<de?(pe.flags|=67108866,de):ve):(pe.flags|=67108866,de)):(pe.flags|=1048576,de)}function D(pe){return s&&pe.alternate===null&&(pe.flags|=67108866),pe}function W(pe,de,ve,je){return de===null||de.tag!==6?(de=ov(ve,pe.mode,je),de.return=pe,de):(de=R(de,ve),de.return=pe,de)}function ae(pe,de,ve,je){var ot=ve.type;return ot===C?Ae(pe,de,ve.props.children,je,ve.key):de!==null&&(de.elementType===ot||typeof ot=="object"&&ot!==null&&ot.$$typeof===M&&wl(ot)===de.type)?(de=R(de,ve.props),Vf(de,ve),de.return=pe,de):(de=mp(ve.type,ve.key,ve.props,null,pe.mode,je),Vf(de,ve),de.return=pe,de)}function be(pe,de,ve,je){return de===null||de.tag!==4||de.stateNode.containerInfo!==ve.containerInfo||de.stateNode.implementation!==ve.implementation?(de=av(ve,pe.mode,je),de.return=pe,de):(de=R(de,ve.children||[]),de.return=pe,de)}function Ae(pe,de,ve,je,ot){return de===null||de.tag!==7?(de=gl(ve,pe.mode,je,ot),de.return=pe,de):(de=R(de,ve),de.return=pe,de)}function Pe(pe,de,ve){if(typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint")return de=ov(""+de,pe.mode,ve),de.return=pe,de;if(typeof de=="object"&&de!==null){switch(de.$$typeof){case S:return ve=mp(de.type,de.key,de.props,null,pe.mode,ve),Vf(ve,de),ve.return=pe,ve;case y:return de=av(de,pe.mode,ve),de.return=pe,de;case M:return de=wl(de),Pe(pe,de,ve)}if(ee(de)||q(de))return de=gl(de,pe.mode,ve,null),de.return=pe,de;if(typeof de.then=="function")return Pe(pe,xp(de),ve);if(de.$$typeof===E)return Pe(pe,vp(pe,de),ve);_p(pe,de)}return null}function xe(pe,de,ve,je){var ot=de!==null?de.key:null;if(typeof ve=="string"&&ve!==""||typeof ve=="number"||typeof ve=="bigint")return ot!==null?null:W(pe,de,""+ve,je);if(typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case S:return ve.key===ot?ae(pe,de,ve,je):null;case y:return ve.key===ot?be(pe,de,ve,je):null;case M:return ve=wl(ve),xe(pe,de,ve,je)}if(ee(ve)||q(ve))return ot!==null?null:Ae(pe,de,ve,je,null);if(typeof ve.then=="function")return xe(pe,de,xp(ve),je);if(ve.$$typeof===E)return xe(pe,de,vp(pe,ve),je);_p(pe,ve)}return null}function Ce(pe,de,ve,je,ot){if(typeof je=="string"&&je!==""||typeof je=="number"||typeof je=="bigint")return pe=pe.get(ve)||null,W(de,pe,""+je,ot);if(typeof je=="object"&&je!==null){switch(je.$$typeof){case S:return pe=pe.get(je.key===null?ve:je.key)||null,ae(de,pe,je,ot);case y:return pe=pe.get(je.key===null?ve:je.key)||null,be(de,pe,je,ot);case M:return je=wl(je),Ce(pe,de,ve,je,ot)}if(ee(je)||q(je))return pe=pe.get(ve)||null,Ae(de,pe,je,ot,null);if(typeof je.then=="function")return Ce(pe,de,ve,xp(je),ot);if(je.$$typeof===E)return Ce(pe,de,ve,vp(de,je),ot);_p(de,je)}return null}function We(pe,de,ve,je){for(var ot=null,en=null,Je=de,Tt=de=0,Ft=null;Je!==null&&Tt<ve.length;Tt++){Je.index>Tt?(Ft=Je,Je=null):Ft=Je.sibling;var tn=xe(pe,Je,ve[Tt],je);if(tn===null){Je===null&&(Je=Ft);break}s&&Je&&tn.alternate===null&&a(pe,Je),de=A(tn,de,Tt),en===null?ot=tn:en.sibling=tn,en=tn,Je=Ft}if(Tt===ve.length)return f(pe,Je),Bt&&ao(pe,Tt),ot;if(Je===null){for(;Tt<ve.length;Tt++)Je=Pe(pe,ve[Tt],je),Je!==null&&(de=A(Je,de,Tt),en===null?ot=Je:en.sibling=Je,en=Je);return Bt&&ao(pe,Tt),ot}for(Je=m(Je);Tt<ve.length;Tt++)Ft=Ce(Je,pe,Tt,ve[Tt],je),Ft!==null&&(s&&Ft.alternate!==null&&Je.delete(Ft.key===null?Tt:Ft.key),de=A(Ft,de,Tt),en===null?ot=Ft:en.sibling=Ft,en=Ft);return s&&Je.forEach(function(ga){return a(pe,ga)}),Bt&&ao(pe,Tt),ot}function ct(pe,de,ve,je){if(ve==null)throw Error(r(151));for(var ot=null,en=null,Je=de,Tt=de=0,Ft=null,tn=ve.next();Je!==null&&!tn.done;Tt++,tn=ve.next()){Je.index>Tt?(Ft=Je,Je=null):Ft=Je.sibling;var ga=xe(pe,Je,tn.value,je);if(ga===null){Je===null&&(Je=Ft);break}s&&Je&&ga.alternate===null&&a(pe,Je),de=A(ga,de,Tt),en===null?ot=ga:en.sibling=ga,en=ga,Je=Ft}if(tn.done)return f(pe,Je),Bt&&ao(pe,Tt),ot;if(Je===null){for(;!tn.done;Tt++,tn=ve.next())tn=Pe(pe,tn.value,je),tn!==null&&(de=A(tn,de,Tt),en===null?ot=tn:en.sibling=tn,en=tn);return Bt&&ao(pe,Tt),ot}for(Je=m(Je);!tn.done;Tt++,tn=ve.next())tn=Ce(Je,pe,Tt,tn.value,je),tn!==null&&(s&&tn.alternate!==null&&Je.delete(tn.key===null?Tt:tn.key),de=A(tn,de,Tt),en===null?ot=tn:en.sibling=tn,en=tn);return s&&Je.forEach(function(XL){return a(pe,XL)}),Bt&&ao(pe,Tt),ot}function xn(pe,de,ve,je){if(typeof ve=="object"&&ve!==null&&ve.type===C&&ve.key===null&&(ve=ve.props.children),typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case S:e:{for(var ot=ve.key;de!==null;){if(de.key===ot){if(ot=ve.type,ot===C){if(de.tag===7){f(pe,de.sibling),je=R(de,ve.props.children),je.return=pe,pe=je;break e}}else if(de.elementType===ot||typeof ot=="object"&&ot!==null&&ot.$$typeof===M&&wl(ot)===de.type){f(pe,de.sibling),je=R(de,ve.props),Vf(je,ve),je.return=pe,pe=je;break e}f(pe,de);break}else a(pe,de);de=de.sibling}ve.type===C?(je=gl(ve.props.children,pe.mode,je,ve.key),je.return=pe,pe=je):(je=mp(ve.type,ve.key,ve.props,null,pe.mode,je),Vf(je,ve),je.return=pe,pe=je)}return D(pe);case y:e:{for(ot=ve.key;de!==null;){if(de.key===ot)if(de.tag===4&&de.stateNode.containerInfo===ve.containerInfo&&de.stateNode.implementation===ve.implementation){f(pe,de.sibling),je=R(de,ve.children||[]),je.return=pe,pe=je;break e}else{f(pe,de);break}else a(pe,de);de=de.sibling}je=av(ve,pe.mode,je),je.return=pe,pe=je}return D(pe);case M:return ve=wl(ve),xn(pe,de,ve,je)}if(ee(ve))return We(pe,de,ve,je);if(q(ve)){if(ot=q(ve),typeof ot!="function")throw Error(r(150));return ve=ot.call(ve),ct(pe,de,ve,je)}if(typeof ve.then=="function")return xn(pe,de,xp(ve),je);if(ve.$$typeof===E)return xn(pe,de,vp(pe,ve),je);_p(pe,ve)}return typeof ve=="string"&&ve!==""||typeof ve=="number"||typeof ve=="bigint"?(ve=""+ve,de!==null&&de.tag===6?(f(pe,de.sibling),je=R(de,ve),je.return=pe,pe=je):(f(pe,de),je=ov(ve,pe.mode,je),je.return=pe,pe=je),D(pe)):f(pe,de)}return function(pe,de,ve,je){try{Uf=0;var ot=xn(pe,de,ve,je);return Nc=null,ot}catch(Je){if(Je===Pc||Je===Sp)throw Je;var en=xi(29,Je,null,pe.mode);return en.lanes=je,en.return=pe,en}}}var _l=cC(!0),uC=cC(!1),Jo=!1;function bv(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Sv(s,a){s=s.updateQueue,a.updateQueue===s&&(a.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function ea(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function ta(s,a,f){var m=s.updateQueue;if(m===null)return null;if(m=m.shared,(ln&2)!==0){var R=m.pending;return R===null?a.next=a:(a.next=R.next,R.next=a),m.pending=a,a=pp(s),G2(s,null,f),a}return hp(s,m,a,f),pp(s)}function qf(s,a,f){if(a=a.updateQueue,a!==null&&(a=a.shared,(f&4194048)!==0)){var m=a.lanes;m&=s.pendingLanes,f|=m,a.lanes=f,an(s,f)}}function wv(s,a){var f=s.updateQueue,m=s.alternate;if(m!==null&&(m=m.updateQueue,f===m)){var R=null,A=null;if(f=f.firstBaseUpdate,f!==null){do{var D={lane:f.lane,tag:f.tag,payload:f.payload,callback:null,next:null};A===null?R=A=D:A=A.next=D,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},s.updateQueue=f;return}s=f.lastBaseUpdate,s===null?f.firstBaseUpdate=a:s.next=a,f.lastBaseUpdate=a}var xv=!1;function Bf(){if(xv){var s=jc;if(s!==null)throw s}}function Hf(s,a,f,m){xv=!1;var R=s.updateQueue;Jo=!1;var A=R.firstBaseUpdate,D=R.lastBaseUpdate,W=R.shared.pending;if(W!==null){R.shared.pending=null;var ae=W,be=ae.next;ae.next=null,D===null?A=be:D.next=be,D=ae;var Ae=s.alternate;Ae!==null&&(Ae=Ae.updateQueue,W=Ae.lastBaseUpdate,W!==D&&(W===null?Ae.firstBaseUpdate=be:W.next=be,Ae.lastBaseUpdate=ae))}if(A!==null){var Pe=R.baseState;D=0,Ae=be=ae=null,W=A;do{var xe=W.lane&-536870913,Ce=xe!==W.lane;if(Ce?(Lt&xe)===xe:(m&xe)===xe){xe!==0&&xe===Mc&&(xv=!0),Ae!==null&&(Ae=Ae.next={lane:0,tag:W.tag,payload:W.payload,callback:null,next:null});e:{var We=s,ct=W;xe=a;var xn=f;switch(ct.tag){case 1:if(We=ct.payload,typeof We=="function"){Pe=We.call(xn,Pe,xe);break e}Pe=We;break e;case 3:We.flags=We.flags&-65537|128;case 0:if(We=ct.payload,xe=typeof We=="function"?We.call(xn,Pe,xe):We,xe==null)break e;Pe=p({},Pe,xe);break e;case 2:Jo=!0}}xe=W.callback,xe!==null&&(s.flags|=64,Ce&&(s.flags|=8192),Ce=R.callbacks,Ce===null?R.callbacks=[xe]:Ce.push(xe))}else Ce={lane:xe,tag:W.tag,payload:W.payload,callback:W.callback,next:null},Ae===null?(be=Ae=Ce,ae=Pe):Ae=Ae.next=Ce,D|=xe;if(W=W.next,W===null){if(W=R.shared.pending,W===null)break;Ce=W,W=Ce.next,Ce.next=null,R.lastBaseUpdate=Ce,R.shared.pending=null}}while(!0);Ae===null&&(ae=Pe),R.baseState=ae,R.firstBaseUpdate=be,R.lastBaseUpdate=Ae,A===null&&(R.shared.lanes=0),oa|=D,s.lanes=D,s.memoizedState=Pe}}function fC(s,a){if(typeof s!="function")throw Error(r(191,s));s.call(a)}function dC(s,a){var f=s.callbacks;if(f!==null)for(s.callbacks=null,s=0;s<f.length;s++)fC(f[s],a)}var Dc=I(null),Ep=I(0);function hC(s,a){s=bo,$(Ep,s),$(Dc,a),bo=s|a.baseLanes}function _v(){$(Ep,bo),$(Dc,Dc.current)}function Ev(){bo=Ep.current,B(Dc),B(Ep)}var _i=I(null),Gi=null;function na(s){var a=s.alternate;$(lr,lr.current&1),$(_i,s),Gi===null&&(a===null||Dc.current!==null||a.memoizedState!==null)&&(Gi=s)}function Cv(s){$(lr,lr.current),$(_i,s),Gi===null&&(Gi=s)}function pC(s){s.tag===22?($(lr,lr.current),$(_i,s),Gi===null&&(Gi=s)):ra()}function ra(){$(lr,lr.current),$(_i,_i.current)}function Ei(s){B(_i),Gi===s&&(Gi=null),B(lr)}var lr=I(0);function Cp(s){for(var a=s;a!==null;){if(a.tag===13){var f=a.memoizedState;if(f!==null&&(f=f.dehydrated,f===null||Mb(f)||jb(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===s)break;for(;a.sibling===null;){if(a.return===null||a.return===s)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var uo=0,_t=null,Sn=null,pr=null,Tp=!1,Ic=!1,El=!1,Rp=0,Kf=0,$c=null,U8=0;function tr(){throw Error(r(321))}function Tv(s,a){if(a===null)return!1;for(var f=0;f<a.length&&f<s.length;f++)if(!wi(s[f],a[f]))return!1;return!0}function Rv(s,a,f,m,R,A){return uo=A,_t=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,G.H=s===null||s.memoizedState===null?XC:Vv,El=!1,A=f(m,R),El=!1,Ic&&(A=gC(a,f,m,R)),mC(s),A}function mC(s){G.H=Yf;var a=Sn!==null&&Sn.next!==null;if(uo=0,pr=Sn=_t=null,Tp=!1,Kf=0,$c=null,a)throw Error(r(300));s===null||mr||(s=s.dependencies,s!==null&&yp(s)&&(mr=!0))}function gC(s,a,f,m){_t=s;var R=0;do{if(Ic&&($c=null),Kf=0,Ic=!1,25<=R)throw Error(r(301));if(R+=1,pr=Sn=null,s.updateQueue!=null){var A=s.updateQueue;A.lastEffect=null,A.events=null,A.stores=null,A.memoCache!=null&&(A.memoCache.index=0)}G.H=QC,A=a(f,m)}while(Ic);return A}function V8(){var s=G.H,a=s.useState()[0];return a=typeof a.then=="function"?Gf(a):a,s=s.useState()[0],(Sn!==null?Sn.memoizedState:null)!==s&&(_t.flags|=1024),a}function Ov(){var s=Rp!==0;return Rp=0,s}function Av(s,a,f){a.updateQueue=s.updateQueue,a.flags&=-2053,s.lanes&=~f}function kv(s){if(Tp){for(s=s.memoizedState;s!==null;){var a=s.queue;a!==null&&(a.pending=null),s=s.next}Tp=!1}uo=0,pr=Sn=_t=null,Ic=!1,Kf=Rp=0,$c=null}function ni(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return pr===null?_t.memoizedState=pr=s:pr=pr.next=s,pr}function cr(){if(Sn===null){var s=_t.alternate;s=s!==null?s.memoizedState:null}else s=Sn.next;var a=pr===null?_t.memoizedState:pr.next;if(a!==null)pr=a,Sn=s;else{if(s===null)throw _t.alternate===null?Error(r(467)):Error(r(310));Sn=s,s={memoizedState:Sn.memoizedState,baseState:Sn.baseState,baseQueue:Sn.baseQueue,queue:Sn.queue,next:null},pr===null?_t.memoizedState=pr=s:pr=pr.next=s}return pr}function Op(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Gf(s){var a=Kf;return Kf+=1,$c===null&&($c=[]),s=oC($c,s,a),a=_t,(pr===null?a.memoizedState:pr.next)===null&&(a=a.alternate,G.H=a===null||a.memoizedState===null?XC:Vv),s}function Ap(s){if(s!==null&&typeof s=="object"){if(typeof s.then=="function")return Gf(s);if(s.$$typeof===E)return $r(s)}throw Error(r(438,String(s)))}function Mv(s){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=Op(),_t.updateQueue=f),f.memoCache=a,f=a.data[a.index],f===void 0)for(f=a.data[a.index]=Array(s),m=0;m<s;m++)f[m]=z;return a.index++,f}function fo(s,a){return typeof a=="function"?a(s):a}function kp(s){var a=cr();return jv(a,Sn,s)}function jv(s,a,f){var m=s.queue;if(m===null)throw Error(r(311));m.lastRenderedReducer=f;var R=s.baseQueue,A=m.pending;if(A!==null){if(R!==null){var D=R.next;R.next=A.next,A.next=D}a.baseQueue=R=A,m.pending=null}if(A=s.baseState,R===null)s.memoizedState=A;else{a=R.next;var W=D=null,ae=null,be=a,Ae=!1;do{var Pe=be.lane&-536870913;if(Pe!==be.lane?(Lt&Pe)===Pe:(uo&Pe)===Pe){var xe=be.revertLane;if(xe===0)ae!==null&&(ae=ae.next={lane:0,revertLane:0,gesture:null,action:be.action,hasEagerState:be.hasEagerState,eagerState:be.eagerState,next:null}),Pe===Mc&&(Ae=!0);else if((uo&xe)===xe){be=be.next,xe===Mc&&(Ae=!0);continue}else Pe={lane:0,revertLane:be.revertLane,gesture:null,action:be.action,hasEagerState:be.hasEagerState,eagerState:be.eagerState,next:null},ae===null?(W=ae=Pe,D=A):ae=ae.next=Pe,_t.lanes|=xe,oa|=xe;Pe=be.action,El&&f(A,Pe),A=be.hasEagerState?be.eagerState:f(A,Pe)}else xe={lane:Pe,revertLane:be.revertLane,gesture:be.gesture,action:be.action,hasEagerState:be.hasEagerState,eagerState:be.eagerState,next:null},ae===null?(W=ae=xe,D=A):ae=ae.next=xe,_t.lanes|=Pe,oa|=Pe;be=be.next}while(be!==null&&be!==a);if(ae===null?D=A:ae.next=W,!wi(A,s.memoizedState)&&(mr=!0,Ae&&(f=jc,f!==null)))throw f;s.memoizedState=A,s.baseState=D,s.baseQueue=ae,m.lastRenderedState=A}return R===null&&(m.lanes=0),[s.memoizedState,m.dispatch]}function Pv(s){var a=cr(),f=a.queue;if(f===null)throw Error(r(311));f.lastRenderedReducer=s;var m=f.dispatch,R=f.pending,A=a.memoizedState;if(R!==null){f.pending=null;var D=R=R.next;do A=s(A,D.action),D=D.next;while(D!==R);wi(A,a.memoizedState)||(mr=!0),a.memoizedState=A,a.baseQueue===null&&(a.baseState=A),f.lastRenderedState=A}return[A,m]}function yC(s,a,f){var m=_t,R=cr(),A=Bt;if(A){if(f===void 0)throw Error(r(407));f=f()}else f=a();var D=!wi((Sn||R).memoizedState,f);if(D&&(R.memoizedState=f,mr=!0),R=R.queue,Iv(SC.bind(null,m,R,s),[s]),R.getSnapshot!==a||D||pr!==null&&pr.memoizedState.tag&1){if(m.flags|=2048,zc(9,{destroy:void 0},bC.bind(null,m,R,f,a),null),Tn===null)throw Error(r(349));A||(uo&127)!==0||vC(m,a,f)}return f}function vC(s,a,f){s.flags|=16384,s={getSnapshot:a,value:f},a=_t.updateQueue,a===null?(a=Op(),_t.updateQueue=a,a.stores=[s]):(f=a.stores,f===null?a.stores=[s]:f.push(s))}function bC(s,a,f,m){a.value=f,a.getSnapshot=m,wC(a)&&xC(s)}function SC(s,a,f){return f(function(){wC(a)&&xC(s)})}function wC(s){var a=s.getSnapshot;s=s.value;try{var f=a();return!wi(s,f)}catch{return!0}}function xC(s){var a=ml(s,2);a!==null&&mi(a,s,2)}function Nv(s){var a=ni();if(typeof s=="function"){var f=s;if(s=f(),El){on(!0);try{f()}finally{on(!1)}}}return a.memoizedState=a.baseState=s,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:fo,lastRenderedState:s},a}function _C(s,a,f,m){return s.baseState=f,jv(s,Sn,typeof m=="function"?m:fo)}function q8(s,a,f,m,R){if(Pp(s))throw Error(r(485));if(s=a.action,s!==null){var A={payload:R,action:s,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(D){A.listeners.push(D)}};G.T!==null?f(!0):A.isTransition=!1,m(A),f=a.pending,f===null?(A.next=a.pending=A,EC(a,A)):(A.next=f.next,a.pending=f.next=A)}}function EC(s,a){var f=a.action,m=a.payload,R=s.state;if(a.isTransition){var A=G.T,D={};G.T=D;try{var W=f(R,m),ae=G.S;ae!==null&&ae(D,W),CC(s,a,W)}catch(be){Dv(s,a,be)}finally{A!==null&&D.types!==null&&(A.types=D.types),G.T=A}}else try{A=f(R,m),CC(s,a,A)}catch(be){Dv(s,a,be)}}function CC(s,a,f){f!==null&&typeof f=="object"&&typeof f.then=="function"?f.then(function(m){TC(s,a,m)},function(m){return Dv(s,a,m)}):TC(s,a,f)}function TC(s,a,f){a.status="fulfilled",a.value=f,RC(a),s.state=f,a=s.pending,a!==null&&(f=a.next,f===a?s.pending=null:(f=f.next,a.next=f,EC(s,f)))}function Dv(s,a,f){var m=s.pending;if(s.pending=null,m!==null){m=m.next;do a.status="rejected",a.reason=f,RC(a),a=a.next;while(a!==m)}s.action=null}function RC(s){s=s.listeners;for(var a=0;a<s.length;a++)(0,s[a])()}function OC(s,a){return a}function AC(s,a){if(Bt){var f=Tn.formState;if(f!==null){e:{var m=_t;if(Bt){if(Pn){t:{for(var R=Pn,A=Ki;R.nodeType!==8;){if(!A){R=null;break t}if(R=Zi(R.nextSibling),R===null){R=null;break t}}A=R.data,R=A==="F!"||A==="F"?R:null}if(R){Pn=Zi(R.nextSibling),m=R.data==="F!";break e}}Xo(m)}m=!1}m&&(a=f[0])}}return f=ni(),f.memoizedState=f.baseState=a,m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:OC,lastRenderedState:a},f.queue=m,f=ZC.bind(null,_t,m),m.dispatch=f,m=Nv(!1),A=Uv.bind(null,_t,!1,m.queue),m=ni(),R={state:a,dispatch:null,action:s,pending:null},m.queue=R,f=q8.bind(null,_t,R,A,f),R.dispatch=f,m.memoizedState=s,[a,f,!1]}function kC(s){var a=cr();return MC(a,Sn,s)}function MC(s,a,f){if(a=jv(s,a,OC)[0],s=kp(fo)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var m=Gf(a)}catch(D){throw D===Pc?Sp:D}else m=a;a=cr();var R=a.queue,A=R.dispatch;return f!==a.memoizedState&&(_t.flags|=2048,zc(9,{destroy:void 0},B8.bind(null,R,f),null)),[m,A,s]}function B8(s,a){s.action=a}function jC(s){var a=cr(),f=Sn;if(f!==null)return MC(a,f,s);cr(),a=a.memoizedState,f=cr();var m=f.queue.dispatch;return f.memoizedState=s,[a,m,!1]}function zc(s,a,f,m){return s={tag:s,create:f,deps:m,inst:a,next:null},a=_t.updateQueue,a===null&&(a=Op(),_t.updateQueue=a),f=a.lastEffect,f===null?a.lastEffect=s.next=s:(m=f.next,f.next=s,s.next=m,a.lastEffect=s),s}function PC(){return cr().memoizedState}function Mp(s,a,f,m){var R=ni();_t.flags|=s,R.memoizedState=zc(1|a,{destroy:void 0},f,m===void 0?null:m)}function jp(s,a,f,m){var R=cr();m=m===void 0?null:m;var A=R.memoizedState.inst;Sn!==null&&m!==null&&Tv(m,Sn.memoizedState.deps)?R.memoizedState=zc(a,A,f,m):(_t.flags|=s,R.memoizedState=zc(1|a,A,f,m))}function NC(s,a){Mp(8390656,8,s,a)}function Iv(s,a){jp(2048,8,s,a)}function H8(s){_t.flags|=4;var a=_t.updateQueue;if(a===null)a=Op(),_t.updateQueue=a,a.events=[s];else{var f=a.events;f===null?a.events=[s]:f.push(s)}}function DC(s){var a=cr().memoizedState;return H8({ref:a,nextImpl:s}),function(){if((ln&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}function IC(s,a){return jp(4,2,s,a)}function $C(s,a){return jp(4,4,s,a)}function zC(s,a){if(typeof a=="function"){s=s();var f=a(s);return function(){typeof f=="function"?f():a(null)}}if(a!=null)return s=s(),a.current=s,function(){a.current=null}}function LC(s,a,f){f=f!=null?f.concat([s]):null,jp(4,4,zC.bind(null,a,s),f)}function $v(){}function FC(s,a){var f=cr();a=a===void 0?null:a;var m=f.memoizedState;return a!==null&&Tv(a,m[1])?m[0]:(f.memoizedState=[s,a],s)}function UC(s,a){var f=cr();a=a===void 0?null:a;var m=f.memoizedState;if(a!==null&&Tv(a,m[1]))return m[0];if(m=s(),El){on(!0);try{s()}finally{on(!1)}}return f.memoizedState=[m,a],m}function zv(s,a,f){return f===void 0||(uo&1073741824)!==0&&(Lt&261930)===0?s.memoizedState=a:(s.memoizedState=f,s=VT(),_t.lanes|=s,oa|=s,f)}function VC(s,a,f,m){return wi(f,a)?f:Dc.current!==null?(s=zv(s,f,m),wi(s,a)||(mr=!0),s):(uo&42)===0||(uo&1073741824)!==0&&(Lt&261930)===0?(mr=!0,s.memoizedState=f):(s=VT(),_t.lanes|=s,oa|=s,a)}function qC(s,a,f,m,R){var A=H.p;H.p=A!==0&&8>A?A:8;var D=G.T,W={};G.T=W,Uv(s,!1,a,f);try{var ae=R(),be=G.S;if(be!==null&&be(W,ae),ae!==null&&typeof ae=="object"&&typeof ae.then=="function"){var Ae=F8(ae,m);Zf(s,a,Ae,Ri(s))}else Zf(s,a,m,Ri(s))}catch(Pe){Zf(s,a,{then:function(){},status:"rejected",reason:Pe},Ri())}finally{H.p=A,D!==null&&W.types!==null&&(D.types=W.types),G.T=D}}function K8(){}function Lv(s,a,f,m){if(s.tag!==5)throw Error(r(476));var R=BC(s).queue;qC(s,R,a,Y,f===null?K8:function(){return HC(s),f(m)})}function BC(s){var a=s.memoizedState;if(a!==null)return a;a={memoizedState:Y,baseState:Y,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fo,lastRenderedState:Y},next:null};var f={};return a.next={memoizedState:f,baseState:f,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fo,lastRenderedState:f},next:null},s.memoizedState=a,s=s.alternate,s!==null&&(s.memoizedState=a),a}function HC(s){var a=BC(s);a.next===null&&(a=s.alternate.memoizedState),Zf(s,a.next.queue,{},Ri())}function Fv(){return $r(fd)}function KC(){return cr().memoizedState}function GC(){return cr().memoizedState}function G8(s){for(var a=s.return;a!==null;){switch(a.tag){case 24:case 3:var f=Ri();s=ea(f);var m=ta(a,s,f);m!==null&&(mi(m,a,f),qf(m,a,f)),a={cache:mv()},s.payload=a;return}a=a.return}}function Z8(s,a,f){var m=Ri();f={lane:m,revertLane:0,gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null},Pp(s)?YC(a,f):(f=iv(s,a,f,m),f!==null&&(mi(f,s,m),WC(f,a,m)))}function ZC(s,a,f){var m=Ri();Zf(s,a,f,m)}function Zf(s,a,f,m){var R={lane:m,revertLane:0,gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null};if(Pp(s))YC(a,R);else{var A=s.alternate;if(s.lanes===0&&(A===null||A.lanes===0)&&(A=a.lastRenderedReducer,A!==null))try{var D=a.lastRenderedState,W=A(D,f);if(R.hasEagerState=!0,R.eagerState=W,wi(W,D))return hp(s,a,R,0),Tn===null&&dp(),!1}catch{}if(f=iv(s,a,R,m),f!==null)return mi(f,s,m),WC(f,a,m),!0}return!1}function Uv(s,a,f,m){if(m={lane:2,revertLane:bb(),gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},Pp(s)){if(a)throw Error(r(479))}else a=iv(s,f,m,2),a!==null&&mi(a,s,2)}function Pp(s){var a=s.alternate;return s===_t||a!==null&&a===_t}function YC(s,a){Ic=Tp=!0;var f=s.pending;f===null?a.next=a:(a.next=f.next,f.next=a),s.pending=a}function WC(s,a,f){if((f&4194048)!==0){var m=a.lanes;m&=s.pendingLanes,f|=m,a.lanes=f,an(s,f)}}var Yf={readContext:$r,use:Ap,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};Yf.useEffectEvent=tr;var XC={readContext:$r,use:Ap,useCallback:function(s,a){return ni().memoizedState=[s,a===void 0?null:a],s},useContext:$r,useEffect:NC,useImperativeHandle:function(s,a,f){f=f!=null?f.concat([s]):null,Mp(4194308,4,zC.bind(null,a,s),f)},useLayoutEffect:function(s,a){return Mp(4194308,4,s,a)},useInsertionEffect:function(s,a){Mp(4,2,s,a)},useMemo:function(s,a){var f=ni();a=a===void 0?null:a;var m=s();if(El){on(!0);try{s()}finally{on(!1)}}return f.memoizedState=[m,a],m},useReducer:function(s,a,f){var m=ni();if(f!==void 0){var R=f(a);if(El){on(!0);try{f(a)}finally{on(!1)}}}else R=a;return m.memoizedState=m.baseState=R,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:R},m.queue=s,s=s.dispatch=Z8.bind(null,_t,s),[m.memoizedState,s]},useRef:function(s){var a=ni();return s={current:s},a.memoizedState=s},useState:function(s){s=Nv(s);var a=s.queue,f=ZC.bind(null,_t,a);return a.dispatch=f,[s.memoizedState,f]},useDebugValue:$v,useDeferredValue:function(s,a){var f=ni();return zv(f,s,a)},useTransition:function(){var s=Nv(!1);return s=qC.bind(null,_t,s.queue,!0,!1),ni().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,a,f){var m=_t,R=ni();if(Bt){if(f===void 0)throw Error(r(407));f=f()}else{if(f=a(),Tn===null)throw Error(r(349));(Lt&127)!==0||vC(m,a,f)}R.memoizedState=f;var A={value:f,getSnapshot:a};return R.queue=A,NC(SC.bind(null,m,A,s),[s]),m.flags|=2048,zc(9,{destroy:void 0},bC.bind(null,m,A,f,a),null),f},useId:function(){var s=ni(),a=Tn.identifierPrefix;if(Bt){var f=ks,m=As;f=(m&~(1<<32-Vt(m)-1)).toString(32)+f,a="_"+a+"R_"+f,f=Rp++,0<f&&(a+="H"+f.toString(32)),a+="_"}else f=U8++,a="_"+a+"r_"+f.toString(32)+"_";return s.memoizedState=a},useHostTransitionStatus:Fv,useFormState:AC,useActionState:AC,useOptimistic:function(s){var a=ni();a.memoizedState=a.baseState=s;var f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=f,a=Uv.bind(null,_t,!0,f),f.dispatch=a,[s,a]},useMemoCache:Mv,useCacheRefresh:function(){return ni().memoizedState=G8.bind(null,_t)},useEffectEvent:function(s){var a=ni(),f={impl:s};return a.memoizedState=f,function(){if((ln&2)!==0)throw Error(r(440));return f.impl.apply(void 0,arguments)}}},Vv={readContext:$r,use:Ap,useCallback:FC,useContext:$r,useEffect:Iv,useImperativeHandle:LC,useInsertionEffect:IC,useLayoutEffect:$C,useMemo:UC,useReducer:kp,useRef:PC,useState:function(){return kp(fo)},useDebugValue:$v,useDeferredValue:function(s,a){var f=cr();return VC(f,Sn.memoizedState,s,a)},useTransition:function(){var s=kp(fo)[0],a=cr().memoizedState;return[typeof s=="boolean"?s:Gf(s),a]},useSyncExternalStore:yC,useId:KC,useHostTransitionStatus:Fv,useFormState:kC,useActionState:kC,useOptimistic:function(s,a){var f=cr();return _C(f,Sn,s,a)},useMemoCache:Mv,useCacheRefresh:GC};Vv.useEffectEvent=DC;var QC={readContext:$r,use:Ap,useCallback:FC,useContext:$r,useEffect:Iv,useImperativeHandle:LC,useInsertionEffect:IC,useLayoutEffect:$C,useMemo:UC,useReducer:Pv,useRef:PC,useState:function(){return Pv(fo)},useDebugValue:$v,useDeferredValue:function(s,a){var f=cr();return Sn===null?zv(f,s,a):VC(f,Sn.memoizedState,s,a)},useTransition:function(){var s=Pv(fo)[0],a=cr().memoizedState;return[typeof s=="boolean"?s:Gf(s),a]},useSyncExternalStore:yC,useId:KC,useHostTransitionStatus:Fv,useFormState:jC,useActionState:jC,useOptimistic:function(s,a){var f=cr();return Sn!==null?_C(f,Sn,s,a):(f.baseState=s,[s,f.queue.dispatch])},useMemoCache:Mv,useCacheRefresh:GC};QC.useEffectEvent=DC;function qv(s,a,f,m){a=s.memoizedState,f=f(m,a),f=f==null?a:p({},a,f),s.memoizedState=f,s.lanes===0&&(s.updateQueue.baseState=f)}var Bv={enqueueSetState:function(s,a,f){s=s._reactInternals;var m=Ri(),R=ea(m);R.payload=a,f!=null&&(R.callback=f),a=ta(s,R,m),a!==null&&(mi(a,s,m),qf(a,s,m))},enqueueReplaceState:function(s,a,f){s=s._reactInternals;var m=Ri(),R=ea(m);R.tag=1,R.payload=a,f!=null&&(R.callback=f),a=ta(s,R,m),a!==null&&(mi(a,s,m),qf(a,s,m))},enqueueForceUpdate:function(s,a){s=s._reactInternals;var f=Ri(),m=ea(f);m.tag=2,a!=null&&(m.callback=a),a=ta(s,m,f),a!==null&&(mi(a,s,f),qf(a,s,f))}};function JC(s,a,f,m,R,A,D){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(m,A,D):a.prototype&&a.prototype.isPureReactComponent?!Df(f,m)||!Df(R,A):!0}function eT(s,a,f,m){s=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(f,m),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(f,m),a.state!==s&&Bv.enqueueReplaceState(a,a.state,null)}function Cl(s,a){var f=a;if("ref"in a){f={};for(var m in a)m!=="ref"&&(f[m]=a[m])}if(s=s.defaultProps){f===a&&(f=p({},f));for(var R in s)f[R]===void 0&&(f[R]=s[R])}return f}function tT(s){fp(s)}function nT(s){console.error(s)}function rT(s){fp(s)}function Np(s,a){try{var f=s.onUncaughtError;f(a.value,{componentStack:a.stack})}catch(m){setTimeout(function(){throw m})}}function iT(s,a,f){try{var m=s.onCaughtError;m(f.value,{componentStack:f.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(R){setTimeout(function(){throw R})}}function Hv(s,a,f){return f=ea(f),f.tag=3,f.payload={element:null},f.callback=function(){Np(s,a)},f}function sT(s){return s=ea(s),s.tag=3,s}function oT(s,a,f,m){var R=f.type.getDerivedStateFromError;if(typeof R=="function"){var A=m.value;s.payload=function(){return R(A)},s.callback=function(){iT(a,f,m)}}var D=f.stateNode;D!==null&&typeof D.componentDidCatch=="function"&&(s.callback=function(){iT(a,f,m),typeof R!="function"&&(aa===null?aa=new Set([this]):aa.add(this));var W=m.stack;this.componentDidCatch(m.value,{componentStack:W!==null?W:""})})}function Y8(s,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=_i.current,f!==null){switch(f.tag){case 31:case 13:return Gi===null?Kp():f.alternate===null&&nr===0&&(nr=3),f.flags&=-257,f.flags|=65536,f.lanes=R,m===wp?f.flags|=16384:(a=f.updateQueue,a===null?f.updateQueue=new Set([m]):a.add(m),gb(s,m,R)),!1;case 22:return f.flags|=65536,m===wp?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)),gb(s,m,R)),!1}throw Error(r(435,f.tag))}return gb(s,m,R),Kp(),!1}if(Bt)return a=_i.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=R,m!==uv&&(s=Error(r(422),{cause:m}),zf(qi(s,f)))):(m!==uv&&(a=Error(r(423),{cause:m}),zf(qi(a,f))),s=s.current.alternate,s.flags|=65536,R&=-R,s.lanes|=R,m=qi(m,f),R=Hv(s.stateNode,m,R),wv(s,R),nr!==4&&(nr=2)),!1;var A=Error(r(520),{cause:m});if(A=qi(A,f),rd===null?rd=[A]:rd.push(A),nr!==4&&(nr=2),a===null)return!0;m=qi(m,f),f=a;do{switch(f.tag){case 3:return f.flags|=65536,s=R&-R,f.lanes|=s,s=Hv(f.stateNode,m,s),wv(f,s),!1;case 1:if(a=f.type,A=f.stateNode,(f.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||A!==null&&typeof A.componentDidCatch=="function"&&(aa===null||!aa.has(A))))return f.flags|=65536,R&=-R,f.lanes|=R,R=sT(R),oT(R,s,f,m),wv(f,R),!1}f=f.return}while(f!==null);return!1}var Kv=Error(r(461)),mr=!1;function zr(s,a,f,m){a.child=s===null?uC(a,null,f,m):_l(a,s.child,f,m)}function aT(s,a,f,m,R){f=f.render;var A=a.ref;if("ref"in m){var D={};for(var W in m)W!=="ref"&&(D[W]=m[W])}else D=m;return bl(a),m=Rv(s,a,f,D,A,R),W=Ov(),s!==null&&!mr?(Av(s,a,R),ho(s,a,R)):(Bt&&W&&lv(a),a.flags|=1,zr(s,a,m,R),a.child)}function lT(s,a,f,m,R){if(s===null){var A=f.type;return typeof A=="function"&&!sv(A)&&A.defaultProps===void 0&&f.compare===null?(a.tag=15,a.type=A,cT(s,a,A,m,R)):(s=mp(f.type,null,m,a,a.mode,R),s.ref=a.ref,s.return=a,a.child=s)}if(A=s.child,!eb(s,R)){var D=A.memoizedProps;if(f=f.compare,f=f!==null?f:Df,f(D,m)&&s.ref===a.ref)return ho(s,a,R)}return a.flags|=1,s=oo(A,m),s.ref=a.ref,s.return=a,a.child=s}function cT(s,a,f,m,R){if(s!==null){var A=s.memoizedProps;if(Df(A,m)&&s.ref===a.ref)if(mr=!1,a.pendingProps=m=A,eb(s,R))(s.flags&131072)!==0&&(mr=!0);else return a.lanes=s.lanes,ho(s,a,R)}return Gv(s,a,f,m,R)}function uT(s,a,f,m){var R=m.children,A=s!==null?s.memoizedState:null;if(s===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,s!==null){for(m=a.child=s.child,R=0;m!==null;)R=R|m.lanes|m.childLanes,m=m.sibling;m=R&~A}else m=0,a.child=null;return fT(s,a,A,f,m)}if((f&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},s!==null&&bp(a,A!==null?A.cachePool:null),A!==null?hC(a,A):_v(),pC(a);else return m=a.lanes=536870912,fT(s,a,A!==null?A.baseLanes|f:f,f,m)}else A!==null?(bp(a,A.cachePool),hC(a,A),ra(),a.memoizedState=null):(s!==null&&bp(a,null),_v(),ra());return zr(s,a,R,f),a.child}function Wf(s,a){return s!==null&&s.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function fT(s,a,f,m,R){var A=yv();return A=A===null?null:{parent:hr._currentValue,pool:A},a.memoizedState={baseLanes:f,cachePool:A},s!==null&&bp(a,null),_v(),pC(a),s!==null&&kc(s,a,m,!0),a.childLanes=R,null}function Dp(s,a){return a=$p({mode:a.mode,children:a.children},s.mode),a.ref=s.ref,s.child=a,a.return=s,a}function dT(s,a,f){return _l(a,s.child,null,f),s=Dp(a,a.pendingProps),s.flags|=2,Ei(a),a.memoizedState=null,s}function W8(s,a,f){var m=a.pendingProps,R=(a.flags&128)!==0;if(a.flags&=-129,s===null){if(Bt){if(m.mode==="hidden")return s=Dp(a,m),a.lanes=536870912,Wf(null,s);if(Cv(a),(s=Pn)?(s=ER(s,Ki),s=s!==null&&s.data==="&"?s:null,s!==null&&(a.memoizedState={dehydrated:s,treeContext:Yo!==null?{id:As,overflow:ks}:null,retryLane:536870912,hydrationErrors:null},f=Y2(s),f.return=a,a.child=f,Ir=a,Pn=null)):s=null,s===null)throw Xo(a);return a.lanes=536870912,null}return Dp(a,m)}var A=s.memoizedState;if(A!==null){var D=A.dehydrated;if(Cv(a),R)if(a.flags&256)a.flags&=-257,a=dT(s,a,f);else if(a.memoizedState!==null)a.child=s.child,a.flags|=128,a=null;else throw Error(r(558));else if(mr||kc(s,a,f,!1),R=(f&s.childLanes)!==0,mr||R){if(m=Tn,m!==null&&(D=fr(m,f),D!==0&&D!==A.retryLane))throw A.retryLane=D,ml(s,D),mi(m,s,D),Kv;Kp(),a=dT(s,a,f)}else s=A.treeContext,Pn=Zi(D.nextSibling),Ir=a,Bt=!0,Wo=null,Ki=!1,s!==null&&Q2(a,s),a=Dp(a,m),a.flags|=4096;return a}return s=oo(s.child,{mode:m.mode,children:m.children}),s.ref=a.ref,a.child=s,s.return=a,s}function Ip(s,a){var f=a.ref;if(f===null)s!==null&&s.ref!==null&&(a.flags|=4194816);else{if(typeof f!="function"&&typeof f!="object")throw Error(r(284));(s===null||s.ref!==f)&&(a.flags|=4194816)}}function Gv(s,a,f,m,R){return bl(a),f=Rv(s,a,f,m,void 0,R),m=Ov(),s!==null&&!mr?(Av(s,a,R),ho(s,a,R)):(Bt&&m&&lv(a),a.flags|=1,zr(s,a,f,R),a.child)}function hT(s,a,f,m,R,A){return bl(a),a.updateQueue=null,f=gC(a,m,f,R),mC(s),m=Ov(),s!==null&&!mr?(Av(s,a,A),ho(s,a,A)):(Bt&&m&&lv(a),a.flags|=1,zr(s,a,f,A),a.child)}function pT(s,a,f,m,R){if(bl(a),a.stateNode===null){var A=Tc,D=f.contextType;typeof D=="object"&&D!==null&&(A=$r(D)),A=new f(m,A),a.memoizedState=A.state!==null&&A.state!==void 0?A.state:null,A.updater=Bv,a.stateNode=A,A._reactInternals=a,A=a.stateNode,A.props=m,A.state=a.memoizedState,A.refs={},bv(a),D=f.contextType,A.context=typeof D=="object"&&D!==null?$r(D):Tc,A.state=a.memoizedState,D=f.getDerivedStateFromProps,typeof D=="function"&&(qv(a,f,D,m),A.state=a.memoizedState),typeof f.getDerivedStateFromProps=="function"||typeof A.getSnapshotBeforeUpdate=="function"||typeof A.UNSAFE_componentWillMount!="function"&&typeof A.componentWillMount!="function"||(D=A.state,typeof A.componentWillMount=="function"&&A.componentWillMount(),typeof A.UNSAFE_componentWillMount=="function"&&A.UNSAFE_componentWillMount(),D!==A.state&&Bv.enqueueReplaceState(A,A.state,null),Hf(a,m,A,R),Bf(),A.state=a.memoizedState),typeof A.componentDidMount=="function"&&(a.flags|=4194308),m=!0}else if(s===null){A=a.stateNode;var W=a.memoizedProps,ae=Cl(f,W);A.props=ae;var be=A.context,Ae=f.contextType;D=Tc,typeof Ae=="object"&&Ae!==null&&(D=$r(Ae));var Pe=f.getDerivedStateFromProps;Ae=typeof Pe=="function"||typeof A.getSnapshotBeforeUpdate=="function",W=a.pendingProps!==W,Ae||typeof A.UNSAFE_componentWillReceiveProps!="function"&&typeof A.componentWillReceiveProps!="function"||(W||be!==D)&&eT(a,A,m,D),Jo=!1;var xe=a.memoizedState;A.state=xe,Hf(a,m,A,R),Bf(),be=a.memoizedState,W||xe!==be||Jo?(typeof Pe=="function"&&(qv(a,f,Pe,m),be=a.memoizedState),(ae=Jo||JC(a,f,ae,m,xe,be,D))?(Ae||typeof A.UNSAFE_componentWillMount!="function"&&typeof A.componentWillMount!="function"||(typeof A.componentWillMount=="function"&&A.componentWillMount(),typeof A.UNSAFE_componentWillMount=="function"&&A.UNSAFE_componentWillMount()),typeof A.componentDidMount=="function"&&(a.flags|=4194308)):(typeof A.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=m,a.memoizedState=be),A.props=m,A.state=be,A.context=D,m=ae):(typeof A.componentDidMount=="function"&&(a.flags|=4194308),m=!1)}else{A=a.stateNode,Sv(s,a),D=a.memoizedProps,Ae=Cl(f,D),A.props=Ae,Pe=a.pendingProps,xe=A.context,be=f.contextType,ae=Tc,typeof be=="object"&&be!==null&&(ae=$r(be)),W=f.getDerivedStateFromProps,(be=typeof W=="function"||typeof A.getSnapshotBeforeUpdate=="function")||typeof A.UNSAFE_componentWillReceiveProps!="function"&&typeof A.componentWillReceiveProps!="function"||(D!==Pe||xe!==ae)&&eT(a,A,m,ae),Jo=!1,xe=a.memoizedState,A.state=xe,Hf(a,m,A,R),Bf();var Ce=a.memoizedState;D!==Pe||xe!==Ce||Jo||s!==null&&s.dependencies!==null&&yp(s.dependencies)?(typeof W=="function"&&(qv(a,f,W,m),Ce=a.memoizedState),(Ae=Jo||JC(a,f,Ae,m,xe,Ce,ae)||s!==null&&s.dependencies!==null&&yp(s.dependencies))?(be||typeof A.UNSAFE_componentWillUpdate!="function"&&typeof A.componentWillUpdate!="function"||(typeof A.componentWillUpdate=="function"&&A.componentWillUpdate(m,Ce,ae),typeof A.UNSAFE_componentWillUpdate=="function"&&A.UNSAFE_componentWillUpdate(m,Ce,ae)),typeof A.componentDidUpdate=="function"&&(a.flags|=4),typeof A.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof A.componentDidUpdate!="function"||D===s.memoizedProps&&xe===s.memoizedState||(a.flags|=4),typeof A.getSnapshotBeforeUpdate!="function"||D===s.memoizedProps&&xe===s.memoizedState||(a.flags|=1024),a.memoizedProps=m,a.memoizedState=Ce),A.props=m,A.state=Ce,A.context=ae,m=Ae):(typeof A.componentDidUpdate!="function"||D===s.memoizedProps&&xe===s.memoizedState||(a.flags|=4),typeof A.getSnapshotBeforeUpdate!="function"||D===s.memoizedProps&&xe===s.memoizedState||(a.flags|=1024),m=!1)}return A=m,Ip(s,a),m=(a.flags&128)!==0,A||m?(A=a.stateNode,f=m&&typeof f.getDerivedStateFromError!="function"?null:A.render(),a.flags|=1,s!==null&&m?(a.child=_l(a,s.child,null,R),a.child=_l(a,null,f,R)):zr(s,a,f,R),a.memoizedState=A.state,s=a.child):s=ho(s,a,R),s}function mT(s,a,f,m){return yl(),a.flags|=256,zr(s,a,f,m),a.child}var Zv={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Yv(s){return{baseLanes:s,cachePool:iC()}}function Wv(s,a,f){return s=s!==null?s.childLanes&~f:0,a&&(s|=Ti),s}function gT(s,a,f){var m=a.pendingProps,R=!1,A=(a.flags&128)!==0,D;if((D=A)||(D=s!==null&&s.memoizedState===null?!1:(lr.current&2)!==0),D&&(R=!0,a.flags&=-129),D=(a.flags&32)!==0,a.flags&=-33,s===null){if(Bt){if(R?na(a):ra(),(s=Pn)?(s=ER(s,Ki),s=s!==null&&s.data!=="&"?s:null,s!==null&&(a.memoizedState={dehydrated:s,treeContext:Yo!==null?{id:As,overflow:ks}:null,retryLane:536870912,hydrationErrors:null},f=Y2(s),f.return=a,a.child=f,Ir=a,Pn=null)):s=null,s===null)throw Xo(a);return jb(s)?a.lanes=32:a.lanes=536870912,null}var W=m.children;return m=m.fallback,R?(ra(),R=a.mode,W=$p({mode:"hidden",children:W},R),m=gl(m,R,f,null),W.return=a,m.return=a,W.sibling=m,a.child=W,m=a.child,m.memoizedState=Yv(f),m.childLanes=Wv(s,D,f),a.memoizedState=Zv,Wf(null,m)):(na(a),Xv(a,W))}var ae=s.memoizedState;if(ae!==null&&(W=ae.dehydrated,W!==null)){if(A)a.flags&256?(na(a),a.flags&=-257,a=Qv(s,a,f)):a.memoizedState!==null?(ra(),a.child=s.child,a.flags|=128,a=null):(ra(),W=m.fallback,R=a.mode,m=$p({mode:"visible",children:m.children},R),W=gl(W,R,f,null),W.flags|=2,m.return=a,W.return=a,m.sibling=W,a.child=m,_l(a,s.child,null,f),m=a.child,m.memoizedState=Yv(f),m.childLanes=Wv(s,D,f),a.memoizedState=Zv,a=Wf(null,m));else if(na(a),jb(W)){if(D=W.nextSibling&&W.nextSibling.dataset,D)var be=D.dgst;D=be,m=Error(r(419)),m.stack="",m.digest=D,zf({value:m,source:null,stack:null}),a=Qv(s,a,f)}else if(mr||kc(s,a,f,!1),D=(f&s.childLanes)!==0,mr||D){if(D=Tn,D!==null&&(m=fr(D,f),m!==0&&m!==ae.retryLane))throw ae.retryLane=m,ml(s,m),mi(D,s,m),Kv;Mb(W)||Kp(),a=Qv(s,a,f)}else Mb(W)?(a.flags|=192,a.child=s.child,a=null):(s=ae.treeContext,Pn=Zi(W.nextSibling),Ir=a,Bt=!0,Wo=null,Ki=!1,s!==null&&Q2(a,s),a=Xv(a,m.children),a.flags|=4096);return a}return R?(ra(),W=m.fallback,R=a.mode,ae=s.child,be=ae.sibling,m=oo(ae,{mode:"hidden",children:m.children}),m.subtreeFlags=ae.subtreeFlags&65011712,be!==null?W=oo(be,W):(W=gl(W,R,f,null),W.flags|=2),W.return=a,m.return=a,m.sibling=W,a.child=m,Wf(null,m),m=a.child,W=s.child.memoizedState,W===null?W=Yv(f):(R=W.cachePool,R!==null?(ae=hr._currentValue,R=R.parent!==ae?{parent:ae,pool:ae}:R):R=iC(),W={baseLanes:W.baseLanes|f,cachePool:R}),m.memoizedState=W,m.childLanes=Wv(s,D,f),a.memoizedState=Zv,Wf(s.child,m)):(na(a),f=s.child,s=f.sibling,f=oo(f,{mode:"visible",children:m.children}),f.return=a,f.sibling=null,s!==null&&(D=a.deletions,D===null?(a.deletions=[s],a.flags|=16):D.push(s)),a.child=f,a.memoizedState=null,f)}function Xv(s,a){return a=$p({mode:"visible",children:a},s.mode),a.return=s,s.child=a}function $p(s,a){return s=xi(22,s,null,a),s.lanes=0,s}function Qv(s,a,f){return _l(a,s.child,null,f),s=Xv(a,a.pendingProps.children),s.flags|=2,a.memoizedState=null,s}function yT(s,a,f){s.lanes|=a;var m=s.alternate;m!==null&&(m.lanes|=a),hv(s.return,a,f)}function Jv(s,a,f,m,R,A){var D=s.memoizedState;D===null?s.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:m,tail:f,tailMode:R,treeForkCount:A}:(D.isBackwards=a,D.rendering=null,D.renderingStartTime=0,D.last=m,D.tail=f,D.tailMode=R,D.treeForkCount=A)}function vT(s,a,f){var m=a.pendingProps,R=m.revealOrder,A=m.tail;m=m.children;var D=lr.current,W=(D&2)!==0;if(W?(D=D&1|2,a.flags|=128):D&=1,$(lr,D),zr(s,a,m,f),m=Bt?$f:0,!W&&s!==null&&(s.flags&128)!==0)e:for(s=a.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&yT(s,f,a);else if(s.tag===19)yT(s,f,a);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===a)break e;for(;s.sibling===null;){if(s.return===null||s.return===a)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}switch(R){case"forwards":for(f=a.child,R=null;f!==null;)s=f.alternate,s!==null&&Cp(s)===null&&(R=f),f=f.sibling;f=R,f===null?(R=a.child,a.child=null):(R=f.sibling,f.sibling=null),Jv(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(s=R.alternate,s!==null&&Cp(s)===null){a.child=R;break}s=R.sibling,R.sibling=f,f=R,R=s}Jv(a,!0,f,null,A,m);break;case"together":Jv(a,!1,null,null,void 0,m);break;default:a.memoizedState=null}return a.child}function ho(s,a,f){if(s!==null&&(a.dependencies=s.dependencies),oa|=a.lanes,(f&a.childLanes)===0)if(s!==null){if(kc(s,a,f,!1),(f&a.childLanes)===0)return null}else return null;if(s!==null&&a.child!==s.child)throw Error(r(153));if(a.child!==null){for(s=a.child,f=oo(s,s.pendingProps),a.child=f,f.return=a;s.sibling!==null;)s=s.sibling,f=f.sibling=oo(s,s.pendingProps),f.return=a;f.sibling=null}return a.child}function eb(s,a){return(s.lanes&a)!==0?!0:(s=s.dependencies,!!(s!==null&&yp(s)))}function X8(s,a,f){switch(a.tag){case 3:se(a,a.stateNode.containerInfo),Qo(a,hr,s.memoizedState.cache),yl();break;case 27:case 5:Ee(a);break;case 4:se(a,a.stateNode.containerInfo);break;case 10:Qo(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,Cv(a),null;break;case 13:var m=a.memoizedState;if(m!==null)return m.dehydrated!==null?(na(a),a.flags|=128,null):(f&a.child.childLanes)!==0?gT(s,a,f):(na(a),s=ho(s,a,f),s!==null?s.sibling:null);na(a);break;case 19:var R=(s.flags&128)!==0;if(m=(f&a.childLanes)!==0,m||(kc(s,a,f,!1),m=(f&a.childLanes)!==0),R){if(m)return vT(s,a,f);a.flags|=128}if(R=a.memoizedState,R!==null&&(R.rendering=null,R.tail=null,R.lastEffect=null),$(lr,lr.current),m)break;return null;case 22:return a.lanes=0,uT(s,a,f,a.pendingProps);case 24:Qo(a,hr,s.memoizedState.cache)}return ho(s,a,f)}function bT(s,a,f){if(s!==null)if(s.memoizedProps!==a.pendingProps)mr=!0;else{if(!eb(s,f)&&(a.flags&128)===0)return mr=!1,X8(s,a,f);mr=(s.flags&131072)!==0}else mr=!1,Bt&&(a.flags&1048576)!==0&&X2(a,$f,a.index);switch(a.lanes=0,a.tag){case 16:e:{var m=a.pendingProps;if(s=wl(a.elementType),a.type=s,typeof s=="function")sv(s)?(m=Cl(s,m),a.tag=1,a=pT(null,a,s,m,f)):(a.tag=0,a=Gv(null,a,s,m,f));else{if(s!=null){var R=s.$$typeof;if(R===b){a.tag=11,a=aT(null,a,s,m,f);break e}else if(R===O){a.tag=14,a=lT(null,a,s,m,f);break e}}throw a=te(s)||s,Error(r(306,a,""))}}return a;case 0:return Gv(s,a,a.type,a.pendingProps,f);case 1:return m=a.type,R=Cl(m,a.pendingProps),pT(s,a,m,R,f);case 3:e:{if(se(a,a.stateNode.containerInfo),s===null)throw Error(r(387));m=a.pendingProps;var A=a.memoizedState;R=A.element,Sv(s,a),Hf(a,m,null,f);var D=a.memoizedState;if(m=D.cache,Qo(a,hr,m),m!==A.cache&&pv(a,[hr],f,!0),Bf(),m=D.element,A.isDehydrated)if(A={element:m,isDehydrated:!1,cache:D.cache},a.updateQueue.baseState=A,a.memoizedState=A,a.flags&256){a=mT(s,a,m,f);break e}else if(m!==R){R=qi(Error(r(424)),a),zf(R),a=mT(s,a,m,f);break e}else for(s=a.stateNode.containerInfo,s.nodeType===9?s=s.body:s=s.nodeName==="HTML"?s.ownerDocument.body:s,Pn=Zi(s.firstChild),Ir=a,Bt=!0,Wo=null,Ki=!0,f=uC(a,null,m,f),a.child=f;f;)f.flags=f.flags&-3|4096,f=f.sibling;else{if(yl(),m===R){a=ho(s,a,f);break e}zr(s,a,m,f)}a=a.child}return a;case 26:return Ip(s,a),s===null?(f=kR(a.type,null,a.pendingProps,null))?a.memoizedState=f:Bt||(f=a.type,s=a.pendingProps,m=Jp(J.current).createElement(f),m[Qt]=a,m[Cn]=s,Lr(m,f,s),dr(m),a.stateNode=m):a.memoizedState=kR(a.type,s.memoizedProps,a.pendingProps,s.memoizedState),null;case 27:return Ee(a),s===null&&Bt&&(m=a.stateNode=RR(a.type,a.pendingProps,J.current),Ir=a,Ki=!0,R=Pn,fa(a.type)?(Pb=R,Pn=Zi(m.firstChild)):Pn=R),zr(s,a,a.pendingProps.children,f),Ip(s,a),s===null&&(a.flags|=4194304),a.child;case 5:return s===null&&Bt&&((R=m=Pn)&&(m=RL(m,a.type,a.pendingProps,Ki),m!==null?(a.stateNode=m,Ir=a,Pn=Zi(m.firstChild),Ki=!1,R=!0):R=!1),R||Xo(a)),Ee(a),R=a.type,A=a.pendingProps,D=s!==null?s.memoizedProps:null,m=A.children,Ob(R,A)?m=null:D!==null&&Ob(R,D)&&(a.flags|=32),a.memoizedState!==null&&(R=Rv(s,a,V8,null,null,f),fd._currentValue=R),Ip(s,a),zr(s,a,m,f),a.child;case 6:return s===null&&Bt&&((s=f=Pn)&&(f=OL(f,a.pendingProps,Ki),f!==null?(a.stateNode=f,Ir=a,Pn=null,s=!0):s=!1),s||Xo(a)),null;case 13:return gT(s,a,f);case 4:return se(a,a.stateNode.containerInfo),m=a.pendingProps,s===null?a.child=_l(a,null,m,f):zr(s,a,m,f),a.child;case 11:return aT(s,a,a.type,a.pendingProps,f);case 7:return zr(s,a,a.pendingProps,f),a.child;case 8:return zr(s,a,a.pendingProps.children,f),a.child;case 12:return zr(s,a,a.pendingProps.children,f),a.child;case 10:return m=a.pendingProps,Qo(a,a.type,m.value),zr(s,a,m.children,f),a.child;case 9:return R=a.type._context,m=a.pendingProps.children,bl(a),R=$r(R),m=m(R),a.flags|=1,zr(s,a,m,f),a.child;case 14:return lT(s,a,a.type,a.pendingProps,f);case 15:return cT(s,a,a.type,a.pendingProps,f);case 19:return vT(s,a,f);case 31:return W8(s,a,f);case 22:return uT(s,a,f,a.pendingProps);case 24:return bl(a),m=$r(hr),s===null?(R=yv(),R===null&&(R=Tn,A=mv(),R.pooledCache=A,A.refCount++,A!==null&&(R.pooledCacheLanes|=f),R=A),a.memoizedState={parent:m,cache:R},bv(a),Qo(a,hr,R)):((s.lanes&f)!==0&&(Sv(s,a),Hf(a,null,null,f),Bf()),R=s.memoizedState,A=a.memoizedState,R.parent!==m?(R={parent:m,cache:m},a.memoizedState=R,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=R),Qo(a,hr,m)):(m=A.cache,Qo(a,hr,m),m!==R.cache&&pv(a,[hr],f,!0))),zr(s,a,a.pendingProps.children,f),a.child;case 29:throw a.pendingProps}throw Error(r(156,a.tag))}function po(s){s.flags|=4}function tb(s,a,f,m,R){if((a=(s.mode&32)!==0)&&(a=!1),a){if(s.flags|=16777216,(R&335544128)===R)if(s.stateNode.complete)s.flags|=8192;else if(KT())s.flags|=8192;else throw xl=wp,vv}else s.flags&=-16777217}function ST(s,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)s.flags&=-16777217;else if(s.flags|=16777216,!DR(a))if(KT())s.flags|=8192;else throw xl=wp,vv}function zp(s,a){a!==null&&(s.flags|=4),s.flags&16384&&(a=s.tag!==22?ut():536870912,s.lanes|=a,Vc|=a)}function Xf(s,a){if(!Bt)switch(s.tailMode){case"hidden":a=s.tail;for(var f=null;a!==null;)a.alternate!==null&&(f=a),a=a.sibling;f===null?s.tail=null:f.sibling=null;break;case"collapsed":f=s.tail;for(var m=null;f!==null;)f.alternate!==null&&(m=f),f=f.sibling;m===null?a||s.tail===null?s.tail=null:s.tail.sibling=null:m.sibling=null}}function Nn(s){var a=s.alternate!==null&&s.alternate.child===s.child,f=0,m=0;if(a)for(var R=s.child;R!==null;)f|=R.lanes|R.childLanes,m|=R.subtreeFlags&65011712,m|=R.flags&65011712,R.return=s,R=R.sibling;else for(R=s.child;R!==null;)f|=R.lanes|R.childLanes,m|=R.subtreeFlags,m|=R.flags,R.return=s,R=R.sibling;return s.subtreeFlags|=m,s.childLanes=f,a}function Q8(s,a,f){var m=a.pendingProps;switch(cv(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,s!==null&&(m=s.memoizedState.cache),a.memoizedState.cache!==m&&(a.flags|=2048),co(hr),he(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(s===null||s.child===null)&&(Ac(a)?po(a):s===null||s.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,fv())),Nn(a),null;case 26:var R=a.type,A=a.memoizedState;return s===null?(po(a),A!==null?(Nn(a),ST(a,A)):(Nn(a),tb(a,R,null,m,f))):A?A!==s.memoizedState?(po(a),Nn(a),ST(a,A)):(Nn(a),a.flags&=-16777217):(s=s.memoizedProps,s!==m&&po(a),Nn(a),tb(a,R,s,m,f)),null;case 27:if(Q(a),f=J.current,R=a.type,s!==null&&a.stateNode!=null)s.memoizedProps!==m&&po(a);else{if(!m){if(a.stateNode===null)throw Error(r(166));return Nn(a),null}s=N.current,Ac(a)?J2(a):(s=RR(R,m,f),a.stateNode=s,po(a))}return Nn(a),null;case 5:if(Q(a),R=a.type,s!==null&&a.stateNode!=null)s.memoizedProps!==m&&po(a);else{if(!m){if(a.stateNode===null)throw Error(r(166));return Nn(a),null}if(A=N.current,Ac(a))J2(a);else{var D=Jp(J.current);switch(A){case 1:A=D.createElementNS("http://www.w3.org/2000/svg",R);break;case 2:A=D.createElementNS("http://www.w3.org/1998/Math/MathML",R);break;default:switch(R){case"svg":A=D.createElementNS("http://www.w3.org/2000/svg",R);break;case"math":A=D.createElementNS("http://www.w3.org/1998/Math/MathML",R);break;case"script":A=D.createElement("div"),A.innerHTML="<script><\/script>",A=A.removeChild(A.firstChild);break;case"select":A=typeof m.is=="string"?D.createElement("select",{is:m.is}):D.createElement("select"),m.multiple?A.multiple=!0:m.size&&(A.size=m.size);break;default:A=typeof m.is=="string"?D.createElement(R,{is:m.is}):D.createElement(R)}}A[Qt]=a,A[Cn]=m;e:for(D=a.child;D!==null;){if(D.tag===5||D.tag===6)A.appendChild(D.stateNode);else if(D.tag!==4&&D.tag!==27&&D.child!==null){D.child.return=D,D=D.child;continue}if(D===a)break e;for(;D.sibling===null;){if(D.return===null||D.return===a)break e;D=D.return}D.sibling.return=D.return,D=D.sibling}a.stateNode=A;e:switch(Lr(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&&po(a)}}return Nn(a),tb(a,a.type,s===null?null:s.memoizedProps,a.pendingProps,f),null;case 6:if(s&&a.stateNode!=null)s.memoizedProps!==m&&po(a);else{if(typeof m!="string"&&a.stateNode===null)throw Error(r(166));if(s=J.current,Ac(a)){if(s=a.stateNode,f=a.memoizedProps,m=null,R=Ir,R!==null)switch(R.tag){case 27:case 5:m=R.memoizedProps}s[Qt]=a,s=!!(s.nodeValue===f||m!==null&&m.suppressHydrationWarning===!0||gR(s.nodeValue,f)),s||Xo(a,!0)}else s=Jp(s).createTextNode(m),s[Qt]=a,a.stateNode=s}return Nn(a),null;case 31:if(f=a.memoizedState,s===null||s.memoizedState!==null){if(m=Ac(a),f!==null){if(s===null){if(!m)throw Error(r(318));if(s=a.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(557));s[Qt]=a}else yl(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Nn(a),s=!1}else f=fv(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=f),s=!0;if(!s)return a.flags&256?(Ei(a),a):(Ei(a),null);if((a.flags&128)!==0)throw Error(r(558))}return Nn(a),null;case 13:if(m=a.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(R=Ac(a),m!==null&&m.dehydrated!==null){if(s===null){if(!R)throw Error(r(318));if(R=a.memoizedState,R=R!==null?R.dehydrated:null,!R)throw Error(r(317));R[Qt]=a}else yl(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Nn(a),R=!1}else R=fv(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=R),R=!0;if(!R)return a.flags&256?(Ei(a),a):(Ei(a),null)}return Ei(a),(a.flags&128)!==0?(a.lanes=f,a):(f=m!==null,s=s!==null&&s.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!==s&&f&&(a.child.flags|=8192),zp(a,a.updateQueue),Nn(a),null);case 4:return he(),s===null&&_b(a.stateNode.containerInfo),Nn(a),null;case 10:return co(a.type),Nn(a),null;case 19:if(B(lr),m=a.memoizedState,m===null)return Nn(a),null;if(R=(a.flags&128)!==0,A=m.rendering,A===null)if(R)Xf(m,!1);else{if(nr!==0||s!==null&&(s.flags&128)!==0)for(s=a.child;s!==null;){if(A=Cp(s),A!==null){for(a.flags|=128,Xf(m,!1),s=A.updateQueue,a.updateQueue=s,zp(a,s),a.subtreeFlags=0,s=f,f=a.child;f!==null;)Z2(f,s),f=f.sibling;return $(lr,lr.current&1|2),Bt&&ao(a,m.treeForkCount),a.child}s=s.sibling}m.tail!==null&&Le()>qp&&(a.flags|=128,R=!0,Xf(m,!1),a.lanes=4194304)}else{if(!R)if(s=Cp(A),s!==null){if(a.flags|=128,R=!0,s=s.updateQueue,a.updateQueue=s,zp(a,s),Xf(m,!0),m.tail===null&&m.tailMode==="hidden"&&!A.alternate&&!Bt)return Nn(a),null}else 2*Le()-m.renderingStartTime>qp&&f!==536870912&&(a.flags|=128,R=!0,Xf(m,!1),a.lanes=4194304);m.isBackwards?(A.sibling=a.child,a.child=A):(s=m.last,s!==null?s.sibling=A:a.child=A,m.last=A)}return m.tail!==null?(s=m.tail,m.rendering=s,m.tail=s.sibling,m.renderingStartTime=Le(),s.sibling=null,f=lr.current,$(lr,R?f&1|2:f&1),Bt&&ao(a,m.treeForkCount),s):(Nn(a),null);case 22:case 23:return Ei(a),Ev(),m=a.memoizedState!==null,s!==null?s.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&&zp(a,f.retryQueue),f=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(f=s.memoizedState.cachePool.pool),m=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(m=a.memoizedState.cachePool.pool),m!==f&&(a.flags|=2048),s!==null&&B(Sl),null;case 24:return f=null,s!==null&&(f=s.memoizedState.cache),a.memoizedState.cache!==f&&(a.flags|=2048),co(hr),Nn(a),null;case 25:return null;case 30:return null}throw Error(r(156,a.tag))}function J8(s,a){switch(cv(a),a.tag){case 1:return s=a.flags,s&65536?(a.flags=s&-65537|128,a):null;case 3:return co(hr),he(),s=a.flags,(s&65536)!==0&&(s&128)===0?(a.flags=s&-65537|128,a):null;case 26:case 27:case 5:return Q(a),null;case 31:if(a.memoizedState!==null){if(Ei(a),a.alternate===null)throw Error(r(340));yl()}return s=a.flags,s&65536?(a.flags=s&-65537|128,a):null;case 13:if(Ei(a),s=a.memoizedState,s!==null&&s.dehydrated!==null){if(a.alternate===null)throw Error(r(340));yl()}return s=a.flags,s&65536?(a.flags=s&-65537|128,a):null;case 19:return B(lr),null;case 4:return he(),null;case 10:return co(a.type),null;case 22:case 23:return Ei(a),Ev(),s!==null&&B(Sl),s=a.flags,s&65536?(a.flags=s&-65537|128,a):null;case 24:return co(hr),null;case 25:return null;default:return null}}function wT(s,a){switch(cv(a),a.tag){case 3:co(hr),he();break;case 26:case 27:case 5:Q(a);break;case 4:he();break;case 31:a.memoizedState!==null&&Ei(a);break;case 13:Ei(a);break;case 19:B(lr);break;case 10:co(a.type);break;case 22:case 23:Ei(a),Ev(),s!==null&&B(Sl);break;case 24:co(hr)}}function Qf(s,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&s)===s){m=void 0;var A=f.create,D=f.inst;m=A(),D.destroy=m}f=f.next}while(f!==R)}}catch(W){yn(a,a.return,W)}}function ia(s,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&s)===s){var D=m.inst,W=D.destroy;if(W!==void 0){D.destroy=void 0,R=a;var ae=f,be=W;try{be()}catch(Ae){yn(R,ae,Ae)}}}m=m.next}while(m!==A)}}catch(Ae){yn(a,a.return,Ae)}}function xT(s){var a=s.updateQueue;if(a!==null){var f=s.stateNode;try{dC(a,f)}catch(m){yn(s,s.return,m)}}}function _T(s,a,f){f.props=Cl(s.type,s.memoizedProps),f.state=s.memoizedState;try{f.componentWillUnmount()}catch(m){yn(s,a,m)}}function Jf(s,a){try{var f=s.ref;if(f!==null){switch(s.tag){case 26:case 27:case 5:var m=s.stateNode;break;case 30:m=s.stateNode;break;default:m=s.stateNode}typeof f=="function"?s.refCleanup=f(m):f.current=m}}catch(R){yn(s,a,R)}}function Ms(s,a){var f=s.ref,m=s.refCleanup;if(f!==null)if(typeof m=="function")try{m()}catch(R){yn(s,a,R)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof f=="function")try{f(null)}catch(R){yn(s,a,R)}else f.current=null}function ET(s){var a=s.type,f=s.memoizedProps,m=s.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":f.autoFocus&&m.focus();break e;case"img":f.src?m.src=f.src:f.srcSet&&(m.srcset=f.srcSet)}}catch(R){yn(s,s.return,R)}}function nb(s,a,f){try{var m=s.stateNode;wL(m,s.type,f,a),m[Cn]=a}catch(R){yn(s,s.return,R)}}function CT(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&fa(s.type)||s.tag===4}function rb(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||CT(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&fa(s.type)||s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function ib(s,a,f){var m=s.tag;if(m===5||m===6)s=s.stateNode,a?(f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f).insertBefore(s,a):(a=f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f,a.appendChild(s),f=f._reactRootContainer,f!=null||a.onclick!==null||(a.onclick=ce));else if(m!==4&&(m===27&&fa(s.type)&&(f=s.stateNode,a=null),s=s.child,s!==null))for(ib(s,a,f),s=s.sibling;s!==null;)ib(s,a,f),s=s.sibling}function Lp(s,a,f){var m=s.tag;if(m===5||m===6)s=s.stateNode,a?f.insertBefore(s,a):f.appendChild(s);else if(m!==4&&(m===27&&fa(s.type)&&(f=s.stateNode),s=s.child,s!==null))for(Lp(s,a,f),s=s.sibling;s!==null;)Lp(s,a,f),s=s.sibling}function TT(s){var a=s.stateNode,f=s.memoizedProps;try{for(var m=s.type,R=a.attributes;R.length;)a.removeAttributeNode(R[0]);Lr(a,m,f),a[Qt]=s,a[Cn]=f}catch(A){yn(s,s.return,A)}}var mo=!1,gr=!1,sb=!1,RT=typeof WeakSet=="function"?WeakSet:Set,Mr=null;function eL(s,a){if(s=s.containerInfo,Tb=om,s=L2(s),Q0(s)){if("selectionStart"in s)var f={start:s.selectionStart,end:s.selectionEnd};else e:{f=(f=s.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 D=0,W=-1,ae=-1,be=0,Ae=0,Pe=s,xe=null;t:for(;;){for(var Ce;Pe!==f||R!==0&&Pe.nodeType!==3||(W=D+R),Pe!==A||m!==0&&Pe.nodeType!==3||(ae=D+m),Pe.nodeType===3&&(D+=Pe.nodeValue.length),(Ce=Pe.firstChild)!==null;)xe=Pe,Pe=Ce;for(;;){if(Pe===s)break t;if(xe===f&&++be===R&&(W=D),xe===A&&++Ae===m&&(ae=D),(Ce=Pe.nextSibling)!==null)break;Pe=xe,xe=Pe.parentNode}Pe=Ce}f=W===-1||ae===-1?null:{start:W,end:ae}}else f=null}f=f||{start:0,end:0}}else f=null;for(Rb={focusedElem:s,selectionRange:f},om=!1,Mr=a;Mr!==null;)if(a=Mr,s=a.child,(a.subtreeFlags&1028)!==0&&s!==null)s.return=a,Mr=s;else for(;Mr!==null;){switch(a=Mr,A=a.alternate,s=a.flags,a.tag){case 0:if((s&4)!==0&&(s=a.updateQueue,s=s!==null?s.events:null,s!==null))for(f=0;f<s.length;f++)R=s[f],R.ref.impl=R.nextImpl;break;case 11:case 15:break;case 1:if((s&1024)!==0&&A!==null){s=void 0,f=a,R=A.memoizedProps,A=A.memoizedState,m=f.stateNode;try{var We=Cl(f.type,R);s=m.getSnapshotBeforeUpdate(We,A),m.__reactInternalSnapshotBeforeUpdate=s}catch(ct){yn(f,f.return,ct)}}break;case 3:if((s&1024)!==0){if(s=a.stateNode.containerInfo,f=s.nodeType,f===9)kb(s);else if(f===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":kb(s);break;default:s.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((s&1024)!==0)throw Error(r(163))}if(s=a.sibling,s!==null){s.return=a.return,Mr=s;break}Mr=a.return}}function OT(s,a,f){var m=f.flags;switch(f.tag){case 0:case 11:case 15:yo(s,f),m&4&&Qf(5,f);break;case 1:if(yo(s,f),m&4)if(s=f.stateNode,a===null)try{s.componentDidMount()}catch(D){yn(f,f.return,D)}else{var R=Cl(f.type,a.memoizedProps);a=a.memoizedState;try{s.componentDidUpdate(R,a,s.__reactInternalSnapshotBeforeUpdate)}catch(D){yn(f,f.return,D)}}m&64&&xT(f),m&512&&Jf(f,f.return);break;case 3:if(yo(s,f),m&64&&(s=f.updateQueue,s!==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{dC(s,a)}catch(D){yn(f,f.return,D)}}break;case 27:a===null&&m&4&&TT(f);case 26:case 5:yo(s,f),a===null&&m&4&&ET(f),m&512&&Jf(f,f.return);break;case 12:yo(s,f);break;case 31:yo(s,f),m&4&&MT(s,f);break;case 13:yo(s,f),m&4&&jT(s,f),m&64&&(s=f.memoizedState,s!==null&&(s=s.dehydrated,s!==null&&(f=cL.bind(null,f),AL(s,f))));break;case 22:if(m=f.memoizedState!==null||mo,!m){a=a!==null&&a.memoizedState!==null||gr,R=mo;var A=gr;mo=m,(gr=a)&&!A?vo(s,f,(f.subtreeFlags&8772)!==0):yo(s,f),mo=R,gr=A}break;case 30:break;default:yo(s,f)}}function AT(s){var a=s.alternate;a!==null&&(s.alternate=null,AT(a)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(a=s.stateNode,a!==null&&Ef(a)),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}var qn=null,fi=!1;function go(s,a,f){for(f=f.child;f!==null;)kT(s,a,f),f=f.sibling}function kT(s,a,f){if(ht&&typeof ht.onCommitFiberUnmount=="function")try{ht.onCommitFiberUnmount(bt,f)}catch{}switch(f.tag){case 26:gr||Ms(f,a),go(s,a,f),f.memoizedState?f.memoizedState.count--:f.stateNode&&(f=f.stateNode,f.parentNode.removeChild(f));break;case 27:gr||Ms(f,a);var m=qn,R=fi;fa(f.type)&&(qn=f.stateNode,fi=!1),go(s,a,f),ld(f.stateNode),qn=m,fi=R;break;case 5:gr||Ms(f,a);case 6:if(m=qn,R=fi,qn=null,go(s,a,f),qn=m,fi=R,qn!==null)if(fi)try{(qn.nodeType===9?qn.body:qn.nodeName==="HTML"?qn.ownerDocument.body:qn).removeChild(f.stateNode)}catch(A){yn(f,a,A)}else try{qn.removeChild(f.stateNode)}catch(A){yn(f,a,A)}break;case 18:qn!==null&&(fi?(s=qn,xR(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,f.stateNode),Wc(s)):xR(qn,f.stateNode));break;case 4:m=qn,R=fi,qn=f.stateNode.containerInfo,fi=!0,go(s,a,f),qn=m,fi=R;break;case 0:case 11:case 14:case 15:ia(2,f,a),gr||ia(4,f,a),go(s,a,f);break;case 1:gr||(Ms(f,a),m=f.stateNode,typeof m.componentWillUnmount=="function"&&_T(f,a,m)),go(s,a,f);break;case 21:go(s,a,f);break;case 22:gr=(m=gr)||f.memoizedState!==null,go(s,a,f),gr=m;break;default:go(s,a,f)}}function MT(s,a){if(a.memoizedState===null&&(s=a.alternate,s!==null&&(s=s.memoizedState,s!==null))){s=s.dehydrated;try{Wc(s)}catch(f){yn(a,a.return,f)}}}function jT(s,a){if(a.memoizedState===null&&(s=a.alternate,s!==null&&(s=s.memoizedState,s!==null&&(s=s.dehydrated,s!==null))))try{Wc(s)}catch(f){yn(a,a.return,f)}}function tL(s){switch(s.tag){case 31:case 13:case 19:var a=s.stateNode;return a===null&&(a=s.stateNode=new RT),a;case 22:return s=s.stateNode,a=s._retryCache,a===null&&(a=s._retryCache=new RT),a;default:throw Error(r(435,s.tag))}}function Fp(s,a){var f=tL(s);a.forEach(function(m){if(!f.has(m)){f.add(m);var R=uL.bind(null,s,m);m.then(R,R)}})}function di(s,a){var f=a.deletions;if(f!==null)for(var m=0;m<f.length;m++){var R=f[m],A=s,D=a,W=D;e:for(;W!==null;){switch(W.tag){case 27:if(fa(W.type)){qn=W.stateNode,fi=!1;break e}break;case 5:qn=W.stateNode,fi=!1;break e;case 3:case 4:qn=W.stateNode.containerInfo,fi=!0;break e}W=W.return}if(qn===null)throw Error(r(160));kT(A,D,R),qn=null,fi=!1,A=R.alternate,A!==null&&(A.return=null),R.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)PT(a,s),a=a.sibling}var gs=null;function PT(s,a){var f=s.alternate,m=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:di(a,s),hi(s),m&4&&(ia(3,s,s.return),Qf(3,s),ia(5,s,s.return));break;case 1:di(a,s),hi(s),m&512&&(gr||f===null||Ms(f,f.return)),m&64&&mo&&(s=s.updateQueue,s!==null&&(m=s.callbacks,m!==null&&(f=s.shared.hiddenCallbacks,s.shared.hiddenCallbacks=f===null?m:f.concat(m))));break;case 26:var R=gs;if(di(a,s),hi(s),m&512&&(gr||f===null||Ms(f,f.return)),m&4){var A=f!==null?f.memoizedState:null;if(m=s.memoizedState,f===null)if(m===null)if(s.stateNode===null){e:{m=s.type,f=s.memoizedProps,R=R.ownerDocument||R;t:switch(m){case"title":A=R.getElementsByTagName("title")[0],(!A||A[il]||A[Qt]||A.namespaceURI==="http://www.w3.org/2000/svg"||A.hasAttribute("itemprop"))&&(A=R.createElement(m),R.head.insertBefore(A,R.querySelector("head > title"))),Lr(A,m,f),A[Qt]=s,dr(A),m=A;break e;case"link":var D=PR("link","href",R).get(m+(f.href||""));if(D){for(var W=0;W<D.length;W++)if(A=D[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)){D.splice(W,1);break t}}A=R.createElement(m),Lr(A,m,f),R.head.appendChild(A);break;case"meta":if(D=PR("meta","content",R).get(m+(f.content||""))){for(W=0;W<D.length;W++)if(A=D[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)){D.splice(W,1);break t}}A=R.createElement(m),Lr(A,m,f),R.head.appendChild(A);break;default:throw Error(r(468,m))}A[Qt]=s,dr(A),m=A}s.stateNode=m}else NR(R,s.type,s.stateNode);else s.stateNode=jR(R,m,s.memoizedProps);else A!==m?(A===null?f.stateNode!==null&&(f=f.stateNode,f.parentNode.removeChild(f)):A.count--,m===null?NR(R,s.type,s.stateNode):jR(R,m,s.memoizedProps)):m===null&&s.stateNode!==null&&nb(s,s.memoizedProps,f.memoizedProps)}break;case 27:di(a,s),hi(s),m&512&&(gr||f===null||Ms(f,f.return)),f!==null&&m&4&&nb(s,s.memoizedProps,f.memoizedProps);break;case 5:if(di(a,s),hi(s),m&512&&(gr||f===null||Ms(f,f.return)),s.flags&32){R=s.stateNode;try{Go(R,"")}catch(We){yn(s,s.return,We)}}m&4&&s.stateNode!=null&&(R=s.memoizedProps,nb(s,R,f!==null?f.memoizedProps:R)),m&1024&&(sb=!0);break;case 6:if(di(a,s),hi(s),m&4){if(s.stateNode===null)throw Error(r(162));m=s.memoizedProps,f=s.stateNode;try{f.nodeValue=m}catch(We){yn(s,s.return,We)}}break;case 3:if(nm=null,R=gs,gs=em(a.containerInfo),di(a,s),gs=R,hi(s),m&4&&f!==null&&f.memoizedState.isDehydrated)try{Wc(a.containerInfo)}catch(We){yn(s,s.return,We)}sb&&(sb=!1,NT(s));break;case 4:m=gs,gs=em(s.stateNode.containerInfo),di(a,s),hi(s),gs=m;break;case 12:di(a,s),hi(s);break;case 31:di(a,s),hi(s),m&4&&(m=s.updateQueue,m!==null&&(s.updateQueue=null,Fp(s,m)));break;case 13:di(a,s),hi(s),s.child.flags&8192&&s.memoizedState!==null!=(f!==null&&f.memoizedState!==null)&&(Vp=Le()),m&4&&(m=s.updateQueue,m!==null&&(s.updateQueue=null,Fp(s,m)));break;case 22:R=s.memoizedState!==null;var ae=f!==null&&f.memoizedState!==null,be=mo,Ae=gr;if(mo=be||R,gr=Ae||ae,di(a,s),gr=Ae,mo=be,hi(s),m&8192)e:for(a=s.stateNode,a._visibility=R?a._visibility&-2:a._visibility|1,R&&(f===null||ae||mo||gr||Tl(s)),f=null,a=s;;){if(a.tag===5||a.tag===26){if(f===null){ae=f=a;try{if(A=ae.stateNode,R)D=A.style,typeof D.setProperty=="function"?D.setProperty("display","none","important"):D.display="none";else{W=ae.stateNode;var Pe=ae.memoizedProps.style,xe=Pe!=null&&Pe.hasOwnProperty("display")?Pe.display:null;W.style.display=xe==null||typeof xe=="boolean"?"":(""+xe).trim()}}catch(We){yn(ae,ae.return,We)}}}else if(a.tag===6){if(f===null){ae=a;try{ae.stateNode.nodeValue=R?"":ae.memoizedProps}catch(We){yn(ae,ae.return,We)}}}else if(a.tag===18){if(f===null){ae=a;try{var Ce=ae.stateNode;R?_R(Ce,!0):_R(ae.stateNode,!1)}catch(We){yn(ae,ae.return,We)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===s)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===s)break e;for(;a.sibling===null;){if(a.return===null||a.return===s)break e;f===a&&(f=null),a=a.return}f===a&&(f=null),a.sibling.return=a.return,a=a.sibling}m&4&&(m=s.updateQueue,m!==null&&(f=m.retryQueue,f!==null&&(m.retryQueue=null,Fp(s,f))));break;case 19:di(a,s),hi(s),m&4&&(m=s.updateQueue,m!==null&&(s.updateQueue=null,Fp(s,m)));break;case 30:break;case 21:break;default:di(a,s),hi(s)}}function hi(s){var a=s.flags;if(a&2){try{for(var f,m=s.return;m!==null;){if(CT(m)){f=m;break}m=m.return}if(f==null)throw Error(r(160));switch(f.tag){case 27:var R=f.stateNode,A=rb(s);Lp(s,A,R);break;case 5:var D=f.stateNode;f.flags&32&&(Go(D,""),f.flags&=-33);var W=rb(s);Lp(s,W,D);break;case 3:case 4:var ae=f.stateNode.containerInfo,be=rb(s);ib(s,be,ae);break;default:throw Error(r(161))}}catch(Ae){yn(s,s.return,Ae)}s.flags&=-3}a&4096&&(s.flags&=-4097)}function NT(s){if(s.subtreeFlags&1024)for(s=s.child;s!==null;){var a=s;NT(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),s=s.sibling}}function yo(s,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)OT(s,a.alternate,a),a=a.sibling}function Tl(s){for(s=s.child;s!==null;){var a=s;switch(a.tag){case 0:case 11:case 14:case 15:ia(4,a,a.return),Tl(a);break;case 1:Ms(a,a.return);var f=a.stateNode;typeof f.componentWillUnmount=="function"&&_T(a,a.return,f),Tl(a);break;case 27:ld(a.stateNode);case 26:case 5:Ms(a,a.return),Tl(a);break;case 22:a.memoizedState===null&&Tl(a);break;case 30:Tl(a);break;default:Tl(a)}s=s.sibling}}function vo(s,a,f){for(f=f&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var m=a.alternate,R=s,A=a,D=A.flags;switch(A.tag){case 0:case 11:case 15:vo(R,A,f),Qf(4,A);break;case 1:if(vo(R,A,f),m=A,R=m.stateNode,typeof R.componentDidMount=="function")try{R.componentDidMount()}catch(be){yn(m,m.return,be)}if(m=A,R=m.updateQueue,R!==null){var W=m.stateNode;try{var ae=R.shared.hiddenCallbacks;if(ae!==null)for(R.shared.hiddenCallbacks=null,R=0;R<ae.length;R++)fC(ae[R],W)}catch(be){yn(m,m.return,be)}}f&&D&64&&xT(A),Jf(A,A.return);break;case 27:TT(A);case 26:case 5:vo(R,A,f),f&&m===null&&D&4&&ET(A),Jf(A,A.return);break;case 12:vo(R,A,f);break;case 31:vo(R,A,f),f&&D&4&&MT(R,A);break;case 13:vo(R,A,f),f&&D&4&&jT(R,A);break;case 22:A.memoizedState===null&&vo(R,A,f),Jf(A,A.return);break;case 30:break;default:vo(R,A,f)}a=a.sibling}}function ob(s,a){var f=null;s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(f=s.memoizedState.cachePool.pool),s=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(s=a.memoizedState.cachePool.pool),s!==f&&(s!=null&&s.refCount++,f!=null&&Lf(f))}function ab(s,a){s=null,a.alternate!==null&&(s=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==s&&(a.refCount++,s!=null&&Lf(s))}function ys(s,a,f,m){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)DT(s,a,f,m),a=a.sibling}function DT(s,a,f,m){var R=a.flags;switch(a.tag){case 0:case 11:case 15:ys(s,a,f,m),R&2048&&Qf(9,a);break;case 1:ys(s,a,f,m);break;case 3:ys(s,a,f,m),R&2048&&(s=null,a.alternate!==null&&(s=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==s&&(a.refCount++,s!=null&&Lf(s)));break;case 12:if(R&2048){ys(s,a,f,m),s=a.stateNode;try{var A=a.memoizedProps,D=A.id,W=A.onPostCommit;typeof W=="function"&&W(D,a.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(ae){yn(a,a.return,ae)}}else ys(s,a,f,m);break;case 31:ys(s,a,f,m);break;case 13:ys(s,a,f,m);break;case 23:break;case 22:A=a.stateNode,D=a.alternate,a.memoizedState!==null?A._visibility&2?ys(s,a,f,m):ed(s,a):A._visibility&2?ys(s,a,f,m):(A._visibility|=2,Lc(s,a,f,m,(a.subtreeFlags&10256)!==0||!1)),R&2048&&ob(D,a);break;case 24:ys(s,a,f,m),R&2048&&ab(a.alternate,a);break;default:ys(s,a,f,m)}}function Lc(s,a,f,m,R){for(R=R&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var A=s,D=a,W=f,ae=m,be=D.flags;switch(D.tag){case 0:case 11:case 15:Lc(A,D,W,ae,R),Qf(8,D);break;case 23:break;case 22:var Ae=D.stateNode;D.memoizedState!==null?Ae._visibility&2?Lc(A,D,W,ae,R):ed(A,D):(Ae._visibility|=2,Lc(A,D,W,ae,R)),R&&be&2048&&ob(D.alternate,D);break;case 24:Lc(A,D,W,ae,R),R&&be&2048&&ab(D.alternate,D);break;default:Lc(A,D,W,ae,R)}a=a.sibling}}function ed(s,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var f=s,m=a,R=m.flags;switch(m.tag){case 22:ed(f,m),R&2048&&ob(m.alternate,m);break;case 24:ed(f,m),R&2048&&ab(m.alternate,m);break;default:ed(f,m)}a=a.sibling}}var td=8192;function Fc(s,a,f){if(s.subtreeFlags&td)for(s=s.child;s!==null;)IT(s,a,f),s=s.sibling}function IT(s,a,f){switch(s.tag){case 26:Fc(s,a,f),s.flags&td&&s.memoizedState!==null&&UL(f,gs,s.memoizedState,s.memoizedProps);break;case 5:Fc(s,a,f);break;case 3:case 4:var m=gs;gs=em(s.stateNode.containerInfo),Fc(s,a,f),gs=m;break;case 22:s.memoizedState===null&&(m=s.alternate,m!==null&&m.memoizedState!==null?(m=td,td=16777216,Fc(s,a,f),td=m):Fc(s,a,f));break;default:Fc(s,a,f)}}function $T(s){var a=s.alternate;if(a!==null&&(s=a.child,s!==null)){a.child=null;do a=s.sibling,s.sibling=null,s=a;while(s!==null)}}function nd(s){var a=s.deletions;if((s.flags&16)!==0){if(a!==null)for(var f=0;f<a.length;f++){var m=a[f];Mr=m,LT(m,s)}$T(s)}if(s.subtreeFlags&10256)for(s=s.child;s!==null;)zT(s),s=s.sibling}function zT(s){switch(s.tag){case 0:case 11:case 15:nd(s),s.flags&2048&&ia(9,s,s.return);break;case 3:nd(s);break;case 12:nd(s);break;case 22:var a=s.stateNode;s.memoizedState!==null&&a._visibility&2&&(s.return===null||s.return.tag!==13)?(a._visibility&=-3,Up(s)):nd(s);break;default:nd(s)}}function Up(s){var a=s.deletions;if((s.flags&16)!==0){if(a!==null)for(var f=0;f<a.length;f++){var m=a[f];Mr=m,LT(m,s)}$T(s)}for(s=s.child;s!==null;){switch(a=s,a.tag){case 0:case 11:case 15:ia(8,a,a.return),Up(a);break;case 22:f=a.stateNode,f._visibility&2&&(f._visibility&=-3,Up(a));break;default:Up(a)}s=s.sibling}}function LT(s,a){for(;Mr!==null;){var f=Mr;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:Lf(f.memoizedState.cache)}if(m=f.child,m!==null)m.return=f,Mr=m;else e:for(f=s;Mr!==null;){m=Mr;var R=m.sibling,A=m.return;if(AT(m),m===f){Mr=null;break e}if(R!==null){R.return=A,Mr=R;break e}Mr=A}}}var nL={getCacheForType:function(s){var a=$r(hr),f=a.data.get(s);return f===void 0&&(f=s(),a.data.set(s,f)),f},cacheSignal:function(){return $r(hr).controller.signal}},rL=typeof WeakMap=="function"?WeakMap:Map,ln=0,Tn=null,$t=null,Lt=0,gn=0,Ci=null,sa=!1,Uc=!1,lb=!1,bo=0,nr=0,oa=0,Rl=0,cb=0,Ti=0,Vc=0,rd=null,pi=null,ub=!1,Vp=0,FT=0,qp=1/0,Bp=null,aa=null,_r=0,la=null,qc=null,So=0,fb=0,db=null,UT=null,id=0,hb=null;function Ri(){return(ln&2)!==0&&Lt!==0?Lt&-Lt:G.T!==null?bb():ar()}function VT(){if(Ti===0)if((Lt&536870912)===0||Bt){var s=un;un<<=1,(un&3932160)===0&&(un=262144),Ti=s}else Ti=536870912;return s=_i.current,s!==null&&(s.flags|=32),Ti}function mi(s,a,f){(s===Tn&&(gn===2||gn===9)||s.cancelPendingCommit!==null)&&(Bc(s,0),ca(s,Lt,Ti,!1)),En(s,f),((ln&2)===0||s!==Tn)&&(s===Tn&&((ln&2)===0&&(Rl|=f),nr===4&&ca(s,Lt,Ti,!1)),js(s))}function qT(s,a,f){if((ln&6)!==0)throw Error(r(327));var m=!f&&(a&127)===0&&(a&s.expiredLanes)===0||Dt(s,a),R=m?oL(s,a):mb(s,a,!0),A=m;do{if(R===0){Uc&&!m&&ca(s,a,0,!1);break}else{if(f=s.current.alternate,A&&!iL(f)){R=mb(s,a,!1),A=!1;continue}if(R===2){if(A=a,s.errorRecoveryDisabledLanes&A)var D=0;else D=s.pendingLanes&-536870913,D=D!==0?D:D&536870912?536870912:0;if(D!==0){a=D;e:{var W=s;R=rd;var ae=W.current.memoizedState.isDehydrated;if(ae&&(Bc(W,D).flags|=256),D=mb(W,D,!1),D!==2){if(lb&&!ae){W.errorRecoveryDisabledLanes|=A,Rl|=A,R=4;break e}A=pi,pi=R,A!==null&&(pi===null?pi=A:pi.push.apply(pi,A))}R=D}if(A=!1,R!==2)continue}}if(R===1){Bc(s,0),ca(s,a,0,!0);break}e:{switch(m=s,A=R,A){case 0:case 1:throw Error(r(345));case 4:if((a&4194048)!==a)break;case 6:ca(m,a,Ti,!sa);break e;case 2:pi=null;break;case 3:case 5:break;default:throw Error(r(329))}if((a&62914560)===a&&(R=Vp+300-Le(),10<R)){if(ca(m,a,Ti,!sa),vt(m,0,!0)!==0)break e;So=a,m.timeoutHandle=SR(BT.bind(null,m,f,pi,Bp,ub,a,Ti,Rl,Vc,sa,A,"Throttled",-0,0),R);break e}BT(m,f,pi,Bp,ub,a,Ti,Rl,Vc,sa,A,null,-0,0)}}break}while(!0);js(s)}function BT(s,a,f,m,R,A,D,W,ae,be,Ae,Pe,xe,Ce){if(s.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:ce},IT(a,A,Pe);var We=(A&62914560)===A?Vp-Le():(A&4194048)===A?FT-Le():0;if(We=VL(Pe,We),We!==null){So=A,s.cancelPendingCommit=We(QT.bind(null,s,a,A,f,m,R,D,W,ae,Ae,Pe,null,xe,Ce)),ca(s,A,D,!be);return}}QT(s,a,A,f,m,R,D,W,ae)}function iL(s){for(var a=s;;){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(!wi(A(),R))return!1}catch{return!1}}if(f=a.child,a.subtreeFlags&16384&&f!==null)f.return=a,a=f;else{if(a===s)break;for(;a.sibling===null;){if(a.return===null||a.return===s)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function ca(s,a,f,m){a&=~cb,a&=~Rl,s.suspendedLanes|=a,s.pingedLanes&=~a,m&&(s.warmLanes|=a),m=s.expirationTimes;for(var R=a;0<R;){var A=31-Vt(R),D=1<<A;m[A]=-1,R&=~D}f!==0&&Un(s,f,a)}function Hp(){return(ln&6)===0?(sd(0),!1):!0}function pb(){if($t!==null){if(gn===0)var s=$t.return;else s=$t,lo=vl=null,kv(s),Nc=null,Uf=0,s=$t;for(;s!==null;)wT(s.alternate,s),s=s.return;$t=null}}function Bc(s,a){var f=s.timeoutHandle;f!==-1&&(s.timeoutHandle=-1,EL(f)),f=s.cancelPendingCommit,f!==null&&(s.cancelPendingCommit=null,f()),So=0,pb(),Tn=s,$t=f=oo(s.current,null),Lt=a,gn=0,Ci=null,sa=!1,Uc=Dt(s,a),lb=!1,Vc=Ti=cb=Rl=oa=nr=0,pi=rd=null,ub=!1,(a&8)!==0&&(a|=a&32);var m=s.entangledLanes;if(m!==0)for(s=s.entanglements,m&=a;0<m;){var R=31-Vt(m),A=1<<R;a|=s[R],m&=~A}return bo=a,dp(),f}function HT(s,a){_t=null,G.H=Yf,a===Pc||a===Sp?(a=aC(),gn=3):a===vv?(a=aC(),gn=4):gn=a===Kv?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,Ci=a,$t===null&&(nr=1,Np(s,qi(a,s.current)))}function KT(){var s=_i.current;return s===null?!0:(Lt&4194048)===Lt?Gi===null:(Lt&62914560)===Lt||(Lt&536870912)!==0?s===Gi:!1}function GT(){var s=G.H;return G.H=Yf,s===null?Yf:s}function ZT(){var s=G.A;return G.A=nL,s}function Kp(){nr=4,sa||(Lt&4194048)!==Lt&&_i.current!==null||(Uc=!0),(oa&134217727)===0&&(Rl&134217727)===0||Tn===null||ca(Tn,Lt,Ti,!1)}function mb(s,a,f){var m=ln;ln|=2;var R=GT(),A=ZT();(Tn!==s||Lt!==a)&&(Bp=null,Bc(s,a)),a=!1;var D=nr;e:do try{if(gn!==0&&$t!==null){var W=$t,ae=Ci;switch(gn){case 8:pb(),D=6;break e;case 3:case 2:case 9:case 6:_i.current===null&&(a=!0);var be=gn;if(gn=0,Ci=null,Hc(s,W,ae,be),f&&Uc){D=0;break e}break;default:be=gn,gn=0,Ci=null,Hc(s,W,ae,be)}}sL(),D=nr;break}catch(Ae){HT(s,Ae)}while(!0);return a&&s.shellSuspendCounter++,lo=vl=null,ln=m,G.H=R,G.A=A,$t===null&&(Tn=null,Lt=0,dp()),D}function sL(){for(;$t!==null;)YT($t)}function oL(s,a){var f=ln;ln|=2;var m=GT(),R=ZT();Tn!==s||Lt!==a?(Bp=null,qp=Le()+500,Bc(s,a)):Uc=Dt(s,a);e:do try{if(gn!==0&&$t!==null){a=$t;var A=Ci;t:switch(gn){case 1:gn=0,Ci=null,Hc(s,a,A,1);break;case 2:case 9:if(sC(A)){gn=0,Ci=null,WT(a);break}a=function(){gn!==2&&gn!==9||Tn!==s||(gn=7),js(s)},A.then(a,a);break e;case 3:gn=7;break e;case 4:gn=5;break e;case 7:sC(A)?(gn=0,Ci=null,WT(a)):(gn=0,Ci=null,Hc(s,a,A,7));break;case 5:var D=null;switch($t.tag){case 26:D=$t.memoizedState;case 5:case 27:var W=$t;if(D?DR(D):W.stateNode.complete){gn=0,Ci=null;var ae=W.sibling;if(ae!==null)$t=ae;else{var be=W.return;be!==null?($t=be,Gp(be)):$t=null}break t}}gn=0,Ci=null,Hc(s,a,A,5);break;case 6:gn=0,Ci=null,Hc(s,a,A,6);break;case 8:pb(),nr=6;break e;default:throw Error(r(462))}}aL();break}catch(Ae){HT(s,Ae)}while(!0);return lo=vl=null,G.H=m,G.A=R,ln=f,$t!==null?0:(Tn=null,Lt=0,dp(),nr)}function aL(){for(;$t!==null&&!Ye();)YT($t)}function YT(s){var a=bT(s.alternate,s,bo);s.memoizedProps=s.pendingProps,a===null?Gp(s):$t=a}function WT(s){var a=s,f=a.alternate;switch(a.tag){case 15:case 0:a=hT(f,a,a.pendingProps,a.type,void 0,Lt);break;case 11:a=hT(f,a,a.pendingProps,a.type.render,a.ref,Lt);break;case 5:kv(a);default:wT(f,a),a=$t=Z2(a,bo),a=bT(f,a,bo)}s.memoizedProps=s.pendingProps,a===null?Gp(s):$t=a}function Hc(s,a,f,m){lo=vl=null,kv(a),Nc=null,Uf=0;var R=a.return;try{if(Y8(s,R,a,f,Lt)){nr=1,Np(s,qi(f,s.current)),$t=null;return}}catch(A){if(R!==null)throw $t=R,A;nr=1,Np(s,qi(f,s.current)),$t=null;return}a.flags&32768?(Bt||m===1?s=!0:Uc||(Lt&536870912)!==0?s=!1:(sa=s=!0,(m===2||m===9||m===3||m===6)&&(m=_i.current,m!==null&&m.tag===13&&(m.flags|=16384))),XT(a,s)):Gp(a)}function Gp(s){var a=s;do{if((a.flags&32768)!==0){XT(a,sa);return}s=a.return;var f=Q8(a.alternate,a,bo);if(f!==null){$t=f;return}if(a=a.sibling,a!==null){$t=a;return}$t=a=s}while(a!==null);nr===0&&(nr=5)}function XT(s,a){do{var f=J8(s.alternate,s);if(f!==null){f.flags&=32767,$t=f;return}if(f=s.return,f!==null&&(f.flags|=32768,f.subtreeFlags=0,f.deletions=null),!a&&(s=s.sibling,s!==null)){$t=s;return}$t=s=f}while(s!==null);nr=6,$t=null}function QT(s,a,f,m,R,A,D,W,ae){s.cancelPendingCommit=null;do Zp();while(_r!==0);if((ln&6)!==0)throw Error(r(327));if(a!==null){if(a===s.current)throw Error(r(177));if(A=a.lanes|a.childLanes,A|=rv,mn(s,f,A,D,W,ae),s===Tn&&($t=Tn=null,Lt=0),qc=a,la=s,So=f,fb=A,db=R,UT=m,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(s.callbackNode=null,s.callbackPriority=0,fL(me,function(){return rR(),null})):(s.callbackNode=null,s.callbackPriority=0),m=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||m){m=G.T,G.T=null,R=H.p,H.p=2,D=ln,ln|=4;try{eL(s,a,f)}finally{ln=D,H.p=R,G.T=m}}_r=1,JT(),eR(),tR()}}function JT(){if(_r===1){_r=0;var s=la,a=qc,f=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||f){f=G.T,G.T=null;var m=H.p;H.p=2;var R=ln;ln|=4;try{PT(a,s);var A=Rb,D=L2(s.containerInfo),W=A.focusedElem,ae=A.selectionRange;if(D!==W&&W&&W.ownerDocument&&z2(W.ownerDocument.documentElement,W)){if(ae!==null&&Q0(W)){var be=ae.start,Ae=ae.end;if(Ae===void 0&&(Ae=be),"selectionStart"in W)W.selectionStart=be,W.selectionEnd=Math.min(Ae,W.value.length);else{var Pe=W.ownerDocument||document,xe=Pe&&Pe.defaultView||window;if(xe.getSelection){var Ce=xe.getSelection(),We=W.textContent.length,ct=Math.min(ae.start,We),xn=ae.end===void 0?ct:Math.min(ae.end,We);!Ce.extend&&ct>xn&&(D=xn,xn=ct,ct=D);var pe=$2(W,ct),de=$2(W,xn);if(pe&&de&&(Ce.rangeCount!==1||Ce.anchorNode!==pe.node||Ce.anchorOffset!==pe.offset||Ce.focusNode!==de.node||Ce.focusOffset!==de.offset)){var ve=Pe.createRange();ve.setStart(pe.node,pe.offset),Ce.removeAllRanges(),ct>xn?(Ce.addRange(ve),Ce.extend(de.node,de.offset)):(ve.setEnd(de.node,de.offset),Ce.addRange(ve))}}}}for(Pe=[],Ce=W;Ce=Ce.parentNode;)Ce.nodeType===1&&Pe.push({element:Ce,left:Ce.scrollLeft,top:Ce.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}}om=!!Tb,Rb=Tb=null}finally{ln=R,H.p=m,G.T=f}}s.current=a,_r=2}}function eR(){if(_r===2){_r=0;var s=la,a=qc,f=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||f){f=G.T,G.T=null;var m=H.p;H.p=2;var R=ln;ln|=4;try{OT(s,a.alternate,a)}finally{ln=R,H.p=m,G.T=f}}_r=3}}function tR(){if(_r===4||_r===3){_r=0,$e();var s=la,a=qc,f=So,m=UT;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?_r=5:(_r=0,qc=la=null,nR(s,s.pendingLanes));var R=s.pendingLanes;if(R===0&&(aa=null),Xt(f),a=a.stateNode,ht&&typeof ht.onCommitFiberRoot=="function")try{ht.onCommitFiberRoot(bt,a,void 0,(a.current.flags&128)===128)}catch{}if(m!==null){a=G.T,R=H.p,H.p=2,G.T=null;try{for(var A=s.onRecoverableError,D=0;D<m.length;D++){var W=m[D];A(W.value,{componentStack:W.stack})}}finally{G.T=a,H.p=R}}(So&3)!==0&&Zp(),js(s),R=s.pendingLanes,(f&261930)!==0&&(R&42)!==0?s===hb?id++:(id=0,hb=s):id=0,sd(0)}}function nR(s,a){(s.pooledCacheLanes&=a)===0&&(a=s.pooledCache,a!=null&&(s.pooledCache=null,Lf(a)))}function Zp(){return JT(),eR(),tR(),rR()}function rR(){if(_r!==5)return!1;var s=la,a=fb;fb=0;var f=Xt(So),m=G.T,R=H.p;try{H.p=32>f?32:f,G.T=null,f=db,db=null;var A=la,D=So;if(_r=0,qc=la=null,So=0,(ln&6)!==0)throw Error(r(331));var W=ln;if(ln|=4,zT(A.current),DT(A,A.current,D,f),ln=W,sd(0,!1),ht&&typeof ht.onPostCommitFiberRoot=="function")try{ht.onPostCommitFiberRoot(bt,A)}catch{}return!0}finally{H.p=R,G.T=m,nR(s,a)}}function iR(s,a,f){a=qi(f,a),a=Hv(s.stateNode,a,2),s=ta(s,a,2),s!==null&&(En(s,2),js(s))}function yn(s,a,f){if(s.tag===3)iR(s,s,f);else for(;a!==null;){if(a.tag===3){iR(a,s,f);break}else if(a.tag===1){var m=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(aa===null||!aa.has(m))){s=qi(f,s),f=sT(2),m=ta(a,f,2),m!==null&&(oT(f,m,a,s),En(m,2),js(m));break}}a=a.return}}function gb(s,a,f){var m=s.pingCache;if(m===null){m=s.pingCache=new rL;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)||(lb=!0,R.add(f),s=lL.bind(null,s,a,f),a.then(s,s))}function lL(s,a,f){var m=s.pingCache;m!==null&&m.delete(a),s.pingedLanes|=s.suspendedLanes&f,s.warmLanes&=~f,Tn===s&&(Lt&f)===f&&(nr===4||nr===3&&(Lt&62914560)===Lt&&300>Le()-Vp?(ln&2)===0&&Bc(s,0):cb|=f,Vc===Lt&&(Vc=0)),js(s)}function sR(s,a){a===0&&(a=ut()),s=ml(s,a),s!==null&&(En(s,a),js(s))}function cL(s){var a=s.memoizedState,f=0;a!==null&&(f=a.retryLane),sR(s,f)}function uL(s,a){var f=0;switch(s.tag){case 31:case 13:var m=s.stateNode,R=s.memoizedState;R!==null&&(f=R.retryLane);break;case 19:m=s.stateNode;break;case 22:m=s.stateNode._retryCache;break;default:throw Error(r(314))}m!==null&&m.delete(a),sR(s,f)}function fL(s,a){return Ue(s,a)}var Yp=null,Kc=null,yb=!1,Wp=!1,vb=!1,ua=0;function js(s){s!==Kc&&s.next===null&&(Kc===null?Yp=Kc=s:Kc=Kc.next=s),Wp=!0,yb||(yb=!0,hL())}function sd(s,a){if(!vb&&Wp){vb=!0;do for(var f=!1,m=Yp;m!==null;){if(s!==0){var R=m.pendingLanes;if(R===0)var A=0;else{var D=m.suspendedLanes,W=m.pingedLanes;A=(1<<31-Vt(42|s)+1)-1,A&=R&~(D&~W),A=A&201326741?A&201326741|1:A?A|2:0}A!==0&&(f=!0,cR(m,A))}else A=Lt,A=vt(m,m===Tn?A:0,m.cancelPendingCommit!==null||m.timeoutHandle!==-1),(A&3)===0||Dt(m,A)||(f=!0,cR(m,A));m=m.next}while(f);vb=!1}}function dL(){oR()}function oR(){Wp=yb=!1;var s=0;ua!==0&&_L()&&(s=ua);for(var a=Le(),f=null,m=Yp;m!==null;){var R=m.next,A=aR(m,a);A===0?(m.next=null,f===null?Yp=R:f.next=R,R===null&&(Kc=f)):(f=m,(s!==0||(A&3)!==0)&&(Wp=!0)),m=R}_r!==0&&_r!==5||sd(s),ua!==0&&(ua=0)}function aR(s,a){for(var f=s.suspendedLanes,m=s.pingedLanes,R=s.expirationTimes,A=s.pendingLanes&-62914561;0<A;){var D=31-Vt(A),W=1<<D,ae=R[D];ae===-1?((W&f)===0||(W&m)!==0)&&(R[D]=jn(W,a)):ae<=a&&(s.expiredLanes|=W),A&=~W}if(a=Tn,f=Lt,f=vt(s,s===a?f:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),m=s.callbackNode,f===0||s===a&&(gn===2||gn===9)||s.cancelPendingCommit!==null)return m!==null&&m!==null&&Re(m),s.callbackNode=null,s.callbackPriority=0;if((f&3)===0||Dt(s,f)){if(a=f&-f,a===s.callbackPriority)return a;switch(m!==null&&Re(m),Xt(f)){case 2:case 8:f=Oe;break;case 32:f=me;break;case 268435456:f=Ke;break;default:f=me}return m=lR.bind(null,s),f=Ue(f,m),s.callbackPriority=a,s.callbackNode=f,a}return m!==null&&m!==null&&Re(m),s.callbackPriority=2,s.callbackNode=null,2}function lR(s,a){if(_r!==0&&_r!==5)return s.callbackNode=null,s.callbackPriority=0,null;var f=s.callbackNode;if(Zp()&&s.callbackNode!==f)return null;var m=Lt;return m=vt(s,s===Tn?m:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),m===0?null:(qT(s,m,a),aR(s,Le()),s.callbackNode!=null&&s.callbackNode===f?lR.bind(null,s):null)}function cR(s,a){if(Zp())return null;qT(s,a,!0)}function hL(){CL(function(){(ln&6)!==0?Ue(ft,dL):oR()})}function bb(){if(ua===0){var s=Mc;s===0&&(s=qt,qt<<=1,(qt&261888)===0&&(qt=256)),ua=s}return ua}function uR(s){return s==null||typeof s=="symbol"||typeof s=="boolean"?null:typeof s=="function"?s:ge(""+s)}function fR(s,a){var f=a.ownerDocument.createElement("input");return f.name=a.name,f.value=a.value,s.id&&f.setAttribute("form",s.id),a.parentNode.insertBefore(f,a),s=new FormData(s),f.parentNode.removeChild(f),s}function pL(s,a,f,m,R){if(a==="submit"&&f&&f.stateNode===R){var A=uR((R[Cn]||null).action),D=m.submitter;D&&(a=(a=D[Cn]||null)?uR(a.formAction):D.getAttribute("formAction"),a!==null&&(A=a,D=null));var W=new ll("action","action",null,m,R);s.push({event:W,listeners:[{instance:null,listener:function(){if(m.defaultPrevented){if(ua!==0){var ae=D?fR(R,D):new FormData(R);Lv(f,{pending:!0,data:ae,method:R.method,action:A},null,ae)}}else typeof A=="function"&&(W.preventDefault(),ae=D?fR(R,D):new FormData(R),Lv(f,{pending:!0,data:ae,method:R.method,action:A},A,ae))},currentTarget:R}]})}}for(var Sb=0;Sb<nv.length;Sb++){var wb=nv[Sb],mL=wb.toLowerCase(),gL=wb[0].toUpperCase()+wb.slice(1);ms(mL,"on"+gL)}ms(V2,"onAnimationEnd"),ms(q2,"onAnimationIteration"),ms(B2,"onAnimationStart"),ms("dblclick","onDoubleClick"),ms("focusin","onFocus"),ms("focusout","onBlur"),ms(j8,"onTransitionRun"),ms(P8,"onTransitionStart"),ms(N8,"onTransitionCancel"),ms(H2,"onTransitionEnd"),Bo("onMouseEnter",["mouseout","mouseover"]),Bo("onMouseLeave",["mouseout","mouseover"]),Bo("onPointerEnter",["pointerout","pointerover"]),Bo("onPointerLeave",["pointerout","pointerover"]),us("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),us("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),us("onBeforeInput",["compositionend","keypress","textInput","paste"]),us("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),us("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),us("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(" "),yL=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(od));function dR(s,a){a=(a&4)!==0;for(var f=0;f<s.length;f++){var m=s[f],R=m.event;m=m.listeners;e:{var A=void 0;if(a)for(var D=m.length-1;0<=D;D--){var W=m[D],ae=W.instance,be=W.currentTarget;if(W=W.listener,ae!==A&&R.isPropagationStopped())break e;A=W,R.currentTarget=be;try{A(R)}catch(Ae){fp(Ae)}R.currentTarget=null,A=ae}else for(D=0;D<m.length;D++){if(W=m[D],ae=W.instance,be=W.currentTarget,W=W.listener,ae!==A&&R.isPropagationStopped())break e;A=W,R.currentTarget=be;try{A(R)}catch(Ae){fp(Ae)}R.currentTarget=null,A=ae}}}}function zt(s,a){var f=a[bi];f===void 0&&(f=a[bi]=new Set);var m=s+"__bubble";f.has(m)||(hR(a,s,2,!1),f.add(m))}function xb(s,a,f){var m=0;a&&(m|=4),hR(f,s,m,a)}var Xp="_reactListening"+Math.random().toString(36).slice(2);function _b(s){if(!s[Xp]){s[Xp]=!0,ip.forEach(function(f){f!=="selectionchange"&&(yL.has(f)||xb(f,!1,s),xb(f,!0,s))});var a=s.nodeType===9?s:s.ownerDocument;a===null||a[Xp]||(a[Xp]=!0,xb("selectionchange",!1,a))}}function hR(s,a,f,m){switch(VR(a)){case 2:var R=HL;break;case 8:R=KL;break;default:R=zb}f=R.bind(null,a,f,s),R=void 0,!Jt||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(R=!0),m?R!==void 0?s.addEventListener(a,f,{capture:!0,passive:R}):s.addEventListener(a,f,!0):R!==void 0?s.addEventListener(a,f,{passive:R}):s.addEventListener(a,f,!1)}function Eb(s,a,f,m,R){var A=m;if((a&1)===0&&(a&2)===0&&m!==null)e:for(;;){if(m===null)return;var D=m.tag;if(D===3||D===4){var W=m.stateNode.containerInfo;if(W===R)break;if(D===4)for(D=m.return;D!==null;){var ae=D.tag;if((ae===3||ae===4)&&D.stateNode.containerInfo===R)return;D=D.return}for(;W!==null;){if(D=Uo(W),D===null)return;if(ae=D.tag,ae===5||ae===6||ae===26||ae===27){m=A=D;continue e}W=W.parentNode}}m=m.return}Ct(function(){var be=A,Ae=De(f),Pe=[];e:{var xe=K2.get(s);if(xe!==void 0){var Ce=ll,We=s;switch(s){case"keypress":if(fs(f)===0)break e;case"keydown":case"keyup":Ce=u8;break;case"focusin":We="focus",Ce=G0;break;case"focusout":We="blur",Ce=G0;break;case"beforeblur":case"afterblur":Ce=G0;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":Ce=w2;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Ce=Q6;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Ce=h8;break;case V2:case q2:case B2:Ce=t8;break;case H2:Ce=m8;break;case"scroll":case"scrollend":Ce=Mf;break;case"wheel":Ce=y8;break;case"copy":case"cut":case"paste":Ce=r8;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Ce=_2;break;case"toggle":case"beforetoggle":Ce=b8}var ct=(a&4)!==0,xn=!ct&&(s==="scroll"||s==="scrollend"),pe=ct?xe!==null?xe+"Capture":null:xe;ct=[];for(var de=be,ve;de!==null;){var je=de;if(ve=je.stateNode,je=je.tag,je!==5&&je!==26&&je!==27||ve===null||pe===null||(je=Ot(de,pe),je!=null&&ct.push(ad(de,je,ve))),xn)break;de=de.return}0<ct.length&&(xe=new Ce(xe,We,null,f,Ae),Pe.push({event:xe,listeners:ct}))}}if((a&7)===0){e:{if(xe=s==="mouseover"||s==="pointerover",Ce=s==="mouseout"||s==="pointerout",xe&&f!==Me&&(We=f.relatedTarget||f.fromElement)&&(Uo(We)||We[Nr]))break e;if((Ce||xe)&&(xe=Ae.window===Ae?Ae:(xe=Ae.ownerDocument)?xe.defaultView||xe.parentWindow:window,Ce?(We=f.relatedTarget||f.toElement,Ce=be,We=We?Uo(We):null,We!==null&&(xn=o(We),ct=We.tag,We!==xn||ct!==5&&ct!==27&&ct!==6)&&(We=null)):(Ce=null,We=be),Ce!==We)){if(ct=w2,je="onMouseLeave",pe="onMouseEnter",de="mouse",(s==="pointerout"||s==="pointerover")&&(ct=_2,je="onPointerLeave",pe="onPointerEnter",de="pointer"),xn=Ce==null?xe:sl(Ce),ve=We==null?xe:sl(We),xe=new ct(je,de+"leave",Ce,f,Ae),xe.target=xn,xe.relatedTarget=ve,je=null,Uo(Ae)===be&&(ct=new ct(pe,de+"enter",We,f,Ae),ct.target=ve,ct.relatedTarget=xn,je=ct),xn=je,Ce&&We)t:{for(ct=vL,pe=Ce,de=We,ve=0,je=pe;je;je=ct(je))ve++;je=0;for(var ot=de;ot;ot=ct(ot))je++;for(;0<ve-je;)pe=ct(pe),ve--;for(;0<je-ve;)de=ct(de),je--;for(;ve--;){if(pe===de||de!==null&&pe===de.alternate){ct=pe;break t}pe=ct(pe),de=ct(de)}ct=null}else ct=null;Ce!==null&&pR(Pe,xe,Ce,ct,!1),We!==null&&xn!==null&&pR(Pe,xn,We,ct,!0)}}e:{if(xe=be?sl(be):window,Ce=xe.nodeName&&xe.nodeName.toLowerCase(),Ce==="select"||Ce==="input"&&xe.type==="file")var en=M2;else if(A2(xe))if(j2)en=A8;else{en=R8;var Je=T8}else Ce=xe.nodeName,!Ce||Ce.toLowerCase()!=="input"||xe.type!=="checkbox"&&xe.type!=="radio"?be&&K(be.elementType)&&(en=M2):en=O8;if(en&&(en=en(s,be))){k2(Pe,en,f,Ae);break e}Je&&Je(s,xe,be),s==="focusout"&&be&&xe.type==="number"&&be.memoizedProps.value!=null&&kf(xe,"number",xe.value)}switch(Je=be?sl(be):window,s){case"focusin":(A2(Je)||Je.contentEditable==="true")&&(_c=Je,J0=be,If=null);break;case"focusout":If=J0=_c=null;break;case"mousedown":ev=!0;break;case"contextmenu":case"mouseup":case"dragend":ev=!1,F2(Pe,f,Ae);break;case"selectionchange":if(M8)break;case"keydown":case"keyup":F2(Pe,f,Ae)}var Tt;if(Y0)e:{switch(s){case"compositionstart":var Ft="onCompositionStart";break e;case"compositionend":Ft="onCompositionEnd";break e;case"compositionupdate":Ft="onCompositionUpdate";break e}Ft=void 0}else xc?R2(s,f)&&(Ft="onCompositionEnd"):s==="keydown"&&f.keyCode===229&&(Ft="onCompositionStart");Ft&&(E2&&f.locale!=="ko"&&(xc||Ft!=="onCompositionStart"?Ft==="onCompositionEnd"&&xc&&(Tt=Zo()):(fn=Ae,ui="value"in fn?fn.value:fn.textContent,xc=!0)),Je=Qp(be,Ft),0<Je.length&&(Ft=new x2(Ft,s,null,f,Ae),Pe.push({event:Ft,listeners:Je}),Tt?Ft.data=Tt:(Tt=O2(f),Tt!==null&&(Ft.data=Tt)))),(Tt=w8?x8(s,f):_8(s,f))&&(Ft=Qp(be,"onBeforeInput"),0<Ft.length&&(Je=new x2("onBeforeInput","beforeinput",null,f,Ae),Pe.push({event:Je,listeners:Ft}),Je.data=Tt)),pL(Pe,s,be,f,Ae)}dR(Pe,a)})}function ad(s,a,f){return{instance:s,listener:a,currentTarget:f}}function Qp(s,a){for(var f=a+"Capture",m=[];s!==null;){var R=s,A=R.stateNode;if(R=R.tag,R!==5&&R!==26&&R!==27||A===null||(R=Ot(s,f),R!=null&&m.unshift(ad(s,R,A)),R=Ot(s,a),R!=null&&m.push(ad(s,R,A))),s.tag===3)return m;s=s.return}return[]}function vL(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5&&s.tag!==27);return s||null}function pR(s,a,f,m,R){for(var A=a._reactName,D=[];f!==null&&f!==m;){var W=f,ae=W.alternate,be=W.stateNode;if(W=W.tag,ae!==null&&ae===m)break;W!==5&&W!==26&&W!==27||be===null||(ae=be,R?(be=Ot(f,A),be!=null&&D.unshift(ad(f,be,ae))):R||(be=Ot(f,A),be!=null&&D.push(ad(f,be,ae)))),f=f.return}D.length!==0&&s.push({event:a,listeners:D})}var bL=/\r\n?/g,SL=/\u0000|\uFFFD/g;function mR(s){return(typeof s=="string"?s:""+s).replace(bL,`
9
- `).replace(SL,"")}function gR(s,a){return a=mR(a),mR(s)===a}function wn(s,a,f,m,R,A){switch(f){case"children":typeof m=="string"?a==="body"||a==="textarea"&&m===""||Go(s,m):(typeof m=="number"||typeof m=="bigint")&&a!=="body"&&Go(s,""+m);break;case"className":Sc(s,"class",m);break;case"tabIndex":Sc(s,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":Sc(s,f,m);break;case"style":V(s,m,A);break;case"data":if(a!=="object"){Sc(s,"data",m);break}case"src":case"href":if(m===""&&(a!=="a"||f!=="href")){s.removeAttribute(f);break}if(m==null||typeof m=="function"||typeof m=="symbol"||typeof m=="boolean"){s.removeAttribute(f);break}m=ge(""+m),s.setAttribute(f,m);break;case"action":case"formAction":if(typeof m=="function"){s.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(s,a,"name",R.name,R,null),wn(s,a,"formEncType",R.formEncType,R,null),wn(s,a,"formMethod",R.formMethod,R,null),wn(s,a,"formTarget",R.formTarget,R,null)):(wn(s,a,"encType",R.encType,R,null),wn(s,a,"method",R.method,R,null),wn(s,a,"target",R.target,R,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){s.removeAttribute(f);break}m=ge(""+m),s.setAttribute(f,m);break;case"onClick":m!=null&&(s.onclick=ce);break;case"onScroll":m!=null&&zt("scroll",s);break;case"onScrollEnd":m!=null&&zt("scrollend",s);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));s.innerHTML=f}}break;case"multiple":s.multiple=m&&typeof m!="function"&&typeof m!="symbol";break;case"muted":s.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"){s.removeAttribute("xlink:href");break}f=ge(""+m),s.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"?s.setAttribute(f,""+m):s.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"?s.setAttribute(f,""):s.removeAttribute(f);break;case"capture":case"download":m===!0?s.setAttribute(f,""):m!==!1&&m!=null&&typeof m!="function"&&typeof m!="symbol"?s.setAttribute(f,m):s.removeAttribute(f);break;case"cols":case"rows":case"size":case"span":m!=null&&typeof m!="function"&&typeof m!="symbol"&&!isNaN(m)&&1<=m?s.setAttribute(f,m):s.removeAttribute(f);break;case"rowSpan":case"start":m==null||typeof m=="function"||typeof m=="symbol"||isNaN(m)?s.removeAttribute(f):s.setAttribute(f,m);break;case"popover":zt("beforetoggle",s),zt("toggle",s),ol(s,"popover",m);break;case"xlinkActuate":Ui(s,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":Ui(s,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":Ui(s,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":Ui(s,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":Ui(s,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":Ui(s,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":Ui(s,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":Ui(s,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":Ui(s,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":ol(s,"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=ue.get(f)||f,ol(s,f,m))}}function Cb(s,a,f,m,R,A){switch(f){case"style":V(s,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));s.innerHTML=f}}break;case"children":typeof m=="string"?Go(s,m):(typeof m=="number"||typeof m=="bigint")&&Go(s,""+m);break;case"onScroll":m!=null&&zt("scroll",s);break;case"onScrollEnd":m!=null&&zt("scrollend",s);break;case"onClick":m!=null&&(s.onclick=ce);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Cf.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=s[Cn]||null,A=A!=null?A[f]:null,typeof A=="function"&&s.removeEventListener(a,A,R),typeof m=="function")){typeof A!="function"&&A!==null&&(f in s?s[f]=null:s.hasAttribute(f)&&s.removeAttribute(f)),s.addEventListener(a,m,R);break e}f in s?s[f]=m:m===!0?s.setAttribute(f,""):ol(s,f,m)}}}function Lr(s,a,f){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":zt("error",s),zt("load",s);var m=!1,R=!1,A;for(A in f)if(f.hasOwnProperty(A)){var D=f[A];if(D!=null)switch(A){case"src":m=!0;break;case"srcSet":R=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:wn(s,a,A,D,f,null)}}R&&wn(s,a,"srcSet",f.srcSet,f,null),m&&wn(s,a,"src",f.src,f,null);return;case"input":zt("invalid",s);var W=A=D=R=null,ae=null,be=null;for(m in f)if(f.hasOwnProperty(m)){var Ae=f[m];if(Ae!=null)switch(m){case"name":R=Ae;break;case"type":D=Ae;break;case"checked":ae=Ae;break;case"defaultChecked":be=Ae;break;case"value":A=Ae;break;case"defaultValue":W=Ae;break;case"children":case"dangerouslySetInnerHTML":if(Ae!=null)throw Error(r(137,a));break;default:wn(s,a,m,Ae,f,null)}}lp(s,A,W,ae,be,D,R,!1);return;case"select":zt("invalid",s),m=D=A=null;for(R in f)if(f.hasOwnProperty(R)&&(W=f[R],W!=null))switch(R){case"value":A=W;break;case"defaultValue":D=W;break;case"multiple":m=W;default:wn(s,a,R,W,f,null)}a=A,f=D,s.multiple=!!m,a!=null?Ko(s,!!m,a,!1):f!=null&&Ko(s,!!m,f,!0);return;case"textarea":zt("invalid",s),A=R=m=null;for(D in f)if(f.hasOwnProperty(D)&&(W=f[D],W!=null))switch(D){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(s,a,D,W,f,null)}al(s,m,R,A);return;case"option":for(ae in f)f.hasOwnProperty(ae)&&(m=f[ae],m!=null)&&(ae==="selected"?s.selected=m&&typeof m!="function"&&typeof m!="symbol":wn(s,a,ae,m,f,null));return;case"dialog":zt("beforetoggle",s),zt("toggle",s),zt("cancel",s),zt("close",s);break;case"iframe":case"object":zt("load",s);break;case"video":case"audio":for(m=0;m<od.length;m++)zt(od[m],s);break;case"image":zt("error",s),zt("load",s);break;case"details":zt("toggle",s);break;case"embed":case"source":case"link":zt("error",s),zt("load",s);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(s,a,be,m,f,null)}return;default:if(K(a)){for(Ae in f)f.hasOwnProperty(Ae)&&(m=f[Ae],m!==void 0&&Cb(s,a,Ae,m,f,void 0));return}}for(W in f)f.hasOwnProperty(W)&&(m=f[W],m!=null&&wn(s,a,W,m,f,null))}function wL(s,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,D=null,W=null,ae=null,be=null,Ae=null;for(Ce in f){var Pe=f[Ce];if(f.hasOwnProperty(Ce)&&Pe!=null)switch(Ce){case"checked":break;case"value":break;case"defaultValue":ae=Pe;default:m.hasOwnProperty(Ce)||wn(s,a,Ce,null,m,Pe)}}for(var xe in m){var Ce=m[xe];if(Pe=f[xe],m.hasOwnProperty(xe)&&(Ce!=null||Pe!=null))switch(xe){case"type":A=Ce;break;case"name":R=Ce;break;case"checked":be=Ce;break;case"defaultChecked":Ae=Ce;break;case"value":D=Ce;break;case"defaultValue":W=Ce;break;case"children":case"dangerouslySetInnerHTML":if(Ce!=null)throw Error(r(137,a));break;default:Ce!==Pe&&wn(s,a,xe,Ce,m,Pe)}}Ho(s,D,W,ae,be,Ae,A,R);return;case"select":Ce=D=W=xe=null;for(A in f)if(ae=f[A],f.hasOwnProperty(A)&&ae!=null)switch(A){case"value":break;case"multiple":Ce=ae;default:m.hasOwnProperty(A)||wn(s,a,A,null,m,ae)}for(R in m)if(A=m[R],ae=f[R],m.hasOwnProperty(R)&&(A!=null||ae!=null))switch(R){case"value":xe=A;break;case"defaultValue":W=A;break;case"multiple":D=A;default:A!==ae&&wn(s,a,R,A,m,ae)}a=W,f=D,m=Ce,xe!=null?Ko(s,!!f,xe,!1):!!m!=!!f&&(a!=null?Ko(s,!!f,a,!0):Ko(s,!!f,f?[]:"",!1));return;case"textarea":Ce=xe=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(s,a,W,null,m,R)}for(D in m)if(R=m[D],A=f[D],m.hasOwnProperty(D)&&(R!=null||A!=null))switch(D){case"value":xe=R;break;case"defaultValue":Ce=R;break;case"children":break;case"dangerouslySetInnerHTML":if(R!=null)throw Error(r(91));break;default:R!==A&&wn(s,a,D,R,m,A)}cp(s,xe,Ce);return;case"option":for(var We in f)xe=f[We],f.hasOwnProperty(We)&&xe!=null&&!m.hasOwnProperty(We)&&(We==="selected"?s.selected=!1:wn(s,a,We,null,m,xe));for(ae in m)xe=m[ae],Ce=f[ae],m.hasOwnProperty(ae)&&xe!==Ce&&(xe!=null||Ce!=null)&&(ae==="selected"?s.selected=xe&&typeof xe!="function"&&typeof xe!="symbol":wn(s,a,ae,xe,m,Ce));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ct in f)xe=f[ct],f.hasOwnProperty(ct)&&xe!=null&&!m.hasOwnProperty(ct)&&wn(s,a,ct,null,m,xe);for(be in m)if(xe=m[be],Ce=f[be],m.hasOwnProperty(be)&&xe!==Ce&&(xe!=null||Ce!=null))switch(be){case"children":case"dangerouslySetInnerHTML":if(xe!=null)throw Error(r(137,a));break;default:wn(s,a,be,xe,m,Ce)}return;default:if(K(a)){for(var xn in f)xe=f[xn],f.hasOwnProperty(xn)&&xe!==void 0&&!m.hasOwnProperty(xn)&&Cb(s,a,xn,void 0,m,xe);for(Ae in m)xe=m[Ae],Ce=f[Ae],!m.hasOwnProperty(Ae)||xe===Ce||xe===void 0&&Ce===void 0||Cb(s,a,Ae,xe,m,Ce);return}}for(var pe in f)xe=f[pe],f.hasOwnProperty(pe)&&xe!=null&&!m.hasOwnProperty(pe)&&wn(s,a,pe,null,m,xe);for(Pe in m)xe=m[Pe],Ce=f[Pe],!m.hasOwnProperty(Pe)||xe===Ce||xe==null&&Ce==null||wn(s,a,Pe,xe,m,Ce)}function yR(s){switch(s){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function xL(){if(typeof performance.getEntriesByType=="function"){for(var s=0,a=0,f=performance.getEntriesByType("resource"),m=0;m<f.length;m++){var R=f[m],A=R.transferSize,D=R.initiatorType,W=R.duration;if(A&&W&&yR(D)){for(D=0,W=R.responseEnd,m+=1;m<f.length;m++){var ae=f[m],be=ae.startTime;if(be>W)break;var Ae=ae.transferSize,Pe=ae.initiatorType;Ae&&yR(Pe)&&(ae=ae.responseEnd,D+=Ae*(ae<W?1:(W-be)/(ae-be)))}if(--m,a+=8*(A+D)/(R.duration/1e3),s++,10<s)break}}if(0<s)return a/s/1e6}return navigator.connection&&(s=navigator.connection.downlink,typeof s=="number")?s:5}var Tb=null,Rb=null;function Jp(s){return s.nodeType===9?s:s.ownerDocument}function vR(s){switch(s){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function bR(s,a){if(s===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return s===1&&a==="foreignObject"?0:s}function Ob(s,a){return s==="textarea"||s==="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 Ab=null;function _L(){var s=window.event;return s&&s.type==="popstate"?s===Ab?!1:(Ab=s,!0):(Ab=null,!1)}var SR=typeof setTimeout=="function"?setTimeout:void 0,EL=typeof clearTimeout=="function"?clearTimeout:void 0,wR=typeof Promise=="function"?Promise:void 0,CL=typeof queueMicrotask=="function"?queueMicrotask:typeof wR<"u"?function(s){return wR.resolve(null).then(s).catch(TL)}:SR;function TL(s){setTimeout(function(){throw s})}function fa(s){return s==="head"}function xR(s,a){var f=a,m=0;do{var R=f.nextSibling;if(s.removeChild(f),R&&R.nodeType===8)if(f=R.data,f==="/$"||f==="/&"){if(m===0){s.removeChild(R),Wc(a);return}m--}else if(f==="$"||f==="$?"||f==="$~"||f==="$!"||f==="&")m++;else if(f==="html")ld(s.ownerDocument.documentElement);else if(f==="head"){f=s.ownerDocument.head,ld(f);for(var A=f.firstChild;A;){var D=A.nextSibling,W=A.nodeName;A[il]||W==="SCRIPT"||W==="STYLE"||W==="LINK"&&A.rel.toLowerCase()==="stylesheet"||f.removeChild(A),A=D}}else f==="body"&&ld(s.ownerDocument.body);f=R}while(f);Wc(a)}function _R(s,a){var f=s;s=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(s===0)break;s--}else f!=="$"&&f!=="$?"&&f!=="$~"&&f!=="$!"||s++;f=m}while(f)}function kb(s){var a=s.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":kb(f),Ef(f);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(f.rel.toLowerCase()==="stylesheet")continue}s.removeChild(f)}}function RL(s,a,f,m){for(;s.nodeType===1;){var R=f;if(s.nodeName.toLowerCase()!==a.toLowerCase()){if(!m&&(s.nodeName!=="INPUT"||s.type!=="hidden"))break}else if(m){if(!s[il])switch(a){case"meta":if(!s.hasAttribute("itemprop"))break;return s;case"link":if(A=s.getAttribute("rel"),A==="stylesheet"&&s.hasAttribute("data-precedence"))break;if(A!==R.rel||s.getAttribute("href")!==(R.href==null||R.href===""?null:R.href)||s.getAttribute("crossorigin")!==(R.crossOrigin==null?null:R.crossOrigin)||s.getAttribute("title")!==(R.title==null?null:R.title))break;return s;case"style":if(s.hasAttribute("data-precedence"))break;return s;case"script":if(A=s.getAttribute("src"),(A!==(R.src==null?null:R.src)||s.getAttribute("type")!==(R.type==null?null:R.type)||s.getAttribute("crossorigin")!==(R.crossOrigin==null?null:R.crossOrigin))&&A&&s.hasAttribute("async")&&!s.hasAttribute("itemprop"))break;return s;default:return s}}else if(a==="input"&&s.type==="hidden"){var A=R.name==null?null:""+R.name;if(R.type==="hidden"&&s.getAttribute("name")===A)return s}else return s;if(s=Zi(s.nextSibling),s===null)break}return null}function OL(s,a,f){if(a==="")return null;for(;s.nodeType!==3;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!f||(s=Zi(s.nextSibling),s===null))return null;return s}function ER(s,a){for(;s.nodeType!==8;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!a||(s=Zi(s.nextSibling),s===null))return null;return s}function Mb(s){return s.data==="$?"||s.data==="$~"}function jb(s){return s.data==="$!"||s.data==="$?"&&s.ownerDocument.readyState!=="loading"}function AL(s,a){var f=s.ownerDocument;if(s.data==="$~")s._reactRetry=a;else if(s.data!=="$?"||f.readyState!=="loading")a();else{var m=function(){a(),f.removeEventListener("DOMContentLoaded",m)};f.addEventListener("DOMContentLoaded",m),s._reactRetry=m}}function Zi(s){for(;s!=null;s=s.nextSibling){var a=s.nodeType;if(a===1||a===3)break;if(a===8){if(a=s.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return s}var Pb=null;function CR(s){s=s.nextSibling;for(var a=0;s;){if(s.nodeType===8){var f=s.data;if(f==="/$"||f==="/&"){if(a===0)return Zi(s.nextSibling);a--}else f!=="$"&&f!=="$!"&&f!=="$?"&&f!=="$~"&&f!=="&"||a++}s=s.nextSibling}return null}function TR(s){s=s.previousSibling;for(var a=0;s;){if(s.nodeType===8){var f=s.data;if(f==="$"||f==="$!"||f==="$?"||f==="$~"||f==="&"){if(a===0)return s;a--}else f!=="/$"&&f!=="/&"||a++}s=s.previousSibling}return null}function RR(s,a,f){switch(a=Jp(f),s){case"html":if(s=a.documentElement,!s)throw Error(r(452));return s;case"head":if(s=a.head,!s)throw Error(r(453));return s;case"body":if(s=a.body,!s)throw Error(r(454));return s;default:throw Error(r(451))}}function ld(s){for(var a=s.attributes;a.length;)s.removeAttributeNode(a[0]);Ef(s)}var Yi=new Map,OR=new Set;function em(s){return typeof s.getRootNode=="function"?s.getRootNode():s.nodeType===9?s:s.ownerDocument}var wo=H.d;H.d={f:kL,r:ML,D:jL,C:PL,L:NL,m:DL,X:$L,S:IL,M:zL};function kL(){var s=wo.f(),a=Hp();return s||a}function ML(s){var a=Vo(s);a!==null&&a.tag===5&&a.type==="form"?HC(a):wo.r(s)}var Gc=typeof document>"u"?null:document;function AR(s,a,f){var m=Gc;if(m&&typeof a=="string"&&a){var R=ci(a);R='link[rel="'+s+'"][href="'+R+'"]',typeof f=="string"&&(R+='[crossorigin="'+f+'"]'),OR.has(R)||(OR.add(R),s={rel:s,crossOrigin:f,href:a},m.querySelector(R)===null&&(a=m.createElement("link"),Lr(a,"link",s),dr(a),m.head.appendChild(a)))}}function jL(s){wo.D(s),AR("dns-prefetch",s,null)}function PL(s,a){wo.C(s,a),AR("preconnect",s,a)}function NL(s,a,f){wo.L(s,a,f);var m=Gc;if(m&&s&&a){var R='link[rel="preload"][as="'+ci(a)+'"]';a==="image"&&f&&f.imageSrcSet?(R+='[imagesrcset="'+ci(f.imageSrcSet)+'"]',typeof f.imageSizes=="string"&&(R+='[imagesizes="'+ci(f.imageSizes)+'"]')):R+='[href="'+ci(s)+'"]';var A=R;switch(a){case"style":A=Zc(s);break;case"script":A=Yc(s)}Yi.has(A)||(s=p({rel:"preload",href:a==="image"&&f&&f.imageSrcSet?void 0:s,as:a},f),Yi.set(A,s),m.querySelector(R)!==null||a==="style"&&m.querySelector(cd(A))||a==="script"&&m.querySelector(ud(A))||(a=m.createElement("link"),Lr(a,"link",s),dr(a),m.head.appendChild(a)))}}function DL(s,a){wo.m(s,a);var f=Gc;if(f&&s){var m=a&&typeof a.as=="string"?a.as:"script",R='link[rel="modulepreload"][as="'+ci(m)+'"][href="'+ci(s)+'"]',A=R;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":A=Yc(s)}if(!Yi.has(A)&&(s=p({rel:"modulepreload",href:s},a),Yi.set(A,s),f.querySelector(R)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(f.querySelector(ud(A)))return}m=f.createElement("link"),Lr(m,"link",s),dr(m),f.head.appendChild(m)}}}function IL(s,a,f){wo.S(s,a,f);var m=Gc;if(m&&s){var R=qo(m).hoistableStyles,A=Zc(s);a=a||"default";var D=R.get(A);if(!D){var W={loading:0,preload:null};if(D=m.querySelector(cd(A)))W.loading=5;else{s=p({rel:"stylesheet",href:s,"data-precedence":a},f),(f=Yi.get(A))&&Nb(s,f);var ae=D=m.createElement("link");dr(ae),Lr(ae,"link",s),ae._p=new Promise(function(be,Ae){ae.onload=be,ae.onerror=Ae}),ae.addEventListener("load",function(){W.loading|=1}),ae.addEventListener("error",function(){W.loading|=2}),W.loading|=4,tm(D,a,m)}D={type:"stylesheet",instance:D,count:1,state:W},R.set(A,D)}}}function $L(s,a){wo.X(s,a);var f=Gc;if(f&&s){var m=qo(f).hoistableScripts,R=Yc(s),A=m.get(R);A||(A=f.querySelector(ud(R)),A||(s=p({src:s,async:!0},a),(a=Yi.get(R))&&Db(s,a),A=f.createElement("script"),dr(A),Lr(A,"link",s),f.head.appendChild(A)),A={type:"script",instance:A,count:1,state:null},m.set(R,A))}}function zL(s,a){wo.M(s,a);var f=Gc;if(f&&s){var m=qo(f).hoistableScripts,R=Yc(s),A=m.get(R);A||(A=f.querySelector(ud(R)),A||(s=p({src:s,async:!0,type:"module"},a),(a=Yi.get(R))&&Db(s,a),A=f.createElement("script"),dr(A),Lr(A,"link",s),f.head.appendChild(A)),A={type:"script",instance:A,count:1,state:null},m.set(R,A))}}function kR(s,a,f,m){var R=(R=J.current)?em(R):null;if(!R)throw Error(r(446));switch(s){case"meta":case"title":return null;case"style":return typeof f.precedence=="string"&&typeof f.href=="string"?(a=Zc(f.href),f=qo(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"){s=Zc(f.href);var A=qo(R).hoistableStyles,D=A.get(s);if(D||(R=R.ownerDocument||R,D={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},A.set(s,D),(A=R.querySelector(cd(s)))&&!A._p&&(D.instance=A,D.state.loading=5),Yi.has(s)||(f={rel:"preload",as:"style",href:f.href,crossOrigin:f.crossOrigin,integrity:f.integrity,media:f.media,hrefLang:f.hrefLang,referrerPolicy:f.referrerPolicy},Yi.set(s,f),A||LL(R,s,f,D.state))),a&&m===null)throw Error(r(528,""));return D}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=Yc(f),f=qo(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,s))}}function Zc(s){return'href="'+ci(s)+'"'}function cd(s){return'link[rel="stylesheet"]['+s+"]"}function MR(s){return p({},s,{"data-precedence":s.precedence,precedence:null})}function LL(s,a,f,m){s.querySelector('link[rel="preload"][as="style"]['+a+"]")?m.loading=1:(a=s.createElement("link"),m.preload=a,a.addEventListener("load",function(){return m.loading|=1}),a.addEventListener("error",function(){return m.loading|=2}),Lr(a,"link",f),dr(a),s.head.appendChild(a))}function Yc(s){return'[src="'+ci(s)+'"]'}function ud(s){return"script[async]"+s}function jR(s,a,f){if(a.count++,a.instance===null)switch(a.type){case"style":var m=s.querySelector('style[data-href~="'+ci(f.href)+'"]');if(m)return a.instance=m,dr(m),m;var R=p({},f,{"data-href":f.href,"data-precedence":f.precedence,href:null,precedence:null});return m=(s.ownerDocument||s).createElement("style"),dr(m),Lr(m,"style",R),tm(m,f.precedence,s),a.instance=m;case"stylesheet":R=Zc(f.href);var A=s.querySelector(cd(R));if(A)return a.state.loading|=4,a.instance=A,dr(A),A;m=MR(f),(R=Yi.get(R))&&Nb(m,R),A=(s.ownerDocument||s).createElement("link"),dr(A);var D=A;return D._p=new Promise(function(W,ae){D.onload=W,D.onerror=ae}),Lr(A,"link",m),a.state.loading|=4,tm(A,f.precedence,s),a.instance=A;case"script":return A=Yc(f.src),(R=s.querySelector(ud(A)))?(a.instance=R,dr(R),R):(m=f,(R=Yi.get(A))&&(m=p({},f),Db(m,R)),s=s.ownerDocument||s,R=s.createElement("script"),dr(R),Lr(R,"link",m),s.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,tm(m,f.precedence,s));return a.instance}function tm(s,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,D=0;D<m.length;D++){var W=m[D];if(W.dataset.precedence===a)A=W;else if(A!==R)break}A?A.parentNode.insertBefore(s,A.nextSibling):(a=f.nodeType===9?f.head:f,a.insertBefore(s,a.firstChild))}function Nb(s,a){s.crossOrigin==null&&(s.crossOrigin=a.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=a.referrerPolicy),s.title==null&&(s.title=a.title)}function Db(s,a){s.crossOrigin==null&&(s.crossOrigin=a.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=a.referrerPolicy),s.integrity==null&&(s.integrity=a.integrity)}var nm=null;function PR(s,a,f){if(nm===null){var m=new Map,R=nm=new Map;R.set(f,m)}else R=nm,m=R.get(f),m||(m=new Map,R.set(f,m));if(m.has(s))return m;for(m.set(s,null),f=f.getElementsByTagName(s),R=0;R<f.length;R++){var A=f[R];if(!(A[il]||A[Qt]||s==="link"&&A.getAttribute("rel")==="stylesheet")&&A.namespaceURI!=="http://www.w3.org/2000/svg"){var D=A.getAttribute(a)||"";D=s+D;var W=m.get(D);W?W.push(A):m.set(D,[A])}}return m}function NR(s,a,f){s=s.ownerDocument||s,s.head.insertBefore(f,a==="title"?s.querySelector("head > title"):null)}function FL(s,a,f){if(f===1||a.itemProp!=null)return!1;switch(s){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"?(s=a.disabled,typeof a.precedence=="string"&&s==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 DR(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function UL(s,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(cd(R));if(A){a=A._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(s.count++,s=rm.bind(s),a.then(s,s)),f.state.loading|=4,f.instance=A,dr(A);return}A=a.ownerDocument||a,m=MR(m),(R=Yi.get(R))&&Nb(m,R),A=A.createElement("link"),dr(A);var D=A;D._p=new Promise(function(W,ae){D.onload=W,D.onerror=ae}),Lr(A,"link",m),f.instance=A}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(f,a),(a=f.state.preload)&&(f.state.loading&3)===0&&(s.count++,f=rm.bind(s),a.addEventListener("load",f),a.addEventListener("error",f))}}var Ib=0;function VL(s,a){return s.stylesheets&&s.count===0&&sm(s,s.stylesheets),0<s.count||0<s.imgCount?function(f){var m=setTimeout(function(){if(s.stylesheets&&sm(s,s.stylesheets),s.unsuspend){var A=s.unsuspend;s.unsuspend=null,A()}},6e4+a);0<s.imgBytes&&Ib===0&&(Ib=62500*xL());var R=setTimeout(function(){if(s.waitingForImages=!1,s.count===0&&(s.stylesheets&&sm(s,s.stylesheets),s.unsuspend)){var A=s.unsuspend;s.unsuspend=null,A()}},(s.imgBytes>Ib?50:800)+a);return s.unsuspend=f,function(){s.unsuspend=null,clearTimeout(m),clearTimeout(R)}}:null}function rm(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)sm(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var im=null;function sm(s,a){s.stylesheets=null,s.unsuspend!==null&&(s.count++,im=new Map,a.forEach(qL,s),im=null,rm.call(s))}function qL(s,a){if(!(a.state.loading&4)){var f=im.get(s);if(f)var m=f.get(null);else{f=new Map,im.set(s,f);for(var R=s.querySelectorAll("link[data-precedence],style[data-precedence]"),A=0;A<R.length;A++){var D=R[A];(D.nodeName==="LINK"||D.getAttribute("media")!=="not all")&&(f.set(D.dataset.precedence,D),m=D)}m&&f.set(null,m)}R=a.instance,D=R.getAttribute("data-precedence"),A=f.get(D)||m,A===m&&f.set(null,R),f.set(D,R),this.count++,m=rm.bind(this),R.addEventListener("load",m),R.addEventListener("error",m),A?A.parentNode.insertBefore(R,A.nextSibling):(s=s.nodeType===9?s.head:s,s.insertBefore(R,s.firstChild)),a.state.loading|=4}}var fd={$$typeof:E,Provider:null,Consumer:null,_currentValue:Y,_currentValue2:Y,_threadCount:0};function BL(s,a,f,m,R,A,D,W,ae){this.tag=1,this.containerInfo=s,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=D,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=ae,this.incompleteTransitions=new Map}function IR(s,a,f,m,R,A,D,W,ae,be,Ae,Pe){return s=new BL(s,a,f,D,ae,be,Ae,Pe,W),a=1,A===!0&&(a|=24),A=xi(3,null,null,a),s.current=A,A.stateNode=s,a=mv(),a.refCount++,s.pooledCache=a,a.refCount++,A.memoizedState={element:m,isDehydrated:f,cache:a},bv(A),s}function $R(s){return s?(s=Tc,s):Tc}function zR(s,a,f,m,R,A){R=$R(R),m.context===null?m.context=R:m.pendingContext=R,m=ea(a),m.payload={element:f},A=A===void 0?null:A,A!==null&&(m.callback=A),f=ta(s,m,a),f!==null&&(mi(f,s,a),qf(f,s,a))}function LR(s,a){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var f=s.retryLane;s.retryLane=f!==0&&f<a?f:a}}function $b(s,a){LR(s,a),(s=s.alternate)&&LR(s,a)}function FR(s){if(s.tag===13||s.tag===31){var a=ml(s,67108864);a!==null&&mi(a,s,67108864),$b(s,67108864)}}function UR(s){if(s.tag===13||s.tag===31){var a=Ri();a=Vn(a);var f=ml(s,a);f!==null&&mi(f,s,a),$b(s,a)}}var om=!0;function HL(s,a,f,m){var R=G.T;G.T=null;var A=H.p;try{H.p=2,zb(s,a,f,m)}finally{H.p=A,G.T=R}}function KL(s,a,f,m){var R=G.T;G.T=null;var A=H.p;try{H.p=8,zb(s,a,f,m)}finally{H.p=A,G.T=R}}function zb(s,a,f,m){if(om){var R=Lb(m);if(R===null)Eb(s,a,m,am,f),qR(s,m);else if(ZL(R,s,a,f,m))m.stopPropagation();else if(qR(s,m),a&4&&-1<GL.indexOf(s)){for(;R!==null;){var A=Vo(R);if(A!==null)switch(A.tag){case 3:if(A=A.stateNode,A.current.memoizedState.isDehydrated){var D=Kt(A.pendingLanes);if(D!==0){var W=A;for(W.pendingLanes|=2,W.entangledLanes|=2;D;){var ae=1<<31-Vt(D);W.entanglements[1]|=ae,D&=~ae}js(A),(ln&6)===0&&(qp=Le()+500,sd(0))}}break;case 31:case 13:W=ml(A,2),W!==null&&mi(W,A,2),Hp(),$b(A,2)}if(A=Lb(m),A===null&&Eb(s,a,m,am,f),A===R)break;R=A}R!==null&&m.stopPropagation()}else Eb(s,a,m,null,f)}}function Lb(s){return s=De(s),Fb(s)}var am=null;function Fb(s){if(am=null,s=Uo(s),s!==null){var a=o(s);if(a===null)s=null;else{var f=a.tag;if(f===13){if(s=l(a),s!==null)return s;s=null}else if(f===31){if(s=c(a),s!==null)return s;s=null}else if(f===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;s=null}else a!==s&&(s=null)}}return am=s,null}function VR(s){switch(s){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(Ve()){case ft:return 2;case Oe:return 8;case me:case Ne:return 32;case Ke:return 268435456;default:return 32}default:return 32}}var Ub=!1,da=null,ha=null,pa=null,dd=new Map,hd=new Map,ma=[],GL="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 qR(s,a){switch(s){case"focusin":case"focusout":da=null;break;case"dragenter":case"dragleave":ha=null;break;case"mouseover":case"mouseout":pa=null;break;case"pointerover":case"pointerout":dd.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":hd.delete(a.pointerId)}}function pd(s,a,f,m,R,A){return s===null||s.nativeEvent!==A?(s={blockedOn:a,domEventName:f,eventSystemFlags:m,nativeEvent:A,targetContainers:[R]},a!==null&&(a=Vo(a),a!==null&&FR(a)),s):(s.eventSystemFlags|=m,a=s.targetContainers,R!==null&&a.indexOf(R)===-1&&a.push(R),s)}function ZL(s,a,f,m,R){switch(a){case"focusin":return da=pd(da,s,a,f,m,R),!0;case"dragenter":return ha=pd(ha,s,a,f,m,R),!0;case"mouseover":return pa=pd(pa,s,a,f,m,R),!0;case"pointerover":var A=R.pointerId;return dd.set(A,pd(dd.get(A)||null,s,a,f,m,R)),!0;case"gotpointercapture":return A=R.pointerId,hd.set(A,pd(hd.get(A)||null,s,a,f,m,R)),!0}return!1}function BR(s){var a=Uo(s.target);if(a!==null){var f=o(a);if(f!==null){if(a=f.tag,a===13){if(a=l(f),a!==null){s.blockedOn=a,ei(s.priority,function(){UR(f)});return}}else if(a===31){if(a=c(f),a!==null){s.blockedOn=a,ei(s.priority,function(){UR(f)});return}}else if(a===3&&f.stateNode.current.memoizedState.isDehydrated){s.blockedOn=f.tag===3?f.stateNode.containerInfo:null;return}}}s.blockedOn=null}function lm(s){if(s.blockedOn!==null)return!1;for(var a=s.targetContainers;0<a.length;){var f=Lb(s.nativeEvent);if(f===null){f=s.nativeEvent;var m=new f.constructor(f.type,f);Me=m,f.target.dispatchEvent(m),Me=null}else return a=Vo(f),a!==null&&FR(a),s.blockedOn=f,!1;a.shift()}return!0}function HR(s,a,f){lm(s)&&f.delete(a)}function YL(){Ub=!1,da!==null&&lm(da)&&(da=null),ha!==null&&lm(ha)&&(ha=null),pa!==null&&lm(pa)&&(pa=null),dd.forEach(HR),hd.forEach(HR)}function cm(s,a){s.blockedOn===a&&(s.blockedOn=null,Ub||(Ub=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,YL)))}var um=null;function KR(s){um!==s&&(um=s,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){um===s&&(um=null);for(var a=0;a<s.length;a+=3){var f=s[a],m=s[a+1],R=s[a+2];if(typeof m!="function"){if(Fb(m||f)===null)continue;break}var A=Vo(f);A!==null&&(s.splice(a,3),a-=3,Lv(A,{pending:!0,data:R,method:f.method,action:m},m,R))}}))}function Wc(s){function a(ae){return cm(ae,s)}da!==null&&cm(da,s),ha!==null&&cm(ha,s),pa!==null&&cm(pa,s),dd.forEach(a),hd.forEach(a);for(var f=0;f<ma.length;f++){var m=ma[f];m.blockedOn===s&&(m.blockedOn=null)}for(;0<ma.length&&(f=ma[0],f.blockedOn===null);)BR(f),f.blockedOn===null&&ma.shift();if(f=(s.ownerDocument||s).$$reactFormReplay,f!=null)for(m=0;m<f.length;m+=3){var R=f[m],A=f[m+1],D=R[Cn]||null;if(typeof A=="function")D||KR(f);else if(D){var W=null;if(A&&A.hasAttribute("formAction")){if(R=A,D=A[Cn]||null)W=D.formAction;else if(Fb(R)!==null)continue}else W=D.action;typeof W=="function"?f[m+1]=W:(f.splice(m,3),m-=3),KR(f)}}}function GR(){function s(A){A.canIntercept&&A.info==="react-transition"&&A.intercept({handler:function(){return new Promise(function(D){return R=D})},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",s),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(f,100),function(){m=!0,navigation.removeEventListener("navigate",s),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),R!==null&&(R(),R=null)}}}function Vb(s){this._internalRoot=s}fm.prototype.render=Vb.prototype.render=function(s){var a=this._internalRoot;if(a===null)throw Error(r(409));var f=a.current,m=Ri();zR(f,m,s,a,null,null)},fm.prototype.unmount=Vb.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var a=s.containerInfo;zR(s.current,2,null,s,null,null),Hp(),a[Nr]=null}};function fm(s){this._internalRoot=s}fm.prototype.unstable_scheduleHydration=function(s){if(s){var a=ar();s={blockedOn:null,target:s,priority:a};for(var f=0;f<ma.length&&a!==0&&a<ma[f].priority;f++);ma.splice(f,0,s),f===0&&BR(s)}};var ZR=t.version;if(ZR!=="19.2.3")throw Error(r(527,ZR,"19.2.3"));H.findDOMNode=function(s){var a=s._reactInternals;if(a===void 0)throw typeof s.render=="function"?Error(r(188)):(s=Object.keys(s).join(","),Error(r(268,s)));return s=d(a),s=s!==null?h(s):null,s=s===null?null:s.stateNode,s};var WL={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:G,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var dm=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!dm.isDisabled&&dm.supportsFiber)try{bt=dm.inject(WL),ht=dm}catch{}}return gd.createRoot=function(s,a){if(!i(s))throw Error(r(299));var f=!1,m="",R=tT,A=nT,D=rT;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&&(D=a.onRecoverableError)),a=IR(s,1,!1,null,null,f,m,null,R,A,D,GR),s[Nr]=a.current,_b(s),new Vb(a)},gd.hydrateRoot=function(s,a,f){if(!i(s))throw Error(r(299));var m=!1,R="",A=tT,D=nT,W=rT,ae=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&&(D=f.onCaughtError),f.onRecoverableError!==void 0&&(W=f.onRecoverableError),f.formState!==void 0&&(ae=f.formState)),a=IR(s,1,!0,a,f??null,m,R,ae,A,D,W,GR),a.context=$R(null),f=a.current,m=Ri(),m=Vn(m),R=ea(m),R.callback=null,ta(f,R,m),f=m,a.current.lanes=f,En(a,f),js(a),s[Nr]=a.current,_b(s),new fm(a)},gd.version="19.2.3",gd}var iO;function aF(){if(iO)return Hb.exports;iO=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(),Hb.exports=oF(),Hb.exports}var lF=aF(),af=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(){}},cF={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},uF=class{#e=cF;#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)}},Ul=new uF;function fF(e){setTimeout(e,0)}var Yl=typeof window>"u"||"Deno"in globalThis;function si(){}function dF(e,t){return typeof e=="function"?e(t):e}function VS(e){return typeof e=="number"&&e>=0&&e!==1/0}function Tj(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Aa(e,t){return typeof e=="function"?e(t):e}function Xi(e,t){return typeof e=="function"?e(t):e}function sO(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:l,stale:c}=e;if(l){if(r){if(t.queryHash!==Nx(l,t.options))return!1}else if(!Xd(t.queryKey,l))return!1}if(n!=="all"){const u=t.isActive();if(n==="active"&&!u||n==="inactive"&&u)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||i&&i!==t.state.fetchStatus||o&&!o(t))}function oO(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(Wl(t.options.mutationKey)!==Wl(o))return!1}else if(!Xd(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Nx(e,t){return(t?.queryKeyHashFn||Wl)(e)}function Wl(e){return JSON.stringify(e,(t,n)=>qS(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Xd(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Xd(e[n],t[n])):!1}var hF=Object.prototype.hasOwnProperty;function Rj(e,t){if(e===t)return e;const n=aO(e)&&aO(t);if(!n&&!(qS(e)&&qS(t)))return t;const i=(n?e:Object.keys(e)).length,o=n?t:Object.keys(t),l=o.length,c=n?new Array(l):{};let u=0;for(let d=0;d<l;d++){const h=n?d:o[d],p=e[h],g=t[h];if(p===g){c[h]=p,(n?d<i:hF.call(e,h))&&u++;continue}if(p===null||g===null||typeof p!="object"||typeof g!="object"){c[h]=g;continue}const S=Rj(p,g);c[h]=S,S===p&&u++}return i===l&&u===i?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 aO(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function qS(e){if(!lO(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!lO(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function lO(e){return Object.prototype.toString.call(e)==="[object Object]"}function pF(e){return new Promise(t=>{Ul.setTimeout(t,e)})}function BS(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Rj(e,t):t}function mF(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function gF(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Dx=Symbol();function Oj(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Dx?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Aj(e,t){return typeof e=="function"?e(...t):!!e}var yF=class extends af{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Yl&&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"}},Ix=new yF;function HS(){let e,t;const n=new Promise((i,o)=>{e=i,t=o});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var vF=fF;function bF(){let e=[],t=0,n=c=>{c()},r=c=>{c()},i=vF;const o=c=>{t?e.push(c):i(()=>{n(c)})},l=()=>{const c=e;e=[],c.length&&i(()=>{r(()=>{c.forEach(u=>{n(u)})})})};return{batch:c=>{let u;t++;try{u=c()}finally{t--,t||l()}return u},batchCalls:c=>(...u)=>{o(()=>{c(...u)})},schedule:o,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c},setScheduler:c=>{i=c}}}var Tr=bF(),SF=class extends af{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Yl&&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 SF;function wF(e){return Math.min(1e3*2**e,3e4)}function kj(e){return(e??"online")==="online"?Jg.isOnline():!0}var KS=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Mj(e){let t=!1,n=0,r;const i=HS(),o=()=>i.status!=="pending",l=C=>{if(!o()){const x=new KS(C);g(x),e.onCancel?.(x)}},c=()=>{t=!0},u=()=>{t=!1},d=()=>Ix.isFocused()&&(e.networkMode==="always"||Jg.isOnline())&&e.canRun(),h=()=>kj(e.networkMode)&&e.canRun(),p=C=>{o()||(r?.(),i.resolve(C))},g=C=>{o()||(r?.(),i.reject(C))},S=()=>new Promise(C=>{r=x=>{(o()||d())&&C(x)},e.onPause?.()}).then(()=>{r=void 0,o()||e.onContinue?.()}),y=()=>{if(o())return;let C;const x=n===0?e.initialPromise:void 0;try{C=x??e.fn()}catch(w){C=Promise.reject(w)}Promise.resolve(C).then(p).catch(w=>{if(o())return;const v=e.retry??(Yl?0:3),E=e.retryDelay??wF,b=typeof E=="function"?E(n,w):E,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),pF(b).then(()=>d()?void 0:S()).then(()=>{t?g(w):y()})})};return{promise:i,status:()=>i.status,cancel:l,continue:()=>(r?.(),i),cancelRetry:c,continueRetry:u,canStart:h,start:()=>(h()?y():S().then(y),i)}}var jj=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),VS(this.gcTime)&&(this.#e=Ul.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Yl?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Ul.clearTimeout(this.#e),this.#e=void 0)}},xF=class extends jj{#e;#t;#n;#i;#r;#o;#a;constructor(e){super(),this.#a=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#n=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=uO(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#o,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=uO(this.options);t.data!==void 0&&(this.setState(cO(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=BS(this.state.data,e,this.options);return this.#s({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#s({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(si).catch(si):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Xi(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Dx||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:!Tj(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.#s({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)})},i=()=>{const c=Oj(this.options,t),d=(()=>{const h={client:this.#i,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.#i,state:this.state,fetchFn:i};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.#s({type:"fetch",meta:l.fetchOptions?.meta}),this.#r=Mj({initialPromise:t?.initialPromise,fn:l.fetchFn,onCancel:c=>{c instanceof KS&&c.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(c,u)=>{this.#s({type:"failed",failureCount:c,error:u})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({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 KS){if(c.silent)return this.#r.promise;if(c.revert){if(this.state.data===void 0)throw c;return this.state.data}}throw this.#s({type:"error",error:c}),this.#n.config.onError?.(c,this),this.#n.config.onSettled?.(this.state.data,c,this),c}finally{this.scheduleGc()}}#s(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,...Pj(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...cO(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 i=e.error;return{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};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 Pj(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:kj(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function cO(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function uO(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 _F=class extends af{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#a=HS(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#i=void 0;#r;#o;#a;#s;#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),fO(this.#t,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return GS(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return GS(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 Xi(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&&dO(this.#t,n,this.options,t)&&this.#f(),this.updateResult(),r&&(this.#t!==n||Xi(this.options.enabled,this.#t)!==Xi(t.enabled,this.#t)||Aa(this.options.staleTime,this.#t)!==Aa(t.staleTime,this.#t))&&this.#g();const i=this.#y();r&&(this.#t!==n||Xi(this.options.enabled,this.#t)!==Xi(t.enabled,this.#t)||i!==this.#l)&&this.#v(i)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return CF(this,n)&&(this.#i=n,this.#o=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#i}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.#i))}#f(e){this.#x();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(si)),t}#g(){this.#S();const e=Aa(this.options.staleTime,this.#t);if(Yl||this.#i.isStale||!VS(e))return;const n=Tj(this.#i.dataUpdatedAt,e)+1;this.#c=Ul.setTimeout(()=>{this.#i.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,!(Yl||Xi(this.options.enabled,this.#t)===!1||!VS(this.#l)||this.#l===0)&&(this.#u=Ul.setInterval(()=>{(this.options.refetchIntervalInBackground||Ix.isFocused())&&this.#f()},this.#l))}#b(){this.#g(),this.#v(this.#y())}#S(){this.#c&&(Ul.clearTimeout(this.#c),this.#c=void 0)}#w(){this.#u&&(Ul.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#t,r=this.options,i=this.#i,o=this.#r,l=this.#o,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&&fO(e,t),z=M&&dO(e,n,t,r);(P||z)&&(h={...h,...Pj(d.data,e.options)}),t._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:S,errorUpdatedAt:y,status:C}=h;g=h.data;let x=!1;if(t.placeholderData!==void 0&&g===void 0&&C==="pending"){let M;i?.isPlaceholderData&&t.placeholderData===l?.placeholderData?(M=i.data,x=!0):M=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,M!==void 0&&(C="success",g=BS(i?.data,M,t),p=!0)}if(t.select&&g!==void 0&&!x)if(i&&g===o?.data&&t.select===this.#m)g=this.#d;else try{this.#m=t.select,g=t.select(g),g=BS(i?.data,g,t),this.#d=g,this.#s=null}catch(M){this.#s=M}this.#s&&(S=this.#s,g=this.#d,y=Date.now(),C="error");const w=h.fetchStatus==="fetching",v=C==="pending",E=C==="error",b=v&&w,T=g!==void 0,O={status:C,fetchStatus:h.fetchStatus,isPending:v,isSuccess:C==="success",isError:E,isInitialLoading:b,isLoading:b,data:g,dataUpdatedAt:h.dataUpdatedAt,error:S,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:E&&!T,isPaused:h.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:E&&T,isStale:$x(e,t),refetch:this.refetch,promise:this.#a,isEnabled:Xi(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const M=L=>{O.status==="error"?L.reject(O.error):O.data!==void 0&&L.resolve(O.data)},P=()=>{const L=this.#a=O.promise=HS();M(L)},z=this.#a;switch(z.status){case"pending":e.queryHash===n.queryHash&&M(z);break;case"fulfilled":(O.status==="error"||O.data!==z.value)&&P();break;case"rejected":(O.status!=="error"||O.error!==z.reason)&&P();break}}return O}updateResult(){const e=this.#i,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#o=this.options,this.#r.data!==void 0&&(this.#h=this.#t),Qg(t,e))return;this.#i=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,i=typeof r=="function"?r():r;if(i==="all"||!i&&!this.#p.size)return!0;const o=new Set(i??this.#p);return this.options.throwOnError&&o.add("error"),Object.keys(this.#i).some(l=>{const c=l;return this.#i[c]!==e[c]&&o.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.#i)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function EF(e,t){return Xi(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function fO(e,t){return EF(e,t)||e.state.data!==void 0&&GS(e,t,t.refetchOnMount)}function GS(e,t,n){if(Xi(t.enabled,e)!==!1&&Aa(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&$x(e,t)}return!1}function dO(e,t,n,r){return(e!==t||Xi(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&$x(e,n)}function $x(e,t){return Xi(t.enabled,e)!==!1&&e.isStaleByTime(Aa(t.staleTime,e))}function CF(e,t){return!Qg(e.getCurrentResult(),t)}function hO(e){return{onFetch:(t,n)=>{const r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],l=t.state.data?.pageParams||[];let c={pages:[],pageParams:[]},u=0;const d=async()=>{let h=!1;const p=y=>{Object.defineProperty(y,"signal",{enumerable:!0,get:()=>(t.signal.aborted?h=!0:t.signal.addEventListener("abort",()=>{h=!0}),t.signal)})},g=Oj(t.options,t.fetchOptions),S=async(y,C,x)=>{if(h)return Promise.reject();if(C==null&&y.pages.length)return Promise.resolve(y);const v=(()=>{const _={client:t.client,queryKey:t.queryKey,pageParam:C,direction:x?"backward":"forward",meta:t.options.meta};return p(_),_})(),E=await g(v),{maxPages:b}=t.options,T=x?gF:mF;return{pages:T(y.pages,E,b),pageParams:T(y.pageParams,C,b)}};if(i&&o.length){const y=i==="backward",C=y?TF:pO,x={pages:o,pageParams:l},w=C(r,x);c=await S(x,w,y)}else{const y=e??o.length;do{const C=u===0?l[0]??r.initialPageParam:pO(r,c);if(u>0&&C==null)break;c=await S(c,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 pO(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 TF(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var RF=class extends jj{#e;#t;#n;#i;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Nj(),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.#i?.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.#i=Mj({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(o,l)=>{this.#r({type:"failed",failureCount:o,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",i=!this.#i.canStart();try{if(r)t();else{this.#r({type:"pending",variables:e,isPaused:i}),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:i})}const o=await this.#i.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#r({type:"success",data:o}),o}catch(o){try{throw await this.#n.config.onError?.(o,e,this.state.context,this,n),await this.options.onError?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(void 0,o,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(void 0,o,e,this.state.context,n),o}finally{this.#r({type:"error",error:o})}}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 Nj(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var OF=class extends af{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 RF({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=pm(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=pm(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=pm(e);if(typeof t=="string"){const r=this.#t.get(t)?.find(i=>i.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=pm(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=>oO(t,n))}findAll(e={}){return this.getAll().filter(t=>oO(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(si))))}};function pm(e){return e.options.scope?.id}var AF=class extends af{#e;#t=void 0;#n;#i;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&&Wl(n.mutationKey)!==Wl(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#o(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#o()}mutate(t,n){return this.#i=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??Nj();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){Tr.batch(()=>{if(this.#i&&this.hasListeners()){const n=this.#t.variables,r=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};t?.type==="success"?(this.#i.onSuccess?.(t.data,n,r,i),this.#i.onSettled?.(t.data,null,n,r,i)):t?.type==="error"&&(this.#i.onError?.(t.error,n,r,i),this.#i.onSettled?.(void 0,t.error,n,r,i))}this.listeners.forEach(n=>{n(this.#t)})})}},kF=class extends af{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,i=t.queryHash??Nx(r,t);let o=this.get(i);return o||(o=new xF({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(o)),o}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=>sO(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>sO(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()})})}},MF=class{#e;#t;#n;#i;#r;#o;#a;#s;constructor(e={}){this.#e=e.queryCache||new kF,this.#t=e.mutationCache||new OF,this.#n=e.defaultOptions||{},this.#i=new Map,this.#r=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#a=Ix.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Jg.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#a?.(),this.#a=void 0,this.#s?.(),this.#s=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}),o=this.#e.get(r.queryHash)?.state.data,l=dF(t,o);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(i=>i.cancel(n)));return Promise.all(r).then(si).catch(si)}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(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(si)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(si)}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(si).catch(si)}fetchInfiniteQuery(e){return e.behavior=hO(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(si).catch(si)}ensureInfiniteQueryData(e){return e.behavior=hO(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.#i.set(Wl(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#i.values()],n={};return t.forEach(r=>{Xd(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(Wl(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{Xd(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Nx(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===Dx&&(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()}},Dj=k.createContext(void 0),Ij=e=>{const t=k.useContext(Dj);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},jF=({client:e,children:t})=>(k.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),j.jsx(Dj.Provider,{value:e,children:t})),$j=k.createContext(!1),PF=()=>k.useContext($j);$j.Provider;function NF(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var DF=k.createContext(NF()),IF=()=>k.useContext(DF),$F=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},zF=e=>{k.useEffect(()=>{e.clearReset()},[e])},LF=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||Aj(n,[e.error,r])),FF=(e,t)=>t.state.data===void 0,UF=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},VF=(e,t)=>e.isLoading&&e.isFetching&&!t,qF=(e,t)=>e?.suspense&&t.isPending,mO=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function BF(e,t,n){const r=PF(),i=IF(),o=Ij(),l=o.defaultQueryOptions(e);o.getDefaultOptions().queries?._experimental_beforeQuery?.(l),l._optimisticResults=r?"isRestoring":"optimistic",UF(l),$F(l,i),zF(i);const c=!o.getQueryCache().get(l.queryHash),[u]=k.useState(()=>new t(o,l)),d=u.getOptimisticResult(l),h=!r&&e.subscribed!==!1;if(k.useSyncExternalStore(k.useCallback(p=>{const g=h?u.subscribe(Tr.batchCalls(p)):si;return u.updateResult(),g},[u,h]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),k.useEffect(()=>{u.setOptions(l)},[l,u]),qF(l,d))throw mO(l,u,i);if(LF({result:d,errorResetBoundary:i,throwOnError:l.throwOnError,query:o.getQueryCache().get(l.queryHash),suspense:l.suspense}))throw d.error;return o.getDefaultOptions().queries?._experimental_afterQuery?.(l,d),l.experimental_prefetchInRender&&!Yl&&VF(d,r)&&(c?mO(l,u,i):o.getQueryCache().get(l.queryHash)?.promise)?.catch(si).finally(()=>{u.updateResult()}),l.notifyOnChangeProps?d:u.trackResult(d)}function zj(e,t){return BF({...e,enabled:!0,suspense:!0,throwOnError:FF,placeholderData:void 0},_F)}function HF(e,t){const n=Ij(),[r]=k.useState(()=>new AF(n,e));k.useEffect(()=>{r.setOptions(e)},[r,e]);const i=k.useSyncExternalStore(k.useCallback(l=>r.subscribe(Tr.batchCalls(l)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=k.useCallback((l,c)=>{r.mutate(l,c).catch(si)},[r]);if(i.error&&Aj(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}const zx=ZF();function Hn(e,...t){if(!zx)return;const n=GF(e,...t);performance.mark(n);try{console.log(e,...t)}catch{console.log(n)}}function KF(e,...t){zx&&console.warn(e,...t)}function GF(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 ZF(){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 YF={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 Th(e){return`[nuqs] ${YF[e]}
10
- See https://nuqs.dev/NUQS-${e}`}function WF(e){if(e.size===0)return"";const t=[];for(const[r,i]of e.entries()){const o=r.replace(/#/g,"%23").replace(/&/g,"%26").replace(/\+/g,"%2B").replace(/=/g,"%3D").replace(/\?/g,"%3F");t.push(`${o}=${XF(i)}`)}return"?"+t.join("&")}function XF(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(Th(404))}});Xl.displayName="NuqsAdapterContext";zx&&typeof window<"u"&&(window.__NuqsAdapterContext&&window.__NuqsAdapterContext!==Xl&&console.error(Th(303)),window.__NuqsAdapterContext=Xl);function QF(e){return({children:t,defaultOptions:n,processUrlSearchParams:r,...i})=>k.createElement(Xl.Provider,{...i,value:{useAdapter:e,defaultOptions:n,processUrlSearchParams:r}},t)}function JF(e){const t=k.useContext(Xl);if(!("useAdapter"in t))throw new Error(Th(404));return t.useAdapter(e)}const e7=()=>k.useContext(Xl).defaultOptions,t7=()=>k.useContext(Xl).processUrlSearchParams;function n7(){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 r7(e){return{method:"throttle",timeMs:e}}const $d=r7(n7());function i7(e){return e===null||Array.isArray(e)&&e.length===0}function s7(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 Lx(){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(i=>i!==n))},emit(t,n){e.get(t)?.forEach(r=>r(n))}}}function ZS(e,t,n){function r(){e(),n.removeEventListener("abort",o)}const i=setTimeout(r,t);function o(){clearTimeout(i),n.removeEventListener("abort",o)}n.addEventListener("abort",o)}function YS(){const e=Promise;if(Promise.hasOwnProperty("withResolvers"))return Promise.withResolvers();let t=()=>{},n=()=>{};return{promise:new e((r,i)=>{t=r,n=i}),resolve:t,reject:n}}function o7(e,t){let n=t;for(let r=e.length-1;r>=0;r--){const i=e[r];if(!i)continue;const o=n;n=()=>i(o)}n()}function WS(){return new URLSearchParams(location.search)}var Lj=class{updateMap=new Map;options={history:"replace",scroll:!1,shallow:!0};timeMs=$d.timeMs;transitions=new Set;resolvers=null;controller=null;lastFlushedAt=0;resetQueueOnNextPush=!1;push({key:e,query:t,options:n},r=$d.timeMs){this.resetQueueOnNextPush&&(this.reset(),this.resetQueueOnNextPush=!1),Hn("[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=WS}){return this.resolvers?.promise??Promise.resolve(e())}flush({getSearchParamsSnapshot:e=WS,rateLimitFactor:t=1,...n},r){if(this.controller??=new AbortController,!Number.isFinite(this.timeMs))return Hn("[nuqs gtq] Skipping flush due to throttleMs=Infinity"),Promise.resolve(e());if(this.resolvers)return this.resolvers.promise;this.resolvers=YS();const i=()=>{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 ZS(()=>{const l=performance.now()-this.lastFlushedAt,c=this.timeMs,u=t*Math.max(0,c-l);Hn("[nuqs gtq] Scheduling flush in %f ms. Throttled at %f ms (x%f)",u,c,t),u===0?i():ZS(i,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 Hn("[nuqs gtq] Resetting queue %s",JSON.stringify(Object.fromEntries(this.updateMap))),this.updateMap.clear(),this.transitions.clear(),this.options={history:"replace",scroll:!1,shallow:!0},this.timeMs=$d.timeMs,e}applyPendingUpdates(e,t){const{updateUrl:n,getSearchParamsSnapshot:r}=e;let i=r();if(Hn("[nuqs gtq] Applying %d pending update(s) on top of %s",this.updateMap.size,i.toString()),this.updateMap.size===0)return[i,null];const o=Array.from(this.updateMap.entries()),l={...this.options},c=Array.from(this.transitions);e.autoResetQueueOnUpdate&&this.reset(),Hn("[nuqs gtq] Flushing queue %O with options %O",o,l);for(const[u,d]of o)d===null?i.delete(u):i=s7(d,u,i);t&&(i=t(i));try{return o7(c,()=>{n(i,l)}),[i,null]}catch(u){return console.error(Th(429),o.map(([d])=>d).join(),u),[i,u]}}};const Mg=new Lj;function a7(e,t,n){const r=k.useCallback(()=>{const o=Object.fromEntries(e.map(l=>[l,n(l)]));return[JSON.stringify(o),o]},[e.join(","),n]),i=k.useRef(null);return i.current===null&&(i.current=r()),k.useSyncExternalStore(k.useCallback(o=>{const l=e.map(c=>t(c,o));return()=>l.forEach(c=>c())},[e.join(","),t]),()=>{const[o,l]=r();return i.current[0]===o?i.current[1]:(i.current=[o,l],l)},()=>i.current[1])}var l7=class{callback;resolvers=YS();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,ZS(()=>{const n=this.resolvers;try{Hn("[nuqs dq] Flushing debounce queue",e);const r=this.callback(e);Hn("[nuqs dq] Reset debounce queue %O",this.queuedValue),this.queuedValue=void 0,this.resolvers=YS(),r.then(i=>n.resolve(i)).catch(i=>n.reject(i))}catch(r){this.queuedValue=void 0,n.reject(r)}},t,this.controller.signal),this.resolvers.promise}},c7=class{throttleQueue;queues=new Map;queuedQuerySync=Lx();constructor(e=new Lj){this.throttleQueue=e}useQueuedQueries(e){return a7(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??WS;return Promise.resolve(l())}const i=e.key;if(!this.queues.has(i)){Hn("[nuqs dqc] Creating debounce queue for `%s`",i);const l=new l7(c=>(this.throttleQueue.push(c),this.throttleQueue.flush(n,r).finally(()=>{this.queues.get(c.key)?.queuedValue===void 0&&(Hn("[nuqs dqc] Cleaning up empty queue for `%s`",c.key),this.queues.delete(c.key)),this.queuedQuerySync.emit(c.key)})));this.queues.set(i,l)}Hn("[nuqs dqc] Enqueueing debounce update %O",e);const o=this.queues.get(i).push(e,t);return this.queuedQuerySync.emit(i),o}abort(e){const t=this.queues.get(e);return t?(Hn("[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())Hn("[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 Yb=new c7(Mg);function Fj(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 gO(e,t,n){return r=>{if(!(t.length===0||t.some(o=>!Fj(r.getAll(o),e.getAll(o)))))return Hn("[nuqs `%s`] no change, returning previous",t.join(","),r),r;const i=Uj(e,t,n);return Hn("[nuqs `%s`] subbed search params change\n from %O\n to %O",t.join(","),r,i),i}}function Uj(e,t,n){if(t.length===0)return e;const r=n?new URLSearchParams(e):e;for(const i of e.keys())t.includes(i)||r.delete(i);return r}const u7="__nuqs__",XS=Lx();function f7(e){return function(n,r){const i=new URL(location.href);i.search=WF(n),Hn("[nuqs react] Updating url: %s",i),e&&r.shallow===!1?(r.history==="push"?location.assign:location.replace).call(location,i):(r.history==="push"?history.pushState:history.replaceState).call(history,history.state,u7,i),XS.emit("update",n),r.scroll===!0&&window.scrollTo({top:0})}}const Vj=k.createContext({fullPageNavigationOnShallowFalseUpdates:!1});function d7(e){const{fullPageNavigationOnShallowFalseUpdates:t}=k.useContext(Vj),[n,r]=k.useState(()=>typeof location>"u"?new URLSearchParams:Uj(new URLSearchParams(location.search),e,!1));return k.useEffect(()=>{const i=()=>{r(gO(new URLSearchParams(location.search),e,!1))},o=l=>{r(gO(l,e,!0))};return XS.on("update",o),window.addEventListener("popstate",i),()=>{XS.off("update",o),window.removeEventListener("popstate",i)}},[e.join("&")]),{searchParams:n,updateUrl:k.useMemo(()=>f7(t),[t])}}const h7=QF(d7);function p7({children:e,fullPageNavigationOnShallowFalseUpdates:t=!1,...n}){return k.createElement(Vj.Provider,{value:{fullPageNavigationOnShallowFalseUpdates:t}},k.createElement(h7,{...n,children:e}))}const Ky=k.createContext(null);Ky.displayName="PanelGroupContext";const ir={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},Fx=10,Hl=k.useLayoutEffect,yO=of.useId,m7=typeof yO=="function"?yO:()=>null;let g7=0;function Ux(e=null){const t=m7(),n=k.useRef(e||t||null);return n.current===null&&(n.current=""+g7++),e??n.current}function qj({children:e,className:t="",collapsedSize:n,collapsible:r,defaultSize:i,forwardedRef:o,id:l,maxSize:c,minSize:u,onCollapse:d,onExpand:h,onResize:p,order:g,style:S,tagName:y="div",...C}){const x=k.useContext(Ky);if(x===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:w,expandPanel:v,getPanelSize:E,getPanelStyle:b,groupId:T,isPanelCollapsed:_,reevaluatePanelConstraints:O,registerPanel:M,resizePanel:P,unregisterPanel:z}=x,L=Ux(l),q=k.useRef({callbacks:{onCollapse:d,onExpand:h,onResize:p},constraints:{collapsedSize:n,collapsible:r,defaultSize:i,maxSize:c,minSize:u},id:L,idIsFromProps:l!==void 0,order:g});k.useRef({didLogMissingDefaultSizeWarning:!1}),Hl(()=>{const{callbacks:te,constraints:ee}=q.current,G={...ee};q.current.id=L,q.current.idIsFromProps=l!==void 0,q.current.order=g,te.onCollapse=d,te.onExpand=h,te.onResize=p,ee.collapsedSize=n,ee.collapsible=r,ee.defaultSize=i,ee.maxSize=c,ee.minSize=u,(G.collapsedSize!==ee.collapsedSize||G.collapsible!==ee.collapsible||G.maxSize!==ee.maxSize||G.minSize!==ee.minSize)&&O(q.current,G)}),Hl(()=>{const te=q.current;return M(te),()=>{z(te)}},[g,L,M,z]),k.useImperativeHandle(o,()=>({collapse:()=>{w(q.current)},expand:te=>{v(q.current,te)},getId(){return L},getSize(){return E(q.current)},isCollapsed(){return _(q.current)},isExpanded(){return!_(q.current)},resize:te=>{P(q.current,te)}}),[w,v,E,_,L,P]);const Z=b(q.current,i);return k.createElement(y,{...C,children:e,className:t,id:L,style:{...Z,...S},[ir.groupId]:T,[ir.panel]:"",[ir.panelCollapsible]:r||void 0,[ir.panelId]:L,[ir.panelSize]:parseFloat(""+Z.flexGrow).toFixed(1)})}const Bj=k.forwardRef((e,t)=>k.createElement(qj,{...e,forwardedRef:t}));qj.displayName="Panel";Bj.displayName="forwardRef(Panel)";let QS=null,jg=-1,Ca=null;function y7(e,t,n){const r=(t&Yj)!==0,i=(t&Wj)!==0,o=(t&Xj)!==0,l=(t&Qj)!==0;if(t){if(r)return o?"se-resize":l?"ne-resize":"e-resize";if(i)return o?"sw-resize":l?"nw-resize":"w-resize";if(o)return"s-resize";if(l)return"n-resize"}switch(e){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function v7(){Ca!==null&&(document.head.removeChild(Ca),QS=null,Ca=null,jg=-1)}function Wb(e,t,n){var r,i;const o=y7(e,t);if(QS!==o){if(QS=o,Ca===null&&(Ca=document.createElement("style"),document.head.appendChild(Ca)),jg>=0){var l;(l=Ca.sheet)===null||l===void 0||l.removeRule(jg)}jg=(r=(i=Ca.sheet)===null||i===void 0?void 0:i.insertRule(`*{cursor: ${o} !important;}`))!==null&&r!==void 0?r:-1}}function Hj(e){return e.type==="keydown"}function Kj(e){return e.type.startsWith("pointer")}function Gj(e){return e.type.startsWith("mouse")}function Gy(e){if(Kj(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(Gj(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function b7(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function S7(e,t,n){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 w7(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:SO(e),b:SO(t)};let r;for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),r=e;At(r,"Stacking order can only be calculated for elements with a common ancestor");const i={a:bO(vO(n.a)),b:bO(vO(n.b))};if(i.a===i.b){const o=r.childNodes,l={a:n.a.at(-1),b:n.b.at(-1)};let c=o.length;for(;c--;){const u=o[c];if(u===l.a)return 1;if(u===l.b)return-1}}return Math.sign(i.a-i.b)}const x7=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function _7(e){var t;const n=getComputedStyle((t=Zj(e))!==null&&t!==void 0?t:e).display;return n==="flex"||n==="inline-flex"}function E7(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||_7(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"||x7.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function vO(e){let t=e.length;for(;t--;){const n=e[t];if(At(n,"Missing node"),E7(n))return n}return null}function bO(e){return e&&Number(getComputedStyle(e).zIndex)||0}function SO(e){const t=[];for(;e;)t.push(e),e=Zj(e);return t}function Zj(e){const{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}const Yj=1,Wj=2,Xj=4,Qj=8,C7=b7()==="coarse";let _s=[],Cu=!1,Ta=new Map,Zy=new Map;const Qd=new Set;function T7(e,t,n,r,i){var o;const{ownerDocument:l}=t,c={direction:n,element:t,hitAreaMargins:r,setResizeHandlerState:i},u=(o=Ta.get(l))!==null&&o!==void 0?o:0;return Ta.set(l,u+1),Qd.add(c),ey(),function(){var h;Zy.delete(e),Qd.delete(c);const p=(h=Ta.get(l))!==null&&h!==void 0?h:1;if(Ta.set(l,p-1),ey(),p===1&&Ta.delete(l),_s.includes(c)){const g=_s.indexOf(c);g>=0&&_s.splice(g,1),Yy(),i("up",!0,null)}}}function R7(e){const{target:t}=e,{x:n,y:r}=Gy(e);Cu=!0,Vx({target:t,x:n,y:r}),ey(),_s.length>0&&(ty("down",e),Yy(),e.preventDefault(),Jj(t)||e.stopImmediatePropagation())}function Xb(e){const{x:t,y:n}=Gy(e);if(Cu&&e.type!=="pointerleave"&&e.buttons===0&&(Cu=!1,ty("up",e)),!Cu){const{target:r}=e;Vx({target:r,x:t,y:n})}ty("move",e),Yy(),_s.length>0&&e.preventDefault()}function Qb(e){const{target:t}=e,{x:n,y:r}=Gy(e);Zy.clear(),Cu=!1,_s.length>0&&(e.preventDefault(),Jj(t)||e.stopImmediatePropagation()),ty("up",e),Vx({target:t,x:n,y:r}),Yy(),ey()}function Jj(e){let t=e;for(;t;){if(t.hasAttribute(ir.resizeHandle))return!0;t=t.parentElement}return!1}function Vx({target:e,x:t,y:n}){_s.splice(0);let r=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(r=e),Qd.forEach(i=>{const{element:o,hitAreaMargins:l}=i,c=o.getBoundingClientRect(),{bottom:u,left:d,right:h,top:p}=c,g=C7?l.coarse:l.fine;if(t>=d-g&&t<=h+g&&n>=p-g&&n<=u+g){if(r!==null&&document.contains(r)&&o!==r&&!o.contains(r)&&!r.contains(o)&&w7(r,o)>0){let y=r,C=!1;for(;y&&!y.contains(o);){if(S7(y.getBoundingClientRect(),c)){C=!0;break}y=y.parentElement}if(C)return}_s.push(i)}})}function Jb(e,t){Zy.set(e,t)}function Yy(){let e=!1,t=!1;_s.forEach(r=>{const{direction:i}=r;i==="horizontal"?e=!0:t=!0});let n=0;Zy.forEach(r=>{n|=r}),e&&t?Wb("intersection",n):e?Wb("horizontal",n):t?Wb("vertical",n):v7()}let e1;function ey(){var e;(e=e1)===null||e===void 0||e.abort(),e1=new AbortController;const t={capture:!0,signal:e1.signal};Qd.size&&(Cu?(_s.length>0&&Ta.forEach((n,r)=>{const{body:i}=r;n>0&&(i.addEventListener("contextmenu",Qb,t),i.addEventListener("pointerleave",Xb,t),i.addEventListener("pointermove",Xb,t))}),Ta.forEach((n,r)=>{const{body:i}=r;i.addEventListener("pointerup",Qb,t),i.addEventListener("pointercancel",Qb,t)})):Ta.forEach((n,r)=>{const{body:i}=r;n>0&&(i.addEventListener("pointerdown",R7,t),i.addEventListener("pointermove",Xb,t))}))}function ty(e,t){Qd.forEach(n=>{const{setResizeHandlerState:r}=n,i=_s.includes(n);r(e,i,t)})}function O7(){const[e,t]=k.useState(0);return k.useCallback(()=>t(n=>n+1),[])}function At(e,t){if(!e)throw console.error(t),Error(t)}function Ql(e,t,n=Fx){return e.toFixed(n)===t.toFixed(n)?0:e>t?1:-1}function Ro(e,t,n=Fx){return Ql(e,t,n)===0}function Ai(e,t,n){return Ql(e,t,n)===0}function A7(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){const i=e[r],o=t[r];if(!Ai(i,o,n))return!1}return!0}function hu({panelConstraints:e,panelIndex:t,size:n}){const r=e[t];At(r!=null,`Panel constraints not found for index ${t}`);let{collapsedSize:i=0,collapsible:o,maxSize:l=100,minSize:c=0}=r;if(Ql(n,c)<0)if(o){const u=(i+c)/2;Ql(n,u)<0?n=i:n=c}else n=c;return n=Math.min(l,n),n=parseFloat(n.toFixed(Fx)),n}function Rd({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:o}){if(Ai(e,0))return t;const l=[...t],[c,u]=r;At(c!=null,"Invalid first pivot index"),At(u!=null,"Invalid second pivot index");let d=0;if(o==="keyboard"){{const p=e<0?u:c,g=n[p];At(g,`Panel constraints not found for index ${p}`);const{collapsedSize:S=0,collapsible:y,minSize:C=0}=g;if(y){const x=t[p];if(At(x!=null,`Previous layout not found for panel index ${p}`),Ai(x,S)){const w=C-x;Ql(w,Math.abs(e))>0&&(e=e<0?0-w:w)}}}{const p=e<0?c:u,g=n[p];At(g,`No panel constraints found for index ${p}`);const{collapsedSize:S=0,collapsible:y,minSize:C=0}=g;if(y){const x=t[p];if(At(x!=null,`Previous layout not found for panel index ${p}`),Ai(x,C)){const w=x-S;Ql(w,Math.abs(e))>0&&(e=e<0?0-w:w)}}}}{const p=e<0?1:-1;let g=e<0?u:c,S=0;for(;;){const C=t[g];At(C!=null,`Previous layout not found for panel index ${g}`);const w=hu({panelConstraints:n,panelIndex:g,size:100})-C;if(S+=w,g+=p,g<0||g>=n.length)break}const y=Math.min(Math.abs(e),Math.abs(S));e=e<0?0-y:y}{let g=e<0?c:u;for(;g>=0&&g<n.length;){const S=Math.abs(e)-Math.abs(d),y=t[g];At(y!=null,`Previous layout not found for panel index ${g}`);const C=y-S,x=hu({panelConstraints:n,panelIndex:g,size:C});if(!Ai(y,x)&&(d+=y-x,l[g]=x,d.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?g--:g++}}if(A7(i,l))return i;{const p=e<0?u:c,g=t[p];At(g!=null,`Previous layout not found for panel index ${p}`);const S=g+d,y=hu({panelConstraints:n,panelIndex:p,size:S});if(l[p]=y,!Ai(y,S)){let C=S-y,w=e<0?u:c;for(;w>=0&&w<n.length;){const v=l[w];At(v!=null,`Previous layout not found for panel index ${w}`);const E=v+C,b=hu({panelConstraints:n,panelIndex:w,size:E});if(Ai(v,b)||(C-=b-v,l[w]=b),Ai(C,0))break;e>0?w--:w++}}}const h=l.reduce((p,g)=>g+p,0);return Ai(h,100)?l:i}function k7({layout:e,panelsArray:t,pivotIndices:n}){let r=0,i=100,o=0,l=0;const c=n[0];At(c!=null,"No pivot index found"),t.forEach((p,g)=>{const{constraints:S}=p,{maxSize:y=100,minSize:C=0}=S;g===c?(r=C,i=y):(o+=C,l+=y)});const u=Math.min(i,100-o),d=Math.max(r,100-l),h=e[c];return{valueMax:u,valueMin:d,valueNow:h}}function Jd(e,t=document){return Array.from(t.querySelectorAll(`[${ir.resizeHandleId}][data-panel-group-id="${e}"]`))}function eP(e,t,n=document){const i=Jd(e,n).findIndex(o=>o.getAttribute(ir.resizeHandleId)===t);return i??null}function tP(e,t,n){const r=eP(e,t,n);return r!=null?[r,r+1]:[-1,-1]}function M7(e){return e instanceof HTMLElement?!0:typeof e=="object"&&e!==null&&"tagName"in e&&"getAttribute"in e}function nP(e,t=document){if(M7(t)&&t.dataset.panelGroupId==e)return t;const n=t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`);return n||null}function Wy(e,t=document){const n=t.querySelector(`[${ir.resizeHandleId}="${e}"]`);return n||null}function j7(e,t,n,r=document){var i,o,l,c;const u=Wy(t,r),d=Jd(e,r),h=u?d.indexOf(u):-1,p=(i=(o=n[h])===null||o===void 0?void 0:o.id)!==null&&i!==void 0?i:null,g=(l=(c=n[h+1])===null||c===void 0?void 0:c.id)!==null&&l!==void 0?l:null;return[p,g]}function P7({committedValuesRef:e,eagerValuesRef:t,groupId:n,layout:r,panelDataArray:i,panelGroupElement:o,setLayout:l}){k.useRef({didWarnAboutMissingResizeHandle:!1}),Hl(()=>{if(!o)return;const c=Jd(n,o);for(let u=0;u<i.length-1;u++){const{valueMax:d,valueMin:h,valueNow:p}=k7({layout:r,panelsArray:i,pivotIndices:[u,u+1]}),g=c[u];if(g!=null){const S=i[u];At(S,`No panel data found for index "${u}"`),g.setAttribute("aria-controls",S.id),g.setAttribute("aria-valuemax",""+Math.round(d)),g.setAttribute("aria-valuemin",""+Math.round(h)),g.setAttribute("aria-valuenow",p!=null?""+Math.round(p):"")}}return()=>{c.forEach((u,d)=>{u.removeAttribute("aria-controls"),u.removeAttribute("aria-valuemax"),u.removeAttribute("aria-valuemin"),u.removeAttribute("aria-valuenow")})}},[n,r,i,o]),k.useEffect(()=>{if(!o)return;const c=t.current;At(c,"Eager values not found");const{panelDataArray:u}=c,d=nP(n,o);At(d!=null,`No group found for id "${n}"`);const h=Jd(n,o);At(h,`No resize handles found for group id "${n}"`);const p=h.map(g=>{const S=g.getAttribute(ir.resizeHandleId);At(S,"Resize handle element has no handle id attribute");const[y,C]=j7(n,S,u,o);if(y==null||C==null)return()=>{};const x=w=>{if(!w.defaultPrevented)switch(w.key){case"Enter":{w.preventDefault();const v=u.findIndex(E=>E.id===y);if(v>=0){const E=u[v];At(E,`No panel data found for index ${v}`);const b=r[v],{collapsedSize:T=0,collapsible:_,minSize:O=0}=E.constraints;if(b!=null&&_){const M=Rd({delta:Ai(b,T)?O-T:T-b,initialLayout:r,panelConstraints:u.map(P=>P.constraints),pivotIndices:tP(n,S,o),prevLayout:r,trigger:"keyboard"});r!==M&&l(M)}}break}}};return g.addEventListener("keydown",x),()=>{g.removeEventListener("keydown",x)}});return()=>{p.forEach(g=>g())}},[o,e,t,n,r,i,l])}function wO(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 rP(e,t){const n=e==="horizontal",{x:r,y:i}=Gy(t);return n?r:i}function N7(e,t,n,r,i){const o=n==="horizontal",l=Wy(t,i);At(l,`No resize handle element found for id "${t}"`);const c=l.getAttribute(ir.groupId);At(c,"Resize handle element has no group id attribute");let{initialCursorPosition:u}=r;const d=rP(n,e),h=nP(c,i);At(h,`No group element found for id "${c}"`);const p=h.getBoundingClientRect(),g=o?p.width:p.height;return(d-u)/g*100}function D7(e,t,n,r,i,o){if(Hj(e)){const l=n==="horizontal";let c=0;e.shiftKey?c=100:i!=null?c=i:c=10;let u=0;switch(e.key){case"ArrowDown":u=l?0:c;break;case"ArrowLeft":u=l?-c:0;break;case"ArrowRight":u=l?c:0;break;case"ArrowUp":u=l?0:-c;break;case"End":u=100;break;case"Home":u=-100;break}return u}else return r==null?0:N7(e,t,n,r,o)}function I7({panelDataArray:e}){const t=Array(e.length),n=e.map(o=>o.constraints);let r=0,i=100;for(let o=0;o<e.length;o++){const l=n[o];At(l,`Panel constraints not found for index ${o}`);const{defaultSize:c}=l;c!=null&&(r++,t[o]=c,i-=c)}for(let o=0;o<e.length;o++){const l=n[o];At(l,`Panel constraints not found for index ${o}`);const{defaultSize:c}=l;if(c!=null)continue;const u=e.length-r,d=i/u;r++,t[o]=d,i-=d}return t}function Xc(e,t,n){t.forEach((r,i)=>{const o=e[i];At(o,`Panel data not found for index ${i}`);const{callbacks:l,constraints:c,id:u}=o,{collapsedSize:d=0,collapsible:h}=c,p=n[u];if(p==null||r!==p){n[u]=r;const{onCollapse:g,onExpand:S,onResize:y}=l;y&&y(r,p),h&&(g||S)&&(S&&(p==null||Ro(p,d))&&!Ro(r,d)&&S(),g&&(p==null||!Ro(p,d))&&Ro(r,d)&&g())}})}function mm(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 $7({defaultSize:e,dragState:t,layout:n,panelData:r,panelIndex:i,precision:o=3}){const l=n[i];let c;return l==null?c=e!=null?e.toFixed(o):"1":r.length===1?c="1":c=l.toFixed(o),{flexBasis:0,flexGrow:c,flexShrink:1,overflow:"hidden",pointerEvents:t!==null?"none":void 0}}function z7(e,t=10){let n=null;return(...i)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...i)},t)}}function xO(e){try{if(typeof localStorage<"u")e.getItem=t=>localStorage.getItem(t),e.setItem=(t,n)=>{localStorage.setItem(t,n)};else throw new Error("localStorage not supported in this environment")}catch(t){console.error(t),e.getItem=()=>null,e.setItem=()=>{}}}function iP(e){return`react-resizable-panels:${e}`}function sP(e){return e.map(t=>{const{constraints:n,id:r,idIsFromProps:i,order:o}=t;return i?r:o?`${o}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((t,n)=>t.localeCompare(n)).join(",")}function oP(e,t){try{const n=iP(e),r=t.getItem(n);if(r){const i=JSON.parse(r);if(typeof i=="object"&&i!=null)return i}}catch{}return null}function L7(e,t,n){var r,i;const o=(r=oP(e,n))!==null&&r!==void 0?r:{},l=sP(t);return(i=o[l])!==null&&i!==void 0?i:null}function F7(e,t,n,r,i){var o;const l=iP(e),c=sP(t),u=(o=oP(e,i))!==null&&o!==void 0?o:{};u[c]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{i.setItem(l,JSON.stringify(u))}catch(d){console.error(d)}}function _O({layout:e,panelConstraints:t}){const n=[...e],r=n.reduce((o,l)=>o+l,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(o=>`${o}%`).join(", ")}`);if(!Ai(r,100)&&n.length>0)for(let o=0;o<t.length;o++){const l=n[o];At(l!=null,`No layout data found for index ${o}`);const c=100/r*l;n[o]=c}let i=0;for(let o=0;o<t.length;o++){const l=n[o];At(l!=null,`No layout data found for index ${o}`);const c=hu({panelConstraints:t,panelIndex:o,size:l});l!=c&&(i+=l-c,n[o]=c)}if(!Ai(i,0))for(let o=0;o<t.length;o++){const l=n[o];At(l!=null,`No layout data found for index ${o}`);const c=l+i,u=hu({panelConstraints:t,panelIndex:o,size:c});if(l!==u&&(i-=u-l,n[o]=u,Ai(i,0)))break}return n}const U7=100,Od={getItem:e=>(xO(Od),Od.getItem(e)),setItem:(e,t)=>{xO(Od),Od.setItem(e,t)}},EO={};function aP({autoSaveId:e=null,children:t,className:n="",direction:r,forwardedRef:i,id:o=null,onLayout:l=null,keyboardResizeBy:c=null,storage:u=Od,style:d,tagName:h="div",...p}){const g=Ux(o),S=k.useRef(null),[y,C]=k.useState(null),[x,w]=k.useState([]),v=O7(),E=k.useRef({}),b=k.useRef(new Map),T=k.useRef(0),_=k.useRef({autoSaveId:e,direction:r,dragState:y,id:g,keyboardResizeBy:c,onLayout:l,storage:u}),O=k.useRef({layout:x,panelDataArray:[],panelDataArrayChanged:!1});k.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),k.useImperativeHandle(i,()=>({getId:()=>_.current.id,getLayout:()=>{const{layout:$}=O.current;return $},setLayout:$=>{const{onLayout:N}=_.current,{layout:U,panelDataArray:J}=O.current,ne=_O({layout:$,panelConstraints:J.map(se=>se.constraints)});wO(U,ne)||(w(ne),O.current.layout=ne,N&&N(ne),Xc(J,ne,E.current))}}),[]),Hl(()=>{_.current.autoSaveId=e,_.current.direction=r,_.current.dragState=y,_.current.id=g,_.current.onLayout=l,_.current.storage=u}),P7({committedValuesRef:_,eagerValuesRef:O,groupId:g,layout:x,panelDataArray:O.current.panelDataArray,setLayout:w,panelGroupElement:S.current}),k.useEffect(()=>{const{panelDataArray:$}=O.current;if(e){if(x.length===0||x.length!==$.length)return;let N=EO[e];N==null&&(N=z7(F7,U7),EO[e]=N);const U=[...$],J=new Map(b.current);N(e,U,J,x,u)}},[e,x,u]),k.useEffect(()=>{});const M=k.useCallback($=>{const{onLayout:N}=_.current,{layout:U,panelDataArray:J}=O.current;if($.constraints.collapsible){const ne=J.map(Q=>Q.constraints),{collapsedSize:se=0,panelSize:he,pivotIndices:Ee}=Ol(J,$,U);if(At(he!=null,`Panel size not found for panel "${$.id}"`),!Ro(he,se)){b.current.set($.id,he);const ie=lu(J,$)===J.length-1?he-se:se-he,le=Rd({delta:ie,initialLayout:U,panelConstraints:ne,pivotIndices:Ee,prevLayout:U,trigger:"imperative-api"});mm(U,le)||(w(le),O.current.layout=le,N&&N(le),Xc(J,le,E.current))}}},[]),P=k.useCallback(($,N)=>{const{onLayout:U}=_.current,{layout:J,panelDataArray:ne}=O.current;if($.constraints.collapsible){const se=ne.map(Se=>Se.constraints),{collapsedSize:he=0,panelSize:Ee=0,minSize:Q=0,pivotIndices:ie}=Ol(ne,$,J),le=N??Q;if(Ro(Ee,he)){const Se=b.current.get($.id),Te=Se!=null&&Se>=le?Se:le,Ie=lu(ne,$)===ne.length-1?Ee-Te:Te-Ee,Fe=Rd({delta:Ie,initialLayout:J,panelConstraints:se,pivotIndices:ie,prevLayout:J,trigger:"imperative-api"});mm(J,Fe)||(w(Fe),O.current.layout=Fe,U&&U(Fe),Xc(ne,Fe,E.current))}}},[]),z=k.useCallback($=>{const{layout:N,panelDataArray:U}=O.current,{panelSize:J}=Ol(U,$,N);return At(J!=null,`Panel size not found for panel "${$.id}"`),J},[]),L=k.useCallback(($,N)=>{const{panelDataArray:U}=O.current,J=lu(U,$);return $7({defaultSize:N,dragState:y,layout:x,panelData:U,panelIndex:J})},[y,x]),q=k.useCallback($=>{const{layout:N,panelDataArray:U}=O.current,{collapsedSize:J=0,collapsible:ne,panelSize:se}=Ol(U,$,N);return At(se!=null,`Panel size not found for panel "${$.id}"`),ne===!0&&Ro(se,J)},[]),Z=k.useCallback($=>{const{layout:N,panelDataArray:U}=O.current,{collapsedSize:J=0,collapsible:ne,panelSize:se}=Ol(U,$,N);return At(se!=null,`Panel size not found for panel "${$.id}"`),!ne||Ql(se,J)>0},[]),te=k.useCallback($=>{const{panelDataArray:N}=O.current;N.push($),N.sort((U,J)=>{const ne=U.order,se=J.order;return ne==null&&se==null?0:ne==null?-1:se==null?1:ne-se}),O.current.panelDataArrayChanged=!0,v()},[v]);Hl(()=>{if(O.current.panelDataArrayChanged){O.current.panelDataArrayChanged=!1;const{autoSaveId:$,onLayout:N,storage:U}=_.current,{layout:J,panelDataArray:ne}=O.current;let se=null;if($){const Ee=L7($,ne,U);Ee&&(b.current=new Map(Object.entries(Ee.expandToSizes)),se=Ee.layout)}se==null&&(se=I7({panelDataArray:ne}));const he=_O({layout:se,panelConstraints:ne.map(Ee=>Ee.constraints)});wO(J,he)||(w(he),O.current.layout=he,N&&N(he),Xc(ne,he,E.current))}}),Hl(()=>{const $=O.current;return()=>{$.layout=[]}},[]);const ee=k.useCallback($=>{let N=!1;const U=S.current;return U&&window.getComputedStyle(U,null).getPropertyValue("direction")==="rtl"&&(N=!0),function(ne){ne.preventDefault();const se=S.current;if(!se)return()=>null;const{direction:he,dragState:Ee,id:Q,keyboardResizeBy:ie,onLayout:le}=_.current,{layout:Se,panelDataArray:Te}=O.current,{initialLayout:we}=Ee??{},Ie=tP(Q,$,se);let Fe=D7(ne,$,he,Ee,ie,se);const ye=he==="horizontal";ye&&N&&(Fe=-Fe);const Ue=Te.map($e=>$e.constraints),Re=Rd({delta:Fe,initialLayout:we??Se,panelConstraints:Ue,pivotIndices:Ie,prevLayout:Se,trigger:Hj(ne)?"keyboard":"mouse-or-touch"}),Ye=!mm(Se,Re);(Kj(ne)||Gj(ne))&&T.current!=Fe&&(T.current=Fe,!Ye&&Fe!==0?ye?Jb($,Fe<0?Yj:Wj):Jb($,Fe<0?Xj:Qj):Jb($,0)),Ye&&(w(Re),O.current.layout=Re,le&&le(Re),Xc(Te,Re,E.current))}},[]),G=k.useCallback(($,N)=>{const{onLayout:U}=_.current,{layout:J,panelDataArray:ne}=O.current,se=ne.map(Se=>Se.constraints),{panelSize:he,pivotIndices:Ee}=Ol(ne,$,J);At(he!=null,`Panel size not found for panel "${$.id}"`);const ie=lu(ne,$)===ne.length-1?he-N:N-he,le=Rd({delta:ie,initialLayout:J,panelConstraints:se,pivotIndices:Ee,prevLayout:J,trigger:"imperative-api"});mm(J,le)||(w(le),O.current.layout=le,U&&U(le),Xc(ne,le,E.current))},[]),H=k.useCallback(($,N)=>{const{layout:U,panelDataArray:J}=O.current,{collapsedSize:ne=0,collapsible:se}=N,{collapsedSize:he=0,collapsible:Ee,maxSize:Q=100,minSize:ie=0}=$.constraints,{panelSize:le}=Ol(J,$,U);le!=null&&(se&&Ee&&Ro(le,ne)?Ro(ne,he)||G($,he):le<ie?G($,ie):le>Q&&G($,Q))},[G]),Y=k.useCallback(($,N)=>{const{direction:U}=_.current,{layout:J}=O.current;if(!S.current)return;const ne=Wy($,S.current);At(ne,`Drag handle element not found for id "${$}"`);const se=rP(U,N);C({dragHandleId:$,dragHandleRect:ne.getBoundingClientRect(),initialCursorPosition:se,initialLayout:J})},[]),oe=k.useCallback(()=>{C(null)},[]),re=k.useCallback($=>{const{panelDataArray:N}=O.current,U=lu(N,$);U>=0&&(N.splice(U,1),delete E.current[$.id],O.current.panelDataArrayChanged=!0,v())},[v]),I=k.useMemo(()=>({collapsePanel:M,direction:r,dragState:y,expandPanel:P,getPanelSize:z,getPanelStyle:L,groupId:g,isPanelCollapsed:q,isPanelExpanded:Z,reevaluatePanelConstraints:H,registerPanel:te,registerResizeHandle:ee,resizePanel:G,startDragging:Y,stopDragging:oe,unregisterPanel:re,panelGroupElement:S.current}),[M,y,r,P,z,L,g,q,Z,H,te,ee,G,Y,oe,re]),B={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return k.createElement(Ky.Provider,{value:I},k.createElement(h,{...p,children:t,className:n,id:o,ref:S,style:{...B,...d},[ir.group]:"",[ir.groupDirection]:r,[ir.groupId]:g}))}const lP=k.forwardRef((e,t)=>k.createElement(aP,{...e,forwardedRef:t}));aP.displayName="PanelGroup";lP.displayName="forwardRef(PanelGroup)";function lu(e,t){return e.findIndex(n=>n===t||n.id===t.id)}function Ol(e,t,n){const r=lu(e,t),o=r===e.length-1?[r-1,r]:[r,r+1],l=n[r];return{...t.constraints,panelSize:l,pivotIndices:o}}function V7({disabled:e,handleId:t,resizeHandler:n,panelGroupElement:r}){k.useEffect(()=>{if(e||n==null||r==null)return;const i=Wy(t,r);if(i==null)return;const o=l=>{if(!l.defaultPrevented)switch(l.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{l.preventDefault(),n(l);break}case"F6":{l.preventDefault();const c=i.getAttribute(ir.groupId);At(c,`No group element found for id "${c}"`);const u=Jd(c,r),d=eP(c,t,r);At(d!==null,`No resize element found for id "${t}"`);const h=l.shiftKey?d>0?d-1:u.length-1:d+1<u.length?d+1:0;u[h].focus();break}}};return i.addEventListener("keydown",o),()=>{i.removeEventListener("keydown",o)}},[r,e,t,n])}function cP({children:e=null,className:t="",disabled:n=!1,hitAreaMargins:r,id:i,onBlur:o,onClick:l,onDragging:c,onFocus:u,onPointerDown:d,onPointerUp:h,style:p={},tabIndex:g=0,tagName:S="div",...y}){var C,x;const w=k.useRef(null),v=k.useRef({onClick:l,onDragging:c,onPointerDown:d,onPointerUp:h});k.useEffect(()=>{v.current.onClick=l,v.current.onDragging=c,v.current.onPointerDown=d,v.current.onPointerUp=h});const E=k.useContext(Ky);if(E===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:b,groupId:T,registerResizeHandle:_,startDragging:O,stopDragging:M,panelGroupElement:P}=E,z=Ux(i),[L,q]=k.useState("inactive"),[Z,te]=k.useState(!1),[ee,G]=k.useState(null),H=k.useRef({state:L});Hl(()=>{H.current.state=L}),k.useEffect(()=>{if(n)G(null);else{const I=_(z);G(()=>I)}},[n,z,_]);const Y=(C=r?.coarse)!==null&&C!==void 0?C:15,oe=(x=r?.fine)!==null&&x!==void 0?x:5;k.useEffect(()=>{if(n||ee==null)return;const I=w.current;At(I,"Element ref not attached");let B=!1;return T7(z,I,b,{coarse:Y,fine:oe},(N,U,J)=>{if(!U){q("inactive");return}switch(N){case"down":{q("drag"),B=!1,At(J,'Expected event to be defined for "down" action'),O(z,J);const{onDragging:ne,onPointerDown:se}=v.current;ne?.(!0),se?.();break}case"move":{const{state:ne}=H.current;B=!0,ne!=="drag"&&q("hover"),At(J,'Expected event to be defined for "move" action'),ee(J);break}case"up":{q("hover"),M();const{onClick:ne,onDragging:se,onPointerUp:he}=v.current;se?.(!1),he?.(),B||ne?.();break}}})},[Y,b,n,oe,_,z,ee,O,M]),V7({disabled:n,handleId:z,resizeHandler:ee,panelGroupElement:P});const re={touchAction:"none",userSelect:"none"};return k.createElement(S,{...y,children:e,className:t,id:i,onBlur:()=>{te(!1),o?.()},onFocus:()=>{te(!0),u?.()},ref:w,role:"separator",style:{...re,...p},tabIndex:g,[ir.groupDirection]:b,[ir.groupId]:T,[ir.resizeHandle]:"",[ir.resizeHandleActive]:L==="drag"?"pointer":Z?"keyboard":void 0,[ir.resizeHandleEnabled]:!n,[ir.resizeHandleId]:z,[ir.resizeHandleState]:L})}cP.displayName="PanelResizeHandle";function uP(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=uP(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function qx(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=uP(e))&&(r&&(r+=" "),r+=t);return r}const q7=(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},B7=(e,t)=>({classGroupId:e,validator:t}),fP=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),ny="-",CO=[],H7="arbitrary..",K7=e=>{const t=Z7(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return G7(l);const c=l.split(ny),u=c[0]===""&&c.length>1?1:0;return dP(c,u,t)},getConflictingClassGroupIds:(l,c)=>{if(c){const u=r[l],d=n[l];return u?d?q7(d,u):u:d||CO}return n[l]||CO}}},dP=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],o=n.nextPart.get(i);if(o){const d=dP(e,t+1,o);if(d)return d}const l=n.validators;if(l===null)return;const c=t===0?e.join(ny):e.slice(t).join(ny),u=l.length;for(let d=0;d<u;d++){const h=l[d];if(h.validator(c))return h.classGroupId}},G7=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?H7+r:void 0})(),Z7=e=>{const{theme:t,classGroups:n}=e;return Y7(n,t)},Y7=(e,t)=>{const n=fP();for(const r in e){const i=e[r];Bx(i,n,r,t)}return n},Bx=(e,t,n,r)=>{const i=e.length;for(let o=0;o<i;o++){const l=e[o];W7(l,t,n,r)}},W7=(e,t,n,r)=>{if(typeof e=="string"){X7(e,t,n);return}if(typeof e=="function"){Q7(e,t,n,r);return}J7(e,t,n,r)},X7=(e,t,n)=>{const r=e===""?t:hP(t,e);r.classGroupId=n},Q7=(e,t,n,r)=>{if(eU(e)){Bx(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(B7(n,e))},J7=(e,t,n,r)=>{const i=Object.entries(e),o=i.length;for(let l=0;l<o;l++){const[c,u]=i[l];Bx(u,hP(t,c),n,r)}},hP=(e,t)=>{let n=e;const r=t.split(ny),i=r.length;for(let o=0;o<i;o++){const l=r[o];let c=n.nextPart.get(l);c||(c=fP(),n.nextPart.set(l,c)),n=c}return n},eU=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,tU=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(o,l)=>{n[o]=l,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(o){let l=n[o];if(l!==void 0)return l;if((l=r[o])!==void 0)return i(o,l),l},set(o,l){o in n?n[o]=l:i(o,l)}}},JS="!",TO=":",nU=[],RO=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),rU=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const o=[];let l=0,c=0,u=0,d;const h=i.length;for(let C=0;C<h;C++){const x=i[C];if(l===0&&c===0){if(x===TO){o.push(i.slice(u,C)),u=C+1;continue}if(x==="/"){d=C;continue}}x==="["?l++:x==="]"?l--:x==="("?c++:x===")"&&c--}const p=o.length===0?i:i.slice(u);let g=p,S=!1;p.endsWith(JS)?(g=p.slice(0,-1),S=!0):p.startsWith(JS)&&(g=p.slice(1),S=!0);const y=d&&d>u?d-u:void 0;return RO(o,S,g,y)};if(t){const i=t+TO,o=r;r=l=>l.startsWith(i)?o(l.slice(i.length)):RO(nU,!1,l,void 0,!0)}if(n){const i=r;r=o=>n({className:o,parseClassName:i})}return r},iU=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let o=0;o<n.length;o++){const l=n[o],c=l[0]==="[",u=t.has(l);c||u?(i.length>0&&(i.sort(),r.push(...i),i=[]),r.push(l)):i.push(l)}return i.length>0&&(i.sort(),r.push(...i)),r}},sU=e=>({cache:tU(e.cacheSize),parseClassName:rU(e),sortModifiers:iU(e),...K7(e)}),oU=/\s+/,aU=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:o}=t,l=[],c=e.trim().split(oU);let u="";for(let d=c.length-1;d>=0;d-=1){const h=c[d],{isExternal:p,modifiers:g,hasImportantModifier:S,baseClassName:y,maybePostfixModifierPosition:C}=n(h);if(p){u=h+(u.length>0?" "+u:u);continue}let x=!!C,w=r(x?y.substring(0,C):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]:o(g).join(":"),E=S?v+JS:v,b=E+w;if(l.indexOf(b)>-1)continue;l.push(b);const T=i(w,x);for(let _=0;_<T.length;++_){const O=T[_];l.push(E+O)}u=h+(u.length>0?" "+u:u)}return u},lU=(...e)=>{let t=0,n,r,i="";for(;t<e.length;)(n=e[t++])&&(r=pP(n))&&(i&&(i+=" "),i+=r);return i},pP=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=pP(e[r]))&&(n&&(n+=" "),n+=t);return n},cU=(e,...t)=>{let n,r,i,o;const l=u=>{const d=t.reduce((h,p)=>p(h),e());return n=sU(d),r=n.cache.get,i=n.cache.set,o=c,c(u)},c=u=>{const d=r(u);if(d)return d;const h=aU(u,n);return i(u,h),h};return o=l,(...u)=>o(lU(...u))},uU=[],Er=e=>{const t=n=>n[e]||uU;return t.isThemeGetter=!0,t},mP=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,gP=/^\((?:(\w[\w-]*):)?(.+)\)$/i,fU=/^\d+\/\d+$/,dU=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,hU=/\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$/,pU=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,mU=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,gU=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Qc=e=>fU.test(e),Mt=e=>!!e&&!Number.isNaN(Number(e)),ya=e=>!!e&&Number.isInteger(Number(e)),t1=e=>e.endsWith("%")&&Mt(e.slice(0,-1)),xo=e=>dU.test(e),yU=()=>!0,vU=e=>hU.test(e)&&!pU.test(e),yP=()=>!1,bU=e=>mU.test(e),SU=e=>gU.test(e),wU=e=>!Xe(e)&&!Qe(e),xU=e=>lf(e,SP,yP),Xe=e=>mP.test(e),Al=e=>lf(e,wP,vU),n1=e=>lf(e,RU,Mt),OO=e=>lf(e,vP,yP),_U=e=>lf(e,bP,SU),gm=e=>lf(e,xP,bU),Qe=e=>gP.test(e),yd=e=>cf(e,wP),EU=e=>cf(e,OU),AO=e=>cf(e,vP),CU=e=>cf(e,SP),TU=e=>cf(e,bP),ym=e=>cf(e,xP,!0),lf=(e,t,n)=>{const r=mP.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},cf=(e,t,n=!1)=>{const r=gP.exec(e);return r?r[1]?t(r[1]):n:!1},vP=e=>e==="position"||e==="percentage",bP=e=>e==="image"||e==="url",SP=e=>e==="length"||e==="size"||e==="bg-size",wP=e=>e==="length",RU=e=>e==="number",OU=e=>e==="family-name",xP=e=>e==="shadow",AU=()=>{const e=Er("color"),t=Er("font"),n=Er("text"),r=Er("font-weight"),i=Er("tracking"),o=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"),S=Er("drop-shadow"),y=Er("blur"),C=Er("perspective"),x=Er("aspect"),w=Er("ease"),v=Er("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],T=()=>[...b(),Qe,Xe],_=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],M=()=>[Qe,Xe,u],P=()=>[Qc,"full","auto",...M()],z=()=>[ya,"none","subgrid",Qe,Xe],L=()=>["auto",{span:["full",ya,Qe,Xe]},ya,Qe,Xe],q=()=>[ya,"auto",Qe,Xe],Z=()=>["auto","min","max","fr",Qe,Xe],te=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ee=()=>["start","end","center","stretch","center-safe","end-safe"],G=()=>["auto",...M()],H=()=>[Qc,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...M()],Y=()=>[e,Qe,Xe],oe=()=>[...b(),AO,OO,{position:[Qe,Xe]}],re=()=>["no-repeat",{repeat:["","x","y","space","round"]}],I=()=>["auto","cover","contain",CU,xU,{size:[Qe,Xe]}],B=()=>[t1,yd,Al],$=()=>["","none","full",d,Qe,Xe],N=()=>["",Mt,yd,Al],U=()=>["solid","dashed","dotted","double"],J=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ne=()=>[Mt,t1,AO,OO],se=()=>["","none",y,Qe,Xe],he=()=>["none",Mt,Qe,Xe],Ee=()=>["none",Mt,Qe,Xe],Q=()=>[Mt,Qe,Xe],ie=()=>[Qc,"full",...M()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[xo],breakpoint:[xo],color:[yU],container:[xo],"drop-shadow":[xo],ease:["in","out","in-out"],font:[wU],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[xo],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[xo],shadow:[xo],spacing:["px",Mt],text:[xo],"text-shadow":[xo],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Qc,Xe,Qe,x]}],container:["container"],columns:[{columns:[Mt,Xe,Qe,c]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:T()}],overflow:[{overflow:_()}],"overflow-x":[{"overflow-x":_()}],"overflow-y":[{"overflow-y":_()}],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:[ya,"auto",Qe,Xe]}],basis:[{basis:[Qc,"full","auto",c,...M()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Mt,Qc,"auto","initial","none",Xe]}],grow:[{grow:["",Mt,Qe,Xe]}],shrink:[{shrink:["",Mt,Qe,Xe]}],order:[{order:[ya,"first","last","none",Qe,Xe]}],"grid-cols":[{"grid-cols":z()}],"col-start-end":[{col:L()}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":z()}],"row-start-end":[{row:L()}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Z()}],"auto-rows":[{"auto-rows":Z()}],gap:[{gap:M()}],"gap-x":[{"gap-x":M()}],"gap-y":[{"gap-y":M()}],"justify-content":[{justify:[...te(),"normal"]}],"justify-items":[{"justify-items":[...ee(),"normal"]}],"justify-self":[{"justify-self":["auto",...ee()]}],"align-content":[{content:["normal",...te()]}],"align-items":[{items:[...ee(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ee(),{baseline:["","last"]}]}],"place-content":[{"place-content":te()}],"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:G()}],mx:[{mx:G()}],my:[{my:G()}],ms:[{ms:G()}],me:[{me:G()}],mt:[{mt:G()}],mr:[{mr:G()}],mb:[{mb:G()}],ml:[{ml:G()}],"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,yd,Al]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Qe,n1]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",t1,Xe]}],"font-family":[{font:[EU,Xe,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:[i,Qe,Xe]}],"line-clamp":[{"line-clamp":[Mt,"none",Qe,n1]}],leading:[{leading:[o,...M()]}],"list-image":[{"list-image":["none",Qe,Xe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Qe,Xe]}],"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:[...U(),"wavy"]}],"text-decoration-thickness":[{decoration:[Mt,"from-font","auto",Qe,Al]}],"text-decoration-color":[{decoration:Y()}],"underline-offset":[{"underline-offset":[Mt,"auto",Qe,Xe]}],"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",Qe,Xe]}],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",Qe,Xe]}],"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:re()}],"bg-size":[{bg:I()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ya,Qe,Xe],radial:["",Qe,Xe],conic:[ya,Qe,Xe]},TU,_U]}],"bg-color":[{bg:Y()}],"gradient-from-pos":[{from:B()}],"gradient-via-pos":[{via:B()}],"gradient-to-pos":[{to:B()}],"gradient-from":[{from:Y()}],"gradient-via":[{via:Y()}],"gradient-to":[{to:Y()}],rounded:[{rounded:$()}],"rounded-s":[{"rounded-s":$()}],"rounded-e":[{"rounded-e":$()}],"rounded-t":[{"rounded-t":$()}],"rounded-r":[{"rounded-r":$()}],"rounded-b":[{"rounded-b":$()}],"rounded-l":[{"rounded-l":$()}],"rounded-ss":[{"rounded-ss":$()}],"rounded-se":[{"rounded-se":$()}],"rounded-ee":[{"rounded-ee":$()}],"rounded-es":[{"rounded-es":$()}],"rounded-tl":[{"rounded-tl":$()}],"rounded-tr":[{"rounded-tr":$()}],"rounded-br":[{"rounded-br":$()}],"rounded-bl":[{"rounded-bl":$()}],"border-w":[{border:N()}],"border-w-x":[{"border-x":N()}],"border-w-y":[{"border-y":N()}],"border-w-s":[{"border-s":N()}],"border-w-e":[{"border-e":N()}],"border-w-t":[{"border-t":N()}],"border-w-r":[{"border-r":N()}],"border-w-b":[{"border-b":N()}],"border-w-l":[{"border-l":N()}],"divide-x":[{"divide-x":N()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":N()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...U(),"hidden","none"]}],"divide-style":[{divide:[...U(),"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:[...U(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Mt,Qe,Xe]}],"outline-w":[{outline:["",Mt,yd,Al]}],"outline-color":[{outline:Y()}],shadow:[{shadow:["","none",h,ym,gm]}],"shadow-color":[{shadow:Y()}],"inset-shadow":[{"inset-shadow":["none",p,ym,gm]}],"inset-shadow-color":[{"inset-shadow":Y()}],"ring-w":[{ring:N()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Y()}],"ring-offset-w":[{"ring-offset":[Mt,Al]}],"ring-offset-color":[{"ring-offset":Y()}],"inset-ring-w":[{"inset-ring":N()}],"inset-ring-color":[{"inset-ring":Y()}],"text-shadow":[{"text-shadow":["none",g,ym,gm]}],"text-shadow-color":[{"text-shadow":Y()}],opacity:[{opacity:[Mt,Qe,Xe]}],"mix-blend":[{"mix-blend":[...J(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":J()}],"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":[Mt]}],"mask-image-linear-from-pos":[{"mask-linear-from":ne()}],"mask-image-linear-to-pos":[{"mask-linear-to":ne()}],"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":ne()}],"mask-image-t-to-pos":[{"mask-t-to":ne()}],"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":ne()}],"mask-image-r-to-pos":[{"mask-r-to":ne()}],"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":ne()}],"mask-image-b-to-pos":[{"mask-b-to":ne()}],"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":ne()}],"mask-image-l-to-pos":[{"mask-l-to":ne()}],"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":ne()}],"mask-image-x-to-pos":[{"mask-x-to":ne()}],"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":ne()}],"mask-image-y-to-pos":[{"mask-y-to":ne()}],"mask-image-y-from-color":[{"mask-y-from":Y()}],"mask-image-y-to-color":[{"mask-y-to":Y()}],"mask-image-radial":[{"mask-radial":[Qe,Xe]}],"mask-image-radial-from-pos":[{"mask-radial-from":ne()}],"mask-image-radial-to-pos":[{"mask-radial-to":ne()}],"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":b()}],"mask-image-conic-pos":[{"mask-conic":[Mt]}],"mask-image-conic-from-pos":[{"mask-conic-from":ne()}],"mask-image-conic-to-pos":[{"mask-conic-to":ne()}],"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:re()}],"mask-size":[{mask:I()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Qe,Xe]}],filter:[{filter:["","none",Qe,Xe]}],blur:[{blur:se()}],brightness:[{brightness:[Mt,Qe,Xe]}],contrast:[{contrast:[Mt,Qe,Xe]}],"drop-shadow":[{"drop-shadow":["","none",S,ym,gm]}],"drop-shadow-color":[{"drop-shadow":Y()}],grayscale:[{grayscale:["",Mt,Qe,Xe]}],"hue-rotate":[{"hue-rotate":[Mt,Qe,Xe]}],invert:[{invert:["",Mt,Qe,Xe]}],saturate:[{saturate:[Mt,Qe,Xe]}],sepia:[{sepia:["",Mt,Qe,Xe]}],"backdrop-filter":[{"backdrop-filter":["","none",Qe,Xe]}],"backdrop-blur":[{"backdrop-blur":se()}],"backdrop-brightness":[{"backdrop-brightness":[Mt,Qe,Xe]}],"backdrop-contrast":[{"backdrop-contrast":[Mt,Qe,Xe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Mt,Qe,Xe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Mt,Qe,Xe]}],"backdrop-invert":[{"backdrop-invert":["",Mt,Qe,Xe]}],"backdrop-opacity":[{"backdrop-opacity":[Mt,Qe,Xe]}],"backdrop-saturate":[{"backdrop-saturate":[Mt,Qe,Xe]}],"backdrop-sepia":[{"backdrop-sepia":["",Mt,Qe,Xe]}],"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",Qe,Xe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Mt,"initial",Qe,Xe]}],ease:[{ease:["linear","initial",w,Qe,Xe]}],delay:[{delay:[Mt,Qe,Xe]}],animate:[{animate:["none",v,Qe,Xe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,Qe,Xe]}],"perspective-origin":[{"perspective-origin":T()}],rotate:[{rotate:he()}],"rotate-x":[{"rotate-x":he()}],"rotate-y":[{"rotate-y":he()}],"rotate-z":[{"rotate-z":he()}],scale:[{scale:Ee()}],"scale-x":[{"scale-x":Ee()}],"scale-y":[{"scale-y":Ee()}],"scale-z":[{"scale-z":Ee()}],"scale-3d":["scale-3d"],skew:[{skew:Q()}],"skew-x":[{"skew-x":Q()}],"skew-y":[{"skew-y":Q()}],transform:[{transform:[Qe,Xe,"","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",Qe,Xe]}],"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",Qe,Xe]}],fill:[{fill:["none",...Y()]}],"stroke-w":[{stroke:[Mt,yd,Al,n1]}],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"]}},_P=cU(AU);function cn(...e){return _P(qx(e))}function EP({className:e,...t}){return j.jsx(lP,{"data-slot":"resizable-panel-group",className:cn("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",e),...t})}function ry({...e}){return j.jsx(Bj,{"data-slot":"resizable-panel",...e})}function CP({withHandle:e,className:t,...n}){return j.jsx(cP,{"data-slot":"resizable-handle",className:cn("bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),...n,children:e&&j.jsx("div",{className:"bg-border h-6 w-1 rounded-none z-10 flex shrink-0"})})}var kU=function(e){return function(t,n){var r=k.useRef(!1);e(function(){return function(){r.current=!1}},[]),e(function(){if(!r.current)r.current=!0;else return t()},n)}},Ls=function(){return Ls=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Ls.apply(this,arguments)};function TP(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 i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function ew(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 MU(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],l;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(c){l={error:c}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(l)throw l.error}}return o}function jU(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var iy=function(e){return typeof e=="function"},PU=function(e){return typeof e=="string"},RP=function(e){return typeof e=="number"},NU=function(e){return typeof e>"u"},DU=function(e){var t=k.useRef(e);t.current=k.useMemo(function(){return e},[e]);var n=k.useRef(void 0);return n.current||(n.current=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return t.current.apply(this,r)}),n.current};const IU=kU(k.useEffect);function kO(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 sy(e){var t=k.useRef(e);return t.current=e,t}var $U=function(e){var t=sy(e);k.useEffect(function(){return function(){t.current()}},[])},OP=!!(typeof window<"u"&&window.document&&window.document.createElement);function Hx(e,t){if(OP){if(!e)return t;var n;return iy(e)?n=e():"current"in e?n=e.current:n=e,n}}var zU=function(e){var t=function(n,r,i){var o=k.useRef(!1),l=k.useRef([]),c=k.useRef([]),u=k.useRef(void 0);e(function(){var d,h=Array.isArray(i)?i:[i],p=h.map(function(g){return Hx(g)});if(!o.current){o.current=!0,l.current=p,c.current=r,u.current=n();return}(p.length!==l.current.length||!kO(l.current,p)||!kO(c.current,r))&&((d=u.current)===null||d===void 0||d.call(u),l.current=p,c.current=r,u.current=n())}),$U(function(){var d;(d=u.current)===null||d===void 0||d.call(u),o.current=!1})};return t},AP=zU(k.useEffect),r1,MO;function LU(){if(MO)return r1;MO=1;var e=typeof Element<"u",t=typeof Map=="function",n=typeof Set=="function",r=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function i(o,l){if(o===l)return!0;if(o&&l&&typeof o=="object"&&typeof l=="object"){if(o.constructor!==l.constructor)return!1;var c,u,d;if(Array.isArray(o)){if(c=o.length,c!=l.length)return!1;for(u=c;u--!==0;)if(!i(o[u],l[u]))return!1;return!0}var h;if(t&&o instanceof Map&&l instanceof Map){if(o.size!==l.size)return!1;for(h=o.entries();!(u=h.next()).done;)if(!l.has(u.value[0]))return!1;for(h=o.entries();!(u=h.next()).done;)if(!i(u.value[1],l.get(u.value[0])))return!1;return!0}if(n&&o instanceof Set&&l instanceof Set){if(o.size!==l.size)return!1;for(h=o.entries();!(u=h.next()).done;)if(!l.has(u.value[0]))return!1;return!0}if(r&&ArrayBuffer.isView(o)&&ArrayBuffer.isView(l)){if(c=o.length,c!=l.length)return!1;for(u=c;u--!==0;)if(o[u]!==l[u])return!1;return!0}if(o.constructor===RegExp)return o.source===l.source&&o.flags===l.flags;if(o.valueOf!==Object.prototype.valueOf&&typeof o.valueOf=="function"&&typeof l.valueOf=="function")return o.valueOf()===l.valueOf();if(o.toString!==Object.prototype.toString&&typeof o.toString=="function"&&typeof l.toString=="function")return o.toString()===l.toString();if(d=Object.keys(o),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&&o instanceof Element)return!1;for(u=c;u--!==0;)if(!((d[u]==="_owner"||d[u]==="__v"||d[u]==="__o")&&o.$$typeof)&&!i(o[d[u]],l[d[u]]))return!1;return!0}return o!==o&&l!==l}return r1=function(l,c){try{return i(l,c)}catch(u){if((u.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw u}},r1}var FU=LU();const UU=Qs(FU);var VU=function(e,t){return e===void 0&&(e=[]),t===void 0&&(t=[]),UU(e,t)};function jO(e,t,n){n===void 0&&(n={});var r=n.enable,i=r===void 0?!0:r,o=sy(t);AP(function(){if(i){var l=Hx(n.target,window);if(l?.addEventListener){var c=function(d){return o.current(d)},u=Array.isArray(e)?e:[e];return u.forEach(function(d){l.addEventListener(d,c,{capture:n.capture,once:n.once,passive:n.passive})}),function(){u.forEach(function(d){l.removeEventListener(d,c,{capture:n.capture})})}}}},[e,n.capture,n.once,n.passive,i],n.target)}var qU=function(e,t,n){var r=k.useRef(void 0),i=k.useRef(0);VU(t,r.current)||(i.current+=1),r.current=t,AP(e,[i.current],n)},BU=/(mac|iphone|ipod|ipad)/i.test(typeof navigator<"u"?navigator?.platform:""),kP={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:BU?[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},tw={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"?kP.meta.includes(e.keyCode):e.metaKey}};function MP(e){return PU(e)||RP(e)}function HU(e){var t=Object.keys(tw).reduce(function(n,r){return tw[r](e)?n+1:n},0);return[16,17,18,91,92].includes(e.keyCode)?t:t+1}function PO(e,t,n){var r,i;if(!e.key)return!1;if(RP(t))return e.keyCode===t?t:!1;var o=t.split("."),l=0;try{for(var c=ew(o),u=c.next();!u.done;u=c.next()){var d=u.value,h=tw[d],p=kP[d.toLowerCase()];(h&&h(e)||p&&p===e.keyCode)&&l++}}catch(g){r={error:g}}finally{try{u&&!u.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}return n?l===o.length&&HU(e)===o.length?t:!1:l===o.length?t:!1}function KU(e,t){return iy(e)?e:MP(e)?function(n){return PO(n,e,t)}:Array.isArray(e)?function(n){return e.find(function(r){return PO(n,r,t)})}:function(){return!!e}}var GU=["keydown"];function ZU(e,t,n){var r={},i=r.events,o=i===void 0?GU:i,l=r.target,c=r.exactMatch,u=c===void 0?!1:c,d=r.useCapture,h=d===void 0?!1:d,p=sy(t),g=sy(e);qU(function(){var S,y,C,x=Hx(l,window);if(x){var w=function(T){var _,O=T,M=KU(g.current,u),P=M(O),z=MP(P)?P:O.key;if(P)return(_=p.current)===null||_===void 0?void 0:_.call(p,O,z)};try{for(var v=ew(o),E=v.next();!E.done;E=v.next()){var b=E.value;(C=x?.addEventListener)===null||C===void 0||C.call(x,b,w,h)}}catch(T){S={error:T}}finally{try{E&&!E.done&&(y=v.return)&&y.call(v)}finally{if(S)throw S.error}}return function(){var T,_,O;try{for(var M=ew(o),P=M.next();!P.done;P=M.next()){var z=P.value;(O=x?.removeEventListener)===null||O===void 0||O.call(x,z,w,h)}}catch(L){T={error:L}}finally{try{P&&!P.done&&(_=M.return)&&_.call(M)}finally{if(T)throw T.error}}}}},[o],l)}var NO="AHOOKS_SYNC_STORAGE_EVENT_NAME";function YU(e){function t(n,r){r===void 0&&(r={});var i,o=r.listenStorageChange,l=o===void 0?!1:o,c=r.onError,u=c===void 0?function(v){console.error(v)}:c;try{i=e()}catch(v){u(v)}var d=function(v){return r.serializer?r.serializer(v):JSON.stringify(v)},h=function(v){return r.deserializer?r.deserializer(v):JSON.parse(v)};function p(){try{var v=i?.getItem(n);if(v)return h(v)}catch(E){u(E)}return iy(r.defaultValue)?r.defaultValue():r.defaultValue}var g=MU(k.useState(p),2),S=g[0],y=g[1];IU(function(){y(p())},[n]);var C=function(v){var E=iy(v)?v(S):v;l||y(E);try{var b=void 0,T=i?.getItem(n);NU(E)?(b=null,i?.removeItem(n)):(b=d(E),i?.setItem(n,b)),dispatchEvent(new CustomEvent(NO,{detail:{key:n,newValue:b,oldValue:T,storageArea:i}}))}catch(_){u(_)}},x=function(v){v.key!==n||v.storageArea!==i||y(p())},w=function(v){x(v.detail)};return jO("storage",x,{enable:l}),jO(NO,w,{enable:l}),[S,DU(C)]}return t}var WU=YU(function(){return OP?localStorage:void 0});function jP({key:e,defaultSizePercent:t,minSizePercent:n=10,maxSizePercent:r=90}){const[i,o]=WU(e,{defaultValue:Math.max(n,Math.min(r,t))}),l=k.useCallback(c=>{const u=Math.max(n,Math.min(r,c));o(u)},[n,r,o]);return{size:Math.max(n,Math.min(r,i??t)),onResize:l}}var PP=typeof global=="object"&&global&&global.Object===Object&&global,XU=typeof self=="object"&&self&&self.Object===Object&&self,Js=PP||XU||Function("return this")(),rs=Js.Symbol,NP=Object.prototype,QU=NP.hasOwnProperty,JU=NP.toString,vd=rs?rs.toStringTag:void 0;function eV(e){var t=QU.call(e,vd),n=e[vd];try{e[vd]=void 0;var r=!0}catch{}var i=JU.call(e);return r&&(t?e[vd]=n:delete e[vd]),i}var tV=Object.prototype,nV=tV.toString;function rV(e){return nV.call(e)}var iV="[object Null]",sV="[object Undefined]",DO=rs?rs.toStringTag:void 0;function $o(e){return e==null?e===void 0?sV:iV:DO&&DO in Object(e)?eV(e):rV(e)}function is(e){return e!=null&&typeof e=="object"}var oV="[object Symbol]";function Rh(e){return typeof e=="symbol"||is(e)&&$o(e)==oV}function uf(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var Ar=Array.isArray,IO=rs?rs.prototype:void 0,$O=IO?IO.toString:void 0;function DP(e){if(typeof e=="string")return e;if(Ar(e))return uf(e,DP)+"";if(Rh(e))return $O?$O.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var aV=/\s/;function lV(e){for(var t=e.length;t--&&aV.test(e.charAt(t)););return t}var cV=/^\s+/;function uV(e){return e&&e.slice(0,lV(e)+1).replace(cV,"")}function Zt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var zO=NaN,fV=/^[-+]0x[0-9a-f]+$/i,dV=/^0b[01]+$/i,hV=/^0o[0-7]+$/i,pV=parseInt;function mV(e){if(typeof e=="number")return e;if(Rh(e))return zO;if(Zt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Zt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=uV(e);var n=dV.test(e);return n||hV.test(e)?pV(e.slice(2),n?2:8):fV.test(e)?zO:+e}var LO=1/0,gV=17976931348623157e292;function yV(e){if(!e)return e===0?e:0;if(e=mV(e),e===LO||e===-LO){var t=e<0?-1:1;return t*gV}return e===e?e:0}function IP(e){var t=yV(e),n=t%1;return t===t?n?t-n:t:0}function Xy(e){return e}var vV="[object AsyncFunction]",bV="[object Function]",SV="[object GeneratorFunction]",wV="[object Proxy]";function Oh(e){if(!Zt(e))return!1;var t=$o(e);return t==bV||t==SV||t==vV||t==wV}var i1=Js["__core-js_shared__"],FO=(function(){var e=/[^.]+$/.exec(i1&&i1.keys&&i1.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function xV(e){return!!FO&&FO in e}var _V=Function.prototype,EV=_V.toString;function oc(e){if(e!=null){try{return EV.call(e)}catch{}try{return e+""}catch{}}return""}var CV=/[\\^$.*+?()[\]{}|]/g,TV=/^\[object .+?Constructor\]$/,RV=Function.prototype,OV=Object.prototype,AV=RV.toString,kV=OV.hasOwnProperty,MV=RegExp("^"+AV.call(kV).replace(CV,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function jV(e){if(!Zt(e)||xV(e))return!1;var t=Oh(e)?MV:TV;return t.test(oc(e))}function PV(e,t){return e?.[t]}function ac(e,t){var n=PV(e,t);return jV(n)?n:void 0}var nw=ac(Js,"WeakMap"),UO=Object.create,$P=(function(){function e(){}return function(t){if(!Zt(t))return{};if(UO)return UO(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}})();function NV(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 Kx(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var DV=800,IV=16,$V=Date.now;function zV(e){var t=0,n=0;return function(){var r=$V(),i=IV-(r-n);if(n=r,i>0){if(++t>=DV)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function LV(e){return function(){return e}}var oy=(function(){try{var e=ac(Object,"defineProperty");return e({},"",{}),e}catch{}})(),FV=oy?function(e,t){return oy(e,"toString",{configurable:!0,enumerable:!1,value:LV(t),writable:!0})}:Xy,zP=zV(FV);function Gx(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function UV(e,t,n,r){for(var i=e.length,o=n+-1;++o<i;)if(t(e[o],o,e))return o;return-1}function VV(e){return e!==e}function qV(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function LP(e,t,n){return t===t?qV(e,t,n):UV(e,VV,n)}function Zx(e,t){var n=e==null?0:e.length;return!!n&&LP(e,t,0)>-1}var BV=9007199254740991,HV=/^(?:0|[1-9]\d*)$/;function Qy(e,t){var n=typeof e;return t=t??BV,!!t&&(n=="number"||n!="symbol"&&HV.test(e))&&e>-1&&e%1==0&&e<t}function Yx(e,t,n){t=="__proto__"&&oy?oy(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Ah(e,t){return e===t||e!==e&&t!==t}var KV=Object.prototype,GV=KV.hasOwnProperty;function Jy(e,t,n){var r=e[t];(!(GV.call(e,t)&&Ah(r,n))||n===void 0&&!(t in e))&&Yx(e,t,n)}function lc(e,t,n,r){var i=!n;n||(n={});for(var o=-1,l=t.length;++o<l;){var c=t[o],u=void 0;u===void 0&&(u=e[c]),i?Yx(n,c,u):Jy(n,c,u)}return n}var VO=Math.max;function FP(e,t,n){return t=VO(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=VO(r.length-t,0),l=Array(o);++i<o;)l[i]=r[t+i];i=-1;for(var c=Array(t+1);++i<t;)c[i]=r[i];return c[t]=n(l),NV(e,this,c)}}function e0(e,t){return zP(FP(e,t,Xy),e+"")}var ZV=9007199254740991;function Wx(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ZV}function Wa(e){return e!=null&&Wx(e.length)&&!Oh(e)}function YV(e,t,n){if(!Zt(n))return!1;var r=typeof t;return(r=="number"?Wa(n)&&Qy(t,n.length):r=="string"&&t in n)?Ah(n[t],e):!1}function UP(e){return e0(function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,l=i>2?n[2]:void 0;for(o=e.length>3&&typeof o=="function"?(i--,o):void 0,l&&YV(n[0],n[1],l)&&(o=i<3?void 0:o,i=1),t=Object(t);++r<i;){var c=n[r];c&&e(t,c,r,o)}return t})}var WV=Object.prototype;function kh(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||WV;return e===n}function VP(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var XV="[object Arguments]";function qO(e){return is(e)&&$o(e)==XV}var qP=Object.prototype,QV=qP.hasOwnProperty,JV=qP.propertyIsEnumerable,zu=qO((function(){return arguments})())?qO:function(e){return is(e)&&QV.call(e,"callee")&&!JV.call(e,"callee")};function eq(){return!1}var BP=typeof Di=="object"&&Di&&!Di.nodeType&&Di,BO=BP&&typeof Ii=="object"&&Ii&&!Ii.nodeType&&Ii,tq=BO&&BO.exports===BP,HO=tq?Js.Buffer:void 0,nq=HO?HO.isBuffer:void 0,Jl=nq||eq,rq="[object Arguments]",iq="[object Array]",sq="[object Boolean]",oq="[object Date]",aq="[object Error]",lq="[object Function]",cq="[object Map]",uq="[object Number]",fq="[object Object]",dq="[object RegExp]",hq="[object Set]",pq="[object String]",mq="[object WeakMap]",gq="[object ArrayBuffer]",yq="[object DataView]",vq="[object Float32Array]",bq="[object Float64Array]",Sq="[object Int8Array]",wq="[object Int16Array]",xq="[object Int32Array]",_q="[object Uint8Array]",Eq="[object Uint8ClampedArray]",Cq="[object Uint16Array]",Tq="[object Uint32Array]",Dn={};Dn[vq]=Dn[bq]=Dn[Sq]=Dn[wq]=Dn[xq]=Dn[_q]=Dn[Eq]=Dn[Cq]=Dn[Tq]=!0;Dn[rq]=Dn[iq]=Dn[gq]=Dn[sq]=Dn[yq]=Dn[oq]=Dn[aq]=Dn[lq]=Dn[cq]=Dn[uq]=Dn[fq]=Dn[dq]=Dn[hq]=Dn[pq]=Dn[mq]=!1;function Rq(e){return is(e)&&Wx(e.length)&&!!Dn[$o(e)]}function Xx(e){return function(t){return e(t)}}var HP=typeof Di=="object"&&Di&&!Di.nodeType&&Di,zd=HP&&typeof Ii=="object"&&Ii&&!Ii.nodeType&&Ii,Oq=zd&&zd.exports===HP,s1=Oq&&PP.process,Lu=(function(){try{var e=zd&&zd.require&&zd.require("util").types;return e||s1&&s1.binding&&s1.binding("util")}catch{}})(),KO=Lu&&Lu.isTypedArray,Mh=KO?Xx(KO):Rq,Aq=Object.prototype,kq=Aq.hasOwnProperty;function KP(e,t){var n=Ar(e),r=!n&&zu(e),i=!n&&!r&&Jl(e),o=!n&&!r&&!i&&Mh(e),l=n||r||i||o,c=l?VP(e.length,String):[],u=c.length;for(var d in e)(t||kq.call(e,d))&&!(l&&(d=="length"||i&&(d=="offset"||d=="parent")||o&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||Qy(d,u)))&&c.push(d);return c}function GP(e,t){return function(n){return e(t(n))}}var Mq=GP(Object.keys,Object),jq=Object.prototype,Pq=jq.hasOwnProperty;function ZP(e){if(!kh(e))return Mq(e);var t=[];for(var n in Object(e))Pq.call(e,n)&&n!="constructor"&&t.push(n);return t}function Ji(e){return Wa(e)?KP(e):ZP(e)}var Nq=Object.prototype,Dq=Nq.hasOwnProperty,Iq=UP(function(e,t){if(kh(t)||Wa(t)){lc(t,Ji(t),e);return}for(var n in t)Dq.call(t,n)&&Jy(e,n,t[n])});function $q(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var zq=Object.prototype,Lq=zq.hasOwnProperty;function Fq(e){if(!Zt(e))return $q(e);var t=kh(e),n=[];for(var r in e)r=="constructor"&&(t||!Lq.call(e,r))||n.push(r);return n}function jh(e){return Wa(e)?KP(e,!0):Fq(e)}var Uq=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Vq=/^\w*$/;function Qx(e,t){if(Ar(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Rh(e)?!0:Vq.test(e)||!Uq.test(e)||t!=null&&e in Object(t)}var eh=ac(Object,"create");function qq(){this.__data__=eh?eh(null):{},this.size=0}function Bq(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Hq="__lodash_hash_undefined__",Kq=Object.prototype,Gq=Kq.hasOwnProperty;function Zq(e){var t=this.__data__;if(eh){var n=t[e];return n===Hq?void 0:n}return Gq.call(t,e)?t[e]:void 0}var Yq=Object.prototype,Wq=Yq.hasOwnProperty;function Xq(e){var t=this.__data__;return eh?t[e]!==void 0:Wq.call(t,e)}var Qq="__lodash_hash_undefined__";function Jq(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=eh&&t===void 0?Qq: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=qq;ec.prototype.delete=Bq;ec.prototype.get=Zq;ec.prototype.has=Xq;ec.prototype.set=Jq;function eB(){this.__data__=[],this.size=0}function t0(e,t){for(var n=e.length;n--;)if(Ah(e[n][0],t))return n;return-1}var tB=Array.prototype,nB=tB.splice;function rB(e){var t=this.__data__,n=t0(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():nB.call(t,n,1),--this.size,!0}function iB(e){var t=this.__data__,n=t0(t,e);return n<0?void 0:t[n][1]}function sB(e){return t0(this.__data__,e)>-1}function oB(e,t){var n=this.__data__,r=t0(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function zo(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])}}zo.prototype.clear=eB;zo.prototype.delete=rB;zo.prototype.get=iB;zo.prototype.has=sB;zo.prototype.set=oB;var th=ac(Js,"Map");function aB(){this.size=0,this.__data__={hash:new ec,map:new(th||zo),string:new ec}}function lB(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function n0(e,t){var n=e.__data__;return lB(t)?n[typeof t=="string"?"string":"hash"]:n.map}function cB(e){var t=n0(this,e).delete(e);return this.size-=t?1:0,t}function uB(e){return n0(this,e).get(e)}function fB(e){return n0(this,e).has(e)}function dB(e,t){var n=n0(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Lo(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])}}Lo.prototype.clear=aB;Lo.prototype.delete=cB;Lo.prototype.get=uB;Lo.prototype.has=fB;Lo.prototype.set=dB;var hB="Expected a function";function Jx(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(hB);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var l=e.apply(this,r);return n.cache=o.set(i,l)||o,l};return n.cache=new(Jx.Cache||Lo),n}Jx.Cache=Lo;var pB=500;function mB(e){var t=Jx(e,function(r){return n.size===pB&&n.clear(),r}),n=t.cache;return t}var gB=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,yB=/\\(\\)?/g,YP=mB(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(gB,function(n,r,i,o){t.push(i?o.replace(yB,"$1"):r||n)}),t});function e_(e){return e==null?"":DP(e)}function ff(e,t){return Ar(e)?e:Qx(e,t)?[e]:YP(e_(e))}function cc(e){if(typeof e=="string"||Rh(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function r0(e,t){t=ff(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[cc(t[n++])];return n&&n==r?e:void 0}function ze(e,t,n){var r=e==null?void 0:r0(e,t);return r===void 0?n:r}function t_(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var GO=rs?rs.isConcatSpreadable:void 0;function vB(e){return Ar(e)||zu(e)||!!(GO&&e&&e[GO])}function Ph(e,t,n,r,i){var o=-1,l=e.length;for(n||(n=vB),i||(i=[]);++o<l;){var c=e[o];t>0&&n(c)?t>1?Ph(c,t-1,n,r,i):t_(i,c):r||(i[i.length]=c)}return i}function rw(e){var t=e==null?0:e.length;return t?Ph(e,1):[]}function WP(e){return zP(FP(e,void 0,rw),e+"")}var i0=GP(Object.getPrototypeOf,Object),bB="[object Object]",SB=Function.prototype,wB=Object.prototype,XP=SB.toString,xB=wB.hasOwnProperty,_B=XP.call(Object);function La(e){if(!is(e)||$o(e)!=bB)return!1;var t=i0(e);if(t===null)return!0;var n=xB.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&XP.call(n)==_B}function EB(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}function CB(e,t,n,r){var i=-1,o=e==null?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function TB(){this.__data__=new zo,this.size=0}function RB(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function OB(e){return this.__data__.get(e)}function AB(e){return this.__data__.has(e)}var kB=200;function MB(e,t){var n=this.__data__;if(n instanceof zo){var r=n.__data__;if(!th||r.length<kB-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Lo(r)}return n.set(e,t),this.size=n.size,this}function Es(e){var t=this.__data__=new zo(e);this.size=t.size}Es.prototype.clear=TB;Es.prototype.delete=RB;Es.prototype.get=OB;Es.prototype.has=AB;Es.prototype.set=MB;function jB(e,t){return e&&lc(t,Ji(t),e)}function PB(e,t){return e&&lc(t,jh(t),e)}var QP=typeof Di=="object"&&Di&&!Di.nodeType&&Di,ZO=QP&&typeof Ii=="object"&&Ii&&!Ii.nodeType&&Ii,NB=ZO&&ZO.exports===QP,YO=NB?Js.Buffer:void 0,WO=YO?YO.allocUnsafe:void 0;function JP(e,t){if(t)return e.slice();var n=e.length,r=WO?WO(n):new e.constructor(n);return e.copy(r),r}function DB(e,t){for(var n=-1,r=e==null?0:e.length,i=0,o=[];++n<r;){var l=e[n];t(l,n,e)&&(o[i++]=l)}return o}function eN(){return[]}var IB=Object.prototype,$B=IB.propertyIsEnumerable,XO=Object.getOwnPropertySymbols,n_=XO?function(e){return e==null?[]:(e=Object(e),DB(XO(e),function(t){return $B.call(e,t)}))}:eN;function zB(e,t){return lc(e,n_(e),t)}var LB=Object.getOwnPropertySymbols,tN=LB?function(e){for(var t=[];e;)t_(t,n_(e)),e=i0(e);return t}:eN;function FB(e,t){return lc(e,tN(e),t)}function nN(e,t,n){var r=t(e);return Ar(e)?r:t_(r,n(e))}function iw(e){return nN(e,Ji,n_)}function r_(e){return nN(e,jh,tN)}var sw=ac(Js,"DataView"),ow=ac(Js,"Promise"),Tu=ac(Js,"Set"),QO="[object Map]",UB="[object Object]",JO="[object Promise]",eA="[object Set]",tA="[object WeakMap]",nA="[object DataView]",VB=oc(sw),qB=oc(th),BB=oc(ow),HB=oc(Tu),KB=oc(nw),Qi=$o;(sw&&Qi(new sw(new ArrayBuffer(1)))!=nA||th&&Qi(new th)!=QO||ow&&Qi(ow.resolve())!=JO||Tu&&Qi(new Tu)!=eA||nw&&Qi(new nw)!=tA)&&(Qi=function(e){var t=$o(e),n=t==UB?e.constructor:void 0,r=n?oc(n):"";if(r)switch(r){case VB:return nA;case qB:return QO;case BB:return JO;case HB:return eA;case KB:return tA}return t});var GB=Object.prototype,ZB=GB.hasOwnProperty;function YB(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&ZB.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var ay=Js.Uint8Array;function i_(e){var t=new e.constructor(e.byteLength);return new ay(t).set(new ay(e)),t}function WB(e,t){var n=t?i_(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var XB=/\w*$/;function QB(e){var t=new e.constructor(e.source,XB.exec(e));return t.lastIndex=e.lastIndex,t}var rA=rs?rs.prototype:void 0,iA=rA?rA.valueOf:void 0;function JB(e){return iA?Object(iA.call(e)):{}}function rN(e,t){var n=t?i_(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var eH="[object Boolean]",tH="[object Date]",nH="[object Map]",rH="[object Number]",iH="[object RegExp]",sH="[object Set]",oH="[object String]",aH="[object Symbol]",lH="[object ArrayBuffer]",cH="[object DataView]",uH="[object Float32Array]",fH="[object Float64Array]",dH="[object Int8Array]",hH="[object Int16Array]",pH="[object Int32Array]",mH="[object Uint8Array]",gH="[object Uint8ClampedArray]",yH="[object Uint16Array]",vH="[object Uint32Array]";function bH(e,t,n){var r=e.constructor;switch(t){case lH:return i_(e);case eH:case tH:return new r(+e);case cH:return WB(e,n);case uH:case fH:case dH:case hH:case pH:case mH:case gH:case yH:case vH:return rN(e,n);case nH:return new r;case rH:case oH:return new r(e);case iH:return QB(e);case sH:return new r;case aH:return JB(e)}}function iN(e){return typeof e.constructor=="function"&&!kh(e)?$P(i0(e)):{}}var SH="[object Map]";function wH(e){return is(e)&&Qi(e)==SH}var sA=Lu&&Lu.isMap,xH=sA?Xx(sA):wH,_H="[object Set]";function EH(e){return is(e)&&Qi(e)==_H}var oA=Lu&&Lu.isSet,CH=oA?Xx(oA):EH,TH=1,RH=2,OH=4,sN="[object Arguments]",AH="[object Array]",kH="[object Boolean]",MH="[object Date]",jH="[object Error]",oN="[object Function]",PH="[object GeneratorFunction]",NH="[object Map]",DH="[object Number]",aN="[object Object]",IH="[object RegExp]",$H="[object Set]",zH="[object String]",LH="[object Symbol]",FH="[object WeakMap]",UH="[object ArrayBuffer]",VH="[object DataView]",qH="[object Float32Array]",BH="[object Float64Array]",HH="[object Int8Array]",KH="[object Int16Array]",GH="[object Int32Array]",ZH="[object Uint8Array]",YH="[object Uint8ClampedArray]",WH="[object Uint16Array]",XH="[object Uint32Array]",On={};On[sN]=On[AH]=On[UH]=On[VH]=On[kH]=On[MH]=On[qH]=On[BH]=On[HH]=On[KH]=On[GH]=On[NH]=On[DH]=On[aN]=On[IH]=On[$H]=On[zH]=On[LH]=On[ZH]=On[YH]=On[WH]=On[XH]=!0;On[jH]=On[oN]=On[FH]=!1;function Ld(e,t,n,r,i,o){var l,c=t&TH,u=t&RH,d=t&OH;if(n&&(l=i?n(e,r,i,o):n(e)),l!==void 0)return l;if(!Zt(e))return e;var h=Ar(e);if(h){if(l=YB(e),!c)return Kx(e,l)}else{var p=Qi(e),g=p==oN||p==PH;if(Jl(e))return JP(e,c);if(p==aN||p==sN||g&&!i){if(l=u||g?{}:iN(e),!c)return u?FB(e,PB(l,e)):zB(e,jB(l,e))}else{if(!On[p])return i?e:{};l=bH(e,p,c)}}o||(o=new Es);var S=o.get(e);if(S)return S;o.set(e,l),CH(e)?e.forEach(function(x){l.add(Ld(x,t,n,x,e,o))}):xH(e)&&e.forEach(function(x,w){l.set(w,Ld(x,t,n,w,e,o))});var y=d?u?r_:iw:u?jh:Ji,C=h?void 0:y(e);return Gx(C||e,function(x,w){C&&(w=x,x=e[w]),Jy(l,w,Ld(x,t,n,w,e,o))}),l}var QH=1,JH=4;function Nh(e){return Ld(e,QH|JH)}var eK="__lodash_hash_undefined__";function tK(e){return this.__data__.set(e,eK),this}function nK(e){return this.__data__.has(e)}function tc(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Lo;++t<n;)this.add(e[t])}tc.prototype.add=tc.prototype.push=tK;tc.prototype.has=nK;function rK(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function nh(e,t){return e.has(t)}var iK=1,sK=2;function lN(e,t,n,r,i,o){var l=n&iK,c=e.length,u=t.length;if(c!=u&&!(l&&u>c))return!1;var d=o.get(e),h=o.get(t);if(d&&h)return d==t&&h==e;var p=-1,g=!0,S=n&sK?new tc:void 0;for(o.set(e,t),o.set(t,e);++p<c;){var y=e[p],C=t[p];if(r)var x=l?r(C,y,p,t,e,o):r(y,C,p,e,t,o);if(x!==void 0){if(x)continue;g=!1;break}if(S){if(!rK(t,function(w,v){if(!nh(S,v)&&(y===w||i(y,w,n,r,o)))return S.push(v)})){g=!1;break}}else if(!(y===C||i(y,C,n,r,o))){g=!1;break}}return o.delete(e),o.delete(t),g}function oK(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function s_(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var aK=1,lK=2,cK="[object Boolean]",uK="[object Date]",fK="[object Error]",dK="[object Map]",hK="[object Number]",pK="[object RegExp]",mK="[object Set]",gK="[object String]",yK="[object Symbol]",vK="[object ArrayBuffer]",bK="[object DataView]",aA=rs?rs.prototype:void 0,o1=aA?aA.valueOf:void 0;function SK(e,t,n,r,i,o,l){switch(n){case bK:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case vK:return!(e.byteLength!=t.byteLength||!o(new ay(e),new ay(t)));case cK:case uK:case hK:return Ah(+e,+t);case fK:return e.name==t.name&&e.message==t.message;case pK:case gK:return e==t+"";case dK:var c=oK;case mK:var u=r&aK;if(c||(c=s_),e.size!=t.size&&!u)return!1;var d=l.get(e);if(d)return d==t;r|=lK,l.set(e,t);var h=lN(c(e),c(t),r,i,o,l);return l.delete(e),h;case yK:if(o1)return o1.call(e)==o1.call(t)}return!1}var wK=1,xK=Object.prototype,_K=xK.hasOwnProperty;function EK(e,t,n,r,i,o){var l=n&wK,c=iw(e),u=c.length,d=iw(t),h=d.length;if(u!=h&&!l)return!1;for(var p=u;p--;){var g=c[p];if(!(l?g in t:_K.call(t,g)))return!1}var S=o.get(e),y=o.get(t);if(S&&y)return S==t&&y==e;var C=!0;o.set(e,t),o.set(t,e);for(var x=l;++p<u;){g=c[p];var w=e[g],v=t[g];if(r)var E=l?r(v,w,g,t,e,o):r(w,v,g,e,t,o);if(!(E===void 0?w===v||i(w,v,n,r,o):E)){C=!1;break}x||(x=g=="constructor")}if(C&&!x){var b=e.constructor,T=t.constructor;b!=T&&"constructor"in e&&"constructor"in t&&!(typeof b=="function"&&b instanceof b&&typeof T=="function"&&T instanceof T)&&(C=!1)}return o.delete(e),o.delete(t),C}var CK=1,lA="[object Arguments]",cA="[object Array]",vm="[object Object]",TK=Object.prototype,uA=TK.hasOwnProperty;function RK(e,t,n,r,i,o){var l=Ar(e),c=Ar(t),u=l?cA:Qi(e),d=c?cA:Qi(t);u=u==lA?vm:u,d=d==lA?vm:d;var h=u==vm,p=d==vm,g=u==d;if(g&&Jl(e)){if(!Jl(t))return!1;l=!0,h=!1}if(g&&!h)return o||(o=new Es),l||Mh(e)?lN(e,t,n,r,i,o):SK(e,t,u,n,r,i,o);if(!(n&CK)){var S=h&&uA.call(e,"__wrapped__"),y=p&&uA.call(t,"__wrapped__");if(S||y){var C=S?e.value():e,x=y?t.value():t;return o||(o=new Es),i(C,x,n,r,o)}}return g?(o||(o=new Es),EK(e,t,n,r,i,o)):!1}function Dh(e,t,n,r,i){return e===t?!0:e==null||t==null||!is(e)&&!is(t)?e!==e&&t!==t:RK(e,t,n,r,Dh,i)}var OK=1,AK=2;function kK(e,t,n,r){var i=n.length,o=i;if(e==null)return!o;for(e=Object(e);i--;){var l=n[i];if(l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<o;){l=n[i];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 Es,p;if(!(p===void 0?Dh(d,u,OK|AK,r,h):p))return!1}}return!0}function cN(e){return e===e&&!Zt(e)}function MK(e){for(var t=Ji(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,cN(i)]}return t}function uN(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function jK(e){var t=MK(e);return t.length==1&&t[0][2]?uN(t[0][0],t[0][1]):function(n){return n===e||kK(n,e,t)}}function PK(e,t){return e!=null&&t in Object(e)}function fN(e,t,n){t=ff(t,e);for(var r=-1,i=t.length,o=!1;++r<i;){var l=cc(t[r]);if(!(o=e!=null&&n(e,l)))break;e=e[l]}return o||++r!=i?o:(i=e==null?0:e.length,!!i&&Wx(i)&&Qy(l,i)&&(Ar(e)||zu(e)))}function dN(e,t){return e!=null&&fN(e,t,PK)}var NK=1,DK=2;function IK(e,t){return Qx(e)&&cN(t)?uN(cc(e),t):function(n){var r=ze(n,e);return r===void 0&&r===t?dN(n,e):Dh(t,r,NK|DK)}}function $K(e){return function(t){return t?.[e]}}function zK(e){return function(t){return r0(t,e)}}function LK(e){return Qx(e)?$K(cc(e)):zK(e)}function o_(e){return typeof e=="function"?e:e==null?Xy:typeof e=="object"?Ar(e)?IK(e[0],e[1]):jK(e):LK(e)}function FK(e){return function(t,n,r){for(var i=-1,o=Object(t),l=r(t),c=l.length;c--;){var u=l[++i];if(n(o[u],u,o)===!1)break}return t}}var hN=FK();function pN(e,t){return e&&hN(e,t,Ji)}function UK(e,t){return function(n,r){if(n==null)return n;if(!Wa(n))return e(n,r);for(var i=n.length,o=-1,l=Object(n);++o<i&&r(l[o],o,l)!==!1;);return n}}var mN=UK(pN);function aw(e,t,n){(n!==void 0&&!Ah(e[t],n)||n===void 0&&!(t in e))&&Yx(e,t,n)}function rh(e){return is(e)&&Wa(e)}function lw(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function VK(e){return lc(e,jh(e))}function qK(e,t,n,r,i,o,l){var c=lw(e,n),u=lw(t,n),d=l.get(u);if(d){aw(e,n,d);return}var h=o?o(c,u,n+"",e,t,l):void 0,p=h===void 0;if(p){var g=Ar(u),S=!g&&Jl(u),y=!g&&!S&&Mh(u);h=u,g||S||y?Ar(c)?h=c:rh(c)?h=Kx(c):S?(p=!1,h=JP(u,!0)):y?(p=!1,h=rN(u,!0)):h=[]:La(u)||zu(u)?(h=c,zu(c)?h=VK(c):(!Zt(c)||Oh(c))&&(h=iN(u))):p=!1}p&&(l.set(u,h),i(h,u,r,o,l),l.delete(u)),aw(e,n,h)}function gN(e,t,n,r,i){e!==t&&hN(t,function(o,l){if(i||(i=new Es),Zt(o))qK(e,t,l,n,gN,r,i);else{var c=r?r(lw(e,l),o,l+"",e,t,i):void 0;c===void 0&&(c=o),aw(e,l,c)}},jh)}var BK=200;function HK(e,t,n,r){var i=-1,o=Zx,l=!0,c=e.length,u=[],d=t.length;if(!c)return u;t.length>=BK&&(o=nh,l=!1,t=new tc(t));e:for(;++i<c;){var h=e[i],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 o(t,p,r)||u.push(h)}return u}var KK=e0(function(e,t){return rh(e)?HK(e,Ph(t,1,rh,!0)):[]});function yN(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function vN(e){return typeof e=="function"?e:Xy}function GK(e,t){var n=Ar(e)?Gx:mN;return n(e,vN(t))}var ZK=1/0;function YK(e){var t=e==null?0:e.length;return t?Ph(e,ZK):[]}var WK=Object.prototype,XK=WK.hasOwnProperty;function QK(e,t){return e!=null&&XK.call(e,t)}function Ut(e,t){return e!=null&&fN(e,t,QK)}var JK="[object String]";function Fa(e){return typeof e=="string"||!Ar(e)&&is(e)&&$o(e)==JK}function eG(e,t){return uf(t,function(n){return e[n]})}function tG(e){return e==null?[]:eG(e,Ji(e))}var nG=Math.max;function rG(e,t,n,r){e=Wa(e)?e:tG(e),n=n?IP(n):0;var i=e.length;return n<0&&(n=nG(i+n,0)),Fa(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&LP(e,t,n)>-1}var iG=Math.min;function sG(e,t,n){for(var r=Zx,i=e[0].length,o=e.length,l=o,c=Array(o),u=1/0,d=[];l--;){var h=e[l];u=iG(h.length,u),c[l]=i>=120&&h.length>=120?new tc(l&&h):void 0}h=e[0];var p=-1,g=c[0];e:for(;++p<i&&d.length<u;){var S=h[p],y=S;if(S=S!==0?S:0,!(g?nh(g,y):r(d,y))){for(l=o;--l;){var C=c[l];if(!(C?nh(C,y):r(e[l],y)))continue e}g&&g.push(y),d.push(S)}}return d}function oG(e){return rh(e)?e:[]}var fA=e0(function(e){var t=uf(e,oG);return t.length&&t[0]===e[0]?sG(t):[]});function aG(e,t){return t.length<2?e:r0(e,EB(t,0,-1))}var lG="[object Map]",cG="[object Set]",uG=Object.prototype,fG=uG.hasOwnProperty;function br(e){if(e==null)return!0;if(Wa(e)&&(Ar(e)||typeof e=="string"||typeof e.splice=="function"||Jl(e)||Mh(e)||zu(e)))return!e.length;var t=Qi(e);if(t==lG||t==cG)return!e.size;if(kh(e))return!ZP(e).length;for(var n in e)if(fG.call(e,n))return!1;return!0}function ka(e,t){return Dh(e,t)}function dG(e,t,n){n=typeof n=="function"?n:void 0;var r=n?n(e,t):void 0;return r===void 0?Dh(e,t,void 0,n):!!r}var hG="[object Number]";function bN(e){return typeof e=="number"||is(e)&&$o(e)==hG}function ly(e){return e==null}function SN(e){return e===void 0}var pG=UP(function(e,t,n){gN(e,t,n)}),mG=Object.prototype,gG=mG.hasOwnProperty;function wN(e,t){t=ff(t,e);var n=-1,r=t.length;if(!r)return!0;for(var i=e==null||typeof e!="object"&&typeof e!="function";++n<r;){var o=t[n];if(typeof o=="string"){if(o==="__proto__"&&!gG.call(e,"__proto__"))return!1;if(o==="constructor"&&n+1<r&&typeof t[n+1]=="string"&&t[n+1]==="prototype"){if(i&&n===0)continue;return!1}}}var l=aG(e,t);return l==null||delete l[cc(yN(t))]}function yG(e){return La(e)?void 0:e}var vG=1,bG=2,SG=4,ih=WP(function(e,t){var n={};if(e==null)return n;var r=!1;t=uf(t,function(o){return o=ff(o,e),r||(r=o.length>1),o}),lc(e,r_(e),n),r&&(n=Ld(n,vG|bG|SG,yG));for(var i=t.length;i--;)wN(n,t[i]);return n});function a_(e,t,n,r){if(!Zt(e))return e;t=ff(t,e);for(var i=-1,o=t.length,l=o-1,c=e;c!=null&&++i<o;){var u=cc(t[i]),d=n;if(u==="__proto__"||u==="constructor"||u==="prototype")return e;if(i!=l){var h=c[u];d=r?r(h,u,c):void 0,d===void 0&&(d=Zt(h)?h:Qy(t[i+1])?[]:{})}Jy(c,u,d),c=c[u]}return e}function xN(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var l=t[r],c=r0(e,l);n(c,l)&&a_(o,ff(l,e),c)}return o}function wG(e,t){if(e==null)return{};var n=uf(r_(e),function(r){return[r]});return t=o_(t),xN(e,n,function(r,i){return t(r,i[0])})}function xG(e,t){return xN(e,t,function(n,r){return dN(e,r)})}var l_=WP(function(e,t){return e==null?{}:xG(e,t)});function _G(e,t,n,r,i){return i(e,function(o,l,c){n=r?(r=!1,o):t(n,o,l,c)}),n}function EG(e,t,n){var r=Ar(e)?CB:_G,i=arguments.length<3;return r(e,o_(t),n,i,mN)}function hn(e,t,n){return e==null?e:a_(e,t,n)}function CG(e,t,n,r){return r=typeof r=="function"?r:void 0,e==null?e:a_(e,t,n,r)}var TG=9007199254740991,a1=4294967295,RG=Math.min;function _N(e,t){if(e=IP(e),e<1||e>TG)return[];var n=a1,r=RG(e,a1);t=vN(t),e-=a1;for(var i=VP(r,t);++n<e;)t(n);return i}function EN(e){return Ar(e)?uf(e,cc):Rh(e)?[e]:Kx(YP(e_(e)))}function OG(e,t,n){var r=Ar(e),i=r||Jl(e)||Mh(e);if(t=o_(t),n==null){var o=e&&e.constructor;i?n=r?new o:[]:Zt(e)?n=Oh(o)?$P(i0(e)):{}:n={}}return(i?Gx:pN)(e,function(l,c,u){return t(n,l,c,u)}),n}var AG=1/0,kG=Tu&&1/s_(new Tu([,-0]))[1]==AG?function(e){return new Tu(e)}:Pg,MG=200;function CN(e,t,n){var r=-1,i=Zx,o=e.length,l=!0,c=[],u=c;if(o>=MG){var d=kG(e);if(d)return s_(d);l=!1,i=nh,u=new tc}else u=c;e:for(;++r<o;){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 i(u,p,n)||(u!==c&&u.push(p),c.push(h))}return c}var jG=e0(function(e){return CN(Ph(e,1,rh,!0))});function TN(e){return e&&e.length?CN(e):[]}var PG=0;function RN(e){var t=++PG;return e_(e)+t}function NG(e,t){return e==null?!0:wN(e,t)}const dA=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(S=>S(t,g))}},i=()=>t,c={setState:r,getState:i,getInitialState:()=>u,subscribe:d=>(n.add(d),()=>n.delete(d))},u=t=e(r,i,c);return c},DG=(e=>e?dA(e):dA),IG=e=>e;function $G(e,t=IG){const n=ki.useSyncExternalStore(e.subscribe,ki.useCallback(()=>t(e.getState()),[e,t]),ki.useCallback(()=>t(e.getInitialState()),[e,t]));return ki.useDebugValue(n),n}const zG=e=>{const t=DG(e),n=r=>$G(t,r);return Object.assign(n,t),n},LG=(e=>zG),df=LG()(e=>({tools:{},setToolData:(t,n)=>e(r=>l1(r,`tools.${t}`,{...r.tools[t],...n})),updateOpenaiObject:(t,n,r)=>e(i=>i.tools[t]?.openaiObject?l1(i,`tools.${t}.openaiObject.${n}`,r):i),pushOpenAiLog:(t,n)=>e(r=>{const i=r.tools[t]?.openaiLogs||[];return l1(r,`tools.${t}.openaiLogs`,[...i,{...n,id:crypto.randomUUID()}])})})),hf=e=>{const{tools:t}=df();return t[e]},l1=(e,t,n)=>{const r=Nh(e);return hn(r,t,n),r};function ON(e,t,n){try{return e(t)}catch(r){return KF("[nuqs] Error while parsing value `%s`: %O"+(n?" (for key `%s`)":""),t,r,n),null}}function Fo(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),ON(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 FG=Fo({parse:e=>e,serialize:String});Fo({parse:e=>{const t=parseInt(e);return t==t?t:null},serialize:e=>""+Math.round(e)});Fo({parse:e=>{const t=parseInt(e);return t==t?t-1:null},serialize:e=>""+Math.round(e+1)});Fo({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}});Fo({parse:e=>{const t=parseFloat(e);return t==t?t:null},serialize:String});Fo({parse:e=>e.toLowerCase()==="true",serialize:String});function c_(e,t){return e.valueOf()===t.valueOf()}Fo({parse:e=>{const t=parseInt(e);return t==t?new Date(t):null},serialize:e=>""+e.valueOf(),eq:c_});Fo({parse:e=>{const t=new Date(e);return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString(),eq:c_});Fo({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:c_});const c1=Lx(),UG={};function VG(e,t={}){const n=k.useId(),r=e7(),i=t7(),{history:o="replace",scroll:l=r?.scroll??!1,shallow:c=r?.shallow??!0,throttleMs:u=$d.timeMs,limitUrlUpdates:d=r?.limitUrlUpdates,clearOnDefault:h=r?.clearOnDefault??!0,startTransition:p,urlKeys:g=UG}=t,S=Object.keys(e).join(","),y=k.useMemo(()=>Object.fromEntries(Object.keys(e).map(M=>[M,g[M]??M])),[S,JSON.stringify(g)]),C=JF(Object.values(y)),x=C.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(",")]),E=Yb.useQueuedQueries(Object.values(y)),[b,T]=k.useState(()=>u1(e,g,x??new URLSearchParams,E).state),_=k.useRef(b);if(Hn("[nuq+ %s `%s`] render - state: %O, iSP: %s",n,S,b,x),Object.keys(w.current).join("&")!==Object.values(y).join("&")){const{state:M,hasChanged:P}=u1(e,g,x,E,w.current,_.current);P&&(Hn("[nuq+ %s `%s`] State changed: %O",n,S,{state:M,initialSearchParams:x,queuedQueries:E,queryRef:w.current,stateRef:_.current}),_.current=M,T(M)),w.current=Object.fromEntries(Object.entries(y).map(([z,L])=>[L,e[z]?.type==="multi"?x?.getAll(L):x?.get(L)??null]))}k.useEffect(()=>{const{state:M,hasChanged:P}=u1(e,g,x,E,w.current,_.current);P&&(Hn("[nuq+ %s `%s`] State changed: %O",n,S,{state:M,initialSearchParams:x,queuedQueries:E,queryRef:w.current,stateRef:_.current}),_.current=M,T(M))},[Object.values(y).map(M=>`${M}=${x?.getAll(M)}`).join("&"),JSON.stringify(E)]),k.useEffect(()=>{const M=Object.keys(e).reduce((P,z)=>(P[z]=({state:L,query:q})=>{T(Z=>{const{defaultValue:te}=e[z],ee=y[z],G=L??te??null,H=Z[z]??te??null;return Object.is(H,G)?(Hn("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). no change, skipping, resolved: %O",n,S,ee,L,te,_.current),Z):(_.current={..._.current,[z]:G},w.current[ee]=q,Hn("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). updateInternalState, resolved: %O",n,S,ee,L,te,_.current),_.current)})},P),{});for(const P of Object.keys(e)){const z=y[P];Hn("[nuq+ %s `%s`] Subscribing to sync for `%s`",n,z,S),c1.on(z,M[P])}return()=>{for(const P of Object.keys(e)){const z=y[P];Hn("[nuq+ %s `%s`] Unsubscribing to sync for `%s`",n,z,S),c1.off(z,M[P])}}},[S,y]);const O=k.useCallback((M,P={})=>{const z=Object.fromEntries(Object.keys(e).map(H=>[H,null])),L=typeof M=="function"?M(hA(_.current,v))??z:M??z;Hn("[nuq+ %s `%s`] setState: %O",n,S,L);let q,Z=0,te=!1;const ee=[];for(let[H,Y]of Object.entries(L)){const oe=e[H],re=y[H];if(!oe||Y===void 0)continue;(P.clearOnDefault??oe.clearOnDefault??h)&&Y!==null&&oe.defaultValue!==void 0&&(oe.eq??(($,N)=>$===N))(Y,oe.defaultValue)&&(Y=null);const I=Y===null?null:(oe.serialize??String)(Y);c1.emit(re,{state:Y,query:I});const B={key:re,query:I,options:{history:P.history??oe.history??o,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"){B.options.shallow===!0&&console.warn(Th(422));const $=P?.limitUrlUpdates?.timeMs??d?.timeMs??oe.limitUrlUpdates?.timeMs??$d.timeMs,N=Yb.push(B,$,C,i);Z<$&&(q=N,Z=$)}else{const $=P?.limitUrlUpdates?.timeMs??oe?.limitUrlUpdates?.timeMs??d?.timeMs??P.throttleMs??oe.throttleMs??u;ee.push(Yb.abort(re)),Mg.push(B,$),te=!0}}const G=ee.reduce((H,Y)=>Y(H),te?Mg.flush(C,i):Mg.getPendingPromise(C));return q??G},[S,o,c,l,u,d?.method,d?.timeMs,p,y,C.updateUrl,C.getSearchParamsSnapshot,C.rateLimitFactor,i,v]);return[k.useMemo(()=>hA(b,v),[b,v]),O]}function u1(e,t,n,r,i,o){let l=!1;const c=Object.entries(e).reduce((u,[d,h])=>{const p=t?.[d]??d,g=r[p],S=h.type==="multi"?[]:null,y=g===void 0?(h.type==="multi"?n?.getAll(p):n?.get(p))??S:g;return i&&o&&Fj(i[p]??S,y)?(u[d]=o[d]??null,u):(l=!0,u[d]=(i7(y)?null:ON(h.parse,y,p))??null,i&&(i[p]=y),u)},{});if(!l){const u=Object.keys(e),d=Object.keys(o??{});l=u.length!==d.length||u.some(h=>!d.includes(h))}return{state:c,hasChanged:l}}function hA(e,t){return Object.fromEntries(Object.keys(e).map(n=>[n,e[n]??t[n]??null]))}function qG(e,t={}){const{parse:n,type:r,serialize:i,eq:o,defaultValue:l,...c}=t,[{[e]:u},d]=VG({[e]:{parse:n??(h=>h),type:r,serialize:i,eq:o,defaultValue:l}},c);return[u,k.useCallback((h,p={})=>d(g=>({[e]:typeof h=="function"?h(g[e]):h}),p),[e,d])]}function u_(){return qG("tool",FG)}const BG=Object.freeze({status:"aborted"});function ke(e,t,n){function r(c,u){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:u,constr:l,traits:new Set},enumerable:!1}),c._zod.traits.has(e))return;c._zod.traits.add(e),t(c,u);const d=l.prototype,h=Object.keys(d);for(let p=0;p<h.length;p++){const g=h[p];g in c||(c[g]=d[g].bind(c))}}const i=n?.Parent??Object;class o extends i{}Object.defineProperty(o,"name",{value:e});function l(c){var u;const d=n?.Parent?new o: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 Ru extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class AN extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const kN={};function Ua(e){return kN}function MN(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,i])=>t.indexOf(+r)===-1).map(([r,i])=>i)}function cw(e,t){return typeof t=="bigint"?t.toString():t}function s0(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function f_(e){return e==null}function d_(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function HG(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let i=(r.split(".")[1]||"").length;if(i===0&&/\d?e-\d?/.test(r)){const u=r.match(/\d?e-(\d?)/);u?.[1]&&(i=Number.parseInt(u[1]))}const o=n>i?n:i,l=Number.parseInt(e.toFixed(o).replace(".","")),c=Number.parseInt(t.toFixed(o).replace(".",""));return l%c/10**o}const pA=Symbol("evaluating");function Rn(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==pA)return r===void 0&&(r=pA,r=n()),r},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function uc(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function fc(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function mA(e){return JSON.stringify(e)}function KG(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const jN="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function sh(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const GG=s0(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Fu(e){if(sh(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(sh(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function PN(e){return Fu(e)?{...e}:Array.isArray(e)?[...e]:e}const ZG=new Set(["string","number","symbol"]);function Uu(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Xa(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function et(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 YG(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const WG={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 XG(e,t){const n=e._zod.def,r=fc(e._zod.def,{get shape(){const i={};for(const o in t){if(!(o in n.shape))throw new Error(`Unrecognized key: "${o}"`);t[o]&&(i[o]=n.shape[o])}return uc(this,"shape",i),i},checks:[]});return Xa(e,r)}function QG(e,t){const n=e._zod.def,r=fc(e._zod.def,{get shape(){const i={...e._zod.def.shape};for(const o in t){if(!(o in n.shape))throw new Error(`Unrecognized key: "${o}"`);t[o]&&delete i[o]}return uc(this,"shape",i),i},checks:[]});return Xa(e,r)}function JG(e,t){if(!Fu(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const i=fc(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return uc(this,"shape",o),o},checks:[]});return Xa(e,i)}function eZ(e,t){if(!Fu(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n={...e._zod.def,get shape(){const r={...e._zod.def.shape,...t};return uc(this,"shape",r),r},checks:e._zod.def.checks};return Xa(e,n)}function tZ(e,t){const n=fc(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return uc(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return Xa(e,n)}function nZ(e,t,n){const r=fc(t._zod.def,{get shape(){const i=t._zod.def.shape,o={...i};if(n)for(const l in n){if(!(l in i))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(o[l]=e?new e({type:"optional",innerType:i[l]}):i[l])}else for(const l in i)o[l]=e?new e({type:"optional",innerType:i[l]}):i[l];return uc(this,"shape",o),o},checks:[]});return Xa(t,r)}function rZ(e,t,n){const r=fc(t._zod.def,{get shape(){const i=t._zod.def.shape,o={...i};if(n)for(const l in n){if(!(l in o))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(o[l]=new e({type:"nonoptional",innerType:i[l]}))}else for(const l in i)o[l]=new e({type:"nonoptional",innerType:i[l]});return uc(this,"shape",o),o},checks:[]});return Xa(t,r)}function pu(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 mu(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function bm(e){return typeof e=="string"?e:e?.message}function Va(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const i=bm(e.inst?._zod.def?.error?.(e))??bm(t?.error?.(e))??bm(n.customError?.(e))??bm(n.localeError?.(e))??"Invalid input";r.message=i}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function h_(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 NN=(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,cw,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},DN=ke("$ZodError",NN),IN=ke("$ZodError",NN,{Parent:Error});function iZ(e,t=n=>n.message){const n={},r=[];for(const i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function sZ(e,t=n=>n.message){const n={_errors:[]},r=i=>{for(const o of i.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(l=>r({issues:l}));else if(o.code==="invalid_key")r({issues:o.issues});else if(o.code==="invalid_element")r({issues:o.issues});else if(o.path.length===0)n._errors.push(t(o));else{let l=n,c=0;for(;c<o.path.length;){const u=o.path[c];c===o.path.length-1?(l[u]=l[u]||{_errors:[]},l[u]._errors.push(t(o))):l[u]=l[u]||{_errors:[]},l=l[u],c++}}};return r(e),n}const p_=e=>(t,n,r,i)=>{const o=r?Object.assign(r,{async:!1}):{async:!1},l=t._zod.run({value:n,issues:[]},o);if(l instanceof Promise)throw new Ru;if(l.issues.length){const c=new(i?.Err??e)(l.issues.map(u=>Va(u,o,Ua())));throw jN(c,i?.callee),c}return l.value},m_=e=>async(t,n,r,i)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let l=t._zod.run({value:n,issues:[]},o);if(l instanceof Promise&&(l=await l),l.issues.length){const c=new(i?.Err??e)(l.issues.map(u=>Va(u,o,Ua())));throw jN(c,i?.callee),c}return l.value},o0=e=>(t,n,r)=>{const i=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},i);if(o instanceof Promise)throw new Ru;return o.issues.length?{success:!1,error:new(e??DN)(o.issues.map(l=>Va(l,i,Ua())))}:{success:!0,data:o.value}},$N=o0(IN),a0=e=>async(t,n,r)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let o=t._zod.run({value:n,issues:[]},i);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(l=>Va(l,i,Ua())))}:{success:!0,data:o.value}},oZ=a0(IN),aZ=e=>(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return p_(e)(t,n,i)},lZ=e=>(t,n,r)=>p_(e)(t,n,r),cZ=e=>async(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return m_(e)(t,n,i)},uZ=e=>async(t,n,r)=>m_(e)(t,n,r),fZ=e=>(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return o0(e)(t,n,i)},dZ=e=>(t,n,r)=>o0(e)(t,n,r),hZ=e=>async(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return a0(e)(t,n,i)},pZ=e=>async(t,n,r)=>a0(e)(t,n,r),mZ=/^[cC][^\s-]{8,}$/,gZ=/^[0-9a-z]+$/,yZ=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,vZ=/^[0-9a-vA-V]{20}$/,bZ=/^[A-Za-z0-9]{27}$/,SZ=/^[a-zA-Z0-9_-]{21}$/,wZ=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,xZ=/^([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})$/,gA=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)$/,_Z=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,EZ="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function CZ(){return new RegExp(EZ,"u")}const TZ=/^(?:(?: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])$/,RZ=/^(([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}|:))$/,OZ=/^((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])$/,AZ=/^(([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])$/,kZ=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,zN=/^[A-Za-z0-9_-]*$/,MZ=/^\+(?:[0-9]){6,14}[0-9]$/,LN="(?:(?:\\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])))",jZ=new RegExp(`^${LN}$`);function FN(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 PZ(e){return new RegExp(`^${FN(e)}$`)}function NZ(e){const t=FN({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(`^${LN}T(?:${r})$`)}const DZ=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},IZ=/^-?\d+$/,$Z=/^-?\d+(?:\.\d+)?/,zZ=/^(?:true|false)$/i,LZ=/^null$/i,FZ=/^[^A-Z]*$/,UZ=/^[^a-z]*$/,yi=ke("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),UN={number:"number",bigint:"bigint",object:"date"},VN=ke("$ZodCheckLessThan",(e,t)=>{yi.init(e,t);const n=UN[typeof t.value];e._zod.onattach.push(r=>{const i=r._zod.bag,o=(t.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?i.maximum=t.value:i.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:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),qN=ke("$ZodCheckGreaterThan",(e,t)=>{yi.init(e,t);const n=UN[typeof t.value];e._zod.onattach.push(r=>{const i=r._zod.bag,o=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?i.minimum=t.value:i.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:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),VZ=ke("$ZodCheckMultipleOf",(e,t)=>{yi.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):HG(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})}}),qZ=ke("$ZodCheckNumberFormat",(e,t)=>{yi.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[i,o]=WG[t.format];e._zod.onattach.push(l=>{const c=l._zod.bag;c.format=t.format,c.minimum=i,c.maximum=o,n&&(c.pattern=IZ)}),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,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,continue:!t.abort});return}}c<i&&l.issues.push({origin:"number",input:c,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),c>o&&l.issues.push({origin:"number",input:c,code:"too_big",maximum:o,inst:e})}}),BZ=ke("$ZodCheckMaxLength",(e,t)=>{var n;yi.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!f_(i)&&i.length!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<i&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const i=r.value;if(i.length<=t.maximum)return;const l=h_(i);r.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),HZ=ke("$ZodCheckMinLength",(e,t)=>{var n;yi.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!f_(i)&&i.length!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const i=r.value;if(i.length>=t.minimum)return;const l=h_(i);r.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),KZ=ke("$ZodCheckLengthEquals",(e,t)=>{var n;yi.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!f_(i)&&i.length!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),e._zod.check=r=>{const i=r.value,o=i.length;if(o===t.length)return;const l=h_(i),c=o>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})}}),l0=ke("$ZodCheckStringFormat",(e,t)=>{var n,r;yi.init(e,t),e._zod.onattach.push(i=>{const o=i._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),GZ=ke("$ZodCheckRegex",(e,t)=>{l0.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})}}),ZZ=ke("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=FZ),l0.init(e,t)}),YZ=ke("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=UZ),l0.init(e,t)}),WZ=ke("$ZodCheckIncludes",(e,t)=>{yi.init(e,t);const n=Uu(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(i=>{const o=i._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=i=>{i.value.includes(t.includes,t.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:e,continue:!t.abort})}}),XZ=ke("$ZodCheckStartsWith",(e,t)=>{yi.init(e,t);const n=new RegExp(`^${Uu(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.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})}}),QZ=ke("$ZodCheckEndsWith",(e,t)=>{yi.init(e,t);const n=new RegExp(`.*${Uu(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.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})}}),JZ=ke("$ZodCheckOverwrite",(e,t)=>{yi.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class eY{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),i=Math.min(...r.map(l=>l.length-l.trimStart().length)),o=r.map(l=>l.slice(i)).map(l=>" ".repeat(this.indent*2)+l);for(const l of o)this.content.push(l)}compile(){const t=Function,n=this?.args,i=[...(this?.content??[""]).map(o=>` ${o}`)];return new t(...n,i.join(`
12
- `))}}const tY={major:4,minor:2,patch:1},Ln=ke("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=tY;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const i of r)for(const o of i._zod.onattach)o(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const i=(l,c,u)=>{let d=pu(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,S=p._zod.check(l);if(S instanceof Promise&&u?.async===!1)throw new Ru;if(h||S instanceof Promise)h=(h??Promise.resolve()).then(async()=>{await S,l.issues.length!==g&&(d||(d=pu(l,g)))});else{if(l.issues.length===g)continue;d||(d=pu(l,g))}}return h?h.then(()=>l):l},o=(l,c,u)=>{if(pu(l))return l.aborted=!0,l;const d=i(c,r,u);if(d instanceof Promise){if(u.async===!1)throw new Ru;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=>o(h,l,c)):o(d,l,c)}const u=e._zod.parse(l,c);if(u instanceof Promise){if(c.async===!1)throw new Ru;return u.then(d=>i(d,r,c))}return i(u,r,c)}}e["~standard"]={validate:i=>{try{const o=$N(e,i);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return oZ(e,i).then(l=>l.success?{value:l.data}:{issues:l.error?.issues})}},vendor:"zod",version:1}}),g_=ke("$ZodString",(e,t)=>{Ln.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??DZ(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),Zn=ke("$ZodStringFormat",(e,t)=>{l0.init(e,t),g_.init(e,t)}),nY=ke("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=xZ),Zn.init(e,t)}),rY=ke("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=gA(r))}else t.pattern??(t.pattern=gA());Zn.init(e,t)}),iY=ke("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=_Z),Zn.init(e,t)}),sY=ke("$ZodURL",(e,t)=>{Zn.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.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(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.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=i.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),oY=ke("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=CZ()),Zn.init(e,t)}),aY=ke("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=SZ),Zn.init(e,t)}),lY=ke("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=mZ),Zn.init(e,t)}),cY=ke("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=gZ),Zn.init(e,t)}),uY=ke("$ZodULID",(e,t)=>{t.pattern??(t.pattern=yZ),Zn.init(e,t)}),fY=ke("$ZodXID",(e,t)=>{t.pattern??(t.pattern=vZ),Zn.init(e,t)}),dY=ke("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=bZ),Zn.init(e,t)}),hY=ke("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=NZ(t)),Zn.init(e,t)}),pY=ke("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=jZ),Zn.init(e,t)}),mY=ke("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=PZ(t)),Zn.init(e,t)}),gY=ke("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=wZ),Zn.init(e,t)}),yY=ke("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=TZ),Zn.init(e,t),e._zod.bag.format="ipv4"}),vY=ke("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=RZ),Zn.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),bY=ke("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=OZ),Zn.init(e,t)}),SY=ke("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=AZ),Zn.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[i,o]=r;if(!o)throw new Error;const l=Number(o);if(`${l}`!==o)throw new Error;if(l<0||l>128)throw new Error;new URL(`http://[${i}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function BN(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const wY=ke("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=kZ),Zn.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{BN(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function xY(e){if(!zN.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return BN(n)}const _Y=ke("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=zN),Zn.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{xY(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),EY=ke("$ZodE164",(e,t)=>{t.pattern??(t.pattern=MZ),Zn.init(e,t)});function CY(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const i=JSON.parse(atob(r));return!("typ"in i&&i?.typ!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))}catch{return!1}}const TY=ke("$ZodJWT",(e,t)=>{Zn.init(e,t),e._zod.check=n=>{CY(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),HN=ke("$ZodNumber",(e,t)=>{Ln.init(e,t),e._zod.pattern=e._zod.bag.pattern??$Z,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const i=n.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return n;const o=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...o?{received:o}:{}}),n}}),RY=ke("$ZodNumberFormat",(e,t)=>{qZ.init(e,t),HN.init(e,t)}),OY=ke("$ZodBoolean",(e,t)=>{Ln.init(e,t),e._zod.pattern=zZ,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}const i=n.value;return typeof i=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),n}}),AY=ke("$ZodNull",(e,t)=>{Ln.init(e,t),e._zod.pattern=LZ,e._zod.values=new Set([null]),e._zod.parse=(n,r)=>{const i=n.value;return i===null||n.issues.push({expected:"null",code:"invalid_type",input:i,inst:e}),n}}),kY=ke("$ZodAny",(e,t)=>{Ln.init(e,t),e._zod.parse=n=>n}),MY=ke("$ZodUnknown",(e,t)=>{Ln.init(e,t),e._zod.parse=n=>n}),jY=ke("$ZodNever",(e,t)=>{Ln.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function yA(e,t,n){e.issues.length&&t.issues.push(...mu(n,e.issues)),t.value[n]=e.value}const PY=ke("$ZodArray",(e,t)=>{Ln.init(e,t),e._zod.parse=(n,r)=>{const i=n.value;if(!Array.isArray(i))return n.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),n;n.value=Array(i.length);const o=[];for(let l=0;l<i.length;l++){const c=i[l],u=t.element._zod.run({value:c,issues:[]},r);u instanceof Promise?o.push(u.then(d=>yA(d,n,l))):yA(u,n,l)}return o.length?Promise.all(o).then(()=>n):n}});function cy(e,t,n,r){e.issues.length&&t.issues.push(...mu(n,e.issues)),e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function KN(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=YG(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function GN(e,t,n,r,i,o){const l=[],c=i.keySet,u=i.catchall._zod,d=u.def.type;for(const h in t){if(c.has(h))continue;if(d==="never"){l.push(h);continue}const p=u.run({value:t[h],issues:[]},r);p instanceof Promise?e.push(p.then(g=>cy(g,n,h,t))):cy(p,n,h,t)}return l.length&&n.issues.push({code:"unrecognized_keys",keys:l,input:t,inst:o}),e.length?Promise.all(e).then(()=>n):n}const NY=ke("$ZodObject",(e,t)=>{if(Ln.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const c=t.shape;Object.defineProperty(t,"shape",{get:()=>{const u={...c};return Object.defineProperty(t,"shape",{value:u}),u}})}const r=s0(()=>KN(t));Rn(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 i=sh,o=t.catchall;let l;e._zod.parse=(c,u)=>{l??(l=r.value);const d=c.value;if(!i(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 y=p[g]._zod.run({value:d[g],issues:[]},u);y instanceof Promise?h.push(y.then(C=>cy(C,c,g,d))):cy(y,c,g,d)}return o?GN(h,d,c,u,r.value,e):h.length?Promise.all(h).then(()=>c):c}}),DY=ke("$ZodObjectJIT",(e,t)=>{NY.init(e,t);const n=e._zod.parse,r=s0(()=>KN(t)),i=g=>{const S=new eY(["shape","payload","ctx"]),y=r.value,C=E=>{const b=mA(E);return`shape[${b}]._zod.run({ value: input[${b}], issues: [] }, ctx)`};S.write("const input = payload.value;");const x=Object.create(null);let w=0;for(const E of y.keys)x[E]=`key_${w++}`;S.write("const newResult = {};");for(const E of y.keys){const b=x[E],T=mA(E);S.write(`const ${b} = ${C(E)};`),S.write(`
13
- if (${b}.issues.length) {
14
- payload.issues = payload.issues.concat(${b}.issues.map(iss => ({
15
- ...iss,
16
- path: iss.path ? [${T}, ...iss.path] : [${T}]
17
- })));
18
- }
19
-
20
-
21
- if (${b}.value === undefined) {
22
- if (${T} in input) {
23
- newResult[${T}] = undefined;
24
- }
25
- } else {
26
- newResult[${T}] = ${b}.value;
27
- }
28
-
29
- `)}S.write("payload.value = newResult;"),S.write("return payload;");const v=S.compile();return(E,b)=>v(g,E,b)};let o;const l=sh,c=!kN.jitless,d=c&&GG.value,h=t.catchall;let p;e._zod.parse=(g,S)=>{p??(p=r.value);const y=g.value;return l(y)?c&&d&&S?.async===!1&&S.jitless!==!0?(o||(o=i(t.shape)),g=o(g,S),h?GN([],y,g,S,p,e):g):n(g,S):(g.issues.push({expected:"object",code:"invalid_type",input:y,inst:e}),g)}});function vA(e,t,n,r){for(const o of e)if(o.issues.length===0)return t.value=o.value,t;const i=e.filter(o=>!pu(o));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(o=>o.issues.map(l=>Va(l,r,Ua())))}),t)}const ZN=ke("$ZodUnion",(e,t)=>{Ln.init(e,t),Rn(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),Rn(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),Rn(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),Rn(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){const i=t.options.map(o=>o._zod.pattern);return new RegExp(`^(${i.map(o=>d_(o.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,o)=>{if(n)return r(i,o);let l=!1;const c=[];for(const u of t.options){const d=u._zod.run({value:i.value,issues:[]},o);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=>vA(u,i,e,o)):vA(c,i,e,o)}}),IY=ke("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,ZN.init(e,t);const n=e._zod.parse;Rn(e._zod,"propValues",()=>{const i={};for(const o of t.options){const l=o._zod.propValues;if(!l||Object.keys(l).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(const[c,u]of Object.entries(l)){i[c]||(i[c]=new Set);for(const d of u)i[c].add(d)}}return i});const r=s0(()=>{const i=t.options,o=new Map;for(const l of i){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(o.has(u))throw new Error(`Duplicate discriminator value "${String(u)}"`);o.set(u,l)}}return o});e._zod.parse=(i,o)=>{const l=i.value;if(!sh(l))return i.issues.push({code:"invalid_type",expected:"object",input:l,inst:e}),i;const c=r.value.get(l?.[t.discriminator]);return c?c._zod.run(i,o):t.unionFallback?n(i,o):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:l,path:[t.discriminator],inst:e}),i)}}),$Y=ke("$ZodIntersection",(e,t)=>{Ln.init(e,t),e._zod.parse=(n,r)=>{const i=n.value,o=t.left._zod.run({value:i,issues:[]},r),l=t.right._zod.run({value:i,issues:[]},r);return o instanceof Promise||l instanceof Promise?Promise.all([o,l]).then(([u,d])=>bA(n,u,d)):bA(n,o,l)}});function uw(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Fu(e)&&Fu(t)){const n=Object.keys(t),r=Object.keys(e).filter(o=>n.indexOf(o)!==-1),i={...e,...t};for(const o of r){const l=uw(e[o],t[o]);if(!l.valid)return{valid:!1,mergeErrorPath:[o,...l.mergeErrorPath]};i[o]=l.data}return{valid:!0,data:i}}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 i=e[r],o=t[r],l=uw(i,o);if(!l.valid)return{valid:!1,mergeErrorPath:[r,...l.mergeErrorPath]};n.push(l.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function bA(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),pu(e))return e;const r=uw(t.value,n.value);if(!r.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}const zY=ke("$ZodRecord",(e,t)=>{Ln.init(e,t),e._zod.parse=(n,r)=>{const i=n.value;if(!Fu(i))return n.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),n;const o=[],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:i[d],issues:[]},r);h instanceof Promise?o.push(h.then(p=>{p.issues.length&&n.issues.push(...mu(d,p.issues)),n.value[d]=p.value})):(h.issues.length&&n.issues.push(...mu(d,h.issues)),n.value[d]=h.value)}let u;for(const d in i)c.has(d)||(u=u??[],u.push(d));u&&u.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:u})}else{n.value={};for(const c of Reflect.ownKeys(i)){if(c==="__proto__")continue;const 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(u.issues.length){t.mode==="loose"?n.value[c]=i[c]:n.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(h=>Va(h,r,Ua())),input:c,path:[c],inst:e});continue}const d=t.valueType._zod.run({value:i[c],issues:[]},r);d instanceof Promise?o.push(d.then(h=>{h.issues.length&&n.issues.push(...mu(c,h.issues)),n.value[u.value]=h.value})):(d.issues.length&&n.issues.push(...mu(c,d.issues)),n.value[u.value]=d.value)}}return o.length?Promise.all(o).then(()=>n):n}}),LY=ke("$ZodEnum",(e,t)=>{Ln.init(e,t);const n=MN(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(i=>ZG.has(typeof i)).map(i=>typeof i=="string"?Uu(i):i.toString()).join("|")})$`),e._zod.parse=(i,o)=>{const l=i.value;return r.has(l)||i.issues.push({code:"invalid_value",values:n,input:l,inst:e}),i}}),FY=ke("$ZodLiteral",(e,t)=>{if(Ln.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?Uu(r):r?Uu(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,i)=>{const o=r.value;return n.has(o)||r.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),r}}),UY=ke("$ZodTransform",(e,t)=>{Ln.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new AN(e.constructor.name);const i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(l=>(n.value=l,n));if(i instanceof Promise)throw new Ru;return n.value=i,n}});function SA(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const VY=ke("$ZodOptional",(e,t)=>{Ln.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Rn(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Rn(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${d_(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(o=>SA(o,n.value)):SA(i,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),qY=ke("$ZodNullable",(e,t)=>{Ln.init(e,t),Rn(e._zod,"optin",()=>t.innerType._zod.optin),Rn(e._zod,"optout",()=>t.innerType._zod.optout),Rn(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${d_(n.source)}|null)$`):void 0}),Rn(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)}),BY=ke("$ZodDefault",(e,t)=>{Ln.init(e,t),e._zod.optin="optional",Rn(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 i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(o=>wA(o,t)):wA(i,t)}});function wA(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const HY=ke("$ZodPrefault",(e,t)=>{Ln.init(e,t),e._zod.optin="optional",Rn(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))}),KY=ke("$ZodNonOptional",(e,t)=>{Ln.init(e,t),Rn(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 i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(o=>xA(o,e)):xA(i,e)}});function xA(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 GY=ke("$ZodCatch",(e,t)=>{Ln.init(e,t),Rn(e._zod,"optin",()=>t.innerType._zod.optin),Rn(e._zod,"optout",()=>t.innerType._zod.optout),Rn(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(o=>(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(l=>Va(l,r,Ua()))},input:n.value}),n.issues=[]),n)):(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(o=>Va(o,r,Ua()))},input:n.value}),n.issues=[]),n)}}),ZY=ke("$ZodPipe",(e,t)=>{Ln.init(e,t),Rn(e._zod,"values",()=>t.in._zod.values),Rn(e._zod,"optin",()=>t.in._zod.optin),Rn(e._zod,"optout",()=>t.out._zod.optout),Rn(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const o=t.out._zod.run(n,r);return o instanceof Promise?o.then(l=>Sm(l,t.in,r)):Sm(o,t.in,r)}const i=t.in._zod.run(n,r);return i instanceof Promise?i.then(o=>Sm(o,t.out,r)):Sm(i,t.out,r)}});function Sm(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const YY=ke("$ZodReadonly",(e,t)=>{Ln.init(e,t),Rn(e._zod,"propValues",()=>t.innerType._zod.propValues),Rn(e._zod,"values",()=>t.innerType._zod.values),Rn(e._zod,"optin",()=>t.innerType?._zod?.optin),Rn(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(_A):_A(i)}});function _A(e){return e.value=Object.freeze(e.value),e}const WY=ke("$ZodCustom",(e,t)=>{yi.init(e,t),Ln.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(o=>EA(o,n,r,e));EA(i,n,r,e)}});function EA(e,t,n,r){if(!e){const i={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(i.params=r._zod.def.params),t.issues.push(oh(i))}}var CA;class XY{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];if(this._map.set(t,r),r&&typeof r=="object"&&"id"in r){if(this._idmap.has(r.id))throw new Error(`ID ${r.id} already exists in the registry`);this._idmap.set(r.id,t)}return 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 i={...r,...this._map.get(t)};return Object.keys(i).length?i:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function QY(){return new XY}(CA=globalThis).__zod_globalRegistry??(CA.__zod_globalRegistry=QY());const Ad=globalThis.__zod_globalRegistry;function JY(e,t){return new e({type:"string",...et(t)})}function eW(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...et(t)})}function TA(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...et(t)})}function tW(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...et(t)})}function nW(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...et(t)})}function rW(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...et(t)})}function iW(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...et(t)})}function YN(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...et(t)})}function sW(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...et(t)})}function oW(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...et(t)})}function aW(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...et(t)})}function lW(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...et(t)})}function cW(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...et(t)})}function uW(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...et(t)})}function fW(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...et(t)})}function dW(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...et(t)})}function hW(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...et(t)})}function pW(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...et(t)})}function mW(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...et(t)})}function gW(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...et(t)})}function yW(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...et(t)})}function vW(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...et(t)})}function bW(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...et(t)})}function SW(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...et(t)})}function wW(e,t){return new e({type:"string",format:"date",check:"string_format",...et(t)})}function xW(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...et(t)})}function _W(e,t){return new e({type:"string",format:"duration",check:"string_format",...et(t)})}function EW(e,t){return new e({type:"number",checks:[],...et(t)})}function CW(e,t){return new e({type:"number",coerce:!0,checks:[],...et(t)})}function TW(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...et(t)})}function RW(e,t){return new e({type:"boolean",...et(t)})}function OW(e,t){return new e({type:"null",...et(t)})}function AW(e){return new e({type:"any"})}function kW(e){return new e({type:"unknown"})}function MW(e,t){return new e({type:"never",...et(t)})}function RA(e,t){return new VN({check:"less_than",...et(t),value:e,inclusive:!1})}function f1(e,t){return new VN({check:"less_than",...et(t),value:e,inclusive:!0})}function OA(e,t){return new qN({check:"greater_than",...et(t),value:e,inclusive:!1})}function d1(e,t){return new qN({check:"greater_than",...et(t),value:e,inclusive:!0})}function AA(e,t){return new VZ({check:"multiple_of",...et(t),value:e})}function WN(e,t){return new BZ({check:"max_length",...et(t),maximum:e})}function uy(e,t){return new HZ({check:"min_length",...et(t),minimum:e})}function XN(e,t){return new KZ({check:"length_equals",...et(t),length:e})}function jW(e,t){return new GZ({check:"string_format",format:"regex",...et(t),pattern:e})}function PW(e){return new ZZ({check:"string_format",format:"lowercase",...et(e)})}function NW(e){return new YZ({check:"string_format",format:"uppercase",...et(e)})}function DW(e,t){return new WZ({check:"string_format",format:"includes",...et(t),includes:e})}function IW(e,t){return new XZ({check:"string_format",format:"starts_with",...et(t),prefix:e})}function $W(e,t){return new QZ({check:"string_format",format:"ends_with",...et(t),suffix:e})}function pf(e){return new JZ({check:"overwrite",tx:e})}function zW(e){return pf(t=>t.normalize(e))}function LW(){return pf(e=>e.trim())}function FW(){return pf(e=>e.toLowerCase())}function UW(){return pf(e=>e.toUpperCase())}function VW(){return pf(e=>KG(e))}function qW(e,t,n){return new e({type:"array",element:t,...et(n)})}function BW(e,t,n){const r=et(n);return r.abort??(r.abort=!0),new e({type:"custom",check:"custom",fn:t,...r})}function HW(e,t,n){return new e({type:"custom",check:"custom",fn:t,...et(n)})}function KW(e){const t=GW(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(oh(r,n.value,t._zod.def));else{const i=r;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=t),i.continue??(i.continue=!t._zod.def.abort),n.issues.push(oh(i))}},e(n.value,n)));return t}function GW(e,t){const n=new yi({check:"custom",...et(t)});return n._zod.check=e,n}function QN(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??Ad,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 kr(e,t,n={path:[],schemaPath:[]}){var r;const i=e._zod.def,o=t.seen.get(e);if(o)return o.count++,n.schemaPath.includes(e)&&(o.cycle=n.path),o.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},p=e._zod.parent;if(p)l.ref=p,kr(p,t,h),t.seen.get(p).isParent=!0;else if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,l.schema,h);else{const g=l.schema,S=t.processors[i.type];if(!S)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);S(e,t,g,h)}}const u=t.metadataRegistry.get(e);return u&&Object.assign(l.schema,u),t.io==="input"&&ii(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 JN(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=o=>{const l=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const h=e.external.registry.get(o[0])?.id,p=e.external.uri??(S=>S);if(h)return{ref:p(h)};const g=o[1].defId??o[1].schema.id??`schema${e.counter++}`;return o[1].defId=g,{defId:g,ref:`${p("__shared")}#/${l}/${g}`}}if(o[1]===n)return{ref:"#"};const u=`#/${l}/`,d=o[1].schema.id??`__schema${e.counter++}`;return{defId:d,ref:u+d}},i=o=>{if(o[1].schema.$ref)return;const l=o[1],{ref:c,defId:u}=r(o);l.def={...l.schema},u&&(l.defId=u);const d=l.schema;for(const h in d)delete d[h];d.$ref=c};if(e.cycles==="throw")for(const o of e.seen.entries()){const l=o[1];if(l.cycle)throw new Error(`Cycle detected: #/${l.cycle?.join("/")}/<root>
30
-
31
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const o of e.seen.entries()){const l=o[1];if(t===o[0]){i(o);continue}if(e.external){const u=e.external.registry.get(o[0])?.id;if(t!==o[0]&&u){i(o);continue}}if(e.metadataRegistry.get(o[0])?.id){i(o);continue}if(l.cycle){i(o);continue}if(l.count>1&&e.reused==="ref"){i(o);continue}}}function e4(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),u=c.def??c.schema,d={...u};if(c.ref===null)return;const h=c.ref;if(c.ref=null,h){r(h);const p=e.seen.get(h).schema;p.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(p)):(Object.assign(u,p),Object.assign(u,d))}c.isParent||e.override({zodSchema:l,jsonSchema:u,path:c.path??[]})};for(const l of[...e.seen.entries()].reverse())r(l[0]);const i={};if(e.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?i.$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");i.$id=e.external.uri(l)}Object.assign(i,n.def??n.schema);const o=e.external?.defs??{};for(const l of e.seen.entries()){const c=l[1];c.def&&c.defId&&(o[c.defId]=c.def)}e.external||Object.keys(o).length>0&&(e.target==="draft-2020-12"?i.$defs=o:i.definitions=o);try{const l=JSON.parse(JSON.stringify(i));return Object.defineProperty(l,"~standard",{value:{...t["~standard"],jsonSchema:{input:fy(t,"input"),output:fy(t,"output")}},enumerable:!1,writable:!1}),l}catch{throw new Error("Error converting schema to JSON.")}}function ii(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 ii(r.element,n);if(r.type==="set")return ii(r.valueType,n);if(r.type==="lazy")return ii(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 ii(r.innerType,n);if(r.type==="intersection")return ii(r.left,n)||ii(r.right,n);if(r.type==="record"||r.type==="map")return ii(r.keyType,n)||ii(r.valueType,n);if(r.type==="pipe")return ii(r.in,n)||ii(r.out,n);if(r.type==="object"){for(const i in r.shape)if(ii(r.shape[i],n))return!0;return!1}if(r.type==="union"){for(const i of r.options)if(ii(i,n))return!0;return!1}if(r.type==="tuple"){for(const i of r.items)if(ii(i,n))return!0;return!!(r.rest&&ii(r.rest,n))}return!1}const ZW=(e,t={})=>n=>{const r=QN({...n,processors:t});return kr(e,r),JN(r,e),e4(r,e)},fy=(e,t)=>n=>{const{libraryOptions:r,target:i}=n??{},o=QN({...r??{},target:i,io:t,processors:{}});return kr(e,o),JN(o,e),e4(o,e)},YW={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},WW=(e,t,n,r)=>{const i=n;i.type="string";const{minimum:o,maximum:l,format:c,patterns:u,contentEncoding:d}=e._zod.bag;if(typeof o=="number"&&(i.minLength=o),typeof l=="number"&&(i.maxLength=l),c&&(i.format=YW[c]??c,i.format===""&&delete i.format),d&&(i.contentEncoding=d),u&&u.size>0){const h=[...u];h.length===1?i.pattern=h[0].source:h.length>1&&(i.allOf=[...h.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},XW=(e,t,n,r)=>{const i=n,{minimum:o,maximum:l,format:c,multipleOf:u,exclusiveMaximum:d,exclusiveMinimum:h}=e._zod.bag;typeof c=="string"&&c.includes("int")?i.type="integer":i.type="number",typeof h=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.minimum=h,i.exclusiveMinimum=!0):i.exclusiveMinimum=h),typeof o=="number"&&(i.minimum=o,typeof h=="number"&&t.target!=="draft-04"&&(h>=o?delete i.minimum:delete i.exclusiveMinimum)),typeof d=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.maximum=d,i.exclusiveMaximum=!0):i.exclusiveMaximum=d),typeof l=="number"&&(i.maximum=l,typeof d=="number"&&t.target!=="draft-04"&&(d<=l?delete i.maximum:delete i.exclusiveMaximum)),typeof u=="number"&&(i.multipleOf=u)},QW=(e,t,n,r)=>{n.type="boolean"},JW=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},eX=(e,t,n,r)=>{n.not={}},tX=(e,t,n,r)=>{},nX=(e,t,n,r)=>{},rX=(e,t,n,r)=>{const i=e._zod.def,o=MN(i.entries);o.every(l=>typeof l=="number")&&(n.type="number"),o.every(l=>typeof l=="string")&&(n.type="string"),n.enum=o},iX=(e,t,n,r)=>{const i=e._zod.def,o=[];for(const l of i.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");o.push(Number(l))}else o.push(l);if(o.length!==0)if(o.length===1){const l=o[0];n.type=l===null?"null":typeof l,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[l]:n.const=l}else o.every(l=>typeof l=="number")&&(n.type="number"),o.every(l=>typeof l=="string")&&(n.type="string"),o.every(l=>typeof l=="boolean")&&(n.type="boolean"),o.every(l=>l===null)&&(n.type="null"),n.enum=o},sX=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},oX=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},aX=(e,t,n,r)=>{const i=n,o=e._zod.def,{minimum:l,maximum:c}=e._zod.bag;typeof l=="number"&&(i.minItems=l),typeof c=="number"&&(i.maxItems=c),i.type="array",i.items=kr(o.element,t,{...r,path:[...r.path,"items"]})},lX=(e,t,n,r)=>{const i=n,o=e._zod.def;i.type="object",i.properties={};const l=o.shape;for(const d in l)i.properties[d]=kr(l[d],t,{...r,path:[...r.path,"properties",d]});const c=new Set(Object.keys(l)),u=new Set([...c].filter(d=>{const h=o.shape[d]._zod;return t.io==="input"?h.optin===void 0:h.optout===void 0}));u.size>0&&(i.required=Array.from(u)),o.catchall?._zod.def.type==="never"?i.additionalProperties=!1:o.catchall?o.catchall&&(i.additionalProperties=kr(o.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},cX=(e,t,n,r)=>{const i=e._zod.def,o=i.inclusive===!1,l=i.options.map((c,u)=>kr(c,t,{...r,path:[...r.path,o?"oneOf":"anyOf",u]}));o?n.oneOf=l:n.anyOf=l},uX=(e,t,n,r)=>{const i=e._zod.def,o=kr(i.left,t,{...r,path:[...r.path,"allOf",0]}),l=kr(i.right,t,{...r,path:[...r.path,"allOf",1]}),c=d=>"allOf"in d&&Object.keys(d).length===1,u=[...c(o)?o.allOf:[o],...c(l)?l.allOf:[l]];n.allOf=u},fX=(e,t,n,r)=>{const i=n,o=e._zod.def;i.type="object",(t.target==="draft-07"||t.target==="draft-2020-12")&&(i.propertyNames=kr(o.keyType,t,{...r,path:[...r.path,"propertyNames"]})),i.additionalProperties=kr(o.valueType,t,{...r,path:[...r.path,"additionalProperties"]})},dX=(e,t,n,r)=>{const i=e._zod.def,o=kr(i.innerType,t,r),l=t.seen.get(e);t.target==="openapi-3.0"?(l.ref=i.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]},hX=(e,t,n,r)=>{const i=e._zod.def;kr(i.innerType,t,r);const o=t.seen.get(e);o.ref=i.innerType},pX=(e,t,n,r)=>{const i=e._zod.def;kr(i.innerType,t,r);const o=t.seen.get(e);o.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},mX=(e,t,n,r)=>{const i=e._zod.def;kr(i.innerType,t,r);const o=t.seen.get(e);o.ref=i.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},gX=(e,t,n,r)=>{const i=e._zod.def;kr(i.innerType,t,r);const o=t.seen.get(e);o.ref=i.innerType;let l;try{l=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=l},yX=(e,t,n,r)=>{const i=e._zod.def,o=t.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;kr(o,t,r);const l=t.seen.get(e);l.ref=o},vX=(e,t,n,r)=>{const i=e._zod.def;kr(i.innerType,t,r);const o=t.seen.get(e);o.ref=i.innerType,n.readOnly=!0},bX=(e,t,n,r)=>{const i=e._zod.def;kr(i.innerType,t,r);const o=t.seen.get(e);o.ref=i.innerType};function c0(e){return!!e._zod}function Ea(e,t){return c0(e)?$N(e,t):e.safeParse(t)}function t4(e){if(!e)return;let t;if(c0(e)?t=e._zod?.def?.shape:t=e.shape,!!t){if(typeof t=="function")try{return t()}catch{return}return t}}function SX(e){if(c0(e)){const o=e._zod?.def;if(o){if(o.value!==void 0)return o.value;if(Array.isArray(o.values)&&o.values.length>0)return o.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 wX=ke("ZodISODateTime",(e,t)=>{hY.init(e,t),Jn.init(e,t)});function n4(e){return SW(wX,e)}const xX=ke("ZodISODate",(e,t)=>{pY.init(e,t),Jn.init(e,t)});function _X(e){return wW(xX,e)}const EX=ke("ZodISOTime",(e,t)=>{mY.init(e,t),Jn.init(e,t)});function CX(e){return xW(EX,e)}const TX=ke("ZodISODuration",(e,t)=>{gY.init(e,t),Jn.init(e,t)});function RX(e){return _W(TX,e)}const OX=(e,t)=>{DN.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>sZ(e,n)},flatten:{value:n=>iZ(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,cw,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,cw,2)}},isEmpty:{get(){return e.issues.length===0}}})},as=ke("ZodError",OX,{Parent:Error}),AX=p_(as),kX=m_(as),MX=o0(as),jX=a0(as),PX=aZ(as),NX=lZ(as),DX=cZ(as),IX=uZ(as),$X=fZ(as),zX=dZ(as),LX=hZ(as),FX=pZ(as),Yn=ke("ZodType",(e,t)=>(Ln.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:fy(e,"input"),output:fy(e,"output")}}),e.toJSONSchema=ZW(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(fc(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]})),e.clone=(n,r)=>Xa(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>AX(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>MX(e,n,r),e.parseAsync=async(n,r)=>kX(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>jX(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>PX(e,n,r),e.decode=(n,r)=>NX(e,n,r),e.encodeAsync=async(n,r)=>DX(e,n,r),e.decodeAsync=async(n,r)=>IX(e,n,r),e.safeEncode=(n,r)=>$X(e,n,r),e.safeDecode=(n,r)=>zX(e,n,r),e.safeEncodeAsync=async(n,r)=>LX(e,n,r),e.safeDecodeAsync=async(n,r)=>FX(e,n,r),e.refine=(n,r)=>e.check(MQ(n,r)),e.superRefine=n=>e.check(jQ(n)),e.overwrite=n=>e.check(pf(n)),e.optional=()=>or(e),e.nullable=()=>jA(e),e.nullish=()=>or(jA(e)),e.nonoptional=n=>EQ(e,n),e.array=()=>Ge(e),e.or=n=>Fn([e,n]),e.and=n=>v_(e,n),e.transform=n=>dw(e,c4(n)),e.default=n=>wQ(e,n),e.prefault=n=>_Q(e,n),e.catch=n=>TQ(e,n),e.pipe=n=>dw(e,n),e.readonly=()=>AQ(e),e.describe=n=>{const r=e.clone();return Ad.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return Ad.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return Ad.get(e);const r=e.clone();return Ad.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),r4=ke("_ZodString",(e,t)=>{g_.init(e,t),Yn.init(e,t),e._zod.processJSONSchema=(r,i,o)=>WW(e,r,i);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(jW(...r)),e.includes=(...r)=>e.check(DW(...r)),e.startsWith=(...r)=>e.check(IW(...r)),e.endsWith=(...r)=>e.check($W(...r)),e.min=(...r)=>e.check(uy(...r)),e.max=(...r)=>e.check(WN(...r)),e.length=(...r)=>e.check(XN(...r)),e.nonempty=(...r)=>e.check(uy(1,...r)),e.lowercase=r=>e.check(PW(r)),e.uppercase=r=>e.check(NW(r)),e.trim=()=>e.check(LW()),e.normalize=(...r)=>e.check(zW(...r)),e.toLowerCase=()=>e.check(FW()),e.toUpperCase=()=>e.check(UW()),e.slugify=()=>e.check(VW())}),UX=ke("ZodString",(e,t)=>{g_.init(e,t),r4.init(e,t),e.email=n=>e.check(eW(VX,n)),e.url=n=>e.check(YN(i4,n)),e.jwt=n=>e.check(bW(iQ,n)),e.emoji=n=>e.check(sW(BX,n)),e.guid=n=>e.check(TA(kA,n)),e.uuid=n=>e.check(tW(wm,n)),e.uuidv4=n=>e.check(nW(wm,n)),e.uuidv6=n=>e.check(rW(wm,n)),e.uuidv7=n=>e.check(iW(wm,n)),e.nanoid=n=>e.check(oW(HX,n)),e.guid=n=>e.check(TA(kA,n)),e.cuid=n=>e.check(aW(KX,n)),e.cuid2=n=>e.check(lW(GX,n)),e.ulid=n=>e.check(cW(ZX,n)),e.base64=n=>e.check(gW(tQ,n)),e.base64url=n=>e.check(yW(nQ,n)),e.xid=n=>e.check(uW(YX,n)),e.ksuid=n=>e.check(fW(WX,n)),e.ipv4=n=>e.check(dW(XX,n)),e.ipv6=n=>e.check(hW(QX,n)),e.cidrv4=n=>e.check(pW(JX,n)),e.cidrv6=n=>e.check(mW(eQ,n)),e.e164=n=>e.check(vW(rQ,n)),e.datetime=n=>e.check(n4(n)),e.date=n=>e.check(_X(n)),e.time=n=>e.check(CX(n)),e.duration=n=>e.check(RX(n))});function fe(e){return JY(UX,e)}const Jn=ke("ZodStringFormat",(e,t)=>{Zn.init(e,t),r4.init(e,t)}),VX=ke("ZodEmail",(e,t)=>{iY.init(e,t),Jn.init(e,t)}),kA=ke("ZodGUID",(e,t)=>{nY.init(e,t),Jn.init(e,t)}),wm=ke("ZodUUID",(e,t)=>{rY.init(e,t),Jn.init(e,t)}),i4=ke("ZodURL",(e,t)=>{sY.init(e,t),Jn.init(e,t)});function qX(e){return YN(i4,e)}const BX=ke("ZodEmoji",(e,t)=>{oY.init(e,t),Jn.init(e,t)}),HX=ke("ZodNanoID",(e,t)=>{aY.init(e,t),Jn.init(e,t)}),KX=ke("ZodCUID",(e,t)=>{lY.init(e,t),Jn.init(e,t)}),GX=ke("ZodCUID2",(e,t)=>{cY.init(e,t),Jn.init(e,t)}),ZX=ke("ZodULID",(e,t)=>{uY.init(e,t),Jn.init(e,t)}),YX=ke("ZodXID",(e,t)=>{fY.init(e,t),Jn.init(e,t)}),WX=ke("ZodKSUID",(e,t)=>{dY.init(e,t),Jn.init(e,t)}),XX=ke("ZodIPv4",(e,t)=>{yY.init(e,t),Jn.init(e,t)}),QX=ke("ZodIPv6",(e,t)=>{vY.init(e,t),Jn.init(e,t)}),JX=ke("ZodCIDRv4",(e,t)=>{bY.init(e,t),Jn.init(e,t)}),eQ=ke("ZodCIDRv6",(e,t)=>{SY.init(e,t),Jn.init(e,t)}),tQ=ke("ZodBase64",(e,t)=>{wY.init(e,t),Jn.init(e,t)}),nQ=ke("ZodBase64URL",(e,t)=>{_Y.init(e,t),Jn.init(e,t)}),rQ=ke("ZodE164",(e,t)=>{EY.init(e,t),Jn.init(e,t)}),iQ=ke("ZodJWT",(e,t)=>{TY.init(e,t),Jn.init(e,t)}),y_=ke("ZodNumber",(e,t)=>{HN.init(e,t),Yn.init(e,t),e._zod.processJSONSchema=(r,i,o)=>XW(e,r,i),e.gt=(r,i)=>e.check(OA(r,i)),e.gte=(r,i)=>e.check(d1(r,i)),e.min=(r,i)=>e.check(d1(r,i)),e.lt=(r,i)=>e.check(RA(r,i)),e.lte=(r,i)=>e.check(f1(r,i)),e.max=(r,i)=>e.check(f1(r,i)),e.int=r=>e.check(MA(r)),e.safe=r=>e.check(MA(r)),e.positive=r=>e.check(OA(0,r)),e.nonnegative=r=>e.check(d1(0,r)),e.negative=r=>e.check(RA(0,r)),e.nonpositive=r=>e.check(f1(0,r)),e.multipleOf=(r,i)=>e.check(AA(r,i)),e.step=(r,i)=>e.check(AA(r,i)),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 pn(e){return EW(y_,e)}const sQ=ke("ZodNumberFormat",(e,t)=>{RY.init(e,t),y_.init(e,t)});function MA(e){return TW(sQ,e)}const oQ=ke("ZodBoolean",(e,t)=>{OY.init(e,t),Yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>QW(e,n,r)});function In(e){return RW(oQ,e)}const aQ=ke("ZodNull",(e,t)=>{AY.init(e,t),Yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>JW(e,n,r)});function s4(e){return OW(aQ,e)}const lQ=ke("ZodAny",(e,t)=>{kY.init(e,t),Yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>tX()});function cQ(){return AW(lQ)}const uQ=ke("ZodUnknown",(e,t)=>{MY.init(e,t),Yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>nX()});function Xn(){return kW(uQ)}const fQ=ke("ZodNever",(e,t)=>{jY.init(e,t),Yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>eX(e,n,r)});function dQ(e){return MW(fQ,e)}const hQ=ke("ZodArray",(e,t)=>{PY.init(e,t),Yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>aX(e,n,r,i),e.element=t.element,e.min=(n,r)=>e.check(uy(n,r)),e.nonempty=n=>e.check(uy(1,n)),e.max=(n,r)=>e.check(WN(n,r)),e.length=(n,r)=>e.check(XN(n,r)),e.unwrap=()=>e.element});function Ge(e,t){return qW(hQ,e,t)}const o4=ke("ZodObject",(e,t)=>{DY.init(e,t),Yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>lX(e,n,r,i),Rn(e,"shape",()=>t.shape),e.keyof=()=>Li(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:dQ()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>JG(e,n),e.safeExtend=n=>eZ(e,n),e.merge=n=>tZ(e,n),e.pick=n=>XG(e,n),e.omit=n=>QG(e,n),e.partial=(...n)=>nZ(u4,e,n[0]),e.required=(...n)=>rZ(f4,e,n[0])});function Ze(e,t){const n={type:"object",shape:e??{},...et(t)};return new o4(n)}function Kr(e,t){return new o4({type:"object",shape:e,catchall:Xn(),...et(t)})}const a4=ke("ZodUnion",(e,t)=>{ZN.init(e,t),Yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>cX(e,n,r,i),e.options=t.options});function Fn(e,t){return new a4({type:"union",options:e,...et(t)})}const pQ=ke("ZodDiscriminatedUnion",(e,t)=>{a4.init(e,t),IY.init(e,t)});function l4(e,t,n){return new pQ({type:"union",options:t,discriminator:e,...et(n)})}const mQ=ke("ZodIntersection",(e,t)=>{$Y.init(e,t),Yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>uX(e,n,r,i)});function v_(e,t){return new mQ({type:"intersection",left:e,right:t})}const gQ=ke("ZodRecord",(e,t)=>{zY.init(e,t),Yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>fX(e,n,r,i),e.keyType=t.keyType,e.valueType=t.valueType});function Qn(e,t,n){return new gQ({type:"record",keyType:e,valueType:t,...et(n)})}const fw=ke("ZodEnum",(e,t)=>{LY.init(e,t),Yn.init(e,t),e._zod.processJSONSchema=(r,i,o)=>rX(e,r,i),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,i)=>{const o={};for(const l of r)if(n.has(l))o[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new fw({...t,checks:[],...et(i),entries:o})},e.exclude=(r,i)=>{const o={...t.entries};for(const l of r)if(n.has(l))delete o[l];else throw new Error(`Key ${l} not found in enum`);return new fw({...t,checks:[],...et(i),entries:o})}});function Li(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new fw({type:"enum",entries:n,...et(t)})}const yQ=ke("ZodLiteral",(e,t)=>{FY.init(e,t),Yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>iX(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 rt(e,t){return new yQ({type:"literal",values:Array.isArray(e)?e:[e],...et(t)})}const vQ=ke("ZodTransform",(e,t)=>{UY.init(e,t),Yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>oX(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new AN(e.constructor.name);n.addIssue=o=>{if(typeof o=="string")n.issues.push(oh(o,n.value,t));else{const l=o;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 i=t.transform(n.value,n);return i instanceof Promise?i.then(o=>(n.value=o,n)):(n.value=i,n)}});function c4(e){return new vQ({type:"transform",transform:e})}const u4=ke("ZodOptional",(e,t)=>{VY.init(e,t),Yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>bX(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function or(e){return new u4({type:"optional",innerType:e})}const bQ=ke("ZodNullable",(e,t)=>{qY.init(e,t),Yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>dX(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function jA(e){return new bQ({type:"nullable",innerType:e})}const SQ=ke("ZodDefault",(e,t)=>{BY.init(e,t),Yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>pX(e,n,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function wQ(e,t){return new SQ({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():PN(t)}})}const xQ=ke("ZodPrefault",(e,t)=>{HY.init(e,t),Yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>mX(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function _Q(e,t){return new xQ({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():PN(t)}})}const f4=ke("ZodNonOptional",(e,t)=>{KY.init(e,t),Yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>hX(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function EQ(e,t){return new f4({type:"nonoptional",innerType:e,...et(t)})}const CQ=ke("ZodCatch",(e,t)=>{GY.init(e,t),Yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>gX(e,n,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function TQ(e,t){return new CQ({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const RQ=ke("ZodPipe",(e,t)=>{ZY.init(e,t),Yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>yX(e,n,r,i),e.in=t.in,e.out=t.out});function dw(e,t){return new RQ({type:"pipe",in:e,out:t})}const OQ=ke("ZodReadonly",(e,t)=>{YY.init(e,t),Yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>vX(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function AQ(e){return new OQ({type:"readonly",innerType:e})}const d4=ke("ZodCustom",(e,t)=>{WY.init(e,t),Yn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>sX(e,n)});function kQ(e,t){return BW(d4,e??(()=>!0),t)}function MQ(e,t={}){return HW(d4,e,t)}function jQ(e){return KW(e)}function h4(e,t){return dw(c4(e),t)}const PQ={custom:"custom"};function NQ(e){return CW(y_,e)}const u0="2025-11-25",DQ=[u0,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],$l="io.modelcontextprotocol/related-task",f0="2.0",Gr=kQ(e=>e!==null&&(typeof e=="object"||typeof e=="function")),p4=Fn([fe(),pn().int()]),m4=fe();Kr({ttl:Fn([pn(),s4()]).optional(),pollInterval:pn().optional()});const IQ=Ze({ttl:pn().optional()}),$Q=Ze({taskId:fe()}),b_=Kr({progressToken:p4.optional(),[$l]:$Q.optional()}),Fi=Ze({_meta:b_.optional()}),Ih=Fi.extend({task:IQ.optional()}),zQ=e=>Ih.safeParse(e).success,Zr=Ze({method:fe(),params:Fi.loose().optional()}),ls=Ze({_meta:b_.optional()}),cs=Ze({method:fe(),params:ls.loose().optional()}),Yr=Kr({_meta:b_.optional()}),d0=Fn([fe(),pn().int()]),g4=Ze({jsonrpc:rt(f0),id:d0,...Zr.shape}).strict(),hw=e=>g4.safeParse(e).success,y4=Ze({jsonrpc:rt(f0),...cs.shape}).strict(),LQ=e=>y4.safeParse(e).success,S_=Ze({jsonrpc:rt(f0),id:d0,result:Yr}).strict(),kd=e=>S_.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 w_=Ze({jsonrpc:rt(f0),id:d0.optional(),error:Ze({code:pn().int(),message:fe(),data:Xn().optional()})}).strict(),FQ=e=>w_.safeParse(e).success,h1=Fn([g4,y4,S_,w_]);Fn([S_,w_]);const gu=Yr.strict(),UQ=ls.extend({requestId:d0.optional(),reason:fe().optional()}),x_=cs.extend({method:rt("notifications/cancelled"),params:UQ}),VQ=Ze({src:fe(),mimeType:fe().optional(),sizes:Ge(fe()).optional(),theme:Li(["light","dark"]).optional()}),$h=Ze({icons:Ge(VQ).optional()}),Vu=Ze({name:fe(),title:fe().optional()}),v4=Vu.extend({...Vu.shape,...$h.shape,version:fe(),websiteUrl:fe().optional(),description:fe().optional()}),qQ=v_(Ze({applyDefaults:In().optional()}),Qn(fe(),Xn())),BQ=h4(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,v_(Ze({form:qQ.optional(),url:Gr.optional()}),Qn(fe(),Xn()).optional())),HQ=Kr({list:Gr.optional(),cancel:Gr.optional(),requests:Kr({sampling:Kr({createMessage:Gr.optional()}).optional(),elicitation:Kr({create:Gr.optional()}).optional()}).optional()}),KQ=Kr({list:Gr.optional(),cancel:Gr.optional(),requests:Kr({tools:Kr({call:Gr.optional()}).optional()}).optional()}),GQ=Ze({experimental:Qn(fe(),Gr).optional(),sampling:Ze({context:Gr.optional(),tools:Gr.optional()}).optional(),elicitation:BQ.optional(),roots:Ze({listChanged:In().optional()}).optional(),tasks:HQ.optional()}),ZQ=Fi.extend({protocolVersion:fe(),capabilities:GQ,clientInfo:v4}),YQ=Zr.extend({method:rt("initialize"),params:ZQ}),WQ=Ze({experimental:Qn(fe(),Gr).optional(),logging:Gr.optional(),completions:Gr.optional(),prompts:Ze({listChanged:In().optional()}).optional(),resources:Ze({subscribe:In().optional(),listChanged:In().optional()}).optional(),tools:Ze({listChanged:In().optional()}).optional(),tasks:KQ.optional()}),b4=Yr.extend({protocolVersion:fe(),capabilities:WQ,serverInfo:v4,instructions:fe().optional()}),S4=cs.extend({method:rt("notifications/initialized"),params:ls.optional()}),XQ=e=>S4.safeParse(e).success,__=Zr.extend({method:rt("ping"),params:Fi.optional()}),QQ=Ze({progress:pn(),total:or(pn()),message:or(fe())}),JQ=Ze({...ls.shape,...QQ.shape,progressToken:p4}),E_=cs.extend({method:rt("notifications/progress"),params:JQ}),eJ=Fi.extend({cursor:m4.optional()}),zh=Zr.extend({params:eJ.optional()}),Lh=Yr.extend({nextCursor:m4.optional()}),tJ=Li(["working","input_required","completed","failed","cancelled"]),Fh=Ze({taskId:fe(),status:tJ,ttl:Fn([pn(),s4()]),createdAt:fe(),lastUpdatedAt:fe(),pollInterval:or(pn()),statusMessage:or(fe())}),ah=Yr.extend({task:Fh}),nJ=ls.merge(Fh),dy=cs.extend({method:rt("notifications/tasks/status"),params:nJ}),C_=Zr.extend({method:rt("tasks/get"),params:Fi.extend({taskId:fe()})}),T_=Yr.merge(Fh),R_=Zr.extend({method:rt("tasks/result"),params:Fi.extend({taskId:fe()})});Yr.loose();const O_=zh.extend({method:rt("tasks/list")}),A_=Lh.extend({tasks:Ge(Fh)}),k_=Zr.extend({method:rt("tasks/cancel"),params:Fi.extend({taskId:fe()})}),rJ=Yr.merge(Fh),w4=Ze({uri:fe(),mimeType:or(fe()),_meta:Qn(fe(),Xn()).optional()}),x4=w4.extend({text:fe()}),M_=fe().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),_4=w4.extend({blob:M_}),Uh=Li(["user","assistant"]),mf=Ze({audience:Ge(Uh).optional(),priority:pn().min(0).max(1).optional(),lastModified:n4({offset:!0}).optional()}),E4=Ze({...Vu.shape,...$h.shape,uri:fe(),description:or(fe()),mimeType:or(fe()),annotations:mf.optional(),_meta:or(Kr({}))}),iJ=Ze({...Vu.shape,...$h.shape,uriTemplate:fe(),description:or(fe()),mimeType:or(fe()),annotations:mf.optional(),_meta:or(Kr({}))}),sJ=zh.extend({method:rt("resources/list")}),C4=Lh.extend({resources:Ge(E4)}),oJ=zh.extend({method:rt("resources/templates/list")}),T4=Lh.extend({resourceTemplates:Ge(iJ)}),j_=Fi.extend({uri:fe()}),aJ=j_,lJ=Zr.extend({method:rt("resources/read"),params:aJ}),R4=Yr.extend({contents:Ge(Fn([x4,_4]))}),O4=cs.extend({method:rt("notifications/resources/list_changed"),params:ls.optional()}),cJ=j_,uJ=Zr.extend({method:rt("resources/subscribe"),params:cJ}),fJ=j_,dJ=Zr.extend({method:rt("resources/unsubscribe"),params:fJ}),hJ=ls.extend({uri:fe()}),pJ=cs.extend({method:rt("notifications/resources/updated"),params:hJ}),mJ=Ze({name:fe(),description:or(fe()),required:or(In())}),gJ=Ze({...Vu.shape,...$h.shape,description:or(fe()),arguments:or(Ge(mJ)),_meta:or(Kr({}))}),yJ=zh.extend({method:rt("prompts/list")}),A4=Lh.extend({prompts:Ge(gJ)}),vJ=Fi.extend({name:fe(),arguments:Qn(fe(),fe()).optional()}),bJ=Zr.extend({method:rt("prompts/get"),params:vJ}),P_=Ze({type:rt("text"),text:fe(),annotations:mf.optional(),_meta:Qn(fe(),Xn()).optional()}),N_=Ze({type:rt("image"),data:M_,mimeType:fe(),annotations:mf.optional(),_meta:Qn(fe(),Xn()).optional()}),D_=Ze({type:rt("audio"),data:M_,mimeType:fe(),annotations:mf.optional(),_meta:Qn(fe(),Xn()).optional()}),SJ=Ze({type:rt("tool_use"),name:fe(),id:fe(),input:Qn(fe(),Xn()),_meta:Qn(fe(),Xn()).optional()}),wJ=Ze({type:rt("resource"),resource:Fn([x4,_4]),annotations:mf.optional(),_meta:Qn(fe(),Xn()).optional()}),xJ=E4.extend({type:rt("resource_link")}),I_=Fn([P_,N_,D_,xJ,wJ]),_J=Ze({role:Uh,content:I_}),k4=Yr.extend({description:fe().optional(),messages:Ge(_J)}),M4=cs.extend({method:rt("notifications/prompts/list_changed"),params:ls.optional()}),EJ=Ze({title:fe().optional(),readOnlyHint:In().optional(),destructiveHint:In().optional(),idempotentHint:In().optional(),openWorldHint:In().optional()}),CJ=Ze({taskSupport:Li(["required","optional","forbidden"]).optional()}),j4=Ze({...Vu.shape,...$h.shape,description:fe().optional(),inputSchema:Ze({type:rt("object"),properties:Qn(fe(),Gr).optional(),required:Ge(fe()).optional()}).catchall(Xn()),outputSchema:Ze({type:rt("object"),properties:Qn(fe(),Gr).optional(),required:Ge(fe()).optional()}).catchall(Xn()).optional(),annotations:EJ.optional(),execution:CJ.optional(),_meta:Qn(fe(),Xn()).optional()}),TJ=zh.extend({method:rt("tools/list")}),P4=Lh.extend({tools:Ge(j4)}),h0=Yr.extend({content:Ge(I_).default([]),structuredContent:Qn(fe(),Xn()).optional(),isError:In().optional()});h0.or(Yr.extend({toolResult:Xn()}));const RJ=Ih.extend({name:fe(),arguments:Qn(fe(),Xn()).optional()}),OJ=Zr.extend({method:rt("tools/call"),params:RJ}),N4=cs.extend({method:rt("notifications/tools/list_changed"),params:ls.optional()}),AJ=Ze({autoRefresh:In().default(!0),debounceMs:pn().int().nonnegative().default(300)}),D4=Li(["debug","info","notice","warning","error","critical","alert","emergency"]),kJ=Fi.extend({level:D4}),MJ=Zr.extend({method:rt("logging/setLevel"),params:kJ}),jJ=ls.extend({level:D4,logger:fe().optional(),data:Xn()}),PJ=cs.extend({method:rt("notifications/message"),params:jJ}),NJ=Ze({name:fe().optional()}),DJ=Ze({hints:Ge(NJ).optional(),costPriority:pn().min(0).max(1).optional(),speedPriority:pn().min(0).max(1).optional(),intelligencePriority:pn().min(0).max(1).optional()}),IJ=Ze({mode:Li(["auto","required","none"]).optional()}),$J=Ze({type:rt("tool_result"),toolUseId:fe().describe("The unique identifier for the corresponding tool call."),content:Ge(I_).default([]),structuredContent:Ze({}).loose().optional(),isError:In().optional(),_meta:Qn(fe(),Xn()).optional()}),zJ=l4("type",[P_,N_,D_]),hy=l4("type",[P_,N_,D_,SJ,$J]),LJ=Ze({role:Uh,content:Fn([hy,Ge(hy)]),_meta:Qn(fe(),Xn()).optional()}),FJ=Ih.extend({messages:Ge(LJ),modelPreferences:DJ.optional(),systemPrompt:fe().optional(),includeContext:Li(["none","thisServer","allServers"]).optional(),temperature:pn().optional(),maxTokens:pn().int(),stopSequences:Ge(fe()).optional(),metadata:Gr.optional(),tools:Ge(j4).optional(),toolChoice:IJ.optional()}),I4=Zr.extend({method:rt("sampling/createMessage"),params:FJ}),$4=Yr.extend({model:fe(),stopReason:or(Li(["endTurn","stopSequence","maxTokens"]).or(fe())),role:Uh,content:zJ}),UJ=Yr.extend({model:fe(),stopReason:or(Li(["endTurn","stopSequence","maxTokens","toolUse"]).or(fe())),role:Uh,content:Fn([hy,Ge(hy)])}),VJ=Ze({type:rt("boolean"),title:fe().optional(),description:fe().optional(),default:In().optional()}),qJ=Ze({type:rt("string"),title:fe().optional(),description:fe().optional(),minLength:pn().optional(),maxLength:pn().optional(),format:Li(["email","uri","date","date-time"]).optional(),default:fe().optional()}),BJ=Ze({type:Li(["number","integer"]),title:fe().optional(),description:fe().optional(),minimum:pn().optional(),maximum:pn().optional(),default:pn().optional()}),HJ=Ze({type:rt("string"),title:fe().optional(),description:fe().optional(),enum:Ge(fe()),default:fe().optional()}),KJ=Ze({type:rt("string"),title:fe().optional(),description:fe().optional(),oneOf:Ge(Ze({const:fe(),title:fe()})),default:fe().optional()}),GJ=Ze({type:rt("string"),title:fe().optional(),description:fe().optional(),enum:Ge(fe()),enumNames:Ge(fe()).optional(),default:fe().optional()}),ZJ=Fn([HJ,KJ]),YJ=Ze({type:rt("array"),title:fe().optional(),description:fe().optional(),minItems:pn().optional(),maxItems:pn().optional(),items:Ze({type:rt("string"),enum:Ge(fe())}),default:Ge(fe()).optional()}),WJ=Ze({type:rt("array"),title:fe().optional(),description:fe().optional(),minItems:pn().optional(),maxItems:pn().optional(),items:Ze({anyOf:Ge(Ze({const:fe(),title:fe()}))}),default:Ge(fe()).optional()}),XJ=Fn([YJ,WJ]),QJ=Fn([GJ,ZJ,XJ]),JJ=Fn([QJ,VJ,qJ,BJ]),eee=Ih.extend({mode:rt("form").optional(),message:fe(),requestedSchema:Ze({type:rt("object"),properties:Qn(fe(),JJ),required:Ge(fe()).optional()})}),tee=Ih.extend({mode:rt("url"),message:fe(),elicitationId:fe(),url:fe().url()}),nee=Fn([eee,tee]),z4=Zr.extend({method:rt("elicitation/create"),params:nee}),ree=ls.extend({elicitationId:fe()}),iee=cs.extend({method:rt("notifications/elicitation/complete"),params:ree}),L4=Yr.extend({action:Li(["accept","decline","cancel"]),content:h4(e=>e===null?void 0:e,Qn(fe(),Fn([fe(),pn(),In(),Ge(fe())])).optional())}),see=Ze({type:rt("ref/resource"),uri:fe()}),oee=Ze({type:rt("ref/prompt"),name:fe()}),aee=Fi.extend({ref:Fn([oee,see]),argument:Ze({name:fe(),value:fe()}),context:Ze({arguments:Qn(fe(),fe()).optional()}).optional()}),lee=Zr.extend({method:rt("completion/complete"),params:aee}),F4=Yr.extend({completion:Kr({values:Ge(fe()).max(100),total:or(pn().int()),hasMore:or(In())})}),cee=Ze({uri:fe().startsWith("file://"),name:fe().optional(),_meta:Qn(fe(),Xn()).optional()}),uee=Zr.extend({method:rt("roots/list"),params:Fi.optional()}),fee=Yr.extend({roots:Ge(cee)}),dee=cs.extend({method:rt("notifications/roots/list_changed"),params:ls.optional()});Fn([__,YQ,lee,MJ,bJ,yJ,sJ,oJ,lJ,uJ,dJ,OJ,TJ,C_,R_,O_,k_]);Fn([x_,E_,S4,dee,dy]);Fn([gu,$4,UJ,L4,fee,T_,A_,ah]);Fn([__,I4,z4,uee,C_,R_,O_,k_]);Fn([x_,E_,PJ,pJ,O4,N4,M4,dy,iee]);Fn([gu,b4,F4,k4,A4,C4,T4,R4,h0,P4,T_,A_,ah]);class dt 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 i=r;if(i.elicitations)return new hee(i.elicitations,n)}return new dt(t,n,r)}}class hee extends dt{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 PA(e){const n=t4(e)?.method;if(!n)throw new Error("Schema is missing a method literal");const r=SX(n);if(typeof r!="string")throw new Error("Schema method literal must be a string");return r}function NA(e,t){const n=Ea(e,t);if(!n.success)throw n.error;return n.data}const pee=6e4;class mee{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(x_,n=>{this._oncancel(n)}),this.setNotificationHandler(E_,n=>{this._onprogress(n)}),this.setRequestHandler(__,n=>({})),this._taskStore=t?.taskStore,this._taskMessageQueue=t?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(C_,async(n,r)=>{const i=await this._taskStore.getTask(n.params.taskId,r.sessionId);if(!i)throw new dt(xt.InvalidParams,"Failed to retrieve task: Task not found");return{...i}}),this.setRequestHandler(R_,async(n,r)=>{const i=async()=>{const o=n.params.taskId;if(this._taskMessageQueue){let c;for(;c=await this._taskMessageQueue.dequeue(o,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 dt(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(o,r.sessionId);if(!l)throw new dt(xt.InvalidParams,`Task not found: ${o}`);if(!kl(l.status))return await this._waitForTaskUpdate(o,r.signal),await i();if(kl(l.status)){const c=await this._taskStore.getTaskResult(o,r.sessionId);return this._clearTaskQueue(o),{...c,_meta:{...c._meta,[$l]:{taskId:o}}}}return await i()};return await i()}),this.setRequestHandler(O_,async(n,r)=>{try{const{tasks:i,nextCursor:o}=await this._taskStore.listTasks(n.params?.cursor,r.sessionId);return{tasks:i,nextCursor:o,_meta:{}}}catch(i){throw new dt(xt.InvalidParams,`Failed to list tasks: ${i instanceof Error?i.message:String(i)}`)}}),this.setRequestHandler(k_,async(n,r)=>{try{const i=await this._taskStore.getTask(n.params.taskId,r.sessionId);if(!i)throw new dt(xt.InvalidParams,`Task not found: ${n.params.taskId}`);if(kl(i.status))throw new dt(xt.InvalidParams,`Cannot cancel task in terminal status: ${i.status}`);await this._taskStore.updateTaskStatus(n.params.taskId,"cancelled","Client cancelled task execution.",r.sessionId),this._clearTaskQueue(n.params.taskId);const o=await this._taskStore.getTask(n.params.taskId,r.sessionId);if(!o)throw new dt(xt.InvalidParams,`Task not found after cancellation: ${n.params.taskId}`);return{_meta:{},...o}}catch(i){throw i instanceof dt?i:new dt(xt.InvalidRequest,`Failed to cancel task: ${i instanceof Error?i.message:String(i)}`)}}))}async _oncancel(t){if(!t.params.requestId)return;this._requestHandlerAbortControllers.get(t.params.requestId)?.abort(t.params.reason)}_setupTimeout(t,n,r,i,o=!1){this._timeoutInfo.set(t,{timeoutId:setTimeout(i,n),startTime:Date.now(),timeout:n,maxTotalTimeout:r,resetTimeoutOnProgress:o,onTimeout:i})}_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),dt.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=o=>{r?.(o),this._onerror(o)};const i=this._transport?.onmessage;this._transport.onmessage=(o,l)=>{i?.(o,l),kd(o)||FQ(o)?this._onresponse(o):hw(o)?this._onrequest(o,l):LQ(o)?this._onnotification(o):this._onerror(new Error(`Unknown message type: ${JSON.stringify(o)}`))},await this._transport.start()}_onclose(){const t=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();const n=dt.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,i=this._transport,o=t.params?._meta?.[$l]?.taskId;if(r===void 0){const h={jsonrpc:"2.0",id:t.id,error:{code:xt.MethodNotFound,message:"Method not found"}};o&&this._taskMessageQueue?this._enqueueTaskMessage(o,{type:"error",message:h,timestamp:Date.now()},i?.sessionId).catch(p=>this._onerror(new Error(`Failed to enqueue error response: ${p}`))):i?.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=zQ(t.params)?t.params.task:void 0,u=this._taskStore?this.requestTaskStore(t,i?.sessionId):void 0,d={signal:l.signal,sessionId:i?.sessionId,_meta:t.params?._meta,sendNotification:async h=>{const p={relatedRequestId:t.id};o&&(p.relatedTask={taskId:o}),await this.notification(h,p)},sendRequest:async(h,p,g)=>{const S={...g,relatedRequestId:t.id};o&&!S.relatedTask&&(S.relatedTask={taskId:o});const y=S.relatedTask?.taskId??o;return y&&u&&await u.updateTaskStatus(y,"input_required"),await this.request(h,p,S)},authInfo:n?.authInfo,requestId:t.id,requestInfo:n?.requestInfo,taskId:o,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};o&&this._taskMessageQueue?await this._enqueueTaskMessage(o,{type:"response",message:p,timestamp:Date.now()},i?.sessionId):await i?.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}}};o&&this._taskMessageQueue?await this._enqueueTaskMessage(o,{type:"error",message:p,timestamp:Date.now()},i?.sessionId):await i?.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,i=Number(n),o=this._progressHandlers.get(i);if(!o){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(t)}`));return}const l=this._responseHandlers.get(i),c=this._timeoutInfo.get(i);if(c&&l&&c.resetTimeoutOnProgress)try{this._resetTimeout(i)}catch(u){this._responseHandlers.delete(i),this._progressHandlers.delete(i),this._cleanupTimeout(i),l(u);return}o(r)}_onresponse(t){const n=Number(t.id),r=this._requestResolvers.get(n);if(r){if(this._requestResolvers.delete(n),kd(t))r(t);else{const l=new dt(t.error.code,t.error.message,t.error.data);r(l)}return}const i=this._responseHandlers.get(n);if(i===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 o=!1;if(kd(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"&&(o=!0,this._taskProgressTokens.set(c.taskId,n))}}if(o||this._progressHandlers.delete(n),kd(t))i(t);else{const l=dt.fromError(t.error.code,t.error.message,t.error.data);i(l)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(t,n,r){const{task:i}=r??{};if(!i){try{yield{type:"result",result:await this.request(t,n,r)}}catch(l){yield{type:"error",error:l instanceof dt?l:new dt(xt.InternalError,String(l))}}return}let o;try{const l=await this.request(t,ah,r);if(l.task)o=l.task.taskId,yield{type:"taskCreated",task:l.task};else throw new dt(xt.InternalError,"Task creation did not return a task");for(;;){const c=await this.getTask({taskId:o},r);if(yield{type:"taskStatus",task:c},kl(c.status)){c.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:o},n,r)}:c.status==="failed"?yield{type:"error",error:new dt(xt.InternalError,`Task ${o} failed`)}:c.status==="cancelled"&&(yield{type:"error",error:new dt(xt.InternalError,`Task ${o} was cancelled`)});return}if(c.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:o},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 dt?l:new dt(xt.InternalError,String(l))}}}request(t,n,r){const{relatedRequestId:i,resumptionToken:o,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++,S={...t,jsonrpc:"2.0",id:g};r?.onprogress&&(this._progressHandlers.set(g,r.onprogress),S.params={...t.params,_meta:{...t.params?._meta||{},progressToken:g}}),c&&(S.params={...S.params,task:c}),u&&(S.params={...S.params,_meta:{...S.params?._meta||{},[$l]:u}});const y=v=>{this._responseHandlers.delete(g),this._progressHandlers.delete(g),this._cleanupTimeout(g),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:g,reason:String(v)}},{relatedRequestId:i,resumptionToken:o,onresumptiontoken:l}).catch(b=>this._onerror(new Error(`Failed to send cancellation: ${b}`)));const E=v instanceof dt?v:new dt(xt.RequestTimeout,String(v));h(E)};this._responseHandlers.set(g,v=>{if(!r?.signal?.aborted){if(v instanceof Error)return h(v);try{const E=Ea(n,v.result);E.success?d(E.data):h(E.error)}catch(E){h(E)}}}),r?.signal?.addEventListener("abort",()=>{y(r?.signal?.reason)});const C=r?.timeout??pee,x=()=>y(dt.fromError(xt.RequestTimeout,"Request timed out",{timeout:C}));this._setupTimeout(g,C,r?.maxTotalTimeout,x,r?.resetTimeoutOnProgress??!1);const w=u?.taskId;if(w){const v=E=>{const b=this._responseHandlers.get(g);b?b(E):this._onerror(new Error(`Response handler missing for side-channeled request ${g}`))};this._requestResolvers.set(g,v),this._enqueueTaskMessage(w,{type:"request",message:S,timestamp:Date.now()}).catch(E=>{this._cleanupTimeout(g),h(E)})}else this._transport.send(S,{relatedRequestId:i,resumptionToken:o,onresumptiontoken:l}).catch(v=>{this._cleanupTimeout(g),h(v)})})}async getTask(t,n){return this.request({method:"tasks/get",params:t},T_,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},A_,n)}async cancelTask(t,n){return this.request({method:"tasks/cancel",params:t},rJ,n)}async notification(t,n){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(t.method);const r=n?.relatedTask?.taskId;if(r){const c={...t,jsonrpc:"2.0",params:{...t.params,_meta:{...t.params?._meta||{},[$l]:n.relatedTask}}};await this._enqueueTaskMessage(r,{type:"notification",message:c,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&!n?.relatedRequestId&&!n?.relatedTask){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(t.method),!this._transport)return;let c={...t,jsonrpc:"2.0"};n?.relatedTask&&(c={...c,params:{...c.params,_meta:{...c.params?._meta||{},[$l]:n.relatedTask}}}),this._transport?.send(c,n).catch(u=>this._onerror(u))});return}let l={...t,jsonrpc:"2.0"};n?.relatedTask&&(l={...l,params:{...l.params,_meta:{...l.params?._meta||{},[$l]:n.relatedTask}}}),await this._transport.send(l,n)}setRequestHandler(t,n){const r=PA(t);this.assertRequestHandlerCapability(r),this._requestHandlers.set(r,(i,o)=>{const l=NA(t,i);return Promise.resolve(n(l,o))})}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=PA(t);this._notificationHandlers.set(r,i=>{const o=NA(t,i);return Promise.resolve(n(o))})}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 i=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(t,n,r,i)}async _clearTaskQueue(t,n){if(this._taskMessageQueue){const r=await this._taskMessageQueue.dequeueAll(t,n);for(const i of r)if(i.type==="request"&&hw(i.message)){const o=i.message.id,l=this._requestResolvers.get(o);l?(l(new dt(xt.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(o)):this._onerror(new Error(`Resolver missing for request ${o} during task ${t} cleanup`))}}}async _waitForTaskUpdate(t,n){let r=this._options?.defaultTaskPollInterval??1e3;try{const i=await this._taskStore?.getTask(t);i?.pollInterval&&(r=i.pollInterval)}catch{}return new Promise((i,o)=>{if(n.aborted){o(new dt(xt.InvalidRequest,"Request cancelled"));return}const l=setTimeout(i,r);n.addEventListener("abort",()=>{clearTimeout(l),o(new dt(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 i=>{if(!t)throw new Error("No request provided");return await r.createTask(i,t.id,{method:t.method,params:t.params},n)},getTask:async i=>{const o=await r.getTask(i,n);if(!o)throw new dt(xt.InvalidParams,"Failed to retrieve task: Task not found");return o},storeTaskResult:async(i,o,l)=>{await r.storeTaskResult(i,o,l,n);const c=await r.getTask(i,n);if(c){const u=dy.parse({method:"notifications/tasks/status",params:c});await this.notification(u),kl(c.status)&&this._cleanupTaskProgressHandler(i)}},getTaskResult:i=>r.getTaskResult(i,n),updateTaskStatus:async(i,o,l)=>{const c=await r.getTask(i,n);if(!c)throw new dt(xt.InvalidParams,`Task "${i}" not found - it may have been cleaned up`);if(kl(c.status))throw new dt(xt.InvalidParams,`Cannot update task "${i}" from terminal status "${c.status}" to "${o}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await r.updateTaskStatus(i,o,l,n);const u=await r.getTask(i,n);if(u){const d=dy.parse({method:"notifications/tasks/status",params:u});await this.notification(d),kl(u.status)&&this._cleanupTaskProgressHandler(i)}},listTasks:i=>r.listTasks(i,n)}}}function DA(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function gee(e,t){const n={...e};for(const r in t){const i=r,o=t[i];if(o===void 0)continue;const l=n[i];DA(l)&&DA(o)?n[i]={...l,...o}:n[i]=o}return n}var xm={exports:{}},p1={},_o={},Ml={},m1={},g1={},y1={},IA;function py(){return IA||(IA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends t{constructor(v){if(super(),!e.IDENTIFIER.test(v))throw new Error("CodeGen: name must be a valid identifier");this.str=v}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=n;class r extends t{constructor(v){super(),this._items=typeof v=="string"?[v]:v}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const v=this._items[0];return v===""||v==='""'}get str(){var v;return(v=this._str)!==null&&v!==void 0?v:this._str=this._items.reduce((E,b)=>`${E}${b}`,"")}get names(){var v;return(v=this._names)!==null&&v!==void 0?v:this._names=this._items.reduce((E,b)=>(b instanceof n&&(E[b.str]=(E[b.str]||0)+1),E),{})}}e._Code=r,e.nil=new r("");function i(w,...v){const E=[w[0]];let b=0;for(;b<v.length;)c(E,v[b]),E.push(w[++b]);return new r(E)}e._=i;const o=new r("+");function l(w,...v){const E=[S(w[0])];let b=0;for(;b<v.length;)E.push(o),c(E,v[b]),E.push(o,S(w[++b]));return u(E),new r(E)}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]===o){const E=d(w[v-1],w[v+1]);if(E!==void 0){w.splice(v-1,3,E);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:S(Array.isArray(w)?w.join(","):w)}function g(w){return new r(S(w))}e.stringify=g;function S(w){return JSON.stringify(w).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=S;function y(w){return typeof w=="string"&&e.IDENTIFIER.test(w)?new r(`.${w}`):i`[${w}]`}e.getProperty=y;function C(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=C;function x(w){return new r(w.toString())}e.regexpCode=x})(y1)),y1}var v1={},$A;function zA(){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=py();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 i{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=i;class o 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=o;const l=(0,t._)`\n`;class c extends i{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 o(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:S}=g,y=(p=h.key)!==null&&p!==void 0?p:h.ref;let C=this._values[S];if(C){const v=C.get(y);if(v)return v}else C=this._values[S]=new Map;C.set(y,g);const x=this._scope[S]||(this._scope[S]=[]),w=x.length;return x[w]=h.ref,g.setValue(h,{property:S,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 S=t.nil;for(const y in d){const C=d[y];if(!C)continue;const x=p[y]=p[y]||new Map;C.forEach(w=>{if(x.has(w))return;x.set(w,r.Started);let v=h(w);if(v){const E=this.opts.es5?e.varKinds.var:e.varKinds.const;S=(0,t._)`${S}${E} ${w} = ${v};${this.opts._n}`}else if(v=g?.(w))S=(0,t._)`${S}${v}${this.opts._n}`;else throw new n(w);x.set(w,r.Completed)})}return S}}e.ValueScope=c})(v1)),v1}var LA;function Rt(){return LA||(LA=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=py(),n=zA();var r=py();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 i=zA();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return i.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 o{optimizeNodes(){return this}optimizeNames(N,U){return this}}class l extends o{constructor(N,U,J){super(),this.varKind=N,this.name=U,this.rhs=J}render({es5:N,_n:U}){const J=N?n.varKinds.var:this.varKind,ne=this.rhs===void 0?"":` = ${this.rhs}`;return`${J} ${this.name}${ne};`+U}optimizeNames(N,U){if(N[this.name.str])return this.rhs&&(this.rhs=te(this.rhs,N,U)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class c extends o{constructor(N,U,J){super(),this.lhs=N,this.rhs=U,this.sideEffects=J}render({_n:N}){return`${this.lhs} = ${this.rhs};`+N}optimizeNames(N,U){if(!(this.lhs instanceof t.Name&&!N[this.lhs.str]&&!this.sideEffects))return this.rhs=te(this.rhs,N,U),this}get names(){const N=this.lhs instanceof t.Name?{}:{...this.lhs.names};return Z(N,this.rhs)}}class u extends c{constructor(N,U,J,ne){super(N,J,ne),this.op=U}render({_n:N}){return`${this.lhs} ${this.op}= ${this.rhs};`+N}}class d extends o{constructor(N){super(),this.label=N,this.names={}}render({_n:N}){return`${this.label}:`+N}}class h extends o{constructor(N){super(),this.label=N,this.names={}}render({_n:N}){return`break${this.label?` ${this.label}`:""};`+N}}class p extends o{constructor(N){super(),this.error=N}render({_n:N}){return`throw ${this.error};`+N}get names(){return this.error.names}}class g extends o{constructor(N){super(),this.code=N}render({_n:N}){return`${this.code};`+N}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(N,U){return this.code=te(this.code,N,U),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class S extends o{constructor(N=[]){super(),this.nodes=N}render(N){return this.nodes.reduce((U,J)=>U+J.render(N),"")}optimizeNodes(){const{nodes:N}=this;let U=N.length;for(;U--;){const J=N[U].optimizeNodes();Array.isArray(J)?N.splice(U,1,...J):J?N[U]=J:N.splice(U,1)}return N.length>0?this:void 0}optimizeNames(N,U){const{nodes:J}=this;let ne=J.length;for(;ne--;){const se=J[ne];se.optimizeNames(N,U)||(ee(N,se.names),J.splice(ne,1))}return J.length>0?this:void 0}get names(){return this.nodes.reduce((N,U)=>q(N,U.names),{})}}class y extends S{render(N){return"{"+N._n+super.render(N)+"}"+N._n}}class C extends S{}class x extends y{}x.kind="else";class w extends y{constructor(N,U){super(U),this.condition=N}render(N){let U=`if(${this.condition})`+super.render(N);return this.else&&(U+="else "+this.else.render(N)),U}optimizeNodes(){super.optimizeNodes();const N=this.condition;if(N===!0)return this.nodes;let U=this.else;if(U){const J=U.optimizeNodes();U=this.else=Array.isArray(J)?new x(J):J}if(U)return N===!1?U instanceof w?U:U.nodes:this.nodes.length?this:new w(G(N),U instanceof w?[U]:U.nodes);if(!(N===!1||!this.nodes.length))return this}optimizeNames(N,U){var J;if(this.else=(J=this.else)===null||J===void 0?void 0:J.optimizeNames(N,U),!!(super.optimizeNames(N,U)||this.else))return this.condition=te(this.condition,N,U),this}get names(){const N=super.names;return Z(N,this.condition),this.else&&q(N,this.else.names),N}}w.kind="if";class v extends y{}v.kind="for";class E extends v{constructor(N){super(),this.iteration=N}render(N){return`for(${this.iteration})`+super.render(N)}optimizeNames(N,U){if(super.optimizeNames(N,U))return this.iteration=te(this.iteration,N,U),this}get names(){return q(super.names,this.iteration.names)}}class b extends v{constructor(N,U,J,ne){super(),this.varKind=N,this.name=U,this.from=J,this.to=ne}render(N){const U=N.es5?n.varKinds.var:this.varKind,{name:J,from:ne,to:se}=this;return`for(${U} ${J}=${ne}; ${J}<${se}; ${J}++)`+super.render(N)}get names(){const N=Z(super.names,this.from);return Z(N,this.to)}}class T extends v{constructor(N,U,J,ne){super(),this.loop=N,this.varKind=U,this.name=J,this.iterable=ne}render(N){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(N)}optimizeNames(N,U){if(super.optimizeNames(N,U))return this.iterable=te(this.iterable,N,U),this}get names(){return q(super.names,this.iterable.names)}}class _ extends y{constructor(N,U,J){super(),this.name=N,this.args=U,this.async=J}render(N){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(N)}}_.kind="func";class O extends S{render(N){return"return "+super.render(N)}}O.kind="return";class M extends y{render(N){let U="try"+super.render(N);return this.catch&&(U+=this.catch.render(N)),this.finally&&(U+=this.finally.render(N)),U}optimizeNodes(){var N,U;return super.optimizeNodes(),(N=this.catch)===null||N===void 0||N.optimizeNodes(),(U=this.finally)===null||U===void 0||U.optimizeNodes(),this}optimizeNames(N,U){var J,ne;return super.optimizeNames(N,U),(J=this.catch)===null||J===void 0||J.optimizeNames(N,U),(ne=this.finally)===null||ne===void 0||ne.optimizeNames(N,U),this}get names(){const N=super.names;return this.catch&&q(N,this.catch.names),this.finally&&q(N,this.finally.names),N}}class P extends y{constructor(N){super(),this.error=N}render(N){return`catch(${this.error})`+super.render(N)}}P.kind="catch";class z extends y{render(N){return"finally"+super.render(N)}}z.kind="finally";class L{constructor(N,U={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...U,_n:U.lines?`
32
- `:""},this._extScope=N,this._scope=new n.Scope({parent:N}),this._nodes=[new C]}toString(){return this._root.render(this.opts)}name(N){return this._scope.name(N)}scopeName(N){return this._extScope.name(N)}scopeValue(N,U){const J=this._extScope.value(N,U);return(this._values[J.prefix]||(this._values[J.prefix]=new Set)).add(J),J}getScopeValue(N,U){return this._extScope.getValue(N,U)}scopeRefs(N){return this._extScope.scopeRefs(N,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(N,U,J,ne){const se=this._scope.toName(U);return J!==void 0&&ne&&(this._constants[se.str]=J),this._leafNode(new l(N,se,J)),se}const(N,U,J){return this._def(n.varKinds.const,N,U,J)}let(N,U,J){return this._def(n.varKinds.let,N,U,J)}var(N,U,J){return this._def(n.varKinds.var,N,U,J)}assign(N,U,J){return this._leafNode(new c(N,U,J))}add(N,U){return this._leafNode(new u(N,e.operators.ADD,U))}code(N){return typeof N=="function"?N():N!==t.nil&&this._leafNode(new g(N)),this}object(...N){const U=["{"];for(const[J,ne]of N)U.length>1&&U.push(","),U.push(J),(J!==ne||this.opts.es5)&&(U.push(":"),(0,t.addCodeArg)(U,ne));return U.push("}"),new t._Code(U)}if(N,U,J){if(this._blockNode(new w(N)),U&&J)this.code(U).else().code(J).endIf();else if(U)this.code(U).endIf();else if(J)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(N){return this._elseNode(new w(N))}else(){return this._elseNode(new x)}endIf(){return this._endBlockNode(w,x)}_for(N,U){return this._blockNode(N),U&&this.code(U).endFor(),this}for(N,U){return this._for(new E(N),U)}forRange(N,U,J,ne,se=this.opts.es5?n.varKinds.var:n.varKinds.let){const he=this._scope.toName(N);return this._for(new b(se,he,U,J),()=>ne(he))}forOf(N,U,J,ne=n.varKinds.const){const se=this._scope.toName(N);if(this.opts.es5){const he=U instanceof t.Name?U:this.var("_arr",U);return this.forRange("_i",0,(0,t._)`${he}.length`,Ee=>{this.var(se,(0,t._)`${he}[${Ee}]`),J(se)})}return this._for(new T("of",ne,se,U),()=>J(se))}forIn(N,U,J,ne=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(N,(0,t._)`Object.keys(${U})`,J);const se=this._scope.toName(N);return this._for(new T("in",ne,se,U),()=>J(se))}endFor(){return this._endBlockNode(v)}label(N){return this._leafNode(new d(N))}break(N){return this._leafNode(new h(N))}return(N){const U=new O;if(this._blockNode(U),this.code(N),U.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(O)}try(N,U,J){if(!U&&!J)throw new Error('CodeGen: "try" without "catch" and "finally"');const ne=new M;if(this._blockNode(ne),this.code(N),U){const se=this.name("e");this._currNode=ne.catch=new P(se),U(se)}return J&&(this._currNode=ne.finally=new z,this.code(J)),this._endBlockNode(P,z)}throw(N){return this._leafNode(new p(N))}block(N,U){return this._blockStarts.push(this._nodes.length),N&&this.code(N).endBlock(U),this}endBlock(N){const U=this._blockStarts.pop();if(U===void 0)throw new Error("CodeGen: not in self-balancing block");const J=this._nodes.length-U;if(J<0||N!==void 0&&J!==N)throw new Error(`CodeGen: wrong number of nodes: ${J} vs ${N} expected`);return this._nodes.length=U,this}func(N,U=t.nil,J,ne){return this._blockNode(new _(N,U,J)),ne&&this.code(ne).endFunc(),this}endFunc(){return this._endBlockNode(_)}optimize(N=1){for(;N-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(N){return this._currNode.nodes.push(N),this}_blockNode(N){this._currNode.nodes.push(N),this._nodes.push(N)}_endBlockNode(N,U){const J=this._currNode;if(J instanceof N||U&&J instanceof U)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${U?`${N.kind}/${U.kind}`:N.kind}"`)}_elseNode(N){const U=this._currNode;if(!(U instanceof w))throw new Error('CodeGen: "else" without "if"');return this._currNode=U.else=N,this}get _root(){return this._nodes[0]}get _currNode(){const N=this._nodes;return N[N.length-1]}set _currNode(N){const U=this._nodes;U[U.length-1]=N}}e.CodeGen=L;function q($,N){for(const U in N)$[U]=($[U]||0)+(N[U]||0);return $}function Z($,N){return N instanceof t._CodeOrName?q($,N.names):$}function te($,N,U){if($ instanceof t.Name)return J($);if(!ne($))return $;return new t._Code($._items.reduce((se,he)=>(he instanceof t.Name&&(he=J(he)),he instanceof t._Code?se.push(...he._items):se.push(he),se),[]));function J(se){const he=U[se.str];return he===void 0||N[se.str]!==1?se:(delete N[se.str],he)}function ne(se){return se instanceof t._Code&&se._items.some(he=>he instanceof t.Name&&N[he.str]===1&&U[he.str]!==void 0)}}function ee($,N){for(const U in N)$[U]=($[U]||0)-(N[U]||0)}function G($){return typeof $=="boolean"||typeof $=="number"||$===null?!$:(0,t._)`!${B($)}`}e.not=G;const H=I(e.operators.AND);function Y(...$){return $.reduce(H)}e.and=Y;const oe=I(e.operators.OR);function re(...$){return $.reduce(oe)}e.or=re;function I($){return(N,U)=>N===t.nil?U:U===t.nil?N:(0,t._)`${B(N)} ${$} ${B(U)}`}function B($){return $ instanceof t.Name?$:(0,t._)`(${$})`}})(g1)),g1}var kt={},FA;function sn(){if(FA)return kt;FA=1,Object.defineProperty(kt,"__esModule",{value:!0}),kt.checkStrictMode=kt.getErrorPath=kt.Type=kt.useFunc=kt.setEvaluated=kt.evaluatedPropsToName=kt.mergeEvaluated=kt.eachItem=kt.unescapeJsonPointer=kt.escapeJsonPointer=kt.escapeFragment=kt.unescapeFragment=kt.schemaRefOrVal=kt.schemaHasRulesButRef=kt.schemaHasRules=kt.checkUnknownRules=kt.alwaysValidSchema=kt.toHash=void 0;const e=Rt(),t=py();function n(T){const _={};for(const O of T)_[O]=!0;return _}kt.toHash=n;function r(T,_){return typeof _=="boolean"?_:Object.keys(_).length===0?!0:(i(T,_),!o(_,T.self.RULES.all))}kt.alwaysValidSchema=r;function i(T,_=T.schema){const{opts:O,self:M}=T;if(!O.strictSchema||typeof _=="boolean")return;const P=M.RULES.keywords;for(const z in _)P[z]||b(T,`unknown keyword: "${z}"`)}kt.checkUnknownRules=i;function o(T,_){if(typeof T=="boolean")return!T;for(const O in T)if(_[O])return!0;return!1}kt.schemaHasRules=o;function l(T,_){if(typeof T=="boolean")return!T;for(const O in T)if(O!=="$ref"&&_.all[O])return!0;return!1}kt.schemaHasRulesButRef=l;function c({topSchemaRef:T,schemaPath:_},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}${_}${(0,e.getProperty)(M)}`}kt.schemaRefOrVal=c;function u(T){return p(decodeURIComponent(T))}kt.unescapeFragment=u;function d(T){return encodeURIComponent(h(T))}kt.escapeFragment=d;function h(T){return typeof T=="number"?`${T}`:T.replace(/~/g,"~0").replace(/\//g,"~1")}kt.escapeJsonPointer=h;function p(T){return T.replace(/~1/g,"/").replace(/~0/g,"~")}kt.unescapeJsonPointer=p;function g(T,_){if(Array.isArray(T))for(const O of T)_(O);else _(T)}kt.eachItem=g;function S({mergeNames:T,mergeToName:_,mergeValues:O,resultToName:M}){return(P,z,L,q)=>{const Z=L===void 0?z:L instanceof e.Name?(z instanceof e.Name?T(P,z,L):_(P,z,L),L):z instanceof e.Name?(_(P,L,z),z):O(z,L);return q===e.Name&&!(Z instanceof e.Name)?M(P,Z):Z}}kt.mergeEvaluated={props:S({mergeNames:(T,_,O)=>T.if((0,e._)`${O} !== true && ${_} !== undefined`,()=>{T.if((0,e._)`${_} === true`,()=>T.assign(O,!0),()=>T.assign(O,(0,e._)`${O} || {}`).code((0,e._)`Object.assign(${O}, ${_})`))}),mergeToName:(T,_,O)=>T.if((0,e._)`${O} !== true`,()=>{_===!0?T.assign(O,!0):(T.assign(O,(0,e._)`${O} || {}`),C(T,O,_))}),mergeValues:(T,_)=>T===!0?!0:{...T,..._},resultToName:y}),items:S({mergeNames:(T,_,O)=>T.if((0,e._)`${O} !== true && ${_} !== undefined`,()=>T.assign(O,(0,e._)`${_} === true ? true : ${O} > ${_} ? ${O} : ${_}`)),mergeToName:(T,_,O)=>T.if((0,e._)`${O} !== true`,()=>T.assign(O,_===!0?!0:(0,e._)`${O} > ${_} ? ${O} : ${_}`)),mergeValues:(T,_)=>T===!0?!0:Math.max(T,_),resultToName:(T,_)=>T.var("items",_)})};function y(T,_){if(_===!0)return T.var("props",!0);const O=T.var("props",(0,e._)`{}`);return _!==void 0&&C(T,O,_),O}kt.evaluatedPropsToName=y;function C(T,_,O){Object.keys(O).forEach(M=>T.assign((0,e._)`${_}${(0,e.getProperty)(M)}`,!0))}kt.setEvaluated=C;const x={};function w(T,_){return T.scopeValue("func",{ref:_,code:x[_.code]||(x[_.code]=new t._Code(_.code))})}kt.useFunc=w;var v;(function(T){T[T.Num=0]="Num",T[T.Str=1]="Str"})(v||(kt.Type=v={}));function E(T,_,O){if(T instanceof e.Name){const M=_===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)}kt.getErrorPath=E;function b(T,_,O=T.opts.strictSchema){if(O){if(_=`strict mode: ${_}`,O===!0)throw new Error(_);T.self.logger.warn(_)}}return kt.checkStrictMode=b,kt}var _m={},UA;function Qa(){if(UA)return _m;UA=1,Object.defineProperty(_m,"__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 _m.default=t,_m}var VA;function p0(){return VA||(VA=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=sn(),r=Qa();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 i(x,w=e.keywordError,v,E){const{it:b}=x,{gen:T,compositeRule:_,allErrors:O}=b,M=p(x,w,v);E??(_||O)?u(T,M):d(b,(0,t._)`[${M}]`)}e.reportError=i;function o(x,w=e.keywordError,v){const{it:E}=x,{gen:b,compositeRule:T,allErrors:_}=E,O=p(x,w,v);u(b,O),T||_||d(E,r.default.vErrors)}e.reportExtraError=o;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:E,errsCount:b,it:T}){if(b===void 0)throw new Error("ajv implementation error");const _=x.name("err");x.forRange("i",b,r.default.errors,O=>{x.const(_,(0,t._)`${r.default.vErrors}[${O}]`),x.if((0,t._)`${_}.instancePath === undefined`,()=>x.assign((0,t._)`${_}.instancePath`,(0,t.strConcat)(r.default.instancePath,T.errorPath))),x.assign((0,t._)`${_}.schemaPath`,(0,t.str)`${T.errSchemaPath}/${w}`),T.opts.verbose&&(x.assign((0,t._)`${_}.schema`,v),x.assign((0,t._)`${_}.data`,E))})}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:E,schemaEnv:b}=x;b.$async?v.throw((0,t._)`new ${x.ValidationError}(${w})`):(v.assign((0,t._)`${E}.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:E}=x.it;return E===!1?(0,t._)`{}`:g(x,w,v)}function g(x,w,v={}){const{gen:E,it:b}=x,T=[S(b,v),y(x,v)];return C(x,w,T),E.object(...T)}function S({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:E}){let b=E?w:(0,t.str)`${w}/${x}`;return v&&(b=(0,t.str)`${b}${(0,n.getErrorPath)(v,n.Type.Str)}`),[h.schemaPath,b]}function C(x,{params:w,message:v},E){const{keyword:b,data:T,schemaValue:_,it:O}=x,{opts:M,propertyName:P,topSchemaRef:z,schemaPath:L}=O;E.push([h.keyword,b],[h.params,typeof w=="function"?w(x):w||(0,t._)`{}`]),M.messages&&E.push([h.message,typeof v=="function"?v(x):v]),M.verbose&&E.push([h.schema,_],[h.parentSchema,(0,t._)`${z}${L}`],[r.default.data,T]),P&&E.push([h.propertyName,P])}})(m1)),m1}var qA;function yee(){if(qA)return Ml;qA=1,Object.defineProperty(Ml,"__esModule",{value:!0}),Ml.boolOrEmptySchema=Ml.topBoolOrEmptySchema=void 0;const e=p0(),t=Rt(),n=Qa(),r={message:"boolean schema is false"};function i(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=i;function o(c,u){const{gen:d,schema:h}=c;h===!1?(d.var(u,!1),l(c)):d.var(u,!0)}Ml.boolOrEmptySchema=o;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 Fr={},jl={},BA;function U4(){if(BA)return jl;BA=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(i){return typeof i=="string"&&t.has(i)}jl.isJSONType=n;function r(){const i={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...i,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},i.number,i.string,i.array,i.object],post:{rules:[]},all:{},keywords:{}}}return jl.getRules=r,jl}var Eo={},HA;function V4(){if(HA)return Eo;HA=1,Object.defineProperty(Eo,"__esModule",{value:!0}),Eo.shouldUseRule=Eo.shouldUseGroup=Eo.schemaHasRulesForType=void 0;function e({schema:r,self:i},o){const l=i.RULES.types[o];return l&&l!==!0&&t(r,l)}Eo.schemaHasRulesForType=e;function t(r,i){return i.rules.some(o=>n(r,o))}Eo.shouldUseGroup=t;function n(r,i){var o;return r[i.keyword]!==void 0||((o=i.definition.implements)===null||o===void 0?void 0:o.some(l=>r[l]!==void 0))}return Eo.shouldUseRule=n,Eo}var KA;function my(){if(KA)return Fr;KA=1,Object.defineProperty(Fr,"__esModule",{value:!0}),Fr.reportTypeError=Fr.checkDataTypes=Fr.checkDataType=Fr.coerceAndCheckDataType=Fr.getJSONTypes=Fr.getSchemaTypes=Fr.DataType=void 0;const e=U4(),t=V4(),n=p0(),r=Rt(),i=sn();var o;(function(v){v[v.Correct=0]="Correct",v[v.Wrong=1]="Wrong"})(o||(Fr.DataType=o={}));function l(v){const E=c(v.type);if(E.includes("null")){if(v.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!E.length&&v.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');v.nullable===!0&&E.push("null")}return E}Fr.getSchemaTypes=l;function c(v){const E=Array.isArray(v)?v:v?[v]:[];if(E.every(e.isJSONType))return E;throw new Error("type must be JSONType or JSONType[]: "+E.join(","))}Fr.getJSONTypes=c;function u(v,E){const{gen:b,data:T,opts:_}=v,O=h(E,_.coerceTypes),M=E.length>0&&!(O.length===0&&E.length===1&&(0,t.schemaHasRulesForType)(v,E[0]));if(M){const P=y(E,T,_.strictNumbers,o.Wrong);b.if(P,()=>{O.length?p(v,E,O):x(v)})}return M}Fr.coerceAndCheckDataType=u;const d=new Set(["string","number","integer","boolean","null"]);function h(v,E){return E?v.filter(b=>d.has(b)||E==="array"&&b==="array"):[]}function p(v,E,b){const{gen:T,data:_,opts:O}=v,M=T.let("dataType",(0,r._)`typeof ${_}`),P=T.let("coerced",(0,r._)`undefined`);O.coerceTypes==="array"&&T.if((0,r._)`${M} == 'object' && Array.isArray(${_}) && ${_}.length == 1`,()=>T.assign(_,(0,r._)`${_}[0]`).assign(M,(0,r._)`typeof ${_}`).if(y(E,_,O.strictNumbers),()=>T.assign(P,_))),T.if((0,r._)`${P} !== undefined`);for(const L of b)(d.has(L)||L==="array"&&O.coerceTypes==="array")&&z(L);T.else(),x(v),T.endIf(),T.if((0,r._)`${P} !== undefined`,()=>{T.assign(_,P),g(v,P)});function z(L){switch(L){case"string":T.elseIf((0,r._)`${M} == "number" || ${M} == "boolean"`).assign(P,(0,r._)`"" + ${_}`).elseIf((0,r._)`${_} === null`).assign(P,(0,r._)`""`);return;case"number":T.elseIf((0,r._)`${M} == "boolean" || ${_} === null
33
- || (${M} == "string" && ${_} && ${_} == +${_})`).assign(P,(0,r._)`+${_}`);return;case"integer":T.elseIf((0,r._)`${M} === "boolean" || ${_} === null
34
- || (${M} === "string" && ${_} && ${_} == +${_} && !(${_} % 1))`).assign(P,(0,r._)`+${_}`);return;case"boolean":T.elseIf((0,r._)`${_} === "false" || ${_} === 0 || ${_} === null`).assign(P,!1).elseIf((0,r._)`${_} === "true" || ${_} === 1`).assign(P,!0);return;case"null":T.elseIf((0,r._)`${_} === "" || ${_} === 0 || ${_} === false`),T.assign(P,null);return;case"array":T.elseIf((0,r._)`${M} === "string" || ${M} === "number"
35
- || ${M} === "boolean" || ${_} === null`).assign(P,(0,r._)`[${_}]`)}}}function g({gen:v,parentData:E,parentDataProperty:b},T){v.if((0,r._)`${E} !== undefined`,()=>v.assign((0,r._)`${E}[${b}]`,T))}function S(v,E,b,T=o.Correct){const _=T===o.Correct?r.operators.EQ:r.operators.NEQ;let O;switch(v){case"null":return(0,r._)`${E} ${_} null`;case"array":O=(0,r._)`Array.isArray(${E})`;break;case"object":O=(0,r._)`${E} && typeof ${E} == "object" && !Array.isArray(${E})`;break;case"integer":O=M((0,r._)`!(${E} % 1) && !isNaN(${E})`);break;case"number":O=M();break;default:return(0,r._)`typeof ${E} ${_} ${v}`}return T===o.Correct?O:(0,r.not)(O);function M(P=r.nil){return(0,r.and)((0,r._)`typeof ${E} == "number"`,P,b?(0,r._)`isFinite(${E})`:r.nil)}}Fr.checkDataType=S;function y(v,E,b,T){if(v.length===1)return S(v[0],E,b,T);let _;const O=(0,i.toHash)(v);if(O.array&&O.object){const M=(0,r._)`typeof ${E} != "object"`;_=O.null?M:(0,r._)`!${E} || ${M}`,delete O.null,delete O.array,delete O.object}else _=r.nil;O.number&&delete O.integer;for(const M in O)_=(0,r.and)(_,S(M,E,b,T));return _}Fr.checkDataTypes=y;const C={message:({schema:v})=>`must be ${v}`,params:({schema:v,schemaValue:E})=>typeof v=="string"?(0,r._)`{type: ${v}}`:(0,r._)`{type: ${E}}`};function x(v){const E=w(v);(0,n.reportError)(E,C)}Fr.reportTypeError=x;function w(v){const{gen:E,data:b,schema:T}=v,_=(0,i.schemaRefOrVal)(v,T,"type");return{gen:E,keyword:"type",data:b,schema:T.type,schemaCode:_,schemaValue:_,parentSchema:T,params:{},it:v}}return Fr}var bd={},GA;function vee(){if(GA)return bd;GA=1,Object.defineProperty(bd,"__esModule",{value:!0}),bd.assignDefaults=void 0;const e=Rt(),t=sn();function n(i,o){const{properties:l,items:c}=i.schema;if(o==="object"&&l)for(const u in l)r(i,u,l[u].default);else o==="array"&&Array.isArray(c)&&c.forEach((u,d)=>r(i,d,u.default))}bd.assignDefaults=n;function r(i,o,l){const{gen:c,compositeRule:u,data:d,opts:h}=i;if(l===void 0)return;const p=(0,e._)`${d}${(0,e.getProperty)(o)}`;if(u){(0,t.checkStrictMode)(i,`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 bd}var vs={},vn={},ZA;function Ts(){if(ZA)return vn;ZA=1,Object.defineProperty(vn,"__esModule",{value:!0}),vn.validateUnion=vn.validateArray=vn.usePattern=vn.callValidateCode=vn.schemaProperties=vn.allSchemaProperties=vn.noPropertyInData=vn.propertyInData=vn.isOwnProperty=vn.hasPropFunc=vn.reportMissingProp=vn.checkMissingProp=vn.checkReportMissingProp=void 0;const e=Rt(),t=sn(),n=Qa(),r=sn();function i(v,E){const{gen:b,data:T,it:_}=v;b.if(h(b,T,E,_.opts.ownProperties),()=>{v.setParams({missingProperty:(0,e._)`${E}`},!0),v.error()})}vn.checkReportMissingProp=i;function o({gen:v,data:E,it:{opts:b}},T,_){return(0,e.or)(...T.map(O=>(0,e.and)(h(v,E,O,b.ownProperties),(0,e._)`${_} = ${O}`)))}vn.checkMissingProp=o;function l(v,E){v.setParams({missingProperty:E},!0),v.error()}vn.reportMissingProp=l;function c(v){return v.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}vn.hasPropFunc=c;function u(v,E,b){return(0,e._)`${c(v)}.call(${E}, ${b})`}vn.isOwnProperty=u;function d(v,E,b,T){const _=(0,e._)`${E}${(0,e.getProperty)(b)} !== undefined`;return T?(0,e._)`${_} && ${u(v,E,b)}`:_}vn.propertyInData=d;function h(v,E,b,T){const _=(0,e._)`${E}${(0,e.getProperty)(b)} === undefined`;return T?(0,e.or)(_,(0,e.not)(u(v,E,b))):_}vn.noPropertyInData=h;function p(v){return v?Object.keys(v).filter(E=>E!=="__proto__"):[]}vn.allSchemaProperties=p;function g(v,E){return p(E).filter(b=>!(0,t.alwaysValidSchema)(v,E[b]))}vn.schemaProperties=g;function S({schemaCode:v,data:E,it:{gen:b,topSchemaRef:T,schemaPath:_,errorPath:O},it:M},P,z,L){const q=L?(0,e._)`${v}, ${E}, ${T}${_}`:E,Z=[[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&&Z.push([n.default.dynamicAnchors,n.default.dynamicAnchors]);const te=(0,e._)`${q}, ${b.object(...Z)}`;return z!==e.nil?(0,e._)`${P}.call(${z}, ${te})`:(0,e._)`${P}(${te})`}vn.callValidateCode=S;const y=(0,e._)`new RegExp`;function C({gen:v,it:{opts:E}},b){const T=E.unicodeRegExp?"u":"",{regExp:_}=E.code,O=_(b,T);return v.scopeValue("pattern",{key:O.toString(),ref:O,code:(0,e._)`${_.code==="new RegExp"?y:(0,r.useFunc)(v,_)}(${b}, ${T})`})}vn.usePattern=C;function x(v){const{gen:E,data:b,keyword:T,it:_}=v,O=E.name("valid");if(_.allErrors){const P=E.let("valid",!0);return M(()=>E.assign(P,!1)),P}return E.var(O,!0),M(()=>E.break()),O;function M(P){const z=E.const("len",(0,e._)`${b}.length`);E.forRange("i",0,z,L=>{v.subschema({keyword:T,dataProp:L,dataPropType:t.Type.Num},O),E.if((0,e.not)(O),P)})}}vn.validateArray=x;function w(v){const{gen:E,schema:b,keyword:T,it:_}=v;if(!Array.isArray(b))throw new Error("ajv implementation error");if(b.some(z=>(0,t.alwaysValidSchema)(_,z))&&!_.opts.unevaluated)return;const M=E.let("valid",!1),P=E.name("_valid");E.block(()=>b.forEach((z,L)=>{const q=v.subschema({keyword:T,schemaProp:L,compositeRule:!0},P);E.assign(M,(0,e._)`${M} || ${P}`),v.mergeValidEvaluated(q,P)||E.if((0,e.not)(M))})),v.result(M,()=>v.reset(),()=>v.error(!0))}return vn.validateUnion=w,vn}var YA;function bee(){if(YA)return vs;YA=1,Object.defineProperty(vs,"__esModule",{value:!0}),vs.validateKeywordUsage=vs.validSchemaType=vs.funcKeywordCode=vs.macroKeywordCode=void 0;const e=Rt(),t=Qa(),n=Ts(),r=p0();function i(g,S){const{gen:y,keyword:C,schema:x,parentSchema:w,it:v}=g,E=S.macro.call(v.self,x,w,v),b=d(y,C,E);v.opts.validateSchema!==!1&&v.self.validateSchema(E,!0);const T=y.name("valid");g.subschema({schema:E,schemaPath:e.nil,errSchemaPath:`${v.errSchemaPath}/${C}`,topSchemaRef:b,compositeRule:!0},T),g.pass(T,()=>g.error(!0))}vs.macroKeywordCode=i;function o(g,S){var y;const{gen:C,keyword:x,schema:w,parentSchema:v,$data:E,it:b}=g;u(b,S);const T=!E&&S.compile?S.compile.call(b.self,w,v,b):S.validate,_=d(C,x,T),O=C.let("valid");g.block$data(O,M),g.ok((y=S.valid)!==null&&y!==void 0?y:O);function M(){if(S.errors===!1)L(),S.modifying&&l(g),q(()=>g.error());else{const Z=S.async?P():z();S.modifying&&l(g),q(()=>c(g,Z))}}function P(){const Z=C.let("ruleErrs",null);return C.try(()=>L((0,e._)`await `),te=>C.assign(O,!1).if((0,e._)`${te} instanceof ${b.ValidationError}`,()=>C.assign(Z,(0,e._)`${te}.errors`),()=>C.throw(te))),Z}function z(){const Z=(0,e._)`${_}.errors`;return C.assign(Z,null),L(e.nil),Z}function L(Z=S.async?(0,e._)`await `:e.nil){const te=b.opts.passContext?t.default.this:t.default.self,ee=!("compile"in S&&!E||S.schema===!1);C.assign(O,(0,e._)`${Z}${(0,n.callValidateCode)(g,_,te,ee)}`,S.modifying)}function q(Z){var te;C.if((0,e.not)((te=S.valid)!==null&&te!==void 0?te:O),Z)}}vs.funcKeywordCode=o;function l(g){const{gen:S,data:y,it:C}=g;S.if(C.parentData,()=>S.assign(y,(0,e._)`${C.parentData}[${C.parentDataProperty}]`))}function c(g,S){const{gen:y}=g;y.if((0,e._)`Array.isArray(${S})`,()=>{y.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${S} : ${t.default.vErrors}.concat(${S})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,r.extendErrors)(g)},()=>g.error())}function u({schemaEnv:g},S){if(S.async&&!g.$async)throw new Error("async keyword in sync schema")}function d(g,S,y){if(y===void 0)throw new Error(`keyword "${S}" failed to compile`);return g.scopeValue("keyword",typeof y=="function"?{ref:y}:{ref:y,code:(0,e.stringify)(y)})}function h(g,S,y=!1){return!S.length||S.some(C=>C==="array"?Array.isArray(g):C==="object"?g&&typeof g=="object"&&!Array.isArray(g):typeof g==C||y&&typeof g>"u")}vs.validSchemaType=h;function p({schema:g,opts:S,self:y,errSchemaPath:C},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(E=>!Object.prototype.hasOwnProperty.call(g,E)))throw new Error(`parent schema must have dependencies of ${w}: ${v.join(",")}`);if(x.validateSchema&&!x.validateSchema(g[w])){const b=`keyword "${w}" value is invalid at path "${C}": `+y.errorsText(x.validateSchema.errors);if(S.validateSchema==="log")y.logger.error(b);else throw new Error(b)}}return vs.validateKeywordUsage=p,vs}var Co={},WA;function See(){if(WA)return Co;WA=1,Object.defineProperty(Co,"__esModule",{value:!0}),Co.extendSubschemaMode=Co.extendSubschemaData=Co.getSubschema=void 0;const e=Rt(),t=sn();function n(o,{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=o.schema[l];return c===void 0?{schema:g,schemaPath:(0,e._)`${o.schemaPath}${(0,e.getProperty)(l)}`,errSchemaPath:`${o.errSchemaPath}/${l}`}:{schema:g[c],schemaPath:(0,e._)`${o.schemaPath}${(0,e.getProperty)(l)}${(0,e.getProperty)(c)}`,errSchemaPath:`${o.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')}Co.getSubschema=n;function r(o,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:C,opts:x}=l,w=g.let("data",(0,e._)`${l.data}${(0,e.getProperty)(c)}`,!0);S(w),o.errorPath=(0,e.str)`${y}${(0,t.getErrorPath)(c,u,x.jsPropertySyntax)}`,o.parentDataProperty=(0,e._)`${c}`,o.dataPathArr=[...C,o.parentDataProperty]}if(d!==void 0){const y=d instanceof e.Name?d:g.let("data",d,!0);S(y),p!==void 0&&(o.propertyName=p)}h&&(o.dataTypes=h);function S(y){o.data=y,o.dataLevel=l.dataLevel+1,o.dataTypes=[],l.definedProperties=new Set,o.parentData=l.data,o.dataNames=[...l.dataNames,y]}}Co.extendSubschemaData=r;function i(o,{jtdDiscriminator:l,jtdMetadata:c,compositeRule:u,createErrors:d,allErrors:h}){u!==void 0&&(o.compositeRule=u),d!==void 0&&(o.createErrors=d),h!==void 0&&(o.allErrors=h),o.jtdDiscriminator=l,o.jtdMetadata=c}return Co.extendSubschemaMode=i,Co}var ri={},b1,XA;function q4(){return XA||(XA=1,b1=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,i,o;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))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(o=Object.keys(t),r=o.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var l=o[i];if(!e(t[l],n[l]))return!1}return!0}return t!==t&&n!==n}),b1}var S1={exports:{}},QA;function wee(){if(QA)return S1.exports;QA=1;var e=S1.exports=function(r,i,o){typeof i=="function"&&(o=i,i={}),o=i.cb||o;var l=typeof o=="function"?o:o.pre||function(){},c=o.post||function(){};t(i,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,i,o,l,c,u,d,h,p,g){if(l&&typeof l=="object"&&!Array.isArray(l)){i(l,c,u,d,h,p,g);for(var S in l){var y=l[S];if(Array.isArray(y)){if(S in e.arrayKeywords)for(var C=0;C<y.length;C++)t(r,i,o,y[C],c+"/"+S+"/"+C,u,c,S,l,C)}else if(S in e.propsKeywords){if(y&&typeof y=="object")for(var x in y)t(r,i,o,y[x],c+"/"+S+"/"+n(x),u,c,S,l,x)}else(S in e.keywords||r.allKeys&&!(S in e.skipKeywords))&&t(r,i,o,y,c+"/"+S,u,c,S,l)}o(l,c,u,d,h,p,g)}}function n(r){return r.replace(/~/g,"~0").replace(/\//g,"~1")}return S1.exports}var JA;function m0(){if(JA)return ri;JA=1,Object.defineProperty(ri,"__esModule",{value:!0}),ri.getSchemaRefs=ri.resolveUrl=ri.normalizeId=ri._getFullPath=ri.getFullPath=ri.inlineRef=void 0;const e=sn(),t=q4(),n=wee(),r=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function i(C,x=!0){return typeof C=="boolean"?!0:x===!0?!l(C):x?c(C)<=x:!1}ri.inlineRef=i;const o=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function l(C){for(const x in C){if(o.has(x))return!0;const w=C[x];if(Array.isArray(w)&&w.some(l)||typeof w=="object"&&l(w))return!0}return!1}function c(C){let x=0;for(const w in C){if(w==="$ref")return 1/0;if(x++,!r.has(w)&&(typeof C[w]=="object"&&(0,e.eachItem)(C[w],v=>x+=c(v)),x===1/0))return 1/0}return x}function u(C,x="",w){w!==!1&&(x=p(x));const v=C.parse(x);return d(C,v)}ri.getFullPath=u;function d(C,x){return C.serialize(x).split("#")[0]+"#"}ri._getFullPath=d;const h=/#\/?$/;function p(C){return C?C.replace(h,""):""}ri.normalizeId=p;function g(C,x,w){return w=p(w),C.resolve(x,w)}ri.resolveUrl=g;const S=/^[a-z_][-a-z0-9._]*$/i;function y(C,x){if(typeof C=="boolean")return{};const{schemaId:w,uriResolver:v}=this.opts,E=p(C[w]||x),b={"":E},T=u(v,E,!1),_={},O=new Set;return n(C,{allKeys:!0},(z,L,q,Z)=>{if(Z===void 0)return;const te=T+L;let ee=b[Z];typeof z[w]=="string"&&(ee=G.call(this,z[w])),H.call(this,z.$anchor),H.call(this,z.$dynamicAnchor),b[L]=ee;function G(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 re=this.refs[Y];return typeof re=="string"&&(re=this.refs[re]),typeof re=="object"?M(z,re.schema,Y):Y!==p(te)&&(Y[0]==="#"?(M(z,_[Y],Y),_[Y]=z):this.refs[Y]=te),Y}function H(Y){if(typeof Y=="string"){if(!S.test(Y))throw new Error(`invalid anchor "${Y}"`);G.call(this,`#${Y}`)}}}),_;function M(z,L,q){if(L!==void 0&&!t(z,L))throw P(q)}function P(z){return new Error(`reference "${z}" resolves to more than one schema`)}}return ri.getSchemaRefs=y,ri}var e5;function g0(){if(e5)return _o;e5=1,Object.defineProperty(_o,"__esModule",{value:!0}),_o.getData=_o.KeywordCxt=_o.validateFunctionCode=void 0;const e=yee(),t=my(),n=V4(),r=my(),i=vee(),o=bee(),l=See(),c=Rt(),u=Qa(),d=m0(),h=sn(),p=p0();function g(Q){if(T(Q)&&(O(Q),b(Q))){x(Q);return}S(Q,()=>(0,e.topBoolOrEmptySchema)(Q))}_o.validateFunctionCode=g;function S({gen:Q,validateName:ie,schema:le,schemaEnv:Se,opts:Te},we){Te.code.es5?Q.func(ie,(0,c._)`${u.default.data}, ${u.default.valCxt}`,Se.$async,()=>{Q.code((0,c._)`"use strict"; ${v(le,Te)}`),C(Q,Te),Q.code(we)}):Q.func(ie,(0,c._)`${u.default.data}, ${y(Te)}`,Se.$async,()=>Q.code(v(le,Te)).code(we))}function y(Q){return(0,c._)`{${u.default.instancePath}="", ${u.default.parentData}, ${u.default.parentDataProperty}, ${u.default.rootData}=${u.default.data}${Q.dynamicRef?(0,c._)`, ${u.default.dynamicAnchors}={}`:c.nil}}={}`}function C(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:le,gen:Se}=Q;S(Q,()=>{le.$comment&&ie.$comment&&Z(Q),z(Q),Se.let(u.default.vErrors,null),Se.let(u.default.errors,0),le.unevaluated&&w(Q),M(Q),te(Q)})}function w(Q){const{gen:ie,validateName:le}=Q;Q.evaluated=ie.const("evaluated",(0,c._)`${le}.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 le=typeof Q=="object"&&Q[ie.schemaId];return le&&(ie.code.source||ie.code.process)?(0,c._)`/*# sourceURL=${le} */`:c.nil}function E(Q,ie){if(T(Q)&&(O(Q),b(Q))){_(Q,ie);return}(0,e.boolOrEmptySchema)(Q,ie)}function b({schema:Q,self:ie}){if(typeof Q=="boolean")return!Q;for(const le in Q)if(ie.RULES.all[le])return!0;return!1}function T(Q){return typeof Q.schema!="boolean"}function _(Q,ie){const{schema:le,gen:Se,opts:Te}=Q;Te.$comment&&le.$comment&&Z(Q),L(Q),q(Q);const we=Se.const("_errs",u.default.errors);M(Q,we),Se.var(ie,(0,c._)`${we} === ${u.default.errors}`)}function O(Q){(0,h.checkUnknownRules)(Q),P(Q)}function M(Q,ie){if(Q.opts.jtd)return G(Q,[],!1,ie);const le=(0,t.getSchemaTypes)(Q.schema),Se=(0,t.coerceAndCheckDataType)(Q,le);G(Q,le,!Se,ie)}function P(Q){const{schema:ie,errSchemaPath:le,opts:Se,self:Te}=Q;ie.$ref&&Se.ignoreKeywordsWithRef&&(0,h.schemaHasRulesButRef)(ie,Te.RULES)&&Te.logger.warn(`$ref: keywords ignored in schema at path "${le}"`)}function z(Q){const{schema:ie,opts:le}=Q;ie.default!==void 0&&le.useDefaults&&le.strictSchema&&(0,h.checkStrictMode)(Q,"default is ignored in the schema root")}function L(Q){const ie=Q.schema[Q.opts.schemaId];ie&&(Q.baseId=(0,d.resolveUrl)(Q.opts.uriResolver,Q.baseId,ie))}function q(Q){if(Q.schema.$async&&!Q.schemaEnv.$async)throw new Error("async schema in sync schema")}function Z({gen:Q,schemaEnv:ie,schema:le,errSchemaPath:Se,opts:Te}){const we=le.$comment;if(Te.$comment===!0)Q.code((0,c._)`${u.default.self}.logger.log(${we})`);else if(typeof Te.$comment=="function"){const Ie=(0,c.str)`${Se}/$comment`,Fe=Q.scopeValue("root",{ref:ie.root});Q.code((0,c._)`${u.default.self}.opts.$comment(${we}, ${Ie}, ${Fe}.schema)`)}}function te(Q){const{gen:ie,schemaEnv:le,validateName:Se,ValidationError:Te,opts:we}=Q;le.$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._)`${Se}.errors`,u.default.vErrors),we.unevaluated&&ee(Q),ie.return((0,c._)`${u.default.errors} === 0`))}function ee({gen:Q,evaluated:ie,props:le,items:Se}){le instanceof c.Name&&Q.assign((0,c._)`${ie}.props`,le),Se instanceof c.Name&&Q.assign((0,c._)`${ie}.items`,Se)}function G(Q,ie,le,Se){const{gen:Te,schema:we,data:Ie,allErrors:Fe,opts:ye,self:Ue}=Q,{RULES:Re}=Ue;if(we.$ref&&(ye.ignoreKeywordsWithRef||!(0,h.schemaHasRulesButRef)(we,Re))){Te.block(()=>ne(Q,"$ref",Re.all.$ref.definition));return}ye.jtd||Y(Q,ie),Te.block(()=>{for(const $e of Re.rules)Ye($e);Ye(Re.post)});function Ye($e){(0,n.shouldUseGroup)(we,$e)&&($e.type?(Te.if((0,r.checkDataType)($e.type,Ie,ye.strictNumbers)),H(Q,$e),ie.length===1&&ie[0]===$e.type&&le&&(Te.else(),(0,r.reportTypeError)(Q)),Te.endIf()):H(Q,$e),Fe||Te.if((0,c._)`${u.default.errors} === ${Se||0}`))}}function H(Q,ie){const{gen:le,schema:Se,opts:{useDefaults:Te}}=Q;Te&&(0,i.assignDefaults)(Q,ie.type),le.block(()=>{for(const we of ie.rules)(0,n.shouldUseRule)(Se,we)&&ne(Q,we.keyword,we.definition,ie.type)})}function Y(Q,ie){Q.schemaEnv.meta||!Q.opts.strictTypes||(oe(Q,ie),Q.opts.allowUnionTypes||re(Q,ie),I(Q,Q.dataTypes))}function oe(Q,ie){if(ie.length){if(!Q.dataTypes.length){Q.dataTypes=ie;return}ie.forEach(le=>{$(Q.dataTypes,le)||U(Q,`type "${le}" not allowed by context "${Q.dataTypes.join(",")}"`)}),N(Q,ie)}}function re(Q,ie){ie.length>1&&!(ie.length===2&&ie.includes("null"))&&U(Q,"use allowUnionTypes to allow union type keyword")}function I(Q,ie){const le=Q.self.RULES.all;for(const Se in le){const Te=le[Se];if(typeof Te=="object"&&(0,n.shouldUseRule)(Q.schema,Te)){const{type:we}=Te.definition;we.length&&!we.some(Ie=>B(ie,Ie))&&U(Q,`missing type "${we.join(",")}" for keyword "${Se}"`)}}}function B(Q,ie){return Q.includes(ie)||ie==="number"&&Q.includes("integer")}function $(Q,ie){return Q.includes(ie)||ie==="integer"&&Q.includes("number")}function N(Q,ie){const le=[];for(const Se of Q.dataTypes)$(ie,Se)?le.push(Se):ie.includes("integer")&&Se==="number"&&le.push("integer");Q.dataTypes=le}function U(Q,ie){const le=Q.schemaEnv.baseId+Q.errSchemaPath;ie+=` at "${le}" (strictTypes)`,(0,h.checkStrictMode)(Q,ie,Q.opts.strictTypes)}class J{constructor(ie,le,Se){if((0,o.validateKeywordUsage)(ie,le,Se),this.gen=ie.gen,this.allErrors=ie.allErrors,this.keyword=Se,this.data=ie.data,this.schema=ie.schema[Se],this.$data=le.$data&&ie.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,h.schemaRefOrVal)(ie,this.schema,Se,this.$data),this.schemaType=le.schemaType,this.parentSchema=ie.schema,this.params={},this.it=ie,this.def=le,this.$data)this.schemaCode=ie.gen.const("vSchema",Ee(this.$data,ie));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,le.schemaType,le.allowUndefined))throw new Error(`${Se} value must be ${JSON.stringify(le.schemaType)}`);("code"in le?le.trackErrors:le.errors!==!1)&&(this.errsCount=ie.gen.const("_errs",u.default.errors))}result(ie,le,Se){this.failResult((0,c.not)(ie),le,Se)}failResult(ie,le,Se){this.gen.if(ie),Se?Se():this.error(),le?(this.gen.else(),le(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(ie,le){this.failResult((0,c.not)(ie),void 0,le)}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:le}=this;this.fail((0,c._)`${le} !== undefined && (${(0,c.or)(this.invalid$data(),ie)})`)}error(ie,le,Se){if(le){this.setParams(le),this._error(ie,Se),this.setParams({});return}this._error(ie,Se)}_error(ie,le){(ie?p.reportExtraError:p.reportError)(this,this.def.error,le)}$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,le){le?Object.assign(this.params,ie):this.params=ie}block$data(ie,le,Se=c.nil){this.gen.block(()=>{this.check$data(ie,Se),le()})}check$data(ie=c.nil,le=c.nil){if(!this.$data)return;const{gen:Se,schemaCode:Te,schemaType:we,def:Ie}=this;Se.if((0,c.or)((0,c._)`${Te} === undefined`,le)),ie!==c.nil&&Se.assign(ie,!0),(we.length||Ie.validateSchema)&&(Se.elseIf(this.invalid$data()),this.$dataError(),ie!==c.nil&&Se.assign(ie,!1)),Se.else()}invalid$data(){const{gen:ie,schemaCode:le,schemaType:Se,def:Te,it:we}=this;return(0,c.or)(Ie(),Fe());function Ie(){if(Se.length){if(!(le instanceof c.Name))throw new Error("ajv implementation error");const ye=Array.isArray(Se)?Se:[Se];return(0,c._)`${(0,r.checkDataTypes)(ye,le,we.opts.strictNumbers,r.DataType.Wrong)}`}return c.nil}function Fe(){if(Te.validateSchema){const ye=ie.scopeValue("validate$data",{ref:Te.validateSchema});return(0,c._)`!${ye}(${le})`}return c.nil}}subschema(ie,le){const Se=(0,l.getSubschema)(this.it,ie);(0,l.extendSubschemaData)(Se,this.it,ie),(0,l.extendSubschemaMode)(Se,ie);const Te={...this.it,...Se,items:void 0,props:void 0};return E(Te,le),Te}mergeEvaluated(ie,le){const{it:Se,gen:Te}=this;Se.opts.unevaluated&&(Se.props!==!0&&ie.props!==void 0&&(Se.props=h.mergeEvaluated.props(Te,ie.props,Se.props,le)),Se.items!==!0&&ie.items!==void 0&&(Se.items=h.mergeEvaluated.items(Te,ie.items,Se.items,le)))}mergeValidEvaluated(ie,le){const{it:Se,gen:Te}=this;if(Se.opts.unevaluated&&(Se.props!==!0||Se.items!==!0))return Te.if(le,()=>this.mergeEvaluated(ie,c.Name)),!0}}_o.KeywordCxt=J;function ne(Q,ie,le,Se){const Te=new J(Q,le,ie);"code"in le?le.code(Te,Se):Te.$data&&le.validate?(0,o.funcKeywordCode)(Te,le):"macro"in le?(0,o.macroKeywordCode)(Te,le):(le.compile||le.validate)&&(0,o.funcKeywordCode)(Te,le)}const se=/^\/(?:[^~]|~0|~1)*$/,he=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Ee(Q,{dataLevel:ie,dataNames:le,dataPathArr:Se}){let Te,we;if(Q==="")return u.default.rootData;if(Q[0]==="/"){if(!se.test(Q))throw new Error(`Invalid JSON-pointer: ${Q}`);Te=Q,we=u.default.rootData}else{const Ue=he.exec(Q);if(!Ue)throw new Error(`Invalid JSON-pointer: ${Q}`);const Re=+Ue[1];if(Te=Ue[2],Te==="#"){if(Re>=ie)throw new Error(ye("property/index",Re));return Se[ie-Re]}if(Re>ie)throw new Error(ye("data",Re));if(we=le[ie-Re],!Te)return we}let Ie=we;const Fe=Te.split("/");for(const Ue of Fe)Ue&&(we=(0,c._)`${we}${(0,c.getProperty)((0,h.unescapeJsonPointer)(Ue))}`,Ie=(0,c._)`${Ie} && ${we}`);return Ie;function ye(Ue,Re){return`Cannot access ${Ue} ${Re} levels up, current level is ${ie}`}}return _o.getData=Ee,_o}var Em={},t5;function $_(){if(t5)return Em;t5=1,Object.defineProperty(Em,"__esModule",{value:!0});class e extends Error{constructor(n){super("validation failed"),this.errors=n,this.ajv=this.validation=!0}}return Em.default=e,Em}var Cm={},n5;function y0(){if(n5)return Cm;n5=1,Object.defineProperty(Cm,"__esModule",{value:!0});const e=m0();class t extends Error{constructor(r,i,o,l){super(l||`can't resolve reference ${o} from id ${i}`),this.missingRef=(0,e.resolveUrl)(r,i,o),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(r,this.missingRef))}}return Cm.default=t,Cm}var Oi={},r5;function z_(){if(r5)return Oi;r5=1,Object.defineProperty(Oi,"__esModule",{value:!0}),Oi.resolveSchema=Oi.getCompilingSchema=Oi.resolveRef=Oi.compileSchema=Oi.SchemaEnv=void 0;const e=Rt(),t=$_(),n=Qa(),r=m0(),i=sn(),o=g0();class l{constructor(w){var v;this.refs={},this.dynamicAnchors={};let E;typeof w.schema=="object"&&(E=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)(E?.[w.schemaId||"$id"]),this.schemaPath=w.schemaPath,this.localRefs=w.localRefs,this.meta=w.meta,this.$async=E?.$async,this.refs={}}}Oi.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:E,lines:b}=this.opts.code,{ownProperties:T}=this.opts,_=new e.CodeGen(this.scope,{es5:E,lines:b,ownProperties:T});let O;x.$async&&(O=_.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const M=_.scopeName("validate");x.validateName=M;const P={gen:_,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:_.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 z;try{this._compilations.add(x),(0,o.validateFunctionCode)(P),_.optimize(this.opts.code.optimize);const L=_.toString();z=`${_.scopeRefs(n.default.scope)}return ${L}`,this.opts.code.process&&(z=this.opts.code.process(z,x));const Z=new Function(`${n.default.self}`,`${n.default.scope}`,z)(this,this.scope.get());if(this.scope.value(M,{ref:Z}),Z.errors=null,Z.schema=x.schema,Z.schemaEnv=x,x.$async&&(Z.$async=!0),this.opts.code.source===!0&&(Z.source={validateName:M,validateCode:L,scopeValues:_._values}),this.opts.unevaluated){const{props:te,items:ee}=P;Z.evaluated={props:te instanceof e.Name?void 0:te,items:ee instanceof e.Name?void 0:ee,dynamicProps:te instanceof e.Name,dynamicItems:ee instanceof e.Name},Z.source&&(Z.source.evaluated=(0,e.stringify)(Z.evaluated))}return x.validate=Z,x}catch(L){throw delete x.validate,delete x.validateName,z&&this.logger.error("Error compiling schema, function code:",z),L}finally{this._compilations.delete(x)}}Oi.compileSchema=c;function u(x,w,v){var E;v=(0,r.resolveUrl)(this.opts.uriResolver,w,v);const b=x.refs[v];if(b)return b;let T=g.call(this,x,v);if(T===void 0){const _=(E=x.localRefs)===null||E===void 0?void 0:E[v],{schemaId:O}=this.opts;_&&(T=new l({schema:_,schemaId:O,root:x,baseId:w}))}if(T!==void 0)return x.refs[v]=d.call(this,T)}Oi.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}Oi.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]||S.call(this,x,w)}function S(x,w){const v=this.opts.uriResolver.parse(w),E=(0,r._getFullPath)(this.opts.uriResolver,v);let b=(0,r.getFullPath)(this.opts.uriResolver,x.baseId,void 0);if(Object.keys(x.schema).length>0&&E===b)return C.call(this,v,x);const T=(0,r.normalizeId)(E),_=this.refs[T]||this.schemas[T];if(typeof _=="string"){const O=S.call(this,x,_);return typeof O?.schema!="object"?void 0:C.call(this,v,O)}if(typeof _?.schema=="object"){if(_.validate||c.call(this,_),T===(0,r.normalizeId)(w)){const{schema:O}=_,{schemaId:M}=this.opts,P=O[M];return P&&(b=(0,r.resolveUrl)(this.opts.uriResolver,b,P)),new l({schema:O,schemaId:M,root:x,baseId:b})}return C.call(this,v,_)}}Oi.resolveSchema=S;const y=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function C(x,{baseId:w,schema:v,root:E}){var b;if(((b=x.fragment)===null||b===void 0?void 0:b[0])!=="/")return;for(const O of x.fragment.slice(1).split("/")){if(typeof v=="boolean")return;const M=v[(0,i.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,i.schemaHasRulesButRef)(v,this.RULES)){const O=(0,r.resolveUrl)(this.opts.uriResolver,w,v.$ref);T=S.call(this,E,O)}const{schemaId:_}=this.opts;if(T=T||new l({schema:v,schemaId:_,root:E,baseId:w}),T.schema!==T.root.schema)return T}return Oi}const xee="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",_ee="Meta-schema for $data reference (JSON AnySchema extension proposal)",Eee="object",Cee=["$data"],Tee={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},Ree=!1,Oee={$id:xee,description:_ee,type:Eee,required:Cee,properties:Tee,additionalProperties:Ree};var Tm={},Sd={exports:{}},w1,i5;function B4(){if(i5)return w1;i5=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 S="",y=0,C=0;for(C=0;C<g.length;C++)if(y=g[C].charCodeAt(0),y!==48){if(!(y>=48&&y<=57||y>=65&&y<=70||y>=97&&y<=102))return"";S+=g[C];break}for(C+=1;C<g.length;C++){if(y=g[C].charCodeAt(0),!(y>=48&&y<=57||y>=65&&y<=70||y>=97&&y<=102))return"";S+=g[C]}return S}const r=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function i(g){return g.length=0,!0}function o(g,S,y){if(g.length){const C=n(g);if(C!=="")S.push(C);else return y.error=!0,!1;g.length=0}return!0}function l(g){let S=0;const y={error:!1,address:"",zone:""},C=[],x=[];let w=!1,v=!1,E=o;for(let b=0;b<g.length;b++){const T=g[b];if(!(T==="["||T==="]"))if(T===":"){if(w===!0&&(v=!0),!E(x,C,y))break;if(++S>7){y.error=!0;break}b>0&&g[b-1]===":"&&(w=!0),C.push(":");continue}else if(T==="%"){if(!E(x,C,y))break;E=i}else{x.push(T);continue}}return x.length&&(E===i?y.zone=x.join(""):v?C.push(x.join("")):C.push(n(x))),y.address=C.join(""),y}function c(g){if(u(g,":")<2)return{host:g,isIPV6:!1};const S=l(g);if(S.error)return{host:g,isIPV6:!1};{let y=S.address,C=S.address;return S.zone&&(y+="%"+S.zone,C+="%25"+S.zone),{host:y,isIPV6:!0,escapedHost:C}}}function u(g,S){let y=0;for(let C=0;C<g.length;C++)g[C]===S&&y++;return y}function d(g){let S=g;const y=[];let C=-1,x=0;for(;x=S.length;){if(x===1){if(S===".")break;if(S==="/"){y.push("/");break}else{y.push(S);break}}else if(x===2){if(S[0]==="."){if(S[1]===".")break;if(S[1]==="/"){S=S.slice(2);continue}}else if(S[0]==="/"&&(S[1]==="."||S[1]==="/")){y.push("/");break}}else if(x===3&&S==="/.."){y.length!==0&&y.pop(),y.push("/");break}if(S[0]==="."){if(S[1]==="."){if(S[2]==="/"){S=S.slice(3);continue}}else if(S[1]==="/"){S=S.slice(2);continue}}else if(S[0]==="/"&&S[1]==="."){if(S[2]==="/"){S=S.slice(2);continue}else if(S[2]==="."&&S[3]==="/"){S=S.slice(3),y.length!==0&&y.pop();continue}}if((C=S.indexOf("/",1))===-1){y.push(S);break}else y.push(S.slice(0,C)),S=S.slice(C)}return y.join("")}function h(g,S){const y=S!==!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 S=[];if(g.userinfo!==void 0&&(S.push(g.userinfo),S.push("@")),g.host!==void 0){let y=unescape(g.host);if(!t(y)){const C=c(y);C.isIPV6===!0?y=`[${C.escapedHost}]`:y=g.host}S.push(y)}return(typeof g.port=="number"||typeof g.port=="string")&&(S.push(":"),S.push(String(g.port))),S.length?S.join(""):void 0}return w1={nonSimpleDomain:r,recomposeAuthority:p,normalizeComponentEncoding:h,removeDotSegments:d,isIPv4:t,isUUID:e,normalizeIPv6:c,stringArrayToHexStripped:n},w1}var x1,s5;function Aee(){if(s5)return x1;s5=1;const{isUUID:e}=B4(),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 i(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 o(T){return T.host||(T.error=T.error||"HTTP URIs must have a host."),T}function l(T){const _=String(T.scheme).toLowerCase()==="https";return(T.port===(_?443:80)||T.port==="")&&(T.port=void 0),T.path||(T.path="/"),T}function c(T){return T.secure=i(T),T.resourceName=(T.path||"/")+(T.query?"?"+T.query:""),T.path=void 0,T.query=void 0,T}function u(T){if((T.port===(i(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[_,O]=T.resourceName.split("?");T.path=_&&_!=="/"?_:void 0,T.query=O,T.resourceName=void 0}return T.fragment=void 0,T}function d(T,_){if(!T.path)return T.error="URN can not be parsed",T;const O=T.path.match(t);if(O){const M=_.scheme||T.scheme||"urn";T.nid=O[1].toLowerCase(),T.nss=O[2];const P=`${M}:${_.nid||T.nid}`,z=b(P);T.path=void 0,z&&(T=z.parse(T,_))}else T.error=T.error||"URN can not be parsed.";return T}function h(T,_){if(T.nid===void 0)throw new Error("URN without nid cannot be serialized");const O=_.scheme||T.scheme||"urn",M=T.nid.toLowerCase(),P=`${O}:${_.nid||M}`,z=b(P);z&&(T=z.serialize(T,_));const L=T,q=T.nss;return L.path=`${M||_.nid}:${q}`,_.skipEscape=!0,L}function p(T,_){const O=T;return O.uuid=O.nss,O.nss=void 0,!_.tolerant&&(!O.uuid||!e(O.uuid))&&(O.error=O.error||"UUID is not valid."),O}function g(T){const _=T;return _.nss=(T.uuid||"").toLowerCase(),_}const S={scheme:"http",domainHost:!0,parse:o,serialize:l},y={scheme:"https",domainHost:S.domainHost,parse:o,serialize:l},C={scheme:"ws",domainHost:!0,parse:c,serialize:u},x={scheme:"wss",domainHost:C.domainHost,parse:C.parse,serialize:C.serialize},E={http:S,https:y,ws:C,wss:x,urn:{scheme:"urn",parse:d,serialize:h,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:p,serialize:g,skipNormalize:!0}};Object.setPrototypeOf(E,null);function b(T){return T&&(E[T]||E[T.toLowerCase()])||void 0}return x1={wsIsSecure:i,SCHEMES:E,isValidSchemeName:r,getSchemeHandler:b},x1}var o5;function H4(){if(o5)return Sd.exports;o5=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:n,normalizeComponentEncoding:r,isIPv4:i,nonSimpleDomain:o}=B4(),{SCHEMES:l,getSchemeHandler:c}=Aee();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 E=v?Object.assign({scheme:"null"},v):{scheme:"null"},b=h(y(x,E),y(w,E),E,!0);return E.skipEscape=!0,g(b,E)}function h(x,w,v,E){const b={};return E||(x=y(g(x,v),v),w=y(g(w,v),v)),v=v||{},!v.tolerant&&w.scheme?(b.scheme=w.scheme,b.userinfo=w.userinfo,b.host=w.host,b.port=w.port,b.path=t(w.path||""),b.query=w.query):(w.userinfo!==void 0||w.host!==void 0||w.port!==void 0?(b.userinfo=w.userinfo,b.host=w.host,b.port=w.port,b.path=t(w.path||""),b.query=w.query):(w.path?(w.path[0]==="/"?b.path=t(w.path):((x.userinfo!==void 0||x.host!==void 0||x.port!==void 0)&&!x.path?b.path="/"+w.path:x.path?b.path=x.path.slice(0,x.path.lastIndexOf("/")+1)+w.path:b.path=w.path,b.path=t(b.path)),b.query=w.query):(b.path=x.path,w.query!==void 0?b.query=w.query:b.query=x.query),b.userinfo=x.userinfo,b.host=x.host,b.port=x.port),b.scheme=x.scheme),b.fragment=w.fragment,b}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:""},E=Object.assign({},w),b=[],T=c(E.scheme||v.scheme);T&&T.serialize&&T.serialize(v,E),v.path!==void 0&&(E.skipEscape?v.path=unescape(v.path):(v.path=escape(v.path),v.scheme!==void 0&&(v.path=v.path.split("%3A").join(":")))),E.reference!=="suffix"&&v.scheme&&b.push(v.scheme,":");const _=n(v);if(_!==void 0&&(E.reference!=="suffix"&&b.push("//"),b.push(_),v.path&&v.path[0]!=="/"&&b.push("/")),v.path!==void 0){let O=v.path;!E.absolutePath&&(!T||!T.absolutePath)&&(O=t(O)),_===void 0&&O[0]==="/"&&O[1]==="/"&&(O="/%2F"+O.slice(2)),b.push(O)}return v.query!==void 0&&b.push("?",v.query),v.fragment!==void 0&&b.push("#",v.fragment),b.join("")}const S=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function y(x,w){const v=Object.assign({},w),E={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let b=!1;v.reference==="suffix"&&(v.scheme?x=v.scheme+":"+x:x="//"+x);const T=x.match(S);if(T){if(E.scheme=T[1],E.userinfo=T[3],E.host=T[4],E.port=parseInt(T[5],10),E.path=T[6]||"",E.query=T[7],E.fragment=T[8],isNaN(E.port)&&(E.port=T[5]),E.host)if(i(E.host)===!1){const M=e(E.host);E.host=M.host.toLowerCase(),b=M.isIPV6}else b=!0;E.scheme===void 0&&E.userinfo===void 0&&E.host===void 0&&E.port===void 0&&E.query===void 0&&!E.path?E.reference="same-document":E.scheme===void 0?E.reference="relative":E.fragment===void 0?E.reference="absolute":E.reference="uri",v.reference&&v.reference!=="suffix"&&v.reference!==E.reference&&(E.error=E.error||"URI is not a "+v.reference+" reference.");const _=c(v.scheme||E.scheme);if(!v.unicodeSupport&&(!_||!_.unicodeSupport)&&E.host&&(v.domainHost||_&&_.domainHost)&&b===!1&&o(E.host))try{E.host=URL.domainToASCII(E.host.toLowerCase())}catch(O){E.error=E.error||"Host's domain name can not be converted to ASCII: "+O}(!_||_&&!_.skipNormalize)&&(x.indexOf("%")!==-1&&(E.scheme!==void 0&&(E.scheme=unescape(E.scheme)),E.host!==void 0&&(E.host=unescape(E.host))),E.path&&(E.path=escape(unescape(E.path))),E.fragment&&(E.fragment=encodeURI(decodeURIComponent(E.fragment)))),_&&_.parse&&_.parse(E,v)}else E.error=E.error||"URI can not be parsed.";return E}const C={SCHEMES:l,normalize:u,resolve:d,resolveComponent:h,equal:p,serialize:g,parse:y};return Sd.exports=C,Sd.exports.default=C,Sd.exports.fastUri=C,Sd.exports}var a5;function kee(){if(a5)return Tm;a5=1,Object.defineProperty(Tm,"__esModule",{value:!0});const e=H4();return e.code='require("ajv/dist/runtime/uri").default',Tm.default=e,Tm}var l5;function Mee(){return l5||(l5=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=g0();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=$_(),i=y0(),o=U4(),l=z_(),c=Rt(),u=m0(),d=my(),h=sn(),p=Oee,g=kee(),S=(re,I)=>new RegExp(re,I);S.code="new RegExp";const y=["removeAdditional","useDefaults","coerceTypes"],C=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 E(re){var I,B,$,N,U,J,ne,se,he,Ee,Q,ie,le,Se,Te,we,Ie,Fe,ye,Ue,Re,Ye,$e,Le,Ve;const ft=re.strict,Oe=(I=re.code)===null||I===void 0?void 0:I.optimize,me=Oe===!0||Oe===void 0?1:Oe||0,Ne=($=(B=re.code)===null||B===void 0?void 0:B.regExp)!==null&&$!==void 0?$:S,Ke=(N=re.uriResolver)!==null&&N!==void 0?N:g.default;return{strictSchema:(J=(U=re.strictSchema)!==null&&U!==void 0?U:ft)!==null&&J!==void 0?J:!0,strictNumbers:(se=(ne=re.strictNumbers)!==null&&ne!==void 0?ne:ft)!==null&&se!==void 0?se:!0,strictTypes:(Ee=(he=re.strictTypes)!==null&&he!==void 0?he:ft)!==null&&Ee!==void 0?Ee:"log",strictTuples:(ie=(Q=re.strictTuples)!==null&&Q!==void 0?Q:ft)!==null&&ie!==void 0?ie:"log",strictRequired:(Se=(le=re.strictRequired)!==null&&le!==void 0?le:ft)!==null&&Se!==void 0?Se:!1,code:re.code?{...re.code,optimize:me,regExp:Ne}:{optimize:me,regExp:Ne},loopRequired:(Te=re.loopRequired)!==null&&Te!==void 0?Te:v,loopEnum:(we=re.loopEnum)!==null&&we!==void 0?we:v,meta:(Ie=re.meta)!==null&&Ie!==void 0?Ie:!0,messages:(Fe=re.messages)!==null&&Fe!==void 0?Fe:!0,inlineRefs:(ye=re.inlineRefs)!==null&&ye!==void 0?ye:!0,schemaId:(Ue=re.schemaId)!==null&&Ue!==void 0?Ue:"$id",addUsedSchema:(Re=re.addUsedSchema)!==null&&Re!==void 0?Re:!0,validateSchema:(Ye=re.validateSchema)!==null&&Ye!==void 0?Ye:!0,validateFormats:($e=re.validateFormats)!==null&&$e!==void 0?$e:!0,unicodeRegExp:(Le=re.unicodeRegExp)!==null&&Le!==void 0?Le:!0,int32range:(Ve=re.int32range)!==null&&Ve!==void 0?Ve:!0,uriResolver:Ke}}class b{constructor(I={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,I=this.opts={...I,...E(I)};const{es5:B,lines:$}=this.opts.code;this.scope=new c.ValueScope({scope:{},prefixes:C,es5:B,lines:$}),this.logger=q(I.logger);const N=I.validateFormats;I.validateFormats=!1,this.RULES=(0,o.getRules)(),T.call(this,x,I,"NOT SUPPORTED"),T.call(this,w,I,"DEPRECATED","warn"),this._metaOpts=z.call(this),I.formats&&M.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),I.keywords&&P.call(this,I.keywords),typeof I.meta=="object"&&this.addMetaSchema(I.meta),O.call(this),I.validateFormats=N}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:I,meta:B,schemaId:$}=this.opts;let N=p;$==="id"&&(N={...p},N.id=N.$id,delete N.$id),B&&I&&this.addMetaSchema(N,N[$],!1)}defaultMeta(){const{meta:I,schemaId:B}=this.opts;return this.opts.defaultMeta=typeof I=="object"?I[B]||I:void 0}validate(I,B){let $;if(typeof I=="string"){if($=this.getSchema(I),!$)throw new Error(`no schema with key or ref "${I}"`)}else $=this.compile(I);const N=$(B);return"$async"in $||(this.errors=$.errors),N}compile(I,B){const $=this._addSchema(I,B);return $.validate||this._compileSchemaEnv($)}compileAsync(I,B){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:$}=this.opts;return N.call(this,I,B);async function N(Ee,Q){await U.call(this,Ee.$schema);const ie=this._addSchema(Ee,Q);return ie.validate||J.call(this,ie)}async function U(Ee){Ee&&!this.getSchema(Ee)&&await N.call(this,{$ref:Ee},!0)}async function J(Ee){try{return this._compileSchemaEnv(Ee)}catch(Q){if(!(Q instanceof i.default))throw Q;return ne.call(this,Q),await se.call(this,Q.missingSchema),J.call(this,Ee)}}function ne({missingSchema:Ee,missingRef:Q}){if(this.refs[Ee])throw new Error(`AnySchema ${Ee} is loaded but ${Q} cannot be resolved`)}async function se(Ee){const Q=await he.call(this,Ee);this.refs[Ee]||await U.call(this,Q.$schema),this.refs[Ee]||this.addSchema(Q,Ee,B)}async function he(Ee){const Q=this._loading[Ee];if(Q)return Q;try{return await(this._loading[Ee]=$(Ee))}finally{delete this._loading[Ee]}}}addSchema(I,B,$,N=this.opts.validateSchema){if(Array.isArray(I)){for(const J of I)this.addSchema(J,void 0,$,N);return this}let U;if(typeof I=="object"){const{schemaId:J}=this.opts;if(U=I[J],U!==void 0&&typeof U!="string")throw new Error(`schema ${J} must be string`)}return B=(0,u.normalizeId)(B||U),this._checkUnique(B),this.schemas[B]=this._addSchema(I,$,B,N,!0),this}addMetaSchema(I,B,$=this.opts.validateSchema){return this.addSchema(I,B,!0,$),this}validateSchema(I,B){if(typeof I=="boolean")return!0;let $;if($=I.$schema,$!==void 0&&typeof $!="string")throw new Error("$schema must be a string");if($=$||this.opts.defaultMeta||this.defaultMeta(),!$)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const N=this.validate($,I);if(!N&&B){const U="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(U);else throw new Error(U)}return N}getSchema(I){let B;for(;typeof(B=_.call(this,I))=="string";)I=B;if(B===void 0){const{schemaId:$}=this.opts,N=new l.SchemaEnv({schema:{},schemaId:$});if(B=l.resolveSchema.call(this,N,I),!B)return;this.refs[I]=B}return B.validate||this._compileSchemaEnv(B)}removeSchema(I){if(I instanceof RegExp)return this._removeAllSchemas(this.schemas,I),this._removeAllSchemas(this.refs,I),this;switch(typeof I){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const B=_.call(this,I);return typeof B=="object"&&this._cache.delete(B.schema),delete this.schemas[I],delete this.refs[I],this}case"object":{const B=I;this._cache.delete(B);let $=I[this.opts.schemaId];return $&&($=(0,u.normalizeId)($),delete this.schemas[$],delete this.refs[$]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(I){for(const B of I)this.addKeyword(B);return this}addKeyword(I,B){let $;if(typeof I=="string")$=I,typeof B=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),B.keyword=$);else if(typeof I=="object"&&B===void 0){if(B=I,$=B.keyword,Array.isArray($)&&!$.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(te.call(this,$,B),!B)return(0,h.eachItem)($,U=>ee.call(this,U)),this;H.call(this,B);const N={...B,type:(0,d.getJSONTypes)(B.type),schemaType:(0,d.getJSONTypes)(B.schemaType)};return(0,h.eachItem)($,N.type.length===0?U=>ee.call(this,U,N):U=>N.type.forEach(J=>ee.call(this,U,N,J))),this}getKeyword(I){const B=this.RULES.all[I];return typeof B=="object"?B.definition:!!B}removeKeyword(I){const{RULES:B}=this;delete B.keywords[I],delete B.all[I];for(const $ of B.rules){const N=$.rules.findIndex(U=>U.keyword===I);N>=0&&$.rules.splice(N,1)}return this}addFormat(I,B){return typeof B=="string"&&(B=new RegExp(B)),this.formats[I]=B,this}errorsText(I=this.errors,{separator:B=", ",dataVar:$="data"}={}){return!I||I.length===0?"No errors":I.map(N=>`${$}${N.instancePath} ${N.message}`).reduce((N,U)=>N+B+U)}$dataMetaSchema(I,B){const $=this.RULES.all;I=JSON.parse(JSON.stringify(I));for(const N of B){const U=N.split("/").slice(1);let J=I;for(const ne of U)J=J[ne];for(const ne in $){const se=$[ne];if(typeof se!="object")continue;const{$data:he}=se.definition,Ee=J[ne];he&&Ee&&(J[ne]=oe(Ee))}}return I}_removeAllSchemas(I,B){for(const $ in I){const N=I[$];(!B||B.test($))&&(typeof N=="string"?delete I[$]:N&&!N.meta&&(this._cache.delete(N.schema),delete I[$]))}}_addSchema(I,B,$,N=this.opts.validateSchema,U=this.opts.addUsedSchema){let J;const{schemaId:ne}=this.opts;if(typeof I=="object")J=I[ne];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof I!="boolean")throw new Error("schema must be object or boolean")}let se=this._cache.get(I);if(se!==void 0)return se;$=(0,u.normalizeId)(J||$);const he=u.getSchemaRefs.call(this,I,$);return se=new l.SchemaEnv({schema:I,schemaId:ne,meta:B,baseId:$,localRefs:he}),this._cache.set(se.schema,se),U&&!$.startsWith("#")&&($&&this._checkUnique($),this.refs[$]=se),N&&this.validateSchema(I,!0),se}_checkUnique(I){if(this.schemas[I]||this.refs[I])throw new Error(`schema with key or id "${I}" already exists`)}_compileSchemaEnv(I){if(I.meta?this._compileMetaSchema(I):l.compileSchema.call(this,I),!I.validate)throw new Error("ajv implementation error");return I.validate}_compileMetaSchema(I){const B=this.opts;this.opts=this._metaOpts;try{l.compileSchema.call(this,I)}finally{this.opts=B}}}b.ValidationError=r.default,b.MissingRefError=i.default,e.default=b;function T(re,I,B,$="error"){for(const N in re){const U=N;U in I&&this.logger[$](`${B}: option ${N}. ${re[U]}`)}}function _(re){return re=(0,u.normalizeId)(re),this.schemas[re]||this.refs[re]}function O(){const re=this.opts.schemas;if(re)if(Array.isArray(re))this.addSchema(re);else for(const I in re)this.addSchema(re[I],I)}function M(){for(const re in this.opts.formats){const I=this.opts.formats[re];I&&this.addFormat(re,I)}}function P(re){if(Array.isArray(re)){this.addVocabulary(re);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const I in re){const B=re[I];B.keyword||(B.keyword=I),this.addKeyword(B)}}function z(){const re={...this.opts};for(const I of y)delete re[I];return re}const L={log(){},warn(){},error(){}};function q(re){if(re===!1)return L;if(re===void 0)return console;if(re.log&&re.warn&&re.error)return re;throw new Error("logger must implement log, warn and error methods")}const Z=/^[a-z_$][a-z0-9_$:-]*$/i;function te(re,I){const{RULES:B}=this;if((0,h.eachItem)(re,$=>{if(B.keywords[$])throw new Error(`Keyword ${$} is already defined`);if(!Z.test($))throw new Error(`Keyword ${$} has invalid name`)}),!!I&&I.$data&&!("code"in I||"validate"in I))throw new Error('$data keyword must have "code" or "validate" function')}function ee(re,I,B){var $;const N=I?.post;if(B&&N)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:U}=this;let J=N?U.post:U.rules.find(({type:se})=>se===B);if(J||(J={type:B,rules:[]},U.rules.push(J)),U.keywords[re]=!0,!I)return;const ne={keyword:re,definition:{...I,type:(0,d.getJSONTypes)(I.type),schemaType:(0,d.getJSONTypes)(I.schemaType)}};I.before?G.call(this,J,ne,I.before):J.rules.push(ne),U.all[re]=ne,($=I.implements)===null||$===void 0||$.forEach(se=>this.addKeyword(se))}function G(re,I,B){const $=re.rules.findIndex(N=>N.keyword===B);$>=0?re.rules.splice($,0,I):(re.rules.push(I),this.logger.warn(`rule ${B} is not defined`))}function H(re){let{metaSchema:I}=re;I!==void 0&&(re.$data&&this.opts.$data&&(I=oe(I)),re.validateSchema=this.compile(I,!0))}const Y={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function oe(re){return{anyOf:[re,Y]}}})(p1)),p1}var Rm={},Om={},Am={},c5;function jee(){if(c5)return Am;c5=1,Object.defineProperty(Am,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Am.default=e,Am}var va={},u5;function Pee(){if(u5)return va;u5=1,Object.defineProperty(va,"__esModule",{value:!0}),va.callRef=va.getValidate=void 0;const e=y0(),t=Ts(),n=Rt(),r=Qa(),i=z_(),o=sn(),l={keyword:"$ref",schemaType:"string",code(d){const{gen:h,schema:p,it:g}=d,{baseId:S,schemaEnv:y,validateName:C,opts:x,self:w}=g,{root:v}=y;if((p==="#"||p==="#/")&&S===v.baseId)return b();const E=i.resolveRef.call(w,v,S,p);if(E===void 0)throw new e.default(g.opts.uriResolver,S,p);if(E instanceof i.SchemaEnv)return T(E);return _(E);function b(){if(y===v)return u(d,C,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 _(O){const M=h.scopeValue("schema",x.code.source===!0?{ref:O,code:(0,n.stringify)(O)}:{ref:O}),P=h.name("valid"),z=d.subschema({schema:O,dataTypes:[],schemaPath:n.nil,topSchemaRef:M,errSchemaPath:p},P);d.mergeEvaluated(z),d.ok(P)}}};function c(d,h){const{gen:p}=d;return h.validate?p.scopeValue("validate",{ref:h.validate}):(0,n._)`${p.scopeValue("wrapper",{ref:h})}.validate`}va.getValidate=c;function u(d,h,p,g){const{gen:S,it:y}=d,{allErrors:C,schemaEnv:x,opts:w}=y,v=w.passContext?r.default.this:n.nil;g?E():b();function E(){if(!x.$async)throw new Error("async schema referenced by sync schema");const O=S.let("valid");S.try(()=>{S.code((0,n._)`await ${(0,t.callValidateCode)(d,h,v)}`),_(h),C||S.assign(O,!0)},M=>{S.if((0,n._)`!(${M} instanceof ${y.ValidationError})`,()=>S.throw(M)),T(M),C||S.assign(O,!1)}),d.ok(O)}function b(){d.result((0,t.callValidateCode)(d,h,v),()=>_(h),()=>T(h))}function T(O){const M=(0,n._)`${O}.errors`;S.assign(r.default.vErrors,(0,n._)`${r.default.vErrors} === null ? ${M} : ${r.default.vErrors}.concat(${M})`),S.assign(r.default.errors,(0,n._)`${r.default.vErrors}.length`)}function _(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=o.mergeEvaluated.props(S,P.props,y.props));else{const z=S.var("props",(0,n._)`${O}.evaluated.props`);y.props=o.mergeEvaluated.props(S,z,y.props,n.Name)}if(y.items!==!0)if(P&&!P.dynamicItems)P.items!==void 0&&(y.items=o.mergeEvaluated.items(S,P.items,y.items));else{const z=S.var("items",(0,n._)`${O}.evaluated.items`);y.items=o.mergeEvaluated.items(S,z,y.items,n.Name)}}}return va.callRef=u,va.default=l,va}var f5;function Nee(){if(f5)return Om;f5=1,Object.defineProperty(Om,"__esModule",{value:!0});const e=jee(),t=Pee(),n=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return Om.default=n,Om}var km={},Mm={},d5;function Dee(){if(d5)return Mm;d5=1,Object.defineProperty(Mm,"__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:o,schemaCode:l})=>(0,e.str)`must be ${n[o].okStr} ${l}`,params:({keyword:o,schemaCode:l})=>(0,e._)`{comparison: ${n[o].okStr}, limit: ${l}}`},i={keyword:Object.keys(n),type:"number",schemaType:"number",$data:!0,error:r,code(o){const{keyword:l,data:c,schemaCode:u}=o;o.fail$data((0,e._)`${c} ${n[l].fail} ${u} || isNaN(${c})`)}};return Mm.default=i,Mm}var jm={},h5;function Iee(){if(h5)return jm;h5=1,Object.defineProperty(jm,"__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:i,data:o,schemaCode:l,it:c}=r,u=c.opts.multipleOfPrecision,d=i.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} = ${o}/${l}, ${h}))`)}};return jm.default=n,jm}var Pm={},Nm={},p5;function $ee(){if(p5)return Nm;p5=1,Object.defineProperty(Nm,"__esModule",{value:!0});function e(t){const n=t.length;let r=0,i=0,o;for(;i<n;)r++,o=t.charCodeAt(i++),o>=55296&&o<=56319&&i<n&&(o=t.charCodeAt(i),(o&64512)===56320&&i++);return r}return Nm.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',Nm}var m5;function zee(){if(m5)return Pm;m5=1,Object.defineProperty(Pm,"__esModule",{value:!0});const e=Rt(),t=sn(),n=$ee(),i={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:o,schemaCode:l}){const c=o==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${c} than ${l} characters`},params:({schemaCode:o})=>(0,e._)`{limit: ${o}}`},code(o){const{keyword:l,data:c,schemaCode:u,it:d}=o,h=l==="maxLength"?e.operators.GT:e.operators.LT,p=d.opts.unicode===!1?(0,e._)`${c}.length`:(0,e._)`${(0,t.useFunc)(o.gen,n.default)}(${c})`;o.fail$data((0,e._)`${p} ${h} ${u}`)}};return Pm.default=i,Pm}var Dm={},g5;function Lee(){if(g5)return Dm;g5=1,Object.defineProperty(Dm,"__esModule",{value:!0});const e=Ts(),t=Rt(),r={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:i})=>(0,t.str)`must match pattern "${i}"`,params:({schemaCode:i})=>(0,t._)`{pattern: ${i}}`},code(i){const{data:o,$data:l,schema:c,schemaCode:u,it:d}=i,h=d.opts.unicodeRegExp?"u":"",p=l?(0,t._)`(new RegExp(${u}, ${h}))`:(0,e.usePattern)(i,c);i.fail$data((0,t._)`!${p}.test(${o})`)}};return Dm.default=r,Dm}var Im={},y5;function Fee(){if(y5)return Im;y5=1,Object.defineProperty(Im,"__esModule",{value:!0});const e=Rt(),n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:r,schemaCode:i}){const o=r==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${o} than ${i} properties`},params:({schemaCode:r})=>(0,e._)`{limit: ${r}}`},code(r){const{keyword:i,data:o,schemaCode:l}=r,c=i==="maxProperties"?e.operators.GT:e.operators.LT;r.fail$data((0,e._)`Object.keys(${o}).length ${c} ${l}`)}};return Im.default=n,Im}var $m={},v5;function Uee(){if(v5)return $m;v5=1,Object.defineProperty($m,"__esModule",{value:!0});const e=Ts(),t=Rt(),n=sn(),i={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:o}})=>(0,t.str)`must have required property '${o}'`,params:({params:{missingProperty:o}})=>(0,t._)`{missingProperty: ${o}}`},code(o){const{gen:l,schema:c,schemaCode:u,data:d,$data:h,it:p}=o,{opts:g}=p;if(!h&&c.length===0)return;const S=c.length>=g.loopRequired;if(p.allErrors?y():C(),g.strictRequired){const v=o.parentSchema.properties,{definedProperties:E}=o.it;for(const b of c)if(v?.[b]===void 0&&!E.has(b)){const T=p.schemaEnv.baseId+p.errSchemaPath,_=`required property "${b}" is not defined at "${T}" (strictRequired)`;(0,n.checkStrictMode)(p,_,p.opts.strictRequired)}}function y(){if(S||h)o.block$data(t.nil,x);else for(const v of c)(0,e.checkReportMissingProp)(o,v)}function C(){const v=l.let("missing");if(S||h){const E=l.let("valid",!0);o.block$data(E,()=>w(v,E)),o.ok(E)}else l.if((0,e.checkMissingProp)(o,c,v)),(0,e.reportMissingProp)(o,v),l.else()}function x(){l.forOf("prop",u,v=>{o.setParams({missingProperty:v}),l.if((0,e.noPropertyInData)(l,d,v,g.ownProperties),()=>o.error())})}function w(v,E){o.setParams({missingProperty:v}),l.forOf(v,u,()=>{l.assign(E,(0,e.propertyInData)(l,d,v,g.ownProperties)),l.if((0,t.not)(E),()=>{o.error(),l.break()})},t.nil)}}};return $m.default=i,$m}var zm={},b5;function Vee(){if(b5)return zm;b5=1,Object.defineProperty(zm,"__esModule",{value:!0});const e=Rt(),n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:r,schemaCode:i}){const o=r==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${o} than ${i} items`},params:({schemaCode:r})=>(0,e._)`{limit: ${r}}`},code(r){const{keyword:i,data:o,schemaCode:l}=r,c=i==="maxItems"?e.operators.GT:e.operators.LT;r.fail$data((0,e._)`${o}.length ${c} ${l}`)}};return zm.default=n,zm}var Lm={},Fm={},S5;function L_(){if(S5)return Fm;S5=1,Object.defineProperty(Fm,"__esModule",{value:!0});const e=q4();return e.code='require("ajv/dist/runtime/equal").default',Fm.default=e,Fm}var w5;function qee(){if(w5)return Lm;w5=1,Object.defineProperty(Lm,"__esModule",{value:!0});const e=my(),t=Rt(),n=sn(),r=L_(),o={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:S}=l;if(!d&&!h)return;const y=c.let("valid"),C=p.items?(0,e.getSchemaTypes)(p.items):[];l.block$data(y,x,(0,t._)`${g} === false`),l.ok(y);function x(){const b=c.let("i",(0,t._)`${u}.length`),T=c.let("j");l.setParams({i:b,j:T}),c.assign(y,!0),c.if((0,t._)`${b} > 1`,()=>(w()?v:E)(b,T))}function w(){return C.length>0&&!C.some(b=>b==="object"||b==="array")}function v(b,T){const _=c.name("item"),O=(0,e.checkDataTypes)(C,_,S.opts.strictNumbers,e.DataType.Wrong),M=c.const("indices",(0,t._)`{}`);c.for((0,t._)`;${b}--;`,()=>{c.let(_,(0,t._)`${u}[${b}]`),c.if(O,(0,t._)`continue`),C.length>1&&c.if((0,t._)`typeof ${_} == "string"`,(0,t._)`${_} += "_"`),c.if((0,t._)`typeof ${M}[${_}] == "number"`,()=>{c.assign(T,(0,t._)`${M}[${_}]`),l.error(),c.assign(y,!1).break()}).code((0,t._)`${M}[${_}] = ${b}`)})}function E(b,T){const _=(0,n.useFunc)(c,r.default),O=c.name("outer");c.label(O).for((0,t._)`;${b}--;`,()=>c.for((0,t._)`${T} = ${b}; ${T}--;`,()=>c.if((0,t._)`${_}(${u}[${b}], ${u}[${T}])`,()=>{l.error(),c.assign(y,!1).break(O)})))}}};return Lm.default=o,Lm}var Um={},x5;function Bee(){if(x5)return Um;x5=1,Object.defineProperty(Um,"__esModule",{value:!0});const e=Rt(),t=sn(),n=L_(),i={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:o})=>(0,e._)`{allowedValue: ${o}}`},code(o){const{gen:l,data:c,$data:u,schemaCode:d,schema:h}=o;u||h&&typeof h=="object"?o.fail$data((0,e._)`!${(0,t.useFunc)(l,n.default)}(${c}, ${d})`):o.fail((0,e._)`${h} !== ${c}`)}};return Um.default=i,Um}var Vm={},_5;function Hee(){if(_5)return Vm;_5=1,Object.defineProperty(Vm,"__esModule",{value:!0});const e=Rt(),t=sn(),n=L_(),i={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:o})=>(0,e._)`{allowedValues: ${o}}`},code(o){const{gen:l,data:c,$data:u,schema:d,schemaCode:h,it:p}=o;if(!u&&d.length===0)throw new Error("enum must have non-empty array");const g=d.length>=p.opts.loopEnum;let S;const y=()=>S??(S=(0,t.useFunc)(l,n.default));let C;if(g||u)C=l.let("valid"),o.block$data(C,x);else{if(!Array.isArray(d))throw new Error("ajv implementation error");const v=l.const("vSchema",h);C=(0,e.or)(...d.map((E,b)=>w(v,b)))}o.pass(C);function x(){l.assign(C,!1),l.forOf("v",h,v=>l.if((0,e._)`${y()}(${c}, ${v})`,()=>l.assign(C,!0).break()))}function w(v,E){const b=d[E];return typeof b=="object"&&b!==null?(0,e._)`${y()}(${c}, ${v}[${E}])`:(0,e._)`${c} === ${b}`}}};return Vm.default=i,Vm}var E5;function Kee(){if(E5)return km;E5=1,Object.defineProperty(km,"__esModule",{value:!0});const e=Dee(),t=Iee(),n=zee(),r=Lee(),i=Fee(),o=Uee(),l=Vee(),c=qee(),u=Bee(),d=Hee(),h=[e.default,t.default,n.default,r.default,i.default,o.default,l.default,c.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},u.default,d.default];return km.default=h,km}var qm={},Jc={},C5;function K4(){if(C5)return Jc;C5=1,Object.defineProperty(Jc,"__esModule",{value:!0}),Jc.validateAdditionalItems=void 0;const e=Rt(),t=sn(),r={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:o}})=>(0,e.str)`must NOT have more than ${o} items`,params:({params:{len:o}})=>(0,e._)`{limit: ${o}}`},code(o){const{parentSchema:l,it:c}=o,{items:u}=l;if(!Array.isArray(u)){(0,t.checkStrictMode)(c,'"additionalItems" is ignored when "items" is not an array of schemas');return}i(o,u)}};function i(o,l){const{gen:c,schema:u,data:d,keyword:h,it:p}=o;p.items=!0;const g=c.const("len",(0,e._)`${d}.length`);if(u===!1)o.setParams({len:l.length}),o.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),()=>S(y)),o.ok(y)}function S(y){c.forRange("i",l.length,g,C=>{o.subschema({keyword:h,dataProp:C,dataPropType:t.Type.Num},y),p.allErrors||c.if((0,e.not)(y),()=>c.break())})}}return Jc.validateAdditionalItems=i,Jc.default=r,Jc}var Bm={},eu={},T5;function G4(){if(T5)return eu;T5=1,Object.defineProperty(eu,"__esModule",{value:!0}),eu.validateTuple=void 0;const e=Rt(),t=sn(),n=Ts(),r={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(o){const{schema:l,it:c}=o;if(Array.isArray(l))return i(o,"additionalItems",l);c.items=!0,!(0,t.alwaysValidSchema)(c,l)&&o.ok((0,n.validateArray)(o))}};function i(o,l,c=o.schema){const{gen:u,parentSchema:d,data:h,keyword:p,it:g}=o;C(d),g.opts.unevaluated&&c.length&&g.items!==!0&&(g.items=t.mergeEvaluated.items(u,c.length,g.items));const S=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}`,()=>o.subschema({keyword:p,schemaProp:w,dataProp:w},S)),o.ok(S))});function C(x){const{opts:w,errSchemaPath:v}=g,E=c.length,b=E===x.minItems&&(E===x.maxItems||x[l]===!1);if(w.strictTuples&&!b){const T=`"${p}" is ${E}-tuple, but minItems or maxItems/${l} are not specified or different at path "${v}"`;(0,t.checkStrictMode)(g,T,w.strictTuples)}}}return eu.validateTuple=i,eu.default=r,eu}var R5;function Gee(){if(R5)return Bm;R5=1,Object.defineProperty(Bm,"__esModule",{value:!0});const e=G4(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:n=>(0,e.validateTuple)(n,"items")};return Bm.default=t,Bm}var Hm={},O5;function Zee(){if(O5)return Hm;O5=1,Object.defineProperty(Hm,"__esModule",{value:!0});const e=Rt(),t=sn(),n=Ts(),r=K4(),o={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 Hm.default=o,Hm}var Km={},A5;function Yee(){if(A5)return Km;A5=1,Object.defineProperty(Km,"__esModule",{value:!0});const e=Rt(),t=sn(),r={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:i,max:o}})=>o===void 0?(0,e.str)`must contain at least ${i} valid item(s)`:(0,e.str)`must contain at least ${i} and no more than ${o} valid item(s)`,params:({params:{min:i,max:o}})=>o===void 0?(0,e._)`{minContains: ${i}}`:(0,e._)`{minContains: ${i}, maxContains: ${o}}`},code(i){const{gen:o,schema:l,parentSchema:c,data:u,it:d}=i;let h,p;const{minContains:g,maxContains:S}=c;d.opts.next?(h=g===void 0?1:g,p=S):h=1;const y=o.const("len",(0,e._)`${u}.length`);if(i.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'),i.fail();return}if((0,t.alwaysValidSchema)(d,l)){let E=(0,e._)`${y} >= ${h}`;p!==void 0&&(E=(0,e._)`${E} && ${y} <= ${p}`),i.pass(E);return}d.items=!0;const C=o.name("valid");p===void 0&&h===1?w(C,()=>o.if(C,()=>o.break())):h===0?(o.let(C,!0),p!==void 0&&o.if((0,e._)`${u}.length > 0`,x)):(o.let(C,!1),x()),i.result(C,()=>i.reset());function x(){const E=o.name("_valid"),b=o.let("count",0);w(E,()=>o.if(E,()=>v(b)))}function w(E,b){o.forRange("i",0,y,T=>{i.subschema({keyword:"contains",dataProp:T,dataPropType:t.Type.Num,compositeRule:!0},E),b()})}function v(E){o.code((0,e._)`${E}++`),p===void 0?o.if((0,e._)`${E} >= ${h}`,()=>o.assign(C,!0).break()):(o.if((0,e._)`${E} > ${p}`,()=>o.assign(C,!1).break()),h===1?o.assign(C,!0):o.if((0,e._)`${E} >= ${h}`,()=>o.assign(C,!0)))}}};return Km.default=r,Km}var _1={},k5;function Wee(){return k5||(k5=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=Rt(),n=sn(),r=Ts();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},
36
- missingProperty: ${p},
37
- depsCount: ${d},
38
- deps: ${h}}`};const i={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(u){const[d,h]=o(u);l(u,d),c(u,h)}};function o({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 S=h.let("missing");for(const y in d){const C=d[y];if(C.length===0)continue;const x=(0,r.propertyInData)(h,p,y,g.opts.ownProperties);u.setParams({property:y,depsCount:C.length,deps:C.join(", ")}),g.allErrors?h.if(x,()=>{for(const w of C)(0,r.checkReportMissingProp)(u,w)}):(h.if((0,t._)`${x} && (${(0,r.checkMissingProp)(u,C,S)})`),(0,r.reportMissingProp)(u,S),h.else())}}e.validatePropertyDeps=l;function c(u,d=u.schema){const{gen:h,data:p,keyword:g,it:S}=u,y=h.name("valid");for(const C in d)(0,n.alwaysValidSchema)(S,d[C])||(h.if((0,r.propertyInData)(h,p,C,S.opts.ownProperties),()=>{const x=u.subschema({keyword:g,schemaProp:C},y);u.mergeValidEvaluated(x,y)},()=>h.var(y,!0)),u.ok(y))}e.validateSchemaDeps=c,e.default=i})(_1)),_1}var Gm={},M5;function Xee(){if(M5)return Gm;M5=1,Object.defineProperty(Gm,"__esModule",{value:!0});const e=Rt(),t=sn(),r={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:i})=>(0,e._)`{propertyName: ${i.propertyName}}`},code(i){const{gen:o,schema:l,data:c,it:u}=i;if((0,t.alwaysValidSchema)(u,l))return;const d=o.name("valid");o.forIn("key",c,h=>{i.setParams({propertyName:h}),i.subschema({keyword:"propertyNames",data:h,dataTypes:["string"],propertyName:h,compositeRule:!0},d),o.if((0,e.not)(d),()=>{i.error(!0),u.allErrors||o.break()})}),i.ok(d)}};return Gm.default=r,Gm}var Zm={},j5;function Z4(){if(j5)return Zm;j5=1,Object.defineProperty(Zm,"__esModule",{value:!0});const e=Ts(),t=Rt(),n=Qa(),r=sn(),o={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:S,opts:y}=g;if(g.props=!0,y.removeAdditional!=="all"&&(0,r.alwaysValidSchema)(g,u))return;const C=(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,_=>{!C.length&&!x.length?b(_):c.if(v(_),()=>b(_))})}function v(_){let O;if(C.length>8){const M=(0,r.schemaRefOrVal)(g,d.properties,"properties");O=(0,e.isOwnProperty)(c,M,_)}else C.length?O=(0,t.or)(...C.map(M=>(0,t._)`${_} === ${M}`)):O=t.nil;return x.length&&(O=(0,t.or)(O,...x.map(M=>(0,t._)`${(0,e.usePattern)(l,M)}.test(${_})`))),(0,t.not)(O)}function E(_){c.code((0,t._)`delete ${h}[${_}]`)}function b(_){if(y.removeAdditional==="all"||y.removeAdditional&&u===!1){E(_);return}if(u===!1){l.setParams({additionalProperty:_}),l.error(),S||c.break();return}if(typeof u=="object"&&!(0,r.alwaysValidSchema)(g,u)){const O=c.name("valid");y.removeAdditional==="failing"?(T(_,O,!1),c.if((0,t.not)(O),()=>{l.reset(),E(_)})):(T(_,O),S||c.if((0,t.not)(O),()=>c.break()))}}function T(_,O,M){const P={keyword:"additionalProperties",dataProp:_,dataPropType:r.Type.Str};M===!1&&Object.assign(P,{compositeRule:!0,createErrors:!1,allErrors:!1}),l.subschema(P,O)}}};return Zm.default=o,Zm}var Ym={},P5;function Qee(){if(P5)return Ym;P5=1,Object.defineProperty(Ym,"__esModule",{value:!0});const e=g0(),t=Ts(),n=sn(),r=Z4(),i={keyword:"properties",type:"object",schemaType:"object",code(o){const{gen:l,schema:c,parentSchema:u,data:d,it:h}=o;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 S=l.name("valid");for(const x of g)y(x)?C(x):(l.if((0,t.propertyInData)(l,d,x,h.opts.ownProperties)),C(x),h.allErrors||l.else().var(S,!0),l.endIf()),o.it.definedProperties.add(x),o.ok(S);function y(x){return h.opts.useDefaults&&!h.compositeRule&&c[x].default!==void 0}function C(x){o.subschema({keyword:"properties",schemaProp:x,dataProp:x},S)}}};return Ym.default=i,Ym}var Wm={},N5;function Jee(){if(N5)return Wm;N5=1,Object.defineProperty(Wm,"__esModule",{value:!0});const e=Ts(),t=Rt(),n=sn(),r=sn(),i={keyword:"patternProperties",type:"object",schemaType:"object",code(o){const{gen:l,schema:c,data:u,parentSchema:d,it:h}=o,{opts:p}=h,g=(0,e.allSchemaProperties)(c),S=g.filter(b=>(0,n.alwaysValidSchema)(h,c[b]));if(g.length===0||S.length===g.length&&(!h.opts.unevaluated||h.props===!0))return;const y=p.strictSchema&&!p.allowMatchingProperties&&d.properties,C=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 b of g)y&&v(b),h.allErrors?E(b):(l.var(C,!0),E(b),l.if(C))}function v(b){for(const T in y)new RegExp(b).test(T)&&(0,n.checkStrictMode)(h,`property ${T} matches pattern ${b} (use allowMatchingProperties)`)}function E(b){l.forIn("key",u,T=>{l.if((0,t._)`${(0,e.usePattern)(o,b)}.test(${T})`,()=>{const _=S.includes(b);_||o.subschema({keyword:"patternProperties",schemaProp:b,dataProp:T,dataPropType:r.Type.Str},C),h.opts.unevaluated&&x!==!0?l.assign((0,t._)`${x}[${T}]`,!0):!_&&!h.allErrors&&l.if((0,t.not)(C),()=>l.break())})})}}};return Wm.default=i,Wm}var Xm={},D5;function ete(){if(D5)return Xm;D5=1,Object.defineProperty(Xm,"__esModule",{value:!0});const e=sn(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(n){const{gen:r,schema:i,it:o}=n;if((0,e.alwaysValidSchema)(o,i)){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 Xm.default=t,Xm}var Qm={},I5;function tte(){if(I5)return Qm;I5=1,Object.defineProperty(Qm,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Ts().validateUnion,error:{message:"must match a schema in anyOf"}};return Qm.default=t,Qm}var Jm={},$5;function nte(){if($5)return Jm;$5=1,Object.defineProperty(Jm,"__esModule",{value:!0});const e=Rt(),t=sn(),r={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:i})=>(0,e._)`{passingSchemas: ${i.passing}}`},code(i){const{gen:o,schema:l,parentSchema:c,it:u}=i;if(!Array.isArray(l))throw new Error("ajv implementation error");if(u.opts.discriminator&&c.discriminator)return;const d=l,h=o.let("valid",!1),p=o.let("passing",null),g=o.name("_valid");i.setParams({passing:p}),o.block(S),i.result(h,()=>i.reset(),()=>i.error(!0));function S(){d.forEach((y,C)=>{let x;(0,t.alwaysValidSchema)(u,y)?o.var(g,!0):x=i.subschema({keyword:"oneOf",schemaProp:C,compositeRule:!0},g),C>0&&o.if((0,e._)`${g} && ${h}`).assign(h,!1).assign(p,(0,e._)`[${p}, ${C}]`).else(),o.if(g,()=>{o.assign(h,!0),o.assign(p,C),x&&i.mergeEvaluated(x,e.Name)})})}}};return Jm.default=r,Jm}var eg={},z5;function rte(){if(z5)return eg;z5=1,Object.defineProperty(eg,"__esModule",{value:!0});const e=sn(),t={keyword:"allOf",schemaType:"array",code(n){const{gen:r,schema:i,it:o}=n;if(!Array.isArray(i))throw new Error("ajv implementation error");const l=r.name("valid");i.forEach((c,u)=>{if((0,e.alwaysValidSchema)(o,c))return;const d=n.subschema({keyword:"allOf",schemaProp:u},l);n.ok(l),n.mergeEvaluated(d)})}};return eg.default=t,eg}var tg={},L5;function ite(){if(L5)return tg;L5=1,Object.defineProperty(tg,"__esModule",{value:!0});const e=Rt(),t=sn(),r={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:o})=>(0,e.str)`must match "${o.ifClause}" schema`,params:({params:o})=>(0,e._)`{failingKeyword: ${o.ifClause}}`},code(o){const{gen:l,parentSchema:c,it:u}=o;c.then===void 0&&c.else===void 0&&(0,t.checkStrictMode)(u,'"if" without "then" and "else" is ignored');const d=i(u,"then"),h=i(u,"else");if(!d&&!h)return;const p=l.let("valid",!0),g=l.name("_valid");if(S(),o.reset(),d&&h){const C=l.let("ifClause");o.setParams({ifClause:C}),l.if(g,y("then",C),y("else",C))}else d?l.if(g,y("then")):l.if((0,e.not)(g),y("else"));o.pass(p,()=>o.error(!0));function S(){const C=o.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},g);o.mergeEvaluated(C)}function y(C,x){return()=>{const w=o.subschema({keyword:C},g);l.assign(p,g),o.mergeValidEvaluated(w,p),x?l.assign(x,(0,e._)`${C}`):o.setParams({ifClause:C})}}}};function i(o,l){const c=o.schema[l];return c!==void 0&&!(0,t.alwaysValidSchema)(o,c)}return tg.default=r,tg}var ng={},F5;function ste(){if(F5)return ng;F5=1,Object.defineProperty(ng,"__esModule",{value:!0});const e=sn(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:n,parentSchema:r,it:i}){r.if===void 0&&(0,e.checkStrictMode)(i,`"${n}" without "if" is ignored`)}};return ng.default=t,ng}var U5;function ote(){if(U5)return qm;U5=1,Object.defineProperty(qm,"__esModule",{value:!0});const e=K4(),t=Gee(),n=G4(),r=Zee(),i=Yee(),o=Wee(),l=Xee(),c=Z4(),u=Qee(),d=Jee(),h=ete(),p=tte(),g=nte(),S=rte(),y=ite(),C=ste();function x(w=!1){const v=[h.default,p.default,g.default,S.default,y.default,C.default,l.default,c.default,o.default,u.default,d.default];return w?v.push(t.default,r.default):v.push(e.default,n.default),v.push(i.default),v}return qm.default=x,qm}var rg={},ig={},V5;function ate(){if(V5)return ig;V5=1,Object.defineProperty(ig,"__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,i){const{gen:o,data:l,$data:c,schema:u,schemaCode:d,it:h}=r,{opts:p,errSchemaPath:g,schemaEnv:S,self:y}=h;if(!p.validateFormats)return;c?C():x();function C(){const w=o.scopeValue("formats",{ref:y.formats,code:p.code.formats}),v=o.const("fDef",(0,e._)`${w}[${d}]`),E=o.let("fType"),b=o.let("format");o.if((0,e._)`typeof ${v} == "object" && !(${v} instanceof RegExp)`,()=>o.assign(E,(0,e._)`${v}.type || "string"`).assign(b,(0,e._)`${v}.validate`),()=>o.assign(E,(0,e._)`"string"`).assign(b,v)),r.fail$data((0,e.or)(T(),_()));function T(){return p.strictSchema===!1?e.nil:(0,e._)`${d} && !${b}`}function _(){const O=S.$async?(0,e._)`(${v}.async ? await ${b}(${l}) : ${b}(${l}))`:(0,e._)`${b}(${l})`,M=(0,e._)`(typeof ${b} == "function" ? ${O} : ${b}.test(${l}))`;return(0,e._)`${b} && ${b} !== true && ${E} === ${i} && !${M}`}}function x(){const w=y.formats[u];if(!w){T();return}if(w===!0)return;const[v,E,b]=_(w);v===i&&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 _(M){const P=M instanceof RegExp?(0,e.regexpCode)(M):p.code.formats?(0,e._)`${p.code.formats}${(0,e.getProperty)(u)}`:void 0,z=o.scopeValue("formats",{key:u,ref:M,code:P});return typeof M=="object"&&!(M instanceof RegExp)?[M.type||"string",M.validate,(0,e._)`${z}.validate`]:["string",M,z]}function O(){if(typeof w=="object"&&!(w instanceof RegExp)&&w.async){if(!S.$async)throw new Error("async format in sync schema");return(0,e._)`await ${b}(${l})`}return typeof E=="function"?(0,e._)`${b}(${l})`:(0,e._)`${b}.test(${l})`}}}};return ig.default=n,ig}var q5;function lte(){if(q5)return rg;q5=1,Object.defineProperty(rg,"__esModule",{value:!0});const t=[ate().default];return rg.default=t,rg}var Pl={},B5;function cte(){return B5||(B5=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 H5;function ute(){if(H5)return Rm;H5=1,Object.defineProperty(Rm,"__esModule",{value:!0});const e=Nee(),t=Kee(),n=ote(),r=lte(),i=cte(),o=[e.default,t.default,(0,n.default)(),r.default,i.metadataVocabulary,i.contentVocabulary];return Rm.default=o,Rm}var sg={},wd={},K5;function fte(){if(K5)return wd;K5=1,Object.defineProperty(wd,"__esModule",{value:!0}),wd.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(wd.DiscrError=e={})),wd}var G5;function dte(){if(G5)return sg;G5=1,Object.defineProperty(sg,"__esModule",{value:!0});const e=Rt(),t=fte(),n=z_(),r=y0(),i=sn(),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:S}=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(!S)throw new Error("discriminator: requires oneOf keyword");const C=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(C);function w(){const b=E();u.if(!1);for(const T in b)u.elseIf((0,e._)`${x} === ${T}`),u.assign(C,v(b[T]));u.else(),c.error(!1,{discrError:t.DiscrError.Mapping,tag:x,tagName:y}),u.endIf()}function v(b){const T=u.name("valid"),_=c.subschema({keyword:"oneOf",schemaProp:b},T);return c.mergeEvaluated(_,e.Name),T}function E(){var b;const T={},_=M(p);let O=!0;for(let L=0;L<S.length;L++){let q=S[L];if(q?.$ref&&!(0,i.schemaHasRulesButRef)(q,g.self.RULES)){const te=q.$ref;if(q=n.resolveRef.call(g.self,g.schemaEnv.root,g.baseId,te),q instanceof n.SchemaEnv&&(q=q.schema),q===void 0)throw new r.default(g.opts.uriResolver,g.baseId,te)}const Z=(b=q?.properties)===null||b===void 0?void 0:b[y];if(typeof Z!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${y}"`);O=O&&(_||M(q)),P(Z,L)}if(!O)throw new Error(`discriminator: "${y}" must be required`);return T;function M({required:L}){return Array.isArray(L)&&L.includes(y)}function P(L,q){if(L.const)z(L.const,q);else if(L.enum)for(const Z of L.enum)z(Z,q);else throw new Error(`discriminator: "properties/${y}" must have "const" or "enum"`)}function z(L,q){if(typeof L!="string"||L in T)throw new Error(`discriminator: "${y}" values must be unique strings`);T[L]=q}}}};return sg.default=l,sg}const hte="http://json-schema.org/draft-07/schema#",pte="http://json-schema.org/draft-07/schema#",mte="Core schema meta-schema",gte={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:[]}},yte=["object","boolean"],vte={$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:"#"}},bte={$schema:hte,$id:pte,title:mte,definitions:gte,type:yte,properties:vte,default:!0};var Z5;function F_(){return Z5||(Z5=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=Mee(),r=ute(),i=dte(),o=bte,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(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const y=this.opts.$data?this.$dataMetaSchema(o,l):o;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=g0();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=$_();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return p.default}});var g=y0();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return g.default}})})(xm,xm.exports)),xm.exports}var Ste=F_();const Y4=Qs(Ste);var og={exports:{}},E1={},Y5;function wte(){return Y5||(Y5=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(L,q){return{validate:L,compare:q}}e.fullFormats={date:t(o,l),time:t(u(!0),d),"date-time":t(g(!0),S),"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:z,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:E,int32:{type:"number",validate:_},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,S),"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(L){return L%4===0&&(L%100!==0||L%400===0)}const r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function o(L){const q=r.exec(L);if(!q)return!1;const Z=+q[1],te=+q[2],ee=+q[3];return te>=1&&te<=12&&ee>=1&&ee<=(te===2&&n(Z)?29:i[te])}function l(L,q){if(L&&q)return L>q?1:L<q?-1:0}const c=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function u(L){return function(Z){const te=c.exec(Z);if(!te)return!1;const ee=+te[1],G=+te[2],H=+te[3],Y=te[4],oe=te[5]==="-"?-1:1,re=+(te[6]||0),I=+(te[7]||0);if(re>23||I>59||L&&!Y)return!1;if(ee<=23&&G<=59&&H<60)return!0;const B=G-I*oe,$=ee-re*oe-(B<0?1:0);return($===23||$===-1)&&(B===59||B===-1)&&H<61}}function d(L,q){if(!(L&&q))return;const Z=new Date("2020-01-01T"+L).valueOf(),te=new Date("2020-01-01T"+q).valueOf();if(Z&&te)return Z-te}function h(L,q){if(!(L&&q))return;const Z=c.exec(L),te=c.exec(q);if(Z&&te)return L=Z[1]+Z[2]+Z[3],q=te[1]+te[2]+te[3],L>q?1:L<q?-1:0}const p=/t|\s/i;function g(L){const q=u(L);return function(te){const ee=te.split(p);return ee.length===2&&o(ee[0])&&q(ee[1])}}function S(L,q){if(!(L&&q))return;const Z=new Date(L).valueOf(),te=new Date(q).valueOf();if(Z&&te)return Z-te}function y(L,q){if(!(L&&q))return;const[Z,te]=L.split(p),[ee,G]=q.split(p),H=l(Z,ee);if(H!==void 0)return H||d(te,G)}const C=/\/|:/,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(L){return C.test(L)&&x.test(L)}const v=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function E(L){return v.lastIndex=0,v.test(L)}const b=-2147483648,T=2**31-1;function _(L){return Number.isInteger(L)&&L<=T&&L>=b}function O(L){return Number.isInteger(L)}function M(){return!0}const P=/[^\\]\\Z/;function z(L){if(P.test(L))return!1;try{return new RegExp(L),!0}catch{return!1}}})(E1)),E1}var C1={},W5;function xte(){return W5||(W5=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=F_(),n=Rt(),r=n.operators,i={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}},o={message:({keyword:c,schemaCode:u})=>(0,n.str)`should be ${i[c].okStr} ${u}`,params:({keyword:c,schemaCode:u})=>(0,n._)`{comparison: ${i[c].okStr}, limit: ${u}}`};e.formatLimitDefinition={keyword:Object.keys(i),type:"string",schemaType:"string",$data:!0,error:o,code(c){const{gen:u,data:d,schemaCode:h,keyword:p,it:g}=c,{opts:S,self:y}=g;if(!S.validateFormats)return;const C=new t.KeywordCxt(g,y.RULES.all.format.definition,"format");C.$data?x():w();function x(){const E=u.scopeValue("formats",{ref:y.formats,code:S.code.formats}),b=u.const("fmt",(0,n._)`${E}[${C.schemaCode}]`);c.fail$data((0,n.or)((0,n._)`typeof ${b} != "object"`,(0,n._)`${b} instanceof RegExp`,(0,n._)`typeof ${b}.compare != "function"`,v(b)))}function w(){const E=C.schema,b=y.formats[E];if(!b||b===!0)return;if(typeof b!="object"||b instanceof RegExp||typeof b.compare!="function")throw new Error(`"${p}": format "${E}" does not define "compare" function`);const T=u.scopeValue("formats",{key:E,ref:b,code:S.code.formats?(0,n._)`${S.code.formats}${(0,n.getProperty)(E)}`:void 0});c.fail$data(v(T))}function v(E){return(0,n._)`${E}.compare(${d}, ${h}) ${i[p].fail} 0`}},dependencies:["format"]};const l=c=>(c.addKeyword(e.formatLimitDefinition),c);e.default=l})(C1)),C1}var X5;function _te(){return X5||(X5=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const n=wte(),r=xte(),i=Rt(),o=new i.Name("fullFormats"),l=new i.Name("fastFormats"),c=(d,h={keywords:!0})=>{if(Array.isArray(h))return u(d,h,n.fullFormats,o),d;const[p,g]=h.mode==="fast"?[n.fastFormats,l]:[n.fullFormats,o],S=h.formats||n.formatNames;return u(d,S,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 S,y;(S=(y=d.opts.code).formats)!==null&&S!==void 0||(y.formats=(0,i._)`require("ajv-formats/dist/formats").${g}`);for(const C of h)d.addFormat(C,p[C])}e.exports=t=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c})(og,og.exports)),og.exports}var Ete=_te();const Cte=Qs(Ete);function Tte(){const e=new Y4({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return Cte(e),e}class Rte{constructor(t){this._ajv=t??Tte()}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 Ote{constructor(t){this._client=t}async*callToolStream(t,n=h0,r){const i=this._client,o={...r,task:r?.task??(i.isToolTask(t.name)?{}:void 0)},l=i.requestStream({method:"tools/call",params:t},n,o),c=i.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 dt(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 dt(xt.InvalidParams,`Structured content does not match the tool's output schema: ${h.errorMessage}`)};return}}catch(h){if(h instanceof dt){yield{type:"error",error:h};return}yield{type:"error",error:new dt(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 Ate(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 kte(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 i of Object.keys(r)){const o=r[i];n[i]===void 0&&Object.prototype.hasOwnProperty.call(o,"default")&&(n[i]=o.default),n[i]!==void 0&&Ng(o,n[i])}}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 Mte(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 jte extends mee{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 Rte,n?.listChanged&&(this._pendingListChangedConfig=n.listChanged)}_setupListChangedHandlers(t){t.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler("tools",N4,t.tools,async()=>(await this.listTools()).tools),t.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler("prompts",M4,t.prompts,async()=>(await this.listPrompts()).prompts),t.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler("resources",O4,t.resources,async()=>(await this.listResources()).resources)}get experimental(){return this._experimental||(this._experimental={tasks:new Ote(this)}),this._experimental}registerCapabilities(t){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=gee(this._capabilities,t)}setRequestHandler(t,n){const i=t4(t)?.method;if(!i)throw new Error("Schema is missing a method literal");let o;if(c0(i)){const c=i;o=c._zod?.def?.value??c.value}else{const c=i;o=c._def?.value??c.value}if(typeof o!="string")throw new Error("Schema method literal must be a string");const l=o;if(l==="elicitation/create"){const c=async(u,d)=>{const h=Ea(z4,u);if(!h.success){const v=h.error instanceof Error?h.error.message:String(h.error);throw new dt(xt.InvalidParams,`Invalid elicitation request: ${v}`)}const{params:p}=h.data;p.mode=p.mode??"form";const{supportsFormMode:g,supportsUrlMode:S}=Mte(this._capabilities.elicitation);if(p.mode==="form"&&!g)throw new dt(xt.InvalidParams,"Client does not support form-mode elicitation requests");if(p.mode==="url"&&!S)throw new dt(xt.InvalidParams,"Client does not support URL-mode elicitation requests");const y=await Promise.resolve(n(u,d));if(p.task){const v=Ea(ah,y);if(!v.success){const E=v.error instanceof Error?v.error.message:String(v.error);throw new dt(xt.InvalidParams,`Invalid task creation result: ${E}`)}return v.data}const C=Ea(L4,y);if(!C.success){const v=C.error instanceof Error?C.error.message:String(C.error);throw new dt(xt.InvalidParams,`Invalid elicitation result: ${v}`)}const x=C.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=Ea(I4,u);if(!h.success){const y=h.error instanceof Error?h.error.message:String(h.error);throw new dt(xt.InvalidParams,`Invalid sampling request: ${y}`)}const{params:p}=h.data,g=await Promise.resolve(n(u,d));if(p.task){const y=Ea(ah,g);if(!y.success){const C=y.error instanceof Error?y.error.message:String(y.error);throw new dt(xt.InvalidParams,`Invalid task creation result: ${C}`)}return y.data}const S=Ea($4,g);if(!S.success){const y=S.error instanceof Error?S.error.message:String(S.error);throw new dt(xt.InvalidParams,`Invalid sampling result: ${y}`)}return S.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:u0,capabilities:this._capabilities,clientInfo:this._clientInfo}},b4,n);if(r===void 0)throw new Error(`Server sent invalid initialize result: ${r}`);if(!DQ.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){Ate(this._serverCapabilities?.tasks?.requests,t,"Server")}assertTaskHandlerCapability(t){this._capabilities&&kte(this._capabilities.tasks?.requests,t,"Client")}async ping(t){return this.request({method:"ping"},gu,t)}async complete(t,n){return this.request({method:"completion/complete",params:t},F4,n)}async setLoggingLevel(t,n){return this.request({method:"logging/setLevel",params:{level:t}},gu,n)}async getPrompt(t,n){return this.request({method:"prompts/get",params:t},k4,n)}async listPrompts(t,n){return this.request({method:"prompts/list",params:t},A4,n)}async listResources(t,n){return this.request({method:"resources/list",params:t},C4,n)}async listResourceTemplates(t,n){return this.request({method:"resources/templates/list",params:t},T4,n)}async readResource(t,n){return this.request({method:"resources/read",params:t},R4,n)}async subscribeResource(t,n){return this.request({method:"resources/subscribe",params:t},gu,n)}async unsubscribeResource(t,n){return this.request({method:"resources/unsubscribe",params:t},gu,n)}async callTool(t,n=h0,r){if(this.isToolTaskRequired(t.name))throw new dt(xt.InvalidRequest,`Tool "${t.name}" requires task-based execution. Use client.experimental.tasks.callToolStream() instead.`);const i=await this.request({method:"tools/call",params:t},n,r),o=this.getToolOutputValidator(t.name);if(o){if(!i.structuredContent&&!i.isError)throw new dt(xt.InvalidRequest,`Tool ${t.name} has an output schema but did not return structured content`);if(i.structuredContent)try{const l=o(i.structuredContent);if(!l.valid)throw new dt(xt.InvalidParams,`Structured content does not match the tool's output schema: ${l.errorMessage}`)}catch(l){throw l instanceof dt?l:new dt(xt.InvalidParams,`Failed to validate structured content: ${l instanceof Error?l.message:String(l)}`)}}return i}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 i=this._jsonSchemaValidator.getValidator(n.outputSchema);this._cachedToolOutputValidators.set(n.name,i)}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},P4,n);return this.cacheToolMetadata(r.tools),r}_setupListChangedHandler(t,n,r,i){const o=AJ.safeParse(r);if(!o.success)throw new Error(`Invalid ${t} listChanged options: ${o.error.message}`);if(typeof r.onChanged!="function")throw new Error(`Invalid ${t} listChanged options: onChanged must be a function`);const{autoRefresh:l,debounceMs:c}=o.data,{onChanged:u}=r,d=async()=>{if(!l){u(null,null);return}try{const p=await i();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 pw(e){return e?e instanceof Headers?Object.fromEntries(e.entries()):Array.isArray(e)?Object.fromEntries(e):{...e}:{}}function Pte(e=fetch,t){return t?async(n,r)=>{const i={...t,...r,headers:r?.headers?{...pw(t.headers),...pw(r.headers)}:t.headers};return e(n,i)}:e}let U_;U_=globalThis.crypto;async function Nte(e){return(await U_).getRandomValues(new Uint8Array(e))}async function Dte(e){const t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~",n=Math.pow(2,8)-Math.pow(2,8)%t.length;let r="";for(;r.length<e;){const i=await Nte(e-r.length);for(const o of i)o<n&&(r+=t[o%t.length])}return r}async function Ite(e){return await Dte(e)}async function $te(e){const t=await(await U_).subtle.digest("SHA-256",new TextEncoder().encode(e));return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}async function zte(e){if(e||(e=43),e<43||e>128)throw`Expected a length between 43 and 128. Received ${e}.`;const t=await Ite(e),n=await $te(t);return{code_verifier:t,code_challenge:n}}const qr=qX().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:PQ.custom,message:"URL must be parseable",fatal:!0}),BG}).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"}),Lte=Kr({resource:fe().url(),authorization_servers:Ge(qr).optional(),jwks_uri:fe().url().optional(),scopes_supported:Ge(fe()).optional(),bearer_methods_supported:Ge(fe()).optional(),resource_signing_alg_values_supported:Ge(fe()).optional(),resource_name:fe().optional(),resource_documentation:fe().optional(),resource_policy_uri:fe().url().optional(),resource_tos_uri:fe().url().optional(),tls_client_certificate_bound_access_tokens:In().optional(),authorization_details_types_supported:Ge(fe()).optional(),dpop_signing_alg_values_supported:Ge(fe()).optional(),dpop_bound_access_tokens_required:In().optional()}),W4=Kr({issuer:fe(),authorization_endpoint:qr,token_endpoint:qr,registration_endpoint:qr.optional(),scopes_supported:Ge(fe()).optional(),response_types_supported:Ge(fe()),response_modes_supported:Ge(fe()).optional(),grant_types_supported:Ge(fe()).optional(),token_endpoint_auth_methods_supported:Ge(fe()).optional(),token_endpoint_auth_signing_alg_values_supported:Ge(fe()).optional(),service_documentation:qr.optional(),revocation_endpoint:qr.optional(),revocation_endpoint_auth_methods_supported:Ge(fe()).optional(),revocation_endpoint_auth_signing_alg_values_supported:Ge(fe()).optional(),introspection_endpoint:fe().optional(),introspection_endpoint_auth_methods_supported:Ge(fe()).optional(),introspection_endpoint_auth_signing_alg_values_supported:Ge(fe()).optional(),code_challenge_methods_supported:Ge(fe()).optional(),client_id_metadata_document_supported:In().optional()}),Fte=Kr({issuer:fe(),authorization_endpoint:qr,token_endpoint:qr,userinfo_endpoint:qr.optional(),jwks_uri:qr,registration_endpoint:qr.optional(),scopes_supported:Ge(fe()).optional(),response_types_supported:Ge(fe()),response_modes_supported:Ge(fe()).optional(),grant_types_supported:Ge(fe()).optional(),acr_values_supported:Ge(fe()).optional(),subject_types_supported:Ge(fe()),id_token_signing_alg_values_supported:Ge(fe()),id_token_encryption_alg_values_supported:Ge(fe()).optional(),id_token_encryption_enc_values_supported:Ge(fe()).optional(),userinfo_signing_alg_values_supported:Ge(fe()).optional(),userinfo_encryption_alg_values_supported:Ge(fe()).optional(),userinfo_encryption_enc_values_supported:Ge(fe()).optional(),request_object_signing_alg_values_supported:Ge(fe()).optional(),request_object_encryption_alg_values_supported:Ge(fe()).optional(),request_object_encryption_enc_values_supported:Ge(fe()).optional(),token_endpoint_auth_methods_supported:Ge(fe()).optional(),token_endpoint_auth_signing_alg_values_supported:Ge(fe()).optional(),display_values_supported:Ge(fe()).optional(),claim_types_supported:Ge(fe()).optional(),claims_supported:Ge(fe()).optional(),service_documentation:fe().optional(),claims_locales_supported:Ge(fe()).optional(),ui_locales_supported:Ge(fe()).optional(),claims_parameter_supported:In().optional(),request_parameter_supported:In().optional(),request_uri_parameter_supported:In().optional(),require_request_uri_registration:In().optional(),op_policy_uri:qr.optional(),op_tos_uri:qr.optional(),client_id_metadata_document_supported:In().optional()}),Ute=Ze({...Fte.shape,...W4.pick({code_challenge_methods_supported:!0}).shape}),Vte=Ze({access_token:fe(),id_token:fe().optional(),token_type:fe(),expires_in:NQ().optional(),scope:fe().optional(),refresh_token:fe().optional()}).strip(),qte=Ze({error:fe(),error_description:fe().optional(),error_uri:fe().optional()}),Q5=qr.optional().or(rt("").transform(()=>{})),Bte=Ze({redirect_uris:Ge(qr),token_endpoint_auth_method:fe().optional(),grant_types:Ge(fe()).optional(),response_types:Ge(fe()).optional(),client_name:fe().optional(),client_uri:qr.optional(),logo_uri:Q5,scope:fe().optional(),contacts:Ge(fe()).optional(),tos_uri:Q5,policy_uri:fe().optional(),jwks_uri:qr.optional(),jwks:cQ().optional(),software_id:fe().optional(),software_version:fe().optional(),software_statement:fe().optional()}).strip(),Hte=Ze({client_id:fe(),client_secret:fe().optional(),client_id_issued_at:pn().optional(),client_secret_expires_at:pn().optional()}).strip(),Kte=Bte.merge(Hte);Ze({error:fe(),error_description:fe().optional()}).strip();Ze({token:fe(),token_type_hint:fe().optional()}).strip();function Gte(e){const t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function Zte({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 i=n.pathname.endsWith("/")?n.pathname:n.pathname+"/",o=r.pathname.endsWith("/")?r.pathname:r.pathname+"/";return i.startsWith(o)}class jr 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 mw extends jr{}mw.errorCode="invalid_request";class gy extends jr{}gy.errorCode="invalid_client";class yy extends jr{}yy.errorCode="invalid_grant";class vy extends jr{}vy.errorCode="unauthorized_client";class gw extends jr{}gw.errorCode="unsupported_grant_type";class yw extends jr{}yw.errorCode="invalid_scope";class vw extends jr{}vw.errorCode="access_denied";class qu extends jr{}qu.errorCode="server_error";class bw extends jr{}bw.errorCode="temporarily_unavailable";class Sw extends jr{}Sw.errorCode="unsupported_response_type";class ww extends jr{}ww.errorCode="unsupported_token_type";class xw extends jr{}xw.errorCode="invalid_token";class _w extends jr{}_w.errorCode="method_not_allowed";class Ew extends jr{}Ew.errorCode="too_many_requests";class by extends jr{}by.errorCode="invalid_client_metadata";class Cw extends jr{}Cw.errorCode="insufficient_scope";class Tw extends jr{}Tw.errorCode="invalid_target";const Yte={[mw.errorCode]:mw,[gy.errorCode]:gy,[yy.errorCode]:yy,[vy.errorCode]:vy,[gw.errorCode]:gw,[yw.errorCode]:yw,[vw.errorCode]:vw,[qu.errorCode]:qu,[bw.errorCode]:bw,[Sw.errorCode]:Sw,[ww.errorCode]:ww,[xw.errorCode]:xw,[_w.errorCode]:_w,[Ew.errorCode]:Ew,[by.errorCode]:by,[Cw.errorCode]:Cw,[Tw.errorCode]:Tw};class tu extends Error{constructor(t){super(t??"Unauthorized")}}function Wte(e){return["client_secret_basic","client_secret_post","none"].includes(e)}const T1="code",R1="S256";function Xte(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&&Wte(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 Qte(e,t,n,r){const{client_id:i,client_secret:o}=t;switch(e){case"client_secret_basic":Jte(i,o,n);return;case"client_secret_post":ene(i,o,r);return;case"none":tne(i,r);return;default:throw new Error(`Unsupported client authentication method: ${e}`)}}function Jte(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 ene(e,t,n){n.set("client_id",e),t&&n.set("client_secret",t)}function tne(e,t){t.set("client_id",e)}async function X4(e){const t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{const r=qte.parse(JSON.parse(n)),{error:i,error_description:o,error_uri:l}=r,c=Yte[i]||qu;return new c(o||"",l)}catch(r){const i=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${r}. Raw body: ${n}`;return new qu(i)}}async function ag(e,t){try{return await O1(e,t)}catch(n){if(n instanceof gy||n instanceof vy)return await e.invalidateCredentials?.("all"),await O1(e,t);if(n instanceof yy)return await e.invalidateCredentials?.("tokens"),await O1(e,t);throw n}}async function O1(e,{serverUrl:t,authorizationCode:n,scope:r,resourceMetadataUrl:i,fetchFn:o}){let l,c;try{l=await ine(t,{resourceMetadataUrl:i},o),l.authorization_servers&&l.authorization_servers.length>0&&(c=l.authorization_servers[0])}catch{}c||(c=new URL("/",t));const u=await rne(t,e,l),d=await cne(c,{fetchFn:o});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&&!nne(w))throw new by(`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 E=await pne(c,{metadata:d,clientMetadata:e.clientMetadata,fetchFn:o});await e.saveClientInformation(E),h=E}}const p=!e.redirectUrl;if(n!==void 0||p){const x=await hne(e,c,{metadata:d,resource:u,authorizationCode:n,fetchFn:o});return await e.saveTokens(x),"AUTHORIZED"}const g=await e.tokens();if(g?.refresh_token)try{const x=await dne(c,{metadata:d,clientInformation:h,refreshToken:g.refresh_token,resource:u,addClientAuthentication:e.addClientAuthentication,fetchFn:o});return await e.saveTokens(x),"AUTHORIZED"}catch(x){if(!(!(x instanceof jr)||x instanceof qu))throw x}const S=e.state?await e.state():void 0,{authorizationUrl:y,codeVerifier:C}=await une(c,{metadata:d,clientInformation:h,state:S,redirectUrl:e.redirectUrl,scope:r||l?.scopes_supported?.join(" ")||e.clientMetadata.scope,resource:u});return await e.saveCodeVerifier(C),await e.redirectToAuthorization(y),"REDIRECT"}function nne(e){if(!e)return!1;try{const t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function rne(e,t,n){const r=Gte(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!Zte({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 J5(e){const t=e.headers.get("WWW-Authenticate");if(!t)return{};const[n,r]=t.split(" ");if(n.toLowerCase()!=="bearer"||!r)return{};const i=A1(e,"resource_metadata")||void 0;let o;if(i)try{o=new URL(i)}catch{}const l=A1(e,"scope")||void 0,c=A1(e,"error")||void 0;return{resourceMetadataUrl:o,scope:l,error:c}}function A1(e,t){const n=e.headers.get("WWW-Authenticate");if(!n)return null;const r=new RegExp(`${t}=(?:"([^"]+)"|([^\\s,]+))`),i=n.match(r);return i?i[1]||i[2]:null}async function ine(e,t,n=fetch){const r=await ane(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 Lte.parse(await r.json())}async function V_(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(r instanceof TypeError)return t?V_(e,void 0,n):void 0;throw r}}function sne(e,t="",n={}){return t.endsWith("/")&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function ek(e,t,n=fetch){return await V_(e,{"MCP-Protocol-Version":t},n)}function one(e,t){return!e||e.status>=400&&e.status<500&&t!=="/"}async function ane(e,t,n,r){const i=new URL(e),o=r?.protocolVersion??u0;let l;if(r?.metadataUrl)l=new URL(r.metadataUrl);else{const u=sne(t,i.pathname);l=new URL(u,r?.metadataServerUrl??i),l.search=i.search}let c=await ek(l,o,n);if(!r?.metadataUrl&&one(c,i.pathname)){const u=new URL(`/.well-known/${t}`,i);c=await ek(u,o,n)}return c}function lne(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 i=t.pathname;return i.endsWith("/")&&(i=i.slice(0,-1)),r.push({url:new URL(`/.well-known/oauth-authorization-server${i}`,t.origin),type:"oauth"}),r.push({url:new URL(`/.well-known/openid-configuration${i}`,t.origin),type:"oidc"}),r.push({url:new URL(`${i}/.well-known/openid-configuration`,t.origin),type:"oidc"}),r}async function cne(e,{fetchFn:t=fetch,protocolVersion:n=u0}={}){const r={"MCP-Protocol-Version":n,Accept:"application/json"},i=lne(e);for(const{url:o,type:l}of i){const c=await V_(o,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 ${o}`)}return l==="oauth"?W4.parse(await c.json()):Ute.parse(await c.json())}}}async function une(e,{metadata:t,clientInformation:n,redirectUrl:r,scope:i,state:o,resource:l}){let c;if(t){if(c=new URL(t.authorization_endpoint),!t.response_types_supported.includes(T1))throw new Error(`Incompatible auth server: does not support response type ${T1}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(R1))throw new Error(`Incompatible auth server: does not support code challenge method ${R1}`)}else c=new URL("/authorize",e);const u=await zte(),d=u.code_verifier,h=u.code_challenge;return c.searchParams.set("response_type",T1),c.searchParams.set("client_id",n.client_id),c.searchParams.set("code_challenge",h),c.searchParams.set("code_challenge_method",R1),c.searchParams.set("redirect_uri",String(r)),o&&c.searchParams.set("state",o),i&&c.searchParams.set("scope",i),i?.includes("offline_access")&&c.searchParams.append("prompt","consent"),l&&c.searchParams.set("resource",l.href),{authorizationUrl:c,codeVerifier:d}}function fne(e,t,n){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(n)})}async function Q4(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:i,resource:o,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(o&&n.set("resource",o.href),i)await i(u,n,c,t);else if(r){const h=t?.token_endpoint_auth_methods_supported??[],p=Xte(r,h);Qte(p,r,u,n)}const d=await(l??fetch)(c,{method:"POST",headers:u,body:n});if(!d.ok)throw await X4(d);return Vte.parse(await d.json())}async function dne(e,{metadata:t,clientInformation:n,refreshToken:r,resource:i,addClientAuthentication:o,fetchFn:l}){const c=new URLSearchParams({grant_type:"refresh_token",refresh_token:r}),u=await Q4(e,{metadata:t,tokenRequestParams:c,clientInformation:n,addClientAuthentication:o,resource:i,fetchFn:l});return{refresh_token:r,...u}}async function hne(e,t,{metadata:n,resource:r,authorizationCode:i,fetchFn:o}={}){const l=e.clientMetadata.scope;let c;if(e.prepareTokenRequest&&(c=await e.prepareTokenRequest(l)),!c){if(!i)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=fne(i,d,e.redirectUrl)}const u=await e.clientInformation();return Q4(t,{metadata:n,tokenRequestParams:c,clientInformation:u??void 0,addClientAuthentication:e.addClientAuthentication,resource:r,fetchFn:o})}async function pne(e,{metadata:t,clientMetadata:n,fetchFn:r}){let i;if(t){if(!t.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");i=new URL(t.registration_endpoint)}else i=new URL("/register",e);const o=await(r??fetch)(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!o.ok)throw await X4(o);return Kte.parse(await o.json())}class tk 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 k1(e){}function mne(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=k1,onError:n=k1,onRetry:r=k1,onComment:i}=e;let o="",l=!0,c,u="",d="";function h(C){const x=l?C.replace(/^\xEF\xBB\xBF/,""):C,[w,v]=gne(`${o}${x}`);for(const E of w)p(E);o=v,l=!1}function p(C){if(C===""){S();return}if(C.startsWith(":")){i&&i(C.slice(C.startsWith(": ")?2:1));return}const x=C.indexOf(":");if(x!==-1){const w=C.slice(0,x),v=C[x+1]===" "?2:1,E=C.slice(x+v);g(w,E,C);return}g(C,"",C)}function g(C,x,w){switch(C){case"event":d=x;break;case"data":u=`${u}${x}
39
- `;break;case"id":c=x.includes("\0")?void 0:x;break;case"retry":/^\d+$/.test(x)?r(parseInt(x,10)):n(new tk(`Invalid \`retry\` value: "${x}"`,{type:"invalid-retry",value:x,line:w}));break;default:n(new tk(`Unknown field "${C.length>20?`${C.slice(0,20)}…`:C}"`,{type:"unknown-field",field:C,value:x,line:w}));break}}function S(){u.length>0&&t({id:c,event:d||void 0,data:u.endsWith(`
40
- `)?u.slice(0,-1):u}),c=void 0,u="",d=""}function y(C={}){o&&C.consume&&p(o),l=!0,c=void 0,u="",d="",o=""}return{feed:h,reset:y}}function gne(e){const t=[];let n="",r=0;for(;r<e.length;){const i=e.indexOf("\r",r),o=e.indexOf(`
41
- `,r);let l=-1;if(i!==-1&&o!==-1?l=Math.min(i,o):i!==-1?i===e.length-1?l=-1:l=i:o!==-1&&(l=o),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]===`
42
- `&&r++}}return[t,n]}class yne extends TransformStream{constructor({onError:t,onRetry:n,onComment:r}={}){let i;super({start(o){i=mne({onEvent:l=>{o.enqueue(l)},onError(l){t==="terminate"?o.error(l):typeof t=="function"&&t(l)},onRetry:n,onComment:r})},transform(o){i.feed(o)}})}}const vne={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2};class nu extends Error{constructor(t,n){super(`Streamable HTTP error: ${n}`),this.code=t}}class bne{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=Pte(n?.fetch,n?.requestInit),this._sessionId=n?.sessionId,this._reconnectionOptions=n?.reconnectionOptions??vne}async _authThenStart(){if(!this._authProvider)throw new tu("No auth provider");let t;try{t=await ag(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 tu;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=pw(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 i=await(this._fetch??fetch)(this._url,{method:"GET",headers:r,signal:this._abortController?.signal});if(!i.ok){if(await i.body?.cancel(),i.status===401&&this._authProvider)return await this._authThenStart();if(i.status===405)return;throw new nu(i.status,`Failed to open SSE stream: ${i.statusText}`)}this._handleSseStream(i.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,i=this._reconnectionOptions.maxReconnectionDelay;return Math.min(n*Math.pow(r,t),i)}_scheduleReconnection(t,n=0){const r=this._reconnectionOptions.maxRetries;if(n>=r){this.onerror?.(new Error(`Maximum reconnection attempts (${r}) exceeded.`));return}const i=this._getNextReconnectionDelay(n);this._reconnectionTimeout=setTimeout(()=>{this._startOrAuthSse(t).catch(o=>{this.onerror?.(new Error(`Failed to reconnect SSE stream: ${o instanceof Error?o.message:String(o)}`)),this._scheduleReconnection(t,n+1)})},i)}_handleSseStream(t,n,r){if(!t)return;const{onresumptiontoken:i,replayMessageId:o}=n;let l,c=!1,u=!1;(async()=>{try{const h=t.pipeThrough(new TextDecoderStream).pipeThrough(new yne({onRetry:S=>{this._serverRetryMs=S}})).getReader();for(;;){const{value:S,done:y}=await h.read();if(y)break;if(S.id&&(l=S.id,c=!0,i?.(S.id)),!!S.data&&(!S.event||S.event==="message"))try{const C=h1.parse(JSON.parse(S.data));kd(C)&&(u=!0,o!==void 0&&(C.id=o)),this.onmessage?.(C)}catch(C){this.onerror?.(C)}}(r||c)&&!u&&this._abortController&&!this._abortController.signal.aborted&&this._scheduleReconnection({resumptionToken:l,onresumptiontoken:i,replayMessageId:o},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:i,replayMessageId:o},0)}catch(S){this.onerror?.(new Error(`Failed to reconnect: ${S instanceof Error?S.message:String(S)}`))}}})()}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 tu("No auth provider");if(await ag(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new tu("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:i}=n||{};if(r){this._startOrAuthSse({resumptionToken:r,replayMessageId:hw(t)?t.id:void 0}).catch(g=>this.onerror?.(g));return}const o=await this._commonHeaders();o.set("content-type","application/json"),o.set("accept","application/json, text/event-stream");const l={...this._requestInit,method:"POST",headers:o,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 nu(401,"Server returned 401 after successful authentication");const{resourceMetadataUrl:S,scope:y}=J5(c);if(this._resourceMetadataUrl=S,this._scope=y,await ag(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new tu;return this._hasCompletedAuthFlow=!0,this.send(t)}if(c.status===403&&this._authProvider){const{resourceMetadataUrl:S,scope:y,error:C}=J5(c);if(C==="insufficient_scope"){const x=c.headers.get("WWW-Authenticate");if(this._lastUpscopingHeader===x)throw new nu(403,"Server returned 403 after trying upscoping");if(y&&(this._scope=y),S&&(this._resourceMetadataUrl=S),this._lastUpscopingHeader=x??void 0,await ag(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetch})!=="AUTHORIZED")throw new tu;return this.send(t)}}throw new nu(c.status,`Error POSTing to endpoint: ${g}`)}if(this._hasCompletedAuthFlow=!1,this._lastUpscopingHeader=void 0,c.status===202){await c.body?.cancel(),XQ(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:i},!1);else if(p?.includes("application/json")){const g=await c.json(),S=Array.isArray(g)?g.map(y=>h1.parse(y)):[h1.parse(g)];for(const y of S)this.onmessage?.(y)}else throw await c.body?.cancel(),new nu(-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 nu(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 Sne{client=null;transport=null;async connect(t){const n=typeof t=="string"?new URL(t):t;this.transport=new bne(n),this.client=new jte({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 Vh=new Sne;Vh.connect("http://localhost:3000/mcp").then(()=>{console.info("Connected to MCP server")});const wne={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,widgetState:null},J4=()=>{const{data:e}=zj({queryKey:["list-tools"],queryFn:()=>Vh.listTools()});return e},xne=()=>Vh.getServerInfo(),_ne=()=>{const{setToolData:e}=df();return HF({mutationFn:async({toolName:t,args:n})=>{e(t,{input:n??{},response:void 0,openaiRef:null,openaiLogs:[],openaiObject:null});const r=await Vh.callTool(t,n);return e(t,{input:n??{},response:r,openaiRef:null,openaiLogs:[],openaiObject:{...wne,toolInput:n??{},toolOutput:r.structuredContent,toolResponseMetadata:r.meta,widgetState:null}}),r}})},q_=()=>{const[e]=u_();return J4().find(n=>n.name===e)??null},dc=()=>{const e=q_();if(!e)throw new Error("No tool is currently selected");return e},Ene=e=>zj({queryKey:["resource",e],queryFn:async()=>{if(!e)throw new Error("Resource URI is required");return await Vh.readResource(e)}});const Cne=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Tne=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),nk=e=>{const t=Tne(e);return t.charAt(0).toUpperCase()+t.slice(1)},eD=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),Rne=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var One={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 Ane=k.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:l,...c},u)=>k.createElement("svg",{ref:u,...One,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:eD("lucide",i),...!o&&!Rne(c)&&{"aria-hidden":"true"},...c},[...l.map(([d,h])=>k.createElement(d,h)),...Array.isArray(o)?o:[o]]));const eo=(e,t)=>{const n=k.forwardRef(({className:r,...i},o)=>k.createElement(Ane,{ref:o,iconNode:t,className:eD(`lucide-${Cne(nk(e))}`,`lucide-${e}`,r),...i}));return n.displayName=nk(e),n};const kne=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Mne=eo("check",kne);const jne=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],tD=eo("chevron-down",jne);const Pne=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Nne=eo("chevron-up",Pne);const Dne=[["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"}]],Ine=eo("circle-alert",Dne);const $ne=[["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"}]],zne=eo("external-link",$ne);const Lne=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Fne=eo("loader-circle",Lne);const Une=[["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"}]],Vne=eo("moon",Une);const qne=[["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"}]],Bne=eo("play",qne);const Hne=[["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"}]],Kne=eo("sun",Hne);const Gne=[["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"}]],Zne=eo("trash",Gne);function v0(){return typeof window<"u"}function Ja(e){return B_(e)?(e.nodeName||"").toLowerCase():"#document"}function Or(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function to(e){var t;return(t=(B_(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function B_(e){return v0()?e instanceof Node||e instanceof Or(e).Node:!1}function Kn(e){return v0()?e instanceof Element||e instanceof Or(e).Element:!1}function sr(e){return v0()?e instanceof HTMLElement||e instanceof Or(e).HTMLElement:!1}function Rw(e){return!v0()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Or(e).ShadowRoot}const Yne=new Set(["inline","contents"]);function hc(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=zi(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Yne.has(i)}const Wne=new Set(["table","td","th"]);function Xne(e){return Wne.has(Ja(e))}const Qne=[":popover-open",":modal"];function b0(e){return Qne.some(t=>{try{return e.matches(t)}catch{return!1}})}const Jne=["transform","translate","scale","rotate","perspective"],ere=["transform","translate","scale","rotate","perspective","filter"],tre=["paint","layout","strict","content"];function H_(e){const t=S0(),n=Kn(e)?zi(e):e;return Jne.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)||ere.some(r=>(n.willChange||"").includes(r))||tre.some(r=>(n.contain||"").includes(r))}function nre(e){let t=Mo(e);for(;sr(t)&&!Ao(t);){if(H_(t))return t;if(b0(t))return null;t=Mo(t)}return null}function S0(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const rre=new Set(["html","body","#document"]);function Ao(e){return rre.has(Ja(e))}function zi(e){return Or(e).getComputedStyle(e)}function w0(e){return Kn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Mo(e){if(Ja(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Rw(e)&&e.host||to(e);return Rw(t)?t.host:t}function nD(e){const t=Mo(e);return Ao(t)?e.ownerDocument?e.ownerDocument.body:e.body:sr(t)&&hc(t)?t:nD(t)}function Ma(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=nD(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),l=Or(i);if(o){const c=Ow(l);return t.concat(l,l.visualViewport||[],hc(i)?i:[],c&&n?Ma(c):[])}return t.concat(i,Ma(i,[],n))}function Ow(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const rk={};function Zs(e,t){const n=k.useRef(rk);return n.current===rk&&(n.current=e(t)),n}const M1=of[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],ire=M1&&M1!==k.useLayoutEffect?M1:e=>e();function at(e){const t=Zs(sre).current;return t.next=e,ire(t.effect),t.trampoline}function sre(){const e={next:void 0,callback:ore,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function ore(){}const are=()=>{},nt=typeof document<"u"?k.useLayoutEffect:are;function Aw(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const Fd={};function x0(e,t,n,r,i){let o={...kw(e,Fd)};return t&&(o=Md(o,t)),n&&(o=Md(o,n)),r&&(o=Md(o,r)),i&&(o=Md(o,i)),o}function lre(e){if(e.length===0)return Fd;if(e.length===1)return kw(e[0],Fd);let t={...kw(e[0],Fd)};for(let n=1;n<e.length;n+=1)t=Md(t,e[n]);return t}function Md(e,t){return rD(t)?t(e):cre(e,t)}function cre(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=Aw(e.style,r);break}case"className":{e[n]=iD(e.className,r);break}default:ure(n,r)?e[n]=fre(e[n],r):e[n]=r}}return e}function ure(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t=="function"||typeof t>"u")}function rD(e){return typeof e=="function"}function kw(e,t){return rD(e)?e(t):e??Fd}function fre(e,t){return t?e?n=>{if(dre(n)){const i=n;Mw(i);const o=t(i);return i.baseUIHandlerPrevented||e?.(i),o}const r=t(n);return e?.(n),r}:t:e}function Mw(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function iD(e,t){return t?e?t+" "+e:t:e}function dre(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function no(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 sD=k.createContext(void 0);function oD(e=!1){const t=k.useContext(sD);if(t===void 0&&!e)throw new Error(no(16));return t}function hre(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:o}=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=i,!o&&n&&(d.tabIndex=t?i:-1)),(o&&(t||l)||!o&&n)&&(d["aria-disabled"]=n),o&&(!t||c)&&(d.disabled=n),d},[r,n,t,l,c,o,i])}}function _0(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0}=e,o=k.useRef(null),l=oD(!0)!==void 0,c=at(()=>{const g=o.current;return!!(g?.tagName==="A"&&g?.href)}),{props:u}=hre({focusableWhenDisabled:n,disabled:t,composite:l,tabIndex:r,isNativeButton:i}),d=k.useCallback(()=>{const g=o.current;pre(g)&&l&&t&&u.disabled===void 0&&g.disabled&&(g.disabled=!1)},[t,u.disabled,l]);nt(d,[d]);const h=k.useCallback((g={})=>{const{onClick:S,onMouseDown:y,onKeyUp:C,onKeyDown:x,onPointerDown:w,...v}=g;return x0({type:i?"button":void 0,onClick(b){if(t){b.preventDefault();return}S?.(b)},onMouseDown(b){t||y?.(b)},onKeyDown(b){if(t||(Mw(b),x?.(b)),b.baseUIHandlerPrevented)return;const T=b.target===b.currentTarget&&!i&&!c()&&!t,_=b.key==="Enter",O=b.key===" ";T&&((O||_)&&b.preventDefault(),_&&S?.(b))},onKeyUp(b){t||(Mw(b),C?.(b)),!b.baseUIHandlerPrevented&&b.target===b.currentTarget&&!i&&!t&&b.key===" "&&S?.(b)},onPointerDown(b){if(t){b.preventDefault();return}w?.(b)}},i?void 0:{role:"button"},u,v)},[t,u,i,c]),p=at(g=>{o.current=g,d()});return{getButtonProps:h,buttonRef:p}}function pre(e){return sr(e)&&e.tagName==="BUTTON"}function qa(e,t,n,r){const i=Zs(aD).current;return gre(i,e,t,n,r)&&lD(i,[e,t,n,r]),i.callback}function mre(e){const t=Zs(aD).current;return yre(t,e)&&lD(t,e),t.callback}function aD(){return{callback:null,cleanup:null,refs:[]}}function gre(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function yre(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function lD(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 i=0;i<t.length;i+=1){const o=t[i];if(o!=null)switch(typeof o){case"function":{const l=o(n);typeof l=="function"&&(r[i]=l);break}case"object":{o.current=n;break}}}e.cleanup=()=>{for(let i=0;i<t.length;i+=1){const o=t[i];if(o!=null)switch(typeof o){case"function":{const l=r[i];typeof l=="function"?l():o(null);break}case"object":{o.current=null;break}}}}}}}const vre=parseInt(k.version,10);function K_(e){return vre>=e}function ik(e){if(!k.isValidElement(e))return null;const t=e,n=t.props;return(K_(19)?n?.ref:t.ref)??null}function bre(e,t){const n={};for(const r in e){const i=e[r];if(t?.hasOwnProperty(r)){const o=t[r](i);o!=null&&Object.assign(n,o);continue}i===!0?n[`data-${r.toLowerCase()}`]="":i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function Sre(e,t){return typeof e=="function"?e(t):e}function wre(e,t){return typeof e=="function"?e(t):e}function ji(){}const Bu=Object.freeze([]),Pi=Object.freeze({}),xre={style:{transition:"none"}},_re="data-base-ui-click-trigger",Ere={fallbackAxisSide:"none"},Cre={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function Pr(e,t,n={}){const r=t.render,i=Tre(t,n);if(n.enabled===!1)return null;const o=n.state??Pi;return Rre(e,r,i,o)}function Tre(e,t={}){const{className:n,style:r,render:i}=e,{state:o=Pi,ref:l,props:c,stateAttributesMapping:u,enabled:d=!0}=t,h=d?Sre(n,o):void 0,p=d?wre(r,o):void 0,g=d?bre(o,u):Pi,S=d?Aw(g,Array.isArray(c)?lre(c):c)??Pi:Pi;return typeof document<"u"&&(d?Array.isArray(l)?S.ref=mre([S.ref,ik(i),...l]):S.ref=qa(S.ref,ik(i),l):qa(null,null)),d?(h!==void 0&&(S.className=iD(S.className,h)),p!==void 0&&(S.style=Aw(S.style,p)),S):Pi}function Rre(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=x0(n,t.props);return i.ref=n.ref,k.cloneElement(t,i)}if(e&&typeof e=="string")return Ore(e,n);throw new Error(no(8))}function Ore(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 Are=k.forwardRef(function(t,n){const{render:r,className:i,disabled:o=!1,focusableWhenDisabled:l=!1,nativeButton:c=!0,...u}=t,d=!!o,{getButtonProps:h,buttonRef:p}=_0({disabled:d,focusableWhenDisabled:l,native:c}),g=k.useMemo(()=>({disabled:d}),[d]);return Pr("button",t,{state:g,ref:[n,p],props:[u,h]})}),sk=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ok=qx,el=(e,t)=>n=>{var r;if(t?.variants==null)return ok(e,n?.class,n?.className);const{variants:i,defaultVariants:o}=t,l=Object.keys(i).map(d=>{const h=n?.[d],p=o?.[d];if(h===null)return null;const g=sk(h)||sk(p);return i[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,...S}=h;return Object.entries(S).every(y=>{let[C,x]=y;return Array.isArray(x)?x.includes({...o,...c}[C]):{...o,...c}[C]===x})?[...d,p,g]:d},[]);return ok(e,l,u,n?.class,n?.className)},kre=el("focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-none border border-transparent bg-clip-padding text-xs font-medium focus-visible:ring-1 aria-invalid:ring-1 [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground",destructive:"bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-none px-2 text-xs has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-none px-2.5 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",icon:"size-8","icon-xs":"size-6 rounded-none [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-none","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function lh({className:e,variant:t="default",size:n="default",...r}){return j.jsx(Are,{"data-slot":"button",className:cn(kre({variant:t,size:n,className:e})),...r})}const Mre=()=>{const e=xne(),t=e?.name,n=e?.version,[,r]=u_();return j.jsx("div",{className:"flex flex-col border-b border-border bg-background",children:j.jsxs("div",{className:"flex h-14 items-center justify-between px-4",children:[j.jsxs("div",{className:"flex items-center gap-4",children:[j.jsx("button",{type:"button",className:"font-semibold cursor-pointer",onClick:()=>{r(null)},children:"Skybridge"}),j.jsx("span",{className:"h-4 w-px bg-border","aria-hidden":"true"}),j.jsxs("div",{className:"flex items-center gap-4 rounded-md border border-border bg-muted px-2 py-1",children:[j.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:t}),j.jsxs("span",{className:"text-xs text-muted-foreground",children:["v",n]})]}),j.jsxs("span",{className:"flex items-center gap-1 rounded-full bg-green-100 px-2 py-0.5 text-xs font-semibold text-green-800",children:[j.jsx("span",{className:"h-2 w-2 rounded-full bg-green-500 mr-1 inline-block"}),"Connected"]})]}),j.jsx("div",{className:"flex items-center gap-2",children:j.jsx(lh,{variant:"ghost",size:"sm",className:"h-8 gap-2",children:j.jsxs("a",{href:"https://www.skybridge.tech/",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2",children:["Learn more about Skybridge",j.jsx(zne,{className:"h-3.5 w-3.5"})]})})})]})})},cD=k.createContext({});function jre(e){const t=k.useRef(null);return t.current===null&&(t.current=e()),t.current}const G_=typeof window<"u",Pre=G_?k.useLayoutEffect:k.useEffect,Z_=k.createContext(null);function Y_(e,t){e.indexOf(t)===-1&&e.push(t)}function W_(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const jo=(e,t,n)=>n>t?t:n<e?e:n;let X_=()=>{};const Po={},uD=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function fD(e){return typeof e=="object"&&e!==null}const dD=e=>/^0[^.\s]+$/u.test(e);function Q_(e){let t;return()=>(t===void 0&&(t=e()),t)}const ns=e=>e,Nre=(e,t)=>n=>t(e(n)),qh=(...e)=>e.reduce(Nre),ch=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class J_{constructor(){this.subscriptions=[]}add(t){return Y_(this.subscriptions,t),()=>W_(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o<i;o++){const l=this.subscriptions[o];l&&l(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Bs=e=>e*1e3,es=e=>e/1e3;function hD(e,t){return t?e*(1e3/t):0}const pD=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Dre=1e-7,Ire=12;function $re(e,t,n,r,i){let o,l,c=0;do l=t+(n-t)/2,o=pD(l,r,i)-e,o>0?n=l:t=l;while(Math.abs(o)>Dre&&++c<Ire);return l}function Bh(e,t,n,r){if(e===t&&n===r)return ns;const i=o=>$re(o,0,1,e,n);return o=>o===0||o===1?o:pD(i(o),t,r)}const mD=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,gD=e=>t=>1-e(1-t),yD=Bh(.33,1.53,.69,.99),eE=gD(yD),vD=mD(eE),bD=e=>(e*=2)<1?.5*eE(e):.5*(2-Math.pow(2,-10*(e-1))),tE=e=>1-Math.sin(Math.acos(e)),SD=gD(tE),wD=mD(tE),zre=Bh(.42,0,1,1),Lre=Bh(0,0,.58,1),xD=Bh(.42,0,.58,1),Fre=e=>Array.isArray(e)&&typeof e[0]!="number",_D=e=>Array.isArray(e)&&typeof e[0]=="number",Ure={linear:ns,easeIn:zre,easeInOut:xD,easeOut:Lre,circIn:tE,circInOut:wD,circOut:SD,backIn:eE,backInOut:vD,backOut:yD,anticipate:bD},Vre=e=>typeof e=="string",ak=e=>{if(_D(e)){X_(e.length===4);const[t,n,r,i]=e;return Bh(t,n,r,i)}else if(Vre(e))return Ure[e];return e},lg=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function qre(e,t){let n=new Set,r=new Set,i=!1,o=!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&&i?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,i){o=!0;return}i=!0,[n,r]=[r,n],n.forEach(u),n.clear(),i=!1,o&&(o=!1,d.process(h))}};return d}const Bre=40;function ED(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,l=lg.reduce((E,b)=>(E[b]=qre(o),E),{}),{setup:c,read:u,resolveKeyframes:d,preUpdate:h,update:p,preRender:g,render:S,postRender:y}=l,C=()=>{const E=Po.useManualTiming?i.timestamp:performance.now();n=!1,Po.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(E-i.timestamp,Bre),1)),i.timestamp=E,i.isProcessing=!0,c.process(i),u.process(i),d.process(i),h.process(i),p.process(i),g.process(i),S.process(i),y.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(C))},x=()=>{n=!0,r=!0,i.isProcessing||e(C)};return{schedule:lg.reduce((E,b)=>{const T=l[b];return E[b]=(_,O=!1,M=!1)=>(n||x(),T.schedule(_,O,M)),E},{}),cancel:E=>{for(let b=0;b<lg.length;b++)l[lg[b]].cancel(E)},state:i,steps:l}}const{schedule:Gn,cancel:Ba,state:Ur,steps:j1}=ED(typeof requestAnimationFrame<"u"?requestAnimationFrame:ns,!0);let Dg;function Hre(){Dg=void 0}const gi={now:()=>(Dg===void 0&&gi.set(Ur.isProcessing||Po.useManualTiming?Ur.timestamp:performance.now()),Dg),set:e=>{Dg=e,queueMicrotask(Hre)}},CD=e=>t=>typeof t=="string"&&t.startsWith(e),TD=CD("--"),Kre=CD("var(--"),nE=e=>Kre(e)?Gre.test(e.split("/*")[0].trim()):!1,Gre=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,gf={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},uh={...gf,transform:e=>jo(0,1,e)},cg={...gf,default:1},Ud=e=>Math.round(e*1e5)/1e5,rE=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Zre(e){return e==null}const Yre=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,iE=(e,t)=>n=>!!(typeof n=="string"&&Yre.test(n)&&n.startsWith(e)||t&&!Zre(n)&&Object.prototype.hasOwnProperty.call(n,t)),RD=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,o,l,c]=r.match(rE);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(l),alpha:c!==void 0?parseFloat(c):1}},Wre=e=>jo(0,255,e),P1={...gf,transform:e=>Math.round(Wre(e))},Vl={test:iE("rgb","red"),parse:RD("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+P1.transform(e)+", "+P1.transform(t)+", "+P1.transform(n)+", "+Ud(uh.transform(r))+")"};function Xre(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const jw={test:iE("#"),parse:Xre,transform:Vl.transform},Hh=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Sa=Hh("deg"),Hs=Hh("%"),pt=Hh("px"),Qre=Hh("vh"),Jre=Hh("vw"),lk={...Hs,parse:e=>Hs.parse(e)/100,transform:e=>Hs.transform(e*100)},yu={test:iE("hsl","hue"),parse:RD("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Hs.transform(Ud(t))+", "+Hs.transform(Ud(n))+", "+Ud(uh.transform(r))+")"},vr={test:e=>Vl.test(e)||jw.test(e)||yu.test(e),parse:e=>Vl.test(e)?Vl.parse(e):yu.test(e)?yu.parse(e):jw.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Vl.transform(e):yu.transform(e),getAnimatableNone:e=>{const t=vr.parse(e);return t.alpha=0,vr.transform(t)}},eie=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function tie(e){return isNaN(e)&&typeof e=="string"&&(e.match(rE)?.length||0)+(e.match(eie)?.length||0)>0}const OD="number",AD="color",nie="var",rie="var(",ck="${}",iie=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function fh(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const c=t.replace(iie,u=>(vr.test(u)?(r.color.push(o),i.push(AD),n.push(vr.parse(u))):u.startsWith(rie)?(r.var.push(o),i.push(nie),n.push(u)):(r.number.push(o),i.push(OD),n.push(parseFloat(u))),++o,ck)).split(ck);return{values:n,split:c,indexes:r,types:i}}function kD(e){return fh(e).values}function MD(e){const{split:t,types:n}=fh(e),r=t.length;return i=>{let o="";for(let l=0;l<r;l++)if(o+=t[l],i[l]!==void 0){const c=n[l];c===OD?o+=Ud(i[l]):c===AD?o+=vr.transform(i[l]):o+=i[l]}return o}}const sie=e=>typeof e=="number"?0:vr.test(e)?vr.getAnimatableNone(e):e;function oie(e){const t=kD(e);return MD(e)(t.map(sie))}const Ha={test:tie,parse:kD,createTransformer:MD,getAnimatableNone:oie};function N1(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 aie({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,l=0;if(!t)i=o=l=n;else{const c=n<.5?n*(1+t):n+t-n*t,u=2*n-c;i=N1(u,c,e+1/3),o=N1(u,c,e),l=N1(u,c,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(l*255),alpha:r}}function Sy(e,t){return n=>n>0?t:e}const Wn=(e,t,n)=>e+(t-e)*n,D1=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},lie=[jw,Vl,yu],cie=e=>lie.find(t=>t.test(e));function uk(e){const t=cie(e);if(!t)return!1;let n=t.parse(e);return t===yu&&(n=aie(n)),n}const fk=(e,t)=>{const n=uk(e),r=uk(t);if(!n||!r)return Sy(e,t);const i={...n};return o=>(i.red=D1(n.red,r.red,o),i.green=D1(n.green,r.green,o),i.blue=D1(n.blue,r.blue,o),i.alpha=Wn(n.alpha,r.alpha,o),Vl.transform(i))},Pw=new Set(["none","hidden"]);function uie(e,t){return Pw.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function fie(e,t){return n=>Wn(e,t,n)}function sE(e){return typeof e=="number"?fie:typeof e=="string"?nE(e)?Sy:vr.test(e)?fk:pie:Array.isArray(e)?jD:typeof e=="object"?vr.test(e)?fk:die:Sy}function jD(e,t){const n=[...e],r=n.length,i=e.map((o,l)=>sE(o)(o,t[l]));return o=>{for(let l=0;l<r;l++)n[l]=i[l](o);return n}}function die(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=sE(e[i])(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}}function hie(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const o=t.types[i],l=e.indexes[o][r[o]],c=e.values[l]??0;n[i]=c,r[o]++}return n}const pie=(e,t)=>{const n=Ha.createTransformer(t),r=fh(e),i=fh(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Pw.has(e)&&!i.values.length||Pw.has(t)&&!r.values.length?uie(e,t):qh(jD(hie(r,i),i.values),n):Sy(e,t)};function PD(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Wn(e,t,n):sE(e)(e,t)}const mie=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Gn.update(t,n),stop:()=>Ba(t),now:()=>Ur.isProcessing?Ur.timestamp:gi.now()}},ND=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let o=0;o<i;o++)r+=Math.round(e(o/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},wy=2e4;function oE(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<wy;)t+=n,r=e.next(t);return t>=wy?1/0:t}function gie(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(oE(r),wy);return{type:"keyframes",ease:o=>r.next(i*o).value/t,duration:es(i)}}const yie=5;function DD(e,t,n){const r=Math.max(t-yie,0);return hD(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},I1=.001;function vie({duration:e=rr.duration,bounce:t=rr.bounce,velocity:n=rr.velocity,mass:r=rr.mass}){let i,o,l=1-t;l=jo(rr.minDamping,rr.maxDamping,l),e=jo(rr.minDuration,rr.maxDuration,es(e)),l<1?(i=d=>{const h=d*l,p=h*e,g=h-n,S=Nw(d,l),y=Math.exp(-p);return I1-g/S*y},o=d=>{const p=d*l*e,g=p*n+n,S=Math.pow(l,2)*Math.pow(d,2)*e,y=Math.exp(-p),C=Nw(Math.pow(d,2),l);return(-i(d)+I1>0?-1:1)*((g-S)*y)/C}):(i=d=>{const h=Math.exp(-d*e),p=(d-n)*e+1;return-I1+h*p},o=d=>{const h=Math.exp(-d*e),p=(n-d)*(e*e);return h*p});const c=5/e,u=Sie(i,o,c);if(e=Bs(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 bie=12;function Sie(e,t,n){let r=n;for(let i=1;i<bie;i++)r=r-e(r)/t(r);return r}function Nw(e,t){return e*Math.sqrt(1-t*t)}const wie=["duration","bounce"],xie=["stiffness","damping","mass"];function dk(e,t){return t.some(n=>e[n]!==void 0)}function _ie(e){let t={velocity:rr.velocity,stiffness:rr.stiffness,damping:rr.damping,mass:rr.mass,isResolvedFromDuration:!1,...e};if(!dk(e,xie)&&dk(e,wie))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,o=2*jo(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:rr.mass,stiffness:i,damping:o}}else{const n=vie(e);t={...t,...n,mass:rr.mass},t.isResolvedFromDuration=!0}return t}function xy(e=rr.visualDuration,t=rr.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const o=n.keyframes[0],l=n.keyframes[n.keyframes.length-1],c={done:!1,value:o},{stiffness:u,damping:d,mass:h,duration:p,velocity:g,isResolvedFromDuration:S}=_ie({...n,velocity:-es(n.velocity||0)}),y=g||0,C=d/(2*Math.sqrt(u*h)),x=l-o,w=es(Math.sqrt(u/h)),v=Math.abs(x)<5;r||(r=v?rr.restSpeed.granular:rr.restSpeed.default),i||(i=v?rr.restDelta.granular:rr.restDelta.default);let E;if(C<1){const T=Nw(w,C);E=_=>{const O=Math.exp(-C*w*_);return l-O*((y+C*w*x)/T*Math.sin(T*_)+x*Math.cos(T*_))}}else if(C===1)E=T=>l-Math.exp(-w*T)*(x+(y+w*x)*T);else{const T=w*Math.sqrt(C*C-1);E=_=>{const O=Math.exp(-C*w*_),M=Math.min(T*_,300);return l-O*((y+C*w*x)*Math.sinh(M)+T*x*Math.cosh(M))/T}}const b={calculatedDuration:S&&p||null,next:T=>{const _=E(T);if(S)c.done=T>=p;else{let O=T===0?y:0;C<1&&(O=T===0?Bs(y):DD(E,T,_));const M=Math.abs(O)<=r,P=Math.abs(l-_)<=i;c.done=M&&P}return c.value=c.done?l:_,c},toString:()=>{const T=Math.min(oE(b),wy),_=ND(O=>b.next(T*O).value,T,30);return T+"ms "+_},toTransition:()=>{}};return b}xy.applyToOptions=e=>{const t=gie(e,100,xy);return e.ease=t.ease,e.duration=Bs(t.duration),e.type="keyframes",e};function Dw({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:l,min:c,max:u,restDelta:d=.5,restSpeed:h}){const p=e[0],g={done:!1,value:p},S=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 C=n*t;const x=p+C,w=l===void 0?x:l(x);w!==x&&(C=w-p);const v=M=>-C*Math.exp(-M/r),E=M=>w+v(M),b=M=>{const P=v(M),z=E(M);g.done=Math.abs(P)<=d,g.value=g.done?w:z};let T,_;const O=M=>{S(g.value)&&(T=M,_=xy({keyframes:[g.value,y(g.value)],velocity:DD(E,M,g.value),damping:i,stiffness:o,restDelta:d,restSpeed:h}))};return O(0),{calculatedDuration:null,next:M=>{let P=!1;return!_&&T===void 0&&(P=!0,b(M),O(M)),T!==void 0&&M>=T?_.next(M-T):(!P&&b(M),g)}}}function Eie(e,t,n){const r=[],i=n||Po.mix||PD,o=e.length-1;for(let l=0;l<o;l++){let c=i(e[l],e[l+1]);if(t){const u=Array.isArray(t)?t[l]||ns:t;c=qh(u,c)}r.push(c)}return r}function Cie(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(X_(o===t.length),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const l=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const c=Eie(t,r,i),u=c.length,d=h=>{if(l&&h<e[0])return t[0];let p=0;if(u>1)for(;p<e.length-2&&!(h<e[p+1]);p++);const g=ch(e[p],e[p+1],h);return c[p](g)};return n?h=>d(jo(e[0],e[o-1],h)):d}function Tie(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=ch(0,t,r);e.push(Wn(n,1,i))}}function Rie(e){const t=[0];return Tie(t,e.length-1),t}function Oie(e,t){return e.map(n=>n*t)}function Aie(e,t){return e.map(()=>t||xD).splice(0,e.length-1)}function Vd({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=Fre(r)?r.map(ak):ak(r),o={done:!1,value:t[0]},l=Oie(n&&n.length===t.length?n:Rie(t),e),c=Cie(l,t,{ease:Array.isArray(i)?i:Aie(t,i)});return{calculatedDuration:e,next:u=>(o.value=c(u),o.done=u>=e,o)}}const kie=e=>e!==null;function aE(e,{repeat:t,repeatType:n="loop"},r,i=1){const o=e.filter(kie),c=i<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!c||r===void 0?o[c]:r}const Mie={decay:Dw,inertia:Dw,tween:Vd,keyframes:Vd,spring:xy};function ID(e){typeof e.type=="string"&&(e.type=Mie[e.type])}class lE{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 jie=e=>e/100;class cE extends lE{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!==gi.now()&&this.tick(gi.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;ID(t);const{type:n=Vd,repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:l=0}=t;let{keyframes:c}=t;const u=n||Vd;u!==Vd&&typeof c[0]!="number"&&(this.mixKeyframes=qh(jie,PD(c[0],c[1])),c=[0,100]);const d=u({...t,keyframes:c});o==="mirror"&&(this.mirroredGenerator=u({...t,keyframes:[...c].reverse(),velocity:-l})),d.calculatedDuration===null&&(d.calculatedDuration=oE(d));const{calculatedDuration:h}=d;this.calculatedDuration=h,this.resolvedDuration=h+i,this.totalDuration=this.resolvedDuration*(r+1)-i,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:i,mixKeyframes:o,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:S,type:y,onUpdate:C,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/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>i;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let E=this.currentTime,b=r;if(p){const M=Math.min(this.currentTime,i)/c;let P=Math.floor(M),z=M%1;!z&&M>=1&&(z=1),z===1&&P--,P=Math.min(P,p+1),P%2&&(g==="reverse"?(z=1-z,S&&(z-=S/c)):g==="mirror"&&(b=l)),E=jo(0,1,z)*c}const T=v?{done:!1,value:h[0]}:b.next(E);o&&(T.value=o(T.value));let{done:_}=T;!v&&u!==null&&(_=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const O=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&_);return O&&y!==Dw&&(T.value=aE(h,this.options,x,this.speed)),C&&C(T.value),O&&this.finish(),T}then(t,n){return this.finished.then(t,n)}get duration(){return es(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+es(t)}get time(){return es(this.currentTime)}set time(t){t=Bs(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(gi.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=es(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=mie,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),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(gi.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 Pie(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const ql=e=>e*180/Math.PI,Iw=e=>{const t=ql(Math.atan2(e[1],e[0]));return $w(t)},Nie={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Iw,rotateZ:Iw,skewX:e=>ql(Math.atan(e[1])),skewY:e=>ql(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},$w=e=>(e=e%360,e<0&&(e+=360),e),hk=Iw,pk=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),mk=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Die={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:pk,scaleY:mk,scale:e=>(pk(e)+mk(e))/2,rotateX:e=>$w(ql(Math.atan2(e[6],e[5]))),rotateY:e=>$w(ql(Math.atan2(-e[2],e[0]))),rotateZ:hk,rotate:hk,skewX:e=>ql(Math.atan(e[4])),skewY:e=>ql(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function zw(e){return e.includes("scale")?1:0}function Lw(e,t){if(!e||e==="none")return zw(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=Die,i=n;else{const c=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Nie,i=c}if(!i)return zw(t);const o=r[t],l=i[1].split(",").map($ie);return typeof o=="function"?o(l):l[o]}const Iie=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Lw(n,t)};function $ie(e){return parseFloat(e.trim())}const yf=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],vf=new Set(yf),gk=e=>e===gf||e===pt,zie=new Set(["x","y","z"]),Lie=yf.filter(e=>!zie.has(e));function Fie(e){const t=[];return Lie.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Kl={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})=>Lw(t,"x"),y:(e,{transform:t})=>Lw(t,"y")};Kl.translateX=Kl.x;Kl.translateY=Kl.y;const Gl=new Set;let Fw=!1,Uw=!1,Vw=!1;function $D(){if(Uw){const e=Array.from(Gl).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=Fie(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([o,l])=>{r.getValue(o)?.set(l)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Uw=!1,Fw=!1,Gl.forEach(e=>e.complete(Vw)),Gl.clear()}function zD(){Gl.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Uw=!0)})}function Uie(){Vw=!0,zD(),$D(),Vw=!1}class uE{constructor(t,n,r,i,o,l=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=o,this.isAsync=l}scheduleResolve(){this.state="scheduled",this.isAsync?(Gl.add(this),Fw||(Fw=!0,Gn.read(zD),Gn.resolveKeyframes($D))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;if(t[0]===null){const o=i?.get(),l=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const c=r.readValue(n,l);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=l),i&&o===void 0&&i.set(t[0])}Pie(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 Vie=e=>e.startsWith("--");function qie(e,t,n){Vie(t)?e.style.setProperty(t,n):e.style[t]=n}const Bie=Q_(()=>window.ScrollTimeline!==void 0),Hie={};function Kie(e,t){const n=Q_(e);return()=>Hie[t]??n()}const LD=Kie(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),jd=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,yk={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:jd([0,.65,.55,1]),circOut:jd([.55,0,1,.45]),backIn:jd([.31,.01,.66,-.59]),backOut:jd([.33,1.53,.69,.99])};function FD(e,t){if(e)return typeof e=="function"?LD()?ND(e,t):"ease-out":_D(e)?jd(e):Array.isArray(e)?e.map(n=>FD(n,t)||yk.easeOut):yk[e]}function Gie(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:l="loop",ease:c="easeOut",times:u}={},d=void 0){const h={[t]:n};u&&(h.offset=u);const p=FD(c,i);Array.isArray(p)&&(h.easing=p);const g={delay:r,duration:i,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:o+1,direction:l==="reverse"?"alternate":"normal"};return d&&(g.pseudoElement=d),e.animate(h,g)}function UD(e){return typeof e=="function"&&"applyToOptions"in e}function Zie({type:e,...t}){return UD(e)&&LD()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Yie extends lE{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:i,pseudoElement:o,allowFlatten:l=!1,finalKeyframe:c,onComplete:u}=t;this.isPseudoElement=!!o,this.allowFlatten=l,this.options=t,X_(typeof t.type!="string");const d=Zie(t);this.animation=Gie(n,r,i,d,o),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const h=aE(i,this.options,c,this.speed);this.updateMotionValue?this.updateMotionValue(h):qie(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 es(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+es(t)}get time(){return es(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Bs(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&&Bie()?(this.animation.timeline=t,ns):n(this)}}const VD={anticipate:bD,backInOut:vD,circInOut:wD};function Wie(e){return e in VD}function Xie(e){typeof e.ease=="string"&&Wie(e.ease)&&(e.ease=VD[e.ease])}const vk=10;class Qie extends Yie{constructor(t){Xie(t),ID(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:i,element:o,...l}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const c=new cE({...l,autoplay:!1}),u=Bs(this.finishedTime??this.time);n.setWithVelocity(c.sample(u-vk).value,c.sample(u).value,vk),c.stop()}}const bk=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ha.test(e)||e==="0")&&!e.startsWith("url("));function Jie(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 ese(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],l=bk(i,t),c=bk(o,t);return!l||!c?!1:Jie(e)||(n==="spring"||UD(n))&&r}function qw(e){e.duration=0,e.type="keyframes"}const tse=new Set(["opacity","clipPath","filter","transform"]),nse=Q_(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function rse(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:o,type:l}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:d}=t.owner.getProps();return nse()&&n&&tse.has(n)&&(n!=="transform"||!d)&&!u&&!r&&i!=="mirror"&&o!==0&&l!=="inertia"}const ise=40;class sse extends lE{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:o=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=gi.now();const g={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:o,repeatType:l,name:u,motionValue:d,element:h,...p},S=h?.KeyframeResolver||uE;this.keyframeResolver=new S(c,(y,C,x)=>this.onKeyframesResolved(y,C,g,!x),u,d,h),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,i){this.keyframeResolver=void 0;const{name:o,type:l,velocity:c,delay:u,isHandoff:d,onUpdate:h}=r;this.resolvedAt=gi.now(),ese(t,o,l,c)||((Po.instantAnimations||!u)&&h?.(aE(t,r,n)),t[0]=t[t.length-1],qw(r),r.repeat=0);const g={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>ise?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},S=!d&&rse(g)?new Qie({...g,element:g.motionValue.owner.current}):new cE(g);S.finished.then(()=>this.notifyFinished()).catch(ns),this.pendingTimeline&&(this.stopTimeline=S.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=S}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(),Uie()),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 ose=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ase(e){const t=ose.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function qD(e,t,n=1){const[r,i]=ase(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const l=o.trim();return uD(l)?parseFloat(l):l}return nE(i)?qD(i,t,n+1):i}function fE(e,t){return e?.[t]??e?.default??e}const BD=new Set(["width","height","top","left","right","bottom",...yf]),lse={test:e=>e==="auto",parse:e=>e},HD=e=>t=>t.test(e),KD=[gf,pt,Hs,Sa,Jre,Qre,lse],Sk=e=>KD.find(HD(e));function cse(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||dD(e):!0}const use=new Set(["brightness","contrast","saturate","opacity"]);function fse(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(rE)||[];if(!r)return e;const i=n.replace(r,"");let o=use.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const dse=/\b([a-z-]*)\(.*?\)/gu,Bw={...Ha,getAnimatableNone:e=>{const t=e.match(dse);return t?t.map(fse).join(" "):e}},wk={...gf,transform:Math.round},hse={rotate:Sa,rotateX:Sa,rotateY:Sa,rotateZ:Sa,scale:cg,scaleX:cg,scaleY:cg,scaleZ:cg,skew:Sa,skewX:Sa,skewY:Sa,distance:pt,translateX:pt,translateY:pt,translateZ:pt,x:pt,y:pt,z:pt,perspective:pt,transformPerspective:pt,opacity:uh,originX:lk,originY:lk,originZ:pt},dE={borderWidth:pt,borderTopWidth:pt,borderRightWidth:pt,borderBottomWidth:pt,borderLeftWidth:pt,borderRadius:pt,radius:pt,borderTopLeftRadius:pt,borderTopRightRadius:pt,borderBottomRightRadius:pt,borderBottomLeftRadius:pt,width:pt,maxWidth:pt,height:pt,maxHeight:pt,top:pt,right:pt,bottom:pt,left:pt,padding:pt,paddingTop:pt,paddingRight:pt,paddingBottom:pt,paddingLeft:pt,margin:pt,marginTop:pt,marginRight:pt,marginBottom:pt,marginLeft:pt,backgroundPositionX:pt,backgroundPositionY:pt,...hse,zIndex:wk,fillOpacity:uh,strokeOpacity:uh,numOctaves:wk},pse={...dE,color:vr,backgroundColor:vr,outlineColor:vr,fill:vr,stroke:vr,borderColor:vr,borderTopColor:vr,borderRightColor:vr,borderBottomColor:vr,borderLeftColor:vr,filter:Bw,WebkitFilter:Bw},GD=e=>pse[e];function ZD(e,t){let n=GD(e);return n!==Bw&&(n=Ha),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const mse=new Set(["auto","none","0"]);function gse(e,t,n){let r=0,i;for(;r<e.length&&!i;){const o=e[r];typeof o=="string"&&!mse.has(o)&&fh(o).values.length&&(i=e[r]),r++}if(i&&n)for(const o of t)e[o]=ZD(n,i)}class yse extends uE{constructor(t,n,r,i,o){super(t,n,r,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let d=t[u];if(typeof d=="string"&&(d=d.trim(),nE(d))){const h=qD(d,n.current);h!==void 0&&(t[u]=h),u===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!BD.has(r)||t.length!==2)return;const[i,o]=t,l=Sk(i),c=Sk(o);if(l!==c)if(gk(l)&&gk(c))for(let u=0;u<t.length;u++){const d=t[u];typeof d=="string"&&(t[u]=parseFloat(d))}else Kl[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)(t[i]===null||cse(t[i]))&&r.push(i);r.length&&gse(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=Kl[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=r.length-1,l=r[o];r[o]=Kl[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 vse(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}const YD=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function bse(e){return fD(e)&&"offsetHeight"in e}const xk=30,Sse=e=>!isNaN(parseFloat(e));class wse{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const i=gi.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=gi.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Sse(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 J_);const r=this.events[t].add(n);return t==="change"?()=>{r(),Gn.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=gi.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>xk)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,xk);return hD(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Hu(e,t){return new wse(e,t)}const{schedule:hE}=ED(queueMicrotask,!1),ws={x:!1,y:!1};function WD(){return ws.x||ws.y}function xse(e){return e==="x"||e==="y"?ws[e]?null:(ws[e]=!0,()=>{ws[e]=!1}):ws.x||ws.y?null:(ws.x=ws.y=!0,()=>{ws.x=ws.y=!1})}function XD(e,t){const n=vse(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function _k(e){return!(e.pointerType==="touch"||WD())}function _se(e,t,n={}){const[r,i,o]=XD(e,n),l=c=>{if(!_k(c))return;const{target:u}=c,d=t(u,c);if(typeof d!="function"||!u)return;const h=p=>{_k(p)&&(d(p),u.removeEventListener("pointerleave",h))};u.addEventListener("pointerleave",h,i)};return r.forEach(c=>{c.addEventListener("pointerenter",l,i)}),o}const QD=(e,t)=>t?e===t?!0:QD(e,t.parentElement):!1,pE=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Ese=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Cse(e){return Ese.has(e.tagName)||e.tabIndex!==-1}const Ig=new WeakSet;function Ek(e){return t=>{t.key==="Enter"&&e(t)}}function $1(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Tse=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Ek(()=>{if(Ig.has(n))return;$1(n,"down");const i=Ek(()=>{$1(n,"up")}),o=()=>$1(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Ck(e){return pE(e)&&!WD()}function Rse(e,t,n={}){const[r,i,o]=XD(e,n),l=c=>{const u=c.currentTarget;if(!Ck(c))return;Ig.add(u);const d=t(u,c),h=(S,y)=>{window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",g),Ig.has(u)&&Ig.delete(u),Ck(S)&&typeof d=="function"&&d(S,{success:y})},p=S=>{h(S,u===window||u===document||n.useGlobalTarget||QD(u,S.target))},g=S=>{h(S,!1)};window.addEventListener("pointerup",p,i),window.addEventListener("pointercancel",g,i)};return r.forEach(c=>{(n.useGlobalTarget?window:c).addEventListener("pointerdown",l,i),bse(c)&&(c.addEventListener("focus",d=>Tse(d,i)),!Cse(c)&&!c.hasAttribute("tabindex")&&(c.tabIndex=0))}),o}function JD(e){return fD(e)&&"ownerSVGElement"in e}function Ose(e){return JD(e)&&e.tagName==="svg"}const Qr=e=>!!(e&&e.getVelocity),Ase=[...KD,vr,Ha],kse=e=>Ase.find(HD(e)),eI=k.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Mse(e=!0){const t=k.useContext(Z_);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,o=k.useId();k.useEffect(()=>{if(e)return i(o)},[e]);const l=k.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,l]:[!0]}const tI=k.createContext({strict:!1}),Tk={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"]},Ku={};for(const e in Tk)Ku[e]={isEnabled:t=>Tk[e].some(n=>!!t[n])};function jse(e){for(const t in e)Ku[t]={...Ku[t],...e[t]}}const Pse=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 _y(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Pse.has(e)}let nI=e=>!_y(e);function Nse(e){typeof e=="function"&&(nI=t=>t.startsWith("on")?!_y(t):e(t))}try{Nse(require("@emotion/is-prop-valid").default)}catch{}function Dse(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(nI(i)||n===!0&&_y(i)||!t&&!_y(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const E0=k.createContext({});function C0(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function dh(e){return typeof e=="string"||Array.isArray(e)}const mE=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],gE=["initial",...mE];function T0(e){return C0(e.animate)||gE.some(t=>dh(e[t]))}function rI(e){return!!(T0(e)||e.variants)}function Ise(e,t){if(T0(e)){const{initial:n,animate:r}=e;return{initial:n===!1||dh(n)?n:void 0,animate:dh(r)?r:void 0}}return e.inherit!==!1?t:{}}function $se(e){const{initial:t,animate:n}=Ise(e,k.useContext(E0));return k.useMemo(()=>({initial:t,animate:n}),[Rk(t),Rk(n)])}function Rk(e){return Array.isArray(e)?e.join(" "):e}function Ok(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const xd={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(pt.test(e))e=parseFloat(e);else return e;const n=Ok(e,t.target.x),r=Ok(e,t.target.y);return`${n}% ${r}%`}},zse={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Ha.parse(e);if(i.length>5)return r;const o=Ha.createTransformer(e),l=typeof i[0]!="number"?1:0,c=n.x.scale*t.x,u=n.y.scale*t.y;i[0+l]/=c,i[1+l]/=u;const d=Wn(c,u,.5);return typeof i[2+l]=="number"&&(i[2+l]/=d),typeof i[3+l]=="number"&&(i[3+l]/=d),o(i)}},Hw={borderRadius:{...xd,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:xd,borderTopRightRadius:xd,borderBottomLeftRadius:xd,borderBottomRightRadius:xd,boxShadow:zse};function iI(e,{layout:t,layoutId:n}){return vf.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Hw[e]||e==="opacity")}const Lse={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Fse=yf.length;function Use(e,t,n){let r="",i=!0;for(let o=0;o<Fse;o++){const l=yf[o],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=YD(c,dE[l]);if(!u){i=!1;const h=Lse[l]||l;r+=`${h}(${d}) `}n&&(t[l]=d)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function yE(e,t,n){const{style:r,vars:i,transformOrigin:o}=e;let l=!1,c=!1;for(const u in t){const d=t[u];if(vf.has(u)){l=!0;continue}else if(TD(u)){i[u]=d;continue}else{const h=YD(d,dE[u]);u.startsWith("origin")?(c=!0,o[u]=h):r[u]=h}}if(t.transform||(l||n?r.transform=Use(t,e.transform,n):r.transform&&(r.transform="none")),c){const{originX:u="50%",originY:d="50%",originZ:h=0}=o;r.transformOrigin=`${u} ${d} ${h}`}}const vE=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function sI(e,t,n){for(const r in t)!Qr(t[r])&&!iI(r,n)&&(e[r]=t[r])}function Vse({transformTemplate:e},t){return k.useMemo(()=>{const n=vE();return yE(n,t,e),Object.assign({},n.vars,n.style)},[t])}function qse(e,t){const n=e.style||{},r={};return sI(r,n,e),Object.assign(r,Vse(e,t)),r}function Bse(e,t){const n={},r=qse(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 Hse={offset:"stroke-dashoffset",array:"stroke-dasharray"},Kse={offset:"strokeDashoffset",array:"strokeDasharray"};function Gse(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Hse:Kse;e[o.offset]=pt.transform(-r);const l=pt.transform(t),c=pt.transform(n);e[o.array]=`${l} ${c}`}function oI(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:o=1,pathOffset:l=0,...c},u,d,h){if(yE(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),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),i!==void 0&&Gse(p,i,o,l,!1)}const aI=()=>({...vE(),attrs:{}}),lI=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Zse(e,t,n,r){const i=k.useMemo(()=>{const o=aI();return oI(o,t,lI(r),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};sI(o,e.style,e),i.style={...o,...i.style}}return i}const Yse=["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 bE(e){return typeof e!="string"||e.includes("-")?!1:!!(Yse.indexOf(e)>-1||/[A-Z]/u.test(e))}function Wse(e,t,n,{latestValues:r},i,o=!1){const c=(bE(e)?Zse:Bse)(t,r,i,e),u=Dse(t,typeof e=="string",o),d=e!==k.Fragment?{...u,...c,ref:n}:{},{children:h}=t,p=k.useMemo(()=>Qr(h)?h.get():h,[h]);return k.createElement(e,{...d,children:p})}function Ak(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function SE(e,t,n,r){if(typeof t=="function"){const[i,o]=Ak(r);t=t(n!==void 0?n:e.custom,i,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,o]=Ak(r);t=t(n!==void 0?n:e.custom,i,o)}return t}function $g(e){return Qr(e)?e.get():e}function Xse({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Qse(n,r,i,e),renderState:t()}}function Qse(e,t,n,r){const i={},o=r(e,{});for(const g in o)i[g]=$g(o[g]);let{initial:l,animate:c}=e;const u=T0(e),d=rI(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"&&!C0(p)){const g=Array.isArray(p)?p:[p];for(let S=0;S<g.length;S++){const y=SE(e,g[S]);if(y){const{transitionEnd:C,transition:x,...w}=y;for(const v in w){let E=w[v];if(Array.isArray(E)){const b=h?E.length-1:0;E=E[b]}E!==null&&(i[v]=E)}for(const v in C)i[v]=C[v]}}}return i}const cI=e=>(t,n)=>{const r=k.useContext(E0),i=k.useContext(Z_),o=()=>Xse(e,t,r,i);return n?o():jre(o)};function wE(e,t,n){const{style:r}=e,i={};for(const o in r)(Qr(r[o])||t.style&&Qr(t.style[o])||iI(o,e)||n?.getValue(o)?.liveStyle!==void 0)&&(i[o]=r[o]);return i}const Jse=cI({scrapeMotionValuesFromProps:wE,createRenderState:vE});function uI(e,t,n){const r=wE(e,t,n);for(const i in e)if(Qr(e[i])||Qr(t[i])){const o=yf.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=e[i]}return r}const eoe=cI({scrapeMotionValuesFromProps:uI,createRenderState:aI}),toe=Symbol.for("motionComponentSymbol");function vu(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function noe(e,t,n){return k.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):vu(n)&&(n.current=r))},[t])}const xE=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),roe="framerAppearId",fI="data-"+xE(roe),dI=k.createContext({});function ioe(e,t,n,r,i){const{visualElement:o}=k.useContext(E0),l=k.useContext(tI),c=k.useContext(Z_),u=k.useContext(eI).reducedMotion,d=k.useRef(null);r=r||l.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const h=d.current,p=k.useContext(dI);h&&!h.projection&&i&&(h.type==="html"||h.type==="svg")&&soe(d.current,n,i,p);const g=k.useRef(!1);k.useInsertionEffect(()=>{h&&g.current&&h.update(n,c)});const S=n[fI],y=k.useRef(!!S&&!window.MotionHandoffIsComplete?.(S)&&window.MotionHasOptimisedAnimation?.(S));return Pre(()=>{h&&(g.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),h.scheduleRenderMicrotask(),y.current&&h.animationState&&h.animationState.animateChanges())}),k.useEffect(()=>{h&&(!y.current&&h.animationState&&h.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(S)}),y.current=!1),h.enteringChildren=void 0)}),h}function soe(e,t,n,r){const{layoutId:i,layout:o,drag:l,dragConstraints:c,layoutScroll:u,layoutRoot:d,layoutCrossfade:h}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:hI(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!l||c&&vu(c),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:h,layoutScroll:u,layoutRoot:d})}function hI(e){if(e)return e.options.allowProjection!==!1?e.projection:hI(e.parent)}function z1(e,{forwardMotionProps:t=!1}={},n,r){n&&jse(n);const i=bE(e)?eoe:Jse;function o(c,u){let d;const h={...k.useContext(eI),...c,layoutId:ooe(c)},{isStatic:p}=h,g=$se(c),S=i(c,p);if(!p&&G_){aoe();const y=loe(h);d=y.MeasureLayout,g.visualElement=ioe(e,S,h,r,y.ProjectionNode)}return j.jsxs(E0.Provider,{value:g,children:[d&&g.visualElement?j.jsx(d,{visualElement:g.visualElement,...h}):null,Wse(e,c,noe(S,g.visualElement,u),S,p,t)]})}o.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=k.forwardRef(o);return l[toe]=e,l}function ooe({layoutId:e}){const t=k.useContext(cD).id;return t&&e!==void 0?t+"-"+e:e}function aoe(e,t){k.useContext(tI).strict}function loe(e){const{drag:t,layout:n}=Ku;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function coe(e,t){if(typeof Proxy>"u")return z1;const n=new Map,r=(o,l)=>z1(o,l,e,t),i=(o,l)=>r(o,l);return new Proxy(i,{get:(o,l)=>l==="create"?r:(n.has(l)||n.set(l,z1(l,void 0,e,t)),n.get(l))})}function pI({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function uoe({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function foe(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 L1(e){return e===void 0||e===1}function Kw({scale:e,scaleX:t,scaleY:n}){return!L1(e)||!L1(t)||!L1(n)}function zl(e){return Kw(e)||mI(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function mI(e){return kk(e.x)||kk(e.y)}function kk(e){return e&&e!=="0%"}function Ey(e,t,n){const r=e-n,i=t*r;return n+i}function Mk(e,t,n,r,i){return i!==void 0&&(e=Ey(e,i,r)),Ey(e,n,r)+t}function Gw(e,t=0,n=1,r,i){e.min=Mk(e.min,t,n,r,i),e.max=Mk(e.max,t,n,r,i)}function gI(e,{x:t,y:n}){Gw(e.x,t.translate,t.scale,t.originPoint),Gw(e.y,n.translate,n.scale,n.originPoint)}const jk=.999999999999,Pk=1.0000000000001;function doe(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,l;for(let c=0;c<i;c++){o=n[c],l=o.projectionDelta;const{visualElement:u}=o.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Su(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,gI(e,l)),r&&zl(o.latestValues)&&Su(e,o.latestValues))}t.x<Pk&&t.x>jk&&(t.x=1),t.y<Pk&&t.y>jk&&(t.y=1)}function bu(e,t){e.min=e.min+t,e.max=e.max+t}function Nk(e,t,n,r,i=.5){const o=Wn(e.min,e.max,i);Gw(e,t,n,o,r)}function Su(e,t){Nk(e.x,t.x,t.scaleX,t.scale,t.originX),Nk(e.y,t.y,t.scaleY,t.scale,t.originY)}function yI(e,t){return pI(foe(e.getBoundingClientRect(),t))}function hoe(e,t,n){const r=yI(e,n),{scroll:i}=t;return i&&(bu(r.x,i.offset.x),bu(r.y,i.offset.y)),r}const Dk=()=>({translate:0,scale:1,origin:0,originPoint:0}),wu=()=>({x:Dk(),y:Dk()}),Ik=()=>({min:0,max:0}),Cr=()=>({x:Ik(),y:Ik()}),Zw={current:null},vI={current:!1};function poe(){if(vI.current=!0,!!G_)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Zw.current=e.matches;e.addEventListener("change",t),t()}else Zw.current=!1}const moe=new WeakMap;function goe(e,t,n){for(const r in t){const i=t[r],o=n[r];if(Qr(i))e.addValue(r,i);else if(Qr(o))e.addValue(r,Hu(i,{owner:e}));else if(o!==i)if(e.hasValue(r)){const l=e.getValue(r);l.liveStyle===!0?l.jump(i):l.hasAnimated||l.set(i)}else{const l=e.getStaticValue(r);e.addValue(r,Hu(l!==void 0?l:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const $k=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class yoe{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:o,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=uE,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=gi.now();this.renderScheduledAt<g&&(this.renderScheduledAt=g,Gn.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=i,this.options=c,this.blockInitialAnimation=!!o,this.isControllingVariants=T0(n),this.isVariantNode=rI(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 S=p[g];u[g]!==void 0&&Qr(S)&&S.set(u[g])}}mount(t){this.current=t,moe.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)),vI.current||poe(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Zw.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=vf.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&Gn.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),o&&o(),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 Ku){const n=Ku[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.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<$k.length;r++){const i=$k[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,l=t[o];l&&(this.propEventSubscriptions[i]=this.on(i,l))}this.prevMotionValues=goe(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Hu(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(uD(r)||dD(r))?r=parseFloat(r):!kse(r)&&Ha.test(n)&&(r=ZD(t,n)),this.setBaseTarget(t,Qr(r)?r.get():r)),Qr(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 o=SE(this.props,n,this.presenceContext?.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!Qr(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new J_),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){hE.render(this.render)}}class bI extends yoe{constructor(){super(...arguments),this.KeyframeResolver=yse}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;Qr(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function SI(e,{style:t,vars:n},r,i){const o=e.style;let l;for(l in t)o[l]=t[l];i?.applyProjectionStyles(o,r);for(l in n)o.setProperty(l,n[l])}function voe(e){return window.getComputedStyle(e)}class boe extends bI{constructor(){super(...arguments),this.type="html",this.renderInstance=SI}readValueFromInstance(t,n){if(vf.has(n))return this.projection?.isProjecting?zw(n):Iie(t,n);{const r=voe(t),i=(TD(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return yI(t,n)}build(t,n,r){yE(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return wE(t,n,r)}}const wI=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 Soe(e,t,n,r){SI(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(wI.has(i)?i:xE(i),t.attrs[i])}class woe extends bI{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Cr}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(vf.has(n)){const r=GD(n);return r&&r.default||0}return n=wI.has(n)?n:xE(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return uI(t,n,r)}build(t,n,r){oI(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){Soe(t,n,r,i)}mount(t){this.isSVGTag=lI(t.tagName),super.mount(t)}}const xoe=(e,t)=>bE(e)?new woe(t):new boe(t,{allowProjection:e!==k.Fragment});function Ou(e,t,n){const r=e.getProps();return SE(r,t,n!==void 0?n:r.custom,e)}const Yw=e=>Array.isArray(e);function _oe(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Hu(n))}function Eoe(e){return Yw(e)?e[e.length-1]||0:e}function Coe(e,t){const n=Ou(e,t);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const l in o){const c=Eoe(o[l]);_oe(e,l,c)}}function Toe(e){return!!(Qr(e)&&e.add)}function Ww(e,t){const n=e.getValue("willChange");if(Toe(n))return n.add(t);if(!n&&Po.WillChange){const r=new Po.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function xI(e){return e.props[fI]}const Roe=e=>e!==null;function Ooe(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(Roe),o=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[o]}const Aoe={type:"spring",stiffness:500,damping:25,restSpeed:10},koe=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Moe={type:"keyframes",duration:.8},joe={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Poe=(e,{keyframes:t})=>t.length>2?Moe:vf.has(e)?e.startsWith("scale")?koe(t[1]):Aoe:joe;function Noe({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:l,repeatDelay:c,from:u,elapsed:d,...h}){return!!Object.keys(h).length}const _E=(e,t,n,r={},i,o)=>l=>{const c=fE(r,e)||{},u=c.delay||r.delay||0;let{elapsed:d=0}=r;d=d-Bs(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:o?void 0:i};Noe(c)||Object.assign(h,Poe(e,h)),h.duration&&(h.duration=Bs(h.duration)),h.repeatDelay&&(h.repeatDelay=Bs(h.repeatDelay)),h.from!==void 0&&(h.keyframes[0]=h.from);let p=!1;if((h.type===!1||h.duration===0&&!h.repeatDelay)&&(qw(h),h.delay===0&&(p=!0)),(Po.instantAnimations||Po.skipAnimations)&&(p=!0,qw(h),h.delay=0),h.allowFlatten=!c.type&&!c.ease,p&&!o&&t.get()!==void 0){const g=Ooe(h.keyframes,c);if(g!==void 0){Gn.update(()=>{h.onUpdate(g),h.onComplete()});return}}return c.isSync?new cE(h):new sse(h)};function Doe({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function _I(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:l,...c}=t;r&&(o=r);const u=[],d=i&&e.animationState&&e.animationState.getState()[i];for(const h in c){const p=e.getValue(h,e.latestValues[h]??null),g=c[h];if(g===void 0||d&&Doe(d,h))continue;const S={delay:n,...fE(o||{},h)},y=p.get();if(y!==void 0&&!p.isAnimating&&!Array.isArray(g)&&g===y&&!S.velocity)continue;let C=!1;if(window.MotionHandoffAnimation){const w=xI(e);if(w){const v=window.MotionHandoffAnimation(w,h,Gn);v!==null&&(S.startTime=v,C=!0)}}Ww(e,h),p.start(_E(h,p,g,e.shouldReduceMotion&&BD.has(h)?{type:!1}:S,e,C));const x=p.animation;x&&u.push(x)}return l&&Promise.all(u).then(()=>{Gn.update(()=>{l&&Coe(e,l)})}),u}function EI(e,t,n,r=0,i=1){const o=Array.from(e).sort((d,h)=>d.sortNodePosition(h)).indexOf(t),l=e.size,c=(l-1)*r;return typeof n=="function"?n(o,l):i===1?o*r:c-o*r}function Xw(e,t,n={}){const r=Ou(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(_I(e,r,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:h,staggerDirection:p}=i;return Ioe(e,t,u,d,h,p,n)}:()=>Promise.resolve(),{when:c}=i;if(c){const[u,d]=c==="beforeChildren"?[o,l]:[l,o];return u().then(()=>d())}else return Promise.all([o(),l(n.delay)])}function Ioe(e,t,n=0,r=0,i=0,o=1,l){const c=[];for(const u of e.variantChildren)u.notify("AnimationStart",t),c.push(Xw(u,t,{...l,delay:n+(typeof r=="function"?0:r)+EI(e.variantChildren,u,r,i,o)}).then(()=>u.notify("AnimationComplete",t)));return Promise.all(c)}function $oe(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>Xw(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=Xw(e,t,n);else{const i=typeof t=="function"?Ou(e,t,n.custom):t;r=Promise.all(_I(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function CI(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 zoe=gE.length;function TI(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?TI(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<zoe;n++){const r=gE[n],i=e.props[r];(dh(i)||i===!1)&&(t[r]=i)}return t}const Loe=[...mE].reverse(),Foe=mE.length;function Uoe(e){return t=>Promise.all(t.map(({animation:n,options:r})=>$oe(e,n,r)))}function Voe(e){let t=Uoe(e),n=zk(),r=!0;const i=u=>(d,h)=>{const p=Ou(e,h,u==="exit"?e.presenceContext?.custom:void 0);if(p){const{transition:g,transitionEnd:S,...y}=p;d={...d,...y,...S}}return d};function o(u){t=u(e)}function l(u){const{props:d}=e,h=TI(e.parent)||{},p=[],g=new Set;let S={},y=1/0;for(let x=0;x<Foe;x++){const w=Loe[x],v=n[w],E=d[w]!==void 0?d[w]:h[w],b=dh(E),T=w===u?v.isActive:null;T===!1&&(y=x);let _=E===h[w]&&E!==d[w]&&b;if(_&&r&&e.manuallyAnimateOnMount&&(_=!1),v.protectedKeys={...S},!v.isActive&&T===null||!E&&!v.prevProp||C0(E)||typeof E=="boolean")continue;const O=qoe(v.prevProp,E);let M=O||w===u&&v.isActive&&!_&&b||x>y&&b,P=!1;const z=Array.isArray(E)?E:[E];let L=z.reduce(i(w),{});T===!1&&(L={});const{prevResolvedValues:q={}}=v,Z={...q,...L},te=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 Z){const Y=L[H],oe=q[H];if(S.hasOwnProperty(H))continue;let re=!1;Yw(Y)&&Yw(oe)?re=!CI(Y,oe):re=Y!==oe,re?Y!=null?te(H):g.add(H):Y!==void 0&&g.has(H)?te(H):v.protectedKeys[H]=!0}v.prevProp=E,v.prevResolvedValues=L,v.isActive&&(S={...S,...L}),r&&e.blockInitialAnimation&&(M=!1);const ee=_&&O;M&&(!ee||P)&&p.push(...z.map(H=>{const Y={type:w};if(typeof H=="string"&&r&&!ee&&e.manuallyAnimateOnMount&&e.parent){const{parent:oe}=e,re=Ou(oe,H);if(oe.enteringChildren&&re){const{delayChildren:I}=re.transition||{};Y.delay=EI(oe.enteringChildren,e,I)}}return{animation:H,options:Y}}))}if(g.size){const x={};if(typeof d.initial!="boolean"){const w=Ou(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),E=e.getValue(w);E&&(E.liveStyle=!0),x[w]=v??null}),p.push({animation:x})}let C=!!p.length;return r&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(C=!1),r=!1,C?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:o,getState:()=>n,reset:()=>{n=zk()}}}function qoe(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!CI(t,e):!1}function Nl(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function zk(){return{animate:Nl(!0),whileInView:Nl(),whileHover:Nl(),whileTap:Nl(),whileDrag:Nl(),whileFocus:Nl(),exit:Nl()}}class tl{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Boe extends tl{constructor(t){super(t),t.animationState||(t.animationState=Voe(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();C0(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 Hoe=0;class Koe extends tl{constructor(){super(...arguments),this.id=Hoe++}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 i=this.node.animationState.setActive("exit",!t);n&&!t&&i.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 Goe={animation:{Feature:Boe},exit:{Feature:Koe}};function hh(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Kh(e){return{point:{x:e.pageX,y:e.pageY}}}const Zoe=e=>t=>pE(t)&&e(t,Kh(t));function qd(e,t,n,r){return hh(e,t,Zoe(n),r)}const RI=1e-4,Yoe=1-RI,Woe=1+RI,OI=.01,Xoe=0-OI,Qoe=0+OI;function ai(e){return e.max-e.min}function Joe(e,t,n){return Math.abs(e-t)<=n}function Lk(e,t,n,r=.5){e.origin=r,e.originPoint=Wn(t.min,t.max,e.origin),e.scale=ai(n)/ai(t),e.translate=Wn(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Yoe&&e.scale<=Woe||isNaN(e.scale))&&(e.scale=1),(e.translate>=Xoe&&e.translate<=Qoe||isNaN(e.translate))&&(e.translate=0)}function Bd(e,t,n,r){Lk(e.x,t.x,n.x,r?r.originX:void 0),Lk(e.y,t.y,n.y,r?r.originY:void 0)}function Fk(e,t,n){e.min=n.min+t.min,e.max=e.min+ai(t)}function eae(e,t,n){Fk(e.x,t.x,n.x),Fk(e.y,t.y,n.y)}function Uk(e,t,n){e.min=t.min-n.min,e.max=e.min+ai(t)}function Cy(e,t,n){Uk(e.x,t.x,n.x),Uk(e.y,t.y,n.y)}function Wi(e){return[e("x"),e("y")]}const AI=({current:e})=>e?e.ownerDocument.defaultView:null,Vk=(e,t)=>Math.abs(e-t);function tae(e,t){const n=Vk(e.x,t.x),r=Vk(e.y,t.y);return Math.sqrt(n**2+r**2)}class kI{constructor(t,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:o=!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=U1(this.lastMoveEventInfo,this.history),S=this.startEvent!==null,y=tae(g.offset,{x:0,y:0})>=this.distanceThreshold;if(!S&&!y)return;const{point:C}=g,{timestamp:x}=Ur;this.history.push({...C,timestamp:x});const{onStart:w,onMove:v}=this.handlers;S||(w&&w(this.lastMoveEvent,g),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,g)},this.handlePointerMove=(g,S)=>{this.lastMoveEvent=g,this.lastMoveEventInfo=F1(S,this.transformPagePoint),Gn.update(this.updatePoint,!0)},this.handlePointerUp=(g,S)=>{this.end();const{onEnd:y,onSessionEnd:C,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=U1(g.type==="pointercancel"?this.lastMoveEventInfo:F1(S,this.transformPagePoint),this.history);this.startEvent&&y&&y(g,w),C&&C(g,w)},!pE(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=l,this.contextWindow=i||window;const c=Kh(t),u=F1(c,this.transformPagePoint),{point:d}=u,{timestamp:h}=Ur;this.history=[{...d,timestamp:h}];const{onSessionStart:p}=n;p&&p(t,U1(u,this.history)),this.removeListeners=qh(qd(this.contextWindow,"pointermove",this.handlePointerMove),qd(this.contextWindow,"pointerup",this.handlePointerUp),qd(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ba(this.updatePoint)}}function F1(e,t){return t?{point:t(e.point)}:e}function qk(e,t){return{x:e.x-t.x,y:e.y-t.y}}function U1({point:e},t){return{point:e,delta:qk(e,MI(t)),offset:qk(e,nae(t)),velocity:rae(t,.1)}}function nae(e){return e[0]}function MI(e){return e[e.length-1]}function rae(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=MI(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Bs(t)));)n--;if(!r)return{x:0,y:0};const o=es(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const l={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function iae(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Wn(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Wn(n,e,r.max):Math.min(e,n)),e}function Bk(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 sae(e,{top:t,left:n,bottom:r,right:i}){return{x:Bk(e.x,n,i),y:Bk(e.y,t,r)}}function Hk(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 oae(e,t){return{x:Hk(e.x,t.x),y:Hk(e.y,t.y)}}function aae(e,t){let n=.5;const r=ai(e),i=ai(t);return i>r?n=ch(t.min,t.max-r,e.min):r>i&&(n=ch(e.min,e.max-i,t.min)),jo(0,1,n)}function lae(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 Qw=.35;function cae(e=Qw){return e===!1?e=0:e===!0&&(e=Qw),{x:Kk(e,"left","right"),y:Kk(e,"top","bottom")}}function Kk(e,t,n){return{min:Gk(e,t),max:Gk(e,n)}}function Gk(e,t){return typeof e=="number"?e:e[t]||0}const uae=new WeakMap;class fae{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:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=p=>{const{dragSnapToOrigin:g}=this.getProps();g?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Kh(p).point)},l=(p,g)=>{const{drag:S,dragPropagation:y,onDragStart:C}=this.getProps();if(S&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=xse(S),!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),Wi(w=>{let v=this.getAxisMotionValue(w).get()||0;if(Hs.test(v)){const{projection:E}=this.visualElement;if(E&&E.layout){const b=E.layout.layoutBox[w];b&&(v=ai(b)*(parseFloat(v)/100))}}this.originPoint[w]=v}),C&&Gn.postRender(()=>C(p,g)),Ww(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},c=(p,g)=>{this.latestPointerEvent=p,this.latestPanInfo=g;const{dragPropagation:S,dragDirectionLock:y,onDirectionLock:C,onDrag:x}=this.getProps();if(!S&&!this.openDragLock)return;const{offset:w}=g;if(y&&this.currentDirection===null){this.currentDirection=dae(w),this.currentDirection!==null&&C&&C(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=()=>Wi(p=>this.getAnimationState(p)==="paused"&&this.getAxisMotionValue(p).animation?.play()),{dragSnapToOrigin:h}=this.getProps();this.panSession=new kI(t,{onSessionStart:o,onStart:l,onMove:c,onSessionEnd:u,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:h,distanceThreshold:r,contextWindow:AI(this.visualElement)})}stop(t,n){const r=t||this.latestPointerEvent,i=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!r)return;const{velocity:l}=i;this.startAnimation(l);const{onDragEnd:c}=this.getProps();c&&Gn.postRender(()=>c(r,i))}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:i}=this.getProps();if(!r||!ug(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let l=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(l=iae(l,this.constraints[t],this.elastic[t])),o.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,i=this.constraints;t&&vu(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=sae(r.layoutBox,t):this.constraints=!1,this.elastic=cae(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Wi(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=lae(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!vu(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=hoe(r,i.root,this.visualElement.getTransformPagePoint());let l=oae(i.layout.layoutBox,o);if(n){const c=n(uoe(l));this.hasMutatedConstraints=!!c,c&&(l=pI(c))}return l}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:l,onDragTransitionEnd:c}=this.getProps(),u=this.constraints||{},d=Wi(h=>{if(!ug(h,n,this.currentDirection))return;let p=u&&u[h]||{};l&&(p={min:0,max:0});const g=i?200:1e6,S=i?40:1e7,y={type:"inertia",velocity:r?t[h]:0,bounceStiffness:g,bounceDamping:S,timeConstant:750,restDelta:1,restSpeed:10,...o,...p};return this.startAxisValueAnimation(h,y)});return Promise.all(d).then(c)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Ww(this.visualElement,t),r.start(_E(t,r,0,n,this.visualElement,!1))}stopAnimation(){Wi(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Wi(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(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Wi(n=>{const{drag:r}=this.getProps();if(!ug(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:l,max:c}=i.layout.layoutBox[n];o.set(t[n]-Wn(l,c,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!vu(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Wi(l=>{const c=this.getAxisMotionValue(l);if(c&&this.constraints!==!1){const u=c.get();i[l]=aae({min:u,max:u},this.constraints[l])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Wi(l=>{if(!ug(l,t,null))return;const c=this.getAxisMotionValue(l),{min:u,max:d}=this.constraints[l];c.set(Wn(u,d,i[l]))})}addListeners(){if(!this.visualElement.current)return;uae.set(this.visualElement,this);const t=this.visualElement.current,n=qd(t,"pointerdown",u=>{const{drag:d,dragListener:h=!0}=this.getProps();d&&h&&this.start(u)}),r=()=>{const{dragConstraints:u}=this.getProps();vu(u)&&u.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Gn.read(r);const l=hh(window,"resize",()=>this.scalePositionWithinConstraints()),c=i.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:d})=>{this.isDragging&&d&&(Wi(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(),o(),c&&c()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:l=Qw,dragMomentum:c=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:l,dragMomentum:c}}}function ug(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function dae(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class hae extends tl{constructor(t){super(t),this.removeGroupControls=ns,this.removeListeners=ns,this.controls=new fae(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ns}unmount(){this.removeGroupControls(),this.removeListeners()}}const Zk=e=>(t,n)=>{e&&Gn.postRender(()=>e(t,n))};class pae extends tl{constructor(){super(...arguments),this.removePointerDownListener=ns}onPointerDown(t){this.session=new kI(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:AI(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:Zk(t),onStart:Zk(n),onMove:r,onEnd:(o,l)=>{delete this.session,i&&Gn.postRender(()=>i(o,l))}}}mount(){this.removePointerDownListener=qd(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 V1=!1;class mae extends k.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),V1&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),zg.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,{projection:l}=r;return l&&(l.isPresent=o,V1=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==o?l.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?l.promote():l.relegate()||Gn.postRender(()=>{const c=l.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),hE.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;V1=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function jI(e){const[t,n]=Mse(),r=k.useContext(cD);return j.jsx(mae,{...e,layoutGroup:r,switchLayoutGroup:k.useContext(dI),isPresent:t,safeToRemove:n})}function gae(e,t,n){const r=Qr(e)?e:Hu(e);return r.start(_E("",r,t,n)),r.animation}const yae=(e,t)=>e.depth-t.depth;class vae{constructor(){this.children=[],this.isDirty=!1}add(t){Y_(this.children,t),this.isDirty=!0}remove(t){W_(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(yae),this.isDirty=!1,this.children.forEach(t)}}function bae(e,t){const n=gi.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Ba(r),e(o-t))};return Gn.setup(r,!0),()=>Ba(r)}const PI=["TopLeft","TopRight","BottomLeft","BottomRight"],Sae=PI.length,Yk=e=>typeof e=="string"?parseFloat(e):e,Wk=e=>typeof e=="number"||pt.test(e);function wae(e,t,n,r,i,o){i?(e.opacity=Wn(0,n.opacity??1,xae(r)),e.opacityExit=Wn(t.opacity??1,0,_ae(r))):o&&(e.opacity=Wn(t.opacity??1,n.opacity??1,r));for(let l=0;l<Sae;l++){const c=`border${PI[l]}Radius`;let u=Xk(t,c),d=Xk(n,c);if(u===void 0&&d===void 0)continue;u||(u=0),d||(d=0),u===0||d===0||Wk(u)===Wk(d)?(e[c]=Math.max(Wn(Yk(u),Yk(d),r),0),(Hs.test(d)||Hs.test(u))&&(e[c]+="%")):e[c]=d}(t.rotate||n.rotate)&&(e.rotate=Wn(t.rotate||0,n.rotate||0,r))}function Xk(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const xae=NI(0,.5,SD),_ae=NI(.5,.95,ns);function NI(e,t,n){return r=>r<e?0:r>t?1:n(ch(e,t,r))}function Qk(e,t){e.min=t.min,e.max=t.max}function bs(e,t){Qk(e.x,t.x),Qk(e.y,t.y)}function Jk(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function eM(e,t,n,r,i){return e-=t,e=Ey(e,1/n,r),i!==void 0&&(e=Ey(e,1/i,r)),e}function Eae(e,t=0,n=1,r=.5,i,o=e,l=e){if(Hs.test(t)&&(t=parseFloat(t),t=Wn(l.min,l.max,t/100)-l.min),typeof t!="number")return;let c=Wn(o.min,o.max,r);e===o&&(c-=t),e.min=eM(e.min,t,n,c,i),e.max=eM(e.max,t,n,c,i)}function tM(e,t,[n,r,i],o,l){Eae(e,t[n],t[r],t[i],t.scale,o,l)}const Cae=["x","scaleX","originX"],Tae=["y","scaleY","originY"];function nM(e,t,n,r){tM(e.x,t,Cae,n?n.x:void 0,r?r.x:void 0),tM(e.y,t,Tae,n?n.y:void 0,r?r.y:void 0)}function rM(e){return e.translate===0&&e.scale===1}function DI(e){return rM(e.x)&&rM(e.y)}function iM(e,t){return e.min===t.min&&e.max===t.max}function Rae(e,t){return iM(e.x,t.x)&&iM(e.y,t.y)}function sM(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function II(e,t){return sM(e.x,t.x)&&sM(e.y,t.y)}function oM(e){return ai(e.x)/ai(e.y)}function aM(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Oae{constructor(){this.members=[]}add(t){Y_(this.members,t),t.scheduleRender()}remove(t){if(W_(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(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;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:i}=t.options;i===!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 Aae(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y,l=n?.z||0;if((i||o||l)&&(r=`translate3d(${i}px, ${o}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:S,skewY:y}=n;d&&(r=`perspective(${d}px) ${r}`),h&&(r+=`rotate(${h}deg) `),p&&(r+=`rotateX(${p}deg) `),g&&(r+=`rotateY(${g}deg) `),S&&(r+=`skewX(${S}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 q1=["","X","Y","Z"],kae=1e3;let Mae=0;function B1(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function $I(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=xI(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Gn,!(i||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&$I(r)}function zI({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(l={},c=t?.()){this.id=Mae++,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(Nae),this.nodes.forEach(zae),this.nodes.forEach(Lae),this.nodes.forEach(Dae)},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 vae)}addEventListener(l,c){return this.eventHandlers.has(l)||this.eventHandlers.set(l,new J_),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=JD(l)&&!Ose(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;Gn.read(()=>{p=window.innerWidth}),e(l,()=>{const S=window.innerWidth;S!==p&&(p=S,this.root.updateBlockedByResize=!0,h&&h(),h=bae(g,250),zg.hasAnimatedSinceResize&&(zg.hasAnimatedSinceResize=!1,this.nodes.forEach(uM)))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&d&&(c||u)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:p,hasRelativeLayoutChanged:g,layout:S})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||d.getDefaultTransition()||Bae,{onLayoutAnimationStart:C,onLayoutAnimationComplete:x}=d.getProps(),w=!this.targetLayout||!II(this.targetLayout,S),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 E={...fE(y,"layout"),onPlay:C,onComplete:x};(d.shouldReduceMotion||this.options.layoutRoot)&&(E.delay=0,E.type=!1),this.startAnimation(E),this.setAnimationOrigin(h,v)}else p||uM(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=S})}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(Fae),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&&$I(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(lM);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(cM);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach($ae),this.nodes.forEach(jae),this.nodes.forEach(Pae)):this.nodes.forEach(cM),this.clearAllSnapshots();const c=gi.now();Ur.delta=jo(0,1e3/60,c-Ur.timestamp),Ur.timestamp=c,Ur.isProcessing=!0,j1.update.process(Ur),j1.preRender.process(Ur),j1.render.process(Ur),Ur.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,hE.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Iae),this.sharedNodes.forEach(Uae)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Gn.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Gn.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ai(this.snapshot.measuredBox.x)&&!ai(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(!i)return;const l=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,c=this.projectionDelta&&!DI(this.projectionDelta),u=this.getTransformTemplate(),d=u?u(this.latestValues,""):void 0,h=d!==this.prevTransformTemplateValue;l&&this.instance&&(c||zl(this.latestValues)||h)&&(i(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)),Hae(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(Kae))){const{scroll:d}=this.root;d&&(bu(c.x,d.offset.x),bu(c.y,d.offset.y))}return c}removeElementScroll(l){const c=Cr();if(bs(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&&bs(c,l),bu(c.x,h.offset.x),bu(c.y,h.offset.y))}return c}applyTransform(l,c=!1){const u=Cr();bs(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&&Su(u,{x:-h.scroll.offset.x,y:-h.scroll.offset.y}),zl(h.latestValues)&&Su(u,h.latestValues)}return zl(this.latestValues)&&Su(u,this.latestValues),u}removeTransform(l){const c=Cr();bs(c,l);for(let u=0;u<this.path.length;u++){const d=this.path[u];if(!d.instance||!zl(d.latestValues))continue;Kw(d.latestValues)&&d.updateSnapshot();const h=Cr(),p=d.measurePageBox();bs(h,p),nM(c,d.latestValues,d.snapshot?d.snapshot.layoutBox:void 0,h)}return zl(this.latestValues)&&nM(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!==Ur.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=Ur.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(),eae(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):bs(this.target,this.layout.layoutBox),gI(this.target,this.targetDelta)):bs(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||Kw(this.parent.latestValues)||mI(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(),Cy(this.relativeTargetOrigin,c,u),bs(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===Ur.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;bs(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,g=this.treeScale.y;doe(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:S}=l;if(!S){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Jk(this.prevProjectionDelta.x,this.projectionDelta.x),Jk(this.prevProjectionDelta.y,this.projectionDelta.y)),Bd(this.projectionDelta,this.layoutCorrected,S,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==g||!aM(this.projectionDelta.x,this.prevProjectionDelta.x)||!aM(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",S))}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=wu(),this.projectionDelta=wu(),this.projectionDeltaWithTransform=wu()}setAnimationOrigin(l,c=!1){const u=this.snapshot,d=u?u.latestValues:{},h={...this.latestValues},p=wu();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!c;const g=Cr(),S=u?u.source:void 0,y=this.layout?this.layout.source:void 0,C=S!==y,x=this.getStack(),w=!x||x.members.length<=1,v=!!(C&&!w&&this.options.crossfade===!0&&!this.path.some(qae));this.animationProgress=0;let E;this.mixTargetDelta=b=>{const T=b/1e3;fM(p.x,l.x,T),fM(p.y,l.y,T),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Cy(g,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Vae(this.relativeTarget,this.relativeTargetOrigin,g,T),E&&Rae(this.relativeTarget,E)&&(this.isProjectionDirty=!1),E||(E=Cr()),bs(E,this.relativeTarget)),C&&(this.animationValues=h,wae(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=Gn.update(()=>{zg.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Hu(0)),this.currentAnimation=gae(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(kae),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&&LI(this.options.animationType,this.layout.layoutBox,d.layoutBox)){u=this.target||Cr();const p=ai(this.layout.layoutBox.x);u.x.min=l.target.x.min,u.x.max=u.x.min+p;const g=ai(this.layout.layoutBox.y);u.y.min=l.target.y.min,u.y.max=u.y.min+g}bs(c,u),Su(c,h),Bd(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&&B1("z",l,d,this.animationValues);for(let h=0;h<q1.length;h++)B1(`rotate${q1[h]}`,l,d,this.animationValues),B1(`skew${q1[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=$g(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=$g(c?.pointerEvents)||""),this.hasProjected&&!zl(this.latestValues)&&(l.transform=u?u({},""):"none",this.hasProjected=!1);return}l.visibility="";const h=d.animationValues||d.latestValues;this.applyTransformsToTarget();let p=Aae(this.projectionDeltaWithTransform,this.treeScale,h);u&&(p=u(h,p)),l.transform=p;const{x:g,y:S}=this.projectionDelta;l.transformOrigin=`${g.origin*100}% ${S.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 Hw){if(h[y]===void 0)continue;const{correct:C,applyTo:x,isCSSVariable:w}=Hw[y],v=p==="none"?h[y]:C(h[y],d);if(x){const E=x.length;for(let b=0;b<E;b++)l[x[b]]=v}else w?this.options.visualElement.renderState.vars[y]=v:l[y]=v}this.options.layoutId&&(l.pointerEvents=d===this?$g(c?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(l=>l.currentAnimation?.stop()),this.root.nodes.forEach(lM),this.root.sharedNodes.clear()}}}function jae(e){e.updateLayout()}function Pae(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:i}=e.options,o=t.source!==e.layout.source;i==="size"?Wi(h=>{const p=o?t.measuredBox[h]:t.layoutBox[h],g=ai(p);p.min=n[h].min,p.max=p.min+g}):LI(i,t.layoutBox,n)&&Wi(h=>{const p=o?t.measuredBox[h]:t.layoutBox[h],g=ai(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=wu();Bd(l,n,t.layoutBox);const c=wu();o?Bd(c,e.applyTransform(r,!0),t.measuredBox):Bd(c,n,t.layoutBox);const u=!DI(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 S=Cr();Cy(S,t.layoutBox,p.layoutBox);const y=Cr();Cy(y,n,g.layoutBox),II(S,y)||(d=!0),h.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=S,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 Nae(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 Dae(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Iae(e){e.clearSnapshot()}function lM(e){e.clearMeasurements()}function cM(e){e.isLayoutDirty=!1}function $ae(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function uM(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function zae(e){e.resolveTargetDelta()}function Lae(e){e.calcProjection()}function Fae(e){e.resetSkewAndRotation()}function Uae(e){e.removeLeadSnapshot()}function fM(e,t,n){e.translate=Wn(t.translate,0,n),e.scale=Wn(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function dM(e,t,n,r){e.min=Wn(t.min,n.min,r),e.max=Wn(t.max,n.max,r)}function Vae(e,t,n,r){dM(e.x,t.x,n.x,r),dM(e.y,t.y,n.y,r)}function qae(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Bae={duration:.45,ease:[.4,0,.1,1]},hM=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),pM=hM("applewebkit/")&&!hM("chrome/")?Math.round:ns;function mM(e){e.min=pM(e.min),e.max=pM(e.max)}function Hae(e){mM(e.x),mM(e.y)}function LI(e,t,n){return e==="position"||e==="preserve-aspect"&&!Joe(oM(t),oM(n),.2)}function Kae(e){return e!==e.root&&e.scroll?.wasRoot}const Gae=zI({attachResizeListener:(e,t)=>hh(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),H1={current:void 0},FI=zI({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!H1.current){const e=new Gae({});e.mount(window),e.setOptions({layoutScroll:!0}),H1.current=e}return H1.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Zae={pan:{Feature:pae},drag:{Feature:hae,ProjectionNode:FI,MeasureLayout:jI}};function gM(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=r[i];o&&Gn.postRender(()=>o(t,Kh(t)))}class Yae extends tl{mount(){const{current:t}=this.node;t&&(this.unmount=_se(t,(n,r)=>(gM(this.node,r,"Start"),i=>gM(this.node,i,"End"))))}unmount(){}}class Wae extends tl{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=qh(hh(this.node.current,"focus",()=>this.onFocus()),hh(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function yM(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 i="onTap"+(n==="End"?"":n),o=r[i];o&&Gn.postRender(()=>o(t,Kh(t)))}class Xae extends tl{mount(){const{current:t}=this.node;t&&(this.unmount=Rse(t,(n,r)=>(yM(this.node,r,"Start"),(i,{success:o})=>yM(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Jw=new WeakMap,K1=new WeakMap,Qae=e=>{const t=Jw.get(e.target);t&&t(e)},Jae=e=>{e.forEach(Qae)};function ele({root:e,...t}){const n=e||document;K1.has(n)||K1.set(n,{});const r=K1.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Jae,{root:e,...t})),r[i]}function tle(e,t,n){const r=ele(t);return Jw.set(e,n),r.observe(e),()=>{Jw.delete(e),r.unobserve(e)}}const nle={some:0,all:1};class rle extends tl{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,l={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:nle[i]},c=u=>{const{isIntersecting:d}=u;if(this.isInView===d||(this.isInView=d,o&&!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 tle(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(ile(t,n))&&this.startObserver()}unmount(){}}function ile({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const sle={inView:{Feature:rle},tap:{Feature:Xae},focus:{Feature:Wae},hover:{Feature:Yae}},ole={layout:{ProjectionNode:FI,MeasureLayout:jI}},ale={...Goe,...sle,...Zae,...ole},vM=coe(ale,xoe),UI=ki.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:cn("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(vM.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(vM.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"})]})]})]})})});UI.displayName="BackgroundBeams";const lle=()=>j.jsxs(j.Fragment,{children:[j.jsx(UI,{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 Ht(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 cle(e){return e.additionalItems===!0&&console.warn("additionalItems=true is currently not supported"),Ht(e.additionalItems)}function bM(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 ko="__additional_property",Ty="additionalProperties",Ka="allOf",Gt="anyOf",ss="const",R0="default",EE="dependencies",ule="enum",Br="__errors",_n="$id",fle="if",Gu="items",dle="_$junk_option_schema_id$_",Lg="$name",jt="oneOf",ex="patternProperties",rn="properties",G1="readonly",VI="required",Ry="submitButtonOptions",$n="$ref",Pd="$schema",qI="root",BI="_",hle=["discriminator","propertyName"],SM="formContext",ple="layoutGridLookupMap",CE="__rjsf_additionalProperties",HI="__rjsf_rootSchema",mle="ui:field",TE="ui:widget",ja="ui:options",tx="ui:globalOptions",gle="https://json-schema.org/draft/2019-09/schema",Fg="https://json-schema.org/draft/2020-12/schema";function lt(e={},t={}){return e?Object.keys(e).filter(n=>n.indexOf("ui:")===0).reduce((n,r)=>{const i=e[r];return r===TE&&Ht(i)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),n):r===ja&&Ht(i)?{...n,...i}:{...n,[r.substring(3)]:i}},{...t}):{...t}}function KI(e,t={},n){if(!(e.additionalProperties||e.patternProperties))return!1;const{expandable:r=!0}=lt(t);return r===!1?r:e.maxProperties!==void 0&&n?Object.keys(n).length<e.maxProperties:!0}function nx(e){const t={[Br]:[],addError(n){this[Br].push(n)}};if(Array.isArray(e))return e.reduce((n,r,i)=>({...n,[i]:nx(r)}),t);if(La(e)){const n=e;return Object.keys(n).reduce((r,i)=>({...r,[i]:nx(n[i])}),t)}return t}function An(e,t){return dG(e,t,(n,r)=>{if(typeof n=="function"&&typeof r=="function")return!0})}const yle=Object.prototype;function Nd(e){for(const t in e)if(yle.hasOwnProperty.call(e,t))return!1;return!0}const vle=["array","boolean","integer","null","number","object","string"];new Set(vle);const ble=["$defs","definitions","properties","patternProperties","dependencies"];new Set(ble);const Sle=["items","allOf","oneOf","anyOf"];new Set(Sle);const wle=["items","additionalItems","additionalProperties","propertyNames","contains","if","then","else","not"];new Set(wle);function Ug(e){return typeof e=="object"}function Is(e){return Ug(e)?Nd(e):e===!0}function xu(e,t){return e<t?-1:e>t?1:0}function Z1(e,t){const n=e.length;if(n===0)return t;let r=t.length;if(r===0)return e;if(n<r){const o=e;e=t,t=o,r=n}const i=new Set(e);for(let o=0;o<r;o++)i.add(t[o]);return Array.from(i)}function xle(e,t){const n=[];if(e.length===0||t.length===0)return n;if(e.length>t.length){const i=e;e=t,t=i}const r=new Set(t);for(let i=0;i<e.length&&r.size>0;i++){const o=e[i];r.delete(o)&&n.push(o)}return n}function wM(e){return e.length===0}function Y1(e){return(t,n)=>{const r=t.length-n.length;if(r!==0)return r;for(let i=0;i<t.length;i++)if(t[i]!==n[i]){const o=e(t[i],n[i]);if(o!==0)return o}return 0}}function GI(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 i=n.slice().sort(e);let o=0;for(let l=1;l<r;l++)e(i[o],i[l])!==0&&++o!==l&&(i[o]=i[l]);return i.length=o+1,i}}function _le(e){return(t,n)=>{const r=[];let i=t.length,o=n.length;if(i===0||o===0)return r;if(i>o){const h=t;t=n,n=h;const p=i;i=o,o=p}const l=[...t].sort(e),c=[...n].sort(e);let u=0,d=0;for(;u<i&&d<o;){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 xM=Ele,ZI=()=>0,Cle=e=>e===void 0,Tle=e=>typeof e!="object",_M={boolean:0,number:1,string:2};function Rle(e,t){const n=typeof e,r=typeof t;return n===r?xu(e,t):_M[n]-_M[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 i=new Set(e),o=t.length;for(let l=0;l<o;l++){const c=t[l];i.has(c)||e.push(c)}return e}function O0(e,t,n=ZI){return(r,i)=>e(r)?e(i)?n(r,i):-1:e(i)?1:t(r,i)}function cu(e){return O0(Cle,e)}function wa(e,t){return O0(n=>n===void 0||e(n),t)}function W1(e,t){return O0(Array.isArray,e,t)}const yr=cu(xu),X1=wa(e=>e===0,(e,t)=>e-t);function Ale({deduplicationCache:e=new WeakMap,sortedKeysCache:t=new WeakMap}={}){const n=xM(t,C=>Object.keys(C).sort());function r(C){return(x,w)=>{const v=n(x),E=n(w),b=Math.min(v.length,E.length);for(let T=0;T<b;T++){const _=xu(v[T],E[T]);if(_!==0)return _}if(v.length!==E.length)return v.length-E.length;for(let T=0;T<b;T++){const _=v[T],O=C(x[_],w[_]);if(O!==0)return O}return 0}}function i(C){const x=Y1(C),w=xM(e,GI(C,{threshold:0}));return(v,E)=>x(w(v),w(E))}const o=i(xu);function l(C,x){if(Ug(C)){if(Ug(x)){const w=Object.keys(C),v=Object.keys(x),E=Ole(w,v),b=E.length;for(let T=0;T<b;T++){const _=E[T];if(C[_]===x[_])continue;const M=(y[_]??c)(C[_],x[_]);if(M!==0)return M}return 0}return x===!0&&Nd(C)?0:1}return Ug(x)?C===!0&&Nd(x)?0:-1:xu(C,x)}const c=cu(d),u=O0(Tle,W1(r(c),Y1(d)),Rle);function d(C,x){return C===null?-1:x===null?1:u(C,x)}const h=cu(l),p=wa(Nd,r(h)),g=cu(i(l)),S=wa(Is,l),y={$id:yr,$comment:yr,$defs:p,$ref:yr,$schema:yr,const:c,contains:h,contentEncoding:yr,contentMediaType:yr,default:c,definitions:p,description:yr,else:h,examples:c,exclusiveMaximum:yr,exclusiveMinimum:yr,format:yr,if:h,maximum:yr,maxItems:yr,maxLength:yr,maxProperties:yr,minimum:yr,multipleOf:yr,not:h,pattern:yr,propertyNames:h,readOnly:yr,then:h,title:yr,writeOnly:yr,uniqueItems:wa(C=>C===!1,ZI),minLength:X1,minItems:X1,minProperties:X1,required:wa(wM,o),enum:wa(wM,i(d)),type:cu((C,x)=>{const w=Array.isArray(C),v=Array.isArray(x);return!w&&!v?xu(C,x):o(w?C:[C],v?x:[x])}),items:wa(C=>!Array.isArray(C)&&Is(C),W1(l,Y1(l))),anyOf:g,allOf:g,oneOf:g,properties:p,patternProperties:p,additionalProperties:S,additionalItems:S,dependencies:wa(Nd,r(cu(W1(l,o))))};return{compareSchemaValues:d,compareSchemaDefinitions:l}}function EM(e){return e}const YI=(e,t)=>e?YI(t%e,e):t,kle=(e,t)=>Math.abs(e*t)/YI(e,t);function Mle(e,t){return e===t?e:`^(?=.*(?:${e}))(?=.*(?:${t})).*$`}function*Q1(e,t,n){const r=e.length,i=t.length;if(r>0&&i>0)for(let o=0;o<r;o++){const l=e[o];for(let c=0;c<i;c++)yield n(l,t[c])}}function J1(e,t){return e||t}function CM(e){return(t,n)=>{const r={...t},i=Object.keys(n),o=i.length;for(let l=0;l<o;l++){const c=i[l];r[c]=t[c]===void 0?n[c]:e(t[c],n[c])}return r}}function jle(e){const t=new Map;for(const n of e)for(const r of n[0])t.set(r,n[1]);return t}function Dl(e,t,n){n===void 0||Is(n)?delete e[t]:e[t]=n}const Ple=["properties","patternProperties","additionalProperties"];function TM(e){const t=Object.keys(e),n=t.length,r=[];for(let i=0;i<n;i++){const o=t[i];r.push({regExp:new RegExp(o),schema:e[o]})}return[r,t]}const RM=[[],[]];function OM(e,t,n){const r=n.length;for(let i=0;i<r;i++){const o=n[i];if(!o.regExp.test(t))continue;const l=o.schema;if(l===!1)return!0;e.push(l)}return!1}const Nle=["items","additionalItems"],Dle=["if","then","else"];function AM(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 eS(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 Ile(e){const t=new Map;for(const[n,r,i]of e){const o=l=>{if(!i(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:o})}}return t}const $le=[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 zle({mergePatterns:e=Mle,isSubRegExp:t=Object.is,intersectJson:n=xle,deduplicateJsonSchemaDef:r=EM,defaultMerger:i=EM,assigners:o=[],checks:l=$le,mergers:c}={}){function u(b){const T=b.length;let _=b[0];for(let O=1;O<T;O++){const M=w(_,b[O]);if(M===!1)return!1;Is(M)||(_=M)}return _}function d(b,T,_,O,M,P,z){if(b.length=0,_===!1)return!1;if(b.push(_),M!==void 0){if(M===!1)return!1;b.push(M)}if(OM(b,T,P))return!1;const q=b.length<2;if(z===!1){if(q)return;if(OM(b,T,O))return!1}else q&&z!==void 0&&b.push(z);return b.length===1?b[0]:u(b)}function h(b,T,_,O,M,P){const z=_.length;if(z>0&&M!==!1)if(P)Object.assign(b,T);else for(let L=0;L<z;L++){const q=_[L];O.has(q)||(b[q]=w(T[q],M))}return b}const p=(b,{properties:T={},patternProperties:_,additionalProperties:O=!0},{properties:M={},patternProperties:P,additionalProperties:z=!0})=>{const L=Is(O),q=Is(z);if(L&&q)return Dl(b,"properties",v(T,M)),Dl(b,"patternProperties",_&&P?v(_,P):_??P),delete b.additionalProperties,b;const Z=w(O,z);Dl(b,"additionalProperties",Z);const te={},ee=Object.keys(T),G=ee.length,[H,Y]=_?TM(_):RM,[oe,re]=P?TM(P):RM,I=[],B=new Set,$=q?void 0:z;for(let he=0;he<G;he++){const Ee=ee[he];B.add(Ee);const Q=d(I,Ee,T[Ee],H,M[Ee],oe,$);Q!==void 0&&(te[Ee]=Q)}const N=Object.keys(M),U=N.length,J=L?void 0:O;for(let he=0;he<U;he++){const Ee=N[he];if(B.has(Ee))continue;const Q=d(I,Ee,M[Ee],oe,void 0,H,J);Q!==void 0&&(te[Ee]=Q)}Dl(b,"properties",te);let ne={};const se=new Set;if(Y.length>0&&re.length>0){const he=Q1(Y,re,(Ee,Q)=>{t(Ee,Q)&&se.add(Ee),t(Q,Ee)&&se.add(Q),ne[e(Ee,Q)]=w(_[Ee],P[Q])});for(;!he.next().done;);}return ne=h(ne,_,Y,se,z,q),ne=h(ne,P,re,se,O,L),Dl(b,"patternProperties",ne),b},g=(b,{items:T=[],additionalItems:_},{items:O=[],additionalItems:M})=>{const P=Array.isArray(T),z=Array.isArray(O),L=[];if(b.items=L,P&&z){const[q,Z,te]=T.length<O.length?[T.length,_,O]:[O.length,M,T];let ee=0;for(;ee<q;ee++)L.push(w(T[ee],O[ee]));if(Z===!1)b.additionalItems=!1;else{const G=Z===void 0||Is(Z);for(;ee<te.length;ee++)L.push(G?te[ee]:w(te[ee],Z));Dl(b,"additionalItems",_!==void 0&&M!==void 0?w(_,M):_??M)}}else if(P||z){const[q,Z,te]=P?[T,O,_]:[O,T,M];Dl(b,"additionalItems",te&&w(te,Z));for(let ee=0;ee<q.length;ee++)L.push(w(q[ee],Z))}else delete b.additionalItems,b.items=w(T,O);return b},S=(b,T,_)=>{AM(b,T);const O=AM({},_);return b.allOf===void 0?b.allOf=[O]:b.allOf=b.allOf.concat(O),b};function y(b,T){return r(Array.from(Q1(b,T,w)))}const C=jle([[Ple,p],[Nle,g],[Dle,S],...o]),x=Ile(l);function w(b,T){if(b===!1||T===!1)return!1;if(Is(b))return Is(T)?!0:T;if(Is(T))return b;let _={...b};const O=new Set,M=new Set,P=Object.keys(T),z=P.length;for(let L=0;L<z;L++){const q=P[L],Z=T[q];if(Z===void 0)continue;const te=x.get(q);if(te!==void 0){const Y=te.length;for(let oe=0;oe<Y;oe++){const re=te[oe];b[re.oppositeKey]!==void 0&&M.add(re.check)}}const ee=b[q];if(ee===void 0){_[q]=Z;continue}const G=C.get(q);if(G){O.add(G);continue}const H=E[q]??i;_[q]=H(ee,Z)}for(const L of O)_=L(_,b,T);for(const L of M)L(_);return _}const v=CM(w),E={$id:i,$ref:i,$schema:i,$comment:i,$defs:v,definitions:v,type:(b,T)=>{if(b===T)return b;const _=Array.isArray(b),O=Array.isArray(T);if(!_&&!O){const M=eS(b,T);if(M!==void 0)return M}else if(_||O){const M=new Set;if(_&&O)for(const z of Q1(b,T,eS))z!==void 0&&M.add(z);else{const z=_?b:T,L=_?T:b,q=z.length;for(let Z=0;Z<q;Z++){const te=eS(L,z[Z]);te!==void 0&&M.add(te)}}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: ${b.toString()}, ${T.toString()}`)},default:i,description:i,title:i,const:i,format:i,contentEncoding:i,contentMediaType:i,not:(b,T)=>{const _=r([b,T]);return _.length===1?_[0]:{anyOf:_}},pattern:e,readOnly:J1,writeOnly:J1,enum:(b,T)=>{const _=n(b,T);if(_.length===0)throw new Error(`Intersection of the following enums is empty: "${JSON.stringify(b)}", "${JSON.stringify(T)}"`);return _},anyOf:y,oneOf:y,allOf:(b,T)=>r(b.concat(T)),propertyNames:w,contains:w,dependencies:CM((b,T)=>Array.isArray(b)?Array.isArray(T)?Z1(b,T):w(T,{required:b}):Array.isArray(T)?w(b,{required:T}):w(b,T)),examples:(b,T)=>{if(!Array.isArray(b)||!Array.isArray(T))throw new Error(`Value of the 'examples' field should be an array, but got "${JSON.stringify(b)}" and "${JSON.stringify(T)}"`);return Z1(b,T)},multipleOf:(b,T)=>{let _=1;for(;!Number.isInteger(b)||!Number.isInteger(T);)_*=10,b*=10,T*=10;return kle(b,T)/_},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:J1,required:Z1,...c};return{mergeSchemaDefinitions:w,mergeArrayOfSchemaDefinitions:u}}function Lle(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:i,...o}=r;t.push(o);for(let l=i.length-1;l>=0;l--)n.push(i[l])}return t}function Fle(e){return t=>e(Lle(t))}var _d={},kM;function Ule(){if(kM)return _d;kM=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 i(d,h,p){for(var g,S,y=1,C=h.length;y<C;){if(h[y]==="constructor"||h[y]==="prototype"||h[y]==="__proto__")return d;if(g=r(h[y++]),S=C>y,typeof d[g]>"u"&&(Array.isArray(d)&&g==="-"&&(g=d.length),S&&(h[y]!==""&&h[y]<1/0||h[y]==="-"?d[g]=[]:d[g]={})),!S)break;d=d[g]}var x=d[g];return p===void 0?delete d[g]:d[g]=p,x}function o(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=o(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=o(h),h.length===0)throw new Error("Invalid JSON pointer for set.");return i(d,h,p)}function u(d){var h=o(d);return{get:function(p){return l(p,h)},set:function(p,g){return c(p,h,g)}}}return _d.get=l,_d.set=c,_d.compile=u,_d}var Vle=Ule();const tS=Qs(Vle);var qle=H4();const RE=Qs(qle);function Oy(e,t){if(_n in e&&RE.equal(e[_n],t))return e;for(const n of Object.values(e))if(Array.isArray(n)){for(const r of n)if(Zt(r)){const i=Oy(r,t);if(i!==void 0)return i}}else if(Zt(n)){const r=Oy(n,t);if(r!==void 0)return r}}function rx(e,t){const n=ze(e,_n,t);$n in e&&(e={...e,[$n]:RE.resolve(n,e[$n])});for(const[r,i]of Object.entries(e))Array.isArray(i)?e={...e,[r]:i.map(o=>Zt(o)?rx(o,n):o)}:Zt(i)&&(e={...e,[r]:rx(i,n)});return e}function OE(e,t){const n=t[e];return[ih(t,[e]),n]}function WI(e,t={},n=[],r=ze(t,[_n])){const i=e||"";let o;if(i.startsWith("#")){const c=decodeURIComponent(i.substring(1));r===void 0||_n in t&&t[_n]===r?o=tS.get(t,c):t[Pd]===Fg&&(o=Oy(t,r.replace(/\/$/,"")),o!==void 0&&(o=tS.get(o,c)))}else if(t[Pd]===Fg){const c=r?RE.resolve(r,i):i,[u,...d]=c.replace(/#\/?$/,"").split("#");o=Oy(t,u.replace(/\/$/,"")),o!==void 0&&(r=o[_n],br(d)||(o=tS.get(o,decodeURIComponent(d.join("#")))))}if(o===void 0)throw new Error(`Could not find a definition for ${e}.`);const l=o[$n];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,i,h].join(" -> ");throw new Error(`Definition for ${h} contains a circular reference through ${g}`)}const[c,u]=OE($n,o),d=WI(u,t,[...n,i],r);return Object.keys(c).length>0?t[Pd]===gle||t[Pd]===Fg?{[Ka]:[c,d]}:{...c,...d}:d}return o}function XI(e,t={},n=ze(t,[_n])){return WI(e,t,[],n)}function Ys(e){let t;const n=ze(e,hle);return Fa(n)?t=n:n!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof n}" instead`),t}function ph(e){return Array.isArray(e)?"array":typeof e=="string"?"string":e==null?"null":typeof e=="boolean"?"boolean":isNaN(e)?typeof e=="object"?"object":"string":"number"}function Cs(e){let{type:t}=e;return!t&&e.const?ph(e.const):!t&&e.enum?"string":!t&&(e.properties||e.additionalProperties||e.patternProperties)?"object":(Array.isArray(t)&&(t.length===2&&t.includes("null")?t=t.find(n=>n!=="null"):t=t[0]),t)}function No(e,t){const n=Object.assign({},e);return Object.keys(t).reduce((r,i)=>{const o=e?e[i]:{},l=t[i];return e&&i in e&&Ht(l)?r[i]=No(o,l):e&&t&&(Cs(e)==="object"||Cs(t)==="object")&&i===VI&&Array.isArray(o)&&Array.isArray(l)?r[i]=jG(o,l):r[i]=l,r},n)}function QI(e,t,n){var r;if(e&&n){const i=ze(e,n);if(i===void 0)return;for(let o=0;o<t.length;o++){const l=t[o],c=ze(l,[rn,n],{});if(!(c.type==="object"||c.type==="array")&&(c.const===i||!((r=c.enum)===null||r===void 0)&&r.includes(i)))return o}}}function AE(e,t,n,r,i){if(t===void 0)return 0;const o=QI(t,n,i);if(bN(o))return o;for(let l=0;l<n.length;l++){const c=n[l];if(i&&Ut(c,[rn,i])){const u=ze(t,i),d=ze(c,[rn,i],{});if(e.isValid(d,u,r))return l}else if(c[rn]){const u={anyOf:Object.keys(c[rn]).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 Jr(e,t,n={},r,i,o=!1){return Fs(e,t,n,r,void 0,void 0,i,o)[0]}function Ble(e,t,n,r,i,o,l){const{if:c,then:u,else:d,...h}=t,p=e.isValid(c,o||{},n);let g=[h],S=[];if(r)u&&typeof u!="boolean"&&(S=S.concat(Fs(e,u,n,o,r,i,l))),d&&typeof d!="boolean"&&(S=S.concat(Fs(e,d,n,o,r,i,l)));else{const y=p?u:d;y&&typeof y!="boolean"&&(S=S.concat(Fs(e,y,n,o,r,i,l)))}return S.length&&(g=S.map(y=>No(h,y))),g.flatMap(y=>Fs(e,y,n,o,r,i,l))}function JI(e){return e.reduce((n,r)=>r.length>1?r.flatMap(i=>_N(n.length,o=>[...n[o]].concat(i))):(n.forEach(i=>i.push(r[0])),n),[[]])}function e$(e,t){return Object.keys(e.patternProperties).filter(n=>RegExp(n).test(t)).reduce((n,r)=>(hn(n,[r],e.patternProperties[r]),n),{})}function Hle(e,t,n,r,i,o,l,c){const u=t$(e,t,n,r,i,o,l,c);if(u.length>1||u[0]!==t)return u;if(EE in t)return n$(e,t,n,r,i,o,l).flatMap(h=>Fs(e,h,n,o,r,i,l));if(Ka in t&&Array.isArray(t[Ka])){const d=t.allOf.map(p=>Fs(e,p,n,o,r,i,l));return JI(d).map(p=>({...t,allOf:p}))}return[t]}function t$(e,t,n,r,i,o,l,c){const u=Au(t,n,i,void 0,c);return u!==t?Fs(e,u,n,o,r,i,l,c):[t]}function Au(e,t,n,r,i){if(!Ht(e))return e;let o=e;if($n in o){const{$ref:l,...c}=o;if(n.includes(l))return o;n.push(l),o={...XI(l,t,r),...c},_n in o&&(r=o[_n])}if(rn in o){const l=[],c=OG(o[rn],(u,d,h)=>{const p=[...n];u[h]=Au(d,t,p,r,i),l.push(p)},{});pG(n,TN(YK(l))),o={...o,[rn]:c}}if(Gu in o&&!Array.isArray(o.items)&&typeof o.items!="boolean"&&(o={...o,items:Au(o.items,t,n,r,i)}),i){let l,c;Gt in e&&Array.isArray(e[Gt])?(l=Gt,c=o[Gt]):jt in e&&Array.isArray(e[jt])&&(l=jt,c=o[jt]),l&&c&&(o={...o,[l]:c.map(u=>Au(u,t,n,r,i))})}return An(e,o)?e:o}function Kle(e,t,n,r,i){const o={...t,properties:{...t.properties}},l=r&&Ht(r)?r:{};return Object.keys(l).forEach(c=>{if(!(c in o.properties)){if(ex in o){const u=e$(o,c);if(!br(u)){o.properties[c]=Jr(e,{[Ka]:Object.values(u)},n,ze(l,[c]),i),hn(o.properties,[c,ko],!0);return}}if(Ty in o&&o.additionalProperties!==!1){let u;typeof o.additionalProperties!="boolean"?$n in o.additionalProperties?u=Jr(e,{[$n]:ze(o.additionalProperties,[$n])},n,l,i):"type"in o.additionalProperties?u={...o.additionalProperties}:Gt in o.additionalProperties||jt in o.additionalProperties?u={type:"object",...o.additionalProperties}:u={type:ph(ze(l,[c]))}:u={type:ph(ze(l,[c]))},o.properties[c]=u,hn(o.properties,[c,ko],!0)}else o.properties[c]={type:"null"},hn(o.properties,[c,ko],!0)}}),o}const{compareSchemaDefinitions:Gle,compareSchemaValues:Zle}=Ale(),{mergeArrayOfSchemaDefinitions:Yle}=zle({intersectJson:_le(Zle),deduplicateJsonSchemaDef:GI(Gle)}),Wle=Fle(Yle);function Xle(e){return Wle(e)}function Fs(e,t,n,r,i=!1,o=[],l,c){return Ht(t)?Hle(e,t,n,i,o,r,l,c).flatMap(d=>{var h;let p=d;if(fle in p)return Ble(e,p,n,i,o,r,l);if(Ka in p){if(i){const{allOf:S,...y}=p;return[...S,y]}try{const S=[],y=[];(h=p.allOf)===null||h===void 0||h.forEach(C=>{typeof C=="object"&&C.contains?S.push(C):y.push(C)}),S.length&&(p={...p,allOf:y}),p=l?l(p):Xle(p),S.length&&(p.allOf=S)}catch(S){console.warn(`could not merge subschemas in allOf:
43
- `,S);const{allOf:y,...C}=p;return C}}return rn in p&&ex in p&&(p=Object.keys(p.properties).reduce((S,y)=>{const C=e$(S,y);return br(C)||(S.properties[y]=Jr(e,{allOf:[S.properties[y],...Object.values(C)]},n,ze(r,[y]),l)),S},{...p,properties:{...p.properties}})),ex in p||Ty in p&&p.additionalProperties!==!1?Kle(e,p,n,r,l):p}):[{}]}function Qle(e,t,n,r,i){let o;const{oneOf:l,anyOf:c,...u}=t;if(Array.isArray(l)?o=l:Array.isArray(c)&&(o=c),o){const d=i===void 0&&r?{}:i,h=Ys(t);o=o.map(g=>Au(g,n,[]));const p=AE(e,d,o,n,h);if(r)return o.map(g=>No(u,g));t=No(u,o[p])}return[t]}function n$(e,t,n,r,i,o,l){const{dependencies:c,...u}=t;return Qle(e,u,n,r,o).flatMap(h=>r$(e,c,h,n,r,i,o,l))}function r$(e,t,n,r,i,o,l,c){let u=[n];for(const d in t){if(!i&&ze(l,[d])===void 0||n.properties&&!(d in n.properties))continue;const[h,p]=OE(d,t);return Array.isArray(p)?u[0]=Jle(n,p):Ht(p)&&(u=ece(e,n,r,d,p,i,o,l,c)),u.flatMap(g=>r$(e,h,g,r,i,o,l,c))}return u}function Jle(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 ece(e,t,n,r,i,o,l,c,u){return Fs(e,i,n,c,o,l,u).flatMap(h=>{const{oneOf:p,...g}=h;if(t=No(t,g),p===void 0)return t;const S=p.map(C=>typeof C=="boolean"||!($n in C)?[C]:t$(e,C,n,o,l,c));return JI(S).flatMap(C=>tce(e,t,n,r,C,o,l,c,u))})}function tce(e,t,n,r,i,o,l,c,u){const d=i.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)||o}return!1});return!o&&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]=OE(r,p.properties),S={...p,properties:g};return Fs(e,S,n,c,o,l,u).map(C=>No(t,C))})}function Dd(e,t,n,r,i,o={},l){if(Array.isArray(n[i])){const u=Ys(n)||r,d=n[i].map(p=>Jr(e,p,t,o,l)),h=ze(o,u);if(h!==void 0)return d.find(p=>ka(ze(p,[rn,u,R0],ze(p,[rn,u,ss])),h))}}function i$(e,t,n,r,i){let o=n;if(Ut(n,$n)&&(o=Jr(e,n,t,void 0,i)),br(r))return o;const l=Array.isArray(r)?r:r.split("."),[c,...u]=l;if(c&&Ut(o,c))return o=ze(o,c),i$(e,t,o,u,i)}function Vg(e,t,n,r,i,o){const l=i$(e,t,n,r,o);return l===void 0?i:l}const MM={title:"!@#$_UNKNOWN_$#@!"};function nce(e,t,n,r,i={},o){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,[rn,g],{},o),Ut(c,jt)?c=Dd(e,t,c,u,jt,ze(i,g),o):Ut(c,Gt)&&(c=Dd(e,t,c,u,Gt,ze(i,g),o))}),Ut(c,jt)?c=Dd(e,t,c,u,jt,i,o):Ut(c,Gt)&&(c=Dd(e,t,c,u,Gt,i,o));let d=Vg(e,t,c,[rn,u],MM,o);d===MM&&(d=void 0);const h=Vg(e,t,c,VI,[],o);let p;return d&&Array.isArray(h)&&(p=h.includes(u)),{field:d,isRequired:p}}const rce={type:"object",$id:dle,properties:{__not_really_there__:{type:"number"}}};function ix(e,t,n,r,i){let o=0;return n&&(Zt(n.properties)?o+=EG(n.properties,(l,c,u)=>{const d=ze(r,u);if(typeof c=="boolean")return l;if(Ut(c,$n)){const h=Jr(e,c,t,d,i);return l+ix(e,t,h,d||{},i)}if((Ut(c,jt)||Ut(c,Gt))&&d){const h=Ut(c,jt)?jt:Gt,p=Ys(c);return l+mh(e,t,d,ze(c,h),-1,p,i)}if(c.type==="object")return Zt(d)&&(l+=1),l+ix(e,t,c,d,i);if(c.type===ph(d)){let h=l+1;return c.default?h+=d===c.default?1:-1:c.const&&(h+=d===c.const?1:-1),h}return l},0):Fa(n.type)&&n.type===ph(r)&&(o+=1)),o}function mh(e,t,n,r,i=-1,o,l){const c=r.map(g=>Au(g,t,[])),u=QI(n,r,o);if(bN(u))return u;const d=c.reduce((g,S,y)=>(AE(e,n,[rce,S],t,o)===1&&g.push(y),g),[]);if(d.length===1)return d[0];d.length||_N(c.length,g=>d.push(g));const h=new Set,{bestIndex:p}=d.reduce((g,S)=>{const{bestScore:y}=g,C=c[S],x=ix(e,t,C,n,l);return h.add(x),x>y?{bestIndex:S,bestScore:x}:g},{bestIndex:i,bestScore:0});return h.size===1&&i>=0?i:p}function kE(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every(t=>Ht(t))}function gh(e,t,n=!1,r=!1,i=!1){if(Array.isArray(t)){const o=Array.isArray(e)?e:[],l=i?o:t,c=i?t:o,u=l.map((d,h)=>c[h]!==void 0?gh(o[h],t[h],n,r,i):d);return(n||i)&&u.length<c.length&&u.push(...c.slice(u.length)),u}if(Ht(t)){const o=Object.assign({},e);return Object.keys(t).reduce((l,c)=>{var u;const d=ze(t,c),h=Ht(e)&&c in e,p=c in t,g=(u=ze(e,c))!==null&&u!==void 0?u:{},S=h&&Object.entries(g).some(([,x])=>Ht(x)),y=h&&Ht(ze(e,c)),C=p&&Ht(d);return y&&C&&!S?(l[c]={...ze(e,c),...d},l):(l[c]=gh(ze(e,c),d,n,r,i&&(h||!p)),l)},o)}return r&&(e!==void 0&&ly(t)||typeof t=="number"&&isNaN(t))||i&&!ly(t)?e:t}function yh(e,t,n=!1){return Object.keys(t).reduce((r,i)=>{const o=e?e[i]:{},l=t[i];if(e&&i in e&&Ht(l))r[i]=yh(o,l,n);else if(n&&Array.isArray(o)&&Array.isArray(l)){let c=l;n==="preventDuplicates"&&(c=l.reduce((u,d)=>(o.includes(d)||u.push(d),u),[])),r[i]=o.concat(c)}else r[i]=l;return r},Object.assign({},e))}function s$(e){return Array.isArray(e.enum)&&e.enum.length===1||ss in e}function ME(e,t,n={},r){const i=Jr(e,t,n,void 0,r),o=i.oneOf||i.anyOf;return Array.isArray(i.enum)?!0:Array.isArray(o)?o.every(l=>typeof l!="boolean"&&s$(l)):!1}function jE(e,t,n,r){return!t.uniqueItems||!t.items||typeof t.items=="boolean"?!1:ME(e,t.items,n,r)}function o$(e){const t=e[ss],n=Cs(e);return Ht(t)&&Fa(t?.$data)&&n!=="object"&&n!=="array"}function ice(e){if(ule in e&&Array.isArray(e.enum)&&e.enum.length===1)return e.enum[0];if(ss in e)return e.const;throw new Error("schema cannot be inferred as a constant")}function Zu(e,t){if(e.enum){let o;if(t){const{enumNames:l}=lt(t);o=l}return e.enum.map((l,c)=>({label:o?.[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 i=Ys(e);if(t){const{optionsSchemaSelector:o=i}=lt(t);i=o}return n&&n.map((o,l)=>{const{title:c}=lt(r?.[l]),u=o;let d,h=c;if(i){const p=ze(u,[rn,i],{});d=ze(p,R0,ze(p,ss)),h=h||p?.title||u.title||String(d)}else d=ice(u),h=h||u.title||String(d);return{schema:u,label:h,value:d}})}const sce=["string","number","integer","boolean","null"];var Yu;(function(e){e[e.Ignore=0]="Ignore",e[e.Invert=1]="Invert",e[e.Fallback=2]="Fallback"})(Yu||(Yu={}));function nS(e,t=Yu.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!==Yu.Ignore&&Ht(e.additionalItems)?e.additionalItems:{}}function a$(e,t){const{default:n,type:r}=e;return Array.isArray(r)&&r.includes("null")&&br(t)&&n===null?null:t}function jM(e,t,n,r,i,o=[],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||!Ht(n)||!br(n))&&(e[t]=n);else if(d!=="skipDefaults"){const h=i===void 0?o.includes(t):i;Ht(n)?d==="skipEmptyDefaults"?br(n)||(e[t]=n):(!br(n)||o.includes(t))&&(h||d!=="populateRequiredDefaults")&&(e[t]=n):n!==void 0&&(d==="populateAllDefaults"||d==="skipEmptyDefaults"||h&&o.includes(t))&&(e[t]=n)}}function Pa(e,t,n={}){const{parentDefaults:r,rawFormData:i,rootSchema:o={},includeUndefinedValues:l=!1,_recurseList:c=[],experimental_defaultFormStateBehavior:u=void 0,experimental_customMergeAllOf:d=void 0,required:h,shouldMergeDefaultsIntoFormData:p=!1,initialDefaultsGenerated:g}=n;let S=Ht(i)?i:{};const y=Ht(t)?t:{};let C=r,x=null,w=u,v=c;if(y[ss]!==void 0&&u?.constAsDefaults!=="never"&&!o$(y))C=y[ss];else if(Ht(C)&&Ht(y.default))C=yh(C,y.default);else if(R0 in y&&!y[Gt]&&!y[jt]&&!y[$n])C=y.default;else if($n in y){const T=y[$n];c.includes(T)||(v=c.concat(T),x=XI(T,o)),x&&!C&&(C=y.default),p&&x&&!Ht(i)&&(S=i)}else if(EE in y){const T={...PM(e,y,n,C),...S};x=n$(e,y,o,!1,[],T,d)[0]}else if(kE(y))C=y.items.map((T,_)=>Pa(e,T,{rootSchema:o,includeUndefinedValues:l,_recurseList:c,experimental_defaultFormStateBehavior:u,experimental_customMergeAllOf:d,parentDefaults:Array.isArray(r)?r[_]:void 0,rawFormData:S,required:h,shouldMergeDefaultsIntoFormData:p}));else if(jt in y){const{oneOf:T,..._}=y;if(T.length===0)return;const O=Ys(y),{type:M="null"}=_;!Array.isArray(M)&&sce.includes(M)&&w?.constAsDefaults==="skipOneOf"&&(w={...w,constAsDefaults:"never"}),x=T[mh(e,o,i??y.default,T,0,O,d)],x=No(_,x)}else if(Gt in y){const{anyOf:T,..._}=y;if(T.length===0)return;const O=Ys(y);x=T[mh(e,o,i??y.default,T,0,O,d)],x=No(_,x)}if(x)return Pa(e,x,{rootSchema:o,includeUndefinedValues:l,_recurseList:v,experimental_defaultFormStateBehavior:w,experimental_customMergeAllOf:d,parentDefaults:C,rawFormData:i??S,required:h,shouldMergeDefaultsIntoFormData:p,initialDefaultsGenerated:g});C===void 0&&(C=y.default);const E=PM(e,y,n,C);let b=E??C;if(p){const{arrayMinItems:T={}}=u||{},{mergeExtraDefaults:_}=T,O=oce(e,y,o,i,u,d);(!Ht(i)||Ka in y)&&(b=gh(b,O,_,!0))}return b}function oce(e,t,n,r,i,o){const l=!s$(t)&&ME(e,t,n,o);let c=r;if(l){const d=Zu(t);c=d?.some(p=>An(p.value,r))?r:void 0}return t[ss]&&i?.constAsDefaults==="always"&&(c=t.const),c}function ace(e,t,{rawFormData:n,rootSchema:r={},includeUndefinedValues:i=!1,_recurseList:o=[],experimental_defaultFormStateBehavior:l=void 0,experimental_customMergeAllOf:c=void 0,required:u,shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:h}={},p){{const g=Ht(n)?n:{},S=t,y=l?.allOf==="populateDefaults"&&Ka in S?Jr(e,S,r,g,c):S,C=y[ss],x=Object.keys(y.properties||{}).reduce((w,v)=>{var E;const b=ze(y,[rn,v],{}),T=Ht(C)&&C[v]!==void 0,_=(Ht(b)&&ss in b||T)&&l?.constAsDefaults!=="never"&&!o$(b),O=Pa(e,b,{rootSchema:r,_recurseList:o,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:c,includeUndefinedValues:i===!0,parentDefaults:ze(p,[v]),rawFormData:ze(g,[v]),required:(E=y.required)===null||E===void 0?void 0:E.includes(v),shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:h});return jM(w,v,O,i,u,y.required,l,_,b?.type==="null"),w},{});if(y.additionalProperties&&!h){const w=Ht(y.additionalProperties)?y.additionalProperties:{},v=new Set;Ht(p)&&Object.keys(p).filter(b=>!y.properties||!y.properties[b]).forEach(b=>v.add(b));const E=[];Object.keys(g).filter(b=>!y.properties||!y.properties[b]).forEach(b=>{v.add(b),E.push(b)}),v.forEach(b=>{var T;const _=Pa(e,w,{rootSchema:r,_recurseList:o,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:c,includeUndefinedValues:i===!0,parentDefaults:ze(p,[b]),rawFormData:ze(g,[b]),required:(T=y.required)===null||T===void 0?void 0:T.includes(b),shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:h});jM(x,b,_,i,u,E)})}return a$(t,x)}}function lce(e,t,{rawFormData:n,rootSchema:r={},_recurseList:i=[],experimental_defaultFormStateBehavior:o=void 0,experimental_customMergeAllOf:l=void 0,required:c,requiredAsRoot:u=!1,shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:h}={},p){var g,S;const y=t,C=(g=o?.arrayMinItems)!==null&&g!==void 0?g:{},{populate:x,mergeExtraDefaults:w}=C,v=x==="never",E=x==="requiredOnly",b=x==="all"||!v&&!E,T=(S=C?.computeSkipPopulate)!==null&&S!==void 0?S:(()=>!1),O=o?.emptyObjectFields==="skipEmptyDefaults"?void 0:[];if(Array.isArray(p)&&(p=p.map((L,q)=>{const Z=nS(y,Yu.Fallback,q);return Pa(e,Z,{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:l,parentDefaults:L,required:c,shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:h})})),Array.isArray(n)){const L=nS(y);if(v)p=n;else{const q=n.map((te,ee)=>Pa(e,L,{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:l,rawFormData:te,parentDefaults:ze(p,[ee]),required:c,shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:h}));p=gh(p,q,(E&&c||b)&&w)}}if((Ht(y)&&ss in y&&o?.constAsDefaults!=="never")===!1){if(v)return p??O;if(E&&!c)return p||void 0}let P;const z=Array.isArray(p)?p.length:0;if(!y.minItems||jE(e,y,r,l)||T(e,y,r)||y.minItems<=z)P=p||!c&&!u?p:O;else{const L=p||[],q=nS(y,Yu.Invert),Z=q.default,te=Array.from({length:y.minItems-z},()=>Pa(e,q,{parentDefaults:Z,rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:l,required:c,shouldMergeDefaultsIntoFormData:d}));P=L.concat(te)}return a$(t,P)}function PM(e,t,n={},r){switch(Cs(t)){case"object":return ace(e,t,n,r);case"array":return lce(e,t,n,r)}}function l$(e,t,n,r,i=!1,o,l,c){if(!Ht(t))throw new Error("Invalid schema: "+t);const u=Jr(e,t,r,n,l),d=Pa(e,u,{rootSchema:r,includeUndefinedValues:i,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:l,rawFormData:n,shouldMergeDefaultsIntoFormData:!0,initialDefaultsGenerated:c,requiredAsRoot:!0});if(u.type!=="object"&&Ht(u.default))return{...d,...n};if(Ht(n)||Array.isArray(n)){const{mergeDefaultsIntoFormData:h}=o||{};return gh(d,n,!0,h==="useDefaultIfFormDataUndefined",!0)}return d}function c$(e={}){return"widget"in lt(e)&&lt(e).widget!=="hidden"}function u$(e,t,n={},r,i){if(n[TE]==="files")return!0;if(t.items){const o=Jr(e,t.items,r,void 0,i);return o.type==="string"&&o.format==="data-url"}return!1}function cce(e,t,n={},r,i,o){const l=lt(n,i),{label:c=!0}=l;let u=!!c;if(u){const d=Cs(t),h=ze(t,ko,!1);d==="array"&&(u=h||jE(e,t,r,o)||u$(e,t,n,r,o)||c$(n)),d==="object"&&(u=h),d==="boolean"&&n&&!n[TE]&&(u=!1),n&&n[mle]&&(u=!1)}return u}const ru=Symbol("no Value");function sx(e,t,n,r,i={},o){let l;if(Ut(n,rn)){const c={};if(Ut(r,rn)){const h=ze(r,rn,{});Object.keys(h).forEach(p=>{Ut(i,p)&&(c[p]=void 0)})}const u=Object.keys(ze(n,rn,{})),d={};u.forEach(h=>{const p=ze(i,h);let g=ze(r,[rn,h],{}),S=ze(n,[rn,h],{});Ut(g,$n)&&(g=Jr(e,g,t,p,o)),Ut(S,$n)&&(S=Jr(e,S,t,p,o));const y=ze(g,"type"),C=ze(S,"type");if(!y||y===C)if(Ut(c,h)&&delete c[h],C==="object"||C==="array"&&Array.isArray(p)){const x=sx(e,t,S,g,p,o);(x!==void 0||C==="array")&&(d[h]=x)}else{const x=ze(S,"default",ru),w=ze(g,"default",ru);x!==ru&&x!==p&&(w===p?c[h]=x:ze(S,"readOnly")===!0&&(c[h]=void 0));const v=ze(S,"const",ru),E=ze(g,"const",ru);v!==ru&&v!==p&&(c[h]=E===p?v:void 0)}}),l={...typeof i=="string"||Array.isArray(i)?void 0:i,...c,...d}}else if(ze(r,"type")==="array"&&ze(n,"type")==="array"&&Array.isArray(i)){let c=ze(r,"items"),u=ze(n,"items");if(typeof c=="object"&&typeof u=="object"&&!Array.isArray(c)&&!Array.isArray(u)){Ut(c,$n)&&(c=Jr(e,c,t,i,o)),Ut(u,$n)&&(u=Jr(e,u,t,i,o));const d=ze(c,"type"),h=ze(u,"type");if(!d||d===h){const p=ze(n,"maxItems",-1);h==="object"?l=i.reduce((g,S)=>{const y=sx(e,t,u,c,S,o);return y!==void 0&&(p<0||g.length<p)&&g.push(y),g},[]):l=p>0&&i.length>p?i.slice(0,p):i}}else typeof c=="boolean"&&typeof u=="boolean"&&c===u&&(l=i)}return l}function Ll(e,t,n,r,i,o=[],l){if($n in t||EE in t||Ka in t){const u=Jr(e,t,r,i,l);if(o.findIndex(h=>An(h,u))===-1)return Ll(e,u,n,r,i,o.concat(u),l)}let c={[Lg]:n.replace(/^\./,"")};if(jt in t||Gt in t){const u=jt in t?t.oneOf:t.anyOf,d=Ys(t),h=mh(e,r,i,u,0,d,l),p=u[h];c={...c,...Ll(e,p,n,r,i,o,l)}}if(Ty in t&&t[Ty]!==!1&&hn(c,CE,!0),Gu in t&&Array.isArray(i)){const{items:u,additionalItems:d}=t;Array.isArray(u)?i.forEach((h,p)=>{u[p]?c[p]=Ll(e,u[p],`${n}.${p}`,r,h,o,l):d?c[p]=Ll(e,d,`${n}.${p}`,r,h,o,l):console.warn(`Unable to generate path schema for "${n}.${p}". No schema defined for it`)}):i.forEach((h,p)=>{c[p]=Ll(e,u,`${n}.${p}`,r,h,o,l)})}else if(rn in t)for(const u in t.properties){const d=ze(t,[rn,u],{});c[u]=Ll(e,d,`${n}.${u}`,r,ze(i,[u]),o,l)}return c}function uce(e,t,n="",r,i,o){return Ll(e,t,n,r,i,void 0,o)}class fce{constructor(t,n,r,i){n&&n[Pd]===Fg?this.rootSchema=rx(n,ze(n,_n,"#")):this.rootSchema=n,this.validator=t,this.experimental_defaultFormStateBehavior=r,this.experimental_customMergeAllOf=i}getRootSchema(){return this.rootSchema}getValidator(){return this.validator}doesSchemaUtilsDiffer(t,n,r={},i){return!t||!n?!1:this.validator!==t||!An(this.rootSchema,n)||!An(this.experimental_defaultFormStateBehavior,r)||this.experimental_customMergeAllOf!==i}findFieldInSchema(t,n,r){return nce(this.validator,this.rootSchema,t,n,r,this.experimental_customMergeAllOf)}findSelectedOptionInXxxOf(t,n,r,i){return Dd(this.validator,this.rootSchema,t,n,r,i,this.experimental_customMergeAllOf)}getDefaultFormState(t,n,r=!1,i){return l$(this.validator,t,n,this.rootSchema,r,this.experimental_defaultFormStateBehavior,this.experimental_customMergeAllOf,i)}getDisplayLabel(t,n,r){return cce(this.validator,t,n,this.rootSchema,r,this.experimental_customMergeAllOf)}getClosestMatchingOption(t,n,r,i){return mh(this.validator,this.rootSchema,t,n,r,i,this.experimental_customMergeAllOf)}getFirstMatchingOption(t,n,r){return AE(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 u$(this.validator,t,n,this.rootSchema,this.experimental_customMergeAllOf)}isMultiSelect(t){return jE(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}isSelect(t){return ME(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}retrieveSchema(t,n,r){return Jr(this.validator,t,this.rootSchema,n,this.experimental_customMergeAllOf,r)}sanitizeDataForNewSchema(t,n,r){return sx(this.validator,this.rootSchema,t,n,r,this.experimental_customMergeAllOf)}toPathSchema(t,n,r){return uce(this.validator,t,n,this.rootSchema,r,this.experimental_customMergeAllOf)}}function dce(e,t,n={},r){return new fce(e,t,n,r)}function hce(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[i,o]=r,[l,...c]=i.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(o),p=new Array(h.length);for(let S=0;S<h.length;S++)p[S]=h.charCodeAt(S);return{blob:new window.Blob([new Uint8Array(p)],{type:u}),name:d}}catch(h){throw new Error("File is invalid: "+h.message)}}function xa(e,t){let n=String(e);for(;n.length<t;)n="0"+n;return n}function f$(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 f$(t,e).reverse();const n=[];for(let r=e;r<=t;r++)n.push({value:r,label:xa(r,2)});return n}function NM(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 i=0;i<n.length;i++){const o=n[i];if(!Object.prototype.hasOwnProperty.call(t,o)||!Object.is(e[o],t[o]))return!1}return!0}function pce(e,t){let n=e;if(Array.isArray(t)){const r=n.split(/(%\d)/);t.forEach((i,o)=>{const l=r.findIndex(c=>c===`%${o+1}`);l>=0&&(r[l]=i)}),n=r.join("")}return n}function mce(e,t){return pce(e,t)}function Rr(e,t=[],n){if(Array.isArray(e))return e.map(o=>Rr(o,t)).filter(o=>o!==n);const r=e===""||e===null?-1:Number(e),i=t[r];return i?i.value:n}function d$(e,t,n=[]){const r=Rr(e,n);return Array.isArray(t)?t.filter(i=>!An(i,r)):An(r,t)?void 0:t}function Gh(e,t){return Array.isArray(t)?t.some(n=>An(n,e)):An(t,e)}function h$(e,t=[],n=!1){const r=t.map((i,o)=>Gh(i.value,e)?String(o):void 0).filter(i=>typeof i<"u");return n?r:r[0]}function p$(e,t,n=[]){const r=Rr(e,n);if(!ly(r)){const i=n.findIndex(c=>r===c.value),o=n.map(({value:c})=>c);return t.slice(0,i).concat(r,t.slice(i)).sort((c,u)=>+(o.indexOf(c)>o.indexOf(u)))}return t}class m${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"?ze(this.errorSchema,t):this.errorSchema;return!r&&t&&(r={},CG(this.errorSchema,t,r,Object)),r}resetAllErrors(t){return this.errorSchema=t?Nh(t):{},this}addErrors(t,n){const r=this.getOrCreateErrorBlock(n);let i=ze(r,Br);return Array.isArray(i)||(i=[],r[Br]=i),Array.isArray(t)?hn(r,Br,[...new Set([...i,...t])]):hn(r,Br,[...new Set([...i,t])]),this}setErrors(t,n){const r=this.getOrCreateErrorBlock(n),i=Array.isArray(t)?[...new Set([...t])]:[t];return hn(r,Br,i),this}clearErrors(t){const n=this.getOrCreateErrorBlock(t);return hn(n,Br,[]),this}}function DM(e,t){const n=La(e),r=La(t);if(e===t||!n&&!r)return[];if(n&&!r)return Ji(e);if(!n&&r)return Ji(t);{const i=Ji(wG(e,(l,c)=>!An(l,ze(t,c)))),o=KK(Ji(t),Ji(e));return[...i,...o]}}function gce(e,t,n=[1900,new Date().getFullYear()+2],r="YMD"){const{day:i,month:o,year:l,hour:c,minute:u,second:d}=e,h={type:"day",range:[1,31],value:i},p={type:"month",range:[1,12],value:o},g={type:"year",range:n,value:l},S=[];switch(r){case"MDY":S.push(p,h,g);break;case"DMY":S.push(h,p,g);break;default:S.push(g,p,h)}return t&&S.push({type:"hour",range:[0,23],value:c},{type:"minute",range:[0,59],value:u},{type:"second",range:[0,59],value:d}),S}function g$(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 y$(e,t,n={},r=!0){const i={type:t||"text",...g$(e)};return n.inputType?i.type=n.inputType:t||(e.type==="number"?(i.type="number",r&&i.step===void 0&&(i.step="any")):e.type==="integer"&&(i.type="number",i.step===void 0&&(i.step=1))),n.autocomplete&&(i.autoComplete=n.autocomplete),n.accept&&(i.accept=n.accept),i}const IM={props:{disabled:!1},submitText:"Submit",norender:!1};function v$(e={}){const t=lt(e);if(t&&t[Ry]){const n=t[Ry];return{...IM,...n}}return IM}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 i=n[e];return r[i]}return n[e]||r[e]}function PE(){if(typeof process>"u"||ze(process,"env.NODE_ENV")!=="test")return{};const e=new Map;return new Proxy({},{get(t,n){return e.has(n)||e.set(n,RN("test-id-")),e.get(n)}})}var rS={exports:{}},dn={};var $M;function yce(){if($M)return dn;$M=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=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"),S=Symbol.for("react.offscreen"),y;y=Symbol.for("react.module.reference");function C(x){if(typeof x=="object"&&x!==null){var w=x.$$typeof;switch(w){case e:switch(x=x.type,x){case n:case i: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 o:return x;default:return w}}case t:return w}}}return dn.ContextConsumer=l,dn.ContextProvider=o,dn.Element=e,dn.ForwardRef=u,dn.Fragment=n,dn.Lazy=g,dn.Memo=p,dn.Portal=t,dn.Profiler=i,dn.StrictMode=r,dn.Suspense=d,dn.SuspenseList=h,dn.isAsyncMode=function(){return!1},dn.isConcurrentMode=function(){return!1},dn.isContextConsumer=function(x){return C(x)===l},dn.isContextProvider=function(x){return C(x)===o},dn.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===e},dn.isForwardRef=function(x){return C(x)===u},dn.isFragment=function(x){return C(x)===n},dn.isLazy=function(x){return C(x)===g},dn.isMemo=function(x){return C(x)===p},dn.isPortal=function(x){return C(x)===t},dn.isProfiler=function(x){return C(x)===i},dn.isStrictMode=function(x){return C(x)===r},dn.isSuspense=function(x){return C(x)===d},dn.isSuspenseList=function(x){return C(x)===h},dn.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===n||x===i||x===r||x===d||x===h||x===S||typeof x=="object"&&x!==null&&(x.$$typeof===g||x.$$typeof===p||x.$$typeof===o||x.$$typeof===l||x.$$typeof===u||x.$$typeof===y||x.getModuleId!==void 0)},dn.typeOf=C,dn}var zM;function vce(){return zM||(zM=1,rS.exports=yce()),rS.exports}var bce=vce();const LM=Qs(bce),iS={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 Sce(e){let t=ze(e,"MergedWidget");if(!t){const n=e.defaultProps&&e.defaultProps.options||{};t=({options:r,...i})=>j.jsx(e,{options:{...n,...r},...i}),hn(e,"MergedWidget",t)}return t}function Ws(e,t,n={}){const r=Cs(e);if(typeof t=="function"||t&&LM.isForwardRef(k.createElement(t))||LM.isMemo(t))return Sce(t);if(typeof t!="string")throw new Error(`Unsupported widget definition: ${typeof t} in schema: ${JSON.stringify(e)}`);if(t in n){const i=n[t];return Ws(e,i,n)}if(typeof r=="string"){if(!(r in iS))throw new Error(`No widget for type '${r}' in schema: ${JSON.stringify(e)}`);if(t in iS[r]){const i=n[iS[r][t]];return Ws(e,i,n)}}throw new Error(`No widget '${t}' for type '${r}' in schema: ${JSON.stringify(e)}`)}function wce(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 xce(e){const t=new Set;return JSON.stringify(e,(n,r)=>(t.add(n),r)),JSON.stringify(e,Array.from(t).sort())}function Us(e){return wce(xce(e))}function _ce(e){return Us(e)}function Ece(e,t,n={}){try{return Ws(e,t,n),!0}catch(r){const i=r;if(i.message&&(i.message.startsWith("No widget")||i.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 NE(e){return pc(e,"error")}function vh(e){return pc(e,"examples")}function DE(e){return pc(e,"help")}function A0(e){return pc(e,"title")}function vi(e,t=!1){const n=t?` ${vh(e)}`:"";return`${NE(e)} ${mc(e)} ${DE(e)}${n}`}function Zl(e,t){return`${e}-${t}`}function Vs(e,t){return pc(e,t)}function sS(e,t){return pc(e,`optional${t}`)}function bf(e){return!ly(e)&&(!Zt(e)||Array.isArray(e)||!br(e))}function Cce(e,t){const{rootSchema:n,schemaUtils:r}=e;if(ka(t,n))return!0;if($n in n){const i=r.retrieveSchema(n);return ka(t,i)}return!1}function b$(e,t,n){return t?n:e}function Tce(e){return e?new Date(e).toJSON():void 0}function IE(e,t,n){const r=[ple];return Ut(e,SM)&&r.unshift(SM),ze(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]}'`,i=n(e),o=t.filter(h=>h==="*"||i[h]),l=n(o),c=e.filter(h=>!l[h]),u=o.indexOf("*");if(u===-1){if(c.length)throw new Error(`uiSchema order list does not contain ${r(c)}`);return o}if(u!==o.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");const d=[...o];return d.splice(u,1,...c),d}function oS(e,t=!0){if(!e)return{year:-1,month:-1,day:-1,hour:t?-1:0,minute:t?-1:0,second:t?-1:0};const n=new Date(e);if(Number.isNaN(n.getTime()))throw new Error("Unable to parse date "+e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:t?n.getUTCHours():0,minute:t?n.getUTCMinutes():0,second:t?n.getUTCSeconds():0}}function Hd(e){if(e.const||e.enum&&e.enum.length===1&&e.enum[0]===!0)return!0;if(e.anyOf&&e.anyOf.length===1)return Hd(e.anyOf[0]);if(e.oneOf&&e.oneOf.length===1)return Hd(e.oneOf[0]);if(e.allOf){const t=n=>Hd(n);return e.allOf.some(t)}return!1}function S$(e,t,n,r="customDeep"){if(r==="always")return!0;if(r==="shallow"){const{props:l,state:c}=e;return!NM(l,t)||!NM(c,n)}const{props:i,state:o}=e;return!An(i,t)||!An(o,n)}function FM(e){const t=TN(e.map(n=>Zt(n)?Cs(n):void 0).flat().filter(n=>n!==void 0));return t.length===1?t[0]:t}function Zh(e,t,n,r){const{enableOptionalDataFieldForType:i=[]}=lt(r,e.globalUiOptions);let o;return Gt in t&&Array.isArray(t[Gt])?o=FM(t[Gt]):jt in t&&Array.isArray(t[jt])?o=FM(t[jt]):o=Cs(t),!Cce(e,t)&&!n&&!!o&&!Array.isArray(o)&&!!i.find(l=>l===o)}function UM(e,t=!0){const{year:n,month:r,day:i,hour:o=0,minute:l=0,second:c=0}=e,u=Date.UTC(n,r-1,i,o,l,c),d=new Date(u).toJSON();return t?d:d.slice(0,10)}function $E(e,t=[]){if(!e)return[];let n=[];return Br in e&&(n=n.concat(e[Br].map(r=>{const i=`.${t.join(".")}`;return{property:i,message:r,stack:`${i} ${r}`}}))),Object.keys(e).reduce((r,i)=>{if(i!==Br){const o=e[i];La(o)&&(r=r.concat($E(o,[...t,i])))}return r},n)}function Oce(e){const t=new m$;return e.length&&e.forEach(n=>{const{property:r,message:i}=n,o=r==="."?[]:EN(r);o.length>0&&o[0]===""&&o.splice(0,1),i&&t.addErrors(i,o)}),t.ErrorSchema}function os(e,t,n,r){const i=Array.isArray(n)?n:n?.path,o=e===""?[]:[e],l=i?i.concat(...o):o,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 w$(e){return Object.keys(e).reduce((t,n)=>{if(n==="addError")return t;{const r=e[n];return La(r)?{...t,[n]:w$(r)}:{...t,[n]:r}}},{})}function Ace(e){return Object.values(e).every(t=>t!==-1)}function kce(e){const{className:t="form-control",type:n,range:r,value:i,select:o,rootId:l,name:c,disabled:u,readonly:d,autofocus:h,registry:p,onBlur:g,onFocus:S}=e,y=`${l}_${n}`,{SelectWidget:C}=p.widgets,x=k.useCallback(w=>o(n,w),[o,n]);return j.jsx(C,{schema:{type:"integer"},id:y,name:c,className:t,options:{enumOptions:f$(r[0],r[1])},placeholder:n,value:i,disabled:u,readonly:d,autofocus:h,onChange:x,onBlur:g,onFocus:S,registry:p,label:"","aria-describedby":vi(l)})}function Mce(e){const{time:t=!1,disabled:n=!1,readonly:r=!1,options:i,onChange:o,value:l}=e,[c,u]=k.useState(oS(l,t));k.useEffect(()=>{u(oS(l,t))},[t,l]);const d=k.useCallback((S,y)=>{const C={...c,[S]:typeof y>"u"?-1:y};Ace(C)?o(UM(C,t)):u(C)},[c,o,t]),h=k.useCallback(S=>{S.preventDefault(),!(n||r)&&o(void 0)},[n,r,o]),p=k.useCallback(S=>{if(S.preventDefault(),n||r)return;const y=oS(new Date().toJSON(),t);o(UM(y,t))},[n,r,t,o]);return{elements:k.useMemo(()=>gce(c,t,i.yearsRange,i.format),[c,t,i.yearsRange,i.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 jce(e,t){return e.replace(";base64",`;name=${encodeURIComponent(t)};base64`)}function Pce(e){const{name:t,size:n,type:r}=e;return new Promise((i,o)=>{const l=new window.FileReader;l.onerror=o,l.onload=c=>{var u;typeof((u=c.target)===null||u===void 0?void 0:u.result)=="string"?i({dataURL:jce(c.target.result,t),name:t,size:n,type:r}):i({dataURL:null,name:t,size:n,type:r})},l.readAsDataURL(e)})}function Nce(e){return Promise.all(Array.from(e).map(Pce))}function VM(e){return e.reduce((t,n)=>{if(!n)return t;try{const{blob:r,name:i}=hce(n);return[...t,{dataURL:n,name:i,size:r.size,type:r.type}]}catch{return t}},[])}function Dce(e,t,n=!1){const r=k.useMemo(()=>n&&e?Array.isArray(e)?e:[e]:[],[e,n]),i=k.useMemo(()=>Array.isArray(e)?VM(e):VM([e||""]),[e]),o=k.useCallback(c=>{Nce(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:i,handleChange:o,handleRemove:l}}function Ice(e){if(!e)return"";const t=new Date(e),n=xa(t.getFullYear(),4),r=xa(t.getMonth()+1,2),i=xa(t.getDate(),2),o=xa(t.getHours(),2),l=xa(t.getMinutes(),2),c=xa(t.getSeconds(),2),u=xa(t.getMilliseconds(),3);return`${n}-${r}-${i}T${o}:${l}:${c}.${u}`}function qg(e,t,n=!1){if(!t)return e;const{errors:r,errorSchema:i}=e;let o=$E(t),l=t;return br(i)||(l=yh(i,t,n?"preventDuplicates":!0),o=[...r].concat(o)),{errorSchema:l,errors:o}}function $ce(e){for(const t in e){const n=e,r=n[t];t===$n&&typeof r=="string"&&r.startsWith("#")?n[t]=HI+r:n[t]=zE(r)}return e}function zce(e){for(let t=0;t<e.length;t++)e[t]=zE(e[t]);return e}function zE(e){return Array.isArray(e)?zce([...e]):Zt(e)?$ce({...e}):e}var It;(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)"})(It||(It={}));function ox(){return RN("rjsf-array-item-")}function qM(e){return Array.isArray(e)?e.map(t=>({key:ox(),item:t})):[]}function x$(e){return Array.isArray(e)?e.map(t=>t.item):[]}function Lce(e){return Array.isArray(e.type)?!e.type.includes("null"):e.type!=="null"}function _$(e,t,n,r){let{addable:i}=lt(r,e.globalUiOptions);return i!==!1&&(t.maxItems!==void 0?i=n.length<t.maxItems:i=!0),i}function E$(e,t,n,r){if(typeof e.items=="function")try{return e.items(t,n,r)}catch(i){console.error(`Error executing dynamic uiSchema.items function for item at index ${n}:`,i);return}else return e.items}function Fce(e,t){const{schemaUtils:n,globalFormOptions:r}=e;let i=t.items;return r.useFallbackUiForUnsupportedType&&!i?i={}:kE(t)&&cle(t)&&(i=t.additionalItems),n.getDefaultFormState(i)}function Uce(e){const{schema:t,fieldPathId:n,uiSchema:r,formData:i=[],disabled:o=!1,readonly:l=!1,autofocus:c=!1,required:u=!1,placeholder:d,onBlur:h,onFocus:p,registry:g,rawErrors:S,name:y,onSelectChange:C}=e,{widgets:x,schemaUtils:w,globalFormOptions:v,globalUiOptions:E}=g,b=w.retrieveSchema(t.items,i),T=Zu(b,r),{widget:_="select",title:O,...M}=lt(r,E),P=Ws(t,_,x),z=O??t.title??y,L=w.getDisplayLabel(t,r,E),q=gc(os("",v,n,!0));return j.jsx(P,{id:q[_n],name:y,multiple:!0,onChange:C,onBlur:h,onFocus:p,options:{...M,enumOptions:T},schema:t,uiSchema:r,registry:g,value:i,disabled:o,readonly:l,required:u,label:z,hideLabel:!L,placeholder:d,autofocus:c,rawErrors:S,htmlName:q.name})}function Vce(e){const{schema:t,fieldPathId:n,uiSchema:r,disabled:i=!1,readonly:o=!1,autofocus:l=!1,required:c=!1,hideError:u,placeholder:d,onBlur:h,onFocus:p,formData:g=[],registry:S,rawErrors:y,name:C,onSelectChange:x}=e,{widgets:w,schemaUtils:v,globalFormOptions:E,globalUiOptions:b}=S,{widget:T,title:_,...O}=lt(r,b),M=Ws(t,T,w),P=_??t.title??C,z=v.getDisplayLabel(t,r,b),L=gc(os("",E,n,!0));return j.jsx(M,{id:L[_n],name:C,multiple:!0,onChange:x,onBlur:h,onFocus:p,options:O,schema:t,uiSchema:r,registry:S,value:g,disabled:i,readonly:o,hideError:u,required:c,label:P,hideLabel:!z,placeholder:d,autofocus:l,rawErrors:y,htmlName:L.name})}function qce(e){const{schema:t,uiSchema:n,fieldPathId:r,name:i,disabled:o=!1,readonly:l=!1,autofocus:c=!1,required:u=!1,onBlur:d,onFocus:h,registry:p,formData:g=[],rawErrors:S,onSelectChange:y}=e,{widgets:C,schemaUtils:x,globalFormOptions:w,globalUiOptions:v}=p,{widget:E="files",title:b,...T}=lt(n,v),_=Ws(t,E,C),O=b??t.title??i,M=x.getDisplayLabel(t,n,v),P=gc(os("",w,r,!0));return j.jsx(_,{options:T,id:P[_n],name:i,multiple:!0,onChange:y,onBlur:d,onFocus:h,schema:t,uiSchema:n,value:g,disabled:o,readonly:l,required:u,registry:p,autofocus:c,rawErrors:S,label:O,hideLabel:!M,htmlName:P.name})}function C$(e){const{itemKey:t,index:n,name:r,disabled:i,hideError:o,readonly:l,registry:c,uiOptions:u,parentUiSchema:d,canAdd:h,canRemove:p=!0,canMoveUp:g,canMoveDown:S,itemSchema:y,itemData:C,itemUiSchema:x,itemFieldPathId:w,itemErrorSchema:v,autofocus:E,onBlur:b,onFocus:T,onChange:_,rawErrors:O,totalItems:M,title:P,handleAddItem:z,handleCopyItem:L,handleRemoveItem:q,handleReorderItems:Z}=e,{schemaUtils:te,fields:{ArraySchemaField:ee,SchemaField:G},globalUiOptions:H}=c,Y=gc(w),oe=ee||G,re=mt("ArrayFieldItemTemplate",c,u),I=te.getDisplayLabel(y,x,H),{description:B}=lt(x),$=!!B||!!y.description,{orderable:N=!0,removable:U=!0,copyable:J=!1}=u,ne={moveUp:N&&g,moveDown:N&&S,copy:J&&h,remove:U&&p,toolbar:!1};ne.toolbar=Object.keys(ne).some(Se=>ne[Se]);const se=k.useCallback(Se=>{z(Se,n+1)},[z,n]),he=k.useCallback(Se=>{L(Se,n)},[L,n]),Ee=k.useCallback(Se=>{q(Se,n)},[q,n]),Q=k.useCallback(Se=>{Z(Se,n,n-1)},[Z,n]),ie=k.useCallback(Se=>{Z(Se,n,n+1)},[Z,n]),le={children:j.jsx(oe,{name:r,title:P,index:n,schema:y,uiSchema:x,formData:C,errorSchema:v,fieldPathId:Y,required:Lce(y),onChange:_,onBlur:b,onFocus:T,registry:c,disabled:i,readonly:l,hideError:o,autofocus:E,rawErrors:O}),buttonsProps:{fieldPathId:Y,disabled:i,readonly:l,canAdd:h,hasCopy:ne.copy,hasMoveUp:ne.moveUp,hasMoveDown:ne.moveDown,hasRemove:ne.remove,index:n,totalItems:M,onAddItem:se,onCopyItem:he,onRemoveItem:Ee,onMoveUpItem:Q,onMoveDownItem:ie,registry:c,schema:y,uiSchema:x},itemKey:t,className:"rjsf-array-item",disabled:i,hasToolbar:ne.toolbar,index:n,totalItems:M,readonly:l,registry:c,schema:y,uiSchema:x,parentUiSchema:d,displayLabel:I,hasDescription:$};return j.jsx(re,{...le})}function Bce(e){const{schema:t,uiSchema:n={},errorSchema:r,fieldPathId:i,formData:o,name:l,title:c,disabled:u=!1,readonly:d=!1,autofocus:h=!1,required:p=!1,hideError:g=!1,registry:S,onBlur:y,onFocus:C,rawErrors:x,onChange:w,keyedFormData:v,handleAddItem:E,handleCopyItem:b,handleRemoveItem:T,handleReorderItems:_}=e,O=t.title||c||l,{schemaUtils:M,fields:P,formContext:z,globalFormOptions:L,globalUiOptions:q}=S,{OptionalDataControlsField:Z}=P,te=lt(n,q),ee=Zt(t.items)?t.items:{},G=M.retrieveSchema(ee),H=x$(v),Y=Zh(S,t,p,n),oe=bf(o),re=_$(S,t,H,n)&&(!Y||oe),I=oe?v:[],B=Y?" rjsf-optional-array-field":"",$=e.childFieldPathId??i,N=Y?j.jsx(Z,{...e,fieldPathId:$}):void 0,U={canAdd:re,items:I.map((ne,se)=>{const{key:he,item:Ee}=ne,Q=Ee,ie=M.retrieveSchema(ee,Q),le=r?r[se]:void 0,Se=os(se,L,$),Te=E$(n,Ee,se,z),we={itemKey:he,index:se,name:l&&`${l}-${se}`,registry:S,uiOptions:te,hideError:g,readonly:d,disabled:u,required:p,title:O?`${O}-${se+1}`:void 0,canAdd:re,canMoveUp:se>0,canMoveDown:se<H.length-1,itemSchema:ie,itemFieldPathId:Se,itemErrorSchema:le,itemData:Q,itemUiSchema:Te,autofocus:h&&se===0,onBlur:y,onFocus:C,rawErrors:x,totalItems:v.length,handleAddItem:E,handleCopyItem:b,handleRemoveItem:T,handleReorderItems:_,onChange:w};return j.jsx(C$,{...we},he)}),className:`rjsf-field rjsf-field-array rjsf-field-array-of-${G.type}${B}`,disabled:u,fieldPathId:i,uiSchema:n,onAddClick:E,readonly:d,required:p,schema:t,title:O,formData:H,rawErrors:x,registry:S,optionalDataControl:N},J=mt("ArrayFieldTemplate",S,te);return j.jsx(J,{...U})}function Hce(e){const{schema:t,uiSchema:n={},formData:r,errorSchema:i,fieldPathId:o,name:l,title:c,disabled:u=!1,readonly:d=!1,autofocus:h=!1,required:p=!1,hideError:g=!1,registry:S,onBlur:y,onFocus:C,rawErrors:x,keyedFormData:w,onChange:v,handleAddItem:E,handleCopyItem:b,handleRemoveItem:T,handleReorderItems:_}=e;let{formData:O=[]}=e;const M=t.title||c||l,{schemaUtils:P,fields:z,formContext:L,globalFormOptions:q,globalUiOptions:Z}=S,te=lt(n,Z),{OptionalDataControlsField:ee}=z,G=Zh(S,t,p,n),H=bf(r),oe=(Zt(t.items)?t.items:[]).map((se,he)=>P.retrieveSchema(se,O[he])),re=Zt(t.additionalItems)?P.retrieveSchema(t.additionalItems,r):null,I=e.childFieldPathId??o;O.length<oe.length&&(O=O.concat(new Array(oe.length-O.length)));const B=H?w:[],$=G?" rjsf-optional-array-field":"",N=G?j.jsx(ee,{...e,fieldPathId:I}):void 0,U=_$(S,t,O,n)&&!!re&&(!G||H),J={canAdd:U,className:`rjsf-field rjsf-field-array rjsf-field-array-fixed-items${$}`,disabled:u,fieldPathId:o,formData:r,items:B.map((se,he)=>{const{key:Ee,item:Q}=se,ie=Q,le=he>=oe.length,Se=(le&&Zt(t.additionalItems)?P.retrieveSchema(t.additionalItems,ie):oe[he])||{},Te=os(he,q,I);let we;le?we=n.additionalItems:Array.isArray(n.items)?we=n.items[he]:we=E$(n,Q,he,L);const Ie=i?i[he]:void 0,Fe={index:he,itemKey:Ee,name:l&&`${l}-${he}`,registry:S,uiOptions:te,hideError:g,readonly:d,disabled:u,required:p,title:M?`${M}-${he+1}`:void 0,canAdd:U,canRemove:le,canMoveUp:he>=oe.length+1,canMoveDown:le&&he<O.length-1,itemSchema:Se,itemData:ie,itemUiSchema:we,itemFieldPathId:Te,itemErrorSchema:Ie,autofocus:h&&he===0,onBlur:y,onFocus:C,rawErrors:x,totalItems:w.length,onChange:v,handleAddItem:E,handleCopyItem:b,handleRemoveItem:T,handleReorderItems:_};return j.jsx(C$,{...Fe},Ee)}),onAddClick:E,readonly:d,required:p,registry:S,schema:t,uiSchema:n,title:M,errorSchema:i,rawErrors:x,optionalDataControl:N},ne=mt("ArrayFieldTemplate",S,te);return j.jsx(ne,{...J})}function Kce(e=[]){const t=k.useMemo(()=>Us(e),[e]),[n,r]=k.useState(()=>({formDataHash:t,keyedFormData:qM(e)}));let{keyedFormData:i,formDataHash:o}=n;if(t!==o){const c=Array.isArray(e)?e:[],u=i||[];i=c.length===u.length?u.map((d,h)=>({key:d.key,item:c[h]})):qM(c),o=t,r({formDataHash:o,keyedFormData:i})}const l=k.useCallback(c=>{const u=x$(c),d=Us(u);return r({formDataHash:d,keyedFormData:c}),u},[]);return{keyedFormData:i,updateKeyedFormData:l}}function Gce(e){const{schema:t,uiSchema:n,errorSchema:r,fieldPathId:i,registry:o,formData:l,onChange:c}=e,{globalFormOptions:u,schemaUtils:d,translateString:h}=o,{keyedFormData:p,updateKeyedFormData:g}=Kce(l),S=e.childFieldPathId??i,y=k.useCallback((_,O)=>{_&&_.preventDefault();let M;if(r){M={};for(const L in r){const q=parseInt(L);O===void 0||q<O?hn(M,[q],r[L]):q>=O&&hn(M,[q+1],r[L])}}const P={key:ox(),item:Fce(o,t)},z=[...p];O!==void 0?z.splice(O,0,P):z.push(P),c(g(z),S.path,M)},[p,o,t,c,g,r,S]),C=k.useCallback((_,O)=>{_&&_.preventDefault();let M;if(r){M={};for(const L in r){const q=parseInt(L);q<=O?hn(M,[q],r[L]):q>O&&hn(M,[q+1],r[L])}}const P={key:ox(),item:Nh(p[O].item)},z=[...p];O!==void 0?z.splice(O+1,0,P):z.push(P),c(g(z),S.path,M)},[p,c,g,r,S]),x=k.useCallback((_,O)=>{_&&_.preventDefault();let M;if(r){M={};for(const z in r){const L=parseInt(z);L<O?hn(M,[L],r[z]):L>O&&hn(M,[L-1],r[z])}}const P=p.filter((z,L)=>L!==O);c(g(P),S.path,M)},[p,c,g,r,S]),w=k.useCallback((_,O,M)=>{_&&(_.preventDefault(),_.currentTarget.blur());let P;if(r){P={};for(const q in r){const Z=parseInt(q);Z==O?hn(P,[M],r[O]):Z==M?hn(P,[O],r[M]):hn(P,[q],r[Z])}}function z(){const q=p.slice();return q.splice(O,1),q.splice(M,0,p[O]),q}const L=z();c(g(L),S.path,P)},[p,c,g,r,S]),v=k.useCallback((_,O,M,P)=>{c(_===void 0?null:_,O,M,P)},[c]),E=k.useCallback(_=>{c(_,S.path,void 0,S?.[_n])},[c,S]),b={...e,formData:l,fieldPathId:S,onSelectChange:E},T={...e,handleAddItem:y,handleCopyItem:C,handleRemoveItem:x,handleReorderItems:w,keyedFormData:p,onChange:v};if(!(Gu in t)){if(!u.useFallbackUiForUnsupportedType){const O=lt(n),M=mt("UnsupportedFieldTemplate",o,O);return j.jsx(M,{schema:t,fieldPathId:i,reason:h(It.MissingItems),registry:o})}const _={...t,[Gu]:{type:void 0}};b.schema=_,T.schema=_}return d.isMultiSelect(b.schema)?j.jsx(Uce,{...b}):c$(n)?j.jsx(Vce,{...b}):kE(b.schema)?j.jsx(Hce,{...T}):d.isFilesArray(b.schema,n)?j.jsx(qce,{...b}):j.jsx(Bce,{...T})}function Zce(e){const{schema:t,name:n,uiSchema:r,fieldPathId:i,formData:o,registry:l,required:c,disabled:u,readonly:d,hideError:h,autofocus:p,title:g,onChange:S,onFocus:y,onBlur:C,rawErrors:x}=e,{title:w}=t,{widgets:v,translateString:E,globalUiOptions:b}=l,{widget:T="checkbox",title:_,label:O=!0,enumNames:M,...P}=lt(r,b),z=Ws(t,T,v),L=E(It.YesLabel),q=E(It.NoLabel);let Z;const te=_??w??g??n;if(Array.isArray(t.oneOf))Z=Zu({oneOf:t.oneOf.map(G=>{if(Zt(G))return{...G,title:G.title||(G.const===!0?L:q)}}).filter(G=>G)},r);else{const G=t.enum??[!0,!1];!M&&G.length===2&&G.every(H=>typeof H=="boolean")?Z=[{value:G[0],label:G[0]?L:q},{value:G[1],label:G[1]?L:q}]:Z=Zu({enum:G},r)}const ee=k.useCallback((G,H,Y)=>S(G,i.path,H,Y),[S,i]);return j.jsx(z,{options:{...P,enumOptions:Z},schema:t,uiSchema:r,id:i.$id,name:n,onChange:ee,onFocus:y,onBlur:C,label:te,hideLabel:!O,value:o,required:c,disabled:u,readonly:d,hideError:h,registry:l,autofocus:p,rawErrors:x,htmlName:i.name})}function Yce(e){return{type:"string",enum:["string","number","boolean","object","array"],default:"string",title:e}}function Wce(e){const t=typeof e;return t==="string"||t==="number"||t==="boolean"?t:t==="object"?Array.isArray(e)?"array":"object":"string"}function Xce(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 Qce(e){const{id:t,formData:n,displayLabel:r=!0,schema:i,name:o,uiSchema:l,required:c,disabled:u=!1,readonly:d=!1,onBlur:h,onFocus:p,registry:g,fieldPathId:S,onChange:y,errorSchema:C}=e,{translateString:x,fields:w,globalFormOptions:v}=g,[E,b]=k.useState(Wce(n)),T=lt(l),_=gc(os("__internal_type_selector",v,S)),O=x(It.Type),M=k.useMemo(()=>Yce(O),[O]),P=q=>{q!=null&&(b(q),y(Xce(n,q),S.path,C,t))};if(!v.useFallbackUiForUnsupportedType){const{reason:q=x(It.UnknownFieldType,[String(i.type)])}=e,Z=mt("UnsupportedFieldTemplate",g,T);return j.jsx(Z,{schema:i,fieldPathId:S,reason:q,registry:g})}const z=mt("FallbackFieldTemplate",g,T),{SchemaField:L}=w;return j.jsx(z,{schema:i,registry:g,typeSelector:j.jsx(L,{fieldPathId:_,name:`${o}__fallback_type`,schema:M,formData:E,onChange:P,onBlur:h,onFocus:p,registry:g,hideLabel:!r,disabled:u,readonly:d,required:c},n?Us(n):"__empty__"),schemaField:j.jsx(L,{...e,schema:{type:E,title:x(It.Value),...E==="object"&&{additionalProperties:!0}}})})}var qs;(function(e){e.ROW="ui:row",e.COLUMN="ui:col",e.COLUMNS="ui:columns",e.CONDITION="ui:condition"})(qs||(qs={}));var Kd;(function(e){e.ALL="all",e.SOME="some",e.NONE="none"})(Kd||(Kd={}));const Jce=/^\$lookup=(.+)/,aS="layoutGrid";function BM(e,t){return e??t}function eue(e){return/^\d+?$/.test(e)}const Na=PE();function tue(e,t,n,r,i){const o=ze(n,[tx],{}),l=ze(n,e),c={...ze(l,[ja],{}),...t,...o},u={...l};br(c)||hn(u,[ja],c),br(o)||hn(u,[tx],o);let{readonly:d}=lt(u);return(i===!0||SN(d)&&r===!0)&&(d=!0,Ut(c,G1)?hn(u,[ja,G1],!0):hn(u,`ui:${G1}`,!0)),{fieldUiSchema:u,uiReadonly:d}}function nue(e,t,n="$0m3tH1nG Un3xP3cT3d"){const r=rw([t]).sort(),i=rw([n]).sort();switch(e){case Kd.ALL:return ka(r,i);case Kd.SOME:return fA(r,i).length>0;case Kd.NONE:return fA(r,i).length===0;default:return!1}}function k0(e,t,n){let r={},i=e[t];if(La(i)){const{children:o,className:l,...c}=i;if(i=o,l){const d=l.split(" ").map(h=>IE(n,h,h)).join(" ");r={...c,className:d}}else r=c}if(!Array.isArray(i))throw new TypeError(`Expected array for "${t}" in ${JSON.stringify(e)}`);return{children:i,gridProps:r}}function HM(e,t,n){let r;if(eue(n)&&e&&e?.type==="array"&&Ut(e,Gu)){const i=Number(n),o=e[Gu];Array.isArray(o)?i>o.length?r=yN(o):r=o[i]:r=o,t={[_n]:t[_n],path:[...t.path.slice(0,t.path.length-1),i]}}return{rawSchema:r,fieldPathId:t}}function rue(e,t,n,r,i){const{schemaUtils:o,globalFormOptions:l}=e;let c=n,u=i;const d=t.split("."),h=d.pop();let p=o.retrieveSchema(c,r),g=r,S=p.readOnly;d.forEach(x=>{if(u=os(x,l,u),Ut(p,rn))c=ze(p,[rn,x],{});else if(p&&(Ut(p,jt)||Ut(p,Gt))){const w=Ut(p,jt)?jt:Gt,v=o.findSelectedOptionInXxxOf(p,x,w,g);c=ze(v,[rn,x],{})}else{const w=HM(p,u,x);c=w.rawSchema??{},u=w.fieldPathId}g=ze(g,x,{}),p=o.retrieveSchema(c,g),S=BM(p.readOnly,S)});let y,C=!1;if(br(p)&&(p=void 0),p&&h){if(p&&(Ut(p,jt)||Ut(p,Gt))){const w=Ut(p,jt)?jt:Gt;p=o.findSelectedOptionInXxxOf(p,h,w,g)}u=os(h,l,u),C=p!==void 0&&Array.isArray(p.required)&&rG(p.required,h);const x=HM(p,u,h);if(x.rawSchema?(p=x.rawSchema,u=x.fieldPathId):(p=ze(p,[rn,h]),p=p&&o.retrieveSchema(p)),S=BM(p?.readOnly,S),p&&(Ut(p,jt)||Ut(p,Gt))){const w=Ut(p,jt)?jt:Gt,v=Ys(p);y={options:p[w],hasDiscriminator:!!v}}}return{schema:p,isRequired:C,isReadonly:S,optionsInfo:y,fieldPathId:u}}function iue(e,t){let n=e;return Fa(n)&&(n=IE(t,n)),Oh(n)?n:null}function sue(e,t){let n,r=null,i={},o;if(Fa(t)||SN(t))n=t??"";else{const{name:l="",render:c,...u}=t;n=l,i=u,br(i)||GK(i,(d,h)=>{if(Fa(d)){const p=Jce.exec(d);if(Array.isArray(p)&&p.length>1){const g=p[1];i[h]=IE(e,g,g)}}}),r=iue(c,e),!l&&r&&(o=j.jsx(r,{...u,"data-testid":Na.uiComponent}))}return{name:n,UIComponent:r,uiProps:i,rendered:o}}function M0(e){const{childrenLayoutGridSchemaId:t,...n}=e,{registry:r,schema:i,formData:o}=n,{schemaUtils:l}=r,c=l.retrieveSchema(i,o);return t.map(u=>k.createElement(LE,{...n,key:`layoutGrid-${Us(u)}`,schema:c,layoutGridSchema:u}))}function oue(e){const{layoutGridSchema:t,...n}=e,{formData:r,registry:i}=n,{children:o,gridProps:l}=k0(t,qs.CONDITION,i),{operator:c,field:u="",value:d}=l,h=ze(r,u,null);return nue(c,h,d)?j.jsx(M0,{...n,childrenLayoutGridSchemaId:o}):null}function aue(e){const{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:i}=n,{children:o,gridProps:l}=k0(t,qs.COLUMN,r),c=lt(i),u=mt("GridTemplate",r,c);return j.jsx(u,{column:!0,"data-testid":Na.col,...l,children:j.jsx(M0,{...n,childrenLayoutGridSchemaId:o})})}function lue(e){const{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:i}=n,{children:o,gridProps:l}=k0(t,qs.COLUMNS,r),c=lt(i),u=mt("GridTemplate",r,c);return o.map(d=>j.jsx(u,{column:!0,"data-testid":Na.col,...l,children:j.jsx(M0,{...n,childrenLayoutGridSchemaId:[d]})},`column-${Us(d)}`))}function cue(e){const{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:i}=n,{children:o,gridProps:l}=k0(t,qs.ROW,r),c=lt(i),u=mt("GridTemplate",r,c);return j.jsx(u,{...l,"data-testid":Na.row,children:j.jsx(M0,{...n,childrenLayoutGridSchemaId:o})})}function uue(e){const{gridSchema:t,schema:n,uiSchema:r,errorSchema:i,fieldPathId:o,onBlur:l,onFocus:c,formData:u,readonly:d,registry:h,layoutGridSchema:p,...g}=e,{onChange:S}=g,{fields:y}=h,{SchemaField:C,LayoutMultiSchemaField:x}=y,w=sue(h,t),{name:v,UIComponent:E,uiProps:b}=w,{schema:T,isRequired:_,isReadonly:O,optionsInfo:M,fieldPathId:P}=rue(h,v,n,u,o),z=gc(P);if(w.rendered)return w.rendered;if(T){const L=M?.hasDiscriminator?x:C,{fieldUiSchema:q,uiReadonly:Z}=tue(v,b,r,O,d);return j.jsx(L,{"data-testid":M?.hasDiscriminator?Na.layoutMultiSchemaField:Na.field,...g,name:v,required:_,readonly:Z,schema:T,uiSchema:q,errorSchema:ze(i,v),fieldPathId:z,formData:ze(u,v),onChange:S,onBlur:l,onFocus:c,options:M?.options,registry:h})}return E?j.jsx(E,{"data-testid":Na.uiComponent,...g,name:v,required:_,formData:u,readOnly:!!O||d,errorSchema:i,uiSchema:r,schema:n,fieldPathId:o,onBlur:l,onFocus:c,registry:h,...b}):null}function LE(e){const{uiSchema:t}=e;let{layoutGridSchema:n}=e;const r=lt(t);if(!n&&aS in r&&Zt(r[aS])&&(n=r[aS]),Zt(n)){if(qs.ROW in n)return j.jsx(cue,{...e,layoutGridSchema:n});if(qs.COLUMN in n)return j.jsx(aue,{...e,layoutGridSchema:n});if(qs.COLUMNS in n)return j.jsx(lue,{...e,layoutGridSchema:n});if(qs.CONDITION in n)return j.jsx(oue,{...e,layoutGridSchema:n})}return j.jsx(uue,{...e,gridSchema:n})}LE.TEST_IDS=Na;function fue(e){const{fieldPathId:t,title:n,schema:r,uiSchema:i,required:o,registry:l,name:c}=e,u=lt(i,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:A0(t),title:p,required:o,schema:r,uiSchema:i,registry:l})}function lS(e,t,n){const r="!@#!@$@#$!@$#";return e.map(({schema:o})=>o).find(o=>{const l=ze(o,[rn,t]);return ze(l,R0,ze(l,ss,r))===n})}function KM(e,t,n,r,i){const o=t.map(u=>n.retrieveSchema(u,i));let l=e;Ut(e,jt)?l={...e,[jt]:o}:Ut(e,Gt)&&(l={...e,[Gt]:o});const c=Zu(l,r);if(!c)throw new Error(`No enumOptions were computed from the schema ${JSON.stringify(l)}`);return c}function due(e){const{name:t,baseType:n,disabled:r=!1,formData:i,fieldPathId:o,onBlur:l,onChange:c,options:u,onFocus:d,registry:h,uiSchema:p,schema:g,autofocus:S,readonly:y,required:C,errorSchema:x,hideError:w=!1}=e,{widgets:v,schemaUtils:E,globalUiOptions:b}=h,[T,_]=k.useState(KM(g,u,E,p,i)),O=ze(o,_n),M=Ys(g),P=mt("FieldErrorTemplate",h,u),z=mt("FieldTemplate",h,u),L=Us(g),q=Us(u),Z=p?Us(p):"",te=i?Us(i):"";k.useEffect(()=>{_(KM(g,u,E,p,i))},[L,q,E,Z,te]);const{widget:ee=M?"radio":"select",title:G="",placeholder:H="",optionsSchemaSelector:Y=M,hideError:oe,...re}=lt(p);if(!Y)throw new Error("No selector field provided for the LayoutMultiSchemaField");const I=ze(i,Y);let B=ze(T[0]?.schema,[rn,Y],{});const $=lS(T,Y,I);B=B?.type?B:{...B,type:$?.type||n};const N=Ws(B,ee,v),U=oe===void 0?w:!!oe,J=ze(x,[Br],[]),ne=ih(x,[Br]),se=E.getDisplayLabel(g,p,b),he=ie=>{const le=lS(T,Y,ie),Se=lS(T,Y,I);let Te=E.sanitizeDataForNewSchema(le,Se,i);Te&&le&&(Te=E.getDefaultFormState(le,Te,"excludeObjectChildren")),Te&&hn(Te,Y,ie),c(Te,o.path,void 0,O)},Ee={enumOptions:T,...re},Q=!U&&J.length>0?j.jsx(P,{fieldPathId:o,schema:g,errors:J,registry:h}):void 0;return j.jsx(z,{id:O,schema:g,label:(G||g.title)??"",disabled:r||Array.isArray(T)&&br(T),uiSchema:p,required:C,readonly:!!y,registry:h,displayLabel:se,errors:Q,onChange:c,onKeyRename:Pg,onKeyRenameBlur:Pg,onRemoveProperty:Pg,children:j.jsx(N,{id:O,name:t,schema:g,label:(G||g.title)??"",disabled:r||Array.isArray(T)&&br(T),uiSchema:p,autofocus:S,readonly:y,required:C,registry:h,multiple:!1,rawErrors:J,hideError:U,hideLabel:!se,errorSchema:ne,placeholder:H,onChange:he,onBlur:l,onFocus:d,value:I,options:Ee,htmlName:o.name})})}class GM extends k.Component{constructor(t){super(t);const{formData:n,options:r,registry:{schemaUtils:i}}=this.props,o=r.map(l=>i.retrieveSchema(l,n));this.state={retrievedOptions:o,selectedOption:this.getMatchingOption(0,n,o)}}componentDidUpdate(t,n){const{formData:r,options:i,fieldPathId:o}=this.props,{selectedOption:l}=this.state;let c=this.state;if(!An(t.options,i)){const{registry:{schemaUtils:u}}=this.props,d=i.map(h=>u.retrieveSchema(h,r));c={selectedOption:l,retrievedOptions:d}}if(!An(r,t.formData)&&o.$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:i,registry:{schemaUtils:o}}=this.props,l=Ys(i);return o.getClosestMatchingOption(n,r,t,l)}onOptionChange=t=>{const{selectedOption:n,retrievedOptions:r}=this.state,{formData:i,onChange:o,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,i);h&&(g=u.getDefaultFormState(h,g,"excludeObjectChildren")),this.setState({selectedOption:d},()=>{o(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:i,onBlur:o,onFocus:l,readonly:c,required:u=!1,registry:d,schema:h,uiSchema:p}=this.props,{widgets:g,fields:S,translateString:y,globalUiOptions:C,schemaUtils:x}=d,{SchemaField:w}=S,v=mt("MultiSchemaFieldTemplate",d,C),E=Zh(d,h,u,p),b=bf(i),{selectedOption:T,retrievedOptions:_}=this.state,{widget:O="select",placeholder:M,autofocus:P,autocomplete:z,title:L=h.title,...q}=lt(p,C),Z=Ws({type:"number"},O,g),te=ze(r,Br,[]),ee=ih(r,[Br]),G=x.getDisplayLabel(h,p,C),H=T>=0&&_[T]||null;let Y;if(H){const{required:J}=h;Y=J?No({required:J},H):H}let oe=[];jt in h&&p&&jt in p?Array.isArray(p[jt])?oe=p[jt]:console.warn(`uiSchema.oneOf is not an array for "${L||t}"`):Gt in h&&p&&Gt in p&&(Array.isArray(p[Gt])?oe=p[Gt]:console.warn(`uiSchema.anyOf is not an array for "${L||t}"`));let re=p;T>=0&&oe.length>T&&(re=oe[T]);const I=L?It.TitleOptionPrefix:It.OptionPrefix,B=L?[L]:[],$=_.map((J,ne)=>{const{title:se=J.title}=lt(oe[ne]);return{label:se||y(I,B.concat(String(ne+1))),value:ne}}),N=!E||b?j.jsx(Z,{id:this.getFieldId(),name:`${t}${h.oneOf?"__oneof_select":"__anyof_select"}`,schema:{type:"number",default:0},onChange:this.onOptionChange,onBlur:o,onFocus:l,disabled:n||br($),multiple:!1,rawErrors:te,errorSchema:ee,value:T>=0?T:void 0,options:{enumOptions:$,...q},registry:d,placeholder:M,autocomplete:z,autofocus:P,label:L??t,hideLabel:!G,readonly:c}):void 0,U=Y&&Y.type!=="null"&&j.jsx(w,{...this.props,schema:Y,uiSchema:re})||null;return j.jsx(v,{schema:h,registry:d,uiSchema:p,selector:N,optionSchemaField:U})}}const hue=/\.([0-9]*0)*$/,pue=/[0.]0*$/;function mue(e){const{registry:t,onChange:n,formData:r,value:i}=e,[o,l]=k.useState(i),{StringField:c}=t.fields;let u=r;const d=k.useCallback((h,p,g,S)=>{l(h),`${h}`.charAt(0)==="."&&(h=`0${h}`);const y=typeof h=="string"&&h.match(hue)?bM(h.replace(pue,"")):bM(h);n(y,p,g,S)},[n]);if(typeof o=="string"&&typeof u=="number"){const h=new RegExp(`^(${String(u).replace(".","\\.")})?\\.?0*$`);o.match(h)&&(u=o)}return j.jsx(c,{...e,formData:u,onChange:d})}function $s(){return $s=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},$s.apply(null,arguments)}const fg=["strong","em","del","mark"],ZM=[["**",fg[0]],["__",fg[0]],["~~",fg[2]],["==",fg[3]],["*","em"],["_","em"]];function gue(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 i=e[r]==="("?")":"]",o=1;for(r++;r<e.length&&o>0;)e[r]!=="\\"?(e[r]==="("&&i===")"&&o++,e[r]===i&&o--,r++):r+=2;if(o===0)return r}return-1}function yue(e,t){if(!t||!t.inline&&!t.simple)return null;var n=e[0];if(n!=="*"&&n!=="_"&&n!=="~"&&n!=="=")return null;for(var r="",i=0,o="",l=0;l<6;l++){var c=ZM[l][0];if(e.startsWith(c)&&e.length>=2*c.length){r=c,i=c.length,o=ZM[l][1];break}}if(!r)return null;for(var u=i,d=!1,h=!1,p="",g=0,S="",y=!1,C="";u<e.length;){var x=e[u];if(y)S+=x,y=!1,C=x,u++;else if(x!=="\\")if(x!=="`"||g!==0){if(x==="["&&!d&&g===0){var w=gue(e,u);if(w!==-1){S+=e.slice(u,w),u=w,C=e[w-1];continue}}if(h)S+=x,p?x===p&&(p=""):x==='"'||x==="'"?p=x:x===">"&&(h=!1),C=x,u++;else if(x!=="<"||d){if(x===`
44
- `&&C===`
45
- `&&!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>=i&&(i!==1||r!=="*"&&r!=="_"||e[u-1]!==r&&e[u+1]!==r)){var E=[e.slice(0,u+v),o,S+e.slice(u+i,u+v)];return E.index=0,E.input=e,E}}S+=x,C=x,u++}else{var b=e[u+1],T=e.indexOf(">",u);if(T!==-1){var _=e.slice(u,T+1).endsWith("/>");b==="/"?g=Math.max(0,g-1):_||g++}h=!0,S+=x,C=x,u++}}else d=!d,S+=x,C=x,u++;else S+=x,y=!0,C=x,u++}return null}const vue=["children","options"],YM=["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"}),WM={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},bue=["style","script","pre"],Sue=["src","href","data","formAction","srcDoc","action"],wue=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,xue=/\n{2,}$/,XM=/^(\s*>[\s\S]*?)(?=\n\n|$)/,_ue=/^ *> ?/gm,Eue=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,Cue=/^ {2,}\n/,Tue=/^(?:([-*_])( *\1){2,}) *(?:\n *)+\n/,QM=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,JM=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,Rue=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,Oue=/^(?:\n *)*\n/,Aue=/\r\n?/g,kue=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,Mue=/^\[\^([^\]]+)]/,jue=/\f/g,Pue=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,Nue=/^\[(x|\s)\]/,e3=/^(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,t3=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,n3=/^([^\n]+)\n *(=|-)\2{2,} *\n/,FE=/^<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>/i;function Due(e){const t=FE.exec(e);if(!t)return null;const n=t[1],r=n.toLowerCase(),i=r.length+1;let o=t[0].length;e[o]===`
46
- `&&o++;const l=o;let c=o,u=1;const d=e.length;for(;u>0;){const p=e.indexOf("<",o);if(p===-1)return null;let g=-1,S=-1;if(e[p+1]==="/")S=p;else if(e[p+1]===r[0]||e[p+1]===n[0]){let y=!0;for(let C=0;C<r.length;C++){const x=e[p+1+C];if(x!==r[C]&&x!==n[C]){y=!1;break}}!y||e[p+i]!==" "&&e[p+i]!==">"||(g=p)}if(g!==-1||S!==-1)if(g!==-1&&(S===-1||g<S))o=g+i+1,u++;else{let y=S+2;for(;y<d;){const x=e[y];if(x!==" "&&x!==" "&&x!==`
47
- `&&x!=="\r")break;y++}if(y+r.length>d)return null;let C=!0;for(let x=0;x<r.length;x++){const w=e[y+x];if(w!==r[x]&&w!==n[x]){C=!1;break}}if(!C){o=y;continue}for(y+=r.length;y<d;){const x=e[y];if(x!==" "&&x!==" "&&x!==`
48
- `&&x!=="\r")break;y++}if(y>=d||e[y]!==">"){o=y;continue}c=S,o=y+1,u--}else o=p+1}let h=0;for(;o+h<d&&e[o+h]===`
49
- `;)h++;return[e.slice(0,o+h),n,t[2],e.slice(l,c)]}const Iue=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,r3=/^<!--[\s\S]*?(?:-->)/,$ue=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,ax=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,zue=/^\{.*\}$/,Lue=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,Fue=/^<([^ >]+[:@\/][^ >]+)>/,Uue=/-([a-z])?/gi,i3=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,Vue=/^[^\n]+(?: \n|\n{2,})/,que=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,Bue=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,Hue=/^\[([^\]]*)\] ?\[([^\]]*)\]/,Kue=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,Gue=/\t/g,Zue=/(^ *\||\| *$)/g,Yue=/^ *:-+: *$/,Wue=/^ *:-+ *$/,Xue=/^ *-+: *$/,Que=/^(:[a-zA-Z0-9-_]+:)/,Jue=/^\\([^0-9A-Za-z\s])/,efe=/\\([^0-9A-Za-z\s])/g,tfe=/^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/,nfe=/^\n+/,rfe=/^([ \t]*)/,ife=/(?:^|\n)( *)$/,UE="(?:\\d+\\.)",VE="(?:[*+-])";function T$(e){return"( *)("+(e===1?UE:VE)+") +"}const R$=T$(1),O$=T$(2);function A$(e){return RegExp("^"+(e===1?R$:O$))}const sfe=A$(1),ofe=A$(2);function k$(e){return RegExp("^"+(e===1?R$:O$)+"[^\\n]*(?:\\n(?!\\1"+(e===1?UE:VE)+" )[^\\n]*)*(\\n|$)","gm")}const afe=k$(1),lfe=k$(2);function M$(e){const t=e===1?UE:VE;return RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const j$=M$(1),P$=M$(2);function s3(e,t){const n=t===1,r=n?j$:P$,i=n?afe:lfe,o=n?sfe:ofe;return{t:l=>o.test(l),o:Ra(function(l,c){const u=ife.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(xue,`
50
- `).match(i),p=o.exec(h[0]),g=RegExp("^ {1,"+(p?p[0].length:0)+"}","gm");let S=!1;return{items:h.map(function(y,C){const x=y.replace(g,"").replace(o,""),w=C===h.length-1,v=Ns(x,`
51
-
52
- `)||w&&S;S=v;const E=u.inline,b=u.list;let T;u.list=!0,v?(u.inline=!1,T=Gd(x)+`
53
-
54
- `):(u.inline=!0,T=Gd(x));const _=c(T,u);return u.inline=E,u.list=b,_}),ordered:n,start:d}}}}const cfe=RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),ufe=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;function o3(e){return typeof e=="string"}function Gd(e){let t=e.length;for(;t>0&&e[t-1]<=" ";)t--;return e.slice(0,t)}function lx(e,t){return e.startsWith(t)}function Ns(e,t){return e.indexOf(t)!==-1}function ffe(e,t,n){if(Array.isArray(n)){for(let r=0;r<n.length;r++)if(lx(e,n[r]))return!0;return!1}return n(e,t)}function Ed(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 dfe(e){return Xue.test(e)?"right":Yue.test(e)?"center":Wue.test(e)?"left":null}function a3(e,t,n,r){const i=n.inTable;n.inTable=!0;let o=[[]],l="";function c(){if(!l)return;const u=o[o.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&&o.push([]):l+=u}),c(),n.inTable=i,o}function hfe(e,t,n){n.inline=!0;const r=e[2]?e[2].replace(Zue,"").split("|").map(dfe):[],i=e[3]?(function(l,c,u){return l.trim().split(`
55
- `).map(function(d){return a3(d,c,u,!0)})})(e[3],t,n):[],o=a3(e[1],t,n,!!i.length);return n.inline=!1,i.length?{align:r,cells:i,header:o,type:"25"}:{children:o,type:"21"}}function l3(e,t){return e.align[t]==null?{}:{textAlign:e.align[t]}}function Ra(e){return e.inline=1,e}function ba(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 To(e){return function(t,n){return n.inline||n.simple?null:e.exec(t)}}function c3(e){return Ra(function(t){return e.exec(t)})}const pfe=/(javascript|vbscript|data(?!:image)):/i;function mfe(e){try{const t=decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"");if(pfe.test(t))return null}catch{return null}return e}function Ds(e){return e&&e.replace(efe,"$1")}function Bg(e,t,n){const r=n.inline||!1,i=n.simple||!1;n.inline=!0,n.simple=!0;const o=e(t,n);return n.inline=r,n.simple=i,o}function gfe(e,t,n){const r=n.inline||!1,i=n.simple||!1;n.inline=!1,n.simple=!0;const o=e(t,n);return n.inline=r,n.simple=i,o}function yfe(e,t,n){const r=n.inline||!1;n.inline=!1;const i=e(t,n);return n.inline=r,i}const vfe=(e,t,n)=>({children:Bg(t,e[2],n)});function cS(){return{}}function bfe(...e){return e.filter(Boolean).join(" ")}function uS(e,t,n){let r=e;const i=t.split(".");for(;i.length&&(r=r[i[0]],r!==void 0);)i.shift();return r||n}function fS(e,t,n,r){if(!t||!t.trim())return null;const i=t.match(wue);return i?i.reduce(function(o,l){const c=l.indexOf("=");if(c!==-1){const u=(function(p){return p.indexOf("-")!==-1&&p.match($ue)===null&&(p=p.replace(Uue,function(g,S){return S.toUpperCase()})),p})(l.slice(0,c)).trim(),d=YM[u]||u;if(d==="ref")return o;const h=o[d]=(function(p,g,S,y){return g==="style"?(function(C){const x=[];if(!C)return x;let w="",v=0,E="";for(let T=0;T<C.length;T++){const _=C[T];if(_==='"'||_==="'")E?_===E&&(E="",v--):(E=_,v++);else if(_==="("&&w.endsWith("url"))v++;else if(_===")"&&v>0)v--;else if(_===";"&&v===0){const O=w.indexOf(":");O>0&&x.push([w.slice(0,O).trim(),w.slice(O+1).trim()]),w="";continue}w+=_}const b=w.indexOf(":");return b>0&&x.push([w.slice(0,b).trim(),w.slice(b+1).trim()]),x})(S).reduce(function(C,[x,w]){return C[x.replace(/(-[a-z])/g,v=>v[1].toUpperCase())]=y(w,p,x),C},{}):Sue.indexOf(g)!==-1?y(Ds(S),p,g):(S.match(zue)&&(S=Ds(S.slice(1,S.length-1))),S==="true"||S!=="false"&&S)})(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"&&(FE.test(h)||ax.test(h))&&(o[d]=r(h.trim()))}else l!=="style"&&(o[YM[l]||l]=!0);return o},{}):null}function u3(e,t){for(let n=0;n<e.length;n++)if(e[n].test(t))return!0;return!1}function Sfe(e="",t={}){t.overrides=t.overrides||{},t.namedCodesToUnicode=t.namedCodesToUnicode?$s({},WM,t.namedCodesToUnicode):WM;const n=t.slugify||Ed,r=t.sanitizer||mfe,i=t.createElement||k.createElement,o=[XM,QM,JM,t.enforceAtxHeadings?t3:e3,n3,i3,j$,P$],l=[...o,Vue,FE,r3,ax];function c(y,C,...x){const w=uS(t.overrides,y+".props",{});return i((function(v,E){const b=uS(E,v);return b?typeof b=="function"||typeof b=="object"&&"render"in b?b:uS(E,v+".component",v):v})(y,t.overrides),$s({},C,w,{className:bfe(C?.className,w.className)||void 0}),...x)}function u(y){y=y.replace(Pue,"");let C=!1;t.forceInline?C=!0:t.forceBlock||(C=Kue.test(y)===!1);const x=g(C?y:Gd(y).replace(nfe,"")+`
56
-
57
- `,{inline:C});if(t.ast)return x;const w=S(x);for(;o3(w[w.length-1])&&!w[w.length-1].trim();)w.pop();if(d.length&&w.push(c("footer",{key:"footer"},d.map(function(b){return c("div",{id:n(b.identifier,Ed),key:b.identifier},b.identifier,S(g(b.footnote,{inline:!0})))}))),t.wrapper===null)return w;const v=t.wrapper||(C?"span":"div");let E;if(w.length>1||t.forceWrapper)E=w;else{if(w.length===1)return E=w[0],typeof E=="string"?c("span",{key:"outer"},E):E;E=null}return i(v,$s({key:"outer"},t.wrapperProps),E)}const d=[],h={},p={0:{t:[">"],o:To(XM),u:1,i(y,C,x){const[,w,v]=y[0].replace(_ue,"").match(Eue);return{alert:w,children:C(v,x)}}},1:{t:[" "],o:ba(Cue),u:1,i:cS},2:{t:function(y,C){if(C.inline||C.simple)return!1;var x=y[0];return x==="-"||x==="*"||x==="_"},o:To(Tue),u:1,i:cS},3:{t:[" "],o:To(JM),u:0,i:y=>({lang:void 0,text:Ds(Gd(y[0].replace(/^ {4}/gm,"")))})},4:{t:["```","~~~"],o:To(QM),u:0,i:y=>({attrs:fS("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:Ds(y[2])})},6:{t:["[^"],o:To(kue),u:0,i:y=>(d.push({footnote:y[2],identifier:y[1]}),{})},7:{t:["[^"],o:ba(Mue),u:1,i:y=>({target:"#"+n(y[1],Ed),text:y[1]})},8:{t:["[ ]","[x]"],o:ba(Nue),u:1,i:y=>({completed:y[1].toLowerCase()==="x"})},9:{t:["#"],o:To(t.enforceAtxHeadings?t3:e3),u:1,i:(y,C,x)=>({children:Bg(C,y[2],x),id:n(y[2],Ed),level:y[1].length})},10:{t:y=>{const C=y.indexOf(`
58
- `);return C>0&&C<y.length-1&&(y[C+1]==="="||y[C+1]==="-")},o:To(n3),u:1,i:(y,C,x)=>({children:Bg(C,y[1],x),level:y[2]==="="?1:2,type:"9"})},11:{t:["<"],o:Ra(Due),u:1,i(y,C,x){const[,w]=y[3].match(rfe),v=RegExp("^"+w,"gm"),E=y[3].replace(v,""),b=u3(l,E)?yfe:Bg,T=y[1].toLowerCase(),_=bue.indexOf(T)!==-1,O=(_?T:y[1]).trim(),M={attrs:fS(O,y[2],r,u),noInnerParse:_,tag:O};if(x.inAnchor=x.inAnchor||T==="a",_)M.text=y[3];else{const P=x.inHTML;x.inHTML=!0,M.children=b(C,E,x),x.inHTML=P}return x.inAnchor=!1,M}},13:{t:["<"],o:c3(ax),u:1,i(y){const C=y[1].trim();return{attrs:fS(C,y[2]||"",r,u),tag:C}}},12:{t:["<!--"],o:c3(r3),u:1,i:()=>({})},14:{t:["!["],o:dg(ufe),u:1,i:y=>({alt:Ds(y[1]),target:Ds(y[2]),title:Ds(y[3])})},15:{t:["["],o:ba(cfe),u:3,i:(y,C,x)=>({children:gfe(C,y[1],x),target:Ds(y[2]),title:Ds(y[3])})},16:{t:function(y,C){return!(!C.inline||C.inAnchor)&&y[0]==="<"&&(Ns(y,":")||Ns(y,"@")||Ns(y,"/"))},o:ba(Fue),u:0,i(y){let C=y[1],x=!1;return Ns(C,"@")&&!Ns(C,"//")&&(x=!0,C=C.replace("mailto:","")),{children:[{text:C,type:"27"}],target:x?"mailto:"+C:C,type:"15"}}},17:{t:(y,C)=>!C.inAnchor&&!t.disableAutoLink&&lx(y,"http"),o:ba(Lue),u:0,i:y=>({children:[{text:y[1],type:"27"}],target:y[1],title:void 0,type:"15"})},20:s3(0,1),30:s3(0,2),19:{t:[`
59
- `],o:To(Oue),u:3,i:cS},21:{t:function(y,C){return!C.inline&&!C.simple},o:Ra(function(y,C){if(C.inline||C.simple||C.inHTML&&!Ns(y,`
60
-
61
- `)&&!Ns(C.prevCapture,`
62
-
63
- `))return null;let x="",w=0;for(;;){const E=y.indexOf(`
64
- `,w),b=y.slice(w,E===-1?void 0:E+1),T=y[w];if((T===">"||T==="#"||T==="|"||T==="`"||T==="~"||T==="*"||T==="-"||T==="_"||T===" ")&&u3(o,b)||(x+=b,E===-1||!b.trim()))break;w=E+1}const v=Gd(x);return v===""?null:[x,,v]}),u:3,i:vfe},22:{t:["["],o:ba(que),u:0,i:y=>(h[y[1]]={target:y[2],title:y[4]},{})},23:{t:["!["],o:dg(Bue),u:0,i:y=>({alt:y[1]?Ds(y[1]):void 0,ref:y[2]})},24:{t:y=>y[0]==="["&&!Ns(y,"]("),o:ba(Hue),u:0,i:(y,C,x)=>({children:C(y[1],x),fallbackChildren:y[0],ref:y[2]})},25:{t:["|"],o:To(i3),u:1,i:hfe},27:{o:Ra(function(y,C){let x;return lx(y,":")&&(x=Que.exec(y)),x||tfe.exec(y)}),u:4,i(y){const C=y[0];return{text:Ns(C,"&")?C.replace(Iue,(x,w)=>t.namedCodesToUnicode[w]||x):C}}},34:{t:["*","_","~","="],o:Ra(yue),u:2,i:(y,C,x)=>({children:C(y[2],x),tag:y[1]})},28:{t:["\\"],o:dg(Jue),u:1,i:y=>({text:y[1],type:"27"})}};t.disableParsingRawHTML===!0&&(delete p[11],delete p[13]);const g=(function(y){var C=Object.keys(y);function x(w,v){var E=[];if(v.prevCapture=v.prevCapture||"",w.trim())for(;w;)for(var b=0;b<C.length;){var T=C[b],_=y[T];if(!_.t||ffe(w,v,_.t)){var O=_.o(w,v);if(O&&O[0]){w=w.substring(O[0].length);var M=_.i(O,x,v);v.prevCapture+=O[0],M.type||(M.type=T),E.push(M);break}b++}else b++}return v.prevCapture="",E}return C.sort(function(w,v){return y[w].u-y[v].u||(w<v?-1:1)}),function(w,v){return x((function(E){return E.replace(Aue,`
65
- `).replace(jue,"").replace(Gue," ")})(w),v)}})(p),S=(function(y,C,x,w,v){function E(b){return Array.isArray(b)?b.map(T=>"text"in T?T.text:""):"text"in b?b.text:""}return function b(T,_={}){const O=(_.renderDepth||0)+1;if(O>2500)return E(T);_.renderDepth=O;try{if(Array.isArray(T)){const P=_.key,z=[];let L=!1;for(let q=0;q<T.length;q++){_.key=q;const Z=b(T[q],_),te=o3(Z);te&&L?z[z.length-1]+=Z:Z!==null&&z.push(Z),L=te}return _.key=P,_.renderDepth=O-1,z}const M=(function(P,z,L){const q=()=>(function(Z,te,ee,G,H,Y,oe){switch(Z.type){case"0":{const re={key:ee.key};return Z.alert&&(re.className="markdown-alert-"+Y(Z.alert.toLowerCase(),Ed),Z.children.unshift({attrs:{},children:[{type:"27",text:Z.alert}],noInnerParse:!0,type:"11",tag:"header"})),G("blockquote",re,te(Z.children,ee))}case"1":return G("br",{key:ee.key});case"2":return G("hr",{key:ee.key});case"3":return G("pre",{key:ee.key},G("code",$s({},Z.attrs,{className:Z.lang?"lang-"+Z.lang:""}),Z.text));case"5":return G("code",{key:ee.key},Z.text);case"7":return G("a",{key:ee.key,href:H(Z.target,"a","href")},G("sup",{key:ee.key},Z.text));case"8":return G("input",{checked:Z.completed,key:ee.key,readOnly:!0,type:"checkbox"});case"9":return G("h"+Z.level,{id:Z.id,key:ee.key},te(Z.children,ee));case"11":return G(Z.tag,$s({key:ee.key},Z.attrs),Z.text||(Z.children?te(Z.children,ee):""));case"13":return G(Z.tag,$s({},Z.attrs,{key:ee.key}));case"14":return G("img",{key:ee.key,alt:Z.alt||void 0,title:Z.title||void 0,src:H(Z.target,"img","src")});case"15":return G("a",{key:ee.key,href:H(Z.target,"a","href"),title:Z.title},te(Z.children,ee));case"23":return oe[Z.ref]?G("img",{key:ee.key,alt:Z.alt,src:H(oe[Z.ref].target,"img","src"),title:oe[Z.ref].title}):null;case"24":return oe[Z.ref]?G("a",{key:ee.key,href:H(oe[Z.ref].target,"a","href"),title:oe[Z.ref].title},te(Z.children,ee)):G("span",{key:ee.key},Z.fallbackChildren);case"25":{const re=Z;return G("table",{key:ee.key},G("thead",null,G("tr",null,re.header.map(function(I,B){return G("th",{key:B,style:l3(re,B)},te(I,ee))}))),G("tbody",null,re.cells.map(function(I,B){return G("tr",{key:B},I.map(function($,N){return G("td",{key:N,style:l3(re,N)},te($,ee))}))})))}case"27":return Z.text;case"34":return G(Z.tag,{key:ee.key},te(Z.children,ee));case"20":case"30":return G(Z.ordered?"ol":"ul",{key:ee.key,start:Z.type==="20"?Z.start:void 0},Z.items.map(function(re,I){return G("li",{key:I},te(re,ee))}));case"19":return`
66
- `;case"21":return G("p",{key:ee.key},te(Z.children,ee));default:return null}})(P,z,L,C,x,w,v);return y?y(q,P,z,L):q()})(T,b,_);return _.renderDepth=O-1,M}catch(M){if(M instanceof RangeError&&M.message.includes("Maximum call stack"))return E(T);throw M}}})(t.renderRule,c,r,n,h);return u(e)}const Yh=e=>{let{children:t,options:n}=e,r=(function(i,o){if(i==null)return{};var l={};for(var c in i)if({}.hasOwnProperty.call(i,c)){if(o.indexOf(c)!==-1)continue;l[c]=i[c]}return l})(e,vue);return Sfe(t??"",$s({},n,{wrapperProps:$s({},n?.wrapperProps,r)}))},N$=Symbol("remove-this-key"),f3=Symbol("reset");function wfe(e,t){return Array.isArray(e.required)&&e.required.indexOf(t)!==-1}function xfe(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(It.NewStringDefault)}}function _fe(e){const{fieldPathId:t,schema:n,registry:r,uiSchema:i,errorSchema:o,formData:l,onChange:c,onBlur:u,onFocus:d,disabled:h,readonly:p,required:g,hideError:S,propertyName:y,handleKeyRename:C,handleRemoveProperty:x,addedByAdditionalProperties:w}=e,[v,E]=k.useState(!1),{globalFormOptions:b,fields:T}=r,{SchemaField:_}=T,O=gc(os(y,b,t.path)),M=k.useCallback((q,Z,te,ee)=>{q===void 0&&w&&(q=""),c(q,Z,te,ee)},[c,w]),P=k.useCallback(q=>{y!==q&&E(!0),C(y,q)},[y,C]),z=k.useCallback(q=>{const{target:{value:Z}}=q;P(Z)},[P]),L=k.useCallback(()=>{x(y)},[y,x]);return j.jsx(_,{name:y,required:g,schema:n,uiSchema:i,errorSchema:o,fieldPathId:O,formData:l,wasPropertyKeyModified:v,onKeyRename:P,onKeyRenameBlur:z,onRemoveProperty:L,onChange:M,onBlur:u,onFocus:d,registry:r,disabled:h,readonly:p,hideError:S})}function Efe(e){const{schema:t,uiSchema:n={},formData:r,errorSchema:i,fieldPathId:o,name:l,required:c=!1,disabled:u,readonly:d,hideError:h,onBlur:p,onFocus:g,onChange:S,registry:y,title:C}=e,{fields:x,schemaUtils:w,translateString:v,globalUiOptions:E}=y,{OptionalDataControlsField:b}=x,T=w.retrieveSchema(t,r,!0),_=lt(n,E),{properties:O={}}=T,M=e.childFieldPathId??o,P=_.title??T.title??C??l,z=_.description??T.description,L=Zh(y,T,c,n),q=bf(r);let Z=[];const te=k.useCallback((I,B)=>{const{duplicateKeySuffixSeparator:$="-"}=lt(n,E);let N=0,U=I;for(;Ut(B,U);)U=`${I}${$}${++N}`;return U},[n,E]),ee=k.useCallback(()=>{if(!(T.additionalProperties||T.patternProperties))return;const{translateString:I}=y,B={...r},$=te("newKey",B);if(T.patternProperties)hn(B,$,null);else{let N,U,J;if(Zt(T.additionalProperties)){N=T.additionalProperties.type,U=T.additionalProperties.const,J=T.additionalProperties.default;let se=T.additionalProperties;if($n in se){const{schemaUtils:he}=y;se=he.retrieveSchema({[$n]:se[$n]},r),N=se.type,U=se.const,J=se.default}!N&&(Gt in se||jt in se)&&(N="object")}const ne=U??J??xfe(I,N);hn(B,$,ne)}S(B,M.path)},[r,S,y,M,te,T]),G=k.useCallback((I,B)=>{if(I!==B){const $=te(B,r),N={...r},U={[I]:$},J=Object.keys(N).map(se=>({[U[se]||se]:N[se]})),ne=Object.assign({},...J);S(ne,M.path)}},[r,S,M,te]),H=k.useCallback(I=>{S(N$,[...M.path,I])},[S,M]);if(!L||q)try{const I=Object.keys(O);Z=Rce(I,_.order)}catch(I){return j.jsxs("div",{children:[j.jsx("p",{className:"rjsf-config-error",style:{color:"red"},children:j.jsx(Yh,{options:{disableParsingRawHTML:!0},children:v(It.InvalidObjectField,[l||"root",I.message])})}),j.jsx("pre",{children:JSON.stringify(T)})]})}const Y=mt("ObjectFieldTemplate",y,_),oe=L?j.jsx(b,{...e,fieldPathId:M,schema:T}):void 0,re={title:_.label===!1?"":P,description:_.label===!1?void 0:z,properties:Z.map(I=>{const B=Ut(T,[rn,I,ko]),$=B?n.additionalProperties:n[I],N=lt($).widget==="hidden";return{content:j.jsx(_fe,{propertyName:I,required:wfe(T,I),schema:ze(T,[rn,I],{}),uiSchema:$,errorSchema:ze(i,[I]),fieldPathId:M,formData:ze(r,[I]),handleKeyRename:G,handleRemoveProperty:H,addedByAdditionalProperties:B,onChange:S,onBlur:p,onFocus:g,registry:y,disabled:u,readonly:d,hideError:h},I),name:I,readonly:d,disabled:u,required:c,hidden:N}}),readonly:d,disabled:u,required:c,fieldPathId:o,uiSchema:n,errorSchema:i,schema:T,formData:r,registry:y,optionalDataControl:oe,className:L?"rjsf-optional-object-field":void 0};return j.jsx(Y,{...re,onAddProperty:ee})}function Cfe(e){const{schema:t,uiSchema:n={},formData:r,disabled:i=!1,readonly:o=!1,onChange:l,errorSchema:c,fieldPathId:u,registry:d}=e,{globalUiOptions:h={},schemaUtils:p,translateString:g}=d,S=lt(n,h),y=mt("OptionalDataControlsTemplate",d,S),C=bf(r);let x,w,v,E;if(i||o)x=sS(u,"Msg"),w=C?void 0:g(It.OptionalObjectEmptyMsg);else{const b=C?It.OptionalObjectRemove:It.OptionalObjectAdd;w=g(b),C?(x=sS(u,"Remove"),E=()=>l(void 0,u.path,c)):(x=sS(u,"Add"),v=()=>{let T=p.getDefaultFormState(t,r,"excludeObjectChildren");T===void 0&&(T=Cs(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:E})}const Tfe={array:"ArrayField",boolean:"BooleanField",integer:"NumberField",number:"NumberField",object:"ObjectField",string:"StringField",null:"NullField"};function Rfe(e,t,n){const r=t.field,{fields:i}=n;if(typeof r=="function")return r;if(typeof r=="string"&&r in i)return i[r];const o=Cs(e),l=Array.isArray(o)?o[0]:o||"",c=e.$id;let u=Tfe[l];return c&&c in i&&(u=c),!u&&(e.anyOf||e.oneOf)?()=>null:u in i?i[u]:i.FallbackField}function Ofe(e){const{schema:t,fieldPathId:n,uiSchema:r,formData:i,errorSchema:o,name:l,onChange:c,onKeyRename:u,onKeyRenameBlur:d,onRemoveProperty:h,required:p=!1,registry:g,wasPropertyKeyModified:S=!1}=e,{schemaUtils:y,globalFormOptions:C,globalUiOptions:x,fields:w}=g,{AnyOfField:v,OneOfField:E}=w,b=lt(r,x),T=mt("FieldTemplate",g,b),_=mt("DescriptionFieldTemplate",g,b),O=mt("FieldHelpTemplate",g,b),M=mt("FieldErrorTemplate",g,b),P=y.retrieveSchema(t,i),z=n[_n],L=k.useCallback((we,Ie,Fe,ye)=>c(we,Ie,Fe,ye||z),[z,c]),q=Rfe(P,b,g),Z=!!(b.disabled??e.disabled),te=!!(b.readonly??(e.readonly||e.schema.readOnly||P.readOnly)),ee=b.hideError,G=ee===void 0?e.hideError:!!ee,H=!!(b.autofocus??e.autofocus);if(Object.keys(P).length===0)return null;let Y=y.getDisplayLabel(P,r,x);const oe=b.field&&b.fieldReplacesAnyOrOneOf===!0;let re,I,B={fieldPathId:n};if((Gt in P||jt in P)&&!oe&&!y.isSelect(P)){P[Gt]?(re=v,I=P[Gt].map(Fe=>y.retrieveSchema(Zt(Fe)?Fe:{},i))):P[jt]&&(re=E,I=P[jt].map(Fe=>y.retrieveSchema(Zt(Fe)?Fe:{},i)));const we=Zh(g,P,p,r),Ie=bf(i);Y=Y&&(!we||Ie),B={childFieldPathId:n,fieldPathId:os("XxxOf",C,n)}}const{__errors:$,...N}=o||{},U=ih(r,["ui:classNames","classNames","ui:style"]);ja in U&&(U[ja]=ih(U[ja],["classNames","style"]));const J=j.jsx(q,{...e,onChange:L,...B,schema:P,uiSchema:U,disabled:Z,readonly:te,hideError:G,autofocus:H,errorSchema:N,rawErrors:$}),ne=n[_n];let se;S?se=l:se=ko in P?l:b.title||e.schema.title||P.title||e.title||l;const he=b.description||e.schema.description||P.description||"",Ee=b.help,Q=b.widget==="hidden",ie=["rjsf-field",`rjsf-field-${Cs(P)}`];!G&&$&&$.length>0&&ie.push("rjsf-field-error"),b.classNames&&ie.push(b.classNames);const le=j.jsx(O,{help:Ee,fieldPathId:n,schema:P,uiSchema:r,hasErrors:!G&&$&&$.length>0,registry:g}),Se=G||re&&!y.isSelect(P)?void 0:j.jsx(M,{errors:$,errorSchema:o,fieldPathId:n,schema:P,uiSchema:r,registry:g}),Te={description:j.jsx(_,{id:mc(ne),description:he,schema:P,uiSchema:r,registry:g}),rawDescription:he,help:le,rawHelp:typeof Ee=="string"?Ee:void 0,errors:Se,rawErrors:G?void 0:$,id:ne,label:se,hidden:Q,onChange:c,onKeyRename:u,onKeyRenameBlur:d,onRemoveProperty:h,required:p,disabled:Z,readonly:te,hideError:G,displayLabel:Y,classNames:ie.join(" ").trim(),style:b.style,formData:i,schema:P,uiSchema:r,registry:g};return j.jsx(T,{...Te,children:j.jsxs(j.Fragment,{children:[J,re&&j.jsx(re,{name:l,disabled:Z,readonly:te,hideError:G,errorSchema:o,formData:i,fieldPathId:n,onBlur:e.onBlur,onChange:e.onChange,onFocus:e.onFocus,options:I,registry:g,required:p,schema:P,uiSchema:r})]})})}class Afe extends k.Component{shouldComponentUpdate(t){const{registry:{globalFormOptions:n}}=this.props,{experimental_componentUpdateStrategy:r="customDeep"}=n;return S$(this,t,this.state,r)}render(){return j.jsx(Ofe,{...this.props})}}function kfe(e){const{schema:t,name:n,uiSchema:r,fieldPathId:i,formData:o,required:l,disabled:c=!1,readonly:u=!1,autofocus:d=!1,onChange:h,onBlur:p,onFocus:g,registry:S,rawErrors:y,hideError:C,title:x}=e,{title:w,format:v}=t,{widgets:E,schemaUtils:b,globalUiOptions:T}=S,_=b.isSelect(t)?Zu(t,r):void 0;let O=_?"select":"text";v&&Ece(t,v,E)&&(O=v);const{widget:M=O,placeholder:P="",title:z,...L}=lt(r),q=b.getDisplayLabel(t,r,T),Z=z??x??w??n,te=Ws(t,M,E),ee=k.useCallback((G,H,Y)=>h(G,i.path,H,Y),[h,i]);return j.jsx(te,{options:{...L,enumOptions:_},schema:t,uiSchema:r,id:i.$id,name:n,label:Z,hideLabel:!q,hideError:C,value:o,onChange:ee,onBlur:p,onFocus:g,required:l,disabled:c,readonly:u,autofocus:d,registry:S,placeholder:P,rawErrors:y,htmlName:i.name})}function Mfe(e){const{formData:t,onChange:n,fieldPathId:r}=e;return k.useEffect(()=>{t===void 0&&n(null,r.path)},[r,t,n]),null}function jfe(){return{AnyOfField:GM,ArrayField:Gce,BooleanField:Zce,FallbackField:Qce,LayoutGridField:LE,LayoutHeaderField:fue,LayoutMultiSchemaField:due,NumberField:mue,ObjectField:Efe,OneOfField:GM,OptionalDataControlsField:Cfe,SchemaField:Afe,StringField:kfe,NullField:Mfe}}function Pfe(e){const{fieldPathId:t,description:n,registry:r,schema:i,uiSchema:o}=e,l=lt(o,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:i,uiSchema:o,registry:r})}function Nfe(e){const{children:t,className:n,buttonsProps:r,displayLabel:i,hasDescription:o,hasToolbar:l,registry:c,uiSchema:u}=e,d=lt(u),h=mt("ArrayFieldItemButtonsTemplate",c,d),p={flex:1,paddingLeft:6,paddingRight:6,fontWeight:"bold"},g=o?31:9,S={display:"flex",alignItems:i?"center":"baseline"},y={display:"flex",justifyContent:"flex-end",marginTop:i?`${g}px`:0};return j.jsxs("div",{className:n,style:S,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 Dfe(e){const{disabled:t,hasCopy:n,hasMoveDown:r,hasMoveUp:i,hasRemove:o,fieldPathId:l,onCopyItem:c,onRemoveItem:u,onMoveDownItem:d,onMoveUpItem:h,readonly:p,registry:g,uiSchema:S}=e,{CopyButton:y,MoveDownButton:C,MoveUpButton:x,RemoveButton:w}=g.templates.ButtonTemplates;return j.jsxs(j.Fragment,{children:[(i||r)&&j.jsx(x,{id:Vs(l,"moveUp"),className:"rjsf-array-item-move-up",disabled:t||p||!i,onClick:h,uiSchema:S,registry:g}),(i||r)&&j.jsx(C,{id:Vs(l,"moveDown"),className:"rjsf-array-item-move-down",disabled:t||p||!r,onClick:d,uiSchema:S,registry:g}),n&&j.jsx(y,{id:Vs(l,"copy"),className:"rjsf-array-item-copy",disabled:t||p,onClick:c,uiSchema:S,registry:g}),o&&j.jsx(w,{id:Vs(l,"remove"),className:"rjsf-array-item-remove",disabled:t||p,onClick:u,uiSchema:S,registry:g})]})}function Ife(e){const{canAdd:t,className:n,disabled:r,fieldPathId:i,uiSchema:o,items:l,optionalDataControl:c,onAddClick:u,readonly:d,registry:h,required:p,schema:g,title:S}=e,y=lt(o),C=mt("ArrayFieldDescriptionTemplate",h,y),x=mt("ArrayFieldTitleTemplate",h,y),w=!d&&!r,{ButtonTemplates:{AddButton:v}}=h.templates;return j.jsxs("fieldset",{className:n,id:i.$id,children:[j.jsx(x,{fieldPathId:i,title:y.title||S,required:p,schema:g,uiSchema:o,registry:h,optionalDataControl:w?c:void 0}),j.jsx(C,{fieldPathId:i,description:y.description||g.description,schema:g,uiSchema:o,registry:h}),w?void 0:c,j.jsx("div",{className:"row array-item-list",children:l}),t&&j.jsx(v,{id:Vs(i,"add"),className:"rjsf-array-item-add",onClick:u,disabled:r||d,uiSchema:o,registry:h})]})}function $fe(e){const{fieldPathId:t,title:n,schema:r,uiSchema:i,required:o,registry:l,optionalDataControl:c}=e,u=lt(i,l.globalUiOptions),{label:d=!0}=u;if(!n||!d)return null;const h=mt("TitleFieldTemplate",l,u);return j.jsx(h,{id:A0(t),title:n,required:o,schema:r,uiSchema:i,registry:l,optionalDataControl:c})}function zfe(e){const{id:t,name:n,htmlName:r,value:i,readonly:o,disabled:l,autofocus:c,onBlur:u,onFocus:d,onChange:h,onChangeOverride:p,options:g,schema:S,uiSchema:y,registry:C,rawErrors:x,type:w,hideLabel:v,hideError:E,...b}=e;if(!t)throw console.log("No id for",e),new Error(`no id for props ${JSON.stringify(e)}`);const T={...b,...y$(S,w,g)};let _;T.type==="number"||T.type==="integer"?_=i||i===0?i:"":_=i??"";const O=k.useCallback(({target:{value:z}})=>h(z===""?g.emptyValue:z),[h,g]),M=k.useCallback(({target:z})=>u(t,z&&z.value),[u,t]),P=k.useCallback(({target:z})=>d(t,z&&z.value),[d,t]);return j.jsxs(j.Fragment,{children:[j.jsx("input",{id:t,name:r||t,className:"form-control",readOnly:o,disabled:l,autoFocus:c,value:_,...T,list:S.examples?vh(t):void 0,onChange:p||O,onBlur:M,onFocus:P,"aria-describedby":vi(t,!!S.examples)}),Array.isArray(S.examples)&&j.jsx("datalist",{id:vh(t),children:S.examples.concat(S.default&&!S.examples.includes(S.default)?[S.default]:[]).map(z=>j.jsx("option",{value:z},z))},`datalist_${t}`)]})}function Lfe({uiSchema:e}){const{submitText:t,norender:n,props:r={}}=v$(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:i,registry:o,...l}=e;return j.jsx("button",{type:"button",className:`btn btn-${t} ${r}`,...l,children:j.jsx("i",{className:`glyphicon glyphicon-${n}`})})}function Ffe(e){const{registry:{translateString:t}}=e;return j.jsx(nc,{title:t(It.CopyButton),...e,icon:"copy"})}function Ufe(e){const{registry:{translateString:t}}=e;return j.jsx(nc,{title:t(It.MoveDownButton),...e,icon:"arrow-down"})}function Vfe(e){const{registry:{translateString:t}}=e;return j.jsx(nc,{title:t(It.MoveUpButton),...e,icon:"arrow-up"})}function qfe(e){const{registry:{translateString:t}}=e;return j.jsx(nc,{title:t(It.RemoveButton),...e,iconType:"danger",icon:"remove"})}function Bfe({id:e,className:t,onClick:n,disabled:r,registry:i}){const{translateString:o}=i;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:o(It.AddButton),onClick:n,disabled:r,registry:i})})})}function Hfe(){return{SubmitButton:Lfe,AddButton:Bfe,CopyButton:Ffe,MoveDownButton:Ufe,MoveUpButton:Vfe,RemoveButton:qfe}}const D$=PE();function qE({description:e,registry:t,uiSchema:n={}}){const{globalUiOptions:r}=t;return lt(n,r).enableMarkdownInDescription&&typeof e=="string"?j.jsx(Yh,{options:{disableParsingRawHTML:!0},"data-testid":D$.markdown,children:e}):e}qE.TEST_IDS=D$;function Kfe(e){const{id:t,description:n,registry:r,uiSchema:i}=e;return n?j.jsx("div",{id:t,className:"field-description",children:j.jsx(qE,{description:n,registry:r,uiSchema:i})}):null}function Gfe({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(It.ErrorsLabel)})}),j.jsx("ul",{className:"list-group",children:e.map((r,i)=>j.jsx("li",{className:"list-group-item text-danger",children:r.stack},i))})]})}function Zfe(e){const{schema:t,registry:n,typeSelector:r,schemaField:i}=e,o=mt("MultiSchemaFieldTemplate",n);return j.jsx(o,{selector:r,optionSchemaField:i,schema:t,registry:n})}const Yfe="*";function I$(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:Yfe})]}):null}function Wfe(e){const{id:t,label:n,children:r,errors:i,help:o,description:l,hidden:c,required:u,displayLabel:d,registry:h,uiSchema:p}=e,g=lt(p),S=mt("WrapIfAdditionalTemplate",h,g);if(c)return j.jsx("div",{className:"hidden",children:r});const y=g.widget==="checkbox";return j.jsxs(S,{...e,children:[d&&!y&&j.jsx(I$,{label:n,required:u,id:t}),d&&l?l:null,r,i,o]})}function Xfe(e){const{errors:t=[],fieldPathId:n}=e;if(t.length===0)return null;const r=NE(n);return j.jsx("div",{children:j.jsx("ul",{id:r,className:"error-detail bs-callout bs-callout-info",children:t.filter(i=>!!i).map((i,o)=>j.jsx("li",{className:"text-danger",children:i},o))})})}const $$=PE();function BE({help:e,registry:t,uiSchema:n={}}){const{globalUiOptions:r}=t;return lt(n,r).enableMarkdownInHelp&&typeof e=="string"?j.jsx(Yh,{options:{disableParsingRawHTML:!0},"data-testid":$$.markdown,children:e}):e}BE.TEST_IDS=$$;function Qfe(e){const{fieldPathId:t,help:n,uiSchema:r,registry:i}=e;return n?j.jsx("div",{id:DE(t),className:"help-block",children:j.jsx(BE,{help:n,registry:i,uiSchema:r})}):null}function Jfe(e){const{children:t,column:n,className:r,...i}=e;return j.jsx("div",{className:r,...i,children:t})}function ede(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 tde(e){const{className:t,description:n,disabled:r,formData:i,fieldPathId:o,onAddProperty:l,optionalDataControl:c,properties:u,readonly:d,registry:h,required:p,schema:g,title:S,uiSchema:y}=e,C=lt(y),x=mt("TitleFieldTemplate",h,C),w=mt("DescriptionFieldTemplate",h,C),v=!d&&!r,{ButtonTemplates:{AddButton:E}}=h.templates;return j.jsxs("fieldset",{className:t,id:o.$id,children:[S&&j.jsx(x,{id:A0(o),title:S,required:p,schema:g,uiSchema:y,registry:h,optionalDataControl:v?c:void 0}),n&&j.jsx(w,{id:mc(o),description:n,schema:g,uiSchema:y,registry:h}),v?void 0:c,u.map(b=>b.content),KI(g,y,i)&&j.jsx(E,{id:Vs(o,"add"),className:"rjsf-object-property-expand",onClick:l,disabled:r||d,uiSchema:y,registry:h})]})}function nde(e){const{id:t,registry:n,label:r,onAddClick:i,onRemoveClick:o}=e;return i?j.jsx(nc,{id:t,registry:n,icon:"plus",className:"rjsf-add-optional-data btn-sm",onClick:i,title:r}):o?j.jsx(nc,{id:t,registry:n,icon:"remove",className:"rjsf-remove-optional-data btn-sm",onClick:o,title:r}):j.jsx("em",{id:t,children:r})}const rde="*";function ide(e){const{id:t,title:n,required:r,optionalDataControl:i}=e;return j.jsxs("legend",{id:t,children:[n,r&&j.jsx("span",{className:"required",children:rde}),i&&j.jsx("span",{className:"pull-right",style:{marginBottom:"2px"},children:i})]})}function sde(e){const{schema:t,fieldPathId:n,reason:r,registry:i}=e,{translateString:o}=i;let l=It.UnsupportedField;const c=[];return n&&n.$id&&(l=It.UnsupportedFieldWithId,c.push(n.$id)),r&&(l=l===It.UnsupportedField?It.UnsupportedFieldWithReason:It.UnsupportedFieldWithIdAndReason,c.push(r)),j.jsxs("div",{className:"unsupported-field",children:[j.jsx("p",{children:j.jsx(Yh,{options:{disableParsingRawHTML:!0},children:o(l,c)})}),t&&j.jsx("pre",{children:JSON.stringify(t,null,2)})]})}function ode(e){const{id:t,classNames:n,style:r,disabled:i,displayLabel:o,label:l,onKeyRenameBlur:c,onRemoveProperty:u,rawDescription:d,readonly:h,required:p,schema:g,hideError:S,rawErrors:y,children:C,uiSchema:x,registry:w}=e,{templates:v,translateString:E}=w,{RemoveButton:b}=v.ButtonTemplates,T=E(It.KeyLabel,[l]),_=ko in g,O=!!d,M=["form-group",n];!S&&y&&y.length>0&&M.push("has-error has-danger");const P=M.join(" ").trim();if(!_)return j.jsx("div",{className:P,style:r,children:C});const z=O?46:26;return j.jsx("div",{className:P,style:r,children:j.jsxs("div",{className:"row",children:[j.jsx("div",{className:"col-xs-5 form-additional",children:j.jsxs("div",{className:"form-group",children:[o&&j.jsx(I$,{label:T,required:p,id:`${t}-key`}),o&&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:C}),j.jsx("div",{className:"col-xs-2",style:{marginTop:o?`${z}px`:void 0},children:j.jsx(b,{id:Vs(t,"remove"),className:"rjsf-object-property-remove btn-block",style:{border:"0"},disabled:i||h,onClick:u,uiSchema:x,registry:w})})]})})}function ade(){return{ArrayFieldDescriptionTemplate:Pfe,ArrayFieldItemTemplate:Nfe,ArrayFieldItemButtonsTemplate:Dfe,ArrayFieldTemplate:Ife,ArrayFieldTitleTemplate:$fe,ButtonTemplates:Hfe(),BaseInputTemplate:zfe,DescriptionFieldTemplate:Kfe,ErrorListTemplate:Gfe,FallbackFieldTemplate:Zfe,FieldTemplate:Wfe,FieldErrorTemplate:Xfe,FieldHelpTemplate:Qfe,GridTemplate:Jfe,MultiSchemaFieldTemplate:ede,ObjectFieldTemplate:tde,OptionalDataControlsTemplate:nde,TitleFieldTemplate:ide,UnsupportedFieldTemplate:sde,WrapIfAdditionalTemplate:ode}}function lde(e){const{disabled:t=!1,readonly:n=!1,autofocus:r=!1,options:i,id:o,name:l,registry:c,onBlur:u,onFocus:d}=e,{translateString:h}=c,{elements:p,handleChange:g,handleClear:S,handleSetNow:y}=Mce(e);return j.jsxs("ul",{className:"list-inline",children:[p.map((C,x)=>j.jsx("li",{className:"list-inline-item",children:j.jsx(kce,{rootId:o,name:l,select:g,...C,disabled:t,readonly:n,registry:c,onBlur:u,onFocus:d,autofocus:r&&x===0})},x)),(i.hideNowButton!=="undefined"?!i.hideNowButton:!0)&&j.jsx("li",{className:"list-inline-item",children:j.jsx("a",{href:"#",className:"btn btn-info btn-now",onClick:y,children:h(It.NowLabel)})}),(i.hideClearButton!=="undefined"?!i.hideClearButton:!0)&&j.jsx("li",{className:"list-inline-item",children:j.jsx("a",{href:"#",className:"btn btn-warning btn-clear",onClick:S,children:h(It.ClearLabel)})})]})}function cde({time:e=!0,...t}){const{AltDateWidget:n}=t.registry.widgets;return j.jsx(n,{time:e,...t})}function ude({schema:e,uiSchema:t,options:n,id:r,value:i,disabled:o,readonly:l,label:c,hideLabel:u,autofocus:d=!1,onBlur:h,onFocus:p,onChange:g,registry:S,htmlName:y}){const C=mt("DescriptionFieldTemplate",S,n),x=Hd(e),w=k.useCallback(O=>g(O.target.checked),[g]),v=k.useCallback(O=>h(r,O.target.checked),[h,r]),E=k.useCallback(O=>p(r,O.target.checked),[p,r]),_=lt(t).widget==="checkbox"?void 0:n.description??e.description;return j.jsxs("div",{className:`checkbox ${o||l?"disabled":""}`,children:[!u&&_&&j.jsx(C,{id:mc(r),description:_,schema:e,uiSchema:t,registry:S}),j.jsxs("label",{children:[j.jsx("input",{type:"checkbox",id:r,name:y||r,checked:typeof i>"u"?!1:i,required:x,disabled:o||l,autoFocus:d,onChange:w,onBlur:v,onFocus:E,"aria-describedby":vi(r)}),b$(j.jsx("span",{children:c}),u)]})]})}function fde({id:e,disabled:t,options:{inline:n=!1,enumOptions:r,enumDisabled:i,emptyValue:o},value:l,autofocus:c=!1,readonly:u,onChange:d,onBlur:h,onFocus:p,htmlName:g}){const S=Array.isArray(l)?l:[l],y=k.useCallback(({target:x})=>h(e,Rr(x&&x.value,r,o)),[h,e,r,o]),C=k.useCallback(({target:x})=>p(e,Rr(x&&x.value,r,o)),[p,e,r,o]);return j.jsx("div",{className:"checkboxes",id:e,children:Array.isArray(r)&&r.map((x,w)=>{const v=Gh(x.value,S),E=Array.isArray(i)&&i.indexOf(x.value)!==-1,b=t||E||u?"disabled":"",T=O=>{O.target.checked?d(p$(w,S,r)):d(d$(w,S,r))},_=j.jsxs("span",{children:[j.jsx("input",{type:"checkbox",id:Zl(e,w),name:g||e,checked:v,value:String(w),disabled:t||E||u,autoFocus:c&&w===0,onChange:T,onBlur:y,onFocus:C,"aria-describedby":vi(e)}),j.jsx("span",{children:x.label})]});return n?j.jsx("label",{className:`checkbox-inline ${b}`,children:_},w):j.jsx("div",{className:`checkbox ${b}`,children:j.jsx("label",{children:_})},w)})})}function dde(e){const{disabled:t,readonly:n,options:r,registry:i}=e,o=mt("BaseInputTemplate",i,r);return j.jsx(o,{type:"color",...e,disabled:t||n})}function hde(e){const{onChange:t,options:n,registry:r}=e,i=mt("BaseInputTemplate",r,n),o=k.useCallback(l=>t(l||void 0),[t]);return j.jsx(i,{type:"date",...e,onChange:o})}function pde(e){const{onChange:t,value:n,options:r,registry:i}=e,o=mt("BaseInputTemplate",i,r);return j.jsx(o,{type:"datetime-local",...e,value:Ice(n),onChange:l=>t(Tce(l))})}function mde(e){const{options:t,registry:n}=e,r=mt("BaseInputTemplate",n,t);return j.jsx(r,{type:"email",...e})}function gde({fileInfo:e,registry:t}){const{translateString:n}=t,{dataURL:r,type:i,name:o}=e;return r?["image/jpeg","image/png"].includes(i)?j.jsx("img",{src:r,style:{maxWidth:"100%"},className:"file-preview"}):j.jsxs(j.Fragment,{children:[" ",j.jsx("a",{download:`preview-${o}`,href:r,className:"file-download",children:n(It.PreviewLabel)})]}):null}function yde({filesInfo:e,registry:t,preview:n,onRemove:r,options:i}){if(e.length===0)return null;const{translateString:o}=t,{RemoveButton:l}=mt("ButtonTemplates",t,i);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(Yh,{children:o(It.FilesInfo,[d,p,String(h)])}),n&&j.jsx(gde,{fileInfo:c,registry:t}),j.jsx(l,{onClick:g,registry:t})]},u)})})}function vde(e){const{disabled:t,readonly:n,required:r,multiple:i,onChange:o,value:l,options:c,registry:u}=e,{filesInfo:d,handleChange:h,handleRemove:p}=Dce(l,o,i),g=mt("BaseInputTemplate",u,c),S=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:S,value:"",accept:c.accept?String(c.accept):void 0}),j.jsx(yde,{filesInfo:d,onRemove:p,registry:u,preview:c.filePreview,options:c})]})}function bde({id:e,value:t,htmlName:n}){return j.jsx("input",{type:"hidden",id:e,name:n||e,value:typeof t>"u"?"":t})}function Sde(e){const{options:t,registry:n}=e,r=mt("BaseInputTemplate",n,t);return j.jsx(r,{type:"password",...e})}function wde({options:e,value:t,required:n,disabled:r,readonly:i,autofocus:o=!1,onBlur:l,onFocus:c,onChange:u,id:d,htmlName:h}){const{enumOptions:p,enumDisabled:g,inline:S,emptyValue:y}=e,C=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 E=Gh(w.value,t),b=Array.isArray(g)&&g.indexOf(w.value)!==-1,T=r||b||i?"disabled":"",_=()=>u(w.value),O=j.jsxs("span",{children:[j.jsx("input",{type:"radio",id:Zl(d,v),checked:E,name:h||d,required:n,value:String(v),disabled:r||b||i,autoFocus:o&&v===0,onChange:_,onBlur:C,onFocus:x,"aria-describedby":vi(d)}),j.jsx("span",{children:w.label})]});return S?j.jsx("label",{className:`radio-inline ${T}`,children:O},v):j.jsx("div",{className:`radio ${T}`,children:j.jsx("label",{children:O})},v)})})}function xde(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 _de({id:e,value:t,required:n,disabled:r,readonly:i,autofocus:o,onChange:l,onFocus:c,onBlur:u,schema:d,options:h,htmlName:p}){const{stars:g=5,shape:S="star"}=h,y=d.maximum?Math.min(d.maximum,5):Math.min(Math.max(g,1),5),C=d.minimum||0,x=k.useCallback(b=>{!r&&!i&&l(b)},[l,r,i]),w=k.useCallback(b=>{if(c){const T=Number(b.target.dataset.value);c(e,T)}},[c,e]),v=k.useCallback(b=>{if(u){const T=Number(b.target.dataset.value);u(e,T)}},[u,e]),E=b=>S==="heart"?b?"♥":"♡":b?"★":"☆";return j.jsx(j.Fragment,{children:j.jsxs("div",{className:"rating-widget",style:{display:"inline-flex",fontSize:"1.5rem",cursor:r||i?"default":"pointer"},children:[[...Array(y)].map((b,T)=>{const _=C+T,O=_<=t;return j.jsx("span",{onClick:()=>x(_),onFocus:w,onBlur:v,"data-value":_,tabIndex:r||i?-1:0,role:"radio","aria-checked":_===t,"aria-label":`${_} ${S==="heart"?"heart":"star"}${_===1?"":"s"}`,style:{color:O?"#FFD700":"#ccc",padding:"0 0.2rem",transition:"color 0.2s",userSelect:"none"},children:E(O)},T)}),j.jsx("input",{type:"hidden",id:e,name:p||e,value:t||"",required:n,disabled:r||i,"aria-hidden":"true"})]})})}function dS(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:i,disabled:o,readonly:l,multiple:c=!1,autofocus:u=!1,onChange:d,onBlur:h,onFocus:p,placeholder:g,htmlName:S}){const{enumOptions:y,enumDisabled:C,emptyValue:x}=n,w=c?[]:"",v=k.useCallback(O=>{const M=dS(O,c);return p(t,Rr(M,y,x))},[p,t,c,y,x]),E=k.useCallback(O=>{const M=dS(O,c);return h(t,Rr(M,y,x))},[h,t,c,y,x]),b=k.useCallback(O=>{const M=dS(O,c);return d(Rr(M,y,x))},[d,c,y,x]),T=h$(r,y,c),_=!c&&e.default===void 0;return j.jsxs("select",{id:t,name:S||t,multiple:c,role:"combobox",className:"form-control",value:typeof T>"u"?w:T,required:i,disabled:o||l,autoFocus:u,onBlur:E,onFocus:v,onChange:b,"aria-describedby":vi(t),children:[_&&j.jsx("option",{value:"",children:g}),Array.isArray(y)&&y.map(({value:O,label:M},P)=>{const z=C&&C.indexOf(O)!==-1;return j.jsx("option",{value:String(P),disabled:z,children:M},P)})]})}function z$({id:e,options:t={},placeholder:n,value:r,required:i,disabled:o,readonly:l,autofocus:c=!1,onChange:u,onBlur:d,onFocus:h,htmlName:p}){const g=k.useCallback(({target:{value:C}})=>u(C===""?t.emptyValue:C),[u,t.emptyValue]),S=k.useCallback(({target:C})=>d(e,C&&C.value),[d,e]),y=k.useCallback(({target:C})=>h(e,C&&C.value),[e,h]);return j.jsx("textarea",{id:e,name:p||e,className:"form-control",value:r||"",placeholder:n,required:i,disabled:o,readOnly:l,autoFocus:c,rows:t.rows,onBlur:S,onFocus:y,onChange:g,"aria-describedby":vi(e)})}z$.defaultProps={autofocus:!1,options:{}};function Cde(e){const{options:t,registry:n}=e,r=mt("BaseInputTemplate",n,t);return j.jsx(r,{...e})}function Tde(e){const{onChange:t,options:n,registry:r}=e,i=mt("BaseInputTemplate",r,n),o=k.useCallback(l=>t(l?`${l}:00`:void 0),[t]);return j.jsx(i,{type:"time",...e,onChange:o})}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 Ade(){return{AltDateWidget:lde,AltDateTimeWidget:cde,CheckboxWidget:ude,CheckboxesWidget:fde,ColorWidget:dde,DateWidget:hde,DateTimeWidget:pde,EmailWidget:mde,FileWidget:vde,HiddenWidget:bde,PasswordWidget:Sde,RadioWidget:wde,RangeWidget:xde,RatingWidget:_de,SelectWidget:Ede,TextWidget:Cde,TextareaWidget:z$,TimeWidget:Tde,UpDownWidget:Ode,URLWidget:Rde}}function kde(){return{fields:jfe(),templates:ade(),widgets:Ade(),rootSchema:{},formContext:{},translateString:mce,globalFormOptions:{idPrefix:qI,idSeparator:BI,useFallbackUiForUnsupportedType:!1}}}function iu(e,t){return{...l_(e,["schema","uiSchema","fieldPathId","schemaUtils","formData","edit","errors","errorSchema"]),...t!==void 0&&{status:t}}}class Mde 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:i}=t,o=n??r;this.state=this.getStateFromProps(t,o,void 0,void 0,void 0,!0),i&&!An(this.state.formData,o)&&i(iu(this.state)),this.formElement=k.createRef()}getSnapshotBeforeUpdate(t,n){if(!An(this.props,t)){const r=DM(this.props.formData,t.formData),i=DM(this.props.formData,this.state.formData),o=!An(t.schema,this.props.schema),l=r.length>0||!An(t.formData,this.props.formData),c=i.length>0||!An(this.state.formData,this.props.formData),u=this.getStateFromProps(this.props,this.props.formData,o||l?void 0:this.state.retrievedSchema,o,r,!c),d=!An(u,n);return{nextState:u,shouldUpdate:d}}return{shouldUpdate:!1}}componentDidUpdate(t,n,r){if(r.shouldUpdate){const{nextState:i}=r;!An(i.formData,this.props.formData)&&!An(i.formData,n.formData)&&this.props.onChange&&this.props.onChange(iu(i)),this.setState(i)}}getStateFromProps(t,n,r,i=!1,o=[],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",S="liveValidate"in t?t.liveValidate:this.props.liveValidate,y=g&&!t.noValidate&&S,C="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,C,x))&&(w=dce(d,u,C,x));const v=w.getRootSchema();let E=n;n===f3?E=void 0:n===void 0&&p&&(E=c.formData);const b=w.getDefaultFormState(v,E,!1,c.initialDefaultsGenerated),T=this.updateRetrievedSchema(r??w.retrieveSchema(v,b)),_=()=>t.noValidate||i?{errors:[],errorSchema:{}}:t.liveValidate?{errors:c.errors||[],errorSchema:c.errorSchema||{}}:{errors:c.schemaValidationErrors||[],errorSchema:c.schemaValidationErrorSchema||{}};let O,M,P=c.schemaValidationErrors,z=c.schemaValidationErrorSchema;if(y&&!l){const ee=this.liveValidate(v,w,c.errorSchema,b,void 0,c.customErrors,r,r!==void 0);O=ee.errors,M=ee.errorSchema,P=ee.schemaValidationErrors,z=ee.schemaValidationErrorSchema}else{const ee=_();if(O=ee.errors,M=ee.errorSchema,o.length>0&&!y){const H=o.reduce((Y,oe)=>(Y[oe]=void 0,Y),{});M=z=yh(ee.errorSchema,H,"preventDuplicates")}const G=this.mergeErrors({errorSchema:M,errors:O},t.extraErrors,c.customErrors);O=G.errors,M=G.errorSchema}const L=this.getRegistry(t,v,w),q=An(c.registry,L)?c.registry:L,Z=c.fieldPathId&&c.fieldPathId?.[_n]===q.globalFormOptions.idPrefix?c.fieldPathId:os("",q.globalFormOptions);return{schemaUtils:w,schema:v,uiSchema:h,fieldPathId:Z,formData:b,edit:g,errors:O,errorSchema:M,schemaValidationErrors:P,schemaValidationErrorSchema:z,retrievedSchema:T,initialDefaultsGenerated:!0,registry:q}}shouldComponentUpdate(t,n){const{experimental_componentUpdateStrategy:r="customDeep"}=this.props;return S$(this,t,n,r)}validate(t,n=this.state.schema,r,i){const o=r||this.state.schemaUtils,{customValidate:l,transformErrors:c,uiSchema:u}=this.props,d=i??o.retrieveSchema(n,t);return o.getValidator().validateFormData(t,d,l,c,u)}renderErrors(t){const{errors:n,errorSchema:r,schema:i,uiSchema:o}=this.state,l=lt(o),c=mt("ErrorListTemplate",t,l);return n&&n.length?j.jsx(c,{errors:n,errorSchema:r||{},schema:i,uiSchema:o,registry:t}):null}mergeErrors(t,n,r){let i=t.errorSchema,o=t.errors;if(n){const l=qg(t,n);i=l.errorSchema,o=l.errors}if(r){const l=qg(t,r.ErrorSchema,!0);i=l.errorSchema,o=l.errors}return{errors:o,errorSchema:i}}liveValidate(t,n,r,i,o,l,c,u=!1){const d=this.validate(i,t,n,c),h=d.errors;let p=d.errorSchema;u&&(p=yh(r,d.errorSchema,"preventDuplicates"));const g=h,S=p;return{...this.mergeErrors({errorSchema:p,errors:h},o,l),schemaValidationErrors:g,schemaValidationErrorSchema:S}}getUsedFormData=(t,n)=>{if(n.length===0&&typeof t!="object")return t;const r=l_(t,n);return Array.isArray(t)?Object.keys(r).map(i=>r[i]):r};getFieldNames=(t,n)=>{const r=(o,l)=>typeof o!="object"||br(o)||l&&!br(o),i=(o,l=[],c=[[]])=>{const u=Object.keys(o);return u.forEach(d=>{const h=o[d];if(typeof h=="object"){const p=c.map(g=>[...g,d]);h[CE]&&h[Lg]!==""?l.push(h[Lg]):i(h,l,p)}else d===Lg&&h!==""&&c.forEach(p=>{const g=ze(n,p),S=u.length===1;(r(g,S)||Array.isArray(g)&&g.every(y=>r(y,S)))&&l.push(p)})}),l};return i(t)};omitExtraData=t=>{const{schema:n,schemaUtils:r}=this.state,i=r.retrieveSchema(n,t),o=r.toPathSchema(i,"",t),l=this.getFieldNames(o,t);return this.getUsedFormData(t,l)};setFieldValue=(t,n)=>{const{registry:r}=this.state,i=Array.isArray(t)?t:t.split("."),o=os("",r.globalFormOptions,i);this.onChange(n,i,void 0,o[_n])};onChange=(t,n,r,i)=>{this.pendingChanges.push({newValue:t,path:n,newErrorSchema:r,id:i}),this.pendingChanges.length===1&&this.processPendingChange()};processPendingChange(){if(this.pendingChanges.length===0)return;const{newValue:t,path:n,id:r}=this.pendingChanges[0],{newErrorSchema:i}=this.pendingChanges[0],{extraErrors:o,omitExtraData:l,liveOmit:c,noValidate:u,liveValidate:d,onChange:h}=this.props,{formData:p,schemaUtils:g,schema:S,fieldPathId:y,schemaValidationErrorSchema:C,errors:x}=this.state;let{customErrors:w,errorSchema:v}=this.state;const E=y.path[0]||"",b=!n||n.length===0||n.length===1&&n[0]===E;let T=this.state.retrievedSchema,_=b?t:Nh(p);if(Ht(_)||Array.isArray(_)){t===N$?NG(_,n):b||hn(_,n,t);const z=this.getStateFromProps(this.props,_,void 0,void 0,void 0,!0);_=z.formData,T=z.retrievedSchema}const O=!u&&(d===!0||d==="onChange");let M={formData:_,schema:S},P=_;if(l===!0&&(c===!0||c==="onChange")&&(P=this.omitExtraData(_),M={formData:P}),i){const z=b?C:ze(C,n);if(!br(z))b?v=i:hn(v,n,i);else if(w||(w=new m$),b){const L=ze(i,Br);L&&w.setErrors(L)}else hn(w.ErrorSchema,n,i)}else w&&ze(w.ErrorSchema,[...n,Br])&&w.clearErrors(n);if(O&&this.pendingChanges.length===1){const z=this.liveValidate(S,g,v,P,o,w,T);M={formData:P,...z,customErrors:w}}else if(!u&&i){const z=this.mergeErrors({errorSchema:v,errors:x},o,w);M={formData:P,...z,customErrors:w}}this.setState(M,()=>{h&&h(iu({...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=f3,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(iu({...this.state,...l})))};onBlur=(t,n)=>{const{onBlur:r,omitExtraData:i,liveOmit:o,liveValidate:l}=this.props;if(r&&r(t,n),i===!0&&o==="onBlur"||l==="onBlur"){const{onChange:c,extraErrors:u}=this.props,{formData:d}=this.state;let h=d,p={formData:h};if(i===!0&&o==="onBlur"&&(h=this.omitExtraData(d),p={formData:h}),l==="onBlur"){const{schema:S,schemaUtils:y,errorSchema:C,customErrors:x,retrievedSchema:w}=this.state,v=this.liveValidate(S,y,C,h,u,x,w);p={formData:h,...v,customErrors:x}}const g=Object.keys(p).filter(S=>!S.startsWith("schemaValidation")).some(S=>{const y=ze(this.state,S),C=ze(p,S);return!An(y,C)});this.setState(p,()=>{c&&g&&c(iu({...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:i,onSubmit:o}=this.props;let{formData:l}=this.state;if(n===!0&&(l=this.omitExtraData(l)),i||this.validateFormWithFormData(l)){const c=r||{},u=r?$E(r):[];this.setState({formData:l,errors:u,errorSchema:c,schemaValidationErrors:[],schemaValidationErrorSchema:{}},()=>{o&&o(iu({...this.state,formData:l},"submitted"),t)})}};getGlobalFormOptions(t){const{uiSchema:n={},experimental_componentUpdateStrategy:r,idSeparator:i=BI,idPrefix:o=qI,nameGenerator:l,useFallbackUiForUnsupportedType:c=!1}=t;return{idPrefix:n["ui:rootFieldId"]||o,idSeparator:i,useFallbackUiForUnsupportedType:c,...r!==void 0&&{experimental_componentUpdateStrategy:r},...l!==void 0&&{nameGenerator:l}}}getRegistry(t,n,r){const{translateString:i,uiSchema:o={}}=t,{fields:l,templates:c,widgets:u,formContext:d,translateString:h}=kde();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:i||h,globalUiOptions:o[tx],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:i}=t,o=EN(i);o[0]===""?o[0]=n:o.unshift(n);const l=o.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:i,onError:o}=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 S=qg(c,n);d=S.errorSchema,u=S.errors}i&&(typeof i=="function"?i(u[0]):this.focusOnError(u[0])),this.setState({errors:u,errorSchema:d,schemaValidationErrors:h,schemaValidationErrorSchema:p},()=>{o?o(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:i,name:o,method:l,target:c,action:u,autoComplete:d,enctype:h,acceptCharset:p,noHtml5Validate:g=!1,disabled:S,readonly:y,showErrorList:C="top",_internalFormWrapper:x}=this.props,{schema:w,uiSchema:v,formData:E,errorSchema:b,fieldPathId:T,registry:_}=this.state,{SchemaField:O}=_.fields,{SubmitButton:M}=_.templates.ButtonTemplates,P=x?i:void 0,z=x||i||"form";let{[Ry]:L={}}=lt(v);S&&(L={...L,props:{...L.props,disabled:!0}});const q={[ja]:{[Ry]:L}};return j.jsxs(z,{className:r||"rjsf",id:n,name:o,method:l,target:c,action:u,autoComplete:d,encType:h,acceptCharset:p,noValidate:g,onSubmit:this.onSubmit,as:P,ref:this.formElement,children:[C==="top"&&this.renderErrors(_),j.jsx(O,{name:"",schema:w,uiSchema:v,errorSchema:b,fieldPathId:T,formData:E,onChange:this.onChange,onBlur:this.onBlur,onFocus:this.onFocus,registry:_,disabled:S,readonly:y}),t||j.jsx(M,{uiSchema:q,registry:_}),C==="bottom"&&this.renderErrors(_)]})}}function jde(e){return k.forwardRef(({fields:t,widgets:n,templates:r,...i},o)=>(t={...e?.fields,...t},n={...e?.widgets,...n},r={...e?.templates,...r,ButtonTemplates:{...e?.templates?.ButtonTemplates,...r?.ButtonTemplates}},j.jsx(Mde,{...e,...i,fields:t,widgets:n,templates:r,ref:o})))}var hg={exports:{}},hS={},d3;function Pde(){return d3||(d3=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(P,z){return{validate:P,compare:z}}e.fullFormats={date:t(o,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:C,"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:b},int64:{type:"number",validate:T},float:{type:"number",validate:_},double:{type:"number",validate:_},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)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function o(P){const z=r.exec(P);if(!z)return!1;const L=+z[1],q=+z[2],Z=+z[3];return q>=1&&q<=12&&Z>=1&&Z<=(q===2&&n(L)?29:i[q])}function l(P,z){if(P&&z)return P>z?1:P<z?-1:0}const c=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function u(P,z){const L=c.exec(P);if(!L)return!1;const q=+L[1],Z=+L[2],te=+L[3],ee=L[5];return(q<=23&&Z<=59&&te<=59||q===23&&Z===59&&te===60)&&(!z||ee!=="")}function d(P,z){if(!(P&&z))return;const L=c.exec(P),q=c.exec(z);if(L&&q)return P=L[1]+L[2]+L[3]+(L[4]||""),z=q[1]+q[2]+q[3]+(q[4]||""),P>z?1:P<z?-1:0}const h=/t|\s/i;function p(P){const z=P.split(h);return z.length===2&&o(z[0])&&u(z[1],!0)}function g(P,z){if(!(P&&z))return;const[L,q]=P.split(h),[Z,te]=z.split(h),ee=l(L,Z);if(ee!==void 0)return ee||d(q,te)}const S=/\/|:/,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 C(P){return S.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,E=2**31-1;function b(P){return Number.isInteger(P)&&P<=E&&P>=v}function T(P){return Number.isInteger(P)}function _(){return!0}const O=/[^\\]\\Z/;function M(P){if(O.test(P))return!1;try{return new RegExp(P),!0}catch{return!1}}})(hS)),hS}var pS={},h3;function Nde(){return h3||(h3=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=F_(),n=Rt(),r=n.operators,i={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}},o={message:({keyword:c,schemaCode:u})=>n.str`should be ${i[c].okStr} ${u}`,params:({keyword:c,schemaCode:u})=>n._`{comparison: ${i[c].okStr}, limit: ${u}}`};e.formatLimitDefinition={keyword:Object.keys(i),type:"string",schemaType:"string",$data:!0,error:o,code(c){const{gen:u,data:d,schemaCode:h,keyword:p,it:g}=c,{opts:S,self:y}=g;if(!S.validateFormats)return;const C=new t.KeywordCxt(g,y.RULES.all.format.definition,"format");C.$data?x():w();function x(){const E=u.scopeValue("formats",{ref:y.formats,code:S.code.formats}),b=u.const("fmt",n._`${E}[${C.schemaCode}]`);c.fail$data(n.or(n._`typeof ${b} != "object"`,n._`${b} instanceof RegExp`,n._`typeof ${b}.compare != "function"`,v(b)))}function w(){const E=C.schema,b=y.formats[E];if(!b||b===!0)return;if(typeof b!="object"||b instanceof RegExp||typeof b.compare!="function")throw new Error(`"${p}": format "${E}" does not define "compare" function`);const T=u.scopeValue("formats",{key:E,ref:b,code:S.code.formats?n._`${S.code.formats}${n.getProperty(E)}`:void 0});c.fail$data(v(T))}function v(E){return n._`${E}.compare(${d}, ${h}) ${i[p].fail} 0`}},dependencies:["format"]};const l=c=>(c.addKeyword(e.formatLimitDefinition),c);e.default=l})(pS)),pS}var p3;function Dde(){return p3||(p3=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const n=Pde(),r=Nde(),i=Rt(),o=new i.Name("fullFormats"),l=new i.Name("fastFormats"),c=(d,h={keywords:!0})=>{if(Array.isArray(h))return u(d,h,n.fullFormats,o),d;const[p,g]=h.mode==="fast"?[n.fastFormats,l]:[n.fullFormats,o],S=h.formats||n.formatNames;return u(d,S,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 S,y;(S=(y=d.opts.code).formats)!==null&&S!==void 0||(y.formats=i._`require("ajv-formats/dist/formats").${g}`);for(const C of h)d.addFormat(C,p[C])}e.exports=t=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c})(hg,hg.exports)),hg.exports}var Ide=Dde();const m3=Qs(Ide),$de={allErrors:!0,multipleOfPrecision:8,strict:!1,verbose:!0,discriminator:!1},zde=/^(#?([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*\)))$/,Lde=/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/;function Fde(e,t,n={},r,i=Y4,o){let l=new i({...$de,...n});return r?m3(l,r):r!==!1&&m3(l),l.addFormat("data-url",Lde),l.addFormat("color",zde),l.addKeyword(ko),l.addKeyword(CE),Array.isArray(e)&&l.addMetaSchema(e),Zt(t)&&Object.keys(t).forEach(c=>{l.addFormat(c,t[c])}),o&&(l=o(l)),l}function Ude(e=[],t){return e.map(r=>{var i;const{instancePath:o,keyword:l,params:c,schemaPath:u,parentSchema:d,...h}=r;let{message:p=""}=h,g=o.replace(/\//g,"."),S=`${g} ${p}`.trim(),y="";const C=[...((i=c.deps)===null||i===void 0?void 0:i.split(", "))||[],c.missingProperty,c.property].filter(x=>x);if(C.length>0)C.forEach(x=>{const w=g?`${g}.${x}`:x;let v=lt(ze(t,`${w.replace(/^\./,"")}`)).title;if(v===void 0){const E=u.replace(/\/properties\//g,"/").split("/").slice(1,-1).concat([x]);v=lt(ze(t,E)).title}if(v)p=p.replace(`'${x}'`,`'${v}'`),y=v;else{const E=ze(d,[rn,x,"title"]);E&&(p=p.replace(`'${x}'`,`'${E}'`),y=E)}}),S=p;else{const x=lt(ze(t,`${g.replace(/^\./,"")}`)).title;if(x)S=`'${x}' ${p}`.trim(),y=x;else{const w=d?.title;w&&(S=`'${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:S,schemaPath:u,title:y}}).reduce((r,i)=>{const{message:o,schemaPath:l}=i,c=l?.indexOf(`/${Gt}/`),u=l?.indexOf(`/${jt}/`);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===o&&((g=p.schemaPath)===null||g===void 0?void 0:g.startsWith(d))})||r.push(i),r},[])}function Vde(e,t,n,r,i,o,l){const{validationError:c}=t;let u=Ude(t.errors,l);c&&(u=[...u,{stack:c.message}]),typeof o=="function"&&(u=o(u,l));let d=Oce(u);if(c&&(d={...d,$schema:{__errors:[c.message]}}),typeof i!="function")return{errors:u,errorSchema:d};const h=l$(e,r,n,r,!0),p=i(h,nx(h),l),g=w$(p);return qg({errors:u,errorSchema:d},g)}class qde{constructor(t,n){const{additionalMetaSchemas:r,customFormats:i,ajvOptionsOverrides:o,ajvFormatOptions:l,AjvClass:c,extenderFn:u}=t;this.ajv=Fde(r,i,o,l,c,u),this.localizer=n}reset(){this.ajv.removeSchema()}rawValidation(t,n){var r,i;let o,l;try{t[_n]&&(l=this.ajv.getSchema(t[_n])),l===void 0&&(l=this.ajv.compile(t)),l(n)}catch(u){o=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),((i=l.errors)!==null&&i!==void 0?i:[]).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:o}}validateFormData(t,n,r,i,o){const l=this.rawValidation(n,t);return Vde(this,l,t,n,r,i,o)}handleSchemaUpdate(t){var n,r;const i=(n=t[_n])!==null&&n!==void 0?n:HI;this.ajv.getSchema(i)===void 0?this.ajv.addSchema(t,i):An(t,(r=this.ajv.getSchema(i))===null||r===void 0?void 0:r.schema)||(this.ajv.removeSchema(i),this.ajv.addSchema(t,i))}isValid(t,n,r){var i;try{this.handleSchemaUpdate(r);const o=zE(t),l=(i=o[_n])!==null&&i!==void 0?i:_ce(o);let c;return c=this.ajv.getSchema(l),c===void 0&&(c=this.ajv.addSchema(o,l).getSchema(l)||this.ajv.compile(o)),c(n)}catch(o){return console.warn("Error encountered compiling schema:",o),!1}}}function Bde(e={},t){return new qde(e,t)}const Hde=Bde();const Kde=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Gde=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),g3=e=>{const t=Gde(e);return t.charAt(0).toUpperCase()+t.slice(1)},L$=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),Zde=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var Yde={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 Wde=k.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:l,...c},u)=>k.createElement("svg",{ref:u,...Yde,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:L$("lucide",i),...!o&&!Zde(c)&&{"aria-hidden":"true"},...c},[...l.map(([d,h])=>k.createElement(d,h)),...Array.isArray(o)?o:[o]]));const ro=(e,t)=>{const n=k.forwardRef(({className:r,...i},o)=>k.createElement(Wde,{ref:o,iconNode:t,className:L$(`lucide-${Kde(g3(e))}`,`lucide-${e}`,r),...i}));return n.displayName=g3(e),n};const Xde=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Qde=ro("check",Xde);const Jde=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],F$=ro("chevron-down",Jde);const ehe=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],the=ro("chevron-up",ehe);const nhe=[["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"}]],rhe=ro("circle-alert",nhe);const ihe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],U$=ro("circle-plus",ihe);const she=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],ohe=ro("circle",she);const ahe=[["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"}]],lhe=ro("copy",ahe);const che=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],uhe=ro("search",che);const fhe=[["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"}]],dhe=ro("trash-2",fhe);const hhe=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],phe=ro("x",hhe);function y3(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(i=>{const o=y3(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():y3(e[i],null)}}}}function ur(...e){return k.useCallback(Ga(...e),e)}var mhe=Symbol.for("react.lazy"),Ay=of[" use ".trim().toString()];function ghe(e){return typeof e=="object"&&e!==null&&"then"in e}function V$(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===mhe&&"_payload"in e&&ghe(e._payload)}function q$(e){const t=yhe(e),n=k.forwardRef((r,i)=>{let{children:o,...l}=r;V$(o)&&typeof Ay=="function"&&(o=Ay(o._payload));const c=k.Children.toArray(o),u=c.find(bhe);if(u){const d=u.props.children,h=c.map(p=>p===u?k.Children.count(d)>1?k.Children.only(null):k.isValidElement(d)?d.props.children:null:p);return j.jsx(t,{...l,ref:i,children:k.isValidElement(d)?k.cloneElement(d,void 0,h):null})}return j.jsx(t,{...l,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}var B$=q$("Slot");function yhe(e){const t=k.forwardRef((n,r)=>{let{children:i,...o}=n;if(V$(i)&&typeof Ay=="function"&&(i=Ay(i._payload)),k.isValidElement(i)){const l=whe(i),c=She(o,i.props);return i.type!==k.Fragment&&(c.ref=r?Ga(r,l):l),k.cloneElement(i,c)}return k.Children.count(i)>1?k.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var vhe=Symbol("radix.slottable");function bhe(e){return k.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===vhe}function She(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...c)=>{const u=o(...c);return i(...c),u}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function whe(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 Pt(...e){return _P(qx(e))}const xhe=el("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 HE({className:e,variant:t,size:n,asChild:r=!1,...i}){const o=r?B$:"button";return j.jsx(o,{"data-slot":"button",className:Pt(xhe({variant:t,size:n,className:e})),...i})}function _he({uiSchema:e,registry:t,className:n,...r}){const{translateString:i}=t;return j.jsx("div",{className:"p-0 m-0",children:j.jsxs(HE,{...r,className:Pt("w-fit gap-2",n),variant:"outline",type:"button",children:[j.jsx(U$,{size:16})," ",i(It.AddItemButton)]})})}function Ehe(e){const{children:t,buttonsProps:n,displayLabel:r,hasDescription:i,hasToolbar:o,uiSchema:l,registry:c}=e,u=lt(l),d=mt("ArrayFieldItemButtonsTemplate",c,u),h=i?-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:o&&j.jsx("div",{className:"flex gap-2",style:{marginLeft:"5px",marginTop:r?`${h}px`:void 0},children:j.jsx(d,{...n})})})]})})}function Che(e){const{canAdd:t,disabled:n,fieldPathId:r,uiSchema:i,items:o,optionalDataControl:l,onAddClick:c,readonly:u,registry:d,required:h,schema:p,title:g}=e,S=lt(i),y=mt("ArrayFieldDescriptionTemplate",d,S),C=mt("ArrayFieldTitleTemplate",d,S),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(C,{fieldPathId:r,title:S.title||g,schema:p,uiSchema:i,required:h,registry:d,optionalDataControl:x?l:void 0}),j.jsx(y,{fieldPathId:r,description:S.description||p.description,schema:p,uiSchema:i,registry:d}),j.jsxs("div",{className:"p-0 m-0 w-full mb-2",children:[x?void 0:l,o,t&&j.jsx("div",{className:"mt-2 flex justify-end",children:j.jsx(w,{id:Vs(r,"add"),className:"rjsf-array-item-add",onClick:c,disabled:n||u,uiSchema:i,registry:d})})]},`array-item-list-${r.$id}`)]})})})}function H$({className:e,type:t,...n}){return j.jsx("input",{type:t,"data-slot":"input",className:Pt("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 The({id:e,htmlName:t,placeholder:n,required:r,readonly:i,disabled:o,type:l,value:c,onChange:u,onChangeOverride:d,onBlur:h,onFocus:p,autofocus:g,options:S,schema:y,rawErrors:C=[],children:x,extraProps:w,className:v}){const E={...w,...y$(y,l,S)},b=({target:{value:O}})=>u(O===""?S.emptyValue:O),T=({target:O})=>h(e,O&&O.value),_=({target:O})=>p(e,O&&O.value);return j.jsxs("div",{className:"p-0.5",children:[j.jsx(H$,{id:e,name:t||e,type:l,placeholder:n,autoFocus:g,required:r,disabled:o,readOnly:i,className:Pt({"border-destructive focus-visible:ring-0":C.length>0},v),list:y.examples?vh(e):void 0,...E,value:c||c===0?c:"",onChange:d||b,onBlur:T,onFocus:_,"aria-describedby":vi(e,!!y.examples)}),x,Array.isArray(y.examples)?j.jsx("datalist",{id:vh(e),children:y.examples.concat(y.default&&!y.examples.includes(y.default)?[y.default]:[]).map(O=>j.jsx("option",{value:O},O))}):null]})}function 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(qE,{description:t,registry:n,uiSchema:r})})}):null}const Ohe=el("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 Ahe({className:e,variant:t,...n}){return j.jsx("div",{"data-slot":"alert",role:"alert",className:Pt(Ohe({variant:t}),e),...n})}function khe({className:e,...t}){return j.jsx("div",{"data-slot":"alert-title",className:Pt("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",e),...t})}function Mhe({className:e,...t}){return j.jsx("div",{"data-slot":"alert-description",className:Pt("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",e),...t})}function jhe({errors:e,registry:t}){const{translateString:n}=t;return j.jsxs(Ahe,{variant:"destructive",className:"mb-2",children:[j.jsx(rhe,{className:"h-4 w-4"}),j.jsx(khe,{children:n(It.ErrorsLabel)}),j.jsx(Mhe,{className:"flex flex-col gap-1",children:e.map((r,i)=>j.jsxs("span",{children:["• ",r.stack]},i))})]})}function Phe(e){const{errors:t=[],fieldPathId:n}=e;if(t.length===0)return null;const r=NE(n);return j.jsx("div",{className:"flex flex-col gap-1",id:r,children:t.map((i,o)=>j.jsx("span",{className:"text-xs font-medium text-destructive mb-1",children:i},o))})}function Nhe(e){const{fieldPathId:t,help:n,uiSchema:r,registry:i,hasErrors:o}=e;return n?j.jsx("span",{className:Pt("text-xs font-medium text-muted-foreground",{"text-destructive":o}),id:DE(t),children:j.jsx(BE,{help:n,registry:i,uiSchema:r})}):null}function Dhe({id:e,children:t,displayLabel:n,rawErrors:r=[],errors:i,help:o,description:l,rawDescription:c,classNames:u,style:d,disabled:h,label:p,hidden:g,onKeyRename:S,onKeyRenameBlur:y,onRemoveProperty:C,readonly:x,required:w,schema:v,uiSchema:E,registry:b}){const T=lt(E),_=mt("WrapIfAdditionalTemplate",b,T);if(g)return j.jsx("div",{className:"hidden",children:t});const O=T.widget==="checkbox";return j.jsx(_,{classNames:u,style:d,disabled:h,id:e,label:p,displayLabel:n,onKeyRename:S,onKeyRenameBlur:y,onRemoveProperty:C,rawDescription:c,readonly:x,required:w,schema:v,uiSchema:E,registry:b,children:j.jsxs("div",{className:"flex flex-col gap-2",children:[n&&!O&&j.jsxs("label",{className:Pt("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:Pt("text-xs font-medium text-muted-foreground",{" text-destructive":r.length>0}),children:l}),i,o]})})}function Ihe(e){const{children:t,column:n,className:r,...i}=e;return j.jsx("div",{className:Pt("grid gap-2",r),...i,children:t})}function Wh(e){const{icon:t,iconType:n,className:r,uiSchema:i,registry:o,...l}=e;return j.jsx(HE,{size:"icon",variant:"outline",className:r,...l,type:"button",children:t})}function $he(e){const{registry:{translateString:t}}=e;return j.jsx(Wh,{title:t(It.CopyButton),...e,icon:j.jsx(lhe,{className:"h-4 w-4"})})}function zhe(e){const{registry:{translateString:t}}=e;return j.jsx(Wh,{title:t(It.MoveDownButton),...e,icon:j.jsx(F$,{className:"h-4 w-4"})})}function Lhe(e){const{registry:{translateString:t}}=e;return j.jsx(Wh,{title:t(It.MoveUpButton),...e,icon:j.jsx(the,{className:"h-4 w-4"})})}function K$(e){const{registry:{translateString:t}}=e;return j.jsx(Wh,{title:t(It.RemoveButton),...e,className:"border-destructive",icon:j.jsx(dhe,{className:"h-4 w-4 stroke-destructive"})})}function Fhe({selector:e,optionSchemaField:t}){return j.jsxs("div",{className:Pt("p-4 border rounded-md bg-background shadow-sm"),children:[j.jsx("div",{className:Pt("mb-4"),children:e}),t]})}function Uhe({description:e,title:t,properties:n,required:r,uiSchema:i,fieldPathId:o,schema:l,formData:c,optionalDataControl:u,onAddProperty:d,disabled:h,readonly:p,registry:g}){const S=lt(i),y=mt("TitleFieldTemplate",g,S),C=mt("DescriptionFieldTemplate",g,S),x=!p&&!h,{ButtonTemplates:{AddButton:w}}=g.templates;return j.jsxs(j.Fragment,{children:[t&&j.jsx(y,{id:A0(o),title:t,required:r,schema:l,uiSchema:i,registry:g,optionalDataControl:x?u:void 0}),e&&j.jsx(C,{id:mc(o),description:e,schema:l,uiSchema:i,registry:g}),j.jsxs("div",{className:"flex flex-col gap-2",children:[x?void 0:u,n.map((v,E)=>j.jsx("div",{className:`${v.hidden?"hidden":""} flex`,children:j.jsx("div",{className:"w-full",children:v.content})},E)),KI(l,i,c)?j.jsx("div",{className:"mt-2 flex justify-end",children:j.jsx(w,{id:Vs(o,"add"),onClick:d,disabled:h||p,className:"rjsf-object-property-expand",uiSchema:i,registry:g})}):null]})]})}function Vhe(e){const{id:t,registry:n,label:r,onAddClick:i,onRemoveClick:o}=e;return i?j.jsx(Wh,{id:t,registry:n,className:"rjsf-add-optional-data",onClick:i,title:r,icon:j.jsx(U$,{}),size:"xs"}):o?j.jsx(K$,{id:t,registry:n,className:"rjsf-remove-optional-data",onClick:o,title:r,size:"xs"}):j.jsx("em",{id:t,children:r})}function qhe(e){const{submitText:t,norender:n,props:r}=v$(e.uiSchema);return n?null:j.jsx("div",{children:j.jsx(HE,{type:"submit",...r,className:Pt("my-2",r?.className),children:t})})}var Do=Cj();const Bhe=Qs(Do);var Hhe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],io=Hhe.reduce((e,t)=>{const n=q$(`Primitive.${t}`),r=k.forwardRef((i,o)=>{const{asChild:l,...c}=i,u=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),j.jsx(u,{...c,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Khe="Separator",v3="horizontal",Ghe=["horizontal","vertical"],G$=k.forwardRef((e,t)=>{const{decorative:n,orientation:r=v3,...i}=e,o=Zhe(r)?r:v3,c=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return j.jsx(io.div,{"data-orientation":o,...c,...i,ref:t})});G$.displayName=Khe;function Zhe(e){return Ghe.includes(e)}var Yhe=G$;function Z$({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return j.jsx(Yhe,{"data-slot":"separator",decorative:n,orientation:t,className:Pt("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 Whe({id:e,title:t,uiSchema:n,optionalDataControl:r}){const i=lt(n);let o=j.jsx("h5",{children:i.title||t});return r&&(o=j.jsxs("div",{className:"flex flex-row",children:[j.jsx("div",{className:"flex-grow",children:o}),j.jsx("div",{className:"flex",children:r})]})),j.jsxs("div",{id:e,className:"my-1 flex flex-col gap-0.5",children:[o,j.jsx(Z$,{dir:"horizontal",style:{height:"1px"},className:"my-1"})]})}function Xhe({classNames:e,style:t,children:n,disabled:r,id:i,label:o,displayLabel:l,onRemoveProperty:c,onKeyRenameBlur:u,rawDescription:d,readonly:h,required:p,schema:g,uiSchema:S,registry:y}){const{templates:C,translateString:x}=y,{RemoveButton:w}=C.ButtonTemplates,v=x(It.KeyLabel,[o]);if(!(ko in g))return j.jsx("div",{className:e,style:t,children:n});const T=l?22+(d?-28:0):0,_=`${i}-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:_,className:"text-sm font-medium text-muted-foreground leading-none",children:v}),j.jsx("div",{className:"pl-0.5",children:j.jsx(H$,{required:p,defaultValue:o,disabled:r||h,id:_,name:_,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:Vs(i,"remove"),iconType:"block",className:"rjsf-object-property-remove w-full",disabled:r||h,onClick:c,uiSchema:S,registry:y})})]}),j.jsx(Z$,{dir:"horizontal",className:"mt-2"})]})}function Qhe(){return{ArrayFieldItemTemplate:Ehe,ArrayFieldTemplate:Che,BaseInputTemplate:The,ButtonTemplates:{AddButton:_he,CopyButton:$he,MoveDownButton:zhe,MoveUpButton:Lhe,RemoveButton:K$,SubmitButton:qhe},DescriptionFieldTemplate:Rhe,ErrorListTemplate:jhe,FieldErrorTemplate:Phe,FieldHelpTemplate:Nhe,FieldTemplate:Dhe,GridTemplate:Ihe,MultiSchemaFieldTemplate:Fhe,ObjectFieldTemplate:Uhe,OptionalDataControlsTemplate:Vhe,TitleFieldTemplate:Whe,WrapIfAdditionalTemplate:Xhe}}function Jhe(e,t){const n=k.createContext(t),r=o=>{const{children:l,...c}=o,u=k.useMemo(()=>c,Object.values(c));return j.jsx(n.Provider,{value:u,children:l})};r.displayName=e+"Provider";function i(o){const l=k.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,i]}function yc(e,t=[]){let n=[];function r(o,l){const c=k.createContext(l),u=n.length;n=[...n,l];const d=p=>{const{scope:g,children:S,...y}=p,C=g?.[e]?.[u]||c,x=k.useMemo(()=>y,Object.values(y));return j.jsx(C.Provider,{value:x,children:S})};d.displayName=o+"Provider";function h(p,g){const S=g?.[e]?.[u]||c,y=k.useContext(S);if(y)return y;if(l!==void 0)return l;throw new Error(`\`${p}\` must be used within \`${o}\``)}return[d,h]}const i=()=>{const o=n.map(l=>k.createContext(l));return function(c){const u=c?.[e]||o;return k.useMemo(()=>({[`__scope${e}`]:{...c,[e]:u}}),[c,u])}};return i.scopeName=e,[r,epe(i,...t)]}function epe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const l=r.reduce((c,{useScope:u,scopeName:d})=>{const p=u(o)[`__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(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}var Wu=globalThis?.document?k.useLayoutEffect:()=>{},tpe=of[" useInsertionEffect ".trim().toString()]||Wu;function Xh({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,o,l]=npe({defaultProp:t,onChange:n}),c=e!==void 0,u=c?e:i;{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=rpe(h)?h(e):h;p!==e&&l.current?.(p)}else o(h)},[c,e,o,l]);return[u,d]}function npe({defaultProp:e,onChange:t}){const[n,r]=k.useState(e),i=k.useRef(n),o=k.useRef(t);return tpe(()=>{o.current=t},[t]),k.useEffect(()=>{i.current!==n&&(o.current?.(n),i.current=n)},[n,i]),[n,r,o]}function rpe(e){return typeof e=="function"}function KE(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 GE(e){const[t,n]=k.useState(void 0);return Wu(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let l,c;if("borderBoxSize"in o){const u=o.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 ipe(e,t){return k.useReducer((n,r)=>t[n][r]??n,e)}var Sf=e=>{const{present:t,children:n}=e,r=spe(t),i=typeof n=="function"?n({present:r.isPresent}):k.Children.only(n),o=ur(r.ref,ope(i));return typeof n=="function"||r.isPresent?k.cloneElement(i,{ref:o}):null};Sf.displayName="Presence";function spe(e){const[t,n]=k.useState(),r=k.useRef(null),i=k.useRef(e),o=k.useRef("none"),l=e?"mounted":"unmounted",[c,u]=ipe(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return k.useEffect(()=>{const d=pg(r.current);o.current=c==="mounted"?d:"none"},[c]),Wu(()=>{const d=r.current,h=i.current;if(h!==e){const g=o.current,S=pg(d);e?u("MOUNT"):S==="none"||d?.display==="none"?u("UNMOUNT"):u(h&&g!==S?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),Wu(()=>{if(t){let d;const h=t.ownerDocument.defaultView??window,p=S=>{const C=pg(r.current).includes(CSS.escape(S.animationName));if(S.target===t&&C&&(u("ANIMATION_END"),!i.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",d=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},g=S=>{S.target===t&&(o.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 ope(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 ky(e){const t=ape(e),n=k.forwardRef((r,i)=>{const{children:o,...l}=r,c=k.Children.toArray(o),u=c.find(cpe);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:i,children:k.isValidElement(d)?k.cloneElement(d,void 0,h):null})}return j.jsx(t,{...l,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}function ape(e){const t=k.forwardRef((n,r)=>{const{children:i,...o}=n;if(k.isValidElement(i)){const l=fpe(i),c=upe(o,i.props);return i.type!==k.Fragment&&(c.ref=r?Ga(r,l):l),k.cloneElement(i,c)}return k.Children.count(i)>1?k.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var lpe=Symbol("radix.slottable");function cpe(e){return k.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===lpe}function upe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...c)=>{const u=o(...c);return i(...c),u}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function fpe(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 dpe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],er=dpe.reduce((e,t)=>{const n=ky(`Primitive.${t}`),r=k.forwardRef((i,o)=>{const{asChild:l,...c}=i,u=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),j.jsx(u,{...c,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function hpe(e,t){e&&Do.flushSync(()=>e.dispatchEvent(t))}var j0="Checkbox",[ppe]=yc(j0),[mpe,ZE]=ppe(j0);function gpe(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:o,form:l,name:c,onCheckedChange:u,required:d,value:h="on",internal_do_not_use_render:p}=e,[g,S]=Xh({prop:n,defaultProp:i??!1,onChange:u,caller:j0}),[y,C]=k.useState(null),[x,w]=k.useState(null),v=k.useRef(!1),E=y?!!l||!!y.closest("form"):!0,b={checked:g,disabled:o,setChecked:S,control:y,setControl:C,name:c,form:l,value:h,hasConsumerStoppedPropagationRef:v,required:d,defaultChecked:Da(i)?!1:i,isFormControl:E,bubbleInput:x,setBubbleInput:w};return j.jsx(mpe,{scope:t,...b,children:ype(p)?p(b):r})}var Y$="CheckboxTrigger",W$=k.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i)=>{const{control:o,value:l,disabled:c,checked:u,required:d,setControl:h,setChecked:p,hasConsumerStoppedPropagationRef:g,isFormControl:S,bubbleInput:y}=ZE(Y$,e),C=ur(i,h),x=k.useRef(u);return k.useEffect(()=>{const w=o?.form;if(w){const v=()=>p(x.current);return w.addEventListener("reset",v),()=>w.removeEventListener("reset",v)}},[o,p]),j.jsx(er.button,{type:"button",role:"checkbox","aria-checked":Da(u)?"mixed":u,"aria-required":d,"data-state":n9(u),"data-disabled":c?"":void 0,disabled:c,value:l,...r,ref:C,onKeyDown:zn(t,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:zn(n,w=>{p(v=>Da(v)?!0:!v),y&&S&&(g.current=w.isPropagationStopped(),g.current||w.stopPropagation())})})});W$.displayName=Y$;var X$=k.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:o,required:l,disabled:c,value:u,onCheckedChange:d,form:h,...p}=e;return j.jsx(gpe,{__scopeCheckbox:n,checked:i,defaultChecked:o,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(W$,{...p,ref:t,__scopeCheckbox:n}),g&&j.jsx(t9,{__scopeCheckbox:n})]})})});X$.displayName=j0;var Q$="CheckboxIndicator",J$=k.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...i}=e,o=ZE(Q$,n);return j.jsx(Sf,{present:r||Da(o.checked)||o.checked===!0,children:j.jsx(er.span,{"data-state":n9(o.checked),"data-disabled":o.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});J$.displayName=Q$;var e9="CheckboxBubbleInput",t9=k.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:i,checked:o,defaultChecked:l,required:c,disabled:u,name:d,value:h,form:p,bubbleInput:g,setBubbleInput:S}=ZE(e9,e),y=ur(n,S),C=KE(o),x=GE(r);k.useEffect(()=>{const v=g;if(!v)return;const E=window.HTMLInputElement.prototype,T=Object.getOwnPropertyDescriptor(E,"checked").set,_=!i.current;if(C!==o&&T){const O=new Event("click",{bubbles:_});v.indeterminate=Da(o),T.call(v,Da(o)?!1:o),v.dispatchEvent(O)}},[g,C,o,i]);const w=k.useRef(Da(o)?!1:o);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%)"}})});t9.displayName=e9;function ype(e){return typeof e=="function"}function Da(e){return e==="indeterminate"}function n9(e){return Da(e)?"indeterminate":e?"checked":"unchecked"}function vpe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var bpe=["color"],Spe=k.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=vpe(e,bpe);return k.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{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 r9({className:e,...t}){return j.jsx(X$,{"data-slot":"checkbox",className:Pt("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(J$,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:j.jsx(Spe,{className:"size-3.5"})})})}var wpe="Label",i9=k.forwardRef((e,t)=>j.jsx(io.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));i9.displayName=wpe;var xpe=i9;function YE({className:e,...t}){return j.jsx(xpe,{"data-slot":"label",className:Pt("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 _pe(e){const{id:t,htmlName:n,value:r,disabled:i,readonly:o,label:l,hideLabel:c,schema:u,autofocus:d,options:h,onChange:p,onBlur:g,onFocus:S,registry:y,uiSchema:C,className:x}=e,w=Hd(u),v=mt("DescriptionFieldTemplate",y,h),E=O=>p(O),b=()=>g(t,r),T=()=>S(t,r),_=h.description||u.description;return j.jsxs("div",{className:`relative ${i||o?"cursor-not-allowed opacity-50":""}`,"aria-describedby":vi(t),children:[!c&&_&&j.jsx(v,{id:mc(t),description:_,schema:u,uiSchema:C,registry:y}),j.jsxs("div",{className:"flex items-center gap-2 my-2",children:[j.jsx(r9,{id:t,name:n||t,checked:typeof r>"u"?!1:!!r,required:w,disabled:i||o,autoFocus:d,onCheckedChange:E,onBlur:b,onFocus:T,className:x}),j.jsx(YE,{className:"leading-tight",htmlFor:t,children:b$(l,c||!l)})]})]})}function Epe({id:e,htmlName:t,disabled:n,options:r,value:i,autofocus:o,readonly:l,required:c,onChange:u,onBlur:d,onFocus:h,className:p}){const{enumOptions:g,enumDisabled:S,inline:y,emptyValue:C}=r,x=Array.isArray(i)?i:[i],w=({target:E})=>d(e,Rr(E&&E.value,g,C)),v=({target:E})=>h(e,Rr(E&&E.value,g,C));return j.jsx("div",{className:Pt({"flex flex-col gap-2":!y,"flex flex-row gap-4 flex-wrap":y}),children:Array.isArray(g)&&g.map((E,b)=>{const T=Gh(E.value,x),_=Array.isArray(S)&&S.indexOf(E.value)!==-1,O=Zl(e,b);return j.jsxs("div",{className:"flex items-center gap-2",children:[j.jsx(r9,{id:O,name:t||e,required:c,disabled:n||_||l,onCheckedChange:M=>{u(M?p$(b,x,g):d$(b,x,g))},className:p,checked:T,autoFocus:o&&b===0,onBlur:w,onFocus:v,"aria-describedby":vi(e)}),j.jsx(YE,{className:"leading-tight",htmlFor:Zl(e,b),children:E.label})]},O)})})}function s9(e){const t=e+"CollectionProvider",[n,r]=yc(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=C=>{const{scope:x,children:w}=C,v=ki.useRef(null),E=ki.useRef(new Map).current;return j.jsx(i,{scope:x,itemMap:E,collectionRef:v,children:w})};l.displayName=t;const c=e+"CollectionSlot",u=ky(c),d=ki.forwardRef((C,x)=>{const{scope:w,children:v}=C,E=o(c,w),b=ur(x,E.collectionRef);return j.jsx(u,{ref:b,children:v})});d.displayName=c;const h=e+"CollectionItemSlot",p="data-radix-collection-item",g=ky(h),S=ki.forwardRef((C,x)=>{const{scope:w,children:v,...E}=C,b=ki.useRef(null),T=ur(x,b),_=o(h,w);return ki.useEffect(()=>(_.itemMap.set(b,{ref:b,...E}),()=>{_.itemMap.delete(b)})),j.jsx(g,{[p]:"",ref:T,children:v})});S.displayName=h;function y(C){const x=o(e+"CollectionConsumer",C);return ki.useCallback(()=>{const v=x.collectionRef.current;if(!v)return[];const E=Array.from(v.querySelectorAll(`[${p}]`));return Array.from(x.itemMap.values()).sort((_,O)=>E.indexOf(_.ref.current)-E.indexOf(O.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:l,Slot:d,ItemSlot:S},y,r]}var Cpe=of[" useId ".trim().toString()]||(()=>{}),Tpe=0;function Ks(e){const[t,n]=k.useState(Cpe());return Wu(()=>{n(r=>r??String(Tpe++))},[e]),t?`radix-${t}`:""}function Xu(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 WE(e){const t=k.useContext(Rpe);return e||t||"ltr"}var mS="rovingFocusGroup.onEntryFocus",Ope={bubbles:!1,cancelable:!0},Qh="RovingFocusGroup",[cx,o9,Ape]=s9(Qh),[kpe,a9]=yc(Qh,[Ape]),[Mpe,jpe]=kpe(Qh),l9=k.forwardRef((e,t)=>j.jsx(cx.Provider,{scope:e.__scopeRovingFocusGroup,children:j.jsx(cx.Slot,{scope:e.__scopeRovingFocusGroup,children:j.jsx(Ppe,{...e,ref:t})})}));l9.displayName=Qh;var Ppe=k.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:l,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:h=!1,...p}=e,g=k.useRef(null),S=ur(t,g),y=WE(o),[C,x]=Xh({prop:l,defaultProp:c??null,onChange:u,caller:Qh}),[w,v]=k.useState(!1),E=Xu(d),b=o9(n),T=k.useRef(!1),[_,O]=k.useState(0);return k.useEffect(()=>{const M=g.current;if(M)return M.addEventListener(mS,E),()=>M.removeEventListener(mS,E)},[E]),j.jsx(Mpe,{scope:n,orientation:r,dir:y,loop:i,currentTabStopId:C,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||_===0?-1:0,"data-orientation":r,...p,ref:S,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 z=new CustomEvent(mS,Ope);if(M.currentTarget.dispatchEvent(z),!z.defaultPrevented){const L=b().filter(G=>G.focusable),q=L.find(G=>G.active),Z=L.find(G=>G.id===C),ee=[q,Z,...L].filter(Boolean).map(G=>G.ref.current);f9(ee,h)}}T.current=!1}),onBlur:zn(e.onBlur,()=>v(!1))})})}),c9="RovingFocusGroupItem",u9=k.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,children:l,...c}=e,u=Ks(),d=o||u,h=jpe(c9,n),p=h.currentTabStopId===d,g=o9(n),{onFocusableItemAdd:S,onFocusableItemRemove:y,currentTabStopId:C}=h;return k.useEffect(()=>{if(r)return S(),()=>y()},[r,S,y]),j.jsx(cx.ItemSlot,{scope:n,id:d,focusable:r,active:i,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=Ipe(x,h.orientation,h.dir);if(w!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let E=g().filter(b=>b.focusable).map(b=>b.ref.current);if(w==="last")E.reverse();else if(w==="prev"||w==="next"){w==="prev"&&E.reverse();const b=E.indexOf(x.currentTarget);E=h.loop?$pe(E,b+1):E.slice(b+1)}setTimeout(()=>f9(E))}}),children:typeof l=="function"?l({isCurrentTabStop:p,hasTabStop:C!=null}):l})})});u9.displayName=c9;var Npe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Dpe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Ipe(e,t,n){const r=Dpe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Npe[r]}function f9(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function $pe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var zpe=l9,Lpe=u9,XE="Radio",[Fpe,d9]=yc(XE),[Upe,Vpe]=Fpe(XE),h9=k.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:i=!1,required:o,disabled:l,value:c="on",onCheck:u,form:d,...h}=e,[p,g]=k.useState(null),S=ur(t,x=>g(x)),y=k.useRef(!1),C=p?d||!!p.closest("form"):!0;return j.jsxs(Upe,{scope:n,checked:i,disabled:l,children:[j.jsx(er.button,{type:"button",role:"radio","aria-checked":i,"data-state":y9(i),"data-disabled":l?"":void 0,disabled:l,value:c,...h,ref:S,onClick:zn(e.onClick,x=>{i||u?.(),C&&(y.current=x.isPropagationStopped(),y.current||x.stopPropagation())})}),C&&j.jsx(g9,{control:p,bubbles:!y.current,name:r,value:c,checked:i,required:o,disabled:l,form:d,style:{transform:"translateX(-100%)"}})]})});h9.displayName=XE;var p9="RadioIndicator",m9=k.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...i}=e,o=Vpe(p9,n);return j.jsx(Sf,{present:r||o.checked,children:j.jsx(er.span,{"data-state":y9(o.checked),"data-disabled":o.disabled?"":void 0,...i,ref:t})})});m9.displayName=p9;var qpe="RadioBubbleInput",g9=k.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...i},o)=>{const l=k.useRef(null),c=ur(l,o),u=KE(n),d=GE(t);return k.useEffect(()=>{const h=l.current;if(!h)return;const p=window.HTMLInputElement.prototype,S=Object.getOwnPropertyDescriptor(p,"checked").set;if(u!==n&&S){const y=new Event("click",{bubbles:r});S.call(h,n),h.dispatchEvent(y)}},[u,n,r]),j.jsx(er.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:c,style:{...i.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});g9.displayName=qpe;function y9(e){return e?"checked":"unchecked"}var Bpe=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],P0="RadioGroup",[Hpe]=yc(P0,[a9,d9]),v9=a9(),b9=d9(),[Kpe,Gpe]=Hpe(P0),S9=k.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:i,value:o,required:l=!1,disabled:c=!1,orientation:u,dir:d,loop:h=!0,onValueChange:p,...g}=e,S=v9(n),y=WE(d),[C,x]=Xh({prop:o,defaultProp:i??null,onChange:p,caller:P0});return j.jsx(Kpe,{scope:n,name:r,required:l,disabled:c,value:C,onValueChange:x,children:j.jsx(zpe,{asChild:!0,...S,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})})})});S9.displayName=P0;var w9="RadioGroupItem",x9=k.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...i}=e,o=Gpe(w9,n),l=o.disabled||r,c=v9(n),u=b9(n),d=k.useRef(null),h=ur(t,d),p=o.value===i.value,g=k.useRef(!1);return k.useEffect(()=>{const S=C=>{Bpe.includes(C.key)&&(g.current=!0)},y=()=>g.current=!1;return document.addEventListener("keydown",S),document.addEventListener("keyup",y),()=>{document.removeEventListener("keydown",S),document.removeEventListener("keyup",y)}},[]),j.jsx(Lpe,{asChild:!0,...c,focusable:!l,active:p,children:j.jsx(h9,{disabled:l,required:o.required,checked:p,...u,...i,name:o.name,ref:h,onCheck:()=>o.onValueChange(i.value),onKeyDown:zn(S=>{S.key==="Enter"&&S.preventDefault()}),onFocus:zn(i.onFocus,()=>{g.current&&d.current?.click()})})})});x9.displayName=w9;var Zpe="RadioGroupIndicator",_9=k.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,i=b9(n);return j.jsx(m9,{...i,...r,ref:t})});_9.displayName=Zpe;var Ype=S9,Wpe=x9,Xpe=_9;function Qpe({className:e,...t}){return j.jsx(Ype,{"data-slot":"radio-group",className:Pt("grid gap-3",e),...t})}function Jpe({className:e,...t}){return j.jsx(Wpe,{"data-slot":"radio-group-item",className:Pt("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(Xpe,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:j.jsx(ohe,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}function eme({id:e,options:t,value:n,required:r,disabled:i,readonly:o,onChange:l,onBlur:c,onFocus:u,className:d}){const{enumOptions:h,enumDisabled:p,emptyValue:g}=t,S=w=>l(Rr(w,h,g)),y=({target:w})=>c(e,Rr(w&&w.value,h,g)),C=({target:w})=>u(e,Rr(w&&w.value,h,g)),x=!!(t&&t.inline);return j.jsx("div",{className:"mb-0",children:j.jsx(Qpe,{defaultValue:n?.toString(),required:r,disabled:i||o,onValueChange:w=>{S(w)},onBlur:y,onFocus:C,"aria-describedby":vi(e),orientation:x?"horizontal":"vertical",className:Pt("flex flex-wrap",{"flex-col":!x},d),children:Array.isArray(h)&&h.map((w,v)=>{const E=Array.isArray(p)&&p.indexOf(w.value)!==-1,b=Gh(w.value,n);return j.jsxs("div",{className:"flex items-center gap-2",children:[j.jsx(Jpe,{checked:b,value:v.toString(),id:Zl(e,v),disabled:E}),j.jsx(YE,{className:"leading-tight",htmlFor:Zl(e,v),children:w.label})]},Zl(e,v))})})})}function E9(e,[t,n]){return Math.min(n,Math.max(t,e))}var C9=["PageUp","PageDown"],T9=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],R9={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},wf="Slider",[ux,tme,nme]=s9(wf),[O9]=yc(wf,[nme]),[rme,N0]=O9(wf),A9=k.forwardRef((e,t)=>{const{name:n,min:r=0,max:i=100,step:o=1,orientation:l="horizontal",disabled:c=!1,minStepsBetweenThumbs:u=0,defaultValue:d=[r],value:h,onValueChange:p=()=>{},onValueCommit:g=()=>{},inverted:S=!1,form:y,...C}=e,x=k.useRef(new Set),w=k.useRef(0),E=l==="horizontal"?ime:sme,[b=[],T]=Xh({prop:h,defaultProp:d,onChange:L=>{[...x.current][w.current]?.focus(),p(L)}}),_=k.useRef(b);function O(L){const q=ume(b,L);z(L,q)}function M(L){z(L,w.current)}function P(){const L=_.current[w.current];b[w.current]!==L&&g(b)}function z(L,q,{commit:Z}={commit:!1}){const te=pme(o),ee=mme(Math.round((L-r)/o)*o+r,te),G=E9(ee,[r,i]);T((H=[])=>{const Y=lme(H,G,q);if(hme(Y,u*o)){w.current=Y.indexOf(G);const oe=String(Y)!==String(H);return oe&&Z&&g(Y),oe?Y:H}else return H})}return j.jsx(rme,{scope:e.__scopeSlider,name:n,disabled:c,min:r,max:i,valueIndexToChangeRef:w,thumbs:x.current,values:b,orientation:l,form:y,children:j.jsx(ux.Provider,{scope:e.__scopeSlider,children:j.jsx(ux.Slot,{scope:e.__scopeSlider,children:j.jsx(E,{"aria-disabled":c,"data-disabled":c?"":void 0,...C,ref:t,onPointerDown:zn(C.onPointerDown,()=>{c||(_.current=b)}),min:r,max:i,inverted:S,onSlideStart:c?void 0:O,onSlideMove:c?void 0:M,onSlideEnd:c?void 0:P,onHomeKeyDown:()=>!c&&z(r,0,{commit:!0}),onEndKeyDown:()=>!c&&z(i,b.length-1,{commit:!0}),onStepKeyDown:({event:L,direction:q})=>{if(!c){const ee=C9.includes(L.key)||L.shiftKey&&T9.includes(L.key)?10:1,G=w.current,H=b[G],Y=o*ee*q;z(H+Y,G,{commit:!0})}}})})})})});A9.displayName=wf;var[k9,M9]=O9(wf,{startEdge:"left",endEdge:"right",size:"width",direction:1}),ime=k.forwardRef((e,t)=>{const{min:n,max:r,dir:i,inverted:o,onSlideStart:l,onSlideMove:c,onSlideEnd:u,onStepKeyDown:d,...h}=e,[p,g]=k.useState(null),S=ur(t,E=>g(E)),y=k.useRef(void 0),C=WE(i),x=C==="ltr",w=x&&!o||!x&&o;function v(E){const b=y.current||p.getBoundingClientRect(),T=[0,b.width],O=QE(T,w?[n,r]:[r,n]);return y.current=b,O(E-b.left)}return j.jsx(k9,{scope:e.__scopeSlider,startEdge:w?"left":"right",endEdge:w?"right":"left",direction:w?1:-1,size:"width",children:j.jsx(j9,{dir:C,"data-orientation":"horizontal",...h,ref:S,style:{...h.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:E=>{const b=v(E.clientX);l?.(b)},onSlideMove:E=>{const b=v(E.clientX);c?.(b)},onSlideEnd:()=>{y.current=void 0,u?.()},onStepKeyDown:E=>{const T=R9[w?"from-left":"from-right"].includes(E.key);d?.({event:E,direction:T?-1:1})}})})}),sme=k.forwardRef((e,t)=>{const{min:n,max:r,inverted:i,onSlideStart:o,onSlideMove:l,onSlideEnd:c,onStepKeyDown:u,...d}=e,h=k.useRef(null),p=ur(t,h),g=k.useRef(void 0),S=!i;function y(C){const x=g.current||h.current.getBoundingClientRect(),w=[0,x.height],E=QE(w,S?[r,n]:[n,r]);return g.current=x,E(C-x.top)}return j.jsx(k9,{scope:e.__scopeSlider,startEdge:S?"bottom":"top",endEdge:S?"top":"bottom",size:"height",direction:S?1:-1,children:j.jsx(j9,{"data-orientation":"vertical",...d,ref:p,style:{...d.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:C=>{const x=y(C.clientY);o?.(x)},onSlideMove:C=>{const x=y(C.clientY);l?.(x)},onSlideEnd:()=>{g.current=void 0,c?.()},onStepKeyDown:C=>{const w=R9[S?"from-bottom":"from-top"].includes(C.key);u?.({event:C,direction:w?-1:1})}})})}),j9=k.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:o,onHomeKeyDown:l,onEndKeyDown:c,onStepKeyDown:u,...d}=e,h=N0(wf,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(T9).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)&&i(p)}),onPointerUp:zn(e.onPointerUp,p=>{const g=p.target;g.hasPointerCapture(p.pointerId)&&(g.releasePointerCapture(p.pointerId),o(p))})})}),P9="SliderTrack",N9=k.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,i=N0(P9,n);return j.jsx(er.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...r,ref:t})});N9.displayName=P9;var fx="SliderRange",D9=k.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,i=N0(fx,n),o=M9(fx,n),l=k.useRef(null),c=ur(t,l),u=i.values.length,d=i.values.map(g=>z9(g,i.min,i.max)),h=u>1?Math.min(...d):0,p=100-Math.max(...d);return j.jsx(er.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,...r,ref:c,style:{...e.style,[o.startEdge]:h+"%",[o.endEdge]:p+"%"}})});D9.displayName=fx;var dx="SliderThumb",I9=k.forwardRef((e,t)=>{const n=tme(e.__scopeSlider),[r,i]=k.useState(null),o=ur(t,c=>i(c)),l=k.useMemo(()=>r?n().findIndex(c=>c.ref.current===r):-1,[n,r]);return j.jsx(ome,{...e,ref:o,index:l})}),ome=k.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:i,...o}=e,l=N0(dx,n),c=M9(dx,n),[u,d]=k.useState(null),h=ur(t,v=>d(v)),p=u?l.form||!!u.closest("form"):!0,g=GE(u),S=l.values[r],y=S===void 0?0:z9(S,l.min,l.max),C=cme(r,l.values.length),x=g?.[c.size],w=x?fme(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(ux.ItemSlot,{scope:e.__scopeSlider,children:j.jsx(er.span,{role:"slider","aria-label":e["aria-label"]||C,"aria-valuemin":l.min,"aria-valuenow":S,"aria-valuemax":l.max,"aria-orientation":l.orientation,"data-orientation":l.orientation,"data-disabled":l.disabled?"":void 0,tabIndex:l.disabled?void 0:0,...o,ref:h,style:S===void 0?{display:"none"}:e.style,onFocus:zn(e.onFocus,()=>{l.valueIndexToChangeRef.current=r})})}),p&&j.jsx($9,{name:i??(l.name?l.name+(l.values.length>1?"[]":""):void 0),form:l.form,value:S},r)]})});I9.displayName=dx;var ame="RadioBubbleInput",$9=k.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const i=k.useRef(null),o=ur(i,r),l=KE(t);return k.useEffect(()=>{const c=i.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:o,defaultValue:t})});$9.displayName=ame;function lme(e=[],t,n){const r=[...e];return r[n]=t,r.sort((i,o)=>i-o)}function z9(e,t,n){const o=100/(n-t)*(e-t);return E9(o,[0,100])}function cme(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function ume(e,t){if(e.length===1)return 0;const n=e.map(i=>Math.abs(i-t)),r=Math.min(...n);return n.indexOf(r)}function fme(e,t,n){const r=e/2,o=QE([0,50],[0,r]);return(r-o(t)*n)*n}function dme(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function hme(e,t){if(t>0){const n=dme(e);return Math.min(...n)>=t}return!0}function QE(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 pme(e){return(String(e).split(".")[1]||"").length}function mme(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var gme=A9,yme=N9,vme=D9,bme=I9;function Sme({className:e,defaultValue:t,value:n,min:r=0,max:i=100,...o}){const l=k.useMemo(()=>Array.isArray(n)?n:Array.isArray(t)?t:[r,i],[n,t,r,i]);return j.jsxs(gme,{"data-slot":"slider",defaultValue:t,value:n,min:r,max:i,className:Pt("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),...o,children:[j.jsx(yme,{"data-slot":"slider-track",className:Pt("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(vme,{"data-slot":"slider-range",className:Pt("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:l.length},(c,u)=>j.jsx(bme,{"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 wme=["name","min","max","step","orientation","disabled","defaultValue","value","onValueChange","className","dir","inverted","minStepsBetweenThumbs"];function xme({value:e,readonly:t,disabled:n,options:r,schema:i,onChange:o,label:l,id:c}){const u=p=>o(p[0]),d={...g$(i)},h={id:c,...l_(r.props||{},wme)};return j.jsxs(j.Fragment,{children:[j.jsx(Sme,{disabled:n||t,min:d.min,max:d.max,step:d.step,value:[e],onValueChange:u,...h,"aria-describedby":vi(c)}),e]})}var b3=1,_me=.9,Eme=.8,Cme=.17,gS=.1,yS=.999,Tme=.9999,Rme=.99,Ome=/[\\\/_+.#"@\[\(\{&]/,Ame=/[\\\/_+.#"@\[\(\{&]/g,kme=/[\s-]/,L9=/[\s-]/g;function hx(e,t,n,r,i,o,l){if(o===t.length)return i===e.length?b3:Rme;var c=`${i},${o}`;if(l[c]!==void 0)return l[c];for(var u=r.charAt(o),d=n.indexOf(u,i),h=0,p,g,S,y;d>=0;)p=hx(e,t,n,r,d+1,o+1,l),p>h&&(d===i?p*=b3:Ome.test(e.charAt(d-1))?(p*=Eme,S=e.slice(i,d-1).match(Ame),S&&i>0&&(p*=Math.pow(yS,S.length))):kme.test(e.charAt(d-1))?(p*=_me,y=e.slice(i,d-1).match(L9),y&&i>0&&(p*=Math.pow(yS,y.length))):(p*=Cme,i>0&&(p*=Math.pow(yS,d-i))),e.charAt(d)!==t.charAt(o)&&(p*=Tme)),(p<gS&&n.charAt(d-1)===r.charAt(o+1)||r.charAt(o+1)===r.charAt(o)&&n.charAt(d-1)!==r.charAt(o))&&(g=hx(e,t,n,r,d+1,o+2,l),g*gS>p&&(p=g*gS)),p>h&&(h=p),d=n.indexOf(u,d+1);return l[c]=h,h}function S3(e){return e.toLowerCase().replace(L9," ")}function Mme(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,hx(e,t,S3(e),S3(t),0,0,{})}function jme(e,t=globalThis?.document){const n=Xu(e);k.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Pme="DismissableLayer",px="dismissableLayer.update",Nme="dismissableLayer.pointerDownOutside",Dme="dismissableLayer.focusOutside",w3,F9=k.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),U9=k.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:l,onDismiss:c,...u}=e,d=k.useContext(F9),[h,p]=k.useState(null),g=h?.ownerDocument??globalThis?.document,[,S]=k.useState({}),y=ur(t,O=>p(O)),C=Array.from(d.layers),[x]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),w=C.indexOf(x),v=h?C.indexOf(h):-1,E=d.layersWithOutsidePointerEventsDisabled.size>0,b=v>=w,T=zme(O=>{const M=O.target,P=[...d.branches].some(z=>z.contains(M));!b||P||(i?.(O),l?.(O),O.defaultPrevented||c?.())},g),_=Lme(O=>{const M=O.target;[...d.branches].some(z=>z.contains(M))||(o?.(O),l?.(O),O.defaultPrevented||c?.())},g);return jme(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&&(w3=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(h)),d.layers.add(h),x3(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=w3)}},[h,g,n,d]),k.useEffect(()=>()=>{h&&(d.layers.delete(h),d.layersWithOutsidePointerEventsDisabled.delete(h),x3())},[h,d]),k.useEffect(()=>{const O=()=>S({});return document.addEventListener(px,O),()=>document.removeEventListener(px,O)},[]),j.jsx(er.div,{...u,ref:y,style:{pointerEvents:E?b?"auto":"none":void 0,...e.style},onFocusCapture:zn(e.onFocusCapture,_.onFocusCapture),onBlurCapture:zn(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:zn(e.onPointerDownCapture,T.onPointerDownCapture)})});U9.displayName=Pme;var Ime="DismissableLayerBranch",$me=k.forwardRef((e,t)=>{const n=k.useContext(F9),r=k.useRef(null),i=ur(t,r);return k.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),j.jsx(er.div,{...e,ref:i})});$me.displayName=Ime;function zme(e,t=globalThis?.document){const n=Xu(e),r=k.useRef(!1),i=k.useRef(()=>{});return k.useEffect(()=>{const o=c=>{if(c.target&&!r.current){let u=function(){V9(Nme,n,d,{discrete:!0})};const d={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Lme(e,t=globalThis?.document){const n=Xu(e),r=k.useRef(!1);return k.useEffect(()=>{const i=o=>{o.target&&!r.current&&V9(Dme,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function x3(){const e=new CustomEvent(px);document.dispatchEvent(e)}function V9(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?hpe(i,o):i.dispatchEvent(o)}var vS="focusScope.autoFocusOnMount",bS="focusScope.autoFocusOnUnmount",_3={bubbles:!1,cancelable:!0},Fme="FocusScope",q9=k.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...l}=e,[c,u]=k.useState(null),d=Xu(i),h=Xu(o),p=k.useRef(null),g=ur(t,C=>u(C)),S=k.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;k.useEffect(()=>{if(r){let C=function(E){if(S.paused||!c)return;const b=E.target;c.contains(b)?p.current=b:_a(p.current,{select:!0})},x=function(E){if(S.paused||!c)return;const b=E.relatedTarget;b!==null&&(c.contains(b)||_a(p.current,{select:!0}))},w=function(E){if(document.activeElement===document.body)for(const T of E)T.removedNodes.length>0&&_a(c)};document.addEventListener("focusin",C),document.addEventListener("focusout",x);const v=new MutationObserver(w);return c&&v.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",x),v.disconnect()}}},[r,c,S.paused]),k.useEffect(()=>{if(c){C3.add(S);const C=document.activeElement;if(!c.contains(C)){const w=new CustomEvent(vS,_3);c.addEventListener(vS,d),c.dispatchEvent(w),w.defaultPrevented||(Ume(Kme(B9(c)),{select:!0}),document.activeElement===C&&_a(c))}return()=>{c.removeEventListener(vS,d),setTimeout(()=>{const w=new CustomEvent(bS,_3);c.addEventListener(bS,h),c.dispatchEvent(w),w.defaultPrevented||_a(C??document.body,{select:!0}),c.removeEventListener(bS,h),C3.remove(S)},0)}}},[c,d,h,S]);const y=k.useCallback(C=>{if(!n&&!r||S.paused)return;const x=C.key==="Tab"&&!C.altKey&&!C.ctrlKey&&!C.metaKey,w=document.activeElement;if(x&&w){const v=C.currentTarget,[E,b]=Vme(v);E&&b?!C.shiftKey&&w===b?(C.preventDefault(),n&&_a(E,{select:!0})):C.shiftKey&&w===E&&(C.preventDefault(),n&&_a(b,{select:!0})):w===v&&C.preventDefault()}},[n,r,S.paused]);return j.jsx(er.div,{tabIndex:-1,...l,ref:g,onKeyDown:y})});q9.displayName=Fme;function Ume(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(_a(r,{select:t}),document.activeElement!==n)return}function Vme(e){const t=B9(e),n=E3(t,e),r=E3(t.reverse(),e);return[n,r]}function B9(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function E3(e,t){for(const n of e)if(!qme(n,{upTo:t}))return n}function qme(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 Bme(e){return e instanceof HTMLInputElement&&"select"in e}function _a(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Bme(e)&&t&&e.select()}}var C3=Hme();function Hme(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=T3(e,t),e.unshift(t)},remove(t){e=T3(e,t),e[0]?.resume()}}}function T3(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Kme(e){return e.filter(t=>t.tagName!=="A")}var Gme="Portal",H9=k.forwardRef((e,t)=>{const{container:n,...r}=e,[i,o]=k.useState(!1);Wu(()=>o(!0),[]);const l=n||i&&globalThis?.document?.body;return l?Bhe.createPortal(j.jsx(er.div,{...r,ref:t}),l):null});H9.displayName=Gme;var SS=0;function Zme(){k.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??R3()),document.body.insertAdjacentElement("beforeend",e[1]??R3()),SS++,()=>{SS===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),SS--}},[])}function R3(){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 Hg="right-scroll-bar-position",Kg="width-before-scroll-bar",Yme="with-scroll-bars-hidden",Wme="--removed-body-scroll-bar-size";function wS(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Xme(e,t){var n=k.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var Qme=typeof window<"u"?k.useLayoutEffect:k.useEffect,O3=new WeakMap;function Jme(e,t){var n=Xme(null,function(r){return e.forEach(function(i){return wS(i,r)})});return Qme(function(){var r=O3.get(n);if(r){var i=new Set(r),o=new Set(e),l=n.current;i.forEach(function(c){o.has(c)||wS(c,null)}),o.forEach(function(c){i.has(c)||wS(c,l)})}O3.set(n,e)},[e]),n}function ege(e){return e}function tge(e,t){t===void 0&&(t=ege);var n=[],r=!1,i={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(o){var l=t(o,r);return n.push(l),function(){n=n.filter(function(c){return c!==l})}},assignSyncMedium:function(o){for(r=!0;n.length;){var l=n;n=[],l.forEach(o)}n={push:function(c){return o(c)},filter:function(){return n}}},assignMedium:function(o){r=!0;var l=[];if(n.length){var c=n;n=[],c.forEach(o),l=n}var u=function(){var h=l;l=[],h.forEach(o)},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 i}function nge(e){e===void 0&&(e={});var t=tge(null);return t.options=Ls({async:!0,ssr:!1},e),t}var K9=function(e){var t=e.sideCar,n=TP(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,Ls({},n))};K9.isSideCarExport=!0;function rge(e,t){return e.useMedium(t),K9}var G9=nge(),xS=function(){},D0=k.forwardRef(function(e,t){var n=k.useRef(null),r=k.useState({onScrollCapture:xS,onWheelCapture:xS,onTouchMoveCapture:xS}),i=r[0],o=r[1],l=e.forwardProps,c=e.children,u=e.className,d=e.removeScrollBar,h=e.enabled,p=e.shards,g=e.sideCar,S=e.noRelative,y=e.noIsolation,C=e.inert,x=e.allowPinchZoom,w=e.as,v=w===void 0?"div":w,E=e.gapMode,b=TP(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),T=g,_=Jme([n,t]),O=Ls(Ls({},b),i);return k.createElement(k.Fragment,null,h&&k.createElement(T,{sideCar:G9,removeScrollBar:d,shards:p,noRelative:S,noIsolation:y,inert:C,setCallbacks:o,allowPinchZoom:!!x,lockRef:n,gapMode:E}),l?k.cloneElement(k.Children.only(c),Ls(Ls({},O),{ref:_})):k.createElement(v,Ls({},O,{className:u,ref:_}),c))});D0.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};D0.classNames={fullWidth:Kg,zeroRight:Hg};var ige=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function sge(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ige();return t&&e.setAttribute("nonce",t),e}function oge(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function age(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var lge=function(){var e=0,t=null;return{add:function(n){e==0&&(t=sge())&&(oge(t,n),age(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},cge=function(){var e=lge();return function(t,n){k.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Z9=function(){var e=cge(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},uge={left:0,top:0,right:0,gap:0},_S=function(e){return parseInt(e||"",10)||0},fge=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[_S(n),_S(r),_S(i)]},dge=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return uge;var t=fge(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])}},hge=Z9(),ku="data-scroll-locked",pge=function(e,t,n,r){var i=e.left,o=e.top,l=e.right,c=e.gap;return n===void 0&&(n="margin"),`
67
- .`.concat(Yme,` {
68
- overflow: hidden `).concat(r,`;
69
- padding-right: `).concat(c,"px ").concat(r,`;
70
- }
71
- body[`).concat(ku,`] {
72
- overflow: hidden `).concat(r,`;
73
- overscroll-behavior: contain;
74
- `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
75
- padding-left: `.concat(i,`px;
76
- padding-top: `).concat(o,`px;
77
- padding-right: `).concat(l,`px;
78
- margin-left:0;
79
- margin-top:0;
80
- margin-right: `).concat(c,"px ").concat(r,`;
81
- `),n==="padding"&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),`
82
- }
83
-
84
- .`).concat(Hg,` {
85
- right: `).concat(c,"px ").concat(r,`;
86
- }
87
-
88
- .`).concat(Kg,` {
89
- margin-right: `).concat(c,"px ").concat(r,`;
90
- }
91
-
92
- .`).concat(Hg," .").concat(Hg,` {
93
- right: 0 `).concat(r,`;
94
- }
95
-
96
- .`).concat(Kg," .").concat(Kg,` {
97
- margin-right: 0 `).concat(r,`;
98
- }
99
-
100
- body[`).concat(ku,`] {
101
- `).concat(Wme,": ").concat(c,`px;
102
- }
103
- `)},A3=function(){var e=parseInt(document.body.getAttribute(ku)||"0",10);return isFinite(e)?e:0},mge=function(){k.useEffect(function(){return document.body.setAttribute(ku,(A3()+1).toString()),function(){var e=A3()-1;e<=0?document.body.removeAttribute(ku):document.body.setAttribute(ku,e.toString())}},[])},gge=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;mge();var o=k.useMemo(function(){return dge(i)},[i]);return k.createElement(hge,{styles:pge(o,!t,i,n?"":"!important")})},mx=!1;if(typeof window<"u")try{var mg=Object.defineProperty({},"passive",{get:function(){return mx=!0,!0}});window.addEventListener("test",mg,mg),window.removeEventListener("test",mg,mg)}catch{mx=!1}var su=mx?{passive:!1}:!1,yge=function(e){return e.tagName==="TEXTAREA"},Y9=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!yge(e)&&n[t]==="visible")},vge=function(e){return Y9(e,"overflowY")},bge=function(e){return Y9(e,"overflowX")},k3=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=W9(e,r);if(i){var o=X9(e,r),l=o[1],c=o[2];if(l>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Sge=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},wge=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},W9=function(e,t){return e==="v"?vge(t):bge(t)},X9=function(e,t){return e==="v"?Sge(t):wge(t)},xge=function(e,t){return e==="h"&&t==="rtl"?-1:1},_ge=function(e,t,n,r,i){var o=xge(e,window.getComputedStyle(t).direction),l=o*r,c=n.target,u=t.contains(c),d=!1,h=l>0,p=0,g=0;do{if(!c)break;var S=X9(e,c),y=S[0],C=S[1],x=S[2],w=C-x-o*y;(y||w)&&W9(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]},M3=function(e){return[e.deltaX,e.deltaY]},j3=function(e){return e&&"current"in e?e.current:e},Ege=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Cge=function(e){return`
104
- .block-interactivity-`.concat(e,` {pointer-events: none;}
105
- .allow-interactivity-`).concat(e,` {pointer-events: all;}
106
- `)},Tge=0,ou=[];function Rge(e){var t=k.useRef([]),n=k.useRef([0,0]),r=k.useRef(),i=k.useState(Tge++)[0],o=k.useState(Z9)[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(i));var C=jU([e.lockRef.current],(e.shards||[]).map(j3),!0).filter(Boolean);return C.forEach(function(x){return x.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),C.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var c=k.useCallback(function(C,x){if("touches"in C&&C.touches.length===2||C.type==="wheel"&&C.ctrlKey)return!l.current.allowPinchZoom;var w=gg(C),v=n.current,E="deltaX"in C?C.deltaX:v[0]-w[0],b="deltaY"in C?C.deltaY:v[1]-w[1],T,_=C.target,O=Math.abs(E)>Math.abs(b)?"h":"v";if("touches"in C&&O==="h"&&_.type==="range")return!1;var M=window.getSelection(),P=M&&M.anchorNode,z=P?P===_||P.contains(_):!1;if(z)return!1;var L=k3(O,_);if(!L)return!0;if(L?T=O:(T=O==="v"?"h":"v",L=k3(O,_)),!L)return!1;if(!r.current&&"changedTouches"in C&&(E||b)&&(r.current=T),!T)return!0;var q=r.current||T;return _ge(q,x,C,q==="h"?E:b)},[]),u=k.useCallback(function(C){var x=C;if(!(!ou.length||ou[ou.length-1]!==o)){var w="deltaY"in x?M3(x):gg(x),v=t.current.filter(function(T){return T.name===x.type&&(T.target===x.target||x.target===T.shadowParent)&&Ege(T.delta,w)})[0];if(v&&v.should){x.cancelable&&x.preventDefault();return}if(!v){var E=(l.current.shards||[]).map(j3).filter(Boolean).filter(function(T){return T.contains(x.target)}),b=E.length>0?c(x,E[0]):!l.current.noIsolation;b&&x.cancelable&&x.preventDefault()}}},[]),d=k.useCallback(function(C,x,w,v){var E={name:C,delta:x,target:w,should:v,shadowParent:Oge(w)};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(b){return b!==E})},1)},[]),h=k.useCallback(function(C){n.current=gg(C),r.current=void 0},[]),p=k.useCallback(function(C){d(C.type,M3(C),C.target,c(C,e.lockRef.current))},[]),g=k.useCallback(function(C){d(C.type,gg(C),C.target,c(C,e.lockRef.current))},[]);k.useEffect(function(){return ou.push(o),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:g}),document.addEventListener("wheel",u,su),document.addEventListener("touchmove",u,su),document.addEventListener("touchstart",h,su),function(){ou=ou.filter(function(C){return C!==o}),document.removeEventListener("wheel",u,su),document.removeEventListener("touchmove",u,su),document.removeEventListener("touchstart",h,su)}},[]);var S=e.removeScrollBar,y=e.inert;return k.createElement(k.Fragment,null,y?k.createElement(o,{styles:Cge(i)}):null,S?k.createElement(gge,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Oge(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Age=rge(G9,Rge);var Q9=k.forwardRef(function(e,t){return k.createElement(D0,Ls({},e,{ref:t,sideCar:Age}))});Q9.classNames=D0.classNames;var kge=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={},ES=0,J9=function(e){return e&&(e.host||J9(e.parentNode))},Mge=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=J9(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})},jge=function(e,t,n,r){var i=Mge(t,Array.isArray(e)?e:[e]);vg[n]||(vg[n]=new WeakMap);var o=vg[n],l=[],c=new Set,u=new Set(i),d=function(p){!p||c.has(p)||(c.add(p),d(p.parentNode))};i.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 S=g.getAttribute(r),y=S!==null&&S!=="false",C=(au.get(g)||0)+1,x=(o.get(g)||0)+1;au.set(g,C),o.set(g,x),l.push(g),C===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(),ES++,function(){l.forEach(function(p){var g=au.get(p)-1,S=o.get(p)-1;au.set(p,g),o.set(p,S),g||(yg.has(p)||p.removeAttribute(r),yg.delete(p)),S||p.removeAttribute(n)}),ES--,ES||(au=new WeakMap,au=new WeakMap,yg=new WeakMap,vg={})}},Pge=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=kge(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),jge(r,i,n,"aria-hidden")):function(){return null}},I0="Dialog",[ez]=yc(I0),[Nge,Rs]=ez(I0),tz=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:l=!0}=e,c=k.useRef(null),u=k.useRef(null),[d,h]=Xh({prop:r,defaultProp:i??!1,onChange:o,caller:I0});return j.jsx(Nge,{scope:t,triggerRef:c,contentRef:u,contentId:Ks(),titleId:Ks(),descriptionId:Ks(),open:d,onOpenChange:h,onOpenToggle:k.useCallback(()=>h(p=>!p),[h]),modal:l,children:n})};tz.displayName=I0;var nz="DialogTrigger",Dge=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Rs(nz,n),o=ur(t,i.triggerRef);return j.jsx(er.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":t2(i.open),...r,ref:o,onClick:zn(e.onClick,i.onOpenToggle)})});Dge.displayName=nz;var JE="DialogPortal",[Ige,rz]=ez(JE,{forceMount:void 0}),iz=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=Rs(JE,t);return j.jsx(Ige,{scope:t,forceMount:n,children:k.Children.map(r,l=>j.jsx(Sf,{present:n||o.open,children:j.jsx(H9,{asChild:!0,container:i,children:l})}))})};iz.displayName=JE;var My="DialogOverlay",sz=k.forwardRef((e,t)=>{const n=rz(My,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Rs(My,e.__scopeDialog);return o.modal?j.jsx(Sf,{present:r||o.open,children:j.jsx(zge,{...i,ref:t})}):null});sz.displayName=My;var $ge=ky("DialogOverlay.RemoveScroll"),zge=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Rs(My,n);return j.jsx(Q9,{as:$ge,allowPinchZoom:!0,shards:[i.contentRef],children:j.jsx(er.div,{"data-state":t2(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),rc="DialogContent",oz=k.forwardRef((e,t)=>{const n=rz(rc,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Rs(rc,e.__scopeDialog);return j.jsx(Sf,{present:r||o.open,children:o.modal?j.jsx(Lge,{...i,ref:t}):j.jsx(Fge,{...i,ref:t})})});oz.displayName=rc;var Lge=k.forwardRef((e,t)=>{const n=Rs(rc,e.__scopeDialog),r=k.useRef(null),i=ur(t,n.contentRef,r);return k.useEffect(()=>{const o=r.current;if(o)return Pge(o)},[]),j.jsx(az,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:zn(e.onCloseAutoFocus,o=>{o.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:zn(e.onPointerDownOutside,o=>{const l=o.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0;(l.button===2||c)&&o.preventDefault()}),onFocusOutside:zn(e.onFocusOutside,o=>o.preventDefault())})}),Fge=k.forwardRef((e,t)=>{const n=Rs(rc,e.__scopeDialog),r=k.useRef(!1),i=k.useRef(!1);return j.jsx(az,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=o.target;n.triggerRef.current?.contains(l)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),az=k.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...l}=e,c=Rs(rc,n),u=k.useRef(null),d=ur(t,u);return Zme(),j.jsxs(j.Fragment,{children:[j.jsx(q9,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:j.jsx(U9,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":t2(c.open),...l,ref:d,onDismiss:()=>c.onOpenChange(!1)})}),j.jsxs(j.Fragment,{children:[j.jsx(Bge,{titleId:c.titleId}),j.jsx(Kge,{contentRef:u,descriptionId:c.descriptionId})]})]})}),e2="DialogTitle",Uge=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Rs(e2,n);return j.jsx(er.h2,{id:i.titleId,...r,ref:t})});Uge.displayName=e2;var lz="DialogDescription",Vge=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Rs(lz,n);return j.jsx(er.p,{id:i.descriptionId,...r,ref:t})});Vge.displayName=lz;var cz="DialogClose",qge=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Rs(cz,n);return j.jsx(er.button,{type:"button",...r,ref:t,onClick:zn(e.onClick,()=>i.onOpenChange(!1))})});qge.displayName=cz;function t2(e){return e?"open":"closed"}var uz="DialogTitleWarning",[lwe,fz]=Jhe(uz,{contentName:rc,titleName:e2,docsSlug:"dialog"}),Bge=({titleId:e})=>{const t=fz(uz),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
107
-
108
- If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
109
-
110
- 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},Hge="DialogDescriptionWarning",Kge=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${fz(Hge).contentName}}.`;return k.useEffect(()=>{const i=e.current?.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Gge=tz,Zge=iz,Yge=sz,Wge=oz,Cd='[cmdk-group=""]',CS='[cmdk-group-items=""]',Xge='[cmdk-group-heading=""]',dz='[cmdk-item=""]',P3=`${dz}:not([aria-disabled="true"])`,gx="cmdk-item-select",uu="data-value",Qge=(e,t,n)=>Mme(e,t,n),hz=k.createContext(void 0),Jh=()=>k.useContext(hz),pz=k.createContext(void 0),n2=()=>k.useContext(pz),mz=k.createContext(void 0),gz=k.forwardRef((e,t)=>{let n=fu(()=>{var B,$;return{search:"",value:($=(B=e.value)!=null?B:e.defaultValue)!=null?$:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=fu(()=>new Set),i=fu(()=>new Map),o=fu(()=>new Map),l=fu(()=>new Set),c=yz(e),{label:u,children:d,value:h,onValueChange:p,filter:g,shouldFilter:S,loop:y,disablePointerSelection:C=!1,vimBindings:x=!0,...w}=e,v=Ks(),E=Ks(),b=Ks(),T=k.useRef(null),_=cye();ic(()=>{if(h!==void 0){let B=h.trim();n.current.value=B,O.emit()}},[h]),ic(()=>{_(6,Z)},[]);let O=k.useMemo(()=>({subscribe:B=>(l.current.add(B),()=>l.current.delete(B)),snapshot:()=>n.current,setState:(B,$,N)=>{var U,J,ne,se;if(!Object.is(n.current[B],$)){if(n.current[B]=$,B==="search")q(),z(),_(1,L);else if(B==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let he=document.getElementById(b);he?he.focus():(U=document.getElementById(v))==null||U.focus()}if(_(7,()=>{var he;n.current.selectedItemId=(he=te())==null?void 0:he.id,O.emit()}),N||_(5,Z),((J=c.current)==null?void 0:J.value)!==void 0){let he=$??"";(se=(ne=c.current).onValueChange)==null||se.call(ne,he);return}}O.emit()}},emit:()=>{l.current.forEach(B=>B())}}),[]),M=k.useMemo(()=>({value:(B,$,N)=>{var U;$!==((U=o.current.get(B))==null?void 0:U.value)&&(o.current.set(B,{value:$,keywords:N}),n.current.filtered.items.set(B,P($,N)),_(2,()=>{z(),O.emit()}))},item:(B,$)=>(r.current.add(B),$&&(i.current.has($)?i.current.get($).add(B):i.current.set($,new Set([B]))),_(3,()=>{q(),z(),n.current.value||L(),O.emit()}),()=>{o.current.delete(B),r.current.delete(B),n.current.filtered.items.delete(B);let N=te();_(4,()=>{q(),N?.getAttribute("id")===B&&L(),O.emit()})}),group:B=>(i.current.has(B)||i.current.set(B,new Set),()=>{o.current.delete(B),i.current.delete(B)}),filter:()=>c.current.shouldFilter,label:u||e["aria-label"],getDisablePointerSelection:()=>c.current.disablePointerSelection,listId:v,inputId:b,labelId:E,listInnerRef:T}),[]);function P(B,$){var N,U;let J=(U=(N=c.current)==null?void 0:N.filter)!=null?U:Qge;return B?J(B,n.current.search,$):0}function z(){if(!n.current.search||c.current.shouldFilter===!1)return;let B=n.current.filtered.items,$=[];n.current.filtered.groups.forEach(U=>{let J=i.current.get(U),ne=0;J.forEach(se=>{let he=B.get(se);ne=Math.max(he,ne)}),$.push([U,ne])});let N=T.current;ee().sort((U,J)=>{var ne,se;let he=U.getAttribute("id"),Ee=J.getAttribute("id");return((ne=B.get(Ee))!=null?ne:0)-((se=B.get(he))!=null?se:0)}).forEach(U=>{let J=U.closest(CS);J?J.appendChild(U.parentElement===J?U:U.closest(`${CS} > *`)):N.appendChild(U.parentElement===N?U:U.closest(`${CS} > *`))}),$.sort((U,J)=>J[1]-U[1]).forEach(U=>{var J;let ne=(J=T.current)==null?void 0:J.querySelector(`${Cd}[${uu}="${encodeURIComponent(U[0])}"]`);ne?.parentElement.appendChild(ne)})}function L(){let B=ee().find(N=>N.getAttribute("aria-disabled")!=="true"),$=B?.getAttribute(uu);O.setState("value",$||void 0)}function q(){var B,$,N,U;if(!n.current.search||c.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let J=0;for(let ne of r.current){let se=($=(B=o.current.get(ne))==null?void 0:B.value)!=null?$:"",he=(U=(N=o.current.get(ne))==null?void 0:N.keywords)!=null?U:[],Ee=P(se,he);n.current.filtered.items.set(ne,Ee),Ee>0&&J++}for(let[ne,se]of i.current)for(let he of se)if(n.current.filtered.items.get(he)>0){n.current.filtered.groups.add(ne);break}n.current.filtered.count=J}function Z(){var B,$,N;let U=te();U&&(((B=U.parentElement)==null?void 0:B.firstChild)===U&&((N=($=U.closest(Cd))==null?void 0:$.querySelector(Xge))==null||N.scrollIntoView({block:"nearest"})),U.scrollIntoView({block:"nearest"}))}function te(){var B;return(B=T.current)==null?void 0:B.querySelector(`${dz}[aria-selected="true"]`)}function ee(){var B;return Array.from(((B=T.current)==null?void 0:B.querySelectorAll(P3))||[])}function G(B){let $=ee()[B];$&&O.setState("value",$.getAttribute(uu))}function H(B){var $;let N=te(),U=ee(),J=U.findIndex(se=>se===N),ne=U[J+B];($=c.current)!=null&&$.loop&&(ne=J+B<0?U[U.length-1]:J+B===U.length?U[0]:U[J+B]),ne&&O.setState("value",ne.getAttribute(uu))}function Y(B){let $=te(),N=$?.closest(Cd),U;for(;N&&!U;)N=B>0?aye(N,Cd):lye(N,Cd),U=N?.querySelector(P3);U?O.setState("value",U.getAttribute(uu)):H(B)}let oe=()=>G(ee().length-1),re=B=>{B.preventDefault(),B.metaKey?oe():B.altKey?Y(1):H(1)},I=B=>{B.preventDefault(),B.metaKey?G(0):B.altKey?Y(-1):H(-1)};return k.createElement(io.div,{ref:t,tabIndex:-1,...w,"cmdk-root":"",onKeyDown:B=>{var $;($=w.onKeyDown)==null||$.call(w,B);let N=B.nativeEvent.isComposing||B.keyCode===229;if(!(B.defaultPrevented||N))switch(B.key){case"n":case"j":{x&&B.ctrlKey&&re(B);break}case"ArrowDown":{re(B);break}case"p":case"k":{x&&B.ctrlKey&&I(B);break}case"ArrowUp":{I(B);break}case"Home":{B.preventDefault(),G(0);break}case"End":{B.preventDefault(),oe();break}case"Enter":{B.preventDefault();let U=te();if(U){let J=new Event(gx);U.dispatchEvent(J)}}}}},k.createElement("label",{"cmdk-label":"",htmlFor:M.inputId,id:M.labelId,style:fye},u),$0(e,B=>k.createElement(pz.Provider,{value:O},k.createElement(hz.Provider,{value:M},B))))}),Jge=k.forwardRef((e,t)=>{var n,r;let i=Ks(),o=k.useRef(null),l=k.useContext(mz),c=Jh(),u=yz(e),d=(r=(n=u.current)==null?void 0:n.forceMount)!=null?r:l?.forceMount;ic(()=>{if(!d)return c.item(i,l?.id)},[d]);let h=vz(i,o,[e.value,e.children,o],e.keywords),p=n2(),g=Za(_=>_.value&&_.value===h.current),S=Za(_=>d||c.filter()===!1?!0:_.search?_.filtered.items.get(i)>0:!0);k.useEffect(()=>{let _=o.current;if(!(!_||e.disabled))return _.addEventListener(gx,y),()=>_.removeEventListener(gx,y)},[S,e.onSelect,e.disabled]);function y(){var _,O;C(),(O=(_=u.current).onSelect)==null||O.call(_,h.current)}function C(){p.setState("value",h.current,!0)}if(!S)return null;let{disabled:x,value:w,onSelect:v,forceMount:E,keywords:b,...T}=e;return k.createElement(io.div,{ref:Ga(o,t),...T,id:i,"cmdk-item":"",role:"option","aria-disabled":!!x,"aria-selected":!!g,"data-disabled":!!x,"data-selected":!!g,onPointerMove:x||c.getDisablePointerSelection()?void 0:C,onClick:x?void 0:y},e.children)}),eye=k.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...o}=e,l=Ks(),c=k.useRef(null),u=k.useRef(null),d=Ks(),h=Jh(),p=Za(S=>i||h.filter()===!1?!0:S.search?S.filtered.groups.has(l):!0);ic(()=>h.group(l),[]),vz(l,c,[e.value,e.heading,u]);let g=k.useMemo(()=>({id:l,forceMount:i}),[i]);return k.createElement(io.div,{ref:Ga(c,t),...o,"cmdk-group":"",role:"presentation",hidden:p?void 0:!0},n&&k.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:d},n),$0(e,S=>k.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?d:void 0},k.createElement(mz.Provider,{value:g},S))))}),tye=k.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=k.useRef(null),o=Za(l=>!l.search);return!n&&!o?null:k.createElement(io.div,{ref:Ga(i,t),...r,"cmdk-separator":"",role:"separator"})}),nye=k.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,o=n2(),l=Za(d=>d.search),c=Za(d=>d.selectedItemId),u=Jh();return k.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),k.createElement(io.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:i?e.value:l,onChange:d=>{i||o.setState("search",d.target.value),n?.(d.target.value)}})}),rye=k.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...i}=e,o=k.useRef(null),l=k.useRef(null),c=Za(d=>d.selectedItemId),u=Jh();return k.useEffect(()=>{if(l.current&&o.current){let d=l.current,h=o.current,p,g=new ResizeObserver(()=>{p=requestAnimationFrame(()=>{let S=d.offsetHeight;h.style.setProperty("--cmdk-list-height",S.toFixed(1)+"px")})});return g.observe(d),()=>{cancelAnimationFrame(p),g.unobserve(d)}}},[]),k.createElement(io.div,{ref:Ga(o,t),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":c,"aria-label":r,id:u.listId},$0(e,d=>k.createElement("div",{ref:Ga(l,u.listInnerRef),"cmdk-list-sizer":""},d)))}),iye=k.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:o,container:l,...c}=e;return k.createElement(Gge,{open:n,onOpenChange:r},k.createElement(Zge,{container:l},k.createElement(Yge,{"cmdk-overlay":"",className:i}),k.createElement(Wge,{"aria-label":e.label,"cmdk-dialog":"",className:o},k.createElement(gz,{ref:t,...c}))))}),sye=k.forwardRef((e,t)=>Za(n=>n.filtered.count===0)?k.createElement(io.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),oye=k.forwardRef((e,t)=>{let{progress:n,children:r,label:i="Loading...",...o}=e;return k.createElement(io.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},$0(e,l=>k.createElement("div",{"aria-hidden":!0},l)))}),vc=Object.assign(gz,{List:rye,Item:Jge,Input:nye,Group:eye,Separator:tye,Dialog:iye,Empty:sye,Loading:oye});function aye(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function lye(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function yz(e){let t=k.useRef(e);return ic(()=>{t.current=e}),t}var ic=typeof window>"u"?k.useEffect:k.useLayoutEffect;function fu(e){let t=k.useRef();return t.current===void 0&&(t.current=e()),t}function Za(e){let t=n2(),n=()=>e(t.snapshot());return k.useSyncExternalStore(t.subscribe,n,n)}function vz(e,t,n,r=[]){let i=k.useRef(),o=Jh();return ic(()=>{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():i.current}})(),u=r.map(d=>d.trim());o.value(e,c,u),(l=t.current)==null||l.setAttribute(uu,c),i.current=c}),i}var cye=()=>{let[e,t]=k.useState(),n=fu(()=>new Map);return ic(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,i)=>{n.current.set(r,i),t({})}};function uye(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function $0({asChild:e,children:t},n){return e&&k.isValidElement(t)?k.cloneElement(uye(t),{ref:t.ref},n(t.props.children)):n(t)}var fye={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const dye=el("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 hye({className:e,variant:t,asChild:n=!1,...r}){const i=n?B$:"span";return j.jsx(i,{"data-slot":"badge",className:Pt(dye({variant:t}),e),...r})}const bz=k.forwardRef(({className:e,...t},n)=>j.jsx(vc,{ref:n,"data-slot":"command",className:Pt("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t})),pye=k.forwardRef(({className:e,...t},n)=>j.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[j.jsx(uhe,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),j.jsx(vc.Input,{ref:n,className:Pt("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})]}));pye.displayName=vc.Input.displayName;function Sz({className:e,...t}){return j.jsx(vc.List,{"data-slot":"command-list",className:Pt("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}function wz({className:e,...t}){return j.jsx(vc.Group,{"data-slot":"command-group",className:Pt("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 xz({className:e,...t}){return j.jsx(vc.Item,{"data-slot":"command-item",className:Pt("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 mye({multiple:e,items:t=[],selected:n,onValueChange:r,autoFocus:i=!1,disabled:o=!1,ariaDescribedby:l,ariaPlaceholder:c,onFocus:u,onBlur:d,className:h,id:p}){const g=k.useRef(null),[S,y]=k.useState(!1),[C,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]),E=k.useCallback(O=>{if(o)return;const M=w.filter(P=>!ka(P.value,O.value));r?.(M.map(P=>P.index))},[w,r,o]),b=k.useCallback(O=>{if(!(o||!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,o]),T=k.useCallback(O=>{if(o)return;x("");const M=e?[...w,O]:[O];r?.(M.map(P=>P.index))},[e,w,r,o]),_=k.useCallback(O=>{o||y(!0),u?.(O)},[o,u]);return j.jsxs(bz,{onKeyDown:b,className:Pt("overflow-visible bg-transparent",h),autoFocus:i,"aria-disabled":o,onBlur:d,onFocus:_,"aria-describedby":l,"aria-placeholder":c,children:[j.jsx("div",{className:Pt("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",o&&"opacity-50 cursor-not-allowed"),children:j.jsxs("div",{className:"flex gap-1 flex-wrap",children:[w.map(O=>j.jsxs(hye,{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"&&!o&&E(O),onMouseDown:M=>{M.preventDefault(),M.stopPropagation()},onClick:()=>E(O),disabled:o,children:j.jsx(phe,{className:Pt("h-3 w-3 text-muted-foreground hover:text-foreground",o&&"pointer-events-none")})})]},O.value)),j.jsx(vc.Input,{ref:g,value:C,onValueChange:x,onBlur:()=>y(!1),onFocus:()=>!o&&y(!0),placeholder:"Select ...",className:"rtl:mr-2 ltr:ml-2 bg-transparent outline-none placeholder:text-muted-foreground flex-1",disabled:o,"aria-controls":`command-item-input-${p}`,"aria-labelledby":`command-item-input-${p}`,id:`command-item-input-${p}`})]})}),S&&!o&&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(wz,{className:"h-full overflow-auto",children:j.jsx(Sz,{children:v.map(O=>j.jsx(xz,{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 gye({items:e,selected:t,onValueChange:n,autoFocus:r=!1,disabled:i=!1,required:o=!1,placeholder:l="Select...",ariaDescribedby:c,ariaPlaceholder:u,onFocus:d,onBlur:h,className:p}){const[g,S]=k.useState(!1),y=e?.find(v=>v.value===t),C=k.useRef(null),x=k.useRef(null);k.useEffect(()=>{g&&C.current&&requestAnimationFrame(()=>{var v;(v=C.current)===null||v===void 0||v.scrollIntoView({block:"nearest"})})},[g]);const w=v=>{x.current&&!x.current.contains(v.relatedTarget)&&S(!1),h?.(v)};return j.jsxs(bz,{ref:x,className:Pt("overflow-visible bg-transparent",p),autoFocus:r,"aria-disabled":i,onBlur:w,onFocus:d,"aria-describedby":c,"aria-placeholder":u,children:[j.jsxs("div",{onClick:()=>!i&&S(!g),className:Pt("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&&o&&"border-red-500",i&&"opacity-50 cursor-not-allowed",p),children:[j.jsx("span",{className:Pt("flex-1 line-clamp-1",!y&&"text-muted-foreground"),children:y?.label||l}),j.jsx(F$,{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(wz,{className:"h-full overflow-auto",children:j.jsx(Sz,{children:e.map(v=>j.jsxs(xz,{ref:v.value===t?C:void 0,onMouseDown:E=>{E.preventDefault(),E.stopPropagation()},onSelect:()=>{v.disabled||(n?.(v.value),S(!1))},className:Pt("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(Qde,{className:"h-4 w-4"})})]},v.value))})})}):null})]})}function yye({id:e,options:t,required:n,disabled:r,readonly:i,value:o,multiple:l,autofocus:c,onChange:u,onBlur:d,onFocus:h,defaultValue:p,placeholder:g,rawErrors:S=[],className:y}){const{enumOptions:C,enumDisabled:x,emptyValue:w}=t,v=()=>{h(e,Rr(o,C,w))},E=()=>{d(e,Rr(o,C,w))},b=C?.map(({value:_,label:O},M)=>({value:l?_:M.toString(),label:O,index:M,disabled:Array.isArray(x)&&x.includes(_)})),T=Pt({"border-destructive":S.length>0},y);return j.jsx("div",{className:"p-0.5",children:l?j.jsx(mye,{id:e,autoFocus:c,disabled:r||i,multiple:!0,className:T,items:b,selected:o,onValueChange:_=>{u(Rr(_,C,w))},onFocus:v,onBlur:E}):j.jsx(gye,{items:b,selected:h$(o??p,C,!1),onValueChange:_=>{u(Rr(_,C,w))},autoFocus:c,disabled:r||i,required:n,placeholder:g,className:T,onFocus:v,onBlur:E,ariaDescribedby:vi(e)})})}function vye({className:e,...t}){return j.jsx("textarea",{"data-slot":"textarea",className:Pt("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 bye({id:e,htmlName:t,placeholder:n,value:r,required:i,disabled:o,autofocus:l,readonly:c,onBlur:u,onFocus:d,onChange:h,options:p,className:g}){const S=({target:{value:x}})=>h(x===""?p.emptyValue:x),y=({target:x})=>u(e,x&&x.value),C=({target:x})=>d(e,x&&x.value);return j.jsx("div",{className:"flex p-0.5",children:j.jsx(vye,{id:e,name:t||e,placeholder:n,disabled:o,readOnly:c,value:r??"",required:i,autoFocus:l,rows:p.rows||5,onChange:S,onBlur:y,onFocus:C,"aria-describedby":vi(e),className:g})})}function Sye(){return{CheckboxWidget:_pe,CheckboxesWidget:Epe,RadioWidget:eme,RangeWidget:xme,SelectWidget:yye,TextareaWidget:bye}}function wye(){return{templates:Qhe(),widgets:Sye()}}function xye(){return jde(wye())}const _ye=xye();function Eye({className:e,size:t="default",...n}){return j.jsx("div",{"data-slot":"card","data-size":t,className:cn("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 Cye({className:e,...t}){return j.jsx("div",{"data-slot":"card-content",className:cn("px-4 group-data-[size=sm]/card:px-3",e),...t})}const Tye=({validateForm:e,formData:t})=>{const n=dc(),{mutateAsync:r,isPending:i}=_ne(),o=async()=>{e&&!await e()||t&&await r({toolName:n.name,args:t})};return ZU("Enter",o),j.jsx("div",{className:"flex flex-col items-end gap-1",children:j.jsxs(lh,{onClick:o,variant:"default",disabled:i,children:[i?j.jsx(Fne,{className:"h-4 w-4 animate-spin"}):j.jsx(Bne,{className:"h-4 w-4"}),"Call Tool"]})})},Rye={"ui:submitButtonOptions":{norender:!0}},Oye=({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(Eye,{children:j.jsx(Cye,{children:j.jsx(_ye,{ref:r,schema:e??{},validator:Hde,uiSchema:Rye,formData:t,onChange:o=>n(o.formData),showErrorList:!1,templates:{FieldTemplate:o=>{const{id:l,classNames:c,style:u,label:d,required:h,errors:p,children:g}=o;return j.jsxs("div",{className:cn("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:o=>o.errors&&o.errors.length>0?j.jsx("div",{className:"text-sm text-destructive mt-1 flex items-center gap-1",children:j.jsx("span",{children:o.errors.join(", ")})}):null}})})}),Aye=()=>{const e=k.useRef(null),t=dc(),{setToolData:n}=df(),i=hf(t.name)?.input??{},o=l=>{n(t.name,{input:l??{}})};return j.jsxs("div",{className:cn("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(Tye,{validateForm:async()=>e.current===null?!0:await e.current.validateForm(),formData:i})})]}),j.jsx("div",{className:"flex-1 overflow-auto px-6 py-6 bg-muted/50",children:j.jsx(Oye,{schema:t.inputSchema,formData:i,setFormData:o,ref:e},t.name)})]})};var Gg={exports:{}},kye=Gg.exports,N3;function Mye(){return N3||(N3=1,(function(e,t){(function(n,r){e.exports=r(sf())})(kye,(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 S=d(294);u.ashes=h(S);var y=d(1733);u.atelierDune=h(y);var C=d(8974);u.atelierForest=h(C);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 E=d(1233);u.bespin=h(E);var b=d(2847);u.brewer=h(b);var T=d(8120);u.bright=h(T);var _=d(6305);u.chalk=h(_);var O=d(525);u.codeschool=h(O);var M=d(4124);u.colors=h(M);var P=d(7167);u.default=h(P);var z=d(4582);u.eighties=h(z);var L=d(7096);u.embers=h(L);var q=d(9887);u.flat=h(q);var Z=d(7199);u.google=h(Z);var te=d(1985);u.grayscale=h(te);var ee=d(8093);u.greenscreen=h(ee);var G=d(1615);u.harmonic=h(G);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 re=d(9600);u.mocha=h(re);var I=d(1240);u.monokai=h(I);var B=d(9768);u.ocean=h(B);var $=d(8293);u.paraiso=h($);var N=d(3093);u.pop=h(N);var U=d(1951);u.railscasts=h(U);var J=d(6368);u.shapeshifter=h(J);var ne=d(2317);u.solarized=h(ne);var se=d(1091);u.summerfruit=h(se);var he=d(6943);u.tomorrow=h(he);var Ee=d(5670);u.tube=h(Ee);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 S=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 S)if(S.hasOwnProperty(y)){if(!("channels"in S[y]))throw new Error("missing channels property: "+y);if(!("labels"in S[y]))throw new Error("missing channel labels property: "+y);if(S[y].labels.length!==S[y].channels)throw new Error("channel and label counts mismatch: "+y);var C=S[y].channels,x=S[y].labels;delete S[y].channels,delete S[y].labels,Object.defineProperty(S[y],"channels",{value:C}),Object.defineProperty(S[y],"labels",{value:x})}S.rgb.hsl=function(w){var v,E,b=w[0]/255,T=w[1]/255,_=w[2]/255,O=Math.min(b,T,_),M=Math.max(b,T,_),P=M-O;return M===O?v=0:b===M?v=(T-_)/P:T===M?v=2+(_-b)/P:_===M&&(v=4+(b-T)/P),(v=Math.min(60*v,360))<0&&(v+=360),E=(O+M)/2,[v,100*(M===O?0:E<=.5?P/(M+O):P/(2-M-O)),100*E]},S.rgb.hsv=function(w){var v,E,b,T,_,O=w[0]/255,M=w[1]/255,P=w[2]/255,z=Math.max(O,M,P),L=z-Math.min(O,M,P),q=function(Z){return(z-Z)/6/L+.5};return L===0?T=_=0:(_=L/z,v=q(O),E=q(M),b=q(P),O===z?T=b-E:M===z?T=.3333333333333333+v-b:P===z&&(T=.6666666666666666+E-v),T<0?T+=1:T>1&&(T-=1)),[360*T,100*_,100*z]},S.rgb.hwb=function(w){var v=w[0],E=w[1],b=w[2];return[S.rgb.hsl(w)[0],100*(.00392156862745098*Math.min(v,Math.min(E,b))),100*(b=1-.00392156862745098*Math.max(v,Math.max(E,b)))]},S.rgb.cmyk=function(w){var v,E=w[0]/255,b=w[1]/255,T=w[2]/255;return[100*((1-E-(v=Math.min(1-E,1-b,1-T)))/(1-v)||0),100*((1-b-v)/(1-v)||0),100*((1-T-v)/(1-v)||0),100*v]},S.rgb.keyword=function(w){var v=p[w];if(v)return v;var E,b,T,_=1/0;for(var O in h)if(h.hasOwnProperty(O)){var M=h[O],P=(b=w,T=M,Math.pow(b[0]-T[0],2)+Math.pow(b[1]-T[1],2)+Math.pow(b[2]-T[2],2));P<_&&(_=P,E=O)}return E},S.keyword.rgb=function(w){return h[w]},S.rgb.xyz=function(w){var v=w[0]/255,E=w[1]/255,b=w[2]/255;return[100*(.4124*(v=v>.04045?Math.pow((v+.055)/1.055,2.4):v/12.92)+.3576*(E=E>.04045?Math.pow((E+.055)/1.055,2.4):E/12.92)+.1805*(b=b>.04045?Math.pow((b+.055)/1.055,2.4):b/12.92)),100*(.2126*v+.7152*E+.0722*b),100*(.0193*v+.1192*E+.9505*b)]},S.rgb.lab=function(w){var v=S.rgb.xyz(w),E=v[0],b=v[1],T=v[2];return b/=100,T/=108.883,E=(E/=95.047)>.008856?Math.pow(E,.3333333333333333):7.787*E+.13793103448275862,[116*(b=b>.008856?Math.pow(b,.3333333333333333):7.787*b+.13793103448275862)-16,500*(E-b),200*(b-(T=T>.008856?Math.pow(T,.3333333333333333):7.787*T+.13793103448275862))]},S.hsl.rgb=function(w){var v,E,b,T,_,O=w[0]/360,M=w[1]/100,P=w[2]/100;if(M===0)return[_=255*P,_,_];v=2*P-(E=P<.5?P*(1+M):P+M-P*M),T=[0,0,0];for(var z=0;z<3;z++)(b=O+.3333333333333333*-(z-1))<0&&b++,b>1&&b--,_=6*b<1?v+6*(E-v)*b:2*b<1?E:3*b<2?v+(E-v)*(.6666666666666666-b)*6:v,T[z]=255*_;return T},S.hsl.hsv=function(w){var v=w[0],E=w[1]/100,b=w[2]/100,T=E,_=Math.max(b,.01);return E*=(b*=2)<=1?b:2-b,T*=_<=1?_:2-_,[v,100*(b===0?2*T/(_+T):2*E/(b+E)),100*((b+E)/2)]},S.hsv.rgb=function(w){var v=w[0]/60,E=w[1]/100,b=w[2]/100,T=Math.floor(v)%6,_=v-Math.floor(v),O=255*b*(1-E),M=255*b*(1-E*_),P=255*b*(1-E*(1-_));switch(b*=255,T){case 0:return[b,P,O];case 1:return[M,b,O];case 2:return[O,b,P];case 3:return[O,M,b];case 4:return[P,O,b];case 5:return[b,O,M]}},S.hsv.hsl=function(w){var v,E,b,T=w[0],_=w[1]/100,O=w[2]/100,M=Math.max(O,.01);return b=(2-_)*O,E=_*M,[T,100*(E=(E/=(v=(2-_)*M)<=1?v:2-v)||0),100*(b/=2)]},S.hwb.rgb=function(w){var v,E,b,T,_,O,M,P=w[0]/360,z=w[1]/100,L=w[2]/100,q=z+L;switch(q>1&&(z/=q,L/=q),b=6*P-(v=Math.floor(6*P)),1&v&&(b=1-b),T=z+b*((E=1-L)-z),v){default:case 6:case 0:_=E,O=T,M=z;break;case 1:_=T,O=E,M=z;break;case 2:_=z,O=E,M=T;break;case 3:_=z,O=T,M=E;break;case 4:_=T,O=z,M=E;break;case 5:_=E,O=z,M=T}return[255*_,255*O,255*M]},S.cmyk.rgb=function(w){var v=w[0]/100,E=w[1]/100,b=w[2]/100,T=w[3]/100;return[255*(1-Math.min(1,v*(1-T)+T)),255*(1-Math.min(1,E*(1-T)+T)),255*(1-Math.min(1,b*(1-T)+T))]},S.xyz.rgb=function(w){var v,E,b,T=w[0]/100,_=w[1]/100,O=w[2]/100;return E=-.9689*T+1.8758*_+.0415*O,b=.0557*T+-.204*_+1.057*O,v=(v=3.2406*T+-1.5372*_+-.4986*O)>.0031308?1.055*Math.pow(v,.4166666666666667)-.055:12.92*v,E=E>.0031308?1.055*Math.pow(E,.4166666666666667)-.055:12.92*E,b=b>.0031308?1.055*Math.pow(b,.4166666666666667)-.055:12.92*b,[255*(v=Math.min(Math.max(0,v),1)),255*(E=Math.min(Math.max(0,E),1)),255*(b=Math.min(Math.max(0,b),1))]},S.xyz.lab=function(w){var v=w[0],E=w[1],b=w[2];return E/=100,b/=108.883,v=(v/=95.047)>.008856?Math.pow(v,.3333333333333333):7.787*v+.13793103448275862,[116*(E=E>.008856?Math.pow(E,.3333333333333333):7.787*E+.13793103448275862)-16,500*(v-E),200*(E-(b=b>.008856?Math.pow(b,.3333333333333333):7.787*b+.13793103448275862))]},S.lab.xyz=function(w){var v,E,b,T=w[0];v=w[1]/500+(E=(T+16)/116),b=E-w[2]/200;var _=Math.pow(E,3),O=Math.pow(v,3),M=Math.pow(b,3);return E=_>.008856?_:(E-.13793103448275862)/7.787,v=O>.008856?O:(v-.13793103448275862)/7.787,b=M>.008856?M:(b-.13793103448275862)/7.787,[v*=95.047,E*=100,b*=108.883]},S.lab.lch=function(w){var v,E=w[0],b=w[1],T=w[2];return(v=360*Math.atan2(T,b)/2/Math.PI)<0&&(v+=360),[E,Math.sqrt(b*b+T*T),v]},S.lch.lab=function(w){var v,E=w[0],b=w[1];return v=w[2]/360*2*Math.PI,[E,b*Math.cos(v),b*Math.sin(v)]},S.rgb.ansi16=function(w){var v=w[0],E=w[1],b=w[2],T=1 in arguments?arguments[1]:S.rgb.hsv(w)[2];if((T=Math.round(T/50))===0)return 30;var _=30+(Math.round(b/255)<<2|Math.round(E/255)<<1|Math.round(v/255));return T===2&&(_+=60),_},S.hsv.ansi16=function(w){return S.rgb.ansi16(S.hsv.rgb(w),w[2])},S.rgb.ansi256=function(w){var v=w[0],E=w[1],b=w[2];return v===E&&E===b?v<8?16:v>248?231:Math.round((v-8)/247*24)+232:16+36*Math.round(v/255*5)+6*Math.round(E/255*5)+Math.round(b/255*5)},S.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 E=.5*(1+~~(w>50));return[(1&v)*E*255,(v>>1&1)*E*255,(v>>2&1)*E*255]},S.ansi256.rgb=function(w){if(w>=232){var v=10*(w-232)+8;return[v,v,v]}var E;return w-=16,[Math.floor(w/36)/5*255,Math.floor((E=w%36)/6)/5*255,E%6/5*255]},S.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},S.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 E=v[0];v[0].length===3&&(E=E.split("").map((function(T){return T+T})).join(""));var b=parseInt(E,16);return[b>>16&255,b>>8&255,255&b]},S.rgb.hcg=function(w){var v,E=w[0]/255,b=w[1]/255,T=w[2]/255,_=Math.max(Math.max(E,b),T),O=Math.min(Math.min(E,b),T),M=_-O;return v=M<=0?0:_===E?(b-T)/M%6:_===b?2+(T-E)/M:4+(E-b)/M+4,v/=6,[360*(v%=1),100*M,100*(M<1?O/(1-M):0)]},S.hsl.hcg=function(w){var v=w[1]/100,E=w[2]/100,b=1,T=0;return(b=E<.5?2*v*E:2*v*(1-E))<1&&(T=(E-.5*b)/(1-b)),[w[0],100*b,100*T]},S.hsv.hcg=function(w){var v=w[1]/100,E=w[2]/100,b=v*E,T=0;return b<1&&(T=(E-b)/(1-b)),[w[0],100*b,100*T]},S.hcg.rgb=function(w){var v=w[0]/360,E=w[1]/100,b=w[2]/100;if(E===0)return[255*b,255*b,255*b];var T,_=[0,0,0],O=v%1*6,M=O%1,P=1-M;switch(Math.floor(O)){case 0:_[0]=1,_[1]=M,_[2]=0;break;case 1:_[0]=P,_[1]=1,_[2]=0;break;case 2:_[0]=0,_[1]=1,_[2]=M;break;case 3:_[0]=0,_[1]=P,_[2]=1;break;case 4:_[0]=M,_[1]=0,_[2]=1;break;default:_[0]=1,_[1]=0,_[2]=P}return T=(1-E)*b,[255*(E*_[0]+T),255*(E*_[1]+T),255*(E*_[2]+T)]},S.hcg.hsv=function(w){var v=w[1]/100,E=v+w[2]/100*(1-v),b=0;return E>0&&(b=v/E),[w[0],100*b,100*E]},S.hcg.hsl=function(w){var v=w[1]/100,E=w[2]/100*(1-v)+.5*v,b=0;return E>0&&E<.5?b=v/(2*E):E>=.5&&E<1&&(b=v/(2*(1-E))),[w[0],100*b,100*E]},S.hcg.hwb=function(w){var v=w[1]/100,E=v+w[2]/100*(1-v);return[w[0],100*(E-v),100*(1-E)]},S.hwb.hcg=function(w){var v=w[1]/100,E=1-w[2]/100,b=E-v,T=0;return b<1&&(T=(E-b)/(1-b)),[w[0],100*b,100*T]},S.apple.rgb=function(w){return[w[0]/65535*255,w[1]/65535*255,w[2]/65535*255]},S.rgb.apple=function(w){return[w[0]/255*65535,w[1]/255*65535,w[2]/255*65535]},S.gray.rgb=function(w){return[w[0]/100*255,w[0]/100*255,w[0]/100*255]},S.gray.hsl=S.gray.hsv=function(w){return[0,0,w[0]]},S.gray.hwb=function(w){return[0,100,w[0]]},S.gray.cmyk=function(w){return[0,0,0,w[0]]},S.gray.lab=function(w){return[w[0],0,0]},S.gray.hex=function(w){var v=255&Math.round(w[0]/100*255),E=((v<<16)+(v<<8)+v).toString(16).toUpperCase();return"000000".substring(E.length)+E},S.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(S){g[S]={},Object.defineProperty(g[S],"channels",{value:h[S].channels}),Object.defineProperty(g[S],"labels",{value:h[S].labels});var y=p(S);Object.keys(y).forEach((function(C){var x=y[C];g[S][C]=(function(w){var v=function(E){if(E==null)return E;arguments.length>1&&(E=Array.prototype.slice.call(arguments));var b=w(E);if(typeof b=="object")for(var T=b.length,_=0;_<T;_++)b[_]=Math.round(b[_]);return b};return"conversion"in w&&(v.conversion=w.conversion),v})(x),g[S][C].raw=(function(w){var v=function(E){return E==null?E:(arguments.length>1&&(E=Array.prototype.slice.call(arguments)),w(E))};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 C=(function(){for(var O={},M=Object.keys(h),P=M.length,z=0;z<P;z++)O[M[z]]={distance:-1,parent:null};return O})(),x=[y];for(C[y].distance=0;x.length;)for(var w=x.pop(),v=Object.keys(h[w]),E=v.length,b=0;b<E;b++){var T=v[b],_=C[T];_.distance===-1&&(_.distance=C[w].distance+1,_.parent=w,x.unshift(T))}return C}function g(y,C){return function(x){return C(y(x))}}function S(y,C){for(var x=[C[y].parent,y],w=h[C[y].parent][y],v=C[y].parent;C[v].parent;)x.unshift(C[v].parent),w=g(h[C[v].parent][v],w),v=C[v].parent;return w.conversion=x,w}c.exports=function(y){for(var C=p(y),x={},w=Object.keys(C),v=w.length,E=0;E<v;E++){var b=w[E];C[b].parent!==null&&(x[b]=S(b,C))}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,S=Object.create(null);for(var y in h)g.call(h,y)&&(S[h[y]]=y);var C=c.exports={to:{},get:{}};function x(v,E,b){return Math.min(Math.max(E,v),b)}function w(v){var E=Math.round(v).toString(16).toUpperCase();return E.length<2?"0"+E:E}C.get=function(v){var E,b;switch(v.substring(0,3).toLowerCase()){case"hsl":E=C.get.hsl(v),b="hsl";break;case"hwb":E=C.get.hwb(v),b="hwb";break;default:E=C.get.rgb(v),b="rgb"}return E?{model:b,value:E}:null},C.get.rgb=function(v){if(!v)return null;var E,b,T,_=[0,0,0,1];if(E=v.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(T=E[2],E=E[1],b=0;b<3;b++){var O=2*b;_[b]=parseInt(E.slice(O,O+2),16)}T&&(_[3]=parseInt(T,16)/255)}else if(E=v.match(/^#([a-f0-9]{3,4})$/i)){for(T=(E=E[1])[3],b=0;b<3;b++)_[b]=parseInt(E[b]+E[b],16);T&&(_[3]=parseInt(T+T,16)/255)}else if(E=v.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(b=0;b<3;b++)_[b]=parseInt(E[b+1],0);E[4]&&(E[5]?_[3]=.01*parseFloat(E[4]):_[3]=parseFloat(E[4]))}else{if(!(E=v.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(E=v.match(/^(\w+)$/))?E[1]==="transparent"?[0,0,0,0]:g.call(h,E[1])?((_=h[E[1]])[3]=1,_):null:null;for(b=0;b<3;b++)_[b]=Math.round(2.55*parseFloat(E[b+1]));E[4]&&(E[5]?_[3]=.01*parseFloat(E[4]):_[3]=parseFloat(E[4]))}for(b=0;b<3;b++)_[b]=x(_[b],0,255);return _[3]=x(_[3],0,1),_},C.get.hsl=function(v){if(!v)return null;var E=v.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(E){var b=parseFloat(E[4]);return[(parseFloat(E[1])%360+360)%360,x(parseFloat(E[2]),0,100),x(parseFloat(E[3]),0,100),x(isNaN(b)?1:b,0,1)]}return null},C.get.hwb=function(v){if(!v)return null;var E=v.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(E){var b=parseFloat(E[4]);return[(parseFloat(E[1])%360+360)%360,x(parseFloat(E[2]),0,100),x(parseFloat(E[3]),0,100),x(isNaN(b)?1:b,0,1)]}return null},C.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])):"")},C.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]+")"},C.to.rgb.percent=function(){var v=p(arguments),E=Math.round(v[0]/255*100),b=Math.round(v[1]/255*100),T=Math.round(v[2]/255*100);return v.length<4||v[3]===1?"rgb("+E+"%, "+b+"%, "+T+"%)":"rgba("+E+"%, "+b+"%, "+T+"%, "+v[3]+")"},C.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]+")"},C.to.hwb=function(){var v=p(arguments),E="";return v.length>=4&&v[3]!==1&&(E=", "+v[3]),"hwb("+v[0]+", "+v[1]+"%, "+v[2]+"%"+E+")"},C.to.keyword=function(v){return S[v.slice(0,3)]}},3639:(c,u,d)=>{var h=d(6138),p=d(4732),g=[].slice,S=["keyword","gray","hex"],y={};Object.keys(p).forEach((function(b){y[g.call(p[b].labels).sort().join("")]=b}));var C={};function x(b,T){if(!(this instanceof x))return new x(b,T);if(T&&T in S&&(T=null),T&&!(T in p))throw new Error("Unknown model: "+T);var _,O;if(b==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(b instanceof x)this.model=b.model,this.color=b.color.slice(),this.valpha=b.valpha;else if(typeof b=="string"){var M=h.get(b);if(M===null)throw new Error("Unable to parse color from string: "+b);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(b.length){this.model=T||"rgb",O=p[this.model].channels;var P=g.call(b,0,O);this.color=E(P,O),this.valpha=typeof b[O]=="number"?b[O]:1}else if(typeof b=="number")b&=16777215,this.model="rgb",this.color=[b>>16&255,b>>8&255,255&b],this.valpha=1;else{this.valpha=1;var z=Object.keys(b);"alpha"in b&&(z.splice(z.indexOf("alpha"),1),this.valpha=typeof b.alpha=="number"?b.alpha:0);var L=z.sort().join("");if(!(L in y))throw new Error("Unable to parse color from object: "+JSON.stringify(b));this.model=y[L];var q=p[this.model].labels,Z=[];for(_=0;_<q.length;_++)Z.push(b[q[_]]);this.color=E(Z)}if(C[this.model])for(O=p[this.model].channels,_=0;_<O;_++){var te=C[this.model][_];te&&(this.color[_]=te(this.color[_]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}function w(b,T,_){return(b=Array.isArray(b)?b:[b]).forEach((function(O){(C[O]||(C[O]=[]))[T]=_})),b=b[0],function(O){var M;return arguments.length?(_&&(O=_(O)),(M=this[b]()).color[T]=O,M):(M=this[b]().color[T],_&&(M=_(M)),M)}}function v(b){return function(T){return Math.max(0,Math.min(b,T))}}function E(b,T){for(var _=0;_<T;_++)typeof b[_]!="number"&&(b[_]=0);return b}x.prototype={toString:function(){return this.string()},toJSON:function(){return this[this.model]()},string:function(b){var T=this.model in h.to?this:this.rgb(),_=(T=T.round(typeof b=="number"?b:1)).valpha===1?T.color:T.color.concat(this.valpha);return h.to[T.model](_)},percentString:function(b){var T=this.rgb().round(typeof b=="number"?b:1),_=T.valpha===1?T.color:T.color.concat(this.valpha);return h.to.rgb.percent(_)},array:function(){return this.valpha===1?this.color.slice():this.color.concat(this.valpha)},object:function(){for(var b={},T=p[this.model].channels,_=p[this.model].labels,O=0;O<T;O++)b[_[O]]=this.color[O];return this.valpha!==1&&(b.alpha=this.valpha),b},unitArray:function(){var b=this.rgb().color;return b[0]/=255,b[1]/=255,b[2]/=255,this.valpha!==1&&b.push(this.valpha),b},unitObject:function(){var b=this.rgb().object();return b.r/=255,b.g/=255,b.b/=255,this.valpha!==1&&(b.alpha=this.valpha),b},round:function(b){return b=Math.max(b||0,0),new x(this.color.map((function(T){return function(_){return(function(O,M){return Number(O.toFixed(M))})(_,T)}})(b)).concat(this.valpha),this.model)},alpha:function(b){return arguments.length?new x(this.color.concat(Math.max(0,Math.min(1,b))),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(b){return(b%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(b){return arguments.length?new x(b):p[this.model].keyword(this.color)},hex:function(b){return arguments.length?new x(b):h.to.hex(this.rgb().round().color)},rgbNumber:function(){var b=this.rgb().color;return(255&b[0])<<16|(255&b[1])<<8|255&b[2]},luminosity:function(){for(var b=this.rgb().color,T=[],_=0;_<b.length;_++){var O=b[_]/255;T[_]=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(b){var T=this.luminosity(),_=b.luminosity();return T>_?(T+.05)/(_+.05):(_+.05)/(T+.05)},level:function(b){var T=this.contrast(b);return T>=7.1?"AAA":T>=4.5?"AA":""},isDark:function(){var b=this.rgb().color;return(299*b[0]+587*b[1]+114*b[2])/1e3<128},isLight:function(){return!this.isDark()},negate:function(){for(var b=this.rgb(),T=0;T<3;T++)b.color[T]=255-b.color[T];return b},lighten:function(b){var T=this.hsl();return T.color[2]+=T.color[2]*b,T},darken:function(b){var T=this.hsl();return T.color[2]-=T.color[2]*b,T},saturate:function(b){var T=this.hsl();return T.color[1]+=T.color[1]*b,T},desaturate:function(b){var T=this.hsl();return T.color[1]-=T.color[1]*b,T},whiten:function(b){var T=this.hwb();return T.color[1]+=T.color[1]*b,T},blacken:function(b){var T=this.hwb();return T.color[2]+=T.color[2]*b,T},grayscale:function(){var b=this.rgb().color,T=.3*b[0]+.59*b[1]+.11*b[2];return x.rgb(T,T,T)},fade:function(b){return this.alpha(this.valpha-this.valpha*b)},opaquer:function(b){return this.alpha(this.valpha+this.valpha*b)},rotate:function(b){var T=this.hsl(),_=T.color[0];return _=(_=(_+b)%360)<0?360+_:_,T.color[0]=_,T},mix:function(b,T){if(!b||!b.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof b);var _=b.rgb(),O=this.rgb(),M=T===void 0?.5:T,P=2*M-1,z=_.alpha()-O.alpha(),L=((P*z==-1?P:(P+z)/(1+P*z))+1)/2,q=1-L;return x.rgb(L*_.red()+q*O.red(),L*_.green()+q*O.green(),L*_.blue()+q*O.blue(),_.alpha()*M+O.alpha()*(1-M))}},Object.keys(p).forEach((function(b){if(S.indexOf(b)===-1){var T=p[b].channels;x.prototype[b]=function(){if(this.model===b)return new x(this);if(arguments.length)return new x(arguments,b);var _,O=typeof arguments[T]=="number"?T:this.valpha;return new x((_=p[this.model][b].raw(this.color),Array.isArray(_)?_:[_]).concat(O),b)},x[b]=function(_){return typeof _=="number"&&(_=E(g.call(arguments),T)),new x(_,b)}}})),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,z){function L(Z){O.removeListener(M,q),z(Z)}function q(){typeof O.removeListener=="function"&&O.removeListener("error",L),P([].slice.call(arguments))}_(O,M,q,{once:!0}),M!=="error"&&(function(Z,te,ee){typeof Z.on=="function"&&_(Z,"error",te,ee)})(O,L,{once:!0})}))},g.EventEmitter=g,g.prototype._events=void 0,g.prototype._eventsCount=0,g.prototype._maxListeners=void 0;var S=10;function y(O){if(typeof O!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof O)}function C(O){return O._maxListeners===void 0?g.defaultMaxListeners:O._maxListeners}function x(O,M,P,z){var L,q,Z,te;if(y(P),(q=O._events)===void 0?(q=O._events=Object.create(null),O._eventsCount=0):(q.newListener!==void 0&&(O.emit("newListener",M,P.listener?P.listener:P),q=O._events),Z=q[M]),Z===void 0)Z=q[M]=P,++O._eventsCount;else if(typeof Z=="function"?Z=q[M]=z?[P,Z]:[Z,P]:z?Z.unshift(P):Z.push(P),(L=C(O))>0&&Z.length>L&&!Z.warned){Z.warned=!0;var ee=new Error("Possible EventEmitter memory leak detected. "+Z.length+" "+String(M)+" listeners added. Use emitter.setMaxListeners() to increase limit");ee.name="MaxListenersExceededWarning",ee.emitter=O,ee.type=M,ee.count=Z.length,te=ee,console&&console.warn&&console.warn(te)}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 z={fired:!1,wrapFn:void 0,target:O,type:M,listener:P},L=w.bind(z);return L.listener=P,z.wrapFn=L,L}function E(O,M,P){var z=O._events;if(z===void 0)return[];var L=z[M];return L===void 0?[]:typeof L=="function"?P?[L.listener||L]:[L]:P?(function(q){for(var Z=new Array(q.length),te=0;te<Z.length;++te)Z[te]=q[te].listener||q[te];return Z})(L):T(L,L.length)}function b(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),z=0;z<M;++z)P[z]=O[z];return P}function _(O,M,P,z){if(typeof O.on=="function")z.once?O.once(M,P):O.on(M,P);else{if(typeof O.addEventListener!="function")throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof O);O.addEventListener(M,(function L(q){z.once&&O.removeEventListener(M,L),P(q)}))}}Object.defineProperty(g,"defaultMaxListeners",{enumerable:!0,get:function(){return S},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+".");S=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 C(this)},g.prototype.emit=function(O){for(var M=[],P=1;P<arguments.length;P++)M.push(arguments[P]);var z=O==="error",L=this._events;if(L!==void 0)z=z&&L.error===void 0;else if(!z)return!1;if(z){var q;if(M.length>0&&(q=M[0]),q instanceof Error)throw q;var Z=new Error("Unhandled error."+(q?" ("+q.message+")":""));throw Z.context=q,Z}var te=L[O];if(te===void 0)return!1;if(typeof te=="function")h(te,this,M);else{var ee=te.length,G=T(te,ee);for(P=0;P<ee;++P)h(G[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,z,L,q,Z;if(y(M),(z=this._events)===void 0)return this;if((P=z[O])===void 0)return this;if(P===M||P.listener===M)--this._eventsCount==0?this._events=Object.create(null):(delete z[O],z.removeListener&&this.emit("removeListener",O,P.listener||M));else if(typeof P!="function"){for(L=-1,q=P.length-1;q>=0;q--)if(P[q]===M||P[q].listener===M){Z=P[q].listener,L=q;break}if(L<0)return this;L===0?P.shift():(function(te,ee){for(;ee+1<te.length;ee++)te[ee]=te[ee+1];te.pop()})(P,L),P.length===1&&(z[O]=P[0]),z.removeListener!==void 0&&this.emit("removeListener",O,Z||M)}return this},g.prototype.off=g.prototype.removeListener,g.prototype.removeAllListeners=function(O){var M,P,z;if((P=this._events)===void 0)return this;if(P.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):P[O]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete P[O]),this;if(arguments.length===0){var L,q=Object.keys(P);for(z=0;z<q.length;++z)(L=q[z])!=="removeListener"&&this.removeAllListeners(L);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(M=P[O])=="function")this.removeListener(O,M);else if(M!==void 0)for(z=M.length-1;z>=0;z--)this.removeListener(O,M[z]);return this},g.prototype.listeners=function(O){return E(this,O,!0)},g.prototype.rawListeners=function(O){return E(this,O,!1)},g.listenerCount=function(O,M){return typeof O.listenerCount=="function"?O.listenerCount(M):b.call(O,M)},g.prototype.listenerCount=b,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]],S="[object Function]",y="[object GeneratorFunction]",C=/^\s+|\s+$/g,x=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,w=/\{\n\/\* \[wrapped with (.+)\] \*/,v=/,? & /,E=/^[-+]0x[0-9a-f]+$/i,b=/^0b[01]+$/i,T=/^\[object .+?Constructor\]$/,_=/^0o[0-7]+$/i,O=/^(?:0|[1-9]\d*)$/,M=parseInt,P=typeof hm=="object"&&hm&&hm.Object===Object&&hm,z=typeof self=="object"&&self&&self.Object===Object&&self,L=P||z||Function("return this")();function q(Oe,me,Ne){switch(Ne.length){case 0:return Oe.call(me);case 1:return Oe.call(me,Ne[0]);case 2:return Oe.call(me,Ne[0],Ne[1]);case 3:return Oe.call(me,Ne[0],Ne[1],Ne[2])}return Oe.apply(me,Ne)}function Z(Oe,me){return!!(Oe&&Oe.length)&&(function(Ne,Ke,it){if(Ke!=Ke)return(function(ht,on,Vt,Et){for(var Yt=ht.length,Nt=Vt+-1;++Nt<Yt;)if(on(ht[Nt],Nt,ht))return Nt;return-1})(Ne,te,it);for(var yt=it-1,bt=Ne.length;++yt<bt;)if(Ne[yt]===Ke)return yt;return-1})(Oe,me,0)>-1}function te(Oe){return Oe!=Oe}function ee(Oe,me){for(var Ne=-1,Ke=Oe.length,it=0,yt=[];++Ne<Ke;){var bt=Oe[Ne];bt!==me&&bt!==u||(Oe[Ne]=u,yt[it++]=Ne)}return yt}var G,H,Y,oe=Function.prototype,re=Object.prototype,I=L["__core-js_shared__"],B=(G=/[^.]+$/.exec(I&&I.keys&&I.keys.IE_PROTO||""))?"Symbol(src)_1."+G:"",$=oe.toString,N=re.hasOwnProperty,U=re.toString,J=RegExp("^"+$.call(N).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ne=Object.create,se=Math.max,he=Math.min,Ee=(H=Ie(Object,"defineProperty"),(Y=Ie.name)&&Y.length>2?H:void 0);function Q(Oe){if(!Le(Oe)||(function(Ne){return!!B&&B in Ne})(Oe))return!1;var me=(function(Ne){var Ke=Le(Ne)?U.call(Ne):"";return Ke==S||Ke==y})(Oe)||(function(Ne){var Ke=!1;if(Ne!=null&&typeof Ne.toString!="function")try{Ke=!!(Ne+"")}catch{}return Ke})(Oe)?J:T;return me.test((function(Ne){if(Ne!=null){try{return $.call(Ne)}catch{}try{return Ne+""}catch{}}return""})(Oe))}function ie(Oe){return function(){var me=arguments;switch(me.length){case 0:return new Oe;case 1:return new Oe(me[0]);case 2:return new Oe(me[0],me[1]);case 3:return new Oe(me[0],me[1],me[2]);case 4:return new Oe(me[0],me[1],me[2],me[3]);case 5:return new Oe(me[0],me[1],me[2],me[3],me[4]);case 6:return new Oe(me[0],me[1],me[2],me[3],me[4],me[5]);case 7:return new Oe(me[0],me[1],me[2],me[3],me[4],me[5],me[6])}var Ne,Ke=Le(Ne=Oe.prototype)?ne(Ne):{},it=Oe.apply(Ke,me);return Le(it)?it:Ke}}function le(Oe,me,Ne,Ke,it,yt,bt,ht,on,Vt){var Et=128&me,Yt=1&me,Nt=2&me,qt=24&me,un=512&me,bn=Nt?void 0:ie(Oe);return function Kt(){for(var vt=arguments.length,Dt=Array(vt),jn=vt;jn--;)Dt[jn]=arguments[jn];if(qt)var ut=we(Kt),Wt=(function(an,fr){for(var Vn=an.length,Xt=0;Vn--;)an[Vn]===fr&&Xt++;return Xt})(Dt,ut);if(Ke&&(Dt=(function(an,fr,Vn,Xt){for(var ar=-1,ei=an.length,Sr=Vn.length,Qt=-1,Cn=fr.length,Nr=se(ei-Sr,0),bi=Array(Cn+Nr),Os=!Xt;++Qt<Cn;)bi[Qt]=fr[Qt];for(;++ar<Sr;)(Os||ar<ei)&&(bi[Vn[ar]]=an[ar]);for(;Nr--;)bi[Qt++]=an[ar++];return bi})(Dt,Ke,it,qt)),yt&&(Dt=(function(an,fr,Vn,Xt){for(var ar=-1,ei=an.length,Sr=-1,Qt=Vn.length,Cn=-1,Nr=fr.length,bi=se(ei-Qt,0),Os=Array(bi+Nr),_f=!Xt;++ar<bi;)Os[ar]=an[ar];for(var rl=ar;++Cn<Nr;)Os[rl+Cn]=fr[Cn];for(;++Sr<Qt;)(_f||ar<ei)&&(Os[rl+Vn[Sr]]=an[ar++]);return Os})(Dt,yt,bt,qt)),vt-=Wt,qt&&vt<Vt){var En=ee(Dt,ut);return Se(Oe,me,le,Kt.placeholder,Ne,Dt,En,ht,on,Vt-vt)}var mn=Yt?Ne:this,Un=Nt?mn[Oe]:Oe;return vt=Dt.length,ht?Dt=(function(an,fr){for(var Vn=an.length,Xt=he(fr.length,Vn),ar=(function(Sr,Qt){var Cn=-1,Nr=Sr.length;for(Qt||(Qt=Array(Nr));++Cn<Nr;)Qt[Cn]=Sr[Cn];return Qt})(an);Xt--;){var ei=fr[Xt];an[Xt]=Ue(ei,Vn)?ar[ei]:void 0}return an})(Dt,ht):un&&vt>1&&Dt.reverse(),Et&&on<vt&&(Dt.length=on),this&&this!==L&&this instanceof Kt&&(Un=bn||ie(Un)),Un.apply(mn,Dt)}}function Se(Oe,me,Ne,Ke,it,yt,bt,ht,on,Vt){var Et=8&me;me|=Et?d:64,4&(me&=~(Et?64:d))||(me&=-4);var Yt=Ne(Oe,me,it,Et?yt:void 0,Et?bt:void 0,Et?void 0:yt,Et?void 0:bt,ht,on,Vt);return Yt.placeholder=Ke,Re(Yt,Oe,me)}function Te(Oe,me,Ne,Ke,it,yt,bt,ht){var on=2&me;if(!on&&typeof Oe!="function")throw new TypeError("Expected a function");var Vt=Ke?Ke.length:0;if(Vt||(me&=-97,Ke=it=void 0),bt=bt===void 0?bt:se(ft(bt),0),ht=ht===void 0?ht:ft(ht),Vt-=it?it.length:0,64&me){var Et=Ke,Yt=it;Ke=it=void 0}var Nt=[Oe,me,Ne,Ke,it,Et,Yt,yt,bt,ht];if(Oe=Nt[0],me=Nt[1],Ne=Nt[2],Ke=Nt[3],it=Nt[4],!(ht=Nt[9]=Nt[9]==null?on?0:Oe.length:se(Nt[9]-Vt,0))&&24&me&&(me&=-25),me&&me!=1)qt=me==8||me==16?(function(un,bn,Kt){var vt=ie(un);return function Dt(){for(var jn=arguments.length,ut=Array(jn),Wt=jn,En=we(Dt);Wt--;)ut[Wt]=arguments[Wt];var mn=jn<3&&ut[0]!==En&&ut[jn-1]!==En?[]:ee(ut,En);return(jn-=mn.length)<Kt?Se(un,bn,le,Dt.placeholder,void 0,ut,mn,void 0,void 0,Kt-jn):q(this&&this!==L&&this instanceof Dt?vt:un,this,ut)}})(Oe,me,ht):me!=d&&me!=33||it.length?le.apply(void 0,Nt):(function(un,bn,Kt,vt){var Dt=1&bn,jn=ie(un);return function ut(){for(var Wt=-1,En=arguments.length,mn=-1,Un=vt.length,an=Array(Un+En),fr=this&&this!==L&&this instanceof ut?jn:un;++mn<Un;)an[mn]=vt[mn];for(;En--;)an[mn++]=arguments[++Wt];return q(fr,Dt?Kt:this,an)}})(Oe,me,Ne,Ke);else var qt=(function(un,bn,Kt){var vt=1&bn,Dt=ie(un);return function jn(){return(this&&this!==L&&this instanceof jn?Dt:un).apply(vt?Kt:this,arguments)}})(Oe,me,Ne);return Re(qt,Oe,me)}function we(Oe){return Oe.placeholder}function Ie(Oe,me){var Ne=(function(Ke,it){return Ke?.[it]})(Oe,me);return Q(Ne)?Ne:void 0}function Fe(Oe){var me=Oe.match(w);return me?me[1].split(v):[]}function ye(Oe,me){var Ne=me.length,Ke=Ne-1;return me[Ke]=(Ne>1?"& ":"")+me[Ke],me=me.join(Ne>2?", ":" "),Oe.replace(x,`{
111
- /* [wrapped with `+me+`] */
112
- `)}function Ue(Oe,me){return!!(me=me??9007199254740991)&&(typeof Oe=="number"||O.test(Oe))&&Oe>-1&&Oe%1==0&&Oe<me}var Re=Ee?function(Oe,me,Ne){var Ke,it=me+"";return Ee(Oe,"toString",{configurable:!0,enumerable:!1,value:(Ke=ye(it,Ye(Fe(it),Ne)),function(){return Ke})})}:function(Oe){return Oe};function Ye(Oe,me){return(function(Ne,Ke){for(var it=-1,yt=Ne?Ne.length:0;++it<yt&&Ke(Ne[it],it,Ne)!==!1;);})(g,(function(Ne){var Ke="_."+Ne[0];me&Ne[1]&&!Z(Oe,Ke)&&Oe.push(Ke)})),Oe.sort()}function $e(Oe,me,Ne){var Ke=Te(Oe,8,void 0,void 0,void 0,void 0,void 0,me=Ne?void 0:me);return Ke.placeholder=$e.placeholder,Ke}function Le(Oe){var me=typeof Oe;return!!Oe&&(me=="object"||me=="function")}function Ve(Oe){return Oe?(Oe=(function(me){if(typeof me=="number")return me;if((function(it){return typeof it=="symbol"||(function(yt){return!!yt&&typeof yt=="object"})(it)&&U.call(it)=="[object Symbol]"})(me))return p;if(Le(me)){var Ne=typeof me.valueOf=="function"?me.valueOf():me;me=Le(Ne)?Ne+"":Ne}if(typeof me!="string")return me===0?me:+me;me=me.replace(C,"");var Ke=b.test(me);return Ke||_.test(me)?M(me.slice(2),Ke?2:8):E.test(me)?p:+me})(Oe))===h||Oe===-1/0?17976931348623157e292*(Oe<0?-1:1):Oe==Oe?Oe:0:Oe===0?Oe:0}function ft(Oe){var me=Ve(Oe),Ne=me%1;return me==me?Ne?me-Ne:me:0}$e.placeholder={},c.exports=$e},301:(c,u,d)=>{var h=d(8336),p=Array.prototype.concat,g=Array.prototype.slice,S=c.exports=function(y){for(var C=[],x=0,w=y.length;x<w;x++){var v=y[x];h(v)?C=p.call(C,g.call(v)):C.push(v)}return C};S.wrap=function(y){return function(){return y(S(arguments))}}},4119:c=>{c.exports=n}},i={};function o(c){var u=i[c];if(u!==void 0)return u.exports;var d=i[c]={exports:{}};return r[c](d,d.exports,o),d.exports}o.n=c=>{var u=c&&c.__esModule?()=>c.default:()=>c;return o.d(u,{a:u}),u},o.d=(c,u)=>{for(var d in u)o.o(u,d)&&!o.o(c,d)&&Object.defineProperty(c,d,{enumerable:!0,get:u[d]})},o.o=(c,u)=>Object.prototype.hasOwnProperty.call(c,u),o.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(F){return typeof F}:function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},c(X)}function u(X){var F=(function(V,K){if(c(V)!="object"||!V)return V;var ue=V[Symbol.toPrimitive];if(ue!==void 0){var _e=ue.call(V,K);if(c(_e)!="object")return _e;throw new TypeError("@@toPrimitive must return a primitive value.")}return(K==="string"?String:Number)(V)})(X,"string");return c(F)=="symbol"?F:F+""}function d(X,F,V){return(F=u(F))in X?Object.defineProperty(X,F,{value:V,enumerable:!0,configurable:!0,writable:!0}):X[F]=V,X}function h(X,F){var V=Object.keys(X);if(Object.getOwnPropertySymbols){var K=Object.getOwnPropertySymbols(X);F&&(K=K.filter((function(ue){return Object.getOwnPropertyDescriptor(X,ue).enumerable}))),V.push.apply(V,K)}return V}function p(X){for(var F=1;F<arguments.length;F++){var V=arguments[F]!=null?arguments[F]:{};F%2?h(Object(V),!0).forEach((function(K){d(X,K,V[K])})):Object.getOwnPropertyDescriptors?Object.defineProperties(X,Object.getOwnPropertyDescriptors(V)):h(Object(V)).forEach((function(K){Object.defineProperty(X,K,Object.getOwnPropertyDescriptor(V,K))}))}return X}function g(X,F){if(!(X instanceof F))throw new TypeError("Cannot call a class as a function")}function S(X,F){for(var V=0;V<F.length;V++){var K=F[V];K.enumerable=K.enumerable||!1,K.configurable=!0,"value"in K&&(K.writable=!0),Object.defineProperty(X,u(K.key),K)}}function y(X,F,V){return F&&S(X.prototype,F),V&&S(X,V),Object.defineProperty(X,"prototype",{writable:!1}),X}function C(X){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(F){return F.__proto__||Object.getPrototypeOf(F)},C(X)}function x(){try{var X=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(x=function(){return!!X})()}function w(X,F){if(F&&(c(F)=="object"||typeof F=="function"))return F;if(F!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(V){if(V===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return V})(X)}function v(X,F,V){return F=C(F),w(X,x()?Reflect.construct(F,V||[],C(X).constructor):F.apply(X,V))}function E(X,F){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(V,K){return V.__proto__=K,V},E(X,F)}function b(X,F){if(typeof F!="function"&&F!==null)throw new TypeError("Super expression must either be null or a function");X.prototype=Object.create(F&&F.prototype,{constructor:{value:X,writable:!0,configurable:!0}}),Object.defineProperty(X,"prototype",{writable:!1}),F&&E(X,F)}o.r(l),o.d(l,{default:()=>Go});var T=o(4119),_=o.n(T);function O(){var X=this.constructor.getDerivedStateFromProps(this.props,this.state);X!=null&&this.setState(X)}function M(X){this.setState((function(F){var V=this.constructor.getDerivedStateFromProps(X,F);return V??null}).bind(this))}function P(X,F){try{var V=this.props,K=this.state;this.props=X,this.state=F,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(V,K)}finally{this.props=V,this.state=K}}function z(X){var F=X.prototype;if(!F||!F.isReactComponent)throw new Error("Can only polyfill class components");if(typeof X.getDerivedStateFromProps!="function"&&typeof F.getSnapshotBeforeUpdate!="function")return X;var V=null,K=null,ue=null;if(typeof F.componentWillMount=="function"?V="componentWillMount":typeof F.UNSAFE_componentWillMount=="function"&&(V="UNSAFE_componentWillMount"),typeof F.componentWillReceiveProps=="function"?K="componentWillReceiveProps":typeof F.UNSAFE_componentWillReceiveProps=="function"&&(K="UNSAFE_componentWillReceiveProps"),typeof F.componentWillUpdate=="function"?ue="componentWillUpdate":typeof F.UNSAFE_componentWillUpdate=="function"&&(ue="UNSAFE_componentWillUpdate"),V!==null||K!==null||ue!==null){var _e=X.displayName||X.name,ge=typeof X.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
113
-
114
- `+_e+" uses "+ge+" but also contains the following legacy lifecycles:"+(V!==null?`
115
- `+V:"")+(K!==null?`
116
- `+K:"")+(ue!==null?`
117
- `+ue:"")+`
118
-
119
- The above lifecycles should be removed. Learn more about this warning here:
120
- https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof X.getDerivedStateFromProps=="function"&&(F.componentWillMount=O,F.componentWillReceiveProps=M),typeof F.getSnapshotBeforeUpdate=="function"){if(typeof F.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");F.componentWillUpdate=P;var ce=F.componentDidUpdate;F.componentDidUpdate=function(Me,De,qe){var Be=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:qe;ce.call(this,Me,De,Be)}}return X}function L(X,F){if(X==null)return{};var V={};for(var K in X)if({}.hasOwnProperty.call(X,K)){if(F.includes(K))continue;V[K]=X[K]}return V}function q(X,F){if(X==null)return{};var V,K,ue=L(X,F);if(Object.getOwnPropertySymbols){var _e=Object.getOwnPropertySymbols(X);for(K=0;K<_e.length;K++)V=_e[K],F.includes(V)||{}.propertyIsEnumerable.call(X,V)&&(ue[V]=X[V])}return ue}function Z(X,F){if(F&&X?.constructor===F)return"bigNumber";var V=(function(K){return{}.toString.call(K).match(/\s([a-zA-Z]+)/)[1].toLowerCase()})(X);return V==="number"&&(V=isNaN(X)?"nan":(0|X)!=X?"float":"integer"),V}function te(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"},G={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,F){(F==null||F>X.length)&&(F=X.length);for(var V=0,K=Array(F);V<F;V++)K[V]=X[V];return K}function oe(X,F){if(X){if(typeof X=="string")return Y(X,F);var V={}.toString.call(X).slice(8,-1);return V==="Object"&&X.constructor&&(V=X.constructor.name),V==="Map"||V==="Set"?Array.from(X):V==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(V)?Y(X,F):void 0}}function re(X,F){return(function(V){if(Array.isArray(V))return V})(X)||(function(V,K){var ue=V==null?null:typeof Symbol<"u"&&V[Symbol.iterator]||V["@@iterator"];if(ue!=null){var _e,ge,ce,Me,De=[],qe=!0,Be=!1;try{if(ce=(ue=ue.call(V)).next,K===0){if(Object(ue)!==ue)return;qe=!1}else for(;!(qe=(_e=ce.call(ue)).done)&&(De.push(_e.value),De.length!==K);qe=!0);}catch(tt){Be=!0,ge=tt}finally{try{if(!qe&&ue.return!=null&&(Me=ue.return(),Object(Me)!==Me))return}finally{if(Be)throw ge}}return De}})(X,F)||oe(X,F)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
121
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}var I=o(9446),B=o(3639),$=o.n(B),N=o(3989),U=o.n(N);function J(X,F){var V=Object.keys(X);if(Object.getOwnPropertySymbols){var K=Object.getOwnPropertySymbols(X);F&&(K=K.filter((function(ue){return Object.getOwnPropertyDescriptor(X,ue).enumerable}))),V.push.apply(V,K)}return V}function ne(X){for(var F=1;F<arguments.length;F++){var V=arguments[F]!=null?arguments[F]:{};F%2?J(Object(V),!0).forEach((function(K){d(X,K,V[K])})):Object.getOwnPropertyDescriptors?Object.defineProperties(X,Object.getOwnPropertyDescriptors(V)):J(Object(V)).forEach((function(K){Object.defineProperty(X,K,Object.getOwnPropertyDescriptor(V,K))}))}return X}var se=I.default,he=Object.keys(se),Ee=function(X){var F,V=(function(Me){var De=Me[0]/255,qe=Me[1]/255,Be=Me[2]/255;return[.299*De+.587*qe+.114*Be,-.14713*De+-.28886*qe+.436*Be,.615*De+-.51499*qe+-.10001*Be]})($()(X).array()),K=re(V,3),ue=K[0],_e=K[1],ge=K[2],ce=(function(Me){var De,qe,Be,tt=Me[0],He=Me[1],Ct=Me[2];return De=1*tt+0*He+1.13983*Ct,qe=1*tt+-.39465*He+-.5806*Ct,Be=1*tt+2.02311*He+0*Ct,[255*(De=Math.min(Math.max(0,De),1)),255*(qe=Math.min(Math.max(0,qe),1)),255*(Be=Math.min(Math.max(0,Be),1))]})([(F=ue,F<.25?1:F<.5?.9-F:1.1-F),_e,ge]);return $().rgb(ce).hex()},Q=function(X){return function(F){return{className:[F.className,X.className].filter(Boolean).join(" "),style:ne(ne({},F.style||{}),X.style||{})}}},ie=function(X,F){var V=Object.keys(F);for(var K in X)V.indexOf(K)===-1&&V.push(K);return V.reduce((function(ue,_e){return ue[_e]=(function(ge,ce){if(ge===void 0)return ce;if(ce===void 0)return ge;var Me=c(ge),De=c(ce);switch(Me){case"string":switch(De){case"string":return[ce,ge].filter(Boolean).join(" ");case"object":return Q({className:ge,style:ce});case"function":return function(qe){for(var Be=arguments.length,tt=new Array(Be>1?Be-1:0),He=1;He<Be;He++)tt[He-1]=arguments[He];return Q({className:ge})(ce.apply(void 0,[qe].concat(tt)))}}break;case"object":switch(De){case"string":return Q({className:ce,style:ge});case"object":return ne(ne({},ce),ge);case"function":return function(qe){for(var Be=arguments.length,tt=new Array(Be>1?Be-1:0),He=1;He<Be;He++)tt[He-1]=arguments[He];return Q({style:ge})(ce.apply(void 0,[qe].concat(tt)))}}break;case"function":switch(De){case"string":return function(qe){for(var Be=arguments.length,tt=new Array(Be>1?Be-1:0),He=1;He<Be;He++)tt[He-1]=arguments[He];return ge.apply(void 0,[Q(qe)({className:ce})].concat(tt))};case"object":return function(qe){for(var Be=arguments.length,tt=new Array(Be>1?Be-1:0),He=1;He<Be;He++)tt[He-1]=arguments[He];return ge.apply(void 0,[Q(qe)({style:ce})].concat(tt))};case"function":return function(qe){for(var Be=arguments.length,tt=new Array(Be>1?Be-1:0),He=1;He<Be;He++)tt[He-1]=arguments[He];return ge.apply(void 0,[ce.apply(void 0,[qe].concat(tt))].concat(tt))}}}})(X[_e],F[_e]),ue}),{})},le=function(X,F){for(var V=arguments.length,K=new Array(V>2?V-2:0),ue=2;ue<V;ue++)K[ue-2]=arguments[ue];if(F===null)return X;Array.isArray(F)||(F=[F]);var _e=F.map((function(ge){return X[ge]})).filter(Boolean).reduce((function(ge,ce){return typeof ce=="string"?ge.className=[ge.className,ce].filter(Boolean).join(" "):c(ce)==="object"?ge.style=ne(ne({},ge.style),ce):typeof ce=="function"&&(ge=ne(ne({},ge),ce.apply(void 0,[ge].concat(K)))),ge}),{className:"",style:{}});return _e.className||delete _e.className,Object.keys(_e.style).length===0&&delete _e.style,_e},Se=function(X){return Object.keys(X).reduce((function(F,V){return F[V]=/^base/.test(V)?Ee(X[V]):V==="scheme"?X[V]+":inverted":X[V],F}),{})},Te=U()((function(X){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},V=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},K=F.defaultBase16,ue=K===void 0?se:K,_e=F.base16Themes,ge=Ie(V,_e===void 0?null:_e);ge&&(V=ne(ne({},ge),V));for(var ce=he.reduce((function(Ct,Ot){return Ct[Ot]=V[Ot]||ue[Ot],Ct}),{}),Me=Object.keys(V).reduce((function(Ct,Ot){return he.indexOf(Ot)===-1&&(Ct[Ot]=V[Ot]),Ct}),{}),De=X(ce),qe=ie(Me,De),Be=arguments.length,tt=new Array(Be>3?Be-3:0),He=3;He<Be;He++)tt[He-3]=arguments[He];return U()(le,2).apply(void 0,[qe].concat(tt))}),3),we=function(X){return!!X.extend},Ie=function(X,F){if(X&&we(X)&&X.extend&&(X=X.extend),typeof X=="string"){var V=re(X.split(":"),2),K=V[0],ue=V[1];X=F?F[K]:I[K],ue==="inverted"&&(X=Se(X))}return X&&Object.prototype.hasOwnProperty.call(X,"base00")?X:void 0},Fe=function(X){var F=(function(V){return{backgroundColor:V.base00,ellipsisColor:V.base09,braceColor:V.base07,expandedIcon:V.base0D,collapsedIcon:V.base0E,keyColor:V.base07,arrayKeyColor:V.base0C,objectSize:V.base04,copyToClipboard:V.base0F,copyToClipboardCheck:V.base0D,objectBorder:V.base02,dataTypes:{boolean:V.base0E,date:V.base0D,float:V.base0B,function:V.base0D,integer:V.base0F,string:V.base09,nan:V.base08,null:V.base0A,undefined:V.base05,regexp:V.base0A,background:V.base02,bigNumber:V.base09},editVariable:{editIcon:V.base0E,cancelIcon:V.base09,removeIcon:V.base09,addIcon:V.base0E,checkIcon:V.base0E,background:V.base01,color:V.base0A,border:V.base07},addKeyModal:{background:V.base05,border:V.base04,color:V.base0A,labelColor:V.base01},validationFailure:{background:V.base09,iconColor:V.base01,fontColor:V.base01}}})(X);return{"app-container":{fontFamily:H.globalFontFamily,cursor:H.globalCursor,backgroundColor:F.backgroundColor,position:"relative"},ellipsis:{display:"inline-block",color:F.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:F.braceColor},"expanded-icon":{color:F.expandedIcon},"collapsed-icon":{color:F.collapsedIcon},colon:{display:"inline-block",margin:H.keyMargin,color:F.keyColor,verticalAlign:"top"},objectKeyVal:function(V,K){return{style:p({paddingTop:H.keyValPaddingTop,paddingRight:H.keyValPaddingRight,paddingBottom:H.keyValPaddingBottom,borderLeft:H.keyValBorderLeft+" "+F.objectBorder,":hover":{paddingLeft:K.paddingLeft-1+"px",borderLeft:H.keyValBorderHover+" "+F.objectBorder}},K)}},"object-key-val-no-border":{padding:H.keyValPadding},"pushed-content":{marginLeft:H.pushedContentMarginLeft},variableValue:function(V,K){return{style:p({display:"inline-block",paddingRight:H.variableValuePaddingRight,position:"relative"},K)}},"object-name":{display:"inline-block",color:F.keyColor,letterSpacing:H.keyLetterSpacing,fontStyle:H.keyFontStyle,verticalAlign:H.keyVerticalAlign,opacity:H.keyOpacity,":hover":{opacity:H.keyOpacityHover}},"array-key":{display:"inline-block",color:F.arrayKeyColor,letterSpacing:H.keyLetterSpacing,fontStyle:H.keyFontStyle,verticalAlign:H.keyVerticalAlign,opacity:H.keyOpacity,":hover":{opacity:H.keyOpacityHover}},"object-size":{color:F.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:F.dataTypes.boolean},date:{display:"inline-block",color:F.dataTypes.date},"date-value":{marginLeft:H.dateValueMarginLeft},float:{display:"inline-block",color:F.dataTypes.float},function:{display:"inline-block",color:F.dataTypes.function,cursor:"pointer",whiteSpace:"pre-line"},"function-value":{fontStyle:"italic"},integer:{display:"inline-block",color:F.dataTypes.integer},bigNumber:{display:"inline-block",color:F.dataTypes.bigNumber},string:{display:"inline-block",color:F.dataTypes.string},nan:{display:"inline-block",color:F.dataTypes.nan,fontSize:H.nanFontSize,fontWeight:H.nanFontWeight,backgroundColor:F.dataTypes.background,padding:H.nanPadding,borderRadius:H.nanBorderRadius},null:{display:"inline-block",color:F.dataTypes.null,fontSize:H.nullFontSize,fontWeight:H.nullFontWeight,backgroundColor:F.dataTypes.background,padding:H.nullPadding,borderRadius:H.nullBorderRadius},undefined:{display:"inline-block",color:F.dataTypes.undefined,fontSize:H.undefinedFontSize,padding:H.undefinedPadding,borderRadius:H.undefinedBorderRadius,backgroundColor:F.dataTypes.background},regexp:{display:"inline-block",color:F.dataTypes.regexp},"copy-to-clipboard":{cursor:H.clipboardCursor},"copy-icon":{color:F.copyToClipboard,fontSize:H.iconFontSize,marginRight:H.iconMarginRight,verticalAlign:"top"},"copy-icon-copied":{color:F.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:F.editVariable.removeIcon,cursor:H.iconCursor,fontSize:H.iconFontSize,marginRight:H.iconMarginRight},addVarIcon:{verticalAlign:"top",display:"inline-block",color:F.editVariable.addIcon,cursor:H.iconCursor,fontSize:H.iconFontSize,marginRight:H.iconMarginRight},editVarIcon:{verticalAlign:"top",display:"inline-block",color:F.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:F.editVariable.checkIcon,fontSize:H.iconFontSize,paddingRight:H.iconPaddingRight},"cancel-icon":{display:"inline-block",cursor:H.iconCursor,color:F.editVariable.cancelIcon,fontSize:H.iconFontSize,paddingRight:H.iconPaddingRight},"edit-input":{display:"inline-block",minWidth:H.editInputMinWidth,borderRadius:H.editInputBorderRadius,backgroundColor:F.editVariable.background,color:F.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:F.addKeyModal.background,marginLeft:H.addKeyModalMargin,marginRight:H.addKeyModalMargin,padding:H.addKeyModalPadding,borderRadius:H.addKeyModalRadius,marginTop:"15px",position:"relative"},"key-modal-label":{color:F.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:F.addKeyModal.color,border:"none",boxSizing:"border-box",borderRadius:"2px"},"key-modal-cancel":{backgroundColor:F.editVariable.removeIcon,position:"absolute",top:"0px",right:"0px",borderRadius:"0px 3px 0px 3px",cursor:"pointer"},"key-modal-cancel-icon":{color:F.addKeyModal.labelColor,fontSize:H.iconFontSize,transform:"rotate(45deg)"},"key-modal-submit":{color:F.editVariable.addIcon,fontSize:H.iconFontSize,position:"absolute",right:"2px",top:"3px",cursor:"pointer"},"function-ellipsis":{display:"inline-block",color:F.ellipsisColor,fontSize:H.ellipsisFontSize,lineHeight:H.ellipsisLineHeight,cursor:H.ellipsisCursor},"validation-failure":{float:"right",padding:"3px 6px",borderRadius:"2px",cursor:"pointer",color:F.validationFailure.fontColor,backgroundColor:F.validationFailure.background},"validation-failure-label":{marginRight:"6px"},"validation-failure-clear":{position:"relative",verticalAlign:"top",cursor:"pointer",color:F.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,F,V){return X||console.error("theme has not been set"),(function(K){var ue=ee;return K!==!1&&K!=="none"||(ue=G),Te(Fe,{defaultBase16:ue})(K)})(X)(F,V)}var Ue=(function(X){function F(){return g(this,F),v(this,F,arguments)}return b(F,X),y(F,[{key:"render",value:function(){var V=this.props,K=(V.rjvId,V.type_name),ue=V.displayDataTypes,_e=V.theme;return ue?_().createElement("span",Object.assign({className:"data-type-label"},ye(_e,"data-type-label")),K):null}}])})(_().PureComponent),Re=(function(X){function F(){return g(this,F),v(this,F,arguments)}return b(F,X),y(F,[{key:"render",value:function(){var V=this.props;return _().createElement("div",ye(V.theme,"boolean"),_().createElement(Ue,Object.assign({type_name:"bool"},V)),V.value?"true":"false")}}])})(_().PureComponent),Ye=(function(X){function F(){return g(this,F),v(this,F,arguments)}return b(F,X),y(F,[{key:"render",value:function(){var V=this.props;return _().createElement("div",ye(V.theme,"date"),_().createElement(Ue,Object.assign({type_name:"date"},V)),_().createElement("span",Object.assign({className:"date-value"},ye(V.theme,"date-value")),V.value.toLocaleTimeString("en-us",{weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})))}}])})(_().PureComponent),$e=(function(X){function F(){return g(this,F),v(this,F,arguments)}return b(F,X),y(F,[{key:"render",value:function(){var V=this.props;return _().createElement("div",ye(V.theme,"float"),_().createElement(Ue,Object.assign({type_name:"float"},V)),this.props.value)}}])})(_().PureComponent);function Le(X){return(function(F){if(Array.isArray(F))return Y(F)})(X)||(function(F){if(typeof Symbol<"u"&&F[Symbol.iterator]!=null||F["@@iterator"]!=null)return Array.from(F)})(X)||oe(X)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
122
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}var Ve=o(9784),ft=(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 F;(F=this.handler)===null||F===void 0||F.call(this,X)}}])})();globalThis.__globalDispatcherInstance||(globalThis.__globalDispatcherInstance=new ft);const Oe=globalThis.__globalDispatcherInstance;var me=new((function(X){function F(){var V;g(this,F);for(var K=arguments.length,ue=new Array(K),_e=0;_e<K;_e++)ue[_e]=arguments[_e];return(V=v(this,F,[].concat(ue))).objects={},V.set=function(ge,ce,Me,De){V.objects[ge]===void 0&&(V.objects[ge]={}),V.objects[ge][ce]===void 0&&(V.objects[ge][ce]={}),V.objects[ge][ce][Me]=De},V.get=function(ge,ce,Me,De){return V.objects[ge]===void 0||V.objects[ge][ce]===void 0||V.objects[ge][ce][Me]==null?De:V.objects[ge][ce][Me]},V.handleAction=function(ge){var ce=ge.rjvId,Me=ge.data;switch(ge.name){case"RESET":V.emit("reset-"+ce);break;case"VARIABLE_UPDATED":ge.data.updated_src=V.updateSrc(ce,Me),V.set(ce,"action","variable-update",p(p({},Me),{},{type:"variable-edited"})),V.emit("variable-update-"+ce);break;case"VARIABLE_REMOVED":ge.data.updated_src=V.updateSrc(ce,Me),V.set(ce,"action","variable-update",p(p({},Me),{},{type:"variable-removed"})),V.emit("variable-update-"+ce);break;case"VARIABLE_ADDED":ge.data.updated_src=V.updateSrc(ce,Me),V.set(ce,"action","variable-update",p(p({},Me),{},{type:"variable-added"})),V.emit("variable-update-"+ce);break;case"ADD_VARIABLE_KEY_REQUEST":V.set(ce,"action","new-key-request",Me),V.emit("add-key-request-"+ce)}},V.updateSrc=function(ge,ce){var Me=ce.name,De=ce.namespace,qe=ce.new_value,Be=(ce.existing_value,ce.variable_removed);De.shift();var tt,He=V.get(ge,"global","src"),Ct=V.deepCopy(He,Le(De)),Ot=Ct,st=(function(Jt,wr){var fn=typeof Symbol<"u"&&Jt[Symbol.iterator]||Jt["@@iterator"];if(!fn){if(Array.isArray(Jt)||(fn=oe(Jt))||wr){fn&&(Jt=fn);var ui=0,xr=function(){};return{s:xr,n:function(){return ui>=Jt.length?{done:!0}:{done:!1,value:Jt[ui++]}},e:function(Si){throw Si},f:xr}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
123
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Zo,fs=!0,ds=!1;return{s:function(){fn=fn.call(Jt)},n:function(){var Si=fn.next();return fs=Si.done,Si},e:function(Si){ds=!0,Zo=Si},f:function(){try{fs||fn.return==null||fn.return()}finally{if(ds)throw Zo}}}})(De);try{for(st.s();!(tt=st.n()).done;)Ot=Ot[tt.value]}catch(Jt){st.e(Jt)}finally{st.f()}return Be?Z(Ot)=="array"?Ot.splice(Me,1):delete Ot[Me]:Me!==null?Ot[Me]=qe:Ct=qe,V.set(ge,"global","src",Ct),Ct},V.deepCopy=function(ge,ce){var Me,De=Z(ge),qe=ce.shift();return De=="array"?Me=Le(ge):De=="object"&&(Me=p({},ge)),qe!==void 0&&(Me[qe]=V.deepCopy(ge[qe],ce)),Me},V}return b(F,X),y(F)})(Ve.EventEmitter));Oe.register(me.handleAction.bind(me));const Ne=me;var Ke=(function(X){function F(V){var K;return g(this,F),(K=v(this,F,[V])).toggleCollapsed=function(){K.setState({collapsed:!K.state.collapsed},(function(){Ne.set(K.props.rjvId,K.props.namespace,"collapsed",K.state.collapsed)}))},K.getFunctionDisplay=function(ue){var _e=K.props;return ue?_().createElement("span",null,K.props.value.toString().slice(9,-1).replace(/\{[\s\S]+/,""),_().createElement("span",{className:"function-collapsed",style:{fontWeight:"bold"}},_().createElement("span",null,"{"),_().createElement("span",ye(_e.theme,"ellipsis"),"..."),_().createElement("span",null,"}"))):K.props.value.toString().slice(9,-1)},K.state={collapsed:Ne.get(V.rjvId,V.namespace,"collapsed",!0)},K}return b(F,X),y(F,[{key:"render",value:function(){var V=this.props,K=this.state.collapsed;return _().createElement("div",ye(V.theme,"function"),_().createElement(Ue,Object.assign({type_name:"function"},V)),_().createElement("span",Object.assign({},ye(V.theme,"function-value"),{className:"rjv-function-container",onClick:this.toggleCollapsed}),this.getFunctionDisplay(K)))}}])})(_().PureComponent),it=(function(X){function F(){return g(this,F),v(this,F,arguments)}return b(F,X),y(F,[{key:"render",value:function(){return _().createElement("div",ye(this.props.theme,"nan"),"NaN")}}])})(_().PureComponent),yt=(function(X){function F(){return g(this,F),v(this,F,arguments)}return b(F,X),y(F,[{key:"render",value:function(){return _().createElement("div",ye(this.props.theme,"null"),"NULL")}}])})(_().PureComponent),bt=(function(X){function F(){return g(this,F),v(this,F,arguments)}return b(F,X),y(F,[{key:"render",value:function(){var V=this.props;return _().createElement("div",ye(V.theme,"integer"),_().createElement(Ue,Object.assign({type_name:"int"},V)),this.props.value)}}])})(_().PureComponent),ht=(function(X){function F(){return g(this,F),v(this,F,arguments)}return b(F,X),y(F,[{key:"render",value:function(){var V=this.props;return _().createElement("div",ye(V.theme,"regexp"),_().createElement(Ue,Object.assign({type_name:"regexp"},V)),this.props.value.toString())}}])})(_().PureComponent),on=(function(X){function F(V){var K;return g(this,F),(K=v(this,F,[V])).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(V.rjvId,V.namespace,"collapsed",!0)},K}return b(F,X),y(F,[{key:"render",value:function(){var V=this.state.collapsed,K=this.props,ue=K.collapseStringsAfterLength,_e=K.theme,ge=K.escapeStrings,ce=K.value,Me=Z(ue)==="integer",De={style:{cursor:"default",wordBreak:"break-all"}};return ge&&(ce=te(ce)),Me&&ce.length>ue&&(De.style.cursor="pointer",V&&(ce=_().createElement("span",null,ce.substring(0,ue),_().createElement("span",ye(_e,"ellipsis")," ...")))),_().createElement("div",ye(_e,"string"),_().createElement(Ue,Object.assign({type_name:"string"},K)),_().createElement("span",Object.assign({className:"string-value"},De,{onClick:this.toggleCollapsed}),'"',ce,'"'))}}])})(_().PureComponent),Vt=(function(X){function F(){return g(this,F),v(this,F,arguments)}return b(F,X),y(F,[{key:"render",value:function(){return _().createElement("div",ye(this.props.theme,"undefined"),"undefined")}}])})(_().PureComponent),Et=(function(X){function F(){return g(this,F),v(this,F,arguments)}return b(F,X),y(F,[{key:"render",value:function(){var V=this.props;return _().createElement("div",ye(V.theme,"bigNumber"),_().createElement(Ue,Object.assign({type_name:"bigNumber"},V)),this.props.value.toString())}}])})(_().PureComponent);function Yt(){return Yt=Object.assign?Object.assign.bind():function(X){for(var F=1;F<arguments.length;F++){var V=arguments[F];for(var K in V)({}).hasOwnProperty.call(V,K)&&(X[K]=V[K])}return X},Yt.apply(null,arguments)}const Nt=T.useLayoutEffect;var qt=function(X,F){typeof X!="function"?X.current=F:X(F)};const un=function(X,F){var V=(0,T.useRef)();return(0,T.useCallback)((function(K){X.current=K,V.current&&qt(V.current,null),V.current=F,F&&qt(F,K)}),[F])};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"},Kt=function(X){Object.keys(bn).forEach((function(F){X.style.setProperty(F,bn[F],"important")}))},vt=null,Dt=function(X,F){var V=X.scrollHeight;return F.sizingStyle.boxSizing==="border-box"?V+F.borderSize:V-F.paddingSize},jn=function(){},ut=["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 F=window.getComputedStyle(X);if(F===null)return null;var V,K=(V=F,ut.reduce((function(_e,ge){return _e[ge]=V[ge],_e}),{})),ue=K.boxSizing;return ue===""?null:(Wt&&ue==="border-box"&&(K.width=parseFloat(K.width)+parseFloat(K.borderRightWidth)+parseFloat(K.borderLeftWidth)+parseFloat(K.paddingRight)+parseFloat(K.paddingLeft)+"px"),{sizingStyle:K,paddingSize:parseFloat(K.paddingBottom)+parseFloat(K.paddingTop),borderSize:parseFloat(K.borderBottomWidth)+parseFloat(K.borderTopWidth)})};function mn(X,F,V){var K,ue,_e=(K=V,ue=T.useRef(K),Nt((function(){ue.current=K})),ue);T.useLayoutEffect((function(){var ge=function(ce){return _e.current(ce)};if(X)return X.addEventListener(F,ge),function(){return X.removeEventListener(F,ge)}}),[])}var Un=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],an=function(X,F){var V=X.cacheMeasurements,K=X.maxRows,ue=X.minRows,_e=X.onChange,ge=_e===void 0?jn:_e,ce=X.onHeightChange,Me=ce===void 0?jn:ce,De=L(X,Un),qe=De.value!==void 0,Be=T.useRef(null),tt=un(Be,F),He=T.useRef(0),Ct=T.useRef(),Ot=function(){var st=Be.current,Jt=V&&Ct.current?Ct.current:En(st);if(Jt){Ct.current=Jt;var wr=(function(xr,Zo,fs,ds){fs===void 0&&(fs=1),ds===void 0&&(ds=1/0),vt||((vt=document.createElement("textarea")).setAttribute("tabindex","-1"),vt.setAttribute("aria-hidden","true"),Kt(vt)),vt.parentNode===null&&document.body.appendChild(vt);var Si=xr.paddingSize,Dr=xr.borderSize,hs=xr.sizingStyle,ll=hs.boxSizing;Object.keys(hs).forEach((function(fl){var dl=fl;vt.style[dl]=hs[dl]})),Kt(vt),vt.value=Zo;var ps=Dt(vt,xr);vt.value=Zo,ps=Dt(vt,xr),vt.value="x";var Mf=vt.scrollHeight-Si,cl=Mf*fs;ll==="border-box"&&(cl=cl+Si+Dr),ps=Math.max(cl,ps);var ul=Mf*ds;return ll==="border-box"&&(ul=ul+Si+Dr),[ps=Math.min(ul,ps),Mf]})(Jt,st.value||st.placeholder||"x",ue,K),fn=wr[0],ui=wr[1];He.current!==fn&&(He.current=fn,st.style.setProperty("height",fn+"px","important"),Me(fn,{rowHeight:ui}))}};return T.useLayoutEffect(Ot),(function(st,Jt){mn(document.body,"reset",(function(wr){st.current.form===wr.target&&Jt(wr)}))})(Be,(function(){if(!qe){var st=Be.current.value;requestAnimationFrame((function(){var Jt=Be.current;Jt&&st!==Jt.value&&Ot()}))}})),mn(window,"resize",Ot),(function(st){mn(document.fonts,"loadingdone",st)})(Ot),T.createElement("textarea",Yt({},De,{onChange:function(st){qe||Ot(),ge(st)},ref:tt}))},fr=T.forwardRef(an);function Vn(X,F){X=X.trim();try{if((X=structuredClone(X))[0]==="[")return Xt("array",JSON.parse(X));if(X[0]==="{")return Xt("object",JSON.parse(X));if(X.match(/\-?\d+\.\d+/)&&X.match(/\-?\d+\.\d+/)[0]===X)return F&&parseFloat(X).toString()!==X?Xt("bigNumber",X):Xt("float",parseFloat(X));if(X.match(/\-?\d+e-\d+/)&&X.match(/\-?\d+e-\d+/)[0]===X)return Xt("float",Number(X));if(X.match(/\-?\d+/)&&X.match(/\-?\d+/)[0]===X)return F&&parseInt(X).toString()!==X?Xt("bigNumber",X):Xt("integer",parseInt(X));if(X.match(/\-?\d+e\+\d+/)&&X.match(/\-?\d+e\+\d+/)[0]===X)return Xt("integer",Number(X))}catch{}switch(X=X.toLowerCase()){case"undefined":return Xt("undefined",void 0);case"nan":return Xt("nan",NaN);case"null":return Xt("null",null);case"true":return Xt("boolean",!0);case"false":return Xt("boolean",!1);default:if(X=Date.parse(X))return Xt("date",new Date(X))}return Xt(!1,null)}function Xt(X,F){return{type:X,value:F}}var ar=["style"],ei=["style"],Sr=["style"],Qt=["style"],Cn=["style"],Nr=["style"],bi=["style"],Os=["style"],_f=["style"],rl=["style"],il=["style"],Ef=["style"],Uo=(function(X){function F(){return g(this,F),v(this,F,arguments)}return b(F,X),y(F,[{key:"render",value:function(){var V=this.props,K=V.style,ue=q(V,ar);return _().createElement("span",ue,_().createElement("svg",Object.assign({},li(K),{viewBox:"0 0 24 24",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),_().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"})))}}])})(_().PureComponent),Vo=(function(X){function F(){return g(this,F),v(this,F,arguments)}return b(F,X),y(F,[{key:"render",value:function(){var V=this.props,K=V.style,ue=q(V,ei);return _().createElement("span",ue,_().createElement("svg",Object.assign({},li(K),{viewBox:"0 0 24 24",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),_().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"})))}}])})(_().PureComponent),sl=(function(X){function F(){return g(this,F),v(this,F,arguments)}return b(F,X),y(F,[{key:"render",value:function(){var V=this.props,K=V.style,ue=q(V,Sr),_e=li(K).style;return _().createElement("span",ue,_().createElement("svg",{fill:_e.color,width:_e.height,height:_e.width,style:_e,viewBox:"0 0 1792 1792"},_().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"})))}}])})(_().PureComponent),qo=(function(X){function F(){return g(this,F),v(this,F,arguments)}return b(F,X),y(F,[{key:"render",value:function(){var V=this.props,K=V.style,ue=q(V,Qt),_e=li(K).style;return _().createElement("span",ue,_().createElement("svg",{fill:_e.color,width:_e.height,height:_e.width,style:_e,viewBox:"0 0 1792 1792"},_().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"})))}}])})(_().PureComponent),dr=(function(X){function F(){return g(this,F),v(this,F,arguments)}return b(F,X),y(F,[{key:"render",value:function(){var V=this.props,K=V.style,ue=q(V,Cn);return _().createElement("span",ue,_().createElement("svg",{style:p(p({},li(K).style),{},{paddingLeft:"2px",verticalAlign:"top"}),viewBox:"0 0 15 15",fill:"currentColor"},_().createElement("path",{d:"M0 14l6-6-6-6z"})))}}])})(_().PureComponent),ip=(function(X){function F(){return g(this,F),v(this,F,arguments)}return b(F,X),y(F,[{key:"render",value:function(){var V=this.props,K=V.style,ue=q(V,Nr);return _().createElement("span",ue,_().createElement("svg",{style:p(p({},li(K).style),{},{paddingLeft:"2px",verticalAlign:"top"}),viewBox:"0 0 15 15",fill:"currentColor"},_().createElement("path",{d:"M0 5l6 6 6-6z"})))}}])})(_().PureComponent),Cf=(function(X){function F(){return g(this,F),v(this,F,arguments)}return b(F,X),y(F,[{key:"render",value:function(){var V=this.props,K=V.style,ue=q(V,bi);return _().createElement("span",ue,_().createElement("svg",Object.assign({},li(K),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),_().createElement("g",null,_().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"}))))}}])})(_().PureComponent),us=(function(X){function F(){return g(this,F),v(this,F,arguments)}return b(F,X),y(F,[{key:"render",value:function(){var V=this.props,K=V.style,ue=q(V,Os);return _().createElement("span",ue,_().createElement("svg",Object.assign({},li(K),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),_().createElement("g",null,_().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"}))))}}])})(_().PureComponent),Bo=(function(X){function F(){return g(this,F),v(this,F,arguments)}return b(F,X),y(F,[{key:"render",value:function(){var V=this.props,K=V.style,ue=q(V,_f);return _().createElement("span",ue,_().createElement("svg",Object.assign({},li(K),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),_().createElement("g",null,_().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"}))))}}])})(_().PureComponent),sp=(function(X){function F(){return g(this,F),v(this,F,arguments)}return b(F,X),y(F,[{key:"render",value:function(){var V=this.props,K=V.style,ue=q(V,rl);return _().createElement("span",ue,_().createElement("svg",Object.assign({},li(K),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),_().createElement("g",null,_().createElement("path",{d:"m31.6 21.6h-10v10h-3.2v-10h-10v-3.2h10v-10h3.2v10h10v3.2z"}))))}}])})(_().PureComponent),op=(function(X){function F(){return g(this,F),v(this,F,arguments)}return b(F,X),y(F,[{key:"render",value:function(){var V=this.props,K=V.style,ue=q(V,il);return _().createElement("span",ue,_().createElement("svg",Object.assign({},li(K),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),_().createElement("g",null,_().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"}))))}}])})(_().PureComponent),bc=(function(X){function F(){return g(this,F),v(this,F,arguments)}return b(F,X),y(F,[{key:"render",value:function(){var V=this.props,K=V.style,ue=q(V,Ef);return _().createElement("span",ue,_().createElement("svg",Object.assign({},li(K),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),_().createElement("g",null,_().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"}))))}}])})(_().PureComponent);function li(X){return X||(X={}),{style:p(p({verticalAlign:"middle"},X),{},{color:X.color?X.color:"#000000",height:"1em",width:"1em"})}}var ol=(function(X){function F(V){var K;return g(this,F),(K=v(this,F,[V])).copiedTimer=null,K.copyToClipboardFallback=function(ue){var _e=document.createElement("textarea");_e.value=ue,document.body.appendChild(_e),_e.select(),document.execCommand("copy"),document.body.removeChild(_e)},K.handleCopy=function(){var ue=K.props,_e=ue.clickCallback,ge=ue.src,ce=ue.namespace,Me=JSON.stringify(K.clipboardValue(ge),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 _e=="function"&&_e({src:ge,namespace:ce,name:ce[ce.length-1]})}))},K.getClippyIcon=function(){var ue=K.props.theme;return K.state.copied?_().createElement("span",null,_().createElement(Cf,Object.assign({className:"copy-icon"},ye(ue,"copy-icon"))),_().createElement("span",ye(ue,"copy-icon-copied"),"✔")):_().createElement(Cf,Object.assign({className:"copy-icon"},ye(ue,"copy-icon")))},K.clipboardValue=function(ue){switch(Z(ue)){case"function":case"regexp":return ue.toString();default:return ue}},K.state={copied:!1},K}return b(F,X),y(F,[{key:"componentWillUnmount",value:function(){this.copiedTimer&&(clearTimeout(this.copiedTimer),this.copiedTimer=null)}},{key:"render",value:function(){var V=this.props,K=(V.src,V.theme),ue=V.hidden,_e=V.rowHovered,ge=ye(K,"copy-to-clipboard").style,ce="inline";return ue&&(ce="none"),_().createElement("span",{className:"copy-to-clipboard-container",title:"Copy to clipboard",style:{verticalAlign:"top",display:_e?"inline-block":"none"}},_().createElement("span",{style:p(p({},ge),{},{display:ce}),onClick:this.handleCopy},this.getClippyIcon()))}}])})(_().PureComponent);const Sc=(function(X){function F(V){var K;return g(this,F),(K=v(this,F,[V])).getEditIcon=function(){var ue=K.props,_e=ue.variable,ge=ue.theme;return _().createElement("div",{className:"click-to-edit",style:{verticalAlign:"top",display:K.state.hovered?"inline-block":"none"}},_().createElement(op,Object.assign({className:"click-to-edit-icon"},ye(ge,"editVarIcon"),{onClick:function(){K.prepopInput(_e)}})))},K.prepopInput=function(ue){if(K.props.onEdit!==!1){var _e=(function(ce,Me){var De;switch(Z(ce,Me)){case"undefined":De="undefined";break;case"nan":De="NaN";break;case"string":De=ce;break;case"bigNumber":case"date":case"function":case"regexp":De=ce.toString();break;default:try{De=JSON.stringify(ce,null," ")}catch{De=""}}return De})(ue.value,K.props.bigNumber),ge=Vn(_e,K.props.bigNumber);K.setState({editMode:!0,editValue:_e,parsedInput:{type:ge.type,value:ge.value}})}},K.getRemoveIcon=function(){var ue=K.props,_e=ue.variable,ge=ue.namespace,ce=ue.theme,Me=ue.rjvId;return _().createElement("div",{className:"click-to-remove",style:{verticalAlign:"top",display:K.state.hovered?"inline-block":"none"}},_().createElement(us,Object.assign({className:"click-to-remove-icon"},ye(ce,"removeVarIcon"),{onClick:function(){Oe.dispatch({name:"VARIABLE_REMOVED",rjvId:Me,data:{name:_e.name,namespace:ge,existing_value:_e.value,variable_removed:!0}})}})))},K.getValue=function(ue,_e){var ge=!_e&&ue.type,ce=K.props;switch(ge){case!1:return K.getEditInput();case"string":return _().createElement(on,Object.assign({value:ue.value},ce));case"integer":return _().createElement(bt,Object.assign({value:ue.value},ce));case"float":return _().createElement($e,Object.assign({value:ue.value},ce));case"boolean":return _().createElement(Re,Object.assign({value:ue.value},ce));case"function":return _().createElement(Ke,Object.assign({value:ue.value},ce));case"null":return _().createElement(yt,ce);case"nan":return _().createElement(it,ce);case"undefined":return _().createElement(Vt,ce);case"date":return _().createElement(Ye,Object.assign({value:ue.value},ce));case"regexp":return _().createElement(ht,Object.assign({value:ue.value},ce));case"bigNumber":return _().createElement(Et,Object.assign({value:ue.value},ce));default:return _().createElement("div",{className:"object-value"},JSON.stringify(ue.value))}},K.getEditInput=function(){var ue=K.props,_e=ue.keyModifier,ge=ue.selectOnFocus,ce=ue.theme,Me=K.state.editValue;return _().createElement("div",null,_().createElement(fr,Object.assign({type:"text",ref:function(De){De&&De[ge?"select":"focus"]()},value:Me,className:"variable-editor",onChange:function(De){var qe=De.target.value,Be=Vn(qe,K.props.bigNumber);K.setState({editValue:qe,parsedInput:{type:Be.type,value:Be.value}})},onKeyDown:function(De){switch(De.key){case"Escape":K.setState({editMode:!1,editValue:""});break;case"Enter":_e(De,"submit")&&K.submitEdit(!0)}De.stopPropagation()},placeholder:"update this value",minRows:2},ye(ce,"edit-input"))),_().createElement("div",ye(ce,"edit-icon-container"),_().createElement(us,Object.assign({className:"edit-cancel"},ye(ce,"cancel-icon"),{onClick:function(De){De&&De.stopPropagation(),K.setState({editMode:!1,editValue:""})}})),_().createElement(bc,Object.assign({className:"edit-check string-value"},ye(ce,"check-icon"),{onClick:function(De){De&&De.stopPropagation(),K.submitEdit()}})),_().createElement("div",null,K.showDetected())))},K.submitEdit=function(ue){var _e=K.props,ge=_e.variable,ce=_e.namespace,Me=_e.rjvId,De=_e.bigNumber,qe=K.state,Be=qe.editValue,tt=qe.parsedInput,He=Be;ue&&tt.type&&(He=tt.value,De&&tt.type==="bigNumber"&&(He=new De(He))),K.setState({editMode:!1}),Oe.dispatch({name:"VARIABLE_UPDATED",rjvId:Me,data:{name:ge.name,namespace:ce,existing_value:ge.value,new_value:He,variable_removed:!1}})},K.showDetected=function(){var ue=K.props,_e=ue.theme,ge=(ue.variable,ue.namespace,ue.rjvId,K.state.parsedInput),ce=(ge.type,ge.value,K.getDetectedInput());if(ce)return _().createElement("div",null,_().createElement("div",ye(_e,"detected-row"),ce,_().createElement(bc,{className:"edit-check detected",style:p({verticalAlign:"top",paddingLeft:"3px"},ye(_e,"check-icon").style),onClick:function(Me){Me&&Me.stopPropagation(),K.submitEdit(!0)}})))},K.getDetectedInput=function(){var ue=K.state.parsedInput,_e=ue.type,ge=ue.value,ce=K.props,Me=ce.theme;if(_e!==!1)switch(_e.toLowerCase()){case"object":return _().createElement("span",null,_().createElement("span",{style:p(p({},ye(Me,"brace").style),{},{cursor:"default"})},"{"),_().createElement("span",{style:p(p({},ye(Me,"ellipsis").style),{},{cursor:"default"})},"..."),_().createElement("span",{style:p(p({},ye(Me,"brace").style),{},{cursor:"default"})},"}"));case"array":return _().createElement("span",null,_().createElement("span",{style:p(p({},ye(Me,"brace").style),{},{cursor:"default"})},"["),_().createElement("span",{style:p(p({},ye(Me,"ellipsis").style),{},{cursor:"default"})},"..."),_().createElement("span",{style:p(p({},ye(Me,"brace").style),{},{cursor:"default"})},"]"));case"string":return _().createElement(on,Object.assign({value:ge},ce));case"integer":return _().createElement(bt,Object.assign({value:ge},ce));case"float":return _().createElement($e,Object.assign({value:ge},ce));case"boolean":return _().createElement(Re,Object.assign({value:ge},ce));case"function":return _().createElement(Ke,Object.assign({value:ge},ce));case"null":return _().createElement(yt,ce);case"nan":return _().createElement(it,ce);case"undefined":return _().createElement(Vt,ce);case"date":return _().createElement(Ye,Object.assign({value:new Date(ge)},ce));case"bignumber":return _().createElement(Et,Object.assign({value:ge},ce))}},K.state={editMode:!1,editValue:"",hovered:!1,renameKey:!1,parsedInput:{type:!1,value:null}},K}return b(F,X),y(F,[{key:"render",value:function(){var V=this,K=this.props,ue=K.variable,_e=K.singleIndent,ge=K.type,ce=K.theme,Me=K.namespace,De=K.indentWidth,qe=K.enableClipboard,Be=K.onEdit,tt=K.onDelete,He=K.onSelect,Ct=K.displayArrayKey,Ot=K.quotesOnKeys,st=K.keyModifier,Jt=K.showComma,wr=K.isLast,fn=this.state.editMode;return _().createElement("div",Object.assign({},ye(ce,"objectKeyVal",{paddingLeft:De*_e}),{onMouseEnter:function(){return V.setState(p(p({},V.state),{},{hovered:!0}))},onMouseLeave:function(){return V.setState(p(p({},V.state),{},{hovered:!1}))},className:"variable-row",key:ue.name}),ge=="array"?Ct?_().createElement("span",Object.assign({},ye(ce,"array-key"),{key:ue.name+"_"+Me}),ue.name,_().createElement("div",ye(ce,"colon"),":")):null:_().createElement("span",null,_().createElement("span",Object.assign({},ye(ce,"object-name"),{className:"object-key",key:ue.name+"_"+Me}),!!Ot&&_().createElement("span",{style:{verticalAlign:"top"}},'"'),_().createElement("span",{style:{display:"inline-block"}},te(ue.name)),!!Ot&&_().createElement("span",{style:{verticalAlign:"top"}},'"')),_().createElement("span",ye(ce,"colon"),":")),_().createElement("div",Object.assign({className:"variable-value",onClick:He===!1&&Be===!1?null:function(ui){var xr=Le(Me);st(ui,"edit")&&Be!==!1?V.prepopInput(ue):He!==!1&&(xr.shift(),He(p(p({},ue),{},{namespace:xr})))}},ye(ce,"variableValue",{cursor:He===!1?"default":"pointer"})),this.getValue(ue,fn)),Jt&&!wr&&_().createElement("span",ye(ce,"comma"),","),qe?_().createElement(ol,{rowHovered:this.state.hovered,hidden:fn,src:ue.value,clickCallback:qe,theme:ce,namespace:[].concat(Le(Me),[ue.name])}):null,Be!==!1&&fn==0?this.getEditIcon():null,tt!==!1&&fn==0?this.getRemoveIcon():null)}}])})(_().PureComponent);var Ui=(function(X){function F(){var V;g(this,F);for(var K=arguments.length,ue=new Array(K),_e=0;_e<K;_e++)ue[_e]=arguments[_e];return(V=v(this,F,[].concat(ue))).getObjectSize=function(){var ge=V.props,ce=ge.size,Me=ge.theme;if(ge.displayObjectSize)return _().createElement("span",Object.assign({className:"object-size"},ye(Me,"object-size")),ce," item",ce===1?"":"s")},V.getAddAttribute=function(ge){var ce=V.props,Me=ce.theme,De=ce.namespace,qe=ce.name,Be=ce.src,tt=ce.rjvId,He=ce.depth;return _().createElement("span",{className:"click-to-add",style:{verticalAlign:"top",display:ge?"inline-block":"none"}},_().createElement(Bo,Object.assign({className:"click-to-add-icon"},ye(Me,"addVarIcon"),{onClick:function(){var Ct={name:He>0?qe:null,namespace:De.splice(0,De.length-1),existing_value:Be,variable_removed:!1,key_name:null};Z(Be)==="object"?Oe.dispatch({name:"ADD_VARIABLE_KEY_REQUEST",rjvId:tt,data:Ct}):Oe.dispatch({name:"VARIABLE_ADDED",rjvId:tt,data:p(p({},Ct),{},{new_value:[].concat(Le(Be),[null])})})}})))},V.getRemoveObject=function(ge){var ce=V.props,Me=ce.theme,De=(ce.hover,ce.namespace),qe=ce.name,Be=ce.src,tt=ce.rjvId;if(De.length!==1)return _().createElement("span",{className:"click-to-remove",style:{display:ge?"inline-block":"none"}},_().createElement(us,Object.assign({className:"click-to-remove-icon"},ye(Me,"removeVarIcon"),{onClick:function(){Oe.dispatch({name:"VARIABLE_REMOVED",rjvId:tt,data:{name:qe,namespace:De.splice(0,De.length-1),existing_value:Be,variable_removed:!0}})}})))},V.render=function(){var ge=V.props,ce=ge.theme,Me=ge.onDelete,De=ge.onAdd,qe=ge.enableClipboard,Be=ge.src,tt=ge.namespace,He=ge.rowHovered;return _().createElement("div",Object.assign({},ye(ce,"object-meta-data"),{className:"object-meta-data",onClick:function(Ct){Ct.stopPropagation()}}),V.getObjectSize(),qe?_().createElement(ol,{rowHovered:He,clickCallback:qe,src:Be,theme:ce,namespace:tt}):null,De!==!1?V.getAddAttribute(He):null,Me!==!1?V.getRemoveObject(He):null)},V}return b(F,X),y(F)})(_().PureComponent);function ti(X){var F=X.parent_type,V=X.namespace,K=X.quotesOnKeys,ue=X.theme,_e=X.jsvRoot,ge=X.name,ce=X.displayArrayKey,Me=X.name?X.name:"";return!_e||ge!==!1&&ge!==null?F=="array"?ce?_().createElement("span",Object.assign({},ye(ue,"array-key"),{key:V}),_().createElement("span",{className:"array-key"},Me),_().createElement("span",ye(ue,"colon"),":")):_().createElement("span",null):_().createElement("span",Object.assign({},ye(ue,"object-name"),{key:V}),_().createElement("span",{className:"object-key"},K&&_().createElement("span",{style:{verticalAlign:"top"}},'"'),_().createElement("span",null,Me),K&&_().createElement("span",{style:{verticalAlign:"top"}},'"')),_().createElement("span",ye(ue,"colon"),":")):_().createElement("span",null)}function Tf(X){var F=X.theme;switch(X.iconStyle){case"triangle":return _().createElement(ip,Object.assign({},ye(F,"expanded-icon"),{className:"expanded-icon"}));case"square":return _().createElement(sl,Object.assign({},ye(F,"expanded-icon"),{className:"expanded-icon"}));default:return _().createElement(Uo,Object.assign({},ye(F,"expanded-icon"),{className:"expanded-icon"}))}}function ap(X){var F=X.theme;switch(X.iconStyle){case"triangle":return _().createElement(dr,Object.assign({},ye(F,"collapsed-icon"),{className:"collapsed-icon"}));case"square":return _().createElement(qo,Object.assign({},ye(F,"collapsed-icon"),{className:"collapsed-icon"}));default:return _().createElement(Vo,Object.assign({},ye(F,"collapsed-icon"),{className:"collapsed-icon"}))}}var Rf=["src","groupArraysAfterLength","depth","name","theme","jsvRoot","namespace","parent_type"],Of=(function(X){function F(V){var K;return g(this,F),(K=v(this,F,[V])).toggleCollapsed=function(ue){var _e=[];for(var ge in K.state.expanded)_e.push(K.state.expanded[ge]);_e[ue]=!_e[ue],K.setState({expanded:_e})},K.state={expanded:[]},K}return b(F,X),y(F,[{key:"getExpandedIcon",value:function(V){var K=this.props,ue=K.theme,_e=K.iconStyle;return this.state.expanded[V]?_().createElement(Tf,{theme:ue,iconStyle:_e}):_().createElement(ap,{theme:ue,iconStyle:_e})}},{key:"render",value:function(){var V=this,K=this.props,ue=K.src,_e=K.groupArraysAfterLength,ge=(K.depth,K.name),ce=K.theme,Me=K.jsvRoot,De=K.namespace,qe=(K.parent_type,q(K,Rf)),Be=0,tt=5*this.props.indentWidth;Me||(Be=5*this.props.indentWidth);var He=_e,Ct=Math.ceil(ue.length/He);return _().createElement("div",Object.assign({className:"object-key-val"},ye(ce,Me?"jsv-root":"objectKeyVal",{paddingLeft:Be})),_().createElement(ti,this.props),_().createElement("span",null,_().createElement(Ui,Object.assign({size:ue.length},this.props))),Le(Array(Ct)).map((function(Ot,st){return _().createElement("div",Object.assign({key:st,className:"object-key-val array-group"},ye(ce,"objectKeyVal",{marginLeft:6,paddingLeft:tt})),_().createElement("span",ye(ce,"brace-row"),_().createElement("div",Object.assign({className:"icon-container"},ye(ce,"icon-container"),{onClick:function(Jt){V.toggleCollapsed(st)}}),V.getExpandedIcon(st)),V.state.expanded[st]?_().createElement(Ho,Object.assign({key:ge+st,depth:0,name:!1,collapsed:!1,groupArraysAfterLength:He,index_offset:st*He,src:ue.slice(st*He,st*He+He),namespace:De,type:"array",parent_type:"array_group",theme:ce,showComma:V.props.showComma,isLast:st===Ct-1},qe)):_().createElement("span",Object.assign({},ye(ce,"brace"),{onClick:function(Jt){V.toggleCollapsed(st)},className:"array-group-brace"}),"[",_().createElement("div",Object.assign({},ye(ce,"array-group-meta-data"),{className:"array-group-meta-data"}),_().createElement("span",Object.assign({className:"object-size"},ye(ce,"object-size")),st*He," - ",st*He+He>ue.length?ue.length:st*He+He)),"]")))})))}}])})(_().PureComponent),wc=["depth","src","namespace","name","type","parent_type","theme","jsvRoot","iconStyle","showComma","isLast"],Af=(function(X){function F(V){var K;g(this,F),(K=v(this,F,[V])).toggleCollapsed=function(){K.setState({expanded:!K.state.expanded},(function(){Ne.set(K.props.rjvId,K.props.namespace,"expanded",K.state.expanded)}))},K.getObjectContent=function(_e,ge,ce){return _().createElement("div",{className:"pushed-content object-container"},_().createElement("div",Object.assign({className:"object-content"},ye(K.props.theme,"pushed-content")),K.renderObjectContents(ge,ce)))},K.getEllipsis=function(){return K.state.size===0?null:_().createElement("div",Object.assign({},ye(K.props.theme,"ellipsis"),{className:"node-ellipsis",onClick:K.toggleCollapsed}),"...")},K.getObjectMetaData=function(_e){var ge=K.props,ce=(ge.rjvId,ge.theme,K.state),Me=ce.size,De=ce.hovered;return _().createElement(Ui,Object.assign({rowHovered:De,size:Me},K.props))},K.renderObjectContents=function(_e,ge){var ce,Me=K.props,De=Me.depth,qe=Me.parent_type,Be=Me.index_offset,tt=Me.groupArraysAfterLength,He=Me.namespace,Ct=Me.showComma,Ot=K.state.object_type,st=[],Jt=Object.keys(_e||{});return K.props.sortKeys&&Ot!=="array"&&(Jt=Jt.sort()),Jt.forEach((function(wr,fn){ce=new ci(wr,_e[wr],ge.bigNumber);var ui=fn===Jt.length-1;if(qe==="array_group"&&Be&&(ce.name=parseInt(ce.name)+Be),Object.prototype.hasOwnProperty.call(_e,wr))if(ce.type==="object")st.push(_().createElement(Ho,Object.assign({key:ce.name,depth:De+1,name:ce.name,src:ce.value,namespace:He.concat(ce.name),parent_type:Ot,isLast:ui,showComma:Ct},ge)));else if(ce.type==="array"){var xr=Ho;tt&&ce.value.length>tt&&(xr=Of),st.push(_().createElement(xr,Object.assign({key:ce.name,depth:De+1,name:ce.name,src:ce.value,namespace:He.concat(ce.name),type:"array",parent_type:Ot,isLast:ui,showComma:Ct},ge)))}else st.push(_().createElement(Sc,Object.assign({key:ce.name+"_"+He,variable:ce,singleIndent:5,namespace:He,type:K.props.type,isLast:ui,showComma:Ct},ge)))})),st};var ue=F.getState(V);return K.state=p(p({},ue),{},{prevProps:{}}),K}return b(F,X),y(F,[{key:"getBraceStart",value:function(V,K){var ue=this,_e=this.props,ge=(_e.src,_e.theme),ce=_e.iconStyle;if(_e.parent_type==="array_group")return _().createElement("span",null,_().createElement("span",ye(ge,"brace"),V==="array"?"[":"{"));var Me=K?Tf:ap;return _().createElement("span",null,_().createElement("span",Object.assign({onClick:function(De){ue.toggleCollapsed()}},ye(ge,"brace-row")),_().createElement("div",Object.assign({className:"icon-container"},ye(ge,"icon-container")),_().createElement(Me,{theme:ge,iconStyle:ce})),_().createElement(ti,this.props),_().createElement("span",ye(ge,"brace"),V==="array"?"[":"{")))}},{key:"render",value:function(){var V=this,K=this.props,ue=K.depth,_e=K.src,ge=(K.namespace,K.name,K.type,K.parent_type),ce=K.theme,Me=K.jsvRoot,De=K.iconStyle,qe=K.showComma,Be=K.isLast,tt=q(K,wc),He=this.state,Ct=He.object_type,Ot=He.expanded,st={};return Me||ge==="array_group"?ge==="array_group"&&(st.borderLeft=0,st.display="inline"):st.paddingLeft=5*this.props.indentWidth,_().createElement("div",Object.assign({className:"object-key-val",onMouseEnter:function(){return V.setState(p(p({},V.state),{},{hovered:!0}))},onMouseLeave:function(){return V.setState(p(p({},V.state),{},{hovered:!1}))}},ye(ce,Me?"jsv-root":"objectKeyVal",st)),this.getBraceStart(Ct,Ot),Ot?this.getObjectContent(ue,_e,p({theme:ce,iconStyle:De},tt)):this.getEllipsis(),_().createElement("span",{className:"brace-row"},_().createElement("span",{style:p(p({},ye(ce,"brace").style),{},{paddingLeft:Ot?"3px":"0px"})},Ct==="array"?"]":"}")),qe&&!Be&&!Me&&_().createElement("span",ye(ce,"comma"),","),this.getObjectMetaData(_e))}}],[{key:"getDerivedStateFromProps",value:function(V,K){var ue=K.prevProps;return V.src!==ue.src||V.collapsed!==ue.collapsed||V.name!==ue.name||V.namespace!==ue.namespace||V.rjvId!==ue.rjvId?p(p({},F.getState(V)),{},{prevProps:V}):null}}])})(_().PureComponent);Af.getState=function(X){var F=Object.keys(X.src).length,V=(X.collapsed===!1||X.collapsed!==!0&&X.collapsed>X.depth)&&(!X.shouldCollapse||X.shouldCollapse({name:X.name,src:X.src,type:Z(X.src),namespace:X.namespace})===!1)&&F!==0;return{expanded:Ne.get(X.rjvId,X.namespace,"expanded",V),object_type:X.type==="array"?"array":"object",parent_type:X.type==="array"?"array":"object",size:F,hovered:!1}};var ci=y((function X(F,V,K){g(this,X),this.name=F,this.value=V,this.type=Z(V,K)}));z(Af);const Ho=Af;var lp=(function(X){function F(){var V;g(this,F);for(var K=arguments.length,ue=new Array(K),_e=0;_e<K;_e++)ue[_e]=arguments[_e];return(V=v(this,F,[].concat(ue))).render=function(){var ge,ce,Me,De,qe=V.props,Be=[qe.name],tt=Ho;return typeof qe.name!="object"||Array.isArray(qe.name)||(Be=[((ge=qe.name)===null||ge===void 0?void 0:ge.displayName)||((ce=qe.name)===null||ce===void 0?void 0:ce.name)||((Me=qe.name)===null||Me===void 0||(De=Me.type)===null||De===void 0?void 0:De.name)||"Anonymous"]),Array.isArray(qe.src)&&qe.groupArraysAfterLength&&qe.src.length>qe.groupArraysAfterLength&&(tt=Of),_().createElement("div",{className:"pretty-json-container object-container"},_().createElement("div",{className:"object-content"},_().createElement(tt,Object.assign({namespace:Be,depth:0,jsvRoot:!0},qe))))},V}return b(F,X),y(F)})(_().PureComponent),kf=(function(X){function F(V){var K;return g(this,F),(K=v(this,F,[V])).closeModal=function(){Oe.dispatch({rjvId:K.props.rjvId,name:"RESET"})},K.submit=function(){K.props.submit(K.state.input)},K.state={input:V.input?V.input:""},K}return b(F,X),y(F,[{key:"render",value:function(){var V=this,K=this.props,ue=K.theme,_e=K.rjvId,ge=K.isValid,ce=this.state.input,Me=ge(ce);return _().createElement("div",Object.assign({className:"key-modal-request"},ye(ue,"key-modal-request"),{onClick:this.closeModal}),_().createElement("div",Object.assign({},ye(ue,"key-modal"),{onClick:function(De){De.stopPropagation()}}),_().createElement("div",ye(ue,"key-modal-label"),"Key Name:"),_().createElement("div",{style:{position:"relative"}},_().createElement("input",Object.assign({},ye(ue,"key-modal-input"),{className:"key-modal-input",ref:function(De){return De&&De.focus()},spellCheck:!1,value:ce,placeholder:"...",onChange:function(De){V.setState({input:De.target.value})},onKeyPress:function(De){Me&&De.key==="Enter"?V.submit():De.key==="Escape"&&V.closeModal()}})),Me?_().createElement(bc,Object.assign({},ye(ue,"key-modal-submit"),{className:"key-modal-submit",onClick:function(De){return V.submit()}})):null),_().createElement("span",ye(ue,"key-modal-cancel"),_().createElement(sp,Object.assign({},ye(ue,"key-modal-cancel-icon"),{className:"key-modal-cancel",onClick:function(){Oe.dispatch({rjvId:_e,name:"RESET"})}})))))}}])})(_().PureComponent),Ko=(function(X){function F(){var V;g(this,F);for(var K=arguments.length,ue=new Array(K),_e=0;_e<K;_e++)ue[_e]=arguments[_e];return(V=v(this,F,[].concat(ue))).isValid=function(ge){var ce=V.props.rjvId,Me=Ne.get(ce,"action","new-key-request");return ge!=""&&Object.keys(Me.existing_value).indexOf(ge)===-1},V.submit=function(ge){var ce=V.props.rjvId,Me=Ne.get(ce,"action","new-key-request");Me.new_value=p({},Me.existing_value),Me.new_value[ge]=V.props.defaultValue,Oe.dispatch({name:"VARIABLE_ADDED",rjvId:ce,data:Me})},V}return b(F,X),y(F,[{key:"render",value:function(){var V=this.props,K=V.active,ue=V.theme,_e=V.rjvId;return K?_().createElement(kf,{rjvId:_e,theme:ue,isValid:this.isValid,submit:this.submit}):null}}])})(_().PureComponent),cp=(function(X){function F(){return g(this,F),v(this,F,arguments)}return b(F,X),y(F,[{key:"render",value:function(){var V=this.props,K=V.message,ue=V.active,_e=V.theme,ge=V.rjvId;return ue?_().createElement("div",Object.assign({className:"validation-failure"},ye(_e,"validation-failure"),{onClick:function(){Oe.dispatch({rjvId:ge,name:"RESET"})}}),_().createElement("span",ye(_e,"validation-failure-label"),K),_().createElement(sp,ye(_e,"validation-failure-clear"))):null}}])})(_().PureComponent),al=(function(X){function F(V){var K;return g(this,F),(K=v(this,F,[V])).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 ue,_e=Ne.get(K.rjvId,"action","variable-update"),ge=_e.name,ce=_e.namespace,Me=_e.new_value,De=_e.existing_value,qe=_e.updated_src,Be=_e.type,tt=K.props,He=tt.onEdit,Ct=tt.onDelete,Ot=tt.onAdd,st={existing_src:K.state.src,new_value:Me,updated_src:qe,name:ge,namespace:ce,existing_value:De};switch(Be){case"variable-added":ue=Ot(st);break;case"variable-edited":ue=He(st);break;case"variable-removed":ue=Ct(st)}ue!==!1?(Ne.set(K.rjvId,"global","src",qe),K.setState({src:qe})):K.setState({validationFailure:!0})},K.addKeyRequest=function(){K.setState({addKeyRequest:!0})},K.resetState=function(){K.setState({validationFailure:!1,addKeyRequest:!1})},K.state={addKeyRequest:!1,editKeyRequest:!1,validationFailure:!1,src:F.defaultProps.src,name:F.defaultProps.name,theme:F.defaultProps.theme,validationMessage:F.defaultProps.validationMessage,prevSrc:F.defaultProps.src,prevName:F.defaultProps.name,prevTheme:F.defaultProps.theme},K}return b(F,X),y(F,[{key:"componentDidMount",value:function(){Ne.set(this.rjvId,"global","src",this.state.src);var V=this.getListeners();for(var K in V)Ne.on(K+"-"+this.rjvId,V[K]);this.setState({addKeyRequest:!1,editKeyRequest:!1})}},{key:"componentDidUpdate",value:function(V,K){K.addKeyRequest!==!1&&this.setState({addKeyRequest:!1}),K.editKeyRequest!==!1&&this.setState({editKeyRequest:!1}),V.src!==this.state.src&&Ne.set(this.rjvId,"global","src",this.state.src)}},{key:"componentWillUnmount",value:function(){var V=this.getListeners();for(var K in V)Ne.removeListener(K+"-"+this.rjvId,V[K])}},{key:"render",value:function(){var V=this.state,K=V.validationFailure,ue=V.validationMessage,_e=V.addKeyRequest,ge=V.theme,ce=V.src,Me=V.name,De=this.props,qe=De.style,Be=De.defaultValue;return _().createElement("div",{className:"react-json-view",style:p(p({},ye(ge,"app-container").style),qe)},_().createElement(cp,{message:ue,active:K,theme:ge,rjvId:this.rjvId}),_().createElement(lp,Object.assign({},this.props,{src:ce,name:Me,theme:ge,type:Z(ce),rjvId:this.rjvId})),_().createElement(Ko,{active:_e,theme:ge,rjvId:this.rjvId,defaultValue:Be}))}}],[{key:"getDerivedStateFromProps",value:function(V,K){if(V.src!==K.prevSrc||V.name!==K.prevName||V.theme!==K.prevTheme){var ue={src:V.src,name:V.name,theme:V.theme,validationMessage:V.validationMessage,prevSrc:V.src,prevName:V.name,prevTheme:V.theme};return F.validateState(ue)}return null}}])})(_().PureComponent);al.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},al.validateState=function(X){var F={};return Z(X.theme)!=="object"||(function(V){var K=["base00","base01","base02","base03","base04","base05","base06","base07","base08","base09","base0A","base0B","base0C","base0D","base0E","base0F"];if(Z(V)==="object"){for(var ue=0;ue<K.length;ue++)if(!(K[ue]in V))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'),F.theme="rjv-default"),Z(X.src)!=="object"&&Z(X.src)!=="array"&&(console.error("react-json-view error:","src property must be a valid json object"),F.name="ERROR",F.src={message:"src property must be a valid json object"}),p(p({},X),F)},z(al);const Go=al})(),l})()))})(Gg)),Gg.exports}var jye=Mye();const _z=Qs(jye),Pye=el("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 Nye({className:e,orientation:t,...n}){return j.jsx("div",{role:"group","data-slot":"button-group","data-orientation":t,className:cn(Pye({orientation:t}),e),...n})}function Dye({className:e,...t}){return j.jsx("label",{"data-slot":"label",className:cn("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 Iye({className:e,...t}){return j.jsx("fieldset",{"data-slot":"field-set",className:cn("gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3 flex flex-col",e),...t})}const $ye=el("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 TS({className:e,orientation:t="vertical",...n}){return j.jsx("div",{role:"group","data-slot":"field","data-orientation":t,className:cn($ye({orientation:t}),e),...n})}function RS({className:e,...t}){return j.jsx(Dye,{"data-slot":"field-label",className:cn("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 D3=(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 zye={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Ez={valid(e){return e===null?null:e?{[D3.valid]:""}:{[D3.invalid]:""}}},Lye=k.createContext({invalid:void 0,name:void 0,validityData:{state:zye,errors:[],error:"",value:"",initialValue:null},setValidityData:ji,disabled:void 0,touched:!1,setTouched:ji,dirty:!1,setDirty:ji,filled:!1,setFilled:ji,focused:!1,setFocused:ji,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=Pi)=>e,getInputValidationProps:(e=Pi)=>e,inputRef:{current:null},commit:async()=>{}}});function bh(e=!0){const t=k.useContext(Lye);if(t.setValidityData===ji&&!e)throw new Error(no(28));return t}const Fye=k.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:ji,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function Cz(){return k.useContext(Fye)}const Uye={...of};let I3=0;function Vye(e,t="mui"){const[n,r]=k.useState(e),i=e||n;return k.useEffect(()=>{n==null&&(I3+=1,r(`${t}-${I3}`))},[n,t]),i}const $3=Uye.useId;function r2(e,t){if($3!==void 0){const n=$3();return e??(t?`${t}-${n}`:n)}return Vye(e,t)}function i2(e){return r2(e,"base-ui")}const qye=k.createContext({controlId:void 0,setControlId:ji,labelId:void 0,setLabelId:ji,messageIds:[],setMessageIds:ji,getDescriptionProps:e=>e});function z0(){return k.useContext(qye)}const Bye=[];function Tz(e){k.useEffect(e,Bye)}const Td=0;class Qu{static create(){return new Qu}currentId=Td;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Td,n()},t)}isStarted(){return this.currentId!==Td}clear=()=>{this.currentId!==Td&&(clearTimeout(this.currentId),this.currentId=Td)};disposeEffect=()=>this.clear}function Ni(){const e=Zs(Qu.create).current;return Tz(e.disposeEffect),e}function Hye(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const xf=typeof navigator<"u",OS=Yye(),Rz=Xye(),Oz=Wye(),Az=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),Kye=OS.platform==="MacIntel"&&OS.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(OS.platform),Gye=xf&&/apple/i.test(navigator.vendor),yx=xf&&/android/i.test(Rz)||/android/i.test(Oz);xf&&Rz.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const Zye=Oz.includes("jsdom/");function Yye(){if(!xf)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 Wye(){if(!xf)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function Xye(){if(!xf)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const vx="data-base-ui-focusable",kz="active",Mz="selected",Qye="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Ia="ArrowLeft",$a="ArrowRight",s2="ArrowUp",ep="ArrowDown";function Oo(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Bn(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Rw(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function xs(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Ss(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 Jye(e){return e.matches("html,body")}function oi(e){return e?.ownerDocument||document}function jz(e){return sr(e)&&e.matches(Qye)}function bx(e){return e?e.getAttribute("role")==="combobox"&&jz(e):!1}function jy(e){return e?e.hasAttribute(vx)?e:e.querySelector(`[${vx}]`)||e:null}function Mu(e,t,n=!0){return e.filter(i=>i.parentId===t&&(!n||i.context?.open)).flatMap(i=>[i,...Mu(e,i.id,n)])}function z3(e,t){let n=[],r=e.find(i=>i.id===t)?.parentId;for(;r;){const i=e.find(o=>o.id===r);r=i?.parentId,i&&(n=n.concat(i))}return n}function Xr(e){e.preventDefault(),e.stopPropagation()}function e0e(e){return"nativeEvent"in e}function Pz(e){return e.mozInputSource===0&&e.isTrusted?!0:yx&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Nz(e){return Zye?!1:!yx&&e.width===0&&e.height===0||yx&&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 L3(e,t){return["mouse","pen"].includes(e)}function Dz(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const t0e=["top","right","bottom","left"],Ju=Math.min,Mi=Math.max,Py=Math.round,_u=Math.floor,Gs=e=>({x:e,y:e}),n0e={left:"right",right:"left",bottom:"top",top:"bottom"},r0e={start:"end",end:"start"};function Sx(e,t,n){return Mi(e,Ju(t,n))}function Io(e,t){return typeof e=="function"?e(t):e}function $i(e){return e.split("-")[0]}function nl(e){return e.split("-")[1]}function o2(e){return e==="x"?"y":"x"}function a2(e){return e==="y"?"height":"width"}const i0e=new Set(["top","bottom"]);function ts(e){return i0e.has($i(e))?"y":"x"}function l2(e){return o2(ts(e))}function s0e(e,t,n){n===void 0&&(n=!1);const r=nl(e),i=l2(e),o=a2(i);let l=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=Ny(l)),[l,Ny(l)]}function o0e(e){const t=Ny(e);return[wx(e),t,wx(t)]}function wx(e){return e.replace(/start|end/g,t=>r0e[t])}const F3=["left","right"],U3=["right","left"],a0e=["top","bottom"],l0e=["bottom","top"];function c0e(e,t,n){switch(e){case"top":case"bottom":return n?t?U3:F3:t?F3:U3;case"left":case"right":return t?a0e:l0e;default:return[]}}function u0e(e,t,n,r){const i=nl(e);let o=c0e($i(e),n==="start",r);return i&&(o=o.map(l=>l+"-"+i),t&&(o=o.concat(o.map(wx)))),o}function Ny(e){return e.replace(/left|right|bottom|top/g,t=>n0e[t])}function f0e(e){return{top:0,right:0,bottom:0,left:0,...e}}function Iz(e){return typeof e!="number"?f0e(e):{top:e,right:e,bottom:e,left:e}}function Dy(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function bg(e,t,n){return Math.floor(e/t)!==n}function ju(e,t){return t<0||t>=e.current.length}function Zg(e,t){return Vr(e,{disabledIndices:t})}function xx(e,t){return Vr(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Vr(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let o=t;do o+=n?-i:i;while(o>=0&&o<=e.current.length-1&&za(e,o,r));return o}function $z(e,{event:t,orientation:n,loopFocus:r,rtl:i,cols:o,disabledIndices:l,minIndex:c,maxIndex:u,prevIndex:d,stopEvent:h=!1}){let p=d;const g=[],S={};let y=!1;{let w=null,v=-1;e.current.forEach((E,b)=>{if(E==null)return;const T=E.closest('[role="row"]');T&&(y=!0),(T!==w||v===-1)&&(w=T,v+=1,g[v]=[]),g[v].push(b),S[b]=v})}const C=y&&g.length>0&&g.some(w=>w.length!==o);function x(w){if(!C||d===-1)return;const v=S[d];if(v==null)return;const E=g[v].indexOf(d);let b=w==="up"?v-1:v+1;r&&(b<0?b=g.length-1:b>=g.length&&(b=0));const T=new Set;for(;b>=0&&b<g.length&&!T.has(b);){T.add(b);const _=g[b];if(_.length===0){b=w==="up"?b-1:b+1;continue}const O=Math.min(E,_.length-1);for(let M=O;M>=0;M-=1){const P=_[M];if(!za(e,P,l))return P}b=w==="up"?b-1:b+1,r&&(b<0?b=g.length-1:b>=g.length&&(b=0))}}if(t.key===s2){const w=x("up");if(w!==void 0)h&&Xr(t),p=w;else{if(h&&Xr(t),d===-1)p=u;else if(p=Vr(e,{startingIndex:p,amount:o,decrement:!0,disabledIndices:l}),r&&(d-o<c||p<0)){const v=d%o,E=u%o,b=u-(E-v);E===v?p=u:p=E>v?b:b-o}ju(e,p)&&(p=d)}}if(t.key===ep){const w=x("down");w!==void 0?(h&&Xr(t),p=w):(h&&Xr(t),d===-1?p=c:(p=Vr(e,{startingIndex:d,amount:o,disabledIndices:l}),r&&d+o>u&&(p=Vr(e,{startingIndex:d%o-o,amount:o,disabledIndices:l}))),ju(e,p)&&(p=d))}if(n==="both"){const w=_u(d/o);t.key===(i?Ia:$a)&&(h&&Xr(t),d%o!==o-1?(p=Vr(e,{startingIndex:d,disabledIndices:l}),r&&bg(p,o,w)&&(p=Vr(e,{startingIndex:d-d%o-1,disabledIndices:l}))):r&&(p=Vr(e,{startingIndex:d-d%o-1,disabledIndices:l})),bg(p,o,w)&&(p=d)),t.key===(i?$a:Ia)&&(h&&Xr(t),d%o!==0?(p=Vr(e,{startingIndex:d,decrement:!0,disabledIndices:l}),r&&bg(p,o,w)&&(p=Vr(e,{startingIndex:d+(o-d%o),decrement:!0,disabledIndices:l}))):r&&(p=Vr(e,{startingIndex:d+(o-d%o),decrement:!0,disabledIndices:l})),bg(p,o,w)&&(p=d));const v=_u(u/o)===w;ju(e,p)&&(r&&v?p=t.key===(i?$a:Ia)?u:Vr(e,{startingIndex:d-d%o-1,disabledIndices:l}):p=d)}return p}function zz(e,t,n){const r=[];let i=0;return e.forEach(({width:o,height:l},c)=>{let u=!1;for(n&&(i=0);!u;){const d=[];for(let h=0;h<o;h+=1)for(let p=0;p<l;p+=1)d.push(i+h+p*t);i%t+o<=t&&d.every(h=>r[h]==null)?(d.forEach(h=>{r[h]=c}),u=!0):i+=1}}),[...r]}function Lz(e,t,n,r,i){if(e===-1)return-1;const o=n.indexOf(e),l=t[e];switch(i){case"tl":return o;case"tr":return l?o+l.width-1:o;case"bl":return l?o+(l.height-1)*r:o;case"br":return n.lastIndexOf(e);default:return-1}}function Fz(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 d0e=["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])"],Iy=d0e.join(","),Uz=typeof Element>"u",ef=Uz?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,$y=!Uz&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},Sh=function(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),o=i===""||i==="true",l=o||n&&t&&Sh(t.parentNode);return l},h0e=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},Vz=function(t,n,r){if(Sh(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(Iy));return n&&ef.call(t,Iy)&&i.unshift(t),i=i.filter(r),i},zy=function(t,n,r){for(var i=[],o=Array.from(t);o.length;){var l=o.shift();if(!Sh(l,!1))if(l.tagName==="SLOT"){var c=l.assignedElements(),u=c.length?c:l.children,d=zy(u,!0,r);r.flatten?i.push.apply(i,d):i.push({scopeParent:l,candidates:d})}else{var h=ef.call(l,Iy);h&&r.filter(l)&&(n||!t.includes(l))&&i.push(l);var p=l.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(l),g=!Sh(p,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(l));if(p&&g){var S=zy(p===!0?l.children:p.children,!0,r);r.flatten?i.push.apply(i,S):i.push({scopeParent:l,candidates:S})}else o.unshift.apply(o,l.children)}}return i},qz=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Bz=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||h0e(t))&&!qz(t)?0:t.tabIndex},p0e=function(t,n){var r=Bz(t);return r<0&&n&&!qz(t)?0:r},m0e=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Hz=function(t){return t.tagName==="INPUT"},g0e=function(t){return Hz(t)&&t.type==="hidden"},y0e=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},v0e=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},b0e=function(t){if(!t.name)return!0;var n=t.form||$y(t),r=function(c){return n.querySelectorAll('input[type="radio"][name="'+c+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(t.name));else try{i=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 o=v0e(i,t.form);return!o||o===t},S0e=function(t){return Hz(t)&&t.type==="radio"},w0e=function(t){return S0e(t)&&!b0e(t)},x0e=function(t){var n,r=t&&$y(t),i=(n=r)===null||n===void 0?void 0:n.host,o=!1;if(r&&r!==t){var l,c,u;for(o=!!((l=i)!==null&&l!==void 0&&(c=l.ownerDocument)!==null&&c!==void 0&&c.contains(i)||t!=null&&(u=t.ownerDocument)!==null&&u!==void 0&&u.contains(t));!o&&i;){var d,h,p;r=$y(i),i=(d=r)===null||d===void 0?void 0:d.host,o=!!((h=i)!==null&&h!==void 0&&(p=h.ownerDocument)!==null&&p!==void 0&&p.contains(i))}}return o},V3=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},_0e=function(t,n){var r=n.displayCheck,i=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var o=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!o}if(getComputedStyle(t).visibility==="hidden")return!0;var l=ef.call(t,"details>summary:first-of-type"),c=l?t.parentElement:t;if(ef.call(c,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof i=="function"){for(var u=t;t;){var d=t.parentElement,h=$y(t);if(d&&!d.shadowRoot&&i(d)===!0)return V3(t);t.assignedSlot?t=t.assignedSlot:!d&&h!==t.ownerDocument?t=h.host:t=d}t=u}if(x0e(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return V3(t);return!1},E0e=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 i=n.children.item(r);if(i.tagName==="LEGEND")return ef.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},_x=function(t,n){return!(n.disabled||Sh(n)||g0e(n)||_0e(n,t)||y0e(n)||E0e(n))},Ex=function(t,n){return!(w0e(n)||Bz(n)<0||!_x(t,n))},C0e=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Kz=function(t){var n=[],r=[];return t.forEach(function(i,o){var l=!!i.scopeParent,c=l?i.scopeParent:i,u=p0e(c,l),d=l?Kz(i.candidates):c;u===0?l?n.push.apply(n,d):n.push(c):r.push({documentOrder:o,tabIndex:u,item:i,isScope:l,content:d})}),r.sort(m0e).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},L0=function(t,n){n=n||{};var r;return n.getShadowRoot?r=zy([t],n.includeContainer,{filter:Ex.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:C0e}):r=Vz(t,n.includeContainer,Ex.bind(null,n)),Kz(r)},T0e=function(t,n){n=n||{};var r;return n.getShadowRoot?r=zy([t],n.includeContainer,{filter:_x.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=Vz(t,n.includeContainer,_x.bind(null,n)),r},Gz=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return ef.call(t,Iy)===!1?!1:Ex(n,t)};const tp=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Zz(e,t){const n=L0(e,tp()),r=n.length;if(r===0)return;const i=Oo(oi(e)),o=n.indexOf(i),l=o===-1?t===1?0:r-1:o+t;return n[l]}function Yz(e){return Zz(oi(e).body,1)||e}function Wz(e){return Zz(oi(e).body,-1)||e}function Zd(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Bn(n,r)}function R0e(e){L0(e,tp()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function q3(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 Ly({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=k.useRef(e!==void 0),[o,l]=k.useState(t),c=i?e:o,u=k.useCallback(d=>{i||l(d)},[]);return[c,u]}function Xz(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,setControlId:o}=z0(),l=i2(t);return nt(()=>{if(!(!n&&!t||o===ji)){if(n){const c=r?.current;Kn(c)&&c.closest("label")!=null?o(t??null):o(i??l)}else t&&o(t);return()=>{t&&o(void 0)}}},[t,r,i,o,n,l]),i??l}function Qz(e){const{enabled:t=!0,value:n,id:r,name:i,controlRef:o,commit:l}=e,{formRef:c}=Cz(),{invalid:u,markedDirtyRef:d,validityData:h,setValidityData:p}=bh(),g=at(e.getValue);nt(()=>{if(!t)return;let S=n;S===void 0&&(S=g()),h.initialValue===null&&S!==null&&p(y=>({...y,initialValue:S}))},[t,p,n,h.initialValue,g]),nt(()=>{!t||!r||c.current.fields.set(r,{getValue:g,name:i,controlRef:o,validityData:Hye(h,u),validate(){let S=n;S===void 0&&(S=g()),d.current=!0,Do.flushSync(()=>l(S))}})},[l,o,t,c,g,r,u,d,i,h,n]),nt(()=>{const S=c.current.fields;return()=>{r&&S.delete(r)}},[c,r])}const tf="none",Yd="trigger-press",O0e="trigger-hover",Jz="outside-press",AS="item-press",F0="focus-out",A0e="escape-key",kS="list-navigation",k0e="cancel-open",M0e="window-resize";function kn(e,t,n,r){let i=!1,o=!1;const l=r??Pi;return{reason:e,event:t??new Event("base-ui"),cancel(){i=!0},allowPropagation(){o=!0},get isCanceled(){return i},get isPropagationAllowed(){return o},trigger:n,...l}}const j0e=k.forwardRef(function(t,n){const{render:r,className:i,id:o,name:l,value:c,disabled:u=!1,onValueChange:d,defaultValue:h,...p}=t,{state:g,name:S,disabled:y}=bh(),C=y||u,x=S??l,w=k.useMemo(()=>({...g,disabled:C}),[g,C]),{setTouched:v,setDirty:E,validityData:b,setFocused:T,setFilled:_,validationMode:O,validation:M}=bh(),{labelId:P}=z0(),z=Xz({id:o});nt(()=>{const G=c!=null;M.inputRef.current?.value||G&&c!==""?_(!0):G&&c===""&&_(!1)},[M.inputRef,_,c]);const[L,q]=Ly({controlled:c,default:h,name:"FieldControl",state:"value"}),Z=c!==void 0,te=at((G,H)=>{d?.(G,H),!H.isCanceled&&q(G)});return Qz({id:z,name:x,commit:M.commit,value:L,getValue:()=>M.inputRef.current?.value,controlRef:M.inputRef}),Pr("input",t,{ref:n,state:w,props:[{id:z,disabled:C,name:x,ref:M.inputRef,"aria-labelledby":P,...Z?{value:L}:{defaultValue:h},onChange(G){const H=G.currentTarget.value;te(H,kn(tf,G.nativeEvent)),E(H!==b.initialValue),_(H!=="")},onFocus(){T(!0)},onBlur(G){v(!0),T(!1),O==="onBlur"&&M.commit(G.currentTarget.value)},onKeyDown(G){G.currentTarget.tagName==="INPUT"&&G.key==="Enter"&&(v(!0),M.commit(G.currentTarget.value))}},M.getInputValidationProps(),p],stateAttributesMapping:Ez})}),P0e=k.forwardRef(function(t,n){return j.jsx(j0e,{ref:n,...t})});function N0e({className:e,type:t,...n}){return j.jsx(P0e,{type:t,"data-slot":"input",className:cn("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 c2={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 D0e(e){const t=k.useRef(!0);t.current&&(t.current=!1,e())}function Hr(e){const t=Zs(I0e,e).current;return t.next=e,nt(t.effect),t}function I0e(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var Fy=Symbol("NOT_FOUND");function $0e(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function z0e(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function L0e(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 B3=e=>Array.isArray(e)?e:[e];function F0e(e){const t=Array.isArray(e[0])?e[0]:e;return L0e(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function U0e(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}function V0e(e){let t;return{get(n){return t&&e(t.key,n)?t.value:Fy},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function q0e(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 Fy}function i(c,u){r(c)===Fy&&(n.unshift({key:c,value:u}),n.length>e&&n.pop())}function o(){return n}function l(){n=[]}return{get:r,put:i,getEntries:o,clear:l}}var B0e=(e,t)=>e===t;function H0e(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:i}=n;for(let o=0;o<i;o++)if(!e(n[o],r[o]))return!1;return!0}}function K0e(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=B0e,maxSize:i=1,resultEqualityCheck:o}=n,l=H0e(r);let c=0;const u=i<=1?V0e(l):q0e(i,l);function d(){let h=u.get(arguments);if(h===Fy){if(h=e.apply(null,arguments),c++,o){const g=u.getEntries().find(S=>o(S.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 G0e=class{constructor(e){this.value=e}deref(){return this.value}},Z0e=typeof WeakRef<"u"?WeakRef:G0e,Y0e=0,H3=1;function Sg(){return{s:Y0e,v:void 0,o:null,p:null}}function e6(e,t={}){let n=Sg();const{resultEqualityCheck:r}=t;let i,o=0;function l(){let c=n;const{length:u}=arguments;for(let p=0,g=u;p<g;p++){const S=arguments[p];if(typeof S=="function"||typeof S=="object"&&S!==null){let y=c.o;y===null&&(c.o=y=new WeakMap);const C=y.get(S);C===void 0?(c=Sg(),y.set(S,c)):c=C}else{let y=c.p;y===null&&(c.p=y=new Map);const C=y.get(S);C===void 0?(c=Sg(),y.set(S,c)):c=C}}const d=c;let h;if(c.s===H3)h=c.v;else if(h=e.apply(null,arguments),o++,r){const p=i?.deref?.()??i;p!=null&&r(p,h)&&(h=p,o!==0&&o--),i=typeof h=="object"&&h!==null||typeof h=="function"?new Z0e(h):h}return d.s=H3,d.v=h,h}return l.clearCache=()=>{n=Sg(),l.resetResultsCount()},l.resultsCount=()=>o,l.resetResultsCount=()=>{o=0},l}function t6(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let o=0,l=0,c,u={},d=i.pop();typeof d=="object"&&(u=d,d=i.pop()),$0e(d,`createSelector expects an output function after the inputs, but received: [${typeof d}]`);const h={...n,...u},{memoize:p,memoizeOptions:g=[],argsMemoize:S=e6,argsMemoizeOptions:y=[]}=h,C=B3(g),x=B3(y),w=F0e(i),v=p(function(){return o++,d.apply(null,arguments)},...C),E=S(function(){l++;const T=U0e(w,arguments);return c=v.apply(null,T),c},...x);return Object.assign(E,{resultFunc:d,memoizedResultFunc:v,dependencies:w,dependencyRecomputations:()=>l,resetDependencyRecomputations:()=>{l=0},lastResult:()=>c,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:p,argsMemoize:S})};return Object.assign(r,{withTypes:()=>r}),r}var W0e=t6(e6),X0e=Object.assign((e,t=W0e)=>{z0e(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(o=>e[o]);return t(r,(...o)=>o.reduce((l,c,u)=>(l[n[u]]=c,l),{}))},{withTypes:()=>X0e});t6({memoize:K0e,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const nn=(e,t,n,r,i,o,...l)=>{if(l.length>0)throw new Error(no(1));let c;if(e)c=e;else throw new Error("Missing arguments");return c};var MS={exports:{}},jS={};var K3;function Q0e(){if(K3)return jS;K3=1;var e=sf();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,i=e.useEffect,o=e.useLayoutEffect,l=e.useDebugValue;function c(p,g){var S=g(),y=r({inst:{value:S,getSnapshot:g}}),C=y[0].inst,x=y[1];return o(function(){C.value=S,C.getSnapshot=g,u(C)&&x({inst:C})},[p,S,g]),i(function(){return u(C)&&x({inst:C}),p(function(){u(C)&&x({inst:C})})},[p]),l(S),S}function u(p){var g=p.getSnapshot;p=p.value;try{var S=g();return!n(p,S)}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 jS.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,jS}var G3;function n6(){return G3||(G3=1,MS.exports=Q0e()),MS.exports}var J0e=n6(),PS={exports:{}},NS={};var Z3;function eve(){if(Z3)return NS;Z3=1;var e=sf(),t=n6();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,i=t.useSyncExternalStore,o=e.useRef,l=e.useEffect,c=e.useMemo,u=e.useDebugValue;return NS.useSyncExternalStoreWithSelector=function(d,h,p,g,S){var y=o(null);if(y.current===null){var C={hasValue:!1,value:null};y.current=C}else C=y.current;y=c(function(){function w(_){if(!v){if(v=!0,E=_,_=g(_),S!==void 0&&C.hasValue){var O=C.value;if(S(O,_))return b=O}return b=_}if(O=b,r(E,_))return O;var M=g(_);return S!==void 0&&S(O,M)?(E=_,O):(E=_,b=M)}var v=!1,E,b,T=p===void 0?null:p;return[function(){return w(h())},T===null?void 0:function(){return w(T())}]},[h,p,g,S]);var x=i(d,y[0],y[1]);return l(function(){C.hasValue=!0,C.value=x},[x]),u(x),x},NS}var Y3;function tve(){return Y3||(Y3=1,PS.exports=eve()),PS.exports}var nve=tve();const rve=K_(19),ive=rve?sve:ove;function wt(e,t,n,r,i){return ive(e,t,n,r,i)}function sve(e,t,n,r,i){const o=k.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return J0e.useSyncExternalStore(e.subscribe,o,o)}function ove(e,t,n,r,i){return nve.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,o=>t(o,n,r,i))}class Pu{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])){Pu.prototype.setState.call(this,{...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||Pu.prototype.setState.call(this,{...this.state,[t]:n})}notifyAll(){const t={...this.state};Pu.prototype.setState.call(this,t)}}class ave extends Pu{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}controlledValues=new Map;useSyncedValue(t,n){k.useDebugValue(t),nt(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){nt(()=>(this.state[t]!==n&&this.set(t,n),()=>{this.set(t,void 0)}),[t,n])}useSyncedValues(t){const n=Object.values(t);nt(()=>{this.update(t)},n)}useControlledProp(t,n,r){k.useDebugValue(t);const i=n!==void 0;this.controlledValues.has(t)||(this.controlledValues.set(t,i),!i&&!Object.is(this.state[t],r)&&super.setState({...this.state,[t]:r})),nt(()=>{i&&!Object.is(this.state[t],n)&&super.setState({...this.state,[t]:n})},[t,n,r,i])}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,i)=>{const o=this.selectors[t];return o(this.state,n,r,i)};useState=(t,n,r,i)=>{k.useDebugValue(t);const o=this.selectors[t];return wt(this,o,n,r,i)};useContextCallback(t,n){k.useDebugValue(t);const r=at(n??ji);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 i=r(this.state);return n(i,i,this),this.subscribe(o=>{const l=r(o);if(!Object.is(i,l)){const c=i;i=l,n(l,c,this)}})}}const wg=null;class lve{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 i=0;i<n.length;i+=1)n[i]?.(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 lve;class zs{static create(){return new zs}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 U0(){const e=Zs(zs.create).current;return Tz(e.disposeEffect),e}function cve(){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 uve=k.createContext(null),fve=k.createContext(null),r6=()=>k.useContext(uve)?.id||null,V0=e=>{const t=k.useContext(fve);return e??t};function Uy(e){return`data-base-ui-${e}`}function Xs(e){return e?.ownerDocument||document}const Vy=k.forwardRef(function(t,n){const[r,i]=k.useState();nt(()=>{Gye&&i("button")},[]);const o={tabIndex:0,role:r};return j.jsx("span",{...t,ref:n,style:c2,"aria-hidden":r?void 0:!0,...o,"data-base-ui-focus-guard":""})});let W3=0;function Yg(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(W3);const o=()=>e?.focus({preventScroll:n});i?o():W3=requestAnimationFrame(o)}const Nu={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function X3(e){return e==="inert"?Nu.inert:e==="aria-hidden"?Nu["aria-hidden"]:Nu.none}let _g=new WeakSet,Eg={},DS=0;const i6=e=>e&&(e.host||i6(e.parentNode)),dve=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=i6(n);return e.contains(r)?r:null}).filter(n=>n!=null);function hve(e,t,n,r){const i="data-base-ui-inert",o=r?"inert":n?"aria-hidden":null,l=dve(t,e),c=new Set,u=new Set(l),d=[];Eg[i]||(Eg[i]=new WeakMap);const h=Eg[i];l.forEach(p),g(t),c.clear();function p(S){!S||c.has(S)||(c.add(S),S.parentNode&&p(S.parentNode))}function g(S){!S||u.has(S)||[].forEach.call(S.children,y=>{if(Ja(y)!=="script")if(c.has(y))g(y);else{const C=o?y.getAttribute(o):null,x=C!==null&&C!=="false",w=X3(o),v=(w.get(y)||0)+1,E=(h.get(y)||0)+1;w.set(y,v),h.set(y,E),d.push(y),v===1&&x&&_g.add(y),E===1&&y.setAttribute(i,""),!x&&o&&y.setAttribute(o,o==="inert"?"":"true")}})}return DS+=1,()=>{d.forEach(S=>{const y=X3(o),x=(y.get(S)||0)-1,w=(h.get(S)||0)-1;y.set(S,x),h.set(S,w),x||(!_g.has(S)&&o&&S.removeAttribute(o),_g.delete(S)),w||S.removeAttribute(i)}),DS-=1,DS||(Nu.inert=new WeakMap,Nu["aria-hidden"]=new WeakMap,Nu.none=new WeakMap,_g=new WeakSet,Eg={})}}function pve(e,t=!1,n=!1){const r=oi(e[0]).body;return hve(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const s6=k.createContext(null),o6=()=>k.useContext(s6),mve=Uy("portal");function gve(e={}){const{ref:t,container:n,componentProps:r=Pi,elementProps:i,elementState:o}=e,l=r2(),u=o6()?.portalNode,[d,h]=k.useState(null),[p,g]=k.useState(null),S=k.useRef(null);nt(()=>{if(n===null){S.current&&(S.current=null,g(null),h(null));return}if(l==null)return;const x=(n&&(B_(n)?n:n.current))??u??document.body;if(x==null){S.current&&(S.current=null,g(null),h(null));return}S.current!==x&&(S.current=x,g(null),h(x))},[n,u,l]);const y=Pr("div",r,{ref:[t,g],state:o,props:[{id:l,[mve]:""},i]});return{portalNode:p,portalSubtree:d&&y?Do.createPortal(y,d):null}}const yve=k.forwardRef(function(t,n){const{children:r,container:i,className:o,render:l,renderGuards:c,...u}=t,{portalNode:d,portalSubtree:h}=gve({container:i,ref:n,componentProps:t,elementProps:u}),p=k.useRef(null),g=k.useRef(null),S=k.useRef(null),y=k.useRef(null),[C,x]=k.useState(null),w=C?.modal,v=C?.open,E=typeof c=="boolean"?c:!!C&&!C.modal&&C.open&&!!d;k.useEffect(()=>{if(!d||w)return;function T(_){d&&Zd(_)&&(_.type==="focusin"?q3:R0e)(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||q3(d)},[v,d]);const b=k.useMemo(()=>({beforeOutsideRef:p,afterOutsideRef:g,beforeInsideRef:S,afterInsideRef:y,portalNode:d,setFocusManagerState:x}),[d]);return j.jsxs(k.Fragment,{children:[h,j.jsxs(s6.Provider,{value:b,children:[E&&d&&j.jsx(Vy,{"data-type":"outside",ref:p,onFocus:T=>{if(Zd(T,d))S.current?.focus();else{const _=C?C.domReference:null;Wz(_)?.focus()}}}),E&&d&&j.jsx("span",{"aria-owns":d.id,style:Cre}),d&&Do.createPortal(r,d),E&&d&&j.jsx(Vy,{"data-type":"outside",ref:g,onFocus:T=>{if(Zd(T,d))y.current?.focus();else{const _=C?C.domReference:null;Yz(_)?.focus(),C?.closeOnFocusOut&&C?.onOpenChange(!1,kn(F0,T.nativeEvent))}}})]})]})});function Fl(e){return e==null?e:"current"in e?e.current:e}function vve(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 Q3=20;let Oa=[];function u2(){Oa=Oa.filter(e=>e.isConnected)}function bve(e){u2(),e&&Ja(e)!=="body"&&(Oa.push(e),Oa.length>Q3&&(Oa=Oa.slice(-Q3)))}function IS(){return u2(),Oa[Oa.length-1]}function Sve(e){if(!e)return null;const t=tp();return Gz(e,t)?e:L0(e,t)[0]||e}function wve(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():zi(e).display!=="none"}function J3(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const n=tp(),i=T0e(e,n).filter(l=>{const c=l.getAttribute("data-tabindex")||"";return Gz(l,n)||l.hasAttribute("data-tabindex")&&!c.startsWith("-")}),o=e.getAttribute("tabindex");t.current.includes("floating")||i.length===0?o!=="0"&&e.setAttribute("tabindex","0"):(o!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function xve(e){const{context:t,children:n,disabled:r=!1,order:i=["content"],initialFocus:o=!0,returnFocus:l=!0,restoreFocus:c=!1,modal:u=!0,closeOnFocusOut:d=!0,openInteractionType:h="",getInsideElements:p=()=>[],nextFocusableElement:g,previousFocusableElement:S,beforeContentFocusGuardRef:y,externalTree:C}=e,x="rootStore"in t?t.rootStore:t,w=x.useState("open"),v=x.useState("domReferenceElement"),E=x.useState("floatingElement"),{events:b,dataRef:T}=x.context,_=at(()=>T.current.floatingContext?.nodeId),O=at(p),M=o===!1,P=bx(v)&&M,z=Hr(i),L=Hr(o),q=Hr(l),Z=Hr(h),te=V0(C),ee=o6(),G=k.useRef(null),H=k.useRef(null),Y=k.useRef(!1),oe=k.useRef(!1),re=k.useRef(!1),I=k.useRef(-1),B=k.useRef(""),$=k.useRef(""),N=Ni(),U=Ni(),J=U0(),ne=ee!=null,se=jy(E),he=at((we=se)=>we?L0(we,tp()):[]),Ee=at(we=>{const Ie=he(we);return z.current.map(()=>Ie).filter(Boolean).flat()});k.useEffect(()=>{if(r||!u)return;function we(Fe){Fe.key==="Tab"&&Bn(se,Oo(oi(se)))&&he().length===0&&!P&&Xr(Fe)}const Ie=oi(se);return Ie.addEventListener("keydown",we),()=>{Ie.removeEventListener("keydown",we)}},[r,v,se,u,z,P,he,Ee]),k.useEffect(()=>{if(r||!E)return;function we(Ie){const Fe=xs(Ie),Ue=he().indexOf(Fe);Ue!==-1&&(I.current=Ue)}return E.addEventListener("focusin",we),()=>{E.removeEventListener("focusin",we)}},[r,E,he]),k.useEffect(()=>{if(r||!w)return;const we=oi(se);function Ie(){re.current=!1}function Fe(Ue){const Re=xs(Ue),Ye=Bn(E,Re)||Bn(v,Re)||Bn(ee?.portalNode,Re);re.current=!Ye,$.current=Ue.pointerType||"keyboard"}function ye(){$.current="keyboard"}return we.addEventListener("pointerdown",Fe,!0),we.addEventListener("pointerup",Ie,!0),we.addEventListener("pointercancel",Ie,!0),we.addEventListener("keydown",ye,!0),()=>{we.removeEventListener("pointerdown",Fe,!0),we.removeEventListener("pointerup",Ie,!0),we.removeEventListener("pointercancel",Ie,!0),we.removeEventListener("keydown",ye,!0)}},[r,E,v,se,w,ee]),k.useEffect(()=>{if(r||!d)return;function we(){oe.current=!0,U.start(0,()=>{oe.current=!1})}function Ie(Re){const Ye=Re.relatedTarget,$e=Re.currentTarget,Le=xs(Re);queueMicrotask(()=>{const Ve=_(),ft=x.context.triggerElements,Oe=!(Bn(v,Ye)||Bn(E,Ye)||Bn(Ye,E)||Bn(ee?.portalNode,Ye)||Ye!=null&&ft.hasElement(Ye)||ft.hasMatchingElement(me=>Bn(me,Ye))||Ye?.hasAttribute(Uy("focus-guard"))||te&&(Mu(te.nodesRef.current,Ve).find(me=>Bn(me.context?.elements.floating,Ye)||Bn(me.context?.elements.domReference,Ye))||z3(te.nodesRef.current,Ve).find(me=>[me.context?.elements.floating,jy(me.context?.elements.floating)].includes(Ye)||me.context?.elements.domReference===Ye)));if($e===v&&se&&J3(se,z),c&&$e!==v&&!wve(Le)&&Oo(oi(se))===oi(se).body){if(sr(se)&&(se.focus(),c==="popup")){J.request(()=>{se.focus()});return}const me=I.current,Ne=he(),Ke=Ne[me]||Ne[Ne.length-1]||se;sr(Ke)&&Ke.focus()}if(T.current.insideReactTree){T.current.insideReactTree=!1;return}(P||!u)&&Ye&&Oe&&!oe.current&&(P||Ye!==IS())&&(Y.current=!0,x.setOpen(!1,kn(F0,Re)))})}function Fe(){re.current||(T.current.insideReactTree=!0,N.start(0,()=>{T.current.insideReactTree=!1}))}const ye=sr(v)?v:null,Ue=[];if(!(!E&&!ye))return ye&&(ye.addEventListener("focusout",Ie),ye.addEventListener("pointerdown",we),Ue.push(()=>{ye.removeEventListener("focusout",Ie),ye.removeEventListener("pointerdown",we)})),E&&(E.addEventListener("focusout",Ie),ee&&(E.addEventListener("focusout",Fe,!0),Ue.push(()=>{E.removeEventListener("focusout",Fe,!0)})),Ue.push(()=>{E.removeEventListener("focusout",Ie)})),()=>{Ue.forEach(Re=>{Re()})}},[r,v,E,se,u,te,ee,x,d,c,he,P,_,z,T,N,U,J]);const Q=k.useRef(null),ie=k.useRef(null),le=qa(Q,y,ee?.beforeInsideRef),Se=qa(ie,ee?.afterInsideRef);k.useEffect(()=>{if(r||!E||!w)return;const we=Array.from(ee?.portalNode?.querySelectorAll(`[${Uy("portal")}]`)||[]),Fe=(te?z3(te.nodesRef.current,_()):[]).find(Re=>bx(Re.context?.elements.domReference||null))?.context?.elements.domReference,ye=[E,Fe,...we,...O(),G.current,H.current,Q.current,ie.current,ee?.beforeOutsideRef.current,ee?.afterOutsideRef.current,Fl(S),Fl(g),P?v:null].filter(Re=>Re!=null),Ue=pve(ye,u||P);return()=>{Ue()}},[w,r,v,E,u,z,ee,P,te,_,O,g,S]),nt(()=>{if(!w||r||!sr(se))return;const we=oi(se),Ie=Oo(we);queueMicrotask(()=>{const Fe=Ee(se),ye=L.current,Ue=typeof ye=="function"?ye(Z.current||""):ye;if(Ue===void 0||Ue===!1)return;let Re;Ue===!0||Ue===null?Re=Fe[0]||se:Re=Fl(Ue),Re=Re||Fe[0]||se,!Bn(se,Ie)&&Yg(Re,{preventScroll:Re===se})})},[r,w,se,M,Ee,L,Z]),nt(()=>{if(r||!se)return;const we=oi(se),Ie=Oo(we);bve(Ie);function Fe(Re){if(Re.open||(B.current=vve(Re.nativeEvent,$.current)),Re.reason===O0e&&Re.nativeEvent.type==="mouseleave"&&(Y.current=!0),Re.reason===Jz)if(Re.nested)Y.current=!1;else if(Pz(Re.nativeEvent)||Nz(Re.nativeEvent))Y.current=!1;else{let Ye=!1;document.createElement("div").focus({get preventScroll(){return Ye=!0,!1}}),Ye?Y.current=!1:Y.current=!0}}b.on("openchange",Fe);const ye=we.createElement("span");ye.setAttribute("tabindex","-1"),ye.setAttribute("aria-hidden","true"),Object.assign(ye.style,c2),ne&&v&&v.insertAdjacentElement("afterend",ye);function Ue(){const Re=q.current;let Ye=typeof Re=="function"?Re(B.current):Re;if(Ye===void 0||Ye===!1)return null;if(Ye===null&&(Ye=!0),typeof Ye=="boolean"){const Le=v||IS();return Le&&Le.isConnected?Le:ye}const $e=v||IS()||ye;return Fl(Ye)||$e}return()=>{b.off("openchange",Fe);const Re=Oo(we),Ye=Bn(E,Re)||te&&Mu(te.nodesRef.current,_(),!1).some(Le=>Bn(Le.context?.elements.floating,Re)),$e=Ue();queueMicrotask(()=>{const Le=Sve($e),Ve=typeof q.current!="boolean";q.current&&!Y.current&&sr(Le)&&(!(!Ve&&Le!==Re&&Re!==we.body)||Ye)&&Le.focus({preventScroll:!0}),ye.remove()})}},[r,E,se,q,T,b,te,ne,v,_]),k.useEffect(()=>{queueMicrotask(()=>{Y.current=!1})},[r]),k.useEffect(()=>{if(r||!w)return;function we(Fe){xs(Fe)?.closest(`[${_re}]`)&&(oe.current=!0)}const Ie=oi(se);return Ie.addEventListener("pointerdown",we,!0),()=>{Ie.removeEventListener("pointerdown",we,!0)}},[r,w,se]),nt(()=>{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]),nt(()=>{if(!(r||!se))return J3(se,z),()=>{queueMicrotask(u2)}},[r,se,z]);const Te=!r&&(u?!P:!0)&&(ne||u);return j.jsxs(k.Fragment,{children:[Te&&j.jsx(Vy,{"data-type":"inside",ref:le,onFocus:we=>{if(u){const Ie=Ee();Yg(Ie[Ie.length-1])}else ee?.portalNode&&(Y.current=!1,Zd(we,ee.portalNode)?Yz(v)?.focus():Fl(S??ee.beforeOutsideRef)?.focus())}}),n,Te&&j.jsx(Vy,{"data-type":"inside",ref:Se,onFocus:we=>{u?Yg(Ee()[0]):ee?.portalNode&&(d&&(Y.current=!0),Zd(we,ee.portalNode)?Wz(v)?.focus():Fl(g??ee.afterOutsideRef)?.focus())}})]})}function _ve(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,{enabled:i=!0,event:o="click",toggle:l=!0,ignoreMouse:c=!1,stickIfOpen:u=!0,touchOpenDelay:d=0}=t,h=k.useRef(void 0),p=U0(),g=Ni(),S=k.useMemo(()=>({onPointerDown(y){h.current=y.pointerType},onMouseDown(y){const C=h.current,x=y.nativeEvent,w=n.select("open");if(y.button!==0||o==="click"||L3(C)&&c)return;const v=r.current.openEvent,E=v?.type,b=n.select("domReferenceElement")!==y.currentTarget,T=w&&b||!(w&&l&&(!(v&&u)||E==="click"||E==="mousedown"));if(jz(x.target)){const O=kn(Yd,x,x.target);T&&C==="touch"&&d>0?g.start(d,()=>{n.setOpen(!0,O)}):n.setOpen(T,O);return}const _=y.currentTarget;p.request(()=>{const O=kn(Yd,x,_);T&&C==="touch"&&d>0?g.start(d,()=>{n.setOpen(!0,O)}):n.setOpen(T,O)})},onClick(y){if(o==="mousedown-only")return;const C=h.current;if(o==="mousedown"&&C){h.current=void 0;return}if(L3(C)&&c)return;const x=n.select("open"),w=r.current.openEvent,v=n.select("domReferenceElement")!==y.currentTarget,E=x&&v||!(x&&l&&(!(w&&u)||Dz(w))),b=kn(Yd,y.nativeEvent,y.currentTarget);E&&C==="touch"&&d>0?g.start(d,()=>{n.setOpen(!0,b)}):n.setOpen(E,b)},onKeyDown(){h.current=void 0}}),[r,o,c,n,u,l,p,g,d]);return k.useMemo(()=>i?{reference:S}:Pi,[i,S])}function ej(e,t,n){let{reference:r,floating:i}=e;const o=ts(t),l=l2(t),c=a2(l),u=$i(t),d=o==="y",h=r.x+r.width/2-i.width/2,p=r.y+r.height/2-i.height/2,g=r[c]/2-i[c]/2;let S;switch(u){case"top":S={x:h,y:r.y-i.height};break;case"bottom":S={x:h,y:r.y+r.height};break;case"right":S={x:r.x+r.width,y:p};break;case"left":S={x:r.x-i.width,y:p};break;default:S={x:r.x,y:r.y}}switch(nl(t)){case"start":S[l]-=g*(n&&d?-1:1);break;case"end":S[l]+=g*(n&&d?-1:1);break}return S}const Eve=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:l}=n,c=o.filter(Boolean),u=await(l.isRTL==null?void 0:l.isRTL(t));let d=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:h,y:p}=ej(d,r,u),g=r,S={},y=0;for(let C=0;C<c.length;C++){const{name:x,fn:w}=c[C],{x:v,y:E,data:b,reset:T}=await w({x:h,y:p,initialPlacement:r,placement:g,strategy:i,middlewareData:S,rects:d,platform:l,elements:{reference:e,floating:t}});h=v??h,p=E??p,S={...S,[x]:{...S[x],...b}},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:i}):T.rects),{x:h,y:p}=ej(d,g,u)),C=-1)}return{x:h,y:p,placement:g,strategy:i,middlewareData:S}};async function wh(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:l,elements:c,strategy:u}=e,{boundary:d="clippingAncestors",rootBoundary:h="viewport",elementContext:p="floating",altBoundary:g=!1,padding:S=0}=Io(t,e),y=Iz(S),x=c[g?p==="floating"?"reference":"floating":p],w=Dy(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(x)))==null||n?x:x.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(c.floating)),boundary:d,rootBoundary:h,strategy:u})),v=p==="floating"?{x:r,y:i,width:l.floating.width,height:l.floating.height}:l.reference,E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c.floating)),b=await(o.isElement==null?void 0:o.isElement(E))?await(o.getScale==null?void 0:o.getScale(E))||{x:1,y:1}:{x:1,y:1},T=Dy(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:v,offsetParent:E,strategy:u}):v);return{top:(w.top-T.top+y.top)/b.y,bottom:(T.bottom-w.bottom+y.bottom)/b.y,left:(w.left-T.left+y.left)/b.x,right:(T.right-w.right+y.right)/b.x}}const Cve=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:l,initialPlacement:c,platform:u,elements:d}=t,{mainAxis:h=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:S="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:C=!0,...x}=Io(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const w=$i(i),v=ts(c),E=$i(c)===c,b=await(u.isRTL==null?void 0:u.isRTL(d.floating)),T=g||(E||!C?[Ny(c)]:o0e(c)),_=y!=="none";!g&&_&&T.push(...u0e(c,C,y,b));const O=[c,...T],M=await wh(t,x),P=[];let z=((r=o.flip)==null?void 0:r.overflows)||[];if(h&&P.push(M[w]),p){const te=s0e(i,l,b);P.push(M[te[0]],M[te[1]])}if(z=[...z,{placement:i,overflows:P}],!P.every(te=>te<=0)){var L,q;const te=(((L=o.flip)==null?void 0:L.index)||0)+1,ee=O[te];if(ee&&(!(p==="alignment"?v!==ts(ee):!1)||z.every(Y=>ts(Y.placement)===v?Y.overflows[0]>0:!0)))return{data:{index:te,overflows:z},reset:{placement:ee}};let G=(q=z.filter(H=>H.overflows[0]<=0).sort((H,Y)=>H.overflows[1]-Y.overflows[1])[0])==null?void 0:q.placement;if(!G)switch(S){case"bestFit":{var Z;const H=(Z=z.filter(Y=>{if(_){const oe=ts(Y.placement);return oe===v||oe==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter(oe=>oe>0).reduce((oe,re)=>oe+re,0)]).sort((Y,oe)=>Y[1]-oe[1])[0])==null?void 0:Z[0];H&&(G=H);break}case"initialPlacement":G=c;break}if(i!==G)return{reset:{placement:G}}}return{}}}};function tj(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function nj(e){return t0e.some(t=>e[t]>=0)}const Tve=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=Io(e,t);switch(r){case"referenceHidden":{const o=await wh(t,{...i,elementContext:"reference"}),l=tj(o,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:nj(l)}}}case"escaped":{const o=await wh(t,{...i,altBoundary:!0}),l=tj(o,n.floating);return{data:{escapedOffsets:l,escaped:nj(l)}}}default:return{}}}}},a6=new Set(["left","top"]);async function Rve(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),l=$i(n),c=nl(n),u=ts(n)==="y",d=a6.has(l)?-1:1,h=o&&u?-1:1,p=Io(t,e);let{mainAxis:g,crossAxis:S,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"&&(S=c==="end"?y*-1:y),u?{x:S*h,y:g*d}:{x:g*d,y:S*h}}const Ove=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:l,middlewareData:c}=t,u=await Rve(t,e);return l===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:o+u.y,data:{...u,placement:l}}}}},Ave=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:l=!1,limiter:c={fn:x=>{let{x:w,y:v}=x;return{x:w,y:v}}},...u}=Io(e,t),d={x:n,y:r},h=await wh(t,u),p=ts($i(i)),g=o2(p);let S=d[g],y=d[p];if(o){const x=g==="y"?"top":"left",w=g==="y"?"bottom":"right",v=S+h[x],E=S-h[w];S=Sx(v,S,E)}if(l){const x=p==="y"?"top":"left",w=p==="y"?"bottom":"right",v=y+h[x],E=y-h[w];y=Sx(v,y,E)}const C=c.fn({...t,[g]:S,[p]:y});return{...C,data:{x:C.x-n,y:C.y-r,enabled:{[g]:o,[p]:l}}}}}},kve=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:l}=t,{offset:c=0,mainAxis:u=!0,crossAxis:d=!0}=Io(e,t),h={x:n,y:r},p=ts(i),g=o2(p);let S=h[g],y=h[p];const C=Io(c,t),x=typeof C=="number"?{mainAxis:C,crossAxis:0}:{mainAxis:0,crossAxis:0,...C};if(u){const E=g==="y"?"height":"width",b=o.reference[g]-o.floating[E]+x.mainAxis,T=o.reference[g]+o.reference[E]-x.mainAxis;S<b?S=b:S>T&&(S=T)}if(d){var w,v;const E=g==="y"?"width":"height",b=a6.has($i(i)),T=o.reference[p]-o.floating[E]+(b&&((w=l.offset)==null?void 0:w[p])||0)+(b?0:x.crossAxis),_=o.reference[p]+o.reference[E]+(b?0:((v=l.offset)==null?void 0:v[p])||0)-(b?x.crossAxis:0);y<T?y=T:y>_&&(y=_)}return{[g]:S,[p]:y}}}},Mve=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:l,elements:c}=t,{apply:u=()=>{},...d}=Io(e,t),h=await wh(t,d),p=$i(i),g=nl(i),S=ts(i)==="y",{width:y,height:C}=o.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=C-h.top-h.bottom,E=y-h.left-h.right,b=Ju(C-h[x],v),T=Ju(y-h[w],E),_=!t.middlewareData.shift;let O=b,M=T;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=E),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(O=v),_&&!g){const z=Mi(h.left,0),L=Mi(h.right,0),q=Mi(h.top,0),Z=Mi(h.bottom,0);S?M=y-2*(z!==0||L!==0?z+L:Mi(h.left,h.right)):O=C-2*(q!==0||Z!==0?q+Z:Mi(h.top,h.bottom))}await u({...t,availableWidth:M,availableHeight:O});const P=await l.getDimensions(c.floating);return y!==P.width||C!==P.height?{reset:{rects:!0}}:{}}}};function l6(e){const t=zi(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=sr(e),o=i?e.offsetWidth:n,l=i?e.offsetHeight:r,c=Py(n)!==o||Py(r)!==l;return c&&(n=o,r=l),{width:n,height:r,$:c}}function f2(e){return Kn(e)?e:e.contextElement}function Du(e){const t=f2(e);if(!sr(t))return Gs(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=l6(t);let l=(o?Py(n.width):n.width)/r,c=(o?Py(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const jve=Gs(0);function c6(e){const t=Or(e);return!S0()||!t.visualViewport?jve:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Pve(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Or(e)?!1:t}function sc(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=f2(e);let l=Gs(1);t&&(r?Kn(r)&&(l=Du(r)):l=Du(e));const c=Pve(o,n,r)?c6(o):Gs(0);let u=(i.left+c.x)/l.x,d=(i.top+c.y)/l.y,h=i.width/l.x,p=i.height/l.y;if(o){const g=Or(o),S=r&&Kn(r)?Or(r):r;let y=g,C=Ow(y);for(;C&&r&&S!==y;){const x=Du(C),w=C.getBoundingClientRect(),v=zi(C),E=w.left+(C.clientLeft+parseFloat(v.paddingLeft))*x.x,b=w.top+(C.clientTop+parseFloat(v.paddingTop))*x.y;u*=x.x,d*=x.y,h*=x.x,p*=x.y,u+=E,d+=b,y=Or(C),C=Ow(y)}}return Dy({width:h,height:p,x:u,y:d})}function q0(e,t){const n=w0(e).scrollLeft;return t?t.left+n:sc(to(e)).left+n}function u6(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-q0(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function Nve(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",l=to(r),c=t?b0(t.floating):!1;if(r===l||c&&o)return n;let u={scrollLeft:0,scrollTop:0},d=Gs(1);const h=Gs(0),p=sr(r);if((p||!p&&!o)&&((Ja(r)!=="body"||hc(l))&&(u=w0(r)),sr(r))){const S=sc(r);d=Du(r),h.x=S.x+r.clientLeft,h.y=S.y+r.clientTop}const g=l&&!p&&!o?u6(l,u):Gs(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 Dve(e){return Array.from(e.getClientRects())}function Ive(e){const t=to(e),n=w0(e),r=e.ownerDocument.body,i=Mi(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Mi(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+q0(e);const c=-n.scrollTop;return zi(r).direction==="rtl"&&(l+=Mi(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:l,y:c}}const rj=25;function $ve(e,t){const n=Or(e),r=to(e),i=n.visualViewport;let o=r.clientWidth,l=r.clientHeight,c=0,u=0;if(i){o=i.width,l=i.height;const h=S0();(!h||h&&t==="fixed")&&(c=i.offsetLeft,u=i.offsetTop)}const d=q0(r);if(d<=0){const h=r.ownerDocument,p=h.body,g=getComputedStyle(p),S=h.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,y=Math.abs(r.clientWidth-p.clientWidth-S);y<=rj&&(o-=y)}else d<=rj&&(o+=d);return{width:o,height:l,x:c,y:u}}const zve=new Set(["absolute","fixed"]);function Lve(e,t){const n=sc(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=sr(e)?Du(e):Gs(1),l=e.clientWidth*o.x,c=e.clientHeight*o.y,u=i*o.x,d=r*o.y;return{width:l,height:c,x:u,y:d}}function ij(e,t,n){let r;if(t==="viewport")r=$ve(e,n);else if(t==="document")r=Ive(to(e));else if(Kn(t))r=Lve(t,n);else{const i=c6(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Dy(r)}function f6(e,t){const n=Mo(e);return n===t||!Kn(n)||Ao(n)?!1:zi(n).position==="fixed"||f6(n,t)}function Fve(e,t){const n=t.get(e);if(n)return n;let r=Ma(e,[],!1).filter(c=>Kn(c)&&Ja(c)!=="body"),i=null;const o=zi(e).position==="fixed";let l=o?Mo(e):e;for(;Kn(l)&&!Ao(l);){const c=zi(l),u=H_(l);!u&&c.position==="fixed"&&(i=null),(o?!u&&!i:!u&&c.position==="static"&&!!i&&zve.has(i.position)||hc(l)&&!u&&f6(e,l))?r=r.filter(h=>h!==l):i=c,l=Mo(l)}return t.set(e,r),r}function Uve(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const l=[...n==="clippingAncestors"?b0(t)?[]:Fve(t,this._c):[].concat(n),r],c=l[0],u=l.reduce((d,h)=>{const p=ij(t,h,i);return d.top=Mi(p.top,d.top),d.right=Ju(p.right,d.right),d.bottom=Ju(p.bottom,d.bottom),d.left=Mi(p.left,d.left),d},ij(t,c,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function Vve(e){const{width:t,height:n}=l6(e);return{width:t,height:n}}function qve(e,t,n){const r=sr(t),i=to(t),o=n==="fixed",l=sc(e,!0,o,t);let c={scrollLeft:0,scrollTop:0};const u=Gs(0);function d(){u.x=q0(i)}if(r||!r&&!o)if((Ja(t)!=="body"||hc(i))&&(c=w0(t)),r){const S=sc(t,!0,o,t);u.x=S.x+t.clientLeft,u.y=S.y+t.clientTop}else i&&d();o&&!r&&i&&d();const h=i&&!r&&!o?u6(i,c):Gs(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 $S(e){return zi(e).position==="static"}function sj(e,t){if(!sr(e)||zi(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return to(e)===n&&(n=n.ownerDocument.body),n}function d6(e,t){const n=Or(e);if(b0(e))return n;if(!sr(e)){let i=Mo(e);for(;i&&!Ao(i);){if(Kn(i)&&!$S(i))return i;i=Mo(i)}return n}let r=sj(e,t);for(;r&&Xne(r)&&$S(r);)r=sj(r,t);return r&&Ao(r)&&$S(r)&&!H_(r)?n:r||nre(e)||n}const Bve=async function(e){const t=this.getOffsetParent||d6,n=this.getDimensions,r=await n(e.floating);return{reference:qve(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Hve(e){return zi(e).direction==="rtl"}const Kve={convertOffsetParentRelativeRectToViewportRelativeRect:Nve,getDocumentElement:to,getClippingRect:Uve,getOffsetParent:d6,getElementRects:Bve,getClientRects:Dve,getDimensions:Vve,getScale:Du,isElement:Kn,isRTL:Hve};function h6(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Gve(e,t){let n=null,r;const i=to(e);function o(){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),o();const d=e.getBoundingClientRect(),{left:h,top:p,width:g,height:S}=d;if(c||t(),!g||!S)return;const y=_u(p),C=_u(i.clientWidth-(h+g)),x=_u(i.clientHeight-(p+S)),w=_u(h),E={rootMargin:-y+"px "+-C+"px "+-x+"px "+-w+"px",threshold:Mi(0,Ju(1,u))||1};let b=!0;function T(_){const O=_[0].intersectionRatio;if(O!==u){if(!b)return l();O?l(!1,O):r=setTimeout(()=>{l(!1,1e-7)},1e3)}O===1&&!h6(d,e.getBoundingClientRect())&&l(),b=!1}try{n=new IntersectionObserver(T,{...E,root:i.ownerDocument})}catch{n=new IntersectionObserver(T,E)}n.observe(e)}return l(!0),o}function oj(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,d=f2(e),h=i||o?[...d?Ma(d):[],...Ma(t)]:[];h.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),o&&w.addEventListener("resize",n)});const p=d&&c?Gve(d,n):null;let g=-1,S=null;l&&(S=new ResizeObserver(w=>{let[v]=w;v&&v.target===d&&S&&(S.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var E;(E=S)==null||E.observe(t)})),n()}),d&&!u&&S.observe(d),S.observe(t));let y,C=u?sc(e):null;u&&x();function x(){const w=sc(e);C&&!h6(C,w)&&n(),C=w,y=requestAnimationFrame(x)}return n(),()=>{var w;h.forEach(v=>{i&&v.removeEventListener("scroll",n),o&&v.removeEventListener("resize",n)}),p?.(),(w=S)==null||w.disconnect(),S=null,u&&cancelAnimationFrame(y)}}const Zve=Ove,Yve=Ave,Wve=Cve,Xve=Mve,Qve=Tve,Jve=kve,ebe=(e,t,n)=>{const r=new Map,i={platform:Kve,...n},o={...i.platform,_c:r};return Eve(e,t,{...i,platform:o})};var tbe=typeof document<"u",nbe=function(){},Wg=tbe?k.useLayoutEffect:nbe;function qy(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,i;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(!qy(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!qy(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function p6(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function aj(e,t){const n=p6(e);return Math.round(t*n)/n}function zS(e){const t=k.useRef(e);return Wg(()=>{t.current=e}),t}function rbe(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,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,S]=k.useState(r);qy(g,r)||S(r);const[y,C]=k.useState(null),[x,w]=k.useState(null),v=k.useCallback(Y=>{Y!==_.current&&(_.current=Y,C(Y))},[]),E=k.useCallback(Y=>{Y!==O.current&&(O.current=Y,w(Y))},[]),b=o||y,T=l||x,_=k.useRef(null),O=k.useRef(null),M=k.useRef(h),P=u!=null,z=zS(u),L=zS(i),q=zS(d),Z=k.useCallback(()=>{if(!_.current||!O.current)return;const Y={placement:t,strategy:n,middleware:g};L.current&&(Y.platform=L.current),ebe(_.current,O.current,Y).then(oe=>{const re={...oe,isPositioned:q.current!==!1};te.current&&!qy(M.current,re)&&(M.current=re,Do.flushSync(()=>{p(re)}))})},[g,t,n,L,q]);Wg(()=>{d===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,p(Y=>({...Y,isPositioned:!1})))},[d]);const te=k.useRef(!1);Wg(()=>(te.current=!0,()=>{te.current=!1}),[]),Wg(()=>{if(b&&(_.current=b),T&&(O.current=T),b&&T){if(z.current)return z.current(b,T,Z);Z()}},[b,T,Z,z,P]);const ee=k.useMemo(()=>({reference:_,floating:O,setReference:v,setFloating:E}),[v,E]),G=k.useMemo(()=>({reference:b,floating:T}),[b,T]),H=k.useMemo(()=>{const Y={position:n,left:0,top:0};if(!G.floating)return Y;const oe=aj(G.floating,h.x),re=aj(G.floating,h.y);return c?{...Y,transform:"translate("+oe+"px, "+re+"px)",...p6(G.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:oe,top:re}},[n,c,G.floating,h.x,h.y]);return k.useMemo(()=>({...h,update:Z,refs:ee,elements:G,floatingStyles:H}),[h,Z,ee,G,H])}const ibe=(e,t)=>({...Zve(e),options:[e,t]}),sbe=(e,t)=>({...Yve(e),options:[e,t]}),obe=(e,t)=>({...Jve(e),options:[e,t]}),abe=(e,t)=>({...Wve(e),options:[e,t]}),lbe=(e,t)=>({...Xve(e),options:[e,t]}),cbe=(e,t)=>({...Qve(e),options:[e,t]}),ube={intentional:"onClick",sloppy:"onPointerDown"};function fbe(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function dbe(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),o=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:S=!1,referencePressEvent:y="sloppy",ancestorScroll:C=!1,bubbles:x,externalTree:w}=t,v=V0(w),E=at(typeof p=="function"?p:()=>!1),b=typeof p=="function"?E:p,T=k.useRef(!1),{escapeKey:_,outsidePress:O}=fbe(x),M=k.useRef(null),P=Ni(),z=Ni(),L=at(()=>{z.clear(),u.current.insideReactTree=!1}),q=k.useRef(!1),Z=k.useRef(""),te=at(Q=>{Z.current=Q.pointerType}),ee=at(()=>{const Q=Z.current,ie=Q==="pen"||!Q?"mouse":Q,le=typeof g=="function"?g():g;return typeof le=="string"?le:le[ie]}),G=at(Q=>{if(!r||!d||!h||Q.key!=="Escape"||q.current)return;const ie=u.current.floatingContext?.nodeId,le=v?Mu(v.nodesRef.current,ie):[];if(!_&&le.length>0){let we=!0;if(le.forEach(Ie=>{Ie.context?.open&&!Ie.context.dataRef.current.__escapeKeyBubbles&&(we=!1)}),!we)return}const Se=e0e(Q)?Q.nativeEvent:Q,Te=kn(A0e,Se);n.setOpen(!1,Te),!_&&!Te.isPropagationAllowed&&Q.stopPropagation()}),H=at(Q=>{const ie=ee();return ie==="intentional"&&Q.type!=="click"||ie==="sloppy"&&Q.type==="click"}),Y=at(()=>{u.current.insideReactTree=!0,z.start(0,L)}),oe=at((Q,ie=!1)=>{if(H(Q)){L();return}if(u.current.insideReactTree){L();return}if(ee()==="intentional"&&ie||typeof b=="function"&&!b(Q))return;const le=xs(Q),Se=`[${Uy("inert")}]`,Te=oi(n.select("floatingElement")).querySelectorAll(Se),we=n.context.triggerElements;if(le&&(we.hasElement(le)||we.hasMatchingElement(Re=>Bn(Re,le))))return;let Ie=Kn(le)?le:null;for(;Ie&&!Ao(Ie);){const Re=Mo(Ie);if(Ao(Re)||!Kn(Re))break;Ie=Re}if(Te.length&&Kn(le)&&!Jye(le)&&!Bn(le,n.select("floatingElement"))&&Array.from(Te).every(Re=>!Bn(Ie,Re)))return;if(sr(le)&&!("touches"in Q)){const Re=Ao(le),Ye=zi(le),$e=/auto|scroll/,Le=Re||$e.test(Ye.overflowX),Ve=Re||$e.test(Ye.overflowY),ft=Le&&le.clientWidth>0&&le.scrollWidth>le.clientWidth,Oe=Ve&&le.clientHeight>0&&le.scrollHeight>le.clientHeight,me=Ye.direction==="rtl",Ne=Oe&&(me?Q.offsetX<=le.offsetWidth-le.clientWidth:Q.offsetX>le.clientWidth),Ke=ft&&Q.offsetY>le.clientHeight;if(Ne||Ke)return}const Fe=u.current.floatingContext?.nodeId,ye=v&&Mu(v.nodesRef.current,Fe).some(Re=>Ss(Q,Re.context?.elements.floating));if(Ss(Q,n.select("floatingElement"))||Ss(Q,n.select("domReferenceElement"))||ye)return;const Ue=v?Mu(v.nodesRef.current,Fe):[];if(Ue.length>0){let Re=!0;if(Ue.forEach(Ye=>{Ye.context?.open&&!Ye.context.dataRef.current.__outsidePressBubbles&&(Re=!1)}),!Re)return}n.setOpen(!1,kn(Jz,Q)),L()}),re=at(Q=>{ee()!=="sloppy"||Q.pointerType==="touch"||!n.select("open")||!d||Ss(Q,n.select("floatingElement"))||Ss(Q,n.select("domReferenceElement"))||oe(Q)}),I=at(Q=>{if(ee()!=="sloppy"||!n.select("open")||!d||Ss(Q,n.select("floatingElement"))||Ss(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)}))}),B=at(Q=>{const ie=xs(Q);function le(){I(Q),ie?.removeEventListener(Q.type,le)}ie?.addEventListener(Q.type,le)}),$=at(Q=>{const ie=T.current;if(T.current=!1,P.clear(),Q.type==="mousedown"&&M.current&&!M.current.dismissOnMouseDown)return;const le=xs(Q);function Se(){Q.type==="pointerdown"?re(Q):oe(Q,ie),le?.removeEventListener(Q.type,Se)}le?.addEventListener(Q.type,Se)}),N=at(Q=>{if(ee()!=="sloppy"||!M.current||Ss(Q,n.select("floatingElement"))||Ss(Q,n.select("domReferenceElement")))return;const ie=Q.touches[0];if(!ie)return;const le=Math.abs(ie.clientX-M.current.startX),Se=Math.abs(ie.clientY-M.current.startY),Te=Math.sqrt(le*le+Se*Se);Te>5&&(M.current.dismissOnTouchEnd=!0),Te>10&&(oe(Q),P.clear(),M.current=null)}),U=at(Q=>{const ie=xs(Q);function le(){N(Q),ie?.removeEventListener(Q.type,le)}ie?.addEventListener(Q.type,le)}),J=at(Q=>{ee()!=="sloppy"||!M.current||Ss(Q,n.select("floatingElement"))||Ss(Q,n.select("domReferenceElement"))||(M.current.dismissOnTouchEnd&&oe(Q),P.clear(),M.current=null)}),ne=at(Q=>{const ie=xs(Q);function le(){J(Q),ie?.removeEventListener(Q.type,le)}ie?.addEventListener(Q.type,le)});k.useEffect(()=>{if(!r||!d)return;u.current.__escapeKeyBubbles=_,u.current.__outsidePressBubbles=O;const Q=new Qu;function ie(Ie){n.setOpen(!1,kn(tf,Ie))}function le(){Q.clear(),q.current=!0}function Se(){Q.start(S0()?5:0,()=>{q.current=!1})}const Te=oi(i);Te.addEventListener("pointerdown",te,!0),h&&(Te.addEventListener("keydown",G),Te.addEventListener("compositionstart",le),Te.addEventListener("compositionend",Se)),b&&(Te.addEventListener("click",$,!0),Te.addEventListener("pointerdown",$,!0),Te.addEventListener("touchstart",B,!0),Te.addEventListener("touchmove",U,!0),Te.addEventListener("touchend",ne,!0),Te.addEventListener("mousedown",$,!0));let we=[];return C&&(Kn(l)&&(we=Ma(l)),Kn(i)&&(we=we.concat(Ma(i))),!Kn(o)&&o&&o.contextElement&&(we=we.concat(Ma(o.contextElement)))),we=we.filter(Ie=>Ie!==Te.defaultView?.visualViewport),we.forEach(Ie=>{Ie.addEventListener("scroll",ie,{passive:!0})}),()=>{Te.removeEventListener("pointerdown",te,!0),h&&(Te.removeEventListener("keydown",G),Te.removeEventListener("compositionstart",le),Te.removeEventListener("compositionend",Se)),b&&(Te.removeEventListener("click",$,!0),Te.removeEventListener("pointerdown",$,!0),Te.removeEventListener("touchstart",B,!0),Te.removeEventListener("touchmove",U,!0),Te.removeEventListener("touchend",ne,!0),Te.removeEventListener("mousedown",$,!0)),we.forEach(Ie=>{Ie.removeEventListener("scroll",ie)}),Q.clear()}},[u,i,o,l,h,b,r,c,C,d,_,O,G,oe,$,re,B,U,ne,te,n]),k.useEffect(L,[b,L]);const se=k.useMemo(()=>({onKeyDown:G,...S&&{[ube[y]]:Q=>{n.setOpen(!1,kn(Yd,Q.nativeEvent))},...y!=="intentional"&&{onClick(Q){n.setOpen(!1,kn(Yd,Q.nativeEvent))}}}}),[G,n,S,y]),he=at(Q=>{const ie=xs(Q.nativeEvent);!Bn(n.select("floatingElement"),ie)||Q.button!==0||(T.current=!0)}),Ee=k.useMemo(()=>({onKeyDown:G,onPointerDown:he,onMouseDown:he,onMouseUp:he,onClickCapture:Y,onMouseDownCapture:Y,onPointerDownCapture:Y,onMouseUpCapture:Y,onTouchEndCapture:Y,onTouchMoveCapture:Y}),[G,he,Y]);return k.useMemo(()=>d?{reference:se,floating:Ee,trigger:se}:{},[d,se,Ee])}const hbe={open:nn(e=>e.open),domReferenceElement:nn(e=>e.domReferenceElement),referenceElement:nn(e=>e.positionReference??e.referenceElement),floatingElement:nn(e=>e.floatingElement),floatingId:nn(e=>e.floatingId)};class pbe extends ave{constructor(t){const{nested:n,noEmit:r,onOpenChange:i,triggerElements:o,...l}=t;super({...l,positionReference:l.referenceElement,domReferenceElement:l.referenceElement},{onOpenChange:i,dataRef:{current:{}},events:cve(),nested:n,noEmit:r,triggerElements:o},hbe)}setOpen=(t,n)=>{if((!t||!this.state.open||Dz(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 d2(e,t=!1,n=!1){const[r,i]=k.useState(e&&t?"idle":void 0),[o,l]=k.useState(e);return e&&!o&&(l(!0),i("starting")),!e&&o&&r!=="ending"&&!n&&i("ending"),!e&&!o&&r==="ending"&&i(void 0),nt(()=>{if(!e&&o&&r!=="ending"&&n){const c=zs.request(()=>{i("ending")});return()=>{zs.cancel(c)}}},[e,o,r,n]),nt(()=>{if(!e||t)return;const c=zs.request(()=>{i(void 0)});return()=>{zs.cancel(c)}},[t,e]),nt(()=>{if(!e||!t)return;e&&o&&r!=="idle"&&i("starting");const c=zs.request(()=>{i("idle")});return()=>{zs.cancel(c)}},[t,e,o,i,r]),k.useMemo(()=>({mounted:o,setMounted:l,transitionStatus:r}),[o,r])}function mbe(e,t=!1,n=!0){const r=U0();return at((i,o=null)=>{r.cancel();const l=Fl(e);l!=null&&(typeof l.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED?i():r.request(()=>{function c(){l&&Promise.all(l.getAnimations().map(u=>u.finished)).then(()=>{o!=null&&o.aborted||Do.flushSync(i)}).catch(()=>{if(n){if(o!=null&&o.aborted)return;Do.flushSync(i)}else l.getAnimations().length>0&&l.getAnimations().some(u=>u.pending||u.playState!=="finished")&&c()})}t?r.request(c):c()}))})}function B0(e){const{enabled:t=!0,open:n,ref:r,onComplete:i}=e,o=Hr(n),l=at(i),c=mbe(r,n);k.useEffect(()=>{t&&c(()=>{n===o.current&&l()})},[t,n,l,c,o])}class gbe{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 m6(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,i=r2(),o=r6()!=null,l=Zs(()=>new pbe({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:r.triggers??new gbe,floatingId:i,nested:o,noEmit:e.noEmit||!1})).current;return nt(()=>{const c={open:t,floatingId:i};r.reference!==void 0&&(c.referenceElement=r.reference,c.domReferenceElement=Kn(r.reference)?r.reference:null),r.floating!==void 0&&(c.floatingElement=r.floating),l.update(c)},[t,i,r.reference,r.floating,l]),l.context.onOpenChange=n,l.context.nested=o,l.context.noEmit=e.noEmit||!1,l}function ybe(e={}){const{nodeId:t,externalTree:n}=e,r=m6(e),i=e.rootContext||r,o={reference:i.useState("referenceElement"),floating:i.useState("floatingElement"),domReference:i.useState("domReferenceElement")},[l,c]=k.useState(null),u=k.useRef(null),d=V0(n);nt(()=>{o.domReference&&(u.current=o.domReference)},[o.domReference]);const h=rbe({...e,elements:{...o,...l&&{reference:l}}}),p=k.useCallback(O=>{const M=Kn(O)?{getBoundingClientRect:()=>O.getBoundingClientRect(),getClientRects:()=>O.getClientRects(),contextElement:O}:O;c(M),h.refs.setReference(M)},[h.refs]),[g,S]=k.useState(null),[y,C]=k.useState(null);i.useSyncedValue("referenceElement",g),i.useSyncedValue("domReferenceElement",Kn(g)?g:null),i.useSyncedValue("floatingElement",y);const x=k.useCallback(O=>{(Kn(O)||O===null)&&(u.current=O,S(O)),(Kn(h.refs.reference.current)||h.refs.reference.current===null||O!==null&&!Kn(O))&&h.refs.setReference(O)},[h.refs,S]),w=k.useCallback(O=>{C(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]),E=k.useMemo(()=>({...h.elements,domReference:o.domReference}),[h.elements,o.domReference]),b=i.useState("open"),T=i.useState("floatingId"),_=k.useMemo(()=>({...h,dataRef:i.context.dataRef,open:b,onOpenChange:i.setOpen,events:i.context.events,floatingId:T,refs:v,elements:E,nodeId:t,rootStore:i}),[h,v,E,t,i,b,T]);return nt(()=>{i.context.dataRef.current.floatingContext=_;const O=d?.nodesRef.current.find(M=>M.id===t);O&&(O.context=_)}),k.useMemo(()=>({...h,context:_,refs:v,elements:E,rootStore:i}),[h,v,E,_,i])}function vbe(e=[]){const t=e.map(d=>d?.reference),n=e.map(d=>d?.floating),r=e.map(d=>d?.item),i=e.map(d=>d?.trigger),o=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"),i);return k.useMemo(()=>({getReferenceProps:o,getFloatingProps:l,getItemProps:c,getTriggerProps:u}),[o,l,c,u])}function Cg(e,t,n){const r=new Map,i=n==="item",o={};n==="floating"&&(o.tabIndex=-1,o[vx]="");for(const l in e)i&&e&&(l===kz||l===Mz)||(o[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&&lj(o,c,i,r)}return lj(o,e,i,r),o}function lj(e,t,n,r){for(const i in t){const o=t[i];n&&(i===kz||i===Mz)||(i.startsWith("on")?(r.has(i)||r.set(i,[]),typeof o=="function"&&(r.get(i)?.push(o),e[i]=(...l)=>r.get(i)?.map(c=>c(...l)).find(c=>c!==void 0))):e[i]=o)}}const bbe="Escape";function H0(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Tg(e,t){return H0(t,e===s2||e===ep,e===Ia||e===$a)}function LS(e,t,n){return H0(t,e===ep,n?e===Ia:e===$a)||e==="Enter"||e===" "||e===""}function Sbe(e,t,n){return H0(t,n?e===Ia:e===$a,e===ep)}function wbe(e,t,n,r){const i=n?e===$a:e===Ia,o=e===s2;return t==="both"||t==="horizontal"&&r&&r>1?e===bbe:H0(t,i,o)}function xbe(e,t){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),o=n.useState("domReferenceElement"),l=n.context.dataRef,{listRef:c,activeIndex:u,onNavigate:d=()=>{},enabled:h=!0,selectedIndex:p=null,allowEscape:g=!1,loopFocus:S=!1,nested:y=!1,rtl:C=!1,virtual:x=!1,focusItemOnOpen:w="auto",focusItemOnHover:v=!0,openOnArrowKeyDown:E=!0,disabledIndices:b=void 0,orientation:T="vertical",parentOrientation:_,cols:O=1,scrollItemIntoView:M=!0,itemSizes:P,dense:z=!1,id:L,resetOnPointerLeave:q=!0,externalTree:Z}=t,te=jy(i),ee=Hr(te),G=r6(),H=V0(Z);nt(()=>{l.current.orientation=T},[l,T]);const Y=bx(o),oe=k.useRef(w),re=k.useRef(p??-1),I=k.useRef(null),B=k.useRef(!0),$=at($e=>{d(re.current===-1?null:re.current,$e)}),N=k.useRef($),U=k.useRef(!!i),J=k.useRef(r),ne=k.useRef(!1),se=k.useRef(!1),he=Hr(b),Ee=Hr(r),Q=Hr(M),ie=Hr(p),le=Hr(q),Se=at(()=>{function $e(Oe){x?H?.events.emit("virtualfocus",Oe):Yg(Oe,{sync:ne.current,preventScroll:!0})}const Le=c.current[re.current],Ve=se.current;Le&&$e(Le),(ne.current?Oe=>Oe():requestAnimationFrame)(()=>{const Oe=c.current[re.current]||Le;if(!Oe)return;Le||$e(Oe);const me=Q.current;me&&we&&(Ve||!B.current)&&Oe.scrollIntoView?.(typeof me=="boolean"?{block:"nearest",inline:"nearest"}:me)})});nt(()=>{h&&(r&&i?(re.current=p??-1,oe.current&&p!=null&&(se.current=!0,$())):U.current&&(re.current=-1,N.current()))},[h,r,i,p,$]),nt(()=>{if(h){if(!r){ne.current=!1;return}if(i)if(u==null){if(ne.current=!1,ie.current!=null)return;if(U.current&&(re.current=-1,Se()),(!J.current||!U.current)&&oe.current&&(I.current!=null||oe.current===!0&&I.current==null)){let $e=0;const Le=()=>{c.current[0]==null?($e<2&&($e?requestAnimationFrame:queueMicrotask)(Le),$e+=1):(re.current=I.current==null||LS(I.current,T,C)||y?Zg(c):xx(c),I.current=null,$())};Le()}}else ju(c,u)||(re.current=u,Se(),se.current=!1)}},[h,r,i,u,ie,y,c,T,C,$,Se,he]),nt(()=>{if(!h||i||!H||x||!U.current)return;const $e=H.nodesRef.current,Le=$e.find(Oe=>Oe.id===G)?.context?.elements.floating,Ve=Oo(oi(i)),ft=$e.some(Oe=>Oe.context&&Bn(Oe.context.elements.floating,Ve));Le&&!ft&&B.current&&Le.focus({preventScroll:!0})},[h,i,H,G,x]),nt(()=>{N.current=$,J.current=r,U.current=!!i}),nt(()=>{r||(I.current=null,oe.current=w)},[r,w]);const Te=u!=null,we=k.useMemo(()=>{function $e(Ve){if(!Ee.current)return;const ft=c.current.indexOf(Ve.currentTarget);ft!==-1&&re.current!==ft&&(re.current=ft,$(Ve))}return{onFocus(Ve){ne.current=!0,$e(Ve)},onClick:({currentTarget:Ve})=>Ve.focus({preventScroll:!0}),onMouseMove(Ve){ne.current=!0,se.current=!1,v&&$e(Ve)},onPointerLeave(Ve){if(!Ee.current||!B.current||Ve.pointerType==="touch")return;ne.current=!0;const ft=Ve.relatedTarget;!v||c.current.includes(ft)||le.current&&(re.current=-1,$(Ve),x||ee.current?.focus({preventScroll:!0}))}}},[Ee,ee,v,c,$,le,x]),Ie=k.useCallback(()=>_??H?.nodesRef.current.find($e=>$e.id===G)?.context?.dataRef?.current.orientation,[G,H,_]),Fe=at($e=>{if(B.current=!1,ne.current=!0,$e.which===229||!Ee.current&&$e.currentTarget===ee.current)return;if(y&&wbe($e.key,T,C,O)){Tg($e.key,Ie())||Xr($e),n.setOpen(!1,kn(kS,$e.nativeEvent)),sr(o)&&(x?H?.events.emit("virtualfocus",o):o.focus());return}const Le=re.current,Ve=Zg(c,b),ft=xx(c,b);if(Y||($e.key==="Home"&&(Xr($e),re.current=Ve,$($e)),$e.key==="End"&&(Xr($e),re.current=ft,$($e))),O>1){const Oe=P||Array.from({length:c.current.length},()=>({width:1,height:1})),me=zz(Oe,O,z),Ne=me.findIndex(yt=>yt!=null&&!za(c,yt,b)),Ke=me.reduce((yt,bt,ht)=>bt!=null&&!za(c,bt,b)?ht:yt,-1),it=me[$z({current:me.map(yt=>yt!=null?c.current[yt]:null)},{event:$e,orientation:T,loopFocus:S,rtl:C,cols:O,disabledIndices:Fz([...(typeof b!="function"?b:null)||c.current.map((yt,bt)=>za(c,bt,b)?bt:void 0),void 0],me),minIndex:Ne,maxIndex:Ke,prevIndex:Lz(re.current>ft?Ve:re.current,Oe,me,O,$e.key===ep?"bl":$e.key===(C?Ia:$a)?"tr":"tl"),stopEvent:!0})];if(it!=null&&(re.current=it,$($e)),T==="both")return}if(Tg($e.key,T)){if(Xr($e),r&&!x&&Oo($e.currentTarget.ownerDocument)===$e.currentTarget){re.current=LS($e.key,T,C)?Ve:ft,$($e);return}LS($e.key,T,C)?S?Le>=ft?g&&Le!==c.current.length?re.current=-1:(ne.current=!1,re.current=Ve):re.current=Vr(c,{startingIndex:Le,disabledIndices:b}):re.current=Math.min(ft,Vr(c,{startingIndex:Le,disabledIndices:b})):S?Le<=Ve?g&&Le!==-1?re.current=c.current.length:(ne.current=!1,re.current=ft):re.current=Vr(c,{startingIndex:Le,decrement:!0,disabledIndices:b}):re.current=Math.max(Ve,Vr(c,{startingIndex:Le,decrement:!0,disabledIndices:b})),ju(c,re.current)&&(re.current=-1),$($e)}}),ye=k.useMemo(()=>x&&r&&Te&&{"aria-activedescendant":`${L}-${u}`},[x,r,Te,L,u]),Ue=k.useMemo(()=>({"aria-orientation":T==="both"?void 0:T,...Y?{}:ye,onKeyDown($e){if($e.key==="Tab"&&$e.shiftKey&&r&&!x){const Le=xs($e.nativeEvent);if(Le&&!Bn(ee.current,Le))return;Xr($e),n.setOpen(!1,kn(F0,$e.nativeEvent)),sr(o)&&o.focus();return}Fe($e)},onPointerMove(){B.current=!0}}),[ye,Fe,ee,T,Y,n,r,x,o]),Re=k.useMemo(()=>{function $e(Ve){w==="auto"&&Pz(Ve.nativeEvent)&&(oe.current=!x)}function Le(Ve){oe.current=w,w==="auto"&&Nz(Ve.nativeEvent)&&(oe.current=!0)}return{onKeyDown(Ve){const ft=n.select("open");B.current=!1;const Oe=Ve.key.startsWith("Arrow"),me=Sbe(Ve.key,Ie(),C),Ne=Tg(Ve.key,T),Ke=(y?me:Ne)||Ve.key==="Enter"||Ve.key.trim()==="";if(x&&ft)return Fe(Ve);if(!(!ft&&!E&&Oe)){if(Ke){const it=Tg(Ve.key,Ie());I.current=y&&it?null:Ve.key}if(y){me&&(Xr(Ve),ft?(re.current=Zg(c,he.current),$(Ve)):n.setOpen(!0,kn(kS,Ve.nativeEvent,Ve.currentTarget)));return}Ne&&(ie.current!=null&&(re.current=ie.current),Xr(Ve),!ft&&E?n.setOpen(!0,kn(kS,Ve.nativeEvent,Ve.currentTarget)):Fe(Ve),ft&&$(Ve))}},onFocus(Ve){n.select("open")&&!x&&(re.current=-1,$(Ve))},onPointerDown:Le,onPointerEnter:Le,onMouseDown:$e,onClick:$e}},[Fe,he,w,c,y,$,n,E,T,Ie,C,ie,x]),Ye=k.useMemo(()=>({...ye,...Re}),[ye,Re]);return k.useMemo(()=>h?{reference:Ye,floating:Ue,item:we,trigger:Re}:{},[h,Ye,Ue,Re,we])}function _be(e,t){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.context.dataRef,{listRef:o,activeIndex:l,onMatch:c,onTypingChange:u,enabled:d=!0,findMatch:h=null,resetMs:p=750,ignoreKeys:g=Bu,selectedIndex:S=null}=t,y=Ni(),C=k.useRef(""),x=k.useRef(S??l??-1),w=k.useRef(null);nt(()=>{r&&(y.clear(),w.current=null,C.current="")},[r,y]),nt(()=>{r&&C.current===""&&(x.current=S??l??-1)},[r,S,l]);const v=at(_=>{_?i.current.typing||(i.current.typing=_,u?.(_)):i.current.typing&&(i.current.typing=_,u?.(_))}),E=at(_=>{function O(q,Z,te){const ee=h?h(Z,te):Z.find(G=>G?.toLocaleLowerCase().indexOf(te.toLocaleLowerCase())===0);return ee?q.indexOf(ee):-1}const M=o.current;if(C.current.length>0&&C.current[0]!==" "&&(O(M,M,C.current)===-1?v(!1):_.key===" "&&Xr(_)),M==null||g.includes(_.key)||_.key.length!==1||_.ctrlKey||_.metaKey||_.altKey)return;r&&_.key!==" "&&(Xr(_),v(!0)),M.every(q=>q?q[0]?.toLocaleLowerCase()!==q[1]?.toLocaleLowerCase():!0)&&C.current===_.key&&(C.current="",x.current=w.current),C.current+=_.key,y.start(p,()=>{C.current="",x.current=w.current,v(!1)});const z=x.current,L=O(M,[...M.slice((z||0)+1),...M.slice(0,(z||0)+1)],C.current);L!==-1?(c?.(L),w.current=L):_.key!==" "&&(C.current="",v(!1))}),b=k.useMemo(()=>({onKeyDown:E}),[E]),T=k.useMemo(()=>({onKeyDown:E,onKeyUp(_){_.key===" "&&v(!1)}}),[E,v]);return k.useMemo(()=>d?{reference:b,floating:T}:{},[d,b,T])}const g6=k.createContext(null),y6=k.createContext(null);function so(){const e=k.useContext(g6);if(e===null)throw new Error(no(60));return e}function v6(){const e=k.useContext(y6);if(e===null)throw new Error(no(61));return e}const Ebe=(e,t)=>Object.is(e,t);function nf(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function FS(e,t,n){return!e||e.length===0?!1:e.some(r=>r===void 0?!1:nf(r,t,n))}function Cx(e,t,n){return!e||e.length===0?-1:e.findIndex(r=>r===void 0?!1:nf(r,t,n))}function Cbe(e,t,n){return e.filter(r=>!nf(r,t,n))}function Tx(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function Tbe(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function Id(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 Tx(e)}function du(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?Tx(e.value):Tx(e)}function Rbe(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]??Id(e,n);if(Array.isArray(t)){const r=Tbe(t)?t.flatMap(i=>i.items):t;if(e==null){const i=r.find(o=>o.value==null);return i&&i.label!=null?i.label:Id(e,n)}if(typeof e!="object"){const i=r.find(o=>o&&o.value===e);return i&&i.label!=null?i.label:Id(e,n)}if("value"in e){const i=r.find(o=>o&&o.value===e.value);if(i&&i.label!=null)return i.label}}return Id(e,n)}function Obe(e,t){return!Array.isArray(e)||e.length===0?"":e.map(n=>Id(n,t)).join(", ")}const gt={id:nn(e=>e.id),modal:nn(e=>e.modal),multiple:nn(e=>e.multiple),items:nn(e=>e.items),itemToStringLabel:nn(e=>e.itemToStringLabel),itemToStringValue:nn(e=>e.itemToStringValue),isItemEqualToValue:nn(e=>e.isItemEqualToValue),value:nn(e=>e.value),open:nn(e=>e.open),mounted:nn(e=>e.mounted),forceMount:nn(e=>e.forceMount),transitionStatus:nn(e=>e.transitionStatus),openMethod:nn(e=>e.openMethod),activeIndex:nn(e=>e.activeIndex),selectedIndex:nn(e=>e.selectedIndex),isActive:nn((e,t)=>e.activeIndex===t),isSelected:nn((e,t,n)=>{const r=e.isItemEqualToValue,i=e.value;return e.multiple?Array.isArray(i)&&i.some(o=>nf(o,n,r)):e.selectedIndex===t&&e.selectedIndex!==null?!0:nf(i,n,r)}),isSelectedByFocus:nn((e,t)=>e.selectedIndex===t),popupProps:nn(e=>e.popupProps),triggerProps:nn(e=>e.triggerProps),triggerElement:nn(e=>e.triggerElement),positionerElement:nn(e=>e.positionerElement),listElement:nn(e=>e.listElement),scrollUpArrowVisible:nn(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:nn(e=>e.scrollDownArrowVisible),hasScrollArrows:nn(e=>e.hasScrollArrows),serializedValue:nn(e=>{const{multiple:t,value:n,itemToStringValue:r}=e;return t&&Array.isArray(n)&&n.length===0?"":du(n,r)})};function Abe(e,t){const n=k.useRef(e),r=at(t);nt(()=>{n.current!==e&&r(n.current)},[e,r]),nt(()=>{n.current=e},[e])}function kbe(e){const t=k.useRef(""),n=k.useCallback(i=>{i.defaultPrevented||(t.current=i.pointerType,e(i,i.pointerType))},[e]);return{onClick:k.useCallback(i=>{if(i.detail===0){e(i,"keyboard");return}"pointerType"in i&&e(i,i.pointerType),e(i,t.current),t.current=""},[e]),onPointerDown:n}}function Mbe(e){const[t,n]=k.useState(null),r=at((c,u)=>{e||n(u)}),i=k.useCallback(()=>{n(null)},[]),{onClick:o,onPointerDown:l}=kbe(r);return k.useMemo(()=>({openMethod:t,reset:i,triggerProps:{onClick:o,onPointerDown:l}}),[t,i,o,l])}function jbe(e){const{id:t,value:n,defaultValue:r=null,onValueChange:i,open:o,defaultOpen:l=!1,onOpenChange:c,name:u,disabled:d=!1,readOnly:h=!1,required:p=!1,modal:g=!0,actionsRef:S,inputRef:y,onOpenChangeComplete:C,items:x,multiple:w=!1,itemToStringLabel:v,itemToStringValue:E,isItemEqualToValue:b=Ebe,highlightItemOnHover:T=!0,children:_}=e,{clearErrors:O}=Cz(),{setDirty:M,shouldValidateOnChange:P,validityData:z,setFilled:L,name:q,disabled:Z,validation:te}=bh(),{controlId:ee}=z0(),G=Xz({id:t}),H=Z||d,Y=q??u,[oe,re]=Ly({controlled:n,default:w?r??Bu:r,name:"Select",state:"value"}),[I,B]=Ly({controlled:o,default:l,name:"Select",state:"open"}),$=k.useRef([]),N=k.useRef([]),U=k.useRef(null),J=k.useRef(null),ne=k.useRef(0),se=k.useRef(null),he=k.useRef([]),Ee=k.useRef(!1),Q=k.useRef(!1),ie=k.useRef(null),le=k.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),Se=k.useRef(!1),{mounted:Te,setMounted:we,transitionStatus:Ie}=d2(I),{openMethod:Fe,triggerProps:ye,reset:Ue}=Mbe(I),Re=Zs(()=>new Pu({id:G,modal:g,multiple:w,itemToStringLabel:v,itemToStringValue:E,isItemEqualToValue:b,value:oe,open:I,mounted:Te,transitionStatus:Ie,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,Ye=wt(Re,gt.activeIndex),$e=wt(Re,gt.selectedIndex),Le=wt(Re,gt.triggerElement),Ve=wt(Re,gt.positionerElement),ft=k.useMemo(()=>w&&Array.isArray(oe)&&oe.length===0?"":du(oe,E),[w,oe,E]),Oe=k.useMemo(()=>w&&Array.isArray(oe)?oe.map(ut=>du(ut,E)):du(oe,E),[w,oe,E]),me=Hr(Re.state.triggerElement);Qz({id:G,commit:te.commit,value:oe,controlRef:me,name:Y,getValue:()=>Oe});const Ne=k.useRef(oe);nt(()=>{oe!==Ne.current&&Re.set("forceMount",!0)},[Re,oe]),nt(()=>{L(oe!==null)},[oe,L]),nt(function(){if(I)return;const Wt=he.current;if(w){const mn=Array.isArray(oe)?oe:[];if(mn.length===0){Re.set("selectedIndex",null);return}const Un=mn[mn.length-1],an=Cx(Wt,Un,b);Re.set("selectedIndex",an===-1?null:an);return}const En=Cx(Wt,oe,b);Re.set("selectedIndex",En===-1?null:En)},[w,I,oe,he,b,Re]),Abe(oe,()=>{O(Y),M(oe!==z.initialValue),P()?te.commit(oe):te.commit(oe,!0)});const Ke=at((ut,Wt)=>{if(c?.(ut,Wt),!Wt.isCanceled&&(B(ut),!ut&&Re.state.activeIndex!==null)){const En=$.current[Re.state.activeIndex];queueMicrotask(()=>{En?.setAttribute("tabindex","-1")})}}),it=at(()=>{we(!1),Re.set("activeIndex",null),Ue(),C?.(!1)});B0({enabled:!S,open:I,ref:U,onComplete(){I||it()}}),k.useImperativeHandle(S,()=>({unmount:it}),[it]);const yt=at((ut,Wt)=>{i?.(ut,Wt),!Wt.isCanceled&&re(ut)}),bt=at(()=>{const ut=Re.state.listElement||U.current;if(!ut)return;const Wt=ut.scrollTop,En=ut.scrollTop+ut.clientHeight,mn=Wt>1,Un=En<ut.scrollHeight-1;Re.state.scrollUpArrowVisible!==mn&&Re.set("scrollUpArrowVisible",mn),Re.state.scrollDownArrowVisible!==Un&&Re.set("scrollDownArrowVisible",Un)}),ht=m6({open:I,onOpenChange:Ke,elements:{reference:Le,floating:Ve}}),on=_ve(ht,{enabled:!h&&!H,event:"mousedown"}),Vt=dbe(ht,{bubbles:!1}),Et=xbe(ht,{enabled:!h&&!H,listRef:$,activeIndex:Ye,selectedIndex:$e,disabledIndices:Bu,onNavigate(ut){ut===null&&!I||Re.set("activeIndex",ut)},focusItemOnHover:!1}),Yt=_be(ht,{enabled:!h&&!H&&(I||!w),listRef:N,activeIndex:Ye,selectedIndex:$e,onMatch(ut){I?Re.set("activeIndex",ut):yt(he.current[ut],kn("none"))},onTypingChange(ut){Ee.current=ut}}),{getReferenceProps:Nt,getFloatingProps:qt,getItemProps:un}=vbe([on,Vt,Et,Yt]),bn=k.useMemo(()=>x0(Nt(),ye),[Nt,ye]);D0e(()=>{Re.update({popupProps:qt(),triggerProps:bn})}),nt(()=>{Re.update({id:G,modal:g,multiple:w,value:oe,open:I,mounted:Te,transitionStatus:Ie,popupProps:qt(),triggerProps:bn,items:x,itemToStringLabel:v,itemToStringValue:E,isItemEqualToValue:b,openMethod:Fe})},[Re,G,g,w,oe,I,Te,Ie,qt,bn,x,v,E,b,Fe]);const Kt=k.useMemo(()=>({store:Re,name:Y,required:p,disabled:H,readOnly:h,multiple:w,itemToStringLabel:v,itemToStringValue:E,highlightItemOnHover:T,setValue:yt,setOpen:Ke,listRef:$,popupRef:U,scrollHandlerRef:J,handleScrollArrowVisibility:bt,scrollArrowsMountedCountRef:ne,getItemProps:un,events:ht.context.events,valueRef:se,valuesRef:he,labelsRef:N,typingRef:Ee,selectionRef:le,selectedItemTextRef:ie,validation:te,onOpenChangeComplete:C,keyboardActiveRef:Q,alignItemWithTriggerActiveRef:Se,initialValueRef:Ne}),[Re,Y,p,H,h,w,v,E,T,yt,Ke,un,ht.context.events,te,C,bt]),vt=qa(y,te.inputRef),Dt=w&&Array.isArray(oe)&&oe.length>0,jn=k.useMemo(()=>!w||!Array.isArray(oe)||!Y?null:oe.map(ut=>{const Wt=du(ut,E);return j.jsx("input",{type:"hidden",name:Y,value:Wt},Wt)}),[w,oe,Y,E]);return j.jsx(g6.Provider,{value:Kt,children:j.jsxs(y6.Provider,{value:ht,children:[_,j.jsx("input",{...te.getInputValidationProps({onFocus(){Re.state.triggerElement?.focus()},onChange(ut){if(ut.nativeEvent.defaultPrevented)return;const Wt=ut.target.value,En=kn(tf,ut.nativeEvent);function mn(){if(w)return;const Un=he.current.find(an=>du(an,E).toLowerCase()===Wt.toLowerCase());Un!=null&&(M(Un!==z.initialValue),yt(Un,En),P()&&te.commit(Un))}Re.set("forceMount",!0),queueMicrotask(mn)}}),id:t||ee||void 0,name:w?void 0:Y,value:ft,disabled:H,required:p&&!Dt,readOnly:h,ref:vt,style:c2,tabIndex:-1,"aria-hidden":!0}),jn]})})}let By=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const Pbe={[By.startingStyle]:""},Nbe={[By.endingStyle]:""},b6={transitionStatus(e){return e==="starting"?Pbe:e==="ending"?Nbe:null}};let h2=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=By.startingStyle]="startingStyle",e[e.endingStyle=By.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e})({}),Rx=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const Dbe={[Rx.popupOpen]:""},Ibe={[Rx.popupOpen]:"",[Rx.pressed]:""},$be={[h2.open]:""},zbe={[h2.closed]:""},Lbe={[h2.anchorHidden]:""},Fbe={open(e){return e?Dbe:null}},Ube={open(e){return e?Ibe:null}},S6={open(e){return e?$be:zbe},anchorHidden(e){return e?Lbe:null}};function Vbe(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 o=parseFloat(n.width)||0,l=parseFloat(n.height)||0,c=parseFloat(r.width)||0,u=parseFloat(r.height)||0,d=Math.max(t.width,o,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,qbe={...Ube,...Ez,value:()=>null},Bbe=k.forwardRef(function(t,n){const{render:r,className:i,disabled:o=!1,nativeButton:l=!0,...c}=t,{setTouched:u,setFocused:d,validationMode:h,state:p,disabled:g}=bh(),{labelId:S}=z0(),{store:y,setOpen:C,selectionRef:x,validation:w,readOnly:v,alignItemWithTriggerActiveRef:E,disabled:b,keyboardActiveRef:T}=so(),_=g||b||o,O=wt(y,gt.open),M=wt(y,gt.value),P=wt(y,gt.triggerProps),z=wt(y,gt.positionerElement),L=wt(y,gt.listElement),q=wt(y,gt.serializedValue),Z=Hr(z),te=k.useRef(null),ee=Ni(),G=Ni(),{getButtonProps:H,buttonRef:Y}=_0({disabled:_,native:l}),oe=at(J=>{y.set("triggerElement",J)}),re=qa(n,te,Y,oe),I=Ni(),B=Ni();k.useEffect(()=>{if(O)return B.start(200,()=>{x.current.allowUnselectedMouseUp=!0,I.start(200,()=>{x.current.allowSelectedMouseUp=!0})}),()=>{I.clear(),B.clear()};x.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},G.clear()},[O,x,G,I,B]);const $=k.useMemo(()=>L?.id??jy(z)?.id,[L,z]),N=x0(P,{role:"combobox","aria-expanded":O?"true":"false","aria-haspopup":"listbox","aria-controls":O?$:void 0,"aria-labelledby":S,"aria-readonly":v||void 0,tabIndex:_?-1:0,ref:re,onFocus(J){d(!0),O&&E.current&&C(!1,kn(F0,J.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(J){if(O)return;const ne=Xs(J.currentTarget);function se(he){if(!te.current)return;const Ee=he.target;if(Bn(te.current,Ee)||Bn(Z.current,Ee)||Ee===te.current)return;const Q=Vbe(te.current);he.clientX>=Q.left-Rg&&he.clientX<=Q.right+Rg&&he.clientY>=Q.top-Rg&&he.clientY<=Q.bottom+Rg||C(!1,kn(k0e,he))}G.start(0,()=>{ne.addEventListener("mouseup",se,{once:!0})})}},w.getValidationProps,c,H);N.role="combobox";const U=k.useMemo(()=>({...p,open:O,disabled:_,value:M,readOnly:v,placeholder:!q}),[p,O,_,M,v,q]);return Pr("button",t,{ref:[n,te],state:U,stateAttributesMapping:qbe,props:N})}),Hbe={value:()=>null},Kbe=k.forwardRef(function(t,n){const{className:r,render:i,children:o,...l}=t,{store:c,valueRef:u}=so(),d=wt(c,gt.value),h=wt(c,gt.items),p=wt(c,gt.itemToStringLabel),g=wt(c,gt.serializedValue),S=k.useMemo(()=>({value:d,placeholder:!g}),[d,g]),y=typeof o=="function"?o(d):o??(Array.isArray(d)?Obe(d,p):Rbe(d,h,p));return Pr("span",t,{state:S,ref:[n,u],props:[{children:y},l],stateAttributesMapping:Hbe})}),Gbe=k.forwardRef(function(t,n){const{className:r,render:i,...o}=t,{store:l}=so(),c=wt(l,gt.open),u=k.useMemo(()=>({open:c}),[c]);return Pr("span",t,{state:u,ref:n,props:[{"aria-hidden":!0,children:"▼"},o],stateAttributesMapping:Fbe})}),Zbe=k.createContext(void 0),Ybe=k.forwardRef(function(t,n){const{store:r}=so(),i=wt(r,gt.mounted),o=wt(r,gt.forceMount);return i||o?j.jsx(Zbe.Provider,{value:!0,children:j.jsx(yve,{ref:n,...t})}):null});function Wbe(e){return K_(19)?e:e?"true":void 0}let cj={},uj={},fj="";function Xbe(e){if(typeof document>"u")return!1;const t=Xs(e);return Or(t).innerWidth-t.documentElement.clientWidth>0}function Qbe(e){const t=Xs(e),n=t.documentElement,r=t.body,i=hc(n)?n:r,o=i.style.overflow;return i.style.overflow="hidden",()=>{i.style.overflow=o}}function Jbe(e){const t=Xs(e),n=t.documentElement,r=t.body,i=Or(n);let o=0,l=0;const c=zs.create(),u=typeof CSS<"u"&&CSS.supports?.("scrollbar-gutter","stable");if(Az&&(i.visualViewport?.scale??1)!==1)return()=>{};function d(){const g=i.getComputedStyle(n),S=i.getComputedStyle(r),x=(g.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";o=n.scrollTop,l=n.scrollLeft,cj={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},fj=n.style.scrollBehavior,uj={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,E=g.overflowY==="scroll"||S.overflowY==="scroll",b=g.overflowX==="scroll"||S.overflowX==="scroll",T=Math.max(0,i.innerWidth-n.clientWidth),_=Math.max(0,i.innerHeight-n.clientHeight),O=parseFloat(S.marginTop)+parseFloat(S.marginBottom),M=parseFloat(S.marginLeft)+parseFloat(S.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||E)&&(n.style.overflowY="scroll"),(v||b)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:O||_?`calc(100dvh - ${O+_}px)`:"100dvh",width:M||T?`calc(100vw - ${M+T}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=o,r.scrollLeft=l,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function h(){Object.assign(n.style,cj),Object.assign(r.style,uj),u||(n.scrollTop=o,n.scrollLeft=l,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=fj)}function p(){h(),c.request(d)}return d(),i.addEventListener("resize",p),()=>{c.cancel(),h(),typeof i.removeEventListener=="function"&&i.removeEventListener("resize",p)}}class e1e{lockCount=0;restore=null;timeoutLock=Qu.create();timeoutUnlock=Qu.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=Xs(t).documentElement,i=Or(r).getComputedStyle(r).overflowY;if(i==="hidden"||i==="clip"){this.restore=ji;return}const o=Kye||!Xbe(t);this.restore=o?Qbe(t):Jbe(t)}}const t1e=new e1e;function n1e(e=!0,t=null){nt(()=>{if(e)return t1e.acquire(t)},[e,t])}const w6=k.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function r1e(){return k.useContext(w6)}function p2(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,o=at(i),l=k.useRef(0),c=Zs(s1e).current,u=Zs(i1e).current,[d,h]=k.useState(0),p=k.useRef(d),g=at((w,v)=>{u.set(w,v??null),p.current+=1,h(p.current)}),S=at(w=>{u.delete(w),p.current+=1,h(p.current)}),y=k.useMemo(()=>{const w=new Map;return Array.from(u.keys()).filter(E=>E.isConnected).sort(o1e).forEach((E,b)=>{const T=u.get(E)??{};w.set(E,{...T,index:b})}),w},[u,d]);nt(()=>{if(typeof MutationObserver!="function"||y.size===0)return;const w=new MutationObserver(v=>{const E=new Set,b=T=>E.has(T)?E.delete(T):E.add(T);v.forEach(T=>{T.removedNodes.forEach(b),T.addedNodes.forEach(b)}),E.size===0&&(p.current+=1,h(p.current))});return y.forEach((v,E)=>{E.parentElement&&w.observe(E.parentElement,{childList:!0})}),()=>{w.disconnect()}},[y]),nt(()=>{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),o(y)},[o,y,n,r,d]),nt(()=>()=>{n.current=[]},[n]),nt(()=>()=>{r&&(r.current=[])},[r]);const C=at(w=>(c.add(w),()=>{c.delete(w)}));nt(()=>{c.forEach(w=>w(y))},[c,y]);const x=k.useMemo(()=>({register:g,unregister:S,subscribeMapChange:C,elementsRef:n,labelsRef:r,nextIndexRef:l}),[g,S,C,n,r,l]);return j.jsx(w6.Provider,{value:x,children:t})}function i1e(){return new Map}function s1e(){return new Set}function o1e(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 a1e=k.createContext(void 0);function m2(){return k.useContext(a1e)?.direction??"ltr"}const l1e=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:l,elements:c,middlewareData:u}=t,{element:d,padding:h=0,offsetParent:p="real"}=Io(e,t)||{};if(d==null)return{};const g=Iz(h),S={x:n,y:r},y=l2(i),C=a2(y),x=await l.getDimensions(d),w=y==="y",v=w?"top":"left",E=w?"bottom":"right",b=w?"clientHeight":"clientWidth",T=o.reference[C]+o.reference[y]-S[y]-o.floating[C],_=S[y]-o.reference[y],O=p==="real"?await l.getOffsetParent?.(d):c.floating;let M=c.floating[b]||o.floating[C];(!M||!await l.isElement?.(O))&&(M=c.floating[b]||o.floating[C]);const P=T/2-_/2,z=M/2-x[C]/2-1,L=Math.min(g[v],z),q=Math.min(g[E],z),Z=L,te=M-x[C]-q,ee=M/2-x[C]/2+P,G=Sx(Z,ee,te),H=!u.arrow&&nl(i)!=null&&ee!==G&&o.reference[C]/2-(ee<Z?L:q)-x[C]/2<0,Y=H?ee<Z?ee-Z:ee-te:0;return{[y]:S[y]+Y,data:{[y]:G,centerOffset:ee-G-Y,...H&&{alignmentOffset:Y}},reset:H}}}),c1e=(e,t)=>({...l1e(e),options:[e,t]}),u1e={name:"hide",async fn(e){const{width:t,height:n,x:r,y:i}=e.rects.reference,o=t===0&&n===0&&r===0&&i===0;return{data:{referenceHidden:(await cbe().fn(e)).data?.referenceHidden||o}}}},f1e={sideX:"left",sideY:"top"};function x6(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 dj(e,t,n){const{rects:r,placement:i}=e;return{side:x6(t,$i(i),n),align:nl(i)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function d1e(e){const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:l=0,collisionBoundary:c,collisionPadding:u=5,sticky:d=!1,arrowPadding:h=5,disableAnchorTracking:p=!1,keepMounted:g=!1,floatingRootContext:S,mounted:y,collisionAvoidance:C,shiftCrossAxis:x=!1,nodeId:w,adaptiveOrigin:v,lazyFlip:E=!1,externalTree:b}=e,[T,_]=k.useState(null);!y&&T!==null&&_(null);const O=C.side||"flip",M=C.align||"flip",P=C.fallbackAxisSide||"end",z=typeof t=="function"?t:void 0,L=at(z),q=z?L:t,Z=Hr(t),ee=m2()==="rtl",G=T||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":ee?"left":"right","inline-start":ee?"right":"left"}[r],H=o==="center"?G:`${G}-${o}`;let Y=u;const oe=1,re=r==="bottom"?oe:0,I=r==="top"?oe:0,B=r==="right"?oe:0,$=r==="left"?oe:0;typeof Y=="number"?Y={top:Y+re,right:Y+$,bottom:Y+I,left:Y+B}:Y&&(Y={top:(Y.top||0)+re,right:(Y.right||0)+$,bottom:(Y.bottom||0)+I,left:(Y.left||0)+B});const N={boundary:c==="clipping-ancestors"?"clippingAncestors":c,padding:Y},U=k.useRef(null),J=Hr(i),ne=Hr(l),Ee=[ibe(Et=>{const Yt=dj(Et,r,ee),Nt=typeof J.current=="function"?J.current(Yt):J.current,qt=typeof ne.current=="function"?ne.current(Yt):ne.current;return{mainAxis:Nt,crossAxis:qt,alignmentAxis:qt}},[typeof i!="function"?i:0,typeof l!="function"?l:0,ee,r])],Q=M==="none"&&O!=="shift",ie=!Q&&(d||x||O==="shift"),le=O==="none"?null:abe({...N,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}),Se=Q?null:sbe(Et=>{const Yt=Xs(Et.elements.floating).documentElement;return{...N,rootBoundary:x?{x:0,y:0,width:Yt.clientWidth,height:Yt.clientHeight}:void 0,mainAxis:M!=="none",crossAxis:ie,limiter:d||x?void 0:obe(Nt=>{if(!U.current)return{};const{width:qt,height:un}=U.current.getBoundingClientRect(),bn=ts($i(Nt.placement)),Kt=bn==="y"?qt:un,vt=bn==="y"?Y.left+Y.right:Y.top+Y.bottom;return{offset:Kt/2+vt/2}})}},[N,d,x,Y,M]);O==="shift"||M==="shift"||o==="center"?Ee.push(Se,le):Ee.push(le,Se),Ee.push(lbe({...N,apply({elements:{floating:Et},rects:{reference:Yt},availableWidth:Nt,availableHeight:qt}){Object.entries({"--available-width":`${Nt}px`,"--available-height":`${qt}px`,"--anchor-width":`${Yt.width}px`,"--anchor-height":`${Yt.height}px`}).forEach(([un,bn])=>{Et.style.setProperty(un,bn)})}}),c1e(()=>({element:U.current||document.createElement("div"),padding:h,offsetParent:"floating"}),[h]),{name:"transformOrigin",fn(Et){const{elements:Yt,middlewareData:Nt,placement:qt,rects:un,y:bn}=Et,Kt=$i(qt),vt=ts(Kt),Dt=U.current,jn=Nt.arrow?.x||0,ut=Nt.arrow?.y||0,Wt=Dt?.clientWidth||0,En=Dt?.clientHeight||0,mn=jn+Wt/2,Un=ut+En/2,an=Math.abs(Nt.shift?.y||0),fr=un.reference.height/2,Vn=typeof i=="function"?i(dj(Et,r,ee)):i,Xt=an>Vn,ar={top:`${mn}px calc(100% + ${Vn}px)`,bottom:`${mn}px ${-Vn}px`,left:`calc(100% + ${Vn}px) ${Un}px`,right:`${-Vn}px ${Un}px`}[Kt],ei=`${mn}px ${un.reference.y+fr-bn}px`;return Yt.floating.style.setProperty("--transform-origin",ie&&vt==="y"&&Xt?ei:ar),{}}},u1e,v),nt(()=>{!y&&S&&S.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[y,S]);const Te=k.useMemo(()=>({elementResize:!p&&typeof ResizeObserver<"u",layoutShift:!p&&typeof IntersectionObserver<"u"}),[p]),{refs:we,elements:Ie,x:Fe,y:ye,middlewareData:Ue,update:Re,placement:Ye,context:$e,isPositioned:Le,floatingStyles:Ve}=ybe({rootContext:S,placement:H,middleware:Ee,strategy:n,whileElementsMounted:g?void 0:(...Et)=>oj(...Et,Te),nodeId:w,externalTree:b}),{sideX:ft,sideY:Oe}=Ue.adaptiveOrigin||f1e,me=Le?n:"fixed",Ne=k.useMemo(()=>v?{position:me,[ft]:Fe,[Oe]:ye}:{position:me,...Ve},[v,me,ft,Fe,Oe,ye,Ve]),Ke=k.useRef(null);nt(()=>{if(!y)return;const Et=Z.current,Yt=typeof Et=="function"?Et():Et,qt=(hj(Yt)?Yt.current:Yt)||null||null;qt!==Ke.current&&(we.setPositionReference(qt),Ke.current=qt)},[y,we,q,Z]),k.useEffect(()=>{if(!y)return;const Et=Z.current;typeof Et!="function"&&hj(Et)&&Et.current!==Ke.current&&(we.setPositionReference(Et.current),Ke.current=Et.current)},[y,we,q,Z]),k.useEffect(()=>{if(g&&y&&Ie.domReference&&Ie.floating)return oj(Ie.domReference,Ie.floating,Re,Te)},[g,y,Ie,Re,Te]);const it=$i(Ye),yt=x6(r,it,ee),bt=nl(Ye)||"center",ht=!!Ue.hide?.referenceHidden;nt(()=>{E&&y&&Le&&_(it)},[E,y,Le,it]);const on=k.useMemo(()=>({position:"absolute",top:Ue.arrow?.y,left:Ue.arrow?.x}),[Ue.arrow]),Vt=Ue.arrow?.centerOffset!==0;return k.useMemo(()=>({positionerStyles:Ne,arrowStyles:on,arrowRef:U,arrowUncentered:Vt,side:yt,align:bt,physicalSide:it,anchorHidden:ht,refs:we,context:$e,isPositioned:Le,update:Re}),[Ne,on,U,Vt,yt,bt,it,ht,we,$e,Le,Re])}function hj(e){return e!=null&&"current"in e}const _6=k.createContext(void 0);function g2(){const e=k.useContext(_6);if(!e)throw new Error(no(59));return e}const h1e=k.forwardRef(function(t,n){const{cutout:r,...i}=t;let o;if(r){const l=r?.getBoundingClientRect();o=`polygon(
124
- 0% 0%,
125
- 100% 0%,
126
- 100% 100%,
127
- 0% 100%,
128
- 0% 0%,
129
- ${l.left}px ${l.top}px,
130
- ${l.left}px ${l.bottom}px,
131
- ${l.right}px ${l.bottom}px,
132
- ${l.right}px ${l.top}px,
133
- ${l.left}px ${l.top}px
134
- )`}return j.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...i,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:o}})});function Hy(e,t){e&&Object.assign(e.style,t)}const E6={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},p1e={position:"fixed"},m1e=k.forwardRef(function(t,n){const{anchor:r,positionMethod:i="absolute",className:o,render:l,side:c="bottom",align:u="center",sideOffset:d=0,alignOffset:h=0,collisionBoundary:p="clipping-ancestors",collisionPadding:g,arrowPadding:S=5,sticky:y=!1,disableAnchorTracking:C,alignItemWithTrigger:x=!0,collisionAvoidance:w=Ere,...v}=t,{store:E,listRef:b,labelsRef:T,alignItemWithTriggerActiveRef:_,selectedItemTextRef:O,valuesRef:M,initialValueRef:P,popupRef:z,setValue:L}=so(),q=v6(),Z=wt(E,gt.open),te=wt(E,gt.mounted),ee=wt(E,gt.modal),G=wt(E,gt.value),H=wt(E,gt.openMethod),Y=wt(E,gt.positionerElement),oe=wt(E,gt.triggerElement),re=wt(E,gt.isItemEqualToValue),I=k.useRef(null),B=k.useRef(null),[$,N]=k.useState(x),U=te&&$&&H!=="touch";!te&&$!==x&&N(x),nt(()=>{te||(gt.scrollUpArrowVisible(E.state)&&E.set("scrollUpArrowVisible",!1),gt.scrollDownArrowVisible(E.state)&&E.set("scrollDownArrowVisible",!1))},[E,te]),k.useImperativeHandle(_,()=>U),n1e((U||ee)&&Z&&H!=="touch",oe);const J=d1e({anchor:r,floatingRootContext:q,positionMethod:i,mounted:te,side:c,sideOffset:d,align:u,alignOffset:h,arrowPadding:S,collisionBoundary:p,collisionPadding:g,sticky:y,disableAnchorTracking:C??U,collisionAvoidance:w,keepMounted:!0}),ne=U?"none":J.side,se=U?p1e:J.positionerStyles,he=k.useMemo(()=>{const we={};return Z||(we.pointerEvents="none"),{role:"presentation",hidden:!te,style:{...se,...we}}},[Z,te,se]),Ee=k.useMemo(()=>({open:Z,side:ne,align:J.align,anchorHidden:J.anchorHidden}),[Z,ne,J.align,J.anchorHidden]),Q=at(we=>{E.set("positionerElement",we)}),ie=Pr("div",t,{ref:[n,Q],state:Ee,stateAttributesMapping:S6,props:[he,v]}),le=k.useRef(0),Se=at(we=>{if(we.size===0&&le.current===0||M.current.length===0)return;const Ie=le.current;if(le.current=we.size,we.size===Ie)return;const Fe=kn(tf);if(Ie!==0&&!E.state.multiple&&G!==null&&Cx(M.current,G,re)===-1){const Ue=P.current,Ye=Ue!=null&&FS(M.current,Ue,re)?Ue:null;L(Ye,Fe),Ye===null&&(E.set("selectedIndex",null),O.current=null)}if(Ie!==0&&E.state.multiple&&Array.isArray(G)){const ye=G.filter(Ue=>FS(M.current,Ue,re));(ye.length!==G.length||ye.some(Ue=>!FS(G,Ue,re)))&&(L(ye,Fe),ye.length===0&&(E.set("selectedIndex",null),O.current=null))}if(Z&&U){E.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const ye={height:""};Hy(Y,ye),Hy(z.current,ye)}}),Te=k.useMemo(()=>({...J,side:ne,alignItemWithTriggerActive:U,setControlledAlignItemWithTrigger:N,scrollUpArrowRef:I,scrollDownArrowRef:B}),[J,ne,U,N]);return j.jsx(p2,{elementsRef:b,labelsRef:T,onMapChange:Se,children:j.jsxs(_6.Provider,{value:Te,children:[te&&ee&&j.jsx(h1e,{inert:Wbe(!Z),cutout:oe}),ie]})})});function C6(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",Ox={className:Og,element:j.jsx("style",{href:Og,precedence:"base-ui:low",children:`.${Og}{scrollbar-width:none}.${Og}::-webkit-scrollbar{display:none}`})},g1e=k.createContext(void 0);function y1e(e){return k.useContext(g1e)}const Iu="ArrowUp",Bl="ArrowDown",xh="ArrowLeft",$u="ArrowRight",np="Home",rp="End",T6=new Set([xh,$u]),v1e=new Set([xh,$u,np,rp]),R6=new Set([Iu,Bl]),b1e=new Set([Iu,Bl,np,rp]),O6=new Set([...T6,...R6]),S1e=new Set([...O6,np,rp]),w1e=new Set([Iu,Bl,xh,$u,np,rp]),x1e="Shift",_1e="Control",E1e="Alt",C1e="Meta",T1e=new Set([x1e,_1e,E1e,C1e]);function R1e(e){return sr(e)&&e.tagName==="INPUT"}function pj(e){return!!(R1e(e)&&e.selectionStart!=null||sr(e)&&e.tagName==="TEXTAREA")}function mj(e,t,n,r){if(!e||!t||!t.scrollTo)return;let i=e.scrollLeft,o=e.scrollTop;const l=e.clientWidth<e.scrollWidth,c=e.clientHeight<e.scrollHeight;if(l&&r!=="vertical"){const u=gj(e,t,"left"),d=Ag(e),h=Ag(t);n==="ltr"&&(u+t.offsetWidth+h.scrollMarginRight>e.scrollLeft+e.clientWidth-d.scrollPaddingRight?i=u+t.offsetWidth+h.scrollMarginRight-e.clientWidth+d.scrollPaddingRight:u-h.scrollMarginLeft<e.scrollLeft+d.scrollPaddingLeft&&(i=u-h.scrollMarginLeft-d.scrollPaddingLeft)),n==="rtl"&&(u-h.scrollMarginRight<e.scrollLeft+d.scrollPaddingLeft?i=u-h.scrollMarginLeft-d.scrollPaddingLeft:u+t.offsetWidth+h.scrollMarginRight>e.scrollLeft+e.clientWidth-d.scrollPaddingRight&&(i=u+t.offsetWidth+h.scrollMarginRight-e.clientWidth+d.scrollPaddingRight))}if(c&&r!=="horizontal"){const u=gj(e,t,"top"),d=Ag(e),h=Ag(t);u-h.scrollMarginTop<e.scrollTop+d.scrollPaddingTop?o=u-h.scrollMarginTop-d.scrollPaddingTop:u+t.offsetHeight+h.scrollMarginBottom>e.scrollTop+e.clientHeight-d.scrollPaddingBottom&&(o=u+t.offsetHeight+h.scrollMarginBottom-e.clientHeight+d.scrollPaddingBottom)}e.scrollTo({left:i,top:o,behavior:"auto"})}function gj(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);)t=t.offsetParent;return i}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 O1e(e){return e==="starting"?xre:Pi}const A1e={...S6,...b6},k1e=k.forwardRef(function(t,n){const{render:r,className:i,...o}=t,{store:l,popupRef:c,onOpenChangeComplete:u,setOpen:d,valueRef:h,selectedItemTextRef:p,keyboardActiveRef:g,multiple:S,handleScrollArrowVisibility:y,scrollHandlerRef:C}=so(),{side:x,align:w,alignItemWithTriggerActive:v,setControlledAlignItemWithTrigger:E,scrollDownArrowRef:b,scrollUpArrowRef:T}=g2(),_=y1e()!=null,O=v6(),M=Ni(),P=wt(l,gt.id),z=wt(l,gt.open),L=wt(l,gt.mounted),q=wt(l,gt.popupProps),Z=wt(l,gt.transitionStatus),te=wt(l,gt.triggerElement),ee=wt(l,gt.positionerElement),G=wt(l,gt.listElement),H=k.useRef(0),Y=k.useRef(!1),oe=k.useRef(0),re=k.useRef(!1),I=k.useRef({}),B=U0(),$=at(ne=>{if(!ee||!c.current||!re.current)return;if(Y.current||!v){y();return}const se=ee.style.top==="0px",he=ee.style.bottom==="0px",Ee=ee.getBoundingClientRect().height,Q=Xs(ee),ie=getComputedStyle(ee),le=parseFloat(ie.marginTop),Se=parseFloat(ie.marginBottom),Te=Q.documentElement.clientHeight-le-Se,we=ne.scrollTop,Ie=ne.scrollHeight,Fe=ne.clientHeight,ye=Ie-Fe;let Ue=null,Re=null,Ye=!1;if(se){const $e=ye-we,Le=Ee+$e,Ve=Math.min(Le,Te);Ue=Ve,Ve!==Te?Re=ye:Ye=!0}else if(he){const $e=we-0,Le=Ee+$e,Ve=Math.min(Le,Te),ft=Le-Te;Ue=Ve,Ve!==Te?Re=0:(Ye=!0,we<ye&&(Re=we-($e-ft)))}Ue!=null&&(ee.style.height=`${Ue}px`),Re!=null&&(ne.scrollTop=Re),Ye&&(Y.current=!0),y()});k.useImperativeHandle(C,()=>$,[$]),B0({open:z,ref:c,onComplete(){z&&u?.(!0)}});const N=k.useMemo(()=>({open:z,transitionStatus:Z,side:x,align:w}),[z,Z,x,w]);nt(()=>{!ee||!c.current||Object.keys(I.current).length||(I.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]),nt(()=>{L||v||(re.current=!1,Y.current=!1,H.current=0,oe.current=0,Hy(ee,I.current))},[L,v,ee,c]),nt(()=>{const ne=c.current;if(!(!L||!te||!ee||!ne)){if(!v){re.current=!0,B.request(y);return}queueMicrotask(()=>{const se=getComputedStyle(ee),he=getComputedStyle(ne),Ee=Xs(te),Q=Or(ee),ie=te.getBoundingClientRect(),le=ee.getBoundingClientRect(),Se=ie.left,Te=ie.height,we=G||ne,Ie=we.scrollHeight,Fe=parseFloat(he.borderBottomWidth),ye=parseFloat(se.marginTop)||10,Ue=parseFloat(se.marginBottom)||10,Re=parseFloat(se.minHeight)||100,Ye=5,$e=5,Le=20,Ve=Ee.documentElement.clientHeight-ye-Ue,ft=Ee.documentElement.clientWidth,Oe=Ve-ie.bottom+Te,me=p.current,Ne=h.current;let Ke=0,it=0;if(me&&Ne){const Kt=Ne.getBoundingClientRect(),vt=me.getBoundingClientRect(),Dt=Kt.left-Se,jn=vt.left-le.left,ut=Kt.top-ie.top+Kt.height/2,Wt=vt.top-le.top+vt.height/2;Ke=Dt-jn,it=Wt-ut}const yt=Oe+it+Ue+Fe;let bt=Math.min(Ve,yt);const ht=Ve-ye-Ue,on=yt-bt,Vt=Math.max(Ye,Se+Ke),Et=ft-$e,Yt=Math.max(0,Vt+le.width-Et);ee.style.left=`${Vt-Yt}px`,ee.style.height=`${bt}px`,ee.style.maxHeight="auto",ee.style.marginTop=`${ye}px`,ee.style.marginBottom=`${Ue}px`,ne.style.height="100%";const Nt=we.scrollHeight-we.clientHeight,qt=on>=Nt;qt&&(bt=Math.min(Ve,le.height)-(on-Nt));const un=ie.top<Le||ie.bottom>Ve-Le||bt<Math.min(Ie,Re),bn=(Q.visualViewport?.scale??1)!==1&&Az;if(un||bn){re.current=!0,Hy(ee,I.current),Do.flushSync(()=>E(!1));return}if(qt){const Kt=Math.max(0,Ve-yt);ee.style.top=le.height>=ht?"0":`${Kt}px`,ee.style.height=`${bt}px`,we.scrollTop=we.scrollHeight-we.clientHeight,H.current=Math.max(Re,bt)}else ee.style.bottom="0",H.current=Math.max(Re,bt),we.scrollTop=on;H.current===Ve&&(Y.current=!0),y(),setTimeout(()=>{re.current=!0})})}},[l,L,ee,te,h,p,c,y,v,E,B,b,T,G]),k.useEffect(()=>{if(!v||!ee||!L)return;const ne=Or(ee);function se(he){d(!1,kn(M0e,he))}return ne.addEventListener("resize",se),()=>{ne.removeEventListener("resize",se)}},[d,v,ee,L]);const U={...G?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":S||void 0,id:`${P}-list`},onKeyDown(ne){g.current=!0,_&&w1e.has(ne.key)&&ne.stopPropagation()},onMouseMove(){g.current=!1},onPointerLeave(ne){if(C6(ne)||ne.pointerType==="touch")return;const se=ne.currentTarget;M.start(0,()=>{l.set("activeIndex",null),se.focus({preventScroll:!0})})},onScroll(ne){G||C.current?.(ne.currentTarget)},...v&&{style:G?{height:"100%"}:E6}},J=Pr("div",t,{ref:[n,c],state:N,stateAttributesMapping:A1e,props:[q,U,O1e(Z),{className:!G&&v?Ox.className:void 0},o]});return j.jsxs(k.Fragment,{children:[Ox.element,j.jsx(xve,{context:O,modal:!1,disabled:!L,restoreFocus:!0,children:J})]})}),M1e=k.forwardRef(function(t,n){const{className:r,render:i,...o}=t,{store:l,scrollHandlerRef:c}=so(),{alignItemWithTriggerActive:u}=g2(),d=wt(l,gt.hasScrollArrows),h=wt(l,gt.openMethod),p=wt(l,gt.multiple),S={id:`${wt(l,gt.id)}-list`,role:"listbox","aria-multiselectable":p||void 0,onScroll(C){c.current?.(C.currentTarget)},...u&&{style:E6},className:d&&h!=="touch"?Ox.className:void 0},y=at(C=>{l.set("listElement",C)});return Pr("div",t,{ref:[n,y],props:[S,o]})});let A6=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function y2(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:i,index:o}=e,{register:l,unregister:c,subscribeMapChange:u,elementsRef:d,labelsRef:h,nextIndexRef:p}=r1e(),g=k.useRef(-1),[S,y]=k.useState(o??(i===A6.GuessFromOrder?()=>{if(g.current===-1){const w=p.current;p.current+=1,g.current=w}return g.current}:-1)),C=k.useRef(null),x=k.useCallback(w=>{if(C.current=w,S!==-1&&w!==null&&(d.current[S]=w,h)){const v=t!==void 0;h.current[S]=v?t:r?.current?.textContent??w.textContent}},[S,d,h,t,r]);return nt(()=>{if(o!=null)return;const w=C.current;if(w)return l(w,n),()=>{c(w)}},[o,l,c,n]),nt(()=>{if(o==null)return u(w=>{const v=C.current?w.get(C.current)?.index:null;v!=null&&y(v)})},[o,u,y]),k.useMemo(()=>({ref:x,index:S}),[S,x])}const k6=k.createContext(void 0);function v2(){const e=k.useContext(k6);if(!e)throw new Error(no(57));return e}const j1e=k.memo(k.forwardRef(function(t,n){const{render:r,className:i,value:o=null,label:l,disabled:c=!1,nativeButton:u=!1,...d}=t,h=k.useRef(null),p=y2({label:l,textRef:h,indexGuessBehavior:A6.GuessFromOrder}),{store:g,getItemProps:S,setOpen:y,setValue:C,selectionRef:x,typingRef:w,valuesRef:v,keyboardActiveRef:E,multiple:b,highlightItemOnHover:T}=so(),_=Ni(),O=wt(g,gt.isActive,p.index),M=wt(g,gt.isSelected,p.index,o),P=wt(g,gt.isSelectedByFocus,p.index),z=wt(g,gt.isItemEqualToValue),L=p.index,q=L!==-1,Z=k.useRef(null),te=Hr(L);nt(()=>{if(!q)return;const J=v.current;return J[L]=o,()=>{delete J[L]}},[q,L,o,v]),nt(()=>{if(!q)return;const J=g.state.value;let ne=J;b&&Array.isArray(J)&&J.length>0&&(ne=J[J.length-1]),ne!==void 0&&nf(ne,o,z)&&g.set("selectedIndex",L)},[q,L,b,z,g,o]);const ee=k.useMemo(()=>({disabled:c,selected:M,highlighted:O}),[c,M,O]),G=S({active:O,selected:M});G.onFocus=void 0,G.id=void 0;const H=k.useRef(null),Y=k.useRef("mouse"),oe=k.useRef(!1),{getButtonProps:re,buttonRef:I}=_0({disabled:c,focusableWhenDisabled:!0,native:u});function B(J){const ne=g.state.value;if(b){const se=Array.isArray(ne)?ne:[],he=M?Cbe(se,o,z):[...se,o];C(he,kn(AS,J))}else C(o,kn(AS,J)),y(!1,kn(AS,J))}const $={role:"option","aria-selected":M,"aria-disabled":c||void 0,tabIndex:O?0:-1,onFocus(){g.set("activeIndex",L)},onMouseEnter(){!E.current&&g.state.selectedIndex===null&&g.set("activeIndex",L)},onMouseMove(){T&&g.set("activeIndex",L)},onMouseLeave(J){!T||E.current||C6(J)||_.start(0,()=>{g.state.activeIndex===L&&g.set("activeIndex",null)})},onTouchStart(){x.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(J){H.current=J.key,g.set("activeIndex",L)},onClick(J){oe.current=!1,!(J.type==="keydown"&&H.current===null)&&(c||H.current===" "&&w.current||Y.current!=="touch"&&!O||(H.current=null,B(J.nativeEvent)))},onPointerEnter(J){Y.current=J.pointerType},onPointerDown(J){Y.current=J.pointerType,oe.current=!0},onMouseUp(J){if(c)return;if(oe.current){oe.current=!1;return}const ne=!x.current.allowSelectedMouseUp&&M,se=!x.current.allowUnselectedMouseUp&&!M;ne||se||Y.current!=="touch"&&!O||B(J.nativeEvent)}},N=Pr("div",t,{ref:[I,n,p.ref,Z],state:ee,props:[G,$,d,re]}),U=k.useMemo(()=>({selected:M,indexRef:te,textRef:h,selectedByFocus:P,hasRegistered:q}),[M,te,h,P,q]);return j.jsx(k6.Provider,{value:U,children:N})})),P1e=k.forwardRef(function(t,n){const r=t.keepMounted??!1,{selected:i}=v2();return r||i?j.jsx(N1e,{...t,ref:n}):null}),N1e=k.memo(k.forwardRef((e,t)=>{const{render:n,className:r,keepMounted:i,...o}=e,{selected:l}=v2(),c=k.useRef(null),{transitionStatus:u,setMounted:d}=d2(l),h=k.useMemo(()=>({selected:l,transitionStatus:u}),[l,u]),p=Pr("span",e,{ref:[t,c],state:h,props:[{"aria-hidden":!0,children:"✔️"},o],stateAttributesMapping:b6});return B0({open:l,ref:c,onComplete(){l||d(!1)}}),p})),D1e=k.memo(k.forwardRef(function(t,n){const{indexRef:r,textRef:i,selectedByFocus:o,hasRegistered:l}=v2(),{selectedItemTextRef:c}=so(),{className:u,render:d,...h}=t,p=k.useCallback(S=>{if(!S||!l)return;const y=c.current===null||!c.current.isConnected;(o||y&&r.current===0)&&(c.current=S)},[c,r,o,l]);return Pr("div",t,{ref:[p,n,i],props:h})})),M6=k.forwardRef(function(t,n){const{render:r,className:i,direction:o,keepMounted:l=!1,...c}=t,{store:u,popupRef:d,listRef:h,handleScrollArrowVisibility:p,scrollArrowsMountedCountRef:g}=so(),{side:S,scrollDownArrowRef:y,scrollUpArrowRef:C}=g2(),x=o==="up"?gt.scrollUpArrowVisible:gt.scrollDownArrowVisible,w=wt(u,x),v=wt(u,gt.openMethod),E=w&&v!=="touch",b=Ni(),T=o==="up"?C:y,{transitionStatus:_,setMounted:O}=d2(E);nt(()=>(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]),B0({open:E,ref:T,onComplete(){E||O(!1)}});const M=k.useMemo(()=>({direction:o,visible:E,side:S,transitionStatus:_}),[o,E,S,_]),z=Pr("div",t,{ref:[n,T],state:M,props:[{"aria-hidden":!0,children:o==="up"?"▲":"▼",style:{position:"absolute"},onMouseMove(q){if(q.movementX===0&&q.movementY===0||b.isStarted())return;u.set("activeIndex",null);function Z(){const te=u.state.listElement??d.current;if(!te)return;u.set("activeIndex",null),p();const ee=te.scrollTop===0,G=Math.round(te.scrollTop+te.clientHeight)>=te.scrollHeight;if(h.current.length===0&&(o==="up"?u.set("scrollUpArrowVisible",!ee):u.set("scrollDownArrowVisible",!G)),o==="up"&&ee||o==="down"&&G){b.clear();return}if((u.state.listElement||d.current)&&h.current&&h.current.length>0){const Y=h.current,oe=T.current?.offsetHeight||0;if(o==="up"){let re=0;const I=te.scrollTop+oe;for(let $=0;$<Y.length;$+=1){const N=Y[$];if(N&&N.offsetTop>=I){re=$;break}}const B=Math.max(0,re-1);if(B<re){const $=Y[B];$&&(te.scrollTop=Math.max(0,$.offsetTop-oe))}else te.scrollTop=0}else{let re=Y.length-1;const I=te.scrollTop+te.clientHeight-oe;for(let $=0;$<Y.length;$+=1){const N=Y[$];if(N&&N.offsetTop+N.offsetHeight>I){re=Math.max(0,$-1);break}}const B=Math.min(Y.length-1,re+1);if(B>re){const $=Y[B];$&&(te.scrollTop=$.offsetTop+$.offsetHeight-te.clientHeight+oe)}else te.scrollTop=te.scrollHeight-te.clientHeight}}b.start(40,Z)}b.start(40,Z)},onMouseLeave(){b.clear()}},c]});return E||l?z:null}),I1e=k.forwardRef(function(t,n){return j.jsx(M6,{...t,ref:n,direction:"down"})}),$1e=k.forwardRef(function(t,n){return j.jsx(M6,{...t,ref:n,direction:"up"})}),z1e=k.createContext(void 0),L1e=k.forwardRef(function(t,n){const{className:r,render:i,...o}=t,[l,c]=k.useState(),u=k.useMemo(()=>({labelId:l,setLabelId:c}),[l,c]),d=Pr("div",t,{ref:n,props:[{role:"group","aria-labelledby":l},o]});return j.jsx(z1e.Provider,{value:u,children:d})}),F1e=jbe;function U1e({className:e,...t}){return j.jsx(L1e,{"data-slot":"select-group",className:cn("scroll-my-1",e),...t})}function V1e({className:e,...t}){return j.jsx(Kbe,{"data-slot":"select-value",className:cn("flex flex-1 text-left",e),...t})}function q1e({className:e,size:t="default",children:n,...r}){return j.jsxs(Bbe,{"data-slot":"select-trigger","data-size":t,className:cn("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(Gbe,{render:j.jsx(tD,{className:"text-muted-foreground size-4 pointer-events-none"})})]})}function B1e({className:e,children:t,side:n="bottom",sideOffset:r=4,align:i="center",alignOffset:o=0,alignItemWithTrigger:l=!0,...c}){return j.jsx(Ybe,{children:j.jsx(m1e,{side:n,sideOffset:r,align:i,alignOffset:o,alignItemWithTrigger:l,className:"isolate z-50",children:j.jsxs(k1e,{"data-slot":"select-content",className:cn("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(H1e,{}),j.jsx(M1e,{children:t}),j.jsx(K1e,{})]})})})}function kg({className:e,children:t,...n}){return j.jsxs(j1e,{"data-slot":"select-item",className:cn("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(D1e,{className:"flex flex-1 gap-2 shrink-0 whitespace-nowrap",children:t}),j.jsx(P1e,{render:j.jsx("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center"}),children:j.jsx(Mne,{className:"pointer-events-none"})})]})}function H1e({className:e,...t}){return j.jsx($1e,{"data-slot":"select-scroll-up-button",className:cn("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(Nne,{})})}function K1e({className:e,...t}){return j.jsx(I1e,{"data-slot":"select-scroll-down-button",className:cn("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(tD,{})})}const j6=k.createContext(void 0);function b2(){const e=k.useContext(j6);if(e===void 0)throw new Error(no(64));return e}let G1e=(function(e){return e.activationDirection="data-activation-direction",e.orientation="data-orientation",e})({});const S2={tabActivationDirection:e=>({[G1e.activationDirection]:e})},Z1e=k.forwardRef(function(t,n){const{className:r,defaultValue:i=0,onValueChange:o,orientation:l="horizontal",render:c,value:u,...d}=t,h=m2(),p=Object.hasOwn(t,"defaultValue"),g=k.useRef([]),[S,y]=k.useState(()=>new Map),[C,x]=Ly({controlled:u,default:i,name:"Tabs",state:"value"}),w=u!==void 0,[v,E]=k.useState(()=>new Map),[b,T]=k.useState("none"),_=at((H,Y)=>{o?.(H,Y),!Y.isCanceled&&(x(H),T(Y.activationDirection))}),O=at((H,Y)=>{y(oe=>{if(oe.get(H)===Y)return oe;const re=new Map(oe);return re.set(H,Y),re})}),M=at((H,Y)=>{y(oe=>{if(!oe.has(H)||oe.get(H)!==Y)return oe;const re=new Map(oe);return re.delete(H),re})}),P=k.useCallback(H=>S.get(H),[S]),z=k.useCallback(H=>{for(const Y of v.values())if(H===Y?.value)return Y?.id},[v]),L=k.useCallback(H=>{if(H===void 0)return null;for(const[Y,oe]of v.entries())if(oe!=null&&H===(oe.value??oe.index))return Y;return null},[v]),q=k.useMemo(()=>({direction:h,getTabElementBySelectedValue:L,getTabIdByPanelValue:z,getTabPanelIdByValue:P,onValueChange:_,orientation:l,registerMountedTabPanel:O,setTabMap:E,unregisterMountedTabPanel:M,tabActivationDirection:b,value:C}),[h,L,z,P,_,l,O,E,M,b,C]),Z=k.useMemo(()=>{for(const H of v.values())if(H!=null&&H.value===C)return H},[v,C]),te=k.useMemo(()=>{for(const H of v.values())if(H!=null&&!H.disabled)return H.value},[v]);nt(()=>{if(w||v.size===0)return;const H=Z?.disabled,Y=Z==null&&C!==null;if(p&&H&&C===i||!H&&!Y)return;const re=te??null;C!==re&&(x(re),T("none"))},[i,te,p,w,Z,T,x,v,C]);const G=Pr("div",t,{state:{orientation:l,tabActivationDirection:b},ref:n,props:d,stateAttributesMapping:S2});return j.jsx(j6.Provider,{value:q,children:j.jsx(p2,{elementsRef:g,children:G})})}),P6="data-composite-item-active";function Y1e(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=oD(),{ref:i,index:o}=y2(e),l=n===o,c=k.useRef(null),u=qa(i,c);return{compositeProps:k.useMemo(()=>({tabIndex:l?0:-1,onFocus(){r(o)},onMouseMove(){const h=c.current;if(!t||!h)return;const p=h.hasAttribute("disabled")||h.ariaDisabled==="true";!l&&!p&&h.focus()}}),[l,r,o,t]),compositeRef:u,index:o}}const N6=k.createContext(void 0);function W1e(){const e=k.useContext(N6);if(e===void 0)throw new Error(no(65));return e}const X1e=k.forwardRef(function(t,n){const{className:r,disabled:i=!1,render:o,value:l,id:c,nativeButton:u=!0,...d}=t,{value:h,getTabPanelIdByValue:p,orientation:g}=b2(),{activateOnFocus:S,highlightedTabIndex:y,onTabActivation:C,setHighlightedTabIndex:x,tabsListElement:w}=W1e(),v=i2(c),E=k.useMemo(()=>({disabled:i,id:v,value:l}),[i,v,l]),{compositeProps:b,compositeRef:T,index:_}=Y1e({metadata:E}),O=l===h,M=k.useRef(!1);nt(()=>{if(M.current){M.current=!1;return}if(!(O&&_>-1&&y!==_))return;const oe=w;if(oe!=null){const re=Oo(Xs(oe));if(re&&Bn(oe,re))return}i||x(_)},[O,_,y,x,i,w]);const{getButtonProps:P,buttonRef:z}=_0({disabled:i,native:u,focusableWhenDisabled:!0}),L=p(l),q=k.useRef(!1),Z=k.useRef(!1);function te(oe){O||i||C(l,kn(tf,oe.nativeEvent,void 0,{activationDirection:"none"}))}function ee(oe){O||(_>-1&&!i&&x(_),!i&&S&&(!q.current||q.current&&Z.current)&&C(l,kn(tf,oe.nativeEvent,void 0,{activationDirection:"none"})))}function G(oe){if(O||i)return;q.current=!0;function re(){q.current=!1,Z.current=!1}(!oe.button||oe.button===0)&&(Z.current=!0,Xs(oe.currentTarget).addEventListener("pointerup",re,{once:!0}))}const H=k.useMemo(()=>({disabled:i,active:O,orientation:g}),[i,O,g]);return Pr("button",t,{state:H,ref:[n,z,T],props:[b,{role:"tab","aria-controls":L,"aria-selected":O,id:v,onClick:te,onFocus:ee,onPointerDown:G,[P6]:O?"":void 0,onKeyDownCapture(){M.current=!0}},d,P]})});let Q1e=(function(e){return e.index="data-index",e.activationDirection="data-activation-direction",e.orientation="data-orientation",e.hidden="data-hidden",e})({});const J1e=k.forwardRef(function(t,n){const{className:r,value:i,render:o,keepMounted:l=!1,...c}=t,{value:u,getTabIdByPanelValue:d,orientation:h,tabActivationDirection:p,registerMountedTabPanel:g,unregisterMountedTabPanel:S}=b2(),y=i2(),C=k.useMemo(()=>({id:y,value:i}),[y,i]),{ref:x,index:w}=y2({metadata:C}),v=i!==u,E=d(i),b=k.useMemo(()=>({hidden:v,orientation:h,tabActivationDirection:p}),[v,h,p]),T=Pr("div",t,{state:b,ref:[n,x],props:[{"aria-labelledby":E,hidden:v,id:y??void 0,role:"tabpanel",tabIndex:v?-1:0,[Q1e.index]:w},c],stateAttributesMapping:S2});return nt(()=>{if(!(v&&!l)&&y!=null)return g(i,y),()=>{S(i,y)}},[v,l,i,y,g,S]),!v||l?T:null});function eSe(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}const tSe=[];function nSe(e){const{itemSizes:t,cols:n=1,loopFocus:r=!0,dense:i=!1,orientation:o="both",direction:l,highlightedIndex:c,onHighlightedIndexChange:u,rootRef:d,enableHomeAndEndKeys:h=!1,stopEventPropagation:p=!1,disabledIndices:g,modifierKeys:S=tSe}=e,[y,C]=k.useState(0),x=n>1,w=k.useRef(null),v=qa(w,d),E=k.useRef([]),b=k.useRef(!1),T=c??y,_=at((P,z=!1)=>{if((u??C)(P),z){const L=E.current[P];mj(w.current,L,l,o)}}),O=at(P=>{if(P.size===0||b.current)return;b.current=!0;const z=Array.from(P.keys()),L=z.find(Z=>Z?.hasAttribute(P6))??null,q=L?z.indexOf(L):-1;q!==-1&&_(q),mj(w.current,L,l,o)}),M=k.useMemo(()=>({"aria-orientation":o==="both"?void 0:o,ref:v,onFocus(P){!w.current||!pj(P.target)||P.target.setSelectionRange(0,P.target.value.length??0)},onKeyDown(P){const z=h?S1e:O6;if(!z.has(P.key)||rSe(P,S)||!w.current)return;const q=l==="rtl",Z=q?xh:$u,te={horizontal:Z,vertical:Bl,both:Z}[o],ee=q?$u:xh,G={horizontal:ee,vertical:Iu,both:ee}[o];if(pj(P.target)&&!eSe(P.target)){const $=P.target.selectionStart,N=P.target.selectionEnd,U=P.target.value??"";if($==null||P.shiftKey||$!==N||P.key!==G&&$<U.length||P.key!==te&&$>0)return}let H=T;const Y=Zg(E,g),oe=xx(E,g);if(x){const $=t||Array.from({length:E.current.length},()=>({width:1,height:1})),N=zz($,n,i),U=N.findIndex(ne=>ne!=null&&!za(E,ne,g)),J=N.reduce((ne,se,he)=>se!=null&&!za(E,se,g)?he:ne,-1);H=N[$z({current:N.map(ne=>ne?E.current[ne]:null)},{event:P,orientation:o,loopFocus:r,cols:n,disabledIndices:Fz([...g||E.current.map((ne,se)=>za(E,se)?se:void 0),void 0],N),minIndex:U,maxIndex:J,prevIndex:Lz(T>oe?Y:T,$,N,n,P.key===Bl?"bl":P.key===$u?"tr":"tl"),rtl:q})]}const re={horizontal:[Z],vertical:[Bl],both:[Z,Bl]}[o],I={horizontal:[ee],vertical:[Iu],both:[ee,Iu]}[o],B=x?z:{horizontal:h?v1e:T6,vertical:h?b1e:R6,both:z}[o];h&&(P.key===np?H=Y:P.key===rp&&(H=oe)),H===T&&(re.includes(P.key)||I.includes(P.key))&&(r&&H===oe&&re.includes(P.key)?H=Y:r&&H===Y&&I.includes(P.key)?H=oe:H=Vr(E,{startingIndex:H,decrement:I.includes(P.key),disabledIndices:g})),H!==T&&!ju(E,H)&&(p&&P.stopPropagation(),B.has(P.key)&&P.preventDefault(),_(H,!0),queueMicrotask(()=>{E.current[H]?.focus()}))}}),[n,i,l,g,E,h,T,x,t,r,v,S,_,o,p]);return k.useMemo(()=>({props:M,highlightedIndex:T,onHighlightedIndexChange:_,elementsRef:E,disabledIndices:g,onMapChange:O,relayKeyboardEvent:M.onKeyDown}),[M,T,_,E,g,O])}function rSe(e,t){for(const n of T1e.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function iSe(e){const{render:t,className:n,refs:r=Bu,props:i=Bu,state:o=Pi,stateAttributesMapping:l,highlightedIndex:c,onHighlightedIndexChange:u,orientation:d,dense:h,itemSizes:p,loopFocus:g,cols:S,enableHomeAndEndKeys:y,onMapChange:C,stopEventPropagation:x=!0,rootRef:w,disabledIndices:v,modifierKeys:E,highlightItemOnHover:b=!1,tag:T="div",..._}=e,O=m2(),{props:M,highlightedIndex:P,onHighlightedIndexChange:z,elementsRef:L,onMapChange:q,relayKeyboardEvent:Z}=nSe({itemSizes:p,cols:S,loopFocus:g,dense:h,orientation:d,highlightedIndex:c,onHighlightedIndexChange:u,rootRef:w,stopEventPropagation:x,enableHomeAndEndKeys:y,direction:O,disabledIndices:v,modifierKeys:E}),te=Pr(T,e,{state:o,ref:r,props:[M,...i,_],stateAttributesMapping:l}),ee=k.useMemo(()=>({highlightedIndex:P,onHighlightedIndexChange:z,highlightItemOnHover:b,relayKeyboardEvent:Z}),[P,z,b,Z]);return j.jsx(sD.Provider,{value:ee,children:j.jsx(p2,{elementsRef:L,onMapChange:G=>{C?.(G),q(G)},children:te})})}const sSe=k.forwardRef(function(t,n){const{activateOnFocus:r=!1,className:i,loopFocus:o=!0,render:l,...c}=t,{getTabElementBySelectedValue:u,onValueChange:d,orientation:h,value:p,setTabMap:g,tabActivationDirection:S}=b2(),[y,C]=k.useState(0),[x,w]=k.useState(null),v=oSe(p,h,x,u),E=at((O,M)=>{if(O!==p){const P=v(O);M.activationDirection=P,d(O,M)}}),b=k.useMemo(()=>({orientation:h,tabActivationDirection:S}),[h,S]),T={"aria-orientation":h==="vertical"?"vertical":void 0,role:"tablist"},_=k.useMemo(()=>({activateOnFocus:r,highlightedTabIndex:y,onTabActivation:E,setHighlightedTabIndex:C,tabsListElement:x,value:p}),[r,y,E,C,x,p]);return j.jsx(N6.Provider,{value:_,children:j.jsx(iSe,{render:l,className:i,state:b,refs:[n,w],props:[T,c],stateAttributesMapping:S2,highlightedIndex:y,enableHomeAndEndKeys:!0,loopFocus:o,orientation:h,onHighlightedIndexChange:C,onMapChange:g,disabledIndices:Bu})})});function yj(e,t){const{left:n,top:r}=e.getBoundingClientRect(),{left:i,top:o}=t.getBoundingClientRect(),l=n-i,c=r-o;return{left:l,top:c}}function oSe(e,t,n,r){const[i,o]=k.useState(null);return nt(()=>{if(e==null||n==null){o(null);return}const l=r(e);if(l==null){o(null);return}const{left:c,top:u}=yj(l,n);o(t==="horizontal"?c:u)},[t,r,n,e]),k.useCallback(l=>{if(l===e)return"none";if(l==null)return o(null),"none";if(l!=null&&n!=null){const c=r(l);if(c!=null){const{left:u,top:d}=yj(c,n);if(i==null)return o(t==="horizontal"?u:d),"none";if(t==="horizontal"){if(u<i)return o(u),"left";if(u>i)return o(u),"right"}else{if(d<i)return o(d),"up";if(d>i)return o(d),"down"}}}return"none"},[r,t,i,n,e])}function aSe({className:e,orientation:t="horizontal",...n}){return j.jsx(Z1e,{"data-slot":"tabs","data-orientation":t,className:cn("gap-2 group/tabs flex data-[orientation=horizontal]:flex-col",e),...n})}const lSe=el("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 cSe({className:e,variant:t="default",...n}){return j.jsx(sSe,{"data-slot":"tabs-list","data-variant":t,className:cn(lSe({variant:t}),e),...n})}function vj({className:e,...t}){return j.jsx(X1e,{"data-slot":"tabs-trigger",className:cn("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 bj({className:e,...t}){return j.jsx(J1e,{"data-slot":"tabs-content",className:cn("text-xs/relaxed flex-1 outline-none",e),...t})}const uSe=()=>{const e=dc(),{openaiRef:t,openaiObject:n}=hf(e.name),{setToolData:r}=df(),i=(o,l)=>{const c=t?.current?.contentWindow?.openai;c&&n&&(c[o]=l,r(e.name,{openaiObject:{...n,[o]:l}}))};return n?j.jsx("div",{className:"overflow-auto max-h-full min-h-0",children:j.jsxs(aSe,{defaultValue:"widget-state",className:"gap-0",children:[j.jsxs(cSe,{className:"border-b border-border w-full",children:[j.jsx(vj,{value:"properties",children:"Properties"}),j.jsx(vj,{value:"widget-state",children:"Widget State"})]}),j.jsx(bj,{value:"properties",className:"p-4",children:j.jsxs(Iye,{children:[j.jsxs(TS,{children:[j.jsx(RS,{children:"Display Mode"}),j.jsxs(F1e,{value:n.displayMode,onValueChange:o=>i("displayMode",o),"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(q1e,{children:j.jsx(V1e,{})}),j.jsx(B1e,{children:j.jsxs(U1e,{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(TS,{children:[j.jsx(RS,{children:"Theme"}),j.jsxs(Nye,{children:[j.jsx(lh,{variant:n.theme==="light"?"default":"outline",onClick:()=>i("theme","light"),children:j.jsx(Kne,{})}),j.jsx(lh,{variant:n.theme==="dark"?"default":"outline",onClick:()=>i("theme","dark"),children:j.jsx(Vne,{})})]})]}),j.jsxs(TS,{children:[j.jsx(RS,{children:"Locale"}),j.jsx(N0e,{value:n.locale,onChange:o=>i("locale",o.target.value)})]})]})}),j.jsx(bj,{value:"widget-state",className:"p-4",children:j.jsx(_z,{src:n.widgetState??{},name:null,quotesOnKeys:!1,displayDataTypes:!1,displayObjectSize:!1,enableClipboard:!1,theme:"rjv-default",collapsed:3,collapseStringsAfterLength:80})})]})}):null};function Sj(e){return new Date(e).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3})}function fSe(e,t=60){const n=JSON.stringify(e);return n.length>t?`${n.slice(0,t)}…`:n}function dSe({log:e}){const[t,n]=k.useState(!1),r=Object.keys(e.args).length>0,i=r?fSe(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:Sj(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:i})]}):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:Sj(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 hSe(){const e=dc(),{setToolData:t}=df(),{openaiLogs:n}=hf(e.name),r=k.useRef(null),i=()=>{t(e.name,{openaiLogs:[]})};return k.useEffect(()=>{const o=r.current;o&&(o.scrollTop=o.scrollHeight)},[]),j.jsxs("div",{className:"flex flex-col h-full overflow-hidden min-h-0",children:[j.jsxs("div",{className:"flex items-center justify-between mb-3 h-8 flex-none",children:[j.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-gray-200",children:"OpenAI API Logs"}),n.length>0&&j.jsxs(lh,{variant:"ghost",size:"sm",onClick:i,children:[j.jsx(Zne,{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(o=>j.jsx(dSe,{log:o},o.id))})]})}const pSe=el("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 mSe({className:e,variant:t,...n}){return j.jsx("div",{className:cn(pSe({variant:t}),e),"data-slot":"alert",role:"alert",...n})}function gSe({className:e,...t}){return j.jsx("div",{className:cn("font-medium [svg~&]:col-start-2",e),"data-slot":"alert-title",...t})}function ySe({className:e,...t}){return j.jsx("div",{className:cn("flex flex-col gap-2.5 text-muted-foreground [svg~&]:col-start-2",e),"data-slot":"alert-description",...t})}const vSe=()=>{const e=dc(),t=hf(e.name);return t?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(mSe,{variant:"error",children:[j.jsx(Ine,{}),j.jsx(gSe,{children:"Error"}),j.jsx(ySe,{children:t.response.content.map(n=>n.text).join(`
135
- `)})]}):j.jsx("div",{className:"text-xs",children:j.jsx(_z,{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})}):null};class bSe{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 D6{constructor(t){this.generateIdentifier=t,this.kv=new bSe}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 SSe extends D6{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 wSe(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 xSe(e,t){const n=wSe(e);if("find"in n)return n.find(t);const r=n;for(let i=0;i<r.length;i++){const o=r[i];if(t(o))return o}}function rf(e,t){Object.entries(e).forEach(([n,r])=>t(r,n))}function Xg(e,t){return e.indexOf(t)!==-1}function wj(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(t(r))return r}}class _Se{constructor(){this.transfomers={}}register(t){this.transfomers[t.name]=t}findApplicable(t){return xSe(this.transfomers,n=>n.isApplicable(t))}findByName(t){return this.transfomers[t]}}const ESe=e=>Object.prototype.toString.call(e).slice(8,-1),I6=e=>typeof e>"u",CSe=e=>e===null,_h=e=>typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,Ax=e=>_h(e)&&Object.keys(e).length===0,Ya=e=>Array.isArray(e),TSe=e=>typeof e=="string",RSe=e=>typeof e=="number"&&!isNaN(e),OSe=e=>typeof e=="boolean",ASe=e=>e instanceof RegExp,Eh=e=>e instanceof Map,Ch=e=>e instanceof Set,$6=e=>ESe(e)==="Symbol",kSe=e=>e instanceof Date&&!isNaN(e.valueOf()),z6=e=>e instanceof Error,xj=e=>typeof e=="number"&&isNaN(e),MSe=e=>OSe(e)||CSe(e)||I6(e)||RSe(e)||TSe(e)||$6(e),jSe=e=>typeof e=="bigint",PSe=e=>e===1/0||e===-1/0,NSe=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),DSe=e=>e instanceof URL,kx=e=>e.replace(/\\/g,"\\\\").replace(/\./g,"\\."),US=e=>e.map(String).map(kx).join("."),Wd=(e,t)=>{const n=[];let r="";for(let o=0;o<e.length;o++){let l=e.charAt(o);if(!t&&l==="\\"){const d=e.charAt(o+1);if(d==="\\"){r+="\\",o++;continue}else if(d!==".")throw Error("invalid path")}if(l==="\\"&&e.charAt(o+1)==="."){r+=".",o++;continue}if(l==="."){n.push(r),r="";continue}r+=l}const i=r;return n.push(i),n};function Ps(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}const L6=[Ps(I6,"undefined",()=>null,()=>{}),Ps(jSe,"bigint",e=>e.toString(),e=>typeof BigInt<"u"?BigInt(e):(console.error("Please add a BigInt polyfill."),e)),Ps(kSe,"Date",e=>e.toISOString(),e=>new Date(e)),Ps(z6,"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}),Ps(ASe,"regexp",e=>""+e,e=>{const t=e.slice(1,e.lastIndexOf("/")),n=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,n)}),Ps(Ch,"set",e=>[...e.values()],e=>new Set(e)),Ps(Eh,"map",e=>[...e.entries()],e=>new Map(e)),Ps(e=>xj(e)||PSe(e),"number",e=>xj(e)?"NaN":e>0?"Infinity":"-Infinity",Number),Ps(e=>e===0&&1/e===-1/0,"number",()=>"-0",Number),Ps(DSe,"URL",e=>e.toString(),e=>new URL(e))];function K0(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}const F6=K0((e,t)=>$6(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}),ISe=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),U6=K0(NSe,e=>["typed-array",e.constructor.name],e=>[...e],(e,t)=>{const n=ISe[t[1]];if(!n)throw new Error("Trying to deserialize unknown typed array");return new n(e)});function V6(e,t){return e?.constructor?!!t.classRegistry.getIdentifier(e.constructor):!1}const q6=K0(V6,(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(i=>{r[i]=e[i]}),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)}),B6=K0((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)}),$Se=[q6,F6,B6,U6],_j=(e,t)=>{const n=wj($Se,i=>i.isApplicable(e,t));if(n)return{value:n.transform(e,t),type:n.annotation(e,t)};const r=wj(L6,i=>i.isApplicable(e,t));if(r)return{value:r.transform(e,t),type:r.annotation}},H6={};L6.forEach(e=>{H6[e.annotation]=e});const zSe=(e,t,n)=>{if(Ya(t))switch(t[0]){case"symbol":return F6.untransform(e,t,n);case"class":return q6.untransform(e,t,n);case"custom":return B6.untransform(e,t,n);case"typed-array":return U6.untransform(e,t,n);default:throw new Error("Unknown transformation: "+t)}else{const r=H6[t];if(!r)throw new Error("Unknown transformation: "+t);return r.untransform(e,n)}},Eu=(e,t)=>{if(t>e.size)throw new Error("index out of bounds");const n=e.keys();for(;t>0;)n.next(),t--;return n.next().value};function K6(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 LSe=(e,t)=>{K6(t);for(let n=0;n<t.length;n++){const r=t[n];if(Ch(e))e=Eu(e,+r);else if(Eh(e)){const i=+r,o=+t[++n]==0?"key":"value",l=Eu(e,i);switch(o){case"key":e=l;break;case"value":e=e.get(l);break}}else e=e[r]}return e},Mx=(e,t,n)=>{if(K6(t),t.length===0)return n(e);let r=e;for(let o=0;o<t.length-1;o++){const l=t[o];if(Ya(r)){const c=+l;r=r[c]}else if(_h(r))r=r[l];else if(Ch(r)){const c=+l;r=Eu(r,c)}else if(Eh(r)){if(o===t.length-2)break;const u=+l,d=+t[++o]==0?"key":"value",h=Eu(r,u);switch(d){case"key":r=h;break;case"value":r=r.get(h);break}}}const i=t[t.length-1];if(Ya(r)?r[+i]=n(r[+i]):_h(r)&&(r[i]=n(r[i])),Ch(r)){const o=Eu(r,+i),l=n(o);o!==l&&(r.delete(o),r.add(l))}if(Eh(r)){const o=+t[t.length-2],l=Eu(r,o);switch(+i==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},G6=e=>e<1;function jx(e,t,n,r=[]){if(!e)return;const i=G6(n);if(!Ya(e)){rf(e,(c,u)=>jx(c,t,n,[...r,...Wd(u,i)]));return}const[o,l]=e;l&&rf(l,(c,u)=>{jx(c,t,n,[...r,...Wd(u,i)])}),t(o,r)}function FSe(e,t,n,r){return jx(t,(i,o)=>{e=Mx(e,o,l=>zSe(l,i,r))},n),e}function USe(e,t,n){const r=G6(n);function i(o,l){const c=LSe(e,Wd(l,r));o.map(u=>Wd(u,r)).forEach(u=>{e=Mx(e,u,()=>c)})}if(Ya(t)){const[o,l]=t;o.forEach(c=>{e=Mx(e,Wd(c,r),()=>e)}),l&&rf(l,i)}else rf(t,i);return e}const VSe=(e,t)=>_h(e)||Ya(e)||Eh(e)||Ch(e)||z6(e)||V6(e,t);function qSe(e,t,n){const r=n.get(e);r?r.push(t):n.set(e,[t])}function BSe(e,t){const n={};let r;return e.forEach(i=>{if(i.length<=1)return;t||(i=i.map(c=>c.map(String)).sort((c,u)=>c.length-u.length));const[o,...l]=i;o.length===0?r=l.map(US):n[US(o)]=l.map(US)}),r?Ax(n)?[r]:[r,n]:Ax(n)?void 0:n}const Z6=(e,t,n,r,i=[],o=[],l=new Map)=>{const c=MSe(e);if(!c){qSe(e,i,t);const S=l.get(e);if(S)return r?{transformedValue:null}:S}if(!VSe(e,n)){const S=_j(e,n),y=S?{transformedValue:S.value,annotations:[S.type]}:{transformedValue:e};return c||l.set(e,y),y}if(Xg(o,e))return{transformedValue:null};const u=_j(e,n),d=u?.value??e,h=Ya(d)?[]:{},p={};rf(d,(S,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 C=Z6(S,t,n,r,[...i,y],[...o,e],l);h[y]=C.transformedValue,Ya(C.annotations)?p[kx(y)]=C.annotations:_h(C.annotations)&&rf(C.annotations,(x,w)=>{p[kx(y)+"."+w]=x})});const g=Ax(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 Y6(e){return Object.prototype.toString.call(e).slice(8,-1)}function Ej(e){return Y6(e)==="Array"}function HSe(e){if(Y6(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function KSe(e,t,n,r,i){const o={}.propertyIsEnumerable.call(r,t)?"enumerable":"nonenumerable";o==="enumerable"&&(e[t]=n),i&&o==="nonenumerable"&&Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}function Px(e,t={}){if(Ej(e))return e.map(i=>Px(i,t));if(!HSe(e))return e;const n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertySymbols(e);return[...n,...r].reduce((i,o)=>{if(o==="__proto__"||Ej(t.props)&&!t.props.includes(o))return i;const l=e[o],c=Px(l,t);return KSe(i,o,c,e,t.nonenumerable),i},{})}class Mn{constructor({dedupe:t=!1}={}){this.classRegistry=new SSe,this.symbolRegistry=new D6(n=>n.description??""),this.customTransformerRegistry=new _Se,this.allowedErrorProps=[],this.dedupe=t}serialize(t){const n=new Map,r=Z6(t,n,this,this.dedupe),i={json:r.transformedValue};r.annotations&&(i.meta={...i.meta,values:r.annotations});const o=BSe(n,this.dedupe);return o&&(i.meta={...i.meta,referentialEqualities:o}),i.meta&&(i.meta.v=1),i}deserialize(t,n){const{json:r,meta:i}=t;let o=n?.inPlace?r:Px(r);return i?.values&&(o=FSe(o,i.values,i.v??0,this)),i?.referentialEqualities&&(o=USe(o,i.referentialEqualities,i.v??0)),o}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);const W6="openai:set_globals";class GSe extends CustomEvent{type=W6}function ZSe(e,t,n){return{callTool:async(i,o)=>(t("callTool",{name:i,args:o}),{}),sendFollowUpMessage:async i=>{t("sendFollowUpMessage",i)},openExternal:i=>{t("openExternal",i)},requestDisplayMode:async i=>(t("requestDisplayMode",i),e.displayMode=i.mode,n("displayMode",i.mode),{mode:i.mode}),setWidgetState:async i=>{t("setWidgetState",i),e.widgetState=i,n("widgetState",i)},requestModal:async i=>{t("requestModal",i),e.displayMode="modal",n("displayMode","modal")},uploadFile:async i=>(t("uploadFile",{name:i.name,size:i.size}),{fileId:"123"}),downloadFile:async i=>(t("downloadFile",i),{downloadUrl:"https://example.com/file.pdf"})}}function YSe(e,t){const n=["theme","userAgent","locale","maxHeight","displayMode","safeArea","toolInput","toolOutput","toolResponseMetadata","widgetState"];return new Proxy(e||{},{set(r,i,o,l){const c=Reflect.set(r,i,o,l);if(n.includes(i)){const u=new GSe(W6,{detail:{globals:{[i]:o}}});t.dispatchEvent(u)}return c}})}function WSe(e,t,n,r){const i=Nh(t),o=YSe(i,e),l=ZSe(o,n,r);Iq(o,l),e.openai=o}function XSe(e){console.log("injectWaitForOpenai",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=`
136
- const waitForOpenAI = () => new Promise((resolve, reject) => {
137
- if (typeof window === "undefined") { reject(new Error("window is not available")); return; }
138
- if ("openai" in window && window.openai != null) { resolve(); return; }
139
- Object.defineProperty(window, "openai", {
140
- configurable: true,
141
- enumerable: true,
142
- get() { return undefined; },
143
- set(value) {
144
- Object.defineProperty(window, "openai", {
145
- configurable: true,
146
- enumerable: true,
147
- writable: true,
148
- value,
149
- });
150
- resolve();
151
- },
152
- });
153
- });
154
- `;return n.textContent=`
155
- ${r}
156
- await waitForOpenAI();
157
- ${n.textContent}
158
- `,t.head.innerHTML+t.body.innerHTML}const QSe=()=>{const e=dc(),{openaiObject:t}=hf(e.name),{data:n}=Ene(e._meta?.["ui/resourceUri"]),{setToolData:r,pushOpenAiLog:i,updateOpenaiObject:o}=df(),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?.contentWindow||!p?.contentDocument)return;u.current=!0,WSe(p.contentWindow,t,(y,C)=>{i(e.name,{timestamp:Date.now(),command:y,args:C})},(y,C)=>{o(e.name,y,C)});const g=p.contentDocument;new ResizeObserver(()=>{p.style.height=`${g.documentElement.scrollHeight}px`}).observe(g.body),r(e.name,{openaiRef:l})},[t,i,r,o,e.name]);return j.jsx("div",{ref:c,className:"relative overflow-auto",style:{width:"100%"},children:j.jsx("iframe",{ref:l,srcDoc:XSe(d),onLoad:h,style:{width:"100%",border:"none",display:"block"},sandbox:"allow-scripts allow-same-origin",title:"html-preview"})})},JSe=()=>{const e=dc(),t=hf(e.name),n=jP({key:"skybridge-devtools-input-column-width",defaultSizePercent:35,minSizePercent:20,maxSizePercent:60}),r=!!(e._meta?.["ui/resourceUri"]&&t?.response&&!t.response.isError);return j.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden relative z-10",children:[j.jsxs(EP,{direction:"horizontal",className:"flex flex-1 overflow-hidden border-b border-border",onLayout:i=>{i[0]!==void 0&&n.onResize(i[0])},children:[j.jsx(ry,{defaultSize:n.size,minSize:20,maxSize:60,children:j.jsx("div",{className:"flex flex-col overflow-hidden h-full",children:j.jsx(Aye,{})})}),j.jsx(CP,{}),j.jsx(ry,{defaultSize:100-n.size,minSize:30,children:j.jsx("div",{className:"flex flex-col overflow-hidden h-full",children:j.jsx(vSe,{})})})]}),r&&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(QSe,{})})}),j.jsx("div",{className:"p-4 flex flex-col h-full min-h-0",children:j.jsx(hSe,{})})]}),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(uSe,{})})})]})]})};function ewe(){const e=J4(),[,t]=u_(),n=q_();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 i=r.name===n?.name;return j.jsxs("button",{type:"button",onClick:()=>t(r.name),className:cn("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",i&&"bg-accent text-accent-foreground"),children:[j.jsxs("div",{className:"pr-6 flex flex-col gap-1",children:[j.jsx("div",{className:cn("font-semibold text-sm leading-tight truncate",i&&"text-accent-foreground"),children:r.name}),r.description&&j.jsx("div",{className:cn("text-xs leading-snug text-muted-foreground","line-clamp-2",i&&"text-accent-foreground/80"),children:r.description})]}),i&&j.jsx("div",{className:"absolute top-3 right-3 w-1.5 h-1.5 rounded-full bg-primary"})]},r.name)})})})})]})})}function twe(){const e=q_(),t=jP({key:"skybridge-devtools-tools-list-width",defaultSizePercent:20,minSizePercent:15,maxSizePercent:40});return j.jsxs("div",{className:"flex h-screen w-full flex-col overflow-hidden bg-background",children:[j.jsx(Mre,{}),j.jsxs(EP,{direction:"horizontal",className:"flex flex-1 overflow-hidden",onLayout:n=>{n[0]!==void 0&&t.onResize(n[0])},children:[j.jsx(ry,{defaultSize:t.size,minSize:15,maxSize:40,children:j.jsx(ewe,{})}),j.jsx(CP,{}),j.jsx(ry,{defaultSize:100-t.size,minSize:30,children:j.jsx("div",{className:"flex flex-1 flex-col overflow-hidden relative h-full",children:e?j.jsx(JSe,{}):j.jsx(lle,{})})})]})]})}const nwe=new MF;function rwe(){return j.jsx(jF,{client:nwe,children:j.jsx(p7,{children:j.jsx(twe,{})})})}lF.createRoot(document.getElementById("root")).render(j.jsx(k.StrictMode,{children:j.jsx(rwe,{})}))});export default iwe();