@skybridge/devtools 0.0.0-dev.bfeddf1 → 0.0.0-dev.c0a3a70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(e&&(t=e(e=0)),t),s=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},u=(n,r,a)=>(a=n==null?{}:e(i(n)),l(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),d=e=>a.call(e,`module.exports`)?e[`module.exports`]:l(t({},`__esModule`,{value:!0}),e);(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var f=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=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,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function F(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var I=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},L={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=L,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:F}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,I)}catch(e){I(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.4`})),p=s(((e,t)=>{t.exports=f()})),m=s((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}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(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),h=s(((e,t)=>{t.exports=m()})),g=s((e=>{var t=p();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.4`})),_=s(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()})),v=s((e=>{var t=h(),n=p(),r=_();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,m=Symbol.for(`react.element`),g=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function M(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var N=Symbol.for(`react.client.reference`);function P(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===N?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?P(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return P(e(t))}catch{}}return null}var F=Array.isArray,I=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,R={pending:!1,data:null,method:null,action:null},z=[],B=-1;function V(e){return{current:e}}function ee(e){0>B||(e.current=z[B],z[B]=null,B--)}function H(e,t){B++,z[B]=e.current,e.current=t}var te=V(null),U=V(null),ne=V(null),re=V(null);function ie(e,t){switch(H(ne,t),H(U,e),H(te,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Ud(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Ud(t),e=Wd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ee(te),H(te,e)}function ae(){ee(te),ee(U),ee(ne)}function oe(e){e.memoizedState!==null&&H(re,e);var t=te.current,n=Wd(t,e.type);t!==n&&(H(U,e),H(te,n))}function se(e){U.current===e&&(ee(te),ee(U)),re.current===e&&(ee(re),ep._currentValue=R)}var ce,le;function ue(e){if(ce===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ce=t&&t[1]||``,le=-1<e.stack.indexOf(`
|
|
2
|
+
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
3
|
+
`+ce+e+le}var de=!1;function fe(e,t){if(!e||de)return``;de=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
4
|
+
`),l=s.split(`
|
|
5
|
+
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
|
6
|
+
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{de=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?ue(n):``}function pe(e,t){switch(e.tag){case 26:case 27:case 5:return ue(e.type);case 16:return ue(`Lazy`);case 13:return e.child!==t&&t!==null?ue(`Suspense Fallback`):ue(`Suspense`);case 19:return ue(`SuspenseList`);case 0:case 15:return fe(e.type,!1);case 11:return fe(e.type.render,!1);case 1:return fe(e.type,!0);case 31:return ue(`Activity`);default:return``}}function me(e){try{var t=``,n=null;do t+=pe(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
7
|
+
Error generating stack: `+e.message+`
|
|
8
|
+
`+e.stack}}var he=Object.prototype.hasOwnProperty,ge=t.unstable_scheduleCallback,_e=t.unstable_cancelCallback,ve=t.unstable_shouldYield,ye=t.unstable_requestPaint,be=t.unstable_now,xe=t.unstable_getCurrentPriorityLevel,Se=t.unstable_ImmediatePriority,Ce=t.unstable_UserBlockingPriority,we=t.unstable_NormalPriority,Te=t.unstable_LowPriority,Ee=t.unstable_IdlePriority,De=t.log,Oe=t.unstable_setDisableYieldValue,ke=null,Ae=null;function je(e){if(typeof De==`function`&&Oe(e),Ae&&typeof Ae.setStrictMode==`function`)try{Ae.setStrictMode(ke,e)}catch{}}var Me=Math.clz32?Math.clz32:Fe,Ne=Math.log,Pe=Math.LN2;function Fe(e){return e>>>=0,e===0?32:31-(Ne(e)/Pe|0)|0}var Ie=256,Le=262144,Re=4194304;function ze(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Be(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=ze(n))):i=ze(o):i=ze(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=ze(n))):i=ze(o)):i=ze(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Ve(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function W(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function He(){var e=Re;return Re<<=1,!(Re&62914560)&&(Re=4194304),e}function Ue(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function We(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ge(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Me(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&Ke(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Ke(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Me(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function qe(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Me(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Je(e,t){var n=t&-t;return n=n&42?1:Ye(n),(n&(e.suspendedLanes|t))===0?n:0}function Ye(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Xe(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Ze(){var e=L.p;return e===0?(e=window.event,e===void 0?32:gp(e.type)):e}function Qe(e,t){var n=L.p;try{return L.p=e,t()}finally{L.p=n}}var $e=Math.random().toString(36).slice(2),et=`__reactFiber$`+$e,tt=`__reactProps$`+$e,nt=`__reactContainer$`+$e,rt=`__reactEvents$`+$e,it=`__reactListeners$`+$e,at=`__reactHandles$`+$e,ot=`__reactResources$`+$e,st=`__reactMarker$`+$e;function ct(e){delete e[et],delete e[tt],delete e[rt],delete e[it],delete e[at]}function lt(e){var t=e[et];if(t)return t;for(var n=e.parentNode;n;){if(t=n[nt]||n[et]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=pf(e);e!==null;){if(n=e[et])return n;e=pf(e)}return t}e=n,n=e.parentNode}return null}function ut(e){if(e=e[et]||e[nt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function dt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function ft(e){var t=e[ot];return t||=e[ot]={hoistableStyles:new Map,hoistableScripts:new Map},t}function pt(e){e[st]=!0}var mt=new Set,ht={};function gt(e,t){_t(e,t),_t(e+`Capture`,t)}function _t(e,t){for(ht[e]=t,e=0;e<t.length;e++)mt.add(t[e])}var vt=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]*$`),yt={},bt={};function xt(e){return he.call(bt,e)?!0:he.call(yt,e)?!1:vt.test(e)?bt[e]=!0:(yt[e]=!0,!1)}function St(e,t,n){if(xt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function Ct(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function wt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Tt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Et(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Dt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ot(e){if(!e._valueTracker){var t=Et(e)?`checked`:`value`;e._valueTracker=Dt(e,t,``+e[t])}}function kt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Et(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function At(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var jt=/[\n"\\]/g;function Mt(e){return e.replace(jt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Nt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Tt(t)):e.value!==``+Tt(t)&&(e.value=``+Tt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Ft(e,o,Tt(n)):Ft(e,o,Tt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Tt(s):e.removeAttribute(`name`)}function Pt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Ot(e);return}n=n==null?``:``+Tt(n),t=t==null?n:``+Tt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Ot(e)}function Ft(e,t,n){t===`number`&&At(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function It(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Tt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Lt(e,t,n){if(t!=null&&(t=``+Tt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Tt(n)}function Rt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(F(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Tt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Ot(e)}function zt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Bt=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 Vt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Bt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Ht(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Vt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Vt(e,o,t[o])}function Ut(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Wt=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`]]),Gt=/^[\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 Kt(e){return Gt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function qt(){}var Jt=null;function Yt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Xt=null,Zt=null;function Qt(e){var t=ut(e);if(t&&(e=t.stateNode)){var n=e[tt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Nt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Mt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[tt]||null;if(!a)throw Error(i(90));Nt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&kt(r)}break a;case`textarea`:Lt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&It(e,!!n.multiple,t,!1)}}}var $t=!1;function en(e,t,n){if($t)return e(t,n);$t=!0;try{return e(t)}finally{if($t=!1,(Xt!==null||Zt!==null)&&(Su(),Xt&&(t=Xt,e=Zt,Zt=Xt=null,Qt(t),e)))for(t=0;t<e.length;t++)Qt(e[t])}}function tn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[tt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var nn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),rn=!1;if(nn)try{var an={};Object.defineProperty(an,`passive`,{get:function(){rn=!0}}),window.addEventListener(`test`,an,an),window.removeEventListener(`test`,an,an)}catch{rn=!1}var on=null,sn=null,G=null;function cn(){if(G)return G;var e,t=sn,n=t.length,r,i=`value`in on?on.value:on.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return G=i.slice(e,1<r?1-r:void 0)}function ln(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function un(){return!0}function dn(){return!1}function fn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?un:dn,this.isPropagationStopped=dn,this}return f(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=un)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=un)},persist:function(){},isPersistent:un}),t}var pn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mn=fn(pn),hn=f({},pn,{view:0,detail:0}),gn=fn(hn),_n,vn,yn,bn=f({},hn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:jn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==yn&&(yn&&e.type===`mousemove`?(_n=e.screenX-yn.screenX,vn=e.screenY-yn.screenY):vn=_n=0,yn=e),_n)},movementY:function(e){return`movementY`in e?e.movementY:vn}}),xn=fn(bn),Sn=fn(f({},bn,{dataTransfer:0})),Cn=fn(f({},hn,{relatedTarget:0})),wn=fn(f({},pn,{animationName:0,elapsedTime:0,pseudoElement:0})),Tn=fn(f({},pn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),En=fn(f({},pn,{data:0})),Dn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},On={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`},kn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function An(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=kn[e])?!!t[e]:!1}function jn(){return An}var Mn=fn(f({},hn,{key:function(e){if(e.key){var t=Dn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=ln(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?On[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:jn,charCode:function(e){return e.type===`keypress`?ln(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?ln(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Nn=fn(f({},bn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Pn=fn(f({},hn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:jn})),Fn=fn(f({},pn,{propertyName:0,elapsedTime:0,pseudoElement:0})),In=fn(f({},bn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Ln=fn(f({},pn,{newState:0,oldState:0})),Rn=[9,13,27,32],zn=nn&&`CompositionEvent`in window,Bn=null;nn&&`documentMode`in document&&(Bn=document.documentMode);var Vn=nn&&`TextEvent`in window&&!Bn,Hn=nn&&(!zn||Bn&&8<Bn&&11>=Bn),Un=` `,Wn=!1;function Gn(e,t){switch(e){case`keyup`:return Rn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Kn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var K=!1;function qn(e,t){switch(e){case`compositionend`:return Kn(t);case`keypress`:return t.which===32?(Wn=!0,Un):null;case`textInput`:return e=t.data,e===Un&&Wn?null:e;default:return null}}function Jn(e,t){if(K)return e===`compositionend`||!zn&&Gn(e,t)?(e=cn(),G=sn=on=null,K=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return Hn&&t.locale!==`ko`?null:t.data;default:return null}}var Yn={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 Xn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Yn[e.type]:t===`textarea`}function Zn(e,t,n,r){Xt?Zt?Zt.push(r):Zt=[r]:Xt=r,t=Dd(t,`onChange`),0<t.length&&(n=new mn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Qn=null,$n=null;function er(e){yd(e,0)}function tr(e){if(kt(dt(e)))return e}function nr(e,t){if(e===`change`)return t}var rr=!1;if(nn){var ir;if(nn){var ar=`oninput`in document;if(!ar){var or=document.createElement(`div`);or.setAttribute(`oninput`,`return;`),ar=typeof or.oninput==`function`}ir=ar}else ir=!1;rr=ir&&(!document.documentMode||9<document.documentMode)}function sr(){Qn&&(Qn.detachEvent(`onpropertychange`,cr),$n=Qn=null)}function cr(e){if(e.propertyName===`value`&&tr($n)){var t=[];Zn(t,$n,e,Yt(e)),en(er,t)}}function lr(e,t,n){e===`focusin`?(sr(),Qn=t,$n=n,Qn.attachEvent(`onpropertychange`,cr)):e===`focusout`&&sr()}function ur(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return tr($n)}function dr(e,t){if(e===`click`)return tr(t)}function fr(e,t){if(e===`input`||e===`change`)return tr(t)}function pr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var mr=typeof Object.is==`function`?Object.is:pr;function hr(e,t){if(mr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!he.call(t,i)||!mr(e[i],t[i]))return!1}return!0}function gr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function _r(e,t){var n=gr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=gr(n)}}function vr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?vr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function yr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=At(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=At(e.document)}return t}function br(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var xr=nn&&`documentMode`in document&&11>=document.documentMode,Sr=null,Cr=null,wr=null,Tr=!1;function Er(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Tr||Sr==null||Sr!==At(r)||(r=Sr,`selectionStart`in r&&br(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),wr&&hr(wr,r)||(wr=r,r=Dd(Cr,`onSelect`),0<r.length&&(t=new mn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Sr)))}function Dr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Or={animationend:Dr(`Animation`,`AnimationEnd`),animationiteration:Dr(`Animation`,`AnimationIteration`),animationstart:Dr(`Animation`,`AnimationStart`),transitionrun:Dr(`Transition`,`TransitionRun`),transitionstart:Dr(`Transition`,`TransitionStart`),transitioncancel:Dr(`Transition`,`TransitionCancel`),transitionend:Dr(`Transition`,`TransitionEnd`)},kr={},Ar={};nn&&(Ar=document.createElement(`div`).style,`AnimationEvent`in window||(delete Or.animationend.animation,delete Or.animationiteration.animation,delete Or.animationstart.animation),`TransitionEvent`in window||delete Or.transitionend.transition);function jr(e){if(kr[e])return kr[e];if(!Or[e])return e;var t=Or[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Ar)return kr[e]=t[n];return e}var Mr=jr(`animationend`),Nr=jr(`animationiteration`),Pr=jr(`animationstart`),Fr=jr(`transitionrun`),Ir=jr(`transitionstart`),Lr=jr(`transitioncancel`),Rr=jr(`transitionend`),zr=new Map,Br=`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(` `);Br.push(`scrollEnd`);function Vr(e,t){zr.set(e,t),gt(t,[e])}var Hr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Ur=[],Wr=0,Gr=0;function Kr(){for(var e=Wr,t=Gr=Wr=0;t<e;){var n=Ur[t];Ur[t++]=null;var r=Ur[t];Ur[t++]=null;var i=Ur[t];Ur[t++]=null;var a=Ur[t];if(Ur[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&Xr(n,i,a)}}function qr(e,t,n,r){Ur[Wr++]=e,Ur[Wr++]=t,Ur[Wr++]=n,Ur[Wr++]=r,Gr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Jr(e,t,n,r){return qr(e,t,n,r),Zr(e)}function Yr(e,t){return qr(e,null,null,t),Zr(e)}function Xr(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Me(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Zr(e){if(50<pu)throw pu=0,mu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Qr={};function $r(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ei(e,t,n,r){return new $r(e,t,n,r)}function ti(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ni(e,t){var n=e.alternate;return n===null?(n=ei(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function ri(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ii(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)ti(e)&&(s=1);else if(typeof e==`string`)s=Gf(e,n,te.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=ei(31,n,t,a),e.elementType=k,e.lanes=o,e;case y:return ai(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=ei(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=ei(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=ei(19,n,t,a),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case D:s=14;break a;case O:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=ei(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function ai(e,t,n,r){return e=ei(7,e,r,t),e.lanes=n,e}function oi(e,t,n){return e=ei(6,e,null,t),e.lanes=n,e}function si(e){var t=ei(18,null,null,0);return t.stateNode=e,t}function ci(e,t,n){return t=ei(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var li=new WeakMap;function ui(e,t){if(typeof e==`object`&&e){var n=li.get(e);return n===void 0?(t={value:e,source:t,stack:me(t)},li.set(e,t),t):n}return{value:e,source:t,stack:me(t)}}var di=[],fi=0,pi=null,mi=0,hi=[],gi=0,_i=null,vi=1,yi=``;function bi(e,t){di[fi++]=mi,di[fi++]=pi,pi=e,mi=t}function xi(e,t,n){hi[gi++]=vi,hi[gi++]=yi,hi[gi++]=_i,_i=e;var r=vi;e=yi;var i=32-Me(r)-1;r&=~(1<<i),n+=1;var a=32-Me(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,vi=1<<32-Me(t)+i|n<<i|r,yi=a+e}else vi=1<<a|n<<i|r,yi=e}function Si(e){e.return!==null&&(bi(e,1),xi(e,1,0))}function Ci(e){for(;e===pi;)pi=di[--fi],di[fi]=null,mi=di[--fi],di[fi]=null;for(;e===_i;)_i=hi[--gi],hi[gi]=null,yi=hi[--gi],hi[gi]=null,vi=hi[--gi],hi[gi]=null}function wi(e,t){hi[gi++]=vi,hi[gi++]=yi,hi[gi++]=_i,vi=t.id,yi=t.overflow,_i=e}var Ti=null,q=null,Ei=!1,Di=null,Oi=!1,ki=Error(i(519));function Ai(e){throw Ii(ui(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),ki}function ji(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[et]=e,t[tt]=r,n){case`dialog`:bd(`cancel`,t),bd(`close`,t);break;case`iframe`:case`object`:case`embed`:bd(`load`,t);break;case`video`:case`audio`:for(n=0;n<_d.length;n++)bd(_d[n],t);break;case`source`:bd(`error`,t);break;case`img`:case`image`:case`link`:bd(`error`,t),bd(`load`,t);break;case`details`:bd(`toggle`,t);break;case`input`:bd(`invalid`,t),Pt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:bd(`invalid`,t);break;case`textarea`:bd(`invalid`,t),Rt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Nd(t.textContent,n)?(r.popover!=null&&(bd(`beforetoggle`,t),bd(`toggle`,t)),r.onScroll!=null&&bd(`scroll`,t),r.onScrollEnd!=null&&bd(`scrollend`,t),r.onClick!=null&&(t.onclick=qt),t=!0):t=!1,t||Ai(e,!0)}function Mi(e){for(Ti=e.return;Ti;)switch(Ti.tag){case 5:case 31:case 13:Oi=!1;return;case 27:case 3:Oi=!0;return;default:Ti=Ti.return}}function Ni(e){if(e!==Ti)return!1;if(!Ei)return Mi(e),Ei=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Gd(e.type,e.memoizedProps)),n=!n),n&&q&&Ai(e),Mi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));q=ff(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));q=ff(e)}else t===27?(t=q,$d(e.type)?(e=df,df=null,q=e):q=t):q=Ti?uf(e.stateNode.nextSibling):null;return!0}function Pi(){q=Ti=null,Ei=!1}function Fi(){var e=Di;return e!==null&&(eu===null?eu=e:eu.push.apply(eu,e),Di=null),e}function Ii(e){Di===null?Di=[e]:Di.push(e)}var Li=V(null),Ri=null,zi=null;function Bi(e,t,n){H(Li,t._currentValue),t._currentValue=n}function Vi(e){e._currentValue=Li.current,ee(Li)}function Hi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Ui(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Hi(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Hi(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Wi(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;mr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===re.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[ep]:e.push(ep))}a=a.return}e!==null&&Ui(t,e,n,r),t.flags|=262144}function Gi(e){for(e=e.firstContext;e!==null;){if(!mr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ki(e){Ri=e,zi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function qi(e){return Yi(Ri,e)}function Ji(e,t){return Ri===null&&Ki(e),Yi(e,t)}function Yi(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},zi===null){if(e===null)throw Error(i(308));zi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else zi=zi.next=t;return n}var Xi=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Zi=t.unstable_scheduleCallback,Qi=t.unstable_NormalPriority,$i={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ea(){return{controller:new Xi,data:new Map,refCount:0}}function ta(e){e.refCount--,e.refCount===0&&Zi(Qi,function(){e.controller.abort()})}var na=null,ra=0,ia=0,aa=null;function oa(e,t){if(na===null){var n=na=[];ra=0,ia=dd(),aa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ra++,t.then(sa,sa),t}function sa(){if(--ra===0&&na!==null){aa!==null&&(aa.status=`fulfilled`);var e=na;na=null,ia=0,aa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ca(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var la=I.S;I.S=function(e,t){ru=be(),typeof t==`object`&&t&&typeof t.then==`function`&&oa(e,t),la!==null&&la(e,t)};var ua=V(null);function da(){var e=ua.current;return e===null?Rl.pooledCache:e}function fa(e,t){t===null?H(ua,ua.current):H(ua,t.pool)}function pa(){var e=da();return e===null?null:{parent:$i._currentValue,pool:e}}var ma=Error(i(460)),ha=Error(i(474)),ga=Error(i(542)),_a={then:function(){}};function va(e){return e=e.status,e===`fulfilled`||e===`rejected`}function ya(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(qt,qt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ca(e),e;default:if(typeof t.status==`string`)t.then(qt,qt);else{if(e=Rl,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ca(e),e}throw xa=t,ma}}function ba(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(xa=e,ma):e}}var xa=null;function Sa(){if(xa===null)throw Error(i(459));var e=xa;return xa=null,e}function Ca(e){if(e===ma||e===ga)throw Error(i(483))}var wa=null,Ta=0;function Ea(e){var t=Ta;return Ta+=1,wa===null&&(wa=[]),ya(wa,e,t)}function Da(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Oa(e,t){throw t.$$typeof===m?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function ka(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=ni(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=oi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===O&&ba(i)===t.type)?(t=a(t,n.props),Da(t,n),t.return=e,t):(t=ii(n.type,n.key,n.props,null,e.mode,r),Da(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=ci(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=ai(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=oi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case g:return n=ii(t.type,t.key,t.props,null,e.mode,n),Da(n,t),n.return=e,n;case v:return t=ci(t,e.mode,n),t.return=e,t;case O:return t=ba(t),f(e,t,n)}if(F(t)||M(t))return t=ai(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ea(t),n);if(t.$$typeof===C)return f(e,Ji(e,t),n);Oa(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case g:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case O:return n=ba(n),p(e,t,n,r)}if(F(n)||M(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ea(n),r);if(n.$$typeof===C)return p(e,t,Ji(e,n),r);Oa(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case g:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case O:return r=ba(r),m(e,t,n,r,i)}if(F(r)||M(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Ea(r),i);if(r.$$typeof===C)return m(e,t,n,Ji(t,r),i);Oa(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Ei&&bi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return Ei&&bi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),Ei&&bi(i,h),l}function _(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Ei&&bi(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Ei&&bi(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Ei&&bi(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case g:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&ba(l)===r.type){n(e,r.sibling),c=a(r,o.props),Da(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=ai(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ii(o.type,o.key,o.props,null,e.mode,c),Da(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=ci(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=ba(o),b(e,r,o,c)}if(F(o))return h(e,r,o,c);if(M(o)){if(l=M(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),_(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Ea(o),c);if(o.$$typeof===C)return b(e,r,Ji(e,o),c);Oa(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=oi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ta=0;var i=b(e,t,n,r);return wa=null,i}catch(t){if(t===ma||t===ga)throw t;var a=ei(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Aa=ka(!0),ja=ka(!1),Ma=!1;function Na(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Pa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Fa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ia(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ll&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Zr(e),Xr(e,null,n),t}return qr(e,r,t,n),Zr(e)}function La(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,qe(e,n)}}function Ra(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var za=!1;function Ba(){if(za){var e=aa;if(e!==null)throw e}}function Va(e,t,n,r){za=!1;var i=e.updateQueue;Ma=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(Bl&p)===p:(r&p)===p){p!==0&&p===ia&&(za=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:Ma=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Jl|=o,e.lanes=o,e.memoizedState=d}}function Ha(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Ua(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ha(n[e],t)}var Wa=V(null),Ga=V(0);function Ka(e,t){e=Kl,H(Ga,e),H(Wa,t),Kl=e|t.baseLanes}function qa(){H(Ga,Kl),H(Wa,Wa.current)}function Ja(){Kl=Ga.current,ee(Wa),ee(Ga)}var Ya=V(null),Xa=null;function Za(e){var t=e.alternate;H(no,no.current&1),H(Ya,e),Xa===null&&(t===null||Wa.current!==null||t.memoizedState!==null)&&(Xa=e)}function Qa(e){H(no,no.current),H(Ya,e),Xa===null&&(Xa=e)}function $a(e){e.tag===22?(H(no,no.current),H(Ya,e),Xa===null&&(Xa=e)):eo(e)}function eo(){H(no,no.current),H(Ya,Ya.current)}function to(e){ee(Ya),Xa===e&&(Xa=null),ee(no)}var no=V(0);function ro(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||sf(n)||cf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var io=0,ao=null,oo=null,so=null,co=!1,lo=!1,uo=!1,fo=0,po=0,mo=null,ho=0;function go(){throw Error(i(321))}function _o(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!mr(e[n],t[n]))return!1;return!0}function vo(e,t,n,r,i,a){return io=a,ao=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,I.H=e===null||e.memoizedState===null?Fs:Is,uo=!1,a=n(r,i),uo=!1,lo&&(a=bo(t,n,r,i)),yo(e),a}function yo(e){I.H=Ps;var t=oo!==null&&oo.next!==null;if(io=0,so=oo=ao=null,co=!1,po=0,mo=null,t)throw Error(i(300));e===null||$s||(e=e.dependencies,e!==null&&Gi(e)&&($s=!0))}function bo(e,t,n,r){ao=e;var a=0;do{if(lo&&(mo=null),po=0,lo=!1,25<=a)throw Error(i(301));if(a+=1,so=oo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}I.H=Ls,o=t(n,r)}while(lo);return o}function xo(){var e=I.H,t=e.useState()[0];return t=typeof t.then==`function`?Oo(t):t,e=e.useState()[0],(oo===null?null:oo.memoizedState)!==e&&(ao.flags|=1024),t}function So(){var e=fo!==0;return fo=0,e}function Co(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function wo(e){if(co){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}co=!1}io=0,so=oo=ao=null,lo=!1,po=fo=0,mo=null}function To(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return so===null?ao.memoizedState=so=e:so=so.next=e,so}function Eo(){if(oo===null){var e=ao.alternate;e=e===null?null:e.memoizedState}else e=oo.next;var t=so===null?ao.memoizedState:so.next;if(t!==null)so=t,oo=e;else{if(e===null)throw ao.alternate===null?Error(i(467)):Error(i(310));oo=e,e={memoizedState:oo.memoizedState,baseState:oo.baseState,baseQueue:oo.baseQueue,queue:oo.queue,next:null},so===null?ao.memoizedState=so=e:so=so.next=e}return so}function Do(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Oo(e){var t=po;return po+=1,mo===null&&(mo=[]),e=ya(mo,e,t),t=ao,(so===null?t.memoizedState:so.next)===null&&(t=t.alternate,I.H=t===null||t.memoizedState===null?Fs:Is),e}function ko(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Oo(e);if(e.$$typeof===C)return qi(e)}throw Error(i(438,String(e)))}function Ao(e){var t=null,n=ao.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=ao.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Do(),ao.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=A;return t.index++,n}function jo(e,t){return typeof t==`function`?t(e):t}function Mo(e){return No(Eo(),oo,e)}function No(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(io&f)===f:(Bl&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ia&&(d=!0);else if((io&p)===p){u=u.next,p===ia&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,ao.lanes|=p,Jl|=p;f=u.action,uo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,ao.lanes|=f,Jl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!mr(o,e.memoizedState)&&($s=!0,d&&(n=aa,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Po(e){var t=Eo(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);mr(o,t.memoizedState)||($s=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Fo(e,t,n){var r=ao,a=Eo(),o=Ei;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!mr((oo||a).memoizedState,n);if(s&&(a.memoizedState=n,$s=!0),a=a.queue,os(Ro.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||so!==null&&so.memoizedState.tag&1){if(r.flags|=2048,ts(9,{destroy:void 0},Lo.bind(null,r,a,n,t),null),Rl===null)throw Error(i(349));o||io&127||Io(r,t,n)}return n}function Io(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ao.updateQueue,t===null?(t=Do(),ao.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Lo(e,t,n,r){t.value=n,t.getSnapshot=r,zo(t)&&Bo(e)}function Ro(e,t,n){return n(function(){zo(t)&&Bo(e)})}function zo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!mr(e,n)}catch{return!0}}function Bo(e){var t=Yr(e,2);t!==null&&_u(t,e,2)}function Vo(e){var t=To();if(typeof e==`function`){var n=e;if(e=n(),uo){je(!0);try{n()}finally{je(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:e},t}function Ho(e,t,n,r){return e.baseState=n,No(e,oo,typeof r==`function`?r:jo)}function Uo(e,t,n,r,a){if(js(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};I.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Wo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Wo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=I.T,o={};I.T=o;try{var s=n(i,r),c=I.S;c!==null&&c(o,s),Go(e,t,s)}catch(n){qo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),I.T=a}}else try{a=n(i,r),Go(e,t,a)}catch(n){qo(e,t,n)}}function Go(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Ko(e,t,n)},function(n){return qo(e,t,n)}):Ko(e,t,n)}function Ko(e,t,n){t.status=`fulfilled`,t.value=n,Jo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Wo(e,n)))}function qo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Jo(t),t=t.next;while(t!==r)}e.action=null}function Jo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Yo(e,t){return t}function Xo(e,t){if(Ei){var n=Rl.formState;if(n!==null){a:{var r=ao;if(Ei){if(q){b:{for(var i=q,a=Oi;i.nodeType!==8;){if(!a){i=null;break b}if(i=uf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){q=uf(i.nextSibling),r=i.data===`F!`;break a}}Ai(r)}r=!1}r&&(t=n[0])}}return n=To(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yo,lastRenderedState:t},n.queue=r,n=Os.bind(null,ao,r),r.dispatch=n,r=Vo(!1),a=As.bind(null,ao,!1,r.queue),r=To(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Uo.bind(null,ao,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Zo(e){return Qo(Eo(),oo,e)}function Qo(e,t,n){if(t=No(e,t,Yo)[0],e=Mo(jo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Oo(t)}catch(e){throw e===ma?ga:e}else r=t;t=Eo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(ao.flags|=2048,ts(9,{destroy:void 0},$o.bind(null,i,n),null)),[r,a,e]}function $o(e,t){e.action=t}function es(e){var t=Eo(),n=oo;if(n!==null)return Qo(t,n,e);Eo(),t=t.memoizedState,n=Eo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ts(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=ao.updateQueue,t===null&&(t=Do(),ao.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ns(){return Eo().memoizedState}function rs(e,t,n,r){var i=To();ao.flags|=e,i.memoizedState=ts(1|t,{destroy:void 0},n,r===void 0?null:r)}function is(e,t,n,r){var i=Eo();r=r===void 0?null:r;var a=i.memoizedState.inst;oo!==null&&r!==null&&_o(r,oo.memoizedState.deps)?i.memoizedState=ts(t,a,n,r):(ao.flags|=e,i.memoizedState=ts(1|t,a,n,r))}function as(e,t){rs(8390656,8,e,t)}function os(e,t){is(2048,8,e,t)}function ss(e){ao.flags|=4;var t=ao.updateQueue;if(t===null)t=Do(),ao.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function cs(e){var t=Eo().memoizedState;return ss({ref:t,nextImpl:e}),function(){if(Ll&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function ls(e,t){return is(4,2,e,t)}function us(e,t){return is(4,4,e,t)}function ds(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function fs(e,t,n){n=n==null?null:n.concat([e]),is(4,4,ds.bind(null,t,e),n)}function ps(){}function ms(e,t){var n=Eo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&_o(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function hs(e,t){var n=Eo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&_o(t,r[1]))return r[0];if(r=e(),uo){je(!0);try{e()}finally{je(!1)}}return n.memoizedState=[r,t],r}function gs(e,t,n){return n===void 0||io&1073741824&&!(Bl&261930)?e.memoizedState=t:(e.memoizedState=n,e=gu(),ao.lanes|=e,Jl|=e,n)}function _s(e,t,n,r){return mr(n,t)?n:Wa.current===null?!(io&42)||io&1073741824&&!(Bl&261930)?($s=!0,e.memoizedState=n):(e=gu(),ao.lanes|=e,Jl|=e,t):(e=gs(e,n,r),mr(e,t)||($s=!0),e)}function vs(e,t,n,r,i){var a=L.p;L.p=a!==0&&8>a?a:8;var o=I.T,s={};I.T=s,As(e,!1,t,n);try{var c=i(),l=I.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?ks(e,t,ca(c,r),hu(e)):ks(e,t,r,hu(e))}catch(n){ks(e,t,{then:function(){},status:`rejected`,reason:n},hu())}finally{L.p=a,o!==null&&s.types!==null&&(o.types=s.types),I.T=o}}function ys(){}function bs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=xs(e).queue;vs(e,a,t,R,n===null?ys:function(){return Ss(e),n(r)})}function xs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:R,baseState:R,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:R},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ss(e){var t=xs(e);t.next===null&&(t=e.alternate.memoizedState),ks(e,t.next.queue,{},hu())}function Cs(){return qi(ep)}function ws(){return Eo().memoizedState}function Ts(){return Eo().memoizedState}function Es(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=hu();e=Fa(n);var r=Ia(t,e,n);r!==null&&(_u(r,t,n),La(r,t,n)),t={cache:ea()},e.payload=t;return}t=t.return}}function Ds(e,t,n){var r=hu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},js(e)?Ms(t,n):(n=Jr(e,t,n,r),n!==null&&(_u(n,e,r),Ns(n,t,r)))}function Os(e,t,n){ks(e,t,n,hu())}function ks(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(js(e))Ms(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,mr(s,o))return qr(e,t,i,0),Rl===null&&Kr(),!1}catch{}if(n=Jr(e,t,i,r),n!==null)return _u(n,e,r),Ns(n,t,r),!0}return!1}function As(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},js(e)){if(t)throw Error(i(479))}else t=Jr(e,n,r,2),t!==null&&_u(t,e,2)}function js(e){var t=e.alternate;return e===ao||t!==null&&t===ao}function Ms(e,t){lo=co=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ns(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,qe(e,n)}}var Ps={readContext:qi,use:ko,useCallback:go,useContext:go,useEffect:go,useImperativeHandle:go,useLayoutEffect:go,useInsertionEffect:go,useMemo:go,useReducer:go,useRef:go,useState:go,useDebugValue:go,useDeferredValue:go,useTransition:go,useSyncExternalStore:go,useId:go,useHostTransitionStatus:go,useFormState:go,useActionState:go,useOptimistic:go,useMemoCache:go,useCacheRefresh:go};Ps.useEffectEvent=go;var Fs={readContext:qi,use:ko,useCallback:function(e,t){return To().memoizedState=[e,t===void 0?null:t],e},useContext:qi,useEffect:as,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),rs(4194308,4,ds.bind(null,t,e),n)},useLayoutEffect:function(e,t){return rs(4194308,4,e,t)},useInsertionEffect:function(e,t){rs(4,2,e,t)},useMemo:function(e,t){var n=To();t=t===void 0?null:t;var r=e();if(uo){je(!0);try{e()}finally{je(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=To();if(n!==void 0){var i=n(t);if(uo){je(!0);try{n(t)}finally{je(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ds.bind(null,ao,e),[r.memoizedState,e]},useRef:function(e){var t=To();return e={current:e},t.memoizedState=e},useState:function(e){e=Vo(e);var t=e.queue,n=Os.bind(null,ao,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ps,useDeferredValue:function(e,t){return gs(To(),e,t)},useTransition:function(){var e=Vo(!1);return e=vs.bind(null,ao,e.queue,!0,!1),To().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=ao,a=To();if(Ei){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Rl===null)throw Error(i(349));Bl&127||Io(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,as(Ro.bind(null,r,o,e),[e]),r.flags|=2048,ts(9,{destroy:void 0},Lo.bind(null,r,o,n,t),null),n},useId:function(){var e=To(),t=Rl.identifierPrefix;if(Ei){var n=yi,r=vi;n=(r&~(1<<32-Me(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=fo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=ho++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Cs,useFormState:Xo,useActionState:Xo,useOptimistic:function(e){var t=To();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=As.bind(null,ao,!0,n),n.dispatch=t,[e,t]},useMemoCache:Ao,useCacheRefresh:function(){return To().memoizedState=Es.bind(null,ao)},useEffectEvent:function(e){var t=To(),n={impl:e};return t.memoizedState=n,function(){if(Ll&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Is={readContext:qi,use:ko,useCallback:ms,useContext:qi,useEffect:os,useImperativeHandle:fs,useInsertionEffect:ls,useLayoutEffect:us,useMemo:hs,useReducer:Mo,useRef:ns,useState:function(){return Mo(jo)},useDebugValue:ps,useDeferredValue:function(e,t){return _s(Eo(),oo.memoizedState,e,t)},useTransition:function(){var e=Mo(jo)[0],t=Eo().memoizedState;return[typeof e==`boolean`?e:Oo(e),t]},useSyncExternalStore:Fo,useId:ws,useHostTransitionStatus:Cs,useFormState:Zo,useActionState:Zo,useOptimistic:function(e,t){return Ho(Eo(),oo,e,t)},useMemoCache:Ao,useCacheRefresh:Ts};Is.useEffectEvent=cs;var Ls={readContext:qi,use:ko,useCallback:ms,useContext:qi,useEffect:os,useImperativeHandle:fs,useInsertionEffect:ls,useLayoutEffect:us,useMemo:hs,useReducer:Po,useRef:ns,useState:function(){return Po(jo)},useDebugValue:ps,useDeferredValue:function(e,t){var n=Eo();return oo===null?gs(n,e,t):_s(n,oo.memoizedState,e,t)},useTransition:function(){var e=Po(jo)[0],t=Eo().memoizedState;return[typeof e==`boolean`?e:Oo(e),t]},useSyncExternalStore:Fo,useId:ws,useHostTransitionStatus:Cs,useFormState:es,useActionState:es,useOptimistic:function(e,t){var n=Eo();return oo===null?(n.baseState=e,[e,n.queue.dispatch]):Ho(n,oo,e,t)},useMemoCache:Ao,useCacheRefresh:Ts};Ls.useEffectEvent=cs;function Rs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:f({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var zs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=hu(),i=Fa(r);i.payload=t,n!=null&&(i.callback=n),t=Ia(e,i,r),t!==null&&(_u(t,e,r),La(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=hu(),i=Fa(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ia(e,i,r),t!==null&&(_u(t,e,r),La(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=hu(),r=Fa(n);r.tag=2,t!=null&&(r.callback=t),t=Ia(e,r,n),t!==null&&(_u(t,e,n),La(t,e,n))}};function Bs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!hr(n,r)||!hr(i,a):!0}function Vs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&zs.enqueueReplaceState(t,t.state,null)}function Hs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=f({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Us(e){Hr(e)}function Ws(e){console.error(e)}function Gs(e){Hr(e)}function Ks(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function qs(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Js(e,t,n){return n=Fa(n),n.tag=3,n.payload={element:null},n.callback=function(){Ks(e,t)},n}function Ys(e){return e=Fa(e),e.tag=3,e}function Xs(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){qs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){qs(t,n,r),typeof i!=`function`&&(au===null?au=new Set([this]):au.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Zs(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Wi(t,n,a,!0),n=Ya.current,n!==null){switch(n.tag){case 31:case 13:return Xa===null?ku():n.alternate===null&&ql===0&&(ql=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===_a?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Ku(e,r,a)),!1;case 22:return n.flags|=65536,r===_a?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Ku(e,r,a)),!1}throw Error(i(435,n.tag))}return Ku(e,r,a),ku(),!1}if(Ei)return t=Ya.current,t===null?(r!==ki&&(t=Error(i(423),{cause:r}),Ii(ui(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=ui(r,n),a=Js(e.stateNode,r,a),Ra(e,a),ql!==4&&(ql=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==ki&&(e=Error(i(422),{cause:r}),Ii(ui(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=ui(o,n),$l===null?$l=[o]:$l.push(o),ql!==4&&(ql=2),t===null)return!0;r=ui(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Js(n.stateNode,r,e),Ra(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(au===null||!au.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Ys(a),Xs(a,e,n,r),Ra(n,a),!1}n=n.return}while(n!==null);return!1}var Qs=Error(i(461)),$s=!1;function ec(e,t,n,r){t.child=e===null?ja(t,null,n,r):Aa(t,e.child,n,r)}function tc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Ki(t),r=vo(e,t,n,o,a,i),s=So(),e!==null&&!$s?(Co(e,t,i),Tc(e,t,i)):(Ei&&s&&Si(t),t.flags|=1,ec(e,t,r,i),t.child)}function nc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ti(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,rc(e,t,a,r,i)):(e=ii(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Ec(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?hr:n,n(o,r)&&e.ref===t.ref)return Tc(e,t,i)}return t.flags|=1,e=ni(a,r),e.ref=t.ref,e.return=t,t.child=e}function rc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(hr(a,r)&&e.ref===t.ref)if($s=!1,t.pendingProps=r=a,Ec(e,i))e.flags&131072&&($s=!0);else return t.lanes=e.lanes,Tc(e,t,i)}return dc(e,t,n,r,i)}function ic(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return oc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&fa(t,a===null?null:a.cachePool),a===null?qa():Ka(t,a),$a(t);else return r=t.lanes=536870912,oc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&fa(t,null),qa(),eo(t)):(fa(t,a.cachePool),Ka(t,a),eo(t),t.memoizedState=null);return ec(e,t,i,n),t.child}function ac(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function oc(e,t,n,r,i){var a=da();return a=a===null?null:{parent:$i._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&fa(t,null),qa(),$a(t),e!==null&&Wi(e,t,r,!0),t.childLanes=i,null}function sc(e,t){return t=bc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function cc(e,t,n){return Aa(t,e.child,null,n),e=sc(t,t.pendingProps),e.flags|=2,to(t),t.memoizedState=null,e}function lc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(Ei){if(r.mode===`hidden`)return e=sc(t,r),t.lanes=536870912,ac(null,e);if(Qa(t),(e=q)?(e=of(e,Oi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:_i===null?null:{id:vi,overflow:yi},retryLane:536870912,hydrationErrors:null},n=si(e),n.return=t,t.child=n,Ti=t,q=null)):e=null,e===null)throw Ai(t);return t.lanes=536870912,null}return sc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Qa(t),a)if(t.flags&256)t.flags&=-257,t=cc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if($s||Wi(e,t,n,!1),a=(n&e.childLanes)!==0,$s||a){if(r=Rl,r!==null&&(s=Je(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Yr(e,s),_u(r,e,s),Qs;ku(),t=cc(e,t,n)}else e=o.treeContext,q=uf(s.nextSibling),Ti=t,Ei=!0,Di=null,Oi=!1,e!==null&&wi(t,e),t=sc(t,r),t.flags|=4096;return t}return e=ni(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function uc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function dc(e,t,n,r,i){return Ki(t),n=vo(e,t,n,r,void 0,i),r=So(),e!==null&&!$s?(Co(e,t,i),Tc(e,t,i)):(Ei&&r&&Si(t),t.flags|=1,ec(e,t,n,i),t.child)}function fc(e,t,n,r,i,a){return Ki(t),t.updateQueue=null,n=bo(t,r,n,i),yo(e),r=So(),e!==null&&!$s?(Co(e,t,a),Tc(e,t,a)):(Ei&&r&&Si(t),t.flags|=1,ec(e,t,n,a),t.child)}function pc(e,t,n,r,i){if(Ki(t),t.stateNode===null){var a=Qr,o=n.contextType;typeof o==`object`&&o&&(a=qi(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=zs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Na(t),o=n.contextType,a.context=typeof o==`object`&&o?qi(o):Qr,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Rs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&zs.enqueueReplaceState(a,a.state,null),Va(t,r,a,i),Ba(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Hs(n,s);a.props=c;var l=a.context,u=n.contextType;o=Qr,typeof u==`object`&&u&&(o=qi(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Vs(t,a,r,o),Ma=!1;var f=t.memoizedState;a.state=f,Va(t,r,a,i),Ba(),l=t.memoizedState,s||f!==l||Ma?(typeof d==`function`&&(Rs(t,n,d,r),l=t.memoizedState),(c=Ma||Bs(t,n,c,r,f,l,o))?(u||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`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Pa(e,t),o=t.memoizedProps,u=Hs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Qr,typeof l==`object`&&l&&(c=qi(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Vs(t,a,r,c),Ma=!1,f=t.memoizedState,a.state=f,Va(t,r,a,i),Ba();var p=t.memoizedState;o!==d||f!==p||Ma||e!==null&&e.dependencies!==null&&Gi(e.dependencies)?(typeof s==`function`&&(Rs(t,n,s,r),p=t.memoizedState),(u=Ma||Bs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Gi(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,uc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Aa(t,e.child,null,i),t.child=Aa(t,null,n,i)):ec(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Tc(e,t,i),e}function mc(e,t,n,r){return Pi(),t.flags|=256,ec(e,t,n,r),t.child}var hc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function gc(e){return{baseLanes:e,cachePool:pa()}}function _c(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Zl),e}function vc(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(no.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(Ei){if(a?Za(t):eo(t),(e=q)?(e=of(e,Oi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:_i===null?null:{id:vi,overflow:yi},retryLane:536870912,hydrationErrors:null},n=si(e),n.return=t,t.child=n,Ti=t,q=null)):e=null,e===null)throw Ai(t);return cf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(eo(t),a=t.mode,c=bc({mode:`hidden`,children:c},a),r=ai(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=gc(n),r.childLanes=_c(e,s,n),t.memoizedState=hc,ac(null,r)):(Za(t),yc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(Za(t),t.flags&=-257,t=xc(e,t,n)):t.memoizedState===null?(eo(t),c=r.fallback,a=t.mode,r=bc({mode:`visible`,children:r.children},a),c=ai(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Aa(t,e.child,null,n),r=t.child,r.memoizedState=gc(n),r.childLanes=_c(e,s,n),t.memoizedState=hc,t=ac(null,r)):(eo(t),t.child=e.child,t.flags|=128,t=null);else if(Za(t),cf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Ii({value:r,source:null,stack:null}),t=xc(e,t,n)}else if($s||Wi(e,t,n,!1),s=(n&e.childLanes)!==0,$s||s){if(s=Rl,s!==null&&(r=Je(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,Yr(e,r),_u(s,e,r),Qs;sf(c)||ku(),t=xc(e,t,n)}else sf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,q=uf(c.nextSibling),Ti=t,Ei=!0,Di=null,Oi=!1,e!==null&&wi(t,e),t=yc(t,r.children),t.flags|=4096);return t}return a?(eo(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=ni(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=ai(c,a,n,null),c.flags|=2):c=ni(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,ac(null,r),r=t.child,c=e.child.memoizedState,c===null?c=gc(n):(a=c.cachePool,a===null?a=pa():(l=$i._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=_c(e,s,n),t.memoizedState=hc,ac(e.child,r)):(Za(t),n=e.child,e=n.sibling,n=ni(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function yc(e,t){return t=bc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function bc(e,t){return e=ei(22,e,null,t),e.lanes=0,e}function xc(e,t,n){return Aa(t,e.child,null,n),e=yc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Sc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Hi(e.return,t,n)}function Cc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function wc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=no.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,H(no,o),ec(e,t,r,n),r=Ei?mi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Sc(e,n,t);else if(e.tag===19)Sc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&ro(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Cc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ro(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Cc(t,!0,n,null,a,r);break;case`together`:Cc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Tc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Jl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Wi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=ni(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ni(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ec(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Gi(e))):!0}function Dc(e,t,n){switch(t.tag){case 3:ie(t,t.stateNode.containerInfo),Bi(t,$i,e.memoizedState.cache),Pi();break;case 27:case 5:oe(t);break;case 4:ie(t,t.stateNode.containerInfo);break;case 10:Bi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Qa(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(Za(t),e=Tc(e,t,n),e===null?null:e.sibling):vc(e,t,n):(Za(t),t.flags|=128,null);Za(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Wi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return wc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),H(no,no.current),r)break;return null;case 22:return t.lanes=0,ic(e,t,n,t.pendingProps);case 24:Bi(t,$i,e.memoizedState.cache)}return Tc(e,t,n)}function Oc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)$s=!0;else{if(!Ec(e,n)&&!(t.flags&128))return $s=!1,Dc(e,t,n);$s=!!(e.flags&131072)}else $s=!1,Ei&&t.flags&1048576&&xi(t,mi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=ba(t.elementType),t.type=e,typeof e==`function`)ti(e)?(r=Hs(e,r),t.tag=1,t=pc(null,t,e,r,n)):(t.tag=0,t=dc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=tc(null,t,e,r,n);break a}else if(a===D){t.tag=14,t=nc(null,t,e,r,n);break a}}throw t=P(e)||e,Error(i(306,t,``))}}return t;case 0:return dc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Hs(r,t.pendingProps),pc(e,t,r,a,n);case 3:a:{if(ie(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Pa(e,t),Va(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Bi(t,$i,r),r!==o.cache&&Ui(t,[$i],n,!0),Ba(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=mc(e,t,r,n);break a}else if(r!==a){a=ui(Error(i(424)),t),Ii(a),t=mc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(q=uf(e.firstChild),Ti=t,Ei=!0,Di=null,Oi=!0,n=ja(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Pi(),r===a){t=Tc(e,t,n);break a}ec(e,t,r,n)}t=t.child}return t;case 26:return uc(e,t),e===null?(n=jf(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ei||(n=t.type,e=t.pendingProps,r=Hd(ne.current).createElement(n),r[et]=t,r[tt]=e,Id(r,n,e),pt(r),t.stateNode=r):t.memoizedState=jf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return oe(t),e===null&&Ei&&(r=t.stateNode=mf(t.type,t.pendingProps,ne.current),Ti=t,Oi=!0,a=q,$d(t.type)?(df=a,q=uf(r.firstChild)):q=a),ec(e,t,t.pendingProps.children,n),uc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ei&&((a=r=q)&&(r=rf(r,t.type,t.pendingProps,Oi),r===null?a=!1:(t.stateNode=r,Ti=t,q=uf(r.firstChild),Oi=!1,a=!0)),a||Ai(t)),oe(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Gd(a,o)?r=null:s!==null&&Gd(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=vo(e,t,xo,null,null,n),ep._currentValue=a),uc(e,t),ec(e,t,r,n),t.child;case 6:return e===null&&Ei&&((e=n=q)&&(n=af(n,t.pendingProps,Oi),n===null?e=!1:(t.stateNode=n,Ti=t,q=null,e=!0)),e||Ai(t)),null;case 13:return vc(e,t,n);case 4:return ie(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Aa(t,null,r,n):ec(e,t,r,n),t.child;case 11:return tc(e,t,t.type,t.pendingProps,n);case 7:return ec(e,t,t.pendingProps,n),t.child;case 8:return ec(e,t,t.pendingProps.children,n),t.child;case 12:return ec(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Bi(t,t.type,r.value),ec(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Ki(t),a=qi(a),r=r(a),t.flags|=1,ec(e,t,r,n),t.child;case 14:return nc(e,t,t.type,t.pendingProps,n);case 15:return rc(e,t,t.type,t.pendingProps,n);case 19:return wc(e,t,n);case 31:return lc(e,t,n);case 22:return ic(e,t,n,t.pendingProps);case 24:return Ki(t),r=qi($i),e===null?(a=da(),a===null&&(a=Rl,o=ea(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Na(t),Bi(t,$i,a)):((e.lanes&n)!==0&&(Pa(e,t),Va(t,null,null,n),Ba()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Bi(t,$i,r),r!==a.cache&&Ui(t,[$i],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Bi(t,$i,r))),ec(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function kc(e){e.flags|=4}function Ac(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Eu())e.flags|=8192;else throw xa=_a,ha}else e.flags&=-16777217}function jc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Kf(t))if(Eu())e.flags|=8192;else throw xa=_a,ha}function Mc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:He(),e.lanes|=t,Ql|=t)}function Nc(e,t){if(!Ei)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Pc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Fc(e,t,n){var r=t.pendingProps;switch(Ci(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Pc(t),null;case 1:return Pc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Vi($i),ae(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ni(t)?kc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Fi())),Pc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(kc(t),o===null?(Pc(t),Ac(t,a,null,r,n)):(Pc(t),jc(t,o))):o?o===e.memoizedState?(Pc(t),t.flags&=-16777217):(kc(t),Pc(t),jc(t,o)):(e=e.memoizedProps,e!==r&&kc(t),Pc(t),Ac(t,a,e,r,n)),null;case 27:if(se(t),n=ne.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&kc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Pc(t),null}e=te.current,Ni(t)?ji(t,e):(e=mf(a,r,n),t.stateNode=e,kc(t))}return Pc(t),null;case 5:if(se(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&kc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Pc(t),null}if(o=te.current,Ni(t))ji(t,o);else{var s=Hd(ne.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[et]=t,o[tt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Id(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&kc(t)}}return Pc(t),Ac(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&kc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ne.current,Ni(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ti,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[et]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Nd(e.nodeValue,n)),e||Ai(t,!0)}else e=Hd(e).createTextNode(r),e[et]=t,t.stateNode=e}return Pc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ni(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[et]=t}else Pi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Pc(t),e=!1}else n=Fi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(to(t),t):(to(t),null);if(t.flags&128)throw Error(i(558))}return Pc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ni(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[et]=t}else Pi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Pc(t),a=!1}else a=Fi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(to(t),t):(to(t),null)}return to(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Mc(t,t.updateQueue),Pc(t),null);case 4:return ae(),e===null&&Cd(t.stateNode.containerInfo),Pc(t),null;case 10:return Vi(t.type),Pc(t),null;case 19:if(ee(no),r=t.memoizedState,r===null)return Pc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Nc(r,!1);else{if(ql!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=ro(e),o!==null){for(t.flags|=128,Nc(r,!1),e=o.updateQueue,t.updateQueue=e,Mc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ri(n,e),n=n.sibling;return H(no,no.current&1|2),Ei&&bi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&be()>J&&(t.flags|=128,a=!0,Nc(r,!1),t.lanes=4194304)}else{if(!a)if(e=ro(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Mc(t,e),Nc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Ei)return Pc(t),null}else 2*be()-r.renderingStartTime>J&&n!==536870912&&(t.flags|=128,a=!0,Nc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Pc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=be(),e.sibling=null,n=no.current,H(no,a?n&1|2:n&1),Ei&&bi(t,r.treeForkCount),e);case 22:case 23:return to(t),Ja(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Pc(t),t.subtreeFlags&6&&(t.flags|=8192)):Pc(t),n=t.updateQueue,n!==null&&Mc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ee(ua),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Vi($i),Pc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Ic(e,t){switch(Ci(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Vi($i),ae(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return se(t),null;case 31:if(t.memoizedState!==null){if(to(t),t.alternate===null)throw Error(i(340));Pi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(to(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Pi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ee(no),null;case 4:return ae(),null;case 10:return Vi(t.type),null;case 22:case 23:return to(t),Ja(),e!==null&&ee(ua),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Vi($i),null;case 25:return null;default:return null}}function Lc(e,t){switch(Ci(t),t.tag){case 3:Vi($i),ae();break;case 26:case 27:case 5:se(t);break;case 4:ae();break;case 31:t.memoizedState!==null&&to(t);break;case 13:to(t);break;case 19:ee(no);break;case 10:Vi(t.type);break;case 22:case 23:to(t),Ja(),e!==null&&ee(ua);break;case 24:Vi($i)}}function Rc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Gu(t,t.return,e)}}function zc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Gu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Gu(t,t.return,e)}}function Bc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ua(t,n)}catch(t){Gu(e,e.return,t)}}}function Vc(e,t,n){n.props=Hs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Gu(e,t,n)}}function Hc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Gu(e,t,n)}}function Uc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Gu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Gu(e,t,n)}else n.current=null}function Wc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Gu(e,e.return,t)}}function Gc(e,t,n){try{var r=e.stateNode;Ld(r,e.type,n,t),r[tt]=t}catch(t){Gu(e,e.return,t)}}function Kc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&$d(e.type)||e.tag===4}function qc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Kc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&$d(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Jc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=qt));else if(r!==4&&(r===27&&$d(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Jc(e,t,n),e=e.sibling;e!==null;)Jc(e,t,n),e=e.sibling}function Yc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&$d(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Yc(e,t,n),e=e.sibling;e!==null;)Yc(e,t,n),e=e.sibling}function Xc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Id(t,r,n),t[et]=e,t[tt]=n}catch(t){Gu(e,e.return,t)}}var Zc=!1,Qc=!1,$c=!1,el=typeof WeakSet==`function`?WeakSet:Set,tl=null;function nl(e,t){if(e=e.containerInfo,Bd=lp,e=yr(e),br(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Vd={focusedElem:e,selectionRange:n},lp=!1,tl=t;tl!==null;)if(t=tl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,tl=e;else for(;tl!==null;){switch(t=tl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Hs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Gu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)nf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:nf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,tl=e;break}tl=t.return}}function rl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:vl(e,n),r&4&&Rc(5,n);break;case 1:if(vl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Gu(n,n.return,e)}else{var i=Hs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Gu(n,n.return,e)}}r&64&&Bc(n),r&512&&Hc(n,n.return);break;case 3:if(vl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Ua(e,t)}catch(e){Gu(n,n.return,e)}}break;case 27:t===null&&r&4&&Xc(n);case 26:case 5:vl(e,n),t===null&&r&4&&Wc(n),r&512&&Hc(n,n.return);break;case 12:vl(e,n);break;case 31:vl(e,n),r&4&&ll(e,n);break;case 13:vl(e,n),r&4&&ul(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Yu.bind(null,n),lf(e,n))));break;case 22:if(r=n.memoizedState!==null||Zc,!r){t=t!==null&&t.memoizedState!==null||Qc,i=Zc;var a=Qc;Zc=r,(Qc=t)&&!a?bl(e,n,(n.subtreeFlags&8772)!=0):vl(e,n),Zc=i,Qc=a}break;case 30:break;default:vl(e,n)}}function il(e){var t=e.alternate;t!==null&&(e.alternate=null,il(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ct(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var al=null,ol=!1;function sl(e,t,n){for(n=n.child;n!==null;)cl(e,t,n),n=n.sibling}function cl(e,t,n){if(Ae&&typeof Ae.onCommitFiberUnmount==`function`)try{Ae.onCommitFiberUnmount(ke,n)}catch{}switch(n.tag){case 26:Qc||Uc(n,t),sl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Qc||Uc(n,t);var r=al,i=ol;$d(n.type)&&(al=n.stateNode,ol=!1),sl(e,t,n),hf(n.stateNode),al=r,ol=i;break;case 5:Qc||Uc(n,t);case 6:if(r=al,i=ol,al=null,sl(e,t,n),al=r,ol=i,al!==null)if(ol)try{(al.nodeType===9?al.body:al.nodeName===`HTML`?al.ownerDocument.body:al).removeChild(n.stateNode)}catch(e){Gu(n,t,e)}else try{al.removeChild(n.stateNode)}catch(e){Gu(n,t,e)}break;case 18:al!==null&&(ol?(e=al,ef(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Fp(e)):ef(al,n.stateNode));break;case 4:r=al,i=ol,al=n.stateNode.containerInfo,ol=!0,sl(e,t,n),al=r,ol=i;break;case 0:case 11:case 14:case 15:zc(2,n,t),Qc||zc(4,n,t),sl(e,t,n);break;case 1:Qc||(Uc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Vc(n,t,r)),sl(e,t,n);break;case 21:sl(e,t,n);break;case 22:Qc=(r=Qc)||n.memoizedState!==null,sl(e,t,n),Qc=r;break;default:sl(e,t,n)}}function ll(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Fp(e)}catch(e){Gu(t,t.return,e)}}}function ul(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Fp(e)}catch(e){Gu(t,t.return,e)}}function dl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new el),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new el),t;default:throw Error(i(435,e.tag))}}function fl(e,t){var n=dl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Xu.bind(null,e,t);t.then(r,r)}})}function pl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if($d(c.type)){al=c.stateNode,ol=!1;break a}break;case 5:al=c.stateNode,ol=!1;break a;case 3:case 4:al=c.stateNode.containerInfo,ol=!0;break a}c=c.return}if(al===null)throw Error(i(160));cl(o,s,a),al=null,ol=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)hl(t,e),t=t.sibling}var ml=null;function hl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:pl(t,e),gl(e),r&4&&(zc(3,e,e.return),Rc(3,e),zc(5,e,e.return));break;case 1:pl(t,e),gl(e),r&512&&(Qc||n===null||Uc(n,n.return)),r&64&&Zc&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=ml;if(pl(t,e),gl(e),r&512&&(Qc||n===null||Uc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[st]||o[et]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Id(o,r,n),o[et]=e,pt(o),r=o;break a;case`link`:var s=Uf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Id(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Uf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Id(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[et]=e,pt(o),r=o}e.stateNode=r}else Wf(a,e.type,e.stateNode);else e.stateNode=Rf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Gc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Wf(a,e.type,e.stateNode):Rf(a,r,e.memoizedProps))}break;case 27:pl(t,e),gl(e),r&512&&(Qc||n===null||Uc(n,n.return)),n!==null&&r&4&&Gc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(pl(t,e),gl(e),r&512&&(Qc||n===null||Uc(n,n.return)),e.flags&32){a=e.stateNode;try{zt(a,``)}catch(t){Gu(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Gc(e,a,n===null?a:n.memoizedProps)),r&1024&&($c=!0);break;case 6:if(pl(t,e),gl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Gu(e,e.return,t)}}break;case 3:if(Hf=null,a=ml,ml=vf(t.containerInfo),pl(t,e),ml=a,gl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Fp(t.containerInfo)}catch(t){Gu(e,e.return,t)}$c&&($c=!1,_l(e));break;case 4:r=ml,ml=vf(e.stateNode.containerInfo),pl(t,e),gl(e),ml=r;break;case 12:pl(t,e),gl(e);break;case 31:pl(t,e),gl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,fl(e,r)));break;case 13:pl(t,e),gl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(nu=be()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,fl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Zc,d=Qc;if(Zc=u||a,Qc=d||l,pl(t,e),Qc=d,Zc=u,gl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||Zc||Qc||yl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Gu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Gu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?tf(m,!0):tf(l.stateNode,!1)}catch(e){Gu(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,fl(e,n))));break;case 19:pl(t,e),gl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,fl(e,r)));break;case 30:break;case 21:break;default:pl(t,e),gl(e)}}function gl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Kc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Yc(e,qc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(zt(o,``),n.flags&=-33),Yc(e,qc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Jc(e,qc(e),s);break;default:throw Error(i(161))}}catch(t){Gu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function _l(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;_l(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function vl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)rl(e,t.alternate,t),t=t.sibling}function yl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:zc(4,t,t.return),yl(t);break;case 1:Uc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Vc(t,t.return,n),yl(t);break;case 27:hf(t.stateNode);case 26:case 5:Uc(t,t.return),yl(t);break;case 22:t.memoizedState===null&&yl(t);break;case 30:yl(t);break;default:yl(t)}e=e.sibling}}function bl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:bl(i,a,n),Rc(4,a);break;case 1:if(bl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Gu(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Ha(c[i],s)}catch(e){Gu(r,r.return,e)}}n&&o&64&&Bc(a),Hc(a,a.return);break;case 27:Xc(a);case 26:case 5:bl(i,a,n),n&&r===null&&o&4&&Wc(a),Hc(a,a.return);break;case 12:bl(i,a,n);break;case 31:bl(i,a,n),n&&o&4&&ll(i,a);break;case 13:bl(i,a,n),n&&o&4&&ul(i,a);break;case 22:a.memoizedState===null&&bl(i,a,n),Hc(a,a.return);break;case 30:break;default:bl(i,a,n)}t=t.sibling}}function xl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ta(n))}function Sl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ta(e))}function Cl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)wl(e,t,n,r),t=t.sibling}function wl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Cl(e,t,n,r),i&2048&&Rc(9,t);break;case 1:Cl(e,t,n,r);break;case 3:Cl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ta(e)));break;case 12:if(i&2048){Cl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Gu(t,t.return,e)}}else Cl(e,t,n,r);break;case 31:Cl(e,t,n,r);break;case 13:Cl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Cl(e,t,n,r):(a._visibility|=2,Tl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Cl(e,t,n,r):El(e,t),i&2048&&xl(o,t);break;case 24:Cl(e,t,n,r),i&2048&&Sl(t.alternate,t);break;default:Cl(e,t,n,r)}}function Tl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Tl(a,o,s,c,i),Rc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Tl(a,o,s,c,i)):u._visibility&2?Tl(a,o,s,c,i):El(a,o),i&&l&2048&&xl(o.alternate,o);break;case 24:Tl(a,o,s,c,i),i&&l&2048&&Sl(o.alternate,o);break;default:Tl(a,o,s,c,i)}t=t.sibling}}function El(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:El(n,r),i&2048&&xl(r.alternate,r);break;case 24:El(n,r),i&2048&&Sl(r.alternate,r);break;default:El(n,r)}t=t.sibling}}var Dl=8192;function Ol(e,t,n){if(e.subtreeFlags&Dl)for(e=e.child;e!==null;)kl(e,t,n),e=e.sibling}function kl(e,t,n){switch(e.tag){case 26:Ol(e,t,n),e.flags&Dl&&e.memoizedState!==null&&qf(n,ml,e.memoizedState,e.memoizedProps);break;case 5:Ol(e,t,n);break;case 3:case 4:var r=ml;ml=vf(e.stateNode.containerInfo),Ol(e,t,n),ml=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Dl,Dl=16777216,Ol(e,t,n),Dl=r):Ol(e,t,n));break;default:Ol(e,t,n)}}function Al(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function jl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];tl=r,Pl(r,e)}Al(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ml(e),e=e.sibling}function Ml(e){switch(e.tag){case 0:case 11:case 15:jl(e),e.flags&2048&&zc(9,e,e.return);break;case 3:jl(e);break;case 12:jl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Nl(e)):jl(e);break;default:jl(e)}}function Nl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];tl=r,Pl(r,e)}Al(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:zc(8,t,t.return),Nl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Nl(t));break;default:Nl(t)}e=e.sibling}}function Pl(e,t){for(;tl!==null;){var n=tl;switch(n.tag){case 0:case 11:case 15:zc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:ta(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,tl=r;else a:for(n=e;tl!==null;){r=tl;var i=r.sibling,a=r.return;if(il(r),r===n){tl=null;break a}if(i!==null){i.return=a,tl=i;break a}tl=a}}}var Fl={getCacheForType:function(e){var t=qi($i),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return qi($i).controller.signal}},Il=typeof WeakMap==`function`?WeakMap:Map,Ll=0,Rl=null,zl=null,Bl=0,Vl=0,Hl=null,Ul=!1,Wl=!1,Gl=!1,Kl=0,ql=0,Jl=0,Yl=0,Xl=0,Zl=0,Ql=0,$l=null,eu=null,tu=!1,nu=0,ru=0,J=1/0,iu=null,au=null,ou=0,su=null,cu=null,lu=0,uu=0,du=null,fu=null,pu=0,mu=null;function hu(){return Ll&2&&Bl!==0?Bl&-Bl:I.T===null?Ze():dd()}function gu(){if(Zl===0)if(!(Bl&536870912)||Ei){var e=Le;Le<<=1,!(Le&3932160)&&(Le=262144),Zl=e}else Zl=536870912;return e=Ya.current,e!==null&&(e.flags|=32),Zl}function _u(e,t,n){(e===Rl&&(Vl===2||Vl===9)||e.cancelPendingCommit!==null)&&(wu(e,0),xu(e,Bl,Zl,!1)),We(e,n),(!(Ll&2)||e!==Rl)&&(e===Rl&&(!(Ll&2)&&(Yl|=n),ql===4&&xu(e,Bl,Zl,!1)),rd(e))}function vu(e,t,n){if(Ll&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Ve(e,t),a=r?Mu(e,t):Au(e,t,!0),o=r;do{if(a===0){Wl&&!r&&xu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!bu(n)){a=Au(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=$l;var l=c.current.memoizedState.isDehydrated;if(l&&(wu(c,s).flags|=256),s=Au(c,s,!1),s!==2){if(Gl&&!l){c.errorRecoveryDisabledLanes|=o,Yl|=o,a=4;break a}o=eu,eu=a,o!==null&&(eu===null?eu=o:eu.push.apply(eu,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){wu(e,0),xu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:xu(r,t,Zl,!Ul);break a;case 2:eu=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=nu+300-be(),10<a)){if(xu(r,t,Zl,!Ul),Be(r,0,!0)!==0)break a;lu=t,r.timeoutHandle=Jd(yu.bind(null,r,n,eu,iu,tu,t,Zl,Yl,Ql,Ul,o,`Throttled`,-0,0),a);break a}yu(r,n,eu,iu,tu,t,Zl,Yl,Ql,Ul,o,null,-0,0)}}break}while(1);rd(e)}function yu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:qt},kl(t,a,d);var m=(a&62914560)===a?nu-be():(a&4194048)===a?ru-be():0;if(m=Yf(d,m),m!==null){lu=a,e.cancelPendingCommit=m(zu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),xu(e,a,o,!l);return}}zu(e,t,a,n,r,i,o,s,c)}function bu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!mr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function xu(e,t,n,r){t&=~Xl,t&=~Yl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Me(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Ke(e,n,t)}function Su(){return Ll&6?!0:(id(0,!1),!1)}function Cu(){if(zl!==null){if(Vl===0)var e=zl.return;else e=zl,zi=Ri=null,wo(e),wa=null,Ta=0,e=zl;for(;e!==null;)Lc(e.alternate,e),e=e.return;zl=null}}function wu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Yd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),lu=0,Cu(),Rl=e,zl=n=ni(e.current,null),Bl=t,Vl=0,Hl=null,Ul=!1,Wl=Ve(e,t),Gl=!1,Ql=Zl=Xl=Yl=Jl=ql=0,eu=$l=null,tu=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Me(r),a=1<<i;t|=e[i],r&=~a}return Kl=t,Kr(),n}function Tu(e,t){ao=null,I.H=Ps,t===ma||t===ga?(t=Sa(),Vl=3):t===ha?(t=Sa(),Vl=4):Vl=t===Qs?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Hl=t,zl===null&&(ql=1,Ks(e,ui(t,e.current)))}function Eu(){var e=Ya.current;return e===null?!0:(Bl&4194048)===Bl?Xa===null:(Bl&62914560)===Bl||Bl&536870912?e===Xa:!1}function Du(){var e=I.H;return I.H=Ps,e===null?Ps:e}function Ou(){var e=I.A;return I.A=Fl,e}function ku(){ql=4,Ul||(Bl&4194048)!==Bl&&Ya.current!==null||(Wl=!0),!(Jl&134217727)&&!(Yl&134217727)||Rl===null||xu(Rl,Bl,Zl,!1)}function Au(e,t,n){var r=Ll;Ll|=2;var i=Du(),a=Ou();(Rl!==e||Bl!==t)&&(iu=null,wu(e,t)),t=!1;var o=ql;a:do try{if(Vl!==0&&zl!==null){var s=zl,c=Hl;switch(Vl){case 8:Cu(),o=6;break a;case 3:case 2:case 9:case 6:Ya.current===null&&(t=!0);var l=Vl;if(Vl=0,Hl=null,Iu(e,s,c,l),n&&Wl){o=0;break a}break;default:l=Vl,Vl=0,Hl=null,Iu(e,s,c,l)}}ju(),o=ql;break}catch(t){Tu(e,t)}while(1);return t&&e.shellSuspendCounter++,zi=Ri=null,Ll=r,I.H=i,I.A=a,zl===null&&(Rl=null,Bl=0,Kr()),o}function ju(){for(;zl!==null;)Pu(zl)}function Mu(e,t){var n=Ll;Ll|=2;var r=Du(),a=Ou();Rl!==e||Bl!==t?(iu=null,J=be()+500,wu(e,t)):Wl=Ve(e,t);a:do try{if(Vl!==0&&zl!==null){t=zl;var o=Hl;b:switch(Vl){case 1:Vl=0,Hl=null,Iu(e,t,o,1);break;case 2:case 9:if(va(o)){Vl=0,Hl=null,Fu(t);break}t=function(){Vl!==2&&Vl!==9||Rl!==e||(Vl=7),rd(e)},o.then(t,t);break a;case 3:Vl=7;break a;case 4:Vl=5;break a;case 7:va(o)?(Vl=0,Hl=null,Fu(t)):(Vl=0,Hl=null,Iu(e,t,o,7));break;case 5:var s=null;switch(zl.tag){case 26:s=zl.memoizedState;case 5:case 27:var c=zl;if(s?Kf(s):c.stateNode.complete){Vl=0,Hl=null;var l=c.sibling;if(l!==null)zl=l;else{var u=c.return;u===null?zl=null:(zl=u,Lu(u))}break b}}Vl=0,Hl=null,Iu(e,t,o,5);break;case 6:Vl=0,Hl=null,Iu(e,t,o,6);break;case 8:Cu(),ql=6;break a;default:throw Error(i(462))}}Nu();break}catch(t){Tu(e,t)}while(1);return zi=Ri=null,I.H=r,I.A=a,Ll=n,zl===null?(Rl=null,Bl=0,Kr(),ql):0}function Nu(){for(;zl!==null&&!ve();)Pu(zl)}function Pu(e){var t=Oc(e.alternate,e,Kl);e.memoizedProps=e.pendingProps,t===null?Lu(e):zl=t}function Fu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=fc(n,t,t.pendingProps,t.type,void 0,Bl);break;case 11:t=fc(n,t,t.pendingProps,t.type.render,t.ref,Bl);break;case 5:wo(t);default:Lc(n,t),t=zl=ri(t,Kl),t=Oc(n,t,Kl)}e.memoizedProps=e.pendingProps,t===null?Lu(e):zl=t}function Iu(e,t,n,r){zi=Ri=null,wo(t),wa=null,Ta=0;var i=t.return;try{if(Zs(e,i,t,n,Bl)){ql=1,Ks(e,ui(n,e.current)),zl=null;return}}catch(t){if(i!==null)throw zl=i,t;ql=1,Ks(e,ui(n,e.current)),zl=null;return}t.flags&32768?(Ei||r===1?e=!0:Wl||Bl&536870912?e=!1:(Ul=e=!0,(r===2||r===9||r===3||r===6)&&(r=Ya.current,r!==null&&r.tag===13&&(r.flags|=16384))),Ru(t,e)):Lu(t)}function Lu(e){var t=e;do{if(t.flags&32768){Ru(t,Ul);return}e=t.return;var n=Fc(t.alternate,t,Kl);if(n!==null){zl=n;return}if(t=t.sibling,t!==null){zl=t;return}zl=t=e}while(t!==null);ql===0&&(ql=5)}function Ru(e,t){do{var n=Ic(e.alternate,e);if(n!==null){n.flags&=32767,zl=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){zl=e;return}zl=e=n}while(e!==null);ql=6,zl=null}function zu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do X();while(ou!==0);if(Ll&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Gr,Ge(e,n,o,s,c,l),e===Rl&&(zl=Rl=null,Bl=0),cu=t,su=e,lu=n,uu=o,du=a,fu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Zu(we,function(){return Uu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=I.T,I.T=null,a=L.p,L.p=2,s=Ll,Ll|=4;try{nl(e,t,n)}finally{Ll=s,L.p=a,I.T=r}}ou=1,Bu(),Vu(),Y()}}function Bu(){if(ou===1){ou=0;var e=su,t=cu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=I.T,I.T=null;var r=L.p;L.p=2;var i=Ll;Ll|=4;try{hl(t,e);var a=Vd,o=yr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&vr(s.ownerDocument.documentElement,s)){if(c!==null&&br(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=_r(s,h),v=_r(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}lp=!!Bd,Vd=Bd=null}finally{Ll=i,L.p=r,I.T=n}}e.current=t,ou=2}}function Vu(){if(ou===2){ou=0;var e=su,t=cu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=I.T,I.T=null;var r=L.p;L.p=2;var i=Ll;Ll|=4;try{rl(e,t.alternate,t)}finally{Ll=i,L.p=r,I.T=n}}ou=3}}function Y(){if(ou===4||ou===3){ou=0,ye();var e=su,t=cu,n=lu,r=fu;t.subtreeFlags&10256||t.flags&10256?ou=5:(ou=0,cu=su=null,Hu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(au=null),Xe(n),t=t.stateNode,Ae&&typeof Ae.onCommitFiberRoot==`function`)try{Ae.onCommitFiberRoot(ke,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=I.T,i=L.p,L.p=2,I.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{I.T=t,L.p=i}}lu&3&&X(),rd(e),i=e.pendingLanes,n&261930&&i&42?e===mu?pu++:(pu=0,mu=e):pu=0,id(0,!1)}}function Hu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ta(t)))}function X(){return Bu(),Vu(),Y(),Uu()}function Uu(){if(ou!==5)return!1;var e=su,t=uu;uu=0;var n=Xe(lu),r=I.T,a=L.p;try{L.p=32>n?32:n,I.T=null,n=du,du=null;var o=su,s=lu;if(ou=0,cu=su=null,lu=0,Ll&6)throw Error(i(331));var c=Ll;if(Ll|=4,Ml(o.current),wl(o,o.current,s,n),Ll=c,id(0,!1),Ae&&typeof Ae.onPostCommitFiberRoot==`function`)try{Ae.onPostCommitFiberRoot(ke,o)}catch{}return!0}finally{L.p=a,I.T=r,Hu(e,t)}}function Wu(e,t,n){t=ui(n,t),t=Js(e.stateNode,t,2),e=Ia(e,t,2),e!==null&&(We(e,2),rd(e))}function Gu(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(au===null||!au.has(r))){e=ui(n,e),n=Ys(2),r=Ia(t,n,2),r!==null&&(Xs(n,r,t,e),We(r,2),rd(r));break}}t=t.return}}function Ku(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Il;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Gl=!0,i.add(n),e=qu.bind(null,e,t,n),t.then(e,e))}function qu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Rl===e&&(Bl&n)===n&&(ql===4||ql===3&&(Bl&62914560)===Bl&&300>be()-nu?!(Ll&2)&&wu(e,0):Xl|=n,Ql===Bl&&(Ql=0)),rd(e)}function Ju(e,t){t===0&&(t=He()),e=Yr(e,t),e!==null&&(We(e,t),rd(e))}function Yu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ju(e,n)}function Xu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),Ju(e,n)}function Zu(e,t){return ge(e,t)}var Qu=null,$u=null,ed=!1,Z=!1,td=!1,nd=0;function rd(e){e!==$u&&e.next===null&&($u===null?Qu=$u=e:$u=$u.next=e),Z=!0,ed||(ed=!0,ud())}function id(e,t){if(!td&&Z){td=!0;do for(var n=!1,r=Qu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Me(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ld(r,a))}else a=Bl,a=Be(r,r===Rl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ve(r,a)||(n=!0,ld(r,a));r=r.next}while(n);td=!1}}function ad(){od()}function od(){Z=ed=!1;var e=0;nd!==0&&qd()&&(e=nd);for(var t=be(),n=null,r=Qu;r!==null;){var i=r.next,a=sd(r,t);a===0?(r.next=null,n===null?Qu=i:n.next=i,i===null&&($u=n)):(n=r,(e!==0||a&3)&&(Z=!0)),r=i}ou!==0&&ou!==5||id(e,!1),nd!==0&&(nd=0)}function sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Me(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=W(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Rl,n=Bl,n=Be(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Vl===2||Vl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&_e(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ve(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&_e(r),Xe(n)){case 2:case 8:n=Ce;break;case 32:n=we;break;case 268435456:n=Ee;break;default:n=we}return r=cd.bind(null,e),n=ge(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&_e(r),e.callbackPriority=2,e.callbackNode=null,2}function cd(e,t){if(ou!==0&&ou!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(X()&&e.callbackNode!==n)return null;var r=Bl;return r=Be(e,e===Rl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(vu(e,r,t),sd(e,be()),e.callbackNode!=null&&e.callbackNode===n?cd.bind(null,e):null)}function ld(e,t){if(X())return null;vu(e,t,!0)}function ud(){Zd(function(){Ll&6?ge(Se,ad):od()})}function dd(){if(nd===0){var e=ia;e===0&&(e=Ie,Ie<<=1,!(Ie&261888)&&(Ie=256)),nd=e}return nd}function fd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Kt(``+e)}function pd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function md(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=fd((i[tt]||null).action),o=r.submitter;o&&(t=(t=o[tt]||null)?fd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new mn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(nd!==0){var e=o?pd(i,o):new FormData(i);bs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?pd(i,o):new FormData(i),bs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var hd=0;hd<Br.length;hd++){var gd=Br[hd];Vr(gd.toLowerCase(),`on`+(gd[0].toUpperCase()+gd.slice(1)))}Vr(Mr,`onAnimationEnd`),Vr(Nr,`onAnimationIteration`),Vr(Pr,`onAnimationStart`),Vr(`dblclick`,`onDoubleClick`),Vr(`focusin`,`onFocus`),Vr(`focusout`,`onBlur`),Vr(Fr,`onTransitionRun`),Vr(Ir,`onTransitionStart`),Vr(Lr,`onTransitionCancel`),Vr(Rr,`onTransitionEnd`),_t(`onMouseEnter`,[`mouseout`,`mouseover`]),_t(`onMouseLeave`,[`mouseout`,`mouseover`]),_t(`onPointerEnter`,[`pointerout`,`pointerover`]),_t(`onPointerLeave`,[`pointerout`,`pointerover`]),gt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),gt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),gt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),gt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),gt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),gt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var _d=`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(` `),vd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(_d));function yd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Hr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Hr(e)}i.currentTarget=null,a=c}}}}function bd(e,t){var n=t[rt];n===void 0&&(n=t[rt]=new Set);var r=e+`__bubble`;n.has(r)||(wd(t,e,2,!1),n.add(r))}function xd(e,t,n){var r=0;t&&(r|=4),wd(n,e,r,t)}var Sd=`_reactListening`+Math.random().toString(36).slice(2);function Cd(e){if(!e[Sd]){e[Sd]=!0,mt.forEach(function(t){t!==`selectionchange`&&(vd.has(t)||xd(t,!1,e),xd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Sd]||(t[Sd]=!0,xd(`selectionchange`,!1,t))}}function wd(e,t,n,r){switch(gp(t)){case 2:var i=up;break;case 8:i=dp;break;default:i=fp}n=i.bind(null,t,n,e),i=void 0,!rn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Td(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=lt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}en(function(){var r=a,i=Yt(n),s=[];a:{var c=zr.get(e);if(c!==void 0){var l=mn,u=e;switch(e){case`keypress`:if(ln(n)===0)break a;case`keydown`:case`keyup`:l=Mn;break;case`focusin`:u=`focus`,l=Cn;break;case`focusout`:u=`blur`,l=Cn;break;case`beforeblur`:case`afterblur`:l=Cn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=xn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Sn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Pn;break;case Mr:case Nr:case Pr:l=wn;break;case Rr:l=Fn;break;case`scroll`:case`scrollend`:l=gn;break;case`wheel`:l=In;break;case`copy`:case`cut`:case`paste`:l=Tn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Nn;break;case`toggle`:case`beforetoggle`:l=Ln}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=tn(m,p),g!=null&&d.push(Ed(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==Jt&&(u=n.relatedTarget||n.fromElement)&&(lt(u)||u[nt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?lt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=xn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Nn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:dt(l),h=u==null?c:dt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,lt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Od,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&kd(s,c,l,d,!1),u!==null&&f!==null&&kd(s,f,u,d,!0)}}a:{if(c=r?dt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=nr;else if(Xn(c))if(rr)v=fr;else{v=ur;var y=lr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Ut(r.elementType)&&(v=nr):v=dr;if(v&&=v(e,r)){Zn(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Ft(c,`number`,c.value)}switch(y=r?dt(r):window,e){case`focusin`:(Xn(y)||y.contentEditable===`true`)&&(Sr=y,Cr=r,wr=null);break;case`focusout`:wr=Cr=Sr=null;break;case`mousedown`:Tr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Tr=!1,Er(s,n,i);break;case`selectionchange`:if(xr)break;case`keydown`:case`keyup`:Er(s,n,i)}var b;if(zn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else K?Gn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Hn&&n.locale!==`ko`&&(K||x!==`onCompositionStart`?x===`onCompositionEnd`&&K&&(b=cn()):(on=i,sn=`value`in on?on.value:on.textContent,K=!0)),y=Dd(r,x),0<y.length&&(x=new En(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=Kn(n),b!==null&&(x.data=b)))),(b=Vn?qn(e,n):Jn(e,n))&&(x=Dd(r,`onBeforeInput`),0<x.length&&(y=new En(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),md(s,e,r,n,i)}yd(s,t)})}function Ed(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Dd(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=tn(e,n),i!=null&&r.unshift(Ed(e,i,a)),i=tn(e,t),i!=null&&r.push(Ed(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Od(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function kd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=tn(n,a),l!=null&&o.unshift(Ed(n,l,c))):i||(l=tn(n,a),l!=null&&o.push(Ed(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Ad=/\r\n?/g,jd=/\u0000|\uFFFD/g;function Md(e){return(typeof e==`string`?e:``+e).replace(Ad,`
|
|
9
|
+
`).replace(jd,``)}function Nd(e,t){return t=Md(t),Md(e)===t}function Pd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||zt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&zt(e,``+r);break;case`className`:Ct(e,`class`,r);break;case`tabIndex`:Ct(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Ct(e,n,r);break;case`style`:Ht(e,r,o);break;case`data`:if(t!==`object`){Ct(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Kt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Pd(e,t,`name`,a.name,a,null),Pd(e,t,`formEncType`,a.formEncType,a,null),Pd(e,t,`formMethod`,a.formMethod,a,null),Pd(e,t,`formTarget`,a.formTarget,a,null)):(Pd(e,t,`encType`,a.encType,a,null),Pd(e,t,`method`,a.method,a,null),Pd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Kt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=qt);break;case`onScroll`:r!=null&&bd(`scroll`,e);break;case`onScrollEnd`:r!=null&&bd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Kt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:bd(`beforetoggle`,e),bd(`toggle`,e),St(e,`popover`,r);break;case`xlinkActuate`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:wt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:wt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:wt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:St(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Wt.get(n)||n,St(e,n,r))}}function Fd(e,t,n,r,a,o){switch(n){case`style`:Ht(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?zt(e,r):(typeof r==`number`||typeof r==`bigint`)&&zt(e,``+r);break;case`onScroll`:r!=null&&bd(`scroll`,e);break;case`onScrollEnd`:r!=null&&bd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=qt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!ht.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[tt]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):St(e,n,r)}}}function Id(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:bd(`error`,e),bd(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Pd(e,t,o,s,n,null)}}a&&Pd(e,t,`srcSet`,n.srcSet,n,null),r&&Pd(e,t,`src`,n.src,n,null);return;case`input`:bd(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Pd(e,t,r,d,n,null)}}Pt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in bd(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Pd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&It(e,!!r,n,!0):It(e,!!r,t,!1);return;case`textarea`:for(s in bd(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Pd(e,t,s,c,n,null)}Rt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Pd(e,t,l,r,n,null)}return;case`dialog`:bd(`beforetoggle`,e),bd(`toggle`,e),bd(`cancel`,e),bd(`close`,e);break;case`iframe`:case`object`:bd(`load`,e);break;case`video`:case`audio`:for(r=0;r<_d.length;r++)bd(_d[r],e);break;case`image`:bd(`error`,e),bd(`load`,e);break;case`details`:bd(`toggle`,e);break;case`embed`:case`source`:case`link`:bd(`error`,e),bd(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Pd(e,t,u,r,n,null)}return;default:if(Ut(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Fd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Pd(e,t,c,r,n,null))}function Ld(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Pd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Pd(e,t,p,m,r,f)}}Nt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Pd(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Pd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?It(e,!!n,n?[]:``,!1):It(e,!!n,t,!0)):It(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Pd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Pd(e,t,s,a,r,o)}Lt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Pd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Pd(e,t,l,p,r,m)}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 g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Pd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Pd(e,t,u,p,r,m)}return;default:if(Ut(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Fd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Fd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Pd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Pd(e,t,f,p,r,m)}function Rd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function zd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Rd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Rd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Bd=null,Vd=null;function Hd(e){return e.nodeType===9?e:e.ownerDocument}function Ud(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Wd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Gd(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Kd=null;function qd(){var e=window.event;return e&&e.type===`popstate`?e===Kd?!1:(Kd=e,!0):(Kd=null,!1)}var Jd=typeof setTimeout==`function`?setTimeout:void 0,Yd=typeof clearTimeout==`function`?clearTimeout:void 0,Xd=typeof Promise==`function`?Promise:void 0,Zd=typeof queueMicrotask==`function`?queueMicrotask:Xd===void 0?Jd:function(e){return Xd.resolve(null).then(e).catch(Qd)};function Qd(e){setTimeout(function(){throw e})}function $d(e){return e===`head`}function ef(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Fp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)hf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,hf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[st]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&hf(e.ownerDocument.body);n=i}while(n);Fp(t)}function tf(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function nf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:nf(n),ct(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function rf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[st])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=uf(e.nextSibling),e===null)break}return null}function af(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=uf(e.nextSibling),e===null))return null;return e}function of(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=uf(e.nextSibling),e===null))return null;return e}function sf(e){return e.data===`$?`||e.data===`$~`}function cf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function lf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function uf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var df=null;function ff(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return uf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function pf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function mf(e,t,n){switch(t=Hd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function hf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ct(e)}var gf=new Map,_f=new Set;function vf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var yf=L.d;L.d={f:bf,r:xf,D:wf,C:Tf,L:Ef,m:Df,X:kf,S:Of,M:Af};function bf(){var e=yf.f(),t=Su();return e||t}function xf(e){var t=ut(e);t!==null&&t.tag===5&&t.type===`form`?Ss(t):yf.r(e)}var Sf=typeof document>`u`?null:document;function Cf(e,t,n){var r=Sf;if(r&&typeof t==`string`&&t){var i=Mt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),_f.has(i)||(_f.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Id(t,`link`,e),pt(t),r.head.appendChild(t)))}}function wf(e){yf.D(e),Cf(`dns-prefetch`,e,null)}function Tf(e,t){yf.C(e,t),Cf(`preconnect`,e,t)}function Ef(e,t,n){yf.L(e,t,n);var r=Sf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Mt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Mt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Mt(n.imageSizes)+`"]`)):i+=`[href="`+Mt(e)+`"]`;var a=i;switch(t){case`style`:a=Mf(e);break;case`script`:a=If(e)}gf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),gf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Nf(a))||t===`script`&&r.querySelector(Lf(a))||(t=r.createElement(`link`),Id(t,`link`,e),pt(t),r.head.appendChild(t)))}}function Df(e,t){yf.m(e,t);var n=Sf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Mt(r)+`"][href="`+Mt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=If(e)}if(!gf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),gf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Lf(a)))return}r=n.createElement(`link`),Id(r,`link`,e),pt(r),n.head.appendChild(r)}}}function Of(e,t,n){yf.S(e,t,n);var r=Sf;if(r&&e){var i=ft(r).hoistableStyles,a=Mf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Nf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=gf.get(a))&&Bf(e,n);var c=o=r.createElement(`link`);pt(c),Id(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,zf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function kf(e,t){yf.X(e,t);var n=Sf;if(n&&e){var r=ft(n).hoistableScripts,i=If(e),a=r.get(i);a||(a=n.querySelector(Lf(i)),a||(e=f({src:e,async:!0},t),(t=gf.get(i))&&Vf(e,t),a=n.createElement(`script`),pt(a),Id(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Af(e,t){yf.M(e,t);var n=Sf;if(n&&e){var r=ft(n).hoistableScripts,i=If(e),a=r.get(i);a||(a=n.querySelector(Lf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=gf.get(i))&&Vf(e,t),a=n.createElement(`script`),pt(a),Id(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function jf(e,t,n,r){var a=(a=ne.current)?vf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Mf(n.href),n=ft(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Mf(n.href);var o=ft(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Nf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),gf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},gf.set(e,n),o||Ff(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=If(n),n=ft(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Mf(e){return`href="`+Mt(e)+`"`}function Nf(e){return`link[rel="stylesheet"][`+e+`]`}function Pf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Ff(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Id(t,`link`,n),pt(t),e.head.appendChild(t))}function If(e){return`[src="`+Mt(e)+`"]`}function Lf(e){return`script[async]`+e}function Rf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Mt(n.href)+`"]`);if(r)return t.instance=r,pt(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),pt(r),Id(r,`style`,a),zf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Mf(n.href);var o=e.querySelector(Nf(a));if(o)return t.state.loading|=4,t.instance=o,pt(o),o;r=Pf(n),(a=gf.get(a))&&Bf(r,a),o=(e.ownerDocument||e).createElement(`link`),pt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Id(o,`link`,r),t.state.loading|=4,zf(o,n.precedence,e),t.instance=o;case`script`:return o=If(n.src),(a=e.querySelector(Lf(o)))?(t.instance=a,pt(a),a):(r=n,(a=gf.get(o))&&(r=f({},n),Vf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),pt(a),Id(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,zf(r,n.precedence,e));return t.instance}function zf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Bf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Vf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Hf=null;function Uf(e,t,n){if(Hf===null){var r=new Map,i=Hf=new Map;i.set(n,r)}else i=Hf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[st]||a[et]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Wf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Gf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Kf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function qf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Mf(r.href),a=t.querySelector(Nf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Xf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,pt(a);return}a=t.ownerDocument||t,r=Pf(r),(i=gf.get(i))&&Bf(r,i),a=a.createElement(`link`),pt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Id(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Xf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Jf=0;function Yf(e,t){return e.stylesheets&&e.count===0&&Qf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Qf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Jf===0&&(Jf=62500*zd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Qf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Jf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Xf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Qf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Zf=null;function Qf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Zf=new Map,t.forEach($f,e),Zf=null,Xf.call(e))}function $f(e,t){if(!(t.state.loading&4)){var n=Zf.get(e);if(n)var r=n.get(null);else{n=new Map,Zf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Xf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var ep={$$typeof:C,Provider:null,Consumer:null,_currentValue:R,_currentValue2:R,_threadCount:0};function tp(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ue(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ue(0),this.hiddenUpdates=Ue(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function np(e,t,n,r,i,a,o,s,c,l,u,d){return e=new tp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ei(3,null,null,t),e.current=a,a.stateNode=e,t=ea(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Na(a),e}function rp(e){return e?(e=Qr,e):Qr}function ip(e,t,n,r,i,a){i=rp(i),r.context===null?r.context=i:r.pendingContext=i,r=Fa(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ia(e,r,t),n!==null&&(_u(n,e,t),La(n,e,t))}function ap(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function op(e,t){ap(e,t),(e=e.alternate)&&ap(e,t)}function sp(e){if(e.tag===13||e.tag===31){var t=Yr(e,67108864);t!==null&&_u(t,e,67108864),op(e,67108864)}}function cp(e){if(e.tag===13||e.tag===31){var t=hu();t=Ye(t);var n=Yr(e,t);n!==null&&_u(n,e,t),op(e,t)}}var lp=!0;function up(e,t,n,r){var i=I.T;I.T=null;var a=L.p;try{L.p=2,fp(e,t,n,r)}finally{L.p=a,I.T=i}}function dp(e,t,n,r){var i=I.T;I.T=null;var a=L.p;try{L.p=8,fp(e,t,n,r)}finally{L.p=a,I.T=i}}function fp(e,t,n,r){if(lp){var i=pp(r);if(i===null)Td(e,t,r,mp,n),Tp(e,r);else if(Dp(i,e,t,n,r))r.stopPropagation();else if(Tp(e,r),t&4&&-1<wp.indexOf(e)){for(;i!==null;){var a=ut(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=ze(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Me(o);s.entanglements[1]|=c,o&=~c}rd(a),!(Ll&6)&&(J=be()+500,id(0,!1))}}break;case 31:case 13:s=Yr(a,2),s!==null&&_u(s,a,2),Su(),op(a,2)}if(a=pp(r),a===null&&Td(e,t,r,mp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Td(e,t,r,null,n)}}function pp(e){return e=Yt(e),hp(e)}var mp=null;function hp(e){if(mp=null,e=lt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return mp=e,null}function gp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(xe()){case Se:return 2;case Ce:return 8;case we:case Te:return 32;case Ee:return 268435456;default:return 32}default:return 32}}var _p=!1,vp=null,yp=null,bp=null,xp=new Map,Sp=new Map,Cp=[],wp=`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 Tp(e,t){switch(e){case`focusin`:case`focusout`:vp=null;break;case`dragenter`:case`dragleave`:yp=null;break;case`mouseover`:case`mouseout`:bp=null;break;case`pointerover`:case`pointerout`:xp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Sp.delete(t.pointerId)}}function Ep(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=ut(t),t!==null&&sp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Dp(e,t,n,r,i){switch(t){case`focusin`:return vp=Ep(vp,e,t,n,r,i),!0;case`dragenter`:return yp=Ep(yp,e,t,n,r,i),!0;case`mouseover`:return bp=Ep(bp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return xp.set(a,Ep(xp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Sp.set(a,Ep(Sp.get(a)||null,e,t,n,r,i)),!0}return!1}function Op(e){var t=lt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,Qe(e.priority,function(){cp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,Qe(e.priority,function(){cp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function kp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=pp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Jt=r,n.target.dispatchEvent(r),Jt=null}else return t=ut(n),t!==null&&sp(t),e.blockedOn=n,!1;t.shift()}return!0}function Ap(e,t,n){kp(e)&&n.delete(t)}function jp(){_p=!1,vp!==null&&kp(vp)&&(vp=null),yp!==null&&kp(yp)&&(yp=null),bp!==null&&kp(bp)&&(bp=null),xp.forEach(Ap),Sp.forEach(Ap)}function Mp(e,n){e.blockedOn===n&&(e.blockedOn=null,_p||(_p=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,jp)))}var Np=null;function Pp(e){Np!==e&&(Np=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Np===e&&(Np=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(hp(r||n)===null)continue;break}var a=ut(n);a!==null&&(e.splice(t,3),t-=3,bs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Fp(e){function t(t){return Mp(t,e)}vp!==null&&Mp(vp,e),yp!==null&&Mp(yp,e),bp!==null&&Mp(bp,e),xp.forEach(t),Sp.forEach(t);for(var n=0;n<Cp.length;n++){var r=Cp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Cp.length&&(n=Cp[0],n.blockedOn===null);)Op(n),n.blockedOn===null&&Cp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[tt]||null;if(typeof a==`function`)o||Pp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[tt]||null)s=o.formAction;else if(hp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Pp(n)}}}function Ip(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Lp(e){this._internalRoot=e}Rp.prototype.render=Lp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;ip(n,hu(),e,t,null,null)},Rp.prototype.unmount=Lp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ip(e.current,2,null,e,null,null),Su(),t[nt]=null}};function Rp(e){this._internalRoot=e}Rp.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ze();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Cp.length&&t!==0&&t<Cp[n].priority;n++);Cp.splice(n,0,e),n===0&&Op(e)}};var zp=n.version;if(zp!==`19.2.4`)throw Error(i(527,zp,`19.2.4`));L.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var Bp={bundleType:0,version:`19.2.4`,rendererPackageName:`react-dom`,currentDispatcherRef:I,reconcilerVersion:`19.2.4`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Vp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Vp.isDisabled&&Vp.supportsFiber)try{ke=Vp.inject(Bp),Ae=Vp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Us,s=Ws,c=Gs;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=np(e,1,!1,null,null,n,r,null,o,s,c,Ip),e[nt]=t.current,Cd(e),new Lp(t)}})),y=s(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=v()})),b=u(p(),1),x=y(),S=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(){}},C=new class extends S{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let 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(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},w={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},T=new class{#e=w;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)}};function E(e){setTimeout(e,0)}var D=typeof window>`u`||`Deno`in globalThis;function O(){}function k(e,t){return typeof e==`function`?e(t):e}function A(e){return typeof e==`number`&&e>=0&&e!==1/0}function j(e,t){return Math.max(e+(t||0)-Date.now(),0)}function M(e,t){return typeof e==`function`?e(t):e}function N(e,t){return typeof e==`function`?e(t):e}function P(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==I(o,t.options))return!1}else if(!R(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function F(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(L(t.options.mutationKey)!==L(a))return!1}else if(!R(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function I(e,t){return(t?.queryKeyHashFn||L)(e)}function L(e){return JSON.stringify(e,(e,t)=>H(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function R(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>R(e[n],t[n])):!1}var z=Object.prototype.hasOwnProperty;function B(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=ee(e)&&ee(t);if(!r&&!(H(e)&&H(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:z.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=B(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function V(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function ee(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function H(e){if(!te(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!te(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function te(e){return Object.prototype.toString.call(e)===`[object Object]`}function U(e){return new Promise(t=>{T.setTimeout(t,e)})}function ne(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:B(e,t)}function re(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function ie(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var ae=Symbol();function oe(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===ae?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function se(e,t){return typeof e==`function`?e(...t):!!e}function ce(e,t,n){let r=!1,i;return Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var le=(()=>{let e=()=>D;return{isServer(){return e()},setIsServer(t){e=t}}})();function ue(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var de=E;function fe(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=de,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var pe=fe(),me=new class extends S{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let 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(t=>{t(e)}))}isOnline(){return this.#e}};function he(e){return Math.min(1e3*2**e,3e4)}function ge(e){return(e??`online`)===`online`?me.isOnline():!0}var _e=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function ve(e){let t=!1,n=0,r,i=ue(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new _e(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>C.isFocused()&&(e.networkMode===`always`||me.isOnline())&&e.canRun(),u=()=>ge(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(le.isServer()?0:3),o=e.retryDelay??he,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){f(r);return}n++,e.onFail?.(n,r),U(s).then(()=>l()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var ye=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),A(this.gcTime)&&(this.#e=T.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(le.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e&&=(T.clearTimeout(this.#e),void 0)}},be=class extends ye{#e;#t;#n;#r;#i;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#n=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=Ce(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#i?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=Ce(this.options);e.data!==void 0&&(this.setState(Se(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#n.remove(this)}setData(e,t){let n=ne(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#c({type:`setState`,state:e,setStateOptions:t})}cancel(e){let t=this.#i?.promise;return this.#i?.cancel(e),t?t.then(O).catch(O):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#e}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>N(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ae||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>M(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:!j(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.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.#i&&(this.#o||this.#s()?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#n.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#s(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#i?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},i=()=>{let e=oe(this.options,t),n=(()=>{let e={client:this.#r,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#o=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:i};return r(e),e})();this.options.behavior?.onFetch(a,this),this.#t=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta}),this.#i=ve({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof _e&&e.revert&&this.setState({...this.#t,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#i.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#n.config.onSuccess?.(e,this),this.#n.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof _e){if(e.silent)return this.#i.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#n.config.onError?.(e,this),this.#n.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#c(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...xe(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...Se(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}})(this.state),pe.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#n.notify({query:this,type:`updated`,action:e})})}};function xe(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ge(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function Se(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Ce(e){let 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 we=class extends S{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=ue(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Ee(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return De(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return De(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let 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 N(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!V(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Oe(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||N(this.options.enabled,this.#t)!==N(t.enabled,this.#t)||M(this.options.staleTime,this.#t)!==M(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||N(this.options.enabled,this.#t)!==N(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Ae(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let 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.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(O)),t}#g(){this.#b();let e=M(this.options.staleTime,this.#t);if(le.isServer()||this.#r.isStale||!A(e))return;let t=j(this.#r.dataUpdatedAt,e)+1;this.#d=T.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(le.isServer()||N(this.options.enabled,this.#t)===!1||!A(this.#p)||this.#p===0)&&(this.#f=T.setInterval(()=>{(this.options.refetchIntervalInBackground||C.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d&&=(T.clearTimeout(this.#d),void 0)}#x(){this.#f&&=(T.clearInterval(this.#f),void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&Ee(e,t),o=i&&Oe(e,n,t,r);(a||o)&&(l={...l,...xe(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=ne(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=ne(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0,x={status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:ke(e,t),refetch:this.refetch,promise:this.#o,isEnabled:N(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=x.data!==void 0,r=x.status===`error`&&!t,i=e=>{r?e.reject(x.error):t&&e.resolve(x.data)},a=()=>{i(this.#o=x.promise=ue())},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||x.data!==o.value)&&a();break;case`rejected`:(!r||x.error!==o.reason)&&a();break}}return x}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!V(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){pe.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function Te(e,t){return N(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&t.retryOnMount===!1)}function Ee(e,t){return Te(e,t)||e.state.data!==void 0&&De(e,t,t.refetchOnMount)}function De(e,t,n){if(N(t.enabled,e)!==!1&&M(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&ke(e,t)}return!1}function Oe(e,t,n,r){return(e!==t||N(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&ke(e,n)}function ke(e,t){return N(t.enabled,e)!==!1&&e.isStaleByTime(M(t.staleTime,e))}function Ae(e,t){return!V(e.getCurrentResult(),t)}function je(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{ce(e,()=>t.signal,()=>n=!0)},u=oe(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject();if(r==null&&e.pages.length)return Promise.resolve(e);let a=await u((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})()),{maxPages:o}=t.options,s=i?ie:re;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?Ne:Me,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:Me(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function Me(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Ne(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Pe=class extends ye{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Fe(),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.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=ve({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,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{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}})(this.state),pe.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function Fe(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Ie=class extends S{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new Pe({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=Le(e);if(typeof t==`string`){let 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)){let t=Le(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=Le(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=Le(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){pe.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){let t={exact:!0,...e};return this.getAll().find(e=>F(t,e))}findAll(e={}){return this.getAll().filter(t=>F(e,t))}notify(e){pe.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return pe.batch(()=>Promise.all(e.map(e=>e.continue().catch(O))))}};function Le(e){return e.options.scope?.id}var Re=class extends S{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),V(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&L(t.mutationKey)!==L(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??Fe();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){pe.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},ze=class extends S{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??I(r,t),a=this.get(i);return a||(a=new be({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){pe.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>P(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>P(e,t)):t}notify(e){pe.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){pe.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){pe.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Be=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new ze,this.#t=e.mutationCache||new Ie,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=C.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=me.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=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){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let 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(M(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=k(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return pe.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;pe.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return pe.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=pe.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(O).catch(O)}invalidateQueries(e,t={}){return pe.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=pe.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(O)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(O)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(M(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(O).catch(O)}fetchInfiniteQuery(e){return e.behavior=je(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(O).catch(O)}ensureInfiniteQueryData(e){return e.behavior=je(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return me.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.#r.set(L(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{R(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(L(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{R(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=I(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===ae&&(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()}},Ve=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),W=s(((e,t)=>{t.exports=Ve()}))(),He=b.createContext(void 0),Ue=e=>{let t=b.useContext(He);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},We=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,W.jsx)(He.Provider,{value:e,children:t})),Ge=b.createContext(!1),Ke=()=>b.useContext(Ge);Ge.Provider;function qe(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Je=b.createContext(qe()),Ye=()=>b.useContext(Je),Xe=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?se(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},Ze=e=>{b.useEffect(()=>{e.clearReset()},[e])},Qe=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||se(n,[e.error,r])),$e=(e,t)=>t.state.data===void 0,et=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},tt=(e,t)=>e.isLoading&&e.isFetching&&!t,nt=(e,t)=>e?.suspense&&t.isPending,rt=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function it(e,t,n){let r=Ke(),i=Ye(),a=Ue(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash);o._optimisticResults=r?`isRestoring`:`optimistic`,et(o),Xe(o,i,s),Ze(i);let c=!a.getQueryCache().get(o.queryHash),[l]=b.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&e.subscribed!==!1;if(b.useSyncExternalStore(b.useCallback(e=>{let t=d?l.subscribe(pe.batchCalls(e)):O;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),b.useEffect(()=>{l.setOptions(o)},[o,l]),nt(o,u))throw rt(o,l,i);if(Qe({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,u),o.experimental_prefetchInRender&&!le.isServer()&&tt(u,r)&&(c?rt(o,l,i):s?.promise)?.catch(O).finally(()=>{l.updateResult()}),o.notifyOnChangeProps?u:l.trackResult(u)}function at(e,t){return it({...e,enabled:!0,suspense:!0,throwOnError:$e,placeholderData:void 0},we,t)}function ot(e,t){let n=Ue(t),[r]=b.useState(()=>new Re(n,e));b.useEffect(()=>{r.setOptions(e)},[r,e]);let i=b.useSyncExternalStore(b.useCallback(e=>r.subscribe(pe.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=b.useCallback((e,t)=>{r.mutate(e,t).catch(O)},[r]);if(i.error&&se(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var st=dt();function ct(e,...t){if(!st)return;let n=ut(e,...t);performance.mark(n);try{console.log(e,...t)}catch{console.log(n)}}function lt(e,...t){st&&console.warn(e,...t)}function ut(e,...t){return e.replace(/%[sfdO]/g,e=>{let n=t.shift();return e===`%O`&&n?JSON.stringify(n).replace(/"([^"]+)":/g,`$1:`):String(n)})}function dt(){if(typeof window>`u`)return({}.DEBUG||``).includes(`nuqs`);try{let e=`nuqs-localStorage-test`;if(typeof localStorage>`u`)return!1;localStorage.setItem(e,e);let t=localStorage.getItem(e)===e;return localStorage.removeItem(e),t&&(localStorage.getItem(`debug`)||``).includes(`nuqs`)}catch{return!1}}var ft={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 pt(e){return`[nuqs] ${ft[e]}
|
|
10
|
+
See https://nuqs.dev/NUQS-${e}`}function mt(e){if(e.size===0)return``;let t=[];for(let[n,r]of e.entries()){let e=n.replace(/#/g,`%23`).replace(/&/g,`%26`).replace(/\+/g,`%2B`).replace(/=/g,`%3D`).replace(/\?/g,`%3F`);t.push(`${e}=${ht(r)}`)}return`?`+t.join(`&`)}function ht(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,e=>encodeURIComponent(e))}var gt=(0,b.createContext)({useAdapter(){throw Error(pt(404))}});gt.displayName=`NuqsAdapterContext`,st&&typeof window<`u`&&(window.__NuqsAdapterContext&&window.__NuqsAdapterContext!==gt&&console.error(pt(303)),window.__NuqsAdapterContext=gt);function _t(e){return({children:t,defaultOptions:n,processUrlSearchParams:r,...i})=>(0,b.createElement)(gt.Provider,{...i,value:{useAdapter:e,defaultOptions:n,processUrlSearchParams:r}},t)}function vt(e){let t=(0,b.useContext)(gt);if(!(`useAdapter`in t))throw Error(pt(404));return t.useAdapter(e)}var yt=()=>(0,b.useContext)(gt).defaultOptions,bt=()=>(0,b.useContext)(gt).processUrlSearchParams;function xt(){if(typeof window>`u`||!window.GestureEvent)return 50;try{let e=navigator.userAgent?.match(/version\/([\d\.]+) safari/i);return parseFloat(e[1])>=17?120:320}catch{return 320}}function St(e){return{method:`throttle`,timeMs:e}}var Ct=St(xt());function wt(e){return e===null||Array.isArray(e)&&e.length===0}function Tt(e,t,n){if(typeof e==`string`)n.set(t,e);else{n.delete(t);for(let r of e)n.append(t,r);n.has(t)||n.set(t,``)}return n}function Et(){let e=new Map;return{on(t,n){let r=e.get(t)||[];return r.push(n),e.set(t,r),()=>this.off(t,n)},off(t,n){let r=e.get(t);r&&e.set(t,r.filter(e=>e!==n))},emit(t,n){e.get(t)?.forEach(e=>e(n))}}}function Dt(e,t,n){function r(){e(),n.removeEventListener(`abort`,a)}let i=setTimeout(r,t);function a(){clearTimeout(i),n.removeEventListener(`abort`,a)}n.addEventListener(`abort`,a)}function Ot(){let e=Promise;if(Promise.hasOwnProperty(`withResolvers`))return Promise.withResolvers();let t=()=>{},n=()=>{};return{promise:new e((e,r)=>{t=e,n=r}),resolve:t,reject:n}}function kt(e,t){let n=t;for(let t=e.length-1;t>=0;t--){let r=e[t];if(!r)continue;let i=n;n=()=>r(i)}n()}function At(){return new URLSearchParams(location.search)}var jt=class{updateMap=new Map;options={history:`replace`,scroll:!1,shallow:!0};timeMs=Ct.timeMs;transitions=new Set;resolvers=null;controller=null;lastFlushedAt=0;resetQueueOnNextPush=!1;push({key:e,query:t,options:n},r=Ct.timeMs){this.resetQueueOnNextPush&&=(this.reset(),!1),ct(`[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=At}){return this.resolvers?.promise??Promise.resolve(e())}flush({getSearchParamsSnapshot:e=At,rateLimitFactor:t=1,...n},r){if(this.controller??=new AbortController,!Number.isFinite(this.timeMs))return ct(`[nuqs gtq] Skipping flush due to throttleMs=Infinity`),Promise.resolve(e());if(this.resolvers)return this.resolvers.promise;this.resolvers=Ot();let i=()=>{this.lastFlushedAt=performance.now();let[t,i]=this.applyPendingUpdates({...n,autoResetQueueOnUpdate:n.autoResetQueueOnUpdate??!0,getSearchParamsSnapshot:e},r);i===null?(this.resolvers.resolve(t),this.resetQueueOnNextPush=!0):this.resolvers.reject(t),this.resolvers=null};return Dt(()=>{let e=performance.now()-this.lastFlushedAt,n=this.timeMs,r=t*Math.max(0,n-e);ct(`[nuqs gtq] Scheduling flush in %f ms. Throttled at %f ms (x%f)`,r,n,t),r===0?i():Dt(i,r,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(){let e=Array.from(this.updateMap.keys());return ct(`[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=Ct.timeMs,e}applyPendingUpdates(e,t){let{updateUrl:n,getSearchParamsSnapshot:r}=e,i=r();if(ct(`[nuqs gtq] Applying %d pending update(s) on top of %s`,this.updateMap.size,i.toString()),this.updateMap.size===0)return[i,null];let a=Array.from(this.updateMap.entries()),o={...this.options},s=Array.from(this.transitions);e.autoResetQueueOnUpdate&&this.reset(),ct(`[nuqs gtq] Flushing queue %O with options %O`,a,o);for(let[e,t]of a)t===null?i.delete(e):i=Tt(t,e,i);t&&(i=t(i));try{return kt(s,()=>{n(i,o)}),[i,null]}catch(e){return console.error(pt(429),a.map(([e])=>e).join(),e),[i,e]}}},Mt=new jt;function Nt(e,t,n){let r=(0,b.useCallback)(()=>{let t=Object.fromEntries(e.map(e=>[e,n(e)]));return[JSON.stringify(t),t]},[e.join(`,`),n]),i=(0,b.useRef)(null);return i.current===null&&(i.current=r()),(0,b.useSyncExternalStore)((0,b.useCallback)(n=>{let r=e.map(e=>t(e,n));return()=>r.forEach(e=>e())},[e.join(`,`),t]),()=>{let[e,t]=r();return i.current[0]===e?i.current[1]:(i.current=[e,t],t)},()=>i.current[1])}var Pt=class{callback;resolvers=Ot();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,Dt(()=>{let t=this.resolvers;try{ct(`[nuqs dq] Flushing debounce queue`,e);let n=this.callback(e);ct(`[nuqs dq] Reset debounce queue %O`,this.queuedValue),this.queuedValue=void 0,this.resolvers=Ot(),n.then(e=>t.resolve(e)).catch(e=>t.reject(e))}catch(e){this.queuedValue=void 0,t.reject(e)}},t,this.controller.signal),this.resolvers.promise}},Ft=new class{throttleQueue;queues=new Map;queuedQuerySync=Et();constructor(e=new jt){this.throttleQueue=e}useQueuedQueries(e){return Nt(e,(e,t)=>this.queuedQuerySync.on(e,t),e=>this.getQueuedQuery(e))}push(e,t,n,r){if(!Number.isFinite(t)){let e=n.getSearchParamsSnapshot??At;return Promise.resolve(e())}let i=e.key;if(!this.queues.has(i)){ct("[nuqs dqc] Creating debounce queue for `%s`",i);let e=new Pt(e=>(this.throttleQueue.push(e),this.throttleQueue.flush(n,r).finally(()=>{this.queues.get(e.key)?.queuedValue===void 0&&(ct("[nuqs dqc] Cleaning up empty queue for `%s`",e.key),this.queues.delete(e.key)),this.queuedQuerySync.emit(e.key)})));this.queues.set(i,e)}ct(`[nuqs dqc] Enqueueing debounce update %O`,e);let a=this.queues.get(i).push(e,t);return this.queuedQuerySync.emit(i),a}abort(e){let t=this.queues.get(e);return t?(ct(`[nuqs dqc] Aborting debounce queue %s=%s`,e,t.queuedValue?.query),this.queues.delete(e),t.abort(),this.queuedQuerySync.emit(e),e=>(e.then(t.resolvers.resolve,t.resolvers.reject),e)):e=>e}abortAll(){for(let[e,t]of this.queues.entries())ct(`[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){let t=this.queues.get(e)?.queuedValue?.query;return t===void 0?this.throttleQueue.getQueuedQuery(e):t}}(Mt);function It(e,t){return e===t?!0:e===null||t===null||typeof e==`string`||typeof t==`string`||e.length!==t.length?!1:e.every((e,n)=>e===t[n])}function Lt(e,t,n){return r=>{if(!(t.length===0||t.some(t=>!It(r.getAll(t),e.getAll(t)))))return ct("[nuqs `%s`] no change, returning previous",t.join(`,`),r),r;let i=Rt(e,t,n);return ct(`[nuqs \`%s\`] subbed search params change
|
|
11
|
+
from %O
|
|
12
|
+
to %O`,t.join(`,`),r,i),i}}function Rt(e,t,n){if(t.length===0)return e;let r=n?new URLSearchParams(e):e;for(let n of e.keys())t.includes(n)||r.delete(n);return r}var zt=`__nuqs__`,Bt=Et();function Vt(e){return function(t,n){let r=new URL(location.href);r.search=mt(t),ct(`[nuqs react] Updating url: %s`,r),e&&n.shallow===!1?(n.history===`push`?location.assign:location.replace).call(location,r):(n.history===`push`?history.pushState:history.replaceState).call(history,history.state,zt,r),Bt.emit(`update`,t),n.scroll===!0&&window.scrollTo({top:0})}}var Ht=(0,b.createContext)({fullPageNavigationOnShallowFalseUpdates:!1});function Ut(e){let{fullPageNavigationOnShallowFalseUpdates:t}=(0,b.useContext)(Ht),[n,r]=(0,b.useState)(()=>typeof location>`u`?new URLSearchParams:Rt(new URLSearchParams(location.search),e,!1));return(0,b.useEffect)(()=>{let t=()=>{r(Lt(new URLSearchParams(location.search),e,!1))},n=t=>{r(Lt(t,e,!0))};return Bt.on(`update`,n),window.addEventListener(`popstate`,t),()=>{Bt.off(`update`,n),window.removeEventListener(`popstate`,t)}},[e.join(`&`)]),{searchParams:n,updateUrl:(0,b.useMemo)(()=>Vt(t),[t])}}var Wt=_t(Ut);function Gt({children:e,fullPageNavigationOnShallowFalseUpdates:t=!1,...n}){return(0,b.createElement)(Ht.Provider,{value:{fullPageNavigationOnShallowFalseUpdates:t}},(0,b.createElement)(Wt,{...n,children:e}))}function Kt(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=Kt(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function qt(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Kt(e))&&(r&&(r+=` `),r+=t);return r}var Jt=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Yt=(e,t)=>({classGroupId:e,validator:t}),Xt=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Zt=`-`,Qt=[],$t=`arbitrary..`,en=e=>{let t=rn(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return nn(e);let n=e.split(Zt);return tn(n,n[0]===``&&n.length>1?1:0,t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?Jt(i,t):t:i||Qt}return n[e]||Qt}}},tn=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=tn(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(Zt):e.slice(t).join(Zt),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},nn=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?$t+r:void 0})(),rn=e=>{let{theme:t,classGroups:n}=e;return an(n,t)},an=(e,t)=>{let n=Xt();for(let r in e){let i=e[r];on(i,n,r,t)}return n},on=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];sn(i,t,n,r)}},sn=(e,t,n,r)=>{if(typeof e==`string`){G(e,t,n);return}if(typeof e==`function`){cn(e,t,n,r);return}ln(e,t,n,r)},G=(e,t,n)=>{let r=e===``?t:un(t,e);r.classGroupId=n},cn=(e,t,n,r)=>{if(dn(e)){on(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Yt(n,e))},ln=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];on(o,un(t,a),n,r)}},un=(e,t)=>{let n=e,r=t.split(Zt),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=Xt(),n.nextPart.set(t,i)),n=i}return n},dn=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,fn=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},pn=`!`,mn=`:`,hn=[],gn=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),_n=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===mn){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(pn)?(c=s.slice(0,-1),l=!0):s.startsWith(pn)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return gn(t,l,c,u)};if(t){let e=t+mn,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):gn(hn,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},vn=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},yn=e=>({cache:fn(e.cacheSize),parseClassName:_n(e),sortModifiers:vn(e),...en(e)}),bn=/\s+/,xn=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(bn),c=``;for(let e=s.length-1;e>=0;--e){let t=s[e],{isExternal:l,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(l){c=t+(c.length>0?` `+c:c);continue}let m=!!p,h=r(m?f.substring(0,p):f);if(!h){if(!m){c=t+(c.length>0?` `+c:c);continue}if(h=r(f),!h){c=t+(c.length>0?` `+c:c);continue}m=!1}let g=u.length===0?``:u.length===1?u[0]:a(u).join(`:`),_=d?g+pn:g,v=_+h;if(o.indexOf(v)>-1)continue;o.push(v);let y=i(h,m);for(let e=0;e<y.length;++e){let t=y[e];o.push(_+t)}c=t+(c.length>0?` `+c:c)}return c},Sn=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Cn(n))&&(i&&(i+=` `),i+=r);return i},Cn=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Cn(e[r]))&&(n&&(n+=` `),n+=t);return n},wn=(e,...t)=>{let n,r,i,a,o=o=>(n=yn(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=xn(e,n);return i(e,a),a};return a=o,(...e)=>a(Sn(...e))},Tn=[],En=e=>{let t=t=>t[e]||Tn;return t.isThemeGetter=!0,t},Dn=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,On=/^\((?:(\w[\w-]*):)?(.+)\)$/i,kn=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,An=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,jn=/\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$/,Mn=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Nn=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Pn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Fn=e=>kn.test(e),In=e=>!!e&&!Number.isNaN(Number(e)),Ln=e=>!!e&&Number.isInteger(Number(e)),Rn=e=>e.endsWith(`%`)&&In(e.slice(0,-1)),zn=e=>An.test(e),Bn=()=>!0,Vn=e=>jn.test(e)&&!Mn.test(e),Hn=()=>!1,Un=e=>Nn.test(e),Wn=e=>Pn.test(e),Gn=e=>!K(e)&&!er(e),Kn=e=>cr(e,fr,Hn),K=e=>Dn.test(e),qn=e=>cr(e,pr,Vn),Jn=e=>cr(e,mr,In),Yn=e=>cr(e,gr,Bn),Xn=e=>cr(e,hr,Hn),Zn=e=>cr(e,ur,Hn),Qn=e=>cr(e,dr,Wn),$n=e=>cr(e,_r,Un),er=e=>On.test(e),tr=e=>lr(e,pr),nr=e=>lr(e,hr),rr=e=>lr(e,ur),ir=e=>lr(e,fr),ar=e=>lr(e,dr),or=e=>lr(e,_r,!0),sr=e=>lr(e,gr,!0),cr=(e,t,n)=>{let r=Dn.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},lr=(e,t,n=!1)=>{let r=On.exec(e);return r?r[1]?t(r[1]):n:!1},ur=e=>e===`position`||e===`percentage`,dr=e=>e===`image`||e===`url`,fr=e=>e===`length`||e===`size`||e===`bg-size`,pr=e=>e===`length`,mr=e=>e===`number`,hr=e=>e===`family-name`,gr=e=>e===`number`||e===`weight`,_r=e=>e===`shadow`,vr=wn(()=>{let e=En(`color`),t=En(`font`),n=En(`text`),r=En(`font-weight`),i=En(`tracking`),a=En(`leading`),o=En(`breakpoint`),s=En(`container`),c=En(`spacing`),l=En(`radius`),u=En(`shadow`),d=En(`inset-shadow`),f=En(`text-shadow`),p=En(`drop-shadow`),m=En(`blur`),h=En(`perspective`),g=En(`aspect`),_=En(`ease`),v=En(`animate`),y=()=>[`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`],x=()=>[...b(),er,K],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[er,K,c],T=()=>[Fn,`full`,`auto`,...w()],E=()=>[Ln,`none`,`subgrid`,er,K],D=()=>[`auto`,{span:[`full`,Ln,er,K]},Ln,er,K],O=()=>[Ln,`auto`,er,K],k=()=>[`auto`,`min`,`max`,`fr`,er,K],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[Fn,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[Fn,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],F=()=>[Fn,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],I=()=>[e,er,K],L=()=>[...b(),rr,Zn,{position:[er,K]}],R=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],z=()=>[`auto`,`cover`,`contain`,ir,Kn,{size:[er,K]}],B=()=>[Rn,tr,qn],V=()=>[``,`none`,`full`,l,er,K],ee=()=>[``,In,tr,qn],H=()=>[`solid`,`dashed`,`dotted`,`double`],te=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],U=()=>[In,Rn,rr,Zn],ne=()=>[``,`none`,m,er,K],re=()=>[`none`,In,er,K],ie=()=>[`none`,In,er,K],ae=()=>[In,er,K],oe=()=>[Fn,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[zn],breakpoint:[zn],color:[Bn],container:[zn],"drop-shadow":[zn],ease:[`in`,`out`,`in-out`],font:[Gn],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[zn],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[zn],shadow:[zn],spacing:[`px`,In],text:[zn],"text-shadow":[zn],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Fn,K,er,g]}],container:[`container`],columns:[{columns:[In,K,er,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[Ln,`auto`,er,K]}],basis:[{basis:[Fn,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[In,Fn,`auto`,`initial`,`none`,K]}],grow:[{grow:[``,In,er,K]}],shrink:[{shrink:[``,In,er,K]}],order:[{order:[Ln,`first`,`last`,`none`,er,K]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...P()]}],"min-inline-size":[{"min-inline":[`auto`,...P()]}],"max-inline-size":[{"max-inline":[`none`,...P()]}],"block-size":[{block:[`auto`,...F()]}],"min-block-size":[{"min-block":[`auto`,...F()]}],"max-block-size":[{"max-block":[`none`,...F()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,...N()]}],"font-size":[{text:[`base`,n,tr,qn]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,sr,Yn]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Rn,K]}],"font-family":[{font:[nr,Xn,t]}],"font-features":[{"font-features":[K]}],"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,er,K]}],"line-clamp":[{"line-clamp":[In,`none`,er,Jn]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,er,K]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,er,K]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...H(),`wavy`]}],"text-decoration-thickness":[{decoration:[In,`from-font`,`auto`,er,qn]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[In,`auto`,er,K]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,er,K]}],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`,er,K]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:R()}],"bg-size":[{bg:z()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Ln,er,K],radial:[``,er,K],conic:[Ln,er,K]},ar,Qn]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:B()}],"gradient-via-pos":[{via:B()}],"gradient-to-pos":[{to:B()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:V()}],"rounded-s":[{"rounded-s":V()}],"rounded-e":[{"rounded-e":V()}],"rounded-t":[{"rounded-t":V()}],"rounded-r":[{"rounded-r":V()}],"rounded-b":[{"rounded-b":V()}],"rounded-l":[{"rounded-l":V()}],"rounded-ss":[{"rounded-ss":V()}],"rounded-se":[{"rounded-se":V()}],"rounded-ee":[{"rounded-ee":V()}],"rounded-es":[{"rounded-es":V()}],"rounded-tl":[{"rounded-tl":V()}],"rounded-tr":[{"rounded-tr":V()}],"rounded-br":[{"rounded-br":V()}],"rounded-bl":[{"rounded-bl":V()}],"border-w":[{border:ee()}],"border-w-x":[{"border-x":ee()}],"border-w-y":[{"border-y":ee()}],"border-w-s":[{"border-s":ee()}],"border-w-e":[{"border-e":ee()}],"border-w-bs":[{"border-bs":ee()}],"border-w-be":[{"border-be":ee()}],"border-w-t":[{"border-t":ee()}],"border-w-r":[{"border-r":ee()}],"border-w-b":[{"border-b":ee()}],"border-w-l":[{"border-l":ee()}],"divide-x":[{"divide-x":ee()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":ee()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...H(),`hidden`,`none`]}],"divide-style":[{divide:[...H(),`hidden`,`none`]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...H(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[In,er,K]}],"outline-w":[{outline:[``,In,tr,qn]}],"outline-color":[{outline:I()}],shadow:[{shadow:[``,`none`,u,or,$n]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":[`none`,d,or,$n]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:ee()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[In,qn]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":ee()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":[`none`,f,or,$n]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[In,er,K]}],"mix-blend":[{"mix-blend":[...te(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":te()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[In]}],"mask-image-linear-from-pos":[{"mask-linear-from":U()}],"mask-image-linear-to-pos":[{"mask-linear-to":U()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":U()}],"mask-image-t-to-pos":[{"mask-t-to":U()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":U()}],"mask-image-r-to-pos":[{"mask-r-to":U()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":U()}],"mask-image-b-to-pos":[{"mask-b-to":U()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":U()}],"mask-image-l-to-pos":[{"mask-l-to":U()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":U()}],"mask-image-x-to-pos":[{"mask-x-to":U()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":U()}],"mask-image-y-to-pos":[{"mask-y-to":U()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[er,K]}],"mask-image-radial-from-pos":[{"mask-radial-from":U()}],"mask-image-radial-to-pos":[{"mask-radial-to":U()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"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":[In]}],"mask-image-conic-from-pos":[{"mask-conic-from":U()}],"mask-image-conic-to-pos":[{"mask-conic-to":U()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:R()}],"mask-size":[{mask:z()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,er,K]}],filter:[{filter:[``,`none`,er,K]}],blur:[{blur:ne()}],brightness:[{brightness:[In,er,K]}],contrast:[{contrast:[In,er,K]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,or,$n]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:[``,In,er,K]}],"hue-rotate":[{"hue-rotate":[In,er,K]}],invert:[{invert:[``,In,er,K]}],saturate:[{saturate:[In,er,K]}],sepia:[{sepia:[``,In,er,K]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,er,K]}],"backdrop-blur":[{"backdrop-blur":ne()}],"backdrop-brightness":[{"backdrop-brightness":[In,er,K]}],"backdrop-contrast":[{"backdrop-contrast":[In,er,K]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,In,er,K]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[In,er,K]}],"backdrop-invert":[{"backdrop-invert":[``,In,er,K]}],"backdrop-opacity":[{"backdrop-opacity":[In,er,K]}],"backdrop-saturate":[{"backdrop-saturate":[In,er,K]}],"backdrop-sepia":[{"backdrop-sepia":[``,In,er,K]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,er,K]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[In,`initial`,er,K]}],ease:[{ease:[`linear`,`initial`,_,er,K]}],delay:[{delay:[In,er,K]}],animate:[{animate:[`none`,v,er,K]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,er,K]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:re()}],"rotate-x":[{"rotate-x":re()}],"rotate-y":[{"rotate-y":re()}],"rotate-z":[{"rotate-z":re()}],scale:[{scale:ie()}],"scale-x":[{"scale-x":ie()}],"scale-y":[{"scale-y":ie()}],"scale-z":[{"scale-z":ie()}],"scale-3d":[`scale-3d`],skew:[{skew:ae()}],"skew-x":[{"skew-x":ae()}],"skew-y":[{"skew-y":ae()}],transform:[{transform:[er,K,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:oe()}],"translate-x":[{"translate-x":oe()}],"translate-y":[{"translate-y":oe()}],"translate-z":[{"translate-z":oe()}],"translate-none":[`translate-none`],accent:[{accent:I()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:I()}],"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`,er,K]}],"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":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"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`,er,K]}],fill:[{fill:[`none`,...I()]}],"stroke-w":[{stroke:[In,tr,qn,Jn]}],stroke:[{stroke:[`none`,...I()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`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`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`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-bs`,`border-w-be`,`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-bs`,`border-color-be`,`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-mbs`,`scroll-mbe`,`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-pbs`,`scroll-pbe`,`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`]}});function yr(...e){return vr(qt(e))}var br=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),xr=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Sr=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Cr=e=>{let t=Sr(e);return t.charAt(0).toUpperCase()+t.slice(1)},wr={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`},Tr=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Er=(0,b.createContext)({}),Dr=()=>(0,b.useContext)(Er),Or=(0,b.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=Dr()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,b.createElement)(`svg`,{ref:c,...wr,width:t??l??wr.width,height:t??l??wr.height,stroke:e??f,strokeWidth:m,className:br(`lucide`,p,i),...!a&&!Tr(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,b.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),kr=(e,t)=>{let n=(0,b.forwardRef)(({className:n,...r},i)=>(0,b.createElement)(Or,{ref:i,iconNode:t,className:br(`lucide-${xr(Cr(e))}`,`lucide-${e}`,n),...r}));return n.displayName=Cr(e),n},Ar=kr(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),jr=kr(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),Mr=kr(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),Nr=kr(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]),Pr=kr(`circle-alert`,[[`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`}]]),Fr=kr(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),Ir=kr(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),Lr=kr(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),Rr=kr(`moon`,[[`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`}]]),zr=kr(`play`,[[`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`}]]),Br=kr(`plug-zap`,[[`path`,{d:`M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z`,key:`goz73y`}],[`path`,{d:`m2 22 3-3`,key:`19mgm9`}],[`path`,{d:`M7.5 13.5 10 11`,key:`7xgeeb`}],[`path`,{d:`M10.5 16.5 13 14`,key:`10btkg`}],[`path`,{d:`m18 3-4 4h6l-4 4`,key:`16psg9`}]]),Vr=kr(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),Hr=kr(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),Ur=kr(`trash`,[[`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`}]]),Wr=kr(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Gr=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Kr=qt,qr=(e,t)=>n=>{if(t?.variants==null)return Kr(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Gr(t)||Gr(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return Kr(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)};function Jr(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Yr(...e){return t=>{let n=!1,r=e.map(e=>{let r=Jr(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Jr(e[t],null)}}}}function Xr(...e){return b.useCallback(Yr(...e),e)}var Zr=Symbol.for(`react.lazy`),Qr=b.use;function $r(e){return typeof e==`object`&&!!e&&`then`in e}function ei(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Zr&&`_payload`in e&&$r(e._payload)}function ti(e){let t=ri(e),n=b.forwardRef((e,n)=>{let{children:r,...i}=e;ei(r)&&typeof Qr==`function`&&(r=Qr(r._payload));let a=b.Children.toArray(r),o=a.find(si);if(o){let e=o.props.children,r=a.map(t=>t===o?b.Children.count(e)>1?b.Children.only(null):b.isValidElement(e)?e.props.children:null:t);return(0,W.jsx)(t,{...i,ref:n,children:b.isValidElement(e)?b.cloneElement(e,void 0,r):null})}return(0,W.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var ni=ti(`Slot`);function ri(e){let t=b.forwardRef((e,t)=>{let{children:n,...r}=e;if(ei(n)&&typeof Qr==`function`&&(n=Qr(n._payload)),b.isValidElement(n)){let e=li(n),i=ci(r,n.props);return n.type!==b.Fragment&&(i.ref=t?Yr(t,e):e),b.cloneElement(n,i)}return b.Children.count(n)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ii=Symbol(`radix.slottable`);function ai(e){let t=({children:e})=>(0,W.jsx)(W.Fragment,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=ii,t}var oi=ai(`Slottable`);function si(e){return b.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===ii}function ci(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function li(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 ui=qr([`inline-flex items-center justify-center gap-1 whitespace-nowrap`,`h-8 px-2 rounded-md`,`font-medium`,`transition-colors`,`outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background`,`[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0`,`disabled:pointer-events-none disabled:opacity-50`].join(` `),{variants:{variant:{primary:[`bg-primary text-primary-foreground`,`[@media(hover:hover)]:hover:bg-primary-hover`].join(` `),secondary:[`border border-border bg-background text-muted-foreground`,`[@media(hover:hover)]:hover:bg-background-hover [@media(hover:hover)]:hover:text-muted-foreground-hover`].join(` `),tertiary:[`text-muted-foreground`,`[@media(hover:hover)]:hover:bg-background-hover [@media(hover:hover)]:hover:text-muted-foreground-hover`,`focus-visible:bg-background`].join(` `),link:[`h-auto px-0 rounded-xs underline-offset-4`,`text-link`,`[@media(hover:hover)]:hover:underline`,`focus-visible:bg-background`].join(` `),"link-muted":[`h-auto px-0 rounded-xs underline-offset-4`,`text-link-muted`,`[@media(hover:hover)]:hover:underline`,`focus-visible:bg-background`].join(` `),destructive:[`bg-destructive text-destructive-foreground`,`[@media(hover:hover)]:hover:bg-destructive-hover`].join(` `),cta:[`button-cta`,`h-9 px-4 gap-2 rounded-md`,`dark:bg-inverted text-foreground`,`transition-[transform,filter] duration-300 ease-out`,`active:scale-[0.99]`].join(` `)},size:{default:`type-text-sm`,icon:`size-8 p-0 type-text-sm`,"icon-rounded":`size-8 p-0 rounded-full type-text-sm`,pill:`h-7 px-3 rounded-full type-text-xs`}},defaultVariants:{variant:`primary`,size:`default`}});function di({className:e,variant:t,size:n,type:r=`button`,asChild:i=!1,loading:a=!1,icon:o,iconTrailing:s,disabled:c,children:l,...u}){return(0,W.jsxs)(i?ni:`button`,{"data-slot":`button`,className:yr(ui({variant:t,size:n}),e),type:r,disabled:c||a,"aria-busy":a||void 0,...u,children:[a?(0,W.jsx)(Ir,{className:`motion-safe:animate-spin`}):o,i?(0,W.jsx)(oi,{children:l}):l,!a&&s?(0,W.jsx)(`span`,{"data-cta-icon-trailing":!0,children:s}):null]})}var fi=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},pi=(e=>e?fi(e):fi),mi=e=>e;function hi(e,t=mi){let n=b.useSyncExternalStore(e.subscribe,b.useCallback(()=>t(e.getState()),[e,t]),b.useCallback(()=>t(e.getInitialState()),[e,t]));return b.useDebugValue(n),n}var gi=e=>{let t=pi(e),n=e=>hi(t,e);return Object.assign(n,t),n},_i=(e=>e?gi(e):gi),vi=_i()(e=>({status:`idle`,requiresAuth:!1,error:null,setStatus:t=>e({status:t}),setRequiresAuth:t=>e({requiresAuth:t}),setError:t=>e({error:t}),reset:()=>e({status:`idle`,requiresAuth:!1,error:null})})),yi=globalThis.crypto;async function bi(e){return(await yi).getRandomValues(new Uint8Array(e))}async function xi(e){let t=``;for(;t.length<e;){let n=await bi(e-t.length);for(let e of n)e<198&&(t+=`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~`[e%66])}return t}async function Si(e){return await xi(e)}async function Ci(e){let t=await(await yi).subtle.digest(`SHA-256`,new TextEncoder().encode(e));return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/\//g,`_`).replace(/\+/g,`-`).replace(/=/g,``)}async function wi(e){if(e||=43,e<43||e>128)throw`Expected a length between 43 and 128. Received ${e}.`;let t=await Si(e);return{code_verifier:t,code_challenge:await Ci(t)}}var Ti=Object.freeze({status:`aborted`});function q(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,`_zod`,{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,`name`,{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,`init`,{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,`name`,{value:e}),o}var Ei=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Di=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},Oi={};function ki(e){return e&&Object.assign(Oi,e),Oi}function Ai(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function ji(e,t){return typeof t==`bigint`?t.toString():t}function Mi(e){return{get value(){{let t=e();return Object.defineProperty(this,`value`,{value:t}),t}throw Error(`cached value already set`)}}}function Ni(e){return e==null}function Pi(e){let t=e.startsWith(`^`)?1:0,n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function Fi(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=t.toString(),i=(r.split(`.`)[1]||``).length;if(i===0&&/\d?e-\d?/.test(r)){let e=r.match(/\d?e-(\d?)/);e?.[1]&&(i=Number.parseInt(e[1]))}let a=n>i?n:i;return Number.parseInt(e.toFixed(a).replace(`.`,``))%Number.parseInt(t.toFixed(a).replace(`.`,``))/10**a}var Ii=Symbol(`evaluating`);function Li(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Ii)return r===void 0&&(r=Ii,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Ri(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function zi(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function Bi(e){return JSON.stringify(e)}function Vi(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var Hi=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Ui(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Wi=Mi(()=>{if(typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function Gi(e){if(Ui(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(Ui(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function Ki(e){return Gi(e)?{...e}:Array.isArray(e)?[...e]:e}var qi=new Set([`string`,`number`,`symbol`]);function Ji(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Yi(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Xi(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw 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 Zi(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var Qi={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function $i(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return Yi(e,zi(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return Ri(this,`shape`,e),e},checks:[]}))}function ea(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return Yi(e,zi(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return Ri(this,`shape`,r),r},checks:[]}))}function ta(e,t){if(!Gi(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Yi(e,zi(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Ri(this,`shape`,n),n}}))}function na(e,t){if(!Gi(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return Yi(e,zi(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Ri(this,`shape`,n),n}}))}function ra(e,t){return Yi(e,zi(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return Ri(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:[]}))}function ia(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return Yi(t,zi(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return Ri(this,`shape`,i),i},checks:[]}))}function aa(e,t,n){return Yi(t,zi(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return Ri(this,`shape`,i),i}}))}function oa(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 sa(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function ca(e){return typeof e==`string`?e:e?.message}function la(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=ca(e.inst?._zod.def?.error?.(e))??ca(t?.error?.(e))??ca(n.customError?.(e))??ca(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function ua(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function da(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var fa=(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,ji,2),Object.defineProperty(e,`toString`,{value:()=>e.message,enumerable:!1})},pa=q(`$ZodError`,fa),ma=q(`$ZodError`,fa,{Parent:Error});function ha(e,t=e=>e.message){let n={},r=[];for(let 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 ga(e,t=e=>e.message){let n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`&&i.errors.length)i.errors.map(e=>r({issues:e}));else if(i.code===`invalid_key`)r({issues:i.issues});else if(i.code===`invalid_element`)r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(e),n}var _a=e=>(t,n,r,i)=>{let a=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new Ei;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>la(e,a,ki())));throw Hi(t,i?.callee),t}return o.value},va=e=>async(t,n,r,i)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>la(e,a,ki())));throw Hi(t,i?.callee),t}return o.value},ya=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new Ei;return a.issues.length?{success:!1,error:new(e??pa)(a.issues.map(e=>la(e,i,ki())))}:{success:!0,data:a.value}},ba=ya(ma),xa=e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>la(e,i,ki())))}:{success:!0,data:a.value}},Sa=xa(ma),Ca=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return _a(e)(t,n,i)},wa=e=>(t,n,r)=>_a(e)(t,n,r),Ta=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return va(e)(t,n,i)},Ea=e=>async(t,n,r)=>va(e)(t,n,r),Da=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return ya(e)(t,n,i)},Oa=e=>(t,n,r)=>ya(e)(t,n,r),ka=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return xa(e)(t,n,i)},Aa=e=>async(t,n,r)=>xa(e)(t,n,r),ja=/^[cC][^\s-]{8,}$/,Ma=/^[0-9a-z]+$/,Na=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Pa=/^[0-9a-vA-V]{20}$/,Fa=/^[A-Za-z0-9]{27}$/,Ia=/^[a-zA-Z0-9_-]{21}$/,La=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Ra=/^([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})$/,za=e=>e?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)$/,Ba=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Va=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function Ha(){return new RegExp(Va,`u`)}var Ua=/^(?:(?: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])$/,Wa=/^(([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}|:))$/,Ga=/^((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])$/,Ka=/^(([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])$/,qa=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ja=/^[A-Za-z0-9_-]*$/,Ya=/^\+[1-9]\d{6,14}$/,Xa=`(?:(?:\\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])))`,Za=RegExp(`^${Xa}$`);function Qa(e){let 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 $a(e){return RegExp(`^${Qa(e)}$`)}function eo(e){let t=Qa({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${Xa}T(?:${r})$`)}var to=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},no=/^-?\d+$/,ro=/^-?\d+(?:\.\d+)?$/,io=/^(?:true|false)$/i,ao=/^null$/i,oo=/^undefined$/i,so=/^[^A-Z]*$/,co=/^[^a-z]*$/,lo=q(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),uo={number:`number`,bigint:`bigint`,object:`date`},fo=q(`$ZodCheckLessThan`,(e,t)=>{lo.init(e,t);let n=uo[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),po=q(`$ZodCheckGreaterThan`,(e,t)=>{lo.init(e,t);let n=uo[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),mo=q(`$ZodCheckMultipleOf`,(e,t)=>{lo.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):Fi(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})}}),ho=q(`$ZodCheckNumberFormat`,(e,t)=>{lo.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Qi[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=no)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),go=q(`$ZodCheckMaxLength`,(e,t)=>{var n;lo.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Ni(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=ua(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),_o=q(`$ZodCheckMinLength`,(e,t)=>{var n;lo.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Ni(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=ua(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),vo=q(`$ZodCheckLengthEquals`,(e,t)=>{var n;lo.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Ni(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=ua(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),yo=q(`$ZodCheckStringFormat`,(e,t)=>{var n,r;lo.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),bo=q(`$ZodCheckRegex`,(e,t)=>{yo.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})}}),xo=q(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=so,yo.init(e,t)}),So=q(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=co,yo.init(e,t)}),Co=q(`$ZodCheckIncludes`,(e,t)=>{lo.init(e,t);let n=Ji(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),wo=q(`$ZodCheckStartsWith`,(e,t)=>{lo.init(e,t);let n=RegExp(`^${Ji(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),To=q(`$ZodCheckEndsWith`,(e,t)=>{lo.init(e,t);let n=RegExp(`.*${Ji(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Eo=q(`$ZodCheckOverwrite`,(e,t)=>{lo.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Do=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
13
|
+
`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
|
|
14
|
+
`))}},Oo={major:4,minor:3,patch:6},ko=q(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Oo;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=oa(e),i;for(let a of t){if(a._zod.def.when){if(!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new Ei;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=oa(e,t))});else{if(e.issues.length===t)continue;r||=oa(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(oa(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new Ei;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new Ei;return o.then(e=>t(e,r,a))}return t(o,r,a)}}Li(e,`~standard`,()=>({validate:t=>{try{let n=ba(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return Sa(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),Ao=q(`$ZodString`,(e,t)=>{ko.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??to(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}}),jo=q(`$ZodStringFormat`,(e,t)=>{yo.init(e,t),Ao.init(e,t)}),Mo=q(`$ZodGUID`,(e,t)=>{t.pattern??=Ra,jo.init(e,t)}),No=q(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=za(e)}else t.pattern??=za();jo.init(e,t)}),Po=q(`$ZodEmail`,(e,t)=>{t.pattern??=Ba,jo.init(e,t)}),Fo=q(`$ZodURL`,(e,t)=>{jo.init(e,t),e._zod.check=n=>{try{let 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})}}}),Io=q(`$ZodEmoji`,(e,t)=>{t.pattern??=Ha(),jo.init(e,t)}),Lo=q(`$ZodNanoID`,(e,t)=>{t.pattern??=Ia,jo.init(e,t)}),Ro=q(`$ZodCUID`,(e,t)=>{t.pattern??=ja,jo.init(e,t)}),zo=q(`$ZodCUID2`,(e,t)=>{t.pattern??=Ma,jo.init(e,t)}),Bo=q(`$ZodULID`,(e,t)=>{t.pattern??=Na,jo.init(e,t)}),Vo=q(`$ZodXID`,(e,t)=>{t.pattern??=Pa,jo.init(e,t)}),Ho=q(`$ZodKSUID`,(e,t)=>{t.pattern??=Fa,jo.init(e,t)}),Uo=q(`$ZodISODateTime`,(e,t)=>{t.pattern??=eo(t),jo.init(e,t)}),Wo=q(`$ZodISODate`,(e,t)=>{t.pattern??=Za,jo.init(e,t)}),Go=q(`$ZodISOTime`,(e,t)=>{t.pattern??=$a(t),jo.init(e,t)}),Ko=q(`$ZodISODuration`,(e,t)=>{t.pattern??=La,jo.init(e,t)}),qo=q(`$ZodIPv4`,(e,t)=>{t.pattern??=Ua,jo.init(e,t),e._zod.bag.format=`ipv4`}),Jo=q(`$ZodIPv6`,(e,t)=>{t.pattern??=Wa,jo.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})}}}),Yo=q(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Ga,jo.init(e,t)}),Xo=q(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Ka,jo.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function Zo(e){if(e===``)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Qo=q(`$ZodBase64`,(e,t)=>{t.pattern??=qa,jo.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{Zo(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function $o(e){if(!Ja.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Zo(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var es=q(`$ZodBase64URL`,(e,t)=>{t.pattern??=Ja,jo.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{$o(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),ts=q(`$ZodE164`,(e,t)=>{t.pattern??=Ya,jo.init(e,t)});function ns(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var rs=q(`$ZodJWT`,(e,t)=>{jo.init(e,t),e._zod.check=n=>{ns(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),is=q(`$ZodNumber`,(e,t)=>{ko.init(e,t),e._zod.pattern=e._zod.bag.pattern??ro,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=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,...a?{received:a}:{}}),n}}),as=q(`$ZodNumberFormat`,(e,t)=>{ho.init(e,t),is.init(e,t)}),os=q(`$ZodBoolean`,(e,t)=>{ko.init(e,t),e._zod.pattern=io,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),ss=q(`$ZodUndefined`,(e,t)=>{ko.init(e,t),e._zod.pattern=oo,e._zod.values=new Set([void 0]),e._zod.optin=`optional`,e._zod.optout=`optional`,e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),cs=q(`$ZodNull`,(e,t)=>{ko.init(e,t),e._zod.pattern=ao,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),ls=q(`$ZodAny`,(e,t)=>{ko.init(e,t),e._zod.parse=e=>e}),us=q(`$ZodUnknown`,(e,t)=>{ko.init(e,t),e._zod.parse=e=>e}),ds=q(`$ZodNever`,(e,t)=>{ko.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function fs(e,t,n){e.issues.length&&t.issues.push(...sa(n,e.issues)),t.value[n]=e.value}var ps=q(`$ZodArray`,(e,t)=>{ko.init(e,t),e._zod.parse=(n,r)=>{let 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);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>fs(t,n,e))):fs(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function ms(e,t,n,r,i){if(e.issues.length){if(i&&!(n in r))return;t.issues.push(...sa(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function hs(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=Zi(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function gs(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optout===`optional`;for(let i in t){if(s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>ms(e,n,i,t,u))):ms(a,n,i,t,u)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var _s=q(`$ZodObject`,(e,t)=>{if(ko.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,`shape`,{get:()=>{let n={...e};return Object.defineProperty(t,`shape`,{value:n}),n}})}let n=Mi(()=>hs(t));Li(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=Ui,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optout===`optional`,i=n._zod.run({value:s[e],issues:[]},o);i instanceof Promise?c.push(i.then(n=>ms(n,t,e,s,r))):ms(i,t,e,s,r)}return i?gs(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),vs=q(`$ZodObjectJIT`,(e,t)=>{_s.init(e,t);let n=e._zod.parse,r=Mi(()=>hs(t)),i=e=>{let t=new Do([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=Bi(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=Bi(r),s=e[r]?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),s?t.write(`
|
|
15
|
+
if (${n}.issues.length) {
|
|
16
|
+
if (${o} in input) {
|
|
17
|
+
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
18
|
+
...iss,
|
|
19
|
+
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
20
|
+
})));
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
if (${n}.value === undefined) {
|
|
25
|
+
if (${o} in input) {
|
|
26
|
+
newResult[${o}] = undefined;
|
|
27
|
+
}
|
|
28
|
+
} else {
|
|
29
|
+
newResult[${o}] = ${n}.value;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
`):t.write(`
|
|
33
|
+
if (${n}.issues.length) {
|
|
34
|
+
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
35
|
+
...iss,
|
|
36
|
+
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
37
|
+
})));
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (${n}.value === undefined) {
|
|
41
|
+
if (${o} in input) {
|
|
42
|
+
newResult[${o}] = undefined;
|
|
43
|
+
}
|
|
44
|
+
} else {
|
|
45
|
+
newResult[${o}] = ${n}.value;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=Ui,s=!Oi.jitless,c=s&&Wi.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?gs([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function ys(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!oa(e));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(e=>e.issues.map(e=>la(e,r,ki())))}),t)}var bs=q(`$ZodUnion`,(e,t)=>{ko.init(e,t),Li(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),Li(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),Li(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),Li(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>Pi(e.source)).join(`|`)})$`)}});let n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,a)=>{if(n)return r(i,a);let o=!1,s=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},a);if(t instanceof Promise)s.push(t),o=!0;else{if(t.issues.length===0)return t;s.push(t)}}return o?Promise.all(s).then(t=>ys(t,i,e,a)):ys(s,i,e,a)}}),xs=q(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,bs.init(e,t);let n=e._zod.parse;Li(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(let r of n)e[t].add(r)}}return e});let r=Mi(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!Ui(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,input:o,path:[t.discriminator],inst:e}),i)}}),Ss=q(`$ZodIntersection`,(e,t)=>{ko.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>ws(e,t,n)):ws(e,i,a)}});function Cs(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Gi(e)&&Gi(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=Cs(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=Cs(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function ws(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),oa(e))return e;let o=Cs(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var Ts=q(`$ZodRecord`,(e,t)=>{ko.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Gi(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[],o=t.keyType._zod.values;if(o){n.value={};let s=new Set;for(let e of o)if(typeof e==`string`||typeof e==`number`||typeof e==`symbol`){s.add(typeof e==`number`?e.toString():e);let o=t.valueType._zod.run({value:i[e],issues:[]},r);o instanceof Promise?a.push(o.then(t=>{t.issues.length&&n.issues.push(...sa(e,t.issues)),n.value[e]=t.value})):(o.issues.length&&n.issues.push(...sa(e,o.issues)),n.value[e]=o.value)}let c;for(let e in i)s.has(e)||(c??=[],c.push(e));c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`)continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof o==`string`&&ro.test(o)&&s.issues.length){let e=t.keyType._zod.run({value:Number(o),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(s=e)}if(s.issues.length){t.mode===`loose`?n.value[o]=i[o]:n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>la(e,r,ki())),input:o,path:[o],inst:e});continue}let c=t.valueType._zod.run({value:i[o],issues:[]},r);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...sa(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...sa(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),Es=q(`$ZodEnum`,(e,t)=>{ko.init(e,t);let n=Ai(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>qi.has(typeof e)).map(e=>typeof e==`string`?Ji(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),Ds=q(`$ZodLiteral`,(e,t)=>{if(ko.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?Ji(e):e?Ji(e.toString()):String(e)).join(`|`)})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),Os=q(`$ZodTransform`,(e,t)=>{ko.init(e,t),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Di(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new Ei;return n.value=i,n}});function ks(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var As=q(`$ZodOptional`,(e,t)=>{ko.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,Li(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Li(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Pi(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>ks(t,e.value)):ks(r,e.value)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),js=q(`$ZodExactOptional`,(e,t)=>{As.init(e,t),Li(e._zod,`values`,()=>t.innerType._zod.values),Li(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Ms=q(`$ZodNullable`,(e,t)=>{ko.init(e,t),Li(e._zod,`optin`,()=>t.innerType._zod.optin),Li(e._zod,`optout`,()=>t.innerType._zod.optout),Li(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Pi(e.source)}|null)$`):void 0}),Li(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Ns=q(`$ZodDefault`,(e,t)=>{ko.init(e,t),e._zod.optin=`optional`,Li(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Ps(e,t)):Ps(r,t)}});function Ps(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Fs=q(`$ZodPrefault`,(e,t)=>{ko.init(e,t),e._zod.optin=`optional`,Li(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Is=q(`$ZodNonOptional`,(e,t)=>{ko.init(e,t),Li(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Ls(t,e)):Ls(i,e)}});function Ls(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var Rs=q(`$ZodCatch`,(e,t)=>{ko.init(e,t),Li(e._zod,`optin`,()=>t.innerType._zod.optin),Li(e._zod,`optout`,()=>t.innerType._zod.optout),Li(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>la(e,n,ki()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>la(e,n,ki()))},input:e.value}),e.issues=[]),e)}}),zs=q(`$ZodPipe`,(e,t)=>{ko.init(e,t),Li(e._zod,`values`,()=>t.in._zod.values),Li(e._zod,`optin`,()=>t.in._zod.optin),Li(e._zod,`optout`,()=>t.out._zod.optout),Li(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Bs(e,t.in,n)):Bs(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Bs(e,t.out,n)):Bs(r,t.out,n)}});function Bs(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var Vs=q(`$ZodReadonly`,(e,t)=>{ko.init(e,t),Li(e._zod,`propValues`,()=>t.innerType._zod.propValues),Li(e._zod,`values`,()=>t.innerType._zod.values),Li(e._zod,`optin`,()=>t.innerType?._zod?.optin),Li(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Hs):Hs(r)}});function Hs(e){return e.value=Object.freeze(e.value),e}var Us=q(`$ZodCustom`,(e,t)=>{lo.init(e,t),ko.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>Ws(t,n,r,e));Ws(i,n,r,e)}});function Ws(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(da(e))}}var Gs,Ks=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function qs(){return new Ks}(Gs=globalThis).__zod_globalRegistry??(Gs.__zod_globalRegistry=qs());var Js=globalThis.__zod_globalRegistry;function Ys(e,t){return new e({type:`string`,...Xi(t)})}function Xs(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...Xi(t)})}function Zs(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...Xi(t)})}function Qs(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...Xi(t)})}function $s(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...Xi(t)})}function ec(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...Xi(t)})}function tc(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...Xi(t)})}function nc(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...Xi(t)})}function rc(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...Xi(t)})}function ic(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...Xi(t)})}function ac(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...Xi(t)})}function oc(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...Xi(t)})}function sc(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...Xi(t)})}function cc(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...Xi(t)})}function lc(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...Xi(t)})}function uc(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...Xi(t)})}function dc(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...Xi(t)})}function fc(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...Xi(t)})}function pc(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...Xi(t)})}function mc(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...Xi(t)})}function hc(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...Xi(t)})}function gc(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...Xi(t)})}function _c(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...Xi(t)})}function vc(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...Xi(t)})}function yc(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...Xi(t)})}function bc(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...Xi(t)})}function xc(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...Xi(t)})}function Sc(e,t){return new e({type:`number`,checks:[],...Xi(t)})}function Cc(e,t){return new e({type:`number`,coerce:!0,checks:[],...Xi(t)})}function wc(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...Xi(t)})}function Tc(e,t){return new e({type:`boolean`,...Xi(t)})}function Ec(e,t){return new e({type:`undefined`,...Xi(t)})}function Dc(e,t){return new e({type:`null`,...Xi(t)})}function Oc(e){return new e({type:`any`})}function kc(e){return new e({type:`unknown`})}function Ac(e,t){return new e({type:`never`,...Xi(t)})}function jc(e,t){return new fo({check:`less_than`,...Xi(t),value:e,inclusive:!1})}function Mc(e,t){return new fo({check:`less_than`,...Xi(t),value:e,inclusive:!0})}function Nc(e,t){return new po({check:`greater_than`,...Xi(t),value:e,inclusive:!1})}function Pc(e,t){return new po({check:`greater_than`,...Xi(t),value:e,inclusive:!0})}function Fc(e,t){return new mo({check:`multiple_of`,...Xi(t),value:e})}function Ic(e,t){return new go({check:`max_length`,...Xi(t),maximum:e})}function Lc(e,t){return new _o({check:`min_length`,...Xi(t),minimum:e})}function Rc(e,t){return new vo({check:`length_equals`,...Xi(t),length:e})}function zc(e,t){return new bo({check:`string_format`,format:`regex`,...Xi(t),pattern:e})}function Bc(e){return new xo({check:`string_format`,format:`lowercase`,...Xi(e)})}function Vc(e){return new So({check:`string_format`,format:`uppercase`,...Xi(e)})}function Hc(e,t){return new Co({check:`string_format`,format:`includes`,...Xi(t),includes:e})}function Uc(e,t){return new wo({check:`string_format`,format:`starts_with`,...Xi(t),prefix:e})}function Wc(e,t){return new To({check:`string_format`,format:`ends_with`,...Xi(t),suffix:e})}function Gc(e){return new Eo({check:`overwrite`,tx:e})}function Kc(e){return Gc(t=>t.normalize(e))}function qc(){return Gc(e=>e.trim())}function Jc(){return Gc(e=>e.toLowerCase())}function Yc(){return Gc(e=>e.toUpperCase())}function Xc(){return Gc(e=>Vi(e))}function Zc(e,t,n){return new e({type:`array`,element:t,...Xi(n)})}function Qc(e,t,n){let r=Xi(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function $c(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...Xi(n)})}function el(e){let t=tl(n=>(n.addIssue=e=>{if(typeof e==`string`)n.issues.push(da(e,n.value,t._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=n.value,r.inst??=t,r.continue??=!t._zod.def.abort,n.issues.push(da(r))}},e(n.value,n)));return t}function tl(e,t){let n=new lo({check:`custom`,...Xi(t)});return n._zod.check=e,n}function nl(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??Js,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 rl(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,rl(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&ol(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&o.schema._prefault&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function il(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
49
|
+
|
|
50
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function al(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let 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){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(a[e.defId]=e.def)}e.external||Object.keys(a).length>0&&(e.target===`draft-2020-12`?i.$defs=a:i.definitions=a);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,`~standard`,{value:{...t[`~standard`],jsonSchema:{input:cl(t,`input`,e.processors),output:cl(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function ol(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return ol(r.element,n);if(r.type===`set`)return ol(r.valueType,n);if(r.type===`lazy`)return ol(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 ol(r.innerType,n);if(r.type===`intersection`)return ol(r.left,n)||ol(r.right,n);if(r.type===`record`||r.type===`map`)return ol(r.keyType,n)||ol(r.valueType,n);if(r.type===`pipe`)return ol(r.in,n)||ol(r.out,n);if(r.type===`object`){for(let e in r.shape)if(ol(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(ol(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(ol(e,n))return!0;return!!(r.rest&&ol(r.rest,n))}return!1}var sl=(e,t={})=>n=>{let r=nl({...n,processors:t});return rl(e,r),il(r,e),al(r,e)},cl=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=nl({...i??{},target:a,io:t,processors:n});return rl(e,o),il(o,e),al(o,e)},ll={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},ul=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=ll[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},dl=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`number`,typeof u==`number`&&(t.target===`draft-04`||t.target===`openapi-3.0`?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u),typeof a==`number`&&(i.minimum=a,typeof u==`number`&&t.target!==`draft-04`&&(u>=a?delete i.minimum:delete i.exclusiveMinimum)),typeof l==`number`&&(t.target===`draft-04`||t.target===`openapi-3.0`?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l),typeof o==`number`&&(i.maximum=o,typeof l==`number`&&t.target!==`draft-04`&&(l<=o?delete i.maximum:delete i.exclusiveMaximum)),typeof c==`number`&&(i.multipleOf=c)},fl=(e,t,n,r)=>{n.type=`boolean`},pl=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},ml=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Undefined cannot be represented in JSON Schema`)},hl=(e,t,n,r)=>{n.not={}},gl=(e,t,n,r)=>{let i=e._zod.def,a=Ai(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},_l=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},vl=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},yl=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},bl=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=rl(a.element,t,{...r,path:[...r.path,`items`]})},xl=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=rl(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=rl(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Sl=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>rl(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Cl=(e,t,n,r)=>{let i=e._zod.def,a=rl(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=rl(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},wl=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=rl(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else (t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=rl(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=rl(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},Tl=(e,t,n,r)=>{let i=e._zod.def,a=rl(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},El=(e,t,n,r)=>{let i=e._zod.def;rl(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Dl=(e,t,n,r)=>{let i=e._zod.def;rl(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},Ol=(e,t,n,r)=>{let i=e._zod.def;rl(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},kl=(e,t,n,r)=>{let i=e._zod.def;rl(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},Al=(e,t,n,r)=>{let i=e._zod.def,a=t.io===`input`?i.in._zod.def.type===`transform`?i.out:i.in:i.out;rl(a,t,r);let o=t.seen.get(e);o.ref=a},jl=(e,t,n,r)=>{let i=e._zod.def;rl(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Ml=(e,t,n,r)=>{let i=e._zod.def;rl(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Nl=q(`ZodISODateTime`,(e,t)=>{Uo.init(e,t),iu.init(e,t)});function Pl(e){return vc(Nl,e)}var Fl=q(`ZodISODate`,(e,t)=>{Wo.init(e,t),iu.init(e,t)});function Il(e){return yc(Fl,e)}var Ll=q(`ZodISOTime`,(e,t)=>{Go.init(e,t),iu.init(e,t)});function Rl(e){return bc(Ll,e)}var zl=q(`ZodISODuration`,(e,t)=>{Ko.init(e,t),iu.init(e,t)});function Bl(e){return xc(zl,e)}var Vl=(e,t)=>{pa.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>ga(e,t)},flatten:{value:t=>ha(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,ji,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,ji,2)}},isEmpty:{get(){return e.issues.length===0}}})};q(`ZodError`,Vl);var Hl=q(`ZodError`,Vl,{Parent:Error}),Ul=_a(Hl),Wl=va(Hl),Gl=ya(Hl),Kl=xa(Hl),ql=Ca(Hl),Jl=wa(Hl),Yl=Ta(Hl),Xl=Ea(Hl),Zl=Da(Hl),Ql=Oa(Hl),$l=ka(Hl),eu=Aa(Hl),tu=q(`ZodType`,(e,t)=>(ko.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:cl(e,`input`),output:cl(e,`output`)}}),e.toJSONSchema=sl(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.check=(...n)=>e.clone(zi(t,{checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>Yi(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>Ul(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Gl(e,t,n),e.parseAsync=async(t,n)=>Wl(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Kl(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>ql(e,t,n),e.decode=(t,n)=>Jl(e,t,n),e.encodeAsync=async(t,n)=>Yl(e,t,n),e.decodeAsync=async(t,n)=>Xl(e,t,n),e.safeEncode=(t,n)=>Zl(e,t,n),e.safeDecode=(t,n)=>Ql(e,t,n),e.safeEncodeAsync=async(t,n)=>$l(e,t,n),e.safeDecodeAsync=async(t,n)=>eu(e,t,n),e.refine=(t,n)=>e.check(Cd(t,n)),e.superRefine=t=>e.check(wd(t)),e.overwrite=t=>e.check(Gc(t)),e.optional=()=>id(e),e.exactOptional=()=>od(e),e.nullable=()=>cd(e),e.nullish=()=>id(cd(e)),e.nonoptional=t=>md(e,t),e.array=()=>Y(e),e.or=t=>Gu([e,t]),e.and=t=>Yu(e,t),e.transform=t=>vd(e,nd(t)),e.default=t=>ud(e,t),e.prefault=t=>fd(e,t),e.catch=t=>gd(e,t),e.pipe=t=>vd(e,t),e.readonly=()=>bd(e),e.describe=t=>{let n=e.clone();return Js.add(n,{description:t}),n},Object.defineProperty(e,`description`,{get(){return Js.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return Js.get(e);let n=e.clone();return Js.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),nu=q(`_ZodString`,(e,t)=>{Ao.init(e,t),tu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ul(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(zc(...t)),e.includes=(...t)=>e.check(Hc(...t)),e.startsWith=(...t)=>e.check(Uc(...t)),e.endsWith=(...t)=>e.check(Wc(...t)),e.min=(...t)=>e.check(Lc(...t)),e.max=(...t)=>e.check(Ic(...t)),e.length=(...t)=>e.check(Rc(...t)),e.nonempty=(...t)=>e.check(Lc(1,...t)),e.lowercase=t=>e.check(Bc(t)),e.uppercase=t=>e.check(Vc(t)),e.trim=()=>e.check(qc()),e.normalize=(...t)=>e.check(Kc(...t)),e.toLowerCase=()=>e.check(Jc()),e.toUpperCase=()=>e.check(Yc()),e.slugify=()=>e.check(Xc())}),ru=q(`ZodString`,(e,t)=>{Ao.init(e,t),nu.init(e,t),e.email=t=>e.check(Xs(au,t)),e.url=t=>e.check(nc(cu,t)),e.jwt=t=>e.check(_c(wu,t)),e.emoji=t=>e.check(rc(uu,t)),e.guid=t=>e.check(Zs(ou,t)),e.uuid=t=>e.check(Qs(su,t)),e.uuidv4=t=>e.check($s(su,t)),e.uuidv6=t=>e.check(ec(su,t)),e.uuidv7=t=>e.check(tc(su,t)),e.nanoid=t=>e.check(ic(du,t)),e.guid=t=>e.check(Zs(ou,t)),e.cuid=t=>e.check(ac(fu,t)),e.cuid2=t=>e.check(oc(pu,t)),e.ulid=t=>e.check(sc(mu,t)),e.base64=t=>e.check(mc(xu,t)),e.base64url=t=>e.check(hc(Su,t)),e.xid=t=>e.check(cc(hu,t)),e.ksuid=t=>e.check(lc(gu,t)),e.ipv4=t=>e.check(uc(_u,t)),e.ipv6=t=>e.check(dc(vu,t)),e.cidrv4=t=>e.check(fc(yu,t)),e.cidrv6=t=>e.check(pc(bu,t)),e.e164=t=>e.check(gc(Cu,t)),e.datetime=t=>e.check(Pl(t)),e.date=t=>e.check(Il(t)),e.time=t=>e.check(Rl(t)),e.duration=t=>e.check(Bl(t))});function J(e){return Ys(ru,e)}var iu=q(`ZodStringFormat`,(e,t)=>{jo.init(e,t),nu.init(e,t)}),au=q(`ZodEmail`,(e,t)=>{Po.init(e,t),iu.init(e,t)}),ou=q(`ZodGUID`,(e,t)=>{Mo.init(e,t),iu.init(e,t)}),su=q(`ZodUUID`,(e,t)=>{No.init(e,t),iu.init(e,t)}),cu=q(`ZodURL`,(e,t)=>{Fo.init(e,t),iu.init(e,t)});function lu(e){return nc(cu,e)}var uu=q(`ZodEmoji`,(e,t)=>{Io.init(e,t),iu.init(e,t)}),du=q(`ZodNanoID`,(e,t)=>{Lo.init(e,t),iu.init(e,t)}),fu=q(`ZodCUID`,(e,t)=>{Ro.init(e,t),iu.init(e,t)}),pu=q(`ZodCUID2`,(e,t)=>{zo.init(e,t),iu.init(e,t)}),mu=q(`ZodULID`,(e,t)=>{Bo.init(e,t),iu.init(e,t)}),hu=q(`ZodXID`,(e,t)=>{Vo.init(e,t),iu.init(e,t)}),gu=q(`ZodKSUID`,(e,t)=>{Ho.init(e,t),iu.init(e,t)}),_u=q(`ZodIPv4`,(e,t)=>{qo.init(e,t),iu.init(e,t)}),vu=q(`ZodIPv6`,(e,t)=>{Jo.init(e,t),iu.init(e,t)}),yu=q(`ZodCIDRv4`,(e,t)=>{Yo.init(e,t),iu.init(e,t)}),bu=q(`ZodCIDRv6`,(e,t)=>{Xo.init(e,t),iu.init(e,t)}),xu=q(`ZodBase64`,(e,t)=>{Qo.init(e,t),iu.init(e,t)}),Su=q(`ZodBase64URL`,(e,t)=>{es.init(e,t),iu.init(e,t)}),Cu=q(`ZodE164`,(e,t)=>{ts.init(e,t),iu.init(e,t)}),wu=q(`ZodJWT`,(e,t)=>{rs.init(e,t),iu.init(e,t)}),Tu=q(`ZodNumber`,(e,t)=>{is.init(e,t),tu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>dl(e,t,n,r),e.gt=(t,n)=>e.check(Nc(t,n)),e.gte=(t,n)=>e.check(Pc(t,n)),e.min=(t,n)=>e.check(Pc(t,n)),e.lt=(t,n)=>e.check(jc(t,n)),e.lte=(t,n)=>e.check(Mc(t,n)),e.max=(t,n)=>e.check(Mc(t,n)),e.int=t=>e.check(Ou(t)),e.safe=t=>e.check(Ou(t)),e.positive=t=>e.check(Nc(0,t)),e.nonnegative=t=>e.check(Pc(0,t)),e.negative=t=>e.check(jc(0,t)),e.nonpositive=t=>e.check(Mc(0,t)),e.multipleOf=(t,n)=>e.check(Fc(t,n)),e.step=(t,n)=>e.check(Fc(t,n)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Eu(e){return Sc(Tu,e)}var Du=q(`ZodNumberFormat`,(e,t)=>{as.init(e,t),Tu.init(e,t)});function Ou(e){return wc(Du,e)}var ku=q(`ZodBoolean`,(e,t)=>{os.init(e,t),tu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fl(e,t,n,r)});function Au(e){return Tc(ku,e)}var ju=q(`ZodUndefined`,(e,t)=>{ss.init(e,t),tu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ml(e,t,n,r)});function Mu(e){return Ec(ju,e)}var Nu=q(`ZodNull`,(e,t)=>{cs.init(e,t),tu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pl(e,t,n,r)});function Pu(e){return Dc(Nu,e)}var Fu=q(`ZodAny`,(e,t)=>{ls.init(e,t),tu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Iu(){return Oc(Fu)}var Lu=q(`ZodUnknown`,(e,t)=>{us.init(e,t),tu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Ru(){return kc(Lu)}var zu=q(`ZodNever`,(e,t)=>{ds.init(e,t),tu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hl(e,t,n,r)});function Bu(e){return Ac(zu,e)}var Vu=q(`ZodArray`,(e,t)=>{ps.init(e,t),tu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bl(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(Lc(t,n)),e.nonempty=t=>e.check(Lc(1,t)),e.max=(t,n)=>e.check(Ic(t,n)),e.length=(t,n)=>e.check(Rc(t,n)),e.unwrap=()=>e.element});function Y(e,t){return Zc(Vu,e,t)}var Hu=q(`ZodObject`,(e,t)=>{vs.init(e,t),tu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xl(e,t,n,r),Li(e,`shape`,()=>t.shape),e.keyof=()=>$u(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Ru()}),e.loose=()=>e.clone({...e._zod.def,catchall:Ru()}),e.strict=()=>e.clone({...e._zod.def,catchall:Bu()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>ta(e,t),e.safeExtend=t=>na(e,t),e.merge=t=>ra(e,t),e.pick=t=>$i(e,t),e.omit=t=>ea(e,t),e.partial=(...t)=>ia(rd,e,t[0]),e.required=(...t)=>aa(pd,e,t[0])});function X(e,t){return new Hu({type:`object`,shape:e??{},...Xi(t)})}function Uu(e,t){return new Hu({type:`object`,shape:e,catchall:Ru(),...Xi(t)})}var Wu=q(`ZodUnion`,(e,t)=>{bs.init(e,t),tu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Sl(e,t,n,r),e.options=t.options});function Gu(e,t){return new Wu({type:`union`,options:e,...Xi(t)})}var Ku=q(`ZodDiscriminatedUnion`,(e,t)=>{Wu.init(e,t),xs.init(e,t)});function qu(e,t,n){return new Ku({type:`union`,options:t,discriminator:e,...Xi(n)})}var Ju=q(`ZodIntersection`,(e,t)=>{Ss.init(e,t),tu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Cl(e,t,n,r)});function Yu(e,t){return new Ju({type:`intersection`,left:e,right:t})}var Xu=q(`ZodRecord`,(e,t)=>{Ts.init(e,t),tu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wl(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function Zu(e,t,n){return new Xu({type:`record`,keyType:e,valueType:t,...Xi(n)})}var Qu=q(`ZodEnum`,(e,t)=>{Es.init(e,t),tu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gl(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Qu({...t,checks:[],...Xi(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Qu({...t,checks:[],...Xi(r),entries:i})}});function $u(e,t){return new Qu({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...Xi(t)})}var ed=q(`ZodLiteral`,(e,t)=>{Ds.init(e,t),tu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_l(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,`value`,{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Z(e,t){return new ed({type:`literal`,values:Array.isArray(e)?e:[e],...Xi(t)})}var td=q(`ZodTransform`,(e,t)=>{Os.init(e,t),tu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yl(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Di(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(da(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(da(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function nd(e){return new td({type:`transform`,transform:e})}var rd=q(`ZodOptional`,(e,t)=>{As.init(e,t),tu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ml(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function id(e){return new rd({type:`optional`,innerType:e})}var ad=q(`ZodExactOptional`,(e,t)=>{js.init(e,t),tu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ml(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function od(e){return new ad({type:`optional`,innerType:e})}var sd=q(`ZodNullable`,(e,t)=>{Ms.init(e,t),tu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Tl(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function cd(e){return new sd({type:`nullable`,innerType:e})}var ld=q(`ZodDefault`,(e,t)=>{Ns.init(e,t),tu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Dl(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function ud(e,t){return new ld({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():Ki(t)}})}var dd=q(`ZodPrefault`,(e,t)=>{Fs.init(e,t),tu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ol(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function fd(e,t){return new dd({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():Ki(t)}})}var pd=q(`ZodNonOptional`,(e,t)=>{Is.init(e,t),tu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>El(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function md(e,t){return new pd({type:`nonoptional`,innerType:e,...Xi(t)})}var hd=q(`ZodCatch`,(e,t)=>{Rs.init(e,t),tu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kl(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function gd(e,t){return new hd({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var _d=q(`ZodPipe`,(e,t)=>{zs.init(e,t),tu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Al(e,t,n,r),e.in=t.in,e.out=t.out});function vd(e,t){return new _d({type:`pipe`,in:e,out:t})}var yd=q(`ZodReadonly`,(e,t)=>{Vs.init(e,t),tu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jl(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function bd(e){return new yd({type:`readonly`,innerType:e})}var xd=q(`ZodCustom`,(e,t)=>{Us.init(e,t),tu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vl(e,t,n,r)});function Sd(e,t){return Qc(xd,e??(()=>!0),t)}function Cd(e,t={}){return $c(xd,e,t)}function wd(e){return el(e)}function Td(e,t){return vd(nd(e),t)}var Ed={invalid_type:`invalid_type`,too_big:`too_big`,too_small:`too_small`,invalid_format:`invalid_format`,not_multiple_of:`not_multiple_of`,unrecognized_keys:`unrecognized_keys`,invalid_union:`invalid_union`,invalid_key:`invalid_key`,invalid_element:`invalid_element`,invalid_value:`invalid_value`,custom:`custom`},Dd;(function(e){})(Dd||={});function Od(e){return Cc(Tu,e)}var kd=`2025-11-25`,Ad=[kd,`2025-06-18`,`2025-03-26`,`2024-11-05`,`2024-10-07`],jd=`io.modelcontextprotocol/related-task`,Md=Sd(e=>e!==null&&(typeof e==`object`||typeof e==`function`)),Nd=Gu([J(),Eu().int()]),Pd=J();Uu({ttl:Eu().optional(),pollInterval:Eu().optional()});var Fd=X({ttl:Eu().optional()}),Id=X({taskId:J()}),Ld=Uu({progressToken:Nd.optional(),[jd]:Id.optional()}),Rd=X({_meta:Ld.optional()}),zd=Rd.extend({task:Fd.optional()}),Bd=e=>zd.safeParse(e).success,Vd=X({method:J(),params:Rd.loose().optional()}),Hd=X({_meta:Ld.optional()}),Ud=X({method:J(),params:Hd.loose().optional()}),Wd=Uu({_meta:Ld.optional()}),Gd=Gu([J(),Eu().int()]),Kd=X({jsonrpc:Z(`2.0`),id:Gd,...Vd.shape}).strict(),qd=e=>Kd.safeParse(e).success,Jd=X({jsonrpc:Z(`2.0`),...Ud.shape}).strict(),Yd=e=>Jd.safeParse(e).success,Xd=X({jsonrpc:Z(`2.0`),id:Gd,result:Wd}).strict(),Zd=e=>Xd.safeParse(e).success,Qd;(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`})(Qd||={});var $d=X({jsonrpc:Z(`2.0`),id:Gd.optional(),error:X({code:Eu().int(),message:J(),data:Ru().optional()})}).strict(),ef=e=>$d.safeParse(e).success,tf=Gu([Kd,Jd,Xd,$d]);Gu([Xd,$d]);var nf=Wd.strict(),rf=Hd.extend({requestId:Gd.optional(),reason:J().optional()}),af=Ud.extend({method:Z(`notifications/cancelled`),params:rf}),of=X({icons:Y(X({src:J(),mimeType:J().optional(),sizes:Y(J()).optional(),theme:$u([`light`,`dark`]).optional()})).optional()}),sf=X({name:J(),title:J().optional()}),cf=sf.extend({...sf.shape,...of.shape,version:J(),websiteUrl:J().optional(),description:J().optional()}),lf=Td(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Yu(X({form:Yu(X({applyDefaults:Au().optional()}),Zu(J(),Ru())).optional(),url:Md.optional()}),Zu(J(),Ru()).optional())),uf=Uu({list:Md.optional(),cancel:Md.optional(),requests:Uu({sampling:Uu({createMessage:Md.optional()}).optional(),elicitation:Uu({create:Md.optional()}).optional()}).optional()}),df=Uu({list:Md.optional(),cancel:Md.optional(),requests:Uu({tools:Uu({call:Md.optional()}).optional()}).optional()}),ff=X({experimental:Zu(J(),Md).optional(),sampling:X({context:Md.optional(),tools:Md.optional()}).optional(),elicitation:lf.optional(),roots:X({listChanged:Au().optional()}).optional(),tasks:uf.optional(),extensions:Zu(J(),Md).optional()}),pf=Rd.extend({protocolVersion:J(),capabilities:ff,clientInfo:cf}),mf=Vd.extend({method:Z(`initialize`),params:pf}),hf=X({experimental:Zu(J(),Md).optional(),logging:Md.optional(),completions:Md.optional(),prompts:X({listChanged:Au().optional()}).optional(),resources:X({subscribe:Au().optional(),listChanged:Au().optional()}).optional(),tools:X({listChanged:Au().optional()}).optional(),tasks:df.optional(),extensions:Zu(J(),Md).optional()}),gf=Wd.extend({protocolVersion:J(),capabilities:hf,serverInfo:cf,instructions:J().optional()}),_f=Ud.extend({method:Z(`notifications/initialized`),params:Hd.optional()}),vf=e=>_f.safeParse(e).success,yf=Vd.extend({method:Z(`ping`),params:Rd.optional()}),bf=X({progress:Eu(),total:id(Eu()),message:id(J())}),xf=X({...Hd.shape,...bf.shape,progressToken:Nd}),Sf=Ud.extend({method:Z(`notifications/progress`),params:xf}),Cf=Rd.extend({cursor:Pd.optional()}),wf=Vd.extend({params:Cf.optional()}),Tf=Wd.extend({nextCursor:Pd.optional()}),Ef=$u([`working`,`input_required`,`completed`,`failed`,`cancelled`]),Df=X({taskId:J(),status:Ef,ttl:Gu([Eu(),Pu()]),createdAt:J(),lastUpdatedAt:J(),pollInterval:id(Eu()),statusMessage:id(J())}),Of=Wd.extend({task:Df}),kf=Hd.merge(Df),Af=Ud.extend({method:Z(`notifications/tasks/status`),params:kf}),jf=Vd.extend({method:Z(`tasks/get`),params:Rd.extend({taskId:J()})}),Mf=Wd.merge(Df),Nf=Vd.extend({method:Z(`tasks/result`),params:Rd.extend({taskId:J()})});Wd.loose();var Pf=wf.extend({method:Z(`tasks/list`)}),Ff=Tf.extend({tasks:Y(Df)}),If=Vd.extend({method:Z(`tasks/cancel`),params:Rd.extend({taskId:J()})}),Lf=Wd.merge(Df),Rf=X({uri:J(),mimeType:id(J()),_meta:Zu(J(),Ru()).optional()}),zf=Rf.extend({text:J()}),Bf=J().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),Vf=Rf.extend({blob:Bf}),Hf=$u([`user`,`assistant`]),Uf=X({audience:Y(Hf).optional(),priority:Eu().min(0).max(1).optional(),lastModified:Pl({offset:!0}).optional()}),Wf=X({...sf.shape,...of.shape,uri:J(),description:id(J()),mimeType:id(J()),size:id(Eu()),annotations:Uf.optional(),_meta:id(Uu({}))}),Gf=X({...sf.shape,...of.shape,uriTemplate:J(),description:id(J()),mimeType:id(J()),annotations:Uf.optional(),_meta:id(Uu({}))}),Kf=wf.extend({method:Z(`resources/list`)}),qf=Tf.extend({resources:Y(Wf)}),Jf=wf.extend({method:Z(`resources/templates/list`)}),Yf=Tf.extend({resourceTemplates:Y(Gf)}),Xf=Rd.extend({uri:J()}),Zf=Xf,Qf=Vd.extend({method:Z(`resources/read`),params:Zf}),$f=Wd.extend({contents:Y(Gu([zf,Vf]))}),ep=Ud.extend({method:Z(`notifications/resources/list_changed`),params:Hd.optional()}),tp=Xf,np=Vd.extend({method:Z(`resources/subscribe`),params:tp}),rp=Xf,ip=Vd.extend({method:Z(`resources/unsubscribe`),params:rp}),ap=Hd.extend({uri:J()}),op=Ud.extend({method:Z(`notifications/resources/updated`),params:ap}),sp=X({name:J(),description:id(J()),required:id(Au())}),cp=X({...sf.shape,...of.shape,description:id(J()),arguments:id(Y(sp)),_meta:id(Uu({}))}),lp=wf.extend({method:Z(`prompts/list`)}),up=Tf.extend({prompts:Y(cp)}),dp=Rd.extend({name:J(),arguments:Zu(J(),J()).optional()}),fp=Vd.extend({method:Z(`prompts/get`),params:dp}),pp=X({type:Z(`text`),text:J(),annotations:Uf.optional(),_meta:Zu(J(),Ru()).optional()}),mp=X({type:Z(`image`),data:Bf,mimeType:J(),annotations:Uf.optional(),_meta:Zu(J(),Ru()).optional()}),hp=X({type:Z(`audio`),data:Bf,mimeType:J(),annotations:Uf.optional(),_meta:Zu(J(),Ru()).optional()}),gp=X({type:Z(`tool_use`),name:J(),id:J(),input:Zu(J(),Ru()),_meta:Zu(J(),Ru()).optional()}),_p=X({type:Z(`resource`),resource:Gu([zf,Vf]),annotations:Uf.optional(),_meta:Zu(J(),Ru()).optional()}),vp=Wf.extend({type:Z(`resource_link`)}),yp=Gu([pp,mp,hp,vp,_p]),bp=X({role:Hf,content:yp}),xp=Wd.extend({description:J().optional(),messages:Y(bp)}),Sp=Ud.extend({method:Z(`notifications/prompts/list_changed`),params:Hd.optional()}),Cp=X({title:J().optional(),readOnlyHint:Au().optional(),destructiveHint:Au().optional(),idempotentHint:Au().optional(),openWorldHint:Au().optional()}),wp=X({taskSupport:$u([`required`,`optional`,`forbidden`]).optional()}),Tp=X({...sf.shape,...of.shape,description:J().optional(),inputSchema:X({type:Z(`object`),properties:Zu(J(),Md).optional(),required:Y(J()).optional()}).catchall(Ru()),outputSchema:X({type:Z(`object`),properties:Zu(J(),Md).optional(),required:Y(J()).optional()}).catchall(Ru()).optional(),annotations:Cp.optional(),execution:wp.optional(),_meta:Zu(J(),Ru()).optional()}),Ep=wf.extend({method:Z(`tools/list`)}),Dp=Tf.extend({tools:Y(Tp)}),Op=Wd.extend({content:Y(yp).default([]),structuredContent:Zu(J(),Ru()).optional(),isError:Au().optional()});Op.or(Wd.extend({toolResult:Ru()}));var kp=zd.extend({name:J(),arguments:Zu(J(),Ru()).optional()}),Ap=Vd.extend({method:Z(`tools/call`),params:kp}),jp=Ud.extend({method:Z(`notifications/tools/list_changed`),params:Hd.optional()}),Mp=X({autoRefresh:Au().default(!0),debounceMs:Eu().int().nonnegative().default(300)}),Np=$u([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),Pp=Rd.extend({level:Np}),Fp=Vd.extend({method:Z(`logging/setLevel`),params:Pp}),Ip=Hd.extend({level:Np,logger:J().optional(),data:Ru()}),Lp=Ud.extend({method:Z(`notifications/message`),params:Ip}),Rp=X({hints:Y(X({name:J().optional()})).optional(),costPriority:Eu().min(0).max(1).optional(),speedPriority:Eu().min(0).max(1).optional(),intelligencePriority:Eu().min(0).max(1).optional()}),zp=X({mode:$u([`auto`,`required`,`none`]).optional()}),Bp=X({type:Z(`tool_result`),toolUseId:J().describe(`The unique identifier for the corresponding tool call.`),content:Y(yp).default([]),structuredContent:X({}).loose().optional(),isError:Au().optional(),_meta:Zu(J(),Ru()).optional()}),Vp=qu(`type`,[pp,mp,hp]),Hp=qu(`type`,[pp,mp,hp,gp,Bp]),Up=X({role:Hf,content:Gu([Hp,Y(Hp)]),_meta:Zu(J(),Ru()).optional()}),Wp=zd.extend({messages:Y(Up),modelPreferences:Rp.optional(),systemPrompt:J().optional(),includeContext:$u([`none`,`thisServer`,`allServers`]).optional(),temperature:Eu().optional(),maxTokens:Eu().int(),stopSequences:Y(J()).optional(),metadata:Md.optional(),tools:Y(Tp).optional(),toolChoice:zp.optional()}),Gp=Vd.extend({method:Z(`sampling/createMessage`),params:Wp}),Kp=Wd.extend({model:J(),stopReason:id($u([`endTurn`,`stopSequence`,`maxTokens`]).or(J())),role:Hf,content:Vp}),qp=Wd.extend({model:J(),stopReason:id($u([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(J())),role:Hf,content:Gu([Hp,Y(Hp)])}),Jp=X({type:Z(`boolean`),title:J().optional(),description:J().optional(),default:Au().optional()}),Yp=X({type:Z(`string`),title:J().optional(),description:J().optional(),minLength:Eu().optional(),maxLength:Eu().optional(),format:$u([`email`,`uri`,`date`,`date-time`]).optional(),default:J().optional()}),Xp=X({type:$u([`number`,`integer`]),title:J().optional(),description:J().optional(),minimum:Eu().optional(),maximum:Eu().optional(),default:Eu().optional()}),Zp=X({type:Z(`string`),title:J().optional(),description:J().optional(),enum:Y(J()),default:J().optional()}),Qp=X({type:Z(`string`),title:J().optional(),description:J().optional(),oneOf:Y(X({const:J(),title:J()})),default:J().optional()}),$p=Gu([Gu([X({type:Z(`string`),title:J().optional(),description:J().optional(),enum:Y(J()),enumNames:Y(J()).optional(),default:J().optional()}),Gu([Zp,Qp]),Gu([X({type:Z(`array`),title:J().optional(),description:J().optional(),minItems:Eu().optional(),maxItems:Eu().optional(),items:X({type:Z(`string`),enum:Y(J())}),default:Y(J()).optional()}),X({type:Z(`array`),title:J().optional(),description:J().optional(),minItems:Eu().optional(),maxItems:Eu().optional(),items:X({anyOf:Y(X({const:J(),title:J()}))}),default:Y(J()).optional()})])]),Jp,Yp,Xp]),em=Gu([zd.extend({mode:Z(`form`).optional(),message:J(),requestedSchema:X({type:Z(`object`),properties:Zu(J(),$p),required:Y(J()).optional()})}),zd.extend({mode:Z(`url`),message:J(),elicitationId:J(),url:J().url()})]),tm=Vd.extend({method:Z(`elicitation/create`),params:em}),nm=Hd.extend({elicitationId:J()}),rm=Ud.extend({method:Z(`notifications/elicitation/complete`),params:nm}),im=Wd.extend({action:$u([`accept`,`decline`,`cancel`]),content:Td(e=>e===null?void 0:e,Zu(J(),Gu([J(),Eu(),Au(),Y(J())])).optional())}),am=X({type:Z(`ref/resource`),uri:J()}),om=X({type:Z(`ref/prompt`),name:J()}),sm=Rd.extend({ref:Gu([om,am]),argument:X({name:J(),value:J()}),context:X({arguments:Zu(J(),J()).optional()}).optional()}),cm=Vd.extend({method:Z(`completion/complete`),params:sm}),lm=Wd.extend({completion:Uu({values:Y(J()).max(100),total:id(Eu().int()),hasMore:id(Au())})}),um=X({uri:J().startsWith(`file://`),name:J().optional(),_meta:Zu(J(),Ru()).optional()}),dm=Vd.extend({method:Z(`roots/list`),params:Rd.optional()}),fm=Wd.extend({roots:Y(um)}),pm=Ud.extend({method:Z(`notifications/roots/list_changed`),params:Hd.optional()});Gu([yf,mf,cm,Fp,fp,lp,Kf,Jf,Qf,np,ip,Ap,Ep,jf,Nf,Pf,If]),Gu([af,Sf,_f,pm,Af]),Gu([nf,Kp,qp,im,fm,Mf,Ff,Of]),Gu([yf,Gp,tm,dm,jf,Nf,Pf,If]),Gu([af,Sf,Lp,op,ep,jp,Sp,Af,rm]),Gu([nf,gf,lm,xp,up,qf,Yf,$f,Op,Dp,Mf,Ff,Of]);var mm=class e extends Error{constructor(e,t,n){super(`MCP error ${e}: ${t}`),this.code=e,this.data=n,this.name=`McpError`}static fromError(t,n,r){if(t===Qd.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new hm(e.elicitations,n)}return new e(t,n,r)}},hm=class extends mm{constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(Qd.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}},gm=lu().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:Ed.custom,message:`URL must be parseable`,fatal:!0}),Ti}).refine(e=>{let t=new URL(e);return t.protocol!==`javascript:`&&t.protocol!==`data:`&&t.protocol!==`vbscript:`},{message:`URL cannot use javascript:, data:, or vbscript: scheme`}),_m=Uu({resource:J().url(),authorization_servers:Y(gm).optional(),jwks_uri:J().url().optional(),scopes_supported:Y(J()).optional(),bearer_methods_supported:Y(J()).optional(),resource_signing_alg_values_supported:Y(J()).optional(),resource_name:J().optional(),resource_documentation:J().optional(),resource_policy_uri:J().url().optional(),resource_tos_uri:J().url().optional(),tls_client_certificate_bound_access_tokens:Au().optional(),authorization_details_types_supported:Y(J()).optional(),dpop_signing_alg_values_supported:Y(J()).optional(),dpop_bound_access_tokens_required:Au().optional()}),vm=Uu({issuer:J(),authorization_endpoint:gm,token_endpoint:gm,registration_endpoint:gm.optional(),scopes_supported:Y(J()).optional(),response_types_supported:Y(J()),response_modes_supported:Y(J()).optional(),grant_types_supported:Y(J()).optional(),token_endpoint_auth_methods_supported:Y(J()).optional(),token_endpoint_auth_signing_alg_values_supported:Y(J()).optional(),service_documentation:gm.optional(),revocation_endpoint:gm.optional(),revocation_endpoint_auth_methods_supported:Y(J()).optional(),revocation_endpoint_auth_signing_alg_values_supported:Y(J()).optional(),introspection_endpoint:J().optional(),introspection_endpoint_auth_methods_supported:Y(J()).optional(),introspection_endpoint_auth_signing_alg_values_supported:Y(J()).optional(),code_challenge_methods_supported:Y(J()).optional(),client_id_metadata_document_supported:Au().optional()}),ym=X({...Uu({issuer:J(),authorization_endpoint:gm,token_endpoint:gm,userinfo_endpoint:gm.optional(),jwks_uri:gm,registration_endpoint:gm.optional(),scopes_supported:Y(J()).optional(),response_types_supported:Y(J()),response_modes_supported:Y(J()).optional(),grant_types_supported:Y(J()).optional(),acr_values_supported:Y(J()).optional(),subject_types_supported:Y(J()),id_token_signing_alg_values_supported:Y(J()),id_token_encryption_alg_values_supported:Y(J()).optional(),id_token_encryption_enc_values_supported:Y(J()).optional(),userinfo_signing_alg_values_supported:Y(J()).optional(),userinfo_encryption_alg_values_supported:Y(J()).optional(),userinfo_encryption_enc_values_supported:Y(J()).optional(),request_object_signing_alg_values_supported:Y(J()).optional(),request_object_encryption_alg_values_supported:Y(J()).optional(),request_object_encryption_enc_values_supported:Y(J()).optional(),token_endpoint_auth_methods_supported:Y(J()).optional(),token_endpoint_auth_signing_alg_values_supported:Y(J()).optional(),display_values_supported:Y(J()).optional(),claim_types_supported:Y(J()).optional(),claims_supported:Y(J()).optional(),service_documentation:J().optional(),claims_locales_supported:Y(J()).optional(),ui_locales_supported:Y(J()).optional(),claims_parameter_supported:Au().optional(),request_parameter_supported:Au().optional(),request_uri_parameter_supported:Au().optional(),require_request_uri_registration:Au().optional(),op_policy_uri:gm.optional(),op_tos_uri:gm.optional(),client_id_metadata_document_supported:Au().optional()}).shape,...vm.pick({code_challenge_methods_supported:!0}).shape}),bm=X({access_token:J(),id_token:J().optional(),token_type:J(),expires_in:Od().optional(),scope:J().optional(),refresh_token:J().optional()}).strip(),xm=X({error:J(),error_description:J().optional(),error_uri:J().optional()}),Sm=gm.optional().or(Z(``).transform(()=>void 0)),Cm=X({redirect_uris:Y(gm),token_endpoint_auth_method:J().optional(),grant_types:Y(J()).optional(),response_types:Y(J()).optional(),client_name:J().optional(),client_uri:gm.optional(),logo_uri:Sm,scope:J().optional(),contacts:Y(J()).optional(),tos_uri:Sm,policy_uri:J().optional(),jwks_uri:gm.optional(),jwks:Iu().optional(),software_id:J().optional(),software_version:J().optional(),software_statement:J().optional()}).strip(),wm=X({client_id:J(),client_secret:J().optional(),client_id_issued_at:Eu().optional(),client_secret_expires_at:Eu().optional()}).strip(),Tm=Cm.merge(wm);X({error:J(),error_description:J().optional()}).strip(),X({token:J(),token_type_hint:J().optional()}).strip();function Em(e){let t=typeof e==`string`?new URL(e):new URL(e.href);return t.hash=``,t}function Dm({requestedResource:e,configuredResource:t}){let 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;let i=n.pathname.endsWith(`/`)?n.pathname:n.pathname+`/`,a=r.pathname.endsWith(`/`)?r.pathname:r.pathname+`/`;return i.startsWith(a)}var Om=class extends Error{constructor(e,t){super(e),this.errorUri=t,this.name=this.constructor.name}toResponseObject(){let e={error:this.errorCode,error_description:this.message};return this.errorUri&&(e.error_uri=this.errorUri),e}get errorCode(){return this.constructor.errorCode}},km=class extends Om{};km.errorCode=`invalid_request`;var Am=class extends Om{};Am.errorCode=`invalid_client`;var jm=class extends Om{};jm.errorCode=`invalid_grant`;var Mm=class extends Om{};Mm.errorCode=`unauthorized_client`;var Nm=class extends Om{};Nm.errorCode=`unsupported_grant_type`;var Pm=class extends Om{};Pm.errorCode=`invalid_scope`;var Fm=class extends Om{};Fm.errorCode=`access_denied`;var Im=class extends Om{};Im.errorCode=`server_error`;var Lm=class extends Om{};Lm.errorCode=`temporarily_unavailable`;var Rm=class extends Om{};Rm.errorCode=`unsupported_response_type`;var zm=class extends Om{};zm.errorCode=`unsupported_token_type`;var Bm=class extends Om{};Bm.errorCode=`invalid_token`;var Vm=class extends Om{};Vm.errorCode=`method_not_allowed`;var Hm=class extends Om{};Hm.errorCode=`too_many_requests`;var Um=class extends Om{};Um.errorCode=`invalid_client_metadata`;var Wm=class extends Om{};Wm.errorCode=`insufficient_scope`;var Gm=class extends Om{};Gm.errorCode=`invalid_target`;var Km={[km.errorCode]:km,[Am.errorCode]:Am,[jm.errorCode]:jm,[Mm.errorCode]:Mm,[Nm.errorCode]:Nm,[Pm.errorCode]:Pm,[Fm.errorCode]:Fm,[Im.errorCode]:Im,[Lm.errorCode]:Lm,[Rm.errorCode]:Rm,[zm.errorCode]:zm,[Bm.errorCode]:Bm,[Vm.errorCode]:Vm,[Hm.errorCode]:Hm,[Um.errorCode]:Um,[Wm.errorCode]:Wm,[Gm.errorCode]:Gm},qm=class extends Error{constructor(e){super(e??`Unauthorized`)}};function Jm(e){return[`client_secret_basic`,`client_secret_post`,`none`].includes(e)}var Ym=`code`,Xm=`S256`;function Zm(e,t){let n=e.client_secret!==void 0;return`token_endpoint_auth_method`in e&&e.token_endpoint_auth_method&&Jm(e.token_endpoint_auth_method)&&(t.length===0||t.includes(e.token_endpoint_auth_method))?e.token_endpoint_auth_method:t.length===0?n?`client_secret_basic`:`none`: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 Qm(e,t,n,r){let{client_id:i,client_secret:a}=t;switch(e){case`client_secret_basic`:$m(i,a,n);return;case`client_secret_post`:eh(i,a,r);return;case`none`:th(i,r);return;default:throw Error(`Unsupported client authentication method: ${e}`)}}function $m(e,t,n){if(!t)throw Error(`client_secret_basic authentication requires a client_secret`);let r=btoa(`${e}:${t}`);n.set(`Authorization`,`Basic ${r}`)}function eh(e,t,n){n.set(`client_id`,e),t&&n.set(`client_secret`,t)}function th(e,t){t.set(`client_id`,e)}async function nh(e){let t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{let{error:e,error_description:t,error_uri:r}=xm.parse(JSON.parse(n));return new(Km[e]||Im)(t||``,r)}catch(e){return new Im(`${t?`HTTP ${t}: `:``}Invalid OAuth error response: ${e}. Raw body: ${n}`)}}async function rh(e,t){try{return await ih(e,t)}catch(n){if(n instanceof Am||n instanceof Mm)return await e.invalidateCredentials?.(`all`),await ih(e,t);if(n instanceof jm)return await e.invalidateCredentials?.(`tokens`),await ih(e,t);throw n}}async function ih(e,{serverUrl:t,authorizationCode:n,scope:r,resourceMetadataUrl:i,fetchFn:a}){let o=await e.discoveryState?.(),s,c,l,u=i;if(!u&&o?.resourceMetadataUrl&&(u=new URL(o.resourceMetadataUrl)),o?.authorizationServerUrl){if(c=o.authorizationServerUrl,s=o.resourceMetadata,l=o.authorizationServerMetadata??await gh(c,{fetchFn:a}),!s)try{s=await lh(t,{resourceMetadataUrl:u},a)}catch{}(l!==o.authorizationServerMetadata||s!==o.resourceMetadata)&&await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:u?.toString(),resourceMetadata:s,authorizationServerMetadata:l})}else{let n=await _h(t,{resourceMetadataUrl:u,fetchFn:a});c=n.authorizationServerUrl,l=n.authorizationServerMetadata,s=n.resourceMetadata,await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:u?.toString(),resourceMetadata:s,authorizationServerMetadata:l})}let d=await oh(t,e,s),f=r||s?.scopes_supported?.join(` `)||e.clientMetadata.scope,p=await Promise.resolve(e.clientInformation());if(!p){if(n!==void 0)throw Error(`Existing OAuth client information is required when exchanging an authorization code`);let t=l?.client_id_metadata_document_supported===!0,r=e.clientMetadataUrl;if(r&&!ah(r))throw new Um(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${r}`);if(t&&r)p={client_id:r},await e.saveClientInformation?.(p);else{if(!e.saveClientInformation)throw Error(`OAuth client information must be saveable for dynamic registration`);let t=await Ch(c,{metadata:l,clientMetadata:e.clientMetadata,scope:f,fetchFn:a});await e.saveClientInformation(t),p=t}}let m=!e.redirectUrl;if(n!==void 0||m){let t=await Sh(e,c,{metadata:l,resource:d,authorizationCode:n,fetchFn:a});return await e.saveTokens(t),`AUTHORIZED`}let h=await e.tokens();if(h?.refresh_token)try{let t=await xh(c,{metadata:l,clientInformation:p,refreshToken:h.refresh_token,resource:d,addClientAuthentication:e.addClientAuthentication,fetchFn:a});return await e.saveTokens(t),`AUTHORIZED`}catch(e){if(!(!(e instanceof Om)||e instanceof Im))throw e}let g=e.state?await e.state():void 0,{authorizationUrl:_,codeVerifier:v}=await vh(c,{metadata:l,clientInformation:p,state:g,redirectUrl:e.redirectUrl,scope:f,resource:d});return await e.saveCodeVerifier(v),await e.redirectToAuthorization(_),`REDIRECT`}function ah(e){if(!e)return!1;try{let t=new URL(e);return t.protocol===`https:`&&t.pathname!==`/`}catch{return!1}}async function oh(e,t,n){let r=Em(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!Dm({requestedResource:r,configuredResource:n.resource}))throw Error(`Protected resource ${n.resource} does not match expected ${r} (or origin)`);return new URL(n.resource)}}function sh(e){let t=e.headers.get(`WWW-Authenticate`);if(!t)return{};let[n,r]=t.split(` `);if(n.toLowerCase()!==`bearer`||!r)return{};let i=ch(e,`resource_metadata`)||void 0,a;if(i)try{a=new URL(i)}catch{}let o=ch(e,`scope`)||void 0,s=ch(e,`error`)||void 0;return{resourceMetadataUrl:a,scope:o,error:s}}function ch(e,t){let n=e.headers.get(`WWW-Authenticate`);if(!n)return null;let r=RegExp(`${t}=(?:"([^"]+)"|([^\\s,]+))`),i=n.match(r);return i?i[1]||i[2]:null}async function lh(e,t,n=fetch){let r=await mh(e,`oauth-protected-resource`,n,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!r||r.status===404)throw await r?.body?.cancel(),Error(`Resource server does not implement OAuth 2.0 Protected Resource Metadata.`);if(!r.ok)throw await r.body?.cancel(),Error(`HTTP ${r.status} trying to load well-known OAuth protected resource metadata.`);return _m.parse(await r.json())}async function uh(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(r instanceof TypeError)return t?uh(e,void 0,n):void 0;throw r}}function dh(e,t=``,n={}){return t.endsWith(`/`)&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function fh(e,t,n=fetch){return await uh(e,{"MCP-Protocol-Version":t},n)}function ph(e,t){return!e||e.status>=400&&e.status<500&&t!==`/`}async function mh(e,t,n,r){let i=new URL(e),a=r?.protocolVersion??`2025-11-25`,o;if(r?.metadataUrl)o=new URL(r.metadataUrl);else{let e=dh(t,i.pathname);o=new URL(e,r?.metadataServerUrl??i),o.search=i.search}let s=await fh(o,a,n);return!r?.metadataUrl&&ph(s,i.pathname)&&(s=await fh(new URL(`/.well-known/${t}`,i),a,n)),s}function hh(e){let 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 gh(e,{fetchFn:t=fetch,protocolVersion:n=kd}={}){let r={"MCP-Protocol-Version":n,Accept:`application/json`},i=hh(e);for(let{url:e,type:n}of i){let i=await uh(e,r,t);if(i){if(!i.ok){if(await i.body?.cancel(),i.status>=400&&i.status<500)continue;throw Error(`HTTP ${i.status} trying to load ${n===`oauth`?`OAuth`:`OpenID provider`} metadata from ${e}`)}return n===`oauth`?vm.parse(await i.json()):ym.parse(await i.json())}}}async function _h(e,t){let n,r;try{n=await lh(e,{resourceMetadataUrl:t?.resourceMetadataUrl},t?.fetchFn),n.authorization_servers&&n.authorization_servers.length>0&&(r=n.authorization_servers[0])}catch{}r||=String(new URL(`/`,e));let i=await gh(r,{fetchFn:t?.fetchFn});return{authorizationServerUrl:r,authorizationServerMetadata:i,resourceMetadata:n}}async function vh(e,{metadata:t,clientInformation:n,redirectUrl:r,scope:i,state:a,resource:o}){let s;if(t){if(s=new URL(t.authorization_endpoint),!t.response_types_supported.includes(Ym))throw Error(`Incompatible auth server: does not support response type ${Ym}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(Xm))throw Error(`Incompatible auth server: does not support code challenge method ${Xm}`)}else s=new URL(`/authorize`,e);let c=await wi(),l=c.code_verifier,u=c.code_challenge;return s.searchParams.set(`response_type`,Ym),s.searchParams.set(`client_id`,n.client_id),s.searchParams.set(`code_challenge`,u),s.searchParams.set(`code_challenge_method`,Xm),s.searchParams.set(`redirect_uri`,String(r)),a&&s.searchParams.set(`state`,a),i&&s.searchParams.set(`scope`,i),i?.includes(`offline_access`)&&s.searchParams.append(`prompt`,`consent`),o&&s.searchParams.set(`resource`,o.href),{authorizationUrl:s,codeVerifier:l}}function yh(e,t,n){return new URLSearchParams({grant_type:`authorization_code`,code:e,code_verifier:t,redirect_uri:String(n)})}async function bh(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:i,resource:a,fetchFn:o}){let s=t?.token_endpoint?new URL(t.token_endpoint):new URL(`/token`,e),c=new Headers({"Content-Type":`application/x-www-form-urlencoded`,Accept:`application/json`});a&&n.set(`resource`,a.href),i?await i(c,n,s,t):r&&Qm(Zm(r,t?.token_endpoint_auth_methods_supported??[]),r,c,n);let l=await(o??fetch)(s,{method:`POST`,headers:c,body:n});if(!l.ok)throw await nh(l);return bm.parse(await l.json())}async function xh(e,{metadata:t,clientInformation:n,refreshToken:r,resource:i,addClientAuthentication:a,fetchFn:o}){return{refresh_token:r,...await bh(e,{metadata:t,tokenRequestParams:new URLSearchParams({grant_type:`refresh_token`,refresh_token:r}),clientInformation:n,addClientAuthentication:a,resource:i,fetchFn:o})}}async function Sh(e,t,{metadata:n,resource:r,authorizationCode:i,fetchFn:a}={}){let o=e.clientMetadata.scope,s;if(e.prepareTokenRequest&&(s=await e.prepareTokenRequest(o)),!s){if(!i)throw Error(`Either provider.prepareTokenRequest() or authorizationCode is required`);if(!e.redirectUrl)throw Error(`redirectUrl is required for authorization_code flow`);s=yh(i,await e.codeVerifier(),e.redirectUrl)}let c=await e.clientInformation();return bh(t,{metadata:n,tokenRequestParams:s,clientInformation:c??void 0,addClientAuthentication:e.addClientAuthentication,resource:r,fetchFn:a})}async function Ch(e,{metadata:t,clientMetadata:n,scope:r,fetchFn:i}){let a;if(t){if(!t.registration_endpoint)throw Error(`Incompatible auth server: does not support dynamic client registration`);a=new URL(t.registration_endpoint)}else a=new URL(`/register`,e);let o=await(i??fetch)(a,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({...n,...r===void 0?{}:{scope:r}})});if(!o.ok)throw await nh(o);return Tm.parse(await o.json())}function wh(e,t){if(e instanceof Promise)throw Error(t)}function Th(e,t){let n={},r=[];for(let i in e){let a=e[i][`~standard`].validate(t[i]);if(wh(a,`Validation must be synchronous, but ${i} returned a Promise.`),a.issues){r.push(...a.issues.map(e=>({...e,message:e.message,path:[i,...e.path??[]]})));continue}n[i]=a.value}return r.length?{issues:r}:{value:n}}function Eh(e){let t=e.runtimeEnvStrict??e.runtimeEnv??{};if(e.emptyStringAsUndefined??!1)for(let[e,n]of Object.entries(t))n===``&&delete t[e];if(e.skipValidation){if(e.extends)for(let t of e.extends)t.skipValidation=!0;return t}let n=typeof e.client==`object`?e.client:{},r=typeof e.server==`object`?e.server:{},i=typeof e.shared==`object`?e.shared:{},a=e.isServer??(typeof window>`u`||`Deno`in window),o=a?{...r,...i,...n}:{...n,...i},s=(e.createFinalSchema?.(o,a))?.[`~standard`].validate(t)??Th(o,t);wh(s,`Validation must be synchronous`);let c=e.onValidationError??(e=>{throw console.error(`❌ Invalid environment variables:`,e),Error(`Invalid environment variables`)}),l=e.onInvalidAccess??(()=>{throw Error(`❌ Attempted to access a server-side environment variable on the client`)});if(s.issues)return c(s.issues);let u=t=>e.clientPrefix?!t.startsWith(e.clientPrefix)&&!(t in i):!0,d=e=>a||!u(e),f=e=>e===`__esModule`||e===`$$typeof`,p=(e.extends??[]).reduce((e,t)=>Object.assign(e,t),{}),m=Object.assign(p,s.value);return new Proxy(m,{get(e,t){if(typeof t==`string`&&!f(t))return d(t)?Reflect.get(e,t):l(t)}})}var Dh=Eh({clientPrefix:`VITE_`,client:{VITE_MCP_SERVER_URL:J().default(`${window.location.origin}/mcp`)},runtimeEnv:{BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1},emptyStringAsUndefined:!0});function Oh(e,t){let n;try{n=e()}catch{return}return{getItem:e=>{let r=e=>e===null?null:JSON.parse(e,t?.reviver),i=n.getItem(e)??null;return i instanceof Promise?i.then(r):r(i)},setItem:(e,r)=>n.setItem(e,JSON.stringify(r,t?.replacer)),removeItem:e=>n.removeItem(e)}}var kh=e=>t=>{try{let n=e(t);return n instanceof Promise?n:{then(e){return kh(e)(n)},catch(e){return this}}}catch(e){return{then(e){return this},catch(t){return kh(t)(e)}}}},Ah=(e,t)=>(n,r,i)=>{let a={storage:Oh(()=>window.localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},o=!1,s=0,c=new Set,l=new Set,u=a.storage;if(!u)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...e)},r,i);let d=()=>{let e=a.partialize({...r()});return u.setItem(a.name,{state:e,version:a.version})},f=i.setState;i.setState=(e,t)=>(f(e,t),d());let p=e((...e)=>(n(...e),d()),r,i);i.getInitialState=()=>p;let m,h=()=>{if(!u)return;let e=++s;o=!1,c.forEach(e=>e(r()??p));let t=a.onRehydrateStorage?.call(a,r()??p)||void 0;return kh(u.getItem.bind(u))(a.name).then(e=>{if(e)if(typeof e.version==`number`&&e.version!==a.version){if(a.migrate){let t=a.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error(`State loaded from storage couldn't be migrated since no migrate function was provided`)}else return[!1,e.state];return[!1,void 0]}).then(t=>{if(e!==s)return;let[i,o]=t;if(m=a.merge(o,r()??p),n(m,!0),i)return d()}).then(()=>{e===s&&(t?.(r(),void 0),m=r(),o=!0,l.forEach(e=>e(m)))}).catch(n=>{e===s&&t?.(void 0,n)})};return i.persist={setOptions:e=>{a={...a,...e},e.storage&&(u=e.storage)},clearStorage:()=>{u?.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>h(),hasHydrated:()=>o,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(l.add(e),()=>{l.delete(e)})},a.skipHydration||h(),m||p},jh={theme:`light`,locale:`en-US`,displayMode:`inline`,maxHeight:void 0,safeArea:{insets:{top:0,bottom:0,left:0,right:0}},userAgent:{device:{type:`desktop`},capabilities:{hover:!0,touch:!1}}},Mh=_i()(Ah(e=>({...jh,setPreference:(t,n)=>e({[t]:n})}),{name:`skybridge-devtools-inspector-preferences`,version:1})),Nh=()=>{let{setPreference:e,...t}=Mh.getState();return t},Ph=typeof global==`object`&&global&&global.Object===Object&&global,Fh=typeof self==`object`&&self&&self.Object===Object&&self,Ih=Ph||Fh||Function(`return this`)(),Lh=Ih.Symbol,Rh=Object.prototype,zh=Rh.hasOwnProperty,Bh=Rh.toString,Vh=Lh?Lh.toStringTag:void 0;function Hh(e){var t=zh.call(e,Vh),n=e[Vh];try{e[Vh]=void 0;var r=!0}catch{}var i=Bh.call(e);return r&&(t?e[Vh]=n:delete e[Vh]),i}var Uh=Object.prototype.toString;function Wh(e){return Uh.call(e)}var Gh=`[object Null]`,Kh=`[object Undefined]`,qh=Lh?Lh.toStringTag:void 0;function Jh(e){return e==null?e===void 0?Kh:Gh:qh&&qh in Object(e)?Hh(e):Wh(e)}function Yh(e){return typeof e==`object`&&!!e}var Xh=`[object Symbol]`;function Zh(e){return typeof e==`symbol`||Yh(e)&&Jh(e)==Xh}function Qh(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 $h=Array.isArray,eg=1/0,tg=Lh?Lh.prototype:void 0,ng=tg?tg.toString:void 0;function rg(e){if(typeof e==`string`)return e;if($h(e))return Qh(e,rg)+``;if(Zh(e))return ng?ng.call(e):``;var t=e+``;return t==`0`&&1/e==-eg?`-0`:t}var ig=/\s/;function ag(e){for(var t=e.length;t--&&ig.test(e.charAt(t)););return t}var og=/^\s+/;function sg(e){return e&&e.slice(0,ag(e)+1).replace(og,``)}function cg(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}var lg=NaN,ug=/^[-+]0x[0-9a-f]+$/i,dg=/^0b[01]+$/i,fg=/^0o[0-7]+$/i,pg=parseInt;function mg(e){if(typeof e==`number`)return e;if(Zh(e))return lg;if(cg(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=cg(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=sg(e);var n=dg.test(e);return n||fg.test(e)?pg(e.slice(2),n?2:8):ug.test(e)?lg:+e}var hg=1/0,gg=17976931348623157e292;function _g(e){return e?(e=mg(e),e===hg||e===-hg?(e<0?-1:1)*gg:e===e?e:0):e===0?e:0}function vg(e){var t=_g(e),n=t%1;return t===t?n?t-n:t:0}function yg(e){return e}var bg=`[object AsyncFunction]`,xg=`[object Function]`,Sg=`[object GeneratorFunction]`,Cg=`[object Proxy]`;function wg(e){if(!cg(e))return!1;var t=Jh(e);return t==xg||t==Sg||t==bg||t==Cg}var Tg=Ih[`__core-js_shared__`],Eg=function(){var e=/[^.]+$/.exec(Tg&&Tg.keys&&Tg.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function Dg(e){return!!Eg&&Eg in e}var Og=Function.prototype.toString;function kg(e){if(e!=null){try{return Og.call(e)}catch{}try{return e+``}catch{}}return``}var Ag=/[\\^$.*+?()[\]{}|]/g,jg=/^\[object .+?Constructor\]$/,Mg=Function.prototype,Ng=Object.prototype,Pg=Mg.toString,Fg=Ng.hasOwnProperty,Ig=RegExp(`^`+Pg.call(Fg).replace(Ag,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function Lg(e){return!cg(e)||Dg(e)?!1:(wg(e)?Ig:jg).test(kg(e))}function Rg(e,t){return e?.[t]}function zg(e,t){var n=Rg(e,t);return Lg(n)?n:void 0}var Bg=zg(Ih,`WeakMap`),Vg=Object.create,Hg=function(){function e(){}return function(t){if(!cg(t))return{};if(Vg)return Vg(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Ug(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 Wg(){}function Gg(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}var Kg=800,qg=16,Jg=Date.now;function Yg(e){var t=0,n=0;return function(){var r=Jg(),i=qg-(r-n);if(n=r,i>0){if(++t>=Kg)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Xg(e){return function(){return e}}var Zg=function(){try{var e=zg(Object,`defineProperty`);return e({},``,{}),e}catch{}}(),Qg=Yg(Zg?function(e,t){return Zg(e,`toString`,{configurable:!0,enumerable:!1,value:Xg(t),writable:!0})}:yg);function $g(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function e_(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}function t_(e){return e!==e}function n_(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function r_(e,t,n){return t===t?n_(e,t,n):e_(e,t_,n)}function i_(e,t){return!!(e!=null&&e.length)&&r_(e,t,0)>-1}var a_=9007199254740991,o_=/^(?:0|[1-9]\d*)$/;function s_(e,t){var n=typeof e;return t??=a_,!!t&&(n==`number`||n!=`symbol`&&o_.test(e))&&e>-1&&e%1==0&&e<t}function c_(e,t,n){t==`__proto__`&&Zg?Zg(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function l_(e,t){return e===t||e!==e&&t!==t}var u_=Object.prototype.hasOwnProperty;function d_(e,t,n){var r=e[t];(!(u_.call(e,t)&&l_(r,n))||n===void 0&&!(t in e))&&c_(e,t,n)}function f_(e,t,n,r){var i=!n;n||={};for(var a=-1,o=t.length;++a<o;){var s=t[a],c=r?r(n[s],e[s],s,n,e):void 0;c===void 0&&(c=e[s]),i?c_(n,s,c):d_(n,s,c)}return n}var p_=Math.max;function m_(e,t,n){return t=p_(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=p_(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),Ug(e,this,s)}}function h_(e,t){return Qg(m_(e,t,yg),e+``)}var g_=9007199254740991;function __(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=g_}function v_(e){return e!=null&&__(e.length)&&!wg(e)}function y_(e,t,n){if(!cg(n))return!1;var r=typeof t;return(r==`number`?v_(n)&&s_(t,n.length):r==`string`&&t in n)?l_(n[t],e):!1}function b_(e){return h_(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&typeof a==`function`?(i--,a):void 0,o&&y_(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t})}var x_=Object.prototype;function S_(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||x_)}function C_(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var w_=`[object Arguments]`;function T_(e){return Yh(e)&&Jh(e)==w_}var E_=Object.prototype,D_=E_.hasOwnProperty,O_=E_.propertyIsEnumerable,k_=T_(function(){return arguments}())?T_:function(e){return Yh(e)&&D_.call(e,`callee`)&&!O_.call(e,`callee`)};function A_(){return!1}var j_=typeof exports==`object`&&exports&&!exports.nodeType&&exports,M_=j_&&typeof module==`object`&&module&&!module.nodeType&&module,N_=M_&&M_.exports===j_?Ih.Buffer:void 0,P_=(N_?N_.isBuffer:void 0)||A_,F_=`[object Arguments]`,I_=`[object Array]`,L_=`[object Boolean]`,R_=`[object Date]`,z_=`[object Error]`,B_=`[object Function]`,V_=`[object Map]`,H_=`[object Number]`,U_=`[object Object]`,W_=`[object RegExp]`,G_=`[object Set]`,K_=`[object String]`,q_=`[object WeakMap]`,J_=`[object ArrayBuffer]`,Y_=`[object DataView]`,X_=`[object Float32Array]`,Z_=`[object Float64Array]`,Q_=`[object Int8Array]`,$_=`[object Int16Array]`,ev=`[object Int32Array]`,tv=`[object Uint8Array]`,nv=`[object Uint8ClampedArray]`,rv=`[object Uint16Array]`,iv=`[object Uint32Array]`,av={};av[X_]=av[Z_]=av[Q_]=av[$_]=av[ev]=av[tv]=av[nv]=av[rv]=av[iv]=!0,av[F_]=av[I_]=av[J_]=av[L_]=av[Y_]=av[R_]=av[z_]=av[B_]=av[V_]=av[H_]=av[U_]=av[W_]=av[G_]=av[K_]=av[q_]=!1;function ov(e){return Yh(e)&&__(e.length)&&!!av[Jh(e)]}function sv(e){return function(t){return e(t)}}var cv=typeof exports==`object`&&exports&&!exports.nodeType&&exports,lv=cv&&typeof module==`object`&&module&&!module.nodeType&&module,uv=lv&&lv.exports===cv&&Ph.process,dv=function(){try{return lv&&lv.require&&lv.require(`util`).types||uv&&uv.binding&&uv.binding(`util`)}catch{}}(),fv=dv&&dv.isTypedArray,pv=fv?sv(fv):ov,mv=Object.prototype.hasOwnProperty;function hv(e,t){var n=$h(e),r=!n&&k_(e),i=!n&&!r&&P_(e),a=!n&&!r&&!i&&pv(e),o=n||r||i||a,s=o?C_(e.length,String):[],c=s.length;for(var l in e)(t||mv.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||s_(l,c)))&&s.push(l);return s}function gv(e,t){return function(n){return e(t(n))}}var _v=gv(Object.keys,Object),vv=Object.prototype.hasOwnProperty;function yv(e){if(!S_(e))return _v(e);var t=[];for(var n in Object(e))vv.call(e,n)&&n!=`constructor`&&t.push(n);return t}function bv(e){return v_(e)?hv(e):yv(e)}var xv=Object.prototype.hasOwnProperty,Sv=b_(function(e,t){if(S_(t)||v_(t)){f_(t,bv(t),e);return}for(var n in t)xv.call(t,n)&&d_(e,n,t[n])});function Cv(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var wv=Object.prototype.hasOwnProperty;function Tv(e){if(!cg(e))return Cv(e);var t=S_(e),n=[];for(var r in e)r==`constructor`&&(t||!wv.call(e,r))||n.push(r);return n}function Ev(e){return v_(e)?hv(e,!0):Tv(e)}var Dv=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ov=/^\w*$/;function kv(e,t){if($h(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||Zh(e)?!0:Ov.test(e)||!Dv.test(e)||t!=null&&e in Object(t)}var Av=zg(Object,`create`);function jv(){this.__data__=Av?Av(null):{},this.size=0}function Mv(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Nv=`__lodash_hash_undefined__`,Pv=Object.prototype.hasOwnProperty;function Fv(e){var t=this.__data__;if(Av){var n=t[e];return n===Nv?void 0:n}return Pv.call(t,e)?t[e]:void 0}var Iv=Object.prototype.hasOwnProperty;function Lv(e){var t=this.__data__;return Av?t[e]!==void 0:Iv.call(t,e)}var Rv=`__lodash_hash_undefined__`;function zv(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Av&&t===void 0?Rv:t,this}function Bv(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])}}Bv.prototype.clear=jv,Bv.prototype.delete=Mv,Bv.prototype.get=Fv,Bv.prototype.has=Lv,Bv.prototype.set=zv;function Vv(){this.__data__=[],this.size=0}function Hv(e,t){for(var n=e.length;n--;)if(l_(e[n][0],t))return n;return-1}var Uv=Array.prototype.splice;function Wv(e){var t=this.__data__,n=Hv(t,e);return n<0?!1:(n==t.length-1?t.pop():Uv.call(t,n,1),--this.size,!0)}function Gv(e){var t=this.__data__,n=Hv(t,e);return n<0?void 0:t[n][1]}function Kv(e){return Hv(this.__data__,e)>-1}function qv(e,t){var n=this.__data__,r=Hv(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Jv(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])}}Jv.prototype.clear=Vv,Jv.prototype.delete=Wv,Jv.prototype.get=Gv,Jv.prototype.has=Kv,Jv.prototype.set=qv;var Yv=zg(Ih,`Map`);function Xv(){this.size=0,this.__data__={hash:new Bv,map:new(Yv||Jv),string:new Bv}}function Zv(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function Qv(e,t){var n=e.__data__;return Zv(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function $v(e){var t=Qv(this,e).delete(e);return this.size-=t?1:0,t}function ey(e){return Qv(this,e).get(e)}function ty(e){return Qv(this,e).has(e)}function ny(e,t){var n=Qv(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function ry(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])}}ry.prototype.clear=Xv,ry.prototype.delete=$v,ry.prototype.get=ey,ry.prototype.has=ty,ry.prototype.set=ny;var iy=`Expected a function`;function ay(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(iy);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(ay.Cache||ry),n}ay.Cache=ry;var oy=500;function sy(e){var t=ay(e,function(e){return n.size===oy&&n.clear(),e}),n=t.cache;return t}var cy=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ly=/\\(\\)?/g,uy=sy(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(cy,function(e,n,r,i){t.push(r?i.replace(ly,`$1`):n||e)}),t});function dy(e){return e==null?``:rg(e)}function fy(e,t){return $h(e)?e:kv(e,t)?[e]:uy(dy(e))}var py=1/0;function my(e){if(typeof e==`string`||Zh(e))return e;var t=e+``;return t==`0`&&1/e==-py?`-0`:t}function hy(e,t){t=fy(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[my(t[n++])];return n&&n==r?e:void 0}function Q(e,t,n){var r=e==null?void 0:hy(e,t);return r===void 0?n:r}function gy(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var _y=Lh?Lh.isConcatSpreadable:void 0;function vy(e){return $h(e)||k_(e)||!!(_y&&e&&e[_y])}function yy(e,t,n,r,i){var a=-1,o=e.length;for(n||=vy,i||=[];++a<o;){var s=e[a];t>0&&n(s)?t>1?yy(s,t-1,n,r,i):gy(i,s):r||(i[i.length]=s)}return i}function by(e){return e!=null&&e.length?yy(e,1):[]}function xy(e){return Qg(m_(e,void 0,by),e+``)}var Sy=gv(Object.getPrototypeOf,Object),Cy=`[object Object]`,wy=Function.prototype,Ty=Object.prototype,Ey=wy.toString,Dy=Ty.hasOwnProperty,Oy=Ey.call(Object);function ky(e){if(!Yh(e)||Jh(e)!=Cy)return!1;var t=Sy(e);if(t===null)return!0;var n=Dy.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&Ey.call(n)==Oy}function Ay(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 a=Array(i);++r<i;)a[r]=e[r+t];return a}function jy(e,t,n,r){var i=-1,a=e==null?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}function My(){this.__data__=new Jv,this.size=0}function Ny(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Py(e){return this.__data__.get(e)}function Fy(e){return this.__data__.has(e)}var Iy=200;function Ly(e,t){var n=this.__data__;if(n instanceof Jv){var r=n.__data__;if(!Yv||r.length<Iy-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ry(r)}return n.set(e,t),this.size=n.size,this}function Ry(e){this.size=(this.__data__=new Jv(e)).size}Ry.prototype.clear=My,Ry.prototype.delete=Ny,Ry.prototype.get=Py,Ry.prototype.has=Fy,Ry.prototype.set=Ly;function zy(e,t){return e&&f_(t,bv(t),e)}function By(e,t){return e&&f_(t,Ev(t),e)}var Vy=typeof exports==`object`&&exports&&!exports.nodeType&&exports,Hy=Vy&&typeof module==`object`&&module&&!module.nodeType&&module,Uy=Hy&&Hy.exports===Vy?Ih.Buffer:void 0,Wy=Uy?Uy.allocUnsafe:void 0;function Gy(e,t){if(t)return e.slice();var n=e.length,r=Wy?Wy(n):new e.constructor(n);return e.copy(r),r}function Ky(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}function qy(){return[]}var Jy=Object.prototype.propertyIsEnumerable,Yy=Object.getOwnPropertySymbols,Xy=Yy?function(e){return e==null?[]:(e=Object(e),Ky(Yy(e),function(t){return Jy.call(e,t)}))}:qy;function Zy(e,t){return f_(e,Xy(e),t)}var Qy=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)gy(t,Xy(e)),e=Sy(e);return t}:qy;function $y(e,t){return f_(e,Qy(e),t)}function eb(e,t,n){var r=t(e);return $h(e)?r:gy(r,n(e))}function tb(e){return eb(e,bv,Xy)}function nb(e){return eb(e,Ev,Qy)}var rb=zg(Ih,`DataView`),ib=zg(Ih,`Promise`),ab=zg(Ih,`Set`),ob=`[object Map]`,sb=`[object Object]`,cb=`[object Promise]`,lb=`[object Set]`,ub=`[object WeakMap]`,db=`[object DataView]`,fb=kg(rb),pb=kg(Yv),mb=kg(ib),hb=kg(ab),gb=kg(Bg),_b=Jh;(rb&&_b(new rb(new ArrayBuffer(1)))!=db||Yv&&_b(new Yv)!=ob||ib&&_b(ib.resolve())!=cb||ab&&_b(new ab)!=lb||Bg&&_b(new Bg)!=ub)&&(_b=function(e){var t=Jh(e),n=t==sb?e.constructor:void 0,r=n?kg(n):``;if(r)switch(r){case fb:return db;case pb:return ob;case mb:return cb;case hb:return lb;case gb:return ub}return t});var vb=_b,yb=Object.prototype.hasOwnProperty;function bb(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]==`string`&&yb.call(e,`index`)&&(n.index=e.index,n.input=e.input),n}var xb=Ih.Uint8Array;function Sb(e){var t=new e.constructor(e.byteLength);return new xb(t).set(new xb(e)),t}function Cb(e,t){var n=t?Sb(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var wb=/\w*$/;function Tb(e){var t=new e.constructor(e.source,wb.exec(e));return t.lastIndex=e.lastIndex,t}var Eb=Lh?Lh.prototype:void 0,Db=Eb?Eb.valueOf:void 0;function Ob(e){return Db?Object(Db.call(e)):{}}function kb(e,t){var n=t?Sb(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var Ab=`[object Boolean]`,jb=`[object Date]`,Mb=`[object Map]`,Nb=`[object Number]`,Pb=`[object RegExp]`,Fb=`[object Set]`,Ib=`[object String]`,Lb=`[object Symbol]`,Rb=`[object ArrayBuffer]`,zb=`[object DataView]`,Bb=`[object Float32Array]`,Vb=`[object Float64Array]`,Hb=`[object Int8Array]`,Ub=`[object Int16Array]`,Wb=`[object Int32Array]`,Gb=`[object Uint8Array]`,Kb=`[object Uint8ClampedArray]`,qb=`[object Uint16Array]`,Jb=`[object Uint32Array]`;function Yb(e,t,n){var r=e.constructor;switch(t){case Rb:return Sb(e);case Ab:case jb:return new r(+e);case zb:return Cb(e,n);case Bb:case Vb:case Hb:case Ub:case Wb:case Gb:case Kb:case qb:case Jb:return kb(e,n);case Mb:return new r;case Nb:case Ib:return new r(e);case Pb:return Tb(e);case Fb:return new r;case Lb:return Ob(e)}}function Xb(e){return typeof e.constructor==`function`&&!S_(e)?Hg(Sy(e)):{}}var Zb=`[object Map]`;function Qb(e){return Yh(e)&&vb(e)==Zb}var $b=dv&&dv.isMap,ex=$b?sv($b):Qb,tx=`[object Set]`;function nx(e){return Yh(e)&&vb(e)==tx}var rx=dv&&dv.isSet,ix=rx?sv(rx):nx,ax=1,ox=2,sx=4,cx=`[object Arguments]`,lx=`[object Array]`,ux=`[object Boolean]`,dx=`[object Date]`,fx=`[object Error]`,px=`[object Function]`,mx=`[object GeneratorFunction]`,hx=`[object Map]`,gx=`[object Number]`,_x=`[object Object]`,vx=`[object RegExp]`,yx=`[object Set]`,bx=`[object String]`,xx=`[object Symbol]`,Sx=`[object WeakMap]`,Cx=`[object ArrayBuffer]`,wx=`[object DataView]`,Tx=`[object Float32Array]`,Ex=`[object Float64Array]`,Dx=`[object Int8Array]`,Ox=`[object Int16Array]`,kx=`[object Int32Array]`,Ax=`[object Uint8Array]`,jx=`[object Uint8ClampedArray]`,Mx=`[object Uint16Array]`,Nx=`[object Uint32Array]`,Px={};Px[cx]=Px[lx]=Px[Cx]=Px[wx]=Px[ux]=Px[dx]=Px[Tx]=Px[Ex]=Px[Dx]=Px[Ox]=Px[kx]=Px[hx]=Px[gx]=Px[_x]=Px[vx]=Px[yx]=Px[bx]=Px[xx]=Px[Ax]=Px[jx]=Px[Mx]=Px[Nx]=!0,Px[fx]=Px[px]=Px[Sx]=!1;function Fx(e,t,n,r,i,a){var o,s=t&ax,c=t&ox,l=t&sx;if(n&&(o=i?n(e,r,i,a):n(e)),o!==void 0)return o;if(!cg(e))return e;var u=$h(e);if(u){if(o=bb(e),!s)return Gg(e,o)}else{var d=vb(e),f=d==px||d==mx;if(P_(e))return Gy(e,s);if(d==_x||d==cx||f&&!i){if(o=c||f?{}:Xb(e),!s)return c?$y(e,By(o,e)):Zy(e,zy(o,e))}else{if(!Px[d])return i?e:{};o=Yb(e,d,s)}}a||=new Ry;var p=a.get(e);if(p)return p;a.set(e,o),ix(e)?e.forEach(function(r){o.add(Fx(r,t,n,r,e,a))}):ex(e)&&e.forEach(function(r,i){o.set(i,Fx(r,t,n,i,e,a))});var m=u?void 0:(l?c?nb:tb:c?Ev:bv)(e);return $g(m||e,function(r,i){m&&(i=r,r=e[i]),d_(o,i,Fx(r,t,n,i,e,a))}),o}var Ix=1,Lx=4;function Rx(e){return Fx(e,Ix|Lx)}var zx=`__lodash_hash_undefined__`;function Bx(e){return this.__data__.set(e,zx),this}function Vx(e){return this.__data__.has(e)}function Hx(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new ry;++t<n;)this.add(e[t])}Hx.prototype.add=Hx.prototype.push=Bx,Hx.prototype.has=Vx;function Ux(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 Wx(e,t){return e.has(t)}var Gx=1,Kx=2;function qx(e,t,n,r,i,a){var o=n&Gx,s=e.length,c=t.length;if(s!=c&&!(o&&c>s))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&Kx?new Hx:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var m=e[d],h=t[d];if(r)var g=o?r(h,m,d,t,e,a):r(m,h,d,e,t,a);if(g!==void 0){if(g)continue;f=!1;break}if(p){if(!Ux(t,function(e,t){if(!Wx(p,t)&&(m===e||i(m,e,n,r,a)))return p.push(t)})){f=!1;break}}else if(!(m===h||i(m,h,n,r,a))){f=!1;break}}return a.delete(e),a.delete(t),f}function Jx(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function Yx(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var Xx=1,Zx=2,Qx=`[object Boolean]`,$x=`[object Date]`,eS=`[object Error]`,tS=`[object Map]`,nS=`[object Number]`,rS=`[object RegExp]`,iS=`[object Set]`,aS=`[object String]`,oS=`[object Symbol]`,sS=`[object ArrayBuffer]`,cS=`[object DataView]`,lS=Lh?Lh.prototype:void 0,uS=lS?lS.valueOf:void 0;function dS(e,t,n,r,i,a,o){switch(n){case cS:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case sS:return!(e.byteLength!=t.byteLength||!a(new xb(e),new xb(t)));case Qx:case $x:case nS:return l_(+e,+t);case eS:return e.name==t.name&&e.message==t.message;case rS:case aS:return e==t+``;case tS:var s=Jx;case iS:var c=r&Xx;if(s||=Yx,e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=Zx,o.set(e,t);var u=qx(s(e),s(t),r,i,a,o);return o.delete(e),u;case oS:if(uS)return uS.call(e)==uS.call(t)}return!1}var fS=1,pS=Object.prototype.hasOwnProperty;function mS(e,t,n,r,i,a){var o=n&fS,s=tb(e),c=s.length;if(c!=tb(t).length&&!o)return!1;for(var l=c;l--;){var u=s[l];if(!(o?u in t:pS.call(t,u)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var m=o;++l<c;){u=s[l];var h=e[u],g=t[u];if(r)var _=o?r(g,h,u,t,e,a):r(h,g,u,e,t,a);if(!(_===void 0?h===g||i(h,g,n,r,a):_)){p=!1;break}m||=u==`constructor`}if(p&&!m){var v=e.constructor,y=t.constructor;v!=y&&`constructor`in e&&`constructor`in t&&!(typeof v==`function`&&v instanceof v&&typeof y==`function`&&y instanceof y)&&(p=!1)}return a.delete(e),a.delete(t),p}var hS=1,gS=`[object Arguments]`,_S=`[object Array]`,vS=`[object Object]`,yS=Object.prototype.hasOwnProperty;function bS(e,t,n,r,i,a){var o=$h(e),s=$h(t),c=o?_S:vb(e),l=s?_S:vb(t);c=c==gS?vS:c,l=l==gS?vS:l;var u=c==vS,d=l==vS,f=c==l;if(f&&P_(e)){if(!P_(t))return!1;o=!0,u=!1}if(f&&!u)return a||=new Ry,o||pv(e)?qx(e,t,n,r,i,a):dS(e,t,c,n,r,i,a);if(!(n&hS)){var p=u&&yS.call(e,`__wrapped__`),m=d&&yS.call(t,`__wrapped__`);if(p||m){var h=p?e.value():e,g=m?t.value():t;return a||=new Ry,i(h,g,n,r,a)}}return f?(a||=new Ry,mS(e,t,n,r,i,a)):!1}function xS(e,t,n,r,i){return e===t?!0:e==null||t==null||!Yh(e)&&!Yh(t)?e!==e&&t!==t:bS(e,t,n,r,xS,i)}var SS=1,CS=2;function wS(e,t,n,r){var i=n.length,a=i,o=!r;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=n[i];var c=s[0],l=e[c],u=s[1];if(o&&s[2]){if(l===void 0&&!(c in e))return!1}else{var d=new Ry;if(r)var f=r(l,u,c,e,t,d);if(!(f===void 0?xS(u,l,SS|CS,r,d):f))return!1}}return!0}function TS(e){return e===e&&!cg(e)}function ES(e){for(var t=bv(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,TS(i)]}return t}function DS(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function OS(e){var t=ES(e);return t.length==1&&t[0][2]?DS(t[0][0],t[0][1]):function(n){return n===e||wS(n,e,t)}}function kS(e,t){return e!=null&&t in Object(e)}function AS(e,t,n){t=fy(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=my(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&__(i)&&s_(o,i)&&($h(e)||k_(e)))}function jS(e,t){return e!=null&&AS(e,t,kS)}var MS=1,NS=2;function PS(e,t){return kv(e)&&TS(t)?DS(my(e),t):function(n){var r=Q(n,e);return r===void 0&&r===t?jS(n,e):xS(t,r,MS|NS)}}function FS(e){return function(t){return t?.[e]}}function IS(e){return function(t){return hy(t,e)}}function LS(e){return kv(e)?FS(my(e)):IS(e)}function RS(e){return typeof e==`function`?e:e==null?yg:typeof e==`object`?$h(e)?PS(e[0],e[1]):OS(e):LS(e)}function zS(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}var BS=zS();function VS(e,t){return e&&BS(e,t,bv)}function HS(e,t){return function(n,r){if(n==null)return n;if(!v_(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Object(n);(t?a--:++a<i)&&r(o[a],a,o)!==!1;);return n}}var US=HS(VS);function WS(e,t,n){(n!==void 0&&!l_(e[t],n)||n===void 0&&!(t in e))&&c_(e,t,n)}function GS(e){return Yh(e)&&v_(e)}function KS(e,t){if(!(t===`constructor`&&typeof e[t]==`function`)&&t!=`__proto__`)return e[t]}function qS(e){return f_(e,Ev(e))}function JS(e,t,n,r,i,a,o){var s=KS(e,n),c=KS(t,n),l=o.get(c);if(l){WS(e,n,l);return}var u=a?a(s,c,n+``,e,t,o):void 0,d=u===void 0;if(d){var f=$h(c),p=!f&&P_(c),m=!f&&!p&&pv(c);u=c,f||p||m?$h(s)?u=s:GS(s)?u=Gg(s):p?(d=!1,u=Gy(c,!0)):m?(d=!1,u=kb(c,!0)):u=[]:ky(c)||k_(c)?(u=s,k_(s)?u=qS(s):(!cg(s)||wg(s))&&(u=Xb(c))):d=!1}d&&(o.set(c,u),i(u,c,r,a,o),o.delete(c)),WS(e,n,u)}function YS(e,t,n,r,i){e!==t&&BS(t,function(a,o){if(i||=new Ry,cg(a))JS(e,t,o,n,YS,r,i);else{var s=r?r(KS(e,o),a,o+``,e,t,i):void 0;s===void 0&&(s=a),WS(e,o,s)}},Ev)}function XS(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}var ZS=200;function QS(e,t,n,r){var i=-1,a=i_,o=!0,s=e.length,c=[],l=t.length;if(!s)return c;n&&(t=Qh(t,sv(n))),r?(a=XS,o=!1):t.length>=ZS&&(a=Wx,o=!1,t=new Hx(t));outer:for(;++i<s;){var u=e[i],d=n==null?u:n(u);if(u=r||u!==0?u:0,o&&d===d){for(var f=l;f--;)if(t[f]===d)continue outer;c.push(u)}else a(t,d,r)||c.push(u)}return c}var $S=h_(function(e,t){return GS(e)?QS(e,yy(t,1,GS,!0)):[]});function eC(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function tC(e){return typeof e==`function`?e:yg}function nC(e,t){return($h(e)?$g:US)(e,tC(t))}var rC=1/0;function iC(e){return e!=null&&e.length?yy(e,rC):[]}var aC=Object.prototype.hasOwnProperty;function oC(e,t){return e!=null&&aC.call(e,t)}function sC(e,t){return e!=null&&AS(e,t,oC)}var cC=`[object String]`;function lC(e){return typeof e==`string`||!$h(e)&&Yh(e)&&Jh(e)==cC}function uC(e,t){return Qh(t,function(t){return e[t]})}function dC(e){return e==null?[]:uC(e,bv(e))}var fC=Math.max;function pC(e,t,n,r){e=v_(e)?e:dC(e),n=n&&!r?vg(n):0;var i=e.length;return n<0&&(n=fC(i+n,0)),lC(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&r_(e,t,n)>-1}var mC=Math.min;function hC(e,t,n){for(var r=n?XS:i_,i=e[0].length,a=e.length,o=a,s=Array(a),c=1/0,l=[];o--;){var u=e[o];o&&t&&(u=Qh(u,sv(t))),c=mC(u.length,c),s[o]=!n&&(t||i>=120&&u.length>=120)?new Hx(o&&u):void 0}u=e[0];var d=-1,f=s[0];outer:for(;++d<i&&l.length<c;){var p=u[d],m=t?t(p):p;if(p=n||p!==0?p:0,!(f?Wx(f,m):r(l,m,n))){for(o=a;--o;){var h=s[o];if(!(h?Wx(h,m):r(e[o],m,n)))continue outer}f&&f.push(m),l.push(p)}}return l}function gC(e){return GS(e)?e:[]}var _C=h_(function(e){var t=Qh(e,gC);return t.length&&t[0]===e[0]?hC(t):[]});function vC(e,t){return t.length<2?e:hy(e,Ay(t,0,-1))}var yC=`[object Map]`,bC=`[object Set]`,xC=Object.prototype.hasOwnProperty;function SC(e){if(e==null)return!0;if(v_(e)&&($h(e)||typeof e==`string`||typeof e.splice==`function`||P_(e)||pv(e)||k_(e)))return!e.length;var t=vb(e);if(t==yC||t==bC)return!e.size;if(S_(e))return!yv(e).length;for(var n in e)if(xC.call(e,n))return!1;return!0}function CC(e,t){return xS(e,t)}function wC(e,t,n){n=typeof n==`function`?n:void 0;var r=n?n(e,t):void 0;return r===void 0?xS(e,t,void 0,n):!!r}var TC=`[object Number]`;function EC(e){return typeof e==`number`||Yh(e)&&Jh(e)==TC}function DC(e){return e==null}function OC(e){return e===void 0}var kC=b_(function(e,t,n){YS(e,t,n)}),AC=Object.prototype.hasOwnProperty;function jC(e,t){t=fy(t,e);var n=-1,r=t.length;if(!r)return!0;for(;++n<r;){var i=my(t[n]);if(i===`__proto__`&&!AC.call(e,`__proto__`)||(i===`constructor`||i===`prototype`)&&n<r-1)return!1}var a=vC(e,t);return a==null||delete a[my(eC(t))]}function MC(e){return ky(e)?void 0:e}var NC=1,PC=2,FC=4,IC=xy(function(e,t){var n={};if(e==null)return n;var r=!1;t=Qh(t,function(t){return t=fy(t,e),r||=t.length>1,t}),f_(e,nb(e),n),r&&(n=Fx(n,NC|PC|FC,MC));for(var i=t.length;i--;)jC(n,t[i]);return n});function LC(e,t,n,r){if(!cg(e))return e;t=fy(t,e);for(var i=-1,a=t.length,o=a-1,s=e;s!=null&&++i<a;){var c=my(t[i]),l=n;if(c===`__proto__`||c===`constructor`||c===`prototype`)return e;if(i!=o){var u=s[c];l=r?r(u,c,s):void 0,l===void 0&&(l=cg(u)?u:s_(t[i+1])?[]:{})}d_(s,c,l),s=s[c]}return e}function RC(e,t,n){for(var r=-1,i=t.length,a={};++r<i;){var o=t[r],s=hy(e,o);n(s,o)&&LC(a,fy(o,e),s)}return a}function zC(e,t){if(e==null)return{};var n=Qh(nb(e),function(e){return[e]});return t=RS(t),RC(e,n,function(e,n){return t(e,n[0])})}function BC(e,t){return RC(e,t,function(t,n){return jS(e,n)})}var VC=xy(function(e,t){return e==null?{}:BC(e,t)});function HC(e,t,n,r,i){return i(e,function(e,i,a){n=r?(r=!1,e):t(n,e,i,a)}),n}function UC(e,t,n){var r=$h(e)?jy:HC,i=arguments.length<3;return r(e,RS(t,4),n,i,US)}function WC(e,t,n){return e==null?e:LC(e,t,n)}function GC(e,t,n,r){return r=typeof r==`function`?r:void 0,e==null?e:LC(e,t,n,r)}var KC=9007199254740991,qC=4294967295,JC=Math.min;function YC(e,t){if(e=vg(e),e<1||e>KC)return[];var n=qC,r=JC(e,qC);t=tC(t),e-=qC;for(var i=C_(r,t);++n<e;)t(n);return i}function XC(e){return $h(e)?Qh(e,my):Zh(e)?[e]:Gg(uy(dy(e)))}function ZC(e,t,n){var r=$h(e),i=r||P_(e)||pv(e);if(t=RS(t,4),n==null){var a=e&&e.constructor;n=i?r?new a:[]:cg(e)&&wg(a)?Hg(Sy(e)):{}}return(i?$g:VS)(e,function(e,r,i){return t(n,e,r,i)}),n}var QC=ab&&1/Yx(new ab([,-0]))[1]==1/0?function(e){return new ab(e)}:Wg,$C=200;function ew(e,t,n){var r=-1,i=i_,a=e.length,o=!0,s=[],c=s;if(n)o=!1,i=XS;else if(a>=$C){var l=t?null:QC(e);if(l)return Yx(l);o=!1,i=Wx,c=new Hx}else c=t?[]:s;outer:for(;++r<a;){var u=e[r],d=t?t(u):u;if(u=n||u!==0?u:0,o&&d===d){for(var f=c.length;f--;)if(c[f]===d)continue outer;t&&c.push(d),s.push(u)}else i(c,d,n)||(c!==s&&c.push(d),s.push(u))}return s}var tw=h_(function(e){return ew(yy(e,1,GS,!0))});function nw(e){return e&&e.length?ew(e):[]}var rw=0;function iw(e){var t=++rw;return dy(e)+t}function aw(e,t){return e==null?!0:jC(e,t)}var ow=_i()(e=>({tools:{},setToolData:(t,n)=>e(e=>cw(e,`tools.${t}`,{...e.tools[t],...n})),updateOpenaiObject:(t,n,r)=>e(e=>e.tools[t]?.openaiObject?cw(e,`tools.${t}.openaiObject.${n}`,r):e),pushOpenAiLog:(t,n)=>e(e=>{let r=e.tools[t]?.openaiLogs||[];return cw(e,`tools.${t}.openaiLogs`,[...r,{...n,id:crypto.randomUUID()}])}),setOpenInAppUrl:(t,n)=>e(e=>cw(e,`tools.${t}.openInAppUrl`,n))})),sw=e=>{let{tools:t}=ow();return t[e]},cw=(e,t,n)=>{let r=Rx(e);return WC(r,t,n),r};function lw(e,t,n){try{return e(t)}catch(e){return lt("[nuqs] Error while parsing value `%s`: %O"+(n?" (for key `%s`)":``),t,e,n),null}}function uw(e){function t(t){if(t===void 0)return null;let n=``;if(Array.isArray(t)){if(t[0]===void 0)return null;n=t[0]}return typeof t==`string`&&(n=t),lw(e.parse,n)}return{type:`single`,eq:(e,t)=>e===t,...e,parseServerSide:t,withDefault(e){return{...this,defaultValue:e,parseServerSide(n){return t(n)??e}}},withOptions(e){return{...this,...e}}}}var dw=uw({parse:e=>e,serialize:String});uw({parse:e=>{let t=parseInt(e);return t==t?t:null},serialize:e=>``+Math.round(e)}),uw({parse:e=>{let t=parseInt(e);return t==t?t-1:null},serialize:e=>``+Math.round(e+1)}),uw({parse:e=>{let t=parseInt(e,16);return t==t?t:null},serialize:e=>{let t=Math.round(e).toString(16);return(t.length&1?`0`:``)+t}}),uw({parse:e=>{let t=parseFloat(e);return t==t?t:null},serialize:String}),uw({parse:e=>e.toLowerCase()===`true`,serialize:String});function fw(e,t){return e.valueOf()===t.valueOf()}uw({parse:e=>{let t=parseInt(e);return t==t?new Date(t):null},serialize:e=>``+e.valueOf(),eq:fw}),uw({parse:e=>{let t=new Date(e);return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString(),eq:fw}),uw({parse:e=>{let t=new Date(e.slice(0,10));return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString().slice(0,10),eq:fw});var pw=Et(),mw={};function hw(e,t={}){let n=(0,b.useId)(),r=yt(),i=bt(),{history:a=`replace`,scroll:o=r?.scroll??!1,shallow:s=r?.shallow??!0,throttleMs:c=Ct.timeMs,limitUrlUpdates:l=r?.limitUrlUpdates,clearOnDefault:u=r?.clearOnDefault??!0,startTransition:d,urlKeys:f=mw}=t,p=Object.keys(e).join(`,`),m=(0,b.useMemo)(()=>Object.fromEntries(Object.keys(e).map(e=>[e,f[e]??e])),[p,JSON.stringify(f)]),h=vt(Object.values(m)),g=h.searchParams,_=(0,b.useRef)({}),v=(0,b.useMemo)(()=>Object.fromEntries(Object.keys(e).map(t=>[t,e[t].defaultValue??null])),[Object.values(e).map(({defaultValue:e})=>e).join(`,`)]),y=Ft.useQueuedQueries(Object.values(m)),[x,S]=(0,b.useState)(()=>gw(e,f,g??new URLSearchParams,y).state),C=(0,b.useRef)(x);if(ct("[nuq+ %s `%s`] render - state: %O, iSP: %s",n,p,x,g),Object.keys(_.current).join(`&`)!==Object.values(m).join(`&`)){let{state:t,hasChanged:r}=gw(e,f,g,y,_.current,C.current);r&&(ct("[nuq+ %s `%s`] State changed: %O",n,p,{state:t,initialSearchParams:g,queuedQueries:y,queryRef:_.current,stateRef:C.current}),C.current=t,S(t)),_.current=Object.fromEntries(Object.entries(m).map(([t,n])=>[n,e[t]?.type===`multi`?g?.getAll(n):g?.get(n)??null]))}(0,b.useEffect)(()=>{let{state:t,hasChanged:r}=gw(e,f,g,y,_.current,C.current);r&&(ct("[nuq+ %s `%s`] State changed: %O",n,p,{state:t,initialSearchParams:g,queuedQueries:y,queryRef:_.current,stateRef:C.current}),C.current=t,S(t))},[Object.values(m).map(e=>`${e}=${g?.getAll(e)}`).join(`&`),JSON.stringify(y)]),(0,b.useEffect)(()=>{let t=Object.keys(e).reduce((t,r)=>(t[r]=({state:t,query:i})=>{S(a=>{let{defaultValue:o}=e[r],s=m[r],c=t??o??null,l=a[r]??o??null;return Object.is(l,c)?(ct("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). no change, skipping, resolved: %O",n,p,s,t,o,C.current),a):(C.current={...C.current,[r]:c},_.current[s]=i,ct("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). updateInternalState, resolved: %O",n,p,s,t,o,C.current),C.current)})},t),{});for(let r of Object.keys(e)){let e=m[r];ct("[nuq+ %s `%s`] Subscribing to sync for `%s`",n,e,p),pw.on(e,t[r])}return()=>{for(let r of Object.keys(e)){let e=m[r];ct("[nuq+ %s `%s`] Unsubscribing to sync for `%s`",n,e,p),pw.off(e,t[r])}}},[p,m]);let w=(0,b.useCallback)((t,r={})=>{let f=Object.fromEntries(Object.keys(e).map(e=>[e,null])),g=typeof t==`function`?t(_w(C.current,v))??f:t??f;ct("[nuq+ %s `%s`] setState: %O",n,p,g);let _,y=0,b=!1,x=[];for(let[t,n]of Object.entries(g)){let f=e[t],p=m[t];if(!f||n===void 0)continue;(r.clearOnDefault??f.clearOnDefault??u)&&n!==null&&f.defaultValue!==void 0&&(f.eq??((e,t)=>e===t))(n,f.defaultValue)&&(n=null);let g=n===null?null:(f.serialize??String)(n);pw.emit(p,{state:n,query:g});let v={key:p,query:g,options:{history:r.history??f.history??a,shallow:r.shallow??f.shallow??s,scroll:r.scroll??f.scroll??o,startTransition:r.startTransition??f.startTransition??d}};if(r?.limitUrlUpdates?.method===`debounce`||l?.method===`debounce`||f.limitUrlUpdates?.method===`debounce`){v.options.shallow===!0&&console.warn(pt(422));let e=r?.limitUrlUpdates?.timeMs??l?.timeMs??f.limitUrlUpdates?.timeMs??Ct.timeMs,t=Ft.push(v,e,h,i);y<e&&(_=t,y=e)}else{let e=r?.limitUrlUpdates?.timeMs??f?.limitUrlUpdates?.timeMs??l?.timeMs??r.throttleMs??f.throttleMs??c;x.push(Ft.abort(p)),Mt.push(v,e),b=!0}}let S=x.reduce((e,t)=>t(e),b?Mt.flush(h,i):Mt.getPendingPromise(h));return _??S},[p,a,s,o,c,l?.method,l?.timeMs,d,m,h.updateUrl,h.getSearchParamsSnapshot,h.rateLimitFactor,i,v]);return[(0,b.useMemo)(()=>_w(x,v),[x,v]),w]}function gw(e,t,n,r,i,a){let o=!1,s=Object.entries(e).reduce((e,[s,c])=>{let l=t?.[s]??s,u=r[l],d=c.type===`multi`?[]:null,f=u===void 0?(c.type===`multi`?n?.getAll(l):n?.get(l))??d:u;return i&&a&&It(i[l]??d,f)?(e[s]=a[s]??null,e):(o=!0,e[s]=(wt(f)?null:lw(c.parse,f,l))??null,i&&(i[l]=f),e)},{});if(!o){let t=Object.keys(e),n=Object.keys(a??{});o=t.length!==n.length||t.some(e=>!n.includes(e))}return{state:s,hasChanged:o}}function _w(e,t){return Object.fromEntries(Object.keys(e).map(n=>[n,e[n]??t[n]??null]))}function vw(e,t={}){let{parse:n,type:r,serialize:i,eq:a,defaultValue:o,...s}=t,[{[e]:c},l]=hw({[e]:{parse:n??(e=>e),type:r,serialize:i,eq:a,defaultValue:o}},s);return[c,(0,b.useCallback)((t,n={})=>l(n=>({[e]:typeof t==`function`?t(n[e]):t}),n),[e,l])]}function yw(){return vw(`tool`,dw)}var bw=new Be,xw=`skybridge-devtools-oauth`,Sw={clientInfo:`${xw}:client-info`,tokens:`${xw}:tokens`,codeVerifier:`${xw}:code-verifier`,state:`${xw}:state`},Cw=class{get redirectUrl(){let e=new URL(window.location.origin+window.location.pathname);return e.searchParams.set(`oauth_callback`,`true`),e.toString()}get clientMetadata(){return{redirect_uris:[this.redirectUrl],token_endpoint_auth_method:`none`,grant_types:[`authorization_code`,`refresh_token`],response_types:[`code`],client_name:`Skybridge Devtools`,client_uri:window.location.origin}}clientInformation(){let e=localStorage.getItem(Sw.clientInfo);return e?JSON.parse(e):void 0}saveClientInformation(e){localStorage.setItem(Sw.clientInfo,JSON.stringify(e))}tokens(){let e=localStorage.getItem(Sw.tokens);return e?JSON.parse(e):void 0}saveTokens(e){localStorage.setItem(Sw.tokens,JSON.stringify(e))}state(){let e=localStorage.getItem(Sw.state);if(e)return e;let t=crypto.randomUUID();return localStorage.setItem(Sw.state,t),t}redirectToAuthorization(e){window.location.href=e.toString()}saveCodeVerifier(e){localStorage.setItem(Sw.codeVerifier,e)}codeVerifier(){return localStorage.getItem(Sw.codeVerifier)??``}invalidateCredentials(e){(e===`all`||e===`tokens`)&&localStorage.removeItem(Sw.tokens),(e===`all`||e===`client`)&&localStorage.removeItem(Sw.clientInfo),(e===`all`||e===`verifier`)&&(localStorage.removeItem(Sw.codeVerifier),localStorage.removeItem(Sw.state))}};function ww(e){return!!e._zod}function Tw(e,t){return ww(e)?ba(e,t):e.safeParse(t)}function Ew(e){if(!e)return;let t;if(t=ww(e)?e._zod?.def?.shape:e.shape,t){if(typeof t==`function`)try{return t()}catch{return}return t}}function Dw(e){if(ww(e)){let t=e._zod?.def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}}let t=e._def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}let n=e.value;if(n!==void 0)return n}function Ow(e){return e===`completed`||e===`failed`||e===`cancelled`}function kw(e){let t=Ew(e)?.method;if(!t)throw Error(`Schema is missing a method literal`);let n=Dw(t);if(typeof n!=`string`)throw Error(`Schema method literal must be a string`);return n}function Aw(e,t){let n=Tw(e,t);if(!n.success)throw n.error;return n.data}var jw=class{constructor(e){this._options=e,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(af,e=>{this._oncancel(e)}),this.setNotificationHandler(Sf,e=>{this._onprogress(e)}),this.setRequestHandler(yf,e=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(jf,async(e,t)=>{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new mm(Qd.InvalidParams,`Failed to retrieve task: Task not found`);return{...n}}),this.setRequestHandler(Nf,async(e,t)=>{let n=async()=>{let r=e.params.taskId;if(this._taskMessageQueue){let e;for(;e=await this._taskMessageQueue.dequeue(r,t.sessionId);){if(e.type===`response`||e.type===`error`){let t=e.message,n=t.id,r=this._requestResolvers.get(n);if(r)if(this._requestResolvers.delete(n),e.type===`response`)r(t);else{let e=t;r(new mm(e.error.code,e.error.message,e.error.data))}else{let t=e.type===`response`?`Response`:`Error`;this._onerror(Error(`${t} handler missing for request ${n}`))}continue}await this._transport?.send(e.message,{relatedRequestId:t.requestId})}}let i=await this._taskStore.getTask(r,t.sessionId);if(!i)throw new mm(Qd.InvalidParams,`Task not found: ${r}`);if(!Ow(i.status))return await this._waitForTaskUpdate(r,t.signal),await n();if(Ow(i.status)){let e=await this._taskStore.getTaskResult(r,t.sessionId);return this._clearTaskQueue(r),{...e,_meta:{...e._meta,[jd]:{taskId:r}}}}return await n()};return await n()}),this.setRequestHandler(Pf,async(e,t)=>{try{let{tasks:n,nextCursor:r}=await this._taskStore.listTasks(e.params?.cursor,t.sessionId);return{tasks:n,nextCursor:r,_meta:{}}}catch(e){throw new mm(Qd.InvalidParams,`Failed to list tasks: ${e instanceof Error?e.message:String(e)}`)}}),this.setRequestHandler(If,async(e,t)=>{try{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new mm(Qd.InvalidParams,`Task not found: ${e.params.taskId}`);if(Ow(n.status))throw new mm(Qd.InvalidParams,`Cannot cancel task in terminal status: ${n.status}`);await this._taskStore.updateTaskStatus(e.params.taskId,`cancelled`,`Client cancelled task execution.`,t.sessionId),this._clearTaskQueue(e.params.taskId);let r=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!r)throw new mm(Qd.InvalidParams,`Task not found after cancellation: ${e.params.taskId}`);return{_meta:{},...r}}catch(e){throw e instanceof mm?e:new mm(Qd.InvalidRequest,`Failed to cancel task: ${e instanceof Error?e.message:String(e)}`)}}))}async _oncancel(e){e.params.requestId&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,r,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),mm.fromError(Qd.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){if(this._transport)throw Error(`Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.`);this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{t?.(),this._onclose()};let n=this.transport?.onerror;this._transport.onerror=e=>{n?.(e),this._onerror(e)};let r=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{r?.(e,t),Zd(e)||ef(e)?this._onresponse(e):qd(e)?this._onrequest(e,t):Yd(e)?this._onnotification(e):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();for(let e of this._requestHandlerAbortControllers.values())e.abort();this._requestHandlerAbortControllers.clear();let t=mm.fromError(Qd.ConnectionClosed,`Connection closed`);this._transport=void 0,this.onclose?.();for(let n of e.values())n(t)}_onerror(e){this.onerror?.(e)}_onnotification(e){let t=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;t!==void 0&&Promise.resolve().then(()=>t(e)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){let n=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,r=this._transport,i=e.params?._meta?.[jd]?.taskId;if(n===void 0){let t={jsonrpc:`2.0`,id:e.id,error:{code:Qd.MethodNotFound,message:`Method not found`}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:`error`,message:t,timestamp:Date.now()},r?.sessionId).catch(e=>this._onerror(Error(`Failed to enqueue error response: ${e}`))):r?.send(t).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)));return}let a=new AbortController;this._requestHandlerAbortControllers.set(e.id,a);let o=Bd(e.params)?e.params.task:void 0,s=this._taskStore?this.requestTaskStore(e,r?.sessionId):void 0,c={signal:a.signal,sessionId:r?.sessionId,_meta:e.params?._meta,sendNotification:async t=>{if(a.signal.aborted)return;let n={relatedRequestId:e.id};i&&(n.relatedTask={taskId:i}),await this.notification(t,n)},sendRequest:async(t,n,r)=>{if(a.signal.aborted)throw new mm(Qd.ConnectionClosed,`Request was cancelled`);let o={...r,relatedRequestId:e.id};i&&!o.relatedTask&&(o.relatedTask={taskId:i});let c=o.relatedTask?.taskId??i;return c&&s&&await s.updateTaskStatus(c,`input_required`),await this.request(t,n,o)},authInfo:t?.authInfo,requestId:e.id,requestInfo:t?.requestInfo,taskId:i,taskStore:s,taskRequestedTtl:o?.ttl,closeSSEStream:t?.closeSSEStream,closeStandaloneSSEStream:t?.closeStandaloneSSEStream};Promise.resolve().then(()=>{o&&this.assertTaskHandlerCapability(e.method)}).then(()=>n(e,c)).then(async t=>{if(a.signal.aborted)return;let n={result:t,jsonrpc:`2.0`,id:e.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`response`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)},async t=>{if(a.signal.aborted)return;let n={jsonrpc:`2.0`,id:e.id,error:{code:Number.isSafeInteger(t.code)?t.code:Qd.InternalError,message:t.message??`Internal error`,...t.data!==void 0&&{data:t.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`error`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===a&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,r=Number(t),i=this._progressHandlers.get(r);if(!i){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(r),o=this._timeoutInfo.get(r);if(o&&a&&o.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(e){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(e);return}i(n)}_onresponse(e){let t=Number(e.id),n=this._requestResolvers.get(t);if(n){this._requestResolvers.delete(t),Zd(e)?n(e):n(new mm(e.error.code,e.error.message,e.error.data));return}let r=this._responseHandlers.get(t);if(r===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t);let i=!1;if(Zd(e)&&e.result&&typeof e.result==`object`){let n=e.result;if(n.task&&typeof n.task==`object`){let e=n.task;typeof e.taskId==`string`&&(i=!0,this._taskProgressTokens.set(e.taskId,t))}}i||this._progressHandlers.delete(t),Zd(e)?r(e):r(mm.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(e,t,n){let{task:r}=n??{};if(!r){try{yield{type:`result`,result:await this.request(e,t,n)}}catch(e){yield{type:`error`,error:e instanceof mm?e:new mm(Qd.InternalError,String(e))}}return}let i;try{let r=await this.request(e,Of,n);if(r.task)i=r.task.taskId,yield{type:`taskCreated`,task:r.task};else throw new mm(Qd.InternalError,`Task creation did not return a task`);for(;;){let e=await this.getTask({taskId:i},n);if(yield{type:`taskStatus`,task:e},Ow(e.status)){e.status===`completed`?yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)}:e.status===`failed`?yield{type:`error`,error:new mm(Qd.InternalError,`Task ${i} failed`)}:e.status===`cancelled`&&(yield{type:`error`,error:new mm(Qd.InternalError,`Task ${i} was cancelled`)});return}if(e.status===`input_required`){yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)};return}let r=e.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(e=>setTimeout(e,r)),n?.signal?.throwIfAborted()}}catch(e){yield{type:`error`,error:e instanceof mm?e:new mm(Qd.InternalError,String(e))}}}request(e,t,n){let{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a,task:o,relatedTask:s}=n??{};return new Promise((c,l)=>{let u=e=>{l(e)};if(!this._transport){u(Error(`Not connected`));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(e.method),o&&this.assertTaskCapability(e.method)}catch(e){u(e);return}n?.signal?.throwIfAborted();let d=this._requestMessageId++,f={...e,jsonrpc:`2.0`,id:d};n?.onprogress&&(this._progressHandlers.set(d,n.onprogress),f.params={...e.params,_meta:{...e.params?._meta||{},progressToken:d}}),o&&(f.params={...f.params,task:o}),s&&(f.params={...f.params,_meta:{...f.params?._meta||{},[jd]:s}});let p=e=>{this._responseHandlers.delete(d),this._progressHandlers.delete(d),this._cleanupTimeout(d),this._transport?.send({jsonrpc:`2.0`,method:`notifications/cancelled`,params:{requestId:d,reason:String(e)}},{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))),l(e instanceof mm?e:new mm(Qd.RequestTimeout,String(e)))};this._responseHandlers.set(d,e=>{if(!n?.signal?.aborted){if(e instanceof Error)return l(e);try{let n=Tw(t,e.result);n.success?c(n.data):l(n.error)}catch(e){l(e)}}}),n?.signal?.addEventListener(`abort`,()=>{p(n?.signal?.reason)});let m=n?.timeout??6e4;this._setupTimeout(d,m,n?.maxTotalTimeout,()=>p(mm.fromError(Qd.RequestTimeout,`Request timed out`,{timeout:m})),n?.resetTimeoutOnProgress??!1);let h=s?.taskId;h?(this._requestResolvers.set(d,e=>{let t=this._responseHandlers.get(d);t?t(e):this._onerror(Error(`Response handler missing for side-channeled request ${d}`))}),this._enqueueTaskMessage(h,{type:`request`,message:f,timestamp:Date.now()}).catch(e=>{this._cleanupTimeout(d),l(e)})):this._transport.send(f,{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>{this._cleanupTimeout(d),l(e)})})}async getTask(e,t){return this.request({method:`tasks/get`,params:e},Mf,t)}async getTaskResult(e,t,n){return this.request({method:`tasks/result`,params:e},t,n)}async listTasks(e,t){return this.request({method:`tasks/list`,params:e},Ff,t)}async cancelTask(e,t){return this.request({method:`tasks/cancel`,params:e},Lf,t)}async notification(e,t){if(!this._transport)throw Error(`Not connected`);this.assertNotificationCapability(e.method);let n=t?.relatedTask?.taskId;if(n){let r={...e,jsonrpc:`2.0`,params:{...e.params,_meta:{...e.params?._meta||{},[jd]:t.relatedTask}}};await this._enqueueTaskMessage(n,{type:`notification`,message:r,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!t?.relatedRequestId&&!t?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let n={...e,jsonrpc:`2.0`};t?.relatedTask&&(n={...n,params:{...n.params,_meta:{...n.params?._meta||{},[jd]:t.relatedTask}}}),this._transport?.send(n,t).catch(e=>this._onerror(e))});return}let r={...e,jsonrpc:`2.0`};t?.relatedTask&&(r={...r,params:{...r.params,_meta:{...r.params?._meta||{},[jd]:t.relatedTask}}}),await this._transport.send(r,t)}setRequestHandler(e,t){let n=kw(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(n,r)=>{let i=Aw(e,n);return Promise.resolve(t(i,r))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t){let n=kw(e);this._notificationHandlers.set(n,n=>{let r=Aw(e,n);return Promise.resolve(t(r))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){let t=this._taskProgressTokens.get(e);t!==void 0&&(this._progressHandlers.delete(t),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,t,n){if(!this._taskStore||!this._taskMessageQueue)throw Error(`Cannot enqueue task message: taskStore and taskMessageQueue are not configured`);let r=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,t,n,r)}async _clearTaskQueue(e,t){if(this._taskMessageQueue){let n=await this._taskMessageQueue.dequeueAll(e,t);for(let t of n)if(t.type===`request`&&qd(t.message)){let n=t.message.id,r=this._requestResolvers.get(n);r?(r(new mm(Qd.InternalError,`Task cancelled or completed`)),this._requestResolvers.delete(n)):this._onerror(Error(`Resolver missing for request ${n} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,t){let n=this._options?.defaultTaskPollInterval??1e3;try{let t=await this._taskStore?.getTask(e);t?.pollInterval&&(n=t.pollInterval)}catch{}return new Promise((e,r)=>{if(t.aborted){r(new mm(Qd.InvalidRequest,`Request cancelled`));return}let i=setTimeout(e,n);t.addEventListener(`abort`,()=>{clearTimeout(i),r(new mm(Qd.InvalidRequest,`Request cancelled`))},{once:!0})})}requestTaskStore(e,t){let n=this._taskStore;if(!n)throw Error(`No task store configured`);return{createTask:async r=>{if(!e)throw Error(`No request provided`);return await n.createTask(r,e.id,{method:e.method,params:e.params},t)},getTask:async e=>{let r=await n.getTask(e,t);if(!r)throw new mm(Qd.InvalidParams,`Failed to retrieve task: Task not found`);return r},storeTaskResult:async(e,r,i)=>{await n.storeTaskResult(e,r,i,t);let a=await n.getTask(e,t);if(a){let t=Af.parse({method:`notifications/tasks/status`,params:a});await this.notification(t),Ow(a.status)&&this._cleanupTaskProgressHandler(e)}},getTaskResult:e=>n.getTaskResult(e,t),updateTaskStatus:async(e,r,i)=>{let a=await n.getTask(e,t);if(!a)throw new mm(Qd.InvalidParams,`Task "${e}" not found - it may have been cleaned up`);if(Ow(a.status))throw new mm(Qd.InvalidParams,`Cannot update task "${e}" from terminal status "${a.status}" to "${r}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(e,r,i,t);let o=await n.getTask(e,t);if(o){let t=Af.parse({method:`notifications/tasks/status`,params:o});await this.notification(t),Ow(o.status)&&this._cleanupTaskProgressHandler(e)}},listTasks:e=>n.listTasks(e,t)}}};function Mw(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Nw(e,t){let n={...e};for(let e in t){let r=e,i=t[r];if(i===void 0)continue;let a=n[r];Mw(a)&&Mw(i)?n[r]={...a,...i}:n[r]=i}return n}var Pw=s((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;var t=class{};e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var n=class extends t{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw Error(`CodeGen: name must be a valid identifier`);this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};e.Name=n;var r=class extends t{constructor(e){super(),this._items=typeof e==`string`?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===``||e===`""`}get str(){return this._str??=this._items.reduce((e,t)=>`${e}${t}`,``)}get names(){return this._names??=this._items.reduce((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e),{})}};e._Code=r,e.nil=new r(``);function i(e,...t){let n=[e[0]],i=0;for(;i<t.length;)s(n,t[i]),n.push(e[++i]);return new r(n)}e._=i;var a=new r(`+`);function o(e,...t){let n=[p(e[0])],i=0;for(;i<t.length;)n.push(a),s(n,t[i]),n.push(a,p(e[++i]));return c(n),new r(n)}e.str=o;function s(e,t){t instanceof r?e.push(...t._items):t instanceof n?e.push(t):e.push(d(t))}e.addCodeArg=s;function c(e){let t=1;for(;t<e.length-1;){if(e[t]===a){let n=l(e[t-1],e[t+1]);if(n!==void 0){e.splice(t-1,3,n);continue}e[t++]=`+`}t++}}function l(e,t){if(t===`""`)return e;if(e===`""`)return t;if(typeof e==`string`)return t instanceof n||e[e.length-1]!==`"`?void 0:typeof t==`string`?t[0]===`"`?e.slice(0,-1)+t.slice(1):void 0:`${e.slice(0,-1)}${t}"`;if(typeof t==`string`&&t[0]===`"`&&!(e instanceof n))return`"${e}${t.slice(1)}`}function u(e,t){return t.emptyStr()?e:e.emptyStr()?t:o`${e}${t}`}e.strConcat=u;function d(e){return typeof e==`number`||typeof e==`boolean`||e===null?e:p(Array.isArray(e)?e.join(`,`):e)}function f(e){return new r(p(e))}e.stringify=f;function p(e){return JSON.stringify(e).replace(/\u2028/g,`\\u2028`).replace(/\u2029/g,`\\u2029`)}e.safeStringify=p;function m(t){return typeof t==`string`&&e.IDENTIFIER.test(t)?new r(`.${t}`):i`[${t}]`}e.getProperty=m;function h(t){if(typeof t==`string`&&e.IDENTIFIER.test(t))return new r(`${t}`);throw Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}e.getEsmExportName=h;function g(e){return new r(e.toString())}e.regexpCode=g})),Fw=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;var t=Pw(),n=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},r;(function(e){e[e.Started=0]=`Started`,e[e.Completed=1]=`Completed`})(r||(e.UsedValueState=r={})),e.varKinds={const:new t.Name(`const`),let:new t.Name(`let`),var:new t.Name(`var`)};var i=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof t.Name?e:this.name(e)}name(e){return new t.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){if((this._parent?._prefixes)?.has(e)||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};e.Scope=i;var a=class extends t.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:n,itemIndex:r}){this.value=e,this.scopePath=(0,t._)`.${new t.Name(n)}[${r}]`}};e.ValueScopeName=a;var o=(0,t._)`\n`;e.ValueScope=class extends i{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?o:t.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){if(t.ref===void 0)throw Error(`CodeGen: ref must be passed in value`);let n=this.toName(e),{prefix:r}=n,i=t.key??t.ref,a=this._values[r];if(a){let e=a.get(i);if(e)return e}else a=this._values[r]=new Map;a.set(i,n);let o=this._scope[r]||(this._scope[r]=[]),s=o.length;return o[s]=t.ref,n.setValue(t,{property:r,itemIndex:s}),n}getValue(e,t){let n=this._values[e];if(n)return n.get(t)}scopeRefs(e,n=this._values){return this._reduceValues(n,n=>{if(n.scopePath===void 0)throw Error(`CodeGen: name "${n}" has no value`);return(0,t._)`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,e=>{if(e.value===void 0)throw Error(`CodeGen: name "${e}" has no value`);return e.value.code},t,n)}_reduceValues(i,a,o={},s){let c=t.nil;for(let l in i){let u=i[l];if(!u)continue;let d=o[l]=o[l]||new Map;u.forEach(i=>{if(d.has(i))return;d.set(i,r.Started);let o=a(i);if(o){let n=this.opts.es5?e.varKinds.var:e.varKinds.const;c=(0,t._)`${c}${n} ${i} = ${o};${this.opts._n}`}else if(o=s?.(i))c=(0,t._)`${c}${o}${this.opts._n}`;else throw new n(i);d.set(i,r.Completed)})}return c}}})),Iw=s((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;var t=Pw(),n=Fw(),r=Pw();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=Fw();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(`+`)};var a=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},o=class extends a{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let r=e?n.varKinds.var:this.varKind,i=this.rhs===void 0?``:` = ${this.rhs}`;return`${r} ${this.name}${i};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&=k(this.rhs,e,t),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}},s=class extends a{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,n){if(!(this.lhs instanceof t.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=k(this.rhs,e,n),this}get names(){return O(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}},c=class extends s{constructor(e,t,n,r){super(e,n,r),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},l=class extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},u=class extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:``};`+e}},d=class extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},f=class extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=k(this.code,e,t),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}},p=class extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),``)}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,r=n.length;for(;r--;){let i=n[r];i.optimizeNames(e,t)||(A(e,i.names),n.splice(r,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>D(e,t.names),{})}},m=class extends p{render(e){return`{`+e._n+super.render(e)+`}`+e._n}},h=class extends p{},g=class extends m{};g.kind=`else`;var _=class e extends m{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+=`else `+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let n=this.else;if(n){let e=n.optimizeNodes();n=this.else=Array.isArray(e)?new g(e):e}if(n)return t===!1?n instanceof e?n:n.nodes:this.nodes.length?this:new e(j(t),n instanceof e?[n]:n.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(e,t){if(this.else=this.else?.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=k(this.condition,e,t),this}get names(){let e=super.names;return O(e,this.condition),this.else&&D(e,this.else.names),e}};_.kind=`if`;var v=class extends m{};v.kind=`for`;var y=class extends v{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=k(this.iteration,e,t),this}get names(){return D(super.names,this.iteration.names)}},b=class extends v{constructor(e,t,n,r){super(),this.varKind=e,this.name=t,this.from=n,this.to=r}render(e){let t=e.es5?n.varKinds.var:this.varKind,{name:r,from:i,to:a}=this;return`for(${t} ${r}=${i}; ${r}<${a}; ${r}++)`+super.render(e)}get names(){return O(O(super.names,this.from),this.to)}},x=class extends v{constructor(e,t,n,r){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=r}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=k(this.iterable,e,t),this}get names(){return D(super.names,this.iterable.names)}},S=class extends m{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){return`${this.async?`async `:``}function ${this.name}(${this.args})`+super.render(e)}};S.kind=`func`;var C=class extends p{render(e){return`return `+super.render(e)}};C.kind=`return`;var w=class extends m{render(e){let t=`try`+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)==null||e.optimizeNodes(),(t=this.finally)==null||t.optimizeNodes(),this}optimizeNames(e,t){var n,r;return super.optimizeNames(e,t),(n=this.catch)==null||n.optimizeNames(e,t),(r=this.finally)==null||r.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&D(e,this.catch.names),this.finally&&D(e,this.finally.names),e}},T=class extends m{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};T.kind=`catch`;var E=class extends m{render(e){return`finally`+super.render(e)}};E.kind=`finally`,e.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
|
|
51
|
+
`:``},this._extScope=e,this._scope=new n.Scope({parent:e}),this._nodes=[new h]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,n,r){let i=this._scope.toName(t);return n!==void 0&&r&&(this._constants[i.str]=n),this._leafNode(new o(e,i,n)),i}const(e,t,r){return this._def(n.varKinds.const,e,t,r)}let(e,t,r){return this._def(n.varKinds.let,e,t,r)}var(e,t,r){return this._def(n.varKinds.var,e,t,r)}assign(e,t,n){return this._leafNode(new s(e,t,n))}add(t,n){return this._leafNode(new c(t,e.operators.ADD,n))}code(e){return typeof e==`function`?e():e!==t.nil&&this._leafNode(new f(e)),this}object(...e){let n=[`{`];for(let[r,i]of e)n.length>1&&n.push(`,`),n.push(r),(r!==i||this.opts.es5)&&(n.push(`:`),(0,t.addCodeArg)(n,i));return n.push(`}`),new t._Code(n)}if(e,t,n){if(this._blockNode(new _(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw Error(`CodeGen: "else" body without "then" body`);return this}elseIf(e){return this._elseNode(new _(e))}else(){return this._elseNode(new g)}endIf(){return this._endBlockNode(_,g)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new y(e),t)}forRange(e,t,r,i,a=this.opts.es5?n.varKinds.var:n.varKinds.let){let o=this._scope.toName(e);return this._for(new b(a,o,t,r),()=>i(o))}forOf(e,r,i,a=n.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let e=r instanceof t.Name?r:this.var(`_arr`,r);return this.forRange(`_i`,0,(0,t._)`${e}.length`,n=>{this.var(o,(0,t._)`${e}[${n}]`),i(o)})}return this._for(new x(`of`,a,o,r),()=>i(o))}forIn(e,r,i,a=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,t._)`Object.keys(${r})`,i);let o=this._scope.toName(e);return this._for(new x(`in`,a,o,r),()=>i(o))}endFor(){return this._endBlockNode(v)}label(e){return this._leafNode(new l(e))}break(e){return this._leafNode(new u(e))}return(e){let t=new C;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw Error(`CodeGen: "return" should have one node`);return this._endBlockNode(C)}try(e,t,n){if(!t&&!n)throw Error(`CodeGen: "try" without "catch" and "finally"`);let r=new w;if(this._blockNode(r),this.code(e),t){let e=this.name(`e`);this._currNode=r.catch=new T(e),t(e)}return n&&(this._currNode=r.finally=new E,this.code(n)),this._endBlockNode(T,E)}throw(e){return this._leafNode(new d(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw Error(`CodeGen: not in self-balancing block`);let n=this._nodes.length-t;if(n<0||e!==void 0&&n!==e)throw Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,n=t.nil,r,i){return this._blockNode(new S(e,n,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(S)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof _))throw Error(`CodeGen: "else" without "if"`);return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}};function D(e,t){for(let n in t)e[n]=(e[n]||0)+(t[n]||0);return e}function O(e,n){return n instanceof t._CodeOrName?D(e,n.names):e}function k(e,n,r){if(e instanceof t.Name)return i(e);if(!a(e))return e;return new t._Code(e._items.reduce((e,n)=>(n instanceof t.Name&&(n=i(n)),n instanceof t._Code?e.push(...n._items):e.push(n),e),[]));function i(e){let t=r[e.str];return t===void 0||n[e.str]!==1?e:(delete n[e.str],t)}function a(e){return e instanceof t._Code&&e._items.some(e=>e instanceof t.Name&&n[e.str]===1&&r[e.str]!==void 0)}}function A(e,t){for(let n in t)e[n]=(e[n]||0)-(t[n]||0)}function j(e){return typeof e==`boolean`||typeof e==`number`||e===null?!e:(0,t._)`!${L(e)}`}e.not=j;var M=I(e.operators.AND);function N(...e){return e.reduce(M)}e.and=N;var P=I(e.operators.OR);function F(...e){return e.reduce(P)}e.or=F;function I(e){return(n,r)=>n===t.nil?r:r===t.nil?n:(0,t._)`${L(n)} ${e} ${L(r)}`}function L(e){return e instanceof t.Name?e:(0,t._)`(${e})`}})),Lw=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;var t=Iw(),n=Pw();function r(e){let t={};for(let n of e)t[n]=!0;return t}e.toHash=r;function i(e,t){return typeof t==`boolean`?t:Object.keys(t).length===0?!0:(a(e,t),!o(t,e.self.RULES.all))}e.alwaysValidSchema=i;function a(e,t=e.schema){let{opts:n,self:r}=e;if(!n.strictSchema||typeof t==`boolean`)return;let i=r.RULES.keywords;for(let n in t)i[n]||x(e,`unknown keyword: "${n}"`)}e.checkUnknownRules=a;function o(e,t){if(typeof e==`boolean`)return!e;for(let n in e)if(t[n])return!0;return!1}e.schemaHasRules=o;function s(e,t){if(typeof e==`boolean`)return!e;for(let n in e)if(n!==`$ref`&&t.all[n])return!0;return!1}e.schemaHasRulesButRef=s;function c({topSchemaRef:e,schemaPath:n},r,i,a){if(!a){if(typeof r==`number`||typeof r==`boolean`)return r;if(typeof r==`string`)return(0,t._)`${r}`}return(0,t._)`${e}${n}${(0,t.getProperty)(i)}`}e.schemaRefOrVal=c;function l(e){return f(decodeURIComponent(e))}e.unescapeFragment=l;function u(e){return encodeURIComponent(d(e))}e.escapeFragment=u;function d(e){return typeof e==`number`?`${e}`:e.replace(/~/g,`~0`).replace(/\//g,`~1`)}e.escapeJsonPointer=d;function f(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}e.unescapeJsonPointer=f;function p(e,t){if(Array.isArray(e))for(let n of e)t(n);else t(e)}e.eachItem=p;function m({mergeNames:e,mergeToName:n,mergeValues:r,resultToName:i}){return(a,o,s,c)=>{let l=s===void 0?o:s instanceof t.Name?(o instanceof t.Name?e(a,o,s):n(a,o,s),s):o instanceof t.Name?(n(a,s,o),o):r(o,s);return c===t.Name&&!(l instanceof t.Name)?i(a,l):l}}e.mergeEvaluated={props:m({mergeNames:(e,n,r)=>e.if((0,t._)`${r} !== true && ${n} !== undefined`,()=>{e.if((0,t._)`${n} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,t._)`${r} || {}`).code((0,t._)`Object.assign(${r}, ${n})`))}),mergeToName:(e,n,r)=>e.if((0,t._)`${r} !== true`,()=>{n===!0?e.assign(r,!0):(e.assign(r,(0,t._)`${r} || {}`),g(e,r,n))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:h}),items:m({mergeNames:(e,n,r)=>e.if((0,t._)`${r} !== true && ${n} !== undefined`,()=>e.assign(r,(0,t._)`${n} === true ? true : ${r} > ${n} ? ${r} : ${n}`)),mergeToName:(e,n,r)=>e.if((0,t._)`${r} !== true`,()=>e.assign(r,n===!0?!0:(0,t._)`${r} > ${n} ? ${r} : ${n}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var(`items`,t)})};function h(e,n){if(n===!0)return e.var(`props`,!0);let r=e.var(`props`,(0,t._)`{}`);return n!==void 0&&g(e,r,n),r}e.evaluatedPropsToName=h;function g(e,n,r){Object.keys(r).forEach(r=>e.assign((0,t._)`${n}${(0,t.getProperty)(r)}`,!0))}e.setEvaluated=g;var _={};function v(e,t){return e.scopeValue(`func`,{ref:t,code:_[t.code]||(_[t.code]=new n._Code(t.code))})}e.useFunc=v;var y;(function(e){e[e.Num=0]=`Num`,e[e.Str=1]=`Str`})(y||(e.Type=y={}));function b(e,n,r){if(e instanceof t.Name){let i=n===y.Num;return r?i?(0,t._)`"[" + ${e} + "]"`:(0,t._)`"['" + ${e} + "']"`:i?(0,t._)`"/" + ${e}`:(0,t._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,t.getProperty)(e).toString():`/`+d(e)}e.getErrorPath=b;function x(e,t,n=e.opts.strictSchema){if(n){if(t=`strict mode: ${t}`,n===!0)throw Error(t);e.self.logger.warn(t)}}e.checkStrictMode=x})),Rw=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Iw();e.default={data:new t.Name(`data`),valCxt:new t.Name(`valCxt`),instancePath:new t.Name(`instancePath`),parentData:new t.Name(`parentData`),parentDataProperty:new t.Name(`parentDataProperty`),rootData:new t.Name(`rootData`),dynamicAnchors:new t.Name(`dynamicAnchors`),vErrors:new t.Name(`vErrors`),errors:new t.Name(`errors`),this:new t.Name(`this`),self:new t.Name(`self`),scope:new t.Name(`scope`),json:new t.Name(`json`),jsonPos:new t.Name(`jsonPos`),jsonLen:new t.Name(`jsonLen`),jsonPart:new t.Name(`jsonPart`)}})),zw=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;var t=Iw(),n=Lw(),r=Rw();e.keywordError={message:({keyword:e})=>(0,t.str)`must pass "${e}" keyword validation`},e.keyword$DataError={message:({keyword:e,schemaType:n})=>n?(0,t.str)`"${e}" keyword must be ${n} ($data)`:(0,t.str)`"${e}" keyword is invalid ($data)`};function i(n,r=e.keywordError,i,a){let{it:o}=n,{gen:s,compositeRule:u,allErrors:f}=o,p=d(n,r,i);a??(u||f)?c(s,p):l(o,(0,t._)`[${p}]`)}e.reportError=i;function a(t,n=e.keywordError,i){let{it:a}=t,{gen:o,compositeRule:s,allErrors:u}=a;c(o,d(t,n,i)),s||u||l(a,r.default.vErrors)}e.reportExtraError=a;function o(e,n){e.assign(r.default.errors,n),e.if((0,t._)`${r.default.vErrors} !== null`,()=>e.if(n,()=>e.assign((0,t._)`${r.default.vErrors}.length`,n),()=>e.assign(r.default.vErrors,null)))}e.resetErrorsCount=o;function s({gen:e,keyword:n,schemaValue:i,data:a,errsCount:o,it:s}){if(o===void 0)throw Error(`ajv implementation error`);let c=e.name(`err`);e.forRange(`i`,o,r.default.errors,o=>{e.const(c,(0,t._)`${r.default.vErrors}[${o}]`),e.if((0,t._)`${c}.instancePath === undefined`,()=>e.assign((0,t._)`${c}.instancePath`,(0,t.strConcat)(r.default.instancePath,s.errorPath))),e.assign((0,t._)`${c}.schemaPath`,(0,t.str)`${s.errSchemaPath}/${n}`),s.opts.verbose&&(e.assign((0,t._)`${c}.schema`,i),e.assign((0,t._)`${c}.data`,a))})}e.extendErrors=s;function c(e,n){let i=e.const(`err`,n);e.if((0,t._)`${r.default.vErrors} === null`,()=>e.assign(r.default.vErrors,(0,t._)`[${i}]`),(0,t._)`${r.default.vErrors}.push(${i})`),e.code((0,t._)`${r.default.errors}++`)}function l(e,n){let{gen:r,validateName:i,schemaEnv:a}=e;a.$async?r.throw((0,t._)`new ${e.ValidationError}(${n})`):(r.assign((0,t._)`${i}.errors`,n),r.return(!1))}var u={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 d(e,n,r){let{createErrors:i}=e.it;return i===!1?(0,t._)`{}`:f(e,n,r)}function f(e,t,n={}){let{gen:r,it:i}=e,a=[p(i,n),m(e,n)];return h(e,t,a),r.object(...a)}function p({errorPath:e},{instancePath:i}){let a=i?(0,t.str)`${e}${(0,n.getErrorPath)(i,n.Type.Str)}`:e;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,a)]}function m({keyword:e,it:{errSchemaPath:r}},{schemaPath:i,parentSchema:a}){let o=a?r:(0,t.str)`${r}/${e}`;return i&&(o=(0,t.str)`${o}${(0,n.getErrorPath)(i,n.Type.Str)}`),[u.schemaPath,o]}function h(e,{params:n,message:i},a){let{keyword:o,data:s,schemaValue:c,it:l}=e,{opts:d,propertyName:f,topSchemaRef:p,schemaPath:m}=l;a.push([u.keyword,o],[u.params,typeof n==`function`?n(e):n||(0,t._)`{}`]),d.messages&&a.push([u.message,typeof i==`function`?i(e):i]),d.verbose&&a.push([u.schema,c],[u.parentSchema,(0,t._)`${p}${m}`],[r.default.data,s]),f&&a.push([u.propertyName,f])}})),Bw=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;var t=zw(),n=Iw(),r=Rw(),i={message:`boolean schema is false`};function a(e){let{gen:t,schema:i,validateName:a}=e;i===!1?s(e,!1):typeof i==`object`&&i.$async===!0?t.return(r.default.data):(t.assign((0,n._)`${a}.errors`,null),t.return(!0))}e.topBoolOrEmptySchema=a;function o(e,t){let{gen:n,schema:r}=e;r===!1?(n.var(t,!1),s(e)):n.var(t,!0)}e.boolOrEmptySchema=o;function s(e,n){let{gen:r,data:a}=e,o={gen:r,keyword:`false schema`,data:a,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,t.reportError)(o,i,void 0,n)}})),Vw=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getRules=e.isJSONType=void 0;var t=new Set([`string`,`number`,`integer`,`boolean`,`null`,`object`,`array`]);function n(e){return typeof e==`string`&&t.has(e)}e.isJSONType=n;function r(){let e={number:{type:`number`,rules:[]},string:{type:`string`,rules:[]},array:{type:`array`,rules:[]},object:{type:`object`,rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}e.getRules=r})),Hw=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.shouldUseRule=e.shouldUseGroup=e.schemaHasRulesForType=void 0;function t({schema:e,self:t},r){let i=t.RULES.types[r];return i&&i!==!0&&n(e,i)}e.schemaHasRulesForType=t;function n(e,t){return t.rules.some(t=>r(e,t))}e.shouldUseGroup=n;function r(e,t){return e[t.keyword]!==void 0||t.definition.implements?.some(t=>e[t]!==void 0)}e.shouldUseRule=r})),Uw=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;var t=Vw(),n=Hw(),r=zw(),i=Iw(),a=Lw(),o;(function(e){e[e.Correct=0]=`Correct`,e[e.Wrong=1]=`Wrong`})(o||(e.DataType=o={}));function s(e){let t=c(e.type);if(t.includes(`null`)){if(e.nullable===!1)throw Error(`type: null contradicts nullable: false`)}else{if(!t.length&&e.nullable!==void 0)throw Error(`"nullable" cannot be used without "type"`);e.nullable===!0&&t.push(`null`)}return t}e.getSchemaTypes=s;function c(e){let n=Array.isArray(e)?e:e?[e]:[];if(n.every(t.isJSONType))return n;throw Error(`type must be JSONType or JSONType[]: `+n.join(`,`))}e.getJSONTypes=c;function l(e,t){let{gen:r,data:i,opts:a}=e,s=d(t,a.coerceTypes),c=t.length>0&&!(s.length===0&&t.length===1&&(0,n.schemaHasRulesForType)(e,t[0]));if(c){let n=h(t,i,a.strictNumbers,o.Wrong);r.if(n,()=>{s.length?f(e,t,s):_(e)})}return c}e.coerceAndCheckDataType=l;var u=new Set([`string`,`number`,`integer`,`boolean`,`null`]);function d(e,t){return t?e.filter(e=>u.has(e)||t===`array`&&e===`array`):[]}function f(e,t,n){let{gen:r,data:a,opts:o}=e,s=r.let(`dataType`,(0,i._)`typeof ${a}`),c=r.let(`coerced`,(0,i._)`undefined`);o.coerceTypes===`array`&&r.if((0,i._)`${s} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,()=>r.assign(a,(0,i._)`${a}[0]`).assign(s,(0,i._)`typeof ${a}`).if(h(t,a,o.strictNumbers),()=>r.assign(c,a))),r.if((0,i._)`${c} !== undefined`);for(let e of n)(u.has(e)||e===`array`&&o.coerceTypes===`array`)&&l(e);r.else(),_(e),r.endIf(),r.if((0,i._)`${c} !== undefined`,()=>{r.assign(a,c),p(e,c)});function l(e){switch(e){case`string`:r.elseIf((0,i._)`${s} == "number" || ${s} == "boolean"`).assign(c,(0,i._)`"" + ${a}`).elseIf((0,i._)`${a} === null`).assign(c,(0,i._)`""`);return;case`number`:r.elseIf((0,i._)`${s} == "boolean" || ${a} === null
|
|
52
|
+
|| (${s} == "string" && ${a} && ${a} == +${a})`).assign(c,(0,i._)`+${a}`);return;case`integer`:r.elseIf((0,i._)`${s} === "boolean" || ${a} === null
|
|
53
|
+
|| (${s} === "string" && ${a} && ${a} == +${a} && !(${a} % 1))`).assign(c,(0,i._)`+${a}`);return;case`boolean`:r.elseIf((0,i._)`${a} === "false" || ${a} === 0 || ${a} === null`).assign(c,!1).elseIf((0,i._)`${a} === "true" || ${a} === 1`).assign(c,!0);return;case`null`:r.elseIf((0,i._)`${a} === "" || ${a} === 0 || ${a} === false`),r.assign(c,null);return;case`array`:r.elseIf((0,i._)`${s} === "string" || ${s} === "number"
|
|
54
|
+
|| ${s} === "boolean" || ${a} === null`).assign(c,(0,i._)`[${a}]`)}}}function p({gen:e,parentData:t,parentDataProperty:n},r){e.if((0,i._)`${t} !== undefined`,()=>e.assign((0,i._)`${t}[${n}]`,r))}function m(e,t,n,r=o.Correct){let a=r===o.Correct?i.operators.EQ:i.operators.NEQ,s;switch(e){case`null`:return(0,i._)`${t} ${a} null`;case`array`:s=(0,i._)`Array.isArray(${t})`;break;case`object`:s=(0,i._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case`integer`:s=c((0,i._)`!(${t} % 1) && !isNaN(${t})`);break;case`number`:s=c();break;default:return(0,i._)`typeof ${t} ${a} ${e}`}return r===o.Correct?s:(0,i.not)(s);function c(e=i.nil){return(0,i.and)((0,i._)`typeof ${t} == "number"`,e,n?(0,i._)`isFinite(${t})`:i.nil)}}e.checkDataType=m;function h(e,t,n,r){if(e.length===1)return m(e[0],t,n,r);let o,s=(0,a.toHash)(e);if(s.array&&s.object){let e=(0,i._)`typeof ${t} != "object"`;o=s.null?e:(0,i._)`!${t} || ${e}`,delete s.null,delete s.array,delete s.object}else o=i.nil;s.number&&delete s.integer;for(let e in s)o=(0,i.and)(o,m(e,t,n,r));return o}e.checkDataTypes=h;var g={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e==`string`?(0,i._)`{type: ${e}}`:(0,i._)`{type: ${t}}`};function _(e){let t=v(e);(0,r.reportError)(t,g)}e.reportTypeError=_;function v(e){let{gen:t,data:n,schema:r}=e,i=(0,a.schemaRefOrVal)(e,r,`type`);return{gen:t,keyword:`type`,data:n,schema:r.type,schemaCode:i,schemaValue:i,parentSchema:r,params:{},it:e}}})),Ww=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.assignDefaults=void 0;var t=Iw(),n=Lw();function r(e,t){let{properties:n,items:r}=e.schema;if(t===`object`&&n)for(let t in n)i(e,t,n[t].default);else t===`array`&&Array.isArray(r)&&r.forEach((t,n)=>i(e,n,t.default))}e.assignDefaults=r;function i(e,r,i){let{gen:a,compositeRule:o,data:s,opts:c}=e;if(i===void 0)return;let l=(0,t._)`${s}${(0,t.getProperty)(r)}`;if(o){(0,n.checkStrictMode)(e,`default is ignored for: ${l}`);return}let u=(0,t._)`${l} === undefined`;c.useDefaults===`empty`&&(u=(0,t._)`${u} || ${l} === null || ${l} === ""`),a.if(u,(0,t._)`${l} = ${(0,t.stringify)(i)}`)}})),Gw=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.validateUnion=e.validateArray=e.usePattern=e.callValidateCode=e.schemaProperties=e.allSchemaProperties=e.noPropertyInData=e.propertyInData=e.isOwnProperty=e.hasPropFunc=e.reportMissingProp=e.checkMissingProp=e.checkReportMissingProp=void 0;var t=Iw(),n=Lw(),r=Rw(),i=Lw();function a(e,n){let{gen:r,data:i,it:a}=e;r.if(d(r,i,n,a.opts.ownProperties),()=>{e.setParams({missingProperty:(0,t._)`${n}`},!0),e.error()})}e.checkReportMissingProp=a;function o({gen:e,data:n,it:{opts:r}},i,a){return(0,t.or)(...i.map(i=>(0,t.and)(d(e,n,i,r.ownProperties),(0,t._)`${a} = ${i}`)))}e.checkMissingProp=o;function s(e,t){e.setParams({missingProperty:t},!0),e.error()}e.reportMissingProp=s;function c(e){return e.scopeValue(`func`,{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}e.hasPropFunc=c;function l(e,n,r){return(0,t._)`${c(e)}.call(${n}, ${r})`}e.isOwnProperty=l;function u(e,n,r,i){let a=(0,t._)`${n}${(0,t.getProperty)(r)} !== undefined`;return i?(0,t._)`${a} && ${l(e,n,r)}`:a}e.propertyInData=u;function d(e,n,r,i){let a=(0,t._)`${n}${(0,t.getProperty)(r)} === undefined`;return i?(0,t.or)(a,(0,t.not)(l(e,n,r))):a}e.noPropertyInData=d;function f(e){return e?Object.keys(e).filter(e=>e!==`__proto__`):[]}e.allSchemaProperties=f;function p(e,t){return f(t).filter(r=>!(0,n.alwaysValidSchema)(e,t[r]))}e.schemaProperties=p;function m({schemaCode:e,data:n,it:{gen:i,topSchemaRef:a,schemaPath:o,errorPath:s},it:c},l,u,d){let f=d?(0,t._)`${e}, ${n}, ${a}${o}`:n,p=[[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,s)],[r.default.parentData,c.parentData],[r.default.parentDataProperty,c.parentDataProperty],[r.default.rootData,r.default.rootData]];c.opts.dynamicRef&&p.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);let m=(0,t._)`${f}, ${i.object(...p)}`;return u===t.nil?(0,t._)`${l}(${m})`:(0,t._)`${l}.call(${u}, ${m})`}e.callValidateCode=m;var h=(0,t._)`new RegExp`;function g({gen:e,it:{opts:n}},r){let a=n.unicodeRegExp?`u`:``,{regExp:o}=n.code,s=o(r,a);return e.scopeValue(`pattern`,{key:s.toString(),ref:s,code:(0,t._)`${o.code===`new RegExp`?h:(0,i.useFunc)(e,o)}(${r}, ${a})`})}e.usePattern=g;function _(e){let{gen:r,data:i,keyword:a,it:o}=e,s=r.name(`valid`);if(o.allErrors){let e=r.let(`valid`,!0);return c(()=>r.assign(e,!1)),e}return r.var(s,!0),c(()=>r.break()),s;function c(o){let c=r.const(`len`,(0,t._)`${i}.length`);r.forRange(`i`,0,c,i=>{e.subschema({keyword:a,dataProp:i,dataPropType:n.Type.Num},s),r.if((0,t.not)(s),o)})}}e.validateArray=_;function v(e){let{gen:r,schema:i,keyword:a,it:o}=e;if(!Array.isArray(i))throw Error(`ajv implementation error`);if(i.some(e=>(0,n.alwaysValidSchema)(o,e))&&!o.opts.unevaluated)return;let s=r.let(`valid`,!1),c=r.name(`_valid`);r.block(()=>i.forEach((n,i)=>{let o=e.subschema({keyword:a,schemaProp:i,compositeRule:!0},c);r.assign(s,(0,t._)`${s} || ${c}`),e.mergeValidEvaluated(o,c)||r.if((0,t.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}e.validateUnion=v})),Kw=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.validateKeywordUsage=e.validSchemaType=e.funcKeywordCode=e.macroKeywordCode=void 0;var t=Iw(),n=Rw(),r=Gw(),i=zw();function a(e,n){let{gen:r,keyword:i,schema:a,parentSchema:o,it:s}=e,c=n.macro.call(s.self,a,o,s),l=u(r,i,c);s.opts.validateSchema!==!1&&s.self.validateSchema(c,!0);let d=r.name(`valid`);e.subschema({schema:c,schemaPath:t.nil,errSchemaPath:`${s.errSchemaPath}/${i}`,topSchemaRef:l,compositeRule:!0},d),e.pass(d,()=>e.error(!0))}e.macroKeywordCode=a;function o(e,i){let{gen:a,keyword:o,schema:d,parentSchema:f,$data:p,it:m}=e;l(m,i);let h=u(a,o,!p&&i.compile?i.compile.call(m.self,d,f,m):i.validate),g=a.let(`valid`);e.block$data(g,_),e.ok(i.valid??g);function _(){if(i.errors===!1)b(),i.modifying&&s(e),x(()=>e.error());else{let t=i.async?v():y();i.modifying&&s(e),x(()=>c(e,t))}}function v(){let e=a.let(`ruleErrs`,null);return a.try(()=>b((0,t._)`await `),n=>a.assign(g,!1).if((0,t._)`${n} instanceof ${m.ValidationError}`,()=>a.assign(e,(0,t._)`${n}.errors`),()=>a.throw(n))),e}function y(){let e=(0,t._)`${h}.errors`;return a.assign(e,null),b(t.nil),e}function b(o=i.async?(0,t._)`await `:t.nil){let s=m.opts.passContext?n.default.this:n.default.self,c=!(`compile`in i&&!p||i.schema===!1);a.assign(g,(0,t._)`${o}${(0,r.callValidateCode)(e,h,s,c)}`,i.modifying)}function x(e){a.if((0,t.not)(i.valid??g),e)}}e.funcKeywordCode=o;function s(e){let{gen:n,data:r,it:i}=e;n.if(i.parentData,()=>n.assign(r,(0,t._)`${i.parentData}[${i.parentDataProperty}]`))}function c(e,r){let{gen:a}=e;a.if((0,t._)`Array.isArray(${r})`,()=>{a.assign(n.default.vErrors,(0,t._)`${n.default.vErrors} === null ? ${r} : ${n.default.vErrors}.concat(${r})`).assign(n.default.errors,(0,t._)`${n.default.vErrors}.length`),(0,i.extendErrors)(e)},()=>e.error())}function l({schemaEnv:e},t){if(t.async&&!e.$async)throw Error(`async keyword in sync schema`)}function u(e,n,r){if(r===void 0)throw Error(`keyword "${n}" failed to compile`);return e.scopeValue(`keyword`,typeof r==`function`?{ref:r}:{ref:r,code:(0,t.stringify)(r)})}function d(e,t,n=!1){return!t.length||t.some(t=>t===`array`?Array.isArray(e):t===`object`?e&&typeof e==`object`&&!Array.isArray(e):typeof e==t||n&&e===void 0)}e.validSchemaType=d;function f({schema:e,opts:t,self:n,errSchemaPath:r},i,a){if(Array.isArray(i.keyword)?!i.keyword.includes(a):i.keyword!==a)throw Error(`ajv implementation error`);let o=i.dependencies;if(o?.some(t=>!Object.prototype.hasOwnProperty.call(e,t)))throw Error(`parent schema must have dependencies of ${a}: ${o.join(`,`)}`);if(i.validateSchema&&!i.validateSchema(e[a])){let e=`keyword "${a}" value is invalid at path "${r}": `+n.errorsText(i.validateSchema.errors);if(t.validateSchema===`log`)n.logger.error(e);else throw Error(e)}}e.validateKeywordUsage=f})),qw=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.extendSubschemaMode=e.extendSubschemaData=e.getSubschema=void 0;var t=Iw(),n=Lw();function r(e,{keyword:r,schemaProp:i,schema:a,schemaPath:o,errSchemaPath:s,topSchemaRef:c}){if(r!==void 0&&a!==void 0)throw Error(`both "keyword" and "schema" passed, only one allowed`);if(r!==void 0){let a=e.schema[r];return i===void 0?{schema:a,schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${r}`}:{schema:a[i],schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(r)}${(0,t.getProperty)(i)}`,errSchemaPath:`${e.errSchemaPath}/${r}/${(0,n.escapeFragment)(i)}`}}if(a!==void 0){if(o===void 0||s===void 0||c===void 0)throw Error(`"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"`);return{schema:a,schemaPath:o,topSchemaRef:c,errSchemaPath:s}}throw Error(`either "keyword" or "schema" must be passed`)}e.getSubschema=r;function i(e,r,{dataProp:i,dataPropType:a,data:o,dataTypes:s,propertyName:c}){if(o!==void 0&&i!==void 0)throw Error(`both "data" and "dataProp" passed, only one allowed`);let{gen:l}=r;if(i!==void 0){let{errorPath:o,dataPathArr:s,opts:c}=r;u(l.let(`data`,(0,t._)`${r.data}${(0,t.getProperty)(i)}`,!0)),e.errorPath=(0,t.str)`${o}${(0,n.getErrorPath)(i,a,c.jsPropertySyntax)}`,e.parentDataProperty=(0,t._)`${i}`,e.dataPathArr=[...s,e.parentDataProperty]}o!==void 0&&(u(o instanceof t.Name?o:l.let(`data`,o,!0)),c!==void 0&&(e.propertyName=c)),s&&(e.dataTypes=s);function u(t){e.data=t,e.dataLevel=r.dataLevel+1,e.dataTypes=[],r.definedProperties=new Set,e.parentData=r.data,e.dataNames=[...r.dataNames,t]}}e.extendSubschemaData=i;function a(e,{jtdDiscriminator:t,jtdMetadata:n,compositeRule:r,createErrors:i,allErrors:a}){r!==void 0&&(e.compositeRule=r),i!==void 0&&(e.createErrors=i),a!==void 0&&(e.allErrors=a),e.jtdDiscriminator=t,e.jtdMetadata=n}e.extendSubschemaMode=a})),Jw=s(((e,t)=>{t.exports=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,a;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(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}})),Yw=s(((e,t)=>{var n=t.exports=function(e,t,n){typeof t==`function`&&(n=t,t={}),n=t.cb||n;var i=typeof n==`function`?n:n.pre||function(){},a=n.post||function(){};r(t,i,a,e,``,e)};n.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},n.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},n.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},n.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 r(e,t,a,o,s,c,l,u,d,f){if(o&&typeof o==`object`&&!Array.isArray(o)){for(var p in t(o,s,c,l,u,d,f),o){var m=o[p];if(Array.isArray(m)){if(p in n.arrayKeywords)for(var h=0;h<m.length;h++)r(e,t,a,m[h],s+`/`+p+`/`+h,c,s,p,o,h)}else if(p in n.propsKeywords){if(m&&typeof m==`object`)for(var g in m)r(e,t,a,m[g],s+`/`+p+`/`+i(g),c,s,p,o,g)}else (p in n.keywords||e.allKeys&&!(p in n.skipKeywords))&&r(e,t,a,m,s+`/`+p,c,s,p,o)}a(o,s,c,l,u,d,f)}}function i(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}})),Xw=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getSchemaRefs=e.resolveUrl=e.normalizeId=e._getFullPath=e.getFullPath=e.inlineRef=void 0;var t=Lw(),n=Jw(),r=Yw(),i=new Set([`type`,`format`,`pattern`,`maxLength`,`minLength`,`maxProperties`,`minProperties`,`maxItems`,`minItems`,`maximum`,`minimum`,`uniqueItems`,`multipleOf`,`required`,`enum`,`const`]);function a(e,t=!0){return typeof e==`boolean`?!0:t===!0?!s(e):t?c(e)<=t:!1}e.inlineRef=a;var o=new Set([`$ref`,`$recursiveRef`,`$recursiveAnchor`,`$dynamicRef`,`$dynamicAnchor`]);function s(e){for(let t in e){if(o.has(t))return!0;let n=e[t];if(Array.isArray(n)&&n.some(s)||typeof n==`object`&&s(n))return!0}return!1}function c(e){let n=0;for(let r in e)if(r===`$ref`||(n++,!i.has(r)&&(typeof e[r]==`object`&&(0,t.eachItem)(e[r],e=>n+=c(e)),n===1/0)))return 1/0;return n}function l(e,t=``,n){return n!==!1&&(t=f(t)),u(e,e.parse(t))}e.getFullPath=l;function u(e,t){return e.serialize(t).split(`#`)[0]+`#`}e._getFullPath=u;var d=/#\/?$/;function f(e){return e?e.replace(d,``):``}e.normalizeId=f;function p(e,t,n){return n=f(n),e.resolve(t,n)}e.resolveUrl=p;var m=/^[a-z_][-a-z0-9._]*$/i;function h(e,t){if(typeof e==`boolean`)return{};let{schemaId:i,uriResolver:a}=this.opts,o=f(e[i]||t),s={"":o},c=l(a,o,!1),u={},d=new Set;return r(e,{allKeys:!0},(e,t,n,r)=>{if(r===void 0)return;let a=c+t,o=s[r];typeof e[i]==`string`&&(o=l.call(this,e[i])),g.call(this,e.$anchor),g.call(this,e.$dynamicAnchor),s[t]=o;function l(t){let n=this.opts.uriResolver.resolve;if(t=f(o?n(o,t):t),d.has(t))throw h(t);d.add(t);let r=this.refs[t];return typeof r==`string`&&(r=this.refs[r]),typeof r==`object`?p(e,r.schema,t):t!==f(a)&&(t[0]===`#`?(p(e,u[t],t),u[t]=e):this.refs[t]=a),t}function g(e){if(typeof e==`string`){if(!m.test(e))throw Error(`invalid anchor "${e}"`);l.call(this,`#${e}`)}}}),u;function p(e,t,r){if(t!==void 0&&!n(e,t))throw h(r)}function h(e){return Error(`reference "${e}" resolves to more than one schema`)}}e.getSchemaRefs=h})),Zw=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getData=e.KeywordCxt=e.validateFunctionCode=void 0;var t=Bw(),n=Uw(),r=Hw(),i=Uw(),a=Ww(),o=Kw(),s=qw(),c=Iw(),l=Rw(),u=Xw(),d=Lw(),f=zw();function p(e){if(S(e)&&(w(e),x(e))){_(e);return}m(e,()=>(0,t.topBoolOrEmptySchema)(e))}e.validateFunctionCode=p;function m({gen:e,validateName:t,schema:n,schemaEnv:r,opts:i},a){i.code.es5?e.func(t,(0,c._)`${l.default.data}, ${l.default.valCxt}`,r.$async,()=>{e.code((0,c._)`"use strict"; ${y(n,i)}`),g(e,i),e.code(a)}):e.func(t,(0,c._)`${l.default.data}, ${h(i)}`,r.$async,()=>e.code(y(n,i)).code(a))}function h(e){return(0,c._)`{${l.default.instancePath}="", ${l.default.parentData}, ${l.default.parentDataProperty}, ${l.default.rootData}=${l.default.data}${e.dynamicRef?(0,c._)`, ${l.default.dynamicAnchors}={}`:c.nil}}={}`}function g(e,t){e.if(l.default.valCxt,()=>{e.var(l.default.instancePath,(0,c._)`${l.default.valCxt}.${l.default.instancePath}`),e.var(l.default.parentData,(0,c._)`${l.default.valCxt}.${l.default.parentData}`),e.var(l.default.parentDataProperty,(0,c._)`${l.default.valCxt}.${l.default.parentDataProperty}`),e.var(l.default.rootData,(0,c._)`${l.default.valCxt}.${l.default.rootData}`),t.dynamicRef&&e.var(l.default.dynamicAnchors,(0,c._)`${l.default.valCxt}.${l.default.dynamicAnchors}`)},()=>{e.var(l.default.instancePath,(0,c._)`""`),e.var(l.default.parentData,(0,c._)`undefined`),e.var(l.default.parentDataProperty,(0,c._)`undefined`),e.var(l.default.rootData,l.default.data),t.dynamicRef&&e.var(l.default.dynamicAnchors,(0,c._)`{}`)})}function _(e){let{schema:t,opts:n,gen:r}=e;m(e,()=>{n.$comment&&t.$comment&&A(e),D(e),r.let(l.default.vErrors,null),r.let(l.default.errors,0),n.unevaluated&&v(e),T(e),j(e)})}function v(e){let{gen:t,validateName:n}=e;e.evaluated=t.const(`evaluated`,(0,c._)`${n}.evaluated`),t.if((0,c._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,c._)`${e.evaluated}.props`,(0,c._)`undefined`)),t.if((0,c._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,c._)`${e.evaluated}.items`,(0,c._)`undefined`))}function y(e,t){let n=typeof e==`object`&&e[t.schemaId];return n&&(t.code.source||t.code.process)?(0,c._)`/*# sourceURL=${n} */`:c.nil}function b(e,n){if(S(e)&&(w(e),x(e))){C(e,n);return}(0,t.boolOrEmptySchema)(e,n)}function x({schema:e,self:t}){if(typeof e==`boolean`)return!e;for(let n in e)if(t.RULES.all[n])return!0;return!1}function S(e){return typeof e.schema!=`boolean`}function C(e,t){let{schema:n,gen:r,opts:i}=e;i.$comment&&n.$comment&&A(e),O(e),k(e);let a=r.const(`_errs`,l.default.errors);T(e,a),r.var(t,(0,c._)`${a} === ${l.default.errors}`)}function w(e){(0,d.checkUnknownRules)(e),E(e)}function T(e,t){if(e.opts.jtd)return N(e,[],!1,t);let r=(0,n.getSchemaTypes)(e.schema);N(e,r,!(0,n.coerceAndCheckDataType)(e,r),t)}function E(e){let{schema:t,errSchemaPath:n,opts:r,self:i}=e;t.$ref&&r.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}function D(e){let{schema:t,opts:n}=e;t.default!==void 0&&n.useDefaults&&n.strictSchema&&(0,d.checkStrictMode)(e,`default is ignored in the schema root`)}function O(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,u.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function k(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error(`async schema in sync schema`)}function A({gen:e,schemaEnv:t,schema:n,errSchemaPath:r,opts:i}){let a=n.$comment;if(i.$comment===!0)e.code((0,c._)`${l.default.self}.logger.log(${a})`);else if(typeof i.$comment==`function`){let n=(0,c.str)`${r}/$comment`,i=e.scopeValue(`root`,{ref:t.root});e.code((0,c._)`${l.default.self}.opts.$comment(${a}, ${n}, ${i}.schema)`)}}function j(e){let{gen:t,schemaEnv:n,validateName:r,ValidationError:i,opts:a}=e;n.$async?t.if((0,c._)`${l.default.errors} === 0`,()=>t.return(l.default.data),()=>t.throw((0,c._)`new ${i}(${l.default.vErrors})`)):(t.assign((0,c._)`${r}.errors`,l.default.vErrors),a.unevaluated&&M(e),t.return((0,c._)`${l.default.errors} === 0`))}function M({gen:e,evaluated:t,props:n,items:r}){n instanceof c.Name&&e.assign((0,c._)`${t}.props`,n),r instanceof c.Name&&e.assign((0,c._)`${t}.items`,r)}function N(e,t,n,a){let{gen:o,schema:s,data:u,allErrors:f,opts:p,self:m}=e,{RULES:h}=m;if(s.$ref&&(p.ignoreKeywordsWithRef||!(0,d.schemaHasRulesButRef)(s,h))){o.block(()=>te(e,`$ref`,h.all.$ref.definition));return}p.jtd||F(e,t),o.block(()=>{for(let e of h.rules)g(e);g(h.post)});function g(d){(0,r.shouldUseGroup)(s,d)&&(d.type?(o.if((0,i.checkDataType)(d.type,u,p.strictNumbers)),P(e,d),t.length===1&&t[0]===d.type&&n&&(o.else(),(0,i.reportTypeError)(e)),o.endIf()):P(e,d),f||o.if((0,c._)`${l.default.errors} === ${a||0}`))}}function P(e,t){let{gen:n,schema:i,opts:{useDefaults:o}}=e;o&&(0,a.assignDefaults)(e,t.type),n.block(()=>{for(let n of t.rules)(0,r.shouldUseRule)(i,n)&&te(e,n.keyword,n.definition,t.type)})}function F(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(I(e,t),e.opts.allowUnionTypes||L(e,t),R(e,e.dataTypes))}function I(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(t=>{B(e.dataTypes,t)||ee(e,`type "${t}" not allowed by context "${e.dataTypes.join(`,`)}"`)}),V(e,t)}}function L(e,t){t.length>1&&!(t.length===2&&t.includes(`null`))&&ee(e,`use allowUnionTypes to allow union type keyword`)}function R(e,t){let n=e.self.RULES.all;for(let i in n){let a=n[i];if(typeof a==`object`&&(0,r.shouldUseRule)(e.schema,a)){let{type:n}=a.definition;n.length&&!n.some(e=>z(t,e))&&ee(e,`missing type "${n.join(`,`)}" for keyword "${i}"`)}}}function z(e,t){return e.includes(t)||t===`number`&&e.includes(`integer`)}function B(e,t){return e.includes(t)||t===`integer`&&e.includes(`number`)}function V(e,t){let n=[];for(let r of e.dataTypes)B(t,r)?n.push(r):t.includes(`integer`)&&r===`number`&&n.push(`integer`);e.dataTypes=n}function ee(e,t){let n=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${n}" (strictTypes)`,(0,d.checkStrictMode)(e,t,e.opts.strictTypes)}var H=class{constructor(e,t,n){if((0,o.validateKeywordUsage)(e,t,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const(`vSchema`,re(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw Error(`${n} value must be ${JSON.stringify(t.schemaType)}`);(`code`in t?t.trackErrors:t.errors!==!1)&&(this.errsCount=e.gen.const(`_errs`,l.default.errors))}result(e,t,n){this.failResult((0,c.not)(e),t,n)}failResult(e,t,n){this.gen.if(e),n?n():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,c.not)(e),void 0,t)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail((0,c._)`${t} !== undefined && (${(0,c.or)(this.invalid$data(),e)})`)}error(e,t,n){if(t){this.setParams(t),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,t){(e?f.reportExtraError:f.reportError)(this,this.def.error,t)}$dataError(){(0,f.reportError)(this,this.def.$dataError||f.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error(`add "trackErrors" to keyword definition`);(0,f.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,n=c.nil){this.gen.block(()=>{this.check$data(e,n),t()})}check$data(e=c.nil,t=c.nil){if(!this.$data)return;let{gen:n,schemaCode:r,schemaType:i,def:a}=this;n.if((0,c.or)((0,c._)`${r} === undefined`,t)),e!==c.nil&&n.assign(e,!0),(i.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==c.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:n,def:r,it:a}=this;return(0,c.or)(o(),s());function o(){if(n.length){if(!(t instanceof c.Name))throw Error(`ajv implementation error`);let e=Array.isArray(n)?n:[n];return(0,c._)`${(0,i.checkDataTypes)(e,t,a.opts.strictNumbers,i.DataType.Wrong)}`}return c.nil}function s(){if(r.validateSchema){let n=e.scopeValue(`validate$data`,{ref:r.validateSchema});return(0,c._)`!${n}(${t})`}return c.nil}}subschema(e,t){let n=(0,s.getSubschema)(this.it,e);(0,s.extendSubschemaData)(n,this.it,e),(0,s.extendSubschemaMode)(n,e);let r={...this.it,...n,items:void 0,props:void 0};return b(r,t),r}mergeEvaluated(e,t){let{it:n,gen:r}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=d.mergeEvaluated.props(r,e.props,n.props,t)),n.items!==!0&&e.items!==void 0&&(n.items=d.mergeEvaluated.items(r,e.items,n.items,t)))}mergeValidEvaluated(e,t){let{it:n,gen:r}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return r.if(t,()=>this.mergeEvaluated(e,c.Name)),!0}};e.KeywordCxt=H;function te(e,t,n,r){let i=new H(e,n,t);`code`in n?n.code(i,r):i.$data&&n.validate?(0,o.funcKeywordCode)(i,n):`macro`in n?(0,o.macroKeywordCode)(i,n):(n.compile||n.validate)&&(0,o.funcKeywordCode)(i,n)}var U=/^\/(?:[^~]|~0|~1)*$/,ne=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function re(e,{dataLevel:t,dataNames:n,dataPathArr:r}){let i,a;if(e===``)return l.default.rootData;if(e[0]===`/`){if(!U.test(e))throw Error(`Invalid JSON-pointer: ${e}`);i=e,a=l.default.rootData}else{let o=ne.exec(e);if(!o)throw Error(`Invalid JSON-pointer: ${e}`);let s=+o[1];if(i=o[2],i===`#`){if(s>=t)throw Error(u(`property/index`,s));return r[t-s]}if(s>t)throw Error(u(`data`,s));if(a=n[t-s],!i)return a}let o=a,s=i.split(`/`);for(let e of s)e&&(a=(0,c._)`${a}${(0,c.getProperty)((0,d.unescapeJsonPointer)(e))}`,o=(0,c._)`${o} && ${a}`);return o;function u(e,n){return`Cannot access ${e} ${n} levels up, current level is ${t}`}}e.getData=re})),Qw=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=class extends Error{constructor(e){super(`validation failed`),this.errors=e,this.ajv=this.validation=!0}}})),$w=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Xw();e.default=class extends Error{constructor(e,n,r,i){super(i||`can't resolve reference ${r} from id ${n}`),this.missingRef=(0,t.resolveUrl)(e,n,r),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(e,this.missingRef))}}})),eT=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.resolveSchema=e.getCompilingSchema=e.resolveRef=e.compileSchema=e.SchemaEnv=void 0;var t=Iw(),n=Qw(),r=Rw(),i=Xw(),a=Lw(),o=Zw(),s=class{constructor(e){this.refs={},this.dynamicAnchors={};let t;typeof e.schema==`object`&&(t=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=e.baseId??(0,i.normalizeId)(t?.[e.schemaId||`$id`]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=t?.$async,this.refs={}}};e.SchemaEnv=s;function c(e){let a=d.call(this,e);if(a)return a;let s=(0,i.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:c,lines:l}=this.opts.code,{ownProperties:u}=this.opts,f=new t.CodeGen(this.scope,{es5:c,lines:l,ownProperties:u}),p;e.$async&&(p=f.scopeValue(`Error`,{ref:n.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));let m=f.scopeName(`validate`);e.validateName=m;let h={gen:f,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:f.scopeValue(`schema`,this.opts.code.source===!0?{ref:e.schema,code:(0,t.stringify)(e.schema)}:{ref:e.schema}),validateName:m,ValidationError:p,schema:e.schema,schemaEnv:e,rootId:s,baseId:e.baseId||s,schemaPath:t.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?``:`#`),errorPath:(0,t._)`""`,opts:this.opts,self:this},g;try{this._compilations.add(e),(0,o.validateFunctionCode)(h),f.optimize(this.opts.code.optimize);let n=f.toString();g=`${f.scopeRefs(r.default.scope)}return ${n}`,this.opts.code.process&&(g=this.opts.code.process(g,e));let i=Function(`${r.default.self}`,`${r.default.scope}`,g)(this,this.scope.get());if(this.scope.value(m,{ref:i}),i.errors=null,i.schema=e.schema,i.schemaEnv=e,e.$async&&(i.$async=!0),this.opts.code.source===!0&&(i.source={validateName:m,validateCode:n,scopeValues:f._values}),this.opts.unevaluated){let{props:e,items:n}=h;i.evaluated={props:e instanceof t.Name?void 0:e,items:n instanceof t.Name?void 0:n,dynamicProps:e instanceof t.Name,dynamicItems:n instanceof t.Name},i.source&&(i.source.evaluated=(0,t.stringify)(i.evaluated))}return e.validate=i,e}catch(t){throw delete e.validate,delete e.validateName,g&&this.logger.error(`Error compiling schema, function code:`,g),t}finally{this._compilations.delete(e)}}e.compileSchema=c;function l(e,t,n){n=(0,i.resolveUrl)(this.opts.uriResolver,t,n);let r=e.refs[n];if(r)return r;let a=p.call(this,e,n);if(a===void 0){let r=e.localRefs?.[n],{schemaId:i}=this.opts;r&&(a=new s({schema:r,schemaId:i,root:e,baseId:t}))}if(a!==void 0)return e.refs[n]=u.call(this,a)}e.resolveRef=l;function u(e){return(0,i.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:c.call(this,e)}function d(e){for(let t of this._compilations)if(f(t,e))return t}e.getCompilingSchema=d;function f(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function p(e,t){let n;for(;typeof(n=this.refs[t])==`string`;)t=n;return n||this.schemas[t]||m.call(this,e,t)}function m(e,t){let n=this.opts.uriResolver.parse(t),r=(0,i._getFullPath)(this.opts.uriResolver,n),a=(0,i.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&r===a)return g.call(this,n,e);let o=(0,i.normalizeId)(r),l=this.refs[o]||this.schemas[o];if(typeof l==`string`){let t=m.call(this,e,l);return typeof t?.schema==`object`?g.call(this,n,t):void 0}if(typeof l?.schema==`object`){if(l.validate||c.call(this,l),o===(0,i.normalizeId)(t)){let{schema:t}=l,{schemaId:n}=this.opts,r=t[n];return r&&(a=(0,i.resolveUrl)(this.opts.uriResolver,a,r)),new s({schema:t,schemaId:n,root:e,baseId:a})}return g.call(this,n,l)}}e.resolveSchema=m;var h=new Set([`properties`,`patternProperties`,`enum`,`dependencies`,`definitions`]);function g(e,{baseId:t,schema:n,root:r}){if(e.fragment?.[0]!==`/`)return;for(let r of e.fragment.slice(1).split(`/`)){if(typeof n==`boolean`)return;let e=n[(0,a.unescapeFragment)(r)];if(e===void 0)return;n=e;let o=typeof n==`object`&&n[this.opts.schemaId];!h.has(r)&&o&&(t=(0,i.resolveUrl)(this.opts.uriResolver,t,o))}let o;if(typeof n!=`boolean`&&n.$ref&&!(0,a.schemaHasRulesButRef)(n,this.RULES)){let e=(0,i.resolveUrl)(this.opts.uriResolver,t,n.$ref);o=m.call(this,r,e)}let{schemaId:c}=this.opts;if(o||=new s({schema:n,schemaId:c,root:r,baseId:t}),o.schema!==o.root.schema)return o}})),tT=c({$id:()=>nT,additionalProperties:()=>!1,default:()=>sT,description:()=>rT,properties:()=>oT,required:()=>aT,type:()=>iT}),nT,rT,iT,aT,oT,sT,cT=o((()=>{nT=`https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#`,rT=`Meta-schema for $data reference (JSON AnySchema extension proposal)`,iT=`object`,aT=[`$data`],oT={$data:{type:`string`,anyOf:[{format:`relative-json-pointer`},{format:`json-pointer`}]}},sT={$id:nT,description:rT,type:iT,required:aT,properties:oT,additionalProperties:!1}})),lT=s(((e,t)=>{var n=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),r=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 i(e){let t=``,n=0,r=0;for(r=0;r<e.length;r++)if(n=e[r].charCodeAt(0),n!==48){if(!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return``;t+=e[r];break}for(r+=1;r<e.length;r++){if(n=e[r].charCodeAt(0),!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return``;t+=e[r]}return t}var a=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function o(e){return e.length=0,!0}function s(e,t,n){if(e.length){let r=i(e);if(r!==``)t.push(r);else return n.error=!0,!1;e.length=0}return!0}function c(e){let t=0,n={error:!1,address:``,zone:``},r=[],a=[],c=!1,l=!1,u=s;for(let i=0;i<e.length;i++){let s=e[i];if(!(s===`[`||s===`]`))if(s===`:`){if(c===!0&&(l=!0),!u(a,r,n))break;if(++t>7){n.error=!0;break}i>0&&e[i-1]===`:`&&(c=!0),r.push(`:`);continue}else if(s===`%`){if(!u(a,r,n))break;u=o}else{a.push(s);continue}}return a.length&&(u===o?n.zone=a.join(``):l?r.push(a.join(``)):r.push(i(a))),n.address=r.join(``),n}function l(e){if(u(e,`:`)<2)return{host:e,isIPV6:!1};let t=c(e);if(t.error)return{host:e,isIPV6:!1};{let e=t.address,n=t.address;return t.zone&&(e+=`%`+t.zone,n+=`%25`+t.zone),{host:e,isIPV6:!0,escapedHost:n}}}function u(e,t){let n=0;for(let r=0;r<e.length;r++)e[r]===t&&n++;return n}function d(e){let t=e,n=[],r=-1,i=0;for(;i=t.length;){if(i===1){if(t===`.`)break;if(t===`/`){n.push(`/`);break}else{n.push(t);break}}else if(i===2){if(t[0]===`.`){if(t[1]===`.`)break;if(t[1]===`/`){t=t.slice(2);continue}}else if(t[0]===`/`&&(t[1]===`.`||t[1]===`/`)){n.push(`/`);break}}else if(i===3&&t===`/..`){n.length!==0&&n.pop(),n.push(`/`);break}if(t[0]===`.`){if(t[1]===`.`){if(t[2]===`/`){t=t.slice(3);continue}}else if(t[1]===`/`){t=t.slice(2);continue}}else if(t[0]===`/`&&t[1]===`.`){if(t[2]===`/`){t=t.slice(2);continue}else if(t[2]===`.`&&t[3]===`/`){t=t.slice(3),n.length!==0&&n.pop();continue}}if((r=t.indexOf(`/`,1))===-1){n.push(t);break}else n.push(t.slice(0,r)),t=t.slice(r)}return n.join(``)}function f(e,t){let n=t===!0?unescape:escape;return e.scheme!==void 0&&(e.scheme=n(e.scheme)),e.userinfo!==void 0&&(e.userinfo=n(e.userinfo)),e.host!==void 0&&(e.host=n(e.host)),e.path!==void 0&&(e.path=n(e.path)),e.query!==void 0&&(e.query=n(e.query)),e.fragment!==void 0&&(e.fragment=n(e.fragment)),e}function p(e){let t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push(`@`)),e.host!==void 0){let n=unescape(e.host);if(!r(n)){let t=l(n);n=t.isIPV6===!0?`[${t.escapedHost}]`:e.host}t.push(n)}return(typeof e.port==`number`||typeof e.port==`string`)&&(t.push(`:`),t.push(String(e.port))),t.length?t.join(``):void 0}t.exports={nonSimpleDomain:a,recomposeAuthority:p,normalizeComponentEncoding:f,removeDotSegments:d,isIPv4:r,isUUID:n,normalizeIPv6:l,stringArrayToHexStripped:i}})),uT=s(((e,t)=>{var{isUUID:n}=lT(),r=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,i=[`http`,`https`,`ws`,`wss`,`urn`,`urn:uuid`];function a(e){return i.indexOf(e)!==-1}function o(e){return e.secure===!0?!0:e.secure===!1?!1:e.scheme?e.scheme.length===3&&(e.scheme[0]===`w`||e.scheme[0]===`W`)&&(e.scheme[1]===`s`||e.scheme[1]===`S`)&&(e.scheme[2]===`s`||e.scheme[2]===`S`):!1}function s(e){return e.host||(e.error=e.error||`HTTP URIs must have a host.`),e}function c(e){let t=String(e.scheme).toLowerCase()===`https`;return(e.port===(t?443:80)||e.port===``)&&(e.port=void 0),e.path||=`/`,e}function l(e){return e.secure=o(e),e.resourceName=(e.path||`/`)+(e.query?`?`+e.query:``),e.path=void 0,e.query=void 0,e}function u(e){if((e.port===(o(e)?443:80)||e.port===``)&&(e.port=void 0),typeof e.secure==`boolean`&&(e.scheme=e.secure?`wss`:`ws`,e.secure=void 0),e.resourceName){let[t,n]=e.resourceName.split(`?`);e.path=t&&t!==`/`?t:void 0,e.query=n,e.resourceName=void 0}return e.fragment=void 0,e}function d(e,t){if(!e.path)return e.error=`URN can not be parsed`,e;let n=e.path.match(r);if(n){let r=t.scheme||e.scheme||`urn`;e.nid=n[1].toLowerCase(),e.nss=n[2];let i=S(`${r}:${t.nid||e.nid}`);e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||`URN can not be parsed.`;return e}function f(e,t){if(e.nid===void 0)throw Error(`URN without nid cannot be serialized`);let n=t.scheme||e.scheme||`urn`,r=e.nid.toLowerCase(),i=S(`${n}:${t.nid||r}`);i&&(e=i.serialize(e,t));let a=e,o=e.nss;return a.path=`${r||t.nid}:${o}`,t.skipEscape=!0,a}function p(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!n(r.uuid))&&(r.error=r.error||`UUID is not valid.`),r}function m(e){let t=e;return t.nss=(e.uuid||``).toLowerCase(),t}var h={scheme:`http`,domainHost:!0,parse:s,serialize:c},g={scheme:`https`,domainHost:h.domainHost,parse:s,serialize:c},_={scheme:`ws`,domainHost:!0,parse:l,serialize:u},v={scheme:`wss`,domainHost:_.domainHost,parse:_.parse,serialize:_.serialize},y={scheme:`urn`,parse:d,serialize:f,skipNormalize:!0},b={scheme:`urn:uuid`,parse:p,serialize:m,skipNormalize:!0},x={http:h,https:g,ws:_,wss:v,urn:y,"urn:uuid":b};Object.setPrototypeOf(x,null);function S(e){return e&&(x[e]||x[e.toLowerCase()])||void 0}t.exports={wsIsSecure:o,SCHEMES:x,isValidSchemeName:a,getSchemeHandler:S}})),dT=s(((e,t)=>{var{normalizeIPv6:n,removeDotSegments:r,recomposeAuthority:i,normalizeComponentEncoding:a,isIPv4:o,nonSimpleDomain:s}=lT(),{SCHEMES:c,getSchemeHandler:l}=uT();function u(e,t){return typeof e==`string`?e=m(g(e,t),t):typeof e==`object`&&(e=g(m(e,t),t)),e}function d(e,t,n){let r=n?Object.assign({scheme:`null`},n):{scheme:`null`},i=f(g(e,r),g(t,r),r,!0);return r.skipEscape=!0,m(i,r)}function f(e,t,n,i){let a={};return i||(e=g(m(e,n),n),t=g(m(t,n),n)),n||={},!n.tolerant&&t.scheme?(a.scheme=t.scheme,a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=r(t.path||``),a.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=r(t.path||``),a.query=t.query):(t.path?(t.path[0]===`/`?a.path=r(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?a.path=`/`+t.path:e.path?a.path=e.path.slice(0,e.path.lastIndexOf(`/`)+1)+t.path:a.path=t.path,a.path=r(a.path)),a.query=t.query):(a.path=e.path,t.query===void 0?a.query=e.query:a.query=t.query),a.userinfo=e.userinfo,a.host=e.host,a.port=e.port),a.scheme=e.scheme),a.fragment=t.fragment,a}function p(e,t,n){return typeof e==`string`?(e=unescape(e),e=m(a(g(e,n),!0),{...n,skipEscape:!0})):typeof e==`object`&&(e=m(a(e,!0),{...n,skipEscape:!0})),typeof t==`string`?(t=unescape(t),t=m(a(g(t,n),!0),{...n,skipEscape:!0})):typeof t==`object`&&(t=m(a(t,!0),{...n,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()}function m(e,t){let n={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:``},a=Object.assign({},t),o=[],s=l(a.scheme||n.scheme);s&&s.serialize&&s.serialize(n,a),n.path!==void 0&&(a.skipEscape?n.path=unescape(n.path):(n.path=escape(n.path),n.scheme!==void 0&&(n.path=n.path.split(`%3A`).join(`:`)))),a.reference!==`suffix`&&n.scheme&&o.push(n.scheme,`:`);let c=i(n);if(c!==void 0&&(a.reference!==`suffix`&&o.push(`//`),o.push(c),n.path&&n.path[0]!==`/`&&o.push(`/`)),n.path!==void 0){let e=n.path;!a.absolutePath&&(!s||!s.absolutePath)&&(e=r(e)),c===void 0&&e[0]===`/`&&e[1]===`/`&&(e=`/%2F`+e.slice(2)),o.push(e)}return n.query!==void 0&&o.push(`?`,n.query),n.fragment!==void 0&&o.push(`#`,n.fragment),o.join(``)}var h=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function g(e,t){let r=Object.assign({},t),i={scheme:void 0,userinfo:void 0,host:``,port:void 0,path:``,query:void 0,fragment:void 0},a=!1;r.reference===`suffix`&&(e=r.scheme?r.scheme+`:`+e:`//`+e);let c=e.match(h);if(c){if(i.scheme=c[1],i.userinfo=c[3],i.host=c[4],i.port=parseInt(c[5],10),i.path=c[6]||``,i.query=c[7],i.fragment=c[8],isNaN(i.port)&&(i.port=c[5]),i.host)if(o(i.host)===!1){let e=n(i.host);i.host=e.host.toLowerCase(),a=e.isIPV6}else a=!0;i.scheme===void 0&&i.userinfo===void 0&&i.host===void 0&&i.port===void 0&&i.query===void 0&&!i.path?i.reference=`same-document`:i.scheme===void 0?i.reference=`relative`:i.fragment===void 0?i.reference=`absolute`:i.reference=`uri`,r.reference&&r.reference!==`suffix`&&r.reference!==i.reference&&(i.error=i.error||`URI is not a `+r.reference+` reference.`);let t=l(r.scheme||i.scheme);if(!r.unicodeSupport&&(!t||!t.unicodeSupport)&&i.host&&(r.domainHost||t&&t.domainHost)&&a===!1&&s(i.host))try{i.host=URL.domainToASCII(i.host.toLowerCase())}catch(e){i.error=i.error||`Host's domain name can not be converted to ASCII: `+e}(!t||t&&!t.skipNormalize)&&(e.indexOf(`%`)!==-1&&(i.scheme!==void 0&&(i.scheme=unescape(i.scheme)),i.host!==void 0&&(i.host=unescape(i.host))),i.path&&=escape(unescape(i.path)),i.fragment&&=encodeURI(decodeURIComponent(i.fragment))),t&&t.parse&&t.parse(i,r)}else i.error=i.error||`URI can not be parsed.`;return i}var _={SCHEMES:c,normalize:u,resolve:d,resolveComponent:f,equal:p,serialize:m,parse:g};t.exports=_,t.exports.default=_,t.exports.fastUri=_})),fT=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=dT();t.code=`require("ajv/dist/runtime/uri").default`,e.default=t})),pT=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=Zw();Object.defineProperty(e,`KeywordCxt`,{enumerable:!0,get:function(){return t.KeywordCxt}});var n=Iw();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}});var r=Qw(),i=$w(),a=Vw(),o=eT(),s=Iw(),c=Xw(),l=Uw(),u=Lw(),f=(cT(),d(tT).default),p=fT(),m=(e,t)=>new RegExp(e,t);m.code=`new RegExp`;var h=[`removeAdditional`,`useDefaults`,`coerceTypes`],g=new Set([`validate`,`serialize`,`parse`,`wrapper`,`root`,`schema`,`keyword`,`pattern`,`formats`,`validate$data`,`func`,`obj`,`Error`]),_={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.`},v={ignoreKeywordsWithRef:``,jsPropertySyntax:``,unicode:`"minLength"/"maxLength" account for unicode characters by default.`},y=200;function b(e){let t=e.strict,n=e.code?.optimize,r=n===!0||n===void 0?1:n||0,i=e.code?.regExp??m,a=e.uriResolver??p.default;return{strictSchema:e.strictSchema??t??!0,strictNumbers:e.strictNumbers??t??!0,strictTypes:e.strictTypes??t??`log`,strictTuples:e.strictTuples??t??`log`,strictRequired:e.strictRequired??t??!1,code:e.code?{...e.code,optimize:r,regExp:i}:{optimize:r,regExp:i},loopRequired:e.loopRequired??y,loopEnum:e.loopEnum??y,meta:e.meta??!0,messages:e.messages??!0,inlineRefs:e.inlineRefs??!0,schemaId:e.schemaId??`$id`,addUsedSchema:e.addUsedSchema??!0,validateSchema:e.validateSchema??!0,validateFormats:e.validateFormats??!0,unicodeRegExp:e.unicodeRegExp??!0,int32range:e.int32range??!0,uriResolver:a}}var x=class{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...b(e)};let{es5:t,lines:n}=this.opts.code;this.scope=new s.ValueScope({scope:{},prefixes:g,es5:t,lines:n}),this.logger=k(e.logger);let r=e.validateFormats;e.validateFormats=!1,this.RULES=(0,a.getRules)(),S.call(this,_,e,`NOT SUPPORTED`),S.call(this,v,e,`DEPRECATED`,`warn`),this._metaOpts=D.call(this),e.formats&&T.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&E.call(this,e.keywords),typeof e.meta==`object`&&this.addMetaSchema(e.meta),w.call(this),e.validateFormats=r}_addVocabularies(){this.addKeyword(`$async`)}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:n}=this.opts,r=f;n===`id`&&(r={...f},r.id=r.$id,delete r.$id),t&&e&&this.addMetaSchema(r,r[n],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e==`object`?e[t]||e:void 0}validate(e,t){let n;if(typeof e==`string`){if(n=this.getSchema(e),!n)throw Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let r=n(t);return`$async`in n||(this.errors=n.errors),r}compile(e,t){let n=this._addSchema(e,t);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,t){if(typeof this.opts.loadSchema!=`function`)throw Error(`options.loadSchema should be a function`);let{loadSchema:n}=this.opts;return r.call(this,e,t);async function r(e,t){await a.call(this,e.$schema);let n=this._addSchema(e,t);return n.validate||o.call(this,n)}async function a(e){e&&!this.getSchema(e)&&await r.call(this,{$ref:e},!0)}async function o(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof i.default))throw t;return s.call(this,t),await c.call(this,t.missingSchema),o.call(this,e)}}function s({missingSchema:e,missingRef:t}){if(this.refs[e])throw Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function c(e){let n=await l.call(this,e);this.refs[e]||await a.call(this,n.$schema),this.refs[e]||this.addSchema(n,e,t)}async function l(e){let t=this._loading[e];if(t)return t;try{return await(this._loading[e]=n(e))}finally{delete this._loading[e]}}}addSchema(e,t,n,r=this.opts.validateSchema){if(Array.isArray(e)){for(let t of e)this.addSchema(t,void 0,n,r);return this}let i;if(typeof e==`object`){let{schemaId:t}=this.opts;if(i=e[t],i!==void 0&&typeof i!=`string`)throw Error(`schema ${t} must be string`)}return t=(0,c.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,n,t,r,!0),this}addMetaSchema(e,t,n=this.opts.validateSchema){return this.addSchema(e,t,!0,n),this}validateSchema(e,t){if(typeof e==`boolean`)return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!=`string`)throw Error(`$schema must be a string`);if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn(`meta-schema not available`),this.errors=null,!0;let r=this.validate(n,e);if(!r&&t){let e=`schema is invalid: `+this.errorsText();if(this.opts.validateSchema===`log`)this.logger.error(e);else throw Error(e)}return r}getSchema(e){let t;for(;typeof(t=C.call(this,e))==`string`;)e=t;if(t===void 0){let{schemaId:n}=this.opts,r=new o.SchemaEnv({schema:{},schemaId:n});if(t=o.resolveSchema.call(this,r,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case`undefined`:return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case`string`:{let t=C.call(this,e);return typeof t==`object`&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case`object`:{let t=e;this._cache.delete(t);let n=e[this.opts.schemaId];return n&&(n=(0,c.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw Error(`ajv.removeSchema: invalid parameter`)}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let n;if(typeof e==`string`)n=e,typeof t==`object`&&(this.logger.warn(`these parameters are deprecated, see docs for addKeyword`),t.keyword=n);else if(typeof e==`object`&&t===void 0){if(t=e,n=t.keyword,Array.isArray(n)&&!n.length)throw Error(`addKeywords: keyword must be string or non-empty array`)}else throw Error(`invalid addKeywords parameters`);if(j.call(this,n,t),!t)return(0,u.eachItem)(n,e=>M.call(this,e)),this;P.call(this,t);let r={...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)};return(0,u.eachItem)(n,r.type.length===0?e=>M.call(this,e,r):e=>r.type.forEach(t=>M.call(this,e,r,t))),this}getKeyword(e){let t=this.RULES.all[e];return typeof t==`object`?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(let n of t.rules){let t=n.rules.findIndex(t=>t.keyword===e);t>=0&&n.rules.splice(t,1)}return this}addFormat(e,t){return typeof t==`string`&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=`, `,dataVar:n=`data`}={}){return!e||e.length===0?`No errors`:e.map(e=>`${n}${e.instancePath} ${e.message}`).reduce((e,n)=>e+t+n)}$dataMetaSchema(e,t){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let r of t){let t=r.split(`/`).slice(1),i=e;for(let e of t)i=i[e];for(let e in n){let t=n[e];if(typeof t!=`object`)continue;let{$data:r}=t.definition,a=i[e];r&&a&&(i[e]=I(a))}}return e}_removeAllSchemas(e,t){for(let n in e){let r=e[n];(!t||t.test(n))&&(typeof r==`string`?delete e[n]:r&&!r.meta&&(this._cache.delete(r.schema),delete e[n]))}}_addSchema(e,t,n,r=this.opts.validateSchema,i=this.opts.addUsedSchema){let a,{schemaId:s}=this.opts;if(typeof e==`object`)a=e[s];else if(this.opts.jtd)throw Error(`schema must be object`);else if(typeof e!=`boolean`)throw Error(`schema must be object or boolean`);let l=this._cache.get(e);if(l!==void 0)return l;n=(0,c.normalizeId)(a||n);let u=c.getSchemaRefs.call(this,e,n);return l=new o.SchemaEnv({schema:e,schemaId:s,meta:t,baseId:n,localRefs:u}),this._cache.set(l.schema,l),i&&!n.startsWith(`#`)&&(n&&this._checkUnique(n),this.refs[n]=l),r&&this.validateSchema(e,!0),l}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):o.compileSchema.call(this,e),!e.validate)throw Error(`ajv implementation error`);return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,e)}finally{this.opts=t}}};x.ValidationError=r.default,x.MissingRefError=i.default,e.default=x;function S(e,t,n,r=`error`){for(let i in e){let a=i;a in t&&this.logger[r](`${n}: option ${i}. ${e[a]}`)}}function C(e){return e=(0,c.normalizeId)(e),this.schemas[e]||this.refs[e]}function w(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function T(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function E(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn(`keywords option as map is deprecated, pass array`);for(let t in e){let n=e[t];n.keyword||=t,this.addKeyword(n)}}function D(){let e={...this.opts};for(let t of h)delete e[t];return e}var O={log(){},warn(){},error(){}};function k(e){if(e===!1)return O;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw Error(`logger must implement log, warn and error methods`)}var A=/^[a-z_$][a-z0-9_$:-]*$/i;function j(e,t){let{RULES:n}=this;if((0,u.eachItem)(e,e=>{if(n.keywords[e])throw Error(`Keyword ${e} is already defined`);if(!A.test(e))throw Error(`Keyword ${e} has invalid name`)}),t&&t.$data&&!(`code`in t||`validate`in t))throw Error(`$data keyword must have "code" or "validate" function`)}function M(e,t,n){var r;let i=t?.post;if(n&&i)throw Error(`keyword with "post" flag cannot have "type"`);let{RULES:a}=this,o=i?a.post:a.rules.find(({type:e})=>e===n);if(o||(o={type:n,rules:[]},a.rules.push(o)),a.keywords[e]=!0,!t)return;let s={keyword:e,definition:{...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)}};t.before?N.call(this,o,s,t.before):o.rules.push(s),a.all[e]=s,(r=t.implements)==null||r.forEach(e=>this.addKeyword(e))}function N(e,t,n){let r=e.rules.findIndex(e=>e.keyword===n);r>=0?e.rules.splice(r,0,t):(e.rules.push(t),this.logger.warn(`rule ${n} is not defined`))}function P(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=I(t)),e.validateSchema=this.compile(t,!0))}var F={$ref:`https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#`};function I(e){return{anyOf:[e,F]}}})),mT=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={keyword:`id`,code(){throw Error(`NOT SUPPORTED: keyword "id", use "$id" for schema ID`)}}})),hT=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.callRef=e.getValidate=void 0;var t=$w(),n=Gw(),r=Iw(),i=Rw(),a=eT(),o=Lw(),s={keyword:`$ref`,schemaType:`string`,code(e){let{gen:n,schema:i,it:o}=e,{baseId:s,schemaEnv:u,validateName:d,opts:f,self:p}=o,{root:m}=u;if((i===`#`||i===`#/`)&&s===m.baseId)return g();let h=a.resolveRef.call(p,m,s,i);if(h===void 0)throw new t.default(o.opts.uriResolver,s,i);if(h instanceof a.SchemaEnv)return _(h);return v(h);function g(){if(u===m)return l(e,d,u,u.$async);let t=n.scopeValue(`root`,{ref:m});return l(e,(0,r._)`${t}.validate`,m,m.$async)}function _(t){l(e,c(e,t),t,t.$async)}function v(t){let a=n.scopeValue(`schema`,f.code.source===!0?{ref:t,code:(0,r.stringify)(t)}:{ref:t}),o=n.name(`valid`),s=e.subschema({schema:t,dataTypes:[],schemaPath:r.nil,topSchemaRef:a,errSchemaPath:i},o);e.mergeEvaluated(s),e.ok(o)}}};function c(e,t){let{gen:n}=e;return t.validate?n.scopeValue(`validate`,{ref:t.validate}):(0,r._)`${n.scopeValue(`wrapper`,{ref:t})}.validate`}e.getValidate=c;function l(e,t,a,s){let{gen:c,it:l}=e,{allErrors:u,schemaEnv:d,opts:f}=l,p=f.passContext?i.default.this:r.nil;s?m():h();function m(){if(!d.$async)throw Error(`async schema referenced by sync schema`);let i=c.let(`valid`);c.try(()=>{c.code((0,r._)`await ${(0,n.callValidateCode)(e,t,p)}`),_(t),u||c.assign(i,!0)},e=>{c.if((0,r._)`!(${e} instanceof ${l.ValidationError})`,()=>c.throw(e)),g(e),u||c.assign(i,!1)}),e.ok(i)}function h(){e.result((0,n.callValidateCode)(e,t,p),()=>_(t),()=>g(t))}function g(e){let t=(0,r._)`${e}.errors`;c.assign(i.default.vErrors,(0,r._)`${i.default.vErrors} === null ? ${t} : ${i.default.vErrors}.concat(${t})`),c.assign(i.default.errors,(0,r._)`${i.default.vErrors}.length`)}function _(e){if(!l.opts.unevaluated)return;let t=a?.validate?.evaluated;if(l.props!==!0)if(t&&!t.dynamicProps)t.props!==void 0&&(l.props=o.mergeEvaluated.props(c,t.props,l.props));else{let t=c.var(`props`,(0,r._)`${e}.evaluated.props`);l.props=o.mergeEvaluated.props(c,t,l.props,r.Name)}if(l.items!==!0)if(t&&!t.dynamicItems)t.items!==void 0&&(l.items=o.mergeEvaluated.items(c,t.items,l.items));else{let t=c.var(`items`,(0,r._)`${e}.evaluated.items`);l.items=o.mergeEvaluated.items(c,t,l.items,r.Name)}}}e.callRef=l,e.default=s})),gT=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=mT(),n=hT();e.default=[`$schema`,`$id`,`$defs`,`$vocabulary`,{keyword:`$comment`},`definitions`,t.default,n.default]})),_T=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Iw(),n=t.operators,r={maximum:{okStr:`<=`,ok:n.LTE,fail:n.GT},minimum:{okStr:`>=`,ok:n.GTE,fail:n.LT},exclusiveMaximum:{okStr:`<`,ok:n.LT,fail:n.GTE},exclusiveMinimum:{okStr:`>`,ok:n.GT,fail:n.LTE}};e.default={keyword:Object.keys(r),type:`number`,schemaType:`number`,$data:!0,error:{message:({keyword:e,schemaCode:n})=>(0,t.str)`must be ${r[e].okStr} ${n}`,params:({keyword:e,schemaCode:n})=>(0,t._)`{comparison: ${r[e].okStr}, limit: ${n}}`},code(e){let{keyword:n,data:i,schemaCode:a}=e;e.fail$data((0,t._)`${i} ${r[n].fail} ${a} || isNaN(${i})`)}}})),vT=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Iw();e.default={keyword:`multipleOf`,type:`number`,schemaType:`number`,$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,t._)`{multipleOf: ${e}}`},code(e){let{gen:n,data:r,schemaCode:i,it:a}=e,o=a.opts.multipleOfPrecision,s=n.let(`res`),c=o?(0,t._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:(0,t._)`${s} !== parseInt(${s})`;e.fail$data((0,t._)`(${i} === 0 || (${s} = ${r}/${i}, ${c}))`)}}})),yT=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});function t(e){let t=e.length,n=0,r=0,i;for(;r<t;)n++,i=e.charCodeAt(r++),i>=55296&&i<=56319&&r<t&&(i=e.charCodeAt(r),(i&64512)==56320&&r++);return n}e.default=t,t.code=`require("ajv/dist/runtime/ucs2length").default`})),bT=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Iw(),n=Lw(),r=yT();e.default={keyword:[`maxLength`,`minLength`],type:`string`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxLength`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} characters`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:i,data:a,schemaCode:o,it:s}=e,c=i===`maxLength`?t.operators.GT:t.operators.LT,l=s.opts.unicode===!1?(0,t._)`${a}.length`:(0,t._)`${(0,n.useFunc)(e.gen,r.default)}(${a})`;e.fail$data((0,t._)`${l} ${c} ${o}`)}}})),xT=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Gw(),n=Lw(),r=Iw();e.default={keyword:`pattern`,type:`string`,schemaType:`string`,$data:!0,error:{message:({schemaCode:e})=>(0,r.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,r._)`{pattern: ${e}}`},code(e){let{gen:i,data:a,$data:o,schema:s,schemaCode:c,it:l}=e,u=l.opts.unicodeRegExp?`u`:``;if(o){let{regExp:t}=l.opts.code,o=t.code===`new RegExp`?(0,r._)`new RegExp`:(0,n.useFunc)(i,t),s=i.let(`valid`);i.try(()=>i.assign(s,(0,r._)`${o}(${c}, ${u}).test(${a})`),()=>i.assign(s,!1)),e.fail$data((0,r._)`!${s}`)}else{let n=(0,t.usePattern)(e,s);e.fail$data((0,r._)`!${n}.test(${a})`)}}}})),ST=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Iw();e.default={keyword:[`maxProperties`,`minProperties`],type:`object`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxProperties`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} properties`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:n,data:r,schemaCode:i}=e,a=n===`maxProperties`?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`Object.keys(${r}).length ${a} ${i}`)}}})),CT=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Gw(),n=Iw(),r=Lw();e.default={keyword:`required`,type:`object`,schemaType:`array`,$data:!0,error:{message:({params:{missingProperty:e}})=>(0,n.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,n._)`{missingProperty: ${e}}`},code(e){let{gen:i,schema:a,schemaCode:o,data:s,$data:c,it:l}=e,{opts:u}=l;if(!c&&a.length===0)return;let d=a.length>=u.loopRequired;if(l.allErrors?f():p(),u.strictRequired){let t=e.parentSchema.properties,{definedProperties:n}=e.it;for(let e of a)if(t?.[e]===void 0&&!n.has(e)){let t=`required property "${e}" is not defined at "${l.schemaEnv.baseId+l.errSchemaPath}" (strictRequired)`;(0,r.checkStrictMode)(l,t,l.opts.strictRequired)}}function f(){if(d||c)e.block$data(n.nil,m);else for(let n of a)(0,t.checkReportMissingProp)(e,n)}function p(){let n=i.let(`missing`);if(d||c){let t=i.let(`valid`,!0);e.block$data(t,()=>h(n,t)),e.ok(t)}else i.if((0,t.checkMissingProp)(e,a,n)),(0,t.reportMissingProp)(e,n),i.else()}function m(){i.forOf(`prop`,o,n=>{e.setParams({missingProperty:n}),i.if((0,t.noPropertyInData)(i,s,n,u.ownProperties),()=>e.error())})}function h(r,a){e.setParams({missingProperty:r}),i.forOf(r,o,()=>{i.assign(a,(0,t.propertyInData)(i,s,r,u.ownProperties)),i.if((0,n.not)(a),()=>{e.error(),i.break()})},n.nil)}}}})),wT=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Iw();e.default={keyword:[`maxItems`,`minItems`],type:`array`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxItems`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} items`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:n,data:r,schemaCode:i}=e,a=n===`maxItems`?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`${r}.length ${a} ${i}`)}}})),TT=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Jw();t.code=`require("ajv/dist/runtime/equal").default`,e.default=t})),ET=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Uw(),n=Iw(),r=Lw(),i=TT();e.default={keyword:`uniqueItems`,type:`array`,schemaType:`boolean`,$data:!0,error:{message:({params:{i:e,j:t}})=>(0,n.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,n._)`{i: ${e}, j: ${t}}`},code(e){let{gen:a,data:o,$data:s,schema:c,parentSchema:l,schemaCode:u,it:d}=e;if(!s&&!c)return;let f=a.let(`valid`),p=l.items?(0,t.getSchemaTypes)(l.items):[];e.block$data(f,m,(0,n._)`${u} === false`),e.ok(f);function m(){let t=a.let(`i`,(0,n._)`${o}.length`),r=a.let(`j`);e.setParams({i:t,j:r}),a.assign(f,!0),a.if((0,n._)`${t} > 1`,()=>(h()?g:_)(t,r))}function h(){return p.length>0&&!p.some(e=>e===`object`||e===`array`)}function g(r,i){let s=a.name(`item`),c=(0,t.checkDataTypes)(p,s,d.opts.strictNumbers,t.DataType.Wrong),l=a.const(`indices`,(0,n._)`{}`);a.for((0,n._)`;${r}--;`,()=>{a.let(s,(0,n._)`${o}[${r}]`),a.if(c,(0,n._)`continue`),p.length>1&&a.if((0,n._)`typeof ${s} == "string"`,(0,n._)`${s} += "_"`),a.if((0,n._)`typeof ${l}[${s}] == "number"`,()=>{a.assign(i,(0,n._)`${l}[${s}]`),e.error(),a.assign(f,!1).break()}).code((0,n._)`${l}[${s}] = ${r}`)})}function _(t,s){let c=(0,r.useFunc)(a,i.default),l=a.name(`outer`);a.label(l).for((0,n._)`;${t}--;`,()=>a.for((0,n._)`${s} = ${t}; ${s}--;`,()=>a.if((0,n._)`${c}(${o}[${t}], ${o}[${s}])`,()=>{e.error(),a.assign(f,!1).break(l)})))}}}})),DT=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Iw(),n=Lw(),r=TT();e.default={keyword:`const`,$data:!0,error:{message:`must be equal to constant`,params:({schemaCode:e})=>(0,t._)`{allowedValue: ${e}}`},code(e){let{gen:i,data:a,$data:o,schemaCode:s,schema:c}=e;o||c&&typeof c==`object`?e.fail$data((0,t._)`!${(0,n.useFunc)(i,r.default)}(${a}, ${s})`):e.fail((0,t._)`${c} !== ${a}`)}}})),OT=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Iw(),n=Lw(),r=TT();e.default={keyword:`enum`,schemaType:`array`,$data:!0,error:{message:`must be equal to one of the allowed values`,params:({schemaCode:e})=>(0,t._)`{allowedValues: ${e}}`},code(e){let{gen:i,data:a,$data:o,schema:s,schemaCode:c,it:l}=e;if(!o&&s.length===0)throw Error(`enum must have non-empty array`);let u=s.length>=l.opts.loopEnum,d,f=()=>d??=(0,n.useFunc)(i,r.default),p;if(u||o)p=i.let(`valid`),e.block$data(p,m);else{if(!Array.isArray(s))throw Error(`ajv implementation error`);let e=i.const(`vSchema`,c);p=(0,t.or)(...s.map((t,n)=>h(e,n)))}e.pass(p);function m(){i.assign(p,!1),i.forOf(`v`,c,e=>i.if((0,t._)`${f()}(${a}, ${e})`,()=>i.assign(p,!0).break()))}function h(e,n){let r=s[n];return typeof r==`object`&&r?(0,t._)`${f()}(${a}, ${e}[${n}])`:(0,t._)`${a} === ${r}`}}}})),kT=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=_T(),n=vT(),r=bT(),i=xT(),a=ST(),o=CT(),s=wT(),c=ET(),l=DT(),u=OT();e.default=[t.default,n.default,r.default,i.default,a.default,o.default,s.default,c.default,{keyword:`type`,schemaType:[`string`,`array`]},{keyword:`nullable`,schemaType:`boolean`},l.default,u.default]})),AT=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.validateAdditionalItems=void 0;var t=Iw(),n=Lw(),r={keyword:`additionalItems`,type:`array`,schemaType:[`boolean`,`object`],before:`uniqueItems`,error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{parentSchema:t,it:r}=e,{items:a}=t;if(!Array.isArray(a)){(0,n.checkStrictMode)(r,`"additionalItems" is ignored when "items" is not an array of schemas`);return}i(e,a)}};function i(e,r){let{gen:i,schema:a,data:o,keyword:s,it:c}=e;c.items=!0;let l=i.const(`len`,(0,t._)`${o}.length`);if(a===!1)e.setParams({len:r.length}),e.pass((0,t._)`${l} <= ${r.length}`);else if(typeof a==`object`&&!(0,n.alwaysValidSchema)(c,a)){let n=i.var(`valid`,(0,t._)`${l} <= ${r.length}`);i.if((0,t.not)(n),()=>u(n)),e.ok(n)}function u(a){i.forRange(`i`,r.length,l,r=>{e.subschema({keyword:s,dataProp:r,dataPropType:n.Type.Num},a),c.allErrors||i.if((0,t.not)(a),()=>i.break())})}}e.validateAdditionalItems=i,e.default=r})),jT=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.validateTuple=void 0;var t=Iw(),n=Lw(),r=Gw(),i={keyword:`items`,type:`array`,schemaType:[`object`,`array`,`boolean`],before:`uniqueItems`,code(e){let{schema:t,it:i}=e;if(Array.isArray(t))return a(e,`additionalItems`,t);i.items=!0,!(0,n.alwaysValidSchema)(i,t)&&e.ok((0,r.validateArray)(e))}};function a(e,r,i=e.schema){let{gen:a,parentSchema:o,data:s,keyword:c,it:l}=e;f(o),l.opts.unevaluated&&i.length&&l.items!==!0&&(l.items=n.mergeEvaluated.items(a,i.length,l.items));let u=a.name(`valid`),d=a.const(`len`,(0,t._)`${s}.length`);i.forEach((r,i)=>{(0,n.alwaysValidSchema)(l,r)||(a.if((0,t._)`${d} > ${i}`,()=>e.subschema({keyword:c,schemaProp:i,dataProp:i},u)),e.ok(u))});function f(e){let{opts:t,errSchemaPath:a}=l,o=i.length,s=o===e.minItems&&(o===e.maxItems||e[r]===!1);if(t.strictTuples&&!s){let e=`"${c}" is ${o}-tuple, but minItems or maxItems/${r} are not specified or different at path "${a}"`;(0,n.checkStrictMode)(l,e,t.strictTuples)}}}e.validateTuple=a,e.default=i})),MT=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=jT();e.default={keyword:`prefixItems`,type:`array`,schemaType:[`array`],before:`uniqueItems`,code:e=>(0,t.validateTuple)(e,`items`)}})),NT=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Iw(),n=Lw(),r=Gw(),i=AT();e.default={keyword:`items`,type:`array`,schemaType:[`object`,`boolean`],before:`uniqueItems`,error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{schema:t,parentSchema:a,it:o}=e,{prefixItems:s}=a;o.items=!0,!(0,n.alwaysValidSchema)(o,t)&&(s?(0,i.validateAdditionalItems)(e,s):e.ok((0,r.validateArray)(e)))}}})),PT=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Iw(),n=Lw();e.default={keyword:`contains`,type:`array`,schemaType:[`object`,`boolean`],before:`uniqueItems`,trackErrors:!0,error:{message:({params:{min:e,max:n}})=>n===void 0?(0,t.str)`must contain at least ${e} valid item(s)`:(0,t.str)`must contain at least ${e} and no more than ${n} valid item(s)`,params:({params:{min:e,max:n}})=>n===void 0?(0,t._)`{minContains: ${e}}`:(0,t._)`{minContains: ${e}, maxContains: ${n}}`},code(e){let{gen:r,schema:i,parentSchema:a,data:o,it:s}=e,c,l,{minContains:u,maxContains:d}=a;s.opts.next?(c=u===void 0?1:u,l=d):c=1;let f=r.const(`len`,(0,t._)`${o}.length`);if(e.setParams({min:c,max:l}),l===void 0&&c===0){(0,n.checkStrictMode)(s,`"minContains" == 0 without "maxContains": "contains" keyword ignored`);return}if(l!==void 0&&c>l){(0,n.checkStrictMode)(s,`"minContains" > "maxContains" is always invalid`),e.fail();return}if((0,n.alwaysValidSchema)(s,i)){let n=(0,t._)`${f} >= ${c}`;l!==void 0&&(n=(0,t._)`${n} && ${f} <= ${l}`),e.pass(n);return}s.items=!0;let p=r.name(`valid`);l===void 0&&c===1?h(p,()=>r.if(p,()=>r.break())):c===0?(r.let(p,!0),l!==void 0&&r.if((0,t._)`${o}.length > 0`,m)):(r.let(p,!1),m()),e.result(p,()=>e.reset());function m(){let e=r.name(`_valid`),t=r.let(`count`,0);h(e,()=>r.if(e,()=>g(t)))}function h(t,i){r.forRange(`i`,0,f,r=>{e.subschema({keyword:`contains`,dataProp:r,dataPropType:n.Type.Num,compositeRule:!0},t),i()})}function g(e){r.code((0,t._)`${e}++`),l===void 0?r.if((0,t._)`${e} >= ${c}`,()=>r.assign(p,!0).break()):(r.if((0,t._)`${e} > ${l}`,()=>r.assign(p,!1).break()),c===1?r.assign(p,!0):r.if((0,t._)`${e} >= ${c}`,()=>r.assign(p,!0)))}}}})),FT=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;var t=Iw(),n=Lw(),r=Gw();e.error={message:({params:{property:e,depsCount:n,deps:r}})=>{let i=n===1?`property`:`properties`;return(0,t.str)`must have ${i} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:n,deps:r,missingProperty:i}})=>(0,t._)`{property: ${e},
|
|
55
|
+
missingProperty: ${i},
|
|
56
|
+
depsCount: ${n},
|
|
57
|
+
deps: ${r}}`};var i={keyword:`dependencies`,type:`object`,schemaType:`object`,error:e.error,code(e){let[t,n]=a(e);o(e,t),s(e,n)}};function a({schema:e}){let t={},n={};for(let r in e){if(r===`__proto__`)continue;let i=Array.isArray(e[r])?t:n;i[r]=e[r]}return[t,n]}function o(e,n=e.schema){let{gen:i,data:a,it:o}=e;if(Object.keys(n).length===0)return;let s=i.let(`missing`);for(let c in n){let l=n[c];if(l.length===0)continue;let u=(0,r.propertyInData)(i,a,c,o.opts.ownProperties);e.setParams({property:c,depsCount:l.length,deps:l.join(`, `)}),o.allErrors?i.if(u,()=>{for(let t of l)(0,r.checkReportMissingProp)(e,t)}):(i.if((0,t._)`${u} && (${(0,r.checkMissingProp)(e,l,s)})`),(0,r.reportMissingProp)(e,s),i.else())}}e.validatePropertyDeps=o;function s(e,t=e.schema){let{gen:i,data:a,keyword:o,it:s}=e,c=i.name(`valid`);for(let l in t)(0,n.alwaysValidSchema)(s,t[l])||(i.if((0,r.propertyInData)(i,a,l,s.opts.ownProperties),()=>{let t=e.subschema({keyword:o,schemaProp:l},c);e.mergeValidEvaluated(t,c)},()=>i.var(c,!0)),e.ok(c))}e.validateSchemaDeps=s,e.default=i})),IT=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Iw(),n=Lw();e.default={keyword:`propertyNames`,type:`object`,schemaType:[`object`,`boolean`],error:{message:`property name must be valid`,params:({params:e})=>(0,t._)`{propertyName: ${e.propertyName}}`},code(e){let{gen:r,schema:i,data:a,it:o}=e;if((0,n.alwaysValidSchema)(o,i))return;let s=r.name(`valid`);r.forIn(`key`,a,n=>{e.setParams({propertyName:n}),e.subschema({keyword:`propertyNames`,data:n,dataTypes:[`string`],propertyName:n,compositeRule:!0},s),r.if((0,t.not)(s),()=>{e.error(!0),o.allErrors||r.break()})}),e.ok(s)}}})),LT=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Gw(),n=Iw(),r=Rw(),i=Lw();e.default={keyword:`additionalProperties`,type:[`object`],schemaType:[`boolean`,`object`],allowUndefined:!0,trackErrors:!0,error:{message:`must NOT have additional properties`,params:({params:e})=>(0,n._)`{additionalProperty: ${e.additionalProperty}}`},code(e){let{gen:a,schema:o,parentSchema:s,data:c,errsCount:l,it:u}=e;if(!l)throw Error(`ajv implementation error`);let{allErrors:d,opts:f}=u;if(u.props=!0,f.removeAdditional!==`all`&&(0,i.alwaysValidSchema)(u,o))return;let p=(0,t.allSchemaProperties)(s.properties),m=(0,t.allSchemaProperties)(s.patternProperties);h(),e.ok((0,n._)`${l} === ${r.default.errors}`);function h(){a.forIn(`key`,c,e=>{!p.length&&!m.length?v(e):a.if(g(e),()=>v(e))})}function g(r){let o;if(p.length>8){let e=(0,i.schemaRefOrVal)(u,s.properties,`properties`);o=(0,t.isOwnProperty)(a,e,r)}else o=p.length?(0,n.or)(...p.map(e=>(0,n._)`${r} === ${e}`)):n.nil;return m.length&&(o=(0,n.or)(o,...m.map(i=>(0,n._)`${(0,t.usePattern)(e,i)}.test(${r})`))),(0,n.not)(o)}function _(e){a.code((0,n._)`delete ${c}[${e}]`)}function v(t){if(f.removeAdditional===`all`||f.removeAdditional&&o===!1){_(t);return}if(o===!1){e.setParams({additionalProperty:t}),e.error(),d||a.break();return}if(typeof o==`object`&&!(0,i.alwaysValidSchema)(u,o)){let r=a.name(`valid`);f.removeAdditional===`failing`?(y(t,r,!1),a.if((0,n.not)(r),()=>{e.reset(),_(t)})):(y(t,r),d||a.if((0,n.not)(r),()=>a.break()))}}function y(t,n,r){let a={keyword:`additionalProperties`,dataProp:t,dataPropType:i.Type.Str};r===!1&&Object.assign(a,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(a,n)}}}})),RT=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Zw(),n=Gw(),r=Lw(),i=LT();e.default={keyword:`properties`,type:`object`,schemaType:`object`,code(e){let{gen:a,schema:o,parentSchema:s,data:c,it:l}=e;l.opts.removeAdditional===`all`&&s.additionalProperties===void 0&&i.default.code(new t.KeywordCxt(l,i.default,`additionalProperties`));let u=(0,n.allSchemaProperties)(o);for(let e of u)l.definedProperties.add(e);l.opts.unevaluated&&u.length&&l.props!==!0&&(l.props=r.mergeEvaluated.props(a,(0,r.toHash)(u),l.props));let d=u.filter(e=>!(0,r.alwaysValidSchema)(l,o[e]));if(d.length===0)return;let f=a.name(`valid`);for(let t of d)p(t)?m(t):(a.if((0,n.propertyInData)(a,c,t,l.opts.ownProperties)),m(t),l.allErrors||a.else().var(f,!0),a.endIf()),e.it.definedProperties.add(t),e.ok(f);function p(e){return l.opts.useDefaults&&!l.compositeRule&&o[e].default!==void 0}function m(t){e.subschema({keyword:`properties`,schemaProp:t,dataProp:t},f)}}}})),zT=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Gw(),n=Iw(),r=Lw(),i=Lw();e.default={keyword:`patternProperties`,type:`object`,schemaType:`object`,code(e){let{gen:a,schema:o,data:s,parentSchema:c,it:l}=e,{opts:u}=l,d=(0,t.allSchemaProperties)(o),f=d.filter(e=>(0,r.alwaysValidSchema)(l,o[e]));if(d.length===0||f.length===d.length&&(!l.opts.unevaluated||l.props===!0))return;let p=u.strictSchema&&!u.allowMatchingProperties&&c.properties,m=a.name(`valid`);l.props!==!0&&!(l.props instanceof n.Name)&&(l.props=(0,i.evaluatedPropsToName)(a,l.props));let{props:h}=l;g();function g(){for(let e of d)p&&_(e),l.allErrors?v(e):(a.var(m,!0),v(e),a.if(m))}function _(e){for(let t in p)new RegExp(e).test(t)&&(0,r.checkStrictMode)(l,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function v(r){a.forIn(`key`,s,o=>{a.if((0,n._)`${(0,t.usePattern)(e,r)}.test(${o})`,()=>{let t=f.includes(r);t||e.subschema({keyword:`patternProperties`,schemaProp:r,dataProp:o,dataPropType:i.Type.Str},m),l.opts.unevaluated&&h!==!0?a.assign((0,n._)`${h}[${o}]`,!0):!t&&!l.allErrors&&a.if((0,n.not)(m),()=>a.break())})})}}}})),BT=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Lw();e.default={keyword:`not`,schemaType:[`object`,`boolean`],trackErrors:!0,code(e){let{gen:n,schema:r,it:i}=e;if((0,t.alwaysValidSchema)(i,r)){e.fail();return}let a=n.name(`valid`);e.subschema({keyword:`not`,compositeRule:!0,createErrors:!1,allErrors:!1},a),e.failResult(a,()=>e.reset(),()=>e.error())},error:{message:`must NOT be valid`}}})),VT=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={keyword:`anyOf`,schemaType:`array`,trackErrors:!0,code:Gw().validateUnion,error:{message:`must match a schema in anyOf`}}})),HT=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Iw(),n=Lw();e.default={keyword:`oneOf`,schemaType:`array`,trackErrors:!0,error:{message:`must match exactly one schema in oneOf`,params:({params:e})=>(0,t._)`{passingSchemas: ${e.passing}}`},code(e){let{gen:r,schema:i,parentSchema:a,it:o}=e;if(!Array.isArray(i))throw Error(`ajv implementation error`);if(o.opts.discriminator&&a.discriminator)return;let s=i,c=r.let(`valid`,!1),l=r.let(`passing`,null),u=r.name(`_valid`);e.setParams({passing:l}),r.block(d),e.result(c,()=>e.reset(),()=>e.error(!0));function d(){s.forEach((i,a)=>{let s;(0,n.alwaysValidSchema)(o,i)?r.var(u,!0):s=e.subschema({keyword:`oneOf`,schemaProp:a,compositeRule:!0},u),a>0&&r.if((0,t._)`${u} && ${c}`).assign(c,!1).assign(l,(0,t._)`[${l}, ${a}]`).else(),r.if(u,()=>{r.assign(c,!0),r.assign(l,a),s&&e.mergeEvaluated(s,t.Name)})})}}}})),UT=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Lw();e.default={keyword:`allOf`,schemaType:`array`,code(e){let{gen:n,schema:r,it:i}=e;if(!Array.isArray(r))throw Error(`ajv implementation error`);let a=n.name(`valid`);r.forEach((n,r)=>{if((0,t.alwaysValidSchema)(i,n))return;let o=e.subschema({keyword:`allOf`,schemaProp:r},a);e.ok(a),e.mergeEvaluated(o)})}}})),WT=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Iw(),n=Lw(),r={keyword:`if`,schemaType:[`object`,`boolean`],trackErrors:!0,error:{message:({params:e})=>(0,t.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,t._)`{failingKeyword: ${e.ifClause}}`},code(e){let{gen:r,parentSchema:a,it:o}=e;a.then===void 0&&a.else===void 0&&(0,n.checkStrictMode)(o,`"if" without "then" and "else" is ignored`);let s=i(o,`then`),c=i(o,`else`);if(!s&&!c)return;let l=r.let(`valid`,!0),u=r.name(`_valid`);if(d(),e.reset(),s&&c){let t=r.let(`ifClause`);e.setParams({ifClause:t}),r.if(u,f(`then`,t),f(`else`,t))}else s?r.if(u,f(`then`)):r.if((0,t.not)(u),f(`else`));e.pass(l,()=>e.error(!0));function d(){let t=e.subschema({keyword:`if`,compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(t)}function f(n,i){return()=>{let a=e.subschema({keyword:n},u);r.assign(l,u),e.mergeValidEvaluated(a,l),i?r.assign(i,(0,t._)`${n}`):e.setParams({ifClause:n})}}}};function i(e,t){let r=e.schema[t];return r!==void 0&&!(0,n.alwaysValidSchema)(e,r)}e.default=r})),GT=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Lw();e.default={keyword:[`then`,`else`],schemaType:[`object`,`boolean`],code({keyword:e,parentSchema:n,it:r}){n.if===void 0&&(0,t.checkStrictMode)(r,`"${e}" without "if" is ignored`)}}})),KT=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=AT(),n=MT(),r=jT(),i=NT(),a=PT(),o=FT(),s=IT(),c=LT(),l=RT(),u=zT(),d=BT(),f=VT(),p=HT(),m=UT(),h=WT(),g=GT();function _(e=!1){let _=[d.default,f.default,p.default,m.default,h.default,g.default,s.default,c.default,o.default,l.default,u.default];return e?_.push(n.default,i.default):_.push(t.default,r.default),_.push(a.default),_}e.default=_})),qT=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Iw();e.default={keyword:`format`,type:[`number`,`string`],schemaType:`string`,$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,t._)`{format: ${e}}`},code(e,n){let{gen:r,data:i,$data:a,schema:o,schemaCode:s,it:c}=e,{opts:l,errSchemaPath:u,schemaEnv:d,self:f}=c;if(!l.validateFormats)return;a?p():m();function p(){let a=r.scopeValue(`formats`,{ref:f.formats,code:l.code.formats}),o=r.const(`fDef`,(0,t._)`${a}[${s}]`),c=r.let(`fType`),u=r.let(`format`);r.if((0,t._)`typeof ${o} == "object" && !(${o} instanceof RegExp)`,()=>r.assign(c,(0,t._)`${o}.type || "string"`).assign(u,(0,t._)`${o}.validate`),()=>r.assign(c,(0,t._)`"string"`).assign(u,o)),e.fail$data((0,t.or)(p(),m()));function p(){return l.strictSchema===!1?t.nil:(0,t._)`${s} && !${u}`}function m(){let e=d.$async?(0,t._)`(${o}.async ? await ${u}(${i}) : ${u}(${i}))`:(0,t._)`${u}(${i})`,r=(0,t._)`(typeof ${u} == "function" ? ${e} : ${u}.test(${i}))`;return(0,t._)`${u} && ${u} !== true && ${c} === ${n} && !${r}`}}function m(){let a=f.formats[o];if(!a){m();return}if(a===!0)return;let[s,c,p]=h(a);s===n&&e.pass(g());function m(){if(l.strictSchema===!1){f.logger.warn(e());return}throw Error(e());function e(){return`unknown format "${o}" ignored in schema at path "${u}"`}}function h(e){let n=e instanceof RegExp?(0,t.regexpCode)(e):l.code.formats?(0,t._)`${l.code.formats}${(0,t.getProperty)(o)}`:void 0,i=r.scopeValue(`formats`,{key:o,ref:e,code:n});return typeof e==`object`&&!(e instanceof RegExp)?[e.type||`string`,e.validate,(0,t._)`${i}.validate`]:[`string`,e,i]}function g(){if(typeof a==`object`&&!(a instanceof RegExp)&&a.async){if(!d.$async)throw Error(`async format in sync schema`);return(0,t._)`await ${p}(${i})`}return typeof c==`function`?(0,t._)`${p}(${i})`:(0,t._)`${p}.test(${i})`}}}}})),JT=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=[qT().default]})),YT=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.contentVocabulary=e.metadataVocabulary=void 0,e.metadataVocabulary=[`title`,`description`,`default`,`deprecated`,`readOnly`,`writeOnly`,`examples`],e.contentVocabulary=[`contentMediaType`,`contentEncoding`,`contentSchema`]})),XT=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=gT(),n=kT(),r=KT(),i=JT(),a=YT();e.default=[t.default,n.default,(0,r.default)(),i.default,a.metadataVocabulary,a.contentVocabulary]})),ZT=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.DiscrError=void 0;var t;(function(e){e.Tag=`tag`,e.Mapping=`mapping`})(t||(e.DiscrError=t={}))})),QT=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=Iw(),n=ZT(),r=eT(),i=$w(),a=Lw();e.default={keyword:`discriminator`,type:`object`,schemaType:`object`,error:{message:({params:{discrError:e,tagName:t}})=>e===n.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:n,tagName:r}})=>(0,t._)`{error: ${e}, tag: ${r}, tagValue: ${n}}`},code(e){let{gen:o,data:s,schema:c,parentSchema:l,it:u}=e,{oneOf:d}=l;if(!u.opts.discriminator)throw Error(`discriminator: requires discriminator option`);let f=c.propertyName;if(typeof f!=`string`)throw Error(`discriminator: requires propertyName`);if(c.mapping)throw Error(`discriminator: mapping is not supported`);if(!d)throw Error(`discriminator: requires oneOf keyword`);let p=o.let(`valid`,!1),m=o.const(`tag`,(0,t._)`${s}${(0,t.getProperty)(f)}`);o.if((0,t._)`typeof ${m} == "string"`,()=>h(),()=>e.error(!1,{discrError:n.DiscrError.Tag,tag:m,tagName:f})),e.ok(p);function h(){let r=_();o.if(!1);for(let e in r)o.elseIf((0,t._)`${m} === ${e}`),o.assign(p,g(r[e]));o.else(),e.error(!1,{discrError:n.DiscrError.Mapping,tag:m,tagName:f}),o.endIf()}function g(n){let r=o.name(`valid`),i=e.subschema({keyword:`oneOf`,schemaProp:n},r);return e.mergeEvaluated(i,t.Name),r}function _(){let e={},t=o(l),n=!0;for(let e=0;e<d.length;e++){let c=d[e];if(c?.$ref&&!(0,a.schemaHasRulesButRef)(c,u.self.RULES)){let e=c.$ref;if(c=r.resolveRef.call(u.self,u.schemaEnv.root,u.baseId,e),c instanceof r.SchemaEnv&&(c=c.schema),c===void 0)throw new i.default(u.opts.uriResolver,u.baseId,e)}let l=c?.properties?.[f];if(typeof l!=`object`)throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${f}"`);n&&=t||o(c),s(l,e)}if(!n)throw Error(`discriminator: "${f}" must be required`);return e;function o({required:e}){return Array.isArray(e)&&e.includes(f)}function s(e,t){if(e.const)c(e.const,t);else if(e.enum)for(let n of e.enum)c(n,t);else throw Error(`discriminator: "properties/${f}" must have "const" or "enum"`)}function c(t,n){if(typeof t!=`string`||t in e)throw Error(`discriminator: "${f}" values must be unique strings`);e[t]=n}}}}})),$T=c({$id:()=>tE,$schema:()=>eE,default:()=>oE,definitions:()=>rE,properties:()=>aE,title:()=>nE,type:()=>iE}),eE,tE,nE,rE,iE,aE,oE,sE=o((()=>{eE=`http://json-schema.org/draft-07/schema#`,tE=`http://json-schema.org/draft-07/schema#`,nE=`Core schema meta-schema`,rE={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:[]}},iE=[`object`,`boolean`],aE={$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:`#`}},oE={$schema:eE,$id:tE,title:nE,definitions:rE,type:iE,properties:aE,default:!0}})),cE=s(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;var n=pT(),r=XT(),i=QT(),a=(sE(),d($T).default),o=[`/properties`],s=`http://json-schema.org/draft-07/schema`,c=class extends n.default{_addVocabularies(){super._addVocabularies(),r.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(a,o):a;this.addMetaSchema(e,s,!1),this.refs[`http://json-schema.org/schema`]=s}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}};e.Ajv=c,t.exports=e=c,t.exports.Ajv=c,Object.defineProperty(e,`__esModule`,{value:!0}),e.default=c;var l=Zw();Object.defineProperty(e,`KeywordCxt`,{enumerable:!0,get:function(){return l.KeywordCxt}});var u=Iw();Object.defineProperty(e,`_`,{enumerable:!0,get:function(){return u._}}),Object.defineProperty(e,`str`,{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(e,`stringify`,{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(e,`nil`,{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(e,`Name`,{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(e,`CodeGen`,{enumerable:!0,get:function(){return u.CodeGen}});var f=Qw();Object.defineProperty(e,`ValidationError`,{enumerable:!0,get:function(){return f.default}});var p=$w();Object.defineProperty(e,`MissingRefError`,{enumerable:!0,get:function(){return p.default}})})),lE=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(e,t){return{validate:e,compare:t}}e.fullFormats={date:t(a,o),time:t(c(!0),l),"date-time":t(f(!0),p),"iso-time":t(c(),u),"iso-date-time":t(f(),m),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:_,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|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:E,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:y,int32:{type:`number`,validate:S},int64:{type:`number`,validate:C},float:{type:`number`,validate:w},double:{type:`number`,validate:w},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,o),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,l),"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,p),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,u),"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,m),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(e){return e%4==0&&(e%100!=0||e%400==0)}var r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function a(e){let t=r.exec(e);if(!t)return!1;let a=+t[1],o=+t[2],s=+t[3];return o>=1&&o<=12&&s>=1&&s<=(o===2&&n(a)?29:i[o])}function o(e,t){if(e&&t)return e>t?1:e<t?-1:0}var s=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function c(e){return function(t){let n=s.exec(t);if(!n)return!1;let r=+n[1],i=+n[2],a=+n[3],o=n[4],c=n[5]===`-`?-1:1,l=+(n[6]||0),u=+(n[7]||0);if(l>23||u>59||e&&!o)return!1;if(r<=23&&i<=59&&a<60)return!0;let d=i-u*c,f=r-l*c-(d<0?1:0);return(f===23||f===-1)&&(d===59||d===-1)&&a<61}}function l(e,t){if(!(e&&t))return;let n=new Date(`2020-01-01T`+e).valueOf(),r=new Date(`2020-01-01T`+t).valueOf();if(n&&r)return n-r}function u(e,t){if(!(e&&t))return;let n=s.exec(e),r=s.exec(t);if(n&&r)return e=n[1]+n[2]+n[3],t=r[1]+r[2]+r[3],e>t?1:e<t?-1:0}var d=/t|\s/i;function f(e){let t=c(e);return function(e){let n=e.split(d);return n.length===2&&a(n[0])&&t(n[1])}}function p(e,t){if(!(e&&t))return;let n=new Date(e).valueOf(),r=new Date(t).valueOf();if(n&&r)return n-r}function m(e,t){if(!(e&&t))return;let[n,r]=e.split(d),[i,a]=t.split(d),s=o(n,i);if(s!==void 0)return s||l(r,a)}var h=/\/|:/,g=/^(?:[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 _(e){return h.test(e)&&g.test(e)}var v=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function y(e){return v.lastIndex=0,v.test(e)}var b=-(2**31),x=2**31-1;function S(e){return Number.isInteger(e)&&e<=x&&e>=b}function C(e){return Number.isInteger(e)}function w(){return!0}var T=/[^\\]\\Z/;function E(e){if(T.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}})),uE=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.formatLimitDefinition=void 0;var t=cE(),n=Iw(),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}};e.formatLimitDefinition={keyword:Object.keys(i),type:`string`,schemaType:`string`,$data:!0,error:{message:({keyword:e,schemaCode:t})=>(0,n.str)`should be ${i[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,n._)`{comparison: ${i[e].okStr}, limit: ${t}}`},code(e){let{gen:r,data:a,schemaCode:o,keyword:s,it:c}=e,{opts:l,self:u}=c;if(!l.validateFormats)return;let d=new t.KeywordCxt(c,u.RULES.all.format.definition,`format`);d.$data?f():p();function f(){let t=r.scopeValue(`formats`,{ref:u.formats,code:l.code.formats}),i=r.const(`fmt`,(0,n._)`${t}[${d.schemaCode}]`);e.fail$data((0,n.or)((0,n._)`typeof ${i} != "object"`,(0,n._)`${i} instanceof RegExp`,(0,n._)`typeof ${i}.compare != "function"`,m(i)))}function p(){let t=d.schema,i=u.formats[t];if(!i||i===!0)return;if(typeof i!=`object`||i instanceof RegExp||typeof i.compare!=`function`)throw Error(`"${s}": format "${t}" does not define "compare" function`);let a=r.scopeValue(`formats`,{key:t,ref:i,code:l.code.formats?(0,n._)`${l.code.formats}${(0,n.getProperty)(t)}`:void 0});e.fail$data(m(a))}function m(e){return(0,n._)`${e}.compare(${a}, ${o}) ${i[s].fail} 0`}},dependencies:[`format`]},e.default=t=>(t.addKeyword(e.formatLimitDefinition),t)})),dE=s(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0});var n=lE(),r=uE(),i=Iw(),a=new i.Name(`fullFormats`),o=new i.Name(`fastFormats`),s=(e,t={keywords:!0})=>{if(Array.isArray(t))return c(e,t,n.fullFormats,a),e;let[i,s]=t.mode===`fast`?[n.fastFormats,o]:[n.fullFormats,a];return c(e,t.formats||n.formatNames,i,s),t.keywords&&(0,r.default)(e),e};s.get=(e,t=`full`)=>{let r=(t===`fast`?n.fastFormats:n.fullFormats)[e];if(!r)throw Error(`Unknown format "${e}"`);return r};function c(e,t,n,r){var a;(a=e.opts.code).formats??(a.formats=(0,i._)`require("ajv-formats/dist/formats").${r}`);for(let r of t)e.addFormat(r,n[r])}t.exports=e=s,Object.defineProperty(e,`__esModule`,{value:!0}),e.default=s})),fE=u(cE(),1),pE=u(dE(),1);function mE(){let e=new fE.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return(0,pE.default)(e),e}var hE=class{constructor(e){this._ajv=e??mE()}getValidator(e){let t=`$id`in e&&typeof e.$id==`string`?this._ajv.getSchema(e.$id)??this._ajv.compile(e):this._ajv.compile(e);return e=>t(e)?{valid:!0,data:e,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(t.errors)}}},gE=class{constructor(e){this._client=e}async*callToolStream(e,t=Op,n){let r=this._client,i={...n,task:n?.task??(r.isToolTask(e.name)?{}:void 0)},a=r.requestStream({method:`tools/call`,params:e},t,i),o=r.getToolOutputValidator(e.name);for await(let t of a){if(t.type===`result`&&o){let n=t.result;if(!n.structuredContent&&!n.isError){yield{type:`error`,error:new mm(Qd.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`)};return}if(n.structuredContent)try{let e=o(n.structuredContent);if(!e.valid){yield{type:`error`,error:new mm(Qd.InvalidParams,`Structured content does not match the tool's output schema: ${e.errorMessage}`)};return}}catch(e){if(e instanceof mm){yield{type:`error`,error:e};return}yield{type:`error`,error:new mm(Qd.InvalidParams,`Failed to validate structured content: ${e instanceof Error?e.message:String(e)}`)};return}}yield t}}async getTask(e,t){return this._client.getTask({taskId:e},t)}async getTaskResult(e,t,n){return this._client.getTaskResult({taskId:e},t,n)}async listTasks(e,t){return this._client.listTasks(e?{cursor:e}:void 0,t)}async cancelTask(e,t){return this._client.cancelTask({taskId:e},t)}requestStream(e,t,n){return this._client.requestStream(e,t,n)}};function _E(e,t,n){if(!e)throw Error(`${n} does not support task creation (required for ${t})`);switch(t){case`tools/call`:if(!e.tools?.call)throw Error(`${n} does not support task creation for tools/call (required for ${t})`);break;default:break}}function vE(e,t,n){if(!e)throw Error(`${n} does not support task creation (required for ${t})`);switch(t){case`sampling/createMessage`:if(!e.sampling?.createMessage)throw Error(`${n} does not support task creation for sampling/createMessage (required for ${t})`);break;case`elicitation/create`:if(!e.elicitation?.create)throw Error(`${n} does not support task creation for elicitation/create (required for ${t})`);break;default:break}}function yE(e,t){if(!(!e||typeof t!=`object`||!t)){if(e.type===`object`&&e.properties&&typeof e.properties==`object`){let n=t,r=e.properties;for(let e of Object.keys(r)){let t=r[e];n[e]===void 0&&Object.prototype.hasOwnProperty.call(t,`default`)&&(n[e]=t.default),n[e]!==void 0&&yE(t,n[e])}}if(Array.isArray(e.anyOf))for(let n of e.anyOf)typeof n!=`boolean`&&yE(n,t);if(Array.isArray(e.oneOf))for(let n of e.oneOf)typeof n!=`boolean`&&yE(n,t)}}function bE(e){if(!e)return{supportsFormMode:!1,supportsUrlMode:!1};let t=e.form!==void 0,n=e.url!==void 0;return{supportsFormMode:t||!t&&!n,supportsUrlMode:n}}var xE=class extends jw{constructor(e,t){super(t),this._clientInfo=e,this._cachedToolOutputValidators=new Map,this._cachedKnownTaskTools=new Set,this._cachedRequiredTaskTools=new Set,this._listChangedDebounceTimers=new Map,this._capabilities=t?.capabilities??{},this._jsonSchemaValidator=t?.jsonSchemaValidator??new hE,t?.listChanged&&(this._pendingListChangedConfig=t.listChanged)}_setupListChangedHandlers(e){e.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler(`tools`,jp,e.tools,async()=>(await this.listTools()).tools),e.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler(`prompts`,Sp,e.prompts,async()=>(await this.listPrompts()).prompts),e.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler(`resources`,ep,e.resources,async()=>(await this.listResources()).resources)}get experimental(){return this._experimental||={tasks:new gE(this)},this._experimental}registerCapabilities(e){if(this.transport)throw Error(`Cannot register capabilities after connecting to transport`);this._capabilities=Nw(this._capabilities,e)}setRequestHandler(e,t){let n=Ew(e)?.method;if(!n)throw Error(`Schema is missing a method literal`);let r;if(ww(n)){let e=n;r=e._zod?.def?.value??e.value}else{let e=n;r=e._def?.value??e.value}if(typeof r!=`string`)throw Error(`Schema method literal must be a string`);let i=r;return i===`elicitation/create`?super.setRequestHandler(e,async(e,n)=>{let r=Tw(tm,e);if(!r.success){let e=r.error instanceof Error?r.error.message:String(r.error);throw new mm(Qd.InvalidParams,`Invalid elicitation request: ${e}`)}let{params:i}=r.data;i.mode=i.mode??`form`;let{supportsFormMode:a,supportsUrlMode:o}=bE(this._capabilities.elicitation);if(i.mode===`form`&&!a)throw new mm(Qd.InvalidParams,`Client does not support form-mode elicitation requests`);if(i.mode===`url`&&!o)throw new mm(Qd.InvalidParams,`Client does not support URL-mode elicitation requests`);let s=await Promise.resolve(t(e,n));if(i.task){let e=Tw(Of,s);if(!e.success){let t=e.error instanceof Error?e.error.message:String(e.error);throw new mm(Qd.InvalidParams,`Invalid task creation result: ${t}`)}return e.data}let c=Tw(im,s);if(!c.success){let e=c.error instanceof Error?c.error.message:String(c.error);throw new mm(Qd.InvalidParams,`Invalid elicitation result: ${e}`)}let l=c.data,u=i.mode===`form`?i.requestedSchema:void 0;if(i.mode===`form`&&l.action===`accept`&&l.content&&u&&this._capabilities.elicitation?.form?.applyDefaults)try{yE(u,l.content)}catch{}return l}):i===`sampling/createMessage`?super.setRequestHandler(e,async(e,n)=>{let r=Tw(Gp,e);if(!r.success){let e=r.error instanceof Error?r.error.message:String(r.error);throw new mm(Qd.InvalidParams,`Invalid sampling request: ${e}`)}let{params:i}=r.data,a=await Promise.resolve(t(e,n));if(i.task){let e=Tw(Of,a);if(!e.success){let t=e.error instanceof Error?e.error.message:String(e.error);throw new mm(Qd.InvalidParams,`Invalid task creation result: ${t}`)}return e.data}let o=Tw(i.tools||i.toolChoice?qp:Kp,a);if(!o.success){let e=o.error instanceof Error?o.error.message:String(o.error);throw new mm(Qd.InvalidParams,`Invalid sampling result: ${e}`)}return o.data}):super.setRequestHandler(e,t)}assertCapability(e,t){if(!this._serverCapabilities?.[e])throw Error(`Server does not support ${e} (required for ${t})`)}async connect(e,t){if(await super.connect(e),e.sessionId===void 0)try{let n=await this.request({method:`initialize`,params:{protocolVersion:kd,capabilities:this._capabilities,clientInfo:this._clientInfo}},gf,t);if(n===void 0)throw Error(`Server sent invalid initialize result: ${n}`);if(!Ad.includes(n.protocolVersion))throw Error(`Server's protocol version is not supported: ${n.protocolVersion}`);this._serverCapabilities=n.capabilities,this._serverVersion=n.serverInfo,e.setProtocolVersion&&e.setProtocolVersion(n.protocolVersion),this._instructions=n.instructions,await this.notification({method:`notifications/initialized`}),this._pendingListChangedConfig&&=(this._setupListChangedHandlers(this._pendingListChangedConfig),void 0)}catch(e){throw this.close(),e}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}getInstructions(){return this._instructions}assertCapabilityForMethod(e){switch(e){case`logging/setLevel`:if(!this._serverCapabilities?.logging)throw Error(`Server does not support logging (required for ${e})`);break;case`prompts/get`:case`prompts/list`:if(!this._serverCapabilities?.prompts)throw Error(`Server does not support prompts (required for ${e})`);break;case`resources/list`:case`resources/templates/list`:case`resources/read`:case`resources/subscribe`:case`resources/unsubscribe`:if(!this._serverCapabilities?.resources)throw Error(`Server does not support resources (required for ${e})`);if(e===`resources/subscribe`&&!this._serverCapabilities.resources.subscribe)throw Error(`Server does not support resource subscriptions (required for ${e})`);break;case`tools/call`:case`tools/list`:if(!this._serverCapabilities?.tools)throw Error(`Server does not support tools (required for ${e})`);break;case`completion/complete`:if(!this._serverCapabilities?.completions)throw Error(`Server does not support completions (required for ${e})`);break;case`initialize`:break;case`ping`:break}}assertNotificationCapability(e){switch(e){case`notifications/roots/list_changed`:if(!this._capabilities.roots?.listChanged)throw Error(`Client does not support roots list changed notifications (required for ${e})`);break;case`notifications/initialized`:break;case`notifications/cancelled`:break;case`notifications/progress`:break}}assertRequestHandlerCapability(e){if(this._capabilities)switch(e){case`sampling/createMessage`:if(!this._capabilities.sampling)throw Error(`Client does not support sampling capability (required for ${e})`);break;case`elicitation/create`:if(!this._capabilities.elicitation)throw Error(`Client does not support elicitation capability (required for ${e})`);break;case`roots/list`:if(!this._capabilities.roots)throw Error(`Client does not support roots capability (required for ${e})`);break;case`tasks/get`:case`tasks/list`:case`tasks/result`:case`tasks/cancel`:if(!this._capabilities.tasks)throw Error(`Client does not support tasks capability (required for ${e})`);break;case`ping`:break}}assertTaskCapability(e){_E(this._serverCapabilities?.tasks?.requests,e,`Server`)}assertTaskHandlerCapability(e){this._capabilities&&vE(this._capabilities.tasks?.requests,e,`Client`)}async ping(e){return this.request({method:`ping`},nf,e)}async complete(e,t){return this.request({method:`completion/complete`,params:e},lm,t)}async setLoggingLevel(e,t){return this.request({method:`logging/setLevel`,params:{level:e}},nf,t)}async getPrompt(e,t){return this.request({method:`prompts/get`,params:e},xp,t)}async listPrompts(e,t){return this.request({method:`prompts/list`,params:e},up,t)}async listResources(e,t){return this.request({method:`resources/list`,params:e},qf,t)}async listResourceTemplates(e,t){return this.request({method:`resources/templates/list`,params:e},Yf,t)}async readResource(e,t){return this.request({method:`resources/read`,params:e},$f,t)}async subscribeResource(e,t){return this.request({method:`resources/subscribe`,params:e},nf,t)}async unsubscribeResource(e,t){return this.request({method:`resources/unsubscribe`,params:e},nf,t)}async callTool(e,t=Op,n){if(this.isToolTaskRequired(e.name))throw new mm(Qd.InvalidRequest,`Tool "${e.name}" requires task-based execution. Use client.experimental.tasks.callToolStream() instead.`);let r=await this.request({method:`tools/call`,params:e},t,n),i=this.getToolOutputValidator(e.name);if(i){if(!r.structuredContent&&!r.isError)throw new mm(Qd.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`);if(r.structuredContent)try{let e=i(r.structuredContent);if(!e.valid)throw new mm(Qd.InvalidParams,`Structured content does not match the tool's output schema: ${e.errorMessage}`)}catch(e){throw e instanceof mm?e:new mm(Qd.InvalidParams,`Failed to validate structured content: ${e instanceof Error?e.message:String(e)}`)}}return r}isToolTask(e){return this._serverCapabilities?.tasks?.requests?.tools?.call?this._cachedKnownTaskTools.has(e):!1}isToolTaskRequired(e){return this._cachedRequiredTaskTools.has(e)}cacheToolMetadata(e){this._cachedToolOutputValidators.clear(),this._cachedKnownTaskTools.clear(),this._cachedRequiredTaskTools.clear();for(let t of e){if(t.outputSchema){let e=this._jsonSchemaValidator.getValidator(t.outputSchema);this._cachedToolOutputValidators.set(t.name,e)}let e=t.execution?.taskSupport;(e===`required`||e===`optional`)&&this._cachedKnownTaskTools.add(t.name),e===`required`&&this._cachedRequiredTaskTools.add(t.name)}}getToolOutputValidator(e){return this._cachedToolOutputValidators.get(e)}async listTools(e,t){let n=await this.request({method:`tools/list`,params:e},Dp,t);return this.cacheToolMetadata(n.tools),n}_setupListChangedHandler(e,t,n,r){let i=Mp.safeParse(n);if(!i.success)throw Error(`Invalid ${e} listChanged options: ${i.error.message}`);if(typeof n.onChanged!=`function`)throw Error(`Invalid ${e} listChanged options: onChanged must be a function`);let{autoRefresh:a,debounceMs:o}=i.data,{onChanged:s}=n,c=async()=>{if(!a){s(null,null);return}try{s(null,await r())}catch(e){s(e instanceof Error?e:Error(String(e)),null)}};this.setNotificationHandler(t,()=>{if(o){let t=this._listChangedDebounceTimers.get(e);t&&clearTimeout(t);let n=setTimeout(c,o);this._listChangedDebounceTimers.set(e,n)}else c()})}async sendRootsListChanged(){return this.notification({method:`notifications/roots/list_changed`})}};function SE(e){return e?e instanceof Headers?Object.fromEntries(e.entries()):Array.isArray(e)?Object.fromEntries(e):{...e}:{}}function CE(e=fetch,t){return t?async(n,r)=>e(n,{...t,...r,headers:r?.headers?{...SE(t.headers),...SE(r.headers)}:t.headers}):e}var wE=class extends Error{constructor(e,t){super(e),this.name=`ParseError`,this.type=t.type,this.field=t.field,this.value=t.value,this.line=t.line}};function TE(e){}function EE(e){if(typeof e==`function`)throw TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");let{onEvent:t=TE,onError:n=TE,onRetry:r=TE,onComment:i}=e,a=``,o=!0,s,c=``,l=``;function u(e){let t=o?e.replace(/^\xEF\xBB\xBF/,``):e,[n,r]=DE(`${a}${t}`);for(let e of n)d(e);a=r,o=!1}function d(e){if(e===``){p();return}if(e.startsWith(`:`)){i&&i(e.slice(e.startsWith(`: `)?2:1));return}let t=e.indexOf(`:`);if(t!==-1){let n=e.slice(0,t),r=e[t+1]===` `?2:1;f(n,e.slice(t+r),e);return}f(e,``,e)}function f(e,t,i){switch(e){case`event`:l=t;break;case`data`:c=`${c}${t}
|
|
58
|
+
`;break;case`id`:s=t.includes(`\0`)?void 0:t;break;case`retry`:/^\d+$/.test(t)?r(parseInt(t,10)):n(new wE(`Invalid \`retry\` value: "${t}"`,{type:`invalid-retry`,value:t,line:i}));break;default:n(new wE(`Unknown field "${e.length>20?`${e.slice(0,20)}\u2026`:e}"`,{type:`unknown-field`,field:e,value:t,line:i}));break}}function p(){c.length>0&&t({id:s,event:l||void 0,data:c.endsWith(`
|
|
59
|
+
`)?c.slice(0,-1):c}),s=void 0,c=``,l=``}function m(e={}){a&&e.consume&&d(a),o=!0,s=void 0,c=``,l=``,a=``}return{feed:u,reset:m}}function DE(e){let t=[],n=``,r=0;for(;r<e.length;){let i=e.indexOf(`\r`,r),a=e.indexOf(`
|
|
60
|
+
`,r),o=-1;if(i!==-1&&a!==-1?o=Math.min(i,a):i===-1?a!==-1&&(o=a):o=i===e.length-1?-1:i,o===-1){n=e.slice(r);break}else{let n=e.slice(r,o);t.push(n),r=o+1,e[r-1]===`\r`&&e[r]===`
|
|
61
|
+
`&&r++}}return[t,n]}var OE=class extends TransformStream{constructor({onError:e,onRetry:t,onComment:n}={}){let r;super({start(i){r=EE({onEvent:e=>{i.enqueue(e)},onError(t){e===`terminate`?i.error(t):typeof e==`function`&&e(t)},onRetry:t,onComment:n})},transform(e){r.feed(e)}})}},kE={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2},AE=class extends Error{constructor(e,t){super(`Streamable HTTP error: ${t}`),this.code=e}},jE=class{constructor(e,t){this._hasCompletedAuthFlow=!1,this._url=e,this._resourceMetadataUrl=void 0,this._scope=void 0,this._requestInit=t?.requestInit,this._authProvider=t?.authProvider,this._fetch=t?.fetch,this._fetchWithInit=CE(t?.fetch,t?.requestInit),this._sessionId=t?.sessionId,this._reconnectionOptions=t?.reconnectionOptions??kE}async _authThenStart(){if(!this._authProvider)throw new qm(`No auth provider`);let e;try{e=await rh(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(e){throw this.onerror?.(e),e}if(e!==`AUTHORIZED`)throw new qm;return await this._startOrAuthSse({resumptionToken:void 0})}async _commonHeaders(){let e={};if(this._authProvider){let t=await this._authProvider.tokens();t&&(e.Authorization=`Bearer ${t.access_token}`)}this._sessionId&&(e[`mcp-session-id`]=this._sessionId),this._protocolVersion&&(e[`mcp-protocol-version`]=this._protocolVersion);let t=SE(this._requestInit?.headers);return new Headers({...e,...t})}async _startOrAuthSse(e){let{resumptionToken:t}=e;try{let n=await this._commonHeaders();n.set(`Accept`,`text/event-stream`),t&&n.set(`last-event-id`,t);let r=await(this._fetch??fetch)(this._url,{method:`GET`,headers:n,signal:this._abortController?.signal});if(!r.ok){if(await r.body?.cancel(),r.status===401&&this._authProvider)return await this._authThenStart();if(r.status===405)return;throw new AE(r.status,`Failed to open SSE stream: ${r.statusText}`)}this._handleSseStream(r.body,e,!0)}catch(e){throw this.onerror?.(e),e}}_getNextReconnectionDelay(e){if(this._serverRetryMs!==void 0)return this._serverRetryMs;let t=this._reconnectionOptions.initialReconnectionDelay,n=this._reconnectionOptions.reconnectionDelayGrowFactor,r=this._reconnectionOptions.maxReconnectionDelay;return Math.min(t*n**+e,r)}_scheduleReconnection(e,t=0){let n=this._reconnectionOptions.maxRetries;if(t>=n){this.onerror?.(Error(`Maximum reconnection attempts (${n}) exceeded.`));return}let r=this._getNextReconnectionDelay(t);this._reconnectionTimeout=setTimeout(()=>{this._startOrAuthSse(e).catch(n=>{this.onerror?.(Error(`Failed to reconnect SSE stream: ${n instanceof Error?n.message:String(n)}`)),this._scheduleReconnection(e,t+1)})},r)}_handleSseStream(e,t,n){if(!e)return;let{onresumptiontoken:r,replayMessageId:i}=t,a,o=!1,s=!1;(async()=>{try{let t=e.pipeThrough(new TextDecoderStream).pipeThrough(new OE({onRetry:e=>{this._serverRetryMs=e}})).getReader();for(;;){let{value:e,done:n}=await t.read();if(n)break;if(e.id&&(a=e.id,o=!0,r?.(e.id)),e.data&&(!e.event||e.event===`message`))try{let t=tf.parse(JSON.parse(e.data));Zd(t)&&(s=!0,i!==void 0&&(t.id=i)),this.onmessage?.(t)}catch(e){this.onerror?.(e)}}(n||o)&&!s&&this._abortController&&!this._abortController.signal.aborted&&this._scheduleReconnection({resumptionToken:a,onresumptiontoken:r,replayMessageId:i},0)}catch(e){if(this.onerror?.(Error(`SSE stream disconnected: ${e}`)),(n||o)&&!s&&this._abortController&&!this._abortController.signal.aborted)try{this._scheduleReconnection({resumptionToken:a,onresumptiontoken:r,replayMessageId:i},0)}catch(e){this.onerror?.(Error(`Failed to reconnect: ${e instanceof Error?e.message:String(e)}`))}}})()}async start(){if(this._abortController)throw Error(`StreamableHTTPClientTransport already started! If using Client class, note that connect() calls start() automatically.`);this._abortController=new AbortController}async finishAuth(e){if(!this._authProvider)throw new qm(`No auth provider`);if(await rh(this._authProvider,{serverUrl:this._url,authorizationCode:e,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!==`AUTHORIZED`)throw new qm(`Failed to authorize`)}async close(){this._reconnectionTimeout&&=(clearTimeout(this._reconnectionTimeout),void 0),this._abortController?.abort(),this.onclose?.()}async send(e,t){try{let{resumptionToken:n,onresumptiontoken:r}=t||{};if(n){this._startOrAuthSse({resumptionToken:n,replayMessageId:qd(e)?e.id:void 0}).catch(e=>this.onerror?.(e));return}let i=await this._commonHeaders();i.set(`content-type`,`application/json`),i.set(`accept`,`application/json, text/event-stream`);let a={...this._requestInit,method:`POST`,headers:i,body:JSON.stringify(e),signal:this._abortController?.signal},o=await(this._fetch??fetch)(this._url,a),s=o.headers.get(`mcp-session-id`);if(s&&(this._sessionId=s),!o.ok){let t=await o.text().catch(()=>null);if(o.status===401&&this._authProvider){if(this._hasCompletedAuthFlow)throw new AE(401,`Server returned 401 after successful authentication`);let{resourceMetadataUrl:t,scope:n}=sh(o);if(this._resourceMetadataUrl=t,this._scope=n,await rh(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!==`AUTHORIZED`)throw new qm;return this._hasCompletedAuthFlow=!0,this.send(e)}if(o.status===403&&this._authProvider){let{resourceMetadataUrl:t,scope:n,error:r}=sh(o);if(r===`insufficient_scope`){let r=o.headers.get(`WWW-Authenticate`);if(this._lastUpscopingHeader===r)throw new AE(403,`Server returned 403 after trying upscoping`);if(n&&(this._scope=n),t&&(this._resourceMetadataUrl=t),this._lastUpscopingHeader=r??void 0,await rh(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetch})!==`AUTHORIZED`)throw new qm;return this.send(e)}}throw new AE(o.status,`Error POSTing to endpoint: ${t}`)}if(this._hasCompletedAuthFlow=!1,this._lastUpscopingHeader=void 0,o.status===202){await o.body?.cancel(),vf(e)&&this._startOrAuthSse({resumptionToken:void 0}).catch(e=>this.onerror?.(e));return}let c=(Array.isArray(e)?e:[e]).filter(e=>`method`in e&&`id`in e&&e.id!==void 0).length>0,l=o.headers.get(`content-type`);if(c)if(l?.includes(`text/event-stream`))this._handleSseStream(o.body,{onresumptiontoken:r},!1);else if(l?.includes(`application/json`)){let e=await o.json(),t=Array.isArray(e)?e.map(e=>tf.parse(e)):[tf.parse(e)];for(let e of t)this.onmessage?.(e)}else throw await o.body?.cancel(),new AE(-1,`Unexpected content type: ${l}`);else await o.body?.cancel()}catch(e){throw this.onerror?.(e),e}}get sessionId(){return this._sessionId}async terminateSession(){if(this._sessionId)try{let e=await this._commonHeaders(),t={...this._requestInit,method:`DELETE`,headers:e,signal:this._abortController?.signal},n=await(this._fetch??fetch)(this._url,t);if(await n.body?.cancel(),!n.ok&&n.status!==405)throw new AE(n.status,`Failed to terminate session: ${n.statusText}`);this._sessionId=void 0}catch(e){throw this.onerror?.(e),e}}setProtocolVersion(e){this._protocolVersion=e}get protocolVersion(){return this._protocolVersion}async resumeStream(e,t){await this._startOrAuthSse({resumptionToken:e,onresumptiontoken:t?.onresumptiontoken})}},ME=new class{client=null;transport=null;async connect(e,t){this.transport=new jE(typeof e==`string`?new URL(e):e,{authProvider:t}),this.client=new xE({name:`mcp-client`,version:`1.0.0`},{capabilities:{experimental:{tools:{},resources:{},prompts:{}}}}),await this.client.connect(this.transport)}async listTools(){if(!this.client)throw Error(`Client not connected. Call connect() first.`);try{return(await this.client.listTools()).tools}catch(e){if(e instanceof Error&&e.message.includes(`MCP error -32601: Method not found`))return[];throw e}}async callTool(e,t){if(!this.client)throw Error(`Client not connected. Call connect() first.`);let{_meta:n,...r}=await this.client.callTool({name:e,arguments:t??{}});return{...r,meta:n}}async listResources(){if(!this.client)throw Error(`Client not connected. Call connect() first.`);return(await this.client.listResources()).resources}async readResource(e){if(!this.client)throw Error(`Client not connected. Call connect() first.`);return await this.client.readResource({uri:e})}async listPrompts(){if(!this.client)throw Error(`Client not connected. Call connect() first.`);return(await this.client.listPrompts()).prompts}async getPrompt(e,t){if(!this.client)throw Error(`Client not connected. Call connect() first.`);return await this.client.getPrompt({name:e,...t&&{arguments:t}})}getServerInfo(){if(!this.client)throw Error(`Client not connected. Call connect() first.`);return this.client._serverVersion}async finishAuth(e){if(!this.transport)throw Error(`Transport not available. Call connect() first.`);await this.transport.finishAuth(e)}async close(){this.client&&=(await this.client.close(),null),this.transport&&=null}},NE=null,PE=()=>Dh.VITE_MCP_SERVER_URL;async function FE(){let e=PE(),{setStatus:t,setRequiresAuth:n,setError:r}=vi.getState();t(`connecting`),r(null),await ME.close();let i=!1;try{(await lh(e))?.authorization_servers?.length&&(i=!0)}catch{}n(i);try{i?(NE=new Cw,await ME.connect(e,NE)):(NE=null,await ME.connect(e)),t(`authenticated`),bw.invalidateQueries({queryKey:[`list-tools`]})}catch(e){if(e instanceof qm){t(`unauthenticated`);return}t(`error`),r(e instanceof Error?e.message:`Connection failed`)}}async function IE(e){let t=PE();await rh(new Cw,{serverUrl:t,authorizationCode:e}),await FE()}async function LE(){NE?.invalidateCredentials(`all`),NE=null,await ME.close(),vi.getState().reset(),bw.invalidateQueries({queryKey:[`list-tools`]})}var RE=()=>{let e=Nh();return{...e,view:{mode:e.displayMode},toolInput:{},toolOutput:null,toolResponseMetadata:null,widgetState:null}},zE=()=>{let{data:e}=at({queryKey:[`list-tools`],queryFn:()=>ME.listTools()});return e},BE=()=>{if(vi(e=>e.status)===`authenticated`)return ME.getServerInfo()},VE=()=>{let{setToolData:e}=ow();return ot({mutationFn:async({toolName:t,args:n})=>{e(t,{input:n??{},response:void 0,openaiRef:null,openaiLogs:[],openaiObject:null,openInAppUrl:null});let r=await ME.callTool(t,n);return e(t,{input:n??{},response:r,openaiRef:null,openaiLogs:[],openaiObject:{...RE(),toolInput:n??{},toolOutput:r.structuredContent,toolResponseMetadata:r.meta??null,widgetState:null},openInAppUrl:null}),r}})},HE=()=>{let[e]=yw();return zE().find(t=>t.name===e)??null},UE=()=>{let e=HE();if(!e)throw Error(`No tool is currently selected`);return e},WE=e=>at({queryKey:[`resource`,e],queryFn:async()=>{if(!e)throw Error(`Resource URI is required`);return await ME.readResource(e)}});function GE({className:e}){return(0,W.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,className:yr(`size-5`,e),"aria-hidden":!0,children:[(0,W.jsx)(`rect`,{width:`24`,height:`24`,rx:`6`,fill:`#071718`}),(0,W.jsx)(`path`,{d:`M7 14.5C7 14.5 9 17 12 17C15 17 17 14.5 17 14.5`,stroke:`#89F0EC`,strokeWidth:`1.75`,strokeLinecap:`round`}),(0,W.jsx)(`circle`,{cx:`12`,cy:`10`,r:`1.5`,fill:`#89F0EC`})]})}var KE={idle:{bg:`bg-gray-100`,dot:`bg-gray-400`,text:`text-gray-600`,label:`Disconnected`},connecting:{bg:`bg-yellow-100`,dot:`bg-yellow-500`,text:`text-yellow-800`,label:`Connecting...`},authenticated:{bg:`bg-green-100`,dot:`bg-green-500`,text:`text-green-800`,label:`Connected`},unauthenticated:{bg:`bg-orange-100`,dot:`bg-orange-500`,text:`text-orange-800`,label:`Login required`},error:{bg:`bg-red-100`,dot:`bg-red-500`,text:`text-red-800`,label:`Error`}};function qE({status:e}){let t=KE[e];return(0,W.jsxs)(`span`,{className:`flex items-center gap-1 rounded-full ${t.bg} px-2 py-0.5 text-xs font-semibold ${t.text}`,children:[(0,W.jsx)(`span`,{className:`h-2 w-2 rounded-full ${t.dot} mr-1 inline-block`}),t.label]})}var JE=()=>{let e=BE(),t=e?.name,n=e?.version,[,r]=yw(),{status:i,requiresAuth:a,error:o}=vi();return(0,W.jsxs)(`header`,{className:`flex items-center justify-between rounded-2xl border border-border bg-card px-4 py-2.5 shadow-sm`,children:[(0,W.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,W.jsxs)(`button`,{type:`button`,onClick:()=>r(null),className:`flex cursor-pointer items-center gap-2`,children:[(0,W.jsx)(GE,{className:`size-5`}),(0,W.jsx)(`span`,{className:`font-semibold`,children:`Skybridge`})]}),t&&(0,W.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 rounded-full border border-border bg-muted px-2.5 py-0.5 font-mono text-xs text-muted-foreground`,children:[t,n&&(0,W.jsxs)(`span`,{className:`border-l border-border pl-1.5 text-subtle-foreground`,children:[`v`,n]})]}),o&&(0,W.jsx)(`span`,{className:`max-w-48 truncate text-xs text-destructive`,children:o})]}),(0,W.jsxs)(`div`,{className:`flex items-center gap-2`,children:[a&&(0,W.jsx)(qE,{status:i}),a&&i===`authenticated`&&(0,W.jsxs)(di,{variant:`secondary`,onClick:()=>LE(),children:[(0,W.jsx)(Lr,{className:`size-3.5`}),`Sign out`]})]})]})},YE=()=>(0,W.jsx)(`div`,{className:`flex h-full flex-1 items-center justify-center`,children:(0,W.jsxs)(`div`,{className:`text-center`,children:[(0,W.jsx)(`h1`,{className:`mb-2 text-2xl font-semibold text-foreground`,children:`Welcome to Skybridge`}),(0,W.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Choose a tool from the sidebar to begin`})]})});function XE(e){return typeof e!=`object`||!e||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 ZE(e){return e.additionalItems===!0&&console.warn(`additionalItems=true is currently not supported`),XE(e.additionalItems)}function QE(e){if(e===``)return;if(e===null)return null;if(/\.$/.test(e)||/\.0$/.test(e)||/\.\d*0$/.test(e))return e;let t=Number(e);return typeof t==`number`&&!Number.isNaN(t)?t:e}var $E=`__additional_property`,eD=`additionalProperties`,tD=`allOf`,nD=`anyOf`,rD=`const`,iD=`default`,aD=`__errors`,oD=`items`,sD=`_$junk_option_schema_id$_`,cD=`$name`,lD=`oneOf`,uD=`properties`,dD=`readonly`,fD=`required`,pD=`submitButtonOptions`,mD=`$ref`,hD=`__rjsf_ref`,gD=`root`,_D=[`discriminator`,`propertyName`],vD=`formContext`,yD=`layoutGridLookupMap`,bD=`__rjsf_additionalProperties`,xD=`__rjsf_rootSchema`,SD=`ui:options`,CD=`ui:globalOptions`;function wD(e={},t={}){return e?Object.keys(e).filter(e=>e.indexOf(`ui:`)===0).reduce((t,n)=>{let r=e[n];return n===`ui:widget`&&XE(r)?(console.error(`Setting options via ui:widget object is no longer supported, use ui:options instead`),t):n===`ui:options`&&XE(r)?{...t,...r}:{...t,[n.substring(3)]:r}},{...t}):{...t}}function TD(e,t={},n){if(!(e.additionalProperties||e.patternProperties))return!1;let{expandable:r=!0}=wD(t);return r===!1?r:e.maxProperties!==void 0&&n?Object.keys(n).length<e.maxProperties:!0}function ED(e){let t={[aD]:[],addError(e){this[aD].push(e)}};if(Array.isArray(e))return e.reduce((e,t,n)=>({...e,[n]:ED(t)}),t);if(ky(e)){let n=e;return Object.keys(n).reduce((e,t)=>({...e,[t]:ED(n[t])}),t)}return t}function DD(e,t){return wC(e,t,(e,t)=>{if(typeof e==`function`&&typeof t==`function`)return!0})}var OD=Object.prototype;function kD(e){for(let t in e)if(OD.hasOwnProperty.call(e,t))return!1;return!0}var AD=[`$defs`,`definitions`,`properties`,`patternProperties`,`dependencies`];new Set(AD);var jD=[`items`,`allOf`,`oneOf`,`anyOf`];new Set(jD);var MD=[`items`,`additionalItems`,`additionalProperties`,`propertyNames`,`contains`,`if`,`then`,`else`,`not`];new Set(MD),[...AD,...jD,...MD];function ND(e){return typeof e==`object`}function PD(e){return ND(e)?kD(e):e===!0}function FD(e,t){return e<t?-1:e>t?1:0}function ID(e,t){let n=e.length;if(n===0)return t;let r=t.length;if(r===0)return e;if(n<r){let i=e;e=t,t=i,r=n}let i=new Set(e);for(let e=0;e<r;e++)i.add(t[e]);return Array.from(i)}function LD(e,t){let n=[];if(e.length===0||t.length===0)return n;if(e.length>t.length){let n=e;e=t,t=n}let r=new Set(t);for(let t=0;t<e.length&&r.size>0;t++){let i=e[t];r.delete(i)&&n.push(i)}return n}function RD(e){return e.length===0}function zD(e){return(t,n)=>{let r=t.length-n.length;if(r!==0)return r;for(let r=0;r<t.length;r++)if(t[r]!==n[r]){let i=e(t[r],n[r]);if(i!==0)return i}return 0}}function BD(e,{threshold:t=12}={}){return n=>{let r=n.length;if(r===0)return n;if(r<=t){let t=[],i=0;outer:for(let a=0;a<r;a++){let r=n[a];for(let n=0;n<i;n++)if(e(r,t[n])===0)continue outer;i=t.push(r)}return t}let i=n.slice().sort(e),a=0;for(let t=1;t<r;t++)e(i[a],i[t])!==0&&++a!==t&&(i[a]=i[t]);return i.length=a+1,i}}function VD(e){return(t,n)=>{let r=[],i=t.length,a=n.length;if(i===0||a===0)return r;if(i>a){let e=t;t=n,n=e;let r=i;i=a,a=r}let o=[...t].sort(e),s=[...n].sort(e),c=0,l=0;for(;c<i&&l<a;){let t=e(o[c],s[l]);t===0?((r.length===0||e(r[r.length-1],o[c])!==0)&&r.push(o[c]),c++,l++):t<0?c++:l++}return r}}function HD(e,t){return n=>{if(e.has(n))return e.get(n);let r=t(n);return e.set(n,r),r}}var UD=HD,WD=()=>0,GD=e=>e===void 0,KD=e=>typeof e!=`object`,qD={boolean:0,number:1,string:2};function JD(e,t){let n=typeof e,r=typeof t;return n===r?FD(e,t):qD[n]-qD[r]}function YD(e,t){let n=e.length;if(n===0)return t;let r=t.length;if(r===0)return e;if(r>n){let n=e;e=t,t=n}let i=new Set(e),a=t.length;for(let n=0;n<a;n++){let r=t[n];i.has(r)||e.push(r)}return e}function XD(e,t,n=WD){return(r,i)=>e(r)?e(i)?n(r,i):-1:e(i)?1:t(r,i)}function ZD(e){return XD(GD,e)}function QD(e,t){return XD(t=>t===void 0||e(t),t)}function $D(e,t){return XD(Array.isArray,e,t)}var eO=ZD(FD),tO=QD(e=>e===0,(e,t)=>e-t);function nO({deduplicationCache:e=new WeakMap,sortedKeysCache:t=new WeakMap}={}){let n=UD(t,e=>Object.keys(e).sort());function r(e){return(t,r)=>{let i=n(t),a=n(r),o=Math.min(i.length,a.length);for(let e=0;e<o;e++){let t=FD(i[e],a[e]);if(t!==0)return t}if(i.length!==a.length)return i.length-a.length;for(let n=0;n<o;n++){let a=i[n],o=e(t[a],r[a]);if(o!==0)return o}return 0}}function i(t){let n=zD(t),r=UD(e,BD(t,{threshold:0}));return(e,t)=>n(r(e),r(t))}let a=i(FD);function o(e,t){if(ND(e)){if(ND(t)){let n=YD(Object.keys(e),Object.keys(t)),r=n.length;for(let i=0;i<r;i++){let r=n[i];if(e[r]===t[r])continue;let a=(m[r]??s)(e[r],t[r]);if(a!==0)return a}return 0}return t===!0&&kD(e)?0:1}return ND(t)?e===!0&&kD(t)?0:-1:FD(e,t)}let s=ZD(l),c=XD(KD,$D(r(s),zD(l)),JD);function l(e,t){return e===null?-1:t===null?1:c(e,t)}let u=ZD(o),d=QD(kD,r(u)),f=ZD(i(o)),p=QD(PD,o),m={$id:eO,$comment:eO,$defs:d,$ref:eO,$schema:eO,const:s,contains:u,contentEncoding:eO,contentMediaType:eO,default:s,definitions:d,description:eO,else:u,examples:s,exclusiveMaximum:eO,exclusiveMinimum:eO,format:eO,if:u,maximum:eO,maxItems:eO,maxLength:eO,maxProperties:eO,minimum:eO,multipleOf:eO,not:u,pattern:eO,propertyNames:u,readOnly:eO,then:u,title:eO,writeOnly:eO,uniqueItems:QD(e=>e===!1,WD),minLength:tO,minItems:tO,minProperties:tO,required:QD(RD,a),enum:QD(RD,i(l)),type:ZD((e,t)=>{let n=Array.isArray(e),r=Array.isArray(t);return!n&&!r?FD(e,t):a(n?e:[e],r?t:[t])}),items:QD(e=>!Array.isArray(e)&&PD(e),$D(o,zD(o))),anyOf:f,allOf:f,oneOf:f,properties:d,patternProperties:d,additionalProperties:p,additionalItems:p,dependencies:QD(kD,r(ZD($D(o,a))))};return{compareSchemaValues:l,compareSchemaDefinitions:o}}function rO(e){return e}var iO=(e,t)=>e?iO(t%e,e):t,aO=(e,t)=>Math.abs(e*t)/iO(e,t);function oO(e,t){return e===t?e:`^(?=.*(?:${e}))(?=.*(?:${t})).*$`}function*sO(e,t,n){let r=e.length,i=t.length;if(r>0&&i>0)for(let a=0;a<r;a++){let r=e[a];for(let e=0;e<i;e++)yield n(r,t[e])}}function cO(e,t){return e||t}function lO(e){return(t,n)=>{let r={...t},i=Object.keys(n),a=i.length;for(let o=0;o<a;o++){let a=i[o];r[a]=t[a]===void 0?n[a]:e(t[a],n[a])}return r}}function uO(e){let t=new Map;for(let n of e)for(let e of n[0])t.set(e,n[1]);return t}function dO(e,t,n){n===void 0||PD(n)?delete e[t]:e[t]=n}var fO=[`properties`,`patternProperties`,`additionalProperties`];function pO(e){let t=Object.keys(e),n=t.length,r=[];for(let i=0;i<n;i++){let n=t[i];r.push({regExp:new RegExp(n),schema:e[n]})}return[r,t]}var mO=[[],[]];function hO(e,t,n){let r=n.length;for(let i=0;i<r;i++){let r=n[i];if(!r.regExp.test(t))continue;let a=r.schema;if(a===!1)return!0;e.push(a)}return!1}var gO=[`items`,`additionalItems`],_O=[`if`,`then`,`else`];function vO(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 yO(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 bO(e,t,n){return[e,t,n]}function xO(e){let t=new Map;for(let[n,r,i]of e){let e=e=>{if(!i(e))throw Error(`Schema keys '${n}' and '${r}' are conflicting (${n}: ${JSON.stringify(e[n])}, ${r}: ${JSON.stringify(e[r])})`)};for(let i of[[n,r],[r,n]]){let n=t.get(i[0]);n===void 0&&(n=[],t.set(i[0],n)),n.push({oppositeKey:i[1],check:e})}}return t}var SO=[bO(`minimum`,`maximum`,e=>e.maximum>=e.minimum),bO(`exclusiveMinimum`,`maximum`,e=>e.maximum>e.exclusiveMinimum),bO(`minimum`,`exclusiveMaximum`,e=>e.exclusiveMaximum>e.minimum),bO(`exclusiveMinimum`,`exclusiveMaximum`,e=>e.exclusiveMaximum>e.exclusiveMinimum),bO(`minLength`,`maxLength`,e=>e.maxLength>=e.minLength),bO(`minItems`,`maxItems`,e=>e.maxItems>=e.minItems),bO(`minProperties`,`maxProperties`,e=>e.maxProperties>=e.minProperties)];function CO({mergePatterns:e=oO,isSubRegExp:t=Object.is,intersectJson:n=LD,deduplicateJsonSchemaDef:r=rO,defaultMerger:i=rO,assigners:a=[],checks:o=SO,mergers:s}={}){function c(e){let t=e.length,n=e[0];for(let r=1;r<t;r++){let t=_(n,e[r]);if(t===!1)return!1;PD(t)||(n=t)}return n}function l(e,t,n,r,i,a,o){if(e.length=0,n===!1)return!1;if(e.push(n),i!==void 0){if(i===!1)return!1;e.push(i)}if(hO(e,t,a))return!1;let s=e.length<2;if(o===!1){if(s)return;if(hO(e,t,r))return!1}else s&&o!==void 0&&e.push(o);return e.length===1?e[0]:c(e)}function u(e,t,n,r,i,a){let o=n.length;if(o>0&&i!==!1)if(a)Object.assign(e,t);else for(let a=0;a<o;a++){let o=n[a];r.has(o)||(e[o]=_(t[o],i))}return e}let d=(n,{properties:r={},patternProperties:i,additionalProperties:a=!0},{properties:o={},patternProperties:s,additionalProperties:c=!0})=>{let d=PD(a),f=PD(c);if(d&&f)return dO(n,`properties`,v(r,o)),dO(n,`patternProperties`,i&&s?v(i,s):i??s),delete n.additionalProperties,n;dO(n,`additionalProperties`,_(a,c));let p={},m=Object.keys(r),h=m.length,[g,y]=i?pO(i):mO,[b,x]=s?pO(s):mO,S=[],C=new Set,w=f?void 0:c;for(let e=0;e<h;e++){let t=m[e];C.add(t);let n=l(S,t,r[t],g,o[t],b,w);n!==void 0&&(p[t]=n)}let T=Object.keys(o),E=T.length,D=d?void 0:a;for(let e=0;e<E;e++){let t=T[e];if(C.has(t))continue;let n=l(S,t,o[t],b,void 0,g,D);n!==void 0&&(p[t]=n)}dO(n,`properties`,p);let O={},k=new Set;if(y.length>0&&x.length>0){let n=sO(y,x,(n,r)=>{t(n,r)&&k.add(n),t(r,n)&&k.add(r),O[e(n,r)]=_(i[n],s[r])});for(;!n.next().done;);}return O=u(O,i,y,k,c,f),O=u(O,s,x,k,a,d),dO(n,`patternProperties`,O),n},f=(e,{items:t=[],additionalItems:n},{items:r=[],additionalItems:i})=>{let a=Array.isArray(t),o=Array.isArray(r),s=[];if(e.items=s,a&&o){let[a,o,c]=t.length<r.length?[t.length,n,r]:[r.length,i,t],l=0;for(;l<a;l++)s.push(_(t[l],r[l]));if(o===!1)e.additionalItems=!1;else{let t=o===void 0||PD(o);for(;l<c.length;l++)s.push(t?c[l]:_(c[l],o));dO(e,`additionalItems`,n!==void 0&&i!==void 0?_(n,i):n??i)}}else if(a||o){let[o,c,l]=a?[t,r,n]:[r,t,i];dO(e,`additionalItems`,l&&_(l,c));for(let e=0;e<o.length;e++)s.push(_(o[e],c))}else delete e.additionalItems,e.items=_(t,r);return e},p=(e,t,n)=>{vO(e,t);let r=vO({},n);return e.allOf===void 0?e.allOf=[r]:e.allOf=e.allOf.concat(r),e};function m(e,t){return r(Array.from(sO(e,t,_)))}let h=uO([[fO,d],[gO,f],[_O,p],...a]),g=xO(o);function _(e,t){if(e===!1||t===!1)return!1;if(PD(e))return PD(t)?!0:t;if(PD(t))return e;let n={...e},r=new Set,a=new Set,o=Object.keys(t),s=o.length;for(let c=0;c<s;c++){let s=o[c],l=t[s];if(l===void 0)continue;let u=g.get(s);if(u!==void 0){let t=u.length;for(let n=0;n<t;n++){let t=u[n];e[t.oppositeKey]!==void 0&&a.add(t.check)}}let d=e[s];if(d===void 0){n[s]=l;continue}let f=h.get(s);if(f){r.add(f);continue}let p=y[s]??i;n[s]=p(d,l)}for(let i of r)n=i(n,e,t);for(let e of a)e(n);return n}let v=lO(_),y={$id:i,$ref:i,$schema:i,$comment:i,$defs:v,definitions:v,type:(e,t)=>{if(e===t)return e;let n=Array.isArray(e),r=Array.isArray(t);if(!n&&!r){let n=yO(e,t);if(n!==void 0)return n}else if(n||r){let i=new Set;if(n&&r)for(let n of sO(e,t,yO))n!==void 0&&i.add(n);else{let r=n?e:t,a=n?t:e,o=r.length;for(let e=0;e<o;e++){let t=yO(a,r[e]);t!==void 0&&i.add(t)}}let a=i.size;if(a===1)return i.values().next().value;if(a>1)return Array.from(i)}throw Error(`It is not possible to create an intersection of the following incompatible types: ${e.toString()}, ${t.toString()}`)},default:i,description:i,title:i,const:i,format:i,contentEncoding:i,contentMediaType:i,not:(e,t)=>{let n=r([e,t]);return n.length===1?n[0]:{anyOf:n}},pattern:e,readOnly:cO,writeOnly:cO,enum:(e,t)=>{let r=n(e,t);if(r.length===0)throw Error(`Intersection of the following enums is empty: "${JSON.stringify(e)}", "${JSON.stringify(t)}"`);return r},anyOf:m,oneOf:m,allOf:(e,t)=>r(e.concat(t)),propertyNames:_,contains:_,dependencies:lO((e,t)=>Array.isArray(e)?Array.isArray(t)?ID(e,t):_(t,{required:e}):Array.isArray(t)?_(e,{required:t}):_(e,t)),examples:(e,t)=>{if(!Array.isArray(e)||!Array.isArray(t))throw Error(`Value of the 'examples' field should be an array, but got "${JSON.stringify(e)}" and "${JSON.stringify(t)}"`);return ID(e,t)},multipleOf:(e,t)=>{let n=1;for(;!Number.isInteger(e)||!Number.isInteger(t);)n*=10,e*=10,t*=10;return aO(e,t)/n},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:cO,required:ID,...s};return{mergeSchemaDefinitions:_,mergeArrayOfSchemaDefinitions:c}}function wO(e){let t=[],n=[e];for(;n.length>0;){let e=n.pop();if(typeof e==`boolean`||e.allOf===void 0){t.push(e);continue}let{allOf:r,...i}=e;t.push(i);for(let e=r.length-1;e>=0;e--)n.push(r[e])}return t}function TO(e){return t=>e(wO(t))}var EO=u(s((e=>{var t=/~/,n=/~[01]/g;function r(e){switch(e){case`~1`:return`/`;case`~0`:return`~`}throw Error(`Invalid tilde escape: `+e)}function i(e){return t.test(e)?e.replace(n,r):e}function a(e){if(typeof e==`string`){if(e=e.split(`/`),e[0]===``)return e;throw Error(`Invalid JSON pointer.`)}else if(Array.isArray(e)){for(let t of e)if(typeof t!=`string`&&typeof t!=`number`)throw Error(`Invalid JSON pointer. Must be of type string or number.`);return e}throw Error(`Invalid JSON pointer.`)}function o(e,t){if(typeof e!=`object`)throw Error(`Invalid input object.`);t=a(t);var n=t.length;if(n===1)return e;for(var r=1;r<n;){if(e=e[i(t[r++])],n===r)return e;if(typeof e!=`object`||!e)return}}e.get=o}))(),1),DO=u(dT(),1);function OO(e,t){if(`$id`in e&&DO.default.equal(e.$id,t))return e;for(let n of Object.values(e))if(Array.isArray(n)){for(let e of n)if(cg(e)){let n=OO(e,t);if(n!==void 0)return n}}else if(cg(n)){let e=OO(n,t);if(e!==void 0)return e}}function kO(e,t){let n=Q(e,`$id`,t);`$ref`in e&&(e={...e,[mD]:DO.default.resolve(n,e[mD])});for(let[t,r]of Object.entries(e))Array.isArray(r)?e={...e,[t]:r.map(e=>cg(e)?kO(e,n):e)}:cg(r)&&(e={...e,[t]:kO(r,n)});return e}function AO(e,t){let n=t[e];return[IC(t,[e]),n]}function jO(e,t={},n=[],r=Q(t,[`$id`])){let i=e||``,a;if(i.startsWith(`#`)){let e=decodeURIComponent(i.substring(1));r===void 0||`$id`in t&&t.$id===r?a=EO.get(t,e):t.$schema===`https://json-schema.org/draft/2020-12/schema`&&(a=OO(t,r.replace(/\/$/,``)),a!==void 0&&(a=EO.get(a,e)))}else if(t.$schema===`https://json-schema.org/draft/2020-12/schema`){let[e,...n]=(r?DO.default.resolve(r,i):i).replace(/#\/?$/,``).split(`#`);a=OO(t,e.replace(/\/$/,``)),a!==void 0&&(r=a.$id,SC(n)||(a=EO.get(a,decodeURIComponent(n.join(`#`)))))}if(a===void 0)throw Error(`Could not find a definition for ${e}.`);let o=a[mD];if(o){if(n.includes(o)){if(n.length===1)throw Error(`Definition for ${e} is a circular reference`);let[t,...r]=n,a=[...r,i,t].join(` -> `);throw Error(`Definition for ${t} contains a circular reference through ${a}`)}let[s,c]=AO(mD,a),l=jO(c,t,[...n,i],r);return Object.keys(s).length>0?t.$schema===`https://json-schema.org/draft/2019-09/schema`||t.$schema===`https://json-schema.org/draft/2020-12/schema`?{[tD]:[s,l]}:{...s,...l}:l}return a}function MO(e,t={},n=Q(t,[`$id`])){return jO(e,t,[],n)}function NO(e){let t,n=Q(e,_D);return lC(n)?t=n:n!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof n}" instead`),t}function PO(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 FO(e){let{type:t}=e;return!t&&e.const?PO(e.const):!t&&e.enum?`string`:!t&&(e.properties||e.additionalProperties||e.patternProperties)?`object`:(Array.isArray(t)&&(t=t.length===2&&t.includes(`null`)?t.find(e=>e!==`null`):t[0]),t)}function IO(e,t){let n=Object.assign({},e);return Object.keys(t).reduce((n,r)=>{let i=e?e[r]:{},a=t[r];return e&&r in e&&XE(a)?n[r]=IO(i,a):e&&t&&(FO(e)===`object`||FO(t)===`object`)&&r===`required`&&Array.isArray(i)&&Array.isArray(a)?n[r]=tw(i,a):n[r]=a,n},n)}function LO(e,t,n){if(e&&n){let r=Q(e,n);if(r===void 0)return;for(let e=0;e<t.length;e++){let i=t[e],a=Q(i,[uD,n],{});if(!(a.type===`object`||a.type===`array`)&&(a.const===r||a.enum?.includes(r)))return e}}}function RO(e,t,n,r,i){if(t===void 0)return 0;let a=LO(t,n,i);if(EC(a))return a;for(let a=0;a<n.length;a++){let o=n[a];if(i&&sC(o,[`properties`,i])){let n=Q(t,i),s=Q(o,[uD,i],{});if(e.isValid(s,n,r))return a}else if(o.properties){let n={anyOf:Object.keys(o[uD]).map(e=>({required:[e]}))},i;if(o.anyOf){let{...e}=o;e.allOf?e.allOf=e.allOf.slice():e.allOf=[],e.allOf.push(n),i=e}else i=Object.assign({},o,n);if(delete i.required,e.isValid(i,t,r))return a}else if(e.isValid(o,t,r))return a}return 0}function zO(e,t,n={},r,i,a=!1){return QO(e,t,n,r,void 0,void 0,i,a)[0]}function BO(e,t,n,r,i,a,o){let{if:s,then:c,else:l,...u}=t,d=e.isValid(s,a||{},n),f=[u],p=[];if(r)c&&typeof c!=`boolean`&&(p=p.concat(QO(e,c,n,a,r,i,o))),l&&typeof l!=`boolean`&&(p=p.concat(QO(e,l,n,a,r,i,o)));else{let t=d?c:l;t&&typeof t!=`boolean`&&(p=p.concat(QO(e,t,n,a,r,i,o)))}return p.length&&(f=p.map(e=>IO(u,e))),f.flatMap(t=>QO(e,t,n,a,r,i,o))}function VO(e){return e.reduce((e,t)=>t.length>1?t.flatMap(t=>YC(e.length,n=>[...e[n]].concat(t))):(e.forEach(e=>e.push(t[0])),e),[[]])}function HO(e,t){return Object.keys(e.patternProperties).filter(e=>RegExp(e).test(t)).reduce((t,n)=>(WC(t,[n],e.patternProperties[n]),t),{})}function UO(e,t,n,r,i,a,o,s){let c=WO(e,t,n,r,i,a,o,s);return c.length>1||c[0]!==t?c:`dependencies`in t?ek(e,t,n,r,i,a,o).flatMap(t=>QO(e,t,n,a,r,i,o)):`allOf`in t&&Array.isArray(t.allOf)?VO(t.allOf.map(t=>QO(e,t,n,a,r,i,o))).map(e=>({...t,allOf:e})):[t]}function WO(e,t,n,r,i,a,o,s){let c=GO(t,n,i,void 0,s);return c===t?[t]:QO(e,c,n,a,r,i,o,s)}function GO(e,t,n,r,i){if(!XE(e))return e;let a=e;if(`$ref`in a){let{$ref:e,...i}=a;if(n.includes(e))return a;n.push(e),a={...MO(e,t,r),...i,[hD]:e},`$id`in a&&(r=a.$id)}if(`properties`in a){let e=[],o=ZC(a[uD],(a,o,s)=>{let c=[...n];a[s]=GO(o,t,c,r,i),e.push(c)},{});kC(n,nw(iC(e))),a={...a,[uD]:o}}if(`items`in a&&!Array.isArray(a.items)&&typeof a.items!=`boolean`&&(a={...a,items:GO(a.items,t,n,r,i)}),i){let o,s;`anyOf`in e&&Array.isArray(e.anyOf)?(o=nD,s=a[nD]):`oneOf`in e&&Array.isArray(e.oneOf)&&(o=lD,s=a[lD]),o&&s&&(a={...a,[o]:s.map(e=>GO(e,t,n,r,i))})}return DD(e,a)?e:a}function KO(e,t,n,r,i){let a={...t,properties:{...t.properties}},o=r&&XE(r)?r:{};return Object.keys(o).forEach(t=>{if(!(t in a.properties)){if(`patternProperties`in a){let r=HO(a,t);if(!SC(r)){a.properties[t]=zO(e,{[tD]:Object.values(r)},n,Q(o,[t]),i),WC(a.properties,[t,$E],!0);return}}if(`additionalProperties`in a&&a.additionalProperties!==!1){let r;r=typeof a.additionalProperties==`boolean`?{type:PO(Q(o,[t]))}:`$ref`in a.additionalProperties?zO(e,{[mD]:Q(a.additionalProperties,[mD])},n,o,i):`type`in a.additionalProperties?{...a.additionalProperties}:`anyOf`in a.additionalProperties||`oneOf`in a.additionalProperties?{type:`object`,...a.additionalProperties}:{type:PO(Q(o,[t]))},a.properties[t]=r,WC(a.properties,[t,$E],!0)}else a.properties[t]={type:`null`},WC(a.properties,[t,$E],!0)}}),a}var{compareSchemaDefinitions:qO,compareSchemaValues:JO}=nO(),{mergeArrayOfSchemaDefinitions:YO}=CO({intersectJson:VD(JO),deduplicateJsonSchemaDef:BD(qO)}),XO=TO(YO);function ZO(e){return XO(e)}function QO(e,t,n,r,i=!1,a=[],o,s){return XE(t)?UO(e,t,n,i,a,r,o,s).flatMap(t=>{var s;let c=t;if(`if`in c)return BO(e,c,n,i,a,r,o);if(`allOf`in c){if(i){let{allOf:e,...t}=c;return[...e,t]}try{let e=[],t=[];(s=c.allOf)==null||s.forEach(n=>{typeof n==`object`&&n.contains?e.push(n):t.push(n)}),e.length&&(c={...c,allOf:t}),c=o?o(c):ZO(c),e.length&&(c.allOf=e)}catch(e){console.warn(`could not merge subschemas in allOf:
|
|
62
|
+
`,e);let{allOf:t,...n}=c;return n}}return`properties`in c&&`patternProperties`in c&&(c=Object.keys(c.properties).reduce((t,i)=>{let a=HO(t,i);return SC(a)||(t.properties[i]=zO(e,{allOf:[t.properties[i],...Object.values(a)]},n,Q(r,[i]),o)),t},{...c,properties:{...c.properties}})),`patternProperties`in c||`additionalProperties`in c&&c.additionalProperties!==!1?KO(e,c,n,r,o):c}):[{}]}function $O(e,t,n,r,i){let a,{oneOf:o,anyOf:s,...c}=t;if(Array.isArray(o)?a=o:Array.isArray(s)&&(a=s),a){let o=i===void 0&&r?{}:i,s=NO(t);a=a.map(e=>GO(e,n,[]));let l=RO(e,o,a,n,s);if(r)return a.map(e=>IO(c,e));t=IO(c,a[l])}return[t]}function ek(e,t,n,r,i,a,o){let{dependencies:s,...c}=t;return $O(e,c,n,r,a).flatMap(t=>tk(e,s,t,n,r,i,a,o))}function tk(e,t,n,r,i,a,o,s){let c=[n];for(let l in t){if(!i&&Q(o,[l])===void 0||n.properties&&!(l in n.properties))continue;let[u,d]=AO(l,t);return Array.isArray(d)?c[0]=nk(n,d):XE(d)&&(c=rk(e,n,r,l,d,i,a,o,s)),c.flatMap(t=>tk(e,u,t,r,i,a,o,s))}return c}function nk(e,t){if(!t)return e;let n=Array.isArray(e.required)?Array.from(new Set([...e.required,...t])):t;return{...e,required:n}}function rk(e,t,n,r,i,a,o,s,c){return QO(e,i,n,s,a,o,c).flatMap(i=>{let{oneOf:l,...u}=i;return t=IO(t,u),l===void 0?t:VO(l.map(t=>typeof t==`boolean`||!(`$ref`in t)?[t]:WO(e,t,n,a,o,s))).flatMap(i=>ik(e,t,n,r,i,a,o,s,c))})}function ik(e,t,n,r,i,a,o,s,c){let l=i.filter(t=>{if(typeof t==`boolean`||!t||!t.properties)return!1;let{[r]:i}=t.properties;if(i){let t={type:`object`,properties:{[r]:i}};return e.isValid(t,s,n)||a}return!1});return!a&&l.length!==1?(console.warn(`ignoring oneOf in dependencies because there isn't exactly one subschema that is valid`),[t]):l.flatMap(i=>{let l=i,[u]=AO(r,l.properties);return QO(e,{...l,properties:u},n,s,a,o,c).map(e=>IO(t,e))})}function ak(e,t,n,r,i,a={},o){if(Array.isArray(n[i])){let s=NO(n)||r,c=n[i].map(n=>zO(e,n,t,a,o)),l=Q(a,s);if(l!==void 0)return c.find(e=>CC(Q(e,[uD,s,iD],Q(e,[uD,s,rD])),l))}}function ok(e,t,n,r,i){let a=n;if(sC(n,`$ref`)&&(a=zO(e,n,t,void 0,i)),SC(r))return a;let[o,...s]=Array.isArray(r)?r:r.split(`.`);if(o&&sC(a,o))return a=Q(a,o),ok(e,t,a,s,i)}function sk(e,t,n,r,i,a){let o=ok(e,t,n,r,a);return o===void 0?i:o}var ck={title:`!@#$_UNKNOWN_$#@!`};function lk(e,t,n,r,i={},a){let o=Array.isArray(r)?[...r]:r.split(`.`),s=n,c=o.pop();o.length&&o.forEach(n=>{s=sk(e,t,s,[uD,n],{},a),sC(s,`oneOf`)?s=ak(e,t,s,c,lD,Q(i,n),a):sC(s,`anyOf`)&&(s=ak(e,t,s,c,nD,Q(i,n),a))}),sC(s,`oneOf`)?s=ak(e,t,s,c,lD,i,a):sC(s,`anyOf`)&&(s=ak(e,t,s,c,nD,i,a));let l=sk(e,t,s,[uD,c],ck,a);l===ck&&(l=void 0);let u=sk(e,t,s,fD,[],a),d;return l&&Array.isArray(u)&&(d=u.includes(c)),{field:l,isRequired:d}}var uk={type:`object`,$id:sD,properties:{__not_really_there__:{type:`number`}}};function dk(e,t,n,r,i){let a=0;return n&&(cg(n.properties)?a+=UC(n.properties,(n,a,o)=>{let s=Q(r,o);if(typeof a==`boolean`)return n;if(sC(a,`$ref`)){let r=zO(e,a,t,s,i);return n+dk(e,t,r,s||{},i)}if((sC(a,`oneOf`)||sC(a,`anyOf`))&&s){let r=sC(a,`oneOf`)?lD:nD,o=NO(a);return n+fk(e,t,s,Q(a,r),-1,o,i)}if(a.type===`object`)return cg(s)&&(n+=1),n+dk(e,t,a,s,i);if(a.type===PO(s)){let e=n+1;return a.default?e+=s===a.default?1:-1:a.const&&(e+=s===a.const?1:-1),e}return n},0):lC(n.type)&&n.type===PO(r)&&(a+=1)),a}function fk(e,t,n,r,i=-1,a,o){let s=r.map(e=>GO(e,t,[])),c=LO(n,r,a);if(EC(c))return c;let l=s.reduce((r,i,o)=>(RO(e,n,[uk,i],t,a)===1&&r.push(o),r),[]);if(l.length===1)return l[0];l.length||YC(s.length,e=>l.push(e));let u=new Set,{bestIndex:d}=l.reduce((r,i)=>{let{bestScore:a}=r,c=s[i],l=dk(e,t,c,n,o);return u.add(l),l>a?{bestIndex:i,bestScore:l}:r},{bestIndex:i,bestScore:0});return u.size===1&&i>=0?i:d}function pk(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every(e=>XE(e))}function mk(e,t,n=!1,r=!1,i=!1){if(Array.isArray(t)){let a=Array.isArray(e)?e:[],o=i?a:t,s=i?t:a,c=o.map((e,o)=>s[o]===void 0?e:mk(a[o],t[o],n,r,i));return(n||i)&&c.length<s.length&&c.push(...s.slice(c.length)),c}if(XE(t)){let a=Object.assign({},e);return Object.keys(t).reduce((a,o)=>{let s=Q(t,o),c=XE(e)&&o in e,l=o in t,u=Q(e,o)??{},d=c&&Object.entries(u).some(([,e])=>XE(e)),f=c&&XE(Q(e,o)),p=l&&XE(s);return f&&p&&!d?(a[o]={...Q(e,o),...s},a):(a[o]=mk(Q(e,o),s,n,r,i&&(c||!l)),a)},a)}return r&&(e!==void 0&&DC(t)||typeof t==`number`&&isNaN(t))||i&&!DC(t)?e:t}function hk(e,t,n=!1){return Object.keys(t).reduce((r,i)=>{let a=e?e[i]:{},o=t[i];if(e&&i in e&&XE(o))r[i]=hk(a,o,n);else if(n&&Array.isArray(a)&&Array.isArray(o)){let e=o;n===`preventDuplicates`&&(e=o.reduce((e,t)=>(a.includes(t)||e.push(t),e),[])),r[i]=a.concat(e)}else r[i]=o;return r},Object.assign({},e))}function gk(e){return Array.isArray(e.enum)&&e.enum.length===1||`const`in e}function _k(e,t,n={},r){let i=zO(e,t,n,void 0,r),a=i.oneOf||i.anyOf;return Array.isArray(i.enum)?!0:Array.isArray(a)?a.every(e=>typeof e!=`boolean`&&gk(e)):!1}function vk(e,t,n,r){return!t.uniqueItems||!t.items||typeof t.items==`boolean`?!1:_k(e,t.items,n,r)}function yk(e){let t=e[rD],n=FO(e);return XE(t)&&lC(t?.$data)&&n!==`object`&&n!==`array`}function bk(e){if(`enum`in e&&Array.isArray(e.enum)&&e.enum.length===1)return e.enum[0];if(`const`in e)return e.const;throw Error(`schema cannot be inferred as a constant`)}function xk(e,t){let n=new Map(e.map(e=>[String(e.value),e])),r=new Set(t.filter(e=>e!==`*`).map(String)),i=e.filter(e=>!r.has(String(e.value)));return t.flatMap(e=>{if(e===`*`)return i;let t=n.get(String(e));return t?[t]:[]})}function Sk(e,t){if(e.enum){let n,r;if(t){let{enumNames:e,enumOrder:i}=wD(t);n=e,r=i}let i=e.enum.map((e,t)=>({label:Array.isArray(n)?n[t]||String(e):n?.[String(e)]||String(e),value:e}));return r&&(i=xk(i,r)),i}let n,r;e.anyOf?(n=e.anyOf,r=t?.anyOf):e.oneOf&&(n=e.oneOf,r=t?.oneOf);let i=NO(e);if(t){let{optionsSchemaSelector:e=i}=wD(t);i=e}return n&&n.map((e,t)=>{let{title:n}=wD(r?.[t]),a=e,o,s=n;if(i){let e=Q(a,[`properties`,i],{});o=Q(e,`default`,Q(e,`const`)),s=s||e?.title||a.title||String(o)}else o=bk(a),s=s||a.title||String(o);return{schema:a,label:s,value:o}})}var Ck=[`string`,`number`,`integer`,`boolean`,`null`],wk;(function(e){e[e.Ignore=0]=`Ignore`,e[e.Invert=1]=`Invert`,e[e.Fallback=2]=`Fallback`})(wk||={});function Tk(e,t=wk.Ignore,n=-1){if(n>=0){if(Array.isArray(e.items)&&n<e.items.length){let t=e.items[n];if(typeof t!=`boolean`)return t}}else if(e.items&&!Array.isArray(e.items)&&typeof e.items!=`boolean`)return e.items;return t!==wk.Ignore&&XE(e.additionalItems)?e.additionalItems:{}}function Ek(e,t){let{default:n,type:r}=e;return Array.isArray(r)&&r.includes(`null`)&&SC(t)&&n===null?null:t}function Dk(e,t,n,r,i,a=[],o={},s=!1,c=!1){let{emptyObjectFields:l=`populateAllDefaults`}=o;if(r===!0||s)e[t]=n;else if(r===`excludeObjectChildren`)(c&&n!==void 0||!XE(n)||!SC(n))&&(e[t]=n);else if(l!==`skipDefaults`){let r=i===void 0?a.includes(t):i;XE(n)?l===`skipEmptyDefaults`?SC(n)||(e[t]=n):(!SC(n)||a.includes(t))&&(r||l!==`populateRequiredDefaults`)&&(e[t]=n):n!==void 0&&(l===`populateAllDefaults`||l===`skipEmptyDefaults`||r&&a.includes(t))&&(e[t]=n)}}function Ok(e,t,n={}){let{parentDefaults:r,rawFormData:i,rootSchema:a={},includeUndefinedValues:o=!1,_recurseList:s=[],experimental_defaultFormStateBehavior:c=void 0,experimental_customMergeAllOf:l=void 0,required:u,shouldMergeDefaultsIntoFormData:d=!1,initialDefaultsGenerated:f}=n,p=XE(i)?i:{},m=XE(t)?t:{},h=r,g=null,_=c,v=s;if(m.const!==void 0&&c?.constAsDefaults!==`never`&&!yk(m))h=m[rD];else if(XE(h)&&XE(m.default)&&!m.anyOf&&!m.oneOf&&!m.$ref)h=hk(h,m.default);else if(`default`in m&&!m.anyOf&&!m.oneOf&&!m.$ref)h=m.default;else if(`$ref`in m){let e=m[mD];s.includes(e)||(v=s.concat(e),g=MO(e,a));let t=i===void 0||XE(i)&&SC(i);g&&!h&&t&&(h=m.default),d&&g&&!XE(i)&&(p=i)}else if(`dependencies`in m)g=ek(e,m,a,!1,[],{...Mk(e,m,n,h),...p},l)[0];else if(pk(m))h=m.items.map((t,n)=>Ok(e,t,{rootSchema:a,includeUndefinedValues:o,_recurseList:s,experimental_defaultFormStateBehavior:c,experimental_customMergeAllOf:l,parentDefaults:Array.isArray(r)?r[n]:void 0,rawFormData:p,required:u,shouldMergeDefaultsIntoFormData:d}));else if(`oneOf`in m){let{oneOf:t,...n}=m;if(t.length===0)return;let r=NO(m),{type:o=`null`}=n;!Array.isArray(o)&&Ck.includes(o)&&_?.constAsDefaults===`skipOneOf`&&(_={..._,constAsDefaults:`never`}),g=t[fk(e,a,i??m.default,t,0,r,l)],g=IO(n,g)}else if(`anyOf`in m){let{anyOf:t,...n}=m;if(t.length===0)return;let r=NO(m);g=t[fk(e,a,i??m.default,t,0,r,l)],g=IO(n,g)}if(g)return Ok(e,g,{rootSchema:a,includeUndefinedValues:o,_recurseList:v,experimental_defaultFormStateBehavior:_,experimental_customMergeAllOf:l,parentDefaults:h,rawFormData:i??p,required:u,shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:f});h===void 0&&(h=m.default);let y=Mk(e,m,n,h)??h;if(d){let{arrayMinItems:t={}}=c||{},{mergeExtraDefaults:n}=t,r=kk(e,m,a,i,c,l);(!XE(i)||`allOf`in m)&&(y=mk(y,r,n,!0))}return y}function kk(e,t,n,r,i,a){let o=!gk(t)&&_k(e,t,n,a),s=r;return o&&(s=Sk(t)?.some(e=>DD(e.value,r))?r:void 0),t.const&&i?.constAsDefaults===`always`&&(s=t.const),s}function Ak(e,t,{rawFormData:n,rootSchema:r={},includeUndefinedValues:i=!1,_recurseList:a=[],experimental_defaultFormStateBehavior:o=void 0,experimental_customMergeAllOf:s=void 0,required:c,shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u}={},d){{let f=XE(n)?n:{},p=t,m=o?.allOf===`populateDefaults`&&`allOf`in p||o?.emptyObjectFields!==`skipEmptyDefaults`&&`if`in p?zO(e,p,r,f,s):p,h=m[rD],g=Object.keys(m.properties||{}).reduce((t,n)=>{let p=Q(m,[uD,n],{}),g=XE(h)&&h[n]!==void 0,_=(XE(p)&&`const`in p||g)&&o?.constAsDefaults!==`never`&&!yk(p);return Dk(t,n,Ok(e,p,{rootSchema:r,_recurseList:a,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:s,includeUndefinedValues:i===!0,parentDefaults:Q(d,[n]),rawFormData:Q(f,[n]),required:m.required?.includes(n),shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u}),i,c,m.required,o,_,p?.type===`null`),t},{});if(m.additionalProperties&&!u){let t=XE(m.additionalProperties)?m.additionalProperties:{},n=new Set;XE(d)&&Object.keys(d).filter(e=>!m.properties||!m.properties[e]).forEach(e=>n.add(e));let p=[];Object.keys(f).filter(e=>!m.properties||!m.properties[e]).forEach(e=>{n.add(e),p.push(e)}),n.forEach(n=>{Dk(g,n,Ok(e,t,{rootSchema:r,_recurseList:a,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:s,includeUndefinedValues:i===!0,parentDefaults:Q(d,[n]),rawFormData:Q(f,[n]),required:m.required?.includes(n),shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u}),i,c,p)})}return Ek(t,g)}}function jk(e,t,{rawFormData:n,rootSchema:r={},_recurseList:i=[],experimental_defaultFormStateBehavior:a=void 0,experimental_customMergeAllOf:o=void 0,required:s,requiredAsRoot:c=!1,shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u}={},d){let f=t,p=a?.arrayMinItems??{},{populate:m,mergeExtraDefaults:h}=p,g=m===`never`,_=m===`requiredOnly`,v=m===`all`||!g&&!_,y=p?.computeSkipPopulate??(()=>!1),b=a?.emptyObjectFields===`skipEmptyDefaults`?void 0:[];if(Array.isArray(d)&&(d=d.map((t,c)=>Ok(e,Tk(f,wk.Fallback,c),{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,parentDefaults:t,rawFormData:Array.isArray(n)?n[c]:void 0,required:s,shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u}))),Array.isArray(n)){let t=Tk(f);if(g)d=n;else{let c=n.map((n,c)=>Ok(e,t,{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,rawFormData:n,parentDefaults:Q(d,[c]),required:s,shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u}));d=mk(d,c,(_&&s||v)&&h)}}if((XE(f)&&`const`in f&&a?.constAsDefaults!==`never`)===!1){if(g)return d??b;if(_&&!s)return d||void 0}let x,S=Array.isArray(d)?d.length:0;if(!f.minItems||vk(e,f,r,o)||y(e,f,r)||f.minItems<=S)x=d||!s&&!c?d:b;else{let t=d||[],n=Tk(f,wk.Invert),c=n.default,u=Array.from({length:f.minItems-S},()=>Ok(e,n,{parentDefaults:c,rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,required:s,shouldMergeDefaultsIntoFormData:l}));x=t.concat(u)}return Ek(t,x)}function Mk(e,t,n={},r){switch(FO(t)){case`object`:return Ak(e,t,n,r);case`array`:return jk(e,t,n,r)}}function Nk(e,t,n,r,i=!1,a,o,s){if(!XE(t))throw Error(`Invalid schema: `+t);let c=zO(e,t,r,n,o),l=Ok(e,c,{rootSchema:r,includeUndefinedValues:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,rawFormData:n,shouldMergeDefaultsIntoFormData:!0,initialDefaultsGenerated:s,requiredAsRoot:!0});if(c.type!==`object`&&XE(c.default))return{...l,...n};if(XE(n)||Array.isArray(n)){let{mergeDefaultsIntoFormData:e}=a||{};return mk(l,n,!0,e===`useDefaultIfFormDataUndefined`,!0)}return l}function Pk(e={}){return`widget`in wD(e)&&wD(e).widget!==`hidden`}function Fk(e,t,n={},r,i){if(n[`ui:widget`]===`files`)return!0;if(t.items){let n=zO(e,t.items,r,void 0,i);return n.type===`string`&&n.format===`data-url`}return!1}function Ik(e,t,n={},r,i,a){let{label:o=!0}=wD(n,i),s=!!o;if(s){let i=FO(t),o=Q(t,$E,!1);i===`array`&&(s=o||vk(e,t,r,a)||Fk(e,t,n,r,a)||Pk(n)),i===`object`&&(s=o),i===`boolean`&&n&&!n[`ui:widget`]&&(s=!1),n&&n[`ui:field`]&&(s=!1)}return s}function Lk(e,t,n,r,i,a=[],o){if(`$ref`in t||`dependencies`in t||`allOf`in t||`if`in t){let s=zO(e,t,r,i,o);if(a.findIndex(e=>DD(e,s))===-1)return Lk(e,s,n,r,i,a.concat(s),o)}let s={[cD]:n.replace(/^\./,``)};if(`oneOf`in t||`anyOf`in t){let c=`oneOf`in t?t.oneOf:t.anyOf,l=c[fk(e,r,i,c,0,NO(t),o)];s={...s,...Lk(e,l,n,r,i,a,o)}}if(`additionalProperties`in t&&t.additionalProperties!==!1){WC(s,bD,!0);let c=cg(t.additionalProperties)?t[eD]:{},l=Q(t,uD,{});for(let t of Object.keys(i??{}))t in l||(s[t]=Lk(e,c,`${n}.${t}`,r,Q(i,[t]),a,o))}if(`items`in t&&Array.isArray(i)){let{items:c,additionalItems:l}=t;Array.isArray(c)?i.forEach((t,i)=>{c[i]?s[i]=Lk(e,c[i],`${n}.${i}`,r,t,a,o):l?s[i]=Lk(e,l,`${n}.${i}`,r,t,a,o):console.warn(`Unable to generate path schema for "${n}.${i}". No schema defined for it`)}):i.forEach((t,i)=>{s[i]=Lk(e,c,`${n}.${i}`,r,t,a,o)})}else if(`properties`in t)for(let c in t.properties){let l=Q(t,[uD,c],{});s[c]=Lk(e,l,`${n}.${c}`,r,Q(i,[c]),a,o)}return s}function Rk(e,t,n=``,r,i,a){return Lk(e,t,n,r,i,void 0,a)}function zk(e,t){if(t.length===0&&typeof e!=`object`)return e;let n=VC(e,t);return Array.isArray(e)?Object.keys(n).map(e=>n[e]):n}function Bk(e,t){let n=(e,t)=>typeof e!=`object`||SC(e)||t&&!SC(e),r=(e,i=[],a=[[]])=>{let o=Object.keys(e);return o.forEach(s=>{let c=e[s];if(typeof c==`object`){let e=a.map(e=>[...e,s]);c.__rjsf_additionalProperties&&c.$name!==``?i.push(c[cD]):r(c,i,e)}else s===`$name`&&c!==``&&a.forEach(e=>{let r=Q(t,e),a=o.length===1;(n(r,a)||Array.isArray(r)&&r.every(e=>n(e,a)))&&i.push(e)})}),i};return r(e)}function Vk(e,t,n={},r){return zk(r,Bk(Rk(e,zO(e,t,n,r),``,n,r),r).map(e=>Array.isArray(e)?e.join(`.`):e))}var Hk=Symbol(`no Value`);function Uk(e,t,n,r,i={},a){let o;if(sC(n,`properties`)){let s={};if(sC(r,`properties`)){let e=Q(r,uD,{});Object.keys(e).forEach(e=>{sC(i,e)&&(s[e]=void 0)})}let c=Object.keys(Q(n,uD,{})),l={};c.forEach(o=>{let c=Q(i,o),u=Q(r,[uD,o],{}),d=Q(n,[uD,o],{});sC(u,`$ref`)&&(u=zO(e,u,t,c,a)),sC(d,`$ref`)&&(d=zO(e,d,t,c,a));let f=Q(u,`type`),p=Q(d,`type`);if(!f||f===p)if(sC(s,o)&&delete s[o],p===`object`||p===`array`&&Array.isArray(c)){let n=Uk(e,t,d,u,c,a);(n!==void 0||p===`array`)&&(l[o]=n)}else{let e=Q(d,`default`,Hk),t=Q(u,`default`,Hk);e!==Hk&&e!==c&&(t===c?s[o]=e:Q(d,`readOnly`)===!0&&(s[o]=void 0));let n=Q(d,`const`,Hk),r=Q(u,`const`,Hk);n!==Hk&&n!==c&&(s[o]=r===c?n:void 0)}}),o={...typeof i==`string`||Array.isArray(i)?void 0:i,...s,...l}}else if(Q(r,`type`)===`array`&&Q(n,`type`)===`array`&&Array.isArray(i)){let s=Q(r,`items`),c=Q(n,`items`);if(typeof s==`object`&&typeof c==`object`&&!Array.isArray(s)&&!Array.isArray(c)){sC(s,`$ref`)&&(s=zO(e,s,t,i,a)),sC(c,`$ref`)&&(c=zO(e,c,t,i,a));let r=Q(s,`type`),l=Q(c,`type`);if(!r||r===l){let r=Q(n,`maxItems`,-1);o=l===`object`?i.reduce((n,i)=>{let o=Uk(e,t,c,s,i,a);return o!==void 0&&(r<0||n.length<r)&&n.push(o),n},[]):r>0&&i.length>r?i.slice(0,r):i}}else typeof s==`boolean`&&typeof c==`boolean`&&s===c&&(o=i)}return o}var Wk=class{constructor(e,t,n,r){t&&t.$schema===`https://json-schema.org/draft/2020-12/schema`?this.rootSchema=kO(t,Q(t,`$id`,`#`)):this.rootSchema=t,this.validator=e,this.experimental_defaultFormStateBehavior=n,this.experimental_customMergeAllOf=r}getRootSchema(){return this.rootSchema}getValidator(){return this.validator}doesSchemaUtilsDiffer(e,t,n={},r){return!e||!t?!1:this.validator!==e||!DD(this.rootSchema,t)||!DD(this.experimental_defaultFormStateBehavior,n)||this.experimental_customMergeAllOf!==r}findFieldInSchema(e,t,n){return lk(this.validator,this.rootSchema,e,t,n,this.experimental_customMergeAllOf)}findSelectedOptionInXxxOf(e,t,n,r){return ak(this.validator,this.rootSchema,e,t,n,r,this.experimental_customMergeAllOf)}getDefaultFormState(e,t,n=!1,r){return Nk(this.validator,e,t,this.rootSchema,n,this.experimental_defaultFormStateBehavior,this.experimental_customMergeAllOf,r)}getDisplayLabel(e,t,n){return Ik(this.validator,e,t,this.rootSchema,n,this.experimental_customMergeAllOf)}getClosestMatchingOption(e,t,n,r){return fk(this.validator,this.rootSchema,e,t,n,r,this.experimental_customMergeAllOf)}getFirstMatchingOption(e,t,n){return RO(this.validator,e,t,this.rootSchema,n)}getFromSchema(e,t,n){return sk(this.validator,this.rootSchema,e,t,n,this.experimental_customMergeAllOf)}isFilesArray(e,t){return Fk(this.validator,e,t,this.rootSchema,this.experimental_customMergeAllOf)}isMultiSelect(e){return vk(this.validator,e,this.rootSchema,this.experimental_customMergeAllOf)}isSelect(e){return _k(this.validator,e,this.rootSchema,this.experimental_customMergeAllOf)}omitExtraData(e,t){return Vk(this.validator,e,this.rootSchema,t)}retrieveSchema(e,t,n){return zO(this.validator,e,this.rootSchema,t,this.experimental_customMergeAllOf,n)}sanitizeDataForNewSchema(e,t,n){return Uk(this.validator,this.rootSchema,e,t,n,this.experimental_customMergeAllOf)}toPathSchema(e,t,n){return Rk(this.validator,e,t,this.rootSchema,n,this.experimental_customMergeAllOf)}};function Gk(e,t,n={},r){return new Wk(e,t,n,r)}function Kk(e){if(e.indexOf(`data:`)===-1)throw Error(`File is invalid: URI must be a dataURI`);let t=e.slice(5).split(`;base64,`);if(t.length!==2)throw Error(`File is invalid: dataURI must be base64`);let[n,r]=t,[i,...a]=n.split(`;`),o=i||``,s=decodeURI(a.map(e=>e.split(`=`)).find(([e])=>e===`name`)?.[1]||`unknown`);try{let e=atob(r),t=Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return{blob:new window.Blob([new Uint8Array(t)],{type:o}),name:s}}catch(e){throw Error(`File is invalid: `+e.message)}}function qk(e,t){let n=String(e);for(;n.length<t;)n=`0`+n;return n}function Jk(e,t){if(e<=0&&t<=0)e=new Date().getFullYear()+e,t=new Date().getFullYear()+t;else if(e<0||t<0)throw Error(`Both start (${e}) and stop (${t}) must both be <= 0 or > 0, got one of each`);if(e>t)return Jk(t,e).reverse();let n=[];for(let r=e;r<=t;r++)n.push({value:r,label:qk(r,2)});return n}function Yk(e,t){if(Object.is(e,t))return!0;if(e==null||t==null||typeof e!=`object`||typeof t!=`object`)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++){let i=n[r];if(!Object.prototype.hasOwnProperty.call(t,i)||!Object.is(e[i],t[i]))return!1}return!0}function Xk(e,t){let n=e;if(Array.isArray(t)){let e=n.split(/(%\d)/);t.forEach((t,n)=>{let r=e.findIndex(e=>e===`%${n+1}`);r>=0&&(e[r]=t)}),n=e.join(``)}return n}function Zk(e,t){return Xk(e,t)}function Qk(e,t=[],n){if(Array.isArray(e))return e.map(e=>Qk(e,t)).filter(e=>e!==n);let r=t[e===``||e===null?-1:Number(e)];return r?r.value:n}function $k(e,t,n=[]){let r=Qk(e,n);return Array.isArray(t)?t.filter(e=>!DD(e,r)):DD(r,t)?void 0:t}function eA(e,t){return Array.isArray(t)?t.some(t=>DD(t,e)):DD(t,e)}function tA(e,t=[],n=!1){let r=t.map((t,n)=>eA(t.value,e)?String(n):void 0).filter(e=>e!==void 0);return n?r:r[0]}function nA(e,t,n=[]){let r=Qk(e,n);if(!DC(r)){let e=n.findIndex(e=>r===e.value),i=n.map(({value:e})=>e);return t.slice(0,e).concat(r,t.slice(e)).sort((e,t)=>Number(i.indexOf(e)>i.indexOf(t)))}return t}var rA=class{constructor(e){this.errorSchema={},this.resetAllErrors(e)}get ErrorSchema(){return this.errorSchema}getOrCreateErrorBlock(e){let t=Array.isArray(e)&&e.length>0||typeof e==`string`?Q(this.errorSchema,e):this.errorSchema;return!t&&e&&(t={},GC(this.errorSchema,e,t,Object)),t}resetAllErrors(e){return this.errorSchema=e?Rx(e):{},this}addErrors(e,t){let n=this.getOrCreateErrorBlock(t),r=Q(n,aD);return Array.isArray(r)||(r=[],n[aD]=r),Array.isArray(e)?WC(n,aD,[...new Set([...r,...e])]):WC(n,aD,[...new Set([...r,e])]),this}setErrors(e,t){return WC(this.getOrCreateErrorBlock(t),aD,Array.isArray(e)?[...new Set([...e])]:[e]),this}clearErrors(e){return WC(this.getOrCreateErrorBlock(e),aD,[]),this}};function iA(e,t){let n=ky(e),r=ky(t);if(e===t||!n&&!r)return[];if(n&&!r)return bv(e);if(!n&&r)return bv(t);{let n=bv(zC(e,(e,n)=>!DD(e,Q(t,n)))),r=$S(bv(t),bv(e));return[...n,...r]}}function aA(e,t,n=[1900,new Date().getFullYear()+2],r=`YMD`){let{day:i,month:a,year:o,hour:s,minute:c,second:l}=e,u={type:`day`,range:[1,31],value:i},d={type:`month`,range:[1,12],value:a},f={type:`year`,range:n,value:o},p=[];switch(r){case`MDY`:p.push(d,u,f);break;case`DMY`:p.push(u,d,f);break;default:p.push(f,d,u)}return t&&p.push({type:`hour`,range:[0,23],value:s},{type:`minute`,range:[0,59],value:c},{type:`second`,range:[0,59],value:l}),p}function oA(e){let 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 sA(e,t,n={},r=!0){let i={type:t||`text`,...oA(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}var cA={props:{disabled:!1},submitText:`Submit`,norender:!1};function lA(e={}){let t=wD(e);if(t&&t.submitButtonOptions){let e=t[pD];return{...cA,...e}}return cA}function uA(e,t,n={}){let{templates:r}=t;return e===`ButtonTemplates`?r[e]:Object.hasOwn(n,e)&&typeof n[e]==`string`&&Object.hasOwn(r,n[e])?r[n[e]]:n[e]||r[e]}function dA(){if(typeof process>`u`||Q(process,`env.NODE_ENV`)!==`test`)return{};let e=new Map;return new Proxy({},{get(t,n){return e.has(n)||e.set(n,iw(`test-id-`)),e.get(n)}})}var fA=s((e=>{var t=Symbol.for(`react.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.provider`),s=Symbol.for(`react.context`),c=Symbol.for(`react.server_context`),l=Symbol.for(`react.forward_ref`),u=Symbol.for(`react.suspense`),d=Symbol.for(`react.suspense_list`),f=Symbol.for(`react.memo`),p=Symbol.for(`react.lazy`);function m(e){if(typeof e==`object`&&e){var m=e.$$typeof;switch(m){case t:switch(e=e.type,e){case r:case a:case i:case u:case d:return e;default:switch(e&&=e.$$typeof,e){case c:case s:case l:case p:case f:case o:return e;default:return m}}case n:return m}}}e.isForwardRef=function(e){return m(e)===l},e.isMemo=function(e){return m(e)===f}})),pA=u(s(((e,t)=>{t.exports=fA()}))(),1),mA={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 hA(e){let t=Q(e,`MergedWidget`);if(!t){let n=e.defaultProps&&e.defaultProps.options||{};t=({options:t,...r})=>(0,W.jsx)(e,{options:{...n,...t},...r}),WC(e,`MergedWidget`,t)}return t}function gA(e,t,n={}){let r=FO(e);if(typeof t==`function`||t&&pA.isForwardRef((0,b.createElement)(t))||pA.isMemo(t))return hA(t);if(typeof t!=`string`)throw Error(`Unsupported widget definition: ${typeof t} in schema: ${JSON.stringify(e)}`);if(t in n){let r=n[t];return gA(e,r,n)}if(typeof r==`string`){if(!(r in mA))throw Error(`No widget for type '${r}' in schema: ${JSON.stringify(e)}`);if(t in mA[r]){let i=n[mA[r][t]];return gA(e,i,n)}}throw Error(`No widget '${t}' for type '${r}' in schema: ${JSON.stringify(e)}`)}function _A(e){let t=0;for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);t=(t<<5)-t+r,t&=t}return t.toString(16)}function vA(e){let t=new Set;return JSON.stringify(e,(e,n)=>(t.add(e),n)),JSON.stringify(e,Array.from(t).sort())}function yA(e){return _A(vA(e))}function bA(e){return yA(e)}function xA(e,t,n={}){try{return gA(e,t,n),!0}catch(e){let t=e;if(t.message&&(t.message.startsWith(`No widget`)||t.message.startsWith(`Unsupported widget`)))return!1;throw e}}function SA(e,t){return`${lC(e)?e:e.$id}__${t}`}function CA(e){return SA(e,`description`)}function wA(e){return SA(e,`error`)}function TA(e){return SA(e,`examples`)}function EA(e){return SA(e,`help`)}function DA(e){return SA(e,`title`)}function OA(e,t=!1){let n=t?` ${TA(e)}`:``;return`${wA(e)} ${CA(e)} ${EA(e)}${n}`}function kA(e,t){return`${e}-${t}`}function AA(e,t){return SA(e,t)}function jA(e,t){return SA(e,`optional${t}`)}function MA(e){return!DC(e)&&(!cg(e)||Array.isArray(e)||!SC(e))}function NA(e,t){let{rootSchema:n,schemaUtils:r}=e;return CC(t,n)?!0:`$ref`in n?CC(t,IC(r.retrieveSchema(n),hD)):!1}function PA(e,t,n){return t?n:e}function FA(e){return e?new Date(e).toJSON():void 0}function IA(e,t,n){let r=[yD];return sC(e,`formContext`)&&r.unshift(vD),Q(e,[...r,t],n)}function LA(e,t){if(!Array.isArray(t))return e;let n=e=>e.reduce((e,t)=>(e[t]=!0,e),{}),r=e=>e.length>1?`properties '${e.join(`', '`)}'`:`property '${e[0]}'`,i=n(e),a=t.filter(e=>e===`*`||i[e]),o=n(a),s=e.filter(e=>!o[e]),c=a.indexOf(`*`);if(c===-1){if(s.length)throw Error(`uiSchema order list does not contain ${r(s)}`);return a}if(c!==a.lastIndexOf(`*`))throw Error(`uiSchema order list contains more than one wildcard item`);let l=[...a];return l.splice(c,1,...s),l}function RA(e,t=!0){if(!e)return{year:-1,month:-1,day:-1,hour:t?-1:0,minute:t?-1:0,second:t?-1:0};let n=new Date(e);if(Number.isNaN(n.getTime()))throw 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}}var zA=[oD,eD],BA=[lD,nD,tD];function VA(e,t,n,r=new Set){let{rootSchema:i,uiSchemaDefinitions:a}=n,o={...t},s=e,c=e[mD],l=c&&r.has(c);if(c){if(r.add(c),a&&c in a&&(o=hk(a[c],o)),l)return o;try{s=MO(c,i)}catch{s=e}}let u=s[uD];if(u&&XE(u))for(let[e,t]of Object.entries(u)){let i=VA(t,o[e]||{},n,new Set(r));Object.keys(i).length>0&&(o[e]=i)}for(let e of zA){let t=s[e];if(t&&XE(t)&&!Array.isArray(t)){let i=o[e];if(typeof i!=`function`){let a=VA(t,i||{},n,new Set(r));Object.keys(a).length>0&&(o[e]=a)}}}for(let e of BA){let t=s[e];if(Array.isArray(t)&&t.length>0){let i=o[e],a=Array.isArray(i)?[...i]:[],s=!1;for(let e=0;e<t.length;e++){let i=t[e],o=VA(i,a[e]||{},n,new Set(r));Object.keys(o).length>0&&(a[e]=o,s=!0)}s&&(o[e]=a)}}return o}function HA(e,t,n){let r=e.__rjsf_ref??e[mD],i=r?n.uiSchemaDefinitions?.[r]:void 0;return i?!t||Object.keys(t).length===0?{...i}:hk(i,t):t||{}}function UA(e){return e.const||e.enum&&e.enum.length===1&&e.enum[0]===!0?!0:e.anyOf&&e.anyOf.length===1?UA(e.anyOf[0]):e.oneOf&&e.oneOf.length===1?UA(e.oneOf[0]):e.allOf?e.allOf.some(e=>UA(e)):!1}function WA(e,t,n,r=`customDeep`){if(r===`always`)return!0;if(r===`shallow`){let{props:r,state:i}=e;return!Yk(r,t)||!Yk(i,n)}let{props:i,state:a}=e;return!DD(i,t)||!DD(a,n)}function GA(e){let t=nw(e.map(e=>cg(e)?FO(e):void 0).flat().filter(e=>e!==void 0));return t.length===1?t[0]:t}function KA(e,t,n,r){let{enableOptionalDataFieldForType:i=[]}=wD(r,e.globalUiOptions),a;return a=`anyOf`in t&&Array.isArray(t.anyOf)?GA(t[nD]):`oneOf`in t&&Array.isArray(t.oneOf)?GA(t[lD]):FO(t),!NA(e,t)&&!n&&!!a&&!Array.isArray(a)&&!!i.find(e=>e===a)}function qA(e,t=!0){let{year:n,month:r,day:i,hour:a=0,minute:o=0,second:s=0}=e,c=Date.UTC(n,r-1,i,a,o,s),l=new Date(c).toJSON();return t?l:l.slice(0,10)}function JA(e,t=[]){if(!e)return[];let n=[];return`__errors`in e&&(n=n.concat(e[aD].map(e=>{let n=`.${t.join(`.`)}`;return{property:n,message:e,stack:`${n} ${e}`}}))),Object.keys(e).reduce((n,r)=>{if(r!==`__errors`){let i=e[r];ky(i)&&(n=n.concat(JA(i,[...t,r])))}return n},n)}function YA(e){let t=new rA;return e.length&&e.forEach(e=>{let{property:n,message:r}=e,i=n===`.`?[]:XC(n);i.length>0&&i[0]===``&&i.splice(0,1),r&&t.addErrors(r,i)}),t.ErrorSchema}function XA(e,t,n,r){let i=Array.isArray(n)?n:n?.path,a=e===``?[]:[e],o=i?i.concat(...a):a,s=[t.idPrefix,...o].join(t.idSeparator),c;return t.nameGenerator&&o.length>0&&(c=t.nameGenerator(o,t.idPrefix,r)),{path:o,$id:s,...c!==void 0&&{name:c}}}function ZA(e){return Object.keys(e).reduce((t,n)=>{if(n===`addError`)return t;{let r=e[n];return ky(r)?{...t,[n]:ZA(r)}:{...t,[n]:r}}},{})}function QA(e){return Object.values(e).every(e=>e!==-1)}function $A(e){let{className:t=`form-control`,type:n,range:r,value:i,select:a,rootId:o,name:s,disabled:c,readonly:l,autofocus:u,registry:d,onBlur:f,onFocus:p}=e,m=`${o}_${n}`,{SelectWidget:h}=d.widgets,g=(0,b.useCallback)(e=>a(n,e),[a,n]);return(0,W.jsx)(h,{schema:{type:`integer`},id:m,name:s,className:t,options:{enumOptions:Jk(r[0],r[1])},placeholder:n,value:i,disabled:c,readonly:l,autofocus:u,onChange:g,onBlur:f,onFocus:p,registry:d,label:``,"aria-describedby":OA(o)})}function ej(e){let{time:t=!1,disabled:n=!1,readonly:r=!1,options:i,onChange:a,value:o}=e,[s,c]=(0,b.useState)(RA(o,t));(0,b.useEffect)(()=>{c(RA(o,t))},[t,o]);let l=(0,b.useCallback)((e,n)=>{let r={...s,[e]:n===void 0?-1:n};QA(r)?a(qA(r,t)):c(r)},[s,a,t]),u=(0,b.useCallback)(e=>{e.preventDefault(),!(n||r)&&a(void 0)},[n,r,a]),d=(0,b.useCallback)(e=>{e.preventDefault(),!(n||r)&&a(qA(RA(new Date().toJSON(),t),t))},[n,r,t,a]);return{elements:(0,b.useMemo)(()=>aA(s,t,i.yearsRange,i.format),[s,t,i.yearsRange,i.format]),handleChange:l,handleClear:u,handleSetNow:d}}function tj(e){let t=(0,b.useRef)(e);return CC(e,t.current)||(t.current=e),t.current}function nj(e,t){return e.replace(`;base64`,`;name=${encodeURIComponent(t)};base64`)}function rj(e){let{name:t,size:n,type:r}=e;return new Promise((i,a)=>{let o=new window.FileReader;o.onerror=a,o.onload=e=>{typeof e.target?.result==`string`?i({dataURL:nj(e.target.result,t),name:t,size:n,type:r}):i({dataURL:null,name:t,size:n,type:r})},o.readAsDataURL(e)})}function ij(e){return Promise.all(Array.from(e).map(rj))}function aj(e){return e.reduce((e,t)=>{if(!t)return e;try{let{blob:n,name:r}=Kk(t);return[...e,{dataURL:t,name:r,size:n.size,type:n.type}]}catch{return e}},[])}function oj(e,t,n=!1){let r=(0,b.useMemo)(()=>n&&e?Array.isArray(e)?e:[e]:[],[e,n]);return{filesInfo:(0,b.useMemo)(()=>aj(Array.isArray(e)?e:[e||``]),[e]),handleChange:(0,b.useCallback)(e=>{ij(e).then(e=>{let i=e.map(e=>e.dataURL||null);t(n?r.concat(...i):i[0])})},[r,n,t]),handleRemove:(0,b.useCallback)(e=>{t(n?r.filter((t,n)=>n!==e):void 0)},[r,n,t])}}function sj(e){if(!e)return``;let t=new Date(e);return`${qk(t.getFullYear(),4)}-${qk(t.getMonth()+1,2)}-${qk(t.getDate(),2)}T${qk(t.getHours(),2)}:${qk(t.getMinutes(),2)}:${qk(t.getSeconds(),2)}.${qk(t.getMilliseconds(),3)}`}function cj(e,t,n=!1){if(!t)return e;let{errors:r,errorSchema:i}=e,a=JA(t),o=t;return SC(i)||(o=hk(i,t,n?`preventDuplicates`:!0),a=[...r].concat(a)),{errorSchema:o,errors:a}}function lj(e){for(let t in e){let n=e,r=n[t];t===`$ref`&&typeof r==`string`&&r.startsWith(`#`)?n[t]=xD+r:n[t]=dj(r)}return e}function uj(e){for(let t=0;t<e.length;t++)e[t]=dj(e[t]);return e}function dj(e){return Array.isArray(e)?uj([...e]):cg(e)?lj({...e}):e}var fj;(function(e){e.ArrayItemTitle=`Item`,e.MissingItems=`Missing items definition`,e.EmptyArray=`No items yet. Use the button below to add some.`,e.YesLabel=`Yes`,e.NoLabel=`No`,e.CloseLabel=`Close`,e.ErrorsLabel=`Errors`,e.NewStringDefault=`New Value`,e.AddButton=`Add`,e.AddItemButton=`Add Item`,e.CopyButton=`Copy`,e.MoveDownButton=`Move down`,e.MoveUpButton=`Move up`,e.RemoveButton=`Remove`,e.NowLabel=`Now`,e.ClearLabel=`Clear`,e.AriaDateLabel=`Select a date`,e.PreviewLabel=`Preview`,e.DecrementAriaLabel=`Decrease value by 1`,e.IncrementAriaLabel=`Increase value by 1`,e.OptionalObjectAdd=`Add data for optional field`,e.OptionalObjectRemove=`Remove data for optional field`,e.OptionalObjectEmptyMsg=`No data for optional field`,e.Type=`Type`,e.Value=`Value`,e.ClearButton=`clear input`,e.UnknownFieldType=`Unknown field type %1`,e.OptionPrefix=`Option %1`,e.TitleOptionPrefix=`%1 option %2`,e.KeyLabel=`%1 Key`,e.InvalidObjectField=`Invalid "%1" object field configuration: _%2_.`,e.UnsupportedField=`Unsupported field schema.`,e.UnsupportedFieldWithId="Unsupported field schema for field `%1`.",e.UnsupportedFieldWithReason=`Unsupported field schema: _%1_.`,e.UnsupportedFieldWithIdAndReason="Unsupported field schema for field `%1`: _%2_.",e.FilesInfo=`**%1** (%2, %3 bytes)`})(fj||={});function pj(){return iw(`rjsf-array-item-`)}function mj(e){return Array.isArray(e)?e.map(e=>({key:pj(),item:e})):[]}function hj(e){return Array.isArray(e)?e.map(e=>e.item):[]}function gj(e){return Array.isArray(e.type)?!e.type.includes(`null`):e.type!==`null`}function _j(e,t,n,r){let{addable:i}=wD(r,e.globalUiOptions);return i!==!1&&(i=t.maxItems===void 0?!0:n.length<t.maxItems),i}function vj(e,t,n,r){if(typeof e.items==`function`)try{return e.items(t,n,r)}catch(e){console.error(`Error executing dynamic uiSchema.items function for item at index ${n}:`,e);return}else return e.items}function yj(e,t){let{schemaUtils:n,globalFormOptions:r}=e,i=t.items;return r.useFallbackUiForUnsupportedType&&!i?i={}:pk(t)&&ZE(t)&&(i=t.additionalItems),n.getDefaultFormState(i)}function bj(e){let{schema:t,fieldPathId:n,uiSchema:r,formData:i=[],disabled:a=!1,readonly:o=!1,autofocus:s=!1,required:c=!1,placeholder:l,onBlur:u,onFocus:d,registry:f,rawErrors:p,name:m,onSelectChange:h}=e,{widgets:g,schemaUtils:_,globalFormOptions:v,globalUiOptions:y}=f,b=Sk(_.retrieveSchema(t.items,i),r?.items??r),{widget:x=`select`,title:S,...C}=wD(r,y),w=gA(t,x,g),T=S??t.title??m,E=_.getDisplayLabel(t,r,y),D=tj(XA(``,v,n,!0));return(0,W.jsx)(w,{id:D.$id,name:m,multiple:!0,onChange:h,onBlur:u,onFocus:d,options:{...C,enumOptions:b},schema:t,uiSchema:r,registry:f,value:i,disabled:a,readonly:o,required:c,label:T,hideLabel:!E,placeholder:l,autofocus:s,rawErrors:p,htmlName:D.name})}function xj(e){let{schema:t,fieldPathId:n,uiSchema:r,disabled:i=!1,readonly:a=!1,autofocus:o=!1,required:s=!1,hideError:c,placeholder:l,onBlur:u,onFocus:d,formData:f=[],registry:p,rawErrors:m,name:h,onSelectChange:g}=e,{widgets:_,schemaUtils:v,globalFormOptions:y,globalUiOptions:b}=p,{widget:x,title:S,...C}=wD(r,b),w=gA(t,x,_),T=S??t.title??h,E=v.getDisplayLabel(t,r,b),D=tj(XA(``,y,n,!0));return(0,W.jsx)(w,{id:D.$id,name:h,multiple:!0,onChange:g,onBlur:u,onFocus:d,options:C,schema:t,uiSchema:r,registry:p,value:f,disabled:i,readonly:a,hideError:c,required:s,label:T,hideLabel:!E,placeholder:l,autofocus:o,rawErrors:m,htmlName:D.name})}function Sj(e){let{schema:t,uiSchema:n,fieldPathId:r,name:i,disabled:a=!1,readonly:o=!1,autofocus:s=!1,required:c=!1,onBlur:l,onFocus:u,registry:d,formData:f=[],rawErrors:p,onSelectChange:m}=e,{widgets:h,schemaUtils:g,globalFormOptions:_,globalUiOptions:v}=d,{widget:y=`files`,title:b,...x}=wD(n,v),S=gA(t,y,h),C=b??t.title??i,w=g.getDisplayLabel(t,n,v),T=tj(XA(``,_,r,!0));return(0,W.jsx)(S,{options:x,id:T.$id,name:i,multiple:!0,onChange:m,onBlur:l,onFocus:u,schema:t,uiSchema:n,value:f,disabled:a,readonly:o,required:c,registry:d,autofocus:s,rawErrors:p,label:C,hideLabel:!w,htmlName:T.name})}function Cj(e){let{itemKey:t,index:n,name:r,disabled:i,hideError:a,readonly:o,registry:s,uiOptions:c,parentUiSchema:l,canAdd:u,canRemove:d=!0,canMoveUp:f,canMoveDown:p,itemSchema:m,itemData:h,itemUiSchema:g,itemFieldPathId:_,itemErrorSchema:v,autofocus:y,onBlur:x,onFocus:S,onChange:C,rawErrors:w,totalItems:T,title:E,handleAddItem:D,handleCopyItem:O,handleRemoveItem:k,handleReorderItems:A}=e,{schemaUtils:j,fields:{ArraySchemaField:M,SchemaField:N},globalUiOptions:P}=s,F=tj(_),I=M||N,L=uA(`ArrayFieldItemTemplate`,s,c),R=j.getDisplayLabel(m,g,P),{description:z}=wD(g),B=!!z||!!m.description,{orderable:V=!0,removable:ee=!0,copyable:H=!1}=c,te={moveUp:V&&f,moveDown:V&&p,copy:H&&u,remove:ee&&d,toolbar:!1};te.toolbar=Object.keys(te).some(e=>te[e]);let U=(0,b.useCallback)(e=>{D(e,n+1)},[D,n]),ne=(0,b.useCallback)(e=>{O(e,n)},[O,n]),re=(0,b.useCallback)(e=>{k(e,n)},[k,n]),ie=(0,b.useCallback)(e=>{A(e,n,n-1)},[A,n]),ae=(0,b.useCallback)(e=>{A(e,n,n+1)},[A,n]);return(0,W.jsx)(L,{children:(0,W.jsx)(I,{name:r,title:E,index:n,schema:m,uiSchema:g,formData:h,errorSchema:v,fieldPathId:F,required:gj(m),onChange:C,onBlur:x,onFocus:S,registry:s,disabled:i,readonly:o,hideError:a,autofocus:y,rawErrors:w}),buttonsProps:{fieldPathId:F,disabled:i,readonly:o,canAdd:u,hasCopy:te.copy,hasMoveUp:te.moveUp,hasMoveDown:te.moveDown,hasRemove:te.remove,index:n,totalItems:T,onAddItem:U,onCopyItem:ne,onRemoveItem:re,onMoveUpItem:ie,onMoveDownItem:ae,registry:s,schema:m,uiSchema:g},itemKey:t,className:`rjsf-array-item`,disabled:i,hasToolbar:te.toolbar,index:n,totalItems:T,readonly:o,registry:s,schema:m,uiSchema:g,parentUiSchema:l,displayLabel:R,hasDescription:B})}function wj(e){let{schema:t,uiSchema:n={},errorSchema:r,fieldPathId:i,formData:a,name:o,title:s,disabled:c=!1,readonly:l=!1,autofocus:u=!1,required:d=!1,hideError:f=!1,registry:p,onBlur:m,onFocus:h,rawErrors:g,onChange:_,keyedFormData:v,handleAddItem:y,handleCopyItem:b,handleRemoveItem:x,handleReorderItems:S}=e,C=t.title||s||o,{schemaUtils:w,fields:T,formContext:E,globalFormOptions:D,globalUiOptions:O}=p,{OptionalDataControlsField:k}=T,A=wD(n,O),j=cg(t.items)?t.items:{},M=w.retrieveSchema(j),N=hj(v),P=KA(p,t,d,n),F=MA(a),I=_j(p,t,N,n)&&(!P||F),L=F?v:[],R=P?` rjsf-optional-array-field`:``,z=e.childFieldPathId??i,B=P?(0,W.jsx)(k,{...e,fieldPathId:z}):void 0,V={canAdd:I,items:L.map((e,t)=>{let{key:i,item:a}=e,s=a,T=w.retrieveSchema(j,s),O=r?r[t]:void 0,k=XA(t,D,z),M=vj(n,a,t,E);return(0,W.jsx)(Cj,{itemKey:i,index:t,name:o&&`${o}-${t}`,registry:p,uiOptions:A,parentUiSchema:n,hideError:f,readonly:l,disabled:c,required:d,title:C?`${C}-${t+1}`:void 0,canAdd:I,canMoveUp:t>0,canMoveDown:t<N.length-1,itemSchema:T,itemFieldPathId:k,itemErrorSchema:O,itemData:s,itemUiSchema:M,autofocus:u&&t===0,onBlur:m,onFocus:h,rawErrors:g,totalItems:v.length,handleAddItem:y,handleCopyItem:b,handleRemoveItem:x,handleReorderItems:S,onChange:_},i)}),className:`rjsf-field rjsf-field-array rjsf-field-array-of-${M.type}${R}`,disabled:c,fieldPathId:i,uiSchema:n,onAddClick:y,readonly:l,required:d,schema:t,title:C,formData:N,rawErrors:g,registry:p,optionalDataControl:B};return(0,W.jsx)(uA(`ArrayFieldTemplate`,p,A),{...V})}function Tj(e){let{schema:t,uiSchema:n={},formData:r,errorSchema:i,fieldPathId:a,name:o,title:s,disabled:c=!1,readonly:l=!1,autofocus:u=!1,required:d=!1,hideError:f=!1,registry:p,onBlur:m,onFocus:h,rawErrors:g,keyedFormData:_,onChange:v,handleAddItem:y,handleCopyItem:b,handleRemoveItem:x,handleReorderItems:S}=e,{formData:C=[]}=e,w=t.title||s||o,{schemaUtils:T,fields:E,formContext:D,globalFormOptions:O,globalUiOptions:k}=p,A=wD(n,k),{OptionalDataControlsField:j}=E,M=KA(p,t,d,n),N=MA(r),P=(cg(t.items)?t.items:[]).map((e,t)=>T.retrieveSchema(e,C[t])),F=cg(t.additionalItems)?T.retrieveSchema(t.additionalItems,r):null,I=e.childFieldPathId??a;C.length<P.length&&(C=C.concat(Array(P.length-C.length)));let L=N?_:[],R=M?` rjsf-optional-array-field`:``,z=M?(0,W.jsx)(j,{...e,fieldPathId:I}):void 0,B=_j(p,t,C,n)&&!!F&&(!M||N),V={canAdd:B,className:`rjsf-field rjsf-field-array rjsf-field-array-fixed-items${R}`,disabled:c,fieldPathId:a,formData:r,items:L.map((e,r)=>{let{key:a,item:s}=e,E=s,k=r>=P.length,j=(k&&cg(t.additionalItems)?T.retrieveSchema(t.additionalItems,E):P[r])||{},M=XA(r,O,I),N;N=k?n.additionalItems:Array.isArray(n.items)?n.items[r]:vj(n,s,r,D);let F=i?i[r]:void 0;return(0,W.jsx)(Cj,{index:r,itemKey:a,name:o&&`${o}-${r}`,registry:p,uiOptions:A,parentUiSchema:n,hideError:f,readonly:l,disabled:c,required:d,title:w?`${w}-${r+1}`:void 0,canAdd:B,canRemove:k,canMoveUp:r>=P.length+1,canMoveDown:k&&r<C.length-1,itemSchema:j,itemData:E,itemUiSchema:N,itemFieldPathId:M,itemErrorSchema:F,autofocus:u&&r===0,onBlur:m,onFocus:h,rawErrors:g,totalItems:_.length,onChange:v,handleAddItem:y,handleCopyItem:b,handleRemoveItem:x,handleReorderItems:S},a)}),onAddClick:y,readonly:l,required:d,registry:p,schema:t,uiSchema:n,title:w,errorSchema:i,rawErrors:g,optionalDataControl:z};return(0,W.jsx)(uA(`ArrayFieldTemplate`,p,A),{...V})}function Ej(e=[]){let t=(0,b.useMemo)(()=>yA(e),[e]),[n,r]=(0,b.useState)(()=>({formDataHash:t,keyedFormData:mj(e)})),{keyedFormData:i,formDataHash:a}=n;if(t!==a){let n=Array.isArray(e)?e:[],o=i||[];i=n.length===o.length?o.map((e,t)=>({key:e.key,item:n[t]})):mj(n),a=t,r({formDataHash:a,keyedFormData:i})}let o=(0,b.useCallback)(e=>{let t=hj(e);return r({formDataHash:yA(t),keyedFormData:e}),t},[]);return{keyedFormData:i,updateKeyedFormData:o}}function Dj(e){let{schema:t,uiSchema:n,errorSchema:r,fieldPathId:i,registry:a,formData:o,onChange:s}=e,{globalFormOptions:c,schemaUtils:l,translateString:u}=a,{keyedFormData:d,updateKeyedFormData:f}=Ej(o),p=e.childFieldPathId??i,m=(0,b.useCallback)((e,n)=>{e&&e.preventDefault();let i;if(r){i={};for(let e in r){let t=parseInt(e);n===void 0||t<n?WC(i,[t],r[e]):t>=n&&WC(i,[t+1],r[e])}}let o={key:pj(),item:yj(a,t)},c=[...d];n===void 0?c.push(o):c.splice(n,0,o),s(f(c),p.path,i)},[d,a,t,s,f,r,p]),h=(0,b.useCallback)((e,t)=>{e&&e.preventDefault();let n;if(r){n={};for(let e in r){let i=parseInt(e);i<=t?WC(n,[i],r[e]):i>t&&WC(n,[i+1],r[e])}}let i={key:pj(),item:Rx(d[t].item)},a=[...d];t===void 0?a.push(i):a.splice(t+1,0,i),s(f(a),p.path,n)},[d,s,f,r,p]),g=(0,b.useCallback)((e,t)=>{e&&e.preventDefault();let n;if(r){n={};for(let e in r){let i=parseInt(e);i<t?WC(n,[i],r[e]):i>t&&WC(n,[i-1],r[e])}}s(f(d.filter((e,n)=>n!==t)),p.path,n)},[d,s,f,r,p]),_=(0,b.useCallback)((e,t,n)=>{e&&(e.preventDefault(),e.currentTarget.blur());let i;if(r){i={};for(let e in r){let a=parseInt(e);a==t?WC(i,[n],r[t]):a==n?WC(i,[t],r[n]):WC(i,[e],r[a])}}function a(){let e=d.slice();return e.splice(t,1),e.splice(n,0,d[t]),e}s(f(a()),p.path,i)},[d,s,f,r,p]),v=(0,b.useCallback)((e,t,n,r)=>{s(e===void 0?null:e,t,n,r)},[s]),y=(0,b.useCallback)(e=>{s(e,p.path,void 0,p?.$id)},[s,p]),x={...e,formData:o,fieldPathId:p,onSelectChange:y},S={...e,handleAddItem:m,handleCopyItem:h,handleRemoveItem:g,handleReorderItems:_,keyedFormData:d,onChange:v};if(!(`items`in t)){if(!c.useFallbackUiForUnsupportedType)return(0,W.jsx)(uA(`UnsupportedFieldTemplate`,a,wD(n)),{schema:t,fieldPathId:i,reason:u(fj.MissingItems),registry:a});let e={...t,[oD]:{type:void 0}};x.schema=e,S.schema=e}return l.isMultiSelect(x.schema)?(0,W.jsx)(bj,{...x}):Pk(n)?(0,W.jsx)(xj,{...x}):pk(x.schema)?(0,W.jsx)(Tj,{...S}):l.isFilesArray(x.schema,n)?(0,W.jsx)(Sj,{...x}):(0,W.jsx)(wj,{...S})}function Oj(e){let{schema:t,name:n,uiSchema:r,fieldPathId:i,formData:a,registry:o,required:s,disabled:c,readonly:l,hideError:u,autofocus:d,title:f,onChange:p,onFocus:m,onBlur:h,rawErrors:g}=e,{title:_}=t,{widgets:v,translateString:y,globalUiOptions:x}=o,{widget:S=`checkbox`,title:C,label:w=!0,enumNames:T,...E}=wD(r,x),D=gA(t,S,v),O=y(fj.YesLabel),k=y(fj.NoLabel),A,j=C??_??f??n;if(Array.isArray(t.oneOf))A=Sk({oneOf:t.oneOf.map(e=>{if(cg(e))return{...e,title:e.title||(e.const===!0?O:k)}}).filter(e=>e)},r);else{let e=t.enum??[!0,!1];A=!T&&e.length===2&&e.every(e=>typeof e==`boolean`)?[{value:e[0],label:e[0]?O:k},{value:e[1],label:e[1]?O:k}]:Sk({enum:e},r)}let M=(0,b.useCallback)((e,t,n)=>p(e,i.path,t,n),[p,i]);return(0,W.jsx)(D,{options:{...E,enumOptions:A},schema:t,uiSchema:r,id:i.$id,name:n,onChange:M,onFocus:m,onBlur:h,label:j,hideLabel:!w,value:a,required:s,disabled:c,readonly:l,hideError:u,registry:o,autofocus:d,rawErrors:g,htmlName:i.name})}function kj(e){return{type:`string`,enum:[`string`,`number`,`boolean`,`object`,`array`],default:`string`,title:e}}function Aj(e){let t=typeof e;return t===`string`||t===`number`||t===`boolean`?t:t===`object`?Array.isArray(e)?`array`:`object`:`string`}function jj(e,t){switch(t){case`string`:return String(e);case`number`:{let t=Number(e);return isNaN(t)?0:t}case`boolean`:return!!e;default:return e}}function Mj(e){let{id:t,formData:n,displayLabel:r=!0,schema:i,name:a,uiSchema:o,required:s,disabled:c=!1,readonly:l=!1,onBlur:u,onFocus:d,registry:f,fieldPathId:p,onChange:m,errorSchema:h}=e,{translateString:g,fields:_,globalFormOptions:v}=f,[y,x]=(0,b.useState)(Aj(n)),S=wD(o),C=tj(XA(`__internal_type_selector`,v,p)),w=g(fj.Type),T=(0,b.useMemo)(()=>kj(w),[w]),E=e=>{e!=null&&(x(e),m(jj(n,e),p.path,h,t))};if(!v.useFallbackUiForUnsupportedType){let{reason:t=g(fj.UnknownFieldType,[String(i.type)])}=e;return(0,W.jsx)(uA(`UnsupportedFieldTemplate`,f,S),{schema:i,fieldPathId:p,reason:t,registry:f})}let D=uA(`FallbackFieldTemplate`,f,S),{SchemaField:O}=_;return(0,W.jsx)(D,{schema:i,registry:f,typeSelector:(0,W.jsx)(O,{fieldPathId:C,name:`${a}__fallback_type`,schema:T,formData:y,onChange:E,onBlur:u,onFocus:d,registry:f,hideLabel:!r,disabled:c,readonly:l,required:s},n?yA(n):`__empty__`),schemaField:(0,W.jsx)(O,{...e,schema:{type:y,title:g(fj.Value),...y===`object`&&{additionalProperties:!0}}})})}var Nj;(function(e){e.ROW=`ui:row`,e.COLUMN=`ui:col`,e.COLUMNS=`ui:columns`,e.CONDITION=`ui:condition`})(Nj||={});var Pj;(function(e){e.ALL=`all`,e.SOME=`some`,e.NONE=`none`})(Pj||={});var Fj=/^\$lookup=(.+)/,Ij=`layoutGrid`;`${Ij}`;function Lj(e,t){return e??t}function Rj(e){return/^\d+?$/.test(e)}var zj=dA();function Bj(e,t,n,r,i){let a=Q(n,[CD],{}),o=Q(n,e),s={...Q(o,[SD],{}),...t,...a},c={...o};SC(s)||WC(c,[SD],s),SC(a)||WC(c,[CD],a);let{readonly:l}=wD(c);return(i===!0||OC(l)&&r===!0)&&(l=!0,sC(s,`readonly`)?WC(c,[SD,dD],!0):WC(c,`ui:${dD}`,!0)),{fieldUiSchema:c,uiReadonly:l}}function Vj(e,t,n=`$0m3tH1nG Un3xP3cT3d`){let r=by([t]).sort(),i=by([n]).sort();switch(e){case Pj.ALL:return CC(r,i);case Pj.SOME:return _C(r,i).length>0;case Pj.NONE:return _C(r,i).length===0;default:return!1}}function Hj(e,t,n){let r={},i=e[t];if(ky(i)){let{children:e,className:t,...a}=i;if(i=e,t){let e=t.split(` `).map(e=>IA(n,e,e)).join(` `);r={...a,className:e}}else r=a}if(!Array.isArray(i))throw TypeError(`Expected array for "${t}" in ${JSON.stringify(e)}`);return{children:i,gridProps:r}}function Uj(e,t,n){let r;if(Rj(n)&&e&&e?.type===`array`&&sC(e,`items`)){let i=Number(n),a=e[oD];r=Array.isArray(a)?i>a.length?eC(a):a[i]:a,t={$id:t.$id,path:[...t.path.slice(0,t.path.length-1),i]}}return{rawSchema:r,fieldPathId:t}}function Wj(e,t,n,r,i){let{schemaUtils:a,globalFormOptions:o}=e,s=n,c=i,l=t.split(`.`),u=l.pop(),d=a.retrieveSchema(s,r),f=r,p=d.readOnly;l.forEach(e=>{if(c=XA(e,o,c),sC(d,`properties`))s=Q(d,[uD,e],{});else if(d&&(sC(d,`oneOf`)||sC(d,`anyOf`))){let t=sC(d,`oneOf`)?lD:nD;s=Q(a.findSelectedOptionInXxxOf(d,e,t,f),[uD,e],{})}else{let t=Uj(d,c,e);s=t.rawSchema??{},c=t.fieldPathId}f=Q(f,e,{}),d=a.retrieveSchema(s,f),p=Lj(d.readOnly,p)});let m,h=!1;if(SC(d)&&(d=void 0),d&&u){if(d&&(sC(d,`oneOf`)||sC(d,`anyOf`))){let e=sC(d,`oneOf`)?lD:nD;d=a.findSelectedOptionInXxxOf(d,u,e,f)}c=XA(u,o,c),h=d!==void 0&&Array.isArray(d.required)&&pC(d.required,u);let e=Uj(d,c,u);if(e.rawSchema?(d=e.rawSchema,c=e.fieldPathId):(d=Q(d,[uD,u]),d&&=a.retrieveSchema(d)),p=Lj(d?.readOnly,p),d&&(sC(d,`oneOf`)||sC(d,`anyOf`))){let e=sC(d,`oneOf`)?lD:nD,t=NO(d);m={options:d[e],hasDiscriminator:!!t}}}return{schema:d,isRequired:h,isReadonly:p,optionsInfo:m,fieldPathId:c}}function Gj(e,t){let n=e;return lC(n)&&(n=IA(t,n)),wg(n)?n:null}function Kj(e,t){let n,r=null,i={},a;if(lC(t)||OC(t))n=t??``;else{let{name:o=``,render:s,...c}=t;n=o,i=c,SC(i)||nC(i,(t,n)=>{if(lC(t)){let r=Fj.exec(t);if(Array.isArray(r)&&r.length>1){let t=r[1];i[n]=IA(e,t,t)}}}),r=Gj(s,e),!o&&r&&(a=(0,W.jsx)(r,{...c,"data-testid":zj.uiComponent}))}return{name:n,UIComponent:r,uiProps:i,rendered:a}}function qj(e){let{childrenLayoutGridSchemaId:t,...n}=e,{registry:r,schema:i,formData:a}=n,{schemaUtils:o}=r,s=o.retrieveSchema(i,a);return t.map(e=>(0,b.createElement)($j,{...n,key:`layoutGrid-${yA(e)}`,schema:s,layoutGridSchema:e}))}function Jj(e){let{layoutGridSchema:t,...n}=e,{formData:r,registry:i}=n,{children:a,gridProps:o}=Hj(t,Nj.CONDITION,i),{operator:s,field:c=``,value:l}=o;return Vj(s,Q(r,c,null),l)?(0,W.jsx)(qj,{...n,childrenLayoutGridSchemaId:a}):null}function Yj(e){let{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:i}=n,{children:a,gridProps:o}=Hj(t,Nj.COLUMN,r);return(0,W.jsx)(uA(`GridTemplate`,r,wD(i)),{column:!0,"data-testid":zj.col,...o,children:(0,W.jsx)(qj,{...n,childrenLayoutGridSchemaId:a})})}function Xj(e){let{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:i}=n,{children:a,gridProps:o}=Hj(t,Nj.COLUMNS,r),s=uA(`GridTemplate`,r,wD(i));return a.map(e=>(0,W.jsx)(s,{column:!0,"data-testid":zj.col,...o,children:(0,W.jsx)(qj,{...n,childrenLayoutGridSchemaId:[e]})},`column-${yA(e)}`))}function Zj(e){let{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:i}=n,{children:a,gridProps:o}=Hj(t,Nj.ROW,r);return(0,W.jsx)(uA(`GridTemplate`,r,wD(i)),{...o,"data-testid":zj.row,children:(0,W.jsx)(qj,{...n,childrenLayoutGridSchemaId:a})})}function Qj(e){let{gridSchema:t,schema:n,uiSchema:r,errorSchema:i,fieldPathId:a,onBlur:o,onFocus:s,formData:c,readonly:l,registry:u,layoutGridSchema:d,...f}=e,{onChange:p}=f,{fields:m}=u,{SchemaField:h,LayoutMultiSchemaField:g}=m,_=Kj(u,t),{name:v,UIComponent:y,uiProps:b}=_,{schema:x,isRequired:S,isReadonly:C,optionsInfo:w,fieldPathId:T}=Wj(u,v,n,c,a),E=tj(T);if(_.rendered)return _.rendered;if(x){let e=w?.hasDiscriminator?g:h,{fieldUiSchema:t,uiReadonly:n}=Bj(v,b,r,C,l);return(0,W.jsx)(e,{"data-testid":w?.hasDiscriminator?zj.layoutMultiSchemaField:zj.field,...f,name:v,required:S,readonly:n,schema:x,uiSchema:t,errorSchema:Q(i,v),fieldPathId:E,formData:Q(c,v),onChange:p,onBlur:o,onFocus:s,options:w?.options,registry:u})}return y?(0,W.jsx)(y,{"data-testid":zj.uiComponent,...f,name:v,required:S,formData:c,readOnly:!!C||l,errorSchema:i,uiSchema:r,schema:n,fieldPathId:a,onBlur:o,onFocus:s,registry:u,...b}):null}function $j(e){let{uiSchema:t}=e,{layoutGridSchema:n}=e,r=wD(t);if(!n&&`layoutGrid`in r&&cg(r.layoutGrid)&&(n=r[Ij]),cg(n)){if(Nj.ROW in n)return(0,W.jsx)(Zj,{...e,layoutGridSchema:n});if(Nj.COLUMN in n)return(0,W.jsx)(Yj,{...e,layoutGridSchema:n});if(Nj.COLUMNS in n)return(0,W.jsx)(Xj,{...e,layoutGridSchema:n});if(Nj.CONDITION in n)return(0,W.jsx)(Jj,{...e,layoutGridSchema:n})}return(0,W.jsx)(Qj,{...e,gridSchema:n})}$j.TEST_IDS=zj;function eM(e){let{fieldPathId:t,title:n,schema:r,uiSchema:i,required:a,registry:o,name:s}=e,c=wD(i,o.globalUiOptions),{title:l}=c,{title:u}=r,d=l||n||u||s;return d?(0,W.jsx)(uA(`TitleFieldTemplate`,o,c),{id:DA(t),title:d,required:a,schema:r,uiSchema:i,registry:o}):null}function tM(e,t,n){return e.map(({schema:e})=>e).find(e=>{let r=Q(e,[uD,t]);return Q(r,iD,Q(r,rD,`!@#!@$@#$!@$#`))===n})}function nM(e,t,n,r,i){let a=t.map(e=>n.retrieveSchema(e,i)),o=e;sC(e,`oneOf`)?o={...e,[lD]:a}:sC(e,`anyOf`)&&(o={...e,[nD]:a});let s=Sk(o,r);if(!s)throw Error(`No enumOptions were computed from the schema ${JSON.stringify(o)}`);return s}function rM(e){let{name:t,baseType:n,disabled:r=!1,formData:i,fieldPathId:a,onBlur:o,onChange:s,options:c,onFocus:l,registry:u,uiSchema:d,schema:f,autofocus:p,readonly:m,required:h,errorSchema:g,hideError:_=!1}=e,{widgets:v,schemaUtils:y,globalUiOptions:x}=u,[S,C]=(0,b.useState)(nM(f,c,y,d,i)),w=Q(a,`$id`),T=NO(f),E=uA(`FieldErrorTemplate`,u,c),D=uA(`FieldTemplate`,u,c);(0,b.useEffect)(()=>{C(nM(f,c,y,d,i))},[yA(f),yA(c),y,d?yA(d):``,i?yA(i):``]);let{widget:O=T?`radio`:`select`,title:k=``,placeholder:A=``,optionsSchemaSelector:j=T,hideError:M,...N}=wD(d);if(!j)throw Error(`No selector field provided for the LayoutMultiSchemaField`);let P=Q(i,j),F=Q(S[0]?.schema,[uD,j],{}),I=tM(S,j,P);F=F?.type?F:{...F,type:I?.type||n};let L=gA(F,O,v),R=M===void 0?_:!!M,z=Q(g,[aD],[]),B=IC(g,[aD]),V=y.getDisplayLabel(f,d,x),ee=e=>{let t=tM(S,j,e),n=tM(S,j,P),r=y.sanitizeDataForNewSchema(t,n,i);r&&t&&(r=y.getDefaultFormState(t,r,`excludeObjectChildren`)),r&&WC(r,j,e),s(r,a.path,void 0,w)},H={enumOptions:S,...N},te=!R&&z.length>0?(0,W.jsx)(E,{fieldPathId:a,schema:f,errors:z,registry:u}):void 0;return(0,W.jsx)(D,{fieldPathId:a,id:w,schema:f,label:(k||f.title)??``,disabled:r||Array.isArray(S)&&SC(S),uiSchema:d,required:h,readonly:!!m,registry:u,displayLabel:V,errors:te,onChange:s,onKeyRename:Wg,onKeyRenameBlur:Wg,onRemoveProperty:Wg,children:(0,W.jsx)(L,{id:w,name:t,schema:f,label:(k||f.title)??``,disabled:r||Array.isArray(S)&&SC(S),uiSchema:d,autofocus:p,readonly:m,required:h,registry:u,multiple:!1,rawErrors:z,hideError:R,hideLabel:!V,errorSchema:B,placeholder:A,onChange:ee,onBlur:o,onFocus:l,value:P,options:H,htmlName:a.name})})}var iM=class extends b.Component{constructor(e){super(e);let{formData:t,options:n,registry:{schemaUtils:r}}=this.props,i=n.map(e=>r.retrieveSchema(e,t));this.state={retrievedOptions:i,selectedOption:this.getMatchingOption(0,t,i)}}componentDidUpdate(e,t){let{formData:n,options:r,fieldPathId:i}=this.props,{selectedOption:a}=this.state,o=this.state;if(!DD(e.options,r)){let{registry:{schemaUtils:e}}=this.props;o={selectedOption:a,retrievedOptions:r.map(t=>e.retrieveSchema(t,n))}}if(!DD(n,e.formData)&&i.$id===e.fieldPathId.$id){let{retrievedOptions:e}=o,r=this.getMatchingOption(a,n,e);t&&r!==a&&(o={selectedOption:r,retrievedOptions:e})}o!==this.state&&this.setState(o)}getMatchingOption(e,t,n){let{schema:r,registry:{schemaUtils:i}}=this.props,a=NO(r);return i.getClosestMatchingOption(t,n,e,a)}onOptionChange=e=>{let{selectedOption:t,retrievedOptions:n}=this.state,{formData:r,onChange:i,registry:a,fieldPathId:o}=this.props,{schemaUtils:s}=a,c=e===void 0?-1:parseInt(e,10);if(c===t)return;let l=c>=0?n[c]:void 0,u=t>=0?n[t]:void 0,d=s.sanitizeDataForNewSchema(l,u,r);l&&(d=s.getDefaultFormState(l,d,`excludeObjectChildren`)),this.setState({selectedOption:c},()=>{i(d,o.path,void 0,this.getFieldId())})};getFieldId(){let{fieldPathId:e,schema:t}=this.props;return`${e.$id}${t.oneOf?`__oneof_select`:`__anyof_select`}`}render(){let{name:e,disabled:t=!1,errorSchema:n={},formData:r,onBlur:i,onFocus:a,readonly:o,required:s=!1,registry:c,schema:l,uiSchema:u}=this.props,{widgets:d,fields:f,translateString:p,globalUiOptions:m,schemaUtils:h}=c,{SchemaField:g}=f,_=uA(`MultiSchemaFieldTemplate`,c,m),v=KA(c,l,s,u),y=MA(r),{selectedOption:b,retrievedOptions:x}=this.state,{widget:S=`select`,placeholder:C,autofocus:w,autocomplete:T,title:E=l.title,...D}=wD(u,m),O=gA({type:`number`},S,d),k=Q(n,aD,[]),A=IC(n,[aD]),j=h.getDisplayLabel(l,u,m),M=b>=0&&x[b]||null,N;if(M){let{required:e}=l;N=e?IO({required:e},M):M}let P=[];`oneOf`in l&&u&&`oneOf`in u?Array.isArray(u.oneOf)?P=u[lD]:console.warn(`uiSchema.oneOf is not an array for "${E||e}"`):`anyOf`in l&&u&&`anyOf`in u&&(Array.isArray(u.anyOf)?P=u[nD]:console.warn(`uiSchema.anyOf is not an array for "${E||e}"`));let F=u;b>=0&&P.length>b&&(F=P[b]);let I=E?fj.TitleOptionPrefix:fj.OptionPrefix,L=E?[E]:[],R=x.map((e,t)=>{let{title:n=e.title}=wD(P[t]);return{label:n||p(I,L.concat(String(t+1))),value:t}});return(0,W.jsx)(_,{schema:l,registry:c,uiSchema:u,selector:!v||y?(0,W.jsx)(O,{id:this.getFieldId(),name:`${e}${l.oneOf?`__oneof_select`:`__anyof_select`}`,schema:{type:`number`,default:0},onChange:this.onOptionChange,onBlur:i,onFocus:a,disabled:t||SC(R),multiple:!1,rawErrors:k,errorSchema:A,value:b>=0?b:void 0,options:{enumOptions:R,...D},registry:c,placeholder:C,autocomplete:T,autofocus:w,label:E??e,hideLabel:!j,readonly:o}):void 0,optionSchemaField:N&&N.type!==`null`&&(0,W.jsx)(g,{...this.props,schema:N,uiSchema:F})||null})}},aM=/\.([0-9]*0)*$/,oM=/[0.]0*$/;function sM(e){let{registry:t,onChange:n,formData:r,value:i}=e,[a,o]=(0,b.useState)(i),{StringField:s}=t.fields,c=r,l=(0,b.useCallback)((e,t,r,i)=>{o(e),`${e}`.charAt(0)===`.`&&(e=`0${e}`),n(typeof e==`string`&&e.match(aM)?QE(e.replace(oM,``)):QE(e),t,r,i)},[n]);if(typeof a==`string`&&typeof c==`number`){let e=RegExp(`^(${String(c).replace(`.`,`\\.`)})?\\.?0*$`);a.match(e)&&(c=a)}return(0,W.jsx)(s,{...e,formData:c,onChange:l})}function cM(){return cM=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},cM.apply(null,arguments)}var lM=[`strong`,`em`,`del`,`mark`],uM=[[`**`,lM[0]],[`__`,lM[0]],[`~~`,lM[2]],[`==`,lM[3]],[`*`,`em`],[`_`,`em`]];function dM(e,t){for(var n=1,r=t+1;r<e.length&&n>0;)e[r]===`\\`?r+=2:(e[r]===`[`&&n++,e[r]===`]`&&n--,r++);if(n===0&&r<e.length&&(e[r]===`(`||e[r]===`[`)){var i=e[r]===`(`?`)`:`]`,a=1;for(r++;r<e.length&&a>0;)e[r]===`\\`?r+=2:(e[r]===`(`&&i===`)`&&a++,e[r]===i&&a--,r++);if(a===0)return r}return-1}function fM(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,a=``,o=0;o<6;o++){var s=uM[o][0];if(e.startsWith(s)&&e.length>=2*s.length){r=s,i=s.length,a=uM[o][1];break}}if(!r)return null;for(var c=i,l=!1,u=!1,d=``,f=0,p=``,m=!1,h=``;c<e.length;){var g=e[c];if(m)p+=g,m=!1,h=g,c++;else if(g!==`\\`)if(g!=="`"||f!==0){if(g===`[`&&!l&&f===0){var _=dM(e,c);if(_!==-1){p+=e.slice(c,_),c=_,h=e[_-1];continue}}if(u)p+=g,d?g===d&&(d=``):g===`"`||g===`'`?d=g:g===`>`&&(u=!1),h=g,c++;else if(g!==`<`||l){if(g===`
|
|
63
|
+
`&&h===`
|
|
64
|
+
`&&!l&&f===0)return null;if(!l&&f===0){for(var v=0;c+v<e.length&&e[c+v]===r[0];)v++;if(v>=i&&(i!==1||r!==`*`&&r!==`_`||e[c-1]!==r&&e[c+1]!==r)){var y=[e.slice(0,c+v),a,p+e.slice(c+i,c+v)];return y.index=0,y.input=e,y}}p+=g,h=g,c++}else{var b=e[c+1],x=e.indexOf(`>`,c);if(x!==-1){var S=e.slice(c,x+1).endsWith(`/>`);b===`/`?f=Math.max(0,f-1):S||f++}u=!0,p+=g,h=g,c++}}else l=!l,p+=g,h=g,c++;else p+=g,m=!0,h=g,c++}return null}var pM=[`children`,`options`],mM=`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`.split(`.`).reduce((e,t)=>(e[t.toLowerCase()]=t,e),{class:`className`,for:`htmlFor`}),hM={amp:`&`,apos:`'`,gt:`>`,lt:`<`,nbsp:`\xA0`,quot:`“`},gM=[`style`,`script`,`pre`],_M=[`src`,`href`,`data`,`formAction`,`srcDoc`,`action`],vM=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,yM=/\n{2,}$/,bM=/^(\s*>[\s\S]*?)(?=\n\n|$)/,xM=/^ *> ?/gm,SM=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,CM=/^ {2,}\n/,wM=/^(?:([-*_])( *\1){2,}) *(?:\n *)+\n/,TM=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,EM=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,DM=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,OM=/^(?:\n *)*\n/,kM=/\r\n?/g,AM=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,jM=/^\[\^([^\]]+)]/,MM=/\f/g,NM=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,PM=/^\[(x|\s)\]/,FM=/^(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,IM=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,LM=/^([^\n]+)\n *(=|-)\2{2,} *\n/,RM=/^<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>/i;function zM(e){let t=RM.exec(e);if(!t)return null;let n=t[1],r=n.toLowerCase(),i=r.length+1,a=t[0].length;e[a]===`
|
|
65
|
+
`&&a++;let o=a,s=a,c=1,l=e.length;for(;c>0;){let t=e.indexOf(`<`,a);if(t===-1)return null;let o=-1,u=-1;if(e[t+1]===`/`)u=t;else if(e[t+1]===r[0]||e[t+1]===n[0]){let a=!0;for(let i=0;i<r.length;i++){let o=e[t+1+i];if(o!==r[i]&&o!==n[i]){a=!1;break}}!a||e[t+i]!==` `&&e[t+i]!==`>`||(o=t)}if(o!==-1||u!==-1)if(o!==-1&&(u===-1||o<u))a=o+i+1,c++;else{let t=u+2;for(;t<l;){let n=e[t];if(n!==` `&&n!==` `&&n!==`
|
|
66
|
+
`&&n!==`\r`)break;t++}if(t+r.length>l)return null;let i=!0;for(let a=0;a<r.length;a++){let o=e[t+a];if(o!==r[a]&&o!==n[a]){i=!1;break}}if(!i){a=t;continue}for(t+=r.length;t<l;){let n=e[t];if(n!==` `&&n!==` `&&n!==`
|
|
67
|
+
`&&n!==`\r`)break;t++}if(t>=l||e[t]!==`>`){a=t;continue}s=u,a=t+1,c--}else a=t+1}let u=0;for(;a+u<l&&e[a+u]===`
|
|
68
|
+
`;)u++;return[e.slice(0,a+u),n,t[2],e.slice(o,s)]}var BM=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,VM=/^<!--[\s\S]*?(?:-->)/,HM=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,UM=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,WM=/^\{.*\}$/,GM=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,KM=/^<([^ >]+[:@\/][^ >]+)>/,qM=/-([a-z])?/gi,JM=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,YM=/^[^\n]+(?: \n|\n{2,})/,XM=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,ZM=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,QM=/^\[([^\]]*)\] ?\[([^\]]*)\]/,$M=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,eN=/\t/g,tN=/(^ *\||\| *$)/g,nN=/^ *:-+: *$/,rN=/^ *:-+ *$/,iN=/^ *-+: *$/,aN=/^(:[a-zA-Z0-9-_]+:)/,oN=/^\\([^0-9A-Za-z\s])/,sN=/\\([^0-9A-Za-z\s])/g,cN=/^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/,lN=/^\n+/,uN=/^([ \t]*)/,dN=/(?:^|\n)( *)$/,fN=`(?:\\d+\\.)`,pN=`(?:[*+-])`;function mN(e){return`( *)(`+(e===1?fN:pN)+`) +`}var hN=mN(1),gN=mN(2);function _N(e){return RegExp(`^`+(e===1?hN:gN))}var vN=_N(1),yN=_N(2);function bN(e){return RegExp(`^`+(e===1?hN:gN)+`[^\\n]*(?:\\n(?!\\1`+(e===1?fN:pN)+` )[^\\n]*)*(\\n|$)`,`gm`)}var xN=bN(1),SN=bN(2);function CN(e){let t=e===1?fN:pN;return RegExp(`^( *)(`+t+`) [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1`+t+` (?!`+t+` ))\\n*|\\s*\\n*$)`)}var wN=CN(1),TN=CN(2);function EN(e,t){let n=t===1,r=n?wN:TN,i=n?xN:SN,a=n?vN:yN;return{t:e=>a.test(e),o:zN(function(e,t){let n=dN.exec(t.prevCapture);return n&&(t.list||!t.inline&&!t.simple)?r.exec(e=n[1]+e):null}),u:1,i(e,t,r){let o=n?+e[2]:void 0,s=e[0].replace(yM,`
|
|
69
|
+
`).match(i),c=a.exec(s[0]),l=RegExp(`^ {1,`+(c?c[0].length:0)+`}`,`gm`),u=!1;return{items:s.map(function(e,n){let i=e.replace(l,``).replace(a,``),o=n===s.length-1,c=MN(i,`
|
|
70
|
+
|
|
71
|
+
`)||o&&u;u=c;let d=r.inline,f=r.list,p;r.list=!0,c?(r.inline=!1,p=AN(i)+`
|
|
72
|
+
|
|
73
|
+
`):(r.inline=!0,p=AN(i));let m=t(p,r);return r.inline=d,r.list=f,m}),ordered:n,start:o}}}}var DN=RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),ON=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;function kN(e){return typeof e==`string`}function AN(e){let t=e.length;for(;t>0&&e[t-1]<=` `;)t--;return e.slice(0,t)}function jN(e,t){return e.startsWith(t)}function MN(e,t){return e.indexOf(t)!==-1}function NN(e,t,n){if(Array.isArray(n)){for(let t=0;t<n.length;t++)if(jN(e,n[t]))return!0;return!1}return n(e,t)}function PN(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 FN(e){return iN.test(e)?`right`:nN.test(e)?`center`:rN.test(e)?`left`:null}function IN(e,t,n,r){let i=n.inTable;n.inTable=!0;let a=[[]],o=``;function s(){if(!o)return;let e=a[a.length-1];e.push.apply(e,t(o,n)),o=``}return e.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((e,t,n)=>{e.trim()===`|`&&(s(),r)?t!==0&&t!==n.length-1&&a.push([]):o+=e}),s(),n.inTable=i,a}function LN(e,t,n){n.inline=!0;let r=e[2]?e[2].replace(tN,``).split(`|`).map(FN):[],i=e[3]?function(e,t,n){return e.trim().split(`
|
|
74
|
+
`).map(function(e){return IN(e,t,n,!0)})}(e[3],t,n):[],a=IN(e[1],t,n,!!i.length);return n.inline=!1,i.length?{align:r,cells:i,header:a,type:`25`}:{children:a,type:`21`}}function RN(e,t){return e.align[t]==null?{}:{textAlign:e.align[t]}}function zN(e){return e.inline=1,e}function BN(e){return zN(function(t,n){return n.inline?e.exec(t):null})}function VN(e){return zN(function(t,n){return n.inline||n.simple?e.exec(t):null})}function HN(e){return function(t,n){return n.inline||n.simple?null:e.exec(t)}}function UN(e){return zN(function(t){return e.exec(t)})}var WN=/(javascript|vbscript|data(?!:image)):/i;function GN(e){try{let t=decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,``);if(WN.test(t))return null}catch{return null}return e}function KN(e){return e&&e.replace(sN,`$1`)}function qN(e,t,n){let r=n.inline||!1,i=n.simple||!1;n.inline=!0,n.simple=!0;let a=e(t,n);return n.inline=r,n.simple=i,a}function JN(e,t,n){let r=n.inline||!1,i=n.simple||!1;n.inline=!1,n.simple=!0;let a=e(t,n);return n.inline=r,n.simple=i,a}function YN(e,t,n){let r=n.inline||!1;n.inline=!1;let i=e(t,n);return n.inline=r,i}var XN=(e,t,n)=>({children:qN(t,e[2],n)});function ZN(){return{}}function QN(...e){return e.filter(Boolean).join(` `)}function $N(e,t,n){let r=e,i=t.split(`.`);for(;i.length&&(r=r[i[0]],r!==void 0);)i.shift();return r||n}function eP(e,t,n,r){if(!t||!t.trim())return null;let i=t.match(vM);return i?i.reduce(function(t,i){let a=i.indexOf(`=`);if(a!==-1){let o=function(e){return e.indexOf(`-`)!==-1&&e.match(HM)===null&&(e=e.replace(qM,function(e,t){return t.toUpperCase()})),e}(i.slice(0,a)).trim(),s=mM[o]||o;if(s===`ref`)return t;let c=t[s]=function(e,t,n,r){return t===`style`?function(e){let t=[];if(!e)return t;let n=``,r=0,i=``;for(let a=0;a<e.length;a++){let o=e[a];if(o===`"`||o===`'`)i?o===i&&(i=``,r--):(i=o,r++);else if(o===`(`&&n.endsWith(`url`))r++;else if(o===`)`&&r>0)r--;else if(o===`;`&&r===0){let e=n.indexOf(`:`);e>0&&t.push([n.slice(0,e).trim(),n.slice(e+1).trim()]),n=``;continue}n+=o}let a=n.indexOf(`:`);return a>0&&t.push([n.slice(0,a).trim(),n.slice(a+1).trim()]),t}(n).reduce(function(t,[n,i]){return t[n.replace(/(-[a-z])/g,e=>e[1].toUpperCase())]=r(i,e,n),t},{}):_M.indexOf(t)===-1?(n.match(WM)&&(n=KN(n.slice(1,n.length-1))),n===`true`||n!==`false`&&n):r(KN(n),e,t)}(e,o,function(e){let t=e[0];return(t===`"`||t===`'`)&&e.length>=2&&e[e.length-1]===t?e.slice(1,-1):e}(i.slice(a+1).trim()),n);typeof c==`string`&&(RM.test(c)||UM.test(c))&&(t[s]=r(c.trim()))}else i!==`style`&&(t[mM[i]||i]=!0);return t},{}):null}function tP(e,t){for(let n=0;n<e.length;n++)if(e[n].test(t))return!0;return!1}function nP(e=``,t={}){t.overrides=t.overrides||{},t.namedCodesToUnicode=t.namedCodesToUnicode?cM({},hM,t.namedCodesToUnicode):hM;let n=t.slugify||PN,r=t.sanitizer||GN,i=t.createElement||b.createElement,a=[bM,TM,EM,t.enforceAtxHeadings?IM:FM,LM,JM,wN,TN],o=[...a,YM,RM,VM,UM];function s(e,n,...r){let a=$N(t.overrides,e+`.props`,{});return i(function(e,t){let n=$N(t,e);return n?typeof n==`function`||typeof n==`object`&&`render`in n?n:$N(t,e+`.component`,e):e}(e,t.overrides),cM({},n,a,{className:QN(n?.className,a.className)||void 0}),...r)}function c(e){e=e.replace(NM,``);let r=!1;t.forceInline?r=!0:t.forceBlock||(r=!1===$M.test(e));let a=f(r?e:AN(e).replace(lN,``)+`
|
|
75
|
+
|
|
76
|
+
`,{inline:r});if(t.ast)return a;let o=p(a);for(;kN(o[o.length-1])&&!o[o.length-1].trim();)o.pop();if(l.length&&o.push(s(`footer`,{key:`footer`},l.map(function(e){return s(`div`,{id:n(e.identifier,PN),key:e.identifier},e.identifier,p(f(e.footnote,{inline:!0})))}))),t.wrapper===null)return o;let c=t.wrapper||(r?`span`:`div`),u;if(o.length>1||t.forceWrapper)u=o;else{if(o.length===1)return u=o[0],typeof u==`string`?s(`span`,{key:`outer`},u):u;u=null}return i(c,cM({key:`outer`},t.wrapperProps),u)}let l=[],u={},d={0:{t:[`>`],o:HN(bM),u:1,i(e,t,n){let[,r,i]=e[0].replace(xM,``).match(SM);return{alert:r,children:t(i,n)}}},1:{t:[` `],o:BN(CM),u:1,i:ZN},2:{t:function(e,t){if(t.inline||t.simple)return!1;var n=e[0];return n===`-`||n===`*`||n===`_`},o:HN(wM),u:1,i:ZN},3:{t:[` `],o:HN(EM),u:0,i:e=>({lang:void 0,text:KN(AN(e[0].replace(/^ {4}/gm,``)))})},4:{t:["```",`~~~`],o:HN(TM),u:0,i:e=>({attrs:eP(`code`,e[3]||``,r,c),lang:e[2]||void 0,text:e[4],type:`3`})},5:{t:["`"],o:VN(DM),u:3,i:e=>({text:KN(e[2])})},6:{t:[`[^`],o:HN(AM),u:0,i:e=>(l.push({footnote:e[2],identifier:e[1]}),{})},7:{t:[`[^`],o:BN(jM),u:1,i:e=>({target:`#`+n(e[1],PN),text:e[1]})},8:{t:[`[ ]`,`[x]`],o:BN(PM),u:1,i:e=>({completed:e[1].toLowerCase()===`x`})},9:{t:[`#`],o:HN(t.enforceAtxHeadings?IM:FM),u:1,i:(e,t,r)=>({children:qN(t,e[2],r),id:n(e[2],PN),level:e[1].length})},10:{t:e=>{let t=e.indexOf(`
|
|
77
|
+
`);return t>0&&t<e.length-1&&(e[t+1]===`=`||e[t+1]===`-`)},o:HN(LM),u:1,i:(e,t,n)=>({children:qN(t,e[1],n),level:e[2]===`=`?1:2,type:`9`})},11:{t:[`<`],o:zN(zM),u:1,i(e,t,n){let[,i]=e[3].match(uN),a=RegExp(`^`+i,`gm`),s=e[3].replace(a,``),l=tP(o,s)?YN:qN,u=e[1].toLowerCase(),d=gM.indexOf(u)!==-1,f=(d?u:e[1]).trim(),p={attrs:eP(f,e[2],r,c),noInnerParse:d,tag:f};if(n.inAnchor=n.inAnchor||u===`a`,d)p.text=e[3];else{let e=n.inHTML;n.inHTML=!0,p.children=l(t,s,n),n.inHTML=e}return n.inAnchor=!1,p}},13:{t:[`<`],o:UN(UM),u:1,i(e){let t=e[1].trim();return{attrs:eP(t,e[2]||``,r,c),tag:t}}},12:{t:[`<!--`],o:UN(VM),u:1,i:()=>({})},14:{t:[`![`],o:VN(ON),u:1,i:e=>({alt:KN(e[1]),target:KN(e[2]),title:KN(e[3])})},15:{t:[`[`],o:BN(DN),u:3,i:(e,t,n)=>({children:JN(t,e[1],n),target:KN(e[2]),title:KN(e[3])})},16:{t:function(e,t){return!(!t.inline||t.inAnchor)&&e[0]===`<`&&(MN(e,`:`)||MN(e,`@`)||MN(e,`/`))},o:BN(KM),u:0,i(e){let t=e[1],n=!1;return MN(t,`@`)&&!MN(t,`//`)&&(n=!0,t=t.replace(`mailto:`,``)),{children:[{text:t,type:`27`}],target:n?`mailto:`+t:t,type:`15`}}},17:{t:(e,n)=>!n.inAnchor&&!t.disableAutoLink&&jN(e,`http`),o:BN(GM),u:0,i:e=>({children:[{text:e[1],type:`27`}],target:e[1],title:void 0,type:`15`})},20:EN(0,1),30:EN(0,2),19:{t:[`
|
|
78
|
+
`],o:HN(OM),u:3,i:ZN},21:{t:function(e,t){return!t.inline&&!t.simple},o:zN(function(e,t){if(t.inline||t.simple||t.inHTML&&!MN(e,`
|
|
79
|
+
|
|
80
|
+
`)&&!MN(t.prevCapture,`
|
|
81
|
+
|
|
82
|
+
`))return null;let n=``,r=0;for(;;){let t=e.indexOf(`
|
|
83
|
+
`,r),i=e.slice(r,t===-1?void 0:t+1),o=e[r];if((o===`>`||o===`#`||o===`|`||o==="`"||o===`~`||o===`*`||o===`-`||o===`_`||o===` `)&&tP(a,i)||(n+=i,t===-1||!i.trim()))break;r=t+1}let i=AN(n);return i===``?null:[n,,i]}),u:3,i:XN},22:{t:[`[`],o:BN(XM),u:0,i:e=>(u[e[1]]={target:e[2],title:e[4]},{})},23:{t:[`![`],o:VN(ZM),u:0,i:e=>({alt:e[1]?KN(e[1]):void 0,ref:e[2]})},24:{t:e=>e[0]===`[`&&!MN(e,`](`),o:BN(QM),u:0,i:(e,t,n)=>({children:t(e[1],n),fallbackChildren:e[0],ref:e[2]})},25:{t:[`|`],o:HN(JM),u:1,i:LN},27:{o:zN(function(e,t){let n;return jN(e,`:`)&&(n=aN.exec(e)),n||cN.exec(e)}),u:4,i(e){let n=e[0];return{text:MN(n,`&`)?n.replace(BM,(e,n)=>t.namedCodesToUnicode[n]||e):n}}},34:{t:[`*`,`_`,`~`,`=`],o:zN(fM),u:2,i:(e,t,n)=>({children:t(e[2],n),tag:e[1]})},28:{t:[`\\`],o:VN(oN),u:1,i:e=>({text:e[1],type:`27`})}};!0===t.disableParsingRawHTML&&(delete d[11],delete d[13]);let f=function(e){var t=Object.keys(e);function n(r,i){var a=[];if(i.prevCapture=i.prevCapture||``,r.trim())for(;r;)for(var o=0;o<t.length;){var s=t[o],c=e[s];if(!c.t||NN(r,i,c.t)){var l=c.o(r,i);if(l&&l[0]){r=r.substring(l[0].length);var u=c.i(l,n,i);i.prevCapture+=l[0],u.type||=s,a.push(u);break}o++}else o++}return i.prevCapture=``,a}return t.sort(function(t,n){return e[t].u-e[n].u||(t<n?-1:1)}),function(e,t){return n(function(e){return e.replace(kM,`
|
|
84
|
+
`).replace(MM,``).replace(eN,` `)}(e),t)}}(d),p=function(e,t,n,r,i){function a(e){return Array.isArray(e)?e.map(e=>`text`in e?e.text:``):`text`in e?e.text:``}return function o(s,c={}){let l=(c.renderDepth||0)+1;if(l>2500)return a(s);c.renderDepth=l;try{if(Array.isArray(s)){let e=c.key,t=[],n=!1;for(let e=0;e<s.length;e++){c.key=e;let r=o(s[e],c),i=kN(r);i&&n?t[t.length-1]+=r:r!==null&&t.push(r),n=i}return c.key=e,c.renderDepth=l-1,t}let a=function(a,o,s){let c=()=>function(e,t,n,r,i,a,o){switch(e.type){case`0`:{let i={key:n.key};return e.alert&&(i.className=`markdown-alert-`+a(e.alert.toLowerCase(),PN),e.children.unshift({attrs:{},children:[{type:`27`,text:e.alert}],noInnerParse:!0,type:`11`,tag:`header`})),r(`blockquote`,i,t(e.children,n))}case`1`:return r(`br`,{key:n.key});case`2`:return r(`hr`,{key:n.key});case`3`:return r(`pre`,{key:n.key},r(`code`,cM({},e.attrs,{className:e.lang?`lang-`+e.lang:``}),e.text));case`5`:return r(`code`,{key:n.key},e.text);case`7`:return r(`a`,{key:n.key,href:i(e.target,`a`,`href`)},r(`sup`,{key:n.key},e.text));case`8`:return r(`input`,{checked:e.completed,key:n.key,readOnly:!0,type:`checkbox`});case`9`:return r(`h`+e.level,{id:e.id,key:n.key},t(e.children,n));case`11`:return r(e.tag,cM({key:n.key},e.attrs),e.text||(e.children?t(e.children,n):``));case`13`:return r(e.tag,cM({},e.attrs,{key:n.key}));case`14`:return r(`img`,{key:n.key,alt:e.alt||void 0,title:e.title||void 0,src:i(e.target,`img`,`src`)});case`15`:return r(`a`,{key:n.key,href:i(e.target,`a`,`href`),title:e.title},t(e.children,n));case`23`:return o[e.ref]?r(`img`,{key:n.key,alt:e.alt,src:i(o[e.ref].target,`img`,`src`),title:o[e.ref].title}):null;case`24`:return o[e.ref]?r(`a`,{key:n.key,href:i(o[e.ref].target,`a`,`href`),title:o[e.ref].title},t(e.children,n)):r(`span`,{key:n.key},e.fallbackChildren);case`25`:{let i=e;return r(`table`,{key:n.key},r(`thead`,null,r(`tr`,null,i.header.map(function(e,a){return r(`th`,{key:a,style:RN(i,a)},t(e,n))}))),r(`tbody`,null,i.cells.map(function(e,a){return r(`tr`,{key:a},e.map(function(e,a){return r(`td`,{key:a,style:RN(i,a)},t(e,n))}))})))}case`27`:return e.text;case`34`:return r(e.tag,{key:n.key},t(e.children,n));case`20`:case`30`:return r(e.ordered?`ol`:`ul`,{key:n.key,start:e.type===`20`?e.start:void 0},e.items.map(function(e,i){return r(`li`,{key:i},t(e,n))}));case`19`:return`
|
|
85
|
+
`;case`21`:return r(`p`,{key:n.key},t(e.children,n));default:return null}}(a,o,s,t,n,r,i);return e?e(c,a,o,s):c()}(s,o,c);return c.renderDepth=l-1,a}catch(e){if(e instanceof RangeError&&e.message.includes(`Maximum call stack`))return a(s);throw e}}}(t.renderRule,s,r,n,u);return c(e)}var rP=e=>{let{children:t,options:n}=e,r=function(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}(e,pM);return nP(t??``,cM({},n,{wrapperProps:cM({},n?.wrapperProps,r)}))},iP=Symbol(`remove-this-key`),aP=Symbol(`reset`);function oP(e,t){return Array.isArray(e.required)&&e.required.indexOf(t)!==-1}function sP(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(fj.NewStringDefault)}}function cP(e){let{fieldPathId:t,schema:n,registry:r,uiSchema:i,errorSchema:a,formData:o,onChange:s,onBlur:c,onFocus:l,disabled:u,readonly:d,required:f,hideError:p,propertyName:m,handleKeyRename:h,handleRemoveProperty:g,addedByAdditionalProperties:_}=e,[v,y]=(0,b.useState)(!1),{globalFormOptions:x,fields:S}=r,{SchemaField:C}=S,w=tj(XA(m,x,t.path)),T=(0,b.useCallback)((e,t,n,r)=>{e===void 0&&_&&(e=``),s(e,t,n,r)},[s,_]),E=(0,b.useCallback)(e=>{m!==e&&y(!0),h(m,e)},[m,h]);return(0,W.jsx)(C,{name:m,required:f,schema:n,uiSchema:i,errorSchema:a,fieldPathId:w,formData:o,wasPropertyKeyModified:v,onKeyRename:E,onKeyRenameBlur:(0,b.useCallback)(e=>{let{target:{value:t}}=e;E(t)},[E]),onRemoveProperty:(0,b.useCallback)(()=>{g(m)},[m,g]),onChange:T,onBlur:c,onFocus:l,registry:r,disabled:u,readonly:d,hideError:p})}function lP(e){let{schema:t,uiSchema:n={},formData:r,errorSchema:i,fieldPathId:a,name:o,required:s=!1,disabled:c,readonly:l,hideError:u,onBlur:d,onFocus:f,onChange:p,registry:m,title:h}=e,{fields:g,schemaUtils:_,translateString:v,globalUiOptions:y}=m,{OptionalDataControlsField:x}=g,S=_.retrieveSchema(t,r,!0),C=wD(n,y),{properties:w={}}=S,T=e.childFieldPathId??a,E=C.title??S.title??h??o,D=C.description??S.description,O=KA(m,S,s,n),k=MA(r),A=[],j=(0,b.useCallback)((e,t)=>{let{duplicateKeySuffixSeparator:r=`-`}=wD(n,y),i=0,a=e;for(;sC(t,a);)a=`${e}${r}${++i}`;return a},[n,y]),M=(0,b.useCallback)(()=>{if(!(S.additionalProperties||S.patternProperties))return;let{translateString:e}=m,t={...r},n=j(`newKey`,t);if(S.patternProperties)WC(t,n,null);else{let i,a,o;if(cg(S.additionalProperties)){i=S.additionalProperties.type,a=S.additionalProperties.const,o=S.additionalProperties.default;let e=S.additionalProperties;if(`$ref`in e){let{schemaUtils:t}=m;e=t.retrieveSchema({[mD]:e[mD]},r),i=e.type,a=e.const,o=e.default}!i&&(`anyOf`in e||`oneOf`in e)&&(i=`object`)}WC(t,n,a??o??sP(e,i))}p(t,T.path)},[r,p,m,T,j,S]),N=(0,b.useCallback)((e,t)=>{if(e!==t){let n=j(t,r),i={...r},a={[e]:n},o=Object.keys(i).map(e=>({[a[e]||e]:i[e]}));p(Object.assign({},...o),T.path)}},[r,p,T,j]),P=(0,b.useCallback)(e=>{p(iP,[...T.path,e])},[p,T]);if(!O||k)try{A=LA(Object.keys(w),C.order)}catch(e){return(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`p`,{className:`rjsf-config-error`,style:{color:`red`},children:(0,W.jsx)(rP,{options:{disableParsingRawHTML:!0},children:v(fj.InvalidObjectField,[o||`root`,e.message])})}),(0,W.jsx)(`pre`,{children:JSON.stringify(S)})]})}let F=uA(`ObjectFieldTemplate`,m,C),I=O?(0,W.jsx)(x,{...e,fieldPathId:T,schema:S}):void 0;return(0,W.jsx)(F,{title:C.label===!1?``:E,description:C.label===!1?void 0:D,properties:A.map(e=>{let t=sC(S,[uD,e,$E]),a=t?n.additionalProperties:n[e],o=wD(a).widget===`hidden`;return{content:(0,W.jsx)(cP,{propertyName:e,required:oP(S,e),schema:Q(S,[uD,e],{}),uiSchema:a,errorSchema:Q(i,[e]),fieldPathId:T,formData:Q(r,[e]),handleKeyRename:N,handleRemoveProperty:P,addedByAdditionalProperties:t,onChange:p,onBlur:d,onFocus:f,registry:m,disabled:c,readonly:l,hideError:u},e),name:e,readonly:l,disabled:c,required:s,hidden:o}}),readonly:l,disabled:c,required:s,fieldPathId:a,uiSchema:n,errorSchema:i,schema:S,formData:r,registry:m,optionalDataControl:I,className:O?`rjsf-optional-object-field`:void 0,onAddProperty:M})}function uP(e){let{schema:t,uiSchema:n={},formData:r,disabled:i=!1,readonly:a=!1,onChange:o,errorSchema:s,fieldPathId:c,registry:l}=e,{globalUiOptions:u={},schemaUtils:d,translateString:f}=l,p=uA(`OptionalDataControlsTemplate`,l,wD(n,u)),m=MA(r),h,g,_,v;return i||a?(h=jA(c,`Msg`),g=m?void 0:f(fj.OptionalObjectEmptyMsg)):(g=f(m?fj.OptionalObjectRemove:fj.OptionalObjectAdd),m?(h=jA(c,`Remove`),v=()=>o(void 0,c.path,s)):(h=jA(c,`Add`),_=()=>{let e=d.getDefaultFormState(t,r,`excludeObjectChildren`);e===void 0&&(e=FO(t)===`array`?[]:{}),o(e,c.path,s)})),g&&(0,W.jsx)(p,{id:h,registry:l,schema:t,uiSchema:n,label:g,onAddClick:_,onRemoveClick:v})}var dP={array:`ArrayField`,boolean:`BooleanField`,integer:`NumberField`,number:`NumberField`,object:`ObjectField`,string:`StringField`,null:`NullField`};function fP(e,t,n){let r=t.field,{fields:i}=n;if(typeof r==`function`)return r;if(typeof r==`string`&&r in i)return i[r];let a=FO(e),o=Array.isArray(a)?a[0]:a||``,s=e.$id,c=dP[o];return s&&s in i&&(c=s),!c&&(e.anyOf||e.oneOf)?()=>null:c in i?i[c]:i.FallbackField}function pP(e){let{schema:t,fieldPathId:n,uiSchema:r,formData:i,errorSchema:a,name:o,onChange:s,onKeyRename:c,onKeyRenameBlur:l,onRemoveProperty:u,required:d=!1,registry:f,wasPropertyKeyModified:p=!1}=e,{schemaUtils:m,globalFormOptions:h,globalUiOptions:g,fields:_}=f,{AnyOfField:v,OneOfField:y}=_,x=HA(t,r,f),S=wD(x,g),C=uA(`FieldTemplate`,f,S),w=uA(`DescriptionFieldTemplate`,f,S),T=uA(`FieldHelpTemplate`,f,S),E=uA(`FieldErrorTemplate`,f,S),D=m.retrieveSchema(t,i),O=n.$id,k=(0,b.useCallback)((e,t,n,r)=>s(e,t,n,r||O),[O,s]),A=fP(D,S,f),j=!!(S.disabled??e.disabled),M=!!(S.readonly??(e.readonly||e.schema.readOnly||D.readOnly)),N=S.hideError,P=N===void 0?e.hideError:!!N,F=!!(S.autofocus??e.autofocus);if(Object.keys(D).length===0)return null;let I=m.getDisplayLabel(D,x,g),L=S.field&&S.fieldReplacesAnyOrOneOf===!0,R,z,B={fieldPathId:n};if((`anyOf`in D||`oneOf`in D)&&!L&&!m.isSelect(D)){D.anyOf?(R=v,z=D[nD].map(e=>m.retrieveSchema(cg(e)?e:{},i))):D.oneOf&&(R=y,z=D[lD].map(e=>m.retrieveSchema(cg(e)?e:{},i)));let e=KA(f,D,d,x),t=MA(i);I&&=!e||t,B={childFieldPathId:n,fieldPathId:XA(`XxxOf`,h,n)}}let{__errors:V,...ee}=a||{},H=IC(x,[`ui:classNames`,`classNames`,`ui:style`]);`ui:options`in H&&(H[SD]=IC(H[SD],[`classNames`,`style`]));let te=(0,W.jsx)(A,{...e,onChange:k,...B,schema:D,uiSchema:H,disabled:j,readonly:M,hideError:P,autofocus:F,errorSchema:ee,rawErrors:V}),U=n.$id,ne;ne=p||`__additional_property`in D?o:S.title||e.schema.title||D.title||e.title||o;let re=S.description||e.schema.description||D.description||``,ie=S.help,ae=S.widget===`hidden`,oe=[`rjsf-field`,`rjsf-field-${FO(D)}`];!P&&V&&V.length>0&&oe.push(`rjsf-field-error`),S.classNames&&oe.push(S.classNames);let se=(0,W.jsx)(T,{help:ie,fieldPathId:n,schema:D,uiSchema:x,hasErrors:!P&&V&&V.length>0,registry:f}),ce=P||R&&!m.isSelect(D)?void 0:(0,W.jsx)(E,{errors:V,errorSchema:a,fieldPathId:n,schema:D,uiSchema:x,registry:f});return(0,W.jsx)(C,{description:(0,W.jsx)(w,{id:CA(U),description:re,schema:D,uiSchema:x,registry:f}),rawDescription:re,help:se,rawHelp:typeof ie==`string`?ie:void 0,errors:ce,rawErrors:P?void 0:V,fieldPathId:n,id:U,label:ne,hidden:ae,onChange:s,onKeyRename:c,onKeyRenameBlur:l,onRemoveProperty:u,required:d,disabled:j,readonly:M,hideError:P,displayLabel:I,classNames:oe.join(` `).trim(),style:S.style,formData:i,schema:D,uiSchema:x,registry:f,children:(0,W.jsxs)(W.Fragment,{children:[te,R&&(0,W.jsx)(R,{name:o,disabled:j,readonly:M,hideError:P,errorSchema:a,formData:i,fieldPathId:n,onBlur:e.onBlur,onChange:e.onChange,onFocus:e.onFocus,options:z,registry:f,required:d,schema:D,uiSchema:x})]})})}var mP=class extends b.Component{shouldComponentUpdate(e){let{registry:{globalFormOptions:t}}=this.props,{experimental_componentUpdateStrategy:n=`customDeep`}=t;return WA(this,e,this.state,n)}render(){return(0,W.jsx)(pP,{...this.props})}};function hP(e){let{schema:t,name:n,uiSchema:r,fieldPathId:i,formData:a,required:o,disabled:s=!1,readonly:c=!1,autofocus:l=!1,onChange:u,onBlur:d,onFocus:f,registry:p,rawErrors:m,hideError:h,title:g}=e,{title:_,format:v}=t,{widgets:y,schemaUtils:x,globalUiOptions:S}=p,C=x.isSelect(t)?Sk(t,r):void 0,w=C?`select`:`text`;v&&xA(t,v,y)&&(w=v);let{widget:T=w,placeholder:E=``,title:D,...O}=wD(r),k=x.getDisplayLabel(t,r,S),A=D??g??_??n,j=gA(t,T,y),M=(0,b.useCallback)((e,t,n)=>u(e,i.path,t,n),[u,i]);return(0,W.jsx)(j,{options:{...O,enumOptions:C},schema:t,uiSchema:r,id:i.$id,name:n,label:A,hideLabel:!k,hideError:h,value:a,onChange:M,onBlur:d,onFocus:f,required:o,disabled:s,readonly:c,autofocus:l,registry:p,placeholder:E,rawErrors:m,htmlName:i.name})}function gP(e){let{formData:t,onChange:n,fieldPathId:r}=e;return(0,b.useEffect)(()=>{t===void 0&&n(null,r.path)},[r,t,n]),null}function _P(){return{AnyOfField:iM,ArrayField:Dj,BooleanField:Oj,FallbackField:Mj,LayoutGridField:$j,LayoutHeaderField:eM,LayoutMultiSchemaField:rM,NumberField:sM,ObjectField:lP,OneOfField:iM,OptionalDataControlsField:uP,SchemaField:mP,StringField:hP,NullField:gP}}function vP(e){let{fieldPathId:t,description:n,registry:r,schema:i,uiSchema:a}=e,o=wD(a,r.globalUiOptions),{label:s=!0}=o;return!n||!s?null:(0,W.jsx)(uA(`DescriptionFieldTemplate`,r,o),{id:CA(t),description:n,schema:i,uiSchema:a,registry:r})}function yP(e){let{children:t,className:n,buttonsProps:r,displayLabel:i,hasDescription:a,hasToolbar:o,registry:s,uiSchema:c}=e,l=uA(`ArrayFieldItemButtonsTemplate`,s,wD(c)),u={flex:1,paddingLeft:6,paddingRight:6,fontWeight:`bold`},d=a?31:9,f={display:`flex`,alignItems:i?`center`:`baseline`},p={display:`flex`,justifyContent:`flex-end`,marginTop:i?`${d}px`:0};return(0,W.jsxs)(`div`,{className:n,style:f,children:[(0,W.jsx)(`div`,{className:o?`col-xs-9 col-md-10 col-xl-11`:`col-xs-12`,children:t}),o&&(0,W.jsx)(`div`,{className:`col-xs-3 col-md-2 col-xl-1 array-item-toolbox`,children:(0,W.jsx)(`div`,{className:`btn-group`,style:p,children:(0,W.jsx)(l,{...r,style:u})})})]})}function bP(e){let{disabled:t,hasCopy:n,hasMoveDown:r,hasMoveUp:i,hasRemove:a,fieldPathId:o,onCopyItem:s,onRemoveItem:c,onMoveDownItem:l,onMoveUpItem:u,readonly:d,registry:f,uiSchema:p}=e,{CopyButton:m,MoveDownButton:h,MoveUpButton:g,RemoveButton:_}=f.templates.ButtonTemplates;return(0,W.jsxs)(W.Fragment,{children:[(i||r)&&(0,W.jsx)(g,{id:AA(o,`moveUp`),className:`rjsf-array-item-move-up`,disabled:t||d||!i,onClick:u,uiSchema:p,registry:f}),(i||r)&&(0,W.jsx)(h,{id:AA(o,`moveDown`),className:`rjsf-array-item-move-down`,disabled:t||d||!r,onClick:l,uiSchema:p,registry:f}),n&&(0,W.jsx)(m,{id:AA(o,`copy`),className:`rjsf-array-item-copy`,disabled:t||d,onClick:s,uiSchema:p,registry:f}),a&&(0,W.jsx)(_,{id:AA(o,`remove`),className:`rjsf-array-item-remove`,disabled:t||d,onClick:c,uiSchema:p,registry:f})]})}function xP(e){let{canAdd:t,className:n,disabled:r,fieldPathId:i,uiSchema:a,items:o,optionalDataControl:s,onAddClick:c,readonly:l,registry:u,required:d,schema:f,title:p}=e,m=wD(a),h=uA(`ArrayFieldDescriptionTemplate`,u,m),g=uA(`ArrayFieldTitleTemplate`,u,m),_=!l&&!r,{ButtonTemplates:{AddButton:v}}=u.templates;return(0,W.jsxs)(`fieldset`,{className:n,id:i.$id,children:[(0,W.jsx)(g,{fieldPathId:i,title:m.title||p,required:d,schema:f,uiSchema:a,registry:u,optionalDataControl:_?s:void 0}),(0,W.jsx)(h,{fieldPathId:i,description:m.description||f.description,schema:f,uiSchema:a,registry:u}),_?void 0:s,(0,W.jsx)(`div`,{className:`row array-item-list`,children:o}),t&&(0,W.jsx)(v,{id:AA(i,`add`),className:`rjsf-array-item-add`,onClick:c,disabled:r||l,uiSchema:a,registry:u})]})}function SP(e){let{fieldPathId:t,title:n,schema:r,uiSchema:i,required:a,registry:o,optionalDataControl:s}=e,c=wD(i,o.globalUiOptions),{label:l=!0}=c;return!n||!l?null:(0,W.jsx)(uA(`TitleFieldTemplate`,o,c),{id:DA(t),title:n,required:a,schema:r,uiSchema:i,registry:o,optionalDataControl:s})}function CP(e){let{id:t,schema:n}=e,{examples:r,default:i}=n;return Array.isArray(r)?(0,W.jsx)(`datalist`,{id:TA(t),children:r.concat(i!==void 0&&!r.map(String).includes(String(i))?[i]:[]).map(e=>(0,W.jsx)(`option`,{value:e},String(e)))},`datalist_${t}`):null}function wP(e){let{id:t,name:n,htmlName:r,value:i,readonly:a,disabled:o,autofocus:s,onBlur:c,onFocus:l,onChange:u,onChangeOverride:d,options:f,schema:p,uiSchema:m,registry:h,rawErrors:g,type:_,hideLabel:v,hideError:y,...x}=e,{ClearButton:S}=h.templates.ButtonTemplates;if(!t)throw console.log(`No id for`,e),Error(`no id for props ${JSON.stringify(e)}`);let C={...x,...sA(p,_,f)},w;w=C.type===`number`||C.type===`integer`?i||i===0?i:``:i??``;let T=(0,b.useCallback)(({target:{value:e}})=>u(e===``?f.emptyValue:e),[u,f]),E=(0,b.useCallback)(({target:e})=>c(t,e&&e.value),[c,t]),D=(0,b.useCallback)(({target:e})=>l(t,e&&e.value),[l,t]),O=(0,b.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),u(f.emptyValue??``)},[u,f.emptyValue]);return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`input`,{id:t,name:r||t,className:`form-control`,readOnly:a,disabled:o,autoFocus:s,value:w,...C,list:p.examples?TA(t):void 0,onChange:d||T,onBlur:E,onFocus:D,"aria-describedby":OA(t,!!p.examples)}),f.allowClearTextInputs&&!a&&!o&&w&&(0,W.jsx)(S,{registry:h,onClick:O}),(0,W.jsx)(CP,{id:t,schema:p})]})}function TP({uiSchema:e}){let{submitText:t,norender:n,props:r={}}=lA(e);return n?null:(0,W.jsx)(`div`,{children:(0,W.jsx)(`button`,{type:`submit`,...r,className:`btn btn-info ${r.className||``}`,children:t})})}function EP(e){let{iconType:t=`default`,icon:n,className:r,uiSchema:i,registry:a,...o}=e;return(0,W.jsx)(`button`,{type:`button`,className:`btn btn-${t} ${r}`,...o,children:(0,W.jsx)(`i`,{className:`glyphicon glyphicon-${n}`})})}function DP(e){let{registry:{translateString:t}}=e;return(0,W.jsx)(EP,{title:t(fj.CopyButton),...e,icon:`copy`})}function OP(e){let{registry:{translateString:t}}=e;return(0,W.jsx)(EP,{title:t(fj.MoveDownButton),...e,icon:`arrow-down`})}function kP(e){let{registry:{translateString:t}}=e;return(0,W.jsx)(EP,{title:t(fj.MoveUpButton),...e,icon:`arrow-up`})}function AP(e){let{registry:{translateString:t}}=e;return(0,W.jsx)(EP,{title:t(fj.RemoveButton),...e,iconType:`danger`,icon:`remove`})}function jP({id:e,className:t,onClick:n,disabled:r,registry:i,...a}){let{translateString:o}=i;return(0,W.jsx)(EP,{id:e,iconType:`default`,icon:`remove`,className:`btn-clear col-xs-12`,title:o(fj.ClearButton),onClick:n,disabled:r,registry:i,...a})}function MP({id:e,className:t,onClick:n,disabled:r,registry:i}){let{translateString:a}=i;return(0,W.jsx)(`div`,{className:`row`,children:(0,W.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:(0,W.jsx)(EP,{id:e,iconType:`info`,icon:`plus`,className:`btn-add col-xs-12`,title:a(fj.AddButton),onClick:n,disabled:r,registry:i})})})}function NP(){return{SubmitButton:TP,AddButton:MP,CopyButton:DP,MoveDownButton:OP,MoveUpButton:kP,RemoveButton:AP,ClearButton:jP}}var PP=dA();function FP({description:e,registry:t,uiSchema:n={}}){let{globalUiOptions:r}=t;return wD(n,r).enableMarkdownInDescription&&typeof e==`string`?(0,W.jsx)(rP,{options:{disableParsingRawHTML:!0},"data-testid":PP.markdown,children:e}):e}FP.TEST_IDS=PP;function IP(e){let{id:t,description:n,registry:r,uiSchema:i}=e;return n?(0,W.jsx)(`div`,{id:t,className:`field-description`,children:(0,W.jsx)(FP,{description:n,registry:r,uiSchema:i})}):null}function LP({errors:e,registry:t}){let{translateString:n}=t;return(0,W.jsxs)(`div`,{className:`panel panel-danger errors`,children:[(0,W.jsx)(`div`,{className:`panel-heading`,children:(0,W.jsx)(`h3`,{className:`panel-title`,children:n(fj.ErrorsLabel)})}),(0,W.jsx)(`ul`,{className:`list-group`,children:e.map((e,t)=>(0,W.jsx)(`li`,{className:`list-group-item text-danger`,children:e.stack},t))})]})}function RP(e){let{schema:t,registry:n,typeSelector:r,schemaField:i}=e;return(0,W.jsx)(uA(`MultiSchemaFieldTemplate`,n),{selector:r,optionSchemaField:i,schema:t,registry:n})}var zP=`*`;function BP(e){let{label:t,required:n,id:r}=e;return t?(0,W.jsxs)(`label`,{className:`control-label`,htmlFor:r,children:[t,n&&(0,W.jsx)(`span`,{className:`required`,children:zP})]}):null}function VP(e){let{id:t,label:n,children:r,errors:i,help:a,description:o,hidden:s,required:c,displayLabel:l,registry:u,uiSchema:d}=e,f=wD(d),p=uA(`WrapIfAdditionalTemplate`,u,f);if(s)return(0,W.jsx)(`div`,{className:`hidden`,children:r});let m=f.widget===`checkbox`;return(0,W.jsxs)(p,{...e,children:[l&&!m&&(0,W.jsx)(BP,{label:n,required:c,id:t}),l&&o?o:null,r,i,a]})}var HP=VP;function UP(e){let{errors:t=[],fieldPathId:n}=e;return t.length===0?null:(0,W.jsx)(`div`,{children:(0,W.jsx)(`ul`,{id:wA(n),className:`error-detail bs-callout bs-callout-info`,children:t.filter(e=>!!e).map((e,t)=>(0,W.jsx)(`li`,{className:`text-danger`,children:e},t))})})}var WP=dA();function GP({help:e,registry:t,uiSchema:n={}}){let{globalUiOptions:r}=t;return wD(n,r).enableMarkdownInHelp&&typeof e==`string`?(0,W.jsx)(rP,{options:{disableParsingRawHTML:!0},"data-testid":WP.markdown,children:e}):e}GP.TEST_IDS=WP;function KP(e){let{fieldPathId:t,help:n,uiSchema:r,registry:i}=e;return n?(0,W.jsx)(`div`,{id:EA(t),className:`help-block`,children:(0,W.jsx)(GP,{help:n,registry:i,uiSchema:r})}):null}function qP(e){let{children:t,column:n,className:r,...i}=e;return(0,W.jsx)(`div`,{className:r,...i,children:t})}function JP(e){let{selector:t,optionSchemaField:n}=e;return(0,W.jsxs)(`div`,{className:`panel panel-default panel-body`,children:[(0,W.jsx)(`div`,{className:`form-group`,children:t}),n]})}function YP(e){let{className:t,description:n,disabled:r,formData:i,fieldPathId:a,onAddProperty:o,optionalDataControl:s,properties:c,readonly:l,registry:u,required:d,schema:f,title:p,uiSchema:m}=e,h=wD(m),g=uA(`TitleFieldTemplate`,u,h),_=uA(`DescriptionFieldTemplate`,u,h);if((f.oneOf||f.anyOf)&&!f.properties&&c.length===0)return null;let v=!l&&!r,{ButtonTemplates:{AddButton:y}}=u.templates;return(0,W.jsxs)(`fieldset`,{className:t,id:a.$id,children:[p&&(0,W.jsx)(g,{id:DA(a),title:p,required:d,schema:f,uiSchema:m,registry:u,optionalDataControl:v?s:void 0}),n&&(0,W.jsx)(_,{id:CA(a),description:n,schema:f,uiSchema:m,registry:u}),v?void 0:s,c.map(e=>e.content),TD(f,m,i)&&(0,W.jsx)(y,{id:AA(a,`add`),className:`rjsf-object-property-expand`,onClick:o,disabled:r||l,uiSchema:m,registry:u})]})}function XP(e){let{id:t,registry:n,label:r,onAddClick:i,onRemoveClick:a}=e;return i?(0,W.jsx)(EP,{id:t,registry:n,icon:`plus`,className:`rjsf-add-optional-data btn-sm`,onClick:i,title:r}):a?(0,W.jsx)(EP,{id:t,registry:n,icon:`remove`,className:`rjsf-remove-optional-data btn-sm`,onClick:a,title:r}):(0,W.jsx)(`em`,{id:t,children:r})}var ZP=`*`;function QP(e){let{id:t,title:n,required:r,optionalDataControl:i}=e;return(0,W.jsxs)(`legend`,{id:t,children:[n,r&&(0,W.jsx)(`span`,{className:`required`,children:ZP}),i&&(0,W.jsx)(`span`,{className:`pull-right`,style:{marginBottom:`2px`},children:i})]})}function $P(e){let{schema:t,fieldPathId:n,reason:r,registry:i}=e,{translateString:a}=i,o=fj.UnsupportedField,s=[];return n&&n.$id&&(o=fj.UnsupportedFieldWithId,s.push(n.$id)),r&&(o=o===fj.UnsupportedField?fj.UnsupportedFieldWithReason:fj.UnsupportedFieldWithIdAndReason,s.push(r)),(0,W.jsxs)(`div`,{className:`unsupported-field`,children:[(0,W.jsx)(`p`,{children:(0,W.jsx)(rP,{options:{disableParsingRawHTML:!0},children:a(o,s)})}),t&&(0,W.jsx)(`pre`,{children:JSON.stringify(t,null,2)})]})}function eF(e){let{id:t,classNames:n,style:r,disabled:i,displayLabel:a,label:o,onKeyRenameBlur:s,onRemoveProperty:c,rawDescription:l,readonly:u,required:d,schema:f,hideError:p,rawErrors:m,children:h,uiSchema:g,registry:_}=e,{templates:v,translateString:y}=_,{RemoveButton:b}=v.ButtonTemplates,x=y(fj.KeyLabel,[o]),S=$E in f,C=!!l,w=[`form-group`,n];!p&&m&&m.length>0&&w.push(`has-error has-danger`);let T=w.join(` `).trim();if(!S)return(0,W.jsx)(`div`,{className:T,style:r,children:h});let E=C?46:26;return(0,W.jsx)(`div`,{className:T,style:r,children:(0,W.jsxs)(`div`,{className:`row`,children:[(0,W.jsx)(`div`,{className:`col-xs-5 form-additional`,children:(0,W.jsxs)(`div`,{className:`form-group`,children:[a&&(0,W.jsx)(BP,{label:x,required:d,id:`${t}-key`}),a&&l&&(0,W.jsx)(`div`,{children:`\xA0`}),(0,W.jsx)(`input`,{className:`form-control`,type:`text`,id:`${t}-key`,onBlur:s,defaultValue:o})]})}),(0,W.jsx)(`div`,{className:`form-additional form-group col-xs-5`,children:h}),(0,W.jsx)(`div`,{className:`col-xs-2`,style:{marginTop:a?`${E}px`:void 0},children:(0,W.jsx)(b,{id:AA(t,`remove`),className:`rjsf-object-property-remove btn-block`,style:{border:`0`},disabled:i||u,onClick:c,uiSchema:g,registry:_})})]})})}function tF(){return{ArrayFieldDescriptionTemplate:vP,ArrayFieldItemTemplate:yP,ArrayFieldItemButtonsTemplate:bP,ArrayFieldTemplate:xP,ArrayFieldTitleTemplate:SP,ButtonTemplates:NP(),BaseInputTemplate:wP,DescriptionFieldTemplate:IP,ErrorListTemplate:LP,FallbackFieldTemplate:RP,FieldTemplate:HP,FieldErrorTemplate:UP,FieldHelpTemplate:KP,GridTemplate:qP,MultiSchemaFieldTemplate:JP,ObjectFieldTemplate:YP,OptionalDataControlsTemplate:XP,TitleFieldTemplate:QP,UnsupportedFieldTemplate:$P,WrapIfAdditionalTemplate:eF}}function nF(e){let{disabled:t=!1,readonly:n=!1,autofocus:r=!1,options:i,id:a,name:o,registry:s,onBlur:c,onFocus:l}=e,{translateString:u}=s,{elements:d,handleChange:f,handleClear:p,handleSetNow:m}=ej(e);return(0,W.jsxs)(`ul`,{className:`list-inline`,children:[d.map((e,i)=>(0,W.jsx)(`li`,{className:`list-inline-item`,children:(0,W.jsx)($A,{rootId:a,name:o,select:f,...e,disabled:t,readonly:n,registry:s,onBlur:c,onFocus:l,autofocus:r&&i===0})},i)),(i.hideNowButton===`undefined`?!0:!i.hideNowButton)&&(0,W.jsx)(`li`,{className:`list-inline-item`,children:(0,W.jsx)(`a`,{href:`#`,className:`btn btn-info btn-now`,onClick:m,children:u(fj.NowLabel)})}),(i.hideClearButton===`undefined`?!0:!i.hideClearButton)&&(0,W.jsx)(`li`,{className:`list-inline-item`,children:(0,W.jsx)(`a`,{href:`#`,className:`btn btn-warning btn-clear`,onClick:p,children:u(fj.ClearLabel)})})]})}function rF({time:e=!0,...t}){let{AltDateWidget:n}=t.registry.widgets;return(0,W.jsx)(n,{time:e,...t})}function iF({schema:e,uiSchema:t,options:n,id:r,value:i,disabled:a,readonly:o,label:s,hideLabel:c,autofocus:l=!1,onBlur:u,onFocus:d,onChange:f,registry:p,htmlName:m}){let h=uA(`DescriptionFieldTemplate`,p,n),g=UA(e),_=(0,b.useCallback)(e=>f(e.target.checked),[f]),v=(0,b.useCallback)(e=>u(r,e.target.checked),[u,r]),y=(0,b.useCallback)(e=>d(r,e.target.checked),[d,r]),x=wD(t).widget===`checkbox`?void 0:n.description??e.description;return(0,W.jsxs)(`div`,{className:`checkbox ${a||o?`disabled`:``}`,children:[!c&&x&&(0,W.jsx)(h,{id:CA(r),description:x,schema:e,uiSchema:t,registry:p}),(0,W.jsxs)(`label`,{children:[(0,W.jsx)(`input`,{type:`checkbox`,id:r,name:m||r,checked:i===void 0?!1:i,required:g,disabled:a||o,autoFocus:l,onChange:_,onBlur:v,onFocus:y,"aria-describedby":OA(r)}),PA((0,W.jsx)(`span`,{children:s}),c)]})]})}function aF({id:e,disabled:t,options:{inline:n=!1,enumOptions:r,enumDisabled:i,emptyValue:a},value:o,autofocus:s=!1,readonly:c,onChange:l,onBlur:u,onFocus:d,htmlName:f}){let p=Array.isArray(o)?o:[o],m=(0,b.useCallback)(({target:t})=>u(e,Qk(t&&t.value,r,a)),[u,e,r,a]),h=(0,b.useCallback)(({target:t})=>d(e,Qk(t&&t.value,r,a)),[d,e,r,a]);return(0,W.jsx)(`div`,{className:`checkboxes`,id:e,children:Array.isArray(r)&&r.map((a,o)=>{let u=eA(a.value,p),d=Array.isArray(i)&&i.indexOf(a.value)!==-1,g=t||d||c?`disabled`:``,_=(0,W.jsxs)(`span`,{children:[(0,W.jsx)(`input`,{type:`checkbox`,id:kA(e,o),name:f||e,checked:u,value:String(o),disabled:t||d||c,autoFocus:s&&o===0,onChange:e=>{e.target.checked?l(nA(o,p,r)):l($k(o,p,r))},onBlur:m,onFocus:h,"aria-describedby":OA(e)}),(0,W.jsx)(`span`,{children:a.label})]});return n?(0,W.jsx)(`label`,{className:`checkbox-inline ${g}`,children:_},o):(0,W.jsx)(`div`,{className:`checkbox ${g}`,children:(0,W.jsx)(`label`,{children:_})},o)})})}function oF(e){let{disabled:t,readonly:n,options:r,registry:i}=e;return(0,W.jsx)(uA(`BaseInputTemplate`,i,r),{type:`color`,...e,disabled:t||n})}function sF(e){let{onChange:t,options:n,registry:r}=e,i=uA(`BaseInputTemplate`,r,n),a=(0,b.useCallback)(e=>t(e||void 0),[t]);return(0,W.jsx)(i,{type:`date`,...e,onChange:a})}function cF(e){let{onChange:t,value:n,options:r,registry:i}=e;return(0,W.jsx)(uA(`BaseInputTemplate`,i,r),{type:`datetime-local`,...e,value:sj(n),onChange:e=>t(FA(e))})}function lF(e){let{options:t,registry:n}=e;return(0,W.jsx)(uA(`BaseInputTemplate`,n,t),{type:`email`,...e})}function uF({fileInfo:e,registry:t}){let{translateString:n}=t,{dataURL:r,type:i,name:a}=e;return r?[`image/jpeg`,`image/png`].includes(i)?(0,W.jsx)(`img`,{src:r,style:{maxWidth:`100%`},className:`file-preview`}):(0,W.jsxs)(W.Fragment,{children:[` `,(0,W.jsx)(`a`,{download:`preview-${a}`,href:r,className:`file-download`,children:n(fj.PreviewLabel)})]}):null}function dF({filesInfo:e,registry:t,preview:n,onRemove:r,options:i}){if(e.length===0)return null;let{translateString:a}=t,{RemoveButton:o}=uA(`ButtonTemplates`,t,i);return(0,W.jsx)(`ul`,{className:`file-info`,children:e.map((e,i)=>{let{name:s,size:c,type:l}=e;return(0,W.jsxs)(`li`,{children:[(0,W.jsx)(rP,{children:a(fj.FilesInfo,[s,l,String(c)])}),n&&(0,W.jsx)(uF,{fileInfo:e,registry:t}),(0,W.jsx)(o,{onClick:()=>r(i),registry:t})]},i)})})}function fF(e){let{disabled:t,readonly:n,required:r,multiple:i,onChange:a,value:o,options:s,registry:c}=e,{filesInfo:l,handleChange:u,handleRemove:d}=oj(o,a,i),f=uA(`BaseInputTemplate`,c,s),p=e=>{e.target.files&&u(e.target.files)};return(0,W.jsxs)(`div`,{children:[(0,W.jsx)(f,{...e,disabled:t||n,type:`file`,required:o?!1:r,onChangeOverride:p,value:``,accept:s.accept?String(s.accept):void 0}),(0,W.jsx)(dF,{filesInfo:l,onRemove:d,registry:c,preview:s.filePreview,options:s})]})}function pF({id:e,value:t,htmlName:n}){return(0,W.jsx)(`input`,{type:`hidden`,id:e,name:n||e,value:t===void 0?``:t})}function mF(e){let{options:t,registry:n}=e;return(0,W.jsx)(uA(`BaseInputTemplate`,n,t),{type:`password`,...e})}function hF({options:e,value:t,required:n,disabled:r,readonly:i,autofocus:a=!1,onBlur:o,onFocus:s,onChange:c,id:l,htmlName:u}){let{enumOptions:d,enumDisabled:f,inline:p,emptyValue:m}=e,h=(0,b.useCallback)(({target:e})=>o(l,Qk(e&&e.value,d,m)),[o,d,m,l]),g=(0,b.useCallback)(({target:e})=>s(l,Qk(e&&e.value,d,m)),[s,d,m,l]);return(0,W.jsx)(`div`,{className:`field-radio-group`,id:l,role:`radiogroup`,children:Array.isArray(d)&&d.map((e,o)=>{let s=eA(e.value,t),d=Array.isArray(f)&&f.indexOf(e.value)!==-1,m=r||d||i?`disabled`:``,_=(0,W.jsxs)(`span`,{children:[(0,W.jsx)(`input`,{type:`radio`,id:kA(l,o),checked:s,name:u||l,required:n,value:String(o),disabled:r||d||i,autoFocus:a&&o===0,onChange:()=>c(e.value),onBlur:h,onFocus:g,"aria-describedby":OA(l)}),(0,W.jsx)(`span`,{children:e.label})]});return p?(0,W.jsx)(`label`,{className:`radio-inline ${m}`,children:_},o):(0,W.jsx)(`div`,{className:`radio ${m}`,children:(0,W.jsx)(`label`,{children:_})},o)})})}function gF(e){let{value:t,registry:{templates:{BaseInputTemplate:n}}}=e;return(0,W.jsxs)(`div`,{className:`field-range-wrapper`,children:[(0,W.jsx)(n,{type:`range`,...e}),(0,W.jsx)(`span`,{className:`range-view`,children:t})]})}function _F({id:e,value:t,required:n,disabled:r,readonly:i,autofocus:a,onChange:o,onFocus:s,onBlur:c,schema:l,options:u,htmlName:d}){let{stars:f=5,shape:p=`star`}=u,m=l.maximum?Math.min(l.maximum,5):Math.min(Math.max(f,1),5),h=l.minimum||0,g=(0,b.useCallback)(e=>{!r&&!i&&o(e)},[o,r,i]),_=(0,b.useCallback)(t=>{s&&s(e,Number(t.target.dataset.value))},[s,e]),v=(0,b.useCallback)(t=>{c&&c(e,Number(t.target.dataset.value))},[c,e]),y=e=>p===`heart`?e?`♥`:`♡`:e?`★`:`☆`;return(0,W.jsx)(W.Fragment,{children:(0,W.jsxs)(`div`,{className:`rating-widget`,style:{display:`inline-flex`,fontSize:`1.5rem`,cursor:r||i?`default`:`pointer`},children:[[...Array(m)].map((e,n)=>{let a=h+n,o=a<=t;return(0,W.jsx)(`span`,{onClick:()=>g(a),onFocus:_,onBlur:v,"data-value":a,tabIndex:r||i?-1:0,role:`radio`,"aria-checked":a===t,"aria-label":`${a} ${p===`heart`?`heart`:`star`}${a===1?``:`s`}`,style:{color:o?`#FFD700`:`#ccc`,padding:`0 0.2rem`,transition:`color 0.2s`,userSelect:`none`},children:y(o)},n)}),(0,W.jsx)(`input`,{type:`hidden`,id:e,name:d||e,value:t||``,required:n,disabled:r||i,"aria-hidden":`true`})]})})}function vF(e,t){return t?Array.from(e.target.options).slice().filter(e=>e.selected).map(e=>e.value):e.target.value}function yF({schema:e,id:t,options:n,value:r,required:i,disabled:a,readonly:o,multiple:s=!1,autofocus:c=!1,onChange:l,onBlur:u,onFocus:d,placeholder:f,htmlName:p}){let{enumOptions:m,enumDisabled:h,emptyValue:g}=n,_=s?[]:``,v=(0,b.useCallback)(e=>d(t,Qk(vF(e,s),m,g)),[d,t,s,m,g]),y=(0,b.useCallback)(e=>u(t,Qk(vF(e,s),m,g)),[u,t,s,m,g]),x=(0,b.useCallback)(e=>l(Qk(vF(e,s),m,g)),[l,s,m,g]),S=tA(r,m,s),C=!s&&e.default===void 0;return(0,W.jsxs)(`select`,{id:t,name:p||t,multiple:s,role:`combobox`,className:`form-control`,value:S===void 0?_:S,required:i,disabled:a||o,autoFocus:c,onBlur:y,onFocus:v,onChange:x,"aria-describedby":OA(t),children:[C&&(0,W.jsx)(`option`,{value:``,children:f}),Array.isArray(m)&&m.map(({value:e,label:t},n)=>{let r=h&&h.indexOf(e)!==-1;return(0,W.jsx)(`option`,{value:String(n),disabled:r,children:t},n)})]})}function bF({id:e,options:t={},placeholder:n,value:r,required:i,disabled:a,readonly:o,autofocus:s=!1,onChange:c,onBlur:l,onFocus:u,htmlName:d}){let f=(0,b.useCallback)(({target:{value:e}})=>c(e===``?t.emptyValue:e),[c,t.emptyValue]),p=(0,b.useCallback)(({target:t})=>l(e,t&&t.value),[l,e]),m=(0,b.useCallback)(({target:t})=>u(e,t&&t.value),[e,u]);return(0,W.jsx)(`textarea`,{id:e,name:d||e,className:`form-control`,value:r||``,placeholder:n,required:i,disabled:a,readOnly:o,autoFocus:s,rows:t.rows,onBlur:p,onFocus:m,onChange:f,"aria-describedby":OA(e)})}function xF(e){let{options:t,registry:n}=e;return(0,W.jsx)(uA(`BaseInputTemplate`,n,t),{...e})}function SF(e){let{onChange:t,options:n,registry:r}=e,i=uA(`BaseInputTemplate`,r,n),a=(0,b.useCallback)(e=>t(e?`${e}:00`:void 0),[t]);return(0,W.jsx)(i,{type:`time`,...e,onChange:a})}function CF(e){let{options:t,registry:n}=e;return(0,W.jsx)(uA(`BaseInputTemplate`,n,t),{type:`url`,...e})}function wF(e){let{options:t,registry:n}=e;return(0,W.jsx)(uA(`BaseInputTemplate`,n,t),{type:`number`,...e})}function TF(){return{AltDateWidget:nF,AltDateTimeWidget:rF,CheckboxWidget:iF,CheckboxesWidget:aF,ColorWidget:oF,DateWidget:sF,DateTimeWidget:cF,EmailWidget:lF,FileWidget:fF,HiddenWidget:pF,PasswordWidget:mF,RadioWidget:hF,RangeWidget:gF,RatingWidget:_F,SelectWidget:yF,TextWidget:xF,TextareaWidget:bF,TimeWidget:SF,UpDownWidget:wF,URLWidget:CF}}function EF(){return{fields:_P(),templates:tF(),widgets:TF(),rootSchema:{},formContext:{},translateString:Zk,globalFormOptions:{idPrefix:gD,idSeparator:`_`,useFallbackUiForUnsupportedType:!1}}}function DF(e,t){return{...VC(e,[`schema`,`uiSchema`,`fieldPathId`,`schemaUtils`,`formData`,`edit`,`errors`,`errorSchema`]),...t!==void 0&&{status:t}}}var OF=class extends b.Component{formElement;pendingChanges=[];_isProcessingUserChange=!1;static getDerivedStateFromProps(e,t){if(e.extraErrors!==t._prevExtraErrors){let n={errors:t.schemaValidationErrors||[],errorSchema:t.schemaValidationErrorSchema||{}},{errors:r,errorSchema:i}=n;return e.extraErrors&&({errors:r,errorSchema:i}=cj(n,e.extraErrors)),t.customErrors&&({errors:r,errorSchema:i}=cj({errors:r,errorSchema:i},t.customErrors.ErrorSchema,!0)),{_prevExtraErrors:e.extraErrors,errors:r,errorSchema:i}}return null}constructor(e){if(super(e),!e.validator)throw Error(`A validator is required for Form functionality to work`);let{formData:t,initialFormData:n,onChange:r}=e,i=t??n;this.state={...this.getStateFromProps(e,i,void 0,void 0,void 0,!0),_prevExtraErrors:e.extraErrors},r&&!DD(this.state.formData,i)&&r(DF(this.state)),this.formElement=(0,b.createRef)()}getSnapshotBeforeUpdate(e,t){if(!DD(this.props,e)){let n=iA(this.props.formData,e.formData),r=iA(this.props.formData,this.state.formData),i=!DD(e.schema,this.props.schema),a=n.length>0||!DD(e.formData,this.props.formData),o=r.length>0||!DD(this.state.formData,this.props.formData),s=this.getStateFromProps(this.props,this.props.formData,i||a?void 0:this.state.retrievedSchema,i,n,!o);return{nextState:s,shouldUpdate:!DD(s,t)}}return{shouldUpdate:!1}}componentDidUpdate(e,t,n){if(n.shouldUpdate){let{nextState:e}=n,r=!DD(e.formData,this.props.formData),i=this._isProcessingUserChange;if(this._isProcessingUserChange=!1,i&&r)return;r&&!DD(e.formData,t.formData)&&this.props.onChange&&this.props.onChange(DF(e)),this.setState(e)}}getStateFromProps(e,t,n,r=!1,i=[],a=!1){let o=this.state||{},s=`schema`in e?e.schema:this.props.schema,c=`validator`in e?e.validator:this.props.validator,l=(`uiSchema`in e?e.uiSchema:this.props.uiSchema)||{},u=e.formData===void 0&&this.props.formData===void 0,d=t!==void 0,f=`liveValidate`in e?e.liveValidate:this.props.liveValidate,p=d&&!e.noValidate&&f,m=`experimental_defaultFormStateBehavior`in e?e.experimental_defaultFormStateBehavior:this.props.experimental_defaultFormStateBehavior,h=`experimental_customMergeAllOf`in e?e.experimental_customMergeAllOf:this.props.experimental_customMergeAllOf,g=o.schemaUtils;(!g||g.doesSchemaUtilsDiffer(c,s,m,h))&&(g=Gk(c,s,m,h));let _=g.getRootSchema(),v=t;t===aP?v=void 0:t===void 0&&u&&(v=o.formData);let y=g.getDefaultFormState(_,v,!1,o.initialDefaultsGenerated),b=this.updateRetrievedSchema(n??g.retrieveSchema(_,y)),x=()=>e.noValidate||r?{errors:[],errorSchema:{}}:e.liveValidate?{errors:o.errors||[],errorSchema:o.errorSchema||{}}:{errors:o.schemaValidationErrors||[],errorSchema:o.schemaValidationErrorSchema||{}},S,C,w=o.schemaValidationErrors,T=o.schemaValidationErrorSchema;if(p&&!a){let e=this.liveValidate(_,g,o.errorSchema,y,void 0,o.customErrors,n,n!==void 0);S=e.errors,C=e.errorSchema,w=e.schemaValidationErrors,T=e.schemaValidationErrorSchema}else{let t=x();if(S=t.errors,C=t.errorSchema,i.length>0&&!p){let e=i.reduce((e,t)=>(e[t]=void 0,e),{});C=T=hk(t.errorSchema,e,`preventDuplicates`)}let n=this.mergeErrors({errorSchema:C,errors:S},e.extraErrors,o.customErrors);S=n.errors,C=n.errorSchema}let E=this.getRegistry(e,_,g),D=DD(o.registry,E)?o.registry:E,O=D.uiSchemaDefinitions?VA(_,l,D):l,k=o.fieldPathId&&o.fieldPathId?.$id===D.globalFormOptions.idPrefix?o.fieldPathId:XA(``,D.globalFormOptions);return{schemaUtils:g,schema:_,uiSchema:O,fieldPathId:k,formData:y,edit:d,errors:S,errorSchema:C,schemaValidationErrors:w,schemaValidationErrorSchema:T,retrievedSchema:b,initialDefaultsGenerated:!0,registry:D}}shouldComponentUpdate(e,t){let{experimental_componentUpdateStrategy:n=`customDeep`}=this.props;return WA(this,e,t,n)}validate(e,t=this.state.schema,n,r){let i=n||this.state.schemaUtils,{customValidate:a,transformErrors:o,uiSchema:s}=this.props,c=r??i.retrieveSchema(t,e);return i.getValidator().validateFormData(e,c,a,o,s)}renderErrors(e){let{errors:t,errorSchema:n,schema:r,uiSchema:i}=this.state,a=uA(`ErrorListTemplate`,e,wD(i));return t&&t.length?(0,W.jsx)(a,{errors:t,errorSchema:n||{},schema:r,uiSchema:i,registry:e}):null}mergeErrors(e,t,n){let r=e.errorSchema,i=e.errors;if(t){let n=cj(e,t);r=n.errorSchema,i=n.errors}if(n){let e=cj({errors:i,errorSchema:r},n.ErrorSchema,!0);r=e.errorSchema,i=e.errors}return{errors:i,errorSchema:r}}liveValidate(e,t,n,r,i,a,o,s=!1){let c=this.validate(r,e,t,o),l=c.errors,u=c.errorSchema;s&&(u=hk(n,c.errorSchema,`preventDuplicates`));let d=l,f=u;return{...this.mergeErrors({errorSchema:u,errors:l},i,a),schemaValidationErrors:d,schemaValidationErrorSchema:f}}getUsedFormData=(e,t)=>zk(e,t);getFieldNames=(e,t)=>Bk(e,t);omitExtraData=e=>{let{schema:t,schemaUtils:n}=this.state;return n.omitExtraData(t,e)};setFieldValue=(e,t)=>{let{registry:n}=this.state,r=Array.isArray(e)?e:e.split(`.`),i=XA(``,n.globalFormOptions,r);this.onChange(t,r,void 0,i.$id)};onChange=(e,t,n,r)=>{this.pendingChanges.push({newValue:e,path:t,newErrorSchema:n,id:r}),this.pendingChanges.length===1&&this.processPendingChange()};processPendingChange(){if(this.pendingChanges.length===0)return;this._isProcessingUserChange=!0;let{newValue:e,path:t,id:n}=this.pendingChanges[0],{newErrorSchema:r}=this.pendingChanges[0],{extraErrors:i,omitExtraData:a,liveOmit:o,noValidate:s,liveValidate:c,onChange:l}=this.props,{formData:u,schemaUtils:d,schema:f,fieldPathId:p,schemaValidationErrorSchema:m,errors:h}=this.state,{customErrors:g,errorSchema:_}=this.state,v=p.path[0]||``,y=!t||t.length===0||t.length===1&&t[0]===v,b=this.state.retrievedSchema,x=y?e:Rx(u),S=XE(x)&&Object.keys(x).length>0&&Object.values(x).every(e=>e===void 0)&&u==null?void 0:x;if(XE(x)||Array.isArray(x)){e===iP?aw(x,t):y||WC(x,t,e);let n=this.getStateFromProps(this.props,S,void 0,void 0,void 0,!0);x=n.formData,b=n.retrievedSchema}let C=!s&&(c===!0||c===`onChange`),w={formData:x,schema:f},T=x;if(a===!0&&(o===!0||o===`onChange`)&&(T=this.omitExtraData(x),w={formData:T}),r)if(!SC(y?m:Q(m,t)))y?_=r:WC(_,t,r);else if(g||=new rA,y){let e=Q(r,aD);e&&g.setErrors(e)}else WC(g.ErrorSchema,t,r);else g&&Q(g.ErrorSchema,[...t,`__errors`])&&g.clearErrors(t);if(C&&this.pendingChanges.length===1){let e=this.liveValidate(f,d,_,T,i,g,b);w={formData:T,...e,customErrors:g}}else if(!s&&r){let e=this.mergeErrors({errorSchema:_,errors:h},i,g);w={formData:T,...e,customErrors:g}}this.setState(w,()=>{l&&l(DF({...this.state,...w}),n),this.pendingChanges.shift(),this.processPendingChange()})}updateRetrievedSchema(e){return DD(e,this.state?.retrievedSchema)?this.state.retrievedSchema:e}reset=()=>{let{formData:e,initialFormData:t=aP,onChange:n}=this.props,r={formData:this.getStateFromProps(this.props,e??t,void 0,void 0,void 0,!0).formData,errorSchema:{},errors:[],schemaValidationErrors:[],schemaValidationErrorSchema:{},initialDefaultsGenerated:!1,customErrors:void 0};this.setState(r,()=>n&&n(DF({...this.state,...r})))};onBlur=(e,t)=>{let{onBlur:n,omitExtraData:r,liveOmit:i,liveValidate:a}=this.props;if(n&&n(e,t),r===!0&&i===`onBlur`||a===`onBlur`){let{onChange:t,extraErrors:n}=this.props,{formData:o}=this.state,s=o,c={formData:s};if(r===!0&&i===`onBlur`&&(s=this.omitExtraData(o),c={formData:s}),a===`onBlur`){let{schema:e,schemaUtils:t,errorSchema:r,customErrors:i,retrievedSchema:a}=this.state,o=this.liveValidate(e,t,r,s,n,i,a);c={formData:s,...o,customErrors:i}}let l=Object.keys(c).filter(e=>!e.startsWith(`schemaValidation`)).some(e=>!DD(Q(this.state,e),Q(c,e)));this.setState(c,()=>{t&&l&&t(DF({...this.state,...c}),e)})}};onFocus=(e,t)=>{let{onFocus:n}=this.props;n&&n(e,t)};onSubmit=e=>{if(e.preventDefault(),e.target!==e.currentTarget)return;e.persist();let{omitExtraData:t,extraErrors:n,noValidate:r,onSubmit:i}=this.props,{formData:a}=this.state;if(t===!0&&(a=this.omitExtraData(a)),r||this.validateFormWithFormData(a)){let t=n||{},r=n?JA(n):[];this.setState({formData:a,errors:r,errorSchema:t,schemaValidationErrors:[],schemaValidationErrorSchema:{}},()=>{i&&i(DF({...this.state,formData:a},`submitted`),e)})}};getGlobalFormOptions(e){let{uiSchema:t={},experimental_componentUpdateStrategy:n,idSeparator:r=`_`,idPrefix:i=gD,nameGenerator:a,useFallbackUiForUnsupportedType:o=!1}=e;return{idPrefix:t[`ui:rootFieldId`]||i,idSeparator:r,useFallbackUiForUnsupportedType:o,...n!==void 0&&{experimental_componentUpdateStrategy:n},...a!==void 0&&{nameGenerator:a}}}getRegistry(e,t,n){let{translateString:r,uiSchema:i={}}=e,{fields:a,templates:o,widgets:s,formContext:c,translateString:l}=EF();return{fields:{...a,...e.fields},templates:{...o,...e.templates,ButtonTemplates:{...o.ButtonTemplates,...e.templates?.ButtonTemplates}},widgets:{...s,...e.widgets},rootSchema:t,formContext:e.formContext||c,schemaUtils:n,translateString:r||l,globalUiOptions:i[CD],globalFormOptions:this.getGlobalFormOptions(e),uiSchemaDefinitions:i[`ui:definitions`]??{}}}submit=()=>{if(this.formElement.current){let e=new CustomEvent(`submit`,{cancelable:!0});e.preventDefault(),this.formElement.current.dispatchEvent(e),this.formElement.current.requestSubmit()}};focusOnError(e){let{idPrefix:t=`root`,idSeparator:n=`_`}=this.props,{property:r}=e,i=XC(r);i[0]===``?i[0]=t:i.unshift(t);let a=i.join(n),o=this.formElement.current.elements[a];o||=this.formElement.current.querySelector(`input[id^="${a}"`),o&&o.length&&(o=o[0]),o&&o.focus()}validateFormWithFormData=e=>{let{extraErrors:t,extraErrorsBlockSubmit:n,focusOnFirstError:r,onError:i}=this.props,{errors:a}=this.state,o=this.validate(e),{errors:s,errorSchema:c}=t?this.mergeErrors(o,t):o,l=o.errors.length>0||t&&n;return l?(r&&(typeof r==`function`?r(s[0]):this.focusOnError(s[0])),this.setState({errors:s,errorSchema:c,schemaValidationErrors:o.errors,schemaValidationErrorSchema:o.errorSchema},()=>{i?i(s):console.error(`Form validation failed`,s)})):s.length>0?this.setState({errors:s,errorSchema:c,schemaValidationErrors:[],schemaValidationErrorSchema:{}}):a.length>0&&this.setState({errors:[],errorSchema:{},schemaValidationErrors:[],schemaValidationErrorSchema:{}}),!l};validateForm(){let{omitExtraData:e}=this.props,{formData:t}=this.state;return e===!0&&(t=this.omitExtraData(t)),this.validateFormWithFormData(t)}render(){let{children:e,id:t,className:n=``,tagName:r,name:i,method:a,target:o,action:s,autoComplete:c,enctype:l,acceptCharset:u,noHtml5Validate:d=!1,disabled:f,readonly:p,showErrorList:m=`top`,_internalFormWrapper:h}=this.props,{schema:g,uiSchema:_,formData:v,errorSchema:y,fieldPathId:b,registry:x}=this.state,{SchemaField:S}=x.fields,{SubmitButton:C}=x.templates.ButtonTemplates,w=h?r:void 0,T=h||r||`form`,{[pD]:E={}}=wD(_);f&&(E={...E,props:{...E.props,disabled:!0}});let D={[SD]:{[pD]:E}};return(0,W.jsxs)(T,{className:n||`rjsf`,id:t,name:i,method:a,target:o,action:s,autoComplete:c,encType:l,acceptCharset:u,noValidate:d,onSubmit:this.onSubmit,as:w,ref:this.formElement,children:[m===`top`&&this.renderErrors(x),(0,W.jsx)(S,{name:``,schema:g,uiSchema:_,errorSchema:y,fieldPathId:b,formData:v,onChange:this.onChange,onBlur:this.onBlur,onFocus:this.onFocus,registry:x,disabled:f,readonly:p}),e||(0,W.jsx)(C,{uiSchema:D,registry:x}),m===`bottom`&&this.renderErrors(x)]})}};function kF(e){return(0,b.forwardRef)(({fields:t,widgets:n,templates:r,...i},a)=>(t={...e?.fields,...t},n={...e?.widgets,...n},r={...e?.templates,...r,ButtonTemplates:{...e?.templates?.ButtonTemplates,...r?.ButtonTemplates}},(0,W.jsx)(OF,{...e,...i,fields:t,widgets:n,templates:r,ref:a})))}var AF=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(e,t){return{validate:e,compare:t}}e.fullFormats={date:t(a,o),time:t(c,l),"date-time":t(d,f),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:h,"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:w,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:_,int32:{type:`number`,validate:b},int64:{type:`number`,validate:x},float:{type:`number`,validate:S},double:{type:`number`,validate:S},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,o),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,l),"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,f),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(e){return e%4==0&&(e%100!=0||e%400==0)}var r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function a(e){let t=r.exec(e);if(!t)return!1;let a=+t[1],o=+t[2],s=+t[3];return o>=1&&o<=12&&s>=1&&s<=(o===2&&n(a)?29:i[o])}function o(e,t){if(e&&t)return e>t?1:e<t?-1:0}var s=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function c(e,t){let n=s.exec(e);if(!n)return!1;let r=+n[1],i=+n[2],a=+n[3],o=n[5];return(r<=23&&i<=59&&a<=59||r===23&&i===59&&a===60)&&(!t||o!==``)}function l(e,t){if(!(e&&t))return;let n=s.exec(e),r=s.exec(t);if(n&&r)return e=n[1]+n[2]+n[3]+(n[4]||``),t=r[1]+r[2]+r[3]+(r[4]||``),e>t?1:e<t?-1:0}var u=/t|\s/i;function d(e){let t=e.split(u);return t.length===2&&a(t[0])&&c(t[1],!0)}function f(e,t){if(!(e&&t))return;let[n,r]=e.split(u),[i,a]=t.split(u),s=o(n,i);if(s!==void 0)return s||l(r,a)}var p=/\/|:/,m=/^(?:[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 h(e){return p.test(e)&&m.test(e)}var g=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function _(e){return g.lastIndex=0,g.test(e)}var v=-(2**31),y=2**31-1;function b(e){return Number.isInteger(e)&&e<=y&&e>=v}function x(e){return Number.isInteger(e)}function S(){return!0}var C=/[^\\]\\Z/;function w(e){if(C.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}})),jF=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.formatLimitDefinition=void 0;var t=cE(),n=Iw(),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}};e.formatLimitDefinition={keyword:Object.keys(i),type:`string`,schemaType:`string`,$data:!0,error:{message:({keyword:e,schemaCode:t})=>n.str`should be ${i[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>n._`{comparison: ${i[e].okStr}, limit: ${t}}`},code(e){let{gen:r,data:a,schemaCode:o,keyword:s,it:c}=e,{opts:l,self:u}=c;if(!l.validateFormats)return;let d=new t.KeywordCxt(c,u.RULES.all.format.definition,`format`);d.$data?f():p();function f(){let t=r.scopeValue(`formats`,{ref:u.formats,code:l.code.formats}),i=r.const(`fmt`,n._`${t}[${d.schemaCode}]`);e.fail$data(n.or(n._`typeof ${i} != "object"`,n._`${i} instanceof RegExp`,n._`typeof ${i}.compare != "function"`,m(i)))}function p(){let t=d.schema,i=u.formats[t];if(!i||i===!0)return;if(typeof i!=`object`||i instanceof RegExp||typeof i.compare!=`function`)throw Error(`"${s}": format "${t}" does not define "compare" function`);let a=r.scopeValue(`formats`,{key:t,ref:i,code:l.code.formats?n._`${l.code.formats}${n.getProperty(t)}`:void 0});e.fail$data(m(a))}function m(e){return n._`${e}.compare(${a}, ${o}) ${i[s].fail} 0`}},dependencies:[`format`]},e.default=t=>(t.addKeyword(e.formatLimitDefinition),t)})),MF=u(s(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0});var n=AF(),r=jF(),i=Iw(),a=new i.Name(`fullFormats`),o=new i.Name(`fastFormats`),s=(e,t={keywords:!0})=>{if(Array.isArray(t))return c(e,t,n.fullFormats,a),e;let[i,s]=t.mode===`fast`?[n.fastFormats,o]:[n.fullFormats,a];return c(e,t.formats||n.formatNames,i,s),t.keywords&&r.default(e),e};s.get=(e,t=`full`)=>{let r=(t===`fast`?n.fastFormats:n.fullFormats)[e];if(!r)throw Error(`Unknown format "${e}"`);return r};function c(e,t,n,r){var a;(a=e.opts.code).formats??(a.formats=i._`require("ajv-formats/dist/formats").${r}`);for(let r of t)e.addFormat(r,n[r])}t.exports=e=s,Object.defineProperty(e,`__esModule`,{value:!0}),e.default=s}))(),1),NF={allErrors:!0,multipleOfPrecision:8,strict:!1,verbose:!0,discriminator:!1},PF=/^(#?([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*\)))$/,FF=/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/;function IF(e,t,n={},r,i=fE.default,a){let o=new i({...NF,...n});return r?(0,MF.default)(o,r):r!==!1&&(0,MF.default)(o),o.addFormat(`data-url`,FF),o.addFormat(`color`,PF),o.addKeyword($E),o.addKeyword(bD),Array.isArray(e)&&o.addMetaSchema(e),cg(t)&&Object.keys(t).forEach(e=>{o.addFormat(e,t[e])}),a&&(o=a(o)),o}function LF(e=[],t){return e.map(e=>{let{instancePath:n,keyword:r,params:i,schemaPath:a,parentSchema:o,...s}=e,{message:c=``}=s,l=n.replace(/\//g,`.`),u=`${l} ${c}`.trim(),d=``,f=[...i.deps?.split(`, `)||[],i.missingProperty,i.property].filter(e=>e);if(f.length>0)f.forEach(e=>{let n=wD(Q(t,`${(l?`${l}.${e}`:e).replace(/^\./,``)}`)).title;if(n===void 0&&(n=wD(Q(t,a.replace(/\/properties\//g,`/`).split(`/`).slice(1,-1).concat([e]))).title),n)c=c.replace(`'${e}'`,`'${n}'`),d=n;else{let t=Q(o,[uD,e,`title`]);t&&(c=c.replace(`'${e}'`,`'${t}'`),d=t)}}),u=c;else{let e=wD(Q(t,`${l.replace(/^\./,``)}`)).title;if(e)u=`'${e}' ${c}`.trim(),d=e;else{let e=o?.title;e&&(u=`'${e}' ${c}`.trim(),d=e)}}return`missingProperty`in i&&(l=l?`${l}.${i.missingProperty}`:i.missingProperty),{name:r,property:l,message:c,params:i,stack:u,schemaPath:a,title:d}}).reduce((e,t)=>{let{message:n,schemaPath:r}=t,i=r?.indexOf(`/${nD}/`),a=r?.indexOf(`/${lD}/`),o;return i&&i>=0?o=r?.substring(0,i):a&&a>=0&&(o=r?.substring(0,a)),o&&e.find(e=>e.message===n&&e.schemaPath?.startsWith(o))||e.push(t),e},[])}function RF(e,t,n,r,i,a,o){let{validationError:s}=t,c=LF(t.errors,o);s&&(c=[...c,{stack:s.message}]),typeof a==`function`&&(c=a(c,o));let l=YA(c);if(s&&(l={...l,$schema:{__errors:[s.message]}}),typeof i!=`function`)return{errors:c,errorSchema:l};let u=Nk(e,r,n,r,!0),d=ZA(i(u,ED(u),o,l));return cj({errors:c,errorSchema:l},d)}var zF=class{constructor(e,t){let{additionalMetaSchemas:n,customFormats:r,ajvOptionsOverrides:i,ajvFormatOptions:a,AjvClass:o,extenderFn:s}=e;this.ajv=IF(n,r,i,a,o,s),this.localizer=t}reset(){this.ajv.removeSchema()}rawValidation(e,t){let n,r;try{e.$id&&(r=this.ajv.getSchema(e.$id)),r===void 0&&(r=this.ajv.compile(e)),r(t)}catch(e){n=e}let i;return r&&(typeof this.localizer==`function`&&((r.errors??[]).forEach(e=>{[`missingProperty`,`property`].forEach(t=>{e.params?.[t]&&(e.params[t]=`'${e.params[t]}'`)}),e.params?.deps&&(e.params.deps=e.params.deps.split(`, `).map(e=>`'${e}'`).join(`, `))}),this.localizer(r.errors),(r.errors??[]).forEach(e=>{[`missingProperty`,`property`].forEach(t=>{e.params?.[t]&&(e.params[t]=e.params[t].slice(1,-1))}),e.params?.deps&&(e.params.deps=e.params.deps.split(`, `).map(e=>e.slice(1,-1)).join(`, `))})),i=r.errors||void 0,r.errors=null),{errors:i,validationError:n}}validateFormData(e,t,n,r,i){let a=this.rawValidation(t,e);return RF(this,a,e,t,n,r,i)}handleSchemaUpdate(e){let t=e.$id??xD;this.ajv.getSchema(t)===void 0?this.ajv.addSchema(e,t):DD(e,this.ajv.getSchema(t)?.schema)||(this.ajv.removeSchema(t),this.ajv.addSchema(e,t))}isValid(e,t,n){try{this.handleSchemaUpdate(n);let r=dj(e),i=r.$id??bA(r),a;return a=this.ajv.getSchema(i),a===void 0&&(a=this.ajv.addSchema(r,i).getSchema(i)||this.ajv.compile(r)),a(t)}catch(e){return console.warn(`Error encountered compiling schema:`,e),!1}}};function BF(e={},t){return new zF(e,t)}var VF=BF(),HF=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),UF=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),WF=e=>{let t=UF(e);return t.charAt(0).toUpperCase()+t.slice(1)},GF=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),KF=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0},qF={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`},JF=(0,b.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,b.createElement)(`svg`,{ref:c,...qF,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:GF(`lucide`,i),...!a&&!KF(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,b.createElement)(e,t)),...Array.isArray(a)?a:[a]])),YF=(e,t)=>{let n=(0,b.forwardRef)(({className:n,...r},i)=>(0,b.createElement)(JF,{ref:i,iconNode:t,className:GF(`lucide-${HF(WF(e))}`,`lucide-${e}`,n),...r}));return n.displayName=WF(e),n},XF=YF(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),ZF=YF(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),QF=YF(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),$F=YF(`circle-alert`,[[`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`}]]),eI=YF(`circle-plus`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M8 12h8`,key:`1wcyev`}],[`path`,{d:`M12 8v8`,key:`napkw2`}]]),tI=YF(`circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),nI=YF(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),rI=YF(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),iI=YF(`trash-2`,[[`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`}]]),aI=YF(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]);function oI(...e){return vr(qt(e))}var sI=qr(`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 cI({className:e,variant:t,size:n,asChild:r=!1,...i}){return(0,W.jsx)(r?ni:`button`,{"data-slot":`button`,className:oI(sI({variant:t,size:n,className:e})),...i})}function lI({uiSchema:e,registry:t,className:n,...r}){let{translateString:i}=t;return(0,W.jsx)(`div`,{className:`p-0 m-0`,children:(0,W.jsxs)(cI,{...r,className:oI(`w-fit gap-2`,n),variant:`outline`,type:`button`,children:[(0,W.jsx)(eI,{size:16}),` `,i(fj.AddItemButton)]})})}function uI(e){let{children:t,buttonsProps:n,displayLabel:r,hasDescription:i,hasToolbar:a,uiSchema:o,registry:s}=e,c=uA(`ArrayFieldItemButtonsTemplate`,s,wD(o)),l=i?-6:22;return(0,W.jsx)(`div`,{children:(0,W.jsxs)(`div`,{className:`mb-2 flex flex-row flex-wrap items-center`,children:[(0,W.jsx)(`div`,{className:`grow shrink`,children:t}),(0,W.jsx)(`div`,{className:`flex items-end justify-end p-0.5`,children:a&&(0,W.jsx)(`div`,{className:`flex gap-2`,style:{marginLeft:`5px`,marginTop:r?`${l}px`:void 0},children:(0,W.jsx)(c,{...n})})})]})})}function dI(e){let{canAdd:t,disabled:n,fieldPathId:r,uiSchema:i,items:a,optionalDataControl:o,onAddClick:s,readonly:c,registry:l,required:u,schema:d,title:f}=e,p=wD(i),m=uA(`ArrayFieldDescriptionTemplate`,l,p),h=uA(`ArrayFieldTitleTemplate`,l,p),g=!c&&!n,{ButtonTemplates:{AddButton:_}}=l.templates;return(0,W.jsx)(`div`,{children:(0,W.jsx)(`div`,{className:`m-0 flex p-0`,children:(0,W.jsxs)(`div`,{className:`m-0 w-full p-0`,children:[(0,W.jsx)(h,{fieldPathId:r,title:p.title||f,schema:d,uiSchema:i,required:u,registry:l,optionalDataControl:g?o:void 0}),(0,W.jsx)(m,{fieldPathId:r,description:p.description||d.description,schema:d,uiSchema:i,registry:l}),(0,W.jsxs)(`div`,{className:`p-0 m-0 w-full mb-2`,children:[g?void 0:o,a,t&&(0,W.jsx)(`div`,{className:`mt-2 flex justify-end`,children:(0,W.jsx)(_,{id:AA(r,`add`),className:`rjsf-array-item-add`,onClick:s,disabled:n||c,uiSchema:i,registry:l})})]},`array-item-list-${r.$id}`)]})})})}function fI({className:e,type:t,...n}){return(0,W.jsx)(`input`,{type:t,"data-slot":`input`,className:oI(`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 pI({id:e,htmlName:t,placeholder:n,required:r,readonly:i,disabled:a,type:o,value:s,onChange:c,onChangeOverride:l,onBlur:u,onFocus:d,autofocus:f,options:p,schema:m,rawErrors:h=[],children:g,extraProps:_,className:v,registry:y}){let{ClearButton:x}=y.templates.ButtonTemplates,S={..._,...sA(m,o,p)},C=({target:{value:e}})=>c(e===``?p.emptyValue:e),w=({target:t})=>u(e,t&&t.value),T=({target:t})=>d(e,t&&t.value),E=(0,b.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),c(p.emptyValue??``)},[c,p.emptyValue]);return(0,W.jsxs)(`div`,{className:`p-0.5`,children:[(0,W.jsx)(fI,{id:e,name:t||e,type:o,placeholder:n,autoFocus:f,required:r,disabled:a,readOnly:i,className:oI({"border-destructive focus-visible:ring-0":h.length>0},v),list:m.examples?TA(e):void 0,...S,value:s||s===0?s:``,onChange:l||C,onBlur:w,onFocus:T,"aria-describedby":OA(e,!!m.examples)}),p.allowClearTextInputs&&!i&&!a&&s&&(0,W.jsx)(x,{onClick:E,registry:y}),g,(0,W.jsx)(CP,{id:e,schema:m})]})}function mI({id:e,description:t,registry:n,uiSchema:r}){return t?(0,W.jsx)(`div`,{children:(0,W.jsx)(`div`,{id:e,className:`text-sm text-muted-foreground`,children:(0,W.jsx)(FP,{description:t,registry:n,uiSchema:r})})}):null}var hI=qr(`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 gI({className:e,variant:t,...n}){return(0,W.jsx)(`div`,{"data-slot":`alert`,role:`alert`,className:oI(hI({variant:t}),e),...n})}function _I({className:e,...t}){return(0,W.jsx)(`div`,{"data-slot":`alert-title`,className:oI(`col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight`,e),...t})}function vI({className:e,...t}){return(0,W.jsx)(`div`,{"data-slot":`alert-description`,className:oI(`text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed`,e),...t})}function yI({errors:e,registry:t}){let{translateString:n}=t;return(0,W.jsxs)(gI,{variant:`destructive`,className:`mb-2`,children:[(0,W.jsx)($F,{className:`h-4 w-4`}),(0,W.jsx)(_I,{children:n(fj.ErrorsLabel)}),(0,W.jsx)(vI,{className:`flex flex-col gap-1`,children:e.map((e,t)=>(0,W.jsxs)(`span`,{children:[`• `,e.stack]},t))})]})}function bI(e){let{errors:t=[],fieldPathId:n}=e;return t.length===0?null:(0,W.jsx)(`div`,{className:`flex flex-col gap-1`,id:wA(n),children:t.map((e,t)=>(0,W.jsx)(`span`,{className:`text-xs font-medium text-destructive mb-1`,children:e},t))})}function xI(e){let{fieldPathId:t,help:n,uiSchema:r,registry:i,hasErrors:a}=e;return n?(0,W.jsx)(`span`,{className:oI(`text-xs font-medium text-muted-foreground`,{"text-destructive":a}),id:EA(t),children:(0,W.jsx)(GP,{help:n,registry:i,uiSchema:r})}):null}function SI({id:e,children:t,displayLabel:n,rawErrors:r=[],errors:i,help:a,description:o,rawDescription:s,classNames:c,style:l,disabled:u,label:d,hidden:f,onKeyRename:p,onKeyRenameBlur:m,onRemoveProperty:h,readonly:g,required:_,schema:v,uiSchema:y,registry:b}){let x=wD(y),S=uA(`WrapIfAdditionalTemplate`,b,x);if(f)return(0,W.jsx)(`div`,{className:`hidden`,children:t});let C=x.widget===`checkbox`;return(0,W.jsx)(S,{classNames:c,style:l,disabled:u,id:e,label:d,displayLabel:n,onKeyRename:p,onKeyRenameBlur:m,onRemoveProperty:h,rawDescription:s,readonly:g,required:_,schema:v,uiSchema:y,registry:b,children:(0,W.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[n&&!C&&(0,W.jsxs)(`label`,{className:oI(`text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70`,{" text-destructive":r.length>0}),htmlFor:e,children:[d,_?`*`:null]}),t,n&&s&&!C&&(0,W.jsx)(`span`,{className:oI(`text-xs font-medium text-muted-foreground`,{" text-destructive":r.length>0}),children:o}),i,a]})})}function CI(e){let{children:t,column:n,className:r,...i}=e;return(0,W.jsx)(`div`,{className:oI(`grid gap-2`,r),...i,children:t})}function wI(e){let{icon:t,iconType:n,className:r,uiSchema:i,registry:a,...o}=e;return(0,W.jsx)(cI,{size:`icon`,variant:`outline`,className:r,...o,type:`button`,children:t})}function TI(e){let{registry:{translateString:t}}=e;return(0,W.jsx)(wI,{title:t(fj.CopyButton),...e,icon:(0,W.jsx)(nI,{className:`h-4 w-4`})})}function EI(e){let{registry:{translateString:t}}=e;return(0,W.jsx)(wI,{title:t(fj.MoveDownButton),...e,icon:(0,W.jsx)(ZF,{className:`h-4 w-4`})})}function DI(e){let{registry:{translateString:t}}=e;return(0,W.jsx)(wI,{title:t(fj.MoveUpButton),...e,icon:(0,W.jsx)(QF,{className:`h-4 w-4`})})}function OI(e){let{registry:{translateString:t}}=e;return(0,W.jsx)(wI,{title:t(fj.RemoveButton),...e,className:`border-destructive`,icon:(0,W.jsx)(iI,{className:`h-4 w-4 stroke-destructive`})})}function kI(e){let{registry:{translateString:t}}=e;return(0,W.jsx)(wI,{title:t(fj.ClearButton),...e,icon:(0,W.jsx)(aI,{})})}function AI({selector:e,optionSchemaField:t}){return(0,W.jsxs)(`div`,{className:oI(`p-4 border rounded-md bg-background shadow-sm`),children:[(0,W.jsx)(`div`,{className:oI(`mb-4`),children:e}),t]})}function jI({description:e,title:t,properties:n,required:r,uiSchema:i,fieldPathId:a,schema:o,formData:s,optionalDataControl:c,onAddProperty:l,disabled:u,readonly:d,registry:f}){let p=wD(i),m=uA(`TitleFieldTemplate`,f,p),h=uA(`DescriptionFieldTemplate`,f,p),g=!d&&!u,{ButtonTemplates:{AddButton:_}}=f.templates;return(0,W.jsxs)(W.Fragment,{children:[t&&(0,W.jsx)(m,{id:DA(a),title:t,required:r,schema:o,uiSchema:i,registry:f,optionalDataControl:g?c:void 0}),e&&(0,W.jsx)(h,{id:CA(a),description:e,schema:o,uiSchema:i,registry:f}),(0,W.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[g?void 0:c,n.map((e,t)=>(0,W.jsx)(`div`,{className:`${e.hidden?`hidden`:``} flex`,children:(0,W.jsx)(`div`,{className:`w-full`,children:e.content})},t)),TD(o,i,s)?(0,W.jsx)(`div`,{className:`mt-2 flex justify-end`,children:(0,W.jsx)(_,{id:AA(a,`add`),onClick:l,disabled:u||d,className:`rjsf-object-property-expand`,uiSchema:i,registry:f})}):null]})]})}function MI(e){let{id:t,registry:n,label:r,onAddClick:i,onRemoveClick:a}=e;return i?(0,W.jsx)(wI,{id:t,registry:n,className:`rjsf-add-optional-data`,onClick:i,title:r,icon:(0,W.jsx)(eI,{}),size:`xs`}):a?(0,W.jsx)(OI,{id:t,registry:n,className:`rjsf-remove-optional-data`,onClick:a,title:r,size:`xs`}):(0,W.jsx)(`em`,{id:t,children:r})}function NI(e){let{submitText:t,norender:n,props:r}=lA(e.uiSchema);return n?null:(0,W.jsx)(`div`,{children:(0,W.jsx)(cI,{type:`submit`,...r,className:oI(`my-2`,r?.className),children:t})})}var PI=u(_(),1),FI=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=ti(`Primitive.${t}`),r=b.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,W.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),II=`Separator`,LI=`horizontal`,RI=[`horizontal`,`vertical`],zI=b.forwardRef((e,t)=>{let{decorative:n,orientation:r=LI,...i}=e,a=BI(r)?r:LI,o=a===`vertical`?a:void 0,s=n?{role:`none`}:{"aria-orientation":o,role:`separator`};return(0,W.jsx)(FI.div,{"data-orientation":a,...s,...i,ref:t})});zI.displayName=II;function BI(e){return RI.includes(e)}var VI=zI;function HI({className:e,orientation:t=`horizontal`,decorative:n=!0,...r}){return(0,W.jsx)(VI,{"data-slot":`separator`,decorative:n,orientation:t,className:oI(`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 UI({id:e,title:t,uiSchema:n,optionalDataControl:r}){let i=(0,W.jsx)(`h5`,{children:wD(n).title||t});return r&&(i=(0,W.jsxs)(`div`,{className:`flex flex-row`,children:[(0,W.jsx)(`div`,{className:`flex-grow`,children:i}),(0,W.jsx)(`div`,{className:`flex`,children:r})]})),(0,W.jsxs)(`div`,{id:e,className:`my-1 flex flex-col gap-0.5`,children:[i,(0,W.jsx)(HI,{dir:`horizontal`,style:{height:`1px`},className:`my-1`})]})}function WI({classNames:e,style:t,children:n,disabled:r,id:i,label:a,displayLabel:o,onRemoveProperty:s,onKeyRenameBlur:c,rawDescription:l,readonly:u,required:d,schema:f,uiSchema:p,registry:m}){let{templates:h,translateString:g}=m,{RemoveButton:_}=h.ButtonTemplates,v=g(fj.KeyLabel,[a]);if(!(`__additional_property`in f))return(0,W.jsx)(`div`,{className:e,style:t,children:n});let y=o?22+(l?-28:0):0,b=`${i}-key`;return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`div`,{className:`grid grid-cols-12 col-span-12 items-center gap-2 ${e}`,style:t,children:[(0,W.jsx)(`div`,{className:`grid gap-2 col-span-5`,children:(0,W.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[o&&(0,W.jsx)(`label`,{htmlFor:b,className:`text-sm font-medium text-muted-foreground leading-none`,children:v}),(0,W.jsx)(`div`,{className:`pl-0.5`,children:(0,W.jsx)(fI,{required:d,defaultValue:a,disabled:r||u,id:b,name:b,onBlur:u?void 0:c,type:`text`,className:`w-full border shadow-sm`})}),!!l&&(0,W.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:(0,W.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:`\xA0`})})]})}),(0,W.jsx)(`div`,{className:`grid gap-2 col-span-6 pr-0.5`,children:n}),(0,W.jsx)(`div`,{className:`grid gap-2 col-span-1`,style:{marginTop:`${y}px`},children:(0,W.jsx)(_,{id:AA(i,`remove`),iconType:`block`,className:`rjsf-object-property-remove w-full`,disabled:r||u,onClick:s,uiSchema:p,registry:m})})]}),(0,W.jsx)(HI,{dir:`horizontal`,className:`mt-2`})]})}function GI(){return{ArrayFieldItemTemplate:uI,ArrayFieldTemplate:dI,BaseInputTemplate:pI,ButtonTemplates:{AddButton:lI,CopyButton:TI,MoveDownButton:EI,MoveUpButton:DI,RemoveButton:OI,SubmitButton:NI,ClearButton:kI},DescriptionFieldTemplate:mI,ErrorListTemplate:yI,FieldErrorTemplate:bI,FieldHelpTemplate:xI,FieldTemplate:SI,GridTemplate:CI,MultiSchemaFieldTemplate:AI,ObjectFieldTemplate:jI,OptionalDataControlsTemplate:MI,TitleFieldTemplate:UI,WrapIfAdditionalTemplate:WI}}function KI(e,t){let n=b.createContext(t),r=e=>{let{children:t,...r}=e,i=b.useMemo(()=>r,Object.values(r));return(0,W.jsx)(n.Provider,{value:i,children:t})};r.displayName=e+`Provider`;function i(r){let i=b.useContext(n);if(i)return i;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return[r,i]}function qI(e,t=[]){let n=[];function r(t,r){let i=b.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=b.useMemo(()=>o,Object.values(o));return(0,W.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=b.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>b.createContext(e));return function(n){let r=n?.[e]||t;return b.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,JI(i,...t)]}function JI(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}typeof window<`u`&&window.document&&window.document.createElement;function YI(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var XI=globalThis?.document?b.useLayoutEffect:()=>{},ZI=b.useInsertionEffect||XI;function QI({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=$I({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=b.useRef(e!==void 0);b.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`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.`),t.current=s},[s,r])}return[c,b.useCallback(t=>{if(s){let n=eL(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function $I({defaultProp:e,onChange:t}){let[n,r]=b.useState(e),i=b.useRef(n),a=b.useRef(t);return ZI(()=>{a.current=t},[t]),b.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function eL(e){return typeof e==`function`}function tL(e){let t=b.useRef({value:e,previous:e});return b.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function nL(e){let[t,n]=b.useState(void 0);return XI(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}function rL(e,t){return b.useReducer((e,n)=>t[e][n]??e,e)}var iL=e=>{let{present:t,children:n}=e,r=aL(t),i=typeof n==`function`?n({present:r.isPresent}):b.Children.only(n),a=Xr(r.ref,sL(i));return typeof n==`function`||r.isPresent?b.cloneElement(i,{ref:a}):null};iL.displayName=`Presence`;function aL(e){let[t,n]=b.useState(),r=b.useRef(null),i=b.useRef(e),a=b.useRef(`none`),[o,s]=rL(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return b.useEffect(()=>{let e=oL(r.current);a.current=o===`mounted`?e:`none`},[o]),XI(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=oL(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),XI(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=oL(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=oL(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:b.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function oL(e){return e?.animationName||`none`}function sL(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 cL(e){let t=lL(e),n=b.forwardRef((e,n)=>{let{children:r,...i}=e,a=b.Children.toArray(r),o=a.find(dL);if(o){let e=o.props.children,r=a.map(t=>t===o?b.Children.count(e)>1?b.Children.only(null):b.isValidElement(e)?e.props.children:null:t);return(0,W.jsx)(t,{...i,ref:n,children:b.isValidElement(e)?b.cloneElement(e,void 0,r):null})}return(0,W.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function lL(e){let t=b.forwardRef((e,t)=>{let{children:n,...r}=e;if(b.isValidElement(n)){let e=pL(n),i=fL(r,n.props);return n.type!==b.Fragment&&(i.ref=t?Yr(t,e):e),b.cloneElement(n,i)}return b.Children.count(n)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var uL=Symbol(`radix.slottable`);function dL(e){return b.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===uL}function fL(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function pL(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 mL=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=cL(`Primitive.${t}`),r=b.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,W.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function hL(e,t){e&&PI.flushSync(()=>e.dispatchEvent(t))}var gL=`Checkbox`,[_L,vL]=qI(gL),[yL,bL]=_L(gL);function xL(e){let{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:l,value:u=`on`,internal_do_not_use_render:d}=e,[f,p]=QI({prop:n,defaultProp:i??!1,onChange:c,caller:gL}),[m,h]=b.useState(null),[g,_]=b.useState(null),v=b.useRef(!1),y=m?!!o||!!m.closest(`form`):!0,x={checked:f,disabled:a,setChecked:p,control:m,setControl:h,name:s,form:o,value:u,hasConsumerStoppedPropagationRef:v,required:l,defaultChecked:AL(i)?!1:i,isFormControl:y,bubbleInput:g,setBubbleInput:_};return(0,W.jsx)(yL,{scope:t,...x,children:kL(d)?d(x):r})}var SL=`CheckboxTrigger`,CL=b.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i)=>{let{control:a,value:o,disabled:s,checked:c,required:l,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:m}=bL(SL,e),h=Xr(i,u),g=b.useRef(c);return b.useEffect(()=>{let e=a?.form;if(e){let t=()=>d(g.current);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[a,d]),(0,W.jsx)(mL.button,{type:`button`,role:`checkbox`,"aria-checked":AL(c)?`mixed`:c,"aria-required":l,"data-state":jL(c),"data-disabled":s?``:void 0,disabled:s,value:o,...r,ref:h,onKeyDown:YI(t,e=>{e.key===`Enter`&&e.preventDefault()}),onClick:YI(n,e=>{d(e=>AL(e)?!0:!e),m&&p&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})});CL.displayName=SL;var wL=b.forwardRef((e,t)=>{let{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,W.jsx)(xL,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(CL,{...d,ref:t,__scopeCheckbox:n}),e&&(0,W.jsx)(OL,{__scopeCheckbox:n})]})})});wL.displayName=gL;var TL=`CheckboxIndicator`,EL=b.forwardRef((e,t)=>{let{__scopeCheckbox:n,forceMount:r,...i}=e,a=bL(TL,n);return(0,W.jsx)(iL,{present:r||AL(a.checked)||a.checked===!0,children:(0,W.jsx)(mL.span,{"data-state":jL(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t,style:{pointerEvents:`none`,...e.style}})})});EL.displayName=TL;var DL=`CheckboxBubbleInput`,OL=b.forwardRef(({__scopeCheckbox:e,...t},n)=>{let{control:r,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:o,required:s,disabled:c,name:l,value:u,form:d,bubbleInput:f,setBubbleInput:p}=bL(DL,e),m=Xr(n,p),h=tL(a),g=nL(r);b.useEffect(()=>{let e=f;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=!i.current;if(h!==a&&n){let t=new Event(`click`,{bubbles:r});e.indeterminate=AL(a),n.call(e,AL(a)?!1:a),e.dispatchEvent(t)}},[f,h,a,i]);let _=b.useRef(AL(a)?!1:a);return(0,W.jsx)(mL.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:o??_.current,required:s,disabled:c,name:l,value:u,form:d,...t,tabIndex:-1,ref:m,style:{...t.style,...g,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})});OL.displayName=DL;function kL(e){return typeof e==`function`}function AL(e){return e===`indeterminate`}function jL(e){return AL(e)?`indeterminate`:e?`checked`:`unchecked`}function ML(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var NL=[`color`],PL=(0,b.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=ML(e,NL);return(0,b.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}),(0,b.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 FL({className:e,...t}){return(0,W.jsx)(wL,{"data-slot":`checkbox`,className:oI(`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:(0,W.jsx)(EL,{"data-slot":`checkbox-indicator`,className:`flex items-center justify-center text-current transition-none`,children:(0,W.jsx)(PL,{className:`size-3.5`})})})}var IL=`Label`,LL=b.forwardRef((e,t)=>(0,W.jsx)(FI.label,{...e,ref:t,onMouseDown:t=>{t.target.closest(`button, input, select, textarea`)||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));LL.displayName=IL;var RL=LL;function zL({className:e,...t}){return(0,W.jsx)(RL,{"data-slot":`label`,className:oI(`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 BL(e){let{id:t,htmlName:n,value:r,disabled:i,readonly:a,label:o,hideLabel:s,schema:c,autofocus:l,options:u,onChange:d,onBlur:f,onFocus:p,registry:m,uiSchema:h,className:g}=e,_=UA(c),v=uA(`DescriptionFieldTemplate`,m,u),y=e=>d(e),b=()=>f(t,r),x=()=>p(t,r),S=u.description||c.description;return(0,W.jsxs)(`div`,{className:`relative ${i||a?`cursor-not-allowed opacity-50`:``}`,"aria-describedby":OA(t),children:[!s&&S&&(0,W.jsx)(v,{id:CA(t),description:S,schema:c,uiSchema:h,registry:m}),(0,W.jsxs)(`div`,{className:`flex items-center gap-2 my-2`,children:[(0,W.jsx)(FL,{id:t,name:n||t,checked:r===void 0?!1:!!r,required:_,disabled:i||a,autoFocus:l,onCheckedChange:y,onBlur:b,onFocus:x,className:g}),(0,W.jsx)(zL,{className:`leading-tight`,htmlFor:t,children:PA(o,s||!o)})]})]})}function VL({id:e,htmlName:t,disabled:n,options:r,value:i,autofocus:a,readonly:o,required:s,onChange:c,onBlur:l,onFocus:u,className:d}){let{enumOptions:f,enumDisabled:p,inline:m,emptyValue:h}=r,g=Array.isArray(i)?i:[i],_=({target:t})=>l(e,Qk(t&&t.value,f,h)),v=({target:t})=>u(e,Qk(t&&t.value,f,h));return(0,W.jsx)(`div`,{className:oI({"flex flex-col gap-2":!m,"flex flex-row gap-4 flex-wrap":m}),children:Array.isArray(f)&&f.map((r,i)=>{let l=eA(r.value,g),u=Array.isArray(p)&&p.indexOf(r.value)!==-1,m=kA(e,i);return(0,W.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,W.jsx)(FL,{id:m,name:t||e,required:s,disabled:n||u||o,onCheckedChange:e=>{c(e?nA(i,g,f):$k(i,g,f))},className:d,checked:l,autoFocus:a&&i===0,onBlur:_,onFocus:v,"aria-describedby":OA(e)}),(0,W.jsx)(zL,{className:`leading-tight`,htmlFor:kA(e,i),children:r.label})]},m)})})}function HL(e){let t=e+`CollectionProvider`,[n,r]=qI(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=b.useRef(null),a=b.useRef(new Map).current;return(0,W.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=cL(s),l=b.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,W.jsx)(c,{ref:Xr(t,a(s,n).collectionRef),children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=cL(u),p=b.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=b.useRef(null),s=Xr(t,o),c=a(u,n);return b.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,W.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return b.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:p},m,r]}var UL=b.useId||(()=>void 0),WL=0;function GL(e){let[t,n]=b.useState(UL());return XI(()=>{e||n(e=>e??String(WL++))},[e]),e||(t?`radix-${t}`:``)}function KL(e){let t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...e)=>t.current?.(...e),[])}var qL=b.createContext(void 0);function JL(e){let t=b.useContext(qL);return e||t||`ltr`}var YL=`rovingFocusGroup.onEntryFocus`,XL={bubbles:!1,cancelable:!0},ZL=`RovingFocusGroup`,[QL,$L,eR]=HL(ZL),[tR,nR]=qI(ZL,[eR]),[rR,iR]=tR(ZL),aR=b.forwardRef((e,t)=>(0,W.jsx)(QL.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,W.jsx)(QL.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,W.jsx)(oR,{...e,ref:t})})}));aR.displayName=ZL;var oR=b.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=b.useRef(null),p=Xr(t,f),m=JL(a),[h,g]=QI({prop:o,defaultProp:s??null,onChange:c,caller:ZL}),[_,v]=b.useState(!1),y=KL(l),x=$L(n),S=b.useRef(!1),[C,w]=b.useState(0);return b.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(YL,y),()=>e.removeEventListener(YL,y)},[y]),(0,W.jsx)(rR,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:b.useCallback(e=>g(e),[g]),onItemShiftTab:b.useCallback(()=>v(!0),[]),onFocusableItemAdd:b.useCallback(()=>w(e=>e+1),[]),onFocusableItemRemove:b.useCallback(()=>w(e=>e-1),[]),children:(0,W.jsx)(mL.div,{tabIndex:_||C===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:YI(e.onMouseDown,()=>{S.current=!0}),onFocus:YI(e.onFocus,e=>{let t=!S.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(YL,XL);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=x().filter(e=>e.focusable);fR([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}S.current=!1}),onBlur:YI(e.onBlur,()=>v(!1))})})}),sR=`RovingFocusGroupItem`,cR=b.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=GL(),l=a||c,u=iR(sR,n),d=u.currentTabStopId===l,f=$L(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u;return b.useEffect(()=>{if(r)return p(),()=>m()},[r,p,m]),(0,W.jsx)(QL.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,W.jsx)(mL.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:YI(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:YI(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:YI(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=dR(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?pR(n,r+1):n.slice(r+1)}setTimeout(()=>fR(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})});cR.displayName=sR;var lR={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function uR(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function dR(e,t,n){let r=uR(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return lR[r]}function fR(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function pR(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var mR=aR,hR=cR,gR=`Radio`,[_R,vR]=qI(gR),[yR,bR]=_R(gR),xR=b.forwardRef((e,t)=>{let{__scopeRadio:n,name:r,checked:i=!1,required:a,disabled:o,value:s=`on`,onCheck:c,form:l,...u}=e,[d,f]=b.useState(null),p=Xr(t,e=>f(e)),m=b.useRef(!1),h=d?l||!!d.closest(`form`):!0;return(0,W.jsxs)(yR,{scope:n,checked:i,disabled:o,children:[(0,W.jsx)(mL.button,{type:`button`,role:`radio`,"aria-checked":i,"data-state":ER(i),"data-disabled":o?``:void 0,disabled:o,value:s,...u,ref:p,onClick:YI(e.onClick,e=>{i||c?.(),h&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())})}),h&&(0,W.jsx)(TR,{control:d,bubbles:!m.current,name:r,value:s,checked:i,required:a,disabled:o,form:l,style:{transform:`translateX(-100%)`}})]})});xR.displayName=gR;var SR=`RadioIndicator`,CR=b.forwardRef((e,t)=>{let{__scopeRadio:n,forceMount:r,...i}=e,a=bR(SR,n);return(0,W.jsx)(iL,{present:r||a.checked,children:(0,W.jsx)(mL.span,{"data-state":ER(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t})})});CR.displayName=SR;var wR=`RadioBubbleInput`,TR=b.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...i},a)=>{let o=b.useRef(null),s=Xr(o,a),c=tL(n),l=nL(t);return b.useEffect(()=>{let e=o.current;if(!e)return;let t=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(t,`checked`).set;if(c!==n&&i){let t=new Event(`click`,{bubbles:r});i.call(e,n),e.dispatchEvent(t)}},[c,n,r]),(0,W.jsx)(mL.input,{type:`radio`,"aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:s,style:{...i.style,...l,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0}})});TR.displayName=wR;function ER(e){return e?`checked`:`unchecked`}var DR=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],OR=`RadioGroup`,[kR,AR]=qI(OR,[nR,vR]),jR=nR(),MR=vR(),[NR,PR]=kR(OR),FR=b.forwardRef((e,t)=>{let{__scopeRadioGroup:n,name:r,defaultValue:i,value:a,required:o=!1,disabled:s=!1,orientation:c,dir:l,loop:u=!0,onValueChange:d,...f}=e,p=jR(n),m=JL(l),[h,g]=QI({prop:a,defaultProp:i??null,onChange:d,caller:OR});return(0,W.jsx)(NR,{scope:n,name:r,required:o,disabled:s,value:h,onValueChange:g,children:(0,W.jsx)(mR,{asChild:!0,...p,orientation:c,dir:m,loop:u,children:(0,W.jsx)(mL.div,{role:`radiogroup`,"aria-required":o,"aria-orientation":c,"data-disabled":s?``:void 0,dir:m,...f,ref:t})})})});FR.displayName=OR;var IR=`RadioGroupItem`,LR=b.forwardRef((e,t)=>{let{__scopeRadioGroup:n,disabled:r,...i}=e,a=PR(IR,n),o=a.disabled||r,s=jR(n),c=MR(n),l=b.useRef(null),u=Xr(t,l),d=a.value===i.value,f=b.useRef(!1);return b.useEffect(()=>{let e=e=>{DR.includes(e.key)&&(f.current=!0)},t=()=>f.current=!1;return document.addEventListener(`keydown`,e),document.addEventListener(`keyup`,t),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`keyup`,t)}},[]),(0,W.jsx)(hR,{asChild:!0,...s,focusable:!o,active:d,children:(0,W.jsx)(xR,{disabled:o,required:a.required,checked:d,...c,...i,name:a.name,ref:u,onCheck:()=>a.onValueChange(i.value),onKeyDown:YI(e=>{e.key===`Enter`&&e.preventDefault()}),onFocus:YI(i.onFocus,()=>{f.current&&l.current?.click()})})})});LR.displayName=IR;var RR=`RadioGroupIndicator`,zR=b.forwardRef((e,t)=>{let{__scopeRadioGroup:n,...r}=e;return(0,W.jsx)(CR,{...MR(n),...r,ref:t})});zR.displayName=RR;var BR=FR,VR=LR,HR=zR;function UR({className:e,...t}){return(0,W.jsx)(BR,{"data-slot":`radio-group`,className:oI(`grid gap-3`,e),...t})}function WR({className:e,...t}){return(0,W.jsx)(VR,{"data-slot":`radio-group-item`,className:oI(`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:(0,W.jsx)(HR,{"data-slot":`radio-group-indicator`,className:`relative flex items-center justify-center`,children:(0,W.jsx)(tI,{className:`fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2`})})})}function GR({id:e,options:t,value:n,required:r,disabled:i,readonly:a,onChange:o,onBlur:s,onFocus:c,className:l}){let{enumOptions:u,enumDisabled:d,emptyValue:f}=t,p=e=>o(Qk(e,u,f)),m=({target:t})=>s(e,Qk(t&&t.value,u,f)),h=({target:t})=>c(e,Qk(t&&t.value,u,f)),g=!!(t&&t.inline);return(0,W.jsx)(`div`,{className:`mb-0`,children:(0,W.jsx)(UR,{defaultValue:n?.toString(),required:r,disabled:i||a,onValueChange:e=>{p(e)},onBlur:m,onFocus:h,"aria-describedby":OA(e),orientation:g?`horizontal`:`vertical`,className:oI(`flex flex-wrap`,{"flex-col":!g},l),children:Array.isArray(u)&&u.map((t,r)=>{let i=Array.isArray(d)&&d.indexOf(t.value)!==-1;return(0,W.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,W.jsx)(WR,{checked:eA(t.value,n),value:r.toString(),id:kA(e,r),disabled:i}),(0,W.jsx)(zL,{className:`leading-tight`,htmlFor:kA(e,r),children:t.label})]},kA(e,r))})})})}function KR(e,[t,n]){return Math.min(n,Math.max(t,e))}var qR=[`PageUp`,`PageDown`],JR=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],YR={"from-left":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-right":[`Home`,`PageDown`,`ArrowDown`,`ArrowRight`],"from-bottom":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-top":[`Home`,`PageDown`,`ArrowUp`,`ArrowLeft`]},XR=`Slider`,[ZR,QR,$R]=HL(XR),[ez,tz]=qI(XR,[$R]),[nz,rz]=ez(XR),iz=b.forwardRef((e,t)=>{let{name:n,min:r=0,max:i=100,step:a=1,orientation:o=`horizontal`,disabled:s=!1,minStepsBetweenThumbs:c=0,defaultValue:l=[r],value:u,onValueChange:d=()=>{},onValueCommit:f=()=>{},inverted:p=!1,form:m,...h}=e,g=b.useRef(new Set),_=b.useRef(0),v=o===`horizontal`?sz:cz,[y=[],x]=QI({prop:u,defaultProp:l,onChange:e=>{[...g.current][_.current]?.focus(),d(e)}}),S=b.useRef(y);function C(e){E(e,Sz(y,e))}function w(e){E(e,_.current)}function T(){let e=S.current[_.current];y[_.current]!==e&&f(y)}function E(e,t,{commit:n}={commit:!1}){let o=Dz(a),s=KR(Oz(Math.round((e-r)/a)*a+r,o),[r,i]);x((e=[])=>{let r=yz(e,s,t);if(Tz(r,c*a)){_.current=r.indexOf(s);let t=String(r)!==String(e);return t&&n&&f(r),t?r:e}else return e})}return(0,W.jsx)(nz,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:i,valueIndexToChangeRef:_,thumbs:g.current,values:y,orientation:o,form:m,children:(0,W.jsx)(ZR.Provider,{scope:e.__scopeSlider,children:(0,W.jsx)(ZR.Slot,{scope:e.__scopeSlider,children:(0,W.jsx)(v,{"aria-disabled":s,"data-disabled":s?``:void 0,...h,ref:t,onPointerDown:YI(h.onPointerDown,()=>{s||(S.current=y)}),min:r,max:i,inverted:p,onSlideStart:s?void 0:C,onSlideMove:s?void 0:w,onSlideEnd:s?void 0:T,onHomeKeyDown:()=>!s&&E(r,0,{commit:!0}),onEndKeyDown:()=>!s&&E(i,y.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!s){let n=qR.includes(e.key)||e.shiftKey&&JR.includes(e.key)?10:1,r=_.current,i=y[r];E(i+a*n*t,r,{commit:!0})}}})})})})});iz.displayName=XR;var[az,oz]=ez(XR,{startEdge:`left`,endEdge:`right`,size:`width`,direction:1}),sz=b.forwardRef((e,t)=>{let{min:n,max:r,dir:i,inverted:a,onSlideStart:o,onSlideMove:s,onSlideEnd:c,onStepKeyDown:l,...u}=e,[d,f]=b.useState(null),p=Xr(t,e=>f(e)),m=b.useRef(void 0),h=JL(i),g=h===`ltr`,_=g&&!a||!g&&a;function v(e){let t=m.current||d.getBoundingClientRect(),i=Ez([0,t.width],_?[n,r]:[r,n]);return m.current=t,i(e-t.left)}return(0,W.jsx)(az,{scope:e.__scopeSlider,startEdge:_?`left`:`right`,endEdge:_?`right`:`left`,direction:_?1:-1,size:`width`,children:(0,W.jsx)(lz,{dir:h,"data-orientation":`horizontal`,...u,ref:p,style:{...u.style,"--radix-slider-thumb-transform":`translateX(-50%)`},onSlideStart:e=>{let t=v(e.clientX);o?.(t)},onSlideMove:e=>{let t=v(e.clientX);s?.(t)},onSlideEnd:()=>{m.current=void 0,c?.()},onStepKeyDown:e=>{let t=YR[_?`from-left`:`from-right`].includes(e.key);l?.({event:e,direction:t?-1:1})}})})}),cz=b.forwardRef((e,t)=>{let{min:n,max:r,inverted:i,onSlideStart:a,onSlideMove:o,onSlideEnd:s,onStepKeyDown:c,...l}=e,u=b.useRef(null),d=Xr(t,u),f=b.useRef(void 0),p=!i;function m(e){let t=f.current||u.current.getBoundingClientRect(),i=Ez([0,t.height],p?[r,n]:[n,r]);return f.current=t,i(e-t.top)}return(0,W.jsx)(az,{scope:e.__scopeSlider,startEdge:p?`bottom`:`top`,endEdge:p?`top`:`bottom`,size:`height`,direction:p?1:-1,children:(0,W.jsx)(lz,{"data-orientation":`vertical`,...l,ref:d,style:{...l.style,"--radix-slider-thumb-transform":`translateY(50%)`},onSlideStart:e=>{let t=m(e.clientY);a?.(t)},onSlideMove:e=>{let t=m(e.clientY);o?.(t)},onSlideEnd:()=>{f.current=void 0,s?.()},onStepKeyDown:e=>{let t=YR[p?`from-bottom`:`from-top`].includes(e.key);c?.({event:e,direction:t?-1:1})}})})}),lz=b.forwardRef((e,t)=>{let{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:o,onEndKeyDown:s,onStepKeyDown:c,...l}=e,u=rz(XR,n);return(0,W.jsx)(mL.span,{...l,ref:t,onKeyDown:YI(e.onKeyDown,e=>{e.key===`Home`?(o(e),e.preventDefault()):e.key===`End`?(s(e),e.preventDefault()):qR.concat(JR).includes(e.key)&&(c(e),e.preventDefault())}),onPointerDown:YI(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():r(e)}),onPointerMove:YI(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:YI(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),a(e))})})}),uz=`SliderTrack`,dz=b.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=rz(uz,n);return(0,W.jsx)(mL.span,{"data-disabled":i.disabled?``:void 0,"data-orientation":i.orientation,...r,ref:t})});dz.displayName=uz;var fz=`SliderRange`,pz=b.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=rz(fz,n),a=oz(fz,n),o=Xr(t,b.useRef(null)),s=i.values.length,c=i.values.map(e=>bz(e,i.min,i.max)),l=s>1?Math.min(...c):0,u=100-Math.max(...c);return(0,W.jsx)(mL.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?``:void 0,...r,ref:o,style:{...e.style,[a.startEdge]:l+`%`,[a.endEdge]:u+`%`}})});pz.displayName=fz;var mz=`SliderThumb`,hz=b.forwardRef((e,t)=>{let n=QR(e.__scopeSlider),[r,i]=b.useState(null),a=Xr(t,e=>i(e)),o=b.useMemo(()=>r?n().findIndex(e=>e.ref.current===r):-1,[n,r]);return(0,W.jsx)(gz,{...e,ref:a,index:o})}),gz=b.forwardRef((e,t)=>{let{__scopeSlider:n,index:r,name:i,...a}=e,o=rz(mz,n),s=oz(mz,n),[c,l]=b.useState(null),u=Xr(t,e=>l(e)),d=c?o.form||!!c.closest(`form`):!0,f=nL(c),p=o.values[r],m=p===void 0?0:bz(p,o.min,o.max),h=xz(r,o.values.length),g=f?.[s.size],_=g?Cz(g,m,s.direction):0;return b.useEffect(()=>{if(c)return o.thumbs.add(c),()=>{o.thumbs.delete(c)}},[c,o.thumbs]),(0,W.jsxs)(`span`,{style:{transform:`var(--radix-slider-thumb-transform)`,position:`absolute`,[s.startEdge]:`calc(${m}% + ${_}px)`},children:[(0,W.jsx)(ZR.ItemSlot,{scope:e.__scopeSlider,children:(0,W.jsx)(mL.span,{role:`slider`,"aria-label":e[`aria-label`]||h,"aria-valuemin":o.min,"aria-valuenow":p,"aria-valuemax":o.max,"aria-orientation":o.orientation,"data-orientation":o.orientation,"data-disabled":o.disabled?``:void 0,tabIndex:o.disabled?void 0:0,...a,ref:u,style:p===void 0?{display:`none`}:e.style,onFocus:YI(e.onFocus,()=>{o.valueIndexToChangeRef.current=r})})}),d&&(0,W.jsx)(vz,{name:i??(o.name?o.name+(o.values.length>1?`[]`:``):void 0),form:o.form,value:p},r)]})});hz.displayName=mz;var _z=`RadioBubbleInput`,vz=b.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{let i=b.useRef(null),a=Xr(i,r),o=tL(t);return b.useEffect(()=>{let e=i.current;if(!e)return;let n=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(n,`value`).set;if(o!==t&&r){let n=new Event(`input`,{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[o,t]),(0,W.jsx)(mL.input,{style:{display:`none`},...n,ref:a,defaultValue:t})});vz.displayName=_z;function yz(e=[],t,n){let r=[...e];return r[n]=t,r.sort((e,t)=>e-t)}function bz(e,t,n){return KR(100/(n-t)*(e-t),[0,100])}function xz(e,t){if(t>2)return`Value ${e+1} of ${t}`;if(t===2)return[`Minimum`,`Maximum`][e]}function Sz(e,t){if(e.length===1)return 0;let n=e.map(e=>Math.abs(e-t)),r=Math.min(...n);return n.indexOf(r)}function Cz(e,t,n){let r=e/2;return(r-Ez([0,50],[0,r])(t)*n)*n}function wz(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function Tz(e,t){if(t>0){let n=wz(e);return Math.min(...n)>=t}return!0}function Ez(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Dz(e){return(String(e).split(`.`)[1]||``).length}function Oz(e,t){let n=10**t;return Math.round(e*n)/n}var kz=iz,Az=dz,jz=pz,Mz=hz;function Nz({className:e,defaultValue:t,value:n,min:r=0,max:i=100,...a}){let o=(0,b.useMemo)(()=>Array.isArray(n)?n:Array.isArray(t)?t:[r,i],[n,t,r,i]);return(0,W.jsxs)(kz,{"data-slot":`slider`,defaultValue:t,value:n,min:r,max:i,className:oI(`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),...a,children:[(0,W.jsx)(Az,{"data-slot":`slider-track`,className:oI(`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:(0,W.jsx)(jz,{"data-slot":`slider-range`,className:oI(`bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full`)})}),Array.from({length:o.length},(e,t)=>(0,W.jsx)(Mz,{"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`},t))]})}var Pz=[`name`,`min`,`max`,`step`,`orientation`,`disabled`,`defaultValue`,`value`,`onValueChange`,`className`,`dir`,`inverted`,`minStepsBetweenThumbs`];function Fz({value:e,readonly:t,disabled:n,options:r,schema:i,onChange:a,label:o,id:s}){let c=e=>a(e[0]),l={value:e,label:o,id:s,...oA(i)},u={id:s,...VC(r.props||{},Pz)};return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(Nz,{disabled:n||t,min:l.min,max:l.max,step:l.step,value:[e],onValueChange:c,...u,"aria-describedby":OA(s)}),e]})}var Iz=1,Lz=.9,Rz=.8,zz=.17,Bz=.1,Vz=.999,Hz=.9999,Uz=.99,Wz=/[\\\/_+.#"@\[\(\{&]/,Gz=/[\\\/_+.#"@\[\(\{&]/g,Kz=/[\s-]/,qz=/[\s-]/g;function Jz(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?Iz:Uz;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=Jz(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=Iz:Wz.test(e.charAt(l-1))?(d*=Rz,p=e.slice(i,l-1).match(Gz),p&&i>0&&(d*=Vz**+p.length)):Kz.test(e.charAt(l-1))?(d*=Lz,m=e.slice(i,l-1).match(qz),m&&i>0&&(d*=Vz**+m.length)):(d*=zz,i>0&&(d*=Vz**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=Hz)),(d<Bz&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=Jz(e,t,n,r,l+1,a+2,o),f*Bz>d&&(d=f*Bz)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function Yz(e){return e.toLowerCase().replace(qz,` `)}function Xz(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,Jz(e,t,Yz(e),Yz(t),0,0,{})}function Zz(e,t=globalThis?.document){let n=KL(e);b.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var Qz=`DismissableLayer`,$z=`dismissableLayer.update`,eB=`dismissableLayer.pointerDownOutside`,tB=`dismissableLayer.focusOutside`,nB,rB=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),iB=b.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=b.useContext(rB),[u,d]=b.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=b.useState({}),m=Xr(t,e=>d(e)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=h.indexOf(g),v=u?h.indexOf(u):-1,y=l.layersWithOutsidePointerEventsDisabled.size>0,x=v>=_,S=sB(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!x||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),C=cB(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return Zz(e=>{v===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),b.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(nB=f.body.style.pointerEvents,f.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),lB(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=nB)}},[u,f,n,l]),b.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),lB())},[u,l]),b.useEffect(()=>{let e=()=>p({});return document.addEventListener($z,e),()=>document.removeEventListener($z,e)},[]),(0,W.jsx)(mL.div,{...c,ref:m,style:{pointerEvents:y?x?`auto`:`none`:void 0,...e.style},onFocusCapture:YI(e.onFocusCapture,C.onFocusCapture),onBlurCapture:YI(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:YI(e.onPointerDownCapture,S.onPointerDownCapture)})});iB.displayName=Qz;var aB=`DismissableLayerBranch`,oB=b.forwardRef((e,t)=>{let n=b.useContext(rB),r=b.useRef(null),i=Xr(t,r);return b.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,W.jsx)(mL.div,{...e,ref:i})});oB.displayName=aB;function sB(e,t=globalThis?.document){let n=KL(e),r=b.useRef(!1),i=b.useRef(()=>{});return b.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){uB(eB,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function cB(e,t=globalThis?.document){let n=KL(e),r=b.useRef(!1);return b.useEffect(()=>{let e=e=>{e.target&&!r.current&&uB(tB,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function lB(){let e=new CustomEvent($z);document.dispatchEvent(e)}function uB(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?hL(i,a):i.dispatchEvent(a)}var dB=`focusScope.autoFocusOnMount`,fB=`focusScope.autoFocusOnUnmount`,pB={bubbles:!1,cancelable:!0},mB=`FocusScope`,hB=b.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=b.useState(null),l=KL(i),u=KL(a),d=b.useRef(null),f=Xr(t,e=>c(e)),p=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:SB(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||SB(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&SB(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),b.useEffect(()=>{if(s){CB.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(dB,pB);s.addEventListener(dB,l),s.dispatchEvent(t),t.defaultPrevented||(gB(EB(vB(s)),{select:!0}),document.activeElement===e&&SB(s))}return()=>{s.removeEventListener(dB,l),setTimeout(()=>{let t=new CustomEvent(fB,pB);s.addEventListener(fB,u),s.dispatchEvent(t),t.defaultPrevented||SB(e??document.body,{select:!0}),s.removeEventListener(fB,u),CB.remove(p)},0)}}},[s,l,u,p]);let m=b.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=_B(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&SB(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&SB(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,W.jsx)(mL.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});hB.displayName=mB;function gB(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(SB(r,{select:t}),document.activeElement!==n)return}function _B(e){let t=vB(e);return[yB(t,e),yB(t.reverse(),e)]}function vB(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function yB(e,t){for(let n of e)if(!bB(n,{upTo:t}))return n}function bB(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 xB(e){return e instanceof HTMLInputElement&&`select`in e}function SB(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&xB(e)&&t&&e.select()}}var CB=wB();function wB(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=TB(e,t),e.unshift(t)},remove(t){e=TB(e,t),e[0]?.resume()}}}function TB(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function EB(e){return e.filter(e=>e.tagName!==`A`)}var DB=`Portal`,OB=b.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=b.useState(!1);XI(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?PI.createPortal((0,W.jsx)(mL.div,{...r,ref:t}),o):null});OB.displayName=DB;var kB=0;function AB(){b.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??jB()),document.body.insertAdjacentElement(`beforeend`,e[1]??jB()),kB++,()=>{kB===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),kB--}},[])}function jB(){let 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 MB=function(){return MB=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},MB.apply(this,arguments)};function NB(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 PB(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 TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function FB(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var IB=`right-scroll-bar-position`,LB=`width-before-scroll-bar`,RB=`with-scroll-bars-hidden`,zB=`--removed-body-scroll-bar-size`;function BB(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function VB(e,t){var n=(0,b.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var HB=typeof window<`u`?b.useLayoutEffect:b.useEffect,UB=new WeakMap;function WB(e,t){var n=VB(t||null,function(t){return e.forEach(function(e){return BB(e,t)})});return HB(function(){var t=UB.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||BB(e,null)}),i.forEach(function(e){r.has(e)||BB(e,a)})}UB.set(n,e)},[e]),n}function GB(e){return e}function KB(e,t){t===void 0&&(t=GB);var n=[],r=!1;return{read:function(){if(r)throw 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(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function qB(e){e===void 0&&(e={});var t=KB(null);return t.options=MB({async:!0,ssr:!1},e),t}var JB=function(e){var t=e.sideCar,n=NB(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return b.createElement(r,MB({},n))};JB.isSideCarExport=!0;function YB(e,t){return e.useMedium(t),JB}var XB=qB(),ZB=function(){},QB=b.forwardRef(function(e,t){var n=b.useRef(null),r=b.useState({onScrollCapture:ZB,onWheelCapture:ZB,onTouchMoveCapture:ZB}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,x=NB(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=f,C=WB([n,t]),w=MB(MB({},x),i);return b.createElement(b.Fragment,null,u&&b.createElement(S,{sideCar:XB,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?b.cloneElement(b.Children.only(s),MB(MB({},w),{ref:C})):b.createElement(v,MB({},w,{className:c,ref:C}),s))});QB.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},QB.classNames={fullWidth:LB,zeroRight:IB};var $B,eV=function(){if($B)return $B;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function tV(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=eV();return t&&e.setAttribute(`nonce`,t),e}function nV(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function rV(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var iV=function(){var e=0,t=null;return{add:function(n){e==0&&(t=tV())&&(nV(t,n),rV(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},aV=function(){var e=iV();return function(t,n){b.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},oV=function(){var e=aV();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},sV={left:0,top:0,right:0,gap:0},cV=function(e){return parseInt(e||``,10)||0},lV=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[cV(n),cV(r),cV(i)]},uV=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return sV;var t=lV(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])}},dV=oV(),fV=`data-scroll-locked`,pV=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
86
|
+
.${RB} {
|
|
87
|
+
overflow: hidden ${r};
|
|
88
|
+
padding-right: ${s}px ${r};
|
|
89
|
+
}
|
|
90
|
+
body[${fV}] {
|
|
91
|
+
overflow: hidden ${r};
|
|
92
|
+
overscroll-behavior: contain;
|
|
93
|
+
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
94
|
+
padding-left: ${i}px;
|
|
95
|
+
padding-top: ${a}px;
|
|
96
|
+
padding-right: ${o}px;
|
|
97
|
+
margin-left:0;
|
|
98
|
+
margin-top:0;
|
|
99
|
+
margin-right: ${s}px ${r};
|
|
100
|
+
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.${IB} {
|
|
104
|
+
right: ${s}px ${r};
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.${LB} {
|
|
108
|
+
margin-right: ${s}px ${r};
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.${IB} .${IB} {
|
|
112
|
+
right: 0 ${r};
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.${LB} .${LB} {
|
|
116
|
+
margin-right: 0 ${r};
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
body[${fV}] {
|
|
120
|
+
${zB}: ${s}px;
|
|
121
|
+
}
|
|
122
|
+
`},mV=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},hV=function(){b.useEffect(function(){return document.body.setAttribute(fV,(mV()+1).toString()),function(){var e=mV()-1;e<=0?document.body.removeAttribute(fV):document.body.setAttribute(fV,e.toString())}},[])},gV=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;hV();var a=b.useMemo(function(){return uV(i)},[i]);return b.createElement(dV,{styles:pV(a,!t,i,n?``:`!important`)})},_V=!1;if(typeof window<`u`)try{var vV=Object.defineProperty({},`passive`,{get:function(){return _V=!0,!0}});window.addEventListener(`test`,vV,vV),window.removeEventListener(`test`,vV,vV)}catch{_V=!1}var yV=_V?{passive:!1}:!1,bV=function(e){return e.tagName===`TEXTAREA`},xV=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!bV(e)&&n[t]===`visible`)},SV=function(e){return xV(e,`overflowY`)},CV=function(e){return xV(e,`overflowX`)},wV=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),DV(e,r)){var i=OV(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},TV=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},EV=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},DV=function(e,t){return e===`v`?SV(t):CV(t)},OV=function(e,t){return e===`v`?TV(t):EV(t)},kV=function(e,t){return e===`h`&&t===`rtl`?-1:1},AV=function(e,t,n,r,i){var a=kV(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=OV(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&DV(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},jV=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},MV=function(e){return[e.deltaX,e.deltaY]},NV=function(e){return e&&`current`in e?e.current:e},PV=function(e,t){return e[0]===t[0]&&e[1]===t[1]},FV=function(e){return`
|
|
123
|
+
.block-interactivity-${e} {pointer-events: none;}
|
|
124
|
+
.allow-interactivity-${e} {pointer-events: all;}
|
|
125
|
+
`},IV=0,LV=[];function RV(e){var t=b.useRef([]),n=b.useRef([0,0]),r=b.useRef(),i=b.useState(IV++)[0],a=b.useState(oV)[0],o=b.useRef(e);b.useEffect(function(){o.current=e},[e]),b.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=FB([e.lockRef.current],(e.shards||[]).map(NV),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=b.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=jV(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=wV(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=wV(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return AV(h,t,e,h===`h`?s:c,!0)},[]),c=b.useCallback(function(e){var n=e;if(!(!LV.length||LV[LV.length-1]!==a)){var r=`deltaY`in n?MV(n):jV(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&PV(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(NV).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=b.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:zV(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=b.useCallback(function(e){n.current=jV(e),r.current=void 0},[]),d=b.useCallback(function(t){l(t.type,MV(t),t.target,s(t,e.lockRef.current))},[]),f=b.useCallback(function(t){l(t.type,jV(t),t.target,s(t,e.lockRef.current))},[]);b.useEffect(function(){return LV.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,yV),document.addEventListener(`touchmove`,c,yV),document.addEventListener(`touchstart`,u,yV),function(){LV=LV.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,yV),document.removeEventListener(`touchmove`,c,yV),document.removeEventListener(`touchstart`,u,yV)}},[]);var p=e.removeScrollBar,m=e.inert;return b.createElement(b.Fragment,null,m?b.createElement(a,{styles:FV(i)}):null,p?b.createElement(gV,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function zV(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var BV=YB(XB,RV),VV=b.forwardRef(function(e,t){return b.createElement(QB,MB({},e,{ref:t,sideCar:BV}))});VV.classNames=QB.classNames;var HV=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},UV=new WeakMap,WV=new WeakMap,GV={},KV=0,qV=function(e){return e&&(e.host||qV(e.parentNode))},JV=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=qV(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},YV=function(e,t,n,r){var i=JV(t,Array.isArray(e)?e:[e]);GV[n]||(GV[n]=new WeakMap);var a=GV[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(UV.get(e)||0)+1,l=(a.get(e)||0)+1;UV.set(e,c),a.set(e,l),o.push(e),c===1&&i&&WV.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),KV++,function(){o.forEach(function(e){var t=UV.get(e)-1,i=a.get(e)-1;UV.set(e,t),a.set(e,i),t||(WV.has(e)||e.removeAttribute(r),WV.delete(e)),i||e.removeAttribute(n)}),KV--,KV||(UV=new WeakMap,UV=new WeakMap,WV=new WeakMap,GV={})}},XV=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||HV(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),YV(r,i,n,`aria-hidden`)):function(){return null}},ZV=`Dialog`,[QV,$V]=qI(ZV),[eH,tH]=QV(ZV),nH=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=b.useRef(null),c=b.useRef(null),[l,u]=QI({prop:r,defaultProp:i??!1,onChange:a,caller:ZV});return(0,W.jsx)(eH,{scope:t,triggerRef:s,contentRef:c,contentId:GL(),titleId:GL(),descriptionId:GL(),open:l,onOpenChange:u,onOpenToggle:b.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};nH.displayName=ZV;var rH=`DialogTrigger`,iH=b.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=tH(rH,n),a=Xr(t,i.triggerRef);return(0,W.jsx)(mL.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":wH(i.open),...r,ref:a,onClick:YI(e.onClick,i.onOpenToggle)})});iH.displayName=rH;var aH=`DialogPortal`,[oH,sH]=QV(aH,{forceMount:void 0}),cH=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=tH(aH,t);return(0,W.jsx)(oH,{scope:t,forceMount:n,children:b.Children.map(r,e=>(0,W.jsx)(iL,{present:n||a.open,children:(0,W.jsx)(OB,{asChild:!0,container:i,children:e})}))})};cH.displayName=aH;var lH=`DialogOverlay`,uH=b.forwardRef((e,t)=>{let n=sH(lH,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=tH(lH,e.__scopeDialog);return a.modal?(0,W.jsx)(iL,{present:r||a.open,children:(0,W.jsx)(fH,{...i,ref:t})}):null});uH.displayName=lH;var dH=cL(`DialogOverlay.RemoveScroll`),fH=b.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=tH(lH,n);return(0,W.jsx)(VV,{as:dH,allowPinchZoom:!0,shards:[i.contentRef],children:(0,W.jsx)(mL.div,{"data-state":wH(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),pH=`DialogContent`,mH=b.forwardRef((e,t)=>{let n=sH(pH,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=tH(pH,e.__scopeDialog);return(0,W.jsx)(iL,{present:r||a.open,children:a.modal?(0,W.jsx)(hH,{...i,ref:t}):(0,W.jsx)(gH,{...i,ref:t})})});mH.displayName=pH;var hH=b.forwardRef((e,t)=>{let n=tH(pH,e.__scopeDialog),r=b.useRef(null),i=Xr(t,n.contentRef,r);return b.useEffect(()=>{let e=r.current;if(e)return XV(e)},[]),(0,W.jsx)(_H,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:YI(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:YI(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:YI(e.onFocusOutside,e=>e.preventDefault())})}),gH=b.forwardRef((e,t)=>{let n=tH(pH,e.__scopeDialog),r=b.useRef(!1),i=b.useRef(!1);return(0,W.jsx)(_H,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),_H=b.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=tH(pH,n),c=b.useRef(null),l=Xr(t,c);return AB(),(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(hB,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,W.jsx)(iB,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":wH(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(OH,{titleId:s.titleId}),(0,W.jsx)(AH,{contentRef:c,descriptionId:s.descriptionId})]})]})}),vH=`DialogTitle`,yH=b.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=tH(vH,n);return(0,W.jsx)(mL.h2,{id:i.titleId,...r,ref:t})});yH.displayName=vH;var bH=`DialogDescription`,xH=b.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=tH(bH,n);return(0,W.jsx)(mL.p,{id:i.descriptionId,...r,ref:t})});xH.displayName=bH;var SH=`DialogClose`,CH=b.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=tH(SH,n);return(0,W.jsx)(mL.button,{type:`button`,...r,ref:t,onClick:YI(e.onClick,()=>i.onOpenChange(!1))})});CH.displayName=SH;function wH(e){return e?`open`:`closed`}var TH=`DialogTitleWarning`,[EH,DH]=KI(TH,{contentName:pH,titleName:vH,docsSlug:`dialog`}),OH=({titleId:e})=>{let t=DH(TH),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
126
|
+
|
|
127
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
128
|
+
|
|
129
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return b.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},kH=`DialogDescriptionWarning`,AH=({contentRef:e,descriptionId:t})=>{let n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${DH(kH).contentName}}.`;return b.useEffect(()=>{let r=e.current?.getAttribute(`aria-describedby`);t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},jH=nH,MH=cH,NH=uH,PH=mH,FH=`[cmdk-group=""]`,IH=`[cmdk-group-items=""]`,LH=`[cmdk-group-heading=""]`,RH=`[cmdk-item=""]`,zH=`${RH}:not([aria-disabled="true"])`,BH=`cmdk-item-select`,VH=`data-value`,HH=(e,t,n)=>Xz(e,t,n),UH=b.createContext(void 0),WH=()=>b.useContext(UH),GH=b.createContext(void 0),KH=()=>b.useContext(GH),qH=b.createContext(void 0),JH=b.forwardRef((e,t)=>{let n=cU(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=cU(()=>new Set),i=cU(()=>new Map),a=cU(()=>new Map),o=cU(()=>new Set),s=oU(e),{label:c,children:l,value:u,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:h=!1,vimBindings:g=!0,..._}=e,v=GL(),y=GL(),x=GL(),S=b.useRef(null),C=dU();sU(()=>{if(u!==void 0){let e=u.trim();n.current.value=e,w.emit()}},[u]),sU(()=>{C(6,A)},[]);let w=b.useMemo(()=>({subscribe:e=>(o.current.add(e),()=>o.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)k(),D(),C(1,O);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(x);e?e.focus():(i=document.getElementById(v))==null||i.focus()}if(C(7,()=>{n.current.selectedItemId=j()?.id,w.emit()}),r||C(5,A),s.current?.value!==void 0){let e=t??``;(o=(a=s.current).onValueChange)==null||o.call(a,e);return}}w.emit()}},emit:()=>{o.current.forEach(e=>e())}}),[]),T=b.useMemo(()=>({value:(e,t,r)=>{t!==a.current.get(e)?.value&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,E(t,r)),C(2,()=>{D(),w.emit()}))},item:(e,t)=>(r.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),C(3,()=>{k(),D(),n.current.value||O(),w.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=j();C(4,()=>{k(),t?.getAttribute(`id`)===e&&O(),w.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{a.current.delete(e),i.current.delete(e)}),filter:()=>s.current.shouldFilter,label:c||e[`aria-label`],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:v,inputId:x,labelId:y,listInnerRef:S}),[]);function E(e,t){let r=s.current?.filter??HH;return e?r(e,n.current.search,t):0}function D(){if(!n.current.search||s.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=i.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=S.current;M().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(IH);t?t.appendChild(e.parentElement===t?e:e.closest(`${IH} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${IH} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=S.current?.querySelector(`${FH}[${VH}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function O(){let e=M().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(VH);w.setState(`value`,e||void 0)}function k(){if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let t of r.current){let r=E(a.current.get(t)?.value??``,a.current.get(t)?.keywords??[]);n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function A(){var e;let t=j();t&&(t.parentElement?.firstChild===t&&((e=t.closest(FH)?.querySelector(LH))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function j(){return S.current?.querySelector(`${RH}[aria-selected="true"]`)}function M(){return Array.from(S.current?.querySelectorAll(zH)||[])}function N(e){let t=M()[e];t&&w.setState(`value`,t.getAttribute(VH))}function P(e){var t;let n=j(),r=M(),i=r.findIndex(e=>e===n),a=r[i+e];(t=s.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&w.setState(`value`,a.getAttribute(VH))}function F(e){let t=j()?.closest(FH),n;for(;t&&!n;)t=e>0?iU(t,FH):aU(t,FH),n=t?.querySelector(zH);n?w.setState(`value`,n.getAttribute(VH)):P(e)}let I=()=>N(M().length-1),L=e=>{e.preventDefault(),e.metaKey?I():e.altKey?F(1):P(1)},R=e=>{e.preventDefault(),e.metaKey?N(0):e.altKey?F(-1):P(-1)};return b.createElement(FI.div,{ref:t,tabIndex:-1,..._,"cmdk-root":``,onKeyDown:e=>{var t;(t=_.onKeyDown)==null||t.call(_,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:g&&e.ctrlKey&&L(e);break;case`ArrowDown`:L(e);break;case`p`:case`k`:g&&e.ctrlKey&&R(e);break;case`ArrowUp`:R(e);break;case`Home`:e.preventDefault(),N(0);break;case`End`:e.preventDefault(),I();break;case`Enter`:{e.preventDefault();let t=j();if(t){let e=new Event(BH);t.dispatchEvent(e)}}}}},b.createElement(`label`,{"cmdk-label":``,htmlFor:T.inputId,id:T.labelId,style:mU},c),pU(e,e=>b.createElement(GH.Provider,{value:w},b.createElement(UH.Provider,{value:T},e))))}),YH=b.forwardRef((e,t)=>{let n=GL(),r=b.useRef(null),i=b.useContext(qH),a=WH(),o=oU(e),s=o.current?.forceMount??i?.forceMount;sU(()=>{if(!s)return a.item(n,i?.id)},[s]);let c=uU(n,r,[e.value,e.children,r],e.keywords),l=KH(),u=lU(e=>e.value&&e.value===c.current),d=lU(e=>s||a.filter()===!1?!0:e.search?e.filtered.items.get(n)>0:!0);b.useEffect(()=>{let t=r.current;if(!(!t||e.disabled))return t.addEventListener(BH,f),()=>t.removeEventListener(BH,f)},[d,e.onSelect,e.disabled]);function f(){var e,t;p(),(t=(e=o.current).onSelect)==null||t.call(e,c.current)}function p(){l.setState(`value`,c.current,!0)}if(!d)return null;let{disabled:m,value:h,onSelect:g,forceMount:_,keywords:v,...y}=e;return b.createElement(FI.div,{ref:Yr(r,t),...y,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!m,"aria-selected":!!u,"data-disabled":!!m,"data-selected":!!u,onPointerMove:m||a.getDisablePointerSelection()?void 0:p,onClick:m?void 0:f},e.children)}),XH=b.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=GL(),s=b.useRef(null),c=b.useRef(null),l=GL(),u=WH(),d=lU(e=>i||u.filter()===!1?!0:e.search?e.filtered.groups.has(o):!0);sU(()=>u.group(o),[]),uU(o,s,[e.value,e.heading,c]);let f=b.useMemo(()=>({id:o,forceMount:i}),[i]);return b.createElement(FI.div,{ref:Yr(s,t),...a,"cmdk-group":``,role:`presentation`,hidden:d?void 0:!0},n&&b.createElement(`div`,{ref:c,"cmdk-group-heading":``,"aria-hidden":!0,id:l},n),pU(e,e=>b.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?l:void 0},b.createElement(qH.Provider,{value:f},e))))}),ZH=b.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=b.useRef(null),a=lU(e=>!e.search);return!n&&!a?null:b.createElement(FI.div,{ref:Yr(i,t),...r,"cmdk-separator":``,role:`separator`})}),QH=b.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=KH(),o=lU(e=>e.search),s=lU(e=>e.selectedItemId),c=WH();return b.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),b.createElement(FI.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:`text`,value:i?e.value:o,onChange:e=>{i||a.setState(`search`,e.target.value),n?.(e.target.value)}})}),$H=b.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,a=b.useRef(null),o=b.useRef(null),s=lU(e=>e.selectedItemId),c=WH();return b.useEffect(()=>{if(o.current&&a.current){let e=o.current,t=a.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),b.createElement(FI.div,{ref:Yr(a,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},pU(e,e=>b.createElement(`div`,{ref:Yr(o,c.listInnerRef),"cmdk-list-sizer":``},e)))}),eU=b.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return b.createElement(jH,{open:n,onOpenChange:r},b.createElement(MH,{container:o},b.createElement(NH,{"cmdk-overlay":``,className:i}),b.createElement(PH,{"aria-label":e.label,"cmdk-dialog":``,className:a},b.createElement(JH,{ref:t,...s}))))}),tU=b.forwardRef((e,t)=>lU(e=>e.filtered.count===0)?b.createElement(FI.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),nU=b.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return b.createElement(FI.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},pU(e,e=>b.createElement(`div`,{"aria-hidden":!0},e)))}),rU=Object.assign(JH,{List:$H,Item:YH,Input:QH,Group:XH,Separator:ZH,Dialog:eU,Empty:tU,Loading:nU});function iU(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function aU(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function oU(e){let t=b.useRef(e);return sU(()=>{t.current=e}),t}var sU=typeof window>`u`?b.useEffect:b.useLayoutEffect;function cU(e){let t=b.useRef();return t.current===void 0&&(t.current=e()),t}function lU(e){let t=KH(),n=()=>e(t.snapshot());return b.useSyncExternalStore(t.subscribe,n,n)}function uU(e,t,n,r=[]){let i=b.useRef(),a=WH();return sU(()=>{var o;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(VH,s),i.current=s}),i}var dU=()=>{let[e,t]=b.useState(),n=cU(()=>new Map);return sU(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function fU(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function pU({asChild:e,children:t},n){return e&&b.isValidElement(t)?b.cloneElement(fU(t),{ref:t.ref},n(t.props.children)):n(t)}var mU={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`},hU=qr(`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 gU({className:e,variant:t,asChild:n=!1,...r}){return(0,W.jsx)(n?ni:`span`,{"data-slot":`badge`,className:oI(hU({variant:t}),e),...r})}var _U=(0,b.forwardRef)(({className:e,...t},n)=>(0,W.jsx)(rU,{ref:n,"data-slot":`command`,className:oI(`bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md`,e),...t})),vU=(0,b.forwardRef)(({className:e,...t},n)=>(0,W.jsxs)(`div`,{className:`flex items-center border-b px-3`,"cmdk-input-wrapper":``,children:[(0,W.jsx)(rI,{className:`mr-2 h-4 w-4 shrink-0 opacity-50`}),(0,W.jsx)(rU.Input,{ref:n,className:oI(`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})]}));vU.displayName=rU.Input.displayName;function yU({className:e,...t}){return(0,W.jsx)(rU.List,{"data-slot":`command-list`,className:oI(`max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto`,e),...t})}function bU({className:e,...t}){return(0,W.jsx)(rU.Group,{"data-slot":`command-group`,className:oI(`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 xU({className:e,...t}){return(0,W.jsx)(rU.Item,{"data-slot":`command-item`,className:oI(`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 SU({multiple:e,items:t=[],selected:n,onValueChange:r,autoFocus:i=!1,disabled:a=!1,ariaDescribedby:o,ariaPlaceholder:s,onFocus:c,onBlur:l,className:u,id:d}){let f=(0,b.useRef)(null),[p,m]=(0,b.useState)(!1),[h,g]=(0,b.useState)(``),_=(0,b.useMemo)(()=>t.filter(e=>n.some(t=>CC(e.value,t))),[t,n]),v=(0,b.useMemo)(()=>t.filter(e=>!_.some(t=>CC(t.value,e.value))),[t,_]),y=(0,b.useCallback)(e=>{if(a)return;let t=_.filter(t=>!CC(t.value,e.value));r?.(t.map(e=>e.index))},[_,r,a]),x=(0,b.useCallback)(e=>{if(!(a||!f.current||f.current.value!==``))if(e.key===`Delete`||e.key===`Backspace`){let e=_.slice(0,-1);r?.(e.map(e=>e.index))}else e.key===`Escape`&&f.current.blur()},[_,r,a]),S=(0,b.useCallback)(t=>{if(a)return;g(``);let n=e?[..._,t]:[t];r?.(n.map(e=>e.index))},[e,_,r,a]),C=(0,b.useCallback)(e=>{a||m(!0),c?.(e)},[a,c]);return(0,W.jsxs)(_U,{onKeyDown:x,className:oI(`overflow-visible bg-transparent`,u),autoFocus:i,"aria-disabled":a,onBlur:l,onFocus:C,"aria-describedby":o,"aria-placeholder":s,children:[(0,W.jsx)(`div`,{className:oI(`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`,a&&`opacity-50 cursor-not-allowed`),children:(0,W.jsxs)(`div`,{className:`flex gap-1 flex-wrap`,children:[_.map(e=>(0,W.jsxs)(gU,{variant:`secondary`,children:[e.label,(0,W.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:t=>t.key===`Enter`&&!a&&y(e),onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},onClick:()=>y(e),disabled:a,children:(0,W.jsx)(aI,{className:oI(`h-3 w-3 text-muted-foreground hover:text-foreground`,a&&`pointer-events-none`)})})]},e.value)),(0,W.jsx)(rU.Input,{ref:f,value:h,onValueChange:g,onBlur:()=>m(!1),onFocus:()=>!a&&m(!0),placeholder:`Select ...`,className:`rtl:mr-2 ltr:ml-2 bg-transparent outline-none placeholder:text-muted-foreground flex-1`,disabled:a,"aria-controls":`command-item-input-${d}`,"aria-labelledby":`command-item-input-${d}`,id:`command-item-input-${d}`})]})}),p&&!a&&v.length>0&&(0,W.jsx)(`div`,{className:`relative mt-2`,children:(0,W.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:(0,W.jsx)(bU,{className:`h-full overflow-auto`,children:(0,W.jsx)(yU,{children:v.map(e=>(0,W.jsx)(xU,{disabled:e.disabled,onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},"aria-controls":`${e.value}-command-item`,"aria-labelledby":`${e.value}-command-item`,id:`${e.value}-command-item`,onSelect:()=>S(e),className:`cursor-pointer`,children:e.label},`${e.value}-command-item`))})})})})]})}function CU({items:e,selected:t,onValueChange:n,autoFocus:r=!1,disabled:i=!1,required:a=!1,placeholder:o=`Select...`,ariaDescribedby:s,ariaPlaceholder:c,onFocus:l,onBlur:u,className:d}){let[f,p]=(0,b.useState)(!1),m=e?.find(e=>e.value===t),h=(0,b.useRef)(null),g=(0,b.useRef)(null);(0,b.useEffect)(()=>{f&&h.current&&requestAnimationFrame(()=>{var e;(e=h.current)==null||e.scrollIntoView({block:`nearest`})})},[f]);let _=e=>{g.current&&!g.current.contains(e.relatedTarget)&&p(!1),u?.(e)};return(0,W.jsxs)(_U,{ref:g,className:oI(`overflow-visible bg-transparent`,d),autoFocus:r,"aria-disabled":i,onBlur:_,onFocus:l,"aria-describedby":s,"aria-placeholder":c,children:[(0,W.jsxs)(`div`,{onClick:()=>!i&&p(!f),className:oI(`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`,!m&&a&&`border-red-500`,i&&`opacity-50 cursor-not-allowed`,d),children:[(0,W.jsx)(`span`,{className:oI(`flex-1 line-clamp-1`,!m&&`text-muted-foreground`),children:m?.label||o}),(0,W.jsx)(ZF,{className:`h-4 w-4 opacity-50`})]}),(0,W.jsx)(`div`,{className:`relative`,children:f&&e&&e.length>0?(0,W.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:(0,W.jsx)(bU,{className:`h-full overflow-auto`,children:(0,W.jsx)(yU,{children:e.map(e=>(0,W.jsxs)(xU,{ref:e.value===t?h:void 0,onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},onSelect:()=>{e.disabled||(n?.(e.value),p(!1))},className:oI(`cursor-pointer relative flex items-center justify-between rounded-sm py-1.5 gap-2 rtl:flex-row-reverse`,e.value===t&&`font-semibold`,e.disabled&&`opacity-50 cursor-not-allowed`),children:[(0,W.jsx)(`span`,{children:e.label}),(0,W.jsx)(`span`,{className:`flex h-3.5 w-3.5 items-center justify-center`,children:e.value===t&&(0,W.jsx)(XF,{className:`h-4 w-4`})})]},e.value))})})}):null})]})}function wU({id:e,options:t,required:n,disabled:r,readonly:i,value:a,multiple:o,autofocus:s,onChange:c,onBlur:l,onFocus:u,defaultValue:d,placeholder:f,rawErrors:p=[],className:m}){let{enumOptions:h,enumDisabled:g,emptyValue:_}=t,v=()=>{u(e,Qk(a,h,_))},y=()=>{l(e,Qk(a,h,_))},b=h?.map(({value:e,label:t},n)=>({value:o?e:n.toString(),label:t,index:n,disabled:Array.isArray(g)&&g.includes(e)})),x=oI({"border-destructive":p.length>0},m);return(0,W.jsx)(`div`,{className:`p-0.5`,children:o?(0,W.jsx)(SU,{id:e,autoFocus:s,disabled:r||i,multiple:!0,className:x,items:b,selected:a,onValueChange:e=>{c(Qk(e,h,_))},onFocus:v,onBlur:y}):(0,W.jsx)(CU,{items:b,selected:tA(a??d,h,!1),onValueChange:e=>{c(Qk(e,h,_))},autoFocus:s,disabled:r||i,required:n,placeholder:f,className:x,onFocus:v,onBlur:y,ariaDescribedby:OA(e)})})}function TU({className:e,...t}){return(0,W.jsx)(`textarea`,{"data-slot":`textarea`,className:oI(`border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`,e),...t})}function EU({id:e,htmlName:t,placeholder:n,value:r,required:i,disabled:a,autofocus:o,readonly:s,onBlur:c,onFocus:l,onChange:u,options:d,className:f}){return(0,W.jsx)(`div`,{className:`flex p-0.5`,children:(0,W.jsx)(TU,{id:e,name:t||e,placeholder:n,disabled:a,readOnly:s,value:r??``,required:i,autoFocus:o,rows:d.rows||5,onChange:({target:{value:e}})=>u(e===``?d.emptyValue:e),onBlur:({target:t})=>c(e,t&&t.value),onFocus:({target:t})=>l(e,t&&t.value),"aria-describedby":OA(e),className:f})})}function DU(){return{CheckboxWidget:BL,CheckboxesWidget:VL,RadioWidget:GR,RangeWidget:Fz,SelectWidget:wU,TextareaWidget:EU}}function OU(){return{templates:GI(),widgets:DU()}}OU();function kU(){return kF(OU())}var AU=kU();function jU({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=b.useRef(e!==void 0),[a,o]=b.useState(t);return[i?e:a,b.useCallback(e=>{i||o(e)},[])]}var $=typeof document<`u`?b.useLayoutEffect:()=>{},MU={};function NU(e,t){let n=b.useRef(MU);return n.current===MU&&(n.current=e(t)),n}var PU=b[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],FU=PU&&PU!==b.useLayoutEffect?PU:e=>e();function IU(e){let t=NU(LU).current;return t.next=e,FU(t.effect),t.trampoline}function LU(){let e={next:void 0,callback:RU,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function RU(){}function zU(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var BU=zU(`https://base-ui.com/production-error`,`Base UI`);function VU(e,t,n,r){let i=NU(UU).current;return WU(i,e,t,n,r)&&KU(i,[e,t,n,r]),i.callback}function HU(e){let t=NU(UU).current;return GU(t,e)&&KU(t,e),t.callback}function UU(){return{callback:null,cleanup:null,refs:[]}}function WU(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function GU(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function KU(e,t){if(e.refs=t,t.every(e=>e==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n;break;default:}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null;break;default:}}}}}}var qU=19;function JU(e){return qU>=e}function YU(e){if(!b.isValidElement(e))return null;let t=e,n=t.props;return(JU(19)?n?.ref:t.ref)??null}function XU(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function ZU(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e);continue}i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function QU(e,t){return typeof e==`function`?e(t):e}function $U(e,t){return typeof e==`function`?e(t):e}var eW={};function tW(e,t,n,r,i){let a={...sW(e,eW)};return t&&(a=rW(a,t)),n&&(a=rW(a,n)),r&&(a=rW(a,r)),i&&(a=rW(a,i)),a}function nW(e){if(e.length===0)return eW;if(e.length===1)return sW(e[0],eW);let t={...sW(e[0],eW)};for(let n=1;n<e.length;n+=1)t=rW(t,e[n]);return t}function rW(e,t){return oW(t)?t(e):iW(e,t)}function iW(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=XU(e.style,r);break;case`className`:e[n]=uW(e.className,r);break;default:aW(n,r)?e[n]=cW(e[n],r):e[n]=r}}return e}function aW(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function oW(e){return typeof e==`function`}function sW(e,t){return oW(e)?e(t):e??eW}function cW(e,t){return t?e?n=>{if(dW(n)){let r=n;lW(r);let i=t(r);return r.baseUIHandlerPrevented||e?.(r),i}let r=t(n);return e?.(n),r}:t:e}function lW(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function uW(e,t){return t?e?t+` `+e:t:e}function dW(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function fW(){}var pW=Object.freeze([]),mW=Object.freeze({}),hW={style:{transition:`none`}},gW=`data-base-ui-click-trigger`,_W={fallbackAxisSide:`none`},vW={fallbackAxisSide:`end`},yW={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0};function bW(e,t,n={}){let r=t.render,i=xW(t,n);return n.enabled===!1?null:CW(e,r,i,n.state??mW)}function xW(e,t={}){let{className:n,style:r,render:i}=e,{state:a=mW,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?QU(n,a):void 0,d=l?$U(r,a):void 0,f=l?ZU(a,c):mW,p=l?XU(f,Array.isArray(s)?nW(s):s)??mW:mW;return typeof document<`u`&&(l?Array.isArray(o)?p.ref=HU([p.ref,YU(i),...o]):p.ref=VU(p.ref,YU(i),o):VU(null,null)),l?(u!==void 0&&(p.className=uW(p.className,u)),d!==void 0&&(p.style=XU(p.style,d)),p):mW}var SW=Symbol.for(`react.lazy`);function CW(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=tW(n,t.props);e.ref=n.ref;let i=t;return i?.$$typeof===SW&&(i=b.Children.toArray(t)[0]),b.cloneElement(i,e)}if(e&&typeof e==`string`)return wW(e,n);throw Error(BU(8))}function wW(e,t){return e===`button`?(0,b.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,b.createElement)(`img`,{alt:``,...t,key:t.key}):b.createElement(e,t)}var TW=b.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function EW(){return b.useContext(TW)}function DW(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=IU(i),o=b.useRef(0),s=NU(kW).current,c=NU(OW).current,[l,u]=b.useState(0),d=b.useRef(l),f=IU((e,t)=>{c.set(e,t??null),d.current+=1,u(d.current)}),p=IU(e=>{c.delete(e),d.current+=1,u(d.current)}),m=b.useMemo(()=>{let e=new Map;return Array.from(c.keys()).filter(e=>e.isConnected).sort(AW).forEach((t,n)=>{let r=c.get(t)??{};e.set(t,{...r,index:n})}),e},[c,l]);$(()=>{if(typeof MutationObserver!=`function`||m.size===0)return;let e=new MutationObserver(e=>{let t=new Set,n=e=>t.has(e)?t.delete(e):t.add(e);e.forEach(e=>{e.removedNodes.forEach(n),e.addedNodes.forEach(n)}),t.size===0&&(d.current+=1,u(d.current))});return m.forEach((t,n)=>{n.parentElement&&e.observe(n.parentElement,{childList:!0})}),()=>{e.disconnect()}},[m]),$(()=>{d.current===l&&(n.current.length!==m.size&&(n.current.length=m.size),r&&r.current.length!==m.size&&(r.current.length=m.size),o.current=m.size),a(m)},[a,m,n,r,l]),$(()=>()=>{n.current=[]},[n]),$(()=>()=>{r&&(r.current=[])},[r]);let h=IU(e=>(s.add(e),()=>{s.delete(e)}));$(()=>{s.forEach(e=>e(m))},[s,m]);let g=b.useMemo(()=>({register:f,unregister:p,subscribeMapChange:h,elementsRef:n,labelsRef:r,nextIndexRef:o}),[f,p,h,n,r,o]);return(0,W.jsx)(TW.Provider,{value:g,children:t})}function OW(){return new Map}function kW(){return new Set}function AW(e,t){let 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}var jW=b.createContext(void 0);function MW(){return b.useContext(jW)?.direction??`ltr`}var NW=b.createContext(void 0);function PW(){let e=b.useContext(NW);if(e===void 0)throw Error(BU(64));return e}var FW=function(e){return e.activationDirection=`data-activation-direction`,e.orientation=`data-orientation`,e}({}),IW={tabActivationDirection:e=>({[FW.activationDirection]:e})},LW=b.forwardRef(function(e,t){let{className:n,defaultValue:r=0,onValueChange:i,orientation:a=`horizontal`,render:o,value:s,...c}=e,l=MW(),u=Object.hasOwn(e,`defaultValue`),d=b.useRef([]),[f,p]=b.useState(()=>new Map),[m,h]=jU({controlled:s,default:r,name:`Tabs`,state:`value`}),g=s!==void 0,[_,v]=b.useState(()=>new Map),[y,x]=b.useState(`none`),S=IU((e,t)=>{i?.(e,t),!t.isCanceled&&(h(e),x(t.activationDirection))}),C=IU((e,t)=>{p(n=>{if(n.get(e)===t)return n;let r=new Map(n);return r.set(e,t),r})}),w=IU((e,t)=>{p(n=>{if(!n.has(e)||n.get(e)!==t)return n;let r=new Map(n);return r.delete(e),r})}),T=b.useCallback(e=>f.get(e),[f]),E=b.useCallback(e=>{for(let t of _.values())if(e===t?.value)return t?.id},[_]),D=b.useCallback(e=>{if(e===void 0)return null;for(let[t,n]of _.entries())if(n!=null&&e===(n.value??n.index))return t;return null},[_]),O=b.useMemo(()=>({direction:l,getTabElementBySelectedValue:D,getTabIdByPanelValue:E,getTabPanelIdByValue:T,onValueChange:S,orientation:a,registerMountedTabPanel:C,setTabMap:v,unregisterMountedTabPanel:w,tabActivationDirection:y,value:m}),[l,D,E,T,S,a,C,v,w,y,m]),k=b.useMemo(()=>{for(let e of _.values())if(e!=null&&e.value===m)return e},[_,m]),A=b.useMemo(()=>{for(let e of _.values())if(e!=null&&!e.disabled)return e.value},[_]);$(()=>{if(g||_.size===0)return;let e=k?.disabled;if(u&&e&&m===r||!e&&!(k==null&&m!==null))return;let t=A??null;m!==t&&(h(t),x(`none`))},[r,A,u,g,k,x,h,_,m]);let j=bW(`div`,e,{state:{orientation:a,tabActivationDirection:y},ref:t,props:c,stateAttributesMapping:IW});return(0,W.jsx)(NW.Provider,{value:O,children:(0,W.jsx)(DW,{elementsRef:d,children:j})})});function RW(){return typeof window<`u`}function zW(e){return HW(e)?(e.nodeName||``).toLowerCase():`#document`}function BW(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function VW(e){return((HW(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function HW(e){return RW()?e instanceof Node||e instanceof BW(e).Node:!1}function UW(e){return RW()?e instanceof Element||e instanceof BW(e).Element:!1}function WW(e){return RW()?e instanceof HTMLElement||e instanceof BW(e).HTMLElement:!1}function GW(e){return!RW()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof BW(e).ShadowRoot}function KW(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=rG(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function qW(e){return/^(table|td|th)$/.test(zW(e))}function JW(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var YW=/transform|translate|scale|rotate|perspective|filter/,XW=/paint|layout|strict|content/,ZW=e=>!!e&&e!==`none`,QW;function $W(e){let t=UW(e)?rG(e):e;return ZW(t.transform)||ZW(t.translate)||ZW(t.scale)||ZW(t.rotate)||ZW(t.perspective)||!tG()&&(ZW(t.backdropFilter)||ZW(t.filter))||YW.test(t.willChange||``)||XW.test(t.contain||``)}function eG(e){let t=aG(e);for(;WW(t)&&!nG(t);){if($W(t))return t;if(JW(t))return null;t=aG(t)}return null}function tG(){return QW??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),QW}function nG(e){return/^(html|body|#document)$/.test(zW(e))}function rG(e){return BW(e).getComputedStyle(e)}function iG(e){return UW(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function aG(e){if(zW(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||GW(e)&&e.host||VW(e);return GW(t)?t.host:t}function oG(e){let t=aG(e);return nG(t)?e.ownerDocument?e.ownerDocument.body:e.body:WW(t)&&KW(t)?t:oG(t)}function sG(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=oG(e),i=r===e.ownerDocument?.body,a=BW(r);if(i){let e=cG(a);return t.concat(a,a.visualViewport||[],KW(r)?r:[],e&&n?sG(e):[])}else return t.concat(r,sG(r,[],n))}function cG(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function lG(e){return e?.ownerDocument||document}var uG={...b},dG=0;function fG(e,t=`mui`){let[n,r]=b.useState(e),i=e||n;return b.useEffect(()=>{n??(dG+=1,r(`${t}-${dG}`))},[n,t]),i}var pG=uG.useId;function mG(e,t){if(pG!==void 0){let n=pG();return e??(t?`${t}-${n}`:n)}return fG(e,t)}function hG(e){return mG(e,`base-ui`)}var gG=b.createContext(void 0);function _G(e=!1){let t=b.useContext(gG);if(t===void 0&&!e)throw Error(BU(16));return t}function vG(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:b.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}}function yG(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=b.useRef(null),s=_G(!0),c=a??s!==void 0,{props:l}=vG({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:r,isNativeButton:i}),u=b.useCallback(()=>{let e=o.current;bG(e)&&c&&t&&l.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,l.disabled,c]);return $(u,[u]),{getButtonProps:b.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...u}=e;return tW({type:i?`button`:void 0,onClick(e){if(t){e.preventDefault();return}n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(lW(e),o?.(e),e.baseUIHandlerPrevented))return;let r=e.target===e.currentTarget,a=e.currentTarget,s=bG(a),l=!i&&xG(a),u=r&&(i?s:!l),d=e.key===`Enter`,f=e.key===` `,p=a.getAttribute(`role`),m=p?.startsWith(`menuitem`)||p===`option`||p===`gridcell`;if(r&&c&&f){if(e.defaultPrevented&&m)return;e.preventDefault(),l||i&&s?(a.click(),e.preventBaseUIHandler()):u&&(n?.(e),e.preventBaseUIHandler());return}u&&(!i&&(f||d)&&e.preventDefault(),!i&&d&&n?.(e))},onKeyUp(e){if(!t){if(lW(e),a?.(e),e.target===e.currentTarget&&i&&c&&bG(e.currentTarget)&&e.key===` `){e.preventDefault();return}e.baseUIHandlerPrevented||e.target===e.currentTarget&&!i&&!c&&e.key===` `&&n?.(e)}},onPointerDown(e){if(t){e.preventDefault();return}s?.(e)}},i?void 0:{role:`button`},l,u)},[t,l,c,i]),buttonRef:IU(e=>{o.current=e,u()})}}function bG(e){return WW(e)&&e.tagName===`BUTTON`}function xG(e){return!!(e?.tagName===`A`&&e?.href)}var SG=`data-composite-item-active`,CG=function(e){return e[e.None=0]=`None`,e[e.GuessFromOrder=1]=`GuessFromOrder`,e}({});function wG(e={}){let{label:t,metadata:n,textRef:r,indexGuessBehavior:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,elementsRef:l,labelsRef:u,nextIndexRef:d}=EW(),f=b.useRef(-1),[p,m]=b.useState(a??(i===CG.GuessFromOrder?()=>{if(f.current===-1){let e=d.current;d.current+=1,f.current=e}return f.current}:-1)),h=b.useRef(null),g=b.useCallback(e=>{if(h.current=e,p!==-1&&e!==null&&(l.current[p]=e,u)){let n=t!==void 0;u.current[p]=n?t:r?.current?.textContent??e.textContent}},[p,l,u,t,r]);return $(()=>{if(a!=null)return;let e=h.current;if(e)return o(e,n),()=>{s(e)}},[a,o,s,n]),$(()=>{if(a==null)return c(e=>{let t=h.current?e.get(h.current)?.index:null;t!=null&&m(t)})},[a,c,m]),b.useMemo(()=>({ref:g,index:p}),[p,g])}function TG(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=_G(),{ref:i,index:a}=wG(e),o=n===a,s=b.useRef(null),c=VU(i,s);return{compositeProps:b.useMemo(()=>({tabIndex:o?0:-1,onFocus(){r(a)},onMouseMove(){let e=s.current;if(!t||!e)return;let n=e.hasAttribute(`disabled`)||e.ariaDisabled===`true`;!o&&!n&&e.focus()}}),[o,r,a,t]),compositeRef:c,index:a}}var EG=b.createContext(void 0);function DG(){let e=b.useContext(EG);if(e===void 0)throw Error(BU(65));return e}var OG=`none`,kG=`trigger-press`,AG=`trigger-hover`,jG=`outside-press`,MG=`item-press`,NG=`close-press`,PG=`focus-out`,FG=`escape-key`,IG=`list-navigation`,LG=`cancel-open`,RG=`imperative-action`,zG=`window-resize`;function BG(e,t,n,r){let i=!1,a=!1,o=r??mW;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}var VG=typeof navigator<`u`,HG=XG(),UG=QG(),WG=ZG(),GG=typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter:none`),KG=HG.platform===`MacIntel`&&HG.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(HG.platform);VG&&/firefox/i.test(WG);var qG=VG&&/apple/i.test(navigator.vendor);VG&&/Edg/i.test(WG);var JG=VG&&/android/i.test(UG)||/android/i.test(WG);VG&&UG.toLowerCase().startsWith(`mac`)&&navigator.maxTouchPoints;var YG=WG.includes(`jsdom/`);function XG(){if(!VG)return{platform:``,maxTouchPoints:-1};let e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??-1}}function ZG(){if(!VG)return``;let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(` `):navigator.userAgent}function QG(){if(!VG)return``;let e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??``}var $G=`data-base-ui-focusable`,eK=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,tK=`ArrowLeft`,nK=`ArrowRight`,rK=`ArrowUp`,iK=`ArrowDown`;function aK(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function oK(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&GW(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function sK(e,t){if(!UW(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(`data-trigger-disabled`);for(let[,e]of t.entries())if(oK(e,n))return!e.hasAttribute(`data-trigger-disabled`);return!1}function cK(e){return`composedPath`in e?e.composedPath()[0]:e.target}function lK(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function uK(e){return e.matches(`html,body`)}function dK(e){return WW(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function fK(e){return e?e.getAttribute(`role`)===`combobox`&&dK(e):!1}function pK(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function mK(e,t,n=!0){return e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...mK(e,t.id,n)])}function hK(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function gK(e){e.preventDefault(),e.stopPropagation()}function _K(e){return`nativeEvent`in e}function vK(e){return e.pointerType===``&&e.isTrusted?!0:JG&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function yK(e){return YG?!1:!JG&&e.width===0&&e.height===0||JG&&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 bK(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function xK(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}var SK=[`top`,`right`,`bottom`,`left`],CK=Math.min,wK=Math.max,TK=Math.round,EK=Math.floor,DK=e=>({x:e,y:e}),OK={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function kK(e,t,n){return wK(e,CK(t,n))}function AK(e,t){return typeof e==`function`?e(t):e}function jK(e){return e.split(`-`)[0]}function MK(e){return e.split(`-`)[1]}function NK(e){return e===`x`?`y`:`x`}function PK(e){return e===`y`?`height`:`width`}function FK(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function IK(e){return NK(FK(e))}function LK(e,t,n){n===void 0&&(n=!1);let r=MK(e),i=IK(e),a=PK(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=KK(o)),[o,KK(o)]}function RK(e){let t=KK(e);return[zK(e),t,zK(t)]}function zK(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var BK=[`left`,`right`],VK=[`right`,`left`],HK=[`top`,`bottom`],UK=[`bottom`,`top`];function WK(e,t,n){switch(e){case`top`:case`bottom`:return n?t?VK:BK:t?BK:VK;case`left`:case`right`:return t?HK:UK;default:return[]}}function GK(e,t,n,r){let i=MK(e),a=WK(jK(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(zK)))),a}function KK(e){let t=jK(e);return OK[t]+e.slice(t.length)}function qK(e){return{top:0,right:0,bottom:0,left:0,...e}}function JK(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:qK(e)}function YK(e){let{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 XK(e,t,n){return Math.floor(e/t)!==n}function ZK(e,t){return t<0||t>=e.current.length}function QK(e,t){return eq(e,{disabledIndices:t})}function $K(e,t){return eq(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function eq(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.current.length-1&&aq(e,a,r));return a}function tq(e,{event:t,orientation:n,loopFocus:r,rtl:i,cols:a,disabledIndices:o,minIndex:s,maxIndex:c,prevIndex:l,stopEvent:u=!1}){let d=l,f;if(t.key===`ArrowUp`?f=`up`:t.key===`ArrowDown`&&(f=`down`),f){let n=[],i=[],p=!1,m=0;{let t=null,r=-1;e.current.forEach((e,a)=>{if(e==null)return;m+=1;let o=e.closest(`[role="row"]`);o&&(p=!0),(o!==t||r===-1)&&(t=o,r+=1,n[r]=[]),n[r].push(a),i[a]=r})}let h=!1,g=0;if(p)for(let e of n){let t=e.length;t>g&&(g=t),t!==a&&(h=!0)}let _=h&&m<e.current.length,v=g||a,y=t=>{if(!h||l===-1)return;let a=i[l];if(a==null)return;let s=n[a].indexOf(l),c=t===`up`?-1:1;for(let t=a+c,i=0;i<n.length;i+=1,t+=c){if(t<0||t>=n.length){if(!r||_)return;t=t<0?n.length-1:0}let i=n[t];for(let t=Math.min(s,i.length-1);t>=0;--t){let n=i[t];if(!aq(e,n,o))return n}}},b=t=>{if(!_||l===-1)return;let n=l%v,i=t===`up`?-v:v,a=c-c%v,s=EK(c/v)+1;for(let t=l-n+i,u=0;u<s;u+=1,t+=i){if(t<0||t>c){if(!r)return;t=t<0?a:0}let i=Math.min(t+v-1,c);for(let r=Math.min(t+n,i);r>=t;--r)if(!aq(e,r,o))return r}};u&&gK(t);let x=y(f)??b(f);if(x!==void 0)d=x;else if(l===-1)d=f===`up`?c:s;else if(d=eq(e,{startingIndex:l,amount:v,decrement:f===`up`,disabledIndices:o}),r){if(f===`up`&&(l-v<s||d<0)){let e=l%v,t=c%v,n=c-(t-e);d=t===e?c:t>e?n:n-v}f===`down`&&l+v>c&&(d=eq(e,{startingIndex:l%v-v,amount:v,disabledIndices:o}))}ZK(e,d)&&(d=l)}if(n===`both`){let n=EK(l/a);t.key===(i?`ArrowLeft`:`ArrowRight`)&&(u&&gK(t),l%a===a-1?r&&(d=eq(e,{startingIndex:l-l%a-1,disabledIndices:o})):(d=eq(e,{startingIndex:l,disabledIndices:o}),r&&XK(d,a,n)&&(d=eq(e,{startingIndex:l-l%a-1,disabledIndices:o}))),XK(d,a,n)&&(d=l)),t.key===(i?`ArrowRight`:`ArrowLeft`)&&(u&&gK(t),l%a===0?r&&(d=eq(e,{startingIndex:l+(a-l%a),decrement:!0,disabledIndices:o})):(d=eq(e,{startingIndex:l,decrement:!0,disabledIndices:o}),r&&XK(d,a,n)&&(d=eq(e,{startingIndex:l+(a-l%a),decrement:!0,disabledIndices:o}))),XK(d,a,n)&&(d=l));let s=EK(c/a)===n;ZK(e,d)&&(d=r&&s?t.key===(i?`ArrowRight`:`ArrowLeft`)?c:eq(e,{startingIndex:l-l%a-1,disabledIndices:o}):l)}return d}function nq(e,t,n){let r=[],i=0;return e.forEach(({width:e,height:a},o)=>{let s=!1;for(n&&(i=0);!s;){let n=[];for(let r=0;r<e;r+=1)for(let e=0;e<a;e+=1)n.push(i+r+e*t);i%t+e<=t&&n.every(e=>r[e]==null)?(n.forEach(e=>{r[e]=o}),s=!0):i+=1}}),[...r]}function rq(e,t,n,r,i){if(e===-1)return-1;let a=n.indexOf(e),o=t[e];switch(i){case`tl`:return a;case`tr`:return o?a+o.width-1:a;case`bl`:return o?a+(o.height-1)*r:a;case`br`:return n.lastIndexOf(e);default:return-1}}function iq(e,t){return t.flatMap((t,n)=>e.includes(t)?[n]:[])}function aq(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e.current[t];return r?oq(r)?!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!0:!1}function oq(e){return rG(e).display!==`none`}var sq=[`input:not([inert]):not([inert] *)`,`select:not([inert]):not([inert] *)`,`textarea:not([inert]):not([inert] *)`,`a[href]:not([inert]):not([inert] *)`,`button:not([inert]):not([inert] *)`,`[tabindex]:not(slot):not([inert]):not([inert] *)`,`audio[controls]:not([inert]):not([inert] *)`,`video[controls]:not([inert]):not([inert] *)`,`[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)`,`details>summary:first-of-type:not([inert]):not([inert] *)`,`details:not([inert]):not([inert] *)`].join(`,`),cq=typeof Element>`u`,lq=cq?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,uq=!cq&&Element.prototype.getRootNode?function(e){return e?.getRootNode?.call(e)}:function(e){return e?.ownerDocument},dq=function(e,t){t===void 0&&(t=!0);var n=e?.getAttribute?.call(e,`inert`);return n===``||n===`true`||t&&e&&(typeof e.closest==`function`?e.closest(`[inert]`):dq(e.parentNode))},fq=function(e){var t=e?.getAttribute?.call(e,`contenteditable`);return t===``||t===`true`},pq=function(e,t,n){if(dq(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(sq));return t&&lq.call(e,sq)&&r.unshift(e),r=r.filter(n),r},mq=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var a=i.shift();if(!dq(a,!1))if(a.tagName===`SLOT`){var o=a.assignedElements(),s=mq(o.length?o:a.children,!0,n);n.flatten?r.push.apply(r,s):r.push({scopeParent:a,candidates:s})}else{lq.call(a,sq)&&n.filter(a)&&(t||!e.includes(a))&&r.push(a);var c=a.shadowRoot||typeof n.getShadowRoot==`function`&&n.getShadowRoot(a),l=!dq(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&l){var u=mq(c===!0?a.children:c.children,!0,n);n.flatten?r.push.apply(r,u):r.push({scopeParent:a,candidates:u})}else i.unshift.apply(i,a.children)}}return r},hq=function(e){return!isNaN(parseInt(e.getAttribute(`tabindex`),10))},gq=function(e){if(!e)throw Error(`No node provided`);return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||fq(e))&&!hq(e)?0:e.tabIndex},_q=function(e,t){var n=gq(e);return n<0&&t&&!hq(e)?0:n},vq=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},yq=function(e){return e.tagName===`INPUT`},bq=function(e){return yq(e)&&e.type===`hidden`},xq=function(e){return e.tagName===`DETAILS`&&Array.prototype.slice.apply(e.children).some(function(e){return e.tagName===`SUMMARY`})},Sq=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},Cq=function(e){if(!e.name)return!0;var t=e.form||uq(e),n=function(e){return t.querySelectorAll(`input[type="radio"][name="`+e+`"]`)},r;if(typeof window<`u`&&window.CSS!==void 0&&typeof window.CSS.escape==`function`)r=n(window.CSS.escape(e.name));else try{r=n(e.name)}catch(e){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`,e.message),!1}var i=Sq(r,e.form);return!i||i===e},wq=function(e){return yq(e)&&e.type===`radio`},Tq=function(e){return wq(e)&&!Cq(e)},Eq=function(e){var t=e&&uq(e),n=t?.host,r=!1;if(t&&t!==e){var i,a,o;for(r=!!((i=n)!=null&&(a=i.ownerDocument)!=null&&a.contains(n)||e!=null&&(o=e.ownerDocument)!=null&&o.contains(e));!r&&n;){var s,c;t=uq(n),n=t?.host,r=!!((s=n)!=null&&(c=s.ownerDocument)!=null&&c.contains(n))}}return r},Dq=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},Oq=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(n===`full-native`&&`checkVisibility`in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if(getComputedStyle(e).visibility===`hidden`)return!0;var i=lq.call(e,`details>summary:first-of-type`)?e.parentElement:e;if(lq.call(i,`details:not([open]) *`))return!0;if(!n||n===`full`||n===`full-native`||n===`legacy-full`){if(typeof r==`function`){for(var a=e;e;){var o=e.parentElement,s=uq(e);if(o&&!o.shadowRoot&&r(o)===!0)return Dq(e);e=e.assignedSlot?e.assignedSlot:!o&&s!==e.ownerDocument?s.host:o}e=a}if(Eq(e))return!e.getClientRects().length;if(n!==`legacy-full`)return!0}else if(n===`non-zero-area`)return Dq(e);return!1},kq=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName===`FIELDSET`&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if(r.tagName===`LEGEND`)return lq.call(t,`fieldset[disabled] *`)?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},Aq=function(e,t){return!(t.disabled||bq(t)||Oq(t,e)||xq(t)||kq(t))},jq=function(e,t){return!(Tq(t)||gq(t)<0||!Aq(e,t))},Mq=function(e){var t=parseInt(e.getAttribute(`tabindex`),10);return!!(isNaN(t)||t>=0)},Nq=function(e){var t=[],n=[];return e.forEach(function(e,r){var i=!!e.scopeParent,a=i?e.scopeParent:e,o=_q(a,i),s=i?Nq(e.candidates):a;o===0?i?t.push.apply(t,s):t.push(a):n.push({documentOrder:r,tabIndex:o,item:e,isScope:i,content:s})}),n.sort(vq).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},Pq=function(e,t){return t||={},Nq(t.getShadowRoot?mq([e],t.includeContainer,{filter:jq.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Mq}):pq(e,t.includeContainer,jq.bind(null,t)))},Fq=function(e,t){return t||={},t.getShadowRoot?mq([e],t.includeContainer,{filter:Aq.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):pq(e,t.includeContainer,Aq.bind(null,t))},Iq=function(e,t){if(t||={},!e)throw Error(`No node provided`);return lq.call(e,sq)===!1?!1:jq(t,e)},Lq=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver==`function`&&ResizeObserver.toString().includes(`[native code]`)?`full`:`none`});function Rq(e,t){let n=Pq(e,Lq()),r=n.length;if(r===0)return;let i=aK(lG(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function zq(e){return Rq(lG(e).body,1)||e}function Bq(e){return Rq(lG(e).body,-1)||e}function Vq(e,t){if(!e)return null;let n=Pq(lG(e).body,Lq()),r=n.length;if(r===0)return null;let i=n.indexOf(e);return i===-1?null:n[(i+t+r)%r]}function Hq(e){return Vq(e,1)}function Uq(e){return Vq(e,-1)}function Wq(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!oK(n,r)}function Gq(e){Pq(e,Lq()).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function Kq(e){e.querySelectorAll(`[data-tabindex]`).forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}var qq=b.forwardRef(function(e,t){let{className:n,disabled:r=!1,render:i,value:a,id:o,nativeButton:s=!0,...c}=e,{value:l,getTabPanelIdByValue:u,orientation:d}=PW(),{activateOnFocus:f,highlightedTabIndex:p,onTabActivation:m,registerTabResizeObserverElement:h,setHighlightedTabIndex:g,tabsListElement:_}=DG(),v=hG(o),{compositeProps:y,compositeRef:x,index:S}=TG({metadata:b.useMemo(()=>({disabled:r,id:v,value:a}),[r,v,a])}),C=a===l,w=b.useRef(!1),T=b.useRef(null);b.useEffect(()=>{let e=T.current;if(e)return h(e)},[h]),$(()=>{if(w.current){w.current=!1;return}if(!(C&&S>-1&&p!==S))return;let e=_;if(e!=null){let t=aK(lG(e));if(t&&oK(e,t))return}r||g(S)},[C,S,p,g,r,_]);let{getButtonProps:E,buttonRef:D}=yG({disabled:r,native:s,focusableWhenDisabled:!0}),O=u(a),k=b.useRef(!1),A=b.useRef(!1);function j(e){C||r||m(a,BG(OG,e.nativeEvent,void 0,{activationDirection:`none`}))}function M(e){C||(S>-1&&!r&&g(S),!r&&f&&(!k.current||k.current&&A.current)&&m(a,BG(OG,e.nativeEvent,void 0,{activationDirection:`none`})))}function N(e){if(C||r)return;k.current=!0;function t(){k.current=!1,A.current=!1}(!e.button||e.button===0)&&(A.current=!0,lG(e.currentTarget).addEventListener(`pointerup`,t,{once:!0}))}return bW(`button`,e,{state:{disabled:r,active:C,orientation:d},ref:[t,D,x,T],props:[y,{role:`tab`,"aria-controls":O,"aria-selected":C,id:v,onClick:j,onFocus:M,onPointerDown:N,[SG]:C?``:void 0,onKeyDownCapture(){w.current=!0}},c,E]})}),Jq=[];function Yq(e){b.useEffect(e,Jq)}var Xq=b.createContext(void 0),Zq={disableStyleElements:!1};function Qq(){return b.useContext(Xq)??Zq}function $q(e){return JU(19)?e:e?`true`:void 0}var eJ=function(e){return e.startingStyle=`data-starting-style`,e.endingStyle=`data-ending-style`,e}({}),tJ={[eJ.startingStyle]:``},nJ={[eJ.endingStyle]:``},rJ={transitionStatus(e){return e===`starting`?tJ:e===`ending`?nJ:null}},iJ=null;globalThis.requestAnimationFrame;var aJ=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||=(requestAnimationFrame(this.tick),!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||(this.callbacks[t]=null,--this.callbacksCount)}},oJ=class e{static create(){return new e}static request(e){return aJ.request(e)}static cancel(e){return aJ.cancel(e)}currentId=iJ;request(e){this.cancel(),this.currentId=aJ.request(()=>{this.currentId=iJ,e()})}cancel=()=>{this.currentId!==iJ&&(aJ.cancel(this.currentId),this.currentId=iJ)};disposeEffect=()=>this.cancel};function sJ(){let e=NU(oJ.create).current;return Yq(e.disposeEffect),e}function cJ(e){return e==null?e:`current`in e?e.current:e}function lJ(e,t=!1,n=!0){let r=sJ();return IU((i,a=null)=>{r.cancel();function o(){PI.flushSync(i)}let s=cJ(e);if(s==null)return;let c=s;if(typeof c.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED)i();else{function e(){let e=eJ.startingStyle;if(!c.hasAttribute(e)){r.request(i);return}let t=new MutationObserver(()=>{c.hasAttribute(e)||(t.disconnect(),i())});t.observe(c,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0})}function i(){Promise.all(c.getAnimations().map(e=>e.finished)).then(()=>{a?.aborted||o()}).catch(()=>{let e=c.getAnimations();if(n){if(a?.aborted)return;o()}else e.length>0&&e.some(e=>e.pending||e.playState!==`finished`)&&i()})}if(t){e();return}r.request(i)}})}function uJ(e){let{enabled:t=!0,open:n,ref:r,onComplete:i}=e,a=IU(i),o=lJ(r,n,!1);b.useEffect(()=>{if(!t)return;let e=new AbortController;return o(a,e.signal),()=>{e.abort()}},[t,n,a,o])}function dJ(e,t=!1,n=!1){let[r,i]=b.useState(e&&t?`idle`:void 0),[a,o]=b.useState(e);return e&&!a&&(o(!0),i(`starting`)),!e&&a&&r!==`ending`&&!n&&i(`ending`),!e&&!a&&r===`ending`&&i(void 0),$(()=>{if(!e&&a&&r!==`ending`&&n){let e=oJ.request(()=>{i(`ending`)});return()=>{oJ.cancel(e)}}},[e,a,r,n]),$(()=>{if(!e||t)return;let n=oJ.request(()=>{i(void 0)});return()=>{oJ.cancel(n)}},[t,e]),$(()=>{if(!e||!t)return;e&&a&&r!==`idle`&&i(`starting`);let n=oJ.request(()=>{i(`idle`)});return()=>{oJ.cancel(n)}},[t,e,a,i,r]),b.useMemo(()=>({mounted:a,setMounted:o,transitionStatus:r}),[a,r])}var fJ=function(e){return e.index=`data-index`,e.activationDirection=`data-activation-direction`,e.orientation=`data-orientation`,e.hidden=`data-hidden`,e[e.startingStyle=eJ.startingStyle]=`startingStyle`,e[e.endingStyle=eJ.endingStyle]=`endingStyle`,e}({}),pJ={...IW,...rJ},mJ=b.forwardRef(function(e,t){let{className:n,value:r,render:i,keepMounted:a=!1,...o}=e,{value:s,getTabIdByPanelValue:c,orientation:l,tabActivationDirection:u,registerMountedTabPanel:d,unregisterMountedTabPanel:f}=PW(),p=hG(),{ref:m,index:h}=wG({metadata:b.useMemo(()=>({id:p,value:r}),[p,r])}),g=r===s,{mounted:_,transitionStatus:v,setMounted:y}=dJ(g),x=!_,S=c(r),C={hidden:x,orientation:l,tabActivationDirection:u,transitionStatus:v},w=b.useRef(null),T=bW(`div`,e,{state:C,ref:[t,m,w],props:[{"aria-labelledby":S,hidden:x,id:p,role:`tabpanel`,tabIndex:g?0:-1,inert:$q(!g),[fJ.index]:h},o],stateAttributesMapping:pJ});return uJ({open:g,ref:w,onComplete(){g||y(!1)}}),$(()=>{if(!(x&&!a)&&p!=null)return d(r,p),()=>{f(r,p)}},[x,a,r,p,d,f]),a||_?T:null});function hJ(e){return e==null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}var gJ=`ArrowUp`,_J=`ArrowDown`,vJ=`ArrowLeft`,yJ=`ArrowRight`,bJ=`Home`,xJ=new Set([vJ,yJ]),SJ=new Set([vJ,yJ,bJ,`End`]),CJ=new Set([gJ,_J]),wJ=new Set([gJ,_J,bJ,`End`]),TJ=new Set([...xJ,...CJ]),EJ=new Set([...TJ,bJ,`End`]),DJ=new Set([gJ,_J,vJ,yJ,bJ,`End`]),OJ=new Set([`Shift`,`Control`,`Alt`,`Meta`]);function kJ(e){return WW(e)&&e.tagName===`INPUT`}function AJ(e){return!!(kJ(e)&&e.selectionStart!=null||WW(e)&&e.tagName===`TEXTAREA`)}function jJ(e,t,n,r){if(!e||!t||!t.scrollTo)return;let i=e.scrollLeft,a=e.scrollTop,o=e.clientWidth<e.scrollWidth,s=e.clientHeight<e.scrollHeight;if(o&&r!==`vertical`){let r=MJ(e,t,`left`),a=NJ(e),o=NJ(t);n===`ltr`&&(r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight?i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight:r-o.scrollMarginLeft<e.scrollLeft+a.scrollPaddingLeft&&(i=r-o.scrollMarginLeft-a.scrollPaddingLeft)),n===`rtl`&&(r-o.scrollMarginRight<e.scrollLeft+a.scrollPaddingLeft?i=r-o.scrollMarginLeft-a.scrollPaddingLeft:r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight&&(i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight))}if(s&&r!==`horizontal`){let n=MJ(e,t,`top`),r=NJ(e),i=NJ(t);n-i.scrollMarginTop<e.scrollTop+r.scrollPaddingTop?a=n-i.scrollMarginTop-r.scrollPaddingTop:n+t.offsetHeight+i.scrollMarginBottom>e.scrollTop+e.clientHeight-r.scrollPaddingBottom&&(a=n+t.offsetHeight+i.scrollMarginBottom-e.clientHeight+r.scrollPaddingBottom)}e.scrollTo({left:i,top:a,behavior:`auto`})}function MJ(e,t,n){let r=n===`left`?`offsetLeft`:`offsetTop`,i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);)t=t.offsetParent;return i}function NJ(e){let 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}}var PJ=[];function FJ(e){let{itemSizes:t,cols:n=1,loopFocus:r=!0,dense:i=!1,orientation:a=`both`,direction:o,highlightedIndex:s,onHighlightedIndexChange:c,rootRef:l,enableHomeAndEndKeys:u=!1,stopEventPropagation:d=!1,disabledIndices:f,modifierKeys:p=PJ}=e,[m,h]=b.useState(0),g=n>1,_=b.useRef(null),v=VU(_,l),y=b.useRef([]),x=b.useRef(!1),S=s??m,C=IU((e,t=!1)=>{if((c??h)(e),t){let t=y.current[e];jJ(_.current,t,o,a)}}),w=IU(e=>{if(e.size===0||x.current)return;x.current=!0;let t=Array.from(e.keys()),n=t.find(e=>e?.hasAttribute(`data-composite-item-active`))??null,r=n?t.indexOf(n):-1;r!==-1&&C(r),jJ(_.current,n,o,a)}),T=b.useMemo(()=>({"aria-orientation":a===`both`?void 0:a,ref:v,onFocus(e){!_.current||!AJ(e.target)||e.target.setSelectionRange(0,e.target.value.length??0)},onKeyDown(e){let s=u?EJ:TJ;if(!s.has(e.key)||IJ(e,p)||!_.current)return;let c=o===`rtl`,l=c?vJ:yJ,m={horizontal:l,vertical:_J,both:l}[a],h=c?yJ:vJ,v={horizontal:h,vertical:gJ,both:h}[a];if(AJ(e.target)&&!hJ(e.target)){let t=e.target.selectionStart,n=e.target.selectionEnd,r=e.target.value??``;if(t==null||e.shiftKey||t!==n||e.key!==v&&t<r.length||e.key!==m&&t>0)return}let b=S,x=QK(y,f),w=$K(y,f);if(g){let o=t||Array.from({length:y.current.length},()=>({width:1,height:1})),s=nq(o,n,i),l=s.findIndex(e=>e!=null&&!aq(y,e,f)),u=s.reduce((e,t,n)=>t!=null&&!aq(y,t,f)?n:e,-1);b=s[tq({current:s.map(e=>e?y.current[e]:null)},{event:e,orientation:a,loopFocus:r,cols:n,disabledIndices:iq([...f||y.current.map((e,t)=>aq(y,t)?t:void 0),void 0],s),minIndex:l,maxIndex:u,prevIndex:rq(S>w?x:S,o,s,n,e.key===`ArrowDown`?`bl`:e.key===`ArrowRight`?`tr`:`tl`),rtl:c})]}let T={horizontal:[l],vertical:[_J],both:[l,_J]}[a],E={horizontal:[h],vertical:[gJ],both:[h,gJ]}[a],D=g?s:{horizontal:u?SJ:xJ,vertical:u?wJ:CJ,both:s}[a];u&&(e.key===`Home`?b=x:e.key===`End`&&(b=w)),b===S&&(T.includes(e.key)||E.includes(e.key))&&(b=r&&b===w&&T.includes(e.key)?x:r&&b===x&&E.includes(e.key)?w:eq(y,{startingIndex:b,decrement:E.includes(e.key),disabledIndices:f})),b!==S&&!ZK(y,b)&&(d&&e.stopPropagation(),D.has(e.key)&&e.preventDefault(),C(b,!0),queueMicrotask(()=>{y.current[b]?.focus()}))}}),[n,i,o,f,y,u,S,g,t,r,v,p,C,a,d]);return b.useMemo(()=>({props:T,highlightedIndex:S,onHighlightedIndexChange:C,elementsRef:y,disabledIndices:f,onMapChange:w,relayKeyboardEvent:T.onKeyDown}),[T,S,C,y,f,w])}function IJ(e,t){for(let n of OJ.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function LJ(e){let{render:t,className:n,refs:r=pW,props:i=pW,state:a=mW,stateAttributesMapping:o,highlightedIndex:s,onHighlightedIndexChange:c,orientation:l,dense:u,itemSizes:d,loopFocus:f,cols:p,enableHomeAndEndKeys:m,onMapChange:h,stopEventPropagation:g=!0,rootRef:_,disabledIndices:v,modifierKeys:y,highlightItemOnHover:x=!1,tag:S=`div`,...C}=e,{props:w,highlightedIndex:T,onHighlightedIndexChange:E,elementsRef:D,onMapChange:O,relayKeyboardEvent:k}=FJ({itemSizes:d,cols:p,loopFocus:f,dense:u,orientation:l,highlightedIndex:s,onHighlightedIndexChange:c,rootRef:_,stopEventPropagation:g,enableHomeAndEndKeys:m,direction:MW(),disabledIndices:v,modifierKeys:y}),A=bW(S,e,{state:a,ref:r,props:[w,...i,C],stateAttributesMapping:o}),j=b.useMemo(()=>({highlightedIndex:T,onHighlightedIndexChange:E,highlightItemOnHover:x,relayKeyboardEvent:k}),[T,E,x,k]);return(0,W.jsx)(gG.Provider,{value:j,children:(0,W.jsx)(DW,{elementsRef:D,onMapChange:e=>{h?.(e),O(e)},children:A})})}var RJ=b.forwardRef(function(e,t){let{activateOnFocus:n=!1,className:r,loopFocus:i=!0,render:a,...o}=e,{getTabElementBySelectedValue:s,onValueChange:c,orientation:l,value:u,setTabMap:d,tabActivationDirection:f}=PW(),[p,m]=b.useState(0),[h,g]=b.useState(null),_=b.useRef(new Set),v=b.useRef(new Set),y=b.useRef(null),x=IU(()=>{_.current.forEach(e=>{e()})});b.useEffect(()=>{if(typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>{_.current.size&&x()});return y.current=e,h&&e.observe(h),v.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),y.current=null}},[h,x]);let S=IU(e=>(_.current.add(e),()=>{_.current.delete(e)})),C=IU(e=>(v.current.add(e),y.current?.observe(e),()=>{v.current.delete(e),y.current?.unobserve(e)})),w=BJ(u,l,h,s),T=IU((e,t)=>{e!==u&&(t.activationDirection=w(e),c(e,t))}),E={orientation:l,tabActivationDirection:f},D={"aria-orientation":l===`vertical`?`vertical`:void 0,role:`tablist`},O=b.useMemo(()=>({activateOnFocus:n,highlightedTabIndex:p,registerIndicatorUpdateListener:S,registerTabResizeObserverElement:C,onTabActivation:T,setHighlightedTabIndex:m,tabsListElement:h}),[n,p,S,C,T,m,h]);return(0,W.jsx)(EG.Provider,{value:O,children:(0,W.jsx)(LJ,{render:a,className:r,state:E,refs:[t,g],props:[D,o],stateAttributesMapping:IW,highlightedIndex:p,enableHomeAndEndKeys:!0,loopFocus:i,orientation:l,onHighlightedIndexChange:m,onMapChange:d,disabledIndices:pW})})});function zJ(e,t){let{left:n,top:r}=e.getBoundingClientRect(),{left:i,top:a}=t.getBoundingClientRect();return{left:n-i,top:r-a}}function BJ(e,t,n,r){let[i,a]=b.useState(null);return $(()=>{if(e==null||n==null){a(null);return}let i=r(e);if(i==null){a(null);return}let{left:o,top:s}=zJ(i,n);a(t===`horizontal`?o:s)},[t,r,n,e]),b.useCallback(o=>{if(o===e)return`none`;if(o==null)return a(null),`none`;if(o!=null&&n!=null){let e=r(o);if(e!=null){let{left:r,top:o}=zJ(e,n);if(i==null)return a(t===`horizontal`?r:o),`none`;if(t===`horizontal`){if(r<i)return a(r),`left`;if(r>i)return a(r),`right`}else if(o<i)return a(o),`up`;else if(o>i)return a(o),`down`}}return`none`},[r,t,i,n,e])}function VJ(...e){return vr(qt(e))}function HJ({className:e,orientation:t=`horizontal`,...n}){return(0,W.jsx)(LW,{"data-slot":`tabs`,"data-orientation":t,className:VJ(`gap-2 group/tabs flex data-[orientation=horizontal]:flex-col`,e),...n})}var UJ=qr(`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 WJ({className:e,variant:t=`default`,...n}){return(0,W.jsx)(RJ,{"data-slot":`tabs-list`,"data-variant":t,className:VJ(UJ({variant:t}),e),...n})}function GJ({className:e,...t}){return(0,W.jsx)(qq,{"data-slot":`tabs-trigger`,className:VJ(`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 KJ({className:e,...t}){return(0,W.jsx)(mJ,{"data-slot":`tabs-content`,className:VJ(`text-xs/relaxed flex-1 outline-none`,e),...t})}function qJ({className:e,size:t=`default`,...n}){return(0,W.jsx)(`div`,{"data-slot":`card`,"data-size":t,className:VJ(`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 JJ({className:e,...t}){return(0,W.jsx)(`div`,{"data-slot":`card-content`,className:VJ(`px-4 group-data-[size=sm]/card:px-3`,e),...t})}var YJ=function(e){return typeof e==`function`},XJ=function(e){return typeof e==`string`},ZJ=function(e){return typeof e==`number`};function QJ(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 $J(e){var t=(0,b.useRef)(e);return t.current=e,t}var eY=function(e){var t=$J(e);(0,b.useEffect)(function(){return function(){t.current()}},[])},tY=!!(typeof window<`u`&&window.document&&window.document.createElement);function nY(e,t){if(tY)return e?YJ(e)?e():`current`in e?e.current:e:t}var rY=function(e){return function(t,n,r){var i=(0,b.useRef)(!1),a=(0,b.useRef)([]),o=(0,b.useRef)([]),s=(0,b.useRef)(void 0);e(function(){var e,c=(Array.isArray(r)?r:[r]).map(function(e){return nY(e)});if(!i.current){i.current=!0,a.current=c,o.current=n,s.current=t();return}(c.length!==a.current.length||!QJ(a.current,c)||!QJ(o.current,n))&&((e=s.current)==null||e.call(s),a.current=c,o.current=n,s.current=t())}),eY(function(){var e;(e=s.current)==null||e.call(s),i.current=!1})}}(b.useEffect),iY=u(s(((e,t)=>{var n=typeof Element<`u`,r=typeof Map==`function`,i=typeof Set==`function`,a=typeof ArrayBuffer==`function`&&!!ArrayBuffer.isView;function o(e,t){if(e===t)return!0;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(e.constructor!==t.constructor)return!1;var s,c,l;if(Array.isArray(e)){if(s=e.length,s!=t.length)return!1;for(c=s;c--!==0;)if(!o(e[c],t[c]))return!1;return!0}var u;if(r&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(u=e.entries();!(c=u.next()).done;)if(!t.has(c.value[0]))return!1;for(u=e.entries();!(c=u.next()).done;)if(!o(c.value[1],t.get(c.value[0])))return!1;return!0}if(i&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(u=e.entries();!(c=u.next()).done;)if(!t.has(c.value[0]))return!1;return!0}if(a&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(s=e.length,s!=t.length)return!1;for(c=s;c--!==0;)if(e[c]!==t[c])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf==`function`&&typeof t.valueOf==`function`)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString==`function`&&typeof t.toString==`function`)return e.toString()===t.toString();if(l=Object.keys(e),s=l.length,s!==Object.keys(t).length)return!1;for(c=s;c--!==0;)if(!Object.prototype.hasOwnProperty.call(t,l[c]))return!1;if(n&&e instanceof Element)return!1;for(c=s;c--!==0;)if(!((l[c]===`_owner`||l[c]===`__v`||l[c]===`__o`)&&e.$$typeof)&&!o(e[l[c]],t[l[c]]))return!1;return!0}return e!==e&&t!==t}t.exports=function(e,t){try{return o(e,t)}catch(e){if((e.message||``).match(/stack|recursion/i))return console.warn(`react-fast-compare cannot handle circular refs`),!1;throw e}}}))()),aY=function(e,t){return e===void 0&&(e=[]),t===void 0&&(t=[]),(0,iY.default)(e,t)},oY=function(e,t,n){var r=(0,b.useRef)(void 0),i=(0,b.useRef)(0);aY(t,r.current)||(i.current+=1),r.current=t,rY(e,[i.current],n)},sY=/(mac|iphone|ipod|ipad)/i.test(typeof navigator<`u`?navigator==null?void 0:navigator.platform:``),cY={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,control:17,alt:18,pausebreak:19,pause:19,capslock:20,esc:27,escape:27,space:32,spacebar:32,pageup:33,pagedown:34,end:35,home:36,leftarrow:37,arrowleft:37,uparrow:38,arrowup:38,rightarrow:39,arrowright:39,downarrow:40,arrowdown: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:sY?[91,93]:[91,92],selectkey:93,contextmenu: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},lY={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`?cY.meta.includes(e.keyCode):e.metaKey}};function uY(e){return XJ(e)||ZJ(e)}function dY(e){var t=Object.keys(lY).reduce(function(t,n){return lY[n](e)?t+1:t},0);return[16,17,18,91,92].includes(e.keyCode)?t:t+1}function fY(e,t,n){var r,i;if(!e.key)return!1;if(ZJ(t))return e.keyCode===t?t:!1;var a=t.split(`.`),o=0;try{for(var s=PB(a),c=s.next();!c.done;c=s.next()){var l=c.value,u=lY[l],d=cY[l.toLowerCase()];(u&&u(e)||d&&d===e.keyCode)&&o++}}catch(e){r={error:e}}finally{try{c&&!c.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return n?o===a.length&&dY(e)===a.length?t:!1:o===a.length?t:!1}function pY(e,t){return YJ(e)?e:uY(e)?function(n){return fY(n,e,t)}:Array.isArray(e)?function(n){return e.find(function(e){return fY(n,e,t)})}:function(){return!!e}}var mY=[`keydown`];function hY(e,t,n){var r=n||{},i=r.events,a=i===void 0?mY:i,o=r.target,s=r.exactMatch,c=s===void 0?!1:s,l=r.useCapture,u=l===void 0?!1:l,d=$J(t),f=$J(e);oY(function(){var e,t,n,r=nY(o,window);if(r){var i=function(e){var t=e,n=pY(f.current,c)(t),r=uY(n)?n:t.key;if(n)return d.current?.call(d,t,r)};try{for(var s=PB(a),l=s.next();!l.done;l=s.next()){var p=l.value;(n=r?.addEventListener)==null||n.call(r,p,i,u)}}catch(t){e={error:t}}finally{try{l&&!l.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}return function(){var e,t,n;try{for(var o=PB(a),s=o.next();!s.done;s=o.next()){var c=s.value;(n=r?.removeEventListener)==null||n.call(r,c,i,u)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}}}},[a],o)}var gY=b.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,focusableWhenDisabled:a=!1,nativeButton:o=!0,...s}=e,{getButtonProps:c,buttonRef:l}=yG({disabled:i,focusableWhenDisabled:a,native:o});return bW(`button`,e,{state:{disabled:i},ref:[t,l],props:[s,c]})}),_Y=qr(`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 vY({className:e,variant:t=`default`,size:n=`default`,...r}){return(0,W.jsx)(gY,{"data-slot":`button`,className:VJ(_Y({variant:t,size:n,className:e})),...r})}var yY=({validateForm:e,formData:t})=>{let n=UE(),{mutateAsync:r,isPending:i}=VE(),a=async()=>{e&&!await e()||t&&await r({toolName:n.name,args:t})};return hY(`Enter`,a),(0,W.jsx)(`div`,{className:`flex flex-col items-end gap-1`,children:(0,W.jsxs)(vY,{onClick:a,variant:`default`,disabled:i,children:[i?(0,W.jsx)(Ir,{className:`h-4 w-4 animate-spin`}):(0,W.jsx)(zr,{className:`h-4 w-4`}),`Call Tool`]})})},bY=u(s(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(p()):typeof define==`function`&&define.amd?define([`react`],r):typeof e==`object`?e.reactJsonView=r(p()):n.reactJsonView=r(n.React)})(e,e=>(()=>{var t={165(e,t,n){let r=n(877),i={};for(let e of Object.keys(r))i[r[e]]=e;let a={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`]}};e.exports=a;for(let e of Object.keys(a)){if(!(`channels`in a[e]))throw Error(`missing channels property: `+e);if(!(`labels`in a[e]))throw Error(`missing channel labels property: `+e);if(a[e].labels.length!==a[e].channels)throw Error(`channel and label counts mismatch: `+e);let{channels:t,labels:n}=a[e];delete a[e].channels,delete a[e].labels,Object.defineProperty(a[e],`channels`,{value:t}),Object.defineProperty(a[e],`labels`,{value:n})}function o(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}a.rgb.hsl=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s,c;a===i?s=0:t===a?s=(n-r)/o:n===a?s=2+(r-t)/o:r===a&&(s=4+(t-n)/o),s=Math.min(60*s,360),s<0&&(s+=360);let l=(i+a)/2;return c=a===i?0:l<=.5?o/(a+i):o/(2-a-i),[s,100*c,100*l]},a.rgb.hsv=function(e){let t,n,r,i,a,o=e[0]/255,s=e[1]/255,c=e[2]/255,l=Math.max(o,s,c),u=l-Math.min(o,s,c),d=function(e){return(l-e)/6/u+.5};return u===0?(i=0,a=0):(a=u/l,t=d(o),n=d(s),r=d(c),o===l?i=r-n:s===l?i=1/3+t-r:c===l&&(i=2/3+n-t),i<0?i+=1:i>1&&--i),[360*i,100*a,100*l]},a.rgb.hwb=function(e){let t=e[0],n=e[1],r=e[2],i=a.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[i,100*o,100*r]},a.rgb.cmyk=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(1-t,1-n,1-r);return[100*((1-t-i)/(1-i)||0),100*((1-n-i)/(1-i)||0),100*((1-r-i)/(1-i)||0),100*i]},a.rgb.keyword=function(e){let t=i[e];if(t)return t;let n,a=1/0;for(let t of Object.keys(r)){let i=o(e,r[t]);i<a&&(a=i,n=t)}return n},a.keyword.rgb=function(e){return r[e]},a.rgb.xyz=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;return t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,[100*(.4124*t+.3576*n+.1805*r),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},a.rgb.lab=function(e){let t=a.rgb.xyz(e),n=t[0],r=t[1],i=t[2];return n/=95.047,r/=100,i/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,i=i>.008856?i**(1/3):7.787*i+16/116,[116*r-16,500*(n-r),200*(r-i)]},a.hsl.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100,i,a,o;if(n===0)return o=255*r,[o,o,o];i=r<.5?r*(1+n):r+n-r*n;let s=2*r-i,c=[0,0,0];for(let e=0;e<3;e++)a=t+1/3*-(e-1),a<0&&a++,a>1&&a--,o=6*a<1?s+6*(i-s)*a:2*a<1?i:3*a<2?s+(i-s)*(2/3-a)*6:s,c[e]=255*o;return c},a.hsl.hsv=function(e){let t=e[0],n=e[1]/100,r=e[2]/100,i=n,a=Math.max(r,.01);return r*=2,n*=r<=1?r:2-r,i*=a<=1?a:2-a,[t,100*(r===0?2*i/(a+i):2*n/(r+n)),100*((r+n)/2)]},a.hsv.rgb=function(e){let t=e[0]/60,n=e[1]/100,r=e[2]/100,i=Math.floor(t)%6,a=t-Math.floor(t),o=255*r*(1-n),s=255*r*(1-n*a),c=255*r*(1-n*(1-a));switch(r*=255,i){case 0:return[r,c,o];case 1:return[s,r,o];case 2:return[o,r,c];case 3:return[o,s,r];case 4:return[c,o,r];case 5:return[r,o,s]}},a.hsv.hsl=function(e){let t=e[0],n=e[1]/100,r=e[2]/100,i=Math.max(r,.01),a,o;o=(2-n)*r;let s=(2-n)*i;return a=n*i,a/=s<=1?s:2-s,a||=0,o/=2,[t,100*a,100*o]},a.hwb.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100,i=n+r,a;i>1&&(n/=i,r/=i);let o=Math.floor(6*t),s=1-r;a=6*t-o,1&o&&(a=1-a);let c=n+a*(s-n),l,u,d;switch(o){default:case 6:case 0:l=s,u=c,d=n;break;case 1:l=c,u=s,d=n;break;case 2:l=n,u=s,d=c;break;case 3:l=n,u=c,d=s;break;case 4:l=c,u=n,d=s;break;case 5:l=s,u=n,d=c}return[255*l,255*u,255*d]},a.cmyk.rgb=function(e){let t=e[0]/100,n=e[1]/100,r=e[2]/100,i=e[3]/100;return[255*(1-Math.min(1,t*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i))]},a.xyz.rgb=function(e){let t=e[0]/100,n=e[1]/100,r=e[2]/100,i,a,o;return i=3.2406*t+-1.5372*n+-.4986*r,a=-.9689*t+1.8758*n+.0415*r,o=.0557*t+-.204*n+1.057*r,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,a=a>.0031308?1.055*a**(1/2.4)-.055:12.92*a,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,i=Math.min(Math.max(0,i),1),a=Math.min(Math.max(0,a),1),o=Math.min(Math.max(0,o),1),[255*i,255*a,255*o]},a.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];return t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,[116*n-16,500*(t-n),200*(n-r)]},a.lab.xyz=function(e){let t,n,r;n=(e[0]+16)/116,t=e[1]/500+n,r=n-e[2]/200;let i=n**3,a=t**3,o=r**3;return n=i>.008856?i:(n-16/116)/7.787,t=a>.008856?a:(t-16/116)/7.787,r=o>.008856?o:(r-16/116)/7.787,t*=95.047,n*=100,r*=108.883,[t,n,r]},a.lab.lch=function(e){let t=e[0],n=e[1],r=e[2],i;return i=360*Math.atan2(r,n)/2/Math.PI,i<0&&(i+=360),[t,Math.sqrt(n*n+r*r),i]},a.lch.lab=function(e){let t=e[0],n=e[1],r=e[2]/360*2*Math.PI;return[t,n*Math.cos(r),n*Math.sin(r)]},a.rgb.ansi16=function(e,t=null){let[n,r,i]=e,o=t===null?a.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),o===0)return 30;let s=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return o===2&&(s+=60),s},a.hsv.ansi16=function(e){return a.rgb.ansi16(a.hsv.rgb(e),e[2])},a.rgb.ansi256=function(e){let t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},a.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];let n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},a.ansi256.rgb=function(e){if(e>=232){let t=10*(e-232)+8;return[t,t,t]}let t;return e-=16,[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},a.rgb.hex=function(e){let t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return`000000`.substring(t.length)+t},a.hex.rgb=function(e){let t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split(``).map(e=>e+e).join(``));let r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},a.rgb.hcg=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.max(Math.max(t,n),r),a=Math.min(Math.min(t,n),r),o=i-a,s,c;return s=o<1?a/(1-o):0,c=o<=0?0:i===t?(n-r)/o%6:i===n?2+(r-t)/o:4+(t-n)/o,c/=6,c%=1,[360*c,100*o,100*s]},a.hsl.hcg=function(e){let t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n),i=0;return r<1&&(i=(n-.5*r)/(1-r)),[e[0],100*r,100*i]},a.hsv.hcg=function(e){let t=e[1]/100,n=e[2]/100,r=t*n,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},a.hcg.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[255*r,255*r,255*r];let i=[0,0,0],a=t%1*6,o=a%1,s=1-o,c=0;switch(Math.floor(a)){case 0:i[0]=1,i[1]=o,i[2]=0;break;case 1:i[0]=s,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=o;break;case 3:i[0]=0,i[1]=s,i[2]=1;break;case 4:i[0]=o,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=s}return c=(1-n)*r,[255*(n*i[0]+c),255*(n*i[1]+c),255*(n*i[2]+c)]},a.hcg.hsv=function(e){let t=e[1]/100,n=t+e[2]/100*(1-t),r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},a.hcg.hsl=function(e){let t=e[1]/100,n=e[2]/100*(1-t)+.5*t,r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},a.hcg.hwb=function(e){let t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},a.hwb.hcg=function(e){let t=e[1]/100,n=1-e[2]/100,r=n-t,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},a.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},a.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},a.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},a.gray.hsl=function(e){return[0,0,e[0]]},a.gray.hsv=a.gray.hsl,a.gray.hwb=function(e){return[0,100,e[0]]},a.gray.cmyk=function(e){return[0,0,0,e[0]]},a.gray.lab=function(e){return[e[0],0,0]},a.gray.hex=function(e){let t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return`000000`.substring(n.length)+n},a.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},880(e,t,n){let r=n(165),i=n(985),a={};Object.keys(r).forEach(e=>{a[e]={},Object.defineProperty(a[e],`channels`,{value:r[e].channels}),Object.defineProperty(a[e],`labels`,{value:r[e].labels});let t=i(e);Object.keys(t).forEach(n=>{let r=t[n];a[e][n]=function(e){let t=function(...t){let n=t[0];if(n==null)return n;n.length>1&&(t=n);let r=e(t);if(typeof r==`object`)for(let e=r.length,t=0;t<e;t++)r[t]=Math.round(r[t]);return r};return`conversion`in e&&(t.conversion=e.conversion),t}(r),a[e][n].raw=function(e){let t=function(...t){let n=t[0];return n==null?n:(n.length>1&&(t=n),e(t))};return`conversion`in e&&(t.conversion=e.conversion),t}(r)})}),e.exports=a},985(e,t,n){let r=n(165);function i(e){let t=function(){let e={},t=Object.keys(r);for(let n=t.length,r=0;r<n;r++)e[t[r]]={distance:-1,parent:null};return e}(),n=[e];for(t[e].distance=0;n.length;){let e=n.pop(),i=Object.keys(r[e]);for(let r=i.length,a=0;a<r;a++){let r=i[a],o=t[r];o.distance===-1&&(o.distance=t[e].distance+1,o.parent=e,n.unshift(r))}}return t}function a(e,t){return function(n){return t(e(n))}}function o(e,t){let n=[t[e].parent,e],i=r[t[e].parent][e],o=t[e].parent;for(;t[o].parent;)n.unshift(t[o].parent),i=a(r[t[o].parent][o],i),o=t[o].parent;return i.conversion=n,i}e.exports=function(e){let t=i(e),n={},r=Object.keys(t);for(let e=r.length,i=0;i<e;i++){let e=r[i];t[e].parent!==null&&(n[e]=o(e,t))}return n}},877(e){e.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]}},138(e,t,n){var r=n(877),i=n(403),a=Object.hasOwnProperty,o=Object.create(null);for(var s in r)a.call(r,s)&&(o[r[s]]=s);var c=e.exports={to:{},get:{}};function l(e,t,n){return Math.min(Math.max(t,e),n)}function u(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?`0`+t:t}c.get=function(e){var t,n;switch(e.substring(0,3).toLowerCase()){case`hsl`:t=c.get.hsl(e),n=`hsl`;break;case`hwb`:t=c.get.hwb(e),n=`hwb`;break;default:t=c.get.rgb(e),n=`rgb`}return t?{model:n,value:t}:null},c.get.rgb=function(e){if(!e)return null;var t,n,i,o=[0,0,0,1];if(t=e.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(i=t[2],t=t[1],n=0;n<3;n++){var s=2*n;o[n]=parseInt(t.slice(s,s+2),16)}i&&(o[3]=parseInt(i,16)/255)}else if(t=e.match(/^#([a-f0-9]{3,4})$/i)){for(i=(t=t[1])[3],n=0;n<3;n++)o[n]=parseInt(t[n]+t[n],16);i&&(o[3]=parseInt(i+i,16)/255)}else if(t=e.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(n=0;n<3;n++)o[n]=parseInt(t[n+1],0);t[4]&&(t[5]?o[3]=.01*parseFloat(t[4]):o[3]=parseFloat(t[4]))}else{if(!(t=e.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(t=e.match(/^(\w+)$/))?t[1]===`transparent`?[0,0,0,0]:a.call(r,t[1])?((o=r[t[1]])[3]=1,o):null:null;for(n=0;n<3;n++)o[n]=Math.round(2.55*parseFloat(t[n+1]));t[4]&&(t[5]?o[3]=.01*parseFloat(t[4]):o[3]=parseFloat(t[4]))}for(n=0;n<3;n++)o[n]=l(o[n],0,255);return o[3]=l(o[3],0,1),o},c.get.hsl=function(e){if(!e)return null;var t=e.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,l(parseFloat(t[2]),0,100),l(parseFloat(t[3]),0,100),l(isNaN(n)?1:n,0,1)]}return null},c.get.hwb=function(e){if(!e)return null;var t=e.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,l(parseFloat(t[2]),0,100),l(parseFloat(t[3]),0,100),l(isNaN(n)?1:n,0,1)]}return null},c.to.hex=function(){var e=i(arguments);return`#`+u(e[0])+u(e[1])+u(e[2])+(e[3]<1?u(Math.round(255*e[3])):``)},c.to.rgb=function(){var e=i(arguments);return e.length<4||e[3]===1?`rgb(`+Math.round(e[0])+`, `+Math.round(e[1])+`, `+Math.round(e[2])+`)`:`rgba(`+Math.round(e[0])+`, `+Math.round(e[1])+`, `+Math.round(e[2])+`, `+e[3]+`)`},c.to.rgb.percent=function(){var e=i(arguments),t=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),r=Math.round(e[2]/255*100);return e.length<4||e[3]===1?`rgb(`+t+`%, `+n+`%, `+r+`%)`:`rgba(`+t+`%, `+n+`%, `+r+`%, `+e[3]+`)`},c.to.hsl=function(){var e=i(arguments);return e.length<4||e[3]===1?`hsl(`+e[0]+`, `+e[1]+`%, `+e[2]+`%)`:`hsla(`+e[0]+`, `+e[1]+`%, `+e[2]+`%, `+e[3]+`)`},c.to.hwb=function(){var e=i(arguments),t=``;return e.length>=4&&e[3]!==1&&(t=`, `+e[3]),`hwb(`+e[0]+`, `+e[1]+`%, `+e[2]+`%`+t+`)`},c.to.keyword=function(e){return o[e.slice(0,3)]}},742(e,t,n){let r=n(138),i=n(880),a=[`keyword`,`gray`,`hex`],o={};for(let e of Object.keys(i))o[[...i[e].labels].sort().join(``)]=e;let s={};function c(e,t){if(!(this instanceof c))return new c(e,t);if(t&&t in a&&(t=null),t&&!(t in i))throw Error(`Unknown model: `+t);let n,l;if(e==null)this.model=`rgb`,this.color=[0,0,0],this.valpha=1;else if(e instanceof c)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e==`string`){let t=r.get(e);if(t===null)throw Error(`Unable to parse color from string: `+e);this.model=t.model,l=i[this.model].channels,this.color=t.value.slice(0,l),this.valpha=typeof t.value[l]==`number`?t.value[l]:1}else if(e.length>0)this.model=t||`rgb`,l=i[this.model].channels,this.color=f(Array.prototype.slice.call(e,0,l),l),this.valpha=typeof e[l]==`number`?e[l]:1;else if(typeof e==`number`)this.model=`rgb`,this.color=[e>>16&255,e>>8&255,255&e],this.valpha=1;else{this.valpha=1;let t=Object.keys(e);`alpha`in e&&(t.splice(t.indexOf(`alpha`),1),this.valpha=typeof e.alpha==`number`?e.alpha:0);let r=t.sort().join(``);if(!(r in o))throw Error(`Unable to parse color from object: `+JSON.stringify(e));this.model=o[r];let{labels:a}=i[this.model],s=[];for(n=0;n<a.length;n++)s.push(e[a[n]]);this.color=f(s)}if(s[this.model])for(l=i[this.model].channels,n=0;n<l;n++){let e=s[this.model][n];e&&(this.color[n]=e(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}c.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in r.to?this:this.rgb();t=t.round(typeof e==`number`?e:1);let n=t.valpha===1?t.color:[...t.color,this.valpha];return r.to[t.model](n)},percentString(e){let t=this.rgb().round(typeof e==`number`?e:1),n=t.valpha===1?t.color:[...t.color,this.valpha];return r.to.rgb.percent(n)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let e={},{channels:t}=i[this.model],{labels:n}=i[this.model];for(let r=0;r<t;r++)e[n[r]]=this.color[r];return this.valpha!==1&&(e.alpha=this.valpha),e},unitArray(){let e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,this.valpha!==1&&e.push(this.valpha),e},unitObject(){let e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,this.valpha!==1&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new c([...this.color.map(l(e)),this.valpha],this.model)},alpha(e){return e===void 0?this.valpha:new c([...this.color,Math.max(0,Math.min(1,e))],this.model)},red:u(`rgb`,0,d(255)),green:u(`rgb`,1,d(255)),blue:u(`rgb`,2,d(255)),hue:u([`hsl`,`hsv`,`hsl`,`hwb`,`hcg`],0,e=>(e%360+360)%360),saturationl:u(`hsl`,1,d(100)),lightness:u(`hsl`,2,d(100)),saturationv:u(`hsv`,1,d(100)),value:u(`hsv`,2,d(100)),chroma:u(`hcg`,1,d(100)),gray:u(`hcg`,2,d(100)),white:u(`hwb`,1,d(100)),wblack:u(`hwb`,2,d(100)),cyan:u(`cmyk`,0,d(100)),magenta:u(`cmyk`,1,d(100)),yellow:u(`cmyk`,2,d(100)),black:u(`cmyk`,3,d(100)),x:u(`xyz`,0,d(95.047)),y:u(`xyz`,1,d(100)),z:u(`xyz`,2,d(108.833)),l:u(`lab`,0,d(100)),a:u(`lab`,1),b:u(`lab`,2),keyword(e){return e===void 0?i[this.model].keyword(this.color):new c(e)},hex(e){return e===void 0?r.to.hex(this.rgb().round().color):new c(e)},hexa(e){if(e!==void 0)return new c(e);let t=this.rgb().round().color,n=Math.round(255*this.valpha).toString(16).toUpperCase();return n.length===1&&(n=`0`+n),r.to.hex(t)+n},rgbNumber(){let e=this.rgb().color;return(255&e[0])<<16|(255&e[1])<<8|255&e[2]},luminosity(){let e=this.rgb().color,t=[];for(let[n,r]of e.entries()){let e=r/255;t[n]=e<=.04045?e/12.92:((e+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){let t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level(e){let t=this.contrast(e);return t>=7?`AAA`:t>=4.5?`AA`:``},isDark(){let e=this.rgb().color;return(2126*e[0]+7152*e[1]+722*e[2])/1e4<128},isLight(){return!this.isDark()},negate(){let e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){let t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){let t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){let t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){let t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){let t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){let t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){let e=this.rgb().color,t=.3*e[0]+.59*e[1]+.11*e[2];return c.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){let t=this.hsl(),n=t.color[0];return n=(n+e)%360,n=n<0?360+n:n,t.color[0]=n,t},mix(e,t){if(!e||!e.rgb)throw Error(`Argument to "mix" was not a Color instance, but rather an instance of `+typeof e);let n=e.rgb(),r=this.rgb(),i=t===void 0?.5:t,a=2*i-1,o=n.alpha()-r.alpha(),s=((a*o===-1?a:(a+o)/(1+a*o))+1)/2,l=1-s;return c.rgb(s*n.red()+l*r.red(),s*n.green()+l*r.green(),s*n.blue()+l*r.blue(),n.alpha()*i+r.alpha()*(1-i))}};for(let e of Object.keys(i)){if(a.includes(e))continue;let{channels:t}=i[e];c.prototype[e]=function(...t){return this.model===e?new c(this):t.length>0?new c(t,e):new c([...(n=i[this.model][e].raw(this.color),Array.isArray(n)?n:[n]),this.valpha],e);var n},c[e]=function(...n){let r=n[0];return typeof r==`number`&&(r=f(n,t)),new c(r,e)}}function l(e){return function(t){return function(e,t){return Number(e.toFixed(t))}(t,e)}}function u(e,t,n){e=Array.isArray(e)?e:[e];for(let r of e)(s[r]||(s[r]=[]))[t]=n;return e=e[0],function(r){let i;return r===void 0?(i=this[e]().color[t],n&&(i=n(i)),i):(n&&(r=n(r)),i=this[e](),i.color[t]=r,i)}}function d(e){return function(t){return Math.max(0,Math.min(e,t))}}function f(e,t){for(let n=0;n<t;n++)typeof e[n]!=`number`&&(e[n]=0);return e}e.exports=c},784(e){var t,n=typeof Reflect==`object`?Reflect:null,r=n&&typeof n.apply==`function`?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&typeof n.ownKeys==`function`?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise(function(n,r){function i(n){e.removeListener(t,a),r(n)}function a(){typeof e.removeListener==`function`&&e.removeListener(`error`,i),n([].slice.call(arguments))}h(e,t,a,{once:!0}),t!==`error`&&function(e,t,n){typeof e.on==`function`&&h(e,`error`,t,n)}(e,i,{once:!0})})},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var o=10;function s(e){if(typeof e!=`function`)throw TypeError(`The "listener" argument must be of type Function. Received type `+typeof e)}function c(e){return e._maxListeners===void 0?a.defaultMaxListeners:e._maxListeners}function l(e,t,n,r){var i,a,o,l;if(s(n),(a=e._events)===void 0?(a=e._events=Object.create(null),e._eventsCount=0):(a.newListener!==void 0&&(e.emit(`newListener`,t,n.listener?n.listener:n),a=e._events),o=a[t]),o===void 0)o=a[t]=n,++e._eventsCount;else if(typeof o==`function`?o=a[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),(i=c(e))>0&&o.length>i&&!o.warned){o.warned=!0;var u=Error(`Possible EventEmitter memory leak detected. `+o.length+` `+String(t)+` listeners added. Use emitter.setMaxListeners() to increase limit`);u.name=`MaxListenersExceededWarning`,u.emitter=e,u.type=t,u.count=o.length,l=u,console&&console.warn&&console.warn(l)}return e}function u(){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 d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=u.bind(r);return i.listener=n,r.wrapFn=i,i}function f(e,t,n){var r=e._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i==`function`?n?[i.listener||i]:[i]:n?function(e){for(var t=Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):m(i,i.length)}function p(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n==`function`)return 1;if(n!==void 0)return n.length}return 0}function m(e,t){for(var n=Array(t),r=0;r<t;++r)n[r]=e[r];return n}function h(e,t,n,r){if(typeof e.on==`function`)r.once?e.once(t,n):e.on(t,n);else{if(typeof e.addEventListener!=`function`)throw TypeError(`The "emitter" argument must be of type EventEmitter. Received type `+typeof e);e.addEventListener(t,function i(a){r.once&&e.removeEventListener(t,i),n(a)})}}Object.defineProperty(a,`defaultMaxListeners`,{enumerable:!0,get:function(){return o},set:function(e){if(typeof e!=`number`||e<0||i(e))throw RangeError(`The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received `+e+`.`);o=e}}),a.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},a.prototype.setMaxListeners=function(e){if(typeof e!=`number`||e<0||i(e))throw RangeError(`The value of "n" is out of range. It must be a non-negative number. Received `+e+`.`);return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return c(this)},a.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i=e===`error`,a=this._events;if(a!==void 0)i&&=a.error===void 0;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=Error(`Unhandled error.`+(o?` (`+o.message+`)`:``));throw s.context=o,s}var c=a[e];if(c===void 0)return!1;if(typeof c==`function`)r(c,this,t);else{var l=c.length,u=m(c,l);for(n=0;n<l;++n)r(u[n],this,t)}return!0},a.prototype.addListener=function(e,t){return l(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return l(this,e,t,!0)},a.prototype.once=function(e,t){return s(t),this.on(e,d(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,d(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,r,i,a,o;if(s(t),(r=this._events)===void 0||(n=r[e])===void 0)return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit(`removeListener`,e,n.listener||t));else if(typeof n!=`function`){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;i===0?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),n.length===1&&(r[e]=n[0]),r.removeListener!==void 0&&this.emit(`removeListener`,e,o||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,n,r;if((n=this._events)===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var i,a=Object.keys(n);for(r=0;r<a.length;++r)(i=a[r])!==`removeListener`&&this.removeAllListeners(i);return this.removeAllListeners(`removeListener`),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(t=n[e])==`function`)this.removeListener(e,t);else if(t!==void 0)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},a.prototype.listeners=function(e){return f(this,e,!0)},a.prototype.rawListeners=function(e){return f(this,e,!1)},a.listenerCount=function(e,t){return typeof e.listenerCount==`function`?e.listenerCount(t):p.call(e,t)},a.prototype.listenerCount=p,a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},94(e){e.exports=function(e){return!(!e||typeof e==`string`)&&(e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&e.constructor.name!==`String`))}},403(e,t,n){var r=n(94),i=Array.prototype.concat,a=Array.prototype.slice,o=e.exports=function(e){for(var t=[],n=0,o=e.length;n<o;n++){var s=e[n];r(s)?t=i.call(t,a.call(s)):t.push(s)}return t};o.wrap=function(e){return function(){return e(o(arguments))}}},119(t){t.exports=e}},n={};function r(e){var i=n[e];if(i!==void 0)return i.exports;var a=n[e]={exports:{}};return t[e](a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,`__esModule`,{value:!0})};var i={};return(()=>{function e(t){return e=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},e(t)}function t(t){var n=function(t,n){if(e(t)!=`object`||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,n||`default`);if(e(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(t)}(t,`string`);return e(n)==`symbol`?n:n+``}function n(e,n,r){return(n=t(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]==null?{}:arguments[t];t%2?a(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function s(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function c(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,`value`in i&&(i.writable=!0),Object.defineProperty(e,t(i.key),i)}}function l(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(d=function(){return!!e})()}function f(t,n){if(n&&(e(n)==`object`||typeof n==`function`))return n;if(n!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return function(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}(t)}function p(e,t,n){return t=u(t),f(e,d()?Reflect.construct(t,n||[],u(e).constructor):t.apply(e,n))}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}function h(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,`prototype`,{writable:!1}),t&&m(e,t)}r.r(i),r.d(i,{default:()=>kr});var g=r(119),_=r.n(g);function v(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function y(e){this.setState(function(t){return this.constructor.getDerivedStateFromProps(e,t)??null}.bind(this))}function b(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function x(e){var t=e.prototype;if(!t||!t.isReactComponent)throw Error(`Can only polyfill class components`);if(typeof e.getDerivedStateFromProps!=`function`&&typeof t.getSnapshotBeforeUpdate!=`function`)return e;var n=null,r=null,i=null;if(typeof t.componentWillMount==`function`?n=`componentWillMount`:typeof t.UNSAFE_componentWillMount==`function`&&(n=`UNSAFE_componentWillMount`),typeof t.componentWillReceiveProps==`function`?r=`componentWillReceiveProps`:typeof t.UNSAFE_componentWillReceiveProps==`function`&&(r=`UNSAFE_componentWillReceiveProps`),typeof t.componentWillUpdate==`function`?i=`componentWillUpdate`:typeof t.UNSAFE_componentWillUpdate==`function`&&(i=`UNSAFE_componentWillUpdate`),n!==null||r!==null||i!==null){var a=e.displayName||e.name,o=typeof e.getDerivedStateFromProps==`function`?`getDerivedStateFromProps()`:`getSnapshotBeforeUpdate()`;throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
|
|
130
|
+
|
|
131
|
+
`+a+` uses `+o+` but also contains the following legacy lifecycles:`+(n===null?``:`
|
|
132
|
+
`+n)+(r===null?``:`
|
|
133
|
+
`+r)+(i===null?``:`
|
|
134
|
+
`+i)+`
|
|
135
|
+
|
|
136
|
+
The above lifecycles should be removed. Learn more about this warning here:
|
|
137
|
+
https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStateFromProps==`function`&&(t.componentWillMount=v,t.componentWillReceiveProps=y),typeof t.getSnapshotBeforeUpdate==`function`){if(typeof t.componentDidUpdate!=`function`)throw Error(`Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype`);t.componentWillUpdate=b;var s=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;s.call(this,e,t,r)}}return e}function S(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function C(e,t){if(e==null)return{};var n,r,i=S(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function w(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function T(e,t){if(e){if(typeof e==`string`)return w(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?w(e,t):void 0}}function E(e){return function(e){if(Array.isArray(e))return w(e)}(e)||function(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}(e)||T(e)||function(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
138
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function D(e,t){if(t&&e?.constructor===t)return`bigNumber`;var n=function(e){return{}.toString.call(e).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}(e);return n===`number`&&(n=isNaN(e)?`nan`:(0|e)===e?`integer`:`float`),n}function O(e){return e.replace(/\\/g,`\\\\`).replace(/\n/g,`\\n`).replace(/\t/g,`\\t`).replace(/\r/g,`\\r`).replace(/\f/g,`\\f`)}v.__suppressDeprecationWarning=!0,y.__suppressDeprecationWarning=!0,b.__suppressDeprecationWarning=!0;var k=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=(e.parent_type,e.namespace),n=e.quotesOnKeys,r=e.indentWidth,i=e.theme,a=e.singleIndent,o=e.showComma,s=e.isLast,c=e.jsvRoot,l=e.name?e.name:``;return _().createElement(`div`,{className:`variable-row`},_().createElement(`span`,Object.assign({},G(i,`object-name`),{key:t},G(i,`objectKeyVal`,{paddingLeft:r*a})),_().createElement(`span`,{className:`object-key`},n&&_().createElement(`span`,{style:{verticalAlign:`top`}},`"`),_().createElement(`span`,null,l),n&&_().createElement(`span`,{style:{verticalAlign:`top`}},`"`)),_().createElement(`span`,G(i,`colon`),`:`)),_().createElement(`span`,G(i,`circularReference`),`[CIRCULAR REFERENCE]`),o&&!s&&!c&&_().createElement(`span`,G(i,`comma`),`,`))}}])}(_().PureComponent),A={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`},j={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)`};let M={white:`#fff`,black:`#000`,transparent:`rgba(1, 1, 1, 0)`,globalFontFamily:`monospace`,globalCursor:`default`,indentBlockWidth:`5px`,braceFontWeight:`bold`,braceCursor:`pointer`,ellipsisFontSize:`18px`,ellipsisLineHeight:`10px`,ellipsisCursor:`pointer`,keyMargin:`0px 5px`,keyLetterSpacing:`0.5px`,keyFontStyle:`none`,keyBorderRadius:`3px`,keyColonWeight:`bold`,keyVerticalAlign:`top`,keyOpacity:`0.85`,keyOpacityHover:`1`,keyValPaddingTop:`3px`,keyValPaddingBottom:`3px`,keyValPaddingRight:`5px`,keyValBorderLeft:`1px solid`,keyValBorderHover:`2px solid`,keyValPaddingHover:`3px 5px 3px 4px`,pushedContentMarginLeft:`6px`,variableValuePaddingRight:`6px`,nullFontSize:`11px`,nullFontWeight:`bold`,nullPadding:`1px 2px`,nullBorderRadius:`3px`,nanFontSize:`11px`,nanFontWeight:`bold`,nanPadding:`1px 2px`,nanBorderRadius:`3px`,undefinedFontSize:`11px`,undefinedFontWeight:`bold`,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`};var N=r(742);let P=function(e){return e},F=typeof global==`object`&&global&&global.Object===Object&&global;var I=typeof self==`object`&&self&&self.Object===Object&&self;let L=F||I||Function(`return this`)(),R=L.Symbol;var z=Object.prototype,B=z.hasOwnProperty,V=z.toString,ee=R?R.toStringTag:void 0;let H=function(e){var t=B.call(e,ee),n=e[ee];try{e[ee]=void 0;var r=!0}catch{}var i=V.call(e);return r&&(t?e[ee]=n:delete e[ee]),i};var te=Object.prototype.toString;let U=function(e){return te.call(e)};var ne=R?R.toStringTag:void 0;let re=function(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:ne&&ne in Object(e)?H(e):U(e)},ie=function(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)},ae=function(e){if(!ie(e))return!1;var t=re(e);return t==`[object Function]`||t==`[object GeneratorFunction]`||t==`[object AsyncFunction]`||t==`[object Proxy]`},oe=L[`__core-js_shared__`];var se,ce=(se=/[^.]+$/.exec(oe&&oe.keys&&oe.keys.IE_PROTO||``))?`Symbol(src)_1.`+se:``;let le=function(e){return!!ce&&ce in e};var ue=Function.prototype.toString;let de=function(e){if(e!=null){try{return ue.call(e)}catch{}try{return e+``}catch{}}return``};var fe=/^\[object .+?Constructor\]$/,pe=Function.prototype,me=Object.prototype,he=pe.toString,ge=me.hasOwnProperty,_e=RegExp(`^`+he.call(ge).replace(/[\\^$.*+?()[\]{}|]/g,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);let ve=function(e){return!(!ie(e)||le(e))&&(ae(e)?_e:fe).test(de(e))},ye=function(e,t){return e?.[t]},be=function(e,t){var n=ye(e,t);return ve(n)?n:void 0};var xe=be(L,`WeakMap`);let Se=xe&&new xe,Ce=Se?function(e,t){return Se.set(e,t),e}:P;var we=Object.create;let Te=function(){function e(){}return function(t){if(!ie(t))return{};if(we)return we(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),Ee=function(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Te(e.prototype),r=e.apply(n,t);return ie(r)?r:n}},De=function(e,t,n){var r=1&t,i=Ee(e);return function t(){return(this&&this!==L&&this instanceof t?i:e).apply(r?n:this,arguments)}},Oe=function(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)};var ke=Math.max;let Ae=function(e,t,n,r){for(var i=-1,a=e.length,o=n.length,s=-1,c=t.length,l=ke(a-o,0),u=Array(c+l),d=!r;++s<c;)u[s]=t[s];for(;++i<o;)(d||i<a)&&(u[n[i]]=e[i]);for(;l--;)u[s++]=e[i++];return u};var je=Math.max;let Me=function(e,t,n,r){for(var i=-1,a=e.length,o=-1,s=n.length,c=-1,l=t.length,u=je(a-s,0),d=Array(u+l),f=!r;++i<u;)d[i]=e[i];for(var p=i;++c<l;)d[p+c]=t[c];for(;++o<s;)(f||i<a)&&(d[p+n[o]]=e[i++]);return d},Ne=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r},Pe=function(){};function Fe(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}Fe.prototype=Te(Pe.prototype),Fe.prototype.constructor=Fe;let Ie=Fe,Le=Se?function(e){return Se.get(e)}:function(){},Re={};var ze=Object.prototype.hasOwnProperty;let Be=function(e){for(var t=e.name+``,n=Re[t],r=ze.call(Re,t)?n.length:0;r--;){var i=n[r],a=i.func;if(a==null||a==e)return i.name}return t};function Ve(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}Ve.prototype=Te(Pe.prototype),Ve.prototype.constructor=Ve;let W=Ve,He=Array.isArray,Ue=function(e){return typeof e==`object`&&!!e},We=function(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t},Ge=function(e){if(e instanceof Ie)return e.clone();var t=new W(e.__wrapped__,e.__chain__);return t.__actions__=We(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t};var Ke=Object.prototype.hasOwnProperty;function qe(e){if(Ue(e)&&!He(e)&&!(e instanceof Ie)){if(e instanceof W)return e;if(Ke.call(e,`__wrapped__`))return Ge(e)}return new W(e)}qe.prototype=Pe.prototype,qe.prototype.constructor=qe;let Je=qe,Ye=function(e){var t=Be(e),n=Je[t];if(typeof n!=`function`||!(t in Ie.prototype))return!1;if(e===n)return!0;var r=Le(n);return!!r&&e===r[0]};var Xe=Date.now;let Ze=function(e){var t=0,n=0;return function(){var r=Xe(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}},Qe=Ze(Ce);var $e=/\{\n\/\* \[wrapped with (.+)\] \*/,et=/,? & /;let tt=function(e){var t=e.match($e);return t?t[1].split(et):[]};var nt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;let rt=function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?`& `:``)+t[r],t=t.join(n>2?`, `:` `),e.replace(nt,`{
|
|
139
|
+
/* [wrapped with `+t+`] */
|
|
140
|
+
`)},it=function(e){return function(){return e}},at=function(){try{var e=be(Object,`defineProperty`);return e({},``,{}),e}catch{}}(),ot=Ze(at?function(e,t){return at(e,`toString`,{configurable:!0,enumerable:!1,value:it(t),writable:!0})}:P),st=function(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&!1!==t(e[n],n,e););return e},ct=function(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1},lt=function(e){return e!=e},ut=function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1},dt=function(e,t,n){return t==t?ut(e,t,n):ct(e,lt,n)},ft=function(e,t){return!!(e!=null&&e.length)&&dt(e,t,0)>-1};var pt=[[`ary`,128],[`bind`,1],[`bindKey`,2],[`curry`,8],[`curryRight`,16],[`flip`,512],[`partial`,32],[`partialRight`,64],[`rearg`,256]];let mt=function(e,t){return st(pt,function(n){var r=`_.`+n[0];t&n[1]&&!ft(e,r)&&e.push(r)}),e.sort()},ht=function(e,t,n){var r=t+``;return ot(e,rt(r,mt(tt(r),n)))},gt=function(e,t,n,r,i,a,o,s,c,l){var u=8&t;t|=u?32:64,4&(t&=~(u?64:32))||(t&=-4);var d=[e,t,i,u?a:void 0,u?o:void 0,u?void 0:a,u?void 0:o,s,c,l],f=n.apply(void 0,d);return Ye(e)&&Qe(f,d),f.placeholder=r,ht(f,e,t)},_t=function(e){return e.placeholder};var vt=/^(?:0|[1-9]\d*)$/;let yt=function(e,t){var n=typeof e;return!!(t??=9007199254740991)&&(n==`number`||n!=`symbol`&&vt.test(e))&&e>-1&&e%1==0&&e<t};var bt=Math.min;let xt=function(e,t){for(var n=e.length,r=bt(t.length,n),i=We(e);r--;){var a=t[r];e[r]=yt(a,n)?i[a]:void 0}return e};var St=`__lodash_placeholder__`;let Ct=function(e,t){for(var n=-1,r=e.length,i=0,a=[];++n<r;){var o=e[n];o!==t&&o!==St||(e[n]=St,a[i++]=n)}return a},wt=function e(t,n,r,i,a,o,s,c,l,u){var d=128&n,f=1&n,p=2&n,m=24&n,h=512&n,g=p?void 0:Ee(t);return function _(){for(var v=arguments.length,y=Array(v),b=v;b--;)y[b]=arguments[b];if(m)var x=_t(_),S=Ne(y,x);if(i&&(y=Ae(y,i,a,m)),o&&(y=Me(y,o,s,m)),v-=S,m&&v<u){var C=Ct(y,x);return gt(t,n,e,_.placeholder,r,y,C,c,l,u-v)}var w=f?r:this,T=p?w[t]:t;return v=y.length,c?y=xt(y,c):h&&v>1&&y.reverse(),d&&l<v&&(y.length=l),this&&this!==L&&this instanceof _&&(T=g||Ee(T)),T.apply(w,y)}},Tt=function(e,t,n){var r=Ee(e);return function i(){for(var a=arguments.length,o=Array(a),s=a,c=_t(i);s--;)o[s]=arguments[s];var l=a<3&&o[0]!==c&&o[a-1]!==c?[]:Ct(o,c);return(a-=l.length)<n?gt(e,t,wt,i.placeholder,void 0,o,l,void 0,void 0,n-a):Oe(this&&this!==L&&this instanceof i?r:e,this,o)}},Et=function(e,t,n,r){var i=1&t,a=Ee(e);return function t(){for(var o=-1,s=arguments.length,c=-1,l=r.length,u=Array(l+s),d=this&&this!==L&&this instanceof t?a:e;++c<l;)u[c]=r[c];for(;s--;)u[c++]=arguments[++o];return Oe(d,i?n:this,u)}};var Dt=`__lodash_placeholder__`,Ot=128,kt=Math.min;let At=function(e,t){var n=e[1],r=t[1],i=n|r,a=i<131,o=r==Ot&&n==8||r==Ot&&n==256&&e[7].length<=t[8]||r==384&&t[7].length<=t[8]&&n==8;if(!a&&!o)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var s=t[3];if(s){var c=e[3];e[3]=c?Ae(c,s,t[4]):s,e[4]=c?Ct(e[3],Dt):t[4]}return(s=t[5])&&(c=e[5],e[5]=c?Me(c,s,t[6]):s,e[6]=c?Ct(e[5],Dt):t[6]),(s=t[7])&&(e[7]=s),r&Ot&&(e[8]=e[8]==null?t[8]:kt(e[8],t[8])),e[9]??=t[9],e[0]=t[0],e[1]=i,e};var jt=/\s/;let Mt=function(e){for(var t=e.length;t--&&jt.test(e.charAt(t)););return t};var Nt=/^\s+/;let Pt=function(e){return e&&e.slice(0,Mt(e)+1).replace(Nt,``)},Ft=function(e){return typeof e==`symbol`||Ue(e)&&re(e)==`[object Symbol]`};var It=/^[-+]0x[0-9a-f]+$/i,Lt=/^0b[01]+$/i,Rt=/^0o[0-7]+$/i,zt=parseInt;let Bt=function(e){if(typeof e==`number`)return e;if(Ft(e))return NaN;if(ie(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=ie(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=Pt(e);var n=Lt.test(e);return n||Rt.test(e)?zt(e.slice(2),n?2:8):It.test(e)?NaN:+e};var Vt=1/0;let Ht=function(e){return e?(e=Bt(e))===Vt||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:e===0?e:0},Ut=function(e){var t=Ht(e),n=t%1;return t==t?n?t-n:t:0};var Wt=Math.max;let Gt=function(e,t,n,r,i,a,o,s){var c=2&t;if(!c&&typeof e!=`function`)throw TypeError(`Expected a function`);var l=r?r.length:0;if(l||(t&=-97,r=i=void 0),o=o===void 0?o:Wt(Ut(o),0),s=s===void 0?s:Ut(s),l-=i?i.length:0,64&t){var u=r,d=i;r=i=void 0}var f=c?void 0:Le(e),p=[e,t,n,r,i,u,d,a,o,s];if(f&&At(p,f),e=p[0],t=p[1],n=p[2],r=p[3],i=p[4],!(s=p[9]=p[9]===void 0?c?0:e.length:Wt(p[9]-l,0))&&24&t&&(t&=-25),t&&t!=1)m=t==8||t==16?Tt(e,t,s):t!=32&&t!=33||i.length?wt.apply(void 0,p):Et(e,t,n,r);else var m=De(e,t,n);return ht((f?Ce:Qe)(m,p),e,t)};function Kt(e,t,n){var r=Gt(e,8,void 0,void 0,void 0,void 0,void 0,t=n?void 0:t);return r.placeholder=Kt.placeholder,r}Kt.placeholder={};let qt=Kt,Jt={threezerotwofour:{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`},apathy:{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`},ashes:{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`},atelierDune:{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`},atelierForest:{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`},atelierHeath:{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`},atelierLakeside:{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`},atelierSeaside:{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`},bespin:{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`},brewer:{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`},bright:{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`},chalk:{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`},codeschool:{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`},colors:{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`},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`},eighties:{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`},embers:{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`},flat:{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`},google:{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`},grayscale:{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`},greenscreen:{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`},harmonic:{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`},hopscotch:{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`},isotope:{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`},marrakesh:{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`},mocha:{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`},monokai:{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`},nicinabox:{scheme:`nicinabox`,author:`nicinabox (http://github.com/nicinabox)`,base00:`#2A2F3A`,base01:`#3C444F`,base02:`#4F5A65`,base03:`#BEBEBE`,base04:`#b0b0b0`,base05:`#d0d0d0`,base06:`#FFFFFF`,base07:`#f5f5f5`,base08:`#fb9fb1`,base09:`#FC6D24`,base0A:`#ddb26f`,base0B:`#A1C659`,base0C:`#12cfc0`,base0D:`#6FB3D2`,base0E:`#D381C3`,base0F:`#deaf8f`},ocean:{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`},paraiso:{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`},pop:{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`},railscasts:{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`},shapeshifter:{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`},solarized:{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`},summerfruit:{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`},tomorrow:{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`},tube:{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`},twilight:{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`}},Yt=Jt.default,Xt=Object.keys(Yt),Zt=e=>{let[t,n,r]=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;return[.299*t+.587*n+.114*r,-.14713*t+-.28886*n+.436*r,.615*t+-.51499*n+-.10001*r]}(N(e).array());var i;let a=function(e){let t=e[0],n=e[1],r=e[2],i,a,o;return i=1*t+0*n+1.13983*r,a=1*t+-.39465*n+-.5806*r,o=1*t+2.02311*n+0*r,i=Math.min(Math.max(0,i),1),a=Math.min(Math.max(0,a),1),o=Math.min(Math.max(0,o),1),[255*i,255*a,255*o]}([(i=t,i<.25?1:i<.5?.9-i:1.1-i),n,r]);return N.rgb(a).hex()},Qt=e=>t=>({className:[t.className,e.className].filter(Boolean).join(` `),style:{...t.style||{},...e.style||{}}}),$t=(e,t)=>{let n=Object.keys(t);for(let t in e)n.indexOf(t)===-1&&n.push(t);return n.reduce((n,r)=>(n[r]=((e,t)=>{if(e===void 0)return t;if(t===void 0)return e;let n=typeof t;switch(typeof e){case`string`:switch(n){case`string`:return[t,e].filter(Boolean).join(` `);case`object`:return Qt({className:e,style:t});case`function`:return(n,...r)=>Qt({className:e})(t(n,...r))}break;case`object`:switch(n){case`string`:return Qt({className:t,style:e});case`object`:return{...t,...e};case`function`:return(n,...r)=>Qt({style:e})(t(n,...r))}break;case`function`:switch(n){case`string`:return(n,...r)=>e(Qt(n)({className:t}),...r);case`object`:return(n,...r)=>e(Qt(n)({style:t}),...r);case`function`:return(n,...r)=>e(t(n,...r),...r)}}})(e[r],t[r]),n),{})},en=(e,t,...n)=>{if(t===null)return e;Array.isArray(t)||(t=[t]);let r=t.map(t=>e[t]).filter(Boolean).reduce((e,t)=>(typeof t==`string`?e.className=[e.className,t].filter(Boolean).join(` `):typeof t==`object`?e.style={...e.style,...t}:typeof t==`function`&&(e={...e,...t(e,...n)}),e),{className:``,style:{}});return r.className||delete r.className,Object.keys(r.style).length===0&&delete r.style,r},tn=e=>Object.keys(e).reduce((t,n)=>(t[n]=/^base/.test(n)?Zt(e[n]):n===`scheme`?e[n]+`:inverted`:e[n],t),{}),nn=qt((e,t={},n={},...r)=>{let{defaultBase16:i=Yt,base16Themes:a=null}=t,o=an(n,a);o&&(n={...o,...n});let s=Xt.reduce((e,t)=>(e[t]=n[t]||i[t],e),{}),c=$t(Object.keys(n).reduce((e,t)=>(Xt.indexOf(t)===-1&&(e[t]=n[t]),e),{}),e(s));return qt(en,2)(c,...r)},3),rn=e=>!!e.extend,an=(e,t)=>{if(e&&rn(e)&&e.extend&&(e=e.extend),typeof e==`string`){let[n,r]=e.split(`:`);e=t?t[n]:Jt[n],r===`inverted`&&(e=tn(e))}return e&&Object.prototype.hasOwnProperty.call(e,`base00`)?e:void 0};var on=function(e){var t=function(e){return{backgroundColor:e.base00,ellipsisColor:e.base09,braceColor:e.base07,expandedIcon:e.base0D,collapsedIcon:e.base0E,keyColor:e.base07,arrayKeyColor:e.base0C,objectSize:e.base04,copyToClipboard:e.base0F,copyToClipboardCheck:e.base0D,objectBorder:e.base02,dataTypes:{boolean:e.base0E,date:e.base0D,float:e.base0B,function:e.base0D,integer:e.base0F,string:e.base09,nan:e.base08,null:e.base0A,undefined:e.base05,regexp:e.base0A,background:e.base02,bigNumber:e.base09},editVariable:{editIcon:e.base0E,cancelIcon:e.base09,removeIcon:e.base09,addIcon:e.base0E,checkIcon:e.base0E,background:e.base01,color:e.base0A,border:e.base07},addKeyModal:{background:e.base05,border:e.base04,color:e.base0A,labelColor:e.base01},validationFailure:{background:e.base09,iconColor:e.base01,fontColor:e.base01}}}(e);return{"app-container":{fontFamily:M.globalFontFamily,cursor:M.globalCursor,backgroundColor:t.backgroundColor,position:`relative`},ellipsis:{display:`inline-block`,color:t.ellipsisColor,fontSize:M.ellipsisFontSize,lineHeight:M.ellipsisLineHeight,cursor:M.ellipsisCursor},"brace-row":{display:`inline-block`,cursor:`pointer`},brace:{display:`inline-block`,cursor:M.braceCursor,fontWeight:M.braceFontWeight,color:t.braceColor},"expanded-icon":{color:t.expandedIcon},"collapsed-icon":{color:t.collapsedIcon},colon:{display:`inline-block`,margin:M.keyMargin,color:t.keyColor,verticalAlign:`top`},objectKeyVal:function(e,n){return{style:o({paddingTop:M.keyValPaddingTop,paddingRight:M.keyValPaddingRight,paddingBottom:M.keyValPaddingBottom,borderLeft:M.keyValBorderLeft+` `+t.objectBorder,":hover":{paddingLeft:n.paddingLeft-1+`px`,borderLeft:M.keyValBorderHover+` `+t.objectBorder}},n)}},"object-key-val-no-border":{padding:M.keyValPadding},"pushed-content":{marginLeft:M.pushedContentMarginLeft},variableValue:function(e,t){return{style:o({display:`inline-block`,paddingRight:M.variableValuePaddingRight,position:`relative`},t)}},"object-name":{display:`inline-block`,color:t.keyColor,letterSpacing:M.keyLetterSpacing,fontStyle:M.keyFontStyle,verticalAlign:M.keyVerticalAlign,opacity:M.keyOpacity,":hover":{opacity:M.keyOpacityHover}},"array-key":{display:`inline-block`,color:t.arrayKeyColor,letterSpacing:M.keyLetterSpacing,fontStyle:M.keyFontStyle,verticalAlign:M.keyVerticalAlign,opacity:M.keyOpacity,":hover":{opacity:M.keyOpacityHover}},"object-size":{color:t.objectSize,borderRadius:M.objectSizeBorderRadius,fontStyle:M.objectSizeFontStyle,margin:M.objectSizeMargin,cursor:`default`},"data-type-label":{fontSize:M.dataTypeFontSize,marginRight:M.dataTypeMarginRight,opacity:M.datatypeOpacity},boolean:{display:`inline-block`,color:t.dataTypes.boolean},date:{display:`inline-block`,color:t.dataTypes.date},"date-value":{marginLeft:M.dateValueMarginLeft},float:{display:`inline-block`,color:t.dataTypes.float},function:{display:`inline-block`,color:t.dataTypes.function,cursor:`pointer`,whiteSpace:`pre-line`},"function-value":{fontStyle:`italic`},integer:{display:`inline-block`,color:t.dataTypes.integer},bigNumber:{display:`inline-block`,color:t.dataTypes.bigNumber},string:{display:`inline-block`,color:t.dataTypes.string},nan:{display:`inline-block`,color:t.dataTypes.nan,fontSize:M.nanFontSize,fontWeight:M.nanFontWeight,backgroundColor:t.dataTypes.background,padding:M.nanPadding,borderRadius:M.nanBorderRadius},null:{display:`inline-block`,color:t.dataTypes.null,fontSize:M.nullFontSize,fontWeight:M.nullFontWeight,backgroundColor:t.dataTypes.background,padding:M.nullPadding,borderRadius:M.nullBorderRadius},undefined:{display:`inline-block`,color:t.dataTypes.undefined,fontSize:M.undefinedFontSize,padding:M.undefinedPadding,borderRadius:M.undefinedBorderRadius,backgroundColor:t.dataTypes.background},circularReference:{display:`inline-block`,color:t.dataTypes.null,fontSize:M.nullFontSize,fontWeight:M.nullFontWeight,backgroundColor:t.dataTypes.background,padding:M.nullPadding,borderRadius:M.nullBorderRadius},regexp:{display:`inline-block`,color:t.dataTypes.regexp},"copy-to-clipboard":{cursor:M.clipboardCursor},"copy-icon":{color:t.copyToClipboard,fontSize:M.iconFontSize,marginRight:M.iconMarginRight,verticalAlign:`top`},"copy-icon-copied":{color:t.copyToClipboardCheck,marginLeft:M.clipboardCheckMarginLeft},"array-group-meta-data":{display:`inline-block`,padding:M.arrayGroupMetaPadding},"object-meta-data":{display:`inline-block`,padding:M.metaDataPadding},"icon-container":{display:`inline-block`,width:M.iconContainerWidth},tooltip:{padding:M.tooltipPadding},removeVarIcon:{verticalAlign:`top`,display:`inline-block`,color:t.editVariable.removeIcon,cursor:M.iconCursor,fontSize:M.iconFontSize,marginRight:M.iconMarginRight},addVarIcon:{verticalAlign:`top`,display:`inline-block`,color:t.editVariable.addIcon,cursor:M.iconCursor,fontSize:M.iconFontSize,marginRight:M.iconMarginRight},editVarIcon:{verticalAlign:`top`,display:`inline-block`,color:t.editVariable.editIcon,cursor:M.iconCursor,fontSize:M.iconFontSize,marginRight:M.iconMarginRight},"edit-icon-container":{display:`inline-block`,verticalAlign:`top`},"check-icon":{display:`inline-block`,cursor:M.iconCursor,color:t.editVariable.checkIcon,fontSize:M.iconFontSize,paddingRight:M.iconPaddingRight},"cancel-icon":{display:`inline-block`,cursor:M.iconCursor,color:t.editVariable.cancelIcon,fontSize:M.iconFontSize,paddingRight:M.iconPaddingRight},"edit-input":{display:`inline-block`,minWidth:M.editInputMinWidth,borderRadius:M.editInputBorderRadius,backgroundColor:t.editVariable.background,color:t.editVariable.color,padding:M.editInputPadding,marginRight:M.editInputMarginRight,fontFamily:M.editInputFontFamily},"detected-row":{paddingTop:M.detectedRowPaddingTop},"key-modal-request":{position:M.addKeyCoverPosition,top:M.addKeyCoverPositionPx,left:M.addKeyCoverPositionPx,right:M.addKeyCoverPositionPx,bottom:M.addKeyCoverPositionPx,backgroundColor:M.addKeyCoverBackground},"key-modal":{width:M.addKeyModalWidth,backgroundColor:t.addKeyModal.background,marginLeft:M.addKeyModalMargin,marginRight:M.addKeyModalMargin,padding:M.addKeyModalPadding,borderRadius:M.addKeyModalRadius,marginTop:`15px`,position:`relative`},"key-modal-label":{color:t.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:t.addKeyModal.color,border:`none`,boxSizing:`border-box`,borderRadius:`2px`},"key-modal-cancel":{backgroundColor:t.editVariable.removeIcon,position:`absolute`,top:`0px`,right:`0px`,borderRadius:`0px 3px 0px 3px`,cursor:`pointer`},"key-modal-cancel-icon":{color:t.addKeyModal.labelColor,fontSize:M.iconFontSize,transform:`rotate(45deg)`},"key-modal-submit":{color:t.editVariable.addIcon,fontSize:M.iconFontSize,position:`absolute`,right:`2px`,top:`3px`,cursor:`pointer`},"function-ellipsis":{display:`inline-block`,color:t.ellipsisColor,fontSize:M.ellipsisFontSize,lineHeight:M.ellipsisLineHeight,cursor:M.ellipsisCursor},"validation-failure":{float:`right`,padding:`3px 6px`,borderRadius:`2px`,cursor:`pointer`,color:t.validationFailure.fontColor,backgroundColor:t.validationFailure.background},"validation-failure-label":{marginRight:`6px`},"validation-failure-clear":{position:`relative`,verticalAlign:`top`,cursor:`pointer`,color:t.validationFailure.iconColor,fontSize:M.iconFontSize,transform:`rotate(45deg)`},comma:{display:`inline-block`,color:M.commaColor,fontSize:M.commaFontSize,marginRight:M.commaMarginRight,cursor:`default`}}},sn=function(e){var t=A;return!1!==e&&e!==`none`||(t=j),nn(on,{defaultBase16:t})(e)};function G(e,t,n){return e||console.error(`theme has not been set`),sn(e)(t,n)}var cn=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.typeName,n=e.displayDataTypes,r=e.theme;return n?_().createElement(`span`,Object.assign({className:`data-type-label`},G(r,`data-type-label`)),t):null}}])}(_().PureComponent),ln=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props;return _().createElement(`div`,G(e.theme,`boolean`),_().createElement(cn,Object.assign({typeName:`bool`},e)),e.value?`true`:`false`)}}])}(_().PureComponent),un=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props;return _().createElement(`div`,G(e.theme,`date`),_().createElement(cn,Object.assign({typeName:`date`},e)),_().createElement(`span`,Object.assign({className:`date-value`},G(e.theme,`date-value`)),e.value.toLocaleTimeString(`en-us`,{weekday:`short`,year:`numeric`,month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})))}}])}(_().PureComponent),dn=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props;return _().createElement(`div`,G(e.theme,`float`),_().createElement(cn,Object.assign({typeName:`float`},e)),this.props.value)}}])}(_().PureComponent),fn=r(784),pn=function(){return l(function e(){s(this,e),this.handler=function(){}},[{key:`register`,value:function(e){this.handler=e}},{key:`dispatch`,value:function(e){var t;(t=this.handler)==null||t.call(this,e)}}])}();globalThis.__globalDispatcherInstance||(globalThis.__globalDispatcherInstance=new pn);let mn=globalThis.__globalDispatcherInstance;var hn=`updated_src`,gn=new(function(e){function t(){var e;s(this,t);var n=[...arguments];return(e=p(this,t,[].concat(n))).objects={},e.set=function(t,n,r,i){e.objects[t]===void 0&&(e.objects[t]={}),e.objects[t][n]===void 0&&(e.objects[t][n]={}),e.objects[t][n][r]=i},e.get=function(t,n,r,i){return e.objects[t]===void 0||e.objects[t][n]===void 0||e.objects[t][n][r]===void 0?i:e.objects[t][n][r]},e.handleAction=function(t){var n=t.rjvId,r=t.data;switch(t.name){case`RESET`:e.emit(`reset-`+n);break;case`VARIABLE_UPDATED`:t.data[hn]=e.updateSrc(n,r),e.set(n,`action`,`variable-update`,o(o({},r),{},{type:`variable-edited`})),e.emit(`variable-update-`+n);break;case`VARIABLE_REMOVED`:t.data[hn]=e.updateSrc(n,r),e.set(n,`action`,`variable-update`,o(o({},r),{},{type:`variable-removed`})),e.emit(`variable-update-`+n);break;case`VARIABLE_ADDED`:t.data[hn]=e.updateSrc(n,r),e.set(n,`action`,`variable-update`,o(o({},r),{},{type:`variable-added`})),e.emit(`variable-update-`+n);break;case`ADD_VARIABLE_KEY_REQUEST`:e.set(n,`action`,`new-key-request`,r),e.emit(`add-key-request-`+n)}},e.updateSrc=function(t,n){var r=n.name,i=n.namespace,a=n.new_value,o=n.variable_removed;i.shift();var s,c=e.get(t,`global`,`src`),l=e.deepCopy(c,E(i)),u=l,d=function(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=T(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
141
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}(i);try{for(d.s();!(s=d.n()).done;)u=u[s.value]}catch(e){d.e(e)}finally{d.f()}return o?D(u)===`array`?u.splice(r,1):delete u[r]:r===null?l=a:u[r]=a,e.set(t,`global`,`src`,l),l},e.deepCopy=function(t,n){var r,i=D(t),a=n.shift();return i===`array`?r=E(t):i===`object`&&(r=o({},t)),a!==void 0&&(r[a]=e.deepCopy(t[a],n)),r},e}return h(t,e),l(t)}(fn.EventEmitter));mn.register(gn.handleAction.bind(gn));let _n=gn;var vn=function(e){function t(e){var n;return s(this,t),(n=p(this,t,[e])).handleToggleCollapsed=function(){n.setState({collapsed:!n.state.collapsed},function(){_n.set(n.props.rjvId,n.props.namespace,`collapsed`,n.state.collapsed)})},n.getFunctionDisplay=function(e){var t=n.props;return e?_().createElement(`span`,null,n.props.value.toString().slice(9,-1).replace(/\{[\s\S]+/,``),_().createElement(`span`,{className:`function-collapsed`,style:{fontWeight:`bold`}},_().createElement(`span`,null,`{`),_().createElement(`span`,G(t.theme,`ellipsis`),`...`),_().createElement(`span`,null,`}`))):n.props.value.toString().slice(9,-1)},n.state={collapsed:_n.get(e.rjvId,e.namespace,`collapsed`,!0)},n}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=this.state.collapsed;return _().createElement(`div`,G(e.theme,`function`),_().createElement(cn,Object.assign({typeName:`function`},e)),_().createElement(`span`,Object.assign({},G(e.theme,`function-value`),{className:`rjv-function-container`,onClick:this.handleToggleCollapsed}),this.getFunctionDisplay(t)))}}])}(_().PureComponent),yn=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){return _().createElement(`div`,G(this.props.theme,`nan`),`NaN`)}}])}(_().PureComponent),bn=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){return _().createElement(`div`,G(this.props.theme,`null`),`NULL`)}}])}(_().PureComponent),xn=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props;return _().createElement(`div`,G(e.theme,`integer`),_().createElement(cn,Object.assign({typeName:`int`},e)),this.props.value)}}])}(_().PureComponent),Sn=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props;return _().createElement(`div`,G(e.theme,`regexp`),_().createElement(cn,Object.assign({typeName:`regexp`},e)),this.props.value.toString())}}])}(_().PureComponent),Cn=function(e){function t(e){var n;return s(this,t),(n=p(this,t,[e])).handleToggleCollapsed=function(){n.setState({collapsed:!n.state.collapsed},function(){_n.set(n.props.rjvId,n.props.namespace,`collapsed`,n.state.collapsed)})},n.state={collapsed:_n.get(e.rjvId,e.namespace,`collapsed`,!0)},n}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.state.collapsed,t=this.props,n=t.collapseStringsAfterLength,r=t.theme,i=t.escapeStrings,a=t.value,o=D(n)===`integer`,s={style:{cursor:`default`,wordBreak:`break-all`}};return i&&(a=O(a)),o&&a.length>n&&(s.style.cursor=`pointer`,e&&(a=_().createElement(`span`,null,a.substring(0,n),_().createElement(`span`,G(r,`ellipsis`),` ...`)))),_().createElement(`div`,G(r,`string`),_().createElement(cn,Object.assign({typeName:`string`},t)),_().createElement(`span`,Object.assign({className:`string-value`},s,{onClick:this.handleToggleCollapsed}),`"`,a,`"`))}}])}(_().PureComponent),wn=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){return _().createElement(`div`,G(this.props.theme,`undefined`),`undefined`)}}])}(_().PureComponent),Tn=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props;return _().createElement(`div`,G(e.theme,`bigNumber`),_().createElement(cn,Object.assign({typeName:`bigNumber`},e)),this.props.value.toString())}}])}(_().PureComponent);function En(){return En=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},En.apply(null,arguments)}var Dn=g.useLayoutEffect,On=function(e,t){typeof e==`function`?e(t):e.current=t},kn={"min-height":`0`,"max-height":`none`,height:`0`,visibility:`hidden`,overflow:`hidden`,position:`absolute`,"z-index":`-1000`,top:`0`,right:`0`,display:`block`},An=function(e){Object.keys(kn).forEach(function(t){e.style.setProperty(t,kn[t],`important`)})},jn=null,Mn=function(e,t){var n=e.scrollHeight;return t.sizingStyle.boxSizing===`border-box`?n+t.borderSize:n-t.paddingSize},Nn=function(){},Pn=[`borderBottomWidth`,`borderLeftWidth`,`borderRightWidth`,`borderTopWidth`,`boxSizing`,`fontFamily`,`fontSize`,`fontStyle`,`fontWeight`,`letterSpacing`,`lineHeight`,`paddingBottom`,`paddingLeft`,`paddingRight`,`paddingTop`,`tabSize`,`textIndent`,`textRendering`,`textTransform`,`width`,`wordBreak`,`wordSpacing`,`scrollbarGutter`],Fn=!!document.documentElement.currentStyle,In=function(e){var t=window.getComputedStyle(e);if(t===null)return null;var n,r=(n=t,Pn.reduce(function(e,t){return e[t]=n[t],e},{})),i=r.boxSizing;return i===``?null:(Fn&&i===`border-box`&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+`px`),{sizingStyle:r,paddingSize:parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),borderSize:parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth)})};function Ln(e,t,n){var r,i,a=(r=n,i=_().useRef(r),Dn(function(){i.current=r}),i);g.useLayoutEffect(function(){var n=function(e){return a.current(e)};if(e)return e.addEventListener(t,n),function(){return e.removeEventListener(t,n)}},[])}var Rn=[`cacheMeasurements`,`maxRows`,`minRows`,`onChange`,`onHeightChange`],zn=g.forwardRef(function(e,t){var n=e.cacheMeasurements,r=e.maxRows,i=e.minRows,a=e.onChange,o=a===void 0?Nn:a,s=e.onHeightChange,c=s===void 0?Nn:s,l=S(e,Rn),u=l.value!==void 0,d=g.useRef(null),f=function(e,t){var n=_().useRef();return _().useCallback(function(r){e.current=r,n.current&&On(n.current,null),n.current=t,t&&On(t,r)},[t])}(d,t),p=g.useRef(0),m=g.useRef(),h=function(){var e=d.current,t=n&&m.current?m.current:In(e);if(t){m.current=t;var a=function(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),jn||((jn=document.createElement(`textarea`)).setAttribute(`tabindex`,`-1`),jn.setAttribute(`aria-hidden`,`true`),An(jn)),jn.parentNode===null&&document.body.appendChild(jn);var i=e.paddingSize,a=e.borderSize,o=e.sizingStyle,s=o.boxSizing;Object.keys(o).forEach(function(e){var t=e;jn.style[t]=o[t]}),An(jn),jn.value=t;var c=Mn(jn,e);jn.value=t,c=Mn(jn,e),jn.value=`x`;var l=jn.scrollHeight-i,u=l*n;s===`border-box`&&(u=u+i+a),c=Math.max(u,c);var d=l*r;return s===`border-box`&&(d=d+i+a),[c=Math.min(d,c),l]}(t,e.value||e.placeholder||`x`,i,r),o=a[0],s=a[1];p.current!==o&&(p.current=o,e.style.setProperty(`height`,o+`px`,`important`),c(o,{rowHeight:s}))}};return g.useLayoutEffect(h),function(e,t){Ln(document.body,`reset`,function(n){e.current.form===n.target&&t(n)})}(d,function(){if(!u){var e=d.current.value;requestAnimationFrame(function(){var t=d.current;t&&e!==t.value&&h()})}}),Ln(window,`resize`,h),function(e){Ln(document.fonts,`loadingdone`,e)}(h),g.createElement(`textarea`,En({},l,{onChange:function(e){u||h(),o(e)},ref:f}))});function Bn(e,t){e=e.trim();try{if((e=structuredClone(e))[0]===`[`)return Vn(`array`,JSON.parse(e));if(e[0]===`{`)return Vn(`object`,JSON.parse(e));if(e.match(/-?\d+\.\d+/)&&e.match(/-?\d+\.\d+/)[0]===e)return t&&parseFloat(e).toString()!==e?Vn(`bigNumber`,e):Vn(`float`,parseFloat(e));if(e.match(/-?\d+e-\d+/)&&e.match(/-?\d+e-\d+/)[0]===e)return Vn(`float`,Number(e));if(e.match(/-?\d+/)&&e.match(/-?\d+/)[0]===e)return t&&parseInt(e).toString()!==e?Vn(`bigNumber`,e):Vn(`integer`,parseInt(e));if(e.match(/-?\d+e\+\d+/)&&e.match(/-?\d+e\+\d+/)[0]===e)return Vn(`integer`,Number(e))}catch{}switch(e=e.toLowerCase()){case`undefined`:return Vn(`undefined`,void 0);case`nan`:return Vn(`nan`,NaN);case`null`:return Vn(`null`,null);case`true`:return Vn(`boolean`,!0);case`false`:return Vn(`boolean`,!1);default:if(e=Date.parse(e))return Vn(`date`,new Date(e))}return Vn(!1,null)}function Vn(e,t){return{type:e,value:t}}var Hn=[`style`],Un=[`style`],Wn=[`style`],Gn=[`style`],Kn=[`style`],K=[`style`],qn=[`style`],Jn=[`style`],Yn=[`style`],Xn=[`style`],Zn=[`style`],Qn=[`style`],$n=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Hn);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},dr(t),{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),er=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Un);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},dr(t),{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),tr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Wn),r=dr(t).style;return _().createElement(`span`,n,_().createElement(`svg`,{fill:r.color,width:r.height,height:r.width,style:r,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),nr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Gn),r=dr(t).style;return _().createElement(`span`,n,_().createElement(`svg`,{fill:r.color,width:r.height,height:r.width,style:r,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),rr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Kn);return _().createElement(`span`,n,_().createElement(`svg`,{style:o(o({},dr(t).style),{},{paddingLeft:`2px`,verticalAlign:`top`}),viewBox:`0 0 15 15`,fill:`currentColor`},_().createElement(`path`,{d:`M0 14l6-6-6-6z`})))}}])}(_().PureComponent),ir=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,K);return _().createElement(`span`,n,_().createElement(`svg`,{style:o(o({},dr(t).style),{},{paddingLeft:`2px`,verticalAlign:`top`}),viewBox:`0 0 15 15`,fill:`currentColor`},_().createElement(`path`,{d:`M0 5l6 6 6-6z`})))}}])}(_().PureComponent),ar=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,qn);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},dr(t),{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),or=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Jn);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},dr(t),{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),sr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Yn);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},dr(t),{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),cr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Xn);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},dr(t),{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),lr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Zn);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},dr(t),{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),ur=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Qn);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},dr(t),{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 dr(e){return e||={},{style:o(o({verticalAlign:`middle`},e),{},{color:e.color?e.color:`#000000`,height:`1em`,width:`1em`})}}var fr=function(e){function t(e){var n;return s(this,t),(n=p(this,t,[e])).copiedTimer=null,n.copyToClipboardFallback=function(e){var t=document.createElement(`textarea`);t.value=e,document.body.appendChild(t),t.select(),document.execCommand(`copy`),document.body.removeChild(t)},n.handleCopy=function(){var e=n.props,t=e.clickCallback,r=e.src,i=e.namespace,a=JSON.stringify(n.clipboardValue(r),null,` `);navigator.clipboard?navigator.clipboard.writeText(a).catch(function(){n.copyToClipboardFallback(a)}):n.copyToClipboardFallback(a),n.copiedTimer=setTimeout(function(){n.setState({copied:!1})},5500),n.setState({copied:!0},function(){typeof t==`function`&&t({src:r,namespace:i,name:i[i.length-1]})})},n.getClippyIcon=function(){var e=n.props.theme;return n.state.copied?_().createElement(`span`,null,_().createElement(ar,Object.assign({className:`copy-icon`},G(e,`copy-icon`))),_().createElement(`span`,G(e,`copy-icon-copied`),`✔`)):_().createElement(ar,Object.assign({className:`copy-icon`},G(e,`copy-icon`)))},n.clipboardValue=function(e){switch(D(e)){case`function`:case`regexp`:return e.toString();default:return e}},n.state={copied:!1},n}return h(t,e),l(t,[{key:`componentWillUnmount`,value:function(){this.copiedTimer&&=(clearTimeout(this.copiedTimer),null)}},{key:`render`,value:function(){var e=this.props,t=e.theme,n=e.hidden,r=e.rowHovered,i=G(t,`copy-to-clipboard`).style,a=`inline`;return n&&(a=`none`),_().createElement(`span`,{className:`copy-to-clipboard-container`,title:`Copy to clipboard`,style:{verticalAlign:`top`,display:r?`inline-block`:`none`}},_().createElement(`span`,{style:o(o({},i),{},{display:a}),onClick:this.handleCopy},this.getClippyIcon()))}}])}(_().PureComponent);let pr=function(e){function t(e){var n;return s(this,t),(n=p(this,t,[e])).handleSelect=function(e){var t=n.props,r=t.variable,i=t.namespace,a=t.onEdit,s=t.onSelect,c=t.keyModifier,l=E(i);c(e,`edit`)&&!1!==a?n.prepopInput(r):!1!==s&&(l.shift(),s(o(o({},r),{},{namespace:l})))},n.getEditIcon=function(){var e=n.props,t=e.variable,r=e.theme;return _().createElement(`div`,{className:`click-to-edit`,style:{verticalAlign:`top`,display:n.state.hovered?`inline-block`:`none`}},_().createElement(lr,Object.assign({className:`click-to-edit-icon`},G(r,`editVarIcon`),{onClick:function(){n.prepopInput(t)}})))},n.prepopInput=function(e){if(!1!==n.props.onEdit){var t=function(e,t){var n;switch(D(e,t)){case`undefined`:n=`undefined`;break;case`nan`:n=`NaN`;break;case`string`:n=e;break;case`bigNumber`:case`date`:case`function`:case`regexp`:n=e.toString();break;default:try{n=JSON.stringify(e,null,` `)}catch{n=``}}return n}(e.value,n.props.bigNumber),r=Bn(t,n.props.bigNumber);n.setState({editMode:!0,editValue:t,parsedInput:{type:r.type,value:r.value}})}},n.getRemoveIcon=function(){var e=n.props,t=e.variable,r=e.namespace,i=e.theme,a=e.rjvId;return _().createElement(`div`,{className:`click-to-remove`,style:{verticalAlign:`top`,display:n.state.hovered?`inline-block`:`none`}},_().createElement(or,Object.assign({className:`click-to-remove-icon`},G(i,`removeVarIcon`),{onClick:function(){mn.dispatch({name:`VARIABLE_REMOVED`,rjvId:a,data:{name:t.name,namespace:r,existing_value:t.value,variable_removed:!0}})}})))},n.getValue=function(e,t){var r=!t&&e.type,i=n.props;switch(r){case!1:return n.getEditInput();case`string`:return _().createElement(Cn,Object.assign({value:e.value},i));case`integer`:return _().createElement(xn,Object.assign({value:e.value},i));case`float`:return _().createElement(dn,Object.assign({value:e.value},i));case`boolean`:return _().createElement(ln,Object.assign({value:e.value},i));case`function`:return _().createElement(vn,Object.assign({value:e.value},i));case`null`:return _().createElement(bn,i);case`nan`:return _().createElement(yn,i);case`undefined`:return _().createElement(wn,i);case`date`:return _().createElement(un,Object.assign({value:e.value},i));case`regexp`:return _().createElement(Sn,Object.assign({value:e.value},i));case`bigNumber`:return _().createElement(Tn,Object.assign({value:e.value},i));case`circularReference`:return _().createElement(JsonCircularReference,Object.assign({value:e.value},i));default:var a=``;try{a=JSON.stringify(e.value)}catch{a=``}return _().createElement(`div`,{className:`object-value`},a)}},n.getEditInput=function(){var e=n.props,t=e.keyModifier,r=e.selectOnFocus,i=e.theme,a=n.state.editValue;return _().createElement(`div`,null,_().createElement(zn,Object.assign({type:`text`,ref:function(e){e&&e[r?`select`:`focus`]()},value:a,className:`variable-editor`,onChange:function(e){var t=e.target.value,r=Bn(t,n.props.bigNumber);n.setState({editValue:t,parsedInput:{type:r.type,value:r.value}})},onKeyDown:function(e){switch(e.key){case`Escape`:n.setState({editMode:!1,editValue:``});break;case`Enter`:t(e,`submit`)&&n.submitEdit(!0)}e.stopPropagation()},placeholder:`update this value`,minRows:2},G(i,`edit-input`))),_().createElement(`div`,G(i,`edit-icon-container`),_().createElement(or,Object.assign({className:`edit-cancel`},G(i,`cancel-icon`),{onClick:function(e){e&&e.stopPropagation(),n.setState({editMode:!1,editValue:``})}})),_().createElement(ur,Object.assign({className:`edit-check string-value`},G(i,`check-icon`),{onClick:function(e){e&&e.stopPropagation(),n.submitEdit()}})),_().createElement(`div`,null,n.showDetected())))},n.submitEdit=function(e){var t=n.props,r=t.variable,i=t.namespace,a=t.rjvId,o=t.bigNumber,s=n.state,c=s.editValue,l=s.parsedInput,u=c;e&&l.type&&(u=l.value,o&&l.type===`bigNumber`&&(u=new o(u))),n.setState({editMode:!1}),mn.dispatch({name:`VARIABLE_UPDATED`,rjvId:a,data:{name:r.name,namespace:i,existing_value:r.value,new_value:u,variable_removed:!1}})},n.showDetected=function(){var e=n.props.theme,t=n.getDetectedInput();if(t)return _().createElement(`div`,null,_().createElement(`div`,G(e,`detected-row`),t,_().createElement(ur,{className:`edit-check detected`,style:o({verticalAlign:`top`,paddingLeft:`3px`},G(e,`check-icon`).style),onClick:function(e){e&&e.stopPropagation(),n.submitEdit(!0)}})))},n.getDetectedInput=function(){var e=n.state.parsedInput,t=e.type,r=e.value,i=n.props,a=i.theme;if(!1!==t)switch(t.toLowerCase()){case`object`:return _().createElement(`span`,null,_().createElement(`span`,{style:o(o({},G(a,`brace`).style),{},{cursor:`default`})},`{`),_().createElement(`span`,{style:o(o({},G(a,`ellipsis`).style),{},{cursor:`default`})},`...`),_().createElement(`span`,{style:o(o({},G(a,`brace`).style),{},{cursor:`default`})},`}`));case`array`:return _().createElement(`span`,null,_().createElement(`span`,{style:o(o({},G(a,`brace`).style),{},{cursor:`default`})},`[`),_().createElement(`span`,{style:o(o({},G(a,`ellipsis`).style),{},{cursor:`default`})},`...`),_().createElement(`span`,{style:o(o({},G(a,`brace`).style),{},{cursor:`default`})},`]`));case`string`:return _().createElement(Cn,Object.assign({value:r},i));case`integer`:return _().createElement(xn,Object.assign({value:r},i));case`float`:return _().createElement(dn,Object.assign({value:r},i));case`boolean`:return _().createElement(ln,Object.assign({value:r},i));case`function`:return _().createElement(vn,Object.assign({value:r},i));case`null`:return _().createElement(bn,i);case`nan`:return _().createElement(yn,i);case`undefined`:return _().createElement(wn,i);case`date`:return _().createElement(un,Object.assign({value:new Date(r)},i));case`bignumber`:return _().createElement(Tn,Object.assign({value:r},i));case`circularreference`:return _().createElement(JsonCircularReference,Object.assign({value:variable.value},i))}},n.state={editMode:!1,editValue:``,hovered:!1,renameKey:!1,parsedInput:{type:!1,value:null}},n}return h(t,e),l(t,[{key:`render`,value:function(){var e=this,t=this.props,n=t.variable,r=t.singleIndent,i=t.type,a=t.theme,s=t.namespace,c=t.indentWidth,l=t.enableClipboard,u=t.onEdit,d=t.onDelete,f=t.onSelect,p=t.displayArrayKey,m=t.quotesOnKeys,h=t.showComma,g=t.isLast,v=this.state.editMode,y=!1!==f||!1!==u;return _().createElement(`div`,Object.assign({},G(a,`objectKeyVal`,{paddingLeft:c*r}),{onMouseEnter:function(){return e.setState(o(o({},e.state),{},{hovered:!0}))},onMouseLeave:function(){return e.setState(o(o({},e.state),{},{hovered:!1}))},className:`variable-row`,key:n.name}),i===`array`?p?_().createElement(`span`,Object.assign({},G(a,`array-key`),{key:n.name+`_`+s}),n.name,_().createElement(`div`,G(a,`colon`),`:`)):null:_().createElement(`span`,null,_().createElement(`span`,Object.assign({},G(a,`object-name`),{className:`object-key`,key:n.name+`_`+s,onClick:y?this.handleSelect:null}),!!m&&_().createElement(`span`,{style:{verticalAlign:`top`}},`"`),_().createElement(`span`,{style:{display:`inline-block`}},O(n.name)),!!m&&_().createElement(`span`,{style:{verticalAlign:`top`}},`"`)),_().createElement(`span`,G(a,`colon`),`:`)),_().createElement(`div`,Object.assign({className:`variable-value`,onClick:y?this.handleSelect:null},G(a,`variableValue`,{cursor:!1===f?`default`:`pointer`})),this.getValue(n,v)),h&&!g&&_().createElement(`span`,G(a,`comma`),`,`),l?_().createElement(fr,{rowHovered:this.state.hovered,hidden:v,src:n.value,clickCallback:l,theme:a,namespace:[].concat(E(s),[n.name])}):null,!1!==u&&!1===v?this.getEditIcon():null,!1!==d&&!1===v?this.getRemoveIcon():null)}}])}(_().PureComponent);var mr=function(e){function t(){var e;s(this,t);var n=[...arguments];return(e=p(this,t,[].concat(n))).getObjectSize=function(){var t=e.props,n=t.size,r=t.theme;if(t.displayObjectSize)return _().createElement(`span`,Object.assign({className:`object-size`},G(r,`object-size`)),n,` item`,n===1?``:`s`)},e.getAddAttribute=function(t){var n=e.props,r=n.theme,i=n.namespace,a=n.name,s=n.src,c=n.rjvId,l=n.depth;return _().createElement(`span`,{className:`click-to-add`,style:{verticalAlign:`top`,display:t?`inline-block`:`none`}},_().createElement(sr,Object.assign({className:`click-to-add-icon`},G(r,`addVarIcon`),{onClick:function(){var e={name:l>0?a:null,namespace:i.splice(0,i.length-1),existing_value:s,variable_removed:!1,key_name:null};D(s)===`object`?mn.dispatch({name:`ADD_VARIABLE_KEY_REQUEST`,rjvId:c,data:e}):mn.dispatch({name:`VARIABLE_ADDED`,rjvId:c,data:o(o({},e),{},{new_value:[].concat(E(s),[null])})})}})))},e.getRemoveObject=function(t){var n=e.props,r=n.theme,i=n.namespace,a=n.name,o=n.src,s=n.rjvId;if(i.length!==1)return _().createElement(`span`,{className:`click-to-remove`,style:{display:t?`inline-block`:`none`}},_().createElement(or,Object.assign({className:`click-to-remove-icon`},G(r,`removeVarIcon`),{onClick:function(){mn.dispatch({name:`VARIABLE_REMOVED`,rjvId:s,data:{name:a,namespace:i.splice(0,i.length-1),existing_value:o,variable_removed:!0}})}})))},e.render=function(){var t=e.props,n=t.theme,r=t.onDelete,i=t.onAdd,a=t.enableClipboard,o=t.src,s=t.namespace,c=t.rowHovered;return _().createElement(`div`,Object.assign({},G(n,`object-meta-data`),{className:`object-meta-data`,onClick:function(e){e.stopPropagation()}}),e.getObjectSize(),a?_().createElement(fr,{rowHovered:c,clickCallback:a,src:o,theme:n,namespace:s}):null,!1===i?null:e.getAddAttribute(c),!1===r?null:e.getRemoveObject(c))},e}return h(t,e),l(t)}(_().PureComponent);function hr(e){var t=e.parent_type,n=e.namespace,r=e.quotesOnKeys,i=e.theme,a=e.jsvRoot,o=e.name,s=e.displayArrayKey,c=e.onKeyClick,l=e.name?e.name:``,u=typeof c==`function`?c:null;return!a||!1!==o&&o!==null?t===`array`?s?_().createElement(`span`,Object.assign({},G(i,`array-key`),{key:n,onClick:u}),_().createElement(`span`,{className:`array-key`},l),_().createElement(`span`,G(i,`colon`),`:`)):_().createElement(`span`,null):_().createElement(`span`,Object.assign({},G(i,`object-name`),{key:n,onClick:u}),_().createElement(`span`,{className:`object-key`},r&&_().createElement(`span`,{style:{verticalAlign:`top`}},`"`),_().createElement(`span`,null,l),r&&_().createElement(`span`,{style:{verticalAlign:`top`}},`"`)),_().createElement(`span`,G(i,`colon`),`:`)):_().createElement(`span`,null)}function gr(e){var t=e.theme;switch(e.iconStyle){case`triangle`:return _().createElement(ir,Object.assign({},G(t,`expanded-icon`),{className:`expanded-icon`}));case`square`:return _().createElement(tr,Object.assign({},G(t,`expanded-icon`),{className:`expanded-icon`}));default:return _().createElement($n,Object.assign({},G(t,`expanded-icon`),{className:`expanded-icon`}))}}function _r(e){var t=e.theme;switch(e.iconStyle){case`triangle`:return _().createElement(rr,Object.assign({},G(t,`collapsed-icon`),{className:`collapsed-icon`}));case`square`:return _().createElement(nr,Object.assign({},G(t,`collapsed-icon`),{className:`collapsed-icon`}));default:return _().createElement(er,Object.assign({},G(t,`collapsed-icon`),{className:`collapsed-icon`}))}}var vr=[`src`,`groupArraysAfterLength`,`depth`,`name`,`theme`,`jsvRoot`,`namespace`],yr=function(e){function t(e){var n;return s(this,t),(n=p(this,t,[e])).toggleCollapsed=function(e){for(var t=n.state.expanded,r=[],i=Math.max(t.length||0,e+1),a=0;a<i;a++)r[a]=!0===t[a];r[e]=!r[e],n.setState({expanded:r})},n.handleKeySelect=function(){var e=n.props,t=e.name,r=e.namespace,i=e.onSelect,a=e.src;if(typeof i==`function`){var o=E(r);o.shift(),o.length>0&&o.pop(),i({name:t,value:a,type:`array`,namespace:o})}},n.state={expanded:[]},n}return h(t,e),l(t,[{key:`getExpandedIcon`,value:function(e){var t=this.props,n=t.theme,r=t.iconStyle;return this.state.expanded[e]?_().createElement(gr,{theme:n,iconStyle:r}):_().createElement(_r,{theme:n,iconStyle:r})}},{key:`render`,value:function(){var e=this,t=this.props,n=t.src,r=t.groupArraysAfterLength,i=(t.depth,t.name),a=t.theme,o=t.jsvRoot,s=t.namespace,c=C(t,vr),l=0,u=5*this.props.indentWidth;o||(l=5*this.props.indentWidth);var d=r,f=Math.ceil(n.length/d);return _().createElement(`div`,Object.assign({className:`object-key-val`},G(a,o?`jsv-root`:`objectKeyVal`,{paddingLeft:l})),_().createElement(hr,Object.assign({},this.props,{onKeyClick:this.handleKeySelect})),_().createElement(`span`,null,_().createElement(mr,Object.assign({size:n.length},this.props))),E(Array(f)).map(function(t,r){return _().createElement(`div`,Object.assign({key:r,className:`object-key-val array-group`},G(a,`objectKeyVal`,{marginLeft:6,paddingLeft:u})),_().createElement(`span`,G(a,`brace-row`),_().createElement(`div`,Object.assign({className:`icon-container`},G(a,`icon-container`),{onClick:function(t){e.toggleCollapsed(r)}}),e.getExpandedIcon(r)),e.state.expanded[r]?_().createElement(Cr,Object.assign({key:i+r,depth:0,name:!1,collapsed:!1,groupArraysAfterLength:d,index_offset:r*d,src:n.slice(r*d,r*d+d),namespace:s,type:`array`,parent_type:`array_group`,theme:a,showComma:e.props.showComma,isLast:r===f-1},c)):_().createElement(`span`,Object.assign({},G(a,`brace`),{onClick:function(t){e.toggleCollapsed(r)},className:`array-group-brace`}),`[`,_().createElement(`div`,Object.assign({},G(a,`array-group-meta-data`),{className:`array-group-meta-data`}),_().createElement(`span`,Object.assign({className:`object-size`},G(a,`object-size`)),r*d,` - `,r*d+d-1>n.length?n.length-1:r*d+d-1)),`]`)))}))}}])}(_().PureComponent),br=[`depth`,`src`,`namespace`,`name`,`type`,`parent_type`,`theme`,`jsvRoot`,`iconStyle`,`showComma`,`isLast`],xr=function(e){function t(e){var n;s(this,t),(n=p(this,t,[e])).handleToggleCollapsed=function(){n.setState({expanded:!n.state.expanded},function(){_n.set(n.props.rjvId,n.props.namespace,`expanded`,n.state.expanded)})},n.handleKeySelect=function(){var e=n.props,t=e.name,r=e.namespace,i=e.onSelect,a=e.src,o=n.state.object_type;if(typeof i==`function`){var s=E(r);s.shift(),s.length>0&&s.pop(),i({name:t,value:a,type:o,namespace:s})}},n.getObjectContent=function(e,t,r){return _().createElement(`div`,{className:`pushed-content object-container`},_().createElement(`div`,Object.assign({className:`object-content`},G(n.props.theme,`pushed-content`)),n.renderObjectContents(t,r)))},n.getEllipsis=function(){return n.state.size===0?null:_().createElement(`div`,Object.assign({},G(n.props.theme,`ellipsis`),{className:`node-ellipsis`,onClick:n.handleToggleCollapsed}),`...`)},n.getObjectMetaData=function(e){var t=n.state,r=t.size,i=t.hovered;return _().createElement(mr,Object.assign({rowHovered:i,size:r},n.props))},n.renderObjectContents=function(e,t){var r,i=n.props,a=i.depth,o=i.parent_type,s=i.index_offset,c=i.groupArraysAfterLength,l=i.namespace,u=i.showComma,d=n.state.object_type,f=[],p=Object.keys(e||{});return n.props.sortKeys&&d!==`array`&&(p=p.sort()),p.forEach(function(i,m){r=new Sr(i,e[i],t.bigNumber);var h=m===p.length-1;if(o===`array_group`&&s&&(r.name=parseInt(r.name,10)+s),Object.prototype.hasOwnProperty.call(e,i)&&r.type.toLowerCase()!==`window`)if(n.isCircularReference(r))f.push(_().createElement(k,Object.assign({key:r.name,depth:a+1,name:r.name,src:r.value,namespace:l.concat(r.name),type:`array`,parent_type:d,isLast:h,showComma:u,singleIndent:5,indentWidth:n.props.indentWidth},t)));else if(r.type===`object`)f.push(_().createElement(Cr,Object.assign({key:r.name,depth:a+1,name:r.name,src:r.value,namespace:l.concat(r.name),parent_type:d,isLast:h,showComma:u,listOfAncestors:n.listOfAncestors.concat([n.props.src])},t)));else if(r.type===`array`){var g=Cr;c&&r.value.length>c&&(g=yr),f.push(_().createElement(g,Object.assign({key:r.name,depth:a+1,name:r.name,src:r.value,namespace:l.concat(r.name),type:`array`,parent_type:d,isLast:h,showComma:u,listOfAncestors:n.listOfAncestors.concat([n.props.src])},t)))}else f.push(_().createElement(pr,Object.assign({key:r.name+`_`+l,variable:r,singleIndent:5,namespace:l,type:n.props.type,isLast:h,showComma:u},t)))}),f};var r=t.getState(e);return n.state=o(o({},r),{},{prevProps:{}}),n.listOfAncestors=Array.from(n.props.listOfAncestors||[]),n.listOfAncestors.push(e.src),n}return h(t,e),l(t,[{key:`getBraceStart`,value:function(e,t){var n=this.props,r=n.theme,i=n.iconStyle;if(n.parent_type===`array_group`)return _().createElement(`span`,null,_().createElement(`span`,G(r,`brace`),e===`array`?`[`:`{`));var a=t?gr:_r;return _().createElement(`span`,null,_().createElement(`span`,Object.assign({onClick:this.handleToggleCollapsed},G(r,`brace-row`)),_().createElement(`div`,Object.assign({className:`icon-container`},G(r,`icon-container`)),_().createElement(a,{theme:r,iconStyle:i})),_().createElement(hr,Object.assign({},this.props,{onKeyClick:this.handleKeySelect})),_().createElement(`span`,G(r,`brace`),e===`array`?`[`:`{`)))}},{key:`isCircularReference`,value:function(e){return this.listOfAncestors.indexOf(e.value)>-1||e.value===this.props.src}},{key:`render`,value:function(){var e=this,t=this.props,n=t.depth,r=t.src,i=(t.namespace,t.name,t.type,t.parent_type),a=t.theme,s=t.jsvRoot,c=t.iconStyle,l=t.showComma,u=t.isLast,d=C(t,br),f=this.state,p=f.object_type,m=f.expanded,h={};return s||i===`array_group`?i===`array_group`&&(h.borderLeft=0,h.display=`inline`):h.paddingLeft=5*this.props.indentWidth,_().createElement(`div`,Object.assign({className:`object-key-val`,onMouseEnter:function(){return e.setState(o(o({},e.state),{},{hovered:!0}))},onMouseLeave:function(){return e.setState(o(o({},e.state),{},{hovered:!1}))}},G(a,s?`jsv-root`:`objectKeyVal`,h)),this.getBraceStart(p,m),m?this.getObjectContent(n,r,o({theme:a,iconStyle:c},d)):this.getEllipsis(),_().createElement(`span`,{className:`brace-row`},_().createElement(`span`,{style:o(o({},G(a,`brace`).style),{},{paddingLeft:m?`3px`:`0px`})},p===`array`?`]`:`}`)),l&&!u&&!s&&_().createElement(`span`,G(a,`comma`),`,`),this.getObjectMetaData(r))}}],[{key:`getDerivedStateFromProps`,value:function(e,n){var r=n.prevProps;return e.src!==r.src||e.collapsed!==r.collapsed||e.name!==r.name||e.namespace!==r.namespace||e.rjvId!==r.rjvId?o(o({},t.getState(e)),{},{prevProps:e}):null}}])}(_().PureComponent);xr.getState=function(e){var t=Object.keys(e.src).length,n=(!1===e.collapsed||!0!==e.collapsed&&e.collapsed>e.depth)&&(!e.shouldCollapse||!1===e.shouldCollapse({name:e.name,src:e.src,type:D(e.src),namespace:e.namespace}))&&t!==0;return{expanded:_n.get(e.rjvId,e.namespace,`expanded`,n),object_type:e.type===`array`?`array`:`object`,parent_type:e.type===`array`?`array`:`object`,size:t,hovered:!1}};var Sr=l(function e(t,n,r){s(this,e),this.name=t,this.value=n,this.type=D(n,r)});x(xr);let Cr=xr;var wr=function(e){function t(){var e;s(this,t);var n=[...arguments];return(e=p(this,t,[].concat(n))).render=function(){var t,n,r=e.props,i=[r.name],a=Cr;return typeof r.name!=`object`||Array.isArray(r.name)||(i=[r.name?.displayName||r.name?.name||((t=r.name)==null||(n=t.type)==null?void 0:n.name)||`Anonymous`]),Array.isArray(r.src)&&r.groupArraysAfterLength&&r.src.length>r.groupArraysAfterLength&&(a=yr),_().createElement(`div`,{className:`pretty-json-container object-container`},_().createElement(`div`,{className:`object-content`},_().createElement(a,Object.assign({namespace:i,depth:0,jsvRoot:!0},r))))},e}return h(t,e),l(t)}(_().PureComponent),Tr=function(e){function t(e){var n;return s(this,t),(n=p(this,t,[e])).handleCloseModal=function(){mn.dispatch({rjvId:n.props.rjvId,name:`RESET`})},n.handleSubmit=function(){n.props.submit(n.state.input)},n.state={input:e.input?e.input:``},n}return h(t,e),l(t,[{key:`render`,value:function(){var e=this,t=this.props,n=t.theme,r=t.rjvId,i=t.isValid,a=this.state.input,o=i(a);return _().createElement(`div`,Object.assign({className:`key-modal-request`},G(n,`key-modal-request`),{onClick:this.handleCloseModal}),_().createElement(`div`,Object.assign({},G(n,`key-modal`),{onClick:function(e){e.stopPropagation()}}),_().createElement(`div`,G(n,`key-modal-label`),`Key Name:`),_().createElement(`div`,{style:{position:`relative`}},_().createElement(`input`,Object.assign({},G(n,`key-modal-input`),{className:`key-modal-input`,ref:function(e){return e&&e.focus()},spellCheck:!1,value:a,placeholder:`...`,onChange:function(t){e.setState({input:t.target.value})},onKeyPress:function(t){o&&t.key===`Enter`?e.handleSubmit():t.key===`Escape`&&e.handleCloseModal()}})),o?_().createElement(ur,Object.assign({},G(n,`key-modal-submit`),{className:`key-modal-submit`,onClick:this.handleSubmit})):null),_().createElement(`span`,G(n,`key-modal-cancel`),_().createElement(cr,Object.assign({},G(n,`key-modal-cancel-icon`),{className:`key-modal-cancel`,onClick:function(){mn.dispatch({rjvId:r,name:`RESET`})}})))))}}])}(_().PureComponent),Er=function(e){function t(){var e;s(this,t);var n=[...arguments];return(e=p(this,t,[].concat(n))).isValid=function(t){var n=e.props.rjvId,r=_n.get(n,`action`,`new-key-request`);return t!==``&&Object.keys(r.existing_value).indexOf(t)===-1},e.submit=function(t){var n=e.props.rjvId,r=_n.get(n,`action`,`new-key-request`);r.new_value=o({},r.existing_value),r.new_value[t]=e.props.defaultValue,mn.dispatch({name:`VARIABLE_ADDED`,rjvId:n,data:r})},e}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.active,n=e.theme,r=e.rjvId;return t?_().createElement(Tr,{rjvId:r,theme:n,isValid:this.isValid,submit:this.submit}):null}}])}(_().PureComponent),Dr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.message,n=e.active,r=e.theme,i=e.rjvId;return n?_().createElement(`div`,Object.assign({className:`validation-failure`},G(r,`validation-failure`),{onClick:function(){mn.dispatch({rjvId:i,name:`RESET`})}}),_().createElement(`span`,G(r,`validation-failure-label`),t),_().createElement(cr,G(r,`validation-failure-clear`))):null}}])}(_().PureComponent),Or=function(e){function t(e){var n;return s(this,t),(n=p(this,t,[e])).rjvId=Date.now().toString()+Math.random().toString(36).slice(2),n.getListeners=function(){return{reset:n.resetState,"variable-update":n.updateSrc,"add-key-request":n.addKeyRequest}},n.updateSrc=function(){var e,t=_n.get(n.rjvId,`action`,`variable-update`),r=t.name,i=t.namespace,a=t.new_value,o=t.existing_value,s=t.updated_src,c=t.type,l=n.props,u=l.onEdit,d=l.onDelete,f=l.onAdd,p={existing_src:n.state.src,new_value:a,updated_src:s,name:r,namespace:i,existing_value:o};switch(c){case`variable-added`:e=f(p);break;case`variable-edited`:e=u(p);break;case`variable-removed`:e=d(p)}!1===e?n.setState({validationFailure:!0}):(_n.set(n.rjvId,`global`,`src`,s),n.setState({src:s}))},n.addKeyRequest=function(){n.setState({addKeyRequest:!0})},n.resetState=function(){n.setState({validationFailure:!1,addKeyRequest:!1})},n.state={addKeyRequest:!1,editKeyRequest:!1,validationFailure:!1,src:t.defaultProps.src,name:t.defaultProps.name,theme:t.defaultProps.theme,validationMessage:t.defaultProps.validationMessage,prevSrc:t.defaultProps.src,prevName:t.defaultProps.name,prevTheme:t.defaultProps.theme},n}return h(t,e),l(t,[{key:`componentDidMount`,value:function(){_n.set(this.rjvId,`global`,`src`,this.state.src);var e=this.getListeners();for(var t in e)_n.on(t+`-`+this.rjvId,e[t]);this.setState({addKeyRequest:!1,editKeyRequest:!1})}},{key:`componentDidUpdate`,value:function(e,t){!1!==t.addKeyRequest&&this.setState({addKeyRequest:!1}),!1!==t.editKeyRequest&&this.setState({editKeyRequest:!1}),e.src!==this.state.src&&_n.set(this.rjvId,`global`,`src`,this.state.src)}},{key:`componentWillUnmount`,value:function(){var e=this.getListeners();for(var t in e)_n.removeListener(t+`-`+this.rjvId,e[t])}},{key:`render`,value:function(){var e=this.state,t=e.validationFailure,n=e.validationMessage,r=e.addKeyRequest,i=e.theme,a=e.src,s=e.name,c=this.props,l=c.style,u=c.defaultValue;return _().createElement(`div`,{className:`react-json-view`,style:o(o({},G(i,`app-container`).style),l)},_().createElement(Dr,{message:n,active:t,theme:i,rjvId:this.rjvId}),_().createElement(wr,Object.assign({},this.props,{src:a,name:s,theme:i,type:D(a),rjvId:this.rjvId})),_().createElement(Er,{active:r,theme:i,rjvId:this.rjvId,defaultValue:u}))}}],[{key:`getDerivedStateFromProps`,value:function(e,n){if(e.src!==n.prevSrc||e.name!==n.prevName||e.theme!==n.prevTheme){var r={src:e.src,name:e.name,theme:e.theme,validationMessage:e.validationMessage,prevSrc:e.src,prevName:e.name,prevTheme:e.theme};return t.validateState(r)}return null}}])}(_().PureComponent);Or.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(e){return e.metaKey||e.ctrlKey},bigNumber:null,showComma:!0},Or.validateState=function(e){var t={};return D(e.theme)!==`object`||function(e){var t=[`base00`,`base01`,`base02`,`base03`,`base04`,`base05`,`base06`,`base07`,`base08`,`base09`,`base0A`,`base0B`,`base0C`,`base0D`,`base0E`,`base0F`];if(D(e)===`object`){for(var n=0;n<t.length;n++)if(!(t[n]in e))return!1;return!0}return!1}(e.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`),t.theme=`rjv-default`),D(e.src)!==`object`&&D(e.src)!==`array`&&(console.error(`react-json-view error:`,`src property must be a valid json object`),t.name=`ERROR`,t.src={message:`src property must be a valid json object`}),o(o({},e),t)},x(Or);let kr=Or})(),i})())}))(),1),xY=bY.default.default||bY.default,SY=b.createContext(void 0);function CY(e){let t=b.useContext(SY);if(e===!1&&t===void 0)throw Error(BU(27));return t}var wY=function(e){return e.open=`data-open`,e.closed=`data-closed`,e[e.startingStyle=eJ.startingStyle]=`startingStyle`,e[e.endingStyle=eJ.endingStyle]=`endingStyle`,e.anchorHidden=`data-anchor-hidden`,e.side=`data-side`,e.align=`data-align`,e}({}),TY=function(e){return e.popupOpen=`data-popup-open`,e.pressed=`data-pressed`,e}({}),EY={[TY.popupOpen]:``},DY={[TY.popupOpen]:``,[TY.pressed]:``},OY={[wY.open]:``},kY={[wY.closed]:``},AY={[wY.anchorHidden]:``},jY={open(e){return e?EY:null}},MY={open(e){return e?DY:null}},NY={open(e){return e?OY:kY},anchorHidden(e){return e?AY:null}},PY={...NY,...rJ},FY=b.forwardRef(function(e,t){let{render:n,className:r,forceRender:i=!1,...a}=e,{store:o}=CY(),s=o.useState(`open`),c=o.useState(`nested`),l=o.useState(`mounted`);return bW(`div`,e,{state:{open:s,transitionStatus:o.useState(`transitionStatus`)},ref:[o.context.backdropRef,t],stateAttributesMapping:PY,props:[{role:`presentation`,hidden:!l,style:{userSelect:`none`,WebkitUserSelect:`none`}},a],enabled:i||!c})}),IY=b.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,...o}=e,{store:s}=CY(),c=s.useState(`open`);function l(e){c&&s.setOpen(!1,BG(NG,e.nativeEvent))}let{getButtonProps:u,buttonRef:d}=yG({disabled:i,native:a});return bW(`button`,e,{state:{disabled:i},ref:[t,d],props:[{onClick:l},o,u]})}),LY=0,RY=class e{static create(){return new e}currentId=LY;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=LY,t()},e)}isStarted(){return this.currentId!==LY}clear=()=>{this.currentId!==LY&&(clearTimeout(this.currentId),this.currentId=LY)};disposeEffect=()=>this.clear};function zY(){let e=NU(RY.create).current;return Yq(e.disposeEffect),e}function BY(e,t){return t!=null&&!bK(t)?0:typeof e==`function`?e():e}function VY(e,t,n){let r=BY(e,n);return typeof r==`number`?r:r?.[t]}function HY(e){return typeof e==`function`?e():e}function UY(e,t){return t||e===`click`||e===`mousedown`}function WY(e){let t=NU(GY,e).current;return t.next=e,$(t.effect),t}function GY(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var KY={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},qY={...KY,position:`fixed`,top:0,left:0},JY={...KY,position:`absolute`},YY=b.forwardRef(function(e,t){let[n,r]=b.useState();$(()=>{qG&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,W.jsx)(`span`,{...e,ref:t,style:qY,"aria-hidden":n?void 0:!0,...i,"data-base-ui-focus-guard":``})});function XY(e){return`data-base-ui-${e}`}var ZY=0;function QY(e,t={}){let{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(ZY);let a=()=>e?.focus({preventScroll:n});i?a():ZY=requestAnimationFrame(a)}var $Y={inert:new WeakMap,"aria-hidden":new WeakMap},eX=`data-base-ui-inert`,tX={inert:new WeakSet,"aria-hidden":new WeakSet},nX=new WeakMap,rX=0;function iX(e){return tX[e]}function aX(e){return e?GW(e)?e.host:aX(e.parentNode):null}var oX=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=aX(t);return e.contains(n)?n:null}).filter(e=>e!=null),sX=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},cX=(e,t,n)=>{let r=[],i=e=>{!e||n.has(e)||Array.from(e.children).forEach(e=>{zW(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function lX(e,t,n,r,{mark:i=!0,markerIgnoreElements:a=[]}){let o=r?`inert`:n?`aria-hidden`:null,s=null,c=null,l=oX(t,e),u=i?oX(t,a):[],d=new Set(u),f=i?cX(t,sX(l),new Set(l)).filter(e=>!d.has(e)):[],p=[],m=[];if(o){let e=$Y[o],n=iX(o);c=n,s=e;let r=oX(t,Array.from(t.querySelectorAll(`[aria-live]`))),i=l.concat(r);cX(t,sX(i),new Set(i)).forEach(t=>{let r=t.getAttribute(o),i=r!==null&&r!==`false`,a=(e.get(t)||0)+1;e.set(t,a),p.push(t),a===1&&i&&n.add(t),i||t.setAttribute(o,o===`inert`?``:`true`)})}return i&&f.forEach(e=>{let t=(nX.get(e)||0)+1;nX.set(e,t),m.push(e),t===1&&e.setAttribute(eX,``)}),rX+=1,()=>{s&&p.forEach(e=>{let t=(s.get(e)||0)-1;s.set(e,t),t||(!c?.has(e)&&o&&e.removeAttribute(o),c?.delete(e))}),i&&m.forEach(e=>{let t=(nX.get(e)||0)-1;nX.set(e,t),t||e.removeAttribute(eX)}),--rX,rX||($Y.inert=new WeakMap,$Y[`aria-hidden`]=new WeakMap,tX.inert=new WeakSet,tX[`aria-hidden`]=new WeakSet,nX=new WeakMap)}}function uX(e,t={}){let{ariaHidden:n=!1,inert:r=!1,mark:i=!0,markerIgnoreElements:a=[]}=t,o=lG(e[0]).body;return lX(e,o,n,r,{mark:i,markerIgnoreElements:a})}var dX=b.createContext(null),fX=()=>b.useContext(dX),pX=XY(`portal`);function mX(e={}){let{ref:t,container:n,componentProps:r=mW,elementProps:i}=e,a=mG(),o=fX()?.portalNode,[s,c]=b.useState(null),[l,u]=b.useState(null),d=IU(e=>{e!==null&&u(e)}),f=b.useRef(null);$(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}if(a==null)return;let e=(n&&(HW(n)?n:n.current))??o??document.body;if(e==null){f.current&&(f.current=null,u(null),c(null));return}f.current!==e&&(f.current=e,u(null),c(e))},[n,o,a]);let p=bW(`div`,r,{ref:[t,d],props:[{id:a,[pX]:``},i]});return{portalNode:l,portalSubtree:s&&p?PI.createPortal(p,s):null}}var hX=b.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,renderGuards:o,...s}=e,{portalNode:c,portalSubtree:l}=mX({container:r,ref:t,componentProps:e,elementProps:s}),u=b.useRef(null),d=b.useRef(null),f=b.useRef(null),p=b.useRef(null),[m,h]=b.useState(null),g=m?.modal,_=m?.open,v=typeof o==`boolean`?o:!!m&&!m.modal&&m.open&&!!c;b.useEffect(()=>{if(!c||g)return;function e(e){c&&e.relatedTarget&&Wq(e)&&(e.type===`focusin`?Kq:Gq)(c)}return c.addEventListener(`focusin`,e,!0),c.addEventListener(`focusout`,e,!0),()=>{c.removeEventListener(`focusin`,e,!0),c.removeEventListener(`focusout`,e,!0)}},[c,g]),b.useEffect(()=>{!c||_||Kq(c)},[_,c]);let y=b.useMemo(()=>({beforeOutsideRef:u,afterOutsideRef:d,beforeInsideRef:f,afterInsideRef:p,portalNode:c,setFocusManagerState:h}),[c]);return(0,W.jsxs)(b.Fragment,{children:[l,(0,W.jsxs)(dX.Provider,{value:y,children:[v&&c&&(0,W.jsx)(YY,{"data-type":`outside`,ref:u,onFocus:e=>{Wq(e,c)?f.current?.focus():Bq(m?m.domReference:null)?.focus()}}),v&&c&&(0,W.jsx)(`span`,{"aria-owns":c.id,style:yW}),c&&PI.createPortal(n,c),v&&c&&(0,W.jsx)(YY,{"data-type":`outside`,ref:d,onFocus:e=>{Wq(e,c)?p.current?.focus():(zq(m?m.domReference:null)?.focus(),m?.closeOnFocusOut&&m?.onOpenChange(!1,BG(`focus-out`,e.nativeEvent)))}})]})]})});function gX(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(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)}}}var _X=class{nodesRef={current:[]};events=gX();addNode(e){this.nodesRef.current.push(e)}removeNode(e){let t=this.nodesRef.current.findIndex(t=>t===e);t!==-1&&this.nodesRef.current.splice(t,1)}},vX=b.createContext(null),yX=b.createContext(null),bX=()=>b.useContext(vX)?.id||null,xX=e=>{let t=b.useContext(yX);return e??t};function SX(e){let t=mG(),n=xX(e),r=bX();return $(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function CX(e){let{children:t,id:n}=e,r=bX();return(0,W.jsx)(vX.Provider,{value:b.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function wX(e){let{children:t,externalTree:n}=e,r=NU(()=>n??new _X).current;return(0,W.jsx)(yX.Provider,{value:r,children:t})}function TX(e,t){let n=BW(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`):``}var EX=20,DX=[];function OX(){DX=DX.filter(e=>e.deref()?.isConnected)}function kX(e){OX(),e&&zW(e)!==`body`&&(DX.push(new WeakRef(e)),DX.length>EX&&(DX=DX.slice(-EX)))}function AX(){return OX(),DX[DX.length-1]?.deref()}function jX(e){if(!e)return null;let t=Lq();return Iq(e,t)?e:Pq(e,t)[0]||e}function MX(e){return!e||!e.isConnected?!1:typeof e.checkVisibility==`function`?e.checkVisibility():oq(e)}function NX(e,t){if(!t.current.includes(`floating`)&&!e.getAttribute(`role`)?.includes(`dialog`))return;let n=Lq(),r=Fq(e,n).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return Iq(e,n)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),i=e.getAttribute(`tabindex`);t.current.includes(`floating`)||r.length===0?i!==`0`&&e.setAttribute(`tabindex`,`0`):(i!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function PX(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,restoreFocus:o=!1,modal:s=!0,closeOnFocusOut:c=!0,openInteractionType:l=``,nextFocusableElement:u,previousFocusableElement:d,beforeContentFocusGuardRef:f,externalTree:p,getInsideElements:m}=e,h=`rootStore`in t?t.rootStore:t,g=h.useState(`open`),_=h.useState(`domReferenceElement`),v=h.useState(`floatingElement`),{events:y,dataRef:x}=h.context,S=IU(()=>x.current.floatingContext?.nodeId),C=i===!1,w=fK(_)&&C,T=b.useRef([`content`]),E=WY(i),D=WY(a),O=WY(l),k=xX(p),A=fX(),j=b.useRef(!1),M=b.useRef(!1),N=b.useRef(!1),P=b.useRef(-1),F=b.useRef(``),I=b.useRef(``),L=b.useRef(null),R=b.useRef(null),z=VU(L,f,A?.beforeInsideRef),B=VU(R,A?.afterInsideRef),V=zY(),ee=zY(),H=sJ(),te=A!=null,U=pK(v),ne=IU((e=U)=>e?Pq(e,Lq()):[]),re=IU(()=>m?.().filter(e=>e!=null)??[]),ie=IU(e=>{let t=ne(e);return T.current.map(()=>t).filter(Boolean).flat()});b.useEffect(()=>{if(r||!s)return;function e(e){e.key===`Tab`&&oK(U,aK(lG(U)))&&ne().length===0&&!w&&gK(e)}let t=lG(U);return t.addEventListener(`keydown`,e),()=>{t.removeEventListener(`keydown`,e)}},[r,_,U,s,T,w,ne,ie]),b.useEffect(()=>{if(r||!g)return;let e=lG(U);function t(){N.current=!1}function n(e){let t=cK(e),n=re();N.current=!(oK(v,t)||oK(_,t)||oK(A?.portalNode,t)||n.some(e=>e===t||oK(e,t))),I.current=e.pointerType||`keyboard`,t?.closest(`[data-base-ui-click-trigger]`)&&(M.current=!0)}function i(){I.current=`keyboard`}return e.addEventListener(`pointerdown`,n,!0),e.addEventListener(`pointerup`,t,!0),e.addEventListener(`pointercancel`,t,!0),e.addEventListener(`keydown`,i,!0),()=>{e.removeEventListener(`pointerdown`,n,!0),e.removeEventListener(`pointerup`,t,!0),e.removeEventListener(`pointercancel`,t,!0),e.removeEventListener(`keydown`,i,!0)}},[r,v,_,U,g,A,re]),b.useEffect(()=>{if(r||!c)return;let e=lG(U);function t(){M.current=!0,ee.start(0,()=>{M.current=!1})}function n(e){let t=cK(e),n=ne().indexOf(t);n!==-1&&(P.current=n)}function i(t){let n=t.relatedTarget,r=t.currentTarget,i=cK(t);queueMicrotask(()=>{let a=S(),c=h.context.triggerElements,l=re(),f=n?.hasAttribute(XY(`focus-guard`))&&[L.current,R.current,A?.beforeInsideRef.current,A?.afterInsideRef.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,cJ(d),cJ(u)].includes(n),p=!(oK(_,n)||oK(v,n)||oK(n,v)||oK(A?.portalNode,n)||l.some(e=>e===n||oK(e,n))||n!=null&&c.hasElement(n)||c.hasMatchingElement(e=>oK(e,n))||f||k&&(mK(k.nodesRef.current,a).find(e=>oK(e.context?.elements.floating,n)||oK(e.context?.elements.domReference,n))||hK(k.nodesRef.current,a).find(e=>[e.context?.elements.floating,pK(e.context?.elements.floating)].includes(n)||e.context?.elements.domReference===n)));if(r===_&&U&&NX(U,T),o&&r!==_&&!MX(i)&&aK(e)===e.body){if(WW(U)&&(U.focus(),o===`popup`)){H.request(()=>{U.focus()});return}let e=P.current,t=ne(),n=t[e]||t[t.length-1]||U;WW(n)&&n.focus()}if(x.current.insideReactTree){x.current.insideReactTree=!1;return}(w||!s)&&n&&p&&!M.current&&(w||n!==AX())&&(j.current=!0,h.setOpen(!1,BG(PG,t)))})}function a(){N.current||(x.current.insideReactTree=!0,V.start(0,()=>{x.current.insideReactTree=!1}))}let l=WW(_)?_:null,f=[];if(!(!v&&!l))return l&&(l.addEventListener(`focusout`,i),l.addEventListener(`pointerdown`,t),f.push(()=>{l.removeEventListener(`focusout`,i),l.removeEventListener(`pointerdown`,t)})),v&&(v.addEventListener(`focusin`,n),v.addEventListener(`focusout`,i),A&&(v.addEventListener(`focusout`,a,!0),f.push(()=>{v.removeEventListener(`focusout`,a,!0)})),f.push(()=>{v.removeEventListener(`focusin`,n),v.removeEventListener(`focusout`,i)})),()=>{f.forEach(e=>{e()})}},[r,_,v,U,s,k,A,h,c,o,ne,w,S,T,x,V,ee,H,u,d,re]),b.useEffect(()=>{if(r||!v||!g)return;let e=Array.from(A?.portalNode?.querySelectorAll(`[${XY(`portal`)}]`)||[]),t=(k?hK(k.nodesRef.current,S()):[]).find(e=>fK(e.context?.elements.domReference||null))?.context?.elements.domReference,n=uX([...[v,...e,L.current,R.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,...re()],t,cJ(d),cJ(u),w?_:null].filter(e=>e!=null),{ariaHidden:s||w,mark:!1}),i=uX([v,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,_,v,s,T,A,w,k,S,u,d,re]),$(()=>{if(!g||r||!WW(U))return;let e=aK(lG(U));queueMicrotask(()=>{let t=ie(U),n=E.current,r=typeof n==`function`?n(O.current||``):n;if(r===void 0||r===!1)return;let i;i=r===!0||r===null?t[0]||U:cJ(r),i=i||t[0]||U,!oK(U,e)&&QY(i,{preventScroll:i===U})})},[r,g,U,C,ie,E,O]),$(()=>{if(r||!U)return;let e=lG(U);kX(aK(e));function t(e){if(e.open||(F.current=TX(e.nativeEvent,I.current)),e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`&&(j.current=!0),e.reason===`outside-press`)if(e.nested)j.current=!1;else if(vK(e.nativeEvent)||yK(e.nativeEvent))j.current=!1;else{let e=!1;document.createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?j.current=!1:j.current=!0}}y.on(`openchange`,t);function n(){let e=D.current,t=typeof e==`function`?e(F.current):e;if(t===void 0||t===!1)return null;if(t===null&&(t=!0),typeof t==`boolean`){let e=_||AX();return e&&e.isConnected?e:null}let n=_||AX();return cJ(t)||n||null}return()=>{y.off(`openchange`,t);let r=aK(e),i=re(),a=oK(v,r)||i.some(e=>e===r||oK(e,r))||k&&mK(k.nodesRef.current,S(),!1).some(e=>oK(e.context?.elements.floating,r)),o=n();queueMicrotask(()=>{let t=jX(o),n=typeof D.current!=`boolean`;D.current&&!j.current&&WW(t)&&(!(!n&&t!==r&&r!==e.body)||a)&&t.focus({preventScroll:!0}),j.current=!1})}},[r,v,U,D,x,y,k,_,S,re]),$(()=>{if(!GG||g||!v)return;let e=aK(lG(v));!WW(e)||!dK(e)||oK(v,e)&&e.blur()},[g,v]),$(()=>{if(!(r||!A))return A.setFocusManagerState({modal:s,closeOnFocusOut:c,open:g,onOpenChange:h.setOpen,domReference:_}),()=>{A.setFocusManagerState(null)}},[r,A,s,g,h,c,_]),$(()=>{if(!(r||!U))return NX(U,T),()=>{queueMicrotask(OX)}},[r,U,T]);let ae=!r&&(s?!w:!0)&&(te||s);return(0,W.jsxs)(b.Fragment,{children:[ae&&(0,W.jsx)(YY,{"data-type":`inside`,ref:z,onFocus:e=>{if(s){let e=ie();QY(e[e.length-1])}else A?.portalNode&&(j.current=!1,Wq(e,A.portalNode)?zq(_)?.focus():cJ(d??A.beforeOutsideRef)?.focus())}}),n,ae&&(0,W.jsx)(YY,{"data-type":`inside`,ref:B,onFocus:e=>{s?QY(ie()[0]):A?.portalNode&&(c&&(j.current=!0),Wq(e,A.portalNode)?Bq(_)?.focus():cJ(u??A.afterOutsideRef)?.focus())}})]})}function FX(e,t={}){let n=`rootStore`in e?e.rootStore:e,r=n.context.dataRef,{enabled:i=!0,event:a=`click`,toggle:o=!0,ignoreMouse:s=!1,stickIfOpen:c=!0,touchOpenDelay:l=0,reason:u=kG}=t,d=b.useRef(void 0),f=sJ(),p=zY(),m=b.useMemo(()=>({onPointerDown(e){d.current=e.pointerType},onMouseDown(e){let t=d.current,i=e.nativeEvent,m=n.select(`open`);if(e.button!==0||a===`click`||bK(t,!0)&&s)return;let h=r.current.openEvent,g=h?.type,_=n.select(`domReferenceElement`)!==e.currentTarget,v=m&&_||!(m&&o&&(!(h&&c)||g===`click`||g===`mousedown`));if(dK(i.target)){let e=BG(u,i,i.target);v&&t===`touch`&&l>0?p.start(l,()=>{n.setOpen(!0,e)}):n.setOpen(v,e);return}let y=e.currentTarget;f.request(()=>{let e=BG(u,i,y);v&&t===`touch`&&l>0?p.start(l,()=>{n.setOpen(!0,e)}):n.setOpen(v,e)})},onClick(e){if(a===`mousedown-only`)return;let t=d.current;if(a===`mousedown`&&t){d.current=void 0;return}if(bK(t,!0)&&s)return;let i=n.select(`open`),f=r.current.openEvent,m=n.select(`domReferenceElement`)!==e.currentTarget,h=i&&m||!(i&&o&&(!(f&&c)||xK(f))),g=BG(u,e.nativeEvent,e.currentTarget);h&&t===`touch`&&l>0?p.start(l,()=>{n.setOpen(!0,g)}):n.setOpen(h,g)},onKeyDown(){d.current=void 0}}),[r,a,s,n,c,o,f,p,l,u]);return b.useMemo(()=>i?{reference:m}:mW,[i,m])}var IX={intentional:`onClick`,sloppy:`onPointerDown`};function LX(){return!1}function RX(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function zX(e,t={}){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingElement`),{dataRef:a}=n.context,{enabled:o=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:l=`sloppy`,referencePress:u=LX,referencePressEvent:d=`sloppy`,bubbles:f,externalTree:p}=t,m=xX(p),h=IU(typeof c==`function`?c:()=>!1),g=typeof c==`function`?h:c,_=g!==!1,v=IU(()=>l),y=b.useRef(!1),x=b.useRef(!1),S=b.useRef(!1),{escapeKey:C,outsidePress:w}=RX(f),T=b.useRef(null),E=zY(),D=zY(),O=IU(()=>{D.clear(),a.current.insideReactTree=!1}),k=b.useRef(!1),A=b.useRef(``),j=IU(u),M=IU(e=>{if(!r||!o||!s||e.key!==`Escape`||k.current)return;let t=a.current.floatingContext?.nodeId,i=m?mK(m.nodesRef.current,t):[];if(!C&&i.length>0){let e=!0;if(i.forEach(t=>{t.context?.open&&!t.context.dataRef.current.__escapeKeyBubbles&&(e=!1)}),!e)return}let c=BG(FG,_K(e)?e.nativeEvent:e);n.setOpen(!1,c),!C&&!c.isPropagationAllowed&&e.stopPropagation()}),N=IU(()=>{a.current.insideReactTree=!0,D.start(0,O)});b.useEffect(()=>{if(!r||!o)return;a.current.__escapeKeyBubbles=C,a.current.__outsidePressBubbles=w;let e=new RY,t=new RY;function c(){e.clear(),k.current=!0}function l(){e.start(tG()?5:0,()=>{k.current=!1})}function u(){S.current=!0,t.start(0,()=>{S.current=!1})}function d(){y.current=!1,x.current=!1}function f(){let e=A.current,t=e===`pen`||!e?`mouse`:e,n=v(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function p(e){let t=f();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function h(e){let t=a.current.floatingContext?.nodeId,r=m&&mK(m.nodesRef.current,t).some(t=>lK(e,t.context?.elements.floating));return lK(e,n.select(`floatingElement`))||lK(e,n.select(`domReferenceElement`))||r}function b(e){if(p(e)){O();return}if(a.current.insideReactTree){O();return}let r=cK(e),i=`[${XY(`inert`)}]`,o=Array.from(lG(n.select(`floatingElement`)).querySelectorAll(i)),s=UW(r)?r.getRootNode():null;GW(s)&&(o=o.concat(Array.from(s.querySelectorAll(i))));let c=n.context.triggerElements;if(r&&(c.hasElement(r)||c.hasMatchingElement(e=>oK(e,r))))return;let l=UW(r)?r:null;for(;l&&!nG(l);){let e=aG(l);if(nG(e)||!UW(e))break;l=e}if(o.length&&UW(r)&&!uK(r)&&!oK(r,n.select(`floatingElement`))&&o.every(e=>!oK(l,e)))return;if(WW(r)&&!(`touches`in e)){let t=nG(r),n=rG(r),i=/auto|scroll/,a=t||i.test(n.overflowX),o=t||i.test(n.overflowY),s=a&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,c=o&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,l=n.direction===`rtl`,u=c&&(l?e.offsetX<=r.offsetWidth-r.clientWidth:e.offsetX>r.clientWidth),d=s&&e.offsetY>r.clientHeight;if(u||d)return}if(h(e))return;if(f()===`intentional`&&S.current){t.clear(),S.current=!1;return}if(typeof g==`function`&&!g(e))return;let u=a.current.floatingContext?.nodeId,d=m?mK(m.nodesRef.current,u):[];if(d.length>0){let e=!0;if(d.forEach(t=>{t.context?.open&&!t.context.dataRef.current.__outsidePressBubbles&&(e=!1)}),!e)return}n.setOpen(!1,BG(jG,e)),O()}function D(e){f()!==`sloppy`||e.pointerType===`touch`||!n.select(`open`)||!o||lK(e,n.select(`floatingElement`))||lK(e,n.select(`domReferenceElement`))||b(e)}function j(e){if(f()!==`sloppy`||!n.select(`open`)||!o||lK(e,n.select(`floatingElement`))||lK(e,n.select(`domReferenceElement`)))return;let t=e.touches[0];t&&(T.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},E.start(1e3,()=>{T.current&&(T.current.dismissOnTouchEnd=!1,T.current.dismissOnMouseDown=!1)}))}function N(e){A.current=`touch`;let t=cK(e);function n(){j(e),t?.removeEventListener(e.type,n)}t?.addEventListener(e.type,n)}function P(e){if(E.clear(),e.type===`pointerdown`&&(A.current=e.pointerType),e.type===`mousedown`&&T.current&&!T.current.dismissOnMouseDown)return;let t=cK(e);function n(){e.type===`pointerdown`?D(e):b(e),t?.removeEventListener(e.type,n)}t?.addEventListener(e.type,n)}function F(e){if(!y.current)return;let n=x.current;if(d(),f()===`intentional`){if(e.type===`pointercancel`){n&&u();return}if(!h(e)){if(n){u();return}typeof g==`function`&&!g(e)||(t.clear(),S.current=!0,O())}}}function I(e){if(f()!==`sloppy`||!T.current||lK(e,n.select(`floatingElement`))||lK(e,n.select(`domReferenceElement`)))return;let t=e.touches[0];if(!t)return;let r=Math.abs(t.clientX-T.current.startX),i=Math.abs(t.clientY-T.current.startY),a=Math.sqrt(r*r+i*i);a>5&&(T.current.dismissOnTouchEnd=!0),a>10&&(b(e),E.clear(),T.current=null)}function L(e){let t=cK(e);function n(){I(e),t?.removeEventListener(e.type,n)}t?.addEventListener(e.type,n)}function R(e){f()!==`sloppy`||!T.current||lK(e,n.select(`floatingElement`))||lK(e,n.select(`domReferenceElement`))||(T.current.dismissOnTouchEnd&&b(e),E.clear(),T.current=null)}function z(e){let t=cK(e);function n(){R(e),t?.removeEventListener(e.type,n)}t?.addEventListener(e.type,n)}let B=lG(i);return s&&(B.addEventListener(`keydown`,M),B.addEventListener(`compositionstart`,c),B.addEventListener(`compositionend`,l)),_&&(B.addEventListener(`click`,P,!0),B.addEventListener(`pointerdown`,P,!0),B.addEventListener(`pointerup`,F,!0),B.addEventListener(`pointercancel`,F,!0),B.addEventListener(`mousedown`,P,!0),B.addEventListener(`mouseup`,F,!0),B.addEventListener(`touchstart`,N,!0),B.addEventListener(`touchmove`,L,!0),B.addEventListener(`touchend`,z,!0)),()=>{s&&(B.removeEventListener(`keydown`,M),B.removeEventListener(`compositionstart`,c),B.removeEventListener(`compositionend`,l)),_&&(B.removeEventListener(`click`,P,!0),B.removeEventListener(`pointerdown`,P,!0),B.removeEventListener(`pointerup`,F,!0),B.removeEventListener(`pointercancel`,F,!0),B.removeEventListener(`mousedown`,P,!0),B.removeEventListener(`mouseup`,F,!0),B.removeEventListener(`touchstart`,N,!0),B.removeEventListener(`touchmove`,L,!0),B.removeEventListener(`touchend`,z,!0)),e.clear(),t.clear(),d(),S.current=!1}},[a,i,s,_,g,r,o,C,w,M,O,v,m,n,E]),b.useEffect(O,[g,O]);let P=b.useMemo(()=>({onKeyDown:M,[IX[d]]:e=>{j()&&n.setOpen(!1,BG(kG,e.nativeEvent))},...d!==`intentional`&&{onClick(e){j()&&n.setOpen(!1,BG(`trigger-press`,e.nativeEvent))}}}),[M,n,d,j]),F=IU(e=>{if(!r||!o||e.button!==0)return;let t=cK(e.nativeEvent);oK(n.select(`floatingElement`),t)&&(y.current||(y.current=!0,x.current=!1))}),I=IU(e=>{!r||!o||(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&y.current&&(x.current=!0)}),L=b.useMemo(()=>({onKeyDown:M,onPointerDown:I,onMouseDown:I,onClickCapture:N,onMouseDownCapture(e){N(),F(e)},onPointerDownCapture(e){N(),F(e)},onMouseUpCapture:N,onTouchEndCapture:N,onTouchMoveCapture:N}),[M,N,F,I]);return b.useMemo(()=>o?{reference:P,floating:L,trigger:P}:{},[o,P,L])}function BX(e,t,n){let{reference:r,floating:i}=e,a=FK(t),o=IK(t),s=PK(o),c=jK(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(MK(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function VX(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=AK(t,e),p=JK(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=YK(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=YK(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var HX=50,UX=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:VX},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=BX(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<HX&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=BX(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},WX=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=AK(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=jK(r),_=FK(o),v=jK(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[KK(o)]:RK(o)),x=p!==`none`;!d&&x&&b.push(...GK(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=LK(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==FK(t))||T.every(e=>FK(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=FK(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function GX(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function KX(e){return SK.some(t=>e[t]>=0)}var qX=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=AK(e,t);switch(i){case`referenceHidden`:{let e=GX(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:KX(e)}}}case`escaped`:{let e=GX(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:KX(e)}}}default:return{}}}}},JX=new Set([`left`,`top`]);async function YX(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=jK(n),s=MK(n),c=FK(n)===`y`,l=JX.has(o)?-1:1,u=a&&c?-1:1,d=AK(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var XX=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await YX(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},ZX=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=AK(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=FK(jK(i)),p=NK(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=kK(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=kK(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},QX=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=AK(e,t),u={x:n,y:r},d=FK(i),f=NK(d),p=u[f],m=u[d],h=AK(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=JX.has(jK(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},$X=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=AK(e,t),u=await o.detectOverflow(t,l),d=jK(i),f=MK(i),p=FK(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=CK(h-u[g],v),x=CK(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=wK(u.left,0),t=wK(u.right,0),n=wK(u.top,0),r=wK(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:wK(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:wK(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function eZ(e){let t=rG(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=WW(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=TK(n)!==a||TK(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function tZ(e){return UW(e)?e:e.contextElement}function nZ(e){let t=tZ(e);if(!WW(t))return DK(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=eZ(t),o=(a?TK(n.width):n.width)/r,s=(a?TK(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var rZ=DK(0);function iZ(e){let t=BW(e);return!tG()||!t.visualViewport?rZ:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function aZ(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==BW(e)?!1:t}function oZ(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=tZ(e),o=DK(1);t&&(r?UW(r)&&(o=nZ(r)):o=nZ(e));let s=aZ(a,n,r)?iZ(a):DK(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=BW(a),t=r&&UW(r)?BW(r):r,n=e,i=cG(n);for(;i&&r&&t!==n;){let e=nZ(i),t=i.getBoundingClientRect(),r=rG(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=BW(i),i=cG(n)}}return YK({width:u,height:d,x:c,y:l})}function sZ(e,t){let n=iG(e).scrollLeft;return t?t.left+n:oZ(VW(e)).left+n}function cZ(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-sZ(e,n),y:n.top+t.scrollTop}}function lZ(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=VW(r),s=t?JW(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=DK(1),u=DK(0),d=WW(r);if((d||!d&&!a)&&((zW(r)!==`body`||KW(o))&&(c=iG(r)),d)){let e=oZ(r);l=nZ(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?cZ(o,c):DK(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function uZ(e){return Array.from(e.getClientRects())}function dZ(e){let t=VW(e),n=iG(e),r=e.ownerDocument.body,i=wK(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=wK(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+sZ(e),s=-n.scrollTop;return rG(r).direction===`rtl`&&(o+=wK(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var fZ=25;function pZ(e,t){let n=BW(e),r=VW(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=tG();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=sZ(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=fZ&&(a-=o)}else l<=fZ&&(a+=l);return{width:a,height:o,x:s,y:c}}function mZ(e,t){let n=oZ(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=WW(e)?nZ(e):DK(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function hZ(e,t,n){let r;if(t===`viewport`)r=pZ(e,n);else if(t===`document`)r=dZ(VW(e));else if(UW(t))r=mZ(t,n);else{let n=iZ(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return YK(r)}function gZ(e,t){let n=aG(e);return n===t||!UW(n)||nG(n)?!1:rG(n).position===`fixed`||gZ(n,t)}function _Z(e,t){let n=t.get(e);if(n)return n;let r=sG(e,[],!1).filter(e=>UW(e)&&zW(e)!==`body`),i=null,a=rG(e).position===`fixed`,o=a?aG(e):e;for(;UW(o)&&!nG(o);){let t=rG(o),n=$W(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||KW(o)&&!n&&gZ(e,o))?r=r.filter(e=>e!==o):i=t,o=aG(o)}return t.set(e,r),r}function vZ(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?JW(t)?[]:_Z(t,this._c):[].concat(n),r],o=hZ(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=hZ(t,a[e],i);s=wK(n.top,s),c=CK(n.right,c),l=CK(n.bottom,l),u=wK(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function yZ(e){let{width:t,height:n}=eZ(e);return{width:t,height:n}}function bZ(e,t,n){let r=WW(t),i=VW(t),a=n===`fixed`,o=oZ(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=DK(0);function l(){c.x=sZ(i)}if(r||!r&&!a)if((zW(t)!==`body`||KW(i))&&(s=iG(t)),r){let e=oZ(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?cZ(i,s):DK(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function xZ(e){return rG(e).position===`static`}function SZ(e,t){if(!WW(e)||rG(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return VW(e)===n&&(n=n.ownerDocument.body),n}function CZ(e,t){let n=BW(e);if(JW(e))return n;if(!WW(e)){let t=aG(e);for(;t&&!nG(t);){if(UW(t)&&!xZ(t))return t;t=aG(t)}return n}let r=SZ(e,t);for(;r&&qW(r)&&xZ(r);)r=SZ(r,t);return r&&nG(r)&&xZ(r)&&!$W(r)?n:r||eG(e)||n}var wZ=async function(e){let t=this.getOffsetParent||CZ,n=this.getDimensions,r=await n(e.floating);return{reference:bZ(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function TZ(e){return rG(e).direction===`rtl`}var EZ={convertOffsetParentRelativeRectToViewportRelativeRect:lZ,getDocumentElement:VW,getClippingRect:vZ,getOffsetParent:CZ,getElementRects:wZ,getClientRects:uZ,getDimensions:yZ,getScale:nZ,isElement:UW,isRTL:TZ};function DZ(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function OZ(e,t){let n=null,r,i=VW(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=EK(d),h=EK(i.clientWidth-(u+f)),g=EK(i.clientHeight-(d+p)),_=EK(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:wK(0,CK(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!DZ(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function kZ(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=tZ(e),u=i||a?[...l?sG(l):[],...t?sG(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?OZ(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?oZ(e):null;c&&g();function g(){let t=oZ(e);h&&!DZ(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var AZ=XX,jZ=ZX,MZ=WX,NZ=$X,PZ=qX,FZ=QX,IZ=(e,t,n)=>{let r=new Map,i={platform:EZ,...n},a={...i.platform,_c:r};return UX(e,t,{...i,platform:a})},LZ=typeof document<`u`?b.useLayoutEffect:function(){};function RZ(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(!RZ(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;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!RZ(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function zZ(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function BZ(e,t){let n=zZ(e);return Math.round(t*n)/n}function VZ(e){let t=b.useRef(e);return LZ(()=>{t.current=e}),t}function HZ(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=b.useState(r);RZ(f,r)||p(r);let[m,h]=b.useState(null),[g,_]=b.useState(null),v=b.useCallback(e=>{e!==C.current&&(C.current=e,h(e))},[]),y=b.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),x=a||m,S=o||g,C=b.useRef(null),w=b.useRef(null),T=b.useRef(u),E=c!=null,D=VZ(c),O=VZ(i),k=VZ(l),A=b.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),IZ(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!RZ(T.current,t)&&(T.current=t,PI.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);LZ(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=b.useRef(!1);LZ(()=>(j.current=!0,()=>{j.current=!1}),[]),LZ(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let M=b.useMemo(()=>({reference:C,floating:w,setReference:v,setFloating:y}),[v,y]),N=b.useMemo(()=>({reference:x,floating:S}),[x,S]),P=b.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=BZ(N.floating,u.x),r=BZ(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...zZ(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return b.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:P}),[u,A,M,N,P])}var UZ=(e,t)=>{let n=AZ(e);return{name:n.name,fn:n.fn,options:[e,t]}},WZ=(e,t)=>{let n=jZ(e);return{name:n.name,fn:n.fn,options:[e,t]}},GZ=(e,t)=>({fn:FZ(e).fn,options:[e,t]}),KZ=(e,t)=>{let n=MZ(e);return{name:n.name,fn:n.fn,options:[e,t]}},qZ=(e,t)=>{let n=NZ(e);return{name:n.name,fn:n.fn,options:[e,t]}},JZ=(e,t)=>{let n=PZ(e);return{name:n.name,fn:n.fn,options:[e,t]}},YZ=Symbol(`NOT_FOUND`);function XZ(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!=`function`)throw TypeError(t)}function ZZ(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!=`object`)throw TypeError(t)}function QZ(e,t=`expected all items to be functions, instead received the following types: `){if(!e.every(e=>typeof e==`function`)){let n=e.map(e=>typeof e==`function`?`function ${e.name||`unnamed`}()`:typeof e).join(`, `);throw TypeError(`${t}[${n}]`)}}var $Z=e=>Array.isArray(e)?e:[e];function eQ(e){let t=Array.isArray(e[0])?e[0]:e;return QZ(t,`createSelector expects all input-selectors to be functions, but received the following types: `),t}function tQ(e,t){let n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}function nQ(e){let t;return{get(n){return t&&e(t.key,n)?t.value:YZ},put(e,n){t={key:e,value:n}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function rQ(e,t){let n=[];function r(e){let r=n.findIndex(n=>t(e,n.key));if(r>-1){let e=n[r];return r>0&&(n.splice(r,1),n.unshift(e)),e.value}return YZ}function i(t,i){r(t)===YZ&&(n.unshift({key:t,value:i}),n.length>e&&n.pop())}function a(){return n}function o(){n=[]}return{get:r,put:i,getEntries:a,clear:o}}var iQ=(e,t)=>e===t;function aQ(e){return function(t,n){if(t===null||n===null||t.length!==n.length)return!1;let{length:r}=t;for(let i=0;i<r;i++)if(!e(t[i],n[i]))return!1;return!0}}function oQ(e,t){let{equalityCheck:n=iQ,maxSize:r=1,resultEqualityCheck:i}=typeof t==`object`?t:{equalityCheck:t},a=aQ(n),o=0,s=r<=1?nQ(a):rQ(r,a);function c(){let t=s.get(arguments);if(t===YZ){if(t=e.apply(null,arguments),o++,i){let e=s.getEntries().find(e=>i(e.value,t));e&&(t=e.value,o!==0&&o--)}s.put(arguments,t)}return t}return c.clearCache=()=>{s.clear(),c.resetResultsCount()},c.resultsCount=()=>o,c.resetResultsCount=()=>{o=0},c}var sQ=class{constructor(e){this.value=e}deref(){return this.value}},cQ=typeof WeakRef<`u`?WeakRef:sQ,lQ=0,uQ=1;function dQ(){return{s:lQ,v:void 0,o:null,p:null}}function fQ(e,t={}){let n=dQ(),{resultEqualityCheck:r}=t,i,a=0;function o(){let t=n,{length:o}=arguments;for(let e=0,n=o;e<n;e++){let n=arguments[e];if(typeof n==`function`||typeof n==`object`&&n){let e=t.o;e===null&&(t.o=e=new WeakMap);let r=e.get(n);r===void 0?(t=dQ(),e.set(n,t)):t=r}else{let e=t.p;e===null&&(t.p=e=new Map);let r=e.get(n);r===void 0?(t=dQ(),e.set(n,t)):t=r}}let s=t,c;if(t.s===uQ)c=t.v;else if(c=e.apply(null,arguments),a++,r){let e=i?.deref?.()??i;e!=null&&r(e,c)&&(c=e,a!==0&&a--),i=typeof c==`object`&&c||typeof c==`function`?new cQ(c):c}return s.s=uQ,s.v=c,c}return o.clearCache=()=>{n=dQ(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function pQ(e,...t){let n=typeof e==`function`?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t=0,r=0,i,a={},o=e.pop();typeof o==`object`&&(a=o,o=e.pop()),XZ(o,`createSelector expects an output function after the inputs, but received: [${typeof o}]`);let{memoize:s,memoizeOptions:c=[],argsMemoize:l=fQ,argsMemoizeOptions:u=[],devModeChecks:d={}}={...n,...a},f=$Z(c),p=$Z(u),m=eQ(e),h=s(function(){return t++,o.apply(null,arguments)},...f),g=l(function(){r++;let e=tQ(m,arguments);return i=h.apply(null,e),i},...p);return Object.assign(g,{resultFunc:o,memoizedResultFunc:h,dependencies:m,dependencyRecomputations:()=>r,resetDependencyRecomputations:()=>{r=0},lastResult:()=>i,recomputations:()=>t,resetRecomputations:()=>{t=0},memoize:s,argsMemoize:l})};return Object.assign(r,{withTypes:()=>r}),r}var mQ=pQ(fQ),hQ=Object.assign((e,t=mQ)=>{ZZ(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let n=Object.keys(e);return t(n.map(t=>e[t]),(...e)=>e.reduce((e,t,r)=>(e[n[r]]=t,e),{}))},{withTypes:()=>hQ});pQ({memoize:oQ,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});var gQ=(e,t,n,r,i,a,...o)=>{if(o.length>0)throw Error(BU(1));let s;if(e&&t&&n&&r&&i&&a)s=(o,s,c,l)=>a(e(o,s,c,l),t(o,s,c,l),n(o,s,c,l),r(o,s,c,l),i(o,s,c,l),s,c,l);else if(e&&t&&n&&r&&i)s=(a,o,s,c)=>i(e(a,o,s,c),t(a,o,s,c),n(a,o,s,c),r(a,o,s,c),o,s,c);else if(e&&t&&n&&r)s=(i,a,o,s)=>r(e(i,a,o,s),t(i,a,o,s),n(i,a,o,s),a,o,s);else if(e&&t&&n)s=(r,i,a,o)=>n(e(r,i,a,o),t(r,i,a,o),i,a,o);else if(e&&t)s=(n,r,i,a)=>t(e(n,r,i,a),r,i,a);else if(e)s=e;else throw Error(`Missing arguments`);return s},_Q=s((e=>{var t=p();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),vQ=s(((e,t)=>{t.exports=_Q()})),yQ=s((e=>{var t=p(),n=vQ();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),bQ=s(((e,t)=>{t.exports=yQ()})),xQ=[],SQ=void 0;function CQ(){return SQ}function wQ(e){xQ.push(e)}var TQ=vQ(),EQ=bQ(),DQ=JU(19)?AQ:jQ;function OQ(e,t,n,r,i){return DQ(e,t,n,r,i)}function kQ(e,t,n,r,i){let a=b.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,TQ.useSyncExternalStore)(e.subscribe,a,a)}wQ({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);(r.didChange||!Object.is(r.value,i))&&(t=!0,r.value=i,r.didChange=!1)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,TQ.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function AQ(e,t,n,r,i){let a=CQ();if(!a)return kQ(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.didChange=!0)):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i),didChange:!1},a.syncHooks.push(s)),s.value}function jQ(e,t,n,r,i){return(0,EQ.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var MQ=class{constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return OQ(this,e,t,n,r)}},NQ=class extends MQ{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){b.useDebugValue(e),$(()=>{this.state[e]!==t&&this.set(e,t)},[e,t])}useSyncedValueWithCleanup(e,t){let n=this;$(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;$(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){b.useDebugValue(e);let n=t!==void 0;$(()=>{n&&!Object.is(this.state[e],t)&&super.setState({...this.state,[e]:t})},[e,t,n])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return b.useDebugValue(e),OQ(this,this.selectors[e],t,n,r)}useContextCallback(e,t){b.useDebugValue(e);let n=IU(t??fW);this.context[e]=n}useStateSetter(e){let t=b.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},PQ={open:gQ(e=>e.open),domReferenceElement:gQ(e=>e.domReferenceElement),referenceElement:gQ(e=>e.positionReference??e.referenceElement),floatingElement:gQ(e=>e.floatingElement),floatingId:gQ(e=>e.floatingId)},FQ=class extends NQ{constructor(e){let{nested:t,noEmit:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:gX(),nested:t,noEmit:n,triggerElements:i},PQ)}setOpen=(e,t)=>{if((!e||!this.state.open||xK(t.event))&&(this.context.dataRef.current.openEvent=e?t.event:void 0),!this.context.noEmit){let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)}this.context.onOpenChange?.(e,t)}};function IQ(e,t){let n=b.useRef(null),r=b.useRef(null);return b.useCallback(i=>{if(e!==void 0){if(n.current!==null){let e=n.current,i=r.current,a=t.context.triggerElements.getById(e);i&&a===i&&t.context.triggerElements.delete(e),n.current=null,r.current=null}i!==null&&(n.current=e,r.current=i,t.context.triggerElements.add(e,i))}},[t,e])}function LQ(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=IQ(e,n),o=IU(t=>{if(a(t),!t||!n.select(`open`))return;let i=n.select(`activeTriggerId`);if(i===e){n.update({activeTriggerElement:t,...r});return}i??n.update({activeTriggerId:e,activeTriggerElement:t,...r})});return $(()=>{i&&n.update({activeTriggerElement:t.current,...r})},[i,n,t,...Object.values(r)]),{registerTrigger:o,isMountedByThisTrigger:i}}function RQ(e){let t=e.useState(`open`);$(()=>{if(t&&!e.select(`activeTriggerId`)&&e.context.triggerElements.size===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[n,r]=t.value;e.update({activeTriggerId:n,activeTriggerElement:r})}}},[t,e])}function zQ(e,t,n){let{mounted:r,setMounted:i,transitionStatus:a}=dJ(e);t.useSyncedValues({mounted:r,transitionStatus:a});let o=IU(()=>{i(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return uJ({enabled:!t.useState(`preventUnmountingOnClose`),open:e,ref:t.context.popupRef,onComplete(){e||o()}}),{forceUnmount:o,transitionStatus:a}}var BQ=class{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(e,t){let n=this.idMap.get(e);n!==t&&(n!==void 0&&this.elementsSet.delete(n),this.elementsSet.add(t),this.idMap.set(e,t))}delete(e){let t=this.idMap.get(e);t&&(this.elementsSet.delete(t),this.idMap.delete(e))}hasElement(e){return this.elementsSet.has(e)}hasMatchingElement(e){for(let t of this.elementsSet)if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}};function VQ(){return new FQ({open:!1,floatingElement:null,referenceElement:null,triggerElements:new BQ,floatingId:``,nested:!1,noEmit:!1,onOpenChange:void 0})}function HQ(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:`idle`,floatingRootContext:VQ(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:mW,inactiveTriggerProps:mW,popupProps:mW}}var UQ=gQ(e=>e.triggerIdProp??e.activeTriggerId),WQ={open:gQ(e=>e.openProp??e.open),mounted:gQ(e=>e.mounted),transitionStatus:gQ(e=>e.transitionStatus),floatingRootContext:gQ(e=>e.floatingRootContext),preventUnmountingOnClose:gQ(e=>e.preventUnmountingOnClose),payload:gQ(e=>e.payload),activeTriggerId:UQ,activeTriggerElement:gQ(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:gQ((e,t)=>t!==void 0&&UQ(e)===t),isOpenedByTrigger:gQ((e,t)=>t!==void 0&&UQ(e)===t&&e.open),isMountedByTrigger:gQ((e,t)=>t!==void 0&&UQ(e)===t&&e.mounted),triggerProps:gQ((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:gQ(e=>e.popupProps),popupElement:gQ(e=>e.popupElement),positionerElement:gQ(e=>e.positionerElement)};function GQ(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=mG(),a=bX()!=null,o=NU(()=>new FQ({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new BQ,floatingId:i,nested:a,noEmit:!1})).current;return $(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=UW(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),o.update(e)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o.context.noEmit=!1,o}function KQ(e={}){let{nodeId:t,externalTree:n}=e,r=GQ(e),i=e.rootContext||r,a={reference:i.useState(`referenceElement`),floating:i.useState(`floatingElement`),domReference:i.useState(`domReferenceElement`)},[o,s]=b.useState(null),c=b.useRef(null),l=xX(n);$(()=>{a.domReference&&(c.current=a.domReference)},[a.domReference]);let u=HZ({...e,elements:{...a,...o&&{reference:o}}}),d=b.useCallback(e=>{let t=UW(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;s(t),u.refs.setReference(t)},[u.refs]),[f,p]=b.useState(null),[m,h]=b.useState(null);i.useSyncedValue(`referenceElement`,f),i.useSyncedValue(`domReferenceElement`,UW(f)?f:null),i.useSyncedValue(`floatingElement`,m);let g=b.useCallback(e=>{(UW(e)||e===null)&&(c.current=e,p(e)),(UW(u.refs.reference.current)||u.refs.reference.current===null||e!==null&&!UW(e))&&u.refs.setReference(e)},[u.refs,p]),_=b.useCallback(e=>{h(e),u.refs.setFloating(e)},[u.refs]),v=b.useMemo(()=>({...u.refs,setReference:g,setFloating:_,setPositionReference:d,domReference:c}),[u.refs,g,_,d]),y=b.useMemo(()=>({...u.elements,domReference:a.domReference}),[u.elements,a.domReference]),x=i.useState(`open`),S=i.useState(`floatingId`),C=b.useMemo(()=>({...u,dataRef:i.context.dataRef,open:x,onOpenChange:i.setOpen,events:i.context.events,floatingId:S,refs:v,elements:y,nodeId:t,rootStore:i}),[u,v,y,t,i,x,S]);return $(()=>{i.context.dataRef.current.floatingContext=C;let e=l?.nodesRef.current.find(e=>e.id===t);e&&(e.context=C)}),b.useMemo(()=>({...u,context:C,refs:v,elements:y,rootStore:i}),[u,v,y,C,i])}function qQ(e){let{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:r=!1,onOpenChange:i}=e,a=mG(),o=bX()!=null,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(r?`popupElement`:`positionerElement`),u=t.context.triggerElements,d=NU(()=>new FQ({open:s,referenceElement:c,floatingElement:l,triggerElements:u,onOpenChange:i,floatingId:a,nested:o,noEmit:n})).current;return $(()=>{let e={open:s,floatingId:a,referenceElement:c,floatingElement:l};UW(c)&&(e.domReferenceElement=c),d.state.positionReference===d.state.referenceElement&&(e.positionReference=c),d.update(e)},[s,a,c,l,d]),d.context.onOpenChange=i,d.context.nested=o,d.context.noEmit=n,d}var JQ=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${eK}`;function YQ(e){return e?!!e.closest(JQ):!1}var XQ=class e{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new RY,this.restTimeout=new RY,this.handleCloseOptions=void 0}static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose};function ZQ(e){e.performedPointerEventsMutation&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null)}function QQ(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t;ZQ(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function $Q(e){let t=NU(XQ.create).current,n=e.context.dataRef.current;return n.hoverInteractionState||=t,Yq(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}function e$(e,t={}){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingElement`),a=n.useState(`domReferenceElement`),{dataRef:o}=n.context,{enabled:s=!0,closeDelay:c=0}=t,l=$Q(n),u=xX(),d=bX(),f=IU(()=>UY(o.current.openEvent?.type,l.interactedInside)),p=IU(()=>{let e=o.current.openEvent?.type;return e?.includes(`mouse`)&&e!==`mousedown`}),m=IU(e=>sK(e,n.context.triggerElements)),h=b.useCallback(e=>{let t=VY(c,`close`,l.pointerType),r=()=>{n.setOpen(!1,BG(AG,e)),u?.events.emit(`floating.closed`,e)};t?l.openChangeTimeout.start(t,r):(l.openChangeTimeout.clear(),r())},[c,n,l,u]),g=IU(()=>{ZQ(l)}),_=IU(e=>{let t=cK(e);if(!YQ(t)){l.interactedInside=!1;return}l.interactedInside=t?.closest(`[aria-haspopup]`)!=null});$(()=>{r||(l.pointerType=void 0,l.restTimeoutPending=!1,l.interactedInside=!1,g())},[r,l,g]),b.useEffect(()=>g,[g]),$(()=>{if(s&&r&&l.handleCloseOptions?.blockPointerEvents&&p()&&UW(a)&&i){let e=a,t=i,n=lG(i),r=u?.nodesRef.current.find(e=>e.id===d)?.context?.elements.floating;return r&&(r.style.pointerEvents=``),QQ(l,{scopeElement:l.handleCloseOptions?.getScope?.()??l.pointerEventsScopeElement??r??e.closest(`[data-rootownerid]`)??n.body,referenceElement:e,floatingElement:t}),()=>{g()}}},[s,r,a,i,l,p,u,d,g]);let v=zY();b.useEffect(()=>{if(!s)return;function e(){l.openChangeTimeout.clear(),v.clear(),u?.events.off(`floating.closed`,r),g()}function t(e){if(u&&d&&mK(u.nodesRef.current,d).length>0){u.events.on(`floating.closed`,r);return}if(!m(e.relatedTarget)){if(l.handler){l.handler(e);return}g(),f()||h(e)}}function r(e){!u||!d||mK(u.nodesRef.current,d).length>0||v.start(0,()=>{u.events.off(`floating.closed`,r),n.setOpen(!1,BG(AG,e)),u.events.emit(`floating.closed`,e)})}let a=i;return a&&(a.addEventListener(`mouseenter`,e),a.addEventListener(`mouseleave`,t),a.addEventListener(`pointerdown`,_,!0)),()=>{a&&(a.removeEventListener(`mouseenter`,e),a.removeEventListener(`mouseleave`,t),a.removeEventListener(`pointerdown`,_,!0)),u?.events.off(`floating.closed`,r)}},[s,i,n,o,f,m,h,g,_,l,u,d,v])}var t$={current:null};function n$(e,t={}){let n=`rootStore`in e?e.rootStore:e,{dataRef:r,events:i}=n.context,{enabled:a=!0,delay:o=0,handleClose:s=null,mouseOnly:c=!1,restMs:l=0,move:u=!0,triggerElementRef:d=t$,externalTree:f,isActiveTrigger:p=!0,getHandleCloseContext:m}=t,h=xX(f),g=$Q(n),_=WY(s),v=WY(o),y=WY(l),x=WY(a);p&&(g.handleCloseOptions=_.current?.__options);let S=IU(()=>UY(r.current.openEvent?.type,g.interactedInside)),C=IU(e=>sK(e,n.context.triggerElements)),w=IU((e,t,r)=>{let i=n.context.triggerElements;if(i.hasElement(t))return!e||!oK(e,t);if(!UW(r))return!1;let a=r;return i.hasMatchingElement(e=>oK(e,a))&&(!e||!oK(e,a))}),T=b.useCallback((e,t=!0)=>{let r=VY(v.current,`close`,g.pointerType);r?g.openChangeTimeout.start(r,()=>{n.setOpen(!1,BG(AG,e)),h?.events.emit(`floating.closed`,e)}):t&&(g.openChangeTimeout.clear(),n.setOpen(!1,BG(AG,e)),h?.events.emit(`floating.closed`,e))},[v,n,g,h]),E=IU(()=>{g.handler&&=(lG(n.select(`domReferenceElement`)).removeEventListener(`mousemove`,g.handler),void 0)});b.useEffect(()=>E,[E]);let D=IU(()=>{ZQ(g)});return b.useEffect(()=>{if(!a)return;function e(e){e.open||(E(),g.openChangeTimeout.clear(),g.restTimeout.clear(),g.blockMouseMove=!0,g.restTimeoutPending=!1)}return i.on(`openchange`,e),()=>{i.off(`openchange`,e)}},[a,i,g,E]),b.useEffect(()=>{if(!a)return;let e=d.current??(p?n.select(`domReferenceElement`):null);if(!UW(e))return;function t(e){if(g.openChangeTimeout.clear(),g.blockMouseMove=!1,c&&!bK(g.pointerType)||HY(y.current)>0&&!VY(v.current,`open`))return;let t=VY(v.current,`open`,g.pointerType),r=e.currentTarget??null,i=n.select(`domReferenceElement`),a=r==null?!1:w(i,r,e.target),o=n.select(`open`),s=!o||a;a&&o?n.setOpen(!0,BG(AG,e,r)):t?g.openChangeTimeout.start(t,()=>{s&&n.setOpen(!0,BG(AG,e,r))}):s&&n.setOpen(!0,BG(AG,e,r))}function i(e){if(S()){D();return}E();let t=lG(n.select(`domReferenceElement`));g.restTimeout.clear(),g.restTimeoutPending=!1;let i=r.current.floatingContext??m?.();if(!C(e.relatedTarget)){if(_.current&&i){n.select(`open`)||g.openChangeTimeout.clear();let r=d.current;g.handler=_.current({...i,tree:h,x:e.clientX,y:e.clientY,onClose(){D(),E(),x.current&&!S()&&r===n.select(`domReferenceElement`)&&T(e,!0)}}),t.addEventListener(`mousemove`,g.handler),g.handler(e);return}(g.pointerType!==`touch`||!oK(n.select(`floatingElement`),e.relatedTarget))&&T(e)}}return u&&e.addEventListener(`mousemove`,t,{once:!0}),e.addEventListener(`mouseenter`,t),e.addEventListener(`mouseleave`,i),()=>{u&&e.removeEventListener(`mousemove`,t),e.removeEventListener(`mouseenter`,t),e.removeEventListener(`mouseleave`,i)}},[E,D,r,v,T,n,a,_,g,p,w,S,C,c,u,y,d,h,x,m]),b.useMemo(()=>{if(!a)return;function e(e){g.pointerType=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e,r=e.currentTarget,i=n.select(`domReferenceElement`),a=n.select(`open`),o=w(i,r,e.target);if(c&&!bK(g.pointerType))return;let s=HY(y.current);if(a&&!o||s===0||!o&&g.restTimeoutPending&&e.movementX**2+e.movementY**2<2)return;g.restTimeout.clear();function l(){if(g.restTimeoutPending=!1,S())return;let e=n.select(`open`);!g.blockMouseMove&&(!e||o)&&n.setOpen(!0,BG(AG,t,r))}g.pointerType===`touch`?PI.flushSync(()=>{l()}):o&&a?l():(g.restTimeoutPending=!0,g.restTimeout.start(s,l))}}},[a,g,S,w,c,n,y])}function r$(e=[]){let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),i=e.map(e=>e?.trigger),a=b.useCallback(t=>i$(t,e,`reference`),t),o=b.useCallback(t=>i$(t,e,`floating`),n),s=b.useCallback(t=>i$(t,e,`item`),r),c=b.useCallback(t=>i$(t,e,`trigger`),i);return b.useMemo(()=>({getReferenceProps:a,getFloatingProps:o,getItemProps:s,getTriggerProps:c}),[a,o,s,c])}function i$(e,t,n){let r=new Map,i=n===`item`,a={};n===`floating`&&(a.tabIndex=-1,a[$G]=``);for(let t in e)i&&e&&(t===`active`||t===`selected`)||(a[t]=e[t]);for(let o=0;o<t.length;o+=1){let s,c=t[o]?.[n];s=typeof c==`function`?e?c(e):null:c,s&&a$(a,s,i,r)}return a$(a,e,i,r),a}function a$(e,t,n,r){for(let i in t){let a=t[i];n&&(i===`active`||i===`selected`)||(i.startsWith(`on`)?(r.has(i)||r.set(i,[]),typeof a==`function`&&(r.get(i)?.push(a),e[i]=(...e)=>r.get(i)?.map(t=>t(...e)).find(e=>e!==void 0))):e[i]=a)}}var o$=`Escape`;function s$(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function c$(e,t){return s$(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function l$(e,t,n){return s$(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function u$(e,t,n){return s$(t,n?e===tK:e===nK,e===iK)}function d$(e,t,n,r){return t===`both`||t===`horizontal`&&r&&r>1?e===o$:s$(t,n?e===nK:e===tK,e===rK)}function f$(e,t){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingElement`),a=n.useState(`domReferenceElement`),o=n.context.dataRef,{listRef:s,activeIndex:c,onNavigate:l=()=>{},enabled:u=!0,selectedIndex:d=null,allowEscape:f=!1,loopFocus:p=!1,nested:m=!1,rtl:h=!1,virtual:g=!1,focusItemOnOpen:_=`auto`,focusItemOnHover:v=!0,openOnArrowKeyDown:y=!0,disabledIndices:x=void 0,orientation:S=`vertical`,parentOrientation:C,cols:w=1,id:T,resetOnPointerLeave:E=!0,externalTree:D}=t,O=WY(pK(i)),k=bX(),A=xX(D);$(()=>{o.current.orientation=S},[o,S]);let j=fK(a),M=b.useRef(_),N=b.useRef(d??-1),P=b.useRef(null),F=b.useRef(!0),I=IU(e=>{l(N.current===-1?null:N.current,e)}),L=b.useRef(I),R=b.useRef(!!i),z=b.useRef(r),B=b.useRef(!1),V=b.useRef(!1),ee=WY(x),H=WY(r),te=WY(d),U=WY(E),ne=IU(()=>{function e(e){g?A?.events.emit(`virtualfocus`,e):QY(e,{sync:B.current,preventScroll:!0})}let t=s.current[N.current],n=V.current;t&&e(t),(B.current?e=>e():requestAnimationFrame)(()=>{let r=s.current[N.current]||t;r&&(t||e(r),ie&&(n||!F.current)&&r.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});$(()=>{u&&(r&&i?(N.current=d??-1,M.current&&d!=null&&(V.current=!0,I())):R.current&&(N.current=-1,L.current()))},[u,r,i,d,I]),$(()=>{if(u){if(!r){B.current=!1;return}if(i)if(c==null){if(B.current=!1,te.current!=null)return;if(R.current&&(N.current=-1,ne()),(!z.current||!R.current)&&M.current&&(P.current!=null||M.current===!0&&P.current==null)){let e=0,t=()=>{s.current[0]==null?(e<2&&(e?requestAnimationFrame:queueMicrotask)(t),e+=1):(N.current=P.current==null||l$(P.current,S,h)||m?QK(s):$K(s),P.current=null,I())};t()}}else ZK(s,c)||(N.current=c,ne(),V.current=!1)}},[u,r,i,c,te,m,s,S,h,I,ne,ee]),$(()=>{if(!u||i||!A||g||!R.current)return;let e=A.nodesRef.current,t=e.find(e=>e.id===k)?.context?.elements.floating,n=aK(lG(i)),r=e.some(e=>e.context&&oK(e.context.elements.floating,n));t&&!r&&F.current&&t.focus({preventScroll:!0})},[u,i,A,k,g]),$(()=>{L.current=I,z.current=r,R.current=!!i}),$(()=>{r||(P.current=null,M.current=_)},[r,_]);let re=c!=null,ie=b.useMemo(()=>{function e(e){if(!H.current)return;let t=s.current.indexOf(e.currentTarget);t!==-1&&N.current!==t&&(N.current=t,I(e))}return{onFocus(t){B.current=!0,e(t)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(t){B.current=!0,V.current=!1,v&&e(t)},onPointerLeave(e){if(!H.current||!F.current||e.pointerType===`touch`)return;B.current=!0;let t=e.relatedTarget;if(!(!v||s.current.includes(t))&&U.current&&(QY(null,{sync:!0}),N.current=-1,I(e),!g)){let e=O.current,t=aK(lG(e));e&&oK(e,t)&&e.focus({preventScroll:!0})}}}},[H,O,v,s,I,U,g]),ae=b.useCallback(()=>C??A?.nodesRef.current.find(e=>e.id===k)?.context?.dataRef?.current.orientation,[k,A,C]),oe=IU(e=>{if(F.current=!1,B.current=!0,e.which===229||!H.current&&e.currentTarget===O.current)return;if(m&&d$(e.key,S,h,w)){c$(e.key,ae())||gK(e),n.setOpen(!1,BG(IG,e.nativeEvent)),WW(a)&&(g?A?.events.emit(`virtualfocus`,a):a.focus());return}let t=N.current,i=QK(s,x),o=$K(s,x);if(j||(e.key===`Home`&&(gK(e),N.current=i,I(e)),e.key===`End`&&(gK(e),N.current=o,I(e))),w>1){let t=Array.from({length:s.current.length},()=>({width:1,height:1})),n=nq(t,w,!1),r=n.findIndex(e=>e!=null&&!aq(s,e,x)),a=n.reduce((e,t,n)=>t!=null&&!aq(s,t,x)?n:e,-1),c=n[tq({current:n.map(e=>e==null?null:s.current[e])},{event:e,orientation:S,loopFocus:p,rtl:h,cols:w,disabledIndices:iq([...(typeof x==`function`?null:x)||s.current.map((e,t)=>aq(s,t,x)?t:void 0),void 0],n),minIndex:r,maxIndex:a,prevIndex:rq(N.current>o?i:N.current,t,n,w,e.key===`ArrowDown`?`bl`:e.key===(h?`ArrowLeft`:`ArrowRight`)?`tr`:`tl`),stopEvent:!0})];if(c!=null&&(N.current=c,I(e)),S===`both`)return}if(c$(e.key,S)){if(gK(e),r&&!g&&aK(e.currentTarget.ownerDocument)===e.currentTarget){N.current=l$(e.key,S,h)?i:o,I(e);return}l$(e.key,S,h)?p?t>=o?f&&t!==s.current.length?N.current=-1:(B.current=!1,N.current=i):N.current=eq(s,{startingIndex:t,disabledIndices:x}):N.current=Math.min(o,eq(s,{startingIndex:t,disabledIndices:x})):p?t<=i?f&&t!==-1?N.current=s.current.length:(B.current=!1,N.current=o):N.current=eq(s,{startingIndex:t,decrement:!0,disabledIndices:x}):N.current=Math.max(i,eq(s,{startingIndex:t,decrement:!0,disabledIndices:x})),ZK(s,N.current)&&(N.current=-1),I(e)}}),se=b.useMemo(()=>g&&r&&re&&{"aria-activedescendant":`${T}-${c}`},[g,r,re,T,c]),ce=b.useMemo(()=>({"aria-orientation":S===`both`?void 0:S,...j?{}:se,onKeyDown(e){if(e.key===`Tab`&&e.shiftKey&&r&&!g){let t=cK(e.nativeEvent);if(t&&!oK(O.current,t))return;gK(e),n.setOpen(!1,BG(PG,e.nativeEvent)),WW(a)&&a.focus();return}oe(e)},onPointerMove(){F.current=!0}}),[se,oe,O,S,j,n,r,g,a]),le=b.useMemo(()=>{function e(e){_===`auto`&&vK(e.nativeEvent)&&(M.current=!g)}function t(e){M.current=_,_===`auto`&&yK(e.nativeEvent)&&(M.current=!0)}return{onKeyDown(e){let t=n.select(`open`);F.current=!1;let r=e.key.startsWith(`Arrow`),i=u$(e.key,ae(),h),a=c$(e.key,S),o=(m?i:a)||e.key===`Enter`||e.key.trim()===``;if(g&&t)return oe(e);if(!(!t&&!y&&r)){if(o){let t=c$(e.key,ae());P.current=m&&t?null:e.key}if(m){i&&(gK(e),t?(N.current=QK(s,ee.current),I(e)):n.setOpen(!0,BG(IG,e.nativeEvent,e.currentTarget)));return}a&&(te.current!=null&&(N.current=te.current),gK(e),!t&&y?n.setOpen(!0,BG(IG,e.nativeEvent,e.currentTarget)):oe(e),t&&I(e))}},onFocus(e){n.select(`open`)&&!g&&(N.current=-1,I(e))},onPointerDown:t,onPointerEnter:t,onMouseDown:e,onClick:e}},[oe,ee,_,s,m,I,n,y,S,ae,h,te,g]),ue=b.useMemo(()=>({...se,...le}),[se,le]);return b.useMemo(()=>u?{reference:ue,floating:ce,item:ie,trigger:le}:{},[u,ue,ce,le,ie])}var p$=new Map([[`select`,`listbox`],[`combobox`,`listbox`],[`label`,!1]]);function m$(e,t={}){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingId`),a=n.useState(`domReferenceElement`),o=n.useState(`floatingElement`),{role:s=`dialog`}=t,c=mG(),l=a?.id||c,u=b.useMemo(()=>pK(o)?.id||i,[o,i]),d=p$.get(s)??s,f=bX()!=null,p=b.useMemo(()=>d===`tooltip`||s===`label`?mW:{"aria-haspopup":d===`alertdialog`?`dialog`:d,"aria-expanded":`false`,...d===`listbox`&&{role:`combobox`},...d===`menu`&&f&&{role:`menuitem`},...s===`select`&&{"aria-autocomplete":`none`},...s===`combobox`&&{"aria-autocomplete":`list`}},[d,f,s]),m=b.useMemo(()=>d===`tooltip`||s===`label`?{[`aria-${s===`label`?`labelledby`:`describedby`}`]:r?u:void 0}:{...p,"aria-expanded":r?`true`:`false`,"aria-controls":r?u:void 0,...d===`menu`&&{id:l}},[d,u,r,l,s,p]),h=b.useMemo(()=>{let e={id:u,...d&&{role:d}};return d===`tooltip`||s===`label`?e:{...e,...d===`menu`&&{"aria-labelledby":l}}},[d,u,l,s]),g=b.useCallback(({active:e,selected:t})=>{let n={role:`option`,...e&&{id:`${u}-fui-option`}};switch(s){case`select`:case`combobox`:return{...n,"aria-selected":t};default:}return{}},[u,s]);return b.useMemo(()=>({reference:m,floating:h,item:g,trigger:p}),[m,h,p,g])}function h$(e,t){let n=`rootStore`in e?e.rootStore:e,r=n.context.dataRef,i=n.useState(`open`),{listRef:a,elementsRef:o,activeIndex:s,onMatch:c,onTypingChange:l,enabled:u=!0,resetMs:d=750,selectedIndex:f=null}=t,p=zY(),m=b.useRef(``),h=b.useRef(f??s??-1),g=b.useRef(null);$(()=>{!i&&f!==null||(p.clear(),g.current=null,m.current!==``&&(m.current=``))},[i,f,p]),$(()=>{i&&m.current===``&&(h.current=f??s??-1)},[i,f,s]);let _=IU(e=>{e?r.current.typing||(r.current.typing=e,l?.(e)):r.current.typing&&(r.current.typing=e,l?.(e))}),v=IU(e=>{function t(e){let t=o?.current[e];return!t||oq(t)}function n(e,n,r=0){if(e.length===0)return-1;let i=(r%e.length+e.length)%e.length,a=n.toLocaleLowerCase();for(let n=0;n<e.length;n+=1){let r=(i+n)%e.length;if(!(!e[r]?.toLocaleLowerCase().startsWith(a)||!t(r)))return r}return-1}let r=a.current;if(m.current.length>0&&e.key===` `&&(gK(e),_(!0)),m.current.length>0&&m.current[0]!==` `&&n(r,m.current)===-1&&e.key!==` `&&_(!1),r==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;i&&e.key!==` `&&(gK(e),_(!0));let l=m.current===``;l&&(h.current=f??s??-1),r.every(e=>e?e[0]?.toLocaleLowerCase()!==e[1]?.toLocaleLowerCase():!0)&&m.current===e.key&&(m.current=``,h.current=g.current),m.current+=e.key,p.start(d,()=>{m.current=``,h.current=g.current,_(!1)});let u=((l?f??s??-1:h.current)??0)+1,v=n(r,m.current,u);v===-1?e.key!==` `&&(m.current=``,_(!1)):(c?.(v),g.current=v)}),y=IU(e=>{let t=e.relatedTarget,r=n.select(`domReferenceElement`),i=n.select(`floatingElement`),a=oK(r,t),o=oK(i,t);a||o||(p.clear(),m.current=``,h.current=g.current,_(!1))}),x=b.useMemo(()=>({onKeyDown:v,onBlur:y}),[v,y]),S=b.useMemo(()=>({onKeyDown:v,onBlur:y}),[v,y]);return b.useMemo(()=>u?{reference:x,floating:S}:{},[u,x,S])}var g$=.1,_$=g$*g$,v$=.5;function y$(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function b$(e,t,n,r,i,a,o,s,c,l){let u=!1;return y$(e,t,n,r,i,a)&&(u=!u),y$(e,t,i,a,o,s)&&(u=!u),y$(e,t,o,s,c,l)&&(u=!u),y$(e,t,c,l,n,r)&&(u=!u),u}function x$(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function S$(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function C$(e={}){let{blockPointerEvents:t=!1}=e,n=new RY,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r?.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*_$;return u=e,d=t,f=n,o<s}function m(){n.clear(),a()}return function(r){n.clear();let a=i.domReference,u=i.floating;if(!a||!u||c==null||e==null||t==null)return;let{clientX:d,clientY:f}=r,h=cK(r),g=r.type===`mouseleave`,_=oK(u,h),v=oK(a,h);if(_&&(l=!0,!g))return;if(v&&(l=!1,!g)){l=!0;return}if(g&&UW(r.relatedTarget)&&oK(u,r.relatedTarget))return;function y(){return!!(s&&mK(s.nodesRef.current,o).length>0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),S=u.getBoundingClientRect(),C=e>S.right-S.width/2,w=t>S.bottom-S.height/2,T=S.width>x.width,E=S.height>x.height,D=(T?x:S).left,O=(T?x:S).right,k=(E?x:S).top,A=(E?x:S).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let j=!1;switch(c){case`top`:j=S$(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:j=S$(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:j=S$(d,f,S.right-1,A,x.left+1,k);break;case`right`:j=S$(d,f,x.right-1,A,S.left+1,k);break;default:}if(j)return;if(l&&!x$(d,f,x)){b();return}if(!g&&p(d,f)){b();return}let M=!1;switch(c){case`top`:{let n=T?v$/2:v$*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+v$+1,o=C||T?S.bottom-v$:S.top,s=C?T?S.bottom-v$:S.top:S.bottom-v$;M=b$(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?v$/2:v$*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-v$,o=C||T?S.top+v$:S.bottom,s=C?T?S.top+v$:S.bottom:S.top+v$;M=b$(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?v$/2:v$*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+v$+1,o=w||E?S.right-v$:S.left,s=w?E?S.right-v$:S.left:S.right-v$;M=b$(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?v$/2:v$*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-v$,o=w||E?S.left+v$:S.right,s=w?E?S.left+v$:S.right:S.left+v$;M=b$(d,f,a,r,a,i,o,S.top,s,S.bottom);break}default:}M?l||n.start(40,b):b()}};return r.__options={blockPointerEvents:t},r}var w$=function(e){return e.nestedDialogs=`--nested-dialogs`,e}({}),T$=function(e){return e[e.open=wY.open]=`open`,e[e.closed=wY.closed]=`closed`,e[e.startingStyle=wY.startingStyle]=`startingStyle`,e[e.endingStyle=wY.endingStyle]=`endingStyle`,e.nested=`data-nested`,e.nestedDialogOpen=`data-nested-dialog-open`,e}({}),E$=b.createContext(void 0);function D$(){let e=b.useContext(E$);if(e===void 0)throw Error(BU(26));return e}var O$={...NY,...rJ,nestedDialogOpen(e){return e?{[T$.nestedDialogOpen]:``}:null}},k$=b.forwardRef(function(e,t){let{className:n,finalFocus:r,initialFocus:i,render:a,...o}=e,{store:s}=CY(),c=s.useState(`descriptionElementId`),l=s.useState(`disablePointerDismissal`),u=s.useState(`floatingRootContext`),d=s.useState(`popupProps`),f=s.useState(`modal`),p=s.useState(`mounted`),m=s.useState(`nested`),h=s.useState(`nestedOpenDialogCount`),g=s.useState(`open`),_=s.useState(`openMethod`),v=s.useState(`titleElementId`),y=s.useState(`transitionStatus`),b=s.useState(`role`);D$(),uJ({open:g,ref:s.context.popupRef,onComplete(){g&&s.context.onOpenChangeComplete?.(!0)}});function x(e){return e===`touch`?s.context.popupRef.current:!0}let S=i===void 0?x:i,C=bW(`div`,e,{state:{open:g,nested:m,transitionStatus:y,nestedDialogOpen:h>0},props:[d,{"aria-labelledby":v??void 0,"aria-describedby":c??void 0,role:b,tabIndex:-1,hidden:!p,onKeyDown(e){DJ.has(e.key)&&e.stopPropagation()},style:{[w$.nestedDialogs]:h}},o],ref:[t,s.context.popupRef,s.useStateSetter(`popupElement`)],stateAttributesMapping:O$});return(0,W.jsx)(PX,{context:u,openInteractionType:_,disabled:!p,closeOnFocusOut:!l,initialFocus:S,returnFocus:r,modal:f!==!1,restoreFocus:`popup`,children:C})}),A$=b.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n?.getBoundingClientRect();i=`polygon(
|
|
142
|
+
0% 0%,
|
|
143
|
+
100% 0%,
|
|
144
|
+
100% 100%,
|
|
145
|
+
0% 100%,
|
|
146
|
+
0% 0%,
|
|
147
|
+
${e.left}px ${e.top}px,
|
|
148
|
+
${e.left}px ${e.bottom}px,
|
|
149
|
+
${e.right}px ${e.bottom}px,
|
|
150
|
+
${e.right}px ${e.top}px,
|
|
151
|
+
${e.left}px ${e.top}px
|
|
152
|
+
)`}return(0,W.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})}),j$=b.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i}=CY(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,W.jsx)(E$.Provider,{value:n,children:(0,W.jsxs)(hX,{ref:t,...r,children:[a&&o===!0&&(0,W.jsx)(A$,{ref:i.context.internalBackdropRef,inert:$q(!s)}),e.children]})}):null});function M$(e){let t=b.useRef(!0);t.current&&(t.current=!1,e())}var N$={},P$={},F$=``;function I$(e){if(typeof document>`u`)return!1;let t=lG(e);return BW(t).innerWidth-t.documentElement.clientWidth>0}function L$(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=lG(e),n=t.documentElement,r=t.body,i=KW(n)?n:r,a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function R$(e){let t=lG(e),n=t.documentElement,r=t.body,i=KW(n)?n:r,a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function z$(e){let t=lG(e),n=t.documentElement,r=t.body,i=BW(n),a=0,o=0,s=!1,c=oJ.create();if(GG&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,N$={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},F$=n.style.scrollBehavior,P$={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};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=KW(n)?n:r;if(s=L$(e),s){n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`;return}Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflow:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`}function u(){Object.assign(n.style,N$),Object.assign(r.style,P$),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=F$)}function d(){u(),c.request(l)}return l(),i.addEventListener(`resize`,d),()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&i.removeEventListener(`resize`,d)}}var B$=new class{lockCount=0;restore=null;timeoutLock=RY.create();timeoutUnlock=RY.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=lG(e).documentElement,n=BW(t).getComputedStyle(t).overflowY;if(n===`hidden`||n===`clip`){this.restore=fW;return}this.restore=KG||!I$(e)?R$(e):z$(e)}};function V$(e=!0,t=null){$(()=>{if(e)return B$.acquire(t)},[e,t])}function H$(e){let t=b.useRef(``),n=b.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:b.useCallback(n=>{if(n.detail===0){e(n,`keyboard`);return}`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``},[e]),onPointerDown:n}}function U$(e,t){let n=b.useRef(e),r=IU(t);$(()=>{n.current!==e&&r(n.current)},[e,r]),$(()=>{n.current=e},[e])}function W$(e){let[t,n]=b.useState(null),r=IU((t,r)=>{e||n(r||(KG?`touch`:``))});U$(e,t=>{t&&!e&&n(null)});let{onClick:i,onPointerDown:a}=H$(r);return b.useMemo(()=>({openMethod:t,triggerProps:{onClick:i,onPointerDown:a}}),[t,i,a])}function G$(e){let{store:t,parentContext:n,actionsRef:r}=e,i=t.useState(`open`),a=t.useState(`disablePointerDismissal`),o=t.useState(`modal`),s=t.useState(`popupElement`),{openMethod:c,triggerProps:l}=W$(i);RQ(t);let{forceUnmount:u}=zQ(i,t),d=IU(e=>{let n=BG(e);return n.preventUnmountOnClose=()=>{t.set(`preventUnmountingOnClose`,!0)},n}),f=b.useCallback(()=>{t.setOpen(!1,d(RG))},[t,d]);b.useImperativeHandle(r,()=>({unmount:u,close:f}),[u,f]);let p=qQ({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[m,h]=b.useState(0),g=m===0,_=m$(p),v=zX(p,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?`intentional`:{mouse:o===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(e){if(!t.context.outsidePressEnabledRef.current||`button`in e&&e.button!==0||`touches`in e&&e.touches.length!==1)return!1;let n=cK(e);if(g&&!a){let e=n;return o&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===e||t.context.backdropRef.current===e||oK(e,s)&&!e?.hasAttribute(`data-base-ui-portal`):!0}return!1},escapeKey:g});V$(i&&o===!0,s);let{getReferenceProps:y,getFloatingProps:x,getTriggerProps:S}=r$([_,v]);t.useContextCallback(`onNestedDialogOpen`,e=>{h(e+1)}),t.useContextCallback(`onNestedDialogClose`,()=>{h(0)}),b.useEffect(()=>(n?.onNestedDialogOpen&&i&&n.onNestedDialogOpen(m),n?.onNestedDialogClose&&!i&&n.onNestedDialogClose(),()=>{n?.onNestedDialogClose&&i&&n.onNestedDialogClose()}),[i,n,m]);let C=b.useMemo(()=>y(l),[y,l]),w=b.useMemo(()=>S(l),[S,l]),T=b.useMemo(()=>x(),[x]);t.useSyncedValues({openMethod:c,activeTriggerProps:C,inactiveTriggerProps:w,popupProps:T,floatingRootContext:p,nestedOpenDialogCount:m})}var K$={...WQ,modal:gQ(e=>e.modal),nested:gQ(e=>e.nested),nestedOpenDialogCount:gQ(e=>e.nestedOpenDialogCount),disablePointerDismissal:gQ(e=>e.disablePointerDismissal),openMethod:gQ(e=>e.openMethod),descriptionElementId:gQ(e=>e.descriptionElementId),titleElementId:gQ(e=>e.titleElementId),viewportElement:gQ(e=>e.viewportElement),role:gQ(e=>e.role)},q$=class extends NQ{constructor(e){super(J$(e),{popupRef:b.createRef(),backdropRef:b.createRef(),internalBackdropRef:b.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:new BQ,onOpenChange:void 0,onOpenChangeComplete:void 0},K$)}setOpen=(e,t)=>{if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;let n={open:e,nativeEvent:t.event,reason:t.reason,nested:this.state.nested};this.state.floatingRootContext.context.events?.emit(`openchange`,n);let r={open:e},i=t.trigger?.id??null;(i||e)&&(r.activeTriggerId=i,r.activeTriggerElement=t.trigger??null),this.update(r)}};function J$(e={}){return{...HQ(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:`dialog`,...e}}function Y$(e){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,disablePointerDismissal:o=!1,modal:s=!0,actionsRef:c,handle:l,triggerId:u,defaultTriggerId:d=null}=e,f=CY(!0),p=!!f,m=NU(()=>l?.store??new q$({open:r,openProp:n,activeTriggerId:d,triggerIdProp:u,modal:s,disablePointerDismissal:o,nested:p})).current;M$(()=>{n===void 0&&m.state.open===!1&&r===!0&&m.update({open:!0,activeTriggerId:d})}),m.useControlledProp(`openProp`,n),m.useControlledProp(`triggerIdProp`,u),m.useSyncedValues({disablePointerDismissal:o,nested:p,modal:s}),m.useContextCallback(`onOpenChange`,i),m.useContextCallback(`onOpenChangeComplete`,a);let h=m.useState(`payload`);G$({store:m,actionsRef:c,parentContext:f?.store.context,onOpenChange:i,triggerIdProp:u});let g=b.useMemo(()=>({store:m}),[m]);return(0,W.jsx)(SY.Provider,{value:g,children:typeof t==`function`?t({payload:h}):t})}var X$=b.forwardRef(function(e,t){let{render:n,className:r,id:i,...a}=e,{store:o}=CY(),s=hG(i);return o.useSyncedValueWithCleanup(`titleElementId`,s),bW(`h2`,e,{ref:t,props:[{id:s},a]})});function Z$({...e}){return(0,W.jsx)(Y$,{"data-slot":`dialog`,...e})}function Q$({...e}){return(0,W.jsx)(j$,{"data-slot":`dialog-portal`,...e})}function $$({className:e,...t}){return(0,W.jsx)(FY,{"data-slot":`dialog-overlay`,className:VJ(`data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 isolate z-50`,e),...t})}function e1({className:e,children:t,showCloseButton:n=!0,...r}){return(0,W.jsxs)(Q$,{children:[(0,W.jsx)($$,{}),(0,W.jsxs)(k$,{"data-slot":`dialog-content`,className:VJ(`bg-background data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 ring-foreground/10 grid max-w-[calc(100%-2rem)] gap-4 rounded-none p-4 text-xs/relaxed ring-1 duration-100 sm:max-w-sm fixed top-1/2 left-1/2 z-50 w-full -translate-x-1/2 -translate-y-1/2 outline-none`,e),...r,children:[t,n&&(0,W.jsxs)(IY,{"data-slot":`dialog-close`,render:(0,W.jsx)(vY,{variant:`ghost`,className:`absolute top-2 right-2`,size:`icon-sm`}),children:[(0,W.jsx)(Wr,{}),(0,W.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function t1({className:e,...t}){return(0,W.jsx)(X$,{"data-slot":`dialog-title`,className:VJ(`text-sm font-medium`,e),...t})}var n1=()=>{let e=UE(),[t,n]=(0,b.useState)(!1);return e._meta&&Object.keys(e._meta).length>0?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(vY,{variant:`ghost`,size:`default`,onClick:()=>n(!0),"aria-label":`View tool metadata`,title:`View tool metadata`,children:[(0,W.jsx)(Fr,{className:`h-4 w-4`}),`Metadata`]}),(0,W.jsx)(Z$,{open:t,onOpenChange:n,children:(0,W.jsxs)(e1,{className:`sm:max-w-2xl`,children:[(0,W.jsx)(t1,{children:`Tool Metadata`}),(0,W.jsx)(`div`,{className:`text-xs`,children:(0,W.jsx)(xY,{src:e._meta,name:null,quotesOnKeys:!1,displayDataTypes:!1,displayObjectSize:!1,enableClipboard:!1,theme:`rjv-default`,style:{fontSize:`0.75rem`},collapsed:2,collapseStringsAfterLength:80})})]})})]}):null},r1={"ui:submitButtonOptions":{norender:!0}},i1=({schema:e,formData:t,setFormData:n,ref:r})=>!e?.properties||Object.keys(e.properties).length===0?(0,W.jsx)(`div`,{className:`flex items-center justify-center h-full`,children:(0,W.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`This tool requires no input`})}):(0,W.jsx)(qJ,{children:(0,W.jsx)(JJ,{children:(0,W.jsx)(AU,{ref:r,schema:e??{},validator:VF,uiSchema:r1,formData:t,onChange:e=>n(e.formData),showErrorList:!1,templates:{FieldTemplate:e=>{let{id:t,classNames:n,style:r,label:i,required:a,errors:o,children:s}=e;return(0,W.jsxs)(`div`,{className:VJ(`flex flex-col gap-2`,n),style:r,children:[(0,W.jsxs)(`label`,{htmlFor:t,className:`text-sm text-foreground`,children:[i,a&&(0,W.jsx)(`span`,{className:`text-destructive ml-1`,children:`*`})]}),(0,W.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[s,o]})]})},FieldErrorTemplate:e=>e.errors&&e.errors.length>0?(0,W.jsx)(`div`,{className:`text-sm text-destructive mt-1 flex items-center gap-1`,children:(0,W.jsx)(`span`,{children:e.errors.join(`, `)})}):null}})})}),a1=({formData:e,setFormData:t})=>{let[n,r]=(0,b.useState)(JSON.stringify(e,null,2));(0,b.useEffect)(()=>{r(JSON.stringify(e,null,2))},[e]);let i=e=>{r(e);try{t(JSON.parse(e))}catch{}};return(0,W.jsx)(`div`,{className:`flex flex-col gap-2`,children:(0,W.jsx)(`textarea`,{className:`w-full h-full p-2 rounded-md border border-border`,rows:12,value:n,onChange:e=>i(e.target.value)})})},o1=()=>{let e=(0,b.useRef)(null),t=UE(),{setToolData:n}=ow(),r=sw(t.name)?.input??{},i=e=>{n(t.name,{input:e??{}})};return(0,W.jsxs)(`div`,{className:VJ(`flex flex-col h-full overflow-hidden border-r border-border`),children:[(0,W.jsxs)(`div`,{className:`shrink-0 border-b border-border px-6 py-4 flex items-center justify-between h-[72px]`,children:[(0,W.jsx)(`h2`,{className:`font-semibold text-foreground`,children:t.name}),(0,W.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,W.jsx)(n1,{}),(0,W.jsx)(yY,{validateForm:async()=>e.current===null?!0:await e.current.validateForm(),formData:r})]})]}),(0,W.jsx)(`div`,{className:`flex-1 overflow-auto px-6 py-6 bg-muted/50`,children:(0,W.jsxs)(HJ,{defaultValue:`form`,children:[(0,W.jsxs)(WJ,{children:[(0,W.jsx)(GJ,{value:`form`,children:`Form`}),(0,W.jsx)(GJ,{value:`json`,children:`JSON`})]}),(0,W.jsx)(KJ,{value:`form`,children:(0,W.jsx)(i1,{schema:t.inputSchema,formData:r,setFormData:i,ref:e},t.name)}),(0,W.jsx)(KJ,{value:`json`,children:(0,W.jsx)(a1,{formData:r,setFormData:i},t.name)})]})})]})},s1=qr(`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 c1({className:e,orientation:t,...n}){return(0,W.jsx)(`div`,{role:`group`,"data-slot":`button-group`,"data-orientation":t,className:VJ(s1({orientation:t}),e),...n})}function l1({className:e,...t}){return(0,W.jsx)(`label`,{"data-slot":`label`,className:VJ(`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 u1({className:e,...t}){return(0,W.jsx)(`fieldset`,{"data-slot":`field-set`,className:VJ(`gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3 flex flex-col`,e),...t})}var d1=qr(`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 f1({className:e,orientation:t=`vertical`,...n}){return(0,W.jsx)(`div`,{role:`group`,"data-slot":`field`,"data-orientation":t,className:VJ(d1({orientation:t}),e),...n})}function p1({className:e,...t}){return(0,W.jsx)(l1,{"data-slot":`field-label`,className:VJ(`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})}var m1=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}({}),h1={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},g1={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},_1={disabled:!1,...g1},v1={valid(e){return e===null?null:e?{[m1.valid]:``}:{[m1.invalid]:``}}},y1=b.createContext({invalid:void 0,name:void 0,validityData:{state:h1,errors:[],error:``,value:``,initialValue:null},setValidityData:fW,disabled:void 0,touched:g1.touched,setTouched:fW,dirty:g1.dirty,setDirty:fW,filled:g1.filled,setFilled:fW,focused:g1.focused,setFocused:fW,validate:()=>null,validationMode:`onSubmit`,validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:_1,markedDirtyRef:{current:!1},validation:{getValidationProps:(e=mW)=>e,getInputValidationProps:(e=mW)=>e,inputRef:{current:null},commit:async()=>{}}});function b1(e=!0){let t=b.useContext(y1);if(t.setValidityData===fW&&!e)throw Error(BU(28));return t}var x1=b.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:fW,validationMode:`onSubmit`,submitAttemptedRef:{current:!1}});function S1(){return b.useContext(x1)}var C1=b.createContext({controlId:void 0,registerControlId:fW,labelId:void 0,setLabelId:fW,messageIds:[],setMessageIds:fW,getDescriptionProps:e=>e});function w1(){return b.useContext(C1)}function T1(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}function E1(e={}){let{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,registerControlId:a}=w1(),o=hG(t),s=n?i:void 0,c=NU(()=>Symbol(`labelable-control`)),l=b.useRef(!1),u=b.useRef(t!=null),d=IU(()=>{!l.current||a===fW||(l.current=!1,a(c.current,void 0))});return $(()=>{if(a===fW)return;let e;if(n){let n=r?.current;e=UW(n)&&n.closest(`label`)!=null?t??null:s??o}else if(t!=null)u.current=!0,e=t;else if(u.current)e=o;else{d();return}if(e===void 0){d();return}l.current=!0,a(c.current,e)},[t,r,s,a,n,o,c,d]),b.useEffect(()=>d,[d]),i??o}function D1(e){let{enabled:t=!0,value:n,id:r,name:i,controlRef:a,commit:o}=e,{formRef:s}=S1(),{invalid:c,markedDirtyRef:l,validityData:u,setValidityData:d}=b1(),f=IU(e.getValue);$(()=>{if(!t)return;let e=n;e===void 0&&(e=f()),u.initialValue===null&&e!==null&&d(t=>({...t,initialValue:e}))},[t,d,n,u.initialValue,f]),$(()=>{!t||!r||s.current.fields.set(r,{getValue:f,name:i,controlRef:a,validityData:T1(u,c),validate(e=!0){let t=n;t===void 0&&(t=f()),l.current=!0,e?PI.flushSync(()=>o(t)):o(t)}})},[o,a,t,s,f,r,c,l,i,u,n]),$(()=>{let e=s.current.fields;return()=>{r&&e.delete(r)}},[s,r])}var O1=b.forwardRef(function(e,t){let{render:n,className:r,id:i,name:a,value:o,disabled:s=!1,onValueChange:c,defaultValue:l,autoFocus:u=!1,...d}=e,{state:f,name:p,disabled:m,setTouched:h,setDirty:g,validityData:_,setFocused:v,setFilled:y,validationMode:x,validation:S}=b1(),C=m||s,w=p??a,T={...f,disabled:C},{labelId:E}=w1(),D=E1({id:i});$(()=>{let e=o!=null;S.inputRef.current?.value||e&&o!==``?y(!0):e&&o===``&&y(!1)},[S.inputRef,y,o]);let O=b.useRef(null);$(()=>{u&&O.current===aK(lG(O.current))&&v(!0)},[u,v]);let[k]=jU({controlled:o,default:l,name:`FieldControl`,state:`value`}),A=o!==void 0,j=A?k:void 0;return D1({id:D,name:w,commit:S.commit,value:j,getValue:()=>S.inputRef.current?.value,controlRef:S.inputRef}),bW(`input`,e,{ref:[t,O],state:T,props:[{id:D,disabled:C,name:w,ref:S.inputRef,"aria-labelledby":E,autoFocus:u,...A?{value:j}:{defaultValue:l},onChange(e){let t=e.currentTarget.value;c?.(t,BG(OG,e.nativeEvent)),g(t!==_.initialValue),y(t!==``)},onFocus(){v(!0)},onBlur(e){h(!0),v(!1),x===`onBlur`&&S.commit(e.currentTarget.value)},onKeyDown(e){e.currentTarget.tagName===`INPUT`&&e.key===`Enter`&&(h(!0),S.commit(e.currentTarget.value))}},S.getInputValidationProps(),d],stateAttributesMapping:v1})}),k1=b.forwardRef(function(e,t){return(0,W.jsx)(O1,{ref:t,...e})});function A1({className:e,type:t,...n}){return(0,W.jsx)(k1,{type:t,"data-slot":`input`,className:VJ(`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})}var j1=b.createContext(null),M1=b.createContext(null);function N1(){let e=b.useContext(j1);if(e===null)throw Error(BU(60));return e}function P1(){let e=b.useContext(M1);if(e===null)throw Error(BU(61));return e}var F1=(e,t)=>Object.is(e,t);function I1(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function L1(e,t,n){return!e||e.length===0?!1:e.some(e=>e===void 0?!1:I1(t,e,n))}function R1(e,t,n){return!e||e.length===0?-1:e.findIndex(e=>e===void 0?!1:I1(e,t,n))}function z1(e,t,n){return e.filter(e=>!I1(t,e,n))}function B1(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function V1(e){return e!=null&&e.length>0&&typeof e[0]==`object`&&e[0]!=null&&`items`in e[0]}function H1(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(V1(t)){for(let e of t)for(let t of e.items)if(t&&t.value==null&&t.label!=null)return!0;return!1}for(let e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function U1(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 B1(e)}function W1(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?B1(e.value):B1(e)}function G1(e,t,n){function r(){return U1(e,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]??r();if(Array.isArray(t)){let n=t,i=V1(n)?n.flatMap(e=>e.items):n;if(typeof e!=`object`||!e){let t=i.find(t=>t.value===e);return t&&t.label!=null?t.label:r()}if(`value`in e){let t=i.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return r()}function K1(e,t,n){return e.reduce((e,r,i)=>(i>0&&e.push(`, `),e.push((0,W.jsx)(b.Fragment,{children:G1(r,t,n)},i)),e),[])}var q1={id:gQ(e=>e.id),labelId:gQ(e=>e.labelId),modal:gQ(e=>e.modal),multiple:gQ(e=>e.multiple),items:gQ(e=>e.items),itemToStringLabel:gQ(e=>e.itemToStringLabel),itemToStringValue:gQ(e=>e.itemToStringValue),isItemEqualToValue:gQ(e=>e.isItemEqualToValue),value:gQ(e=>e.value),hasSelectedValue:gQ(e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:W1(t,r)!==``}),hasNullItemLabel:gQ((e,t)=>t?H1(e.items):!1),open:gQ(e=>e.open),mounted:gQ(e=>e.mounted),forceMount:gQ(e=>e.forceMount),transitionStatus:gQ(e=>e.transitionStatus),openMethod:gQ(e=>e.openMethod),activeIndex:gQ(e=>e.activeIndex),selectedIndex:gQ(e=>e.selectedIndex),isActive:gQ((e,t)=>e.activeIndex===t),isSelected:gQ((e,t,n)=>{let r=e.isItemEqualToValue,i=e.value;return e.multiple?Array.isArray(i)&&i.some(e=>I1(n,e,r)):e.selectedIndex===t&&e.selectedIndex!==null?!0:I1(n,i,r)}),isSelectedByFocus:gQ((e,t)=>e.selectedIndex===t),popupProps:gQ(e=>e.popupProps),triggerProps:gQ(e=>e.triggerProps),triggerElement:gQ(e=>e.triggerElement),positionerElement:gQ(e=>e.positionerElement),listElement:gQ(e=>e.listElement),scrollUpArrowVisible:gQ(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:gQ(e=>e.scrollDownArrowVisible),hasScrollArrows:gQ(e=>e.hasScrollArrows)};function J1(e){let{id:t,value:n,defaultValue:r=null,onValueChange:i,open:a,defaultOpen:o=!1,onOpenChange:s,name:c,autoComplete:l,disabled:u=!1,readOnly:d=!1,required:f=!1,modal:p=!0,actionsRef:m,inputRef:h,onOpenChangeComplete:g,items:_,multiple:v=!1,itemToStringLabel:y,itemToStringValue:x,isItemEqualToValue:S=F1,highlightItemOnHover:C=!0,children:w}=e,{clearErrors:T}=S1(),{setDirty:E,setTouched:D,setFocused:O,shouldValidateOnChange:k,validityData:A,setFilled:j,name:M,disabled:N,validation:P,validationMode:F}=b1(),I=E1({id:t}),L=N||u,R=M??c,[z,B]=jU({controlled:n,default:v?r??pW:r,name:`Select`,state:`value`}),[V,ee]=jU({controlled:a,default:o,name:`Select`,state:`open`}),H=b.useRef([]),te=b.useRef([]),U=b.useRef(null),ne=b.useRef(null),re=b.useRef(0),ie=b.useRef(null),ae=b.useRef([]),oe=b.useRef(!1),se=b.useRef(!1),ce=b.useRef(null),le=b.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),ue=b.useRef(!1),{mounted:de,setMounted:fe,transitionStatus:pe}=dJ(V),{openMethod:me,triggerProps:he}=W$(V),ge=NU(()=>new MQ({id:I,labelId:void 0,modal:p,multiple:v,itemToStringLabel:y,itemToStringValue:x,isItemEqualToValue:S,value:z,open:V,mounted:de,transitionStatus:pe,items:_,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,_e=OQ(ge,q1.activeIndex),ve=OQ(ge,q1.selectedIndex),ye=OQ(ge,q1.triggerElement),be=OQ(ge,q1.positionerElement),xe=b.useMemo(()=>v&&Array.isArray(z)&&z.length===0?``:W1(z,x),[v,z,x]),Se=b.useMemo(()=>v&&Array.isArray(z)?z.map(e=>W1(e,x)):W1(z,x),[v,z,x]),Ce=WY(ge.state.triggerElement);D1({id:I,commit:P.commit,value:z,controlRef:Ce,name:R,getValue:()=>Se});let we=b.useRef(z);$(()=>{z!==we.current&&ge.set(`forceMount`,!0)},[ge,z]),$(()=>{j(v?Array.isArray(z)&&z.length>0:z!=null)},[v,z,j]),$(function(){if(V)return;let e=ae.current;if(v){let t=Array.isArray(z)?z:[];if(t.length===0){ge.set(`selectedIndex`,null);return}let n=t[t.length-1],r=R1(e,n,S);ge.set(`selectedIndex`,r===-1?null:r);return}let t=R1(e,z,S);ge.set(`selectedIndex`,t===-1?null:t)},[v,V,z,ae,S,ge]),U$(z,()=>{T(R),E(z!==A.initialValue),k()?P.commit(z):P.commit(z,!0)});let Te=IU((e,t)=>{if(s?.(e,t),!t.isCanceled&&(ee(e),!e&&(t.reason===`focus-out`||t.reason===`outside-press`)&&(D(!0),O(!1),F===`onBlur`&&P.commit(z)),!e&&ge.state.activeIndex!==null)){let e=H.current[ge.state.activeIndex];queueMicrotask(()=>{e?.setAttribute(`tabindex`,`-1`)})}}),Ee=IU(()=>{fe(!1),ge.set(`activeIndex`,null),g?.(!1)});uJ({enabled:!m,open:V,ref:U,onComplete(){V||Ee()}}),b.useImperativeHandle(m,()=>({unmount:Ee}),[Ee]);let De=IU((e,t)=>{i?.(e,t),!t.isCanceled&&B(e)}),Oe=IU(()=>{let e=ge.state.listElement||U.current;if(!e)return;let t=e.scrollTop,n=e.scrollTop+e.clientHeight,r=t>1,i=n<e.scrollHeight-1;ge.state.scrollUpArrowVisible!==r&&ge.set(`scrollUpArrowVisible`,r),ge.state.scrollDownArrowVisible!==i&&ge.set(`scrollDownArrowVisible`,i)}),ke=GQ({open:V,onOpenChange:Te,elements:{reference:ye,floating:be}}),{getReferenceProps:Ae,getFloatingProps:je,getItemProps:Me}=r$([FX(ke,{enabled:!d&&!L,event:`mousedown`}),zX(ke,{bubbles:!1}),f$(ke,{enabled:!d&&!L,listRef:H,activeIndex:_e,selectedIndex:ve,disabledIndices:pW,onNavigate(e){e===null&&!V||ge.set(`activeIndex`,e)},focusItemOnHover:!1}),h$(ke,{enabled:!d&&!L&&(V||!v),listRef:te,activeIndex:_e,selectedIndex:ve,onMatch(e){V?ge.set(`activeIndex`,e):De(ae.current[e],BG(`none`))},onTypingChange(e){oe.current=e}})]),Ne=b.useMemo(()=>tW(Ae(),he,I?{id:I}:mW),[Ae,he,I]);M$(()=>{ge.update({popupProps:je(),triggerProps:Ne})}),$(()=>{ge.update({id:I,modal:p,multiple:v,value:z,open:V,mounted:de,transitionStatus:pe,popupProps:je(),triggerProps:Ne,items:_,itemToStringLabel:y,itemToStringValue:x,isItemEqualToValue:S,openMethod:me})},[ge,I,p,v,z,V,de,pe,je,Ne,_,y,x,S,me]);let Pe=b.useMemo(()=>({store:ge,name:R,required:f,disabled:L,readOnly:d,multiple:v,itemToStringLabel:y,itemToStringValue:x,highlightItemOnHover:C,setValue:De,setOpen:Te,listRef:H,popupRef:U,scrollHandlerRef:ne,handleScrollArrowVisibility:Oe,scrollArrowsMountedCountRef:re,getItemProps:Me,events:ke.context.events,valueRef:ie,valuesRef:ae,labelsRef:te,typingRef:oe,selectionRef:le,selectedItemTextRef:ce,validation:P,onOpenChangeComplete:g,keyboardActiveRef:se,alignItemWithTriggerActiveRef:ue,initialValueRef:we}),[ge,R,f,L,d,v,y,x,C,De,Te,Me,ke.context.events,P,g,Oe]),Fe=VU(h,P.inputRef),Ie=v&&Array.isArray(z)&&z.length>0,Le=v?void 0:R,Re=b.useMemo(()=>!v||!Array.isArray(z)||!R?null:z.map(e=>{let t=W1(e,x);return(0,W.jsx)(`input`,{type:`hidden`,name:R,value:t},t)}),[v,z,R,x]);return(0,W.jsx)(j1.Provider,{value:Pe,children:(0,W.jsxs)(M1.Provider,{value:ke,children:[w,(0,W.jsx)(`input`,{...P.getInputValidationProps({onFocus(){ge.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented)return;let t=e.target.value,n=BG(OG,e.nativeEvent);function r(){if(v)return;let e=ae.current.find(e=>W1(e,x).toLowerCase()===t.toLowerCase());e!=null&&(E(e!==A.initialValue),De(e,n),k()&&P.commit(e))}ge.set(`forceMount`,!0),queueMicrotask(r)}}),id:I&&Le==null?`${I}-hidden-input`:void 0,name:Le,autoComplete:l,value:xe,disabled:L,required:f&&!Ie,readOnly:d,ref:Fe,style:R?JY:qY,tabIndex:-1,"aria-hidden":!0}),Re]})})}function Y1(e,t){return e??t}function X1(e){let t=e.getBoundingClientRect(),n=window.getComputedStyle(e,`::before`),r=window.getComputedStyle(e,`::after`);if(!(n.content!==`none`||r.content!==`none`))return t;let i=parseFloat(n.width)||0,a=parseFloat(n.height)||0,o=parseFloat(r.width)||0,s=parseFloat(r.height)||0,c=Math.max(t.width,i,o),l=Math.max(t.height,a,s),u=c-t.width,d=l-t.height;return{left:t.left-u/2,right:t.right+u/2,top:t.top-d/2,bottom:t.bottom+d/2}}var Z1=2,Q1=400,$1=200,e0={...MY,...v1,value:()=>null},t0=b.forwardRef(function(e,t){let{render:n,className:r,id:i,disabled:a=!1,nativeButton:o=!0,...s}=e,{setTouched:c,setFocused:l,validationMode:u,state:d,disabled:f}=b1(),{labelId:p}=w1(),{store:m,setOpen:h,selectionRef:g,validation:_,readOnly:v,required:y,alignItemWithTriggerActiveRef:x,disabled:S,keyboardActiveRef:C}=N1(),w=f||S||a,T=OQ(m,q1.open),E=OQ(m,q1.value),D=OQ(m,q1.triggerProps),O=OQ(m,q1.positionerElement),k=OQ(m,q1.listElement),A=OQ(m,q1.id),j=OQ(m,q1.labelId),M=OQ(m,q1.hasSelectedValue),N=!M&&T,P=OQ(m,q1.hasNullItemLabel,N),F=i??A,I=Y1(p,j);E1({id:F});let L=WY(O),R=b.useRef(null),{getButtonProps:z,buttonRef:B}=yG({disabled:w,native:o}),V=VU(t,R,B,IU(e=>{m.set(`triggerElement`,e)})),ee=zY(),H=zY(),te=zY(),U=zY();b.useEffect(()=>{if(T)return M||P?U.start($1,()=>{g.current.allowUnselectedMouseUp=!0,te.start($1,()=>{g.current.allowSelectedMouseUp=!0})}):te.start(Q1,()=>{g.current.allowUnselectedMouseUp=!0,g.current.allowSelectedMouseUp=!0}),()=>{te.clear(),U.clear()};g.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},H.clear()},[T,M,P,g,H,te,U]);let ne=b.useMemo(()=>k?.id??pK(O)?.id,[k,O]),re=tW(D,{id:F,role:`combobox`,"aria-expanded":T?`true`:`false`,"aria-haspopup":`listbox`,"aria-controls":T?ne:void 0,"aria-labelledby":I,"aria-readonly":v||void 0,"aria-required":y||void 0,tabIndex:w?-1:0,ref:V,onFocus(e){l(!0),T&&x.current&&h(!1,BG(OG,e.nativeEvent)),ee.start(0,()=>{m.set(`forceMount`,!0)})},onBlur(e){oK(O,e.relatedTarget)||(c(!0),l(!1),u===`onBlur`&&_.commit(E))},onPointerMove(){C.current=!1},onKeyDown(){C.current=!0},onMouseDown(e){if(T)return;let t=lG(e.currentTarget);function n(e){if(!R.current)return;let t=e.target;if(oK(R.current,t)||oK(L.current,t)||t===R.current)return;let n=X1(R.current);e.clientX>=n.left-Z1&&e.clientX<=n.right+Z1&&e.clientY>=n.top-Z1&&e.clientY<=n.bottom+Z1||h(!1,BG(LG,e))}H.start(0,()=>{t.addEventListener(`mouseup`,n,{once:!0})})}},_.getValidationProps,s,z);re.role=`combobox`;let ie={...d,open:T,disabled:w,value:E,readOnly:v,placeholder:!M};return bW(`button`,e,{ref:[t,R],state:ie,stateAttributesMapping:e0,props:re})}),n0={value:()=>null},r0=b.forwardRef(function(e,t){let{className:n,render:r,children:i,placeholder:a,...o}=e,{store:s,valueRef:c}=N1(),l=OQ(s,q1.value),u=OQ(s,q1.items),d=OQ(s,q1.itemToStringLabel),f=OQ(s,q1.hasSelectedValue),p=!f&&a!=null&&i==null,m=OQ(s,q1.hasNullItemLabel,p),h={value:l,placeholder:!f},g=null;return g=typeof i==`function`?i(l):i??(!f&&a!=null&&!m?a:Array.isArray(l)?K1(l,u,d):G1(l,u,d)),bW(`span`,e,{state:h,ref:[t,c],props:[{children:g},o],stateAttributesMapping:n0})}),i0=b.forwardRef(function(e,t){let{className:n,render:r,...i}=e,{store:a}=N1();return bW(`span`,e,{state:{open:OQ(a,q1.open)},ref:t,props:[{"aria-hidden":!0,children:`▼`},i],stateAttributesMapping:jY})}),a0=b.createContext(void 0),o0=b.forwardRef(function(e,t){let{store:n}=N1(),r=OQ(n,q1.mounted),i=OQ(n,q1.forceMount);return r||i?(0,W.jsx)(a0.Provider,{value:!0,children:(0,W.jsx)(hX,{ref:t,...e})}):null}),s0=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0,offsetParent:d=`real`}=AK(e,t)||{};if(l==null)return{};let f=JK(u),p={x:n,y:r},m=IK(i),h=PK(m),g=await o.getDimensions(l),_=m===`y`,v=_?`top`:`left`,y=_?`bottom`:`right`,b=_?`clientHeight`:`clientWidth`,x=a.reference[h]+a.reference[m]-p[m]-a.floating[h],S=p[m]-a.reference[m],C=d===`real`?await o.getOffsetParent?.(l):s.floating,w=s.floating[b]||a.floating[h];(!w||!await o.isElement?.(C))&&(w=s.floating[b]||a.floating[h]);let T=x/2-S/2,E=w/2-g[h]/2-1,D=Math.min(f[v],E),O=Math.min(f[y],E),k=D,A=w-g[h]-O,j=w/2-g[h]/2+T,M=kK(k,j,A),N=!c.arrow&&MK(i)!=null&&j!==M&&a.reference[h]/2-(j<k?D:O)-g[h]/2<0,P=N?j<k?j-k:j-A:0;return{[m]:p[m]+P,data:{[m]:M,centerOffset:j-M-P,...N&&{alignmentOffset:P}},reset:N}}}),c0=(e,t)=>({...s0(e),options:[e,t]}),l0={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0;return{data:{referenceHidden:(await JZ().fn(e)).data?.referenceHidden||a}}}},u0={sideX:`left`,sideY:`top`},d0={name:`adaptiveOrigin`,async fn(e){let{x:t,y:n,rects:{floating:r},elements:{floating:i},platform:a,strategy:o,placement:s}=e,c=BW(i),l=c.getComputedStyle(i);if(!(l.transitionDuration!==`0s`&&l.transitionDuration!==``))return{x:t,y:n,data:u0};let u=await a.getOffsetParent?.(i),d={width:0,height:0};if(o===`fixed`&&c?.visualViewport)d={width:c.visualViewport.width,height:c.visualViewport.height};else if(u===c){let e=lG(i);d={width:e.documentElement.clientWidth,height:e.documentElement.clientHeight}}else await a.isElement?.(u)&&(d=await a.getDimensions(u));let f=jK(s),p=t,m=n;f===`left`&&(p=d.width-(t+r.width)),f===`top`&&(m=d.height-(n+r.height));let h=f===`left`?`right`:u0.sideX,g=f===`top`?`bottom`:u0.sideY;return{x:p,y:m,data:{sideX:h,sideY:g}}}};function f0(e,t,n){let 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 p0(e,t,n){let{rects:r,placement:i}=e;return{side:f0(t,jK(i),n),align:MK(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function m0(e){let{anchor:t,positionMethod:n=`absolute`,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,collisionBoundary:s,collisionPadding:c=5,sticky:l=!1,arrowPadding:u=5,disableAnchorTracking:d=!1,keepMounted:f=!1,floatingRootContext:p,mounted:m,collisionAvoidance:h,shiftCrossAxis:g=!1,nodeId:_,adaptiveOrigin:v,lazyFlip:y=!1,externalTree:x}=e,[S,C]=b.useState(null);!m&&S!==null&&C(null);let w=h.side||`flip`,T=h.align||`flip`,E=h.fallbackAxisSide||`end`,D=typeof t==`function`?t:void 0,O=IU(D),k=D?O:t,A=WY(t),j=MW()===`rtl`,M=S||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":j?`left`:`right`,"inline-start":j?`right`:`left`}[r],N=a===`center`?M:`${M}-${a}`,P=c,F=r===`bottom`?1:0,I=r===`top`?1:0,L=r===`right`?1:0,R=r===`left`?1:0;typeof P==`number`?P={top:P+F,right:P+R,bottom:P+I,left:P+L}:P&&={top:(P.top||0)+F,right:(P.right||0)+R,bottom:(P.bottom||0)+I,left:(P.left||0)+L};let z={boundary:s===`clipping-ancestors`?`clippingAncestors`:s,padding:P},B=b.useRef(null),V=WY(i),ee=WY(o),H=[UZ(e=>{let t=p0(e,r,j),n=typeof V.current==`function`?V.current(t):V.current,i=typeof ee.current==`function`?ee.current(t):ee.current;return{mainAxis:n,crossAxis:i,alignmentAxis:i}},[typeof i==`function`?0:i,typeof o==`function`?0:o,j,r])],te=T===`none`&&w!==`shift`,U=!te&&(l||g||w===`shift`),ne=w===`none`?null:KZ({...z,padding:{top:P.top+1,right:P.right+1,bottom:P.bottom+1,left:P.left+1},mainAxis:!g&&w===`flip`,crossAxis:T===`flip`?`alignment`:!1,fallbackAxisSideDirection:E}),re=te?null:WZ(e=>{let t=lG(e.elements.floating).documentElement;return{...z,rootBoundary:g?{x:0,y:0,width:t.clientWidth,height:t.clientHeight}:void 0,mainAxis:T!==`none`,crossAxis:U,limiter:l||g?void 0:GZ(e=>{if(!B.current)return{};let{width:t,height:n}=B.current.getBoundingClientRect(),r=FK(jK(e.placement)),i=r===`y`?t:n,a=r===`y`?P.left+P.right:P.top+P.bottom;return{offset:i/2+a/2}})}},[z,l,g,P,T]);w===`shift`||T===`shift`||a===`center`?H.push(re,ne):H.push(ne,re),H.push(qZ({...z,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){let i=e.style;i.setProperty(`--available-width`,`${t}px`),i.setProperty(`--available-height`,`${n}px`);let a=window.devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(`--anchor-width`,`${u}px`),i.setProperty(`--anchor-height`,`${d}px`)}}),c0(()=>({element:B.current||document.createElement(`div`),padding:u,offsetParent:`floating`}),[u]),{name:`transformOrigin`,fn(e){let{elements:t,middlewareData:n,placement:a,rects:o,y:s}=e,c=jK(a),l=FK(c),u=B.current,d=n.arrow?.x||0,f=n.arrow?.y||0,p=u?.clientWidth||0,m=u?.clientHeight||0,h=d+p/2,g=f+m/2,_=Math.abs(n.shift?.y||0),v=o.reference.height/2,y=typeof i==`function`?i(p0(e,r,j)):i,b=_>y,x={top:`${h}px calc(100% + ${y}px)`,bottom:`${h}px ${-y}px`,left:`calc(100% + ${y}px) ${g}px`,right:`${-y}px ${g}px`}[c],S=`${h}px ${o.reference.y+v-s}px`;return t.floating.style.setProperty(`--transform-origin`,U&&l===`y`&&b?S:x),{}}},l0,v),$(()=>{!m&&p&&p.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[m,p]);let ie=b.useMemo(()=>({elementResize:!d&&typeof ResizeObserver<`u`,layoutShift:!d&&typeof IntersectionObserver<`u`}),[d]),{refs:ae,elements:oe,x:se,y:ce,middlewareData:le,update:ue,placement:de,context:fe,isPositioned:pe,floatingStyles:me}=KQ({rootContext:p,placement:N,middleware:H,strategy:n,whileElementsMounted:f?void 0:(...e)=>kZ(...e,ie),nodeId:_,externalTree:x}),{sideX:he,sideY:ge}=le.adaptiveOrigin||u0,_e=pe?n:`fixed`,ve=b.useMemo(()=>{let e=v?{position:_e,[he]:se,[ge]:ce}:{position:_e,...me};return pe||(e.opacity=0),e},[v,_e,he,se,ge,ce,me,pe]),ye=b.useRef(null);$(()=>{if(!m)return;let e=A.current,t=typeof e==`function`?e():e,n=(h0(t)?t.current:t)||null;n!==ye.current&&(ae.setPositionReference(n),ye.current=n)},[m,ae,k,A]),b.useEffect(()=>{if(!m)return;let e=A.current;typeof e!=`function`&&h0(e)&&e.current!==ye.current&&(ae.setPositionReference(e.current),ye.current=e.current)},[m,ae,k,A]),b.useEffect(()=>{if(f&&m&&oe.domReference&&oe.floating)return kZ(oe.domReference,oe.floating,ue,ie)},[f,m,oe,ue,ie]);let be=jK(de),xe=f0(r,be,j),Se=MK(de)||`center`,Ce=!!le.hide?.referenceHidden;$(()=>{y&&m&&pe&&C(be)},[y,m,pe,be]);let we=b.useMemo(()=>({position:`absolute`,top:le.arrow?.y,left:le.arrow?.x}),[le.arrow]),Te=le.arrow?.centerOffset!==0;return b.useMemo(()=>({positionerStyles:ve,arrowStyles:we,arrowRef:B,arrowUncentered:Te,side:xe,align:Se,physicalSide:be,anchorHidden:Ce,refs:ae,context:fe,isPositioned:pe,update:ue}),[ve,we,B,Te,xe,Se,be,Ce,ae,fe,pe,ue])}function h0(e){return e!=null&&`current`in e}var g0=b.createContext(void 0);function _0(){let e=b.useContext(g0);if(!e)throw Error(BU(59));return e}function v0(e){return e===`starting`?hW:mW}function y0(e,t){e&&Object.assign(e.style,t)}var b0={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`},x0={position:`fixed`},S0=b.forwardRef(function(e,t){let{anchor:n,positionMethod:r=`absolute`,className:i,render:a,side:o=`bottom`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m,alignItemWithTrigger:h=!0,collisionAvoidance:g=_W,..._}=e,{store:v,listRef:y,labelsRef:x,alignItemWithTriggerActiveRef:S,selectedItemTextRef:C,valuesRef:w,initialValueRef:T,popupRef:E,setValue:D}=N1(),O=P1(),k=OQ(v,q1.open),A=OQ(v,q1.mounted),j=OQ(v,q1.modal),M=OQ(v,q1.value),N=OQ(v,q1.openMethod),P=OQ(v,q1.positionerElement),F=OQ(v,q1.triggerElement),I=OQ(v,q1.isItemEqualToValue),L=OQ(v,q1.transitionStatus),R=b.useRef(null),z=b.useRef(null),[B,V]=b.useState(h),ee=A&&B&&N!==`touch`;!A&&B!==h&&V(h),$(()=>{A||(q1.scrollUpArrowVisible(v.state)&&v.set(`scrollUpArrowVisible`,!1),q1.scrollDownArrowVisible(v.state)&&v.set(`scrollDownArrowVisible`,!1))},[v,A]),b.useImperativeHandle(S,()=>ee),V$((ee||j)&&k&&N!==`touch`,F);let H=m0({anchor:n,floatingRootContext:O,positionMethod:r,mounted:A,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m??ee,collisionAvoidance:g,keepMounted:!0}),te=ee?`none`:H.side,U=ee?x0:H.positionerStyles,ne=b.useMemo(()=>{let e={};return k||(e.pointerEvents=`none`),{role:`presentation`,hidden:!A,style:{...U,...e}}},[k,A,U]),re={open:k,side:te,align:H.align,anchorHidden:H.anchorHidden},ie=bW(`div`,e,{ref:[t,IU(e=>{v.set(`positionerElement`,e)})],state:re,stateAttributesMapping:NY,props:[ne,v0(L),_]}),ae=b.useRef(0),oe=IU(e=>{if(e.size===0&&ae.current===0||w.current.length===0)return;let t=ae.current;if(ae.current=e.size,e.size===t)return;let n=BG(OG);if(t!==0&&!v.state.multiple&&M!==null&&R1(w.current,M,I)===-1){let e=T.current,t=e!=null&&R1(w.current,e,I)!==-1?e:null;D(t,n),t===null&&(v.set(`selectedIndex`,null),C.current=null)}if(t!==0&&v.state.multiple&&Array.isArray(M)){let e=e=>R1(w.current,e,I)!==-1,t=M.filter(t=>e(t));(t.length!==M.length||t.some(e=>!L1(M,e,I)))&&(D(t,n),t.length===0&&(v.set(`selectedIndex`,null),C.current=null))}if(k&&ee){v.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};y0(P,e),y0(E.current,e)}}),se=b.useMemo(()=>({...H,side:te,alignItemWithTriggerActive:ee,setControlledAlignItemWithTrigger:V,scrollUpArrowRef:R,scrollDownArrowRef:z}),[H,te,ee,V]);return(0,W.jsx)(DW,{elementsRef:y,labelsRef:x,onMapChange:oe,children:(0,W.jsxs)(g0.Provider,{value:se,children:[A&&j&&(0,W.jsx)(A$,{inert:$q(!k),cutout:F}),ie]})})});function C0(e){let 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}var w0=`base-ui-disable-scrollbar`,T0={className:w0,getElement(e){return(0,W.jsx)(`style`,{nonce:e,href:w0,precedence:`base-ui:low`,children:`.${w0}{scrollbar-width:none}.${w0}::-webkit-scrollbar{display:none}`})}},E0=b.createContext(void 0);function D0(e){let t=b.useContext(E0);if(t===void 0&&!e)throw Error(BU(69));return t}function O0(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}var k0=1,A0={...NY,...rJ},j0=b.forwardRef(function(e,t){let{render:n,className:r,finalFocus:i,...a}=e,{store:o,popupRef:s,onOpenChangeComplete:c,setOpen:l,valueRef:u,selectedItemTextRef:d,keyboardActiveRef:f,multiple:p,handleScrollArrowVisibility:m,scrollHandlerRef:h,highlightItemOnHover:g}=N1(),{side:_,align:v,alignItemWithTriggerActive:y,setControlledAlignItemWithTrigger:x,scrollDownArrowRef:S,scrollUpArrowRef:C}=_0(),w=D0(!0)!=null,T=P1(),{nonce:E,disableStyleElements:D}=Qq(),O=zY(),k=OQ(o,q1.id),A=OQ(o,q1.open),j=OQ(o,q1.mounted),M=OQ(o,q1.popupProps),N=OQ(o,q1.transitionStatus),P=OQ(o,q1.triggerElement),F=OQ(o,q1.positionerElement),I=OQ(o,q1.listElement),L=b.useRef(0),R=b.useRef(!1),z=b.useRef(0),B=b.useRef(!1),V=b.useRef({}),ee=sJ(),H=IU(e=>{if(!F||!s.current||!B.current)return;if(R.current||!y){m();return}let t=F.style.top===`0px`,n=F.style.bottom===`0px`,r=F.getBoundingClientRect().height,i=lG(F),a=getComputedStyle(F),o=parseFloat(a.marginTop),c=parseFloat(a.marginBottom),l=M0(getComputedStyle(s.current)),u=Math.min(i.documentElement.clientHeight-o-c,l),d=e.scrollTop,f=N0(e),p=0,h=null,g=!1,_=!1,v=e=>{F.style.height=`${e}px`},b=(t,n)=>{let i=O0(t,0,u-r);i>0&&v(r+i),e.scrollTop=n,u-(r+i)<=k0&&(R.current=!0),m()};if(t){let e=f-d,t=r+e,n=Math.min(t,u);if(p=n,e<=k0){b(e,f);return}u-n>k0?_=!0:g=!0}else if(n){let e=d,t=r+e,n=Math.min(t,u),i=t-u;if(p=n,e<=k0){b(e,0);return}u-n>k0?h=0:(g=!0,d<f&&(h=d-(e-i)))}if(p=Math.ceil(p),p!==0&&v(p),_||h!=null){let t=N0(e),n=_?t:O0(h,0,t);Math.abs(e.scrollTop-n)>k0&&(e.scrollTop=n)}(g||p>=u-k0)&&(R.current=!0),m()});b.useImperativeHandle(h,()=>H,[H]),uJ({open:A,ref:s,onComplete(){A&&c?.(!0)}});let te={open:A,transitionStatus:N,side:_,align:v};$(()=>{!F||!s.current||Object.keys(V.current).length||(V.current={top:F.style.top||`0`,left:F.style.left||`0`,right:F.style.right,height:F.style.height,bottom:F.style.bottom,minHeight:F.style.minHeight,maxHeight:F.style.maxHeight,marginTop:F.style.marginTop,marginBottom:F.style.marginBottom})},[s,F]),$(()=>{A||y||(B.current=!1,R.current=!1,L.current=0,z.current=0,y0(F,V.current))},[A,y,F,s]),$(()=>{let e=s.current;if(!(!A||!P||!F||!e||o.state.transitionStatus===`ending`)){if(!y){B.current=!0,ee.request(m),e.style.removeProperty(`--transform-origin`);return}queueMicrotask(()=>{let t=L0(e);e.style.removeProperty(`--transform-origin`);try{let t=getComputedStyle(F),n=getComputedStyle(e),r=lG(P),i=BW(F),a=P0(P),o=F0(P.getBoundingClientRect(),a),s=F0(F.getBoundingClientRect(),a),c=o.left,l=o.height,f=I||e,p=f.scrollHeight,h=parseFloat(n.borderBottomWidth),g=parseFloat(t.marginTop)||10,_=parseFloat(t.marginBottom)||10,v=parseFloat(t.minHeight)||100,y=M0(n),b=r.documentElement.clientHeight-g-_,S=r.documentElement.clientWidth,C=b-o.bottom+l,w=d.current,T=u.current,E,D=0,O=0;if(w&&T){let e=F0(T.getBoundingClientRect(),a);E=F0(w.getBoundingClientRect(),a);let t=e.left-c,n=E.left-s.left,r=e.top-o.top+e.height/2,i=E.top-s.top+E.height/2;D=t-n,O=i-r}let k=C+O+_+h,A=Math.min(b,k),j=b-g-_,M=k-A,N=Math.max(5,c+D),z=S-5,ee=Math.max(0,N+s.width-z);F.style.left=`${N-ee}px`,F.style.height=`${A}px`,F.style.maxHeight=`auto`,F.style.marginTop=`${g}px`,F.style.marginBottom=`${_}px`,e.style.height=`100%`;let H=N0(f),te=M>=H-k0;te&&(A=Math.min(b,s.height)-(M-H));let U=o.top<20||o.bottom>b-20||Math.ceil(A)+k0<Math.min(p,v),ne=(i.visualViewport?.scale??1)!==1&&GG;if(U||ne){B.current=!0,y0(F,V.current),PI.flushSync(()=>x(!1));return}if(te){let e=Math.max(0,b-k);F.style.top=s.height>=j?`0`:`${e}px`,F.style.height=`${A}px`,f.scrollTop=N0(f),L.current=Math.max(v,A)}else F.style.bottom=`0`,L.current=Math.max(v,A),f.scrollTop=M;if(E){let t=s.top,n=s.height,r=E.top+E.height/2,i=O0(n>0?(r-t)/n*100:50,0,100);e.style.setProperty(`--transform-origin`,`50% ${i}%`)}(L.current===b||A>=y)&&(R.current=!0),m(),setTimeout(()=>{B.current=!0})}finally{t()}})}},[o,A,F,P,u,d,s,m,y,x,ee,S,C,I]),b.useEffect(()=>{if(!y||!F||!A)return;let e=BW(F);function t(e){l(!1,BG(zG,e))}return e.addEventListener(`resize`,t),()=>{e.removeEventListener(`resize`,t)}},[l,y,F,A]);let U={...I?{role:`presentation`,"aria-orientation":void 0}:{role:`listbox`,"aria-multiselectable":p||void 0,id:`${k}-list`},onKeyDown(e){f.current=!0,w&&DJ.has(e.key)&&e.stopPropagation()},onMouseMove(){f.current=!1},onPointerLeave(e){if(!g||C0(e)||e.pointerType===`touch`)return;let t=e.currentTarget;O.start(0,()=>{o.set(`activeIndex`,null),t.focus({preventScroll:!0})})},onScroll(e){I||H(e.currentTarget)},...y&&{style:I?{height:`100%`}:b0}},ne=bW(`div`,e,{ref:[t,s],state:te,stateAttributesMapping:A0,props:[M,U,v0(N),{className:!I&&y?T0.className:void 0},a]});return(0,W.jsxs)(b.Fragment,{children:[!D&&T0.getElement(E),(0,W.jsx)(PX,{context:T,modal:!1,disabled:!j,returnFocus:i,restoreFocus:!0,children:ne})]})});function M0(e){let t=e.maxHeight||``;return t.endsWith(`px`)&&parseFloat(t)||1/0}function N0(e){return Math.max(0,e.scrollHeight-e.clientHeight)}function P0(e){return EZ.getScale(e)}function F0(e,t){return YK({x:e.x/t.x,y:e.y/t.y,width:e.width/t.x,height:e.height/t.y})}var I0=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]];function L0(e){let{style:t}=e,n={};for(let[e,r]of I0)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of I0){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var R0=b.forwardRef(function(e,t){let{className:n,render:r,...i}=e,{store:a,scrollHandlerRef:o}=N1(),{alignItemWithTriggerActive:s}=_0(),c=OQ(a,q1.hasScrollArrows),l=OQ(a,q1.openMethod),u=OQ(a,q1.multiple),d={id:`${OQ(a,q1.id)}-list`,role:`listbox`,"aria-multiselectable":u||void 0,onScroll(e){o.current?.(e.currentTarget)},...s&&{style:b0},className:c&&l!==`touch`?T0.className:void 0};return bW(`div`,e,{ref:[t,IU(e=>{a.set(`listElement`,e)})],props:[d,i]})}),z0=b.createContext(void 0);function B0(){let e=b.useContext(z0);if(!e)throw Error(BU(57));return e}var V0=b.memo(b.forwardRef(function(e,t){let{render:n,className:r,value:i=null,label:a,disabled:o=!1,nativeButton:s=!1,...c}=e,l=b.useRef(null),u=wG({label:a,textRef:l,indexGuessBehavior:CG.GuessFromOrder}),{store:d,getItemProps:f,setOpen:p,setValue:m,selectionRef:h,typingRef:g,valuesRef:_,keyboardActiveRef:v,multiple:y,highlightItemOnHover:x}=N1(),S=zY(),C=OQ(d,q1.isActive,u.index),w=OQ(d,q1.isSelected,u.index,i),T=OQ(d,q1.isSelectedByFocus,u.index),E=OQ(d,q1.isItemEqualToValue),D=u.index,O=D!==-1,k=b.useRef(null),A=WY(D);$(()=>{if(!O)return;let e=_.current;return e[D]=i,()=>{delete e[D]}},[O,D,i,_]),$(()=>{if(!O)return;let e=d.state.value,t=e;y&&Array.isArray(e)&&e.length>0&&(t=e[e.length-1]),t!==void 0&&I1(i,t,E)&&d.set(`selectedIndex`,D)},[O,D,y,E,d,i]);let j={disabled:o,selected:w,highlighted:C},M=f({active:C,selected:w});M.onFocus=void 0,M.id=void 0;let N=b.useRef(null),P=b.useRef(`mouse`),F=b.useRef(!1),{getButtonProps:I,buttonRef:L}=yG({disabled:o,focusableWhenDisabled:!0,native:s,composite:!0});function R(e){let t=d.state.value;if(y){let n=Array.isArray(t)?t:[];m(w?z1(n,i,E):[...n,i],BG(MG,e))}else m(i,BG(MG,e)),p(!1,BG(MG,e))}let z={role:`option`,"aria-selected":w,tabIndex:C?0:-1,onFocus(){d.set(`activeIndex`,D)},onMouseEnter(){!v.current&&d.state.selectedIndex===null&&x&&d.set(`activeIndex`,D)},onMouseMove(){x&&d.set(`activeIndex`,D)},onMouseLeave(e){!x||v.current||C0(e)||S.start(0,()=>{d.state.activeIndex===D&&d.set(`activeIndex`,null)})},onTouchStart(){h.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(e){N.current=e.key,d.set(`activeIndex`,D),e.key===` `&&g.current&&e.preventDefault()},onClick(e){F.current=!1,!(e.type===`keydown`&&N.current===null)&&(o||e.type===`keydown`&&N.current===` `&&g.current||P.current!==`touch`&&!C||(N.current=null,R(e.nativeEvent)))},onPointerEnter(e){P.current=e.pointerType},onPointerDown(e){P.current=e.pointerType,F.current=!0},onMouseUp(){if(o)return;if(F.current){F.current=!1;return}let e=!h.current.allowSelectedMouseUp&&w,t=!h.current.allowUnselectedMouseUp&&!w;e||t||P.current!==`touch`&&!C||k.current?.click()}},B=bW(`div`,e,{ref:[L,t,u.ref,k],state:j,props:[M,z,c,I]}),V=b.useMemo(()=>({selected:w,indexRef:A,textRef:l,selectedByFocus:T,hasRegistered:O}),[w,A,l,T,O]);return(0,W.jsx)(z0.Provider,{value:V,children:B})})),H0=b.forwardRef(function(e,t){let n=e.keepMounted??!1,{selected:r}=B0();return n||r?(0,W.jsx)(U0,{...e,ref:t}):null}),U0=b.memo(b.forwardRef((e,t)=>{let{render:n,className:r,keepMounted:i,...a}=e,{selected:o}=B0(),s=b.useRef(null),{transitionStatus:c,setMounted:l}=dJ(o),u=bW(`span`,e,{ref:[t,s],state:{selected:o,transitionStatus:c},props:[{"aria-hidden":!0,children:`✔️`},a],stateAttributesMapping:rJ});return uJ({open:o,ref:s,onComplete(){o||l(!1)}}),u})),W0=b.memo(b.forwardRef(function(e,t){let{indexRef:n,textRef:r,selectedByFocus:i,hasRegistered:a}=B0(),{selectedItemTextRef:o}=N1(),{className:s,render:c,...l}=e;return bW(`div`,e,{ref:[b.useCallback(e=>{if(!e||!a)return;let t=o.current===null||!o.current.isConnected;(i||t&&n.current===0)&&(o.current=e)},[o,n,i,a]),t,r],props:l})})),G0=b.forwardRef(function(e,t){let{render:n,className:r,direction:i,keepMounted:a=!1,...o}=e,{store:s,popupRef:c,listRef:l,handleScrollArrowVisibility:u,scrollArrowsMountedCountRef:d}=N1(),{side:f,scrollDownArrowRef:p,scrollUpArrowRef:m}=_0(),h=OQ(s,i===`up`?q1.scrollUpArrowVisible:q1.scrollDownArrowVisible),g=OQ(s,q1.openMethod),_=h&&g!==`touch`,v=zY(),y=i===`up`?m:p,{transitionStatus:b,setMounted:x}=dJ(_);$(()=>(d.current+=1,s.state.hasScrollArrows||s.set(`hasScrollArrows`,!0),()=>{d.current=Math.max(0,d.current-1),d.current===0&&s.state.hasScrollArrows&&s.set(`hasScrollArrows`,!1)}),[s,d]),uJ({open:_,ref:y,onComplete(){_||x(!1)}});let S=bW(`div`,e,{ref:[t,y],state:{direction:i,visible:_,side:f,transitionStatus:b},props:[{"aria-hidden":!0,children:i===`up`?`▲`:`▼`,style:{position:`absolute`},onMouseMove(e){if(e.movementX===0&&e.movementY===0||v.isStarted())return;s.set(`activeIndex`,null);function t(){let e=s.state.listElement??c.current;if(!e)return;s.set(`activeIndex`,null),u();let n=e.scrollTop===0,r=Math.round(e.scrollTop+e.clientHeight)>=e.scrollHeight;if(l.current.length===0&&(i===`up`?s.set(`scrollUpArrowVisible`,!n):s.set(`scrollDownArrowVisible`,!r)),i===`up`&&n||i===`down`&&r){v.clear();return}if((s.state.listElement||c.current)&&l.current&&l.current.length>0){let t=l.current,n=y.current?.offsetHeight||0;if(i===`up`){let r=0,i=e.scrollTop+n;for(let e=0;e<t.length;e+=1){let n=t[e];if(n&&n.offsetTop>=i){r=e;break}}let a=Math.max(0,r-1);if(a<r){let r=t[a];r&&(e.scrollTop=Math.max(0,r.offsetTop-n))}else e.scrollTop=0}else{let r=t.length-1,i=e.scrollTop+e.clientHeight-n;for(let e=0;e<t.length;e+=1){let n=t[e];if(n&&n.offsetTop+n.offsetHeight>i){r=Math.max(0,e-1);break}}let a=Math.min(t.length-1,r+1);if(a>r){let r=t[a];r&&(e.scrollTop=r.offsetTop+r.offsetHeight-e.clientHeight+n)}else e.scrollTop=e.scrollHeight-e.clientHeight}}v.start(40,t)}v.start(40,t)},onMouseLeave(){v.clear()}},o]});return _||a?S:null}),K0=b.forwardRef(function(e,t){return(0,W.jsx)(G0,{...e,ref:t,direction:`down`})}),q0=b.forwardRef(function(e,t){return(0,W.jsx)(G0,{...e,ref:t,direction:`up`})}),J0=b.createContext(void 0),Y0=b.forwardRef(function(e,t){let{className:n,render:r,...i}=e,[a,o]=b.useState(),s=b.useMemo(()=>({labelId:a,setLabelId:o}),[a,o]),c=bW(`div`,e,{ref:t,props:[{role:`group`,"aria-labelledby":a},i]});return(0,W.jsx)(J0.Provider,{value:s,children:c})}),X0=J1;function Z0({className:e,...t}){return(0,W.jsx)(Y0,{"data-slot":`select-group`,className:VJ(`scroll-my-1`,e),...t})}function Q0({className:e,...t}){return(0,W.jsx)(r0,{"data-slot":`select-value`,className:VJ(`flex flex-1 text-left`,e),...t})}function $0({className:e,size:t=`default`,children:n,...r}){return(0,W.jsxs)(t0,{"data-slot":`select-trigger`,"data-size":t,className:VJ(`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,(0,W.jsx)(i0,{render:(0,W.jsx)(jr,{className:`text-muted-foreground size-4 pointer-events-none`})})]})}function e2({className:e,children:t,side:n=`bottom`,sideOffset:r=4,align:i=`center`,alignOffset:a=0,alignItemWithTrigger:o=!0,...s}){return(0,W.jsx)(o0,{children:(0,W.jsx)(S0,{side:n,sideOffset:r,align:i,alignOffset:a,alignItemWithTrigger:o,className:`isolate z-50`,children:(0,W.jsxs)(j0,{"data-slot":`select-content`,className:VJ(`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),...s,children:[(0,W.jsx)(n2,{}),(0,W.jsx)(R0,{children:t}),(0,W.jsx)(r2,{})]})})})}function t2({className:e,children:t,...n}){return(0,W.jsxs)(V0,{"data-slot":`select-item`,className:VJ(`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:[(0,W.jsx)(W0,{className:`flex flex-1 gap-2 shrink-0 whitespace-nowrap`,children:t}),(0,W.jsx)(H0,{render:(0,W.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex size-4 items-center justify-center`}),children:(0,W.jsx)(Ar,{className:`pointer-events-none`})})]})}function n2({className:e,...t}){return(0,W.jsx)(q0,{"data-slot":`select-scroll-up-button`,className:VJ(`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:(0,W.jsx)(Mr,{})})}function r2({className:e,...t}){return(0,W.jsx)(K0,{"data-slot":`select-scroll-down-button`,className:VJ(`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:(0,W.jsx)(jr,{})})}var i2=b.createContext(void 0);function a2(){let e=b.useContext(i2);if(e===void 0)throw Error(BU(63));return e}var o2=function(e){return e.checked=`data-checked`,e.unchecked=`data-unchecked`,e.disabled=`data-disabled`,e.readonly=`data-readonly`,e.required=`data-required`,e.valid=`data-valid`,e.invalid=`data-invalid`,e.touched=`data-touched`,e.dirty=`data-dirty`,e.filled=`data-filled`,e.focused=`data-focused`,e}({}),s2={...v1,checked(e){return e?{[o2.checked]:``}:{[o2.unchecked]:``}}};function c2(e,t,n,r=!0,i){let[a,o]=b.useState(),s=hG(i?`${i}-label`:void 0),c=e??t??a;return $(()=>{let i=e||t||!r?void 0:l2(n.current,s);a!==i&&o(i)}),c}function l2(e,t){let n=u2(e);if(n)return!n.id&&t&&(n.id=t),n.id||void 0}function u2(e){if(!e)return;let t=e.parentElement;if(t&&t.tagName===`LABEL`)return t;let n=e.id;if(n){let t=e.nextElementSibling;if(t&&t.htmlFor===n)return t}let r=e.labels;return r&&r[0]}var d2=b.forwardRef(function(e,t){let{checked:n,className:r,defaultChecked:i,"aria-labelledby":a,id:o,inputRef:s,name:c,nativeButton:l=!1,onCheckedChange:u,readOnly:d=!1,required:f=!1,disabled:p=!1,render:m,uncheckedValue:h,value:g,..._}=e,{clearErrors:v}=S1(),{state:y,setTouched:x,setDirty:S,validityData:C,setFilled:w,setFocused:T,shouldValidateOnChange:E,validationMode:D,disabled:O,name:k,validation:A}=b1(),{labelId:j}=w1(),M=O||p,N=k??c,P=IU(u),F=b.useRef(null),I=VU(F,s,A.inputRef),L=b.useRef(null),R=hG(),z=E1({id:o,implicit:!1,controlRef:L}),B=l?void 0:z,[V,ee]=jU({controlled:n,default:!!i,name:`Switch`,state:`checked`});D1({id:R,commit:A.commit,value:V,controlRef:L,name:N,getValue:()=>V}),$(()=>{F.current&&w(F.current.checked)},[F,w]),U$(V,()=>{v(N),S(V!==C.initialValue),w(V),E()?A.commit(V):A.commit(V,!0)});let{getButtonProps:H,buttonRef:te}=yG({disabled:M,native:l}),U=c2(a,j,F,!l,B),ne={id:l?z:R,role:`switch`,"aria-checked":V,"aria-readonly":d||void 0,"aria-required":f||void 0,"aria-labelledby":U,onFocus(){M||T(!0)},onBlur(){let e=F.current;!e||M||(x(!0),T(!1),D===`onBlur`&&A.commit(e.checked))},onClick(e){d||M||(e.preventDefault(),F.current?.dispatchEvent(new PointerEvent(`click`,{bubbles:!0,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey})))}},re=b.useMemo(()=>tW({checked:V,disabled:M,id:B,name:N,required:f,style:N?JY:qY,tabIndex:-1,type:`checkbox`,"aria-hidden":!0,ref:I,onChange(e){if(e.nativeEvent.defaultPrevented)return;let t=e.target.checked,n=BG(OG,e.nativeEvent);P?.(t,n),!n.isCanceled&&ee(t)},onFocus(){L.current?.focus()}},A.getInputValidationProps,g===void 0?mW:{value:g}),[V,M,I,B,N,P,f,ee,A,g]),ie=b.useMemo(()=>({...y,checked:V,disabled:M,readOnly:d,required:f}),[y,V,M,d,f]),ae=bW(`span`,e,{state:ie,ref:[t,L,te],props:[ne,A.getValidationProps,_,H],stateAttributesMapping:s2});return(0,W.jsxs)(i2.Provider,{value:ie,children:[ae,!V&&N&&h!==void 0&&(0,W.jsx)(`input`,{type:`hidden`,name:N,value:h}),(0,W.jsx)(`input`,{...re})]})}),f2=b.forwardRef(function(e,t){let{render:n,className:r,...i}=e,{state:a}=b1(),o=a2();return bW(`span`,e,{state:{...a,...o},ref:t,stateAttributesMapping:s2,props:i})});function p2({className:e,size:t=`default`,...n}){return(0,W.jsx)(d2,{"data-slot":`switch`,"data-size":t,className:VJ(`cursor-pointer data-checked:bg-primary data-unchecked:bg-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 dark:data-unchecked:bg-input/80 shrink-0 rounded-full border border-transparent focus-visible:ring-1 aria-invalid:ring-1 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] peer group/switch relative inline-flex items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50`,e),...n,children:(0,W.jsx)(f2,{"data-slot":`switch-thumb`,className:`bg-background dark:data-unchecked:bg-foreground dark:data-checked:bg-primary-foreground rounded-full group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 pointer-events-none block ring-0 transition-transform`})})}function m2({className:e,...t}){return(0,W.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:VJ(`border-input dark:bg-input/30 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-disabled:bg-input/50 dark:has-disabled:bg-input/80 h-8 rounded-none border transition-colors has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:ring-1 has-[[data-slot][aria-invalid=true]]:ring-1 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5 [[data-slot=combobox-content]_&]:focus-within:border-inherit [[data-slot=combobox-content]_&]:focus-within:ring-0 group/input-group relative flex w-full min-w-0 items-center outline-none has-[>textarea]:h-auto`,e),...t})}var h2=qr(`text-muted-foreground h-auto gap-2 py-1.5 text-xs font-medium group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-none [&>svg:not([class*='size-'])]:size-4 flex cursor-text items-center justify-center select-none`,{variants:{align:{"inline-start":`pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem] order-first`,"inline-end":`pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem] order-last`,"block-start":`px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2 order-first w-full justify-start`,"block-end":`px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2 order-last w-full justify-start`}},defaultVariants:{align:`inline-start`}});function g2({className:e,align:t=`inline-start`,...n}){return(0,W.jsx)(`div`,{role:`group`,"data-slot":`input-group-addon`,"data-align":t,className:VJ(h2({align:t}),e),onClick:e=>{e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`input`)?.focus()},...n})}function _2({className:e,...t}){return(0,W.jsx)(rU,{"data-slot":`command`,className:VJ(`bg-popover text-popover-foreground rounded-none flex size-full flex-col overflow-hidden`,e),...t})}function v2({className:e,...t}){return(0,W.jsx)(`div`,{"data-slot":`command-input-wrapper`,className:`border-b pb-0`,children:(0,W.jsxs)(m2,{className:`bg-input/30 border-input/30 h-8 border-none shadow-none! *:data-[slot=input-group-addon]:pl-2!`,children:[(0,W.jsx)(rU.Input,{"data-slot":`command-input`,className:VJ(`w-full text-xs outline-hidden disabled:cursor-not-allowed disabled:opacity-50`,e),...t}),(0,W.jsx)(g2,{children:(0,W.jsx)(Vr,{className:`size-4 shrink-0 opacity-50`})})]})})}function y2({className:e,...t}){return(0,W.jsx)(rU.List,{"data-slot":`command-list`,className:VJ(`no-scrollbar max-h-72 scroll-py-0 outline-none overflow-x-hidden overflow-y-auto`,e),...t})}function b2({className:e,...t}){return(0,W.jsx)(rU.Empty,{"data-slot":`command-empty`,className:VJ(`py-6 text-center text-xs`,e),...t})}function x2({className:e,...t}){return(0,W.jsx)(rU.Group,{"data-slot":`command-group`,className:VJ(`text-foreground **:[[cmdk-group-heading]]:text-muted-foreground overflow-hidden **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs`,e),...t})}function S2({className:e,children:t,...n}){return(0,W.jsxs)(rU.Item,{"data-slot":`command-item`,className:VJ(`data-selected:bg-muted data-selected:text-foreground data-selected:*:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-none px-2 py-2 text-xs outline-hidden select-none [&_svg:not([class*='size-'])]:size-4 in-data-[slot=dialog-content]:rounded-none! group/command-item data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0`,e),...n,children:[t,(0,W.jsx)(Ar,{className:`ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100`})]})}var C2=b.createContext(void 0);function w2(e){let t=b.useContext(C2);if(t===void 0&&!e)throw Error(BU(47));return t}function T2(){return{...HQ(),disabled:!1,modal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1}}var E2={...WQ,disabled:gQ(e=>e.disabled),instantType:gQ(e=>e.instantType),openMethod:gQ(e=>e.openMethod),openChangeReason:gQ(e=>e.openChangeReason),modal:gQ(e=>e.modal),stickIfOpen:gQ(e=>e.stickIfOpen),titleElementId:gQ(e=>e.titleElementId),descriptionElementId:gQ(e=>e.descriptionElementId),openOnHover:gQ(e=>e.openOnHover),closeDelay:gQ(e=>e.closeDelay),hasViewport:gQ(e=>e.hasViewport)},D2=class e extends NQ{constructor(e){let t={...T2(),...e};t.open&&e?.mounted===void 0&&(t.mounted=!0),super(t,{popupRef:b.createRef(),backdropRef:b.createRef(),internalBackdropRef:b.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:b.createRef(),beforeContentFocusGuardRef:b.createRef(),stickIfOpenTimeout:new RY,triggerElements:new BQ},E2)}setOpen=(e,t)=>{let n=t.reason===AG,r=t.reason===`trigger-press`&&t.event.detail===0,i=!e&&(t.reason===`escape-key`||t.reason==null);if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;let a={open:e,nativeEvent:t.event,reason:t.reason,nested:this.state.nested,triggerElement:t.trigger};this.state.floatingRootContext.context.events?.emit(`openchange`,a);let o=()=>{let n={open:e,openChangeReason:t.reason},r=t.trigger?.id??null;(r||e)&&(n.activeTriggerId=r,n.activeTriggerElement=t.trigger??null),this.update(n)};n?(this.set(`stickIfOpen`,!0),this.context.stickIfOpenTimeout.start(500,()=>{this.set(`stickIfOpen`,!1)}),PI.flushSync(o)):o(),r||i?this.set(`instantType`,r?`click`:`dismiss`):t.reason===`focus-out`?this.set(`instantType`,`focus`):this.set(`instantType`,void 0)};static useStore(t,n){let r=NU(()=>new e(n)).current,i=t??r;return Yq(r.disposeEffect),i}disposeEffect=()=>this.context.stickIfOpenTimeout.disposeEffect()};function O2({props:e}){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,modal:o=!1,handle:s,triggerId:c,defaultTriggerId:l=null}=e,u=D2.useStore(s?.store,{modal:o,open:r,openProp:n,activeTriggerId:l,triggerIdProp:c});M$(()=>{n===void 0&&u.state.open===!1&&r===!0&&u.update({open:!0,activeTriggerId:l})}),u.useControlledProp(`openProp`,n),u.useControlledProp(`triggerIdProp`,c);let d=u.useState(`open`),f=u.useState(`positionerElement`),p=u.useState(`payload`),m=u.useState(`openChangeReason`);u.useContextCallback(`onOpenChange`,i),u.useContextCallback(`onOpenChangeComplete`,a);let{openMethod:h,triggerProps:g}=W$(d);RQ(u);let{forceUnmount:_}=zQ(d,u,()=>{u.update({stickIfOpen:!0,openChangeReason:null})});V$(d&&o===!0&&m!==`trigger-hover`&&h!==`touch`,f),b.useEffect(()=>{d||u.context.stickIfOpenTimeout.clear()},[u,d]);let v=b.useCallback(e=>{let t=BG(e);return t.preventUnmountOnClose=()=>{u.set(`preventUnmountingOnClose`,!0)},t},[u]),y=b.useCallback(()=>{u.setOpen(!1,v(RG))},[u,v]);b.useImperativeHandle(e.actionsRef,()=>({unmount:_,close:y}),[_,y]);let x=qQ({popupStore:u,onOpenChange:u.setOpen}),{getReferenceProps:S,getFloatingProps:C,getTriggerProps:w}=r$([zX(x,{outsidePressEvent:{mouse:o===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}}),m$(x)]),T=b.useMemo(()=>S(g),[S,g]),E=b.useMemo(()=>w(g),[w,g]),D=b.useMemo(()=>C(),[C]);u.useSyncedValues({modal:o,openMethod:h,activeTriggerProps:T,inactiveTriggerProps:E,popupProps:D,floatingRootContext:x,nested:bX()!=null});let O=b.useMemo(()=>({store:u}),[u]);return(0,W.jsx)(C2.Provider,{value:O,children:typeof t==`function`?t({payload:p}):t})}function k2(e){return w2(!0)?(0,W.jsx)(O2,{props:e}):(0,W.jsx)(wX,{children:(0,W.jsx)(O2,{props:e})})}var A2=b.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,handle:o,payload:s,openOnHover:c=!1,delay:l=300,closeDelay:u=0,id:d,...f}=e,p=w2(!0),m=o?.store??p?.store;if(!m)throw Error(BU(74));let h=hG(d),g=m.useState(`isTriggerActive`,h),_=m.useState(`floatingRootContext`),v=m.useState(`isOpenedByTrigger`,h),y=b.useRef(null),{registerTrigger:x,isMountedByThisTrigger:S}=LQ(h,y,m,{payload:s,disabled:i,openOnHover:c,closeDelay:u}),C=m.useState(`openChangeReason`),w=m.useState(`stickIfOpen`),T=m.useState(`openMethod`),E=n$(_,{enabled:_!=null&&c&&(T!==`touch`||C!==`trigger-press`),mouseOnly:!0,move:!1,handleClose:C$(),restMs:l,delay:{close:u},triggerElementRef:y,isActiveTrigger:g}),D=r$([FX(_,{enabled:_!=null,stickIfOpen:w})]),O=m.useState(`triggerProps`,S),k={disabled:i,open:v},{getButtonProps:A,buttonRef:j}=yG({disabled:i,native:a}),M=b.useMemo(()=>({open(e){return e&&C===`trigger-press`?MY.open(e):jY.open(e)}}),[C]),N=bW(`button`,e,{state:k,ref:[j,t,x,y],props:[D.getReferenceProps(),E,O,{[gW]:``,id:h},f,A],stateAttributesMapping:M}),P=b.useRef(null),F=IU(e=>{PI.flushSync(()=>{m.setOpen(!1,BG(PG,e.nativeEvent,e.currentTarget))}),Uq(P.current)?.focus()}),I=IU(e=>{let t=m.select(`positionerElement`);if(t&&Wq(e,t))m.context.beforeContentFocusGuardRef.current?.focus();else{PI.flushSync(()=>{m.setOpen(!1,BG(PG,e.nativeEvent,e.currentTarget))});let n=Hq(m.context.triggerFocusTargetRef.current||y.current);for(;n!==null&&oK(t,n);){let e=n;if(n=zq(n),n===e)break}n?.focus()}});return g?(0,W.jsxs)(b.Fragment,{children:[(0,W.jsx)(YY,{ref:P,onFocus:F}),(0,W.jsx)(b.Fragment,{children:N},h),(0,W.jsx)(YY,{ref:m.context.triggerFocusTargetRef,onFocus:I})]}):(0,W.jsx)(b.Fragment,{children:N},h)}),j2=b.createContext(void 0);function M2(){let e=b.useContext(j2);if(e===void 0)throw Error(BU(45));return e}var N2=b.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i}=w2();return i.useState(`mounted`)||n?(0,W.jsx)(j2.Provider,{value:n,children:(0,W.jsx)(hX,{ref:t,...r})}):null}),P2=b.createContext(void 0);function F2(){let e=b.useContext(P2);if(!e)throw Error(BU(46));return e}var I2=b.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`bottom`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=vW,...g}=e,{store:_}=w2(),v=M2(),y=SX(),x=_.useState(`floatingRootContext`),S=_.useState(`mounted`),C=_.useState(`open`),w=_.useState(`openChangeReason`),T=_.useState(`activeTriggerElement`),E=_.useState(`modal`),D=_.useState(`positionerElement`),O=_.useState(`instantType`),k=_.useState(`transitionStatus`),A=_.useState(`hasViewport`),j=b.useRef(null),M=lJ(D,!1,!1),N=m0({anchor:i,floatingRootContext:x,positionMethod:a,mounted:S,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m,keepMounted:v,nodeId:y,collisionAvoidance:h,adaptiveOrigin:A?d0:void 0}),P=b.useMemo(()=>{let e={};return C||(e.pointerEvents=`none`),{role:`presentation`,hidden:!S,style:{...N.positionerStyles,...e}}},[C,S,N.positionerStyles]),F=b.useMemo(()=>({props:P,...N}),[P,N]),I=x.useState(`domReferenceElement`);$(()=>{let e=I,t=j.current;if(e&&(j.current=e),t&&e&&e!==t){_.set(`instantType`,void 0);let e=new AbortController;return M(()=>{_.set(`instantType`,`trigger-change`)},e.signal),()=>{e.abort()}}},[I,M,_]);let L={open:C,side:F.side,align:F.align,anchorHidden:F.anchorHidden,instant:O},R=b.useCallback(e=>{_.set(`positionerElement`,e)},[_]),z=bW(`div`,e,{state:L,props:[F.props,v0(k),g],ref:[t,R],stateAttributesMapping:NY});return(0,W.jsxs)(P2.Provider,{value:F,children:[S&&E===!0&&w!==`trigger-hover`&&(0,W.jsx)(A$,{ref:_.context.internalBackdropRef,inert:$q(!C),cutout:T}),(0,W.jsx)(CX,{id:y,children:z})]})}),L2=b.createContext(void 0);function R2(){let[e,t]=b.useState(0),n=IU(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:b.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}function z2(e){let{value:t,children:n}=e;return(0,W.jsx)(L2.Provider,{value:t,children:n})}var B2={...NY,...rJ},V2=b.forwardRef(function(e,t){let{className:n,render:r,initialFocus:i,finalFocus:a,...o}=e,{store:s}=w2(),c=F2(),l=D0(!0)!=null,{context:u,hasClosePart:d}=R2(),f=s.useState(`open`),p=s.useState(`openMethod`),m=s.useState(`instantType`),h=s.useState(`transitionStatus`),g=s.useState(`popupProps`),_=s.useState(`titleElementId`),v=s.useState(`descriptionElementId`),y=s.useState(`modal`),x=s.useState(`mounted`),S=s.useState(`openChangeReason`),C=s.useState(`activeTriggerElement`),w=s.useState(`floatingRootContext`);uJ({open:f,ref:s.context.popupRef,onComplete(){f&&s.context.onOpenChangeComplete?.(!0)}});let T=s.useState(`disabled`),E=s.useState(`openOnHover`),D=s.useState(`closeDelay`);e$(w,{enabled:E&&!T,closeDelay:D});function O(e){return e===`touch`?s.context.popupRef.current:!0}let k=i===void 0?O:i,A={open:f,side:c.side,align:c.align,instant:m,transitionStatus:h},j=y!==!1&&d,M=b.useCallback(e=>{s.set(`popupElement`,e)},[s]),N=bW(`div`,e,{state:A,ref:[t,s.context.popupRef,M],props:[g,{"aria-labelledby":_,"aria-describedby":v,onKeyDown(e){l&&DJ.has(e.key)&&e.stopPropagation()}},v0(h),o],stateAttributesMapping:B2});return(0,W.jsx)(PX,{context:w,openInteractionType:p,modal:j,disabled:!x||S===`trigger-hover`,initialFocus:k,returnFocus:a,restoreFocus:`popup`,previousFocusableElement:WW(C)?C:void 0,nextFocusableElement:s.context.triggerFocusTargetRef,beforeContentFocusGuardRef:s.context.beforeContentFocusGuardRef,children:(0,W.jsx)(z2,{value:u,children:N})})});function H2({...e}){return(0,W.jsx)(k2,{"data-slot":`popover`,...e})}function U2({...e}){return(0,W.jsx)(A2,{"data-slot":`popover-trigger`,...e})}function W2({className:e,align:t=`center`,alignOffset:n=0,side:r=`bottom`,sideOffset:i=4,...a}){return(0,W.jsx)(N2,{children:(0,W.jsx)(I2,{align:t,alignOffset:n,side:r,sideOffset:i,className:`isolate z-50`,children:(0,W.jsx)(V2,{"data-slot":`popover-content`,className:VJ(`bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 flex flex-col gap-2.5 rounded-none p-2.5 text-xs shadow-md ring-1 duration-100 z-50 w-72 origin-(--transform-origin) outline-hidden`,e),...a})})})}var G2=[{value:`en-US`,label:`English (US)`},{value:`es-ES`,label:`español (España)`},{value:`fr-FR`,label:`français (France)`},{value:`de-DE`,label:`Deutsch`},{value:`it-IT`,label:`italiano`},{value:`am-ET`,label:`አማርኛ`},{value:`ar`,label:`العربية`},{value:`bg-BG`,label:`български`},{value:`bn-BD`,label:`বাংলা`},{value:`bs-BA`,label:`bosanski`},{value:`ca-ES`,label:`català`},{value:`cs-CZ`,label:`čeština`},{value:`da-DK`,label:`dansk`},{value:`el-GR`,label:`Ελληνικά`},{value:`es-419`,label:`español (Latinoamérica)`},{value:`et-EE`,label:`eesti`},{value:`fi-FI`,label:`suomi`},{value:`fr-CA`,label:`français (Canada)`},{value:`gu-IN`,label:`ગુજરાતી`},{value:`hi-IN`,label:`हिन्दी`},{value:`hr-HR`,label:`hrvatski`},{value:`hu-HU`,label:`magyar`},{value:`hy-AM`,label:`հայերեն`},{value:`id-ID`,label:`Indonesia`},{value:`is-IS`,label:`íslenska`},{value:`ja-JP`,label:`日本語`},{value:`ka-GE`,label:`ქართული`},{value:`kk-KZ`,label:`қазақ тілі`},{value:`kn-IN`,label:`ಕನ್ನಡ`},{value:`ko-KR`,label:`한국어`},{value:`lt-LT`,label:`lietuvių`},{value:`lv-LV`,label:`latviešu`},{value:`mk-MK`,label:`македонски`},{value:`ml-IN`,label:`മലയാളം`},{value:`mn-MN`,label:`монгол`},{value:`mr-IN`,label:`मराठी`},{value:`ms-MY`,label:`Bahasa Melayu`},{value:`my-MM`,label:`မြန်မာ`},{value:`nb-NO`,label:`norsk bokmål`},{value:`nl-NL`,label:`Nederlands`},{value:`pa-IN`,label:`ਪੰਜਾਬੀ`},{value:`pl-PL`,label:`polski`},{value:`pt-BR`,label:`português (Brasil)`},{value:`pt-PT`,label:`português (Portugal)`},{value:`ro-RO`,label:`română`},{value:`ru-RU`,label:`русский`},{value:`sk-SK`,label:`slovenčina`},{value:`sl-SI`,label:`slovenščina`},{value:`so-SO`,label:`Soomaali`},{value:`sq-AL`,label:`shqip`},{value:`sr-RS`,label:`српски`},{value:`sv-SE`,label:`svenska`},{value:`sw-KE`,label:`Kiswahili`},{value:`ta-IN`,label:`தமிழ்`},{value:`te-IN`,label:`తెలుగు`},{value:`th-TH`,label:`ไทย`},{value:`tl-PH`,label:`Tagalog`},{value:`tr-TR`,label:`Türkçe`},{value:`uk-UA`,label:`українська`},{value:`ur-PK`,label:`اردو`},{value:`vi-VN`,label:`Tiếng Việt`},{value:`zh-Hans`,label:`简体中文`},{value:`zh-Hant-HK`,label:`繁體中文(香港)`},{value:`zh-Hant-TW`,label:`繁體中文(台灣)`}],K2=({value:e,onValueChange:t})=>{let[n,r]=(0,b.useState)(!1),i=G2.find(t=>t.value===e);return(0,W.jsxs)(H2,{open:n,onOpenChange:r,children:[(0,W.jsx)(U2,{children:(0,W.jsxs)(vY,{variant:`outline`,role:`combobox`,"aria-expanded":n,className:`w-full justify-between`,children:[i?(0,W.jsxs)(`span`,{children:[i.value,(0,W.jsxs)(`span`,{className:`text-muted-foreground`,children:[` `,`- `,i.label]})]}):`Select locale...`,(0,W.jsx)(Nr,{className:`ml-2 h-4 w-4 shrink-0 opacity-50`})]})}),(0,W.jsx)(W2,{className:`w-full p-0`,children:(0,W.jsxs)(_2,{children:[(0,W.jsx)(v2,{placeholder:`Search locale...`}),(0,W.jsxs)(y2,{children:[(0,W.jsx)(b2,{children:`No locale found.`}),(0,W.jsx)(x2,{children:G2.map(n=>(0,W.jsxs)(S2,{value:n.value,onSelect:n=>{t(n===e?``:n),r(!1)},children:[(0,W.jsxs)(`span`,{children:[n.label,` `,(0,W.jsxs)(`span`,{className:`text-muted-foreground`,children:[`(`,n.value,`)`]})]}),(0,W.jsx)(Ar,{className:VJ(`ml-auto h-4 w-4`,e===n.value?`opacity-100`:`opacity-0`)})]},n.value))})]})]})})]})};function q2({resourceUri:e}){let{data:t}=WE(e);return t?(0,W.jsx)(`div`,{className:`text-xs`,children:(0,W.jsx)(xY,{src:t.contents[0],name:null,quotesOnKeys:!1,displayDataTypes:!1,displayObjectSize:!1,enableClipboard:!1,theme:`rjv-default`,style:{fontSize:`0.75rem`},collapsed:4,collapseStringsAfterLength:80})}):null}var J2=()=>{let e=UE(),{openaiRef:t,openaiObject:n,openInAppUrl:r}=sw(e.name),{setToolData:i}=ow(),a=Mh(e=>e.setPreference),o=e._meta?.[`openai/outputTemplate`],s=(r,o)=>{let s=t?.current?.contentWindow?.openai;s&&n&&(s[r]=o,i(e.name,{openaiObject:{...n,[r]:o}}),r in jh&&a(r,o))};return n?(0,W.jsx)(`div`,{className:`overflow-auto max-h-full min-h-0`,children:(0,W.jsxs)(HJ,{defaultValue:`widget-state`,className:`gap-0`,children:[(0,W.jsxs)(WJ,{className:`border-b border-border w-full`,children:[(0,W.jsx)(GJ,{value:`properties`,children:`Properties`}),(0,W.jsx)(GJ,{value:`widget-state`,children:`Widget State`}),o&&(0,W.jsx)(GJ,{value:`resource`,children:`Resource`})]}),(0,W.jsx)(KJ,{value:`properties`,className:`p-4`,children:(0,W.jsxs)(u1,{children:[(0,W.jsxs)(f1,{children:[(0,W.jsx)(p1,{children:`Display Mode`}),(0,W.jsxs)(X0,{value:n.displayMode,onValueChange:e=>s(`displayMode`,e),"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:[(0,W.jsx)($0,{children:(0,W.jsx)(Q0,{})}),(0,W.jsx)(e2,{children:(0,W.jsxs)(Z0,{children:[(0,W.jsx)(t2,{value:`inline`,children:`Inline`}),(0,W.jsx)(t2,{value:`fullscreen`,children:`Fullscreen`}),(0,W.jsx)(t2,{value:`pip`,children:`Pip`}),(0,W.jsx)(t2,{value:`modal`,children:`Modal`})]})})]})]}),(0,W.jsxs)(f1,{children:[(0,W.jsx)(p1,{children:`Theme`}),(0,W.jsxs)(c1,{children:[(0,W.jsx)(vY,{variant:n.theme===`light`?`default`:`outline`,onClick:()=>s(`theme`,`light`),children:(0,W.jsx)(Hr,{})}),(0,W.jsx)(vY,{variant:n.theme===`dark`?`default`:`outline`,onClick:()=>s(`theme`,`dark`),children:(0,W.jsx)(Rr,{})})]})]}),(0,W.jsxs)(f1,{children:[(0,W.jsx)(p1,{children:`Locale`}),(0,W.jsx)(K2,{value:n.locale,onValueChange:e=>s(`locale`,e)})]}),(0,W.jsxs)(f1,{children:[(0,W.jsx)(p1,{children:`Max Height`}),(0,W.jsx)(A1,{type:`number`,value:n.maxHeight===void 0?``:String(n.maxHeight),onChange:e=>{let t=e.target.value.trim();s(`maxHeight`,t===``?void 0:Number(t))}})]}),(0,W.jsxs)(f1,{children:[(0,W.jsx)(p1,{children:`Safe Area Insets`}),(0,W.jsx)(`div`,{className:`grid grid-cols-2 gap-4`,children:[`top`,`bottom`,`left`,`right`].map(e=>{let t=e.charAt(0).toUpperCase()+e.slice(1);return(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`label`,{htmlFor:`safeArea-${e}`,className:`text-xs text-muted-foreground block mb-1`,children:t}),(0,W.jsx)(A1,{id:`safeArea-${e}`,type:`number`,value:n.safeArea?.insets?.[e]===void 0?`0`:String(n.safeArea.insets[e]),onChange:t=>{let r=t.target.value.trim();s(`safeArea`,{...n.safeArea,insets:{...n.safeArea?.insets,[e]:r===``?0:Number(r)}})}})]},e)})})]}),(0,W.jsxs)(f1,{children:[(0,W.jsx)(p1,{children:`Device Type`}),(0,W.jsxs)(X0,{value:n.userAgent?.device?.type??`desktop`,onValueChange:e=>s(`userAgent`,{...n.userAgent,device:{...n.userAgent?.device,type:e}}),"aria-label":`Select device type`,items:[{label:`Mobile`,value:`mobile`},{label:`Desktop`,value:`desktop`}],name:`deviceType`,required:!0,children:[(0,W.jsx)($0,{children:(0,W.jsx)(Q0,{})}),(0,W.jsx)(e2,{children:(0,W.jsxs)(Z0,{children:[(0,W.jsx)(t2,{value:`mobile`,children:`Mobile`}),(0,W.jsx)(t2,{value:`desktop`,children:`Desktop`})]})})]})]}),(0,W.jsxs)(f1,{children:[(0,W.jsx)(p1,{children:`Capabilities`}),(0,W.jsxs)(`div`,{className:`flex gap-8`,children:[(0,W.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,W.jsx)(`label`,{htmlFor:`hover`,className:`text-xs text-muted-foreground cursor-pointer`,children:`Hover`}),(0,W.jsx)(p2,{id:`hover`,checked:n.userAgent?.capabilities?.hover??!1,onCheckedChange:e=>s(`userAgent`,{...n.userAgent,capabilities:{...n.userAgent?.capabilities,hover:e}})})]}),(0,W.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,W.jsx)(`label`,{htmlFor:`touch`,className:`text-xs text-muted-foreground cursor-pointer`,children:`Touch`}),(0,W.jsx)(p2,{id:`touch`,checked:n.userAgent?.capabilities?.touch??!1,onCheckedChange:e=>s(`userAgent`,{...n.userAgent,capabilities:{...n.userAgent?.capabilities,touch:e}})})]})]})]}),(0,W.jsxs)(f1,{children:[(0,W.jsx)(p1,{children:`Open in App URL`}),(0,W.jsx)(A1,{type:`text`,value:r??``,readOnly:!0,placeholder:`Not set`,className:`font-mono text-xs`})]})]})}),(0,W.jsx)(KJ,{value:`widget-state`,className:`p-4`,children:(0,W.jsx)(xY,{src:n.widgetState??{},name:null,quotesOnKeys:!1,displayDataTypes:!1,displayObjectSize:!1,enableClipboard:!1,theme:`rjv-default`,collapsed:3,collapseStringsAfterLength:80})}),o&&(0,W.jsx)(KJ,{value:`resource`,className:`p-4`,children:(0,W.jsx)(b.Suspense,{fallback:(0,W.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`Loading resource...`}),children:(0,W.jsx)(q2,{resourceUri:o})})})]})}):null};function Y2(e){return new Date(e).toLocaleTimeString(`en-US`,{hour12:!1,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,fractionalSecondDigits:3})}function X2(e,t=60){let n=JSON.stringify(e);return n.length>t?`${n.slice(0,t)}…`:n}function Z2({log:e}){let[t,n]=(0,b.useState)(!1),r=Object.keys(e.args).length>0,i=r?X2(e.args):null;return(0,W.jsxs)(W.Fragment,{children:[r?(0,W.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:[(0,W.jsx)(`span`,{className:`text-gray-600 dark:text-gray-500 shrink-0 min-w-[80px]`,children:Y2(e.timestamp)}),(0,W.jsx)(`span`,{className:VJ(`font-semibold shrink-0 min-w-[120px]`,e.type===`response`?`text-green-600 dark:text-green-400`:`text-blue-600 dark:text-blue-400`),children:e.command}),(0,W.jsx)(`span`,{className:`text-gray-500 dark:text-gray-600 mr-1`,children:t?`▼`:`▶`}),(0,W.jsx)(`span`,{className:`text-gray-600 dark:text-gray-400 truncate flex-1 min-w-0`,children:i})]}):(0,W.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:[(0,W.jsx)(`span`,{className:`text-gray-600 dark:text-gray-500 shrink-0 min-w-[80px]`,children:Y2(e.timestamp)}),(0,W.jsx)(`span`,{className:`text-blue-600 dark:text-blue-400 font-semibold shrink-0 min-w-[120px]`,children:e.command})]}),t&&r&&(0,W.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:(0,W.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 Q2(){let e=UE(),{setToolData:t}=ow(),{openaiLogs:n}=sw(e.name),r=(0,b.useRef)(null);return(0,b.useEffect)(()=>{let e=r.current;e&&(e.scrollTop=e.scrollHeight)},[]),(0,W.jsxs)(`div`,{className:`flex flex-col h-full overflow-hidden min-h-0`,children:[(0,W.jsxs)(`div`,{className:`flex items-center justify-between mb-3 h-8 flex-none`,children:[(0,W.jsx)(`h3`,{className:`text-sm font-semibold text-gray-900 dark:text-gray-200`,children:`MCP client logs`}),(0,W.jsx)(`div`,{className:`flex items-center gap-2`,children:n.length>0&&(0,W.jsxs)(vY,{variant:`ghost`,size:`sm`,onClick:()=>{t(e.name,{openaiLogs:[]})},children:[(0,W.jsx)(Ur,{className:`w-3 h-3`}),`Clear`]})})]}),(0,W.jsx)(`div`,{ref:r,className:`overflow-auto flex-1 bg-gray-50 rounded-lg border border-gray-200 min-h-0`,children:n.map(e=>(0,W.jsx)(Z2,{log:e},e.id))})]})}var $2=qr(`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 e4({className:e,variant:t,...n}){return(0,W.jsx)(`div`,{className:VJ($2({variant:t}),e),"data-slot":`alert`,role:`alert`,...n})}function t4({className:e,...t}){return(0,W.jsx)(`div`,{className:VJ(`font-medium [svg~&]:col-start-2`,e),"data-slot":`alert-title`,...t})}function n4({className:e,...t}){return(0,W.jsx)(`div`,{className:VJ(`flex flex-col gap-2.5 text-muted-foreground [svg~&]:col-start-2`,e),"data-slot":`alert-description`,...t})}var r4=()=>{let e=sw(UE().name);return e?(0,W.jsx)(`div`,{className:`flex flex-col h-full overflow-hidden bg-card`,children:(0,W.jsx)(`div`,{className:`p-4 overflow-auto`,children:e.response?e.response.isError?(0,W.jsxs)(e4,{variant:`error`,children:[(0,W.jsx)(Pr,{}),(0,W.jsx)(t4,{children:`Error`}),(0,W.jsx)(n4,{children:(()=>{let t=[];return e.response.content.forEach(e=>{e.type===`text`&&t.push(e.text)}),t.join(`
|
|
153
|
+
`)})()})]}):(0,W.jsx)(`div`,{className:`text-xs`,children:(0,W.jsx)(xY,{src:e.response??{},name:null,quotesOnKeys:!1,displayDataTypes:!1,displayObjectSize:!1,enableClipboard:!1,theme:`rjv-default`,style:{fontSize:`0.75rem`},collapsed:3,collapseStringsAfterLength:80})}):null})}):null},i4=`openai:set_globals`,a4=class extends CustomEvent{type=i4},o4=Gu([Z(`light`),Z(`dark`)]).describe(`Color theme preference for the host environment.`),s4=Gu([Z(`inline`),Z(`fullscreen`),Z(`pip`)]).describe(`Display mode for UI presentation.`),c4=Zu(Gu([Z(`--color-background-primary`),Z(`--color-background-secondary`),Z(`--color-background-tertiary`),Z(`--color-background-inverse`),Z(`--color-background-ghost`),Z(`--color-background-info`),Z(`--color-background-danger`),Z(`--color-background-success`),Z(`--color-background-warning`),Z(`--color-background-disabled`),Z(`--color-text-primary`),Z(`--color-text-secondary`),Z(`--color-text-tertiary`),Z(`--color-text-inverse`),Z(`--color-text-ghost`),Z(`--color-text-info`),Z(`--color-text-danger`),Z(`--color-text-success`),Z(`--color-text-warning`),Z(`--color-text-disabled`),Z(`--color-border-primary`),Z(`--color-border-secondary`),Z(`--color-border-tertiary`),Z(`--color-border-inverse`),Z(`--color-border-ghost`),Z(`--color-border-info`),Z(`--color-border-danger`),Z(`--color-border-success`),Z(`--color-border-warning`),Z(`--color-border-disabled`),Z(`--color-ring-primary`),Z(`--color-ring-secondary`),Z(`--color-ring-inverse`),Z(`--color-ring-info`),Z(`--color-ring-danger`),Z(`--color-ring-success`),Z(`--color-ring-warning`),Z(`--font-sans`),Z(`--font-mono`),Z(`--font-weight-normal`),Z(`--font-weight-medium`),Z(`--font-weight-semibold`),Z(`--font-weight-bold`),Z(`--font-text-xs-size`),Z(`--font-text-sm-size`),Z(`--font-text-md-size`),Z(`--font-text-lg-size`),Z(`--font-heading-xs-size`),Z(`--font-heading-sm-size`),Z(`--font-heading-md-size`),Z(`--font-heading-lg-size`),Z(`--font-heading-xl-size`),Z(`--font-heading-2xl-size`),Z(`--font-heading-3xl-size`),Z(`--font-text-xs-line-height`),Z(`--font-text-sm-line-height`),Z(`--font-text-md-line-height`),Z(`--font-text-lg-line-height`),Z(`--font-heading-xs-line-height`),Z(`--font-heading-sm-line-height`),Z(`--font-heading-md-line-height`),Z(`--font-heading-lg-line-height`),Z(`--font-heading-xl-line-height`),Z(`--font-heading-2xl-line-height`),Z(`--font-heading-3xl-line-height`),Z(`--border-radius-xs`),Z(`--border-radius-sm`),Z(`--border-radius-md`),Z(`--border-radius-lg`),Z(`--border-radius-xl`),Z(`--border-radius-full`),Z(`--border-width-regular`),Z(`--shadow-hairline`),Z(`--shadow-sm`),Z(`--shadow-md`),Z(`--shadow-lg`)]).describe(`CSS variable keys available to MCP apps for theming.`).describe(`Style variables for theming MCP apps.
|
|
154
|
+
|
|
155
|
+
Individual style keys are optional - hosts may provide any subset of these values.
|
|
156
|
+
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
157
|
+
|
|
158
|
+
Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
|
|
159
|
+
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),Gu([J(),Mu()]).describe(`Style variables for theming MCP apps.
|
|
160
|
+
|
|
161
|
+
Individual style keys are optional - hosts may provide any subset of these values.
|
|
162
|
+
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
163
|
+
|
|
164
|
+
Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
|
|
165
|
+
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`)).describe(`Style variables for theming MCP apps.
|
|
166
|
+
|
|
167
|
+
Individual style keys are optional - hosts may provide any subset of these values.
|
|
168
|
+
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
169
|
+
|
|
170
|
+
Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
|
|
171
|
+
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`);X({method:Z(`ui/open-link`),params:X({url:J().describe(`URL to open in the host's browser`)})}),X({isError:Au().optional().describe(`True if the host failed to open the URL (e.g., due to security policy).`)}).passthrough(),X({isError:Au().optional().describe(`True if the download failed (e.g., user cancelled or host denied).`)}).passthrough(),X({isError:Au().optional().describe(`True if the host rejected or failed to deliver the message.`)}).passthrough(),X({method:Z(`ui/notifications/sandbox-proxy-ready`),params:X({})});var l4=X({connectDomains:Y(J()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket).
|
|
172
|
+
|
|
173
|
+
- Maps to CSP \`connect-src\` directive
|
|
174
|
+
- Empty or omitted → no network connections (secure default)`),resourceDomains:Y(J()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\n\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\n- Wildcard subdomains supported: `https://*.example.com`\n- Empty or omitted → no network resources (secure default)"),frameDomains:Y(J()).optional().describe("Origins for nested iframes.\n\n- Maps to CSP `frame-src` directive\n- Empty or omitted → no nested iframes allowed (`frame-src 'none'`)"),baseUriDomains:Y(J()).optional().describe("Allowed base URIs for the document.\n\n- Maps to CSP `base-uri` directive\n- Empty or omitted → only same origin allowed (`base-uri 'self'`)")}),u4=X({camera:X({}).optional().describe(`Request camera access.
|
|
175
|
+
|
|
176
|
+
Maps to Permission Policy \`camera\` feature.`),microphone:X({}).optional().describe(`Request microphone access.
|
|
177
|
+
|
|
178
|
+
Maps to Permission Policy \`microphone\` feature.`),geolocation:X({}).optional().describe(`Request geolocation access.
|
|
179
|
+
|
|
180
|
+
Maps to Permission Policy \`geolocation\` feature.`),clipboardWrite:X({}).optional().describe(`Request clipboard write access.
|
|
181
|
+
|
|
182
|
+
Maps to Permission Policy \`clipboard-write\` feature.`)});X({method:Z(`ui/notifications/size-changed`),params:X({width:Eu().optional().describe(`New width in pixels.`),height:Eu().optional().describe(`New height in pixels.`)})}),X({method:Z(`ui/notifications/tool-input`),params:X({arguments:Zu(J(),Ru().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),X({method:Z(`ui/notifications/tool-input-partial`),params:X({arguments:Zu(J(),Ru().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),X({method:Z(`ui/notifications/tool-cancelled`),params:X({reason:J().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})});var d4=X({fonts:J().optional()}),f4=X({variables:c4.optional().describe(`CSS variables for theming the app.`),css:d4.optional().describe(`CSS blocks that apps can inject.`)});X({method:Z(`ui/resource-teardown`),params:X({})}),Zu(J(),Ru());var p4=X({text:X({}).optional().describe(`Host supports text content blocks.`),image:X({}).optional().describe(`Host supports image content blocks.`),audio:X({}).optional().describe(`Host supports audio content blocks.`),resource:X({}).optional().describe(`Host supports resource content blocks.`),resourceLink:X({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:X({}).optional().describe(`Host supports structured content.`)});X({method:Z(`ui/notifications/request-teardown`),params:X({}).optional()});var m4=X({experimental:X({}).optional().describe(`Experimental features (structure TBD).`),openLinks:X({}).optional().describe(`Host supports opening external URLs.`),downloadFile:X({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:X({listChanged:Au().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:X({listChanged:Au().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:X({}).optional().describe(`Host accepts log messages.`),sandbox:X({permissions:u4.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:l4.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:p4.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.`),message:p4.optional().describe(`Host supports receiving content messages (ui/message) from the view.`)}),h4=X({experimental:X({}).optional().describe(`Experimental features (structure TBD).`),tools:X({listChanged:Au().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:Y(s4).optional().describe(`Display modes the app supports.`)});X({method:Z(`ui/notifications/initialized`),params:X({}).optional()}),X({csp:l4.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:u4.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:J().optional().describe(`Dedicated origin for view sandbox.
|
|
183
|
+
|
|
184
|
+
Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.
|
|
185
|
+
|
|
186
|
+
**Host-dependent:** The format and validation rules for this field are determined by each host. Servers MUST consult host-specific documentation for the expected domain format. Common patterns include:
|
|
187
|
+
- Hash-based subdomains (e.g., \`{hash}.claudemcpcontent.com\`)
|
|
188
|
+
- URL-derived subdomains (e.g., \`www-example-com.oaiusercontent.com\`)
|
|
189
|
+
|
|
190
|
+
If omitted, host uses default sandbox origin (typically per-conversation).`),prefersBorder:Au().optional().describe(`Visual boundary preference - true if view prefers a visible border.
|
|
191
|
+
|
|
192
|
+
Boolean requesting whether a visible border and background is provided by the host. Specifying an explicit value for this is recommended because hosts' defaults may vary.
|
|
193
|
+
|
|
194
|
+
- \`true\`: request visible border + background
|
|
195
|
+
- \`false\`: request no visible border + background
|
|
196
|
+
- omitted: host decides border`)}),X({method:Z(`ui/request-display-mode`),params:X({mode:s4.describe(`The display mode being requested.`)})}),X({mode:s4.describe(`The display mode that was actually set. May differ from requested if not supported.`)}).passthrough();var g4=Gu([Z(`model`),Z(`app`)]).describe(`Tool visibility scope - who can access the tool.`);X({resourceUri:J().optional(),visibility:Y(g4).optional().describe(`Who can access this tool. Default: ["model", "app"]
|
|
197
|
+
- "model": Tool visible to and callable by the agent
|
|
198
|
+
- "app": Tool callable by the app from this server only`)}),X({mimeTypes:Y(J()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')}),X({method:Z(`ui/download-file`),params:X({contents:Y(Gu([_p,vp])).describe(`Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.`)})}),X({method:Z(`ui/message`),params:X({role:Z(`user`).describe(`Message role, currently only "user" is supported.`),content:Y(yp).describe(`Message content blocks (text, image, etc.).`)})}),X({method:Z(`ui/notifications/sandbox-resource-ready`),params:X({html:J().describe(`HTML content to load into the inner iframe.`),sandbox:J().optional().describe(`Optional override for the inner iframe's sandbox attribute.`),csp:l4.optional().describe(`CSP configuration from resource metadata.`),permissions:u4.optional().describe(`Sandbox permissions from resource metadata.`)})}),X({method:Z(`ui/notifications/tool-result`),params:Op.describe(`Standard MCP tool execution result.`)});var _4=X({toolInfo:X({id:Gd.optional().describe(`JSON-RPC id of the tools/call request.`),tool:Tp.describe(`Tool definition including name, inputSchema, etc.`)}).optional().describe(`Metadata of the tool call that instantiated this App.`),theme:o4.optional().describe(`Current color theme preference.`),styles:f4.optional().describe(`Style configuration for theming the app.`),displayMode:s4.optional().describe(`How the UI is currently displayed.`),availableDisplayModes:Y(s4).optional().describe(`Display modes the host supports.`),containerDimensions:Gu([X({height:Eu().describe(`Fixed container height in pixels.`)}),X({maxHeight:Gu([Eu(),Mu()]).optional().describe(`Maximum container height in pixels.`)})]).and(Gu([X({width:Eu().describe(`Fixed container width in pixels.`)}),X({maxWidth:Gu([Eu(),Mu()]).optional().describe(`Maximum container width in pixels.`)})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other
|
|
199
|
+
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:J().optional().describe(`User's language and region preference in BCP 47 format.`),timeZone:J().optional().describe(`User's timezone in IANA format.`),userAgent:J().optional().describe(`Host application identifier.`),platform:Gu([Z(`web`),Z(`desktop`),Z(`mobile`)]).optional().describe(`Platform type for responsive design decisions.`),deviceCapabilities:X({touch:Au().optional().describe(`Whether the device supports touch input.`),hover:Au().optional().describe(`Whether the device supports hover interactions.`)}).optional().describe(`Device input capabilities.`),safeAreaInsets:X({top:Eu().describe(`Top safe area inset in pixels.`),right:Eu().describe(`Right safe area inset in pixels.`),bottom:Eu().describe(`Bottom safe area inset in pixels.`),left:Eu().describe(`Left safe area inset in pixels.`)}).optional().describe(`Mobile safe area boundaries in pixels.`)}).passthrough();X({method:Z(`ui/notifications/host-context-changed`),params:_4.describe(`Partial context update containing only changed fields.`)}),X({method:Z(`ui/update-model-context`),params:X({content:Y(yp).optional().describe(`Context content blocks (text, image, etc.).`),structuredContent:Zu(J(),Ru().describe(`Structured content for machine-readable context data.`)).optional().describe(`Structured content for machine-readable context data.`)})}),X({method:Z(`ui/initialize`),params:X({appInfo:cf.describe(`App identification (name and version).`),appCapabilities:h4.describe(`Features and capabilities this app provides.`),protocolVersion:J().describe(`Protocol version this app supports.`)})}),X({protocolVersion:J().describe(`Negotiated protocol version string (e.g., "2025-11-21").`),hostInfo:cf.describe(`Host application identification and version.`),hostCapabilities:m4.describe(`Features and capabilities provided by the host.`),hostContext:_4.describe(`Rich context about the host environment.`)}).passthrough();var v4=class{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(e,t){this.keyToValue.set(e,t),this.valueToKey.set(t,e)}getByKey(e){return this.keyToValue.get(e)}getByValue(e){return this.valueToKey.get(e)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}},y4=class{constructor(e){this.generateIdentifier=e,this.kv=new v4}register(e,t){this.kv.getByValue(e)||(t||=this.generateIdentifier(e),this.kv.set(t,e))}clear(){this.kv.clear()}getIdentifier(e){return this.kv.getByValue(e)}getValue(e){return this.kv.getByKey(e)}},b4=class extends y4{constructor(){super(e=>e.name),this.classToAllowedProps=new Map}register(e,t){typeof t==`object`?(t.allowProps&&this.classToAllowedProps.set(e,t.allowProps),super.register(e,t.identifier)):super.register(e,t)}getAllowedProps(e){return this.classToAllowedProps.get(e)}};function x4(e){if(`values`in Object)return Object.values(e);let t=[];for(let n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t}function S4(e,t){let n=x4(e);if(`find`in n)return n.find(t);let r=n;for(let e=0;e<r.length;e++){let n=r[e];if(t(n))return n}}function C4(e,t){Object.entries(e).forEach(([e,n])=>t(n,e))}function w4(e,t){return e.indexOf(t)!==-1}function T4(e,t){for(let n=0;n<e.length;n++){let r=e[n];if(t(r))return r}}var E4=class{constructor(){this.transfomers={}}register(e){this.transfomers[e.name]=e}findApplicable(e){return S4(this.transfomers,t=>t.isApplicable(e))}findByName(e){return this.transfomers[e]}},D4=e=>Object.prototype.toString.call(e).slice(8,-1),O4=e=>e===void 0,k4=e=>e===null,A4=e=>typeof e!=`object`||!e||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,j4=e=>A4(e)&&Object.keys(e).length===0,M4=e=>Array.isArray(e),N4=e=>typeof e==`string`,P4=e=>typeof e==`number`&&!isNaN(e),F4=e=>typeof e==`boolean`,I4=e=>e instanceof RegExp,L4=e=>e instanceof Map,R4=e=>e instanceof Set,z4=e=>D4(e)===`Symbol`,B4=e=>e instanceof Date&&!isNaN(e.valueOf()),V4=e=>e instanceof Error,H4=e=>typeof e==`number`&&isNaN(e),U4=e=>F4(e)||k4(e)||O4(e)||P4(e)||N4(e)||z4(e),W4=e=>typeof e==`bigint`,G4=e=>e===1/0||e===-1/0,K4=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),q4=e=>e instanceof URL,J4=e=>e.replace(/\\/g,`\\\\`).replace(/\./g,`\\.`),Y4=e=>e.map(String).map(J4).join(`.`),X4=(e,t)=>{let n=[],r=``;for(let i=0;i<e.length;i++){let a=e.charAt(i);if(!t&&a===`\\`){let t=e.charAt(i+1);if(t===`\\`){r+=`\\`,i++;continue}else if(t!==`.`)throw Error(`invalid path`)}if(a===`\\`&&e.charAt(i+1)===`.`){r+=`.`,i++;continue}if(a===`.`){n.push(r),r=``;continue}r+=a}let i=r;return n.push(i),n};function Z4(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}var Q4=[Z4(O4,`undefined`,()=>null,()=>void 0),Z4(W4,`bigint`,e=>e.toString(),e=>typeof BigInt<`u`?BigInt(e):(console.error(`Please add a BigInt polyfill.`),e)),Z4(B4,`Date`,e=>e.toISOString(),e=>new Date(e)),Z4(V4,`Error`,(e,t)=>{let n={name:e.name,message:e.message};return`cause`in e&&(n.cause=e.cause),t.allowedErrorProps.forEach(t=>{n[t]=e[t]}),n},(e,t)=>{let n=Error(e.message,{cause:e.cause});return n.name=e.name,n.stack=e.stack,t.allowedErrorProps.forEach(t=>{n[t]=e[t]}),n}),Z4(I4,`regexp`,e=>``+e,e=>{let t=e.slice(1,e.lastIndexOf(`/`)),n=e.slice(e.lastIndexOf(`/`)+1);return new RegExp(t,n)}),Z4(R4,`set`,e=>[...e.values()],e=>new Set(e)),Z4(L4,`map`,e=>[...e.entries()],e=>new Map(e)),Z4(e=>H4(e)||G4(e),`number`,e=>H4(e)?`NaN`:e>0?`Infinity`:`-Infinity`,Number),Z4(e=>e===0&&1/e==-1/0,`number`,()=>`-0`,Number),Z4(q4,`URL`,e=>e.toString(),e=>new URL(e))];function $4(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}var e3=$4((e,t)=>z4(e)?!!t.symbolRegistry.getIdentifier(e):!1,(e,t)=>[`symbol`,t.symbolRegistry.getIdentifier(e)],e=>e.description,(e,t,n)=>{let r=n.symbolRegistry.getValue(t[1]);if(!r)throw Error(`Trying to deserialize unknown symbol`);return r}),t3=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),n3=$4(K4,e=>[`typed-array`,e.constructor.name],e=>[...e],(e,t)=>{let n=t3[t[1]];if(!n)throw Error(`Trying to deserialize unknown typed array`);return new n(e)});function r3(e,t){return e?.constructor?!!t.classRegistry.getIdentifier(e.constructor):!1}var i3=$4(r3,(e,t)=>[`class`,t.classRegistry.getIdentifier(e.constructor)],(e,t)=>{let n=t.classRegistry.getAllowedProps(e.constructor);if(!n)return{...e};let r={};return n.forEach(t=>{r[t]=e[t]}),r},(e,t,n)=>{let r=n.classRegistry.getValue(t[1]);if(!r)throw 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)}),a3=$4((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)=>{let r=n.customTransformerRegistry.findByName(t[1]);if(!r)throw Error(`Trying to deserialize unknown custom value`);return r.deserialize(e)}),o3=[i3,e3,a3,n3],s3=(e,t)=>{let n=T4(o3,n=>n.isApplicable(e,t));if(n)return{value:n.transform(e,t),type:n.annotation(e,t)};let r=T4(Q4,n=>n.isApplicable(e,t));if(r)return{value:r.transform(e,t),type:r.annotation}},c3={};Q4.forEach(e=>{c3[e.annotation]=e});var l3=(e,t,n)=>{if(M4(t))switch(t[0]){case`symbol`:return e3.untransform(e,t,n);case`class`:return i3.untransform(e,t,n);case`custom`:return a3.untransform(e,t,n);case`typed-array`:return n3.untransform(e,t,n);default:throw Error(`Unknown transformation: `+t)}else{let r=c3[t];if(!r)throw Error(`Unknown transformation: `+t);return r.untransform(e,n)}},u3=(e,t)=>{if(t>e.size)throw Error(`index out of bounds`);let n=e.keys();for(;t>0;)n.next(),t--;return n.next().value};function d3(e){if(w4(e,`__proto__`))throw Error(`__proto__ is not allowed as a property`);if(w4(e,`prototype`))throw Error(`prototype is not allowed as a property`);if(w4(e,`constructor`))throw Error(`constructor is not allowed as a property`)}var f3=(e,t)=>{d3(t);for(let n=0;n<t.length;n++){let r=t[n];if(R4(e))e=u3(e,+r);else if(L4(e)){let i=+r,a=+t[++n]==0?`key`:`value`,o=u3(e,i);switch(a){case`key`:e=o;break;case`value`:e=e.get(o);break}}else e=e[r]}return e},p3=(e,t,n)=>{if(d3(t),t.length===0)return n(e);let r=e;for(let e=0;e<t.length-1;e++){let n=t[e];if(M4(r)){let e=+n;r=r[e]}else if(A4(r))r=r[n];else if(R4(r)){let e=+n;r=u3(r,e)}else if(L4(r)){if(e===t.length-2)break;let i=+n,a=+t[++e]==0?`key`:`value`,o=u3(r,i);switch(a){case`key`:r=o;break;case`value`:r=r.get(o);break}}}let i=t[t.length-1];if(M4(r)?r[+i]=n(r[+i]):A4(r)&&(r[i]=n(r[i])),R4(r)){let e=u3(r,+i),t=n(e);e!==t&&(r.delete(e),r.add(t))}if(L4(r)){let e=+t[t.length-2],a=u3(r,e);switch(+i==0?`key`:`value`){case`key`:{let e=n(a);r.set(e,r.get(a)),e!==a&&r.delete(a);break}case`value`:r.set(a,n(r.get(a)));break}}return e},m3=e=>e<1;function h3(e,t,n,r=[]){if(!e)return;let i=m3(n);if(!M4(e)){C4(e,(e,a)=>h3(e,t,n,[...r,...X4(a,i)]));return}let[a,o]=e;o&&C4(o,(e,a)=>{h3(e,t,n,[...r,...X4(a,i)])}),t(a,r)}function g3(e,t,n,r){return h3(t,(t,n)=>{e=p3(e,n,e=>l3(e,t,r))},n),e}function _3(e,t,n){let r=m3(n);function i(t,n){let i=f3(e,X4(n,r));t.map(e=>X4(e,r)).forEach(t=>{e=p3(e,t,()=>i)})}if(M4(t)){let[n,a]=t;n.forEach(t=>{e=p3(e,X4(t,r),()=>e)}),a&&C4(a,i)}else C4(t,i);return e}var v3=(e,t)=>A4(e)||M4(e)||L4(e)||R4(e)||V4(e)||r3(e,t);function y3(e,t,n){let r=n.get(e);r?r.push(t):n.set(e,[t])}function b3(e,t){let n={},r;return e.forEach(e=>{if(e.length<=1)return;t||(e=e.map(e=>e.map(String)).sort((e,t)=>e.length-t.length));let[i,...a]=e;i.length===0?r=a.map(Y4):n[Y4(i)]=a.map(Y4)}),r?j4(n)?[r]:[r,n]:j4(n)?void 0:n}var x3=(e,t,n,r,i=[],a=[],o=new Map)=>{let s=U4(e);if(!s){y3(e,i,t);let n=o.get(e);if(n)return r?{transformedValue:null}:n}if(!v3(e,n)){let t=s3(e,n),r=t?{transformedValue:t.value,annotations:[t.type]}:{transformedValue:e};return s||o.set(e,r),r}if(w4(a,e))return{transformedValue:null};let c=s3(e,n),l=c?.value??e,u=M4(l)?[]:{},d={};C4(l,(s,c)=>{if(c===`__proto__`||c===`constructor`||c===`prototype`)throw Error(`Detected property ${c}. This is a prototype pollution risk, please remove it from your object.`);let l=x3(s,t,n,r,[...i,c],[...a,e],o);u[c]=l.transformedValue,M4(l.annotations)?d[J4(c)]=l.annotations:A4(l.annotations)&&C4(l.annotations,(e,t)=>{d[J4(c)+`.`+t]=e})});let f=j4(d)?{transformedValue:u,annotations:c?[c.type]:void 0}:{transformedValue:u,annotations:c?[c.type,d]:d};return s||o.set(e,f),f};function S3(e){return Object.prototype.toString.call(e).slice(8,-1)}function C3(e){return S3(e)===`Array`}function w3(e){if(S3(e)!==`Object`)return!1;let t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function T3(e,t,n,r,i){let a={}.propertyIsEnumerable.call(r,t)?`enumerable`:`nonenumerable`;a===`enumerable`&&(e[t]=n),i&&a===`nonenumerable`&&Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}function E3(e,t={}){if(C3(e))return e.map(e=>E3(e,t));if(!w3(e))return e;let n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertySymbols(e);return[...n,...r].reduce((n,r)=>{if(r===`__proto__`||C3(t.props)&&!t.props.includes(r))return n;let i=e[r];return T3(n,r,E3(i,t),e,t.nonenumerable),n},{})}var D3=class{constructor({dedupe:e=!1}={}){this.classRegistry=new b4,this.symbolRegistry=new y4(e=>e.description??``),this.customTransformerRegistry=new E4,this.allowedErrorProps=[],this.dedupe=e}serialize(e){let t=new Map,n=x3(e,t,this,this.dedupe),r={json:n.transformedValue};n.annotations&&(r.meta={...r.meta,values:n.annotations});let i=b3(t,this.dedupe);return i&&(r.meta={...r.meta,referentialEqualities:i}),r.meta&&(r.meta.v=1),r}deserialize(e,t){let{json:n,meta:r}=e,i=t?.inPlace?n:E3(n);return r?.values&&(i=g3(i,r.values,r.v??0,this)),r?.referentialEqualities&&(i=_3(i,r.referentialEqualities,r.v??0)),i}stringify(e){return JSON.stringify(this.serialize(e))}parse(e){return this.deserialize(JSON.parse(e),{inPlace:!0})}registerClass(e,t){this.classRegistry.register(e,t)}registerSymbol(e,t){this.symbolRegistry.register(e,t)}registerCustom(e,t){this.customTransformerRegistry.register({name:t,...e})}allowErrorProps(...e){this.allowedErrorProps.push(...e)}};D3.defaultInstance=new D3,D3.serialize=D3.defaultInstance.serialize.bind(D3.defaultInstance),D3.deserialize=D3.defaultInstance.deserialize.bind(D3.defaultInstance),D3.stringify=D3.defaultInstance.stringify.bind(D3.defaultInstance),D3.parse=D3.defaultInstance.parse.bind(D3.defaultInstance),D3.registerClass=D3.defaultInstance.registerClass.bind(D3.defaultInstance),D3.registerSymbol=D3.defaultInstance.registerSymbol.bind(D3.defaultInstance),D3.registerCustom=D3.defaultInstance.registerCustom.bind(D3.defaultInstance),D3.allowErrorProps=D3.defaultInstance.allowErrorProps.bind(D3.defaultInstance),D3.serialize,D3.deserialize,D3.stringify,D3.parse,D3.registerClass,D3.registerCustom,D3.registerSymbol,D3.allowErrorProps,(0,b.createContext)(null);function O3(e,t,n,r,i){return{callTool:async(e,n)=>{t(`callTool`,{name:e,args:n});let i=await r(e,n??{});return t(`← callTool response`,i,`response`),i},sendFollowUpMessage:async e=>{t(`sendFollowUpMessage`,e)},openExternal:e=>{t(`openExternal`,e)},requestDisplayMode:async r=>(t(`requestDisplayMode`,r),e.displayMode=r.mode,n(`displayMode`,r.mode),{mode:r.mode}),setWidgetState:async r=>{t(`setWidgetState`,r),e.widgetState=r,n(`widgetState`,r)},requestModal:async r=>{t(`requestModal`,r),e.displayMode=`modal`,e.view={mode:`modal`},n(`displayMode`,`modal`)},uploadFile:async e=>(t(`uploadFile`,{name:e.name,size:e.size}),{fileId:`123`}),getFileDownloadUrl:async e=>(t(`getFileDownloadUrl`,e),{downloadUrl:`https://example.com/file.pdf`}),setOpenInAppUrl:async e=>{t(`setOpenInAppUrl`,e),i(e.href)}}}function k3(e,t){let n=[`theme`,`userAgent`,`locale`,`maxHeight`,`displayMode`,`safeArea`,`toolInput`,`toolOutput`,`toolResponseMetadata`,`view`,`widgetState`];return new Proxy(e||{},{set(e,r,i,a){let o=Reflect.set(e,r,i,a);if(n.includes(r)){let e=new a4(i4,{detail:{globals:{[r]:i}}});t.dispatchEvent(e)}return o}})}function A3(e,t,n,r,i,a){let o=k3(Rx(t),e);Sv(o,O3(o,n,r,i,a)),e.openai=o}function j3(e){let t=new DOMParser().parseFromString(e,`text/html`),n=t.querySelector(`script[type="module"]#dev-widget-entry`);if(!n)throw Error(`dev-widget-entry script not found`);return n.textContent=`
|
|
200
|
+
|
|
201
|
+
const waitForOpenAI = () => new Promise((resolve, reject) => {
|
|
202
|
+
if (typeof window === "undefined") { reject(new Error("window is not available")); return; }
|
|
203
|
+
if ("openai" in window && window.openai != null) { resolve(); return; }
|
|
204
|
+
Object.defineProperty(window, "openai", {
|
|
205
|
+
configurable: true,
|
|
206
|
+
enumerable: true,
|
|
207
|
+
get() { return undefined; },
|
|
208
|
+
set(value) {
|
|
209
|
+
Object.defineProperty(window, "openai", {
|
|
210
|
+
configurable: true,
|
|
211
|
+
enumerable: true,
|
|
212
|
+
writable: true,
|
|
213
|
+
value,
|
|
214
|
+
});
|
|
215
|
+
resolve();
|
|
216
|
+
},
|
|
217
|
+
});
|
|
218
|
+
});
|
|
219
|
+
|
|
220
|
+
await waitForOpenAI();
|
|
221
|
+
${n.textContent}
|
|
222
|
+
`,t.head.innerHTML+t.body.innerHTML}var M3=()=>{let e=UE(),{openaiObject:t}=sw(e.name)??{},{data:n}=WE(e._meta?.[`openai/outputTemplate`]),{setToolData:r,pushOpenAiLog:i,updateOpenaiObject:a,setOpenInAppUrl:o}=ow(),s=(0,b.useRef)(null),c=(0,b.useRef)(null),l=(0,b.useRef)(!1),u=n.contents[0].text,d=(0,b.useCallback)(()=>{if(l.current)return;let c=s.current;if(!c?.contentWindow||!c.contentDocument)return;l.current=!0;let d=n.contents[0]._meta?.[`openai/widgetDomain`];d&&typeof d==`string`&&o(e.name,d),A3(c.contentWindow,t,(t,n,r=`default`)=>{i(e.name,{timestamp:Date.now(),command:t,args:n,type:r})},(t,n)=>{a(e.name,t,n)},(e,t)=>ME.callTool(e,t),t=>{o(e.name,t)}),c.contentDocument.open(),c.contentDocument.write(j3(u)),c.contentDocument.close(),r(e.name,{openaiRef:s})},[t,i,r,a,o,e.name,u,n]);return(0,b.useEffect)(()=>{d()},[d]),(0,W.jsx)(`div`,{ref:c,className:`relative overflow-auto`,style:{width:`100%`,height:`100%`},children:(0,W.jsx)(`iframe`,{ref:s,src:`about:blank`,onLoad:d,style:{width:`100%`,height:`100%`,border:`none`,display:`block`},sandbox:`allow-scripts allow-same-origin allow-forms`,title:`html-preview`})})},N3=()=>{let e=UE(),t=sw(e.name),n=!!(e._meta?.[`openai/outputTemplate`]&&t?.response&&!t.response.isError);return(0,W.jsx)(`div`,{className:`flex-1 flex flex-col overflow-hidden relative z-10 h-full`,children:(0,W.jsxs)(`div`,{className:`flex flex-col flex-1 overflow-hidden min-h-0`,children:[(0,W.jsxs)(`div`,{className:`grid flex-1 grid-cols-[minmax(0,1fr)_1px_minmax(0,1fr)] overflow-hidden min-h-0`,children:[(0,W.jsx)(`div`,{className:`flex flex-col overflow-hidden h-full`,children:(0,W.jsx)(o1,{})}),(0,W.jsx)(`div`,{className:`bg-border`}),(0,W.jsx)(`div`,{className:`flex flex-col overflow-hidden h-full`,children:(0,W.jsx)(r4,{})})]}),n&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`div`,{className:`h-px bg-border`}),(0,W.jsxs)(`div`,{className:`grid flex-1 grid-cols-[minmax(0,1fr)_1px_minmax(240px,30%)] overflow-hidden bg-card min-h-0`,children:[(0,W.jsx)(`div`,{className:`flex flex-col h-full overflow-hidden`,children:(0,W.jsxs)(`div`,{className:`grid flex-1 grid-rows-[minmax(0,1fr)_1px_minmax(0,1fr)] overflow-hidden min-h-0`,children:[(0,W.jsx)(`div`,{className:`h-full overflow-hidden`,children:(0,W.jsx)(b.Suspense,{children:(0,W.jsx)(M3,{})})}),(0,W.jsx)(`div`,{className:`bg-border`}),(0,W.jsx)(`div`,{className:`p-4 flex flex-col h-full min-h-0`,children:(0,W.jsx)(Q2,{})})]})}),(0,W.jsx)(`div`,{className:`bg-border`}),(0,W.jsx)(`div`,{className:`flex flex-col overflow-hidden h-full min-h-0`,children:(0,W.jsx)(`div`,{className:`overflow-auto`,children:(0,W.jsx)(J2,{})})})]})]})]})})};function P3({state:e}){return(0,W.jsx)(`div`,{"aria-hidden":!0,className:`pointer-events-none absolute right-2 left-2 z-0 rounded-[10px] border border-border bg-card shadow-sm`,style:{top:e.top,height:e.height,opacity:e.opacity,transition:`top 260ms cubic-bezier(0.4, 0, 0.2, 1), height 260ms cubic-bezier(0.4, 0, 0.2, 1), opacity 160ms ease`}})}function F3(e){let t=(0,b.useRef)(null),[n,r]=(0,b.useState)({top:0,height:0,opacity:0});return(0,b.useLayoutEffect)(()=>{let n=t.current;if(!n)return;if(!e){r(e=>({...e,opacity:0}));return}let i=n.querySelector(`[data-id="${CSS.escape(e)}"]`);if(!i){r(e=>({...e,opacity:0}));return}let a=n.getBoundingClientRect(),o=i.getBoundingClientRect();r({top:o.top-a.top+n.scrollTop,height:o.height,opacity:1})},[e]),{ref:t,state:n}}function I3({selected:e}){return(0,W.jsx)(`span`,{className:yr(`mt-0.5 inline-flex size-5 shrink-0 items-center justify-center rounded-[5px] transition-colors`,e?`bg-primary text-primary-foreground`:`bg-muted text-subtle-foreground`),"aria-hidden":!0,children:(0,W.jsxs)(`svg`,{width:`10`,height:`10`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,W.jsx)(`title`,{children:`Tool`}),(0,W.jsx)(`path`,{d:`m8 6-6 6 6 6M16 6l6 6-6 6`})]})})}function L3(){let e=zE(),[t,n]=yw(),r=HE(),{ref:i,state:a}=F3(r?.name??null);return(0,b.useEffect)(()=>{if(t)return;let r=e?.[0]?.name;r&&n(r)},[t,e,n]),(0,W.jsxs)(`aside`,{className:`flex min-h-0 flex-col px-1 py-2.5`,children:[(0,W.jsxs)(`header`,{className:`flex items-center justify-between px-4 pt-2 pb-3`,children:[(0,W.jsx)(`h2`,{className:`text-[11px] font-semibold tracking-wider text-muted-foreground uppercase`,children:`Tools`}),(0,W.jsxs)(`span`,{className:`text-[11px] tabular-nums text-subtle-foreground`,children:[e?.length??0,` `,e?.length===1?`tool`:`tools`]})]}),(0,W.jsxs)(`div`,{ref:i,className:`relative min-h-0 flex-1 overflow-y-auto px-2`,children:[(0,W.jsx)(P3,{state:a}),e?.length===0?(0,W.jsx)(`div`,{className:`p-4 text-center text-sm text-muted-foreground`,children:`No tools registered yet.`}):e?.map(e=>{let t=e.name===r?.name;return(0,W.jsxs)(`button`,{type:`button`,"data-id":e.name,onClick:()=>n(e.name),className:yr(`relative z-[1] flex w-full items-start gap-2.5 rounded-[10px] px-3 py-2.5 text-left transition-colors`,`focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:outline-none`,t?`text-foreground`:`text-muted-foreground hover:text-foreground`),children:[(0,W.jsx)(I3,{selected:t}),(0,W.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,W.jsx)(`div`,{className:yr(`font-mono text-sm leading-5 font-semibold`,t?`text-foreground`:`text-muted-foreground`),children:e.name}),e.description&&(0,W.jsx)(`div`,{className:`mt-0.5 line-clamp-2 text-[11.5px] leading-[15px] text-subtle-foreground`,children:e.description})]})]},e.name)})]})]})}function R3(){let e=HE(),{status:t,requiresAuth:n}=vi();return(0,W.jsxs)(`div`,{className:`grid h-screen grid-rows-[auto_1fr] gap-3 overflow-hidden bg-background p-3`,children:[(0,W.jsx)(JE,{}),t===`authenticated`?(0,W.jsxs)(`div`,{className:`grid min-h-0 grid-cols-[280px_1fr] gap-3`,children:[(0,W.jsx)(L3,{}),(0,W.jsx)(`main`,{className:`overflow-hidden rounded-2xl border border-border bg-card shadow-sm`,children:e?(0,W.jsx)(N3,{}):(0,W.jsx)(YE,{})})]}):(0,W.jsx)(`div`,{className:`flex items-center justify-center rounded-2xl border border-border bg-card shadow-sm`,children:(0,W.jsxs)(`div`,{className:`space-y-4 text-center`,children:[(0,W.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:t===`connecting`?`Connecting to server...`:n?`Authentication required to access this server.`:`Not connected to a server.`}),t!==`connecting`&&(0,W.jsxs)(di,{variant:`secondary`,onClick:FE,children:[(0,W.jsx)(Br,{className:`size-3.5`}),`Connect`]})]})})]})}function z3(){return(0,W.jsx)(We,{client:bw,children:(0,W.jsx)(Gt,{children:(0,W.jsx)(R3,{})})})}async function B3(){let e=new URLSearchParams(window.location.search);if(e.get(`oauth_callback`)===`true`){let t=e.get(`code`),n=new URL(window.location.href);if(n.searchParams.delete(`oauth_callback`),n.searchParams.delete(`code`),n.searchParams.delete(`state`),window.history.replaceState({},``,n.toString()),t)try{await IE(t)}catch(e){console.error(`OAuth callback failed:`,e),vi.getState().setStatus(`error`),vi.getState().setError(e instanceof Error?e.message:`OAuth callback failed`)}else vi.getState().setStatus(`error`),vi.getState().setError(`OAuth callback missing authorization code`)}else FE().catch(e=>{console.error(`Connection failed:`,e)})}B3(),(0,x.createRoot)(document.getElementById(`root`)).render((0,W.jsx)(b.StrictMode,{children:(0,W.jsx)(z3,{})}));
|