@skybridge/devtools 2.0.0-alpha.c13294d → 2.0.0-alpha.ea364cb

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,271 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),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.7`})),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.7`})),_=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,ee={pending:!1,data:null,method:null,action:null},te=[],ne=-1;function R(e){return{current:e}}function z(e){0>ne||(e.current=te[ne],te[ne]=null,ne--)}function B(e,t){ne++,te[ne]=e.current,e.current=t}var re=R(null),ie=R(null),ae=R(null),oe=R(null);function se(e,t){switch(B(ae,t),B(ie,e),B(re,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Zd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Zd(t),e=Qd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}z(re),B(re,e)}function ce(){z(re),z(ie),z(ae)}function le(e){e.memoizedState!==null&&B(oe,e);var t=re.current,n=Qd(t,e.type);t!==n&&(B(ie,e),B(re,n))}function ue(e){ie.current===e&&(z(re),z(ie)),oe.current===e&&(z(oe),cp._currentValue=ee)}var de,fe;function pe(e){if(de===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);de=t&&t[1]||``,fe=-1<e.stack.indexOf(`
2
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
3
+ `+de+e+fe}var me=!1;function V(e,t){if(!e||me)return``;me=!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{me=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?pe(n):``}function he(e,t){switch(e.tag){case 26:case 27:case 5:return pe(e.type);case 16:return pe(`Lazy`);case 13:return e.child!==t&&t!==null?pe(`Suspense Fallback`):pe(`Suspense`);case 19:return pe(`SuspenseList`);case 0:case 15:return V(e.type,!1);case 11:return V(e.type.render,!1);case 1:return V(e.type,!0);case 31:return pe(`Activity`);default:return``}}function ge(e){try{var t=``,n=null;do t+=he(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
7
+ Error generating stack: `+e.message+`
8
+ `+e.stack}}var _e=Object.prototype.hasOwnProperty,ve=t.unstable_scheduleCallback,ye=t.unstable_cancelCallback,be=t.unstable_shouldYield,xe=t.unstable_requestPaint,Se=t.unstable_now,Ce=t.unstable_getCurrentPriorityLevel,we=t.unstable_ImmediatePriority,Te=t.unstable_UserBlockingPriority,Ee=t.unstable_NormalPriority,De=t.unstable_LowPriority,Oe=t.unstable_IdlePriority,ke=t.log,Ae=t.unstable_setDisableYieldValue,je=null,Me=null;function Ne(e){if(typeof ke==`function`&&Ae(e),Me&&typeof Me.setStrictMode==`function`)try{Me.setStrictMode(je,e)}catch{}}var Pe=Math.clz32?Math.clz32:Le,Fe=Math.log,Ie=Math.LN2;function Le(e){return e>>>=0,e===0?32:31-(Fe(e)/Ie|0)|0}var Re=256,ze=262144,Be=4194304;function Ve(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 He(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=Ve(n))):i=Ve(o):i=Ve(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ve(n))):i=Ve(o)):i=Ve(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 Ue(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function H(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 We(){var e=Be;return Be<<=1,!(Be&62914560)&&(Be=4194304),e}function Ge(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ke(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function qe(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-Pe(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&&Je(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Je(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Pe(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Ye(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Pe(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Xe(e,t){var n=t&-t;return n=n&42?1:Ze(n),(n&(e.suspendedLanes|t))===0?n:0}function Ze(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 Qe(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function $e(){var e=L.p;return e===0?(e=window.event,e===void 0?32:wp(e.type)):e}function et(e,t){var n=L.p;try{return L.p=e,t()}finally{L.p=n}}var tt=Math.random().toString(36).slice(2),nt=`__reactFiber$`+tt,rt=`__reactProps$`+tt,it=`__reactContainer$`+tt,at=`__reactEvents$`+tt,ot=`__reactListeners$`+tt,st=`__reactHandles$`+tt,ct=`__reactResources$`+tt,lt=`__reactMarker$`+tt;function ut(e){delete e[nt],delete e[rt],delete e[at],delete e[ot],delete e[st]}function dt(e){var t=e[nt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[it]||n[nt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=xf(e);e!==null;){if(n=e[nt])return n;e=xf(e)}return t}e=n,n=e.parentNode}return null}function ft(e){if(e=e[nt]||e[it]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function pt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function mt(e){var t=e[ct];return t||=e[ct]={hoistableStyles:new Map,hoistableScripts:new Map},t}function ht(e){e[lt]=!0}var gt=new Set,_t={};function vt(e,t){yt(e,t),yt(e+`Capture`,t)}function yt(e,t){for(_t[e]=t,e=0;e<t.length;e++)gt.add(t[e])}var bt=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]*$`),xt={},St={};function Ct(e){return _e.call(St,e)?!0:_e.call(xt,e)?!1:bt.test(e)?St[e]=!0:(xt[e]=!0,!1)}function wt(e,t,n){if(Ct(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 Tt(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 Et(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 Dt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Ot(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function kt(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 At(e){if(!e._valueTracker){var t=Ot(e)?`checked`:`value`;e._valueTracker=kt(e,t,``+e[t])}}function jt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Ot(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Mt(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 Nt=/[\n"\\]/g;function Pt(e){return e.replace(Nt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Ft(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=``+Dt(t)):e.value!==``+Dt(t)&&(e.value=``+Dt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Lt(e,o,Dt(n)):Lt(e,o,Dt(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=``+Dt(s):e.removeAttribute(`name`)}function It(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)){At(e);return}n=n==null?``:``+Dt(n),t=t==null?n:``+Dt(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),At(e)}function Lt(e,t,n){t===`number`&&Mt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Rt(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=``+Dt(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 zt(e,t,n){if(t!=null&&(t=``+Dt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Dt(n)}function Bt(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=Dt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),At(e)}function Vt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ht=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 Ut(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||Ht.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Wt(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&&Ut(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Ut(e,o,t[o])}function Gt(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 Kt=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`]]),qt=/^[\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 Jt(e){return qt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Yt(){}var Xt=null;function Zt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Qt=null,$t=null;function en(e){var t=ft(e);if(t&&(e=t.stateNode)){var n=e[rt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Ft(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="`+Pt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[rt]||null;if(!a)throw Error(i(90));Ft(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&&jt(r)}break a;case`textarea`:zt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Rt(e,!!n.multiple,t,!1)}}}var tn=!1;function nn(e,t,n){if(tn)return e(t,n);tn=!0;try{return e(t)}finally{if(tn=!1,(Qt!==null||$t!==null)&&(Du(),Qt&&(t=Qt,e=$t,$t=Qt=null,en(t),e)))for(t=0;t<e.length;t++)en(e[t])}}function rn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[rt]||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 an=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),on=!1;if(an)try{var sn={};Object.defineProperty(sn,"passive",{get:function(){on=!0}}),window.addEventListener(`test`,sn,sn),window.removeEventListener(`test`,sn,sn)}catch{on=!1}var cn=null,ln=null,un=null;function dn(){if(un)return un;var e,t=ln,n=t.length,r,i=`value`in cn?cn.value:cn.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 un=i.slice(e,1<r?1-r:void 0)}function fn(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 pn(){return!0}function mn(){return!1}function hn(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)?pn:mn,this.isPropagationStopped=mn,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=pn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=pn)},persist:function(){},isPersistent:pn}),t}var gn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},_n=hn(gn),vn=f({},gn,{view:0,detail:0}),yn=hn(vn),bn,xn,Sn,Cn=f({},vn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Pn,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!==Sn&&(Sn&&e.type===`mousemove`?(bn=e.screenX-Sn.screenX,xn=e.screenY-Sn.screenY):xn=bn=0,Sn=e),bn)},movementY:function(e){return`movementY`in e?e.movementY:xn}}),wn=hn(Cn),Tn=hn(f({},Cn,{dataTransfer:0})),En=hn(f({},vn,{relatedTarget:0})),Dn=hn(f({},gn,{animationName:0,elapsedTime:0,pseudoElement:0})),On=hn(f({},gn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),kn=hn(f({},gn,{data:0})),An={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},jn={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`},Mn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Nn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Mn[e])?!!t[e]:!1}function Pn(){return Nn}var Fn=hn(f({},vn,{key:function(e){if(e.key){var t=An[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=fn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?jn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Pn,charCode:function(e){return e.type===`keypress`?fn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?fn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),In=hn(f({},Cn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Ln=hn(f({},vn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Pn})),Rn=hn(f({},gn,{propertyName:0,elapsedTime:0,pseudoElement:0})),zn=hn(f({},Cn,{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})),Bn=hn(f({},gn,{newState:0,oldState:0})),Vn=[9,13,27,32],Hn=an&&`CompositionEvent`in window,Un=null;an&&`documentMode`in document&&(Un=document.documentMode);var Wn=an&&`TextEvent`in window&&!Un,Gn=an&&(!Hn||Un&&8<Un&&11>=Un),Kn=` `,qn=!1;function Jn(e,t){switch(e){case`keyup`:return Vn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Yn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Xn=!1;function Zn(e,t){switch(e){case`compositionend`:return Yn(t);case`keypress`:return t.which===32?(qn=!0,Kn):null;case`textInput`:return e=t.data,e===Kn&&qn?null:e;default:return null}}function Qn(e,t){if(Xn)return e===`compositionend`||!Hn&&Jn(e,t)?(e=dn(),un=ln=cn=null,Xn=!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 Gn&&t.locale!==`ko`?null:t.data;default:return null}}var $n={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 er(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!$n[e.type]:t===`textarea`}function tr(e,t,n,r){Qt?$t?$t.push(r):$t=[r]:Qt=r,t=Fd(t,`onChange`),0<t.length&&(n=new _n(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var nr=null,rr=null;function ir(e){Dd(e,0)}function ar(e){if(jt(pt(e)))return e}function or(e,t){if(e===`change`)return t}var sr=!1;if(an){var cr;if(an){var lr=`oninput`in document;if(!lr){var ur=document.createElement(`div`);ur.setAttribute(`oninput`,`return;`),lr=typeof ur.oninput==`function`}cr=lr}else cr=!1;sr=cr&&(!document.documentMode||9<document.documentMode)}function dr(){nr&&(nr.detachEvent(`onpropertychange`,fr),rr=nr=null)}function fr(e){if(e.propertyName===`value`&&ar(rr)){var t=[];tr(t,rr,e,Zt(e)),nn(ir,t)}}function pr(e,t,n){e===`focusin`?(dr(),nr=t,rr=n,nr.attachEvent(`onpropertychange`,fr)):e===`focusout`&&dr()}function mr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return ar(rr)}function hr(e,t){if(e===`click`)return ar(t)}function gr(e,t){if(e===`input`||e===`change`)return ar(t)}function _r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var vr=typeof Object.is==`function`?Object.is:_r;function yr(e,t){if(vr(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(!_e.call(t,i)||!vr(e[i],t[i]))return!1}return!0}function br(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function xr(e,t){var n=br(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=br(n)}}function Sr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Sr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Cr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Mt(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=Mt(e.document)}return t}function wr(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 Tr=an&&`documentMode`in document&&11>=document.documentMode,Er=null,Dr=null,Or=null,kr=!1;function Ar(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;kr||Er==null||Er!==Mt(r)||(r=Er,`selectionStart`in r&&wr(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}),Or&&yr(Or,r)||(Or=r,r=Fd(Dr,`onSelect`),0<r.length&&(t=new _n(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Er)))}function jr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Mr={animationend:jr(`Animation`,`AnimationEnd`),animationiteration:jr(`Animation`,`AnimationIteration`),animationstart:jr(`Animation`,`AnimationStart`),transitionrun:jr(`Transition`,`TransitionRun`),transitionstart:jr(`Transition`,`TransitionStart`),transitioncancel:jr(`Transition`,`TransitionCancel`),transitionend:jr(`Transition`,`TransitionEnd`)},Nr={},Pr={};an&&(Pr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Mr.animationend.animation,delete Mr.animationiteration.animation,delete Mr.animationstart.animation),`TransitionEvent`in window||delete Mr.transitionend.transition);function Fr(e){if(Nr[e])return Nr[e];if(!Mr[e])return e;var t=Mr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Pr)return Nr[e]=t[n];return e}var Ir=Fr(`animationend`),Lr=Fr(`animationiteration`),Rr=Fr(`animationstart`),zr=Fr(`transitionrun`),Br=Fr(`transitionstart`),Vr=Fr(`transitioncancel`),Hr=Fr(`transitionend`),Ur=new Map,Wr=`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(` `);Wr.push(`scrollEnd`);function Gr(e,t){Ur.set(e,t),vt(t,[e])}var Kr=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)},qr=[],Jr=0,Yr=0;function Xr(){for(var e=Jr,t=Yr=Jr=0;t<e;){var n=qr[t];qr[t++]=null;var r=qr[t];qr[t++]=null;var i=qr[t];qr[t++]=null;var a=qr[t];if(qr[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&&ei(n,i,a)}}function Zr(e,t,n,r){qr[Jr++]=e,qr[Jr++]=t,qr[Jr++]=n,qr[Jr++]=r,Yr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Qr(e,t,n,r){return Zr(e,t,n,r),ti(e)}function $r(e,t){return Zr(e,null,null,t),ti(e)}function ei(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-Pe(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ti(e){if(50<vu)throw vu=0,yu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ni={};function ri(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 ii(e,t,n,r){return new ri(e,t,n,r)}function ai(e){return e=e.prototype,!(!e||!e.isReactComponent)}function oi(e,t){var n=e.alternate;return n===null?(n=ii(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 si(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 ci(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)ai(e)&&(s=1);else if(typeof e==`string`)s=$f(e,n,re.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=ii(31,n,t,a),e.elementType=k,e.lanes=o,e;case y:return li(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=ii(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=ii(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=ii(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=ii(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function li(e,t,n,r){return e=ii(7,e,r,t),e.lanes=n,e}function ui(e,t,n){return e=ii(6,e,null,t),e.lanes=n,e}function di(e){var t=ii(18,null,null,0);return t.stateNode=e,t}function fi(e,t,n){return t=ii(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var pi=new WeakMap;function mi(e,t){if(typeof e==`object`&&e){var n=pi.get(e);return n===void 0?(t={value:e,source:t,stack:ge(t)},pi.set(e,t),t):n}return{value:e,source:t,stack:ge(t)}}var hi=[],gi=0,_i=null,vi=0,yi=[],bi=0,xi=null,Si=1,Ci=``;function wi(e,t){hi[gi++]=vi,hi[gi++]=_i,_i=e,vi=t}function Ti(e,t,n){yi[bi++]=Si,yi[bi++]=Ci,yi[bi++]=xi,xi=e;var r=Si;e=Ci;var i=32-Pe(r)-1;r&=~(1<<i),n+=1;var a=32-Pe(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Si=1<<32-Pe(t)+i|n<<i|r,Ci=a+e}else Si=1<<a|n<<i|r,Ci=e}function Ei(e){e.return!==null&&(wi(e,1),Ti(e,1,0))}function Di(e){for(;e===_i;)_i=hi[--gi],hi[gi]=null,vi=hi[--gi],hi[gi]=null;for(;e===xi;)xi=yi[--bi],yi[bi]=null,Ci=yi[--bi],yi[bi]=null,Si=yi[--bi],yi[bi]=null}function Oi(e,t){yi[bi++]=Si,yi[bi++]=Ci,yi[bi++]=xi,Si=t.id,Ci=t.overflow,xi=e}var ki=null,Ai=null,ji=!1,Mi=null,Ni=!1,Pi=Error(i(519));function Fi(e){throw Vi(mi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Pi}function Ii(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[nt]=e,t[rt]=r,n){case`dialog`:Od(`cancel`,t),Od(`close`,t);break;case`iframe`:case`object`:case`embed`:Od(`load`,t);break;case`video`:case`audio`:for(n=0;n<Td.length;n++)Od(Td[n],t);break;case`source`:Od(`error`,t);break;case`img`:case`image`:case`link`:Od(`error`,t),Od(`load`,t);break;case`details`:Od(`toggle`,t);break;case`input`:Od(`invalid`,t),It(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Od(`invalid`,t);break;case`textarea`:Od(`invalid`,t),Bt(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||Vd(t.textContent,n)?(r.popover!=null&&(Od(`beforetoggle`,t),Od(`toggle`,t)),r.onScroll!=null&&Od(`scroll`,t),r.onScrollEnd!=null&&Od(`scrollend`,t),r.onClick!=null&&(t.onclick=Yt),t=!0):t=!1,t||Fi(e,!0)}function Li(e){for(ki=e.return;ki;)switch(ki.tag){case 5:case 31:case 13:Ni=!1;return;case 27:case 3:Ni=!0;return;default:ki=ki.return}}function Ri(e){if(e!==ki)return!1;if(!ji)return Li(e),ji=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||$d(e.type,e.memoizedProps)),n=!n),n&&Ai&&Fi(e),Li(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ai=bf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ai=bf(e)}else t===27?(t=Ai,cf(e.type)?(e=yf,yf=null,Ai=e):Ai=t):Ai=ki?vf(e.stateNode.nextSibling):null;return!0}function zi(){Ai=ki=null,ji=!1}function Bi(){var e=Mi;return e!==null&&(iu===null?iu=e:iu.push.apply(iu,e),Mi=null),e}function Vi(e){Mi===null?Mi=[e]:Mi.push(e)}var Hi=R(null),Ui=null,Wi=null;function Gi(e,t,n){B(Hi,t._currentValue),t._currentValue=n}function Ki(e){e._currentValue=Hi.current,z(Hi)}function qi(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 Ji(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),qi(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),qi(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 Yi(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;vr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===oe.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[cp]:e.push(cp))}a=a.return}e!==null&&Ji(t,e,n,r),t.flags|=262144}function Xi(e){for(e=e.firstContext;e!==null;){if(!vr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Zi(e){Ui=e,Wi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Qi(e){return ea(Ui,e)}function $i(e,t){return Ui===null&&Zi(e),ea(e,t)}function ea(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Wi===null){if(e===null)throw Error(i(308));Wi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Wi=Wi.next=t;return n}var ta=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()})}},na=t.unstable_scheduleCallback,ra=t.unstable_NormalPriority,ia={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function aa(){return{controller:new ta,data:new Map,refCount:0}}function oa(e){e.refCount--,e.refCount===0&&na(ra,function(){e.controller.abort()})}var sa=null,ca=0,la=0,ua=null;function da(e,t){if(sa===null){var n=sa=[];ca=0,la=yd(),ua={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ca++,t.then(fa,fa),t}function fa(){if(--ca===0&&sa!==null){ua!==null&&(ua.status=`fulfilled`);var e=sa;sa=null,la=0,ua=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function pa(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 ma=I.S;I.S=function(e,t){su=Se(),typeof t==`object`&&t&&typeof t.then==`function`&&da(e,t),ma!==null&&ma(e,t)};var ha=R(null);function ga(){var e=ha.current;return e===null?Hl.pooledCache:e}function _a(e,t){t===null?B(ha,ha.current):B(ha,t.pool)}function va(){var e=ga();return e===null?null:{parent:ia._currentValue,pool:e}}var ya=Error(i(460)),ba=Error(i(474)),xa=Error(i(542)),Sa={then:function(){}};function Ca(e){return e=e.status,e===`fulfilled`||e===`rejected`}function wa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Yt,Yt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Oa(e),e;default:if(typeof t.status==`string`)t.then(Yt,Yt);else{if(e=Hl,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,Oa(e),e}throw Ea=t,ya}}function Ta(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ea=e,ya):e}}var Ea=null;function Da(){if(Ea===null)throw Error(i(459));var e=Ea;return Ea=null,e}function Oa(e){if(e===ya||e===xa)throw Error(i(483))}var ka=null,Aa=0;function ja(e){var t=Aa;return Aa+=1,ka===null&&(ka=[]),wa(ka,e,t)}function Ma(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Na(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 Pa(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=oi(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=ui(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&&Ta(i)===t.type)?(t=a(t,n.props),Ma(t,n),t.return=e,t):(t=ci(n.type,n.key,n.props,null,e.mode,r),Ma(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=fi(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=li(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=ui(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case g:return n=ci(t.type,t.key,t.props,null,e.mode,n),Ma(n,t),n.return=e,n;case v:return t=fi(t,e.mode,n),t.return=e,t;case O:return t=Ta(t),f(e,t,n)}if(F(t)||M(t))return t=li(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,ja(t),n);if(t.$$typeof===C)return f(e,$i(e,t),n);Na(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=Ta(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,ja(n),r);if(n.$$typeof===C)return p(e,t,$i(e,n),r);Na(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=Ta(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,ja(r),i);if(r.$$typeof===C)return m(e,t,n,$i(t,r),i);Na(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),ji&&wi(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 ji&&wi(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)}),ji&&wi(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),ji&&wi(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 ji&&wi(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)}),ji&&wi(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&&Ta(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ma(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=li(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ci(o.type,o.key,o.props,null,e.mode,c),Ma(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=fi(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=Ta(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,ja(o),c);if(o.$$typeof===C)return b(e,r,$i(e,o),c);Na(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=ui(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Aa=0;var i=b(e,t,n,r);return ka=null,i}catch(t){if(t===ya||t===xa)throw t;var a=ii(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Fa=Pa(!0),Ia=Pa(!1),La=!1;function Ra(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function za(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 Ba(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Va(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Vl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ti(e),ei(e,null,n),t}return Zr(e,r,t,n),ti(e)}function Ha(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,Ye(e,n)}}function Ua(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 Wa=!1;function Ga(){if(Wa){var e=ua;if(e!==null)throw e}}function Ka(e,t,n,r){Wa=!1;var i=e.updateQueue;La=!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?(Wl&p)===p:(r&p)===p){p!==0&&p===la&&(Wa=!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:La=!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),Ql|=o,e.lanes=o,e.memoizedState=d}}function qa(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Ja(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)qa(n[e],t)}var Ya=R(null),Xa=R(0);function Za(e,t){e=Xl,B(Xa,e),B(Ya,t),Xl=e|t.baseLanes}function Qa(){B(Xa,Xl),B(Ya,Ya.current)}function $a(){Xl=Xa.current,z(Ya),z(Xa)}var eo=R(null),to=null;function no(e){var t=e.alternate;B(so,so.current&1),B(eo,e),to===null&&(t===null||Ya.current!==null||t.memoizedState!==null)&&(to=e)}function ro(e){B(so,so.current),B(eo,e),to===null&&(to=e)}function io(e){e.tag===22?(B(so,so.current),B(eo,e),to===null&&(to=e)):ao(e)}function ao(){B(so,so.current),B(eo,eo.current)}function oo(e){z(eo),to===e&&(to=null),z(so)}var so=R(0);function co(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||hf(n)||gf(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 lo=0,uo=null,fo=null,po=null,mo=!1,ho=!1,go=!1,_o=0,vo=0,yo=null,bo=0;function xo(){throw Error(i(321))}function So(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!vr(e[n],t[n]))return!1;return!0}function Co(e,t,n,r,i,a){return lo=a,uo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,I.H=e===null||e.memoizedState===null?zs:Bs,go=!1,a=n(r,i),go=!1,ho&&(a=To(t,n,r,i)),wo(e),a}function wo(e){I.H=Rs;var t=fo!==null&&fo.next!==null;if(lo=0,po=fo=uo=null,mo=!1,vo=0,yo=null,t)throw Error(i(300));e===null||rc||(e=e.dependencies,e!==null&&Xi(e)&&(rc=!0))}function To(e,t,n,r){uo=e;var a=0;do{if(ho&&(yo=null),vo=0,ho=!1,25<=a)throw Error(i(301));if(a+=1,po=fo=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=Vs,o=t(n,r)}while(ho);return o}function Eo(){var e=I.H,t=e.useState()[0];return t=typeof t.then==`function`?No(t):t,e=e.useState()[0],(fo===null?null:fo.memoizedState)!==e&&(uo.flags|=1024),t}function Do(){var e=_o!==0;return _o=0,e}function Oo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ko(e){if(mo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}mo=!1}lo=0,po=fo=uo=null,ho=!1,vo=_o=0,yo=null}function Ao(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return po===null?uo.memoizedState=po=e:po=po.next=e,po}function jo(){if(fo===null){var e=uo.alternate;e=e===null?null:e.memoizedState}else e=fo.next;var t=po===null?uo.memoizedState:po.next;if(t!==null)po=t,fo=e;else{if(e===null)throw uo.alternate===null?Error(i(467)):Error(i(310));fo=e,e={memoizedState:fo.memoizedState,baseState:fo.baseState,baseQueue:fo.baseQueue,queue:fo.queue,next:null},po===null?uo.memoizedState=po=e:po=po.next=e}return po}function Mo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function No(e){var t=vo;return vo+=1,yo===null&&(yo=[]),e=wa(yo,e,t),t=uo,(po===null?t.memoizedState:po.next)===null&&(t=t.alternate,I.H=t===null||t.memoizedState===null?zs:Bs),e}function Po(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return No(e);if(e.$$typeof===C)return Qi(e)}throw Error(i(438,String(e)))}function Fo(e){var t=null,n=uo.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=uo.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=Mo(),uo.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 Io(e,t){return typeof t==`function`?t(e):t}function Lo(e){return Ro(jo(),fo,e)}function Ro(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?(lo&f)===f:(Wl&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===la&&(d=!0);else if((lo&p)===p){u=u.next,p===la&&(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,uo.lanes|=p,Ql|=p;f=u.action,go&&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,uo.lanes|=f,Ql|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!vr(o,e.memoizedState)&&(rc=!0,d&&(n=ua,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 zo(e){var t=jo(),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);vr(o,t.memoizedState)||(rc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Bo(e,t,n){var r=uo,a=jo(),o=ji;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!vr((fo||a).memoizedState,n);if(s&&(a.memoizedState=n,rc=!0),a=a.queue,ds(Uo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||po!==null&&po.memoizedState.tag&1){if(r.flags|=2048,os(9,{destroy:void 0},Ho.bind(null,r,a,n,t),null),Hl===null)throw Error(i(349));o||lo&127||Vo(r,t,n)}return n}function Vo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=uo.updateQueue,t===null?(t=Mo(),uo.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ho(e,t,n,r){t.value=n,t.getSnapshot=r,Wo(t)&&Go(e)}function Uo(e,t,n){return n(function(){Wo(t)&&Go(e)})}function Wo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!vr(e,n)}catch{return!0}}function Go(e){var t=$r(e,2);t!==null&&Su(t,e,2)}function Ko(e){var t=Ao();if(typeof e==`function`){var n=e;if(e=n(),go){Ne(!0);try{n()}finally{Ne(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:e},t}function qo(e,t,n,r){return e.baseState=n,Ro(e,fo,typeof r==`function`?r:Io)}function Jo(e,t,n,r,a){if(Fs(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,Yo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Yo(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),Xo(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),Xo(e,t,a)}catch(n){Qo(e,t,n)}}function Xo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Zo(e,t,n)},function(n){return Qo(e,t,n)}):Zo(e,t,n)}function Zo(e,t,n){t.status=`fulfilled`,t.value=n,$o(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Yo(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,$o(t),t=t.next;while(t!==r)}e.action=null}function $o(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function es(e,t){return t}function ts(e,t){if(ji){var n=Hl.formState;if(n!==null){a:{var r=uo;if(ji){if(Ai){b:{for(var i=Ai,a=Ni;i.nodeType!==8;){if(!a){i=null;break b}if(i=vf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ai=vf(i.nextSibling),r=i.data===`F!`;break a}}Fi(r)}r=!1}r&&(t=n[0])}}return n=Ao(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:es,lastRenderedState:t},n.queue=r,n=Ms.bind(null,uo,r),r.dispatch=n,r=Ko(!1),a=Ps.bind(null,uo,!1,r.queue),r=Ao(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Jo.bind(null,uo,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ns(e){return rs(jo(),fo,e)}function rs(e,t,n){if(t=Ro(e,t,es)[0],e=Lo(Io)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=No(t)}catch(e){throw e===ya?xa:e}else r=t;t=jo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(uo.flags|=2048,os(9,{destroy:void 0},is.bind(null,i,n),null)),[r,a,e]}function is(e,t){e.action=t}function as(e){var t=jo(),n=fo;if(n!==null)return rs(t,n,e);jo(),t=t.memoizedState,n=jo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function os(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=uo.updateQueue,t===null&&(t=Mo(),uo.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 ss(){return jo().memoizedState}function cs(e,t,n,r){var i=Ao();uo.flags|=e,i.memoizedState=os(1|t,{destroy:void 0},n,r===void 0?null:r)}function ls(e,t,n,r){var i=jo();r=r===void 0?null:r;var a=i.memoizedState.inst;fo!==null&&r!==null&&So(r,fo.memoizedState.deps)?i.memoizedState=os(t,a,n,r):(uo.flags|=e,i.memoizedState=os(1|t,a,n,r))}function us(e,t){cs(8390656,8,e,t)}function ds(e,t){ls(2048,8,e,t)}function fs(e){uo.flags|=4;var t=uo.updateQueue;if(t===null)t=Mo(),uo.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ps(e){var t=jo().memoizedState;return fs({ref:t,nextImpl:e}),function(){if(Vl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function ms(e,t){return ls(4,2,e,t)}function hs(e,t){return ls(4,4,e,t)}function gs(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 _s(e,t,n){n=n==null?null:n.concat([e]),ls(4,4,gs.bind(null,t,e),n)}function vs(){}function ys(e,t){var n=jo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&So(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function bs(e,t){var n=jo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&So(t,r[1]))return r[0];if(r=e(),go){Ne(!0);try{e()}finally{Ne(!1)}}return n.memoizedState=[r,t],r}function xs(e,t,n){return n===void 0||lo&1073741824&&!(Wl&261930)?e.memoizedState=t:(e.memoizedState=n,e=xu(),uo.lanes|=e,Ql|=e,n)}function Ss(e,t,n,r){return vr(n,t)?n:Ya.current===null?!(lo&42)||lo&1073741824&&!(Wl&261930)?(rc=!0,e.memoizedState=n):(e=xu(),uo.lanes|=e,Ql|=e,t):(e=xs(e,n,r),vr(e,t)||(rc=!0),e)}function Cs(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,Ps(e,!1,t,n);try{var c=i(),l=I.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ns(e,t,pa(c,r),bu(e)):Ns(e,t,r,bu(e))}catch(n){Ns(e,t,{then:function(){},status:`rejected`,reason:n},bu())}finally{L.p=a,o!==null&&s.types!==null&&(o.types=s.types),I.T=o}}function ws(){}function Ts(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Es(e).queue;Cs(e,a,t,ee,n===null?ws:function(){return Ds(e),n(r)})}function Es(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:ee},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ds(e){var t=Es(e);t.next===null&&(t=e.alternate.memoizedState),Ns(e,t.next.queue,{},bu())}function U(){return Qi(cp)}function Os(){return jo().memoizedState}function ks(){return jo().memoizedState}function As(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=bu();e=Ba(n);var r=Va(t,e,n);r!==null&&(Su(r,t,n),Ha(r,t,n)),t={cache:aa()},e.payload=t;return}t=t.return}}function js(e,t,n){var r=bu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Fs(e)?Is(t,n):(n=Qr(e,t,n,r),n!==null&&(Su(n,e,r),Ls(n,t,r)))}function Ms(e,t,n){Ns(e,t,n,bu())}function Ns(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Fs(e))Is(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,vr(s,o))return Zr(e,t,i,0),Hl===null&&Xr(),!1}catch{}if(n=Qr(e,t,i,r),n!==null)return Su(n,e,r),Ls(n,t,r),!0}return!1}function Ps(e,t,n,r){if(r={lane:2,revertLane:yd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Fs(e)){if(t)throw Error(i(479))}else t=Qr(e,n,r,2),t!==null&&Su(t,e,2)}function Fs(e){var t=e.alternate;return e===uo||t!==null&&t===uo}function Is(e,t){ho=mo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ls(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ye(e,n)}}var Rs={readContext:Qi,use:Po,useCallback:xo,useContext:xo,useEffect:xo,useImperativeHandle:xo,useLayoutEffect:xo,useInsertionEffect:xo,useMemo:xo,useReducer:xo,useRef:xo,useState:xo,useDebugValue:xo,useDeferredValue:xo,useTransition:xo,useSyncExternalStore:xo,useId:xo,useHostTransitionStatus:xo,useFormState:xo,useActionState:xo,useOptimistic:xo,useMemoCache:xo,useCacheRefresh:xo};Rs.useEffectEvent=xo;var zs={readContext:Qi,use:Po,useCallback:function(e,t){return Ao().memoizedState=[e,t===void 0?null:t],e},useContext:Qi,useEffect:us,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),cs(4194308,4,gs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return cs(4194308,4,e,t)},useInsertionEffect:function(e,t){cs(4,2,e,t)},useMemo:function(e,t){var n=Ao();t=t===void 0?null:t;var r=e();if(go){Ne(!0);try{e()}finally{Ne(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Ao();if(n!==void 0){var i=n(t);if(go){Ne(!0);try{n(t)}finally{Ne(!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=js.bind(null,uo,e),[r.memoizedState,e]},useRef:function(e){var t=Ao();return e={current:e},t.memoizedState=e},useState:function(e){e=Ko(e);var t=e.queue,n=Ms.bind(null,uo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:vs,useDeferredValue:function(e,t){return xs(Ao(),e,t)},useTransition:function(){var e=Ko(!1);return e=Cs.bind(null,uo,e.queue,!0,!1),Ao().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=uo,a=Ao();if(ji){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Hl===null)throw Error(i(349));Wl&127||Vo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,us(Uo.bind(null,r,o,e),[e]),r.flags|=2048,os(9,{destroy:void 0},Ho.bind(null,r,o,n,t),null),n},useId:function(){var e=Ao(),t=Hl.identifierPrefix;if(ji){var n=Ci,r=Si;n=(r&~(1<<32-Pe(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=_o++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=bo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:U,useFormState:ts,useActionState:ts,useOptimistic:function(e){var t=Ao();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ps.bind(null,uo,!0,n),n.dispatch=t,[e,t]},useMemoCache:Fo,useCacheRefresh:function(){return Ao().memoizedState=As.bind(null,uo)},useEffectEvent:function(e){var t=Ao(),n={impl:e};return t.memoizedState=n,function(){if(Vl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Bs={readContext:Qi,use:Po,useCallback:ys,useContext:Qi,useEffect:ds,useImperativeHandle:_s,useInsertionEffect:ms,useLayoutEffect:hs,useMemo:bs,useReducer:Lo,useRef:ss,useState:function(){return Lo(Io)},useDebugValue:vs,useDeferredValue:function(e,t){return Ss(jo(),fo.memoizedState,e,t)},useTransition:function(){var e=Lo(Io)[0],t=jo().memoizedState;return[typeof e==`boolean`?e:No(e),t]},useSyncExternalStore:Bo,useId:Os,useHostTransitionStatus:U,useFormState:ns,useActionState:ns,useOptimistic:function(e,t){return qo(jo(),fo,e,t)},useMemoCache:Fo,useCacheRefresh:ks};Bs.useEffectEvent=ps;var Vs={readContext:Qi,use:Po,useCallback:ys,useContext:Qi,useEffect:ds,useImperativeHandle:_s,useInsertionEffect:ms,useLayoutEffect:hs,useMemo:bs,useReducer:zo,useRef:ss,useState:function(){return zo(Io)},useDebugValue:vs,useDeferredValue:function(e,t){var n=jo();return fo===null?xs(n,e,t):Ss(n,fo.memoizedState,e,t)},useTransition:function(){var e=zo(Io)[0],t=jo().memoizedState;return[typeof e==`boolean`?e:No(e),t]},useSyncExternalStore:Bo,useId:Os,useHostTransitionStatus:U,useFormState:as,useActionState:as,useOptimistic:function(e,t){var n=jo();return fo===null?(n.baseState=e,[e,n.queue.dispatch]):qo(n,fo,e,t)},useMemoCache:Fo,useCacheRefresh:ks};Vs.useEffectEvent=ps;function Hs(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 Us={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=bu(),i=Ba(r);i.payload=t,n!=null&&(i.callback=n),t=Va(e,i,r),t!==null&&(Su(t,e,r),Ha(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=bu(),i=Ba(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Va(e,i,r),t!==null&&(Su(t,e,r),Ha(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=bu(),r=Ba(n);r.tag=2,t!=null&&(r.callback=t),t=Va(e,r,n),t!==null&&(Su(t,e,n),Ha(t,e,n))}};function Ws(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?!yr(n,r)||!yr(i,a):!0}function Gs(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&&Us.enqueueReplaceState(t,t.state,null)}function Ks(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 qs(e){Kr(e)}function Js(e){console.error(e)}function Ys(e){Kr(e)}function Xs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Zs(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 Qs(e,t,n){return n=Ba(n),n.tag=3,n.payload={element:null},n.callback=function(){Xs(e,t)},n}function $s(e){return e=Ba(e),e.tag=3,e}function ec(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(){Zs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Zs(t,n,r),typeof i!=`function`&&(uu===null?uu=new Set([this]):uu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function tc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Yi(t,n,a,!0),n=eo.current,n!==null){switch(n.tag){case 31:case 13:return to===null?Pu():n.alternate===null&&Zl===0&&(Zl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Sa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),$u(e,r,a)),!1;case 22:return n.flags|=65536,r===Sa?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)),$u(e,r,a)),!1}throw Error(i(435,n.tag))}return $u(e,r,a),Pu(),!1}if(ji)return t=eo.current,t===null?(r!==Pi&&(t=Error(i(423),{cause:r}),Vi(mi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=mi(r,n),a=Qs(e.stateNode,r,a),Ua(e,a),Zl!==4&&(Zl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Pi&&(e=Error(i(422),{cause:r}),Vi(mi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=mi(o,n),ru===null?ru=[o]:ru.push(o),Zl!==4&&(Zl=2),t===null)return!0;r=mi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Qs(n.stateNode,r,e),Ua(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`&&(uu===null||!uu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=$s(a),ec(a,e,n,r),Ua(n,a),!1}n=n.return}while(n!==null);return!1}var nc=Error(i(461)),rc=!1;function ic(e,t,n,r){t.child=e===null?Ia(t,null,n,r):Fa(t,e.child,n,r)}function ac(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 Zi(t),r=Co(e,t,n,o,a,i),s=Do(),e!==null&&!rc?(Oo(e,t,i),kc(e,t,i)):(ji&&s&&Ei(t),t.flags|=1,ic(e,t,r,i),t.child)}function oc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ai(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,sc(e,t,a,r,i)):(e=ci(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Ac(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?yr:n,n(o,r)&&e.ref===t.ref)return kc(e,t,i)}return t.flags|=1,e=oi(a,r),e.ref=t.ref,e.return=t,t.child=e}function sc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(yr(a,r)&&e.ref===t.ref)if(rc=!1,t.pendingProps=r=a,Ac(e,i))e.flags&131072&&(rc=!0);else return t.lanes=e.lanes,kc(e,t,i)}return hc(e,t,n,r,i)}function cc(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 uc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&_a(t,a===null?null:a.cachePool),a===null?Qa():Za(t,a),io(t);else return r=t.lanes=536870912,uc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&_a(t,null),Qa(),ao(t)):(_a(t,a.cachePool),Za(t,a),ao(t),t.memoizedState=null);return ic(e,t,i,n),t.child}function lc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function uc(e,t,n,r,i){var a=ga();return a=a===null?null:{parent:ia._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&_a(t,null),Qa(),io(t),e!==null&&Yi(e,t,r,!0),t.childLanes=i,null}function dc(e,t){return t=wc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function fc(e,t,n){return Fa(t,e.child,null,n),e=dc(t,t.pendingProps),e.flags|=2,oo(t),t.memoizedState=null,e}function pc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(ji){if(r.mode===`hidden`)return e=dc(t,r),t.lanes=536870912,lc(null,e);if(ro(t),(e=Ai)?(e=mf(e,Ni),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:xi===null?null:{id:Si,overflow:Ci},retryLane:536870912,hydrationErrors:null},n=di(e),n.return=t,t.child=n,ki=t,Ai=null)):e=null,e===null)throw Fi(t);return t.lanes=536870912,null}return dc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(ro(t),a)if(t.flags&256)t.flags&=-257,t=fc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(rc||Yi(e,t,n,!1),a=(n&e.childLanes)!==0,rc||a){if(r=Hl,r!==null&&(s=Xe(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,$r(e,s),Su(r,e,s),nc;Pu(),t=fc(e,t,n)}else e=o.treeContext,Ai=vf(s.nextSibling),ki=t,ji=!0,Mi=null,Ni=!1,e!==null&&Oi(t,e),t=dc(t,r),t.flags|=4096;return t}return e=oi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function mc(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 hc(e,t,n,r,i){return Zi(t),n=Co(e,t,n,r,void 0,i),r=Do(),e!==null&&!rc?(Oo(e,t,i),kc(e,t,i)):(ji&&r&&Ei(t),t.flags|=1,ic(e,t,n,i),t.child)}function gc(e,t,n,r,i,a){return Zi(t),t.updateQueue=null,n=To(t,r,n,i),wo(e),r=Do(),e!==null&&!rc?(Oo(e,t,a),kc(e,t,a)):(ji&&r&&Ei(t),t.flags|=1,ic(e,t,n,a),t.child)}function _c(e,t,n,r,i){if(Zi(t),t.stateNode===null){var a=ni,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=Us,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ra(t),o=n.contextType,a.context=typeof o==`object`&&o?Qi(o):ni,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Hs(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&&Us.enqueueReplaceState(a,a.state,null),Ka(t,r,a,i),Ga(),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=Ks(n,s);a.props=c;var l=a.context,u=n.contextType;o=ni,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)&&Gs(t,a,r,o),La=!1;var f=t.memoizedState;a.state=f,Ka(t,r,a,i),Ga(),l=t.memoizedState,s||f!==l||La?(typeof d==`function`&&(Hs(t,n,d,r),l=t.memoizedState),(c=La||Ws(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,za(e,t),o=t.memoizedProps,u=Ks(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ni,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)&&Gs(t,a,r,c),La=!1,f=t.memoizedState,a.state=f,Ka(t,r,a,i),Ga();var p=t.memoizedState;o!==d||f!==p||La||e!==null&&e.dependencies!==null&&Xi(e.dependencies)?(typeof s==`function`&&(Hs(t,n,s,r),p=t.memoizedState),(u=La||Ws(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Xi(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,mc(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=Fa(t,e.child,null,i),t.child=Fa(t,null,n,i)):ic(e,t,n,i),t.memoizedState=a.state,e=t.child):e=kc(e,t,i),e}function vc(e,t,n,r){return zi(),t.flags|=256,ic(e,t,n,r),t.child}var yc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function bc(e){return{baseLanes:e,cachePool:va()}}function xc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=tu),e}function Sc(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:(so.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(ji){if(a?no(t):ao(t),(e=Ai)?(e=mf(e,Ni),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:xi===null?null:{id:Si,overflow:Ci},retryLane:536870912,hydrationErrors:null},n=di(e),n.return=t,t.child=n,ki=t,Ai=null)):e=null,e===null)throw Fi(t);return gf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(ao(t),a=t.mode,c=wc({mode:`hidden`,children:c},a),r=li(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=bc(n),r.childLanes=xc(e,s,n),t.memoizedState=yc,lc(null,r)):(no(t),Cc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(no(t),t.flags&=-257,t=Tc(e,t,n)):t.memoizedState===null?(ao(t),c=r.fallback,a=t.mode,r=wc({mode:`visible`,children:r.children},a),c=li(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Fa(t,e.child,null,n),r=t.child,r.memoizedState=bc(n),r.childLanes=xc(e,s,n),t.memoizedState=yc,t=lc(null,r)):(ao(t),t.child=e.child,t.flags|=128,t=null);else if(no(t),gf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Vi({value:r,source:null,stack:null}),t=Tc(e,t,n)}else if(rc||Yi(e,t,n,!1),s=(n&e.childLanes)!==0,rc||s){if(s=Hl,s!==null&&(r=Xe(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,$r(e,r),Su(s,e,r),nc;hf(c)||Pu(),t=Tc(e,t,n)}else hf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ai=vf(c.nextSibling),ki=t,ji=!0,Mi=null,Ni=!1,e!==null&&Oi(t,e),t=Cc(t,r.children),t.flags|=4096);return t}return a?(ao(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=oi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=li(c,a,n,null),c.flags|=2):c=oi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,lc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=bc(n):(a=c.cachePool,a===null?a=va():(l=ia._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=xc(e,s,n),t.memoizedState=yc,lc(e.child,r)):(no(t),n=e.child,e=n.sibling,n=oi(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 Cc(e,t){return t=wc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function wc(e,t){return e=ii(22,e,null,t),e.lanes=0,e}function Tc(e,t,n){return Fa(t,e.child,null,n),e=Cc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ec(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),qi(e.return,t,n)}function Dc(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 Oc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=so.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,B(so,o),ic(e,t,r,n),r=ji?vi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ec(e,n,t);else if(e.tag===19)Ec(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&&co(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Dc(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&&co(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Dc(t,!0,n,null,a,r);break;case`together`:Dc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function kc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ql|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Yi(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=oi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=oi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ac(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Xi(e))):!0}function jc(e,t,n){switch(t.tag){case 3:se(t,t.stateNode.containerInfo),Gi(t,ia,e.memoizedState.cache),zi();break;case 27:case 5:le(t);break;case 4:se(t,t.stateNode.containerInfo);break;case 10:Gi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ro(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(no(t),e=kc(e,t,n),e===null?null:e.sibling):Sc(e,t,n):(no(t),t.flags|=128,null);no(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Yi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Oc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),B(so,so.current),r)break;return null;case 22:return t.lanes=0,cc(e,t,n,t.pendingProps);case 24:Gi(t,ia,e.memoizedState.cache)}return kc(e,t,n)}function Mc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)rc=!0;else{if(!Ac(e,n)&&!(t.flags&128))return rc=!1,jc(e,t,n);rc=!!(e.flags&131072)}else rc=!1,ji&&t.flags&1048576&&Ti(t,vi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ta(t.elementType),t.type=e,typeof e==`function`)ai(e)?(r=Ks(e,r),t.tag=1,t=_c(null,t,e,r,n)):(t.tag=0,t=hc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=ac(null,t,e,r,n);break a}else if(a===D){t.tag=14,t=oc(null,t,e,r,n);break a}}throw t=P(e)||e,Error(i(306,t,``))}}return t;case 0:return hc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Ks(r,t.pendingProps),_c(e,t,r,a,n);case 3:a:{if(se(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,za(e,t),Ka(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Gi(t,ia,r),r!==o.cache&&Ji(t,[ia],n,!0),Ga(),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=vc(e,t,r,n);break a}else if(r!==a){a=mi(Error(i(424)),t),Vi(a),t=vc(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(Ai=vf(e.firstChild),ki=t,ji=!0,Mi=null,Ni=!0,n=Ia(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(zi(),r===a){t=kc(e,t,n);break a}ic(e,t,r,n)}t=t.child}return t;case 26:return mc(e,t),e===null?(n=zf(t.type,null,t.pendingProps,null))?t.memoizedState=n:ji||(n=t.type,e=t.pendingProps,r=Xd(ae.current).createElement(n),r[nt]=t,r[rt]=e,Wd(r,n,e),ht(r),t.stateNode=r):t.memoizedState=zf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return le(t),e===null&&ji&&(r=t.stateNode=Sf(t.type,t.pendingProps,ae.current),ki=t,Ni=!0,a=Ai,cf(t.type)?(yf=a,Ai=vf(r.firstChild)):Ai=a),ic(e,t,t.pendingProps.children,n),mc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ji&&((a=r=Ai)&&(r=ff(r,t.type,t.pendingProps,Ni),r===null?a=!1:(t.stateNode=r,ki=t,Ai=vf(r.firstChild),Ni=!1,a=!0)),a||Fi(t)),le(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,$d(a,o)?r=null:s!==null&&$d(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Co(e,t,Eo,null,null,n),cp._currentValue=a),mc(e,t),ic(e,t,r,n),t.child;case 6:return e===null&&ji&&((e=n=Ai)&&(n=pf(n,t.pendingProps,Ni),n===null?e=!1:(t.stateNode=n,ki=t,Ai=null,e=!0)),e||Fi(t)),null;case 13:return Sc(e,t,n);case 4:return se(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Fa(t,null,r,n):ic(e,t,r,n),t.child;case 11:return ac(e,t,t.type,t.pendingProps,n);case 7:return ic(e,t,t.pendingProps,n),t.child;case 8:return ic(e,t,t.pendingProps.children,n),t.child;case 12:return ic(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Gi(t,t.type,r.value),ic(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Zi(t),a=Qi(a),r=r(a),t.flags|=1,ic(e,t,r,n),t.child;case 14:return oc(e,t,t.type,t.pendingProps,n);case 15:return sc(e,t,t.type,t.pendingProps,n);case 19:return Oc(e,t,n);case 31:return pc(e,t,n);case 22:return cc(e,t,n,t.pendingProps);case 24:return Zi(t),r=Qi(ia),e===null?(a=ga(),a===null&&(a=Hl,o=aa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ra(t),Gi(t,ia,a)):((e.lanes&n)!==0&&(za(e,t),Ka(t,null,null,n),Ga()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Gi(t,ia,r),r!==a.cache&&Ji(t,[ia],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Gi(t,ia,r))),ic(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Nc(e){e.flags|=4}function Pc(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(ju())e.flags|=8192;else throw Ea=Sa,ba}else e.flags&=-16777217}function Fc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!ep(t))if(ju())e.flags|=8192;else throw Ea=Sa,ba}function Ic(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:We(),e.lanes|=t,nu|=t)}function Lc(e,t){if(!ji)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 Rc(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 zc(e,t,n){var r=t.pendingProps;switch(Di(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Rc(t),null;case 1:return Rc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Ki(ia),ce(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ri(t)?Nc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Bi())),Rc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Nc(t),o===null?(Rc(t),Pc(t,a,null,r,n)):(Rc(t),Fc(t,o))):o?o===e.memoizedState?(Rc(t),t.flags&=-16777217):(Nc(t),Rc(t),Fc(t,o)):(e=e.memoizedProps,e!==r&&Nc(t),Rc(t),Pc(t,a,e,r,n)),null;case 27:if(ue(t),n=ae.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Nc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Rc(t),null}e=re.current,Ri(t)?Ii(t,e):(e=Sf(a,r,n),t.stateNode=e,Nc(t))}return Rc(t),null;case 5:if(ue(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Nc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Rc(t),null}if(o=re.current,Ri(t))Ii(t,o);else{var s=Xd(ae.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[nt]=t,o[rt]=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(Wd(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&&Nc(t)}}return Rc(t),Pc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Nc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ae.current,Ri(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=ki,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[nt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Vd(e.nodeValue,n)),e||Fi(t,!0)}else e=Xd(e).createTextNode(r),e[nt]=t,t.stateNode=e}return Rc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ri(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[nt]=t}else zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Rc(t),e=!1}else n=Bi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(oo(t),t):(oo(t),null);if(t.flags&128)throw Error(i(558))}return Rc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ri(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[nt]=t}else zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Rc(t),a=!1}else a=Bi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(oo(t),t):(oo(t),null)}return oo(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),Ic(t,t.updateQueue),Rc(t),null);case 4:return ce(),e===null&&jd(t.stateNode.containerInfo),Rc(t),null;case 10:return Ki(t.type),Rc(t),null;case 19:if(z(so),r=t.memoizedState,r===null)return Rc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Lc(r,!1);else{if(Zl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=co(e),o!==null){for(t.flags|=128,Lc(r,!1),e=o.updateQueue,t.updateQueue=e,Ic(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)si(n,e),n=n.sibling;return B(so,so.current&1|2),ji&&wi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Se()>cu&&(t.flags|=128,a=!0,Lc(r,!1),t.lanes=4194304)}else{if(!a)if(e=co(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Ic(t,e),Lc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!ji)return Rc(t),null}else 2*Se()-r.renderingStartTime>cu&&n!==536870912&&(t.flags|=128,a=!0,Lc(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?(Rc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Se(),e.sibling=null,n=so.current,B(so,a?n&1|2:n&1),ji&&wi(t,r.treeForkCount),e);case 22:case 23:return oo(t),$a(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Rc(t),t.subtreeFlags&6&&(t.flags|=8192)):Rc(t),n=t.updateQueue,n!==null&&Ic(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&&z(ha),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ki(ia),Rc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Bc(e,t){switch(Di(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ki(ia),ce(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ue(t),null;case 31:if(t.memoizedState!==null){if(oo(t),t.alternate===null)throw Error(i(340));zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(oo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return z(so),null;case 4:return ce(),null;case 10:return Ki(t.type),null;case 22:case 23:return oo(t),$a(),e!==null&&z(ha),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ki(ia),null;case 25:return null;default:return null}}function Vc(e,t){switch(Di(t),t.tag){case 3:Ki(ia),ce();break;case 26:case 27:case 5:ue(t);break;case 4:ce();break;case 31:t.memoizedState!==null&&oo(t);break;case 13:oo(t);break;case 19:z(so);break;case 10:Ki(t.type);break;case 22:case 23:oo(t),$a(),e!==null&&z(ha);break;case 24:Ki(ia)}}function Hc(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){Qu(t,t.return,e)}}function Uc(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){Qu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Qu(t,t.return,e)}}function Wc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ja(t,n)}catch(t){Qu(e,e.return,t)}}}function Gc(e,t,n){n.props=Ks(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Qu(e,t,n)}}function Kc(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){Qu(e,t,n)}}function qc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Qu(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){Qu(e,t,n)}else n.current=null}function Jc(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){Qu(e,e.return,t)}}function Yc(e,t,n){try{var r=e.stateNode;Gd(r,e.type,n,t),r[rt]=t}catch(t){Qu(e,e.return,t)}}function Xc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&cf(e.type)||e.tag===4}function Zc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Xc(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&&cf(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 Qc(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=Yt));else if(r!==4&&(r===27&&cf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Qc(e,t,n),e=e.sibling;e!==null;)Qc(e,t,n),e=e.sibling}function $c(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&&cf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for($c(e,t,n),e=e.sibling;e!==null;)$c(e,t,n),e=e.sibling}function el(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Wd(t,r,n),t[nt]=e,t[rt]=n}catch(t){Qu(e,e.return,t)}}var tl=!1,nl=!1,rl=!1,il=typeof WeakSet==`function`?WeakSet:Set,al=null;function ol(e,t){if(e=e.containerInfo,Jd=_p,e=Cr(e),wr(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(Yd={focusedElem:e,selectionRange:n},_p=!1,al=t;al!==null;)if(t=al,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,al=e;else for(;al!==null;){switch(t=al,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=Ks(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Qu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)df(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:df(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,al=e;break}al=t.return}}function sl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Sl(e,n),r&4&&Hc(5,n);break;case 1:if(Sl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Qu(n,n.return,e)}else{var i=Ks(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Qu(n,n.return,e)}}r&64&&Wc(n),r&512&&Kc(n,n.return);break;case 3:if(Sl(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{Ja(e,t)}catch(e){Qu(n,n.return,e)}}break;case 27:t===null&&r&4&&el(n);case 26:case 5:Sl(e,n),t===null&&r&4&&Jc(n),r&512&&Kc(n,n.return);break;case 12:Sl(e,n);break;case 31:Sl(e,n),r&4&&pl(e,n);break;case 13:Sl(e,n),r&4&&ml(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=nd.bind(null,n),_f(e,n))));break;case 22:if(r=n.memoizedState!==null||tl,!r){t=t!==null&&t.memoizedState!==null||nl,i=tl;var a=nl;tl=r,(nl=t)&&!a?wl(e,n,(n.subtreeFlags&8772)!=0):Sl(e,n),tl=i,nl=a}break;case 30:break;default:Sl(e,n)}}function cl(e){var t=e.alternate;t!==null&&(e.alternate=null,cl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ut(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 ll=null,ul=!1;function dl(e,t,n){for(n=n.child;n!==null;)fl(e,t,n),n=n.sibling}function fl(e,t,n){if(Me&&typeof Me.onCommitFiberUnmount==`function`)try{Me.onCommitFiberUnmount(je,n)}catch{}switch(n.tag){case 26:nl||qc(n,t),dl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:nl||qc(n,t);var r=ll,i=ul;cf(n.type)&&(ll=n.stateNode,ul=!1),dl(e,t,n),Cf(n.stateNode),ll=r,ul=i;break;case 5:nl||qc(n,t);case 6:if(r=ll,i=ul,ll=null,dl(e,t,n),ll=r,ul=i,ll!==null)if(ul)try{(ll.nodeType===9?ll.body:ll.nodeName===`HTML`?ll.ownerDocument.body:ll).removeChild(n.stateNode)}catch(e){Qu(n,t,e)}else try{ll.removeChild(n.stateNode)}catch(e){Qu(n,t,e)}break;case 18:ll!==null&&(ul?(e=ll,lf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Hp(e)):lf(ll,n.stateNode));break;case 4:r=ll,i=ul,ll=n.stateNode.containerInfo,ul=!0,dl(e,t,n),ll=r,ul=i;break;case 0:case 11:case 14:case 15:Uc(2,n,t),nl||Uc(4,n,t),dl(e,t,n);break;case 1:nl||(qc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Gc(n,t,r)),dl(e,t,n);break;case 21:dl(e,t,n);break;case 22:nl=(r=nl)||n.memoizedState!==null,dl(e,t,n),nl=r;break;default:dl(e,t,n)}}function pl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Hp(e)}catch(e){Qu(t,t.return,e)}}}function ml(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Hp(e)}catch(e){Qu(t,t.return,e)}}function hl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new il),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new il),t;default:throw Error(i(435,e.tag))}}function gl(e,t){var n=hl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=rd.bind(null,e,t);t.then(r,r)}})}function _l(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(cf(c.type)){ll=c.stateNode,ul=!1;break a}break;case 5:ll=c.stateNode,ul=!1;break a;case 3:case 4:ll=c.stateNode.containerInfo,ul=!0;break a}c=c.return}if(ll===null)throw Error(i(160));fl(o,s,a),ll=null,ul=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)yl(t,e),t=t.sibling}var vl=null;function yl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:_l(t,e),bl(e),r&4&&(Uc(3,e,e.return),Hc(3,e),Uc(5,e,e.return));break;case 1:_l(t,e),bl(e),r&512&&(nl||n===null||qc(n,n.return)),r&64&&tl&&(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=vl;if(_l(t,e),bl(e),r&512&&(nl||n===null||qc(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[lt]||o[nt]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Wd(o,r,n),o[nt]=e,ht(o),r=o;break a;case`link`:var s=Zf(`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),Wd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Zf(`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),Wd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[nt]=e,ht(o),r=o}e.stateNode=r}else Qf(a,e.type,e.stateNode);else e.stateNode=Kf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Yc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Qf(a,e.type,e.stateNode):Kf(a,r,e.memoizedProps))}break;case 27:_l(t,e),bl(e),r&512&&(nl||n===null||qc(n,n.return)),n!==null&&r&4&&Yc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(_l(t,e),bl(e),r&512&&(nl||n===null||qc(n,n.return)),e.flags&32){a=e.stateNode;try{Vt(a,``)}catch(t){Qu(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Yc(e,a,n===null?a:n.memoizedProps)),r&1024&&(rl=!0);break;case 6:if(_l(t,e),bl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Qu(e,e.return,t)}}break;case 3:if(Xf=null,a=vl,vl=Ef(t.containerInfo),_l(t,e),vl=a,bl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Hp(t.containerInfo)}catch(t){Qu(e,e.return,t)}rl&&(rl=!1,xl(e));break;case 4:r=vl,vl=Ef(e.stateNode.containerInfo),_l(t,e),bl(e),vl=r;break;case 12:_l(t,e),bl(e);break;case 31:_l(t,e),bl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,gl(e,r)));break;case 13:_l(t,e),bl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(ou=Se()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,gl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=tl,d=nl;if(tl=u||a,nl=d||l,_l(t,e),nl=d,tl=u,bl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||tl||nl||Cl(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){Qu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Qu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?uf(m,!0):uf(l.stateNode,!1)}catch(e){Qu(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,gl(e,n))));break;case 19:_l(t,e),bl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,gl(e,r)));break;case 30:break;case 21:break;default:_l(t,e),bl(e)}}function bl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Xc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;$c(e,Zc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Vt(o,``),n.flags&=-33),$c(e,Zc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Qc(e,Zc(e),s);break;default:throw Error(i(161))}}catch(t){Qu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function xl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;xl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Sl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)sl(e,t.alternate,t),t=t.sibling}function Cl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Uc(4,t,t.return),Cl(t);break;case 1:qc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Gc(t,t.return,n),Cl(t);break;case 27:Cf(t.stateNode);case 26:case 5:qc(t,t.return),Cl(t);break;case 22:t.memoizedState===null&&Cl(t);break;case 30:Cl(t);break;default:Cl(t)}e=e.sibling}}function wl(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:wl(i,a,n),Hc(4,a);break;case 1:if(wl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Qu(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++)qa(c[i],s)}catch(e){Qu(r,r.return,e)}}n&&o&64&&Wc(a),Kc(a,a.return);break;case 27:el(a);case 26:case 5:wl(i,a,n),n&&r===null&&o&4&&Jc(a),Kc(a,a.return);break;case 12:wl(i,a,n);break;case 31:wl(i,a,n),n&&o&4&&pl(i,a);break;case 13:wl(i,a,n),n&&o&4&&ml(i,a);break;case 22:a.memoizedState===null&&wl(i,a,n),Kc(a,a.return);break;case 30:break;default:wl(i,a,n)}t=t.sibling}}function Tl(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&&oa(n))}function El(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&oa(e))}function Dl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Ol(e,t,n,r),t=t.sibling}function Ol(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Dl(e,t,n,r),i&2048&&Hc(9,t);break;case 1:Dl(e,t,n,r);break;case 3:Dl(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&&oa(e)));break;case 12:if(i&2048){Dl(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){Qu(t,t.return,e)}}else Dl(e,t,n,r);break;case 31:Dl(e,t,n,r);break;case 13:Dl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Dl(e,t,n,r):(a._visibility|=2,kl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Dl(e,t,n,r):Al(e,t),i&2048&&Tl(o,t);break;case 24:Dl(e,t,n,r),i&2048&&El(t.alternate,t);break;default:Dl(e,t,n,r)}}function kl(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:kl(a,o,s,c,i),Hc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,kl(a,o,s,c,i)):u._visibility&2?kl(a,o,s,c,i):Al(a,o),i&&l&2048&&Tl(o.alternate,o);break;case 24:kl(a,o,s,c,i),i&&l&2048&&El(o.alternate,o);break;default:kl(a,o,s,c,i)}t=t.sibling}}function Al(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:Al(n,r),i&2048&&Tl(r.alternate,r);break;case 24:Al(n,r),i&2048&&El(r.alternate,r);break;default:Al(n,r)}t=t.sibling}}var jl=8192;function Ml(e,t,n){if(e.subtreeFlags&jl)for(e=e.child;e!==null;)Nl(e,t,n),e=e.sibling}function Nl(e,t,n){switch(e.tag){case 26:Ml(e,t,n),e.flags&jl&&e.memoizedState!==null&&tp(n,vl,e.memoizedState,e.memoizedProps);break;case 5:Ml(e,t,n);break;case 3:case 4:var r=vl;vl=Ef(e.stateNode.containerInfo),Ml(e,t,n),vl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=jl,jl=16777216,Ml(e,t,n),jl=r):Ml(e,t,n));break;default:Ml(e,t,n)}}function Pl(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 Fl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];al=r,Rl(r,e)}Pl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Il(e),e=e.sibling}function Il(e){switch(e.tag){case 0:case 11:case 15:Fl(e),e.flags&2048&&Uc(9,e,e.return);break;case 3:Fl(e);break;case 12:Fl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ll(e)):Fl(e);break;default:Fl(e)}}function Ll(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];al=r,Rl(r,e)}Pl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Uc(8,t,t.return),Ll(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ll(t));break;default:Ll(t)}e=e.sibling}}function Rl(e,t){for(;al!==null;){var n=al;switch(n.tag){case 0:case 11:case 15:Uc(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:oa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,al=r;else a:for(n=e;al!==null;){r=al;var i=r.sibling,a=r.return;if(cl(r),r===n){al=null;break a}if(i!==null){i.return=a,al=i;break a}al=a}}}var zl={getCacheForType:function(e){var t=Qi(ia),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Qi(ia).controller.signal}},Bl=typeof WeakMap==`function`?WeakMap:Map,Vl=0,Hl=null,Ul=null,Wl=0,Gl=0,Kl=null,ql=!1,Jl=!1,Yl=!1,Xl=0,Zl=0,Ql=0,$l=0,eu=0,tu=0,nu=0,ru=null,iu=null,au=!1,ou=0,su=0,cu=1/0,lu=null,uu=null,du=0,fu=null,pu=null,mu=0,hu=0,gu=null,_u=null,vu=0,yu=null;function bu(){return Vl&2&&Wl!==0?Wl&-Wl:I.T===null?$e():yd()}function xu(){if(tu===0)if(!(Wl&536870912)||ji){var e=ze;ze<<=1,!(ze&3932160)&&(ze=262144),tu=e}else tu=536870912;return e=eo.current,e!==null&&(e.flags|=32),tu}function Su(e,t,n){(e===Hl&&(Gl===2||Gl===9)||e.cancelPendingCommit!==null)&&(ku(e,0),Eu(e,Wl,tu,!1)),Ke(e,n),(!(Vl&2)||e!==Hl)&&(e===Hl&&(!(Vl&2)&&($l|=n),Zl===4&&Eu(e,Wl,tu,!1)),dd(e))}function Cu(e,t,n){if(Vl&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Ue(e,t),a=r?Lu(e,t):Fu(e,t,!0),o=r;do{if(a===0){Jl&&!r&&Eu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!Tu(n)){a=Fu(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=ru;var l=c.current.memoizedState.isDehydrated;if(l&&(ku(c,s).flags|=256),s=Fu(c,s,!1),s!==2){if(Yl&&!l){c.errorRecoveryDisabledLanes|=o,$l|=o,a=4;break a}o=iu,iu=a,o!==null&&(iu===null?iu=o:iu.push.apply(iu,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){ku(e,0),Eu(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:Eu(r,t,tu,!ql);break a;case 2:iu=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=ou+300-Se(),10<a)){if(Eu(r,t,tu,!ql),He(r,0,!0)!==0)break a;mu=t,r.timeoutHandle=nf(wu.bind(null,r,n,iu,lu,au,t,tu,$l,nu,ql,o,`Throttled`,-0,0),a);break a}wu(r,n,iu,lu,au,t,tu,$l,nu,ql,o,null,-0,0)}}break}while(1);dd(e)}function wu(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:Yt},Nl(t,a,d);var m=(a&62914560)===a?ou-Se():(a&4194048)===a?su-Se():0;if(m=rp(d,m),m!==null){mu=a,e.cancelPendingCommit=m(Wu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Eu(e,a,o,!l);return}}Wu(e,t,a,n,r,i,o,s,c)}function Tu(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(!vr(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 Eu(e,t,n,r){t&=~eu,t&=~$l,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Pe(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Je(e,n,t)}function Du(){return Vl&6?!0:(fd(0,!1),!1)}function Ou(){if(Ul!==null){if(Gl===0)var e=Ul.return;else e=Ul,Wi=Ui=null,ko(e),ka=null,Aa=0,e=Ul;for(;e!==null;)Vc(e.alternate,e),e=e.return;Ul=null}}function ku(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,rf(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),mu=0,Ou(),Hl=e,Ul=n=oi(e.current,null),Wl=t,Gl=0,Kl=null,ql=!1,Jl=Ue(e,t),Yl=!1,nu=tu=eu=$l=Ql=Zl=0,iu=ru=null,au=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Pe(r),a=1<<i;t|=e[i],r&=~a}return Xl=t,Xr(),n}function Au(e,t){uo=null,I.H=Rs,t===ya||t===xa?(t=Da(),Gl=3):t===ba?(t=Da(),Gl=4):Gl=t===nc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Kl=t,Ul===null&&(Zl=1,Xs(e,mi(t,e.current)))}function ju(){var e=eo.current;return e===null?!0:(Wl&4194048)===Wl?to===null:(Wl&62914560)===Wl||Wl&536870912?e===to:!1}function Mu(){var e=I.H;return I.H=Rs,e===null?Rs:e}function Nu(){var e=I.A;return I.A=zl,e}function Pu(){Zl=4,ql||(Wl&4194048)!==Wl&&eo.current!==null||(Jl=!0),!(Ql&134217727)&&!($l&134217727)||Hl===null||Eu(Hl,Wl,tu,!1)}function Fu(e,t,n){var r=Vl;Vl|=2;var i=Mu(),a=Nu();(Hl!==e||Wl!==t)&&(lu=null,ku(e,t)),t=!1;var o=Zl;a:do try{if(Gl!==0&&Ul!==null){var s=Ul,c=Kl;switch(Gl){case 8:Ou(),o=6;break a;case 3:case 2:case 9:case 6:eo.current===null&&(t=!0);var l=Gl;if(Gl=0,Kl=null,Vu(e,s,c,l),n&&Jl){o=0;break a}break;default:l=Gl,Gl=0,Kl=null,Vu(e,s,c,l)}}Iu(),o=Zl;break}catch(t){Au(e,t)}while(1);return t&&e.shellSuspendCounter++,Wi=Ui=null,Vl=r,I.H=i,I.A=a,Ul===null&&(Hl=null,Wl=0,Xr()),o}function Iu(){for(;Ul!==null;)zu(Ul)}function Lu(e,t){var n=Vl;Vl|=2;var r=Mu(),a=Nu();Hl!==e||Wl!==t?(lu=null,cu=Se()+500,ku(e,t)):Jl=Ue(e,t);a:do try{if(Gl!==0&&Ul!==null){t=Ul;var o=Kl;b:switch(Gl){case 1:Gl=0,Kl=null,Vu(e,t,o,1);break;case 2:case 9:if(Ca(o)){Gl=0,Kl=null,Bu(t);break}t=function(){Gl!==2&&Gl!==9||Hl!==e||(Gl=7),dd(e)},o.then(t,t);break a;case 3:Gl=7;break a;case 4:Gl=5;break a;case 7:Ca(o)?(Gl=0,Kl=null,Bu(t)):(Gl=0,Kl=null,Vu(e,t,o,7));break;case 5:var s=null;switch(Ul.tag){case 26:s=Ul.memoizedState;case 5:case 27:var c=Ul;if(s?ep(s):c.stateNode.complete){Gl=0,Kl=null;var l=c.sibling;if(l!==null)Ul=l;else{var u=c.return;u===null?Ul=null:(Ul=u,Hu(u))}break b}}Gl=0,Kl=null,Vu(e,t,o,5);break;case 6:Gl=0,Kl=null,Vu(e,t,o,6);break;case 8:Ou(),Zl=6;break a;default:throw Error(i(462))}}Ru();break}catch(t){Au(e,t)}while(1);return Wi=Ui=null,I.H=r,I.A=a,Vl=n,Ul===null?(Hl=null,Wl=0,Xr(),Zl):0}function Ru(){for(;Ul!==null&&!be();)zu(Ul)}function zu(e){var t=Mc(e.alternate,e,Xl);e.memoizedProps=e.pendingProps,t===null?Hu(e):Ul=t}function Bu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=gc(n,t,t.pendingProps,t.type,void 0,Wl);break;case 11:t=gc(n,t,t.pendingProps,t.type.render,t.ref,Wl);break;case 5:ko(t);default:Vc(n,t),t=Ul=si(t,Xl),t=Mc(n,t,Xl)}e.memoizedProps=e.pendingProps,t===null?Hu(e):Ul=t}function Vu(e,t,n,r){Wi=Ui=null,ko(t),ka=null,Aa=0;var i=t.return;try{if(tc(e,i,t,n,Wl)){Zl=1,Xs(e,mi(n,e.current)),Ul=null;return}}catch(t){if(i!==null)throw Ul=i,t;Zl=1,Xs(e,mi(n,e.current)),Ul=null;return}t.flags&32768?(ji||r===1?e=!0:Jl||Wl&536870912?e=!1:(ql=e=!0,(r===2||r===9||r===3||r===6)&&(r=eo.current,r!==null&&r.tag===13&&(r.flags|=16384))),Uu(t,e)):Hu(t)}function Hu(e){var t=e;do{if(t.flags&32768){Uu(t,ql);return}e=t.return;var n=zc(t.alternate,t,Xl);if(n!==null){Ul=n;return}if(t=t.sibling,t!==null){Ul=t;return}Ul=t=e}while(t!==null);Zl===0&&(Zl=5)}function Uu(e,t){do{var n=Bc(e.alternate,e);if(n!==null){n.flags&=32767,Ul=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Ul=e;return}Ul=e=n}while(e!==null);Zl=6,Ul=null}function Wu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Yu();while(du!==0);if(Vl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Yr,qe(e,n,o,s,c,l),e===Hl&&(Ul=Hl=null,Wl=0),pu=t,fu=e,mu=n,hu=o,gu=a,_u=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,id(Ee,function(){return Xu(),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=Vl,Vl|=4;try{ol(e,t,n)}finally{Vl=s,L.p=a,I.T=r}}du=1,Gu(),Ku(),qu()}}function Gu(){if(du===1){du=0;var e=fu,t=pu,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=Vl;Vl|=4;try{yl(t,e);var a=Yd,o=Cr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Sr(s.ownerDocument.documentElement,s)){if(c!==null&&wr(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 _=xr(s,h),v=xr(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}}_p=!!Jd,Yd=Jd=null}finally{Vl=i,L.p=r,I.T=n}}e.current=t,du=2}}function Ku(){if(du===2){du=0;var e=fu,t=pu,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=Vl;Vl|=4;try{sl(e,t.alternate,t)}finally{Vl=i,L.p=r,I.T=n}}du=3}}function qu(){if(du===4||du===3){du=0,xe();var e=fu,t=pu,n=mu,r=_u;t.subtreeFlags&10256||t.flags&10256?du=5:(du=0,pu=fu=null,Ju(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(uu=null),Qe(n),t=t.stateNode,Me&&typeof Me.onCommitFiberRoot==`function`)try{Me.onCommitFiberRoot(je,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}}mu&3&&Yu(),dd(e),i=e.pendingLanes,n&261930&&i&42?e===yu?vu++:(vu=0,yu=e):vu=0,fd(0,!1)}}function Ju(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,oa(t)))}function Yu(){return Gu(),Ku(),qu(),Xu()}function Xu(){if(du!==5)return!1;var e=fu,t=hu;hu=0;var n=Qe(mu),r=I.T,a=L.p;try{L.p=32>n?32:n,I.T=null,n=gu,gu=null;var o=fu,s=mu;if(du=0,pu=fu=null,mu=0,Vl&6)throw Error(i(331));var c=Vl;if(Vl|=4,Il(o.current),Ol(o,o.current,s,n),Vl=c,fd(0,!1),Me&&typeof Me.onPostCommitFiberRoot==`function`)try{Me.onPostCommitFiberRoot(je,o)}catch{}return!0}finally{L.p=a,I.T=r,Ju(e,t)}}function Zu(e,t,n){t=mi(n,t),t=Qs(e.stateNode,t,2),e=Va(e,t,2),e!==null&&(Ke(e,2),dd(e))}function Qu(e,t,n){if(e.tag===3)Zu(e,e,n);else for(;t!==null;){if(t.tag===3){Zu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(uu===null||!uu.has(r))){e=mi(n,e),n=$s(2),r=Va(t,n,2),r!==null&&(ec(n,r,t,e),Ke(r,2),dd(r));break}}t=t.return}}function $u(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Bl;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)||(Yl=!0,i.add(n),e=ed.bind(null,e,t,n),t.then(e,e))}function ed(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Hl===e&&(Wl&n)===n&&(Zl===4||Zl===3&&(Wl&62914560)===Wl&&300>Se()-ou?!(Vl&2)&&ku(e,0):eu|=n,nu===Wl&&(nu=0)),dd(e)}function td(e,t){t===0&&(t=We()),e=$r(e,t),e!==null&&(Ke(e,t),dd(e))}function nd(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),td(e,n)}function rd(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),td(e,n)}function id(e,t){return ve(e,t)}var ad=null,od=null,sd=!1,cd=!1,ld=!1,ud=0;function dd(e){e!==od&&e.next===null&&(od===null?ad=od=e:od=od.next=e),cd=!0,sd||(sd=!0,vd())}function fd(e,t){if(!ld&&cd){ld=!0;do for(var n=!1,r=ad;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-Pe(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,_d(r,a))}else a=Wl,a=He(r,r===Hl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ue(r,a)||(n=!0,_d(r,a));r=r.next}while(n);ld=!1}}function pd(){md()}function md(){cd=sd=!1;var e=0;ud!==0&&tf()&&(e=ud);for(var t=Se(),n=null,r=ad;r!==null;){var i=r.next,a=hd(r,t);a===0?(r.next=null,n===null?ad=i:n.next=i,i===null&&(od=n)):(n=r,(e!==0||a&3)&&(cd=!0)),r=i}du!==0&&du!==5||fd(e,!1),ud!==0&&(ud=0)}function hd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Pe(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=H(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Hl,n=Wl,n=He(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Gl===2||Gl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&ye(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ue(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&ye(r),Qe(n)){case 2:case 8:n=Te;break;case 32:n=Ee;break;case 268435456:n=Oe;break;default:n=Ee}return r=gd.bind(null,e),n=ve(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&ye(r),e.callbackPriority=2,e.callbackNode=null,2}function gd(e,t){if(du!==0&&du!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Yu()&&e.callbackNode!==n)return null;var r=Wl;return r=He(e,e===Hl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Cu(e,r,t),hd(e,Se()),e.callbackNode!=null&&e.callbackNode===n?gd.bind(null,e):null)}function _d(e,t){if(Yu())return null;Cu(e,t,!0)}function vd(){of(function(){Vl&6?ve(we,pd):md()})}function yd(){if(ud===0){var e=la;e===0&&(e=Re,Re<<=1,!(Re&261888)&&(Re=256)),ud=e}return ud}function bd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Jt(``+e)}function xd(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 Sd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=bd((i[rt]||null).action),o=r.submitter;o&&(t=(t=o[rt]||null)?bd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new _n(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(ud!==0){var e=o?xd(i,o):new FormData(i);Ts(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?xd(i,o):new FormData(i),Ts(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Cd=0;Cd<Wr.length;Cd++){var wd=Wr[Cd];Gr(wd.toLowerCase(),`on`+(wd[0].toUpperCase()+wd.slice(1)))}Gr(Ir,`onAnimationEnd`),Gr(Lr,`onAnimationIteration`),Gr(Rr,`onAnimationStart`),Gr(`dblclick`,`onDoubleClick`),Gr(`focusin`,`onFocus`),Gr(`focusout`,`onBlur`),Gr(zr,`onTransitionRun`),Gr(Br,`onTransitionStart`),Gr(Vr,`onTransitionCancel`),Gr(Hr,`onTransitionEnd`),yt(`onMouseEnter`,[`mouseout`,`mouseover`]),yt(`onMouseLeave`,[`mouseout`,`mouseover`]),yt(`onPointerEnter`,[`pointerout`,`pointerover`]),yt(`onPointerLeave`,[`pointerout`,`pointerover`]),vt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),vt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),vt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),vt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),vt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),vt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Td=`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(` `),Ed=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Td));function Dd(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){Kr(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){Kr(e)}i.currentTarget=null,a=c}}}}function Od(e,t){var n=t[at];n===void 0&&(n=t[at]=new Set);var r=e+`__bubble`;n.has(r)||(Md(t,e,2,!1),n.add(r))}function kd(e,t,n){var r=0;t&&(r|=4),Md(n,e,r,t)}var Ad=`_reactListening`+Math.random().toString(36).slice(2);function jd(e){if(!e[Ad]){e[Ad]=!0,gt.forEach(function(t){t!==`selectionchange`&&(Ed.has(t)||kd(t,!1,e),kd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ad]||(t[Ad]=!0,kd(`selectionchange`,!1,t))}}function Md(e,t,n,r){switch(wp(t)){case 2:var i=vp;break;case 8:i=yp;break;default:i=bp}n=i.bind(null,t,n,e),i=void 0,!on||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 Nd(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=dt(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}nn(function(){var r=a,i=Zt(n),s=[];a:{var c=Ur.get(e);if(c!==void 0){var l=_n,u=e;switch(e){case`keypress`:if(fn(n)===0)break a;case`keydown`:case`keyup`:l=Fn;break;case`focusin`:u=`focus`,l=En;break;case`focusout`:u=`blur`,l=En;break;case`beforeblur`:case`afterblur`:l=En;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=wn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Tn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Ln;break;case Ir:case Lr:case Rr:l=Dn;break;case Hr:l=Rn;break;case`scroll`:case`scrollend`:l=yn;break;case`wheel`:l=zn;break;case`copy`:case`cut`:case`paste`:l=On;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=In;break;case`toggle`:case`beforetoggle`:l=Bn}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=rn(m,p),g!=null&&d.push(Pd(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!==Xt&&(u=n.relatedTarget||n.fromElement)&&(dt(u)||u[it]))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?dt(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=wn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=In,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:pt(l),h=u==null?c:pt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,dt(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=Id,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&&Ld(s,c,l,d,!1),u!==null&&f!==null&&Ld(s,f,u,d,!0)}}a:{if(c=r?pt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=or;else if(er(c))if(sr)v=gr;else{v=mr;var y=pr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Gt(r.elementType)&&(v=or):v=hr;if(v&&=v(e,r)){tr(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Lt(c,`number`,c.value)}switch(y=r?pt(r):window,e){case`focusin`:(er(y)||y.contentEditable===`true`)&&(Er=y,Dr=r,Or=null);break;case`focusout`:Or=Dr=Er=null;break;case`mousedown`:kr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:kr=!1,Ar(s,n,i);break;case`selectionchange`:if(Tr)break;case`keydown`:case`keyup`:Ar(s,n,i)}var b;if(Hn)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 Xn?Jn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Gn&&n.locale!==`ko`&&(Xn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Xn&&(b=dn()):(cn=i,ln=`value`in cn?cn.value:cn.textContent,Xn=!0)),y=Fd(r,x),0<y.length&&(x=new kn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=Yn(n),b!==null&&(x.data=b)))),(b=Wn?Zn(e,n):Qn(e,n))&&(x=Fd(r,`onBeforeInput`),0<x.length&&(y=new kn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),Sd(s,e,r,n,i)}Dd(s,t)})}function Pd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Fd(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=rn(e,n),i!=null&&r.unshift(Pd(e,i,a)),i=rn(e,t),i!=null&&r.push(Pd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Id(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Ld(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=rn(n,a),l!=null&&o.unshift(Pd(n,l,c))):i||(l=rn(n,a),l!=null&&o.push(Pd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Rd=/\r\n?/g,zd=/\u0000|\uFFFD/g;function Bd(e){return(typeof e==`string`?e:``+e).replace(Rd,`
9
+ `).replace(zd,``)}function Vd(e,t){return t=Bd(t),Bd(e)===t}function Hd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Vt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Vt(e,``+r);break;case`className`:Tt(e,`class`,r);break;case`tabIndex`:Tt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Tt(e,n,r);break;case`style`:Wt(e,r,o);break;case`data`:if(t!==`object`){Tt(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=Jt(``+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`&&Hd(e,t,`name`,a.name,a,null),Hd(e,t,`formEncType`,a.formEncType,a,null),Hd(e,t,`formMethod`,a.formMethod,a,null),Hd(e,t,`formTarget`,a.formTarget,a,null)):(Hd(e,t,`encType`,a.encType,a,null),Hd(e,t,`method`,a.method,a,null),Hd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Jt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Yt);break;case`onScroll`:r!=null&&Od(`scroll`,e);break;case`onScrollEnd`:r!=null&&Od(`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=Jt(``+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`:Od(`beforetoggle`,e),Od(`toggle`,e),wt(e,`popover`,r);break;case`xlinkActuate`:Et(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Et(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Et(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Et(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Et(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Et(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Et(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Et(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Et(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:wt(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=Kt.get(n)||n,wt(e,n,r))}}function Ud(e,t,n,r,a,o){switch(n){case`style`:Wt(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`?Vt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Vt(e,``+r);break;case`onScroll`:r!=null&&Od(`scroll`,e);break;case`onScrollEnd`:r!=null&&Od(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Yt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!_t.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[rt]||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,``):wt(e,n,r)}}}function Wd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Od(`error`,e),Od(`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:Hd(e,t,o,s,n,null)}}a&&Hd(e,t,`srcSet`,n.srcSet,n,null),r&&Hd(e,t,`src`,n.src,n,null);return;case`input`:Od(`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:Hd(e,t,r,d,n,null)}}It(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Od(`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:Hd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Rt(e,!!r,n,!0):Rt(e,!!r,t,!1);return;case`textarea`:for(s in Od(`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:Hd(e,t,s,c,n,null)}Bt(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:Hd(e,t,l,r,n,null)}return;case`dialog`:Od(`beforetoggle`,e),Od(`toggle`,e),Od(`cancel`,e),Od(`close`,e);break;case`iframe`:case`object`:Od(`load`,e);break;case`video`:case`audio`:for(r=0;r<Td.length;r++)Od(Td[r],e);break;case`image`:Od(`error`,e),Od(`load`,e);break;case`details`:Od(`toggle`,e);break;case`embed`:case`source`:case`link`:Od(`error`,e),Od(`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:Hd(e,t,u,r,n,null)}return;default:if(Gt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Ud(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Hd(e,t,c,r,n,null))}function Gd(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)||Hd(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&&Hd(e,t,p,m,r,f)}}Ft(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)||Hd(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&&Hd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Rt(e,!!n,n?[]:``,!1):Rt(e,!!n,t,!0)):Rt(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:Hd(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&&Hd(e,t,s,a,r,o)}zt(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:Hd(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:Hd(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)&&Hd(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:Hd(e,t,u,p,r,m)}return;default:if(Gt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Ud(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||Ud(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Hd(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||Hd(e,t,f,p,r,m)}function Kd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function qd(){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&&Kd(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&&Kd(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 Jd=null,Yd=null;function Xd(e){return e.nodeType===9?e:e.ownerDocument}function Zd(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 Qd(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 $d(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 ef=null;function tf(){var e=window.event;return e&&e.type===`popstate`?e===ef?!1:(ef=e,!0):(ef=null,!1)}var nf=typeof setTimeout==`function`?setTimeout:void 0,rf=typeof clearTimeout==`function`?clearTimeout:void 0,af=typeof Promise==`function`?Promise:void 0,of=typeof queueMicrotask==`function`?queueMicrotask:af===void 0?nf:function(e){return af.resolve(null).then(e).catch(sf)};function sf(e){setTimeout(function(){throw e})}function cf(e){return e===`head`}function lf(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),Hp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Cf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Cf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[lt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Cf(e.ownerDocument.body);n=i}while(n);Hp(t)}function uf(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 df(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`:df(n),ut(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function ff(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[lt])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=vf(e.nextSibling),e===null)break}return null}function pf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=vf(e.nextSibling),e===null))return null;return e}function mf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=vf(e.nextSibling),e===null))return null;return e}function hf(e){return e.data===`$?`||e.data===`$~`}function gf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function _f(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 vf(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 yf=null;function bf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return vf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function xf(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 Sf(e,t,n){switch(t=Xd(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 Cf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ut(e)}var wf=new Map,Tf=new Set;function Ef(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Df=L.d;L.d={f:Of,r:kf,D:Mf,C:Nf,L:Pf,m:Ff,X:Lf,S:If,M:Rf};function Of(){var e=Df.f(),t=Du();return e||t}function kf(e){var t=ft(e);t!==null&&t.tag===5&&t.type===`form`?Ds(t):Df.r(e)}var Af=typeof document>`u`?null:document;function jf(e,t,n){var r=Af;if(r&&typeof t==`string`&&t){var i=Pt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Tf.has(i)||(Tf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Wd(t,`link`,e),ht(t),r.head.appendChild(t)))}}function Mf(e){Df.D(e),jf(`dns-prefetch`,e,null)}function Nf(e,t){Df.C(e,t),jf(`preconnect`,e,t)}function Pf(e,t,n){Df.L(e,t,n);var r=Af;if(r&&e&&t){var i=`link[rel="preload"][as="`+Pt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Pt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Pt(n.imageSizes)+`"]`)):i+=`[href="`+Pt(e)+`"]`;var a=i;switch(t){case`style`:a=Bf(e);break;case`script`:a=Wf(e)}wf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),wf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Vf(a))||t===`script`&&r.querySelector(Gf(a))||(t=r.createElement(`link`),Wd(t,`link`,e),ht(t),r.head.appendChild(t)))}}function Ff(e,t){Df.m(e,t);var n=Af;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Pt(r)+`"][href="`+Pt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Wf(e)}if(!wf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),wf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Gf(a)))return}r=n.createElement(`link`),Wd(r,`link`,e),ht(r),n.head.appendChild(r)}}}function If(e,t,n){Df.S(e,t,n);var r=Af;if(r&&e){var i=mt(r).hoistableStyles,a=Bf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Vf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=wf.get(a))&&Jf(e,n);var c=o=r.createElement(`link`);ht(c),Wd(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,qf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Lf(e,t){Df.X(e,t);var n=Af;if(n&&e){var r=mt(n).hoistableScripts,i=Wf(e),a=r.get(i);a||(a=n.querySelector(Gf(i)),a||(e=f({src:e,async:!0},t),(t=wf.get(i))&&Yf(e,t),a=n.createElement(`script`),ht(a),Wd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Rf(e,t){Df.M(e,t);var n=Af;if(n&&e){var r=mt(n).hoistableScripts,i=Wf(e),a=r.get(i);a||(a=n.querySelector(Gf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=wf.get(i))&&Yf(e,t),a=n.createElement(`script`),ht(a),Wd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function zf(e,t,n,r){var a=(a=ae.current)?Ef(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=Bf(n.href),n=mt(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=Bf(n.href);var o=mt(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(Vf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),wf.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},wf.set(e,n),o||Uf(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=Wf(n),n=mt(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 Bf(e){return`href="`+Pt(e)+`"`}function Vf(e){return`link[rel="stylesheet"][`+e+`]`}function Hf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Uf(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}),Wd(t,`link`,n),ht(t),e.head.appendChild(t))}function Wf(e){return`[src="`+Pt(e)+`"]`}function Gf(e){return`script[async]`+e}function Kf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Pt(n.href)+`"]`);if(r)return t.instance=r,ht(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`),ht(r),Wd(r,`style`,a),qf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Bf(n.href);var o=e.querySelector(Vf(a));if(o)return t.state.loading|=4,t.instance=o,ht(o),o;r=Hf(n),(a=wf.get(a))&&Jf(r,a),o=(e.ownerDocument||e).createElement(`link`),ht(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Wd(o,`link`,r),t.state.loading|=4,qf(o,n.precedence,e),t.instance=o;case`script`:return o=Wf(n.src),(a=e.querySelector(Gf(o)))?(t.instance=a,ht(a),a):(r=n,(a=wf.get(o))&&(r=f({},n),Yf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),ht(a),Wd(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,qf(r,n.precedence,e));return t.instance}function qf(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 Jf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Yf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Xf=null;function Zf(e,t,n){if(Xf===null){var r=new Map,i=Xf=new Map;i.set(n,r)}else i=Xf,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[lt]||a[nt]||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 Qf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function $f(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 ep(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function tp(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=Bf(r.href),a=t.querySelector(Vf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ip.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,ht(a);return}a=t.ownerDocument||t,r=Hf(r),(i=wf.get(i))&&Jf(r,i),a=a.createElement(`link`),ht(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Wd(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=ip.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var np=0;function rp(e,t){return e.stylesheets&&e.count===0&&op(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&op(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&np===0&&(np=62500*qd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&op(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>np?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function ip(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)op(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ap=null;function op(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ap=new Map,t.forEach(sp,e),ap=null,ip.call(e))}function sp(e,t){if(!(t.state.loading&4)){var n=ap.get(e);if(n)var r=n.get(null);else{n=new Map,ap.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=ip.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 cp={$$typeof:C,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function lp(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=Ge(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ge(0),this.hiddenUpdates=Ge(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 up(e,t,n,r,i,a,o,s,c,l,u,d){return e=new lp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ii(3,null,null,t),e.current=a,a.stateNode=e,t=aa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ra(a),e}function dp(e){return e?(e=ni,e):ni}function fp(e,t,n,r,i,a){i=dp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ba(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Va(e,r,t),n!==null&&(Su(n,e,t),Ha(n,e,t))}function pp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function mp(e,t){pp(e,t),(e=e.alternate)&&pp(e,t)}function hp(e){if(e.tag===13||e.tag===31){var t=$r(e,67108864);t!==null&&Su(t,e,67108864),mp(e,67108864)}}function gp(e){if(e.tag===13||e.tag===31){var t=bu();t=Ze(t);var n=$r(e,t);n!==null&&Su(n,e,t),mp(e,t)}}var _p=!0;function vp(e,t,n,r){var i=I.T;I.T=null;var a=L.p;try{L.p=2,bp(e,t,n,r)}finally{L.p=a,I.T=i}}function yp(e,t,n,r){var i=I.T;I.T=null;var a=L.p;try{L.p=8,bp(e,t,n,r)}finally{L.p=a,I.T=i}}function bp(e,t,n,r){if(_p){var i=xp(r);if(i===null)Nd(e,t,r,Sp,n),Mp(e,r);else if(Pp(i,e,t,n,r))r.stopPropagation();else if(Mp(e,r),t&4&&-1<jp.indexOf(e)){for(;i!==null;){var a=ft(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ve(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Pe(o);s.entanglements[1]|=c,o&=~c}dd(a),!(Vl&6)&&(cu=Se()+500,fd(0,!1))}}break;case 31:case 13:s=$r(a,2),s!==null&&Su(s,a,2),Du(),mp(a,2)}if(a=xp(r),a===null&&Nd(e,t,r,Sp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Nd(e,t,r,null,n)}}function xp(e){return e=Zt(e),Cp(e)}var Sp=null;function Cp(e){if(Sp=null,e=dt(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 Sp=e,null}function wp(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(Ce()){case we:return 2;case Te:return 8;case Ee:case De:return 32;case Oe:return 268435456;default:return 32}default:return 32}}var W=!1,Tp=null,Ep=null,Dp=null,Op=new Map,kp=new Map,Ap=[],jp=`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 Mp(e,t){switch(e){case`focusin`:case`focusout`:Tp=null;break;case`dragenter`:case`dragleave`:Ep=null;break;case`mouseover`:case`mouseout`:Dp=null;break;case`pointerover`:case`pointerout`:Op.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:kp.delete(t.pointerId)}}function Np(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=ft(t),t!==null&&hp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Pp(e,t,n,r,i){switch(t){case`focusin`:return Tp=Np(Tp,e,t,n,r,i),!0;case`dragenter`:return Ep=Np(Ep,e,t,n,r,i),!0;case`mouseover`:return Dp=Np(Dp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Op.set(a,Np(Op.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,kp.set(a,Np(kp.get(a)||null,e,t,n,r,i)),!0}return!1}function Fp(e){var t=dt(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,et(e.priority,function(){gp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,et(e.priority,function(){gp(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 Ip(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=xp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Xt=r,n.target.dispatchEvent(r),Xt=null}else return t=ft(n),t!==null&&hp(t),e.blockedOn=n,!1;t.shift()}return!0}function Lp(e,t,n){Ip(e)&&n.delete(t)}function Rp(){W=!1,Tp!==null&&Ip(Tp)&&(Tp=null),Ep!==null&&Ip(Ep)&&(Ep=null),Dp!==null&&Ip(Dp)&&(Dp=null),Op.forEach(Lp),kp.forEach(Lp)}function zp(e,n){e.blockedOn===n&&(e.blockedOn=null,W||(W=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Rp)))}var Bp=null;function Vp(e){Bp!==e&&(Bp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Bp===e&&(Bp=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(Cp(r||n)===null)continue;break}var a=ft(n);a!==null&&(e.splice(t,3),t-=3,Ts(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Hp(e){function t(t){return zp(t,e)}Tp!==null&&zp(Tp,e),Ep!==null&&zp(Ep,e),Dp!==null&&zp(Dp,e),Op.forEach(t),kp.forEach(t);for(var n=0;n<Ap.length;n++){var r=Ap[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ap.length&&(n=Ap[0],n.blockedOn===null);)Fp(n),n.blockedOn===null&&Ap.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[rt]||null;if(typeof a==`function`)o||Vp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[rt]||null)s=o.formAction;else if(Cp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Vp(n)}}}function Up(){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 Wp(e){this._internalRoot=e}Gp.prototype.render=Wp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;fp(n,bu(),e,t,null,null)},Gp.prototype.unmount=Wp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;fp(e.current,2,null,e,null,null),Du(),t[it]=null}};function Gp(e){this._internalRoot=e}Gp.prototype.unstable_scheduleHydration=function(e){if(e){var t=$e();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ap.length&&t!==0&&t<Ap[n].priority;n++);Ap.splice(n,0,e),n===0&&Fp(e)}};var Kp=n.version;if(Kp!==`19.2.7`)throw Error(i(527,Kp,`19.2.7`));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 qp={bundleType:0,version:`19.2.7`,rendererPackageName:`react-dom`,currentDispatcherRef:I,reconcilerVersion:`19.2.7`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var G=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!G.isDisabled&&G.supportsFiber)try{je=G.inject(qp),Me=G}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=qs,s=Js,c=Ys;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=up(e,1,!1,null,null,n,r,null,o,s,c,Up),e[it]=t.current,jd(e),new Wp(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(!ee(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(!ee(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)=>B(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function ee(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>ee(e[n],t[n])):!1}var te=Object.prototype.hasOwnProperty;function ne(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=z(e)&&z(t);if(!r&&!(B(e)&&B(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:te.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=ne(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function R(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 z(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function B(e){if(!re(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!re(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function re(e){return Object.prototype.toString.call(e)===`[object Object]`}function ie(e){return new Promise(t=>{T.setTimeout(t,e)})}function ae(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:ne(e,t)}function oe(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function se(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var ce=Symbol();function le(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===ce?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function ue(e,t){return typeof e==`function`?e(...t):!!e}function de(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 fe=(()=>{let e=()=>D;return{isServer(){return e()},setIsServer(t){e=t}}})();function pe(){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 me=E;function V(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=me,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 he=V(),ge=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 _e(e){return Math.min(1e3*2**e,3e4)}function ve(e){return(e??`online`)!==`online`||ge.isOnline()}var ye=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function be(e){let t=!1,n=0,r,i=pe(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new ye(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>C.isFocused()&&(e.networkMode===`always`||ge.isOnline())&&e.canRun(),u=()=>ve(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??(fe.isServer()?0:3),o=e.retryDelay??_e,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),ie(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 xe=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??(fe.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(T.clearTimeout(this.#e),this.#e=void 0)}};function Se(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=>{de(e,()=>t.signal,()=>n=!0)},u=le(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?se:oe;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?we:Ce,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:Ce(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 Ce(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 we(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Te=class extends xe{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=Oe(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=Oe(this.options);e.data!==void 0&&(this.setState(De(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=ae(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(O).catch(O):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}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===ce||!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`)}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.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.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.#a&&(this.#s||this.#c()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.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.#s=!0,n.signal)})},i=()=>{let e=le(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!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.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?Se(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta}),this.#a=be({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof ye&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#a.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof ye){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#l(e){let t=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,...Ee(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...De(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=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=t(this.state),he.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function Ee(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ve(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function De(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Oe(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 ke=class extends S{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=pe(),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),je(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Me(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Me(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&&!R(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Ne(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 Fe(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(fe.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,!(fe.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!==void 0&&(T.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(T.clearInterval(this.#f),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&&je(e,t),o=i&&Ne(e,n,t,r);(a||o)&&(l={...l,...Ee(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=ae(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=ae(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:Pe(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=()=>{let e=this.#o=x.promise=pe();i(e)},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),!R(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){he.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function Ae(e,t){return N(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&N(t.retryOnMount,e)===!1)}function je(e,t){return Ae(e,t)||e.state.data!==void 0&&Me(e,t,t.refetchOnMount)}function Me(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&&Pe(e,t)}return!1}function Ne(e,t,n,r){return(e!==t||N(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Pe(e,n)}function Pe(e,t){return N(t.enabled,e)!==!1&&e.isStaleByTime(M(t.staleTime,e))}function Fe(e,t){return!R(e.getCurrentResult(),t)}var Ie=class extends xe{#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||Le(),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=be({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){let t=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=t(this.state),he.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function Le(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Re=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 Ie({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=ze(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=ze(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=ze(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=ze(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){he.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){he.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return he.batch(()=>Promise.all(e.map(e=>e.continue().catch(O))))}};function ze(e){return e.options.scope?.id}var Be=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),R(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??Le();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){he.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)})})}},Ve=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 Te({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(){he.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){he.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){he.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){he.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},He=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Ve,this.#t=e.mutationCache||new Re,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=ge.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 he.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;he.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return he.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=he.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(O).catch(O)}invalidateQueries(e,t={}){return he.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=he.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._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(O).catch(O)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return ge.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=>{ee(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=>{ee(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===ce&&(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()}},Ue=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})),H=s(((e,t)=>{t.exports=Ue()}))(),We=b.createContext(void 0),Ge=e=>{let t=b.useContext(We);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},Ke=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,H.jsx)(We.Provider,{value:e,children:t})),qe=b.createContext(!1),Je=()=>b.useContext(qe);qe.Provider;function Ye(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Xe=b.createContext(Ye()),Ze=()=>b.useContext(Xe),Qe=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?ue(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},$e=e=>{b.useEffect(()=>{e.clearReset()},[e])},et=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||ue(n,[e.error,r])),tt=(e,t)=>t.state.data===void 0,nt=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))}},rt=(e,t)=>e.isLoading&&e.isFetching&&!t,it=(e,t)=>e?.suspense&&t.isPending,at=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function ot(e,t,n){let r=Je(),i=Ze(),a=Ge(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,nt(o),Qe(o,i,s),$e(i);let l=!a.getQueryCache().get(o.queryHash),[u]=b.useState(()=>new t(a,o)),d=u.getOptimisticResult(o),f=!r&&c;if(b.useSyncExternalStore(b.useCallback(e=>{let t=f?u.subscribe(he.batchCalls(e)):O;return u.updateResult(),t},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),b.useEffect(()=>{u.setOptions(o)},[o,u]),it(o,d))throw at(o,u,i);if(et({result:d,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw d.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,d),o.experimental_prefetchInRender&&!fe.isServer()&&rt(d,r)&&(l?at(o,u,i):s?.promise)?.catch(O).finally(()=>{u.updateResult()}),o.notifyOnChangeProps?d:u.trackResult(d)}function st(e,t){return ot({...e,enabled:!0,suspense:!0,throwOnError:tt,placeholderData:void 0},ke,t)}function ct(e,t){let n=Ge(t),[r]=b.useState(()=>new Be(n,e));b.useEffect(()=>{r.setOptions(e)},[r,e]);let i=b.useSyncExternalStore(b.useCallback(e=>r.subscribe(he.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=b.useCallback((e,t)=>{r.mutate(e,t).catch(O)},[r]);if(i.error&&ue(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var lt=null;function ut(e,...t){lt?.(e,t)}function dt(e,...t){lt?.(e,t,!0)}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.`,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=`2.9.1`,_t={};function vt(e,t){let n=Symbol.for(`nuqs.${gt}.${e}`),r=globalThis;if(r[n]!=null)return r[n];let i=Object.isExtensible(r)?r:_t;return i[n]??=t()}function yt(e,t,n){let r=vt(e,()=>new WeakMap);return r.has(t)||r.set(t,n()),r.get(t)}var bt=yt(`adapter-context`,b.createContext,()=>{let e=(0,b.createContext)({useAdapter(){throw Error(pt(404))}});return e.displayName=`NuqsAdapterContext`,e});typeof window<`u`&&(window.__NuqsAdapterContext&&window.__NuqsAdapterContext!==bt&&console.error(pt(303)),window.__NuqsAdapterContext=bt);function xt(e){return({children:t,defaultOptions:n,processUrlSearchParams:r,...i})=>(0,b.createElement)(bt.Provider,{...i,value:{useAdapter:e,defaultOptions:n,processUrlSearchParams:r}},t)}function St(e){let t=(0,b.useContext)(bt);if(!(`useAdapter`in t))throw Error(pt(404));return t.useAdapter(e)}var Ct=()=>(0,b.useContext)(bt).defaultOptions,wt=()=>(0,b.useContext)(bt).processUrlSearchParams;function Tt(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 Et(e,t,n){if(t.length===0)return e;let r=n?new URLSearchParams(e):e;for(let n of Array.from(e.keys()))t.includes(n)||r.delete(n);return r}function Dt(){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 Ot(e){return{method:`throttle`,timeMs:e}}var kt=Ot(Dt());function At(e){return e===null||Array.isArray(e)&&e.length===0}function jt(e,t,n){if(typeof n==`string`)e.set(t,n);else{e.delete(t);for(let r of n)e.append(t,r);e.has(t)||e.set(t,``)}return e}function Mt(){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 Nt(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 Pt(){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 Ft(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 It(){return new URLSearchParams(location.search)}var Lt=class{updateMap=new Map;options={history:`replace`,scroll:!1,shallow:!0};timeMs=kt.timeMs;transitions=new Set;resolvers=null;controller=null;lastFlushedAt=0;resetQueueOnNextPush=!1;push({key:e,query:t,options:n},r=kt.timeMs){this.resetQueueOnNextPush&&=(this.reset(),!1),ut(7,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=It}){return this.resolvers?.promise??Promise.resolve(e())}flush({getSearchParamsSnapshot:e=It,rateLimitFactor:t=1,...n},r){if(this.controller??=new AbortController,!Number.isFinite(this.timeMs))return ut(8),Promise.resolve(e());if(this.resolvers)return this.resolvers.promise;this.resolvers=Pt();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 Nt(()=>{let e=performance.now()-this.lastFlushedAt,n=this.timeMs,r=t*Math.max(0,n-e);ut(9,r,n,t),r===0?i():Nt(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 ut(10,JSON.stringify(Object.fromEntries(this.updateMap))),this.updateMap.clear(),this.transitions.clear(),this.options={history:`replace`,scroll:!1,shallow:!0},this.timeMs=kt.timeMs,e}applyPendingUpdates(e,t){let{updateUrl:n,getSearchParamsSnapshot:r}=e,i=r();if(ut(11,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(),ut(12,a,o);for(let[e,t]of a)t===null?i.delete(e):i=jt(i,e,t);t&&(i=t(i));try{return Ft(s,()=>n(i,o)),[i,null]}catch(e){return console.error(pt(429),a.map(([e])=>e).join(),e),[i,e]}}},Rt=vt(`throttle-queue`,()=>new Lt);function zt(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 Bt=class{callback;resolvers=Pt();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,Nt(()=>{let t=this.resolvers;try{ut(13,e);let n=this.callback(e);ut(14,this.queuedValue),this.queuedValue=void 0,this.resolvers=Pt(),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}},Vt=class{throttleQueue;queues=new Map;queuedQuerySync=Mt();constructor(e=new Lt){this.throttleQueue=e}push(e,t,n,r){if(!Number.isFinite(t)){let e=n.getSearchParamsSnapshot??It;return Promise.resolve(e())}let i=e.key;if(!this.queues.has(i)){ut(15,i);let e=new Bt(e=>(this.throttleQueue.push(e),this.throttleQueue.flush(n,r).finally(()=>{this.queues.get(e.key)?.queuedValue===void 0&&(ut(16,e.key),this.queues.delete(e.key)),this.queuedQuerySync.emit(e.key)})));this.queues.set(i,e)}ut(17,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?(ut(18,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())ut(18,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}},Ht=vt(`debounce-controller`,()=>new Vt(Rt));function Ut(e){return zt(e,(e,t)=>Ht.queuedQuerySync.on(e,t),e=>Ht.getQueuedQuery(e))}function Wt(e){return vt(`history-emitter.${e}`,()=>Mt())}var Gt=`__nuqs__`,Kt=Wt(`react`);function qt(e){return function(t,n){let r=new URL(location.href);r.search=mt(t),ut(20,`react`,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,Gt,r),Kt.emit(`update`,t),n.scroll===!0&&window.scrollTo({top:0})}}var Jt=(0,b.createContext)({fullPageNavigationOnShallowFalseUpdates:!1}),Yt=new URLSearchParams;function Xt(){return Yt}function Zt(e){return Kt.on(`update`,e),window.addEventListener(`popstate`,e),()=>{Kt.off(`update`,e),window.removeEventListener(`popstate`,e)}}function Qt(e){let{fullPageNavigationOnShallowFalseUpdates:t}=(0,b.useContext)(Jt),n=(0,b.useRef)(null);return{searchParams:(0,b.useSyncExternalStore)(Zt,()=>{let t=Et(new URLSearchParams(location.search),e,!1),r=t.toString();return n.current?.key===r?n.current.search:(n.current={key:r,search:t},t)},Xt),updateUrl:(0,b.useMemo)(()=>qt(t),[t])}}var $t=xt(Qt);function en({children:e,fullPageNavigationOnShallowFalseUpdates:t=!1,...n}){return(0,b.createElement)(Jt.Provider,{value:{fullPageNavigationOnShallowFalseUpdates:t}},(0,b.createElement)($t,{...n,children:e}))}function tn(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=tn(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function nn(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=tn(e))&&(r&&(r+=` `),r+=t);return r}var rn=(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},an=(e,t)=>({classGroupId:e,validator:t}),on=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),sn=`-`,cn=[],ln=`arbitrary..`,un=e=>{let t=pn(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return fn(e);let n=e.split(sn);return dn(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?rn(i,t):t:i||cn}return n[e]||cn}}},dn=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=dn(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(sn):e.slice(t).join(sn),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},fn=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?ln+r:void 0})(),pn=e=>{let{theme:t,classGroups:n}=e;return mn(n,t)},mn=(e,t)=>{let n=on();for(let r in e){let i=e[r];hn(i,n,r,t)}return n},hn=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];gn(i,t,n,r)}},gn=(e,t,n,r)=>{if(typeof e==`string`){_n(e,t,n);return}if(typeof e==`function`){vn(e,t,n,r);return}yn(e,t,n,r)},_n=(e,t,n)=>{let r=e===``?t:bn(t,e);r.classGroupId=n},vn=(e,t,n,r)=>{if(xn(e)){hn(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(an(n,e))},yn=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];hn(o,bn(t,a),n,r)}},bn=(e,t)=>{let n=e,r=t.split(sn),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=on(),n.nextPart.set(t,i)),n=i}return n},xn=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Sn=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)}}},Cn=`!`,wn=`:`,Tn=[],En=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Dn=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===wn){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(Cn)?(c=s.slice(0,-1),l=!0):s.startsWith(Cn)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return En(t,l,c,u)};if(t){let e=t+wn,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):En(Tn,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},On=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}},kn=e=>({cache:Sn(e.cacheSize),parseClassName:Dn(e),sortModifiers:On(e),postfixLookupClassGroupIds:An(e),...un(e)}),An=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},jn=/\s+/,Mn=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(jn),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+Cn:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},Nn=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Pn(n))&&(i&&(i+=` `),i+=r);return i},Pn=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Pn(e[r]))&&(n&&(n+=` `),n+=t);return n},Fn=(e,...t)=>{let n,r,i,a,o=o=>(n=kn(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=Mn(e,n);return i(e,a),a};return a=o,(...e)=>a(Nn(...e))},In=[],Ln=e=>{let t=t=>t[e]||In;return t.isThemeGetter=!0,t},Rn=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,zn=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Bn=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Vn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Hn=/\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$/,Un=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Wn=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Gn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Kn=e=>Bn.test(e),qn=e=>!!e&&!Number.isNaN(Number(e)),Jn=e=>!!e&&Number.isInteger(Number(e)),Yn=e=>e.endsWith(`%`)&&qn(e.slice(0,-1)),Xn=e=>Vn.test(e),Zn=()=>!0,Qn=e=>Hn.test(e)&&!Un.test(e),$n=()=>!1,er=e=>Wn.test(e),tr=e=>Gn.test(e),nr=e=>!ar(e)&&!pr(e),rr=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),ir=e=>xr(e,Tr,$n),ar=e=>Rn.test(e),or=e=>xr(e,Er,Qn),sr=e=>xr(e,Dr,qn),cr=e=>xr(e,kr,Zn),lr=e=>xr(e,Or,$n),ur=e=>xr(e,Cr,$n),dr=e=>xr(e,wr,tr),fr=e=>xr(e,Ar,er),pr=e=>zn.test(e),mr=e=>Sr(e,Er),hr=e=>Sr(e,Or),gr=e=>Sr(e,Cr),_r=e=>Sr(e,Tr),vr=e=>Sr(e,wr),yr=e=>Sr(e,Ar,!0),br=e=>Sr(e,kr,!0),xr=(e,t,n)=>{let r=Rn.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Sr=(e,t,n=!1)=>{let r=zn.exec(e);return r?r[1]?t(r[1]):n:!1},Cr=e=>e===`position`||e===`percentage`,wr=e=>e===`image`||e===`url`,Tr=e=>e===`length`||e===`size`||e===`bg-size`,Er=e=>e===`length`,Dr=e=>e===`number`,Or=e=>e===`family-name`,kr=e=>e===`number`||e===`weight`,Ar=e=>e===`shadow`,jr=Fn(()=>{let e=Ln(`color`),t=Ln(`font`),n=Ln(`text`),r=Ln(`font-weight`),i=Ln(`tracking`),a=Ln(`leading`),o=Ln(`breakpoint`),s=Ln(`container`),c=Ln(`spacing`),l=Ln(`radius`),u=Ln(`shadow`),d=Ln(`inset-shadow`),f=Ln(`text-shadow`),p=Ln(`drop-shadow`),m=Ln(`blur`),h=Ln(`perspective`),g=Ln(`aspect`),_=Ln(`ease`),v=Ln(`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(),pr,ar],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[pr,ar,c],T=()=>[Kn,`full`,`auto`,...w()],E=()=>[Jn,`none`,`subgrid`,pr,ar],D=()=>[`auto`,{span:[`full`,Jn,pr,ar]},Jn,pr,ar],O=()=>[Jn,`auto`,pr,ar],k=()=>[`auto`,`min`,`max`,`fr`,pr,ar],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=()=>[Kn,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[Kn,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],F=()=>[Kn,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],I=()=>[e,pr,ar],L=()=>[...b(),gr,ur,{position:[pr,ar]}],ee=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],te=()=>[`auto`,`cover`,`contain`,_r,ir,{size:[pr,ar]}],ne=()=>[Yn,mr,or],R=()=>[``,`none`,`full`,l,pr,ar],z=()=>[``,qn,mr,or],B=()=>[`solid`,`dashed`,`dotted`,`double`],re=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],ie=()=>[qn,Yn,gr,ur],ae=()=>[``,`none`,m,pr,ar],oe=()=>[`none`,qn,pr,ar],se=()=>[`none`,qn,pr,ar],ce=()=>[qn,pr,ar],le=()=>[Kn,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Xn],breakpoint:[Xn],color:[Zn],container:[Xn],"drop-shadow":[Xn],ease:[`in`,`out`,`in-out`],font:[nr],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Xn],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Xn],shadow:[Xn],spacing:[`px`,qn],text:[Xn],"text-shadow":[Xn],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Kn,ar,pr,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,pr,ar]}],"container-named":[rr],columns:[{columns:[qn,ar,pr,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:[Jn,`auto`,pr,ar]}],basis:[{basis:[Kn,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[qn,Kn,`auto`,`initial`,`none`,ar]}],grow:[{grow:[``,qn,pr,ar]}],shrink:[{shrink:[``,qn,pr,ar]}],order:[{order:[Jn,`first`,`last`,`none`,pr,ar]}],"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,mr,or]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,br,cr]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Yn,ar]}],"font-family":[{font:[hr,lr,t]}],"font-features":[{"font-features":[ar]}],"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,pr,ar]}],"line-clamp":[{"line-clamp":[qn,`none`,pr,sr]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,pr,ar]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,pr,ar]}],"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:[...B(),`wavy`]}],"text-decoration-thickness":[{decoration:[qn,`from-font`,`auto`,pr,or]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[qn,`auto`,pr,ar]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[Jn,pr,ar]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,pr,ar]}],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`,pr,ar]}],"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:ee()}],"bg-size":[{bg:te()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Jn,pr,ar],radial:[``,pr,ar],conic:[Jn,pr,ar]},vr,dr]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:ne()}],"gradient-via-pos":[{via:ne()}],"gradient-to-pos":[{to:ne()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:R()}],"rounded-s":[{"rounded-s":R()}],"rounded-e":[{"rounded-e":R()}],"rounded-t":[{"rounded-t":R()}],"rounded-r":[{"rounded-r":R()}],"rounded-b":[{"rounded-b":R()}],"rounded-l":[{"rounded-l":R()}],"rounded-ss":[{"rounded-ss":R()}],"rounded-se":[{"rounded-se":R()}],"rounded-ee":[{"rounded-ee":R()}],"rounded-es":[{"rounded-es":R()}],"rounded-tl":[{"rounded-tl":R()}],"rounded-tr":[{"rounded-tr":R()}],"rounded-br":[{"rounded-br":R()}],"rounded-bl":[{"rounded-bl":R()}],"border-w":[{border:z()}],"border-w-x":[{"border-x":z()}],"border-w-y":[{"border-y":z()}],"border-w-s":[{"border-s":z()}],"border-w-e":[{"border-e":z()}],"border-w-bs":[{"border-bs":z()}],"border-w-be":[{"border-be":z()}],"border-w-t":[{"border-t":z()}],"border-w-r":[{"border-r":z()}],"border-w-b":[{"border-b":z()}],"border-w-l":[{"border-l":z()}],"divide-x":[{"divide-x":z()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":z()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...B(),`hidden`,`none`]}],"divide-style":[{divide:[...B(),`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:[...B(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[qn,pr,ar]}],"outline-w":[{outline:[``,qn,mr,or]}],"outline-color":[{outline:I()}],shadow:[{shadow:[``,`none`,u,yr,fr]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":[`none`,d,yr,fr]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:z()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[qn,or]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":z()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":[`none`,f,yr,fr]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[qn,pr,ar]}],"mix-blend":[{"mix-blend":[...re(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":re()}],"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":[qn]}],"mask-image-linear-from-pos":[{"mask-linear-from":ie()}],"mask-image-linear-to-pos":[{"mask-linear-to":ie()}],"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":ie()}],"mask-image-t-to-pos":[{"mask-t-to":ie()}],"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":ie()}],"mask-image-r-to-pos":[{"mask-r-to":ie()}],"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":ie()}],"mask-image-b-to-pos":[{"mask-b-to":ie()}],"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":ie()}],"mask-image-l-to-pos":[{"mask-l-to":ie()}],"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":ie()}],"mask-image-x-to-pos":[{"mask-x-to":ie()}],"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":ie()}],"mask-image-y-to-pos":[{"mask-y-to":ie()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[pr,ar]}],"mask-image-radial-from-pos":[{"mask-radial-from":ie()}],"mask-image-radial-to-pos":[{"mask-radial-to":ie()}],"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":[qn]}],"mask-image-conic-from-pos":[{"mask-conic-from":ie()}],"mask-image-conic-to-pos":[{"mask-conic-to":ie()}],"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:ee()}],"mask-size":[{mask:te()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,pr,ar]}],filter:[{filter:[``,`none`,pr,ar]}],blur:[{blur:ae()}],brightness:[{brightness:[qn,pr,ar]}],contrast:[{contrast:[qn,pr,ar]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,yr,fr]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:[``,qn,pr,ar]}],"hue-rotate":[{"hue-rotate":[qn,pr,ar]}],invert:[{invert:[``,qn,pr,ar]}],saturate:[{saturate:[qn,pr,ar]}],sepia:[{sepia:[``,qn,pr,ar]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,pr,ar]}],"backdrop-blur":[{"backdrop-blur":ae()}],"backdrop-brightness":[{"backdrop-brightness":[qn,pr,ar]}],"backdrop-contrast":[{"backdrop-contrast":[qn,pr,ar]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,qn,pr,ar]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[qn,pr,ar]}],"backdrop-invert":[{"backdrop-invert":[``,qn,pr,ar]}],"backdrop-opacity":[{"backdrop-opacity":[qn,pr,ar]}],"backdrop-saturate":[{"backdrop-saturate":[qn,pr,ar]}],"backdrop-sepia":[{"backdrop-sepia":[``,qn,pr,ar]}],"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`,pr,ar]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[qn,`initial`,pr,ar]}],ease:[{ease:[`linear`,`initial`,_,pr,ar]}],delay:[{delay:[qn,pr,ar]}],animate:[{animate:[`none`,v,pr,ar]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,pr,ar]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:oe()}],"rotate-x":[{"rotate-x":oe()}],"rotate-y":[{"rotate-y":oe()}],"rotate-z":[{"rotate-z":oe()}],scale:[{scale:se()}],"scale-x":[{"scale-x":se()}],"scale-y":[{"scale-y":se()}],"scale-z":[{"scale-z":se()}],"scale-3d":[`scale-3d`],skew:[{skew:ce()}],"skew-x":[{"skew-x":ce()}],"skew-y":[{"skew-y":ce()}],transform:[{transform:[pr,ar,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:le()}],"translate-x":[{"translate-x":le()}],"translate-y":[{"translate-y":le()}],"translate-z":[{"translate-z":le()}],"translate-none":[`translate-none`],zoom:[{zoom:[Jn,pr,ar]}],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`,pr,ar]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":I()}],"scrollbar-track-color":[{"scrollbar-track":I()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"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`,pr,ar]}],fill:[{fill:[`none`,...I()]}],"stroke-w":[{stroke:[qn,mr,or,sr]}],stroke:[{stroke:[`none`,...I()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],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`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function Mr(...e){return jr(nn(e))}var Nr=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Pr=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Fr=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Ir=e=>{let t=Fr(e);return t.charAt(0).toUpperCase()+t.slice(1)},Lr={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`},Rr=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},zr=(0,b.createContext)({}),Br=()=>(0,b.useContext)(zr),Vr=(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=``}=Br()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,b.createElement)(`svg`,{ref:c,...Lr,width:t??l??Lr.width,height:t??l??Lr.height,stroke:e??f,strokeWidth:m,className:Nr(`lucide`,p,i),...!a&&!Rr(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,b.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),Hr=(e,t)=>{let n=(0,b.forwardRef)(({className:n,...r},i)=>(0,b.createElement)(Vr,{ref:i,iconNode:t,className:Nr(`lucide-${Pr(Ir(e))}`,`lucide-${e}`,n),...r}));return n.displayName=Ir(e),n},Ur=Hr(`arrow-left-right`,[[`path`,{d:`M8 3 4 7l4 4`,key:`9rb6wj`}],[`path`,{d:`M4 7h16`,key:`6tx8e3`}],[`path`,{d:`m16 21 4-4-4-4`,key:`siv7j2`}],[`path`,{d:`M20 17H4`,key:`h6l3hr`}]]),Wr=Hr(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),Gr=Hr(`braces`,[[`path`,{d:`M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1`,key:`ezmyqa`}],[`path`,{d:`M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1`,key:`e1hn23`}]]),Kr=Hr(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),qr=Hr(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),Jr=Hr(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),Yr=Hr(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),Xr=Hr(`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`}]]),Zr=Hr(`circle-plus`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M8 12h8`,key:`1wcyev`}],[`path`,{d:`M12 8v8`,key:`napkw2`}]]),Qr=Hr(`circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),$r=Hr(`clipboard-check`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`m9 14 2 2 4-4`,key:`df797q`}]]),ei=Hr(`clipboard-list`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`M12 11h4`,key:`1jrz19`}],[`path`,{d:`M12 16h4`,key:`n85exb`}],[`path`,{d:`M8 11h.01`,key:`1dfujw`}],[`path`,{d:`M8 16h.01`,key:`18s6g9`}]]),ti=Hr(`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`}]]),ni=Hr(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),ri=Hr(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),ii=Hr(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),ai=Hr(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),oi=Hr(`languages`,[[`path`,{d:`m5 8 6 6`,key:`1wu5hv`}],[`path`,{d:`m4 14 6-6 2-3`,key:`1k1g8d`}],[`path`,{d:`M2 5h12`,key:`or177f`}],[`path`,{d:`M7 2h1`,key:`1t2jsx`}],[`path`,{d:`m22 22-5-10-5 10`,key:`don7ne`}],[`path`,{d:`M14 18h6`,key:`1m8k6r`}]]),si=Hr(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),ci=Hr(`loader`,[[`path`,{d:`M12 2v4`,key:`3427ic`}],[`path`,{d:`m16.2 7.8 2.9-2.9`,key:`r700ao`}],[`path`,{d:`M18 12h4`,key:`wj9ykh`}],[`path`,{d:`m16.2 16.2 2.9 2.9`,key:`1bxg5t`}],[`path`,{d:`M12 18v4`,key:`jadmvz`}],[`path`,{d:`m4.9 19.1 2.9-2.9`,key:`bwix9q`}],[`path`,{d:`M2 12h4`,key:`j09sii`}],[`path`,{d:`m4.9 4.9 2.9 2.9`,key:`giyufr`}]]),li=Hr(`log-in`,[[`path`,{d:`m10 17 5-5-5-5`,key:`1bsop3`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4`,key:`u53s6r`}]]),ui=Hr(`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`}]]),di=Hr(`logs`,[[`path`,{d:`M3 5h1`,key:`1mv5vm`}],[`path`,{d:`M3 12h1`,key:`lp3yf2`}],[`path`,{d:`M3 19h1`,key:`w6f3n9`}],[`path`,{d:`M8 5h1`,key:`1nxr5w`}],[`path`,{d:`M8 12h1`,key:`1con00`}],[`path`,{d:`M8 19h1`,key:`k7p10e`}],[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}]]),fi=Hr(`maximize-2`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]),pi=Hr(`messages-square`,[[`path`,{d:`M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z`,key:`1n2ejm`}],[`path`,{d:`M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1`,key:`1qfcsi`}]]),mi=Hr(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),hi=Hr(`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`}]]),gi=Hr(`picture-in-picture-2`,[[`path`,{d:`M21 9V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v10c0 1.1.9 2 2 2h4`,key:`daa4of`}],[`rect`,{width:`10`,height:`7`,x:`12`,y:`13`,rx:`2`,key:`1nb8gs`}]]),_i=Hr(`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`}]]),vi=Hr(`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`}]]),yi=Hr(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),bi=Hr(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),xi=Hr(`save`,[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]),Si=Hr(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),Ci=Hr(`sliders-vertical`,[[`path`,{d:`M10 8h4`,key:`1sr2af`}],[`path`,{d:`M12 21v-9`,key:`17s77i`}],[`path`,{d:`M12 8V3`,key:`13r4qs`}],[`path`,{d:`M17 16h4`,key:`h1uq16`}],[`path`,{d:`M19 12V3`,key:`o1uvq1`}],[`path`,{d:`M19 21v-5`,key:`qua636`}],[`path`,{d:`M3 14h4`,key:`bcjad9`}],[`path`,{d:`M5 10V3`,key:`cb8scm`}],[`path`,{d:`M5 21v-7`,key:`1w1uti`}]]),wi=Hr(`smartphone`,[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]),Ti=Hr(`square-split-vertical`,[[`path`,{d:`M5 8V5c0-1 1-2 2-2h10c1 0 2 1 2 2v3`,key:`1pi83i`}],[`path`,{d:`M19 16v3c0 1-1 2-2 2H7c-1 0-2-1-2-2v-3`,key:`ido5k7`}],[`line`,{x1:`4`,x2:`20`,y1:`12`,y2:`12`,key:`1e0a9i`}]]),Ei=Hr(`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`}]]),Di=Hr(`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`}]]),Oi=Hr(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),ki=Hr(`unplug`,[[`path`,{d:`m19 5 3-3`,key:`yk6iyv`}],[`path`,{d:`m2 22 3-3`,key:`19mgm9`}],[`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:`M7.5 13.5 10 11`,key:`7xgeeb`}],[`path`,{d:`M10.5 16.5 13 14`,key:`10btkg`}],[`path`,{d:`m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z`,key:`1snsnr`}]]),Ai=Hr(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),ji=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Mi=nn,Ni=(e,t)=>n=>{if(t?.variants==null)return Mi(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=ji(t)||ji(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 Mi(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 Pi(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Fi(...e){return t=>{let n=!1,r=e.map(e=>{let r=Pi(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():Pi(e[t],null)}}}}function Ii(...e){return b.useCallback(Fi(...e),e)}function Li(e){let t=b.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];qi(r)&&typeof Zi==`function`&&(r=Zi(r._payload)),b.Children.forEach(r,e=>{if(Gi(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;qi(n)&&typeof Zi==`function`&&(n=Zi(n._payload)),a=Hi(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=b.cloneElement(a,void 0,s):!o&&b.Children.count(r)===1&&b.isValidElement(r)&&(a=r);let c=a?Wi(a):void 0,l=Ii(n,c);if(!a){if(r||r===0)throw Error(o?Xi(e):Yi(e));return r}let u=Ui(i,a.props??{});return a.type!==b.Fragment&&(u.ref=n?l:c),b.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}var Ri=Li(`Slot`),zi=Symbol.for(`radix.slottable`);function Bi(e){let t=e=>`child`in e?e.children(e.child):e.children;return t.displayName=`${e}.Slottable`,t.__radixId=zi,t}var Vi=Bi(`Slottable`),Hi=(e,t)=>{if(`child`in e.props){let t=e.props.child;return b.isValidElement(t)?b.cloneElement(t,void 0,e.props.children(t.props.children)):null}return b.isValidElement(t)?t:null};function Ui(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 Wi(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 Gi(e){return b.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===zi}var Ki=Symbol.for(`react.lazy`);function qi(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Ki&&`_payload`in e&&Ji(e._payload)}function Ji(e){return typeof e==`object`&&!!e&&`then`in e}var Yi=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,Xi=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,Zi=b.use,Qi=Ni([`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 $i({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,H.jsxs)(i?Ri:`button`,{"data-slot":`button`,className:Mr(Qi({variant:t,size:n}),e),type:r,disabled:c||a,"aria-busy":a||void 0,...u,children:[a?(0,H.jsx)(si,{className:`motion-safe:animate-spin`}):o,i?(0,H.jsx)(Vi,{children:l}):l,!a&&s?(0,H.jsx)(`span`,{"data-cta-icon-trailing":!0,children:s}):null]})}function ea(e,t){let n=getComputedStyle(e);return t*parseFloat(n.fontSize)}function ta(e,t){let n=getComputedStyle(e.ownerDocument.documentElement);return t*parseFloat(n.fontSize)}function na(e){return e/100*window.innerHeight}function ra(e){return e/100*window.innerWidth}function ia(e){switch(typeof e){case`number`:return[e,`px`];case`string`:{let t=parseFloat(e);return e.endsWith(`%`)?[t,`%`]:e.endsWith(`px`)?[t,`px`]:e.endsWith(`rem`)?[t,`rem`]:e.endsWith(`em`)?[t,`em`]:e.endsWith(`vh`)?[t,`vh`]:e.endsWith(`vw`)?[t,`vw`]:[t,`%`]}}}function aa({groupSize:e,panelElement:t,styleProp:n}){let r,[i,a]=ia(n);switch(a){case`%`:r=i/100*e;break;case`px`:r=i;break;case`rem`:r=ta(t,i);break;case`em`:r=ea(t,i);break;case`vh`:r=na(i);break;case`vw`:r=ra(i);break}return r}function oa(e){return parseFloat(e.toFixed(3))}function sa({group:e}){let{orientation:t,panels:n}=e;return n.reduce((e,n)=>(e+=t===`horizontal`?n.element.offsetWidth:n.element.offsetHeight,e),0)}function ca(e){let{panels:t}=e,n=sa({group:e});return n===0?t.map(e=>({groupResizeBehavior:e.panelConstraints.groupResizeBehavior,collapsedSize:0,collapsible:e.panelConstraints.collapsible===!0,defaultSize:void 0,disabled:e.panelConstraints.disabled,minSize:0,maxSize:100,panelId:e.id})):t.map(e=>{let{element:t,panelConstraints:r}=e,i=0;r.collapsedSize!==void 0&&(i=oa(aa({groupSize:n,panelElement:t,styleProp:r.collapsedSize})/n*100));let a;r.defaultSize!==void 0&&(a=oa(aa({groupSize:n,panelElement:t,styleProp:r.defaultSize})/n*100));let o=0;r.minSize!==void 0&&(o=oa(aa({groupSize:n,panelElement:t,styleProp:r.minSize})/n*100));let s=100;return r.maxSize!==void 0&&(s=oa(aa({groupSize:n,panelElement:t,styleProp:r.maxSize})/n*100)),{groupResizeBehavior:r.groupResizeBehavior,collapsedSize:i,collapsible:r.collapsible===!0,defaultSize:a,disabled:r.disabled,minSize:o,maxSize:s,panelId:e.id}})}function la(e,t=`Assertion error`){if(!e)throw Error(t)}function ua(e,t){return Array.from(t).sort(e===`horizontal`?da:fa)}function da(e,t){let n=e.element.offsetLeft-t.element.offsetLeft;return n===0?e.element.offsetWidth-t.element.offsetWidth:n}function fa(e,t){let n=e.element.offsetTop-t.element.offsetTop;return n===0?e.element.offsetHeight-t.element.offsetHeight:n}function pa(e){return typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.ELEMENT_NODE}function ma(e,t){return{x:e.x>=t.left&&e.x<=t.right?0:Math.min(Math.abs(e.x-t.left),Math.abs(e.x-t.right)),y:e.y>=t.top&&e.y<=t.bottom?0:Math.min(Math.abs(e.y-t.top),Math.abs(e.y-t.bottom))}}function ha({orientation:e,rects:t,targetRect:n}){let r={x:n.x+n.width/2,y:n.y+n.height/2},i,a=Number.MAX_VALUE;for(let n of t){let{x:t,y:o}=ma(r,n),s=e===`horizontal`?t:o;s<a&&(a=s,i=n)}return la(i,`No rect found`),i}var ga;function _a(){return ga===void 0&&(ga=typeof matchMedia==`function`&&!!matchMedia(`(pointer:coarse)`).matches),ga}function va(e){let{element:t,orientation:n,panels:r,separators:i}=e,a=ua(n,Array.from(t.children).filter(pa).map(e=>({element:e}))).map(({element:e})=>e),o=[],s=!1,c=!1,l=-1,u=-1,d=0,f,p=[];{let e=-1;for(let t of a)t.hasAttribute(`data-panel`)&&(e++,t.hasAttribute(`data-disabled`)||(d++,l===-1&&(l=e),u=e))}if(d>1){let t=-1;for(let d of a)if(d.hasAttribute(`data-panel`)){t++;let i=r.find(e=>e.element===d);if(i){if(f){let r=f.element.getBoundingClientRect(),a=d.getBoundingClientRect(),m;if(c){let e=n===`horizontal`?new DOMRect(r.right,r.top,0,r.height):new DOMRect(r.left,r.bottom,r.width,0),t=n===`horizontal`?new DOMRect(a.left,a.top,0,a.height):new DOMRect(a.left,a.top,a.width,0);switch(p.length){case 0:m=[e,t];break;case 1:{let i=p[0];m=[i,ha({orientation:n,rects:[r,a],targetRect:i.element.getBoundingClientRect()})===r?t:e];break}default:m=p;break}}else m=p.length?p:[n===`horizontal`?new DOMRect(r.right,a.top,a.left-r.right,a.height):new DOMRect(a.left,r.bottom,a.width,a.top-r.bottom)];for(let n of m){let r=`width`in n?n:n.element.getBoundingClientRect(),a=_a()?e.resizeTargetMinimumSize.coarse:e.resizeTargetMinimumSize.fine;if(r.width<a){let e=a-r.width;r=new DOMRect(r.x-e/2,r.y,r.width+e,r.height)}if(r.height<a){let e=a-r.height;r=new DOMRect(r.x,r.y-e/2,r.width,r.height+e)}!s&&!(t<=l||t>u)&&o.push({group:e,groupSize:sa({group:e}),panels:[f,i],separator:`width`in n?void 0:n,rect:r}),s=!1}}c=!1,f=i,p=[]}}else if(d.hasAttribute(`data-separator`)){d.ariaDisabled!==null&&(s=!0);let e=i.find(e=>e.element===d);e?p.push(e):(f=void 0,p=[])}else c=!0}return o}var ya=class{#e={};addListener(e,t){let n=this.#e[e];return n===void 0?this.#e[e]=[t]:n.includes(t)||n.push(t),()=>{this.removeListener(e,t)}}emit(e,t){let n=this.#e[e];if(n!==void 0)if(n.length===1)n[0].call(null,t);else{let e=!1,r=null,i=Array.from(n);for(let n=0;n<i.length;n++){let a=i[n];try{a.call(null,t)}catch(t){r===null&&(e=!0,r=t)}}if(e)throw r}}removeAllListeners(){this.#e={}}removeListener(e,t){let n=this.#e[e];if(n!==void 0){let e=n.indexOf(t);e>=0&&n.splice(e,1)}}},ba={cursorFlags:0,state:`inactive`},xa=new ya;function Sa(){return ba}function Ca(e){return xa.addListener(`change`,e)}function wa(e){let t=ba,n={...ba};n.cursorFlags=e,ba=n,xa.emit(`change`,{prev:t,next:n})}function Ta(e){let t=ba;ba=e,xa.emit(`change`,{prev:t,next:e})}var Ea=e=>e,Da=()=>{},Oa=1,ka=2,Aa=4,ja=8,Ma=3,Na=12,Pa;function Fa(){return Pa===void 0&&(Pa=!1,typeof window<`u`&&(window.navigator.userAgent.includes(`Chrome`)||window.navigator.userAgent.includes(`Firefox`))&&(Pa=!0)),Pa}function Ia({cursorFlags:e,groups:t,state:n}){let r=0,i=0;switch(n){case`active`:case`hover`:t.forEach(e=>{if(!e.mutableState.disableCursor)switch(e.orientation){case`horizontal`:r++;break;case`vertical`:i++;break}})}if(!(r===0&&i===0)){switch(n){case`active`:if(e&&Fa()){let t=(e&Oa)!==0,n=(e&ka)!==0,r=(e&Aa)!==0,i=(e&ja)!==0;if(t)return r?`se-resize`:i?`ne-resize`:`e-resize`;if(n)return r?`sw-resize`:i?`nw-resize`:`w-resize`;if(r)return`s-resize`;if(i)return`n-resize`}break}return Fa()?r>0&&i>0?`move`:r>0?`ew-resize`:`ns-resize`:r>0&&i>0?`grab`:r>0?`col-resize`:`row-resize`}}var La=new WeakMap;function Ra(e){if(e.defaultView===null||e.defaultView===void 0)return;let{prevStyle:t,styleSheet:n}=La.get(e)??{};n===void 0&&(n=new e.defaultView.CSSStyleSheet,e.adoptedStyleSheets&&(Object.isExtensible(e.adoptedStyleSheets)?e.adoptedStyleSheets.push(n):e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]));let r=Sa();switch(r.state){case`active`:case`hover`:{let e=Ia({cursorFlags:r.cursorFlags,groups:r.hitRegions.map(e=>e.group),state:r.state}),i=`*, *:hover {cursor: ${e} !important; }`;if(t===i)return;t=i,e?n.cssRules.length===0?n.insertRule(i):n.replaceSync(i):n.cssRules.length===1&&n.deleteRule(0);break}case`inactive`:t=void 0,n.cssRules.length===1&&n.deleteRule(0);break}La.set(e,{prevStyle:t,styleSheet:n})}var za=new Map,Ba=new ya;function Va(e){za=new Map(za),za.delete(e)}function Ha(e,t){for(let[t]of za)if(t.id===e)return t}function Ua(e,t){for(let[t,n]of za)if(t.id===e)return n;if(t)throw Error(`Could not find data for Group with id ${e}`)}function Wa(){return za}function Ga(e,t){return Ba.addListener(`groupChange`,n=>{n.group.id===e&&t(n)})}function Ka(e,t,n){let r=za.get(e);za=new Map(za),za.set(e,t),Ba.emit(`groupChange`,{group:e,isUserInteraction:n?.isUserInteraction===!0,prev:r,next:t})}function qa(e){let t=Sa(),n=!1;switch(t.state){case`active`:Ta({cursorFlags:0,state:`inactive`}),t.hitRegions.length>0&&(Ra(e),n=!0,t.hitRegions.forEach(e=>{let t=Ua(e.group.id,!0);Ka(e.group,t,{isUserInteraction:!0})}))}return n}function Ja(e){e.defaultPrevented||qa(e.currentTarget)}function Ya(e,t,n){let r,i={x:1/0,y:1/0};for(let a of t){let t=ma(n,a.rect);switch(e){case`horizontal`:t.x<=i.x&&(r=a,i=t);break;case`vertical`:t.y<=i.y&&(r=a,i=t);break}}return r?{distance:i,hitRegion:r}:void 0}function Xa(e){return typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}function Za(e,t){if(e===t)throw Error(`Cannot compare node with itself`);let n={a:ro(e),b:ro(t)},r;for(;n.a.at(-1)===n.b.at(-1);)r=n.a.pop(),n.b.pop();la(r,`Stacking order can only be calculated for elements with a common ancestor`);let i={a:no(to(n.a)),b:no(to(n.b))};if(i.a===i.b){let e=r.childNodes,t={a:n.a.at(-1),b:n.b.at(-1)},i=e.length;for(;i--;){let n=e[i];if(n===t.a)return 1;if(n===t.b)return-1}}return Math.sign(i.a-i.b)}var Qa=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function $a(e){let t=getComputedStyle(io(e)??e).display;return t===`flex`||t===`inline-flex`}function eo(e){let t=getComputedStyle(e);return!!(t.position===`fixed`||t.zIndex!==`auto`&&(t.position!==`static`||$a(e))||+t.opacity<1||`transform`in t&&t.transform!==`none`||`webkitTransform`in t&&t.webkitTransform!==`none`||`mixBlendMode`in t&&t.mixBlendMode!==`normal`||`filter`in t&&t.filter!==`none`||`webkitFilter`in t&&t.webkitFilter!==`none`||`isolation`in t&&t.isolation===`isolate`||Qa.test(t.willChange)||t.webkitOverflowScrolling===`touch`)}function to(e){let t=e.length;for(;t--;){let n=e[t];if(la(n,`Missing node`),eo(n))return n}return null}function no(e){return e&&Number(getComputedStyle(e).zIndex)||0}function ro(e){let t=[];for(;e;)t.push(e),e=io(e);return t}function io(e){let{parentNode:t}=e;return Xa(t)?t.host:t}function ao(e,t){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function oo({groupElement:e,hitRegion:t,pointerEventTarget:n}){if(!pa(n)||n.contains(e)||e.contains(n))return!0;if(Za(n,e)>0){let r=n;for(;r;){if(r.contains(e))return!0;if(ao(r.getBoundingClientRect(),t))return!1;r=r.parentElement}}return!0}function so(e,t){let n=[];return t.forEach((t,r)=>{if(r.disabled)return;let i=va(r),a=Ya(r.orientation,i,{x:e.clientX,y:e.clientY});a&&a.distance.x<=0&&a.distance.y<=0&&oo({groupElement:r.element,hitRegion:a.hitRegion.rect,pointerEventTarget:e.target})&&n.push(a.hitRegion)}),n}function co(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function lo(e,t,n=0){return Math.abs(oa(e)-oa(t))<=n}function uo(e,t){return lo(e,t)?0:e>t?1:-1}function fo({overrideDisabledPanels:e,panelConstraints:t,prevSize:n,size:r}){let{collapsedSize:i=0,collapsible:a,disabled:o,maxSize:s=100,minSize:c=0}=t;if(o&&!e)return n;if(uo(r,c)<0)if(a){let e=(i+c)/2;r=uo(r,e)<0?i:c}else r=c;return r=Math.min(s,r),r=oa(r),r}function po({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:a}){if(lo(e,0))return t;let o=a===`imperative-api`,s=Object.values(t),c=Object.values(i),l=[...s],[u,d]=r;la(u!=null,`Invalid first pivot index`),la(d!=null,`Invalid second pivot index`);let f=0;switch(a){case`keyboard`:{let t=e<0?d:u,r=n[t];la(r,`Panel constraints not found for index ${t}`);let{collapsedSize:i=0,collapsible:a,minSize:o=0}=r;if(a){let n=s[t];if(la(n!=null,`Previous layout not found for panel index ${t}`),lo(n,i)){let t=o-n;uo(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}{let t=e<0?u:d,r=n[t];la(r,`No panel constraints found for index ${t}`);let{collapsedSize:i=0,collapsible:a,minSize:o=0}=r;if(a){let n=s[t];if(la(n!=null,`Previous layout not found for panel index ${t}`),lo(n,o)){let t=n-i;uo(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}break;default:{let t=e<0?d:u,r=n[t];la(r,`Panel constraints not found for index ${t}`);let i=s[t],{collapsible:a,collapsedSize:o,minSize:c}=r;if(a&&uo(i,c)<0)if(e>0){let t=c-o,n=t/2;uo(i+e,c)<0&&(e=uo(e,n)<=0?0:t)}else{let t=c-o,n=100-t/2;uo(i-e,c)<0&&(e=uo(100+e,n)>0?0:-t)}break}}{let t=e<0?1:-1,r=e<0?d:u,i=0;for(;;){let e=s[r];la(e!=null,`Previous layout not found for panel index ${r}`);let a=fo({overrideDisabledPanels:o,panelConstraints:n[r],prevSize:e,size:100})-e;if(i+=a,r+=t,r<0||r>=n.length)break}let a=Math.min(Math.abs(e),Math.abs(i));e=e<0?0-a:a}{let t=e<0?u:d;for(;t>=0&&t<n.length;){let r=Math.abs(e)-Math.abs(f),i=s[t];la(i!=null,`Previous layout not found for panel index ${t}`);let a=i-r,c=fo({overrideDisabledPanels:o,panelConstraints:n[t],prevSize:i,size:a});if(!lo(i,c)&&(f+=i-c,l[t]=c,f.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?t--:t++}}if(co(c,l))return i;{let t=e<0?d:u,r=s[t];la(r!=null,`Previous layout not found for panel index ${t}`);let i=r+f,a=fo({overrideDisabledPanels:o,panelConstraints:n[t],prevSize:r,size:i});if(l[t]=a,!lo(a,i)){let t=i-a,r=e<0?d:u;for(;r>=0&&r<n.length;){let i=l[r];la(i!=null,`Previous layout not found for panel index ${r}`);let a=i+t,s=fo({overrideDisabledPanels:o,panelConstraints:n[r],prevSize:i,size:a});if(lo(i,s)||(t-=s-i,l[r]=s),lo(t,0))break;e>0?r--:r++}}}if(!lo(Object.values(l).reduce((e,t)=>t+e,0),100,.1))return i;let p=Object.keys(i);return l.reduce((e,t,n)=>(e[p[n]]=t,e),{})}function mo(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(t[n]===void 0||uo(e[n],t[n])!==0)return!1;return!0}function ho({layout:e,panelConstraints:t}){let n=Object.values(e),r=[...n],i=r.reduce((e,t)=>e+t,0);if(r.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${r.map(e=>`${e}%`).join(`, `)}`);if(!lo(i,100)&&r.length>0)for(let e=0;e<t.length;e++){let t=r[e];la(t!=null,`No layout data found for index ${e}`),r[e]=100/i*t}let a=0;for(let e=0;e<t.length;e++){let i=n[e];la(i!=null,`No layout data found for index ${e}`);let o=r[e];la(o!=null,`No layout data found for index ${e}`);let s=fo({overrideDisabledPanels:!0,panelConstraints:t[e],prevSize:i,size:o});o!=s&&(a+=o-s,r[e]=s)}if(!lo(a,0))for(let e=0;e<t.length;e++){let n=r[e];la(n!=null,`No layout data found for index ${e}`);let i=n+a,o=fo({overrideDisabledPanels:!0,panelConstraints:t[e],prevSize:n,size:i});if(n!==o&&(a-=o-n,r[e]=o,lo(a,0)))break}let o=Object.keys(e);return r.reduce((e,t,n)=>(e[o[n]]=t,e),{})}function go({groupId:e,panelId:t}){let n=()=>{let t=Wa();for(let[n,{defaultLayoutDeferred:r,derivedPanelConstraints:i,layout:a,groupSize:o,separatorToPanels:s}]of t)if(n.id===e)return{defaultLayoutDeferred:r,derivedPanelConstraints:i,group:n,groupSize:o,layout:a,separatorToPanels:s};throw Error(`Group ${e} not found`)},r=()=>{let e=n().derivedPanelConstraints.find(e=>e.panelId===t);if(e!==void 0)return e;throw Error(`Panel constraints not found for Panel ${t}`)},i=()=>{let e=n().group.panels.find(e=>e.id===t);if(e!==void 0)return e;throw Error(`Layout not found for Panel ${t}`)},a=()=>{let e=n().layout[t];if(e!==void 0)return e;throw Error(`Layout not found for Panel ${t}`)},o=({nextSize:e,panels:n,prevLayout:r,derivedPanelConstraints:i})=>{let o=a(),s=n.findIndex(e=>e.id===t),c=s===0,l=s===n.length-1;if(l&&e<o&&(c||n.slice(0,s).every((e,t)=>{let n=i[t];return n?.collapsible&&lo(n.collapsedSize,r[n.panelId])}))){let e=n.slice(0,s).reduce((e,t)=>e+r[t.id],0);return{...r,[t]:oa(100-e)}}return po({delta:l?o-e:e-o,initialLayout:r,panelConstraints:i,pivotIndices:l?[s-1,s]:[s,s+1],prevLayout:r,trigger:`imperative-api`})},s=e=>{if(e===a())return;let{defaultLayoutDeferred:t,derivedPanelConstraints:r,group:i,groupSize:s,layout:c,separatorToPanels:l}=n(),u=ho({layout:o({nextSize:e,panels:i.panels,prevLayout:c,derivedPanelConstraints:r}),panelConstraints:r});mo(c,u)||Ka(i,{defaultLayoutDeferred:t,derivedPanelConstraints:r,groupSize:s,layout:u,separatorToPanels:l})};return{collapse:()=>{let{collapsible:e,collapsedSize:t}=r(),{mutableValues:n}=i(),o=a();e&&o!==t&&(n.expandToSize=o,s(t))},expand:()=>{let{collapsible:e,collapsedSize:t,minSize:n}=r(),{mutableValues:o}=i(),c=a();if(e&&c===t){let e=o.expandToSize??n;e===0&&(e=1),s(e)}},getSize:()=>{let{group:e}=n(),t=a(),{element:r}=i();return{asPercentage:t,inPixels:e.orientation===`horizontal`?r.offsetWidth:r.offsetHeight}},isCollapsed:()=>{let{collapsible:e,collapsedSize:t}=r(),n=a();return e&&lo(t,n)},resize:e=>{let{group:t}=n(),{element:r}=i(),a=sa({group:t}),o=oa(aa({groupSize:a,panelElement:r,styleProp:e})/a*100);s(o)}}}function _o(e){e.defaultPrevented||so(e,Wa()).forEach(t=>{if(t.separator&&!t.separator.disableDoubleClick){let n=t.panels.find(e=>e.panelConstraints.defaultSize!==void 0);if(n){let r=n.panelConstraints.defaultSize,i=go({groupId:t.group.id,panelId:n.id});i&&r!==void 0&&(i.resize(r),e.preventDefault())}}})}function vo(e){let t=Wa();for(let[n]of t)if(n.separators.some(t=>t.element===e))return n;throw Error(`Could not find parent Group for separator element`)}function yo({groupId:e}){let t=()=>{let t=Wa();for(let[n,r]of t)if(n.id===e)return{group:n,...r};throw Error(`Could not find Group with id "${e}"`)};return{getLayout(){let{defaultLayoutDeferred:e,layout:n}=t();return e?{}:n},setLayout(e){let{defaultLayoutDeferred:n,derivedPanelConstraints:r,group:i,groupSize:a,layout:o,separatorToPanels:s}=t(),c=ho({layout:e,panelConstraints:r});return n?o:(mo(o,c)||Ka(i,{defaultLayoutDeferred:n,derivedPanelConstraints:r,groupSize:a,layout:c,separatorToPanels:s}),c)}}}function bo(e,t){let n=vo(e),r=Ua(n.id,!0),i=n.separators.find(t=>t.element===e);la(i,`Matching separator not found`);let a=r.separatorToPanels.get(i);la(a,`Matching panels not found`);let o=a.map(e=>n.panels.indexOf(e)),s=yo({groupId:n.id}).getLayout(),c=ho({layout:po({delta:t,initialLayout:s,panelConstraints:r.derivedPanelConstraints,pivotIndices:o,prevLayout:s,trigger:`keyboard`}),panelConstraints:r.derivedPanelConstraints});mo(s,c)||Ka(n,{defaultLayoutDeferred:r.defaultLayoutDeferred,derivedPanelConstraints:r.derivedPanelConstraints,groupSize:r.groupSize,layout:c,separatorToPanels:r.separatorToPanels},{isUserInteraction:!0})}function xo(e){if(e.defaultPrevented)return;let t=e.currentTarget,n=vo(t);if(!n.disabled)switch(e.key){case`ArrowDown`:e.preventDefault(),n.orientation===`vertical`&&bo(t,5);break;case`ArrowLeft`:e.preventDefault(),n.orientation===`horizontal`&&bo(t,-5);break;case`ArrowRight`:e.preventDefault(),n.orientation===`horizontal`&&bo(t,5);break;case`ArrowUp`:e.preventDefault(),n.orientation===`vertical`&&bo(t,-5);break;case`End`:e.preventDefault(),bo(t,100);break;case`Enter`:{e.preventDefault();let n=vo(t),{derivedPanelConstraints:r,layout:i,separatorToPanels:a}=Ua(n.id,!0),o=n.separators.find(e=>e.element===t);la(o,`Matching separator not found`);let s=a.get(o);la(s,`Matching panels not found`);let c=s[0],l=r.find(e=>e.panelId===c.id);if(la(l,`Panel metadata not found`),l.collapsible){let e=i[c.id];bo(t,(l.collapsedSize===e?n.mutableState.expandedPanelSizes[c.id]??l.minSize:l.collapsedSize)-e)}break}case`F6`:{e.preventDefault();let n=vo(t).separators.map(e=>e.element),r=Array.from(n).findIndex(t=>t===e.currentTarget);la(r!==null,`Index not found`),n[e.shiftKey?r>0?r-1:n.length-1:r+1<n.length?r+1:0].focus({preventScroll:!0});break}case`Home`:e.preventDefault(),bo(t,-100);break}}function So(e){if(e.defaultPrevented||e.pointerType===`mouse`&&e.button>0)return;let t=Wa(),n=so(e,t),r=new Map,i=!1;n.forEach(e=>{e.separator&&(i||(i=!0,e.separator.element.focus({focusVisible:!1,preventScroll:!0})));let n=t.get(e.group);n&&r.set(e.group,n.layout)}),Ta({cursorFlags:0,hitRegions:n,initialLayoutMap:r,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:`active`}),n.length&&e.preventDefault()}function Co({document:e,event:t,hitRegions:n,initialLayoutMap:r,mountedGroups:i,pointerDownAtPoint:a,prevCursorFlags:o}){let s=0;n.forEach(e=>{let{group:n,groupSize:o}=e,{orientation:c,panels:l}=n,{disableCursor:u}=n.mutableState,d=0;d=a?c===`horizontal`?(t.clientX-a.x)/o*100:(t.clientY-a.y)/o*100:c===`horizontal`?t.clientX<0?-100:100:t.clientY<0?-100:100;let f=r.get(n),p=i.get(n);if(!f||!p)return;let{defaultLayoutDeferred:m,derivedPanelConstraints:h,groupSize:g,layout:_,separatorToPanels:v}=p;if(h&&_&&v){let t=po({delta:d,initialLayout:f,panelConstraints:h,pivotIndices:e.panels.map(e=>l.indexOf(e)),prevLayout:_,trigger:`mouse-or-touch`});if(mo(t,_)){if(d!==0&&!u)switch(c){case`horizontal`:s|=d<0?Oa:ka;break;case`vertical`:s|=d<0?Aa:ja;break}}else Ka(e.group,{defaultLayoutDeferred:m,derivedPanelConstraints:h,groupSize:g,layout:t,separatorToPanels:v})}});let c=0;t.movementX===0?c|=o&Ma:c|=s&Ma,t.movementY===0?c|=o&Na:c|=s&Na,wa(c),Ra(e)}function wo(e){let t=Wa(),n=Sa();switch(n.state){case`active`:Co({document:e.currentTarget,event:e,hitRegions:n.hitRegions,initialLayoutMap:n.initialLayoutMap,mountedGroups:t,prevCursorFlags:n.cursorFlags})}}function To(e){if(e.defaultPrevented)return;let t=Sa(),n=Wa();switch(t.state){case`active`:if(e.buttons===0){Ta({cursorFlags:0,state:`inactive`}),t.hitRegions.forEach(e=>{let t=Ua(e.group.id,!0);Ka(e.group,t,{isUserInteraction:!0})});return}for(let n of t.hitRegions)if(n.separator){let{element:t}=n.separator;t.hasPointerCapture?.(e.pointerId)||t.setPointerCapture?.(e.pointerId)}Co({document:e.currentTarget,event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:n,pointerDownAtPoint:t.pointerDownAtPoint,prevCursorFlags:t.cursorFlags});break;default:{let r=so(e,n);r.length===0?t.state!==`inactive`&&Ta({cursorFlags:0,state:`inactive`}):Ta({cursorFlags:0,hitRegions:r,state:`hover`}),Ra(e.currentTarget);break}}}function Eo(e){if(e.relatedTarget instanceof HTMLIFrameElement)switch(Sa().state){case`hover`:Ta({cursorFlags:0,state:`inactive`})}}function Do(e){e.defaultPrevented||e.pointerType===`mouse`&&e.button>0||qa(e.currentTarget)&&e.preventDefault()}function Oo(e){let t=0,n=0,r={};for(let i of e)if(i.defaultSize!==void 0){t++;let e=oa(i.defaultSize);n+=e,r[i.panelId]=e}else r[i.panelId]=void 0;let i=e.length-t;if(i!==0){let t=oa((100-n)/i);for(let n of e)n.defaultSize===void 0&&(r[n.panelId]=t)}return r}function ko(e,t,n){if(!n[0])return;let r=e.panels.find(e=>e.element===t);if(!r||!r.onResize)return;let i=sa({group:e}),a=e.orientation===`horizontal`?r.element.offsetWidth:r.element.offsetHeight,o=r.mutableValues.prevSize,s={asPercentage:oa(a/i*100),inPixels:a};r.mutableValues.prevSize=s,r.onResize(s,r.id,o)}function Ao(e,t){if(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 jo({group:e,nextGroupSize:t,prevGroupSize:n,prevLayout:r}){if(n<=0||t<=0||n===t)return r;let i=0,a=0,o=!1,s=new Map,c=[];for(let l of e.panels){let e=r[l.id]??0;switch(l.panelConstraints.groupResizeBehavior){case`preserve-pixel-size`:{o=!0;let r=oa(e/100*n/t*100);s.set(l.id,r),i+=r;break}default:c.push(l.id),a+=e;break}}if(!o||c.length===0)return r;let l=100-i,u={...r};if(s.forEach((e,t)=>{u[t]=e}),a>0)for(let e of c)u[e]=oa((r[e]??0)/a*l);else{let e=oa(l/c.length);for(let t of c)u[t]=e}return u}function Mo(e,t){let n=e.map(e=>e.id),r=Object.keys(t);if(n.length!==r.length)return!1;for(let e of n)if(!r.includes(e))return!1;return!0}var No=new Map;function Po(e){let t=!0;la(e.element.ownerDocument.defaultView,`Cannot register an unmounted Group`);let n=e.element.ownerDocument.defaultView.ResizeObserver,r=new Set,i=new Set,a=new n(n=>{for(let r of n){let{borderBoxSize:n,target:i}=r;if(i===e.element){if(t){let t=sa({group:e});if(t===0)return;let n=Ua(e.id);if(!n)return;let r=ca(e),i=n.defaultLayoutDeferred?Oo(r):n.layout,a=ho({layout:jo({group:e,nextGroupSize:t,prevGroupSize:n.groupSize,prevLayout:i}),panelConstraints:r});if(!n.defaultLayoutDeferred&&mo(n.layout,a)&&Ao(n.derivedPanelConstraints,r)&&n.groupSize===t)return;Ka(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:r,groupSize:t,layout:a,separatorToPanels:n.separatorToPanels})}}else ko(e,i,n)}});a.observe(e.element),e.panels.forEach(e=>{la(!r.has(e.id),`Panel ids must be unique; id "${e.id}" was used more than once`),r.add(e.id),e.onResize&&a.observe(e.element)});let o=sa({group:e}),s=ca(e),c=e.panels.map(({id:e})=>e).join(`,`),l=e.mutableState.defaultLayout;l&&(Mo(e.panels,l)||(l=void 0));let u=ho({layout:e.mutableState.layouts[c]??l??Oo(s),panelConstraints:s}),d=e.element.ownerDocument;No.set(d,(No.get(d)??0)+1);let f=new Map;return va(e).forEach(e=>{e.separator&&f.set(e.separator,e.panels)}),Ka(e,{defaultLayoutDeferred:o===0,derivedPanelConstraints:s,groupSize:o,layout:u,separatorToPanels:f}),e.separators.forEach(e=>{la(!i.has(e.id),`Separator ids must be unique; id "${e.id}" was used more than once`),i.add(e.id),e.element.addEventListener(`keydown`,xo)}),No.get(d)===1&&(d.addEventListener(`contextmenu`,Ja,!0),d.addEventListener(`dblclick`,_o,!0),d.addEventListener(`pointerdown`,So,!0),d.addEventListener(`pointerleave`,wo),d.addEventListener(`pointermove`,To),d.addEventListener(`pointerout`,Eo),d.addEventListener(`pointerup`,Do,!0)),function(){t=!1,No.set(d,Math.max(0,(No.get(d)??0)-1)),Va(e),e.separators.forEach(e=>{e.element.removeEventListener(`keydown`,xo)}),No.get(d)||(d.removeEventListener(`contextmenu`,Ja,!0),d.removeEventListener(`dblclick`,_o,!0),d.removeEventListener(`pointerdown`,So,!0),d.removeEventListener(`pointerleave`,wo),d.removeEventListener(`pointermove`,To),d.removeEventListener(`pointerout`,Eo),d.removeEventListener(`pointerup`,Do,!0)),a.disconnect()}}function Fo(){let[e,t]=(0,b.useState)({});return[e,(0,b.useCallback)(()=>t({}),[])]}function Io(e){let t=(0,b.useId)();return`${e??t}`}var Lo=typeof window<`u`?b.useLayoutEffect:b.useEffect;function Ro(e){let t=(0,b.useRef)(e);return Lo(()=>{t.current=e},[e]),(0,b.useCallback)((...e)=>t.current?.(...e),[t])}function zo(...e){return Ro(t=>{e.forEach(e=>{if(e)switch(typeof e){case`function`:e(t);break;case`object`:e.current=t;break}})})}function Bo(e){let t=(0,b.useRef)({...e});return Lo(()=>{for(let n in e)t.current[n]=e[n]},[e]),t.current}var Vo=(0,b.createContext)(null);function Ho(e,t){let n=(0,b.useRef)({getLayout:()=>({}),setLayout:Ea});(0,b.useImperativeHandle)(t,()=>n.current,[]),Lo(()=>{Object.assign(n.current,yo({groupId:e}))})}function Uo({children:e,className:t,defaultLayout:n,disableCursor:r,disabled:i,elementRef:a,groupRef:o,id:s,onLayoutChange:c,onLayoutChanged:l,orientation:u=`horizontal`,resizeTargetMinimumSize:d={coarse:20,fine:10},style:f,...p}){let m=(0,b.useRef)({onLayoutChange:{},onLayoutChanged:{}}),h=Ro(e=>{mo(m.current.onLayoutChange,e)||(m.current.onLayoutChange=e,c?.(e))}),g=Ro((e,t)=>{mo(m.current.onLayoutChanged,e)||(m.current.onLayoutChanged=e,l?.(e,{isUserInteraction:t}))}),_=Io(s),v=(0,b.useRef)(null),[y,x]=Fo(),S=(0,b.useRef)({lastExpandedPanelSizes:{},layouts:{},panels:[],resizeTargetMinimumSize:d,separators:[]}),C=zo(v,a);Ho(_,o);let w=Ro((e,t)=>{let r=Sa(),i=Ha(e),a=Ua(e);if(a){let e=!1;switch(r.state){case`active`:e=r.hitRegions.some(e=>e.group===i);break}return{flexGrow:a.layout[t]??1,pointerEvents:e?`none`:void 0}}if(n?.[t])return{flexGrow:n?.[t]}}),T=Bo({defaultLayout:n,disableCursor:r}),E=(0,b.useMemo)(()=>({get disableCursor(){return!!T.disableCursor},getPanelStyles:w,id:_,orientation:u,registerPanel:e=>{let t=S.current;return t.panels=ua(u,[...t.panels,e]),x(),()=>{t.panels=t.panels.filter(t=>t!==e),x()}},registerSeparator:e=>{let t=S.current;return t.separators=ua(u,[...t.separators,e]),x(),()=>{t.separators=t.separators.filter(t=>t!==e),x()}},updatePanelProps:(e,{disabled:t})=>{let n=S.current.panels.find(t=>t.id===e);n&&(n.panelConstraints.disabled=t);let r=Ha(_),i=Ua(_);r&&i&&Ka(r,{...i,derivedPanelConstraints:ca(r)})},updateSeparatorProps:(e,{disabled:t,disableDoubleClick:n})=>{let r=S.current.separators.find(t=>t.id===e);r&&(r.disabled=t,r.disableDoubleClick=n)}}),[w,_,x,u,T]),D=(0,b.useRef)(null);return Lo(()=>{let e=v.current;if(e===null)return;let t=S.current,n;if(T.defaultLayout!==void 0&&Object.keys(T.defaultLayout).length===t.panels.length){n={};for(let e of t.panels){let t=T.defaultLayout[e.id];t!==void 0&&(n[e.id]=t)}}let r={disabled:!!i,element:e,id:_,mutableState:{defaultLayout:n,disableCursor:!!T.disableCursor,expandedPanelSizes:S.current.lastExpandedPanelSizes,layouts:S.current.layouts},orientation:u,panels:t.panels,resizeTargetMinimumSize:t.resizeTargetMinimumSize,separators:t.separators};D.current=r;let a=Po(r),{defaultLayoutDeferred:o,derivedPanelConstraints:s,layout:c}=Ua(r.id,!0);!o&&s.length>0&&(h(c),g(c,!1));let l=Ga(_,e=>{let{defaultLayoutDeferred:t,derivedPanelConstraints:n,layout:i}=e.next;if(t||n.length===0)return;let a=r.panels.map(({id:e})=>e).join(`,`);r.mutableState.layouts[a]=i,n.forEach(t=>{if(t.collapsible){let{layout:n}=e.prev??{};if(n){let e=lo(t.collapsedSize,i[t.panelId]),a=lo(t.collapsedSize,n[t.panelId]);e&&!a&&(r.mutableState.expandedPanelSizes[t.panelId]=n[t.panelId])}}});let o=Sa().state!==`active`;h(i),o&&g(i,e.isUserInteraction)});return()=>{D.current=null,a(),l()}},[i,_,g,h,u,y,T]),(0,b.useEffect)(()=>{let e=D.current;e&&(e.mutableState.defaultLayout=n,e.mutableState.disableCursor=!!r)}),(0,H.jsx)(Vo.Provider,{value:E,children:(0,H.jsx)(`div`,{...p,className:t,"data-group":!0,"data-testid":_,id:_,ref:C,style:{height:`100%`,width:`100%`,overflow:`hidden`,...f,display:`flex`,flexDirection:u===`horizontal`?`row`:`column`,flexWrap:`nowrap`,touchAction:u===`horizontal`?`pan-y`:`pan-x`},children:e})})}Uo.displayName=`Group`;function Wo(e,t){return`react-resizable-panels:${[e,...t].join(`:`)}`}function Go({id:e,panelIds:t,storage:n}){let r=Wo(e,[]),i=n.getItem(r);if(i)try{let e=JSON.parse(i);if(t){let n=e[t.join(`,`)];if(n&&Array.isArray(n.layout)&&t.length===n.layout.length){let e={};for(let r=0;r<t.length;r++)e[t[r]]=n.layout[r];return e}}else{let t=Object.keys(e);if(t.length===1){let n=e[t[0]];if(n&&Array.isArray(n.layout)){let e=t[0].split(`,`);if(e.length===n.layout.length){let t={};for(let r=0;r<e.length;r++)t[e[r]]=n.layout[r];return t}}}}}catch{}}function Ko({debounceSaveMs:e=100,onlySaveAfterUserInteractions:t,panelIds:n,storage:r=localStorage,...i}){let a=n!==void 0,o=`id`in i?i.id:i.groupId,s=Wo(o,n??[]),c=(0,b.useSyncExternalStore)(qo,()=>r.getItem(s),()=>r.getItem(s)),l=(0,b.useMemo)(()=>{if(c){let e=JSON.parse(c),t=Object.values(e);if(Array.from(t).every(e=>typeof e==`number`))return e}},[c]),u=(0,b.useMemo)(()=>{if(!l)return Go({id:o,panelIds:n,storage:r})},[l,o,n,r]),d=l??u,f=(0,b.useRef)(null),p=(0,b.useCallback)(()=>{let e=f.current;e&&(f.current=null,clearTimeout(e))},[]);(0,b.useLayoutEffect)(()=>()=>{p()},[p]);let m=(0,b.useCallback)((e,n)=>{if(t&&!n.isUserInteraction)return;p();let i;i=a?Wo(o,Object.keys(e)):Wo(o,[]);try{r.setItem(i,JSON.stringify(e))}catch(e){console.error(e)}},[p,a,o,t,r]);return{defaultLayout:d,onLayoutChange:(0,b.useCallback)(t=>{p(),e===0?m(t,{isUserInteraction:!1}):f.current=setTimeout(()=>{m(t,{isUserInteraction:!1})},e)},[p,e,m]),onLayoutChanged:m}}function qo(){return function(){}}function Jo(){let e=(0,b.useContext)(Vo);return la(e,`Group Context not found; did you render a Panel or Separator outside of a Group?`),e}function Yo(e,t){let{id:n}=Jo(),r=(0,b.useRef)({collapse:Da,expand:Da,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:Da});(0,b.useImperativeHandle)(t,()=>r.current,[]),Lo(()=>{Object.assign(r.current,go({groupId:n,panelId:e}))})}function Xo({children:e,className:t,collapsedSize:n=`0%`,collapsible:r=!1,defaultSize:i,disabled:a,elementRef:o,groupResizeBehavior:s=`preserve-relative-size`,id:c,maxSize:l=`100%`,minSize:u=`0%`,onResize:d,panelRef:f,style:p,...m}){let h=!!c,g=Io(c),_=Bo({disabled:a}),v=(0,b.useRef)(null),y=zo(v,o),{getPanelStyles:x,id:S,orientation:C,registerPanel:w,updatePanelProps:T}=Jo(),E=d!==null,D=Ro((e,t,n)=>{d?.(e,c,n)});Lo(()=>{let e=v.current;if(e!==null){let t={element:e,id:g,idIsStable:h,mutableValues:{expandToSize:void 0,prevSize:void 0},onResize:E?D:void 0,panelConstraints:{groupResizeBehavior:s,collapsedSize:n,collapsible:r,defaultSize:i,disabled:_.disabled,maxSize:l,minSize:u}};return w(t)}},[s,n,r,i,E,g,h,l,u,D,w,_]),(0,b.useEffect)(()=>{T(g,{disabled:a})},[a,g,T]),Yo(g,f);let O=()=>{let e=x(S,g);if(e)return JSON.stringify(e)},k=(0,b.useSyncExternalStore)(e=>Ga(S,e),O,O),A;return A=k?JSON.parse(k):i===void 0?{flexGrow:1}:{flexGrow:void 0,flexShrink:void 0,flexBasis:i},(0,H.jsx)(`div`,{...m,"data-disabled":a||void 0,"data-panel":!0,"data-testid":g,id:g,ref:y,style:{...Zo,display:`flex`,flexBasis:0,flexShrink:1,overflow:`visible`,...A},children:(0,H.jsx)(`div`,{className:t,style:{maxHeight:`100%`,maxWidth:`100%`,flexGrow:1,overflow:`auto`,...p,touchAction:C===`horizontal`?`pan-y`:`pan-x`},children:e})})}Xo.displayName=`Panel`;var Zo={minHeight:0,maxHeight:`100%`,height:`auto`,minWidth:0,maxWidth:`100%`,width:`auto`,border:`none`,borderWidth:0,padding:0,margin:0};function Qo({layout:e,panelConstraints:t,panelId:n,panelIndex:r}){let i,a,o=e[n],s=t.find(e=>e.panelId===n);if(s){let c=s.maxSize,l=s.collapsible?s.collapsedSize:s.minSize,u=[r,r+1];a=ho({layout:po({delta:l-o,initialLayout:e,panelConstraints:t,pivotIndices:u,prevLayout:e}),panelConstraints:t})[n],i=ho({layout:po({delta:c-o,initialLayout:e,panelConstraints:t,pivotIndices:u,prevLayout:e}),panelConstraints:t})[n]}return{valueControls:n,valueMax:i,valueMin:a,valueNow:o}}function $o({children:e,className:t,disabled:n,disableDoubleClick:r,elementRef:i,id:a,style:o,...s}){let c=Io(a),l=Bo({disabled:n,disableDoubleClick:r}),[u,d]=(0,b.useState)({}),[f,p]=(0,b.useState)(`inactive`),[m,h]=(0,b.useState)(!1),g=(0,b.useRef)(null),_=zo(g,i),{disableCursor:v,id:y,orientation:x,registerSeparator:S,updateSeparatorProps:C}=Jo(),w=x===`horizontal`?`vertical`:`horizontal`;Lo(()=>{let e=g.current;if(e!==null){let t={disabled:l.disabled,disableDoubleClick:l.disableDoubleClick,element:e,id:c},n=S(t),r=Ca(e=>{p(e.next.state!==`inactive`&&e.next.hitRegions.some(e=>e.separator===t)?e.next.state:`inactive`)}),i=Ga(y,e=>{let{derivedPanelConstraints:n,layout:r,separatorToPanels:i}=e.next,a=i.get(t);if(a){let e=a[0],t=a.indexOf(e);d(Qo({layout:r,panelConstraints:n,panelId:e.id,panelIndex:t}))}});return()=>{r(),i(),n()}}},[y,c,S,l]),(0,b.useEffect)(()=>{C(c,{disabled:n,disableDoubleClick:r})},[n,r,c,C]);let T;n&&!v&&(T=`not-allowed`);let E;if(n)E=`disabled`;else switch(f){case`active`:E=`active`;break;default:E=m?`focus`:f}return(0,H.jsx)(`div`,{...s,"aria-controls":u.valueControls,"aria-disabled":n||void 0,"aria-orientation":w,"aria-valuemax":u.valueMax,"aria-valuemin":u.valueMin,"aria-valuenow":u.valueNow,children:e,className:t,"data-separator":E,"data-testid":c,id:c,onBlur:()=>h(!1),onFocus:()=>h(!0),ref:_,role:`separator`,style:{flexBasis:`auto`,cursor:T,...o,flexGrow:0,flexShrink:0,touchAction:`none`},tabIndex:n?void 0:0})}$o.displayName=`Separator`;var es=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},ts=(e=>e?es(e):es),ns=e=>e;function rs(e,t=ns){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 is=e=>{let t=ts(e),n=e=>rs(t,e);return Object.assign(n,t),n},as=(e=>e?is(e):is),os=as()(e=>({status:`idle`,requiresAuth:!1,hasAuthRequiredTools:!1,isSignedIn:!1,error:null,setStatus:t=>e({status:t}),setRequiresAuth:t=>e({requiresAuth:t}),setHasAuthRequiredTools:t=>e({hasAuthRequiredTools:t}),setIsSignedIn:t=>e({isSignedIn:t}),setError:t=>e({error:t}),reset:()=>e({status:`idle`,requiresAuth:!1,hasAuthRequiredTools:!1,isSignedIn:!1,error:null})}));function ss(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 cs=e=>t=>{try{let n=e(t);return n instanceof Promise?n:{then(e){return cs(e)(n)},catch(e){return this}}}catch(e){return{then(e){return this},catch(t){return cs(t)(e)}}}},ls=(e,t)=>(n,r,i)=>{let a={storage:ss(()=>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 cs(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},us={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}}},ds=as()(ls(e=>({...us,previewClient:null,setPreference:(t,n)=>e({[t]:n}),setPreviewClient:t=>e({previewClient:t})}),{name:`skybridge-devtools-inspector-preferences`,version:2,migrate:(e,t)=>{let n=e;return t<2&&delete n.displayMode,n},partialize:({displayMode:e,previewClient:t,setPreference:n,setPreviewClient:r,...i})=>i})),fs=()=>{let{setPreference:e,setPreviewClient:t,previewClient:n,...r}=ds.getState();return r},ps=e=>e?.device?.type===`mobile`,ms=()=>ds(e=>ps(e.userAgent)),hs=(e,t)=>e===`pip`?t.previewClient===`claude`?t.displayMode===`modal`?`inline`:t.displayMode:t.previewClient===`chatgpt`&&ps(t.userAgent)?`fullscreen`:e:e,gs=Object.create,_s=Object.defineProperty,vs=Object.getOwnPropertyDescriptor,ys=Object.getOwnPropertyNames,bs=Object.getPrototypeOf,xs=Object.prototype.hasOwnProperty,Ss=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Cs=(e,t)=>{let n={};for(var r in e)_s(n,r,{get:e[r],enumerable:!0});return t&&_s(n,Symbol.toStringTag,{value:`Module`}),n},ws=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=ys(t),a=0,o=i.length,s;a<o;a++)s=i[a],!xs.call(e,s)&&s!==n&&_s(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=vs(t,s))||r.enumerable});return e},Ts=(e,t,n)=>(n=e==null?{}:gs(bs(e)),ws(t||!e||!e.__esModule?_s(n,`default`,{value:e,enumerable:!0}):n,e)),Es,Ds=Object.freeze({status:`aborted`});function U(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 Os=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},ks=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(Es=globalThis).__zod_globalConfig??(Es.__zod_globalConfig={});var As=globalThis.__zod_globalConfig;function js(e){return e&&Object.assign(As,e),As}function Ms(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 Ns(e,t){return typeof t==`bigint`?t.toString():t}function Ps(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw Error(`cached value already set`)}}}function Fs(e){return e==null}function Is(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function Ls(e,t){let n=e/t,r=Math.round(n),i=2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var Rs=Symbol(`evaluating`);function zs(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Rs)return r===void 0&&(r=Rs,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Bs(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Vs(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Hs(e){return JSON.stringify(e)}function Us(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var Ws=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Gs(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Ks=Ps(()=>{if(As.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function qs(e){if(Gs(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(Gs(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function Js(e){return qs(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var Ys=new Set([`string`,`number`,`symbol`]);function Xs(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Zs(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Qs(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 $s(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var ec={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function tc(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 Zs(e,Vs(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 Bs(this,`shape`,e),e},checks:[]}))}function nc(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 Zs(e,Vs(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 Bs(this,`shape`,r),r},checks:[]}))}function rc(e,t){if(!qs(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 Zs(e,Vs(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Bs(this,`shape`,n),n}}))}function ic(e,t){if(!qs(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return Zs(e,Vs(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Bs(this,`shape`,n),n}}))}function ac(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return Zs(e,Vs(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return Bs(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function oc(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 Zs(t,Vs(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 Bs(this,`shape`,i),i},checks:[]}))}function sc(e,t,n){return Zs(t,Vs(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 Bs(this,`shape`,i),i}}))}function cc(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 lc(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function uc(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function dc(e){return typeof e==`string`?e:e?.message}function fc(e,t,n){let r=e.message?e.message:dc(e.inst?._zod.def?.error?.(e))??dc(t?.error?.(e))??dc(n.customError?.(e))??dc(n.localeError?.(e))??`Invalid input`,{inst:i,continue:a,input:o,...s}=e;return s.path??=[],s.message=r,t?.reportInput&&(s.input=o),s}function pc(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function mc(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var hc=(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,Ns,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},gc=U(`$ZodError`,hc),_c=U(`$ZodError`,hc,{Parent:Error});function vc(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 yc(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i];i===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(a))):r[n]=r[n]||{_errors:[]},r=r[n],i++}}}};return r(e),n}var bc=e=>(t,n,r,i)=>{let a=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new Os;if(o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>fc(e,a,js())));throw Ws(t,i?.callee),t}return o.value},xc=e=>async(t,n,r,i)=>{let a=r?{...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=>fc(e,a,js())));throw Ws(t,i?.callee),t}return o.value},Sc=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 Os;return a.issues.length?{success:!1,error:new(e??gc)(a.issues.map(e=>fc(e,i,js())))}:{success:!0,data:a.value}},Cc=Sc(_c),wc=e=>async(t,n,r)=>{let i=r?{...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=>fc(e,i,js())))}:{success:!0,data:a.value}},Tc=wc(_c),Ec=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return bc(e)(t,n,i)},Dc=e=>(t,n,r)=>bc(e)(t,n,r),Oc=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return xc(e)(t,n,i)},kc=e=>async(t,n,r)=>xc(e)(t,n,r),Ac=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Sc(e)(t,n,i)},jc=e=>(t,n,r)=>Sc(e)(t,n,r),Mc=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return wc(e)(t,n,i)},Nc=e=>async(t,n,r)=>wc(e)(t,n,r),Pc=/^[cC][0-9a-z]{6,}$/,Fc=/^[0-9a-z]+$/,Ic=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Lc=/^[0-9a-vA-V]{20}$/,Rc=/^[A-Za-z0-9]{27}$/,zc=/^[a-zA-Z0-9_-]{21}$/,Bc=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Vc=/^([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})$/,Hc=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)$/,Uc=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Wc=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function Gc(){return new RegExp(Wc,`u`)}var Kc=/^(?:(?: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])$/,qc=/^(([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}|:))$/,Jc=/^((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])$/,Yc=/^(([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])$/,Xc=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Zc=/^[A-Za-z0-9_-]*$/,Qc=/^https?$/,$c=/^\+[1-9]\d{6,14}$/,el=`(?:(?:\\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])))`,tl=RegExp(`^${el}$`);function nl(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 rl(e){return RegExp(`^${nl(e)}$`)}function il(e){let t=nl({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(`^${el}T(?:${r})$`)}var al=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},ol=/^-?\d+$/,sl=/^-?\d+(?:\.\d+)?$/,cl=/^(?:true|false)$/i,ll=/^null$/i,ul=/^[^A-Z]*$/,dl=/^[^a-z]*$/,fl=U(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),pl={number:`number`,bigint:`bigint`,object:`date`},ml=U(`$ZodCheckLessThan`,(e,t)=>{fl.init(e,t);let n=pl[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})}}),hl=U(`$ZodCheckGreaterThan`,(e,t)=>{fl.init(e,t);let n=pl[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})}}),gl=U(`$ZodCheckMultipleOf`,(e,t)=>{fl.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):Ls(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})}}),_l=U(`$ZodCheckNumberFormat`,(e,t)=>{fl.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=ec[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=ol)}),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})}}),vl=U(`$ZodCheckMaxLength`,(e,t)=>{var n;fl.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Fs(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=pc(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),yl=U(`$ZodCheckMinLength`,(e,t)=>{var n;fl.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Fs(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=pc(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),bl=U(`$ZodCheckLengthEquals`,(e,t)=>{var n;fl.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Fs(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=pc(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})}}),xl=U(`$ZodCheckStringFormat`,(e,t)=>{var n,r;fl.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=()=>{})}),Sl=U(`$ZodCheckRegex`,(e,t)=>{xl.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})}}),Cl=U(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=ul,xl.init(e,t)}),wl=U(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=dl,xl.init(e,t)}),Tl=U(`$ZodCheckIncludes`,(e,t)=>{fl.init(e,t);let n=Xs(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})}}),El=U(`$ZodCheckStartsWith`,(e,t)=>{fl.init(e,t);let n=RegExp(`^${Xs(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})}}),Dl=U(`$ZodCheckEndsWith`,(e,t)=>{fl.init(e,t);let n=RegExp(`.*${Xs(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})}}),Ol=U(`$ZodCheckOverwrite`,(e,t)=>{fl.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),kl=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(`
11
+ `).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(`
12
+ `))}},Al={major:4,minor:4,patch:3},jl=U(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Al;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=cc(e),i;for(let a of t){if(a._zod.def.when){if(lc(e)||!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 Os;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=cc(e,t))});else{if(e.issues.length===t)continue;r||=cc(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(cc(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new Os;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 Os;return o.then(e=>t(e,r,a))}return t(o,r,a)}}zs(e,`~standard`,()=>({validate:t=>{try{let n=Cc(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return Tc(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),Ml=U(`$ZodString`,(e,t)=>{jl.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??al(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}}),Nl=U(`$ZodStringFormat`,(e,t)=>{xl.init(e,t),Ml.init(e,t)}),Pl=U(`$ZodGUID`,(e,t)=>{t.pattern??=Vc,Nl.init(e,t)}),Fl=U(`$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??=Hc(e)}else t.pattern??=Hc();Nl.init(e,t)}),Il=U(`$ZodEmail`,(e,t)=>{t.pattern??=Uc,Nl.init(e,t)}),Ll=U(`$ZodURL`,(e,t)=>{Nl.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===Qc.source&&!/^https?:\/\//i.test(r)){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}let 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})}}}),Rl=U(`$ZodEmoji`,(e,t)=>{t.pattern??=Gc(),Nl.init(e,t)}),zl=U(`$ZodNanoID`,(e,t)=>{t.pattern??=zc,Nl.init(e,t)}),Bl=U(`$ZodCUID`,(e,t)=>{t.pattern??=Pc,Nl.init(e,t)}),Vl=U(`$ZodCUID2`,(e,t)=>{t.pattern??=Fc,Nl.init(e,t)}),Hl=U(`$ZodULID`,(e,t)=>{t.pattern??=Ic,Nl.init(e,t)}),Ul=U(`$ZodXID`,(e,t)=>{t.pattern??=Lc,Nl.init(e,t)}),Wl=U(`$ZodKSUID`,(e,t)=>{t.pattern??=Rc,Nl.init(e,t)}),Gl=U(`$ZodISODateTime`,(e,t)=>{t.pattern??=il(t),Nl.init(e,t)}),Kl=U(`$ZodISODate`,(e,t)=>{t.pattern??=tl,Nl.init(e,t)}),ql=U(`$ZodISOTime`,(e,t)=>{t.pattern??=rl(t),Nl.init(e,t)}),Jl=U(`$ZodISODuration`,(e,t)=>{t.pattern??=Bc,Nl.init(e,t)}),Yl=U(`$ZodIPv4`,(e,t)=>{t.pattern??=Kc,Nl.init(e,t),e._zod.bag.format=`ipv4`}),Xl=U(`$ZodIPv6`,(e,t)=>{t.pattern??=qc,Nl.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})}}}),Zl=U(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Jc,Nl.init(e,t)}),Ql=U(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Yc,Nl.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 $l(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var eu=U(`$ZodBase64`,(e,t)=>{t.pattern??=Xc,Nl.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{$l(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function tu(e){if(!Zc.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return $l(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var nu=U(`$ZodBase64URL`,(e,t)=>{t.pattern??=Zc,Nl.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{tu(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),ru=U(`$ZodE164`,(e,t)=>{t.pattern??=$c,Nl.init(e,t)});function iu(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 au=U(`$ZodJWT`,(e,t)=>{Nl.init(e,t),e._zod.check=n=>{iu(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),ou=U(`$ZodNumber`,(e,t)=>{jl.init(e,t),e._zod.pattern=e._zod.bag.pattern??sl,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}}),su=U(`$ZodNumberFormat`,(e,t)=>{_l.init(e,t),ou.init(e,t)}),cu=U(`$ZodBoolean`,(e,t)=>{jl.init(e,t),e._zod.pattern=cl,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}}),lu=U(`$ZodNull`,(e,t)=>{jl.init(e,t),e._zod.pattern=ll,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}}),uu=U(`$ZodAny`,(e,t)=>{jl.init(e,t),e._zod.parse=e=>e}),du=U(`$ZodUnknown`,(e,t)=>{jl.init(e,t),e._zod.parse=e=>e}),fu=U(`$ZodNever`,(e,t)=>{jl.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function pu(e,t,n){e.issues.length&&t.issues.push(...uc(n,e.issues)),t.value[n]=e.value}var mu=U(`$ZodArray`,(e,t)=>{jl.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=>pu(t,n,e))):pu(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function hu(e,t,n,r,i,a){let o=n in r;if(e.issues.length){if(i&&a&&!o)return;t.issues.push(...uc(n,e.issues))}if(!o&&!i){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}function gu(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=$s(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function _u(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin===`optional`,d=c.optout===`optional`;for(let i in t){if(i===`__proto__`||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=>hu(e,n,i,t,u,d))):hu(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var vu=U(`$ZodObject`,(e,t)=>{if(jl.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=Ps(()=>gu(t));zs(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=Gs,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.optin===`optional`,i=n._zod.optout===`optional`,a=n._zod.run({value:s[e],issues:[]},o);a instanceof Promise?c.push(a.then(n=>hu(n,t,e,s,r,i))):hu(a,t,e,s,r,i)}return i?_u(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),yu=U(`$ZodObjectJIT`,(e,t)=>{vu.init(e,t);let n=e._zod.parse,r=Ps(()=>gu(t)),i=e=>{let t=new kl([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=Hs(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=Hs(r),s=e[r],c=s?._zod?.optin===`optional`,l=s?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),c&&l?t.write(`
13
+ if (${n}.issues.length) {
14
+ if (${o} in input) {
15
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
16
+ ...iss,
17
+ path: iss.path ? [${o}, ...iss.path] : [${o}]
18
+ })));
19
+ }
20
+ }
21
+
22
+ if (${n}.value === undefined) {
23
+ if (${o} in input) {
24
+ newResult[${o}] = undefined;
25
+ }
26
+ } else {
27
+ newResult[${o}] = ${n}.value;
28
+ }
29
+
30
+ `):c?t.write(`
31
+ if (${n}.issues.length) {
32
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
33
+ ...iss,
34
+ path: iss.path ? [${o}, ...iss.path] : [${o}]
35
+ })));
36
+ }
37
+
38
+ if (${n}.value === undefined) {
39
+ if (${o} in input) {
40
+ newResult[${o}] = undefined;
41
+ }
42
+ } else {
43
+ newResult[${o}] = ${n}.value;
44
+ }
45
+
46
+ `):t.write(`
47
+ const ${n}_present = ${o} in input;
48
+ if (${n}.issues.length) {
49
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
50
+ ...iss,
51
+ path: iss.path ? [${o}, ...iss.path] : [${o}]
52
+ })));
53
+ }
54
+ if (!${n}_present && !${n}.issues.length) {
55
+ payload.issues.push({
56
+ code: "invalid_type",
57
+ expected: "nonoptional",
58
+ input: undefined,
59
+ path: [${o}]
60
+ });
61
+ }
62
+
63
+ if (${n}_present) {
64
+ if (${n}.value === undefined) {
65
+ newResult[${o}] = undefined;
66
+ } else {
67
+ newResult[${o}] = ${n}.value;
68
+ }
69
+ }
70
+
71
+ `)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=Gs,s=!As.jitless,c=s&&Ks.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?_u([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function bu(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=>!cc(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=>fc(e,r,js())))}),t)}var xu=U(`$ZodUnion`,(e,t)=>{jl.init(e,t),zs(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),zs(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),zs(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),zs(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=>Is(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>bu(t,r,e,i)):bu(o,r,e,i)}}),Su=U(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,xu.init(e,t);let n=e._zod.parse;zs(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=Ps(()=>{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(!Gs(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||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()),input:o,path:[t.discriminator],inst:e}),i)}}),Cu=U(`$ZodIntersection`,(e,t)=>{jl.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])=>Tu(e,t,n)):Tu(e,i,a)}});function wu(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(qs(e)&&qs(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=wu(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=wu(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 Tu(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}),cc(e))return e;let o=wu(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var Eu=U(`$ZodRecord`,(e,t)=>{jl.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!qs(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 c of o)if(typeof c==`string`||typeof c==`number`||typeof c==`symbol`){s.add(typeof c==`number`?c.toString():c);let o=t.keyType._zod.run({value:c,issues:[]},r);if(o instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(o.issues.length){n.issues.push({code:`invalid_key`,origin:`record`,issues:o.issues.map(e=>fc(e,r,js())),input:c,path:[c],inst:e});continue}let l=o.value,u=t.valueType._zod.run({value:i[c],issues:[]},r);u instanceof Promise?a.push(u.then(e=>{e.issues.length&&n.issues.push(...uc(c,e.issues)),n.value[l]=e.value})):(u.issues.length&&n.issues.push(...uc(c,u.issues)),n.value[l]=u.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__`||!Object.prototype.propertyIsEnumerable.call(i,o))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`&&sl.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=>fc(e,r,js())),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(...uc(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...uc(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),Du=U(`$ZodEnum`,(e,t)=>{jl.init(e,t);let n=Ms(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>Ys.has(typeof e)).map(e=>typeof e==`string`?Xs(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}}),Ou=U(`$ZodLiteral`,(e,t)=>{if(jl.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`?Xs(e):e?Xs(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}}),ku=U(`$ZodTransform`,(e,t)=>{jl.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new ks(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.fallback=!0,n));if(i instanceof Promise)throw new Os;return n.value=i,n.fallback=!0,n}});function Au(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var ju=U(`$ZodOptional`,(e,t)=>{jl.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,zs(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),zs(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Is(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=e.value,i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>Au(e,r)):Au(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),Mu=U(`$ZodExactOptional`,(e,t)=>{ju.init(e,t),zs(e._zod,`values`,()=>t.innerType._zod.values),zs(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Nu=U(`$ZodNullable`,(e,t)=>{jl.init(e,t),zs(e._zod,`optin`,()=>t.innerType._zod.optin),zs(e._zod,`optout`,()=>t.innerType._zod.optout),zs(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Is(e.source)}|null)$`):void 0}),zs(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)}),Pu=U(`$ZodDefault`,(e,t)=>{jl.init(e,t),e._zod.optin=`optional`,zs(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=>Fu(e,t)):Fu(r,t)}});function Fu(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Iu=U(`$ZodPrefault`,(e,t)=>{jl.init(e,t),e._zod.optin=`optional`,zs(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))}),Lu=U(`$ZodNonOptional`,(e,t)=>{jl.init(e,t),zs(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=>Ru(t,e)):Ru(i,e)}});function Ru(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 zu=U(`$ZodCatch`,(e,t)=>{jl.init(e,t),e._zod.optin=`optional`,zs(e._zod,`optout`,()=>t.innerType._zod.optout),zs(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=>fc(e,n,js()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>fc(e,n,js()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),Bu=U(`$ZodPipe`,(e,t)=>{jl.init(e,t),zs(e._zod,`values`,()=>t.in._zod.values),zs(e._zod,`optin`,()=>t.in._zod.optin),zs(e._zod,`optout`,()=>t.out._zod.optout),zs(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=>Vu(e,t.in,n)):Vu(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Vu(e,t.out,n)):Vu(r,t.out,n)}});function Vu(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var Hu=U(`$ZodPreprocess`,(e,t)=>{Bu.init(e,t)}),Uu=U(`$ZodReadonly`,(e,t)=>{jl.init(e,t),zs(e._zod,`propValues`,()=>t.innerType._zod.propValues),zs(e._zod,`values`,()=>t.innerType._zod.values),zs(e._zod,`optin`,()=>t.innerType?._zod?.optin),zs(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(Wu):Wu(r)}});function Wu(e){return e.value=Object.freeze(e.value),e}var Gu=U(`$ZodLazy`,(e,t)=>{jl.init(e,t),zs(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),zs(e._zod,`pattern`,()=>e._zod.innerType?._zod?.pattern),zs(e._zod,`propValues`,()=>e._zod.innerType?._zod?.propValues),zs(e._zod,`optin`,()=>e._zod.innerType?._zod?.optin??void 0),zs(e._zod,`optout`,()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),Ku=U(`$ZodCustom`,(e,t)=>{fl.init(e,t),jl.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=>qu(t,n,r,e));qu(i,n,r,e)}});function qu(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(mc(e))}}var Ju,Yu=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 Xu(){return new Yu}(Ju=globalThis).__zod_globalRegistry??(Ju.__zod_globalRegistry=Xu());var Zu=globalThis.__zod_globalRegistry;function Qu(e,t){return new e({type:`string`,...Qs(t)})}function $u(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...Qs(t)})}function ed(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...Qs(t)})}function td(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...Qs(t)})}function nd(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...Qs(t)})}function rd(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...Qs(t)})}function id(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...Qs(t)})}function ad(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...Qs(t)})}function od(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...Qs(t)})}function sd(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...Qs(t)})}function cd(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...Qs(t)})}function ld(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...Qs(t)})}function ud(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...Qs(t)})}function dd(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...Qs(t)})}function fd(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...Qs(t)})}function pd(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...Qs(t)})}function md(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...Qs(t)})}function hd(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...Qs(t)})}function gd(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...Qs(t)})}function _d(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...Qs(t)})}function vd(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...Qs(t)})}function yd(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...Qs(t)})}function bd(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...Qs(t)})}function xd(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...Qs(t)})}function Sd(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...Qs(t)})}function Cd(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...Qs(t)})}function wd(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...Qs(t)})}function Td(e,t){return new e({type:`number`,checks:[],...Qs(t)})}function Ed(e,t){return new e({type:`number`,coerce:!0,checks:[],...Qs(t)})}function Dd(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...Qs(t)})}function Od(e,t){return new e({type:`boolean`,...Qs(t)})}function kd(e,t){return new e({type:`null`,...Qs(t)})}function Ad(e){return new e({type:`any`})}function jd(e){return new e({type:`unknown`})}function Md(e,t){return new e({type:`never`,...Qs(t)})}function Nd(e,t){return new ml({check:`less_than`,...Qs(t),value:e,inclusive:!1})}function Pd(e,t){return new ml({check:`less_than`,...Qs(t),value:e,inclusive:!0})}function Fd(e,t){return new hl({check:`greater_than`,...Qs(t),value:e,inclusive:!1})}function Id(e,t){return new hl({check:`greater_than`,...Qs(t),value:e,inclusive:!0})}function Ld(e,t){return new gl({check:`multiple_of`,...Qs(t),value:e})}function Rd(e,t){return new vl({check:`max_length`,...Qs(t),maximum:e})}function zd(e,t){return new yl({check:`min_length`,...Qs(t),minimum:e})}function Bd(e,t){return new bl({check:`length_equals`,...Qs(t),length:e})}function Vd(e,t){return new Sl({check:`string_format`,format:`regex`,...Qs(t),pattern:e})}function Hd(e){return new Cl({check:`string_format`,format:`lowercase`,...Qs(e)})}function Ud(e){return new wl({check:`string_format`,format:`uppercase`,...Qs(e)})}function Wd(e,t){return new Tl({check:`string_format`,format:`includes`,...Qs(t),includes:e})}function Gd(e,t){return new El({check:`string_format`,format:`starts_with`,...Qs(t),prefix:e})}function Kd(e,t){return new Dl({check:`string_format`,format:`ends_with`,...Qs(t),suffix:e})}function qd(e){return new Ol({check:`overwrite`,tx:e})}function Jd(e){return qd(t=>t.normalize(e))}function Yd(){return qd(e=>e.trim())}function Xd(){return qd(e=>e.toLowerCase())}function Zd(){return qd(e=>e.toUpperCase())}function Qd(){return qd(e=>Us(e))}function $d(e,t,n){return new e({type:`array`,element:t,...Qs(n)})}function ef(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...Qs(n)})}function tf(e,t){let n=nf(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(mc(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=t.value,r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(mc(r))}},e(t.value,t)),t);return n}function nf(e,t){let n=new fl({check:`custom`,...Qs(t)});return n._zod.check=e,n}function rf(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??Zu,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 af(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,af(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`&&cf(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function of(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>
72
+
73
+ 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 sf(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.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:uf(t,`input`,e.processors),output:uf(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function cf(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 cf(r.element,n);if(r.type===`set`)return cf(r.valueType,n);if(r.type===`lazy`)return cf(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 cf(r.innerType,n);if(r.type===`intersection`)return cf(r.left,n)||cf(r.right,n);if(r.type===`record`||r.type===`map`)return cf(r.keyType,n)||cf(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:cf(r.in,n)||cf(r.out,n);if(r.type===`object`){for(let e in r.shape)if(cf(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(cf(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(cf(e,n))return!0;return!!(r.rest&&cf(r.rest,n))}return!1}var lf=(e,t={})=>n=>{let r=rf({...n,processors:t});return af(e,r),of(r,e),sf(r,e)},uf=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=rf({...i??{},target:a,io:t,processors:n});return af(e,o),of(o,e),sf(o,e)},df={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},ff=(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=df[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}))])}},pf=(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`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(i.multipleOf=c)},mf=(e,t,n,r)=>{n.type=`boolean`},hf=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`BigInt cannot be represented in JSON Schema`)},gf=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Symbols cannot be represented in JSON Schema`)},_f=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},vf=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Undefined cannot be represented in JSON Schema`)},yf=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Void cannot be represented in JSON Schema`)},bf=(e,t,n,r)=>{n.not={}},xf=(e,t,n,r)=>{},Sf=(e,t,n,r)=>{},Cf=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Date cannot be represented in JSON Schema`)},wf=(e,t,n,r)=>{let i=e._zod.def,a=Ms(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},Tf=(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},Ef=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`NaN cannot be represented in JSON Schema`)},Df=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},Of=(e,t,n,r)=>{let i=n,a={type:`string`,format:`binary`,contentEncoding:`binary`},{minimum:o,maximum:s,mime:c}=e._zod.bag;o!==void 0&&(a.minLength=o),s!==void 0&&(a.maxLength=s),c?c.length===1?(a.contentMediaType=c[0],Object.assign(i,a)):(Object.assign(i,a),i.anyOf=c.map(e=>({contentMediaType:e}))):Object.assign(i,a)},kf=(e,t,n,r)=>{n.type=`boolean`},Af=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},jf=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Function types cannot be represented in JSON Schema`)},Mf=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},Nf=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Map cannot be represented in JSON Schema`)},Pf=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Set cannot be represented in JSON Schema`)},Ff=(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=af(a.element,t,{...r,path:[...r.path,`items`]})},If=(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]=af(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=af(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Lf=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>af(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Rf=(e,t,n,r)=>{let i=e._zod.def,a=af(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=af(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]]},zf=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>af(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?af(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null;t.target===`draft-2020-12`?(i.prefixItems=c,l&&(i.items=l)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),i.minItems=c.length,l||(i.maxItems=c.length)):(i.items=c,l&&(i.additionalItems=l));let{minimum:u,maximum:d}=e._zod.bag;typeof u==`number`&&(i.minItems=u),typeof d==`number`&&(i.maxItems=d)},Bf=(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=af(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=af(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=af(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)}},Vf=(e,t,n,r)=>{let i=e._zod.def,a=af(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`}]},Hf=(e,t,n,r)=>{let i=e._zod.def;af(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Uf=(e,t,n,r)=>{let i=e._zod.def;af(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},Wf=(e,t,n,r)=>{let i=e._zod.def;af(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)))},Gf=(e,t,n,r)=>{let i=e._zod.def;af(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},Kf=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;af(o,t,r);let s=t.seen.get(e);s.ref=o},qf=(e,t,n,r)=>{let i=e._zod.def;af(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Jf=(e,t,n,r)=>{let i=e._zod.def;af(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Yf=(e,t,n,r)=>{let i=e._zod.def;af(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Xf=(e,t,n,r)=>{let i=e._zod.innerType;af(i,t,r);let a=t.seen.get(e);a.ref=i},Zf={string:ff,number:pf,boolean:mf,bigint:hf,symbol:gf,null:_f,undefined:vf,void:yf,never:bf,any:xf,unknown:Sf,date:Cf,enum:wf,literal:Tf,nan:Ef,template_literal:Df,file:Of,success:kf,custom:Af,function:jf,transform:Mf,map:Nf,set:Pf,array:Ff,object:If,union:Lf,intersection:Rf,tuple:zf,record:Bf,nullable:Vf,nonoptional:Hf,default:Uf,prefault:Wf,catch:Gf,pipe:Kf,readonly:qf,promise:Jf,optional:Yf,lazy:Xf};function Qf(e,t){if(`_idmap`in e){let n=e,r=rf({...t,processors:Zf}),i={};for(let e of n._idmap.entries()){let[t,n]=e;af(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;of(r,n),a[t]=sf(r,n)}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=rf({...t,processors:Zf});return af(e,n),of(n,e),sf(n,e)}var $f=U(`ZodISODateTime`,(e,t)=>{Gl.init(e,t),Tp.init(e,t)});function ep(e){return xd($f,e)}var tp=U(`ZodISODate`,(e,t)=>{Kl.init(e,t),Tp.init(e,t)});function np(e){return Sd(tp,e)}var rp=U(`ZodISOTime`,(e,t)=>{ql.init(e,t),Tp.init(e,t)});function ip(e){return Cd(rp,e)}var ap=U(`ZodISODuration`,(e,t)=>{Jl.init(e,t),Tp.init(e,t)});function op(e){return wd(ap,e)}var sp=U(`ZodError`,(e,t)=>{gc.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>yc(e,t)},flatten:{value:t=>vc(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Ns,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Ns,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),cp=bc(sp),lp=xc(sp),up=Sc(sp),dp=wc(sp),fp=Ec(sp),pp=Dc(sp),mp=Oc(sp),hp=kc(sp),gp=Ac(sp),_p=jc(sp),vp=Mc(sp),yp=Nc(sp),bp=new WeakMap;function xp(e,t,n){let r=Object.getPrototypeOf(e),i=bp.get(r);if(i||(i=new Set,bp.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}var Sp=U(`ZodType`,(e,t)=>(jl.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:uf(e,`input`),output:uf(e,`output`)}}),e.toJSONSchema=lf(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>cp(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>up(e,t,n),e.parseAsync=async(t,n)=>lp(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>dp(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>fp(e,t,n),e.decode=(t,n)=>pp(e,t,n),e.encodeAsync=async(t,n)=>mp(e,t,n),e.decodeAsync=async(t,n)=>hp(e,t,n),e.safeEncode=(t,n)=>gp(e,t,n),e.safeDecode=(t,n)=>_p(e,t,n),e.safeEncodeAsync=async(t,n)=>vp(e,t,n),e.safeDecodeAsync=async(t,n)=>yp(e,t,n),xp(e,`ZodType`,{check(...e){let t=this.def;return this.clone(Vs(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return Zs(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(ree(e,t))},superRefine(e,t){return this.check(iee(e,t))},overwrite(e){return this.check(qd(e))},optional(){return xm(this)},exactOptional(){return Cm(this)},nullable(){return Tm(this)},nullish(){return xm(Tm(this))},nonoptional(e){return jm(this,e)},array(){return K(this)},or(e){return cm([this,e])},and(e){return fm(this,e)},transform(e){return Fm(this,ym(e))},default(e){return Dm(this,e)},prefault(e){return km(this,e)},catch(e){return Nm(this,e)},pipe(e){return Fm(this,e)},readonly(){return Rm(this)},describe(e){let t=this.clone();return Zu.add(t,{description:e}),t},meta(...e){if(e.length===0)return Zu.get(this);let t=this.clone();return Zu.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get(){return Zu.get(e)?.description},configurable:!0}),e)),Cp=U(`_ZodString`,(e,t)=>{Ml.init(e,t),Sp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ff(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,xp(e,`_ZodString`,{regex(...e){return this.check(Vd(...e))},includes(...e){return this.check(Wd(...e))},startsWith(...e){return this.check(Gd(...e))},endsWith(...e){return this.check(Kd(...e))},min(...e){return this.check(zd(...e))},max(...e){return this.check(Rd(...e))},length(...e){return this.check(Bd(...e))},nonempty(...e){return this.check(zd(1,...e))},lowercase(e){return this.check(Hd(e))},uppercase(e){return this.check(Ud(e))},trim(){return this.check(Yd())},normalize(...e){return this.check(Jd(...e))},toLowerCase(){return this.check(Xd())},toUpperCase(){return this.check(Zd())},slugify(){return this.check(Qd())}})}),wp=U(`ZodString`,(e,t)=>{Ml.init(e,t),Cp.init(e,t),e.email=t=>e.check($u(Ep,t)),e.url=t=>e.check(ad(Ap,t)),e.jwt=t=>e.check(bd(Kp,t)),e.emoji=t=>e.check(od(Mp,t)),e.guid=t=>e.check(ed(Op,t)),e.uuid=t=>e.check(td(kp,t)),e.uuidv4=t=>e.check(nd(kp,t)),e.uuidv6=t=>e.check(rd(kp,t)),e.uuidv7=t=>e.check(id(kp,t)),e.nanoid=t=>e.check(sd(Np,t)),e.guid=t=>e.check(ed(Op,t)),e.cuid=t=>e.check(cd(Pp,t)),e.cuid2=t=>e.check(ld(Fp,t)),e.ulid=t=>e.check(ud(Ip,t)),e.base64=t=>e.check(_d(Up,t)),e.base64url=t=>e.check(vd(Wp,t)),e.xid=t=>e.check(dd(Lp,t)),e.ksuid=t=>e.check(fd(Rp,t)),e.ipv4=t=>e.check(pd(zp,t)),e.ipv6=t=>e.check(md(Bp,t)),e.cidrv4=t=>e.check(hd(Vp,t)),e.cidrv6=t=>e.check(gd(Hp,t)),e.e164=t=>e.check(yd(Gp,t)),e.datetime=t=>e.check(ep(t)),e.date=t=>e.check(np(t)),e.time=t=>e.check(ip(t)),e.duration=t=>e.check(op(t))});function W(e){return Qu(wp,e)}var Tp=U(`ZodStringFormat`,(e,t)=>{Nl.init(e,t),Cp.init(e,t)}),Ep=U(`ZodEmail`,(e,t)=>{Il.init(e,t),Tp.init(e,t)});function Dp(e){return $u(Ep,e)}var Op=U(`ZodGUID`,(e,t)=>{Pl.init(e,t),Tp.init(e,t)}),kp=U(`ZodUUID`,(e,t)=>{Fl.init(e,t),Tp.init(e,t)}),Ap=U(`ZodURL`,(e,t)=>{Ll.init(e,t),Tp.init(e,t)});function jp(e){return ad(Ap,e)}var Mp=U(`ZodEmoji`,(e,t)=>{Rl.init(e,t),Tp.init(e,t)}),Np=U(`ZodNanoID`,(e,t)=>{zl.init(e,t),Tp.init(e,t)}),Pp=U(`ZodCUID`,(e,t)=>{Bl.init(e,t),Tp.init(e,t)}),Fp=U(`ZodCUID2`,(e,t)=>{Vl.init(e,t),Tp.init(e,t)}),Ip=U(`ZodULID`,(e,t)=>{Hl.init(e,t),Tp.init(e,t)}),Lp=U(`ZodXID`,(e,t)=>{Ul.init(e,t),Tp.init(e,t)}),Rp=U(`ZodKSUID`,(e,t)=>{Wl.init(e,t),Tp.init(e,t)}),zp=U(`ZodIPv4`,(e,t)=>{Yl.init(e,t),Tp.init(e,t)}),Bp=U(`ZodIPv6`,(e,t)=>{Xl.init(e,t),Tp.init(e,t)}),Vp=U(`ZodCIDRv4`,(e,t)=>{Zl.init(e,t),Tp.init(e,t)}),Hp=U(`ZodCIDRv6`,(e,t)=>{Ql.init(e,t),Tp.init(e,t)}),Up=U(`ZodBase64`,(e,t)=>{eu.init(e,t),Tp.init(e,t)}),Wp=U(`ZodBase64URL`,(e,t)=>{nu.init(e,t),Tp.init(e,t)}),Gp=U(`ZodE164`,(e,t)=>{ru.init(e,t),Tp.init(e,t)}),Kp=U(`ZodJWT`,(e,t)=>{au.init(e,t),Tp.init(e,t)}),qp=U(`ZodNumber`,(e,t)=>{ou.init(e,t),Sp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pf(e,t,n,r),xp(e,`ZodNumber`,{gt(e,t){return this.check(Fd(e,t))},gte(e,t){return this.check(Id(e,t))},min(e,t){return this.check(Id(e,t))},lt(e,t){return this.check(Nd(e,t))},lte(e,t){return this.check(Pd(e,t))},max(e,t){return this.check(Pd(e,t))},int(e){return this.check(Yp(e))},safe(e){return this.check(Yp(e))},positive(e){return this.check(Fd(0,e))},nonnegative(e){return this.check(Id(0,e))},negative(e){return this.check(Nd(0,e))},nonpositive(e){return this.check(Pd(0,e))},multipleOf(e,t){return this.check(Ld(e,t))},step(e,t){return this.check(Ld(e,t))},finite(){return this}});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 G(e){return Td(qp,e)}var Jp=U(`ZodNumberFormat`,(e,t)=>{su.init(e,t),qp.init(e,t)});function Yp(e){return Dd(Jp,e)}var eee=U(`ZodBoolean`,(e,t)=>{cu.init(e,t),Sp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mf(e,t,n,r)});function Xp(e){return Od(eee,e)}var Zp=U(`ZodNull`,(e,t)=>{lu.init(e,t),Sp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_f(e,t,n,r)});function Qp(e){return kd(Zp,e)}var tee=U(`ZodAny`,(e,t)=>{uu.init(e,t),Sp.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function $p(){return Ad(tee)}var em=U(`ZodUnknown`,(e,t)=>{du.init(e,t),Sp.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function tm(){return jd(em)}var nm=U(`ZodNever`,(e,t)=>{fu.init(e,t),Sp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bf(e,t,n,r)});function rm(e){return Md(nm,e)}var im=U(`ZodArray`,(e,t)=>{mu.init(e,t),Sp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ff(e,t,n,r),e.element=t.element,xp(e,`ZodArray`,{min(e,t){return this.check(zd(e,t))},nonempty(e){return this.check(zd(1,e))},max(e,t){return this.check(Rd(e,t))},length(e,t){return this.check(Bd(e,t))},unwrap(){return this.element}})});function K(e,t){return $d(im,e,t)}var am=U(`ZodObject`,(e,t)=>{yu.init(e,t),Sp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>If(e,t,n,r),zs(e,`shape`,()=>t.shape),xp(e,`ZodObject`,{keyof(){return gm(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:tm()})},loose(){return this.clone({...this._zod.def,catchall:tm()})},strict(){return this.clone({...this._zod.def,catchall:rm()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return rc(this,e)},safeExtend(e){return ic(this,e)},merge(e){return ac(this,e)},pick(e){return tc(this,e)},omit(e){return nc(this,e)},partial(...e){return oc(bm,this,e[0])},required(...e){return sc(Am,this,e[0])}})});function q(e,t){return new am({type:`object`,shape:e??{},...Qs(t)})}function om(e,t){return new am({type:`object`,shape:e,catchall:tm(),...Qs(t)})}var sm=U(`ZodUnion`,(e,t)=>{xu.init(e,t),Sp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Lf(e,t,n,r),e.options=t.options});function cm(e,t){return new sm({type:`union`,options:e,...Qs(t)})}var lm=U(`ZodDiscriminatedUnion`,(e,t)=>{sm.init(e,t),Su.init(e,t)});function um(e,t,n){return new lm({type:`union`,options:t,discriminator:e,...Qs(n)})}var dm=U(`ZodIntersection`,(e,t)=>{Cu.init(e,t),Sp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Rf(e,t,n,r)});function fm(e,t){return new dm({type:`intersection`,left:e,right:t})}var pm=U(`ZodRecord`,(e,t)=>{Eu.init(e,t),Sp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Bf(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function mm(e,t,n){return!t||!t._zod?new pm({type:`record`,keyType:W(),valueType:e,...Qs(t)}):new pm({type:`record`,keyType:e,valueType:t,...Qs(n)})}var hm=U(`ZodEnum`,(e,t)=>{Du.init(e,t),Sp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wf(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 hm({...t,checks:[],...Qs(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 hm({...t,checks:[],...Qs(r),entries:i})}});function gm(e,t){return new hm({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...Qs(t)})}var _m=U(`ZodLiteral`,(e,t)=>{Ou.init(e,t),Sp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Tf(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 J(e,t){return new _m({type:`literal`,values:Array.isArray(e)?e:[e],...Qs(t)})}var vm=U(`ZodTransform`,(e,t)=>{ku.init(e,t),Sp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Mf(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new ks(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(mc(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(mc(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function ym(e){return new vm({type:`transform`,transform:e})}var bm=U(`ZodOptional`,(e,t)=>{ju.init(e,t),Sp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Yf(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function xm(e){return new bm({type:`optional`,innerType:e})}var Sm=U(`ZodExactOptional`,(e,t)=>{Mu.init(e,t),Sp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Yf(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Cm(e){return new Sm({type:`optional`,innerType:e})}var wm=U(`ZodNullable`,(e,t)=>{Nu.init(e,t),Sp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Vf(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Tm(e){return new wm({type:`nullable`,innerType:e})}var Em=U(`ZodDefault`,(e,t)=>{Pu.init(e,t),Sp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Uf(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Dm(e,t){return new Em({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():Js(t)}})}var Om=U(`ZodPrefault`,(e,t)=>{Iu.init(e,t),Sp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wf(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function km(e,t){return new Om({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():Js(t)}})}var Am=U(`ZodNonOptional`,(e,t)=>{Lu.init(e,t),Sp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Hf(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function jm(e,t){return new Am({type:`nonoptional`,innerType:e,...Qs(t)})}var Mm=U(`ZodCatch`,(e,t)=>{zu.init(e,t),Sp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Gf(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Nm(e,t){return new Mm({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var Pm=U(`ZodPipe`,(e,t)=>{Bu.init(e,t),Sp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Kf(e,t,n,r),e.in=t.in,e.out=t.out});function Fm(e,t){return new Pm({type:`pipe`,in:e,out:t})}var Im=U(`ZodPreprocess`,(e,t)=>{Pm.init(e,t),Hu.init(e,t)}),Lm=U(`ZodReadonly`,(e,t)=>{Uu.init(e,t),Sp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qf(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Rm(e){return new Lm({type:`readonly`,innerType:e})}var zm=U(`ZodLazy`,(e,t)=>{Gu.init(e,t),Sp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xf(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function Bm(e){return new zm({type:`lazy`,getter:e})}var nee=U(`ZodCustom`,(e,t)=>{Ku.init(e,t),Sp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Af(e,t,n,r)});function ree(e,t={}){return ef(nee,e,t)}function iee(e,t){return tf(e,t)}function Vm(e,t){return new Im({type:`pipe`,in:ym(e),out:t})}var aee={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`},oee;oee||={};function see(e){return Ed(qp,e)}var Hm=`2025-11-25`,cee=[Hm,`2025-06-18`,`2025-03-26`,`2024-11-05`,`2024-10-07`],Um=`io.modelcontextprotocol/related-task`,Wm=`io.modelcontextprotocol/protocolVersion`,Gm=`io.modelcontextprotocol/clientInfo`,Km=`io.modelcontextprotocol/serverInfo`,qm=`io.modelcontextprotocol/clientCapabilities`,Jm=`io.modelcontextprotocol/subscriptionId`,Ym=`io.modelcontextprotocol/logLevel`,Xm=Bm(()=>cm([W(),G(),Xp(),Qp(),mm(W(),Xm),K(Xm)])),Zm=mm(W(),Xm),Qm=K(Xm),$m=cm([W(),G().int()]),eh=W(),th=q({ttl:G().optional()}),nh=q({taskId:W()}),rh=om({progressToken:$m.optional(),[Um]:nh.optional()}),ih=q({_meta:rh.optional()}),ah=ih.extend({task:th.optional()}),oh=q({method:W(),params:ih.loose().optional()}),sh=q({_meta:rh.optional()}),ch=q({method:W(),params:sh.loose().optional()}),lh=om({get[Km](){return Ch.optional().catch(void 0)}}),uh=om({_meta:lh.optional()}),dh=cm([W(),G().int()]),fh=q({jsonrpc:J(`2.0`),id:dh,...oh.shape}).strict(),ph=q({jsonrpc:J(`2.0`),...ch.shape}).strict(),mh=q({jsonrpc:J(`2.0`),id:dh,result:uh}).strict(),hh=q({jsonrpc:J(`2.0`),id:dh.optional(),error:q({code:G().int(),message:W(),data:tm().optional()})}).strict(),gh=cm([fh,ph,mh,hh]),lee=cm([mh,hh]),_h=uh.strict(),vh=sh.extend({requestId:dh.optional(),reason:W().optional()}),yh=ch.extend({method:J(`notifications/cancelled`),params:vh}),bh=q({src:W(),mimeType:W().optional(),sizes:K(W()).optional(),theme:gm([`light`,`dark`]).optional()}),xh=q({icons:K(bh).optional()}),Sh=q({name:W(),title:W().optional()}),Ch=Sh.extend({...Sh.shape,...xh.shape,version:W(),websiteUrl:W().optional(),description:W().optional()}),uee=Vm(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,fm(q({form:fm(q({applyDefaults:Xp().optional()}),Zm).optional(),url:Zm.optional()}),Zm.optional())),wh=om({list:Zm.optional(),cancel:Zm.optional(),requests:om({sampling:om({createMessage:Zm.optional()}).optional(),elicitation:om({create:Zm.optional()}).optional()}).optional()}),Th=om({list:Zm.optional(),cancel:Zm.optional(),requests:om({tools:om({call:Zm.optional()}).optional()}).optional()}),Eh=q({experimental:mm(W(),Zm).optional(),sampling:q({context:Zm.optional(),tools:Zm.optional()}).optional(),elicitation:uee.optional(),roots:q({listChanged:Xp().optional()}).optional(),tasks:wh.optional(),extensions:mm(W(),Zm).optional()}),Dh=ih.extend({protocolVersion:W(),capabilities:Eh,clientInfo:Ch}),Oh=oh.extend({method:J(`initialize`),params:Dh}),kh=q({experimental:mm(W(),Zm).optional(),logging:Zm.optional(),completions:Zm.optional(),prompts:q({listChanged:Xp().optional()}).optional(),resources:q({subscribe:Xp().optional(),listChanged:Xp().optional()}).optional(),tools:q({listChanged:Xp().optional()}).optional(),tasks:Th.optional(),extensions:mm(W(),Zm).optional()}),Ah=uh.extend({protocolVersion:W(),capabilities:kh,serverInfo:Ch,instructions:W().optional()}),jh=ch.extend({method:J(`notifications/initialized`),params:sh.optional()}),Mh=oh.extend({method:J(`server/discover`),params:ih.optional()}),Nh=uh.extend({supportedVersions:K(W()),capabilities:kh,instructions:W().optional()}),Ph=oh.extend({method:J(`ping`),params:ih.optional()}),Fh=q({progress:G(),total:xm(G()),message:xm(W())}),Ih=q({...sh.shape,...Fh.shape,progressToken:$m}),Lh=ch.extend({method:J(`notifications/progress`),params:Ih}),Rh=ih.extend({cursor:eh.optional()}),zh=oh.extend({params:Rh.optional()}),Bh=uh.extend({nextCursor:eh.optional()}),Vh=q({uri:W(),mimeType:xm(W()),_meta:mm(W(),tm()).optional()}),Hh=Vh.extend({text:W()}),Uh=W().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),Wh=Vh.extend({blob:Uh}),Gh=gm([`user`,`assistant`]),Kh=q({audience:K(Gh).optional(),priority:G().min(0).max(1).optional(),lastModified:ep({offset:!0}).optional()}),qh=q({...Sh.shape,...xh.shape,uri:W(),description:xm(W()),mimeType:xm(W()),size:xm(G()),annotations:Kh.optional(),_meta:xm(om({}))}),Jh=q({...Sh.shape,...xh.shape,uriTemplate:W(),description:xm(W()),mimeType:xm(W()),annotations:Kh.optional(),_meta:xm(om({}))}),Yh=zh.extend({method:J(`resources/list`)}),Xh=Bh.extend({resources:K(qh)}),Zh=zh.extend({method:J(`resources/templates/list`)}),Qh=Bh.extend({resourceTemplates:K(Jh)}),$h=ih.extend({uri:W()}),eg=$h,tg=oh.extend({method:J(`resources/read`),params:eg}),ng=uh.extend({contents:K(cm([Hh,Wh]))}),rg=ch.extend({method:J(`notifications/resources/list_changed`),params:sh.optional()}),ig=$h,ag=oh.extend({method:J(`resources/subscribe`),params:ig}),og=$h,sg=oh.extend({method:J(`resources/unsubscribe`),params:og}),cg=q({toolsListChanged:Xp().optional(),promptsListChanged:Xp().optional(),resourcesListChanged:Xp().optional(),resourceSubscriptions:K(W()).optional()}),lg=ih.extend({notifications:cg}),ug=oh.extend({method:J(`subscriptions/listen`),params:lg}),dg=sh.extend({notifications:cg}),fg=ch.extend({method:J(`notifications/subscriptions/acknowledged`),params:dg}),pg=lh.extend({[Jm]:dh}),mg=uh.extend({_meta:pg}),hg=sh.extend({uri:W()}),gg=ch.extend({method:J(`notifications/resources/updated`),params:hg}),_g=q({name:W(),description:xm(W()),required:xm(Xp())}),vg=q({...Sh.shape,...xh.shape,description:xm(W()),arguments:xm(K(_g)),_meta:xm(om({}))}),yg=zh.extend({method:J(`prompts/list`)}),bg=Bh.extend({prompts:K(vg)}),xg=ih.extend({name:W(),arguments:mm(W(),W()).optional()}),Sg=oh.extend({method:J(`prompts/get`),params:xg}),Cg=q({type:J(`text`),text:W(),annotations:Kh.optional(),_meta:mm(W(),tm()).optional()}),wg=q({type:J(`image`),data:Uh,mimeType:W(),annotations:Kh.optional(),_meta:mm(W(),tm()).optional()}),Tg=q({type:J(`audio`),data:Uh,mimeType:W(),annotations:Kh.optional(),_meta:mm(W(),tm()).optional()}),Eg=q({type:J(`tool_use`),name:W(),id:W(),input:mm(W(),tm()),_meta:mm(W(),tm()).optional()}),Dg=q({type:J(`resource`),resource:cm([Hh,Wh]),annotations:Kh.optional(),_meta:mm(W(),tm()).optional()}),Og=qh.extend({type:J(`resource_link`)}),kg=cm([Cg,wg,Tg,Og,Dg]),Ag=q({role:Gh,content:kg}),jg=uh.extend({description:W().optional(),messages:K(Ag)}),Mg=ch.extend({method:J(`notifications/prompts/list_changed`),params:sh.optional()}),Ng=q({title:W().optional(),readOnlyHint:Xp().optional(),destructiveHint:Xp().optional(),idempotentHint:Xp().optional(),openWorldHint:Xp().optional()}),Pg=q({taskSupport:gm([`required`,`optional`,`forbidden`]).optional()}),Fg=q({...Sh.shape,...xh.shape,description:W().optional(),inputSchema:q({type:J(`object`),properties:mm(W(),Xm).optional(),required:K(W()).optional()}).catchall(tm()),outputSchema:om({$schema:W().optional()}).optional(),annotations:Ng.optional(),execution:Pg.optional(),_meta:mm(W(),tm()).optional()}),Ig=zh.extend({method:J(`tools/list`)}),Lg=Bh.extend({tools:K(Fg)}),Rg=uh.extend({content:K(kg).default([]),structuredContent:tm().optional(),isError:Xp().optional()}),dee=Rg.or(uh.extend({toolResult:tm()})),zg=ah.extend({name:W(),arguments:mm(W(),tm()).optional()}),Bg=oh.extend({method:J(`tools/call`),params:zg}),Vg=ch.extend({method:J(`notifications/tools/list_changed`),params:sh.optional()}),Hg=q({autoRefresh:Xp().default(!0),debounceMs:G().int().nonnegative().default(300)}),Ug=gm([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),Wg=ih.extend({level:Ug}),Gg=oh.extend({method:J(`logging/setLevel`),params:Wg}),Kg=sh.extend({level:Ug,logger:W().optional(),data:tm()}),qg=ch.extend({method:J(`notifications/message`),params:Kg}),Jg=q({name:W().optional()}),Yg=q({hints:K(Jg).optional(),costPriority:G().min(0).max(1).optional(),speedPriority:G().min(0).max(1).optional(),intelligencePriority:G().min(0).max(1).optional()}),Xg=q({mode:gm([`auto`,`required`,`none`]).optional()}),Zg=q({type:J(`tool_result`),toolUseId:W().describe(`The unique identifier for the corresponding tool call.`),content:K(kg),structuredContent:tm().optional(),isError:Xp().optional(),_meta:mm(W(),tm()).optional()}),Qg=um(`type`,[Cg,wg,Tg]),$g=um(`type`,[Cg,wg,Tg,Eg,Zg]),e_=q({role:Gh,content:cm([$g,K($g)]),_meta:mm(W(),tm()).optional()}),t_=ah.extend({messages:K(e_),modelPreferences:Yg.optional(),systemPrompt:W().optional(),includeContext:gm([`none`,`thisServer`,`allServers`]).optional(),temperature:G().optional(),maxTokens:G().int(),stopSequences:K(W()).optional(),metadata:Zm.optional(),tools:K(Fg).optional(),toolChoice:Xg.optional()}),n_=oh.extend({method:J(`sampling/createMessage`),params:t_}),r_=uh.extend({model:W(),stopReason:xm(gm([`endTurn`,`stopSequence`,`maxTokens`]).or(W())),role:Gh,content:Qg}),i_=uh.extend({model:W(),stopReason:xm(gm([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(W())),role:Gh,content:cm([$g,K($g)])}),a_=q({type:J(`boolean`),title:W().optional(),description:W().optional(),default:Xp().optional()}),o_=q({type:J(`string`),title:W().optional(),description:W().optional(),minLength:G().optional(),maxLength:G().optional(),format:gm([`email`,`uri`,`date`,`date-time`]).optional(),default:W().optional()}),s_=q({type:gm([`number`,`integer`]),title:W().optional(),description:W().optional(),minimum:G().optional(),maximum:G().optional(),default:G().optional()}),c_=q({type:J(`string`),title:W().optional(),description:W().optional(),enum:K(W()),default:W().optional()}),l_=q({type:J(`string`),title:W().optional(),description:W().optional(),oneOf:K(q({const:W(),title:W()})),default:W().optional()}),u_=q({type:J(`string`),title:W().optional(),description:W().optional(),enum:K(W()),enumNames:K(W()).optional(),default:W().optional()}),d_=cm([c_,l_]),f_=q({type:J(`array`),title:W().optional(),description:W().optional(),minItems:G().optional(),maxItems:G().optional(),items:q({type:J(`string`),enum:K(W())}),default:K(W()).optional()}),p_=q({type:J(`array`),title:W().optional(),description:W().optional(),minItems:G().optional(),maxItems:G().optional(),items:q({anyOf:K(q({const:W(),title:W()}))}),default:K(W()).optional()}),m_=cm([f_,p_]),h_=cm([u_,d_,m_]),g_=cm([h_,a_,o_,s_]),__=ah.extend({mode:J(`form`).optional(),message:W(),requestedSchema:q({type:J(`object`),properties:mm(W(),g_),required:K(W()).optional()}).catchall(tm())}),v_=ah.extend({mode:J(`url`),message:W(),elicitationId:W(),url:W().url()}),y_=cm([__,v_]),b_=oh.extend({method:J(`elicitation/create`),params:y_}),x_=sh.extend({elicitationId:W()}),S_=ch.extend({method:J(`notifications/elicitation/complete`),params:x_}),C_=uh.extend({action:gm([`accept`,`decline`,`cancel`]),content:Vm(e=>e===null?void 0:e,mm(W(),cm([W(),G(),Xp(),K(W())])).optional())}),w_=q({type:J(`ref/resource`),uri:W()}),T_=q({type:J(`ref/prompt`),name:W()}),E_=ih.extend({ref:cm([T_,w_]),argument:q({name:W(),value:W()}),context:q({arguments:mm(W(),W()).optional()}).optional()}),D_=oh.extend({method:J(`completion/complete`),params:E_}),O_=uh.extend({completion:om({values:K(W()).max(100),total:xm(G().int()),hasMore:xm(Xp())})}),k_=q({uri:W().startsWith(`file://`),name:W().optional(),_meta:mm(W(),tm()).optional()}),A_=oh.extend({method:J(`roots/list`),params:ih.optional()}),j_=uh.extend({roots:K(k_)}),M_=ch.extend({method:J(`notifications/roots/list_changed`),params:sh.optional()}),N_=om({ttl:G().optional(),pollInterval:G().optional()}),P_=gm([`working`,`input_required`,`completed`,`failed`,`cancelled`]),F_=q({taskId:W(),status:P_,ttl:cm([G(),Qp()]),createdAt:W(),lastUpdatedAt:W(),pollInterval:xm(G()),statusMessage:xm(W())}),I_=uh.extend({task:F_}),L_=sh.merge(F_),R_=ch.extend({method:J(`notifications/tasks/status`),params:L_}),z_=oh.extend({method:J(`tasks/get`),params:ih.extend({taskId:W()})}),B_=uh.merge(F_),V_=oh.extend({method:J(`tasks/result`),params:ih.extend({taskId:W()})}),H_=uh.loose(),U_=zh.extend({method:J(`tasks/list`)}),W_=Bh.extend({tasks:K(F_)}),G_=oh.extend({method:J(`tasks/cancel`),params:ih.extend({taskId:W()})}),K_=uh.merge(F_),q_=cm([Ph,Oh,Mh,D_,Gg,Sg,yg,Yh,Zh,tg,ag,sg,ug,Bg,Ig]),J_=cm([yh,Lh,jh,M_]),Y_=cm([_h,r_,i_,C_,j_]),X_=cm([Ph,n_,b_,A_]),Z_=cm([yh,Lh,qg,gg,rg,Vg,Mg,fg,S_]),Q_=cm([_h,Ah,Nh,O_,jg,bg,Xh,Qh,ng,Rg,Lg,mg]),$_=jp().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:aee.custom,message:`URL must be parseable`,fatal:!0}),Ds}).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`}),ev=om({resource:W().url(),authorization_servers:K($_).optional(),jwks_uri:W().url().optional(),scopes_supported:K(W()).optional(),bearer_methods_supported:K(W()).optional(),resource_signing_alg_values_supported:K(W()).optional(),resource_name:W().optional(),resource_documentation:W().optional(),resource_policy_uri:W().url().optional(),resource_tos_uri:W().url().optional(),tls_client_certificate_bound_access_tokens:Xp().optional(),authorization_details_types_supported:K(W()).optional(),dpop_signing_alg_values_supported:K(W()).optional(),dpop_bound_access_tokens_required:Xp().optional()}),tv=om({issuer:W(),authorization_endpoint:$_,token_endpoint:$_,registration_endpoint:$_.optional(),scopes_supported:K(W()).optional(),response_types_supported:K(W()),response_modes_supported:K(W()).optional(),grant_types_supported:K(W()).optional(),token_endpoint_auth_methods_supported:K(W()).optional(),token_endpoint_auth_signing_alg_values_supported:K(W()).optional(),service_documentation:$_.optional(),revocation_endpoint:$_.optional(),revocation_endpoint_auth_methods_supported:K(W()).optional(),revocation_endpoint_auth_signing_alg_values_supported:K(W()).optional(),introspection_endpoint:W().optional(),introspection_endpoint_auth_methods_supported:K(W()).optional(),introspection_endpoint_auth_signing_alg_values_supported:K(W()).optional(),code_challenge_methods_supported:K(W()).optional(),client_id_metadata_document_supported:Xp().optional(),authorization_response_iss_parameter_supported:Xp().optional().catch(void 0)}),nv=om({issuer:W(),authorization_endpoint:$_,token_endpoint:$_,userinfo_endpoint:$_.optional(),jwks_uri:$_,registration_endpoint:$_.optional(),scopes_supported:K(W()).optional(),response_types_supported:K(W()),response_modes_supported:K(W()).optional(),grant_types_supported:K(W()).optional(),acr_values_supported:K(W()).optional(),subject_types_supported:K(W()),id_token_signing_alg_values_supported:K(W()),id_token_encryption_alg_values_supported:K(W()).optional(),id_token_encryption_enc_values_supported:K(W()).optional(),userinfo_signing_alg_values_supported:K(W()).optional(),userinfo_encryption_alg_values_supported:K(W()).optional(),userinfo_encryption_enc_values_supported:K(W()).optional(),request_object_signing_alg_values_supported:K(W()).optional(),request_object_encryption_alg_values_supported:K(W()).optional(),request_object_encryption_enc_values_supported:K(W()).optional(),token_endpoint_auth_methods_supported:K(W()).optional(),token_endpoint_auth_signing_alg_values_supported:K(W()).optional(),display_values_supported:K(W()).optional(),claim_types_supported:K(W()).optional(),claims_supported:K(W()).optional(),service_documentation:W().optional(),claims_locales_supported:K(W()).optional(),ui_locales_supported:K(W()).optional(),claims_parameter_supported:Xp().optional(),request_parameter_supported:Xp().optional(),request_uri_parameter_supported:Xp().optional(),require_request_uri_registration:Xp().optional(),op_policy_uri:$_.optional(),op_tos_uri:$_.optional(),client_id_metadata_document_supported:Xp().optional(),authorization_response_iss_parameter_supported:Xp().optional().catch(void 0)}),rv=q({...nv.shape,...tv.pick({code_challenge_methods_supported:!0}).shape}),iv=q({access_token:W(),id_token:W().optional(),token_type:W(),expires_in:see().optional(),scope:W().optional(),refresh_token:W().optional()}).strip(),av=q({issued_token_type:J(`urn:ietf:params:oauth:token-type:id-jag`),access_token:W(),token_type:W().optional(),expires_in:G().optional(),scope:W().optional()}).strip(),ov=q({error:W(),error_description:W().optional(),error_uri:W().optional()}),sv=$_.optional().or(J(``).transform(()=>void 0)),cv=q({redirect_uris:K($_),token_endpoint_auth_method:W().optional(),grant_types:K(W()).optional(),response_types:K(W()).optional(),application_type:W().optional(),client_name:W().optional(),client_uri:$_.optional(),logo_uri:sv,scope:W().optional(),contacts:K(W()).optional(),tos_uri:sv,policy_uri:W().optional(),jwks_uri:$_.optional(),jwks:$p().optional(),software_id:W().optional(),software_version:W().optional(),software_statement:W().optional()}).strip(),lv=q({client_id:W(),client_secret:W().optional(),client_id_issued_at:G().optional(),client_secret_expires_at:G().optional()}).strip(),uv=cv.merge(lv),dv=q({error:W(),error_description:W().optional()}).strip(),fv=q({token:W(),token_type_hint:W().optional()}).strip(),pv=Symbol.for(`mcp.sdk.errorBrands`);function mv(e,t){let n=new Set,r=t;for(;typeof r==`function`;){let e=r.mcpBrand;Object.prototype.hasOwnProperty.call(r,`mcpBrand`)&&typeof e==`string`&&n.add(e),r=Object.getPrototypeOf(r)}n.size!==0&&Object.defineProperty(e,pv,{value:n,enumerable:!1,configurable:!0})}function hv(e,t){try{if(typeof t==`object`&&t&&Object.prototype.hasOwnProperty.call(e,`mcpBrand`)&&typeof e.mcpBrand==`string`&&Object.prototype.hasOwnProperty.call(t,pv)){let n=t[pv];if(n&&typeof n.has==`function`&&n.has(e.mcpBrand))return!0}}catch{}return Function.prototype[Symbol.hasInstance].call(e,t)}var gv=function(e){return e.InvalidRequest=`invalid_request`,e.InvalidClient=`invalid_client`,e.InvalidGrant=`invalid_grant`,e.UnauthorizedClient=`unauthorized_client`,e.UnsupportedGrantType=`unsupported_grant_type`,e.InvalidScope=`invalid_scope`,e.AccessDenied=`access_denied`,e.ServerError=`server_error`,e.TemporarilyUnavailable=`temporarily_unavailable`,e.UnsupportedResponseType=`unsupported_response_type`,e.UnsupportedTokenType=`unsupported_token_type`,e.InvalidToken=`invalid_token`,e.MethodNotAllowed=`method_not_allowed`,e.TooManyRequests=`too_many_requests`,e.InvalidClientMetadata=`invalid_client_metadata`,e.InvalidRedirectUri=`invalid_redirect_uri`,e.InsufficientScope=`insufficient_scope`,e.InvalidTarget=`invalid_target`,e}({}),_v=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.OAuthError`})}static[Symbol.hasInstance](e){return hv(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return hv(this,e)}constructor(e,t,n){super(t),this.code=e,this.errorUri=n,this.name=`OAuthError`,mv(this,new.target)}toResponseObject(){let e={error:this.code,error_description:this.message};return this.errorUri&&(e.error_uri=this.errorUri),e}static fromResponse(t){return new e(t.error,t.error_description??t.error,t.error_uri)}},vv=function(e){return e.NotConnected=`NOT_CONNECTED`,e.AlreadyConnected=`ALREADY_CONNECTED`,e.NotInitialized=`NOT_INITIALIZED`,e.CapabilityNotSupported=`CAPABILITY_NOT_SUPPORTED`,e.RequestTimeout=`REQUEST_TIMEOUT`,e.ConnectionClosed=`CONNECTION_CLOSED`,e.SendFailed=`SEND_FAILED`,e.InvalidResult=`INVALID_RESULT`,e.UnsupportedResultType=`UNSUPPORTED_RESULT_TYPE`,e.InputRequiredRoundsExceeded=`INPUT_REQUIRED_ROUNDS_EXCEEDED`,e.ListPaginationExceeded=`LIST_PAGINATION_EXCEEDED`,e.MethodNotSupportedByProtocolVersion=`METHOD_NOT_SUPPORTED_BY_PROTOCOL_VERSION`,e.EraNegotiationFailed=`ERA_NEGOTIATION_FAILED`,e.ClientHttpNotImplemented=`CLIENT_HTTP_NOT_IMPLEMENTED`,e.ClientHttpAuthentication=`CLIENT_HTTP_AUTHENTICATION`,e.ClientHttpForbidden=`CLIENT_HTTP_FORBIDDEN`,e.ClientHttpUnexpectedContent=`CLIENT_HTTP_UNEXPECTED_CONTENT`,e.ClientHttpFailedToOpenStream=`CLIENT_HTTP_FAILED_TO_OPEN_STREAM`,e.ClientHttpFailedToTerminateSession=`CLIENT_HTTP_FAILED_TO_TERMINATE_SESSION`,e}({}),yv=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SdkError`})}static[Symbol.hasInstance](e){return hv(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return hv(this,e)}constructor(e,t,n){super(t),this.code=e,this.data=n,this.name=`SdkError`,mv(this,new.target)}},bv=class extends yv{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SdkHttpError`})}constructor(e,t,n){super(e,t,n),this.name=`SdkHttpError`}get status(){return this.data.status}get statusText(){return this.data.statusText}};function xv(e){let t=typeof e==`string`?new URL(e):new URL(e.href);return t.hash=``,t}function Sv({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 Cv=`2026-07-28`,wv=[Cv];function Tv(e){return e>=Cv}function Ev(e){return e.filter(e=>!Tv(e))}function Dv(e){return e.filter(e=>Tv(e))}function Ov(e){let t=e.structuredContent;return t===void 0||!(typeof t!=`object`||!t||Array.isArray(t))||(e.content?.some(e=>e.type===`text`)??!1)?e:{...e,content:[...e.content??[],{type:`text`,text:JSON.stringify(t)}]}}var kv=[`task`,`inputRequests`,`requestState`];function fee(e){return typeof e!=`object`||!e||Array.isArray(e)||e.content!==void 0||kv.some(t=>t in e)?e:{...e,content:[]}}function pee(){let e=Bm(()=>cm([W(),G(),Xp(),Qp(),mm(W(),e),K(e)])),t=mm(W(),e),n=cm([W(),G().int()]),r=W(),i=q({ttl:G().optional()}),a=q({taskId:W()}),o=om({progressToken:n.optional(),"io.modelcontextprotocol/related-task":a.optional()}),s=q({_meta:o.optional()}),c=s.extend({task:i.optional()}),l=q({method:W(),params:s.loose().optional()}),u=q({_meta:o.optional()}),d=q({method:W(),params:u.loose().optional()}),f=om({_meta:o.optional()}),p=cm([W(),G().int()]),m=f.strict(),h=u.extend({requestId:p.optional(),reason:W().optional()}),g=d.extend({method:J(`notifications/cancelled`),params:h}),_=q({src:W(),mimeType:W().optional(),sizes:K(W()).optional(),theme:gm([`light`,`dark`]).optional()}),v=q({icons:K(_).optional()}),y=q({name:W(),title:W().optional()}),b=y.extend({...y.shape,...v.shape,version:W(),websiteUrl:W().optional(),description:W().optional()}),x=Vm(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,fm(q({form:fm(q({applyDefaults:Xp().optional()}),t).optional(),url:t.optional()}),t.optional())),S=om({list:t.optional(),cancel:t.optional(),requests:om({sampling:om({createMessage:t.optional()}).optional(),elicitation:om({create:t.optional()}).optional()}).optional()}),C=om({list:t.optional(),cancel:t.optional(),requests:om({tools:om({call:t.optional()}).optional()}).optional()}),w=q({experimental:mm(W(),t).optional(),sampling:q({context:t.optional(),tools:t.optional()}).optional(),elicitation:x.optional(),roots:q({listChanged:Xp().optional()}).optional(),tasks:S.optional(),extensions:mm(W(),t).optional()}),T=s.extend({protocolVersion:W(),capabilities:w,clientInfo:b}),E=l.extend({method:J(`initialize`),params:T}),D=q({experimental:mm(W(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:q({listChanged:Xp().optional()}).optional(),resources:q({subscribe:Xp().optional(),listChanged:Xp().optional()}).optional(),tools:q({listChanged:Xp().optional()}).optional(),tasks:C.optional(),extensions:mm(W(),t).optional()}),O=f.extend({protocolVersion:W(),capabilities:D,serverInfo:b,instructions:W().optional()}),k=d.extend({method:J(`notifications/initialized`),params:u.optional()}),A=l.extend({method:J(`ping`),params:s.optional()}),j=q({progress:G(),total:xm(G()),message:xm(W())}),M=q({...u.shape,...j.shape,progressToken:n}),N=d.extend({method:J(`notifications/progress`),params:M}),P=s.extend({cursor:r.optional()}),F=l.extend({params:P.optional()}),I=f.extend({nextCursor:r.optional()}),L=q({uri:W(),mimeType:xm(W()),_meta:mm(W(),tm()).optional()}),ee=L.extend({text:W()}),te=W().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),ne=L.extend({blob:te}),R=gm([`user`,`assistant`]),z=q({audience:K(R).optional(),priority:G().min(0).max(1).optional(),lastModified:ep({offset:!0}).optional()}),B=q({...y.shape,...v.shape,uri:W(),description:xm(W()),mimeType:xm(W()),size:xm(G()),annotations:z.optional(),_meta:xm(om({}))}),re=q({...y.shape,...v.shape,uriTemplate:W(),description:xm(W()),mimeType:xm(W()),annotations:z.optional(),_meta:xm(om({}))}),ie=F.extend({method:J(`resources/list`)}),ae=I.extend({resources:K(B)}),oe=F.extend({method:J(`resources/templates/list`)}),se=I.extend({resourceTemplates:K(re)}),ce=s.extend({uri:W()}),le=ce,ue=l.extend({method:J(`resources/read`),params:le}),de=f.extend({contents:K(cm([ee,ne]))}),fe=d.extend({method:J(`notifications/resources/list_changed`),params:u.optional()}),pe=ce,me=l.extend({method:J(`resources/subscribe`),params:pe}),V=ce,he=l.extend({method:J(`resources/unsubscribe`),params:V}),ge=u.extend({uri:W()}),_e=d.extend({method:J(`notifications/resources/updated`),params:ge}),ve=q({name:W(),description:xm(W()),required:xm(Xp())}),ye=q({...y.shape,...v.shape,description:xm(W()),arguments:xm(K(ve)),_meta:xm(om({}))}),be=F.extend({method:J(`prompts/list`)}),xe=I.extend({prompts:K(ye)}),Se=s.extend({name:W(),arguments:mm(W(),W()).optional()}),Ce=l.extend({method:J(`prompts/get`),params:Se}),we=q({type:J(`text`),text:W(),annotations:z.optional(),_meta:mm(W(),tm()).optional()}),Te=q({type:J(`image`),data:te,mimeType:W(),annotations:z.optional(),_meta:mm(W(),tm()).optional()}),Ee=q({type:J(`audio`),data:te,mimeType:W(),annotations:z.optional(),_meta:mm(W(),tm()).optional()}),De=q({type:J(`tool_use`),name:W(),id:W(),input:mm(W(),tm()),_meta:mm(W(),tm()).optional()}),Oe=q({type:J(`resource`),resource:cm([ee,ne]),annotations:z.optional(),_meta:mm(W(),tm()).optional()}),ke=B.extend({type:J(`resource_link`)}),Ae=cm([we,Te,Ee,ke,Oe]),je=q({role:R,content:Ae}),Me=f.extend({description:W().optional(),messages:K(je)}),Ne=d.extend({method:J(`notifications/prompts/list_changed`),params:u.optional()}),Pe=q({title:W().optional(),readOnlyHint:Xp().optional(),destructiveHint:Xp().optional(),idempotentHint:Xp().optional(),openWorldHint:Xp().optional()}),Fe=q({taskSupport:gm([`required`,`optional`,`forbidden`]).optional()}),Ie=q({...y.shape,...v.shape,description:W().optional(),inputSchema:q({type:J(`object`),properties:mm(W(),e).optional(),required:K(W()).optional()}).catchall(tm()),outputSchema:q({type:J(`object`),properties:mm(W(),e).optional(),required:K(W()).optional()}).catchall(tm()).optional(),annotations:Pe.optional(),execution:Fe.optional(),_meta:mm(W(),tm()).optional()}),Le=F.extend({method:J(`tools/list`)}),Re=I.extend({tools:K(Ie)}),ze=f.extend({content:K(Ae),structuredContent:mm(W(),tm()).optional(),isError:Xp().optional()}),Be=c.extend({name:W(),arguments:mm(W(),tm()).optional()}),Ve=l.extend({method:J(`tools/call`),params:Be}),He=d.extend({method:J(`notifications/tools/list_changed`),params:u.optional()}),Ue=gm([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),H=s.extend({level:Ue}),We=l.extend({method:J(`logging/setLevel`),params:H}),Ge=u.extend({level:Ue,logger:W().optional(),data:tm()}),Ke=d.extend({method:J(`notifications/message`),params:Ge}),qe=q({name:W().optional()}),Je=q({hints:K(qe).optional(),costPriority:G().min(0).max(1).optional(),speedPriority:G().min(0).max(1).optional(),intelligencePriority:G().min(0).max(1).optional()}),Ye=q({mode:gm([`auto`,`required`,`none`]).optional()}),Xe=q({type:J(`tool_result`),toolUseId:W().describe(`The unique identifier for the corresponding tool call.`),content:K(Ae),structuredContent:q({}).loose().optional(),isError:Xp().optional(),_meta:mm(W(),tm()).optional()}),Ze=um(`type`,[we,Te,Ee]),Qe=um(`type`,[we,Te,Ee,De,Xe]),$e=q({role:R,content:cm([Qe,K(Qe)]),_meta:mm(W(),tm()).optional()}),et=c.extend({messages:K($e),modelPreferences:Je.optional(),systemPrompt:W().optional(),includeContext:gm([`none`,`thisServer`,`allServers`]).optional(),temperature:G().optional(),maxTokens:G().int(),stopSequences:K(W()).optional(),metadata:t.optional(),tools:K(Ie).optional(),toolChoice:Ye.optional()}),tt=l.extend({method:J(`sampling/createMessage`),params:et}),nt=f.extend({model:W(),stopReason:xm(gm([`endTurn`,`stopSequence`,`maxTokens`]).or(W())),role:R,content:Ze}),rt=f.extend({model:W(),stopReason:xm(gm([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(W())),role:R,content:cm([Qe,K(Qe)])}),it=q({type:J(`boolean`),title:W().optional(),description:W().optional(),default:Xp().optional()}),at=q({type:J(`string`),title:W().optional(),description:W().optional(),minLength:G().optional(),maxLength:G().optional(),format:gm([`email`,`uri`,`date`,`date-time`]).optional(),default:W().optional()}),ot=q({type:gm([`number`,`integer`]),title:W().optional(),description:W().optional(),minimum:G().optional(),maximum:G().optional(),default:G().optional()}),st=q({type:J(`string`),title:W().optional(),description:W().optional(),enum:K(W()),default:W().optional()}),ct=q({type:J(`string`),title:W().optional(),description:W().optional(),oneOf:K(q({const:W(),title:W()})),default:W().optional()}),lt=q({type:J(`string`),title:W().optional(),description:W().optional(),enum:K(W()),enumNames:K(W()).optional(),default:W().optional()}),ut=cm([st,ct]),dt=q({type:J(`array`),title:W().optional(),description:W().optional(),minItems:G().optional(),maxItems:G().optional(),items:q({type:J(`string`),enum:K(W())}),default:K(W()).optional()}),ft=q({type:J(`array`),title:W().optional(),description:W().optional(),minItems:G().optional(),maxItems:G().optional(),items:q({anyOf:K(q({const:W(),title:W()}))}),default:K(W()).optional()}),pt=cm([dt,ft]),mt=cm([lt,ut,pt]),ht=cm([mt,it,at,ot]),gt=c.extend({mode:J(`form`).optional(),message:W(),requestedSchema:q({type:J(`object`),properties:mm(W(),ht),required:K(W()).optional()}).catchall(tm())}),_t=c.extend({mode:J(`url`),message:W(),elicitationId:W(),url:W().url()}),vt=cm([gt,_t]),yt=l.extend({method:J(`elicitation/create`),params:vt}),bt=u.extend({elicitationId:W()}),xt=d.extend({method:J(`notifications/elicitation/complete`),params:bt}),St=f.extend({action:gm([`accept`,`decline`,`cancel`]),content:Vm(e=>e===null?void 0:e,mm(W(),cm([W(),G(),Xp(),K(W())])).optional())}),Ct=q({type:J(`ref/resource`),uri:W()}),wt=q({type:J(`ref/prompt`),name:W()}),Tt=s.extend({ref:cm([wt,Ct]),argument:q({name:W(),value:W()}),context:q({arguments:mm(W(),W()).optional()}).optional()}),Et=l.extend({method:J(`completion/complete`),params:Tt}),Dt=f.extend({completion:om({values:K(W()).max(100),total:xm(G().int()),hasMore:xm(Xp())})}),Ot=q({uri:W().startsWith(`file://`),name:W().optional(),_meta:mm(W(),tm()).optional()}),kt=l.extend({method:J(`roots/list`),params:s.optional()}),At=f.extend({roots:K(Ot)}),jt=d.extend({method:J(`notifications/roots/list_changed`),params:u.optional()}),Mt=om({ttl:G().optional(),pollInterval:G().optional()}),Nt=gm([`working`,`input_required`,`completed`,`failed`,`cancelled`]),Pt=q({taskId:W(),status:Nt,ttl:cm([G(),Qp()]),createdAt:W(),lastUpdatedAt:W(),pollInterval:xm(G()),statusMessage:xm(W())}),Ft=f.extend({task:Pt}),It=u.merge(Pt),Lt=d.extend({method:J(`notifications/tasks/status`),params:It}),Rt=l.extend({method:J(`tasks/get`),params:s.extend({taskId:W()})}),zt=f.merge(Pt),Bt=l.extend({method:J(`tasks/result`),params:s.extend({taskId:W()})}),Vt=f.loose(),Ht=F.extend({method:J(`tasks/list`)}),Ut=I.extend({tasks:K(Pt)}),Wt=l.extend({method:J(`tasks/cancel`),params:s.extend({taskId:W()})});return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:r,TaskMetadataSchema:i,RelatedTaskMetadataSchema:a,RequestMetaSchema:o,BaseRequestParamsSchema:s,TaskAugmentedRequestParamsSchema:c,RequestSchema:l,NotificationsParamsSchema:u,NotificationSchema:d,ResultSchema:f,RequestIdSchema:p,EmptyResultSchema:m,CancelledNotificationParamsSchema:h,CancelledNotificationSchema:g,IconSchema:_,IconsSchema:v,BaseMetadataSchema:y,ImplementationSchema:b,ClientTasksCapabilitySchema:S,ServerTasksCapabilitySchema:C,ClientCapabilitiesSchema:w,InitializeRequestParamsSchema:T,InitializeRequestSchema:E,ServerCapabilitiesSchema:D,InitializeResultSchema:O,InitializedNotificationSchema:k,PingRequestSchema:A,ProgressSchema:j,ProgressNotificationParamsSchema:M,ProgressNotificationSchema:N,PaginatedRequestParamsSchema:P,PaginatedRequestSchema:F,PaginatedResultSchema:I,ResourceContentsSchema:L,TextResourceContentsSchema:ee,BlobResourceContentsSchema:ne,RoleSchema:R,AnnotationsSchema:z,ResourceSchema:B,ResourceTemplateSchema:re,ListResourcesRequestSchema:ie,ListResourcesResultSchema:ae,ListResourceTemplatesRequestSchema:oe,ListResourceTemplatesResultSchema:se,ResourceRequestParamsSchema:ce,ReadResourceRequestParamsSchema:le,ReadResourceRequestSchema:ue,ReadResourceResultSchema:de,ResourceListChangedNotificationSchema:fe,SubscribeRequestParamsSchema:pe,SubscribeRequestSchema:me,UnsubscribeRequestParamsSchema:V,UnsubscribeRequestSchema:he,ResourceUpdatedNotificationParamsSchema:ge,ResourceUpdatedNotificationSchema:_e,PromptArgumentSchema:ve,PromptSchema:ye,ListPromptsRequestSchema:be,ListPromptsResultSchema:xe,GetPromptRequestParamsSchema:Se,GetPromptRequestSchema:Ce,TextContentSchema:we,ImageContentSchema:Te,AudioContentSchema:Ee,ToolUseContentSchema:De,EmbeddedResourceSchema:Oe,ResourceLinkSchema:ke,ContentBlockSchema:Ae,PromptMessageSchema:je,GetPromptResultSchema:Me,PromptListChangedNotificationSchema:Ne,ToolAnnotationsSchema:Pe,ToolExecutionSchema:Fe,ToolSchema:Ie,ListToolsRequestSchema:Le,ListToolsResultSchema:Re,CallToolResultSchema:ze,CallToolRequestParamsSchema:Be,CallToolRequestSchema:Ve,ToolListChangedNotificationSchema:He,LoggingLevelSchema:Ue,SetLevelRequestParamsSchema:H,SetLevelRequestSchema:We,LoggingMessageNotificationParamsSchema:Ge,LoggingMessageNotificationSchema:Ke,ModelHintSchema:qe,ModelPreferencesSchema:Je,ToolChoiceSchema:Ye,ToolResultContentSchema:Xe,SamplingContentSchema:Ze,SamplingMessageContentBlockSchema:Qe,SamplingMessageSchema:$e,CreateMessageRequestParamsSchema:et,CreateMessageRequestSchema:tt,CreateMessageResultSchema:nt,CreateMessageResultWithToolsSchema:rt,BooleanSchemaSchema:it,StringSchemaSchema:at,NumberSchemaSchema:ot,UntitledSingleSelectEnumSchemaSchema:st,TitledSingleSelectEnumSchemaSchema:ct,LegacyTitledEnumSchemaSchema:lt,SingleSelectEnumSchemaSchema:ut,UntitledMultiSelectEnumSchemaSchema:dt,TitledMultiSelectEnumSchemaSchema:ft,MultiSelectEnumSchemaSchema:pt,EnumSchemaSchema:mt,PrimitiveSchemaDefinitionSchema:ht,ElicitRequestFormParamsSchema:gt,ElicitRequestURLParamsSchema:_t,ElicitRequestParamsSchema:vt,ElicitRequestSchema:yt,ElicitationCompleteNotificationParamsSchema:bt,ElicitationCompleteNotificationSchema:xt,ElicitResultSchema:St,ResourceTemplateReferenceSchema:Ct,PromptReferenceSchema:wt,CompleteRequestParamsSchema:Tt,CompleteRequestSchema:Et,CompleteResultSchema:Dt,RootSchema:Ot,ListRootsRequestSchema:kt,ListRootsResultSchema:At,RootsListChangedNotificationSchema:jt,TaskCreationParamsSchema:Mt,TaskStatusSchema:Nt,TaskSchema:Pt,CreateTaskResultSchema:Ft,TaskStatusNotificationParamsSchema:It,TaskStatusNotificationSchema:Lt,GetTaskRequestSchema:Rt,GetTaskResultSchema:zt,GetTaskPayloadRequestSchema:Bt,GetTaskPayloadResultSchema:Vt,ListTasksRequestSchema:Ht,ListTasksResultSchema:Ut,CancelTaskRequestSchema:Wt,CancelTaskResultSchema:f.merge(Pt),ClientRequestSchema:cm([A,E,Et,We,Ce,be,ie,oe,ue,me,he,Ve,Le,Rt,Bt,Ht,Wt]),ClientNotificationSchema:cm([g,N,k,jt,Lt]),ClientResultSchema:cm([m,nt,rt,St,At,zt,Ut,Ft]),ServerRequestSchema:cm([A,tt,yt,kt,Rt,Bt,Ht,Wt]),ServerNotificationSchema:cm([g,N,Ke,_e,fe,He,Ne,Lt,xt]),ServerResultSchema:cm([m,O,Dt,Me,xe,ae,se,de,ze,Re,zt,Ut,Ft]),CallToolResultWireSchema:tm().superRefine((e,t)=>{if(!(typeof e!=`object`||!e||Array.isArray(e)||e.content!==void 0)){for(let n of kv)if(n in e){t.addIssue({code:`custom`,message:`content is required when the body carries '${n}' — another result family cannot default into an empty tools/call success`});return}}}).transform(fee).pipe(ze)}}var mee;function Av(){return mee??=pee()}function jv(e){return e.type!==`object`}var hee=new Set([`const`,`enum`,`default`,`examples`]),gee=new Set([`properties`,`patternProperties`,`$defs`,`definitions`,`dependentSchemas`]);function _ee(e){let t=typeof e.$schema==`string`?e.$schema:void 0;if(e.$id!==void 0)return{...t!==void 0&&{$schema:t},type:`object`,properties:{result:e},required:[`result`]};let n=(e,t)=>{if(Array.isArray(e))return e.map(e=>n(e,!1));if(typeof e!=`object`||!e||!t&&e.$id!==void 0)return e;let r={};for(let[i,a]of Object.entries(e))t?r[i]=n(a,!1):(i===`$ref`||i===`$dynamicRef`)&&typeof a==`string`?r[i]=a===`#`?`#/properties/result`:a.startsWith(`#/`)?`#/properties/result${a.slice(1)}`:a:hee.has(i)?r[i]=a:gee.has(i)?r[i]=n(a,!0):r[i]=n(a,!1);return r};return{...t!==void 0&&{$schema:t},type:`object`,properties:{result:n(e,!1)},required:[`result`]}}var Mv={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"tasks/get":null,"tasks/result":null,"tasks/list":null,"tasks/cancel":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},Nv={"notifications/cancelled":null,"notifications/progress":null,"notifications/initialized":null,"notifications/roots/list_changed":null,"notifications/tasks/status":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/elicitation/complete":null},vee={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},Pv;function Fv(){if(Pv)return Pv;let e=Av();return Pv={requestSchemas:{ping:e.PingRequestSchema,initialize:e.InitializeRequestSchema,"completion/complete":e.CompleteRequestSchema,"logging/setLevel":e.SetLevelRequestSchema,"prompts/get":e.GetPromptRequestSchema,"prompts/list":e.ListPromptsRequestSchema,"resources/list":e.ListResourcesRequestSchema,"resources/templates/list":e.ListResourceTemplatesRequestSchema,"resources/read":e.ReadResourceRequestSchema,"resources/subscribe":e.SubscribeRequestSchema,"resources/unsubscribe":e.UnsubscribeRequestSchema,"tools/call":e.CallToolRequestSchema,"tools/list":e.ListToolsRequestSchema,"tasks/get":e.GetTaskRequestSchema,"tasks/result":e.GetTaskPayloadRequestSchema,"tasks/list":e.ListTasksRequestSchema,"tasks/cancel":e.CancelTaskRequestSchema,"sampling/createMessage":e.CreateMessageRequestSchema,"elicitation/create":e.ElicitRequestSchema,"roots/list":e.ListRootsRequestSchema},notificationSchemas:{"notifications/cancelled":e.CancelledNotificationSchema,"notifications/progress":e.ProgressNotificationSchema,"notifications/initialized":e.InitializedNotificationSchema,"notifications/roots/list_changed":e.RootsListChangedNotificationSchema,"notifications/tasks/status":e.TaskStatusNotificationSchema,"notifications/message":e.LoggingMessageNotificationSchema,"notifications/resources/updated":e.ResourceUpdatedNotificationSchema,"notifications/resources/list_changed":e.ResourceListChangedNotificationSchema,"notifications/tools/list_changed":e.ToolListChangedNotificationSchema,"notifications/prompts/list_changed":e.PromptListChangedNotificationSchema,"notifications/elicitation/complete":e.ElicitationCompleteNotificationSchema},resultSchemas:{ping:e.EmptyResultSchema,initialize:e.InitializeResultSchema,"completion/complete":e.CompleteResultSchema,"logging/setLevel":e.EmptyResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"resources/subscribe":e.EmptyResultSchema,"resources/unsubscribe":e.EmptyResultSchema,"tools/call":e.CallToolResultWireSchema,"tools/list":e.ListToolsResultSchema,"sampling/createMessage":e.CreateMessageResultWithToolsSchema,"elicitation/create":e.ElicitResultSchema,"roots/list":e.ListRootsResultSchema}},Pv}function Iv(e){return Object.prototype.hasOwnProperty.call(Mv,e)}function Lv(e){return Object.prototype.hasOwnProperty.call(Nv,e)}function yee(e){return Object.prototype.hasOwnProperty.call(vee,e)}function bee(e){return yee(e)?Fv().resultSchemas[e]:void 0}function xee(e){return Iv(e)?Fv().requestSchemas[e]:void 0}function See(e){return Lv(e)?Fv().notificationSchemas[e]:void 0}Object.keys(Mv),Object.keys(Nv);function Rv(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function zv(e,t){if(e===void 0)return{ok:!1,reason:`not-in-era`};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:`invalid`,message:String(n.error)}}var Bv={ok:!1,reason:`not-in-era`};function Vv(e){return Rv(e)&&Rv(e.outputSchema)&&jv(e.outputSchema)}function Hv(e){return e}var Uv={era:`2025-11-25`,hasRequestMethod:Iv,hasNotificationMethod:Lv,validateRequest:(e,t)=>zv(xee(e),t),validateResult:(e,t)=>zv(bee(e),t),validateNotification:(e,t)=>zv(See(e),t),hasInputRequestMethod:()=>!1,validateInputRequest:()=>Bv,validateInputResponse:()=>Bv,samplingResultVariant:((e,t)=>{let n=Av();return zv(e?n.CreateMessageResultWithToolsSchema:n.CreateMessageResultSchema,t)}),outboundEnvelope:e=>void 0,validateEnvelopeMeta:e=>[],projectCallToolResult(e,t){let n=Ov(e),r=n.structuredContent;if(r===void 0)return n;let i=typeof r!=`object`||!r||Array.isArray(r),a=t!==void 0&&jv(t);return!i&&!a?n:{...n,structuredContent:{result:r}}},decodeResult(e,t){if(Rv(t)&&`resultType`in t){let e={...t};return delete e.resultType,{kind:`complete`,result:Hv(e)}}return{kind:`complete`,result:Hv(t)}},encodeResult(e,t){if(e!==`tools/list`)return t;let n=t.tools;return!Array.isArray(n)||!n.some(e=>Vv(e))?t:{...t,tools:n.map(e=>Vv(e)?{...e,outputSchema:_ee(e.outputSchema)}:e)}},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope:e=>void 0};function Wv(){let e=Bm(()=>cm([W(),G(),Xp(),Qp(),mm(W(),e),K(e)])),t=mm(W(),e),n=cm([W(),G().int()]),r=W(),i=cm([W(),G().int()]),a=gm([`user`,`assistant`]),o=gm([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),s=W().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),c=q({ttl:G().optional()}),l=q({taskId:W()}),u=om({progressToken:n.optional(),"io.modelcontextprotocol/related-task":l.optional()}),d=q({_meta:u.optional()}),f=d.extend({task:c.optional()}),p=q({_meta:u.optional()}),m=q({method:W(),params:p.loose().optional()}),h=q({src:W(),mimeType:W().optional(),sizes:K(W()).optional(),theme:gm([`light`,`dark`]).optional()}),g=q({icons:K(h).optional()}),_=q({name:W(),title:W().optional()}),v=_.extend({..._.shape,...g.shape,version:W(),websiteUrl:W().optional(),description:W().optional()}),y=Vm(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,fm(q({form:fm(q({applyDefaults:Xp().optional()}),t).optional(),url:t.optional()}),t.optional())),b=om({list:t.optional(),cancel:t.optional(),requests:om({sampling:om({createMessage:t.optional()}).optional(),elicitation:om({create:t.optional()}).optional()}).optional()}),x=om({list:t.optional(),cancel:t.optional(),requests:om({tools:om({call:t.optional()}).optional()}).optional()}),S=q({experimental:mm(W(),t).optional(),sampling:q({context:t.optional(),tools:t.optional()}).optional(),elicitation:y.optional(),roots:q({listChanged:Xp().optional()}).optional(),tasks:b.optional(),extensions:mm(W(),t).optional()}),C=q({experimental:mm(W(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:q({listChanged:Xp().optional()}).optional(),resources:q({subscribe:Xp().optional(),listChanged:Xp().optional()}).optional(),tools:q({listChanged:Xp().optional()}).optional(),tasks:x.optional(),extensions:mm(W(),t).optional()}),w=q({progress:G(),total:xm(G()),message:xm(W())}),T=q({...p.shape,...w.shape,progressToken:n}),E=m.extend({method:J(`notifications/progress`),params:T}),D=p.extend({level:o,logger:W().optional(),data:tm()}),O=m.extend({method:J(`notifications/message`),params:D}),k=q({uri:W(),mimeType:xm(W()),_meta:mm(W(),tm()).optional()}),A=k.extend({text:W()}),j=k.extend({blob:s}),M=q({audience:K(a).optional(),priority:G().min(0).max(1).optional(),lastModified:ep({offset:!0}).optional()}),N=q({..._.shape,...g.shape,uri:W(),description:xm(W()),mimeType:xm(W()),size:xm(G()),annotations:M.optional(),_meta:xm(om({}))}),P=q({..._.shape,...g.shape,uriTemplate:W(),description:xm(W()),mimeType:xm(W()),annotations:M.optional(),_meta:xm(om({}))}),F=m.extend({method:J(`notifications/resources/list_changed`),params:p.optional()}),I=p.extend({uri:W()}),L=m.extend({method:J(`notifications/resources/updated`),params:I}),ee=q({name:W(),description:xm(W()),required:xm(Xp())}),te=q({..._.shape,...g.shape,description:xm(W()),arguments:xm(K(ee)),_meta:xm(om({}))}),ne=m.extend({method:J(`notifications/prompts/list_changed`),params:p.optional()}),R=q({type:J(`text`),text:W(),annotations:M.optional(),_meta:mm(W(),tm()).optional()}),z=q({type:J(`image`),data:s,mimeType:W(),annotations:M.optional(),_meta:mm(W(),tm()).optional()}),B=q({type:J(`audio`),data:s,mimeType:W(),annotations:M.optional(),_meta:mm(W(),tm()).optional()}),re=q({type:J(`tool_use`),name:W(),id:W(),input:mm(W(),tm()),_meta:mm(W(),tm()).optional()}),ie=q({type:J(`resource`),resource:cm([A,j]),annotations:M.optional(),_meta:mm(W(),tm()).optional()}),ae=N.extend({type:J(`resource_link`)}),oe=cm([R,z,B,ae,ie]),se=q({role:a,content:oe}),ce=q({title:W().optional(),readOnlyHint:Xp().optional(),destructiveHint:Xp().optional(),idempotentHint:Xp().optional(),openWorldHint:Xp().optional()}),le=m.extend({method:J(`notifications/tools/list_changed`),params:p.optional()}),ue=q({name:W().optional()}),de=q({hints:K(ue).optional(),costPriority:G().min(0).max(1).optional(),speedPriority:G().min(0).max(1).optional(),intelligencePriority:G().min(0).max(1).optional()}),fe=q({mode:gm([`auto`,`required`,`none`]).optional()}),pe=q({type:J(`boolean`),title:W().optional(),description:W().optional(),default:Xp().optional()}),me=q({type:J(`string`),title:W().optional(),description:W().optional(),minLength:G().optional(),maxLength:G().optional(),format:gm([`email`,`uri`,`date`,`date-time`]).optional(),default:W().optional()}),V=q({type:gm([`number`,`integer`]),title:W().optional(),description:W().optional(),minimum:G().optional(),maximum:G().optional(),default:G().optional()}),he=q({type:J(`string`),title:W().optional(),description:W().optional(),enum:K(W()),default:W().optional()}),ge=q({type:J(`string`),title:W().optional(),description:W().optional(),oneOf:K(q({const:W(),title:W()})),default:W().optional()}),_e=q({type:J(`string`),title:W().optional(),description:W().optional(),enum:K(W()),enumNames:K(W()).optional(),default:W().optional()}),ve=cm([he,ge]),ye=q({type:J(`array`),title:W().optional(),description:W().optional(),minItems:G().optional(),maxItems:G().optional(),items:q({type:J(`string`),enum:K(W())}),default:K(W()).optional()}),be=q({type:J(`array`),title:W().optional(),description:W().optional(),minItems:G().optional(),maxItems:G().optional(),items:q({anyOf:K(q({const:W(),title:W()}))}),default:K(W()).optional()}),xe=cm([ye,be]),Se=cm([_e,ve,xe]),Ce=cm([Se,pe,me,V]),we=f.extend({mode:J(`form`).optional(),message:W(),requestedSchema:q({type:J(`object`),properties:mm(W(),Ce),required:K(W()).optional()}).catchall(tm())}),Te=q({type:J(`ref/resource`),uri:W()}),Ee=q({type:J(`ref/prompt`),name:W()}),De=q({uri:W().startsWith(`file://`),name:W().optional(),_meta:mm(W(),tm()).optional()}),Oe=S.shape,ke=q({experimental:Oe.experimental,sampling:Oe.sampling,elicitation:Oe.elicitation,roots:Oe.roots,extensions:Oe.extensions}),Ae=C.shape,je=q({experimental:Ae.experimental,logging:Ae.logging,completions:Ae.completions,prompts:Ae.prompts,resources:Ae.resources,tools:Ae.tools,extensions:Ae.extensions}),Me=om({progressToken:n.optional(),[Wm]:W(),[Gm]:v.optional(),[qm]:ke,[Ym]:o.optional()}),Ne=q({..._.shape,...g.shape,description:W().optional(),inputSchema:om({$schema:W().optional(),type:J(`object`)}),outputSchema:om({$schema:W().optional()}).optional(),annotations:ce.optional(),_meta:mm(W(),tm()).optional()}),Pe=q({type:J(`tool_result`),toolUseId:W(),content:K(oe),structuredContent:tm().optional(),isError:Xp().optional(),_meta:mm(W(),tm()).optional()}),Fe=cm([R,z,B,re,Pe]),Ie=q({role:a,content:cm([Fe,K(Fe)]),_meta:mm(W(),tm()).optional()}),Le=W(),Re=om({[Km]:v.optional().catch(void 0)}),ze=Re.optional();function Be(e){return om({_meta:ze,resultType:Le.default(`complete`),...e})}let Ve=Be({}),He=Be({nextCursor:r.optional()}),Ue=Be({content:K(oe),structuredContent:tm().optional(),isError:Xp().optional()}),H=Be({ttlMs:G().int().min(0),cacheScope:gm([`public`,`private`]),tools:K(Ne),nextCursor:r.optional()}),We=Be({ttlMs:G().int().min(0),cacheScope:gm([`public`,`private`]),prompts:K(te),nextCursor:r.optional()}),Ge=Be({description:W().optional(),messages:K(se)}),Ke=Be({ttlMs:G().int().min(0),cacheScope:gm([`public`,`private`]),resources:K(N),nextCursor:r.optional()}),qe=Be({ttlMs:G().int().min(0),cacheScope:gm([`public`,`private`]),resourceTemplates:K(P),nextCursor:r.optional()}),Je=Be({ttlMs:G().int().min(0),cacheScope:gm([`public`,`private`]),contents:K(cm([A,j]))}),Ye=Be({completion:q({values:K(W()).max(100),total:G().int().optional(),hasMore:Xp().optional()}).loose()}),Xe=Be({ttlMs:G().int().min(0),cacheScope:gm([`public`,`private`])}),Ze=Be({ttlMs:G().int().min(0).catch(0),cacheScope:gm([`public`,`private`]).catch(`private`),supportedVersions:K(W()),capabilities:je,instructions:W().optional()}),Qe=q({messages:K(Ie),modelPreferences:de.optional(),systemPrompt:W().optional(),includeContext:gm([`none`,`thisServer`,`allServers`]).optional(),temperature:G().optional(),maxTokens:G().int(),stopSequences:K(W()).optional(),metadata:t.optional(),tools:K(Ne).optional(),toolChoice:fe.optional()}),$e=q({method:J(`sampling/createMessage`),params:Qe}),et=q({method:J(`roots/list`),params:q({_meta:mm(W(),tm()).optional()}).optional()}),tt=q({...Ie.shape,model:W(),stopReason:W().optional()}),nt=q({roots:K(De)}),rt=q({action:gm([`accept`,`decline`,`cancel`]),content:mm(W(),cm([W(),G(),Xp(),K(W())])).optional()}),it=q({mode:J(`url`),message:W(),url:W().url()}),at=cm([we,it]),ot=q({method:J(`elicitation/create`),params:at}),st=cm([$e,et,ot]),ct=cm([tt,nt,rt]),lt=mm(W(),st),ut=mm(W(),ct),dt=Be({inputRequests:lt.optional(),requestState:W().optional()}),ft={inputResponses:ut.optional(),requestState:W().optional()},pt=q({_meta:Me,...ft}),mt=om({progressToken:n.optional()});function ht(e,t){return q({method:J(e),params:q({_meta:Me,...t})})}function gt(e,t){return q({method:J(e),params:q({_meta:mt.optional(),...t}).optional()})}let _t={name:W(),arguments:mm(W(),tm()).optional(),...ft},vt={cursor:r.optional()},yt=ht(`tools/call`,_t),bt=ht(`tools/list`,vt),xt=ht(`prompts/list`,vt),St=ht(`prompts/get`,{name:W(),arguments:mm(W(),W()).optional(),...ft}),Ct=ht(`resources/list`,vt),wt=ht(`resources/templates/list`,vt),Tt=ht(`resources/read`,{uri:W(),...ft}),Et={ref:cm([Ee,Te]),argument:q({name:W(),value:W()}),context:q({arguments:mm(W(),W()).optional()}).optional()},Dt=ht(`completion/complete`,Et),Ot=ht(`server/discover`,{}),kt=q({toolsListChanged:Xp().optional(),promptsListChanged:Xp().optional(),resourcesListChanged:Xp().optional(),resourceSubscriptions:K(W()).optional()}),At={notifications:kt},jt=ht(`subscriptions/listen`,At),Mt=Re.extend({"io.modelcontextprotocol/subscriptionId":i}),Nt=om({_meta:Mt,resultType:Le.default(`complete`)}),Pt={"tools/call":gt(`tools/call`,_t),"tools/list":gt(`tools/list`,vt),"prompts/get":gt(`prompts/get`,{name:W(),arguments:mm(W(),W()).optional()}),"prompts/list":gt(`prompts/list`,vt),"resources/list":gt(`resources/list`,vt),"resources/templates/list":gt(`resources/templates/list`,vt),"resources/read":gt(`resources/read`,{uri:W()}),"completion/complete":gt(`completion/complete`,Et),"server/discover":gt(`server/discover`,{}),"subscriptions/listen":gt(`subscriptions/listen`,At)};function Ft(e){return om({_meta:ze,...e})}let It={"tools/call":Ft({content:K(oe),structuredContent:tm().optional(),isError:Xp().optional()}),"tools/list":Ft({ttlMs:G().int().min(0),cacheScope:gm([`public`,`private`]),tools:K(Ne),nextCursor:r.optional()}),"prompts/get":Ft({description:W().optional(),messages:K(se)}),"prompts/list":Ft({ttlMs:G().int().min(0),cacheScope:gm([`public`,`private`]),prompts:K(te),nextCursor:r.optional()}),"resources/list":Ft({ttlMs:G().int().min(0),cacheScope:gm([`public`,`private`]),resources:K(N),nextCursor:r.optional()}),"resources/templates/list":Ft({ttlMs:G().int().min(0),cacheScope:gm([`public`,`private`]),resourceTemplates:K(P),nextCursor:r.optional()}),"resources/read":Ft({ttlMs:G().int().min(0),cacheScope:gm([`public`,`private`]),contents:K(cm([A,j]))}),"completion/complete":Ft({completion:q({values:K(W()).max(100),total:G().int().optional(),hasMore:Xp().optional()}).loose()}),"server/discover":Ft({ttlMs:G().int().min(0).catch(0),cacheScope:gm([`public`,`private`]).catch(`private`),supportedVersions:K(W()),capabilities:je,instructions:W().optional()}),"subscriptions/listen":Ft({})},Lt=om({"io.modelcontextprotocol/subscriptionId":i.optional()}),Rt=q({method:J(`notifications/subscriptions/acknowledged`),params:q({_meta:Lt.optional(),notifications:kt})}),zt=q({_meta:Lt.optional(),requestId:i,reason:W().optional()}),Bt=q({method:J(`notifications/cancelled`),params:zt}),Vt={"notifications/cancelled":Bt,"notifications/progress":E,"notifications/message":O,"notifications/resources/updated":L,"notifications/resources/list_changed":F,"notifications/tools/list_changed":le,"notifications/prompts/list_changed":ne,"notifications/subscriptions/acknowledged":Rt},Ht=e=>q({jsonrpc:J(`2.0`),id:cm([W(),G().int()]),result:e}).strict();return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:r,RequestIdSchema:i,RoleSchema:a,LoggingLevelSchema:o,TaskMetadataSchema:c,RelatedTaskMetadataSchema:l,RequestMetaSchema:u,BaseRequestParamsSchema:d,TaskAugmentedRequestParamsSchema:f,NotificationsParamsSchema:p,NotificationSchema:m,IconSchema:h,IconsSchema:g,BaseMetadataSchema:_,ImplementationSchema:v,ClientTasksCapabilitySchema:b,ServerTasksCapabilitySchema:x,ClientCapabilitiesSchema:S,ServerCapabilitiesSchema:C,ProgressSchema:w,ProgressNotificationParamsSchema:T,ProgressNotificationSchema:E,LoggingMessageNotificationParamsSchema:D,LoggingMessageNotificationSchema:O,ResourceContentsSchema:k,TextResourceContentsSchema:A,BlobResourceContentsSchema:j,AnnotationsSchema:M,ResourceSchema:N,ResourceTemplateSchema:P,ResourceListChangedNotificationSchema:F,ResourceUpdatedNotificationParamsSchema:I,ResourceUpdatedNotificationSchema:L,PromptArgumentSchema:ee,PromptSchema:te,PromptListChangedNotificationSchema:ne,TextContentSchema:R,ImageContentSchema:z,AudioContentSchema:B,ToolUseContentSchema:re,EmbeddedResourceSchema:ie,ResourceLinkSchema:ae,ContentBlockSchema:oe,PromptMessageSchema:se,ToolAnnotationsSchema:ce,ToolListChangedNotificationSchema:le,ModelHintSchema:ue,ModelPreferencesSchema:de,ToolChoiceSchema:fe,BooleanSchemaSchema:pe,StringSchemaSchema:me,NumberSchemaSchema:V,UntitledSingleSelectEnumSchemaSchema:he,TitledSingleSelectEnumSchemaSchema:ge,LegacyTitledEnumSchemaSchema:_e,SingleSelectEnumSchemaSchema:ve,UntitledMultiSelectEnumSchemaSchema:ye,TitledMultiSelectEnumSchemaSchema:be,MultiSelectEnumSchemaSchema:xe,EnumSchemaSchema:Se,PrimitiveSchemaDefinitionSchema:Ce,ElicitRequestFormParamsSchema:we,ResourceTemplateReferenceSchema:Te,PromptReferenceSchema:Ee,RootSchema:De,ClientCapabilities2026Schema:ke,ServerCapabilities2026Schema:je,RequestMetaEnvelopeSchema:Me,ToolSchema:Ne,ToolResultContentSchema:Pe,SamplingMessageContentBlockSchema:Fe,SamplingMessageSchema:Ie,ResultTypeSchema:Le,ResultMetaSchema:Re,ResultSchema:Ve,PaginatedResultSchema:He,CallToolResultSchema:Ue,ListToolsResultSchema:H,ListPromptsResultSchema:We,GetPromptResultSchema:Ge,ListResourcesResultSchema:Ke,ListResourceTemplatesResultSchema:qe,ReadResourceResultSchema:Je,CompleteResultSchema:Ye,CacheableResultSchema:Xe,DiscoverResultSchema:Ze,CreateMessageRequestParamsSchema:Qe,CreateMessageRequestSchema:$e,ListRootsRequestSchema:et,CreateMessageResultSchema:tt,ListRootsResultSchema:nt,ElicitResultSchema:rt,ElicitRequestURLParamsSchema:it,ElicitRequestParamsSchema:at,ElicitRequestSchema:ot,InputRequestSchema:st,InputResponseSchema:ct,InputRequestsSchema:lt,InputResponsesSchema:ut,InputRequiredResultSchema:dt,InputResponseRequestParamsSchema:pt,CallToolRequestSchema:yt,ListToolsRequestSchema:bt,ListPromptsRequestSchema:xt,GetPromptRequestSchema:St,ListResourcesRequestSchema:Ct,ListResourceTemplatesRequestSchema:wt,ReadResourceRequestSchema:Tt,CompleteRequestSchema:Dt,DiscoverRequestSchema:Ot,SubscriptionFilterSchema:kt,SubscriptionsListenRequestSchema:jt,SubscriptionsListenResultMetaSchema:Mt,SubscriptionsListenResultSchema:Nt,dispatchRequestSchemas:Pt,dispatchResultSchemas:It,NotificationMetaSchema:Lt,SubscriptionsAcknowledgedNotificationSchema:Rt,CancelledNotificationParamsSchema:zt,CancelledNotificationSchema:Bt,notificationSchemas2026:Vt,JSONRPCResultResponseSchema:Ht(Ve),CallToolResultResponseSchema:Ht(cm([Ue,dt])),ListToolsResultResponseSchema:Ht(H),ListPromptsResultResponseSchema:Ht(We),GetPromptResultResponseSchema:Ht(cm([Ge,dt])),ListResourcesResultResponseSchema:Ht(Ke),ListResourceTemplatesResultResponseSchema:Ht(qe),ReadResourceResultResponseSchema:Ht(cm([Je,dt])),CompleteResultResponseSchema:Ht(Ye),DiscoverResultResponseSchema:Ht(Ze)}}var Gv;function Kv(){return Gv??=Wv()}var qv=[`tools/list`,`prompts/list`,`resources/list`,`resources/templates/list`,`resources/read`,`server/discover`];function Jv(e){return qv.includes(e)}var Yv=Symbol(`modelcontextprotocol.resultCacheHintFallback`);function Xv(e){return e[Yv]}function Zv(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=0}function Qv(e){return e===`public`||e===`private`}var $v=function(e){return 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.ResourceNotFound=-32002]=`ResourceNotFound`,e[e.MissingRequiredClientCapability=-32021]=`MissingRequiredClientCapability`,e[e.UnsupportedProtocolVersion=-32022]=`UnsupportedProtocolVersion`,e[e.UrlElicitationRequired=-32042]=`UrlElicitationRequired`,e}({}),ey=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.ProtocolError`})}static[Symbol.hasInstance](e){return hv(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return hv(this,e)}constructor(e,t,n){super(t),this.code=e,this.data=n,this.name=`ProtocolError`,mv(this,new.target)}static fromError(t,n,r){if(t===$v.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new ny(e.elicitations,n)}if(t===$v.UnsupportedProtocolVersion&&r){let e=r;if(Array.isArray(e.supported)&&typeof e.requested==`string`)return new ry({supported:e.supported,requested:e.requested},n)}if(t===$v.InvalidParams||t===$v.ResourceNotFound){let e=r;if(typeof e?.uri==`string`&&(t===$v.ResourceNotFound||Object.keys(e).length===1))return new ty(e.uri,n)}if(t===$v.MissingRequiredClientCapability&&r){let e=r;if(e.requiredCapabilities!==null&&typeof e.requiredCapabilities==`object`&&!Array.isArray(e.requiredCapabilities))return new iy({requiredCapabilities:e.requiredCapabilities},n)}return new e(t,n,r)}},ty=class extends ey{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.ResourceNotFoundError`})}constructor(e,t=`Resource not found: ${e}`){super($v.InvalidParams,t,{uri:e})}get uri(){return this.data.uri}},ny=class extends ey{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UrlElicitationRequiredError`})}constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super($v.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}},ry=class extends ey{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UnsupportedProtocolVersionError`})}constructor(e,t=`Unsupported protocol version: ${e.requested}`){super($v.UnsupportedProtocolVersion,t,e)}get supported(){return this.data.supported}get requested(){return this.data.requested}},iy=class extends ey{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.MissingRequiredClientCapabilityError`})}constructor(e,t=`Missing required client capabilities: ${Object.keys(e.requiredCapabilities).join(`, `)}`){super($v.MissingRequiredClientCapability,t,e)}get requiredCapabilities(){return this.data.requiredCapabilities}},ay=0,oy=`private`,sy=[`tools/call`,`prompts/get`,`resources/read`];function cy(e,t){let n=t.resultType;if(n===void 0)return{...t,resultType:`complete`};if(n===`complete`||sy.includes(e))return t;throw new ey($v.InternalError,`Handler for ${e} returned resultType '${String(n)}', but results of ${e} only support 'complete' on protocol revision 2026-07-28`)}function ly(e,t){let n=Xv(t);if(t.resultType!==`complete`||!Jv(e))return n===void 0?t:my(t);let r=t,i=Zv(r.ttlMs)?r.ttlMs:fy(n),a=Qv(r.cacheScope)?r.cacheScope:py(n),o={...r,ttlMs:i,cacheScope:a};return delete o[Yv],o}function uy(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function dy(e,t){if(t===void 0)return e;let n=e._meta;return n===void 0?{...e,_meta:{[Km]:t}}:!uy(n)||n[`io.modelcontextprotocol/serverInfo`]!==void 0?e:{...e,_meta:{...n,[Km]:t}}}function fy(e){return e!==void 0&&Zv(e.ttlMs)?e.ttlMs:ay}function py(e){return e!==void 0&&Qv(e.cacheScope)?e.cacheScope:oy}function my(e){let t={...e};return delete t[Yv],t}var hy=[`elicitation/create`,`sampling/createMessage`,`roots/list`],gy;function _y(){if(gy)return gy;let e=Kv();return gy={request:{"elicitation/create":q({method:J(`elicitation/create`),params:e.ElicitRequestParamsSchema}),"sampling/createMessage":q({method:J(`sampling/createMessage`),params:e.CreateMessageRequestParamsSchema}),"roots/list":q({method:J(`roots/list`),params:om({}).optional()})},response:{"elicitation/create":e.ElicitResultSchema,"sampling/createMessage":e.CreateMessageResultSchema,"roots/list":e.ListRootsResultSchema}},gy}function vy(e){return hy.includes(e)}function yy(e){return vy(e)?_y().request[e]:void 0}function by(e){return vy(e)?_y().response[e]:void 0}var xy={"tools/call":null,"tools/list":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"completion/complete":null,"server/discover":null,"subscriptions/listen":null},Sy={"notifications/cancelled":null,"notifications/progress":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/subscriptions/acknowledged":null};function Cy(e){return Object.prototype.hasOwnProperty.call(xy,e)}function wy(e){return Object.prototype.hasOwnProperty.call(Sy,e)}function Ty(e){return Object.prototype.hasOwnProperty.call(xy,e)}function Ey(e){return Cy(e)?Kv().dispatchRequestSchemas[e]:void 0}function Dy(e){return Ty(e)?Kv().dispatchResultSchemas[e]:void 0}function Oy(e){return wy(e)?Kv().notificationSchemas2026[e]:void 0}Object.keys(xy),Object.keys(Sy);function ky(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Ay(e,t){if(e===void 0)return{ok:!1,reason:`not-in-era`};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:`invalid`,message:String(n.error)}}var jy={ok:!1,reason:`not-in-era`},My=[Wm,qm];function Ny(e,t){let n=t,r=!1,i=()=>(r||=(n={...n},!0),n),a=t.tools;e===`tools/list`&&Array.isArray(a)&&a.some(e=>ky(e)&&`execution`in e)&&(i().tools=a.map(e=>{if(!ky(e)||!(`execution`in e))return e;let t={...e};return delete t.execution,t}));let o=t.capabilities;if(ky(o)&&`tasks`in o){let e={...o};delete e.tasks,i().capabilities=e}return n}var Py={era:`2026-07-28`,hasRequestMethod:Cy,hasNotificationMethod:wy,hasInputRequestMethod:e=>yy(e)!==void 0,validateRequest:(e,t)=>Ay(Ey(e),t),validateResult:(e,t)=>Ay(Dy(e),t),validateNotification:(e,t)=>Ay(Oy(e),t),validateInputRequest:(e,t)=>Ay(yy(e),t),validateInputResponse:(e,t)=>Ay(by(e),t),samplingResultVariant:()=>jy,outboundEnvelope(e){return{[Wm]:e.protocolVersion,[Gm]:e.clientInfo,[qm]:e.clientCapabilities,...e.logLevel!==void 0&&{"io.modelcontextprotocol/logLevel":e.logLevel}}},validateEnvelopeMeta(e){let t=[];for(let n of My)n in e||t.push({key:n,problem:`missing`});let n=Kv().RequestMetaEnvelopeSchema.safeParse(e);if(!n.success)for(let e of n.error.issues){let n=e.path.map(String),r=n.length>0?n.join(`.`):`_meta`;n.length===1&&t.some(e=>e.key===r&&e.problem===`missing`)||t.push({key:r,problem:e.message})}return t},projectCallToolResult:e=>Ov(e),inputRequestSchema:yy,decodeResult(e,t){if(!ky(t))return{kind:`invalid`,error:new yv(vv.InvalidResult,`Invalid result for ${e}: not an object`,{method:e})};let n=t.resultType;if(n===void 0)return{kind:`invalid`,error:new yv(vv.InvalidResult,`Invalid result for ${e}: missing required resultType — servers implementing protocol revision 2026-07-28 MUST include it (the absent-means-complete bridge applies only to earlier-revision servers)`,{method:e,violation:`missing-resultType`})};if(typeof n!=`string`)return{kind:`invalid`,error:new yv(vv.InvalidResult,`Invalid result for ${e}: non-string resultType`,{method:e,resultType:n})};if(n===`input_required`){let n=t.inputRequests,r=ky(n)?n:{},i=t.requestState;return Object.keys(r).length===0&&typeof i!=`string`?{kind:`invalid`,error:new yv(vv.InvalidResult,`Invalid result for ${e}: input_required carries neither inputRequests nor requestState (every input_required result must include at least one of the two)`,{method:e,violation:`input-required-missing-both`})}:{kind:`input_required`,inputRequests:r,...typeof i==`string`&&{requestState:i}}}if(n!==`complete`)return{kind:`invalid`,error:new yv(vv.UnsupportedResultType,`Unsupported result type '${n}' for ${e}`,{resultType:n,method:e})};let r=Iy(),i=Object.hasOwn(r,e)?r[e]:void 0;if(i!==void 0){let n=i.safeParse(t);if(!n.success)return{kind:`invalid`,error:new yv(vv.InvalidResult,`Invalid result for ${e}: ${n.error}`,{method:e})}}let a={...t};return delete a.resultType,{kind:`complete`,result:a}},encodeResult(e,t,n){return dy(ly(e,cy(e,Ny(e,t))),n)},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope(e){if(e.envelope===void 0)return`Request is missing the required _meta envelope for protocol revision 2026-07-28 (io.modelcontextprotocol/protocolVersion, io.modelcontextprotocol/clientCapabilities)`;let t=Kv().RequestMetaEnvelopeSchema.safeParse(e.envelope);if(!t.success)return`Invalid _meta envelope for protocol revision 2026-07-28: ${t.error.issues.map(e=>e.message).join(`; `)}`}},Fy;function Iy(){if(Fy)return Fy;let e=Kv();return Fy={"tools/call":e.CallToolResultSchema,"tools/list":e.ListToolsResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"completion/complete":e.CompleteResultSchema,"server/discover":e.DiscoverResultSchema},Fy}var Ly=`2026-07-28`;function Ry(e){return e!==void 0&&Tv(e)?Py:Uv}function zy(e){return e.revision===void 0?e.era===`modern`?Py.era:Uv.era:Ry(e.revision).era}function By(e){return Hy.some(t=>t.hasRequestMethod(e))}function Vy(e){return Hy.some(t=>t.hasNotificationMethod(e))}var Hy=[Uv,Py],Uy=Cs({AnnotationsSchema:()=>Kh,AudioContentSchema:()=>Tg,BaseMetadataSchema:()=>Sh,BaseRequestParamsSchema:()=>ih,BlobResourceContentsSchema:()=>Wh,BooleanSchemaSchema:()=>a_,CallToolRequestParamsSchema:()=>zg,CallToolRequestSchema:()=>Bg,CallToolResultSchema:()=>Rg,CancelTaskRequestSchema:()=>G_,CancelTaskResultSchema:()=>K_,CancelledNotificationParamsSchema:()=>vh,CancelledNotificationSchema:()=>yh,ClientCapabilitiesSchema:()=>Eh,ClientNotificationSchema:()=>J_,ClientRequestSchema:()=>q_,ClientResultSchema:()=>Y_,ClientTasksCapabilitySchema:()=>wh,CompatibilityCallToolResultSchema:()=>dee,CompleteRequestParamsSchema:()=>E_,CompleteRequestSchema:()=>D_,CompleteResultSchema:()=>O_,ContentBlockSchema:()=>kg,CreateMessageRequestParamsSchema:()=>t_,CreateMessageRequestSchema:()=>n_,CreateMessageResultSchema:()=>r_,CreateMessageResultWithToolsSchema:()=>i_,CreateTaskResultSchema:()=>I_,CursorSchema:()=>eh,DiscoverRequestSchema:()=>Mh,DiscoverResultSchema:()=>Nh,ElicitRequestFormParamsSchema:()=>__,ElicitRequestParamsSchema:()=>y_,ElicitRequestSchema:()=>b_,ElicitRequestURLParamsSchema:()=>v_,ElicitResultSchema:()=>C_,ElicitationCompleteNotificationParamsSchema:()=>x_,ElicitationCompleteNotificationSchema:()=>S_,EmbeddedResourceSchema:()=>Dg,EmptyResultSchema:()=>_h,EnumSchemaSchema:()=>h_,GetPromptRequestParamsSchema:()=>xg,GetPromptRequestSchema:()=>Sg,GetPromptResultSchema:()=>jg,GetTaskPayloadRequestSchema:()=>V_,GetTaskPayloadResultSchema:()=>H_,GetTaskRequestSchema:()=>z_,GetTaskResultSchema:()=>B_,IconSchema:()=>bh,IconsSchema:()=>xh,ImageContentSchema:()=>wg,ImplementationSchema:()=>Ch,InitializeRequestParamsSchema:()=>Dh,InitializeRequestSchema:()=>Oh,InitializeResultSchema:()=>Ah,InitializedNotificationSchema:()=>jh,JSONArraySchema:()=>Qm,JSONObjectSchema:()=>Zm,JSONRPCErrorResponseSchema:()=>hh,JSONRPCMessageSchema:()=>gh,JSONRPCNotificationSchema:()=>ph,JSONRPCRequestSchema:()=>fh,JSONRPCResponseSchema:()=>lee,JSONRPCResultResponseSchema:()=>mh,JSONValueSchema:()=>Xm,LegacyTitledEnumSchemaSchema:()=>u_,ListChangedOptionsBaseSchema:()=>Hg,ListPromptsRequestSchema:()=>yg,ListPromptsResultSchema:()=>bg,ListResourceTemplatesRequestSchema:()=>Zh,ListResourceTemplatesResultSchema:()=>Qh,ListResourcesRequestSchema:()=>Yh,ListResourcesResultSchema:()=>Xh,ListRootsRequestSchema:()=>A_,ListRootsResultSchema:()=>j_,ListTasksRequestSchema:()=>U_,ListTasksResultSchema:()=>W_,ListToolsRequestSchema:()=>Ig,ListToolsResultSchema:()=>Lg,LoggingLevelSchema:()=>Ug,LoggingMessageNotificationParamsSchema:()=>Kg,LoggingMessageNotificationSchema:()=>qg,ModelHintSchema:()=>Jg,ModelPreferencesSchema:()=>Yg,MultiSelectEnumSchemaSchema:()=>m_,NotificationSchema:()=>ch,NotificationsParamsSchema:()=>sh,NumberSchemaSchema:()=>s_,PaginatedRequestParamsSchema:()=>Rh,PaginatedRequestSchema:()=>zh,PaginatedResultSchema:()=>Bh,PingRequestSchema:()=>Ph,PrimitiveSchemaDefinitionSchema:()=>g_,ProgressNotificationParamsSchema:()=>Ih,ProgressNotificationSchema:()=>Lh,ProgressSchema:()=>Fh,ProgressTokenSchema:()=>$m,PromptArgumentSchema:()=>_g,PromptListChangedNotificationSchema:()=>Mg,PromptMessageSchema:()=>Ag,PromptReferenceSchema:()=>T_,PromptSchema:()=>vg,ReadResourceRequestParamsSchema:()=>eg,ReadResourceRequestSchema:()=>tg,ReadResourceResultSchema:()=>ng,RelatedTaskMetadataSchema:()=>nh,RequestIdSchema:()=>dh,RequestMetaSchema:()=>rh,RequestSchema:()=>oh,ResourceContentsSchema:()=>Vh,ResourceLinkSchema:()=>Og,ResourceListChangedNotificationSchema:()=>rg,ResourceRequestParamsSchema:()=>$h,ResourceSchema:()=>qh,ResourceTemplateReferenceSchema:()=>w_,ResourceTemplateSchema:()=>Jh,ResourceUpdatedNotificationParamsSchema:()=>hg,ResourceUpdatedNotificationSchema:()=>gg,ResultMetaObjectSchema:()=>lh,ResultSchema:()=>uh,RoleSchema:()=>Gh,RootSchema:()=>k_,RootsListChangedNotificationSchema:()=>M_,SamplingContentSchema:()=>Qg,SamplingMessageContentBlockSchema:()=>$g,SamplingMessageSchema:()=>e_,ServerCapabilitiesSchema:()=>kh,ServerNotificationSchema:()=>Z_,ServerRequestSchema:()=>X_,ServerResultSchema:()=>Q_,ServerTasksCapabilitySchema:()=>Th,SetLevelRequestParamsSchema:()=>Wg,SetLevelRequestSchema:()=>Gg,SingleSelectEnumSchemaSchema:()=>d_,StringSchemaSchema:()=>o_,SubscribeRequestParamsSchema:()=>ig,SubscribeRequestSchema:()=>ag,SubscriptionFilterSchema:()=>cg,SubscriptionsAcknowledgedNotificationParamsSchema:()=>dg,SubscriptionsAcknowledgedNotificationSchema:()=>fg,SubscriptionsListenRequestParamsSchema:()=>lg,SubscriptionsListenRequestSchema:()=>ug,SubscriptionsListenResultMetaSchema:()=>pg,SubscriptionsListenResultSchema:()=>mg,TaskAugmentedRequestParamsSchema:()=>ah,TaskCreationParamsSchema:()=>N_,TaskMetadataSchema:()=>th,TaskSchema:()=>F_,TaskStatusNotificationParamsSchema:()=>L_,TaskStatusNotificationSchema:()=>R_,TaskStatusSchema:()=>P_,TextContentSchema:()=>Cg,TextResourceContentsSchema:()=>Hh,TitledMultiSelectEnumSchemaSchema:()=>p_,TitledSingleSelectEnumSchemaSchema:()=>l_,ToolAnnotationsSchema:()=>Ng,ToolChoiceSchema:()=>Xg,ToolExecutionSchema:()=>Pg,ToolListChangedNotificationSchema:()=>Vg,ToolResultContentSchema:()=>Zg,ToolSchema:()=>Fg,ToolUseContentSchema:()=>Eg,UnsubscribeRequestParamsSchema:()=>og,UnsubscribeRequestSchema:()=>sg,UntitledMultiSelectEnumSchemaSchema:()=>f_,UntitledSingleSelectEnumSchemaSchema:()=>c_}),Wy=e=>fh.safeParse(e).success,Gy=e=>ph.safeParse(e).success,Ky=e=>mh.safeParse(e).success,qy=e=>hh.safeParse(e).success,Jy=e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&e.resultType===`input_required`,Yy=e=>Oh.safeParse(e).success,Xy=e=>jh.safeParse(e).success,Zy=`Mcp-Param-`,Qy=`x-mcp-header`,$y=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,eb=new Set([`string`,`integer`,`boolean`,`number`]);function tb(e){let t=[],n=new Map,r=(e,i,a)=>{if(typeof e!=`object`||!e)return;let o=e;if(Qy in o){if(!a||i.length===0)return`${ib(i)}: x-mcp-header is only permitted on properties statically reachable via a chain of 'properties' keys (not under items, additionalProperties, oneOf/anyOf/allOf/not, if/then/else, or $ref)`;let e=o[Qy];if(typeof e!=`string`||e.length===0)return`${ib(i)}: x-mcp-header MUST be a non-empty string`;if(!$y.test(e))return`${ib(i)}: x-mcp-header '${e}' is not a valid RFC 9110 token (no spaces, control characters or HTTP delimiters)`;let r=typeof o.type==`string`?o.type:void 0;if(r===void 0||!eb.has(r))return`${ib(i)}: x-mcp-header is only permitted on primitive-typed properties (string, integer, boolean); got ${r??`<none>`}`;let s=e.toLowerCase(),c=n.get(s);if(c!==void 0)return`x-mcp-header '${e}' is not case-insensitively unique (also declared as '${c}')`;n.set(s,e),t.push({path:i,headerName:e,type:r})}let s=o.properties;if(typeof s==`object`&&s)for(let[e,t]of Object.entries(s)){let n=r(t,[...i,e],a);if(n!==void 0)return n}for(let e of nb){let t=o[e];if(t===void 0)continue;let n=Array.isArray(t)?t:typeof t==`object`&&t&&rb.has(e)?Object.values(t):[t];for(let t of n){let n=r(t,[...i,`<${e}>`],!1);if(n!==void 0)return n}}},i=r(e,[],!0);return i===void 0?{valid:!0,declarations:t}:{valid:!1,reason:i}}var nb=[`items`,`prefixItems`,`contains`,`additionalProperties`,`unevaluatedProperties`,`unevaluatedItems`,`propertyNames`,`patternProperties`,`dependentSchemas`,`oneOf`,`anyOf`,`allOf`,`not`,`if`,`then`,`else`,`$defs`,`definitions`],rb=new Set([`patternProperties`,`dependentSchemas`,`$defs`,`definitions`]);function ib(e){return e.length===0?`<root>`:e.join(`.`)}var ab=`=?base64?`,ob=`?=`;function sb(e){if(typeof e==`string`)return e;if(typeof e==`boolean`)return e?`true`:`false`;if(typeof e==`number`)return!Number.isFinite(e)||Number.isInteger(e)&&!Number.isSafeInteger(e)?void 0:String(e)}function cb(e){if(e.length===0||e.startsWith(ab)&&e.endsWith(ob)||e!==e.trim())return!0;for(let t=0;t<e.length;t++){let n=e.codePointAt(t);if(!(n===9||n>=32&&n<=126))return!0}return!1}function lb(e){let t=new TextEncoder().encode(e),n=``;for(let e of t)n+=String.fromCodePoint(e);return btoa(n)}function ub(e){return cb(e)?`${ab}${lb(e)}${ob}`:e}function db(e,t){let n=e;for(let e of t){if(typeof n!=`object`||!n)return;n=n[e]}return n}function fb(e,t){let n={};for(let r of e){let e=db(t,r.path);if(e==null)continue;let i=sb(e);i!==void 0&&(n[`${Zy}${r.headerName}`]=ub(i))}return n}$v.InvalidRequest,$v.UnsupportedProtocolVersion,$v.InvalidParams,$v.MethodNotFound,$v.InvalidParams,$v.MissingRequiredClientCapability,$v.ParseError,$v.InvalidRequest,$v.MethodNotFound,$v.UnsupportedProtocolVersion,$v.MissingRequiredClientCapability;function pb(e,t){return up(e,t)}function mb(e){return new Set(e.flatMap(e=>Object.keys(e.shape)))}function hb(e){if(e==null)return!1;let t=typeof e;return t!==`object`&&t!==`function`||!(`~standard`in e)?!1:typeof e[`~standard`]?.validate==`function`}var gb=!1,_b=`draft-2020-12`;function vb(e,t=`input`){let n=e[`~standard`],r;if(n.jsonSchema)r=n.jsonSchema[t]({target:_b});else if(n.vendor===`zod`){if(!(`_zod`in e))throw Error(`Schema appears to be from zod 3, which the SDK cannot convert to JSON Schema. Upgrade to zod >=4.2.0, or wrap your JSON Schema with fromJsonSchema().`);gb||(gb=!0,console.warn("[mcp-sdk] Your zod version does not implement `~standard.jsonSchema` (added in zod 4.2.0). Falling back to z.toJSONSchema(). Upgrade to zod >=4.2.0 to silence this warning.")),r=Qf(e,{target:_b,io:t})}else throw Error(`Schema library "${n.vendor}" does not implement StandardJSONSchemaV1 (\`~standard.jsonSchema\`). Upgrade to a version that does, or wrap your JSON Schema with fromJsonSchema().`);if(t===`output`)return r.type===void 0&&yb(r)?{type:`object`,...r}:r;if(r.type!==void 0&&r.type!==`object`)throw Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(r.type)}). Wrap your schema in z.object({...}) or equivalent.`);return{type:`object`,...r}}function yb(e){if(`properties`in e||`patternProperties`in e||`additionalProperties`in e||`required`in e)return!0;for(let t of[`oneOf`,`anyOf`,`allOf`]){let n=e[t];if(Array.isArray(n)&&n.length>0)return n.every(e=>typeof e==`object`&&!!e&&(e.type===`object`||yb(e)))}return!1}function bb(e){return e.path?.length?`${e.path.map(e=>String(typeof e==`object`?e.key:e)).join(`.`)}: ${e.message}`:e.message}async function xb(e,t){let n=await e[`~standard`].validate(t);return n.issues&&n.issues.length>0?{success:!1,error:n.issues.map(e=>bb(e)).join(`, `)}:{success:!0,data:n.value}}function Sb(e){let t=Qf(e,{target:_b,io:`input`});return typeof t.pattern==`string`?t.pattern:void 0}var Cb=/\\\.\\d\{(\d+)\}/;function wb(e){let t=Cb.exec(e),n=[void 0,-1,0];return t&&n.push(Number(t[1])),[!1,!0].flatMap(e=>[!1,!0].flatMap(t=>n.map(n=>ep({local:e,offset:t,precision:n}))))}function Tb(e,t){let n;switch(e){case`email`:n=[Dp()];break;case`uri`:n=[jp()];break;case`date`:n=[np()];break;case`date-time`:n=wb(t);break}return new Set(n.map(e=>Sb(e)).filter(e=>e!==void 0))}function Eb(e,t,n){return n!==`zod`||Tb(e,t).has(t)}function Db(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Ob(e){try{return vb(e,`input`)}catch(e){let t=e instanceof Error?e.message:String(e);throw new ey($v.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${t}`)}}var kb=new Set([`$comment`,`deprecated`,`description`,`examples`,`readOnly`,`title`,`writeOnly`]);function Ab(e){return kb.has(e)||e.startsWith(`x-`)}var Cee=new Set([`$schema`,...Object.keys(__.shape.requestedSchema.shape)]),jb={string:mb([o_,c_,l_,u_]),number:mb([s_]),integer:mb([s_]),boolean:mb([a_]),array:mb([f_,p_])},wee=new Set(o_.shape.format.unwrap().options);function Tee(e,t,n,r){if(!Db(e))return e;let i=typeof e.type==`string`&&Object.hasOwn(jb,e.type)?jb[e.type]:void 0;if(i===void 0)return e;let a={};for(let[o,s]of Object.entries(e))i.has(o)||Ab(o)?a[o]=s:o===`pattern`&&e.type===`string`&&typeof e.format==`string`?wee.has(e.format)?(typeof s!=`string`||!Eb(e.format,s,n))&&r.push(`${t}.${o}`):a[o]=s:r.push(`${t}.${o}`);return a}function Eee(e,t){let n={},r=[];for(let[i,a]of Object.entries(e))i===`properties`&&Db(a)?n[i]=Object.fromEntries(Object.entries(a).map(([e,n])=>[e,Tee(n,`properties.${e}`,t,r)])):Cee.has(i)?n[i]=a:Ab(i)||r.push(i);if(r.length>0)throw new ey($v.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${r.join(`, `)}`);return n}function Dee(e,t){if(!Db(e.properties))return t;let n=Object.entries(e.properties).filter(([,e])=>!pb(g_,e).success).map(([e])=>`properties.${e}`);return n.length>0?n.join(`, `):t}function Mb(e,t,n=``){return Array.isArray(e)&&Array.isArray(t)?e.flatMap((e,r)=>Mb(e,t[r],`${n}[${r}]`)):!Db(e)||!Db(t)?[]:Object.entries(e).flatMap(([e,r])=>{let i=n?`${n}.${e}`:e;return Object.prototype.hasOwnProperty.call(t,e)?Mb(r,t[e],i):Ab(e)?[]:[i]})}function Oee(e){if(!hb(e.requestedSchema))return{...e,mode:`form`,requestedSchema:e.requestedSchema};let t=e.requestedSchema[`~standard`].vendor,n=Eee(Ob(e.requestedSchema),t),r=pb(__.shape.requestedSchema,n);if(!r.success)throw new ey($v.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${Dee(n,r.error.message)}`);let i=Mb(n,r.data);if(i.length>0)throw new ey($v.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${i.join(`, `)}`);let a=(r.data.required??[]).filter(e=>!Object.prototype.hasOwnProperty.call(r.data.properties,e));if(a.length>0)throw new ey($v.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${a.join(`, `)}`);return{...e,mode:`form`,requestedSchema:r.data}}function kee(e){let t=e.inputRequests!==void 0&&Object.keys(e.inputRequests).length>0,n=typeof e.requestState==`string`;if(!t&&!n)throw TypeError(`inputRequired() requires at least one of inputRequests (with at least one entry) or requestState (spec: every InputRequiredResult MUST include at least one of the two)`);return{resultType:`input_required`,...e.inputRequests!==void 0&&{inputRequests:e.inputRequests},...e.requestState!==void 0&&{requestState:e.requestState}}}Object.assign(kee,{elicit(e){try{return{method:`elicitation/create`,params:Oee(e)}}catch(e){throw e instanceof ey?TypeError(e.message,{cause:e}):e}},elicitUrl(e){return{method:`elicitation/create`,params:{...e,mode:`url`}}},createMessage(e){return{method:`sampling/createMessage`,params:e}},listRoots(){return{method:`roots/list`}}});var Aee=!0,jee=10,Mee=250;function Nee(e){return{autoFulfill:e?.autoFulfill??Aee,maxRounds:e?.maxRounds??jee}}function Pee(e,t,n){let r=t!==void 0&&Object.keys(t).length>0;return!r&&n===void 0?e:{...e,...r&&{inputResponses:t},...n!==void 0&&{requestState:n}}}function Fee(e,t){return`Multi-round-trip request '${e}' still required input after ${t} rounds (inputRequired.maxRounds)`}function Iee(e,t){return new Promise((n,r)=>{if(t?.aborted){r(t.reason instanceof yv?t.reason:new yv(vv.RequestTimeout,String(t.reason)));return}let i=setTimeout(()=>{t?.removeEventListener(`abort`,a),n()},e),a=()=>{clearTimeout(i),r(t?.reason instanceof yv?t.reason:new yv(vv.RequestTimeout,String(t?.reason)))};t?.addEventListener(`abort`,a,{once:!0})})}function Lee(e){let t=new AbortController,n=()=>t.abort(e?.reason);return e?.addEventListener(`abort`,n,{once:!0}),e?.aborted&&t.abort(e.reason),{signal:t.signal,abort:e=>t.abort(e),dispose:()=>e?.removeEventListener(`abort`,n)}}async function Ree(e){let{config:t,method:n,originalParams:r,requestOptions:i,hooks:a,signal:o}=e,s=e.flowStartedAt??Date.now(),c=e.firstPayload,l=0;for(;;){if(l+=1,l>t.maxRounds)throw new yv(vv.InputRequiredRoundsExceeded,Fee(n,t.maxRounds),{rounds:t.maxRounds,lastResult:{inputRequests:c.inputRequests,...c.requestState!==void 0&&{requestState:c.requestState}}});i.onprogress?.({progress:l,message:`Fulfilling input required by '${n}' (round ${l})`});let e=Object.entries(c.inputRequests??{}),u;if(e.length>0){let t=Lee(o);try{let n=await Promise.all(e.map(async([e,n])=>{try{return[e,await a.dispatchInputRequest(e,n,t.signal)]}catch(e){throw t.abort(e),e}}));u=Object.fromEntries(n)}finally{t.dispose()}}else await Iee(Mee,o);let d={...i.timeout!==void 0&&{timeout:i.timeout}};if(i.maxTotalTimeout!==void 0){let e=Date.now()-s,t=i.maxTotalTimeout-e;if(t<=0)throw new yv(vv.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:i.maxTotalTimeout,totalElapsed:e});d.maxTotalTimeout=t}let f=await a.retry(Pee(r,u,c.requestState),d);if(Jy(f)){c={inputRequests:f.inputRequests??{},...f.requestState!==void 0&&{requestState:f.requestState}};continue}return f}}var zee=`AnnotationsSchema.AudioContentSchema.BaseMetadataSchema.BlobResourceContentsSchema.BooleanSchemaSchema.CallToolRequestSchema.CallToolRequestParamsSchema.CallToolResultSchema.CancelledNotificationSchema.CancelledNotificationParamsSchema.CancelTaskRequestSchema.CancelTaskResultSchema.ClientCapabilitiesSchema.ClientNotificationSchema.ClientRequestSchema.ClientResultSchema.CompatibilityCallToolResultSchema.CompleteRequestSchema.CompleteRequestParamsSchema.CompleteResultSchema.ContentBlockSchema.CreateMessageRequestSchema.CreateMessageRequestParamsSchema.CreateMessageResultSchema.CreateMessageResultWithToolsSchema.CreateTaskResultSchema.CursorSchema.DiscoverRequestSchema.DiscoverResultSchema.ElicitationCompleteNotificationSchema.ElicitationCompleteNotificationParamsSchema.ElicitRequestSchema.ElicitRequestFormParamsSchema.ElicitRequestParamsSchema.ElicitRequestURLParamsSchema.ElicitResultSchema.EmbeddedResourceSchema.EmptyResultSchema.EnumSchemaSchema.GetPromptRequestSchema.GetPromptRequestParamsSchema.GetPromptResultSchema.GetTaskPayloadRequestSchema.GetTaskPayloadResultSchema.GetTaskRequestSchema.GetTaskResultSchema.IconSchema.IconsSchema.ImageContentSchema.ImplementationSchema.InitializedNotificationSchema.InitializeRequestSchema.InitializeRequestParamsSchema.InitializeResultSchema.JSONArraySchema.JSONObjectSchema.JSONRPCErrorResponseSchema.JSONRPCMessageSchema.JSONRPCNotificationSchema.JSONRPCRequestSchema.JSONRPCResponseSchema.JSONRPCResultResponseSchema.JSONValueSchema.LegacyTitledEnumSchemaSchema.ListPromptsRequestSchema.ListPromptsResultSchema.ListResourcesRequestSchema.ListResourcesResultSchema.ListResourceTemplatesRequestSchema.ListResourceTemplatesResultSchema.ListRootsRequestSchema.ListRootsResultSchema.ListTasksRequestSchema.ListTasksResultSchema.ListToolsRequestSchema.ListToolsResultSchema.LoggingLevelSchema.LoggingMessageNotificationSchema.LoggingMessageNotificationParamsSchema.ModelHintSchema.ModelPreferencesSchema.MultiSelectEnumSchemaSchema.NotificationSchema.NumberSchemaSchema.PaginatedRequestSchema.PaginatedRequestParamsSchema.PaginatedResultSchema.PingRequestSchema.PrimitiveSchemaDefinitionSchema.ProgressSchema.ProgressNotificationSchema.ProgressNotificationParamsSchema.ProgressTokenSchema.PromptSchema.PromptArgumentSchema.PromptListChangedNotificationSchema.PromptMessageSchema.PromptReferenceSchema.ReadResourceRequestSchema.ReadResourceRequestParamsSchema.ReadResourceResultSchema.RelatedTaskMetadataSchema.RequestSchema.RequestIdSchema.RequestMetaSchema.ResourceSchema.ResourceContentsSchema.ResourceLinkSchema.ResourceListChangedNotificationSchema.ResourceRequestParamsSchema.ResourceTemplateSchema.ResourceTemplateReferenceSchema.ResourceUpdatedNotificationSchema.ResourceUpdatedNotificationParamsSchema.ResultMetaObjectSchema.ResultSchema.RoleSchema.RootSchema.RootsListChangedNotificationSchema.SamplingContentSchema.SamplingMessageSchema.SamplingMessageContentBlockSchema.ServerCapabilitiesSchema.ServerNotificationSchema.ServerRequestSchema.ServerResultSchema.SetLevelRequestSchema.SetLevelRequestParamsSchema.SingleSelectEnumSchemaSchema.StringSchemaSchema.SubscribeRequestSchema.SubscribeRequestParamsSchema.SubscriptionFilterSchema.SubscriptionsAcknowledgedNotificationSchema.SubscriptionsAcknowledgedNotificationParamsSchema.SubscriptionsListenRequestSchema.SubscriptionsListenRequestParamsSchema.SubscriptionsListenResultSchema.SubscriptionsListenResultMetaSchema.TaskAugmentedRequestParamsSchema.TaskCreationParamsSchema.TaskMetadataSchema.TaskSchema.TaskStatusSchema.TaskStatusNotificationSchema.TaskStatusNotificationParamsSchema.TextContentSchema.TextResourceContentsSchema.TitledMultiSelectEnumSchemaSchema.TitledSingleSelectEnumSchemaSchema.ToolSchema.ToolAnnotationsSchema.ToolChoiceSchema.ToolExecutionSchema.ToolListChangedNotificationSchema.ToolResultContentSchema.ToolUseContentSchema.UnsubscribeRequestSchema.UnsubscribeRequestParamsSchema.UntitledMultiSelectEnumSchemaSchema.UntitledSingleSelectEnumSchemaSchema`.split(`.`),Bee={IdJagTokenExchangeResponseSchema:av,OAuthClientInformationFullSchema:uv,OAuthClientInformationSchema:lv,OAuthClientMetadataSchema:cv,OAuthClientRegistrationErrorSchema:dv,OAuthErrorResponseSchema:ov,OAuthMetadataSchema:tv,OAuthProtectedResourceMetadataSchema:ev,OAuthTokenRevocationRequestSchema:fv,OAuthTokensSchema:iv,OpenIdProviderDiscoveryMetadataSchema:rv,OpenIdProviderMetadataSchema:nv},Nb={},Pb={};function Fb(e,t){let n=e.slice(0,-6);Nb[n]=t,Pb[n]=e=>t.safeParse(e).success}for(let e of zee)Fb(e,Uy[e]);for(let[e,t]of Object.entries(Bee))Fb(e,t);Object.freeze(Nb);var Vee=Object.freeze(Pb);function Hee(e){switch(e){case`initialize`:case`notifications/initialized`:return Ry(void 0);case`server/discover`:return Ry(Ly);default:return}}var Uee=[Wm,Gm,qm,Ym],Wee=[`inputResponses`,`requestState`];function Ib(e,t){let n=e.params;if(!zb(n))return{message:e,lifted:{}};let r=n._meta,i=zb(r)?Uee.filter(e=>e in r):[],a=t===`request`?Wee.filter(e=>e in n):[];if(i.length===0&&a.length===0)return{message:e,lifted:{}};let o={},s={...n};if(i.length>0&&zb(r)){let e={},t={...r};for(let n of i)e[n]=r[n],delete t[n];o.envelope=e,Object.keys(t).length>0?s._meta=t:delete s._meta}for(let e of a)e===`inputResponses`&&(o.inputResponses=s[e]),e===`requestState`&&(o.requestState=s[e]),delete s[e];return{message:{...e,params:s},lifted:o}}function Lb(e,t){let n=e.validateResult(t,void 0);if(!(!n.ok&&n.reason===`not-in-era`))return{"~standard":{version:1,vendor:`mcp-wire-codec`,validate(n){let r=e.validateResult(t,n);return r.ok?{value:r.value}:{issues:[{message:r.reason===`invalid`?r.message:`not-in-era: ${t}`}]}}}}}function Rb(e){return()=>e}var Gee=Rb(void 0),Kee=class{_transport;_requestMessageId=0;_requestHandlers=new Map;_requestHandlerAbortControllers=new Map;_notificationHandlers=new Map;_responseHandlers=new Map;_progressHandlers=new Map;_timeoutInfo=new Map;_pendingDebouncedNotifications=new Set;_negotiatedProtocolVersion;_supportedProtocolVersions;onclose;onerror;fallbackRequestHandler;fallbackNotificationHandler;constructor(e){this._options=e,this._supportedProtocolVersions=e?.supportedProtocolVersions??cee,this.setNotificationHandler(`notifications/cancelled`,e=>{this._oncancel(e)}),this.setNotificationHandler(`notifications/progress`,e=>{this._onprogress(e)}),this.setRequestHandler(`ping`,e=>({}))}_shouldDropInbound(e){}_outboundMetaEnvelope(){}_envelopeOutbound(e){let t=this._outboundMetaEnvelope();if(t===void 0)return e;let n=e.params??{};return{...e,params:{...n,_meta:{...t,...n._meta}}}}_resolveNonCompleteResult(e,t){return Promise.reject(new yv(vv.UnsupportedResultType,`Unsupported result type '${e.kind}' for ${t.request.method}`,{resultType:e.kind,method:t.request.method}))}_getRequestHandler(e){return this._requestHandlers.get(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),new yv(vv.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){this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{try{t?.()}finally{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),Ky(e)||qy(e)?this._onresponse(e):Wy(e)?this._onrequest(e,t):Gy(e)?this._onnotification(e,t):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},e.setSupportedProtocolVersions?.(this._supportedProtocolVersions),await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear();for(let e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();let t=this._requestHandlerAbortControllers;this._requestHandlerAbortControllers=new Map;let n=new yv(vv.ConnectionClosed,`Connection closed`);this._transport=void 0;try{this.onclose?.()}finally{for(let t of e.values())t(n);for(let e of t.values())e.abort(n)}}_onerror(e){this.onerror?.(e)}_onnotification(e,t){let{message:n}=Ib(e,`notification`),r=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)===`drop`)return;if(t?.classification!==void 0){let e=zy(t.classification);if(e!==r.era){this._onerror(Error(`Era mismatch on inbound notification '${n.method}': classified as ${e} but this instance serves ${r.era}`));return}}if(Vy(n.method)&&!r.hasNotificationMethod(n.method))return;let i=this._notificationHandlers.get(n.method),a=this.fallbackNotificationHandler;i===void 0&&a===void 0||Promise.resolve().then(()=>i===void 0?a(n):i(n,r)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){let{message:n,lifted:r}=Ib(e,`request`),i=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)===`drop`){this._onerror(Error(`Dropped inbound request '${e.method}': not servable on this connection's protocol era`));return}let a=this._transport,o=(e,t,r)=>{let i={jsonrpc:`2.0`,id:n.id,error:{code:e,message:t,...r!==void 0&&{data:r}}};a?.send(i).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)))};if(t?.classification!==void 0){let e=zy(t.classification);if(e!==i.era){this._onerror(Error(`Era mismatch on inbound request '${n.method}': classified as ${e} but this instance serves ${i.era}`));let r=t.classification.revision??e;o($v.UnsupportedProtocolVersion,`Unsupported protocol version: ${r}`,{supported:this._supportedProtocolVersions,requested:r});return}}if(By(n.method)&&!i.hasRequestMethod(n.method)){o($v.MethodNotFound,`Method not found`);return}let s=this._requestHandlers.get(n.method)??this.fallbackRequestHandler;if(s===void 0){o($v.MethodNotFound,`Method not found`);return}let c=i.checkInboundEnvelope(r);if(c!==void 0){o($v.InvalidParams,c);return}let l=(e,t)=>this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,{...t,relatedRequestId:n.id}),u=(e,t,r)=>this._requestWithSchemaViaCodec(this._resolveOutboundCodec(e.method),e,t,{...r,relatedRequestId:n.id}),d=new AbortController;this._requestHandlerAbortControllers.set(n.id,d);let f=r.inputResponses===void 0?void 0:Jee(r.inputResponses),p={sessionId:a?.sessionId,mcpReq:{id:n.id,method:n.method,_meta:n.params?._meta,...r.envelope!==void 0&&{envelope:r.envelope},...f!==void 0&&{inputResponses:f.accepted},...f!==void 0&&f.droppedKeys.length>0&&{droppedInputResponseKeys:f.droppedKeys},requestState:r.requestState===void 0?Gee:Rb(r.requestState),signal:d.signal,send:((e,t,n)=>{let r=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(r,e.method),hb(t))return u(e,t,n);let i=Lb(r,e.method);if(i===void 0)throw TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to ctx.mcpReq.send().`);return u(e,i,t)}),notify:l},http:t?.authInfo?{authInfo:t.authInfo}:void 0},m=this.buildContext(p,t);Promise.resolve().then(()=>s(n,m)).then(async e=>{if(d.signal.aborted)return;let t;try{t=i.encodeResult(n.method,e,this._outboundServerInfo())}catch(e){this._onerror(Error(`Failed to encode result for ${n.method}: ${e}`)),o($v.InternalError,`Internal error`);return}let r={result:t,jsonrpc:`2.0`,id:n.id};await a?.send(r)},async e=>{if(d.signal.aborted)return;let t=Number.isSafeInteger(e.code)?e.code:$v.InternalError,r={jsonrpc:`2.0`,id:n.id,error:{code:i.encodeErrorCode(t),message:e.message??`Internal error`,...e.data!==void 0&&{data:e.data}}};await a?.send(r)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(n.id)===d&&this._requestHandlerAbortControllers.delete(n.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._responseHandlers.get(t);if(n===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t),this._progressHandlers.delete(t),Ky(e)?n(e):n(ey.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}request(e,t,n){let r=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(r,e.method),hb(t))return this._requestWithSchemaViaCodec(r,e,t,n);let i=Lb(r,e.method);if(i===void 0)throw TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to request().`);return this._requestWithSchemaViaCodec(r,e,i,t)}_negotiatedWireCodec(){return Ry(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(e){if(this._negotiatedProtocolVersion===void 0){let t=Hee(e);if(t)return t}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(e,t){if(By(t)&&!e.hasRequestMethod(t))throw new yv(vv.MethodNotSupportedByProtocolVersion,`Method '${t}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t,era:e.era})}_requestWithSchema(e,t,n){let r=this._resolveOutboundCodec(e.method);return this._assertOutboundRequestInEra(r,e.method),this._requestWithSchemaViaCodec(r,e,t,n)}_requestWithSchemaViaCodec(e,t,n,r){let{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o,headers:s}=r??{},c=Date.now(),l,u;return new Promise((d,f)=>{let p=e=>{f(e)};if(!this._transport){p(Error(`Not connected`));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method)}catch(e){p(e);return}if(r?.signal?.aborted){let e=r.signal.reason;throw e instanceof yv?e:new yv(vv.RequestTimeout,String(e))}let m=e.era===`2026-07-28`&&this._transport.hasPerRequestStream===!0?new AbortController:void 0,h=this._requestMessageId++;u=h;let g={...t,jsonrpc:`2.0`,id:h};r?.onprogress&&(this._progressHandlers.set(h,r.onprogress),g.params={...t.params,_meta:{...t.params?._meta,progressToken:h}});let _=this._envelopeOutbound(g),v=!1,y=e=>{v||(this._progressHandlers.delete(h),m===void 0?this._transport?.send(this._envelopeOutbound({jsonrpc:`2.0`,method:`notifications/cancelled`,params:{requestId:h,reason:String(e)}}),{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))):m.abort(),f(e instanceof yv?e:new yv(vv.RequestTimeout,String(e))))};this._responseHandlers.set(h,i=>{if(r?.signal?.aborted)return;if(v=!0,i instanceof Error)return f(i);let a;try{a=e.decodeResult(t.method,i.result)}catch(e){return f(e instanceof Error?e:Error(String(e)))}if(a.kind===`invalid`)return f(a.error);if(a.kind===`input_required`){if(r?.allowInputRequired===!0)return d($ee(a));let i={codec:e,request:t,resultSchema:n,options:r,flowStartedAt:c,retry:(r,i)=>this._requestWithSchemaViaCodec(e,r===void 0?{method:t.method}:{method:t.method,params:r},n,i)};return d(this._resolveNonCompleteResult(a,i))}let o=a.result;xb(n,o).then(e=>{e.success?d(e.data):f(new yv(vv.InvalidResult,`Invalid result for ${t.method}: ${e.error}`))},f)}),l=()=>y(r?.signal?.reason),r?.signal?.addEventListener(`abort`,l,{once:!0});let b=r?.timeout??6e4;this._setupTimeout(h,b,r?.maxTotalTimeout,()=>y(new yv(vv.RequestTimeout,`Request timed out`,{timeout:b})),r?.resetTimeoutOnProgress??!1),this._transport.send(_,{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o,headers:s,requestSignal:m?.signal}).catch(e=>{this._progressHandlers.delete(h),f(e)})}).finally(()=>{l&&r?.signal?.removeEventListener(`abort`,l),u!==void 0&&(this._responseHandlers.delete(u),this._cleanupTimeout(u))})}async notification(e,t){return this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,t)}async _notificationViaCodec(e,t,n){if(!this._transport)throw new yv(vv.NotConnected,`Not connected`);if(Vy(t.method)&&!e.hasNotificationMethod(t.method))throw new yv(vv.MethodNotSupportedByProtocolVersion,`Notification '${t.method}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t.method,era:e.era});this.assertNotificationCapability(t.method);let r=this._envelopeOutbound({jsonrpc:`2.0`,...t});if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&!n?.relatedRequestId){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{this._pendingDebouncedNotifications.delete(t.method),this._transport&&this._transport?.send(r,n).catch(e=>this._onerror(e))});return}await this._transport.send(r,n)}setRequestHandler(e,t,n){this.assertRequestHandlerCapability(e);let r;if(typeof t==`function`){if(!By(e))throw TypeError(`'${e}' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);r=(n,r)=>{let i=this._negotiatedWireCodec(),a=i.validateRequest(e,n);if(!a.ok&&a.reason===`not-in-era`&&(a=i.validateInputRequest(e,n)),!a.ok)throw a.reason===`not-in-era`?new ey($v.InternalError,`No wire schema for ${e} in the resolved era`):Error(a.message);return Promise.resolve(t(a.value,r))}}else if(n)r=async(r,i)=>{let a=await xb(t.params,{...r.params});if(!a.success)throw new ey($v.InvalidParams,`Invalid params for ${e}: ${a.error}`);return n(a.data,i)};else throw TypeError(`setRequestHandler: handler is required`);this._requestHandlers.set(e,this._wrapHandler(e,r))}_wrapHandler(e,t){return t}_outboundServerInfo(){}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,n){if(typeof t==`function`){if(!Vy(e))throw TypeError(`'${e}' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);this._notificationHandlers.set(e,(n,r)=>{let i=r.validateNotification(e,n);if(!i.ok)throw i.reason===`not-in-era`?new ey($v.InternalError,`No wire schema for ${e} in the resolved era`):Error(i.message);return Promise.resolve(t(i.value))});return}if(!n)throw TypeError(`setNotificationHandler: handler is required`);this._notificationHandlers.set(e,async r=>{let i=await xb(t.params,{...r.params});if(!i.success)throw new ey($v.InvalidParams,`Invalid params for notification ${e}: ${i.error}`);await n(i.data,r)})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}};function zb(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function qee(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];n[r]=zb(a)&&zb(i)?{...a,...i}:i}return n}function Bb(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Jee(e){let t={},n=[];if(!Bb(e))return{accepted:t,droppedKeys:n};for(let[r,i]of Object.entries(e)){if(!Bb(i)||`method`in i||`result`in i){n.push(r);continue}t[r]=i}return{accepted:t,droppedKeys:n}}function Vb(e){throw new yv(vv.SendFailed,`ctx.mcpReq.${e} is not available while fulfilling an embedded input request: the request is fulfilled locally and has no related peer request`)}function Yee(e,t,n,r,i){return{sessionId:i,mcpReq:{id:e,method:t,_meta:n?._meta,requestState:Rb(void 0),signal:r,send:(()=>Vb(`send`)),notify:()=>Vb(`notify`)}}}async function Xee(e,t,n,r,i){if(!Bb(r)||typeof r.method!=`string`)throw new yv(vv.InvalidResult,`Invalid input request '${n}': each inputRequests entry must be an embedded request object with a method`,{key:n});let a=r.method;if(!t.hasInputRequestMethod(a))throw new yv(vv.InvalidResult,`Invalid input request '${n}': '${a}' is not an embedded request the ${t.era} revision defines (expected elicitation/create, sampling/createMessage, or roots/list)`,{key:n,method:a});let o=e.getRequestHandler(a);if(o===void 0)throw new yv(vv.CapabilityNotSupported,`Cannot fulfil input request '${n}': no handler is registered for '${a}' on this client. Declare the corresponding capability and register a handler, or handle input_required results manually.`,{key:n,method:a});let s=Bb(r.params)?r.params:void 0;return await o({jsonrpc:`2.0`,id:n,method:a,...s!==void 0&&{params:s}},e.buildContext(Yee(n,a,s,i,e.sessionId)))}function Zee(e,t){return{...e?.signal!==void 0&&{signal:e.signal},...e?.onprogress!==void 0&&{onprogress:e.onprogress},...e?.resetTimeoutOnProgress!==void 0&&{resetTimeoutOnProgress:e.resetTimeoutOnProgress},...e?.headers!==void 0&&{headers:e.headers},...t.timeout!==void 0&&{timeout:t.timeout},...t.maxTotalTimeout!==void 0&&{maxTotalTimeout:t.maxTotalTimeout},allowInputRequired:!0}}function Qee(e,t,n,r){let{codec:i,request:a,options:o,flowStartedAt:s}=r,c={inputRequests:n.inputRequests,...n.requestState!==void 0&&{requestState:n.requestState}},l={dispatchInputRequest:(t,n,r)=>Xee(e,i,t,n,r),retry:(e,t)=>r.retry(e,Zee(o,t))};return Ree({config:t,method:a.method,originalParams:a.params,firstPayload:c,flowStartedAt:s,signal:o?.signal,requestOptions:{...o?.timeout!==void 0&&{timeout:o.timeout},...o?.maxTotalTimeout!==void 0&&{maxTotalTimeout:o.maxTotalTimeout},...o?.onprogress!==void 0&&{onprogress:o.onprogress}},hooks:l})}function $ee(e){return{resultType:`input_required`,inputRequests:e.inputRequests,...e.requestState!==void 0&&{requestState:e.requestState}}}var ete=Ts(Ss((e=>{var t=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,n=/\\([\u000b\u0020-\u00ff])/g,r=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;e.parse=i;function i(e){if(!e)throw TypeError(`argument string is required`);var i=typeof e==`object`?a(e):e;if(typeof i!=`string`)throw TypeError(`argument string is required to be a string`);var s=i.indexOf(`;`),c=s===-1?i.trim():i.slice(0,s).trim();if(!r.test(c))throw TypeError(`invalid media type`);var l=new o(c.toLowerCase());if(s!==-1){var u,d,f;for(t.lastIndex=s;d=t.exec(i);){if(d.index!==s)throw TypeError(`invalid parameter format`);s+=d[0].length,u=d[1].toLowerCase(),f=d[2],f.charCodeAt(0)===34&&(f=f.slice(1,-1),f.indexOf(`\\`)!==-1&&(f=f.replace(n,`$1`))),l.parameters[u]=f}if(s!==i.length)throw TypeError(`invalid parameter format`)}return l}function a(e){var t;if(typeof e.getHeader==`function`?t=e.getHeader(`content-type`):typeof e.headers==`object`&&(t=e.headers&&e.headers[`content-type`]),typeof t!=`string`)throw TypeError(`content-type header is missing from object`);return t}function o(e){this.parameters=Object.create(null),this.type=e}}))(),1);function tte(e){if(e)try{return ete.parse(e).type}catch{let t=(e.split(`;`,1)[0]??``).trim().toLowerCase();return t===``||e.slice(t.length).includes(`,`)?void 0:t}}function Hb(e){return e?e instanceof Headers?Object.fromEntries(e.entries()):Array.isArray(e)?Object.fromEntries(e):{...e}:{}}function nte(e=fetch,t){return t?async(n,r)=>e(n,{...t,...r,headers:r?.headers?{...Hb(t.headers),...Hb(r.headers)}:t.headers}):e}function Ub(e,t){let n=typeof e;if(n!==typeof t)return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(!Ub(e[r],t[r]))return!1;return!0}if(n===`object`){if(!e||!t)return e===t;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Ub(e[r],t[r]))return!1;return!0}return e===t}function Wb(e){return encodeURI(rte(e))}function rte(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}var ite={prefixItems:!0,items:!0,allOf:!0,anyOf:!0,oneOf:!0},ate={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependentSchemas:!0},ote={id:!0,$id:!0,$ref:!0,$schema:!0,$anchor:!0,$vocabulary:!0,$comment:!0,default:!0,enum:!0,const:!0,required:!0,type:!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},ste=typeof self<`u`&&self.location&&self.location.origin!==`null`?new URL(self.location.origin+self.location.pathname+location.search):new URL(`https://github.com/cfworker`);function Gb(e,t=Object.create(null),n=ste,r=``){if(e&&typeof e==`object`&&!Array.isArray(e)){let i=e.$id||e.id;if(i){let a=new URL(i,n.href);a.hash.length>1?t[a.href]=e:(a.hash=``,r===``?n=a:Gb(e,t,n))}}else if(e!==!0&&e!==!1)return t;let i=n.href+(r?`#`+r:``);if(t[i]!==void 0)throw Error(`Duplicate schema URI "${i}".`);if(t[i]=e,e===!0||e===!1)return t;if(e.__absolute_uri__===void 0&&Object.defineProperty(e,"__absolute_uri__",{enumerable:!1,value:i}),e.$ref&&e.__absolute_ref__===void 0){let t=new URL(e.$ref,n.href);t.hash=t.hash,Object.defineProperty(e,"__absolute_ref__",{enumerable:!1,value:t.href})}if(e.$recursiveRef&&e.__absolute_recursive_ref__===void 0){let t=new URL(e.$recursiveRef,n.href);t.hash=t.hash,Object.defineProperty(e,"__absolute_recursive_ref__",{enumerable:!1,value:t.href})}if(e.$anchor){let r=new URL(`#`+e.$anchor,n.href);t[r.href]=e}for(let i in e){if(ote[i])continue;let a=`${r}/${Wb(i)}`,o=e[i];if(Array.isArray(o)){if(ite[i]){let e=o.length;for(let r=0;r<e;r++)Gb(o[r],t,n,`${a}/${r}`)}}else if(ate[i])for(let e in o)Gb(o[e],t,n,`${a}/${Wb(e)}`);else Gb(o,t,n,a)}return t}var cte=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,lte=[0,31,28,31,30,31,30,31,31,30,31,30,31],ute=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,dte=/^(?=.{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,fte=/^(?:[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,pte=/^(?:(?:[^\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,mte=/^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!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-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,hte=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,gte=/^(?:\/(?:[^~/]|~0|~1)*)*$/,_te=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,vte=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,yte=e=>{if(e[0]===`"`)return!1;let[t,n,...r]=e.split(`@`);return!t||!n||r.length!==0||t.length>64||n.length>253||t[0]===`.`||t.endsWith(`.`)||t.includes(`..`)||!/^[a-z0-9.-]+$/i.test(n)||!/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+$/i.test(t)?!1:n.split(`.`).every(e=>/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(e))},bte=/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,xte=/^((([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,Ste=e=>e.length>1&&e.length<80&&(/^P\d+([.,]\d+)?W$/.test(e)||/^P[\dYMDTHS]*(\d[.,]\d+)?[YMDHS]$/.test(e)&&/^P([.,\d]+Y)?([.,\d]+M)?([.,\d]+D)?(T([.,\d]+H)?([.,\d]+M)?([.,\d]+S)?)?$/.test(e));function Kb(e){return e.test.bind(e)}var qb={date:Jb,time:Yb.bind(void 0,!1),"date-time":Tte,duration:Ste,uri:Ote,"uri-reference":Kb(fte),"uri-template":Kb(pte),url:Kb(mte),email:yte,hostname:Kb(dte),ipv4:Kb(bte),ipv6:Kb(xte),regex:Ate,uuid:Kb(hte),"json-pointer":Kb(gte),"json-pointer-uri-fragment":Kb(_te),"relative-json-pointer":Kb(vte)};function Cte(e){return e%4==0&&(e%100!=0||e%400==0)}function Jb(e){let t=e.match(cte);if(!t)return!1;let n=+t[1],r=+t[2],i=+t[3];return r>=1&&r<=12&&i>=1&&i<=(r==2&&Cte(n)?29:lte[r])}function Yb(e,t){let n=t.match(ute);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)&&(!e||o)}var wte=/t|\s/i;function Tte(e){let t=e.split(wte);return t.length==2&&Jb(t[0])&&Yb(!0,t[1])}var Ete=/\/|:/,Dte=/^(?:[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 Ote(e){return Ete.test(e)&&Dte.test(e)}var kte=/[^\\]\\Z/;function Ate(e){if(kte.test(e))return!1;try{return new RegExp(e,`u`),!0}catch{return!1}}function jte(e){let t=0,n=e.length,r=0,i;for(;r<n;)t++,i=e.charCodeAt(r++),i>=55296&&i<=56319&&r<n&&(i=e.charCodeAt(r),(i&64512)==56320&&r++);return t}function Xb(e,t,n=`2019-09`,r=Gb(t),i=!0,a=null,o=`#`,s=`#`,c=Object.create(null)){if(t===!0)return{valid:!0,errors:[]};if(t===!1)return{valid:!1,errors:[{instanceLocation:o,keyword:`false`,keywordLocation:o,error:`False boolean schema.`}]};let l=typeof e,u;switch(l){case`boolean`:case`number`:case`string`:u=l;break;case`object`:u=e===null?`null`:Array.isArray(e)?`array`:`object`;break;default:throw Error(`Instances of "${l}" type are not supported.`)}let{$ref:d,$recursiveRef:f,$recursiveAnchor:p,type:m,const:h,enum:g,required:_,not:v,anyOf:y,allOf:b,oneOf:x,if:S,then:C,else:w,format:T,properties:E,patternProperties:D,additionalProperties:O,unevaluatedProperties:k,minProperties:A,maxProperties:j,propertyNames:M,dependentRequired:N,dependentSchemas:P,dependencies:F,prefixItems:I,items:L,additionalItems:ee,unevaluatedItems:te,contains:ne,minContains:R,maxContains:z,minItems:B,maxItems:re,uniqueItems:ie,minimum:ae,maximum:oe,exclusiveMinimum:se,exclusiveMaximum:ce,multipleOf:le,minLength:ue,maxLength:de,pattern:fe,__absolute_ref__:pe,__absolute_recursive_ref__:me}=t,V=[];if(p===!0&&a===null&&(a=t),f===`#`){let l=a===null?r[me]:a,u=`${s}/$recursiveRef`,d=Xb(e,a===null?t:a,n,r,i,l,o,u,c);d.valid||V.push({instanceLocation:o,keyword:`$recursiveRef`,keywordLocation:u,error:`A subschema had errors.`},...d.errors)}if(d!==void 0){let t=r[pe||d];if(t===void 0){let e=`Unresolved $ref "${d}".`;throw pe&&pe!==d&&(e+=` Absolute URI "${pe}".`),e+=`\nKnown schemas:\n- ${Object.keys(r).join(`
74
+ - `)}`,Error(e)}let l=`${s}/$ref`,u=Xb(e,t,n,r,i,a,o,l,c);if(u.valid||V.push({instanceLocation:o,keyword:`$ref`,keywordLocation:l,error:`A subschema had errors.`},...u.errors),n===`4`||n===`7`)return{valid:V.length===0,errors:V}}if(Array.isArray(m)){let t=m.length,n=!1;for(let r=0;r<t;r++)if(u===m[r]||m[r]===`integer`&&u===`number`&&e%1==0&&e===e){n=!0;break}n||V.push({instanceLocation:o,keyword:`type`,keywordLocation:`${s}/type`,error:`Instance type "${u}" is invalid. Expected "${m.join(`", "`)}".`})}else m===`integer`?(u!==`number`||e%1||e!==e)&&V.push({instanceLocation:o,keyword:`type`,keywordLocation:`${s}/type`,error:`Instance type "${u}" is invalid. Expected "${m}".`}):m!==void 0&&u!==m&&V.push({instanceLocation:o,keyword:`type`,keywordLocation:`${s}/type`,error:`Instance type "${u}" is invalid. Expected "${m}".`});if(h!==void 0&&(u===`object`||u===`array`?Ub(e,h)||V.push({instanceLocation:o,keyword:`const`,keywordLocation:`${s}/const`,error:`Instance does not match ${JSON.stringify(h)}.`}):e!==h&&V.push({instanceLocation:o,keyword:`const`,keywordLocation:`${s}/const`,error:`Instance does not match ${JSON.stringify(h)}.`})),g!==void 0&&(u===`object`||u===`array`?g.some(t=>Ub(e,t))||V.push({instanceLocation:o,keyword:`enum`,keywordLocation:`${s}/enum`,error:`Instance does not match any of ${JSON.stringify(g)}.`}):g.some(t=>e===t)||V.push({instanceLocation:o,keyword:`enum`,keywordLocation:`${s}/enum`,error:`Instance does not match any of ${JSON.stringify(g)}.`})),v!==void 0){let t=`${s}/not`;Xb(e,v,n,r,i,a,o,t).valid&&V.push({instanceLocation:o,keyword:`not`,keywordLocation:t,error:`Instance matched "not" schema.`})}let he=[];if(y!==void 0){let t=`${s}/anyOf`,l=V.length,u=!1;for(let s=0;s<y.length;s++){let l=y[s],d=Object.create(c),f=Xb(e,l,n,r,i,p===!0?a:null,o,`${t}/${s}`,d);V.push(...f.errors),u||=f.valid,f.valid&&he.push(d)}u?V.length=l:V.splice(l,0,{instanceLocation:o,keyword:`anyOf`,keywordLocation:t,error:`Instance does not match any subschemas.`})}if(b!==void 0){let t=`${s}/allOf`,l=V.length,u=!0;for(let s=0;s<b.length;s++){let l=b[s],d=Object.create(c),f=Xb(e,l,n,r,i,p===!0?a:null,o,`${t}/${s}`,d);V.push(...f.errors),u&&=f.valid,f.valid&&he.push(d)}u?V.length=l:V.splice(l,0,{instanceLocation:o,keyword:`allOf`,keywordLocation:t,error:`Instance does not match every subschema.`})}if(x!==void 0){let t=`${s}/oneOf`,l=V.length,u=x.filter((s,l)=>{let u=Object.create(c),d=Xb(e,s,n,r,i,p===!0?a:null,o,`${t}/${l}`,u);return V.push(...d.errors),d.valid&&he.push(u),d.valid}).length;u===1?V.length=l:V.splice(l,0,{instanceLocation:o,keyword:`oneOf`,keywordLocation:t,error:`Instance does not match exactly one subschema (${u} matches).`})}if((u===`object`||u===`array`)&&Object.assign(c,...he),S!==void 0){let t=`${s}/if`;if(Xb(e,S,n,r,i,a,o,t,c).valid){if(C!==void 0){let l=Xb(e,C,n,r,i,a,o,`${s}/then`,c);l.valid||V.push({instanceLocation:o,keyword:`if`,keywordLocation:t,error:`Instance does not match "then" schema.`},...l.errors)}}else if(w!==void 0){let l=Xb(e,w,n,r,i,a,o,`${s}/else`,c);l.valid||V.push({instanceLocation:o,keyword:`if`,keywordLocation:t,error:`Instance does not match "else" schema.`},...l.errors)}}if(u===`object`){if(_!==void 0)for(let t of _)t in e||V.push({instanceLocation:o,keyword:`required`,keywordLocation:`${s}/required`,error:`Instance does not have required property "${t}".`});let t=Object.keys(e);if(A!==void 0&&t.length<A&&V.push({instanceLocation:o,keyword:`minProperties`,keywordLocation:`${s}/minProperties`,error:`Instance does not have at least ${A} properties.`}),j!==void 0&&t.length>j&&V.push({instanceLocation:o,keyword:`maxProperties`,keywordLocation:`${s}/maxProperties`,error:`Instance does not have at least ${j} properties.`}),M!==void 0){let t=`${s}/propertyNames`;for(let s in e){let e=`${o}/${Wb(s)}`,c=Xb(s,M,n,r,i,a,e,t);c.valid||V.push({instanceLocation:o,keyword:`propertyNames`,keywordLocation:t,error:`Property name "${s}" does not match schema.`},...c.errors)}}if(N!==void 0){let t=`${s}/dependantRequired`;for(let n in N)if(n in e){let r=N[n];for(let i of r)i in e||V.push({instanceLocation:o,keyword:`dependentRequired`,keywordLocation:t,error:`Instance has "${n}" but does not have "${i}".`})}}if(P!==void 0)for(let t in P){let l=`${s}/dependentSchemas`;if(t in e){let s=Xb(e,P[t],n,r,i,a,o,`${l}/${Wb(t)}`,c);s.valid||V.push({instanceLocation:o,keyword:`dependentSchemas`,keywordLocation:l,error:`Instance has "${t}" but does not match dependant schema.`},...s.errors)}}if(F!==void 0){let t=`${s}/dependencies`;for(let s in F)if(s in e){let c=F[s];if(Array.isArray(c))for(let n of c)n in e||V.push({instanceLocation:o,keyword:`dependencies`,keywordLocation:t,error:`Instance has "${s}" but does not have "${n}".`});else{let l=Xb(e,c,n,r,i,a,o,`${t}/${Wb(s)}`);l.valid||V.push({instanceLocation:o,keyword:`dependencies`,keywordLocation:t,error:`Instance has "${s}" but does not match dependant schema.`},...l.errors)}}}let l=Object.create(null),u=!1;if(E!==void 0){let t=`${s}/properties`;for(let s in E){if(!(s in e))continue;let d=`${o}/${Wb(s)}`,f=Xb(e[s],E[s],n,r,i,a,d,`${t}/${Wb(s)}`);if(f.valid)c[s]=l[s]=!0;else if(u=i,V.push({instanceLocation:o,keyword:`properties`,keywordLocation:t,error:`Property "${s}" does not match schema.`},...f.errors),u)break}}if(!u&&D!==void 0){let t=`${s}/patternProperties`;for(let s in D){let d=new RegExp(s,`u`),f=D[s];for(let p in e){if(!d.test(p))continue;let m=`${o}/${Wb(p)}`,h=Xb(e[p],f,n,r,i,a,m,`${t}/${Wb(s)}`);h.valid?c[p]=l[p]=!0:(u=i,V.push({instanceLocation:o,keyword:`patternProperties`,keywordLocation:t,error:`Property "${p}" matches pattern "${s}" but does not match associated schema.`},...h.errors))}}}if(!u&&O!==void 0){let t=`${s}/additionalProperties`;for(let s in e){if(l[s])continue;let d=`${o}/${Wb(s)}`,f=Xb(e[s],O,n,r,i,a,d,t);f.valid?c[s]=!0:(u=i,V.push({instanceLocation:o,keyword:`additionalProperties`,keywordLocation:t,error:`Property "${s}" does not match additional properties schema.`},...f.errors))}}else if(!u&&k!==void 0){let t=`${s}/unevaluatedProperties`;for(let s in e)if(!c[s]){let l=`${o}/${Wb(s)}`,u=Xb(e[s],k,n,r,i,a,l,t);u.valid?c[s]=!0:V.push({instanceLocation:o,keyword:`unevaluatedProperties`,keywordLocation:t,error:`Property "${s}" does not match unevaluated properties schema.`},...u.errors)}}}else if(u===`array`){re!==void 0&&e.length>re&&V.push({instanceLocation:o,keyword:`maxItems`,keywordLocation:`${s}/maxItems`,error:`Array has too many items (${e.length} > ${re}).`}),B!==void 0&&e.length<B&&V.push({instanceLocation:o,keyword:`minItems`,keywordLocation:`${s}/minItems`,error:`Array has too few items (${e.length} < ${B}).`});let t=e.length,l=0,u=!1;if(I!==void 0){let d=`${s}/prefixItems`,f=Math.min(I.length,t);for(;l<f;l++){let t=Xb(e[l],I[l],n,r,i,a,`${o}/${l}`,`${d}/${l}`);if(c[l]=!0,!t.valid&&(u=i,V.push({instanceLocation:o,keyword:`prefixItems`,keywordLocation:d,error:`Items did not match schema.`},...t.errors),u))break}}if(L!==void 0){let d=`${s}/items`;if(Array.isArray(L)){let s=Math.min(L.length,t);for(;l<s;l++){let t=Xb(e[l],L[l],n,r,i,a,`${o}/${l}`,`${d}/${l}`);if(c[l]=!0,!t.valid&&(u=i,V.push({instanceLocation:o,keyword:`items`,keywordLocation:d,error:`Items did not match schema.`},...t.errors),u))break}}else for(;l<t;l++){let t=Xb(e[l],L,n,r,i,a,`${o}/${l}`,d);if(c[l]=!0,!t.valid&&(u=i,V.push({instanceLocation:o,keyword:`items`,keywordLocation:d,error:`Items did not match schema.`},...t.errors),u))break}if(!u&&ee!==void 0){let d=`${s}/additionalItems`;for(;l<t;l++){let t=Xb(e[l],ee,n,r,i,a,`${o}/${l}`,d);c[l]=!0,t.valid||(u=i,V.push({instanceLocation:o,keyword:`additionalItems`,keywordLocation:d,error:`Items did not match additional items schema.`},...t.errors))}}}if(ne!==void 0)if(t===0&&R===void 0)V.push({instanceLocation:o,keyword:`contains`,keywordLocation:`${s}/contains`,error:`Array is empty. It must contain at least one item matching the schema.`});else if(R!==void 0&&t<R)V.push({instanceLocation:o,keyword:`minContains`,keywordLocation:`${s}/minContains`,error:`Array has less items (${t}) than minContains (${R}).`});else{let l=`${s}/contains`,u=V.length,d=0;for(let s=0;s<t;s++){let t=Xb(e[s],ne,n,r,i,a,`${o}/${s}`,l);t.valid?(c[s]=!0,d++):V.push(...t.errors)}d>=(R||0)&&(V.length=u),R===void 0&&z===void 0&&d===0?V.splice(u,0,{instanceLocation:o,keyword:`contains`,keywordLocation:l,error:`Array does not contain item matching schema.`}):R!==void 0&&d<R?V.push({instanceLocation:o,keyword:`minContains`,keywordLocation:`${s}/minContains`,error:`Array must contain at least ${R} items matching schema. Only ${d} items were found.`}):z!==void 0&&d>z&&V.push({instanceLocation:o,keyword:`maxContains`,keywordLocation:`${s}/maxContains`,error:`Array may contain at most ${z} items matching schema. ${d} items were found.`})}if(!u&&te!==void 0){let u=`${s}/unevaluatedItems`;for(;l<t;l++){if(c[l])continue;let t=Xb(e[l],te,n,r,i,a,`${o}/${l}`,u);c[l]=!0,t.valid||V.push({instanceLocation:o,keyword:`unevaluatedItems`,keywordLocation:u,error:`Items did not match unevaluated items schema.`},...t.errors)}}if(ie)for(let n=0;n<t;n++){let r=e[n],i=typeof r==`object`&&!!r;for(let a=0;a<t;a++){if(n===a)continue;let t=e[a];(r===t||i&&typeof t==`object`&&t&&Ub(r,t))&&(V.push({instanceLocation:o,keyword:`uniqueItems`,keywordLocation:`${s}/uniqueItems`,error:`Duplicate items at indexes ${n} and ${a}.`}),n=2**53-1,a=2**53-1)}}}else if(u===`number`){if(n===`4`?(ae!==void 0&&(se===!0&&e<=ae||e<ae)&&V.push({instanceLocation:o,keyword:`minimum`,keywordLocation:`${s}/minimum`,error:`${e} is less than ${se?`or equal to `:``} ${ae}.`}),oe!==void 0&&(ce===!0&&e>=oe||e>oe)&&V.push({instanceLocation:o,keyword:`maximum`,keywordLocation:`${s}/maximum`,error:`${e} is greater than ${ce?`or equal to `:``} ${oe}.`})):(ae!==void 0&&e<ae&&V.push({instanceLocation:o,keyword:`minimum`,keywordLocation:`${s}/minimum`,error:`${e} is less than ${ae}.`}),oe!==void 0&&e>oe&&V.push({instanceLocation:o,keyword:`maximum`,keywordLocation:`${s}/maximum`,error:`${e} is greater than ${oe}.`}),se!==void 0&&e<=se&&V.push({instanceLocation:o,keyword:`exclusiveMinimum`,keywordLocation:`${s}/exclusiveMinimum`,error:`${e} is less than ${se}.`}),ce!==void 0&&e>=ce&&V.push({instanceLocation:o,keyword:`exclusiveMaximum`,keywordLocation:`${s}/exclusiveMaximum`,error:`${e} is greater than or equal to ${ce}.`})),le!==void 0){let t=e%le;Math.abs(0-t)>=1.1920929e-7&&Math.abs(le-t)>=1.1920929e-7&&V.push({instanceLocation:o,keyword:`multipleOf`,keywordLocation:`${s}/multipleOf`,error:`${e} is not a multiple of ${le}.`})}}else if(u===`string`){let t=ue===void 0&&de===void 0?0:jte(e);ue!==void 0&&t<ue&&V.push({instanceLocation:o,keyword:`minLength`,keywordLocation:`${s}/minLength`,error:`String is too short (${t} < ${ue}).`}),de!==void 0&&t>de&&V.push({instanceLocation:o,keyword:`maxLength`,keywordLocation:`${s}/maxLength`,error:`String is too long (${t} > ${de}).`}),fe!==void 0&&!new RegExp(fe,`u`).test(e)&&V.push({instanceLocation:o,keyword:`pattern`,keywordLocation:`${s}/pattern`,error:`String does not match pattern.`}),T!==void 0&&qb[T]&&!qb[T](e)&&V.push({instanceLocation:o,keyword:`format`,keywordLocation:`${s}/format`,error:`String does not match format "${T}".`})}return{valid:V.length===0,errors:V}}var Mte=class{schema;draft;shortCircuit;lookup;constructor(e,t=`2019-09`,n=!0){this.schema=e,this.draft=t,this.shortCircuit=n,this.lookup=Gb(e)}validate(e){return Xb(e,this.schema,this.draft,this.lookup,this.shortCircuit)}addSchema(e,t){t&&(e={...e,$id:t}),Gb(e,this.lookup)}},Nte=new Set([`https://json-schema.org/draft/2020-12/schema`,`http://json-schema.org/draft/2020-12/schema`]),Pte=class{shortcircuit;draft;constructor(e){this.shortcircuit=e?.shortcircuit??!0,this.draft=e?.draft}getValidator(e){if(this.draft===void 0&&`$schema`in e&&typeof e.$schema==`string`&&!Nte.has(e.$schema.replace(/#$/,``))){let t=e.$schema.slice(0,200);throw Error(`JSON Schema declares an unsupported dialect ("$schema": "${t}"). The default validator supports JSON Schema 2020-12 only; pass an explicit { draft } to CfWorkerJsonSchemaValidator to validate other dialects.`)}let t=new Mte(e,this.draft??`2020-12`,this.shortcircuit);return e=>{let n=t.validate(e);return n.valid?{valid:!0,data:e,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:n.errors.map(e=>`${e.instanceLocation}: ${e.error}`).join(`; `)}}}},Zb=globalThis.crypto;async function Fte(e){return(await Zb).getRandomValues(new Uint8Array(e))}async function Ite(e){let t=``;for(;t.length<e;){let n=await Fte(e-t.length);for(let e of n)e<198&&(t+=`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~`[e%66])}return t}async function Lte(e){return await Ite(e)}async function Rte(e){let t=await(await Zb).subtle.digest(`SHA-256`,new TextEncoder().encode(e));return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/\//g,`_`).replace(/\+/g,`-`).replace(/=/g,``)}async function zte(e){if(e||=43,e<43||e>128)throw`Expected a length between 43 and 128. Received ${e}.`;let t=await Lte(e);return{code_verifier:t,code_challenge:await Rte(t)}}var Qb=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 $b(e){}function Bte(e){if(typeof e==`function`)throw TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");let{onEvent:t=$b,onError:n=$b,onRetry:r=$b,onComment:i}=e,a=``,o=!0,s,c=``,l=``;function u(e){let t=o?e.replace(/^\xEF\xBB\xBF/,``):e,[n,r]=ex(`${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}
75
+ `;break;case`id`:s=t.includes(`\0`)?void 0:t;break;case`retry`:/^\d+$/.test(t)?r(parseInt(t,10)):n(new Qb(`Invalid \`retry\` value: "${t}"`,{type:`invalid-retry`,value:t,line:i}));break;default:n(new Qb(`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(`
76
+ `)?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 ex(e){let t=[],n=``,r=0;for(;r<e.length;){let i=e.indexOf(`\r`,r),a=e.indexOf(`
77
+ `,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]===`
78
+ `&&r++}}return[t,n]}var tx=class extends TransformStream{constructor({onError:e,onRetry:t,onComment:n}={}){let r;super({start(i){r=Bte({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)}})}},nx=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.OAuthClientFlowError`})}static[Symbol.hasInstance](e){return hv(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return hv(this,e)}constructor(e){super(e),this.name=new.target.name,mv(this,new.target)}},rx=class extends nx{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.IssuerMismatchError`})}kind;expected;received;constructor(e,t,n){super(`Issuer mismatch in ${e===`metadata`?`authorization server metadata (RFC 8414 §3.3)`:`authorization response (RFC 9207)`}: expected ${JSON.stringify(t)}, received ${JSON.stringify(n)}`),this.kind=e,this.expected=t,this.received=n}},ix=class extends nx{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.RegistrationRejectedError`})}status;body;submittedMetadata;constructor(e){super(`Dynamic Client Registration rejected (HTTP ${e.status}): ${e.body}`),this.status=e.status,this.body=e.body,this.submittedMetadata=e.submittedMetadata}},ax=class extends nx{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.InsecureTokenEndpointError`})}tokenEndpoint;constructor(e){super(`Refusing to send credentials to non-https token endpoint '${e}'. OAuth token requests MUST use TLS (localhost / 127.0.0.1 / ::1 are exempt).`),this.tokenEndpoint=e}},ox=class extends nx{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.AuthorizationServerMismatchError`})}constructor(e,t){super(`Authorization server changed between redirect and callback (redirected to ${JSON.stringify(e)}, callback resolved ${JSON.stringify(t)}); refusing to send authorization_code/code_verifier to a different token endpoint`),this.recordedIssuer=e,this.currentIssuer=t}},sx=class extends nx{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.InsufficientScopeError`})}requiredScope;resourceMetadataUrl;errorDescription;constructor(e){super(`Insufficient scope${e.requiredScope?`: required "${e.requiredScope}"`:``}`),this.requiredScope=e.requiredScope,this.resourceMetadataUrl=e.resourceMetadataUrl,this.errorDescription=e.errorDescription}};function cx(e,t,n){if(e!==void 0)return e.issuer===void 0?(n?.canPersistStamp!==!1&&console.warn(`[mcp-sdk] SEP-2352: stored OAuth credential has no 'issuer' stamp (pre-upgrade storage or provider not round-tripping the value). SEP-2352 isolation is inactive for this read; ensure your provider round-trips the issuer field.`),e):lx(e.issuer,t)?e:void 0}function lx(e,t){return e===t||e.endsWith(`/`)&&e.slice(0,-1)===t||t.endsWith(`/`)&&t.slice(0,-1)===e}function ux(e){if(e==null)return!1;let t=e;return typeof t.tokens==`function`&&typeof t.clientInformation==`function`}async function dx(e,t,n){let{resourceMetadataUrl:r,scope:i}=Lx(t.response);if(await Mx(e,{serverUrl:t.serverUrl,resourceMetadataUrl:r,scope:i,fetchFn:t.fetchFn,...n})!==`AUTHORIZED`)throw new px}function fx(e,t){return{token:async()=>(await e.tokens())?.access_token,onUnauthorized:async n=>dx(e,n,t)}}var px=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UnauthorizedError`})}static[Symbol.hasInstance](e){return hv(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return hv(this,e)}constructor(e){super(e??`Unauthorized`),this.name=`UnauthorizedError`,mv(this,new.target)}};function mx(e){return e?.authorization_response_iss_parameter_supported===!0}function hx({iss:e,expectedIssuer:t,issParameterSupported:n}){if(t!==void 0){if(e===void 0){if(n)throw new rx(`authorization_response`,t,void 0);return}if(e!==t)throw new rx(`authorization_response`,t,e)}}function gx(...e){let t=new Set;for(let n of e)if(n)for(let e of n.split(/\s+/))e&&t.add(e);return t.size>0?[...t].join(` `):void 0}function _x(e,t){if(!e)return!1;let n=new Set((t??``).split(/\s+/).filter(Boolean));for(let t of e.split(/\s+/))if(t&&!n.has(t))return!0;return!1}async function vx(e,t,n,r,i){if(typeof e==`string`)return{authorizationCode:e,iss:t};let a=e.get(`iss`)??void 0,o=e.get(`code`);if(o)return{authorizationCode:o,iss:a};let s=(await n.discoveryState?.())?.authorizationServerMetadata;if(!s)try{s=(await qx(r,i)).authorizationServerMetadata}catch{s=void 0}if(!s)throw new px(`Authorization callback failed and the issuer could not be verified`);hx({iss:a,expectedIssuer:s.issuer,issParameterSupported:mx(s)});let c=e.get(`error`);throw c?new _v(c,e.get(`error_description`)??c,e.get(`error_uri`)??void 0):new px("Authorization callback contained neither `code` nor `error`")}function yx(e){return[`client_secret_basic`,`client_secret_post`,`none`].includes(e)}var bx=`code`,xx=`S256`;function Sx(e,t){let n=e.client_secret!==void 0;return`token_endpoint_auth_method`in e&&e.token_endpoint_auth_method&&yx(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 Cx(e,t,n,r){let{client_id:i,client_secret:a}=t;switch(e){case`client_secret_basic`:wx(i,a,n);return;case`client_secret_post`:Tx(i,a,r);return;case`none`:Ex(i,r);return;default:throw Error(`Unsupported client authentication method: ${e}`)}}function wx(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 Tx(e,t,n){n.set(`client_id`,e),t&&n.set(`client_secret`,t)}function Ex(e,t){t.set(`client_id`,e)}function Dx(e){return e===`localhost`||e===`127.0.0.1`||e===`[::1]`||e===`::1`}function Ox(e){let t=new URL(String(e));if(t.protocol!==`https:`&&!Dx(t.hostname))throw new ax(t.href);return t}function kx(e){for(let t of e??[]){let e;try{e=new URL(t)}catch{continue}if(e.protocol!==`http:`&&e.protocol!==`https:`||Dx(e.hostname))return`native`}return`web`}function Ax(e){let t=e.clientMetadata;return{...t,grant_types:t.grant_types??(e.redirectUrl===void 0?void 0:[`authorization_code`,`refresh_token`]),application_type:t.application_type??kx(t.redirect_uris)}}async function jx(e){let t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{let e=ov.parse(JSON.parse(n));return _v.fromResponse(e)}catch(e){let r=`${t?`HTTP ${t}: `:``}Invalid OAuth error response: ${e}. Raw body: ${n}`;return new _v(gv.ServerError,r)}}async function Mx(e,t){try{return await Px(e,t)}catch(n){if(n instanceof _v){if(n.code===gv.InvalidClient||n.code===gv.UnauthorizedClient)return await e.invalidateCredentials?.(`client`),await e.invalidateCredentials?.(`tokens`),await Px(e,t);if(n.code===gv.InvalidGrant)return await e.invalidateCredentials?.(`tokens`),await Px(e,t)}throw n}}function Nx(e){let{requestedScope:t,resourceMetadata:n,authServerMetadata:r,clientMetadata:i}=e,a=t||n?.scopes_supported?.join(` `)||i.scope;return a&&r?.scopes_supported?.includes(`offline_access`)&&!a.split(` `).includes(`offline_access`)&&i.grant_types?.includes(`refresh_token`)&&(a=`${a} offline_access`),a}async function Px(e,{serverUrl:t,authorizationCode:n,iss:r,scope:i,resourceMetadataUrl:a,fetchFn:o,skipIssuerMetadataValidation:s,forceReauthorization:c}){let l=Ax(e),u=await e.discoveryState?.(),d,f,p,m,h=a;if(!h&&u?.resourceMetadataUrl&&(h=new URL(u.resourceMetadataUrl)),u?.authorizationServerUrl){if(f=u.authorizationServerUrl,d=u.resourceMetadata,p=u.authorizationServerMetadata??await Kx(f,{fetchFn:o,skipIssuerValidation:s}),!d)try{d=await zx(t,{resourceMetadataUrl:h},o)}catch(e){if(e instanceof TypeError)throw e}(p!==u.authorizationServerMetadata||d!==u.resourceMetadata)&&await e.saveDiscoveryState?.({authorizationServerUrl:String(f),resourceMetadataUrl:h?.toString(),resourceMetadata:d,authorizationServerMetadata:p})}else{let e=await qx(t,{resourceMetadataUrl:h,fetchFn:o,skipIssuerMetadataValidation:s});f=e.authorizationServerUrl,p=e.authorizationServerMetadata,d=e.resourceMetadata,m={authorizationServerUrl:String(f),resourceMetadataUrl:h?.toString(),resourceMetadata:d,authorizationServerMetadata:p}}let g=p?.issuer??String(f),_={issuer:g};if(await e.saveAuthorizationServerUrl?.(g),n!==void 0){let t=u?.authorizationServerMetadata?.issuer??u?.authorizationServerUrl;if(t===void 0){if(e.saveDiscoveryState!==void 0)throw new ox(`discoveryState was not available on the callback leg; ensure your provider persists discoveryState alongside codeVerifier`,g);console.warn(`[mcp-sdk] OAuthClientProvider does not implement saveDiscoveryState()/discoveryState(); the SEP-2352 callback-leg authorization-server binding cannot be checked. Implement discoveryState (persist alongside codeVerifier) — see docs/migration/upgrade-to-v2.md §SEP-2352.`)}else if(!lx(t,g))throw new ox(t,g)}m&&await e.saveDiscoveryState?.(m);let v=await Ix(t,e,d);v&&await e.saveResourceUrl?.(String(v));let y=Nx({requestedScope:i,resourceMetadata:d,authServerMetadata:p,clientMetadata:e.clientMetadata}),b=await Promise.resolve(e.clientInformation(_)),x=cx(b,g,{canPersistStamp:e.saveClientInformation!==void 0});if(x===void 0&&b?.issuer&&e.saveClientInformation===void 0)throw new ox(b.issuer,g);if(x&&x.issuer===void 0&&(x={...x,issuer:g},await e.saveClientInformation?.(x,_)),!x){if(n!==void 0)throw Error(`Existing OAuth client information is required when exchanging an authorization code`);let t=p?.client_id_metadata_document_supported===!0,r=e.clientMetadataUrl;if(r&&!Fx(r))throw new _v(gv.InvalidClientMetadata,`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${r}`);if(t&&r)x={client_id:r,issuer:g},await e.saveClientInformation?.(x,_);else{if(!e.saveClientInformation)throw Error(`OAuth client information must be saveable for dynamic registration`);x={...await $x(f,{metadata:p,clientMetadata:l,scope:y,fetchFn:o}),issuer:g},await e.saveClientInformation(x,_)}}let S=!e.redirectUrl;if(n!==void 0||S){n!==void 0&&hx({iss:r,expectedIssuer:p?.issuer,issParameterSupported:mx(p)});let t=await Qx(e,f,{metadata:p,resource:v,authorizationCode:n,iss:r,scope:y,fetchFn:o});return await e.saveTokens({...t,issuer:g},_),`AUTHORIZED`}let C=cx(await e.tokens(_),g);if(C&&C.issuer===void 0&&(C={...C,issuer:g},await e.saveTokens(C,_)),C?.refresh_token&&!c)try{let t=await Zx(f,{metadata:p,clientInformation:x,refreshToken:C.refresh_token,resource:v,addClientAuthentication:e.addClientAuthentication,fetchFn:o});return await e.saveTokens({...t,issuer:g},_),`AUTHORIZED`}catch(e){if(e instanceof ax||!(!(e instanceof _v)||e.code===gv.ServerError))throw e}let w=e.state?await e.state():void 0,{authorizationUrl:T,codeVerifier:E}=await Jx(f,{metadata:p,clientInformation:x,state:w,redirectUrl:e.redirectUrl,scope:y,resource:v});return await e.saveCodeVerifier(E),await e.redirectToAuthorization(T),`REDIRECT`}function Fx(e){if(!e)return!1;try{let t=new URL(e);return t.protocol===`https:`&&t.pathname!==`/`}catch{return!1}}async function Ix(e,t,n){let r=xv(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!Sv({requestedResource:r,configuredResource:n.resource}))throw Error(`Protected resource ${n.resource} does not match expected ${r} (or origin)`);return new URL(n.resource)}}function Lx(e){let t=e.headers.get(`WWW-Authenticate`);if(!t)return{};let[n,r]=t.split(` `);if(n?.toLowerCase()!==`bearer`||!r)return{};let i=Rx(e,`resource_metadata`)||void 0,a;if(i)try{a=new URL(i)}catch{}let o=Rx(e,`scope`)||void 0,s=Rx(e,`error`)||void 0,c=Rx(e,`error_description`)||void 0;return{resourceMetadataUrl:a,scope:o,error:s,errorDescription:c}}function Rx(e,t){let n=e.headers.get(`WWW-Authenticate`);if(!n)return null;let r=new RegExp(String.raw`${t}=(?:"([^"]+)"|([^\s,]+))`),i=n.match(r);if(i){let e=i[1]||i[2];if(e)return e}return null}async function zx(e,t,n=fetch){let r=await Wx(e,`oauth-protected-resource`,n,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!r||r.status===404)throw await r?.text?.().catch(()=>{}),Error(`Resource server does not implement OAuth 2.0 Protected Resource Metadata.`);if(!r.ok)throw await r.text?.().catch(()=>{}),Error(`HTTP ${r.status} trying to load well-known OAuth protected resource metadata.`);return ev.parse(await r.json())}async function Bx(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(!(r instanceof TypeError))throw r;if(t)try{return await n(e,{})}catch(e){if(!(e instanceof TypeError))throw e;return}return}}function Vx(e,t=``,n={}){return t.endsWith(`/`)&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function Hx(e,t,n=fetch){return await Bx(e,{"MCP-Protocol-Version":t},n)}function Ux(e,t){return e?t===`/`?!1:e.status>=400&&e.status<500||e.status===502:!0}async function Wx(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=Vx(t,i.pathname);o=new URL(e,r?.metadataServerUrl??i),o.search=i.search}let s=await Hx(o,a,n);return!r?.metadataUrl&&Ux(s,i.pathname)&&(s=await Hx(new URL(`/.well-known/${t}`,i),a,n)),s}function Gx(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`},{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`},{url:new URL(`/.well-known/openid-configuration${i}`,t.origin),type:`oidc`},{url:new URL(`${i}/.well-known/openid-configuration`,t.origin),type:`oidc`}),r}async function Kx(e,{fetchFn:t=fetch,protocolVersion:n=Hm,skipIssuerValidation:r=!1}={}){let i={"MCP-Protocol-Version":n,Accept:`application/json`},a=Gx(e);for(let{url:n,type:o}of a){let a=await Bx(n,i,t);if(!a)continue;if(!a.ok){if(await a.text?.().catch(()=>{}),a.status>=400&&a.status<500||a.status===502)continue;throw Error(`HTTP ${a.status} trying to load ${o===`oauth`?`OAuth`:`OpenID provider`} metadata from ${n}`)}let s=o===`oauth`?tv.parse(await a.json()):rv.parse(await a.json());if(!r){let t=typeof e==`string`?e:e.href;if(!(s.issuer===t||t.endsWith(`/`)&&s.issuer===t.slice(0,-1)))throw new rx(`metadata`,t,s.issuer)}return s}}async function qx(e,t){let n,r;try{n=await zx(e,{resourceMetadataUrl:t?.resourceMetadataUrl},t?.fetchFn),n.authorization_servers&&n.authorization_servers.length>0&&(r=n.authorization_servers[0])}catch(e){if(e instanceof TypeError)throw e}r||=String(new URL(`/`,e));let i=await Kx(r,{fetchFn:t?.fetchFn,skipIssuerValidation:t?.skipIssuerMetadataValidation});return{authorizationServerUrl:r,authorizationServerMetadata:i,resourceMetadata:n}}async function Jx(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(bx))throw Error(`Incompatible auth server: does not support response type ${bx}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(xx))throw Error(`Incompatible auth server: does not support code challenge method ${xx}`)}else s=new URL(`/authorize`,e);let c=await zte(),l=c.code_verifier,u=c.code_challenge;return s.searchParams.set(`response_type`,bx),s.searchParams.set(`client_id`,n.client_id),s.searchParams.set(`code_challenge`,u),s.searchParams.set(`code_challenge_method`,xx),s.searchParams.set(`redirect_uri`,String(r)),a&&s.searchParams.set(`state`,a),i&&s.searchParams.set(`scope`,i),i?.split(` `).includes(`offline_access`)&&s.searchParams.append(`prompt`,`consent`),o&&s.searchParams.set(`resource`,o.href),{authorizationUrl:s,codeVerifier:l}}function Yx(e,t,n){return new URLSearchParams({grant_type:`authorization_code`,code:e,code_verifier:t,redirect_uri:String(n)})}async function Xx(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:i,resource:a,fetchFn:o}){let s=Ox(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&&Cx(Sx(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 jx(l);let u=await l.json();try{return iv.parse(u)}catch(e){throw typeof u==`object`&&u&&`error`in u?await jx(JSON.stringify(u)):e}}async function Zx(e,{metadata:t,clientInformation:n,refreshToken:r,resource:i,addClientAuthentication:a,fetchFn:o}){return{refresh_token:r,...await Xx(e,{metadata:t,tokenRequestParams:new URLSearchParams({grant_type:`refresh_token`,refresh_token:r}),clientInformation:n,addClientAuthentication:a,resource:i,fetchFn:o})}}async function Qx(e,t,{metadata:n,resource:r,authorizationCode:i,iss:a,scope:o,fetchFn:s}={}){i!==void 0&&hx({iss:a,expectedIssuer:n?.issuer,issParameterSupported:mx(n)});let c=o??e.clientMetadata.scope,l;if(e.prepareTokenRequest&&(l=await e.prepareTokenRequest(c)),!l){if(!i)throw Error(`Either provider.prepareTokenRequest() or authorizationCode is required`);if(!e.redirectUrl)throw Error(`redirectUrl is required for authorization_code flow`);l=Yx(i,await e.codeVerifier(),e.redirectUrl)}let u=await e.clientInformation({issuer:n?.issuer??String(t)});return Xx(t,{metadata:n,tokenRequestParams:l,clientInformation:u??void 0,addClientAuthentication:e.addClientAuthentication,resource:r,fetchFn:s})}async function $x(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={...n,...r===void 0?{}:{scope:r}},s=await(i??fetch)(a,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(o)});if(!s.ok)throw new ix({status:s.status,body:await s.text(),submittedMetadata:o});return uv.parse(await s.json())}var eS=new Set([`tools/list`,`prompts/list`,`resources/list`,`resources/templates/list`,`server/discover`]),tS=class{_entries=new Map;_maxEntries;_stamp=0;_cappedSize=0;constructor(e){this._maxEntries=e?.maxEntries??512}get size(){return this._entries.size}get(e){return this._entries.get(nS(e))}set(e,t){let n=nS(e),r=eS.has(e.method),i=!this._entries.has(n);if(!r&&i&&this._maxEntries>0&&this._cappedSize>=this._maxEntries){for(let e of this._entries.keys())if(!eS.has(e.slice(0,e.indexOf(`\0`)))){this._entries.delete(e),this._cappedSize--;break}}let a=++this._stamp;return this._entries.set(n,{...t,stamp:a}),i&&!r&&this._cappedSize++,a}delete(e){this._entries.delete(nS(e))&&!eS.has(e.method)&&this._cappedSize--}evict(e){let t=`${e}\0`,n=eS.has(e);for(let e of this._entries.keys())e.startsWith(t)&&(this._entries.delete(e),n||this._cappedSize--)}clear(){this._entries.clear(),this._cappedSize=0}};function nS(e){return`${e.method}\0${JSON.stringify([e.partition??``,e.params??``])}`}function rS(e,t){return t===void 0?e:`${e}\0${t}`}var iS=864e5,aS=class{_evictionGeneration=new Map;_toolIndex;_toolOutputValidatorIndex;_serverIdentity=``;constructor(e,t,n=()=>{},r=``,i=Date.now){this._store=e,this._isUserSupplied=t,this._reportError=n,this._cachePartition=r,this._now=i}now(){return this._now()}setServerIdentity(e){this._serverIdentity=e}_partitionFor(e){return JSON.stringify([this._serverIdentity,e===`public`?``:this._cachePartition])}async _probe(e,t){let n={method:e,params:t??``},r=this._partitionFor(`private`),i=await this._store.get({...n,partition:r});if(i!==void 0)return i;let a=this._partitionFor(`public`);if(a===r)return;let o=await this._store.get({...n,partition:a});return o?.scope===`public`?o:void 0}async evict(e){this._evictionGeneration.set(e,(this._evictionGeneration.get(e)??0)+1),await this._deleteBoth(e,``)}async _deleteBoth(e,t){let n=this._partitionFor(`private`),r=this._partitionFor(`public`);try{await this._store.delete({method:e,params:t,partition:n})}catch(e){this._reportError(e)}if(r!==n)try{await this._store.delete({method:e,params:t,partition:r})}catch(e){this._reportError(e)}}async evictKey(e,t){let n=rS(e,t),r=this._evictionGeneration.get(n);r!==void 0&&this._evictionGeneration.set(n,r+1),await this._deleteBoth(e,t)}captureGeneration(e,t){let n=rS(e,t),r=this._evictionGeneration.get(n)??0;return this._evictionGeneration.set(n,r),r}async write(e,t,n,r){if((this._evictionGeneration.get(rS(e,r?.params))??0)!==n)return;let i=r?.params??``,a=this._partitionFor(`private`),o=this._partitionFor(`public`),s=(r?.scope??`private`)===`public`?o:a;try{await this._store.set({method:e,params:i,partition:s},{value:oS(t),expiresAt:r?.expiresAt,scope:r?.scope})}catch(e){this._reportError(e)}if(o!==a)try{await this._store.delete({method:e,params:i,partition:s===a?o:a})}catch(e){this._reportError(e)}}async read(e,t){let n=await this._probe(e,t);if(!(n?.expiresAt===void 0||!(n.expiresAt>this.now())))try{let e=JSON.parse(n.value);if(typeof e!=`object`||!e||Array.isArray(e))throw TypeError(`cached document is not an object`);return{value:e}}catch(n){this._reportError(n),await this._deleteBoth(e,t??``);return}}resetForReconnect(){this._isUserSupplied||this._store.clear(),this._evictionGeneration.clear(),this._toolIndex=void 0,this._toolOutputValidatorIndex=void 0,this._serverIdentity=``}async toolDefinition(e){let t=await this._probe(`tools/list`);if(t===void 0){this._toolIndex=void 0;return}if(this._toolIndex?.stamp!==t.stamp){let e=this._decodeListTools(t),n=new Map;if(e!==void 0)for(let t of e.tools)n.set(t.name,t);this._toolIndex={stamp:t.stamp,byName:n}}return this._toolIndex.byName.get(e)}async outputValidator(e,t){let n=await this._probe(`tools/list`);if(n===void 0){this._toolOutputValidatorIndex=void 0;return}if(this._toolOutputValidatorIndex?.stamp!==n.stamp){let e=this._decodeListTools(n)??{tools:[]},r=new Map;for(let n of e.tools){let e=t(n);e!==void 0&&r.set(n.name,e)}this._toolOutputValidatorIndex={stamp:n.stamp,byName:r}}return this._toolOutputValidatorIndex.byName.get(e)}_decodeListTools(e){try{let t=JSON.parse(e.value);if(!Array.isArray(t?.tools)||!t.tools.every(e=>typeof e==`object`&&!!e))throw TypeError(`cached tools/list document has a malformed tools array`);return t}catch(e){this._reportError(e);return}}};function oS(e){let t;try{t=JSON.stringify(e)}catch(e){throw TypeError(`cache value is not JSON-serializable: ${e instanceof Error?e.message:String(e)}`)}if(typeof t!=`string`)throw TypeError(`cache value is not JSON-serializable: it has no JSON representation`);return t}var sS=-32022,cS=new Set([-32001,-32020,-32021]);function lS(e,t){switch(e.kind){case`result`:return uS(e.result,t);case`rpc-error`:return dS(e,t);case`http-error`:return fS(e,t);case`network-error`:return pS(e.error,t);case`auth-required`:return{kind:`error`,error:e.error};case`closed`:return t.transportKind===`stdio`?{kind:`legacy`}:pS(Error(`Connection closed during the version negotiation probe`),t);case`timeout`:return t.transportKind===`stdio`?{kind:`legacy`}:{kind:`error`,error:new yv(vv.RequestTimeout,`Version negotiation probe timed out after ${e.timeoutMs}ms`,{timeout:e.timeoutMs})}}}function uS(e,t){let n=Ry(Ly).validateResult(`server/discover`,e);if(!n.ok)return{kind:`legacy`};let r=n.value.supportedVersions,i=t.clientModernVersions.find(e=>r.includes(e));return i===void 0?t.fallbackAvailable?{kind:`legacy`}:{kind:`error`,error:new ry({supported:[...r],requested:t.requestedVersion})}:{kind:`modern`,version:i,discover:n.value}}function dS(e,t){let{code:n,message:r,data:i}=e;if(n===sS){let e=gS(i);if(e===void 0)return{kind:`legacy`};let n=new ry({supported:e,requested:_S(i)??t.requestedVersion},r),a=Dv(e),o=t.clientModernVersions.find(e=>a.includes(e));return o===void 0?a.length>0?{kind:`error`,error:n}:t.fallbackAvailable?{kind:`legacy`}:{kind:`error`,error:n}:{kind:`corrective`,version:o,error:n}}return cS.has(n),{kind:`legacy`}}function fS(e,t){let n=vS(e.body);return n===void 0?{kind:`legacy`}:dS(n,t)}function pS(e,t){return t.environment===`browser`&&mS(e)?{kind:`legacy`}:{kind:`error`,error:new yv(vv.EraNegotiationFailed,`Version negotiation probe failed: ${hS(e)}`,{cause:e})}}function mS(e){return e instanceof TypeError||e instanceof Error&&e.name===`TypeError`}function hS(e){return e instanceof Error?e.message:String(e)}function gS(e){if(typeof e!=`object`||!e)return;let t=e.supported;if(!(!Array.isArray(t)||t.length===0||!t.every(e=>typeof e==`string`)))return t}function _S(e){if(typeof e!=`object`||!e)return;let t=e.requested;return typeof t==`string`?t:void 0}function vS(e){if(e===void 0||e===``)return;let t;try{t=JSON.parse(e)}catch{return}if(typeof t!=`object`||!t)return;let n=t.error;if(typeof n!=`object`||!n)return;let{code:r,message:i,data:a}=n;if(typeof r==`number`)return{code:r,message:typeof i==`string`?i:``,data:a}}var yS=`legacy`;function bS(e,t){let n=e?.mode??yS;if(n===`legacy`)return{kind:`legacy`};let r=e?.probe??{};if(typeof n==`object`){if(!Tv(n.pin))throw TypeError(`versionNegotiation: { pin: '${n.pin}' } is not a modern protocol revision — pinning is for 2026-07-28 and later; omit versionNegotiation (or use mode: 'legacy') for 2025-era servers.`);return{kind:`pin`,version:n.pin,probe:r}}let i=t?Dv(t):[];return{kind:`auto`,modernVersions:i.length>0?i:[...wv],fallbackAvailable:!t||Ev(t).length>0,probe:r}}function xS(){let e=globalThis;return e.window!==void 0&&e.document!==void 0?`browser`:`node`}function SS(e){return`stderr`in e&&`pid`in e?`stdio`:`http`}var CS=class e{_pending;_probeCounter=0;_savedOnMessage;_savedOnError;_savedOnClose;_closeDelivered=!1;constructor(e){this._transport=e,this._savedOnMessage=e.onmessage,this._savedOnError=e.onerror,this._savedOnClose=e.onclose}static async open(t){let n=new e(t);t.onmessage=e=>{let t=n._pending;if(t!==void 0&&(Ky(e)||qy(e))&&e.id===t.id){n._pending=void 0,Ky(e)?t.resolve({kind:`response`,result:e.result}):t.resolve({kind:`response`,error:e.error});return}},t.onerror=e=>{n._savedOnError?.(e)},t.onclose=()=>{let e=n._pending;e!==void 0&&(n._pending=void 0,e.resolve({kind:`closed`})),n._closeDelivered=!0,n._savedOnClose?.()};try{await t.start()}catch(e){throw n.detach(),e}return n}async exchange(e,t){let n=`server-discover-probe-${++this._probeCounter}`;return new Promise(r=>{let i=!1,a=e=>{i||(i=!0,clearTimeout(o),this._pending?.id===n&&(this._pending=void 0),r(e))},o=setTimeout(()=>a({kind:`timeout`}),t);this._pending={id:n,resolve:a},this._transport.send(e(n)).catch(e=>a({kind:`send-error`,error:e}))})}detach(){if(this._pending=void 0,this._transport.onmessage=this._savedOnMessage,this._transport.onerror=this._savedOnError,this._closeDelivered&&this._savedOnClose!==void 0){let e=this._savedOnClose,t=this._transport,n=!1,r=()=>{if(!n){n=!0;return}e()};t.onclose=r,wS.set(t,()=>{t.onclose===r&&(t.onclose=e)})}else this._transport.onclose=this._savedOnClose}release(){this.detach();let e=this._transport,t=e.start,n=!0;e.start=async function(){if(n){n=!1,e.start=t;return}return t.call(e)}}},wS=new WeakMap;function TS(e){let t=wS.get(e);wS.delete(e),t?.()}function ES(e,t,n,r){return{jsonrpc:`2.0`,id:e,method:`server/discover`,params:{_meta:Ry(t).outboundEnvelope({protocolVersion:t,clientInfo:n,clientCapabilities:r})}}}function DS(e,t){switch(e.kind){case`response`:return e.error===void 0?{kind:`result`,result:e.result}:{kind:`rpc-error`,...e.error};case`send-error`:{let t=e.error;if(t instanceof bv){let e=t.data?.text;return{kind:`http-error`,status:t.data.status,body:typeof e==`string`?e:void 0}}return t instanceof px||t instanceof Error&&t.name===`UnauthorizedError`?{kind:`auth-required`,error:t}:{kind:`network-error`,error:t}}case`closed`:return{kind:`closed`};case`timeout`:return{kind:`timeout`,timeoutMs:t}}}async function OS(e,t){let n=e.probe.timeoutMs??t.defaultTimeoutMs,r=Math.max(0,e.probe.maxRetries??0),i=e.kind===`pin`?[e.version]:e.modernVersions,a=e.kind===`auto`&&e.fallbackAvailable,o=await CS.open(t.transport),s=async()=>{let s=i[0],c=!1,l=r;for(;;){let r=await o.exchange(e=>ES(e,s,t.clientInfo,t.capabilities),n);if(r.kind===`timeout`&&l>0){l--;continue}let u=DS(r,n),d=lS(u,{clientModernVersions:i,requestedVersion:s,fallbackAvailable:a,environment:t.environment,transportKind:t.transportKind});switch(d.kind){case`modern`:return{era:`modern`,version:d.version,discover:d.discover};case`corrective`:if(c)throw d.error;c=!0,s=d.version;continue;case`legacy`:{let n=u.kind===`closed`?`the connection closed during the server/discover probe`:void 0;if(e.kind===`pin`)throw new yv(vv.EraNegotiationFailed,n===void 0?`Version negotiation failed: the server did not offer pinned protocol version ${e.version} via server/discover (no fallback in pin mode)`:`Version negotiation failed: ${n} before the server offered pinned protocol version ${e.version} (no fallback in pin mode)`);if(!e.fallbackAvailable)throw new yv(vv.EraNegotiationFailed,n===void 0?`Version negotiation failed: the server gave no modern evidence and this client supports no pre-2026-07-28 protocol version to fall back to`:`Version negotiation failed: ${n} and this client supports no pre-2026-07-28 protocol version to fall back to`);if(n!==void 0&&t.disposableProbe!==!0)throw new yv(vv.EraNegotiationFailed,`Version negotiation failed: ${n} (this transport probed in place — the disposable sibling probe requires the SDK's base StdioClientTransport)`);return{era:`legacy`}}case`error`:throw d.error}}},c;try{c=await s()}catch(e){throw o.detach(),e}return o.release(),c}function kS(e){let t=Object.getPrototypeOf(e);if(t===null||!Object.prototype.hasOwnProperty.call(t,`_dispose`))return;let n=e._serverParams;return typeof n==`object`&&n&&typeof n.command==`string`?n:void 0}async function AS(e,t,n,r){let i=t.constructor,a=new i({...n,stderr:`ignore`}),o=t.close,s=!1,c,l=new Promise((e,t)=>{c=()=>t(jS())});t.close=async function(){return s=!0,c?.(),o.call(t)};let u;try{let t=OS(e,{...r,transport:a,transportKind:`stdio`,disposableProbe:!0});t.catch(()=>{}),u=await Promise.race([t,l])}finally{await MS(a),t.close=o}if(s)throw jS();return u}function jS(){return new yv(vv.EraNegotiationFailed,`Version negotiation failed: the transport was closed during the server/discover probe`)}async function MS(e){try{let t=e._dispose;await(typeof t==`function`?t.call(e):e.close())}catch{}}function NS(e){let t=e._meta?.[Km];return Vee.Implementation(t)?t:void 0}function PS(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&&PS(t,n[e])}}if(Array.isArray(e.anyOf))for(let n of e.anyOf)typeof n!=`boolean`&&PS(n,t);if(Array.isArray(e.oneOf))for(let n of e.oneOf)typeof n!=`boolean`&&PS(n,t)}}function FS(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}}function IS(e){if(typeof e==`object`&&e&&(e.kind===`legacy`&&!(`supportedVersions`in e)&&!(`discover`in e)||e.kind===`modern`&&Nh.safeParse(e.discover).success))return e;throw new yv(vv.EraNegotiationFailed,`connect({ prior }): unrecognized prior — expected { kind: 'modern', discover } or { kind: 'legacy' }`)}var LS={"notifications/tools/list_changed":[`tools/list`],"notifications/prompts/list_changed":[`prompts/list`],"notifications/resources/list_changed":[`resources/list`,`resources/templates/list`]},RS=64,zS=class extends Kee{_serverCapabilities;_serverVersion;_capabilities;_instructions;_jsonSchemaValidator;_cache;_defaultCacheTtlMs;_listMaxPages;_listChangedDebounceTimers=new Map;_listChangedConfig;_enforceStrictCapabilities;_versionNegotiation;_supportedProtocolVersionsOption;_inputRequiredDriverConfig;_listenState=new Map;_nextListenId=0;_autoOpenedSubscription;_discoverResult;_resetConnectionState(){if(this._negotiatedProtocolVersion=void 0,this._serverCapabilities=void 0,this._serverVersion=void 0,this._instructions=void 0,this._discoverResult=void 0,this._autoOpenedSubscription=void 0,this._listenState.size>0){let e=new yv(vv.ConnectionClosed,`subscriptions/listen: client reconnected or closed; subscription state from the previous connection was reset`);for(let t of this._listenState.values())t.settle({cause:`remote`,error:e})}this._listenState.clear();for(let e of this._listChangedDebounceTimers.values())clearTimeout(e);this._listChangedDebounceTimers.clear(),this._cache.resetForReconnect()}async close(){try{await super.close()}finally{this._resetConnectionState()}}constructor(e,t){super(t),this._clientInfo=e,this._capabilities=t?.capabilities?{...t.capabilities}:{},this._jsonSchemaValidator=t?.jsonSchemaValidator??new Pte,this._enforceStrictCapabilities=t?.enforceStrictCapabilities??!1,this._versionNegotiation=t?.versionNegotiation,this._supportedProtocolVersionsOption=t?.supportedProtocolVersions,this._inputRequiredDriverConfig=Nee(t?.inputRequired),this._cache=new aS(t?.responseCacheStore??new tS,t?.responseCacheStore!==void 0,e=>this._reportStoreError(e),t?.cachePartition??``),this._defaultCacheTtlMs=t?.defaultCacheTtlMs??0,this._listMaxPages=t?.listMaxPages??RS,t?.listChanged&&(this._listChangedConfig=t.listChanged)}buildContext(e,t){return e}_shouldDropInbound(e){if(this._negotiatedProtocolVersion!==void 0&&Tv(this._negotiatedProtocolVersion)&&Wy(e))return`drop`}_outboundMetaEnvelope(){let e=this._negotiatedProtocolVersion;if(e!==void 0)return this._wireCodec().outboundEnvelope({protocolVersion:e,clientInfo:this._clientInfo,clientCapabilities:this._capabilities})}_resolveNonCompleteResult(e,t){return this._inputRequiredDriverConfig.autoFulfill?Qee({getRequestHandler:e=>this._getRequestHandler(e),buildContext:e=>this.buildContext(e,void 0),sessionId:this.transport?.sessionId},this._inputRequiredDriverConfig,e,t):Promise.reject(new yv(vv.UnsupportedResultType,`Unsupported result type 'input_required' for ${t.request.method}: multi-round-trip auto-fulfilment is not enabled on this instance — pass allowInputRequired: true to handle it manually, or enable inputRequired.autoFulfill`,{resultType:`input_required`,method:t.request.method}))}_setupListChangedHandlers(e){e.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler(`tools`,`notifications/tools/list_changed`,e.tools,async()=>(await this.listTools(void 0,{cacheMode:`refresh`})).tools),e.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler(`prompts`,`notifications/prompts/list_changed`,e.prompts,async()=>(await this.listPrompts(void 0,{cacheMode:`refresh`})).prompts),e.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler(`resources`,`notifications/resources/list_changed`,e.resources,async()=>(await this.listResources(void 0,{cacheMode:`refresh`})).resources)}registerCapabilities(e){if(this.transport)throw Error(`Cannot register capabilities after connecting to transport`);this._capabilities=qee(this._capabilities,e)}setVersionNegotiation(e){if(this.transport)throw Error(`Cannot configure version negotiation after connecting to transport`);this._versionNegotiation=e}_wrapHandler(e,t){return e===`elicitation/create`?async(e,n)=>{let r=Ry(this._negotiatedProtocolVersion),i=r.validateRequest(`elicitation/create`,e);if(!i.ok&&i.reason===`not-in-era`&&(i=r.validateInputRequest(`elicitation/create`,e)),!i.ok)throw new ey(i.reason===`not-in-era`?$v.InternalError:$v.InvalidParams,i.reason===`not-in-era`?`No wire schema for elicitation/create in the resolved era`:`Invalid elicitation request: ${i.message}`);let{params:a}=i.value;a.mode=a.mode??`form`;let{supportsFormMode:o,supportsUrlMode:s}=FS(this._capabilities.elicitation);if(a.mode===`form`&&!o)throw new ey($v.InvalidParams,`Client does not support form-mode elicitation requests`);if(a.mode===`url`&&!s)throw new ey($v.InvalidParams,`Client does not support URL-mode elicitation requests`);let c=await t(e,n),l=r.validateResult(`elicitation/create`,c);if(!l.ok&&l.reason===`not-in-era`&&(l=r.validateInputResponse(`elicitation/create`,c)),!l.ok)throw new ey(l.reason===`not-in-era`?$v.InternalError:$v.InvalidParams,l.reason===`not-in-era`?`No wire schema for elicitation/create in the resolved era`:`Invalid elicitation result: ${l.message}`);let u=l.value,d=a.mode===`form`?a.requestedSchema:void 0;if(a.mode===`form`&&u.action===`accept`&&u.content&&d&&this._capabilities.elicitation?.form?.applyDefaults)try{PS(d,u.content)}catch{}return u}:e===`sampling/createMessage`?async(e,n)=>{let r=Ry(this._negotiatedProtocolVersion),i=r.validateRequest(`sampling/createMessage`,e);if(!i.ok&&i.reason===`not-in-era`&&(i=r.validateInputRequest(`sampling/createMessage`,e)),!i.ok)throw new ey(i.reason===`not-in-era`?$v.InternalError:$v.InvalidParams,i.reason===`not-in-era`?`No wire schema for sampling/createMessage in the resolved era`:`Invalid sampling request: ${i.message}`);let{params:a}=i.value,o=await t(e,n),s=!!(a.tools||a.toolChoice),c=r.samplingResultVariant(s,o);if(!c.ok&&c.reason===`not-in-era`&&(c=r.validateInputResponse(`sampling/createMessage`,o)),!c.ok)throw new ey(c.reason===`not-in-era`?$v.InternalError:$v.InvalidParams,c.reason===`not-in-era`?`No result schema for sampling/createMessage in the resolved era`:`Invalid sampling result: ${c.message}`);return c.value}:t}assertCapability(e,t){if(!this._serverCapabilities?.[e])throw new yv(vv.CapabilityNotSupported,`Server does not support ${e} (required for ${t})`)}async connect(e,t){if(t?.prior!=null)return this._connectFromPrior(e,IS(t.prior),t);let n=bS(this._versionNegotiation,this._supportedProtocolVersionsOption);return n.kind===`legacy`?this._connectPlainLegacy(e,t):this._connectNegotiated(e,n,t)}async _connectPlainLegacy(e,t){if(await super.connect(e),e.sessionId!==void 0){let t=this._negotiatedProtocolVersion;t!==void 0&&e.setProtocolVersion?.(t);return}this._resetConnectionState(),await this._legacyHandshake(e,t)}async _legacyHandshake(e,t){let n=Ev(this._supportedProtocolVersions);try{let r=n[0];if(r===void 0)throw new yv(vv.EraNegotiationFailed,`Cannot run the initialize handshake: supportedProtocolVersions contains no pre-2026-07-28 protocol version`);let i=await this.request({method:`initialize`,params:{protocolVersion:r,capabilities:this._capabilities,clientInfo:this._clientInfo}},t);if(i===void 0)throw Error(`Server sent invalid initialize result: ${i}`);if(!n.includes(i.protocolVersion))throw Error(`Server's protocol version is not supported: ${i.protocolVersion}`);this._serverCapabilities=i.capabilities,this._serverVersion=i.serverInfo,this._cache.setServerIdentity(this._deriveServerIdentity(e)),e.setProtocolVersion&&e.setProtocolVersion(i.protocolVersion),this._instructions=i.instructions,await this.notification({method:`notifications/initialized`}),this._negotiatedProtocolVersion=i.protocolVersion,this._listChangedConfig&&this._setupListChangedHandlers(this._listChangedConfig)}catch(e){throw this.close(),e}}async _connectNegotiated(e,t,n){if(e.sessionId!==void 0){await super.connect(e);let t=this._negotiatedProtocolVersion;t!==void 0&&e.setProtocolVersion&&e.setProtocolVersion(t);return}this._resetConnectionState();let r;try{let i=SS(e),a={clientInfo:this._clientInfo,capabilities:this._capabilities,environment:xS(),defaultTimeoutMs:n?.timeout??6e4},o=i===`stdio`?kS(e):void 0;r=o===void 0?await OS(t,{...a,transport:e,transportKind:i}):await AS(t,e,o,a)}catch(t){throw await e.close().catch(()=>{}),TS(e),t}if(TS(e),await super.connect(e),r.era===`legacy`){await this._legacyHandshake(e,n);return}if(this._serverCapabilities=r.discover.capabilities,this._serverVersion=NS(r.discover),this._cache.setServerIdentity(this._deriveServerIdentity(e)),this._instructions=r.discover.instructions,this._discoverResult=r.discover,this._negotiatedProtocolVersion=r.version,e.setProtocolVersion&&e.setProtocolVersion(r.version),this._listChangedConfig){let e=this._listChangedConfig,t=this._serverCapabilities,r={...e.tools&&t?.tools?.listChanged&&{tools:e.tools},...e.prompts&&t?.prompts?.listChanged&&{prompts:e.prompts},...e.resources&&t?.resources?.listChanged&&{resources:e.resources}},i=!0;try{this._setupListChangedHandlers(r)}catch(e){i=!1,this.onerror?.(e instanceof Error?e:Error(String(e)))}let a=i?{...r.tools&&{toolsListChanged:!0},...r.prompts&&{promptsListChanged:!0},...r.resources&&{resourcesListChanged:!0}}:{};if(Object.keys(a).length>0){let e=new AbortController,t=()=>e.abort(n?.signal?.reason);n?.signal?.aborted&&t(),n?.signal?.addEventListener(`abort`,t);try{this._autoOpenedSubscription=await this.listen(a,{timeout:n?.timeout,signal:e.signal})}catch(e){if(n?.signal?.aborted)throw await this.close().catch(()=>{}),e;this.onerror?.(e instanceof Error?e:Error(String(e)))}finally{n?.signal?.removeEventListener(`abort`,t)}}}}async _connectFromPrior(e,t,n){if(t.kind===`legacy`)return this._connectPlainLegacy(e,n);let r=t.discover;this._resetConnectionState();let i=this._supportedProtocolVersionsOption,a=(i&&Dv(i).length>0?Dv(i):wv).find(e=>r.supportedVersions.includes(e));if(a===void 0)throw new yv(vv.EraNegotiationFailed,`connect({ prior }) with a modern verdict requires a 2026-07-28+ mutual protocol version; the supplied DiscoverResult and this client's supportedProtocolVersions have no modern overlap. For a server known to be legacy, pass prior: { kind: 'legacy' } to skip the probe and initialize directly, or use versionNegotiation: { mode: 'auto' } to re-probe with legacy fallback.`);if(await super.connect(e),this._discoverResult=r,this._serverCapabilities=r.capabilities,this._serverVersion=NS(r),this._cache.setServerIdentity(this._deriveServerIdentity(e)),this._instructions=r.instructions,this._negotiatedProtocolVersion=a,e.setProtocolVersion?.(a),this._listChangedConfig)try{this._setupListChangedHandlers(this._listChangedConfig)}catch(e){this.onerror?.(e instanceof Error?e:Error(String(e)))}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}_deriveServerIdentity(e){let t=this._serverVersion;return t===void 0?e.sessionId??`anonymous:${Date.now()}-${Math.random().toString(36).slice(2)}`:`${t.name}@${t.version}`}getNegotiatedProtocolVersion(){return this._negotiatedProtocolVersion}getProtocolEra(){let e=this._negotiatedProtocolVersion;if(e!==void 0)return Tv(e)?`modern`:`legacy`}getInstructions(){return this._instructions}getDiscoverResult(){return this._discoverResult}assertCapabilityForMethod(e){switch(e){case`logging/setLevel`:if(!this._serverCapabilities?.logging)throw new yv(vv.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case`prompts/get`:case`prompts/list`:if(!this._serverCapabilities?.prompts)throw new yv(vv.CapabilityNotSupported,`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 new yv(vv.CapabilityNotSupported,`Server does not support resources (required for ${e})`);if(e===`resources/subscribe`&&!this._serverCapabilities.resources.subscribe)throw new yv(vv.CapabilityNotSupported,`Server does not support resource subscriptions (required for ${e})`);break;case`tools/call`:case`tools/list`:if(!this._serverCapabilities?.tools)throw new yv(vv.CapabilityNotSupported,`Server does not support tools (required for ${e})`);break;case`completion/complete`:if(!this._serverCapabilities?.completions)throw new yv(vv.CapabilityNotSupported,`Server does not support completions (required for ${e})`);break;case`initialize`:break;case`server/discover`:break;case`ping`:break}}assertNotificationCapability(e){switch(e){case`notifications/roots/list_changed`:if(!this._capabilities.roots?.listChanged)throw new yv(vv.CapabilityNotSupported,`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){switch(e){case`sampling/createMessage`:if(!this._capabilities.sampling)throw new yv(vv.CapabilityNotSupported,`Client does not support sampling capability (required for ${e})`);break;case`elicitation/create`:if(!this._capabilities.elicitation)throw new yv(vv.CapabilityNotSupported,`Client does not support elicitation capability (required for ${e})`);break;case`roots/list`:if(!this._capabilities.roots)throw new yv(vv.CapabilityNotSupported,`Client does not support roots capability (required for ${e})`);break;case`ping`:break}}async ping(e){return this.request({method:`ping`},e)}async discover(e){let t=await this._requestWithSchema({method:`server/discover`},Nh,e);return this._discoverResult=t,t}async complete(e,t){return this.request({method:`completion/complete`,params:e},t)}async setLoggingLevel(e,t){return this.request({method:`logging/setLevel`,params:{level:e}},t)}async getPrompt(e,t){return this.request({method:`prompts/get`,params:e},t)}async listPrompts(e,t){if(!this._serverCapabilities?.prompts&&!this._enforceStrictCapabilities)return console.debug(`Client.listPrompts() called but server does not advertise prompts capability - returning empty list`),{prompts:[]};if(e?.cursor!==void 0)return this.request({method:`prompts/list`,params:e},t);let n=await this._serveFromCache(`prompts/list`,void 0,t);return n===void 0?this._listAllPages(`prompts/list`,e,t,(e,t)=>e.prompts.push(...t.prompts)):n}async listResources(e,t){if(!this._serverCapabilities?.resources&&!this._enforceStrictCapabilities)return console.debug(`Client.listResources() called but server does not advertise resources capability - returning empty list`),{resources:[]};if(e?.cursor!==void 0)return this.request({method:`resources/list`,params:e},t);let n=await this._serveFromCache(`resources/list`,void 0,t);return n===void 0?this._listAllPages(`resources/list`,e,t,(e,t)=>e.resources.push(...t.resources)):n}async listResourceTemplates(e,t){if(!this._serverCapabilities?.resources&&!this._enforceStrictCapabilities)return console.debug(`Client.listResourceTemplates() called but server does not advertise resources capability - returning empty list`),{resourceTemplates:[]};if(e?.cursor!==void 0)return this.request({method:`resources/templates/list`,params:e},t);let n=await this._serveFromCache(`resources/templates/list`,void 0,t);return n===void 0?this._listAllPages(`resources/templates/list`,e,t,(e,t)=>e.resourceTemplates.push(...t.resourceTemplates)):n}async _listAllPages(e,t,n,r,i){let a=n?.cacheMode===`bypass`,o=this._cache.captureGeneration(e),s=await this.request({method:e,...t&&{params:{...t}}},n),c=s.nextCursor,l=new Set,u=1;for(;c!==void 0&&!l.has(c);){if(this._listMaxPages!==0&&u>=this._listMaxPages)throw new yv(vv.ListPaginationExceeded,`${e}: exceeded listMaxPages (${this._listMaxPages}); server pagination did not terminate`,{method:e,listMaxPages:this._listMaxPages});l.add(c);let i=await this.request({method:e,params:{...t,cursor:c}},n);r(s,i),c=i.nextCursor,u++}return delete s.nextCursor,i?.(s),a||await this._cache.write(e,s,o,this._freshness(s)),s}_freshness(e,t){let n=e,r=typeof n.ttlMs==`number`?n.ttlMs:this._defaultCacheTtlMs,i=n.cacheScope===`public`?`public`:`private`;return{expiresAt:this._cache.now()+Math.min(Math.max(0,r),iS),scope:i,params:t}}async _serveFromCache(e,t,n){if(n?.cacheMode===`bypass`||n?.cacheMode===`refresh`)return;let r=await this._cache.read(e,t).catch(e=>void this._reportStoreError(e));if(r!==void 0){if(n?.signal?.aborted){let e=n.signal.reason;throw e instanceof yv?e:new yv(vv.RequestTimeout,String(e))}return r.value}}_reportStoreError(e){this.onerror?.(e instanceof Error?e:Error(String(e)))}_compileOutputValidator(e){if(e.outputSchema)try{return{ok:!0,validator:this._jsonSchemaValidator.getValidator(e.outputSchema)}}catch(e){return{ok:!1,compileError:e}}}async _resolveXMcpHeaderScan(e,t){let n=t??await this._cache.toolDefinition(e);return n===void 0?void 0:tb(n.inputSchema)}async readResource(e,t){let n=await this._serveFromCache(`resources/read`,e.uri,t);if(n!==void 0)return n;let r=this._cache.captureGeneration(`resources/read`,e.uri),i=await this.request({method:`resources/read`,params:e},t);if(t?.cacheMode!==`bypass`){let n=this._freshness(i,e.uri);n.expiresAt>this._cache.now()?await this._cache.write(`resources/read`,i,r,n):t?.cacheMode===`refresh`&&await this._cache.evictKey(`resources/read`,e.uri)}return i}async subscribeResource(e,t){return this.request({method:`resources/subscribe`,params:e},t)}async unsubscribeResource(e,t){return this.request({method:`resources/unsubscribe`,params:e},t)}async listen(e,t){if(this.transport===void 0)throw new yv(vv.NotConnected,`Not connected`);let n=this._negotiatedProtocolVersion;if(n===void 0||!Tv(n))throw new yv(vv.MethodNotSupportedByProtocolVersion,`subscriptions/listen requires a 2026-07-28-era connection (negotiated: ${n??`none`}). On a 2025-era connection, change notifications are delivered unsolicited: use ClientOptions.listChanged and resources/subscribe instead.`,{method:`subscriptions/listen`,protocolVersion:n});if(t?.signal?.aborted){let e=t.signal.reason;throw e instanceof yv?e:new yv(vv.RequestTimeout,String(e))}let r=new AbortController,i=`listen:${this._nextListenId++}`,a=`opening`,o,s,c,l,u=new Promise((e,t)=>{c=e,l=t}),d,f=new Promise(e=>{d=e}),p=e=>{if(a===`closed`)return;let n=a===`opening`;if(o!==void 0&&(clearTimeout(o),o=void 0),`ack`in e){a=`open`,c(e.ack);return}a=`closed`,s!==void 0&&t?.signal?.removeEventListener(`abort`,s),this._listenState.delete(i),r.abort(),d(e.cause),n&&l(e.error??new yv(vv.ConnectionClosed,`subscriptions/listen closed before the server acknowledged`))},m=async()=>{r.abort(),await this.notification({method:`notifications/cancelled`,params:{requestId:i}}).catch(()=>{})},h=async()=>{a!==`closed`&&(p({cause:`local`}),await m())};this._listenState.set(i,{settle:p});let g=t?.timeout??6e4;if(o=setTimeout(()=>{p({cause:`remote`,error:new yv(vv.RequestTimeout,`subscriptions/listen ack timed out`,{timeout:g})}),m().catch(()=>{})},g),t?.signal){let e=t.signal;s=()=>{if(a===`closed`)return;let t=e.reason;p({cause:`local`,error:t instanceof Error?t:Error(String(t??`Aborted`))}),m().catch(()=>{})},e.addEventListener(`abort`,s,{once:!0})}let _={jsonrpc:`2.0`,id:i,method:`subscriptions/listen`,params:{_meta:{...this._outboundMetaEnvelope()},notifications:e}};try{await this.transport.send(_,{requestSignal:r.signal,onRequestStreamEnd:()=>p({cause:`remote`,error:Error(`subscriptions/listen: stream ended`)})})}catch(e){p({cause:`remote`,error:e instanceof Error?e:Error(String(e))})}return{honoredFilter:await u,close:h,closed:f}}get autoOpenedSubscription(){return this._autoOpenedSubscription}_onnotification(e,t){let n=Object.hasOwn(LS,e.method)?LS[e.method]:void 0;if(e.method===`notifications/resources/updated`){let t=e.params?.uri;typeof t==`string`&&this._cache.evictKey(`resources/read`,t)}else if(n!==void 0)for(let e of n)this._cache.evict(e);if(e.method===`notifications/subscriptions/acknowledged`){let t=e.params?._meta?.[Jm],n=typeof t==`string`?this._listenState.get(t):void 0;if(n!==void 0){let t=this._wireCodec().validateNotification(`notifications/subscriptions/acknowledged`,e);n.settle({ack:t.ok?t.value.params.notifications:{}});return}}if(e.method===`notifications/cancelled`){let t=e.params?.requestId,n=typeof t==`string`?this._listenState.get(t):void 0;if(n!==void 0){n.settle({cause:`remote`,error:Error(`subscriptions/listen: server cancelled the subscription`)});return}}super._onnotification(e,t)}_onresponse(e){let t=e.id,n=typeof t==`string`?this._listenState.get(t):void 0;if(n!==void 0){qy(e)?n.settle({cause:`remote`,error:ey.fromError(e.error.code,e.error.message,e.error.data)}):n.settle({cause:`graceful`,error:new yv(vv.ConnectionClosed,`subscriptions/listen: server closed the subscription gracefully before acknowledging`)});return}super._onresponse(e)}_onclose(){if(this._listenState.size>0){let e=new yv(vv.ConnectionClosed,`Connection closed`);for(let t of this._listenState.values())t.settle({cause:`remote`,error:e});this._listenState.clear()}super._onclose()}async callTool(e,t){let n=this.getProtocolEra()===`modern`&&xS()!==`browser`,r=async()=>{if(!n)return t;let r;try{r=await this._resolveXMcpHeaderScan(e.name,t?.toolDefinition)}catch(e){this._reportStoreError(e)}if(!r?.valid||r.declarations.length===0)return t;let i=fb(r.declarations,e.arguments);return Object.keys(i).length===0?t:{...t,headers:{...t?.headers,...i}}},i=t?.toolDefinition===void 0?await this._cache.outputValidator(e.name,e=>this._compileOutputValidator(e)).catch(e=>void this._reportStoreError(e)):this._compileOutputValidator(t.toolDefinition),a=()=>{if(i===void 0||i.ok)return;let t=i.compileError,n=(t instanceof Error?t.message:String(t)).slice(0,200);throw new ey($v.InvalidParams,`Tool '${e.name}' has an invalid outputSchema: ${n}`)};a();let o;try{o=await this.request({method:`tools/call`,params:e},await r())}catch(s){let c=s instanceof ey&&s.code===-32020;if(!n||!c||t?.toolDefinition!==void 0)throw s;let l={signal:t?.signal,timeout:t?.timeout,cacheMode:`refresh`};await this._cache.evict(`tools/list`),await this.listTools(void 0,l).catch(e=>this._reportStoreError(e)),i=await this._cache.outputValidator(e.name,e=>this._compileOutputValidator(e)).catch(e=>void this._reportStoreError(e)),a(),o=await this.request({method:`tools/call`,params:e},await r())}let s=i!==void 0&&i.ok?i.validator:void 0;if(s){if(o.structuredContent===void 0&&!o.isError)throw new ey($v.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`);if(o.structuredContent!==void 0&&!o.isError)try{let e=s(o.structuredContent);if(!e.valid)throw new ey($v.InvalidParams,`Structured content does not match the tool's output schema: ${e.errorMessage}`)}catch(e){throw e instanceof ey?e:new ey($v.InvalidParams,`Failed to validate structured content: ${e instanceof Error?e.message:String(e)}`)}}return o}async listTools(e,t){if(!this._serverCapabilities?.tools&&!this._enforceStrictCapabilities)return console.debug(`Client.listTools() called but server does not advertise tools capability - returning empty list`),{tools:[]};if(e?.cursor!==void 0){let n=await this.request({method:`tools/list`,params:e},t);return this._excludeInvalidXMcpHeaderTools(n),n}let n=await this._serveFromCache(`tools/list`,void 0,t);return n===void 0?this._listAllPages(`tools/list`,e,t,(e,t)=>e.tools.push(...t.tools),e=>this._excludeInvalidXMcpHeaderTools(e)):n}_excludeInvalidXMcpHeaderTools(e){if(this.getProtocolEra()!==`modern`||!this.transport||SS(this.transport)===`stdio`)return;let t=e.tools.filter(e=>{let t=tb(e.inputSchema);return t.valid?!0:(console.warn(`[mcp-sdk] excluding tool '${e.name}' from tools/list: invalid x-mcp-header declaration — ${t.reason}`),!1)});t.length!==e.tools.length&&(e.tools=t)}_setupListChangedHandler(e,t,n,r){let i=pb(Hg,n);if(!i.success)throw Error(`Invalid ${e} listChanged options: ${i.error.message}`);if(typeof n.onChanged!=`function`)throw TypeError(`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`})}};(class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SseError`})}static[Symbol.hasInstance](e){return hv(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return hv(this,e)}constructor(e,t,n){super(`SSE error: ${t}`),this.code=e,this.event=n,mv(this,new.target)}});var BS=1,VS={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2},HS=new Set([`authorization`,`content-type`,`mcp-protocol-version`,`mcp-method`,`mcp-name`,`mcp-session-id`]);function US(e,t){if(typeof AbortSignal.any==`function`)return AbortSignal.any([e,t]);let n=new AbortController;if(e.aborted)return n.abort(e.reason),n.signal;if(t.aborted)return n.abort(t.reason),n.signal;let r=()=>{e.removeEventListener(`abort`,i),t.removeEventListener(`abort`,a)};function i(){r(),n.abort(e.reason)}function a(){r(),n.abort(t.reason)}return e.addEventListener(`abort`,i,{once:!0}),t.addEventListener(`abort`,a,{once:!0}),n.signal}var WS=class{_abortController;_url;_resourceMetadataUrl;_scope;_requestInit;_authProvider;_oauthProvider;_skipIssuerMetadataValidation;_fetch;_fetchWithInit;_sessionId;_reconnectionOptions;_protocolVersion;_onInsufficientScope;_maxStepUpRetries;_serverRetryMs;_reconnectionScheduler;_cancelReconnection;onclose;onerror;onmessage;hasPerRequestStream=!0;constructor(e,t){this._url=e,this._resourceMetadataUrl=void 0,this._scope=void 0,this._requestInit=t?.requestInit,this._skipIssuerMetadataValidation=t?.skipIssuerMetadataValidation,ux(t?.authProvider)?(this._oauthProvider=t.authProvider,this._authProvider=fx(t.authProvider,{skipIssuerMetadataValidation:t.skipIssuerMetadataValidation})):this._authProvider=t?.authProvider,this._fetch=t?.fetch,this._fetchWithInit=nte(t?.fetch,t?.requestInit),this._sessionId=t?.sessionId,this._protocolVersion=t?.protocolVersion,this._reconnectionOptions=t?.reconnectionOptions??VS,this._reconnectionScheduler=t?.reconnectionScheduler,this._onInsufficientScope=t?.onInsufficientScope??`reauthorize`,this._maxStepUpRetries=Math.max(0,t?.maxStepUpRetries??BS)}async _stepUpAuthorize(e,t){if(this._onInsufficientScope===`throw`||!this._oauthProvider)throw new sx({requiredScope:e.scope,resourceMetadataUrl:e.resourceMetadataUrl,errorDescription:e.errorDescription});if(t>=this._maxStepUpRetries)throw new bv(vv.ClientHttpForbidden,`Server returned 403 insufficient_scope after step-up re-authorization (retry limit ${this._maxStepUpRetries} reached)`,{status:403,statusText:e.statusText??`Forbidden`,text:e.text});e.resourceMetadataUrl&&(this._resourceMetadataUrl=e.resourceMetadataUrl);let n=await this._oauthProvider.tokens(),r=gx(this._scope,n?.scope,e.scope);this._scope=r;let i=_x(r,n?.scope);return Mx(this._oauthProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:r,forceReauthorization:i,fetchFn:this._fetchWithInit,skipIssuerMetadataValidation:this._skipIssuerMetadataValidation})}async _commonHeaders(){let e={},t=await this._authProvider?.token();t&&(e.Authorization=`Bearer ${t}`),this._sessionId&&(e[`mcp-session-id`]=this._sessionId),this._protocolVersion&&(e[`mcp-protocol-version`]=this._protocolVersion);let n=Hb(this._requestInit?.headers);return new Headers({...e,...n})}_applyBodyDerivedHeaders(e,t){if(Array.isArray(t)||!Wy(t))return;let n=t.params?._meta?.[Wm];if(typeof n!=`string`)return;e.set(`mcp-protocol-version`,n),e.set(`mcp-method`,t.method);let r=t.params,i=t.method===`resources/read`?typeof r?.uri==`string`?r.uri:void 0:typeof r?.name==`string`?r.name:void 0;i!==void 0&&e.set(`mcp-name`,ub(i))}_isModernEnvelopedRequest(e){if(Array.isArray(e)||!Wy(e))return!1;let t=e.params?._meta?.[Wm];return typeof t==`string`&&Tv(t)}async _startOrAuthSse(e,t=!1,n=0){let{resumptionToken:r,requestSignal:i}=e,a=()=>this._abortController?.signal.aborted===!0||i?.aborted===!0;try{let a=await this._commonHeaders(),o=[...a.get(`accept`)?.split(`,`).map(e=>e.trim().toLowerCase())??[],`text/event-stream`];a.set(`accept`,[...new Set(o)].join(`, `)),r&&a.set(`last-event-id`,r);let s=this._abortController?.signal,c=i!==void 0&&s!==void 0?US(s,i):i??s,l=await(this._fetch??fetch)(this._url,{...this._requestInit,method:`GET`,headers:a,signal:c});if(!l.ok){if(l.status===401&&this._authProvider){if(l.headers.has(`www-authenticate`)){let{resourceMetadataUrl:e,scope:t}=Lx(l);this._resourceMetadataUrl=e,this._scope=gx(this._scope,t)}if(this._authProvider.onUnauthorized&&!t)return await this._authProvider.onUnauthorized({response:l,serverUrl:this._url,fetchFn:this._fetchWithInit}),await l.text?.().catch(()=>{}),this._startOrAuthSse(e,!0,n);throw await l.text?.().catch(()=>{}),t?new bv(vv.ClientHttpAuthentication,`Server returned 401 after re-authentication`,{status:401,statusText:l.statusText}):new px}if(l.status===403){let{resourceMetadataUrl:r,scope:i,error:a,errorDescription:o}=Lx(l);if(a===`insufficient_scope`){let a=await l.text?.().catch(()=>null);if(await this._stepUpAuthorize({scope:i,resourceMetadataUrl:r,errorDescription:o,statusText:l.statusText,text:a},n)!==`AUTHORIZED`)throw new px;return this._startOrAuthSse(e,t,n+1)}}if(await l.text?.().catch(()=>{}),l.status===405){e.onRequestStreamEnd?.();return}throw new bv(vv.ClientHttpFailedToOpenStream,`Failed to open SSE stream: ${l.statusText}`,{status:l.status,statusText:l.statusText})}this._handleSseStream(l.body,e,!0)}catch(e){throw a()||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.`)),e.onRequestStreamEnd?.();return}let r=this._getNextReconnectionDelay(t),i=()=>{this._cancelReconnection=void 0,!(this._abortController?.signal.aborted||e.requestSignal?.aborted)&&this._startOrAuthSse(e).catch(n=>{if(!(this._abortController?.signal.aborted||e.requestSignal?.aborted)){this.onerror?.(Error(`Failed to reconnect SSE stream: ${n instanceof Error?n.message:String(n)}`));try{this._scheduleReconnection(e,t+1)}catch(e){this.onerror?.(e instanceof Error?e:Error(String(e)))}}})};if(this._reconnectionScheduler){let e=this._reconnectionScheduler(i,r,t);this._cancelReconnection=typeof e==`function`?e:void 0}else{let e=setTimeout(i,r);this._cancelReconnection=()=>clearTimeout(e)}}_handleSseStream(e,t,n){if(!e){t.onRequestStreamEnd?.();return}let{onresumptiontoken:r,replayMessageId:i,requestSignal:a,onRequestStreamEnd:o}=t,s=()=>this._abortController?.signal.aborted===!0||a?.aborted===!0,c,l=!1,u=!1;(async()=>{try{let t=e.pipeThrough(new TextDecoderStream).pipeThrough(new tx({onRetry:e=>{this._serverRetryMs=e}})).getReader();for(;;){let{value:e,done:n}=await t.read();if(n)break;if(e.id&&(c=e.id,l=!0,r?.(e.id)),e.data&&(!e.event||e.event===`message`))try{let t=gh.parse(JSON.parse(e.data));(Ky(t)||qy(t))&&(u=!0,i!==void 0&&(t.id=i)),this.onmessage?.(t)}catch(e){this.onerror?.(e)}}(n||l)&&!u&&this._abortController&&!s()?this._scheduleReconnection({resumptionToken:c,onresumptiontoken:r,replayMessageId:i,requestSignal:a,onRequestStreamEnd:o},0):s()||o?.()}catch(e){if(s())return;if(this.onerror?.(Error(`SSE stream disconnected: ${e}`)),(n||l)&&!u&&this._abortController&&!s())try{this._scheduleReconnection({resumptionToken:c,onresumptiontoken:r,replayMessageId:i,requestSignal:a,onRequestStreamEnd:o},0)}catch(e){this.onerror?.(Error(`Failed to reconnect: ${e instanceof Error?e.message:String(e)}`)),o?.()}else o?.()}})()}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,t){if(!this._oauthProvider)throw new px(`finishAuth requires an OAuthClientProvider`);let{authorizationCode:n,iss:r}=await vx(e,t,this._oauthProvider,this._url,{fetchFn:this._fetchWithInit,resourceMetadataUrl:this._resourceMetadataUrl});if(await Mx(this._oauthProvider,{serverUrl:this._url,authorizationCode:n,iss:r,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit,skipIssuerMetadataValidation:this._skipIssuerMetadataValidation})!==`AUTHORIZED`)throw new px(`Failed to authorize`)}async close(){try{this._cancelReconnection?.()}finally{this._cancelReconnection=void 0,this._abortController?.abort(),this.onclose?.()}}async send(e,t){return this._send(e,t,!1)}async _send(e,t,n,r=0){try{let{resumptionToken:i,onresumptiontoken:a}=t||{};if(i){this._startOrAuthSse({resumptionToken:i,replayMessageId:Wy(e)?e.id:void 0,requestSignal:t?.requestSignal}).catch(e=>this.onerror?.(e));return}let o=await this._commonHeaders();this._applyBodyDerivedHeaders(o,e);let s=Array.isArray(e)?e.some(e=>Yy(e)):Yy(e);if(s&&o.delete(`mcp-session-id`),t?.headers!==void 0)for(let[e,n]of Object.entries(t.headers))HS.has(e.toLowerCase())||o.set(e,n);o.set(`content-type`,`application/json`);let c=[...o.get(`accept`)?.split(`,`).map(e=>e.trim().toLowerCase())??[],`application/json`,`text/event-stream`];o.set(`accept`,[...new Set(c)].join(`, `));let l=this._abortController?.signal,u=t?.requestSignal!==void 0&&l!==void 0?US(l,t.requestSignal):t?.requestSignal??l,d={...this._requestInit,method:`POST`,headers:o,body:JSON.stringify(e),signal:u},f=await(this._fetch??fetch)(this._url,d);if(s&&f.ok&&(this._sessionId=f.headers.get(`mcp-session-id`)||void 0),!f.ok){if(f.status===401&&this._authProvider){if(f.headers.has(`www-authenticate`)){let{resourceMetadataUrl:e,scope:t}=Lx(f);this._resourceMetadataUrl=e,this._scope=gx(this._scope,t)}if(this._authProvider.onUnauthorized&&!n)return await this._authProvider.onUnauthorized({response:f,serverUrl:this._url,fetchFn:this._fetchWithInit}),await f.text?.().catch(()=>{}),this._send(e,t,!0,r);throw await f.text?.().catch(()=>{}),n?new bv(vv.ClientHttpAuthentication,`Server returned 401 after re-authentication`,{status:401,statusText:f.statusText}):new px}let i=await f.text?.().catch(()=>null);if(f.status===403){let{resourceMetadataUrl:a,scope:o,error:s,errorDescription:c}=Lx(f);if(s===`insufficient_scope`){if(await this._stepUpAuthorize({scope:o,resourceMetadataUrl:a,errorDescription:c,statusText:f.statusText,text:i},r)!==`AUTHORIZED`)throw new px;return this._send(e,t,n,r+1)}}if(f.status===400&&typeof i==`string`&&this._isModernEnvelopedRequest(e))try{let t=gh.parse(JSON.parse(i)),n=(Array.isArray(e)?e:[e]).filter(e=>Wy(e));if(qy(t)&&n.some(e=>e.id===t.id)){this.onmessage?.(t);return}}catch{}throw new bv(vv.ClientHttpNotImplemented,`Error POSTing to endpoint: ${i}`,{status:f.status,statusText:f.statusText,text:i})}if(f.status===202){await f.text?.().catch(()=>{}),Xy(e)&&this._startOrAuthSse({resumptionToken:void 0}).catch(e=>this.onerror?.(e));return}let p=(Array.isArray(e)?e:[e]).some(e=>`method`in e&&`id`in e&&e.id!==void 0),m=f.headers.get(`content-type`),h=tte(m);if(p)if(h===`text/event-stream`)this._handleSseStream(f.body,{onresumptiontoken:a,requestSignal:t?.requestSignal,onRequestStreamEnd:t?.onRequestStreamEnd},!1);else if(h===`application/json`){let e=await f.json(),t=Array.isArray(e)?e.map(e=>gh.parse(e)):[gh.parse(e)];for(let e of t)this.onmessage?.(e)}else throw await f.text?.().catch(()=>{}),new yv(vv.ClientHttpUnexpectedContent,`Unexpected content type: ${m}`,{contentType:m});else await f.text?.().catch(()=>{})}catch(e){throw t?.requestSignal?.aborted!==!0&&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.text?.().catch(()=>{}),!n.ok&&n.status!==405)throw new bv(vv.ClientHttpFailedToTerminateSession,`Failed to terminate session: ${n.statusText}`,{status:n.status,statusText: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})}},GS=5e3,KS=2e4;function qS(e){try{let t=JSON.stringify(e);return t?Math.ceil(new TextEncoder().encode(t).length/4):0}catch{return 0}}function JS(e){let{meta:t,...n}=e;return qS(n)}function YS(e){return qS(e?.modelContent)}function XS(e,t){let n=JS(e);n>=5e3&&console.warn(`[skybridge] Tool "${t}" returned ${n} estimated model-visible tokens; this reaches the ${GS}-token warning threshold and may overload model context. Content and structured content are included in this estimate.`)}function ZS(e,t){let n=qS(e);n>=2e4&&console.warn(`[skybridge] ${t} is persisting ${n} estimated tokens in model-visible view state; this reaches the ${KS}-token warning threshold and may overload model context. Persisted view state and data-llm context are included in this estimate.`)}function QS(e,t){if(e instanceof Promise)throw Error(t)}function $S(e,t){let n={},r=[];for(let i in e){let a=e[i][`~standard`].validate(t[i]);if(QS(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 eC(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)??$S(o,t);QS(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),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 tC=eC({clientPrefix:`VITE_`,client:{VITE_MCP_SERVER_URL:W().default(`${window.location.origin}/mcp`)},runtimeEnv:{BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1},emptyStringAsUndefined:!0}),nC=u(_(),1),rC=typeof global==`object`&&global&&global.Object===Object&&global,iC=typeof self==`object`&&self&&self.Object===Object&&self,aC=rC||iC||Function(`return this`)(),oC=aC.Symbol,sC=Object.prototype,cC=sC.hasOwnProperty,lC=sC.toString,uC=oC?oC.toStringTag:void 0;function dC(e){var t=cC.call(e,uC),n=e[uC];try{e[uC]=void 0;var r=!0}catch{}var i=lC.call(e);return r&&(t?e[uC]=n:delete e[uC]),i}var fC=Object.prototype.toString;function pC(e){return fC.call(e)}var mC=`[object Null]`,hC=`[object Undefined]`,gC=oC?oC.toStringTag:void 0;function _C(e){return e==null?e===void 0?hC:mC:gC&&gC in Object(e)?dC(e):pC(e)}function vC(e){return typeof e==`object`&&!!e}var yC=`[object Symbol]`;function bC(e){return typeof e==`symbol`||vC(e)&&_C(e)==yC}function xC(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 SC=Array.isArray,CC=1/0,wC=oC?oC.prototype:void 0,TC=wC?wC.toString:void 0;function EC(e){if(typeof e==`string`)return e;if(SC(e))return xC(e,EC)+``;if(bC(e))return TC?TC.call(e):``;var t=e+``;return t==`0`&&1/e==-CC?`-0`:t}var DC=/\s/;function OC(e){for(var t=e.length;t--&&DC.test(e.charAt(t)););return t}var kC=/^\s+/;function AC(e){return e&&e.slice(0,OC(e)+1).replace(kC,``)}function jC(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}var MC=NaN,NC=/^[-+]0x[0-9a-f]+$/i,PC=/^0b[01]+$/i,FC=/^0o[0-7]+$/i,IC=parseInt;function LC(e){if(typeof e==`number`)return e;if(bC(e))return MC;if(jC(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=jC(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=AC(e);var n=PC.test(e);return n||FC.test(e)?IC(e.slice(2),n?2:8):NC.test(e)?MC:+e}var RC=1/0,zC=17976931348623157e292;function BC(e){return e?(e=LC(e),e===RC||e===-RC?(e<0?-1:1)*zC:e===e?e:0):e===0?e:0}function VC(e){var t=BC(e),n=t%1;return t===t?n?t-n:t:0}function HC(e){return e}var UC=`[object AsyncFunction]`,WC=`[object Function]`,GC=`[object GeneratorFunction]`,KC=`[object Proxy]`;function qC(e){if(!jC(e))return!1;var t=_C(e);return t==WC||t==GC||t==UC||t==KC}var JC=aC[`__core-js_shared__`],YC=function(){var e=/[^.]+$/.exec(JC&&JC.keys&&JC.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function XC(e){return!!YC&&YC in e}var ZC=Function.prototype.toString;function QC(e){if(e!=null){try{return ZC.call(e)}catch{}try{return e+``}catch{}}return``}var $C=/[\\^$.*+?()[\]{}|]/g,ew=/^\[object .+?Constructor\]$/,tw=Function.prototype,nw=Object.prototype,rw=tw.toString,iw=nw.hasOwnProperty,aw=RegExp(`^`+rw.call(iw).replace($C,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function ow(e){return!jC(e)||XC(e)?!1:(qC(e)?aw:ew).test(QC(e))}function sw(e,t){return e?.[t]}function cw(e,t){var n=sw(e,t);return ow(n)?n:void 0}var lw=cw(aC,`WeakMap`),uw=Object.create,dw=function(){function e(){}return function(t){if(!jC(t))return{};if(uw)return uw(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function fw(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 pw(){}function mw(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}var hw=800,gw=16,_w=Date.now;function vw(e){var t=0,n=0;return function(){var r=_w(),i=gw-(r-n);if(n=r,i>0){if(++t>=hw)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function yw(e){return function(){return e}}var bw=function(){try{var e=cw(Object,`defineProperty`);return e({},``,{}),e}catch{}}(),xw=vw(bw?function(e,t){return bw(e,`toString`,{configurable:!0,enumerable:!1,value:yw(t),writable:!0})}:HC);function Sw(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function Cw(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 ww(e){return e!==e}function Tw(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function Ew(e,t,n){return t===t?Tw(e,t,n):Cw(e,ww,n)}function Dw(e,t){return!!(e!=null&&e.length)&&Ew(e,t,0)>-1}var Ow=9007199254740991,kw=/^(?:0|[1-9]\d*)$/;function Aw(e,t){var n=typeof e;return t??=Ow,!!t&&(n==`number`||n!=`symbol`&&kw.test(e))&&e>-1&&e%1==0&&e<t}function jw(e,t,n){t==`__proto__`&&bw?bw(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Mw(e,t){return e===t||e!==e&&t!==t}var Nw=Object.prototype.hasOwnProperty;function Pw(e,t,n){var r=e[t];(!(Nw.call(e,t)&&Mw(r,n))||n===void 0&&!(t in e))&&jw(e,t,n)}function Fw(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?jw(n,s,c):Pw(n,s,c)}return n}var Iw=Math.max;function Lw(e,t,n){return t=Iw(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=Iw(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),fw(e,this,s)}}function Rw(e,t){return xw(Lw(e,t,HC),e+``)}var zw=9007199254740991;function Bw(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=zw}function Vw(e){return e!=null&&Bw(e.length)&&!qC(e)}function Hw(e,t,n){if(!jC(n))return!1;var r=typeof t;return(r==`number`?Vw(n)&&Aw(t,n.length):r==`string`&&t in n)?Mw(n[t],e):!1}function Uw(e){return Rw(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&&Hw(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 Ww=Object.prototype;function Gw(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||Ww)}function Kw(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var qw=`[object Arguments]`;function Jw(e){return vC(e)&&_C(e)==qw}var Yw=Object.prototype,Xw=Yw.hasOwnProperty,Zw=Yw.propertyIsEnumerable,Qw=Jw(function(){return arguments}())?Jw:function(e){return vC(e)&&Xw.call(e,`callee`)&&!Zw.call(e,`callee`)};function $w(){return!1}var eT=typeof exports==`object`&&exports&&!exports.nodeType&&exports,tT=eT&&typeof module==`object`&&module&&!module.nodeType&&module,nT=tT&&tT.exports===eT?aC.Buffer:void 0,rT=(nT?nT.isBuffer:void 0)||$w,iT=`[object Arguments]`,aT=`[object Array]`,oT=`[object Boolean]`,sT=`[object Date]`,cT=`[object Error]`,lT=`[object Function]`,uT=`[object Map]`,dT=`[object Number]`,fT=`[object Object]`,Vte=`[object RegExp]`,Hte=`[object Set]`,Ute=`[object String]`,Wte=`[object WeakMap]`,Gte=`[object ArrayBuffer]`,Kte=`[object DataView]`,qte=`[object Float32Array]`,Jte=`[object Float64Array]`,Yte=`[object Int8Array]`,Xte=`[object Int16Array]`,Zte=`[object Int32Array]`,Qte=`[object Uint8Array]`,$te=`[object Uint8ClampedArray]`,ene=`[object Uint16Array]`,tne=`[object Uint32Array]`,pT={};pT[qte]=pT[Jte]=pT[Yte]=pT[Xte]=pT[Zte]=pT[Qte]=pT[$te]=pT[ene]=pT[tne]=!0,pT[iT]=pT[aT]=pT[Gte]=pT[oT]=pT[Kte]=pT[sT]=pT[cT]=pT[lT]=pT[uT]=pT[dT]=pT[fT]=pT[Vte]=pT[Hte]=pT[Ute]=pT[Wte]=!1;function nne(e){return vC(e)&&Bw(e.length)&&!!pT[_C(e)]}function mT(e){return function(t){return e(t)}}var hT=typeof exports==`object`&&exports&&!exports.nodeType&&exports,gT=hT&&typeof module==`object`&&module&&!module.nodeType&&module,_T=gT&&gT.exports===hT&&rC.process,vT=function(){try{return gT&&gT.require&&gT.require(`util`).types||_T&&_T.binding&&_T.binding(`util`)}catch{}}(),yT=vT&&vT.isTypedArray,bT=yT?mT(yT):nne,rne=Object.prototype.hasOwnProperty;function xT(e,t){var n=SC(e),r=!n&&Qw(e),i=!n&&!r&&rT(e),a=!n&&!r&&!i&&bT(e),o=n||r||i||a,s=o?Kw(e.length,String):[],c=s.length;for(var l in e)(t||rne.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||Aw(l,c)))&&s.push(l);return s}function ST(e,t){return function(n){return e(t(n))}}var ine=ST(Object.keys,Object),ane=Object.prototype.hasOwnProperty;function CT(e){if(!Gw(e))return ine(e);var t=[];for(var n in Object(e))ane.call(e,n)&&n!=`constructor`&&t.push(n);return t}function wT(e){return Vw(e)?xT(e):CT(e)}var one=Object.prototype.hasOwnProperty,sne=Uw(function(e,t){if(Gw(t)||Vw(t)){Fw(t,wT(t),e);return}for(var n in t)one.call(t,n)&&Pw(e,n,t[n])});function cne(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var lne=Object.prototype.hasOwnProperty;function une(e){if(!jC(e))return cne(e);var t=Gw(e),n=[];for(var r in e)r==`constructor`&&(t||!lne.call(e,r))||n.push(r);return n}function TT(e){return Vw(e)?xT(e,!0):une(e)}var dne=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,fne=/^\w*$/;function ET(e,t){if(SC(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||bC(e)?!0:fne.test(e)||!dne.test(e)||t!=null&&e in Object(t)}var DT=cw(Object,`create`);function pne(){this.__data__=DT?DT(null):{},this.size=0}function mne(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}var hne=`__lodash_hash_undefined__`,gne=Object.prototype.hasOwnProperty;function _ne(e){var t=this.__data__;if(DT){var n=t[e];return n===hne?void 0:n}return gne.call(t,e)?t[e]:void 0}var vne=Object.prototype.hasOwnProperty;function yne(e){var t=this.__data__;return DT?t[e]!==void 0:vne.call(t,e)}var bne=`__lodash_hash_undefined__`;function xne(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=DT&&t===void 0?bne:t,this}function OT(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])}}OT.prototype.clear=pne,OT.prototype.delete=mne,OT.prototype.get=_ne,OT.prototype.has=yne,OT.prototype.set=xne;function Sne(){this.__data__=[],this.size=0}function kT(e,t){for(var n=e.length;n--;)if(Mw(e[n][0],t))return n;return-1}var Cne=Array.prototype.splice;function wne(e){var t=this.__data__,n=kT(t,e);return n<0?!1:(n==t.length-1?t.pop():Cne.call(t,n,1),--this.size,!0)}function Tne(e){var t=this.__data__,n=kT(t,e);return n<0?void 0:t[n][1]}function Ene(e){return kT(this.__data__,e)>-1}function Dne(e,t){var n=this.__data__,r=kT(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function AT(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])}}AT.prototype.clear=Sne,AT.prototype.delete=wne,AT.prototype.get=Tne,AT.prototype.has=Ene,AT.prototype.set=Dne;var jT=cw(aC,`Map`);function One(){this.size=0,this.__data__={hash:new OT,map:new(jT||AT),string:new OT}}function kne(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function MT(e,t){var n=e.__data__;return kne(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function Ane(e){var t=MT(this,e).delete(e);return this.size-=+!!t,t}function jne(e){return MT(this,e).get(e)}function Mne(e){return MT(this,e).has(e)}function Nne(e,t){var n=MT(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function NT(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])}}NT.prototype.clear=One,NT.prototype.delete=Ane,NT.prototype.get=jne,NT.prototype.has=Mne,NT.prototype.set=Nne;var Pne=`Expected a function`;function PT(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(Pne);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(PT.Cache||NT),n}PT.Cache=NT;var Fne=500;function Ine(e){var t=PT(e,function(e){return n.size===Fne&&n.clear(),e}),n=t.cache;return t}var Lne=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Rne=/\\(\\)?/g,FT=Ine(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(Lne,function(e,n,r,i){t.push(r?i.replace(Rne,`$1`):n||e)}),t});function IT(e){return e==null?``:EC(e)}function LT(e,t){return SC(e)?e:ET(e,t)?[e]:FT(IT(e))}var zne=1/0;function RT(e){if(typeof e==`string`||bC(e))return e;var t=e+``;return t==`0`&&1/e==-zne?`-0`:t}function zT(e,t){t=LT(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[RT(t[n++])];return n&&n==r?e:void 0}function Y(e,t,n){var r=e==null?void 0:zT(e,t);return r===void 0?n:r}function BT(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var VT=oC?oC.isConcatSpreadable:void 0;function Bne(e){return SC(e)||Qw(e)||!!(VT&&e&&e[VT])}function HT(e,t,n,r,i){var a=-1,o=e.length;for(n||=Bne,i||=[];++a<o;){var s=e[a];t>0&&n(s)?t>1?HT(s,t-1,n,r,i):BT(i,s):r||(i[i.length]=s)}return i}function UT(e){return e!=null&&e.length?HT(e,1):[]}function WT(e){return xw(Lw(e,void 0,UT),e+``)}var GT=ST(Object.getPrototypeOf,Object),Vne=`[object Object]`,Hne=Function.prototype,Une=Object.prototype,KT=Hne.toString,Wne=Une.hasOwnProperty,Gne=KT.call(Object);function qT(e){if(!vC(e)||_C(e)!=Vne)return!1;var t=GT(e);if(t===null)return!0;var n=Wne.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&KT.call(n)==Gne}function Kne(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 qne(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 Jne(){this.__data__=new AT,this.size=0}function Yne(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Xne(e){return this.__data__.get(e)}function Zne(e){return this.__data__.has(e)}var Qne=200;function $ne(e,t){var n=this.__data__;if(n instanceof AT){var r=n.__data__;if(!jT||r.length<Qne-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new NT(r)}return n.set(e,t),this.size=n.size,this}function JT(e){var t=this.__data__=new AT(e);this.size=t.size}JT.prototype.clear=Jne,JT.prototype.delete=Yne,JT.prototype.get=Xne,JT.prototype.has=Zne,JT.prototype.set=$ne;function ere(e,t){return e&&Fw(t,wT(t),e)}function tre(e,t){return e&&Fw(t,TT(t),e)}var YT=typeof exports==`object`&&exports&&!exports.nodeType&&exports,XT=YT&&typeof module==`object`&&module&&!module.nodeType&&module,ZT=XT&&XT.exports===YT?aC.Buffer:void 0,QT=ZT?ZT.allocUnsafe:void 0;function $T(e,t){if(t)return e.slice();var n=e.length,r=QT?QT(n):new e.constructor(n);return e.copy(r),r}function nre(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 eE(){return[]}var rre=Object.prototype.propertyIsEnumerable,tE=Object.getOwnPropertySymbols,nE=tE?function(e){return e==null?[]:(e=Object(e),nre(tE(e),function(t){return rre.call(e,t)}))}:eE;function ire(e,t){return Fw(e,nE(e),t)}var rE=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)BT(t,nE(e)),e=GT(e);return t}:eE;function are(e,t){return Fw(e,rE(e),t)}function iE(e,t,n){var r=t(e);return SC(e)?r:BT(r,n(e))}function aE(e){return iE(e,wT,nE)}function oE(e){return iE(e,TT,rE)}var sE=cw(aC,`DataView`),cE=cw(aC,`Promise`),lE=cw(aC,`Set`),uE=`[object Map]`,ore=`[object Object]`,dE=`[object Promise]`,fE=`[object Set]`,pE=`[object WeakMap]`,mE=`[object DataView]`,sre=QC(sE),cre=QC(jT),lre=QC(cE),ure=QC(lE),dre=QC(lw),hE=_C;(sE&&hE(new sE(new ArrayBuffer(1)))!=mE||jT&&hE(new jT)!=uE||cE&&hE(cE.resolve())!=dE||lE&&hE(new lE)!=fE||lw&&hE(new lw)!=pE)&&(hE=function(e){var t=_C(e),n=t==ore?e.constructor:void 0,r=n?QC(n):``;if(r)switch(r){case sre:return mE;case cre:return uE;case lre:return dE;case ure:return fE;case dre:return pE}return t});var gE=hE,fre=Object.prototype.hasOwnProperty;function pre(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]==`string`&&fre.call(e,`index`)&&(n.index=e.index,n.input=e.input),n}var _E=aC.Uint8Array;function vE(e){var t=new e.constructor(e.byteLength);return new _E(t).set(new _E(e)),t}function mre(e,t){var n=t?vE(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var hre=/\w*$/;function gre(e){var t=new e.constructor(e.source,hre.exec(e));return t.lastIndex=e.lastIndex,t}var yE=oC?oC.prototype:void 0,bE=yE?yE.valueOf:void 0;function _re(e){return bE?Object(bE.call(e)):{}}function xE(e,t){var n=t?vE(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var vre=`[object Boolean]`,yre=`[object Date]`,bre=`[object Map]`,xre=`[object Number]`,Sre=`[object RegExp]`,Cre=`[object Set]`,wre=`[object String]`,Tre=`[object Symbol]`,Ere=`[object ArrayBuffer]`,Dre=`[object DataView]`,Ore=`[object Float32Array]`,kre=`[object Float64Array]`,Are=`[object Int8Array]`,jre=`[object Int16Array]`,Mre=`[object Int32Array]`,Nre=`[object Uint8Array]`,Pre=`[object Uint8ClampedArray]`,Fre=`[object Uint16Array]`,Ire=`[object Uint32Array]`;function Lre(e,t,n){var r=e.constructor;switch(t){case Ere:return vE(e);case vre:case yre:return new r(+e);case Dre:return mre(e,n);case Ore:case kre:case Are:case jre:case Mre:case Nre:case Pre:case Fre:case Ire:return xE(e,n);case bre:return new r;case xre:case wre:return new r(e);case Sre:return gre(e);case Cre:return new r;case Tre:return _re(e)}}function SE(e){return typeof e.constructor==`function`&&!Gw(e)?dw(GT(e)):{}}var Rre=`[object Map]`;function zre(e){return vC(e)&&gE(e)==Rre}var CE=vT&&vT.isMap,Bre=CE?mT(CE):zre,Vre=`[object Set]`;function Hre(e){return vC(e)&&gE(e)==Vre}var wE=vT&&vT.isSet,Ure=wE?mT(wE):Hre,Wre=1,Gre=2,Kre=4,TE=`[object Arguments]`,qre=`[object Array]`,Jre=`[object Boolean]`,Yre=`[object Date]`,Xre=`[object Error]`,EE=`[object Function]`,Zre=`[object GeneratorFunction]`,Qre=`[object Map]`,$re=`[object Number]`,DE=`[object Object]`,eie=`[object RegExp]`,tie=`[object Set]`,nie=`[object String]`,rie=`[object Symbol]`,iie=`[object WeakMap]`,aie=`[object ArrayBuffer]`,oie=`[object DataView]`,sie=`[object Float32Array]`,cie=`[object Float64Array]`,lie=`[object Int8Array]`,uie=`[object Int16Array]`,die=`[object Int32Array]`,fie=`[object Uint8Array]`,pie=`[object Uint8ClampedArray]`,mie=`[object Uint16Array]`,hie=`[object Uint32Array]`,OE={};OE[TE]=OE[qre]=OE[aie]=OE[oie]=OE[Jre]=OE[Yre]=OE[sie]=OE[cie]=OE[lie]=OE[uie]=OE[die]=OE[Qre]=OE[$re]=OE[DE]=OE[eie]=OE[tie]=OE[nie]=OE[rie]=OE[fie]=OE[pie]=OE[mie]=OE[hie]=!0,OE[Xre]=OE[EE]=OE[iie]=!1;function kE(e,t,n,r,i,a){var o,s=t&Wre,c=t&Gre,l=t&Kre;if(n&&(o=i?n(e,r,i,a):n(e)),o!==void 0)return o;if(!jC(e))return e;var u=SC(e);if(u){if(o=pre(e),!s)return mw(e,o)}else{var d=gE(e),f=d==EE||d==Zre;if(rT(e))return $T(e,s);if(d==DE||d==TE||f&&!i){if(o=c||f?{}:SE(e),!s)return c?are(e,tre(o,e)):ire(e,ere(o,e))}else{if(!OE[d])return i?e:{};o=Lre(e,d,s)}}a||=new JT;var p=a.get(e);if(p)return p;a.set(e,o),Ure(e)?e.forEach(function(r){o.add(kE(r,t,n,r,e,a))}):Bre(e)&&e.forEach(function(r,i){o.set(i,kE(r,t,n,i,e,a))});var m=u?void 0:(l?c?oE:aE:c?TT:wT)(e);return Sw(m||e,function(r,i){m&&(i=r,r=e[i]),Pw(o,i,kE(r,t,n,i,e,a))}),o}var gie=1,_ie=4;function AE(e){return kE(e,gie|_ie)}var vie=`__lodash_hash_undefined__`;function yie(e){return this.__data__.set(e,vie),this}function bie(e){return this.__data__.has(e)}function jE(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new NT;++t<n;)this.add(e[t])}jE.prototype.add=jE.prototype.push=yie,jE.prototype.has=bie;function xie(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 ME(e,t){return e.has(t)}var Sie=1,Cie=2;function NE(e,t,n,r,i,a){var o=n&Sie,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&Cie?new jE: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(!xie(t,function(e,t){if(!ME(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 wie(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function PE(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var Tie=1,Eie=2,Die=`[object Boolean]`,Oie=`[object Date]`,kie=`[object Error]`,Aie=`[object Map]`,jie=`[object Number]`,Mie=`[object RegExp]`,Nie=`[object Set]`,Pie=`[object String]`,Fie=`[object Symbol]`,Iie=`[object ArrayBuffer]`,Lie=`[object DataView]`,FE=oC?oC.prototype:void 0,IE=FE?FE.valueOf:void 0;function Rie(e,t,n,r,i,a,o){switch(n){case Lie:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Iie:return!(e.byteLength!=t.byteLength||!a(new _E(e),new _E(t)));case Die:case Oie:case jie:return Mw(+e,+t);case kie:return e.name==t.name&&e.message==t.message;case Mie:case Pie:return e==t+``;case Aie:var s=wie;case Nie:var c=r&Tie;if(s||=PE,e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=Eie,o.set(e,t);var u=NE(s(e),s(t),r,i,a,o);return o.delete(e),u;case Fie:if(IE)return IE.call(e)==IE.call(t)}return!1}var zie=1,Bie=Object.prototype.hasOwnProperty;function Vie(e,t,n,r,i,a){var o=n&zie,s=aE(e),c=s.length;if(c!=aE(t).length&&!o)return!1;for(var l=c;l--;){var u=s[l];if(!(o?u in t:Bie.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 Hie=1,LE=`[object Arguments]`,RE=`[object Array]`,zE=`[object Object]`,BE=Object.prototype.hasOwnProperty;function Uie(e,t,n,r,i,a){var o=SC(e),s=SC(t),c=o?RE:gE(e),l=s?RE:gE(t);c=c==LE?zE:c,l=l==LE?zE:l;var u=c==zE,d=l==zE,f=c==l;if(f&&rT(e)){if(!rT(t))return!1;o=!0,u=!1}if(f&&!u)return a||=new JT,o||bT(e)?NE(e,t,n,r,i,a):Rie(e,t,c,n,r,i,a);if(!(n&Hie)){var p=u&&BE.call(e,`__wrapped__`),m=d&&BE.call(t,`__wrapped__`);if(p||m){var h=p?e.value():e,g=m?t.value():t;return a||=new JT,i(h,g,n,r,a)}}return f?(a||=new JT,Vie(e,t,n,r,i,a)):!1}function VE(e,t,n,r,i){return e===t?!0:e==null||t==null||!vC(e)&&!vC(t)?e!==e&&t!==t:Uie(e,t,n,r,VE,i)}var Wie=1,Gie=2;function Kie(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 JT;if(r)var f=r(l,u,c,e,t,d);if(!(f===void 0?VE(u,l,Wie|Gie,r,d):f))return!1}}return!0}function HE(e){return e===e&&!jC(e)}function qie(e){for(var t=wT(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,HE(i)]}return t}function UE(e,t){return function(n){return n!=null&&n[e]===t&&(t!==void 0||e in Object(n))}}function Jie(e){var t=qie(e);return t.length==1&&t[0][2]?UE(t[0][0],t[0][1]):function(n){return n===e||Kie(n,e,t)}}function Yie(e,t){return e!=null&&t in Object(e)}function WE(e,t,n){t=LT(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=RT(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&&Bw(i)&&Aw(o,i)&&(SC(e)||Qw(e)))}function GE(e,t){return e!=null&&WE(e,t,Yie)}var Xie=1,Zie=2;function Qie(e,t){return ET(e)&&HE(t)?UE(RT(e),t):function(n){var r=Y(n,e);return r===void 0&&r===t?GE(n,e):VE(t,r,Xie|Zie)}}function $ie(e){return function(t){return t?.[e]}}function eae(e){return function(t){return zT(t,e)}}function tae(e){return ET(e)?$ie(RT(e)):eae(e)}function KE(e){return typeof e==`function`?e:e==null?HC:typeof e==`object`?SC(e)?Qie(e[0],e[1]):Jie(e):tae(e)}function nae(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 qE=nae();function JE(e,t){return e&&qE(e,t,wT)}function rae(e,t){return function(n,r){if(n==null)return n;if(!Vw(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 YE=rae(JE);function XE(e,t,n){(n!==void 0&&!Mw(e[t],n)||n===void 0&&!(t in e))&&jw(e,t,n)}function ZE(e){return vC(e)&&Vw(e)}function QE(e,t){if(!(t===`constructor`&&typeof e[t]==`function`)&&t!=`__proto__`)return e[t]}function iae(e){return Fw(e,TT(e))}function aae(e,t,n,r,i,a,o){var s=QE(e,n),c=QE(t,n),l=o.get(c);if(l){XE(e,n,l);return}var u=a?a(s,c,n+``,e,t,o):void 0,d=u===void 0;if(d){var f=SC(c),p=!f&&rT(c),m=!f&&!p&&bT(c);u=c,f||p||m?SC(s)?u=s:ZE(s)?u=mw(s):p?(d=!1,u=$T(c,!0)):m?(d=!1,u=xE(c,!0)):u=[]:qT(c)||Qw(c)?(u=s,Qw(s)?u=iae(s):(!jC(s)||qC(s))&&(u=SE(c))):d=!1}d&&(o.set(c,u),i(u,c,r,a,o),o.delete(c)),XE(e,n,u)}function $E(e,t,n,r,i){e!==t&&qE(t,function(a,o){if(i||=new JT,jC(a))aae(e,t,o,n,$E,r,i);else{var s=r?r(QE(e,o),a,o+``,e,t,i):void 0;s===void 0&&(s=a),XE(e,o,s)}},TT)}function eD(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 tD=200;function nD(e,t,n,r){var i=-1,a=Dw,o=!0,s=e.length,c=[],l=t.length;if(!s)return c;n&&(t=xC(t,mT(n))),r?(a=eD,o=!1):t.length>=tD&&(a=ME,o=!1,t=new jE(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 rD=Rw(function(e,t){return ZE(e)?nD(e,HT(t,1,ZE,!0)):[]});function iD(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function aD(e){return typeof e==`function`?e:HC}function oD(e,t){return(SC(e)?Sw:YE)(e,aD(t))}var sD=1/0;function cD(e){return e!=null&&e.length?HT(e,sD):[]}var lD=Object.prototype.hasOwnProperty;function uD(e,t){return e!=null&&lD.call(e,t)}function dD(e,t){return e!=null&&WE(e,t,uD)}var fD=`[object String]`;function pD(e){return typeof e==`string`||!SC(e)&&vC(e)&&_C(e)==fD}function mD(e,t){return xC(t,function(t){return e[t]})}function hD(e){return e==null?[]:mD(e,wT(e))}var gD=Math.max;function _D(e,t,n,r){e=Vw(e)?e:hD(e),n=n&&!r?VC(n):0;var i=e.length;return n<0&&(n=gD(i+n,0)),pD(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Ew(e,t,n)>-1}var vD=Math.min;function yD(e,t,n){for(var r=n?eD:Dw,i=e[0].length,a=e.length,o=a,s=Array(a),c=1/0,l=[];o--;){var u=e[o];o&&t&&(u=xC(u,mT(t))),c=vD(u.length,c),s[o]=!n&&(t||i>=120&&u.length>=120)?new jE(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?ME(f,m):r(l,m,n))){for(o=a;--o;){var h=s[o];if(!(h?ME(h,m):r(e[o],m,n)))continue outer}f&&f.push(m),l.push(p)}}return l}function bD(e){return ZE(e)?e:[]}var xD=Rw(function(e){var t=xC(e,bD);return t.length&&t[0]===e[0]?yD(t):[]});function SD(e,t){return t.length<2?e:zT(e,Kne(t,0,-1))}var CD=`[object Map]`,wD=`[object Set]`,TD=Object.prototype.hasOwnProperty;function ED(e){if(e==null)return!0;if(Vw(e)&&(SC(e)||typeof e==`string`||typeof e.splice==`function`||rT(e)||bT(e)||Qw(e)))return!e.length;var t=gE(e);if(t==CD||t==wD)return!e.size;if(Gw(e))return!CT(e).length;for(var n in e)if(TD.call(e,n))return!1;return!0}function DD(e,t){return VE(e,t)}var OD=`[object Number]`;function kD(e){return typeof e==`number`||vC(e)&&_C(e)==OD}function AD(e){return e==null}function jD(e){return e===void 0}var MD=Uw(function(e,t,n){$E(e,t,n)}),ND=Object.prototype.hasOwnProperty;function PD(e,t){t=LT(t,e);var n=-1,r=t.length;if(!r)return!0;for(;++n<r;){var i=RT(t[n]);if(i===`__proto__`&&!ND.call(e,`__proto__`)||(i===`constructor`||i===`prototype`)&&n<r-1)return!1}var a=SD(e,t);return a==null||delete a[RT(iD(t))]}function FD(e){return qT(e)?void 0:e}var ID=1,LD=2,RD=4,zD=WT(function(e,t){var n={};if(e==null)return n;var r=!1;t=xC(t,function(t){return t=LT(t,e),r||=t.length>1,t}),Fw(e,oE(e),n),r&&(n=kE(n,ID|LD|RD,FD));for(var i=t.length;i--;)PD(n,t[i]);return n});function BD(e,t,n,r){if(!jC(e))return e;t=LT(t,e);for(var i=-1,a=t.length,o=a-1,s=e;s!=null&&++i<a;){var c=RT(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=jC(u)?u:Aw(t[i+1])?[]:{})}Pw(s,c,l),s=s[c]}return e}function VD(e,t,n){for(var r=-1,i=t.length,a={};++r<i;){var o=t[r],s=zT(e,o);n(s,o)&&BD(a,LT(o,e),s)}return a}function HD(e,t){if(e==null)return{};var n=xC(oE(e),function(e){return[e]});return t=KE(t),VD(e,n,function(e,n){return t(e,n[0])})}function UD(e,t){return VD(e,t,function(t,n){return GE(e,n)})}var WD=WT(function(e,t){return e==null?{}:UD(e,t)});function GD(e,t,n,r,i){return i(e,function(e,i,a){n=r?(r=!1,e):t(n,e,i,a)}),n}function KD(e,t,n){var r=SC(e)?qne:GD,i=arguments.length<3;return r(e,KE(t,4),n,i,YE)}function qD(e,t,n){return e==null?e:BD(e,t,n)}function JD(e,t,n,r){return r=typeof r==`function`?r:void 0,e==null?e:BD(e,t,n,r)}var YD=9007199254740991,XD=4294967295,ZD=Math.min;function QD(e,t){if(e=VC(e),e<1||e>YD)return[];var n=XD,r=ZD(e,XD);t=aD(t),e-=XD;for(var i=Kw(r,t);++n<e;)t(n);return i}function $D(e){return SC(e)?xC(e,RT):bC(e)?[e]:mw(FT(IT(e)))}function eO(e,t,n){var r=SC(e),i=r||rT(e)||bT(e);if(t=KE(t,4),n==null){var a=e&&e.constructor;n=i?r?new a:[]:jC(e)&&qC(a)?dw(GT(e)):{}}return(i?Sw:JE)(e,function(e,r,i){return t(n,e,r,i)}),n}var tO=lE&&1/PE(new lE([,-0]))[1]==1/0?function(e){return new lE(e)}:pw,nO=200;function rO(e,t,n){var r=-1,i=Dw,a=e.length,o=!0,s=[],c=s;if(n)o=!1,i=eD;else if(a>=nO){var l=t?null:tO(e);if(l)return PE(l);o=!1,i=ME,c=new jE}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 iO=Rw(function(e){return rO(HT(e,1,ZE,!0))});function aO(e){return e&&e.length?rO(e):[]}var oO=0;function sO(e){var t=++oO;return IT(e)+t}function cO(e,t){return e==null||PD(e,t)}var lO=as()(e=>({tools:{},setToolData:(t,n)=>e(e=>{let r=e.tools[t];if(r){let t=!0;for(let e of Object.keys(n))if(r[e]!==n[e]){t=!1;break}if(t)return e}return dO(e,`tools.${t}`,{...r??{},...n})}),updateOpenaiObject:(t,n,r)=>e(e=>e.tools[t]?.openaiObject?dO(e,`tools.${t}.openaiObject.${n}`,r):e),pushOpenAiLog:(t,n)=>e(e=>{let r=e.tools[t]?.openaiLogs||[];return dO(e,`tools.${t}.openaiLogs`,[...r,{...n,id:crypto.randomUUID()}])}),clearOpenAiLogs:t=>e(e=>e.tools[t]?.openaiLogs?.length?dO(e,`tools.${t}.openaiLogs`,[]):e),setOpenInAppUrl:(t,n)=>e(e=>e.tools[t]?.openInAppUrl===n?e:dO(e,`tools.${t}.openInAppUrl`,n))})),uO=e=>{let{tools:t}=lO();return t[e]},dO=(e,t,n)=>{let r=AE(e);return qD(r,t,n),r};function fO(e,t,n){try{return e(t)}catch(e){return n?dt(25,t,e,n):dt(24,t,e),null}}function pO(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),fO(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 mO=pO({parse:e=>e,serialize:String});pO({parse:e=>{let t=parseInt(e);return t==t?t:null},serialize:e=>``+Math.round(e)}),pO({parse:e=>{let t=parseInt(e);return t==t?t-1:null},serialize:e=>``+Math.round(e+1)}),pO({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}}),pO({parse:e=>{let t=parseFloat(e);return t==t?t:null},serialize:String}),pO({parse:e=>e.toLowerCase()===`true`,serialize:String});function hO(e,t){return e.valueOf()===t.valueOf()}pO({parse:e=>{let t=parseInt(e);return t==t?new Date(t):null},serialize:e=>``+e.valueOf(),eq:hO}),pO({parse:e=>{let t=new Date(e);return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString(),eq:hO}),pO({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:hO});var gO=vt(`sync-emitter`,()=>Mt()),_O={};function vO(e,t={}){let n=(0,b.useId)(),r=Ct(),i=wt(),{history:a=r?.history??`replace`,scroll:o=r?.scroll??!1,shallow:s=r?.shallow??!0,throttleMs:c=kt.timeMs,limitUrlUpdates:l=r?.limitUrlUpdates,clearOnDefault:u=r?.clearOnDefault??!0,startTransition:d,urlKeys:f=_O}=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=St(Object.values(m)),g=h.searchParams,_=(0,b.useRef)({}),v=(0,b.useRef)(null),y=(0,b.useRef)(null),x=(0,b.useMemo)(()=>Object.fromEntries(Object.keys(e).map(t=>[t,e[t].defaultValue??null])),[Object.values(e).map(({defaultValue:e})=>e).join(`,`)]),S=Ut(Object.values(m)),[C,w]=(0,b.useState)(()=>yO(e,f,g,S).state),T=(0,b.useRef)(C),E=Object.values(m).map(e=>`${e}=${g.getAll(e)}`).join(`&`)+JSON.stringify(S),D=()=>{let{state:t,hasChanged:r}=yO(e,f,g,S,_.current,T.current);r&&(ut(1,n,p,t),T.current=t,w(t))},O=Object.keys(_.current).join(`&`)!==Object.values(m).join(`&`),k=y.current===null||y.current===(h.pathname??location.pathname);(O||k&&v.current!==E)&&(v.current=E,D(),O&&(_.current=Object.fromEntries(Object.entries(m).map(([t,n])=>[n,e[t]?.type===`multi`?g.getAll(n):g.get(n)??null])))),(0,b.useEffect)(()=>{y.current=h.pathname??location.pathname,D()},[E,h.pathname]),(0,b.useEffect)(()=>{let t=Object.keys(e).reduce((t,r)=>(t[r]=({state:t,query:i})=>{w(a=>{let{defaultValue:o}=e[r],s=m[r],c=t??o??null,l=a[r]??o??null;return Object.is(l,c)?(ut(2,n,p,s,t,o,T.current),a):(T.current={...T.current,[r]:c},_.current[s]=i,ut(3,n,p,s,t,o,T.current),T.current)})},t),{});for(let r of Object.keys(e)){let e=m[r];ut(4,n,e,p),gO.on(e,t[r])}return()=>{for(let r of Object.keys(e)){let e=m[r];ut(5,n,e,p),gO.off(e,t[r])}}},[p,m]);let A=(0,b.useCallback)((t,r={})=>{let f=Object.fromEntries(Object.keys(e).map(e=>[e,null])),g=typeof t==`function`?t(bO(T.current,x))??f:t??f;ut(6,n,p,g);let _,v=0,y=!1,b=[];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);gO.emit(p,{state:n,query:g});let x={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}},S=r.limitUrlUpdates??f.limitUrlUpdates??l;if(S?.method===`debounce`){let e=S.timeMs??kt.timeMs,t=Ht.push(x,e,h,i);v<e&&(_=t,v=e)}else{let e=S?.timeMs??r.throttleMs??f.throttleMs??c;b.push(Ht.abort(p)),Rt.push(x,e),y=!0}}let S=b.reduce((e,t)=>t(e),y?Rt.flush(h,i):Rt.getPendingPromise(h));return _??S},[p,a,s,o,c,l?.method,l?.timeMs,d,m,h.updateUrl,h.getSearchParamsSnapshot,h.rateLimitFactor,i,x]);return[(0,b.useMemo)(()=>bO(C,x),[C,x]),A]}function yO(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&&Tt(i[l]??d,f)?(e[s]=a[s]??null,e):(o=!0,e[s]=(At(f)?null:fO(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 bO(e,t){return Object.fromEntries(Object.keys(e).map(n=>[n,e[n]??t[n]??null]))}function xO(e,t={}){let{parse:n,type:r,serialize:i,eq:a,defaultValue:o,...s}=t,[{[e]:c},l]=vO({[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 SO(){return xO(`tool`,mO)}var CO=new He,wO=`skybridge-devtools-oauth`,TO={clientInfo:`${wO}:client-info`,tokens:`${wO}:tokens`,codeVerifier:`${wO}:code-verifier`,state:`${wO}:state`,discovery:`${wO}:discovery`},EO=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(TO.clientInfo);return e?JSON.parse(e):void 0}saveClientInformation(e){localStorage.setItem(TO.clientInfo,JSON.stringify(e))}tokens(){let e=localStorage.getItem(TO.tokens);return e?JSON.parse(e):void 0}saveTokens(e){localStorage.setItem(TO.tokens,JSON.stringify(e))}state(){let e=localStorage.getItem(TO.state);if(e)return e;let t=crypto.randomUUID();return localStorage.setItem(TO.state,t),t}expectedState(){return localStorage.getItem(TO.state)??void 0}redirectToAuthorization(e){window.location.href=e.toString()}saveCodeVerifier(e){localStorage.setItem(TO.codeVerifier,e)}codeVerifier(){let e=localStorage.getItem(TO.codeVerifier);if(!e)throw Error(`Missing PKCE code verifier: the sign-in flow was not started in this browser, or its storage was cleared. Retry signing in.`);return e}saveDiscoveryState(e){localStorage.setItem(TO.discovery,JSON.stringify(e))}discoveryState(){let e=localStorage.getItem(TO.discovery);return e?JSON.parse(e):void 0}invalidateCredentials(e){(e===`all`||e===`tokens`)&&localStorage.removeItem(TO.tokens),(e===`all`||e===`client`)&&localStorage.removeItem(TO.clientInfo),(e===`all`||e===`verifier`)&&(localStorage.removeItem(TO.codeVerifier),localStorage.removeItem(TO.state)),(e===`all`||e===`discovery`)&&localStorage.removeItem(TO.discovery)}},DO=new class{client=null;transport=null;async connect(e,t){let n=typeof e==`string`?new URL(e):e;this.transport=new WS(n,{authProvider:t,fetch:(e,t)=>{let r=e instanceof Request?e.url:String(e);if(new URL(r).origin!==n.origin)return fetch(e,t);let i=new Headers(t?.headers);return i.set(`x-forwarded-host`,n.host),i.set(`x-forwarded-proto`,n.protocol.replace(/:$/,``)),fetch(e,{...t,headers:i})}}),this.client=new zS({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 ey&&e.code===-32601)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.getServerVersion()}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}},OO=null,kO=()=>tC.VITE_MCP_SERVER_URL;function AO(e){let t=e._meta?.securitySchemes;return!!t?.length&&t.every(e=>e?.type!==`noauth`)}function jO(e){return e instanceof px||e instanceof bv&&e.status===401}async function MO(){let e=kO(),{setStatus:t,setRequiresAuth:n,setHasAuthRequiredTools:r,setIsSignedIn:i,setError:a}=os.getState();t(`connecting`),a(null),await DO.close();let o=!1;try{(await zx(e))?.authorization_servers?.length&&(o=!0)}catch{}n(o);let s=o?new EO:null,c=!!s?.tokens();OO=s;let l=(e,n)=>{i(!1),r(!1),t(n),n===`error`&&a(e instanceof Error?e.message:`Connection failed`)};try{await DO.connect(e,c&&s?s:void 0)}catch(t){if(!jO(t)||!s){l(t,`error`);return}try{await DO.close(),await DO.connect(e,s)}catch(e){l(e,jO(e)?`unauthenticated`:`error`);return}}let u=null;try{u=await DO.listTools()}catch{}i(!!s?.tokens()),r((u??[]).some(AO)),t(`authenticated`),u?CO.setQueryData([`list-tools`],u):CO.invalidateQueries({queryKey:[`list-tools`]})}async function NO(){let e=kO(),t=OO??new EO;OO=t,t.invalidateCredentials(`all`),await Mx(t,{serverUrl:e})}async function PO(e,t,n){let r=kO(),i=new EO,a=i.expectedState();if(!a||n!==a)throw i.invalidateCredentials(`verifier`),Error(`OAuth callback state mismatch: the response does not match the sign-in this browser started. Retry signing in.`);await Mx(i,{serverUrl:r,authorizationCode:e,iss:t}),i.invalidateCredentials(`verifier`),await MO()}async function FO(){OO?.invalidateCredentials(`all`),OO=null,await DO.close(),os.getState().reset(),CO.invalidateQueries({queryKey:[`list-tools`]})}var IO=()=>{let e=fs();return{...e,view:{mode:e.displayMode},toolInput:{},toolOutput:null,toolResponseMetadata:null,widgetState:null}},LO=()=>{let{data:e}=st({queryKey:[`list-tools`],queryFn:()=>DO.listTools()});return e},RO=()=>{if(os(e=>e.status)===`authenticated`)return DO.getServerInfo()},zO=()=>{let{setToolData:e}=lO();return ct({mutationFn:async({toolName:t,args:n})=>{e(t,{input:n??{},response:void 0,durationMs:null,openaiRef:null,openaiLogs:[],openaiObject:null,openInAppUrl:null});let r=performance.now(),i=await DO.callTool(t,n);XS(i,t);let a=Math.round(performance.now()-r),o=Date.now();return e(t,{input:n??{},response:i,durationMs:a,openaiRef:null,openaiLogs:[{id:crypto.randomUUID(),timestamp:o-a,source:`server`,command:`callTool`,args:{name:t,args:n??{}},type:`default`},{id:crypto.randomUUID(),timestamp:o,source:`server`,command:`callTool response`,args:i,type:`response`}],openaiObject:{...IO(),toolInput:n??{},toolOutput:i.structuredContent,toolResponseMetadata:i.meta??null,widgetState:null},openInAppUrl:null}),i}})},BO=()=>{let[e]=SO();return LO().find(t=>t.name===e)??null},VO=()=>{let e=BO();if(!e)throw Error(`No tool is currently selected`);return e},HO=e=>st({queryKey:[`resource`,e],queryFn:async()=>{if(!e)throw Error(`Resource URI is required`);return await DO.readResource(e)}}),UO=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Li(`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,H.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function WO(e,t){e&&nC.flushSync(()=>e.dispatchEvent(t))}var GO=`Separator`,KO=`horizontal`,qO=[`horizontal`,`vertical`],JO=b.forwardRef((e,t)=>{let{decorative:n,orientation:r=KO,...i}=e,a=YO(r)?r:KO,o=n?{role:`none`}:{"aria-orientation":a===`vertical`?a:void 0,role:`separator`};return(0,H.jsx)(UO.div,{"data-orientation":a,...o,...i,ref:t})});JO.displayName=GO;function YO(e){return qO.includes(e)}var XO=JO;function ZO({className:e,orientation:t=`horizontal`,decorative:n=!0,...r}){return(0,H.jsx)(XO,{"data-slot":`separator`,decorative:n,orientation:t,className:Mr(`shrink-0 bg-border-secondary`,`data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full`,`data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px`,e),...r})}var QO={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 $O({status:e}){let t=QO[e];return(0,H.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,H.jsx)(`span`,{className:`h-2 w-2 rounded-full ${t.dot} mr-1 inline-block`}),t.label]})}var ek=Ni([`w-full rounded-md border px-4 py-3`,`grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5 items-start`,`[&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:mt-0.5`,`[&>:not(svg)]:col-start-2`].join(` `),{variants:{variant:{default:`bg-muted border-border [&>svg]:text-muted-foreground`,destructive:`bg-destructive/10 border-destructive/30 [&>svg]:text-destructive`,warning:`bg-badge-warning/10 border-badge-warning/30 [&>svg]:text-badge-warning`,success:`bg-badge-success/10 border-badge-success/30 [&>svg]:text-badge-success`}},defaultVariants:{variant:`default`}});function tk({className:e,variant:t,...n}){return(0,H.jsx)(`div`,{role:`alert`,className:Mr(ek({variant:t}),e),...n})}function nk({className:e,...t}){return(0,H.jsx)(`p`,{className:Mr(`type-text-sm font-semibold leading-snug`,e),...t})}function rk({className:e,...t}){return(0,H.jsx)(`div`,{className:Mr(`type-text-sm text-muted-foreground [&_p]:leading-relaxed`,e),...t})}function ik({title:e,description:t,className:n}){return(0,H.jsxs)(tk,{variant:`warning`,className:n,children:[(0,H.jsx)(Oi,{}),(0,H.jsx)(nk,{children:e}),(0,H.jsx)(rk,{children:t})]})}var ak=Object.defineProperty,ok=(e,t)=>ak(e,`name`,{value:t,configurable:!0}),sk=!!(typeof window<`u`&&window.document&&window.document.createElement);function ck(e,t,{checkForDefaultPrevented:n=!0}={}){return ok(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}ok(ck,`composeEventHandlers`);function lk(e){if(!sk)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}ok(lk,`getOwnerWindow`);function uk(e){if(!sk)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}ok(uk,`getOwnerDocument`);function dk(e,t=!1){let{activeElement:n}=uk(e);if(!n?.nodeName)return null;if(fk(n)&&n.contentDocument)return dk(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=uk(n).getElementById(e);if(t)return t}}return n}ok(dk,`getActiveElement`);function fk(e){return e.tagName===`IFRAME`}ok(fk,`isFrame`);function pk(e,t=[]){let n=[];function r(t,r){let i=b.createContext(r);i.displayName=t+`Context`;let 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,H.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=b.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)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,mk(i,...t)]}function mk(...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}function hk(e){let t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>((...e)=>t.current?.(...e)),[])}var gk=Object.defineProperty,_k=(e,t)=>gk(e,`name`,{value:t,configurable:!0}),vk=`dismissableLayer.update`,yk=`dismissableLayer.pointerDownOutside`,bk=`dismissableLayer.focusOutside`,xk,Sk=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Ck=b.forwardRef(_k(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=b.useContext(Sk),[d,f]=b.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=b.useState({}),h=Ii(t,f),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=_?g.indexOf(_):-1,y=d?g.indexOf(d):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,S=y>=v,C=b.useRef(!1),w=Ek(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:C,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:b.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return S&&!t},[u.branches,S])}),T=Dk(e=>{if(r&&C.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),E=d?y===g.length-1:!1,D=hk(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return b.useEffect(()=>{if(E)return p.addEventListener(`keydown`,D,{capture:!0}),()=>p.removeEventListener(`keydown`,D,{capture:!0})},[p,E,D]),b.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(xk=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Ok(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=xk))}},[d,p,n,u]),b.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Ok())},[d,u]),b.useEffect(()=>{let e=_k(()=>m({}),`handleUpdate`);return document.addEventListener(vk,e),()=>document.removeEventListener(vk,e)},[]),(0,H.jsx)(UO.div,{...l,ref:h,style:{pointerEvents:x?S?`auto`:`none`:void 0,...e.style},onFocusCapture:ck(e.onFocusCapture,T.onFocusCapture),onBlurCapture:ck(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:ck(e.onPointerDownCapture,w.onPointerDownCapture)})},`DismissableLayer`));function wk(){let e=b.useContext(Sk),[t,n]=b.useState(null);return b.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}_k(wk,`useDismissableLayerSurface`);var Tk=_k(()=>!0,`IS_TRUE`);function Ek(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=Tk}=t,s=hk(e),c=b.useRef(!1),l=b.useRef(!1),u=b.useRef(new Map),d=b.useRef(()=>{});return b.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}_k(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}_k(t,`isOutsideInteractionIntercepted`);function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}_k(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}_k(p,`handleInteractionBubble`);let m=_k(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||kk(yk,s,p,{discrete:!0})};if(_k(f,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:_k(()=>c.current=!0,`onPointerDownCapture`)}}_k(Ek,`usePointerDownOutside`);function Dk(e,t=globalThis?.document){let n=hk(e),r=b.useRef(!1);return b.useEffect(()=>{let e=_k(e=>{e.target&&!r.current&&kk(bk,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:_k(()=>r.current=!0,`onFocusCapture`),onBlurCapture:_k(()=>r.current=!1,`onBlurCapture`)}}_k(Dk,`useFocusOutside`);function Ok(){let e=new CustomEvent(vk);document.dispatchEvent(e)}_k(Ok,`dispatchUpdate`);function kk(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?WO(i,a):i.dispatchEvent(a)}_k(kk,`handleAndDispatchCustomEvent`);var Ak=0,jk=null;function Mk(){b.useEffect(()=>{jk||={start:Nk(),end:Nk()};let{start:e,end:t}=jk;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),Ak++,()=>{Ak===1&&(jk?.start.remove(),jk?.end.remove(),jk=null),Ak=Math.max(0,Ak-1)}},[])}function Nk(){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 Pk=Object.defineProperty,Fk=(e,t)=>Pk(e,`name`,{value:t,configurable:!0}),Ik=`focusScope.autoFocusOnMount`,Lk=`focusScope.autoFocusOnUnmount`,Rk={bubbles:!1,cancelable:!0},zk=b.forwardRef(Fk(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=b.useState(null),l=hk(i),u=hk(a),d=b.useRef(null),f=Ii(t,c),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:Kk(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||Kk(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Kk(s)};Fk(e,`handleFocusIn`),Fk(t,`handleFocusOut`),Fk(n,`handleMutations`),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){qk.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(Ik,Rk);s.addEventListener(Ik,l),s.dispatchEvent(t),t.defaultPrevented||(Bk(Xk(Hk(s)),{select:!0}),document.activeElement===e&&Kk(s))}return()=>{s.removeEventListener(Ik,l),setTimeout(()=>{let t=new CustomEvent(Lk,Rk);s.addEventListener(Lk,u),s.dispatchEvent(t),t.defaultPrevented||Kk(e??document.body,{select:!0}),s.removeEventListener(Lk,u),qk.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]=Vk(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Kk(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Kk(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,H.jsx)(UO.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})},`FocusScope`));function Bk(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Kk(r,{select:t}),document.activeElement!==n)return}Fk(Bk,`focusFirst`);function Vk(e){let t=Hk(e);return[Uk(t,e),Uk(t.reverse(),e)]}Fk(Vk,`getTabbableEdges`);function Hk(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:Fk(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},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}Fk(Hk,`getTabbableCandidates`);function Uk(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):Wk(r,{upTo:t})))return r}Fk(Uk,`findVisible`);function Wk(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}Fk(Wk,`isHidden`);function Gk(e){return e instanceof HTMLInputElement&&`select`in e}Fk(Gk,`isSelectableInput`);function Kk(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Gk(e)&&t&&e.select()}}Fk(Kk,`focus`);var qk=Jk();function Jk(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Yk(e,t),e.unshift(t)},remove(t){e=Yk(e,t),e[0]?.resume()}}}Fk(Jk,`createFocusScopesStack`);function Yk(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}Fk(Yk,`arrayRemove`);function Xk(e){return e.filter(e=>e.tagName!==`A`)}Fk(Xk,`removeLinks`);var Zk=globalThis?.document?b.useLayoutEffect:()=>{},Qk=b.useId||(()=>void 0),$k=0;function eA(e){let[t,n]=b.useState(Qk());return Zk(()=>{e||n(e=>e??String($k++))},[e]),e||(t?`radix-${t}`:``)}var tA=[`top`,`right`,`bottom`,`left`],nA=Math.min,rA=Math.max,iA=Math.round,aA=Math.floor,oA=e=>({x:e,y:e}),sA={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function cA(e,t,n){return rA(e,nA(t,n))}function lA(e,t){return typeof e==`function`?e(t):e}function uA(e){return e.split(`-`)[0]}function dA(e){return e.split(`-`)[1]}function fA(e){return e===`x`?`y`:`x`}function pA(e){return e===`y`?`height`:`width`}function mA(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function hA(e){return fA(mA(e))}function gA(e,t,n){n===void 0&&(n=!1);let r=dA(e),i=hA(e),a=pA(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=TA(o)),[o,TA(o)]}function _A(e){let t=TA(e);return[vA(e),t,vA(t)]}function vA(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var yA=[`left`,`right`],bA=[`right`,`left`],xA=[`top`,`bottom`],SA=[`bottom`,`top`];function CA(e,t,n){switch(e){case`top`:case`bottom`:return n?t?bA:yA:t?yA:bA;case`left`:case`right`:return t?xA:SA;default:return[]}}function wA(e,t,n,r){let i=dA(e),a=CA(uA(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(vA)))),a}function TA(e){let t=uA(e);return sA[t]+e.slice(t.length)}function EA(e){return{top:0,right:0,bottom:0,left:0,...e}}function DA(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:EA(e)}function OA(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 kA(e,t,n){let{reference:r,floating:i}=e,a=mA(t),o=hA(t),s=pA(o),c=uA(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(dA(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 AA(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}=lA(t,e),p=DA(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=OA(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=OA(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 jA=50,MA=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:AA},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=kA(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<jA&&(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}=kA(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},NA=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}=lA(e,t)||{};if(l==null)return{};let d=DA(u),f={x:n,y:r},p=hA(i),m=pA(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=nA(d[_],T),D=nA(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=cA(O,A,k),M=!c.arrow&&dA(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),PA=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}=lA(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=uA(r),_=mA(o),v=uA(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[TA(o)]:_A(o)),x=p!==`none`;!d&&x&&b.push(...wA(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=gA(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`&&_!==mA(t))||T.every(e=>mA(e.placement)!==_||e.overflows[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=mA(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 FA(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function IA(e){return tA.some(t=>e[t]>=0)}var LA=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=lA(e,t);switch(i){case`referenceHidden`:{let e=FA(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:IA(e)}}}case`escaped`:{let e=FA(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:IA(e)}}}default:return{}}}}},RA=new Set([`left`,`top`]);async function zA(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=uA(n),s=dA(n),c=mA(n)===`y`,l=RA.has(o)?-1:1,u=a&&c?-1:1,d=lA(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 BA=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 zA(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}}}}},VA=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}=lA(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=mA(uA(i)),p=fA(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=cA(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=cA(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}}}}}},HA=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}=lA(e,t),u={x:n,y:r},d=mA(i),f=fA(d),p=u[f],m=u[d],h=lA(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=RA.has(uA(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}}}},UA=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}=lA(e,t),u=await o.detectOverflow(t,l),d=uA(i),f=dA(i),p=mA(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=nA(h-u[g],v),x=nA(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=rA(u.left,0),t=rA(u.right,0),n=rA(u.top,0),r=rA(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:rA(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:rA(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 WA(){return typeof window<`u`}function GA(e){return JA(e)?(e.nodeName||``).toLowerCase():`#document`}function KA(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function qA(e){return((JA(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function JA(e){return WA()?e instanceof Node||e instanceof KA(e).Node:!1}function YA(e){return WA()?e instanceof Element||e instanceof KA(e).Element:!1}function XA(e){return WA()?e instanceof HTMLElement||e instanceof KA(e).HTMLElement:!1}function ZA(e){return!WA()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof KA(e).ShadowRoot}function QA(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=lj(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function $A(e){return/^(table|td|th)$/.test(GA(e))}function ej(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var tj=/transform|translate|scale|rotate|perspective|filter/,nj=/paint|layout|strict|content/,rj=e=>!!e&&e!==`none`,ij;function aj(e){let t=YA(e)?lj(e):e;return rj(t.transform)||rj(t.translate)||rj(t.scale)||rj(t.rotate)||rj(t.perspective)||!sj()&&(rj(t.backdropFilter)||rj(t.filter))||tj.test(t.willChange||``)||nj.test(t.contain||``)}function oj(e){let t=dj(e);for(;XA(t)&&!cj(t);){if(aj(t))return t;if(ej(t))return null;t=dj(t)}return null}function sj(){return ij??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),ij}function cj(e){return/^(html|body|#document)$/.test(GA(e))}function lj(e){return KA(e).getComputedStyle(e)}function uj(e){return YA(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function dj(e){if(GA(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||ZA(e)&&e.host||qA(e);return ZA(t)?t.host:t}function fj(e){let t=dj(e);return cj(t)?e.ownerDocument?e.ownerDocument.body:e.body:XA(t)&&QA(t)?t:fj(t)}function pj(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=fj(e),i=r===e.ownerDocument?.body,a=KA(r);if(i){let e=mj(a);return t.concat(a,a.visualViewport||[],QA(r)?r:[],e&&n?pj(e):[])}else return t.concat(r,pj(r,[],n))}function mj(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function hj(e){let t=lj(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=XA(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=iA(n)!==a||iA(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function gj(e){return YA(e)?e:e.contextElement}function _j(e){let t=gj(e);if(!XA(t))return oA(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=hj(t),o=(a?iA(n.width):n.width)/r,s=(a?iA(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var vj=oA(0);function yj(e){let t=KA(e);return!sj()||!t.visualViewport?vj:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function bj(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==KA(e)?!1:t}function xj(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=gj(e),o=oA(1);t&&(r?YA(r)&&(o=_j(r)):o=_j(e));let s=bj(a,n,r)?yj(a):oA(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=KA(a),t=r&&YA(r)?KA(r):r,n=e,i=mj(n);for(;i&&r&&t!==n;){let e=_j(i),t=i.getBoundingClientRect(),r=lj(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=KA(i),i=mj(n)}}return OA({width:u,height:d,x:c,y:l})}function Sj(e,t){let n=uj(e).scrollLeft;return t?t.left+n:xj(qA(e)).left+n}function Cj(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Sj(e,n),y:n.top+t.scrollTop}}function wj(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=qA(r),s=t?ej(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=oA(1),u=oA(0),d=XA(r);if((d||!d&&!a)&&((GA(r)!==`body`||QA(o))&&(c=uj(r)),d)){let e=xj(r);l=_j(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Cj(o,c):oA(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 Tj(e){return Array.from(e.getClientRects())}function Ej(e){let t=qA(e),n=uj(e),r=e.ownerDocument.body,i=rA(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=rA(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+Sj(e),s=-n.scrollTop;return lj(r).direction===`rtl`&&(o+=rA(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var Dj=25;function Oj(e,t){let n=KA(e),r=qA(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=sj();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=Sj(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<=Dj&&(a-=o)}else l<=Dj&&(a+=l);return{width:a,height:o,x:s,y:c}}function kj(e,t){let n=xj(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=XA(e)?_j(e):oA(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Aj(e,t,n){let r;if(t===`viewport`)r=Oj(e,n);else if(t===`document`)r=Ej(qA(e));else if(YA(t))r=kj(t,n);else{let n=yj(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return OA(r)}function jj(e,t){let n=dj(e);return n===t||!YA(n)||cj(n)?!1:lj(n).position===`fixed`||jj(n,t)}function Mj(e,t){let n=t.get(e);if(n)return n;let r=pj(e,[],!1).filter(e=>YA(e)&&GA(e)!==`body`),i=null,a=lj(e).position===`fixed`,o=a?dj(e):e;for(;YA(o)&&!cj(o);){let t=lj(o),n=aj(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||QA(o)&&!n&&jj(e,o))?r=r.filter(e=>e!==o):i=t,o=dj(o)}return t.set(e,r),r}function Nj(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?ej(t)?[]:Mj(t,this._c):[].concat(n),r],o=Aj(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=Aj(t,a[e],i);s=rA(n.top,s),c=nA(n.right,c),l=nA(n.bottom,l),u=rA(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Pj(e){let{width:t,height:n}=hj(e);return{width:t,height:n}}function Fj(e,t,n){let r=XA(t),i=qA(t),a=n===`fixed`,o=xj(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=oA(0);function l(){c.x=Sj(i)}if(r||!r&&!a)if((GA(t)!==`body`||QA(i))&&(s=uj(t)),r){let e=xj(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?Cj(i,s):oA(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 Ij(e){return lj(e).position===`static`}function Lj(e,t){if(!XA(e)||lj(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return qA(e)===n&&(n=n.ownerDocument.body),n}function Rj(e,t){let n=KA(e);if(ej(e))return n;if(!XA(e)){let t=dj(e);for(;t&&!cj(t);){if(YA(t)&&!Ij(t))return t;t=dj(t)}return n}let r=Lj(e,t);for(;r&&$A(r)&&Ij(r);)r=Lj(r,t);return r&&cj(r)&&Ij(r)&&!aj(r)?n:r||oj(e)||n}var zj=async function(e){let t=this.getOffsetParent||Rj,n=this.getDimensions,r=await n(e.floating);return{reference:Fj(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Bj(e){return lj(e).direction===`rtl`}var Vj={convertOffsetParentRelativeRectToViewportRelativeRect:wj,getDocumentElement:qA,getClippingRect:Nj,getOffsetParent:Rj,getElementRects:zj,getClientRects:Tj,getDimensions:Pj,getScale:_j,isElement:YA,isRTL:Bj};function Hj(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Uj(e,t){let n=null,r,i=qA(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=aA(d),h=aA(i.clientWidth-(u+f)),g=aA(i.clientHeight-(d+p)),_=aA(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:rA(0,nA(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&&!Hj(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 Wj(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=gj(e),u=i||a?[...l?pj(l):[],...t?pj(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Uj(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?xj(e):null;c&&g();function g(){let t=xj(e);h&&!Hj(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 Gj=BA,Kj=VA,qj=PA,Jj=UA,Yj=LA,Xj=NA,Zj=HA,Qj=(e,t,n)=>{let r=new Map,i={platform:Vj,...n},a={...i.platform,_c:r};return MA(e,t,{...i,platform:a})},$j=typeof document<`u`?b.useLayoutEffect:function(){};function eM(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(!eM(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)&&!eM(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function tM(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function nM(e,t){let n=tM(e);return Math.round(t*n)/n}function rM(e){let t=b.useRef(e);return $j(()=>{t.current=e}),t}function iM(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);eM(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=rM(c),O=rM(i),k=rM(l),A=b.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),Qj(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!eM(T.current,t)&&(T.current=t,nC.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);$j(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=b.useRef(!1);$j(()=>(j.current=!0,()=>{j.current=!1}),[]),$j(()=>{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=nM(N.floating,u.x),r=nM(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...tM(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 aM=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Xj({element:r.current,padding:i}).fn(n):r?Xj({element:r,padding:i}).fn(n):{}}}},oM=(e,t)=>{let n=Gj(e);return{name:n.name,fn:n.fn,options:[e,t]}},sM=(e,t)=>{let n=Kj(e);return{name:n.name,fn:n.fn,options:[e,t]}},cM=(e,t)=>({fn:Zj(e).fn,options:[e,t]}),lM=(e,t)=>{let n=qj(e);return{name:n.name,fn:n.fn,options:[e,t]}},uM=(e,t)=>{let n=Jj(e);return{name:n.name,fn:n.fn,options:[e,t]}},dM=(e,t)=>{let n=Yj(e);return{name:n.name,fn:n.fn,options:[e,t]}},fM=(e,t)=>{let n=aM(e);return{name:n.name,fn:n.fn,options:[e,t]}};function pM(e){let[t,n]=b.useState(void 0);return Zk(()=>{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}var mM=Object.defineProperty,hM=(e,t)=>mM(e,`name`,{value:t,configurable:!0}),gM=`Popper`,[_M,vM]=pk(gM),[yM,bM]=_M(gM),xM=hM(e=>{let{__scopePopper:t,children:n}=e,[r,i]=b.useState(null),[a,o]=b.useState(void 0);return(0,H.jsx)(yM,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),SM=`PopperAnchor`,CM=b.forwardRef(hM(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=bM(SM,n),o=b.useRef(null),s=a.onAnchorChange,c=Ii(t,b.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=b.useRef(null);b.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&kM(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,H.jsx)(UO.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})},`PopperAnchor`)),wM=`PopperContent`,[TM,oae]=_M(wM),EM=b.forwardRef(hM(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=bM(wM,n),[_,v]=b.useState(null),y=Ii(t,v),[x,S]=b.useState(null),C=pM(x),w=C?.width??0,T=C?.height??0,E=r+(a===`center`?``:`-`+a),D=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},O=Array.isArray(l)?l:[l],k=O.length>0,A={padding:D,boundary:O.filter(DM),altBoundary:k},{refs:j,floatingStyles:M,placement:N,isPositioned:P,middlewareData:F}=iM({strategy:`fixed`,placement:E,whileElementsMounted:hM((...e)=>Wj(...e,{animationFrame:p===`always`}),`whileElementsMounted`),elements:{reference:g.anchor},middleware:[oM({mainAxis:i+T,alignmentAxis:o}),c&&sM({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?cM():void 0,...A}),c&&lM({...A}),uM({...A,apply:hM(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),x&&fM({element:x,padding:s}),OM({arrowWidth:w,arrowHeight:T}),f&&dM({strategy:`referenceHidden`,...A,boundary:k?A.boundary:void 0})]}),I=g.setPlacementState;Zk(()=>(I(N),()=>{I(void 0)}),[N,I]);let[L,ee]=kM(N),te=hk(m);Zk(()=>{P&&te?.()},[P,te]);let ne=F.arrow?.x,R=F.arrow?.y,z=F.arrow?.centerOffset!==0,[B,re]=b.useState();return Zk(()=>{_&&re(window.getComputedStyle(_).zIndex)},[_]),(0,H.jsx)(`div`,{ref:j.setFloating,"data-radix-popper-content-wrapper":``,style:{...M,transform:P?M.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:B,"--radix-popper-transform-origin":[F.transformOrigin?.x,F.transformOrigin?.y].join(` `),...F.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,H.jsx)(TM,{scope:n,placedSide:L,placedAlign:ee,onArrowChange:S,arrowX:ne,arrowY:R,shouldHideArrow:z,children:(0,H.jsx)(UO.div,{"data-side":L,"data-align":ee,...h,ref:y,style:{...h.style,animation:P?h.style?.animation:`none`}})})})},`PopperContent`));function DM(e){return e!==null}hM(DM,`isNotNull`);var OM=hM(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=kM(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function kM(e){let[t,n=`center`]=e.split(`-`);return[t,n]}hM(kM,`getSideAndAlignFromPlacement`);var AM=xM,jM=CM,MM=EM,NM=Object.defineProperty,PM=b.forwardRef(((e,t)=>NM(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=b.useState(!1);Zk(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?nC.createPortal((0,H.jsx)(UO.div,{...r,ref:t}),o):null},`Portal`)),FM=Object.defineProperty,IM=(e,t)=>FM(e,`name`,{value:t,configurable:!0});function LM(e,t){return b.useReducer((e,n)=>t[e][n]??e,e)}IM(LM,`useStateMachine`);var RM=IM(e=>{let{present:t,children:n}=e,r=zM(t),i=typeof n==`function`?n({present:r.isPresent}):b.Children.only(n),a=VM(r.ref,UM(i));return typeof n==`function`||r.isPresent?b.cloneElement(i,{ref:a}):null},`Presence`);function zM(e){let[t,n]=b.useState(),r=b.useRef(null),i=b.useRef(e),a=b.useRef(`none`),o=b.useRef(void 0),[s,c]=LM(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return b.useEffect(()=>{s===`mounted`?(a.current=o.current??HM(r.current),o.current=void 0):a.current=`none`},[s]),Zk(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=HM(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),Zk(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=IM(a=>{let o=HM(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=IM(e=>{e.target===t&&(a.current=HM(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:b.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=HM(t)}else r.current=null;n(e)},[])}}IM(zM,`usePresence`);function BM(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}IM(BM,`setRef`);function VM(...e){let t=b.useRef(e);return t.current=e,b.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=BM(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():BM(n[e],null)}}},[])}IM(VM,`useStableComposedRefs`);function HM(e){return e?.animationName||`none`}IM(HM,`getAnimationName`);function UM(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)}IM(UM,`getElementRef`);var WM=b.useEffectEvent,GM=b.useInsertionEffect;function KM(e){if(typeof WM==`function`)return WM(e);let t=b.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof GM==`function`?GM(()=>{t.current=e}):Zk(()=>{t.current=e}),b.useMemo(()=>((...e)=>t.current?.(...e)),[])}var qM=Object.defineProperty,JM=(e,t)=>qM(e,`name`,{value:t,configurable:!0}),YM=b.useInsertionEffect||Zk;function XM({prop:e,defaultProp:t,onChange:n=JM(()=>{},`onChange`),caller:r}){let[i,a,o]=ZM({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,b.useCallback(t=>{if(s){let n=QM(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}JM(XM,`useControllableState`);function ZM({defaultProp:e,onChange:t}){let[n,r]=b.useState(e),i=b.useRef(n),a=b.useRef(t);return YM(()=>{a.current=t},[t]),b.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}JM(ZM,`useUncontrolledState`);function QM(e){return typeof e==`function`}JM(QM,`isFunction`);var $M=Symbol(`RADIX:SYNC_STATE`);function eN(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=KM(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=b.useReducer((t,n)=>{if(n.type===$M)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),p=d.state,m=b.useRef(p);b.useEffect(()=>{m.current!==p&&(m.current=p,c||l(p))},[p,m,c]);let h=b.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return b.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:$M,state:i})},[i,d.state,c]),[h,f]}JM(eN,`useControllableStateReducer`);var tN=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},nN=new WeakMap,rN=new WeakMap,iN={},aN=0,oN=function(e){return e&&(e.host||oN(e.parentNode))},sN=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=oN(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})},cN=function(e,t,n,r){var i=sN(t,Array.isArray(e)?e:[e]);iN[n]||(iN[n]=new WeakMap);var a=iN[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=(nN.get(e)||0)+1,l=(a.get(e)||0)+1;nN.set(e,c),a.set(e,l),o.push(e),c===1&&i&&rN.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(),aN++,function(){o.forEach(function(e){var t=nN.get(e)-1,i=a.get(e)-1;nN.set(e,t),a.set(e,i),t||(rN.has(e)||e.removeAttribute(r),rN.delete(e)),i||e.removeAttribute(n)}),aN--,aN||(nN=new WeakMap,nN=new WeakMap,rN=new WeakMap,iN={})}},lN=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||tN(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),cN(r,i,n,`aria-hidden`)):function(){return null}},uN=function(){return uN=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},uN.apply(this,arguments)};function dN(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 fN(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 pN(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function mN(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 hN=`right-scroll-bar-position`,gN=`width-before-scroll-bar`,_N=`with-scroll-bars-hidden`,vN=`--removed-body-scroll-bar-size`;function yN(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function bN(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 xN=typeof window<`u`?b.useLayoutEffect:b.useEffect,SN=new WeakMap;function CN(e,t){var n=bN(t||null,function(t){return e.forEach(function(e){return yN(e,t)})});return xN(function(){var t=SN.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||yN(e,null)}),i.forEach(function(e){r.has(e)||yN(e,a)})}SN.set(n,e)},[e]),n}function wN(e){return e}function TN(e,t){t===void 0&&(t=wN);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 EN(e){e===void 0&&(e={});var t=TN(null);return t.options=uN({async:!0,ssr:!1},e),t}var DN=function(e){var t=e.sideCar,n=dN(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,uN({},n))};DN.isSideCarExport=!0;function ON(e,t){return e.useMedium(t),DN}var kN=EN(),AN=function(){},jN=b.forwardRef(function(e,t){var n=b.useRef(null),r=b.useState({onScrollCapture:AN,onWheelCapture:AN,onTouchMoveCapture:AN}),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=dN(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=f,C=CN([n,t]),w=uN(uN({},x),i);return b.createElement(b.Fragment,null,u&&b.createElement(S,{sideCar:kN,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),uN(uN({},w),{ref:C})):b.createElement(v,uN({},w,{className:c,ref:C}),s))});jN.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},jN.classNames={fullWidth:gN,zeroRight:hN};var MN,NN=function(){if(MN)return MN;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function PN(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=NN();return t&&e.setAttribute(`nonce`,t),e}function FN(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function IN(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var LN=function(){var e=0,t=null;return{add:function(n){e==0&&(t=PN())&&(FN(t,n),IN(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},RN=function(){var e=LN();return function(t,n){b.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},zN=function(){var e=RN();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},BN={left:0,top:0,right:0,gap:0},VN=function(e){return parseInt(e||``,10)||0},HN=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[VN(n),VN(r),VN(i)]},UN=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return BN;var t=HN(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])}},WN=zN(),GN=`data-scroll-locked`,KN=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
79
+ .${_N} {
80
+ overflow: hidden ${r};
81
+ padding-right: ${s}px ${r};
82
+ }
83
+ body[${GN}] {
84
+ overflow: hidden ${r};
85
+ overscroll-behavior: contain;
86
+ ${[t&&`position: relative ${r};`,n===`margin`&&`
87
+ padding-left: ${i}px;
88
+ padding-top: ${a}px;
89
+ padding-right: ${o}px;
90
+ margin-left:0;
91
+ margin-top:0;
92
+ margin-right: ${s}px ${r};
93
+ `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
94
+ }
95
+
96
+ .${hN} {
97
+ right: ${s}px ${r};
98
+ }
99
+
100
+ .${gN} {
101
+ margin-right: ${s}px ${r};
102
+ }
103
+
104
+ .${hN} .${hN} {
105
+ right: 0 ${r};
106
+ }
107
+
108
+ .${gN} .${gN} {
109
+ margin-right: 0 ${r};
110
+ }
111
+
112
+ body[${GN}] {
113
+ ${vN}: ${s}px;
114
+ }
115
+ `},qN=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},JN=function(){b.useEffect(function(){return document.body.setAttribute(GN,(qN()+1).toString()),function(){var e=qN()-1;e<=0?document.body.removeAttribute(GN):document.body.setAttribute(GN,e.toString())}},[])},YN=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;JN();var a=b.useMemo(function(){return UN(i)},[i]);return b.createElement(WN,{styles:KN(a,!t,i,n?``:`!important`)})},XN=!1;if(typeof window<`u`)try{var ZN=Object.defineProperty({},"passive",{get:function(){return XN=!0,!0}});window.addEventListener(`test`,ZN,ZN),window.removeEventListener(`test`,ZN,ZN)}catch{XN=!1}var QN=XN?{passive:!1}:!1,$N=function(e){return e.tagName===`TEXTAREA`},eP=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!$N(e)&&n[t]===`visible`)},tP=function(e){return eP(e,`overflowY`)},nP=function(e){return eP(e,`overflowX`)},rP=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),oP(e,r)){var i=sP(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},iP=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},aP=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},oP=function(e,t){return e===`v`?tP(t):nP(t)},sP=function(e,t){return e===`v`?iP(t):aP(t)},cP=function(e,t){return e===`h`&&t===`rtl`?-1:1},lP=function(e,t,n,r,i){var a=cP(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=sP(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&oP(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},uP=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},dP=function(e){return[e.deltaX,e.deltaY]},fP=function(e){return e&&`current`in e?e.current:e},pP=function(e,t){return e[0]===t[0]&&e[1]===t[1]},mP=function(e){return`
116
+ .block-interactivity-${e} {pointer-events: none;}
117
+ .allow-interactivity-${e} {pointer-events: all;}
118
+ `},hP=0,gP=[];function _P(e){var t=b.useRef([]),n=b.useRef([0,0]),r=b.useRef(),i=b.useState(hP++)[0],a=b.useState(zN)[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=mN([e.lockRef.current],(e.shards||[]).map(fP),!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=uP(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=rP(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=rP(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 lP(h,t,e,h===`h`?s:c,!0)},[]),c=b.useCallback(function(e){var n=e;if(!(!gP.length||gP[gP.length-1]!==a)){var r=`deltaY`in n?dP(n):uP(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&pP(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(fP).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:vP(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=uP(e),r.current=void 0},[]),d=b.useCallback(function(t){l(t.type,dP(t),t.target,s(t,e.lockRef.current))},[]),f=b.useCallback(function(t){l(t.type,uP(t),t.target,s(t,e.lockRef.current))},[]);b.useEffect(function(){return gP.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,QN),document.addEventListener(`touchmove`,c,QN),document.addEventListener(`touchstart`,u,QN),function(){gP=gP.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,QN),document.removeEventListener(`touchmove`,c,QN),document.removeEventListener(`touchstart`,u,QN)}},[]);var p=e.removeScrollBar,m=e.inert;return b.createElement(b.Fragment,null,m?b.createElement(a,{styles:mP(i)}):null,p?b.createElement(YN,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function vP(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var yP=ON(kN,_P),bP=b.forwardRef(function(e,t){return b.createElement(jN,uN({},e,{ref:t,sideCar:yP}))});bP.classNames=jN.classNames;var xP=Object.defineProperty,SP=(e,t)=>xP(e,`name`,{value:t,configurable:!0}),CP=`Popover`,[wP,sae]=pk(CP,[vM]),TP=vM(),[cae,EP]=wP(CP),lae=SP(e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=TP(t),c=b.useRef(null),[l,u]=b.useState(!1),[d,f]=XM({prop:r,defaultProp:i??!1,onChange:a,caller:CP});return(0,H.jsx)(AM,{...s,children:(0,H.jsx)(cae,{scope:t,contentId:eA(),triggerRef:c,open:d,onOpenChange:f,onOpenToggle:b.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:l,onCustomAnchorAdd:b.useCallback(()=>u(!0),[]),onCustomAnchorRemove:b.useCallback(()=>u(!1),[]),modal:o,children:n})})},`Popover`),uae=`PopoverAnchor`,dae=b.forwardRef(SP(function(e,t){let{__scopePopover:n,...r}=e,i=EP(uae,n),a=TP(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return b.useEffect(()=>(o(),()=>s()),[o,s]),(0,H.jsx)(jM,{...a,...r,ref:t})},`PopoverAnchor`)),fae=`PopoverTrigger`,pae=b.forwardRef(SP(function(e,t){let{__scopePopover:n,...r}=e,i=EP(fae,n),a=TP(n),o=Ii(t,i.triggerRef),s=(0,H.jsx)(UO.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":AP(i.open),...r,ref:o,onClick:ck(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,H.jsx)(jM,{asChild:!0,...a,children:s})},`PopoverTrigger`)),DP=`PopoverPortal`,[mae,hae]=wP(DP,{forceMount:void 0}),gae=SP(e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=EP(DP,t);return(0,H.jsx)(mae,{scope:t,forceMount:n,children:(0,H.jsx)(RM,{present:n||a.open,children:(0,H.jsx)(PM,{asChild:!0,container:i,children:r})})})},`PopoverPortal`),OP=`PopoverContent`,_ae=b.forwardRef(SP(function(e,t){let n=hae(OP,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=EP(OP,e.__scopePopover);return(0,H.jsx)(RM,{present:r||a.open,children:a.modal?(0,H.jsx)(yae,{...i,ref:t}):(0,H.jsx)(bae,{...i,ref:t})})},`PopoverContent`)),vae=Li(`PopoverContent.RemoveScroll`),yae=b.forwardRef(SP(function(e,t){let n=EP(OP,e.__scopePopover),r=b.useRef(null),i=Ii(t,r),a=b.useRef(!1);return b.useEffect(()=>{let e=r.current;if(e)return lN(e)},[]),(0,H.jsx)(bP,{as:vae,allowPinchZoom:!0,children:(0,H.jsx)(kP,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ck(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:ck(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;a.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:ck(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})},`PopoverContentModal`)),bae=b.forwardRef(SP(function(e,t){let n=EP(OP,e.__scopePopover),r=b.useRef(!1),i=b.useRef(!1);return(0,H.jsx)(kP,{...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()}})},`PopoverContentNonModal`)),kP=b.forwardRef(SP(function(e,t){let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,f=EP(OP,n),p=TP(n);return Mk(),(0,H.jsx)(zk,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,H.jsx)(Ck,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,H.jsx)(MM,{"data-state":AP(f.open),role:`dialog`,id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})},`PopoverContentImpl`));function AP(e){return e?`open`:`closed`}SP(AP,`getState`);var xae=lae,Sae=dae,Cae=pae,wae=gae,Tae=_ae;function jP({...e}){return(0,H.jsx)(xae,{"data-slot":`popover`,...e})}function MP({...e}){return(0,H.jsx)(Cae,{"data-slot":`popover-trigger`,...e})}function Eae({...e}){return(0,H.jsx)(Sae,{"data-slot":`popover-anchor`,...e})}function NP({className:e,align:t=`center`,sideOffset:n=4,...r}){return(0,H.jsx)(wae,{children:(0,H.jsx)(Tae,{"data-slot":`popover-content`,align:t,sideOffset:n,className:Mr(`bg-popover text-popover-foreground`,`z-50 w-72 rounded-md border border-border-secondary p-4 shadow-lg outline-hidden`,`origin-(--radix-popover-content-transform-origin)`,`data-[state=open]:animate-in data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,`data-[state=closed]:zoom-out-95 data-[state=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`,e),...r})})}var Dae=Ni(`motion-safe:animate-spin`,{variants:{variant:{primary:`text-primary`,secondary:`text-muted-foreground`},size:{sm:`size-3.5`,md:`size-4`,lg:`size-5`,xl:`size-8`}},defaultVariants:{variant:`primary`,size:`md`}});function PP({className:e,variant:t,size:n,...r}){return(0,H.jsx)(ci,{role:`status`,"aria-label":`Loading`,className:Mr(Dae({variant:t,size:n}),e),...r})}var Oae=Ni(`size-2.5 rounded-full`,{variants:{variant:{success:`bg-success`,destructive:`bg-destructive`,warning:`bg-warning`,muted:`bg-muted-foreground`},pulse:{true:`animate-pulse`,false:``}},defaultVariants:{variant:`muted`,pulse:!1}});function FP({className:e,variant:t,pulse:n,...r}){return(0,H.jsx)(`div`,{className:Mr(Oae({variant:t,pulse:n}),e),...r})}function IP(...e){return jr(nn(e))}function kae(e){let t=new DOMParser().parseFromString(e,`text/html`),n=t.querySelector(`script[type="module"]#dev-view-entry`);if(!n)throw Error(`dev-view-entry script not found`);return n.textContent=`
119
+
120
+ const waitForOpenAI = () => new Promise((resolve, reject) => {
121
+ if (typeof window === "undefined") { reject(new Error("window is not available")); return; }
122
+ if ("openai" in window && window.openai != null) { resolve(); return; }
123
+ Object.defineProperty(window, "openai", {
124
+ configurable: true,
125
+ enumerable: true,
126
+ get() { return undefined; },
127
+ set(value) {
128
+ Object.defineProperty(window, "openai", {
129
+ configurable: true,
130
+ enumerable: true,
131
+ writable: true,
132
+ value,
133
+ });
134
+ resolve();
135
+ },
136
+ });
137
+ });
138
+
139
+ await waitForOpenAI();
140
+ ${n.textContent}
141
+ `,t.head.innerHTML+t.body.innerHTML}var Aae=e=>typeof e==`string`?e:void 0,jae=(e,t)=>{let n=e.contentDocument;if(!n?.body)return 0;let r=t?.parentElement?.clientHeight??0,i=r>0?r:1/0,a=n.getElementById(`root`),o=a?a.getBoundingClientRect().height:Math.max(n.body.scrollHeight,n.documentElement.scrollHeight);return Math.min(o,i)};function LP(e){if(e<1024)return`${e}b`;let t=e/1024;if(t<1024)return`${t<10?t.toFixed(1):Math.round(t)}kb`;let n=t/1024;return`${n<10?n.toFixed(1):Math.round(n)}mb`}var RP={width:390,height:844},Mae=1500;function zP(){let[e,t]=(0,b.useState)(!1),n=(0,b.useRef)(null);return(0,b.useEffect)(()=>()=>{n.current&&clearTimeout(n.current)},[]),{copied:e,copy:(0,b.useCallback)(async e=>{try{await navigator.clipboard.writeText(e),t(!0),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>t(!1),Mae)}catch(e){console.error(`Clipboard write failed`,e)}},[])}}function BP({value:e,label:t,className:n,stopPropagation:r}){let{copied:i,copy:a}=zP();return(0,H.jsx)(`button`,{type:`button`,"aria-label":t,onClick:t=>{r&&t.stopPropagation(),a(e)},className:IP(`text-quaternary-foreground hover:text-foreground`,n),children:i?(0,H.jsx)(Kr,{className:`size-3.5`}):(0,H.jsx)(ti,{className:`size-3.5`})})}var Nae=q({id:W(),name:W()}),Pae=um(`state`,[q({state:J(`signedOut`)}),q({state:J(`noTeam`)}),q({state:J(`needsProject`),teams:K(Nae),defaultTeamId:W(),staleConfig:Xp().optional()}),q({state:J(`ready`),lastDeployGit:q({ref:W().nullable(),commitMessage:W().nullable(),author:W().nullable()}).nullable().optional(),lastDeployStatus:gm([`ongoing`,`deployed`,`failed`,`canceled`]).optional(),lastDeployStartedAt:G().optional(),mcpServerUrl:W().optional(),deploymentPageUrl:W().nullable().optional()}),q({state:J(`error`),message:W()})]),Fae=um(`status`,[q({status:J(`idle`)}),q({status:J(`deploying`),startedAt:G(),deploymentPageUrl:W().nullable()}),q({status:J(`deployed`),mcpServerUrl:W(),deploymentPageUrl:W().nullable()}),q({status:J(`failed`),message:W(),deploymentPageUrl:W().nullable()})]),VP=`/__skybridge/deploy`;async function HP(e,t,n=`Request failed`){let r=await fetch(e,{method:`POST`,...t!==void 0&&{headers:{"Content-Type":`application/json`},body:JSON.stringify(t)}});if(!r.ok){let{message:e}=await r.json().catch(()=>({}));throw Error(e??`${n} (${r.status})`)}}var UP=()=>({status:`deploying`,startedAt:Date.now(),deploymentPageUrl:null}),WP=as()((e,t)=>({status:{state:`loading`},progress:{status:`idle`},async refreshStatus(){try{let t=await fetch(`${VP}/status`),n=Pae.safeParse(await t.json());e({status:n.success?n.data:{state:`error`,message:`Unexpected status response`}})}catch{e({status:{state:`error`,message:`Can't reach the dev server.`}})}},async signIn(){await HP(`${VP}/login`,void 0,`Sign-in failed`),await t().refreshStatus()},async createAndDeploy(t,n,r){e({progress:UP()});try{await HP(`${VP}/project`,{name:t,teamId:n,teamName:r},`Failed to create project`)}catch(t){throw e({progress:{status:`idle`}}),t}},async redeploy(){e({progress:UP()});try{await HP(VP,void 0,`Failed to deploy`)}catch(t){throw e({progress:{status:`idle`}}),t}},connect(){let n=new EventSource(`${VP}/events`);return n.addEventListener(`state`,n=>{try{let r=Fae.safeParse(JSON.parse(n.data));if(r.success){let n=t().progress.status;e({progress:r.data}),(r.data.status===`deployed`||r.data.status===`failed`)&&r.data.status!==n&&t().refreshStatus()}}catch{}}),()=>{n.close()}}}));function Iae(){let e=WP(e=>e.connect),t=WP(e=>e.refreshStatus),n=WP(e=>e.status.state===`ready`&&e.status.lastDeployStatus===`ongoing`);(0,b.useEffect)(()=>(t(),e()),[e,t]),(0,b.useEffect)(()=>{if(!n)return;let e=setInterval(()=>void t(),4e3);return()=>clearInterval(e)},[n,t])}var Lae=um(`status`,[q({status:J(`idle`)}),q({status:J(`starting`),message:W()}),q({status:J(`connected`),url:W()}),q({status:J(`error`),message:W()})]),GP=`/__skybridge/tunnel`,KP=as()((e,t)=>({state:{status:`idle`},async start(){if(!(t().state.status===`starting`||t().state.status===`connected`)){e({state:{status:`starting`,message:`Starting tunnel…`}});try{let e=await fetch(GP,{method:`POST`});if(!e.ok)throw Error(`Tunnel start failed (${e.status})`)}catch(n){t().state.status!==`connected`&&e({state:{status:`error`,message:n instanceof Error?n.message:`Failed to start tunnel`}})}}},async stop(){try{await fetch(GP,{method:`DELETE`})}catch{}},connect(){let t=new EventSource(`${GP}/events`);return t.addEventListener(`state`,t=>{if(t instanceof MessageEvent)try{let n=Lae.safeParse(JSON.parse(t.data));n.success&&e({state:n.data})}catch{}}),t.addEventListener(`error`,()=>{t.readyState===EventSource.CLOSED&&e({state:{status:`error`,message:`Lost tunnel connection`}})}),()=>{t.close()}}}));function Rae(){let e=KP(e=>e.connect);(0,b.useEffect)(()=>e(),[e])}var zae=Object.defineProperty,qP=(e,t)=>zae(e,`name`,{value:t,configurable:!0}),JP=`Dialog`,[YP,Bae]=pk(JP),[Vae,XP]=YP(JP),Hae=qP(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]=XM({prop:r,defaultProp:i??!1,onChange:a,caller:JP}),[d,f]=b.useState(0),[p,m]=b.useState(0);return(0,H.jsx)(Vae,{scope:t,triggerRef:s,contentRef:c,contentId:eA(),titleId:eA(),descriptionId:eA(),titlePresent:d>0,descriptionPresent:p>0,setTitleCount:f,setDescriptionCount:m,open:l,onOpenChange:u,onOpenToggle:b.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})},`Dialog`),ZP=`DialogPortal`,[Uae,QP]=YP(ZP,{forceMount:void 0}),Wae=qP(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=XP(ZP,t);return(0,H.jsx)(Uae,{scope:t,forceMount:n,children:b.Children.map(r,e=>(0,H.jsx)(RM,{present:n||a.open,children:(0,H.jsx)(PM,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),$P=`DialogOverlay`,Gae=b.forwardRef(qP(function(e,t){let n=QP($P,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=XP($P,e.__scopeDialog);return a.modal?(0,H.jsx)(RM,{present:r||a.open,children:(0,H.jsx)(qae,{...i,ref:t})}):null},`DialogOverlay`)),Kae=Li(`DialogOverlay.RemoveScroll`),qae=b.forwardRef(qP(function(e,t){let{__scopeDialog:n,...r}=e,i=XP($P,n),a=Ii(t,wk());return(0,H.jsx)(bP,{as:Kae,allowPinchZoom:!0,shards:[i.contentRef],children:(0,H.jsx)(UO.div,{"data-state":nF(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),eF=`DialogContent`,Jae=b.forwardRef(qP(function(e,t){let n=QP(eF,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=XP(eF,e.__scopeDialog);return(0,H.jsx)(RM,{present:r||a.open,children:a.modal?(0,H.jsx)(Yae,{...i,ref:t}):(0,H.jsx)(Xae,{...i,ref:t})})},`DialogContent`)),Yae=b.forwardRef(qP(function(e,t){let n=XP(eF,e.__scopeDialog),r=b.useRef(null),i=Ii(t,n.contentRef,r);return b.useEffect(()=>{let e=r.current;if(e)return lN(e)},[]),(0,H.jsx)(tF,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:ck(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:ck(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:ck(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),Xae=b.forwardRef(qP(function(e,t){let n=XP(eF,e.__scopeDialog),r=b.useRef(!1),i=b.useRef(!1);return(0,H.jsx)(tF,{...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()}})},`DialogContentNonModal`)),tF=b.forwardRef(qP(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=XP(eF,n);return Mk(),(0,H.jsx)(H.Fragment,{children:(0,H.jsx)(zk,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,H.jsx)(Ck,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionPresent?s.descriptionId:void 0,"aria-labelledby":s.titlePresent?s.titleId:void 0,"data-state":nF(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})},`DialogContentImpl`)),Zae=`DialogTitle`,Qae=b.forwardRef(qP(function(e,t){let{__scopeDialog:n,...r}=e,i=XP(Zae,n),{setTitleCount:a}=i;return Zk(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,H.jsx)(UO.h2,{id:i.titleId,...r,ref:t})},`DialogTitle`)),$ae=`DialogDescription`,eoe=b.forwardRef(qP(function(e,t){let{__scopeDialog:n,...r}=e,i=XP($ae,n),{setDescriptionCount:a}=i;return Zk(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,H.jsx)(UO.p,{id:i.descriptionId,...r,ref:t})},`DialogDescription`)),toe=`DialogClose`,noe=b.forwardRef(qP(function(e,t){let{__scopeDialog:n,...r}=e,i=XP(toe,n);return(0,H.jsx)(UO.button,{type:`button`,...r,ref:t,onClick:ck(e.onClick,()=>i.onOpenChange(!1))})},`DialogClose`));function nF(e){return e?`open`:`closed`}qP(nF,`getState`);function rF({...e}){return(0,H.jsx)(Hae,{"data-slot":`dialog`,...e})}function roe({...e}){return(0,H.jsx)(Wae,{"data-slot":`dialog-portal`,...e})}function ioe({className:e,...t}){return(0,H.jsx)(Gae,{"data-slot":`dialog-overlay`,className:Mr(`fixed inset-0 z-50 bg-overlay`,`data-[state=open]:animate-in data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,e),...t})}var aoe=Ni([`bg-background fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2`,`max-h-[calc(100vh-4rem)] overflow-hidden rounded-2xl px-6 shadow-lg outline-none`,`data-[state=open]:animate-in data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,`data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`,`duration-200`].join(` `),{variants:{size:{sm:`max-w-[400px]`,lg:`max-w-[544px]`}},defaultVariants:{size:`sm`}});function iF({className:e,children:t,size:n,showCloseButton:r=!0,...i}){return(0,H.jsxs)(roe,{children:[(0,H.jsx)(ioe,{}),(0,H.jsxs)(Jae,{"data-slot":`dialog-content`,className:Mr(aoe({size:n}),e),...i,children:[t,r&&(0,H.jsxs)(noe,{"data-slot":`dialog-close`,className:Mr(`absolute top-3 right-4 flex size-8 items-center justify-center rounded-md`,`text-subtle-foreground transition-colors`,`[@media(hover:hover)]:hover:text-foreground`,`focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none`,`disabled:pointer-events-none`),children:[(0,H.jsx)(Ai,{className:`size-4`}),(0,H.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function aF({className:e,...t}){return(0,H.jsx)(`div`,{"data-slot":`dialog-header`,className:Mr(`flex flex-col gap-0.5 py-6 pr-10`,e),...t})}var ooe=Ni(`pb-6 pt-6`,{variants:{layout:{horizontal:`flex gap-3 [&>*]:flex-1`,vertical:`flex flex-col gap-3`}},defaultVariants:{layout:`horizontal`}});function oF({className:e,layout:t,...n}){return(0,H.jsx)(`div`,{"data-slot":`dialog-footer`,className:Mr(ooe({layout:t}),e),...n})}function sF({className:e,...t}){return(0,H.jsx)(Qae,{"data-slot":`dialog-title`,className:Mr(`type-text-md font-semibold text-foreground`,e),...t})}function cF({className:e,...t}){return(0,H.jsx)(eoe,{"data-slot":`dialog-description`,className:Mr(`type-text-sm text-subtle-foreground`,e),...t})}var soe=Object.defineProperty,lF=(e,t)=>soe(e,`name`,{value:t,configurable:!0}),uF=!!(typeof window<`u`&&window.document&&window.document.createElement);function dF(e,t,{checkForDefaultPrevented:n=!0}={}){return lF(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}lF(dF,`composeEventHandlers`);function coe(e){if(!uF)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}lF(coe,`getOwnerWindow`);function fF(e){if(!uF)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}lF(fF,`getOwnerDocument`);function pF(e,t=!1){let{activeElement:n}=fF(e);if(!n?.nodeName)return null;if(mF(n)&&n.contentDocument)return pF(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=fF(n).getElementById(e);if(t)return t}}return n}lF(pF,`getActiveElement`);function mF(e){return e.tagName===`IFRAME`}lF(mF,`isFrame`);var loe=Object.defineProperty,hF=(e,t)=>loe(e,`name`,{value:t,configurable:!0});function gF(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}hF(gF,`setRef`);function _F(...e){return t=>{let n=!1,r=e.map(e=>{let r=gF(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():gF(e[t],null)}}}}hF(_F,`composeRefs`);function vF(...e){return b.useCallback(_F(...e),e)}hF(vF,`useComposedRefs`);var uoe=Object.defineProperty,yF=(e,t)=>uoe(e,`name`,{value:t,configurable:!0});function doe(e,t){let n=b.createContext(t);n.displayName=e+`Context`;let r=yF(e=>{let{children:t,...r}=e,i=b.useMemo(()=>r,Object.values(r));return(0,H.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=b.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return yF(i,`useContext`),[r,i]}yF(doe,`createContext`);function bF(e,t=[]){let n=[];function r(t,r){let i=b.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=yF(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=b.useMemo(()=>o,Object.values(o));return(0,H.jsx)(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=b.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return yF(s,`useContext`),[o,s]}yF(r,`createContext`);let i=yF(()=>{let t=n.map(e=>b.createContext(e));return yF(function(n){let r=n?.[e]||t;return b.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,xF(i,...t)]}yF(bF,`createContextScope`);function xF(...e){let t=e[0];if(e.length===1)return t;let n=yF(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return yF(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])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}yF(xF,`composeContextScopes`);var foe=Object.defineProperty,SF=(e,t)=>foe(e,`name`,{value:t,configurable:!0}),poe=SF(((e,t)=>{let n={...t};for(let r in t){let i=e[r],a=t[r];if(/^on[A-Z]/.test(r))if(i&&a){let e=typeof i==`function`,t=typeof a==`function`;n[r]=(...n)=>{let r=t?a(...n):void 0;return e&&i(...n),r}}else i&&(n[r]=i);else r===`style`?n[r]={...typeof i==`object`?i:null,...typeof a==`object`?a:null}:r===`className`?n[r]=[i,a].filter(Boolean).join(` `):r===`aria-describedby`&&(n[r]=CF(a,i))}return{...e,...n}}),`mergeProps`);function CF(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}SF(CF,`concatAriaDescribedby`);var wF=b.createContext(poe);wF.displayName=`SlotContext`;function TF(e){let t=b.forwardRef((t,n)=>{let r=b.useContext(wF),{children:i,mergeProps:a=r,...o}=t,s=null,c=!1,l=[];jF(i)&&typeof NF==`function`&&(i=NF(i._payload)),b.Children.forEach(i,e=>{if(AF(e)){c=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;jF(n)&&typeof NF==`function`&&(n=NF(n._payload)),s=moe(t,n),l.push(s?.props?.children)}else l.push(e)}),s?s=b.cloneElement(s,void 0,l):!c&&b.Children.count(i)===1&&b.isValidElement(i)&&(s=i);let u=s?kF(s):void 0,d=vF(n,u);if(!s){if(i||i===0)throw Error(c?_oe(e):goe(e));return i}let f=a(o,s.props??{});return s.type!==b.Fragment&&(f.ref=n?d:u),b.cloneElement(s,f)});return t.displayName=`${e}.Slot`,t}SF(TF,`createSlot`);var EF=TF(`Slot`),DF=Symbol.for(`radix.slottable`);function OF(e){let t=SF(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=DF,t}SF(OF,`createSlottable`);var moe=SF((e,t)=>{if(`child`in e.props){let t=e.props.child;return b.isValidElement(t)?b.cloneElement(t,void 0,e.props.children(t.props.children)):null}return b.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function kF(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)}SF(kF,`getElementRef`);function AF(e){return b.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===DF}SF(AF,`isSlottable`);var hoe=Symbol.for(`react.lazy`);function jF(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===hoe&&`_payload`in e&&MF(e._payload)}SF(jF,`isLazyComponent`);function MF(e){return typeof e==`object`&&!!e&&`then`in e}SF(MF,`isPromiseLike`);var goe=SF(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),_oe=SF(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),NF=b.use,voe=Object.defineProperty,yoe=(e,t)=>voe(e,`name`,{value:t,configurable:!0}),PF=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=TF(`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,H.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function FF(e,t){e&&nC.flushSync(()=>e.dispatchEvent(t))}yoe(FF,`dispatchDiscreteCustomEvent`);var boe=Object.defineProperty,xoe=(e,t)=>boe(e,`name`,{value:t,configurable:!0});function IF(e){let t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>((...e)=>t.current?.(...e)),[])}xoe(IF,`useCallbackRef`);var Soe=Object.defineProperty,LF=(e,t)=>Soe(e,`name`,{value:t,configurable:!0}),RF=`dismissableLayer.update`,Coe=`dismissableLayer.pointerDownOutside`,woe=`dismissableLayer.focusOutside`,zF,BF=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Toe=b.forwardRef(LF(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=b.useContext(BF),[d,f]=b.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=b.useState({}),h=vF(t,f),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=_?g.indexOf(_):-1,y=d?g.indexOf(d):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,S=y>=v,C=b.useRef(!1),w=VF(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:C,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:b.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return S&&!t},[u.branches,S])}),T=HF(e=>{if(r&&C.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),E=d?y===g.length-1:!1,D=IF(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return b.useEffect(()=>{if(E)return p.addEventListener(`keydown`,D,{capture:!0}),()=>p.removeEventListener(`keydown`,D,{capture:!0})},[p,E,D]),b.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(zF=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),UF(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=zF))}},[d,p,n,u]),b.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),UF())},[d,u]),b.useEffect(()=>{let e=LF(()=>m({}),`handleUpdate`);return document.addEventListener(RF,e),()=>document.removeEventListener(RF,e)},[]),(0,H.jsx)(PF.div,{...l,ref:h,style:{pointerEvents:x?S?`auto`:`none`:void 0,...e.style},onFocusCapture:dF(e.onFocusCapture,T.onFocusCapture),onBlurCapture:dF(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:dF(e.onPointerDownCapture,w.onPointerDownCapture)})},`DismissableLayer`));function Eoe(){let e=b.useContext(BF),[t,n]=b.useState(null);return b.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}LF(Eoe,`useDismissableLayerSurface`);var Doe=LF(()=>!0,`IS_TRUE`);function VF(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=Doe}=t,s=IF(e),c=b.useRef(!1),l=b.useRef(!1),u=b.useRef(new Map),d=b.useRef(()=>{});return b.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}LF(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}LF(t,`isOutsideInteractionIntercepted`);function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}LF(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}LF(p,`handleInteractionBubble`);let m=LF(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||WF(Coe,s,p,{discrete:!0})};if(LF(f,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:LF(()=>c.current=!0,`onPointerDownCapture`)}}LF(VF,`usePointerDownOutside`);function HF(e,t=globalThis?.document){let n=IF(e),r=b.useRef(!1);return b.useEffect(()=>{let e=LF(e=>{e.target&&!r.current&&WF(woe,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:LF(()=>r.current=!0,`onFocusCapture`),onBlurCapture:LF(()=>r.current=!1,`onBlurCapture`)}}LF(HF,`useFocusOutside`);function UF(){let e=new CustomEvent(RF);document.dispatchEvent(e)}LF(UF,`dispatchUpdate`);function WF(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?FF(i,a):i.dispatchEvent(a)}LF(WF,`handleAndDispatchCustomEvent`);var GF=globalThis?.document?b.useLayoutEffect:()=>{},Ooe=Object.defineProperty,koe=(e,t)=>Ooe(e,`name`,{value:t,configurable:!0}),Aoe=b.useId||(()=>void 0),joe=0;function KF(e){let[t,n]=b.useState(Aoe());return GF(()=>{e||n(e=>e??String(joe++))},[e]),e||(t?`radix-${t}`:``)}koe(KF,`useId`);var Moe=Object.defineProperty,Noe=b.forwardRef(((e,t)=>Moe(e,`name`,{value:t,configurable:!0}))(function(e,t){let{children:n,width:r=10,height:i=5,...a}=e;return(0,H.jsx)(PF.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,H.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})},`Arrow`)),Poe=Object.defineProperty,Foe=(e,t)=>Poe(e,`name`,{value:t,configurable:!0});function qF(e){let[t,n]=b.useState(void 0);return GF(()=>{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}Foe(qF,`useSize`);var Ioe=Object.defineProperty,JF=(e,t)=>Ioe(e,`name`,{value:t,configurable:!0}),YF=`Popper`,[XF,ZF]=bF(YF),[Loe,QF]=XF(YF),Roe=JF(e=>{let{__scopePopper:t,children:n}=e,[r,i]=b.useState(null),[a,o]=b.useState(void 0);return(0,H.jsx)(Loe,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),zoe=`PopperAnchor`,Boe=b.forwardRef(JF(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=QF(zoe,n),o=b.useRef(null),s=a.onAnchorChange,c=vF(t,b.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=b.useRef(null);b.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&tI(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,H.jsx)(PF.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})},`PopperAnchor`)),$F=`PopperContent`,[Voe,Hoe]=XF($F),Uoe=b.forwardRef(JF(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=QF($F,n),[_,v]=b.useState(null),y=vF(t,v),[x,S]=b.useState(null),C=qF(x),w=C?.width??0,T=C?.height??0,E=r+(a===`center`?``:`-`+a),D=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},O=Array.isArray(l)?l:[l],k=O.length>0,A={padding:D,boundary:O.filter(eI),altBoundary:k},{refs:j,floatingStyles:M,placement:N,isPositioned:P,middlewareData:F}=iM({strategy:`fixed`,placement:E,whileElementsMounted:JF((...e)=>Wj(...e,{animationFrame:p===`always`}),`whileElementsMounted`),elements:{reference:g.anchor},middleware:[oM({mainAxis:i+T,alignmentAxis:o}),c&&sM({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?cM():void 0,...A}),c&&lM({...A}),uM({...A,apply:JF(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),x&&fM({element:x,padding:s}),qoe({arrowWidth:w,arrowHeight:T}),f&&dM({strategy:`referenceHidden`,...A,boundary:k?A.boundary:void 0})]}),I=g.setPlacementState;GF(()=>(I(N),()=>{I(void 0)}),[N,I]);let[L,ee]=tI(N),te=IF(m);GF(()=>{P&&te?.()},[P,te]);let ne=F.arrow?.x,R=F.arrow?.y,z=F.arrow?.centerOffset!==0,[B,re]=b.useState();return GF(()=>{_&&re(window.getComputedStyle(_).zIndex)},[_]),(0,H.jsx)(`div`,{ref:j.setFloating,"data-radix-popper-content-wrapper":``,style:{...M,transform:P?M.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:B,"--radix-popper-transform-origin":[F.transformOrigin?.x,F.transformOrigin?.y].join(` `),...F.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,H.jsx)(Voe,{scope:n,placedSide:L,placedAlign:ee,onArrowChange:S,arrowX:ne,arrowY:R,shouldHideArrow:z,children:(0,H.jsx)(PF.div,{"data-side":L,"data-align":ee,...h,ref:y,style:{...h.style,animation:P?h.style?.animation:`none`}})})})},`PopperContent`)),Woe=`PopperArrow`,Goe={top:`bottom`,right:`left`,bottom:`top`,left:`right`},Koe=b.forwardRef(JF(function(e,t){let{__scopePopper:n,...r}=e,i=Hoe(Woe,n),a=Goe[i.placedSide];return(0,H.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,H.jsx)(Noe,{...r,ref:t,style:{...r.style,display:`block`}})})},`PopperArrow`));function eI(e){return e!==null}JF(eI,`isNotNull`);var qoe=JF(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=tI(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function tI(e){let[t,n=`center`]=e.split(`-`);return[t,n]}JF(tI,`getSideAndAlignFromPlacement`);var Joe=Object.defineProperty,Yoe=b.forwardRef(((e,t)=>Joe(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=b.useState(!1);GF(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?nC.createPortal((0,H.jsx)(PF.div,{...r,ref:t}),o):null},`Portal`)),Xoe=Object.defineProperty,nI=(e,t)=>Xoe(e,`name`,{value:t,configurable:!0});function rI(e,t){return b.useReducer((e,n)=>t[e][n]??e,e)}nI(rI,`useStateMachine`);var iI=nI(e=>{let{present:t,children:n}=e,r=aI(t),i=typeof n==`function`?n({present:r.isPresent}):b.Children.only(n),a=sI(r.ref,lI(i));return typeof n==`function`||r.isPresent?b.cloneElement(i,{ref:a}):null},`Presence`);function aI(e){let[t,n]=b.useState(),r=b.useRef(null),i=b.useRef(e),a=b.useRef(`none`),o=b.useRef(void 0),[s,c]=rI(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return b.useEffect(()=>{s===`mounted`?(a.current=o.current??cI(r.current),o.current=void 0):a.current=`none`},[s]),GF(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=cI(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),GF(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=nI(a=>{let o=cI(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=nI(e=>{e.target===t&&(a.current=cI(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:b.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=cI(t)}else r.current=null;n(e)},[])}}nI(aI,`usePresence`);function oI(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}nI(oI,`setRef`);function sI(...e){let t=b.useRef(e);return t.current=e,b.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=oI(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():oI(n[e],null)}}},[])}nI(sI,`useStableComposedRefs`);function cI(e){return e?.animationName||`none`}nI(cI,`getAnimationName`);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)}nI(lI,`getElementRef`);var Zoe=Object.defineProperty,Qoe=(e,t)=>Zoe(e,`name`,{value:t,configurable:!0}),uI=b.useEffectEvent,dI=b.useInsertionEffect;function fI(e){if(typeof uI==`function`)return uI(e);let t=b.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof dI==`function`?dI(()=>{t.current=e}):GF(()=>{t.current=e}),b.useMemo(()=>((...e)=>t.current?.(...e)),[])}Qoe(fI,`useEffectEvent`);var $oe=Object.defineProperty,pI=(e,t)=>$oe(e,`name`,{value:t,configurable:!0}),ese=b.useInsertionEffect||GF;function mI({prop:e,defaultProp:t,onChange:n=pI(()=>{},`onChange`),caller:r}){let[i,a,o]=hI({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,b.useCallback(t=>{if(s){let n=gI(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}pI(mI,`useControllableState`);function hI({defaultProp:e,onChange:t}){let[n,r]=b.useState(e),i=b.useRef(n),a=b.useRef(t);return ese(()=>{a.current=t},[t]),b.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}pI(hI,`useUncontrolledState`);function gI(e){return typeof e==`function`}pI(gI,`isFunction`);var _I=Symbol(`RADIX:SYNC_STATE`);function tse(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=fI(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=b.useReducer((t,n)=>{if(n.type===_I)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),p=d.state,m=b.useRef(p);b.useEffect(()=>{m.current!==p&&(m.current=p,c||l(p))},[p,m,c]);let h=b.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return b.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:_I,state:i})},[i,d.state,c]),[h,f]}pI(tse,`useControllableStateReducer`);var nse=Object.defineProperty,rse=(e,t)=>nse(e,`name`,{value:t,configurable:!0}),ise=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),ase=b.forwardRef(rse(function(e,t){return(0,H.jsx)(PF.span,{...e,ref:t,style:{...ise,...e.style}})},`VisuallyHidden`)),ose=Object.defineProperty,vI=(e,t)=>ose(e,`name`,{value:t,configurable:!0}),[yI,sse]=bF(`Tooltip`,[ZF]),bI=ZF(),cse=`TooltipProvider`,lse=700,xI=`tooltip.open`,[use,SI]=yI(cse),dse=vI(e=>{let{__scopeTooltip:t,delayDuration:n=lse,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=b.useRef(!0),s=b.useRef(!1),c=b.useRef(0);return b.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,H.jsx)(use,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:b.useCallback(()=>{r<=0||(window.clearTimeout(c.current),o.current=!1)},[r]),onClose:b.useCallback(()=>{r<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r))},[r]),isPointerInTransitRef:s,onPointerInTransitChange:b.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})},`TooltipProvider`),CI=`Tooltip`,[fse,wI]=yI(CI),pse=vI(e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=SI(CI,e.__scopeTooltip),l=bI(t),[u,d]=b.useState(null),[f,p]=b.useState(void 0),m=KF(),h=b.useRef(0),g=o??c.disableHoverableContent,_=s??c.delayDuration,v=b.useRef(!1),[y,x]=mI({prop:r,defaultProp:i??!1,onChange:vI(e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(xI))):c.onClose(),a?.(e)},`onChange`),caller:CI}),S=b.useMemo(()=>y?v.current?`delayed-open`:`instant-open`:`closed`,[y]),C=b.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,x(!0)},[x]),w=b.useCallback(()=>{window.clearTimeout(h.current),h.current=0,x(!1)},[x]),T=b.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,x(!0),h.current=0},_)},[_,x]);b.useEffect(()=>()=>{h.current&&=(window.clearTimeout(h.current),0)},[]);let E=f??m;return(0,H.jsx)(Roe,{...l,children:(0,H.jsx)(fse,{scope:t,contentId:E,setContentId:p,open:y,stateAttribute:S,trigger:u,onTriggerChange:d,onTriggerEnter:b.useCallback(()=>{c.isOpenDelayedRef.current?T():C()},[c.isOpenDelayedRef,T,C]),onTriggerLeave:b.useCallback(()=>{g?w():(window.clearTimeout(h.current),h.current=0)},[w,g]),onOpen:C,onClose:w,disableHoverableContent:g,children:n})})},`Tooltip`),TI=`TooltipTrigger`,mse=b.forwardRef(vI(function(e,t){let{__scopeTooltip:n,"aria-describedby":r,...i}=e,a=wI(TI,n),o=SI(TI,n),s=bI(n),c=vF(t,b.useRef(null),a.onTriggerChange),l=b.useRef(!1),u=b.useRef(!1),d=b.useCallback(()=>l.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener(`pointerup`,d),[d]),(0,H.jsx)(Boe,{asChild:!0,...s,children:(0,H.jsx)(PF.button,{"aria-describedby":a.open?RI(r,a.contentId):r,"data-state":a.stateAttribute,...i,ref:c,onPointerMove:dF(e.onPointerMove,e=>{e.pointerType!==`touch`&&!u.current&&!o.isPointerInTransitRef.current&&(a.onTriggerEnter(),u.current=!0)}),onPointerLeave:dF(e.onPointerLeave,()=>{a.onTriggerLeave(),u.current=!1}),onPointerDown:dF(e.onPointerDown,()=>{a.open&&a.onClose(),l.current=!0,document.addEventListener(`pointerup`,d,{once:!0})}),onFocus:dF(e.onFocus,()=>{l.current||a.onOpen()}),onBlur:dF(e.onBlur,a.onClose),onClick:dF(e.onClick,a.onClose)})})},`TooltipTrigger`)),EI=`TooltipPortal`,[hse,gse]=yI(EI,{forceMount:void 0}),DI=vI(e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=wI(EI,t);return(0,H.jsx)(hse,{scope:t,forceMount:n,children:(0,H.jsx)(iI,{present:n||a.open,children:(0,H.jsx)(Yoe,{asChild:!0,container:i,children:r})})})},`TooltipPortal`),OI=`TooltipContent`,kI=b.forwardRef(vI(function(e,t){let n=gse(OI,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=wI(OI,e.__scopeTooltip);return(0,H.jsx)(iI,{present:r||o.open,children:o.disableHoverableContent?(0,H.jsx)(AI,{side:i,...a,ref:t}):(0,H.jsx)(_se,{side:i,...a,ref:t})})},`TooltipContent`)),_se=b.forwardRef(vI(function(e,t){let n=wI(OI,e.__scopeTooltip),r=SI(OI,e.__scopeTooltip),i=b.useRef(null),a=vF(t,i),[o,s]=b.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=b.useCallback(()=>{s(null),d(!1)},[d]),p=b.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=NI(r,MI(r,n.getBoundingClientRect())),a=PI(t.getBoundingClientRect()),o=II([...i,...a]);s(o),d(!0)},[d]);return b.useEffect(()=>()=>f(),[f]),b.useEffect(()=>{if(c&&u){let e=vI(e=>p(e,u),`handleTriggerLeave`),t=vI(e=>p(e,c),`handleContentLeave`);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,p,f]),b.useEffect(()=>{if(o){let e=vI(e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!FI(n,o);r?f():i&&(f(),l())},`handleTrackPointerGrace`);return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,H.jsx)(AI,{...e,ref:a})},`TooltipContentHoverable`)),vse=OF(`TooltipContent`),AI=b.forwardRef(vI(function(e,t){let{__scopeTooltip:n,children:r,"aria-label":i,id:a,onEscapeKeyDown:o,onPointerDownOutside:s,...c}=e,l=wI(OI,n),u=bI(n),{onClose:d}=l;b.useEffect(()=>(document.addEventListener(xI,d),()=>document.removeEventListener(xI,d)),[d]),b.useEffect(()=>{if(l.trigger){let e=vI(e=>{e.target instanceof Node&&e.target.contains(l.trigger)&&d()},`handleScroll`);return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[l.trigger,d]);let{setContentId:f}=l;return GF(()=>(f(a),()=>{f(void 0)}),[a,f]),(0,H.jsx)(Toe,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:d,children:(0,H.jsxs)(Uoe,{"data-state":l.stateAttribute,role:i?void 0:`tooltip`,id:i?void 0:l.contentId,...u,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,H.jsx)(vse,{children:r}),i?(0,H.jsx)(ase,{id:l.contentId,role:`tooltip`,children:i}):null]})})},`TooltipContentImpl`)),jI=b.forwardRef(vI(function(e,t){let{__scopeTooltip:n,...r}=e,i=bI(n);return(0,H.jsx)(Koe,{...i,...r,ref:t})},`TooltipArrow`));function MI(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}vI(MI,`getExitSideFromRect`);function NI(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}vI(NI,`getPaddedExitPoints`);function PI(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}vI(PI,`getPointsFromRect`);function FI(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}vI(FI,`isPointInPolygon`);function II(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),LI(t)}vI(II,`getHull`);function LI(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}vI(LI,`getHullPresorted`);function RI(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}vI(RI,`concatAriaDescribedby`);function yse({delayDuration:e=0,...t}){return(0,H.jsx)(dse,{"data-slot":`tooltip-provider`,delayDuration:e,...t})}function zI({...e}){return(0,H.jsx)(yse,{children:(0,H.jsx)(pse,{"data-slot":`tooltip`,...e})})}function BI({...e}){return(0,H.jsx)(mse,{"data-slot":`tooltip-trigger`,...e})}function VI({className:e,sideOffset:t=6,children:n,...r}){return(0,H.jsx)(DI,{children:(0,H.jsxs)(kI,{"data-slot":`tooltip-content`,sideOffset:t,className:Mr(`bg-inverted text-inverted-foreground dark:bg-subtle dark:text-foreground`,`z-50 w-fit rounded-md px-3 py-2 shadow-lg dark:shadow-none dark:drop-shadow-[0_0_0.5px_var(--color-border)]`,`type-text-xs font-semibold text-balance text-center whitespace-pre-line`,`animate-in fade-in-0 zoom-in-95`,`data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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`,`origin-(--radix-tooltip-content-transform-origin)`,e),...r,children:[n,(0,H.jsx)(jI,{className:`bg-inverted fill-inverted dark:bg-subtle dark:fill-subtle z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]`})]})})}var bse=`Label`,HI=b.forwardRef((e,t)=>(0,H.jsx)(UO.label,{...e,ref:t,onMouseDown:t=>{t.target.closest(`button, input, select, textarea`)||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));HI.displayName=bse;var UI=HI;function WI({className:e,...t}){return(0,H.jsx)(UI,{"data-slot":`label`,className:Mr(`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 xse({fieldId:e,label:t,required:n,hint:r,error:i,tooltip:a,children:o}){return(0,H.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[t&&(0,H.jsxs)(`div`,{className:`flex items-center gap-0.5`,children:[(0,H.jsx)(WI,{htmlFor:e,className:`type-text-sm font-medium text-muted-foreground`,children:t}),n&&(0,H.jsx)(`span`,{"aria-hidden":!0,className:`type-text-sm font-medium text-required`,children:`*`}),a&&(0,H.jsxs)(zI,{children:[(0,H.jsx)(BI,{asChild:!0,children:(0,H.jsx)(ai,{className:`size-4 text-muted-foreground`})}),(0,H.jsx)(VI,{children:a})]})]}),o,(r||i)&&(0,H.jsx)(`p`,{id:e?`${e}-description`:void 0,className:Mr(`type-text-sm`,i?`text-destructive`:`text-subtle-foreground`),children:i??r})]})}var Sse={sm:{standalone:`h-8 px-2 py-1.5 type-text-sm`,wrapper:`h-8`,inner:`px-2 py-1.5`,text:`type-text-sm`,leadingText:`pl-2 pr-2 type-text-sm`,leadingIcon:`pl-2 [&_svg]:size-4`},md:{standalone:`h-8 px-2.5 py-1.5 type-text-md`,wrapper:`h-8`,inner:`px-2.5 py-1.5`,text:`type-text-md`,leadingText:`pl-2.5 pr-2 type-text-md`,leadingIcon:`pl-2.5 [&_svg]:size-5`}};function GI({className:e,id:t,label:n,required:r,hint:i,error:a,tooltip:o,leadingText:s,leadingIcon:c,size:l=`md`,...u}){let d=b.useId(),f=t??d,p=s||c,m=Sse[l],h=(0,H.jsx)(`input`,{id:f,"data-slot":`input`,className:Mr(`w-full min-w-0 bg-transparent outline-none`,m.text,`text-foreground placeholder:text-placeholder`,`disabled:cursor-not-allowed`,!p&&[`flex`,m.standalone,`bg-background border border-border rounded-md`,`transition-colors`,`focus-visible:border-ring focus-visible:border-2`,`disabled:bg-disabled disabled:text-disabled-foreground`,`aria-invalid:border-border-error`,a&&`border-border-error`],p&&`flex-1 min-h-0`,e),required:r,"aria-invalid":a?!0:void 0,"aria-describedby":f&&(i||a)?`${f}-description`:void 0,...u});return(0,H.jsx)(xse,{fieldId:f,label:n,required:r,hint:i,error:a,tooltip:o,children:p?(0,H.jsxs)(`div`,{className:Mr(`flex items-center w-full overflow-hidden`,m.wrapper,`bg-background border border-border rounded-md`,`transition-colors`,`has-[input:focus-visible]:border-ring has-[input:focus-visible]:border-2`,`has-[input:disabled]:bg-disabled has-[input:disabled]:text-disabled-foreground has-[input:disabled]:cursor-not-allowed`,a&&`border-border-error`),children:[c&&(0,H.jsx)(`span`,{className:Mr(`flex items-center text-subtle-foreground [&_svg]:shrink-0`,m.leadingIcon),children:c}),s&&(0,H.jsx)(`span`,{className:Mr(`flex items-center text-subtle-foreground whitespace-nowrap border-r border-border self-stretch`,m.leadingText),children:s}),(0,H.jsx)(`div`,{className:Mr(`flex flex-1 items-center min-w-0`,m.inner),children:h})]}):h})}var KI=Ni([`flex w-full items-center gap-2 rounded-md border bg-background text-foreground shadow-xs outline-hidden`,`transition-colors`,`focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background`,`data-[state=open]:ring-2 data-[state=open]:ring-ring data-[state=open]:ring-offset-2 data-[state=open]:ring-offset-background`,`disabled:pointer-events-none disabled:bg-disabled disabled:text-disabled-foreground disabled:border-disabled`,`aria-invalid:border-border-error`,`[&_svg:not([class*='size-'])]:size-5 [&_svg]:shrink-0`].join(` `),{variants:{size:{sm:`min-h-8 px-2 py-1.5 type-text-sm`,md:`min-h-10 px-3.5 type-text-md`}},defaultVariants:{size:`md`}});function qI(e,[t,n]){return Math.min(n,Math.max(t,e))}function JI(e){let t=e+`CollectionProvider`,[n,r]=pk(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,H.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=Li(s),l=b.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=Ii(t,a(s,n).collectionRef);return(0,H.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=Li(u),p=b.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=b.useRef(null),s=Ii(t,o),c=a(u,n);return b.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,H.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 Cse=b.createContext(void 0);function YI(e){let t=b.useContext(Cse);return e||t||`ltr`}function XI(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])}var wse=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),Tse=Object.defineProperty,ZI=(e,t)=>Tse(e,`name`,{value:t,configurable:!0}),Ese=[` `,`Enter`,`ArrowUp`,`ArrowDown`],Dse=[` `,`Enter`],QI=`Select`,[$I,eL,Ose]=JI(QI),[tL,kse]=pk(QI,[Ose,vM]),nL=vM(),[Ase,rL]=tL(QI),[jse,Mse]=tL(QI);function iL(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:m,internal_do_not_use_render:h}=e,g=nL(t),[_,v]=b.useState(null),[y,x]=b.useState(null),[S,C]=b.useState(!1),w=YI(l),[T,E]=XM({prop:r,defaultProp:i??!1,onChange:a,caller:QI}),[D,O]=XM({prop:o,defaultProp:s,onChange:c,caller:QI}),k=b.useRef(null),A=b.useRef(D);b.useEffect(()=>{let e=m?_?.ownerDocument.getElementById(m):_?.form;if(e instanceof HTMLFormElement){let t=ZI(()=>O(A.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[m,_,O]);let j=!_||!!m||!!_.closest(`form`),[M,N]=b.useState(new Set),P=eA(),F=Array.from(M).map(e=>e.props.value).join(`;`),I=b.useCallback(e=>{N(t=>new Set(t).add(e))},[]),L=b.useCallback(e=>{N(t=>{let n=new Set(t);return n.delete(e),n})},[]),ee={required:p,trigger:_,onTriggerChange:v,valueNode:y,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:P,value:D,onValueChange:O,open:T,onOpenChange:E,dir:w,triggerPointerDownPosRef:k,disabled:f,name:u,autoComplete:d,form:m,nativeOptions:M,nativeSelectKey:F,isFormControl:j};return(0,H.jsx)(AM,{...g,children:(0,H.jsx)(Ase,{scope:t,...ee,children:(0,H.jsx)($I.Provider,{scope:t,children:(0,H.jsx)(jse,{scope:t,onNativeOptionAdd:I,onNativeOptionRemove:L,children:mL(h)?h(ee):n})})})})}ZI(iL,`SelectProvider`);var Nse=ZI(e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,H.jsx)(iL,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,H.jsxs)(H.Fragment,{children:[n,e?(0,H.jsx)(ice,{__scopeSelect:t}):null]})})},`Select`),Pse=`SelectTrigger`,Fse=b.forwardRef(ZI(function(e,t){let{__scopeSelect:n,disabled:r=!1,...i}=e,a=nL(n),o=rL(Pse,n),s=o.disabled||r,c=Ii(t,o.onTriggerChange),l=eL(n),u=b.useRef(`touch`),[d,f,p]=gL(e=>{let t=l().filter(e=>!e.disabled),n=_L(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),m=ZI(e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})},`handleOpen`);return(0,H.jsx)(jM,{asChild:!0,...a,children:(0,H.jsx)(UO.button,{type:`button`,role:`combobox`,"aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":hL(o.value)?``:void 0,...i,ref:c,onClick:ck(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:ck(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(m(e),e.preventDefault())}),onKeyDown:ck(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&Ese.includes(e.key)&&(m(),e.preventDefault())})})})},`SelectTrigger`)),Ise=`SelectValue`,Lse=b.forwardRef(ZI(function(e,t){let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=rL(Ise,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=Ii(t,c.onValueNodeChange);Zk(()=>{l(u)},[l,u]);let f=hL(c.value);return(0,H.jsx)(UO.span,{...s,asChild:!f&&s.asChild,ref:d,style:{pointerEvents:`none`},children:(0,H.jsx)(b.Fragment,{children:f?o:a},f?`placeholder`:`value`)})},`SelectValue`)),Rse=b.forwardRef(ZI(function(e,t){let{__scopeSelect:n,children:r,...i}=e;return(0,H.jsx)(UO.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})},`SelectIcon`)),[zse,Bse]=tL(`SelectPortal`,{forceMount:void 0}),Vse=ZI(e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,H.jsx)(zse,{scope:e.__scopeSelect,forceMount:n,children:(0,H.jsx)(PM,{asChild:!0,...r})})},`SelectPortal`),aL=`SelectContent`,Hse=b.forwardRef(ZI(function(e,t){let n=Bse(aL,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=rL(aL,e.__scopeSelect),[o,s]=b.useState();return Zk(()=>{s(new DocumentFragment)},[]),(0,H.jsx)(RM,{present:r||a.open,children:({present:e})=>e?(0,H.jsx)(Gse,{...i,ref:t}):(0,H.jsx)(Use,{...i,fragment:o})})},`SelectContent`)),Use=b.forwardRef(ZI(function(e,t){let{__scopeSelect:n,children:r,fragment:i}=e;return i?nC.createPortal((0,H.jsx)(sL,{scope:n,children:(0,H.jsx)($I.Slot,{scope:n,children:(0,H.jsx)(`div`,{ref:t,children:r})})}),i):null},`SelectContentFragment`)),oL=10,[sL,cL]=tL(aL),Wse=Li(`SelectContent.RemoveScroll`),Gse=b.forwardRef(ZI(function(e,t){let{__scopeSelect:n}=e,{position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,..._}=e,v=rL(aL,n),[y,x]=b.useState(null),[S,C]=b.useState(null),w=Ii(t,x),[T,E]=b.useState(null),[D,O]=b.useState(null),k=eL(n),[A,j]=b.useState(!1),M=b.useRef(!1);b.useEffect(()=>{if(y)return lN(y)},[y]),Mk();let N=b.useCallback(e=>{let[t,...n]=k().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&S&&(S.scrollTop=0),n===r&&S&&(S.scrollTop=S.scrollHeight),n?.focus(),document.activeElement!==i))return},[k,S]),P=b.useCallback(()=>N([T,y]),[N,T,y]);b.useEffect(()=>{A&&P()},[A,P]);let{onOpenChange:F,triggerPointerDownPosRef:I}=v;b.useEffect(()=>{if(y){let e={x:0,y:0},t=ZI(t=>{e={x:Math.abs(Math.round(t.pageX)-(I.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(I.current?.y??0))}},`handlePointerMove`),n=ZI(n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(y)||F(!1),document.removeEventListener(`pointermove`,t),I.current=null},`handlePointerUp`);return I.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[y,F,I]),b.useEffect(()=>{let e=ZI(()=>F(!1),`close`);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[F]);let[L,ee]=gL(e=>{let t=k().filter(e=>!e.disabled),n=_L(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),te=b.useCallback((e,t,n)=>{let r=!M.current&&!n;(v.value!==void 0&&v.value===t||r)&&(E(e),r&&(M.current=!0))},[v.value]),ne=b.useCallback(()=>y?.focus(),[y]),R=b.useCallback((e,t,n)=>{let r=!M.current&&!n;(v.value!==void 0&&v.value===t||r)&&O(e)},[v.value]),z=r===`popper`?lL:Kse,B=z===lL?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,H.jsx)(sL,{scope:n,content:y,viewport:S,onViewportChange:C,itemRefCallback:te,selectedItem:T,onItemLeave:ne,itemTextRefCallback:R,focusSelectedItem:P,selectedItemText:D,position:r,isPositioned:A,searchRef:L,children:(0,H.jsx)(bP,{as:Wse,allowPinchZoom:!0,children:(0,H.jsx)(zk,{asChild:!0,trapped:v.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:ck(i,e=>{v.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,H.jsx)(Ck,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:(0,H.jsx)(z,{role:`listbox`,id:v.contentId,"data-state":v.open?`open`:`closed`,dir:v.dir,onContextMenu:e=>e.preventDefault(),..._,...B,onPlaced:()=>j(!0),ref:w,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:ck(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&ee(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=k().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>N(t)),e.preventDefault()}})})})})})})},`SelectContentImpl`)),Kse=b.forwardRef(ZI(function(e,t){let{__scopeSelect:n,onPlaced:r,...i}=e,a=rL(aL,n),o=cL(aL,n),[s,c]=b.useState(null),[l,u]=b.useState(null),d=Ii(t,u),f=eL(n),p=b.useRef(!1),m=b.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:v}=o,y=b.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&h&&g&&_){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=_.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-oL,d=qI(a,[oL,Math.max(oL,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-oL,d=qI(a,[oL,Math.max(oL,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-oL*2,u=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+v+u+b+y,S=Math.min(g.offsetHeight*5,x),C=window.getComputedStyle(h),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-oL,D=c-E,O=g.offsetHeight/2,k=g.offsetTop+O,A=m+v+k,j=x-A;if(A<=E){let e=o.length>0&&g===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-h.offsetTop-h.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&g===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+h.offsetTop+(e?w:0)+O)+j;s.style.height=t+`px`,h.scrollTop=A-E+h.offsetTop}s.style.margin=`${oL}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,h,g,_,a.dir,r]);Zk(()=>y(),[y]);let[x,S]=b.useState();return Zk(()=>{l&&S(window.getComputedStyle(l).zIndex)},[l]),(0,H.jsx)(qse,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:b.useCallback(e=>{e&&m.current===!0&&(y(),v?.(),m.current=!1)},[y,v]),children:(0,H.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:x},children:(0,H.jsx)(UO.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})},`SelectItemAlignedPosition`)),lL=b.forwardRef(ZI(function(e,t){let{__scopeSelect:n,align:r=`start`,collisionPadding:i=oL,...a}=e,o=nL(n);return(0,H.jsx)(MM,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})},`SelectPopperPosition`)),[qse,Jse]=tL(aL,{}),uL=`SelectViewport`,Yse=b.forwardRef(ZI(function(e,t){let{__scopeSelect:n,nonce:r,...i}=e,a=cL(uL,n),o=Jse(uL,n),s=Ii(t,a.onViewportChange),c=b.useRef(0);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,H.jsx)($I.Slot,{scope:n,children:(0,H.jsx)(UO.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:ck(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-oL*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})},`SelectViewport`)),[Xse,Zse]=tL(`SelectGroup`),dL=`SelectItem`,[Qse,fL]=tL(dL),$se=b.forwardRef(ZI(function(e,t){let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=rL(dL,n),c=cL(dL,n),l=s.value===r,[u,d]=b.useState(a??``),[f,p]=b.useState(!1),m=Ii(t,hk(e=>c.itemRefCallback?.(e,r,i))),h=eA(),g=b.useRef(`touch`),_=ZI(()=>{i||(s.onValueChange(r),s.onOpenChange(!1))},`handleSelect`);return(0,H.jsx)(Qse,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:b.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,H.jsx)($I.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,H.jsx)(UO.div,{role:`option`,"aria-labelledby":h,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:m,onFocus:ck(o.onFocus,()=>p(!0)),onBlur:ck(o.onBlur,()=>p(!1)),onClick:ck(o.onClick,()=>{g.current!==`mouse`&&_()}),onPointerUp:ck(o.onPointerUp,()=>{g.current===`mouse`&&_()}),onPointerDown:ck(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:ck(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ck(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:ck(o.onKeyDown,e=>{i||e.target!==e.currentTarget||c.searchRef?.current!==``&&e.key===` `||(Dse.includes(e.key)&&_(),e.key===` `&&e.preventDefault())})})})})},`SelectItem`)),pL=`SelectItemText`,ece=b.forwardRef(ZI(function(e,t){let{__scopeSelect:n,className:r,style:i,...a}=e,o=rL(pL,n),s=cL(pL,n),c=fL(pL,n),l=Mse(pL,n),[u,d]=b.useState(null),f=hk(e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=Ii(t,d,c.onItemTextChange,f),m=u?.textContent,h=b.useMemo(()=>(0,H.jsx)(`option`,{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:_}=l;return Zk(()=>(g(h),()=>_(h)),[g,_,h]),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(UO.span,{id:c.textId,...a,ref:p}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren&&!hL(o.value)?nC.createPortal(a.children,o.valueNode):null]})},`SelectItemText`)),tce=`SelectItemIndicator`,nce=b.forwardRef(ZI(function(e,t){let{__scopeSelect:n,...r}=e;return fL(tce,n).isSelected?(0,H.jsx)(UO.span,{"aria-hidden":!0,...r,ref:t}):null},`SelectItemIndicator`)),rce=`SelectBubbleInput`,ice=b.forwardRef(ZI(function({__scopeSelect:e,...t},n){let r=rL(rce,e),{value:i,onValueChange:a,required:o,disabled:s,name:c,autoComplete:l,form:u}=r,{nativeOptions:d,nativeSelectKey:f}=r,p=b.useRef(null),m=Ii(n,p),h=i??``,g=XI(h),_=Array.from(d).some(e=>(e.props.value??``)===``);return b.useEffect(()=>{let e=p.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set;if(g!==h&&n){let t=new Event(`change`,{bubbles:!0});n.call(e,h),e.dispatchEvent(t)}},[g,h]),(0,H.jsxs)(UO.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:c,autoComplete:l,disabled:s,form:u,onChange:e=>a(e.target.value),...t,style:{...wse,...t.style},ref:m,defaultValue:h,children:[hL(i)&&!_?(0,H.jsx)(`option`,{value:``}):null,Array.from(d)]},f)},`SelectBubbleInput`));function mL(e){return typeof e==`function`}ZI(mL,`isFunction`);function hL(e){return e===``||e===void 0}ZI(hL,`shouldShowPlaceholder`);function gL(e){let t=hk(e),n=b.useRef(``),r=b.useRef(0),i=b.useCallback(e=>{let i=n.current+e;t(i),ZI((function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))}),`updateSearch`)(i)},[t]),a=b.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return b.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}ZI(gL,`useTypeaheadSearch`);function _L(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=vL(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}ZI(_L,`findNextItem`);function vL(e,t){return e.map((n,r)=>e[(t+r)%e.length])}ZI(vL,`wrapArray`);function yL({...e}){return(0,H.jsx)(Nse,{"data-slot":`select`,...e})}function bL({...e}){return(0,H.jsx)(Lse,{"data-slot":`select-value`,...e})}function xL({className:e,size:t=`md`,children:n,...r}){return(0,H.jsxs)(Fse,{"data-slot":`select-trigger`,className:Mr(KI({size:t}),`justify-between data-[placeholder]:text-placeholder`,`*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2`,e),...r,children:[n,(0,H.jsx)(Rse,{asChild:!0,children:(0,H.jsx)(qr,{className:`size-5 shrink-0 text-muted-foreground`})})]})}function SL({className:e,children:t,position:n=`popper`,...r}){return(0,H.jsx)(Vse,{children:(0,H.jsx)(Hse,{"data-slot":`select-content`,className:Mr(`bg-popover text-popover-foreground`,`relative z-50 max-h-[min(var(--radix-select-content-available-height),300px)] min-w-[8rem] overflow-hidden rounded-md border border-border-secondary py-1 shadow-lg`,`origin-(--radix-select-content-transform-origin)`,`data-[state=open]:animate-in data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,`data-[state=closed]:zoom-out-95 data-[state=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`,n===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,e),position:n,...r,children:(0,H.jsx)(Yse,{className:Mr(`p-1`,n===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1`),children:t})})})}function CL({className:e,children:t,...n}){return(0,H.jsxs)($se,{"data-slot":`select-item`,className:Mr(`relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pl-2 outline-hidden select-none`,`type-text-md font-medium text-foreground mx-1 my-px`,`[@media(hover:hover)]:hover:bg-background-hover`,`focus:bg-background-hover`,`data-[disabled]:pointer-events-none data-[disabled]:text-disabled-foreground`,`[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...n,children:[(0,H.jsx)(`span`,{className:`absolute right-2 flex size-4 items-center justify-center`,children:(0,H.jsx)(nce,{children:(0,H.jsx)(Kr,{className:`size-4 text-primary`})})}),(0,H.jsx)(ece,{children:t})]})}function ace({open:e,onOpenChange:t,defaultName:n,teams:r,defaultTeamId:i,staleConfig:a,onCreate:o}){let s=(0,b.useId)(),[c,l]=(0,b.useState)(n),[u,d]=(0,b.useState)(i),[f,p]=(0,b.useState)(null),[m,h]=(0,b.useState)(!1);(0,b.useEffect)(()=>{e&&(l(n),d(i),p(null))},[e,n,i]);let g=c.trim(),_=r.find(e=>e.id===u)??r[0];return(0,H.jsx)(rF,{open:e,onOpenChange:t,children:(0,H.jsxs)(iF,{children:[(0,H.jsxs)(aF,{children:[(0,H.jsx)(sF,{children:`Deploy to Alpic`}),(0,H.jsx)(cF,{children:a?`The linked project is no longer available. Create a new one to deploy.`:`Name your project to create it and run the first deployment.`})]}),(0,H.jsxs)(`form`,{onSubmit:async e=>{if(e.preventDefault(),!(!g||m)){h(!0),p(null);try{await o(g,u,_?.name),t(!1)}catch(e){p(e instanceof Error?e.message:`Failed to create project`)}finally{h(!1)}}},className:`space-y-3`,children:[(0,H.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,H.jsx)(WI,{htmlFor:s,children:`Project name`}),(0,H.jsx)(GI,{id:s,value:c,onChange:e=>l(e.target.value),placeholder:`my-mcp-app`,autoFocus:!0}),r.length>1?(0,H.jsxs)(`div`,{className:`flex items-center gap-1.5 text-xs text-muted-foreground`,children:[(0,H.jsx)(`span`,{children:`Team:`}),(0,H.jsxs)(yL,{value:u,onValueChange:d,children:[(0,H.jsx)(xL,{size:`sm`,className:`h-6 gap-1 border-none bg-transparent px-1 font-medium text-foreground text-xs shadow-none hover:bg-background-hover`,children:(0,H.jsx)(bL,{})}),(0,H.jsx)(SL,{align:`start`,className:`min-w-48`,children:r.map(e=>(0,H.jsx)(CL,{value:e.id,className:`cursor-pointer text-xs`,children:e.name},e.id))})]})]}):(0,H.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Team: `,(0,H.jsx)(`span`,{className:`font-medium`,children:_?.name})]}),f&&(0,H.jsx)(`p`,{className:`text-destructive text-xs`,children:f})]}),(0,H.jsxs)(oF,{children:[(0,H.jsx)($i,{type:`button`,variant:`secondary`,onClick:()=>t(!1),children:`Cancel`}),(0,H.jsx)($i,{type:`submit`,variant:`primary`,disabled:!g||m,children:m?`Creating…`:`Create & deploy`})]})]})]})})}var oce={idle:{variant:`muted`,pulse:!1},starting:{variant:`warning`,pulse:!0},connected:{variant:`success`,pulse:!1},error:{variant:`destructive`,pulse:!1}},sce=120,wL=`max-w-[200px]`;function cce(){let[e,t]=(0,b.useState)(!1),n=(0,b.useRef)(null);return(0,b.useEffect)(()=>()=>{n.current&&clearTimeout(n.current)},[]),{open:e,setOpen:t,onEnter:(0,b.useCallback)(()=>{n.current&&=(clearTimeout(n.current),null),t(!0)},[]),onLeave:(0,b.useCallback)(()=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>t(!1),sce)},[])}}function TL({trigger:e,className:t,children:n}){let{open:r,setOpen:i,onEnter:a,onLeave:o}=cce(),s=(0,b.useId)();return(0,H.jsxs)(jP,{open:r,onOpenChange:i,children:[(0,H.jsx)(Eae,{asChild:!0,children:(0,b.cloneElement)(e,{onMouseEnter:a,onMouseLeave:o,"data-popover-anchor":s})}),(0,H.jsx)(NP,{align:`end`,sideOffset:0,className:IP(`p-4`,t),onMouseEnter:a,onMouseLeave:o,onOpenAutoFocus:e=>e.preventDefault(),onPointerDownOutside:e=>{e.target?.closest?.(`[data-popover-anchor="${CSS.escape(s)}"]`)&&e.preventDefault()},children:n})]})}function EL({label:e,icon:t,buildUrl:n,description:r}){let i=KP(e=>e.state),a=KP(e=>e.start),[o,s]=(0,b.useState)(!1),c=i.status===`connected`?n(i.url):null;(0,b.useEffect)(()=>{o&&i.status===`connected`?(window.open(n(i.url),`_blank`,`noreferrer,noopener`),s(!1)):o&&(i.status===`error`||i.status===`idle`)&&s(!1)},[o,i,n]);let l=()=>{if(c){window.open(c,`_blank`,`noreferrer,noopener`);return}s(!0),a()},u=o,d=!c&&i.status===`starting`;return(0,H.jsx)(TL,{className:`w-72`,trigger:(0,H.jsx)($i,{variant:`secondary`,"aria-disabled":d,className:IP(d&&`opacity-50 cursor-not-allowed`),icon:u?(0,H.jsx)(PP,{size:`sm`,className:`text-current`}):t,onClick:d?void 0:l,children:e}),children:c?(0,H.jsx)(`p`,{className:IP(`text-sm text-muted-foreground text-center mx-auto`,wL),children:r}):(0,H.jsx)(`p`,{className:`text-sm text-muted-foreground text-center`,children:u?`Starting the tunnel, ${e} will open shortly…`:`Click to start the tunnel and open ${e}.`})})}function lce(){return(0,H.jsx)(EL,{label:`Playground`,icon:(0,H.jsx)(pi,{className:`size-3.5`}),buildUrl:e=>`${e}/try`,description:`Chat with your MCP server with a real LLM and share it`})}function uce(){return(0,H.jsx)(EL,{label:`Audit`,icon:(0,H.jsx)($r,{className:`size-3.5`}),buildUrl:e=>`https://app.alpic.ai/beacon?url=${encodeURIComponent(`${e}/mcp`)}`,description:`Audit your MCP server's tools, prompts, and resources`})}var dce=`https://app.alpic.ai`;function fce(){let e=WP(e=>e.status.state===`ready`&&e.status.mcpServerUrl?e.status.mcpServerUrl:e.progress.status===`deployed`?e.progress.mcpServerUrl:null),{copied:t,copy:n}=zP();if(!e)return null;let r=e.replace(/^https?:\/\//,``);return(0,H.jsxs)(`button`,{type:`button`,"aria-label":`Copy live MCP server URL`,onClick:()=>n(e),className:`inline-flex h-8 items-center gap-2 rounded-md border bg-light-gray px-2.5 text-sm hover:bg-background-hover`,children:[(0,H.jsx)(ii,{className:`size-3.5 text-quaternary-foreground`,"aria-hidden":!0}),(0,H.jsx)(`span`,{className:`max-w-48 truncate font-mono text-xs`,children:r}),(0,H.jsx)(`span`,{className:`text-quaternary-foreground`,children:t?(0,H.jsx)(Kr,{className:`size-3.5`}):(0,H.jsx)(ti,{className:`size-3.5`})})]})}function pce(){let{status:e,progress:t,redeploy:n,createAndDeploy:r,signIn:i}=WP(),a=RO(),[o,s]=(0,b.useState)(!1),[c,l]=(0,b.useState)(!1),[u,d]=(0,b.useState)(null),f=t.status===`deploying`||e.state===`ready`&&e.lastDeployStatus===`ongoing`,p=e.state===`ready`&&!!e.lastDeployGit,m=c||f||p||e.state===`loading`||e.state===`noTeam`||e.state===`error`,h=()=>{d(null),l(!0),i().catch(e=>d(e instanceof Error?e.message:`Sign-in failed`)).finally(()=>l(!1))},g=()=>{d(null),n().catch(e=>d(e instanceof Error?e.message:`Deploy failed`))},_=()=>{if(d(null),e.state===`signedOut`){h();return}if(e.state===`ready`){g();return}e.state===`needsProject`&&s(!0)};return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(TL,{className:`w-72`,trigger:(0,H.jsx)($i,{variant:`cta`,className:IP(`h-8 px-2 gap-1`,m&&`opacity-50 cursor-not-allowed`),"aria-disabled":m,icon:c?(0,H.jsx)(PP,{size:`sm`,className:`text-current`}):(0,H.jsx)(FP,{className:`size-2`,...gce(e,t),"aria-hidden":!0}),onClick:m?void 0:_,children:`Deploy`}),children:(0,H.jsx)(mce,{status:e,progress:t,signingIn:c,actionError:u,onRedeploy:g,onSignIn:h})}),e.state===`needsProject`&&(0,H.jsx)(ace,{open:o,onOpenChange:s,defaultName:a?.name??`my-mcp-app`,teams:e.teams,defaultTeamId:e.defaultTeamId,staleConfig:e.staleConfig,onCreate:r})]})}function mce({status:e,progress:t,signingIn:n,actionError:r,onRedeploy:i,onSignIn:a}){if(t.status===`deploying`)return(0,H.jsx)(DL,{startedAt:t.startedAt,deploymentPageUrl:t.deploymentPageUrl});let o=e.state===`ready`&&!!e.lastDeployGit;if(t.status===`deployed`&&!o)return(0,H.jsxs)(`div`,{className:`space-y-3`,children:[(0,H.jsx)(`p`,{className:`text-sm font-medium`,children:`Deployed`}),(0,H.jsx)(OL,{url:t.mcpServerUrl}),t.deploymentPageUrl&&(0,H.jsx)(kL,{href:t.deploymentPageUrl})]});if(t.status===`failed`&&!o)return(0,H.jsxs)(`div`,{className:`space-y-2`,children:[(0,H.jsx)(`p`,{className:`text-sm font-medium text-destructive`,children:`Deployment failed`}),(0,H.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:t.message}),t.deploymentPageUrl&&(0,H.jsx)(AL,{href:t.deploymentPageUrl,label:`Go to logs`})]});switch(e.state){case`loading`:return(0,H.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Checking Alpic…`});case`signedOut`:return(0,H.jsxs)(`div`,{className:`space-y-2`,children:[(0,H.jsx)(`p`,{className:`text-sm font-medium`,children:`Sign in to Alpic to deploy`}),(0,H.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Connect your Alpic account to deploy this server.`}),(0,H.jsx)($i,{variant:`primary`,className:`h-7 w-full`,disabled:n,onClick:a,children:n?`Signing in…`:`Sign in to Alpic`}),r&&(0,H.jsx)(`p`,{className:`text-xs text-destructive`,children:r})]});case`noTeam`:return(0,H.jsxs)(`div`,{className:`space-y-2`,children:[(0,H.jsx)(`p`,{className:`text-sm font-medium`,children:`No team yet`}),(0,H.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Create a team on Alpic before deploying.`}),(0,H.jsx)(AL,{href:dce,label:`Open Alpic`})]});case`needsProject`:return(0,H.jsx)(`p`,{className:`text-sm`,children:`Click to deploy to Alpic`});case`ready`:return e.lastDeployStatus===`ongoing`?(0,H.jsx)(DL,{startedAt:e.lastDeployStartedAt??null,deploymentPageUrl:e.deploymentPageUrl??null}):(0,H.jsxs)(`div`,{className:`space-y-2`,children:[!e.lastDeployGit&&(0,H.jsx)(`p`,{className:`text-sm`,children:`Click to deploy to Alpic`}),e.mcpServerUrl&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`p`,{className:`text-xs font-medium text-muted-foreground`,children:`Last Deployment:`}),(0,H.jsx)(OL,{url:e.mcpServerUrl})]}),e.deploymentPageUrl&&(0,H.jsx)(kL,{href:e.deploymentPageUrl}),e.lastDeployGit&&(0,H.jsx)(ik,{className:`px-3 py-2`,title:`Last deployed from Git`,description:(0,H.jsxs)(`div`,{className:`space-y-2`,children:[(0,H.jsx)(_ce,{git:e.lastDeployGit}),(0,H.jsx)($i,{variant:`primary`,className:`h-7 w-full`,onClick:i,children:`Deploy anyway`})]})}),r&&(0,H.jsx)(`p`,{className:`text-xs text-destructive`,children:r})]});case`error`:return(0,H.jsx)(`p`,{className:`text-xs text-destructive`,children:e.message})}}function hce(e){let t=Math.max(0,Math.floor(e/1e3)),n=Math.floor(t/60),r=t%60;return n>0?`${n}m ${String(r).padStart(2,`0`)}s`:`${r}s`}function DL({startedAt:e,deploymentPageUrl:t}){let[n,r]=(0,b.useState)(()=>e==null?0:Date.now()-e);return(0,b.useEffect)(()=>{if(e==null)return;let t=()=>r(Date.now()-e);t();let n=setInterval(t,1e3);return()=>clearInterval(n)},[e]),(0,H.jsxs)(`div`,{className:`space-y-2`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(PP,{size:`sm`,className:`shrink-0 text-current`}),(0,H.jsx)(`p`,{className:`text-sm`,children:`Deploying…`}),e!=null&&(0,H.jsx)(`span`,{className:`ml-auto font-mono text-xs text-muted-foreground`,children:hce(n)})]}),t&&(0,H.jsx)(AL,{href:t,label:`Go to logs`})]})}function gce(e,t){if(t.status===`deploying`)return{variant:`warning`,pulse:!0};let n=e.state===`ready`&&!!e.lastDeployGit;if(t.status===`failed`&&!n)return{variant:`destructive`,pulse:!1};if(t.status===`deployed`&&!n)return{variant:`success`,pulse:!1};if(e.state===`ready`)switch(e.lastDeployStatus){case`ongoing`:return{variant:`warning`,pulse:!0};case`failed`:case`canceled`:return{variant:`destructive`,pulse:!1};case`deployed`:return{variant:`success`,pulse:!1}}return{variant:`muted`,pulse:!1}}function OL({url:e}){let{copied:t,copy:n}=zP();return(0,H.jsxs)(`button`,{type:`button`,"aria-label":`Copy MCP server URL`,onClick:()=>n(e),className:`flex w-full items-center gap-2 rounded-md border bg-light-gray px-2 py-1.5 text-left hover:bg-background-hover`,children:[(0,H.jsx)(`span`,{className:`flex-1 truncate font-mono text-xs`,children:e}),(0,H.jsx)(`span`,{className:`text-quaternary-foreground`,children:t?(0,H.jsx)(Kr,{className:`size-3.5`}):(0,H.jsx)(ti,{className:`size-3.5`})})]})}function kL({href:e}){return(0,H.jsx)($i,{asChild:!0,variant:`tertiary`,className:`w-full`,children:(0,H.jsxs)(`a`,{href:e,target:`_blank`,rel:`noreferrer noopener`,children:[(0,H.jsx)(ni,{className:`size-3.5`}),`Go to deployment page`]})})}function _ce({git:e}){return!e.ref&&!e.commitMessage&&!e.author?null:(0,H.jsxs)(`div`,{className:`space-y-0.5 text-xs`,children:[e.ref&&(0,H.jsxs)(`p`,{children:[`Branch `,(0,H.jsx)(`span`,{className:`font-mono`,children:e.ref}),e.author&&(0,H.jsxs)(H.Fragment,{children:[` · by `,e.author]})]}),e.commitMessage&&(0,H.jsxs)(`p`,{className:`truncate`,children:[`“`,e.commitMessage,`”`]})]})}function AL({href:e,label:t}){return(0,H.jsxs)(`a`,{href:e,target:`_blank`,rel:`noreferrer`,className:`flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground`,children:[(0,H.jsx)(ni,{className:`size-3.5`}),t]})}function vce(){let{state:e,start:t,stop:n}=KP(),{copied:r,copy:i}=zP(),a=e.status===`connected`?`${e.url}/mcp`:null,o=a?()=>i(a):e.status===`starting`?n:t;return(0,H.jsxs)(TL,{className:IP(`w-60 text-center`,e.status===`starting`&&`animate-pulse w-60`),trigger:(0,H.jsxs)($i,{variant:`secondary`,onClick:o,children:[(0,H.jsx)(FP,{className:`size-2`,...oce[e.status],"aria-hidden":!0}),a?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`span`,{className:`mx-2 font-mono text-xs`,children:a.replace(/^https?:\/\//,``)}),r?(0,H.jsx)(Kr,{className:`size-3.5`}):(0,H.jsx)(ti,{className:`size-3.5`})]}):`Tunnel`]}),children:[e.status===`idle`&&(0,H.jsx)(yce,{}),e.status===`error`&&(0,H.jsx)(bce,{message:e.message,onRetry:t}),e.status===`starting`&&(0,H.jsx)(xce,{message:e.message}),e.status===`connected`&&(0,H.jsx)(Sce,{onStop:n})]})}function yce(){return(0,H.jsx)(`div`,{className:`space-y-3`,children:(0,H.jsx)(`p`,{className:IP(`text-sm text-muted-foreground mx-auto`,wL),children:`Get a public URL that you can use in Claude or ChatGPT.`})})}function bce({message:e,onRetry:t}){return(0,H.jsxs)(`div`,{className:`space-y-3 text-left`,children:[(0,H.jsx)(`p`,{className:`text-sm text-destructive`,children:e}),(0,H.jsx)($i,{variant:`primary`,className:`w-full`,onClick:t,children:`Retry`})]})}function xce({message:e}){return(0,H.jsx)(`div`,{className:`space-y-3`,children:(0,H.jsxs)(`div`,{className:`flex items-center justify-center gap-2`,children:[(0,H.jsx)(FP,{className:`size-2`,variant:`warning`,pulse:!0,"aria-hidden":!0}),(0,H.jsx)(`p`,{className:IP(`text-sm text-muted-foreground`,wL),children:e}),(0,H.jsx)(PP,{size:`sm`,className:`text-current`})]})})}function Sce({onStop:e}){return(0,H.jsxs)(`div`,{className:`space-y-3 text-left`,children:[(0,H.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,H.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Click to copy the tunnel URL to use in Claude or ChatGPT`})}),(0,H.jsx)(ZO,{}),(0,H.jsx)($i,{variant:`tertiary`,className:`w-full`,onClick:e,icon:(0,H.jsx)(ki,{}),children:`Stop tunnel`})]})}var Cce=[{label:`discord`,href:`https://discord.gg/awV4gu74wK`},{label:`docs`,href:`https://docs.skybridge.tech/`},{label:`github`,href:`https://github.com/alpic-ai/skybridge`}];function wce({children:e}){return(0,H.jsx)(`div`,{className:`inline-flex h-8 items-center gap-2 rounded-md px-2.5 text-sm bg-light-gray border`,children:e})}function Tce(){let e=RO(),t=e?.name??`skybridge`,n=e?.version;return(0,H.jsxs)(wce,{children:[(0,H.jsx)(`img`,{src:`/skybridge.svg`,alt:``,"aria-hidden":!0,className:`size-3.5`}),(0,H.jsx)(`span`,{children:t}),(0,H.jsx)(ZO,{orientation:`vertical`,className:`h-4 self-center!`}),n&&(0,H.jsx)(`span`,{className:`font-mono text-xs text-quaternary-foreground`,children:n})]})}var Ece=()=>{let{status:e,requiresAuth:t,hasAuthRequiredTools:n,isSignedIn:r,error:i}=os();return(0,H.jsxs)(`header`,{className:`flex h-13 items-center justify-between gap-3 border-b border-border px-4`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(Tce,{}),(0,H.jsx)(fce,{})]}),(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(vce,{}),(0,H.jsx)(lce,{}),(0,H.jsx)(uce,{}),(0,H.jsx)(pce,{})]}),(0,H.jsxs)(`div`,{className:`flex items-center gap-3`,children:[i&&(0,H.jsx)(`span`,{className:`max-w-48 truncate text-xs text-destructive`,children:i}),t&&(0,H.jsx)($O,{status:e}),t&&e===`authenticated`&&n&&!r&&(0,H.jsxs)($i,{variant:`tertiary`,onClick:()=>NO(),children:[(0,H.jsx)(li,{className:`size-3.5`}),`Sign in`]}),t&&e===`authenticated`&&r&&(0,H.jsxs)($i,{variant:`tertiary`,onClick:()=>FO(),children:[(0,H.jsx)(ui,{className:`size-3.5`}),`Sign out`]}),(0,H.jsx)(`nav`,{className:`flex items-center gap-1 text-xs`,children:Cce.map((e,t)=>(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[t>0&&(0,H.jsx)(`span`,{"aria-hidden":!0,children:`·`}),(0,H.jsx)($i,{asChild:!0,variant:`tertiary`,children:(0,H.jsx)(`a`,{href:e.href,target:`_blank`,rel:`noreferrer noopener`,children:e.label})})]},e.label))})]})]})},jL=1,Dce=.9,Oce=.8,kce=.17,ML=.1,NL=.999,Ace=.9999,jce=.99,Mce=/[\\\/_+.#"@\[\(\{&]/,Nce=/[\\\/_+.#"@\[\(\{&]/g,Pce=/[\s-]/,PL=/[\s-]/g;function FL(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?jL:jce;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=FL(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=jL:Mce.test(e.charAt(l-1))?(d*=Oce,p=e.slice(i,l-1).match(Nce),p&&i>0&&(d*=NL**+p.length)):Pce.test(e.charAt(l-1))?(d*=Dce,m=e.slice(i,l-1).match(PL),m&&i>0&&(d*=NL**+m.length)):(d*=kce,i>0&&(d*=NL**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=Ace)),(d<ML&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=FL(e,t,n,r,l+1,a+2,o),f*ML>d&&(d=f*ML)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function IL(e){return e.toLowerCase().replace(PL,` `)}function Fce(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,FL(e,t,IL(e),IL(t),0,0,{})}typeof window<`u`&&window.document&&window.document.createElement;function LL(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function RL(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function zL(...e){return t=>{let n=!1,r=e.map(e=>{let r=RL(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():RL(e[t],null)}}}}function BL(...e){return b.useCallback(zL(...e),e)}function Ice(e,t){let n=b.createContext(t),r=e=>{let{children:t,...r}=e,i=b.useMemo(()=>r,Object.values(r));return(0,H.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 VL(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,H.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,Lce(i,...t)]}function Lce(...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}var HL=globalThis?.document?b.useLayoutEffect:()=>{},Rce=b.useId||(()=>void 0),zce=0;function UL(e){let[t,n]=b.useState(Rce());return HL(()=>{e||n(e=>e??String(zce++))},[e]),e||(t?`radix-${t}`:``)}var Bce=b.useInsertionEffect||HL;function WL({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=Vce({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=Hce(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function Vce({defaultProp:e,onChange:t}){let[n,r]=b.useState(e),i=b.useRef(n),a=b.useRef(t);return Bce(()=>{a.current=t},[t]),b.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function Hce(e){return typeof e==`function`}function GL(e){let t=Uce(e),n=b.forwardRef((e,n)=>{let{children:r,...i}=e,a=b.Children.toArray(r),o=a.find(Gce);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,H.jsx)(t,{...i,ref:n,children:b.isValidElement(e)?b.cloneElement(e,void 0,r):null})}return(0,H.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function Uce(e){let t=b.forwardRef((e,t)=>{let{children:n,...r}=e;if(b.isValidElement(n)){let e=qce(n),i=Kce(r,n.props);return n.type!==b.Fragment&&(i.ref=t?zL(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 Wce=Symbol(`radix.slottable`);function Gce(e){return b.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Wce}function Kce(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 qce(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 KL=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=GL(`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,H.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Jce(e,t){e&&nC.flushSync(()=>e.dispatchEvent(t))}function qL(e){let t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...e)=>t.current?.(...e),[])}function Yce(e,t=globalThis?.document){let n=qL(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 Xce=`DismissableLayer`,JL=`dismissableLayer.update`,Zce=`dismissableLayer.pointerDownOutside`,Qce=`dismissableLayer.focusOutside`,YL,XL=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ZL=b.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=b.useContext(XL),[u,d]=b.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=b.useState({}),m=BL(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=tle(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!x||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),C=nle(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return Yce(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&&(YL=f.body.style.pointerEvents,f.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),QL(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=YL)}},[u,f,n,l]),b.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),QL())},[u,l]),b.useEffect(()=>{let e=()=>p({});return document.addEventListener(JL,e),()=>document.removeEventListener(JL,e)},[]),(0,H.jsx)(KL.div,{...c,ref:m,style:{pointerEvents:y?x?`auto`:`none`:void 0,...e.style},onFocusCapture:LL(e.onFocusCapture,C.onFocusCapture),onBlurCapture:LL(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:LL(e.onPointerDownCapture,S.onPointerDownCapture)})});ZL.displayName=Xce;var $ce=`DismissableLayerBranch`,ele=b.forwardRef((e,t)=>{let n=b.useContext(XL),r=b.useRef(null),i=BL(t,r);return b.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,H.jsx)(KL.div,{...e,ref:i})});ele.displayName=$ce;function tle(e,t=globalThis?.document){let n=qL(e),r=b.useRef(!1),i=b.useRef(()=>{});return b.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){$L(Zce,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 nle(e,t=globalThis?.document){let n=qL(e),r=b.useRef(!1);return b.useEffect(()=>{let e=e=>{e.target&&!r.current&&$L(Qce,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 QL(){let e=new CustomEvent(JL);document.dispatchEvent(e)}function $L(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?Jce(i,a):i.dispatchEvent(a)}var eR=`focusScope.autoFocusOnMount`,tR=`focusScope.autoFocusOnUnmount`,nR={bubbles:!1,cancelable:!0},rle=`FocusScope`,rR=b.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=b.useState(null),l=qL(i),u=qL(a),d=b.useRef(null),f=BL(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:oR(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||oR(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&oR(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){sR.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(eR,nR);s.addEventListener(eR,l),s.dispatchEvent(t),t.defaultPrevented||(ile(lle(iR(s)),{select:!0}),document.activeElement===e&&oR(s))}return()=>{s.removeEventListener(eR,l),setTimeout(()=>{let t=new CustomEvent(tR,nR);s.addEventListener(tR,u),s.dispatchEvent(t),t.defaultPrevented||oR(e??document.body,{select:!0}),s.removeEventListener(tR,u),sR.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]=ale(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&oR(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&oR(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,H.jsx)(KL.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});rR.displayName=rle;function ile(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(oR(r,{select:t}),document.activeElement!==n)return}function ale(e){let t=iR(e);return[aR(t,e),aR(t.reverse(),e)]}function iR(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 aR(e,t){for(let n of e)if(!ole(n,{upTo:t}))return n}function ole(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 sle(e){return e instanceof HTMLInputElement&&`select`in e}function oR(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&sle(e)&&t&&e.select()}}var sR=cle();function cle(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=cR(e,t),e.unshift(t)},remove(t){e=cR(e,t),e[0]?.resume()}}}function cR(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function lle(e){return e.filter(e=>e.tagName!==`A`)}var ule=`Portal`,lR=b.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=b.useState(!1);HL(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?nC.createPortal((0,H.jsx)(KL.div,{...r,ref:t}),o):null});lR.displayName=ule;function dle(e,t){return b.useReducer((e,n)=>t[e][n]??e,e)}var uR=e=>{let{present:t,children:n}=e,r=fle(t),i=typeof n==`function`?n({present:r.isPresent}):b.Children.only(n),a=BL(r.ref,ple(i));return typeof n==`function`||r.isPresent?b.cloneElement(i,{ref:a}):null};uR.displayName=`Presence`;function fle(e){let[t,n]=b.useState(),r=b.useRef(null),i=b.useRef(e),a=b.useRef(`none`),[o,s]=dle(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return b.useEffect(()=>{let e=dR(r.current);a.current=o===`mounted`?e:`none`},[o]),HL(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=dR(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),HL(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=dR(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=dR(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 dR(e){return e?.animationName||`none`}function ple(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 fR=0;function mle(){b.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??pR()),document.body.insertAdjacentElement(`beforeend`,e[1]??pR()),fR++,()=>{fR===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),fR--}},[])}function pR(){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 mR=`Dialog`,[hR,hle]=VL(mR),[gle,gR]=hR(mR),_R=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]=WL({prop:r,defaultProp:i??!1,onChange:a,caller:mR});return(0,H.jsx)(gle,{scope:t,triggerRef:s,contentRef:c,contentId:UL(),titleId:UL(),descriptionId:UL(),open:l,onOpenChange:u,onOpenToggle:b.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};_R.displayName=mR;var vR=`DialogTrigger`,_le=b.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=gR(vR,n),a=BL(t,i.triggerRef);return(0,H.jsx)(KL.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":AR(i.open),...r,ref:a,onClick:LL(e.onClick,i.onOpenToggle)})});_le.displayName=vR;var yR=`DialogPortal`,[vle,bR]=hR(yR,{forceMount:void 0}),xR=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=gR(yR,t);return(0,H.jsx)(vle,{scope:t,forceMount:n,children:b.Children.map(r,e=>(0,H.jsx)(uR,{present:n||a.open,children:(0,H.jsx)(lR,{asChild:!0,container:i,children:e})}))})};xR.displayName=yR;var SR=`DialogOverlay`,CR=b.forwardRef((e,t)=>{let n=bR(SR,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=gR(SR,e.__scopeDialog);return a.modal?(0,H.jsx)(uR,{present:r||a.open,children:(0,H.jsx)(ble,{...i,ref:t})}):null});CR.displayName=SR;var yle=GL(`DialogOverlay.RemoveScroll`),ble=b.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=gR(SR,n);return(0,H.jsx)(bP,{as:yle,allowPinchZoom:!0,shards:[i.contentRef],children:(0,H.jsx)(KL.div,{"data-state":AR(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),wR=`DialogContent`,TR=b.forwardRef((e,t)=>{let n=bR(wR,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=gR(wR,e.__scopeDialog);return(0,H.jsx)(uR,{present:r||a.open,children:a.modal?(0,H.jsx)(xle,{...i,ref:t}):(0,H.jsx)(Sle,{...i,ref:t})})});TR.displayName=wR;var xle=b.forwardRef((e,t)=>{let n=gR(wR,e.__scopeDialog),r=b.useRef(null),i=BL(t,n.contentRef,r);return b.useEffect(()=>{let e=r.current;if(e)return lN(e)},[]),(0,H.jsx)(ER,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:LL(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:LL(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:LL(e.onFocusOutside,e=>e.preventDefault())})}),Sle=b.forwardRef((e,t)=>{let n=gR(wR,e.__scopeDialog),r=b.useRef(!1),i=b.useRef(!1);return(0,H.jsx)(ER,{...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()}})}),ER=b.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=gR(wR,n),c=b.useRef(null),l=BL(t,c);return mle(),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(rR,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,H.jsx)(ZL,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":AR(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Dle,{titleId:s.titleId}),(0,H.jsx)(kle,{contentRef:c,descriptionId:s.descriptionId})]})]})}),DR=`DialogTitle`,Cle=b.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=gR(DR,n);return(0,H.jsx)(KL.h2,{id:i.titleId,...r,ref:t})});Cle.displayName=DR;var OR=`DialogDescription`,wle=b.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=gR(OR,n);return(0,H.jsx)(KL.p,{id:i.descriptionId,...r,ref:t})});wle.displayName=OR;var kR=`DialogClose`,Tle=b.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=gR(kR,n);return(0,H.jsx)(KL.button,{type:`button`,...r,ref:t,onClick:LL(e.onClick,()=>i.onOpenChange(!1))})});Tle.displayName=kR;function AR(e){return e?`open`:`closed`}var jR=`DialogTitleWarning`,[Ele,MR]=Ice(jR,{contentName:wR,titleName:DR,docsSlug:`dialog`}),Dle=({titleId:e})=>{let t=MR(jR),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
142
+
143
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
144
+
145
+ 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},Ole=`DialogDescriptionWarning`,kle=({contentRef:e,descriptionId:t})=>{let n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${MR(Ole).contentName}}.`;return b.useEffect(()=>{let r=e.current?.getAttribute(`aria-describedby`);t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},Ale=_R,jle=xR,Mle=CR,Nle=TR,Ple=Symbol.for(`react.lazy`),NR=b.use;function Fle(e){return typeof e==`object`&&!!e&&`then`in e}function PR(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Ple&&`_payload`in e&&Fle(e._payload)}function Ile(e){let t=Lle(e),n=b.forwardRef((e,n)=>{let{children:r,...i}=e;PR(r)&&typeof NR==`function`&&(r=NR(r._payload));let a=b.Children.toArray(r),o=a.find(zle);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,H.jsx)(t,{...i,ref:n,children:b.isValidElement(e)?b.cloneElement(e,void 0,r):null})}return(0,H.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function Lle(e){let t=b.forwardRef((e,t)=>{let{children:n,...r}=e;if(PR(n)&&typeof NR==`function`&&(n=NR(n._payload)),b.isValidElement(n)){let e=Vle(n),i=Ble(r,n.props);return n.type!==b.Fragment&&(i.ref=t?zL(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 Rle=Symbol(`radix.slottable`);function zle(e){return b.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Rle}function Ble(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 Vle(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 FR=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Ile(`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,H.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),IR=`[cmdk-group=""]`,LR=`[cmdk-group-items=""]`,Hle=`[cmdk-group-heading=""]`,RR=`[cmdk-item=""]`,zR=`${RR}:not([aria-disabled="true"])`,BR=`cmdk-item-select`,VR=`data-value`,Ule=(e,t,n)=>Fce(e,t,n),HR=b.createContext(void 0),UR=()=>b.useContext(HR),WR=b.createContext(void 0),GR=()=>b.useContext(WR),KR=b.createContext(void 0),qR=b.forwardRef((e,t)=>{let n=ZR(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=ZR(()=>new Set),i=ZR(()=>new Map),a=ZR(()=>new Map),o=ZR(()=>new Set),s=YR(e),{label:c,children:l,value:u,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:h=!1,vimBindings:g=!0,..._}=e,v=UL(),y=UL(),x=UL(),S=b.useRef(null),C=eue();XR(()=>{if(u!==void 0){let e=u.trim();n.current.value=e,w.emit()}},[u]),XR(()=>{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??Ule;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(LR);t?t.appendChild(e.parentElement===t?e:e.closest(`${LR} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${LR} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=S.current?.querySelector(`${IR}[${VR}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function O(){let e=M().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(VR);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(IR)?.querySelector(Hle))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function j(){return S.current?.querySelector(`${RR}[aria-selected="true"]`)}function M(){return Array.from(S.current?.querySelectorAll(zR)||[])}function N(e){let t=M()[e];t&&w.setState(`value`,t.getAttribute(VR))}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(VR))}function F(e){let t=j()?.closest(IR),n;for(;t&&!n;)t=e>0?Qle(t,IR):$le(t,IR),n=t?.querySelector(zR);n?w.setState(`value`,n.getAttribute(VR)):P(e)}let I=()=>N(M().length-1),L=e=>{e.preventDefault(),e.metaKey?I():e.altKey?F(1):P(1)},ee=e=>{e.preventDefault(),e.metaKey?N(0):e.altKey?F(-1):P(-1)};return b.createElement(FR.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&&ee(e);break;case`ArrowUp`:ee(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(BR);t.dispatchEvent(e)}}}}},b.createElement(`label`,{"cmdk-label":``,htmlFor:T.inputId,id:T.labelId,style:nue},c),ez(e,e=>b.createElement(WR.Provider,{value:w},b.createElement(HR.Provider,{value:T},e))))}),Wle=b.forwardRef((e,t)=>{let n=UL(),r=b.useRef(null),i=b.useContext(KR),a=UR(),o=YR(e),s=o.current?.forceMount??i?.forceMount;XR(()=>{if(!s)return a.item(n,i?.id)},[s]);let c=$R(n,r,[e.value,e.children,r],e.keywords),l=GR(),u=QR(e=>e.value&&e.value===c.current),d=QR(e=>s||a.filter()===!1?!0:!e.search||e.filtered.items.get(n)>0);b.useEffect(()=>{let t=r.current;if(!(!t||e.disabled))return t.addEventListener(BR,f),()=>t.removeEventListener(BR,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(FR.div,{ref:zL(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)}),Gle=b.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=UL(),s=b.useRef(null),c=b.useRef(null),l=UL(),u=UR(),d=QR(e=>i||u.filter()===!1?!0:!e.search||e.filtered.groups.has(o));XR(()=>u.group(o),[]),$R(o,s,[e.value,e.heading,c]);let f=b.useMemo(()=>({id:o,forceMount:i}),[i]);return b.createElement(FR.div,{ref:zL(s,t),...a,"cmdk-group":``,role:`presentation`,hidden:!d||void 0},n&&b.createElement(`div`,{ref:c,"cmdk-group-heading":``,"aria-hidden":!0,id:l},n),ez(e,e=>b.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?l:void 0},b.createElement(KR.Provider,{value:f},e))))}),Kle=b.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=b.useRef(null),a=QR(e=>!e.search);return!n&&!a?null:b.createElement(FR.div,{ref:zL(i,t),...r,"cmdk-separator":``,role:`separator`})}),qle=b.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=GR(),o=QR(e=>e.search),s=QR(e=>e.selectedItemId),c=UR();return b.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),b.createElement(FR.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)}})}),Jle=b.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,a=b.useRef(null),o=b.useRef(null),s=QR(e=>e.selectedItemId),c=UR();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(FR.div,{ref:zL(a,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},ez(e,e=>b.createElement(`div`,{ref:zL(o,c.listInnerRef),"cmdk-list-sizer":``},e)))}),Yle=b.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return b.createElement(Ale,{open:n,onOpenChange:r},b.createElement(jle,{container:o},b.createElement(Mle,{"cmdk-overlay":``,className:i}),b.createElement(Nle,{"aria-label":e.label,"cmdk-dialog":``,className:a},b.createElement(qR,{ref:t,...s}))))}),Xle=b.forwardRef((e,t)=>QR(e=>e.filtered.count===0)?b.createElement(FR.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),Zle=b.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return b.createElement(FR.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},ez(e,e=>b.createElement(`div`,{"aria-hidden":!0},e)))}),JR=Object.assign(qR,{List:Jle,Item:Wle,Input:qle,Group:Gle,Separator:Kle,Dialog:Yle,Empty:Xle,Loading:Zle});function Qle(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function $le(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function YR(e){let t=b.useRef(e);return XR(()=>{t.current=e}),t}var XR=typeof window>`u`?b.useEffect:b.useLayoutEffect;function ZR(e){let t=b.useRef();return t.current===void 0&&(t.current=e()),t}function QR(e){let t=GR(),n=()=>e(t.snapshot());return b.useSyncExternalStore(t.subscribe,n,n)}function $R(e,t,n,r=[]){let i=b.useRef(),a=UR();return XR(()=>{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(VR,s),i.current=s}),i}var eue=()=>{let[e,t]=b.useState(),n=ZR(()=>new Map);return XR(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function tue(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function ez({asChild:e,children:t},n){return e&&b.isValidElement(t)?b.cloneElement(tue(t),{ref:t.ref},n(t.props.children)):n(t)}var nue={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`};function rue({className:e,...t}){return(0,H.jsx)(JR,{"data-slot":`command`,className:Mr(`bg-popover text-foreground flex h-full w-full flex-col overflow-hidden rounded-md`,e),...t})}function iue({className:e,...t}){return(0,H.jsxs)(`div`,{"data-slot":`command-input-wrapper`,className:`flex h-14 items-center gap-2 border-b p-3`,children:[(0,H.jsx)(Si,{className:`size-5 shrink-0 text-muted-foreground`}),(0,H.jsx)(JR.Input,{"data-slot":`command-input`,className:Mr(`placeholder:text-placeholder flex h-full w-full bg-transparent type-text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50`,e),...t})]})}function aue({className:e,...t}){return(0,H.jsx)(JR.List,{"data-slot":`command-list`,className:Mr(`max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto`,e),...t})}function oue({...e}){return(0,H.jsx)(JR.Empty,{"data-slot":`command-empty`,className:`py-6 text-center type-text-sm text-muted-foreground`,...e})}function sue({className:e,...t}){return(0,H.jsx)(JR.Group,{"data-slot":`command-group`,className:Mr(`text-foreground [&_[cmdk-group-heading]]:text-subtle-foreground overflow-hidden px-2 py-1 [&_[cmdk-group-heading]]:p-2 [&_[cmdk-group-heading]]:type-text-xs [&_[cmdk-group-heading]]:font-medium`,e),...t})}function cue({className:e,...t}){return(0,H.jsx)(JR.Item,{"data-slot":`command-item`,className:Mr(`data-[selected=true]:bg-background-hover [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-xs px-2 py-3 type-text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:text-disabled-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-5`,e),...t})}var tz=[{code:`am`,englishName:`Amharic`,localeName:`አማርኛ`},{code:`ar`,englishName:`Arabic`,localeName:`العربية`},{code:`bg`,englishName:`Bulgarian`,localeName:`български`},{code:`bn`,englishName:`Bengali`,localeName:`বাংলা`},{code:`bs`,englishName:`Bosnian`,localeName:`bosanski`},{code:`ca`,englishName:`Catalan`,localeName:`català`},{code:`cs`,englishName:`Czech`,localeName:`čeština`},{code:`da`,englishName:`Danish`,localeName:`dansk`},{code:`de`,englishName:`German`,localeName:`Deutsch`},{code:`el`,englishName:`Greek`,localeName:`Ελληνικά`},{code:`en-US`,englishName:`English (US)`,localeName:`English (US)`},{code:`es-419`,englishName:`Spanish (Latin America)`,localeName:`español (Latinoamérica)`},{code:`es-ES`,englishName:`Spanish (Spain)`,localeName:`español (España)`},{code:`et`,englishName:`Estonian`,localeName:`eesti`},{code:`fa`,englishName:`Persian`,localeName:`فارسی`},{code:`fi`,englishName:`Finnish`,localeName:`suomi`},{code:`fr-CA`,englishName:`French (Canada)`,localeName:`français (Canada)`},{code:`fr-FR`,englishName:`French (France)`,localeName:`français (France)`},{code:`gu`,englishName:`Gujarati`,localeName:`ગુજરાતી`},{code:`hi`,englishName:`Hindi`,localeName:`हिन्दी`},{code:`hr`,englishName:`Croatian`,localeName:`hrvatski`},{code:`hu`,englishName:`Hungarian`,localeName:`magyar`},{code:`hy`,englishName:`Armenian`,localeName:`հայերեն`},{code:`id`,englishName:`Indonesian`,localeName:`Indonesia`},{code:`is`,englishName:`Icelandic`,localeName:`íslenska`},{code:`it`,englishName:`Italian`,localeName:`italiano`},{code:`ja`,englishName:`Japanese`,localeName:`日本語`},{code:`ka`,englishName:`Georgian`,localeName:`ქართული`},{code:`kk`,englishName:`Kazakh`,localeName:`қазақ тілі`},{code:`kn`,englishName:`Kannada`,localeName:`ಕನ್ನಡ`},{code:`ko`,englishName:`Korean`,localeName:`한국어`},{code:`lt`,englishName:`Lithuanian`,localeName:`lietuvių`},{code:`lv`,englishName:`Latvian`,localeName:`latviešu`},{code:`mk`,englishName:`Macedonian`,localeName:`македонски`},{code:`ml`,englishName:`Malayalam`,localeName:`മലയാളം`},{code:`mn`,englishName:`Mongolian`,localeName:`монгол`},{code:`mr`,englishName:`Marathi`,localeName:`मराठी`},{code:`ms`,englishName:`Malay`,localeName:`Bahasa Melayu`},{code:`my`,englishName:`Burmese`,localeName:`မြန်မာ`},{code:`nb`,englishName:`Norwegian Bokmål`,localeName:`norsk bokmål`},{code:`nl`,englishName:`Dutch`,localeName:`Nederlands`},{code:`pa`,englishName:`Punjabi`,localeName:`ਪੰਜਾਬੀ`},{code:`pl`,englishName:`Polish`,localeName:`polski`},{code:`pt-BR`,englishName:`Portuguese (Brazil)`,localeName:`português (Brasil)`},{code:`pt-PT`,englishName:`Portuguese (Portugal)`,localeName:`português (Portugal)`},{code:`ro`,englishName:`Romanian`,localeName:`română`},{code:`ru`,englishName:`Russian`,localeName:`русский`},{code:`sk`,englishName:`Slovak`,localeName:`slovenčina`},{code:`sl`,englishName:`Slovenian`,localeName:`slovenščina`},{code:`so`,englishName:`Somali`,localeName:`Soomaali`},{code:`sq`,englishName:`Albanian`,localeName:`shqip`},{code:`sr`,englishName:`Serbian`,localeName:`српски`},{code:`sv`,englishName:`Swedish`,localeName:`svenska`},{code:`sw`,englishName:`Swahili`,localeName:`Kiswahili`},{code:`ta`,englishName:`Tamil`,localeName:`தமிழ்`},{code:`te`,englishName:`Telugu`,localeName:`తెలుగు`},{code:`th`,englishName:`Thai`,localeName:`ไทย`},{code:`tl`,englishName:`Tagalog`,localeName:`Tagalog`},{code:`tr`,englishName:`Turkish`,localeName:`Türkçe`},{code:`uk`,englishName:`Ukrainian`,localeName:`українська`},{code:`ur`,englishName:`Urdu`,localeName:`اردو`},{code:`vi`,englishName:`Vietnamese`,localeName:`Tiếng Việt`},{code:`zh-CN`,englishName:`Chinese (Simplified)`,localeName:`简体中文`},{code:`zh-HK`,englishName:`Chinese (Traditional, Hong Kong)`,localeName:`繁體中文(香港)`},{code:`zh-TW`,englishName:`Chinese (Traditional, Taiwan)`,localeName:`繁體中文(台灣)`}];function lue(e,t){return typeof e==`string`&&t.includes(e)}var uue=[{mode:`fullscreen`,icon:fi},{mode:`pip`,icon:gi},{mode:`inline`,icon:Ti}];function due(e){let{userAgent:t,displayMode:n,previewClient:r,setPreference:i}=ds.getState();i(`theme`,e.has(`darkTheme`)?`dark`:`light`);let a=e.has(`mobileDevice`);i(`userAgent`,{...t,device:{...t?.device,type:a?`mobile`:`desktop`},capabilities:{hover:!a,touch:a}}),a&&n===`pip`&&r===`chatgpt`&&i(`displayMode`,`fullscreen`);let o=e.get(`locale`);lue(o,tz.map(e=>e.code))&&i(`locale`,o);let s=ds.getState();return`View preview options: displayMode=${s.displayMode}, theme=${s.theme}, locale=${s.locale}, device=${s.userAgent?.device?.type??`desktop`}.`}function fue({name:e,description:t,value:n,options:r}){return(0,H.jsx)(`select`,{name:e,toolparamdescription:t,value:n,tabIndex:-1,onChange:e=>e.currentTarget.form?.requestSubmit(),children:r.map(e=>(0,H.jsx)(`option`,{value:e,children:e},e))})}var nz=`inline-flex h-7 cursor-pointer items-center gap-1.5 rounded-md px-2.5 text-xs font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,rz=`text-light-gray-foreground hover:bg-light-gray hover:text-foreground`,pue=`bg-muted text-foreground`;function iz({icon:e,label:t,selected:n,onClick:r,className:i}){return(0,H.jsxs)(`button`,{type:`button`,onClick:r,"aria-pressed":n,className:IP(nz,`border border-border bg-background`,n?pue:rz,i),children:[(0,H.jsx)(e,{className:`size-3.5`}),(0,H.jsx)(`span`,{children:t})]})}function az({icon:e,label:t,name:n,description:r,checked:i}){return(0,H.jsxs)(`label`,{className:IP(nz,`border border-border bg-background`,rz,`has-focus-visible:ring-1 has-focus-visible:ring-ring`),children:[(0,H.jsx)(`input`,{type:`checkbox`,name:n,toolparamdescription:r,checked:i,onChange:e=>e.currentTarget.form?.requestSubmit(),className:`sr-only`}),(0,H.jsx)(e,{className:`size-3.5`}),(0,H.jsx)(`span`,{children:t})]})}var oz=({variant:e=`panel`,logsOpen:t,onOpenLogs:n})=>{let r=ds(e=>e.displayMode),i=ds(e=>e.theme),a=ds(e=>e.locale),o=ds(e=>e.userAgent),s=ds(e=>e.previewClient),c=ds(e=>e.setPreviewClient),l=ds(e=>e.setPreference),u=(0,b.useRef)(null),[d,f]=(0,b.useState)(!1),p=e=>{let t=u.current,n=t?.elements.namedItem(`locale`);n instanceof HTMLSelectElement&&(n.value=e),t?.requestSubmit()},m=i===`dark`,h=(o?.device?.type??`desktop`)===`mobile`,g=tz.find(e=>e.code===a)?.englishName??a,_=uue.find(e=>e.mode===r)?.icon??Ti;return(0,H.jsxs)(`form`,{ref:u,toolname:`devtools_set_view_options`,tooldescription:e===`panel`?`Set the Skybridge devtools view preview options. Any subset of fields can be changed: theme, locale, and device type.`:`Set the Skybridge devtools preview options: theme and device type.`,toolautosubmit:``,onSubmit:e=>{e.preventDefault();let t=due(new FormData(e.currentTarget)),n=e.nativeEvent;n instanceof SubmitEvent&&n.agentInvoked&&typeof n.respondWith==`function`&&n.respondWith(Promise.resolve({content:[{type:`text`,text:t}]}))},className:IP(`flex w-full shrink-0 items-center gap-1.5`,e===`panel`?`mt-3 px-3`:`justify-end`),children:[e===`panel`&&(0,H.jsxs)(`div`,{title:`Display mode (driven by the view)`,className:`inline-flex h-7 cursor-default items-center gap-1.5 rounded-md bg-muted px-2.5 text-xs font-medium text-muted-foreground`,children:[(0,H.jsx)(_,{className:`size-3.5`}),(0,H.jsx)(`span`,{children:r})]}),(0,H.jsx)(az,{icon:m?hi:Ei,label:m?`dark`:`light`,name:`darkTheme`,description:`Preview the view in dark theme (true) or light theme (false).`,checked:m}),e===`panel`&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(jP,{open:d,onOpenChange:f,children:[(0,H.jsx)(MP,{asChild:!0,children:(0,H.jsxs)(`button`,{type:`button`,"aria-label":`Locale`,className:IP(nz,`border border-border bg-background`,rz,`aria-expanded:bg-muted aria-expanded:text-foreground`),children:[(0,H.jsx)(oi,{className:`size-3.5`}),(0,H.jsx)(`span`,{children:g})]})}),(0,H.jsx)(NP,{className:`w-[260px] p-0`,align:`start`,children:(0,H.jsxs)(rue,{children:[(0,H.jsx)(iue,{placeholder:`Search locale...`}),(0,H.jsxs)(aue,{children:[(0,H.jsx)(oue,{children:`No locale found.`}),(0,H.jsx)(sue,{children:tz.map(e=>(0,H.jsxs)(cue,{value:e.code,keywords:[e.englishName,e.localeName],onSelect:e=>{p(e),f(!1)},children:[(0,H.jsxs)(`span`,{className:`truncate`,children:[e.englishName,e.localeName===e.englishName?null:(0,H.jsx)(`span`,{className:`ml-1.5 text-muted-foreground`,children:e.localeName})]}),(0,H.jsx)(Kr,{className:IP(`ml-auto h-4 w-4`,a===e.code?`opacity-100`:`opacity-0`)})]},e.code))})]})]})})]}),(0,H.jsx)(`div`,{className:`sr-only`,"aria-hidden":!0,children:(0,H.jsx)(fue,{name:`locale`,description:`The BCP 47 locale code to preview the view in.`,value:a,options:tz.map(e=>e.code)})})]}),(0,H.jsx)(az,{icon:h?wi:mi,label:h?`mobile`:`desktop`,name:`mobileDevice`,description:`Preview the view on a mobile device (true) or desktop (false).`,checked:h}),e===`panel`&&r!==`fullscreen`&&(0,H.jsxs)(`div`,{className:`ml-auto flex items-center gap-1.5`,children:[(0,H.jsx)(iz,{icon:ri,label:`preview`,onClick:()=>c(`chatgpt`)}),!t&&(0,H.jsx)(iz,{icon:di,label:`logs`,onClick:n})]}),e===`preview`&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(iz,{icon:Ur,label:s===`claude`?`switch to ChatGPT`:`switch to Claude`,onClick:()=>{c(s===`claude`?`chatgpt`:`claude`),l(`displayMode`,`inline`)}}),(0,H.jsx)(iz,{icon:Ai,label:`quit preview`,onClick:()=>{c(null),l(`displayMode`,`inline`)}})]})]})},mue=({iframeRef:e,containerRef:t,enabled:n,onHeightChange:r,documentKey:i,clampToContainer:a=!0})=>{(0,b.useEffect)(()=>{if(!n||!i)return;let o=e.current;if(!o?.contentDocument?.body)return;let s=()=>{let e=jae(o,a?t.current:null),n=a?e:Math.min(e,window.innerHeight);n>0&&r(n)},c=new ResizeObserver(s),l=o.contentDocument.getElementById(`root`);l&&c.observe(l),c.observe(o.contentDocument.body),c.observe(o.contentDocument.documentElement);let u=t.current?.parentElement;return u&&c.observe(u),s(),()=>{c.disconnect()}},[t,n,e,r,i,a])},hue=({iframeRef:e,documentKey:t})=>{let[n,r]=(0,b.useState)(!1);return(0,b.useEffect)(()=>{if(r(!1),!t)return;let n=e.current?.contentDocument;if(!n)return;let i=()=>{let e=n.getElementById(`root`);return!!(e&&e.childNodes.length>0)};if(i()){r(!0);return}let a=new MutationObserver(()=>{i()&&(r(!0),a.disconnect())});return a.observe(n.documentElement,{childList:!0,subtree:!0}),()=>a.disconnect()},[e,t]),n},gue=32,_ue=2,sz={"--color-background-primary":`#fff`,"--color-background-secondary":`#f9f9f9`,"--color-background-tertiary":`#f3f3f3`,"--color-background-inverse":`#181818`,"--color-background-ghost":`color-mix(in oklab,#0d0d0d 0.0%,transparent)`,"--color-background-disabled":`color-mix(in oklab,#0d0d0d 5.0%,transparent)`,"--color-text-primary":`#0d0d0d`,"--color-text-secondary":`#5d5d5d`,"--color-text-tertiary":`#8f8f8f`,"--color-text-inverse":`#fff`,"--color-text-ghost":`#0d0d0d`,"--color-text-info":`#3a83f7`,"--color-text-danger":`#fa423e`,"--color-text-success":`#2c6732`,"--color-text-warning":`#87401d`,"--color-text-disabled":`#8f8f8f`,"--color-border-primary":`color-mix(in oklab,#0d0d0d 10.0%,transparent)`,"--color-border-secondary":`color-mix(in oklab,#0d0d0d 5.0%,transparent)`,"--color-border-tertiary":`color-mix(in oklab,#0d0d0d 15%,transparent)`,"--color-border-inverse":`#fff`,"--color-border-ghost":`color-mix(in oklab,#0d0d0d 0.0%,transparent)`,"--color-border-disabled":`color-mix(in oklab,#0d0d0d 6.0%,transparent)`,"--color-ring-primary":`#2c67c5`,"--color-ring-secondary":`#2c67c5`,"--color-ring-inverse":`#2c67c5`,"--color-ring-info":`#2c67c5`,"--color-ring-danger":`#ff8583`,"--color-ring-success":`#2c67c5`,"--color-ring-warning":`#2c67c5`,"--font-sans":`"ui-sans-serif", "-apple-system", "system-ui", "Segoe UI", "Helvetica", "Apple Color Emoji", "Arial", "sans-serif", "Segoe UI Emoji", "Segoe UI Symbol"`,"--font-mono":`"ui-monospace", "SFMono-Regular", "SF Mono", "Menlo", "Consolas", "Liberation Mono", "monospace"`,"--font-weight-normal":`400`,"--font-weight-medium":`500`,"--font-weight-semibold":`600`,"--font-weight-bold":`700`,"--font-text-xs-size":`.75rem`,"--font-text-sm-size":`.875rem`,"--font-text-md-size":`1rem`,"--font-text-lg-size":`1.125rem`,"--font-heading-xs-size":`1rem`,"--font-heading-sm-size":`1.125rem`,"--font-heading-md-size":`1.25rem`,"--font-heading-lg-size":`1.5rem`,"--font-heading-xl-size":`2rem`,"--font-heading-2xl-size":`2.25rem`,"--font-heading-3xl-size":`3rem`,"--font-text-xs-line-height":`1.125rem`,"--font-text-sm-line-height":`1.25rem`,"--font-text-md-line-height":`1.5rem`,"--font-text-lg-line-height":`1.8125rem`,"--font-heading-xs-line-height":`1.5rem`,"--font-heading-sm-line-height":`1.625rem`,"--font-heading-md-line-height":`1.625rem`,"--font-heading-lg-line-height":`1.75rem`,"--font-heading-xl-line-height":`2.375rem`,"--font-heading-2xl-line-height":`2.625rem`,"--font-heading-3xl-line-height":`3rem`,"--border-radius-xs":`.25rem`,"--border-radius-sm":`.375rem`,"--border-radius-md":`.5rem`,"--border-radius-lg":`.625rem`,"--border-radius-xl":`.75rem`,"--border-radius-full":`9999px`,"--border-width-regular":`.5px`,"--shadow-hairline":`0 0 0 .5px #0000001a`,"--shadow-sm":`0 1px 2px -1px rgb(0 0 0 / .08)`,"--shadow-md":`0 2px 4px -1px rgb(0 0 0 / .08)`,"--shadow-lg":`0 4px 8px -2px rgb(0 0 0 / .1)`},vue={"--color-background-primary":`#212121`,"--color-background-secondary":`#303030`,"--color-background-tertiary":`#414141`,"--color-background-inverse":`#f3f3f3`,"--color-background-ghost":`color-mix(in oklab,#fff 0.0%,transparent)`,"--color-background-disabled":`color-mix(in oklab,#fff 5.0%,transparent)`,"--color-text-primary":`#fff`,"--color-text-secondary":`#cdcdcd`,"--color-text-tertiary":`#afafaf`,"--color-text-inverse":`#0d0d0d`,"--color-text-ghost":`#fff`,"--color-border-primary":`color-mix(in oklab,#fff 10.0%,transparent)`,"--color-border-secondary":`color-mix(in oklab,#fff 5.0%,transparent)`,"--color-border-tertiary":`color-mix(in oklab,#fff 15%,transparent)`,"--color-border-inverse":`#181818`,"--color-border-ghost":`color-mix(in oklab,#fff 0.0%,transparent)`,"--color-border-disabled":`color-mix(in oklab,#fff 6.0%,transparent)`};function cz(e){return e===`dark`?{...sz,...vue}:sz}function yue(e,t){return{styles:{variables:cz(e)},containerDimensions:{maxWidth:t?RP.width-gue-_ue:768},availableDisplayModes:t?[`inline`,`fullscreen`]:[`inline`,`fullscreen`,`pip`],userAgent:`chatgpt`,timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone}}var bue=32,lz={"--color-background-primary":`light-dark(rgba(255, 255, 255, 1), rgba(48, 48, 46, 1))`,"--color-background-secondary":`light-dark(rgba(245, 244, 237, 1), rgba(38, 38, 36, 1))`,"--color-background-tertiary":`light-dark(rgba(250, 249, 245, 1), rgba(20, 20, 19, 1))`,"--color-background-inverse":`light-dark(rgba(20, 20, 19, 1), rgba(250, 249, 245, 1))`,"--color-background-ghost":`light-dark(rgba(255, 255, 255, 0), rgba(48, 48, 46, 0))`,"--color-background-info":`light-dark(rgba(214, 228, 246, 1), rgba(37, 62, 95, 1))`,"--color-background-danger":`light-dark(rgba(247, 236, 236, 1), rgba(96, 42, 40, 1))`,"--color-background-success":`light-dark(rgba(233, 241, 220, 1), rgba(27, 70, 20, 1))`,"--color-background-warning":`light-dark(rgba(246, 238, 223, 1), rgba(72, 58, 15, 1))`,"--color-background-disabled":`light-dark(rgba(255, 255, 255, 0.5), rgba(48, 48, 46, 0.5))`,"--color-text-primary":`light-dark(rgba(20, 20, 19, 1), rgba(250, 249, 245, 1))`,"--color-text-secondary":`light-dark(rgba(61, 61, 58, 1), rgba(194, 192, 182, 1))`,"--color-text-tertiary":`light-dark(rgba(115, 114, 108, 1), rgba(156, 154, 146, 1))`,"--color-text-inverse":`light-dark(rgba(255, 255, 255, 1), rgba(20, 20, 19, 1))`,"--color-text-ghost":`light-dark(rgba(115, 114, 108, 0.5), rgba(156, 154, 146, 0.5))`,"--color-text-info":`light-dark(rgba(50, 102, 173, 1), rgba(128, 170, 221, 1))`,"--color-text-danger":`light-dark(rgba(127, 44, 40, 1), rgba(238, 136, 132, 1))`,"--color-text-success":`light-dark(rgba(38, 91, 25, 1), rgba(122, 185, 72, 1))`,"--color-text-warning":`light-dark(rgba(90, 72, 21, 1), rgba(209, 160, 65, 1))`,"--color-text-disabled":`light-dark(rgba(20, 20, 19, 0.5), rgba(250, 249, 245, 0.5))`,"--color-border-primary":`light-dark(rgba(31, 30, 29, 0.4), rgba(222, 220, 209, 0.4))`,"--color-border-secondary":`light-dark(rgba(31, 30, 29, 0.3), rgba(222, 220, 209, 0.3))`,"--color-border-tertiary":`light-dark(rgba(31, 30, 29, 0.15), rgba(222, 220, 209, 0.15))`,"--color-border-inverse":`light-dark(rgba(255, 255, 255, 0.3), rgba(20, 20, 19, 0.15))`,"--color-border-ghost":`light-dark(rgba(31, 30, 29, 0), rgba(222, 220, 209, 0))`,"--color-border-info":`light-dark(rgba(70, 130, 213, 1), rgba(70, 130, 213, 1))`,"--color-border-danger":`light-dark(rgba(167, 61, 57, 1), rgba(205, 92, 88, 1))`,"--color-border-success":`light-dark(rgba(67, 116, 38, 1), rgba(89, 145, 48, 1))`,"--color-border-warning":`light-dark(rgba(128, 92, 31, 1), rgba(168, 120, 41, 1))`,"--color-border-disabled":`light-dark(rgba(31, 30, 29, 0.1), rgba(222, 220, 209, 0.1))`,"--color-ring-primary":`light-dark(rgba(20, 20, 19, 0.7), rgba(250, 249, 245, 0.7))`,"--color-ring-secondary":`light-dark(rgba(61, 61, 58, 0.7), rgba(194, 192, 182, 0.7))`,"--color-ring-inverse":`light-dark(rgba(255, 255, 255, 0.7), rgba(20, 20, 19, 0.7))`,"--color-ring-info":`light-dark(rgba(50, 102, 173, 0.5), rgba(128, 170, 221, 0.5))`,"--color-ring-danger":`light-dark(rgba(167, 61, 57, 0.5), rgba(205, 92, 88, 0.5))`,"--color-ring-success":`light-dark(rgba(67, 116, 38, 0.5), rgba(89, 145, 48, 0.5))`,"--color-ring-warning":`light-dark(rgba(128, 92, 31, 0.5), rgba(168, 120, 41, 0.5))`,"--font-sans":`Anthropic Sans, sans-serif`,"--font-mono":`ui-monospace, monospace`,"--font-weight-normal":`400`,"--font-weight-medium":`500`,"--font-weight-semibold":`600`,"--font-weight-bold":`700`,"--font-text-xs-size":`12px`,"--font-text-sm-size":`14px`,"--font-text-md-size":`16px`,"--font-text-lg-size":`20px`,"--font-heading-xs-size":`12px`,"--font-heading-sm-size":`14px`,"--font-heading-md-size":`16px`,"--font-heading-lg-size":`20px`,"--font-heading-xl-size":`24px`,"--font-heading-2xl-size":`28px`,"--font-heading-3xl-size":`36px`,"--font-text-xs-line-height":`1.4`,"--font-text-sm-line-height":`1.4`,"--font-text-md-line-height":`1.4`,"--font-text-lg-line-height":`1.25`,"--font-heading-xs-line-height":`1.4`,"--font-heading-sm-line-height":`1.4`,"--font-heading-md-line-height":`1.4`,"--font-heading-lg-line-height":`1.25`,"--font-heading-xl-line-height":`1.25`,"--font-heading-2xl-line-height":`1.1`,"--font-heading-3xl-line-height":`1`,"--border-radius-xs":`4px`,"--border-radius-sm":`6px`,"--border-radius-md":`8px`,"--border-radius-lg":`10px`,"--border-radius-xl":`12px`,"--border-radius-full":`9999px`,"--border-width-regular":`0.5px`,"--shadow-hairline":`0 1px 2px 0 rgba(0, 0, 0, 0.05)`,"--shadow-sm":`0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1)`,"--shadow-md":`0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)`,"--shadow-lg":`0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)`},uz=`
146
+ @font-face {
147
+ font-family: "Anthropic Sans";
148
+ src: url("https://assets.claude.ai/Fonts/AnthropicSans-Text-Regular-Static.otf") format("opentype");
149
+ font-weight: 400;
150
+ font-style: normal;
151
+ font-display: swap;
152
+ }
153
+ @font-face {
154
+ font-family: "Anthropic Sans";
155
+ src: url("https://assets.claude.ai/Fonts/AnthropicSans-Text-RegularItalic-Static.otf") format("opentype");
156
+ font-weight: 400;
157
+ font-style: italic;
158
+ font-display: swap;
159
+ }
160
+ @font-face {
161
+ font-family: "Anthropic Sans";
162
+ src: url("https://assets.claude.ai/Fonts/AnthropicSans-Text-Medium-Static.otf") format("opentype");
163
+ font-weight: 500;
164
+ font-style: normal;
165
+ font-display: swap;
166
+ }
167
+ @font-face {
168
+ font-family: "Anthropic Sans";
169
+ src: url("https://assets.claude.ai/Fonts/AnthropicSans-Text-MediumItalic-Static.otf") format("opentype");
170
+ font-weight: 500;
171
+ font-style: italic;
172
+ font-display: swap;
173
+ }
174
+ @font-face {
175
+ font-family: "Anthropic Sans";
176
+ src: url("https://assets.claude.ai/Fonts/AnthropicSans-Text-Semibold-Static.otf") format("opentype");
177
+ font-weight: 600;
178
+ font-style: normal;
179
+ font-display: swap;
180
+ }
181
+ @font-face {
182
+ font-family: "Anthropic Sans";
183
+ src: url("https://assets.claude.ai/Fonts/AnthropicSans-Text-SemiboldItalic-Static.otf") format("opentype");
184
+ font-weight: 600;
185
+ font-style: italic;
186
+ font-display: swap;
187
+ }
188
+ @font-face {
189
+ font-family: "Anthropic Sans";
190
+ src: url("https://assets.claude.ai/Fonts/AnthropicSans-Text-Bold-Static.otf") format("opentype");
191
+ font-weight: 700;
192
+ font-style: normal;
193
+ font-display: swap;
194
+ }
195
+ @font-face {
196
+ font-family: "Anthropic Sans";
197
+ src: url("https://assets.claude.ai/Fonts/AnthropicSans-Text-BoldItalic-Static.otf") format("opentype");
198
+ font-weight: 700;
199
+ font-style: italic;
200
+ font-display: swap;
201
+ }
202
+ `;function xue(e){return{styles:{variables:lz,css:{fonts:uz}},containerDimensions:{width:e?RP.width-bue:720,maxHeight:5e3},availableDisplayModes:[`inline`,`fullscreen`],userAgent:navigator.userAgent,timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone}}function Sue(e,t){e.contentWindow?.postMessage(t,`*`)}function dz(e,t,n){e({jsonrpc:`2.0`,id:t,result:n})}function fz(e,t,n,r){e({jsonrpc:`2.0`,id:t,error:{code:n,message:r}})}function pz(e,t,n){switch(e){case`chatgpt`:return yue(t,n);case`claude`:return xue(n);case null:return{}}}function Cue(){let e=ds.getState(),t=ps(e.userAgent);return{...pz(e.previewClient,e.theme,t),theme:e.theme,locale:e.locale,displayMode:e.displayMode,safeAreaInsets:e.safeArea?.insets??{top:0,right:0,bottom:0,left:0},platform:t?`mobile`:`web`,deviceCapabilities:e.userAgent?.capabilities}}function wue(e,t,n,r){let i=t=>Sue(e,t),a=async a=>{if(a.source!==e.contentWindow)return;let o=a.data;if(o?.jsonrpc!==`2.0`)return;let{id:s,method:c,params:l}=o;if(c!==`ui/notifications/size-changed`&&c!==`ui/notifications/request-teardown`&&s!==void 0)switch(c){case`ui/initialize`:{dz(i,s,{protocolVersion:`2025-06-18`,hostInfo:{name:`skybridge-devtools`,version:`0.0.1`},hostCapabilities:{openLinks:{},serverTools:{}},hostContext:Cue()});let e=r();e.toolInput!=null&&i({jsonrpc:`2.0`,method:`ui/notifications/tool-input`,params:{arguments:e.toolInput}}),(e.toolOutput!=null||e.toolResponseMetadata!=null)&&i({jsonrpc:`2.0`,method:`ui/notifications/tool-result`,params:{content:[],structuredContent:e.toolOutput??{},isError:!1,_meta:e.toolResponseMetadata??{}}});break}case`ui/update-model-context`:n(`mcp:updateModelContext`,l??{}),dz(i,s,{});break;case`ui/request-display-mode`:{let e=l?.mode??`inline`,t=ds.getState(),n=hs(e,t);t.setPreference(`displayMode`,n),dz(i,s,{mode:n});break}case`ui/open-link`:{let e=l?.url;e&&window.open(e,`_blank`,`noopener,noreferrer`),dz(i,s,{});break}case`ui/download-file`:fz(i,s,-32603,`downloadFile capability disabled in devtools`);break;case`tools/call`:{let e=l?.name??``,r=l?.arguments??{};n(`mcp:tools/call`,{name:e,args:r});try{let a=await t(e,r);n(`mcp:tools/call response`,a,`response`),dz(i,s,a)}catch(e){let t=e instanceof Error?e.message:String(e);fz(i,s,-32603,t)}break}default:s!==void 0&&fz(i,s,-32601,`Method not found: ${c}`)}};window.addEventListener(`message`,a);let o=ds.subscribe((e,t)=>{let n={};e.theme!==t.theme&&(n.theme=e.theme,e.previewClient===`chatgpt`&&(n.styles={variables:cz(e.theme)})),(e.previewClient!==t.previewClient||e.previewClient!==null&&e.userAgent!==t.userAgent)&&Object.assign(n,pz(e.previewClient,e.theme,ps(e.userAgent))),e.locale!==t.locale&&(n.locale=e.locale),e.displayMode!==t.displayMode&&(n.displayMode=e.displayMode),e.safeArea!==t.safeArea&&(n.safeAreaInsets=e.safeArea?.insets),e.userAgent!==t.userAgent&&(n.platform=e.userAgent?.device?.type===`mobile`?`mobile`:`web`,n.deviceCapabilities=e.userAgent?.capabilities),Object.keys(n).length>0&&i({jsonrpc:`2.0`,method:`ui/notifications/host-context-changed`,params:n})});return()=>{window.removeEventListener(`message`,a),o()}}function Tue(e,t){e.contentWindow?.postMessage({jsonrpc:`2.0`,method:`ui/notifications/tool-input`,params:{arguments:t}},`*`)}function Eue(e,t){e.contentWindow?.postMessage({jsonrpc:`2.0`,method:`ui/notifications/tool-result`,params:{content:t.content??[],structuredContent:t.structuredContent??{},isError:t.isError??!1,_meta:t._meta??{}}},`*`)}var mz=`openai:set_globals`,Due=class extends CustomEvent{type=mz};function Oue(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)},requestClose:async()=>{t(`requestClose`,{})},openExternal:e=>{window.open(e.href,`_blank`,`noopener,noreferrer`),t(`openExternal`,e)},requestDisplayMode:async r=>{t(`requestDisplayMode`,r);let i=ds.getState(),a=hs(r.mode,i);return e.displayMode=a,n(`displayMode`,a),i.setPreference(`displayMode`,a),{mode:a}},setWidgetState:async r=>{ZS(r.modelContent,`setWidgetState`),t(`setWidgetState`,r),e.widgetState=r,n(`widgetState`,r)},requestModal:async r=>{t(`requestModal`,r),e.displayMode=`modal`,e.view={mode:`modal`,params:r.params},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 kue(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 Due(mz,{detail:{globals:{[r]:i}}});t.dispatchEvent(e)}return o}})}function Aue(e,t,n,r,i,a){let o=kue(AE(t),e);sne(o,Oue(o,n,r,i,a)),e.openai=o}var hz=`__host-fonts`,jue=({iframeRef:e,theme:t,previewClient:n,documentKey:r})=>{(0,b.useEffect)(()=>{let i=e.current,a=i?.contentDocument,o=a?.documentElement;if(!i||!a||!o||!r||n===null)return;i.style.colorScheme=t,o.style.colorScheme=t;let s=n===`chatgpt`?cz(t):lz,c=Object.entries(s);for(let[e,t]of c)o.style.setProperty(e,t);if(n===`claude`&&!a.getElementById(hz)){let e=a.createElement(`style`);e.id=hz,e.textContent=uz,a.head?.appendChild(e)}return()=>{i.style.removeProperty(`color-scheme`),o.style.removeProperty(`color-scheme`);for(let[e]of c)o.style.removeProperty(e)}},[e,t,n,r])},gz=({iframeRef:e,toolName:t,globalKey:n,value:r,updateOpenaiObject:i})=>{(0,b.useEffect)(()=>{let a=e.current?.contentWindow?.openai;!a||a[n]===r||(a[n]=r,i(t,n,r))},[e,n,r,t,i])},Mue=345,Nue=770,_z=420,vz=()=>{let e=VO(),{openaiObject:t}=uO(e.name)??{},{data:n}=HO(e._meta?.ui?.resourceUri),{setToolData:r,pushOpenAiLog:i,updateOpenaiObject:a,setOpenInAppUrl:o}=lO(),s=(0,b.useRef)(null),c=(0,b.useRef)(null),l=(0,b.useRef)(t);l.current=t;let[u,d]=(0,b.useState)(null),f=ds(e=>e.previewClient),p=f!==null,m=ms()&&!p,h=(0,b.useRef)(m);(0,b.useEffect)(()=>{h.current!==m&&(h.current=m,d(null))},[m]);let g=ds(e=>e.displayMode),_=g===`fullscreen`,v=g===`pip`,y=_&&!m,x=y||p?`100%`:`${m?Mue:Nue}px`,S=ds(e=>e.theme),C=ds(e=>e.locale),w=ds(e=>e.userAgent),T=n.contents[0],E=T.text,D=Aae(T._meta?.ui?.domain??T._meta?.[`openai/widgetDomain`]);(0,b.useEffect)(()=>{let t=s.current;if(!t?.contentWindow||!t.contentDocument)return;D&&o(e.name,D);let n=(t,n,r=`default`)=>{i(e.name,{timestamp:Date.now(),source:`view`,command:t,args:n,type:r})};Aue(t.contentWindow,l.current,n,(t,n)=>{a(e.name,t,n)},(e,t)=>DO.callTool(e,t),t=>{o(e.name,t)});let c=wue(t,(e,t)=>DO.callTool(e,t),n,()=>({toolInput:l.current?.toolInput,toolOutput:l.current?.toolOutput,toolResponseMetadata:l.current?.toolResponseMetadata}));return t.contentDocument.open(),t.contentDocument.write(kae(E)),t.contentDocument.close(),r(e.name,{openaiRef:s}),c},[E,D,e.name,i,r,a,o]),mue({iframeRef:s,containerRef:c,enabled:!!E&&!y,onHeightChange:d,documentKey:E,clampToContainer:!p});let O=hue({iframeRef:s,documentKey:E});return gz({iframeRef:s,toolName:e.name,globalKey:`theme`,value:S,updateOpenaiObject:a}),gz({iframeRef:s,toolName:e.name,globalKey:`locale`,value:C,updateOpenaiObject:a}),gz({iframeRef:s,toolName:e.name,globalKey:`displayMode`,value:g,updateOpenaiObject:a}),gz({iframeRef:s,toolName:e.name,globalKey:`userAgent`,value:w,updateOpenaiObject:a}),jue({iframeRef:s,theme:S,previewClient:f,documentKey:E}),(0,b.useEffect)(()=>{let e=s.current;!e||!t||(t.toolInput!=null&&Tue(e,t.toolInput),(t.toolOutput!=null||t.toolResponseMetadata!=null)&&Eue(e,{content:[],structuredContent:t.toolOutput,isError:!1,_meta:t.toolResponseMetadata}))},[t]),(0,H.jsx)(`div`,{ref:c,className:IP(`relative transition-[width] duration-150 ease-out`,y?`h-full w-full`:`mx-auto`,y&&!p&&`bg-background`),style:{width:y?void 0:x,height:y?`100%`:u==null?`auto`:`${v&&!p?Math.min(u,_z):u}px`,opacity:+!!O},children:(0,H.jsx)(`iframe`,{ref:s,src:`about:blank`,style:{width:`100%`,height:y||u==null?`100%`:`${v&&!p?Math.min(u,_z):u}px`,border:`none`,display:`block`},sandbox:`allow-scripts allow-same-origin allow-forms`,title:`html-preview`})})};function yz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,H.jsxs)(`g`,{children:[(0,H.jsx)(`path`,{d:`M8.167 2.501a.665.665 0 0 1 0 1.33H5.834a2 2 0 0 0-2.002 2.002v8.333c0 1.106.896 2.002 2.002 2.002h8.333a2 2 0 0 0 2.002-2.002v-2.333a.665.665 0 0 1 1.33 0v2.333a3.33 3.33 0 0 1-3.332 3.332H5.834a3.33 3.33 0 0 1-3.332-3.332V5.833a3.333 3.333 0 0 1 3.332-3.332z`}),(0,H.jsx)(`path`,{fillRule:`evenodd`,d:`M13.427 3.104a2.451 2.451 0 0 1 3.46 3.472l-5.163 5.203a3.13 3.13 0 0 1-1.55.853l-2.386.524a.815.815 0 0 1-.97-.971l.525-2.38c.13-.59.429-1.131.86-1.556zm2.512.953a1.12 1.12 0 0 0-1.579-.006L9.136 9.197c-.247.244-.42.554-.495.894l-.351 1.594 1.598-.352c.338-.074.648-.245.892-.49l5.162-5.204a1.12 1.12 0 0 0-.003-1.582`,clipRule:`evenodd`})]})})}function Pue(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`,...e,children:(0,H.jsx)(`path`,{d:`M6.95 2.668a3 3 0 0 1 1.763.574l1.064.774c.286.207.63.32.982.32h4.408a3 3 0 0 1 2.998 2.997v7a3 3 0 0 1-2.998 2.998H4.833a3 3 0 0 1-2.998-2.997V5.667a3 3 0 0 1 2.998-2.999zM3.164 9.831v4.503c0 .92.747 1.667 1.668 1.668h10.334c.921 0 1.668-.747 1.668-1.668V9.83zm1.668-5.832c-.921 0-1.668.746-1.668 1.668V8.5h13.67V7.334c0-.922-.747-1.668-1.668-1.668h-4.408a3 3 0 0 1-1.764-.575l-1.064-.773a1.67 1.67 0 0 0-.982-.32z`})})}function Fue(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,H.jsx)(`path`,{d:`M6.001 14.167a1.002 1.002 0 1 0-2.003-.001 1.002 1.002 0 0 0 2.003 0m10.665-.665.135.013a.665.665 0 0 1 0 1.303l-.135.014h-5.833a.665.665 0 0 1 0-1.33zM6.643 3.669a.666.666 0 0 1 1.042.78l-.07.117-2.5 3.333a.666.666 0 0 1-.958.111l-1.25-1.04-.094-.097a.665.665 0 0 1 .835-1.001l.111.076.712.593 2.08-2.774zm10.023 1.5.135.013a.665.665 0 0 1 0 1.303l-.135.014h-5.833a.665.665 0 0 1 0-1.33zm-9.335 8.998a2.332 2.332 0 1 1-4.663 0 2.332 2.332 0 0 1 4.663 0`})})}function bz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,...e,children:(0,H.jsx)(`path`,{strokeWidth:`1.33`,d:`M6.804 15.133V4.867m0 10.266c0 .847-.687 1.534-1.534 1.534H3.754a1.533 1.533 0 0 1-1.534-1.534V4.867c0-.847.687-1.534 1.534-1.534H5.27c.847 0 1.534.687 1.534 1.534m0 10.266c0 .847.686 1.534 1.533 1.534h1.517c.847 0 1.533-.687 1.533-1.534V4.867c0-.847-.686-1.534-1.533-1.534H8.337c-.847 0-1.533.687-1.533 1.534m8.536 11.83 1.493-.263a1.533 1.533 0 0 0 1.244-1.777l-1.783-10.11a1.533 1.533 0 0 0-1.776-1.244l-1.494.263a1.533 1.533 0 0 0-1.243 1.777l1.782 10.11c.147.834.943 1.391 1.777 1.244Z`})})}function Iue(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,...e,children:(0,H.jsxs)(`g`,{strokeLinecap:`round`,strokeWidth:`1.33`,children:[(0,H.jsx)(`path`,{d:`M12.524 12.192c1.803 1.946 4.692.822 4.893-2.058.286-4.087-2.553-7.613-7.104-7.613-3.98 0-7.46 3.038-7.731 6.934-.3 4.3 2.766 7.974 7.416 7.974 1.57 0 3.184-.37 4.381-1.218M6.374 8.96l1.098 1.141M9.124 6.313l1.099 1.14`}),(0,H.jsx)(`path`,{d:`m11.028 6.89-4.142 3.987a.21.21 0 0 0-.006.295c.534.557 1.303 1.37 1.303 1.37 1.185 1.23 2.815.978 4.064-.224 1.25-1.203 1.606-2.795.38-4.053l-1.304-1.368a.21.21 0 0 0-.295-.007Z`})]})})}function Lue(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,H.jsxs)(`g`,{children:[(0,H.jsx)(`path`,{d:`M8.195 10.381c.423 0 .767.344.767.767v1.038a.768.768 0 0 1-1.534 0v-1.038c0-.423.344-.766.767-.767M11.715 10.381c.424 0 .767.344.767.767v1.038a.767.767 0 0 1-1.533 0v-1.038c0-.423.343-.766.766-.767`}),(0,H.jsx)(`path`,{fillRule:`evenodd`,d:`M10 1.667a1.694 1.694 0 0 1 .665 3.252v.884c1.425.028 2.833.145 4.24.368 1.299.207 2.394 1.182 2.623 2.529q.08.477.125.93a2.053 2.053 0 0 1 .03 4.068 15 15 0 0 1-.155 1.248c-.229 1.347-1.324 2.322-2.622 2.528A31 31 0 0 1 10 17.85c-1.653 0-3.28-.116-4.906-.375-1.298-.206-2.393-1.181-2.622-2.528a15 15 0 0 1-.155-1.248 2.052 2.052 0 0 1 .03-4.068q.045-.453.125-.93c.229-1.347 1.324-2.322 2.622-2.529a31 31 0 0 1 4.241-.368V4.92A1.693 1.693 0 0 1 10 1.667m0 5.46c-1.59 0-3.147.111-4.698.358-.786.125-1.394.702-1.518 1.436-.173 1.018-.202 1.945-.202 2.902l.006.714a15 15 0 0 0 .196 2.187c.124.734.732 1.311 1.518 1.437 1.551.246 3.108.358 4.698.358 1.589 0 3.146-.112 4.697-.358.786-.125 1.395-.703 1.52-1.437.172-1.018.201-1.944.202-2.901l-.008-.714a15 15 0 0 0-.195-2.188c-.124-.734-.733-1.311-1.52-1.436A30 30 0 0 0 10 7.126`,clipRule:`evenodd`})]})})}function Rue(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,H.jsxs)(`g`,{children:[(0,H.jsx)(`path`,{d:`M13.334 11.417a.666.666 0 0 1 0 1.33h-2.5a.665.665 0 0 1 0-1.33zM6.742 7.346a.665.665 0 0 1 .912.228l1.121 1.868c.206.343.206.771 0 1.114l-1.12 1.869a.666.666 0 0 1-1.141-.685L7.558 10 6.514 8.258a.665.665 0 0 1 .228-.912`}),(0,H.jsx)(`path`,{fillRule:`evenodd`,d:`M7.798 1.78a4.49 4.49 0 0 1 4.14.979 4.488 4.488 0 0 1 5.301 5.3 4.487 4.487 0 0 1-1.94 7.239 4.485 4.485 0 0 1-7.238 1.94 4.486 4.486 0 0 1-5.301-5.3A4.487 4.487 0 0 1 4.7 4.7 4.49 4.49 0 0 1 7.798 1.78m3.311 2.02a3.16 3.16 0 0 0-5.17 1.385c-.111.359-.393.642-.752.753A3.16 3.16 0 0 0 3.8 11.11c.255.277.358.662.275 1.029a3.16 3.16 0 0 0 3.785 3.785L8 15.9c.323-.032.649.075.89.298a3.16 3.16 0 0 0 5.17-1.385l.05-.13c.133-.297.389-.526.704-.623a3.16 3.16 0 0 0 1.385-5.17 1.15 1.15 0 0 1-.275-1.03 3.16 3.16 0 0 0-3.785-3.785 1.15 1.15 0 0 1-1.03-.275`,clipRule:`evenodd`})]})})}function zue(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,H.jsx)(`path`,{d:`M9.79 18.51a1.8 1.8 0 0 1-.99.27 1.74 1.74 0 0 1-.97-.32l-3.48-2.38a2 2 0 0 1-.64-.71 1.9 1.9 0 0 1-.23-.91V6.53q0-.49.22-.89.23-.399.66-.66l5.72-3.52q.49-.3 1.06-.29.57 0 1.05.32l3.52 2.4q.39.28.6.67.21.381.21.84v7.89q0 .5-.25.95t-.69.71zm4.59-13.85-2.96-2.02a.52.52 0 0 0-.31-.1.5.5 0 0 0-.3.08L5.5 5.89l3.27 2.22zM8.14 9.33 4.86 7.11v3.1l3.28 2.24zm0 4.71L4.86 11.8v2.66q0 .15.06.28.06.12.19.21l3.03 2.07zm7-5.15V5.81L9.52 9.26v3.09zm-.28 4.9a.6.6 0 0 0 .21-.21.6.6 0 0 0 .07-.29v-2.81l-5.62 3.46v3.13z`})})}function xz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`,...e,children:(0,H.jsx)(`path`,{d:`M9.162 2.38a6.707 6.707 0 0 1 5.155 10.993l3.243 3.243a.665.665 0 1 1-.94.94l-3.25-3.249A6.707 6.707 0 1 1 9.162 2.38m0 1.33a5.377 5.377 0 1 0 0 10.754 5.377 5.377 0 0 0 0-10.754`})})}function Bue(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,H.jsx)(`path`,{d:`M6.835 4c-.451.004-.82.012-1.137.038-.386.032-.659.085-.876.162l-.2.086c-.44.224-.807.564-1.063.982l-.103.184c-.126.247-.206.562-.248 1.076-.043.523-.043 1.19-.043 2.135v2.664c0 .944 0 1.612.043 2.135.042.515.122.829.248 1.076l.103.184c.256.418.624.758 1.063.982l.2.086c.217.077.49.13.876.162.316.026.685.034 1.136.038zm11.33 7.327c0 .922 0 1.654-.048 2.243-.043.522-.125.977-.305 1.395l-.082.177a4 4 0 0 1-1.473 1.593l-.276.155c-.465.237-.974.338-1.57.387-.59.048-1.322.048-2.244.048H7.833c-.922 0-1.654 0-2.243-.048-.522-.042-.977-.126-1.395-.305l-.176-.082a4 4 0 0 1-1.594-1.473l-.154-.275c-.238-.466-.34-.975-.388-1.572-.048-.589-.048-1.32-.048-2.243V8.663c0-.922 0-1.654.048-2.243.049-.597.15-1.106.388-1.571l.154-.276a4 4 0 0 1 1.594-1.472l.176-.083c.418-.18.873-.263 1.395-.305.589-.048 1.32-.048 2.243-.048h4.334c.922 0 1.654 0 2.243.048.597.049 1.106.15 1.571.388l.276.154a4 4 0 0 1 1.473 1.594l.082.176c.18.418.262.873.305 1.395.048.589.048 1.32.048 2.243zm-10 4.668h4.002c.944 0 1.612 0 2.135-.043.514-.042.829-.122 1.076-.248l.184-.103c.418-.256.758-.624.982-1.063l.086-.2c.077-.217.13-.49.162-.876.043-.523.043-1.19.043-2.135V8.663c0-.944 0-1.612-.043-2.135-.032-.386-.085-.659-.162-.876l-.086-.2a2.67 2.67 0 0 0-.982-1.063l-.184-.103c-.247-.126-.562-.206-1.076-.248-.523-.043-1.19-.043-2.135-.043H8.164L8.165 4z`})})}function Sz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,H.jsx)(`path`,{d:`M10 2.533a.8.8 0 0 1 .8.8V9.2h5.866a.8.8 0 1 1 0 1.6H10.8v5.866a.8.8 0 1 1-1.6 0V10.8H3.333a.8.8 0 0 1 0-1.6H9.2V3.333a.8.8 0 0 1 .8-.8`})})}function Cz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,H.jsxs)(`g`,{children:[(0,H.jsx)(`path`,{d:`M18.585 13.412a.9.9 0 0 1 1.668.676 8.91 8.91 0 0 1-7.353 5.516V22a.9.9 0 0 1-1.8 0v-2.396a8.91 8.91 0 0 1-7.352-5.516.9.9 0 0 1 1.668-.676 7.104 7.104 0 0 0 13.169 0`}),(0,H.jsx)(`path`,{fillRule:`evenodd`,d:`M12 1.35a4.9 4.9 0 0 1 4.9 4.9v4.483a4.9 4.9 0 0 1-9.8 0V6.25a4.9 4.9 0 0 1 4.9-4.9m0 1.8a3.1 3.1 0 0 0-3.1 3.1v4.483a3.1 3.1 0 1 0 6.2 0V6.25a3.1 3.1 0 0 0-3.1-3.1`,clipRule:`evenodd`})]})})}function wz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,H.jsx)(`path`,{d:`M7.167 15.416V4.583a.75.75 0 0 1 1.5 0v10.833a.75.75 0 0 1-1.5 0m4.166-2.5V7.083a.75.75 0 0 1 1.5 0v5.833a.75.75 0 0 1-1.5 0M3 11.25v-2.5a.75.75 0 0 1 1.5 0v2.5a.75.75 0 0 1-1.5 0m12.5 0v-2.5a.75.75 0 0 1 1.5 0v2.5a.75.75 0 0 1-1.5 0`})})}function Tz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,H.jsx)(`path`,{d:`M14.255 4.755a.7.7 0 0 1 .99.99L10.99 10l4.255 4.255.09.11a.7.7 0 0 1-.97.97l-.11-.09L10 10.99l-4.255 4.255a.7.7 0 0 1-.99-.99L9.01 10 4.755 5.745l-.09-.11a.7.7 0 0 1 .97-.97l.11.09L10 9.01z`})})}function Vue(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,H.jsx)(`path`,{d:`M11.248 18.25q-.825 0-1.568-.314a4.3 4.3 0 0 1-1.32-.874 4 4 0 0 1-1.303.214 4 4 0 0 1-2.046-.544 4.27 4.27 0 0 1-1.518-1.485 4 4 0 0 1-.561-2.095q0-.48.132-1.04A4.4 4.4 0 0 1 2.04 10.71a4.07 4.07 0 0 1 .016-3.4 4.2 4.2 0 0 1 1.056-1.418 3.8 3.8 0 0 1 1.6-.842 3.9 3.9 0 0 1 .76-1.683q.594-.759 1.452-1.188a4.04 4.04 0 0 1 1.831-.429q.825 0 1.568.313.742.314 1.32.875a4 4 0 0 1 1.303-.215q1.106 0 2.046.545a4.14 4.14 0 0 1 1.502 1.485q.577.941.577 2.095 0 .48-.132 1.04.66.61 1.023 1.419.363.792.363 1.666 0 .892-.38 1.717a4.3 4.3 0 0 1-1.072 1.435 3.8 3.8 0 0 1-1.584.825 3.8 3.8 0 0 1-.775 1.683 4.06 4.06 0 0 1-1.436 1.188 4.04 4.04 0 0 1-1.831.429m-4.076-2.062q.825 0 1.436-.347l3.102-1.782a.36.36 0 0 0 .165-.313v-1.42L7.882 14.62a.67.67 0 0 1-.726 0l-3.119-1.798a.5.5 0 0 1-.016.115v.198q0 .841.396 1.551.412.693 1.138 1.089a3.2 3.2 0 0 0 1.617.412m.165-2.69a.4.4 0 0 0 .182.05q.082 0 .165-.05l1.237-.71-3.976-2.31a.7.7 0 0 1-.363-.643v-3.58q-.825.362-1.32 1.122a2.9 2.9 0 0 0-.495 1.65q0 .809.412 1.55.413.743 1.073 1.123zm3.91 3.663q.876 0 1.585-.396a2.96 2.96 0 0 0 1.534-2.64v-3.564a.32.32 0 0 0-.165-.297l-1.254-.726v4.604a.7.7 0 0 1-.363.643l-3.118 1.799a3 3 0 0 0 1.782.577m.628-6.039V8.878L10.01 7.822 8.13 8.878v2.244l1.88 1.056zM7.057 5.859a.7.7 0 0 1 .363-.644l3.118-1.798a3 3 0 0 0-1.782-.578q-.874 0-1.584.396A2.96 2.96 0 0 0 6.05 4.324a3.07 3.07 0 0 0-.396 1.551v3.547q0 .199.165.314l1.238.726zm8.382 7.887q.825-.364 1.303-1.123.495-.758.495-1.65a3.15 3.15 0 0 0-.412-1.55q-.413-.743-1.073-1.123l-3.085-1.782q-.1-.065-.182-.049a.3.3 0 0 0-.165.05l-1.237.692 3.993 2.327a.6.6 0 0 1 .264.264.64.64 0 0 1 .099.363zm-3.317-8.382a.63.63 0 0 1 .726 0l3.135 1.831v-.297q0-.792-.396-1.501a2.86 2.86 0 0 0-1.105-1.155q-.71-.43-1.65-.43-.825 0-1.436.347L8.294 5.941a.36.36 0 0 0-.165.314v1.418z`})})}function Hue(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,H.jsx)(`path`,{d:`M16.835 10c0-3.51-3.024-6.418-6.835-6.418S3.165 6.49 3.165 10c0 1.414.567 2.35 1.282 3.765.087.171.111.367.07.555l-.327 1.469 1.59-.412.145-.024a.8.8 0 0 1 .287.028l.136.051.459.212c1.062.472 2.06.775 3.193.775 3.811 0 6.835-2.91 6.835-6.42m1.33 0c0 4.314-3.692 7.749-8.165 7.749-1.52 0-2.804-.453-4.06-1.04l-2.204.572a.832.832 0 0 1-1.02-.986l.463-2.089C2.537 12.954 1.835 11.73 1.835 10 1.835 5.685 5.527 2.25 10 2.25S18.165 5.685 18.165 10`})})}function Uue(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,H.jsx)(`path`,{d:`M2.5 6.25h15a.75.75 0 0 1 0 1.5h-15a.75.75 0 0 1 0-1.5m0 5.25h10a.75.75 0 0 1 0 1.5h-10a.75.75 0 0 1 0-1.5`})})}function Wue(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,H.jsx)(`path`,{d:`M5.5 10a1.6 1.6 0 1 1-3.2 0 1.6 1.6 0 0 1 3.2 0m6.1 0a1.6 1.6 0 1 1-3.2 0 1.6 1.6 0 0 1 3.2 0m6.1 0a1.6 1.6 0 1 1-3.2 0 1.6 1.6 0 0 1 3.2 0`})})}var Gue=`ui-sans-serif, -apple-system, system-ui, "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif`,Kue={light:{"--main-surface-primary":`#fcfcfc`,"--sidebar-surface":`#fcfcfc`,"--message-surface":`#e9e9e980`,"--composer-surface-primary":`#fff`,"--text-primary":`#0d0d0d`,"--text-secondary":`#5d5d5d`,"--text-tertiary":`#8f8f8f`,"--border-default":`#0000001a`,"--bg-elevated-primary":`#fff`,"--sidebar-surface-secondary":`#ececec`},dark:{"--main-surface-primary":`#000`,"--sidebar-surface":`#000`,"--message-surface":`#323232d9`,"--composer-surface-primary":`#212121`,"--text-primary":`#fff`,"--text-secondary":`#cdcdcd`,"--text-tertiary":`#afafaf`,"--border-default":`#ffffff26`,"--bg-elevated-primary":`#1b1b1b`,"--sidebar-surface-secondary":`#303030`}};function Ez({className:e}){return(0,H.jsx)(`div`,{className:IP(`rounded-md bg-[color-mix(in_oklab,var(--text-primary)_10%,transparent)] motion-safe:animate-pulse`,e)})}var que=[{icon:yz,label:`New chat`},{icon:Pue,label:`Projects`},{icon:Fue,label:`Tasks`},{icon:bz,label:`Library`},{icon:Iue,label:`Plugins`},{icon:Lue,label:`Agents`},{icon:Rue,label:`Codex`},{icon:zue,label:`GPTs`}],Jue=[`w-[85%]`,`w-[70%]`,`w-[78%]`,`w-[62%]`,`w-[82%]`,`w-[68%]`,`w-[75%]`,`w-[60%]`];function Yue(){return(0,H.jsxs)(`div`,{"aria-hidden":!0,className:`absolute inset-x-0 top-0 z-10 flex h-[52px] cursor-not-allowed items-center justify-between px-3`,children:[(0,H.jsx)(`div`,{className:`flex size-10 items-center justify-center rounded-xl bg-[color-mix(in_oklab,var(--text-primary)_4%,transparent)] backdrop-blur-sm`,children:(0,H.jsx)(Uue,{className:`size-6`})}),(0,H.jsxs)(`div`,{className:`flex h-10 items-center gap-5 rounded-xl bg-[color-mix(in_oklab,var(--text-primary)_4%,transparent)] px-4 backdrop-blur-sm`,children:[(0,H.jsx)(yz,{className:`size-6`}),(0,H.jsx)(Wue,{className:`size-6`})]})]})}function Xue(){return(0,H.jsxs)(`div`,{className:`rounded-[28px] bg-(--composer-surface-primary) p-2 shadow-[0_2px_12px_rgba(0,0,0,0.08)]`,children:[(0,H.jsx)(`div`,{className:`px-2.5 pt-1.5 pb-3 text-(--text-tertiary)`,children:`Ask ChatGPT`}),(0,H.jsxs)(`div`,{className:`flex items-center gap-3 px-1.5 pb-0.5`,children:[(0,H.jsx)(Sz,{className:`size-5 shrink-0`}),(0,H.jsx)(Ez,{className:`h-4 w-16`}),(0,H.jsx)(`div`,{className:`flex-1`}),(0,H.jsx)(Ez,{className:`h-4 w-14`}),(0,H.jsx)(Cz,{className:`size-6 shrink-0`}),(0,H.jsx)(`div`,{className:`flex size-9 shrink-0 items-center justify-center rounded-full bg-(--text-primary) text-(--main-surface-primary)`,children:(0,H.jsx)(wz,{className:`size-5`})})]})]})}function Zue(){return(0,H.jsxs)(`div`,{className:`flex h-[52px] items-center gap-3 rounded-full border border-(--border-default) bg-(--composer-surface-primary) px-4 shadow-[0_4px_16px_rgba(0,0,0,0.06)]`,children:[(0,H.jsx)(Sz,{className:`size-5 shrink-0`}),(0,H.jsx)(`span`,{className:`flex-1 text-(--text-tertiary)`,children:`Ask ChatGPT`}),(0,H.jsx)(Cz,{className:`size-6 shrink-0`}),(0,H.jsx)(`div`,{className:`flex size-9.5 shrink-0 items-center justify-center rounded-full bg-(--text-primary) text-(--main-surface-primary)`,children:(0,H.jsx)(wz,{className:`size-5.5`})})]})}function Dz({className:e}){return(0,H.jsx)(`div`,{className:IP(`h-11 w-2/5 self-end rounded-3xl bg-(--message-surface) motion-safe:animate-pulse`,e)})}function Oz({children:e}){let t=ds(e=>e.theme),n=ds(e=>e.displayMode),r=ds(e=>e.setPreference),i=ms(),a=n===`pip`,o=n===`fullscreen`,s=(0,b.useRef)(null),c=(0,b.useRef)(null);return(0,b.useEffect)(()=>{let e=s.current,t=c.current;if(!e||!t)return;let n=()=>{e.scrollTop=e.scrollHeight};n();let r=new ResizeObserver(n);r.observe(t);let i=()=>r.disconnect(),a=[`wheel`,`touchstart`,`pointerdown`];for(let t of a)e.addEventListener(t,i,{once:!0,passive:!0});return()=>{r.disconnect();for(let t of a)e.removeEventListener(t,i)}},[]),(0,H.jsxs)(`div`,{className:`@container/shell relative isolate flex h-full w-full overflow-hidden bg-(--main-surface-primary) text-(--text-primary)`,style:{fontFamily:Gue,...Kue[t]},children:[(0,H.jsxs)(`aside`,{"aria-hidden":!0,className:IP(`h-full shrink-0 cursor-not-allowed border-(--border-default) border-r bg-(--sidebar-surface) @max-[640px]/shell:hidden`,o?`w-[52px]`:`w-[260px]`,i&&`hidden`),children:[(0,H.jsxs)(`div`,{className:IP(`h-full flex-col px-1.5 pb-2`,o?`hidden`:`flex`),children:[(0,H.jsxs)(`div`,{className:`flex h-[52px] shrink-0 items-center justify-between pr-2.5 pl-3`,children:[(0,H.jsx)(`span`,{className:`font-semibold text-base`,children:`ChatGPT`}),(0,H.jsxs)(`div`,{className:`flex items-center gap-4 text-(--text-secondary)`,children:[(0,H.jsx)(xz,{className:`size-5`}),(0,H.jsx)(Bue,{className:`size-5`})]})]}),que.map(({icon:e,label:t})=>(0,H.jsxs)(`div`,{className:`flex h-9 shrink-0 items-center gap-1.5 rounded-[10px] px-2.5 text-sm leading-5`,children:[(0,H.jsx)(e,{className:`size-5 shrink-0`}),(0,H.jsx)(`span`,{children:t})]},t)),(0,H.jsx)(Ez,{className:`mt-6 mb-2 ml-2 h-3 w-14`}),Jue.map(e=>(0,H.jsx)(`div`,{className:`px-2 py-2`,children:(0,H.jsx)(Ez,{className:IP(`h-3.5`,e)})},e)),(0,H.jsxs)(`div`,{className:`mt-auto flex items-center gap-2 px-2 py-2`,children:[(0,H.jsx)(Ez,{className:`size-8 rounded-full`}),(0,H.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,H.jsx)(Ez,{className:`h-3 w-24`}),(0,H.jsx)(Ez,{className:`h-2.5 w-16`})]})]})]}),(0,H.jsxs)(`div`,{className:IP(`h-full flex-col items-center gap-5 py-4`,o?`flex`:`hidden`),children:[(0,H.jsx)(Vue,{className:`size-6`}),(0,H.jsx)(yz,{className:`mt-4 size-5`}),(0,H.jsx)(xz,{className:`size-5`}),(0,H.jsx)(Hue,{className:`size-5`}),(0,H.jsx)(bz,{className:`size-5`}),(0,H.jsx)(Ez,{className:`mt-auto size-8 rounded-full`})]})]}),(0,H.jsxs)(`div`,{className:`relative flex h-full min-w-0 flex-1 flex-col`,children:[i&&!o&&(0,H.jsx)(Yue,{}),(0,H.jsxs)(`div`,{className:IP(`h-[52px] shrink-0 items-center px-4`,o?`flex`:`hidden`),children:[(0,H.jsx)(`button`,{type:`button`,"aria-label":`Exit fullscreen`,onClick:()=>r(`displayMode`,`inline`),className:`-ml-2 flex size-9 cursor-pointer items-center justify-center rounded-lg text-(--text-primary) transition-colors hover:bg-[color-mix(in_oklab,var(--text-primary)_5%,transparent)]`,children:(0,H.jsx)(Tz,{className:`size-5`})}),(0,H.jsxs)(`div`,{"aria-hidden":!0,className:`flex flex-1 items-center justify-center gap-2`,children:[(0,H.jsx)(Ez,{className:`size-5 rounded-md`}),(0,H.jsx)(Ez,{className:`h-4 w-28`})]}),(0,H.jsx)(`div`,{className:`w-5`})]}),(0,H.jsx)(`div`,{ref:s,className:`min-h-0 flex-1 overflow-y-auto [container-type:size]`,children:(0,H.jsxs)(`div`,{ref:c,className:IP(`mx-auto flex w-full max-w-[768px] flex-col px-4 py-6`,i&&!o&&`pt-16`,o&&`h-full max-w-none p-0`),children:[[[`w-[92%]`,`w-[80%]`,`w-[55%]`],[`w-[88%]`,`w-[76%]`,`w-[50%]`],[`w-[95%]`,`w-[70%]`,`w-[62%]`]].map((e,t)=>(0,H.jsxs)(`div`,{className:IP(`flex flex-col`,o&&`hidden`,t>0&&`mt-10`),children:[(0,H.jsx)(Dz,{}),(0,H.jsx)(`div`,{className:`mt-6 flex flex-col gap-3`,children:e.map(e=>(0,H.jsx)(Ez,{className:IP(`h-4`,e)},e))})]},e[0])),(0,H.jsx)(Dz,{className:IP(`mt-10`,o&&`hidden`)}),(0,H.jsx)(Ez,{className:IP(`mt-6 h-4 w-40`,o&&`hidden`)}),(0,H.jsxs)(`div`,{className:IP(`mt-6 flex items-center gap-2`,o&&`hidden`),children:[(0,H.jsx)(Ez,{className:`size-5 rounded-md`}),(0,H.jsx)(Ez,{className:`h-4 w-[110px]`})]}),(0,H.jsxs)(`div`,{className:IP(`relative mt-3 w-full`,!a&&!o&&!i&&`-mx-4 w-[calc(100%+2rem)]`,a&&`absolute top-4 left-1/2 z-30 mt-0 w-[min(768px,calc(100%-32px))] translate-x-[calc(-50%-8px)] rounded-3xl border border-(--border-default) bg-(--main-surface-primary) shadow-[0_8px_32px_rgba(0,0,0,0.12)]`,o&&`mt-0 min-h-0 flex-1`),children:[a?(0,H.jsx)(`button`,{type:`button`,"aria-label":`Exit picture-in-picture`,onClick:()=>r(`displayMode`,`inline`),className:`-top-2.5 -left-2.5 absolute z-10 flex size-8 cursor-pointer items-center justify-center rounded-full bg-[#414141] text-white`,children:(0,H.jsx)(Tz,{className:`size-4.5`})}):null,(0,H.jsx)(`div`,{className:IP(`w-full`,a&&`max-h-[80cqh] overflow-y-auto rounded-3xl`,o&&`h-full min-h-0`,i&&!a&&!o&&`overflow-hidden rounded-xl border border-(--border-default)`),children:e??(0,H.jsx)(Ez,{className:`h-96 w-full rounded-2xl`})})]}),(0,H.jsx)(`div`,{className:IP(`mt-6 border-(--border-default) border-t`,o&&`hidden`)}),(0,H.jsxs)(`div`,{className:IP(`mt-6 flex flex-col gap-3`,o&&`hidden`),children:[(0,H.jsx)(Ez,{className:`h-4 w-[95%]`}),(0,H.jsx)(Ez,{className:`h-4 w-[88%]`}),(0,H.jsx)(Ez,{className:`h-4 w-[60%]`})]}),(0,H.jsxs)(`div`,{className:IP(`mt-4 flex items-center gap-3 pb-4`,o&&`hidden`),children:[(0,H.jsx)(Ez,{className:`size-4 rounded-full`}),(0,H.jsx)(Ez,{className:`size-4 rounded-full`}),(0,H.jsx)(Ez,{className:`size-4 rounded-full`}),(0,H.jsx)(Ez,{className:`size-4 rounded-full`})]})]})}),(0,H.jsx)(`div`,{"aria-hidden":!0,className:IP(`w-full shrink-0 cursor-not-allowed px-4`,i?`pb-4`:`pb-6`,o&&`hidden`),children:(0,H.jsx)(`div`,{className:`mx-auto w-full max-w-[768px]`,children:i?(0,H.jsx)(Xue,{}):(0,H.jsx)(Zue,{})})})]})]})}function kz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,H.jsx)(`path`,{d:`M471.88739013671875 665.9563838413783Q471.88739013671875 704.3330688476562 457.7486114501953 738.6877461887846Q443.6098327636719 773.042423529913 417.35210091727123 799.3136473790112Q390.08445630754744 826.5953029146131 355.74742235456193 840.7413465256659Q321.4103884015764 854.8873901367188 284.04361615862166 854.8873901367188Q245.66693115234375 854.8873901367188 211.31225381121538 840.7486114501953Q176.95757647008705 826.6098327636719 150.68635262098888 799.3421881539481Q123.40469708538696 773.0844563075475 109.2586534743341 738.747422354562Q95.11260986328125 704.4103884015765 95.11260986328125 666.0337033952985Q95.11260986328125 628.6669311523438 109.25138854980469 594.3122538112154Q123.39016723632812 559.957576470087 150.65781184605189 532.6759209344851Q176.91554369245256 506.40469708538694 211.25257764543807 492.2586534743341Q245.58961159842355 478.11260986328125 283.9662966047014 478.11260986328125Q321.33306884765625 478.11260986328125 355.6877461887846 492.2513885498047Q390.042423529913 506.3901672363281 417.32407906551487 532.6478990827288Q443.59530291461306 559.9155436924525 457.7413465256659 594.252577645438Q471.88739013671875 628.5896115984235 471.88739013671875 665.9563838413783ZM412.11260986328125 666.0401287768261Q412.11260986328125 631.5551147460938 394.3774597903332 602.4688213147615Q376.64230971738516 573.3825278834292 347.5763693200537 555.634959010074Q318.51042892272216 537.8873901367188 284.02541489198984 537.8873901367188Q248.55511474609375 537.8873901367188 219.4688213147615 555.6225402096668Q190.38252788342928 573.3576902826148 172.634959010074 602.4236306799463Q154.88739013671875 631.4895710772778 154.88739013671875 665.9745851080102Q154.88739013671875 701.4448852539062 172.6225402096668 730.5311786852385Q190.35769028261484 759.6174721165708 219.42363067994637 777.365040989926Q248.48957107727787 795.1126098632812 283.95987122317393 795.1126098632812Q318.44488525390625 795.1126098632812 347.5311786852385 777.3774597903332Q376.6174721165707 759.6423097173852 394.365040989926 730.5763693200537Q412.11260986328125 701.5104289227222 412.11260986328125 666.0401287768261ZM601.0 395.11260986328125H849.0Q871.7689367223669 395.11260986328125 888.3281634295429 411.6718365704572Q904.8873901367188 428.2310632776331 904.8873901367188 451.0V799.0Q904.8873901367188 821.7689367223669 888.3281634295429 838.3281634295429Q871.7689367223669 854.8873901367188 849.0 854.8873901367188H601.0Q578.2310632776331 854.8873901367188 561.6718365704571 838.3281634295429Q545.1126098632812 821.7689367223669 545.1126098632812 799.0V451.0Q545.1126098632812 428.2310632776331 561.6718365704571 411.6718365704572Q578.2310632776331 395.11260986328125 601.0 395.11260986328125ZM601.0 454.88739013671875 604.8873901367188 451.0V799.0L601.0 795.1126098632812H849.0L845.1126098632812 799.0V451.0L849.0 454.88739013671875ZM325.33465576171875 511.77716064453125V512.7771606445312Q303.1718221028646 461.44838945942536 299.1422159830729 409.11317178049393Q295.11260986328125 356.7779541015625 308.202328408731 307.9240358737713Q321.29204695418076 259.0701176459801 350.995639038086 218.77822632409038Q380.69923112199115 178.4863350022007 425.00289389120564 153.30390292601965Q470.31345808699325 127.2236328125 519.6516279890731 121.7236328125Q568.9897978911529 116.2236328125 618.3279677932327 129.2236328125Q667.6661376953125 142.2236328125 710.9897978184587 171.91258533184345Q754.3134579416048 201.6015378511869 786.5543212890625 246.8897705078125Q801.8873901367188 268.6151204427083 794.8873901367188 293.444091796875Q788.6568040114182 317.24662911551343 767.88818359375 329.66534423828125L406.88818359375 537.6653442382812Q393.4617545387962 545.8873901367188 377.4533198963512 545.8873901367188Q361.44488525390625 545.8873901367188 348.0325142996652 537.6098327636719L334.6201433454241 527.2628860473633ZM380.66534423828125 488.22283935546875 378.88818359375 486.33465576171875 377.00079345703125 485.4456787109375 738.0007934570312 277.4456787109375 737.1126098632812 278.555908203125 737.5567016601562 282.1102294921875Q703.8421892438616 234.41767765925476 655.2536272321429 208.08741466815655Q606.6650652204241 181.75715167705835 554.110089983259 180.26675943227917Q501.55511474609375 178.7763671875 455.0165774806016 205.55561225358827Q409.46822185905614 231.34303342834005 384.2185899384168 277.9587563211604Q358.9689580177774 324.5744792139808 357.48368555185743 379.6207051831623Q355.9984130859375 434.66693115234375 380.66534423828125 487.2310632776331Z`})})}function Az(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,H.jsx)(`path`,{d:`M500.045285676655 120.11260986328125Q578.444091796875 120.11260986328125 647.273644917806 149.76344038310805Q716.103198038737 179.41427090293485 768.3533697509765 231.68014164974818Q820.6035414632162 283.9460123965615 850.2454657999674 352.79624597649826Q879.8873901367188 421.646479556435 879.8873901367188 500.045285676655Q879.8873901367188 578.444091796875 850.2400938165251 643.7852350408381Q820.5927974963314 709.1263782848011 768.8356530729425 756.3730510919745Q717.0785086495536 803.6197238991477 647.7339850531685 829.2535570179332Q578.3894614567832 854.8873901367188 500.0 854.8873901367188H150.0Q136.15392855940195 854.8873901367188 128.16581042059536 846.340815617488Q120.1776922817888 837.7942410982572 119.64515107253501 825.508540226863Q119.11260986328125 813.2228393554688 128.667724609375 803.667724609375L228.667724609375 703.667724609375Q220.11260986328125 712.1950836181641 220.11260986328125 724.9861221313477Q220.11260986328125 737.7771606445312 228.667724609375 746.332275390625Q178.410727041739 696.0572959498355 149.26166845251012 638.2410695929277Q120.11260986328125 580.4248432360198 120.11260986328125 499.98487613075656Q120.11260986328125 421.555908203125 149.76344038310805 352.726355082194Q179.41427090293482 283.896801961263 231.68014164974812 231.64663024902342Q283.94601239656146 179.39645853678383 352.79624597649826 149.75453420003254Q421.64647955643505 120.11260986328125 500.045285676655 120.11260986328125ZM500.0425254998293 179.88739013671875Q433.444091796875 179.88739013671875 375.7723714192708 204.7367776087088Q318.10065104166665 229.58616508069883 273.85252075195314 273.8180747808412Q229.6043904622396 318.04998448098354 204.74589029947919 375.7005634160005Q179.88739013671875 433.3511423510174 179.88739013671875 499.9475007759508Q179.88739013671875 564.555908203125 203.2455945222274 611.7545601981027Q226.60379890773606 658.9532121930804 271.332275390625 703.667724609375Q279.88739013671875 712.1950836181641 279.88739013671875 724.9861221313477Q279.88739013671875 737.7771606445312 271.332275390625 746.332275390625L171.332275390625 846.332275390625Q180.7763671875 836.7702217102051 180.2763671875 824.5520420074463Q179.7763671875 812.3338623046875 171.80055454799106 803.7232360839844Q163.82474190848214 795.1126098632812 150.0 795.1126098632812H500.0Q565.6131436365732 795.1126098632812 623.7702482235359 774.2471184363732Q681.9273528104984 753.3816270094651 726.1665178381879 714.1346312302809Q770.4056828658773 674.8876354510967 795.2591463645792 620.7367172241211Q820.1126098632812 566.5857989971455 820.1126098632812 500.0149453970102Q820.1126098632812 433.444091796875 795.2624480338206 375.7723714192708Q770.4122862043602 318.10065104166665 726.1789981479203 273.85252075195314Q681.9457100914806 229.60439046223962 624.293334647132 204.74589029947919Q566.6409592027836 179.88739013671875 500.0425254998293 179.88739013671875Z`})})}function jz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,H.jsx)(`path`,{d:`M399.9508586946081 95.11260986328125Q463.33306884765625 95.11260986328125 518.6892674763997 118.75518031719605Q574.0454661051432 142.39775077111085 615.8142341613769 184.1495241258965Q657.5830022176107 225.90129748068216 681.2351961771647 281.23497301112104Q704.8873901367188 336.5686485415599 704.8873901367188 399.9508586946081Q704.8873901367188 463.33306884765625 681.2410083934419 518.6892674763998Q657.594626650165 574.0454661051433 615.8361227205485 615.814234161377Q574.0776187909319 657.5830022176107 518.7350232215605 681.2351961771647Q463.39242765218904 704.8873901367188 400.0 704.8873901367188H125.0Q111.15392855940193 704.8873901367188 103.16581042059536 696.340815617488Q95.1776922817888 687.7942410982572 94.64515107253501 675.508540226863Q94.11260986328125 663.2228393554688 103.667724609375 653.667724609375L184.667724609375 573.667724609375Q175.2236328125 582.2120951990928 175.2236328125 594.494627921812Q175.2236328125 606.7771606445312 184.667724609375 615.332275390625Q142.40576034717344 574.0857803950671 118.75918510522735 518.7551163766359Q95.11260986328125 463.4244523582046 95.11260986328125 400.0456917552741Q95.11260986328125 336.66693115234375 118.75518031719604 281.3107325236003Q142.39775077111082 225.9545338948568 184.1495241258965 184.18576583862307Q225.90129748068222 142.41699778238933 281.23497301112104 118.76480382283529Q336.5686485415599 95.11260986328125 399.9508586946081 95.11260986328125ZM399.95305741073304 154.88739013671875Q349.33306884765625 154.88739013671875 304.68992832728793 173.74581724845325Q260.04678780691967 192.60424436018775 226.31641496930803 226.35090340223888Q192.58604213169642 260.09756244429 173.7367161342076 304.7622582352401Q154.88739013671875 349.4269540261902 154.88739013671875 400.046942589267Q154.88739013671875 450.66693115234375 174.23704655965167 495.30431587465347Q193.58670298258463 539.9417005969632 226.332275390625 573.667724609375Q235.88739013671875 582.2120951990928 235.88739013671875 594.494627921812Q235.88739013671875 606.7771606445312 226.332275390625 615.332275390625L146.332275390625 696.332275390625Q155.7763671875 686.7702217102051 155.2763671875 674.5520420074463Q154.7763671875 662.3338623046875 146.80055454799106 653.7232360839844Q138.82474190848214 645.1126098632812 125.0 645.1126098632812H400.0Q450.6102959636735 645.1126098632812 495.2664394610324 626.2541827515468Q539.9225829583913 607.3957556398123 573.662780267507 573.6490965977611Q607.4029775766226 539.9024375557099 626.2577937199519 495.23774176475985Q645.1126098632812 450.5730459738098 645.1126098632812 399.953057410733Q645.1126098632812 349.33306884765625 626.2541827515468 304.68992832728793Q607.3957556398123 260.0467878069196 573.6490965977612 226.31641496930803Q539.90243755571 192.58604213169644 495.2377417647599 173.7367161342076Q450.57304597380977 154.88739013671875 399.95305741073304 154.88739013671875ZM364.55670166015625 794.2212524414062Q357.0015869140625 784.5551147460938 358.07375183105466 772.2823365864001Q359.1459167480469 760.0095584267065 368.79540100097654 751.471973619963Q378.44488525390625 744.0015869140625 390.6862320438508 745.0722378817471Q402.92757883379534 746.1428888494318 411.44329833984375 755.7787475585938Q444.19262020713404 796.4752848307292 493.3166030080695 820.7939473470052Q542.4405858090049 845.1126098632812 600.0 845.1126098632812H802.4480590820312L773.667724609375 815.332275390625Q764.1126098632812 806.7879048009072 764.1126098632812 794.505372078188Q764.1126098632812 782.2228393554688 773.667724609375 773.667724609375Q806.4132970174154 739.9269369886669 825.7629534403484 695.2700121965531Q845.1126098632812 650.6130874044394 845.1126098632812 600.0019059733771Q845.1126098632812 542.444091796875 820.7939473470052 493.3187942504883Q796.4752848307292 444.19349670410156 755.7787475585938 411.44329833984375Q746.1428888494319 402.92757883379534 745.0722378817472 390.6862320438508Q744.0015869140625 378.44488525390625 751.471973619963 368.79540100097654Q760.0095584267065 359.14591674804683 772.2823365864001 358.07375183105466Q784.5551147460938 357.0015869140625 794.2212524414062 364.55670166015625Q845.530098100142 406.81575520833337 875.2087441184303 468.1919996473525Q904.8873901367188 529.5682440863716 904.8873901367188 600.0Q904.8873901367188 654.9370488432264 886.5634408133371 704.3803928021302Q868.2394914899554 753.8237367610342 835.5535278320312 793.7779541015625L896.332275390625 853.667724609375Q905.7763671875 863.2297782897949 905.2763671875 875.4479579925537Q904.7763671875 887.6661376953125 896.800554547991 896.2767639160156Q888.8247419084821 904.8873901367188 875.0 904.8873901367188H600.0Q529.5682440863716 904.8873901367188 468.1919996473524 875.2087441184303Q406.8157552083333 845.530098100142 364.55670166015625 794.2212524414062Z`})})}function Mz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,H.jsx)(`path`,{d:`M803.667724609375 328.667724609375Q812.1950836181641 320.11260986328125 824.9861221313477 320.11260986328125Q837.7771606445312 320.11260986328125 846.332275390625 328.6455200195312Q854.8873901367188 337.1784301757813 854.8873901367188 349.97779541015626Q854.8873901367188 362.77716064453125 846.332275390625 371.332275390625L521.332275390625 696.332275390625Q512.8049163818359 704.8873901367188 500.01387786865234 704.8873901367188Q487.22283935546875 704.8873901367188 478.667724609375 696.332275390625L153.667724609375 371.332275390625Q145.11260986328125 362.80491638183594 145.11260986328125 350.01387786865234Q145.11260986328125 337.22283935546875 153.64552001953126 328.667724609375Q162.17843017578124 320.11260986328125 174.97779541015626 320.11260986328125Q187.77716064453125 320.11260986328125 196.332275390625 328.667724609375L500.0 632.33544921875Z`})})}function Nz(e){return(0,H.jsxs)(`svg`,{viewBox:`0 0 21.2 21.2`,fill:`none`,"aria-hidden":`true`,...e,children:[(0,H.jsx)(`rect`,{x:`0`,y:`7.6`,height:`6`,width:`1.2`,rx:`0.6`,fill:`currentColor`}),(0,H.jsx)(`rect`,{x:`4`,y:`5.6`,height:`10`,width:`1.2`,rx:`0.6`,fill:`currentColor`}),(0,H.jsx)(`rect`,{x:`8`,y:`2.6`,height:`16`,width:`1.2`,rx:`0.6`,fill:`currentColor`}),(0,H.jsx)(`rect`,{x:`12`,y:`5.6`,height:`10`,width:`1.2`,rx:`0.6`,fill:`currentColor`}),(0,H.jsx)(`rect`,{x:`16`,y:`2.6`,height:`16`,width:`1.2`,rx:`0.6`,fill:`currentColor`}),(0,H.jsx)(`rect`,{x:`20`,y:`7.6`,height:`6`,width:`1.2`,rx:`0.6`,fill:`currentColor`})]})}function Pz(e){return(0,H.jsx)(`svg`,{viewBox:`30 0 82 24`,height:`20`,fill:`currentColor`,"aria-hidden":`true`,shapeRendering:`geometricPrecision`,...e,children:(0,H.jsx)(`path`,{d:`M39.504 21.2643C37.688 21.2643 36.06 20.9003 34.62 20.1723C33.18 19.4443 32.048 18.4163 31.224 17.0883C30.408 15.7603 30 14.2243 30 12.4803C30 10.6563 30.412 9.03233 31.236 7.60833C32.06 6.17633 33.196 5.06833 34.644 4.28433C36.1 3.49233 37.74 3.09633 39.564 3.09633C40.692 3.09633 41.82 3.22033 42.948 3.46833C44.084 3.71633 45.072 4.09633 45.912 4.60833V8.56833H44.832C44.536 7.16833 43.96 6.12433 43.104 5.43633C42.256 4.74833 41.076 4.40433 39.564 4.40433C38.164 4.40433 36.996 4.73233 36.06 5.38833C35.132 6.03633 34.444 6.93633 33.996 8.08833C33.548 9.24033 33.324 10.5643 33.324 12.0603C33.324 13.5483 33.576 14.8883 34.08 16.0803C34.584 17.2723 35.328 18.2163 36.312 18.9123C37.296 19.6003 38.476 19.9443 39.852 19.9443C40.796 19.9443 41.608 19.7483 42.288 19.3563C42.968 18.9643 43.54 18.4363 44.004 17.7723C44.468 17.1003 44.908 16.2803 45.324 15.3123H46.464L45.684 19.6803C44.892 20.2003 43.936 20.5963 42.816 20.8683C41.704 21.1323 40.6 21.2643 39.504 21.2643ZM47.964 21.0003V19.9563C48.356 19.9003 48.668 19.8403 48.9 19.7763C49.14 19.7043 49.332 19.5883 49.476 19.4283C49.628 19.2683 49.704 19.0443 49.704 18.7563V5.83233L47.964 5.08833V4.28433L51.612 2.73633H52.56V18.7563C52.56 19.0523 52.632 19.2803 52.776 19.4403C52.928 19.6003 53.12 19.7123 53.352 19.7763C53.592 19.8403 53.912 19.9003 54.312 19.9563V21.0003H47.964ZM59.028 21.2643C58.38 21.2643 57.792 21.1363 57.264 20.8803C56.736 20.6243 56.32 20.2563 56.016 19.7763C55.712 19.2963 55.56 18.7363 55.56 18.0963C55.56 17.1203 55.86 16.3443 56.46 15.7683C57.068 15.1843 57.916 14.7403 59.004 14.4363L63.24 13.2363V11.7123C63.24 10.8883 63.048 10.2523 62.664 9.80433C62.288 9.34833 61.708 9.12033 60.924 9.12033C60.228 9.12033 59.704 9.33233 59.352 9.75633C59.008 10.1723 58.836 10.7483 58.836 11.4843V12.6123H56.988C56.764 12.4683 56.588 12.2763 56.46 12.0363C56.34 11.7883 56.28 11.5163 56.28 11.2203C56.28 10.5563 56.516 9.98833 56.988 9.51633C57.46 9.03633 58.06 8.67633 58.788 8.43633C59.516 8.19633 60.256 8.07633 61.008 8.07633C62.592 8.07633 63.836 8.44033 64.74 9.16833C65.644 9.89633 66.096 11.0003 66.096 12.4803V18.5403C66.096 18.8603 66.168 19.1043 66.312 19.2723C66.456 19.4403 66.644 19.5603 66.876 19.6323C67.116 19.6963 67.44 19.7563 67.848 19.8123V20.8563C67.536 20.9683 67.208 21.0563 66.864 21.1203C66.528 21.1843 66.204 21.2163 65.892 21.2163C65.148 21.2163 64.548 21.0483 64.092 20.7123C63.644 20.3683 63.372 19.8643 63.276 19.2003C62.716 19.8643 62.08 20.3763 61.368 20.7363C60.664 21.0883 59.884 21.2643 59.028 21.2643ZM60.444 19.3443C60.948 19.3443 61.44 19.2283 61.92 18.9963C62.408 18.7563 62.848 18.4403 63.24 18.0483V14.3403L60.168 15.2523C59.592 15.4283 59.152 15.7003 58.848 16.0683C58.544 16.4363 58.392 16.9003 58.392 17.4603C58.392 17.8203 58.48 18.1443 58.656 18.4323C58.832 18.7203 59.076 18.9443 59.388 19.1043C59.7 19.2643 60.052 19.3443 60.444 19.3443ZM73.608 21.2643C72.32 21.2643 71.356 20.9283 70.716 20.2563C70.084 19.5843 69.768 18.6363 69.768 17.4123V10.9083L68.016 10.2603L68.112 9.45633L71.664 8.07633H72.624V16.9323C72.624 17.6923 72.812 18.2563 73.188 18.6243C73.564 18.9923 74.14 19.1763 74.916 19.1763C75.428 19.1763 75.964 19.0603 76.524 18.8283C77.084 18.5883 77.6 18.2803 78.072 17.9043V10.9083L76.32 10.2603V9.45633L79.98 8.07633H80.928V17.8323C80.928 18.1523 81 18.4003 81.144 18.5763C81.288 18.7443 81.476 18.8643 81.708 18.9363C81.948 19.0083 82.272 19.0723 82.68 19.1283V20.1603L79.02 21.1803H78.072V19.0803C77.44 19.7363 76.728 20.2643 75.936 20.6643C75.144 21.0643 74.368 21.2643 73.608 21.2643ZM89.328 21.2643C88.264 21.2643 87.312 21.0083 86.472 20.4963C85.632 19.9763 84.976 19.2683 84.504 18.3723C84.032 17.4763 83.796 16.4843 83.796 15.3963C83.796 13.9643 84.08 12.6963 84.648 11.5923C85.224 10.4883 86.032 9.62833 87.072 9.01233C88.112 8.38833 89.32 8.07633 90.696 8.07633C91.12 8.07633 91.556 8.12433 92.004 8.22033C92.46 8.30833 92.896 8.43633 93.312 8.60433V5.82033L91.56 5.08833V4.28433L95.22 2.73633H96.168V17.8323C96.168 18.1523 96.24 18.4003 96.384 18.5763C96.536 18.7443 96.728 18.8643 96.96 18.9363C97.2 19.0083 97.52 19.0723 97.92 19.1283V20.1603L94.26 21.1803H93.312V19.5843C92.752 20.1123 92.132 20.5243 91.452 20.8203C90.78 21.1163 90.072 21.2643 89.328 21.2643ZM90.504 19.3323C90.976 19.3323 91.456 19.2363 91.944 19.0443C92.432 18.8523 92.888 18.5883 93.312 18.2523V10.3563C92.584 9.76433 91.776 9.46833 90.888 9.46833C89.992 9.46833 89.236 9.69633 88.62 10.1523C88.004 10.6083 87.54 11.2283 87.228 12.0123C86.924 12.7883 86.772 13.6563 86.772 14.6163C86.772 15.5283 86.908 16.3403 87.18 17.0523C87.452 17.7563 87.868 18.3123 88.428 18.7203C88.988 19.1283 89.68 19.3323 90.504 19.3323ZM105.252 21.2643C104.068 21.2643 103.004 20.9883 102.06 20.4363C101.116 19.8843 100.376 19.1163 99.84 18.1323C99.304 17.1483 99.036 16.0443 99.036 14.8203C99.036 13.5563 99.308 12.4123 99.852 11.3883C100.404 10.3563 101.156 9.54833 102.108 8.96433C103.068 8.37233 104.136 8.07633 105.312 8.07633C106.216 8.07633 107.048 8.26433 107.808 8.64033C108.568 9.01633 109.2 9.54433 109.704 10.2243C110.216 10.9043 110.552 11.6883 110.712 12.5763L101.928 15.2883C102.168 16.4003 102.644 17.2763 103.356 17.9163C104.076 18.5563 104.968 18.8763 106.032 18.8763C106.92 18.8763 107.716 18.6523 108.42 18.2043C109.124 17.7483 109.748 17.0603 110.292 16.1403L111.228 16.4403C111.012 17.4003 110.62 18.2443 110.052 18.9723C109.484 19.7003 108.784 20.2643 107.952 20.6643C107.128 21.0643 106.228 21.2643 105.252 21.2643ZM107.628 12.2043C107.516 11.6523 107.324 11.1683 107.052 10.7523C106.788 10.3283 106.46 10.0003 106.068 9.76833C105.676 9.53633 105.244 9.42033 104.772 9.42033C104.18 9.42033 103.656 9.60033 103.2 9.96033C102.752 10.3123 102.4 10.8163 102.144 11.4723C101.896 12.1203 101.772 12.8723 101.772 13.7283C101.772 13.8803 101.776 13.9963 101.784 14.0763L107.628 12.2043Z`})})}function Fz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,H.jsx)(`path`,{d:`M708.332275390625 696.332275390625Q699.7879048009073 704.8873901367188 687.505372078188 704.8873901367188Q675.2228393554688 704.8873901367188 666.7003784179688 696.3544799804688Q657.1126098632812 687.8215698242187 657.1126098632812 675.0222045898438Q657.1126098632812 662.2228393554688 666.667724609375 653.667724609375L820.33544921875 500.0L666.667724609375 346.332275390625Q657.1126098632812 337.80491638183594 657.1126098632812 325.01387786865234Q657.1126098632812 312.22283935546875 666.7121337890625 303.667724609375Q675.2450439453125 295.11260986328125 687.5111022949219 295.11260986328125Q699.7771606445312 295.11260986328125 708.332275390625 303.667724609375L883.332275390625 478.667724609375Q892.8873901367188 487.19508361816406 892.8873901367188 499.98612213134766Q892.8873901367188 512.7771606445312 883.332275390625 521.332275390625ZM479.7763671875 805.2220458984375Q477.65525124289775 816.9654169497283 467.57995050603694 824.3708920686141Q457.5046497691761 831.7763671875 444.7779541015625 829.7763671875Q433.03458305027175 827.6552512428977 425.6291079313859 817.579950506037Q418.2236328125 807.5046497691761 420.2236328125 794.7779541015625L520.2236328125 194.7779541015625Q522.3447487571023 183.03458305027175 532.420049493963 175.62910793138587Q542.4953502308239 168.2236328125 555.2220458984375 170.2236328125Q566.9654169497283 172.34474875710225 574.3708920686141 182.42004949396306Q581.7763671875 192.49535023082387 579.7763671875 205.2220458984375ZM333.332275390625 653.667724609375Q342.88739013671875 662.1950836181641 342.88739013671875 674.9861221313477Q342.88739013671875 687.7771606445312 333.2878662109375 696.332275390625Q324.7549560546875 704.8873901367188 312.4888977050781 704.8873901367188Q300.22283935546875 704.8873901367188 291.667724609375 696.332275390625L116.667724609375 521.332275390625Q107.11260986328125 512.8049163818359 107.11260986328125 500.01387786865234Q107.11260986328125 487.22283935546875 116.667724609375 478.667724609375L291.667724609375 303.667724609375Q300.21209519909274 295.11260986328125 312.494627921812 295.11260986328125Q324.77716064453125 295.11260986328125 333.29962158203125 303.6455200195312Q342.88739013671875 312.1784301757813 342.88739013671875 324.97779541015626Q342.88739013671875 337.77716064453125 333.332275390625 346.332275390625L179.66455078125 500.0Z`})})}function Iz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,H.jsx)(`path`,{d:`M225.0 295.11260986328125H775.0Q810.516083240509 295.11260986328125 840.4510676860809 312.3632788658142Q870.3860521316528 329.61394786834717 887.6367211341858 359.54893231391907Q904.8873901367188 389.48391675949097 904.8873901367188 425.0V775.0Q904.8873901367188 797.5323408077925 894.133318387545 815.4557937230819Q883.3792466383713 833.3792466383713 865.4557937230819 844.133318387545Q847.5323408077925 854.8873901367188 825.0 854.8873901367188H175.0Q152.46765919220752 854.8873901367188 134.54420627691806 844.133318387545Q116.6207533616286 833.3792466383713 105.86668161245493 815.4557937230819Q95.11260986328125 797.5323408077925 95.11260986328125 775.0V425.0Q95.11260986328125 389.48391675949097 112.36327886581421 359.54893231391907Q129.61394786834717 329.61394786834717 159.54893231391907 312.3632788658142Q189.48391675949097 295.11260986328125 225.0 295.11260986328125ZM225.0 354.88739013671875Q195.78641255696616 354.88739013671875 175.33690134684247 375.33690134684247Q154.88739013671875 395.7864125569662 154.88739013671875 425.0V775.0Q154.88739013671875 783.2278858531605 160.82975214177912 789.1702478582208Q166.7721141468395 795.1126098632812 175.0 795.1126098632812H825.0Q833.2278858531605 795.1126098632812 839.1702478582208 789.1702478582208Q845.1126098632812 783.2278858531605 845.1126098632812 775.0V425.0Q845.1126098632812 395.7864125569662 824.6630986531575 375.33690134684247Q804.2135874430338 354.88739013671875 775.0 354.88739013671875ZM125.0 604.8873901367188V545.1126098632812H275.0Q287.77716064453125 545.1126098632812 296.332275390625 553.6455200195312Q304.88739013671875 562.1784301757813 304.88739013671875 574.9777954101562Q304.88739013671875 587.7771606445312 296.348135811942 596.332275390625Q287.8088814871652 604.8873901367188 275.0 604.8873901367188ZM375.0 604.8873901367188Q362.1911185128348 604.8873901367188 353.651864188058 596.3544799804688Q345.11260986328125 587.8215698242187 345.11260986328125 575.0222045898438Q345.11260986328125 562.2228393554688 353.651864188058 553.667724609375Q362.1911185128348 545.1126098632812 375.0 545.1126098632812H625.0Q637.8088814871652 545.1126098632812 646.348135811942 553.6455200195312Q654.8873901367188 562.1784301757813 654.8873901367188 574.9777954101562Q654.8873901367188 587.7771606445312 646.348135811942 596.332275390625Q637.8088814871652 604.8873901367188 625.0 604.8873901367188ZM354.88739013671875 325.0H295.11260986328125V225.0Q295.11260986328125 202.555908203125 305.86668161245495 184.60487747192383Q316.6207533616286 166.65384674072266 334.5442062769181 155.88322830200195Q352.4676591922075 145.11260986328125 375.0 145.11260986328125H625.0Q647.5323408077925 145.11260986328125 665.4557937230819 155.86668161245495Q683.3792466383713 166.62075336162866 694.133318387545 184.5442062769181Q704.8873901367188 202.46765919220752 704.8873901367188 225.0V325.0H645.1126098632812V225.0Q645.1126098632812 216.77716064453125 639.1702478582208 210.832275390625Q633.2278858531605 204.88739013671875 625.0 204.88739013671875H375.0Q366.7721141468395 204.88739013671875 360.8297521417791 210.82975214177912Q354.88739013671875 216.7721141468395 354.88739013671875 225.0ZM725.0 604.8873901367188Q712.2228393554688 604.8873901367188 703.667724609375 596.3544799804688Q695.1126098632812 587.8215698242187 695.1126098632812 575.0222045898438Q695.1126098632812 562.2228393554688 703.651864188058 553.667724609375Q712.1911185128348 545.1126098632812 725.0 545.1126098632812H875.0V604.8873901367188Z`})})}function Lz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,H.jsx)(`path`,{d:`M120.11260986328125 500.0Q120.11260986328125 421.61053854321676 149.76344038310805 352.76851149463147Q179.41427090293482 283.9264844460462 231.68014164974812 231.6668434748574Q283.94601239656146 179.4072025036686 352.79624597649826 149.75990618347493Q421.64647955643505 120.11260986328125 500.045285676655 120.11260986328125Q578.444091796875 120.11260986328125 647.2545028997927 149.77072185647899Q716.0649140027105 179.42883384967672 768.300554547991 231.70753973599136Q820.5361950932717 283.986245622306 850.1562811403858 352.85338703023973Q879.7763671875 421.72052843817346 879.7763671875 500.13858726764545L876.7763671875 539.3476166823814Q873.7763671875 557.444091796875 867.6836138375198 572.67919921875Q861.5908604875395 587.914306640625 852.4517304625692 600.6102294921875Q843.3126004375989 613.30615234375 831.1270937376385 622.447216796875H832.1425526293018Q819.9570459293413 631.58828125 806.7560803377175 637.68232421875Q793.5551147460938 643.7763671875 781.4743707830256 646.8066461736505Q768.3868981563684 650.8470181551847 754.7960611979167 652.36215764826Q741.205224239465 653.8772971413352 727.1110229492188 654.8873901367188L605.1110229492188 652.8873901367188L580.444091796875 655.8873901367188L568.0791430664062 661.5701817103795Q560.4699438476563 667.2529732840402 556.6653442382812 675.7771606445312L549.7763671875 701.3330688476562L543.7763671875 794.4244417173672L539.7763671875 814.444091796875L531.6067141415028 833.9011362711589L518.3310279417574 852.334125773112Q501.991721849763 869.7430603027344 475.4403494502721 874.863335164388L448.88897705078125 875.8873901367188L418.72600758403814 870.8621576482599Q390.57390274841123 864.8318786621094 364.4326625439005 854.7814136851918Q293.0469681392751 827.6451582475142 237.7481907835794 774.8802171186967Q182.44941342788368 722.1152759898793 151.28101164558245 651.2594979026101Q120.11260986328125 580.403719815341 120.11260986328125 500.0ZM179.88739013671875 499.96734619140625Q179.88739013671875 568.555908203125 206.2155882007014 627.7110236600699Q232.5437862646841 686.8661391170149 279.2390809442005 731.6053020676455Q325.9343756237169 776.3444650182762 385.545390108206 799.2111483041541L431.2471678796476 812.1357953787808L452.11102294921875 816.1126098632812L465.51890055338544 815.1866251627604L472.22283935546875 813.3346557617188L478.33465576171875 806.2228393554688L484.11260986328125 785.7779541015625L487.11260986328125 733.7779541015625L490.11260986328125 692.7779541015625L494.1894719050481 671.4213745117188L502.3431959885817 651.0817749023438Q506.42005803034857 641.928955078125 513.5545666034405 631.7591552734375Q520.6890751765325 621.58935546875 531.9004457913912 613.453515625L543.11181640625 606.3346557617188L566.4200007997711 598.1980121319111L601.8889770507812 593.1126098632812L724.7870679257521 595.1126098632812Q735.7779541015625 594.1126098632812 746.1268395317925 592.6459167480468Q756.4757249620226 591.1792236328125 765.3461981879341 589.2236328125Q775.2022795500578 586.2902465820313 782.1015365035446 582.8679626464843Q789.0007934570312 579.4456787109375 793.8527628580729 575.5396212064303Q799.675126139323 570.6570493257963 804.0418986002604 564.7979630690354Q808.4086710611979 558.9388768122747 812.2902465820313 550.1502474271334L818.1126098632812 528.6669311523438L820.1126098632812 499.85038787754854Q820.1126098632812 433.2742361737113 795.2571978901708 375.6411496241208Q770.4017859170604 318.00806307453036 726.169876216918 273.7895742563101Q681.9379665167756 229.57108543808988 624.2873875817587 204.72923778740432Q566.6368086467418 179.88739013671875 500.0404502218084 179.88739013671875Q433.444091796875 179.88739013671875 375.7723714192708 204.73831840183425Q318.10065104166665 229.58924666694975 273.85252075195314 273.8238989788553Q229.6043904622396 318.0585512907609 204.74589029947919 375.7127048658288Q179.88739013671875 433.36685844089675 179.88739013671875 499.96734619140625ZM546.7779541015625 245.11260986328125Q558.5921223958334 244.11260986328125 568.2582600911459 252.61659561960323Q577.9243977864584 261.1205813759252 577.9243977864584 272.8597604851974Q578.9984130859375 285.6661376953125 570.9741380479601 294.74284023708765Q562.9498630099827 303.8195427788628 550.1110229492188 304.88739013671875L554.8873901367188 300.0L550.0 295.11260986328125L545.1126098632812 300.0L549.8889770507812 304.88739013671875Q537.0691152719351 303.8207763671875 529.0908625676082 294.7545593261719Q521.1126098632812 285.6883422851563 522.1126098632812 272.88897705078125Q522.1126098632812 261.137437086839 531.767262425916 252.62502347506012Q541.4219149885506 244.11260986328125 553.2220458984375 245.11260986328125Q574.9214904785156 246.14813720703125 589.9044403076172 262.19881103515627Q604.8873901367188 278.2494848632813 604.8873901367188 299.99555908203126Q604.8873901367188 322.77716064453125 588.8367163085937 338.832275390625Q572.7860424804687 354.88739013671875 550.0044409179687 354.88739013671875Q527.2228393554688 354.88739013671875 511.167724609375 338.82927477037583Q495.11260986328125 322.7711594040329 495.11260986328125 299.97899565825594Q495.11260986328125 278.22283935546875 510.09555969238284 262.18507194519043Q525.0785095214844 246.1473045349121 546.7779541015625 245.11260986328125ZM696.7779541015625 395.11260986328125Q708.5921223958334 394.11260986328125 718.2582600911459 402.61659561960323Q727.9243977864584 411.1205813759252 727.9243977864584 422.8597604851974Q728.9984130859375 435.6661376953125 720.9741380479601 444.74284023708765Q712.9498630099827 453.8195427788628 700.1110229492188 454.88739013671875L704.8873901367188 450.0L700.0 445.11260986328125L695.1126098632812 450.0L699.8889770507812 454.88739013671875Q687.0691152719351 453.8207763671875 679.0908625676082 444.7545593261719Q671.1126098632812 435.6883422851563 672.1126098632812 422.88897705078125Q672.1126098632812 411.137437086839 681.767262425916 402.6250234750601Q691.4219149885506 394.11260986328125 703.2220458984375 395.11260986328125Q724.9214904785156 396.14813720703125 739.9044403076172 412.19881103515627Q754.8873901367188 428.2494848632813 754.8873901367188 449.99555908203126Q754.8873901367188 472.77716064453125 738.8367163085937 488.832275390625Q722.7860424804687 504.88739013671875 700.0044409179687 504.88739013671875Q677.2228393554688 504.88739013671875 661.167724609375 488.82927477037583Q645.1126098632812 472.7711594040329 645.1126098632812 449.97899565825594Q645.1126098632812 428.22283935546875 660.0955596923828 412.18507194519043Q675.0785095214844 396.1473045349121 696.7779541015625 395.11260986328125ZM346.7779541015625 295.11260986328125Q358.5921223958333 294.11260986328125 368.2582600911458 302.61659561960323Q377.9243977864583 311.1205813759252 377.9243977864583 322.8597604851974Q378.9984130859375 335.6661376953125 370.9741380479601 344.74284023708765Q362.94986300998266 353.8195427788628 350.11102294921875 354.88739013671875L354.88739013671875 350.0L350.0 345.11260986328125L345.11260986328125 350.0L349.88897705078125 354.88739013671875Q337.0691152719351 353.8207763671875 329.09086256760816 344.7545593261719Q321.11260986328125 335.6883422851563 322.11260986328125 322.88897705078125Q322.11260986328125 311.137437086839 331.767262425916 302.6250234750601Q341.42191498855067 294.11260986328125 353.2220458984375 295.11260986328125Q374.92149047851564 296.14813720703125 389.90444030761716 312.19881103515627Q404.88739013671875 328.2494848632813 404.88739013671875 349.99555908203126Q404.88739013671875 372.77716064453125 388.83671630859374 388.832275390625Q372.7860424804687 404.88739013671875 350.00444091796874 404.88739013671875Q327.22283935546875 404.88739013671875 311.167724609375 388.82927477037583Q295.11260986328125 372.7711594040329 295.11260986328125 349.97899565825594Q295.11260986328125 328.22283935546875 310.09555969238284 312.18507194519043Q325.07850952148436 296.1473045349121 346.7779541015625 295.11260986328125ZM296.7779541015625 495.11260986328125Q308.5921223958333 494.11260986328125 318.2582600911458 502.61659561960323Q327.9243977864583 511.12058137592516 327.9243977864583 522.8597604851973Q328.9984130859375 535.6661376953125 320.9741380479601 544.7428402370876Q312.94986300998266 553.8195427788628 300.11102294921875 554.8873901367188L304.88739013671875 550.0L300.0 545.1126098632812L295.11260986328125 550.0L299.88897705078125 554.8873901367188Q287.0691152719351 553.8207763671875 279.09086256760816 544.7545593261718Q271.11260986328125 535.6883422851563 272.11260986328125 522.8889770507812Q272.11260986328125 511.13743708683893 281.767262425916 502.62502347506006Q291.42191498855067 494.11260986328125 303.2220458984375 495.11260986328125Q324.92149047851564 496.14813720703125 339.90444030761716 512.1988110351563Q354.88739013671875 528.2494848632812 354.88739013671875 549.9955590820313Q354.88739013671875 572.7771606445312 338.83671630859374 588.832275390625Q322.7860424804687 604.8873901367188 300.00444091796874 604.8873901367188Q277.22283935546875 604.8873901367188 261.167724609375 588.8292747703758Q245.11260986328125 572.7711594040329 245.11260986328125 549.9789956582559Q245.11260986328125 528.2228393554688 260.09555969238284 512.1850719451904Q275.07850952148436 496.1473045349121 296.7779541015625 495.11260986328125Z`})})}function Rz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,H.jsx)(`path`,{d:`M444.667724609375 124.55670166015625Q460.0378011067708 109.29024658203127 480.0189005533854 104.20142822265626Q500.0 99.11260986328125 519.9810994466145 104.20142822265626Q539.9621988932291 109.29024658203127 555.332275390625 124.55670166015625L830.332275390625 388.667724609375Q854.8873901367188 412.21490914481024 854.8873901367188 446.0V775.0Q854.8873901367188 796.5081434983474 844.133318387545 814.9436950683594Q833.3792466383713 833.3792466383713 815.4557937230819 844.133318387545Q797.5323408077925 854.8873901367188 775.0 854.8873901367188H600.0Q587.1911185128348 854.8873901367188 578.651864188058 846.348135811942Q570.1126098632812 837.8088814871652 570.1126098632812 825.0V600.0Q570.1126098632812 591.7721141468395 564.1702478582208 585.8297521417792Q558.2278858531605 579.8873901367188 550.0 579.8873901367188H450.0Q441.7721141468395 579.8873901367188 435.8297521417791 585.8297521417792Q429.88739013671875 591.7721141468395 429.88739013671875 600.0V825.0Q429.88739013671875 837.8088814871652 421.348135811942 846.348135811942Q412.8088814871652 854.8873901367188 400.0 854.8873901367188H225.0Q202.46765919220752 854.8873901367188 184.54420627691806 844.133318387545Q166.6207533616286 833.3792466383713 155.86668161245493 814.9436950683594Q145.11260986328125 796.5081434983474 145.11260986328125 775.0V446.0Q145.11260986328125 412.21490914481024 169.667724609375 388.667724609375ZM486.332275390625 167.332275390625 211.332275390625 432.332275390625Q204.88739013671875 437.79936523437505 204.88739013671875 446.0V775.0Q204.88739013671875 783.2278858531605 210.82975214177912 789.1702478582208Q216.7721141468395 795.1126098632812 225.0 795.1126098632812H400.0Q387.1911185128348 795.1126098632812 378.651864188058 803.651864188058Q370.11260986328125 812.1911185128348 370.11260986328125 825.0V600.0Q370.11260986328125 577.4676591922075 380.86668161245495 559.5442062769181Q391.6207533616286 541.6207533616287 409.5442062769181 530.866681612455Q427.4676591922075 520.1126098632812 450.0 520.1126098632812H550.0Q572.5323408077925 520.1126098632812 590.4557937230819 530.866681612455Q608.3792466383713 541.6207533616287 619.133318387545 559.5442062769181Q629.8873901367188 577.4676591922075 629.8873901367188 600.0V825.0Q629.8873901367188 812.1911185128348 621.348135811942 803.651864188058Q612.8088814871652 795.1126098632812 600.0 795.1126098632812H775.0Q783.2278858531605 795.1126098632812 789.1702478582208 789.1702478582208Q795.1126098632812 783.2278858531605 795.1126098632812 775.0V446.0Q795.1126098632812 437.79936523437505 788.7787475585938 432.332275390625L513.667724609375 167.332275390625Q508.19508361816406 161.88739013671875 499.98612213134766 161.88739013671875Q491.77716064453125 161.88739013671875 486.332275390625 167.332275390625Z`})})}function zz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,H.jsx)(`path`,{d:`M470.11260986328125 725.0H529.8873901367188V875.0Q529.8873901367188 887.8088814871652 521.348135811942 896.348135811942Q512.8088814871652 904.8873901367188 500.0 904.8873901367188H325.0Q312.1911185128348 904.8873901367188 303.651864188058 896.3544799804688Q295.11260986328125 887.8215698242187 295.11260986328125 875.0222045898438Q295.11260986328125 862.2228393554688 303.651864188058 853.667724609375Q312.1911185128348 845.1126098632812 325.0 845.1126098632812H470.11260986328125ZM675.0 845.1126098632812Q687.7771606445312 845.1126098632812 696.332275390625 853.6455200195312Q704.8873901367188 862.1784301757813 704.8873901367188 874.9777954101562Q704.8873901367188 887.7771606445312 696.348135811942 896.332275390625Q687.8088814871652 904.8873901367188 675.0 904.8873901367188H500.0V845.1126098632812ZM654.8873901367188 225.0V450.0Q654.8873901367188 492.5181070963542 634.1306139823719 527.9498630099827Q613.3738378280249 563.3816189236111 577.9354395157252 584.1345045301649Q542.4970412034255 604.8873901367188 499.9709632286659 604.8873901367188Q457.44488525390625 604.8873901367188 422.0247984190245 584.1345045301649Q386.60471158414276 563.3816189236111 365.858660723712 527.9498630099827Q345.11260986328125 492.5181070963542 345.11260986328125 450.0V225.0Q345.11260986328125 182.48189290364587 365.86938601762824 147.0501369900174Q386.6261621719752 111.61838107638891 422.06456048427486 90.86549546983508Q457.50295879657455 70.11260986328125 500.0290367713341 70.11260986328125Q542.5551147460938 70.11260986328125 577.9752015809755 90.86549546983508Q613.3952884158573 111.61838107638891 634.141339276288 147.0501369900174Q654.8873901367188 182.48189290364587 654.8873901367188 225.0ZM595.1126098632812 225.0Q595.1126098632812 198.52535601743716 582.3686789235761 176.95342388349707Q569.624747983871 155.38149174955697 548.05809562437 142.63444094313786Q526.491443264869 129.88739013671875 500.02327900548136 129.88739013671875Q473.55511474609375 129.88739013671875 451.97382986886157 142.63444094313786Q430.39254499162945 155.38149174955697 417.63996756417407 176.95342388349707Q404.88739013671875 198.52535601743716 404.88739013671875 225.0V450.0Q404.88739013671875 476.47464398256284 417.6313210764239 498.04657611650293Q430.375252016129 519.618508250443 451.94190437563003 532.3655590568621Q473.50855673513104 545.1126098632812 499.97672099451864 545.1126098632812Q526.4448852539062 545.1126098632812 548.0261701311383 532.3655590568621Q569.6074550083705 519.618508250443 582.3600324358258 498.04657611650293Q595.1126098632812 476.47464398256284 595.1126098632812 450.0ZM195.11260986328125 425.0Q195.11260986328125 412.1911185128348 203.64552001953126 403.651864188058Q212.17843017578124 395.11260986328125 224.97779541015626 395.11260986328125Q237.77716064453125 395.11260986328125 246.332275390625 403.651864188058Q254.88739013671875 412.1911185128348 254.88739013671875 425.0V449.8265266418457Q254.88739013671875 500.47264099121094 273.74581724845325 545.1603889465332Q292.6042443601877 589.8481369018555 326.3509034022389 623.6122131347656Q360.0975624442901 657.3762893676758 404.76225823524015 676.2444496154785Q449.42695402619023 695.1126098632812 500.04694258926696 695.1126098632812Q550.6669311523438 695.1126098632812 595.3100716727121 676.2444496154785Q639.9532121930804 657.3762893676758 673.683585030692 623.6122131347656Q707.4139578683036 589.8481369018555 726.2632838657923 545.1603889465332Q745.1126098632812 500.47264099121094 745.1126098632812 449.8265266418457V425.0Q745.1126098632812 412.1911185128348 753.6455200195312 403.651864188058Q762.1784301757813 395.11260986328125 774.9777954101562 395.11260986328125Q787.7771606445312 395.11260986328125 796.332275390625 403.651864188058Q804.8873901367188 412.1911185128348 804.8873901367188 425.0V450.14385595554256Q804.8873901367188 513.5063729635099 781.244819682804 568.8228560657036Q757.6022492288891 624.1393391678973 715.8504758741035 665.878140054098Q674.0987025193178 707.6169409402987 618.765026988879 731.2521655385087Q563.4313514584401 754.8873901367188 500.0491413053919 754.8873901367188Q436.66693115234375 754.8873901367188 381.3107325236002 731.2521655385087Q325.95453389485675 707.6169409402987 284.18576583862307 665.878140054098Q242.41699778238933 624.1393391678973 218.7648038228353 568.8228560657036Q195.11260986328125 513.5063729635099 195.11260986328125 450.14385595554256Z`})})}function Bz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,H.jsx)(`path`,{d:`M470.11260986328125 225.0Q470.11260986328125 212.1911185128348 478.64552001953126 203.65186418805803Q487.1784301757813 195.11260986328125 499.97779541015626 195.11260986328125Q512.7771606445312 195.11260986328125 521.332275390625 203.65186418805803Q529.8873901367188 212.1911185128348 529.8873901367188 225.0V775.0Q529.8873901367188 787.8088814871652 521.3544799804688 796.348135811942Q512.8215698242187 804.8873901367188 500.02220458984374 804.8873901367188Q487.22283935546875 804.8873901367188 478.667724609375 796.348135811942Q470.11260986328125 787.8088814871652 470.11260986328125 775.0ZM775.0 470.11260986328125Q787.8088814871652 470.11260986328125 796.348135811942 478.64552001953126Q804.8873901367188 487.1784301757813 804.8873901367188 499.97779541015626Q804.8873901367188 512.7771606445312 796.348135811942 521.332275390625Q787.8088814871652 529.8873901367188 775.0 529.8873901367188H225.0Q212.19111851283483 529.8873901367188 203.65186418805803 521.3544799804688Q195.11260986328125 512.8215698242187 195.11260986328125 500.02220458984374Q195.11260986328125 487.22283935546875 203.65186418805803 478.667724609375Q212.19111851283483 470.11260986328125 225.0 470.11260986328125Z`})})}function Vz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,H.jsx)(`path`,{d:`M225.0 304.88739013671875Q212.19111851283483 304.88739013671875 203.65186418805803 296.35447998046874Q195.11260986328125 287.8215698242187 195.11260986328125 275.0222045898438Q195.11260986328125 262.22283935546875 203.65186418805803 253.667724609375Q212.19111851283483 245.11260986328125 225.0 245.11260986328125H775.0Q787.8088814871652 245.11260986328125 796.348135811942 253.64552001953126Q804.8873901367188 262.1784301757813 804.8873901367188 274.9777954101562Q804.8873901367188 287.77716064453125 796.348135811942 296.332275390625Q787.8088814871652 304.88739013671875 775.0 304.88739013671875ZM300.0 154.88739013671875Q287.1911185128348 154.88739013671875 278.651864188058 146.35447998046874Q270.11260986328125 137.82156982421873 270.11260986328125 125.0222045898438Q270.11260986328125 112.22283935546875 278.651864188058 103.667724609375Q287.1911185128348 95.11260986328125 300.0 95.11260986328125H700.0Q712.8088814871652 95.11260986328125 721.348135811942 103.64552001953126Q729.8873901367188 112.17843017578127 729.8873901367188 124.9777954101562Q729.8873901367188 137.77716064453125 721.348135811942 146.332275390625Q712.8088814871652 154.88739013671875 700.0 154.88739013671875ZM209.0 395.11260986328125H791.0Q815.588277445211 395.11260986328125 835.0539970893365 408.4298182896205Q854.5197167334619 421.7470267159598 864.2035534350903 442.7472400036487Q873.8873901367188 463.7474532913376 869.8873901367188 488.33306884765625L811.7763671875 838.3330688476562Q806.6610186688312 867.0026226337139 784.1534851866884 885.9450063852164Q761.6459517045455 904.8873901367188 733.0 904.8873901367188H267.0Q238.35404829545453 904.8873901367188 215.84651481331167 885.9450063852164Q193.33898133116884 867.0026226337139 188.2236328125 838.3330688476562L130.11260986328125 488.33306884765625Q126.11260986328125 463.7474532913376 135.7964465649097 442.7472400036487Q145.48028326653815 421.7470267159598 164.94600291066354 408.4298182896205Q184.41172255478895 395.11260986328125 209.0 395.11260986328125ZM209.0 454.88739013671875Q199.85790460759944 454.88739013671875 193.8726473721591 462.2041719876803Q187.88739013671875 469.52095383864184 188.88739013671875 478.66693115234375L247.7763671875 828.6669311523438Q248.69177827380952 835.9761216905382 254.18424479166666 840.5443657769097Q259.6767113095238 845.1126098632812 267.0 845.1126098632812H733.0Q740.3232886904761 845.1126098632812 745.8157552083333 840.5443657769097Q751.3082217261905 835.9761216905382 752.2236328125 828.6669311523438L811.1126098632812 478.66693115234375Q812.1126098632812 469.52095383864184 806.127352627841 462.2041719876803Q800.1420953924006 454.88739013671875 791.0 454.88739013671875Z`})})}function Hz(e){return(0,H.jsxs)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:`1`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,...e,children:[(0,H.jsx)(`circle`,{cx:`8`,cy:`8`,r:`5.5`}),(0,H.jsx)(`line`,{x1:`8`,y1:`8`,x2:`10`,y2:`9`}),(0,H.jsx)(`line`,{x1:`8`,y1:`8`,x2:`8`,y2:`5.5`})]})}function Uz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,H.jsx)(`path`,{d:`M754.8873901367188 425.0584777366114Q754.8873901367188 490.444091796875 729.7390770366173 551.276105293303Q704.5907639365159 612.108118789731 658.3178678323294 658.3605588035439Q612.0449717281429 704.6129988173568 551.1860540258975 729.7501944770378Q490.3271363236522 754.8873901367188 424.9415222633886 754.8873901367188Q359.555908203125 754.8873901367188 298.7238947066971 729.7390770366173Q237.89188121026913 704.5907639365159 191.63944119645615 658.3178678323295Q145.3870011826432 612.0449717281429 120.24980552296222 551.1860540258975Q95.11260986328125 490.3271363236522 95.11260986328125 424.9415222633886Q95.11260986328125 359.555908203125 120.26092296338264 298.7238947066971Q145.40923606348403 237.89188121026916 191.68213216767057 191.63944119645612Q237.95502827185712 145.3870011826432 298.81394597410247 120.24980552296222Q359.6728636763478 95.11260986328125 425.0584777366114 95.11260986328125Q490.444091796875 95.11260986328125 551.2761052933029 120.26092296338265Q612.1081187897308 145.40923606348406 658.3605588035439 191.6821321676706Q704.6129988173568 237.95502827185715 729.7501944770378 298.81394597410247Q754.8873901367188 359.6728636763478 754.8873901367188 425.0584777366114ZM695.1126098632812 424.96526275821986Q695.1126098632812 371.33306884765625 674.2556455647286 321.6895645561568Q653.3986812661761 272.0460602646574 615.6575077735573 234.31699700311788Q577.9163342809385 196.58793374157824 528.256895474861 175.7376619391485Q478.59745666878354 154.88739013671875 424.9652627582199 154.88739013671875Q371.33306884765625 154.88739013671875 321.6895645561568 175.7443544352713Q272.0460602646574 196.60131873382386 234.31699700311782 234.3424922264427Q196.58793374157827 272.0836657190615 175.7376619391485 321.74310452513896Q154.88739013671875 371.4025433312164 154.88739013671875 425.03473724178014Q154.88739013671875 478.66693115234375 175.74435443527128 528.3104354438432Q196.6013187338238 577.9539397353426 234.3424922264427 615.6830029968821Q272.0836657190615 653.4120662584218 321.74310452513896 674.2623380608516Q371.40254333121646 695.1126098632812 425.0347372417801 695.1126098632812Q478.66693115234375 695.1126098632812 528.3104354438432 674.2556455647288Q577.9539397353426 653.3986812661763 615.6830029968821 615.6575077735573Q653.4120662584218 577.9163342809385 674.2623380608516 528.256895474861Q695.1126098632812 478.5974566687836 695.1126098632812 424.96526275821986ZM616.667724609375 658.332275390625 658.332275390625 616.667724609375 896.332275390625 853.667724609375Q904.8873901367188 862.1950836181641 904.8873901367188 874.9861221313477Q904.8873901367188 887.7771606445312 896.3544799804688 896.332275390625Q887.8215698242187 904.8873901367188 875.0222045898438 904.8873901367188Q862.2228393554688 904.8873901367188 853.667724609375 896.332275390625Z`})})}function Wz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,H.jsx)(`path`,{d:`M295.11260986328125 175.0H354.88739013671875V825.0H295.11260986328125ZM175.0 145.11260986328125H825.0Q847.5323408077925 145.11260986328125 865.4557937230819 155.86668161245495Q883.3792466383713 166.62075336162866 894.133318387545 184.5442062769181Q904.8873901367188 202.46765919220752 904.8873901367188 225.0V775.0Q904.8873901367188 797.5323408077925 894.133318387545 815.4557937230819Q883.3792466383713 833.3792466383713 865.4557937230819 844.133318387545Q847.5323408077925 854.8873901367188 825.0 854.8873901367188H175.0Q152.46765919220752 854.8873901367188 134.54420627691806 844.133318387545Q116.6207533616286 833.3792466383713 105.86668161245493 815.4557937230819Q95.11260986328125 797.5323408077925 95.11260986328125 775.0V225.0Q95.11260986328125 202.46765919220752 105.86668161245493 184.5442062769181Q116.6207533616286 166.62075336162866 134.54420627691806 155.86668161245495Q152.46765919220752 145.11260986328125 175.0 145.11260986328125ZM175.0 204.88739013671875Q166.7721141468395 204.88739013671875 160.82975214177912 210.82975214177912Q154.88739013671875 216.7721141468395 154.88739013671875 225.0V775.0Q154.88739013671875 783.2278858531605 160.82975214177912 789.1702478582208Q166.7721141468395 795.1126098632812 175.0 795.1126098632812H825.0Q833.2278858531605 795.1126098632812 839.1702478582208 789.1702478582208Q845.1126098632812 783.2278858531605 845.1126098632812 775.0V225.0Q845.1126098632812 216.7721141468395 839.1702478582208 210.82975214177912Q833.2278858531605 204.88739013671875 825.0 204.88739013671875Z`})})}var Gz=`"Anthropic Sans", ui-sans-serif, system-ui, sans-serif`,Kz={light:{"--shell-surface":`#faf9f5`,"--shell-sidebar":`#fbfbf9`,"--shell-card":`#ffffff`,"--shell-panel":`#ffffff`,"--shell-text":`#141413`,"--shell-text-secondary":`#3d3d3a`,"--shell-text-tertiary":`#73726c`,"--shell-nav-text":`#52514e`,"--shell-icon-muted":`#898781`,"--shell-segment-bg":`#edece8`,"--shell-segment-active":`#f9f9f7`,"--shell-btn-bg":`#f3f3f3`,"--shell-border":`rgba(31, 30, 29, 0.08)`,"--shell-composer-border":`rgba(31, 30, 29, 0.08)`,"--shell-accent":`#d97757`},dark:{"--shell-surface":`#1a1a19`,"--shell-sidebar":`#1a1a19`,"--shell-card":`#383835`,"--shell-panel":`#383835`,"--shell-text":`#faf9f5`,"--shell-text-secondary":`#c2c0b6`,"--shell-text-tertiary":`#9c9a92`,"--shell-nav-text":`#c2c0b6`,"--shell-icon-muted":`#9c9a92`,"--shell-segment-bg":`#3a3a38`,"--shell-segment-active":`#4a4a47`,"--shell-btn-bg":`#3a3a38`,"--shell-border":`rgba(222, 220, 209, 0.1)`,"--shell-composer-border":`transparent`,"--shell-accent":`#d97757`}};function qz({className:e}){return(0,H.jsx)(`div`,{className:IP(`rounded-md bg-[color-mix(in_oklab,var(--shell-text)_10%,transparent)] motion-safe:animate-pulse`,e)})}function Jz(){return(0,H.jsxs)(`div`,{"aria-hidden":!0,className:`flex h-12 shrink-0 cursor-not-allowed items-center gap-2.5 px-3`,children:[(0,H.jsx)(Wz,{className:`size-4.5 text-[#7b7974]`}),(0,H.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,H.jsx)(qz,{className:`h-3.5 w-24`}),(0,H.jsx)(Mz,{className:`size-2.5 text-(--shell-text-tertiary)`})]}),(0,H.jsx)(`div`,{className:`ml-auto flex h-7 items-center rounded-[7px] bg-(--shell-btn-bg) px-3 text-(--shell-text) text-sm`,children:`Share`})]})}function Yz(){return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{className:`flex min-h-[100px] flex-col justify-between rounded-[20px] bg-(--shell-card) p-3 shadow-[0_4px_20px_rgba(0,0,0,0.05)]`,children:[(0,H.jsx)(`span`,{className:`px-1.5 pt-1 text-[15px] text-(--shell-text-tertiary)`,children:`Write a message...`}),(0,H.jsxs)(`div`,{className:`flex items-center px-1 pb-0.5 text-(--shell-text-secondary)`,children:[(0,H.jsx)(Bz,{className:`size-5`}),(0,H.jsx)(`div`,{className:`flex-1`}),(0,H.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,H.jsx)(qz,{className:`h-3.5 w-14`}),(0,H.jsx)(qz,{className:`h-3.5 w-9`}),(0,H.jsx)(Mz,{className:`size-3`})]}),(0,H.jsx)(`div`,{className:`flex-1`}),(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(zz,{className:`size-5`}),(0,H.jsx)(`div`,{className:`flex size-8 items-center justify-center rounded-lg bg-(--shell-accent) text-white`,children:(0,H.jsx)(Wr,{className:`size-4.5`})})]})]})]}),(0,H.jsx)(`div`,{className:`pt-1.5 pb-1 text-center text-(--shell-text-tertiary) text-xs`,children:`Claude can make mistakes. Please double-check responses.`})]})}function Xz(){return(0,H.jsxs)(`div`,{className:`flex min-h-[100px] flex-col justify-between rounded-[20px] border border-(--shell-composer-border) bg-(--shell-card) p-4 shadow-[0_4px_16px_rgba(0,0,0,0.04)]`,children:[(0,H.jsx)(`span`,{className:`text-(--shell-text-tertiary)`,children:`Reply to Claude...`}),(0,H.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,H.jsx)(Bz,{className:`size-5 text-(--shell-text-secondary)`}),(0,H.jsxs)(`div`,{className:`flex items-center gap-4 text-(--shell-text-secondary)`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,H.jsx)(qz,{className:`h-3.5 w-14`}),(0,H.jsx)(qz,{className:`h-3.5 w-9`}),(0,H.jsx)(Mz,{className:`size-3`})]}),(0,H.jsx)(zz,{className:`size-5`}),(0,H.jsx)(Nz,{className:`size-5`})]})]})]})}var Zz=[`w-[80%]`,`w-[65%]`,`w-[74%]`,`w-[58%]`,`w-[70%]`,`w-[62%]`];function Qz({children:e}){let t=ds(e=>e.theme),n=ds(e=>e.displayMode),r=ds(e=>e.setPreference),i=ms(),a=n===`fullscreen`,[o,s]=(0,b.useState)(!1),c=(0,b.useRef)(null),l=(0,b.useRef)(null);return(0,b.useEffect)(()=>{let e=c.current,t=l.current;if(!e||!t)return;let n=()=>{e.scrollTop=e.scrollHeight};n();let r=new ResizeObserver(n);r.observe(t);let i=()=>r.disconnect(),a=[`wheel`,`touchstart`,`pointerdown`];for(let t of a)e.addEventListener(t,i,{once:!0,passive:!0});return()=>{r.disconnect();for(let t of a)e.removeEventListener(t,i)}},[]),(0,H.jsxs)(`div`,{className:`@container/shell relative isolate flex h-full w-full overflow-hidden bg-(--shell-surface) text-(--shell-text)`,style:{fontFamily:Gz,...Kz[t]},children:[(0,H.jsx)(`style`,{children:uz}),(0,H.jsx)(`aside`,{"aria-hidden":!0,className:IP(`h-full w-[288px] shrink-0 cursor-not-allowed border-(--shell-border) border-r bg-(--shell-sidebar) @max-[640px]/shell:hidden`,(o||i)&&`hidden`),children:(0,H.jsxs)(`div`,{className:`flex h-full flex-col px-2 pb-2`,children:[(0,H.jsxs)(`div`,{className:`flex h-11 shrink-0 items-center justify-between px-2`,children:[(0,H.jsx)(Pz,{className:`h-5`}),(0,H.jsxs)(`div`,{className:`flex items-center gap-1 text-[#7b7974]`,children:[(0,H.jsx)(`button`,{type:`button`,"aria-label":`Collapse sidebar`,onClick:()=>s(!0),className:`flex size-7 cursor-pointer items-center justify-center rounded-md transition-colors hover:bg-[color-mix(in_oklab,var(--shell-text)_5%,transparent)]`,children:(0,H.jsx)(Wz,{className:`size-4`})}),(0,H.jsx)(`div`,{className:`flex size-7 items-center justify-center`,children:(0,H.jsx)(Uz,{className:`size-4`})})]})]}),(0,H.jsxs)(`div`,{className:`mb-2 flex h-8 shrink-0 rounded-lg bg-(--shell-segment-bg) p-px`,children:[(0,H.jsxs)(`div`,{className:`flex flex-[1.1] items-center justify-center gap-1.5 rounded-[7px] bg-(--shell-segment-active) text-(--shell-text) text-sm shadow-[inset_0_0_0_0.5px_rgba(11,11,11,0.1),0_1px_2px_rgba(0,0,0,0.06),0_2px_6px_-1px_rgba(0,0,0,0.05)]`,children:[(0,H.jsx)(Rz,{className:`size-4`}),(0,H.jsx)(`span`,{children:`Home`})]}),(0,H.jsxs)(`div`,{className:`flex flex-1 items-center justify-center gap-1.5 text-(--shell-text-tertiary) text-sm`,children:[(0,H.jsx)(Fz,{className:`size-4`}),(0,H.jsx)(`span`,{children:`Code`})]})]}),(0,H.jsxs)(`div`,{className:`flex h-8 shrink-0 items-center gap-2 rounded-lg px-1.5 text-(--shell-nav-text) text-sm`,children:[(0,H.jsx)(Bz,{className:`size-4`}),(0,H.jsx)(`span`,{children:`New`})]}),[{icon:jz,label:`Chats and tasks`},{icon:Vz,label:`Projects`},{icon:kz,label:`Artifacts`},{icon:Hz,label:`Scheduled`},{icon:Iz,label:`Customize`}].map(({icon:e,label:t})=>(0,H.jsxs)(`div`,{className:`flex h-8 shrink-0 items-center gap-2 px-1.5 text-(--shell-nav-text) text-sm`,children:[(0,H.jsx)(e,{className:`size-5`}),(0,H.jsx)(`span`,{children:t})]},t)),(0,H.jsx)(`div`,{className:`mt-5 mb-1 px-1.5 text-(--shell-text-tertiary) text-xs`,children:`Pinned`}),(0,H.jsxs)(`div`,{className:`flex h-8 shrink-0 items-center gap-2 px-1.5`,children:[(0,H.jsx)(Az,{className:`size-5 shrink-0 text-(--shell-icon-muted)`}),(0,H.jsx)(qz,{className:`h-3.5 w-32`})]}),(0,H.jsxs)(`div`,{className:`mt-5 mb-1 flex items-center justify-between px-1.5`,children:[(0,H.jsx)(`span`,{className:`text-(--shell-text-tertiary) text-xs`,children:`Recents`}),(0,H.jsx)(Ci,{className:`size-3.5 text-(--shell-text-tertiary)`})]}),Zz.map(e=>(0,H.jsxs)(`div`,{className:`flex h-8 shrink-0 items-center gap-2 px-1.5`,children:[(0,H.jsx)(Az,{className:`size-5 shrink-0 text-(--shell-icon-muted)`}),(0,H.jsx)(qz,{className:IP(`h-3.5`,e)})]},e)),(0,H.jsxs)(`div`,{className:`mt-auto flex shrink-0 flex-col`,children:[(0,H.jsxs)(`div`,{className:`flex h-10 items-center gap-2.5 border-(--shell-border) border-t px-1.5 text-(--shell-nav-text) text-sm`,children:[(0,H.jsx)(Lz,{className:`size-5`}),(0,H.jsx)(`span`,{children:`Design`})]}),(0,H.jsxs)(`div`,{className:`flex h-11 items-center gap-2.5 border-(--shell-border) border-t px-1.5`,children:[(0,H.jsx)(qz,{className:`size-7 rounded-full`}),(0,H.jsx)(qz,{className:`h-3.5 w-24`})]})]})]})}),(0,H.jsxs)(`div`,{className:`relative flex h-full min-w-0 flex-1 flex-col`,children:[i&&!a&&(0,H.jsx)(Jz,{}),o&&!i&&(0,H.jsx)(`button`,{type:`button`,"aria-label":`Expand sidebar`,onClick:()=>s(!1),className:`absolute top-2 left-2 z-40 flex size-8 cursor-pointer items-center justify-center rounded-md text-[#7b7974] transition-colors hover:bg-[color-mix(in_oklab,var(--shell-text)_5%,transparent)]`,children:(0,H.jsx)(Wz,{className:`size-4`})}),(0,H.jsx)(`div`,{ref:c,className:`min-h-0 flex-1 overflow-y-auto [container-type:size]`,children:(0,H.jsxs)(`div`,{ref:l,className:IP(`mx-auto flex w-full max-w-[720px] flex-col px-4 pt-6 pb-24`,a&&`h-full max-w-none px-5 pt-2 pb-4`,a&&o&&!i&&`pl-12`),children:[[[`w-[92%]`,`w-[80%]`,`w-[55%]`],[`w-[88%]`,`w-[76%]`,`w-[50%]`]].map((e,t)=>(0,H.jsxs)(`div`,{className:IP(`flex flex-col`,a&&`hidden`,t>0&&`mt-10`),children:[(0,H.jsx)(`div`,{className:`h-16 w-[55%] self-end rounded-xl bg-[color-mix(in_oklab,var(--shell-text)_5%,transparent)] motion-safe:animate-pulse`}),(0,H.jsx)(`div`,{className:`mt-6 flex flex-col gap-3`,children:e.map(e=>(0,H.jsx)(qz,{className:IP(`h-4`,e)},e))})]},e[0])),(0,H.jsx)(`div`,{className:IP(`mt-10 h-12 w-[45%] self-end rounded-xl bg-[color-mix(in_oklab,var(--shell-text)_5%,transparent)] motion-safe:animate-pulse`,a&&`hidden`)}),(0,H.jsx)(qz,{className:IP(`mt-6 h-4 w-40`,a&&`hidden`)}),(0,H.jsxs)(`div`,{className:IP(`relative mt-3 w-full`,!a&&!i&&`-mx-4 w-[calc(100%+2rem)]`,a&&`mt-0 flex min-h-0 flex-1 flex-col overflow-hidden rounded-2xl border border-(--shell-border) bg-(--shell-panel)`),children:[a?(0,H.jsxs)(`div`,{className:`flex h-14 shrink-0 items-center gap-2.5 border-(--shell-border) border-b px-4`,children:[(0,H.jsx)(`div`,{className:`flex size-7 items-center justify-center rounded-lg border border-(--shell-border) bg-(--shell-segment-active)`,children:(0,H.jsx)(qz,{className:`size-3.5 rounded`})}),(0,H.jsx)(qz,{className:`h-4 w-44`}),(0,H.jsx)(`button`,{type:`button`,"aria-label":`Exit fullscreen`,onClick:()=>r(`displayMode`,`inline`),className:`ml-auto flex size-8 cursor-pointer items-center justify-center rounded-lg bg-(--shell-btn-bg) text-(--shell-text) transition-colors hover:bg-[color-mix(in_oklab,var(--shell-text)_10%,transparent)]`,children:(0,H.jsx)(Tz,{className:`size-4.5`})})]}):null,(0,H.jsx)(`div`,{className:IP(`w-full`,a&&`min-h-0 flex-1`),children:e??(0,H.jsx)(qz,{className:`h-96 w-full rounded-2xl`})}),a&&!i?(0,H.jsx)(`div`,{className:`pointer-events-none absolute inset-x-0 bottom-4 mx-auto w-[min(680px,85%)]`,children:(0,H.jsxs)(`div`,{className:`flex min-h-[100px] flex-col justify-between rounded-[20px] border border-(--shell-composer-border) bg-(--shell-card) p-4 shadow-[0_4px_16px_rgba(0,0,0,0.08)]`,children:[(0,H.jsx)(`span`,{className:`text-(--shell-text-tertiary)`,children:`Write a message...`}),(0,H.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,H.jsx)(Bz,{className:`size-5 text-(--shell-text-secondary)`}),(0,H.jsxs)(`div`,{className:`flex items-center gap-4 text-(--shell-text-secondary)`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,H.jsx)(qz,{className:`h-3.5 w-14`}),(0,H.jsx)(qz,{className:`h-3.5 w-9`}),(0,H.jsx)(Mz,{className:`size-3`})]}),(0,H.jsx)(zz,{className:`size-5`}),(0,H.jsx)(Nz,{className:`size-5`})]})]})]})}):null]}),(0,H.jsxs)(`div`,{className:IP(`mt-6 flex flex-col gap-3`,a&&`hidden`),children:[(0,H.jsx)(qz,{className:`h-4 w-[95%]`}),(0,H.jsx)(qz,{className:`h-4 w-[60%]`})]})]})}),(0,H.jsx)(`div`,{className:IP(`w-full shrink-0 cursor-not-allowed`,i?`px-2 pb-1`:`px-4 pb-5`,a&&`hidden`),children:(0,H.jsx)(`div`,{className:`mx-auto w-full max-w-[768px]`,children:i?(0,H.jsx)(Yz,{}):(0,H.jsx)(Xz,{})})})]})]})}var $z=24,eB=44,tB={light:{backdrop:`#e8e8e6`,label:`#6f6f6f`},dark:{backdrop:`#111110`,label:`#8f8f8f`}},nB=({theme:e,children:t})=>{let n=(0,b.useRef)(null),[r,i]=(0,b.useState)(1);return(0,b.useLayoutEffect)(()=>{let e=n.current;if(!e)return;let t=()=>{let{width:t,height:n}=e.getBoundingClientRect();i(Math.min(1,(t-$z)/RP.width,(n-eB)/RP.height))};t();let r=new ResizeObserver(t);return r.observe(e),()=>r.disconnect()},[]),(0,H.jsxs)(`div`,{ref:n,className:`flex h-full min-h-0 w-full flex-col items-center justify-center overflow-hidden`,style:{backgroundColor:tB[e].backdrop},children:[(0,H.jsxs)(`div`,{className:`pb-1.5 font-mono text-xs`,style:{color:tB[e].label},children:[RP.width,` × `,RP.height]}),(0,H.jsx)(`div`,{style:{width:RP.width*r,height:RP.height*r},children:(0,H.jsx)(`div`,{className:`overflow-hidden shadow-[0_2px_16px_rgba(0,0,0,0.2)]`,style:{width:RP.width,height:RP.height,transform:`scale(${r})`,transformOrigin:`top left`},children:t})})]})},rB=()=>{let e=BO(),t=uO(e?.name??``),n=ds(e=>e.previewClient),r=ds(e=>e.theme),i=ms(),a=e?._meta?.ui?.resourceUri,o=!!(e&&t?.response&&a),s=(0,H.jsx)(n===`claude`?Qz:Oz,{children:o?(0,H.jsx)(b.Suspense,{fallback:null,children:(0,H.jsx)(vz,{})}):null});return(0,H.jsxs)(`div`,{className:`flex h-full min-h-0 w-full flex-col`,children:[(0,H.jsxs)(`div`,{className:`flex h-11 shrink-0 items-center gap-3 bg-primary px-3 text-primary-foreground`,children:[(0,H.jsx)(`span`,{className:`font-medium text-xs`,children:`Preview mode`}),(0,H.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,H.jsx)(oz,{variant:`preview`})})]}),(0,H.jsx)(`div`,{className:`min-h-0 flex-1`,children:i?(0,H.jsx)(nB,{theme:r,children:s}):s})]})},iB=function(e){return function(t,n){var r=(0,b.useRef)(!1);e(function(){return function(){r.current=!1}},[]),e(function(){if(!r.current)r.current=!0;else return t()},n)}},aB=function(e){return typeof e==`function`},oB=function(e){return typeof e==`string`},sB=function(e){return typeof e==`number`},cB=function(e){return e===void 0},lB=function(e){var t=(0,b.useRef)(e);t.current=(0,b.useMemo)(function(){return e},[e]);var n=(0,b.useRef)(void 0);return n.current||=function(){var e=[...arguments];return t.current.apply(this,e)},n.current},uB=iB(b.useEffect);function dB(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 fB(e){var t=(0,b.useRef)(e);return t.current=e,t}var pB=function(e){var t=fB(e);(0,b.useEffect)(function(){return function(){t.current()}},[])},mB=!!(typeof window<`u`&&window.document&&window.document.createElement);function hB(e,t){if(mB)return e?aB(e)?e():`current`in e?e.current:e:t}var gB=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 hB(e)});if(!i.current){i.current=!0,a.current=c,o.current=n,s.current=t();return}(c.length!==a.current.length||!dB(a.current,c)||!dB(o.current,n))&&((e=s.current)==null||e.call(s),a.current=c,o.current=n,s.current=t())}),pB(function(){var e;(e=s.current)==null||e.call(s),i.current=!1})}}(b.useEffect),_B=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}}}))()),vB=function(e,t){return e===void 0&&(e=[]),t===void 0&&(t=[]),(0,_B.default)(e,t)};function yB(e,t,n){n===void 0&&(n={});var r=n.enable,i=r===void 0||r,a=fB(t);gB(function(){if(i){var t=hB(n.target,window);if(t?.addEventListener){var r=function(e){return a.current(e)},o=Array.isArray(e)?e:[e];return o.forEach(function(e){t.addEventListener(e,r,{capture:n.capture,once:n.once,passive:n.passive})}),function(){o.forEach(function(e){t.removeEventListener(e,r,{capture:n.capture})})}}}},[e,n.capture,n.once,n.passive,i],n.target)}var bB=function(e,t,n){var r=(0,b.useRef)(void 0),i=(0,b.useRef)(0);vB(t,r.current)||(i.current+=1),r.current=t,gB(e,[i.current],n)},xB={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:/(mac|iphone|ipod|ipad)/i.test(typeof navigator<`u`?navigator==null?void 0:navigator.platform:``)?[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},SB={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`?xB.meta.includes(e.keyCode):e.metaKey}};function CB(e){return oB(e)||sB(e)}function wB(e){var t=Object.keys(SB).reduce(function(t,n){return SB[n](e)?t+1:t},0);return[16,17,18,91,92].includes(e.keyCode)?t:t+1}function TB(e,t,n){var r,i;if(!e.key)return!1;if(sB(t))return e.keyCode===t&&t;var a=t.split(`.`),o=0;try{for(var s=fN(a),c=s.next();!c.done;c=s.next()){var l=c.value,u=SB[l],d=xB[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&&wB(e)===a.length&&t:o===a.length&&t}function EB(e,t){return aB(e)?e:CB(e)?function(n){return TB(n,e,t)}:Array.isArray(e)?function(n){return e.find(function(e){return TB(n,e,t)})}:function(){return!!e}}var DB=[`keydown`];function OB(e,t,n){var r=n||{},i=r.events,a=i===void 0?DB:i,o=r.target,s=r.exactMatch,c=s!==void 0&&s,l=r.useCapture,u=l!==void 0&&l,d=fB(t),f=fB(e);bB(function(){var e,t,n,r=hB(o,window);if(r){var i=function(e){var t=e,n=EB(f.current,c)(t),r=CB(n)?n:t.key;if(n)return d.current?.call(d,t,r)};try{for(var s=fN(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=fN(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 kB=`AHOOKS_SYNC_STORAGE_EVENT_NAME`,AB=function(e){return function(t,n){n===void 0&&(n={});var r,i=n.listenStorageChange,a=i!==void 0&&i,o=aB(n.serializer)?n.serializer:JSON.stringify,s=aB(n.deserializer)?n.deserializer:JSON.parse,c=aB(n.onError)?n.onError:console.error;try{r=e()}catch(e){c(e)}var l=function(){try{var e=r?.getItem(t);if(e)return s(e)}catch(e){c(e)}return aB(n.defaultValue)?n.defaultValue():n.defaultValue},u=pN((0,b.useState)(l),2),d=u[0],f=u[1],p=(0,b.useRef)(d);p.current=d,uB(function(){var e=l();Object.is(e,p.current)||(p.current=e,f(e))},[t]);var m=function(e){var n=p.current,i=aB(e)?e(n):e;if(!Object.is(i,n)){a||(p.current=i,f(i));try{var s=void 0,l=r?.getItem(t);cB(i)?(s=null,r?.removeItem(t)):(s=o(i),r?.setItem(t,s)),dispatchEvent(new CustomEvent(kB,{detail:{key:t,newValue:s,oldValue:l,storageArea:r}}))}catch(e){c(e)}}},h=function(e){if(!(e.key!==t||e.storageArea!==r)){var n=l();Object.is(n,p.current)||(p.current=n,f(n))}};return yB(`storage`,h,{enable:a}),yB(kB,function(e){h(e.detail)},{enable:a}),[d,lB(m)]}}(function(){return mB?localStorage:void 0}),jB=function(e,t){var n=lB(e),r=(0,b.useRef)(null),i=(0,b.useCallback)(function(){r.current&&clearTimeout(r.current)},[]);return(0,b.useEffect)(function(){if(!(!sB(t)||t<0))return r.current=setTimeout(n,t),i},[t]),i},MB=Ni(`inline-flex items-center justify-center rounded-full border font-medium whitespace-nowrap shrink-0 [&>svg]:shrink-0 [&>svg]:pointer-events-none`,{variants:{variant:{secondary:`border-border bg-background text-muted-foreground`,primary:`border-transparent bg-primary text-primary-foreground`,success:`border-badge-success/30 bg-badge-success/10 text-badge-success`,warning:`border-badge-warning/30 bg-badge-warning/10 text-badge-warning`,error:`border-badge-error/30 bg-badge-error/10 text-badge-error`},size:{sm:`px-1.5 py-px gap-0.5 type-text-xs [&>svg]:size-2.5`,md:`px-[9px] py-0.5 gap-1 type-text-sm [&>svg]:size-3`}},defaultVariants:{variant:`secondary`,size:`md`}});function NB({className:e,variant:t,size:n,children:r,...i}){return(0,H.jsx)(`span`,{className:Mr(MB({variant:t,size:n}),e),...i,children:r})}var PB=new Intl.NumberFormat(`en`,{notation:`compact`,maximumFractionDigits:1}),FB=e=>`skybridge-devtools-dismissed-${e}-warning`,IB={"tool-output":{badge:`Large response`,title:`Large model-visible output`,description:`Content and structured content count toward this estimate. Large responses can consume significant context or exceed limits in some clients and models.`},"view-state":{badge:`Large context`,title:`Large model-visible view state`,description:`Persisted view state and data-llm context count toward this estimate. Keep only content the model needs.`}};function LB({kind:e}){return(0,H.jsx)(NB,{size:`sm`,variant:`warning`,children:IB[e].badge})}function RB({kind:e,tokenCount:t}){let n=IB[e],[r,i]=(0,b.useState)(()=>sessionStorage.getItem(FB(e))===`true`);return r?null:(0,H.jsxs)(`div`,{className:`relative shrink-0`,children:[(0,H.jsx)(ik,{className:`rounded-none border-x-0 border-t-0 py-2 pl-3 pr-10`,title:`${n.title} (~${PB.format(t)} tokens)`,description:n.description}),(0,H.jsx)(`button`,{type:`button`,"aria-label":`Dismiss ${n.badge.toLowerCase()} warning for this session`,onClick:()=>{sessionStorage.setItem(FB(e),`true`),i(!0)},className:`absolute right-2 top-2 inline-flex size-6 cursor-pointer items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-badge-warning/10 hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,children:(0,H.jsx)(Ai,{className:`size-3.5`})})]})}function zB(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 BB(e,t){if(e==null)return{};var n,r,i=zB(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 VB(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 HB(e){if(Array.isArray(e))return VB(e)}function UB(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function WB(e,t){if(e){if(typeof e==`string`)return VB(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)?VB(e,t):void 0}}function GB(){throw TypeError(`Invalid attempt to spread non-iterable instance.
203
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KB(e){return HB(e)||UB(e)||WB(e)||GB()}function qB(e){"@babel/helpers - typeof";return qB=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},qB(e)}function JB(e,t){if(qB(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(qB(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function YB(e){var t=JB(e,`string`);return qB(t)==`symbol`?t:t+``}function XB(e,t,n){return(t=YB(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZB(){return ZB=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},ZB.apply(null,arguments)}function QB(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 $B(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?QB(Object(n),!0).forEach(function(t){XB(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QB(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function eV(e){var t=e.length;if(t===0||t===1)return e;if(t===2)return[e[0],e[1],`${e[0]}.${e[1]}`,`${e[1]}.${e[0]}`];if(t===3)return[e[0],e[1],e[2],`${e[0]}.${e[1]}`,`${e[0]}.${e[2]}`,`${e[1]}.${e[0]}`,`${e[1]}.${e[2]}`,`${e[2]}.${e[0]}`,`${e[2]}.${e[1]}`,`${e[0]}.${e[1]}.${e[2]}`,`${e[0]}.${e[2]}.${e[1]}`,`${e[1]}.${e[0]}.${e[2]}`,`${e[1]}.${e[2]}.${e[0]}`,`${e[2]}.${e[0]}.${e[1]}`,`${e[2]}.${e[1]}.${e[0]}`];if(t>=4)return[e[0],e[1],e[2],e[3],`${e[0]}.${e[1]}`,`${e[0]}.${e[2]}`,`${e[0]}.${e[3]}`,`${e[1]}.${e[0]}`,`${e[1]}.${e[2]}`,`${e[1]}.${e[3]}`,`${e[2]}.${e[0]}`,`${e[2]}.${e[1]}`,`${e[2]}.${e[3]}`,`${e[3]}.${e[0]}`,`${e[3]}.${e[1]}`,`${e[3]}.${e[2]}`,`${e[0]}.${e[1]}.${e[2]}`,`${e[0]}.${e[1]}.${e[3]}`,`${e[0]}.${e[2]}.${e[1]}`,`${e[0]}.${e[2]}.${e[3]}`,`${e[0]}.${e[3]}.${e[1]}`,`${e[0]}.${e[3]}.${e[2]}`,`${e[1]}.${e[0]}.${e[2]}`,`${e[1]}.${e[0]}.${e[3]}`,`${e[1]}.${e[2]}.${e[0]}`,`${e[1]}.${e[2]}.${e[3]}`,`${e[1]}.${e[3]}.${e[0]}`,`${e[1]}.${e[3]}.${e[2]}`,`${e[2]}.${e[0]}.${e[1]}`,`${e[2]}.${e[0]}.${e[3]}`,`${e[2]}.${e[1]}.${e[0]}`,`${e[2]}.${e[1]}.${e[3]}`,`${e[2]}.${e[3]}.${e[0]}`,`${e[2]}.${e[3]}.${e[1]}`,`${e[3]}.${e[0]}.${e[1]}`,`${e[3]}.${e[0]}.${e[2]}`,`${e[3]}.${e[1]}.${e[0]}`,`${e[3]}.${e[1]}.${e[2]}`,`${e[3]}.${e[2]}.${e[0]}`,`${e[3]}.${e[2]}.${e[1]}`,`${e[0]}.${e[1]}.${e[2]}.${e[3]}`,`${e[0]}.${e[1]}.${e[3]}.${e[2]}`,`${e[0]}.${e[2]}.${e[1]}.${e[3]}`,`${e[0]}.${e[2]}.${e[3]}.${e[1]}`,`${e[0]}.${e[3]}.${e[1]}.${e[2]}`,`${e[0]}.${e[3]}.${e[2]}.${e[1]}`,`${e[1]}.${e[0]}.${e[2]}.${e[3]}`,`${e[1]}.${e[0]}.${e[3]}.${e[2]}`,`${e[1]}.${e[2]}.${e[0]}.${e[3]}`,`${e[1]}.${e[2]}.${e[3]}.${e[0]}`,`${e[1]}.${e[3]}.${e[0]}.${e[2]}`,`${e[1]}.${e[3]}.${e[2]}.${e[0]}`,`${e[2]}.${e[0]}.${e[1]}.${e[3]}`,`${e[2]}.${e[0]}.${e[3]}.${e[1]}`,`${e[2]}.${e[1]}.${e[0]}.${e[3]}`,`${e[2]}.${e[1]}.${e[3]}.${e[0]}`,`${e[2]}.${e[3]}.${e[0]}.${e[1]}`,`${e[2]}.${e[3]}.${e[1]}.${e[0]}`,`${e[3]}.${e[0]}.${e[1]}.${e[2]}`,`${e[3]}.${e[0]}.${e[2]}.${e[1]}`,`${e[3]}.${e[1]}.${e[0]}.${e[2]}`,`${e[3]}.${e[1]}.${e[2]}.${e[0]}`,`${e[3]}.${e[2]}.${e[0]}.${e[1]}`,`${e[3]}.${e[2]}.${e[1]}.${e[0]}`]}var tV={};function nV(e){if(e.length===0||e.length===1)return e;var t=e.join(`.`);return tV[t]||(tV[t]=eV(e)),tV[t]}function rV(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return nV(e.filter(function(e){return e!==`token`})).reduce(function(e,t){return $B($B({},e),n[t])},t)}function iV(e){return e.join(` `)}function aV(e,t){var n=0;return function(r){return n+=1,r.map(function(r,i){return oV({node:r,stylesheet:e,useInlineStyles:t,key:`code-segment-${n}-${i}`})})}}function oV(e){var t=e.node,n=e.stylesheet,r=e.style,i=r===void 0?{}:r,a=e.useInlineStyles,o=e.key,s=t.properties,c=t.type,l=t.tagName,u=t.value;if(c===`text`)return u;if(l){var d=aV(n,a),f;if(!a)f=$B($B({},s),{},{className:iV(s.className)});else{var p=Object.keys(n).reduce(function(e,t){return t.split(`.`).forEach(function(t){e.includes(t)||e.push(t)}),e},[]),m=s.className&&s.className.includes(`token`)?[`token`]:[],h=s.className&&m.concat(s.className.filter(function(e){return!p.includes(e)}));f=$B($B({},s),{},{className:iV(h)||void 0,style:rV(s.className,Object.assign({},s.style,i),n)})}var g=d(t.children);return b.createElement(l,ZB({key:o},f),g)}}var sV=(function(e,t){return e.listLanguages().indexOf(t)!==-1}),cV=[`language`,`children`,`style`,`customStyle`,`codeTagProps`,`useInlineStyles`,`showLineNumbers`,`showInlineLineNumbers`,`startingLineNumber`,`lineNumberContainerStyle`,`lineNumberStyle`,`wrapLines`,`wrapLongLines`,`lineProps`,`renderer`,`PreTag`,`CodeTag`,`code`,`astGenerator`];function lV(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 uV(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?lV(Object(n),!0).forEach(function(t){XB(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lV(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var dV=/\n/g;function fV(e){return e.match(dV)}function pV(e){var t=e.lines,n=e.startingLineNumber,r=e.style;return t.map(function(e,t){var i=t+n;return b.createElement(`span`,{key:`line-${t}`,className:`react-syntax-highlighter-line-number`,style:typeof r==`function`?r(i):r},`${i}
204
+ `)})}function mV(e){var t=e.codeString,n=e.codeStyle,r=e.containerStyle,i=r===void 0?{float:`left`,paddingRight:`10px`}:r,a=e.numberStyle,o=a===void 0?{}:a,s=e.startingLineNumber;return b.createElement(`code`,{style:Object.assign({},n,i)},pV({lines:t.replace(/\n$/,``).split(`
205
+ `),style:o,startingLineNumber:s}))}function hV(e){return`${e.toString().length}.25em`}function gV(e,t){return{type:`element`,tagName:`span`,properties:{key:`line-number--${e}`,className:[`comment`,`linenumber`,`react-syntax-highlighter-line-number`],style:t},children:[{type:`text`,value:e}]}}function _V(e,t,n){var r={display:`inline-block`,minWidth:hV(n),paddingRight:`1em`,textAlign:`right`,userSelect:`none`},i=typeof e==`function`?e(t):e;return uV(uV({},r),i)}function vV(e){var t=e.children,n=e.lineNumber,r=e.lineNumberStyle,i=e.largestLineNumber,a=e.showInlineLineNumbers,o=e.lineProps,s=o===void 0?{}:o,c=e.className,l=c===void 0?[]:c,u=e.showLineNumbers,d=e.wrapLongLines,f=e.wrapLines,p=f!==void 0&&f?uV({},typeof s==`function`?s(n):s):{};if(p.className=p.className?[].concat(KB(p.className.trim().split(/\s+/)),KB(l)):l,n&&a){var m=_V(r,n,i);t.unshift(gV(n,m))}return d&u&&(p.style=uV({display:`flex`},p.style)),{type:`element`,tagName:`span`,properties:p,children:t}}function yV(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];e.length===void 0&&(e=[e]);for(var r=0;r<e.length;r++){var i=e[r];if(i.type===`text`)n.push(vV({children:[i],className:KB(new Set(t))}));else if(i.children){var a=t.concat(i.properties?.className||[]);yV(i.children,a).forEach(function(e){return n.push(e)})}}return n}function bV(e,t,n,r,i,a,o,s,c){var l,u=yV(e.value),d=[],f=-1,p=0;function m(e,a){return vV({children:e,lineNumber:a,lineNumberStyle:s,largestLineNumber:o,showInlineLineNumbers:i,lineProps:n,className:arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],showLineNumbers:r,wrapLongLines:c,wrapLines:t})}function h(e,t){if(r&&t&&i){var n=_V(s,t,o);e.unshift(gV(t,n))}return e}function g(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return t||r.length>0?m(e,n,r):h(e,n)}for(var _=function(){var e=u[p],t=e.children[0].value;if(fV(t)){var n=t.split(`
206
+ `);n.forEach(function(t,i){var o=r&&d.length+a,s={type:`text`,value:`${t}
207
+ `};if(i===0){var c=g(u.slice(f+1,p).concat(vV({children:[s],className:e.properties.className})),o);d.push(c)}else if(i===n.length-1){var l=u[p+1]&&u[p+1].children&&u[p+1].children[0],m={type:`text`,value:`${t}`};if(l){var h=vV({children:[m],className:e.properties.className});u.splice(p+1,0,h)}else{var _=g([m],o,e.properties.className);d.push(_)}}else{var v=g([s],o,e.properties.className);d.push(v)}}),f=p}p++};p<u.length;)_();if(f!==u.length-1){var v=u.slice(f+1,u.length);if(v&&v.length){var y=g(v,r&&d.length+a);d.push(y)}}return t?d:(l=[]).concat.apply(l,d)}function xV(e){var t=e.rows,n=e.stylesheet,r=e.useInlineStyles;return t.map(function(e,t){return oV({node:e,stylesheet:n,useInlineStyles:r,key:`code-segment-${t}`})})}function SV(e){return e&&e.highlightAuto!==void 0}function CV(e){var t=e.astGenerator,n=e.language,r=e.code,i=e.defaultCodeValue;if(SV(t)){var a=sV(t,n);return n===`text`?{value:i,language:`text`}:a?t.highlight(n,r):t.highlightAuto(r)}try{return n&&n!==`text`?{value:t.highlight(r,n)}:{value:i}}catch{return{value:i}}}function wV(e,t){return function(n){var r=n.language,i=n.children,a=n.style,o=a===void 0?t:a,s=n.customStyle,c=s===void 0?{}:s,l=n.codeTagProps,u=l===void 0?{className:r?`language-${r}`:void 0,style:uV(uV({},o[`code[class*="language-"]`]),o[`code[class*="language-${r}"]`])}:l,d=n.useInlineStyles,f=d===void 0||d,p=n.showLineNumbers,m=p!==void 0&&p,h=n.showInlineLineNumbers,g=h===void 0||h,_=n.startingLineNumber,v=_===void 0?1:_,y=n.lineNumberContainerStyle,x=n.lineNumberStyle,S=x===void 0?{}:x,C=n.wrapLines,w=n.wrapLongLines,T=w!==void 0&&w,E=n.lineProps,D=E===void 0?{}:E,O=n.renderer,k=n.PreTag,A=k===void 0?`pre`:k,j=n.CodeTag,M=j===void 0?`code`:j,N=n.code,P=N===void 0?(Array.isArray(i)?i[0]:i)||``:N,F=n.astGenerator,I=BB(n,cV);F||=e;var L=m?b.createElement(mV,{containerStyle:y,codeStyle:u.style||{},numberStyle:S,startingLineNumber:v,codeString:P}):null,ee=o.hljs||o[`pre[class*="language-"]`]||{backgroundColor:`#fff`},te=SV(F)?`hljs`:`prismjs`,ne=f?Object.assign({},I,{style:Object.assign({},ee,c)}):Object.assign({},I,{className:I.className?`${te} ${I.className}`:te,style:Object.assign({},c)});if(T?u.style=uV({whiteSpace:`pre-wrap`},u.style):u.style=uV({whiteSpace:`pre`},u.style),!F)return b.createElement(A,ne,L,b.createElement(M,u,P));(C===void 0&&O||T)&&(C=!0),O||=xV;var R=[{type:`text`,value:P}],z=CV({astGenerator:F,language:r,code:P,defaultCodeValue:R});z.language===null&&(z.value=R);var B=v+(P.match(/\n/g)?.length??0),re=bV(z,C,D,m,g,v,B,S,T);return b.createElement(A,ne,b.createElement(M,u,!g&&L,O({rows:re,stylesheet:o,useInlineStyles:f})))}}var TV=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};TV.prototype.normal={},TV.prototype.property={},TV.prototype.space=void 0;function EV(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new TV(n,r,t)}function DV(e){return e.toLowerCase()}var OV=class{constructor(e,t){this.attribute=t,this.property=e}};OV.prototype.attribute=``,OV.prototype.booleanish=!1,OV.prototype.boolean=!1,OV.prototype.commaOrSpaceSeparated=!1,OV.prototype.commaSeparated=!1,OV.prototype.defined=!1,OV.prototype.mustUseProperty=!1,OV.prototype.number=!1,OV.prototype.overloadedBoolean=!1,OV.prototype.property=``,OV.prototype.spaceSeparated=!1,OV.prototype.space=void 0;var kV=c({boolean:()=>jV,booleanish:()=>MV,commaOrSpaceSeparated:()=>IV,commaSeparated:()=>FV,number:()=>X,overloadedBoolean:()=>NV,spaceSeparated:()=>PV}),AV=0,jV=LV(),MV=LV(),NV=LV(),X=LV(),PV=LV(),FV=LV(),IV=LV();function LV(){return 2**++AV}var RV=Object.keys(kV),zV=class extends OV{constructor(e,t,n,r){let i=-1;if(super(e,t),BV(this,`space`,r),typeof n==`number`)for(;++i<RV.length;){let e=RV[i];BV(this,RV[i],(n&kV[e])===kV[e])}}};zV.prototype.defined=!0;function BV(e,t,n){n&&(e[t]=n)}function VV(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new zV(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[DV(r)]=r,n[DV(a.attribute)]=r}return new TV(t,n,e.space)}var HV=VV({properties:{ariaActiveDescendant:null,ariaAtomic:MV,ariaAutoComplete:null,ariaBusy:MV,ariaChecked:MV,ariaColCount:X,ariaColIndex:X,ariaColSpan:X,ariaControls:PV,ariaCurrent:null,ariaDescribedBy:PV,ariaDetails:null,ariaDisabled:MV,ariaDropEffect:PV,ariaErrorMessage:null,ariaExpanded:MV,ariaFlowTo:PV,ariaGrabbed:MV,ariaHasPopup:null,ariaHidden:MV,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:PV,ariaLevel:X,ariaLive:null,ariaModal:MV,ariaMultiLine:MV,ariaMultiSelectable:MV,ariaOrientation:null,ariaOwns:PV,ariaPlaceholder:null,ariaPosInSet:X,ariaPressed:MV,ariaReadOnly:MV,ariaRelevant:null,ariaRequired:MV,ariaRoleDescription:PV,ariaRowCount:X,ariaRowIndex:X,ariaRowSpan:X,ariaSelected:MV,ariaSetSize:X,ariaSort:null,ariaValueMax:X,ariaValueMin:X,ariaValueNow:X,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function UV(e,t){return t in e?e[t]:t}function WV(e,t){return UV(e,t.toLowerCase())}var GV=VV({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:FV,acceptCharset:PV,accessKey:PV,action:null,allow:null,allowFullScreen:jV,allowPaymentRequest:jV,allowUserMedia:jV,alt:null,as:null,async:jV,autoCapitalize:null,autoComplete:PV,autoFocus:jV,autoPlay:jV,blocking:PV,capture:null,charSet:null,checked:jV,cite:null,className:PV,cols:X,colSpan:null,content:null,contentEditable:MV,controls:jV,controlsList:PV,coords:X|FV,crossOrigin:null,data:null,dateTime:null,decoding:null,default:jV,defer:jV,dir:null,dirName:null,disabled:jV,download:NV,draggable:MV,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:jV,formTarget:null,headers:PV,height:X,hidden:NV,high:X,href:null,hrefLang:null,htmlFor:PV,httpEquiv:PV,id:null,imageSizes:null,imageSrcSet:null,inert:jV,inputMode:null,integrity:null,is:null,isMap:jV,itemId:null,itemProp:PV,itemRef:PV,itemScope:jV,itemType:PV,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:jV,low:X,manifest:null,max:null,maxLength:X,media:null,method:null,min:null,minLength:X,multiple:jV,muted:jV,name:null,nonce:null,noModule:jV,noValidate:jV,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:jV,optimum:X,pattern:null,ping:PV,placeholder:null,playsInline:jV,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:jV,referrerPolicy:null,rel:PV,required:jV,reversed:jV,rows:X,rowSpan:X,sandbox:PV,scope:null,scoped:jV,seamless:jV,selected:jV,shadowRootClonable:jV,shadowRootDelegatesFocus:jV,shadowRootMode:null,shape:null,size:X,sizes:null,slot:null,span:X,spellCheck:MV,src:null,srcDoc:null,srcLang:null,srcSet:null,start:X,step:null,style:null,tabIndex:X,target:null,title:null,translate:null,type:null,typeMustMatch:jV,useMap:null,value:MV,width:X,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:PV,axis:null,background:null,bgColor:null,border:X,borderColor:null,bottomMargin:X,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:jV,declare:jV,event:null,face:null,frame:null,frameBorder:null,hSpace:X,leftMargin:X,link:null,longDesc:null,lowSrc:null,marginHeight:X,marginWidth:X,noResize:jV,noHref:jV,noShade:jV,noWrap:jV,object:null,profile:null,prompt:null,rev:null,rightMargin:X,rules:null,scheme:null,scrolling:MV,standby:null,summary:null,text:null,topMargin:X,valueType:null,version:null,vAlign:null,vLink:null,vSpace:X,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:jV,disableRemotePlayback:jV,prefix:null,property:null,results:X,security:null,unselectable:null},space:`html`,transform:WV}),KV=VV({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,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`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,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`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,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`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:IV,accentHeight:X,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:X,amplitude:X,arabicForm:null,ascent:X,attributeName:null,attributeType:null,azimuth:X,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:X,by:null,calcMode:null,capHeight:X,className:PV,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:X,diffuseConstant:X,direction:null,display:null,dur:null,divisor:X,dominantBaseline:null,download:jV,dx:null,dy:null,edgeMode:null,editable:null,elevation:X,enableBackground:null,end:null,event:null,exponent:X,externalResourcesRequired:null,fill:null,fillOpacity:X,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:FV,g2:FV,glyphName:FV,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:X,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:X,horizOriginX:X,horizOriginY:X,id:null,ideographic:X,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:X,k:X,k1:X,k2:X,k3:X,k4:X,kernelMatrix:IV,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:X,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:X,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:X,overlineThickness:X,paintOrder:null,panose1:null,path:null,pathLength:X,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:PV,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:X,pointsAtY:X,pointsAtZ:X,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:IV,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:IV,rev:IV,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:IV,requiredFeatures:IV,requiredFonts:IV,requiredFormats:IV,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:X,specularExponent:X,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:X,strikethroughThickness:X,string:null,stroke:null,strokeDashArray:IV,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:X,strokeOpacity:X,strokeWidth:null,style:null,surfaceScale:X,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:IV,tabIndex:X,tableValues:null,target:null,targetX:X,targetY:X,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:IV,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:X,underlineThickness:X,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:X,values:null,vAlphabetic:X,vMathematical:X,vectorEffect:null,vHanging:X,vIdeographic:X,version:null,vertAdvY:X,vertOriginX:X,vertOriginY:X,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:X,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:UV}),qV=VV({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),JV=VV({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:WV}),YV=VV({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),XV=/[A-Z]/g,ZV=/-[a-z]/g,QV=/^data[-\w.:]+$/i;function $V(e,t){let n=DV(t),r=t,i=OV;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&QV.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(ZV,tH);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!ZV.test(e)){let n=e.replace(XV,eH);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=zV}return new i(r,t)}function eH(e){return`-`+e.toLowerCase()}function tH(e){return e.charAt(1).toUpperCase()}var nH=EV([HV,GV,qV,JV,YV],`html`),rH=EV([HV,KV,qV,JV,YV],`svg`);function iH(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}var aH=/[#.]/g;function oH(e,t){let n=e||``,r={},i=0,a,o;for(;i<n.length;){aH.lastIndex=i;let e=aH.exec(n),t=n.slice(i,e?e.index:n.length);t&&(a?a===`#`?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:o=t,i+=t.length),e&&(a=e[0],i++)}return{type:`element`,tagName:o||t||`div`,properties:r,children:[]}}function sH(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function cH(e,t,n){let r=n?mH(n):void 0;function i(n,i,...a){let o;if(n==null){o={type:`root`,children:[]};let e=i;a.unshift(e)}else{o=oH(n,t);let s=o.tagName.toLowerCase(),c=r?r.get(s):void 0;if(o.tagName=c||s,lH(i))a.unshift(i);else for(let[t,n]of Object.entries(i))uH(e,o.properties,t,n)}for(let e of a)dH(o.children,e);return o.type===`element`&&o.tagName===`template`&&(o.content={type:`root`,children:o.children},o.children=[]),o}return i}function lH(e){if(typeof e!=`object`||!e||Array.isArray(e))return!0;if(typeof e.type!=`string`)return!1;let t=e,n=Object.keys(e);for(let e of n){let n=t[e];if(n&&typeof n==`object`){if(!Array.isArray(n))return!0;let e=n;for(let t of e)if(typeof t!=`number`&&typeof t!=`string`)return!0}}return!!(`children`in e&&Array.isArray(e.children))}function uH(e,t,n,r){let i=$V(e,n),a;if(r!=null){if(typeof r==`number`){if(Number.isNaN(r))return;a=r}else a=typeof r==`boolean`?r:typeof r==`string`?i.spaceSeparated?sH(r):i.commaSeparated?iH(r):i.commaOrSpaceSeparated?sH(iH(r).join(` `)):fH(i,i.property,r):Array.isArray(r)?[...r]:i.property===`style`?pH(r):String(r);if(Array.isArray(a)){let e=[];for(let t of a)e.push(fH(i,i.property,t));a=e}i.property===`className`&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function dH(e,t){if(t!=null)if(typeof t==`number`||typeof t==`string`)e.push({type:`text`,value:String(t)});else if(Array.isArray(t))for(let n of t)dH(e,n);else if(typeof t==`object`&&`type`in t)t.type===`root`?dH(e,t.children):e.push(t);else throw Error("Expected node, nodes, or string, got `"+t+"`")}function fH(e,t,n){if(typeof n==`string`){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===``||DV(n)===DV(t)))return!0}return n}function pH(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(`: `));return t.join(`; `)}function mH(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}var hH=`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.solidColor.textArea.textPath`.split(`.`),gH=cH(nH,`div`);cH(rH,`g`,hH);var _H=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),vH={0:`�`,128:`€`,130:`‚`,131:`ƒ`,132:`„`,133:`…`,134:`†`,135:`‡`,136:`ˆ`,137:`‰`,138:`Š`,139:`‹`,140:`Œ`,142:`Ž`,145:`‘`,146:`’`,147:`“`,148:`”`,149:`•`,150:`–`,151:`—`,152:`˜`,153:`™`,154:`š`,155:`›`,156:`œ`,158:`ž`,159:`Ÿ`};function yH(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=48&&t<=57}function bH(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function xH(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}function SH(e){return xH(e)||yH(e)}var CH=document.createElement(`i`);function wH(e){let t=`&`+e+`;`;CH.innerHTML=t;let n=CH.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}var TH=[``,`Named character references must be terminated by a semicolon`,`Numeric character references must be terminated by a semicolon`,`Named character references cannot be empty`,`Numeric character references cannot be empty`,`Named character references must be known`,`Numeric character references cannot be disallowed`,`Numeric character references cannot be outside the permissible Unicode range`];function EH(e,t){let n=t||{},r=typeof n.additional==`string`?n.additional.charCodeAt(0):n.additional,i=[],a=0,o=-1,s=``,c,l;n.position&&(`start`in n.position||`indent`in n.position?(l=n.position.indent,c=n.position.start):c=n.position);let u=(c?c.line:0)||1,d=(c?c.column:0)||1,f=m(),p;for(a--;++a<=e.length;)if(p===10&&(d=(l?l[o]:0)||1),p=e.charCodeAt(a),p===38){let t=e.charCodeAt(a+1);if(t===9||t===10||t===12||t===32||t===38||t===60||Number.isNaN(t)||r&&t===r){s+=String.fromCharCode(p),d++;continue}let o=a+1,c=o,l=o,u;if(t===35){l=++c;let t=e.charCodeAt(l);t===88||t===120?(u=`hexadecimal`,l=++c):u=`decimal`}else u=`named`;let _=``,v=``,y=``,b=u===`named`?SH:u===`decimal`?yH:bH;for(l--;++l<=e.length;){let t=e.charCodeAt(l);if(!b(t))break;y+=String.fromCharCode(t),u===`named`&&_H.includes(y)&&(_=y,v=wH(y))}let x=e.charCodeAt(l)===59;if(x){l++;let e=u===`named`&&wH(y);e&&(_=y,v=e)}let S=1+l-o,C=``;if(!(!x&&n.nonTerminated===!1))if(!y)u!==`named`&&h(4,S);else if(u===`named`){if(x&&!v)h(5,1);else if(_!==y&&(l=c+_.length,S=1+l-c,x=!1),!x){let t=_?1:3;if(n.attribute){let n=e.charCodeAt(l);n===61?(h(t,S),v=``):SH(n)?v=``:h(t,S)}else h(t,S)}C=v}else{x||h(2,S);let e=Number.parseInt(y,u===`hexadecimal`?16:10);if(DH(e))h(7,S),C=`�`;else if(e in vH)h(6,S),C=vH[e];else{let t=``;OH(e)&&h(6,S),e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10|55296),e=56320|e&1023),C=t+String.fromCharCode(e)}}if(C){g(),f=m(),a=l-1,d+=l-o+1,i.push(C);let t=m();t.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,C,{start:f,end:t},e.slice(o-1,l)),f=t}else y=e.slice(o-1,l),s+=y,d+=y.length,a=l-1}else p===10&&(u++,o++,d=0),Number.isNaN(p)?g():(s+=String.fromCharCode(p),d++);return i.join(``);function m(){return{line:u,column:d,offset:a+((c?c.offset:0)||0)}}function h(e,t){let r;n.warning&&(r=m(),r.column+=t,r.offset+=t,n.warning.call(n.warningContext||void 0,TH[e],r,e))}function g(){s&&=(i.push(s),n.text&&n.text.call(n.textContext||void 0,s,{start:f,end:m()}),``)}}function DH(e){return e>=55296&&e<=57343||e>1114111}function OH(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)==65535||(e&65535)==65534}var kH=0,AH={},jH={util:{type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++kH}),e.__id},clone:function e(t,n){n||={};var r,i;switch(jH.util.type(t)){case`Object`:if(i=jH.util.objId(t),n[i])return n[i];for(var a in r={},n[i]=r,t)t.hasOwnProperty(a)&&(r[a]=e(t[a],n));return r;case`Array`:return i=jH.util.objId(t),n[i]?n[i]:(r=[],n[i]=r,t.forEach(function(t,i){r[i]=e(t,n)}),r);default:return t}}},languages:{plain:AH,plaintext:AH,text:AH,txt:AH,extend:function(e,t){var n=jH.util.clone(jH.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){r||=jH.languages;var i=r[e],a={};for(var o in i)if(i.hasOwnProperty(o)){if(o==t)for(var s in n)n.hasOwnProperty(s)&&(a[s]=n[s]);n.hasOwnProperty(o)||(a[o]=i[o])}var c=r[e];return r[e]=a,jH.languages.DFS(jH.languages,function(t,n){n===c&&t!=e&&(this[t]=a)}),a},DFS:function e(t,n,r,i){i||={};var a=jH.util.objId;for(var o in t)if(t.hasOwnProperty(o)){n.call(t,o,t[o],r||o);var s=t[o],c=jH.util.type(s);c===`Object`&&!i[a(s)]?(i[a(s)]=!0,e(s,n,null,i)):c===`Array`&&!i[a(s)]&&(i[a(s)]=!0,e(s,n,o,i))}}},plugins:{},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(jH.hooks.run(`before-tokenize`,r),!r.grammar)throw Error(`The language "`+r.language+`" has no grammar.`);return r.tokens=jH.tokenize(r.code,r.grammar),jH.hooks.run(`after-tokenize`,r),MH.stringify(jH.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var i=new FH;return IH(i,i.head,e),PH(e,i,t,i.head,0),RH(i)},hooks:{all:{},add:function(e,t){var n=jH.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=jH.hooks.all[e];if(!(!n||!n.length))for(var r=0,i;i=n[r++];)i(t)}},Token:MH};function MH(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=(r||``).length|0}function NH(e,t,n,r){e.lastIndex=t;var i=e.exec(n);if(i&&r&&i[1]){var a=i[1].length;i.index+=a,i[0]=i[0].slice(a)}return i}function PH(e,t,n,r,i,a){for(var o in n)if(!(!n.hasOwnProperty(o)||!n[o])){var s=n[o];s=Array.isArray(s)?s:[s];for(var c=0;c<s.length;++c){if(a&&a.cause==o+`,`+c)return;var l=s[c],u=l.inside,d=!!l.lookbehind,f=!!l.greedy,p=l.alias;if(f&&!l.pattern.global){var m=l.pattern.toString().match(/[imsuy]*$/)[0];l.pattern=RegExp(l.pattern.source,m+`g`)}for(var h=l.pattern||l,g=r.next,_=i;g!==t.tail&&!(a&&_>=a.reach);_+=g.value.length,g=g.next){var v=g.value;if(t.length>e.length)return;if(!(v instanceof MH)){var y=1,b;if(f){if(b=NH(h,_,e,d),!b||b.index>=e.length)break;var x=b.index,S=b.index+b[0].length,C=_;for(C+=g.value.length;x>=C;)g=g.next,C+=g.value.length;if(C-=g.value.length,_=C,g.value instanceof MH)continue;for(var w=g;w!==t.tail&&(C<S||typeof w.value==`string`);w=w.next)y++,C+=w.value.length;y--,v=e.slice(_,C),b.index-=_}else if(b=NH(h,0,v,d),!b)continue;var x=b.index,T=b[0],E=v.slice(0,x),D=v.slice(x+T.length),O=_+v.length;a&&O>a.reach&&(a.reach=O);var k=g.prev;E&&(k=IH(t,k,E),_+=E.length),LH(t,k,y);var A=new MH(o,u?jH.tokenize(T,u):T,p,T);if(g=IH(t,k,A),D&&IH(t,g,D),y>1){var j={cause:o+`,`+c,reach:O};PH(e,t,n,g.prev,_,j),a&&j.reach>a.reach&&(a.reach=j.reach)}}}}}}function FH(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function IH(e,t,n){var r=t.next,i={value:n,prev:t,next:r};return t.next=i,r.prev=i,e.length++,i}function LH(e,t,n){for(var r=t.next,i=0;i<n&&r!==e.tail;i++)r=r.next;t.next=r,r.prev=t,e.length-=i}function RH(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}var zH=jH;function BH(){}BH.prototype=zH;var VH=new BH;VH.highlight=HH,VH.register=UH,VH.alias=WH,VH.registered=GH,VH.listLanguages=KH,VH.util.encode=JH,VH.Token.stringify=qH;function HH(e,t){if(typeof e!=`string`)throw TypeError("Expected `string` for `value`, got `"+e+"`");let n,r;if(t&&typeof t==`object`)n=t;else{if(r=t,typeof r!=`string`)throw TypeError("Expected `string` for `name`, got `"+r+"`");if(Object.hasOwn(VH.languages,r))n=VH.languages[r];else throw Error("Unknown language: `"+r+"` is not registered")}return{type:`root`,children:zH.highlight.call(VH,e,n,r)}}function UH(e){if(typeof e!=`function`||!e.displayName)throw Error("Expected `function` for `syntax`, got `"+e+"`");Object.hasOwn(VH.languages,e.displayName)||e(VH)}function WH(e,t){let n=VH.languages,r={};typeof e==`string`?t&&(r[e]=t):r=e;let i;for(i in r)if(Object.hasOwn(r,i)){let e=r[i],t=typeof e==`string`?[e]:e,a=-1;for(;++a<t.length;)n[t[a]]=n[i]}}function GH(e){if(typeof e!=`string`)throw TypeError("Expected `string` for `aliasOrLanguage`, got `"+e+"`");return Object.hasOwn(VH.languages,e)}function KH(){let e=VH.languages,t=[],n;for(n in e)Object.hasOwn(e,n)&&typeof e[n]==`object`&&t.push(n);return t}function qH(e,t){if(typeof e==`string`)return{type:`text`,value:e};if(Array.isArray(e)){let n=[],r=-1;for(;++r<e.length;)e[r]!==null&&e[r]!==void 0&&e[r]!==``&&n.push(qH(e[r],t));return n}let n={attributes:{},classes:[`token`,e.type],content:qH(e.content,t),language:t,tag:`span`,type:e.type};return e.alias&&n.classes.push(...typeof e.alias==`string`?[e.alias]:e.alias),VH.hooks.run(`wrap`,n),gH(n.tag+`.`+n.classes.join(`.`),YH(n.attributes),n.content)}function JH(e){return e}function YH(e){let t;for(t in e)Object.hasOwn(e,t)&&(e[t]=EH(e[t]));return e}var XH=wV(VH,{});XH.registerLanguage=function(e,t){return VH.register(t)},XH.alias=function(e,t){return VH.alias(e,t)},ZH.displayName=`json`,ZH.aliases=[`webmanifest`];function ZH(e){e.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:`keyword`}},e.languages.webmanifest=e.languages.json}var QH=ZH,$H={'code[class*="language-"]':{background:`hsl(230, 1%, 98%)`,color:`hsl(230, 8%, 24%)`,fontFamily:`"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace`,direction:`ltr`,textAlign:`left`,whiteSpace:`pre`,wordSpacing:`normal`,wordBreak:`normal`,lineHeight:`1.5`,MozTabSize:`2`,OTabSize:`2`,tabSize:`2`,WebkitHyphens:`none`,MozHyphens:`none`,msHyphens:`none`,hyphens:`none`},'pre[class*="language-"]':{background:`hsl(230, 1%, 98%)`,color:`hsl(230, 8%, 24%)`,fontFamily:`"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace`,direction:`ltr`,textAlign:`left`,whiteSpace:`pre`,wordSpacing:`normal`,wordBreak:`normal`,lineHeight:`1.5`,MozTabSize:`2`,OTabSize:`2`,tabSize:`2`,WebkitHyphens:`none`,MozHyphens:`none`,msHyphens:`none`,hyphens:`none`,padding:`1em`,margin:`0.5em 0`,overflow:`auto`,borderRadius:`0.3em`},'code[class*="language-"]::-moz-selection':{background:`hsl(230, 1%, 90%)`,color:`inherit`},'code[class*="language-"] *::-moz-selection':{background:`hsl(230, 1%, 90%)`,color:`inherit`},'pre[class*="language-"] *::-moz-selection':{background:`hsl(230, 1%, 90%)`,color:`inherit`},'code[class*="language-"]::selection':{background:`hsl(230, 1%, 90%)`,color:`inherit`},'code[class*="language-"] *::selection':{background:`hsl(230, 1%, 90%)`,color:`inherit`},'pre[class*="language-"] *::selection':{background:`hsl(230, 1%, 90%)`,color:`inherit`},':not(pre) > code[class*="language-"]':{padding:`0.2em 0.3em`,borderRadius:`0.3em`,whiteSpace:`normal`},comment:{color:`hsl(230, 4%, 64%)`,fontStyle:`italic`},prolog:{color:`hsl(230, 4%, 64%)`},cdata:{color:`hsl(230, 4%, 64%)`},doctype:{color:`hsl(230, 8%, 24%)`},punctuation:{color:`hsl(230, 8%, 24%)`},entity:{color:`hsl(230, 8%, 24%)`,cursor:`help`},"attr-name":{color:`hsl(35, 99%, 36%)`},"class-name":{color:`hsl(35, 99%, 36%)`},boolean:{color:`hsl(35, 99%, 36%)`},constant:{color:`hsl(35, 99%, 36%)`},number:{color:`hsl(35, 99%, 36%)`},atrule:{color:`hsl(35, 99%, 36%)`},keyword:{color:`hsl(301, 63%, 40%)`},property:{color:`hsl(5, 74%, 59%)`},tag:{color:`hsl(5, 74%, 59%)`},symbol:{color:`hsl(5, 74%, 59%)`},deleted:{color:`hsl(5, 74%, 59%)`},important:{color:`hsl(5, 74%, 59%)`},selector:{color:`hsl(119, 34%, 47%)`},string:{color:`hsl(119, 34%, 47%)`},char:{color:`hsl(119, 34%, 47%)`},builtin:{color:`hsl(119, 34%, 47%)`},inserted:{color:`hsl(119, 34%, 47%)`},regex:{color:`hsl(119, 34%, 47%)`},"attr-value":{color:`hsl(119, 34%, 47%)`},"attr-value > .token.punctuation":{color:`hsl(119, 34%, 47%)`},variable:{color:`hsl(221, 87%, 60%)`},operator:{color:`hsl(221, 87%, 60%)`},function:{color:`hsl(221, 87%, 60%)`},url:{color:`hsl(198, 99%, 37%)`},"attr-value > .token.punctuation.attr-equals":{color:`hsl(230, 8%, 24%)`},"special-attr > .token.attr-value > .token.value.css":{color:`hsl(230, 8%, 24%)`},".language-css .token.selector":{color:`hsl(5, 74%, 59%)`},".language-css .token.property":{color:`hsl(230, 8%, 24%)`},".language-css .token.function":{color:`hsl(198, 99%, 37%)`},".language-css .token.url > .token.function":{color:`hsl(198, 99%, 37%)`},".language-css .token.url > .token.string.url":{color:`hsl(119, 34%, 47%)`},".language-css .token.important":{color:`hsl(301, 63%, 40%)`},".language-css .token.atrule .token.rule":{color:`hsl(301, 63%, 40%)`},".language-javascript .token.operator":{color:`hsl(301, 63%, 40%)`},".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation":{color:`hsl(344, 84%, 43%)`},".language-json .token.operator":{color:`hsl(230, 8%, 24%)`},".language-json .token.null.keyword":{color:`hsl(35, 99%, 36%)`},".language-markdown .token.url":{color:`hsl(230, 8%, 24%)`},".language-markdown .token.url > .token.operator":{color:`hsl(230, 8%, 24%)`},".language-markdown .token.url-reference.url > .token.string":{color:`hsl(230, 8%, 24%)`},".language-markdown .token.url > .token.content":{color:`hsl(221, 87%, 60%)`},".language-markdown .token.url > .token.url":{color:`hsl(198, 99%, 37%)`},".language-markdown .token.url-reference.url":{color:`hsl(198, 99%, 37%)`},".language-markdown .token.blockquote.punctuation":{color:`hsl(230, 4%, 64%)`,fontStyle:`italic`},".language-markdown .token.hr.punctuation":{color:`hsl(230, 4%, 64%)`,fontStyle:`italic`},".language-markdown .token.code-snippet":{color:`hsl(119, 34%, 47%)`},".language-markdown .token.bold .token.content":{color:`hsl(35, 99%, 36%)`},".language-markdown .token.italic .token.content":{color:`hsl(301, 63%, 40%)`},".language-markdown .token.strike .token.content":{color:`hsl(5, 74%, 59%)`},".language-markdown .token.strike .token.punctuation":{color:`hsl(5, 74%, 59%)`},".language-markdown .token.list.punctuation":{color:`hsl(5, 74%, 59%)`},".language-markdown .token.title.important > .token.punctuation":{color:`hsl(5, 74%, 59%)`},bold:{fontWeight:`bold`},italic:{fontStyle:`italic`},namespace:{Opacity:`0.8`},"token.tab:not(:empty):before":{color:`hsla(230, 8%, 24%, 0.2)`},"token.cr:before":{color:`hsla(230, 8%, 24%, 0.2)`},"token.lf:before":{color:`hsla(230, 8%, 24%, 0.2)`},"token.space:before":{color:`hsla(230, 8%, 24%, 0.2)`},"div.code-toolbar > .toolbar.toolbar > .toolbar-item":{marginRight:`0.4em`},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{background:`hsl(230, 1%, 90%)`,color:`hsl(230, 6%, 44%)`,padding:`0.1em 0.4em`,borderRadius:`0.3em`},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{background:`hsl(230, 1%, 90%)`,color:`hsl(230, 6%, 44%)`,padding:`0.1em 0.4em`,borderRadius:`0.3em`},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{background:`hsl(230, 1%, 90%)`,color:`hsl(230, 6%, 44%)`,padding:`0.1em 0.4em`,borderRadius:`0.3em`},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{background:`hsl(230, 1%, 78%)`,color:`hsl(230, 8%, 24%)`},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{background:`hsl(230, 1%, 78%)`,color:`hsl(230, 8%, 24%)`},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{background:`hsl(230, 1%, 78%)`,color:`hsl(230, 8%, 24%)`},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{background:`hsl(230, 1%, 78%)`,color:`hsl(230, 8%, 24%)`},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{background:`hsl(230, 1%, 78%)`,color:`hsl(230, 8%, 24%)`},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{background:`hsl(230, 1%, 78%)`,color:`hsl(230, 8%, 24%)`},".line-highlight.line-highlight":{background:`hsla(230, 8%, 24%, 0.05)`},".line-highlight.line-highlight:before":{background:`hsl(230, 1%, 90%)`,color:`hsl(230, 8%, 24%)`,padding:`0.1em 0.6em`,borderRadius:`0.3em`,boxShadow:`0 2px 0 0 rgba(0, 0, 0, 0.2)`},".line-highlight.line-highlight[data-end]:after":{background:`hsl(230, 1%, 90%)`,color:`hsl(230, 8%, 24%)`,padding:`0.1em 0.6em`,borderRadius:`0.3em`,boxShadow:`0 2px 0 0 rgba(0, 0, 0, 0.2)`},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:`hsla(230, 8%, 24%, 0.05)`},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:`hsla(230, 8%, 24%, 0.2)`},".command-line .command-line-prompt":{borderRightColor:`hsla(230, 8%, 24%, 0.2)`},".line-numbers .line-numbers-rows > span:before":{color:`hsl(230, 1%, 62%)`},".command-line .command-line-prompt > span:before":{color:`hsl(230, 1%, 62%)`},".rainbow-braces .token.token.punctuation.brace-level-1":{color:`hsl(5, 74%, 59%)`},".rainbow-braces .token.token.punctuation.brace-level-5":{color:`hsl(5, 74%, 59%)`},".rainbow-braces .token.token.punctuation.brace-level-9":{color:`hsl(5, 74%, 59%)`},".rainbow-braces .token.token.punctuation.brace-level-2":{color:`hsl(119, 34%, 47%)`},".rainbow-braces .token.token.punctuation.brace-level-6":{color:`hsl(119, 34%, 47%)`},".rainbow-braces .token.token.punctuation.brace-level-10":{color:`hsl(119, 34%, 47%)`},".rainbow-braces .token.token.punctuation.brace-level-3":{color:`hsl(221, 87%, 60%)`},".rainbow-braces .token.token.punctuation.brace-level-7":{color:`hsl(221, 87%, 60%)`},".rainbow-braces .token.token.punctuation.brace-level-11":{color:`hsl(221, 87%, 60%)`},".rainbow-braces .token.token.punctuation.brace-level-4":{color:`hsl(301, 63%, 40%)`},".rainbow-braces .token.token.punctuation.brace-level-8":{color:`hsl(301, 63%, 40%)`},".rainbow-braces .token.token.punctuation.brace-level-12":{color:`hsl(301, 63%, 40%)`},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:`hsla(353, 100%, 66%, 0.15)`},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:`hsla(353, 100%, 66%, 0.15)`},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:`hsla(353, 95%, 66%, 0.25)`},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:`hsla(353, 95%, 66%, 0.25)`},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:`hsla(353, 95%, 66%, 0.25)`},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:`hsla(353, 95%, 66%, 0.25)`},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection":{backgroundColor:`hsla(353, 95%, 66%, 0.25)`},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection":{backgroundColor:`hsla(353, 95%, 66%, 0.25)`},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection":{backgroundColor:`hsla(353, 95%, 66%, 0.25)`},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection":{backgroundColor:`hsla(353, 95%, 66%, 0.25)`},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:`hsla(137, 100%, 55%, 0.15)`},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:`hsla(137, 100%, 55%, 0.15)`},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:`hsla(135, 73%, 55%, 0.25)`},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:`hsla(135, 73%, 55%, 0.25)`},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:`hsla(135, 73%, 55%, 0.25)`},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:`hsla(135, 73%, 55%, 0.25)`},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection":{backgroundColor:`hsla(135, 73%, 55%, 0.25)`},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection":{backgroundColor:`hsla(135, 73%, 55%, 0.25)`},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection":{backgroundColor:`hsla(135, 73%, 55%, 0.25)`},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection":{backgroundColor:`hsla(135, 73%, 55%, 0.25)`},".prism-previewer.prism-previewer:before":{borderColor:`hsl(0, 0, 95%)`},".prism-previewer-gradient.prism-previewer-gradient div":{borderColor:`hsl(0, 0, 95%)`,borderRadius:`0.3em`},".prism-previewer-color.prism-previewer-color:before":{borderRadius:`0.3em`},".prism-previewer-easing.prism-previewer-easing:before":{borderRadius:`0.3em`},".prism-previewer.prism-previewer:after":{borderTopColor:`hsl(0, 0, 95%)`},".prism-previewer-flipped.prism-previewer-flipped.after":{borderBottomColor:`hsl(0, 0, 95%)`},".prism-previewer-angle.prism-previewer-angle:before":{background:`hsl(0, 0%, 100%)`},".prism-previewer-time.prism-previewer-time:before":{background:`hsl(0, 0%, 100%)`},".prism-previewer-easing.prism-previewer-easing":{background:`hsl(0, 0%, 100%)`},".prism-previewer-angle.prism-previewer-angle circle":{stroke:`hsl(230, 8%, 24%)`,strokeOpacity:`1`},".prism-previewer-time.prism-previewer-time circle":{stroke:`hsl(230, 8%, 24%)`,strokeOpacity:`1`},".prism-previewer-easing.prism-previewer-easing circle":{stroke:`hsl(230, 8%, 24%)`,fill:`transparent`},".prism-previewer-easing.prism-previewer-easing path":{stroke:`hsl(230, 8%, 24%)`},".prism-previewer-easing.prism-previewer-easing line":{stroke:`hsl(230, 8%, 24%)`}},eU=`#121212`,tU=`#3d6b69`,nU=`#c55a44`,rU=`#707070`,iU=`transparent`,aU=`"JetBrains Mono Variable", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace`,oU={...$H,'code[class*="language-"]':{...$H[`code[class*="language-"]`],background:iU,color:eU,fontFamily:aU},'pre[class*="language-"]':{...$H[`pre[class*="language-"]`],background:iU,color:eU,fontFamily:aU,padding:0,margin:0,overflow:`visible`},property:{color:eU},string:{color:tU},number:{color:nU},boolean:{color:nU},punctuation:{color:rU},operator:{color:rU},".language-json .token.operator":{color:rU},".language-json .token.null.keyword":{color:rU}};XH.registerLanguage(`json`,QH);function sU({code:e}){return(0,H.jsx)(XH,{language:`json`,style:oU,customStyle:{margin:0,padding:0,background:`transparent`,fontSize:`0.75rem`},codeTagProps:{className:`font-mono whitespace-pre`},showLineNumbers:!1,wrapLongLines:!0,children:e})}var cU=(0,b.createContext)({});function lU(e){let t=(0,b.useRef)(null);return t.current===null&&(t.current=e()),t.current}var uU=typeof window<`u`?b.useLayoutEffect:b.useEffect,dU=(0,b.createContext)(null);function fU(e,t){e.indexOf(t)===-1&&e.push(t)}function pU(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var mU=(e,t,n)=>n>t?t:n<e?e:n,hU={},gU=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),_U=e=>typeof e==`object`&&!!e,vU=e=>/^0[^.\s]+$/u.test(e);function yU(e){let t;return()=>(t===void 0&&(t=e()),t)}var bU=e=>e,xU=(...e)=>e.reduce((e,t)=>n=>t(e(n))),SU=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},CU=class{constructor(){this.subscriptions=[]}add(e){return fU(this.subscriptions,e),()=>pU(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},wU=e=>e*1e3,TU=e=>e/1e3,EU=(e,t)=>t?1e3/t*e:0,DU=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,OU=1e-7,kU=12;function AU(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=DU(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>OU&&++s<kU);return o}function jU(e,t,n,r){if(e===t&&n===r)return bU;let i=t=>AU(t,0,1,e,n);return e=>e===0||e===1?e:DU(i(e),t,r)}var MU=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,NU=e=>t=>1-e(1-t),PU=jU(.33,1.53,.69,.99),FU=NU(PU),IU=MU(FU),LU=e=>e>=1?1:(e*=2)<1?.5*FU(e):.5*(2-2**(-10*(e-1))),RU=e=>1-Math.sin(Math.acos(e)),zU=NU(RU),BU=MU(RU),VU=jU(.42,0,1,1),HU=jU(0,0,.58,1),UU=jU(.42,0,.58,1),WU=e=>Array.isArray(e)&&typeof e[0]!=`number`,GU=e=>Array.isArray(e)&&typeof e[0]==`number`,KU={linear:bU,easeIn:VU,easeInOut:UU,easeOut:HU,circIn:RU,circInOut:BU,circOut:zU,backIn:FU,backInOut:IU,backOut:PU,anticipate:LU},qU=e=>typeof e==`string`,JU=e=>{if(GU(e)){e.length;let[t,n,r,i]=e;return jU(t,n,r,i)}else if(qU(e))return KU[e],`${e}`,KU[e];return e},YU=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`];function XU(e){let t=new Set,n=new Set,r=!1,i=!1,a=new WeakSet,o={delta:0,timestamp:0,isProcessing:!1};function s(t){a.has(t)&&(c.schedule(t),e()),t(o)}let c={schedule:(e,i=!1,o=!1)=>{let s=o&&r?t:n;return i&&a.add(e),s.add(e),e},cancel:e=>{n.delete(e),a.delete(e)},process:e=>{if(o=e,r){i=!0;return}r=!0;let a=t;t=n,n=a,t.forEach(s),t.clear(),r=!1,i&&(i=!1,c.process(e))}};return c}var ZU=40;function QU(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=YU.reduce((e,t)=>(e[t]=XU(a),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=hU.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,ZU),1)),i.timestamp=o,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:YU.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<YU.length;t++)o[YU[t]].cancel(e)},state:i,steps:o}}var{schedule:$U,cancel:eW,state:tW,steps:nW}=QU(typeof requestAnimationFrame<`u`?requestAnimationFrame:bU,!0),rW;function iW(){rW=void 0}var aW={now:()=>(rW===void 0&&aW.set(tW.isProcessing||hU.useManualTiming?tW.timestamp:performance.now()),rW),set:e=>{rW=e,queueMicrotask(iW)}},oW=e=>t=>typeof t==`string`&&t.startsWith(e),sW=oW(`--`),cW=oW(`var(--`),lW=e=>cW(e)?uW.test(e.split(`/*`)[0].trim()):!1,uW=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function dW(e){return typeof e==`string`&&e.split(`/*`)[0].includes(`var(--`)}var fW={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},pW={...fW,transform:e=>mU(0,1,e)},mW={...fW,default:1},hW=e=>Math.round(e*1e5)/1e5,gW=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function _W(e){return e==null}var vW=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,yW=(e,t)=>n=>!!(typeof n==`string`&&vW.test(n)&&n.startsWith(e)||t&&!_W(n)&&Object.prototype.hasOwnProperty.call(n,t)),bW=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(gW);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},xW=e=>mU(0,255,e),SW={...fW,transform:e=>Math.round(xW(e))},CW={test:yW(`rgb`,`red`),parse:bW(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+SW.transform(e)+`, `+SW.transform(t)+`, `+SW.transform(n)+`, `+hW(pW.transform(r))+`)`};function wW(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var TW={test:yW(`#`),parse:wW,transform:CW.transform},EW=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),DW=EW(`deg`),OW=EW(`%`),kW=EW(`px`),AW=EW(`vh`),jW=EW(`vw`),MW={...OW,parse:e=>OW.parse(e)/100,transform:e=>OW.transform(e*100)},NW={test:yW(`hsl`,`hue`),parse:bW(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+OW.transform(hW(t))+`, `+OW.transform(hW(n))+`, `+hW(pW.transform(r))+`)`},PW={test:e=>CW.test(e)||TW.test(e)||NW.test(e),parse:e=>CW.test(e)?CW.parse(e):NW.test(e)?NW.parse(e):TW.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?CW.transform(e):NW.transform(e),getAnimatableNone:e=>{let t=PW.parse(e);return t.alpha=0,PW.transform(t)}},FW=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function IW(e){return isNaN(e)&&typeof e==`string`&&(e.match(gW)?.length||0)+(e.match(FW)?.length||0)>0}var LW=`number`,RW=`color`,zW=`var`,BW=`var(`,VW="${}",HW=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function UW(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(HW,e=>(PW.test(e)?(r.color.push(a),i.push(RW),n.push(PW.parse(e))):e.startsWith(BW)?(r.var.push(a),i.push(zW),n.push(e)):(r.number.push(a),i.push(LW),n.push(parseFloat(e))),++a,VW)).split(VW),indexes:r,types:i}}function WW(e){return UW(e).values}function GW({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];e===LW?i+=hW(r[a]):e===RW?i+=PW.transform(r[a]):i+=r[a]}return i}}function KW(e){return GW(UW(e))}var qW=e=>typeof e==`number`?0:PW.test(e)?PW.getAnimatableNone(e):e,JW=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:qW(e);function YW(e){let t=UW(e);return GW(t)(t.values.map((e,n)=>JW(e,t.split[n])))}var XW={test:IW,parse:WW,createTransformer:KW,getAnimatableNone:YW};function ZW(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function QW({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=ZW(s,r,e+1/3),a=ZW(s,r,e),o=ZW(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function $W(e,t){return n=>n>0?t:e}var eG=(e,t,n)=>e+(t-e)*n,tG=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},nG=[TW,CW,NW],rG=e=>nG.find(t=>t.test(e));function iG(e){let t=rG(e);if(`${e}`,!t)return!1;let n=t.parse(e);return t===NW&&(n=QW(n)),n}var aG=(e,t)=>{let n=iG(e),r=iG(t);if(!n||!r)return $W(e,t);let i={...n};return e=>(i.red=tG(n.red,r.red,e),i.green=tG(n.green,r.green,e),i.blue=tG(n.blue,r.blue,e),i.alpha=eG(n.alpha,r.alpha,e),CW.transform(i))},oG=new Set([`none`,`hidden`]);function sG(e,t){return oG.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function cG(e,t){return n=>eG(e,t,n)}function lG(e){return typeof e==`number`?cG:typeof e==`string`?lW(e)?$W:PW.test(e)?aG:pG:Array.isArray(e)?uG:typeof e==`object`?PW.test(e)?aG:dG:$W}function uG(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>lG(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function dG(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=lG(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function fG(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]];n[i]=e.values[o]??0,r[a]++}return n}var pG=(e,t)=>{let n=XW.createTransformer(t),r=UW(e),i=UW(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?oG.has(e)&&!i.values.length||oG.has(t)&&!r.values.length?sG(e,t):xU(uG(fG(r,i),i.values),n):(`${e}${t}`,$W(e,t))};function mG(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?eG(e,t,n):lG(e)(e,t)}var hG=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>$U.update(t,e),stop:()=>eW(t),now:()=>tW.isProcessing?tW.timestamp:aW.now()}},gG=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},_G=2e4;function vG(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function yG(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(vG(r),_G);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:TU(i)}}var bG={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function xG(e,t){return e*Math.sqrt(1-t*t)}var SG=12;function CG(e,t,n){let r=n;for(let n=1;n<SG;n++)r-=e(r)/t(r);return r}var wG=.001;function TG({duration:e=bG.duration,bounce:t=bG.bounce,velocity:n=bG.velocity,mass:r=bG.mass}){let i,a;bG.maxDuration;let o=1-t;o=mU(bG.minDamping,bG.maxDamping,o),e=mU(bG.minDuration,bG.maxDuration,TU(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=xG(t,o),c=Math.exp(-i);return wG-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=xG(t**2,o);return(-i(t)+wG>0?-1:1)*((a-s)*c)/l}):(i=t=>-.001+Math.exp(-t*e)*((t-n)*e+1),a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=CG(i,a,s);if(e=wU(e),isNaN(c))return{stiffness:bG.stiffness,damping:bG.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var EG=[`duration`,`bounce`],DG=[`stiffness`,`damping`,`mass`];function OG(e,t){return t.some(t=>e[t]!==void 0)}function kG(e){let t={velocity:bG.velocity,stiffness:bG.stiffness,damping:bG.damping,mass:bG.mass,isResolvedFromDuration:!1,...e};if(!OG(e,DG)&&OG(e,EG))if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*mU(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:bG.mass,stiffness:i,damping:a}}else{let n=TG({...e,velocity:0});t={...t,...n,mass:bG.mass},t.isResolvedFromDuration=!0}return t}function AG(e=bG.visualDuration,t=bG.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=kG({...n,velocity:-TU(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=TU(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?bG.restSpeed.granular:bG.restSpeed.default,i||=v?bG.restDelta.granular:bG.restDelta.default;let y,b,x,S,C,w;if(h<1)x=xG(_,h),S=(m+h*_*g)/x,y=e=>{let t=Math.exp(-h*_*e);return o-t*(S*Math.sin(x*e)+g*Math.cos(x*e))},C=h*_*S+g*x,w=h*_*g-S*x,b=e=>Math.exp(-h*_*e)*(C*Math.sin(x*e)+w*Math.cos(x*e));else if(h===1){y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);let e=m+_*g;b=t=>Math.exp(-_*t)*(_*e*t-m)}else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};let t=(m+h*_*g)/e,n=h*_*t-g*e,r=h*_*g-t*e;b=t=>{let i=Math.exp(-h*_*t),a=Math.min(e*t,300);return i*(n*Math.sinh(a)+r*Math.cosh(a))}}let T={calculatedDuration:p&&d||null,velocity:e=>wU(b(e)),next:e=>{if(!p&&h<1){let t=Math.exp(-h*_*e),n=Math.sin(x*e),a=Math.cos(x*e),c=o-t*(S*n+g*a),l=wU(t*(C*n+w*a));return s.done=Math.abs(l)<=r&&Math.abs(o-c)<=i,s.value=s.done?o:c,s}let t=y(e);if(p)s.done=e>=d;else{let n=wU(b(e));s.done=Math.abs(n)<=r&&Math.abs(o-t)<=i}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(vG(T),_G),t=gG(t=>T.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return T}AG.applyToOptions=e=>{let t=yG(e,100,AG);return e.ease=t.ease,e.duration=wU(t.duration),e.type=`keyframes`,e};var jG=5;function MG(e,t,n){let r=Math.max(t-jG,0);return EU(n-e(r),t-r)}function NG({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=AG({keyframes:[f.value,m(f.value)],velocity:MG(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function PG(e,t,n){let r=[],i=n||hU.mix||mG,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=xU(Array.isArray(t)?t[n]||bU:t,a)),r.push(a)}return r}function FG(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(t.length,a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=PG(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=SU(e[r],e[r+1],n);return s[r](i)};return n?t=>l(mU(e[0],e[a-1],t)):l}function IG(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=SU(0,t,r);e.push(eG(n,1,i))}}function LG(e){let t=[0];return IG(t,e.length-1),t}function RG(e,t){return e.map(e=>e*t)}function zG(e,t){return e.map(()=>t||UU).splice(0,e.length-1)}function BG({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=WU(r)?r.map(JU):JU(r),a={done:!1,value:t[0]},o=FG(RG(n&&n.length===t.length?n:LG(t),e),t,{ease:Array.isArray(i)?i:zG(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var VG=e=>e!==null;function HG(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(VG),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var UG={decay:NG,inertia:NG,tween:BG,keyframes:BG,spring:AG};function WG(e){typeof e.type==`string`&&(e.type=UG[e.type])}var GG=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},KG=e=>e/100,qG=class extends GG{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==aW.now()&&this.tick(aW.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;WG(e);let{type:t=BG,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||BG;s!==BG&&typeof o[0]!=`number`&&(this.mixKeyframes=xU(KG,mG(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=vG(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime===null?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=mU(0,1,n)*o}let b;_?(this.delayState.value=l[0],b=this.delayState):b=y.next(v),i&&!_&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==NG&&(b.value=HG(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return TU(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+TU(e)}get time(){return TU(this.currentTime)}set time(e){e=wU(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return MG(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(aW.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=TU(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=hG,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(aW.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function JG(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var YG=e=>e*180/Math.PI,XG=e=>QG(YG(Math.atan2(e[1],e[0]))),ZG={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:XG,rotateZ:XG,skewX:e=>YG(Math.atan(e[1])),skewY:e=>YG(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},QG=e=>(e%=360,e<0&&(e+=360),e),$G=XG,eK=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),tK=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),nK={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:eK,scaleY:tK,scale:e=>(eK(e)+tK(e))/2,rotateX:e=>QG(YG(Math.atan2(e[6],e[5]))),rotateY:e=>QG(YG(Math.atan2(-e[2],e[0]))),rotateZ:$G,rotate:$G,skewX:e=>YG(Math.atan(e[4])),skewY:e=>YG(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function rK(e){return+!!e.includes(`scale`)}function iK(e,t){if(!e||e===`none`)return rK(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=nK,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=ZG,i=t}if(!i)return rK(t);let a=r[t],o=i[1].split(`,`).map(oK);return typeof a==`function`?a(o):o[a]}var aK=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return iK(n,t)};function oK(e){return parseFloat(e.trim())}var sK=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],cK=new Set([...sK,`pathRotation`]),lK=e=>e===fW||e===kW,uK=new Set([`x`,`y`,`z`]),dK=sK.filter(e=>!uK.has(e));function fK(e){let t=[];return dK.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var pK={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>iK(t,`x`),y:(e,{transform:t})=>iK(t,`y`)};pK.translateX=pK.x,pK.translateY=pK.y;var mK=new Set,hK=!1,gK=!1,_K=!1;function vK(){if(gK){let e=Array.from(mK).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=fK(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}gK=!1,hK=!1,mK.forEach(e=>e.complete(_K)),mK.clear()}function yK(){mK.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(gK=!0)})}function bK(){_K=!0,yK(),vK(),_K=!1}var xK=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(mK.add(this),hK||(hK=!0,$U.read(yK),$U.resolveKeyframes(vK))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}JG(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),mK.delete(this)}cancel(){this.state===`scheduled`&&(mK.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},SK=e=>e.startsWith(`--`);function CK(e,t,n){SK(t)?e.style.setProperty(t,n):e.style[t]=n}var wK={};function TK(e,t){let n=yU(e);return()=>wK[t]??n()}var EK=TK(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),DK=TK(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),OK=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,kK={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:OK([0,.65,.55,1]),circOut:OK([.55,0,1,.45]),backIn:OK([.31,.01,.66,-.59]),backOut:OK([.33,1.53,.69,.99])};function AK(e,t){if(e)return typeof e==`function`?DK()?gG(e,t):`ease-out`:GU(e)?OK(e):Array.isArray(e)?e.map(e=>AK(e,t)||kK.easeOut):kK[e]}function jK(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=AK(s,i);Array.isArray(d)&&(u.easing=d);let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};return l&&(f.pseudoElement=l),e.animate(u,f)}function MK(e){return typeof e==`function`&&`applyToOptions`in e}function NK({type:e,...t}){return MK(e)&&DK()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var PK=class extends GG{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=NK(e);this.animation=jK(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=HG(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),CK(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e===`idle`||e===`finished`||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return TU(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+TU(e)}get time(){return TU(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=wU(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&EK()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),bU):r(this)}},FK={anticipate:LU,backInOut:IU,circInOut:BU};function IK(e){return e in FK}function LK(e){typeof e.ease==`string`&&IK(e.ease)&&(e.ease=FK[e.ease])}var RK=10,zK=class extends PK{constructor(e){LK(e),WG(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new qG({...a,autoplay:!1}),s=Math.max(RK,aW.now()-this.startTime),c=mU(0,RK,s-RK),l=o.sample(s).value,{name:u}=this.options;i&&u&&CK(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},BK=(e,t)=>t!==`zIndex`&&!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(XW.test(e)||e===`0`)&&!e.startsWith(`url(`));function VK(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function HK(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=BK(i,t),s=BK(a,t);return`${t}${i}${a}${o?a:i}`,!o||!s?!1:VK(e)||(n===`spring`||MK(n))&&r}function UK(e){e.duration=0,e.type=`keyframes`}var WK=new Set([`opacity`,`clipPath`,`filter`,`transform`]),GK=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function KK(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&GK.test(e[t]))return!0;return!1}var qK=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),JK=yU(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function YK(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:c,transformTemplate:l}=t.owner.getProps();return JK()&&n&&(WK.has(n)||qK.has(n)&&KK(s))&&(n!==`transform`||!l)&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var XK=40,ZK=class extends GG{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=aW.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u},f=l?.KeyframeResolver||xK;this.keyframeResolver=new f(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=aW.now();let u=!0;HK(e,i,a,o)||(u=!1,(hU.instantAnimations||!s)&&l?.(HG(e,n,t)),e[0]=e[e.length-1],UK(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>XK?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&YK(d),p=d.motionValue?.owner?.current,m;if(f)try{m=new zK({...d,element:p})}catch{m=new qG(d)}else m=new qG(d);m.finished.then(()=>{this.notifyFinished()}).catch(bU),this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),bK()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function QK(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var $K=30,eq=e=>!isNaN(parseFloat(e)),tq={current:void 0},nq=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=aW.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=aW.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=eq(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new CU);let n=this.events[e].add(t);return e===`change`?()=>{n(),$U.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return tq.current&&tq.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=aW.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>$K)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,$K);return EU(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function rq(e,t){return new nq(e,t)}function iq(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function aq(e,t){let n=e?.[t]??e?.default??e;return n===e?n:iq(n,e)}var oq={type:`spring`,stiffness:500,damping:25,restSpeed:10},sq=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),cq={type:`keyframes`,duration:.8},lq={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},uq=(e,{keyframes:t})=>t.length>2?cq:cK.has(e)?e.startsWith(`scale`)?sq(t[1]):oq:lq,dq=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function fq(e){for(let t in e)if(!dq.has(t))return!0;return!1}var pq=(e,t,n,r={},i,a)=>o=>{let s=aq(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=wU(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};fq(s)||Object.assign(u,uq(e,u)),u.duration&&=wU(u.duration),u.repeatDelay&&=wU(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(UK(u),u.delay===0&&(d=!0)),(hU.instantAnimations||hU.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,UK(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=HG(u.keyframes,s);if(e!==void 0){$U.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new qG(u):new ZK(u)},mq=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function hq(e){let t=mq.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function gq(e,t,n=1){`${e}`;let[r,i]=hq(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return gU(e)?parseFloat(e):e}return lW(i)?gq(i,t,n+1):i}function _q(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function vq(e,t,n,r){if(typeof t==`function`){let[i,a]=_q(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=_q(r);t=t(n===void 0?e.custom:n,i,a)}return t}function yq(e,t,n){let r=e.getProps();return vq(r,t,n===void 0?r.custom:n,e)}var bq=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...sK]),xq=e=>Array.isArray(e);function Sq(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,rq(n))}function Cq(e){return xq(e)?e[e.length-1]||0:e}function wq(e,t){let{transitionEnd:n={},transition:r={},...i}=yq(e,t)||{};i={...i,...n};for(let t in i)Sq(e,t,Cq(i[t]))}var Tq=e=>!!(e&&e.getVelocity);function Eq(e){return!!(Tq(e)&&e.add)}function Dq(e,t){let n=e.getValue(`willChange`);if(Eq(n))return n.add(t);if(!n&&hU.WillChange){let n=new hU.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function Oq(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var kq=`data-`+Oq(`framerAppearId`);function Aq(e){return e.props[kq]}function jq({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Mq(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?iq(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState&&e.animationState.getState()[i],p=a?.path;p&&p.animateVisualElement(e,s,a,n,d);for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&jq(f,t))continue;let o={delay:n,...aq(a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){$U.update(()=>r.set(i));continue}let p=!1;if(window.MotionHandoffAnimation){let n=Aq(e);if(n){let e=window.MotionHandoffAnimation(n,t,$U);e!==null&&(o.startTime=e,p=!0)}}Dq(e,t);let m=l??e.shouldReduceMotion;r.start(pq(t,r,i,m&&bq.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>$U.update(()=>{o&&wq(e,o)});d.length?Promise.all(d).then(t):t()}return d}function Nq(e,t,n={}){let r=yq(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(Mq(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return Pq(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}else return Promise.all([a(),o(n.delay)])}function Pq(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(Nq(c,t,{...o,delay:n+(typeof r==`function`?0:r)+QK(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function Fq(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>Nq(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=Nq(e,t,n);else{let i=typeof t==`function`?yq(e,t,n.custom):t;r=Promise.all(Mq(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var Iq={test:e=>e===`auto`,parse:e=>e},Lq=e=>t=>t.test(e),Rq=[fW,kW,OW,DW,jW,AW,Iq],zq=e=>Rq.find(Lq(e));function Bq(e){return typeof e==`number`?e===0:e===null||e===`none`||e===`0`||vU(e)}var Vq=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function Hq(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(gW)||[];if(!r)return e;let i=n.replace(r,``),a=+!!Vq.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var Uq=/\b([a-z-]*)\(.*?\)/gu,Wq={...XW,getAnimatableNone:e=>{let t=e.match(Uq);return t?t.map(Hq).join(` `):e}},Gq={...XW,getAnimatableNone:e=>{let t=XW.parse(e);return XW.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},Kq={...fW,transform:Math.round},qq={borderWidth:kW,borderTopWidth:kW,borderRightWidth:kW,borderBottomWidth:kW,borderLeftWidth:kW,borderRadius:kW,borderTopLeftRadius:kW,borderTopRightRadius:kW,borderBottomRightRadius:kW,borderBottomLeftRadius:kW,width:kW,maxWidth:kW,height:kW,maxHeight:kW,top:kW,right:kW,bottom:kW,left:kW,inset:kW,insetBlock:kW,insetBlockStart:kW,insetBlockEnd:kW,insetInline:kW,insetInlineStart:kW,insetInlineEnd:kW,padding:kW,paddingTop:kW,paddingRight:kW,paddingBottom:kW,paddingLeft:kW,paddingBlock:kW,paddingBlockStart:kW,paddingBlockEnd:kW,paddingInline:kW,paddingInlineStart:kW,paddingInlineEnd:kW,margin:kW,marginTop:kW,marginRight:kW,marginBottom:kW,marginLeft:kW,marginBlock:kW,marginBlockStart:kW,marginBlockEnd:kW,marginInline:kW,marginInlineStart:kW,marginInlineEnd:kW,fontSize:kW,backgroundPositionX:kW,backgroundPositionY:kW,rotate:DW,pathRotation:DW,rotateX:DW,rotateY:DW,rotateZ:DW,scale:mW,scaleX:mW,scaleY:mW,scaleZ:mW,skew:DW,skewX:DW,skewY:DW,distance:kW,translateX:kW,translateY:kW,translateZ:kW,x:kW,y:kW,z:kW,perspective:kW,transformPerspective:kW,opacity:pW,originX:MW,originY:MW,originZ:kW,zIndex:Kq,fillOpacity:pW,strokeOpacity:pW,numOctaves:Kq},Jq={...qq,color:PW,backgroundColor:PW,outlineColor:PW,fill:PW,stroke:PW,borderColor:PW,borderTopColor:PW,borderRightColor:PW,borderBottomColor:PW,borderLeftColor:PW,filter:Wq,WebkitFilter:Wq,mask:Gq,WebkitMask:Gq},Yq=e=>Jq[e],Xq=new Set([Wq,Gq]);function Zq(e,t){let n=Yq(e);return Xq.has(n)||(n=XW),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var Qq=new Set([`auto`,`none`,`0`]);function $q(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!Qq.has(t)&&UW(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=Zq(n,i)}var eJ=class extends xK{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),lW(r))){let i=gq(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!bq.has(n)||e.length!==2)return;let[r,i]=e,a=zq(r),o=zq(i);if(dW(r)!==dW(i)&&pK[n]){this.needsMeasurement=!0;return}if(a!==o)if(lK(a)&&lK(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else pK[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||Bq(e[t]))&&n.push(t);n.length&&$q(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=pK[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=pK[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}},tJ=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`];function nJ(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var rJ=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function iJ(e){return _U(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}var{schedule:aJ,cancel:Que}=QU(queueMicrotask,!1),oJ={x:!1,y:!1};function sJ(){return oJ.x||oJ.y}function cJ(e){return e===`x`||e===`y`?oJ[e]?null:(oJ[e]=!0,()=>{oJ[e]=!1}):oJ.x||oJ.y?null:(oJ.x=oJ.y=!0,()=>{oJ.x=oJ.y=!1})}function lJ(e,t){let n=nJ(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function uJ(e){return!(e.pointerType===`touch`||sJ())}function dJ(e,t,n={}){let[r,i,a]=lJ(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{if(e.pointerType!==`touch`){if(n){r=!0;return}s(e)}};e.addEventListener(`pointerenter`,n=>{if(!uJ(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var fJ=(e,t)=>t?e===t||fJ(e,t.parentElement):!1,pJ=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,mJ=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function hJ(e){return mJ.has(e.tagName)||e.isContentEditable===!0}var gJ=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function _J(e){return gJ.has(e.tagName)||e.isContentEditable===!0}var vJ=new WeakSet;function yJ(e){return t=>{t.key===`Enter`&&e(t)}}function bJ(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var xJ=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=yJ(()=>{if(vJ.has(n))return;bJ(n,`down`);let e=yJ(()=>{bJ(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>bJ(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function SJ(e){return pJ(e)&&!sJ()}var CJ=new WeakSet;function wJ(e,t,n={}){let[r,i,a]=lJ(e,n),o=e=>{let r=e.currentTarget;if(!SJ(e)||CJ.has(e))return;vJ.add(r),n.stopPropagation&&CJ.add(e);let a=t(r,e),o={...i,capture:!0},s=(e,t)=>{window.removeEventListener(`pointerup`,c,o),window.removeEventListener(`pointercancel`,l,o),vJ.has(r)&&vJ.delete(r),SJ(e)&&typeof a==`function`&&a(e,{success:t})},c=e=>{s(e,r===window||r===document||n.useGlobalTarget||fJ(r,e.target))},l=e=>{s(e,!1)};window.addEventListener(`pointerup`,c,o),window.addEventListener(`pointercancel`,l,o)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),iJ(e)&&(e.addEventListener(`focus`,e=>xJ(e,i)),!hJ(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function TJ(e){return _U(e)&&`ownerSVGElement`in e}var EJ=new WeakMap,DJ,OJ=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:TJ(r)&&`getBBox`in r?r.getBBox()[t]:r[n],kJ=OJ(`inline`,`width`,`offsetWidth`),AJ=OJ(`block`,`height`,`offsetHeight`);function jJ({target:e,borderBoxSize:t}){EJ.get(e)?.forEach(n=>{n(e,{get width(){return kJ(e,t)},get height(){return AJ(e,t)}})})}function MJ(e){e.forEach(jJ)}function NJ(){typeof ResizeObserver>`u`||(DJ=new ResizeObserver(MJ))}function PJ(e,t){DJ||NJ();let n=nJ(e);return n.forEach(e=>{let n=EJ.get(e);n||(n=new Set,EJ.set(e,n)),n.add(t),DJ?.observe(e)}),()=>{n.forEach(e=>{let n=EJ.get(e);n?.delete(t),n?.size||DJ?.unobserve(e)})}}var FJ=new Set,IJ;function LJ(){IJ=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};FJ.forEach(t=>t(e))},window.addEventListener(`resize`,IJ)}function RJ(e){return FJ.add(e),IJ||LJ(),()=>{FJ.delete(e),!FJ.size&&typeof IJ==`function`&&(window.removeEventListener(`resize`,IJ),IJ=void 0)}}function zJ(e,t){return typeof e==`function`?RJ(e):PJ(e,t)}var BJ={value:null,addProjectionMetrics:null};function VJ(e){return TJ(e)&&e.tagName===`svg`}var HJ=[...Rq,PW,XW],UJ=e=>HJ.find(Lq(e)),WJ=()=>({translate:0,scale:1,origin:0,originPoint:0}),GJ=()=>({x:WJ(),y:WJ()}),KJ=()=>({min:0,max:0}),qJ=()=>({x:KJ(),y:KJ()}),JJ=new WeakMap;function YJ(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function XJ(e){return typeof e==`string`||Array.isArray(e)}var ZJ=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],QJ=[`initial`,...ZJ];function $J(e){return YJ(e.animate)||QJ.some(t=>XJ(e[t]))}function eY(e){return!!($J(e)||e.variants)}function tY(e,t,n){for(let r in t){let i=t[r],a=n[r];if(Tq(i))e.addValue(r,i);else if(Tq(a))e.addValue(r,rq(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,rq(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var nY={current:null},rY={current:!1},iY=typeof window<`u`;function aY(){if(rY.current=!0,iY)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>nY.current=e.matches;e.addEventListener(`change`,t),t()}else nY.current=!1}var oY=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],sY={};function cY(e){sY=e}function lY(){return sY}var uY=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=xK,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=aW.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,$U.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=$J(t),this.isVariantNode=eY(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&Tq(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,JJ.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(rY.current||aY(),this.shouldReduceMotion=nY.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),eW(this.notifyUpdate),eW(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&WK.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new PK({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:wU(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=cK.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&$U.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in sY){let t=sY[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):qJ()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<oY.length;t++){let n=oY[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=tY(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=rq(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(gU(n)||vU(n))?n=parseFloat(n):!UJ(n)&&XW.test(t)&&(n=Zq(e,t)),this.setBaseTarget(e,Tq(n)?n.get():n)),Tq(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=vq(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!Tq(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new CU),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){aJ.render(this.render)}},dY=class extends uY{constructor(){super(...arguments),this.KeyframeResolver=eJ}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;Tq(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},fY=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function pY({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function mY({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function hY(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function gY(e){return e===void 0||e===1}function _Y({scale:e,scaleX:t,scaleY:n}){return!gY(e)||!gY(t)||!gY(n)}function vY(e){return _Y(e)||yY(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function yY(e){return bY(e.x)||bY(e.y)}function bY(e){return e&&e!==`0%`}function xY(e,t,n){return n+t*(e-n)}function SY(e,t,n,r,i){return i!==void 0&&(e=xY(e,i,r)),xY(e,n,r)+t}function CY(e,t=0,n=1,r,i){e.min=SY(e.min,t,n,r,i),e.max=SY(e.max,t,n,r,i)}function wY(e,{x:t,y:n}){CY(e.x,t.translate,t.scale,t.originPoint),CY(e.y,n.translate,n.scale,n.originPoint)}var TY=.999999999999,EY=1.0000000000001;function DY(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(OY(e.x,-a.scroll.offset.x),OY(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,wY(e,o)),r&&vY(a.latestValues)&&jY(e,a.latestValues,a.layout?.layoutBox))}t.x<EY&&t.x>TY&&(t.x=1),t.y<EY&&t.y>TY&&(t.y=1)}function OY(e,t){e.min+=t,e.max+=t}function kY(e,t,n,r,i=.5){CY(e,t,n,eG(e.min,e.max,i),r)}function AY(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function jY(e,t,n){let r=n??e;kY(e.x,AY(t.x,r.x),t.scaleX,t.scale,t.originX),kY(e.y,AY(t.y,r.y),t.scaleY,t.scale,t.originY)}function MY(e,t){return pY(hY(e.getBoundingClientRect(),t))}function NY(e,t,n){let r=MY(e,n),{scroll:i}=t;return i&&(OY(r.x,i.offset.x),OY(r.y,i.offset.y)),r}var PY={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},FY=sK.length;function IY(e,t,n){let r=``,i=!0;for(let a=0;a<FY;a++){let o=sK[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===+!!o.startsWith(`scale`);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=rJ(s,qq[o]);if(!c){i=!1;let t=PY[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}let a=e.pathRotation;return a&&(i=!1,r+=`rotate(${rJ(a,qq.pathRotation)}) `),r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function LY(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(cK.has(e)){o=!0;continue}else if(sW(e)){i[e]=n;continue}else{let t=rJ(n,qq[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=IY(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}function RY(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function zY(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var BY={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(kW.test(e))e=parseFloat(e);else return e;return`${zY(e,t.target.x)}% ${zY(e,t.target.y)}%`}},VY={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=XW.parse(e);if(i.length>5)return r;let a=XW.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=eG(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},HY={borderRadius:{...BY,applyTo:[...tJ]},borderTopLeftRadius:BY,borderTopRightRadius:BY,borderBottomLeftRadius:BY,borderBottomRightRadius:BY,boxShadow:VY};function UY(e,{layout:t,layoutId:n}){return cK.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!HY[e]||e===`opacity`)}function WY(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(Tq(r[t])||i&&Tq(i[t])||UY(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function GY(e){return window.getComputedStyle(e)}var KY=class extends dY{constructor(){super(...arguments),this.type=`html`,this.renderInstance=RY}readValueFromInstance(e,t){if(cK.has(t))return this.projection?.isProjecting?rK(t):aK(e,t);{let n=GY(e),r=(sW(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return MY(e,t)}build(e,t,n){LY(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return WY(e,t,n)}},qY={offset:`stroke-dashoffset`,array:`stroke-dasharray`},JY={offset:`strokeDashoffset`,array:`strokeDasharray`};function YY(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?qY:JY;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var XY=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function ZY(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(LY(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox);for(let e of XY)d[e]!==void 0&&(f[e]=d[e],delete d[e]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&YY(d,i,a,o,!1)}var QY=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]),$Y=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function eX(e,t,n,r){RY(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(QY.has(n)?n:Oq(n),t.attrs[n])}function tX(e,t,n){let r=WY(e,t,n);for(let n in e)if(Tq(e[n])||Tq(t[n])){let t=sK.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var nX=class extends dY{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=qJ}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(cK.has(t)){let e=Yq(t);return e&&e.default||0}return t=QY.has(t)?t:Oq(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return tX(e,t,n)}build(e,t,n){ZY(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){eX(e,t,n,r)}mount(e){this.isSVGTag=$Y(e.tagName),super.mount(e)}},rX=QJ.length;function iX(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&iX(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<rX;n++){let r=QJ[n],i=e.props[r];(XJ(i)||i===!1)&&(t[r]=i)}return t}function aX(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var oX=[...ZJ].reverse(),sX=ZJ.length;function cX(e){return t=>Promise.all(t.map(({animation:t,options:n})=>Fq(e,t,n)))}function lX(e){let t=cX(e),n=fX(),r=!0,i=!1,a=t=>(n,r)=>{let i=yq(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function o(n){t=n(e)}function s(o){let{props:s}=e,c=iX(e.parent)||{},l=[],u=new Set,d={},f=1/0;for(let t=0;t<sX;t++){let p=oX[t],m=n[p],h=s[p]===void 0?c[p]:s[p],g=XJ(h),_=p===o?m.isActive:null;_===!1&&(f=t);let v=h===c[p]&&h!==s[p]&&g;if(v&&(r||i)&&e.manuallyAnimateOnMount&&(v=!1),m.protectedKeys={...d},!m.isActive&&_===null||!h&&!m.prevProp||YJ(h)||typeof h==`boolean`)continue;if(p===`exit`&&m.isActive&&_!==!0){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let y=uX(m.prevProp,h),b=y||p===o&&m.isActive&&!v&&g||t>f&&g,x=!1,S=Array.isArray(h)?h:[h],C=S.reduce(a(p),{});_===!1&&(C={});let{prevResolvedValues:w={}}=m,T={...w,...C},E=t=>{b=!0,u.has(t)&&(x=!0,u.delete(t)),m.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in T){let t=C[e],n=w[e];if(d.hasOwnProperty(e))continue;let r=!1;r=xq(t)&&xq(n)?!aX(t,n)||y:t!==n,r?t==null?u.add(e):E(e):t!==void 0&&u.has(e)?E(e):m.protectedKeys[e]=!0}m.prevProp=h,m.prevResolvedValues=C,m.isActive&&(d={...d,...C}),(r||i)&&e.blockInitialAnimation&&(b=!1);let D=v&&y;b&&(!D||x)&&l.push(...S.map(t=>{let n={type:p};if(typeof t==`string`&&(r||i)&&!D&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=yq(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=QK(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if(typeof s.initial!=`boolean`){let n=yq(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),l.push({animation:t})}let p=!!l.length;return r&&(s.initial===!1||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,i=!1,p?t(l):Promise.resolve()}function c(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=s(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:s,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=fX(),i=!0}}}function uX(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!aX(t,e):!1}function dX(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function fX(){return{animate:dX(!0),whileInView:dX(),whileHover:dX(),whileTap:dX(),whileDrag:dX(),whileFocus:dX(),exit:dX()}}function pX(e,t){e.min=t.min,e.max=t.max}function mX(e,t){pX(e.x,t.x),pX(e.y,t.y)}function hX(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var gX=.9999,_X=1.0001,vX=-.01,yX=.01;function bX(e){return e.max-e.min}function xX(e,t,n){return Math.abs(e-t)<=n}function SX(e,t,n,r=.5){e.origin=r,e.originPoint=eG(t.min,t.max,e.origin),e.scale=bX(n)/bX(t),e.translate=eG(n.min,n.max,e.origin)-e.originPoint,(e.scale>=gX&&e.scale<=_X||isNaN(e.scale))&&(e.scale=1),(e.translate>=vX&&e.translate<=yX||isNaN(e.translate))&&(e.translate=0)}function CX(e,t,n,r){SX(e.x,t.x,n.x,r?r.originX:void 0),SX(e.y,t.y,n.y,r?r.originY:void 0)}function wX(e,t,n,r=0){e.min=(r?eG(n.min,n.max,r):n.min)+t.min,e.max=e.min+bX(t)}function TX(e,t,n,r){wX(e.x,t.x,n.x,r?.x),wX(e.y,t.y,n.y,r?.y)}function EX(e,t,n,r=0){let i=r?eG(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+bX(t)}function DX(e,t,n,r){EX(e.x,t.x,n.x,r?.x),EX(e.y,t.y,n.y,r?.y)}function OX(e,t,n,r,i){return e-=t,e=xY(e,1/n,r),i!==void 0&&(e=xY(e,1/i,r)),e}function kX(e,t=0,n=1,r=.5,i,a=e,o=e){if(OW.test(t)&&(t=parseFloat(t),t=eG(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=eG(a.min,a.max,r);e===a&&(s-=t),e.min=OX(e.min,t,n,s,i),e.max=OX(e.max,t,n,s,i)}function AX(e,t,[n,r,i],a,o){kX(e,t[n],t[r],t[i],t.scale,a,o)}var jX=[`x`,`scaleX`,`originX`],MX=[`y`,`scaleY`,`originY`];function NX(e,t,n,r){AX(e.x,t,jX,n?n.x:void 0,r?r.x:void 0),AX(e.y,t,MX,n?n.y:void 0,r?r.y:void 0)}function PX(e){return e.translate===0&&e.scale===1}function FX(e){return PX(e.x)&&PX(e.y)}function IX(e,t){return e.min===t.min&&e.max===t.max}function LX(e,t){return IX(e.x,t.x)&&IX(e.y,t.y)}function RX(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function zX(e,t){return RX(e.x,t.x)&&RX(e.y,t.y)}function BX(e){return bX(e.x)/bX(e.y)}function VX(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function HX(e){return[e(`x`),e(`y`)]}function UX(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,pathRotation:i,rotateX:a,rotateY:o,skewX:s,skewY:c}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotate(${i}deg) `),a&&(r+=`rotateX(${a}deg) `),o&&(r+=`rotateY(${o}deg) `),s&&(r+=`skewX(${s}deg) `),c&&(r+=`skewY(${c}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var WX=tJ.length,GX=e=>typeof e==`string`?parseFloat(e):e,KX=e=>typeof e==`number`||kW.test(e);function qX(e,t,n,r,i,a){i?(e.opacity=eG(0,n.opacity??1,YX(r)),e.opacityExit=eG(t.opacity??1,0,XX(r))):a&&(e.opacity=eG(t.opacity??1,n.opacity??1,r));for(let i=0;i<WX;i++){let a=tJ[i],o=JX(t,a),s=JX(n,a);o===void 0&&s===void 0||(o||=0,s||=0,o===0||s===0||KX(o)===KX(s)?(e[a]=Math.max(eG(GX(o),GX(s),r),0),(OW.test(s)||OW.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=eG(t.rotate||0,n.rotate||0,r))}function JX(e,t){return e[t]===void 0?e.borderRadius:e[t]}var YX=ZX(0,.5,zU),XX=ZX(.5,.95,bU);function ZX(e,t,n){return r=>r<e?0:r>t?1:n(SU(e,t,r))}function QX(e,t,n){let r=Tq(e)?e:rq(e);return r.start(pq(``,r,t,n)),r.animation}function $X(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var eZ=(e,t)=>e.depth-t.depth,tZ=class{constructor(){this.children=[],this.isDirty=!1}add(e){fU(this.children,e),this.isDirty=!0}remove(e){pU(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(eZ),this.isDirty=!1,this.children.forEach(e)}};function nZ(e,t){let n=aW.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(eW(r),e(a-t))};return $U.setup(r,!0),()=>eW(r)}function rZ(e){return Tq(e)?e.get():e}var iZ=class{constructor(){this.members=[]}add(e){fU(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;(!r||r.isConnected===!1)&&!n.snapshot&&(pU(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(pU(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}},aZ={hasAnimatedSinceResize:!0,hasEverUpdated:!1},oZ={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},sZ=[``,`X`,`Y`,`Z`],cZ=1e3,lZ=0;function uZ(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function dZ(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=Aq(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,$U,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&dZ(r)}function fZ({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=lZ++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,BJ.value&&(oZ.nodes=oZ.calculatedTargetDeltas=oZ.calculatedProjections=0),this.nodes.forEach(hZ),this.nodes.forEach(wZ),this.nodes.forEach(TZ),this.nodes.forEach(gZ),BJ.addProjectionMetrics&&BJ.addProjectionMetrics(oZ)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new tZ)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new CU),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=TJ(t)&&!VJ(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;$U.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=nZ(i,250),aZ.hasAnimatedSinceResize&&(aZ.hasAnimatedSinceResize=!1,this.nodes.forEach(CZ)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||MZ,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!zX(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...aq(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l,t.path)}else t||CZ(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),eW(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(EZ),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&dZ(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(yZ),this.nodes.forEach(vZ);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(bZ);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(xZ),this.nodes.forEach(SZ),this.nodes.forEach(pZ),this.nodes.forEach(mZ)):this.nodes.forEach(bZ),this.clearAllSnapshots();let e=aW.now();tW.delta=mU(0,1e3/60,e-tW.timestamp),tW.timestamp=e,tW.isProcessing=!0,nW.update.process(tW),nW.preRender.process(tW),nW.render.process(tW),tW.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,aJ.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(_Z),this.sharedNodes.forEach(DZ)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,$U.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){$U.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!bX(this.snapshot.measuredBox.x)&&!bX(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||=qJ(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!FX(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||vY(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),IZ(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return qJ();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(RZ))){let{scroll:e}=this.root;e&&(OY(t.x,e.offset.x),OY(t.y,e.offset.y))}return t}removeElementScroll(e){let t=qJ();if(mX(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&mX(t,e),OY(t.x,i.offset.x),OY(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||qJ();mX(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(OY(r.x,-n.scroll.offset.x),OY(r.y,-n.scroll.offset.y)),vY(n.latestValues)&&jY(r,n.latestValues,n.layout?.layoutBox)}return vY(this.latestValues)&&jY(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=qJ();mX(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!vY(n.latestValues))continue;let r;n.instance&&(_Y(n.latestValues)&&n.updateSnapshot(),r=qJ(),mX(r,n.measurePageBox())),NX(t,n.latestValues,n.snapshot?.layoutBox,r)}return vY(this.latestValues)&&NX(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==tW.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=tW.timestamp;let a=this.getClosestProjectingParent();a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=qJ(),this.targetWithTransforms=qJ()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),TX(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):mX(this.target,this.layout.layoutBox),wY(this.target,this.targetDelta)):mX(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),BJ.value&&oZ.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||_Y(this.parent.latestValues)||yY(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=qJ(),this.relativeTargetOrigin=qJ(),DX(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),mX(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===tW.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;mX(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;DY(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=qJ());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(hX(this.prevProjectionDelta.x,this.projectionDelta.x),hX(this.prevProjectionDelta.y,this.projectionDelta.y)),CX(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!VX(this.projectionDelta.x,this.prevProjectionDelta.x)||!VX(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),BJ.value&&oZ.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=GJ(),this.projectionDelta=GJ(),this.projectionDeltaWithTransform=GJ()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=GJ();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=qJ(),c=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,d=!!(c&&!u&&this.options.crossfade===!0&&!this.path.some(jZ));this.animationProgress=0;let f,p=n?.interpolateProjection(e);this.mixTargetDelta=t=>{let n=t/1e3,r=p?.(n);r?(o.x.translate=r.x,o.x.scale=eG(e.x.scale,1,n),o.x.origin=e.x.origin,o.x.originPoint=e.x.originPoint,o.y.translate=r.y,o.y.scale=eG(e.y.scale,1,n),o.y.origin=e.y.origin,o.y.originPoint=e.y.originPoint):(OZ(o.x,e.x,n),OZ(o.y,e.y,n)),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(DX(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),AZ(this.relativeTarget,this.relativeTargetOrigin,s,n),f&&LX(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=qJ(),mX(f,this.relativeTarget)),c&&(this.animationValues=a,qX(a,i,this.latestValues,n,d,u)),r&&r.rotate!==void 0&&(this.animationValues||=a,this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(eW(this.pendingAnimation),void 0),this.pendingAnimation=$U.update(()=>{aZ.hasAnimatedSinceResize=!0,this.motionValue||=rq(0),this.motionValue.jump(0,!1),this.currentAnimation=QX(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(cZ),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&LZ(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||qJ();let t=bX(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=bX(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}mX(t,n),jY(t,i),CX(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new iZ),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&uZ(`z`,e,r,this.animationValues);for(let t=0;t<sZ.length;t++)uZ(`rotate${sZ[t]}`,e,r,this.animationValues),uZ(`skew${sZ[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=rZ(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=rZ(t?.pointerEvents)||``),this.hasProjected&&!vY(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=UX(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,r.animationValues?e.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:e.opacity=r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in HY){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=HY[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?rZ(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(vZ),this.root.sharedNodes.clear()}}}function pZ(e){e.updateLayout()}function mZ(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i===`size`)HX(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=bX(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;pX(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else LZ(i,t.layoutBox,n)&&HX(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=bX(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=GJ();CX(o,n,t.layoutBox);let s=GJ();a?CX(s,e.applyTransform(r,!0),t.measuredBox):CX(s,n,t.layoutBox);let c=!FX(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=e.options.layoutAnchor||void 0,s=qJ();DX(s,t.layoutBox,i.layoutBox,o);let c=qJ();DX(c,n,a.layoutBox,o),zX(s,c)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=c,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function hZ(e){BJ.value&&oZ.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function gZ(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function _Z(e){e.clearSnapshot()}function vZ(e){e.clearMeasurements()}function yZ(e){e.isLayoutDirty=!0,e.updateLayout()}function bZ(e){e.isLayoutDirty=!1}function xZ(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function SZ(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function CZ(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function wZ(e){e.resolveTargetDelta()}function TZ(e){e.calcProjection()}function EZ(e){e.resetSkewAndRotation()}function DZ(e){e.removeLeadSnapshot()}function OZ(e,t,n){e.translate=eG(t.translate,0,n),e.scale=eG(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function kZ(e,t,n,r){e.min=eG(t.min,n.min,r),e.max=eG(t.max,n.max,r)}function AZ(e,t,n,r){kZ(e.x,t.x,n.x,r),kZ(e.y,t.y,n.y,r)}function jZ(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var MZ={duration:.45,ease:[.4,0,.1,1]},NZ=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),PZ=NZ(`applewebkit/`)&&!NZ(`chrome/`)?Math.round:bU;function FZ(e){e.min=PZ(e.min),e.max=PZ(e.max)}function IZ(e){FZ(e.x),FZ(e.y)}function LZ(e,t,n){return e===`position`||e===`preserve-aspect`&&!xX(BX(t),BX(n),.2)}function RZ(e){return e!==e.root&&e.scroll?.wasRoot}var zZ=fZ({attachResizeListener:(e,t)=>$X(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),BZ={current:void 0},VZ=fZ({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!BZ.current){let e=new zZ({});e.mount(window),e.setOptions({layoutScroll:!0}),BZ.current=e}return BZ.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),HZ=(0,b.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function UZ(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function WZ(...e){return t=>{let n=!1,r=e.map(e=>{let r=UZ(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():UZ(e[t],null)}}}}function GZ(...e){return b.useCallback(WZ(...e),e)}var KZ=class extends b.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(iJ(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=iJ(e)&&e.offsetWidth||0,r=iJ(e)&&e.offsetHeight||0,i=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top,a.direction=i.direction}return null}componentDidUpdate(){}render(){return this.props.children}};function qZ({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:a}){let o=(0,b.useId)(),s=(0,b.useRef)(null),c=(0,b.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:`ltr`}),{nonce:l}=(0,b.useContext)(HZ),u=GZ(s,e.props?.ref??e?.ref);return(0,b.useInsertionEffect)(()=>{let{width:e,height:u,top:d,left:f,right:p,bottom:m,direction:h}=c.current;if(t||a===!1||!s.current||!e||!u)return;let g=h===`rtl`,_=n===`left`?g?`right: ${p}`:`left: ${f}`:g?`left: ${f}`:`right: ${p}`,v=r===`bottom`?`bottom: ${m}`:`top: ${d}`;s.current.dataset.motionPopId=o;let y=document.createElement(`style`);l&&(y.nonce=l);let b=i??document.head;return b.appendChild(y),y.sheet&&y.sheet.insertRule(`
208
+ [data-motion-pop-id="${o}"] {
209
+ position: absolute !important;
210
+ width: ${e}px !important;
211
+ height: ${u}px !important;
212
+ ${_}px !important;
213
+ ${v}px !important;
214
+ }
215
+ `),()=>{s.current?.removeAttribute(`data-motion-pop-id`),b.contains(y)&&b.removeChild(y)}},[t]),(0,H.jsx)(KZ,{isPresent:t,childRef:s,sizeRef:c,pop:a,children:a===!1?e:b.cloneElement(e,{ref:u})})}var JZ=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:l})=>{let u=lU(YZ),d=(0,b.useId)(),f=(0,b.useRef)(n),p=(0,b.useRef)(r);uU(()=>{f.current=n,p.current=r});let m=!0,h=(0,b.useMemo)(()=>(m=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:e=>{u.set(e,!0);for(let e of u.values())if(!e)return;r&&r()},register:e=>(u.set(e,!1),()=>{u.delete(e),!f.current&&!u.size&&p.current?.()})}),[n,u,r]);return a&&m&&(h={...h}),(0,b.useMemo)(()=>{u.forEach((e,t)=>u.set(t,!1))},[n]),b.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=(0,H.jsx)(qZ,{pop:o===`popLayout`,isPresent:n,anchorX:s,anchorY:c,root:l,children:e}),(0,H.jsx)(dU.Provider,{value:h,children:e})};function YZ(){return new Map}function XZ(e=!0){let t=(0,b.useContext)(dU);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,b.useId)();(0,b.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,b.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var ZZ=e=>e.key||``;function QZ(e){let t=[];return b.Children.forEach(e,e=>{(0,b.isValidElement)(e)&&t.push(e)}),t}var $Z=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a=`sync`,propagate:o=!1,anchorX:s=`left`,anchorY:c=`top`,root:l})=>{let[u,d]=XZ(o),f=(0,b.useMemo)(()=>QZ(e),[e]),p=o&&!u?[]:f.map(ZZ),m=(0,b.useRef)(!0),h=(0,b.useRef)(f),g=lU(()=>new Map),_=(0,b.useRef)(new Set),[v,y]=(0,b.useState)(f),[x,S]=(0,b.useState)(f);uU(()=>{m.current=!1,h.current=f;for(let e=0;e<x.length;e++){let t=ZZ(x[e]);p.includes(t)?(g.delete(t),_.current.delete(t)):g.get(t)!==!0&&g.set(t,!1)}},[x,p.length,p.join(`-`)]);let C=[];if(f!==v){let e=[...f];for(let t=0;t<x.length;t++){let n=x[t],r=ZZ(n);p.includes(r)||(e.splice(t,0,n),C.push(n))}return a===`wait`&&C.length&&(e=C),S(QZ(e)),y(f),null}let{forceRender:w}=(0,b.useContext)(cU);return(0,H.jsx)(H.Fragment,{children:x.map(e=>{let v=ZZ(e),y=o&&!u?!1:f===x||p.includes(v);return(0,H.jsx)(JZ,{isPresent:y,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:l,onExitComplete:y?void 0:()=>{if(_.current.has(v))return;if(g.has(v))_.current.add(v),g.set(v,!0);else return;let e=!0;g.forEach(t=>{t||(e=!1)}),e&&(w?.(),S(h.current),o&&d?.(),r&&r())},anchorX:s,anchorY:c,children:e},v)})})},eQ=(0,b.createContext)({strict:!1}),tQ={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},nQ=!1;function rQ(){if(nQ)return;let e={};for(let t in tQ)e[t]={isEnabled:e=>tQ[t].some(t=>!!e[t])};cY(e),nQ=!0}function iQ(){return rQ(),lY()}function aQ(e){let t=iQ();for(let n in e)t[n]={...t[n],...e[n]};cY(t)}var oQ=new Set(`animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function sQ(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||oQ.has(e)}var cQ=c({default:()=>lQ}),lQ,uQ=o((()=>{throw lQ={},Error(`Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?`)})),dQ=e=>!sQ(e);function fQ(e){typeof e==`function`&&(dQ=t=>t.startsWith(`on`)?!sQ(t):e(t))}try{fQ((uQ(),d(cQ)).default)}catch{}function pQ(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||Tq(e[i])||(dQ(i)||n===!0&&sQ(i)||!t&&!sQ(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}var mQ=(0,b.createContext)({});function hQ(e,t){if($J(e)){let{initial:t,animate:n}=e;return{initial:t===!1||XJ(t)?t:void 0,animate:XJ(n)?n:void 0}}return e.inherit===!1?{}:t}function gQ(e){let{initial:t,animate:n}=hQ(e,(0,b.useContext)(mQ));return(0,b.useMemo)(()=>({initial:t,animate:n}),[_Q(t),_Q(n)])}function _Q(e){return Array.isArray(e)?e.join(` `):e}var vQ=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function yQ(e,t,n){for(let r in t)!Tq(t[r])&&!UY(r,n)&&(e[r]=t[r])}function bQ({transformTemplate:e},t){return(0,b.useMemo)(()=>{let n=vQ();return LY(n,t,e),Object.assign({},n.vars,n.style)},[t])}function xQ(e,t){let n=e.style||{},r={};return yQ(r,n,e),Object.assign(r,bQ(e,t)),r}function SQ(e,t){let n={},r=xQ(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var CQ=()=>({...vQ(),attrs:{}});function wQ(e,t,n,r){let i=(0,b.useMemo)(()=>{let n=CQ();return ZY(n,t,$Y(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};yQ(t,e.style,e),i.style={...t,...i.style}}return i}var TQ=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function EQ(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(TQ.indexOf(e)>-1||/[A-Z]/u.test(e))}function DQ(e,t,n,{latestValues:r},i,a=!1,o){let s=(o??EQ(e)?wQ:SQ)(t,r,i,e),c=pQ(t,typeof e==`string`,a),l=e===b.Fragment?{}:{...c,...s,ref:n},{children:u}=t,d=(0,b.useMemo)(()=>Tq(u)?u.get():u,[u]);return(0,b.createElement)(e,{...l,children:d})}function OQ({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:kQ(n,r,i,e),renderState:t()}}function kQ(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=rZ(a[e]);let{initial:o,animate:s}=e,c=$J(e),l=eY(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!YJ(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=vq(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var AQ=e=>(t,n)=>{let r=(0,b.useContext)(mQ),i=(0,b.useContext)(dU),a=()=>OQ(e,t,r,i);return n?a():lU(a)},jQ=AQ({scrapeMotionValuesFromProps:WY,createRenderState:vQ}),MQ=AQ({scrapeMotionValuesFromProps:tX,createRenderState:CQ}),NQ=Symbol.for(`motionComponentSymbol`);function PQ(e,t,n){let r=(0,b.useRef)(n);(0,b.useInsertionEffect)(()=>{r.current=n});let i=(0,b.useRef)(null);return(0,b.useCallback)(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());let a=r.current;if(typeof a==`function`)if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n);else a&&(a.current=n)},[t])}var FQ=(0,b.createContext)({});function IQ(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function LQ(e,t,n,r,i,a){let{visualElement:o}=(0,b.useContext)(mQ),s=(0,b.useContext)(eQ),c=(0,b.useContext)(dU),l=(0,b.useContext)(HZ),u=l.reducedMotion,d=l.skipAnimations,f=(0,b.useRef)(null),p=(0,b.useRef)(!1);r||=s.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:a}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));let m=f.current,h=(0,b.useContext)(FQ);m&&!m.projection&&i&&(m.type===`html`||m.type===`svg`)&&RQ(f.current,n,i,h);let g=(0,b.useRef)(!1);(0,b.useInsertionEffect)(()=>{m&&g.current&&m.update(n,c)});let _=n[kq],v=(0,b.useRef)(!!_&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(_)&&window.MotionHasOptimisedAnimation?.(_));return uU(()=>{p.current=!0,m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),v.current&&m.animationState&&m.animationState.animateChanges())}),(0,b.useEffect)(()=>{m&&(!v.current&&m.animationState&&m.animationState.animateChanges(),v.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(_)}),!1),m.enteringChildren=void 0)}),m}function RQ(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:zQ(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&IQ(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function zQ(e){if(e)return e.options.allowProjection===!1?zQ(e.parent):e.projection}function BQ(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&aQ(r);let a=n?n===`svg`:EQ(e),o=a?MQ:jQ;function s(n,s){let c,l={...(0,b.useContext)(HZ),...n,layoutId:VQ(n)},{isStatic:u}=l,d=gQ(n),f=o(n,u);if(!u&&typeof window<`u`){HQ(l,r);let t=UQ(l);c=t.MeasureLayout,d.visualElement=LQ(e,f,l,i,t.ProjectionNode,a)}return(0,H.jsxs)(mQ.Provider,{value:d,children:[c&&d.visualElement?(0,H.jsx)(c,{visualElement:d.visualElement,...l}):null,DQ(e,n,PQ(f,d.visualElement,s),f,u,t,a)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,b.forwardRef)(s);return c[NQ]=e,c}function VQ({layoutId:e}){let t=(0,b.useContext)(cU).id;return t&&e!==void 0?t+`-`+e:e}function HQ(e,t){(0,b.useContext)(eQ).strict}function UQ(e){let{drag:t,layout:n}=iQ();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function WQ(e,t){if(typeof Proxy>`u`)return BQ;let n=new Map,r=(n,r)=>BQ(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,BQ(a,void 0,e,t)),n.get(a))})}var GQ=(e,t)=>t.isSVG??EQ(e)?new nX(t):new KY(t,{allowProjection:e!==b.Fragment}),KQ=class extends fY{constructor(e){super(e),e.animationState||=lX(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();YJ(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},qQ=0,JQ={animation:{Feature:KQ},exit:{Feature:class extends fY{constructor(){super(...arguments),this.id=qQ++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&n===!1){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if(typeof e==`string`||typeof e==`object`&&e&&!Array.isArray(e)){let n=yq(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...r}=n;for(let e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive(`exit`,!1);this.isExitComplete=!1;return}let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function YQ(e){return{point:{x:e.pageX,y:e.pageY}}}var XQ=e=>t=>pJ(t)&&e(t,YQ(t));function ZQ(e,t,n,r){return $X(e,t,XQ(n),r)}var QQ=({current:e})=>e?e.ownerDocument.defaultView:null,$Q=(e,t)=>Math.abs(e-t);function e$(e,t){let n=$Q(e.x,t.x),r=$Q(e.y,t.y);return Math.sqrt(n**2+r**2)}var t$=new Set([`auto`,`scroll`]),n$=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=r$(this.lastRawMoveEventInfo,this.transformPagePoint));let e=a$(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=e$(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=tW;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=r$(t,this.transformPagePoint),$U.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=a$(e.type===`pointercancel`?this.lastMoveEventInfo:r$(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!pJ(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=r$(YQ(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=tW;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,a$(s,this.history));let d={passive:!0,capture:!0};this.removeListeners=xU(ZQ(this.contextWindow,`pointermove`,this.handlePointerMove,d),ZQ(this.contextWindow,`pointerup`,this.handlePointerUp,d),ZQ(this.contextWindow,`pointercancel`,this.handlePointerUp,d)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(t$.has(e.overflowX)||t$.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.addEventListener(`scroll`,this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};i.x===0&&i.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),$U.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),eW(this.updatePoint)}};function r$(e,t){return t?{point:t(e.point)}:e}function i$(e,t){return{x:e.x-t.x,y:e.y-t.y}}function a$({point:e},t){return{point:e,delta:i$(e,s$(t)),offset:i$(e,o$(t)),velocity:$ue(t,.1)}}function o$(e){return e[0]}function s$(e){return e[e.length-1]}function $ue(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=s$(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>wU(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>wU(t)*2&&(r=e[1]);let a=TU(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function ede(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?eG(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?eG(n,e,r.max):Math.min(e,n)),e}function c$(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function tde(e,{top:t,left:n,bottom:r,right:i}){return{x:c$(e.x,n,i),y:c$(e.y,t,r)}}function l$(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function nde(e,t){return{x:l$(e.x,t.x),y:l$(e.y,t.y)}}function rde(e,t){let n=.5,r=bX(e),i=bX(t);return i>r?n=SU(t.min,t.max-r,e.min):r>i&&(n=SU(e.min,e.max-i,t.min)),mU(0,1,n)}function ide(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var u$=.35;function ade(e=u$){return e===!1?e=0:e===!0&&(e=u$),{x:d$(e,`left`,`right`),y:d$(e,`top`,`bottom`)}}function d$(e,t,n){return{min:f$(e,t),max:f$(e,n)}}function f$(e,t){return typeof e==`number`?e:e[t]||0}var ode=new WeakMap,sde=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=qJ(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t&&this.snapToCursor(YQ(e).point),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=cJ(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),HX(e=>{let t=this.getAxisMotionValue(e).get()||0;if(OW.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=bX(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&$U.update(()=>i(e,t),!1,!0),Dq(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=lde(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&$U.update(()=>a(e,t),!1,!0)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new n$(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:QQ(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&$U.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!m$(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=ede(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&IQ(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=tde(n.layoutBox,e):this.constraints=!1,this.elastic=ade(t),r!==this.constraints&&!IQ(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&HX(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=ide(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!IQ(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;r.root&&(r.root.scroll=void 0,r.root.updateScroll());let i=NY(n,r.root,this.visualElement.getTransformPagePoint()),a=nde(r.layout.layoutBox,i);if(t){let e=t(mY(a));this.hasMutatedConstraints=!!e,e&&(a=pY(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=HX(o=>{if(!m$(o,t,this.currentDirection))return;let c=s&&s[o]||{};(a===!0||a===o)&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return Dq(this.visualElement,e),n.start(pq(e,n,0,t,this.visualElement,!1))}stopAnimation(){HX(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.visualElement.getProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){HX(t=>{let{drag:n}=this.getProps();if(!m$(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t],o=i.get()||0;i.set(e[t]-eG(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!IQ(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};HX(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=rde({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),HX(t=>{if(!m$(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(eG(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;ode.set(this.visualElement,this);let e=this.visualElement.current,t=ZQ(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&_J(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();IQ(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=cde(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),$U.read(r);let o=$X(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(HX(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=u$,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function p$(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function cde(e,t,n){let r=zJ(e,p$(n)),i=zJ(t,p$(n));return()=>{r(),i()}}function m$(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function lde(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var ude=class extends fY{constructor(e){super(e),this.removeGroupControls=bU,this.removeListeners=bU,this.controls=new sde(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||bU}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},h$=e=>(t,n)=>{e&&$U.update(()=>e(t,n),!1,!0)},dde=class extends fY{constructor(){super(...arguments),this.removePointerDownListener=bU}onPointerDown(e){this.session=new n$(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:QQ(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:h$(e),onStart:h$(t),onMove:h$(n),onEnd:(e,t)=>{delete this.session,r&&$U.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=ZQ(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},g$=!1,fde=class extends b.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),g$&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),aZ.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),g$=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||$U.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),aJ.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;g$=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function _$(e){let[t,n]=XZ(),r=(0,b.useContext)(cU);return(0,H.jsx)(fde,{...e,layoutGroup:r,switchLayoutGroup:(0,b.useContext)(FQ),isPresent:t,safeToRemove:n})}var pde={pan:{Feature:dde},drag:{Feature:ude,ProjectionNode:VZ,MeasureLayout:_$}};function v$(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&$U.postRender(()=>i(t,YQ(t)))}var mde=class extends fY{mount(){let{current:e}=this.node;e&&(this.unmount=dJ(e,(e,t)=>(v$(this.node,t,`Start`),e=>v$(this.node,e,`End`))))}unmount(){}},hde=class extends fY{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=xU($X(this.node.current,`focus`,()=>this.onFocus()),$X(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function y$(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&$U.postRender(()=>i(t,YQ(t)))}var gde=class extends fY{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=wJ(e,(e,t)=>(y$(this.node,t,`Start`),(e,{success:t})=>y$(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},b$=new WeakMap,x$=new WeakMap,_de=e=>{let t=b$.get(e.target);t&&t(e)},vde=e=>{e.forEach(_de)};function yde({root:e,...t}){let n=e||document;x$.has(n)||x$.set(n,{});let r=x$.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(vde,{root:e,...t})),r[i]}function bde(e,t,n){let r=yde(t);return b$.set(e,n),r.observe(e),()=>{b$.delete(e),r.unobserve(e)}}var xde={some:0,all:1},Sde=class extends fY{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:xde[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=bde(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(Cde(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function Cde({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var wde={inView:{Feature:Sde},tap:{Feature:gde},focus:{Feature:hde},hover:{Feature:mde}},Tde={layout:{ProjectionNode:VZ,MeasureLayout:_$}},Ede=WQ({...JQ,...wde,...pde,...Tde},GQ),Dde=e=>new Date(e).toLocaleTimeString(`en-US`,{hour12:!1,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,fractionalSecondDigits:3}),Ode=e=>e.source===`view`?`view`:e.type===`response`?`res`:`req`,kde={duration:.2,ease:[.4,0,.2,1]},Ade={req:{label:`req`,badge:`bg-sky-100 text-sky-700`,command:`text-sky-600`},res:{label:`res`,badge:`bg-emerald-100 text-emerald-700`,command:`text-emerald-600`},view:{label:`view`,badge:`bg-violet-100 text-violet-700`,command:`text-violet-600`}},jde=({log:e,expanded:t,onToggle:n})=>{let r=Object.keys(e.args).length>0,i=Ade[Ode(e)];return(0,H.jsxs)(`div`,{children:[(0,H.jsxs)(`button`,{type:`button`,onClick:()=>r&&n(),disabled:!r,className:IP(`flex w-full items-center gap-2 border-b border-border px-2 py-1.5 text-left font-mono text-xs bg-background`,r?`cursor-pointer hover:bg-light-gray`:`cursor-default`),children:[(0,H.jsx)(Jr,{className:IP(`size-3 shrink-0 text-muted-foreground transition-transform duration-200 ease-in-out`,!r&&`invisible`,t&&`rotate-90`)}),(0,H.jsx)(`span`,{className:`min-w-[80px] shrink-0 text-muted-foreground`,children:Dde(e.timestamp)}),(0,H.jsx)(`span`,{className:IP(`shrink-0 rounded px-1 text-[10px] font-medium uppercase tracking-wide`,i.badge),children:i.label}),(0,H.jsx)(`span`,{className:IP(`min-w-[120px] shrink-0 font-semibold`,i.command),children:e.command})]}),(0,H.jsx)($Z,{initial:!1,children:t&&r?(0,H.jsx)(Ede.div,{initial:{height:0,opacity:0},animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},transition:kde,className:`overflow-hidden border-b border-border bg-muted/40`,children:(0,H.jsx)(`div`,{className:`px-2 py-2`,children:(0,H.jsx)(`div`,{className:`overflow-x-auto`,children:(0,H.jsx)(sU,{code:JSON.stringify(e.args,null,2)})})})},`args`):null})]})},S$=({onClose:e})=>{let t=BO(),n=uO(t?.name??``)?.openaiLogs??[],r=lO(e=>e.clearOpenAiLogs),[i,a]=(0,b.useState)(new Set);return(0,H.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col overflow-hidden border-l-2 border-border bg-background`,children:[(0,H.jsxs)(`div`,{className:`flex h-10 shrink-0 items-center justify-between border-b border-border px-3`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,H.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:`Logs`}),(0,H.jsx)(`button`,{type:`button`,"aria-label":`Clear logs`,onClick:()=>t&&r(t.name),disabled:n.length===0,className:`inline-flex size-6 cursor-pointer items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-light-gray hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent disabled:hover:text-muted-foreground`,children:(0,H.jsx)(Di,{className:`size-3.5`})}),(0,H.jsx)(BP,{value:JSON.stringify(n,null,2),label:`Copy logs`,className:`inline-flex size-6 items-center justify-center rounded-md transition-colors hover:bg-light-gray focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`})]}),e?(0,H.jsx)(`button`,{type:`button`,"aria-label":`Close logs`,onClick:e,className:`inline-flex size-6 cursor-pointer items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-light-gray hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,children:(0,H.jsx)(Ai,{className:`size-3.5`})}):null]}),(0,H.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto bg-light-gray`,children:n.map(e=>(0,H.jsx)(jde,{log:e,expanded:i.has(e.id),onToggle:()=>a(t=>{let n=new Set(t);return n.has(e.id)?n.delete(e.id):n.add(e.id),n})},e.id))})]})},Mde=({expanded:e,onToggle:t})=>{let n=BO(),r=uO(n?.name??``);if(!n||!r?.response)return null;let{response:i,openaiObject:a,durationMs:o}=r,s=JSON.stringify(i,null,2),c=new TextEncoder().encode(s).length,l=JS(i),u=YS(a?.widgetState),d=l>=GS,f=u>=KS,p=i.isError===!0;return(0,H.jsxs)(`button`,{type:`button`,"aria-expanded":e,onClick:t,className:IP(`flex h-9 w-full shrink-0 cursor-pointer items-center border-border bg-white text-left outline-none hover:bg-light-gray focus-visible:ring-1`,e?`border-b`:`border-b-2`),children:[(0,H.jsxs)(`div`,{className:`text-sm text-muted-foreground flex-1 border-r border-dashed border-light-gray-foreground/40 px-3 h-full flex items-center`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2 font-medium`,children:[`Tool output`,d&&(0,H.jsx)(LB,{kind:`tool-output`})]}),(0,H.jsxs)(`div`,{className:`text-xs text-light-gray-foreground flex items-center ml-auto gap-2 font-mono`,children:[(0,H.jsx)(`span`,{className:p?`text-destructive`:`text-success`,children:p?`Error`:`OK`}),o==null?null:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`span`,{children:`·`}),(0,H.jsxs)(`span`,{children:[o,`ms`]})]}),(0,H.jsx)(`span`,{children:`·`}),(0,H.jsx)(`span`,{children:LP(c)})]})]}),(0,H.jsxs)(`div`,{className:`text-sm text-muted-foreground flex-1 px-3 h-full flex items-center`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2 font-medium`,children:[`View state`,f&&(0,H.jsx)(LB,{kind:`view-state`})]}),(0,H.jsx)(`div`,{className:`text-xs text-light-gray-foreground flex items-center ml-auto gap-2 font-mono`,children:(0,H.jsxs)(`span`,{children:[u,` token`,u>1?`s`:``]})})]})]})},Nde=()=>{let e=BO(),t=uO(e?.name??``);if(!e||!t?.response)return null;let{response:n,openaiObject:r}=t,i=JSON.stringify(n,null,2),a=JSON.stringify(r?.widgetState??null,null,2),o=JS(n),s=YS(r?.widgetState);return(0,H.jsxs)(`div`,{className:`flex h-full min-h-0 w-full flex-row overflow-hidden bg-light-gray`,children:[(0,H.jsxs)(`section`,{className:`flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden`,children:[o>=5e3&&(0,H.jsx)(RB,{kind:`tool-output`,tokenCount:o}),(0,H.jsxs)(`div`,{className:`relative min-h-0 flex-1 overflow-auto p-3`,children:[(0,H.jsx)(BP,{value:i,label:`Copy tool output`,className:`absolute right-2 top-2 z-10`}),(0,H.jsx)(sU,{code:i})]})]}),(0,H.jsxs)(`section`,{className:`flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden border-l border-border`,children:[s>=2e4&&(0,H.jsx)(RB,{kind:`view-state`,tokenCount:s}),(0,H.jsxs)(`div`,{className:`relative min-h-0 flex-1 overflow-auto p-3`,children:[(0,H.jsx)(BP,{value:a,label:`Copy view state`,className:`absolute right-2 top-2 z-10`}),(0,H.jsx)(sU,{code:a})]})]})]})},C$=({text:e})=>(0,H.jsx)(`div`,{className:`flex h-full items-center justify-center`,children:(0,H.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e})}),w$=`devtools-tool-panel-view-logs`,T$=`view`,E$=`logs`,D$=`devtools-tool-panel-output-logs`,O$=`output`,k$=`devtools-tool-panel-header-output`,A$=`header-output`,j$=`header-view`,Pde=()=>{let e=BO(),t=uO(e?.name??``),[n,r]=AB(`devtools-tool-panel-logs-open`,{defaultValue:!1}),[i,a]=AB(`devtools-tool-panel-header-expanded`,{defaultValue:!1}),{defaultLayout:o,onLayoutChanged:s}=Ko({id:w$,panelIds:[T$,E$],storage:localStorage}),{defaultLayout:c,onLayoutChanged:l}=Ko({id:k$,panelIds:[A$,j$],storage:localStorage}),{defaultLayout:u,onLayoutChanged:d}=Ko({id:D$,panelIds:[O$,E$],storage:localStorage}),f=ds(e=>e.displayMode),p=ds(e=>e.theme),m=ds(e=>e.setPreference),h=ds(e=>e.userAgent?.device?.type??`desktop`)===`mobile`,g=f===`fullscreen`,_=g&&!h;OB(`esc`,e=>{e.defaultPrevented||g&&m(`displayMode`,`inline`)});let v=e?._meta?.ui?.resourceUri,y=!!(e&&t?.response),x=!!v;if(!e)return(0,H.jsx)(`div`,{className:`flex h-full min-h-0 w-full flex-col overflow-hidden preview-region transition-colors duration-150 ease-out`,"data-theme":p,children:(0,H.jsx)(C$,{text:`Choose a tool from the sidebar to begin`})});if(!y)return(0,H.jsx)(`div`,{className:`flex h-full min-h-0 w-full flex-col overflow-hidden preview-region transition-colors duration-150 ease-out`,"data-theme":p});if(!x){let n=t?.response,r=JSON.stringify(n??null,null,2),i=new TextEncoder().encode(r).length,a=JS(n),o=a>=GS,s=n?.isError===!0,c=t?.durationMs;return(0,H.jsx)(`div`,{className:`flex h-full min-h-0 w-full flex-col overflow-hidden preview-region transition-colors duration-150 ease-out`,"data-theme":p,children:(0,H.jsxs)(Uo,{orientation:`horizontal`,id:D$,className:`flex min-h-0 min-w-0 flex-1 overflow-hidden`,defaultLayout:u,onLayoutChanged:d,children:[(0,H.jsx)(Xo,{id:O$,minSize:320,className:`min-h-0 min-w-0`,children:(0,H.jsxs)(`div`,{className:`flex h-full min-h-0 min-w-0 flex-col overflow-hidden`,children:[(0,H.jsxs)(`div`,{className:`flex h-9 w-full shrink-0 items-center border-b-2 border-border bg-white px-3 text-sm text-muted-foreground`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2 font-medium`,children:[`Tool output`,o&&(0,H.jsx)(LB,{kind:`tool-output`})]}),(0,H.jsxs)(`div`,{className:`ml-auto flex items-center gap-2 font-mono text-xs text-light-gray-foreground`,children:[(0,H.jsx)(`span`,{className:s?`text-destructive`:`text-success`,children:s?`Error`:`OK`}),c==null?null:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`span`,{children:`·`}),(0,H.jsxs)(`span`,{children:[c,`ms`]})]}),(0,H.jsx)(`span`,{children:`·`}),(0,H.jsx)(`span`,{children:LP(i)})]})]}),(0,H.jsxs)(`section`,{className:`flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden bg-light-gray`,children:[o&&(0,H.jsx)(RB,{kind:`tool-output`,tokenCount:a}),(0,H.jsxs)(`div`,{className:`relative min-h-0 flex-1 overflow-auto p-3`,children:[(0,H.jsx)(BP,{value:r,label:`Copy tool output`,className:`absolute right-2 top-2 z-10`}),(0,H.jsx)(sU,{code:r})]})]})]})}),(0,H.jsx)($o,{className:`w-px shrink-0 bg-border transition-colors hover:bg-ring data-separator-active:bg-ring`}),(0,H.jsx)(Xo,{id:E$,defaultSize:360,minSize:240,maxSize:640,className:`min-h-0`,children:(0,H.jsx)(S$,{},e.name)})]})})}return(0,H.jsxs)(`div`,{className:`relative flex h-full min-h-0 w-full flex-col overflow-hidden preview-region transition-colors duration-150 ease-out`,"data-theme":p,children:[(0,H.jsx)(Mde,{expanded:i??!1,onToggle:()=>a(!i)}),(0,H.jsxs)(Uo,{orientation:`vertical`,id:k$,className:`flex min-h-0 min-w-0 flex-1 overflow-hidden`,defaultLayout:c,onLayoutChanged:l,children:[i&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Xo,{id:A$,defaultSize:200,minSize:80,maxSize:500,className:`min-h-0`,children:(0,H.jsx)(Nde,{})}),(0,H.jsx)($o,{className:`h-px shrink-0 bg-border transition-colors hover:bg-ring data-separator-active:bg-ring`})]}),(0,H.jsx)(Xo,{id:j$,minSize:200,className:`min-h-0 min-w-0`,children:(0,H.jsxs)(Uo,{orientation:`horizontal`,id:w$,className:`flex h-full min-h-0 min-w-0 overflow-hidden`,defaultLayout:o,onLayoutChanged:s,children:[(0,H.jsx)(Xo,{id:T$,minSize:320,className:`min-h-0 min-w-0`,children:(0,H.jsxs)(`div`,{className:IP(`flex flex-col overflow-hidden`,g?`absolute inset-0 z-50 bg-background`:`relative h-full min-h-0`),children:[(0,H.jsx)(oz,{logsOpen:n??!1,onOpenLogs:()=>r(!0)}),(0,H.jsx)(`div`,{className:IP(`flex min-h-0 flex-1 items-center justify-center`,_?`overflow-hidden pt-3`:g?`overflow-y-auto pt-3`:`mx-3 overflow-y-auto py-3`),children:(0,H.jsx)(b.Suspense,{fallback:(0,H.jsx)(C$,{text:`Loading view…`}),children:(0,H.jsx)(vz,{})})}),g&&(0,H.jsx)(`button`,{type:`button`,"aria-label":`Exit fullscreen`,onClick:()=>m(`displayMode`,`inline`),className:`absolute right-4 top-4 inline-flex size-8 cursor-pointer items-center justify-center rounded-full border border-border bg-background text-light-gray-foreground shadow-md transition-colors hover:bg-light-gray hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,children:(0,H.jsx)(Ai,{className:`size-4`})})]})}),n&&!g&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)($o,{className:`w-px shrink-0 bg-border transition-colors hover:bg-ring data-separator-active:bg-ring`}),(0,H.jsx)(Xo,{id:E$,defaultSize:360,minSize:240,maxSize:640,className:`min-h-0`,children:(0,H.jsx)(S$,{onClose:()=>r(!1)},e.name)})]})]})})]})]})},Fde=Object.defineProperty,M$=(e,t)=>Fde(e,`name`,{value:t,configurable:!0});function N$(e){let t=e+`CollectionProvider`,[n,r]=bF(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=M$(e=>{let{scope:t,children:n}=e,r=b.useRef(null),a=b.useRef(new Map).current;return(0,H.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})},`CollectionProvider`);o.displayName=t;let s=e+`CollectionSlot`,c=TF(s),l=b.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=vF(t,a(s,n).collectionRef);return(0,H.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=TF(u),p=b.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=b.useRef(null),s=vF(t,o),c=a(u,n);return b.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,H.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 M$(m,`useCollection`),[{Provider:o,Slot:l,ItemSlot:p},m,r]}M$(N$,`createCollection`);var P$=new WeakMap,F$=class e extends Map{static{M$(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],P$.set(this,!0)}set(e,t){return P$.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=this.#e.length,a=R$(e),o=a>=0?a:i+a,s=o<0||o>=i?-1:o;if(s===this.size||r&&s===this.size-1||s===-1)return this.set(t,n),this;let c=this.size+ +!r;a<0&&o++;let l=[...this.#e],u,d=!1;for(let e=o;e<c;e++)if(o===e){let i=l[e];l[e]===t&&(i=l[e+1]),r&&this.delete(t),u=this.get(i),this.set(t,n)}else{!d&&l[e-1]===t&&(d=!0);let n=l[d?e:e-1],r=u;u=this.get(n),this.delete(n),this.set(n,r)}return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r+1,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t!==void 0&&this.delete(t)}at(e){let t=I$(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=I$(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return I$(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=0,i=n??this.at(0);for(let n of this)i=r===0&&e.length===1?n:Reflect.apply(t,this,[i,n,r,this]),r++;return i}reduceRight(...e){let[t,n]=e,r=n??this.at(-1);for(let n=this.size-1;n>=0;n--){let i=this.at(n);r=n===this.size-1&&e.length===1?i:Reflect.apply(t,this,[r,i,n,this])}return r}toSorted(t){let n=[...this.entries()].sort(t);return new e(n)}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e,i=this.size-1;if(t===void 0)return r;t<0&&(t+=this.size),n!==void 0&&n>0&&(i=n-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),n=this.get(t);r.set(t,n)}return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function I$(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=L$(e,t);return n===-1?void 0:e[n]}M$(I$,`at`);function L$(e,t){let n=e.length,r=R$(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}M$(L$,`toSafeIndex`);function R$(e){return e!==e||e===0?0:Math.trunc(e)}M$(R$,`toSafeInteger`);function Ide(e){let t=e+`CollectionProvider`,[n,r]=bF(t),[i,a]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new F$,setItemMap:M$(()=>void 0,`setItemMap`)}),o=M$(({state:e,...t})=>e?(0,H.jsx)(c,{...t,state:e}):(0,H.jsx)(s,{...t}),`CollectionProvider`);o.displayName=t;let s=M$(e=>{let t=h();return(0,H.jsx)(c,{...e,state:t})},`CollectionInit`);s.displayName=t+`Init`;let c=M$(e=>{let{scope:t,children:n,state:r}=e,a=b.useRef(null),[o,s]=b.useState(null),c=vF(a,s),[l,u]=r;return b.useEffect(()=>{if(!o)return;let e=H$(()=>{});return e.observe(o,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[o]),(0,H.jsx)(i,{scope:t,itemMap:l,setItemMap:u,collectionRef:c,collectionRefObject:a,collectionElement:o,children:n})},`CollectionProviderImpl`);c.displayName=t+`Impl`;let l=e+`CollectionSlot`,u=TF(l),d=b.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=vF(t,a(l,n).collectionRef);return(0,H.jsx)(u,{ref:i,children:r})});d.displayName=l;let f=e+`CollectionItemSlot`,p=TF(f),m=b.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=b.useRef(null),[s,c]=b.useState(null),l=vF(t,o,c),{setItemMap:u}=a(f,n),d=b.useRef(i);z$(d.current,i)||(d.current=i);let m=d.current;return b.useEffect(()=>{let e=m;return u(t=>s?t.has(s)?t.set(s,{...e,element:s}).toSorted(V$):(t.set(s,{...e,element:s}),t.toSorted(V$)):t),()=>{u(e=>!s||!e.has(s)?e:(e.delete(s),new F$(e)))}},[s,m,u]),(0,H.jsx)(p,{"data-radix-collection-item":``,ref:l,children:r})});m.displayName=f;function h(){return b.useState(new F$)}M$(h,`useInitCollection`);function g(t){let{itemMap:n}=a(e+`CollectionConsumer`,t);return n}return M$(g,`useCollection`),[{Provider:o,Slot:d,ItemSlot:m},{createCollectionScope:r,useCollection:g,useInitCollection:h}]}M$(Ide,`createCollection`);function z$(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}M$(z$,`shallowEqual`);function B$(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}M$(B$,`isElementPreceding`);function V$(e,t){return!e[1].element||!t[1].element?0:B$(e[1].element,t[1].element)?-1:1}M$(V$,`sortByDocumentPosition`);function H$(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}M$(H$,`getChildListObserver`);var Lde=Object.defineProperty,U$=(e,t)=>Lde(e,`name`,{value:t,configurable:!0}),W$=`Collapsible`,[Rde,G$]=bF(W$),[zde,K$]=Rde(W$),Bde=b.forwardRef(U$(function(e,t){let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[c,l]=mI({prop:r,defaultProp:i??!1,onChange:o,caller:W$});return(0,H.jsx)(zde,{scope:n,disabled:a,contentId:KF(),open:c,onOpenToggle:b.useCallback(()=>l(e=>!e),[l]),children:(0,H.jsx)(PF.div,{"data-state":J$(c),"data-disabled":a?``:void 0,...s,ref:t})})},`Collapsible`)),Vde=`CollapsibleTrigger`,Hde=b.forwardRef(U$(function(e,t){let{__scopeCollapsible:n,...r}=e,i=K$(Vde,n);return(0,H.jsx)(PF.button,{type:`button`,"aria-controls":i.open?i.contentId:void 0,"aria-expanded":i.open||!1,"data-state":J$(i.open),"data-disabled":i.disabled?``:void 0,disabled:i.disabled,...r,ref:t,onClick:dF(e.onClick,i.onOpenToggle)})},`CollapsibleTrigger`)),q$=`CollapsibleContent`,Ude=b.forwardRef(U$(function(e,t){let{forceMount:n,...r}=e,i=K$(q$,e.__scopeCollapsible);return(0,H.jsx)(iI,{present:n||i.open,children:({present:e})=>(0,H.jsx)(Wde,{...r,ref:t,present:e})})},`CollapsibleContent`)),Wde=b.forwardRef(U$(function(e,t){let{__scopeCollapsible:n,present:r,children:i,...a}=e,o=K$(q$,n),[s,c]=b.useState(r),l=b.useRef(null),u=vF(t,l),d=b.useRef(0),f=d.current,p=b.useRef(0),m=p.current,h=o.open||s,g=b.useRef(h),_=b.useRef(void 0);return b.useEffect(()=>{let e=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(e)},[]),GF(()=>{let e=l.current;if(e){_.current=_.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();d.current=t.height,p.current=t.width,g.current||(e.style.transitionDuration=_.current.transitionDuration,e.style.animationName=_.current.animationName),c(r)}},[o.open,r]),(0,H.jsx)(PF.div,{"data-state":J$(o.open),"data-disabled":o.disabled?``:void 0,id:o.contentId,hidden:!h,...a,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:h&&i})},`CollapsibleContentImpl`));function J$(e){return e?`open`:`closed`}U$(J$,`getState`);var Gde=Object.defineProperty,Kde=(e,t)=>Gde(e,`name`,{value:t,configurable:!0}),qde=b.createContext(void 0);function Y$(e){let t=b.useContext(qde);return e||t||`ltr`}Kde(Y$,`useDirection`);var Jde=Object.defineProperty,X$=(e,t)=>Jde(e,`name`,{value:t,configurable:!0}),Z$=`Accordion`,Yde=[`Home`,`End`,`ArrowDown`,`ArrowUp`,`ArrowLeft`,`ArrowRight`],[Q$,Xde,Zde]=N$(Z$),[$$,Qde]=bF(Z$,[Zde,G$]),e1=G$(),$de=b.forwardRef(X$(function(e,t){let{type:n,...r}=e,i=r,a=r;return(0,H.jsx)(Q$.Provider,{scope:e.__scopeAccordion,children:n===`multiple`?(0,H.jsx)(rfe,{...a,ref:t}):(0,H.jsx)(nfe,{...i,ref:t})})},`Accordion`)),[t1,efe]=$$(Z$),[n1,tfe]=$$(Z$,{collapsible:!1}),nfe=b.forwardRef(X$(function(e,t){let{value:n,defaultValue:r,onValueChange:i=X$(()=>{},`onValueChange`),collapsible:a=!1,...o}=e,[s,c]=mI({prop:n,defaultProp:r??``,onChange:i,caller:Z$});return(0,H.jsx)(t1,{scope:e.__scopeAccordion,value:b.useMemo(()=>s?[s]:[],[s]),onItemOpen:c,onItemClose:b.useCallback(()=>a&&c(``),[a,c]),children:(0,H.jsx)(n1,{scope:e.__scopeAccordion,collapsible:a,children:(0,H.jsx)(i1,{...o,ref:t})})})},`AccordionImplSingle`)),rfe=b.forwardRef(X$(function(e,t){let{value:n,defaultValue:r,onValueChange:i=X$(()=>{},`onValueChange`),...a}=e,[o,s]=mI({prop:n,defaultProp:r??[],onChange:i,caller:Z$}),c=b.useCallback(e=>s((t=[])=>[...t,e]),[s]),l=b.useCallback(e=>s((t=[])=>t.filter(t=>t!==e)),[s]);return(0,H.jsx)(t1,{scope:e.__scopeAccordion,value:o,onItemOpen:c,onItemClose:l,children:(0,H.jsx)(n1,{scope:e.__scopeAccordion,collapsible:!0,children:(0,H.jsx)(i1,{...a,ref:t})})})},`AccordionImplMultiple`)),[ife,r1]=$$(Z$),i1=b.forwardRef(X$(function(e,t){let{__scopeAccordion:n,disabled:r,dir:i,orientation:a=`vertical`,...o}=e,s=vF(b.useRef(null),t),c=Xde(n),l=Y$(i)===`ltr`,u=dF(e.onKeyDown,e=>{if(!Yde.includes(e.key))return;let t=e.target,n=c().filter(e=>!e.ref.current?.disabled),r=n.findIndex(e=>e.ref.current===t),i=n.length;if(r===-1)return;e.preventDefault();let o=r,s=i-1,u=X$(()=>{o=r+1,o>s&&(o=0)},`moveNext`),d=X$(()=>{o=r-1,o<0&&(o=s)},`movePrev`);switch(e.key){case`Home`:o=0;break;case`End`:o=s;break;case`ArrowRight`:a===`horizontal`&&(l?u():d());break;case`ArrowDown`:a===`vertical`&&u();break;case`ArrowLeft`:a===`horizontal`&&(l?d():u());break;case`ArrowUp`:a===`vertical`&&d();break}n[o%i].ref.current?.focus()});return(0,H.jsx)(ife,{scope:n,disabled:r,direction:i,orientation:a,children:(0,H.jsx)(Q$.Slot,{scope:n,children:(0,H.jsx)(PF.div,{...o,"data-orientation":a,ref:s,onKeyDown:r?void 0:u})})})},`AccordionImpl`)),a1=`AccordionItem`,[afe,o1]=$$(a1),ofe=b.forwardRef(X$(function(e,t){let{__scopeAccordion:n,value:r,...i}=e,a=r1(a1,n),o=efe(a1,n),s=e1(n),c=KF(),l=r&&o.value.includes(r)||!1,u=a.disabled||e.disabled;return(0,H.jsx)(afe,{scope:n,open:l,disabled:u,triggerId:c,children:(0,H.jsx)(Bde,{"data-orientation":a.orientation,"data-state":c1(l),...s,...i,ref:t,disabled:u,open:l,onOpenChange:e=>{e?o.onItemOpen(r):o.onItemClose(r)}})})},`AccordionItem`)),sfe=`AccordionHeader`,cfe=b.forwardRef(X$(function(e,t){let{__scopeAccordion:n,...r}=e,i=r1(Z$,n),a=o1(sfe,n);return(0,H.jsx)(PF.h3,{"data-orientation":i.orientation,"data-state":c1(a.open),"data-disabled":a.disabled?``:void 0,...r,ref:t})},`AccordionHeader`)),s1=`AccordionTrigger`,lfe=b.forwardRef(X$(function(e,t){let{__scopeAccordion:n,...r}=e,i=r1(Z$,n),a=o1(s1,n),o=tfe(s1,n),s=e1(n);return(0,H.jsx)(Q$.ItemSlot,{scope:n,children:(0,H.jsx)(Hde,{"aria-disabled":a.open&&!o.collapsible||void 0,"data-orientation":i.orientation,id:a.triggerId,...s,...r,ref:t})})},`AccordionTrigger`)),ufe=`AccordionContent`,dfe=b.forwardRef(X$(function(e,t){let{__scopeAccordion:n,...r}=e,i=r1(Z$,n),a=o1(ufe,n),o=e1(n);return(0,H.jsx)(Ude,{role:`region`,"aria-labelledby":a.triggerId,"data-orientation":i.orientation,...o,...r,ref:t,style:{"--radix-accordion-content-height":`var(--radix-collapsible-content-height)`,"--radix-accordion-content-width":`var(--radix-collapsible-content-width)`,...e.style}})},`AccordionContent`));function c1(e){return e?`open`:`closed`}X$(c1,`getState`);function ffe({...e}){return(0,H.jsx)($de,{"data-slot":`accordion`,...e})}function pfe({className:e,...t}){return(0,H.jsx)(ofe,{"data-slot":`accordion-item`,className:Mr(`border-b border-border-secondary`,e),...t})}function mfe({className:e,children:t,...n}){return(0,H.jsx)(dfe,{"data-slot":`accordion-content`,className:`overflow-hidden data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down`,...n,children:(0,H.jsx)(`div`,{className:Mr(`pb-4 type-text-sm text-muted-foreground`,e),children:t})})}var l1=!1;function hfe(){let[e,t]=b.useState(l1);return b.useEffect(()=>{l1||(l1=!0,t(!0))},[]),e}var u1=b.useSyncExternalStore;function gfe(){return()=>{}}function _fe(){return u1(gfe,()=>!0,()=>!1)}var vfe=typeof u1==`function`?_fe:hfe,yfe=Object.defineProperty,d1=(e,t)=>yfe(e,`name`,{value:t,configurable:!0}),f1=`rovingFocusGroup.onEntryFocus`,bfe={bubbles:!1,cancelable:!0},p1=`RovingFocusGroup`,[m1,h1,xfe]=JI(p1),[Sfe,g1]=pk(p1,[xfe]),[Cfe,wfe]=Sfe(p1),Tfe=b.forwardRef(d1(function(e,t){return(0,H.jsx)(m1.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,H.jsx)(m1.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,H.jsx)(Efe,{...e,ref:t})})})},`RovingFocusGroup`)),Efe=b.forwardRef(d1(function(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=Ii(t,f),m=YI(a),[h,g]=XM({prop:o,defaultProp:s??null,onChange:c,caller:p1}),[_,v]=b.useState(!1),y=hk(l),x=h1(n),S=b.useRef(!1),[C,w]=b.useState(0);return b.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(f1,y),()=>e.removeEventListener(f1,y)},[y]),(0,H.jsx)(Cfe,{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,H.jsx)(UO.div,{tabIndex:_||C===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:ck(e.onMouseDown,()=>{S.current=!0}),onFocus:ck(e.onFocus,e=>{let t=!S.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(f1,bfe);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=x().filter(e=>e.focusable);y1([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}S.current=!1}),onBlur:ck(e.onBlur,()=>v(!1))})})},`RovingFocusGroupImpl`)),Dfe=`RovingFocusGroupItem`,Ofe=b.forwardRef(d1(function(e,t){let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=eA(),l=a||c,u=wfe(Dfe,n),d=u.currentTabStopId===l,f=h1(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u,g=vfe();return Zk(()=>{if(!(!g||!r))return p(),()=>m()},[g,r,p,m]),b.useEffect(()=>{if(!(g||!r))return p(),()=>m()},[g,r,p,m]),(0,H.jsx)(m1.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,H.jsx)(UO.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:ck(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:ck(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:ck(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=v1(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?b1(n,r+1):n.slice(r+1)}setTimeout(()=>y1(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})},`RovingFocusGroupItem`)),kfe={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function _1(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}d1(_1,`getDirectionAwareKey`);function v1(e,t,n){let r=_1(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return kfe[r]}d1(v1,`getFocusIntent`);function y1(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}d1(y1,`focusFirst`);function b1(e,t){return e.map((n,r)=>e[(t+r)%e.length])}d1(b1,`wrapArray`);var Afe=Tfe,jfe=Ofe,Mfe=Object.defineProperty,x1=(e,t)=>Mfe(e,`name`,{value:t,configurable:!0}),S1=`Tabs`,[Nfe,Pfe]=pk(S1,[g1]);g1();var[Ffe,Ife]=Nfe(S1),Lfe=b.forwardRef(x1(function(e,t){let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=YI(s),[d,f]=XM({prop:r,onChange:i,defaultProp:a??``,caller:S1});return(0,H.jsx)(Ffe,{scope:n,baseId:eA(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,H.jsx)(UO.div,{dir:u,"data-orientation":o,...l,ref:t})})},`Tabs`)),Rfe=`TabsContent`,zfe=b.forwardRef(x1(function(e,t){let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=Ife(Rfe,n),c=C1(s.baseId,r),l=w1(s.baseId,r),u=r===s.value,d=b.useRef(u);return b.useEffect(()=>{let e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,H.jsx)(RM,{present:i||u,children:({present:n})=>(0,H.jsx)(UO.div,{"data-state":u?`active`:`inactive`,"data-orientation":s.orientation,role:`tabpanel`,"aria-labelledby":c,hidden:!n,id:l,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:d.current?`0s`:void 0},children:n&&a})})},`TabsContent`));function C1(e,t){return`${e}-trigger-${t}`}x1(C1,`makeTriggerId`);function w1(e,t){return`${e}-content-${t}`}x1(w1,`makeContentId`);var Bfe=Lfe,Vfe=zfe;function Hfe({className:e,orientation:t=`horizontal`,...n}){return(0,H.jsx)(Bfe,{"data-slot":`tabs`,"data-orientation":t,orientation:t,className:Mr(`group/tabs flex gap-4`,`data-[orientation=horizontal]:flex-col`,`data-[orientation=vertical]:flex-row`,e),...n})}(0,b.createContext)(`default`);function T1({className:e,...t}){return(0,H.jsx)(Vfe,{"data-slot":`tabs-content`,className:Mr(`flex-1 outline-none`,e),...t})}(0,b.createContext)({orientation:`horizontal`,variant:`line`});function E1(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 Ufe(e){return e.additionalItems===!0&&console.warn(`additionalItems=true is currently not supported`),E1(e.additionalItems)}function D1(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 O1=Symbol(`__additional_property`),Wfe=`additionalProperties`,k1=`allOf`,A1=`anyOf`,j1=`const`,M1=`default`,N1=`__errors`,P1=`items`,Gfe=`_$junk_option_schema_id$_`,F1=`$name`,I1=`oneOf`,L1=`properties`,R1=`readonly`,Kfe=`required`,z1=`submitButtonOptions`,B1=`$ref`,V1=Symbol(`__rjsf_ref`),H1=Symbol(`__rjsf_ref_cycle`),U1=`root`,qfe=[`discriminator`,`propertyName`],Jfe=`formContext`,Yfe=`layoutGridLookupMap`,W1=`__rjsf`,G1=`${W1}_additionalProperties`,K1=`${W1}_rootSchema`,q1=`ui:options`,J1=`ui:globalOptions`;function Y1(e={},t={}){return e?Object.keys(e).filter(e=>e.startsWith(`ui:`)).reduce((t,n)=>{let r=e[n];return n===`ui:widget`&&E1(r)?(console.error(`Setting options via ui:widget object is no longer supported, use ui:options instead`),t):n===`ui:options`&&E1(r)?{...t,...r}:{...t,[n.substring(3)]:r}},{...t}):{...t}}function X1(e,t={},n){if(!(e.additionalProperties||e.patternProperties))return!1;let{expandable:r=!0}=Y1(t);return r===!1?r:e.maxProperties!==void 0&&n?Object.keys(n).length<e.maxProperties:!0}function Z1(e){let t={[N1]:[],addError(e){this[N1].push(e)}};if(Array.isArray(e))return e.reduce((e,t,n)=>({...e,[n]:Z1(t)}),t);if(qT(e)){let n=e;return Object.keys(n).reduce((e,t)=>({...e,[t]:Z1(n[t])}),t)}return t}var{getOwnPropertyNames:Xfe,getOwnPropertySymbols:Zfe}=Object,{hasOwnProperty:Qfe}=Object.prototype;function Q1(e,t){return function(n,r,i){return e(n,r,i)&&t(n,r,i)}}function $1(e){return function(t,n,r){if(!t||!n||typeof t!=`object`||typeof n!=`object`)return e(t,n,r);let{cache:i}=r,a=i.get(t),o=i.get(n);if(a&&o)return a===n&&o===t;i.set(t,n),i.set(n,t);let s=e(t,n,r);return i.delete(t),i.delete(n),s}}function e0(e){return Xfe(e).concat(Zfe(e))}var $fe=Object.hasOwn||((e,t)=>Qfe.call(e,t)),epe=`__v`,tpe=`__o`,npe=`_owner`,{getOwnPropertyDescriptor:t0,keys:n0}=Object,r0=Object.is||function(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t};function rpe(e,t){return e===t}function ipe(e,t){return e.byteLength===t.byteLength&&s0(new Uint8Array(e),new Uint8Array(t))}function ape(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-->0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function ope(e,t){return e.byteLength===t.byteLength&&s0(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function spe(e,t){return r0(e.getTime(),t.getTime())}function cpe(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function i0(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let i=Array(r),a=e.entries(),o,s,c=0;for(;(o=a.next())&&!o.done;){let r=t.entries(),a=!1,l=0;for(;(s=r.next())&&!s.done;){if(i[l]){l++;continue}let r=o.value,u=s.value;if(n.equals(r[0],u[0],c,l,e,t,n)&&n.equals(r[1],u[1],r[0],u[0],e,t,n)){a=i[l]=!0;break}l++}if(!a)return!1;c++}return!0}function lpe(e,t,n){let r=n0(e),i=r.length;if(n0(t).length!==i)return!1;for(;i-->0;)if(!c0(e,t,n,r[i]))return!1;return!0}function a0(e,t,n){let r=e0(e),i=r.length;if(e0(t).length!==i)return!1;let a,o,s;for(;i-->0;)if(a=r[i],!c0(e,t,n,a)||(o=t0(e,a),s=t0(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function upe(e,t){return r0(e.valueOf(),t.valueOf())}function dpe(e,t){return e.source===t.source&&e.flags===t.flags}function o0(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let i=Array(r),a=e.values(),o,s;for(;(o=a.next())&&!o.done;){let r=t.values(),a=!1,c=0;for(;(s=r.next())&&!s.done;){if(!i[c]&&n.equals(o.value,s.value,o.value,s.value,e,t,n)){a=i[c]=!0;break}c++}if(!a)return!1}return!0}function s0(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-->0;)if(e[n]!==t[n])return!1;return!0}function fpe(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function c0(e,t,n,r){return(r===npe||r===tpe||r===epe)&&(e.$$typeof||t.$$typeof)?!0:$fe(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var ppe=Object.prototype.toString;function mpe(e){let t=vpe(e),{areArraysEqual:n,areDatesEqual:r,areFunctionsEqual:i,areMapsEqual:a,areNumbersEqual:o,areObjectsEqual:s,areRegExpsEqual:c,areSetsEqual:l,getUnsupportedCustomComparator:u}=e;return function(e,d,f){if(e===d)return!0;if(e==null||d==null)return!1;let p=typeof e;if(p!==typeof d)return!1;if(p!==`object`)return p===`number`||p===`bigint`?o(e,d,f):p===`function`&&i(e,d,f);let m=e.constructor;if(m!==d.constructor)return!1;if(m===Object)return s(e,d,f);if(m===Array)return n(e,d,f);if(m===Date)return r(e,d,f);if(m===RegExp)return c(e,d,f);if(m===Map)return a(e,d,f);if(m===Set)return l(e,d,f);if(m===Promise)return!1;if(Array.isArray(e))return n(e,d,f);let h=ppe.call(e),g=t[h];if(g)return g(e,d,f);let _=u&&u(e,d,f,h);return _?_(e,d,f):!1}}function hpe({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:ipe,areArraysEqual:n?a0:ape,areDataViewsEqual:ope,areDatesEqual:spe,areErrorsEqual:cpe,areFunctionsEqual:rpe,areMapsEqual:n?Q1(i0,a0):i0,areNumbersEqual:r0,areObjectsEqual:n?a0:lpe,arePrimitiveWrappersEqual:upe,areRegExpsEqual:dpe,areSetsEqual:n?Q1(o0,a0):o0,areTypedArraysEqual:n?Q1(s0,a0):s0,areUrlsEqual:fpe,getUnsupportedCustomComparator:void 0};if(t&&(r=Object.assign({},r,t(r))),e){let e=$1(r.areArraysEqual),t=$1(r.areMapsEqual),n=$1(r.areObjectsEqual),i=$1(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:e,areMapsEqual:t,areObjectsEqual:n,areSetsEqual:i})}return r}function gpe(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function _pe({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(a,o){let{cache:s=e?new WeakMap:void 0,meta:c}=n();return t(a,o,{cache:s,equals:r,meta:c,strict:i})};if(e)return function(e,n){return t(e,n,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};let a={cache:void 0,equals:r,meta:void 0,strict:i};return function(e,n){return t(e,n,a)}}function vpe({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:s,areObjectsEqual:c,arePrimitiveWrappersEqual:l,areRegExpsEqual:u,areSetsEqual:d,areTypedArraysEqual:f,areUrlsEqual:p}){return{"[object Arguments]":c,"[object Array]":t,"[object ArrayBuffer]":e,"[object AsyncGeneratorFunction]":a,"[object BigInt]":s,"[object BigInt64Array]":f,"[object BigUint64Array]":f,"[object Boolean]":l,"[object DataView]":n,"[object Date]":r,"[object Error]":i,"[object Float16Array]":f,"[object Float32Array]":f,"[object Float64Array]":f,"[object Function]":a,"[object GeneratorFunction]":a,"[object Int8Array]":f,"[object Int16Array]":f,"[object Int32Array]":f,"[object Map]":o,"[object Number]":l,"[object Object]":(e,t,n)=>typeof e.then!=`function`&&typeof t.then!=`function`&&c(e,t,n),"[object RegExp]":u,"[object Set]":d,"[object String]":l,"[object URL]":p,"[object Uint8Array]":f,"[object Uint8ClampedArray]":f,"[object Uint16Array]":f,"[object Uint32Array]":f}}l0(),l0({strict:!0}),l0({circular:!0}),l0({circular:!0,strict:!0}),l0({createInternalComparator:()=>r0}),l0({strict:!0,createInternalComparator:()=>r0}),l0({circular:!0,createInternalComparator:()=>r0}),l0({circular:!0,createInternalComparator:()=>r0,strict:!0});function l0(e={}){let{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,a=mpe(hpe(e));return _pe({circular:t,comparator:a,createState:r,equals:n?n(a):gpe(a),strict:i})}var u0=l0({circular:!0,createCustomConfig:()=>({areFunctionsEqual(e,t){return typeof t==`function`}})}),d0=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),i=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),a=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),o=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu),s=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/?]$/iu);function c(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 l=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function u(e){return e.length=0,!0}function d(e,t,n){if(e.length){let r=c(e);if(r!==``)t.push(r);else return n.error=!0,!1;e.length=0}return!0}function f(e){let t=0,n={error:!1,address:``,zone:``},r=[],i=[],a=!1,o=!1,s=d;for(let c=0;c<e.length;c++){let l=e[c];if(!(l===`[`||l===`]`))if(l===`:`){if(a===!0&&(o=!0),!s(i,r,n))break;if(++t>7){n.error=!0;break}c>0&&e[c-1]===`:`&&(a=!0),r.push(`:`);continue}else if(l===`%`){if(!s(i,r,n))break;s=u}else{i.push(l);continue}}return i.length&&(s===u?n.zone=i.join(``):o?r.push(i.join(``)):r.push(c(i))),n.address=r.join(``),n}function p(e){if(m(e,`:`)<2)return{host:e,isIPV6:!1};let t=f(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 m(e,t){let n=0;for(let r=0;r<e.length;r++)e[r]===t&&n++;return n}function h(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]===`.`){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(``)}var g={"@":`%40`,"/":`%2F`,"?":`%3F`,"#":`%23`,":":`%3A`},_=/[@/?#:]/g,v=/[@/?#]/g;function y(e,t){let n=t?v:_;return n.lastIndex=0,e.replace(n,e=>g[e])}function b(e,t=!1){if(e.indexOf(`%`)===-1)return e;let n=``;for(let r=0;r<e.length;r++){if(e[r]===`%`&&r+2<e.length){let o=e.slice(r+1,r+3);if(i(o)){let e=o.toUpperCase(),i=String.fromCharCode(parseInt(e,16));t&&a(i)?n+=i:n+=`%`+e,r+=2;continue}}n+=e[r]}return n}var x=Array(256);{let e=`0123456789ABCDEF`;for(let t=0;t<256;t++)x[t]=`%`+e[t>>4]+e[t&15]}function S(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===42||e===43||e===45||e===46||e===47||e===64||e===95}function C(e){return e<2048?x[192|e>>6]+x[128|e&63]:e<65536?x[224|e>>12]+x[128|e>>6&63]+x[128|e&63]:x[240|e>>18]+x[128|e>>12&63]+x[128|e>>6&63]+x[128|e&63]}function w(e){let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(r===`%`&&n+2<e.length){let r=e.slice(n+1,n+3);if(i(r)){let e=r.toUpperCase(),i=String.fromCharCode(parseInt(e,16));i!==`.`&&a(i)?t+=i:t+=`%`+e,n+=2;continue}}if(o(r))t+=r;else{let i=e.charCodeAt(n);if(i<128)t+=S(i)?r:x[i];else if(i<55296||i>57343)t+=C(i);else if(i<=56319&&n+1<e.length){let r=e.charCodeAt(n+1);r>=56320&&r<=57343?(t+=C(65536+(i-55296<<10)+(r-56320)),n++):t+=C(65533)}else t+=C(65533)}}return t}function T(e){let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(r===`%`&&n+2<e.length){let r=e.slice(n+1,n+3);if(i(r)){let e=r.toUpperCase(),i=String.fromCharCode(parseInt(e,16));a(i)?t+=i:t+=`%`+e,n+=2;continue}}if(s(r))t+=r;else{let i=e.charCodeAt(n);if(i<128)t+=S(i)?r:x[i];else if(i<55296||i>57343)t+=C(i);else if(i<=56319&&n+1<e.length){let r=e.charCodeAt(n+1);r>=56320&&r<=57343?(t+=C(65536+(i-55296<<10)+(r-56320)),n++):t+=C(65533)}else t+=C(65533)}}return t}function E(e){let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(r===`%`&&n+2<e.length){let r=e.slice(n+1,n+3);if(i(r)){t+=`%`+r.toUpperCase(),n+=2;continue}}let a=e.charCodeAt(n);if(a<128)t+=S(a)?r:x[a];else if(a<55296||a>57343)t+=C(a);else if(a<=56319&&n+1<e.length){let r=e.charCodeAt(n+1);r>=56320&&r<=57343?(t+=C(65536+(a-55296<<10)+(r-56320)),n++):t+=C(65533)}else t+=C(65533)}return t}function D(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 e=p(n);n=e.isIPV6===!0?`[${e.escapedHost}]`:y(n,!1)}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:l,recomposeAuthority:D,reescapeHostDelimiters:y,normalizePercentEncoding:b,normalizePathEncoding:w,normalizeQueryFragmentEncoding:T,escapePreservingEscapes:E,removeDotSegments:h,isIPv4:r,isUUID:n,normalizeIPv6:p,stringArrayToHexStripped:c}})),ype=s(((e,t)=>{var{isUUID:n}=d0(),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=y(`${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=y(`${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={http:h,https:g,ws:_,wss:{scheme:`wss`,domainHost:_.domainHost,parse:_.parse,serialize:_.serialize},urn:{scheme:`urn`,parse:d,serialize:f,skipNormalize:!0},"urn:uuid":{scheme:`urn:uuid`,parse:p,serialize:m,skipNormalize:!0}};Object.setPrototypeOf(v,null);function y(e){return e&&(v[e]||v[e.toLowerCase()])||void 0}t.exports={wsIsSecure:o,SCHEMES:v,isValidSchemeName:a,getSchemeHandler:y}})),bpe=s(((e,t)=>{var{normalizeIPv6:n,removeDotSegments:r,recomposeAuthority:i,normalizePercentEncoding:a,normalizePathEncoding:o,normalizeQueryFragmentEncoding:s,escapePreservingEscapes:c,reescapeHostDelimiters:l,isIPv4:u,nonSimpleDomain:d}=d0(),{SCHEMES:f,getSchemeHandler:p}=ype();function m(e,t){return typeof e==`string`?e=w(e,t):typeof e==`object`&&(e=C(v(e,t),t)),e}function h(e,t,n){let r=n?Object.assign({scheme:`null`},n):{scheme:`null`},i=g(C(e,r),C(t,r),r,!0);return r.skipEscape=!0,v(i,r)}function g(e,t,n,i){let a={};return i||(e=C(v(e,n),n),t=C(v(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 _(e,t,n){let r=E(e,n),i=E(t,n);return r!==void 0&&i!==void 0&&r.toLowerCase()===i.toLowerCase()}function v(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:``},o=Object.assign({},t),s=[],l=p(o.scheme||n.scheme);l&&l.serialize&&l.serialize(n,o),n.path!==void 0&&(o.skipEscape?n.path=a(n.path):(n.path=c(n.path),n.scheme!==void 0&&(n.path=n.path.split(`%3A`).join(`:`)))),o.reference!==`suffix`&&n.scheme&&s.push(n.scheme,`:`);let u=i(n);if(u!==void 0&&(o.reference!==`suffix`&&s.push(`//`),s.push(u),n.path&&n.path[0]!==`/`&&s.push(`/`)),n.path!==void 0){let e=n.path;!o.absolutePath&&(!l||!l.absolutePath)&&(e=r(e)),u===void 0&&e[0]===`/`&&e[1]===`/`&&(e=`/%2F`+e.slice(2)),s.push(e)}return n.query!==void 0&&s.push(`?`,n.query),n.fragment!==void 0&&s.push(`#`,n.fragment),s.join(``)}var y=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,b=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/;function x(e,t){if(t[2]!==void 0&&e.path&&e.path[0]!==`/`)return`URI path must start with "/" when authority is present.`;if(typeof e.port==`number`&&(e.port<0||e.port>65535))return`URI port is malformed.`}function S(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,c=!1;r.reference===`suffix`&&(e=r.scheme?r.scheme+`:`+e:`//`+e);let f=e.match(b);f!==null&&f[1].indexOf(`\\`)!==-1&&(i.error=`URI authority must not contain a literal backslash.`,a=!0);let m=e.match(y);if(m){i.scheme=m[1]===void 0?void 0:m[1].toLowerCase(),i.userinfo=m[3],i.host=m[4],i.port=parseInt(m[5],10),i.path=m[6]||``,i.query=m[7],i.fragment=m[8],isNaN(i.port)&&(i.port=m[5]);let t=x(i,m);if(t!==void 0&&(i.error=i.error||t,a=!0),i.host)if(u(i.host)===!1){let e=n(i.host);i.host=e.host.toLowerCase(),c=e.isIPV6}else c=!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 f=p(r.scheme||i.scheme);if(!r.unicodeSupport&&(!f||!f.unicodeSupport)&&i.host&&(r.domainHost||f&&f.domainHost)&&c===!1&&d(i.host))try{i.host=new URL(`http://`+i.host).hostname}catch(e){i.error=i.error||`Host's domain name can not be converted to ASCII: `+e}(!f||f&&!f.skipNormalize)&&(e.indexOf(`%`)!==-1&&(i.scheme!==void 0&&(i.scheme=unescape(i.scheme)),i.host!==void 0&&(i.host=l(unescape(i.host),c))),i.path&&=o(i.path),i.query&&=s(i.query),i.fragment&&=s(i.fragment)),f&&f.parse&&f.parse(i,r)}else i.error=i.error||`URI can not be parsed.`;return{parsed:i,malformedAuthorityOrPort:a}}function C(e,t){return S(e,t).parsed}function w(e,t){return T(e,t).normalized}function T(e,t){let{parsed:n,malformedAuthorityOrPort:r}=S(e,t);return{normalized:r?e:v(n,t),malformedAuthorityOrPort:r}}function E(e,t){if(typeof e==`string`){let{normalized:n,malformedAuthorityOrPort:r}=T(e,t);return r?void 0:n}if(typeof e==`object`)return v(e,t)}var D={SCHEMES:f,normalize:m,resolve:h,resolveComponent:g,equal:_,serialize:v,parse:C};t.exports=D,t.exports.default=D,t.exports.fastUri=D})),xpe=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})),f0=u(bpe(),1),p0=u(xpe(),1);function m0(e,t){if(`$id`in e&&f0.default.equal(e.$id,t))return e;for(let n of Object.values(e))if(Array.isArray(n)){for(let e of n)if(jC(e)){let n=m0(e,t);if(n!==void 0)return n}}else if(jC(n)){let e=m0(n,t);if(e!==void 0)return e}}function h0(e,t){let n=Y(e,`$id`,t),r=e;`$ref`in r&&(r={...r,[B1]:f0.default.resolve(n,r[B1])});for(let[e,t]of Object.entries(r))Array.isArray(t)?r={...r,[e]:t.map(e=>jC(e)?h0(e,n):e)}:jC(t)&&(r={...r,[e]:h0(t,n)});return r}function g0(e,t){let n=t[e];return[zD(t,[e]),n]}function _0(e,t={},n=[],r=Y(t,[`$id`])){let i=e||``,a,o=r;if(i.startsWith(`#`)){let e=decodeURIComponent(i.substring(1));o===void 0||`$id`in t&&t.$id===o?a=p0.get(t,e):t.$schema===`https://json-schema.org/draft/2020-12/schema`&&(a=m0(t,o.replace(/\/$/,``)),a!==void 0&&(a=p0.get(a,e)))}else if(t.$schema===`https://json-schema.org/draft/2020-12/schema`){let[e,...n]=(o?f0.default.resolve(o,i):i).replace(/#\/?$/,``).split(`#`);a=m0(t,e.replace(/\/$/,``)),a!==void 0&&(o=a.$id,ED(n)||(a=p0.get(a,decodeURIComponent(n.join(`#`)))))}if(a===void 0)throw Error(`Could not find a definition for ${e}.`);let s=a[B1];if(s){if(n.includes(s)){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[r,c]=g0(B1,a),l=_0(c,t,[...n,i],o);return Object.keys(r).length>0?t.$schema===`https://json-schema.org/draft/2019-09/schema`||t.$schema===`https://json-schema.org/draft/2020-12/schema`?{[k1]:[r,l]}:{...r,...l}:l}return a}function v0(e,t={},n=Y(t,[`$id`])){return _0(e,t,[],n)}function y0(e){let t,n=Y(e,qfe);return pD(n)?t=n:n!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof n}" instead`),t}function b0(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:e==null?`null`:typeof e==`boolean`?`boolean`:typeof e==`number`&&!Number.isNaN(e)?`number`:typeof e==`object`?`object`:`string`}function x0(e){let{type:t}=e;return!t&&e.const?b0(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 S0(e,t){let n={...e},r=Object.keys(t).reduce((n,r)=>{let i=e?e[r]:{},a=t[r];return e&&r in e&&E1(a)?n[r]=S0(i,a):e&&t&&(x0(e)===`object`||x0(t)===`object`)&&r===`required`&&Array.isArray(i)&&Array.isArray(a)?n[r]=iO(i,a):n[r]=a,n},n);for(let e of Object.getOwnPropertySymbols(t))r[e]=t[e];return r}function C0(e,t,n){if(e&&n){let r=Y(e,n);if(r===void 0)return;for(let e=0;e<t.length;e+=1){let i=t[e],a=Y(i,[L1,n],{});if(a.type!==`object`&&a.type!==`array`&&(a.const===r||a.enum?.includes(r)))return e}}}function w0(e,t,n,r,i){if(t===void 0)return 0;let a=C0(t,n,i);if(kD(a))return a;for(let a=0;a<n.length;a+=1){let o=n[a];if(i&&dD(o,[`properties`,i])){let n=Y(t,i),s=Y(o,[L1,i],{});if(e.isValid(s,n,r))return a}else if(o.properties){let n={anyOf:Object.keys(o[L1]).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={...o,...n};if(delete i.required,e.isValid(i,t,r))return a}else if(e.isValid(o,t,r))return a}return 0}var Spe=Object.prototype;function T0(e){for(let t in e)if(Spe.hasOwnProperty.call(e,t))return!1;return!0}var E0=[`$defs`,`definitions`,`properties`,`patternProperties`,`dependencies`];new Set(E0);var D0=[`items`,`allOf`,`oneOf`,`anyOf`];new Set(D0);var O0=[`items`,`additionalItems`,`additionalProperties`,`propertyNames`,`contains`,`if`,`then`,`else`,`not`];new Set(O0),[...E0,...D0,...O0];function k0(e){return typeof e==`object`}function A0(e){return k0(e)?T0(e):e===!0}function j0(e,t){return e<t?-1:+(e>t)}function M0(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 Cpe(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 N0(e){return e.length===0}function P0(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 F0(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 wpe(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 Tpe(e,t){return n=>{if(e.has(n))return e.get(n);let r=t(n);return e.set(n,r),r}}var I0=Tpe,L0=()=>0,Epe=e=>e===void 0,Dpe=e=>typeof e!=`object`,R0={boolean:0,number:1,string:2};function Ope(e,t){let n=typeof e,r=typeof t;return n===r?j0(e,t):R0[n]-R0[r]}function kpe(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 z0(e,t,n=L0){return(r,i)=>e(r)?e(i)?n(r,i):-1:e(i)?1:t(r,i)}function B0(e){return z0(Epe,e)}function V0(e,t){return z0(t=>t===void 0||e(t),t)}function H0(e,t){return z0(Array.isArray,e,t)}var U0=B0(j0),W0=V0(e=>e===0,(e,t)=>e-t);function Ape({deduplicationCache:e=new WeakMap,sortedKeysCache:t=new WeakMap}={}){let n=I0(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=j0(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=P0(t),r=I0(e,F0(t,{threshold:0}));return(e,t)=>n(r(e),r(t))}let a=i(j0);function o(e,t){if(k0(e)){if(k0(t)){let n=kpe(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&&T0(e)?0:1}return k0(t)?e===!0&&T0(t)?0:-1:j0(e,t)}let s=B0(l),c=z0(Dpe,H0(r(s),P0(l)),Ope);function l(e,t){return e===null?-1:t===null?1:c(e,t)}let u=B0(o),d=V0(T0,r(u)),f=B0(i(o)),p=V0(A0,o),m={$id:U0,$comment:U0,$defs:d,$ref:U0,$schema:U0,const:s,contains:u,contentEncoding:U0,contentMediaType:U0,default:s,definitions:d,description:U0,else:u,examples:s,exclusiveMaximum:U0,exclusiveMinimum:U0,format:U0,if:u,maximum:U0,maxItems:U0,maxLength:U0,maxProperties:U0,minimum:U0,multipleOf:U0,not:u,pattern:U0,propertyNames:u,readOnly:U0,then:u,title:U0,writeOnly:U0,uniqueItems:V0(e=>e===!1,L0),minLength:W0,minItems:W0,minProperties:W0,required:V0(N0,a),enum:V0(N0,i(l)),type:B0((e,t)=>{let n=Array.isArray(e),r=Array.isArray(t);return!n&&!r?j0(e,t):a(n?e:[e],r?t:[t])}),items:V0(e=>!Array.isArray(e)&&A0(e),H0(o,P0(o))),anyOf:f,allOf:f,oneOf:f,properties:d,patternProperties:d,additionalProperties:p,additionalItems:p,dependencies:V0(T0,r(B0(H0(o,a))))};return{compareSchemaValues:l,compareSchemaDefinitions:o}}function G0(e){return e}var K0=(e,t)=>e?K0(t%e,e):t,jpe=(e,t)=>Math.abs(e*t)/K0(e,t);function Mpe(e,t){return e===t?e:`^(?=.*(?:${e}))(?=.*(?:${t})).*$`}function q0(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++)n(r,t[e])}}function J0(e,t){return e||t}function Y0(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 Npe(e){let t=new Map;for(let n of e)for(let e of n[0])t.set(e,n[1]);return t}function X0(e,t,n){n===void 0||A0(n)?delete e[t]:e[t]=n}var Ppe=[`properties`,`patternProperties`,`additionalProperties`];function Z0(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 Q0=[[],[]];function $0(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 Fpe=[`items`,`additionalItems`],Ipe=[`if`,`then`,`else`];function e2(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 t2(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 n2(e,t,n){return[e,t,n]}function Lpe(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 Rpe=[n2(`minimum`,`maximum`,e=>e.maximum>=e.minimum),n2(`exclusiveMinimum`,`maximum`,e=>e.maximum>e.exclusiveMinimum),n2(`minimum`,`exclusiveMaximum`,e=>e.exclusiveMaximum>e.minimum),n2(`exclusiveMinimum`,`exclusiveMaximum`,e=>e.exclusiveMaximum>e.exclusiveMinimum),n2(`minLength`,`maxLength`,e=>e.maxLength>=e.minLength),n2(`minItems`,`maxItems`,e=>e.maxItems>=e.minItems),n2(`minProperties`,`maxProperties`,e=>e.maxProperties>=e.minProperties)];function zpe({mergePatterns:e=Mpe,isSubRegExp:t=Object.is,intersectJson:n=Cpe,deduplicateJsonSchemaDef:r=G0,defaultMerger:i=G0,assigners:a=[],checks:o=Rpe,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;A0(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($0(e,t,a))return!1;let s=e.length<2;if(o===!1){if(s)return;if($0(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=A0(a),f=A0(c);if(d&&f)return X0(n,`properties`,v(r,o)),X0(n,`patternProperties`,i&&s?v(i,s):i??s),delete n.additionalProperties,n;X0(n,`additionalProperties`,_(a,c));let p={},m=Object.keys(r),h=m.length,[g,y]=i?Z0(i):Q0,[b,x]=s?Z0(s):Q0,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)}X0(n,`properties`,p);let O={},k=new Set;return y.length>0&&x.length>0&&q0(y,x,(n,r)=>{t(n,r)&&k.add(n),t(r,n)&&k.add(r),O[e(n,r)]=_(i[n],s[r])}),O=u(O,i,y,k,c,f),O=u(O,s,x,k,a,d),X0(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||A0(o);for(;l<c.length;l++)s.push(t?c[l]:_(c[l],o));X0(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];X0(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)=>{e2(e,t);let r=e2({},n);return e.allOf===void 0?e.allOf=[r]:e.allOf=e.allOf.concat(r),e};function m(e,t){let n=[];if(q0(e,t,(e,t)=>{try{n.push(_(e,t))}catch{}}),n.length===0)throw Error(`No valid schema combinations could be produced for "${JSON.stringify(e)}" and "${JSON.stringify(t)}"; the merged result is empty`);return r(n)}let h=Npe([[Ppe,d],[Fpe,f],[Ipe,p],...a]),g=Lpe(o);function _(e,t){if(e===!1||t===!1)return!1;if(A0(e))return A0(t)?!0:t;if(A0(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=Y0(_),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=t2(e,t);if(n!==void 0)return n}else if(n||r){let i=new Set;if(n&&r)q0(e,t,(e,t)=>{let n=t2(e,t);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=t2(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:J0,writeOnly:J0,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:Y0((e,t)=>Array.isArray(e)?Array.isArray(t)?M0(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 M0(e,t)},multipleOf:(e,t)=>{let n=1;for(;!Number.isInteger(e)||!Number.isInteger(t);)n*=10,e*=10,t*=10;return jpe(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:J0,required:M0,...s};return{mergeSchemaDefinitions:_,mergeArrayOfSchemaDefinitions:c}}function Bpe(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 Vpe(e){return t=>e(Bpe(t))}var{compareSchemaDefinitions:Hpe,compareSchemaValues:Upe}=Ape(),{mergeArrayOfSchemaDefinitions:Wpe}=zpe({intersectJson:wpe(Upe),deduplicateJsonSchemaDef:F0(Hpe)}),r2=Vpe(Wpe);function i2(e,t,n={},r,i,a=!1){return u2(e,t,n,r,void 0,void 0,i,a)[0]}function a2(e){return typeof e==`boolean`?e?{}:{not:{}}:e}function Gpe(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){if(c&&typeof c!=`boolean`){let t=c;p=p.concat(u2(e,t,n,a,r,i,o))}if(l&&typeof l!=`boolean`){let t=l;p=p.concat(u2(e,t,n,a,r,i,o))}}else{let t=d?c:l;if(t!==void 0){let s=a2(t);p=p.concat(u2(e,s,n,a,r,i,o))}}return p.length&&(f=p.map(e=>S0(u,e))),f.flatMap(t=>u2(e,t,n,a,r,i,o))}function o2(e){return e.reduce((e,t)=>t.length>1?t.flatMap(t=>QD(e.length,n=>[...e[n]].concat(t))):(e.forEach(e=>e.push(t[0])),e),[[]])}function s2(e,t){return Object.keys(e.patternProperties).filter(e=>RegExp(e).test(t)).reduce((t,n)=>(qD(t,[n],e.patternProperties[n]),t),{})}function Kpe(e,t,n,r,i,a,o,s){let c=c2(e,t,n,r,i,a,o,s);return c.length>1||c[0]!==t?c:`dependencies`in t?f2(e,t,n,r,i,a,o).flatMap(t=>u2(e,t,n,a,r,i,o)):`allOf`in t&&Array.isArray(t.allOf)?o2(t.allOf.map(t=>u2(e,t,n,a,r,i,o))).map(e=>({...t,allOf:e})):[t]}function c2(e,t,n,r,i,a,o,s){let c=l2(t,n,i,void 0,s);return c===t?[t]:u2(e,c,n,a,r,i,o,s)}function l2(e,t,n,r,i,a=!1){if(!E1(e))return e;let o=e,s=r;if(`$ref`in o){let{$ref:e,...r}=o;if(n.includes(e))return a?{...o,[H1]:!0}:o;n.push(e),o={...v0(e,t,s),...r,[V1]:e},`$id`in o&&(s=o.$id)}if(`properties`in o){let e=[],r=eO(o[L1],(r,a,o)=>{let c=[...n];r[o]=l2(a,t,c,s,i,!i),e.push(c)},{});MD(n,aO(cD(e))),o={...o,[L1]:r}}if(`items`in o&&!Array.isArray(o.items)&&typeof o.items!=`boolean`&&(o={...o,items:l2(o.items,t,n,s,i)}),i){let r,a;`anyOf`in e&&Array.isArray(e.anyOf)?(r=A1,a=o[A1]):`oneOf`in e&&Array.isArray(e.oneOf)&&(r=I1,a=o[I1]),r&&a&&(o={...o,[r]:a.map(e=>l2(e,t,n,s,i))})}return u0(e,o)?e:o}function qpe(e,t,n,r,i){let a={...t,properties:{...t.properties}},o=r&&E1(r)?r:{};return Object.keys(o).forEach(t=>{if(!(t in a.properties)){if(`patternProperties`in a){let r=s2(a,t);if(!ED(r)){a.properties[t]=i2(e,{[k1]:Object.values(r)},n,Y(o,[t]),i),a.properties[t][O1]=!0;return}}if(`additionalProperties`in a&&a.additionalProperties!==!1){let r;r=typeof a.additionalProperties==`boolean`?{type:b0(Y(o,[t]))}:`$ref`in a.additionalProperties?i2(e,{[B1]:Y(a.additionalProperties,[B1])},n,Y(o,[t]),i):`type`in a.additionalProperties?{...a.additionalProperties}:`anyOf`in a.additionalProperties||`oneOf`in a.additionalProperties?{type:`object`,...a.additionalProperties}:{type:b0(Y(o,[t]))},a.properties[t]=r,a.properties[t][O1]=!0}else a.properties[t]={type:`null`},a.properties[t][O1]=!0}}),a}function Jpe(e){return r2(e)}function u2(e,t,n,r,i=!1,a=[],o,s){return E1(t)?Kpe(e,t,n,i,a,r,o,s).flatMap(t=>{var s;let c=t;if(`if`in c)return Gpe(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=[],n={};(s=c.allOf)==null||s.forEach(r=>{if(typeof r==`object`&&r.contains)e.push(r);else{t.push(r);for(let e of Object.getOwnPropertySymbols(r))e in n||(n[e]=r[e])}}),e.length&&(c={...c,allOf:t}),c=o?o(c):Jpe(c);for(let e of Object.getOwnPropertySymbols(n))c[e]=n[e];e.length&&(c.allOf=e)}catch(e){console.warn(`could not merge subschemas in allOf:
216
+ `,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=s2(t,i);return ED(a)||(t.properties[i]=i2(e,{allOf:[t.properties[i],...Object.values(a)]},n,Y(r,[i]),o)),t},{...c,properties:{...c.properties}})),`patternProperties`in c||`additionalProperties`in c&&c.additionalProperties!==!1?qpe(e,c,n,r,o):c}):[{}]}function Ype(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=y0(t);a=a.map(e=>l2(e,n,[]));let l=w0(e,o,a,n,s);return r?(w0(e,o,d2(a,!1,n),n,s),a.map(e=>S0(c,e))):[S0(c,a[l])]}return[t]}function d2(e,t=!1,n){return e.map(e=>{if(!E1(e))return a2(e);let r=t&&n?l2(e,n,[]):e;return r.additionalProperties===!1?{...r,additionalProperties:!0}:r})}function f2(e,t,n,r,i,a,o){let{dependencies:s,...c}=t;return Ype(e,c,n,r,a).flatMap(t=>p2(e,s,t,n,r,i,a,o))}function p2(e,t,n,r,i,a,o,s){let c=[n];for(let l in t)if((i||Y(o,[l])!==void 0)&&(!n.properties||l in n.properties)){let[u,d]=g0(l,t);return Array.isArray(d)?c[0]=Xpe(n,d):E1(d)&&(c=Zpe(e,n,r,l,d,i,a,o,s)),c.flatMap(t=>p2(e,u,t,r,i,a,o,s))}return c}function Xpe(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 Zpe(e,t,n,r,i,a,o,s,c){return u2(e,i,n,s,a,o,c).flatMap(i=>{let{oneOf:l,...u}=i,d=S0(t,u);return l===void 0?d:o2(l.map(t=>typeof t==`boolean`||!(`$ref`in t)?[t]:c2(e,t,n,a,o,s))).flatMap(t=>Qpe(e,d,n,r,t,a,o,s,c))})}function Qpe(e,t,n,r,i,a,o,s,c){let l=i.filter(t=>{if(typeof t==`boolean`||!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]=g0(r,l.properties);return u2(e,{...l,properties:u},n,s,a,o,c).map(e=>S0(t,e))})}function m2(e,t,n,r,i,a={},o){if(Array.isArray(n[i])){let s=y0(n)||r,c=n[i].map(n=>i2(e,n,t,a,o)),l=Y(a,s);if(l!==void 0)return c.find(e=>u0(Y(e,[L1,s,M1],Y(e,[L1,s,j1])),l))}}function h2(e,t,n,r,i){let a=n;if(dD(n,`$ref`)&&(a=i2(e,n,t,void 0,i)),ED(r))return a;let[o,...s]=Array.isArray(r)?[...r]:r.split(`.`);if(o!==void 0&&o!==``&&dD(a,o))return a=Y(a,o),h2(e,t,a,s,i)}function g2(e,t,n,r,i,a){let o=h2(e,t,n,r,a);return o===void 0?i:o}var _2={title:`!@#$_UNKNOWN_$#@!`};function $pe(e,t,n,r,i={},a){let o=Array.isArray(r)?[...r]:r.split(`.`),s=n,c=o.pop(),l=String(c);o.length&&o.forEach(n=>{s=g2(e,t,s,[L1,n],{},a),dD(s,`oneOf`)?s=m2(e,t,s,l,I1,Y(i,n),a):dD(s,`anyOf`)&&(s=m2(e,t,s,l,A1,Y(i,n),a))}),dD(s,`oneOf`)?s=m2(e,t,s,l,I1,i,a):dD(s,`anyOf`)&&(s=m2(e,t,s,l,A1,i,a));let u=g2(e,t,s,[L1,c],_2,a);u===_2&&(u=void 0);let d=g2(e,t,s,Kfe,[],a),f;return u&&Array.isArray(d)&&(f=d.includes(l)),{field:u,isRequired:f}}var eme={type:`object`,$id:Gfe,properties:{__not_really_there__:{type:`number`}}};function v2(e,t,n,r,i){let a=0;return n&&(jC(n.properties)?a+=KD(n.properties,(n,a,o)=>{let s=Y(r,o);if(typeof a==`boolean`)return n;if(dD(a,`$ref`))return n+v2(e,t,i2(e,a,t,s,i),s||{},i);if((dD(a,`oneOf`)||dD(a,`anyOf`))&&s){let r=dD(a,`oneOf`)?I1:A1,o=y0(a);return n+y2(e,t,s,Y(a,r),-1,o,i)}if(a.type===`object`)return n+ +!!jC(s)+v2(e,t,a,s,i);if(a.type===b0(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):pD(n.type)&&n.type===b0(r)&&(a+=1)),a}function y2(e,t,n,r,i=-1,a,o){let s=r.map(e=>l2(e,t,[])),c=C0(n,r,a);if(kD(c))return c;let l=s.reduce((r,i,o)=>(w0(e,n,[eme,i],t,a)===1&&r.push(o),r),[]);if(l.length===1)return l[0];l.length||QD(s.length,e=>l.push(e));let u=new Set,{bestIndex:d}=l.reduce((r,i)=>{let{bestScore:a}=r,c=s[i],l=v2(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 b2(e){let t=e[j1],n=x0(e);return E1(t)&&pD(t?.$data)&&n!==`object`&&n!==`array`}function x2(e){return Array.isArray(e.enum)&&e.enum.length===1||`const`in e}function S2(e){return Array.isArray(e.items)&&e.items.every(e=>E1(e))}function C2(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:C2(a[o],t[o],n,r,i));return(n||i)&&c.length<s.length&&c.push(...s.slice(c.length)),c}if(E1(t)){let a=Object.assign({},e);return Object.keys(t).reduce((o,s)=>{let c=Y(t,s),l=E1(e)&&s in e,u=s in t,d=Y(e,s)??{},f=l&&E1(d)&&Object.values(d).some(e=>E1(e)),p=l&&E1(Y(e,s)),m=u&&E1(c);return p&&m&&!f?(o[s]={...Y(e,s),...c},o):(o[s]=C2(Y(e,s),c,n,r,i&&(l||!u)),a)},a)}return r&&(e!==void 0&&AD(t)||typeof t==`number`&&Number.isNaN(t))||i&&!AD(t)?e:t}function w2(e,t,n=!1){return Object.keys(t).reduce((r,i)=>{let a=e?e[i]:{},o=t[i];if(e&&i in e&&E1(o))r[i]=w2(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},{...e})}function tme(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 nme(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 T2(e,t){if(e.enum){let n,r;if(t){let{enumNames:e,enumOrder:i}=Y1(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=nme(i,r)),i}let n,r;e.anyOf?(n=e.anyOf,r=t?.anyOf):e.oneOf&&(n=e.oneOf,r=t?.oneOf);let i=y0(e);if(t){let{optionsSchemaSelector:e=i}=Y1(t);i=e}return n?.map((e,t)=>{let{title:n}=Y1(r?.[t]),a=e,o,s=n;if(i){let e=Y(a,[L1,i],{});o=Y(e,M1,Y(e,j1)),s=s??e?.title??a.title??String(o)}else o=tme(a),s=s??a.title??String(o);return{schema:a,label:s,value:o}})}function E2(e,t,n={},r){let i=i2(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`&&x2(e)):!1}function D2(e,t,n,r){return!t.uniqueItems||!t.items||typeof t.items==`boolean`?!1:E2(e,t.items,n,r)}var rme=[`string`,`number`,`integer`,`boolean`,`null`],O2;(function(e){e[e.Ignore=0]=`Ignore`,e[e.Invert=1]=`Invert`,e[e.Fallback=2]=`Fallback`})(O2||={});function k2(e,t=O2.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!==O2.Ignore&&E1(e.additionalItems)?e.additionalItems:{}}function A2(e,t){let{default:n,type:r}=e;return Array.isArray(r)&&r.includes(`null`)&&ED(t)&&n===null?null:t}function j2(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||!E1(n)||!ED(n))&&(e[t]=n);else if(l!==`skipDefaults`){let r=i===void 0?a.includes(t):i;E1(n)?l===`skipEmptyDefaults`?ED(n)||(e[t]=n):(!ED(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 M2(e,t,n={}){let{parentDefaults:r,rawFormData:i,rootSchema:a={},includeUndefinedValues:o=!1,_recurseList:s=[],experimental_defaultFormStateBehavior:c,experimental_customMergeAllOf:l,required:u,shouldMergeDefaultsIntoFormData:d=!1,initialDefaultsGenerated:f}=n,p=E1(i)?i:{},m=E1(t)?t:{},h=r,g=h&&c?.nestedDefaultsPrecedence===`ancestorWins`,_=null,v=c,y=s;if(m.const!==void 0&&c?.constAsDefaults!==`never`&&!b2(m))h=m[j1];else if(E1(h)&&E1(m.default)&&!m.anyOf&&!m.oneOf&&!m.$ref)h=g?w2(m.default,h):w2(h,m.default);else if(`default`in m&&!g&&!m.anyOf&&!m.oneOf&&!m.$ref)h=m.default;else if(`$ref`in m){let e=m[B1];s.includes(e)||(y=s.concat(e),_=v0(e,a));let t=i===void 0||E1(i)&&ED(i);_&&!h&&t&&(h=m.default),d&&_&&!E1(i)&&(p=i)}else if(`dependencies`in m){let t=f2(e,m,a,!1,[],{...P2(e,m,n,h),...p},l);[_]=t}else if(S2(m)&&!g)h=m.items.map((t,n)=>M2(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=y0(m),{type:o=`null`}=n;!Array.isArray(o)&&rme.includes(o)&&v?.constAsDefaults===`skipOneOf`&&(v={...v,constAsDefaults:`never`}),_=t[y2(e,a,i??m.default,t,0,r,l)],_=S0(n,_)}else if(`anyOf`in m){let{anyOf:t,...n}=m;if(t.length===0)return;let r=y0(m);_=t[y2(e,a,i??m.default,t,0,r,l)],_=S0(n,_)}if(_)return M2(e,_,{rootSchema:a,includeUndefinedValues:o,_recurseList:y,experimental_defaultFormStateBehavior:v,experimental_customMergeAllOf:l,parentDefaults:h,rawFormData:i??p,required:u,shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:f});h===void 0&&(h=m.default);let b=P2(e,m,n,h)??h;if(d){let{arrayMinItems:t={}}=c||{},{mergeExtraDefaults:n}=t,r=N2(e,m,a,i,c,l);(!E1(i)||`allOf`in m)&&(b=C2(b,r,n,!0))}return b}function N2(e,t,n,r,i,a){let o=i?.allOf===`populateDefaults`&&`allOf`in t,s=o?i2(e,t,n,r,a):t,c=!x2(s)&&E2(e,s,n,a),l=r;return c&&(l=T2(s)?.some(e=>u0(e.value,r))?r:void 0),s.const&&i?.constAsDefaults===`always`?l=s.const:E1(l)&&E1(s.properties)&&(l=Object.keys(s.properties).reduce((t,r)=>{let c=Y(s,[L1,r],{});return r in t&&(o||E1(c)&&`allOf`in c)&&(t[r]=N2(e,c,n,Y(t,r),i,a)),t},{...l})),l}function ime(e,t,{rawFormData:n,rootSchema:r={},includeUndefinedValues:i=!1,_recurseList:a=[],experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:s,required:c,shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u}={},d){{let f=E1(n)?n:{},p=t,m=o?.allOf===`populateDefaults`&&`allOf`in p||o?.emptyObjectFields!==`skipEmptyDefaults`&&`if`in p?i2(e,p,r,f,s):p,h=m[j1],g=Object.keys(m.properties||{}).reduce((t,n)=>{let p=Y(m,[L1,n],{}),g=E1(h)&&h[n]!==void 0,_=(E1(p)&&`const`in p||g)&&o?.constAsDefaults!==`never`&&!b2(p);return j2(t,n,M2(e,p,{rootSchema:r,_recurseList:a,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:s,includeUndefinedValues:i===!0,parentDefaults:Y(d,[n]),rawFormData:Y(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=E1(m.additionalProperties)?m.additionalProperties:{},n=new Set,p=[];Object.keys(f).filter(e=>!m.properties||!m.properties[e]).forEach(e=>{n.add(e),p.push(e)}),E1(d)&&p.length===0&&Object.keys(d).filter(e=>!m.properties||!m.properties[e]).forEach(e=>n.add(e)),n.forEach(n=>{let h=M2(e,t,{rootSchema:r,_recurseList:a,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:s,includeUndefinedValues:i===!0,parentDefaults:Y(d,[n]),rawFormData:Y(f,[n]),required:m.required?.includes(n),shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u});j2(g,n,h,i,c,p)})}return A2(t,g)}}function ame(e,t,{rawFormData:n,rootSchema:r={},_recurseList:i=[],experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,required:s,requiredAsRoot:c=!1,shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u}={},d){let f=d,p=t,m=a?.arrayMinItems??{},{populate:h,mergeExtraDefaults:g}=m,_=h===`never`,v=h===`requiredOnly`,y=h===`all`||!_&&!v,b=m?.computeSkipPopulate??(()=>!1),x=a?.emptyObjectFields===`skipEmptyDefaults`?void 0:[];if(Array.isArray(f)&&(f=f.map((t,c)=>M2(e,k2(p,O2.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=k2(p);if(_)f=n;else{let c=n.map((n,c)=>M2(e,t,{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,rawFormData:n,parentDefaults:Y(f,[c]),required:s,shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u}));f=C2(f,c,(v&&s||y)&&g)}}let S=Array.isArray(f)?f.length:0;if(_){if(l){if(p.minItems&&p.minItems>S){let e=Array.from({length:p.minItems-S},()=>null);return(f??[]).concat(e)}return f}return f??x}if(v&&!s)return f||void 0;let C;if(!p.minItems||D2(e,p,r,o)||b(e,p,r)||p.minItems<=S)C=f||!s&&!c?f:x;else{let t=f||[],n=k2(p,O2.Invert),c=n.default,u=Array.from({length:p.minItems-S},()=>M2(e,n,{parentDefaults:c,rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,required:s,shouldMergeDefaultsIntoFormData:l}));C=t.concat(u)}return A2(t,C)}function P2(e,t,n={},r){switch(x0(t)){case`object`:return ime(e,t,n,r);case`array`:return ame(e,t,n,r);default:return}}function F2(e,t,n,r,i=!1,a,o,s){if(!E1(t))throw Error(`Invalid schema: ${t}`);let c=i2(e,t,r,n,o),l=M2(e,c,{rootSchema:r,includeUndefinedValues:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,rawFormData:n,shouldMergeDefaultsIntoFormData:!0,initialDefaultsGenerated:s,requiredAsRoot:!0});if(c.type!==`object`&&E1(c.default))return{...l,...n};if(E1(n)||Array.isArray(n)){let{mergeDefaultsIntoFormData:t}=a||{},i=t===`useDefaultIfFormDataUndefined`;return C2(l,N2(e,c,r??c,n,a,o),!0,i,!0)}return l}function I2(e={}){return`widget`in Y1(e)&&Y1(e).widget!==`hidden`}function L2(e,t,n={},r,i){if(n[`ui:widget`]===`files`)return!0;if(t.items){let n=i2(e,t.items,r,void 0,i);return n.type===`string`&&n.format===`data-url`}return!1}function ome(e,t,n={},r,i,a){let{label:o=!0}=Y1(n,i),s=!!o;if(s){let i=x0(t),o=!!t[O1];i===`array`&&(s=o||D2(e,t,r,a)||L2(e,t,n,r,a)||I2(n)),i===`object`&&(s=o),i===`boolean`&&n&&!n[`ui:widget`]&&(s=!1),n?.[`ui:field`]&&(s=!1)}return s}function sme(e,t){if(t.length===0&&typeof e!=`object`)return e;let n=WD(e,t);return Array.isArray(e)?Object.keys(n).map(e=>n[e]):n}function cme(e,t){let n=(e,t)=>typeof e!=`object`||ED(e)||t&&!ED(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[G1]&&c.$name!==``?i.push(c[F1]):r(c,i,e)}else s===`$name`&&c!==``&&a.forEach(e=>{let r=Y(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 R2(e){return AD(e)||e===``?!0:Array.isArray(e)?e.length===0:E1(e)?Object.values(e).every(R2):!1}function lme(e,t){return t?t(e):r2(e)}function ume(e,t,n={},r,i){function a(e){return E1(e)}function o(e){return E1(e)}function s(e,t,r){let{properties:i,additionalProperties:a,patternProperties:s,propertyNames:c}=e,l=new Set(e.required??[]);function u(e,t,i,a=!1){let s=p(t,i,r[e]);if(!a&&E1(s)){let e=o(t)?t:{};e.$ref!==void 0&&(e=v0(e.$ref,n));let r=new Set(e.required??[]);if(Object.entries(s).every(([e,t])=>!r.has(e)&&R2(t)))return}s!==void 0&&(r[e]=s)}if(i!==void 0)for(let[e,n]of Object.entries(i))u(e,n,t[e],l.has(e));let d;if(s!==void 0){d=[];let e=Object.entries(s).map(([e,t])=>[new RegExp(e),t]),n=new Set(Object.keys(i??{}));for(let[r,i]of Object.entries(t))if(!n.has(r)){let t=e.find(([e])=>e.test(r));t===void 0?d.push(r):u(r,t[1],i)}}if(a!==void 0&&a!==!1){let e=a;if(d!==void 0)for(let n of d)u(n,e,t[n]);else{let n=new Set(Object.keys(i??{}));for(let[r,i]of Object.entries(t))n.has(r)||u(r,e,i)}}if(c!==void 0)for(let[e,n]of Object.entries(t))r[e]=n;return r}function c(e,t,n){let{items:r,additionalItems:i}=e;if(r!==void 0)if(Array.isArray(r))for(let e=0;e<r.length;e+=1)n.push(p(r[e],t[e]));else for(let e=0;e<t.length;e+=1)n.push(p(r,t[e]));if(i)for(let e=n.length;e<t.length;e+=1)n.push(p(i,t[e]));return n}function l(t,r,i){let{if:a,then:s,else:c}=t;if(a===void 0)return i;let l=(o(a)?e.isValid(a,r,n):a)?s:c;return l===void 0?i:p(l,r,i)}function u(t,r,a,o){if(!Array.isArray(t)||E2(e,r,n,i))return o;let s=d2(t,!0,n),c=y2(e,n,a,s,0,y0(r),i),l=t[c];return p(E1(l)?l2(l,n,[]):s[c],a,o)}function d(e,t,n){let{anyOf:r}=e;if(!Array.isArray(r))return n;if(t===void 0||Array.isArray(t)&&t.length===0||E1(t)&&Object.keys(t).length===0){let e=n;for(let n of r)e=p(n,t,e);return e}return u(r,e,t,n)}function f(e,t,n){let{dependencies:r}=e;if(r===void 0||!a(t))return n;let i=n;for(let[e,n]of Object.entries(r))e in t&&!Array.isArray(n)&&(i=p(n,t,i));return i}function p(e,t,r){if(t===void 0||e===!1)return;if(e===!0||ED(e))return t;let o=e,{$ref:m,allOf:h}=o;if(m!==void 0)return p(v0(m,n),t,r);if(h){o=lme(o,i);let e=o.allOf;if(e)for(let n=0;n<e.length;n++)r=p(e[n],t,r)}let g=d(o,t,u(o.oneOf,o,t,r)),_=x0(o);if(_===`object`){if(!a(t))return;g=s(o,t,a(g)?g:{})}else if(_===`array`){if(!Array.isArray(t))return;g=c(o,t,Array.isArray(g)?g:[])}else g===void 0&&(g=t);return f(o,t,l(o,t,g))}return p(t,r)}var z2=Symbol(`no Value`);function B2(e){if(Array.isArray(e.enum))return e.enum;let t=e.oneOf||e.anyOf;if(!Array.isArray(t))return;let n=t.map(e=>`const`in e?e[j1]:Array.isArray(e.enum)&&e.enum.length===1?e.enum[0]:z2).filter(e=>e!==z2);return n.length>0?n:void 0}function dme(e,t){let n=B2(e);if(!n||n.some(e=>u0(e,t)))return z2;let r=Y(e,M1,z2);return r!==z2&&n.some(e=>u0(e,r))?r:n.length===1?n[0]:void 0}function V2(e,t,n,r,i={},a){let o;if(dD(n,`properties`)){let s={};if(dD(r,`properties`)){let e=Y(r,L1,{});Object.keys(e).forEach(e=>{dD(i,e)&&(s[e]=void 0)})}let c=Object.keys(Y(n,L1,{})),l={};c.forEach(o=>{let c=Y(i,o),u=Y(r,[L1,o],{}),d=Y(n,[L1,o],{});dD(u,`$ref`)&&(u=i2(e,u,t,c,a)),dD(d,`$ref`)&&(d=i2(e,d,t,c,a));let f=Y(u,`type`),p=Y(d,`type`);if(!f||f===p)if(dD(s,o)&&delete s[o],p===`object`||p===`array`&&Array.isArray(c)){let n=V2(e,t,d,u,c,a);(n!==void 0||p===`array`)&&(l[o]=n)}else{let e=Y(d,M1,z2),t=Y(u,M1,z2);e!==z2&&e!==c&&(t===c?s[o]=e:Y(d,`readOnly`)===!0&&(s[o]=void 0));let n=Y(d,j1,z2),r=Y(u,j1,z2);if(n!==z2&&n!==c&&(s[o]=r===c?n:void 0),dD(i,o)){let e=dme(d,c);e!==z2&&(s[o]=e)}}}),o={...typeof i==`string`||Array.isArray(i)?void 0:i,...s,...l}}else if(Y(r,`type`)===`array`&&Y(n,`type`)===`array`&&Array.isArray(i)){let s=Y(r,`items`),c=Y(n,`items`);if(typeof s==`object`&&typeof c==`object`&&!Array.isArray(s)&&!Array.isArray(c)){dD(s,`$ref`)&&(s=i2(e,s,t,i,a)),dD(c,`$ref`)&&(c=i2(e,c,t,i,a));let r=Y(s,`type`),l=Y(c,`type`);if(!r||r===l){let r=Y(n,`maxItems`,-1);if(l===`object`)o=i.reduce((n,i)=>{let o=V2(e,t,c,s,i,a);return o!==void 0&&(r<0||n.length<r)&&n.push(o),n},[]);else{let e=B2(c),t=e?i.filter(t=>e.some(e=>u0(e,t))):i;o=r>0&&t.length>r?t.slice(0,r):t}}}else typeof s==`boolean`&&typeof c==`boolean`&&s===c&&(o=i)}return o}function H2(e,t,n,r,i,a=[],o){if(`$ref`in t||`dependencies`in t||`allOf`in t||`if`in t){let s=i2(e,t,r,i,o);if(a.findIndex(e=>u0(e,s))===-1)return H2(e,s,n,r,i,a.concat(s),o)}let s={[F1]:n.replace(/^\./,``)};if(`oneOf`in t||`anyOf`in t){let c=`oneOf`in t?t.oneOf:t.anyOf,l=c[y2(e,r,i,c,0,y0(t),o)];s={...s,...H2(e,l,n,r,i,a,o)}}if(`additionalProperties`in t&&t.additionalProperties!==!1){qD(s,G1,!0);let c=jC(t.additionalProperties)?t[Wfe]:{},l=Y(t,L1,{});for(let t of Object.keys(i??{}))t in l||(s[t]=H2(e,c,`${n}.${t}`,r,Y(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]=H2(e,c[i],`${n}.${i}`,r,t,a,o):l?s[i]=H2(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]=H2(e,c,`${n}.${i}`,r,t,a,o)})}else if(`properties`in t)for(let c in t.properties){let l=Y(t,[L1,c],{});s[c]=H2(e,l,`${n}.${c}`,r,Y(i,[c]),a,o)}return s}function fme(e,t,n=``,r,i,a){return H2(e,t,n,r,i,void 0,a)}var pme=class{constructor(e,t,n,r){t?.$schema===`https://json-schema.org/draft/2020-12/schema`?this.rootSchema=h0(t,Y(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||!u0(this.rootSchema,t)||!u0(this.experimental_defaultFormStateBehavior,n)||this.experimental_customMergeAllOf!==r}findFieldInSchema(e,t,n){return $pe(this.validator,this.rootSchema,e,t,n,this.experimental_customMergeAllOf)}findSelectedOptionInXxxOf(e,t,n,r){return m2(this.validator,this.rootSchema,e,t,n,r,this.experimental_customMergeAllOf)}getDefaultFormState(e,t,n=!1,r){return F2(this.validator,e,t,this.rootSchema,n,this.experimental_defaultFormStateBehavior,this.experimental_customMergeAllOf,r)}getDisplayLabel(e,t,n){return ome(this.validator,e,t,this.rootSchema,n,this.experimental_customMergeAllOf)}getClosestMatchingOption(e,t,n,r){return y2(this.validator,this.rootSchema,e,t,n,r,this.experimental_customMergeAllOf)}getFirstMatchingOption(e,t,n){return w0(this.validator,e,t,this.rootSchema,n)}getFromSchema(e,t,n){return g2(this.validator,this.rootSchema,e,t,n,this.experimental_customMergeAllOf)}isFilesArray(e,t){return L2(this.validator,e,t,this.rootSchema,this.experimental_customMergeAllOf)}isMultiSelect(e){return D2(this.validator,e,this.rootSchema,this.experimental_customMergeAllOf)}isSelect(e){return E2(this.validator,e,this.rootSchema,this.experimental_customMergeAllOf)}omitExtraData(e,t){return ume(this.validator,e,this.rootSchema,t)}retrieveSchema(e,t,n){return i2(this.validator,e,this.rootSchema,t,this.experimental_customMergeAllOf,n)}sanitizeDataForNewSchema(e,t,n){return V2(this.validator,this.rootSchema,e,t,n,this.experimental_customMergeAllOf)}toPathSchema(e,t,n){return fme(this.validator,e,t,this.rootSchema,n,this.experimental_customMergeAllOf)}};function mme(e,t,n={},r){return new pme(e,t,n,r)}function hme(e){if(!e.includes(`data:`))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+=1)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 U2(e,t){let n=String(e);for(;n.length<t;)n=`0${n}`;return n}function W2(e,t){let n=e<=0&&t<=0;if(!n&&(e<0||t<0))throw Error(`Both start (${e}) and stop (${t}) must both be <= 0 or > 0, got one of each`);let r=new Date().getFullYear(),i=n?r+e:e,a=n?r+t:t;if(i>a)return W2(t,e).reverse();let o=[];for(let e=i;e<=a;e+=1)o.push({value:e,label:U2(e,2)});return o}function gme(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 _me(e,t){return gme(e,t)}function G2(e,t=[],n){if(Array.isArray(e))return e.map(e=>G2(e,t)).filter(e=>e!==void 0);let r=t[e===``||e===null?-1:Number(e)];return r?r.value:n}function K2(e,t,n=[]){let r=G2(e,n);return Array.isArray(t)?t.filter(e=>!u0(e,r)):u0(r,t)?void 0:t}function q2(e,t){return Array.isArray(t)?t.some(t=>u0(t,e)):u0(t,e)}function J2(e,t=[],n=!1){let r=t.map((t,n)=>q2(t.value,e)?String(n):void 0).filter(e=>e!==void 0);return n?r:r[0]}function Y2(e,t,n,r=`indexed`,i){if(e===void 0||n&&Array.isArray(e)&&e.length<1||!n&&e===i)return i;if(r===`realValue`)return n?e.map(String):String(e);let a=J2(e,t,n);return a===void 0?i:a}function X2(e,t,n=[]){let r=G2(e,n);if(!AD(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}function Z2(e,t,n){if(e===``||!Array.isArray(t))return n;let r=t.find(t=>String(t.value)===e);if(r)return r.value;let i=Number(e);return!Number.isNaN(i)&&i>=0&&i<t.length?t[i].value:n}function Q2(e,t,n=`indexed`,r){return n===`realValue`?Array.isArray(e)?e.map(e=>Z2(e,t,r)):Z2(e,t,r):G2(e,t,r)}function $2(e,t,n=`indexed`){return n===`realValue`?AD(e)?``:String(typeof e==`object`?t:e):String(t)}var e4=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`?Y(this.errorSchema,e):this.errorSchema;return!t&&e&&(t={},JD(this.errorSchema,e,t,Object)),t}resetAllErrors(e){return this.errorSchema=e?AE(e):{},this}addErrors(e,t){let n=this.getOrCreateErrorBlock(t),r=Y(n,N1);return Array.isArray(r)||(r=[],n[N1]=r),Array.isArray(e)?qD(n,N1,[...new Set([...r,...e])]):qD(n,N1,[...new Set([...r,e])]),this}setErrors(e,t){return qD(this.getOrCreateErrorBlock(t),N1,Array.isArray(e)?[...new Set([...e])]:[e]),this}clearErrors(e){return qD(this.getOrCreateErrorBlock(e),N1,[]),this}};function t4(e,t){let n=qT(e),r=qT(t);if(e===t||!n&&!r)return[];if(n&&!r)return wT(e);if(!n&&r)return wT(t);let i=wT(HD(e,(e,n)=>!u0(e,Y(t,n)))),a=rD(wT(t),wT(e));return[...i,...a]}function vme(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 n4(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 r4(e,t,n={},r=!0){let i={type:t||`text`,...n4(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))),[`date`,`datetime-local`,`time`,`week`,`month`].includes(i.type)&&(e.formatMinimum!==void 0&&(i.min=e.formatMinimum),e.formatMaximum!==void 0&&(i.max=e.formatMaximum)),n.autocomplete&&(i.autoComplete=n.autocomplete),n.accept&&(i.accept=n.accept),i}function i4(e){return e?.optionValueFormat??`indexed`}var a4={props:{disabled:!1},submitText:`Submit`,norender:!1};function o4(e={}){let t=Y1(e);if(t?.submitButtonOptions){let e=t[z1];return{...a4,...e}}return a4}function s4(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 c4(){if(Y(globalThis,`process.env.NODE_ENV`)!==`test`)return{};let e=new Map;return new Proxy({},{get(t,n){return e.has(n)||e.set(n,sO(`test-id-`)),e.get(n)}})}var yme=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}})),l4=u(s(((e,t)=>{t.exports=yme()}))(),1),u4={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 bme(e){let t=Y(e,`MergedWidget`);if(!t){let n=e.defaultProps?.options||{};t=({options:t,...r})=>(0,H.jsx)(e,{options:{...n,...t},...r}),qD(e,`MergedWidget`,t)}return t}function d4(e,t,n={}){let r=x0(e);if(typeof t==`function`||t&&l4.isForwardRef((0,b.createElement)(t))||l4.isMemo(t))return bme(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 d4(e,r,n)}if(typeof r==`string`){if(!(r in u4))throw Error(`No widget for type '${r}' in schema: ${JSON.stringify(e)}`);if(t in u4[r]){let i=n[u4[r][t]];return d4(e,i,n)}}throw Error(`No widget '${t}' for type '${r}' in schema: ${JSON.stringify(e)}`)}function f4(e){let t=0;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t=(t<<5)-t+r,t&=t}return t.toString(16)}function p4(e){let t=new Set;return JSON.stringify(e,(e,n)=>(t.add(e),n)),JSON.stringify(e,Array.from(t).sort())}function m4(e){return f4(p4(e))}function xme(e){return f4(p4(e))}function Sme(e,t,n={}){try{return d4(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 h4(e,t){return`${pD(e)?e:e.$id}__${t}`}function g4(e){return h4(e,`description`)}function _4(e){return h4(e,`error`)}function v4(e){return h4(e,`examples`)}function y4(e){return h4(e,`help`)}function b4(e){return h4(e,`title`)}function x4(e,t=!1){let n=t?` ${v4(e)}`:``;return`${_4(e)} ${g4(e)} ${y4(e)}${n}`}function S4(e,t){return`${e}-${t}`}function C4(e,t){return h4(e,t)}function w4(e,t){return h4(e,`optional${t}`)}function T4(e){return!AD(e)&&(!jC(e)||Array.isArray(e)||!ED(e))}function Cme(e,t){let{rootSchema:n,schemaUtils:r}=e;return u0(t,n)?!0:`$ref`in n&&u0(t,r.retrieveSchema(n))}function E4(e,t,n){return t?n:e}function wme(e){return e?new Date(e).toJSON():void 0}function D4(e,t,n,r=!1){!r&&Array.isArray(n)&&t.default!==void 0&&J2(t.default,n,r)===void 0&&console.error(`The schema default value "${t.default}" is not one of the values in the enum options for "${e}"`)}function O4(e,t,n){let r=[Yfe];return dD(e,`formContext`)&&r.unshift(Jfe),Y(e,[...r,t],n)}function Tme(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 k4(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}}function Eme(e,t,n){let r=e[V1]??e[B1],i=n.uiSchemaDefinitions,a=r&&i?i[r]:void 0,o;if(o=a?!t||ED(t)?{...a}:w2(a,t):t||{},i){let t=e;if(r&&e.$ref&&!e[V1])try{t=v0(r,n.rootSchema)}catch(e){return console.warn(`could not resolve $ref in resolveUiSchema:
217
+ `,e),o}for(let e of[I1,A1]){let n=t[e];if(Array.isArray(n)&&n.length>0){let t=o[e],r=Array.isArray(t)?[...t]:[],a=!1;for(let e=0;e<n.length;e++){let t=n[e],o=t?.[V1]??t?.[B1];if(o&&o in i){let t=r[e]||{};r[e]=w2(i[o],t),a=!0}}a&&(o[e]=r)}}}return o}function A4(e){return e.const||e.enum?.length===1&&e.enum[0]===!0?!0:e.anyOf?.length===1?A4(e.anyOf[0]):e.oneOf?.length===1?A4(e.oneOf[0]):e.allOf?e.allOf.some(e=>A4(e)):!1}function j4({hideLabel:e,id:t,multiple:n,options:r,registry:i,uiSchema:a,value:o}){if(n||e)return null;let{label:s=!0}=Y1(a,i.globalUiOptions);if(!s)return null;let c=r.enumOptions?.find(({value:e})=>q2(e,o)),l=c?.schema?.description;return l?(0,H.jsx)(s4(`DescriptionFieldTemplate`,i,r),{id:g4(t),description:l,schema:c.schema,uiSchema:a,registry:i}):null}function M4(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+=1){let i=n[r];if(!Object.hasOwn(t,i)||!Object.is(e[i],t[i]))return!1}return!0}function Dme(e,t,n,r=`customDeep`){if(r===`always`)return!0;if(r===`shallow`){let{props:r,state:i}=e;return!M4(r,t)||!M4(i,n)}let{props:i,state:a}=e;return!u0(i,t)||!u0(a,n)}function N4(e){let t=aO(e.map(e=>jC(e)?x0(e):void 0).flat().filter(e=>e!==void 0));return t.length===1?t[0]:t}function P4(e,t,n,r){let{enableOptionalDataFieldForType:i=[]}=Y1(r,e.globalUiOptions),a;return a=`anyOf`in t&&Array.isArray(t.anyOf)?N4(t[A1]):`oneOf`in t&&Array.isArray(t.oneOf)?N4(t[I1]):x0(t),!Cme(e,t)&&!n&&!!a&&!Array.isArray(a)&&!!i.find(e=>e===a)}function F4(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 I4(e,t=[]){if(!e)return[];let n=[];return`__errors`in e&&(n=n.concat(e[N1].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];if(qT(i))return n.concat(I4(i,[...t,r]))}return n},n)}function Ome(e){let t=new e4;return e.length&&e.forEach(e=>{let{property:n,message:r}=e,i=n===`.`?[]:$D(n);i.length>0&&i[0]===``&&i.splice(0,1),r&&t.addErrors(r,i)}),t.ErrorSchema}function L4(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 R4(e){return Object.keys(e).reduce((t,n)=>{if(n===`addError`)return t;let r=e[n];return qT(r)?{...t,[n]:R4(r)}:{...t,[n]:r}},{})}function kme(e){return Object.values(e).every(e=>e!==-1)}function Ame(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,H.jsx)(h,{schema:{type:`integer`},id:m,name:s,className:t,options:{enumOptions:W2(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":x4(o)})}function jme(e){let{time:t=!1,disabled:n=!1,readonly:r=!1,options:i,onChange:a,value:o}=e,[s,c]=(0,b.useState)(k4(o,t));(0,b.useEffect)(()=>{c(k4(o,t))},[t,o]);let l=(0,b.useCallback)((e,n)=>{let r={...s,[e]:n===void 0?-1:n};kme(r)?a(F4(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=>{if(e.preventDefault(),n||r)return;let i=k4(new Date().toJSON(),t);a(F4(i,t))},[n,r,t,a]);return{elements:(0,b.useMemo)(()=>vme(s,t,i.yearsRange,i.format),[s,t,i.yearsRange,i.format]),handleChange:l,handleClear:u,handleSetNow:d}}function z4(e){let t=(0,b.useRef)(e);return u0(e,t.current)||(t.current=e),t.current}function Mme(e,t){return e.replace(`;base64`,`;name=${encodeURIComponent(t)};base64`)}async function Nme(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:Mme(e.target.result,t),name:t,size:n,type:r}):i({dataURL:null,name:t,size:n,type:r})},o.readAsDataURL(e)})}async function Pme(e){return Promise.all(Array.from(e).map(Nme))}function Fme(e){return e.reduce((e,t)=>{if(!t)return e;try{let{blob:n,name:r}=hme(t);return[...e,{dataURL:t,name:r,size:n.size,type:n.type}]}catch{return e}},[])}function Ime(e,t,n=!1){let r=(0,b.useMemo)(()=>n&&e?Array.isArray(e)?e:[e]:[],[e,n]);return{filesInfo:(0,b.useMemo)(()=>Fme(Array.isArray(e)?e:[e||``]),[e]),handleChange:(0,b.useCallback)(async e=>{let i=(await Pme(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 Lme(e){if(!e)return``;let t=new Date(e);return`${U2(t.getFullYear(),4)}-${U2(t.getMonth()+1,2)}-${U2(t.getDate(),2)}T${U2(t.getHours(),2)}:${U2(t.getMinutes(),2)}:${U2(t.getSeconds(),2)}.${U2(t.getMilliseconds(),3)}`}function B4(e,t,n=!1){if(!t)return e;let{errors:r,errorSchema:i}=e,a=I4(t),o=t;return ED(i)||(o=w2(i,t,!n||`preventDuplicates`),a=[...r].concat(a)),{errorSchema:o,errors:a}}function Rme(e){let t=e;for(let e in t)if(Object.hasOwn(t,e)){let n=t[e];e===`$ref`&&typeof n==`string`&&n.startsWith(`#`)?t[e]=K1+n:t[e]=V4(n)}return e}function zme(e){return e.map(e=>V4(e))}function V4(e){return Array.isArray(e)?zme([...e]):jC(e)?Rme({...e}):e}var H4;(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.ExpandButton=`Expand Cycle`,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.DeprecatedLabel=`%1 (deprecated)`,e.CycleDetected=`Circular reference ($ref cycle) detected for field "%1". You may choose to expand to the next cycle break`,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)`})(H4||={});function U4(){return sO(`rjsf-array-item-`)}function W4(e){return Array.isArray(e)?e.map(e=>({key:U4(),item:e})):[]}function G4(e){return Array.isArray(e)?e.map(e=>e.item):[]}function Bme(e){return Array.isArray(e.type)?!e.type.includes(`null`):e.type!==`null`}function K4(e,t,n,r){let{addable:i}=Y1(r,e.globalUiOptions);return i!==!1&&(i=t.maxItems===void 0||n.length<t.maxItems),i}function q4(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 Vme(e,t){let{schemaUtils:n,globalFormOptions:r}=e,i=t.items;return r.useFallbackUiForUnsupportedType&&!i?i={}:S2(t)&&Ufe(t)&&(i=t.additionalItems),n.getDefaultFormState(i)}function Hme(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=T2(_.retrieveSchema(t.items,i),r?.items??r),{widget:x=`select`,title:S,...C}=Y1(r,y),w=d4(t,x,g),T=S??t.title??m,E=_.getDisplayLabel(t,r,y),D=z4(L4(``,v,n,!0));return(0,H.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 Ume(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}=Y1(r,b),w=d4(t,x,_),T=S??t.title??h,E=v.getDisplayLabel(t,r,b),D=z4(L4(``,y,n,!0));return(0,H.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 Wme(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}=Y1(n,v),S=d4(t,y,h),C=b??t.title??i,w=g.getDisplayLabel(t,n,v),T=z4(L4(``,_,r,!0));return(0,H.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 Gme(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,rawItemSchema:m,itemData:h,itemUiSchema:g,parentFieldPathId:_,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,globalFormOptions:F}=s,I=(0,b.useMemo)(()=>j.retrieveSchema(m,h),[j,m,h]),L=(0,b.useMemo)(()=>L4(n,F,_),[n,F,_]),ee=M||N,te=s4(`ArrayFieldItemTemplate`,s,c),ne=j.getDisplayLabel(I,g,P),{description:R}=Y1(g),z=!!R||!!I.description,{orderable:B=!0,removable:re=!0,copyable:ie=!1}=c,ae={moveUp:B&&f,moveDown:B&&p,copy:ie&&u,remove:re&&d,toolbar:!1};ae.toolbar=Object.keys(ae).some(e=>ae[e]);let oe=(0,b.useCallback)(e=>{D(e,n+1)},[D,n]),se=(0,b.useCallback)(e=>{O(e,n)},[O,n]),ce=(0,b.useCallback)(e=>{k(e,n)},[k,n]),le=(0,b.useCallback)(e=>{A(e,n,n-1)},[A,n]),ue=(0,b.useCallback)(e=>{A(e,n,n+1)},[A,n]);return(0,H.jsx)(te,{children:(0,H.jsx)(ee,{name:r,title:E,index:n,schema:I,uiSchema:g,formData:h,errorSchema:v,fieldPathId:L,required:Bme(I),onChange:C,onBlur:x,onFocus:S,registry:s,disabled:i,readonly:o,hideError:a,autofocus:y,rawErrors:w}),buttonsProps:{fieldPathId:L,disabled:i,readonly:o,canAdd:u,hasCopy:ae.copy,hasMoveUp:ae.moveUp,hasMoveDown:ae.moveDown,hasRemove:ae.remove,index:n,totalItems:T,onAddItem:oe,onCopyItem:se,onRemoveItem:ce,onMoveUpItem:le,onMoveDownItem:ue,registry:s,schema:I,uiSchema:g},itemKey:t,className:`rjsf-array-item`,disabled:i,hasToolbar:ae.toolbar,index:n,totalItems:T,readonly:o,registry:s,schema:I,uiSchema:g,parentUiSchema:l,displayLabel:ne,hasDescription:z})}var J4=(0,b.memo)(Gme);function Kme(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:x,handleRemoveItem:S,handleReorderItems:C}=e,w=t.title||s||o,{schemaUtils:T,fields:E,formContext:D,globalUiOptions:O}=p,{OptionalDataControlsField:k}=E,A=(0,b.useMemo)(()=>Y1(n,O),[n,O]),j=(0,b.useMemo)(()=>jC(t.items)?t.items:{},[t.items]),M=(0,b.useMemo)(()=>T.retrieveSchema(j),[T,j]),N=(0,b.useMemo)(()=>G4(v),[v]),P=P4(p,t,d,n),F=T4(a),I=(0,b.useMemo)(()=>K4(p,t,N,n)&&(!P||F),[p,t,N,n,P,F]),L=F?v:[],ee=P?` rjsf-optional-array-field`:``,te=e.childFieldPathId??i,ne=P?(0,H.jsx)(k,{...e,fieldPathId:te}):void 0,R={canAdd:I,items:L.map((e,t)=>{let{key:i,item:a}=e,s=a,b=r?r[t]:void 0,T=q4(n,a,t,D),E={itemKey:i,index:t,name:o&&`${o}-${t}`,registry:p,uiOptions:A,parentUiSchema:n,hideError:f,readonly:l,disabled:c,required:d,title:w?`${w}-${t+1}`:void 0,canAdd:I,canMoveUp:t>0,canMoveDown:t<N.length-1,rawItemSchema:j,parentFieldPathId:te,itemErrorSchema:b,itemData:s,itemUiSchema:T,autofocus:u&&t===0,onBlur:m,onFocus:h,rawErrors:g,totalItems:v.length,handleAddItem:y,handleCopyItem:x,handleRemoveItem:S,handleReorderItems:C,onChange:_};return(0,H.jsx)(J4,{...E},i)}),className:`rjsf-field rjsf-field-array rjsf-field-array-of-${M.type}${ee}`,disabled:c,fieldPathId:i,uiSchema:n,onAddClick:y,readonly:l,required:d,schema:t,title:w,formData:N,rawErrors:g,registry:p,optionalDataControl:ne};return(0,H.jsx)(s4(`ArrayFieldTemplate`,p,A),{...R})}function qme(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:x,handleRemoveItem:S,handleReorderItems:C}=e,{formData:w=[]}=e,T=t.title||s||o,{fields:E,formContext:D,globalUiOptions:O}=p,k=(0,b.useMemo)(()=>Y1(n,O),[n,O]),{OptionalDataControlsField:A}=E,j=P4(p,t,d,n),M=T4(r),N=(0,b.useMemo)(()=>jC(t.items)?t.items:[],[t.items]),P=jC(t.additionalItems),F=e.childFieldPathId??a;w.length<N.length&&(w=w.concat(Array(N.length-w.length)));let I=M?_:[],L=j?` rjsf-optional-array-field`:``,ee=j?(0,H.jsx)(A,{...e,fieldPathId:F}):void 0,te=K4(p,t,w,n)&&P&&(!j||M),ne={canAdd:te,className:`rjsf-field rjsf-field-array rjsf-field-array-fixed-items${L}`,disabled:c,fieldPathId:a,formData:r,items:I.map((e,r)=>{let{key:a,item:s}=e,b=s,E=r>=N.length,O=(E&&jC(t.additionalItems)?t.additionalItems:N[r])||{},A;A=E?n.additionalItems:Array.isArray(n.items)?n.items[r]:q4(n,s,r,D);let j=i?i[r]:void 0,M={index:r,itemKey:a,name:o&&`${o}-${r}`,registry:p,uiOptions:k,parentUiSchema:n,hideError:f,readonly:l,disabled:c,required:d,title:T?`${T}-${r+1}`:void 0,canAdd:te,canRemove:E,canMoveUp:r>=N.length+1,canMoveDown:E&&r<w.length-1,rawItemSchema:O,itemData:b,itemUiSchema:A,parentFieldPathId:F,itemErrorSchema:j,autofocus:u&&r===0,onBlur:m,onFocus:h,rawErrors:g,totalItems:_.length,onChange:v,handleAddItem:y,handleCopyItem:x,handleRemoveItem:S,handleReorderItems:C};return(0,H.jsx)(J4,{...M},a)}),onAddClick:y,readonly:l,required:d,registry:p,schema:t,uiSchema:n,title:T,errorSchema:i,rawErrors:g,optionalDataControl:ee};return(0,H.jsx)(s4(`ArrayFieldTemplate`,p,k),{...ne})}function Jme(e=[]){let t=(0,b.useMemo)(()=>m4(e),[e]),[n,r]=(0,b.useState)(()=>({formDataHash:t,keyedFormData:W4(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]})):W4(n),a=t,r({formDataHash:a,keyedFormData:i})}let o=(0,b.useCallback)(e=>{let t=G4(e),n=m4(t);return r({formDataHash:n,keyedFormData:e}),t},[]);return{keyedFormData:i,updateKeyedFormData:o}}function Yme(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}=Jme(o),p=(0,b.useRef)(d);p.current=d;let m=(0,b.useRef)(r);m.current=r;let h=e.childFieldPathId??i,g=(0,b.useCallback)((e,n)=>{e&&e.preventDefault();let r;if(m.current){r={};for(let e of Object.keys(m.current)){let t=parseInt(e,10);n===void 0||t<n?qD(r,[t],m.current[t]):t>=n&&qD(r,[t+1],m.current[t])}}let i={key:U4(),item:Vme(a,t)},o=[...p.current];n===void 0?o.push(i):o.splice(n,0,i),s(f(o),h.path,r)},[a,t,s,f,h]),_=(0,b.useCallback)((e,t)=>{e&&e.preventDefault();let n;if(m.current){n={};for(let e of Object.keys(m.current)){let r=parseInt(e,10);r<=t?qD(n,[r],m.current[r]):r>t&&qD(n,[r+1],m.current[r])}}let r={key:U4(),item:AE(p.current[t].item)},i=[...p.current];t===void 0?i.push(r):i.splice(t+1,0,r),s(f(i),h.path,n)},[s,f,h]),v=(0,b.useCallback)((e,t)=>{e&&e.preventDefault();let n;if(m.current){n={};for(let e of Object.keys(m.current)){let r=parseInt(e,10);r<t?qD(n,[r],m.current[r]):r>t&&qD(n,[r-1],m.current[r])}}let r=p.current.filter((e,n)=>n!==t);s(f(r),h.path,n)},[s,f,h]),y=(0,b.useCallback)((e,t,n)=>{e&&(e.preventDefault(),e.currentTarget.blur());let r;if(m.current){r={};for(let e of Object.keys(m.current)){let i=parseInt(e,10);i===t?qD(r,[n],m.current[t]):i===n?qD(r,[t],m.current[n]):qD(r,[e],m.current[i])}}function i(){let e=p.current.slice();return e.splice(t,1),e.splice(n,0,p.current[t]),e}let a=i();s(f(a),h.path,r)},[s,f,h]),x=(0,b.useCallback)((e,t,n,r)=>{let i=typeof t.at(-1)==`number`;s(i&&e===void 0?null:e,t,n,r)},[s]),S=(0,b.useCallback)(e=>{s(e,h.path,void 0,h?.$id)},[s,h]),C={...e,formData:o,fieldPathId:h,onSelectChange:S},w={...e,handleAddItem:g,handleCopyItem:_,handleRemoveItem:v,handleReorderItems:y,keyedFormData:d,onChange:x};if(!(`items`in t)){if(!c.useFallbackUiForUnsupportedType)return(0,H.jsx)(s4(`UnsupportedFieldTemplate`,a,Y1(n)),{schema:t,fieldPathId:i,reason:u(H4.MissingItems),registry:a});let e={...t,[P1]:{type:void 0}};C.schema=e,w.schema=e}return l.isMultiSelect(C.schema)?(0,H.jsx)(Hme,{...C}):I2(n)?(0,H.jsx)(Ume,{...C}):S2(C.schema)?(0,H.jsx)(qme,{...w}):l.isFilesArray(C.schema,n)?(0,H.jsx)(Wme,{...C}):(0,H.jsx)(Kme,{...w})}function Xme(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}=Y1(r,x),D=d4(t,S,v),O=y(H4.YesLabel),k=y(H4.NoLabel),A,j=C??_??f??n;if(Array.isArray(t.oneOf))A=T2({oneOf:t.oneOf.map(e=>{if(jC(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}]:T2({enum:e},r)}let M=(0,b.useCallback)((e,t,n)=>p(e,i.path,t,n),[p,i]);return(0,H.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 Zme(e){let[t,n]=(0,b.useState)(!1),{name:r,registry:i,schema:a,uiSchema:o,fieldPathId:s}=e,{globalUiOptions:c}=i,l=s4(`CyclicSchemaExpandTemplate`,i,Y1(o,c));if(!t)return(0,H.jsx)(l,{registry:i,schema:a,uiSchema:o,name:r,fieldPathId:s,onExpand:()=>n(!0)});let{fields:u}=i,{SchemaField:d}=u;return(0,H.jsx)(d,{...e,schema:{...a,[H1]:!1}})}function Qme(e){return{type:`string`,enum:[`string`,`number`,`boolean`,`object`,`array`],default:`string`,title:e}}function $me(e){let t=typeof e;return t===`string`||t===`number`||t===`boolean`?t:t===`object`?Array.isArray(e)?`array`:`object`:`string`}function ehe(e,t){switch(t){case`string`:return String(e);case`number`:{let t=Number(e);return Number.isNaN(t)?0:t}case`boolean`:return!!e;default:return e}}function the(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)($me(n)),S=Y1(o),C=z4(L4(`__internal_type_selector`,v,p)),w=g(H4.Type),T=(0,b.useMemo)(()=>Qme(w),[w]),E=e=>{e!=null&&(x(e),m(ehe(n,e),p.path,h,t))};if(!v.useFallbackUiForUnsupportedType){let{reason:t=g(H4.UnknownFieldType,[String(i.type)])}=e;return(0,H.jsx)(s4(`UnsupportedFieldTemplate`,f,S),{schema:i,fieldPathId:p,reason:t,registry:f})}let D=s4(`FallbackFieldTemplate`,f,S),{SchemaField:O}=_;return(0,H.jsx)(D,{schema:i,registry:f,typeSelector:(0,H.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?m4(n):`__empty__`),schemaField:(0,H.jsx)(O,{...e,schema:{type:y,title:g(H4.Value),...y===`object`&&{additionalProperties:!0}}})})}var Y4;(function(e){e.ROW=`ui:row`,e.COLUMN=`ui:col`,e.COLUMNS=`ui:columns`,e.CONDITION=`ui:condition`})(Y4||={});var X4;(function(e){e.ALL=`all`,e.SOME=`some`,e.NONE=`none`})(X4||={});var nhe=/^\$lookup=(.+)/,Z4=`layoutGrid`;`${Z4}`;function Q4(e,t){return e??t}function rhe(e){return/^\d+?$/.test(e)}var $4=c4();function ihe(e,t,n,r,i){let a=Y(n,[J1],{}),o=Y(n,e),s={...Y(o,[q1],{}),...t,...a},c={...o};ED(s)||qD(c,[q1],s),ED(a)||qD(c,[J1],a);let{readonly:l}=Y1(c);return(i===!0||jD(l)&&r===!0)&&(l=!0,dD(s,`readonly`)?qD(c,[q1,R1],!0):qD(c,`ui:${R1}`,!0)),{fieldUiSchema:c,uiReadonly:l}}function ahe(e,t,n=`$0m3tH1nG Un3xP3cT3d`){let r=UT([t]).sort(),i=UT([n]).sort();switch(e){case X4.ALL:return DD(r,i);case X4.SOME:return xD(r,i).length>0;case X4.NONE:return xD(r,i).length===0;default:return!1}}function e3(e,t,n){let r={},i=e[t];if(qT(i)){let{children:e,className:t,...a}=i;if(i=e,t){let e=t.split(` `).map(e=>O4(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 t3(e,t,n){let r,i=t;if(rhe(n)&&e&&e?.type===`array`&&dD(e,`items`)){let a=Number(n),o=e[P1];r=Array.isArray(o)?a>o.length?iD(o):o[a]:o,i={$id:t.$id,path:[...t.path.slice(0,t.path.length-1),a]}}return{rawSchema:r,fieldPathId:i}}function ohe(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=L4(e,o,c),dD(d,`properties`))s=Y(d,[L1,e],{});else if(d&&(dD(d,`oneOf`)||dD(d,`anyOf`))){let t=dD(d,`oneOf`)?I1:A1;s=Y(a.findSelectedOptionInXxxOf(d,e,t,f),[L1,e],{})}else{let t=t3(d,c,e);s=t.rawSchema??{},c=t.fieldPathId}f=Y(f,e,{}),d=a.retrieveSchema(s,f),p=Q4(d.readOnly,p)});let m,h=!1;if(ED(d)&&(d=void 0),d&&u){if(d&&(dD(d,`oneOf`)||dD(d,`anyOf`))){let e=dD(d,`oneOf`)?I1:A1;d=a.findSelectedOptionInXxxOf(d,u,e,f)}c=L4(u,o,c),h=d!==void 0&&Array.isArray(d.required)&&_D(d.required,u);let e=t3(d,c,u);if(e.rawSchema?(d=e.rawSchema,c=e.fieldPathId):(d=Y(d,[L1,u]),d&&=a.retrieveSchema(d)),p=Q4(d?.readOnly,p),d&&(dD(d,`oneOf`)||dD(d,`anyOf`))){let e=dD(d,`oneOf`)?I1:A1,t=y0(d);m={options:d[e],hasDiscriminator:!!t}}}return{schema:d,isRequired:h,isReadonly:p,optionsInfo:m,fieldPathId:c}}function she(e,t){let n=e;return pD(n)&&(n=O4(t,n)),qC(n)?n:null}function che(e,t){let n,r=null,i={},a;if(pD(t)||jD(t))n=t??``;else{let{name:o=``,render:s,...c}=t;n=o,i=c,ED(i)||oD(i,(t,n)=>{if(pD(t)){let r=nhe.exec(t);if(Array.isArray(r)&&r.length>1){let t=r[1];i[n]=O4(e,t,t)}}}),r=she(s,e),!o&&r&&(a=(0,H.jsx)(r,{...c,"data-testid":$4.uiComponent}))}return{name:n,UIComponent:r,uiProps:i,rendered:a}}function n3(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)(r3,{...n,key:`layoutGrid-${m4(e)}`,schema:s,layoutGridSchema:e}))}function lhe(e){let{layoutGridSchema:t,...n}=e,{formData:r,registry:i}=n,{children:a,gridProps:o}=e3(t,Y4.CONDITION,i),{operator:s,field:c=``,value:l}=o;return ahe(s,Y(r,c,null),l)?(0,H.jsx)(n3,{...n,childrenLayoutGridSchemaId:a}):null}function uhe(e){let{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:i}=n,{children:a,gridProps:o}=e3(t,Y4.COLUMN,r);return(0,H.jsx)(s4(`GridTemplate`,r,Y1(i)),{column:!0,"data-testid":$4.col,...o,children:(0,H.jsx)(n3,{...n,childrenLayoutGridSchemaId:a})})}function dhe(e){let{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:i}=n,{children:a,gridProps:o}=e3(t,Y4.COLUMNS,r),s=s4(`GridTemplate`,r,Y1(i));return a.map(e=>(0,H.jsx)(s,{column:!0,"data-testid":$4.col,...o,children:(0,H.jsx)(n3,{...n,childrenLayoutGridSchemaId:[e]})},`column-${m4(e)}`))}function fhe(e){let{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:i}=n,{children:a,gridProps:o}=e3(t,Y4.ROW,r);return(0,H.jsx)(s4(`GridTemplate`,r,Y1(i)),{...o,"data-testid":$4.row,children:(0,H.jsx)(n3,{...n,childrenLayoutGridSchemaId:a})})}function phe(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,_=che(u,t),{name:v,UIComponent:y,uiProps:b}=_,{schema:x,isRequired:S,isReadonly:C,optionsInfo:w,fieldPathId:T}=ohe(u,v,n,c,a),E=z4(T);if(_.rendered)return _.rendered;if(x){let e=w?.hasDiscriminator?g:h,{fieldUiSchema:t,uiReadonly:n}=ihe(v,b,r,C,l);return(0,H.jsx)(e,{"data-testid":w?.hasDiscriminator?$4.layoutMultiSchemaField:$4.field,...f,name:v,required:S,readonly:n,schema:x,uiSchema:t,errorSchema:Y(i,v),fieldPathId:E,formData:Y(c,v),onChange:p,onBlur:o,onFocus:s,options:w?.options,registry:u})}return y?(0,H.jsx)(y,{"data-testid":$4.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 r3(e){let{uiSchema:t}=e,{layoutGridSchema:n}=e,r=Y1(t);if(!n&&`layoutGrid`in r&&jC(r.layoutGrid)&&(n=r[Z4]),jC(n)){if(Y4.ROW in n)return(0,H.jsx)(fhe,{...e,layoutGridSchema:n});if(Y4.COLUMN in n)return(0,H.jsx)(uhe,{...e,layoutGridSchema:n});if(Y4.COLUMNS in n)return(0,H.jsx)(dhe,{...e,layoutGridSchema:n});if(Y4.CONDITION in n)return(0,H.jsx)(lhe,{...e,layoutGridSchema:n})}return(0,H.jsx)(phe,{...e,gridSchema:n})}r3.TEST_IDS=$4;function mhe(e){let{fieldPathId:t,title:n,schema:r,uiSchema:i,required:a,registry:o,name:s}=e,c=Y1(i,o.globalUiOptions),{title:l}=c,{title:u}=r,d=l||n||u||s;return d?(0,H.jsx)(s4(`TitleFieldTemplate`,o,c),{id:b4(t),title:d,required:a,schema:r,uiSchema:i,registry:o}):null}function i3(e,t,n){return e.map(({schema:e})=>e).find(e=>{let r=Y(e,[L1,t]);return Y(r,M1,Y(r,j1,`!@#!@$@#$!@$#`))===n})}function a3(e,t,n,r,i){let a=t.map(e=>n.retrieveSchema(e,i)),o=e;dD(e,`oneOf`)?o={...e,[I1]:a}:dD(e,`anyOf`)&&(o={...e,[A1]:a});let s=T2(o,r);if(!s)throw Error(`No enumOptions were computed from the schema ${JSON.stringify(o)}`);return s}function hhe(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)(a3(f,c,y,d,i)),w=Y(a,`$id`),T=y0(f),E=s4(`FieldErrorTemplate`,u,c),D=s4(`FieldTemplate`,u,c);(0,b.useEffect)(()=>{C(a3(f,c,y,d,i))},[m4(f),m4(c),y,d?m4(d):``,i?m4(i):``]);let{widget:O=T?`radio`:`select`,title:k=``,placeholder:A=``,optionsSchemaSelector:j=T,hideError:M,...N}=Y1(d);if(!j)throw Error(`No selector field provided for the LayoutMultiSchemaField`);let P=Y(i,j),F=Y(S[0]?.schema,[L1,j],{}),I=i3(S,j,P);F=F?.type?F:{...F,type:I?.type||n};let L=d4(F,O,v),ee=M===void 0?_:!!M,te=Y(g,[N1],[]),ne=zD(g,[N1]),R=y.getDisplayLabel(f,d,x),z=e=>{if(r||m)return;let t=i3(S,j,e),n=i3(S,j,P),o=y.sanitizeDataForNewSchema(t,n,i);o&&t&&(o=y.getDefaultFormState(t,o,`excludeObjectChildren`)),o&&qD(o,j,e),s(o,a.path,void 0,w)},B={enumOptions:S,...N},re=!ee&&te.length>0?(0,H.jsx)(E,{fieldPathId:a,schema:f,errors:te,registry:u}):void 0;return(0,H.jsx)(D,{fieldPathId:a,id:w,schema:f,label:(k||f.title)??``,disabled:r||Array.isArray(S)&&ED(S),uiSchema:d,required:h,readonly:!!m,registry:u,displayLabel:R,errors:re,onChange:s,onKeyRename:pw,onKeyRenameBlur:pw,onRemoveProperty:pw,children:(0,H.jsx)(L,{id:w,name:t,schema:f,label:(k||f.title)??``,disabled:r||Array.isArray(S)&&ED(S),uiSchema:d,autofocus:p,readonly:m,required:h,registry:u,multiple:!1,rawErrors:te,hideError:ee,hideLabel:!R,errorSchema:ne,placeholder:A,onChange:z,onBlur:o,onFocus:l,value:P,options:B,htmlName:a.name})})}function o3(e){let{name:t,disabled:n=!1,errorSchema:r={},formData:i,fieldPathId:a,onBlur:o,onChange:s,onFocus:c,options:l,readonly:u,registry:d,required:f=!1,schema:p,uiSchema:m}=e,{schemaUtils:h}=d,g=(0,b.useMemo)(()=>l.map(e=>h.retrieveSchema(e,i)),[l,h,m4(i??null)]),[_,v]=(0,b.useState)(()=>{let e=y0(p);return h.getClosestMatchingOption(i,g,0,e)}),y=(0,b.useRef)(!1),x=(0,b.useRef)(i),S=(0,b.useRef)(a.$id);(0,b.useEffect)(()=>{let e=x.current,t=S.current;if(x.current=i,S.current=a.$id,!u0(i,e)&&a.$id===t){if(y.current){y.current=!1;return}let e=y0(p),t=h.getClosestMatchingOption(i,g,_,e);t!==_&&v(t)}});let C=`${a.$id}${p.oneOf?`__oneof_select`:`__anyof_select`}`,w=(0,b.useCallback)(e=>{if(n||u)return;let t=e===void 0?-1:parseInt(e,10);if(t===_)return;let r=t>=0?g[t]:void 0,o=_>=0?g[_]:void 0,c=h.sanitizeDataForNewSchema(r,o,i);r&&(c=h.getDefaultFormState(r,c,`excludeObjectChildren`)),v(t),y.current=!0,s(c,a.path,void 0,C)},[_,g,n,u,h,i,a,s,C]),{widgets:T,fields:E,translateString:D,globalUiOptions:O}=d,{SchemaField:k}=E,A=s4(`MultiSchemaFieldTemplate`,d,O),j=P4(d,p,f,m),M=T4(i),{widget:N=`select`,placeholder:P,autofocus:F,autocomplete:I,title:L=p.title,...ee}=Y1(m,O),te=d4({type:`number`},N,T),ne=Y(r,N1,[]),R=zD(r,[N1]),z=h.getDisplayLabel(p,m,O),B=_>=0&&g[_]||null,re;if(B){let{required:e,type:t}=p,n={};e&&(n.required=e),t!==void 0&&!(`type`in B)&&(n.type=t),re=Object.keys(n).length>0?S0(n,B):B}let ie=[];`oneOf`in p&&m&&`oneOf`in m?Array.isArray(m.oneOf)?ie=m[I1]:console.warn(`uiSchema.oneOf is not an array for "${L||t}"`):`anyOf`in p&&m&&`anyOf`in m&&(Array.isArray(m.anyOf)?ie=m[A1]:console.warn(`uiSchema.anyOf is not an array for "${L||t}"`));let ae=m;_>=0&&ie.length>_&&(ae=ie[_]);let oe=L?H4.TitleOptionPrefix:H4.OptionPrefix,se=L?[L]:[],ce=g.map((e,t)=>{let{title:n=e.title}=Y1(ie[t]);return{label:n||D(oe,se.concat(String(t+1))),value:t}});return(0,H.jsx)(A,{schema:p,registry:d,uiSchema:m,selector:!j||M?(0,H.jsx)(te,{id:C,name:`${t}${p.oneOf?`__oneof_select`:`__anyof_select`}`,schema:{type:`number`,default:0},onChange:w,onBlur:o,onFocus:c,disabled:n||ED(ce),multiple:!1,rawErrors:ne,errorSchema:R,value:_>=0?_:void 0,options:{enumOptions:ce,...ee},registry:d,placeholder:P,autocomplete:I,autofocus:F,label:L??t,hideLabel:!z,readonly:u}):void 0,optionSchemaField:re&&re.type!==`null`&&(0,H.jsx)(k,{...e,schema:re,uiSchema:ae})||null})}function ghe(e){let{formData:t,onChange:n,fieldPathId:r}=e;return(0,b.useEffect)(()=>{t===void 0&&n(null,r.path)},[r,t,n]),null}var _he=/\.([0-9]*0)*$/,vhe=/[0.]0*$/;function yhe(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);let a=`${e}`.startsWith(`.`)?`0${e}`:e,s=typeof a==`string`&&_he.exec(a)?D1(a.replace(vhe,``)):D1(a);n(s,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,H.jsx)(s,{...e,formData:c,onChange:l})}var s3;function bhe(e){if(!s3)if(typeof document<`u`)s3=document.createElement(`textarea`);else return;var t=`&`+e+`;`;s3.innerHTML=t;var n=s3.value;return n===t?void 0:n}var Z=32,Q=9,c3=13,l3=10,u3=96,d3=126,f3=91,p3=94,m3=62,h3=35,g3=37,_3=45,v3=61,y3=92,b3=42,x3=95,S3=60,C3=64,w3=93,T3=33,E3=38,D3=58,O3=70,k3=102,A3=104,j3=119,M3=116,N3=112,P3=115,xhe=160,She=12,Che=44,F3=59,I3=63,L3=46,R3=47,z3=39,B3=34,V3=43,H3=124,U3=123,W3=125,G3=40,K3=41,whe=120,The=88,q3=30,J3=48,Y3=57,X3=65,Z3=90,Q3=97,$3=122,e6=128,t6=32,$={blockQuote:0,breakLine:1,breakThematic:2,codeBlock:3,codeInline:4,footnote:5,footnoteReference:6,frontmatter:7,gfmTask:8,heading:9,htmlBlock:10,htmlComment:11,htmlSelfClosing:12,image:13,link:14,orderedList:15,paragraph:16,ref:17,refCollection:18,table:19,text:20,textFormatted:21,unorderedList:22};function Ehe(e){if(!u6(e,`---`))return null;let t=3;for(;t<e.length&&(e[t]===` `||e[t]===` `);)t++;if(t<e.length&&e[t]===`\r`&&t++,t>=e.length||e[t]!==`
218
+ `)return null;t++;let n=!1;for(;t<e.length;){let r=t;for(;t<e.length&&e[t]!==`
219
+ `&&e[t]!==`\r`;)t++;if(t>=e.length)break;let i=t;if(e[t]===`\r`&&t++,t<e.length&&e[t]===`
220
+ `&&t++,u6(e,`---`,r))return{endPos:t,hasValidYaml:n};if(!n){let t=Ihe(e,r,i);if(t<i){let r=e.charCodeAt(t);if(r>=Q3&&r<=$3||r>=X3&&r<=Z3||r>=J3&&r<=Y3||r===x3){for(t++;t<i&&(r=e.charCodeAt(t),r>=Q3&&r<=$3||r>=X3&&r<=Z3||r>=J3&&r<=Y3||r===x3||r===_3||r===L3);)t++;t<i&&e.charCodeAt(t)===D3&&(t++,t>=i?n=!0:(r=e.charCodeAt(t),(r===Z||r===Q)&&(n=!0)))}}}}return null}var Dhe=/&([a-zA-Z0-9]+|#[0-9]{1,7}|#x[0-9a-fA-F]{1,6});/gi,Ohe={class:`className`,for:`htmlFor`,allowfullscreen:`allowFullScreen`,allowtransparency:`allowTransparency`,autocomplete:`autoComplete`,autofocus:`autoFocus`,autoplay:`autoPlay`,cellpadding:`cellPadding`,cellspacing:`cellSpacing`,charset:`charSet`,classid:`classId`,colspan:`colSpan`,contenteditable:`contentEditable`,contextmenu:`contextMenu`,crossorigin:`crossOrigin`,enctype:`encType`,formaction:`formAction`,formenctype:`formEncType`,formmethod:`formMethod`,formnovalidate:`formNoValidate`,formtarget:`formTarget`,frameborder:`frameBorder`,hreflang:`hrefLang`,inputmode:`inputMode`,keyparams:`keyParams`,keytype:`keyType`,marginheight:`marginHeight`,marginwidth:`marginWidth`,maxlength:`maxLength`,mediagroup:`mediaGroup`,minlength:`minLength`,novalidate:`noValidate`,radiogroup:`radioGroup`,readonly:`readOnly`,rowspan:`rowSpan`,spellcheck:`spellCheck`,srcdoc:`srcDoc`,srclang:`srcLang`,srcset:`srcSet`,tabindex:`tabIndex`,usemap:`useMap`,viewbox:`viewBox`},khe={};function n6(e){if(!e)return khe;var t={};for(var n in e){var r=Ohe[n.toLowerCase()];if(r)t[r]=e[n];else{var i=n.indexOf(`:`);i===-1?t[n]=e[n]:t[n.slice(0,i)+n[i+1].toUpperCase()+n.slice(i+2)]=e[n]}}return t}var Ahe=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s|^<(div|p|h[1-6]|ul|ol|li|blockquote|pre|table|thead|tbody|tr|td|th|dl|dt|dd|hr|address|article|aside|details|dialog|figure|figcaption|footer|form|header|main|menu|nav|section|summary|textarea|fieldset|legend|center|dir|hgroup|marquee|search|output|template)\b)/i;function r6(e){return e.indexOf(`&`)===-1?e:e.replace(Dhe,(e,t)=>{var n=bhe(t);if(n)return n;if(t[0]===`#`){var r=t[1]===`x`||t[1]===`X`?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return r===0||r>=55296&&r<=57343||r>1114111?`�`:r<=65535?String.fromCharCode(r):String.fromCharCode(55296+(r-65536>>10),56320+(r-65536&1023))}return e})}var i6=/(javascript|vbscript|data(?!:image)):/i;function a6(e){if(i6.test(e))return null;if(e.indexOf(`%`)===-1)return e;try{let t=decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,``);if(i6.test(t))return null}catch{return null}return e}var o6={},s6,c6;for(s6=[192,193,194,195,196,197,224,225,226,227,228,229,230,198],c6=0;c6<s6.length;c6++)o6[s6[c6]]=`a`;for(o6[231]=o6[199]=`c`,o6[240]=o6[208]=`d`,s6=[200,201,202,203,233,232,234,235],c6=0;c6<s6.length;c6++)o6[s6[c6]]=`e`;for(s6=[207,239,206,238,205,237,204,236],c6=0;c6<s6.length;c6++)o6[s6[c6]]=`i`;for(o6[209]=o6[241]=`n`,s6=[248,216,339,338,213,245,212,244,211,243,210,242],c6=0;c6<s6.length;c6++)o6[s6[c6]]=`o`;for(s6=[220,252,219,251,218,250,217,249],c6=0;c6<s6.length;c6++)o6[s6[c6]]=`u`;o6[376]=o6[255]=o6[221]=o6[253]=`y`;function l6(e){for(var t=``,n=-1,r=e.length,i=0;i<r;i++){var a=e.charCodeAt(i);if(a>=Q3&&a<=$3||a>=J3&&a<=Y3){n<0&&(n=i);continue}if(a>=X3&&a<=Z3){n>=0&&(t+=e.slice(n,i),n=-1),t+=String.fromCharCode(a+t6);continue}if(a===Z||a===_3){n>=0&&(t+=e.slice(n,i),n=-1),t+=`-`;continue}n>=0&&(t+=e.slice(n,i),n=-1);var o=o6[a];o&&(t+=o)}return n>=0&&(t+=e.slice(n)),t}function u6(e,t,n){return e.startsWith(t,n)}var d6=new Set([`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`,`circle`,`ellipse`,`line`,`path`,`polygon`,`polyline`,`rect`,`use`,`stop`,`animate`,`set`]);function f6(e){let t=e.toLowerCase();if(d6.has(t))return!0;let n=t.indexOf(`:`);return n===-1?!1:(t=t.slice(n+1),d6.has(t))}var p6=1,m6=2,h6=4,g6=8,jhe=16,_6=32,v6=64,Mhe=(function(){var e=new Uint8Array(128),t;for(e[Q]=p6,e[l3]=p6|m6,e[She]=p6,e[c3]=p6|m6,e[Z]=p6,t=T3;t<=R3;t++)e[t]=h6;for(t=D3;t<=C3;t++)e[t]=h6;for(t=f3;t<=u3;t++)e[t]=h6;for(t=U3;t<=d3;t++)e[t]=h6;for(t=J3;t<=Y3;t++)e[t]=jhe;for(t=X3;t<=Z3;t++)e[t]=g6;for(t=Q3;t<=$3;t++)e[t]=g6;return e})(),Nhe=/[\p{P}\p{S}]/u,Phe=/\p{Zs}/u,y6=[];function Fhe(e){var t=e.indexOf(`\r`),n=e.indexOf(`\0`);if(t===-1&&n===-1)return e;var r=e.length;y6.length=0;var i=0,a=0;for(a=t===-1?n:n===-1||t<n?t:n;a<r;a++){var o=e.charCodeAt(a);o===c3?(i<a&&y6.push(e.slice(i,a)),a+1<r&&e.charCodeAt(a+1)===l3&&a++,y6.push(`
221
+ `),i=a+1):o===0&&(i<a&&y6.push(e.slice(i,a)),y6.push(`�`),i=a+1)}return i<r&&y6.push(e.slice(i)),y6.join(``)}function Ihe(e,t,n){let r=n??e.length;for(;t<r&&(e[t]===` `||e[t]===` `);)t++;return t}function b6(e){if(!e)return!1;for(var t in e)return!0;return!1}function Lhe(e){return{attrs:{},children:[{type:$.text,text:e}],d:!0,type:$.htmlBlock,tag:`header`}}var Rhe=/^\n+/;function zhe(e){for(var t=e.length;t>0&&(e[t-1]===`
222
+ `||e[t-1]===`\r`);)t--;return e.slice(0,t).replace(Rhe,``)+`
223
+
224
+ `}function x6(e){if((e.type===$.htmlSelfClosing||e.type===$.htmlBlock)&&e.b)return[];if(e.type===$.paragraph){var t=e.children;return t?t.flatMap(x6):[]}return e.type===$.text?e.text?.trim()?[e]:[]:e.type===$.htmlBlock&&e.children?[{...e,children:e.children?.flatMap(x6)}]:[e]}function S6(e){for(var t=0;t<e.length;t++){if(e[t].type===$.htmlBlock){var n=e[t],r=!1;if(n.d&&n.a&&t===e.length-1){var i=`</`+String(n.tag).toLowerCase()+`>`,a=n.a.toLowerCase().indexOf(i);a!==-1&&n.a.slice(a+i.length).replace(/<\/[a-z][a-z0-9-]*\s*>/gi,``).trim()&&(r=!0)}r||(n.d=!1)}`children`in e[t]&&e[t].children&&S6(e[t].children)}}function Bhe(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.type===$.paragraph&&r.children)for(var i=r.children,a=0;a<i.length;a++){var o=i[a];if(o.type===$.htmlSelfClosing&&o.b&&o.tag.toLowerCase()===t){var s=e.slice(0,n);a>0&&s.push({type:$.paragraph,children:i.slice(0,a)});var c=[];if(a+1<i.length){var l=i.slice(a+1).filter(function(e){return!(e.type===$.htmlSelfClosing&&e.b)});l.length>0&&(c=l)}return c=c.concat(e.slice(n+1)),{found:!0,beforeClose:s,afterClose:c}}}if((r.type===$.htmlSelfClosing||r.type===$.htmlBlock)&&r.b&&r.tag.toLowerCase()===t)return{found:!0,beforeClose:e.slice(0,n),afterClose:e.slice(n+1)}}return{found:!1,beforeClose:e,afterClose:[]}}function Vhe(e,t,n){var r=e.replace(RegExp(`\\s*</`+t+`>\\s*$`,`i`),``);return n?D6(r):r}function C6(e){var t=``;for(var n in e){var r=e[n];r===!0?t+=` `+n:r!=null&&r!==!1&&(t+=` `+n+`="`+String(r)+`"`)}return t}function Hhe(e){var t=[];if(!e)return t;for(var n in e)n.charCodeAt(0)===94&&t.push({identifier:n,footnote:e[n].target});return t}function w6(e,t,n){if(t.indexOf(`.`)===-1)return e?.[t]||n;for(var r=e,i=t.split(`.`),a=0;a<i.length&&(r=r?.[i[a]],r!==void 0);)a++;return r||n}function Uhe(e){for(var t=!1,n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r<=Z||r===B3||r===g3||r===S3||r===m3||r===f3||r===y3||r===w3||r===p3||r===u3||r>=123){t=!0;break}}if(!t)return e;for(var i=``,n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r===g3&&n+2<e.length){var a=e.charCodeAt(n+1),o=e.charCodeAt(n+2);if((a>=J3&&a<=Y3||a>=X3&&a<=O3||a>=Q3&&a<=k3)&&(o>=J3&&o<=Y3||o>=X3&&o<=O3||o>=Q3&&o<=k3)){i+=e[n]+e[n+1]+e[n+2],n+=2;continue}}i+=encodeURI(e[n])}return i}function Whe(...e){return e.filter(Boolean).join(` `)}var Ghe=new Set([`title`,`textarea`,`style`,`xmp`,`iframe`,`noembed`,`noframes`,`script`,`plaintext`]),T6=/<(\/?)(title|textarea|style|xmp|iframe|noembed|noframes|script|plaintext)(\s|>|\/)/gi;function E6(e){return Ghe.has(e.toLowerCase())}function Khe(e){return T6.lastIndex=0,T6.test(e)}function D6(e){return T6.lastIndex=0,e.replace(T6,function(e,t,n,r){return`&lt;`+t+n+r})}var qhe=/^<([a-zA-Z][a-zA-Z0-9-]*)\s[^>]*>/,Jhe=/^<[A-Z]/,O6=[`script`,`pre`,`style`,`textarea`],k6=new Set(O6),Yhe=/<(?:pre|script|style|textarea)\b/i,A6=/<(?:pre|script|style|textarea)\b/iy,j6=/^(\s{0,3}#[#\s]|\s{0,3}[-*+]\s|\s{0,3}\d+\.\s|\s{0,3}>\s|\s{0,3}```)/m,M6=/^<([a-z][^ >/\n\r]*) ?([^>]*?)>/im,N6=new Uint8Array(128);(function(){for(var e=[u3,b3,x3,d3,v3,f3,T3,S3,y3,E3,l3,A3,j3,k3],t=0;t<e.length;t++)N6[e[t]]=1})();var P6=/([a-zA-Z_][a-zA-Z0-9_-]*)=(?:"([^"]*)"|'([^']*)')/g;function Xhe(e){return k6.has(e)}function Zhe(e){return Yhe.test(e)}function F6(e,t,n){for(var r=t,i=n;r<i&&(e.charCodeAt(r)===Z||e.charCodeAt(r)===Q);)r++;if(r>=i)return!1;e.charCodeAt(r)===H3&&r++;for(var a=0;r<i;){for(;r<i&&(e.charCodeAt(r)===Z||e.charCodeAt(r)===Q);)r++;if(r>=i)break;if(e.charCodeAt(r)===H3&&a>0){for(var o=r+1;o<i&&(e.charCodeAt(o)===Z||e.charCodeAt(o)===Q);)o++;if(o>=i)return!0}if(e.charCodeAt(r)===D3&&r++,r>=i||e.charCodeAt(r)!==_3)return!1;for(;r<i&&e.charCodeAt(r)===_3;)r++;for(r<i&&e.charCodeAt(r)===D3&&r++,a++;r<i&&(e.charCodeAt(r)===Z||e.charCodeAt(r)===Q);)r++;if(r<i)if(e.charCodeAt(r)===H3)r++;else return!1}return a>0}function I6(e,t){if(e.charCodeAt(t)!==S3)return null;let n=t+1,r=e.length,i=!1;e.charCodeAt(n)===R3&&(n++,i=!0);let a=n,o=e.charCodeAt(n);if(!(o>=Q3&&o<=$3||o>=X3&&o<=Z3))return null;for(;n<r&&(e.charCodeAt(n)>=Q3&&e.charCodeAt(n)<=$3||e.charCodeAt(n)>=X3&&e.charCodeAt(n)<=Z3||e.charCodeAt(n)>=J3&&e.charCodeAt(n)<=Y3||e.charCodeAt(n)===_3);)n++;let s=e.slice(a,n);if(!s)return null;let c=n;for(;n<r&&(e.charCodeAt(n)===Z||e.charCodeAt(n)===Q||e.charCodeAt(n)===l3);)n++;let l=e.slice(c,n);if(n===c&&n<r){var u=e.charCodeAt(n);if(u!==m3&&u!==R3)return null}let d=n,f={},p=!1;for(;n<r;){let t=e.charCodeAt(n);if(t===m3){let t=e.slice(d,n);return{tag:s,attrs:f,selfClosing:!1,end:n+1,rawAttrs:t,whitespaceBeforeAttrs:l,isClosing:i,hasSpaceBeforeSlash:p}}if(t===Z||t===Q||t===l3){n++;continue}if(t===R3&&n+1<r&&e.charCodeAt(n+1)===m3){let t=e.slice(d,n);return p=n>d&&e.charCodeAt(n-1)===Z,{tag:s,attrs:f,selfClosing:!0,end:n+2,rawAttrs:t,whitespaceBeforeAttrs:l,isClosing:i,hasSpaceBeforeSlash:p}}var m=n,h=e.charCodeAt(n);if(!(h>=Q3&&h<=$3||h>=X3&&h<=Z3||h===x3||h===D3))return null;for(n++;n<r;){var g=e.charCodeAt(n);if(g>=Q3&&g<=$3||g>=X3&&g<=Z3||g>=J3&&g<=Y3||g===x3||g===L3||g===D3||g===_3)n++;else break}for(var _=e.slice(m,n);n<r&&(e.charCodeAt(n)===Z||e.charCodeAt(n)===Q);)n++;if(e.charCodeAt(n)!==v3){f[_]=``;continue}for(n++;n<r&&(e.charCodeAt(n)===Z||e.charCodeAt(n)===Q);)n++;var v=e.charCodeAt(n);if(v===B3||v===z3){n++;for(var y=n;n<r&&e.charCodeAt(n)!==v;)n++;if(n>=r)return null;if(f[_]=e.slice(y,n),n++,n<r){var b=e.charCodeAt(n);if(b!==Z&&b!==Q&&b!==l3&&b!==m3&&b!==R3)return null}}else if(v===U3){var x=1,y=n;for(n++;n<r&&x>0;){var g=e.charCodeAt(n);g===U3?x++:g===W3&&x--,n++}f[_]=e.slice(y,n)}else{for(var y=n;n<r;){var S=e.charCodeAt(n);if(S===Z||S===Q||S===m3||S===l3||S===B3||S===z3||S===v3||S===S3||S===u3)break;n++}if(n===y)return null;f[_]=e.slice(y,n)}}return null}function Qhe(e,t,n){if(!n.optimizeForStreaming&&e.indexOf(`[`)===-1)return!1;for(var r=0,i=e.length,a=!1,o=!1;r<i;){for(var s=e.indexOf(`
225
+ `,r),c=s<0?i:s,l=r,u=0;l<c&&u<4;)if(e.charCodeAt(l)===Z)u++,l++;else if(e.charCodeAt(l)===Q)u+=4,l++;else break;if(l>=c){a=!1,r=s<0?i:s+1;continue}if(u<4){var d=e.charCodeAt(l);if(d===u3||d===d3){for(var f=d,p=0,m=l;m<c&&e.charCodeAt(m)===f;)p++,m++;if(p>=3){var h=!0;if(f===u3){for(var g=m;g<c;g++)if(e.charCodeAt(g)===u3){h=!1;break}}if(h){a=!1;for(var _=s<0?i:s+1;_<i;){for(var v=_,y=0;v<i&&y<4;){var b=e.charCodeAt(v);if(b===Z)y++,v++;else if(b===Q)y+=4,v++;else break}if(y<4&&v<i&&e.charCodeAt(v)===f){for(var x=0;v<i&&e.charCodeAt(v)===f;)x++,v++;if(x>=p){for(;v<i&&(e.charCodeAt(v)===Z||e.charCodeAt(v)===Q);)v++;if(v>=i||e.charCodeAt(v)===l3){r=v>=i?i:v+1;break}}}for(;_<i&&e.charCodeAt(_)!==l3;)_++;_<i&&_++}_>=i&&(r=i,o=!0);continue}}}}for(var S=l;S<c&&e.charCodeAt(S)===m3;){S++,S<c&&e.charCodeAt(S)===Z&&S++;for(var C=0;S<c&&C<4;)if(e.charCodeAt(S)===Z)C++,S++;else if(e.charCodeAt(S)===Q)C+=4,S++;else break;if(C>=4)break;a=!1}if(!a&&u<4&&S<c&&e.charCodeAt(S)===f3&&!(S+1<i&&e.charCodeAt(S+1)===p3)){var w=L6(e,S,t);if(w){r=w,a=!1;continue}}var T=e.charCodeAt(l);if(T===h3&&u<4)a=!1;else if(u<4&&(T===_3||T===b3||T===x3)){for(var E=l,D=0;E<c;){var O=e.charCodeAt(E);if(O===T)D++;else if(O!==Z&&O!==Q)break;E++}a=!(D>=3&&E>=c)}else a=!0;r=s<0?i:s+1}return o}function L6(e,t,n){let r=e.length;if(e.charCodeAt(t)!==f3)return null;let i=t+1<r&&e.charCodeAt(t+1)===p3,a=t+1;for(;a<r;){var o=e.charCodeAt(a);if(o===w3){a++;break}if(o===f3)return null;o===y3&&a+1<r&&a++,a++}if(a>r||e.charCodeAt(a-1)!==w3)return null;let s=e.slice(t+1,a-1);if(s.length>999)return null;let c=V6(s);if(!c||a>=r||e.charCodeAt(a)!==D3)return null;a++;let l=!1;for(;a<r;){let t=e.charCodeAt(a);if(t===Z||t===Q)a++;else if(t===l3&&!l)l=!0,a++;else break}if(i){let t=e.indexOf(`
226
+ `,a),i=t<0?r:t;return n[c]={target:e.slice(a,i).trim(),title:void 0},t<0?r:t+1}var u;if(a<r&&e.charCodeAt(a)===S3){a++;for(var d=a;a<r&&e.charCodeAt(a)!==m3&&e.charCodeAt(a)!==l3;)e.charCodeAt(a)===y3&&a+1<r&&a++,a++;if(a>=r||e.charCodeAt(a)!==m3)return null;u=e.slice(d,a),a++;for(var f=e.indexOf(`
227
+ `,a),p=f<0?r:f,m=a;m<p&&(e.charCodeAt(m)===Z||e.charCodeAt(m)===Q);)m++;if(m<p){if(m===a)return null;var h=e.charCodeAt(m);if(h!==B3&&h!==z3&&h!==G3)return null}}else{for(var d=a,g=0;a<r;){var o=e.charCodeAt(a);if(o===G3)g++;else if(o===K3){if(g===0)break;g--}else{if(o===Z||o===Q||o===l3)break;o===y3&&a+1<r&&a++}a++}if(u=e.slice(d,a),!u)return null}for(;a<r&&(e.charCodeAt(a)===Z||e.charCodeAt(a)===Q);)a++;var _=e.indexOf(`
228
+ `,a),v=_<0?r:_,y,b=!1,x=a,S=a;if(a===v&&a<r)for(S=a+1;S<r&&(e.charCodeAt(S)===Z||e.charCodeAt(S)===Q);)S++;if(S<r){var C=e.charCodeAt(S);if(C===B3||C===z3||C===G3){for(var w=C===G3?41:C,T=S+1,E=T;T<r;){var D=e.charCodeAt(T);if(D===w){for(var O=T+1;O<r&&(e.charCodeAt(O)===Z||e.charCodeAt(O)===Q);)O++;(O>=r||e.charCodeAt(O)===l3)&&(y=e.slice(E,T),b=!0,x=O<r?O+1:r);break}if(D===y3&&T+1<r){T+=2;continue}if(D===l3&&T+1<r&&e.charCodeAt(T+1)===l3)break;T++}if(!b&&S===a)return null}}if(b)return n[c]||(n[c]={target:U6(u),title:y===void 0?y:r6(U6(y))}),x;for(;a<v&&(e.charCodeAt(a)===Z||e.charCodeAt(a)===Q);)a++;return a<v?null:(n[c]||(n[c]={target:U6(u),title:y}),_<0?r:_+1)}var R6=new Uint8Array(Mhe);for(R6[h3]|=_6,R6[m3]|=_6,R6[_3]|=_6|v6,R6[V3]|=_6,R6[b3]|=_6|v6,R6[x3]|=_6|v6,R6[u3]|=_6|v6,R6[d3]|=_6|v6,R6[S3]|=_6|v6,R6[f3]|=v6,R6[T3]|=v6,R6[H3]|=_6,z6=J3;z6<=Y3;z6++)R6[z6]|=_6;var z6;function B6(e){if(e.indexOf(`[`)<0&&e.indexOf(`]`)<0)return!1;for(var t=0;t<e.length;t++){if(e.charCodeAt(t)===y3){t++;continue}if(e.charCodeAt(t)===f3||e.charCodeAt(t)===w3)return!0}return!1}function V6(e){for(var t=e.length,n=!0,r=t>0,i=0;i<t;i++){var a=e.charCodeAt(i);if(a===Z){if(n){r=!1;break}n=!0}else if(a<33||a>126||a>=X3&&a<=Z3){r=!1;break}else n=!1}if(r&&!n)return e;var o=e.replace(/\s+/g,` `).trim();return o.indexOf(`ẞ`)===-1?o.toLowerCase():o.replace(/\u1E9E/g,`ss`).toLowerCase()}function H6(e){return e<e6?R6[e]:e===xhe?p6:0}function U6(e){return e.indexOf(`\\`)===-1?e:e.replace(/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,`$1`)}var W6=null,G6=-1,K6=-1;function q6(e,t){if(t>=G6&&t<=K6&&e===W6)return K6;var n=e.indexOf(`
229
+ `,t),r=n<0?e.length:n;return W6=e,G6=t,K6=r,r}function J6(e,t){let n=q6(e,t);return n<e.length?n+1:n}function Y6(e,t,n){for(;t<n;){let n=e.charCodeAt(t);if(n!==Z&&n!==Q)break;t++}return t}function X6(e,t){let n=J6(e,t);for(;n<e.length;){let t=q6(e,n);if(t8(e,n,t))return n;n=J6(e,n)}return e.length}function Z6(e,t,n,r){let i=0;for(;t+i<n&&e.charCodeAt(t+i)===r;)i++;return i}var Q6=0,$6=0;function e8(e,t,n){for(Q6=0,$6=0;t+$6<n;){let n=e.charCodeAt(t+$6);if(n===Q)Q6+=4-Q6%4;else if(n===Z)Q6++;else break;$6++}}function t8(e,t,n){return Y6(e,t,n)>=n}function $he(e,t,n,r){let i=q6(e,t);if(e8(e,t,i),Q6>3)return null;let a=t+$6;if(e.charCodeAt(a)!==h3)return null;let o=Z6(e,a,i,35);if(o<1||o>6||(a+=o,a<i&&e.charCodeAt(a)!==Z&&e.charCodeAt(a)!==Q))return null;a=Y6(e,a,i);for(var s=i;s>a&&e.charCodeAt(s-1)===Z;)s--;for(var c=s;s>a&&e.charCodeAt(s-1)===h3;)s--;if(s<c)if(s===a||e.charCodeAt(s-1)===Z)for(;s>a&&e.charCodeAt(s-1)===Z;)s--;else s=c;let l=e.slice(a,s),u=h8(l,!1,n,r),d=(r?.slugify||l6)(l);return{node:{type:$.heading,level:o,children:u,id:d},end:J6(e,i)}}function ege(e,t,n){var r=e.charCodeAt(t);if(r!==v3&&r!==_3)return!1;for(var i=t;i<n&&e.charCodeAt(i)===r;)i++;for(;i<n&&(e.charCodeAt(i)===Z||e.charCodeAt(i)===Q);)i++;return i>=n}function n8(e,t){let n=q6(e,t);if(e8(e,t,n),Q6>3)return null;let r=t+$6,i=e.charCodeAt(r);if(i!==_3&&i!==b3&&i!==x3)return null;let a=0;for(;r<n;){let t=e.charCodeAt(r);if(t===i)a++;else if(t!==Z&&t!==Q)return null;r++}return a<3?null:{node:{type:$.breakThematic},end:J6(e,n)}}function tge(e,t,n){let r=q6(e,t);if(e8(e,t,r),Q6>3)return null;let i=Q6,a=t+$6,o=e.charCodeAt(a);if(o!==u3&&o!==d3)return null;let s=Z6(e,a,r,o);if(s<3)return null;a+=s;let c=Y6(e,a,r),l=r;if(o===u3){for(let t=c;t<r;t++)if(e.charCodeAt(t)===u3)return null}for(;l>c&&(e.charCodeAt(l-1)===Z||e.charCodeAt(l-1)===Q);)l--;let u=e.slice(c,l),d=``,f=``,p=u.indexOf(` `);p===-1?d=u:(d=u.slice(0,p),f=u.slice(p+1).trim()),d=U6(d);var m=void 0;if(f){P6.lastIndex=0;for(var h;(h=P6.exec(f))!==null;)m||={},m[h[1]]=h[2]===void 0?h[3]:h[2]}let g=J6(e,r),_=e.length,v=e.length;for(var y=String.fromCharCode(o).repeat(s),b=g;b<e.length;){var x=e.indexOf(y,b);if(x===-1)break;for(var S=x,C=0;S>0&&C<4&&e.charCodeAt(S-1)===Z;)S--,C++;if(C<=3&&(S===0||e.charCodeAt(S-1)===l3)){for(var w=x+s;w<e.length&&e.charCodeAt(w)===o;)w++;var T=q6(e,w);if(t8(e,w,T)){_=S,v=J6(e,T);break}}b=x+1}var E;if(i===0)E=_>g&&e.charCodeAt(_-1)===l3?e.slice(g,_-1):e.slice(g,_);else{E=``;for(var D=g;D<_;){var O=q6(e,D);e8(e,D,O);var k=Math.min($6,i);E+=e.slice(D+k,O)+`
230
+ `,D=J6(e,O)}E.length>0&&E.charCodeAt(E.length-1)===l3&&(E=E.slice(0,-1))}return{node:{type:$.codeBlock,lang:d||void 0,text:E,infoString:f||void 0,attrs:m},end:v}}function nge(e,t){if(e8(e,t,q6(e,t)),Q6<4)return null;let n=``,r=t;for(;r<e.length;){let t=q6(e,r);if(e8(e,r,t),t8(e,r,t)){for(var i=0,a=J6(e,t);a<e.length;){var o=q6(e,a);if(t8(e,a,o)){i++,a=J6(e,o);continue}if(e8(e,a,o),Q6>=4){for(var s=0;s<=i;s++)n+=`
231
+ `;r=a;break}break}if(r!==a)break;continue}if(Q6<4)break;let f=0,p=0;var c=0;for(let n=r;n<t&&p<4;n++){if(e.charCodeAt(n)===Q){var l=4-p%4;p+l>4&&(c=p+l-4),p+=l}else p++;f++}var u=``;if(c>0)for(var d=0;d<c;d++)u+=` `;u+=e.slice(r+f,t),n+=u+`
232
+ `,r=J6(e,t)}for(;n.length>0&&n.charCodeAt(n.length-1)===l3;)n=n.slice(0,-1);return n?{node:{type:$.codeBlock,lang:void 0,text:n,infoString:void 0,attrs:void 0},end:r}:null}function rge(e,t,n,r){if(e8(e,t,q6(e,t)),Q6>3)return null;let i=t+$6;if(e.charCodeAt(i)!==m3)return null;let a=``,o=t,s,c=!1,l=!1,u=!1;for(;o<e.length;){let t=q6(e,o);e8(e,o,t);let n=o+$6;if(e.charCodeAt(n)===m3){let r=n+1;var d=Q6+1,f=!1;if(r<t){var p=e.charCodeAt(r);p===Z?(r++,d++,f=!0):p===Q&&(f=!0)}for(var m=``,h=!1,g=r;g<t;g++)if(e.charCodeAt(g)===Q){h=!0;break}if(h){var _=d;if(f&&r<t&&e.charCodeAt(r)===Q){for(var v=4-_%4,y=0;y<v-1;y++)m+=` `;_+=v,r++}for(var b=r;b<t;b++)if(e.charCodeAt(b)===Q){for(var x=4-_%4,S=0;S<x;S++)m+=` `;_+=x}else m+=e[b],_++}else m=e.slice(r,t);if(!a&&!s){let n=m.match(/^\[!([A-Za-z]+)\]\s*$/);if(n){s=n[1].toUpperCase(),o=J6(e,t);continue}}a+=m+`
233
+ `;var C=m.trimStart();C.startsWith("```")||C.startsWith(`~~~`)?u=!u:(m.startsWith(` `)||m.startsWith(` `))&&(u=!0),l=C.length>0,o=J6(e,t)}else if(a&&!t8(e,o,t)&&l){if(Q6<4){var w=o+$6,T=w<t?e.charCodeAt(w):0;if(T===h3||T===m3||T===u3||T===d3||T===S3||(T===_3||T===b3||T===x3)&&n8(e,o)||(T===_3||T===b3||T===V3)&&w+1<t&&(e.charCodeAt(w+1)===Z||e.charCodeAt(w+1)===Q))break;if(T>=J3&&T<=Y3){for(var E=w;E<t&&e.charCodeAt(E)>=J3&&e.charCodeAt(E)<=Y3;)E++;if(E<t&&(e.charCodeAt(E)===L3||e.charCodeAt(E)===K3))break}}if(u)break;a+=e.slice(o,t)+`
234
+ `,c=!0,o=J6(e,t)}else break}if(!a&&!s)return null;var{inBlockQuote:D,f:O}=n;n.inBlockQuote=!0,c&&(n.f=!0);let k=E8(a||``,n,r);return n.inBlockQuote=D,n.f=O,{node:{type:$.blockQuote,children:k,alert:s||void 0},end:o}}function r8(e,t,n){for(var r=0,i=t;i<n;i++)e.charCodeAt(i)===Q?r+=4-r%4:r++;return r}function i8(e,t,n){if(e8(e,t,n),Q6>3)return null;var r=t+$6;if(r>=n)return null;var i=e.charCodeAt(r),a=Q6,o=r;if(i===_3||i===b3||i===V3){if(o=r+1,o<n&&e.charCodeAt(o)!==Z&&e.charCodeAt(o)!==Q&&e.charCodeAt(o)!==l3)return null}else if(i>=J3&&i<=Y3){for(var s=r;s<n&&s-r<9;){var c=e.charCodeAt(s);if(c<J3||c>Y3)break;s++}if(s>r&&s<n){var l=e.charCodeAt(s);if(l===L3||l===K3){if(o=s+1,o<n&&e.charCodeAt(o)!==Z&&e.charCodeAt(o)!==Q&&e.charCodeAt(o)!==l3)return null}else return null}else return null}else return null;var u=o,d=r8(e,t,o),f=0,p=u,m=d;if(u>=n)return{ordered:i>=J3&&i<=Y3,marker:i>=J3&&i<=Y3?e[s]:e[r],start:i>=J3&&i<=Y3?parseInt(e.slice(r,s),10):void 0,contentStart:u,contentCol:d+1,markerCol:a,isEmpty:!0};for(;p<n&&(e.charCodeAt(p)===Z||e.charCodeAt(p)===Q);){if(e.charCodeAt(p)===Q){var h=4-m%4;m+=h}else m++;p++,f++}var g=p>=n,_=m-d;return g||_>4?(m=d+1,p=u+1,f=1):f===0&&(m=d+1,p=u,f=1),{ordered:i>=J3&&i<=Y3,marker:i>=J3&&i<=Y3?e[s]:e[r],start:i>=J3&&i<=Y3?parseInt(e.slice(r,s),10):void 0,contentStart:p,contentCol:m,markerCol:a,isEmpty:g}}var a8=0;function ige(e,t,n,r){var i=0,a=t;for(a8=0;a<n&&i<r;){var o=e.charCodeAt(a);if(o===Q){var s=4-i%4;if(i+s>r){a8=i+s-r,a++,i=r;break}i+=s}else if(o===Z)i++;else break;a++}return a}function o8(e,t,n,r){var i=q6(e,t),a=i8(e,t,i);if(!a)return null;var o=[],s=t,c=a.contentCol,l=``,u=a.isEmpty,d=!1,f=!1;if(!a.isEmpty){for(var p=!1,m=a.contentStart;m<i;m++)if(e.charCodeAt(m)===Q){p=!0;break}if(p){var h=``,g=r8(e,t,a.contentStart),_=g-a.contentCol;if(_>0)for(var v=0;v<_;v++)h+=` `;for(var y=a.contentStart;y<i;y++)if(e.charCodeAt(y)===Q){for(var b=4-g%4,x=0;x<b;x++)h+=` `;g+=b}else h+=e[y],g++;l=h+`
235
+ `}else l=e.slice(a.contentStart,i)+`
236
+ `}for(s=J6(e,i);s<e.length;){var S=q6(e,s);e8(e,s,S);var C=e.charCodeAt(s+$6);if(Q6<c&&(C===_3||C===b3||C===x3)&&Q6<=3&&n8(e,s))break;var w=i8(e,s,S);if(w&&w.ordered===a.ordered&&w.marker===a.marker&&w.markerCol<c){o.push({contentCol:c,raw:l,hasBlankAfter:d,isEmpty:u}),d&&(f=!0),c=w.contentCol,u=w.isEmpty,d=!1,l=w.isEmpty?``:e.slice(w.contentStart,S)+`
237
+ `,s=J6(e,S);continue}if(t8(e,s,S)){l+=`
238
+ `,s=J6(e,S);for(var T=!1,E=0;E<l.length;E++){var D=l.charCodeAt(E);if(D!==l3&&D!==c3&&D!==Z&&D!==Q){T=!0;break}}if(u&&!T)if(s<e.length){var O=q6(e,s),k=i8(e,s,O);if(!k||k.ordered!==a.ordered||k.marker!==a.marker)break;d=!0}else break;if(s<e.length){var A=q6(e,s);e8(e,s,A);var j=e.charCodeAt(s+$6);if((j===_3||j===b3||j===x3)&&Q6<=3&&n8(e,s))break;var M=i8(e,s,A);if(M&&M.ordered===a.ordered&&M.marker===a.marker&&M.markerCol<c){d=!0;continue}if(!t8(e,s,A)&&Q6<c)break}continue}if(Q6>=c){var N=ige(e,s,S,c);if(a8>0){for(var P=``,F=c,I=0;I<a8;I++)P+=` `,F++;for(var L=N;L<S;L++)if(e.charCodeAt(L)===Q){for(var ee=4-F%4,te=0;te<ee;te++)P+=` `;F+=ee}else P+=e[L],F++;l+=P+`
239
+ `}else l+=e.slice(N,S)+`
240
+ `;s=J6(e,S);continue}for(var ne=!1,R=0;R<l.length;R++){var z=l.charCodeAt(R);if(z!==l3&&z!==c3&&z!==Z&&z!==Q){ne=!0;break}}if(!d&&ne&&!u){var B=s+$6,re=e.charCodeAt(B);if(!(re===h3||re===m3||re===S3||re===u3||re===d3||(re===_3||re===b3||re===x3||re===V3)&&(n8(e,s)!==null||i8(e,s,S)!==null)||re>=J3&&re<=Y3&&i8(e,s,S)!==null)){l+=``+e.slice(B,S)+`
241
+ `,s=J6(e,S);continue}}break}if(o.push({contentCol:c,raw:l,hasBlankAfter:d,isEmpty:u}),o.length===0)return null;var ie=f;if(!ie)for(var ae=0;ae<o.length;ae++){if(o[ae].hasBlankAfter&&ae<o.length-1){ie=!0;break}if(!o[ae].isEmpty){for(var oe=o[ae].raw,se=oe.length,ce=0,le=!1,ue=!1,de=!1,fe=!1,pe=0,me=0,V=-1;ce<se;){var he=oe.indexOf(`
242
+ `,ce);if(he<0&&(he=se),fe){e8(oe,ce,he);for(var ge=oe.slice(ce+$6,he),_e=0;_e<ge.length&&ge.charCodeAt(_e)===pe;)_e++;_e>=me&&ge.slice(_e).trim()===``&&(fe=!1),ce=he<se?he+1:se;continue}if(t8(oe,ce,he)){V>=0?de=!0:le&&(ue=!0),ce=he<se?he+1:se;continue}if(e8(oe,ce,he),V>=0){if(Q6>=V){ce=he<se?he+1:se;continue}var ve=i8(oe,ce,he);if(ve&&ve.markerCol<V&&ve.contentCol<=V){ce=he<se?he+1:se;continue}if(ve){ce=he<se?he+1:se;continue}V=-1,de&&=(ue=!0,!1)}var ye=oe.slice(ce+$6,he),be=ye.charCodeAt(0);if((be===u3||be===d3)&&Q6<=3){for(var xe=0;xe<ye.length&&ye.charCodeAt(xe)===be;)xe++;if(xe>=3){if(ue&&le){ie=!0;break}fe=!0,pe=be,me=xe,le=!0,ce=he<se?he+1:se;continue}}var Se=Q6<=3?i8(oe,ce,he):null;if(Se&&le){if(ue){ie=!0;break}V=Se.contentCol,de=!1,ce=he<se?he+1:se,le=!0;continue}if(ue){ie=!0;break}le=!0,ce=he<se?he+1:se}if(ie)break}}for(var Ce=[],we=0;we<o.length;we++){for(var Te=o[we],Ee=Te.raw,De=Ee.length;De>0&&Ee.charCodeAt(De-1)===l3;)De--;var Oe=De<Ee.length?Ee.slice(0,De):Ee,ke=null;if(Oe.length>=3&&Oe.charCodeAt(0)===f3){var Ae=Oe[1];(Ae===` `||Ae===`x`||Ae===`X`)&&Oe.charCodeAt(2)===w3&&(ke={type:$.gfmTask,completed:Ae===`x`||Ae===`X`},Oe=Oe.slice(3))}var je;if(Te.isEmpty&&Oe.trim()===``)je=[];else if(ie){var Me=n.inList;n.inList=!0,je=E8(Oe,n,r),n.inList=Me}else{var Ne=n.inList;if(n.inList=!0,je=E8(Oe,n,r),n.inList=Ne,je.length===1&&je[0].type===$.paragraph)je=je[0].children;else if(n.h){var Pe=[];n.h.push({src:je,dest:Pe,unwrap:!0}),je=Pe}else{for(var Fe=[],Ie=0;Ie<je.length;Ie++)if(je[Ie].type===$.paragraph)for(var Le=je[Ie].children,Re=0;Re<Le.length;Re++)Fe.push(Le[Re]);else Fe.push(je[Ie]);je=Fe}}if(ke){var ze=[ke,{type:$.text,text:` `}];if(n.h)n.h.push({src:je,dest:ze,unwrap:!1});else for(var Be=0;Be<je.length;Be++)ze.push(je[Be]);Ce.push(ze)}else Ce.push(je)}return{node:{type:a.ordered?$.orderedList:$.unorderedList,start:a.ordered?a.start:void 0,items:Ce},end:s}}var s8=new Set(`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`));function c8(e,t,n){let r={};for(let[o,s]of Object.entries(e)){let e=o.toLowerCase();if(e===`style`&&typeof s==`string`){let e={},t=[],n=0,i=0;for(let e=0;e<s.length;e++){let r=s.charCodeAt(e);r===G3?n++:r===K3?n--:r===F3&&n===0&&(t.push(s.slice(i,e)),i=e+1)}i<s.length&&t.push(s.slice(i));let a=!1;t.forEach(t=>{let n=t.indexOf(`:`);if(n===-1)return;let r=t.slice(0,n).trim(),i=t.slice(n+1).trim();if(r&&i){if(/url\s*\(\s*(javascript|vbscript|data:(?!image\/))/i.test(i)){a=!0;return}let t=r.indexOf(`-`)===-1?r:r.replace(/-([a-z])/g,(e,t)=>t.toUpperCase());e[t]=i}}),!a&&Object.keys(e).length>0&&(r[o]=e)}else if((e===`href`||e===`src`)&&n?.sanitizer){let i=n.sanitizer(s,t,e);i!==null&&(r[o]=i)}else if(s===``)r[o]=!0;else if(s.length>=2&&s.charCodeAt(0)===U3&&s.charCodeAt(s.length-1)===W3){var i=s.slice(1,-1);if(i.length>0){var a=i.charCodeAt(0);if(a===f3||a===U3)try{r[o]=JSON.parse(i);continue}catch{}}if(i===`true`){r[o]=!0;continue}if(i===`false`){r[o]=!1;continue}if(n?.evalUnserializableExpressions)try{r[o]=(0,eval)(`(`+i+`)`);continue}catch{}r[o]=i}else r[o]=s}return r}function l8(e,t,n){let r=t.length;if(r===0)return n;var i=t.charCodeAt(0);if(!(i>=X3&&i<=Z3||i>=Q3&&i<=$3)){for(var a=String.fromCharCode(i),o=e.length-r,s=n;s<=o;){var c=e.indexOf(a,s);if(c===-1||c>o)return-1;for(var l=!0,u=1;u<r;u++){var d=e.charCodeAt(c+u),f=t.charCodeAt(u);if(d>=X3&&d<=Z3&&(d+=t6),f>=X3&&f<=Z3&&(f+=t6),d!==f){l=!1;break}}if(l)return c;s=c+1}return-1}i>=X3&&i<=Z3&&(i+=t6);for(let a=n;a<=e.length-r;a++){var p=e.charCodeAt(a);if(p>=X3&&p<=Z3&&(p+=t6),p!==i)continue;let n=!0;for(let i=1;i<r;i++){let r=e.charCodeAt(a+i),o=t.charCodeAt(i);if(r>=X3&&r<=Z3&&(r+=t6),o>=X3&&o<=Z3&&(o+=t6),r!==o){n=!1;break}}if(n)return a}return-1}function age(e,t,n){let r=t.length;var i=t.charCodeAt(0);i>=X3&&i<=Z3&&(i+=t6);for(let o=Math.min(n,e.length-r);o>=0;o--){var a=e.charCodeAt(o);if(a>=X3&&a<=Z3&&(a+=t6),a!==i)continue;let n=!0;for(let i=1;i<r;i++){let r=e.charCodeAt(o+i),a=t.charCodeAt(i);if(r>=X3&&r<=Z3&&(r+=t6),a>=X3&&a<=Z3&&(a+=t6),r!==a){n=!1;break}}if(n)return o}return-1}var u8=-1;function d8(e,t,n){let r=n.toLowerCase(),i=`<`+r,a=`</`+r,o=1,s=t,c=e.length;for(u8=-1;s<c&&o>0;){let t=l8(e,i,s),n=l8(e,a,s);if(n===-1)return-1;if(t!==-1&&t<n){let n=I6(e,t);n?(n.tag.toLowerCase()===r&&!n.isClosing&&!n.selfClosing&&!f6(n.tag)&&o++,s=n.end):s=t+1}else{var l=n+a.length,u=l<c?e.charCodeAt(l):62;if((u===m3||u===Z||u===Q||u===l3)&&(o--,o===0)){u8=n;let t=n+a.length;for(;t<c&&e.charCodeAt(t)!==m3;)t++;return t+1}s=n+1}}return-1}function f8(e,t,n,r){if(r.ignoreHTMLBlocks||r.disableParsingRawHTML)return null;var i=q6(e,t);if(e8(e,t,i),Q6>3&&!n.inHTML)return null;var a=t+$6;if(e.charCodeAt(a)!==S3)return null;var o=e.indexOf(`>`,a+1);if(o!==-1&&o<i){var s=e.slice(a+1,o);if(/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(s)||/^[^\s@]+@[^\s@]+$/.test(s))return null}var c=oge(e,a);if(c>=1&&c<=5){var l=e.length;if(c===1){for(var u=e.length,d=0;d<O6.length;d++){var f=l8(e,`</`+O6[d]+`>`,a);f>=0&&f<u&&(u=f)}if(u<e.length){var p=e.indexOf(`>`,u);l=p>=0?J6(e,p+1):e.length}}else{var m=c===2?`-->`:c===3?`?>`:c===4?`>`:`]]>`,h=e.indexOf(m,a);h>=0&&(l=J6(e,h+m.length))}var g=e.slice(a,l);if(c>=2)return{node:{type:$.htmlComment,text:g,l:!1,raw:!0},end:l};var _=`div`,v=g.match(/^<\/?([a-zA-Z][a-zA-Z0-9-]*)/);v&&(_=v[1]);var y=I6(e,a),b={},x;y&&!y.isClosing&&(b=c8(y.attrs,_,r),x=y.whitespaceBeforeAttrs+y.rawAttrs);var S=[],C=l8(g,`</`+_.toLowerCase(),0),w=g,T=``;if(y&&y.isClosing)for(w=g.slice(y.end-a);w.length>0&&w.charCodeAt(w.length-1)===l3;)w=w.slice(0,-1);else if(y&&!y.isClosing){var E=y.end-a;if(C!==-1)for(w=g.slice(E),w.charCodeAt(0)===l3&&(w=w.slice(1));w.length>0&&w.charCodeAt(w.length-1)===l3;)w=w.slice(0,-1);else for(w=g;w.length>0&&w.charCodeAt(w.length-1)===l3;)w=w.slice(0,-1);C!==-1&&(T=g.slice(E,C).trim())}var D=y?y.isClosing:!1;return{node:{type:$.htmlBlock,tag:_,attrs:b,i:x,children:S,a:w,text:T,d:!0,b:D},end:l}}if(c===6||c===7){var O=X6(e,t),k=O<e.length?O:e.length,A=e.slice(a,k),j=O<e.length?J6(e,O):e.length,M=I6(e,a);if(M){var N=M.tag,P=N.toLowerCase();if(M.isClosing){var F=e.slice(M.end,k);return{node:{type:$.htmlBlock,tag:N,attrs:{},children:[],a:F,text:F,d:!0,b:!0},end:j}}if(M.selfClosing||f6(N))return{node:{type:$.htmlBlock,tag:N,attrs:c8(M.attrs,N,r),i:M.whitespaceBeforeAttrs+M.rawAttrs,children:[],a:``,text:``,d:!1,b:!1},end:M.end<e.length&&e.charCodeAt(M.end)===l3?M.end+1:M.end};var I=n.c||0,L=e.slice(a,k),ee=-1,te=-1;if(I<10){for(var ne=`</`+P,R=M.end-a,z=1,B=R;B<L.length&&z>0;){var re=l8(L,`<`+P,B),ie=l8(L,ne,B);if(ie===-1)break;if(re!==-1&&re<ie){var ae=re+P.length+1;if(ae<L.length){var oe=L.charCodeAt(ae);(oe===Z||oe===Q||oe===l3||oe===m3||oe===R3)&&z++}B=re+1}else{var se=ie+ne.length;if(se<L.length){var ce=L.charCodeAt(se);if((ce===m3||ce===Z||ce===Q||ce===l3)&&(z--,z===0)){ee=ie;for(var le=se;le<L.length&&L.charCodeAt(le)!==m3;)le++;te=le+1;break}}else if(z--,z===0){ee=ie,te=L.length;break}B=ie+1}}var ue=!1;if(ee===-1&&c===6&&!M.isClosing){var de=d8(e,M.end,P);if(de!==-1){for(var fe=u8,pe=M.end,me=!1,V=!1,he=!1,ge=0,_e=!1,ve=!1,ye=pe;ye<fe;){var be=e.charCodeAt(ye);if(be===l3)ve&&(me=!0),_e||ge++,ve=!0,ye++;else if(be===Z||be===Q)ye++;else{if(!_e&&(_e=!0,ge>=2&&be===S3)){he=!0;break}if(ve=!1,be===S3){var xe=e.charCodeAt(ye+1)|32;if((xe===N3||xe===P3||xe===M3)&&(A6.lastIndex=ye,A6.test(e))){V=!0;break}}ye++}}if(me&&!he&&!V){var Se=q6(e,de);k=Se,j=J6(e,Se),L=e.slice(a,k),A=e.slice(a,k),ee=fe-a,te=de-a,ue=!0}}}}var Ce=M.rawAttrs.indexOf(`
243
+ `)!==-1||M.whitespaceBeforeAttrs.indexOf(`
244
+ `)!==-1,we=!1;ee!==-1&&(we=L.slice(te).trim().length===0);var Te=!1,Ee=k,De=j;if(ee!==-1){var Oe=a+te,ke=q6(e,Oe-1);if(Oe<ke){for(var Ae=Oe;Ae<ke&&(e.charCodeAt(Ae)===Z||e.charCodeAt(Ae)===Q);)Ae++;if(Ae<ke&&e.charCodeAt(Ae)===S3){var je=I6(e,Ae);je&&!je.isClosing&&(Te=!0,Ee=Oe,De=Oe,we=!0)}}if(!Te){var Me=J6(e,ke);if(Me<k){for(var Ne=Me;Ne<k&&(e.charCodeAt(Ne)===Z||e.charCodeAt(Ne)===Q);)Ne++;Ne<k&&e.charCodeAt(Ne)===S3&&I6(e,Ne)&&(Te=!0,Ee=ke,De=Me,we=!0)}}!Te&&n.inHTML&&(Te=!0,Ee=ke,De=J6(e,ke),we=e.slice(Oe,ke).trim().length===0)}var Pe=[],Fe=``;if(ee!==-1){Fe=L.slice(M.end-a,ee);var Ie=Fe.trim();if(Ie){var{inline:Le,inHTML:Re,c:ze}=n;if(n.inHTML=!0,n.c=I+1,P===`p`)n.inline=!0,Pe=h8(Ie,!1,n,r);else{var Be=Fe.indexOf(`
245
+
246
+ `)!==-1,Ve=j6.test(Ie),He=M6.test(Ie),Ue=Be||Ve||n.inHTML&&He;Fe.length>=2&&Fe.charCodeAt(0)===l3&&Fe.charCodeAt(Fe.length-1)===l3&&!Be&&!Ve&&!He?Pe=[{type:$.text,text:Ie}]:Ue||He?(n.inline=!1,Pe=E8(Fe,n,r)):(n.inline=!0,Pe=h8(Ie,!1,n,r))}n.inline=Le,n.inHTML=Re,n.c=ze}}var H=!1;if(c===6&&ee!==-1&&!n.inHTML&&!Ce){var We=/<[a-zA-Z][^>]*>/.test(Fe),Ge=Fe.indexOf(`
247
+
248
+ `)!==-1||j6.test(Fe);We&&!Ge&&(H=!0)}if(!ue&&(n.inHTML||c===7||Ce||!we||H)){var Ke,qe=!1;if(ee!==-1&&Te){var Je=!1;if(n.inHTML&&te<L.length){for(var Ye=te;Ye<L.length&&L.charCodeAt(Ye)!==l3;)Ye++;var Xe=L.slice(te,Ye).trim();Je=Xe.length>1&&Xe.charCodeAt(0)===S3&&Xe.charCodeAt(1)!==R3}Ke=Je?L.slice(M.end-a):Fe,qe=!0}else(c===7||n.inHTML)&&ee!==-1?(Ke=L.slice(M.end-a),Ke.charCodeAt(0)===l3&&(Ke=Ke.slice(1))):Te?Ke=e.slice(a,Ee):Ce?Ke=A:(Ke=L.slice(M.end-a),Ke.charCodeAt(0)===l3&&(Ke=Ke.slice(1)));var Ze={type:$.htmlBlock,tag:N,attrs:c8(M.attrs,N,r),i:M.whitespaceBeforeAttrs+M.rawAttrs,children:Pe,a:Ke,text:Ke,d:!0,b:!1};return qe&&(Ze.n=!0),{node:Ze,end:De}}return{node:{type:$.htmlBlock,tag:N,attrs:c8(M.attrs,N,r),i:M.whitespaceBeforeAttrs+M.rawAttrs,children:Pe,a:ue?``:Fe,text:Fe,d:!1,b:!1},end:De}}var Qe=A.match(/^<(\/?)([a-zA-Z][a-zA-Z0-9-]*)/),$e=Qe?Qe[2]:`div`,et=Qe?Qe[1]===`/`:!1,tt=A;if(et){var nt=A.indexOf(`>`);nt!==-1&&(tt=A.slice(nt+1))}return{node:{type:$.htmlBlock,tag:$e,attrs:{},children:[],a:tt,text:tt,d:!0,b:et},end:j}}var rt=I6(e,a);if(!rt)return null;var it=rt.tag,at=it.toLowerCase(),ot=it.charCodeAt(0),st=ot>=X3&&ot<=Z3;if(!st&&!s8.has(at)&&!k6.has(at)&&!at.includes(`-`))return null;if(rt.isClosing)return{node:{type:$.htmlSelfClosing,tag:it,attrs:{},a:e.slice(a,rt.end),b:!0},end:rt.end};var ct=d8(e,rt.end,it),lt=[];if(ct!==-1){var ut=u8,dt=e.slice(rt.end,ut),ft=dt.trim();if(ft){var pt=dt.indexOf(`
249
+
250
+ `)!==-1,mt=j6.test(ft),ht=M6.test(ft),gt=n.inline,_t=n.inHTML,vt=n.c;n.inHTML=!0,n.c=(n.c||0)+1,pt||mt||ht?(n.inline=!1,lt=E8(dt,n,r)):(n.inline=!0,lt=h8(ft,!1,n,r)),n.inline=gt,n.inHTML=_t,n.c=vt}var yt=q6(e,ct),bt=e.slice(ct,yt).trim()?ct:J6(e,ct),xt=st?e.slice(a,ct):e.slice(a,bt);return{node:{type:$.htmlBlock,tag:it,attrs:c8(rt.attrs,it,r),i:rt.whitespaceBeforeAttrs+rt.rawAttrs,children:lt,a:xt,text:st?dt:xt,d:!0,b:!1},end:bt}}var St=X6(e,rt.end),Ct=St<e.length?J6(e,St):St,wt=e.slice(rt.end,St);if(wt.trim()){var{inline:Tt,inHTML:Et,c:Dt}=n;n.inline=!1,n.inHTML=!0,n.c=(n.c||0)+1,lt=E8(wt,n,r),n.inline=Tt,n.inHTML=Et,n.c=Dt}var Ot=e.slice(rt.end,St);return{node:{type:$.htmlBlock,tag:it,attrs:c8(rt.attrs,it,r),i:rt.whitespaceBeforeAttrs+rt.rawAttrs,children:lt,a:Ot,text:wt,d:!0,b:!1},end:Ct}}function oge(e,t){if(e.charCodeAt(t)!==S3)return 0;var n=t+1,r=e.length;if(e.charCodeAt(n)===T3&&e.charCodeAt(n+1)===_3&&e.charCodeAt(n+2)===_3)return 2;if(e.charCodeAt(n)===I3)return 3;if(e.charCodeAt(n)===T3){var i=e.charCodeAt(n+1);if(i>=X3&&i<=Z3)return 4;if(e.slice(n+1,n+8)===`[CDATA[`)return 5}for(var a=e.charCodeAt(n)===R3,o=a?n+1:n,s=o;s<r;){var c=e.charCodeAt(s);if(c>=X3&&c<=Z3||c>=Q3&&c<=$3||c>=J3&&c<=Y3||c===_3)s++;else break}if(s===o)return 0;var l=e.slice(o,s);if(k6.has(l.toLowerCase())){if(a)return 0;var u=e.charCodeAt(s);return+(u===Z||u===Q||u===m3||u===l3||s>=r)}if(s8.has(l.toLowerCase())){if(a){for(var d=s;d<r&&(e.charCodeAt(d)===Z||e.charCodeAt(d)===Q);)d++;return d<r&&e.charCodeAt(d)===m3?6:0}var f=s<r?e.charCodeAt(s):-1;return f===Z||f===Q||f===m3||f===l3||f===R3||f===-1?6:0}if(a){for(var p=s;p<r&&(e.charCodeAt(p)===Z||e.charCodeAt(p)===Q);)p++;if(p<r&&e.charCodeAt(p)===m3){var m=q6(e,t);if(e.slice(p+1,m).trim()===``)return 7}}else{var h=q6(e,t),g=I6(e,t);if(g&&g.end<=h&&e.slice(g.end,h).trim()===``)return 7}return 0}function p8(e,t,n){for(var r=0,i=e.length;r<i&&(e.charCodeAt(r)===Z||e.charCodeAt(r)===Q);)r++;for(;i>r&&(e.charCodeAt(i-1)===Z||e.charCodeAt(i-1)===Q);)i--;r<i&&e.charCodeAt(r)===H3&&r++,i>r&&e.charCodeAt(i-1)===H3&&(i-2<r||e.charCodeAt(i-2)!==y3)&&i--;for(var a=[],o=r,s=!1,c=[],l=r;l<i;){var u=e.charCodeAt(l);if(u===y3&&l+1<i){e.charCodeAt(l+1)===H3?(s||(s=!0,c=[]),c.push(e.slice(o,l)),c.push(`|`),l+=2,o=l):l+=2;continue}if(u===u3){for(var d=0;l<i&&e.charCodeAt(l)===u3;)d++,l++;for(var f=!1;l<i&&!f;){for(var p=0;l<i&&e.charCodeAt(l)===u3;)p++,l++;p===d?f=!0:p===0&&l++}continue}if(u===H3){var m=s?(c.push(e.slice(o,l)),c.join(``)):e.slice(o,l);a.push(m.trim()),l++,o=l,s=!1,c=[];continue}l++}var h=s?(c.push(e.slice(o,i)),c.join(``)):e.slice(o,i);return a.push(h.trim()),a.map(function(e){var r=e.indexOf(`\\|`)===-1?e:e.replace(/\\\|/g,`|`);return r?h8(r,!1,t,n):[]})}function m8(e,t,n,r){let i=q6(e,t);var a=e.indexOf(`|`,t);if(a<0||a>=i)return null;let o=J6(e,i);if(o>=e.length)return null;let s=q6(e,o);if(!F6(e,o,s))return null;let c=e.slice(t,i),l=e.slice(o,s);for(var u=[],d=0,f=l.length;d<f&&(l.charCodeAt(d)===Z||l.charCodeAt(d)===Q);)d++;for(d<f&&l.charCodeAt(d)===H3&&d++;d<f;){for(;d<f&&(l.charCodeAt(d)===Z||l.charCodeAt(d)===Q);)d++;if(d>=f||l.charCodeAt(d)===H3)break;var p=l.charCodeAt(d)===D3;for(p&&d++;d<f&&l.charCodeAt(d)===_3;)d++;var m=d<f&&l.charCodeAt(d)===D3;for(m&&d++,u.push(p&&m?`center`:m?`right`:p?`left`:null);d<f&&(l.charCodeAt(d)===Z||l.charCodeAt(d)===Q);)d++;d<f&&l.charCodeAt(d)===H3&&d++}let h=p8(c,n,r);if(u.length!==h.length)return null;let g=[],_=J6(e,s);for(;_<e.length;){let t=q6(e,_),i=e.slice(_,t);if(t8(e,_,t))break;if(e8(e,_,t),Q6<4){var v=e.charCodeAt(_+$6);if(v===m3||v===h3||(v===_3||v===b3||v===x3)&&n8(e,_))break;if(v===u3||v===d3){for(var y=_+$6,b=0;y<t&&e.charCodeAt(y)===v;)b++,y++;if(b>=3)break}}g.push(p8(i,n,r)),_=J6(e,t)}if(r.optimizeForStreaming&&g.length===0)return null;for(var x=h.length,S=0;S<g.length;S++)if(g[S].length<x)for(;g[S].length<x;)g[S].push([]);else g[S].length>x&&(g[S].length=x);return{node:{type:$.table,header:h,cells:g,align:u},end:_}}function sge(e,t,n){if(e8(e,t,q6(e,t)),Q6>3)return null;var r=t+$6;if(e.charCodeAt(r)!==f3)return null;if(r+1<e.length&&e.charCodeAt(r+1)===p3)return cge(e,r,n)||null;n.refs||={};var i=L6(e,r,n.refs);return i===null?null:{node:{type:$.refCollection},end:i}}function cge(e,t,n){var r=e.length;if(e.charCodeAt(t)!==f3||t+1>=r||e.charCodeAt(t+1)!==p3)return null;for(var i=t+2,a=i;i<r&&e.charCodeAt(i)!==w3;){if(e.charCodeAt(i)===l3)return null;i++}if(i>=r)return null;var o=(`^`+e.slice(a,i)).toLowerCase();if(i++,i>=r||e.charCodeAt(i)!==D3)return null;for(i++;i<r&&(e.charCodeAt(i)===Z||e.charCodeAt(i)===Q);)i++;if(i<r&&e.charCodeAt(i)===l3)for(i++;i<r&&(e.charCodeAt(i)===Z||e.charCodeAt(i)===Q);)i++;var s=e.indexOf(`
251
+ `,i);s<0&&(s=r);for(var c=e.slice(i,s).trim(),l=s<r?s+1:r;l<r;){var u=q6(e,l);if(e8(e,l,u),Q6>=2&&!t8(e,l,u))c+=`
252
+ `+e.slice(l,u),l=J6(e,u);else if(t8(e,l,u)){var d=J6(e,u);if(d<r&&(e8(e,d,q6(e,d)),Q6>=2)){c+=`
253
+ `,l=J6(e,u);continue}break}else break}return n.refs[o]||(n.refs[o]={target:c,title:void 0}),{node:{type:$.footnote},end:l}}function lge(e,t,n,r){let i=t,a=0,o=0,s=-1;for(;i<e.length;){let t=s>=0?s:q6(e,i);if(s=-1,t8(e,i,t))break;if(e8(e,i,t),Q6<4&&o>0&&!n.f){let n=e.charCodeAt(i+$6);if(n===v3||n===_3){let r=i+$6;for(;r<t&&e.charCodeAt(r)===n;)r++;for(;r<t&&(e.charCodeAt(r)===Z||e.charCodeAt(r)===Q);)r++;if(r>=t){a=n===v3?1:2,i=J6(e,t);break}}}o=t;let x=J6(e,t);if(x<e.length){if(e.charCodeAt(x)===q3){var c=q6(e,x);i=J6(e,c),o=c;continue}let t=q6(e,x);if(s=t,e8(e,x,t),Q6<4){let a=e.charCodeAt(x+$6);if(a===m3){i=x;break}if(a===h3){for(var l=x+$6,u=0;l<t&&e.charCodeAt(l)===h3&&u<=6;)u++,l++;if(u>=1&&u<=6&&(l>=t||e.charCodeAt(l)===Z||e.charCodeAt(l)===Q)){i=x;break}}if(a===u3||a===d3){for(var d=x+$6,f=0;d<t&&e.charCodeAt(d)===a;)f++,d++;if(f>=3){i=x;break}}if(a===S3){var p=x+$6+1,m=p<t?e.charCodeAt(p):0,h=m===T3||m===I3;if(!h&&m===R3){for(var g=p+1,_=g;_<t&&(e.charCodeAt(_)>=X3&&e.charCodeAt(_)<=Z3||e.charCodeAt(_)>=Q3&&e.charCodeAt(_)<=$3||e.charCodeAt(_)>=J3&&e.charCodeAt(_)<=Y3||e.charCodeAt(_)===_3);)_++;_>g&&(h=s8.has(e.slice(g,_).toLowerCase()))}else if(!h){for(var v=p;v<t&&(e.charCodeAt(v)>=X3&&e.charCodeAt(v)<=Z3||e.charCodeAt(v)>=Q3&&e.charCodeAt(v)<=$3||e.charCodeAt(v)>=J3&&e.charCodeAt(v)<=Y3||e.charCodeAt(v)===_3);)v++;if(v>p){var y=e.slice(p,v).toLowerCase();h=s8.has(y)||k6.has(y)}}if(h&&f8(e,x,n,r)){i=x;break}}if(a===_3||a===b3||a===V3){let n=x+$6+1;if(n<t&&(e.charCodeAt(n)===Z||e.charCodeAt(n)===Q)&&Y6(e,n,t)<t&&!n8(e,x)){i=x;break}}if(a>=J3&&a<=Y3){let n=x+$6;for(;n<t&&e.charCodeAt(n)>=J3&&e.charCodeAt(n)<=Y3;)n++;if(n<t&&(e.charCodeAt(n)===L3||e.charCodeAt(n)===K3)&&n-(x+$6)===1&&e.charCodeAt(x+$6)===49){var b=n+1;if(b<t&&(e.charCodeAt(b)===Z||e.charCodeAt(b)===Q)&&Y6(e,b,t)<t){i=x;break}}}if(a===H3){let n=J6(e,t);if(n<e.length&&F6(e,n,q6(e,n))){i=x;break}}if((a===_3||a===b3||a===x3)&&n8(e,x)){if(a!==_3){i=x;break}let n=0,r=x+$6;for(;r<t&&e.charCodeAt(r)===_3;)n++,r++;for(;r<t&&(e.charCodeAt(r)===Z||e.charCodeAt(r)===Q);)r++;if(r<t){i=x;break}}}}i=J6(e,t)}for(var x=a?o:i;x>t&&(e.charCodeAt(x-1)===l3||e.charCodeAt(x-1)===c3||e.charCodeAt(x-1)===Z||e.charCodeAt(x-1)===Q);)x--;for(var S=t;S<x&&(e.charCodeAt(S)===Z||e.charCodeAt(S)===Q);)S++;if(S>=x)return null;for(var C=!1,w=S;w<x;w++)if(e.charCodeAt(w)===q3){C=!0;break}var T=C?e.slice(S,x).replace(/\u001E/g,``):e.slice(S,x);if(!T)return null;let E=h8(T,!0,n,r);if(a){let e=(r?.slugify||l6)(T);return{node:{type:$.heading,level:a,children:E,id:e},end:i}}return{node:{type:$.paragraph,children:E},end:i}}function h8(e,t,n,r){var i=n.k;if(!i){var a=n.e;n.e=t;var o=T8(e,0,e.length,n,r);return n.e=a,o}var s=[];return i.push({dest:s,text:e,breaks:t,inline:n.inline,inAnchor:n.inAnchor,inHTML:n.inHTML,htmlDepth:n.c,inList:n.inList,inBlockQuote:n.inBlockQuote,noSetext:n.f,depth:n.j}),s}function uge(e,t,n){if(e.charCodeAt(t)!==u3)return null;let r=Z6(e,t,n,96),i=t+r;for(;i<n;){let a=e.indexOf("`",i);if(a<0||a>=n)return null;let o=Z6(e,a,n,96);if(o===r){let n=e.slice(t+r,a);return n.indexOf(`
254
+ `)!==-1&&(n=n.replace(/\n/g,` `)),n.length>0&&n[0]===` `&&n[n.length-1]===` `&&n.trim().length>0&&(n=n.slice(1,-1)),{node:{type:$.codeInline,text:n},end:a+o}}i=a+o}return null}function g8(e,t,n){if(e.charCodeAt(t)!==u3)return t;let r=Z6(e,t,n,96),i=t+r;for(;i<n;){let a=e.indexOf("`",i);if(a<0||a>=n)return t;let o=Z6(e,a,n,96);if(o===r)return a+o;i=a+o}return t}function dge(e,t,n){if(e.charCodeAt(t)!==S3)return t;if(t+1<n&&e.charCodeAt(t+1)===R3){let r=t+2;for(;r<n&&e.charCodeAt(r)!==m3;)r++;return r<n?r+1:t}if(t+3<n&&e.charCodeAt(t+1)===T3&&e.charCodeAt(t+2)===_3&&e.charCodeAt(t+3)===_3){let n=e.indexOf(`-->`,t+4);return n>=0?n+3:t}let r=t+1,i=r;for(;r<n;){let t=e.charCodeAt(r);if(t>=X3&&t<=Z3||t>=Q3&&t<=$3||t>=J3&&t<=Y3||t===_3)r++;else break}if(r===i)return t;let a=e.slice(i,r).toLowerCase(),o=!1;for(;r<n;){let i=e.charCodeAt(r);if(i===m3){r++;break}if(i===R3&&r+1<n&&e.charCodeAt(r+1)===m3){r+=2,o=!0;break}if(i===B3||i===z3){var s=i;for(r++;r<n&&e.charCodeAt(r)!==s;)r++;r<n&&r++;continue}if(i===l3)return t;r++}if(o||f6(a))return r;let c=1;for(;r<n&&c>0;)if(e.charCodeAt(r)===S3)if(r+1<n&&e.charCodeAt(r+1)===R3){let t=r+2,i=t;for(;i<n&&(e.charCodeAt(i)>=X3&&e.charCodeAt(i)<=Z3||e.charCodeAt(i)>=Q3&&e.charCodeAt(i)<=$3);)i++;if(e.slice(t,i).toLowerCase()===a){for(;i<n&&e.charCodeAt(i)!==m3;)i++;if(i<n&&i++,c--,c===0)return i}r=i}else{let t=r+1,i=t;for(;i<n&&(e.charCodeAt(i)>=X3&&e.charCodeAt(i)<=Z3||e.charCodeAt(i)>=Q3&&e.charCodeAt(i)<=$3);)i++;e.slice(t,i).toLowerCase()===a&&c++,r++}else r++;return r}function fge(e,t,n,r,i){if(e.charCodeAt(t)!==d3||t+1>=n||e.charCodeAt(t+1)!==d3)return null;let a=t+2;for(;a+1<n;){let o=e.charCodeAt(a);if(o===u3){let t=g8(e,a,n);if(t>a){a=t;continue}}if(o===d3&&e.charCodeAt(a+1)===d3){let n=e.slice(t+2,a),o=T8(n,0,n.length,r,i);return{node:{type:$.textFormatted,tag:`del`,children:o},end:a+2}}o===y3&&a+1<n&&a++,a++}return null}function pge(e,t,n,r,i){if(e.charCodeAt(t)!==v3||t+1>=n||e.charCodeAt(t+1)!==v3)return null;let a=t+2;for(;a+1<n;){let o=e.charCodeAt(a);if(o===u3){let t=g8(e,a,n);if(t>a){a=t;continue}}if(o===v3&&e.charCodeAt(a+1)===v3&&a>t+2){let n=e.slice(t+2,a),o=T8(n,0,n.length,r,i);return{node:{type:$.textFormatted,tag:`mark`,children:o},end:a+2}}o===y3&&a+1<n&&a++,a++}return null}function _8(e,t,n){return e<e6?!!(H6(e)&h6):Nhe.test(t[n])}function v8(e,t,n){return e<e6?!!(H6(e)&p6):Phe.test(t[n])}function mge(e,t,n){var r=e.charCodeAt(t);if(r!==b3&&r!==x3)return null;var i=Z6(e,t,n,r);if(i===0)return null;var a=t>0?e.charCodeAt(t-1):32,o=t+i<n?e.charCodeAt(t+i):32,s=v8(a,e,t-1),c=v8(o,e,t+i),l=t>0&&_8(a,e,t-1),u=t+i<n&&_8(o,e,t+i),d=!c&&(!u||s||l),f=!s&&(!l||c||u),p,m;return r===b3?(p=d,m=f):(p=d&&(!f||l),m=f&&(!d||u)),{len:i,canOpen:p,canClose:m}}function hge(e,t,n,r){if(t.length!==0){for(var i=e.length,a=Array(i),o=null,s=null,c=0;c<i;c++){var l={node:e[c],prev:s,next:null};s?s.next=l:o=l,a[c]=l,s=l}for(var u=Array(t.length),d=0;d<t.length;d++)u[d]=a[t[d].idx];for(var f=[],p=0;p<12;p++)f[p]=-1;for(var m=0;m<t.length;){var h=t[m];if(!h.active||!h.canClose){m++;continue}for(var g=(h.ch===b3?0:1)*6+h.len%3*2+ +!!h.canOpen,_=f[g]===void 0?-1:f[g],v=-1,y=m-1;y>_;y--){var b=t[y];if(!(!b.active||b.ch!==h.ch||!b.canOpen)&&!((h.canOpen||b.canClose)&&(b.len+h.len)%3==0&&b.len%3!=0)){v=y;break}}if(v<0){f[g]=m-1,!h.canOpen&&(h.active=!1),m++;continue}var x=t[v],S=x.len>=2&&h.len>=2,C=S?2:1;x.len-=C,h.len-=C;var w=u[v],T=u[m],E=w.node,D=T.node;E.text=E.text.slice(0,E.text.length-C),D.text=D.text.slice(C);for(var O=[],k=w.next;k&&k!==T;)O.push(k.node),k=k.next;var A={node:{type:$.textFormatted,tag:S?`strong`:`em`,children:O},prev:w,next:T};w.next=A,T.prev=A;for(var j=v+1;j<m;j++)t[j].active=!1;if(x.len===0&&(x.active=!1,E.text===``)){var M=w.prev;A.prev=M,M?M.next=A:o=A}if(h.len===0){if(h.active=!1,D.text===``){var N=T.next;A.next=N,N&&(N.prev=A)}}else continue;m++}for(var P=0,F=o;F;){var I=F.node;if(I.type===$.text){var L=I;if(L.text===``){F=F.next;continue}if(P>0&&e[P-1].type===$.text){e[P-1].text+=L.text,F=F.next;continue}}e[P++]=I,F=F.next}e.length=P}}function y8(e,t,n,r,i){let a=e.charCodeAt(t)===T3,o=a?t+1:t;if(e.charCodeAt(o)!==f3)return null;var s=e.indexOf(`]`,o+1);if(s<0||s>=n)return null;for(var c=o+1,l=1;c<n&&l>0;){var u=e.charCodeAt(c);if(u===y3&&c+1<n){c+=2;continue}if(u===u3){var d=g8(e,c,n);if(d>c){c=d;continue}}if(u===S3){var f=b8(e,c,n);if(f){c=f.end;continue}var p=dge(e,c,n);if(p>c){c=p;continue}}u===f3?l++:u===w3&&l--,c++}if(l!==0)return null;var m=c-1,h=e.slice(o+1,m),g=c<n?e.charCodeAt(c):0,_=!1;if(g===G3){var v=!0;for(c++;c<n&&(e.charCodeAt(c)===Z||e.charCodeAt(c)===l3);)c++;var y=``,b=c;if(c<n&&e.charCodeAt(c)===S3){for(c++,b=c;b<n&&e.charCodeAt(b)!==m3;){if(e.charCodeAt(b)===y3&&b+1<n){b+=2;continue}if(e.charCodeAt(b)===l3){v=!1;break}b++}v&&(b>=n||e.charCodeAt(b)!==m3)&&(v=!1),v&&(y=e.slice(c,b),b++)}else if(v)if(r.g!==void 0&&c>=r.g)v=!1;else{for(var x=0,S=!1;b<n;){var C=e.charCodeAt(b);if(C===y3&&b+1<n){b+=2;continue}if(C===G3)x++;else if(C===K3){if(S=!0,x===0)break;x--}else if(C===Z||C===l3)break;b++}b>=n&&!S&&(r.g===void 0||c<r.g)&&(r.g=c),y=e.slice(c,b)}if(v){for(c=b;c<n&&(e.charCodeAt(c)===Z||e.charCodeAt(c)===l3);)c++;var w;if(c<n){var T=e.charCodeAt(c);if(T===B3||T===z3||T===G3){var E=T===G3?41:T;c++;for(var D=c;c<n&&e.charCodeAt(c)!==E;)e.charCodeAt(c)===y3&&c+1<n&&c++,c++;c>=n?v=!1:(w=e.slice(D,c),c++)}}if(v){for(;c<n&&(e.charCodeAt(c)===Z||e.charCodeAt(c)===l3);)c++;(c>=n||e.charCodeAt(c)!==K3)&&(v=!1)}}if(v){c++,y=U6(y),w!==void 0&&(w=r6(U6(w)));var O=(i?.sanitizer||a6)(y,a?`img`:`a`,a?`src`:`href`)===null?null:y;if(a){var k=S8(T8(h,0,h.length,r,i));return{node:{type:$.image,target:O,alt:k,title:w},end:c}}else{var A=r.inAnchor;r.inAnchor=!0;var j=A?[{type:$.text,text:h}]:T8(h,0,h.length,r,i);return r.inAnchor=A,!r.inAnchor&&x8(j)?null:{node:{type:$.link,target:O,title:w,children:j},end:c}}}else c=m+1,_=!0}var M=``,N=c;if(!_&&g===f3){var P=c+1;N=P;for(var F=!1;N<n&&e.charCodeAt(N)!==w3;){if(e.charCodeAt(N)===y3&&N+1<n){N+=2;continue}if(e.charCodeAt(N)===f3){F=!0;break}N++}if(F||N>=n)return null;var I=e.slice(P,N);if(I.trim())M=V6(I);else{if(B6(h))return null;M=V6(h)}N+=1}else{if(B6(h))return null;M=V6(h)}var L=r.refs[M];if(!L)return null;if(a)return{node:{type:$.image,target:L.target,alt:S8(T8(h,0,h.length,r,i)),title:L.title},end:N};var ee=r.inAnchor;r.inAnchor=!0;var j=ee?[{type:$.text,text:h}]:T8(h,0,h.length,r,i);return r.inAnchor=ee,!r.inAnchor&&x8(j)?null:{node:{type:$.link,target:L.target,title:L.title,children:j},end:N}}function b8(e,t,n){if(e.charCodeAt(t)!==S3)return null;for(var r=t+1;r<n;){var i=e.charCodeAt(r);if(i===m3)break;if(i===Z||i===l3||i===c3||i===S3)return null;r++}if(r>=n||e.charCodeAt(r)!==m3)return null;var a=e.slice(t+1,r);return a.match(/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^\x00-\x20]*)$/)?{node:{type:$.link,target:a,title:void 0,children:[{type:$.text,text:a}]},end:r+1}:a.indexOf(`@`)!==-1&&/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)?{node:{type:$.link,target:`mailto:`+a,title:void 0,children:[{type:$.text,text:a}]},end:r+1}:null}function gge(e,t,n,r){if(e.charCodeAt(t)!==f3||t+1>=n||e.charCodeAt(t+1)!==p3)return null;let i=t+2;for(;i<n&&e.charCodeAt(i)!==w3&&e.charCodeAt(i)!==l3;)i++;if(i>=n||e.charCodeAt(i)!==w3)return null;let a=e.slice(t+2,i);return a?{node:{type:$.footnoteReference,target:`#`+l6(a),text:a},end:i+1}:null}function _ge(e,t,n,r){if(r.disableBareUrls)return null;var i=``,a=!1,o=e.charCodeAt(t);if(o===A3||o===72?t+8<=n&&e.charCodeAt(t+1)===M3&&e.charCodeAt(t+2)===M3&&e.charCodeAt(t+3)===N3&&(e.charCodeAt(t+4)===P3&&e.charCodeAt(t+5)===D3&&e.charCodeAt(t+6)===R3&&e.charCodeAt(t+7)===R3?i=`https://`:e.charCodeAt(t+4)===D3&&e.charCodeAt(t+5)===R3&&e.charCodeAt(t+6)===R3&&(i=`http://`)):o===k3||o===70?t+6<=n&&e.charCodeAt(t+1)===M3&&e.charCodeAt(t+2)===N3&&e.charCodeAt(t+3)===D3&&e.charCodeAt(t+4)===R3&&e.charCodeAt(t+5)===R3&&(i=`ftp://`):(o===j3||o===87)&&t+4<=n&&e.charCodeAt(t+1)===j3&&e.charCodeAt(t+2)===j3&&e.charCodeAt(t+3)===L3&&(i=`www.`,a=!0),!i)return null;let s=t+i.length;for(;s<n;){let t=e.charCodeAt(s);if(t===Z||t===l3||t===Q||t===c3||t===S3||t===m3)break;s++}for(var c=0,l=0,u=t;u<s;u++){var d=e.charCodeAt(u);d===G3?c++:d===K3&&l++}let f=s;for(;f>t+i.length;){let n=e.charCodeAt(f-1);if(n===L3||n===Che||n===D3||n===T3||n===I3||n===K3||n===b3||n===x3||n===d3){if(n===K3){if(c>=l)break;l--}f--}else if(n===F3){for(var p=f-2;p>t&&(e.charCodeAt(p)>=X3&&e.charCodeAt(p)<=Z3||e.charCodeAt(p)>=Q3&&e.charCodeAt(p)<=$3||e.charCodeAt(p)>=J3&&e.charCodeAt(p)<=Y3);)p--;p>=t&&e.charCodeAt(p)===E3?f=p:f--}else break}if(f<=t+i.length)return null;var m=t+(a?4:i.length),h=e.indexOf(`/`,m);if((h<0||h>f)&&(h=f),a&&e.indexOf(`.`,m)===-1)return null;for(var g=-1,_=-1,v=h-1;v>=m;v--)if(e.charCodeAt(v)===L3)if(g<0)g=v;else{_=v;break}for(var v=_>=0?_+1:m;v<h;v++)if(e.charCodeAt(v)===x3)return null;var y=e.slice(t,f),b=a?`http://`+y:y;return{node:{type:$.link,target:b,title:void 0,children:[{type:$.text,text:y}]},end:f}}function vge(e,t,n,r){if(r.disableBareUrls)return null;for(var i=t,a=i;i<n;){var o=e.charCodeAt(i);if(o>=X3&&o<=Z3||o>=Q3&&o<=$3||o>=J3&&o<=Y3||o===L3||o===T3||o===h3||o===36||o===g3||o===E3||o===z3||o===b3||o===V3||o===R3||o===v3||o===I3||o===p3||o===x3||o===u3||o===U3||o===H3||o===W3||o===d3||o===_3)i++;else break}if(i===a||i>=n||e.charCodeAt(i)!==C3)return null;i++;for(var s=i,c=-1,l=i;i<n;){var o=e.charCodeAt(i);if(o>=X3&&o<=Z3||o>=Q3&&o<=$3||o>=J3&&o<=Y3)i++;else if((o===_3||o===x3)&&i>s)i++;else if(o===L3){if(i===s)break;var u=e.charCodeAt(i-1);if(u===_3||u===x3||i-l>63)break;if(i+1<n){var d=e.charCodeAt(i+1);if(d>=X3&&d<=Z3||d>=Q3&&d<=$3||d>=J3&&d<=Y3)c=i,l=i+1,i++;else break}else break}else break}if(i-l>63||c<0)return null;var f=e.charCodeAt(i-1);if(!(f>=X3&&f<=Z3||f>=Q3&&f<=$3||f>=J3&&f<=Y3)||i<=c+1)return null;for(var p=-1,m=c-1;m>=s;m--)if(e.charCodeAt(m)===L3){p=m;break}for(var m=p>=0?p+1:s;m<i;m++)if(e.charCodeAt(m)===x3)return null;var h=e.slice(t,i);return{node:{type:$.link,target:`mailto:`+h,title:void 0,children:[{type:$.text,text:h}]},end:i}}function x8(e){for(var t=0;t<e.length;t++)if(e[t].type===$.link||`children`in e[t]&&Array.isArray(e[t].children)&&x8(e[t].children))return!0;return!1}function S8(e){for(var t=``,n=0;n<e.length;n++){var r=e[n];r.type===$.text?t+=r.text:r.type===$.breakLine?t+=` `:r.type===$.codeInline?t+=r.text:`children`in r&&Array.isArray(r.children)?t+=S8(r.children):r.type===$.image&&(t+=r.alt||``)}return t}function C8(e){return{type:$.text,text:e}}function yge(e,t,n){var r=t+1;if(r>=n)return-1;if(e.charCodeAt(r)===h3){r++;var i=r<n&&(e.charCodeAt(r)===whe||e.charCodeAt(r)===The);i&&r++;for(var a=r,o=i?6:7;r<n&&r-a<=o;){var s=e.charCodeAt(r);if(!(s>=J3&&s<=Y3||i&&(s>=X3&&s<=O3||s>=Q3&&s<=k3)))break;r++}return r===a||r-a>o?-1:r<n&&e.charCodeAt(r)===F3?r+1:-1}for(var c=r;r<n&&r-c<48;){var l=e.charCodeAt(r);if(l>=X3&&l<=Z3||l>=Q3&&l<=$3||l>=J3&&l<=Y3){r++;continue}break}return r===c?-1:r<n&&e.charCodeAt(r)===F3?r+1:-1}function bge(e,t,n,r,i){if(e.charCodeAt(t)!==S3)return null;var a=t+1;if(a>=n)return null;var o=e.charCodeAt(a);if(o===T3&&a+1<n&&e.charCodeAt(a+1)===_3&&a+2<n&&e.charCodeAt(a+2)===_3){var s=a+3;if(s<n&&e.charCodeAt(s)===m3)return{node:{type:$.htmlComment,text:``,l:!0},end:s+1};if(s+1<n&&e.charCodeAt(s)===_3&&e.charCodeAt(s+1)===m3)return{node:{type:$.htmlComment,text:`-`,l:!0},end:s+2};var c=e.indexOf(`-->`,s);return c!==-1&&c<=n-3?{node:{type:$.htmlComment,text:e.slice(t+4,c),l:!1},end:c+3}:null}if(o===I3){var l=e.indexOf(`?>`,a+1);return l!==-1&&l<n?{node:{type:$.htmlSelfClosing,tag:`?`,attrs:{},a:e.slice(t,l+2),b:!1},end:l+2}:null}if(o===T3&&a+1<n){var u=e.charCodeAt(a+1);if(u===f3&&e.slice(a+1,a+8)===`[CDATA[`){var d=e.indexOf(`]]>`,a+8);return d!==-1&&d<n?{node:{type:$.htmlSelfClosing,tag:`![CDATA[`,attrs:{},a:e.slice(t,d+3),b:!1},end:d+3}:null}if(u>=X3&&u<=Z3){var f=e.indexOf(`>`,a+2);return f!==-1&&f<n?{node:{type:$.htmlSelfClosing,tag:`!`+e.slice(a+1,f),attrs:{},a:e.slice(t,f+1),b:!1},end:f+1}:null}}if(o===R3){var p=a+1;if(p>=n)return null;var m=e.charCodeAt(p);if(!(m>=X3&&m<=Z3||m>=Q3&&m<=$3))return null;for(p++;p<n;){var h=e.charCodeAt(p);if(h>=X3&&h<=Z3||h>=Q3&&h<=$3||h>=J3&&h<=Y3||h===_3)p++;else break}for(;p<n&&(e.charCodeAt(p)===Z||e.charCodeAt(p)===Q||e.charCodeAt(p)===l3);)p++;if(p<n&&e.charCodeAt(p)===m3){var g=e.slice(a+1,p).trim();return{node:{type:$.htmlSelfClosing,tag:g,attrs:{},a:e.slice(t,p+1),b:!0},end:p+1}}return null}if(!(o>=X3&&o<=Z3||o>=Q3&&o<=$3))return null;var _=I6(e,t);if(!_)return null;var v=_.tag,y=v.toLowerCase();if(_.selfClosing||f6(v))return{node:{type:$.htmlSelfClosing,tag:v,attrs:c8(_.attrs,v,i),a:e.slice(t,_.end),b:!1},end:_.end};var b=k6.has(y),x=d8(e.slice(0,n),_.end,v);if(x===-1)return{node:{type:$.htmlSelfClosing,tag:v,attrs:c8(_.attrs,v,i),a:e.slice(t,_.end),b:!1},end:_.end};var S=age(e,`</`+y,x),C=e.slice(_.end,S),w=[];if(b)C.trim()&&(w=[{type:$.text,text:C}]);else{var T=C.trim();if(T){var{inAnchor:E,inline:D,e:O}=r;y===`a`&&(r.inAnchor=!0),r.e=!1,T.indexOf(`
255
+
256
+ `)!==-1||/^#{1,6}\s/.test(T)?(r.inline=!1,w=E8(T,r,i)):w=T8(T,0,T.length,r,i),r.inAnchor=E,r.inline=D,r.e=O}}return{node:{type:$.htmlBlock,tag:v,attrs:c8(_.attrs,v,i),i:_.rawAttrs,children:w,a:void 0,text:C,d:!1,b:!1},end:x}}var xge=200,w8=0;function T8(e,t,n,r,i){if(w8++,w8>xge)return w8--,[{type:$.text,text:e.slice(t,n)}];var a=r.g;r.g=void 0;let o=r;if(i.optimizeForStreaming){let r=function(e,t){for(var n=1,r=t+1;r<e.length;r++){var i=e.charCodeAt(r);if(i===f3)n++;else if(i===w3&&(n--,n===0))return r}return-1},i=e.slice(t,n),a=i;for(var s=0,c=0,l=0,u=0,d=0,f=-1,p=-1,m=-1,h=-1,g=-1,_=0;_<i.length;_++){var v=i.charCodeAt(_);v===b3?_+1<i.length&&i.charCodeAt(_+1)===b3?(s++,f=_,_++):(c++,p=_):v===x3?_+1<i.length&&i.charCodeAt(_+1)===x3?(l++,m=_,_++):(u++,h=_):v===d3&&_+1<i.length&&i.charCodeAt(_+1)===d3&&(d++,g=_,_++)}var y=[];d%2==1&&g>=0&&y.push([g,2]),l%2==1&&m>=0&&y.push([m,2]),u%2==1&&h>=0&&y.push([h,1]),s%2==1&&f>=0&&y.push([f,2]),c%2==1&&p>=0&&y.push([p,1]),y.sort(function(e,t){return t[0]-e[0]});for(var b=0;b<y.length;b++){var x=y[b][0],S=y[b][1];i=i.slice(0,x)+i.slice(x+S)}let o=0,ne=-1;for(let e=0;e<i.length;e++)i.charCodeAt(e)===u3&&(o++,ne=e);if(o%2==1&&ne!==-1){let e=!1,t=-1,n=0;for(;n<i.length;)i.charCodeAt(n)===u3&&(e?(e=!1,t=-1):(t=n,e=!0)),n++;e&&t!==-1&&(i=i.slice(0,t))}for(var C=!0;C;){C=!1;for(var w=-1,T=-1,E=-1,D=!1,O=0;O<i.length;O++)if(i.charCodeAt(O)===f3&&(O===0||i.charCodeAt(O-1)!==y3)){var k=O>0&&i.charCodeAt(O-1)===T3,A=k?O-1:O,j=r(i,O);if(j===-1)w=A,D=k,T=O+1,E=i.length;else{var M=j+1;if(M>=i.length)w=A,D=k,T=O+1,E=j;else if(i.charCodeAt(M)===G3){var N=i.indexOf(`)`,M+1);N===-1?(w=A,D=k,T=O+1,E=j,O=i.length):O=N}else if(i.charCodeAt(M)===f3){var P=i.indexOf(`]`,M+1);P===-1?(w=A,D=k,T=O+1,E=j,O=i.length):O=P}else O=j}}if(w>=0){var F=D?``:i.slice(T,E);i=i.slice(0,w)+F,C=!0}}let R=i.match(/<([A-Z][A-Za-z0-9]*)(?:\s[^>]*)?>([^<]*)$/);if(R&&R.index!==void 0){var I=R[0].length-R[2].length;if(!(I>=2&&R[0].charCodeAt(I-2)===R3)){for(var L=!1,ee=0,te=0;te<R.index;te++)i.charCodeAt(te)===u3&&ee++;if(L=ee%2==1,!L){let e=R[1];l8(i,`</`+e,0)===-1&&(i=i.slice(0,R.index)+R[2])}}}i!==a&&(e=e.slice(0,t)+i,n=t+i.length)}let ne=[];var R=[];let z=t;var B=``,re=i.disableAutoLink||i.disableBareUrls||o.inAnchor?-1:e.indexOf(`@`,t);for(re>=n&&(re=-1);t<n;){let r=e.charCodeAt(t),a=null;if(r===u3){if(a=uge(e,t,n),!a){var ie=Z6(e,t,n,u3);t+=ie-1}}else if(r===b3||r===x3){var ae=mge(e,t,n);if(ae){if(ae.canOpen||ae.canClose){(B||t>z)&&(ne.push(C8(B+e.slice(z,t))),B=``);var oe=C8(e.slice(t,t+ae.len));R.push({idx:ne.length,ch:r,len:ae.len,canOpen:ae.canOpen,canClose:ae.canClose,active:!0}),ne.push(oe),t+=ae.len,z=t;continue}t+=ae.len-1}}else if(r===d3)a=fge(e,t,n,o,i);else if(r===v3)a=pge(e,t,n,o,i);else if(r===f3)t+1<n&&e.charCodeAt(t+1)===p3&&(a=gge(e,t,n,o)),a||=y8(e,t,n,o,i);else if(r===T3&&t+1<n&&e.charCodeAt(t+1)===f3)a=y8(e,t,n,o,i);else if(r===S3)a=b8(e,t,n),!a&&!i.disableParsingRawHTML&&!i.ignoreHTMLBlocks&&(a=bge(e,t,n,o,i));else if(r===E3){var se=yge(e,t,n);if(se!==-1){var ce=e.slice(t,se),le=r6(ce);if(le!==ce){B=B+e.slice(z,t)+le,t=se,z=se;continue}}}else if((r===A3||r===j3||r===k3)&&!o.inAnchor&&!i.disableAutoLink&&(t===0||e.charCodeAt(t-1)!==S3)){var ue=t+1<n?e.charCodeAt(t+1):0;(r===A3&&ue===M3||r===k3&&ue===M3||r===j3&&ue===j3)&&(a=_ge(e,t,n,i))}if(!a&&re>=0&&re-t<=64&&!o.inAnchor&&!i.disableAutoLink&&!i.disableBareUrls&&(r>=X3&&r<=Z3||r>=Q3&&r<=$3||r>=J3&&r<=Y3)&&(a=vge(e,t,n,i),!a&&t>=re&&(re=e.indexOf(`@`,t+1),re>=n&&(re=-1))),r===l3&&o.e){var de=!1,fe=0;if(t>z&&e.charCodeAt(t-1)===y3)de=!0,fe=1;else{for(var pe=0,me=t-1;me>=z&&e.charCodeAt(me)===Z;)pe++,me--;pe>=2&&(de=!0,fe=pe)}if(de){for((B||t-fe>z)&&(ne.push(C8(B+e.slice(z,t-fe))),B=``),ne.push({type:$.breakLine}),t++;t<n&&e.charCodeAt(t)===Z;)t++;z=t;continue}var V=t>z&&e.charCodeAt(t-1)===Z,he=t+1<n&&e.charCodeAt(t+1)===Z;if(V||he){for(var ge=t;ge>z&&e.charCodeAt(ge-1)===Z;)ge--;for(B+=e.slice(z,ge)+`
257
+ `,t++;t<n&&e.charCodeAt(t)===Z;)t++;z=t;continue}}if(a)(B||t>z)&&(ne.push(C8(B+e.slice(z,t))),B=``),ne.push(a.node),t=a.end,z=t;else{if(r===y3&&t+1<n&&H6(e.charCodeAt(t+1))&h6){(B||t>z)&&(ne.push(C8(B+e.slice(z,t))),B=``),ne.push(C8(e[t+1])),t+=2,z=t;continue}if(t++,re<0||re-t>64)for(;t<n&&!(re>=0&&re-t<=64);){var _e=e.charCodeAt(t);if(_e<e6&&!N6[_e])t++;else break}}}return(B||n>z)&&(ne.push(C8(B+e.slice(z,n))),B=``),R.length>0&&hge(ne,R,r,i),r.g=a,w8--,ne}var Sge=500;function E8(e,t,n){var r=t.j||0;if(r>Sge)return[{type:$.text,text:e}];if(t.j=r+1,n.optimizeForStreaming&&!t.m){var i=e.length;i>0&&e.charCodeAt(i-1)===l3&&i--;for(var a=i;a>0&&e.charCodeAt(a-1)!==l3;)a--;if(a>0&&e.charCodeAt(a)===H3){for(var o=!0,s=a;s<i;s++){var c=e.charCodeAt(s);if(c!==Z&&c!==Q&&c!==_3&&c!==D3&&c!==H3){o=!1;break}}if(o){for(var l=a-1;l>0&&e.charCodeAt(l-1)!==l3;)l--;e.charCodeAt(l)===H3&&(e=e.slice(0,l).trimEnd())}}var u=e.trim(),d=u.lastIndexOf(`
258
+ `),f=d===-1?u:u.slice(d+1);if(f.length>0&&f.charCodeAt(0)===H3){for(var p=!1,m=!1,h=1;h<f.length;h++){var g=f.charCodeAt(h);g===H3&&(p=!0),g===_3&&(m=!0)}p&&m&&(e=d===-1?``:e.slice(0,e.lastIndexOf(f)).trimEnd())}for(var _=-1,v=-1,y=-1,b=e.length-1;b>=0;b--)if(e.charCodeAt(b)===S3){var x=b+1<e.length?e.charCodeAt(b+1):0;if(x>=X3&&x<=Z3||x>=Q3&&x<=$3){for(var S=b+2;S<e.length;){var C=e.charCodeAt(S);if(C>=X3&&C<=Z3||C>=Q3&&C<=$3||C>=J3&&C<=Y3)S++;else break}for(var w=S;w<e.length&&e.charCodeAt(w)!==m3;)w++;if(w<e.length&&e.charCodeAt(w-1)!==R3){for(var T=!1,E=w+1;E<e.length;E++)if(e.charCodeAt(E)===S3){T=!0;break}T||(_=b,v=S,y=w+1)}}break}if(_>=0){for(var D=0,O=0;O<_;O++)e.charCodeAt(O)===u3&&D++;if(D%2==0){var k=e.slice(_+1,v);l8(e,`</`+k,0)===-1&&(e=e.slice(0,_)+e.slice(y))}}for(var A=e.length;A>0&&e.charCodeAt(A-1)===l3;)A--;if(A>0){for(var j=A;j>0&&e.charCodeAt(j-1)!==l3;)j--;for(var M=j,N=0;M<A&&e.charCodeAt(M)===Z&&N<3;)M++,N++;if(j>0&&M<A&&ege(e,M,A)){for(var P=j-1,F=P;F>0&&e.charCodeAt(F-1)!==l3;)F--;t8(e,F,P)||(e=e.slice(0,j).trimEnd())}}var I=e.length;if(I>0){for(var L=e.lastIndexOf(`
259
+ `),ee=L===-1?0:L+1,te=I,ne=ee,R=0;ne<te&&e.charCodeAt(ne)===Z&&R<3;)ne++,R++;if(ne<te){var z=e.charCodeAt(ne),B=!1;if(z===b3||z===_3||z===V3){var re=ne+1;if(re>=te||e.charCodeAt(re)===Z||e.charCodeAt(re)===Q){for(var ie=re;ie<te&&(e.charCodeAt(ie)===Z||e.charCodeAt(ie)===Q);)ie++;ie>=te&&(B=!0)}}else if(z>=J3&&z<=Y3){for(var ae=ne;ae<te&&e.charCodeAt(ae)>=J3&&e.charCodeAt(ae)<=Y3;)ae++;if(ae<te&&(e.charCodeAt(ae)===L3||e.charCodeAt(ae)===K3)){var oe=ae+1;if(oe>=te||e.charCodeAt(oe)===Z||e.charCodeAt(oe)===Q){for(var se=oe;se<te&&(e.charCodeAt(se)===Z||e.charCodeAt(se)===Q);)se++;se>=te&&(B=!0)}}}B&&(e=e.slice(0,ee).trimEnd())}}}if(t.inline)return T8(e,0,e.length,t,n);let ce=[],le=0,ue=e.length;if(le===0&&!n.disableFrontmatter&&e.startsWith(`---`)){let t=Ehe(e);if(t&&t.hasValidYaml){if(n.preserveFrontmatter!==!1){let n=e.slice(0,t.endPos).trimEnd();ce.push({type:$.frontmatter,text:n})}le=t.endPos}}for(;le<ue;){for(var de=e.indexOf(`
260
+ `,le),fe=de<0?ue:de;le<ue&&t8(e,le,fe);)le=fe<ue?fe+1:fe,le<ue&&(de=e.indexOf(`
261
+ `,le),fe=de<0?ue:de);if(le>=ue)break;var pe=e.charCodeAt(le)===q3;e8(e,le,fe);let r=null;if(W6=e,G6=le,K6=fe,!pe&&Q6>=4&&!t.inHTML)r=nge(e,le);else if(!pe){let i=le+$6,a=e.charCodeAt(i);a===h3?r=$he(e,le,t,n):a===m3?r=rge(e,le,t,n):a===u3||a===d3?r=tge(e,le,t):a===_3||a===b3||a===x3?(r=n8(e,le),!r&&(r=o8(e,le,t,n))):a===V3||a>=J3&&a<=Y3?r=o8(e,le,t,n):a===S3?r=f8(e,le,t,n):a===H3?r=m8(e,le,t,n):a===f3&&(r=sge(e,le,t))}if(!r){for(var me=!1,V=le;V<fe;V++)if(e.charCodeAt(V)===H3){me=!0;break}me&&(r=m8(e,le,t,n))}if(r||=lge(e,le,t,n),r)r.node.type!==$.refCollection&&ce.push(r.node),le=r.end;else{var he=e.indexOf(`
262
+ `,le);le=he<0?ue:he+1}}return t.j=r,ce}function Cge(e,t,n,r){var i=I6(e,t);return i?{tagName:i.tag,tagLower:i.tag.toLowerCase(),attrs:i.rawAttrs,whitespaceBeforeAttrs:i.whitespaceBeforeAttrs,isSelfClosing:i.selfClosing,hasSpaceBeforeSlash:i.hasSpaceBeforeSlash,isClosing:i.isClosing,hasNewline:i.whitespaceBeforeAttrs.includes(`
263
+ `)||i.rawAttrs.includes(`
264
+ `),endPos:i.end}:null}function D8(e,t,n){w8=0,e=Fhe(e),!t.refs&&(t.refs={}),(n.optimizeForStreaming||t.inline)&&(t.m=Qhe(e,t.refs,n));var r=!t.k;r&&(t.k=[],t.h=[]);let i=E8(e,t,n);if(r){for(var a=t.k,o={inline:t.inline,inAnchor:t.inAnchor,inHTML:t.inHTML,htmlDepth:t.c,inList:t.inList,inBlockQuote:t.inBlockQuote,noSetext:t.f,depth:t.j},s=0;s<a.length;s++){var c=a[s];t.inline=c.inline,t.inAnchor=c.inAnchor,t.inHTML=c.inHTML,t.c=c.htmlDepth,t.inList=c.inList,t.inBlockQuote=c.inBlockQuote,t.f=c.noSetext,t.j=c.depth,t.e=c.breaks;var l=T8(c.text,0,c.text.length,t,n);t.e=!1;for(var u=0;u<l.length;u++)c.dest.push(l[u])}t.inline=o.inline,t.inAnchor=o.inAnchor,t.inHTML=o.inHTML,t.c=o.htmlDepth,t.inList=o.inList,t.inBlockQuote=o.inBlockQuote,t.f=o.noSetext,t.j=o.depth;for(var d=t.h,f=0;f<d.length;f++)for(var p=d[f],m=0;m<p.src.length;m++){var h=p.src[m];if(p.unwrap&&h.type===$.paragraph)for(var g=h.children,_=0;_<g.length;_++)p.dest.push(g[_]);else p.dest.push(h)}t.k=void 0,t.h=void 0}return b6(t.refs)?[{type:$.refCollection,refs:t.refs},...i]:i}var O8;try{O8=b.createElement(`div`).$$typeof}catch{O8=Symbol.for(`react.transitional.element`)}function k8(e,t,n){return{$$typeof:O8,type:e,key:n==null?null:``+n,ref:null,props:t,_owner:null,_store:{},_debugStack:null,_debugTask:null}}var wge=typeof b.createContext<`u`?b.createContext(void 0):void 0;function A8(e,t,n,r,i,a,o,s,c){switch(e.type){case $.blockQuote:{let i={key:n.key};return e.alert&&(i.className=`markdown-alert-`+a(e.alert.toLowerCase(),l6),e.children.unshift(Lhe(e.alert))),r(`blockquote`,i,t(e.children,n))}case $.breakLine:return r(`br`,{key:n.key});case $.breakThematic:return r(`hr`,{key:n.key});case $.frontmatter:return s.preserveFrontmatter?r(`pre`,{key:n.key},e.text):null;case $.codeBlock:let f=e.lang?r6(e.lang):``;return r(`pre`,{key:n.key},r(`code`,{...n6(e.attrs),className:f?`language-${f} lang-${f}`:``},e.text));case $.codeInline:return r(`code`,{key:n.key},e.text);case $.footnoteReference:return r(`a`,{key:n.key,href:i(e.target,`a`,`href`)||void 0},r(`sup`,null,e.text));case $.gfmTask:return r(`input`,{checked:e.completed,key:n.key,readOnly:!0,type:`checkbox`});case $.heading:return r(`h${e.level}`,{id:e.id,key:n.key},t(e.children,n));case $.htmlBlock:{let f=e;if(s.tagfilter&&E6(f.tag))return r(`span`,{key:n.key},`<`+f.tag+C6(f.attrs)+`>`);if(f.a&&f.d){let r=f.tag.toLowerCase(),p=Xhe(r),m=f.children&&f.children.length>0;if(p){let t=Vhe(f.a,r,s.tagfilter);return/<[a-z][^>]{0,100}>/i.test(f.a)?c(e.tag,{key:n.key,...n6(e.attrs),dangerouslySetInnerHTML:{__html:t}}):c(e.tag,{key:n.key,...n6(e.attrs)},t)}let h=RegExp(`^<${f.tag}(\\s|>)`,`i`);if(m&&!h.test(f.a)&&s.tagfilter&&Khe(f.a))return c(e.tag,{key:n.key,...n6(e.attrs)},t(f.children,n));if(Zhe(f.a)){let t=s.tagfilter?D6(f.a):f.a;return c(e.tag,{key:n.key,...n6(e.attrs),dangerouslySetInnerHTML:{__html:t}})}let g={slugify:e=>a(e,l6),sanitizer:i,tagfilter:!0},_=f.a.replace(/>\s+</g,`><`).replace(/\n+/g,` `).trim();if(RegExp(`^<${f.tag}(\\s[^>]*)?>(\\s*</${f.tag}>)?$`,`i`).test(_))return f.children&&f.children.length>0?c(e.tag,{key:n.key,...n6(e.attrs)},t(f.children,n)):c(e.tag,{key:n.key,...n6(e.attrs)});let v=D8(_,{inline:!1,refs:o,inHTML:!1},g);S6(v);let y=f.tag.toLowerCase(),x=`</`+y+`>`,S=h.test(_),C=_.toLowerCase().trimEnd().endsWith(x),w=S&&C;if(w&&m)return c(e.tag,{key:n.key,...n6(e.attrs)},t(f.children,n));if(w)return t(v.flatMap(x6),n);var l=Bhe(v,y);if(l.found&&l.afterClose.length>0){var u=l.beforeClose.flatMap(x6),d=l.afterClose.flatMap(x6);return k8(b.Fragment,{children:[c(e.tag,{key:n.key,...n6(e.attrs)},t(u,n)),t(d,n)]},n.key)}return c(e.tag,{key:n.key,...n6(e.attrs)},t(v.flatMap(x6),n))}return f6(e.tag)?c(e.tag,{key:n.key,...n6(e.attrs)}):c(e.tag,{key:n.key,...n6(e.attrs)},e.children?t(e.children,n):``)}case $.htmlSelfClosing:{let t=e;return s.tagfilter&&E6(t.tag)?r(`span`,{key:n.key},`<`+t.tag+C6(t.attrs)+` />`):c(e.tag,{key:n.key,...n6(e.attrs)})}case $.image:{let t=e.target==null?null:i(e.target,`img`,`src`);return r(`img`,{key:n.key,alt:e.alt&&e.alt.length>0?e.alt:void 0,title:e.title||void 0,src:t||void 0})}case $.link:{let i={key:n.key};return e.target!=null&&(i.href=Uhe(e.target)),e.title&&(i.title=e.title),r(`a`,i,t(e.children,n))}case $.table:{let i=e;return r(`table`,{key:n.key},r(`thead`,{key:`thead`},r(`tr`,null,i.header.map(function(e,a){return r(`th`,{key:a,style:i.align[a]==null?{}:{textAlign:i.align[a]}},t(e,n))}))),i.cells.length>0&&r(`tbody`,{key:`tbody`},i.cells.map(function(e,a){return r(`tr`,{key:a},e.map(function(e,a){return r(`td`,{key:a,style:i.align[a]==null?{}:{textAlign:i.align[a]}},t(e,n))}))})))}case $.text:return e.text;case $.textFormatted:return r(e.tag,{key:n.key},t(e.children,n));case $.orderedList:case $.unorderedList:return r(e.type===$.orderedList?`ol`:`ul`,{key:n.key,start:e.type===$.orderedList?e.start:void 0},e.items.map(function(e,i){return r(`li`,{key:i},t(e,n))}));case $.paragraph:return r(`p`,{key:n.key},t(e.children,n));case $.ref:return null;default:return null}}var Tge=(e,t,n,r,i,a,o)=>{var s=e=>e.map(function(e){return`text`in e?e.text:``}),c=(l,u={})=>{var d=(u.renderDepth||0)+1;if(d>2500)return s(l);u.renderDepth=d;for(var f=u.key,p=[],m=!1,h=0;h<l.length;h++){u.key=h;var g=e?e(A8.bind(null,l[h],c,u,t,n,r,i,a,o),l[h],c,u):A8(l[h],c,u,t,n,r,i,a,o),_=typeof g==`string`;if(_&&m)p[p.length-1]+=g;else if(g!==null)if(Array.isArray(g))for(var v=0;v<g.length;v++)p.push(g[v]);else p.push(g);m=_}return u.key=f,u.renderDepth=d-1,p};return c},Ege=(e,t)=>{let n=w6(t,e,void 0);return n?typeof n==`function`||typeof n==`object`&&`render`in n?n:w6(t,`${e}.component`,e):e};function Dge(e,t){let n={...t||{}};n.overrides=n.overrides||{};let r=n.slugify||l6,i=n.sanitizer||a6,a=n.createElement,o=b6(n.overrides),s=e=>j8(e,{...n,wrapper:null});function c(e){for(var t in e){var n=e[t];if(typeof n==`string`&&n.length>0&&n.charCodeAt(0)===S3&&(qhe.test(n)||Jhe.test(n)||Cge(n,0))){var r=s(n.trim());e[t]=t===`innerHTML`&&Array.isArray(r)?r[0]:r}}}function l(e,t,...r){var i=t||{},s=e;if(o){var c=w6(n.overrides,e+`.props`,{});s=Ege(e,n.overrides),i={...i,...c,className:Whe(i.className,c.className)||void 0}}if(!a){var l=i.key;return l!=null&&delete i.key,r.length===1?i.children=r[0]:r.length>1&&(i.children=r),k8(s,i,l)}return a(s,i,...r)}function u(e,t,...n){return t&&c(t),l(e,t,...n)}let d={...n,slugify:n.slugify?e=>n.slugify(e,l6):l6,sanitizer:i,tagfilter:n.tagfilter!==!1},f=e[0]&&e[0].type===$.refCollection?e[0].refs:{},p=Tge(n.renderRule,l,i,r,f,n,u),m=p(e,{inline:n.forceInline,refs:f}),h=Hhe(f);if(h.length&&m.push(l(`footer`,{key:`footer`},h.map(function(e){let t=e.identifier.charCodeAt(0)===p3?e.identifier.slice(1):e.identifier,n=D8(e.footnote,{inline:!0,refs:f},d);return l(`div`,{id:r(t,l6),key:e.identifier},t+`: `,p(n,{inline:!0,refs:f}))}))),n.wrapper===null)return m;let g=n.wrapper||(n.forceInline?`span`:`div`),_;if(m.length>1||n.forceWrapper)_=m;else return m.length===1?m[0]:null;var v=n.wrapperProps?{...n.wrapperProps}:{};return v.children=_,k8(g,v,`outer`)}function j8(e=``,t={}){let n={...t||{}};n.overrides=n.overrides||{},n.slugify;let r=n.sanitizer||a6;function i(e){let t=n.forceInline||!n.forceBlock&&!Ahe.test(e),i={...n,slugify:n.slugify?e=>n.slugify(e,l6):l6,sanitizer:r,tagfilter:n.tagfilter!==!1},o=t?e:zhe(e);if(n.optimizeForStreaming){var s=o.lastIndexOf(`<`);s!==-1&&o.indexOf(`>`,s)===-1&&(o=o.slice(0,s))}return Dge(D8(o,{inline:t,refs:a},i),{...i,forceInline:t})}let a={};return i(e)}function Oge(e){let t=b.useRef(e),n=t.current;if(n!==e){var r=!0,i=0;for(var a in e)if(i++,!Object.is(n[a],e[a])){r=!1;break}if(r){var o=0;for(var s in n)o++;r=o===i}r||(t.current=e)}return t.current}var M8=({children:e,options:t,...n})=>{if(!(typeof b.useContext<`u`)){let r={...t,overrides:{...t?.overrides},wrapperProps:{...t?.wrapperProps,...n}};return j8(e??``,r)}let r=b.useContext(wge),i=Oge(n),a=b.useMemo(()=>({...r,...t,overrides:{...r?.overrides,...t?.overrides},wrapperProps:{...r?.wrapperProps,...t?.wrapperProps,...i}}),[r,t,i]),o=e??``;return b.useMemo(()=>j8(o,a),[o,a])},N8=Symbol(`remove-this-key`),P8=Symbol(`reset`);function kge(e,t){return Array.isArray(e.required)&&e.required.includes(t)}function Age(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(H4.NewStringDefault)}}function jge(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=z4(L4(m,x,t.path)),T=(0,b.useCallback)((e,t,n,r)=>{let i=e;e===void 0&&_&&(i=``),s(i,t,n,r)},[s,_]),E=(0,b.useCallback)(e=>{m!==e&&y(!0),h(m,e)},[m,h]);return(0,H.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})}var Mge=(0,b.memo)(jge);function Nge(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=(0,b.useRef)(r);S.current=r;let C=(0,b.useMemo)(()=>_.retrieveSchema(t,r,!0),[_,t,r]),w=(0,b.useMemo)(()=>Y1(n,y),[n,y]),{properties:T={}}=C,E=e.childFieldPathId??a,D=(0,b.useRef)({previousKey:``,currentKey:void 0}),O=w.title??C.title??h??o,k=w.description??C.description,A=P4(m,C,s,n),j=T4(r),M=[],N=(0,b.useCallback)((e,t)=>{let{duplicateKeySuffixSeparator:r=`-`}=Y1(n,y),i=0,a=e;for(;dD(t,a);)i+=1,a=`${e}${r}${i}`;return a},[n,y]),P=(0,b.useCallback)(()=>{if(!(C.additionalProperties||C.patternProperties))return;let e={...r},t=N(`newKey`,e);if(C.patternProperties)qD(e,t,null);else{let n,i,a;if(jC(C.additionalProperties)){n=C.additionalProperties.type,i=C.additionalProperties.const,a=C.additionalProperties.default;let e=C.additionalProperties;`$ref`in e&&(e=_.retrieveSchema({[B1]:e[B1]},r),n=e.type,i=e.const,a=_.getDefaultFormState(e,a)),!n&&(`anyOf`in e||`oneOf`in e)&&(n=`object`)}qD(e,t,i??a??Age(v,n))}D.current.previousKey===t&&(D.current.currentKey=t,D.current.previousKey=N(t,e)),p(e,E.path)},[r,p,v,_,E,N,C]),F=(0,b.useCallback)((e,t)=>{if(e!==t){let n=S.current,r=N(t,n),i={...n},a={[e]:r},o=Object.keys(i).map(e=>({[Object.hasOwn(a,e)?a[e]:e]:i[e]})),s=Object.assign({},...o);S.current=s,e!==D.current.currentKey&&(D.current.previousKey=e),D.current.currentKey=r,p(s,E.path)}},[p,E,N]),I=(0,b.useCallback)(e=>{p(N8,[...E.path,e])},[p,E]),L=(0,b.useCallback)(e=>D.current.currentKey===e?D.current.previousKey:e,[]);if(!A||j)try{M=Tme(Object.keys(T),w.order)}catch(e){return(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`p`,{className:`rjsf-config-error`,style:{color:`red`},children:(0,H.jsx)(M8,{options:{disableParsingRawHTML:!0},children:v(H4.InvalidObjectField,[o||`root`,e.message])})}),(0,H.jsx)(`pre`,{children:JSON.stringify(C)})]})}let ee=s4(`ObjectFieldTemplate`,m,w),te=A?(0,H.jsx)(x,{...e,fieldPathId:E,schema:C}):void 0;return(0,H.jsx)(ee,{title:w.label===!1?``:O,description:w.label===!1?void 0:k,properties:M.map(e=>{let t=!!C.properties?.[e]?.[O1],a=t?n.additionalProperties:n[e],o=Y1(a).widget===`hidden`;return{content:(0,H.jsx)(Mge,{propertyName:e,required:kge(C,e),schema:Y(C,[L1,e],{}),uiSchema:a,errorSchema:Y(i,[e]),fieldPathId:E,formData:Y(r,[e]),handleKeyRename:F,handleRemoveProperty:I,addedByAdditionalProperties:t,onChange:p,onBlur:d,onFocus:f,registry:m,disabled:c,readonly:l,hideError:u},L(e)),name:e,readonly:l,disabled:c,required:s,hidden:o}}),readonly:l,disabled:c,required:s,fieldPathId:a,uiSchema:n,errorSchema:i,schema:C,formData:r,registry:m,optionalDataControl:te,className:A?`rjsf-optional-object-field`:void 0,onAddProperty:P})}function Pge(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=s4(`OptionalDataControlsTemplate`,l,Y1(n,u)),m=T4(r),h,g,_,v;return i||a?(h=w4(c,`Msg`),g=m?void 0:f(H4.OptionalObjectEmptyMsg)):(g=f(m?H4.OptionalObjectRemove:H4.OptionalObjectAdd),m?(h=w4(c,`Remove`),v=()=>o(void 0,c.path,s)):(h=w4(c,`Add`),_=()=>{let e=d.getDefaultFormState(t,r,`excludeObjectChildren`);e===void 0&&(e=x0(t)===`array`?[]:{}),o(e,c.path,s)})),g&&(0,H.jsx)(p,{id:h,registry:l,schema:t,uiSchema:n,label:g,onAddClick:_,onRemoveClick:v})}var Fge={array:`ArrayField`,boolean:`BooleanField`,integer:`NumberField`,number:`NumberField`,object:`ObjectField`,string:`StringField`,null:`NullField`};function Ige(e,t,n){let{field:r}=t,{fields:i,schemaUtils:a}=n;if(typeof r==`function`)return r;if(typeof r==`string`&&r in i)return i[r];let o=x0(e),s=Array.isArray(o)?o[0]:o||``,c=e.$id,l=Fge[s];return c&&c in i&&(l=c),(e.anyOf||e.oneOf)&&!a.isSelect(e)&&l!==`ObjectField`?()=>null:l in i?i[l]:i.FallbackField}function Lge(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,CyclicSchemaField:x}=_,S=n.$id,C=(0,b.useCallback)((e,t,n,r)=>s(e,t,n,r||S),[S,s]);if(t[H1])return(0,H.jsx)(x,{...e});let w=Eme(t,r,f),T=Y1(w,g),E=s4(`FieldTemplate`,f,T),D=s4(`DescriptionFieldTemplate`,f,T),O=s4(`FieldHelpTemplate`,f,T),k=s4(`FieldErrorTemplate`,f,T),A=m.retrieveSchema(t,i),j=Ige(A,T,f),M=A.deprecated?T.deprecatedHandling??`label`:void 0,N=!!(T.disabled??e.disabled)||M===`disable`,P=!!(T.readonly??(e.readonly||e.schema.readOnly||A.readOnly)),F=T.hideError,I=F===void 0?e.hideError:!!F,L=!!(T.autofocus??e.autofocus);if(Object.keys(A).length===0)return null;let ee=m.getDisplayLabel(A,w,g),te=T.field&&T.fieldReplacesAnyOrOneOf===!0,ne,R,z={fieldPathId:n};if((`anyOf`in A||`oneOf`in A)&&!te&&!m.isSelect(A)){A.anyOf?(ne=v,R=A[A1].map(e=>m.retrieveSchema(jC(e)?e:{},i))):A.oneOf&&(ne=y,R=A[I1].map(e=>m.retrieveSchema(jC(e)?e:{},i)));let e=P4(f,A,d,w),t=T4(i);ee&&=!e||t,z={childFieldPathId:n,fieldPathId:L4(`XxxOf`,h,n)}}let{__errors:B,...re}=a||{},ie=zD(w,[`ui:classNames`,`classNames`,`ui:style`]);`ui:options`in ie&&(ie[q1]=zD(ie[q1],[`classNames`,`style`]));let ae=(0,H.jsx)(j,{...e,onChange:C,...z,schema:A,uiSchema:ie,disabled:N,readonly:P,hideError:I,autofocus:L,errorSchema:re,rawErrors:B}),oe=n.$id,se;se=p||O1 in A?o:T.title||e.schema.title||A.title||e.title||o,M===`label`&&(se=f.translateString(H4.DeprecatedLabel,[se]));let ce=T.description||e.schema.description||A.description||``,{help:le}=T,ue=T.widget===`hidden`||M===`hide`,de=[`rjsf-field`,`rjsf-field-${x0(A)}`];!I&&B&&B.length>0&&de.push(`rjsf-field-error`),T.classNames&&de.push(T.classNames);let fe=(0,H.jsx)(O,{help:le,fieldPathId:n,schema:A,uiSchema:w,hasErrors:!I&&B&&B.length>0,registry:f}),pe=I||ne&&!m.isSelect(A)?void 0:(0,H.jsx)(k,{errors:B,errorSchema:a,fieldPathId:n,schema:A,uiSchema:w,registry:f});return(0,H.jsx)(E,{description:(0,H.jsx)(D,{id:g4(oe),description:ce,schema:A,uiSchema:w,registry:f}),rawDescription:ce,help:fe,rawHelp:typeof le==`string`?le:void 0,errors:pe,rawErrors:I?void 0:B,fieldPathId:n,id:oe,label:se,hidden:ue,onChange:s,onKeyRename:c,onKeyRenameBlur:l,onRemoveProperty:u,required:d,disabled:N,readonly:P,hideError:I,displayLabel:ee,classNames:de.join(` `).trim(),style:T.style,formData:i,schema:A,uiSchema:w,registry:f,children:(0,H.jsxs)(H.Fragment,{children:[ae,ne&&(0,H.jsx)(ne,{name:o,disabled:N,readonly:P,hideError:I,errorSchema:a,formData:i,fieldPathId:n,onBlur:e.onBlur,onChange:e.onChange,onFocus:e.onFocus,options:R,registry:f,required:d,schema:A,uiSchema:w})]})})}var Rge=(0,b.memo)(Lge,(e,t)=>{let{experimental_componentUpdateStrategy:n=`customDeep`}=t.registry.globalFormOptions;return n===`always`?!1:n===`shallow`?M4(e,t):u0(e,t)});function zge(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)?T2(t,r):void 0,w=C?`select`:`text`;v&&Sme(t,v,y)&&(w=v);let{widget:T=w,placeholder:E=``,title:D,...O}=Y1(r),k=x.getDisplayLabel(t,r,S),A=D??g??_??n,j=d4(t,T,y),M=(0,b.useCallback)((e,t,n)=>u(e,i.path,t,n),[u,i]);return(0,H.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 Bge(){return{AnyOfField:o3,ArrayField:Yme,BooleanField:Xme,CyclicSchemaField:Zme,FallbackField:the,LayoutGridField:r3,LayoutHeaderField:mhe,LayoutMultiSchemaField:hhe,NumberField:yhe,ObjectField:Nge,OneOfField:o3,OptionalDataControlsField:Pge,SchemaField:Rge,StringField:zge,NullField:ghe}}function Vge(e){let{fieldPathId:t,description:n,registry:r,schema:i,uiSchema:a}=e,o=Y1(a,r.globalUiOptions),{label:s=!0}=o;return!n||!s?null:(0,H.jsx)(s4(`DescriptionFieldTemplate`,r,o),{id:g4(t),description:n,schema:i,uiSchema:a,registry:r})}function Hge(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,H.jsxs)(H.Fragment,{children:[(i||r)&&(0,H.jsx)(g,{id:C4(o,`moveUp`),className:`rjsf-array-item-move-up`,disabled:t||d||!i,onClick:u,uiSchema:p,registry:f}),(i||r)&&(0,H.jsx)(h,{id:C4(o,`moveDown`),className:`rjsf-array-item-move-down`,disabled:t||d||!r,onClick:l,uiSchema:p,registry:f}),n&&(0,H.jsx)(m,{id:C4(o,`copy`),className:`rjsf-array-item-copy`,disabled:t||d,onClick:s,uiSchema:p,registry:f}),a&&(0,H.jsx)(_,{id:C4(o,`remove`),className:`rjsf-array-item-remove`,disabled:t||d,onClick:c,uiSchema:p,registry:f})]})}function Uge(e){let{children:t,className:n,buttonsProps:r,displayLabel:i,hasDescription:a,hasToolbar:o,registry:s,uiSchema:c}=e,l=s4(`ArrayFieldItemButtonsTemplate`,s,Y1(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,H.jsxs)(`div`,{className:n,style:f,children:[(0,H.jsx)(`div`,{className:o?`col-xs-9 col-md-10 col-xl-11`:`col-xs-12`,children:t}),o&&(0,H.jsx)(`div`,{className:`col-xs-3 col-md-2 col-xl-1 array-item-toolbox`,children:(0,H.jsx)(`div`,{className:`btn-group`,style:p,children:(0,H.jsx)(l,{...r,style:u})})})]})}function Wge(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=Y1(a),h=s4(`ArrayFieldDescriptionTemplate`,u,m),g=s4(`ArrayFieldTitleTemplate`,u,m),_=!l&&!r,{ButtonTemplates:{AddButton:v}}=u.templates;return(0,H.jsxs)(`fieldset`,{className:n,id:i.$id,children:[(0,H.jsx)(g,{fieldPathId:i,title:m.title||p,required:d,schema:f,uiSchema:a,registry:u,optionalDataControl:_?s:void 0}),(0,H.jsx)(h,{fieldPathId:i,description:m.description||f.description,schema:f,uiSchema:a,registry:u}),_?void 0:s,(0,H.jsx)(`div`,{className:`row array-item-list`,children:o}),t&&(0,H.jsx)(v,{id:C4(i,`add`),className:`rjsf-array-item-add`,onClick:c,disabled:r||l,uiSchema:a,registry:u})]})}function Gge(e){let{fieldPathId:t,title:n,schema:r,uiSchema:i,required:a,registry:o,optionalDataControl:s}=e,c=Y1(i,o.globalUiOptions),{label:l=!0}=c;return!n||!l?null:(0,H.jsx)(s4(`TitleFieldTemplate`,o,c),{id:b4(t),title:n,required:a,schema:r,uiSchema:i,registry:o,optionalDataControl:s})}function F8(e){let{id:t,schema:n}=e,{examples:r,default:i}=n;return Array.isArray(r)?(0,H.jsx)(`datalist`,{id:v4(t),children:r.concat(i!==void 0&&!r.map(String).includes(String(i))?[i]:[]).map(e=>(0,H.jsx)(`option`,{value:e},String(e)))},`datalist_${t}`):null}function Kge(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,...r4(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?.value),[c,t]),D=(0,b.useCallback)(({target:e})=>l(t,e?.value),[l,t]),O=(0,b.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),u(f.emptyValue??``)},[u,f.emptyValue]);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`input`,{id:t,name:r||t,className:`form-control`,readOnly:a,disabled:o,autoFocus:s,value:w,...C,list:p.examples?v4(t):void 0,onChange:d||T,onBlur:E,onFocus:D,"aria-describedby":x4(t,!!p.examples)}),f.allowClearTextInputs&&!a&&!o&&w&&(0,H.jsx)(S,{registry:h,onClick:O}),(0,H.jsx)(F8,{id:t,schema:p})]})}function qge(e){let{iconType:t=`default`,icon:n,className:r,uiSchema:i,registry:a,...o}=e;return(0,H.jsx)(`button`,{type:`button`,className:`btn btn-${t} ${r}`,...o,children:(0,H.jsx)(`i`,{className:`glyphicon glyphicon-${n}`})})}var I8=(0,b.memo)(qge);function Jge(e){let{registry:{translateString:t}}=e;return(0,H.jsx)(I8,{title:t(H4.CopyButton),...e,icon:`copy`})}var Yge=(0,b.memo)(Jge);function Xge(e){let{registry:{translateString:t}}=e;return(0,H.jsx)(I8,{title:t(H4.MoveDownButton),...e,icon:`arrow-down`})}var Zge=(0,b.memo)(Xge);function Qge(e){let{registry:{translateString:t}}=e;return(0,H.jsx)(I8,{title:t(H4.MoveUpButton),...e,icon:`arrow-up`})}var $ge=(0,b.memo)(Qge);function e_e(e){let{registry:{translateString:t}}=e;return(0,H.jsx)(I8,{title:t(H4.RemoveButton),...e,iconType:`danger`,icon:`remove`})}var t_e=(0,b.memo)(e_e);function n_e({id:e,className:t,onClick:n,disabled:r,registry:i,...a}){let{translateString:o}=i;return(0,H.jsx)(I8,{id:e,iconType:`default`,icon:`remove`,className:`btn-clear col-xs-12`,title:o(H4.ClearButton),onClick:n,disabled:r,registry:i,...a})}var r_e=(0,b.memo)(n_e);function i_e({id:e,className:t,onClick:n,disabled:r,registry:i}){let{translateString:a}=i;return(0,H.jsx)(`div`,{className:`row`,children:(0,H.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,H.jsx)(I8,{id:e,iconType:`info`,icon:`plus`,className:`btn-add col-xs-12`,title:a(H4.AddButton),onClick:n,disabled:r,registry:i})})})}function a_e({uiSchema:e}){let{submitText:t,norender:n,props:r={}}=o4(e);return n?null:(0,H.jsx)(`div`,{children:(0,H.jsx)(`button`,{type:`submit`,...r,className:`btn btn-info ${r.className||``}`,children:t})})}function o_e(){return{SubmitButton:a_e,AddButton:i_e,CopyButton:Yge,MoveDownButton:Zge,MoveUpButton:$ge,RemoveButton:t_e,ClearButton:r_e}}function s_e(e){let{name:t,fieldPathId:n,registry:r,onExpand:i}=e,{translateString:a}=r,o=`${n.$id}-button`;return(0,H.jsxs)(`div`,{style:{marginTop:`1rem`},children:[(0,H.jsx)(`div`,{className:`text-danger`,children:a(H4.CycleDetected,[t])}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`button`,{id:o,type:`button`,className:`btn btn-sm btn-warning`,onClick:()=>i(n.$id),children:a(H4.ExpandButton)}),` `]})]})}var L8=c4();function R8({description:e,registry:t,uiSchema:n={}}){let{globalUiOptions:r}=t;return Y1(n,r).enableMarkdownInDescription&&typeof e==`string`?(0,H.jsx)(M8,{options:{disableParsingRawHTML:!0},"data-testid":L8.markdown,children:e}):e}R8.TEST_IDS=L8;function c_e(e){let{id:t,description:n,registry:r,uiSchema:i}=e;return n?(0,H.jsx)(`div`,{id:t,className:`field-description`,children:(0,H.jsx)(R8,{description:n,registry:r,uiSchema:i})}):null}function l_e({errors:e,registry:t}){let{translateString:n}=t;return(0,H.jsxs)(`div`,{className:`panel panel-danger errors`,children:[(0,H.jsx)(`div`,{className:`panel-heading`,children:(0,H.jsx)(`h3`,{className:`panel-title`,children:n(H4.ErrorsLabel)})}),(0,H.jsx)(`ul`,{className:`list-group`,children:e.map((e,t)=>(0,H.jsx)(`li`,{className:`list-group-item text-danger`,children:e.stack},t))})]})}function u_e(e){let{schema:t,registry:n,typeSelector:r,schemaField:i}=e;return(0,H.jsx)(s4(`MultiSchemaFieldTemplate`,n),{selector:r,optionSchemaField:i,schema:t,registry:n})}function d_e(e){let{errors:t=[],fieldPathId:n}=e;return t.length===0?null:(0,H.jsx)(`div`,{children:(0,H.jsx)(`ul`,{id:_4(n),className:`error-detail bs-callout bs-callout-info`,children:t.filter(e=>!!e).map((e,t)=>(0,H.jsx)(`li`,{className:`text-danger`,children:e},t))})})}var z8=c4();function B8({help:e,registry:t,uiSchema:n={}}){let{globalUiOptions:r}=t;return Y1(n,r).enableMarkdownInHelp&&typeof e==`string`?(0,H.jsx)(M8,{options:{disableParsingRawHTML:!0},"data-testid":z8.markdown,children:e}):e}B8.TEST_IDS=z8;function f_e(e){let{fieldPathId:t,help:n,uiSchema:r,registry:i}=e;return n?(0,H.jsx)(`div`,{id:y4(t),className:`help-block`,children:(0,H.jsx)(B8,{help:n,registry:i,uiSchema:r})}):null}var p_e=`*`;function V8(e){let{label:t,required:n,id:r}=e;return t?(0,H.jsxs)(`label`,{className:`control-label`,htmlFor:r,children:[t,n&&(0,H.jsx)(`span`,{className:`required`,children:p_e})]}):null}function m_e(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=Y1(d),p=s4(`WrapIfAdditionalTemplate`,u,f);if(s)return(0,H.jsx)(`div`,{className:`hidden`,children:r});let m=f.widget===`checkbox`;return(0,H.jsxs)(p,{...e,children:[l&&!m&&(0,H.jsx)(V8,{label:n,required:c,id:t}),l&&o?o:null,r,i,a]})}var h_e=m_e;function g_e(e){let{children:t,column:n,className:r,...i}=e;return(0,H.jsx)(`div`,{className:r,...i,children:t})}function __e(e){let{selector:t,optionSchemaField:n}=e;return(0,H.jsxs)(`div`,{className:`panel panel-default panel-body`,children:[(0,H.jsx)(`div`,{className:`form-group`,children:t}),n]})}function v_e(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=Y1(m),g=s4(`TitleFieldTemplate`,u,h),_=s4(`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,H.jsxs)(`fieldset`,{className:t,id:a.$id,children:[p&&(0,H.jsx)(g,{id:b4(a),title:p,required:d,schema:f,uiSchema:m,registry:u,optionalDataControl:v?s:void 0}),n&&(0,H.jsx)(_,{id:g4(a),description:n,schema:f,uiSchema:m,registry:u}),v?void 0:s,c.map(e=>e.content),X1(f,m,i)&&(0,H.jsx)(y,{id:C4(a,`add`),className:`rjsf-object-property-expand`,onClick:o,disabled:r||l,uiSchema:m,registry:u})]})}function y_e(e){let{id:t,registry:n,label:r,onAddClick:i,onRemoveClick:a}=e;return i?(0,H.jsx)(I8,{id:t,registry:n,icon:`plus`,className:`rjsf-add-optional-data btn-sm`,onClick:i,title:r}):a?(0,H.jsx)(I8,{id:t,registry:n,icon:`remove`,className:`rjsf-remove-optional-data btn-sm`,onClick:a,title:r}):(0,H.jsx)(`em`,{id:t,children:r})}var b_e=`*`;function x_e(e){let{id:t,title:n,required:r,optionalDataControl:i}=e;return(0,H.jsxs)(`legend`,{id:t,children:[n,r&&(0,H.jsx)(`span`,{className:`required`,children:b_e}),i&&(0,H.jsx)(`span`,{className:`pull-right`,style:{marginBottom:`2px`},children:i})]})}function S_e(e){let{schema:t,fieldPathId:n,reason:r,registry:i}=e,{translateString:a}=i,o=H4.UnsupportedField,s=[];return n?.$id&&(o=H4.UnsupportedFieldWithId,s.push(n.$id)),r&&(o=o===H4.UnsupportedField?H4.UnsupportedFieldWithReason:H4.UnsupportedFieldWithIdAndReason,s.push(r)),(0,H.jsxs)(`div`,{className:`unsupported-field`,children:[(0,H.jsx)(`p`,{children:(0,H.jsx)(M8,{options:{disableParsingRawHTML:!0},children:a(o,s)})}),t&&(0,H.jsx)(`pre`,{children:JSON.stringify(t,null,2)})]})}function C_e(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(H4.KeyLabel,[o]),S=O1 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,H.jsx)(`div`,{className:T,style:r,children:h});let E=C?46:26;return(0,H.jsx)(`div`,{className:T,style:r,children:(0,H.jsxs)(`div`,{className:`row`,children:[(0,H.jsx)(`div`,{className:`col-xs-5 form-additional`,children:(0,H.jsxs)(`div`,{className:`form-group`,children:[a&&(0,H.jsx)(V8,{label:x,required:d,id:`${t}-key`}),a&&l&&(0,H.jsx)(`div`,{children:`\xA0`}),(0,H.jsx)(`input`,{className:`form-control`,type:`text`,id:`${t}-key`,onBlur:s,defaultValue:o},o)]})}),(0,H.jsx)(`div`,{className:`form-additional form-group col-xs-5`,children:h}),(0,H.jsx)(`div`,{className:`col-xs-2`,style:{marginTop:a?`${E}px`:void 0},children:(0,H.jsx)(b,{id:C4(t,`remove`),className:`rjsf-object-property-remove btn-block`,style:{border:`0`},disabled:i||u,onClick:c,uiSchema:g,registry:_})})]})})}function w_e(){return{ArrayFieldDescriptionTemplate:Vge,ArrayFieldItemTemplate:Uge,ArrayFieldItemButtonsTemplate:Hge,ArrayFieldTemplate:Wge,ArrayFieldTitleTemplate:Gge,ButtonTemplates:o_e(),BaseInputTemplate:Kge,CyclicSchemaExpandTemplate:s_e,DescriptionFieldTemplate:c_e,ErrorListTemplate:l_e,FallbackFieldTemplate:u_e,FieldTemplate:h_e,FieldErrorTemplate:d_e,FieldHelpTemplate:f_e,GridTemplate:g_e,MultiSchemaFieldTemplate:__e,ObjectFieldTemplate:v_e,OptionalDataControlsTemplate:y_e,TitleFieldTemplate:x_e,UnsupportedFieldTemplate:S_e,WrapIfAdditionalTemplate:C_e}}function T_e({time:e=!0,...t}){let{AltDateWidget:n}=t.registry.widgets;return(0,H.jsx)(n,{time:e,...t})}function E_e(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}=jme(e);return(0,H.jsxs)(`ul`,{className:`list-inline`,children:[d.map((e,i)=>(0,H.jsx)(`li`,{className:`list-inline-item`,children:(0,H.jsx)(Ame,{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`||!i.hideNowButton)&&(0,H.jsx)(`li`,{className:`list-inline-item`,children:(0,H.jsx)(`button`,{type:`button`,className:`btn btn-info btn-now`,onClick:m,children:u(H4.NowLabel)})}),(i.hideClearButton===`undefined`||!i.hideClearButton)&&(0,H.jsx)(`li`,{className:`list-inline-item`,children:(0,H.jsx)(`button`,{type:`button`,className:`btn btn-warning btn-clear`,onClick:p,children:u(H4.ClearLabel)})})]})}function D_e({id:e,disabled:t,options:n,value:r,autofocus:i=!1,readonly:a,onChange:o,onBlur:s,onFocus:c,htmlName:l}){let{inline:u=!1,enumOptions:d,enumDisabled:f,emptyValue:p}=n,m=i4(n),h=Array.isArray(r)?r:[r],g=(0,b.useCallback)(({target:t})=>s(e,Q2(t?.value,d,m,p)),[s,e,d,p,m]),_=(0,b.useCallback)(({target:t})=>c(e,Q2(t?.value,d,m,p)),[c,e,d,p,m]);return(0,H.jsx)(`div`,{className:`checkboxes`,id:e,children:Array.isArray(d)&&d.map((n,r)=>{let s=q2(n.value,h),c=Array.isArray(f)&&f.includes(n.value),p=t||c||a?`disabled`:``,v=(0,H.jsxs)(`span`,{children:[(0,H.jsx)(`input`,{type:`checkbox`,id:S4(e,r),name:l||e,checked:s,value:$2(n.value,r,m),disabled:t||c||a,autoFocus:i&&r===0,onChange:e=>{e.target.checked?o(X2(r,h,d)):o(K2(r,h,d))},onBlur:g,onFocus:_,"aria-describedby":x4(e)}),(0,H.jsx)(`span`,{children:n.label})]});return u?(0,H.jsx)(`label`,{className:`checkbox-inline ${p}`,children:v},String(n.value)):(0,H.jsx)(`div`,{className:`checkbox ${p}`,children:(0,H.jsx)(`label`,{children:v})},String(n.value))})})}function O_e({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=s4(`DescriptionFieldTemplate`,p,n),g=A4(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=Y1(t).widget===`checkbox`?void 0:n.description??e.description;return(0,H.jsxs)(`div`,{className:`checkbox ${a||o?`disabled`:``}`,children:[!c&&x&&(0,H.jsx)(h,{id:g4(r),description:x,schema:e,uiSchema:t,registry:p}),(0,H.jsxs)(`label`,{children:[(0,H.jsx)(`input`,{type:`checkbox`,id:r,name:m||r,checked:i!==void 0&&i,required:g,disabled:a||o,autoFocus:l,onChange:_,onBlur:v,onFocus:y,"aria-describedby":x4(r)}),E4((0,H.jsx)(`span`,{children:s}),c)]})]})}function k_e(e){let{disabled:t,readonly:n,options:r,registry:i}=e;return(0,H.jsx)(s4(`BaseInputTemplate`,i,r),{type:`color`,...e,disabled:t||n})}function A_e(e){let{onChange:t,value:n,options:r,registry:i}=e;return(0,H.jsx)(s4(`BaseInputTemplate`,i,r),{type:`datetime-local`,...e,value:Lme(n),onChange:e=>t(wme(e))})}function j_e(e){let{onChange:t,options:n,registry:r}=e,i=s4(`BaseInputTemplate`,r,n),a=(0,b.useCallback)(e=>t(e||void 0),[t]);return(0,H.jsx)(i,{type:`date`,...e,onChange:a})}function M_e(e){let{options:t,registry:n}=e;return(0,H.jsx)(s4(`BaseInputTemplate`,n,t),{type:`email`,...e})}function N_e({fileInfo:e,registry:t}){let{translateString:n}=t,{dataURL:r,type:i,name:a}=e;if(!r)return null;let o=n(H4.PreviewLabel);return[`image/jpeg`,`image/png`].includes(i)?(0,H.jsx)(`img`,{src:r,alt:o,style:{maxWidth:`100%`},className:`file-preview`}):(0,H.jsxs)(H.Fragment,{children:[` `,(0,H.jsx)(`a`,{download:`preview-${a}`,href:r,className:`file-download`,children:o})]})}function P_e({filesInfo:e,registry:t,preview:n,onRemove:r,options:i}){if(e.length===0)return null;let{translateString:a}=t,{RemoveButton:o}=s4(`ButtonTemplates`,t,i);return(0,H.jsx)(`ul`,{className:`file-info`,children:e.map((e,i)=>{let{name:s,size:c,type:l}=e;return(0,H.jsxs)(`li`,{children:[(0,H.jsx)(M8,{children:a(H4.FilesInfo,[s,l,String(c)])}),n&&(0,H.jsx)(N_e,{fileInfo:e,registry:t}),(0,H.jsx)(o,{onClick:()=>r(i),registry:t})]},i)})})}function F_e(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}=Ime(o,a,i),f=s4(`BaseInputTemplate`,c,s),p=e=>{e.target.files&&u(e.target.files)};return(0,H.jsxs)(`div`,{children:[(0,H.jsx)(f,{...e,disabled:t||n,type:`file`,required:!o&&r,onChangeOverride:p,value:``,accept:s.accept?String(s.accept):void 0}),(0,H.jsx)(P_e,{filesInfo:l,onRemove:d,registry:c,preview:s.filePreview,options:s})]})}function I_e({id:e,value:t,htmlName:n}){return(0,H.jsx)(`input`,{type:`hidden`,id:e,name:n||e,value:t===void 0?``:t})}function L_e(e){let{options:t,registry:n}=e;return(0,H.jsx)(s4(`BaseInputTemplate`,n,t),{type:`password`,...e})}function R_e({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=i4(e),g=(0,b.useCallback)(({target:e})=>o(l,Q2(e?.value,d,h,m)),[o,d,m,l,h]),_=(0,b.useCallback)(({target:e})=>s(l,Q2(e?.value,d,h,m)),[s,d,m,l,h]);return(0,H.jsx)(`div`,{className:`field-radio-group`,id:l,role:`radiogroup`,children:Array.isArray(d)&&d.map((e,o)=>{let s=q2(e.value,t),d=Array.isArray(f)&&f.includes(e.value),m=r||d||i?`disabled`:``,v=(0,H.jsxs)(`span`,{children:[(0,H.jsx)(`input`,{type:`radio`,id:S4(l,o),checked:s,name:u||l,required:n,value:$2(e.value,o,h),disabled:r||d||i,autoFocus:a&&o===0,onChange:()=>c(e.value),onBlur:g,onFocus:_,"aria-describedby":x4(l)}),(0,H.jsx)(`span`,{children:e.label})]});return p?(0,H.jsx)(`label`,{className:`radio-inline ${m}`,children:v},String(e.value)):(0,H.jsx)(`div`,{className:`radio ${m}`,children:(0,H.jsx)(`label`,{children:v})},String(e.value))})})}function z_e(e){let{value:t,registry:{templates:{BaseInputTemplate:n}}}=e;return(0,H.jsxs)(`div`,{className:`field-range-wrapper`,children:[(0,H.jsx)(n,{type:`range`,...e}),(0,H.jsx)(`span`,{className:`range-view`,children:t})]})}function B_e({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,H.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,H.jsx)(`span`,{onClick:()=>g(a),onKeyDown:e=>(e.key===`Enter`||e.key===` `)&&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,H.jsx)(`input`,{type:`hidden`,id:e,name:d||e,value:t||``,required:n,disabled:r||i,"aria-hidden":`true`})]})}function H8(e,t){return t?Array.from(e.target.options).slice().filter(e=>e.selected).map(e=>e.value):e.target.value}function V_e({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,registry:m,uiSchema:h}){let{enumOptions:g,enumDisabled:_,emptyValue:v}=n,y=s?[]:``,x=i4(n),S=(0,b.useCallback)(e=>d(t,Q2(H8(e,s),g,x,v)),[d,t,s,g,v,x]),C=(0,b.useCallback)(e=>u(t,Q2(H8(e,s),g,x,v)),[u,t,s,g,v,x]),w=(0,b.useCallback)(e=>l(Q2(H8(e,s),g,x,v)),[l,s,g,v,x]),T=Y2(r,g,s,x,y),E=!s&&e.default===void 0;return D4(t,e,g,s),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(j4,{id:t,multiple:s,options:n,registry:m,uiSchema:h,value:r}),(0,H.jsxs)(`select`,{id:t,name:p||t,multiple:s,className:`form-control`,value:T,required:i,disabled:a||o,autoFocus:c,onBlur:C,onFocus:S,onChange:w,"aria-describedby":x4(t),children:[E&&(0,H.jsx)(`option`,{value:``,children:f}),Array.isArray(g)&&g.map(({value:e,label:t},n)=>{let r=_&&_.includes(e);return(0,H.jsx)(`option`,{value:$2(e,n,x),disabled:r,children:t},String(e))})]})]})}function H_e({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?.value),[l,e]),m=(0,b.useCallback)(({target:t})=>u(e,t?.value),[e,u]);return(0,H.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":x4(e)})}function U_e(e){let{options:t,registry:n}=e;return(0,H.jsx)(s4(`BaseInputTemplate`,n,t),{...e})}function W_e(e){let{onChange:t,options:n,registry:r}=e,i=s4(`BaseInputTemplate`,r,n),a=(0,b.useCallback)(e=>t(e?`${e}:00`:void 0),[t]);return(0,H.jsx)(i,{type:`time`,...e,onChange:a})}function G_e(e){let{options:t,registry:n}=e;return(0,H.jsx)(s4(`BaseInputTemplate`,n,t),{type:`number`,...e})}function K_e(e){let{options:t,registry:n}=e;return(0,H.jsx)(s4(`BaseInputTemplate`,n,t),{type:`url`,...e})}function q_e(){return{AltDateWidget:E_e,AltDateTimeWidget:T_e,CheckboxWidget:O_e,CheckboxesWidget:D_e,ColorWidget:k_e,DateWidget:j_e,DateTimeWidget:A_e,EmailWidget:M_e,FileWidget:F_e,HiddenWidget:I_e,PasswordWidget:L_e,RadioWidget:R_e,RangeWidget:z_e,RatingWidget:B_e,SelectWidget:V_e,TextWidget:U_e,TextareaWidget:H_e,TimeWidget:W_e,UpDownWidget:G_e,URLWidget:K_e}}function J_e(){return{fields:Bge(),templates:w_e(),widgets:q_e(),rootSchema:{},formContext:{},translateString:_me,globalFormOptions:{idPrefix:U1,idSeparator:`_`,useFallbackUiForUnsupportedType:!1}}}function U8(e,t){return{...WD(e,[`schema`,`uiSchema`,`fieldPathId`,`schemaUtils`,`formData`,`edit`,`errors`,`errorSchema`]),...t!==void 0&&{status:t}}}var Y_e=class e 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}=B4(n,e.extraErrors)),t.customErrors&&({errors:r,errorSchema:i}=B4({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&&!u0(this.state.formData,i)&&r(U8(this.state)),this.formElement=(0,b.createRef)()}getSnapshotBeforeUpdate(e,t){if(!u0(this.props,e)){let n=t4(this.props.formData,e.formData),r=t4(this.props.formData,this.state.formData),i=!u0(e.schema,this.props.schema),a=n.length>0||!u0(e.formData,this.props.formData),o=r.length>0||!u0(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:!u0(s,t)}}return{shouldUpdate:!1}}componentDidUpdate(e,t,n){if(n.shouldUpdate){let{nextState:e}=n,r=!u0(e.formData,this.props.formData),i=this.isProcessingUserChange;if(this.isProcessingUserChange=!1,i&&r)return;r&&!u0(e.formData,t.formData)&&this.props.onChange&&this.props.onChange(U8(e)),this.setState(e)}}getStateFromProps(t,n,r,i=!1,a=[],o=!1,s=!1){let c=this.state||{},l=`schema`in t?t.schema:this.props.schema,u=`validator`in t?t.validator:this.props.validator,d=(`uiSchema`in t?t.uiSchema:this.props.uiSchema)||{},f=t.formData===void 0&&this.props.formData===void 0,p=n!==void 0,m=`liveValidate`in t?t.liveValidate:this.props.liveValidate,h=p&&!t.noValidate&&m,g=`experimental_defaultFormStateBehavior`in t?t.experimental_defaultFormStateBehavior:this.props.experimental_defaultFormStateBehavior,_=`experimental_customMergeAllOf`in t?t.experimental_customMergeAllOf:this.props.experimental_customMergeAllOf,{schemaUtils:v}=c;(!v||v.doesSchemaUtilsDiffer(u,l,g,_))&&(v=mme(u,l,g,_));let y=v.getRootSchema(),b=n;n===P8?b=void 0:n===void 0&&f&&(b=c.formData);let x,S,C=!1,w=[];do{x=v.getDefaultFormState(y,b,!1,c.initialDefaultsGenerated);let e=s?m4({formData:x}):``;if(S=this.updateRetrievedSchema(r??v.retrieveSchema(y,x)),s&&!w.includes(e)&&!u0(S,c.retrievedSchema)){let t=v.sanitizeDataForNewSchema(S,c.retrievedSchema,x);if(C=!u0(t,x),C){x=t,b=t;let e=m4({formData:t});C=!w.includes(e),w.push(e)}w.push(e)}else C=!1}while(C);let T=()=>t.noValidate||i?{errors:[],errorSchema:{}}:t.liveValidate?{errors:c.errors||[],errorSchema:c.errorSchema||{}}:{errors:c.schemaValidationErrors||[],errorSchema:c.schemaValidationErrorSchema||{}},E,D,{schemaValidationErrors:O,schemaValidationErrorSchema:k}=c;if(h&&!o){let e=this.liveValidate(y,v,c.errorSchema,x,void 0,c.customErrors,r,r!==void 0);E=e.errors,D=e.errorSchema,O=e.schemaValidationErrors,k=e.schemaValidationErrorSchema}else{let n=T();if(E=n.errors,D=n.errorSchema,a.length>0&&!h){let e=a.reduce((e,t)=>(e[t]=void 0,e),{});k=w2(n.errorSchema,e,`preventDuplicates`),D=k}let r=e.mergeErrors({errorSchema:D,errors:E},t.extraErrors,c.customErrors);E=r.errors,D=r.errorSchema}let A=e.getRegistry(t,y,v),j=u0(c.registry,A)?c.registry:A,M=c.fieldPathId&&c.fieldPathId?.$id===j.globalFormOptions.idPrefix?c.fieldPathId:L4(``,j.globalFormOptions);return{schemaUtils:v,schema:y,uiSchema:d,fieldPathId:M,formData:x,edit:p,errors:E,errorSchema:D,schemaValidationErrors:O,schemaValidationErrorSchema:k,retrievedSchema:S,initialDefaultsGenerated:!0,registry:j}}shouldComponentUpdate(e,t){let{experimental_componentUpdateStrategy:n=`customDeep`}=this.props;return Dme(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??t,l=e?JSON.parse(JSON.stringify(e)):void 0;return i.getValidator().validateFormData(l,c,a,o,s)}renderErrors(e){let{errors:t,errorSchema:n,schema:r,uiSchema:i}=this.state,a=s4(`ErrorListTemplate`,e,Y1(i));return t?.length?(0,H.jsx)(a,{errors:t,errorSchema:n||{},schema:r,uiSchema:i,registry:e}):null}static mergeErrors(e,t,n){let{errorSchema:r,errors:i}=e;if(t){let n=B4(e,t);r=n.errorSchema,i=n.errors}if(n){let e=B4({errors:i,errorSchema:r},n.ErrorSchema,!0);r=e.errorSchema,i=e.errors}return{errors:i,errorSchema:r}}liveValidate(t,n,r,i,a,o,s,c=!1){let l=this.validate(i,t,n,s),{errors:u}=l,{errorSchema:d}=l;c&&(d=w2(r,l.errorSchema,`preventDuplicates`));let f=u,p=d;return{...e.mergeErrors({errorSchema:d,errors:u},a,o),schemaValidationErrors:f,schemaValidationErrorSchema:p}}getUsedFormData=(e,t)=>sme(e,t);getFieldNames=(e,t)=>cme(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=L4(``,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:t,path:n,id:r}=this.pendingChanges[0],{newErrorSchema:i}=this.pendingChanges[0],{extraErrors:a,omitExtraData:o,liveOmit:s,noValidate:c,liveValidate:l,onChange:u,disabled:d,readonly:f}=this.props,{formData:p,schemaUtils:m,schema:h,fieldPathId:g,schemaValidationErrorSchema:_,errors:v}=this.state,{customErrors:y,retrievedSchema:b}=this.state,x=_,S=g.path[0]||``,C=!n||n.length===0||n.length===1&&n[0]===S,w=C?t:AE(p),T=E1(w)&&Object.keys(w).length>0&&Object.values(w).every(e=>e===void 0)&&p==null?void 0:w;if(E1(w)||Array.isArray(w)){let e=!1;if(t===N8)cO(w,n);else if(!C){let r=t;if(t===void 0)if(typeof n[n.length-1]==`number`)r=null;else{let{field:t}=m.findFieldInSchema(h,n,p),r=t;!(r&&(`oneOf`in r||`anyOf`in r))&&r!==void 0&&(e=!0)}e?qD(w,n,void 0):qD(w,n,r)}let r=b&&!C&&!E1(t)&&!Array.isArray(t)&&!d&&!f,i=this.getStateFromProps(this.props,T,void 0,void 0,void 0,!0,r);w=i.formData,b=i.retrievedSchema,e&&w&&qD(w,n,void 0)}let E=!c&&(l===!0||l===`onChange`),D={formData:w,retrievedSchema:b},O=w;if(o===!0&&(s===!0||s===`onChange`)&&(O=this.omitExtraData(w),D={...D,formData:O}),i)if(!ED(C?_:Y(_,n)))C?x=i:(x=AE(_),qD(x,n,i));else if(y||=new e4,C){let e=Y(i,N1);e&&y.setErrors(e)}else qD(y.ErrorSchema,n,i);else y&&Y(y.ErrorSchema,[...n,`__errors`])&&y.clearErrors(n);if(E&&this.pendingChanges.length===1){let e=this.liveValidate(h,m,x,O,a,y,b);D={...D,formData:O,...e,customErrors:y}}else if(!c&&i){let t=e.mergeErrors({errorSchema:x,errors:v},a,y);D={...D,formData:O,...t,customErrors:y}}this.setState(D,()=>{u&&u(U8({...this.state,...D}),r),this.pendingChanges.shift(),this.processPendingChange()})}updateRetrievedSchema(e){return u0(e,this.state?.retrievedSchema)?this.state.retrievedSchema:e}reset=()=>{let{formData:e,initialFormData:t=P8,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?.(U8({...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=>!u0(Y(this.state,e),Y(c,e)));this.setState(c,()=>{t&&l&&t(U8({...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?I4(n):[];this.setState({formData:a,errors:r,errorSchema:t,schemaValidationErrors:[],schemaValidationErrorSchema:{}},()=>{i&&i(U8({...this.state,formData:a},`submitted`),e)})}};static getGlobalFormOptions(e){let{uiSchema:t={},experimental_componentUpdateStrategy:n,idSeparator:r=`_`,idPrefix:i=U1,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}}}static getRegistry(t,n,r){let{translateString:i,uiSchema:a={}}=t,{fields:o,templates:s,widgets:c,formContext:l,translateString:u}=J_e();return{fields:{...o,...t.fields},templates:{...s,...t.templates,ButtonTemplates:{...s.ButtonTemplates,...t.templates?.ButtonTemplates}},widgets:{...c,...t.widgets},rootSchema:n,formContext:t.formContext||l,schemaUtils:r,translateString:i||u,globalUiOptions:a[J1],globalFormOptions:e.getGlobalFormOptions(t),uiSchemaDefinitions:a[`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=$D(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}"], button[id^="${a}"]`),o?.length&&(o=o[0]),o&&o.focus()}validateFormWithFormData=t=>{let{extraErrors:n,extraErrorsBlockSubmit:r,focusOnFirstError:i,onError:a}=this.props,{errors:o}=this.state,s=this.validate(t),{errors:c,errorSchema:l}=n?e.mergeErrors(s,n):s,u=s.errors.length>0||n&&r;return u?(i&&(typeof i==`function`?i(c[0]):this.focusOnError(c[0])),this.setState({errors:c,errorSchema:l,schemaValidationErrors:s.errors,schemaValidationErrorSchema:s.errorSchema},()=>{a?a(c):console.error(`Form validation failed`,c)})):c.length>0?this.setState({errors:c,errorSchema:l,schemaValidationErrors:[],schemaValidationErrorSchema:{}}):o.length>0&&this.setState({errors:[],errorSchema:{},schemaValidationErrors:[],schemaValidationErrorSchema:{}}),!u};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`,{[z1]:E={}}=Y1(_);f&&(E={...E,props:{...E.props,disabled:!0}});let D={[q1]:{[z1]:E}};return(0,H.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,H.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,H.jsx)(C,{uiSchema:D,registry:x}),m===`bottom`&&this.renderErrors(x)]})}};function X_e(e,t=`none`){return t===`all`?e:e.reduce((e,n)=>{let{message:r,schemaPath:i}=n,a=t===`anyOf`?void 0:i?.indexOf(`/${A1}/`),o=t===`oneOf`?void 0:i?.indexOf(`/${I1}/`),s;return a&&a>=0?s=i?.substring(0,a):o&&o>=0&&(s=i?.substring(0,o)),s&&e.find(e=>e.message===r&&e.schemaPath?.startsWith(s))||e.push(n),e},[])}function Z_e(e=[],t,n,r){return X_e(e.map(e=>{let{instancePath:n,keyword:i,params:a,schemaPath:o,parentSchema:s,...c}=e,{message:l=``}=c,u=n.replace(/\//g,`.`),d=`${u} ${l}`.trim(),f=``,p=[...a.deps?.split(`, `)||[],a.missingProperty,a.property].filter(e=>e);if(p.length>0)p.forEach(e=>{let n=Y1(Y(t,(u?`${u}.${e}`:e).replace(/^\./,``))).title;if(n===void 0&&(n=Y1(Y(t,o.replace(/\/properties\//g,`/`).split(`/`).slice(1,-1).concat([e]))).title),n===void 0&&(n=Y(t,[...u.replace(/^\./,``).split(`.`).filter(Boolean),e,`title`])),n)l=l.replace(`'${e}'`,`'${n}'`),f=n;else{let t=Y(s,[L1,e,`title`]);if(t)l=l.replace(`'${e}'`,`'${t}'`),f=t;else if(r){let t=u.replace(/^\./,``).split(`.`).filter(Boolean),n=[];for(let e of t)n.push(L1,e);n.push(L1,e,`title`);let i=Y(r,n);i&&(l=l.replace(`'${e}'`,`'${i}'`),f=i)}}}),d=l;else{let e=Y1(Y(t,u.replace(/^\./,``))).title;if(e)d=`'${e}' ${l}`.trim(),f=e;else{let e=s?.title;e&&(d=`'${e}' ${l}`.trim(),f=e)}}return`missingProperty`in a&&(u=u?`${u}.${a.missingProperty}`:a.missingProperty),{name:i,property:u,message:l,params:a,stack:d,schemaPath:o,title:f}}),n)}function Q_e(e,t,n,r,i,a,o,s){let{validationError:c}=t,l=Z_e(t.errors,o,s,r);c&&(l=[...l,{stack:c.message}]),typeof a==`function`&&(l=a(l,o));let u=Ome(l);if(c&&(u={...u,$schema:{__errors:[c.message]}}),typeof i!=`function`)return{errors:l,errorSchema:u};let d=F2(e,r,n,r,!0),f=R4(i(d,Z1(d),o,u));return B4({errors:l,errorSchema:u},f)}var W8=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})),G8=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;var t=W8(),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}}})),K8=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=W8(),n=G8(),r=W8();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=G8();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?`
265
+ `:``},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})`}})),q8=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=K8(),n=W8();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||{...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,t._)`${r} > ${n} ? ${r} : ${n}`)),mergeValues:(e,t)=>e===!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})),J8=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=K8();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`)}})),Y8=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=K8(),n=q8(),r=J8();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])}})),$_e=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;var t=Y8(),n=K8(),r=J8(),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)}})),X8=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})),Z8=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})),Q8=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=X8(),n=Z8(),r=Y8(),i=K8(),a=q8(),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
266
+ || (${s} == "string" && ${a} && ${a} == +${a})`).assign(c,(0,i._)`+${a}`);return;case`integer`:r.elseIf((0,i._)`${s} === "boolean" || ${a} === null
267
+ || (${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"
268
+ || ${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}}})),eve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.assignDefaults=void 0;var t=K8(),n=q8();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)}`)}})),$8=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=K8(),n=q8(),r=J8(),i=q8();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})),tve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateKeywordUsage=e.validSchemaType=e.funcKeywordCode=e.macroKeywordCode=void 0;var t=K8(),n=J8(),r=$8(),i=Y8();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})),nve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendSubschemaMode=e.extendSubschemaData=e.getSubschema=void 0;var t=K8(),n=q8();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})),e5=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}})),rve=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`)}})),t5=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getSchemaRefs=e.resolveUrl=e.normalizeId=e._getFullPath=e.getFullPath=e.inlineRef=void 0;var t=q8(),n=e5(),r=rve(),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})),n5=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getData=e.KeywordCxt=e.validateFunctionCode=void 0;var t=$_e(),n=Q8(),r=Z8(),i=Q8(),a=eve(),o=tve(),s=nve(),c=K8(),l=J8(),u=t5(),d=q8(),f=Y8();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(()=>re(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)&&re(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),ee(e,e.dataTypes))}function I(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(t=>{ne(e.dataTypes,t)||z(e,`type "${t}" not allowed by context "${e.dataTypes.join(`,`)}"`)}),R(e,t)}}function L(e,t){t.length>1&&!(t.length===2&&t.includes(`null`))&&z(e,`use allowUnionTypes to allow union type keyword`)}function ee(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=>te(t,e))&&z(e,`missing type "${n.join(`,`)}" for keyword "${i}"`)}}}function te(e,t){return e.includes(t)||t===`number`&&e.includes(`integer`)}function ne(e,t){return e.includes(t)||t===`integer`&&e.includes(`number`)}function R(e,t){let n=[];for(let r of e.dataTypes)ne(t,r)?n.push(r):t.includes(`integer`)&&r===`number`&&n.push(`integer`);e.dataTypes=n}function z(e,t){let n=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${n}" (strictTypes)`,(0,d.checkStrictMode)(e,t,e.opts.strictTypes)}var B=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`,oe(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=B;function re(e,t,n,r){let i=new B(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 ie=/^\/(?:[^~]|~0|~1)*$/,ae=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function oe(e,{dataLevel:t,dataNames:n,dataPathArr:r}){let i,a;if(e===``)return l.default.rootData;if(e[0]===`/`){if(!ie.test(e))throw Error(`Invalid JSON-pointer: ${e}`);i=e,a=l.default.rootData}else{let o=ae.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=oe})),r5=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}}})),i5=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=t5();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))}}})),a5=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.resolveSchema=e.getCompilingSchema=e.resolveRef=e.compileSchema=e.SchemaEnv=void 0;var t=K8(),n=r5(),r=J8(),i=t5(),a=q8(),o=n5(),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}})),ive=c({$id:()=>o5,additionalProperties:()=>!1,default:()=>d5,description:()=>s5,properties:()=>u5,required:()=>l5,type:()=>c5}),o5,s5,c5,l5,u5,d5,ave=o((()=>{o5=`https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#`,s5=`Meta-schema for $data reference (JSON AnySchema extension proposal)`,c5=`object`,l5=[`$data`],u5={$data:{type:`string`,anyOf:[{format:`relative-json-pointer`},{format:`json-pointer`}]}},d5={$id:o5,description:s5,type:c5,required:l5,properties:u5,additionalProperties:!1}})),f5=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),i=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),a=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),o=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function s(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 c=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function l(e){return e.length=0,!0}function u(e,t,n){if(e.length){let r=s(e);if(r!==``)t.push(r);else return n.error=!0,!1;e.length=0}return!0}function d(e){let t=0,n={error:!1,address:``,zone:``},r=[],i=[],a=!1,o=!1,c=u;for(let s=0;s<e.length;s++){let u=e[s];if(!(u===`[`||u===`]`))if(u===`:`){if(a===!0&&(o=!0),!c(i,r,n))break;if(++t>7){n.error=!0;break}s>0&&e[s-1]===`:`&&(a=!0),r.push(`:`);continue}else if(u===`%`){if(!c(i,r,n))break;c=l}else{i.push(u);continue}}return i.length&&(c===l?n.zone=i.join(``):o?r.push(i.join(``)):r.push(s(i))),n.address=r.join(``),n}function f(e){if(p(e,`:`)<2)return{host:e,isIPV6:!1};let t=d(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 p(e,t){let n=0;for(let r=0;r<e.length;r++)e[r]===t&&n++;return n}function m(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(``)}var h={"@":`%40`,"/":`%2F`,"?":`%3F`,"#":`%23`,":":`%3A`},g=/[@/?#:]/g,_=/[@/?#]/g;function v(e,t){let n=t?_:g;return n.lastIndex=0,e.replace(n,e=>h[e])}function y(e,t=!1){if(e.indexOf(`%`)===-1)return e;let n=``;for(let r=0;r<e.length;r++){if(e[r]===`%`&&r+2<e.length){let o=e.slice(r+1,r+3);if(i(o)){let e=o.toUpperCase(),i=String.fromCharCode(parseInt(e,16));t&&a(i)?n+=i:n+=`%`+e,r+=2;continue}}n+=e[r]}return n}function b(e){let t=``;for(let n=0;n<e.length;n++){if(e[n]===`%`&&n+2<e.length){let r=e.slice(n+1,n+3);if(i(r)){let e=r.toUpperCase(),i=String.fromCharCode(parseInt(e,16));i!==`.`&&a(i)?t+=i:t+=`%`+e,n+=2;continue}}o(e[n])?t+=e[n]:t+=escape(e[n])}return t}function x(e){let t=``;for(let n=0;n<e.length;n++){if(e[n]===`%`&&n+2<e.length){let r=e.slice(n+1,n+3);if(i(r)){t+=`%`+r.toUpperCase(),n+=2;continue}}t+=escape(e[n])}return t}function S(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 e=f(n);n=e.isIPV6===!0?`[${e.escapedHost}]`:v(n,!1)}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:c,recomposeAuthority:S,reescapeHostDelimiters:v,normalizePercentEncoding:y,normalizePathEncoding:b,escapePreservingEscapes:x,removeDotSegments:m,isIPv4:r,isUUID:n,normalizeIPv6:f,stringArrayToHexStripped:s}})),ove=s(((e,t)=>{var{isUUID:n}=f5(),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=y(`${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=y(`${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={http:h,https:g,ws:_,wss:{scheme:`wss`,domainHost:_.domainHost,parse:_.parse,serialize:_.serialize},urn:{scheme:`urn`,parse:d,serialize:f,skipNormalize:!0},"urn:uuid":{scheme:`urn:uuid`,parse:p,serialize:m,skipNormalize:!0}};Object.setPrototypeOf(v,null);function y(e){return e&&(v[e]||v[e.toLowerCase()])||void 0}t.exports={wsIsSecure:o,SCHEMES:v,isValidSchemeName:a,getSchemeHandler:y}})),sve=s(((e,t)=>{var{normalizeIPv6:n,removeDotSegments:r,recomposeAuthority:i,normalizePercentEncoding:a,normalizePathEncoding:o,escapePreservingEscapes:s,reescapeHostDelimiters:c,isIPv4:l,nonSimpleDomain:u}=f5(),{SCHEMES:d,getSchemeHandler:f}=ove();function p(e,t){return typeof e==`string`?e=S(e,t):typeof e==`object`&&(e=x(_(e,t),t)),e}function m(e,t,n){let r=n?Object.assign({scheme:`null`},n):{scheme:`null`},i=h(x(e,r),x(t,r),r,!0);return r.skipEscape=!0,_(i,r)}function h(e,t,n,i){let a={};return i||(e=x(_(e,n),n),t=x(_(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 g(e,t,n){let r=w(e,n),i=w(t,n);return r!==void 0&&i!==void 0&&r.toLowerCase()===i.toLowerCase()}function _(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:``},o=Object.assign({},t),c=[],l=f(o.scheme||n.scheme);l&&l.serialize&&l.serialize(n,o),n.path!==void 0&&(o.skipEscape?n.path=a(n.path):(n.path=s(n.path),n.scheme!==void 0&&(n.path=n.path.split(`%3A`).join(`:`)))),o.reference!==`suffix`&&n.scheme&&c.push(n.scheme,`:`);let u=i(n);if(u!==void 0&&(o.reference!==`suffix`&&c.push(`//`),c.push(u),n.path&&n.path[0]!==`/`&&c.push(`/`)),n.path!==void 0){let e=n.path;!o.absolutePath&&(!l||!l.absolutePath)&&(e=r(e)),u===void 0&&e[0]===`/`&&e[1]===`/`&&(e=`/%2F`+e.slice(2)),c.push(e)}return n.query!==void 0&&c.push(`?`,n.query),n.fragment!==void 0&&c.push(`#`,n.fragment),c.join(``)}var v=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function y(e,t){if(t[2]!==void 0&&e.path&&e.path[0]!==`/`)return`URI path must start with "/" when authority is present.`;if(typeof e.port==`number`&&(e.port<0||e.port>65535))return`URI port is malformed.`}function b(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,s=!1;r.reference===`suffix`&&(e=r.scheme?r.scheme+`:`+e:`//`+e);let d=e.match(v);if(d){i.scheme=d[1],i.userinfo=d[3],i.host=d[4],i.port=parseInt(d[5],10),i.path=d[6]||``,i.query=d[7],i.fragment=d[8],isNaN(i.port)&&(i.port=d[5]);let t=y(i,d);if(t!==void 0&&(i.error=i.error||t,a=!0),i.host)if(l(i.host)===!1){let e=n(i.host);i.host=e.host.toLowerCase(),s=e.isIPV6}else s=!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 p=f(r.scheme||i.scheme);if(!r.unicodeSupport&&(!p||!p.unicodeSupport)&&i.host&&(r.domainHost||p&&p.domainHost)&&s===!1&&u(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}if((!p||p&&!p.skipNormalize)&&(e.indexOf(`%`)!==-1&&(i.scheme!==void 0&&(i.scheme=unescape(i.scheme)),i.host!==void 0&&(i.host=c(unescape(i.host),s))),i.path&&=o(i.path),i.fragment))try{i.fragment=encodeURI(decodeURIComponent(i.fragment))}catch{i.error=i.error||`URI malformed`}p&&p.parse&&p.parse(i,r)}else i.error=i.error||`URI can not be parsed.`;return{parsed:i,malformedAuthorityOrPort:a}}function x(e,t){return b(e,t).parsed}function S(e,t){return C(e,t).normalized}function C(e,t){let{parsed:n,malformedAuthorityOrPort:r}=b(e,t);return{normalized:r?e:_(n,t),malformedAuthorityOrPort:r}}function w(e,t){if(typeof e==`string`){let{normalized:n,malformedAuthorityOrPort:r}=C(e,t);return r?void 0:n}if(typeof e==`object`)return _(e,t)}var T={SCHEMES:d,normalize:p,resolve:m,resolveComponent:h,equal:g,serialize:_,parse:x};t.exports=T,t.exports.default=T,t.exports.fastUri=T})),cve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=sve();t.code=`require("ajv/dist/runtime/uri").default`,e.default=t})),lve=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=n5();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var n=K8();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=r5(),i=i5(),a=X8(),o=a5(),s=K8(),c=t5(),l=Q8(),u=q8(),f=(ave(),d(ive).default),p=cve(),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=Object.create(null),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]}}})),uve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:`id`,code(){throw Error(`NOT SUPPORTED: keyword "id", use "$id" for schema ID`)}}})),dve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.callRef=e.getValidate=void 0;var t=i5(),n=$8(),r=K8(),i=J8(),a=a5(),o=q8(),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})),fve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=uve(),n=dve();e.default=[`$schema`,`$id`,`$defs`,`$vocabulary`,{keyword:`$comment`},`definitions`,t.default,n.default]})),pve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=K8(),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})`)}}})),mve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=K8();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}))`)}}})),hve=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`})),gve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=K8(),n=q8(),r=hve();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}`)}}})),_ve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=$8(),n=q8(),r=K8();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})`)}}}})),vve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=K8();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}`)}}})),yve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=$8(),n=K8(),r=q8();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)}}}})),bve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=K8();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}`)}}})),p5=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=e5();t.code=`require("ajv/dist/runtime/equal").default`,e.default=t})),xve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Q8(),n=K8(),r=q8(),i=p5();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)})))}}}})),Sve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=K8(),n=q8(),r=p5();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}`)}}})),Cve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=K8(),n=q8(),r=p5();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}`}}}})),wve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=pve(),n=mve(),r=gve(),i=_ve(),a=vve(),o=yve(),s=bve(),c=xve(),l=Sve(),u=Cve();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]})),m5=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateAdditionalItems=void 0;var t=K8(),n=q8(),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})),h5=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateTuple=void 0;var t=K8(),n=q8(),r=$8(),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})),Tve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=h5();e.default={keyword:`prefixItems`,type:`array`,schemaType:[`array`],before:`uniqueItems`,code:e=>(0,t.validateTuple)(e,`items`)}})),Eve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=K8(),n=q8(),r=$8(),i=m5();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)))}}})),Dve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=K8(),n=q8();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)))}}}})),Ove=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;var t=K8(),n=q8(),r=$8();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},
269
+ missingProperty: ${i},
270
+ depsCount: ${n},
271
+ 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})),kve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=K8(),n=q8();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)}}})),g5=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=$8(),n=K8(),r=J8(),i=q8();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)}}}})),Ave=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=n5(),n=$8(),r=q8(),i=g5();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)}}}})),jve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=$8(),n=K8(),r=q8(),i=q8();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())})})}}}})),Mve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=q8();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`}}})),Nve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:`anyOf`,schemaType:`array`,trackErrors:!0,code:$8().validateUnion,error:{message:`must match a schema in anyOf`}}})),Pve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=K8(),n=q8();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)})})}}}})),Fve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=q8();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)})}}})),Ive=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=K8(),n=q8(),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})),Lve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=q8();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`)}}})),Rve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=m5(),n=Tve(),r=h5(),i=Eve(),a=Dve(),o=Ove(),s=kve(),c=g5(),l=Ave(),u=jve(),d=Mve(),f=Nve(),p=Pve(),m=Fve(),h=Ive(),g=Lve();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=_})),zve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=K8();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})`}}}}})),Bve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=[zve().default]})),Vve=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`]})),Hve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=fve(),n=wve(),r=Rve(),i=Bve(),a=Vve();e.default=[t.default,n.default,(0,r.default)(),i.default,a.metadataVocabulary,a.contentVocabulary]})),Uve=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={}))})),Wve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=K8(),n=Uve(),r=a5(),i=i5(),a=q8();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}}}}})),Gve=c({$id:()=>v5,$schema:()=>_5,default:()=>C5,definitions:()=>b5,properties:()=>S5,title:()=>y5,type:()=>x5}),_5,v5,y5,b5,x5,S5,C5,Kve=o((()=>{_5=`http://json-schema.org/draft-07/schema#`,v5=`http://json-schema.org/draft-07/schema#`,y5=`Core schema meta-schema`,b5={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:[]}},x5=[`object`,`boolean`],S5={$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:`#`}},C5={$schema:_5,$id:v5,title:y5,definitions:b5,type:x5,properties:S5,default:!0}})),w5=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=lve(),r=Hve(),i=Wve(),a=(Kve(),d(Gve).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=n5();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var u=K8();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=r5();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return f.default}});var p=i5();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return p.default}})})),qve=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}}})),Jve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;var t=w5(),n=K8(),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)})),Yve=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0});var n=qve(),r=Jve(),i=K8(),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})),Xve=u(w5(),1),T5=u(Yve(),1),Zve={allErrors:!0,multipleOfPrecision:8,strict:!1,verbose:!0,discriminator:!1},Qve=/^(#?([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*\)))$/,$ve=/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/;function eye(e,t,n={},r,i=Xve.default,a){let o=new i({...Zve,...n});return r?(0,T5.default)(o,r):r!==!1&&(0,T5.default)(o),o.addFormat(`data-url`,$ve),o.addFormat(`color`,Qve),o.addKeyword(G1),Array.isArray(e)&&o.addMetaSchema(e),jC(t)&&Object.keys(t).forEach(e=>{o.addFormat(e,t[e])}),a&&(o=a(o)),o}var tye=class{constructor(e,t){this.hasRegisteredRootSchema=!1;let{additionalMetaSchemas:n,customFormats:r,ajvOptionsOverrides:i,ajvFormatOptions:a,AjvClass:o,extenderFn:s,suppressDuplicateFiltering:c}=e;this.ajv=eye(n,r,i,a,o,s),this.localizer=t,this.suppressDuplicateFiltering=c}reset(){this.ajv.removeSchema(),this.lastSeenRootSchema=void 0,this.hasRegisteredRootSchema=!1}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 Q_e(this,a,e,t,n,r,i,this.suppressDuplicateFiltering)}handleSchemaUpdate(e){if(this.lastSeenRootSchema===e&&this.hasRegisteredRootSchema)return;let t=e.$id??K1;this.ajv.getSchema(t)===void 0?this.ajv.addSchema(e,t):u0(e,this.ajv.getSchema(t)?.schema)||(this.ajv.removeSchema(t),this.ajv.addSchema(e,t)),this.lastSeenRootSchema=e,this.hasRegisteredRootSchema=!0}isValid(e,t,n){try{this.handleSchemaUpdate(n);let r=V4(e),i=r.$id??xme(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 nye(e={},t){return new tye(e,t)}var E5=nye();function rye(e){return(0,b.forwardRef)(({fields:t,widgets:n,templates:r,...i},a)=>{let o={...e?.fields,...t},s={...e?.widgets,...n},c={...e?.templates,...r,ButtonTemplates:{...e?.templates?.ButtonTemplates,...r?.ButtonTemplates}};return(0,H.jsx)(Y_e,{...e,...i,fields:o,widgets:s,templates:c,ref:a})})}function D5(...e){return jr(nn(e))}var iye=Ni(`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 O5({className:e,variant:t,size:n,asChild:r=!1,...i}){return(0,H.jsx)(r?EF:`button`,{"data-slot":`button`,className:D5(iye({variant:t,size:n,className:e})),...i})}function aye({uiSchema:e,registry:t,className:n,...r}){let{translateString:i}=t;return(0,H.jsx)(`div`,{className:`p-0 m-0`,children:(0,H.jsxs)(O5,{...r,className:D5(`w-fit gap-2`,n),variant:`outline`,type:`button`,children:[(0,H.jsx)(Zr,{size:16}),` `,i(H4.AddItemButton)]})})}function oye(e){let{children:t,buttonsProps:n,displayLabel:r,hasDescription:i,hasToolbar:a,uiSchema:o,registry:s}=e,c=s4(`ArrayFieldItemButtonsTemplate`,s,Y1(o)),l=i?-6:22;return(0,H.jsx)(`div`,{children:(0,H.jsxs)(`div`,{className:`mb-2 flex flex-row flex-wrap items-center`,children:[(0,H.jsx)(`div`,{className:`grow shrink`,children:t}),(0,H.jsx)(`div`,{className:`flex items-end justify-end p-0.5`,children:a&&(0,H.jsx)(`div`,{className:`flex gap-2`,style:{marginLeft:`5px`,marginTop:r?`${l}px`:void 0},children:(0,H.jsx)(c,{...n})})})]})})}function sye(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=Y1(i),m=s4(`ArrayFieldDescriptionTemplate`,l,p),h=s4(`ArrayFieldTitleTemplate`,l,p),g=!c&&!n,{ButtonTemplates:{AddButton:_}}=l.templates;return(0,H.jsx)(`div`,{children:(0,H.jsx)(`div`,{className:`m-0 flex p-0`,children:(0,H.jsxs)(`div`,{className:`m-0 w-full p-0`,children:[(0,H.jsx)(h,{fieldPathId:r,title:p.title||f,schema:d,uiSchema:i,required:u,registry:l,optionalDataControl:g?o:void 0}),(0,H.jsx)(m,{fieldPathId:r,description:p.description||d.description,schema:d,uiSchema:i,registry:l}),(0,H.jsxs)(`div`,{className:`p-0 m-0 w-full mb-2`,children:[g?void 0:o,a,t&&(0,H.jsx)(`div`,{className:`mt-2 flex justify-end`,children:(0,H.jsx)(_,{id:C4(r,`add`),className:`rjsf-array-item-add`,onClick:s,disabled:n||c,uiSchema:i,registry:l})})]},`array-item-list-${r.$id}`)]})})})}function k5({className:e,type:t,...n}){return(0,H.jsx)(`input`,{type:t,"data-slot":`input`,className:D5(`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 cye({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={..._,...r4(m,o,p)},C=({target:{value:e}})=>c(e===``?p.emptyValue:e),w=({target:t})=>u(e,t?.value),T=({target:t})=>d(e,t?.value),E=(0,b.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),c(p.emptyValue??``)},[c,p.emptyValue]);return(0,H.jsxs)(`div`,{className:`p-0.5`,children:[(0,H.jsx)(k5,{id:e,name:t||e,type:o,placeholder:n,autoFocus:f,required:r,disabled:a,readOnly:i,className:D5({"border-destructive focus-visible:ring-0":h.length>0},v),list:m.examples?v4(e):void 0,...S,value:s||s===0?s:``,onChange:l||C,onBlur:w,onFocus:T,"aria-describedby":x4(e,!!m.examples)}),p.allowClearTextInputs&&!i&&!a&&s&&(0,H.jsx)(x,{onClick:E,registry:y}),g,(0,H.jsx)(F8,{id:e,schema:m})]})}var lye=Ni(`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 A5({className:e,variant:t,...n}){return(0,H.jsx)(`div`,{"data-slot":`alert`,role:`alert`,className:D5(lye({variant:t}),e),...n})}function uye({className:e,...t}){return(0,H.jsx)(`div`,{"data-slot":`alert-title`,className:D5(`col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight`,e),...t})}function j5({className:e,...t}){return(0,H.jsx)(`div`,{"data-slot":`alert-description`,className:D5(`text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed`,e),...t})}function dye(e){let{name:t,fieldPathId:n,registry:r,onExpand:i}=e,{translateString:a}=r,o=`${n.$id}-button`;return(0,H.jsxs)(`div`,{className:`mt-4`,children:[(0,H.jsxs)(A5,{variant:`default`,className:`mb-2`,children:[(0,H.jsx)(Xr,{className:`h-4 w-4`}),(0,H.jsx)(j5,{children:a(H4.CycleDetected,[t])})]}),(0,H.jsx)(O5,{id:o,type:`button`,variant:`outline`,size:`sm`,className:D5(`my-1`),onClick:()=>i(n.$id),children:a(H4.ExpandButton)})]})}function fye({id:e,description:t,registry:n,uiSchema:r}){return t?(0,H.jsx)(`div`,{children:(0,H.jsx)(`div`,{id:e,className:`text-sm text-muted-foreground`,children:(0,H.jsx)(R8,{description:t,registry:n,uiSchema:r})})}):null}function pye({errors:e,registry:t}){let{translateString:n}=t;return(0,H.jsxs)(A5,{variant:`destructive`,className:`mb-2`,children:[(0,H.jsx)(Xr,{className:`h-4 w-4`}),(0,H.jsx)(uye,{children:n(H4.ErrorsLabel)}),(0,H.jsx)(j5,{className:`flex flex-col gap-1`,children:e.map((e,t)=>(0,H.jsxs)(`span`,{children:[`• `,e.stack]},t))})]})}function mye(e){let{errors:t=[],fieldPathId:n}=e;return t.length===0?null:(0,H.jsx)(`div`,{className:`flex flex-col gap-1`,id:_4(n),children:t.map((e,t)=>(0,H.jsx)(`span`,{className:`text-xs font-medium text-destructive mb-1`,children:e},t))})}function hye(e){let{fieldPathId:t,help:n,uiSchema:r,registry:i,hasErrors:a}=e;return n?(0,H.jsx)(`span`,{className:D5(`text-xs font-medium text-muted-foreground`,{"text-destructive":a}),id:y4(t),children:(0,H.jsx)(B8,{help:n,registry:i,uiSchema:r})}):null}function gye({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=Y1(y),S=s4(`WrapIfAdditionalTemplate`,b,x);if(f)return(0,H.jsx)(`div`,{className:`hidden`,children:t});let C=x.widget===`checkbox`;return(0,H.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,H.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[n&&!C&&(0,H.jsxs)(`label`,{className:D5(`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,H.jsx)(`span`,{className:D5(`text-xs font-medium text-muted-foreground`,{" text-destructive":r.length>0}),children:o}),i,a]})})}function _ye(e){let{children:t,column:n,className:r,...i}=e;return(0,H.jsx)(`div`,{className:D5(`grid gap-2`,r),...i,children:t})}function vye(e){let{icon:t,iconType:n,className:r,uiSchema:i,registry:a,...o}=e;return(0,H.jsx)(O5,{size:`icon`,variant:`outline`,className:r,...o,type:`button`,children:t})}var M5=(0,b.memo)(vye);function yye(e){let{registry:{translateString:t}}=e;return(0,H.jsx)(M5,{title:t(H4.CopyButton),...e,icon:(0,H.jsx)(ti,{className:`h-4 w-4`})})}var bye=(0,b.memo)(yye);function xye(e){let{registry:{translateString:t}}=e;return(0,H.jsx)(M5,{title:t(H4.MoveDownButton),...e,icon:(0,H.jsx)(qr,{className:`h-4 w-4`})})}var Sye=(0,b.memo)(xye);function Cye(e){let{registry:{translateString:t}}=e;return(0,H.jsx)(M5,{title:t(H4.MoveUpButton),...e,icon:(0,H.jsx)(Yr,{className:`h-4 w-4`})})}var wye=(0,b.memo)(Cye);function Tye(e){let{registry:{translateString:t}}=e;return(0,H.jsx)(M5,{title:t(H4.RemoveButton),...e,className:`border-destructive`,icon:(0,H.jsx)(Di,{className:`h-4 w-4 stroke-destructive`})})}var N5=(0,b.memo)(Tye);function Eye(e){let{registry:{translateString:t}}=e;return(0,H.jsx)(M5,{title:t(H4.ClearButton),...e,icon:(0,H.jsx)(Ai,{})})}var Dye=(0,b.memo)(Eye);function Oye({selector:e,optionSchemaField:t}){return(0,H.jsxs)(`div`,{className:D5(`p-4 border rounded-md bg-background shadow-sm`),children:[(0,H.jsx)(`div`,{className:D5(`mb-4`),children:e}),t]})}function kye({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=Y1(i),m=s4(`TitleFieldTemplate`,f,p),h=s4(`DescriptionFieldTemplate`,f,p),g=!d&&!u,{ButtonTemplates:{AddButton:_}}=f.templates;return(0,H.jsxs)(H.Fragment,{children:[t&&(0,H.jsx)(m,{id:b4(a),title:t,required:r,schema:o,uiSchema:i,registry:f,optionalDataControl:g?c:void 0}),e&&(0,H.jsx)(h,{id:g4(a),description:e,schema:o,uiSchema:i,registry:f}),(0,H.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[g?void 0:c,n.map(e=>(0,H.jsx)(`div`,{className:`${e.hidden?`hidden`:``} flex`,children:(0,H.jsx)(`div`,{className:`w-full`,children:e.content})},e.name)),X1(o,i,s)?(0,H.jsx)(`div`,{className:`mt-2 flex justify-end`,children:(0,H.jsx)(_,{id:C4(a,`add`),onClick:l,disabled:u||d,className:`rjsf-object-property-expand`,uiSchema:i,registry:f})}):null]})]})}function Aye(e){let{id:t,registry:n,label:r,onAddClick:i,onRemoveClick:a}=e;return i?(0,H.jsx)(M5,{id:t,registry:n,className:`rjsf-add-optional-data`,onClick:i,title:r,icon:(0,H.jsx)(Zr,{}),size:`xs`}):a?(0,H.jsx)(N5,{id:t,registry:n,className:`rjsf-remove-optional-data`,onClick:a,title:r,size:`xs`}):(0,H.jsx)(`em`,{id:t,children:r})}function jye(e){let{submitText:t,norender:n,props:r}=o4(e.uiSchema);return n?null:(0,H.jsx)(`div`,{children:(0,H.jsx)(O5,{type:`submit`,...r,className:D5(`my-2`,r?.className),children:t})})}function P5({className:e,orientation:t=`horizontal`,decorative:n=!0,...r}){return(0,H.jsx)(XO,{"data-slot":`separator`,decorative:n,orientation:t,className:D5(`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 Mye({id:e,title:t,uiSchema:n,optionalDataControl:r}){let i=(0,H.jsx)(`h5`,{children:Y1(n).title||t});return r&&(i=(0,H.jsxs)(`div`,{className:`flex flex-row`,children:[(0,H.jsx)(`div`,{className:`flex-grow`,children:i}),(0,H.jsx)(`div`,{className:`flex`,children:r})]})),(0,H.jsxs)(`div`,{id:e,className:`my-1 flex flex-col gap-0.5`,children:[i,(0,H.jsx)(P5,{dir:`horizontal`,style:{height:`1px`},className:`my-1`})]})}function Nye({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(H4.KeyLabel,[a]);if(!(O1 in f))return(0,H.jsx)(`div`,{className:e,style:t,children:n});let y=o?22+(l?-28:0):0,b=`${i}-key`;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{className:`grid grid-cols-12 col-span-12 items-center gap-2 ${e}`,style:t,children:[(0,H.jsx)(`div`,{className:`grid gap-2 col-span-5`,children:(0,H.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[o&&(0,H.jsx)(`label`,{htmlFor:b,className:`text-sm font-medium text-muted-foreground leading-none`,children:v}),(0,H.jsx)(`div`,{className:`pl-0.5`,children:(0,H.jsx)(k5,{required:d,defaultValue:a,disabled:r||u,id:b,name:b,onBlur:u?void 0:c,type:`text`,className:`w-full border shadow-sm`},a)}),!!l&&(0,H.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:(0,H.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:`\xA0`})})]})}),(0,H.jsx)(`div`,{className:`grid gap-2 col-span-6 pr-0.5`,children:n}),(0,H.jsx)(`div`,{className:`grid gap-2 col-span-1`,style:{marginTop:`${y}px`},children:(0,H.jsx)(_,{id:C4(i,`remove`),iconType:`block`,className:`rjsf-object-property-remove w-full`,disabled:r||u,onClick:s,uiSchema:p,registry:m})})]}),(0,H.jsx)(P5,{dir:`horizontal`,className:`mt-2`})]})}function Pye(){return{ArrayFieldItemTemplate:oye,ArrayFieldTemplate:sye,BaseInputTemplate:cye,CyclicSchemaExpandTemplate:dye,ButtonTemplates:{AddButton:aye,CopyButton:bye,MoveDownButton:Sye,MoveUpButton:wye,RemoveButton:N5,SubmitButton:jye,ClearButton:Dye},DescriptionFieldTemplate:fye,ErrorListTemplate:pye,FieldErrorTemplate:mye,FieldHelpTemplate:hye,FieldTemplate:gye,GridTemplate:_ye,MultiSchemaFieldTemplate:Oye,ObjectFieldTemplate:kye,OptionalDataControlsTemplate:Aye,TitleFieldTemplate:Mye,WrapIfAdditionalTemplate:Nye}}function F5(e,t=[]){let n=[];function r(t,r){let i=b.createContext(r);i.displayName=t+`Context`;let 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,H.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,Fye(i,...t)]}function Fye(...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 I5(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var Iye=b.useInsertionEffect||Zk;function L5({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=Lye({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=Rye(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function Lye({defaultProp:e,onChange:t}){let[n,r]=b.useState(e),i=b.useRef(n),a=b.useRef(t);return Iye(()=>{a.current=t},[t]),b.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function Rye(e){return typeof e==`function`}function zye(e,t){return b.useReducer((e,n)=>t[e][n]??e,e)}var R5=e=>{let{present:t,children:n}=e,r=Bye(t),i=typeof n==`function`?n({present:r.isPresent}):b.Children.only(n),a=Vye(r.ref,Hye(i));return typeof n==`function`||r.isPresent?b.cloneElement(i,{ref:a}):null};R5.displayName=`Presence`;function Bye(e){let[t,n]=b.useState(),r=b.useRef(null),i=b.useRef(e),a=b.useRef(`none`),[o,s]=zye(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return b.useEffect(()=>{let e=B5(r.current);a.current=o===`mounted`?e:`none`},[o]),Zk(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=B5(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),Zk(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=B5(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=B5(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 z5(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Vye(...e){let t=b.useRef(e);return t.current=e,b.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=z5(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():z5(n[e],null)}}},[])}function B5(e){return e?.animationName||`none`}function Hye(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 V5=`Checkbox`,[Uye,Wye]=F5(V5),[Gye,H5]=Uye(V5);function Kye(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]=L5({prop:n,defaultProp:i??!1,onChange:c,caller:V5}),[m,h]=b.useState(null),[g,_]=b.useState(null),v=b.useRef(!1),y=!m||!!o||!!m.closest(`form`),x={checked:f,disabled:a,setChecked:p,control:m,setControl:h,name:s,form:o,value:u,hasConsumerStoppedPropagationRef:v,required:l,defaultChecked:!X5(i)&&i,isFormControl:y,bubbleInput:g,setBubbleInput:_};return(0,H.jsx)(Gye,{scope:t,...x,children:qye(d)?d(x):r})}var U5=`CheckboxTrigger`,W5=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}=H5(U5,e),h=Ii(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,H.jsx)(UO.button,{type:`button`,role:`checkbox`,"aria-checked":X5(c)?`mixed`:c,"aria-required":l,"data-state":Z5(c),"data-disabled":s?``:void 0,disabled:s,value:o,...r,ref:h,onKeyDown:I5(t,e=>{e.key===`Enter`&&e.preventDefault()}),onClick:I5(n,e=>{d(e=>X5(e)?!0:!e),m&&p&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})});W5.displayName=U5;var G5=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,H.jsx)(Kye,{__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,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(W5,{...d,ref:t,__scopeCheckbox:n}),e&&(0,H.jsx)(Y5,{__scopeCheckbox:n})]})})});G5.displayName=V5;var K5=`CheckboxIndicator`,q5=b.forwardRef((e,t)=>{let{__scopeCheckbox:n,forceMount:r,...i}=e,a=H5(K5,n);return(0,H.jsx)(R5,{present:r||X5(a.checked)||a.checked===!0,children:(0,H.jsx)(UO.span,{"data-state":Z5(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t,style:{pointerEvents:`none`,...e.style}})})});q5.displayName=K5;var J5=`CheckboxBubbleInput`,Y5=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}=H5(J5,e),m=Ii(n,p),h=XI(a),g=pM(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=X5(a),n.call(e,!X5(a)&&a),e.dispatchEvent(t)}},[f,h,a,i]);let _=b.useRef(!X5(a)&&a);return(0,H.jsx)(UO.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%)`}})});Y5.displayName=J5;function qye(e){return typeof e==`function`}function X5(e){return e===`indeterminate`}function Z5(e){return X5(e)?`indeterminate`:e?`checked`:`unchecked`}function Jye(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 Yye=[`color`],Xye=(0,b.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=Jye(e,Yye);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 Q5({className:e,...t}){return(0,H.jsx)(G5,{"data-slot":`checkbox`,className:D5(`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,H.jsx)(q5,{"data-slot":`checkbox-indicator`,className:`flex items-center justify-center text-current transition-none`,children:(0,H.jsx)(Xye,{className:`size-3.5`})})})}function $5({className:e,...t}){return(0,H.jsx)(UI,{"data-slot":`label`,className:D5(`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 Zye({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=i4(r),_=Array.isArray(i)?i:[i],v=({target:t})=>l(e,Q2(t?.value,f,g,h)),y=({target:t})=>u(e,Q2(t?.value,f,g,h));return(0,H.jsx)(`div`,{className:D5({"flex flex-col gap-2":!m,"flex flex-row gap-4 flex-wrap":m}),children:Array.isArray(f)&&f.map((r,i)=>{let l=q2(r.value,_),u=Array.isArray(p)&&p.includes(r.value),m=S4(e,i);return(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(Q5,{id:m,name:t||e,required:s,disabled:n||u||o,onCheckedChange:e=>{c(e?X2(i,_,f):K2(i,_,f))},className:d,checked:l,autoFocus:a&&i===0,onBlur:v,onFocus:y,"aria-describedby":x4(e)}),(0,H.jsx)($5,{className:`leading-tight`,htmlFor:S4(e,i),children:r.label})]},m)})})}function Qye(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,_=A4(c),v=s4(`DescriptionFieldTemplate`,m,u),y=e=>d(e),b=()=>f(t,r),x=()=>p(t,r),S=u.description||c.description;return(0,H.jsxs)(`div`,{className:`relative ${i||a?`cursor-not-allowed opacity-50`:``}`,"aria-describedby":x4(t),children:[!s&&S&&(0,H.jsx)(v,{id:g4(t),description:S,schema:c,uiSchema:h,registry:m}),(0,H.jsxs)(`div`,{className:`flex items-center gap-2 my-2`,children:[(0,H.jsx)(Q5,{id:t,name:n||t,checked:r!==void 0&&!!r,required:_,disabled:i||a,autoFocus:l,onCheckedChange:y,onBlur:b,onFocus:x,className:g}),(0,H.jsx)($5,{className:`leading-tight`,htmlFor:t,children:E4(o,s||!o)})]})]})}function $ye(e){let t=e+`CollectionProvider`,[n,r]=F5(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,H.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=Li(s),l=b.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=Ii(t,a(s,n).collectionRef);return(0,H.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=Li(u),p=b.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=b.useRef(null),s=Ii(t,o),c=a(u,n);return b.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,H.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 e7=`rovingFocusGroup.onEntryFocus`,ebe={bubbles:!1,cancelable:!0},t7=`RovingFocusGroup`,[n7,r7,tbe]=$ye(t7),[nbe,i7]=F5(t7,[tbe]),[rbe,ibe]=nbe(t7),a7=b.forwardRef((e,t)=>(0,H.jsx)(n7.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,H.jsx)(n7.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,H.jsx)(abe,{...e,ref:t})})}));a7.displayName=t7;var abe=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=Ii(t,f),m=YI(a),[h,g]=L5({prop:o,defaultProp:s??null,onChange:c,caller:t7}),[_,v]=b.useState(!1),y=hk(l),x=r7(n),S=b.useRef(!1),[C,w]=b.useState(0);return b.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(e7,y),()=>e.removeEventListener(e7,y)},[y]),(0,H.jsx)(rbe,{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,H.jsx)(UO.div,{tabIndex:_||C===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:I5(e.onMouseDown,()=>{S.current=!0}),onFocus:I5(e.onFocus,e=>{let t=!S.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(e7,ebe);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=x().filter(e=>e.focusable);c7([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}S.current=!1}),onBlur:I5(e.onBlur,()=>v(!1))})})}),o7=`RovingFocusGroupItem`,s7=b.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=eA(),l=a||c,u=ibe(o7,n),d=u.currentTabStopId===l,f=r7(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u;return b.useEffect(()=>{if(r)return p(),()=>m()},[r,p,m]),(0,H.jsx)(n7.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,H.jsx)(UO.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:I5(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:I5(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:I5(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=cbe(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?lbe(n,r+1):n.slice(r+1)}setTimeout(()=>c7(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})});s7.displayName=o7;var obe={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function sbe(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function cbe(e,t,n){let r=sbe(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return obe[r]}function c7(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function lbe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var ube=a7,dbe=s7,l7=`Radio`,[fbe,u7]=F5(l7),[pbe,d7]=fbe(l7);function f7(e){let{__scopeRadio:t,checked:n=!1,children:r,disabled:i,form:a,name:o,onCheck:s,required:c,value:l=`on`,internal_do_not_use_render:u}=e,[d,f]=b.useState(null),[p,m]=b.useState(null),h={checked:n,disabled:i,required:c,name:o,form:a,value:l,control:d,setControl:f,hasConsumerStoppedPropagationRef:b.useRef(!1),isFormControl:!d||!!a||!!d.closest(`form`),bubbleInput:p,setBubbleInput:m,onCheck:()=>s?.()};return(0,H.jsx)(pbe,{scope:t,...h,children:hbe(u)?u(h):r})}var p7=`RadioTrigger`,m7=b.forwardRef(({__scopeRadio:e,onClick:t,...n},r)=>{let{checked:i,disabled:a,value:o,setControl:s,onCheck:c,hasConsumerStoppedPropagationRef:l,isFormControl:u,bubbleInput:d}=d7(p7,e),f=Ii(r,s);return(0,H.jsx)(UO.button,{type:`button`,role:`radio`,"aria-checked":i,"data-state":y7(i),"data-disabled":a?``:void 0,disabled:a,value:o,...n,ref:f,onClick:I5(t,e=>{i||c(),d&&u&&(l.current=e.isPropagationStopped(),l.current||e.stopPropagation())})})});m7.displayName=p7;var mbe=b.forwardRef((e,t)=>{let{__scopeRadio:n,name:r,checked:i,required:a,disabled:o,value:s,onCheck:c,form:l,...u}=e;return(0,H.jsx)(f7,{__scopeRadio:n,checked:i,disabled:o,required:a,onCheck:c,name:r,form:l,value:s,internal_do_not_use_render:({isFormControl:e})=>(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(m7,{...u,ref:t,__scopeRadio:n}),e&&(0,H.jsx)(v7,{__scopeRadio:n})]})})});mbe.displayName=l7;var h7=`RadioIndicator`,g7=b.forwardRef((e,t)=>{let{__scopeRadio:n,forceMount:r,...i}=e,a=d7(h7,n);return(0,H.jsx)(R5,{present:r||a.checked,children:(0,H.jsx)(UO.span,{"data-state":y7(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t})})});g7.displayName=h7;var _7=`RadioBubbleInput`,v7=b.forwardRef(({__scopeRadio:e,...t},n)=>{let{control:r,checked:i,required:a,disabled:o,name:s,value:c,form:l,bubbleInput:u,setBubbleInput:d,hasConsumerStoppedPropagationRef:f}=d7(_7,e),p=Ii(n,d),m=XI(i),h=pM(r);b.useEffect(()=>{let e=u;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=!f.current;if(m!==i&&n){let t=new Event(`click`,{bubbles:r});n.call(e,i),e.dispatchEvent(t)}},[u,m,i,f]);let g=b.useRef(i);return(0,H.jsx)(UO.input,{type:`radio`,"aria-hidden":!0,defaultChecked:g.current,required:a,disabled:o,name:s,value:c,form:l,...t,tabIndex:-1,ref:p,style:{...t.style,...h,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})});v7.displayName=_7;function hbe(e){return typeof e==`function`}function y7(e){return e?`checked`:`unchecked`}var gbe=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],b7=`RadioGroup`,[_be,vbe]=F5(b7,[i7,u7]),x7=i7(),S7=u7(),[ybe,bbe]=_be(b7),C7=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=x7(n),m=YI(l),[h,g]=L5({prop:a,defaultProp:i??null,onChange:d,caller:b7});return(0,H.jsx)(ybe,{scope:n,name:r,required:o,disabled:s,value:h,onValueChange:g,children:(0,H.jsx)(ube,{asChild:!0,...p,orientation:c,dir:m,loop:u,children:(0,H.jsx)(UO.div,{role:`radiogroup`,"aria-required":o,"aria-orientation":c,"data-disabled":s?``:void 0,dir:m,...f,ref:t})})})});C7.displayName=b7;var xbe=`RadioGroupItem`,Sbe=`RadioGroupItemProvider`,w7=`RadioGroupItemTrigger`,Cbe=`RadioGroupItemBubbleInput`;function wbe(e){let{__scopeRadioGroup:t,value:n,disabled:r,children:i,internal_do_not_use_render:a}=e,o=bbe(Sbe,t),s=S7(t),c=o.disabled||r;return(0,H.jsx)(f7,{...s,checked:o.value===n,disabled:c,required:o.required,name:o.name,value:n,onCheck:()=>o.onValueChange(n),internal_do_not_use_render:a,children:i})}var T7=b.forwardRef((e,t)=>{let{__scopeRadioGroup:n,...r}=e,i=x7(n),a=S7(n),{checked:o,disabled:s}=d7(w7,a.__scopeRadio),c=b.useRef(null),l=Ii(t,c),u=b.useRef(!1);return b.useEffect(()=>{let e=e=>{gbe.includes(e.key)&&(u.current=!0)},t=()=>u.current=!1;return document.addEventListener(`keydown`,e),document.addEventListener(`keyup`,t),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`keyup`,t)}},[]),(0,H.jsx)(dbe,{asChild:!0,...i,focusable:!s,active:o,children:(0,H.jsx)(m7,{...a,...r,ref:l,onKeyDown:I5(r.onKeyDown,e=>{e.key===`Enter`&&e.preventDefault()}),onFocus:I5(r.onFocus,()=>{u.current&&c.current?.click()})})})});T7.displayName=w7;var E7=b.forwardRef((e,t)=>{let{__scopeRadioGroup:n,value:r,disabled:i,...a}=e;return(0,H.jsx)(wbe,{__scopeRadioGroup:n,value:r,disabled:i,internal_do_not_use_render:({isFormControl:e})=>(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(T7,{...a,ref:t,__scopeRadioGroup:n}),e&&(0,H.jsx)(D7,{__scopeRadioGroup:n})]})})});E7.displayName=xbe;var D7=b.forwardRef((e,t)=>{let{__scopeRadioGroup:n,...r}=e;return(0,H.jsx)(v7,{...S7(n),...r,ref:t})});D7.displayName=Cbe;var Tbe=`RadioGroupIndicator`,O7=b.forwardRef((e,t)=>{let{__scopeRadioGroup:n,...r}=e;return(0,H.jsx)(g7,{...S7(n),...r,ref:t})});O7.displayName=Tbe;function Ebe({className:e,...t}){return(0,H.jsx)(C7,{"data-slot":`radio-group`,className:D5(`grid gap-3`,e),...t})}function Dbe({className:e,...t}){return(0,H.jsx)(E7,{"data-slot":`radio-group-item`,className:D5(`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,H.jsx)(O7,{"data-slot":`radio-group-indicator`,className:`relative flex items-center justify-center`,children:(0,H.jsx)(Qr,{className:`fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2`})})})}function Obe({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=i4(t),m=e=>o(Q2(e,u,p,f)),h=({target:t})=>s(e,Q2(t?.value,u,p,f)),g=({target:t})=>c(e,Q2(t?.value,u,p,f)),_=!!t?.inline;return(0,H.jsx)(`div`,{className:`mb-0`,children:(0,H.jsx)(Ebe,{defaultValue:n?.toString(),required:r,disabled:i||a,onValueChange:e=>{m(e)},onBlur:h,onFocus:g,"aria-describedby":x4(e),orientation:_?`horizontal`:`vertical`,className:D5(`flex flex-wrap`,{"flex-col":!_},l),children:Array.isArray(u)&&u.map((t,r)=>{let i=Array.isArray(d)&&d.includes(t.value);return(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(Dbe,{checked:q2(t.value,n),value:$2(t.value,r,p),id:S4(e,r),disabled:i}),(0,H.jsx)($5,{className:`leading-tight`,htmlFor:S4(e,r),children:t.label})]},S4(e,r))})})})}function k7(e,[t,n]){return Math.min(n,Math.max(t,e))}var A7=b.createContext(void 0);function kbe(e){let t=b.useContext(A7);return e||t||`ltr`}function Abe(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 jbe(e){let[t,n]=b.useState(void 0);return HL(()=>{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 Mbe(e){let t=e+`CollectionProvider`,[n,r]=VL(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,H.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=GL(s),l=b.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=BL(t,a(s,n).collectionRef);return(0,H.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=GL(u),p=b.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=b.useRef(null),s=BL(t,o),c=a(u,n);return b.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,H.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 j7=[`PageUp`,`PageDown`],M7=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],N7={"from-left":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-right":[`Home`,`PageDown`,`ArrowDown`,`ArrowRight`],"from-bottom":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-top":[`Home`,`PageDown`,`ArrowUp`,`ArrowLeft`]},P7=`Slider`,[F7,Nbe,Pbe]=Mbe(P7),[I7,Fbe]=VL(P7,[Pbe]),[Ibe,L7]=I7(P7),R7=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`?Lbe:Rbe,[y=[],x]=WL({prop:u,defaultProp:l,onChange:e=>{[...g.current][_.current]?.focus(),d(e)}}),S=b.useRef(y);function C(e){E(e,Ube(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=qbe(a),s=k7(Jbe(Math.round((e-r)/a)*a+r,o),[r,i]);x((e=[])=>{let r=Vbe(e,s,t);if(Kbe(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,H.jsx)(Ibe,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:i,valueIndexToChangeRef:_,thumbs:g.current,values:y,orientation:o,form:m,children:(0,H.jsx)(F7.Provider,{scope:e.__scopeSlider,children:(0,H.jsx)(F7.Slot,{scope:e.__scopeSlider,children:(0,H.jsx)(v,{"aria-disabled":s,"data-disabled":s?``:void 0,...h,ref:t,onPointerDown:LL(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=j7.includes(e.key)||e.shiftKey&&M7.includes(e.key)?10:1,r=_.current,i=y[r];E(i+a*n*t,r,{commit:!0})}}})})})})});R7.displayName=P7;var[z7,B7]=I7(P7,{startEdge:`left`,endEdge:`right`,size:`width`,direction:1}),Lbe=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=BL(t,e=>f(e)),m=b.useRef(void 0),h=kbe(i),g=h===`ltr`,_=g&&!a||!g&&a;function v(e){let t=m.current||d.getBoundingClientRect(),i=X7([0,t.width],_?[n,r]:[r,n]);return m.current=t,i(e-t.left)}return(0,H.jsx)(z7,{scope:e.__scopeSlider,startEdge:_?`left`:`right`,endEdge:_?`right`:`left`,direction:_?1:-1,size:`width`,children:(0,H.jsx)(V7,{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=N7[_?`from-left`:`from-right`].includes(e.key);l?.({event:e,direction:t?-1:1})}})})}),Rbe=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=BL(t,u),f=b.useRef(void 0),p=!i;function m(e){let t=f.current||u.current.getBoundingClientRect(),i=X7([0,t.height],p?[r,n]:[n,r]);return f.current=t,i(e-t.top)}return(0,H.jsx)(z7,{scope:e.__scopeSlider,startEdge:p?`bottom`:`top`,endEdge:p?`top`:`bottom`,size:`height`,direction:p?1:-1,children:(0,H.jsx)(V7,{"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=N7[p?`from-bottom`:`from-top`].includes(e.key);c?.({event:e,direction:t?-1:1})}})})}),V7=b.forwardRef((e,t)=>{let{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:o,onEndKeyDown:s,onStepKeyDown:c,...l}=e,u=L7(P7,n);return(0,H.jsx)(KL.span,{...l,ref:t,onKeyDown:LL(e.onKeyDown,e=>{e.key===`Home`?(o(e),e.preventDefault()):e.key===`End`?(s(e),e.preventDefault()):j7.concat(M7).includes(e.key)&&(c(e),e.preventDefault())}),onPointerDown:LL(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():r(e)}),onPointerMove:LL(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:LL(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),a(e))})})}),H7=`SliderTrack`,U7=b.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=L7(H7,n);return(0,H.jsx)(KL.span,{"data-disabled":i.disabled?``:void 0,"data-orientation":i.orientation,...r,ref:t})});U7.displayName=H7;var W7=`SliderRange`,G7=b.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=L7(W7,n),a=B7(W7,n),o=BL(t,b.useRef(null)),s=i.values.length,c=i.values.map(e=>Y7(e,i.min,i.max)),l=s>1?Math.min(...c):0,u=100-Math.max(...c);return(0,H.jsx)(KL.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?``:void 0,...r,ref:o,style:{...e.style,[a.startEdge]:l+`%`,[a.endEdge]:u+`%`}})});G7.displayName=W7;var K7=`SliderThumb`,q7=b.forwardRef((e,t)=>{let n=Nbe(e.__scopeSlider),[r,i]=b.useState(null),a=BL(t,e=>i(e)),o=b.useMemo(()=>r?n().findIndex(e=>e.ref.current===r):-1,[n,r]);return(0,H.jsx)(zbe,{...e,ref:a,index:o})}),zbe=b.forwardRef((e,t)=>{let{__scopeSlider:n,index:r,name:i,...a}=e,o=L7(K7,n),s=B7(K7,n),[c,l]=b.useState(null),u=BL(t,e=>l(e)),d=!c||o.form||!!c.closest(`form`),f=jbe(c),p=o.values[r],m=p===void 0?0:Y7(p,o.min,o.max),h=Hbe(r,o.values.length),g=f?.[s.size],_=g?Wbe(g,m,s.direction):0;return b.useEffect(()=>{if(c)return o.thumbs.add(c),()=>{o.thumbs.delete(c)}},[c,o.thumbs]),(0,H.jsxs)(`span`,{style:{transform:`var(--radix-slider-thumb-transform)`,position:`absolute`,[s.startEdge]:`calc(${m}% + ${_}px)`},children:[(0,H.jsx)(F7.ItemSlot,{scope:e.__scopeSlider,children:(0,H.jsx)(KL.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:LL(e.onFocus,()=>{o.valueIndexToChangeRef.current=r})})}),d&&(0,H.jsx)(J7,{name:i??(o.name?o.name+(o.values.length>1?`[]`:``):void 0),form:o.form,value:p},r)]})});q7.displayName=K7;var Bbe=`RadioBubbleInput`,J7=b.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{let i=b.useRef(null),a=BL(i,r),o=Abe(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,H.jsx)(KL.input,{style:{display:`none`},...n,ref:a,defaultValue:t})});J7.displayName=Bbe;function Vbe(e=[],t,n){let r=[...e];return r[n]=t,r.sort((e,t)=>e-t)}function Y7(e,t,n){return k7(100/(n-t)*(e-t),[0,100])}function Hbe(e,t){if(t>2)return`Value ${e+1} of ${t}`;if(t===2)return[`Minimum`,`Maximum`][e]}function Ube(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 Wbe(e,t,n){let r=e/2;return(r-X7([0,50],[0,r])(t)*n)*n}function Gbe(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function Kbe(e,t){if(t>0){let n=Gbe(e);return Math.min(...n)>=t}return!0}function X7(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 qbe(e){return(String(e).split(`.`)[1]||``).length}function Jbe(e,t){let n=10**t;return Math.round(e*n)/n}var Ybe=R7,Xbe=U7,Zbe=G7,Qbe=q7;function $be({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,H.jsxs)(Ybe,{"data-slot":`slider`,defaultValue:t,value:n,min:r,max:i,className:D5(`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,H.jsx)(Xbe,{"data-slot":`slider-track`,className:D5(`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,H.jsx)(Zbe,{"data-slot":`slider-range`,className:D5(`bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full`)})}),Array.from({length:o.length},(e,t)=>(0,H.jsx)(Qbe,{"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 exe=[`name`,`min`,`max`,`step`,`orientation`,`disabled`,`defaultValue`,`value`,`onValueChange`,`className`,`dir`,`inverted`,`minStepsBetweenThumbs`];function txe({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,...n4(i)},u={id:s,...WD(r.props||{},exe)};return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)($be,{disabled:n||t,min:l.min,max:l.max,step:l.step,value:[e],onValueChange:c,...u,"aria-describedby":x4(s)}),e]})}var nxe=Ni(`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 rxe({className:e,variant:t,asChild:n=!1,...r}){return(0,H.jsx)(n?EF:`span`,{"data-slot":`badge`,className:D5(nxe({variant:t}),e),...r})}var Z7=(0,b.forwardRef)(({className:e,...t},n)=>(0,H.jsx)(JR,{ref:n,"data-slot":`command`,className:D5(`bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md`,e),...t})),ixe=(0,b.forwardRef)(({className:e,...t},n)=>(0,H.jsxs)(`div`,{className:`flex items-center border-b px-3`,"cmdk-input-wrapper":``,children:[(0,H.jsx)(Si,{className:`mr-2 h-4 w-4 shrink-0 opacity-50`}),(0,H.jsx)(JR.Input,{ref:n,className:D5(`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})]}));ixe.displayName=JR.Input.displayName;function Q7({className:e,...t}){return(0,H.jsx)(JR.List,{"data-slot":`command-list`,className:D5(`max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto`,e),...t})}function $7({className:e,...t}){return(0,H.jsx)(JR.Group,{"data-slot":`command-group`,className:D5(`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 e9({className:e,...t}){return(0,H.jsx)(JR.Item,{"data-slot":`command-item`,className:D5(`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 axe({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=>DD(e.value,t))),[t,n]),v=(0,b.useMemo)(()=>t.filter(e=>!_.some(t=>DD(t.value,e.value))),[t,_]),y=(0,b.useCallback)(e=>{if(a)return;let t=_.filter(t=>!DD(t.value,e.value));r?.(t.map(e=>e.index))},[_,r,a]),x=(0,b.useCallback)(e=>{if(!(a||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,H.jsxs)(Z7,{onKeyDown:x,className:D5(`overflow-visible bg-transparent`,u),autoFocus:i,"aria-disabled":a,onBlur:l,onFocus:C,"aria-describedby":o,"aria-placeholder":s,children:[(0,H.jsx)(`div`,{className:D5(`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,H.jsxs)(`div`,{className:`flex gap-1 flex-wrap`,children:[_.map(e=>(0,H.jsxs)(rxe,{variant:`secondary`,children:[e.label,(0,H.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,H.jsx)(Ai,{className:D5(`h-3 w-3 text-muted-foreground hover:text-foreground`,a&&`pointer-events-none`)})})]},e.value)),(0,H.jsx)(JR.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,H.jsx)(`div`,{className:`relative mt-2`,children:(0,H.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,H.jsx)($7,{className:`h-full overflow-auto`,children:(0,H.jsx)(Q7,{children:v.map(e=>(0,H.jsx)(e9,{disabled:e.disabled,value:String(e.value),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 oxe({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);return(0,b.useEffect)(()=>{f&&h.current&&requestAnimationFrame(()=>{var e;(e=h.current)==null||e.scrollIntoView({block:`nearest`})})},[f]),(0,H.jsxs)(Z7,{ref:g,className:D5(`overflow-visible bg-transparent`,d),autoFocus:r,"aria-disabled":i,onBlur:e=>{g.current&&!g.current.contains(e.relatedTarget)&&p(!1),u?.(e)},onFocus:l,"aria-describedby":s,"aria-placeholder":c,children:[(0,H.jsxs)(`button`,{type:`button`,disabled:i,"aria-expanded":f,"aria-haspopup":`listbox`,onClick:()=>!i&&p(!f),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&!i&&(e.preventDefault(),e.stopPropagation(),p(!f))},className:D5(`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,H.jsx)(`span`,{className:D5(`flex-1 line-clamp-1`,!m&&`text-muted-foreground`),children:m?.label||o}),(0,H.jsx)(qr,{className:`h-4 w-4 opacity-50`})]}),(0,H.jsx)(`div`,{className:`relative`,children:f&&e&&e.length>0?(0,H.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,H.jsx)($7,{className:`h-full overflow-auto`,children:(0,H.jsx)(Q7,{children:e.map(e=>(0,H.jsxs)(e9,{ref:e.value===t?h:void 0,value:String(e.value),onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},onSelect:()=>{e.disabled||(n?.(e.value),p(!1))},className:D5(`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,H.jsx)(`span`,{children:e.label}),(0,H.jsx)(`span`,{className:`flex h-3.5 w-3.5 items-center justify-center`,children:e.value===t&&(0,H.jsx)(Kr,{className:`h-4 w-4`})})]},e.value))})})}):null})]})}function sxe({id:e,options:t,required:n,disabled:r,readonly:i,value:a,schema:o,multiple:s,autofocus:c,onChange:l,onBlur:u,onFocus:d,placeholder:f,rawErrors:p=[],className:m,registry:h,uiSchema:g}){let{enumOptions:_,enumDisabled:v,emptyValue:y}=t,b=i4(t);D4(e,o,_,s);let x=()=>{d(e,Q2(a,_,b,y))},S=()=>{u(e,Q2(a,_,b,y))},C=_?.map(({value:e,label:t},n)=>({value:s?e:$2(e,n,b),label:t,index:n,disabled:Array.isArray(v)&&v.includes(e)})),w=D5({"border-destructive":p.length>0},m);return(0,H.jsxs)(`div`,{className:`p-0.5`,children:[s?(0,H.jsx)(axe,{id:e,autoFocus:c,disabled:r||i,multiple:!0,className:w,items:C,selected:a,onValueChange:e=>{l(Q2(e.map(String),_,b,y))},onFocus:x,onBlur:S}):(0,H.jsx)(oxe,{items:C,selected:Y2(a,_,!1,b,``),onValueChange:e=>{l(Q2(e,_,b,y))},autoFocus:c,disabled:r||i,required:n,placeholder:f,className:w,onFocus:x,onBlur:S,ariaDescribedby:x4(e)}),(0,H.jsx)(j4,{id:e,multiple:s,options:t,registry:h,uiSchema:g,value:a})]})}function cxe({className:e,...t}){return(0,H.jsx)(`textarea`,{"data-slot":`textarea`,className:D5(`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 lxe({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,H.jsx)(`div`,{className:`flex p-0.5`,children:(0,H.jsx)(cxe,{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?.value),onFocus:({target:t})=>l(e,t?.value),"aria-describedby":x4(e),className:f})})}function uxe(){return{CheckboxWidget:Qye,CheckboxesWidget:Zye,RadioWidget:Obe,RangeWidget:txe,SelectWidget:sxe,TextareaWidget:lxe}}function t9(){return{templates:Pye(),widgets:uxe()}}t9();function dxe(){return rye(t9())}var fxe=dxe();function pxe({tool:e,enabled:t,execute:n}){let r=(0,b.useRef)(n);(0,b.useEffect)(()=>{r.current=n});let{name:i,description:a,inputSchema:o}=e;(0,b.useEffect)(()=>{let e=document.modelContext??navigator.modelContext;if(!t||!e)return;let n=new AbortController;return e.registerTool({name:i,description:a,inputSchema:o,execute:()=>r.current()},{signal:n.signal}),()=>{n.abort()}},[t,i,a,o])}var n9=[],r9=as()(ls(e=>({inputs:{},saveInput:(t,n,r,i)=>e(e=>{let a=e.inputs[t]??{},o=a[n]??[],s={key:r,input:i,createdAt:Date.now()};return{inputs:{...e.inputs,[t]:{...a,[n]:[...o,s]}}}}),updateInput:(t,n,r,i)=>e(e=>{let a=e.inputs[t],o=a?.[n];if(!o)return e;let s=o.findIndex(e=>e.key===r);if(s===-1)return e;let c=[...o];return c[s]={...c[s],input:i},{inputs:{...e.inputs,[t]:{...a,[n]:c}}}}),deleteInput:(t,n,r)=>e(e=>{let i=e.inputs[t],a=i?.[n];return a?{inputs:{...e.inputs,[t]:{...i,[n]:a.filter(e=>e.key!==r)}}}:e})}),{name:`skybridge-devtools-saved-inputs`,version:1,partialize:e=>({inputs:e.inputs})})),mxe=(e,t)=>r9(n=>e?n.inputs[e]?.[t]??n9:n9);function hxe({className:e,children:t,action:n,...r}){return(0,H.jsxs)(cfe,{className:`flex w-full min-w-0 items-stretch data-[state=open]:sticky data-[state=open]:top-0 data-[state=open]:z-20 data-[state=open]:bg-background`,children:[(0,H.jsxs)(lfe,{"data-slot":`accordion-trigger`,className:IP(`flex min-h-0 min-w-0 flex-1 items-center gap-2 pl-4 pr-2 py-2.5 h-12`,`type-text-md font-semibold text-foreground text-left`,`outline-none focus-visible:outline-none rounded-sm`,`disabled:pointer-events-none disabled:opacity-50`,`data-[state=open]:cursor-default`,`[&[data-state=open]>svg]:rotate-90`,e),...r,children:[(0,H.jsx)(Jr,{className:`size-4 shrink-0 text-muted-foreground transition-transform duration-200`}),t]}),n==null?null:(0,H.jsx)(`div`,{className:`flex shrink-0 items-center pr-4`,children:n})]})}function i9({text:e,title:t,className:n}){let[r,i]=(0,b.useState)(!1),[a,o]=(0,b.useState)(null),s=(0,b.useRef)(null);return(0,b.useLayoutEffect)(()=>{let t=s.current,n=t?.parentElement;if(!t||!n)return;let r=()=>t.scrollHeight<=t.clientHeight+1,i=()=>{if(t.textContent=e,r()){o(null);return}let n=0,i=e.length,a=0;for(;n<=i;){let o=n+i>>1;t.textContent=`${e.slice(0,o).trimEnd()}... more`,r()?(a=o,n=o+1):i=o-1}o(e.slice(0,a).trimEnd())};i();let a=-1,c=new ResizeObserver(e=>{let t=Math.round(e[0].contentRect.width);t!==a&&(a=t,i())});return c.observe(n),()=>c.disconnect()},[e]),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{className:IP(`relative`,n),children:[(0,H.jsx)(`p`,{ref:s,"aria-hidden":`true`,className:`invisible absolute inset-x-0 top-0 line-clamp-2`}),(0,H.jsx)(`p`,{children:a===null?e:(0,H.jsxs)(H.Fragment,{children:[a,`...`,` `,(0,H.jsx)(`button`,{type:`button`,onClick:()=>i(!0),className:`cursor-pointer p-0 underline underline-offset-2`,children:`more`})]})})]}),(0,H.jsx)(rF,{open:r,onOpenChange:i,children:(0,H.jsx)(iF,{size:`lg`,children:(0,H.jsxs)(aF,{children:[(0,H.jsx)(sF,{className:t?`font-mono`:`sr-only`,children:t??`Description`}),(0,H.jsx)(cF,{className:`max-h-[60vh] overflow-y-auto whitespace-pre-wrap`,children:e})]})})})]})}var gxe=[`h-7 w-full rounded-md border border-border bg-background`,`px-2 font-mono text-xs text-foreground`,`placeholder:text-muted-foreground/50`,`outline-none transition-colors`,`focus-visible:border-ring focus-visible:border-2`,`aria-invalid:border-destructive`,`disabled:cursor-not-allowed disabled:opacity-50`].join(` `),_xe=[`block w-full min-h-20 resize-y rounded-md border border-border bg-background`,`px-2 py-1.5 font-mono text-xs leading-5 text-foreground`,`placeholder:text-muted-foreground/50`,`outline-none transition-colors`,`focus-visible:border-ring focus-visible:border-2`,`aria-invalid:border-destructive`,`disabled:cursor-not-allowed disabled:opacity-50`].join(` `),a9=[`flex h-7 min-h-7 w-full items-center justify-between gap-2 rounded-md border border-border bg-background shadow-none`,`px-2 font-mono text-xs text-foreground`,`outline-none transition-colors`,`focus-visible:border-ring focus-visible:border-2 focus-visible:ring-0 focus-visible:ring-offset-0`,`data-[state=open]:ring-0 data-[state=open]:ring-offset-0`,`aria-invalid:border-destructive`,`data-[placeholder]:text-muted-foreground/50`,`disabled:cursor-not-allowed disabled:opacity-50`,`[&>span]:line-clamp-1`,`[&_svg]:size-3.5`].join(` `),o9=`text-[10px] leading-snug text-muted-foreground/70`,s9=[`inline-flex h-6 cursor-pointer items-center gap-1 rounded-md px-1.5`,`font-mono text-xs text-muted-foreground`,`transition-colors`,`hover:bg-muted hover:text-foreground`,`focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,`disabled:pointer-events-none disabled:opacity-50`].join(` `);function vxe(e){let{id:t,name:n,value:r,required:i,disabled:a,readonly:o,placeholder:s,schema:c,options:l,onChange:u,onChangeOverride:d,onBlur:f,onFocus:p,rawErrors:m,type:h}=e,g={...r4(c,h,l)},_=(m?.length??0)>0,v=g.type===`number`,y=e=>{if(e===``)return l.emptyValue;if(v){let t=Number(e);return Number.isFinite(t)?t:e}return e};return(0,H.jsx)(`input`,{id:t,name:n,toolparamdescription:c.description,className:gxe,value:r??``,required:i,disabled:a||o,placeholder:s,"aria-invalid":_||void 0,onChange:d??(e=>u(y(e.target.value))),onBlur:e=>f(t,y(e.target.value)),onFocus:e=>p(t,y(e.target.value)),...g})}function yxe(e){let{id:t,classNames:n,style:r,label:i,required:a,rawDescription:o,rawErrors:s,children:c,errors:l,help:u,hidden:d,schema:f,uiSchema:p}=e;if(d)return(0,H.jsx)(`div`,{className:`hidden`,children:c});let m=f.type===`object`||f.type===`array`,h=!!p?.[`ui:widget`],g=m&&!h,_=!g&&!!i,v=(s?.length??0)>0;return(0,H.jsxs)(`div`,{className:IP(`flex flex-col gap-1`,n),style:r,children:[_&&(0,H.jsxs)(`label`,{htmlFor:t,className:IP(`font-mono text-xs text-muted-foreground`,v&&`text-destructive`),children:[i,a&&(0,H.jsx)(`span`,{className:`ml-1 text-destructive`,children:`*`})]}),!g&&o?(0,H.jsx)(i9,{text:o,title:i,className:o9}):null,c,l,u]})}function bxe(e){return!e.errors||e.errors.length===0?null:(0,H.jsx)(`div`,{className:`font-mono text-[11px] text-destructive`,children:e.errors.join(`, `)})}function xxe(e){return e.description?(0,H.jsx)(`p`,{id:e.id,className:o9,children:e.description}):null}function Sxe(e){let{id:t,title:n,required:r}=e;return n?(0,H.jsxs)(`div`,{id:t,className:`font-mono text-xs text-muted-foreground`,children:[n,r&&(0,H.jsx)(`span`,{className:`ml-1 text-destructive`,children:`*`})]}):null}function Cxe(e){let{fieldPathId:t,properties:n,description:r,disabled:i,title:a,required:o}=e,s=t.$id===`root`;return(0,H.jsxs)(`div`,{className:IP(`flex flex-col`,s?`gap-6`:`gap-5 border-l border-border pl-2.5`),children:[!s&&a&&(0,H.jsxs)(`div`,{className:`font-mono text-xs text-muted-foreground`,children:[a,o&&(0,H.jsx)(`span`,{className:`ml-1 text-destructive`,children:`*`})]}),!s&&r&&(0,H.jsx)(`p`,{className:`text-[10px] leading-snug text-muted-foreground/70`,children:r}),n.filter(e=>!e.hidden).map(e=>(0,H.jsx)(`div`,{"aria-disabled":i||void 0,children:e.content},e.name))]})}function wxe(e){let{items:t,canAdd:n,onAddClick:r,disabled:i,readonly:a,title:o,required:s,schema:c}=e,l=c.description;return(0,H.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[o&&(0,H.jsxs)(`div`,{className:`font-mono text-xs text-muted-foreground`,children:[o,s&&(0,H.jsx)(`span`,{className:`ml-1 text-destructive`,children:`*`})]}),l&&(0,H.jsx)(`p`,{className:`text-[10px] leading-snug text-muted-foreground/70`,children:l}),t,n&&(0,H.jsxs)(`button`,{type:`button`,className:IP(s9,`self-start`),onClick:r,disabled:i||a,children:[(0,H.jsx)(yi,{className:`size-3`}),`add`]})]})}function Txe(e){let{children:t,index:n,buttonsProps:r,hasToolbar:i}=e,{hasRemove:a,onRemoveItem:o,disabled:s,readonly:c}=r;return(0,H.jsxs)(`div`,{className:`flex items-start gap-1.5`,children:[(0,H.jsxs)(`span`,{className:`mt-1 select-none font-mono text-[11px] text-muted-foreground/50`,children:[`[`,n,`]`]}),(0,H.jsx)(`div`,{className:`flex-1 min-w-0`,children:t}),i&&a&&(0,H.jsx)(`button`,{type:`button`,className:IP(s9,`mt-0.5 px-1`),onClick:o,disabled:s||c,"aria-label":`Remove item ${n}`,children:(0,H.jsx)(Ai,{className:`size-3`})})]})}function Exe(e){let{icon:t,iconType:n,registry:r,uiSchema:i,...a}=e;return(0,H.jsxs)(`button`,{type:`button`,className:s9,...a,children:[(0,H.jsx)(yi,{className:`size-3`}),`add`]})}function Dxe(e){let{icon:t,iconType:n,registry:r,uiSchema:i,...a}=e;return(0,H.jsx)(`button`,{type:`button`,className:IP(s9,`px-1`),"aria-label":`Remove`,...a,children:(0,H.jsx)(Ai,{className:`size-3`})})}function c9(){return null}var Oxe={AddButton:Exe,RemoveButton:Dxe,CopyButton:c9,MoveDownButton:c9,MoveUpButton:c9,ClearButton:c9},kxe=`inline-flex items-center justify-center rounded-sm border border-border bg-background py-0.5 type-text-sm font-medium text-muted-foreground`;function Axe({className:e,icon:t,children:n,onDismiss:r,...i}){return(0,H.jsxs)(`span`,{className:Mr(kxe,`gap-[3px]`,t?`px-1`:`pl-[9px] pr-1`,e),...i,children:[(0,H.jsxs)(`span`,{className:Mr(`inline-flex items-center`,t&&`gap-[5px]`),children:[t&&(0,H.jsx)(`span`,{className:`inline-flex shrink-0`,children:t}),(0,H.jsx)(`span`,{children:n})]}),(0,H.jsx)(`button`,{type:`button`,"aria-label":`Remove`,onClick:r,className:`inline-flex items-center justify-center rounded-[3px] p-0.5 hover:bg-accent`,children:(0,H.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,H.jsx)(`path`,{d:`M18 6 6 18`}),(0,H.jsx)(`path`,{d:`m6 6 12 12`})]})})]})}var l9=(0,b.createContext)(null);function u9(){let e=(0,b.useContext)(l9);if(!e)throw Error(`Combobox compound components must be used within <Combobox>`);return e}function jxe(e){let{children:t,multiple:n=!1,open:r,defaultOpen:i=!1,onOpenChange:a,getOptionLabel:o}=e,[s,c]=(0,b.useState)(n?null:e.defaultValue??null),[l,u]=(0,b.useState)(n?e.defaultValue??[]:[]),[d,f]=(0,b.useState)(i),p=r!==void 0,m=p?r:d,h=(0,b.useCallback)(e=>{p||f(e),a?.(e)},[p,a]),g=n?null:(e.value===void 0?s:e.value)??null,_=n?e.value===void 0?l:e.value:[],v=(0,b.useCallback)(e=>n?_.includes(e):g===e,[n,g,_]),y=n?void 0:e.onValueChange,x=n?e.onValueChange:void 0,S=!n&&e.value!==void 0,C=n&&e.value!==void 0,w=(0,b.useCallback)(e=>{if(n){let t=_.includes(e)?_.filter(t=>t!==e):[..._,e];C||u(t),x?.(t)}else S||c(e),y?.(e),h(!1)},[n,C,S,x,y,_,h]),T=(0,b.useCallback)(e=>{if(!n)return;let t=_.filter(t=>t!==e);C||u(t),x?.(t)},[n,C,x,_]),E=(0,b.useMemo)(()=>({multiple:n,value:g,values:_,onSelect:w,onDeselect:T,isSelected:v,open:m,onOpenChange:h,getOptionLabel:o}),[n,g,_,w,T,v,m,h,o]);return(0,H.jsx)(l9.Provider,{value:E,children:(0,H.jsx)(jP,{open:m,onOpenChange:h,children:t})})}function Mxe({className:e,size:t,placeholder:n,children:r,...i}){let{multiple:a,value:o,values:s,open:c,onDeselect:l}=u9(),u=a?s.length===0:o==null;return(0,H.jsx)(MP,{asChild:!0,children:(0,H.jsxs)(`button`,{type:`button`,"data-slot":`combobox-trigger`,role:`combobox`,"aria-expanded":c,className:Mr(KI({size:t}),e),...i,children:[(0,H.jsx)(`span`,{className:Mr(`flex flex-1 items-center gap-1.5 text-left`,a&&`flex-wrap`,u&&`text-placeholder`),children:u?n:a?(0,H.jsx)(Nxe,{values:s,onDeselect:l}):r}),(0,H.jsx)(qr,{className:`size-5 shrink-0 text-muted-foreground`})]})})}function Nxe({values:e,onDeselect:t}){let{getOptionLabel:n}=u9();return(0,H.jsx)(H.Fragment,{children:e.map(e=>(0,H.jsx)(Axe,{onClick:e=>e.stopPropagation(),onDismiss:()=>t(e),children:n?n(e):e},e))})}function Pxe({className:e,children:t,filter:n,...r}){let{multiple:i}=u9();return(0,H.jsx)(NP,{className:Mr(`w-[var(--radix-popover-trigger-width)] p-0`,e),align:`start`,onOpenAutoFocus:i?e=>e.preventDefault():void 0,...r,children:(0,H.jsx)(JR,{"data-slot":`combobox-command`,filter:n,className:`flex h-full w-full flex-col overflow-hidden rounded-md bg-popover`,children:t})})}function Fxe({className:e,...t}){return(0,H.jsxs)(`div`,{"data-slot":`combobox-search`,className:`flex items-center gap-2 border-b border-border-secondary px-3 py-2.5`,children:[(0,H.jsx)(Si,{className:`size-5 shrink-0 text-muted-foreground`}),(0,H.jsx)(JR.Input,{"data-slot":`combobox-search-input`,className:Mr(`flex h-full w-full bg-transparent type-text-md font-medium text-foreground outline-hidden`,`placeholder:text-placeholder`,`disabled:cursor-not-allowed disabled:opacity-50`,e),...t})]})}function Ixe({className:e,...t}){return(0,H.jsx)(JR.List,{"data-slot":`combobox-list`,className:Mr(`max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto py-1`,e),...t})}function Lxe({className:e,...t}){return(0,H.jsx)(JR.Empty,{"data-slot":`combobox-empty`,className:Mr(`py-6 text-center type-text-sm text-muted-foreground`,e),...t})}function Rxe({className:e,children:t,itemValue:n,...r}){let{onSelect:i,isSelected:a}=u9(),o=a(n);return(0,H.jsxs)(JR.Item,{"data-slot":`combobox-item`,"data-selected-item":o||void 0,onSelect:()=>i(n),className:Mr(`relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 outline-hidden select-none`,`type-text-md font-medium text-foreground mx-1.5 my-px`,`data-[selected=true]:bg-background-hover`,`data-[selected-item]:bg-accent`,`data-[disabled=true]:pointer-events-none data-[disabled=true]:text-disabled-foreground`,`[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-5`,e),...r,children:[(0,H.jsx)(`span`,{className:`flex flex-1 items-center gap-2 truncate`,children:t}),o&&(0,H.jsx)(Kr,{className:`size-5 shrink-0 text-primary`})]})}var zxe=Object.defineProperty,d9=(e,t)=>zxe(e,`name`,{value:t,configurable:!0}),f9=`Switch`,[Bxe,Vxe]=pk(f9),[Hxe,p9]=Bxe(f9);function m9(e){let{__scopeSwitch: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]=XM({prop:n,defaultProp:i??!1,onChange:c,caller:f9}),[m,h]=b.useState(null),[g,_]=b.useState(null),v=b.useRef(!1),[y,x]=b.useReducer(e=>e+1,0),S={checked:f,setChecked:p,disabled:a,control:m,setControl:h,name:s,form:o,value:u,hasConsumerStoppedPropagationRef:v,userInteractionCount:y,onUserInteraction:x,required:l,defaultChecked:i,isFormControl:!m||!!o||!!m.closest(`form`),bubbleInput:g,setBubbleInput:_};return(0,H.jsx)(Hxe,{scope:t,...S,children:h9(d)?d(S):r})}d9(m9,`SwitchProvider`);var Uxe=`SwitchTrigger`,Wxe=b.forwardRef(d9(function({__scopeSwitch:e,onClick:t,...n},r){let{control:i,form:a,value:o,disabled:s,checked:c,required:l,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,onUserInteraction:p,isFormControl:m,bubbleInput:h}=p9(Uxe,e),g=Ii(r,u),_=b.useRef(c);return b.useEffect(()=>{let e=a?i?.ownerDocument.getElementById(a):i?.form;if(e instanceof HTMLFormElement){let t=d9(()=>d(_.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[i,a,d]),(0,H.jsx)(UO.button,{type:`button`,role:`switch`,"aria-checked":c,"aria-required":l,"data-state":g9(c),"data-disabled":s?``:void 0,disabled:s,value:o,...n,ref:g,onClick:ck(t,e=>{p(),d(e=>!e),h&&m&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})},`SwitchTrigger`)),Gxe=b.forwardRef(d9(function(e,t){let{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,H.jsx)(m9,{__scopeSwitch: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,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Wxe,{...d,ref:t,__scopeSwitch:n}),e&&(0,H.jsx)(Yxe,{__scopeSwitch:n})]})})},`Switch`)),Kxe=`SwitchThumb`,qxe=b.forwardRef(d9(function(e,t){let{__scopeSwitch:n,...r}=e,i=p9(Kxe,n);return(0,H.jsx)(UO.span,{"data-state":g9(i.checked),"data-disabled":i.disabled?``:void 0,...r,ref:t})},`SwitchThumb`)),Jxe=`SwitchBubbleInput`,Yxe=b.forwardRef(d9(function({__scopeSwitch:e,onClick:t,...n},r){let{control:i,hasConsumerStoppedPropagationRef:a,userInteractionCount:o,checked:s,defaultChecked:c,required:l,disabled:u,name:d,value:f,form:p,bubbleInput:m,setBubbleInput:h}=p9(Jxe,e),g=Ii(r,h),_=pM(i),v=b.useRef(!1),y=b.useRef(s),x=b.useRef(o);b.useEffect(()=>{let e=m;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=o!==x.current;x.current=o;let i=y.current!==s;y.current=s;let c=!(r&&a.current);if(i&&n){v.current=!r;let t=new Event(`click`,{bubbles:c});n.call(e,s),e.dispatchEvent(t),v.current=!1}},[m,s,a,o]);let S=b.useRef(s);return(0,H.jsx)(UO.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:c??S.current,required:l,disabled:u,name:d,value:f,form:p,...n,tabIndex:-1,ref:g,onClick:ck(t,e=>{v.current&&e.stopPropagation()}),style:{...n.style,..._,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})},`SwitchBubbleInput`));function h9(e){return typeof e==`function`}d9(h9,`isFunction`);function g9(e){return e?`checked`:`unchecked`}d9(g9,`getState`);function Xxe({className:e,...t}){return(0,H.jsx)(Gxe,{"data-slot":`switch`,className:Mr(`peer inline-flex h-5 w-9 shrink-0 items-center rounded-full p-0.5`,`bg-subtle data-[state=checked]:not-disabled:bg-primary`,`transition-colors`,`outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background`,`disabled:pointer-events-none disabled:opacity-50`,e),...t,children:(0,H.jsx)(qxe,{"data-slot":`switch-thumb`,className:Mr(`pointer-events-none block size-4 rounded-full bg-primary-foreground shadow-xs`,`transition-transform data-[state=unchecked]:translate-x-0 data-[state=checked]:translate-x-4`)})})}function Zxe(e){let{id:t,name:n,value:r,required:i,disabled:a,readonly:o,placeholder:s,options:c,schema:l,onChange:u,onBlur:d,onFocus:f,rawErrors:p}=e,m=c.rows??3,h=(p?.length??0)>0;return(0,H.jsx)(`textarea`,{id:t,name:n,toolparamdescription:l.description,rows:m,className:_xe,value:r??``,required:i,disabled:a||o,placeholder:s,spellCheck:!1,"aria-invalid":h||void 0,onChange:e=>u(e.target.value===``?c.emptyValue:e.target.value),onBlur:e=>d(t,e.target.value),onFocus:e=>f(t,e.target.value)})}function Qxe(e){let{id:t,value:n,required:r,disabled:i,readonly:a,placeholder:o,options:s,onChange:c,rawErrors:l}=e,u=s.enumOptions??[],d=(l?.length??0)>0;return(0,H.jsxs)(yL,{value:n==null?``:String(n),required:r,disabled:i||a,onValueChange:e=>{let t=u.find(t=>String(t.value)===e);c(t?t.value:e)},children:[(0,H.jsx)(xL,{id:t,className:IP(a9),"aria-invalid":d||void 0,children:(0,H.jsx)(bL,{placeholder:o??`Select…`})}),(0,H.jsx)(SL,{children:u.map(e=>(0,H.jsx)(CL,{value:String(e.value),className:`font-mono text-xs`,children:e.label},String(e.value)))})]})}function $xe(e){let{id:t,value:n,required:r,disabled:i,readonly:a,onChange:o}=e;return(0,H.jsx)(Xxe,{id:t,checked:n===!0,required:r,disabled:i||a,onCheckedChange:e=>o(e===!0)})}function eSe(e){let{id:t,value:n,disabled:r,readonly:i,options:a,placeholder:o,rawErrors:s,schema:c}=e,l=tSe(a,c),u=(s?.length??0)>0;return(0,H.jsx)(nSe,{id:t,value:n,disabled:r||i,placeholder:o??`Select…`,enumOptions:l,hasError:u,onChange:e.onChange})}function tSe(e,t){let n=e.enumOptions??[];if(n.length>0)return n;let r=t.items,i=(r&&!Array.isArray(r)&&typeof r!=`boolean`?r:void 0)?.enum??t.enum;return Array.isArray(i)?i.map(e=>({value:e,label:String(e)})):[]}function nSe({id:e,value:t,disabled:n,placeholder:r,enumOptions:i,hasError:a,onChange:o}){let s=Array.isArray(t)?t.filter(e=>e!=null):[],c=i.filter(e=>!s.some(t=>String(t)===String(e.value))),[l,u]=(0,b.useState)(!1),d=(0,b.useRef)(!1);return(0,H.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,H.jsxs)(jxe,{open:l,onOpenChange:e=>{if(!e&&d.current){d.current=!1;return}u(e)},value:null,onValueChange:e=>{if(e===null)return;let t=i.find(t=>String(t.value)===e);d.current=!0,o([...s,t?t.value:e])},children:[(0,H.jsx)(Mxe,{id:e,disabled:n||c.length===0,placeholder:r,className:IP(a9),"aria-invalid":a||void 0}),(0,H.jsxs)(Pxe,{children:[(0,H.jsx)(Fxe,{placeholder:`Search…`}),(0,H.jsxs)(Ixe,{className:`flex flex-col gap-1 py-1`,children:[(0,H.jsx)(Lxe,{children:`No results.`}),c.map(e=>(0,H.jsx)(Rxe,{itemValue:String(e.value),className:`mx-1 my-0 px-2 py-1 font-mono text-xs`,children:e.label},String(e.value)))]})]})]}),s.length>0&&(0,H.jsx)(`ul`,{className:`flex flex-wrap gap-1`,children:s.map(e=>{let t=i.find(t=>String(t.value)===String(e))?.label??String(e);return(0,H.jsx)(`li`,{children:(0,H.jsxs)(`button`,{type:`button`,onClick:()=>o(s.filter(t=>String(t)!==String(e))),disabled:n,"aria-label":`Remove ${t}`,className:IP(`group inline-flex cursor-pointer items-center gap-1 rounded-md border border-border bg-background px-2 py-0.5`,`font-mono text-xs text-foreground transition-colors`,`hover:bg-muted hover:text-foreground`,`focus-visible:outline-none focus-visible:border-ring focus-visible:border-2`,`disabled:cursor-not-allowed disabled:opacity-50`),children:[(0,H.jsx)(`span`,{children:t}),(0,H.jsx)(Ai,{className:`size-3 text-muted-foreground group-hover:text-foreground`})]})},String(e))})})]})}var rSe={TextareaWidget:Zxe,SelectWidget:Qxe,CheckboxWidget:$xe,CheckboxesWidget:eSe},iSe={ArrayFieldItemTemplate:Txe,ArrayFieldTemplate:wxe,BaseInputTemplate:vxe,DescriptionFieldTemplate:xxe,FieldErrorTemplate:bxe,FieldTemplate:yxe,ObjectFieldTemplate:Cxe,TitleFieldTemplate:Sxe,ButtonTemplates:Oxe},_9={"ui:submitButtonOptions":{norender:!0}};function aSe(e){if(e?.type!==`array`)return!1;let t=e.items;return!t||Array.isArray(t)||typeof t==`boolean`?!1:Array.isArray(t.enum)}function v9(e){if(!(!e||typeof e!=`object`)){if(aSe(e))return{"ui:widget":`checkboxes`};if(e.type===`object`&&e.properties){let t=[];for(let[n,r]of Object.entries(e.properties)){let e=v9(r);e&&t.push([n,e])}return t.length>0?Object.fromEntries(t):void 0}}}function oSe(e){let t=v9(e);return t?{..._9,...t}:_9}function sSe({name:e,description:t}){return(0,b.useMemo)(()=>n=>(0,H.jsx)(`form`,{toolname:e,tooldescription:t,toolautosubmit:``,...n}),[e,t])}var cSe=Object.defineProperty,y9=(e,t)=>cSe(e,`name`,{value:t,configurable:!0}),b9=[`Enter`,` `],lSe=[`ArrowDown`,`PageUp`,`Home`],x9=[`ArrowUp`,`PageDown`,`End`],uSe=[...lSe,...x9];[...b9],[...b9];var S9=`Menu`,[C9,dSe,fSe]=JI(S9),[w9,T9]=pk(S9,[fSe,vM,g1]),E9=vM(),D9=g1(),[pSe,O9]=w9(S9),[mSe,k9]=w9(S9),hSe=y9(e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=E9(t),[c,l]=b.useState(null),u=b.useRef(!1),d=hk(a),f=YI(i);return b.useEffect(()=>{let e=y9(()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},`handleKeyDown`),t=y9(()=>u.current=!1,`handlePointer`);return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),b.useEffect(()=>{if(!n)return;let e=y9(()=>d(!1),`handleBlur`);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,d]),(0,H.jsx)(AM,{...s,children:(0,H.jsx)(pSe,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,H.jsx)(mSe,{scope:t,onClose:b.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})},`Menu`),gSe=b.forwardRef(y9(function(e,t){let{__scopeMenu:n,...r}=e,i=E9(n);return(0,H.jsx)(jM,{...i,...r,ref:t})},`MenuAnchor`)),A9=`MenuPortal`,[_Se,vSe]=w9(A9,{forceMount:void 0}),ySe=y9(e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=O9(A9,t);return(0,H.jsx)(_Se,{scope:t,forceMount:n,children:(0,H.jsx)(RM,{present:n||a.open,children:(0,H.jsx)(PM,{asChild:!0,container:i,children:r})})})},`MenuPortal`),j9=`MenuContent`,[bSe,M9]=w9(j9),xSe=b.forwardRef(y9(function(e,t){let n=vSe(j9,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=O9(j9,e.__scopeMenu),o=k9(j9,e.__scopeMenu);return(0,H.jsx)(C9.Provider,{scope:e.__scopeMenu,children:(0,H.jsx)(RM,{present:r||a.open,children:(0,H.jsx)(C9.Slot,{scope:e.__scopeMenu,children:o.modal?(0,H.jsx)(SSe,{...i,ref:t}):(0,H.jsx)(CSe,{...i,ref:t})})})})},`MenuContent`)),SSe=b.forwardRef(y9(function(e,t){let n=O9(j9,e.__scopeMenu),r=b.useRef(null),i=Ii(t,r);return b.useEffect(()=>{let e=r.current;if(e)return lN(e)},[]),(0,H.jsx)(N9,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ck(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentModal`)),CSe=b.forwardRef(y9(function(e,t){let n=O9(j9,e.__scopeMenu);return(0,H.jsx)(N9,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentNonModal`)),wSe=Li(`MenuContent.ScrollLock`),N9=b.forwardRef(y9(function(e,t){let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=O9(j9,n),_=k9(j9,n),v=E9(n),y=D9(n),x=dSe(n),[S,C]=b.useState(null),w=b.useRef(null),T=Ii(t,w,g.onContentChange),E=b.useRef(0),D=b.useRef(``),O=b.useRef(0),k=b.useRef(null),A=b.useRef(`right`),j=b.useRef(0),M=m?bP:b.Fragment,N=m?{as:wSe,allowPinchZoom:!0}:void 0,P=y9(e=>{let t=D.current+e,n=x().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=B9(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;y9((function e(t){D.current=t,window.clearTimeout(E.current),t!==``&&(E.current=window.setTimeout(()=>e(``),1e3))}),`updateSearch`)(t),o&&setTimeout(()=>o.focus())},`handleTypeaheadSearch`);b.useEffect(()=>()=>window.clearTimeout(E.current),[]),Mk();let F=b.useCallback(e=>A.current===k.current?.side&&H9(e,k.current?.area),[]);return(0,H.jsx)(bSe,{scope:n,searchRef:D,onItemEnter:b.useCallback(e=>{F(e)&&e.preventDefault()},[F]),onItemLeave:b.useCallback(e=>{F(e)||(w.current?.focus(),C(null))},[F]),onTriggerLeave:b.useCallback(e=>{F(e)&&e.preventDefault()},[F]),pointerGraceTimerRef:O,onPointerGraceIntentChange:b.useCallback(e=>{k.current=e},[]),children:(0,H.jsx)(M,{...N,children:(0,H.jsx)(zk,{asChild:!0,trapped:i,onMountAutoFocus:ck(a,e=>{e.preventDefault(),w.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,H.jsx)(Ck,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,H.jsx)(Afe,{asChild:!0,...y,dir:_.dir,orientation:`vertical`,loop:r,currentTabStopId:S,onCurrentTabStopIdChange:C,onEntryFocus:ck(c,e=>{_.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,H.jsx)(MM,{role:`menu`,"aria-orientation":`vertical`,"data-state":I9(g.open),"data-radix-menu-content":``,dir:_.dir,...v,...h,ref:T,style:{outline:`none`,...h.style},onKeyDown:ck(h.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&P(e.key));let i=w.current;if(e.target!==i||!uSe.includes(e.key))return;e.preventDefault();let a=x().filter(e=>!e.disabled).map(e=>e.ref.current);x9.includes(e.key)&&a.reverse(),R9(a)}),onBlur:ck(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(E.current),D.current=``)}),onPointerMove:ck(e.onPointerMove,U9(e=>{let t=e.target,n=j.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>j.current?`right`:`left`;A.current=t,j.current=e.clientX}}))})})})})})})},`MenuContentImpl`)),P9=`MenuItem`,F9=`menu.itemSelect`,TSe=b.forwardRef(y9(function(e,t){let{disabled:n=!1,onSelect:r,...i}=e,a=b.useRef(null),o=k9(P9,e.__scopeMenu),s=M9(P9,e.__scopeMenu),c=Ii(t,a),l=b.useRef(!1),u=y9(()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(F9,{bubbles:!0,cancelable:!0});e.addEventListener(F9,e=>r?.(e),{once:!0}),WO(e,t),t.defaultPrevented?l.current=!1:o.onClose()}},`handleSelect`);return(0,H.jsx)(ESe,{...i,ref:c,disabled:n,onClick:ck(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:ck(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:ck(e.onKeyDown,e=>{n||e.target!==e.currentTarget||s.searchRef.current!==``&&e.key===` `||b9.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})},`MenuItem`)),ESe=b.forwardRef(y9(function(e,t){let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=M9(P9,n),s=D9(n),c=b.useRef(null),l=Ii(t,c),[u,d]=b.useState(!1),[f,p]=b.useState(``);return b.useEffect(()=>{let e=c.current;e&&p((e.textContent??``).trim())},[a.children]),(0,H.jsx)(C9.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,H.jsx)(jfe,{asChild:!0,...s,focusable:!r,children:(0,H.jsx)(UO.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:ck(e.onPointerMove,U9(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ck(e.onPointerLeave,U9(e=>o.onItemLeave(e))),onFocus:ck(e.onFocus,()=>d(!0)),onBlur:ck(e.onBlur,()=>d(!1))})})})},`MenuItemImpl`)),[DSe,OSe]=w9(`MenuRadioGroup`,{value:void 0,onValueChange:y9(()=>{},`onValueChange`)}),[kSe,ASe]=w9(`MenuItemIndicator`,{checked:!1}),[jSe,MSe]=w9(`MenuSub`);function I9(e){return e?`open`:`closed`}y9(I9,`getOpenState`);function L9(e){return e===`indeterminate`}y9(L9,`isIndeterminate`);function NSe(e){return L9(e)?`indeterminate`:e?`checked`:`unchecked`}y9(NSe,`getCheckedState`);function R9(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}y9(R9,`focusFirst`);function z9(e,t){return e.map((n,r)=>e[(t+r)%e.length])}y9(z9,`wrapArray`);function B9(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=z9(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}y9(B9,`getNextMatch`);function V9(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}y9(V9,`isPointInPolygon`);function H9(e,t){return t?V9({x:e.clientX,y:e.clientY},t):!1}y9(H9,`isPointerInGraceArea`);function U9(e){return t=>t.pointerType===`mouse`?e(t):void 0}y9(U9,`whenMouse`);var PSe=hSe,FSe=gSe,ISe=ySe,LSe=xSe,RSe=TSe,zSe=Object.defineProperty,W9=(e,t)=>zSe(e,`name`,{value:t,configurable:!0}),G9=`DropdownMenu`,[BSe,VSe]=pk(G9,[T9]),K9=T9(),[HSe,q9]=BSe(G9),USe=W9(e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=K9(t),l=b.useRef(null),[u,d]=XM({prop:i,defaultProp:a??!1,onChange:o,caller:G9});return(0,H.jsx)(HSe,{scope:t,triggerId:eA(),triggerRef:l,contentId:eA(),open:u,onOpenChange:d,onOpenToggle:b.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,H.jsx)(PSe,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})},`DropdownMenu`),WSe=`DropdownMenuTrigger`,GSe=b.forwardRef(W9(function(e,t){let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=q9(WSe,n),o=K9(n),s=Ii(t,a.triggerRef);return(0,H.jsx)(FSe,{asChild:!0,...o,children:(0,H.jsx)(UO.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:s,onPointerDown:ck(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:ck(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})},`DropdownMenuTrigger`)),KSe=W9(e=>{let{__scopeDropdownMenu:t,...n}=e,r=K9(t);return(0,H.jsx)(ISe,{...r,...n})},`DropdownMenuPortal`),qSe=`DropdownMenuContent`,JSe=b.forwardRef(W9(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=q9(qSe,n),a=K9(n),o=b.useRef(!1);return(0,H.jsx)(LSe,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:ck(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:ck(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})},`DropdownMenuContent`)),YSe=b.forwardRef(W9(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=K9(n);return(0,H.jsx)(RSe,{...i,...r,ref:t})},`DropdownMenuItem`)),XSe=USe,ZSe=GSe,QSe=KSe,$Se=JSe,eCe=YSe;function tCe({...e}){return(0,H.jsx)(XSe,{"data-slot":`dropdown-menu`,...e})}function nCe({...e}){return(0,H.jsx)(ZSe,{"data-slot":`dropdown-menu-trigger`,...e})}function rCe({className:e,sideOffset:t=4,...n}){return(0,H.jsx)(QSe,{children:(0,H.jsx)($Se,{"data-slot":`dropdown-menu-content`,sideOffset:t,className:Mr(`bg-popover text-popover-foreground`,`z-50 min-w-60 overflow-x-hidden overflow-y-auto rounded-md border border-border-secondary py-1 shadow-lg`,`max-h-(--radix-dropdown-menu-content-available-height)`,`origin-(--radix-dropdown-menu-content-transform-origin)`,`data-[state=open]:animate-in data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,`data-[state=closed]:zoom-out-95 data-[state=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`,e),...n})})}var iCe=Ni([`relative flex cursor-default items-center gap-2 rounded-sm px-2.5 py-2 outline-hidden select-none`,`type-text-sm font-semibold`,`mx-1.5 my-px`,`[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,`data-[disabled]:pointer-events-none data-[disabled]:opacity-50`].join(` `),{variants:{variant:{default:[`text-muted-foreground`,`[&_svg:not([class*='text-'])]:text-muted-foreground`,`[@media(hover:hover)]:hover:bg-background-hover [@media(hover:hover)]:hover:text-muted-foreground-hover`,`focus:bg-background-hover focus:text-muted-foreground-hover`].join(` `),destructive:[`text-destructive`,`[&_svg]:!text-destructive`,`[@media(hover:hover)]:hover:bg-destructive/10 dark:[@media(hover:hover)]:hover:bg-destructive/20`,`focus:bg-destructive/10 dark:focus:bg-destructive/20`].join(` `)}},defaultVariants:{variant:`default`}});function J9({className:e,inset:t,variant:n=`default`,...r}){return(0,H.jsx)(eCe,{"data-slot":`dropdown-menu-item`,"data-inset":t,className:Mr(iCe({variant:n}),t&&`pl-8`,e),...r})}function Y9({inputs:e,activeKey:t,onSelect:n,onClear:r,onDelete:i}){let a=t??`Input`;return(0,H.jsxs)(tCe,{children:[(0,H.jsx)(nCe,{asChild:!0,children:(0,H.jsxs)(`button`,{type:`button`,className:`inline-flex cursor-pointer items-center gap-1 rounded px-1 py-0.5 font-mono text-xs text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring aria-expanded:text-foreground`,children:[(0,H.jsx)(`span`,{children:a.length>12?`${a.slice(0,12)}…`:a}),(0,H.jsx)(qr,{className:`size-3 shrink-0`})]})}),(0,H.jsx)(rCe,{align:`start`,className:`min-w-48`,children:e.length===0?(0,H.jsx)(J9,{disabled:!0,className:`font-mono text-xs font-normal text-muted-foreground`,children:`No saved input yet`}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(J9,{onSelect:r,className:`cursor-pointer font-mono text-xs font-normal`,disabled:e.length<=0,children:[e.length>0&&(0,H.jsx)(Kr,{className:IP(`size-3.5 shrink-0`,t===null?`opacity-100`:`opacity-0`)}),(0,H.jsx)(`span`,{className:`text-muted-foreground italic`,children:e.length>0?`none`:`no saved input yet`})]}),e.map(e=>(0,H.jsxs)(`div`,{className:`group/item relative`,children:[(0,H.jsxs)(J9,{onSelect:()=>e.key===t?r():n(e),className:`cursor-pointer pr-8 font-mono text-xs font-normal`,children:[(0,H.jsx)(Kr,{className:IP(`size-3.5 shrink-0`,e.key===t?`opacity-100`:`opacity-0`)}),(0,H.jsx)(`span`,{className:`truncate`,children:e.key})]}),(0,H.jsx)(`button`,{type:`button`,"aria-label":`Delete saved input ${e.key}`,onClick:()=>i(e.key),className:`absolute top-1/2 right-2.5 inline-flex -translate-y-1/2 cursor-pointer rounded p-1 text-light-gray-foreground opacity-0 transition-opacity hover:text-destructive focus-visible:opacity-100 group-hover/item:opacity-100`,children:(0,H.jsx)(Di,{className:`size-3.5`})})]},e.key))]})})]})}function aCe({open:e,onOpenChange:t,defaultKey:n,existingKeys:r,onSave:i}){let a=(0,b.useId)(),[o,s]=(0,b.useState)(n),c=o.trim(),l=c.length>0&&r.includes(c);return(0,b.useEffect)(()=>{e&&s(n)},[e,n]),(0,H.jsx)(rF,{open:e,onOpenChange:t,children:(0,H.jsxs)(iF,{children:[(0,H.jsxs)(aF,{children:[(0,H.jsx)(sF,{children:`Save input`}),(0,H.jsx)(cF,{children:`Save the current values to reuse it later.`})]}),(0,H.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),c&&(i(c),t(!1))},className:`space-y-3`,children:[(0,H.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,H.jsx)(WI,{htmlFor:a,children:`Name`}),(0,H.jsx)(GI,{id:a,value:o,onChange:e=>s(e.target.value),placeholder:`e.g. happy path`,autoFocus:!0}),l&&(0,H.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`An input named "`,c,`" already exists: it will be overwritten.`]})]}),(0,H.jsxs)(oF,{children:[(0,H.jsx)($i,{type:`button`,variant:`secondary`,onClick:()=>t(!1),children:`Cancel`}),(0,H.jsx)($i,{type:`submit`,variant:`primary`,disabled:!c,children:l?`Overwrite`:`Save`})]})]})]})})}function oCe({tool:e}){let{mutateAsync:t,isPending:n}=zO(),[r,i]=SO(),a=r===e.name,o=os(e=>e.isSignedIn),s=os(e=>e.requiresAuth),c=(0,b.useRef)(null),l=uO(e.name),u=!!l?.response,{setToolData:d}=lO(),f=l?.input??{},p=t=>{d(e.name,{input:t??{}})},m=uCe(e,f),h=s&&AO(e)&&!o,[g,_]=(0,b.useState)(`form`),[v,y]=(0,b.useState)(!1),x=(0,b.useMemo)(()=>{let t=e.inputSchema;return!t?.properties||Object.keys(t.properties).length===0?!1:g===`json`&&v?!0:E5.validateFormData(f,t).errors.length>0},[e.inputSchema,g,v,f]),S=async()=>{if(h)return;let n=e.inputSchema,r=!n?.properties||Object.keys(n.properties).length===0;if(!(g===`json`&&v)){if(!r){let{errors:e}=E5.validateFormData(f,n);if(e.length>0){g===`form`?c.current?.validateForm():y(!0);return}}return i(e.name),await t({toolName:e.name,args:f})}},C=t=>{let n=t.target;return!n||n.closest(`[role=dialog]`)?!1:n.closest(`[data-tool-name]`)?.getAttribute(`data-tool-name`)===e.name};OB(`meta.enter`,e=>{C(e)&&S()}),OB(`enter`,e=>{C(e)&&e.target?.tagName!==`TEXTAREA`&&(e.preventDefault(),S())},{exactMatch:!0});let w=null;h?w=`Sign in to call this tool`:x&&(w=`Input is not valid`);let T=(0,H.jsx)($i,{disabled:n||h||x,variant:`primary`,className:`disabled:cursor-not-allowed disabled:pointer-events-auto disabled:opacity-100`,onClick:S,icon:n?(0,H.jsx)(si,{className:`size-3 animate-spin`}):(0,H.jsx)(_i,{className:`size-3`}),children:`Run`});return(0,H.jsxs)(pfe,{value:e.name,"data-tool-name":e.name,className:IP(`border-b border-l-[5px] border-border transition-colors last:border-b-0 data-[state=closed]:hover:bg-muted/40`,a&&`border-l-cyan-400`),children:[(0,H.jsx)(hxe,{onClick:u?()=>i(e.name):void 0,className:IP(`font-mono text-xs font-normal text-foreground`,`no-underline`),action:(0,H.jsxs)(`div`,{className:IP(`flex items-center gap-1.5 transition-opacity hover:opacity-100`,a?`opacity-100`:`opacity-50`),children:[m.savedInputs.length>0&&(0,H.jsx)(Y9,{inputs:m.savedInputs,activeKey:m.activeKey,onSelect:m.loadInput,onClear:m.clearSelection,onDelete:m.removeInput}),w?(0,H.jsxs)(zI,{children:[(0,H.jsx)(BI,{asChild:!0,children:(0,H.jsx)(`span`,{className:`inline-flex`,children:T})}),(0,H.jsx)(VI,{children:w})]}):T]}),children:(0,H.jsx)(`div`,{className:`min-w-0 flex-1 truncate text-left text-sm font-medium`,children:e.name})}),e.description?(0,H.jsx)(`div`,{className:`px-4 pb-3 font-sans`,children:(0,H.jsx)(lCe,{name:e.name,description:e.description})}):null,(0,H.jsx)(mfe,{className:`px-4 pt-0 pb-3 text-foreground`,style:{animation:`none`},children:(0,H.jsx)(dCe,{tool:e,formData:f,setFormData:p,formRef:c,tab:g,setTab:_,jsonError:v,setJsonError:y,saved:m,inputInvalid:x,onRun:S})})]})}var X9={model:{badgeClass:`border-blue-200 bg-blue-100 text-blue-700`,tooltip:`Visible to and callable by the agent.`},app:{badgeClass:`border-purple-200 bg-purple-100 text-purple-700`,tooltip:`Callable by the widget on this server only.`}};function sCe(e){let t=e._meta,n=t?.ui?.visibility,r=t?.[`openai/visibility`],i=n??r;if(!Array.isArray(i))return;let a=i.filter(e=>e===`model`||e===`app`);return a.length>0?a:void 0}function cCe(e,t){let n=t.inputSchema?.properties??{};return Object.fromEntries(Object.entries(e).filter(([e])=>e in n))}function lCe({name:e,description:t}){return(0,H.jsx)(`div`,{className:`rounded-md border border-border bg-muted/40 px-2.5 py-2`,children:(0,H.jsx)(i9,{text:t,title:e,className:`text-xs text-muted-foreground/70`})})}function uCe(e,t){let n=RO()?.name,r=mxe(n,e.name),i=r9(e=>e.saveInput),a=r9(e=>e.updateInput),o=r9(e=>e.deleteInput),s=lO(e=>e.setToolData),c=uO(e.name)?.activeSavedInputKey??null;return{serverName:n,savedInputs:r,activeKey:c&&r.find(e=>e.key===c)?c:null,loadInput:t=>{s(e.name,{input:cCe(t.input,e),activeSavedInputKey:t.key})},clearSelection:()=>{s(e.name,{input:{},activeSavedInputKey:null})},saveFromModal:o=>{n&&(r.some(e=>e.key===o)?a(n,e.name,o,t):i(n,e.name,o,t),s(e.name,{activeSavedInputKey:o}))},removeInput:t=>{n&&(o(n,e.name,t),t===c&&s(e.name,{activeSavedInputKey:null}))}}}function dCe({tool:e,formData:t,setFormData:n,formRef:r,tab:i,setTab:a,jsonError:o,setJsonError:s,saved:c,inputInvalid:l,onRun:u}){let d=e.inputSchema&&Object.keys(e.inputSchema.properties??{}).length>0;pxe({tool:e,enabled:!d,execute:async()=>await u()??{content:[{type:`text`,text:`The tool call was not executed.`}],isError:!0}});let f=sCe(e),[p,m]=(0,b.useState)(!1),{serverName:h,savedInputs:g,activeKey:_}=c,v=(0,H.jsx)(`button`,{type:`button`,onClick:()=>m(!0),disabled:l,title:l?void 0:`Save input`,"aria-label":`Save input`,className:IP(`shrink-0 cursor-pointer text-light-gray-foreground transition-colors hover:text-foreground`,`disabled:cursor-not-allowed disabled:pointer-events-auto disabled:hover:text-light-gray-foreground`),children:(0,H.jsx)(xi,{className:`size-3.5`})});return(0,H.jsxs)(`div`,{className:`space-y-3`,children:[f&&(0,H.jsx)(`div`,{"data-testid":`tool-visibility`,className:`flex flex-wrap gap-1`,children:f.map(e=>(0,H.jsxs)(zI,{children:[(0,H.jsx)(BI,{asChild:!0,children:(0,H.jsx)(NB,{size:`sm`,className:X9[e].badgeClass,children:e})}),(0,H.jsx)(DI,{children:(0,H.jsxs)(kI,{sideOffset:6,className:IP(`z-50 w-fit rounded-md border border-border bg-background px-3 py-2 text-xs text-foreground shadow-md`,`animate-in fade-in-0 zoom-in-95`,`data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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`),children:[X9[e].tooltip,(0,H.jsx)(jI,{width:11,height:5,className:`fill-background drop-shadow-[0_1px_0_var(--color-border)]`})]})})]},e))}),d&&(0,H.jsxs)(Hfe,{value:i,onValueChange:e=>a(e),children:[(0,H.jsxs)(`div`,{className:`flex items-end justify-between gap-2 border-b border-border`,children:[(0,H.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1 pb-1.5`,children:[h&&(l?(0,H.jsxs)(zI,{children:[(0,H.jsx)(BI,{asChild:!0,children:(0,H.jsx)(`span`,{className:`inline-flex`,children:v})}),(0,H.jsx)(VI,{children:`Input is not valid`})]}):v),h?(0,H.jsx)(Y9,{inputs:g,activeKey:_,onSelect:c.loadInput,onClear:c.clearSelection,onDelete:c.removeInput}):(0,H.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:`Input`})]}),(0,H.jsx)(`div`,{className:`-mb-px flex`,children:[`form`,`json`].map((e,t)=>{let n=e===`form`?ei:Gr;return(0,H.jsxs)(`button`,{type:`button`,onClick:()=>a(e),className:IP(`relative inline-flex h-7 cursor-pointer items-center gap-1.5 border border-border px-2 text-xs font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring`,t===0?`rounded-tl-md`:`-ml-px rounded-tr-md`,i===e?`z-10 border-b-background bg-background text-foreground`:`bg-muted/40 text-light-gray-foreground hover:text-foreground`),children:[(0,H.jsx)(n,{className:`size-3.5`}),(0,H.jsx)(`span`,{children:e})]},e)})})]}),(0,H.jsx)(T1,{value:`form`,children:(0,H.jsx)(fCe,{tool:e,formData:t,setFormData:n,formRef:r,onRun:u})}),(0,H.jsx)(T1,{value:`json`,className:`-mt-4`,children:(0,H.jsx)(pCe,{formData:t,setFormData:n,error:o,setError:s})})]}),d&&h&&(0,H.jsx)(aCe,{open:p,onOpenChange:m,defaultKey:_??``,existingKeys:g.map(e=>e.key),onSave:c.saveFromModal})]})}function fCe({tool:e,formData:t,setFormData:n,formRef:r,onRun:i}){let a=e.inputSchema,o=(0,b.useRef)(null);return(0,b.useEffect)(()=>{let e=o.current;if(!e)return;let t=e.querySelector(`input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]):not([type="file"]):not([type="button"]):not([type="submit"]), textarea`);t&&!t.value&&t.focus({preventScroll:!0})},[]),(0,H.jsx)(`div`,{ref:o,children:(0,H.jsx)(fxe,{ref:r,tagName:sSe(e),idPrefix:e.name,schema:a,validator:E5,uiSchema:oSe(a),formData:t,onChange:e=>n(e.formData),onSubmit:(e,t)=>{let n=t.nativeEvent,r=i();n instanceof SubmitEvent&&typeof n.respondWith==`function`&&n.respondWith(r)},showErrorList:!1,widgets:rSe,templates:iSe})})}function pCe({formData:e,setFormData:t,error:n,setError:r}){let[i,a]=(0,b.useState)(JSON.stringify(e,null,2)),o=(0,b.useRef)(!1);(0,b.useEffect)(()=>{if(o.current){o.current=!1;return}a(JSON.stringify(e,null,2))},[e]);let s=e=>{a(e);try{let n=JSON.parse(e);o.current=!0,t(n),r(!1)}catch{r(!0)}};return(0,H.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,H.jsxs)(`div`,{className:`relative`,children:[(0,H.jsx)(`textarea`,{className:IP(`max-h-80 min-h-20 w-full resize-none overflow-auto rounded-b-md border border-t-0 p-2 pr-9 font-mono text-xs field-sizing-content`,n?`border-destructive`:`border-border`),spellCheck:!1,value:i,onChange:e=>s(e.target.value)}),(0,H.jsx)(BP,{value:i,label:`Copy input`,className:`absolute top-2 right-2 z-10`})]}),n&&(0,H.jsx)(`div`,{className:`text-xs text-destructive`,children:`The provided JSON is invalid`})]})}function mCe(){let e=LO(),[t,n]=(0,b.useState)(e.length>0?[e[0].name]:[]),[r,i]=(0,b.useState)(!1),[a,o]=(0,b.useState)(void 0);return jB(()=>{i(!1),o(void 0)},a),(0,H.jsxs)(`div`,{className:`grid h-full min-h-0 grid-rows-[auto_1fr]`,children:[(0,H.jsxs)(`header`,{className:`flex h-9 items-center justify-between border-b border-border pl-4 pr-0`,children:[(0,H.jsx)(`span`,{className:`text-sm font-medium`,children:`Tools`}),(0,H.jsx)($i,{onClick:async()=>{o(void 0),i(!0);try{await CO.invalidateQueries({queryKey:[`list-tools`]})}finally{o(600)}},"aria-label":`Refresh tools`,variant:`tertiary`,size:`icon`,children:(0,H.jsx)(bi,{className:IP(`size-3.5`,r&&`animate-spin`)})})]}),(0,H.jsx)(ffe,{type:`multiple`,value:t,onValueChange:n,className:`min-h-0 overflow-y-auto`,children:e.map(e=>(0,H.jsx)(oCe,{tool:e},e.name))})]})}var Z9=`devtools-tools-split`,Q9=`tools-list`,$9=`tool-panel`;function hCe(){let{status:e,requiresAuth:t}=os(),n=ds(e=>e.previewClient),r=e===`authenticated`,{defaultLayout:i,onLayoutChanged:a}=Ko({id:Z9,panelIds:[Q9,$9],storage:localStorage});return(0,H.jsxs)(`div`,{className:`grid h-screen grid-rows-[auto_1fr] overflow-hidden bg-background text-foreground`,children:[(0,H.jsx)(Ece,{}),r&&n?(0,H.jsx)(b.Suspense,{fallback:null,children:(0,H.jsx)(rB,{})}):r?(0,H.jsx)(`div`,{id:`devtools-card-body`,className:`relative flex min-h-0 min-w-0 flex-1`,children:(0,H.jsxs)(Uo,{orientation:`horizontal`,id:Z9,className:`flex min-h-0 min-w-0 flex-1`,defaultLayout:i,onLayoutChanged:a,children:[(0,H.jsx)(Xo,{id:Q9,defaultSize:380,minSize:250,maxSize:510,className:`min-h-0 min-w-0`,children:(0,H.jsx)(`aside`,{className:`flex h-full min-h-0 min-w-0 flex-col overflow-hidden`,children:(0,H.jsx)(b.Suspense,{fallback:null,children:(0,H.jsx)(mCe,{})})})}),(0,H.jsx)($o,{className:`w-px shrink-0 bg-border transition-colors hover:bg-ring data-separator-active:bg-ring`}),(0,H.jsx)(Xo,{id:$9,minSize:320,className:`min-h-0 min-w-0`,children:(0,H.jsx)(`main`,{className:`flex h-full min-h-0 min-w-0 flex-col overflow-hidden`,children:(0,H.jsx)(b.Suspense,{fallback:null,children:(0,H.jsx)(Pde,{})})})})]})}):(0,H.jsx)(`div`,{className:`flex items-center justify-center`,children:(0,H.jsxs)(`div`,{className:`space-y-4 text-center`,children:[(0,H.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e===`connecting`?`Connecting to server...`:t?`Authentication required to access this server.`:`Not connected to a server.`}),e!==`connecting`&&(0,H.jsxs)($i,{variant:`secondary`,onClick:MO,children:[(0,H.jsx)(vi,{className:`size-3.5`}),`Connect`]})]})})]})}var gCe=()=>{let e=RO();(0,b.useEffect)(()=>{e?.name&&(document.title=`${e.name} · Skybridge`)},[e?.name])};function _Ce(){return Rae(),Iae(),gCe(),(0,H.jsx)(Ke,{client:CO,children:(0,H.jsx)(en,{children:(0,H.jsx)(hCe,{})})})}async function vCe(){let e=new URLSearchParams(window.location.search);if(e.get(`oauth_callback`)===`true`){let t=e.get(`code`),n=e.get(`iss`)??void 0,r=e.get(`state`)??void 0,i=e.get(`error`),a=e.get(`error_description`),o=new URL(window.location.href);for(let e of[`oauth_callback`,`code`,`state`,`iss`,`error`,`error_description`,`error_uri`])o.searchParams.delete(e);if(window.history.replaceState({},``,o.toString()),i)os.getState().setStatus(`error`),os.getState().setError(a?`${i}: ${a}`:i);else if(t)try{await PO(t,n,r)}catch(e){console.error(`OAuth callback failed:`,e),os.getState().setStatus(`error`),os.getState().setError(e instanceof Error?e.message:`OAuth callback failed`)}else os.getState().setStatus(`error`),os.getState().setError(`OAuth callback missing authorization code`)}else MO().catch(e=>{console.error(`Connection failed:`,e)})}vCe(),(0,x.createRoot)(document.getElementById(`root`)).render((0,H.jsx)(b.StrictMode,{children:(0,H.jsx)(_Ce,{})}));